diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..96313712 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +# Delphi generated files +*.dcu +*.res +*.stat +*.identcache + +# Delphi history files +src/__history diff --git a/ICS_zlog.zip b/ICS_zlog.zip deleted file mode 100644 index 23d0d740..00000000 Binary files a/ICS_zlog.zip and /dev/null differ diff --git a/VCL.zip b/VCL.zip deleted file mode 100644 index e3657029..00000000 Binary files a/VCL.zip and /dev/null differ diff --git a/lib/ADVGRID3/ADVGRID.DCR b/lib/ADVGRID3/ADVGRID.DCR new file mode 100644 index 00000000..60dca626 Binary files /dev/null and b/lib/ADVGRID3/ADVGRID.DCR differ diff --git a/lib/ADVGRID3/ADVGRID.DCU b/lib/ADVGRID3/ADVGRID.DCU new file mode 100644 index 00000000..2c6a922d Binary files /dev/null and b/lib/ADVGRID3/ADVGRID.DCU differ diff --git a/lib/ADVGRID3/ADVGRID3.GID b/lib/ADVGRID3/ADVGRID3.GID new file mode 100644 index 00000000..b53f395a Binary files /dev/null and b/lib/ADVGRID3/ADVGRID3.GID differ diff --git a/lib/ADVGRID3/ASGPKG.DCP b/lib/ADVGRID3/ASGPKG.DCP new file mode 100644 index 00000000..f752de5a Binary files /dev/null and b/lib/ADVGRID3/ASGPKG.DCP differ diff --git a/lib/ADVGRID3/ASGPKG.DCU b/lib/ADVGRID3/ASGPKG.DCU new file mode 100644 index 00000000..b0992162 Binary files /dev/null and b/lib/ADVGRID3/ASGPKG.DCU differ diff --git a/lib/ADVGRID3/ASGPKG.DPL b/lib/ADVGRID3/ASGPKG.DPL new file mode 100644 index 00000000..7046fc8d Binary files /dev/null and b/lib/ADVGRID3/ASGPKG.DPL differ diff --git a/lib/ADVGRID3/ASGPKG.RES b/lib/ADVGRID3/ASGPKG.RES new file mode 100644 index 00000000..36f26e23 Binary files /dev/null and b/lib/ADVGRID3/ASGPKG.RES differ diff --git a/lib/ADVGRID3/Asgpkg.dpk b/lib/ADVGRID3/Asgpkg.dpk new file mode 100644 index 00000000..a7e234a8 --- /dev/null +++ b/lib/ADVGRID3/Asgpkg.dpk @@ -0,0 +1,41 @@ +package asgpkg; + +{$R *.RES} +{$R 'Advgrid.dcr'} +{$R 'editbtn.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'TAdvStringGrid package'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl30, + VCLSMP30, + dclusr30; + +contains + Advgrid, + Match, + editbtn; + +end. diff --git a/lib/ADVGRID3/Asgpkg.~dp b/lib/ADVGRID3/Asgpkg.~dp new file mode 100644 index 00000000..53024660 --- /dev/null +++ b/lib/ADVGRID3/Asgpkg.~dp @@ -0,0 +1,38 @@ +package asgpkg; + +{$R *.RES} +{$R 'Advgrid.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'TAdvStringGrid package'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl30, + VCLSMP30; + +contains + Advgrid, + Match; + +end. diff --git a/lib/ADVGRID3/EDITBTN.DCU b/lib/ADVGRID3/EDITBTN.DCU new file mode 100644 index 00000000..700fbd51 Binary files /dev/null and b/lib/ADVGRID3/EDITBTN.DCU differ diff --git a/lib/ADVGRID3/INTELLI.RES b/lib/ADVGRID3/INTELLI.RES new file mode 100644 index 00000000..759453bf Binary files /dev/null and b/lib/ADVGRID3/INTELLI.RES differ diff --git a/lib/ADVGRID3/MATCH.DCU b/lib/ADVGRID3/MATCH.DCU new file mode 100644 index 00000000..fd087fbb Binary files /dev/null and b/lib/ADVGRID3/MATCH.DCU differ diff --git a/lib/CM2x/Baltic Solutions.url b/lib/CM2x/Baltic Solutions.url new file mode 100644 index 00000000..d391ec9b --- /dev/null +++ b/lib/CM2x/Baltic Solutions.url @@ -0,0 +1,3 @@ +[InternetShortcut] +URL=http://www.balticsolutions.com/ +Modified=10E51B4F670ABE018F diff --git a/lib/CM2x/Delphi3/Bs_cm.dcp b/lib/CM2x/Delphi3/Bs_cm.dcp new file mode 100644 index 00000000..5c4d6e2e Binary files /dev/null and b/lib/CM2x/Delphi3/Bs_cm.dcp differ diff --git a/lib/CM2x/Delphi3/Bs_cm.dcu b/lib/CM2x/Delphi3/Bs_cm.dcu new file mode 100644 index 00000000..575903a6 Binary files /dev/null and b/lib/CM2x/Delphi3/Bs_cm.dcu differ diff --git a/lib/CM2x/Delphi3/Bs_cm.dpk b/lib/CM2x/Delphi3/Bs_cm.dpk new file mode 100644 index 00000000..3c53054d --- /dev/null +++ b/lib/CM2x/Delphi3/Bs_cm.dpk @@ -0,0 +1,37 @@ +package bs_cm; + +{$R *.RES} +{$R 'Cmemo.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'Baltic Solutions - ColorMemo'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + VCL30; + +contains + Colmemo, + Cmemo; + +end. diff --git a/lib/CM2x/Delphi3/Bs_cm.dpl b/lib/CM2x/Delphi3/Bs_cm.dpl new file mode 100644 index 00000000..3b0994d7 Binary files /dev/null and b/lib/CM2x/Delphi3/Bs_cm.dpl differ diff --git a/lib/CM2x/Delphi3/Bs_cm.res b/lib/CM2x/Delphi3/Bs_cm.res new file mode 100644 index 00000000..36f26e23 Binary files /dev/null and b/lib/CM2x/Delphi3/Bs_cm.res differ diff --git a/lib/CM2x/Delphi3/Bs_cm.~dp b/lib/CM2x/Delphi3/Bs_cm.~dp new file mode 100644 index 00000000..9245e0a8 --- /dev/null +++ b/lib/CM2x/Delphi3/Bs_cm.~dp @@ -0,0 +1,39 @@ +package bs_cm; + +{$R *.RES} +{$R 'Cmemo.dcr'} +{$R 'Audio.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'Baltic Solutions - ColorMemo'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + VCL30; + +contains + Colmemo, + Cmemo, + Audio; + +end. diff --git a/lib/CM2x/Delphi3/Cmemo.dcr b/lib/CM2x/Delphi3/Cmemo.dcr new file mode 100644 index 00000000..3f49edf8 Binary files /dev/null and b/lib/CM2x/Delphi3/Cmemo.dcr differ diff --git a/lib/CM2x/Delphi3/Cmemo.dcu b/lib/CM2x/Delphi3/Cmemo.dcu new file mode 100644 index 00000000..cc42f016 Binary files /dev/null and b/lib/CM2x/Delphi3/Cmemo.dcu differ diff --git a/lib/CM2x/Delphi3/Cmemo.dfm b/lib/CM2x/Delphi3/Cmemo.dfm new file mode 100644 index 00000000..9f8b0b8f Binary files /dev/null and b/lib/CM2x/Delphi3/Cmemo.dfm differ diff --git a/lib/CM2x/Delphi3/Colmemo.dcu b/lib/CM2x/Delphi3/Colmemo.dcu new file mode 100644 index 00000000..336632f9 Binary files /dev/null and b/lib/CM2x/Delphi3/Colmemo.dcu differ diff --git a/lib/CM2x/Delphi3/Colmemo.res b/lib/CM2x/Delphi3/Colmemo.res new file mode 100644 index 00000000..183d5ce9 Binary files /dev/null and b/lib/CM2x/Delphi3/Colmemo.res differ diff --git a/lib/CM2x/Delphi4/Bs_cm.bpl b/lib/CM2x/Delphi4/Bs_cm.bpl new file mode 100644 index 00000000..69a4dbc3 Binary files /dev/null and b/lib/CM2x/Delphi4/Bs_cm.bpl differ diff --git a/lib/CM2x/Delphi4/Bs_cm.dcu b/lib/CM2x/Delphi4/Bs_cm.dcu new file mode 100644 index 00000000..10965bf4 Binary files /dev/null and b/lib/CM2x/Delphi4/Bs_cm.dcu differ diff --git a/lib/CM2x/Delphi4/Bs_cm.dpk b/lib/CM2x/Delphi4/Bs_cm.dpk new file mode 100644 index 00000000..17a892eb --- /dev/null +++ b/lib/CM2x/Delphi4/Bs_cm.dpk @@ -0,0 +1,37 @@ +package bs_cm; + +{$R *.RES} +{$R 'Cmemo.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'Baltic Solutions - ColorMemo'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + VCL40; + +contains + Colmemo in 'Colmemo.pas', + Cmemo in 'Cmemo.pas'; + +end. diff --git a/lib/CM2x/Delphi4/Bs_cm.res b/lib/CM2x/Delphi4/Bs_cm.res new file mode 100644 index 00000000..aaa580dc Binary files /dev/null and b/lib/CM2x/Delphi4/Bs_cm.res differ diff --git a/lib/CM2x/Delphi4/Cmemo.dcr b/lib/CM2x/Delphi4/Cmemo.dcr new file mode 100644 index 00000000..3f49edf8 Binary files /dev/null and b/lib/CM2x/Delphi4/Cmemo.dcr differ diff --git a/lib/CM2x/Delphi4/Cmemo.dcu b/lib/CM2x/Delphi4/Cmemo.dcu new file mode 100644 index 00000000..a08719cd Binary files /dev/null and b/lib/CM2x/Delphi4/Cmemo.dcu differ diff --git a/lib/CM2x/Delphi4/Cmemo.dfm b/lib/CM2x/Delphi4/Cmemo.dfm new file mode 100644 index 00000000..9f8b0b8f Binary files /dev/null and b/lib/CM2x/Delphi4/Cmemo.dfm differ diff --git a/lib/CM2x/Delphi4/Colmemo.dcu b/lib/CM2x/Delphi4/Colmemo.dcu new file mode 100644 index 00000000..e64b2c6f Binary files /dev/null and b/lib/CM2x/Delphi4/Colmemo.dcu differ diff --git a/lib/CM2x/Delphi4/Colmemo.res b/lib/CM2x/Delphi4/Colmemo.res new file mode 100644 index 00000000..183d5ce9 Binary files /dev/null and b/lib/CM2x/Delphi4/Colmemo.res differ diff --git a/lib/CM2x/Demo/Main.dcu b/lib/CM2x/Demo/Main.dcu new file mode 100644 index 00000000..b83a3782 Binary files /dev/null and b/lib/CM2x/Demo/Main.dcu differ diff --git a/lib/CM2x/Demo/Main.dfm b/lib/CM2x/Demo/Main.dfm new file mode 100644 index 00000000..4d6c288c Binary files /dev/null and b/lib/CM2x/Demo/Main.dfm differ diff --git a/lib/CM2x/Demo/Main.pas b/lib/CM2x/Demo/Main.pas new file mode 100644 index 00000000..f3410ed6 --- /dev/null +++ b/lib/CM2x/Demo/Main.pas @@ -0,0 +1,92 @@ +unit Main; + +interface + +uses + Forms, SysUtils, WinTypes, WinProcs, Messages, ColMemo, + StdCtrls, Controls, ExtCtrls, Classes; + +Var GoodHeight:Word; + +type + TMainForm = class(TForm) + ToolBarPanel: TPanel; + Bevel1: TBevel; + Bevel3: TBevel; + Bevel2: TBevel; + Label7: TLabel; + ColorMemo3: TColorMemo; + ColorMemo4: TColorMemo; + ColorMemo1: TColorMemo; + ColorMemo2: TColorMemo; + procedure FormCreate(Sender: TObject); + procedure ColorMemo1HotSpotClick(Sender: TObject; const SRC: String); + private + { Private declarations } + public + { Public declarations } + procedure MinMax(var m: TWMGETMINMAXINFO); message wm_getminmaxinfo; + end; + +var + MainForm: TMainForm; + +implementation +{$R *.DFM} +uses cm_pasc, cm_html, cm_even, cm_hyper; + +procedure TMainForm.FormCreate(Sender: TObject); +var I: word; +begin + { What size should we be ? } + with ToolBarPanel do begin + i:=0; + GoodHeight:=Controls[i].Top+Controls[i].Height; + for i:=1 to ControlCount-1 do + if Controls[i].Top+Controls[i].Height>GoodHeight then + GoodHeight:=Controls[i].Top+Controls[i].Height; + end; + GoodHeight:= GoodHeight+ + +11+ + +GetSystemMetrics(SM_CYCAPTION); + Top:=0; Left:=0; + Width:=ROUND(GetSystemMetrics(SM_CXSCREEN)); + Height:=GoodHeight; + + ColorMemo2.Width := Width - ColorMemo2.Left - 10; + ColorMemo2.WordWrap := TRUE; +end; + +procedure TMainForm.minmax(var m : TWMGETMINMAXINFO); +begin + m.minmaxinfo^.ptmaxsize.x:=ROUND(GetSystemMetrics(SM_CXSCREEN )); + m.minmaxinfo^.ptmaxsize.y:=GoodHeight; + m.minmaxinfo^.ptmaxTracksize.x:=ROUND(GetSystemMetrics(SM_CXSCREEN )); + m.minmaxinfo^.ptmaxTracksize.y:=GoodHeight; + m.minmaxinfo^.ptminTracksize.x:=600; + m.minmaxinfo^.ptminTracksize.y:=GoodHeight; +end; + +procedure TMainForm.ColorMemo1HotSpotClick(Sender: TObject; + const SRC: String); +begin + If SRC = 'Pascal' then + FrmPascalDemo.Show + else + if SRC = 'HTML' then + FrmHTMLDemo.Show + else + if SRC = 'Events' then + FrmEventsDemo.Show + else + if SRC = 'HyperText' then + FrmHyperTextDemo.Show + else + if SRC = 'help file' then begin + Application.HelpFile := 'colormemo.hlp'; + Application.HelpCommand(Help_Contents,0); + end; +end; + +end. + diff --git a/lib/CM2x/Demo/cm2_demo.dof b/lib/CM2x/Demo/cm2_demo.dof new file mode 100644 index 00000000..1aaf9b3c --- /dev/null +++ b/lib/CM2x/Demo/cm2_demo.dof @@ -0,0 +1,80 @@ +[Compiler] +A=1 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=0 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= + +[Directories] +OutputDir= +UnitOutputDir= +SearchPath= +Packages= +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1041 +CodePage=932 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= diff --git a/lib/CM2x/Demo/cm2_demo.dpr b/lib/CM2x/Demo/cm2_demo.dpr new file mode 100644 index 00000000..2998b8ce --- /dev/null +++ b/lib/CM2x/Demo/cm2_demo.dpr @@ -0,0 +1,21 @@ +program cm2_demo; + +uses + Forms, + cm_pasc in 'cm_pasc.pas' {FrmPascalDemo}, + cm_html in 'cm_html.pas' {FrmHTMLDemo}, + Main in 'Main.pas' {MainForm}, + cm_even in 'cm_even.pas' {FrmEventsDemo}, + cm_hyper in 'cm_hyper.pas' {FrmHyperTextDemo}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TMainForm, MainForm); + Application.CreateForm(TFrmPascalDemo, FrmPascalDemo); + Application.CreateForm(TFrmHTMLDemo, FrmHTMLDemo); + Application.CreateForm(TFrmEventsDemo, FrmEventsDemo); + Application.CreateForm(TFrmHyperTextDemo, FrmHyperTextDemo); + Application.Run; +end. diff --git a/lib/CM2x/Demo/cm2_demo.res b/lib/CM2x/Demo/cm2_demo.res new file mode 100644 index 00000000..c61b8933 Binary files /dev/null and b/lib/CM2x/Demo/cm2_demo.res differ diff --git a/lib/CM2x/Demo/cm2_demo.~dp b/lib/CM2x/Demo/cm2_demo.~dp new file mode 100644 index 00000000..2998b8ce --- /dev/null +++ b/lib/CM2x/Demo/cm2_demo.~dp @@ -0,0 +1,21 @@ +program cm2_demo; + +uses + Forms, + cm_pasc in 'cm_pasc.pas' {FrmPascalDemo}, + cm_html in 'cm_html.pas' {FrmHTMLDemo}, + Main in 'Main.pas' {MainForm}, + cm_even in 'cm_even.pas' {FrmEventsDemo}, + cm_hyper in 'cm_hyper.pas' {FrmHyperTextDemo}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TMainForm, MainForm); + Application.CreateForm(TFrmPascalDemo, FrmPascalDemo); + Application.CreateForm(TFrmHTMLDemo, FrmHTMLDemo); + Application.CreateForm(TFrmEventsDemo, FrmEventsDemo); + Application.CreateForm(TFrmHyperTextDemo, FrmHyperTextDemo); + Application.Run; +end. diff --git a/lib/CM2x/Demo/cm_even.dcu b/lib/CM2x/Demo/cm_even.dcu new file mode 100644 index 00000000..0c5ef8d4 Binary files /dev/null and b/lib/CM2x/Demo/cm_even.dcu differ diff --git a/lib/CM2x/Demo/cm_even.dfm b/lib/CM2x/Demo/cm_even.dfm new file mode 100644 index 00000000..dbdb91b6 Binary files /dev/null and b/lib/CM2x/Demo/cm_even.dfm differ diff --git a/lib/CM2x/Demo/cm_even.pas b/lib/CM2x/Demo/cm_even.pas new file mode 100644 index 00000000..b2c67b66 --- /dev/null +++ b/lib/CM2x/Demo/cm_even.pas @@ -0,0 +1,146 @@ +unit cm_even; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ColMemo, ExtCtrls; + +type + TFrmEventsDemo = class(TForm) + ColorMemo1: TColorMemo; + Label13: TLabel; + eFile: TEdit; + btnFile: TButton; + ODlg: TOpenDialog; + cbxDrawKey: TCheckBox; + cbxDraw: TCheckBox; + gbxDraw: TGroupBox; + eSearch: TEdit; + lblSearch: TLabel; + pnlDrawKey: TPanel; + cbxBold: TCheckBox; + cbxItalic: TCheckBox; + cbxUnderline: TCheckBox; + cbxFont: TComboBox; + lblFonts: TLabel; + procedure btnFileClick(Sender: TObject); + procedure ColorMemo1DrawKey(Canvas: TCanvas; const PKey: String; + Rect: TRect; KColor: TColor); + procedure cbxChange(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure cbxFontChange(Sender: TObject); + procedure ColorMemo1Draw(Sender: TObject; FromPos: PChar; + var A: array of TKeyDescr; var ItemsCount: Integer); + procedure cbxDrawKeyClick(Sender: TObject); + procedure cbxDrawClick(Sender: TObject); + procedure eSearchExit(Sender: TObject); + procedure eSearchKeyPress(Sender: TObject; var Key: Char); + private + { Private declarations } + public + { Public declarations } + procedure LoadIt; + end; + +var + FrmEventsDemo: TFrmEventsDemo; + +implementation + +{$R *.DFM} + +procedure TFrmEventsDemo.btnFileClick(Sender: TObject); +begin + if ODlg.Execute then + begin + eFile.Text:=ODlg.FileName; + LoadIt; + end; +end; + +procedure TFrmEventsDemo.LoadIt; +begin + try + ColorMemo1.Lines.LoadFromFile(eFile.Text); + except + end; +end; + +procedure TFrmEventsDemo.ColorMemo1DrawKey(Canvas: TCanvas; + const PKey: String; Rect: TRect; KColor: TColor); +var OldFS: TFontStyles; +begin + OldFS := Canvas.Font.Style; + if cbxDrawKey.Checked then begin + if cbxBold.Checked then + Canvas.Font.Style := Canvas.Font.Style + [fsBold]; + if cbxItalic.Checked then + Canvas.Font.Style := Canvas.Font.Style + [fsItalic]; + if cbxUnderline.Checked then + Canvas.Font.Style := Canvas.Font.Style + [fsUnderline]; + end; + + Canvas.TextOut( Rect.Left, Rect.Top, PKey); + Canvas.Font.Style := OldFS; +end; + +procedure TFrmEventsDemo.cbxChange(Sender: TObject); +begin + ColorMemo1.Refresh; +end; + +procedure TFrmEventsDemo.FormCreate(Sender: TObject); +begin + cbxFont.Items := Screen.Fonts; +end; + +procedure TFrmEventsDemo.cbxFontChange(Sender: TObject); +begin + ColorMemo1.Font.Name := cbxFont.Text; +end; + +procedure TFrmEventsDemo.ColorMemo1Draw(Sender: TObject; FromPos: PChar; + var A: array of TKeyDescr; var ItemsCount: Integer); +var Str :String; + i : integer; +begin + Str := StrPas(FromPos); + i := Pos(eSearch.Text, Str); + if i<>0 then begin + A[0].Left := i-1; + A[0].Right := i + Length(eSearch.Text) -1; + A[0].KeyColor := clBlue; + A[0].ZOrder := 1; + end; + ItemsCount := 1; +end; + +procedure TFrmEventsDemo.cbxDrawKeyClick(Sender: TObject); +begin + cbxBold.Enabled := cbxDrawKey.Checked; + cbxItalic.Enabled := cbxDrawKey.Checked; + cbxUnderline.Enabled := cbxDrawKey.Checked; + cbxFont.Enabled := cbxDrawKey.Checked; + ColorMemo1.Refresh; +end; + + +procedure TFrmEventsDemo.cbxDrawClick(Sender: TObject); +begin + ColorMemo1.ColorRules.Items[4].Enabled := cbxDraw.Checked; + eSearch.Enabled := cbxDraw.Checked; + ColorMemo1.Refresh; +end; + +procedure TFrmEventsDemo.eSearchExit(Sender: TObject); +begin + ColorMemo1.Refresh; +end; + +procedure TFrmEventsDemo.eSearchKeyPress(Sender: TObject; var Key: Char); +begin + if Key=#13 then ColorMemo1.Refresh; +end; + +end. diff --git a/lib/CM2x/Demo/cm_even.~df b/lib/CM2x/Demo/cm_even.~df new file mode 100644 index 00000000..11433886 Binary files /dev/null and b/lib/CM2x/Demo/cm_even.~df differ diff --git a/lib/CM2x/Demo/cm_even.~pa b/lib/CM2x/Demo/cm_even.~pa new file mode 100644 index 00000000..b2c67b66 --- /dev/null +++ b/lib/CM2x/Demo/cm_even.~pa @@ -0,0 +1,146 @@ +unit cm_even; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ColMemo, ExtCtrls; + +type + TFrmEventsDemo = class(TForm) + ColorMemo1: TColorMemo; + Label13: TLabel; + eFile: TEdit; + btnFile: TButton; + ODlg: TOpenDialog; + cbxDrawKey: TCheckBox; + cbxDraw: TCheckBox; + gbxDraw: TGroupBox; + eSearch: TEdit; + lblSearch: TLabel; + pnlDrawKey: TPanel; + cbxBold: TCheckBox; + cbxItalic: TCheckBox; + cbxUnderline: TCheckBox; + cbxFont: TComboBox; + lblFonts: TLabel; + procedure btnFileClick(Sender: TObject); + procedure ColorMemo1DrawKey(Canvas: TCanvas; const PKey: String; + Rect: TRect; KColor: TColor); + procedure cbxChange(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure cbxFontChange(Sender: TObject); + procedure ColorMemo1Draw(Sender: TObject; FromPos: PChar; + var A: array of TKeyDescr; var ItemsCount: Integer); + procedure cbxDrawKeyClick(Sender: TObject); + procedure cbxDrawClick(Sender: TObject); + procedure eSearchExit(Sender: TObject); + procedure eSearchKeyPress(Sender: TObject; var Key: Char); + private + { Private declarations } + public + { Public declarations } + procedure LoadIt; + end; + +var + FrmEventsDemo: TFrmEventsDemo; + +implementation + +{$R *.DFM} + +procedure TFrmEventsDemo.btnFileClick(Sender: TObject); +begin + if ODlg.Execute then + begin + eFile.Text:=ODlg.FileName; + LoadIt; + end; +end; + +procedure TFrmEventsDemo.LoadIt; +begin + try + ColorMemo1.Lines.LoadFromFile(eFile.Text); + except + end; +end; + +procedure TFrmEventsDemo.ColorMemo1DrawKey(Canvas: TCanvas; + const PKey: String; Rect: TRect; KColor: TColor); +var OldFS: TFontStyles; +begin + OldFS := Canvas.Font.Style; + if cbxDrawKey.Checked then begin + if cbxBold.Checked then + Canvas.Font.Style := Canvas.Font.Style + [fsBold]; + if cbxItalic.Checked then + Canvas.Font.Style := Canvas.Font.Style + [fsItalic]; + if cbxUnderline.Checked then + Canvas.Font.Style := Canvas.Font.Style + [fsUnderline]; + end; + + Canvas.TextOut( Rect.Left, Rect.Top, PKey); + Canvas.Font.Style := OldFS; +end; + +procedure TFrmEventsDemo.cbxChange(Sender: TObject); +begin + ColorMemo1.Refresh; +end; + +procedure TFrmEventsDemo.FormCreate(Sender: TObject); +begin + cbxFont.Items := Screen.Fonts; +end; + +procedure TFrmEventsDemo.cbxFontChange(Sender: TObject); +begin + ColorMemo1.Font.Name := cbxFont.Text; +end; + +procedure TFrmEventsDemo.ColorMemo1Draw(Sender: TObject; FromPos: PChar; + var A: array of TKeyDescr; var ItemsCount: Integer); +var Str :String; + i : integer; +begin + Str := StrPas(FromPos); + i := Pos(eSearch.Text, Str); + if i<>0 then begin + A[0].Left := i-1; + A[0].Right := i + Length(eSearch.Text) -1; + A[0].KeyColor := clBlue; + A[0].ZOrder := 1; + end; + ItemsCount := 1; +end; + +procedure TFrmEventsDemo.cbxDrawKeyClick(Sender: TObject); +begin + cbxBold.Enabled := cbxDrawKey.Checked; + cbxItalic.Enabled := cbxDrawKey.Checked; + cbxUnderline.Enabled := cbxDrawKey.Checked; + cbxFont.Enabled := cbxDrawKey.Checked; + ColorMemo1.Refresh; +end; + + +procedure TFrmEventsDemo.cbxDrawClick(Sender: TObject); +begin + ColorMemo1.ColorRules.Items[4].Enabled := cbxDraw.Checked; + eSearch.Enabled := cbxDraw.Checked; + ColorMemo1.Refresh; +end; + +procedure TFrmEventsDemo.eSearchExit(Sender: TObject); +begin + ColorMemo1.Refresh; +end; + +procedure TFrmEventsDemo.eSearchKeyPress(Sender: TObject; var Key: Char); +begin + if Key=#13 then ColorMemo1.Refresh; +end; + +end. diff --git a/lib/CM2x/Demo/cm_html.dcu b/lib/CM2x/Demo/cm_html.dcu new file mode 100644 index 00000000..39cd0e91 Binary files /dev/null and b/lib/CM2x/Demo/cm_html.dcu differ diff --git a/lib/CM2x/Demo/cm_html.dfm b/lib/CM2x/Demo/cm_html.dfm new file mode 100644 index 00000000..3211d70b Binary files /dev/null and b/lib/CM2x/Demo/cm_html.dfm differ diff --git a/lib/CM2x/Demo/cm_html.pas b/lib/CM2x/Demo/cm_html.pas new file mode 100644 index 00000000..d64363ea --- /dev/null +++ b/lib/CM2x/Demo/cm_html.pas @@ -0,0 +1,48 @@ +unit cm_html; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ColMemo; + +type + TFrmHTMLDemo = class(TForm) + ColorMemo1: TColorMemo; + Label13: TLabel; + eFile: TEdit; + btnFile: TButton; + ODlg: TOpenDialog; + procedure btnFileClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure LoadIt; + end; + +var + FrmHTMLDemo: TFrmHTMLDemo; + +implementation + +{$R *.DFM} + +procedure TFrmHTMLDemo.btnFileClick(Sender: TObject); +begin + if ODlg.Execute then + begin + eFile.Text:=ODlg.FileName; + LoadIt; + end; +end; + +procedure TFrmHtmlDemo.LoadIt; +begin + try + ColorMemo1.Lines.LoadFromFile(eFile.Text); + except + end; +end; + +end. diff --git a/lib/CM2x/Demo/cm_hyper.dcu b/lib/CM2x/Demo/cm_hyper.dcu new file mode 100644 index 00000000..e9d64515 Binary files /dev/null and b/lib/CM2x/Demo/cm_hyper.dcu differ diff --git a/lib/CM2x/Demo/cm_hyper.dfm b/lib/CM2x/Demo/cm_hyper.dfm new file mode 100644 index 00000000..5a424cb9 Binary files /dev/null and b/lib/CM2x/Demo/cm_hyper.dfm differ diff --git a/lib/CM2x/Demo/cm_hyper.pas b/lib/CM2x/Demo/cm_hyper.pas new file mode 100644 index 00000000..9b787730 --- /dev/null +++ b/lib/CM2x/Demo/cm_hyper.pas @@ -0,0 +1,45 @@ +unit cm_hyper; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ColMemo; + +type + TFrmHyperTextDemo = class(TForm) + ColorMemo1: TColorMemo; + Label1: TLabel; + procedure ColorMemo1HotSpotClick(Sender: TObject; const SRC: String); + private + { Private declarations } + public + { Public declarations } + end; + +var + FrmHyperTextDemo: TFrmHyperTextDemo; + +implementation + +{$R *.DFM} + + +procedure TFrmHyperTextDemo.ColorMemo1HotSpotClick(Sender: TObject; + const SRC: String); +begin + if SRC='sound' then + MessageBeep(0) + else + if SRC='chapter' then + ColorMemo1.ScrollBy(0,26) + else + if SRC='next line' then + ColorMemo1.ScrollBy(0,1) + else + if SRC='previous line' then + ColorMemo1.ScrollBy(0,-1) + else ShowMessage('You'' clicked on "' + SRC + '" hotspot'); +end; + +end. diff --git a/lib/CM2x/Demo/cm_pasc.dcu b/lib/CM2x/Demo/cm_pasc.dcu new file mode 100644 index 00000000..74eeba52 Binary files /dev/null and b/lib/CM2x/Demo/cm_pasc.dcu differ diff --git a/lib/CM2x/Demo/cm_pasc.dfm b/lib/CM2x/Demo/cm_pasc.dfm new file mode 100644 index 00000000..d11c4272 Binary files /dev/null and b/lib/CM2x/Demo/cm_pasc.dfm differ diff --git a/lib/CM2x/Demo/cm_pasc.pas b/lib/CM2x/Demo/cm_pasc.pas new file mode 100644 index 00000000..6773d06f --- /dev/null +++ b/lib/CM2x/Demo/cm_pasc.pas @@ -0,0 +1,48 @@ +unit cm_pasc; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ColMemo; + +type + TFrmPascalDemo = class(TForm) + ColorMemo1: TColorMemo; + Label13: TLabel; + eFile: TEdit; + btnFile: TButton; + ODlg: TOpenDialog; + procedure btnFileClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure LoadIt; + end; + +var + FrmPascalDemo: TFrmPascalDemo; + +implementation + +{$R *.DFM} + +procedure TFrmPascalDemo.btnFileClick(Sender: TObject); +begin + if ODlg.Execute then + begin + eFile.Text:=ODlg.FileName; + LoadIt; + end; +end; + +procedure TFrmPascalDemo.LoadIt; +begin + try + ColorMemo1.Lines.LoadFromFile(eFile.Text); + except + end; +end; + +end. diff --git a/lib/CM2x/Help/colormemo.GID b/lib/CM2x/Help/colormemo.GID new file mode 100644 index 00000000..feecf803 Binary files /dev/null and b/lib/CM2x/Help/colormemo.GID differ diff --git a/lib/CM2x/INSTALL.LOG b/lib/CM2x/INSTALL.LOG new file mode 100644 index 00000000..c2345e57 --- /dev/null +++ b/lib/CM2x/INSTALL.LOG @@ -0,0 +1,63 @@ +*** Installation Started 01/04/99 1:29 *** +Title: ColorMemo 2.x Installation +Source: C:\WINDOWS\޽į\CM2X.EXE +Made Dir: D:\Borland3\Delphi 3\VCL\CM2x +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\UNWISE.EXE +RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\ColorMemo 2.x +RegDB Val: ColorMemo 2.x +RegDB Name: DisplayName +RegDB Root: 2 +RegDB Key: Software\Microsoft\Windows\CurrentVersion\Uninstall\ColorMemo 2.x +RegDB Val: D:\BORLAND3\DELPHI~1\VCL\CM2X\UNWISE.EXE D:\BORLAND3\DELPHI~1\VCL\CM2X\INSTALL.LOG +RegDB Name: UninstallString +RegDB Root: 2 +Made Dir: D:\Borland3\Delphi 3\VCL\CM2x\Delphi3 +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi3\Colmemo.res +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi3\Colmemo.dcu +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi3\Cmemo.dfm +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi3\Cmemo.dcu +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi3\Cmemo.dcr +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi3\Bs_cm.res +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi3\Bs_cm.dpl +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi3\Bs_cm.dpk +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi3\Bs_cm.dcu +Made Dir: D:\Borland3\Delphi 3\VCL\CM2x\Delphi4 +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi4\Colmemo.dcu +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi4\Cmemo.dfm +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi4\Colmemo.res +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi4\Cmemo.dcu +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi4\Cmemo.dcr +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi4\Bs_cm.res +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi4\Bs_cm.dpk +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi4\Bs_cm.dcu +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Delphi4\Bs_cm.bpl +Made Dir: D:\Borland3\Delphi 3\VCL\CM2x\Demo +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\cm2_demo.res +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\cm_hyper.dfm +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\cm_html.dfm +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\cm_pasc.dfm +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\Main.dfm +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\cm2_demo.dpr +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\cm_even.pas +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\cm_hyper.pas +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\cm_html.pas +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\cm_pasc.pas +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\Main.pas +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Demo\cm_even.dfm +Made Dir: D:\Borland3\Delphi 3\VCL\CM2x\Help +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Help\colormemo.hlp +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Help\colormemo.cnt +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\readme.txt +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\Baltic Solutions.url +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\install.txt +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\licence.txt +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\news.txt +File Copy: D:\Borland3\Delphi 3\VCL\CM2x\ordering.txt +Made Dir: C:\WINDOWS\ ƭ\۸\ColorMemo +Shell Link: C:\WINDOWS\ ƭ\۸\ColorMemo\Baltic Solutions web site.lnk +Shell Link: C:\WINDOWS\ ƭ\۸\ColorMemo\Installation instructions.lnk +Shell Link: C:\WINDOWS\ ƭ\۸\ColorMemo\Software licence.lnk +Shell Link: C:\WINDOWS\ ƭ\۸\ColorMemo\News since last version.lnk +Shell Link: C:\WINDOWS\ ƭ\۸\ColorMemo\Ordering information.lnk +Shell Link: C:\WINDOWS\ ƭ\۸\ColorMemo\Readme first.lnk +Shell Link: C:\WINDOWS\ ƭ\۸\ColorMemo\ColorMemo Help File.lnk diff --git a/lib/CM2x/install.txt b/lib/CM2x/install.txt new file mode 100644 index 00000000..75126eb8 --- /dev/null +++ b/lib/CM2x/install.txt @@ -0,0 +1,6 @@ + + + Common installation procedure should be used when installing + this component into the version of Delphi that you use. + + Please refer to Delphi documentation diff --git a/lib/CM2x/licence.txt b/lib/CM2x/licence.txt new file mode 100644 index 00000000..036e8602 --- /dev/null +++ b/lib/CM2x/licence.txt @@ -0,0 +1,106 @@ +SOFTWARE LICENCE + +This license does not in anyway imply that you will have to pay royalty +fees for the use of the product in your applications. It is intended to +be a licence between Baltic Solutions and developers that use the +ColorMemo to build applications. If you have 3 developers in your +company that use the ColorMemo when building software, then you would +require 3 licensed versions. Any applications that are created with +the ColorMemo can be distributed to any number of end users in any +fashion that you see fit. + +The use of this package indicates your understanding and acceptance of +the following terms and conditions. This license shall supersede any +verbal, or prior verbal or written, statement or agreement to the +contrary. If you do not understand or accept these terms, or your local +regulations prohibit "after sale" license agreements or limited +disclaimers, you must cease and desist using this product immediately. + +This product is Copyright 1996,1997 Baltic Solutions, all rights +reserved. This product is protected by international copyright laws, +international treaties and all other applicable national or +international laws. This software product and documentation may not, +in whole or in part, be copied, photocopied, translated, or reduced to +any electronic medium or machine readable form, without prior consent +in writing, from Baltic Solutions and according to all applicable laws. +The sole owner of this product is Baltic Solutions. + +Liability disclaimer: + +This product and/or license is provided as is, without any +representation or warranty of any kind, either express or implied, +including without limitation any representations or endorsements +regarding the use of, the results of, or performance of the product, +its appropriateness, accuracy, reliability, or correctness. The entire +risk as to the use of this product is assumed by the user and/or +licensee. Baltic Solutions does not assume liability for the use of +this program beyond the original purchase price of the software. In no +event will Baltic Solutions be liable for additional direct or indirect +damages including any lost profits, lost savings, or other incidental +or consequential damages arising from any defects, or the use or +inability to use these programs, even if Baltic Solutions have been +advised of the possibility of such damages. + +Restrictions: + +You may not use, copy, modify, translate, or transfer the programs, +documentation, or any copy except as expressly defined in this +agreement. You may not attempt to unlock or bypass any +"copy-protection" or authentication algorithm utilized by the program. +You may not remove or modify any copyright notice or the method by +which it may be invoked. + +Operating license: + +You have the non-exclusive right to use any enclosed program only by a +single person, on a single computer at a time. You may physically +transfer the program from one computer to another, provided that the +program is used only by a single person, on a single computer at a +time. In group projects where multiple persons will use the program, +you must purchase an individual license for each member of the group. +Use over a "local area network" (within the same locale) is permitted +provided that the program is used only by a single person, on a single +computer at a time. Use over a "wide area network" (outside the same +locale) is strictly prohibited under any and all circumstances. + +Linking and distribution license: + +In order to link and distribute compiled ColorMemo code in +accordance to this license, you must be registered with Baltic +Solutions as an authorized licensee, and must have submitted a signed +copy of this license stating you agree to be bound by its terms and +conditions. You may not reproduce or distribute copies of the complete +package, any of the source, interface, or code (.DCU) units, any of the +documentation, nor may you supply any means by which your users could +create, modify, or incorporate the ColorMemo component in their +own products. Violations will be prosecuted to the maximum extent +possible under the law. + +Back-up and transfer: + +You may make one copy of the program solely for "back-up" purposes, +as prescribed by international copyright laws. You must reproduce and +include the copyright notice on the back-up copy. You may transfer the +product to another party only if the other party agrees to the terms +and conditions of this agreement, and completes and returns +registration information (name, address, etc.) to Baltic Solutions +within 30 days of the transfer. If you transfer the program you must at +the same time transfer the documentation and back-up copy, or transfer +the documentation and destroy the back-up copy. You may not retain any +portion of the program, in any form, under any circumstance. + +Terms: + +This license is effective until terminated. You may terminate it by +destroying the program, the documentation and copies thereof. This +license will also terminate if you fail to comply with any terms or +conditions of this agreement. You agree upon such termination to +destroy all copies of the program and of the documentation, or return +them to Baltic Solutions for disposal. Note that by registering this +product you give Baltic Solutions permission to reference your name in +product advertisements. + +Other rights and restrictions: + +All other rights and restrictions not specifically granted in this +license are reserved by Baltic Solutions. diff --git a/lib/CM2x/news.txt b/lib/CM2x/news.txt new file mode 100644 index 00000000..ff0dd938 --- /dev/null +++ b/lib/CM2x/news.txt @@ -0,0 +1,31 @@ + +ColorMemo NEWS +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +New features ( most important ones, as there's lots of them ) : + +<< -- Version 2.0.2 -- >> + + - One Delphi 2.0 resource problem fixed + + +<< -- Version 2.0.1 -- >> + + - Lot's of bugs fixed. + - No ghost cursor + - No trash when scrolling + - No "filled blocks" at the end of line in Delphi 4.0 + - If there is no text after final keyword it will be colored + - Hotspots now are always colored + - .... and few more simple "undocumented features" + - More speed + - More stability + + +_________________________________________________________________ +Baltic Solutions Team + +Web : http://www.balticsolutions.com +email: support@balticsolutions.com + corp@balticsolutions.com + diff --git a/lib/CM2x/ordering.txt b/lib/CM2x/ordering.txt new file mode 100644 index 00000000..6cf38602 --- /dev/null +++ b/lib/CM2x/ordering.txt @@ -0,0 +1,23 @@ +ColorMemo ORDERING INFORMATION +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +You can try out our software before you buy it. You can download it +freely, try it out, and pass it around to people you know. However, +after using the software for a trial period, you must register and +pay for it, or remove it from your system + +Current pricing of ColorMemo is : + $25 for source code of ColorMemo and data-aware version of it + + +For detailed ordering information you can go to our web site at + http://www.balticsolutios.com +click on the "ordering" link on the navigation bar at the left + +You can also go directly to online ordering pages at + http://order.kagi.com/?8Z +or for secure connection ( if your browser supports it ) at + https://order.kagi.com/?8Z&S + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +Latest update to this file - November 9, 1998 diff --git a/lib/CM2x/readme.txt b/lib/CM2x/readme.txt new file mode 100644 index 00000000..e797ace8 --- /dev/null +++ b/lib/CM2x/readme.txt @@ -0,0 +1,27 @@ +WELCOME TO THE BRAND NEW RELEASE OF + COLORMEMO 2.x + +Component: ColorMemo +Version: 2.0.2 +Author: Baltic Solutions +Email: support@balticsolutions.com + corp@balticsolutions.com +Internet: http://www.balticsolutions.com +Date: 25 November, 1998 + +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +We completely rewrote it wih new functionality and +architecture. And now we made it stable and bug free. +Please use it and enjoy. + +It's still FREE !!! + +Please visit out homepage at http://www.balticsolutions.com +Check out our other products ( some are also free ). + +For information on how to order sources of ColorMemo please +visit our homepage mentioned above or write directly to us +at address support@balticsolutions.com + +Sincerly +Baltic Solutions Team. diff --git a/lib/Delphi/Internet/Cli7.dfm b/lib/Delphi/Internet/Cli7.dfm new file mode 100644 index 00000000..4454b106 Binary files /dev/null and b/lib/Delphi/Internet/Cli7.dfm differ diff --git a/lib/Delphi/Internet/Cli7.pas b/lib/Delphi/Internet/Cli7.pas new file mode 100644 index 00000000..f58fdcb9 --- /dev/null +++ b/lib/Delphi/Internet/Cli7.pas @@ -0,0 +1,263 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: Simple client application demonstrating TWSocket object in action. +Creation: November 28, 1998 +Version: 1.01 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Mar 07, 1999 V1.01 Adapted for Delphi 1 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Cli7; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, IniFiles, WSocket; + +const + EndOfLine = #13#10; + +type + TCli7Form = class(TForm) + Panel1: TPanel; + PortEdit: TEdit; + Label6: TLabel; + HostNameEdit: TEdit; + Label1: TLabel; + DisplayMemo: TMemo; + ConnectButton: TButton; + LineOnButton: TButton; + LineOffButton: TButton; + DisconnectButton: TButton; + ReadLineButton: TButton; + WSocket1: TWSocket; + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure LineOnButtonClick(Sender: TObject); + procedure LineOffButtonClick(Sender: TObject); + procedure ConnectButtonClick(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure ReadLineButtonClick(Sender: TObject); + procedure WSocket1SessionConnected(Sender: TObject; Error: Word); + procedure WSocket1SessionClosed(Sender: TObject; Error: Word); + procedure WSocket1DataAvailable(Sender: TObject; Error: Word); + private + FIniFileName : String; + FInitialized : Boolean; + procedure Display(Msg : String); + end; + +var + Cli7Form: TCli7Form; + +implementation + +{$R *.DFM} +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyHostName = 'HostName'; + KeyPort = 'Port'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + HostNameEdit.Text := IniFile.ReadString(SectionData, KeyHostName, + 'localhost'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, + 'telnet'); + + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, (Screen.Width - Width) div 2); + + IniFile.Free; + DisplayMemo.Clear; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyHostName, HostNameEdit.Text); + IniFile.WriteString(SectionData, KeyPort, PortEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.Display(Msg : String); +begin + if DisplayMemo.Lines.Count > 200 then { Prevent TMemo overflow } + DisplayMemo.Clear; + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.LineOnButtonClick(Sender: TObject); +begin + WSocket1.LineMode := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.LineOffButtonClick(Sender: TObject); +begin + WSocket1.LineMode := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.ConnectButtonClick(Sender: TObject); +begin + WSocket1.Proto := 'tcp'; + WSocket1.Port := PortEdit.Text; + WSocket1.Addr := HostnameEdit.Text; + WSocket1.LineMode := TRUE; + WSocket1.LineEnd := EndOfLine; + WSocket1.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.DisconnectButtonClick(Sender: TObject); +begin + WSocket1.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.WSocket1SessionConnected(Sender: TObject; + Error: Word); +begin + if Error <> 0 then + Display('Connection failed, error #' + IntToStr(Error)) + else + Display('Session Connected.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.WSocket1SessionClosed(Sender: TObject; + Error: Word); +begin + Display('Session Closed.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RemoveEndOfLine(const Line : String) : String; +const + EOL : String = EndOfLine; { To make Delphi 1 happy } +begin + + if (Length(Line) >= Length(EndOfLine)) and + (StrLComp(@Line[1 + Length(Line) - Length(EndOfLine)], + @EOL[1], + Length(EndOfLine)) = 0) then + Result := Copy(Line, 1, Length(Line) - Length(EndOfLine)) + else + Result := Line; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.WSocket1DataAvailable(Sender: TObject; + Error: Word); +var + Buf : array [0..127] of char; + Len : Integer; +begin + Len := TCustomLineWSocket(Sender).Receive(@Buf, Sizeof(Buf) - 1); + if Len <= 0 then + Exit; + Buf[Len] := #0; + if not WSocket1.LineMode then + { Normal mode, data is just a buffer with all caracters } + Display('DataAvailable (' + IntToStr(Len) +' bytes): ''' + + StrPas(@Buf) + '''') + else begin + { Line mode, buffer contains exactly one line, terminated by the } + { LineEnd string, unless our buffer is too small in which case } + { the line is truncated. We'll get the end of line on the next } + { call to Receive. } + Display('Line: ''' + RemoveEndOfLine(StrPas(@Buf)) + ''''); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.ReadLineButtonClick(Sender: TObject); +var + Buffer : String; +begin + Display('Waiting for a line... (Timeout = 10Sec)'); + WSocket1.ReadLine(10000, Buffer); + Display('Received line: ''' + RemoveEndOfLine(Buffer) + ''''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/CliDemo1.dfm b/lib/Delphi/Internet/CliDemo1.dfm new file mode 100644 index 00000000..c47b29ad Binary files /dev/null and b/lib/Delphi/Internet/CliDemo1.dfm differ diff --git a/lib/Delphi/Internet/CliDemo1.pas b/lib/Delphi/Internet/CliDemo1.pas new file mode 100644 index 00000000..3fe49dc5 --- /dev/null +++ b/lib/Delphi/Internet/CliDemo1.pas @@ -0,0 +1,257 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstration for Client program using TWSocket. +Creation: 8 december 1997 +Version: 1.04 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 09, 1997 V1.01 Made it compatible with Delphi 1 +Jul 09, 1998 V1.02 Adapted for Delphi 4 +Dec 05, 1998 V1.03 Don't use TWait component +Dec 15, 2001 V1.04 Use LineMode + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit CliDemo1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, IniFiles, ExtCtrls, + { Don't forget to add your vc32 directory to Delphi library path } + WSocket; + +const + IniFileName = 'CliDemo.ini'; + +type + TClientForm = class(TForm) + CliSocket: TWSocket; + DisplayMemo: TMemo; + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + SendEdit: TEdit; + SendButton: TButton; + DisconnectButton: TButton; + PortEdit: TEdit; + ServerEdit: TEdit; + procedure DisconnectButtonClick(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure CliSocketDataAvailable(Sender: TObject; Error: Word); + procedure CliSocketSessionConnected(Sender: TObject; Error: Word); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormShow(Sender: TObject); + procedure Timer1Timer(Sender: TObject); + private + Buffer : array [0..1023] of char; + ConnectError : Word; + Initialized : Boolean; + procedure Display(Msg : String); + procedure ProcessCommand(Cmd : String); + end; + +var + ClientForm: TClientForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.DisconnectButtonClick(Sender: TObject); +begin + CliSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.SendButtonClick(Sender: TObject); +begin + if CliSocket.State <> wsConnected then begin + CliSocket.Proto := 'tcp'; + CliSocket.Port := PortEdit.Text; + CliSocket.Addr := ServerEdit.Text; + CliSocket.LineMode := TRUE; + CliSocket.LineEnd := #13#10; + CliSocket.Connect; + { Connect is asynchronous (non-blocking). We will wait while the } + { session is connecting or application terminated. } + while CliSocket.State in [wsConnecting] do begin + Application.ProcessMessages; + if Application.Terminated then + Exit; + end; + end; + { Be sure we are connected before sending anything } + if CliSocket.State = wsConnected then + CliSocket.SendStr(SendEdit.Text + #13 + #10); + ActiveControl := SendEdit; + SendEdit.SelectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.ProcessCommand(Cmd : String); +begin + { Here you should write your command interpreter. } + { For simplicity, we just display received command ! } + { First remove EndOfLine marker } + if (Length(Cmd) >= Length(CliSocket.LineEnd)) and + (Copy(Cmd, Length(Cmd) - Length(CliSocket.LineEnd) + 1, + Length(CliSocket.LineEnd)) = CliSocket.LineEnd) then + Cmd := Copy(Cmd, 1, Length(Cmd) - Length(CliSocket.LineEnd)); + { Then display in memo } + Display(Cmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; +begin + { We use line mode, we will receive a complete line } + Len := CliSocket.Receive(@Buffer, SizeOf(Buffer) - 1); + if Len <= 0 then + Exit; + + Buffer[Len] := #0; { Nul terminate } + ProcessCommand(StrPas(Buffer)); { Pass as string } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketSessionConnected( + Sender : TObject; + Error : Word); +begin + ConnectError := Error; + if Error <> 0 then + Display('Can''t connect, error #' + IntToStr(Error)) + else + DisconnectButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + DisconnectButton.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteInteger('Window', 'Top', Top); + IniFile.WriteInteger('Window', 'Left', Left); + IniFile.WriteInteger('Window', 'Width', Width); + IniFile.WriteInteger('Window', 'Height', Height); + IniFile.WriteString('Data', 'Server', ServerEdit.Text); + IniFile.WriteString('Data', 'Port', PortEdit.Text); + IniFile.WriteString('Data', 'Command', SendEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if Initialized then + Exit; + Initialized := TRUE; + IniFile := TIniFile.Create(IniFileName); + + Top := IniFile.ReadInteger('Window', 'Top', Top); + Left := IniFile.ReadInteger('Window', 'Left', Left); + Width := IniFile.ReadInteger('Window', 'Width', Width); + Height := IniFile.ReadInteger('Window', 'Height', Height); + + PortEdit.Text := IniFile.ReadString('Data', 'Port', 'telnet'); + ServerEdit.Text := IniFile.ReadString('Data', 'Server', 'localhost'); + SendEdit.Text := IniFile.ReadString('Data', 'Command', 'LASTNAME CAESAR'); + + IniFile.Free; + + DisplayMemo.Clear; + ActiveControl := SendEdit; + SendEdit.SelectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in our display memo. Delete lines to be sure to not } +{ overflow the memo which may have a limited capacity. } +procedure TClientForm.Display(Msg : String); +var + I : Integer; +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + for I := 1 to 50 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; +{$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); +{$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.Timer1Timer(Sender: TObject); +begin + if CliSocket.State = wsConnecting then + Exit; + + if CliSocket.State <> wsConnected then + SendButtonClick(nil) + else + DisconnectButtonClick(nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/Client7.dpr b/lib/Delphi/Internet/Client7.dpr new file mode 100644 index 00000000..4ba287bd --- /dev/null +++ b/lib/Delphi/Internet/Client7.dpr @@ -0,0 +1,12 @@ +program Client7; + +uses + Forms, + Cli7 in 'Cli7.pas' {Cli7Form}; + +{$R *.RES} + +begin + Application.CreateForm(TCli7Form, Cli7Form); + Application.Run; +end. diff --git a/lib/Delphi/Internet/ConCli1.dpr b/lib/Delphi/Internet/ConCli1.dpr new file mode 100644 index 00000000..50693237 --- /dev/null +++ b/lib/Delphi/Internet/ConCli1.dpr @@ -0,0 +1,78 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: ConCli shows how to use TWSocket in a console mode application + (for Delphi 2, Delphi 3 or Delphi 4). +Creation: Nov 20, 1997 +Version: 1.01 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 05, 1998 V1.01 Don't use TWait control anymore + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} + Bomb('Sorry, Delphi 1 does not support console mode programs'); +{$ENDIF} +{$APPTYPE CONSOLE} +program ConCli1; + +uses + Forms, WSocket; + +var + WSocket1 : TWSocket; + Buffer : String; +begin + WSocket1 := TWsocket.Create(nil); + WSocket1.Proto := 'tcp'; + WSocket1.Addr := 'localhost'; + WSocket1.Port := 'telnet'; + WSocket1.Connect; + { Connect is asynchronous (non-blocking). We will wait while the } + { session is connecting or application terminated. } + while WSocket1.State in [wsConnecting] do begin + Application.ProcessMessages; + if Application.Terminated then + break; + end; + if WSocket1.State = wsConnected then begin + WSocket1.ReadLine(15, Buffer); + Writeln('Server banner is: ' + Buffer); + WSocket1.Close; + end + else + Writeln('Connection failed'); + WSocket1.Destroy; + + Writeln('Hit enter...'); + Readln; +end. diff --git a/lib/Delphi/Internet/ConCli2.dpr b/lib/Delphi/Internet/ConCli2.dpr new file mode 100644 index 00000000..a837eea0 --- /dev/null +++ b/lib/Delphi/Internet/ConCli2.dpr @@ -0,0 +1,164 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: ConCli2 shows how to use TWSocket in a console mode application. + ConCli2 use a thread to make the socket run in the program + background while the foreground is busy with the user interface + (for simplicity here we just wait for the user to hit the + enter key). +Creation: Nov 20, 1997 +Version: 1.01 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 05, 1998 V1.01 Don't use TWait object anymore. + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} + Bomb('Sorry, Delphi 1 does not support console mode programs'); +{$ENDIF} +{$APPTYPE CONSOLE} +program ConCli2; + +uses + Windows, Classes, WSocket; + +const + ServerHostName = 'localhost'; + ServerPort = 'telnet'; + +type + TWSocketThread = class(TThread) + protected + FWSocket : TWsocket; + FRcvBuf : array [0..1023] of char; + procedure Execute; override; + procedure FWSocketDataAvailable(Sender : TObject; Error : Word); + procedure FWSocketSessionConnected(Sender : TObject; Error : Word); + procedure FWSocketSessionClosed(Sender : TObject; Error : Word); + public + constructor Create; virtual; + end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TWSocketThread.Create; +begin + inherited Create(TRUE); + FreeOnTerminate := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWSocketThread.Execute; +begin + // Let's the user know what we are doing + Writeln('Connecting to server ''', ServerHostName, + ''' on port ''', ServerPort, ''''); + + // Create the TWSocket we will use to communicate with the server + FWSocket := TWsocket.Create(nil); + + // Assign the event handler for the TWSocket events we care of + FWSocket.OnDataAvailable := FWSocketDataAvailable; + FWSocket.OnSessionClosed := FWSocketSessionClosed; + FWSocket.OnSessionConnected := FWSocketSessionConnected; + + // Connect to the server + FWSocket.Addr := ServerHostName; + FWSocket.Port := ServerPort; + FWSocket.Proto := 'tcp'; + FWSocket.Connect; + + // Let the TWSocket component makes his work + FWSocket.MessageLoop; + + // We are done, destroy the objects we created + FWSocket.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by the TWSocket when some data has been } +{ received by the lower level. } +procedure TWSocketThread.FWSocketDataAvailable(Sender : TObject; Error : Word); +var + Len : Integer; +begin + // Get the received data + Len := FWSocket.Receive(@FRcvBuf[0], SizeOf(FRcvBuf) - 1); + if Len <= 0 then + Exit; + + // Add a terminating nul byte to allow display using standard I/O + FRcvBuf[Len] := #0; + Write(FRcvBuf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TWSocket when the connection is } +{ established with the remote host } +procedure TWSocketThread.FWSocketSessionConnected(Sender : TObject; Error : Word); +begin + Writeln('Connected'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TWSocket when the connection is broken } +procedure TWSocketThread.FWSocketSessionClosed(Sender : TObject; Error : Word); +begin + Writeln('Server has diconnected'); + FWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the main program. } +var + WSocketThread : TWSocketThread; +begin + Writeln('Hit enter to stop the program'); + Writeln; + // Create the socket working thread (suspended) + WSocketThread := TWSocketThread.Create; + + // Start the thread + WSocketThread.Resume; + + // The main thread continue here. Process user request here. + Readln; + + // We are done, quit the program + Writeln('Ok.'); +end. + diff --git a/lib/Delphi/Internet/ConFtp.dpr b/lib/Delphi/Internet/ConFtp.dpr new file mode 100644 index 00000000..b2135081 --- /dev/null +++ b/lib/Delphi/Internet/ConFtp.dpr @@ -0,0 +1,226 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: This demo shows how to use TFtpCli component within a console + mode application. It connect to ftp.microsoft.com and download + readme.txt from /softlib directory. The local file is ConFtp.txt. +Creation: Dec 24, 2001 +Version: 1.00 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +program ConFtp; + +{$IFDEF VER80} + Bomb('Sorry, Delphi 1 does not support console mode programs'); +{$ENDIF} +{$APPTYPE CONSOLE} +{$IFNDEF NOFORMS} + Bomb('Please add NOFORMS to your project defines'); +{$ENDIF} + +uses + Windows, Classes, SysUtils, Messages, FtpCli; + +const + ConFtpVersion = 100; + CopyRight = ' ConFtp (c) 2002 by Francois PIETTE. V1.00'; + +type + { We use TConApplication class (actually a component) to encapsulate all } + { the work to be done. This is easier because TFtpCli is event driven } + { and need methods (that is procedure of object) to handle events. } + TConApplication = class(TComponent) + protected + FFtpCli : TFtpClient; + FResult : Integer; + procedure FtpRequestDone(Sender : TObject; + RqType : TFtpRequest; + ErrorCode : Word); + procedure FtpDisplay(Sender : TObject; + var Msg : String); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Execute; + end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TConApplication.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FFtpCli := TFtpClient.Create(Self); + FResult := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TConApplication.Destroy; +begin + if Assigned(FFtpCli) then begin + FFtpCli.Destroy; + FFtpCli := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TConApplication.Execute; +begin + { Prepare connection to Ftp server } + FFtpCli.HostName := 'ftp.microsoft.com'; + FFtpCli.Port := 'ftp'; + FFtpCli.HostDirName := '/softlib'; + FFtpCli.HostFileName := 'readme.txt'; + FFtpCli.LocalFileName := 'ConFtp.txt'; + FFtpCli.Binary := TRUE; + FFtpCli.UserName := 'anonymous'; + FFtpCli.Password := 'your.name@your.domain.com'; + FFtpCli.OnDisplay := FtpDisplay; + FFtpCli.OnRequestDone := FtpRequestDone; + + { Delete existing file } + DeleteFile(FFtpCli.LocalFileName); + + { Start FTP transfert by connecting to the server } + WriteLn('Connecting to ', FFtpCli.HostName, '/', FFtpCli.Port); + FFtpCli.OpenAsync; + + { We need a message loop in order for windows message processing to work. } + { There is a message loop built into each TWSocket, so we use the one in } + { TFtpCli control socket. } + { MessageLoop will exit only when WM_QUIT message is posted. We do that } + { form the OnRequestDone event handler when the component has finished. } + FFtpCli.ControlSocket.MessageLoop; + WriteLn('Going back to the OS'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TConApplication.FtpDisplay(Sender: TObject; var Msg: String); +begin + WriteLn(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TConApplication.FtpRequestDone( + Sender : TObject; + RqType : TFtpRequest; + ErrorCode : Word); +var + EndFlag : Boolean; +begin + EndFlag := FALSE; + + { Check status } + if ErrorCode <> 0 then begin + WriteLn('Failed, error #' + IntToStr(ErrorCode)); + FFtpCli.Abort; + EndFlag := TRUE; + end + else begin + case RqType of + ftpOpenAsync : + begin + FFtpCli.UserAsync; + end; + ftpUserAsync : + begin + FFtpCli.PassAsync; + end; + ftpPassAsync : + begin + FFtpCli.CwdAsync; + end; + ftpCwdAsync : + begin + FFtpCli.TypeSetAsync; + end; + ftpTypeSetAsync: + begin + FFtpCli.GetAsync; + end; + ftpGetAsync : + begin + FResult := FFtpCli.StatusCode; + FFtpCli.QuitAsync; + end; + ftpQuitAsync : + begin + EndFlag := TRUE; + end; + else + begin + WriteLn('Unknown FtpRequest ' + IntToStr(Ord(RqType))); + EndFlag := TRUE; + end; + end; + end; + + { If something wrong or end of job, then go back to the OS } + if EndFlag then begin + if FResult = 226 then + WriteLn('Transfert succesful. File is ', FFtpCli.LocalFileName) + else + WriteLn('Transfert failed !'); + { Prompt the user } + WriteLn('Hit ENTER key to return quit program...'); + ReadLn; + { Break message loop we called from the execute method } + PostMessage(FFtpCli.ControlSocket.Handle, WM_QUIT, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +var + ConApp : TConApplication; +begin + WriteLn(CopyRight); + WriteLn; + ConApp := TConApplication.Create(nil); + try + ConApp.Execute; + finally + ConApp.Destroy; + end; +end. + diff --git a/lib/Delphi/Internet/ConHttp.dpr b/lib/Delphi/Internet/ConHttp.dpr new file mode 100644 index 00000000..4d55b59e --- /dev/null +++ b/lib/Delphi/Internet/ConHttp.dpr @@ -0,0 +1,171 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: This demo shows how to use THttpCli component within a console + mode application. It Connect to www.borland.com and display + received (default) document on screen. +Creation: Apr 20, 2002 +Version: 1.00 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +program ConHttp; + +{$IFDEF VER80} + Bomb('Sorry, Delphi 1 does not support console mode programs'); +{$ENDIF} +{$APPTYPE CONSOLE} +{$IFNDEF NOFORMS} + Bomb('Please add NOFORMS to your project defines'); +{$ENDIF} + +uses + Windows, SysUtils, Classes, Messages, HttpProt; + +const + ConHttpVersion = 100; + CopyRight = ' ConHttp (c) 2002 by Francois PIETTE. V1.00'; + +type + { We use TConApplication class (actually a component) to encapsulate all } + { the work to be done. This is easier because THttpCli is event driven } + { and need methods (that is procedure of object) to handle events. } + TConApplication = class(TComponent) + protected + FHttpCli : THttpCli; + procedure HttpRequestDone(Sender : TObject; + RqType : THttpRequest; + ErrorCode : Word); + procedure HttpDocData(Sender : TObject; + Buffer : Pointer; + Len : Integer); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Execute; + end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TConApplication.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FHttpCli := THttpCli.Create(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TConApplication.Destroy; +begin + if Assigned(FHttpCli) then begin + FHttpCli.Destroy; + FHttpCli := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TConApplication.Execute; +var + Url : String; +begin + Url := 'http://www.borland.com'; + WriteLn('Querying ' + Url); + FHttpCli.URL := Url; + FHttpCli.OnRequestDone := HttpRequestDone; + FHttpCli.OnDocData := HttpDocData; + FHttpCli.GetASync; + { We need a message loop in order for windows message processing to work. } + { There is a message loop built into each TWSocket, so we use the one in } + { THttpCli control socket. } + { MessageLoop will exit only when WM_QUIT message is posted. We do that } + { form the OnRequestDone event handler when the component has finished. } + FHttpCli.CtrlSocket.MessageLoop; + WriteLn('Going back to the OS'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called each time THttpCli receive document data. } +procedure TConApplication.HttpDocData( + Sender : TObject; + Buffer : Pointer; + Len : Integer); +begin + while Len > 0 do begin { While we have bytes... } + Write(PChar(Buffer)^); { Write to standard output } + Buffer := PChar(Buffer) + 1; { Skip to next byte } + Len := Len - 1; { Count down the byte } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when THttpCli has finihed his work. } +procedure TConApplication.HttpRequestDone( + Sender : TObject; + RqType : THttpRequest; + ErrorCode : Word); +begin + { Check status } + if ErrorCode <> 0 then + WriteLn('Failed, error #' + IntToStr(ErrorCode)) + else + WriteLn('Done.'); + { Prompt the user } + WriteLn('Hit ENTER key to return quit program...'); + ReadLn; + { Break message loop we called from the execute method } + PostMessage(FHttpCli.CtrlSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +var + ConApp : TConApplication; +begin + WriteLn(CopyRight); + WriteLn; + ConApp := TConApplication.Create(nil); + try + ConApp.Execute; + finally + ConApp.Destroy; + end; +end. diff --git a/lib/Delphi/Internet/ConSmtp.dpr b/lib/Delphi/Internet/ConSmtp.dpr new file mode 100644 index 00000000..b91b7d20 --- /dev/null +++ b/lib/Delphi/Internet/ConSmtp.dpr @@ -0,0 +1,291 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: This demo shows how to use TSmtpCli component within a console + mode application. It connect to your ISP server and mail a simple + message. See the "const" section below to change the SMTP setting + according to your situation. The mail message is also sent to + me (CCi). +Creation: Dec 24, 2001 +Version: 1.01 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Nov 11, 2002 V1.01 Changed MsgLine argument of SmtpGetData from PChar to + pointer to reflect component change. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +program ConSmtp; + +{$IFDEF VER80} + Bomb('Sorry, Delphi 1 does not support console mode programs'); +{$ENDIF} +{$APPTYPE CONSOLE} +{$IFNDEF NOFORMS} + Bomb('Please add NOFORMS to your project defines'); +{$ENDIF} + +uses + Windows, Classes, SysUtils, Messages, SmtpProt; + +const + ConSmtpVersion = 101; + CopyRight = ' ConSmtp (c) 2002 by Francois PIETTE. V1.01'; + +{ You *MUST* change the settings below so that your ISP mail server is } +{ addressed. If you don't change those settings, you'll use my ISP SMTP } +{ server which doesn't allow relaying. So you'll be rejected ! } +const + { This is your ISP SMPT server hostname } + YourSmtpServer = 'relay.skynet.be'; + { This is your sign on. Usually just your first and last names } + WhoYouAre = 'Firstname LastName'; + { And here your own email address } + YourEmailAddress = 'user.name@domain.name'; + { And finally the destination email address } + DestinationEmail = 'francois.piette@pophost.eunet.be'; + +type + { We use TConApplication class (actually a component) to encapsulate all } + { the work to be done. This is easier because TSmtpCli is event driven } + { and need methods (that is procedure of object) to handle events. } + TConApplication = class(TComponent) + protected + FSmtpCli : TSmtpCli; + FMessageBody : TStringList; + procedure SmtpRequestDone(Sender : TObject; + RqType : TSmtpRequest; + ErrorCode : Word); + procedure SmtpGetData(Sender : TObject; + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); + procedure SmtpResponse(Sender : TObject; + Msg : String); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Execute; + end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TConApplication.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FSmtpCli := TSmtpCli.Create(Self); + FMessageBody := TStringList.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TConApplication.Destroy; +begin + if Assigned(FSmtpCli) then begin + FSmtpCli.Destroy; + FSmtpCli := nil; + end; + if Assigned(FMessageBody) then begin + FMessageBody.Destroy; + FMessageBody := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TConApplication.Execute; +begin + { Prepare connection to SMTP server } + FSmtpCli.Host := YourSmtpServer; + FSmtpCli.Port := 'smtp'; + FSmtpCli.SignOn := WhoYouAre; + { Prepare message addressing (two recipients, one is CCi) } + FSmtpCli.FromName := YourEmailAddress; + FSmtpCli.RcptName.Clear; + FSmtpCli.RcptName.Add(DestinationEmail); + FSmtpCli.RcptName.Add('francois.piette@overbyte.be'); { This is CCi } + FSmtpCli.HdrSubject := 'ICS console mode SMTP demo is working'; + FSmtpCli.HdrTo := FSmtpCli.RcptName.Strings[0]; + FSmtpCli.HdrFrom := FSmtpCli.FromName; + + { Construct the message body } + FMessageBody.Clear; + FMessageBody.Add('Hello !'); + FMessageBody.Add(''); + FMessageBody.Add('This message has been sent by ConSmtp demo.'); + FMessageBody.Add(''); + FMessageBody.Add('--'); + FMessageBody.Add(FSmtpCli.SignOn); + FMessageBody.Add(FSmtpCli.FromName); + + { Prepare component event handlers } + FSmtpCli.OnRequestDone := SmtpRequestDone; + FSmtpCli.OnResponse := SmtpResponse; + FSmtpCli.OnGetData := SmtpGetData; + + WriteLn('> CONNECT ' + FSmtpCli.Host + '/' + FSmtpCli.Port); + FSmtpCli.Connect; + + { We need a message loop in order for windows message processing to work. } + { There is a message loop built into each TWSocket, so we use the one in } + { TSmtpCli control socket. } + { MessageLoop will exit only when WM_QUIT message is posted. We do that } + { form the OnRequestDone event handler when the component has finished. } + FSmtpCli.CtrlSocket.MessageLoop; + WriteLn('Going back to the OS'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TSmtpCli to get the next line of message } +{ body. It is called repeatedly to get all lines, until "More" argument } +{ is set to false. As we stored the message in a TStringList, we just have } +{ to read from it. Easy. We could also easily read from a file. } +procedure TConApplication.SmtpGetData( + Sender : TObject; + LineNum : Integer; { The line number, start from 0 } + MsgLine : Pointer; { Where to store each line (pointer to buffer) } + MaxLen : Integer; { SizeOf line buffer within smtp component } + var More : Boolean); { Return value to signal end of message body } +begin + if LineNum > FMessageBody.count then + More := FALSE + else + StrPLCopy(MsgLine, FMessageBody.Strings[LineNum - 1], MaxLen - 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called each time the smtp component receive an } +{ message from smtp server. } +procedure TConApplication.SmtpResponse(Sender: TObject; Msg: String); +begin + WriteLn('< ' + Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called each time smtp component has done a request } +{ We use it to start the next request because sending a smtp message } +{ require a few operations: connecting to server, sending helo message, } +{ sending originator, sending recipients, sending message body and finally } +{ disconnecting from server. There are of course optional request such as } +{ authentication. } +procedure TConApplication.SmtpRequestDone( + Sender : TObject; + RqType : TSmtpRequest; + ErrorCode : Word); +var + EndFlag : Boolean; +begin + EndFlag := FALSE; + case RqType of + smtpConnect: + begin + WriteLn('> HELO'); + if ErrorCode = 0 then + FSmtpCli.Helo; + end; + smtpHelo: + begin + WriteLn('> MAILFROM'); + if ErrorCode = 0 then + FSmtpCli.MailFrom; + end; + smtpMailFrom: + begin + WriteLn('> RCPTTO'); + if ErrorCode = 0 then + FSmtpCli.RcptTo; + end; + smtpRcptTo: + begin + WriteLn('> DATA'); + if ErrorCode = 0 then + FSmtpCli.Data; + end; + smtpData: + begin + WriteLn('> QUIT'); + if ErrorCode = 0 then + FSmtpCli.Quit; + end; + smtpQuit: + begin + WriteLn('Quit done'); + EndFlag := TRUE; + end; + else + begin + WriteLn('Unknown SmtpRequest ' + IntToStr(Ord(RqType))); + EndFlag := TRUE; + end; + end; + + { Check status } + if ErrorCode <> 0 then begin + WriteLn('Failed, error #' + IntToStr(ErrorCode)); + EndFlag := TRUE; + end; + + { If something wrong or end of job, then go back to the OS } + if EndFlag then begin + { Prompt the user } + WriteLn('Hit ENTER key to return quit program...'); + ReadLn; + { Break message loop we called from the execute method } + PostMessage(FSmtpCli.CtrlSocket.Handle, WM_QUIT, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +var + ConApp : TConApplication; +begin + WriteLn(CopyRight); + WriteLn; + ConApp := TConApplication.Create(nil); + try + ConApp.Execute; + finally + ConApp.Destroy; + end; +end. + diff --git a/lib/Delphi/Internet/ConSrv1.dpr b/lib/Delphi/Internet/ConSrv1.dpr new file mode 100644 index 00000000..4e4710ba --- /dev/null +++ b/lib/Delphi/Internet/ConSrv1.dpr @@ -0,0 +1,354 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demo for a full blown multi-user server using TWSocket and + console mode. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: Feb 17, 1999 +Version: 1.01 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Sep 29, 1999 V1.01 Adapted for Delphi 5 + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +program ConSrv1; +{$IFDEF VER80} + Bomb('Sorry but Delphi 1 doesn''t support console mode program'); +{$ENDIF} +{$APPTYPE CONSOLE} +{$IFNDEF NOFORMS} + Bomb('This demo must be compiled with symbol NOFORMS defined.' + + 'Go to Delphi/Menu/Project/Options and in "Directories/Conditionals"' + + 'tab, add NOFORMS to the "define" edit box.'); +{$ENDIF} + +uses + Windows, + SysUtils, + Messages, + Classes, + WSocket, + WinSock, + ConSrv1S in 'ConSrv1S.pas', + ConSrv1C in 'ConSrv1C.pas'; + +const + Version = 101; + +type + TKeyboardThread = class (TThread) + public + procedure Execute; override; + end; + +// Declare all standard functions and procedures +function InitAplication : Boolean; forward; +procedure RunAplication; forward; +procedure CleanupAplication; forward; +procedure CleanupData; forward; +function CtrlHandlerRoutine(CtrlType : DWORD) : DWORD; stdcall; forward; +function MyWindowProc(ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; forward; +function CreateEvent(var MsgRec : TMsg) : Integer; forward; +procedure ClientDisconnectedEvent(var MsgRec : TMsg); forward; + +// Declare some global variables +var + SrvObject : TServerObject; + Terminated : Boolean; + hWndMain : HWND; + KbdThread : TKeyboardThread; + MyWindowClass : TWndClass = (style : 0; + lpfnWndProc : @MyWindowProc; + cbClsExtra : 0; + cbWndExtra : 0; + hInstance : 0; + hIcon : 0; + hCursor : 0; + hbrBackground : 0; + lpszMenuName : nil; + lpszClassName : 'MyWindowClass'); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Console mode applications do not receive keyboard messages as GUI apps. } +{ We use a thread to wait for keyboard activity and generate keyboard } +{ messages as in a GUI application. } +procedure TKeyboardThread.Execute; +var + hConsole : THandle; + Status : DWORD; + InputBuffer : TInputRecord; + KeyEvent : TKeyEventRecord; + Count : DWORD; +begin + hConsole := GetStdHandle(STD_INPUT_HANDLE); + while not Terminated do begin + Status := WaitForSingleObject(hConsole, 1000); + if Status = WAIT_OBJECT_0 then begin + if ReadConsoleInput(hConsole, InputBuffer, 1, Count) then begin + if InputBuffer.EventType = KEY_EVENT then begin +{$IFDEF VER90} { Delphi 2 } + KeyEvent := InputBuffer.KeyEvent; +{$ELSE} +{$IFDEF VER93} { Bcb 1 } + KeyEvent := InputBuffer.KeyEvent; +{$ELSE} +{$IFDEF VER100} { Delphi 3 } + KeyEvent := InputBuffer.KeyEvent; +{$ELSE} +{$IFDEF VER110} { Bcb 3 } + KeyEvent := InputBuffer.KeyEvent; +{$ELSE} +{$ENDIF} +{ Starting from Delphi 4 and Bcb4, they changed definition } + KeyEvent := InputBuffer.Event.KeyEvent; +{$ENDIF} +{$ENDIF} +{$ENDIF} + if KeyEvent.bKeyDown then begin + PostMessage(hWndMain, WM_KEYDOWN, + KeyEvent.wVirtualKeyCode, + KeyEvent.wRepeatCount + + (KeyEvent.wVirtualScanCode shl 16)); + end + else begin + PostMessage(hWndMain, WM_KEYUP, + KeyEvent.wVirtualKeyCode, + KeyEvent.wRepeatCount + + (KeyEvent.wVirtualScanCode shl 16)); + end; + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is a callback routine called by windows when some events occurs. } +{ We trap those events to close our application. } +function CtrlHandlerRoutine(CtrlType : DWORD) : DWORD; stdcall; +begin + case CtrlType of + CTRL_C_EVENT, // User hit CTRL-C + CTRL_BREAK_EVENT, // User hit CTRL-BREAK + CTRL_LOGOFF_EVENT, // User log off his session + CTRL_CLOSE_EVENT, // Close signal + CTRL_SHUTDOWN_EVENT : // Window shutdown signal + begin + Result := 1; + PostMessage(hWndMain, WM_QUIT, 0, 0); + end; + else + Result := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure ClientDisconnectedEvent(var MsgRec : TMsg); +var + Client : TClientObject; +begin + Client := TClientObject(MsgRec.lParam); + if Assigned(SrvObject) and Assigned(Client) then + SrvObject.DisconnectedClient(Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function CreateEvent(var MsgRec : TMsg) : Integer; +begin + try + SetConsoleTitle(PChar('ConSrv V' + Format('%d.%2d', + [Version div 100,Version mod 100]))); + WriteLn('Hit CTRL-C to return to system.'); + SrvObject := TServerObject.Create; + SrvObject.CtrlWindow := MsgRec.hwnd; + KbdThread := TKeyboardThread.Create(FALSE); + Result := 0; // Success + except + on E:Exception do begin + WriteLn('CreateEvent failed.'); + WriteLn('Exception ' + E.ClassName + ': ' + E.Message); + Result := -1; // Failure + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DisplayHelp; +begin + WriteLn('F1 Display this help text'); + WriteLn('F2 Display user list'); + WriteLn('CTRL-C Quit program'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure KeyDownEvent(MsgRec : TMsg); +var + Key : Integer; +begin + Key := MsgRec.wParam; + case Key of + VK_SHIFT, + VK_CONTROL, + VK_MENU: { Ignore }; + VK_F1: + DisplayHelp; + VK_F2: + SrvObject.DisplayClientList; + else + MessageBeep(MB_OK); + WriteLn('Unknown keyboard command. Type F1 to get help.'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function MyWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + MsgRec : TMsg; +begin + Result := 0; // This means we handled the message + try + MsgRec.hwnd := ahWnd; + MsgRec.message := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + + case auMsg of + WM_CLIENT_DISCONNECTED: + ClientDisconnectedEvent(MsgRec); + WM_CREATE: + Result := CreateEvent(MsgRec); + WM_CLOSE: + begin + WriteLn('Closing'); + DestroyWindow(ahWnd); + end; + WM_DESTROY: + begin + WriteLn('Destroying'); + CleanupData; + end; + WM_KEYDOWN: KeyDownEvent(MsgRec); +{ WM_KEYUP: writeln('WM_KEYUP'); } +{ WM_CHAR: writeln('WM_CHAR'); } + else + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + end; + except + on E:Exception do + WriteLn('Exception ' + E.ClassName + ': ' + E.Message); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function InitAplication : Boolean; +begin + Result := FALSE; + if Windows.RegisterClass(MyWindowClass) = 0 then + Exit; + hWndMain := CreateWindowEx(WS_EX_TOOLWINDOW, + MyWindowClass.lpszClassName, + '', { Window name } + WS_POPUP, { Window Style } + 0, 0, { X, Y } + 0, 0, { Width, Height } + 0, { hWndParent } + 0, { hMenu } + HInstance, { hInstance } + nil); { CreateParam } + if hWndMain = 0 then + Exit; + SetConsoleCtrlHandler(@CtrlHandlerRoutine, TRUE); + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure CleanupData; +begin + if Assigned(SrvObject) then begin + SrvObject.Destroy; + SrvObject := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure CleanupAplication; +begin + CleanupData; + if hWndMain <> 0 then begin + DestroyWindow(hWndMain); + hWndMain := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure RunAplication; +var + MsgRec : TMsg; +begin + { If GetMessage retrieves the WM_QUIT, the return value is FALSE and } + { the message loop is broken. } + while GetMessage(MsgRec, 0, 0, 0) do begin + TranslateMessage(MsgRec); + DispatchMessage(MsgRec) + end; + Terminated := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +begin + InitAplication; + try + RunAplication; + finally + CleanupAplication; + end; +end. diff --git a/lib/Delphi/Internet/ConSrv1C.pas b/lib/Delphi/Internet/ConSrv1C.pas new file mode 100644 index 00000000..fc7db4f0 --- /dev/null +++ b/lib/Delphi/Internet/ConSrv1C.pas @@ -0,0 +1,181 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Client handling +Creation: Feb 17, 1999 +Version: 1.00 + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit ConSrv1C; + +interface + +uses + Windows, SysUtils, Messages, Classes, WSocket, WinSock; + +const + WM_CLIENT_DISCONNECTED = WM_USER + 1; + CmdPrompt = #13#10 + '--> '; + +type + // TClientObject handle a single client communication + TClientObject = class (TObject) + protected + FCliWSocket : TWSocket; + FCtrlWindow : HWND; + FCommand : array [0..2047] of char; + FCmdLen : Integer; + FPeerName : String; + procedure DataAvailableHandler(Sender : TObject; Error : Word); + procedure SessionClosedHandler(Sender : TObject; Error : Word); + procedure CommandInterpreter; + procedure TELNET_Interpreter(CommandVerb : String; + CommandTail : String); + public + constructor Create; virtual; + destructor Destroy; override; + procedure StartClient(ASocket : TSocket); + property CtrlWindow : HWND read FCtrlWindow + write FCtrlWindow; + property PeerName : String read FPeerName; + end; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TClientObject.Create; +begin + inherited Create; + FCliWSocket := TWSocket.Create(nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TClientObject.Destroy; +begin + if Assigned(FCliWSocket) then begin + FCliWSocket.Destroy; + FCliWSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientObject.StartClient(ASocket : TSocket); +begin + FCliWSocket.LineMode := TRUE; + FCliWSocket.LineEnd := #13#10; + FCliWSocket.LineEcho := TRUE; + FCliWSocket.LineEdit := TRUE; + FCliWSocket.OnDataAvailable := DataAvailableHandler; + FCliWSocket.OnSessionClosed := SessionClosedHandler; + FCliWSocket.HSocket := ASocket; + FPeerName := FCliWSocket.GetPeerAddr; + FCliWSocket.SendStr('Welcome to ConSrv' + CmdPrompt); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientObject.SessionClosedHandler(Sender : TObject; Error : Word); +begin + PostMessage(FCtrlWindow, WM_CLIENT_DISCONNECTED, 0, LParam(Self)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +// This handler is called each time we received a complete line from +// connected client (remember we use line mode) +procedure TClientObject.DataAvailableHandler(Sender : TObject; Error : Word); +begin + // Get data from socket component. We should receive a complete line. + FCmdLen := FCliWSocket.Receive(@FCommand, SizeOf(FCommand) - 1); + if FCmdLen <= 0 then + Exit; // No data available + if FCliWSocket.State <> wsConnected then + Exit; // Ignore any data received while closing + + // Remove trailling CR/LF, if any (could be missing if our buffer + // was too small) + while (FCmdLen > 0) and (FCommand[FCmdLen - 1] in [#13, #10]) do + Dec(FCmdLen); + FCommand[FCmdLen] := #0; + + // Interpret received command + CommandInterpreter; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the command line interpreter. Should extend the code to support } +{ every command needed... } +procedure TClientObject.CommandInterpreter; +var + CommandVerb : String; + CommandTail : String; + I, J : Integer; +begin + { Skip leading spaces } + I := 0; + while (I < FCmdLen) and (FCommand[I] in [' ', #9]) do + Inc(I); + + { Find separator and separe CommandVerb and CommandTail } + J := I; + while TRUE do begin + if (J >= FCmdLen) then begin + SetLength(CommandVerb, FCmdLen - I); + Move(FCommand[I], CommandVerb[1], Length(CommandVerb)); + CommandTail := ''; + break; + end; + + if FCommand[J] in [' ', #9, '/'] then begin + SetLength(CommandVerb, J - I); + Move(FCommand[I], CommandVerb[1], Length(CommandVerb)); + SetLength(CommandTail, FCmdLen - J); + Move(FCommand[J], CommandTail[1], Length(CommandTail)); + break; + end; + Inc(J); + end; + CommandVerb := UpperCase(CommandVerb); + + // We could chack which port we are servicing and call appropriate + // interpeter (telnet, smtp, pop3, nntp or any line oriented protocol) + TELNET_Interpreter(CommandVerb, CommandTail); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Not a real TELNET command interpreter, just enough to see how it could } +{ be implemented. } +procedure TClientObject.TELNET_Interpreter( + CommandVerb : String; + CommandTail : String); +begin + if Length(CommandVerb) > 0 then begin + FCliWSocket.SendStr(#13#10 + 'Executing command ''' + + CommandVerb + '''...' + #13#10); + + if CommandVerb = 'EXIT' then begin + PostMessage(FCtrlWindow, WM_CLIENT_DISCONNECTED, 0, LParam(Self)); +// FCliWSocket.Close; + Exit; + end + else if CommandVerb = 'HELP' then + FCliWSocket.SendStr('List of commands:' + #13#10 + + ' Exit logoff from server' + #13#10 + + ' Help show this help screen' + #13#10) + else + FCliWSocket.SendStr('Unknown command, ignoring'); + end; + + FCliWSocket.SendStr(CmdPrompt); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/ConSrv1S.pas b/lib/Delphi/Internet/ConSrv1S.pas new file mode 100644 index 00000000..efe51cbf --- /dev/null +++ b/lib/Delphi/Internet/ConSrv1S.pas @@ -0,0 +1,145 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Server handling +Creation: Feb 17, 1999 +Version: 1.00 + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit ConSrv1S; + +interface + +uses + Windows, SysUtils, Messages, Classes, WSocket, WinSock, ConSrv1C; + +type + // TServerObject handle all clients sessions + TServerObject = class (TObject) + protected + FSrvWSocket : TWSocket; + FCliList : TList; + FCtrlWindow : HWND; + procedure SessionAvailableHandler(Sender : TObject; Error : Word); + public + constructor Create; virtual; + destructor Destroy; override; + procedure StartServer; + procedure DisconnectedClient(Client : TClientObject); + procedure DisplayClientList; + property CtrlWindow : HWND read FCtrlWindow + write FCtrlWindow; + property SrvWSocket : TWSocket read FSrvWSocket; + end; + + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TServerObject.Create; +begin + inherited Create; + FCliList := TList.Create; + FSrvWSocket := TWSocket.Create(nil); + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TServerObject.Destroy; +begin + if Assigned(FSrvWSocket) then begin + FSrvWSocket.Destroy; + FSrvWSocket := nil; + end; + if Assigned(FCliList) then begin + FCliList.Destroy; + FCliList := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerObject.StartServer; +begin + FSrvWSocket.Proto := 'tcp'; + FSrvWSocket.Port := 'telnet'; + FSrvWSocket.Addr := '0.0.0.0'; + FSrvWSocket.OnSessionAvailable := SessionAvailableHandler; + FSrvWSocket.Listen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerObject.SessionAvailableHandler(Sender : TObject; Error : Word); +var + Client : TClientObject; + ASocket : TSocket; + SAddr : TSockAddrIn; + SAddrLen : integer; +begin + Write('Client connected: '); + + // Create a new object to handle client session + Client := TClientObject.Create; + + // Add to our client list + FCliList.Add(Client); + + // Accept the connection + ASocket := FSrvWSocket.Accept; + + // Determine who has connected before really starting the session + SAddrLen := SizeOf(SAddr); + WSocket_getpeername(ASocket, SAddr, SAddrLen); + WriteLn(WSocket_inet_ntoa(SAddr.sin_addr)); + WriteLn('There are: ', FCliList.Count, ' connected clients.'); + + // Startup the client connection (send banner) + Client.CtrlWindow := FCtrlWindow; + Client.StartClient(ASocket); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is called to disconnect a client and remove it from our } +{ client list. } +procedure TServerObject.DisconnectedClient(Client : TClientObject); +var + Index : Integer; +begin + + // Search client in our list + Index := FCliList.IndexOf(Client); + if Index < 0 then + Exit; // Not found already disconnected + + FCliList.Delete(Index); + WriteLn('Client ', Client.PeerName, ' disconnected'); + WriteLn('Remains: ', FCliList.Count, ' connected clients.'); + + // Then destroy client (this will abort the session if still active) + Client.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerObject.DisplayClientList; +var + I : Integer; + Client : TClientObject; +begin + WriteLn('There are ', FCliList.Count, ' connected client.'); + for I := 1 to FCliList.Count do begin + Client := FCliList.Items[I - 1]; + WriteLn(I:3, ': ', Client.PeerName); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/Del40Sam.bpg b/lib/Delphi/Internet/Del40Sam.bpg new file mode 100644 index 00000000..0b33090d --- /dev/null +++ b/lib/Delphi/Internet/Del40Sam.bpg @@ -0,0 +1,175 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = IcsDel40.bpl ThrdSrv.exe client5.exe Client7.exe concli1.exe \ + concli2.exe clidemo.exe ConFtp.exe ConHttp.exe ConSrv1.exe dnslook.exe \ + finger.exe ftpServ.exe ftpthrd.exe ftptst.exe httpasp.exe httpasy.exe \ + httpChk.exe Httpdmo.exe httpget.exe httppg.exe httpthrd.exe httptst.exe \ + MailRcv.exe MailSnd.exe md5test.exe MimeDemo.exe MimeTst.exe mtsrv.exe \ + MyYahoo.exe newsrdr.exe NsLookup.exe pingtst.exe Pop3Mime.exe Recv.exe \ + Sender.exe server5.exe srvdemo.exe SocksTst.exe DllTst1.exe TcpSrv.exe \ + tnclient.exe tndemo.exe tnsrv.exe twschat.exe udplstn.exe udpsend.exe \ + WebServ.exe IcsDll1.dll ConSmtp.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +ftptst.exe: ftptst.dpr + $(DCC) + +ftpServ.exe: ftpServ.dpr + $(DCC) + +IcsDel40.bpl: ..\VC32\IcsDel40.dpk + $(DCC) + +httptst.exe: httptst.dpr + $(DCC) + +httpthrd.exe: httpthrd.dpr + $(DCC) + +httpasp.exe: httpasp.dpr + $(DCC) + +httpasy.exe: httpasy.dpr + $(DCC) + +Httpdmo.exe: Httpdmo.dpr + $(DCC) + +httpget.exe: httpget.dpr + $(DCC) + +httppg.exe: httppg.dpr + $(DCC) + +md5test.exe: md5test.dpr + $(DCC) + +finger.exe: finger.dpr + $(DCC) + +client5.exe: client5.dpr + $(DCC) + +tnsrv.exe: tnsrv.dpr + $(DCC) + +concli1.exe: concli1.dpr + $(DCC) + +concli2.exe: concli2.dpr + $(DCC) + +dnslook.exe: dnslook.dpr + $(DCC) + +MimeDemo.exe: MimeDemo.dpr + $(DCC) + +MimeTst.exe: MimeTst.dpr + $(DCC) + +mtsrv.exe: mtsrv.dpr + $(DCC) + +newsrdr.exe: newsrdr.dpr + $(DCC) + +pingtst.exe: pingtst.dpr + $(DCC) + +Pop3Mime.exe: Pop3Mime.dpr + $(DCC) + +server5.exe: server5.dpr + $(DCC) + +tnclient.exe: tnclient.dpr + $(DCC) + +tndemo.exe: tndemo.dpr + $(DCC) + +twschat.exe: twschat.dpr + $(DCC) + +MailRcv.exe: MailRcv.dpr + $(DCC) + +MailSnd.exe: MailSnd.dpr + $(DCC) + +Sender.exe: Sender.dpr + $(DCC) + +Recv.exe: Recv.dpr + $(DCC) + +SocksTst.exe: SocksTst.dpr + $(DCC) + +Client7.exe: Client7.dpr + $(DCC) + +udpsend.exe: udpsend.dpr + $(DCC) + +udplstn.exe: udplstn.dpr + $(DCC) + +ftpthrd.exe: ftpthrd.dpr + $(DCC) + +srvdemo.exe: srvdemo.dpr + $(DCC) + +NsLookup.exe: NsLookup.dpr + $(DCC) + +ConSrv1.exe: ConSrv1.dpr + $(DCC) + +MyYahoo.exe: MyYahoo.dpr + $(DCC) + +TcpSrv.exe: TcpSrv.dpr + $(DCC) + +httpChk.exe: httpChk.dpr + $(DCC) + +WebServ.exe: WebServ.dpr + $(DCC) + +IcsDll1.dll: IcsDll1.dpr + $(DCC) + +DllTst1.exe: DllTst1.dpr + $(DCC) + +ThrdSrv.exe: ThrdSrv.dpr + $(DCC) + +clidemo.exe: clidemo.dpr + $(DCC) + +ConFtp.exe: ConFtp.dpr + $(DCC) + +ConHttp.exe: ConHttp.dpr + $(DCC) + +ConSmtp.exe: ConSmtp.dpr + $(DCC) + + diff --git a/lib/Delphi/Internet/Del50Sam.bpg b/lib/Delphi/Internet/Del50Sam.bpg new file mode 100644 index 00000000..f89c96d1 --- /dev/null +++ b/lib/Delphi/Internet/Del50Sam.bpg @@ -0,0 +1,184 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = IcsDel50.bpl CliDemo.exe Client5.exe Client7.exe ConCli1.exe \ + ConCli2.exe ConSrv1.exe dnslook.exe Finger.exe FtpServ.exe FtpThrd.exe \ + FtpTst.exe Httpasp.exe Httpasy.exe HttpChk.exe HttpDmo.exe HttpGet.exe \ + HttpPg.exe HttpThrd.exe HttpTst.exe MailRcv.exe MailSnd.exe MD5Test.exe \ + MimeDemo.exe MimeTst.exe MtSrv.exe NewsRdr.exe NsLookup.exe PingTst.exe \ + Pop3Mime.exe Recv.exe Sender.exe Server5.exe SrvDemo.exe SocksTst.exe \ + TcpSrv.exe ThrdSrv.exe TnClient.exe TnDemo.exe TnSrv.exe TWSChat.exe UdpLstn.exe \ + UdpSend.exe DynCli.exe WebServ.exe DllTst1.exe IcsDll1.dll SrvTcp.exe \ + SvcTcp.exe IcsIsapi.dll ConHttp.exe ConSmtp.exe ConFtp.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +FtpTst.exe: FtpTst.dpr + $(DCC) + +FtpServ.exe: FtpServ.dpr + $(DCC) + +HttpTst.exe: HttpTst.dpr + $(DCC) + +HttpThrd.exe: HttpThrd.dpr + $(DCC) + +Httpasp.exe: Httpasp.dpr + $(DCC) + +Httpasy.exe: Httpasy.dpr + $(DCC) + +HttpDmo.exe: HttpDmo.dpr + $(DCC) + +HttpGet.exe: HttpGet.dpr + $(DCC) + +HttpPg.exe: HttpPg.dpr + $(DCC) + +MD5Test.exe: MD5Test.dpr + $(DCC) + +Finger.exe: Finger.dpr + $(DCC) + +CliDemo.exe: CliDemo.dpr + $(DCC) + +Client5.exe: Client5.dpr + $(DCC) + +TnSrv.exe: TnSrv.dpr + $(DCC) + +ConCli1.exe: ConCli1.dpr + $(DCC) + +ConCli2.exe: ConCli2.dpr + $(DCC) + +dnslook.exe: dnslook.dpr + $(DCC) + +MimeDemo.exe: MimeDemo.dpr + $(DCC) + +MimeTst.exe: MimeTst.dpr + $(DCC) + +MtSrv.exe: MtSrv.dpr + $(DCC) + +NewsRdr.exe: NewsRdr.dpr + $(DCC) + +PingTst.exe: PingTst.dpr + $(DCC) + +Pop3Mime.exe: Pop3Mime.dpr + $(DCC) + +Server5.exe: Server5.dpr + $(DCC) + +TnClient.exe: TnClient.dpr + $(DCC) + +TnDemo.exe: TnDemo.dpr + $(DCC) + +TWSChat.exe: TWSChat.dpr + $(DCC) + +MailRcv.exe: MailRcv.dpr + $(DCC) + +MailSnd.exe: MailSnd.dpr + $(DCC) + +Sender.exe: Sender.dpr + $(DCC) + +Recv.exe: Recv.dpr + $(DCC) + +SocksTst.exe: SocksTst.dpr + $(DCC) + +Client7.exe: Client7.dpr + $(DCC) + +UdpSend.exe: UdpSend.dpr + $(DCC) + +UdpLstn.exe: UdpLstn.dpr + $(DCC) + +FtpThrd.exe: FtpThrd.dpr + $(DCC) + +SrvDemo.exe: SrvDemo.dpr + $(DCC) + +NsLookup.exe: NsLookup.dpr + $(DCC) + +ConSrv1.exe: ConSrv1.dpr + $(DCC) + +TcpSrv.exe: TcpSrv.dpr + $(DCC) + +HttpChk.exe: HttpChk.dpr + $(DCC) + +IcsDel50.bpl: ..\VC32\IcsDel50.dpk + $(DCC) + +DynCli.exe: DynCli.dpr + $(DCC) + +WebServ.exe: WebServ.dpr + $(DCC) + +DllTst1.exe: DllTst1.dpr + $(DCC) + +IcsDll1.dll: IcsDll1.dpr + $(DCC) + +SrvTcp.exe: SrvTcp.dpr + $(DCC) + +SvcTcp.exe: SvcTcp.dpr + $(DCC) + +IcsIsapi.dll: IcsIsapi.dpr + $(DCC) + +ThrdSrv.exe: ThrdSrv.dpr + $(DCC) + +ConHttp.exe: ConHttp.dpr + $(DCC) + +ConSmtp.exe: ConSmtp.dpr + $(DCC) + +ConFtp.exe: ConFtp.dpr + $(DCC) + + diff --git a/lib/Delphi/Internet/Del60Sam.bpg b/lib/Delphi/Internet/Del60Sam.bpg new file mode 100644 index 00000000..085ad7ba --- /dev/null +++ b/lib/Delphi/Internet/Del60Sam.bpg @@ -0,0 +1,184 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = IcsDel60.bpl CliDemo.exe Client5.exe Client7.exe ConCli1.exe \ + ConCli2.exe ConSrv1.exe DllTst1.exe Dnslook.exe DynCli.exe Finger.exe \ + FtpServ.exe FtpThrd.exe FtpTst.exe HttpAsp.exe HttpAsy.exe HttpChk.exe \ + HttpDmo.exe HttpGet.exe HttpPg.exe HttpThrd.exe HttpTst.exe IcsDll1.dll \ + IcsIsapi.dll MailRcv.exe MailSnd.exe MD5Test.exe MimeDemo.exe MimeTst.exe \ + MtSrv.exe NewsRdr.exe NsLookup.exe PingTst.exe Pop3Mime.exe Recv.exe Sender.exe \ + Server5.exe SocksTst.exe SrvTcp.exe SrvDemo.exe SvcTcp.exe TcpSrv.exe \ + ThrdSrv.exe TnClient.exe TnDemo.exe TnSrv.exe TWSChat.exe UdpLstn.exe \ + UdpSend.exe WebServ.exe ConSmtp.exe ConHttp.exe ConFtp.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +FtpTst.exe: FtpTst.dpr + $(DCC) + +FtpServ.exe: FtpServ.dpr + $(DCC) + +HttpTst.exe: HttpTst.dpr + $(DCC) + +HttpThrd.exe: HttpThrd.dpr + $(DCC) + +HttpAsp.exe: HttpAsp.dpr + $(DCC) + +HttpAsy.exe: HttpAsy.dpr + $(DCC) + +HttpDmo.exe: HttpDmo.dpr + $(DCC) + +HttpGet.exe: HttpGet.dpr + $(DCC) + +HttpPg.exe: HttpPg.dpr + $(DCC) + +MD5Test.exe: MD5Test.dpr + $(DCC) + +Finger.exe: Finger.dpr + $(DCC) + +CliDemo.exe: CliDemo.dpr + $(DCC) + +Client5.exe: Client5.dpr + $(DCC) + +TnSrv.exe: TnSrv.dpr + $(DCC) + +ConCli1.exe: ConCli1.dpr + $(DCC) + +ConCli2.exe: ConCli2.dpr + $(DCC) + +Dnslook.exe: Dnslook.dpr + $(DCC) + +MimeDemo.exe: MimeDemo.dpr + $(DCC) + +MimeTst.exe: MimeTst.dpr + $(DCC) + +MtSrv.exe: MtSrv.dpr + $(DCC) + +NewsRdr.exe: NewsRdr.dpr + $(DCC) + +PingTst.exe: PingTst.dpr + $(DCC) + +Pop3Mime.exe: Pop3Mime.dpr + $(DCC) + +Server5.exe: Server5.dpr + $(DCC) + +TnClient.exe: TnClient.dpr + $(DCC) + +TnDemo.exe: TnDemo.dpr + $(DCC) + +TWSChat.exe: TWSChat.dpr + $(DCC) + +MailRcv.exe: MailRcv.dpr + $(DCC) + +MailSnd.exe: MailSnd.dpr + $(DCC) + +Sender.exe: Sender.dpr + $(DCC) + +Recv.exe: Recv.dpr + $(DCC) + +SocksTst.exe: SocksTst.dpr + $(DCC) + +Client7.exe: Client7.dpr + $(DCC) + +UdpSend.exe: UdpSend.dpr + $(DCC) + +UdpLstn.exe: UdpLstn.dpr + $(DCC) + +FtpThrd.exe: FtpThrd.dpr + $(DCC) + +SrvDemo.exe: SrvDemo.dpr + $(DCC) + +NsLookup.exe: NsLookup.dpr + $(DCC) + +ConSrv1.exe: ConSrv1.dpr + $(DCC) + +TcpSrv.exe: TcpSrv.dpr + $(DCC) + +HttpChk.exe: HttpChk.dpr + $(DCC) + +IcsDel60.bpl: ..\VC32\IcsDel60.dpk + $(DCC) + +DynCli.exe: DynCli.dpr + $(DCC) + +WebServ.exe: WebServ.dpr + $(DCC) + +DllTst1.exe: DllTst1.dpr + $(DCC) + +IcsDll1.dll: IcsDll1.dpr + $(DCC) + +SrvTcp.exe: SrvTcp.dpr + $(DCC) + +SvcTcp.exe: SvcTcp.dpr + $(DCC) + +IcsIsapi.dll: IcsIsapi.dpr + $(DCC) + +ThrdSrv.exe: ThrdSrv.dpr + $(DCC) + +ConSmtp.exe: ConSmtp.dpr + $(DCC) + +ConHttp.exe: ConHttp.dpr + $(DCC) + +ConFtp.exe: ConFtp.dpr + $(DCC) + + diff --git a/lib/Delphi/Internet/Del70Sam.bpg b/lib/Delphi/Internet/Del70Sam.bpg new file mode 100644 index 00000000..65a3876e --- /dev/null +++ b/lib/Delphi/Internet/Del70Sam.bpg @@ -0,0 +1,184 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = IcsDel70.bpl CliDemo.exe Client5.exe Client7.exe ConCli1.exe \ + ConCli2.exe ConFtp.exe ConSmtp.exe ConHttp.exe ConSrv1.exe DllTst1.exe \ + Dnslook.exe DynCli.exe Finger.exe FtpServ.exe FtpThrd.exe FtpTst.exe \ + HttpAsp.exe HttpAsy.exe HttpChk.exe HttpDmo.exe HttpGet.exe HttpPg.exe \ + HttpThrd.exe HttpTst.exe IcsDll1.dll IcsIsapi.dll MailRcv.exe MailSnd.exe \ + MD5Test.exe MimeDemo.exe MimeTst.exe MtSrv.exe NewsRdr.exe NsLookup.exe \ + PingTst.exe Pop3Mime.exe Recv.exe Sender.exe Server5.exe SocksTst.exe \ + SrvTcp.exe SrvDemo.exe SvcTcp.exe TcpSrv.exe ThrdSrv.exe TnClient.exe \ + TnDemo.exe TnSrv.exe TWSChat.exe UdpLstn.exe UdpSend.exe WebServ.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +FtpTst.exe: FtpTst.dpr + $(DCC) + +FtpServ.exe: FtpServ.dpr + $(DCC) + +HttpTst.exe: HttpTst.dpr + $(DCC) + +HttpThrd.exe: HttpThrd.dpr + $(DCC) + +HttpAsp.exe: HttpAsp.dpr + $(DCC) + +HttpAsy.exe: HttpAsy.dpr + $(DCC) + +HttpDmo.exe: HttpDmo.dpr + $(DCC) + +HttpGet.exe: HttpGet.dpr + $(DCC) + +HttpPg.exe: HttpPg.dpr + $(DCC) + +MD5Test.exe: MD5Test.dpr + $(DCC) + +Finger.exe: Finger.dpr + $(DCC) + +CliDemo.exe: CliDemo.dpr + $(DCC) + +Client5.exe: Client5.dpr + $(DCC) + +TnSrv.exe: TnSrv.dpr + $(DCC) + +ConCli1.exe: ConCli1.dpr + $(DCC) + +ConCli2.exe: ConCli2.dpr + $(DCC) + +Dnslook.exe: Dnslook.dpr + $(DCC) + +MimeDemo.exe: MimeDemo.dpr + $(DCC) + +MimeTst.exe: MimeTst.dpr + $(DCC) + +MtSrv.exe: MtSrv.dpr + $(DCC) + +NewsRdr.exe: NewsRdr.dpr + $(DCC) + +PingTst.exe: PingTst.dpr + $(DCC) + +Pop3Mime.exe: Pop3Mime.dpr + $(DCC) + +Server5.exe: Server5.dpr + $(DCC) + +TnClient.exe: TnClient.dpr + $(DCC) + +TnDemo.exe: TnDemo.dpr + $(DCC) + +TWSChat.exe: TWSChat.dpr + $(DCC) + +MailRcv.exe: MailRcv.dpr + $(DCC) + +MailSnd.exe: MailSnd.dpr + $(DCC) + +Sender.exe: Sender.dpr + $(DCC) + +Recv.exe: Recv.dpr + $(DCC) + +SocksTst.exe: SocksTst.dpr + $(DCC) + +Client7.exe: Client7.dpr + $(DCC) + +UdpSend.exe: UdpSend.dpr + $(DCC) + +UdpLstn.exe: UdpLstn.dpr + $(DCC) + +FtpThrd.exe: FtpThrd.dpr + $(DCC) + +SrvDemo.exe: SrvDemo.dpr + $(DCC) + +NsLookup.exe: NsLookup.dpr + $(DCC) + +ConSrv1.exe: ConSrv1.dpr + $(DCC) + +TcpSrv.exe: TcpSrv.dpr + $(DCC) + +HttpChk.exe: HttpChk.dpr + $(DCC) + +IcsDel70.bpl: ..\vc32\IcsDel70.dpk + $(DCC) + +DynCli.exe: DynCli.dpr + $(DCC) + +WebServ.exe: WebServ.dpr + $(DCC) + +DllTst1.exe: DllTst1.dpr + $(DCC) + +IcsDll1.dll: IcsDll1.dpr + $(DCC) + +SrvTcp.exe: SrvTcp.dpr + $(DCC) + +SvcTcp.exe: SvcTcp.dpr + $(DCC) + +IcsIsapi.dll: IcsIsapi.dpr + $(DCC) + +ThrdSrv.exe: ThrdSrv.dpr + $(DCC) + +ConSmtp.exe: ConSmtp.dpr + $(DCC) + +ConHttp.exe: ConHttp.dpr + $(DCC) + +ConFtp.exe: ConFtp.dpr + $(DCC) + + diff --git a/lib/Delphi/Internet/DllTst1.dpr b/lib/Delphi/Internet/DllTst1.dpr new file mode 100644 index 00000000..d450f7bb --- /dev/null +++ b/lib/Delphi/Internet/DllTst1.dpr @@ -0,0 +1,13 @@ +program DllTst1; + +uses + Forms, + DllTst_1 in 'DllTst_1.pas' {DllTestForm}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TDllTestForm, DllTestForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/DllTst_1.dfm b/lib/Delphi/Internet/DllTst_1.dfm new file mode 100644 index 00000000..3814c354 Binary files /dev/null and b/lib/Delphi/Internet/DllTst_1.dfm differ diff --git a/lib/Delphi/Internet/DllTst_1.pas b/lib/Delphi/Internet/DllTst_1.pas new file mode 100644 index 00000000..03a208c8 --- /dev/null +++ b/lib/Delphi/Internet/DllTst_1.pas @@ -0,0 +1,210 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: April 02, 2000 +Description: This is a demonstration program for IcsDll1.dll. It will + dynamically load the DLL, get IcsDllDemo entry point and call + it. Then display result from DLL. +Version: 1.00 +EMail: francois.piette@pophost.eunet.be francois.piette@swing.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit DllTst_1; + +{$IFDEF VER80} +'Sorry, this is a demo program calling a 32 bit DLL.' +'Upgrade to latest Delphi version to use it.' +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + IniFiles, StdCtrls, ExtCtrls, Buttons; + +type + TIcsDllDemo = function (HostName : PChar; + Port : PChar; + Buffer : PChar; + BufSize : PInteger): Integer; stdcall; + + TDllTestForm = class(TForm) + ToolsPanel: TPanel; + DisplayMemo: TMemo; + HostnameEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + PortEdit: TEdit; + CallDllButton: TButton; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure CallDllButtonClick(Sender: TObject); + procedure FormDestroy(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + public + procedure Display(Msg : String); + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + DllTestForm : TDllTestForm; + DllHandle : THandle; + IcsDllDemo : TIcsDllDemo; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.FormDestroy(Sender: TObject); +begin + if DllHandle <> 0 then begin + FreeLibrary(DllHandle); + DllHandle := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + IniFile.Destroy; + DisplayMemo.Clear; + + DllHandle := LoadLibrary('IcsDLL1.dll'); + if DllHandle = 0 then begin + Application.MessageBox('ICSDLL1.DLL not found', 'Error', MB_OK); + Application.Terminate; + Exit; + end; + + IcsDllDemo := GetProcAddress(DllHandle, 'IcsDllDemo'); + if @IcsDllDemo = nil then begin + Application.MessageBox('IcsDllDemo not found (ICSDLL1.DLL)', + 'Error', MB_OK); + Application.Terminate; + Exit; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.Display(Msg : String); +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + while DisplayMemo.Lines.Count > 200 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.CallDllButtonClick(Sender: TObject); +var + Buffer : String; + BufSize : Integer; + Status : Integer; +begin + Display('Calling DLL...'); + BufSize := 100; + SetLength(Buffer, BufSize); + Status := IcsDllDemo(PChar(HostnameEdit.Text), + PChar(PortEdit.Text), + @Buffer[1], @BufSize); + SetLength(Buffer, BufSize); + if Status <> 0 then + Display('Error #' + IntToStr(Status)); + Display(Buffer); + Display('Done with DLL'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/DnsLook1.dfm b/lib/Delphi/Internet/DnsLook1.dfm new file mode 100644 index 00000000..ab250fa8 Binary files /dev/null and b/lib/Delphi/Internet/DnsLook1.dfm differ diff --git a/lib/Delphi/Internet/DnsLook1.pas b/lib/Delphi/Internet/DnsLook1.pas new file mode 100644 index 00000000..fb0db92a --- /dev/null +++ b/lib/Delphi/Internet/DnsLook1.pas @@ -0,0 +1,165 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstrate how to use TWSocket to asynchroneously resolve a + host name to an IP address. +Creation: October 29, 1997 +Version: 1.05 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Oct 30, 1997 V1.01 Made the code compatible with Delphi 1. +Oct 31, 1997 V1.02 Added a cancel button +jan 31, 1998 V1.03 Added a scroll bar. Display addresses count +Aug 03, 1998 V1.04 Added reverse DNS lookup +Mar 13, 1999 V1.05 Added a button to get local ip list + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit DnsLook1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WinSock, WSocket, StdCtrls; + +const + DNSLookVersion = 105; + +type + TDnsLookupForm = class(TForm) + WSocket1: TWSocket; + HostEdit: TEdit; + Label1: TLabel; + IPLabel: TLabel; + LookupButton: TButton; + CancelButton: TButton; + IPListMemo: TMemo; + ReverseLookupButton: TButton; + LocalIPButton: TButton; + procedure FormCreate(Sender: TObject); + procedure LookupButtonClick(Sender: TObject); + procedure WSocket1DnsLookupDone(Sender: TObject; Error: Word); + procedure CancelButtonClick(Sender: TObject); + procedure ReverseLookupButtonClick(Sender: TObject); + procedure LocalIPButtonClick(Sender: TObject); + end; + +var + DnsLookupForm: TDnsLookupForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.FormCreate(Sender: TObject); +begin + IPLabel.Caption := ''; + LookupButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; + HostEdit.Text := LocalHostName; + IPListMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.LookupButtonClick(Sender: TObject); +begin + LookupButton.Enabled := FALSE; { Prevent recursive call } + ReverseLookupButton.Enabled := FALSE; + CancelButton.Enabled := TRUE; { Enable canceling } + HostEdit.SelectAll; { handy for the user } + ActiveControl := HostEdit; { he likes to have the cursor there } + IPLabel.Caption := 'Waiting for DNS...'; + IPListMemo.Clear; + WSocket1.DnsLookup(HostEdit.Text); { Start DnsLookup } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.ReverseLookupButtonClick(Sender: TObject); +begin + LookupButton.Enabled := FALSE; { Prevent recursive call } + ReverseLookupButton.Enabled := FALSE; + CancelButton.Enabled := TRUE; { Enable canceling } + HostEdit.SelectAll; { handy for the user } + ActiveControl := HostEdit; { he likes to have the cursor there } + IPLabel.Caption := 'Waiting for DNS...'; + IPListMemo.Clear; + WSocket1.ReverseDnsLookup(HostEdit.Text); { Start DnsLookup } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.WSocket1DnsLookupDone(Sender: TObject; + Error: Word); +begin + if Error = 0 then begin + IPLabel.Caption := WSocket1.DnsResult + + ' (' + IntToStr(WSocket1.DnsResultList.Count) + + ' addresses)'; + IPListMemo.Lines := WSocket1.DnsResultList; + end + else + IPLabel.Caption := 'NOT FOUND, ERROR #' + IntToStr(Error); + LookupButton.Enabled := TRUE; + ReverseLookupButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.CancelButtonClick(Sender: TObject); +begin + IPLabel.Caption := ''; + LookupButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; + ActiveControl := HostEdit; + WSocket1.CancelDnsLookup; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.LocalIPButtonClick(Sender: TObject); +begin + IPListMemo.Lines := LocalIPList; + if LocalIPList.Count > 0 then + HostEdit.Text := LocalIPList.Strings[0]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/DynCli.dpr b/lib/Delphi/Internet/DynCli.dpr new file mode 100644 index 00000000..0264d090 --- /dev/null +++ b/lib/Delphi/Internet/DynCli.dpr @@ -0,0 +1,12 @@ +program DynCli; + +uses + Forms, + DynCli1 in 'DynCli1.pas' {DynCliForm}; + +{$R *.RES} + +begin + Application.CreateForm(TDynCliForm, DynCliForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/DynCli1.dfm b/lib/Delphi/Internet/DynCli1.dfm new file mode 100644 index 00000000..c9945af3 Binary files /dev/null and b/lib/Delphi/Internet/DynCli1.dfm differ diff --git a/lib/Delphi/Internet/DynCli1.pas b/lib/Delphi/Internet/DynCli1.pas new file mode 100644 index 00000000..e0584bb4 --- /dev/null +++ b/lib/Delphi/Internet/DynCli1.pas @@ -0,0 +1,167 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Sample program to show how to dynamically create a TWSocket. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + francois.piette@swing.be + http://www.rtfm.be/fpiette +Creation: October 02, 1999 +Version: 1.01 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1999-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit DynCli1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, WSocket; + +type + TDynCliForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + Label1: TLabel; + HostnameEdit: TEdit; + PortEdit: TEdit; + Label2: TLabel; + ConnectButton: TButton; + DisconnectButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + private + FWSocket : TWSocket; + FRcvBuf : String; + procedure FWSocketSessionConnected(Sender: TObject; Error: Word); + procedure FWSocketSessionClosed(Sender: TObject; Error: Word); + procedure FWSocketDataAvailable(Sender: TObject; Error: Word); + public + { Dclarations publiques } + end; + +var + DynCliForm: TDynCliForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: String; NewLength: Integer); +begin + S[0] := Chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDynCliForm.ConnectButtonClick(Sender: TObject); +begin + if Assigned(FWSocket) then + FWSocket.Release; { This will close connection as needed } + { Create a new TWSocket and initialize all needed properties and events } + FWSocket := TWSocket.Create(Self); + FWSocket.Proto := 'tcp'; + FWSocket.Port := PortEdit.Text; + FWSocket.Addr := HostnameEdit.Text; + FWSocket.LineMode := TRUE; + FWSocket.LineEnd := #13#10; + FWSocket.OnSessionConnected := FWSocketSessionConnected; + FWSocket.OnSessionClosed := FWSocketSessionClosed; + FWSocket.OnDataAvailable := FWSocketDataAvailable; + try + FWSocket.Connect; + except + { Connect may fail because of invalid parameters and will trigger } + { an exception. } + on E:Exception do begin + DisplayMemo.Lines.Add('Unabled to connect: ' + + E.ClassName + ': ' + E.Message); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDynCliForm.DisconnectButtonClick(Sender: TObject); +begin + if Assigned(FWSocket) then + FWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDynCliForm.FWSocketSessionConnected(Sender: TObject; Error: Word); +begin + if Error <> 0 then + DisplayMemo.Lines.Add('Can''t connect. Error #' + IntToStr(Error)) + else + DisplayMemo.Lines.Add('Session connected.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDynCliForm.FWSocketSessionClosed(Sender: TObject; Error: Word); +begin + DisplayMemo.Lines.Add('Session closed.'); + { Destroy the socket. We can't use Destroy here because we are in } + { an event handler. We need to use Release which will delay destruction } + { until we are out of the event handler. } + FWSocket.Release; + FWSocket := nil; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDynCliForm.FWSocketDataAvailable(Sender: TObject; Error: Word); +begin + { Remember: we use line mode. We will always receive complete lines } + with Sender as TWSocket do + FRcvBuf := ReceiveStr; + { Remove trailing CR/LF, if any } + if (Length(FRcvBuf) > 1) and + (FRcvBuf[Length(FRcvBuf)] = #10) and + (FRcvBuf[Length(FRcvBuf) - 1] = #13) then + SetLength(FRcvBuf, Length(FRcvBuf) - 2); + { Display received line } + DisplayMemo.Lines.Add(FRcvBuf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/FTPTST2.dfm b/lib/Delphi/Internet/FTPTST2.dfm new file mode 100644 index 00000000..13389721 Binary files /dev/null and b/lib/Delphi/Internet/FTPTST2.dfm differ diff --git a/lib/Delphi/Internet/FtpServ1.dfm b/lib/Delphi/Internet/FtpServ1.dfm new file mode 100644 index 00000000..17c59ffe Binary files /dev/null and b/lib/Delphi/Internet/FtpServ1.dfm differ diff --git a/lib/Delphi/Internet/FtpServ1.pas b/lib/Delphi/Internet/FtpServ1.pas new file mode 100644 index 00000000..0f081a27 --- /dev/null +++ b/lib/Delphi/Internet/FtpServ1.pas @@ -0,0 +1,842 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This is a demo program showing how to use the TFtpServer + component to build a FTP server. + Waring: As this demo is writtent, full access is given to all + users to all files accessible by the computer running the demo. + In production program, you should add code to implement + security issues. +Creation: April 21, 1998 +Version: 1.06 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Apr 29, 1998 V0.90 Released for beta testing. +Apr 30, 1998 V0.91 Added an example of virtual file (see the code for + FtpServer1RetrSessionConnected. +May 01, 1998 V0.92 Adapted for Delphi 1.0 +May 03, 1998 V0.93 Adapted for Delphi 2.0 and C++Builder +May 04, 1998 V0.94 Added tools menu. +Jul 09, 1998 V1.00 Adapted for Delphi 4, removed beta status. +Jul 21, 1998 V1.01 Show how to refuse a client in OnClientConnected +Oct 25, 2000 V1.02 Added "List Clients" menu item and coding. +Jun 18, 2001 V1.03 Display version informations +Jul 30, 2001 V1.04 Add Trim function for Delphi 1 +Feb 26, 2002 V1.05 Add DisconectAll in main menu +Jun 07, 2002 V1.06 Added a processing thread (not for Delphi 1) for Get + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpServ1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, FtpSrv, FtpSrvC, WSocket, StdCtrls, ExtCtrls, Menus, + Winsock; + +const + FtpServVersion = 106; + CopyRight : String = ' FtpServer (c) 1998-2002 F. Piette V1.06 '; + WM_APPSTARTUP = WM_USER + 1; + +type + TLogMsg = class(TComponent) + public + procedure Text(Prefix : Char; Msg : String); + end; + +{$IFNDEF VER80} { Not for Delphi 1, sorry } + TGetProcessingThread = class; { Forward declaration } + { We use our own client class to hold our thread } + TMyClient = class(TFtpCtrlSocket) + private + FWorkerThread : TGetProcessingThread; + end; + + TGetProcessingThread = class(TThread) + protected + Server : TFtpServer; + Client : TMyClient; + public + procedure Execute; override; + end; +{$ENDIF} + + TFtpServerForm = class(TForm) + FtpServer1: TFtpServer; + InfoMemo: TMemo; + Panel1: TPanel; + StartMinimizedCheckBox: TCheckBox; + MainMenu1: TMainMenu; + File1: TMenuItem; + MnuStartServer: TMenuItem; + MnuStopServer: TMenuItem; + MnuQuit: TMenuItem; + N1: TMenuItem; + About1: TMenuItem; + GreenImage: TImage; + ClientCountLabel: TLabel; + RedImage: TImage; + Tools1: TMenuItem; + Cleardisplay1: TMenuItem; + MnuListClients: TMenuItem; + N2: TMenuItem; + DisconnectAllMnu: TMenuItem; + procedure FormCreate(Sender: TObject); + procedure FtpServer1ClientConnect(Sender: TObject; + Client: TFtpCtrlSocket; Error: Word); + procedure FtpServer1ClientDisconnect(Sender: TObject; + Client: TFtpCtrlSocket; Error: Word); + procedure FtpServer1Start(Sender: TObject); + procedure FtpServer1Stop(Sender: TObject); + procedure FtpServer1ClientCommand(Sender: TObject; + Client: TFtpCtrlSocket; var Keyword, Params, Answer: TFtpString); + procedure FtpServer1StorSessionConnected(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); + procedure FtpServer1StorSessionClosed(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); + procedure FtpServer1RetrDataSent(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); + procedure FtpServer1RetrSessionConnected(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); + procedure FtpServer1RetrSessionClosed(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FtpServer1AnswerToClient(Sender: TObject; + Client: TFtpCtrlSocket; var Answer: TFtpString); + procedure FtpServer1Authenticate(Sender: TObject; + Client: TFtpCtrlSocket; UserName, Password: TFtpString; + var Authenticated: Boolean); + procedure FtpServer1ChangeDirectory(Sender: TObject; + Client: TFtpCtrlSocket; Directory: TFtpString; var Allowed: Boolean); + procedure MnuQuitClick(Sender: TObject); + procedure MnuStopServerClick(Sender: TObject); + procedure MnuStartServerClick(Sender: TObject); + procedure ImagesDblClick(Sender: TObject); + procedure FtpServer1BuildDirectory(Sender: TObject; + Client: TFtpCtrlSocket; var Directory: TFtpString; Detailed: Boolean); + procedure FtpServer1AlterDirectory(Sender: TObject; + Client: TFtpCtrlSocket; var Directory: TFtpString; Detailed: Boolean); + procedure Cleardisplay1Click(Sender: TObject); + procedure MnuListClientsClick(Sender: TObject); + procedure DisconnectAllMnuClick(Sender: TObject); + procedure FtpServer1GetProcessing(Sender: TObject; + Client: TFtpCtrlSocket; var DelayedSend : Boolean); + private + FInitialized : Boolean; + FIniFileName : String; + FPort : String; + FXTop : Integer; + FXLeft : Integer; + FXWidth : Integer; + FXHeight : Integer; + procedure WMAppStartup(var msg: TMessage); message WM_APPSTARTUP; + procedure LoadConfig; + procedure SaveConfig; + procedure StartServer; + procedure StopServer; + procedure UpdateClientCount; +{$IFNDEF VER80} + procedure WorkerThreadTerminated(Sender : TObject); +{$ENDIF} + end; + +var + FtpServerForm: TFtpServerForm; + Log : TLogMsg; + +implementation + +{$R *.DFM} + +const + MainTitle = 'FTP Server - http://www.overbyte.be'; + + { Ini file layout } + SectionData = 'Data'; + KeyPort = 'Port'; + + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + KeyMinim = 'RunMinimized'; + + STATUS_GREEN = 0; + STATUS_YELLOW = 1; + STATUS_RED = 2; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TLogMsg.Text(Prefix : Char; Msg : String); +begin +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] in [' ', #9]) do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + Minim : Integer; +begin + if not FInitialized then begin + FInitialized := TRUE; + Caption := 'Starting ' + MainTitle; + Left := -Width; + + IniFile := TIniFile.Create(FIniFileName); + FXTop := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + FXLeft := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + FXWidth := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + FXHeight := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Minim := IniFile.ReadInteger(SectionWindow, KeyMinim, 0); + + IniFile.Free; + + LoadConfig; + SaveConfig; { Create the inifile keys if they don't exists } + + { Be sure to always have the window visible } + { with a reasonable width and height } + if FXLeft < 0 then + FXLeft := 0; + if FXTop < 0 then + FXTop := 0; + if FXWidth < 310 then + FXWidth := 310; + if FXHeight <= 250 then + FXHeight := 250; + if (FXLeft + FXWidth) > Screen.Width then + FXLeft := Screen.Width - FXWidth; + if (FXTop + FXHeight) > Screen.Height then + FXTop := Screen.Height - FXHeight; + + StartMinimizedCheckBox.Checked := (Minim <> 0); + + { We use a custom message to initialize things once the form } + { is visible } + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; + Minim : Integer; +begin + try + StopServer; + Minim := ord(StartMinimizedCheckBox.Checked); + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteInteger(SectionWindow, KeyMinim, Minim); + IniFile.WriteString(SectionData, KeyPort, FPort); + IniFile.Free; + except + { Ignore any exception when we are closing } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.LoadConfig; +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + FPort := IniFile.ReadString(SectionData, KeyPort, 'ftp'); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.SaveConfig; +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyPort, FPort); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This message handler is triggered by the FormShow event. We comes here } +{ only when the form is visible on screen. } +procedure TFtpServerForm.WMAppStartup(var msg: TMessage); +var + PrvWnd : HWND; + Buf : String; +begin + if StartMinimizedCheckBox.Checked then + Application.Minimize; + Top := FXTop; + Left := FXLeft; + Width := FXWidth; + Height := FXHeight; + + { Prevent the server from running twice } + Buf := ClassName + #0; + PrvWnd := FindWindow(@Buf[1], MainTitle); + if PrvWnd <> 0 then begin + Log.Text('E', 'Server already running. Shutdown.'); + Close; + Exit; + end; + Caption := MainTitle; + Update; { It's nice to have the form completely displayed } + + StartServer; + UpdateClientCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF VER80 } +{ To debug event driven programs, it is often handy to just use writeln to } +{ write debug messages to the console. To get a console, just ask the } +{ linker to build a console mode application. Then you'll get the default } +{ console. The function below will make it the size you like... } +procedure BigConsole(nCols, nLines : Integer); +var + sc : TCoord; + N : DWord; +begin + if not IsConsole then + Exit; + sc.x := nCols; + sc.y := nLines; + SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), sc); + SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), + BACKGROUND_BLUE or BACKGROUND_GREEN or + BACKGROUND_RED or BACKGROUND_INTENSITY); + sc.x := 0; + sc.y := 0; + FillConsoleOutputAttribute(GetStdHandle(STD_OUTPUT_HANDLE), + BACKGROUND_BLUE or BACKGROUND_GREEN or + BACKGROUND_RED or BACKGROUND_INTENSITY, + nCols * nLines, sc, N); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FormCreate(Sender: TObject); +begin + { Build Ini file name } + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + { Create the Log object } + Log := TLogMsg.Create(Self); + +{$IFNDEF VER80} +{ BigConsole(80, 100); } +{$ENDIF} + InfoMemo.Clear; + GreenImage.Visible := FALSE; + RedImage.Visible := TRUE; + RedImage.Top := GreenImage.Top; + RedImage.Left := GreenImage.Left; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.StartServer; +var + wsi : TWSADATA; +begin + GreenImage.Visible := FALSE; + RedImage.Visible := TRUE; + Update; + + { Display version info for program and use components } + wsi := WinsockInfo; + InfoMemo.Lines.Add(Trim(CopyRight)); + InfoMemo.Lines.Add('Using:'); + InfoMemo.Lines.Add(' ' + WSocket.CopyRight); + InfoMemo.Lines.Add(' ' + FtpSrv.CopyRight); + InfoMemo.Lines.Add(' Winsock:'); + InfoMemo.Lines.Add(' Version ' + + Format('%d.%d', [WinsockInfo.wHighVersion shr 8, + WinsockInfo.wHighVersion and 15])); + InfoMemo.Lines.Add(' ' + StrPas(@wsi.szDescription)); + InfoMemo.Lines.Add(' ' + StrPas(@wsi.szSystemStatus)); +{$IFNDEF VER100} + { A bug in Delphi 3 makes lpVendorInfo invalid } + if wsi.lpVendorInfo <> nil then + InfoMemo.Lines.Add(' ' + StrPas(wsi.lpVendorInfo)); +{$ENDIF} +{$IFNDEF VER80} + { If not running 16 bits, we use our own client class } + FtpServer1.ClientClass := TMyClient; +{$ENDIF} + FtpServer1.Start; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.StopServer; +begin + FtpServer1.Stop; + FtpServer1.DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.MnuQuitClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.MnuStopServerClick(Sender: TObject); +begin + StopServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.MnuStartServerClick(Sender: TObject); +begin + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.ImagesDblClick(Sender: TObject); +begin + if FtpServer1.Active then + StopServer + else + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.UpdateClientCount; +begin + if FtpServer1.ClientCount = 0 then + ClientCountLabel.Caption := 'No user' + else + ClientCountLabel.Caption := IntToStr(FtpServer1.ClientCount) + ' users'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1ClientConnect(Sender: TObject; + Client: TFtpCtrlSocket; Error: Word); +begin + { The next test shows how to refuse a client } + if Client.GetPeerAddr = '193.121.12.25' then begin + Client.SendStr('421 Connection not allowed.' + #13#10); + Client.Close; + Exit; + end; + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + ' connected'); + UpdateClientCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1ClientDisconnect(Sender: TObject; + Client: TFtpCtrlSocket; Error: Word); +begin + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + ' disconnected'); + UpdateClientCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1Start(Sender: TObject); +begin + GreenImage.Visible := TRUE; + RedImage.Visible := FALSE; + InfoMemo.Lines.Add('! Server started'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1Stop(Sender: TObject); +begin + GreenImage.Visible := FALSE; + RedImage.Visible := TRUE; + InfoMemo.Lines.Add('! Server stopped'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1StorSessionConnected(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); +begin + if Error <> 0 then + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' Data session failed to open. Error #' + + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1StorSessionClosed(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); +begin + if Error <> 0 then + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' Data session closed. Error #' + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1RetrDataSent(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); +begin + if Error <> 0 then + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' Data sent. Error #' + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the data session for a get file has } +{ been opened. This is a good place build a file or a stream if the data } +{ requested is not already stored in a file on the file system. } +{ This feature is very powerfull and enable the FTP protocol to be used to } +{ retrieve any kind of data. It this sample, we just check for C:\VIRTUAL } +{ directory. If this directory is curent, then a TMemoryStream is created } +{ on the fly with some data. If another directory is selected, the FTP } +{ server works as any other: just send the requested file, if it exist ! } +{ This event handler is also a place where you can abort the file transfer. } +{ Simply trigger an exception and transfer will not take place. } +{ Note that if you just wants to prohibe access to some directory or file, } +{ the best place to code that is in the OnValidateGet or OnValidatePut } +{ event handlers. } +procedure TFtpServerForm.FtpServer1RetrSessionConnected(Sender: TObject; + Client : TFtpCtrlSocket; + Data : TWSocket; + Error : Word); +var + Buf : String; +begin + if Error <> 0 then + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' Data session connected. Error #' + IntToStr(Error)) + else if Copy(UpperCase(Client.FilePath), 1, 19) = 'C:\VIRTUAL\FORBIDEN' then + raise Exception.Create('Access prohibed !') + else if Copy(UpperCase(Client.FilePath), 1, 11) = 'C:\VIRTUAL\' then begin + InfoMemo.Lines.Add('! VIRTUAL FILE'); + Client.UserData := 1; { Remember we created a stream } + if Assigned(Client.DataStream) then + Client.DataStream.Destroy; { Prevent memory leaks } + Client.DataStream := TMemoryStream.Create; + Buf := 'This is a file created on the fly by the FTP server' + #13#10 + + 'It could result of a query to a database or anything else.' + #13#10 + + 'The request was: ''' + Client.FilePath + '''' + #13#10; + Client.DataStream.Write(Buf[1], Length(Buf)); + Client.DataStream.Seek(0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1RetrSessionClosed(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); +begin + if Error <> 0 then + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' Data session closed. Error #' + IntToStr(Error)); + if Client.UserData = 1 then begin + { We created a stream for a virtual file or dir. Delete the TStream } + if Assigned(Client.DataStream) then begin + { There is no reason why we should not come here, but who knows ? } + Client.DataStream.Destroy; + Client.DataStream := nil; + end; + Client.UserData := 0; { Reset the flag } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the FTP component needs to build a } +{ directory listing. You can just return without doing anything then the } +{ component will build the directory for you, based on the actual disk } +{ content. But you can also build your own directory listing with anything } +{ you like in it. Just create a stream with the required content. The } +{ example below construct a virtual directory when the user is on the } +{ C:\VIRTUAL subdirectory (use elsewhere in this sample program). } +procedure TFtpServerForm.FtpServer1BuildDirectory( + Sender : TObject; + Client : TFtpCtrlSocket; + var Directory : TFtpString; + Detailed : Boolean); +var + Buf : String; +begin + if UpperCase(Client.Directory) <> 'C:\VIRTUAL\' then + Exit; + InfoMemo.Lines.Add('! VIRTUAL DIR'); + Client.UserData := 1; { Remember we created a stream } + if Assigned(Client.DataStream) then + Client.DataStream.Destroy; { Prevent memory leaks } + Client.DataStream := TMemoryStream.Create; + if Detailed then + { We need to format directory lines according to the Unix standard } + Buf := + '-rwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 FORBIDEN' + #13#10 + + '-rwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 TEST' + #13#10 + + 'drwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 SOME DIR' + #13#10 + else + Buf := 'FORBIDEN' + #13#10 + + 'TEST' + #13#10; + Client.DataStream.Write(Buf[1], Length(Buf)); + Client.DataStream.Seek(0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by the FTP component once it has built the } +{ directory listing. We can use this handler to alter the listing, adding } +{ or removing some info. This sample add the 'virtual' directory. } +procedure TFtpServerForm.FtpServer1AlterDirectory( + Sender : TObject; + Client : TFtpCtrlSocket; + var Directory : TFtpString; + Detailed : Boolean); +var + Buf : String; +begin + if UpperCase(Client.Directory) <> 'C:\' then + Exit; + { Add our 'virtual' directory to the list } + if Detailed then begin + { We need to format directory lines according to the Unix standard } + Buf := + 'drwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 VIRTUAL' + #13#10; + Client.DataStream.Write(Buf[1], Length(Buf)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1ClientCommand(Sender: TObject; + Client: TFtpCtrlSocket; var Keyword, Params, Answer: TFtpString); +begin + InfoMemo.Lines.Add('< ' + Client.GetPeerAddr + ' ' + + Keyword + ' ' + Params); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1AnswerToClient(Sender: TObject; + Client: TFtpCtrlSocket; var Answer: TFtpString); +begin + InfoMemo.Lines.Add('> ' + Client.GetPeerAddr + ' ' + Answer) +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1Authenticate(Sender: TObject; + Client: TFtpCtrlSocket; UserName, Password: TFtpString; + var Authenticated: Boolean); +begin + { You should place here the code needed to authenticate the user. } + { For example a text file with all permitted username/password. } + { If the user can't be authenticated, just set Authenticated to } + { false before returning. } + { It is also the right place to setup Client.HomeDir } + { If you need to store info about the client for later processing } + { you can use Client.UserData to store a pointer to an object or } + { a record with the needed info. } + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' User ''' + UserName + ''' is authenticated'); + if Password = 'bad' then + Authenticated := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1ChangeDirectory(Sender: TObject; + Client: TFtpCtrlSocket; Directory: TFtpString; var Allowed: Boolean); +begin +{$IFDEF NEVER} + { It the right place to check if a user has access to a given directory } + { The example below disable C:\ access to non root user. } + if (UpperCase(Client.UserName) <> 'ROOT') and + (UpperCase(Client.Directory) = 'C:\') then + Allowed := FALSE; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.Cleardisplay1Click(Sender: TObject); +begin + InfoMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.MnuListClientsClick(Sender: TObject); +var + I : Integer; +begin + if FtpServer1.ClientCount <= 0 then begin + InfoMemo.Lines.Add('No client'); + Exit; + end; + + for I := 0 to FtpServer1.ClientCount - 1 do begin + InfoMemo.Lines.Add('Client ' + IntToStr(I + 1) + ': ' + + FtpServer1.Client[I].GetPeerAddr + '/' + + FtpServer1.Client[I].GetPeerPort); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.DisconnectAllMnuClick(Sender: TObject); +begin + FtpServer1.DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} { Sorry, Delphi 1 doesn't support multi-threading } +procedure TFtpServerForm.FtpServer1GetProcessing( + Sender : TObject; + Client : TFtpCtrlSocket; + var DelayedSend : Boolean); +begin + { Nothing to do here... } +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF VER80} { 32 bits support multi-threading } +procedure TFtpServerForm.FtpServer1GetProcessing( + Sender : TObject; + Client : TFtpCtrlSocket; + var DelayedSend : Boolean); +var + MyServer : TFtpServer; + MyClient : TMyClient; +begin + MyServer := Sender as TFtpServer; + MyClient := Client as TMyClient; + { If client request a *.ZZZ file, then start a thread to do some } + { processing (here the thread just sleep 10 sec to show other clients } + { are not blocked. } + if UpperCase(ExtractFileExt(MyClient.FileName)) = '.ZZZ' then begin + MyClient.FWorkerThread := TGetProcessingThread.Create(TRUE); + MyClient.FWorkerThread.Server := MyServer; + MyClient.FWorkerThread.Client := MyClient; + MyClient.FWorkerThread.FreeOnTerminate := TRUE; + MyClient.FWorkerThread.OnTerminate := WorkerThreadTerminated; + MyClient.FWorkerThread.Resume; + { Ask server component to not start sending immediately } + { We will ask to start sending from WorkerThreadTerminated event } + DelayedSend := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.WorkerThreadTerminated(Sender : TObject); +var + MyThread : TGetProcessingThread; +begin + MyThread := Sender as TGetProcessingThread; + MyThread.Server.DoStartSendData(MyThread.Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetProcessingThread.Execute; +begin + Sleep(10000); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + diff --git a/lib/Delphi/Internet/FtpThrd1.dfm b/lib/Delphi/Internet/FtpThrd1.dfm new file mode 100644 index 00000000..278ad694 Binary files /dev/null and b/lib/Delphi/Internet/FtpThrd1.dfm differ diff --git a/lib/Delphi/Internet/FtpThrd1.pas b/lib/Delphi/Internet/FtpThrd1.pas new file mode 100644 index 00000000..eafc23a4 --- /dev/null +++ b/lib/Delphi/Internet/FtpThrd1.pas @@ -0,0 +1,168 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE + Used code from Frank Neuhaus . +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Creation: December 22, 1998 +Version: 1.00 +Object: Demo for threaded TFtpCli use (not the best way to use the + component, but some like to use threads). +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +Updates: + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpThrd1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + ExtCtrls, StdCtrls; + +type + TThrdFtpForm = class(TForm) + ListBox1: TListBox; + Panel1: TPanel; + StartButton: TButton; + SaveButton: TButton; + procedure StartButtonClick(Sender: TObject); + procedure SaveButtonClick(Sender: TObject); + end; + + TTransferThread = class(TThread) + private + FMsg : String; + public + constructor CreateThread; + procedure AddToListBox; + procedure Display(Msg: String); + procedure CliDisplay(Sender: TObject; var Msg: String); + procedure Execute ; override; + end; + +var + ThrdFtpForm: TThrdFtpForm; + +implementation +{$R *.DFM} + +uses + FtpCli; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TThrdFtpForm.StartButtonClick(Sender: TObject); +begin + TTransferThread.CreateThread; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TThrdFtpForm.SaveButtonClick(Sender: TObject); +begin + ListBox1.Items.SaveToFile('FtpThrd.Log'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTransferThread.CreateThread; +begin + FreeOnTerminate := TRUE; + inherited Create(FALSE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTransferThread.Execute; +var + FtpClient1 : TFtpClient; +begin + FtpClient1 := TFtpClient.Create(nil); + FtpClient1.OnDisplay := CliDisplay; + FtpClient1.OnProgress := nil; + FtpClient1.OnRequestDone := nil; + FtpClient1.OnSessionConnected := nil; + FtpClient1.OnSessionClosed := nil; + FtpClient1.OnStateChange := nil; + FtpClient1.Multithreaded := TRUE; + FtpClient1.Timeout := 60; // default is 15 + + FtpClient1.HostName := 'localhost'; + FtpClient1.Port := 'ftp'; + FtpClient1.UserName := 'fpiette'; + FtpClient1.Password := 'fp'; + FtpClient1.DisplayFileFlag := TRUE; + FtpClient1.LocalFileName := 'c:\temp\data1.txt'; + FtpClient1.HostDirName := 'c:\temp'; + FtpClient1.HostFileName := 'tofile.txt'; + + if not FtpClient1.Connect then begin + Display('Connect failed'); + FtpClient1.Abort; + Exit; + end; + if not FtpClient1.Put then begin + Display('Put failed'); + FtpClient1.Abort; + Exit; + end; + if not FtpClient1.Quit then begin + Display('Quit failed'); + FtpClient1.Abort; + Exit; + end; + Display('Finished ok.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTransferThread.CliDisplay(Sender: TObject; var Msg: String); +begin + Display(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTransferThread.Display(Msg : String); +begin + FMsg := Msg; + Synchronize(AddToListBox); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTransferThread.AddToListBox; +begin + ThrdFtpForm.ListBox1.Items.Add(FMsg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/Ftptst2.pas b/lib/Delphi/Internet/Ftptst2.pas new file mode 100644 index 00000000..2a390e63 --- /dev/null +++ b/lib/Delphi/Internet/Ftptst2.pas @@ -0,0 +1,25 @@ +unit FtpTst2; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls; + +type + TDirectoryForm = class(TForm) + DirListBox: TListBox; + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + DirectoryForm: TDirectoryForm; + +implementation + +{$R *.DFM} + +end. diff --git a/lib/Delphi/Internet/HLembke/NsLook1.dfm b/lib/Delphi/Internet/HLembke/NsLook1.dfm new file mode 100644 index 00000000..2570bd4a Binary files /dev/null and b/lib/Delphi/Internet/HLembke/NsLook1.dfm differ diff --git a/lib/Delphi/Internet/HLembke/NsLook1.pas b/lib/Delphi/Internet/HLembke/NsLook1.pas new file mode 100644 index 00000000..94187537 --- /dev/null +++ b/lib/Delphi/Internet/HLembke/NsLook1.pas @@ -0,0 +1,322 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: NsLookup +Description: Demo for DnsQuery ICS component. +Author: Franois Piette +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: January 29, 1999 +Version: 1.02 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Feb 27, 1999 V1.01 Added PTR lookup (reverse DNS lookup) +Mar 07, 1999 V1.02 Adapted for Delphi 1 + +Aug 11, 2002 V1.99 Modified for new TDnsQuery-Oject + all changed lines have been commented with a //!!KAP!! + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit NsLook1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, WinSock, DnsQuery, StdCtrls, ExtCtrls, Buttons; + +type + TNsLookupForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + DnsEdit: TEdit; + NameEdit: TEdit; + MXLookupButton: TButton; + DnsQuery1: TDnsQuery; + ClearDisplayBitBtn: TBitBtn; + ALookupButton: TButton; + PTRLookupButton: TButton; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure MXLookupButtonClick(Sender: TObject); + procedure DnsQuery1RequestDone(Sender: TObject; Error: Word); + procedure ClearDisplayBitBtnClick(Sender: TObject); + procedure ALookupButtonClick(Sender: TObject); + procedure PTRLookupButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FRequestID : Integer; + procedure Display(Msg : String); + procedure DumpDnsResponse; + public + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + NsLookupForm: TNsLookupForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyName = 'Name'; + KeyDns = 'Dns'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + NameEdit.Text := IniFile.ReadString(SectionData, KeyName, 'inprise.com'); + DnsEdit.Text := IniFile.ReadString(SectionData, KeyDns, '193.121.171.135'); + DisplayMemo.Clear; + IniFile.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyName, NameEdit.Text); + IniFile.WriteString(SectionData, KeyDns, DnsEdit.Text); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.Display(Msg : String); +begin + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Lines.Delete(0); + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.DumpDnsResponse; +var + P : PChar; + I : Integer; + Len : Integer; + Buf : String; +begin + Display('Response dump (' + IntToStr(DnsQuery1.Response.len) + ' bytes):'); //!!KAP!! + P := DnsQuery1.ResponseBuf; + Len := DnsQuery1.Response.Len; //!!KAP!! + Buf := ''; + I := 0; + while I < Len do begin + if P^ in [' '..'~'] then + Buf := Buf + P^ + else + Buf := Buf + '<' + IntToStr(Ord(P^)) + '>'; + Inc(I); + Inc(P); + if (I mod 16) = 0 then begin + Display(' ' + Buf); + Buf := ''; + end; + end; + if Length(Buf) > 0 then + Display(' ' + Buf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.DnsQuery1RequestDone(Sender: TObject; Error: Word); +var + I : Integer; + nIndex : Integer; +begin + if Error <> 0 then begin + Display('Error #' + IntToStr(Error)); + Exit; + end; + // !!KAP!! start of changes + //!!KAP!! added lots of '.'... + Display('ID : ' + IntToStr(DnsQuery1.Response.ID)); + Display('ResponseCode : ' + IntToStr(DnsQuery1.Response.rCode)); //!!KAP!! added ..r + Display('OpCode : ' + IntToStr(DnsQuery1.Response.OpCode)); + Display('Authoritative : ' + IntToStr(Ord(DnsQuery1.Response.AuthoritativeAnswer))); //!!KAP!! added ..Answer + Display('Truncation : ' + IntToStr(Ord(DnsQuery1.Response.Truncation))); + Display('RecursionAvailable : ' + IntToStr(Ord(DnsQuery1.Response.RecursionAvailable))); + Display('QDCount : ' + IntToStr(DnsQuery1.Response.QDCount)); + Display('ANCount : ' + IntToStr(DnsQuery1.Response.ANCount)); + Display('NSCount : ' + IntToStr(DnsQuery1.Response.NSCount)); + Display('ARCount : ' + IntToStr(DnsQuery1.Response.ARCount)); + Display('ResponseLen : ' + IntToStr(DnsQuery1.Response.Len)); + Display('QuestionName : ' + DnsQuery1.Question.QuestionName); //!!KAP!! added Question... + Display('QuestionType : ' + IntToStr(DnsQuery1.Question.QuestionType)); //!!KAP!! added Question... + Display('QuestionClass : ' + IntToStr(DnsQuery1.Question.QuestionClass)); //!!KAP!! added Question... + + + // !!KAP!! new style of access + // Attention: some records only exists, if the appropriated request has been done + // display the Name Server items + Display(''); + for i:=0 to DnsQuery1.ResponseCount[DnsQueryNS]-1 do begin + Display(' Nameserver: '+DnsQuery1.ResponseItem[DnsQueryNS,i].nsdname); + end; + Display(''); + // or the MX records + for i:=0 to DnsQuery1.ResponseCount[DnsQueryMX]-1 do begin + Display(' MailExchange: '+DnsQuery1.ResponseItem[DnsQueryMX,i].mx.exchange); + end; + Display(''); + + // !!KAP!! but possible to loop throu all items + for i:=0 to dnsquery1.ResponseCount[0]-1 do begin + Display('Item for: '+dnsquery1.ResponseItem[0,i].name); + case dnsquery1.ResponseItem[0,i].rrtype of + DnsQueryA : Display(' DnsQueryA: ' + dnsquery1.ResponseItem[0,i].ipnummer); + DnsQueryMD, + DnsQueryMB, + DnsQueryMF : Display(' Answer: ' + dnsquery1.ResponseItem[0,i].madname); + DnsQueryCNAME : Display(' Cname: ' + dnsquery1.ResponseItem[0,i].cname); + DnsQueryMG : Display(' MGMName: ' + dnsquery1.ResponseItem[0,i].mgmname); + DnsQueryMR : Display(' NewName: ' + dnsquery1.ResponseItem[0,i].newname); + DnsQueryPTR : Display(' PTRName: ' + dnsquery1.ResponseItem[0,i].ptrname); + DnsQueryAAAA : Display(' AAAA (ipv6): ' + dnsquery1.ResponseItem[0,i].ip6nummer); + DnsQueryMINFO : Display(' MInfo r: ' + dnsquery1.ResponseItem[0,i].minfo.rmailbx+ + ' MInfo re: ' + dnsquery1.ResponseItem[0,i].minfo.remailbx); + DnsQueryTXT : Display(' TXT: ' + dnsquery1.ResponseItem[0,i].txt); + DnsQueryHINFO : Display(' HInfo: CPU=' + inttostr(dnsquery1.ResponseItem[0,i].hinfo.cpu)+ + ' OS=' + inttostr(dnsquery1.ResponseItem[0,i].hinfo.os)); + DnsQueryNS : Display(' Nameserver: ' + dnsquery1.ResponseItem[0,i].nsdname); + DnsQueryMX : Display(' MailExchange: ' + dnsquery1.ResponseItem[0,i].mx.exchange+ + ' '+ + inttostr(dnsquery1.ResponseItem[0,i].mx.preference)); + end; + end; + Display(''); + // !!KAP!! end of changes + +(* !!KAP!! This type of access is not longer possible + for I := 0 to DnsQuery1.ResponseANCount - 1 do begin + Display('Answer #' + IntToStr(I + 1)); + Display(' AnswerName : ' + DnsQuery1.AnswerName[I]); + Display(' AnswerType : ' + IntToStr(DnsQuery1.AnswerType[I])); + Display(' AnswerClass : ' + IntToStr(DnsQuery1.AnswerClass[I])); + Display(' AnswerTTL : ' + IntToStr(DnsQuery1.AnswerTTL[I])); + nIndex := DnsQuery1.AnswerTag[I]; + if nIndex >= 0 then begin + case DnsQuery1.AnswerType[I] of + DnsQueryMX: + begin + Display(' MXPreference : ' + IntToStr(DnsQuery1.MXPreference[nIndex])); + Display(' MXExchange : ' + DnsQuery1.MXExchange[nIndex]); + end; + DnsQueryA: + begin + Display(' Address : ' + StrPas(inet_ntoa(DnsQuery1.Address[nIndex]))); + end; + DnsQueryPTR: + begin + Display(' Hostname : ' + DnsQuery1.Hostname[nIndex]); + end; + end; + end; + end; +*) + { Dump complete response } + DumpDnsResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.ClearDisplayBitBtnClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.MXLookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.MXLookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.ALookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.ALookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.PTRLookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.PTRLookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/HLembke/NsLookup.dpr b/lib/Delphi/Internet/HLembke/NsLookup.dpr new file mode 100644 index 00000000..914dbc80 --- /dev/null +++ b/lib/Delphi/Internet/HLembke/NsLookup.dpr @@ -0,0 +1,12 @@ +program NsLookup; + +uses + Forms, + NsLook1 in 'NsLook1.pas' {NsLookupForm}; + +{$R *.RES} + +begin + Application.CreateForm(TNsLookupForm, NsLookupForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/HLembke/ReadMe.txt b/lib/Delphi/Internet/HLembke/ReadMe.txt new file mode 100644 index 00000000..254b0198 --- /dev/null +++ b/lib/Delphi/Internet/HLembke/ReadMe.txt @@ -0,0 +1,9 @@ +This HLembke directory contains a revised DnsLookup component +by Holger Lembke and corresponding NsLookup +project. + +This revised DnsLookup component will replace ICS original DnsQuery +component in the future. + +francois.piette@overbyte.be + diff --git a/lib/Delphi/Internet/HLembke/dnsquery.pas b/lib/Delphi/Internet/HLembke/dnsquery.pas new file mode 100644 index 00000000..d747bfc2 --- /dev/null +++ b/lib/Delphi/Internet/HLembke/dnsquery.pas @@ -0,0 +1,1050 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Component to query DNS records. + Implement a subset of RFC 1035 (A and MX records). +Creation: January 29, 1999 +Version: 1.03 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Feb 14, 1999 V0.02 Indirectly call winsock functions using wsocket because + wsocket provide runtime dynamic link instead of loadtime link. + This allows a program to use DnsQuery if it discover that winsock + is installed and still run if winsock is not installed. +Feb 24, 1999 V1.00 Added code for reverse lookup (PTR record). +Mar 07, 1999 V1.01 Adapted for Delphi 1 +Aug 20, 1999 V1.02 Revise compile time option. Adapted for BCB4 +Jul 27, 2001 V1.03 Holger Lembke implemented a few new + queries or propreties (QueryAny, LongLatToDMS, Loc2Geo, Loc) + and related data types. +----------------------------- +Jul 27, 2002 V1.80 Holger Lembke has rewritten major parts + after error corrections, I suggest a jump to 2.01 + + changed almost everything. goal was + - to have a more comprehensive componente + - ease to implemente future DNS extentions/missing records + (future in meaning of this component. not really the dns system.) + + Users from 1.03 and before should be able to adapt code quickly. + - all the response... and question... things moved into a record, so + just add a point after response + - all array-properties are gone. + instead, you have to use a loop to run throu the desired types + + for i:=0 to dnsquery.ResponseCount[DnsQueryNS]-1 do + with dnsquery.ResponseItem[DnsQueryNS,i] do begin + writeln(nsdname); + end; + + Look up in TRRRecord, which record parts are defined for a + specific item. + + To add new records, follow this guidelines: + 1.) define the DNSQuery-Constant + 2.) Define the needed record + only one rule: no dynamic memory allocation + 3.) add it into the case structure in TRRRecord + 4.) add a 'decoder' into GetResponseItem + +Aug 30, 2002 V1.81 fixed a minor error in SubLOCgeo Holger Lembke + +----------------------------- + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit DnsQuery; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$R-} { Disable range checking } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Winsock, WSocket; + +const + DnsQueryVersion = 102; + CopyRight : String = ' TDnsQuery (c) 1999-2000 F. Piette V1.02 '; + + { DNS Classes } + DnsClassIN = 1; { The internet } + DnsClassCS = 2; { The CSNET class (obsolete, used only for examples)} + DnsClassCH = 3; { The CHAOS class } + DnsClassHS = 4; { Hesiod name service } + DnsClassALL = 255; { Any class } + + { Type of query/response a DNS can handle } + DnsQueryA = 1; { A HostAddress } + DnsQueryNS = 2; { NS Authoritative name server } + DnsQueryMD = 3; { MD MailDestination, obsolete, use Mail Exchange } + DnsQueryMF = 4; { MF MailForwarder, obsolete, use Mail Exchange } + DnsQueryCNAME = 5; { CNAME CanonicalName } + DnsQuerySOA = 6; { SOA Start of a Zone of Authority } + DnsQueryMB = 7; { MB MailBox, experimental } + DnsQueryMG = 8; { MG MailGroup, experimental } + DnsQueryMR = 9; { MR MailRename, experimental } + DnsQueryNULL = 10; { NULL Experimental } + DnsQueryWKS = 11; { WKS Well Known Service Description } + DnsQueryPTR = 12; { PTR Domain Name Pointer } + DnsQueryHINFO = 13; { HINFO Host Information } + DnsQueryMINFO = 14; { MINFO Mailbox information } + DnsQueryMX = 15; { MX Mail Exchange } + DnsQueryTXT = 16; { TXT Text Strings } + { !!KAP!! } + DnsQueryRP = 17; // RFC 1183 + DnsQueryAFSDB = 18; // RFC 1183 + DnsQueryX25 = 19; // RFC 1183 + DnsQueryISDN = 20; // RFC 1183 + DnsQueryRT = 21; // RFC 1183 + DnsQueryNSAP = 22; // RFC 1706 + DnsQueryNSAPPTR = 23; + DnsQuerySIG = 24; { see RFC-2065 } + DnsQueryKEY = 25; { see RFC-2065 } + DnsQueryPX = 26; // rfc 1327? + DnsQueryGPOS = 27; { GPOS has the following format: + GPOS } + DnsQueryAAAA = 28; { see IP6 Address } + DnsQueryLOC = 29; (* see RFC-1876 http://rfc.net/rfc1876.html + LOC ( d1 [m1 [s1]] {"N"|"S"} d2 [m2 [s2]] + {"E"|"W"} alt["m"] [siz["m"] [hp["m"] + [vp["m"]]]] ) + *) + DnsQueryNXT = 30; { see RFC-2065 } + + DnsQuerySRV = 33; { see RFC-2052 } + DnsQueryNAPTR = 35; { see RFC-2168 } + DnsQueryKX = 36; + + { Some additional type only allowed in queries } + DnsQueryAXFR = 252; { Transfer for an entire zone } + DnsQueryMAILB = 253; { Mailbox related records (MB, MG or MR) } + DnsQueryMAILA = 254; { MailAgent, obsolete, use MX instead } + DnsQueryALL = 255; { Request ALL records } + + { Opcode field in query flags } + DnsOpCodeQUERY = 0; + DnsOpCodeIQUERY = 1; + DnsOpCodeSTATUS = 2; + +type + TDnsRequestDoneEvent = procedure (Sender : TObject; Error : WORD) of Object; + + TDnsRequestHeader = packed record + ID : WORD; + flags : word; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD; + end; + PDnsRequestHeader = ^TDnsRequestHeader; + + // rfc 1035 p.10 + tname = string[255]; + ttxtstring = string[255]; + tadress = cardinal; //32bit + + // rfc 1035 p.26 + TDnsRequestAnswerHeader = record // + len : integer; + ID : WORD; + qr : boolean; + opcode : byte; + AuthoritativeAnswer : boolean; + Truncation : boolean; + RecursionDesired : boolean; + RecursionAvailable : boolean; + z : byte; + rcode : byte; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD; + end; + + // rfc 1035 p.19 + TSoaRecord = record + mname : tname; + rname : tname; + serial : Cardinal; + refresh : Cardinal; + retry : Cardinal; + expire : Cardinal; + minimum : Cardinal; + end; + + // rfc 1876 + TLOCInfo = packed record { need to be 16 bytes } + version : byte; + size : byte; + horizpre : byte; + vertpre : byte; + latitude : longint; + longitude : longint; + altitude : longint; + end; + PLOCInfo = ^TLOCInfo; + + // RFC 1886 p.2 + TAAAA = array[0..3] of Cardinal; // 128 bit + + { Decoded TLOCInfo } + TLogGeo = record + version : byte; + longsize : integer; + latsize : integer; + horizpre : integer; + vertpre : integer; + { Latitude, degree, minutes, seconds, milliseconds } + lad, lam, las, lams : integer; + lahem : char; + { same for Longitude } + lod, lom, los, loms : integer; + lohem : char; + altitude : integer; + end; + + // Question Data rfc1035 p.28 + TQuestion = record + QuestionType : word; + QuestionClass : word; + QuestionName : tname; + end; + + // rfc 1035 p.14 + THinfo = packed record + cpu : word; + os : word; + end; + + // rfc 1035 p.16 + TMinfo = packed record + rmailbx : tname; + remailbx : tname; + end; + + // rfc 1035 p.17 + TMX = record + preference : word; + exchange : tname; + end; + + // rfc 1035 p.10 + TRRInternal = packed record + rrtype : word; // r due to token conflict + rrclass : word; // same + rrttl : cardinal; // same + rdlength : word; + end; + pRRInternal = ^TRRInternal; + + // Result-Record + TRRRecord = packed record + valid : boolean; + + // internal for caching + lastid : integer; + lastindex : integer; + + // RR record start rfc 1035 p.29 + name : tname; + rrtype : word; // r due to token conflict + rrclass : word; // same + rrttl : cardinal; // same + rdlength : word; + + case integer of // depending on rrtype, one of these structures is filled + // more or less following rfc 1035 p.15 + DnsQueryMD, + DnsQueryMB, + DnsQueryMF : (madname : tname); + DnsQueryCNAME : (cname : tname); + DnsQueryHINFO : (hinfo : thinfo); + DnsQueryMG : (mgmname : tname); + DnsQueryMINFO : (minfo : tminfo); + DnsQueryMR : (newname : tname); + DnsQueryNS : (nsdname : tname); + DnsQueryPTR : (ptrname : tname); + DnsQuerySOA : (soa : TSoaRecord); + DnsQueryTXT : (txt : ttxtstring); + DnsQueryMX : (mx : TMX); + DnsQueryA : (adress : tadress; + ipnummer : tname); // interpreted + DnsQueryAAAA : (aaaa : TAAAA; + ip6nummer : tname); // interpreted + DnsQueryLOC : (loc : TLOCInfo; + locdecode : TLogGeo); // interpreted + end; + + // for a quicker access + tdatacacheitem = record + rrtype : word; + rrpos : pchar; + end; + tdatacache = record + count : integer; + items : array of tdatacacheitem; + end; + + TDnsQuery = class(TComponent) + private + { Dclarations prives } + frrcache : TRRRecord; + fdatacache : tdatacache; + fDnsRequestAnswer : TDnsRequestAnswerHeader; + fquestion : TQuestion; + + function NewExtractName(var p : pchar):string; + function GetRepsonsecount(nid : integer):integer; + function GetResponseItem(nid : integer; nindex : integer):TRRRecord; + + protected + FWSocket : TWSocket; + FPort : String; + FAddr : String; + FIDCount : WORD; + FQueryBuf : array [0..511] of char; + FQueryLen : Integer; + + FResponseBuf : array [0..511*8] of char; // 4k genug? irgendwie wre mir dynamisch ja lieber... + FResponseLen : Integer; + + FOnRequestDone : TDnsRequestDoneEvent; + + { !!KAP!! } + fQueryPending : boolean; + + procedure BuildRequestHeader(Dst : PDnsRequestHeader; + ID : WORD; + OPCode : BYTE; + Recursion : Boolean; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD); virtual; + function BuildQuestionSection(Dst : PChar; + const QName : String; + QType : WORD; + QClass : WORD) : Integer; virtual; + procedure WSocketDataAvailable(Sender: TObject; Error: WORD); virtual; + procedure TriggerRequestDone(Error: WORD); virtual; + function GetResponseBuf : PChar; + procedure SendQuery; + + { !!KAP!! 2002-02-15} + procedure DNSSocketSessionClosed(Sender: TObject; Error: Word); + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure Notification(AComponent: TComponent; operation: TOperation); override; + function MXLookup(Domain : String) : Integer; + function ALookup(Host : String) : Integer; + function PTRLookup(IP : String) : Integer; + { !!KAP!! } + function QueryAny(Host : String; QNumber : Integer) : Integer; + // Query this to see if dns-request is pending + property QueryPending : Boolean read fQueryPending; + + { !!KAP!! 2002-02-15} + procedure AbortPending; + + { !!KAP!! 2002-07-27} + property Response : TDnsRequestAnswerHeader read fDnsRequestAnswer; + property ResponseBuf : PChar read GetResponseBuf; + // 0 : all items, otherwise the queryitems + property ResponseCount[nid : integer]:integer read GetRepsonsecount; + property ResponseItem[nid : integer; nindex : integer]: TRRRecord read GetResponseItem; + + // simpler + property Question : TQuestion read fQuestion; + published + property Port : String read FPort write FPort; + property Addr : String read FAddr write FAddr; + property OnRequestDone : TDnsRequestDoneEvent read FOnRequestDone + write FOnRequestDone; + end; + + +function ReverseIP(const IP : String) : String; +function LongLatToDMS(longlat : longint; hemis : String) : String; { !!KAP!! } +function Loc2Geo(loc : TLOCInfo) : TLogGeo; { !!KAP!! } +function LocAltToAlt(Localt : LongInt) : LongInt; { !!KAP!! } +procedure Register; + +// should compile. +Const RRRecordsize = sizeof(TRRRecord); + +implementation + +type + PWORD = ^WORD; + PDWORD = ^DWORD; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function ReverseIP(const IP : String) : String; +var + I, J : Integer; +begin + Result := ''; + if Length(IP) = 0 then + Exit; + J := Length(IP); + I := J; + while I >= 0 do begin + if (I = 0) or (IP[I] = '.') then begin + Result := Result + '.' + Copy(IP, I + 1, J - I); + J := I - 1; + end; + Dec(I); + end; + if Result[1] = '.' then + Delete(Result, 1, 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TDnsQuery]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TDnsQuery.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWSocket := TWSocket.Create(nil); + FPort := '53'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TDnsQuery.Destroy; +begin + // erase cache + if (fdatacache.count>0) then begin + freemem(fdatacache.items,sizeof(fdatacache.items[0])*fdatacache.count); + fdatacache.count:=0 + end; + + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.Notification(AComponent: TComponent; operation: TOperation); +begin + inherited Notification(AComponent, operation); + if operation = opRemove then begin + if AComponent = FWSocket then + FWSocket := nil; + end; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetResponseBuf : PChar; +begin + Result := @FResponseBuf; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.MXLookup(Domain : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Domain, DnsQueryMX, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.ALookup(Host : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Host, DnsQueryA, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ !!KAP!! } +function TDnsQuery.QueryAny(Host : String; qnumber : integer) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Host, qnumber, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.PTRLookup(IP : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], + ReverseIP(IP) + '.in-addr.arpa', + DnsQueryPTR, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.SendQuery; +begin +// !!KAP!! + fQueryPending:=true; + + // erase cache + if (fdatacache.count>0) then begin + freemem(fdatacache.items,sizeof(fdatacache.items[0])*fdatacache.count); + fdatacache.count:=0 + end; + + FResponseLen := -1; + FWSocket.OnDataAvailable := nil; + FWSocket.Abort; + FWSocket.OnDataAvailable := WSocketDataAvailable; + FWSocket.Proto := 'udp'; + FWSocket.Port := FPort; + FWSocket.Addr := FAddr; + FWSocket.Connect; + FWSocket.Send(@FQueryBuf, FQueryLen); + FWSocket.OnSessionClosed :=DNSSocketSessionClosed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.BuildQuestionSection( + Dst : PChar; + const QName : String; + QType : WORD; + QClass : WORD) : Integer; +var + I : Integer; + p : PChar; + Ptr : PChar; +begin + Ptr := Dst; + if Ptr = nil then begin + Result := 0; + Exit; + end; + I := 1; + while I <= Length(QName) do begin + p := Ptr; + Inc(Ptr); + while (I <= Length(QName)) and (QName[I] <> '.') do begin + Ptr^ := QName[I]; + Inc(Ptr); + Inc(I); + end; + p^ := Chr(Ptr - p - 1); + Inc(I); + end; + Ptr^ := #0; + Inc(Ptr); + PWORD(Ptr)^ := htons(QType); + Inc(Ptr, 2); + PWORD(Ptr)^ := htons(QClass); + Inc(Ptr, 2); + Result := Ptr - Dst; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.BuildRequestHeader( + Dst : PDnsRequestHeader; + ID : WORD; + OPCode : BYTE; + Recursion : Boolean; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD); +begin + if Dst = nil then + Exit; + Dst^.ID := htons(ID); + Dst^.Flags := htons((OpCode shl 11) + (Ord(Recursion) shl 8)); + Dst^.QDCount := htons(QDCount); + Dst^.ANCount := htons(ANCount); + Dst^.NSCount := htons(NSCount); + Dst^.ARCount := htons(ARCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.TriggerRequestDone(Error: WORD); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, Error); + + //!!KAP!! + fQueryPending:=false; +end; + +{ !!KAP!! 2002-02-15} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.AbortPending; +begin + fQueryPending:=false; +end; + +(************************************************************************************************) +(************************************************************************************************) +function TDnsQuery.NewExtractName(var p : pchar):string; +var N : Integer; + I : Integer; + pc : pchar; +begin + result:=''; + + if (P^=#0) then + Inc(P) + else + repeat + { Get name part length } + N:=Ord(P^); + if (N and $C0)=$C0 then begin + { Message compression } + N := ((N and $3F) shl 8) + Ord(P[1]); + pc:=fResponseBuf; + inc(pc,n); + result:=result+NewExtractName(pc); + // Weiter + Inc(P,2); + n:=0; + end else begin + Inc(P); + if (N<>0) then begin + { Copy name part } + i:=length(result); + setlength(result,i+n); + move(p^,result[i+1],n); + inc(p,n); + if (P^<>#0) then + result:=result+'.'; + end; + end; + until (n=0); +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.WSocketDataAvailable(Sender: TObject; Error: WORD); +Var Flags : Integer; + Ans : PDnsRequestHeader; + i : integer; + REndPtr, + RDataPtr, + P : PChar; +begin + frrcache.lastid:=-1; + FResponseLen:=FWSocket.Receive(@FResponseBuf,SizeOf(FResponseBuf)); + + if (Error<>0) then begin + TriggerRequestDone(Error); + FResponseLen:=0; + exit; + end; + + { Check for minimum response length } + if FResponseLen< SizeOf(TDnsRequestHeader) then begin + TriggerRequestDone(10); + Exit; + end; + + Ans:=PDnsRequestHeader(@FResponseBuf); + + // --- + Flags:=WSocket_ntohs(Ans^.Flags); + { Check if we got a response } + if (Flags and $8000) = 0 then begin + TriggerRequestDone(11); + Exit; + end; + + { Decode response header } + fDnsRequestAnswer.len := FResponseLen; + fDnsRequestAnswer.ID := WSocket_ntohs(Ans^.ID); + fDnsRequestAnswer.qr := (Flags and $8000) = $8000; + fDnsRequestAnswer.opcode := (Flags shr 11) and $000F; + fDnsRequestAnswer.AuthoritativeAnswer := (Flags and $0400) = $0400; + fDnsRequestAnswer.Truncation := (Flags and $0200) = $0200; + fDnsRequestAnswer.RecursionDesired := (Flags and $0100) = $0100; + fDnsRequestAnswer.RecursionAvailable := (Flags and $0080) = $0080; + fDnsRequestAnswer.z := (Flags shr 4) and $0007; + fDnsRequestAnswer.rcode := (Flags and $000F); + fDnsRequestAnswer.QDCount := WSocket_ntohs(Ans^.QDCount); + fDnsRequestAnswer.ANCount := WSocket_ntohs(Ans^.ANCount); + fDnsRequestAnswer.NSCount := WSocket_ntohs(Ans^.NSCount); + fDnsRequestAnswer.ARCount := WSocket_ntohs(Ans^.ARCount); + + P:=@ResponseBuf[SizeOf(TDnsRequestHeader)]; + { Should never be greater than 1 because we sent only one question } + + fQuestion.QuestionName:=NewExtractName(p); + fQuestion.QuestionType:=WSocket_ntohs(PDWORD(p)^); inc(p,sizeof(word)); + fQuestion.QuestionClass:=WSocket_ntohs(PDWORD(p)^); inc(p,sizeof(word)); + + REndPtr:=FResponseBuf; + inc(rendptr,FResponseLen); + + // the following is not very smart due two loops.... + // get number or RRDatas + i:=0; + RDataPtr:=p; + while (integer(REndPtr)>integer(RDataPtr)) do begin + NewExtractName(RDataPtr); + i:=i+1; + inc(RDataPtr,sizeof(TRRInternal)+WSocket_ntohs(pRRInternal(rdataptr)^.rdlength)); + end; + fdatacache.count:=i; + getmem(fdatacache.items,sizeof(fdatacache.items[0])*fdatacache.count); + + // Fetch RRDatas + i:=0; + RDataPtr:=p; + while (integer(REndPtr)>integer(RDataPtr)) do begin + fdatacache.items[i].rrpos:=rdataptr; + NewExtractName(RDataPtr); + fdatacache.items[i].rrtype:=WSocket_ntohs(pRRInternal(rdataptr)^.rrtype); + i:=i+1; + inc(RDataPtr,sizeof(TRRInternal)+WSocket_ntohs(pRRInternal(rdataptr)^.rdlength)); + end; + + TriggerRequestDone(0); +end; + +{ !!KAP!! 2002-02-15} +procedure TDnsQuery.DNSSocketSessionClosed(Sender: TObject; Error: Word); +begin + // das geht garnicht, da dann wsocketdataavailable zu spt aufgerufen wird + //fQueryPending:=false; +end; + +(************************************************************************************************) +(************************************************************************************************) +// 0 : all items, otherwise the queryitems +function TDnsQuery.GetRepsonsecount(nid : integer):integer; +var i : integer; +begin + if (nid=0) then + result:=fdatacache.count + else begin + result:=0; + for i:=0 to fdatacache.count-1 do + if (fdatacache.items[i].rrtype=nid) then + inc(result); + end; +end; + +(************************************************************************************************) +(************************************************************************************************) +// 0 : all items, otherwise the queryitems +function TDnsQuery.GetResponseItem(nid : integer; nindex : integer):TRRRecord; + +var i, + index : integer; + pp : pchar; +begin + // nada + fillchar(result,sizeof(result),0); + result.valid:=false; + + // Cache hit + if (frrcache.lastid=nid) and (frrcache.lastindex=nindex) then begin + result:=frrcache; + exit; + end; + + // store for caching. + result.lastid:=nid; + result.lastindex:=nindex; + + // Search the entry + pp:=nil; + index:=-1; + for i:=0 to fdatacache.count-1 do + if (pp=nil) and ( (nid=0) or (fdatacache.items[i].rrtype=nid) ) then begin + if (nindex=0) then begin + index:=i; + pp:=fdatacache.items[i].rrpos; + end else + nindex:=nindex-1; + end; + + // not found. Better raise exception? + if (pp=nil) then exit; + + // headers + result.name:=NewExtractName(pp); + result.rrtype:=WSocket_ntohs(pRRInternal(pp)^.rrtype); + result.rrclass:=WSocket_ntohs(pRRInternal(pp)^.rrclass); + result.rrttl:=WSocket_ntohl(pRRInternal(pp)^.rrttl); + result.rdlength:=WSocket_ntohs(pRRInternal(pp)^.rdlength); + + // end + inc(pp,sizeof(TRRInternal)); + + // Build the record + case fdatacache.items[index].rrtype of + DnsQueryMD, + DnsQueryMB, + DnsQueryMF : result.madname:=NewExtractName(pp); + DnsQueryMG : result.mgmname:=NewExtractName(pp); + DnsQueryCNAME : result.cname:=NewExtractName(pp); + DnsQueryMR : result.newname:=NewExtractName(pp); + DnsQueryNS : result.nsdname:=NewExtractName(pp); + DnsQueryPTR : result.ptrname:=NewExtractName(pp); + DnsQueryTXT : result.txt:=NewExtractName(pp); + DnsQueryA : begin + result.adress:=PDWORD(pp)^; + result.ipnummer:=WSocket_inet_ntoa(tinaddr(result.adress)); + end; + DnsQueryMX : begin + result.mx.preference:=WSocket_ntohs(PDWORD(pp)^); + inc(pp,2); + result.mx.exchange:=NewExtractName(pp); + end; + DnsQueryHINFO : move(pp^,result.hinfo,sizeof(thinfo)); + DnsQueryMINFO : begin + result.minfo.rmailbx:=NewExtractName(pp); + result.minfo.remailbx:=NewExtractName(pp); + end; + DnsQueryAAAA : begin + move(pp^,result.aaaa,sizeof(TAAAA)); + result.ip6nummer:=format('%p:%p',[ pointer(result.aaaa[0]),pointer(result.aaaa[2]) ]); + end; + DnsQuerySOA : begin + result.soa.mname:=NewExtractName(pp); + result.soa.rname:=NewExtractName(pp); + result.soa.serial:=WSocket_ntohl(pcardinal(pp)^); inc(pp,sizeof(cardinal)); + result.soa.refresh:=WSocket_ntohl(pcardinal(pp)^); inc(pp,sizeof(cardinal)); + result.soa.retry:=WSocket_ntohl(pcardinal(pp)^); inc(pp,sizeof(cardinal)); + result.soa.expire:=WSocket_ntohl(pcardinal(pp)^); inc(pp,sizeof(cardinal)); + result.soa.minimum:=WSocket_ntohl(pcardinal(pp)^); inc(pp,sizeof(cardinal)); + end; + DnsQueryLOC : begin + move(pp^,result.loc,sizeof(TLOCInfo)); + result.locdecode:=Loc2Geo(result.loc); + end; + end; + + // merken + frrcache:=result; + + result.valid:=true; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ + <0><1><129><128><0><1><0><1><0><4><0><5><7>inp + rise<3>com<0><0><15><0><1><192><12><0> + <15><0><1><0><1>QV<0><10><0><10><5>drui + d<192><12><192><12><0><2><0><1><0><1>Qc<0><6><3> + ns1<192><12><192><12><0><2><0><1><0><1>Qc<0> + <20><3>NS1<10>SPRINTLINK + <3>NET<0><192><12><0><2><0><1><0><1>Qc<0> + <6><3>NS2<192>U<192><12><0><2><0><1><0><1>Q + c<0><6><3>NS3<192>U<192>+<0><1><0><1><0> + <1>QV<0><4><143><186><11>F<192>?<0><1><0><1><0> + <1>Qc<0><4><207>iS<30><192>Q<0><1><0><1><0> + <2><144>i<0><4><204>u<214><10><192>q<0><1><0><1><0> + <2><144>i<0><4><199><2><252><10><192><131><0><1><0><1><0> + <2><142><182><0><4><204>a<212><10> +} +{ + <0><3><129><128><0><1><0><1><0><2><0><3><4>rtf + m<2>be<0><0><15><0><1><192><12><0><15><0><1><0> + <1>.b<0><9><0><10><4>mail<192><12><192><12> + <0><2><0><1><0><1>.b<0><11><2>ns<3>dn + s<2>be<0><192><12><0><2><0><1><0><1>.b<0> + <5><2>ns<192><12><192>'<0><1><0><1><0><1>.b + <0><4><195><0>d<253><192>:<0><1><0><1><0><1>QY + <0><4><134>:J!<192>Q<0><1><0><1><0><1>.b + <0><4><195><0>d<253> +} +{ + <0><7><133><128><0><1><0><1><0><2><0><2><3>www + <4>rtfm<2>be<0><0><1><0><1><192><12><0> + <1><0><1><0><1>Q<128><0><4><195><0>d<253><4>rt + fm<2>be<0><0><2><0><1><0><1>Q<128><0><5> + <2>ns<192>-<192>-<0><2><0><1><0><1>Q<128><0> + <9><2>ns<3>dns<192>2<192>@<0><1><0><1> + <0><1>Q<128><0><4><195><0>d<253><192>Q<0><1><0><1> + <0><0><26><132><0><4><134>:J! +} +(* +<0><1><129><128><0><1><0><1><0><5><0><5><9>fu-berlin +<2>de<0><0> + +<29><0><1><192><12><0><29><0><1><0><0>, + +<0><16><0><21><22><19><139>Av<167><130><218>L<242> +<0><152><156>\<192><12><0><2><0><1><0><0><12><176> +<0>"<4>arbi<10>informatik<13>uni-oldenburg<2>de<0> +<192><12><0><2><0><1><0><0><12><176><0><12><5>deneb<3> +dfn<192>d<192><12><0><2><0><1><0><0><12><176><0><6><3> +ns3<192><12><192><12><0><2><0><1><0><0><12><176><0><6> +<3>ns2<192><12><192><12><0><2><0><1><0><0><12><176><0> +<6><3>ns1<192><12><192>F<0><1><0><1><0><0>t<169><0><4> +<134>j<1><7><192>t<0><1><0><1><0><0>9<209><0><4><192>L +<176><9><192><140><0><1><0><1><0><0>T<19><0><4><130> +<133><1>9<192><158><0><1><0><1><0><0><28><206><0><4> +<160>-<10><12><192><176><0><1><0><1><0><0>1<198><0> +<4><160>-<8><8> +*) + +{ !!KAP!! } +{raw translation of some perl-source LOC.pm from package Net::DNS::RR::LOC; + +fu-berlin.de LOC 52 27 19.591 N 13 17 40.978 E 15.00m 1000.00m 10000.00m 10.00m +} +const conv_sec = 1000.0; + conv_min = 60.0 * conv_sec; + conv_deg = 60.0 * conv_min; + zh31 = 1 shl 31; + +procedure SubLOCgeo(longlat : integer; + hemis : String; + var ldeg, lmin, lsec, lmsec : Extended; + var hemic : char); +var + Labs : Extended; +begin + LongLat := WSocket_ntohl(LongLat); + // !!KAP!! 2002-08-31 + if (LongLat<0) + then Labs := Abs(1.0 * LongLat - zh31) + else Labs := Abs(1.0 * LongLat + zh31); + //Labs := Abs(1.0 * LongLat - zh31); + Ldeg := Trunc(labs / conv_deg); + Labs := Labs - ldeg * conv_deg; + Lmin := Trunc(labs / conv_min); + Labs := Labs - lmin * conv_min; + Lsec := Trunc(labs / conv_sec); + Labs := Labs - lsec * conv_sec; + Lmsec := Labs; + Hemic := Copy(Hemis, 1 + ord(LongLat <= zh31), 1)[1]; { yeah. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LongLatToDMS(longlat : longint; hemis : string):string; +Var ldeg, lmin, lsec, lmsec : extended; + hemi : char; +begin + SubLOCgeo(longlat,hemis,ldeg,lmin,lsec,lmsec,hemi); + result := Format('%d %02d %02d.%02.2d', + [round(ldeg), round(lmin), round(lsec), + round(lmsec)]) + ' ' + hemi; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ in cm!! } +function LocAltToAlt(Localt : LongInt) : LongInt; +begin + Result := Round((WSocket_ntohl(localt) - 100000.0 * 100.0) / 100.0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ !!KAP!! } +function Loc2Geo(loc : TLOCInfo):TLogGeo; + { dolle umwandlung } + procedure du(longlat : Integer; + hemis : String; + var ideg, imin, isec, imsec : Integer; + var hemic : Char); + var + ldeg, lmin, lsec, lmsec : extended; + begin + SubLOCgeo(longlat, hemis, ldeg, lmin, lsec, lmsec, hemic); + ideg := Round(ldeg); + imin := Round(lmin); + isec := Round(lsec); + imsec := Round(lmsec); + end; + +begin + Result.version := Loc.version; + Result.longsize := Round(Exp(Ln(10)*(loc.size and $f))); + Result.latsize := Round(Exp(Ln(10)*(loc.size shr 4))); + + Result.horizpre := Loc.horizpre; + Result.vertpre := Loc.vertpre; + + du(loc.latitude, 'NS', result.lad, result.lam, + result.las, result.lams, result.lahem); + du(loc.longitude, 'EW', result.lod, result.lom, + result.los, result.loms, result.lohem); + + Result.altitude := LocAltToAlt(loc.altitude); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/HttpAsp1.dfm b/lib/Delphi/Internet/HttpAsp1.dfm new file mode 100644 index 00000000..9a1bcf56 Binary files /dev/null and b/lib/Delphi/Internet/HttpAsp1.dfm differ diff --git a/lib/Delphi/Internet/HttpAsp1.pas b/lib/Delphi/Internet/HttpAsp1.pas new file mode 100644 index 00000000..5ea17bbb --- /dev/null +++ b/lib/Delphi/Internet/HttpAsp1.pas @@ -0,0 +1,164 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Creation: December 30, 1997 +Version: 1.00 +Description: Sample program to demonstrate some of the THttpCli features. + (POST a message to a CGI) + (requested by "Coen" ) +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpAsp1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, WSocket, HttpProt, ExtCtrls; + +const + HttpPgVersion = 101; + +type + THttpTestForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + SupplierIDEdit: TEdit; + PinEdit: TEdit; + SendButton: TButton; + HttpCli1: THttpCli; + procedure FormCreate(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + HttpTestForm: THttpTestForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.FormCreate(Sender: TObject); +begin + PinEdit.Text := ''; + SupplierIDEdit.Text := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.SendButtonClick(Sender: TObject); +var + DataIn : TMemoryStream; + DataOut : TMemoryStream; + Buf : String; +begin + DisplayMemo.Clear; + DataIn := TMemoryStream.Create; + DataOut := TMemoryStream.Create; + try + Buf := 'suplno=' + Trim(SupplierIDEdit.Text) + + '&PIN=' + Trim(PinEdit.Text) + + '&LOGIN=Login'; + DataOut.Write(Buf[1], Length(Buf)); + DataOut.Seek(0, soFromBeginning); + + httpcli1.SendStream := DataOut; + httpcli1.RcvdStream := DataIn; + httpcli1.Proxy := 'intsrv02'; + httpcli1.ProxyPort := '80'; + HttpCli1.Cookie := 'ASPSESSIONID=OUYRWOSPOFGGPSSF'; + HttpCli1.URL := 'http://www.transmed.co.za/webserv/menu.asp'; + + SendButton.Enabled := FALSE; + try + httpcli1.Post; + finally + SendButton.Enabled := TRUE; + DataIn.Seek(0, 0); + DisplayMemo.Lines.LoadFromStream(DataIn); + end; + finally + DataOut.Free; + DataIn.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/HttpAsy1.dfm b/lib/Delphi/Internet/HttpAsy1.dfm new file mode 100644 index 00000000..152d221c Binary files /dev/null and b/lib/Delphi/Internet/HttpAsy1.dfm differ diff --git a/lib/Delphi/Internet/HttpAsy1.pas b/lib/Delphi/Internet/HttpAsy1.pas new file mode 100644 index 00000000..52fbcfa3 --- /dev/null +++ b/lib/Delphi/Internet/HttpAsy1.pas @@ -0,0 +1,492 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: January 31, 1998 +Version: 1.01 +Description: This program shows how to use the THttpCli component to execute + a list of request sequentialy or simultaneously. + Simultaneous request are possible without using threads because + the THttpCli component is fully event-driven and asynchronous. + Data is not stroed. See the HttpTst sample program for an + example of data store. We keep this sample as simple as possible. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Feb 01, 1998 V1.01 Adedpted to be compatible with Delphi 1 + Save window position and size to ini file. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpAsy1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, HttpProt, IniFiles; + +type + THttpAsyForm = class(TForm) + URLListBox: TListBox; + Panel1: TPanel; + Label1: TLabel; + URLEdit: TEdit; + AddButton: TButton; + Panel2: TPanel; + ExecButton: TButton; + RemoveButton: TButton; + DisplayMemo: TMemo; + HttpCli1: THttpCli; + ReplaceButton: TButton; + ClearDisplayButton: TButton; + HeaderCheckBox: TCheckBox; + DataCheckBox: TCheckBox; + SimultCheckBox: TCheckBox; + AbortButton: TButton; + procedure AddButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure RemoveButtonClick(Sender: TObject); + procedure ExecButtonClick(Sender: TObject); + procedure HttpCli1RequestDone(Sender: TObject; RqType: THttpRequest; + Error: Word); + procedure URLListBoxClick(Sender: TObject); + procedure ReplaceButtonClick(Sender: TObject); + procedure ClearDisplayButtonClick(Sender: TObject); + procedure HttpCli1HeaderData(Sender: TObject); + procedure HttpCli1DocData(Sender: TObject; Buffer: Pointer; + Len: Integer); + procedure AbortButtonClick(Sender: TObject); + private + { Dclarations prives } + FInitialized : Boolean; + FIniFileName : String; + FCurrentItem : Integer; + FHttpCliList : TList; { For simultaneous requests } + FFlagAbort : Boolean; + procedure StartNext; { For sequential requests } + procedure ExecSimultaneous; + procedure ExecSequential; + procedure HttpCliItemRequestDone(Sender: TObject; { For simult. requests } + RqType: THttpRequest; Error: Word); + end; + +var + HttpAsyForm: THttpAsyForm; + +implementation + +{$R *.DFM} + +const + SectionData = 'Data'; + KeyURL = 'URLEdit'; + KeyCount = 'Count'; + KeyList = 'List'; + KeySimult = 'Simultaneous'; + KeyHeader = 'DisplayHeader'; + KeyData = 'DisplayData'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.FormCreate(Sender: TObject); +begin + DisplayMemo.Clear; + FCurrentItem := -1; + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FHttpCliList := TList.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + Count : Integer; + I : Integer; + URL : String; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + URLEdit.Text := IniFile.ReadString(SectionData, KeyURL, ''); + HeaderCheckBox.Checked := (IniFile.ReadInteger(SectionData, KeyHeader, 0) <> 0); + DataCheckBox.Checked := (IniFile.ReadInteger(SectionData, KeyData, 0) <> 0); + SimultCheckBox.Checked := (IniFile.ReadInteger(SectionData, KeySimult, 0) <> 0); + Count := IniFile.ReadInteger(SectionData, KeyCount, 0); + for I := 1 to Count do begin + URL := IniFile.ReadString(SectionData, KeyList + IntToStr(I), ''); + if URL <> '' then + URLListBox.Items.Add(URL); + end; + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; + I : Integer; + Count : Integer; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyURL, URLEdit.Text); + IniFile.WriteInteger(SectionData, KeyHeader, Ord(HeaderCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyData, Ord(DataCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeySimult, Ord(SimultCheckBox.Checked)); + Count := URLListBox.Items.Count; + IniFile.WriteInteger(SectionData, KeyCount, Count); + for I := 1 to Count do + IniFile.WriteString(SectionData, KeyList + IntToStr(I), + URLListBox.Items[I - 1]); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Add an URL to the URL list box } +procedure THttpAsyForm.AddButtonClick(Sender: TObject); +begin + if Trim(URLEdit.Text) <> '' then + URLListBox.Items.Add(URLEdit.Text); + ActiveControl := URLEdit; + URLEdit.SelectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Remove the selected URL from hte URL listbox } +procedure THttpAsyForm.RemoveButtonClick(Sender: TObject); +var + Item : Integer; +begin + Item := URLListBox.ItemIndex; + if Item >= 0 then + URLListBox.Items.Delete(Item); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Execute button click handler. Start sequential or simultaneous execution } +procedure THttpAsyForm.ExecButtonClick(Sender: TObject); +begin + ExecButton.Enabled := FALSE; + FFLagAbort := FALSE; + if SimultCheckBox.Checked then + ExecSimultaneous + else + ExecSequential; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Start simultaneous execution by creating as much THttpCli components as } +{ there are URL in the list box. (We could alternatively limit the number } +{ of THttpCli components and use them sequentially. It would be a } +{ combination of the sequential and simultaneous implementations.) } +{ A TList is used to keep track of all the component created. This is only } +{ needed to abort each one if requested by the user. } +{ The Tag property is used to store the item number, just for display. } +procedure THttpAsyForm.ExecSimultaneous; +var + Count : Integer; + Item : Integer; + AHttpCli : THttpCli; +begin + { Check if the list if empty } + if FHttpCliList.Count > 0 then begin + MessageBeep(MB_OK); + Exit; + end; + + { Get the URL count } + Count := URLListBox.Items.Count; + if Count <= 0 then + Exit; { Nothing to do ! } + + { Create a new HTTP component for each URL, } + { add it to the list and start the request } + for Item := 1 to Count do begin + AHttpCli := THttpCli.Create(Self); + FHttpCliList.Add(AHttpCli); + AHttpCli.Tag := Item; + AHttpCli.URL := URLListBox.items[Item - 1]; + AHttpCli.OnRequestDone := HttpCliItemRequestDone; + AHttpCli.OnHeaderData := HttpCli1HeaderData; + AHttpCli.OnDocData := HttpCli1DocData; + DisplayMemo.Lines.Add('Start item ' + IntToStr(Item) + ': ' + + AHttpCli.Url); + AHttpCli.GetAsync; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This OnRequestDone handler is used for the simultaneous request model. } +{ It search the THttpCli component in the list and remove it. } +procedure THttpAsyForm.HttpCliItemRequestDone( + Sender : TObject; + RqType : THttpRequest; + Error : Word); +var + Item : Integer; + AHttpCli : THttpCli; + Count : Integer; +begin + AHttpCli := Sender as THttpCli; + Item := AHttpCli.Tag; + DisplayMemo.Lines.Add( + 'Finished Item ' + IntToStr(Item) + + ' StatusCode = ' + IntToStr(AHttpCli.StatusCode) + + ' ' + AHttpCli.URL + + ' Error = ' + IntToStr(Error)); + DisplayMemo.Lines.Add(''); + + { Remove the item form the list } + Count := FHttpCliList.Count; + for Item := 1 to Count do begin + if AHttpCli = FHttpCliList.Items[Item - 1] then begin + FHttpCliList.Delete(Item - 1); + break; + end; + end; + + { Free the item } + AHttpCli.Free; + + { Check if the list is empty. If yes, we have all requests finished. } + if FHttpCliList.Count <= 0 then begin + ExecButton.Enabled := TRUE; + DisplayMemo.Lines.Add('All Finished'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.ExecSequential; +begin + if FCurrentItem >= 0 then begin + MessageBeep(MB_OK); + Exit; + end; + FCurrentItem := 0; + StartNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Start the next request (this could also be the first). } +procedure THttpAsyForm.StartNext; +begin + if FFlagAbort then begin + DisplayMemo.Lines.Add('Abort requested'); + FCurrentItem := -1; + ExecButton.Enabled := TRUE; + Exit; + end; + + Inc(FCurrentItem); + if FCurrentItem > URLListBox.Items.Count then begin + DisplayMemo.Lines.Add('All Finished'); + FCurrentItem := -1; + ExecButton.Enabled := TRUE; + Exit; + end; + HttpCli1.Url := URLListBox.Items[FCurrentItem - 1]; + HttpCli1.Tag := FCurrentItem; + DisplayMemo.Lines.Add('Start item ' + IntToStr(FCurrentItem) + ': ' + + HttpCli1.Url); + HttpCli1.GetASync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This OnRequestDone event handler is called during the sequential model. } +{ Just start the next request. } +procedure THttpAsyForm.HttpCli1RequestDone(Sender: TObject; + RqType: THttpRequest; Error: Word); +begin + DisplayMemo.Lines.Add('Finished item ' + IntToStr(FCurrentItem) + + ' StatusCode = ' + IntToStr(HttpCli1.StatusCode) + + ' Error = ' + IntToStr(Error)); + DisplayMemo.Lines.Add(''); + StartNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.URLListBoxClick(Sender: TObject); +begin + UrlEdit.Text := UrlListBox.Items[URLListBox.ItemIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.ReplaceButtonClick(Sender: TObject); +var + Item : Integer; +begin + Item := URLListBox.ItemIndex; + if Item < 0 then + Exit; + URLListBox.Items.Delete(Item); + URLListBox.Items.Insert(Item, UrlEdit.Text); + URLListBox.ItemIndex := Item; + ActiveControl := URLEdit; + URLEdit.SelectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.ClearDisplayButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This OnHeaderData event handler is used in both sequential and } +{ simultaneous requests models. } +procedure THttpAsyForm.HttpCli1HeaderData(Sender: TObject); +var + AHttpCli : THttpCli; +begin + if not HeaderCheckBox.Checked then + Exit; + AHttpCli := Sender as THttpCli; + DisplayMemo.Lines.Add('Item ' + IntToStr(AHttpCli.Tag) + ': ' + + AHttpCli.LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This OnDocData event handler is used in both sequential and } +{ simultaneous requests models. } +procedure THttpAsyForm.HttpCli1DocData(Sender: TObject; Buffer: Pointer; + Len: Integer); +var + AHttpCli : THttpCli; +begin + if not DataCheckBox.Checked then + Exit; + + AHttpCli := Sender as THttpCli; + { Display a message stating that data is available } + DisplayMemo.Lines.Add('Item ' + IntToStr(AHttpCli.Tag) + ' Data'); + + { We could display the data, but it use a huge space in the display } + { DisplayMemo.Lines.Add(StrPas(Buffer)); } + + { We could also store the data somewhere (with the help of OnDocBegin } + { and OnDocEnd events. Or using the RcvdStream property. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Abort all the running request. } +{ In the simultaneous model, we use the list to abort all. } +{ We just need to call abort. We will get the OnRequestDone event with an } +{ error code stating that the request has been aborted. } +procedure THttpAsyForm.AbortButtonClick(Sender: TObject); +var + Count : Integer; + Item : Integer; + AHttpCli : THttpCli; +begin + FFLagAbort := TRUE; + if SimultCheckBox.Checked then begin + Count := FHttpCliList.Count; + for Item := 1 to Count do begin + AHttpCli := THttpCli(FHttpCliList.Items[Item - 1]); + AHttpCli.Abort; + end; + end + else + HttpCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/HttpChk1.dfm b/lib/Delphi/Internet/HttpChk1.dfm new file mode 100644 index 00000000..9eaa6a1f Binary files /dev/null and b/lib/Delphi/Internet/HttpChk1.dfm differ diff --git a/lib/Delphi/Internet/HttpChk1.pas b/lib/Delphi/Internet/HttpChk1.pas new file mode 100644 index 00000000..ac495581 --- /dev/null +++ b/lib/Delphi/Internet/HttpChk1.pas @@ -0,0 +1,147 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: September 4, 1999 +Version: 1.01 +Description: Use HTTP component to check for valid URL. + See IsAddressValid function below. Of course you can remove + display if all you need is a boolean status. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpChk1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, HttpProt; + +type + TCheckUrlForm = class(TForm) + Label1: TLabel; + URLEdit: TEdit; + CheckButton: TButton; + ResultLabel: TLabel; + HttpCli1: THttpCli; + Memo1: TMemo; + procedure CheckButtonClick(Sender: TObject); + procedure HttpCli1RequestDone(Sender: TObject; RqType: THttpRequest; + Error: Word); + procedure HttpCli1HeaderData(Sender: TObject); + private + FDoneFlag : Boolean; + FDoneError : Word; + public + { Public declarations } + function IsAddressValid(URL : String) : Boolean; + end; + +var + CheckUrlForm: TCheckUrlForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCheckUrlForm.CheckButtonClick(Sender: TObject); +begin + Memo1.Clear; + if IsAddressValid(UrlEdit.Text) then + ResultLabel.Caption := 'Valid' + else + ResultLabel.Caption := 'Invalid'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check if an URL is valid. Use HTTP HEAD command to speed up thing. (It } +{ doesn't retrieve document, just webserver answer header). } +{ Syntax of an URL: protocol://[user[:password]@]server[:port]/path } +function TCheckUrlForm.IsAddressValid(URL : String) : Boolean; +var + Timeout : longInt; +begin + try + FDoneFlag := FALSE; + FDoneError := 0; + HttpCli1.URL := URL; + HttpCli1.HeadAsync; + Timeout := GetTickCount + 30000; { 30" timeout } + while not FDoneFlag do begin +{$IFNDEF VER80} + Sleep(0); +{$ENDIF} + Application.ProcessMessages; + if Timeout < Longint(GetTickCount) then begin + HttpCli1.Abort; + Result := FALSE; + Exit; + end; + end; + Result := (HttpCli1.StatusCode = 200); + { You can suppress next line if you don't want display } + Memo1.lines.Add('StatusCode = ' + IntToStr(HttpCli1.StatusCode)); + except + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCheckUrlForm.HttpCli1RequestDone(Sender: TObject; + RqType: THttpRequest; Error: Word); +begin + FDoneFlag := TRUE; + FDoneError := Error; + { You may suppress following two lines if you don't want any display } + if Error <> 0 then + Memo1.Lines.Add('Error #' + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ You can remove this event handler if you don't want to see messages. } +procedure TCheckUrlForm.HttpCli1HeaderData(Sender: TObject); +begin + Memo1.Lines.Add(HttpCli1.LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/HttpDmo1.dfm b/lib/Delphi/Internet/HttpDmo1.dfm new file mode 100644 index 00000000..6cf4bba7 Binary files /dev/null and b/lib/Delphi/Internet/HttpDmo1.dfm differ diff --git a/lib/Delphi/Internet/HttpDmo1.pas b/lib/Delphi/Internet/HttpDmo1.pas new file mode 100644 index 00000000..edb0c48c --- /dev/null +++ b/lib/Delphi/Internet/HttpDmo1.pas @@ -0,0 +1,139 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Creation: December 5, 1997 +Version: 1.02 +Description: Sample program to demonstrate some of the THttpCli features. +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jan 16, 1998 V1.01 Added a proxy edit box. +Aug 18, 2001 V1.02 Shay Horovitz corrected a small bug + in LoadMemoFromMemoryStream. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpDmo1; + +interface + +uses + WinProcs, WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, HttpProt, ExtCtrls; + +type + THttpToMemoForm = class(TForm) + Panel1: TPanel; + Label1: TLabel; + URLEdit: TEdit; + GoButton: TButton; + HttpCli1: THttpCli; + DisplayMemo: TMemo; + Label2: TLabel; + ProxyEdit: TEdit; + procedure GoButtonClick(Sender: TObject); + procedure Panel1Resize(Sender: TObject); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + HttpToMemoForm: THttpToMemoForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure LoadMemoFromMemoryStream(Memo : TMemo; Stream : TMemoryStream); +var + p, q, r : PChar; +begin + p := Stream.Memory; + q := p + Stream.Size;// -1; fixed by Shay Horovitz + r := p; + while (p <> nil) and (p < q) do begin + while (p < q) and (p^ <> #13) and (p^ <> #10) do + Inc(p); + Memo.Lines.Add(Copy(StrPas(r), 1, p - r)); + if (p[0] = #13) and (p[1] = #10) then + Inc(p, 2) + else + Inc(p); + r := p; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpToMemoForm.GoButtonClick(Sender: TObject); +var + Data : TMemoryStream; +begin + DisplayMemo.Clear; + + GoButton.Enabled := FALSE; + Data := TMemoryStream.Create; + try + httpcli1.URL := URLEdit.Text; + httpcli1.Proxy := ProxyEdit.Text; + httpcli1.ProxyPort := '80'; + httpcli1.RcvdStream := Data; + httpcli1.Get; + LoadMemoFromMemoryStream(DisplayMemo, Data); + finally + Data.Free; + GoButton.Enabled := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpToMemoForm.Panel1Resize(Sender: TObject); +begin + GoButton.Left := Panel1.Width - GoButton.Width - 8; + URLEdit.Width := Panel1.Width - URLEdit.Left - GoButton.Width - 16; + ProxyEdit.Width := URLEdit.Width; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/HttpGet1.dfm b/lib/Delphi/Internet/HttpGet1.dfm new file mode 100644 index 00000000..ab30172c Binary files /dev/null and b/lib/Delphi/Internet/HttpGet1.dfm differ diff --git a/lib/Delphi/Internet/HttpGet1.pas b/lib/Delphi/Internet/HttpGet1.pas new file mode 100644 index 00000000..c631a569 --- /dev/null +++ b/lib/Delphi/Internet/HttpGet1.pas @@ -0,0 +1,208 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: January 17, 1998 +Version: 1.00 +Description: This sample program show how to get a document from a webserver + s store it to a file. Also display some progress info. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpGet1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, HttpProt, StdCtrls, IniFiles; + +type + THttpGetForm = class(TForm) + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + URLEdit: TEdit; + ProxyHostEdit: TEdit; + ProxyPortEdit: TEdit; + FileNameEdit: TEdit; + Label5: TLabel; + GetButton: TButton; + AbortButton: TButton; + InfoLabel: TLabel; + HttpCli1: THttpCli; + procedure GetButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure HttpCli1DocData(Sender: TObject; Buffer: Pointer; + Len: Integer); + procedure HttpCli1HeaderData(Sender: TObject); + procedure AbortButtonClick(Sender: TObject); + private + { Dclarations prives } + FInitialized : Boolean; + FIniFileName : String; + public + { Dclarations publiques } + end; + +var + HttpGetForm: THttpGetForm; + +implementation + +{$R *.DFM} +const + SectionData = 'Data'; + KeyURL = 'URL'; + KeyProxyHost = 'ProxyHost'; + KeyProxyPort = 'ProxyPort'; + KeyFileName = 'FileName'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + InfoLabel.Caption := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + URLEdit.Text := IniFile.ReadString(SectionData, KeyURL, + 'http://www.rtfm.be/fpiette/images/overbyte.gif'); + ProxyHostEdit.Text := IniFile.ReadString(SectionData, KeyProxyHost, + ''); + ProxyPortEdit.Text := IniFile.ReadString(SectionData, KeyProxyPort, + '80'); + FileNameEdit.Text := IniFile.ReadString(SectionData, KeyFileName, + 'test.tmp'); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyURL, URLEdit.Text); + IniFile.WriteString(SectionData, KeyProxyHost, ProxyHostEdit.Text); + IniFile.WriteString(SectionData, KeyProxyPort, ProxyPortEdit.Text); + IniFile.WriteString(SectionData, KeyFileName, FileNameEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.GetButtonClick(Sender: TObject); +begin + HttpCli1.URL := URLEdit.Text; + HttpCli1.Proxy := ProxyHostEdit.Text; + HttpCli1.ProxyPort := ProxyPortEdit.Text; + HttpCli1.RcvdStream := TFileStream.Create(FileNameEdit.Text, fmCreate); + GetButton.Enabled := FALSE; + AbortButton.Enabled := TRUE; + InfoLabel.Caption := 'Loading'; + try + try + HttpCli1.Get; + InfoLabel.Caption := 'Received ' + + IntToStr(HttpCli1.RcvdStream.Size) + ' bytes'; + except + on E: EHttpException do begin + InfoLabel.Caption := 'Failed : ' + + IntToStr(HttpCli1.StatusCode) + ' ' + + HttpCli1.ReasonPhrase;; + end + else + raise; + end; + finally + GetButton.Enabled := TRUE; + AbortButton.Enabled := FALSE; + HttpCli1.RcvdStream.Destroy; + HttpCli1.RcvdStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.HttpCli1DocData(Sender: TObject; Buffer: Pointer; + Len: Integer); +begin + InfoLabel.Caption := IntToStr(HttpCli1.RcvdCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.HttpCli1HeaderData(Sender: TObject); +begin + InfoLabel.Caption := InfoLabel.Caption + '.'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.AbortButtonClick(Sender: TObject); +begin + HttpCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/HttpPg1.dfm b/lib/Delphi/Internet/HttpPg1.dfm new file mode 100644 index 00000000..19116fc0 Binary files /dev/null and b/lib/Delphi/Internet/HttpPg1.dfm differ diff --git a/lib/Delphi/Internet/HttpPg1.pas b/lib/Delphi/Internet/HttpPg1.pas new file mode 100644 index 00000000..739e4bbe --- /dev/null +++ b/lib/Delphi/Internet/HttpPg1.pas @@ -0,0 +1,246 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Creation: December 4, 1997 +Version: 1.03 +Description: Sample program to demonstrate some of the THttpCli features. + (POST a message to a CGI) + (requested by Walter Daniel Leon Salas" ) + You can see what HttpPg does automatically using your browser + and surfing to http://www.unired.net.pe/mensatel.html HttpPg + does programmatically what you can do manually at this page using + your browser. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 28, 1997 Added a TMemo to display the POST's result. +Jan 16, 1998 Added a Proxy edit box. Added ini file stuff. + Better error handling. Added abort button. +Feb 10, 1999 Corrected Encode function (a test was done the wrong way). + Thanks to Howie Hamlin for finding that one. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpPg1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, WSocket, HttpProt, ExtCtrls, IniFiles; + +const + HttpPgVersion = 101; + +type + THttpTestForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + UserIDEdit: TEdit; + EMailEdit: TEdit; + MessageEdit: TEdit; + SendButton: TButton; + HttpCli1: THttpCli; + ProxyEdit: TEdit; + Label4: TLabel; + AbortButton: TButton; + procedure SendButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure AbortButtonClick(Sender: TObject); + private + { Dclarations prives } + FIniFileName : String; + FInitialized : Boolean; + public + { Dclarations publiques } + end; + +var + HttpTestForm: THttpTestForm; + +implementation + +{$R *.DFM} +const + SectionData = 'Data'; + KeyUserID = 'UserID'; + KeyUserName = 'UserName'; + KeyEMail = 'EMail'; + KeyMessage = 'Message'; + KeyProxy = 'Proxy'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.FormCreate(Sender: TObject); +begin + DisplayMemo.Clear; + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Restore the form position and size, restore the datas for edit boxes. } +procedure THttpTestForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + UserIDEdit.Text := IniFile.ReadString(SectionData, KeyUserID, + '27313'); + EMailEdit.Text := IniFile.ReadString(SectionData, KeyEMail, + 'francois.piette@pophost.eunet.be'); + ProxyEdit.Text := IniFile.ReadString(SectionData, KeyProxy, + ''); + MessageEdit.Text := IniFile.ReadString(SectionData, KeyMessage, + 'Hello World ! (Message sent by HttpPg).'); + + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Save the form position and size, save the datas for edit boxes. } +procedure THttpTestForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyUserID, UserIDEdit.Text); + IniFile.WriteString(SectionData, KeyProxy, ProxyEdit.Text); + IniFile.WriteString(SectionData, KeyMessage, MessageEdit.Text); + IniFile.WriteString(SectionData, KeyEMail, EMailEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Encode the data to be sent to the CGI } +function Encode(const msg : String) : String; +var + I : Integer; +begin + Result := ''; + for I := 1 to Length(msg) do begin + if msg[I] = ' ' then + Result := Result + '+' + else if msg[I] in ['a'..'z', 'A'..'Z', '0'..'9'] then + Result := Result + msg[I] + else + Result := Result + '%' + IntToHex(ord(msg[I]), 2); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Do the job ! } +procedure THttpTestForm.SendButtonClick(Sender: TObject); +var + DataIn : TMemoryStream; + DataOut : TMemoryStream; + Buf : String; +begin + DisplayMemo.Clear; + DataIn := TMemoryStream.Create; { For the response } + DataOut := TMemoryStream.Create; { For the data to be sent } + try + { Build the data to be sent to the CGI. } + Buf := 'ID=' + Encode(UserIDEdit.Text) + + '&REMITE=' + Encode(EMailEdit.Text) + + '&MENSAJE=' + Encode(MessageEdit.Text); + { Write the data to the stream which will be used to send } + DataOut.Write(Buf[1], Length(Buf)); + { Position the stream at the beginning or nothing will be sent } + DataOut.Seek(0, soFromBeginning); + + { Setup the HTTP component to transmit } + httpcli1.SendStream := DataOut; + httpcli1.RcvdStream := DataIn; + httpcli1.Proxy := ProxyEdit.Text; + httpcli1.ProxyPort := '80'; + HttpCli1.URL := 'http://www.unired.net.pe/cgi-bin/a.out'; + + SendButton.Enabled := FALSE; + AbortButton.Enabled := TRUE; + try + try + httpcli1.Post; + { Data sent, copy the webserver response to the DisplayMemo } + DataIn.Seek(0, 0); + DisplayMemo.Lines.LoadFromStream(DataIn); + except + { An error occured ! } + DisplayMemo.Lines.Add('Failed : ' + HttpCli1.ReasonPhrase); + raise + end; + finally + SendButton.Enabled := TRUE; + AbortButton.Enabled := FALSE; + end; + finally + DataOut.Free; + DataIn.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.AbortButtonClick(Sender: TObject); +begin + HttpCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/HttpThr1.dfm b/lib/Delphi/Internet/HttpThr1.dfm new file mode 100644 index 00000000..f9f885d4 Binary files /dev/null and b/lib/Delphi/Internet/HttpThr1.dfm differ diff --git a/lib/Delphi/Internet/HttpThr1.pas b/lib/Delphi/Internet/HttpThr1.pas new file mode 100644 index 00000000..025d7db9 --- /dev/null +++ b/lib/Delphi/Internet/HttpThr1.pas @@ -0,0 +1,269 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE (From a work done by Ed Hochman ) +Creation: Jan 13, 1998 +Version: 1.00 +Description: HttpThrd is a demo program showing how to use THttpCli component + in a multi-threaded program. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpThr1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + HttpProt, StdCtrls, IniFiles; + + +type + TThreadState = (tsInexistant, tsReady, tsInUse); + + THttpThreadForm = class(TForm) + URLEdit: TEdit; + ResultsMemo: TMemo; + DoItButton: TButton; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label6: TLabel; + Thread0Label: TLabel; + Thread1Label: TLabel; + Thread2Label: TLabel; + Thread3Label: TLabel; + Thread4Label: TLabel; + Thread5Label: TLabel; + ProgressListBox: TListBox; + Label14: TLabel; + ProxyEdit: TEdit; + Label15: TLabel; + procedure DoItButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + private + FInitialized : Boolean; + FIniFileName : String; + procedure CreateThread(Sender: TObject); + procedure SetThreadState(Which : Integer; State: TThreadState); + public + procedure ProcessResults(ThreadNumber: Integer; Success : Boolean); + end; + +const + SectionData = 'Data'; + KeyURL = 'URL'; + KeyProxy = 'Proxy'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + +var + HttpThreadForm: THttpThreadForm; + +implementation + +{$R *.DFM} + +uses + HttpThr2; // The thread class is defined there +const + MaxThreads = 6; // If you change this, change labels on the form +var + // The array with all our threads components + ThreadsObjects : array [0..MaxThreads - 1] of THTTPThread; + // The array with all thread states + ThreadsState : array [0..MaxThreads - 1] of TThreadState; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.FormCreate(Sender: TObject); +var + i: Integer; +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + for i := Low(ThreadsObjects) to High(ThreadsObjects) do + SetThreadState(i, tsInexistant); //Not created. + ResultsMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + URLEdit.Text := IniFile.ReadString(SectionData, KeyURL, + 'http://www.rtfm.be/fpiette'); + ProxyEdit.Text := IniFile.ReadString(SectionData, KeyProxy, ''); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyURL, URLEdit.Text); + IniFile.WriteString(SectionData, KeyProxy, proxyEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.DoItButtonClick(Sender: TObject); +var + i: Integer; +begin + for i := Low(ThreadsObjects) to High(ThreadsObjects) do begin + if ThreadsState[i] = tsInexistant then //Thread has not been created yet + CreateThread(Self); + + if ThreadsState[i] = tsReady then begin //Thread is ready for use + with ThreadsObjects[i] do begin + FURL := UrlEdit.Text; + FProxy := ProxyEdit.Text; + SetThreadState(i, tsInUse); // In use + Resume; //get the page + Exit; //For now, only start one thread for each click of DoIt + end; + end; + end; + MessageBeep(MB_OK); + ShowMessage('No more threads available'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.CreateThread(Sender: TObject); +var + i: Integer; +begin + for i := Low(ThreadsObjects) to High(ThreadsObjects) do begin + if ThreadsObjects[i] = nil then begin + ThreadsObjects[i] := THTTPThread.Create(True); + ThreadsObjects[i].Setup(i); //Create the HTTP object + SetThreadState(i, tsReady); + Exit; //Found and activated an unused thread + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.SetThreadState(Which : Integer; State: TThreadState); +begin + ThreadsState[Which] := State; + case which of + 0: Thread0Label.Caption := IntToStr(Ord(State)); + 1: Thread1Label.Caption := IntToStr(Ord(State)); + 2: Thread2Label.Caption := IntToStr(Ord(State)); + 3: Thread3Label.Caption := IntToStr(Ord(State)); + 4: Thread4Label.Caption := IntToStr(Ord(State)); + 5: Thread5Label.Caption := IntToStr(Ord(State)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure LoadMemoFromMemoryStream(Memo : TMemo; Stream : TMemoryStream); +var + p, q, r : PChar; +begin + p := Stream.Memory; + q := p + Stream.Size - 1; + r := p; + while (p <> nil) and (p < q) do begin + while (p < q) and (p^<> #13) do + Inc(p); + Memo.Lines.Add(Copy(StrPas(r), 1, p - r)); + if (p[0] = #13) and (p[1] = #10) then + Inc(p, 2) + else + Inc(p); + r := p; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +// To be called by each thread as it completes (using Synchronize !) +procedure THttpThreadForm.ProcessResults + (ThreadNumber: Integer; Success : Boolean); +var + Stream : TMemoryStream; +begin + ThreadsObjects[ThreadNumber].Suspend; + if Success then begin + ResultsMemo.Lines.Add('* * * * * * THREAD ' + + IntToStr(ThreadNumber) + ' * * * * * *'); + Stream := ThreadsObjects[ThreadNumber].FHttpCli.RcvdStream + as TMemoryStream; + LoadMemoFromMemoryStream(ResultsMemo, Stream); + ResultsMemo.Lines.Add(''); + end + else begin + // There was an error getting data. + ResultsMemo.Lines.Add('Nothing returned by thread: ' + + IntToStr(ThreadNumber)); + end; + ResultsMemo.Lines.Add('* * * * * * * * * * * * * * * * * * * *'); + SetThreadState(ThreadNumber, tsReady); + //Waiting for something to do (get next url here) +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/HttpThr2.pas b/lib/Delphi/Internet/HttpThr2.pas new file mode 100644 index 00000000..ff2992fd --- /dev/null +++ b/lib/Delphi/Internet/HttpThr2.pas @@ -0,0 +1,161 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE (From a work done by Ed Hochman ) +Creation: Jan 13, 1998 +Version: 1.00 +Description: HttpThrd is a demo program showing how to use THttpCli component + in a multi-threaded program. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpThr2; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + HttpProt; + +type + THTTPThread = class(TThread) + private + FProgress : String; + procedure UpdateStatus; + procedure ShowProgress; + procedure Progress(Msg : String); + procedure DocBegin(Sender : TObject); + procedure DocData(Sender : TObject; Buffer : Pointer; Len : Integer); + procedure DocEnd(Sender : TObject); + published + procedure Setup(i: Integer); + procedure Execute; override; + public + FURL : String; + FProxy : String; + FThreadNumber : Integer; + FHttpCli : THTTPCli; + Success : Boolean; + end; + +implementation + +uses + HttpThr1; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.Setup(i: Integer); +begin + FThreadNumber := i; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.UpdateStatus; +begin + HttpThreadForm.ProcessResults(FThreadNumber, Success); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.ShowProgress; +begin + HttpThreadForm.ProgressListBox.Items.Add(FProgress); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.Progress(Msg : String); +begin + FProgress := Msg; + SynChronize(ShowProgress); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.Execute; +begin + FHttpCli := THTTPCli.Create(Nil); + FHttpCli.MultiThreaded := TRUE; + FHttpCli.RcvdStream := TMemoryStream.Create; + FHttpCli.OnDocBegin := DocBegin; + FHttpCli.OnDocEnd := DocEnd; + FHttpCli.OnDocData := DocData; + while not Terminated do begin + Progress(IntToStr(FThreadNumber) + ' Start get'); + with FHttpCli do begin + URL := FURL; + Proxy := FProxy; + (RcvdStream as TMemoryStream).Clear; + try + Get; // Get page from internet + Success := TRUE; + except + Success := FALSE; + end; + end; + + if not Terminated then + Synchronize(UpdateStatus); + end; + + if FHttpCli.RcvdStream <> nil then + FHttpCli.RcvdStream.Free; + + FHttpCli.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.DocBegin(Sender : TObject); +begin + Progress(IntToStr(FThreadNumber) + ' Doc begin'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.DocData(Sender : TObject; Buffer : Pointer; Len : Integer); +begin + Progress(IntToStr(FThreadNumber) + ' Doc data'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.DocEnd(Sender : TObject); +begin + Progress(IntToStr(FThreadNumber) + ' Doc end'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/Httpdmo.dpr b/lib/Delphi/Internet/Httpdmo.dpr new file mode 100644 index 00000000..5d930194 --- /dev/null +++ b/lib/Delphi/Internet/Httpdmo.dpr @@ -0,0 +1,12 @@ +program HttpDmo; + +uses + Forms, + HttpDmo1 in 'HttpDmo1.pas' {HttpToMemoForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpToMemoForm, HttpToMemoForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/Ics.ico b/lib/Delphi/Internet/Ics.ico new file mode 100644 index 00000000..e5f5024b Binary files /dev/null and b/lib/Delphi/Internet/Ics.ico differ diff --git a/lib/Delphi/Internet/IcsDll1.dpr b/lib/Delphi/Internet/IcsDll1.dpr new file mode 100644 index 00000000..f0e2901c --- /dev/null +++ b/lib/Delphi/Internet/IcsDll1.dpr @@ -0,0 +1,286 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: April 03, 2000 +Description: This is a demo showing how to use a TWSocket component in a DLL. + This demo must be used with ICS TcpSrv demo program as a server. + The DLL is a client which connect to the server and send "time" + command, then wait for the reply and return it in the buffer + passed to the DLL. + There is only one function exported from the DLL: IcsDllDemo. + It takes four arguments: a pointer to the hostname to connect to, + a pointer to the port, a pointer to a buffer and a pointer for + buffer size. On entry buffer size must be initialised with the + size of the actual buffer. On exit, it is filled with the + actual reply size. The function's return value is the error code + such as 10061 when the server is not running. +Version: 1.02 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1996-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Apr 29, 2000 V1.01 Use WSocketForceLoadWinsock. +Apr 27, 2002 V1.02 Use WSocketUnregisterClass + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +library IcsDll1; + +{$DEFINE NOFORMS} // This will avoid forms unit and reduce DLL size +// You should add NOFORMS in the project options to be sure to have all units +// compiled with this option. + +uses + Windows, Messages, SysUtils, Classes, WSocket; + +const + WSocketVersion = 102; + CopyRight : String = ' TWSocket (c) 2000-2002 Francois Piette V1.02 '; + +function IcsDllDemo(HostName : PChar; + Port : PChar; + Buffer : PChar; + BufSize : PInteger): Integer; stdcall; forward; +procedure StrToBuffer(Buffer : PChar; BufSize : PInteger; Msg : String); forward; + +exports + IcsDllDemo; + +type + // We use a workerthread to do the job. + // This will allows the DLL to be called by several processes simultaneously + TClientThread = class(TThread) + private + FClientSocket : TWSocket; + FBannerReceived : Boolean; + FErrorCode : PInteger; + FBuffer : PChar; + FBufSize : PInteger; + FHostName : PChar; + FPort : PChar; + procedure ClientWSocketDataAvailable(Sender: TObject; Error: Word); + procedure ClientWSocketSessionConnected(Sender: TObject; Error: Word); + procedure ClientWSocketSessionClosed(Sender: TObject; Error: Word); + protected + procedure Execute; override; + public + constructor Create; + destructor Destroy; override; + + property ClientWSocket : TWSocket read FClientSocket write FClientSocket; + property Buffer : PChar read FBuffer write FBuffer; + property BufSize : PInteger read FBufSize write FBufSize; + property ErrorCode : PInteger read FErrorCode write FErrorCode; + property HostName : PChar read FHostName write FHostName; + property Port : PChar read FPort write FPort; + end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Create a new thread in the blocked state. This allow the user to register } +{ the client thread before it actually start working. } +constructor TClientThread.Create; +begin + FreeOnTerminate := TRUE; + inherited Create(TRUE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Destroy the thread. Destroy the ClientWSocket if needed. } +destructor TClientThread.Destroy; +begin + if Assigned(FClientSocket) then begin + FClientSocket.Destroy; + FClientSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the main thread routine. There is not much to do because TWSocket } +{ is event driven. So everythong to do is done inside an event handler, } +{ mostly the OnDataAvailable event handler which is triggered each time } +{ something is received. } +procedure TClientThread.Execute; +begin + try + { Create the client TWSocket. It is important to create it inside the } + { Execute method because it *must* be created by the thread. } + { Otherwise the messages sent by winsock would be processed in the } + { main thread context, effectively disabling multi-threading. } + FClientSocket := TWSocket.Create(nil); + FClientSocket.OnDataAvailable := ClientWSocketDataAvailable; + FClientSocket.OnSessionConnected := ClientWSocketSessionConnected; + FClientSocket.OnSessionClosed := ClientWSocketSessionClosed; + FClientSocket.LineMode := TRUE; + FClientSocket.Addr := FHostName; + FClientSocket.Port := FPort; + FClientSocket.Proto := 'tcp'; + FClientSocket.Connect; + + { Message loop to handle TWSocket messages } + { The loop is exited when WM_QUIT message is received } + FClientSocket.MessageLoop; + except + on E:Exception do begin + FErrorCode^ := -3; + StrToBuffer(Buffer, BufSize, E.ClassName + ':' + E.Message); + end; + end; + + { Returning from the Execute function effectively terminate the thread } + ReturnValue := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client connection is established. } +procedure TClientThread.ClientWSocketSessionConnected( + Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + FErrorCode^ := Error; + StrToBuffer(Buffer, BufSize, 'Connect failed'); + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); + Exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client connection is closed. } +procedure TClientThread.ClientWSocketSessionClosed( + Sender: TObject; Error: Word); +begin + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when data has been received from server. } +{ Since this sample program use line mode, we comes here only when a } +{ complete line has been received. } +procedure TClientThread.ClientWSocketDataAvailable( + Sender: TObject; + Error: Word); +var + RcvBuffer : String; +begin + // Received the line + RcvBuffer := FClientSocket.ReceiveStr; + // Check if we already received the banner (message sent by server + // as soon as we are connected. + if not FBannerReceived then begin + // We are just receiving the banner. Flag as received + FBannerReceived := TRUE; + // Then send the command to the server + FClientSocket.SendStr('time' + #13 + #10); + end + else begin + // We already received then banner. So this must be the answer + // to our command. Copy to the buffer, without trailling CR/LF + // and without overflowing the given buffer + if Length(RcvBuffer) < BufSize^ then + BufSize^ := Length(RcvBuffer) - 2; // Remove CR/LF + if BufSize^ > 0 then + Move(RcvBuffer[1], Buffer^, BufSize^); + // Then just close the communication + FClientSocket.CloseDelayed; + FErrorCode^ := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Copy a string to a buffer with overflow check. } +procedure StrToBuffer(Buffer : PChar; BufSize : PInteger; Msg : String); +begin + if Length(Msg) < BufSize^ then + BufSize^ := Length(Msg); + if BufSize^ > 0 then + Move(Msg[1], Buffer^, BufSize^); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function IcsDllDemo( + HostName : PChar; + Port : PChar; + Buffer : PChar; + BufSize : PInteger): integer; stdcall; +var + WorkerThread : TClientThread; +begin + try + Result := -1; + // Create a new thread. It is created in sleeping state + WorkerThread := TClientThread.Create; + // Then pass all parameters + WorkerThread.Buffer := Buffer; + WorkerThread.BufSize := BufSize; + WorkerThread.ErrorCode := @Result; + WorkerThread.HostName := HostName; + WorkerThread.Port := Port; + // Then let thread start his work + WorkerThread.Resume; + // And wait until it finishes + WaitForSingleObject(WorkerThread.Handle, INFINITE); + except + on E:Exception do begin + Result := -2; + StrToBuffer(Buffer, BufSize, E.ClassName + ': ' + E.Message); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DLLHandler(Reason: Integer); +begin + if Reason = DLL_PROCESS_DETACH then begin +// MessageBox(0, PChar('Reason = ' + IntToStr(Reason)), 'DLLHandler', MB_OK); + WSocketCancelForceLoadWinsock; + WSocketUnregisterClass; // 27/04/2002 + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +begin +// MessageBox(0, PChar('DLL Init ' + IntToStr(WSocketGCount)), 'DLL', MB_OK); + WSocketForceLoadWinsock; + DLLProc := @DLLHandler; +end. diff --git a/lib/Delphi/Internet/IcsIsap1.dfm b/lib/Delphi/Internet/IcsIsap1.dfm new file mode 100644 index 00000000..50bc95fd Binary files /dev/null and b/lib/Delphi/Internet/IcsIsap1.dfm differ diff --git a/lib/Delphi/Internet/IcsIsap1.pas b/lib/Delphi/Internet/IcsIsap1.pas new file mode 100644 index 00000000..207d000d --- /dev/null +++ b/lib/Delphi/Internet/IcsIsap1.pas @@ -0,0 +1,184 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: ISAPI dll showing how to use ICS component to build extension + to a webserver (note that ICS has a HTTP Server component which + could be used to build a web application without a webserver). + This ISAPI DLL is very basic. When invoked, it will open a FTP + connection to the localhost with user/password root/root and + retrieve the home directory list and return it as an answer + to the client browser. + To use this demo, you have to setup your webserver so that it is + able to execute this ISAPI dll and so that there is a FTP server + running on localhost and accepting user root with password root. + The ICS sample FTP server is OK as well as Microsoft FTP server + provided you configure it correctly. + FTP parameters are hardcoded in DoTheJob procedure. In a real + program, you probably would get them from the requesting URL. + This sample program has been tested with Delphi 5 and IIS5 running + on Windows 2000. Should work as well with other configurations... +Creation: July 22, 2000 +Version: 1.00 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + See http://www.rtfm.be/fpiette/supportuk.htm for subscription. +Legal issues: Copyright (C) 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit IcsIsap1; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } + +interface + +uses + Windows, Messages, SysUtils, Classes, HTTPApp, FtpCli; + +const + IcsIsapi1Version = 100; + CopyRight : String = ' IcsIsapi (c) 2000 F. Piette V1.00 '; + WM_START_MESSAGE = WM_USER + 1; + +type + TIcsIsapiWebModule = class(TWebModule) + procedure WebModule1FtpWebActionItemAction( + Sender : TObject; + Request : TWebRequest; + Response : TWebResponse; + var Handled : Boolean); + end; + +var + IcsIsapiWebModule: TIcsIsapiWebModule; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DoTheJob(FtpCli1 : TFtpClient); +var + Buf : String; +begin + try + // Setup FTP parameters + FtpCli1.HostName := 'localhost'; + FtpCli1.Port := 'ftp'; + FtpCli1.UserName := 'root'; + FtpCli1.Password := 'root'; + FtpCli1.HostFileName := ''; + FtpCli1.HostDirName := ''; + try + FtpCli1.Directory; // This is a synchronous function ! + // Add some data to the directory list + Buf := #13#10 + 'Generated by IcsIsapi' + + #13#10 + 'Visit http://www.overbyte.be'; + FtpCli1.LocalStream.Write(Buf[1], Length(Buf)); + except + on E:Exception do begin + Buf := 'FTP Failed: ' + E.ClassName + ' ' + E.Message + #13#10; + FtpCli1.LocalStream.Position := 0; + FtpCli1.LocalStream.Write(Buf[1], Length(Buf)); + end; + end; + finally + // Posting WM_QUIT will make GetMessage return FALSE and message pump + // loop will terminate. + PostMessage(0, WM_QUIT, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsIsapiWebModule.WebModule1FtpWebActionItemAction( + Sender : TObject; + Request : TWebRequest; + Response : TWebResponse; + var Handled : Boolean); +var + FtpCli1 : TFtpClient; + MsgRec : TMsg; +begin + // Dynamically create an ICS FTP client component. + // We can't use a static component because ISAPI are multithreaded + FtpCli1 := TFtpClient.Create(nil); + try + // We use a stream for data, it is much easier and faster than a file + FtpCli1.LocalStream := TMemoryStream.Create; + try + // This ISAPI is event driven (because ICS uses events) + // So we have to start processing using a custom message + // We pass the reference to FtpCli1 so that handler can do the job + // We can't use a global variable because ISAPI is multithreaded + Postmessage(0, WM_START_MESSAGE, 0, Integer(FtpCli1)); + + // ICS Components need a working message pump because they are event + // driven whithout message pump, nothing will happend at component + // level. A message pump is simply a loop calling Windows API + // GetMessage TranslateMessage and DisptachMessage + // If GetMessage retrieves the WM_QUIT, the return value is FALSE + // and the message loop is broken. } + while GetMessage(MsgRec, 0, 0, 0) do begin + // Our custom message is a thread message (hwnd is nul) + if (MsgRec.hwnd = 0) and (MsgRec.message = WM_START_MESSAGE) then + DoTheJob(TFtpClient(MsgRec.lParam)) + else begin + // Normal processing of any other message + TranslateMessage(MsgRec); + DispatchMessage(MsgRec) + end; + end; + // We comes here after everything is done with FTP + // DoTheJob has posted WM_QUIT message + // We used the stream as an answer for http request + FtpCli1.LocalStream.Position := 0; + // Our answer is just plain text data + Response.ContentType := 'text/plain'; + Response.ContentStream := FtpCli1.LocalStream; + // Send to client browser + Response.SendResponse; + finally + FtpCli1.LocalStream.Free; + end; + finally + FtpCli1.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/IcsIsapi.dpr b/lib/Delphi/Internet/IcsIsapi.dpr new file mode 100644 index 00000000..749de447 --- /dev/null +++ b/lib/Delphi/Internet/IcsIsapi.dpr @@ -0,0 +1,19 @@ +library IcsIsapi; + +uses + WebBroker, + ISAPIApp, + IcsIsap1 in 'IcsIsap1.pas' {IcsIsapiWebModule: TWebModule}; + +{$R *.RES} + +exports + GetExtensionVersion, + HttpExtensionProc, + TerminateExtension; + +begin + Application.Initialize; + Application.CreateForm(TIcsIsapiWebModule, IcsIsapiWebModule); + Application.Run; +end. diff --git a/lib/Delphi/Internet/MailRcv.dpr b/lib/Delphi/Internet/MailRcv.dpr new file mode 100644 index 00000000..5af0a5c1 --- /dev/null +++ b/lib/Delphi/Internet/MailRcv.dpr @@ -0,0 +1,14 @@ +program MailRcv; + +uses + Forms, + MailRcv1 in 'MailRcv1.pas' {POP3ExcercizerForm}, + MailRcv2 in 'MailRcv2.pas' {MessageForm}; + +{$R *.RES} + +begin + Application.CreateForm(TPOP3ExcercizerForm, POP3ExcercizerForm); + Application.CreateForm(TMessageForm, MessageForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/MailRcv1.dfm b/lib/Delphi/Internet/MailRcv1.dfm new file mode 100644 index 00000000..1bb2a8ad Binary files /dev/null and b/lib/Delphi/Internet/MailRcv1.dfm differ diff --git a/lib/Delphi/Internet/MailRcv1.pas b/lib/Delphi/Internet/MailRcv1.pas new file mode 100644 index 00000000..268d5d9b --- /dev/null +++ b/lib/Delphi/Internet/MailRcv1.pas @@ -0,0 +1,667 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: Show how to use TPop3Cli (POP3 protocol, RFC-1225) +Creation: 03 october 1997 +Version: 1.03 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Nov 12, 1997 V1.01 Added a GetAll button to get all messages waiting in the + POP3 server, copying them to a file using the UIDL to build + the file name (sorry, wont work with D1 because of long file + name). The message is *NOT* deleted from the POP3 server. +Jan 10, 1998 V1.02 Added port selection +Jul 05, 2002 V1.03 Added header display in separate UI gadget + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MailRcv1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, ExtCtrls, StdCtrls, IniFiles, Pop3Prot; + +const + MailRcvVersion = 103; + CopyRight : String = ' MailRcv demo (c) 1997-2002 F. Piette V1.03 '; + +type + TPOP3ExcercizerForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + InfoLabel: TLabel; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + ConnectButton: TButton; + QuittButton: TButton; + UserButton: TButton; + HostEdit: TEdit; + UserNameEdit: TEdit; + PassWordEdit: TEdit; + PassButton: TButton; + MsgNumEdit: TEdit; + RetrButton: TButton; + StatButton: TButton; + ListAllButton: TButton; + ListButton: TButton; + DeleteButton: TButton; + NoopButton: TButton; + LastButton: TButton; + ResetButton: TButton; + TopButton: TButton; + MsgLinesEdit: TEdit; + RpopButton: TButton; + UidlButton: TButton; + ApopButton: TButton; + NextButton: TButton; + GetAllButton: TButton; + PortEdit: TEdit; + Label6: TLabel; + Pop3Client: TPop3Cli; + OpenButton: TButton; + AbortButton: TButton; + Label7: TLabel; + SubjectEdit: TEdit; + Label8: TLabel; + FromEdit: TEdit; + Label9: TLabel; + ToEdit: TEdit; + procedure ConnectButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure QuittButtonClick(Sender: TObject); + procedure UserButtonClick(Sender: TObject); + procedure PassButtonClick(Sender: TObject); + procedure Pop3ClientMessageBegin(Sender: TObject); + procedure Pop3ClientMessageEnd(Sender: TObject); + procedure Pop3ClientMessageLine(Sender: TObject); + procedure RetrButtonClick(Sender: TObject); + procedure StatButtonClick(Sender: TObject); + procedure ListAllButtonClick(Sender: TObject); + procedure ListButtonClick(Sender: TObject); + procedure Pop3ClientListBegin(Sender: TObject); + procedure Pop3ClientListEnd(Sender: TObject); + procedure Pop3ClientListLine(Sender: TObject); + procedure DeleteButtonClick(Sender: TObject); + procedure NoopButtonClick(Sender: TObject); + procedure LastButtonClick(Sender: TObject); + procedure ResetButtonClick(Sender: TObject); + procedure TopButtonClick(Sender: TObject); + procedure RpopButtonClick(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure Pop3ClientDisplay(Sender: TObject; Msg: String); + procedure UidlButtonClick(Sender: TObject); + procedure Pop3ClientUidlBegin(Sender: TObject); + procedure Pop3ClientUidlEnd(Sender: TObject); + procedure Pop3ClientUidlLine(Sender: TObject); + procedure ApopButtonClick(Sender: TObject); + procedure NextButtonClick(Sender: TObject); + procedure GetAllButtonClick(Sender: TObject); + procedure Pop3ClientRequestDone(Sender: TObject; RqType: TPop3Request; + Error: Word); + procedure OpenButtonClick(Sender: TObject); + procedure AbortButtonClick(Sender: TObject); + procedure Pop3ClientHeaderEnd(Sender: TObject); + private + FFile : TextFile; + FFileName : String; + FFileOpened : Boolean; + FGetAllState : Integer; + FMsgPath : String; + procedure Exec(MethodPtr : TPop3NextProc; + MethodName : String); + procedure MessageBegin(Sender: TObject); + procedure MessageLine(Sender: TObject); + procedure GetAllMessageLine(Sender: TObject); + procedure GetAllRequestDone(Sender: TObject; + RqType: TPop3Request; Error: Word); + procedure NextMessageRequestDone(Sender: TObject; + RqType: TPop3Request; Error: Word); + public + { Dclarations publiques } + end; + +var + POP3ExcercizerForm: TPOP3ExcercizerForm; + +implementation + +{$R *.DFM} + +uses + MailRcv2; + +const + IniFileName = 'MAILRCV.INI'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Restore some data from the INI file } +procedure TPOP3ExcercizerForm.FormCreate(Sender: TObject); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + HostEdit.Text := IniFile.ReadString('Data', 'Host', ''); + PortEdit.Text := IniFile.ReadString('Data', 'Port', ''); + UserNameEdit.Text := IniFile.ReadString('Data', 'UserName', ''); + PassWordEdit.Text := IniFile.ReadString('Data', 'Password', ''); + IniFile.Free; + InfoLabel.Caption := ''; + SubjectEdit.Text := ''; + FromEdit.Text := ''; + ToEdit.Text := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Save data to INI file } +procedure TPOP3ExcercizerForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteString('Data', 'Host', HostEdit.Text); + IniFile.WriteString('Data', 'Port', PortEdit.Text); + IniFile.WriteString('Data', 'UserName', UserNameEdit.Text); + IniFile.WriteString('Data', 'Password', PassWordEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the TPop3Client object wants to display } +{ some information such as connection progress or errors. } +procedure TPOP3ExcercizerForm.Pop3ClientDisplay(Sender: TObject; + Msg: String); +begin + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All the TPop3Client method are of the same type. To simplify this demo } +{ application, Exec transfert the parameters form the various EditBoxes } +{ to the Pop3Client instance and then call the appropriate method, showing } +{ the result in the InfoLabel.Caption. } +procedure TPOP3ExcercizerForm.Exec( + MethodPtr : TPop3NextProc; + MethodName : String); +begin + SubjectEdit.Text := ''; + FromEdit.Text := ''; + ToEdit.Text := ''; + + Pop3Client.Host := HostEdit.Text; + Pop3Client.Port := PortEdit.Text; + Pop3Client.UserName := UserNameEdit.Text; + Pop3Client.PassWord := PassWordEdit.Text; + Pop3Client.MsgNum := StrToInt(MsgNumEdit.Text); + Pop3Client.MsgLines := StrToInt(MsgLinesEdit.Text); + { We need to reassign event handlers because we may have changed them } + { doing GetAllMessages for example } + Pop3Client.OnRequestDone := Pop3ClientRequestDone; + Pop3Client.OnMessageBegin := Pop3ClientMessageBegin; + Pop3Client.OnMessageEnd := Pop3ClientMessageEnd; + Pop3Client.OnMessageLine := Pop3ClientMessageLine; + InfoLabel.Caption := MethodName + ' started'; + try + MethodPtr; + InfoLabel.Caption := MethodName + ' ok'; + except + on E:Exception do begin + InfoLabel.Caption := MethodName + ' failed (' + E.Message + ')'; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ConnectButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Connect, 'Connect'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.OpenButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Open, 'Open'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.UserButtonClick(Sender: TObject); +begin + Exec(Pop3Client.User, 'User'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.PassButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Pass, 'Pass'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.QuittButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Quit, 'Quit'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.AbortButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Abort, 'Abort'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.RetrButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Retr, 'Retr'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.StatButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Stat, 'Stat'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ListAllButtonClick(Sender: TObject); +begin + MsgNumEdit.Text := '0'; + Exec(Pop3Client.List, 'List All'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ListButtonClick(Sender: TObject); +begin + Exec(Pop3Client.List, 'List'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.DeleteButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Dele, 'Delete'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NoopButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Noop, 'Noop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.LastButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Last, 'Last'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ResetButtonClick(Sender: TObject); +begin + Exec(Pop3Client.RSet, 'Rset'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.TopButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Top, 'Top'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.RpopButtonClick(Sender: TObject); +begin + Exec(Pop3Client.RPop, 'Rpop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.UidlButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Uidl, 'Uidl'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ApopButtonClick(Sender: TObject); +begin + Exec(Pop3Client.APop, 'Apop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client is about to receive a } +{ message. The MsgNum property gives the message number. } +{ This event handler could be used to open the file used to store the msg. } +{ The file handle could be stored in the TPop3Client.Tag property to be } +{ easily retrieved by the OnMessageLine and OnMessageEnd event handlers. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Message ' + + IntToStr((Sender as TPop3Cli).MsgNum) + + ' begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client has detected the end of a } +{ message, even if there is an error or exception, this event gets called. } +{ This event handler could be used to close the file used to store the msg. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Message ' + + IntToStr((Sender as TPop3Cli).MsgNum) + + ' end ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each message line that TPop3Client is } +{ receiveing. This could be used to write the message lines to a file. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageLine(Sender: TObject); +begin + DisplayMemo.Lines.Add((Sender as TPop3Cli).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client is about to receive a } +{ list line. The MsgNum property gives the message number. } +procedure TPOP3ExcercizerForm.Pop3ClientListBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** List begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client has received the last list } +{ line. } +procedure TPOP3ExcercizerForm.Pop3ClientListEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** List End ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each list line received by TPop3Client. } +procedure TPOP3ExcercizerForm.Pop3ClientListLine(Sender: TObject); +var + Buffer : String; +begin + Buffer := 'MsgNum = ' + IntToStr((Sender as TPop3Cli).MsgNum) + ' ' + + 'MsgSize = ' + IntToStr((Sender as TPop3Cli).MsgSize) + ' ' + + 'Line = ''' + (Sender as TPop3Cli).LastResponse + ''''; + DisplayMemo.Lines.Add(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Uidl begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Uidl end ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlLine(Sender: TObject); +var + Buffer : String; +begin + Buffer := 'MsgNum = ' + IntToStr((Sender as TPop3Cli).MsgNum) + ' ' + + 'MsgUidl = ' + (Sender as TPop3Cli).MsgUidl + ''''; + DisplayMemo.Lines.Add(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.MessageBegin(Sender: TObject); +begin + MessageForm.Caption := 'Message ' + + IntToStr((Sender as TPop3Cli).MsgNum); + MessageForm.Show; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.MessageLine(Sender: TObject); +begin + MessageForm.DisplayMemo.Lines.Add((Sender as TPop3Cli).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NextButtonClick(Sender: TObject); +begin + MessageForm.DisplayMemo.Clear; + MessageForm.Caption := 'Message'; + Pop3Client.OnMessageBegin := MessageBegin; + Pop3Client.OnMessageEnd := nil; + Pop3Client.OnMessageLine := MessageLine; + Pop3Client.OnRequestDone := NextMessageRequestDone; + Pop3Client.MsgNum := StrToInt(MsgNumEdit.Text); + Pop3Client.Retr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NextMessageRequestDone( + Sender: TObject; + RqType: TPop3Request; Error: Word); +begin + if Error <> 0 then + Exit; + + MsgNumEdit.Text := IntToStr(StrToInt(MsgNumEdit.Text) + 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.GetAllMessageLine(Sender: TObject); +begin + Writeln(FFile, (Sender as TPop3Cli).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The procedure here after will start an event chain that will eventually } +{ download all messages for the POP3 server. We cannot simply loop because } +{ the POP3 compomnet is asynchronous: it will not wait for operation done } +{ before returning. We must "chain" operations one after the other using } +{ the OnRequestDone event handler. We use the variable FGetAllState to keep } +{ track of where we are. } +{ To get all messages, we must first call Stat to know how many messages } +{ are on the server, then for each message we call Uidl to get a unique } +{ identifier for each message to build a file name and know if we already } +{ have a message, then we retrieve the message, then we increment the } +{ message number and continue until the number of messages is reached. } +{ We should start a TTimer to handle timeout... } +procedure TPOP3ExcercizerForm.GetAllButtonClick(Sender: TObject); +var + IniFile : TIniFile; +begin + { Get path from INI file } + IniFile := TIniFile.Create(IniFileName); + FMsgPath := IniFile.ReadString('Data', 'MsgPath', + ExtractFilePath(Application.ExeName)); + IniFile.Free; + + { Be sure to have an ending backslash } + if (Length(FMsgPath) > 0) and (FMsgPath[Length(FMsgPath)] <> '\') then + FMsgPath := FMsgPath + '\'; + + FGetAllState := 0; + FFileOpened := FALSE; + Pop3Client.OnRequestDone := GetAllRequestDone; + Pop3Client.OnMessageBegin := nil; + Pop3Client.OnMessageEnd := nil; + Pop3Client.OnMessageLine := GetAllMessageLine; + Pop3Client.Stat; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when a request related to GetAll is done. } +{ We check for errors and our state variable FGetAllState which tells us } +{ where we are (stat, uidl or retr which are the 4 commands we use. } +{ Note that we also could use Dele to remove the messages from the server. } +procedure TPOP3ExcercizerForm.GetAllRequestDone( + Sender: TObject; + RqType: TPop3Request; Error: Word); +begin + if Error <> 0 then begin + if FFileOpened then begin + FFileOpened := FALSE; + CloseFile(FFile); + end; + DisplayMemo.Lines.Add('Error ' + Pop3Client.ErrorMessage); + Exit; + end; + + try + case FGetAllState of + 0: begin { Comes from the Stat command } + if Pop3Client.MsgCount < 1 then begin + DisplayMemo.Lines.Add('No message to download.'); + Exit; + end; + Pop3Client.MsgNum := 1; { Start with first message } + FGetAllState := 1; + Pop3Client.Uidl; + end; + 1: begin { Comes from the Uidl command } + FFileName := FMsgPath + 'Msg ' + Pop3Client.MsgUidl + '.txt'; + if FileExists(FFileName) then begin + DisplayMemo.Lines.Add('Message ' + IntToStr(Pop3Client.MsgNum) + ' already here'); + if Pop3Client.MsgNum >= Pop3Client.MsgCount then begin + DisplayMemo.Lines.Add('Finished'); + Exit; + end; + Pop3Client.MsgNum := Pop3Client.MsgNum + 1; + FGetAllState := 1; + Pop3Client.Uidl; + end + else begin + DisplayMemo.Lines.Add('Message ' + IntToStr(Pop3Client.MsgNum)); + AssignFile(FFile, FFileName); + Rewrite(FFile); + FFileOpened := TRUE; + FGetAllState := 2; + Pop3Client.Retr; + end; + end; + 2: begin { Comes from the Retr command } + FFileOpened := FALSE; + CloseFile(FFile); + if Pop3Client.MsgNum >= Pop3Client.MsgCount then begin + DisplayMemo.Lines.Add('Finished'); + Exit; + end; + Pop3Client.MsgNum := Pop3Client.MsgNum + 1; + FGetAllState := 1; + Pop3Client.Uidl; + end; + else + DisplayMemo.Lines.Add('Invalid state'); + Exit; + end; + except + on E:Exception do begin + if FFileOpened then begin + FFileOpened := FALSE; + CloseFile(FFile); + end; + DisplayMemo.Lines.Add('Error: ' + E.Message); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientRequestDone(Sender: TObject; + RqType: TPop3Request; Error: Word); +begin + DisplayMemo.Lines.Add('Request Done Rq=' + IntToStr(Integer(RqType)) + + ' Error=' + IntToStr(Error)); + + if RqType = pop3Stat then begin + InfoLabel.Caption := 'Stat ok, ' + + IntToStr(Pop3Client.MsgCount) + ' messages ' + + IntToStr(Pop3Client.MsgSize) + ' bytes' + end + else if RqType = pop3List then begin + InfoLabel.Caption := 'List ok, ' + + IntToStr(Pop3Client.MsgNum) + ' message ' + + IntToStr(Pop3Client.MsgSize) + ' bytes' + end + else if RqType = pop3Last then begin + InfoLabel.Caption := 'Last = ' + IntToStr(Pop3Client.MsgNum); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientHeaderEnd(Sender: TObject); +begin + SubjectEdit.Text := Pop3Client.HeaderSubject; + FromEdit.Text := Pop3Client.HeaderFrom; + ToEdit.Text := Pop3Client.HeaderTo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/MailRcv2.dfm b/lib/Delphi/Internet/MailRcv2.dfm new file mode 100644 index 00000000..db072fbf Binary files /dev/null and b/lib/Delphi/Internet/MailRcv2.dfm differ diff --git a/lib/Delphi/Internet/MailRcv2.pas b/lib/Delphi/Internet/MailRcv2.pas new file mode 100644 index 00000000..6ec378a1 --- /dev/null +++ b/lib/Delphi/Internet/MailRcv2.pas @@ -0,0 +1,33 @@ +{ +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + +} +unit MailRcv2; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls; + +type + TMessageForm = class(TForm) + DisplayMemo: TMemo; + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + MessageForm: TMessageForm; + +implementation + +{$R *.DFM} + +end. diff --git a/lib/Delphi/Internet/MailRob.dpr b/lib/Delphi/Internet/MailRob.dpr new file mode 100644 index 00000000..905fdcc0 --- /dev/null +++ b/lib/Delphi/Internet/MailRob.dpr @@ -0,0 +1,12 @@ +program MailRob; + +uses + Forms, + MailRob1 in 'MailRob1.pas' {MailRobForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMailRobForm, MailRobForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/MailRob1.dfm b/lib/Delphi/Internet/MailRob1.dfm new file mode 100644 index 00000000..e69b65b2 Binary files /dev/null and b/lib/Delphi/Internet/MailRob1.dfm differ diff --git a/lib/Delphi/Internet/MailRob1.pas b/lib/Delphi/Internet/MailRob1.pas new file mode 100644 index 00000000..170c56c5 --- /dev/null +++ b/lib/Delphi/Internet/MailRob1.pas @@ -0,0 +1,692 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: RobotMail is a demo program for the SMTP and MBX component from + the ICS package. It's a kind of spam machine... +Creation: May 21, 1998 +Version: 1.10 (Tested with Delphi 3 and 4) +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Aug 03, 1998 V1.10 Adapted with new TSmtpCli component + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MailRob1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, MbxFile, StdCtrls, ExtCtrls, SmtpProt, DB, DBTables; + +const + RobotMailVersion = 110; + +type + TMailRobForm = class(TForm) + MbxHandler: TMbxHandler; + DisplayMemo: TMemo; + TopPanel: TPanel; + GetFromMbxButton: TButton; + EMailMemo: TMemo; + MiddlePanel: TPanel; + Label1: TLabel; + HostEdit: TEdit; + PortEdit: TEdit; + FromEdit: TEdit; + Label2: TLabel; + Subject: TLabel; + SubjectEdit: TEdit; + SignOnEdit: TEdit; + Label4: TLabel; + SmtpClient: TSyncSmtpCli; + MbxFileEdit: TEdit; + SendButton: TButton; + SaveToListButton: TButton; + LstFileEdit: TEdit; + LoadFromListButton: TButton; + InfoLabel: TLabel; + Label3: TLabel; + MsgFileEdit: TEdit; + MsgFileLoadButton: TButton; + SaveMsgFileButton: TButton; + OpenDialog1: TOpenDialog; + procedure GetFromMbxButtonClick(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure SmtpClientGetData(Sender: TObject; LineNum: Integer; + MsgLine: PChar; MaxLen: Integer; var More: Boolean); + procedure SaveToListButtonClick(Sender: TObject); + procedure LoadFromListButtonClick(Sender: TObject); + procedure SmtpClientCommand(Sender: TObject; Msg: String); + procedure SmtpClientResponse(Sender: TObject; Msg: String); + procedure MsgFileLoadButtonClick(Sender: TObject); + procedure SaveMsgFileButtonClick(Sender: TObject); + procedure MbxFileEditDblClick(Sender: TObject); + procedure MsgFileEditDblClick(Sender: TObject); + procedure LstFileEditDblClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FTxtFileName : String; + FMsgLines : TStrings; + FNames : TList; + FLogFileName : String; + FLog : TStream; + FRunning : Boolean; + procedure ProcessMsg; + function SearchHeader(Key : String) : Integer; + procedure ClearNames; + procedure CommitLog; + procedure CloseLog; + procedure Log(const Msg : String); + procedure LoadEMailMessage(FileName : String); + procedure SaveEMailMessage(FileName : String); + public + { Dclarations publiques } + end; + +var + MailRobForm: TMailRobForm; + +implementation + +{$R *.DFM} +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyServer = 'MailServer'; + KeyPort = 'SmtpPort'; + KeyFrom = 'From'; + KeySignOn = 'SignOn'; + KeyMbxFile = 'MbxFile'; + KeyLstFile = 'LstFile'; + KeyMsgFile = 'MsgFile'; + + CrLf : array [0..1] of char = (#13, #10); + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.FormCreate(Sender: TObject); +begin + FMsgLines := TStringList.Create; + FNames := TList.Create; + FIniFileName := LowerCase(Application.ExeName); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FTxtFileName := LowerCase(Application.ExeName); + FTxtFileName := Copy(FTxtFileName, 1, Length(FTxtFileName) - 3) + 'txt'; + FLogFileName := LowerCase(Application.ExeName); + FLogFileName := Copy(FLogFileName, 1, Length(FLogFileName) - 3) + 'log'; + CommitLog; + Log('---- Start ----'); + InfoLabel.Caption := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + DisplayMemo.Clear; + + IniFile := TIniFile.Create(FIniFileName); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + HostEdit.Text := IniFile.ReadString(SectionData, KeyServer, 'mail.server.provider'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, 'smtp'); + FromEdit.Text := IniFile.ReadString(SectionData, KeyFrom, 'your.email@your.provider'); + SignOnEdit.Text := IniFile.ReadString(SectionData, KeySignOn, 'Your full name'); + MbxFileEdit.Text := IniFile.ReadString(SectionData, KeyMbxFile, ''); + LstFileEdit.Text := IniFile.ReadString(SectionData, KeyLstFile, 'c:\temp\emails.txt'); + MsgFileEdit.Text := IniFile.ReadString(SectionData, KeyMsgFile, 'c:\temp\emailmsg.txt'); + IniFile.Free; + LoadEMailMessage(FTxtFileName); + end; + CloseLog; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + Log('Stop'); + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteSTring(SectionData, KeyServer, HostEdit.Text); + IniFile.WriteSTring(SectionData, KeyPort, PortEdit.Text); + IniFile.WriteSTring(SectionData, KeyFrom, FromEdit.Text); + IniFile.WriteSTring(SectionData, KeySignOn, SignOnEdit.Text); + IniFile.WriteSTring(SectionData, KeyMbxFile, MbxFileEdit.Text); + IniFile.WriteSTring(SectionData, KeyLstFile, LstFileEdit.Text); + IniFile.WriteSTring(SectionData, KeyMsgFile, MsgFileEdit.Text); + IniFile.Free; + SaveEMailMessage(FTxtFileName); + MbxHandler.Active := FALSE; + FMsgLines.Destroy; + ClearNames; + FNames.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.LoadEMailMessage(FileName : String); +begin + EMailMemo.Clear; + SubjectEdit.Text := ''; + try + EMailMemo.Lines.LoadFromFile(FileName); + if EMailMemo.Lines.Count > 0 then begin + SubjectEdit.Text := EMailMemo.Lines[0]; + EMailMemo.Lines.Delete(0); + end; + except + on E:Exception do Log('LoadEMailMessage failed: ' + E.Message); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SaveEMailMessage(FileName : String); +begin + EMailMemo.Lines.Insert(0, SubjectEdit.Text); + EMailMemo.Lines.SaveToFile(FileName); + EMailMemo.Lines.Delete(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.CommitLog; +begin + if Assigned(FLog) then + FLog.Destroy; + try + FLog := TFileStream.Create(FLogFileName, fmOpenReadWrite or fmShareDenyNone); + except + on E:EFOpenError do begin + try + FLog := TFileStream.Create(FLogFileName, fmCreate); + FLog.Destroy; + FLog := TFileStream.Create(FLogFileName, fmOpenReadWrite or fmShareDenyNone); + except + DisplayMemo.Lines.Add('Can''t create log file ' + FLogFileName); + FLog := nil; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.CloseLog; +begin + if Assigned(FLog) then begin + FLog.Destroy; + FLog := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.Log(const Msg : String); +var + Buf : String; +begin + if not Assigned(FLog) then begin + CommitLog; + if not Assigned(FLog) then + Exit; + end; + Buf := FormatDateTime('yyyy/mm/dd hh:nn:ss ', Now); + FLog.Seek(0, soFromEnd); + FLog.WriteBuffer(Buf[1], Length(Buf)); + FLog.WriteBuffer(Msg[1], Length(Msg)); + FLog.WriteBuffer(CrLf, 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.GetFromMbxButtonClick(Sender: TObject); +begin + if MbxFileEdit.Text = '' then begin + Application.MessageBox('Please enter the file name in the edit box !', + 'Warning', MB_OK); + Exit; + end; + + GetFromMbxButton.Enabled := FALSE; + try + MbxHandler.FileName := MbxFileEdit.Text; + MbxHandler.Active := TRUE; + ProcessMsg; + finally + GetFromMbxButton.Enabled := TRUE; + MbxHandler.Active := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TMailRobForm.SearchHeader(Key : String) : Integer; +var + Line : String; + I, J : Integer; +begin + Key := UpperCase(Key); + Result := -1; + I := 0; + while I < FMsgLines.Count do begin + Line := FMsgLines.Strings[I]; + if Length(Line) = 0 then { End of header } + Break; + J := Pos(':', Line); + if (J > 0) and (UpperCase(Copy(Line, 1, J - 1)) = Key) then begin + Result := I; + Break; + end; + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.ClearNames; +begin + while FNames.Count > 0 do begin + FreeMem(FNames.Items[0], StrLen(PChar(FNames.Items[0])) + 1); + FNames.Delete(0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function StringCompare(Item1, Item2: Pointer): Integer; +begin + Result := StrComp(PChar(Item1), PChar(Item2)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.ProcessMsg; +var + Line : String; + I : Integer; + EMail : String; + p : PChar; + MsgCount : Integer; + OkCount : Integer; +begin + DisplayMemo.Lines.Add('Clear list'); + ClearNames; + + DisplayMemo.Lines.Add('Reading EMail'); + MsgCount := 0; + OkCount := 0; + while not MbxHandler.Eof do begin + Inc(MsgCount); + FMsgLines.LoadFromStream(MbxHandler.MsgStream); + I := SearchHeader('SUBJECT'); + if I < 0 then + DisplayMemo.Lines.Add('Subject not found') + else begin + Line := FMsgLines.Strings[I]; + + if Copy(Line, 10, 9) = 'SUBSCRIBE' then begin + I := Length(Line); + while (I > 0) and (Line[I] <> ' ') do + Dec(I); + EMail := Copy(Line, I + 1, 255); + GetMem(p, Length(EMail) + 1); + Move(EMail[1], p^, Length(EMail)); + FNames.Add(p); + Inc(OkCount); + end; + end; + MbxHandler.Next; + InfoLabel.Caption := Format('%d/%d/%d', [MsgCount, OkCount, MbxHandler.MsgCount]); + Application.ProcessMessages; + end; + +{$IFNDEF VER80} { Delphi 1 does'nt support sorting TList items } + DisplayMemo.Lines.Add('Sort list'); + FNames.Sort(StringCompare); +{$ENDIF} + + DisplayMemo.Lines.Add('Remove duplicates'); + Line := ''; + p := @Line[1]; + I := 0; + while I < FNames.Count do begin + if StringCompare(p, FNames.Items[I]) = 0 then begin + FreeMem(FNames.Items[I], StrLen(PChar(FNames.Items[I])) + 1); + FNames.Delete(I); + end + else begin + p := FNames.Items[I]; + Inc(I); + end; + end; + + DisplayMemo.Lines.Add('Display list'); + for I := 0 to FNames.Count - 1 do + DisplayMemo.Lines.Add(StrPas(PChar(FNames.Items[I]))); + + DisplayMemo.Lines.Add('Total : ' + IntToStr(FNames.Count)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SendButtonClick(Sender: TObject); +var + EMail : String; + I : Integer; + OkCount : Integer; + BadCount : Integer; + Success : Boolean; +begin + if FRunning then begin + FRunning := FALSE; + Exit; + end; + FRunning := TRUE; + DisplayMemo.Lines.Add('Sending EMails'); + if FNames.Count <= 0 then begin + Application.MessageBox('List is empty', 'Warning', MB_OK); + Exit; + end; + + OkCount := 0; + BadCount := 0; + try + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + Success := SmtpClient.OpenSync; + if not Success then + Exit; + I := 0; + while (not Application.Terminated) and (I < FNames.Count) do begin + if not FRunning then begin + Log('Canceled'); + CommitLog; + DisplayMemo.Lines.Add('Canceled'); + Exit; + end; + EMail := StrPas(PChar(FNames.Items[I])); + DisplayMemo.Lines.Add('Sending to ' + EMail); + Log('Sending to ' + EMail); + Success := FALSE; + try + SmtpClient.RcptName.Clear; + SmtpClient.RcptName.Add(EMail); + SmtpClient.HdrFrom := FromEdit.Text; + SmtpClient.HdrTo := EMail; + SmtpClient.HdrSubject := SubjectEdit.Text; + SmtpClient.FromName := FromEdit.Text; + SmtpClient.EmailFiles := nil; + Success := SmtpClient.MailSync; + except + on E:Exception do Log(E.Message); + end; + if Success then + Inc(OkCount) + else begin + Inc(BadCount); + Log('Can''t send to ' + EMail); + DisplayMemo.Lines.Add('Can''t send to ' + EMail); + { We failed, so disconnect before continuing } + try + SmtpClient.Quit; + except + on E:Exception do Log(E.Message); + end; + try + SmtpClient.Abort; + except + end; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + Success := SmtpClient.OpenSync; + if not Success then + Exit; + end; + CommitLog; + Inc(I); + InfoLabel.Caption := Format('%d/%d/%d', [OkCount, BadCount, FNames.Count]); + end; + finally + try + SmtpClient.Quit; + except + on E:Exception do Log(E.Message); + end; + DisplayMemo.Lines.Add(IntToStr(OkCount) + ' emails sent succesfully'); + DisplayMemo.Lines.Add(IntToStr(BadCount) + ' failed'); + Log(IntToStr(OkCount) + ' emails sent succesfully'); + Log(IntToStr(BadCount) + ' failed'); + CloseLog; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SmtpClientGetData(Sender: TObject; LineNum: Integer; + MsgLine: PChar; MaxLen: Integer; var More: Boolean); +var + Len : Integer; +begin + if LineNum > EMailMemo.Lines.count then + More := FALSE + else begin + Len := Length(EMailMemo.Lines[LineNum - 1]); + { Truncate the line if too long (should wrap to next line) } + if Len >= MaxLen then + StrPCopy(MsgLine, Copy(EMailMemo.Lines[LineNum - 1], 1, MaxLen - 1)) + else + StrPCopy(MsgLine, EMailMemo.Lines[LineNum - 1]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SaveToListButtonClick(Sender: TObject); +var + Stream : TStream; + I : Integer; +begin + DisplayMemo.Lines.Add('Saving to file'); + if FNames.Count <= 0 then begin + Application.MessageBox('List is empty', 'Warning', MB_OK); + Exit; + end; + + Stream := TFileStream.Create(LstFileEdit.Text, fmCreate); + try + for I := 0 to FNames.Count - 1 do begin + Stream.WriteBuffer(PChar(FNames.Items[I])^, StrLen(PChar(FNames.Items[I]))); + Stream.WriteBuffer(CrLf, 2); + end; + DisplayMemo.Lines.Add(IntToStr(FNames.Count) + ' EMails saved'); + finally + Stream.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.LoadFromListButtonClick(Sender: TObject); +var + Stream : TMemoryStream; + I, J : Integer; + p, q : PChar; + Table : TTable; + Field : TField; +begin + DisplayMemo.Lines.Add('Loading from file'); + ClearNames; + if UpperCase(ExtractFileExt(LstFileEdit.Text)) = '.DBF' then begin + Table := TTable.Create(Self); + try + Table.DatabaseName := ExtractFilePath(LstFileEdit.Text); + Table.TableName := ExtractFileName(LstFileEdit.Text); + Table.Open; + Field := Table.FieldByName('EMail'); + while not Table.Eof do begin + GetMem(q, Length(Field.AsString) + 1); + StrPCopy(q, Field.AsString); + FNames.Add(q); + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(StrPas(q)); + Table.Next; + end; + finally + Table.Destroy; + end; + end + else begin + Stream := TMemoryStream.Create; + Stream.LoadFromFile(LstFileEdit.Text); + p := Stream.Memory; + I := 0; + while I < Stream.Size do begin + J := I; + while (I < Stream.Size) and (p[i] <> #13) do + Inc(I); + if p[I] = #13 then + Dec(I); + GetMem(q, I - J + 2); + Move(p[J], q^, I - J + 1); + q[I - J + 1] := #0; + FNames.Add(q); + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(StrPas(q)); + I := I + 3; + end; + Stream.Destroy; + end; + DisplayMemo.Lines.Add(IntToStr(FNames.Count) + ' EMails loaded'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SmtpClientCommand(Sender: TObject; Msg: String); +begin + { Memo boxes are not unlimited...} + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(' ' + Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SmtpClientResponse(Sender: TObject; Msg: String); +begin + { Memo boxes are not unlimited...} + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(' ' + Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.MsgFileLoadButtonClick(Sender: TObject); +begin + LoadEMailMessage(MsgFileEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SaveMsgFileButtonClick(Sender: TObject); +begin + SaveEMailMessage(MsgFileEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.MbxFileEditDblClick(Sender: TObject); +begin + OpenDialog1.DefaultExt := '.mbx'; + OpenDialog1.Filter := 'Mail files (*.mbx)|*.MBX|All files (*.*)|*.*'; + OpenDialog1.Options := [ofFileMustExist]; + OpenDialog1.Title := 'MailRob - Open MBX file'; + OpenDialog1.InitialDir := ExtractFilePath(MbxFileEdit.Text); + if OpenDialog1.Execute then + MbxFileEdit.Text := OpenDialog1.FileName; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.MsgFileEditDblClick(Sender: TObject); +begin + OpenDialog1.DefaultExt := '.txt'; + OpenDialog1.Filter := 'Message files (*.txt)|*.TXT|All files (*.*)|*.*'; + OpenDialog1.Options := [ofFileMustExist]; + OpenDialog1.Title := 'MailRob - Open message file'; + OpenDialog1.InitialDir := ExtractFilePath(MsgFileEdit.Text); + if OpenDialog1.Execute then + MsgFileEdit.Text := OpenDialog1.FileName; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.LstFileEditDblClick(Sender: TObject); +begin + OpenDialog1.DefaultExt := '.txt'; + OpenDialog1.Filter := 'AMail list files (*.txt)|*.TXT|All files (*.*)|*.*'; + OpenDialog1.Options := [ofFileMustExist]; + OpenDialog1.Title := 'MailRob - Open email list file'; + OpenDialog1.InitialDir := ExtractFilePath(LstFileEdit.Text); + if OpenDialog1.Execute then + LstFileEdit.Text := OpenDialog1.FileName; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/MailSnd.dpr b/lib/Delphi/Internet/MailSnd.dpr new file mode 100644 index 00000000..375b0e20 --- /dev/null +++ b/lib/Delphi/Internet/MailSnd.dpr @@ -0,0 +1,12 @@ +program MailSnd; + +uses + Forms, + MailSnd1 in 'MailSnd1.pas' {SmtpTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(TSmtpTestForm, SmtpTestForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/MailSnd1.dfm b/lib/Delphi/Internet/MailSnd1.dfm new file mode 100644 index 00000000..8b204351 Binary files /dev/null and b/lib/Delphi/Internet/MailSnd1.dfm differ diff --git a/lib/Delphi/Internet/MailSnd1.pas b/lib/Delphi/Internet/MailSnd1.pas new file mode 100644 index 00000000..ac5494ee --- /dev/null +++ b/lib/Delphi/Internet/MailSnd1.pas @@ -0,0 +1,588 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: How to use TSmtpCli component +Creation: 09 october 1997 +Version: 2.03 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Oct 26, 1997 V1.00 Released +Jan 10, 1998 V1.01 Added a Port property +Feb 15, 1998 V1.02 Added file attachement support +Mar 06, 1998 V1.03 Check for DisplayMemo overflow (100 lines allowed) +Aug 03, 1998 V2.00 Revised for new asynchronous SMTP component version +Jul 26, 2001 V2.01 Added authentification +Sep 07, 2002 V2.02 Added Cc and Bcc fields. + Added AllInOne demo to show how to "chain" several operations + using OnRequest done, avoiding any wait loop. This is how event + driven operation has to be done. +Sep 15, 2002 V2.02 Corrected typo error in BuildRcptList where CcEdi was used + where ToEdit should. + Thanks to konstantinos.Kokkorogiannis@diala.greenpeace.org + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MailSnd1; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, SmtpProt, StdCtrls, ExtCtrls, IniFiles; + +const + SmtpTestVersion = 2.03; + CopyRight : String = ' MailSnd (c) 1997-2002 F. Piette V2.03 '; + +type + TSmtpTestForm = class(TForm) + MsgMemo: TMemo; + DisplayMemo: TMemo; + ToolsPanel: TPanel; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Subject: TLabel; + Label4: TLabel; + HostEdit: TEdit; + FromEdit: TEdit; + ToEdit: TEdit; + SubjectEdit: TEdit; + SignOnEdit: TEdit; + PortEdit: TEdit; + Label5: TLabel; + AttachPanel: TPanel; + Label6: TLabel; + FileAttachMemo: TMemo; + InfoPanel: TPanel; + Label7: TLabel; + ClearDisplayButton: TButton; + ConnectButton: TButton; + HeloButton: TButton; + MailFromButton: TButton; + RcptToButton: TButton; + DataButton: TButton; + AbortButton: TButton; + QuitButton: TButton; + MailButton: TButton; + OpenButton: TButton; + Label8: TLabel; + SmtpClient: TSmtpCli; + Label9: TLabel; + Label10: TLabel; + UsernameEdit: TEdit; + PasswordEdit: TEdit; + AuthComboBox: TComboBox; + Label11: TLabel; + EhloButton: TButton; + AuthButton: TButton; + Label12: TLabel; + CcEdit: TEdit; + Label13: TLabel; + BccEdit: TEdit; + AllInOneButton: TButton; + procedure FormCreate(Sender: TObject); + procedure ClearDisplayButtonClick(Sender: TObject); + procedure ConnectButtonClick(Sender: TObject); + procedure SmtpClientRequestDone(Sender: TObject; RqType: TSmtpRequest; + Error: Word); + procedure HeloButtonClick(Sender: TObject); + procedure MailFromButtonClick(Sender: TObject); + procedure RcptToButtonClick(Sender: TObject); + procedure DataButtonClick(Sender: TObject); + procedure AbortButtonClick(Sender: TObject); + procedure QuitButtonClick(Sender: TObject); + procedure MailButtonClick(Sender: TObject); + procedure OpenButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure EhloButtonClick(Sender: TObject); + procedure AuthButtonClick(Sender: TObject); + procedure AllInOneButtonClick(Sender: TObject); + procedure SmtpClientDisplay(Sender: TObject; Msg: String); + procedure SmtpClientGetData(Sender: TObject; LineNum: Integer; + MsgLine: Pointer; MaxLen: Integer; var More: Boolean); + procedure SmtpClientHeaderLine(Sender: TObject; Msg: Pointer; + Size: Integer); + private + FIniFileName : String; + FInitialized : Boolean; + FAllInOneFlag : Boolean; + procedure Display(const Msg : String); + procedure BuildRcptList; + procedure ExceptionHandler(Sender: TObject; E: Exception); + end; + +var + SmtpTestForm: TSmtpTestForm; + +implementation + +{$R *.DFM} +const + SectionData = 'Data'; + KeyHost = 'HostName'; + KeyPort = 'Port'; + KeyFrom = 'From'; + KeyTo = 'To'; + KeyCc = 'Cc'; + KeyBcc = 'Bcc'; + KeySubject = 'Subject'; + KeySignOn = 'SignOn'; + KeyUser = 'UserName'; + KeyPass = 'Password'; + KeyAuth = 'Authentification'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in display memo box, making sure we don't overflow it. } +procedure TSmtpTestForm.Display(const Msg : String); +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + { We preserve only 200 lines } + while DisplayMemo.Lines.Count > 200 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + { Makes last line visible } + {$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.FormCreate(Sender: TObject); +begin + Application.OnException := ExceptionHandler; + DisplayMemo.Clear; + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + HostEdit.Text := IniFile.ReadString(SectionData, KeyHost, + 'localhost'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, + 'smtp'); + FromEdit.Text := IniFile.ReadString(SectionData, KeyFrom, + 'first.last@company.com'); + ToEdit.Text := IniFile.ReadString(SectionData, KeyTo, + 'john.doe@acme;tartempion@brol.fr'); + CcEdit.Text := IniFile.ReadString(SectionData, KeyCc, + ''); + BccEdit.Text := IniFile.ReadString(SectionData, KeyBcc, + 'francois.piette@swing.be'); + SubjectEdit.Text := IniFile.ReadString(SectionData, KeySubject, + 'This is the message subject'); + SignOnEdit.Text := IniFile.ReadString(SectionData, KeySignOn, + 'your name'); + UsernameEdit.Text := IniFile.ReadString(SectionData, KeyUser, + 'account name'); + PasswordEdit.Text := IniFile.ReadString(SectionData, KeyPass, + 'account password'); + AuthComboBox.ItemIndex := IniFile.ReadInteger(SectionData, KeyAuth, + 0); + + Top := IniFile.ReadInteger(SectionWindow, KeyTop, (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, (Screen.Width - Width) div 2); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyHost, HostEdit.Text); + IniFile.WriteString(SectionData, KeyPort, PortEdit.Text); + IniFile.WriteString(SectionData, KeyFrom, FromEdit.Text); + IniFile.WriteString(SectionData, KeyTo, ToEdit.Text); + IniFile.WriteString(SectionData, KeyCc, CcEdit.Text); + IniFile.WriteString(SectionData, KeyBcc, BccEdit.Text); + IniFile.WriteString(SectionData, KeySubject, SubjectEdit.Text); + IniFile.WriteString(SectionData, KeySignOn, SignOnEdit.Text); + IniFile.WriteString(SectionData, KeyUser, UsernameEdit.Text); + IniFile.WriteString(SectionData, KeyPass, PasswordEdit.Text); + IniFile.WriteInteger(SectionData, KeyAuth, AuthComboBox.ItemIndex); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.BuildRcptList; +var + Buf : String; + I : Integer; +begin + SmtpClient.RcptName.Clear; + // Recipient list is the sum of To, Cc and Bcc fields + Buf := ''; + if Length(Trim(ToEdit.Text)) > 0 then + Buf := Trim(ToEdit.Text); + if Length(Trim(CcEdit.Text)) > 0 then + Buf := Buf + ';' + Trim(CcEdit.Text); + if Length(Trim(BccEdit.Text)) > 0 then + Buf := Buf + ';' + Trim(BccEdit.Text); + if (Length(Buf) > 0) and (Buf[1] = ';') then + Buf := Trim(Copy(Buf, 2, Length(Buf))); + while TRUE do begin + I := Pos(';', Buf); + if I <= 0 then begin + SmtpClient.RcptName.Add(Trim(Buf)); + break; + end + else begin + SmtpClient.RcptName.Add(Trim(Copy(Buf, 1, I - 1))); + Delete(Buf, 1, I); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.SmtpClientDisplay(Sender: TObject; Msg: String); +begin + Display(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.SmtpClientGetData( + Sender : TObject; + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More: Boolean); +var + Len : Integer; +begin + if LineNum > MsgMemo.Lines.count then + More := FALSE + else begin + Len := Length(MsgMemo.Lines[LineNum - 1]); + { Truncate the line if too long (should wrap to next line) } + if Len >= MaxLen then + StrPCopy(MsgLine, Copy(MsgMemo.Lines[LineNum - 1], 1, MaxLen - 1)) + else + StrPCopy(MsgLine, MsgMemo.Lines[LineNum - 1]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.SmtpClientHeaderLine( + Sender : TObject; + Msg : Pointer; + Size : Integer); +begin + { This demonstrate how to add a line to the message header } + { Just detect one of the header lines and add text at the end of this } + { line. Use #13#10 to form a new line } + { Here we check for the From: header line and add a Comments: line } + if StrLIComp(Msg, 'From:', 5) = 0 then + StrCat(Msg, #13#10 + 'Comments: This is a test'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.ClearDisplayButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.ExceptionHandler(Sender: TObject; E: Exception); +begin + Application.ShowException(E); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Connect to the mail server } +procedure TSmtpTestForm.ConnectButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + SmtpClient.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Send HELO command with our local identification } +procedure TSmtpTestForm.HeloButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.Helo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.EhloButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.EHlo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.AuthButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.Username := UsernameEdit.Text; + SmtpClient.Password := PasswordEdit.Text; + SmtpClient.AuthType := TSmtpAuthType(AuthComboBox.ItemIndex); + SmtpClient.Auth; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Open is Connect and Helo methods combined } +procedure TSmtpTestForm.OpenButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.Open; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Send originator } +procedure TSmtpTestForm.MailFromButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.FromName := FromEdit.Text; + SmtpClient.MailFrom; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Send recipients } +procedure TSmtpTestForm.RcptToButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + BuildRcptList; + SmtpClient.RcptTo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Send text and attached files to mail server } +procedure TSmtpTestForm.DataButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + BuildRcptList; + SmtpClient.HdrFrom := FromEdit.Text; + SmtpClient.HdrTo := ToEdit.Text; + SmtpClient.HdrCc := CcEdit.Text; + SmtpClient.HdrSubject := SubjectEdit.Text; + SmtpClient.EmailFiles := FileAttachMemo.Lines; + SmtpClient.Data; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MailFrom, RcptTo and Data methods combined } +procedure TSmtpTestForm.MailButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + BuildRcptList; + SmtpClient.HdrFrom := FromEdit.Text; + SmtpClient.HdrTo := ToEdit.Text; + SmtpClient.HdrTo := CcEdit.Text; + SmtpClient.HdrSubject := SubjectEdit.Text; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.FromName := FromEdit.Text; + SmtpClient.EmailFiles := FileAttachMemo.Lines; + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + SmtpClient.Mail; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.QuitButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.Quit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.AbortButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.SmtpClientRequestDone( + Sender : TObject; + RqType : TSmtpRequest; + Error : Word); +begin + { For every operation, we display the status } + Display('RequestDone Rq=' + IntToStr(Ord(RqType)) + + ' Error='+ IntToStr(Error)); + { Check if the user has asked for "All-In-One" demo } + if not FAllInOneFlag then + Exit; { No, nothing more to do here } + { We are in "All-In-One" demo, start next operation } + { But first check if previous one was OK } + if Error <> 0 then begin + FAllInOneFlag := FALSE; { Terminate All-In-One demo } + Display('Error, stoped All-In-One demo'); + Exit; + end; + case RqType of + smtpConnect: SmtpClient.Helo; + smtpHelo: SmtpClient.MailFrom; + smtpMailFrom: SmtpClient.RcptTo; + smtpRcptTo: SmtpClient.Data; + smtpData: SmtpClient.Quit; + smtpQuit: Display('All-In-One done !'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.AllInOneButtonClick(Sender: TObject); +begin + if SmtpClient.Connected then begin + MessageBeep(MB_OK); + Display('All-In-One demo start in non connected state.'); + Display('Please quit or abort the connection first.'); + Exit; + end; + + FAllInOneFlag := TRUE; + + { Initialize all SMTP component properties from our GUI } + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.FromName := FromEdit.Text; + SmtpClient.HdrFrom := FromEdit.Text; + SmtpClient.HdrTo := ToEdit.Text; + SmtpClient.HdrCc := CcEdit.Text; + SmtpClient.HdrSubject := SubjectEdit.Text; + SmtpClient.EmailFiles := FileAttachMemo.Lines; + { Recipient list is computed from To, Cc and Bcc fields } + { We use a little function to do that. } + BuildRcptList; + { Start first operation to do to send an email } + { Next operations are started from OnRequestDone event } + SmtpClient.Connect +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/MbxSub.dpr b/lib/Delphi/Internet/MbxSub.dpr new file mode 100644 index 00000000..dd36edbd --- /dev/null +++ b/lib/Delphi/Internet/MbxSub.dpr @@ -0,0 +1,13 @@ +program MbxSub; + +uses + Forms, + MbxSub1 in 'MbxSub1.pas' {AppBaseForm}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TAppBaseForm, AppBaseForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/MbxSub1.dfm b/lib/Delphi/Internet/MbxSub1.dfm new file mode 100644 index 00000000..728658d4 Binary files /dev/null and b/lib/Delphi/Internet/MbxSub1.dfm differ diff --git a/lib/Delphi/Internet/MbxSub1.pas b/lib/Delphi/Internet/MbxSub1.pas new file mode 100644 index 00000000..98dc43af --- /dev/null +++ b/lib/Delphi/Internet/MbxSub1.pas @@ -0,0 +1,621 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: Mar 20, 1999 +Description: This program is used to scan an MBX file (Outlook Express) and + search for subscription messages to one of F. Piette mailing + lists. It extract EMail address from the subsject and add it + to a DBF file if not already there. DBF file is automatically + created if not found in same directory as exe file. You can + select MBX file using an entry in INI file. + I use this program to find new subscribers and send a message + to them asking for subscription postcard. + This program will not work with Delphi 1 because it uses + 32 bits features such as splitter bar and long strings. +Version: 1.00 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Unsupported code. +Legal issues: Copyright (C) 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MbxSub1; + +{$IFDEF VER80} + Bomb('Sorry, this program uses 32 bits features.'); +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + IniFiles, StdCtrls, ExtCtrls, MbxFile, Db, DBTables, Bde, Grids, DBGrids, + DBCtrls, ComCtrls; + +const + WM_APPSTARTUP = WM_USER + 1; + +type + TAppBaseForm = class(TForm) + ToolsPanel: TPanel; + MbxHandler1: TMbxHandler; + ScanButton: TButton; + EMailTable: TTable; + PageControl1: TPageControl; + ScanTabSheet: TTabSheet; + DisplayMemo: TMemo; + EMailMemo: TMemo; + Splitter1: TSplitter; + ViewTabSheet: TTabSheet; + Panel1: TPanel; + EMailDBNavigator: TDBNavigator; + EMailDBGrid: TDBGrid; + EMailDataSource: TDataSource; + FindEdit: TEdit; + SortByDateRadioButton: TRadioButton; + SortByEmailRadioButton: TRadioButton; + OpenDialog1: TOpenDialog; + BrowseButton: TButton; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure ScanButtonClick(Sender: TObject); + procedure PageControl1Change(Sender: TObject); + procedure FindEditChange(Sender: TObject); + procedure SortByDateRadioButtonClick(Sender: TObject); + procedure SortByEmailRadioButtonClick(Sender: TObject); + procedure BrowseButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FDatabaseName : String; + FTableName : String; + function Extract(Item : String) : String; + procedure CreateDataTable; + procedure PackTable(aTable : TTable); + procedure WMAppStartup(var msg: TMessage); message WM_APPSTARTUP; + procedure SelectIndex; + public + procedure Display(Msg : String); + property IniFileName : String read FIniFileName write FIniFileName; + end; + +function RenameToNumberedFile(From : String) : String; +function GetToken(pDelim : PCHar; Src : PChar; var Dst : String): PChar; + +var + AppBaseForm: TAppBaseForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Window'; // Must be unique for each window + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyMbxFile = 'MbxFile'; + KeySplitter = 'Splitter'; + TempFileName = 'MbxSub.tmp'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FDatabaseName := LowerCase(ExtractFilePath(Application.ExeName)); + FTableName := 'subscribe.dbf'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + DisplayMemo.Width := IniFile.ReadInteger(SectionData, KeySplitter, Width div 2); + MbxHandler1.FileName := IniFile.ReadString(SectionData, KeyMbxFile, + 'c:\Windows\Application Data\Microsoft\Outlook Express\Mail\Dossier24.mbx'); + IniFile.WriteString(SectionData, KeyMbxFile, MbxHandler1.FileName); + IniFile.Destroy; + DisplayMemo.Clear; + EMailMemo.Clear; + FindEdit.Clear; + SortByEmailRadioButton.Checked := TRUE; + PageControl1.ActivePage := ScanTabSheet; + Caption := 'MbxSub - ' + ExtractFileName(MbxHandler1.FileName); + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteInteger(SectionData, KeySplitter, DisplayMemo.Width); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.WMAppStartup(var msg: TMessage); +var + I : Integer; +begin + Update; + EMailTable.DatabaseName := FDatabaseName; + EMailTable.TableName := FTableName; + try + EMailTable.Open; + except + on E:EDBEngineError do begin + if E.Errors[0].ErrorCode = DBIERR_NOSUCHTABLE then begin + Display('Missing datafile. Creating a new file.'); + CreateDataTable; + EMailTable.Open; + end + else if E.Errors[0].ErrorCode = DBIERR_NOSUCHINDEX then begin + Display('Missing index file. Creating new index file.'); + DeleteFile(FDatabaseName + TempFileName); + RenameFile(FDatabaseName + FTableName, FDatabaseName + TempFileName); + CreateDataTable; + DeleteFile(FDatabaseName + FTableName); + RenameFile(FDatabaseName + TempFileName, FDatabaseName + FTableName); + PackTable(EMailTable); + EMailTable.Open; + end + else if (E.Errors[0].Category = ERRCAT_DATACORRUPT) and + (E.ErrorCount > 1) and + (UpperCase(ExtractFileExt(E.Errors[1].Message)) = '.MDX') then begin + Display('Corrupt index file. Rebuilding index file.'); + DeleteFile(FDatabaseName + TempFileName); + RenameFile(FDatabaseName + FTableName, FDatabaseName + TempFileName); + CreateDataTable; + DeleteFile(FDatabaseName + FTableName); + RenameFile(FDatabaseName + TempFileName, FDatabaseName + FTableName); + PackTable(EMailTable); + EMailTable.Open; + end + else if E.Errors[0].ErrorCode = DBIERR_HEADERCORRUPT then begin + Display('Corrupt data file.'); + Display('Save corrupted file to: ''' + + RenameToNumberedFile(FDatabaseName + + FTableName) + + ''''); + Display('Creating new data file.'); + CreateDataTable; + EMailTable.Open; + end + else begin + Display(E.ClassName + ': ' + E.Message); + for I := 0 to E.ErrorCount - 1 do + Display(IntToStr(E.Errors[I].ErrorCode) + '/' + + IntToStr(E.Errors[I].Category) + + ': ' + E.Errors[I].Message); + end; + end; + end; + EMailTable.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.Display(Msg : String); +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + while DisplayMemo.Lines.Count > 200 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +//Fri, 19 Mar 1999 18:50:07 +0100 +function ExtractDate(S : String) : TDateTime; +var + P : PChar; + Token : String; + Year, Month, Day : Word; +begin + P := PChar(S); + if P = nil then begin + Result := 0; + Exit; + end; + // Get day of week + P := GetToken(' ', P, Token); + Token := LowerCase(Copy(Trim(Token), 1, 3)); + if not ((Token = 'mon') or (Token = 'tue') or + (Token = 'wed') or (Token = 'thu') or + (Token = 'fri') or (Token = 'sat') or (Token = 'sun')) then + raise Exception.Create('Invalid day name: ' + S); + + // get day + P := GetToken(' ', P, Token); + Day := StrToInt(Trim(Token)); + + // get month + P := GetToken(' ', P, Token); + Token := LowerCase(Trim(Token)); + if Token = 'jan' then + Month := 1 + else if Token = 'feb' then + Month := 2 + else if Token = 'mar' then + Month := 3 + else if Token = 'apr' then + Month := 4 + else if Token = 'may' then + Month := 5 + else if Token = 'jun' then + Month := 6 + else if Token = 'jul' then + Month := 7 + else if Token = 'aug' then + Month := 8 + else if Token = 'sep' then + Month := 9 + else if Token = 'oct' then + Month := 10 + else if Token = 'nov' then + Month := 11 + else if Token = 'dec' then + Month := 12 + else + raise Exception.Create('Invalid month name: ' + S); + + // get year + GetToken(' ', P, Token); + Year := StrToInt(Trim(Token)); + + Result := EncodeDate(Year, Month, Day); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.ScanButtonClick(Sender: TObject); +var + Subject : String; + Token : String; + List : String; + EMail : String; + P : PChar; + MsgDate : String; + MsgCount : Integer; + NewCount : Integer; + FieldEMail : TField; + FieldSubDate : TField; +// FieldUnsDate : TField; +// FieldName : TField; +begin + Display('Scanning ' + MbxHandler1.FileName); + PageControl1.ActivePage := ScanTabSheet; + MsgCount := 0; + NewCount := 0; + EMailTable.Active := TRUE; + EMailTable.IndexName := 'EMAIL'; + FieldEMail := EMailTable.FieldByName('EMail'); + FieldSubDate := EMailTable.FieldByName('SubDate'); +// FieldName := EMailTable.FieldByName('Name'); +// FieldUnsDate := EMailTable.FieldByName('UnsDate'); + + MbxHandler1.Active := TRUE; + MbxHandler1.First; + while not MbxHandler1.Eof do begin + Inc(MsgCount); + Subject := Extract('Subject'); +// Display(Subject); + P := PChar(Subject); + P := GetToken(' ', P, Token); + Token := LowerCase(Trim(Token)); + if Token = 'subscribe' then begin + P := GetToken(' ', P, List); + List := LowerCase(Trim(List)); + if (List = 'twsocket') or + (List = 'twsocket-announce') or + (List = 'midware') then begin + GetToken(' ', P, EMail); + EMail := LowerCase(Trim(EMail)); +if Copy(Email, 1, 5) = 'napol' then + MessageBeep(MB_OK); + EMailTable.SetKey; + FieldEMail.AsString := EMail; + EMailTable.GotoNearest; + if FieldEMail.AsString <> EMail then begin + // Do not exists yet, will create + Inc(NewCount); + MsgDate := Extract('Date'); + Display(List + ' ' + EMail); + EMailMemo.Lines.Add(EMail + ';'); + EMailTable.Append; + FieldEMail.AsString := EMail; + FieldSubDate.AsString := FormatDateTime('YYYYMMDD', ExtractDate(MsgDate)); + EMailTable.Post; + end; + end; + end; + MbxHandler1.Next; + end; + MbxHandler1.Active := FALSE; + EMailTable.Active := FALSE; + Display('Done ' + IntToStr(MsgCount) + '/' + IntToStr(NewCount)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TAppBaseForm.Extract(Item : String) : String; +var + P, Q, R : PChar; +begin + Result := ''; + P := MbxHandler1.MsgStream.Memory; + Q := StrPos(P, PChar(#13#10 + Item + ': ')); + if Q <> nil then begin + R := StrPos(Q + 2, #13#10); + if R > Q then begin + SetLength(Result, R - Q - 2 - Length(Item) - 2); + if Length(Result) > 0 then + Move(Q[2 + Length(Item) + 2], Result[1], Length(Result)); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.PackTable(aTable : TTable); +var + Status : Integer; +begin + aTable.Active := FALSE; + aTable.Exclusive := TRUE; + aTable.Active := TRUE; + + Status := DbiPackTable(aTable.DataBase.Handle, + aTable.Handle, + nil, nil, TRUE); + + if Status <> DBIERR_NONE then + DbiError(Status); + aTable.Active := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.CreateDataTable; +var + Table : TTable; +begin + Table := TTable.Create(nil); + try + Table.TableType := ttDBase; + Table.DatabaseName := FDatabaseName; + Table.TableName := FTableName; + with Table.FieldDefs do begin + Clear; + + Add('SubDate', ftString, 8, FALSE); + Add('UnsDate', ftString, 8, FALSE); + Add('EMail', ftString, 64, FALSE); + Add('Name', ftString, 64, FALSE); + end; + + // A bug in D3 prevent us from defining the indexes before calling + // CreateTable. We will just add the indexes after creation. + Table.CreateTable; + Table.AddIndex('EMail', 'EMAIL+SUBDATE', [ixExpression]); + Table.AddIndex('SubDate', 'SUBDATE', []); + + finally + Table.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +// Replace any existing file extension, or add an extension is none exists. +// The extension is a 3 digits number, with leading zeros, build to make +// it unique. Numbering start at 001 and increment until an unused number +// is found. If 1000 is reached, then an exception will be triggered. +function RenameToNumberedFile(From : String) : String; +var + FPath : String; + FDir : String; + FName : String; + FExt : String; + FBaseName : String; + FileHandle : DWORD; + Count : Integer; +begin + FExt := ExtractFileExt(From); + FName := Copy(From, 1, Length(From) - Length(FExt)); + FName := ExtractFileName(FName); + FDir := ExtractFilePath(From); + if FDir[Length(FDir)] <> '\' then + FDir := FDir + '\'; + + Count := 1; + while TRUE do begin + FBaseName := FName + '.' + Format('%3.3d', [Count]); + FPath := FDir + FBaseName; + FileHandle := CreateFile(PChar(FPath), + GENERIC_READ or GENERIC_WRITE, + 0, // ShareMode + nil, // SecurityAttributes + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + 0); // TemplateFile + if FileHandle = INVALID_HANDLE_VALUE then begin + RenameFile(From, FPath); + Result := FPath; + Exit; + end; + // File exists, close it and continue + Windows.CloseHandle(FileHandle); + + // Be sure to not loop forever here ! + Inc(Count); + if Count >= 1000 then + raise Exception.Create('RenameToNumberedFile failed'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetToken(pDelim : PChar; Src : PChar; var Dst : String): PChar; +var + FldSep : Char; + RecSep : Char; +begin + Dst := ''; + if Src = nil then begin + Result := nil; + Exit; + end; + + FldSep := pDelim[0]; + RecSep := pDelim[1]; + Result := Src; + + while (Result^ <> FldSep) and (Result^ <> RecSep) do begin + Dst := Dst + Result^; + Inc(Result); + end; + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.PageControl1Change(Sender: TObject); +begin + if PageControl1.ActivePage = ViewTabSheet then begin + EMailTable.Active := TRUE; + SelectIndex; + end + else + EMailTable.Active := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.SelectIndex; +begin + if SortByEmailRadioButton.Checked then + EMailTable.IndexName := 'EMAIL' + else + EMailTable.IndexName := 'SUBDATE'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.FindEditChange(Sender: TObject); +var + FldName : String; +begin + if not EMailTable.Active then + Exit; + SelectIndex; + if SortByEmailRadioButton.Checked then + FldName := 'EMAIL' + else + FldName := 'SUBDATE'; + EMailTable.SetKey; + EMailTable.FieldByName(FldName).AsString := LowerCase(Trim(FindEdit.Text)); + EMailTable.GotoNearest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.SortByDateRadioButtonClick(Sender: TObject); +begin + SelectIndex; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.SortByEmailRadioButtonClick(Sender: TObject); +begin + SelectIndex; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.BrowseButtonClick(Sender: TObject); +var + IniFile : TIniFile; +begin + OpenDialog1.DefaultExt := 'mbx'; + OpenDialog1.InitialDir := ExtractFilePath(MbxHandler1.FileName); + OpenDialog1.FileName := ExtractFileName(MbxHandler1.FileName); + OpenDialog1.Filter := 'Mailbox files (*.mbx)|*.mbx|All files (*.*)|*.*'; + if not OpenDialog1.Execute then + Exit; + MbxHandler1.Close; + MbxHandler1.FileName := OpenDialog1.FileName; + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyMbxFile, MbxHandler1.FileName); + IniFile.Free; + Caption := 'MbxSub - ' + ExtractFileName(MbxHandler1.FileName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/MimeDemo.dpr b/lib/Delphi/Internet/MimeDemo.dpr new file mode 100644 index 00000000..94a5d757 --- /dev/null +++ b/lib/Delphi/Internet/MimeDemo.dpr @@ -0,0 +1,12 @@ +program MimeDemo; + +uses + Forms, + MimeDmo1 in 'MIMEDMO1.PAS' {MimeDecodeForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMimeDecodeForm, MimeDecodeForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/MimeDmo1.dfm b/lib/Delphi/Internet/MimeDmo1.dfm new file mode 100644 index 00000000..9dd9765f Binary files /dev/null and b/lib/Delphi/Internet/MimeDmo1.dfm differ diff --git a/lib/Delphi/Internet/MimeDmo1.pas b/lib/Delphi/Internet/MimeDmo1.pas new file mode 100644 index 00000000..52b766e8 --- /dev/null +++ b/lib/Delphi/Internet/MimeDmo1.pas @@ -0,0 +1,352 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: This program is a demo for TMimeDecode component. + TMimeDecode is a component whose job is to decode MIME encoded + EMail messages (file attach). You can use it for example to + decode messages received with a POP3 component. + MIME is described in RFC-1521. headers are described if RFC-822. +Creation: March 08, 1998 +Version: 1.05 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +Updates: +Sep 13, 1998 V1.01 Added part and header end numbering +Feb 16/02/99 V1.02 In OnPartLine event handler, assemble line of text for + display. +May 04, 2002 V1.03 Adapted InLineDecodeLine event to new Len argument. + Added file store for UUEncoded files. +Nov 01, 2002 V1.04 Changed PChar arguments to Pointer to work around Delphi 7 + bug with PAnsiChar<->PChar (change has be done in component). + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MimeDmo1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, IniFiles, MimeDec; + +type + TMimeDecodeForm = class(TForm) + Panel1: TPanel; + FileEdit: TEdit; + DecodeButton: TButton; + Memo1: TMemo; + MimeDecode1: TMimeDecode; + Label1: TLabel; + ClearButton: TButton; + procedure DecodeButtonClick(Sender: TObject); + procedure MimeDecode1PartBegin(Sender: TObject); + procedure MimeDecode1PartEnd(Sender: TObject); + procedure MimeDecode1PartHeaderLine(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure ClearButtonClick(Sender: TObject); + procedure MimeDecode1HeaderLine(Sender: TObject); + procedure MimeDecode1PartLine(Sender: TObject; Data: Pointer; + DataLen: Integer); + procedure MimeDecode1HeaderBegin(Sender: TObject); + procedure MimeDecode1HeaderEnd(Sender: TObject); + procedure MimeDecode1PartHeaderBegin(Sender: TObject); + procedure MimeDecode1PartHeaderEnd(Sender: TObject); + procedure MimeDecode1InlineDecodeBegin(Sender: TObject; + Filename: String); + procedure MimeDecode1InlineDecodeEnd(Sender: TObject; + Filename: String); + procedure MimeDecode1InlineDecodeLine(Sender: TObject; + Line: Pointer; Len : Integer); + private + FInitialized : Boolean; + FIniFileName : String; + FLineBuf : array [0..255] of char; + FCharCnt : Integer; + FFileStream : TFileStream; + FFileName : String; + procedure Display(Msg: String); + end; + +var + MimeDecodeForm: TMimeDecodeForm; + +implementation + +{$R *.DFM} +const + SectionData = 'Data'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + KeyFile = 'FileName'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + Memo1.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + FileEdit.Text := IniFile.ReadString(SectionData, KeyFile, ''); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyFile, FileEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.DecodeButtonClick(Sender: TObject); +begin + Memo1.Clear; + Update; + MimeDecode1.DecodeFile(FileEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.Display(Msg: String); +begin + { TMemo cannot hold too much data. Limit to 400 lines } + if Memo1.Lines.count > 400 then + Memo1.Clear; + Memo1.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartBegin(Sender: TObject); +begin + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' BEGIN ----------'); + FCharCnt := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartEnd(Sender: TObject); +begin + if FCharCnt > 0 then begin + Display(StrPas(FLineBuf)); + FCharCnt := 0; + end; + + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' END ----------'); + { Close file, if any } + if Assigned(FFileStream) then begin + FFileStream.Destroy; + FFileStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Decoded data arrives here. This routine suppose that we have text data } +{ organized in lines. } +procedure TMimeDecodeForm.MimeDecode1PartLine( + Sender : TObject; + Data : Pointer; + DataLen : Integer); +var + I : Integer; +begin + { Copy data to LineBuf until CR/LF } + I := 0; + while (I < DataLen) do begin + if PChar(Data)[I] = #13 then { Just ignre CR } + Inc(I) + else if PChar(Data)[I] = #10 then begin { LF is end of line } + FLineBuf[FCharCnt] := #0; + Display(StrPas(FLineBuf)); + FCharCnt := 0; + Inc(I); + end + else begin + FLineBuf[FCharCnt] := PChar(Data)[I]; + Inc(FCharCnt); + Inc(I); + end; + if FCharCnt >= (High(FLineBuf) - 1) then begin + { Buffer overflow, display data accumulated so far } + FLineBuf[High(FLineBuf) - 1] := #0; + Display(StrPas(FLineBuf)); + FCharCnt := 0; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderLine(Sender: TObject); +begin + Display('Part header: ' + StrPas(MimeDecode1.CurrentData)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.ClearButtonClick(Sender: TObject); +begin + Memo1.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderLine(Sender: TObject); +begin + Display('Msg header: ' + StrPas(MimeDecode1.CurrentData)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderBegin(Sender: TObject); +begin + Display('--------- HEADER BEGIN ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderEnd(Sender: TObject); +begin + Display('--------- HEADER END ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderBegin(Sender: TObject); +begin + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' HEADER BEGIN ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderEnd(Sender: TObject); +begin + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' HEADER END ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1InlineDecodeBegin( + Sender : TObject; + FileName : String); +begin + Display('--------- INLINE begin. Filename is ''' + FileName + ''''); + Display(''); + FFileName := FileNAme; + if Assigned(FFileStream) then + FFileStream.Destroy; { Close previous file, if any } + FFileStream := TFileStream.Create('MimeFile_' + FFileName, fmCreate); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1InlineDecodeEnd( + Sender : TObject; + Filename : String); +begin + Display('--------- INLINE end'); + { Close file, if any } + if Assigned(FFileStream) then begin + FFileStream.Destroy; + FFileStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1InlineDecodeLine( + Sender : TObject; + Line : Pointer; + Len : Integer); +var + LastLine : String; + DataLine : String; +begin + if (Line = nil) or (Len <= 0) then + Exit; + { If any file assigned, then write data to it } + if Assigned(FFileStream) then + FFileStream.Write(Line^, Len); + + SetLength(DataLine, Len); + Move(Line^, DataLine[1], Len); + if Memo1.Lines.Count < 1 then + Memo1.Lines.Add(DataLine) + else begin + LastLine := Memo1.Lines.Strings[Memo1.Lines.Count - 2]; + Memo1.Lines.Delete(Memo1.Lines.Count - 1); + Memo1.Lines.Delete(Memo1.Lines.Count - 1); + LastLine := LastLine + DataLine; + Memo1.Lines.Add(LastLine); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/MimeTst.dpr b/lib/Delphi/Internet/MimeTst.dpr new file mode 100644 index 00000000..a4bb0b85 --- /dev/null +++ b/lib/Delphi/Internet/MimeTst.dpr @@ -0,0 +1,12 @@ +program MimeTst; + +uses + Forms, + MimeTst1 in 'MimeTst1.pas' {MimeTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMimeTestForm, MimeTestForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/MimeTst1.dfm b/lib/Delphi/Internet/MimeTst1.dfm new file mode 100644 index 00000000..da15472b Binary files /dev/null and b/lib/Delphi/Internet/MimeTst1.dfm differ diff --git a/lib/Delphi/Internet/MimeTst1.pas b/lib/Delphi/Internet/MimeTst1.pas new file mode 100644 index 00000000..d2aa7cea --- /dev/null +++ b/lib/Delphi/Internet/MimeTst1.pas @@ -0,0 +1,232 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE + Using code donated by Brad Choate +Object: Demo for MIME support (files attach) in sending files. + This demo use TSyncSmtpCli for simplicity. High performnace + programs should use the async SMTP component TSmtpCli. +Creation: February 14th, 1998 +Version: 1.13 +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 12, 1998 V1.10 Revised to use the new TSyncSmtpCli component. +Mar 06, 1999 V1.11 Replaced LastDelimiter by FindLastDelim for D2 compatibility + Added Trim functions for Delphi 1. Used GetText/SetText for + TStrings because of Delphi 1. +Aug 21, 1999 V1.12 Disposed memory got with GetText. +Nov 01, 2002 V1.13 Changed arguments in events handlers from PChar to Pointer + to reflect this change in the component. + Added a call to HeloSync before MailSync because some servers + really wants this before accepting email. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MimeTst1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, SmtpProt, StdCtrls, ExtCtrls; + +type + TMimeTestForm = class(TForm) + FSmtp: TSyncSmtpCli; + MsgMemo: TMemo; + DisplayMemo: TMemo; + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + FromEdit: TEdit; + ToEdit: TEdit; + Label3: TLabel; + SubjectEdit: TEdit; + SendMailButton: TButton; + HostEdit: TEdit; + Label4: TLabel; + Panel2: TPanel; + FileListMemo: TMemo; + Label5: TLabel; + Label6: TLabel; + Panel3: TPanel; + Label7: TLabel; + procedure SendMailButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FSmtpDisplay(Sender: TObject; Msg: String); + procedure FSmtpGetData(Sender: TObject; LineNum: Integer; + MsgLine: Pointer; MaxLen: Integer; var More: Boolean); + end; + +var + MimeTestForm: TMimeTestForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeTestForm.FormCreate(Sender: TObject); +begin + FileListMemo.Clear; + FileListMemo.Lines.Add('c:\temp\test.txt'); + FileListMemo.Lines.Add('c:\temp\brol.txt'); + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function FindLastDelim(Delim : Char; const S : String) : Integer; +begin + Result := Length(S); + while (Result > 0) and (S[Result] <> Delim) do + Dec(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ General-purpose routine that reformats the text portion } +{ of our message to a particular margin. } +procedure Reformat(stl: TStrings; iMargin: integer); +var + sOverage, sUnderage: string; + i, iBreak: integer; +begin + i := 0; + while i < stl.Count do begin + if Length(stl[i]) > iMargin then begin + iBreak := FindLastDelim(' ', Copy(stl[i], 1, iMargin)); + if iBreak > 0 then begin + sOverage := Trim(Copy(stl[i], iBreak, Length(stl[i]))); + sUnderage := Copy(stl[i], 1, iBreak - 1); + if Trim(sUnderage) <> '' then begin + stl[i] := sUnderage; + stl.Insert(i + 1, sOverage); + end; + end; + end; + Inc(i); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeTestForm.SendMailButtonClick(Sender: TObject); +var + TextPtr : PChar; +begin + TextPtr := FileListMemo.Lines.GetText; + FSmtp.EmailFiles.SetText(TextPtr); + StrDispose(TextPtr); + FSmtp.RcptName.Clear; + FSmtp.RcptName.Add(ToEdit.text); + FSmtp.HdrSubject := SubjectEdit.text; + FSmtp.FromName := FromEdit.Text; + FSmtp.HdrFrom := FromEdit.Text; + FSmtp.HdrTo := ToEdit.Text; + FSmtp.Host := HostEdit.Text; + FSmtp.Port := 'smtp'; + FSmtp.ConnectSync; + FSmtp.HeloSync; + FSmtp.MailSync; + FSmtp.QuitSync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeTestForm.FSmtpDisplay(Sender: TObject; Msg: String); +begin + if DisplayMemo.Lines.count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeTestForm.FSmtpGetData(Sender: TObject; LineNum: Integer; + MsgLine: Pointer; MaxLen: Integer; var More: Boolean); +var + Len : Integer; +begin + if LineNum > MsgMemo.Lines.count then + More := FALSE + else begin + Len := Length(MsgMemo.Lines[LineNum - 1]); + { Truncate the line if too long (should wrap to next line) } + if Len >= MaxLen then + StrPCopy(MsgLine, Copy(MsgMemo.Lines[LineNum - 1], 1, MaxLen - 1)) + else + StrPCopy(MsgLine, MsgMemo.Lines[LineNum - 1]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/NewsRdr1.dfm b/lib/Delphi/Internet/NewsRdr1.dfm new file mode 100644 index 00000000..9e91f054 Binary files /dev/null and b/lib/Delphi/Internet/NewsRdr1.dfm differ diff --git a/lib/Delphi/Internet/NewsRdr1.pas b/lib/Delphi/Internet/NewsRdr1.pas new file mode 100644 index 00000000..fe13113e --- /dev/null +++ b/lib/Delphi/Internet/NewsRdr1.pas @@ -0,0 +1,732 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This sample program show how to use TNntpCli to write a news + enabled application. +Creation: December 24, 1997 +Version: 0.94 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Dec 29, 1997 V0.91 Adapted to be compatible with Delphi 1 +Jan 04, 1998 V0.92 Added LIST OVERVIEW.FMT, XOVER and DATE +Jan 31, 1998 V0.93 Added the UserEditBox (used for Post command) + Added code to get UserName and EMail from IE settings +Aug 14, 1999 V0.94 Added support for XHDR and MODE READER. + Corrected a bug that let Connect and Abort button + disabled when DNS lookup failed. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit NewsRdr1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, NntpCli, StdCtrls, ExtCtrls, IniFiles; + +type + TNNTPForm = class(TForm) + NntpCli1: TNntpCli; + Panel1: TPanel; + ServerEdit: TEdit; + ConnectButton: TButton; + Label1: TLabel; + DisplayMemo: TMemo; + AbortButton: TButton; + GroupButton: TButton; + GroupEdit: TEdit; + ArticleNumEdit: TEdit; + ArticleByNumberButton: TButton; + ArticleByIDButton: TButton; + NextButton: TButton; + LastButton: TButton; + HeadByNumberButton: TButton; + HeadByIDButton: TButton; + BodyByNumberButton: TButton; + BodyByIDButton: TButton; + StatByNumberButton: TButton; + StatByIDButton: TButton; + ListButton: TButton; + ArticleIDEdit: TEdit; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + PostButton: TButton; + QuitButton: TButton; + FileEdit: TEdit; + Label5: TLabel; + NewGroupsButton: TButton; + NewNewsButton: TButton; + HelpButton: TButton; + XOverButton: TButton; + OverViewFmtButton: TButton; + DateButton: TButton; + UserEdit: TEdit; + Label6: TLabel; + Label7: TLabel; + UserNameEdit: TEdit; + Label8: TLabel; + PasswordEdit: TEdit; + AuthenticateButton: TButton; + ModeReaderButton: TButton; + XHdrButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure NntpCli1SessionConnected(Sender: TObject; Error: Word); + procedure NntpCli1SessionClosed(Sender: TObject; Error: Word); + procedure AbortButtonClick(Sender: TObject); + procedure GroupButtonClick(Sender: TObject); + procedure NntpCli1RequestDone(Sender: TObject; RqType: TNntpRequest; Error: Word); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure ArticleByNumberButtonClick(Sender: TObject); + procedure NntpCli1DataAvailable(Sender: TObject; Error: Word); + procedure NntpCli1MessageLine(Sender: TObject); + procedure NntpCli1MessageBegin(Sender: TObject); + procedure NntpCli1MessageEnd(Sender: TObject); + procedure ArticleByIDButtonClick(Sender: TObject); + procedure NextButtonClick(Sender: TObject); + procedure LastButtonClick(Sender: TObject); + procedure HeadByIDButtonClick(Sender: TObject); + procedure HeadByNumberButtonClick(Sender: TObject); + procedure BodyByIDButtonClick(Sender: TObject); + procedure BodyByNumberButtonClick(Sender: TObject); + procedure StatByIDButtonClick(Sender: TObject); + procedure StatByNumberButtonClick(Sender: TObject); + procedure ListButtonClick(Sender: TObject); + procedure PostButtonClick(Sender: TObject); + procedure QuitButtonClick(Sender: TObject); + procedure NewGroupsButtonClick(Sender: TObject); + procedure NewNewsButtonClick(Sender: TObject); + procedure HelpButtonClick(Sender: TObject); + procedure XOverButtonClick(Sender: TObject); + procedure OverViewFmtButtonClick(Sender: TObject); + procedure DateButtonClick(Sender: TObject); + procedure AuthenticateButtonClick(Sender: TObject); + procedure ModeReaderButtonClick(Sender: TObject); + procedure XHdrButtonClick(Sender: TObject); + procedure NntpCli1XHdrBegin(Sender: TObject); + procedure NntpCli1XHdrEnd(Sender: TObject); + procedure NntpCli1XHdrLine(Sender: TObject); + private + FInitialized : Boolean; + FDataStream : TStream; + function GetStream : TStream; + procedure Display(Msg : String); + procedure LineToStream(Buf : String); + end; + +var + NNTPForm: TNNTPForm; + +implementation + +{$R *.DFM} + +{$IFNDEF VER80} +uses + Registry; +{$ENDIF} + + +const + IniFileName = 'NEWSRDR.INI'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + EMail : String; + UserName : String; +{$IFNDEF VER80} + Reg : TRegistry; + Key : String; +{$ENDIF} +begin + if FInitialized then + Exit; + FInitialized := TRUE; + + EMail := 'your.name@yourcompany.domain'; + UserName := 'Your Name'; + +{$IFNDEF VER80} + { Get username and EMail from the Internet Explorer settings } + { Should add code for Netscape Navigator... } + Reg := TRegistry.Create; + Reg.RootKey := HKEY_CURRENT_USER; + Key := '\Software\Microsoft\Internet Mail and News\Mail'; + if Reg.OpenKey(Key, FALSE) then begin + EMail := Reg.ReadString('Sender EMail'); + UserName := Reg.ReadString('Sender Name'); + end; + Reg.CloseKey; + Reg.Free; +{$ENDIF} + + IniFile := TIniFile.Create(IniFileName); + Top := IniFile.ReadInteger('Window', 'Top', Top); + Left := IniFile.ReadInteger('Window', 'Left', Left); + Width := IniFile.ReadInteger('Window', 'Width', Width); + Height := IniFile.ReadInteger('Window', 'Height', Height); + ServerEdit.Text := IniFile.ReadString('Data', 'Server', ''); + ArticleNumEdit.Text := IniFile.ReadString('Data', 'ArticleNum', ''); + ArticleIDEdit.Text := IniFile.ReadString('Data', 'ArticleID', ''); + FileEdit.Text := IniFile.ReadString('Data', 'File', 'nntprdr.txt'); + UserNameEdit.Text := IniFile.ReadString('Data', 'UserName', ''); + PasswordEdit.Text := IniFile.ReadString('Data', 'Password', ''); + UserEdit.Text := IniFile.ReadString('Data', 'User', + '"' + UserName + '" <' + EMail + '>'); + GroupEdit.Text := IniFile.ReadString('Data', 'Group', + 'borland.public.delphi.thirdparty-tools'); + IniFile.Free; + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteString('Data', 'Server', ServerEdit.Text); + IniFile.WriteString('Data', 'Group', GroupEdit.Text); + IniFile.WriteString('Data', 'ArticleNum', ArticleNumEdit.Text); + IniFile.WriteString('Data', 'ArticleID', ArticleIDEdit.Text); + IniFile.WriteString('Data', 'File', FileEdit.Text); + IniFile.WriteString('Data', 'User', UserEdit.Text); + IniFile.WriteString('Data', 'UserName', UserNameEdit.Text); + IniFile.WriteString('Data', 'Password', PasswordEdit.Text); + IniFile.WriteInteger('Window', 'Top', Top); + IniFile.WriteInteger('Window', 'Left', Left); + IniFile.WriteInteger('Window', 'Width', Width); + IniFile.WriteInteger('Window', 'Height', Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.Display(Msg : String); +begin + { Limit the memo to 100 lines } + while DisplayMemo.Lines.Count > 100 do + DisplayMemo.Lines.Delete(1); + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NntpCli1SessionConnected(Sender: TObject; Error: Word); +begin + AbortButton.Enabled := TRUE; + Display('Connected, StatusCode = ' + IntToStr(NntpCli1.StatusCode)); + if NntpCli1.PostingPermited then + Display('Posting permited') + else + Display('Posting not permited'); + Display(NntpCli1.LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NntpCli1SessionClosed(Sender: TObject; Error: Word); +begin + AbortButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + Display('Connection closed'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each NNTP command when the command has } +{ been exected (correctly or not). } +procedure TNNTPForm.NntpCli1RequestDone( + Sender: TObject; + RqType: TNntpRequest; + Error: Word); +begin + Display('Request done. LastResponse = ' + + NntpCli1.LastResponse); + + if Error = 0 then + Display('No error') + else + Display('Error #' + IntToStr(Error)); + + case RqType of + nntpConnect: + begin + if Error <> 0 then begin + AbortButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + Display('Connect failed'); + end; + end; + nntpGroup: + begin + Display('ArticleEstimated = ' + IntToStr(NntpCli1.ArticleEstimated)); + Display('ArticleFirst = ' + IntToStr(NntpCli1.ArticleFirst)); + Display('ArticleLast = ' + IntToStr(NntpCli1.ArticleLast)); + ArticleNumEdit.Text := IntToStr(NntpCli1.ArticleFirst); + end; + nntpPost, nntpQuit, nntpAbort, nntpHelp, nntpNewGroups, nntpNewNews, + nntpXOver, nntpListOverViewFmt, nntpAuthenticate, nntpModeReader, + nntpXHdr: + begin + { Nothing to do } + end; + nntpDate: + begin + Display('Server Date is ' + DateTimeToStr(NntpCli1.ServerDate)); + end; + nntpStatByNumber, nntpStatByID, + nntpHeadByNumber, nntpHeadByID, + nntpBodyByNumber, nntpBodyByID, + nntpArticleByNumber, nntpArticleByID, + nntpNext, nntpLast: + begin + Display('ArticleNumber = ' + + IntToStr(NntpCli1.ArticleNumber)); + Display('ArticleID = ' + + '<' + NntpCli1.ArticleID + '>'); + if Error = 0 then begin + ArticleNumEdit.Text := IntToStr(NntpCli1.ArticleNumber); + ArticleIDEdit.Text := NntpCli1.ArticleID; + end; + end; + else + Display('Unknown request type.'); + end; + + { If any stream where used, destroy it } + if Assigned(FDataStream) then begin + FDataStream.Free; + FDataStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TNntpCli when it has received data and } +{ don't know what to do with it. It should normally not occur ! } +procedure TNNTPForm.NntpCli1DataAvailable(Sender: TObject; Error: Word); +begin + Display('Data: ' + NntpCli1.LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TNntpCli component just before the } +{ component will begin receiving a message. It's a good place to open a } +{ file or start a progress bar. } +procedure TNNTPForm.NntpCli1MessageBegin(Sender: TObject); +begin + Display('Message begin'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TNntpCli component for each line of an } +{ incomming message. Header line as well as body lines are comming here. } +{ It's a good place to write to a file or update screen or progress bar. } +{ It's also the place to intercept header lines. } +procedure TNNTPForm.NntpCli1MessageLine(Sender: TObject); +var + NewsGroupName : String; + LastArticle : Integer; + FirstArticle : Integer; + PostingFlag : Char; +begin + Display('Line: ' + NntpCli1.LastResponse); + ParseListLine(NntpCli1.LastResponse, + NewsGroupName, + LastArticle, + FirstArticle, + PostingFlag); + { It the place to do something with NewsGroupName, LastArticle, } + { FirstArticle and PostingFlag } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TNntpCli component when a message has } +{ been received completely. It's a good place to close a file, delete the } +{ progress bar and alert user. } +procedure TNNTPForm.NntpCli1MessageEnd(Sender: TObject); +begin + Display('Message End'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This function is called internally to create a TFileStream if any file } +{ name is specified in the FileEdit box. If the edit box is blank, nil is } +{ returned. The TFileStream will be supplyed to the comoponent for every } +{ command which can take a TStream to store data such as ArticleByNum. } +{ The stream is destroyed in the OnRequestDone event handler. } +function TNNTPForm.GetStream : TStream; +begin + { Delete the previous stream if not already done } + if Assigned(FDataStream) then begin + FDataStream.Free; + FDataStream := nil; + end; + + if Trim(FileEdit.Text) = '' then + FDataStream := nil + else begin + { Try to open the file stream. Trap errors. } + try + FDataStream := TFileStream.Create(Trim(FileEdit.Text), fmCreate); + except + on E:Exception do begin + { Display an error message in our TMemo } + Display(E.Message); + FDataStream := nil; + raise; { Show the exception box } + end; + end; + end; + Result := FDataStream; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.ConnectButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + ConnectButton.Enabled := FALSE; + NntpCli1.Host := ServerEdit.Text; + NntpCli1.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.AbortButtonClick(Sender: TObject); +begin + NntpCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.QuitButtonClick(Sender: TObject); +begin + NntpCli1.Quit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.GroupButtonClick(Sender: TObject); +begin + NntpCli1.Group(GroupEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NextButtonClick(Sender: TObject); +begin + NntpCli1.Next; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.LastButtonClick(Sender: TObject); +begin + NntpCli1.Last; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.ArticleByIDButtonClick(Sender: TObject); +begin + NntpCli1.ArticleByID(ArticleIDEdit.Text, GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.ArticleByNumberButtonClick(Sender: TObject); +begin + NntpCli1.ArticleByNumber(StrToInt(ArticleNumEdit.Text), GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.HeadByIDButtonClick(Sender: TObject); +begin + NntpCli1.HeadByID(ArticleIDEdit.Text, GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.HeadByNumberButtonClick(Sender: TObject); +begin + NntpCli1.HeadByNumber(StrToInt(ArticleNumEdit.Text), GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.BodyByIDButtonClick(Sender: TObject); +begin + NntpCli1.BodyByID(ArticleIDEdit.Text, GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.BodyByNumberButtonClick(Sender: TObject); +begin + NntpCli1.BodyByNumber(StrToInt(ArticleNumEdit.Text), GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.StatByIDButtonClick(Sender: TObject); +begin + NntpCli1.StatByID(ArticleIDEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.StatByNumberButtonClick(Sender: TObject); +begin + NntpCli1.StatByNumber(StrToInt(ArticleNumEdit.Text)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.ListButtonClick(Sender: TObject); +begin + if Application.MessageBox('This could take a VERY long time, proceed ? ', + 'Warning', MB_YESNO) <> ID_YES then + Exit; + NntpCli1.List(GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NewGroupsButtonClick(Sender: TObject); +begin + NntpCli1.NewGroups(Now - 10, FALSE, '', GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NewNewsButtonClick(Sender: TObject); +begin + NntpCli1.NewNews(Now - 1, FALSE, GroupEdit.Text, '', GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.HelpButtonClick(Sender: TObject); +begin + NntpCli1.Help(GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpForm.LineToStream(Buf : String); +begin + Display('Line: ' + Buf); + Buf := Buf + #13#10; + FDataStream.WriteBuffer(Buf[1], Length(Buf)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Posting a message require to build the message, including his header. } +{ Here we use a TMemoryStream to create a message on the fly. Normally we } +{ should use a TFileStream to get the message from a file where it has } +{ been written by some user interface. } +procedure TNNTPForm.PostButtonClick(Sender: TObject); +begin + { Delete the stream if not already done } + if Assigned(FDataStream) then begin + FDataStream.Free; + FDataStream := nil; + end; + + { Create a new stream in memory } + FDataStream := TMemoryStream.Create; + + { Write the message header } + LineToStream('From: ' + UserEdit.Text); + LineToStream('Newsgroups: ' + GroupEdit.Text); + LineToStream('Subject: Internet Components Suite (ICS)'); + LineToStream('Organization: None'); + LineToStream('X-Newsreader: NNTP component ' + + '(http://www.overbyte.be)'); + + { End of header is a blank line } + LineToStream(''); + + { Write the message body } + LineToStream(''); + LineToStream('The Internet Component Suite is a set of native'); + LineToStream('components for Borland Delphi (all versions,'); + LineToStream('including 16 bits) and Borland C++ Builder. The'); + LineToStream('major TCP/IP protocols are supported for building'); + LineToStream('client/server, intranet or Internet applications.'); + LineToStream(''); + LineToStream('TCP, UDP, TELNET, FTP, SMTP, POP3, PING, FINGER, HTTP,'); + LineToStream('NNTP and more. Each component has samples writen'); + LineToStream('in Delphi and in C++ Builder. Several client/server'); + LineToStream('applications, including an event-driven and a'); + LineToStream('multi-threaded server, a complete FTP client and'); + LineToStream('TELNET client with ansi emulation are provided.'); + LineToStream('Full source code provided for everything.'); + LineToStream(''); + LineToStream('The Internet Component Suite is freeware, royalty'); + LineToStream('free and support is done using a mailing list.'); + LineToStream('Visit our website and download now from'); + LineToStream('http://www.overbyte.be'); + + { Set stream pointer to beginning of stream because TNntpCli will post } + { from the current position } + FDataStream.Seek(0, soFromBeginning ); + + { Ask the component to post the stream. The posting occurs in the } + { background ! We will receive the OnRequestDone event when done. } + { It's in this event handler that the stream must be destroyed } + NntpCli1.Post(FDataStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.XOverButtonClick(Sender: TObject); +begin + NntpCli1.XOver(ArticleNumEdit.Text, GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.OverViewFmtButtonClick(Sender: TObject); +begin + NntpCli1.ListOverViewFmt(GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.DateButtonClick(Sender: TObject); +begin + NntpCli1.Date; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.AuthenticateButtonClick(Sender: TObject); +begin + NntpCli1.UserName := UserNameEdit.Text; + NntpCli1.Password := PasswordEdit.Text; + NntpCli1.Authenticate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.ModeReaderButtonClick(Sender: TObject); +begin + NntpCli1.ModeReader; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.XHdrButtonClick(Sender: TObject); +begin + NntpCli1.XHdr(GetStream, 'subject', ArticleNumEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NntpCli1XHdrBegin(Sender: TObject); +begin + Display('XHdr begin'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NntpCli1XHdrEnd(Sender: TObject); +begin + Display('Xhdr End'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NntpCli1XHdrLine(Sender: TObject); +begin + Display('XHdr: ' + NntpCli1.LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/NsLook1.dfm b/lib/Delphi/Internet/NsLook1.dfm new file mode 100644 index 00000000..7cb9b3d9 Binary files /dev/null and b/lib/Delphi/Internet/NsLook1.dfm differ diff --git a/lib/Delphi/Internet/NsLook1.pas b/lib/Delphi/Internet/NsLook1.pas new file mode 100644 index 00000000..abbca4f2 --- /dev/null +++ b/lib/Delphi/Internet/NsLook1.pas @@ -0,0 +1,273 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: NsLookup +Description: Demo for DnsQuery ICS component. +Author: Franois Piette +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: January 29, 1999 +Version: 1.02 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Feb 27, 1999 V1.01 Added PTR lookup (reverse DNS lookup) +Mar 07, 1999 V1.02 Adapted for Delphi 1 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit NsLook1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, WinSock, DnsQuery, StdCtrls, ExtCtrls, Buttons; + +type + TNsLookupForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + DnsEdit: TEdit; + NameEdit: TEdit; + MXLookupButton: TButton; + DnsQuery1: TDnsQuery; + ClearDisplayBitBtn: TBitBtn; + ALookupButton: TButton; + PTRLookupButton: TButton; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure MXLookupButtonClick(Sender: TObject); + procedure DnsQuery1RequestDone(Sender: TObject; Error: Word); + procedure ClearDisplayBitBtnClick(Sender: TObject); + procedure ALookupButtonClick(Sender: TObject); + procedure PTRLookupButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FRequestID : Integer; + procedure Display(Msg : String); + procedure DumpDnsResponse; + public + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + NsLookupForm: TNsLookupForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyName = 'Name'; + KeyDns = 'Dns'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + NameEdit.Text := IniFile.ReadString(SectionData, KeyName, 'inprise.com'); + DnsEdit.Text := IniFile.ReadString(SectionData, KeyDns, '193.121.171.135'); + DisplayMemo.Clear; + IniFile.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyName, NameEdit.Text); + IniFile.WriteString(SectionData, KeyDns, DnsEdit.Text); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.Display(Msg : String); +begin + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Lines.Delete(0); + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.DumpDnsResponse; +var + P : PChar; + I : Integer; + Len : Integer; + Buf : String; +begin + Display('Response dump (' + IntToStr(DnsQuery1.ResponseLen) + ' bytes):'); + P := DnsQuery1.ResponseBuf; + Len := DnsQuery1.ResponseLen; + Buf := ''; + I := 0; + while I < Len do begin + if P^ in [' '..'~'] then + Buf := Buf + P^ + else + Buf := Buf + '<' + IntToStr(Ord(P^)) + '>'; + Inc(I); + Inc(P); + if (I mod 16) = 0 then begin + Display(' ' + Buf); + Buf := ''; + end; + end; + if Length(Buf) > 0 then + Display(' ' + Buf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.DnsQuery1RequestDone(Sender: TObject; Error: Word); +var + I : Integer; + nIndex : Integer; +begin + if Error <> 0 then begin + Display('Error #' + IntToStr(Error)); + Exit; + end; + Display('ID : ' + IntToStr(DnsQuery1.ResponseID)); + Display('ResponseCode : ' + IntToStr(DnsQuery1.ResponseCode)); + Display('OpCode : ' + IntToStr(DnsQuery1.ResponseOpCode)); + Display('Authoritative : ' + IntToStr(Ord(DnsQuery1.ResponseAuthoritative))); + Display('Truncation : ' + IntToStr(Ord(DnsQuery1.ResponseTruncation))); + Display('RecursionAvailable : ' + IntToStr(Ord(DnsQuery1.ResponseRecursionAvailable))); + Display('QDCount : ' + IntToStr(DnsQuery1.ResponseQDCount)); + Display('ANCount : ' + IntToStr(DnsQuery1.ResponseANCount)); + Display('NSCount : ' + IntToStr(DnsQuery1.ResponseNSCount)); + Display('ARCount : ' + IntToStr(DnsQuery1.ResponseARCount)); + Display('ResponseLen : ' + IntToStr(DnsQuery1.ResponseLen)); + Display('QuestionName : ' + DnsQuery1.QuestionName); + Display('QuestionType : ' + IntToStr(DnsQuery1.QuestionType)); + Display('QuestionClass : ' + IntToStr(DnsQuery1.QuestionClass)); + + for I := 0 to DnsQuery1.ResponseANCount - 1 do begin + Display('Answer #' + IntToStr(I + 1)); + Display(' AnswerName : ' + DnsQuery1.AnswerName[I]); + Display(' AnswerType : ' + IntToStr(DnsQuery1.AnswerType[I])); + Display(' AnswerClass : ' + IntToStr(DnsQuery1.AnswerClass[I])); + Display(' AnswerTTL : ' + IntToStr(DnsQuery1.AnswerTTL[I])); + nIndex := DnsQuery1.AnswerTag[I]; + if nIndex >= 0 then begin + case DnsQuery1.AnswerType[I] of + DnsQueryMX: + begin + Display(' MXPreference : ' + IntToStr(DnsQuery1.MXPreference[nIndex])); + Display(' MXExchange : ' + DnsQuery1.MXExchange[nIndex]); + end; + DnsQueryA: + begin + Display(' Address : ' + StrPas(inet_ntoa(DnsQuery1.Address[nIndex]))); + end; + DnsQueryPTR: + begin + Display(' Hostname : ' + DnsQuery1.Hostname[nIndex]); + end; + end; + end; + end; + { Dump complete response } + DumpDnsResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.ClearDisplayBitBtnClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.MXLookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.MXLookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.ALookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.ALookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.PTRLookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.PTRLookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/NsLookup.dpr b/lib/Delphi/Internet/NsLookup.dpr new file mode 100644 index 00000000..914dbc80 --- /dev/null +++ b/lib/Delphi/Internet/NsLookup.dpr @@ -0,0 +1,12 @@ +program NsLookup; + +uses + Forms, + NsLook1 in 'NsLook1.pas' {NsLookupForm}; + +{$R *.RES} + +begin + Application.CreateForm(TNsLookupForm, NsLookupForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/POP3MIM1.dfm b/lib/Delphi/Internet/POP3MIM1.dfm new file mode 100644 index 00000000..59ba349e Binary files /dev/null and b/lib/Delphi/Internet/POP3MIM1.dfm differ diff --git a/lib/Delphi/Internet/PingTst1.dfm b/lib/Delphi/Internet/PingTst1.dfm new file mode 100644 index 00000000..d784109e Binary files /dev/null and b/lib/Delphi/Internet/PingTst1.dfm differ diff --git a/lib/Delphi/Internet/PingTst1.pas b/lib/Delphi/Internet/PingTst1.pas new file mode 100644 index 00000000..c1da3261 --- /dev/null +++ b/lib/Delphi/Internet/PingTst1.pas @@ -0,0 +1,154 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This demo show how to use the TPing object to ping any host. +Creation: November 30, 1997 +Version: 1.03 +EMail: francois.piette@overbyte.be http://www.overbyte.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + + +Updates: +Dec 13, 1997 V1.01 Use the new OnEchoRequest and OnEchoReply events. +Dec 26, 1998 V1.02 Changed event handler for new TPing version (1.10) +Nov 10, 2002 V1.03 Added Reply.Status in display when failed + Changed argument name from Error to Status in EchoReply + event (same change has in component). + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit PingTst1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Ping, StdCtrls; + +type + TPingTstForm = class(TForm) + Ping1: TPing; + Label1: TLabel; + HostEdit: TEdit; + PingButton: TButton; + DisplayMemo: TMemo; + CancelButton: TButton; + procedure PingButtonClick(Sender: TObject); + procedure Ping1Display(Sender: TObject; Icmp: TObject; Msg: String); + procedure Ping1DnsLookupDone(Sender: TObject; Error: Word); + procedure CancelButtonClick(Sender: TObject); + procedure Ping1EchoRequest(Sender: TObject; Icmp: TObject); + procedure Ping1EchoReply(Sender: TObject; Icmp: TObject; Status: Integer); + end; + +var + PingTstForm: TPingTstForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.PingButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + DisplayMemo.Lines.Add('Resolving host ''' + HostEdit.Text + ''''); + PingButton.Enabled := FALSE; + CancelButton.Enabled := TRUE; + Ping1.DnsLookup(HostEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1DnsLookupDone(Sender: TObject; Error: Word); +begin + CancelButton.Enabled := FALSE; + PingButton.Enabled := TRUE; + + if Error <> 0 then begin + DisplayMemo.Lines.Add('Unknown Host ''' + HostEdit.Text + ''''); + Exit; + end; + + DisplayMemo.Lines.Add('Host ''' + HostEdit.Text + ''' is ' + Ping1.DnsResult); + Ping1.Address := Ping1.DnsResult; + Ping1.Ping; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1Display(Sender: TObject; Icmp: TObject; Msg: String); +begin + DisplayMemo.Lines.Add(Msg); +end; + + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.CancelButtonClick(Sender: TObject); +begin + Ping1.CancelDnsLookup; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1EchoRequest(Sender: TObject; Icmp: TObject); +begin + DisplayMemo.Lines.Add('Sending ' + IntToStr(Ping1.Size) + ' bytes to ' + + Ping1.HostName + ' (' + Ping1.HostIP + ')'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1EchoReply( + Sender : TObject; + Icmp : TObject; + Status : Integer); +begin + if Status <> 0 then + { Success } + DisplayMemo.Lines.Add('Received ' + IntToStr(Ping1.Reply.DataSize) + + ' bytes from ' + Ping1.HostIP + + ' in ' + IntToStr(Ping1.Reply.RTT) + ' msecs') + else + { Failure } + DisplayMemo.Lines.Add('Cannot ping host (' + Ping1.HostIP + ') : ' + + Ping1.ErrorString + + '. Status = ' + IntToStr(Ping1.Reply.Status)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/Pop3Mim1.pas b/lib/Delphi/Internet/Pop3Mim1.pas new file mode 100644 index 00000000..4bdec5c9 --- /dev/null +++ b/lib/Delphi/Internet/Pop3Mim1.pas @@ -0,0 +1,283 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: This program is a demo for TMimeDecode component. + TMimeDecode is a component whose job is to decode MIME encoded + EMail messages (file attach). You can use it for example to + decode messages received with a POP3 component. + MIME is described in RFC-1521. headers are described if RFC-822. +Creation: March 08, 1998 +Version: 1.01 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +Updates: +Apr 22, 1998 V1.01 Added an option box to save the parts in files. The files + are writen in the current directory with a name like Part0.dat, + Part1.dat and so on. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Pop3Mim1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, IniFiles, MimeDec; + +type + TMimeDecodeForm = class(TForm) + Panel1: TPanel; + FileEdit: TEdit; + DecodeButton: TButton; + Memo1: TMemo; + MimeDecode1: TMimeDecode; + Label1: TLabel; + ClearButton: TButton; + SaveToFileCheckBox: TCheckBox; + procedure DecodeButtonClick(Sender: TObject); + procedure MimeDecode1PartBegin(Sender: TObject); + procedure MimeDecode1PartEnd(Sender: TObject); + procedure MimeDecode1PartHeaderLine(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure ClearButtonClick(Sender: TObject); + procedure MimeDecode1HeaderLine(Sender: TObject); + procedure MimeDecode1PartLine(Sender: TObject; Data: PChar; + DataLen: Integer); + procedure MimeDecode1HeaderBegin(Sender: TObject); + procedure MimeDecode1HeaderEnd(Sender: TObject); + procedure MimeDecode1PartHeaderBegin(Sender: TObject); + procedure MimeDecode1PartHeaderEnd(Sender: TObject); + private + FInitialized : Boolean; + FIniFileName : String; + FDstStream : TStream; + procedure Display(Msg: String); + end; + +var + MimeDecodeForm: TMimeDecodeForm; + +implementation + +{$R *.DFM} +const + SectionData = 'Data'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + KeyFile = 'FileName'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + Memo1.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + FileEdit.Text := IniFile.ReadString(SectionData, KeyFile, ''); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyFile, FileEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.DecodeButtonClick(Sender: TObject); +begin + Memo1.Clear; + MimeDecode1.DecodeFile(Trim(FileEdit.Text)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.Display(Msg: String); +begin + { TMemo cannot hold too much data. Limit to 200 lines } + if Memo1.Lines.count > 200 then + Memo1.Clear; + Memo1.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartBegin(Sender: TObject); +begin + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' BEGIN ----------'); + if SaveToFileCheckBox.Checked then + FDstStream := TFileStream.Create('Part' + IntToStr(MimeDecode1.PartNumber) + '.dat', fmCreate ); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartEnd(Sender: TObject); +begin + Display('--------- PART END ----------'); + if FDstStream <> nil then begin + FDstStream.Destroy; + FDstStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartLine(Sender: TObject; Data: PChar; + DataLen: Integer); +begin + Display(StrPas(Data)); + if (FDstStream <> nil) and (DataLen > 0) then + FDstStream.WriteBuffer(Data^, DataLen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderLine(Sender: TObject); +begin + Display('Part header: ' + StrPas(MimeDecode1.CurrentData)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.ClearButtonClick(Sender: TObject); +begin + Memo1.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderLine(Sender: TObject); +begin + Display('Msg header: ' + StrPas(MimeDecode1.CurrentData)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderBegin(Sender: TObject); +begin + Display('--------- HEADER BEGIN ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderEnd(Sender: TObject); +begin + Display('--------- HEADER END ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderBegin(Sender: TObject); +begin + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' HEADER BEGIN ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderEnd(Sender: TObject); +begin + Display('--------- PART HEADER END ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/Pop3Mime.dpr b/lib/Delphi/Internet/Pop3Mime.dpr new file mode 100644 index 00000000..dcba48ff --- /dev/null +++ b/lib/Delphi/Internet/Pop3Mime.dpr @@ -0,0 +1,12 @@ +program Pop3Mime; + +uses + Forms, + Pop3Mim1 in 'POP3MIM1.PAS' {MimeDecodeForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMimeDecodeForm, MimeDecodeForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/PopTst1.dfm b/lib/Delphi/Internet/PopTst1.dfm new file mode 100644 index 00000000..d5a15187 Binary files /dev/null and b/lib/Delphi/Internet/PopTst1.dfm differ diff --git a/lib/Delphi/Internet/PopTst1.pas b/lib/Delphi/Internet/PopTst1.pas new file mode 100644 index 00000000..b7dad1af --- /dev/null +++ b/lib/Delphi/Internet/PopTst1.pas @@ -0,0 +1,558 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +-------------------------------------------------------------------+ + | THIS IS AN OUTDATED APPLICATION USING AN OUTDATED COMPONENT. | + | NEW COMPONENT IS IN POP3PROT.PAS FILE. NEW DEMO IS MAILRCV.DPR. | + +-------------------------------------------------------------------+ + +Author: Franois PIETTE +Object: Show how to use TPop3Cli (POP3 protocol, RFC-1225) +Creation: 03 october 1997 +Version: 1.02 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Nov 12, 1997 V1.01 Added a GetAll button to get all messages waiting in the + POP3 server, copying them to a file using the UIDL to build + the file name (sorry, wont work with D1 because of long file + name). The message is *NOT* deleted from the POP3 server. +Jan 10, 1998 V1.02 Added port selection + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit PopTst1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, pop3cli, StdCtrls, Wait, IniFiles, ExtCtrls; + +const + PopTstVersion = 102; + +type + TPOP3ExcercizerForm = class(TForm) + Pop3Client: TPop3Client; + DisplayMemo: TMemo; + Panel1: TPanel; + InfoLabel: TLabel; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + ConnectButton: TButton; + Wait1: TWait; + DisconnectButton: TButton; + UserButton: TButton; + HostEdit: TEdit; + UserNameEdit: TEdit; + PassWordEdit: TEdit; + PassButton: TButton; + MsgNumEdit: TEdit; + RetrButton: TButton; + StatButton: TButton; + ListAllButton: TButton; + ListButton: TButton; + DeleteButton: TButton; + NoopButton: TButton; + LastButton: TButton; + ResetButton: TButton; + TopButton: TButton; + MsgLinesEdit: TEdit; + RpopButton: TButton; + UidlButton: TButton; + ApopButton: TButton; + NextButton: TButton; + GetAllButton: TButton; + PortEdit: TEdit; + Label6: TLabel; + procedure ConnectButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure UserButtonClick(Sender: TObject); + procedure PassButtonClick(Sender: TObject); + procedure Pop3ClientMessageBegin(Sender: TObject); + procedure Pop3ClientMessageEnd(Sender: TObject); + procedure Pop3ClientMessageLine(Sender: TObject); + procedure RetrButtonClick(Sender: TObject); + procedure StatButtonClick(Sender: TObject); + procedure ListAllButtonClick(Sender: TObject); + procedure ListButtonClick(Sender: TObject); + procedure Pop3ClientListBegin(Sender: TObject); + procedure Pop3ClientListEnd(Sender: TObject); + procedure Pop3ClientListLine(Sender: TObject); + procedure DeleteButtonClick(Sender: TObject); + procedure NoopButtonClick(Sender: TObject); + procedure LastButtonClick(Sender: TObject); + procedure ResetButtonClick(Sender: TObject); + procedure TopButtonClick(Sender: TObject); + procedure RpopButtonClick(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure Pop3ClientDisplay(Sender: TObject; Msg: String); + procedure UidlButtonClick(Sender: TObject); + procedure Pop3ClientUidlBegin(Sender: TObject); + procedure Pop3ClientUidlEnd(Sender: TObject); + procedure Pop3ClientUidlLine(Sender: TObject); + procedure ApopButtonClick(Sender: TObject); + procedure NextButtonClick(Sender: TObject); + procedure GetAllButtonClick(Sender: TObject); + private + FFile : TextFile; + FFileName : String; + function DoTheJob(MethodPtr : TPop3Method; MethodName : String) : Boolean; + procedure MessageBegin(Sender: TObject); + procedure MessageLine(Sender: TObject); + procedure GetAllMessageLine(Sender: TObject); + public + { Dclarations publiques } + end; + +var + POP3ExcercizerForm: TPOP3ExcercizerForm; + +implementation + +{$R *.DFM} + +uses + PopTst2; + +const + IniFileName = 'POPTST.INI'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Restore some data from the INI file } +procedure TPOP3ExcercizerForm.FormCreate(Sender: TObject); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + HostEdit.Text := IniFile.ReadString('Data', 'Host', ''); + PortEdit.Text := IniFile.ReadString('Data', 'Port', ''); + UserNameEdit.Text := IniFile.ReadString('Data', 'UserName', ''); + PassWordEdit.Text := IniFile.ReadString('Data', 'Password', ''); + IniFile.Free; + InfoLabel.Caption := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Save data to INI file } +procedure TPOP3ExcercizerForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteString('Data', 'Host', HostEdit.Text); + IniFile.WriteString('Data', 'Port', PortEdit.Text); + IniFile.WriteString('Data', 'UserName', UserNameEdit.Text); + IniFile.WriteString('Data', 'Password', PassWordEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the TPop3Client object wants to display } +{ some information such as connection progress or errors. } +procedure TPOP3ExcercizerForm.Pop3ClientDisplay(Sender: TObject; + Msg: String); +begin + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All the TPop3Client method are of the same type. To simplify this demo } +{ application, DoTheJob transfert the parameters form the various EditBoxes } +{ to the Pop3Client instance and then call the appropriate method, showing } +{ the result in the InfoLabel.Caption. } +function TPOP3ExcercizerForm.DoTheJob( + MethodPtr : TPop3Method; + MethodName : String) : Boolean; +begin + Pop3Client.Host := HostEdit.Text; + Pop3Client.Port := PortEdit.Text; + Pop3Client.UserName := UserNameEdit.Text; + Pop3Client.PassWord := PassWordEdit.Text; + Pop3Client.MsgNum := StrToInt(MsgNumEdit.Text); + Pop3Client.MsgLines := StrToInt(MsgLinesEdit.Text); + InfoLabel.Caption := MethodName + ' started'; + Result := MethodPtr; + if Result then + InfoLabel.Caption := MethodName + ' ok' + else + InfoLabel.Caption := MethodName + ' failed'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ConnectButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Connect, 'Connect'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.DisconnectButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Quit, 'Quit'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.UserButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.User, 'User'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.PassButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Pass, 'Pass'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.RetrButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Retr, 'Retr'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.StatButtonClick(Sender: TObject); +begin + if DoTheJob(Pop3Client.Stat, 'Stat') then + InfoLabel.Caption := 'Stat ok, ' + + IntToStr(Pop3Client.MsgCount) + ' messages ' + + IntToStr(Pop3Client.MsgSize) + ' bytes' +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ListAllButtonClick(Sender: TObject); +begin + MsgNumEdit.Text := '0'; + DoTheJob(Pop3Client.List, 'List All'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ListButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.List, 'List'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.DeleteButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Dele, 'Delete'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NoopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Noop, 'Noop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.LastButtonClick(Sender: TObject); +begin + if DoTheJob(Pop3Client.Last, 'Last') then + InfoLabel.caption := 'Last = ' + IntToStr(Pop3Client.MsgNum); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ResetButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Rset, 'Rset'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.TopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Top, 'Top'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.RpopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Rpop, 'Rpop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.UidlButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Uidl, 'Uidl'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ApopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Apop, 'Apop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client is about to receive a } +{ message. The MsgNum property gives the message number. } +{ This event handler could be used to open the file used to store the msg. } +{ The file handle could be stored in the TPop3Client.Tag property to be } +{ easily retrieved by the OnMessageLine and OnMessageEnd event handlers. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Message ' + + IntToStr((Sender as TPop3Client).MsgNum) + + ' begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client has detected the end of a } +{ message, even if there is an error or exception, this event gets called. } +{ This event handler could be used to close the file used to store the msg. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Message ' + + IntToStr((Sender as TPop3Client).MsgNum) + + ' end ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each message line that TPop3Client is } +{ receiveing. This could be used to write the message lines to a file. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageLine(Sender: TObject); +begin + DisplayMemo.Lines.Add((Sender as TPop3Client).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client is about to receive a } +{ list line. The MsgNum property gives the message number. } +procedure TPOP3ExcercizerForm.Pop3ClientListBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** List begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client has received the last list } +{ line. } +procedure TPOP3ExcercizerForm.Pop3ClientListEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** List End ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each list line received by TPop3Client. } +procedure TPOP3ExcercizerForm.Pop3ClientListLine(Sender: TObject); +var + Buffer : String; +begin + Buffer := 'MsgNum = ' + IntToStr((Sender as TPop3Client).MsgNum) + ' ' + + 'MsgSize = ' + IntToStr((Sender as TPop3Client).MsgSize) + ' ' + + 'Line = ''' + (Sender as TPop3Client).LastResponse + ''''; + DisplayMemo.Lines.Add(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Uidl begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Uidl end ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlLine(Sender: TObject); +var + Buffer : String; +begin + Buffer := 'MsgNum = ' + IntToStr((Sender as TPop3Client).MsgNum) + ' ' + + 'MsgUidl = ' + (Sender as TPop3Client).MsgUidl + ''''; + DisplayMemo.Lines.Add(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.MessageBegin(Sender: TObject); +begin + MessageForm.Caption := 'Message ' + + IntToStr((Sender as TPop3Client).MsgNum); + MessageForm.Show; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.MessageLine(Sender: TObject); +begin + MessageForm.DisplayMemo.Lines.Add((Sender as TPop3Client).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NextButtonClick(Sender: TObject); +var + OldBegin : TNotifyEvent; + OldEnd : TNotifyEvent; + OldLine : TNotifyEvent; +begin + OldBegin := Pop3Client.OnMessageBegin; + OldEnd := Pop3Client.OnMessageEnd; + OldLine := Pop3Client.OnMessageLine; + + Pop3Client.OnMessageBegin := MessageBegin; + Pop3Client.OnMessageEnd := nil; + Pop3Client.OnMessageLine := MessageLine; + + MessageForm.DisplayMemo.Clear; + MessageForm.Caption := 'Message'; + + DoTheJob(Pop3Client.Retr, 'Retr'); + + if (Length(Pop3Client.LastResponse) > 0) and + (Pop3Client.LastResponse[1] = '-') then + MessageForm.DisplayMemo.Lines.Add(Pop3Client.LastResponse) + else + MsgNumEdit.Text := IntToStr(StrToInt(MsgNumEdit.Text) + 1); + + MessageForm.DisplayMemo.SelStart := 0; + MessageForm.DisplayMemo.SelLength := 0; + + Pop3Client.OnMessageBegin := OldBegin; + Pop3Client.OnMessageEnd := OldEnd; + Pop3Client.OnMessageLine := OldLine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.GetAllMessageLine(Sender: TObject); +begin + Writeln(FFile, (Sender as TPop3Client).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.GetAllButtonClick(Sender: TObject); +var + MsgCnt : Integer; + MsgNum : Integer; + Uidl : String; + OldBegin : TNotifyEvent; + OldEnd : TNotifyEvent; + OldLine : TNotifyEvent; + IniFile : TIniFile; + Path : String; +begin + if not DoTheJob(Pop3Client.Stat, 'Stat') then + Exit; + + InfoLabel.Caption := 'Stat ok, ' + + IntToStr(Pop3Client.MsgCount) + ' messages ' + + IntToStr(Pop3Client.MsgSize) + ' bytes'; + if Pop3Client.MsgCount < 1 then + Exit; + + { Get path from INI file } + IniFile := TIniFile.Create(IniFileName); + Path := IniFile.ReadString('Data', 'MsgPath', + ExtractFilePath(Application.ExeName)); + IniFile.Free; + + { Be sure to have an ending backslash } + if (Length(Path) > 0) and (Path[Length(Path)] <> '\') then + Path := Path + '\'; + + OldBegin := Pop3Client.OnMessageBegin; + OldEnd := Pop3Client.OnMessageEnd; + OldLine := Pop3Client.OnMessageLine; + Pop3Client.OnMessageBegin := nil; + Pop3Client.OnMessageEnd := nil; + Pop3Client.OnMessageLine := GetAllMessageLine; + + try + MsgCnt := Pop3Client.MsgCount; + for MsgNum := 1 to MsgCnt do begin + Pop3Client.MsgNum := MsgNum; + if not Pop3Client.Uidl then + continue; + Uidl := Pop3Client.MsgUidl; + FFileName := Path + 'Msg ' + Uidl + '.txt'; + if FileExists(FFileName) then begin + DisplayMemo.Lines.Add('Message ' + IntToStr(MsgNum) + ' already here'); + continue; + end; + + DisplayMemo.Lines.Add('Message ' + IntToStr(Pop3Client.MsgNum)); + AssignFile(FFile, FFileName); + Rewrite(FFile); + try + Pop3Client.Retr; + finally + CloseFile(FFile); + end; + end; + DoTheJob(Pop3Client.Quit, 'Quit'); + finally + Pop3Client.OnMessageBegin := OldBegin; + Pop3Client.OnMessageEnd := OldEnd; + Pop3Client.OnMessageLine := OldLine; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/Recv.dpr b/lib/Delphi/Internet/Recv.dpr new file mode 100644 index 00000000..1f6c0d41 --- /dev/null +++ b/lib/Delphi/Internet/Recv.dpr @@ -0,0 +1,12 @@ +program Recv; + +uses + Forms, + Recv1 in 'Recv1.pas' {RecvForm}; + +{$R *.RES} + +begin + Application.CreateForm(TRecvForm, RecvForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/Recv1.dfm b/lib/Delphi/Internet/Recv1.dfm new file mode 100644 index 00000000..5b79e5e5 Binary files /dev/null and b/lib/Delphi/Internet/Recv1.dfm differ diff --git a/lib/Delphi/Internet/Recv1.pas b/lib/Delphi/Internet/Recv1.pas new file mode 100644 index 00000000..a7de2983 --- /dev/null +++ b/lib/Delphi/Internet/Recv1.pas @@ -0,0 +1,302 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Simple server program which just listen for clients and display + all incomming data. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: Sep 29, 1998 +Version: 1.03 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Oct 28, 1998 V1.01 Added Linger and Banner checkboxes. +Dec 30, 1998 V1.02 Remove trailing CR/LF on data receive. +Mar 07, 1999 V1.03 Adapted for Delphi 1 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Recv1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, StdCtrls, ExtCtrls, IniFiles; + +const + WM_DESTROY_SOCKET = WM_USER + 1; + +type + TRecvForm = class(TForm) + Panel1: TPanel; + DisplayMemo: TMemo; + Label1: TLabel; + PortEdit: TEdit; + ActionButton: TButton; + WSocket1: TWSocket; + CloseAllButton: TButton; + Label2: TLabel; + LingerCheckBox: TCheckBox; + BannerCheckBox: TCheckBox; + LineModeOnButton: TButton; + LineOffButton: TButton; + procedure ActionButtonClick(Sender: TObject); + procedure PortEditChange(Sender: TObject); + procedure WSocket1SessionAvailable(Sender: TObject; Error: Word); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure CloseAllButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure LineModeOnButtonClick(Sender: TObject); + procedure LineOffButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FClients : TList; + procedure ClientDataAvailable(Sender : TObject; Error : Word); + procedure ClientSessionClosed(Sender: TObject; Error: Word); + procedure Display(Msg : String); + procedure WMDestroySocket(var msg: TMessage); message WM_DESTROY_SOCKET; + end; + +var + RecvForm: TRecvForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'RecvForm'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyPort = 'Port'; + KeyLinger = 'Linger'; + KeyBanner = 'SendBanner'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FClients := TList.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.FormDestroy(Sender: TObject); +begin + if Assigned(FClients) then begin + FClients.Destroy; + FClients := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, 'telnet'); + LingerCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyLinger, 0)); + BannerCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyBanner, 1)); + Label2.Caption := ''; + IniFile.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyPort, PortEdit.text); + IniFile.WriteInteger(SectionData, KeyLinger, Ord(LingerCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyBanner, Ord(BannerCheckBox.Checked)); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.Display(Msg : String); +begin + if DisplayMemo.Lines.Count > 200 then { Prevent TMemo overflow } + DisplayMemo.Clear; + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.ActionButtonClick(Sender: TObject); +begin + if ActionButton.Caption = '&Start' then begin + WSocket1.Addr := '0.0.0.0'; + WSocket1.Port := PortEdit.Text; + WSocket1.Proto := 'tcp'; + WSocket1.Listen; + ActionButton.Caption := '&Stop'; + Display('Listening for clients'); + end + else begin + WSocket1.Close; + ActionButton.Caption := '&Start'; + Display('Not listening for clients'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.PortEditChange(Sender: TObject); +begin + WSocket1.Close; + ActionButton.Caption := '&Start'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.WSocket1SessionAvailable(Sender: TObject; Error: Word); +var + NewClient : TWSocket; +begin + Display('Client connected'); + Label2.Caption := ''; + NewClient := TWSocket.Create(nil); + FClients.Add(NewClient); + NewClient.LineMode := TRUE; + NewClient.OnDataAvailable := ClientDataAvailable; + NewClient.OnSessionClosed := ClientSessionClosed; + NewClient.HSocket := WSocket1.Accept; + if LingerCheckBox.Checked then + NewClient.LingerOnOff := wsLingerOn + else + NewClient.LingerOnOff := wsLingerOff; + NewClient.LingerTimeout := 300; + NewClient.SetLingerOption; + if BannerCheckBox.Checked then + NewClient.SendStr('Hello !' + #13#10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.ClientDataAvailable(Sender : TObject; Error : Word); +var + Buf : array [0..127] of char; + Len : Integer; +begin + Len := TWSocket(Sender).Receive(@Buf, Sizeof(Buf) - 1); + if Len <= 0 then + Exit; + { Remove any trailing CR/LF} + while (Len > 0) and (Buf[Len - 1] in [#13, #10]) do + Dec(Len); + { Nul terminate the data } + Buf[Len] := #0; + Display('DataAvailable: ''' + StrPas(@Buf) + ''''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.ClientSessionClosed(Sender: TObject; Error: Word); +var + Cli : TWSocket; + Itm : Integer; +begin + Cli := Sender as TWSocket; + Display('Client diconnected'); + + Itm := FClients.IndexOf(Cli); + if Itm >= 0 then + FClients.Delete(Itm); + { We can't destroy a TWSocket from a SessionClosed event handler. } + { So we post a message to delay destruction until we are out of the } + { message handler. } + PostMessage(Handle, WM_DESTROY_SOCKET, 0, LongInt(Cli)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.WMDestroySocket(var msg: TMessage); +begin + TWSocket(msg.LParam).Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.CloseAllButtonClick(Sender: TObject); +begin + Display('Disconnecting clients'); + while FClients.Count > 0 do + TWSocket(FClients.Items[0]).Close; + Display('All clients disconnected'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.LineModeOnButtonClick(Sender: TObject); +var + I : Integer; +begin + for I := 0 to FClients.Count - 1 do + TWSocket(FClients.Items[0]).LineMode := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.LineOffButtonClick(Sender: TObject); +var + I : Integer; +begin + for I := 0 to FClients.Count - 1 do + TWSocket(FClients.Items[0]).LineMode := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/Sender.dpr b/lib/Delphi/Internet/Sender.dpr new file mode 100644 index 00000000..39db7cbc --- /dev/null +++ b/lib/Delphi/Internet/Sender.dpr @@ -0,0 +1,12 @@ +program Sender; + +uses + Forms, + Sender1 in 'Sender1.pas' {SenderForm}; + +{$R *.RES} + +begin + Application.CreateForm(TSenderForm, SenderForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/Sender1.dfm b/lib/Delphi/Internet/Sender1.dfm new file mode 100644 index 00000000..72bb582d Binary files /dev/null and b/lib/Delphi/Internet/Sender1.dfm differ diff --git a/lib/Delphi/Internet/Sender1.pas b/lib/Delphi/Internet/Sender1.pas new file mode 100644 index 00000000..6a46f6ee --- /dev/null +++ b/lib/Delphi/Internet/Sender1.pas @@ -0,0 +1,628 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Simple client program which just send data to a server and display + all incomming data. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: Oct 01, 1998 +Version: 1.03 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Oct 28, 1998 V1.02 Trapped Connect exceptions. + Added AutoStartButton and associated logic. + Added LingerCheckBox and associated logic. +Mar 07, 1999 V1.03 Adapted for Delphi 1 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Sender1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, ExtCtrls, StdCtrls, IniFiles, WSocket; + +const + WM_AUTO_START = WM_USER + 1; + WM_CLOSE_REQUEST = WM_USER + 2; + +type +{$IFDEF VER80} + LParam = LongInt; +{$ENDIF} + TSenderForm = class(TForm) + Panel1: TPanel; + Label1: TLabel; + ServerEdit: TEdit; + Label2: TLabel; + PortEdit: TEdit; + Label3: TLabel; + DataEdit: TEdit; + Label4: TLabel; + RepeatEdit: TEdit; + ContCheckBox: TCheckBox; + ActionButton: TButton; + DisplayMemo: TMemo; + Label5: TLabel; + LengthEdit: TEdit; + WSocket1: TWSocket; + DisplayDataCheckBox: TCheckBox; + UseDataSentCheckBox: TCheckBox; + PauseButton: TButton; + CountLabel: TLabel; + AutoStartButton: TButton; + LingerCheckBox: TCheckBox; + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure ContCheckBoxClick(Sender: TObject); + procedure WSocket1DnsLookupDone(Sender: TObject; Error: Word); + procedure WSocket1SessionConnected(Sender: TObject; Error: Word); + procedure ActionButtonClick(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure WSocket1DataAvailable(Sender: TObject; Error: Word); + procedure WSocket1SessionClosed(Sender: TObject; Error: Word); + procedure DisplayDataCheckBoxClick(Sender: TObject); + procedure UseDataSentCheckBoxClick(Sender: TObject); + procedure PauseButtonClick(Sender: TObject); + procedure AutoStartButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FDataBuf : PChar; + FDataBufSize : Integer; + FCount : Integer; + FFinalCount : Integer; + FSending : Boolean; + FDisplayData : Boolean; + FUseDataSent : Boolean; + FFinished : Boolean; + FPaused : Boolean; + FAutoStart : Integer; + procedure Display(Msg : String); + procedure DoSend; + procedure WSocket1DataSent(Sender: TObject; Error: Word); + procedure WSocket1NoDataSent(Sender: TObject; Error: Word); + procedure WMAutoStart(var msg: TMessage); message WM_AUTO_START; + procedure WMCloseRequest(var msg: TMessage); message WM_CLOSE_REQUEST; + public + { Dclarations publiques } + end; + +var + SenderForm: TSenderForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'RecvForm'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyPort = 'Port'; + KeyServer = 'Server'; + KeyData = 'Data'; + KeyRepeat = 'RepeatCount'; + KeyContinuous = 'ContinuousSend'; + KeyLength = 'DataLength'; + KeyUseDataSent = 'UseDataSent'; + KeyDisplay = 'Display'; + KeyLinger = 'Linger'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, 'telnet'); + ServerEdit.Text := IniFile.ReadString(SectionData, KeyServer, 'localhost'); + DataEdit.Text := IniFile.ReadString(SectionData, KeyData, 'The quick brown fox jumps over the lazy dog'); + RepeatEdit.Text := IniFile.ReadString(SectionData, KeyRepeat, ''); + LengthEdit.Text := IniFile.ReadString(SectionData, KeyLength, '60'); + ContCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyContinuous, 0)); + LingerCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyLinger, 1)); + DisplayDataCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyDisplay, 0)); + UseDataSentCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyUseDataSent, 1)); + IniFile.Destroy; + RepeatEdit.Enabled := not ContCheckBox.Checked; + CountLabel.Caption := ''; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyPort, PortEdit.text); + IniFile.WriteString(SectionData, KeyServer, ServerEdit.text); + IniFile.WriteString(SectionData, KeyData, DataEdit.text); + IniFile.WriteString(SectionData, KeyRepeat, RepeatEdit.text); + IniFile.WriteString(SectionData, KeyLength, LengthEdit.text); + IniFile.WriteInteger(SectionData, KeyContinuous, Ord(ContCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyLinger, Ord(LingerCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyUseDataSent, Ord(UseDataSentCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyDisplay, Ord(DisplayDataCheckBox.Checked)); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.FormDestroy(Sender: TObject); +begin + if FDataBuf <> nil then begin + Freemem(FDataBuf, FDataBufSize); + FDataBuf := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.ContCheckBoxClick(Sender: TObject); +begin + RepeatEdit.Enabled := not ContCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.Display(Msg : String); +begin + if DisplayMemo.lines.Count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.ActionButtonClick(Sender: TObject); +var + Len : Integer; + N : Integer; + T : Integer; + Buf : String; +begin + { The ActionButton is used to start or stop data transmission } + if FSending then begin + { We are already sending, so user wants to stop } + { Display updated counter } + CountLabel.Caption := IntToStr(FCount); + + { Check if some data remains in TWSocket's internal buffer } + if (not WSocket1.AllSent) and + (Application.MessageBox('Data is still being sent' + #10 + + 'Close anyway ?', + 'Warning', MB_YESNO) <> IDYES) then + Exit; + + Display('Stop requested'); + if not WSocket1.AllSent then + Display('Not all data has been sent'); + + FAutoStart := 0; + { Close the socket. This will delete any data not already sent to } + { winsock. } + PostMessage(Handle, WM_CLOSE_REQUEST, 0, LParam(WSocket1)); + + Exit; + end; + + { The user wants to start data transmission } + CountLabel.Caption := ''; + PauseButton.Caption := '&Pause'; + PauseButton.Visible := TRUE; + ActionButton.Caption := '&Stop'; + FPaused := FALSE; + FSending := TRUE; + FFinished := FALSE; + FCount := 0; + + { Setup final count } + if ContCheckBox.Checked then + FFinalCount := 0 + else + FFinalCount := StrToInt(Trim(RepeatEdit.Text)); + + { Check which method use to send more data } + { Using OnDataSent event will prevent internal TWSocket buffer to be } + { enlarged without limit. } + FUseDataSent := UseDataSentCheckBox.Checked; + if FUseDataSent then + WSocket1.OnDataSent := WSocket1DataSent + else + WSocket1.OnDataSent := WSocket1NoDataSent; + + { Prepare data to be sent } + Buf := '0000 ' + DataEdit.Text; + Len := StrToInt(Trim(LengthEdit.Text)); + if Len <= 0 then + Len := Length(Buf); + if FDataBuf <> nil then + Freemem(FDataBuf, FDataBufSize); + FDataBufSize := Len + 3; + GetMem(FDataBuf, FDataBufSize); + if Len > 0 then begin + if Len < Length(Buf) then + Move(Buf[1], FDataBuf[0], Len) + else begin + T := 0; + while T < Len do begin + N := Length(Buf); + if (T + N) > Len then + N := Len - T; + if N > 0 then + Move(Buf[1], FDataBuf[T], N); + T := T + N; + end; + end; + end; + FDataBuf[Len] := #13; + FDataBuf[Len + 1] := #10; + FDataBuf[Len + 2] := #0; + + { Launch DNS lookup. When done, we'll try to connect. } + WSocket1.DnsLookup(Trim(ServerEdit.Text)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when DNS lookup is finished, even in case of failure. } +procedure TSenderForm.WSocket1DnsLookupDone(Sender: TObject; Error: Word); +begin + { If any error occured, we just display info and prepare to restart. } + if Error <> 0 then begin + MessageBeep(MB_OK); + Display('DNS failure. Error #' + IntToStr(Error)); + ActionButton.Caption := '&Start'; + PauseButton.Visible := FALSE; + Exit; + end; + + { Now we know the IP address. Try to connect. } + WSocket1.Addr := WSocket1.DnsResult; + WSocket1.Port := Trim(PortEdit.Text); + WSocket1.Proto := 'tcp'; + try + WSocket1.Connect; + except + on E:Exception do begin + MessageBeep(MB_OK); + Display('Connect failed: ' + E.Message); + ActionButton.Caption := '&Start'; + PauseButton.Visible := FALSE; + FAutoStart := 0; + Exit; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WSocket1SessionConnected(Sender: TObject; + Error: Word); +begin + if Error <> 0 then begin + MessageBeep(MB_OK); + Display('Can''t connect. Error #' + IntToStr(Error)); + ActionButton.Caption := '&Start'; + FAutoStart := 0; + Exit; + end; + Display('Connected'); + if LingerCheckBox.Checked then + WSocket1.LingerOnOff := wsLingerOn + else + WSocket1.LingerOnOff := wsLingerOff; + WSocket1.LingerTimeout := 300; + WSocket1.SetLingerOption; + DoSend; + if FUseDataSent then + Exit; + + { User requested to not use OnDataSent event. We will simply loop. } + { until all data has been sent. This will fill TWSocket internal buffer } + { very quickly while data is being sent in the background at network } + { speed. } + while (FFinalCount <= 0) or (FFinalCount > FCount) do begin + { We must break the loop if user temrinated the application, } + { or if connection is broke, or if user stopped. } + if (Application.Terminated) or + (WSocket1.State <> wsConnected) or + (not FSending) then + Exit; + { Otherwise, we can send data } + DoSend; + end; + CountLabel.Caption := IntToStr(FCount); + PauseButton.Visible := FALSE; + Display('All data is in TWSocket buffer and being sent in the background'); + FFinished := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.DoSend; +var + Buf : String; +begin + repeat + { Calling ProcessMessages let a chance to button and other events } + { to be handled. } + Application.ProcessMessages; + { We must stop if the user clicked the close button. } + if Application.Terminated then begin + Display('Application terminated'); + Exit; + end; + { We must stop if the user requested to stop send } + if not FSending then + Exit; + { We must stop if connection is broken } + if WSocket1.State <> wsConnected then + Exit; + {$IFNDEF VER80} + { We don't wants to use 100% CPU just looping. Sleep a little bit } + if FPaused then + Sleep(250); + {$ENDIF} + until FPaused = FALSE; + + { We need to check if we are still connected before sending } + if WSocket1.State <> wsConnected then + Exit; + + if (FFinalCount <= 0) or (FFinalCount > FCount) then begin + { Count the message sent } + Inc(FCount); + { Put the counter into the message, truvated to 4 digits } + Buf := IntToStr(FCount mod 10000) + ' '; + Move(Buf[1], FDataBuf[0], 4); + + { If required, display in memo box (slow down !) } + if FDisplayData then + Display('Sending ' + IntToStr(FCount)); + { Display the counter every 100 sends } + if (FCount mod 100) = 0 then + CountLabel.Caption := IntToStr(FCount); + + { Try to send data. Send may fail ! } + try + WSocket1.Send(FDataBuf, FDataBufSize - 1); + except + on E:Exception do begin + Display('Exception during TWSocket.Send: ' + E.Message); + FAutoStart := 0; + PostMessage(Handle, WM_CLOSE_REQUEST, 0, LParam(WSocket1)); + end; + end; + end + else begin + Display('Required data has been sent. Closing.'); + { We may have not read data send by server. But anyway, close the } + { session. } + PostMessage(Handle, WM_CLOSE_REQUEST, 0, LParam(WSocket1)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WSocket1DataSent(Sender: TObject; Error: Word); +begin + DoSend; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WSocket1NoDataSent(Sender: TObject; Error: Word); +begin + if FFinished then begin + if not WSocket1.AllSent then + Display('Not all sent'); + Display('Required data has been sent. Closing.'); + PostMessage(Handle, WM_CLOSE_REQUEST, 0, LParam(WSocket1)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WSocket1DataAvailable(Sender: TObject; Error: Word); +var + Buf : PChar; + Cli : TWSocket; + Len : Integer; + Cnt : Integer; +begin + Cli := Sender as TWSocket; + Cnt := Cli.RcvdCount; + if Cnt <= 0 then + Exit; +{$IFDEF VER80} + { Delphi 1 has 255 character limit of strings (StrPas below) } + if Cnt > 254 then + Cnt := 254; +{$ENDIF} + GetMem(Buf, Cnt + 1); + try + Len := Cli.Receive(Buf, Cnt); + if Len > 0 then begin + Buf[Cnt] := #0; + Display('Received: ' + StrPas(Buf)); + end; + finally + FreeMem(Buf, Cnt + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WSocket1SessionClosed(Sender: TObject; Error: Word); +begin + if Error = 0 then + Display('Socket closed, no error') + else begin + Display('Socket closed, Error #' + IntToStr(Error)); + FAutoStart := 0; + end; + FSending := FALSE; + ActionButton.Caption := '&Start'; + PauseButton.Visible := FALSE; + FPaused := FALSE; + if FAutoStart > 0 then begin + Inc(FAutoStart); + AutoStartButton.Caption := IntToStr(FAutoStart); + PostMessage(Handle, WM_AUTO_START, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.DisplayDataCheckBoxClick(Sender: TObject); +begin + FDisplayData := DisplayDataCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.UseDataSentCheckBoxClick(Sender: TObject); +begin + FUseDataSent := UseDataSentCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.PauseButtonClick(Sender: TObject); +begin + CountLabel.Caption := IntToStr(FCount); + FPaused := not FPaused; + if FPaused then + PauseButton.Caption := '&Resume' + else + PauseButton.Caption := '&Pause'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.AutoStartButtonClick(Sender: TObject); +begin + if FAutoStart <> 0 then begin + FAutoStart := 0; + Exit; + end; + + FAutoStart := 1; + AutoStartButton.Caption := IntToStr(FAutoStart); + PostMessage(Handle, WM_AUTO_START, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WMCloseRequest(var msg: TMessage); +var + WSocket : TWSocket; +begin + WSocket := TWSocket(msg.LParam); + WSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WMAutoStart(var msg: TMessage); +begin + ActionButtonClick(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/Socks1.dfm b/lib/Delphi/Internet/Socks1.dfm new file mode 100644 index 00000000..8a58485e Binary files /dev/null and b/lib/Delphi/Internet/Socks1.dfm differ diff --git a/lib/Delphi/Internet/Socks1.pas b/lib/Delphi/Internet/Socks1.pas new file mode 100644 index 00000000..7350bdb9 --- /dev/null +++ b/lib/Delphi/Internet/Socks1.pas @@ -0,0 +1,344 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Show how to use TWSocket with SOCKS protocol to traverse + a firewall. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: November 21, 1998 +Version: 1.00 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Socks1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, WinSock, WSocket, StdCtrls, ExtCtrls; + +type + TSocksTestForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + ConnectButton: TButton; + DisconnectButton: TButton; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + TargetHostEdit: TEdit; + TargetPortEdit: TEdit; + SocksServerEdit: TEdit; + SocksPortEdit: TEdit; + WSocket1: TWSocket; + Label5: TLabel; + SocksUsercodeEdit: TEdit; + SocksPasswordEdit: TEdit; + Label6: TLabel; + SocksAuthCheckBox: TCheckBox; + ClearButton: TButton; + Socks4RadioButton: TRadioButton; + Socks5RadioButton: TRadioButton; + procedure ConnectButtonClick(Sender: TObject); + procedure WSocket1SessionConnected(Sender: TObject; Error: Word); + procedure WSocket1DataAvailable(Sender: TObject; Error: Word); + procedure WSocket1SocksError(Sender: TObject; Error: Integer; + Msg: String); + procedure DisconnectButtonClick(Sender: TObject); + procedure WSocket1SessionClosed(Sender: TObject; Error: Word); + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure WSocket1SocksAuthState(Sender: TObject; + AuthState: TSocksAuthState); + procedure WSocket1SocksConnected(Sender: TObject; Error: Word); + procedure DisplayMsg(Sender : TObject; var Msg : String); + procedure ClearButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FRcvBuf : array [0..2047] of char; + FRcvCnt : Integer; + public + { Dclarations publiques } + end; + +var + SocksTestForm: TSocksTestForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Windows'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyTargetHost = 'TargetHost'; + KeyTargetPort = 'TargetPort'; + KeySocksServer = 'SocksServer'; + KeySocksPort = 'SocksPort'; + KeySocksUsercode = 'SocksUsercode'; + KeySocksPassword = 'SocksPassword'; + KeySocksAuth = 'SocksAuthentification'; + KeySocks4 = 'Socks4'; + KeySocks5 = 'Socks5'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + DisplayMemo.Clear; + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + TargetHostEdit.Text := IniFile.ReadString(SectionData, KeyTargetHost, ''); + TargetPortEdit.Text := IniFile.ReadString(SectionData, KeyTargetPort, ''); + SocksServerEdit.Text := IniFile.ReadString(SectionData, KeySocksServer, ''); + SocksPortEdit.Text := IniFile.ReadString(SectionData, KeySocksPort, '1080'); + SocksUsercodeEdit.Text := IniFile.ReadString(SectionData, KeySocksUsercode, ''); + SocksPasswordEdit.Text := IniFile.ReadString(SectionData, KeySocksPassword, ''); + SocksAuthCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeySocksAuth, 0)); + Socks4RadioButton.Checked := Boolean(IniFile.ReadInteger(SectionData, KeySocks4, 0)); + Socks5RadioButton.Checked := Boolean(IniFile.ReadInteger(SectionData, KeySocks5, 1)); + IniFile.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyTargetHost, Trim(TargetHostEdit.Text)); + IniFile.WriteString(SectionData, KeyTargetPort, Trim(TargetPortEdit.Text)); + IniFile.WriteString(SectionData, KeySocksServer, Trim(SocksServerEdit.Text)); + IniFile.WriteString(SectionData, KeySocksPort, Trim(SocksPortEdit.Text)); + IniFile.WriteString(SectionData, KeySocksUsercode, Trim(SocksUsercodeEdit.Text)); + IniFile.WriteString(SectionData, KeySocksPassword, Trim(SocksPasswordEdit.Text)); + IniFile.WriteInteger(SectionData, KeySocksAuth, Ord(SocksAuthCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeySocks5, Ord(Socks5RadioButton.Checked)); + IniFile.WriteInteger(SectionData, KeySocks4, Ord(Socks4RadioButton.Checked)); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.DisplayMsg(Sender : TObject; var Msg : String); +begin + DisplayMemo.lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.ConnectButtonClick(Sender: TObject); +const + AuthMethod : array [Boolean] of TSocksAuthentication = + (socksNoAuthentication, socksAuthenticateUsercode); +begin + if Socks5RadioButton.Checked then + WSocket1.SocksLevel := '5' + else if Socks4RadioButton.Checked and SocksAuthCheckBox.Checked then + WSocket1.SocksLevel := '4A' + else + WSocket1.SocksLevel := '4'; + DisplayMemo.Lines.Add('Connecting using Socks' + WSocket1.SocksLevel); + + WSocket1.SocksServer := Trim(SocksServerEdit.Text); + WSocket1.SocksPort := Trim(SocksPortEdit.Text); + WSocket1.SocksUsercode := Trim(SocksUsercodeEdit.Text); + WSocket1.SocksPassword := Trim(SocksPasswordEdit.Text); + WSocket1.SocksAuthentication := AuthMethod[SocksAuthCheckBox.Checked]; + WSocket1.Proto := 'tcp'; + WSocket1.Addr := Trim(TargetHostEdit.Text); + WSocket1.Port := Trim(TargetPortEdit.Text); + WSocket1.OnDisplay := DisplayMsg; + WSocket1.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.DisconnectButtonClick(Sender: TObject); +begin + WSocket1.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1SessionConnected(Sender: TObject; Error: Word); +begin + DisplayMemo.Lines.Add('Session connected to remote host.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1SocksConnected(Sender: TObject; Error: Word); +begin + DisplayMemo.Lines.Add('Session connected to socks server.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1SocksAuthState(Sender: TObject; + AuthState: TSocksAuthState); +begin + case AuthState of + socksAuthStart: + DisplayMemo.Lines.Add('Socks authentification start.'); + socksAuthSuccess: + DisplayMemo.Lines.Add('Socks authentification success.'); + socksAuthFailure: + DisplayMemo.Lines.Add('Socks authentification failure.'); + socksAuthNotRequired: + DisplayMemo.Lines.Add('Socks authentification not required.'); + else + DisplayMemo.Lines.Add('Unknown socks authentification state.') + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1SessionClosed(Sender: TObject; Error: Word); +begin + DisplayMemo.Lines.Add('Session Closed'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1DataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I : Integer; + p : PChar; +begin + Len := TWSocket(Sender).Receive(@FRcvBuf[FRcvCnt], Sizeof(FRcvBuf) - FRcvCnt - 1); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; + FRcvBuf[FRcvCnt] := #0; + + while FRcvCnt > 0 do begin + p := StrScan(FRcvBuf, #10); + if p = nil then + Exit; + I := p - FRcvBuf; + + FRcvBuf[I] := #0; + if (I > 0) and (FRcvBuf[I - 1] = #13) then + FRcvBuf[I - 1] := #0; + + DisplayMemo.Lines.Add('Received: ''' + StrPas(FRcvBuf) + ''''); + Move(FRcvBuf[I + 1], FRcvBuf[0], FRcvCnt - I); + FRcvCnt := FRcvCnt - I - 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1SocksError(Sender : TObject; Error : Integer; Msg : String); +begin + DisplayMemo.Lines.Add('Socks error #' + IntToStr(Error) + ' ' + Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.ClearButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/SocksTst.dpr b/lib/Delphi/Internet/SocksTst.dpr new file mode 100644 index 00000000..7a3077ea --- /dev/null +++ b/lib/Delphi/Internet/SocksTst.dpr @@ -0,0 +1,12 @@ +program SocksTst; + +uses + Forms, + Socks1 in 'Socks1.pas' {SocksTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(TSocksTestForm, SocksTestForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/SrvDemo1.dfm b/lib/Delphi/Internet/SrvDemo1.dfm new file mode 100644 index 00000000..70b977f9 Binary files /dev/null and b/lib/Delphi/Internet/SrvDemo1.dfm differ diff --git a/lib/Delphi/Internet/SrvDemo1.pas b/lib/Delphi/Internet/SrvDemo1.pas new file mode 100644 index 00000000..c19cdd0c --- /dev/null +++ b/lib/Delphi/Internet/SrvDemo1.pas @@ -0,0 +1,189 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstration for Server program using TWSocket. +Creation: 8 december 1997 +Version: 1.02 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 09, 1997 V1.01 Made it compatible with Delphi 1 +Dec 28, 1998 V1.02 Use line mode to make it simpler. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit SrvDemo1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, IniFiles, WSocket, SrvDemo2, Db, DBTables, + ExtCtrls; + +const + IniFileName = 'SrvDemo.ini'; + +type + TSrvForm = class(TForm) + SrvSocket: TWSocket; + ClientListBox: TListBox; + DataTable: TTable; + Panel1: TPanel; + Label1: TLabel; + PortEdit: TEdit; + PortButton: TButton; + procedure FormShow(Sender: TObject); + procedure SrvSocketSessionAvailable(Sender: TObject; Error: Word); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure PortButtonClick(Sender: TObject); + private + Initialized : Boolean; + ClientNumber : Integer; + procedure WMUser(var msg: TMessage); message WM_USER; + procedure StartServer; + end; + +var + SrvForm: TSrvForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + Buffer : String; +begin + if not Initialized then begin + Initialized := TRUE; + IniFile := TIniFile.Create(IniFileName); + Top := IniFile.ReadInteger('Window', 'Top', Top); + Left := IniFile.ReadInteger('Window', 'Left', Left); + Width := IniFile.ReadInteger('Window', 'Width', Width); + Height := IniFile.ReadInteger('Window', 'Height', Height); + PortEdit.Text := IniFile.ReadString('Data', 'Port', 'telnet'); + IniFile.Free; + + DataTable.DataBaseName := ExtractFilePath(Application.ExeName); + try + DataTable.Open; + except + Buffer := 'Unable to open ' + DataTable.DataBaseName + + DataTable.TableName + #0; + Application.MessageBox(@Buffer[1], 'Error', MB_OK); + Application.Terminate; + Exit; + end; + StartServer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteInteger('Window', 'Top', Top); + IniFile.WriteInteger('Window', 'Left', Left); + IniFile.WriteInteger('Window', 'Width', Width); + IniFile.WriteInteger('Window', 'Height', Height); + IniFile.WriteString('Data', 'Port', PortEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.PortButtonClick(Sender: TObject); +begin + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.StartServer; +begin + SrvSocket.Close; + SrvSocket.Addr := '0.0.0.0'; + SrvSocket.Port := PortEdit.Text; + SrvSocket.Proto := 'tcp'; + SrvSocket.Listen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.SrvSocketSessionAvailable(Sender: TObject; Error: Word); +var + Form : TCliForm; +begin + Inc(ClientNumber); + Form := TCliForm.Create(self); + { Add the form address as an identifier in our client list } + ClientListBox.Items.Add(IntToStr(LongInt(Form))); + { We request line mode, to receive only complete line. } + { TWSocket does all the job for us... } + Form.CliSocket.LineMode := TRUE; + Form.CliSocket.LineEnd := #13#10; + { Now accept the new client connection } + Form.CliSocket.HSocket := SrvSocket.Accept; + Form.DataTable := DataTable; + Form.Caption := 'Client ' + IntToStr(ClientNumber); + { Showing the form is not mandatory. In a real server, this can be } + { annoying to have a form displayed for each client. In some situation, } + { it may be handy to have a user interface for each connected client. } + Form.Show; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.WMUser(var msg: TMessage); +var + Form : TCliForm; + I : Integer; +begin + Form := TCliForm(Msg.lParam); + Form.Release; + for I := 0 to ClientListBox.Items.Count - 1 do begin + if ClientListBox.Items[I] = IntToStr(LongInt(Form)) then begin + ClientListBox.Items.Delete(I); + break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/SrvDemo2.dfm b/lib/Delphi/Internet/SrvDemo2.dfm new file mode 100644 index 00000000..7d0b7c5c Binary files /dev/null and b/lib/Delphi/Internet/SrvDemo2.dfm differ diff --git a/lib/Delphi/Internet/SrvDemo2.pas b/lib/Delphi/Internet/SrvDemo2.pas new file mode 100644 index 00000000..412fa87e --- /dev/null +++ b/lib/Delphi/Internet/SrvDemo2.pas @@ -0,0 +1,256 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstration for Server program using TWSocket. +Creation: 8 december 1997 +Version: 1.03 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 28, 1998 V1.02 Use line mode. +Mar 07, 1999 V1.03 Adapted for Delphi 1 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit SrvDemo2; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, StdCtrls, Db, DBTables, ExtCtrls; + +type + TCliForm = class(TForm) + CliSocket: TWSocket; + DisplayMemo: TMemo; + Panel1: TPanel; + SendEdit: TEdit; + SendButton: TButton; + Panel2: TPanel; + LineLabel: TLabel; + DisconnectButton: TButton; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure CliSocketDataAvailable(Sender: TObject; Error: Word); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + procedure SendButtonClick(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + private + { Dclarations prives } + Initialized : Boolean; + Buffer : array [0..1023] of char; + procedure ProcessCommand(Cmd : String); + public + { Dclarations publiques } + DataTable : TTable; + end; + +var + CliForm: TCliForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.FormShow(Sender: TObject); +begin + if not Initialized then begin + Initialized := TRUE; + DisplayMemo.Clear; + SendEdit.Text := 'Hello world !'; + ActiveControl := SendEdit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.FormClose(Sender: TObject; var Action: TCloseAction); +begin + PostMessage(TForm(Owner).Handle, WM_USER, 0, LongInt(Self)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.ProcessCommand(Cmd : String); +var + CommandVerb : String; + CommandTail : String; + I, J : Integer; +begin + DisplayMemo.Lines.Add(Cmd); + + { Skip leading spaces } + I := 1; + while (I <= Length(Cmd)) and (Cmd[I] in [' ', #9]) do + Inc(I); + + { Find separator and separe CommandVerb and CommandTail } + J := I; + while TRUE do begin + if (J >= Length(Cmd)) then begin + CommandTail := ''; + CommandVerb := Cmd; + break; + end; + + if Cmd[J] in [' ', #9, '/'] then begin + CommandTail := Copy(Cmd, J, Length(Cmd) - J + 1); + CommandVerb := Copy(Cmd, I, J - I); + break; + end; + Inc(J); + end; + CommandVerb := UpperCase(CommandVerb); + CommandTail := Trim(CommandTail); + + if CommandVerb = 'LASTNAME' then begin + DataTable.IndexName := 'NOM'; + DataTable.SetKey; + DataTable.FieldByName('NOM').AsString := CommandTail; + end + else if CommandVerb = 'FIRSTNAME' then begin + DataTable.IndexName := 'PRENOM'; + DataTable.SetKey; + DataTable.FieldByName('PRENOM').AsString := CommandTail; + end + else begin + CliSocket.SendStr('Syntax error !' + #13 + #10); + Exit; + end; + + if DataTable.GotoKey then + CliSocket.SendStr( + '"' + DataTable.FieldByName('NOM').AsString + '", ' + + '"' + DataTable.FieldByName('PRENOM').AsString + '", ' + + '"' + DataTable.FieldByName('ADRESSE').AsString + '", ' + + '"' + DataTable.FieldByName('CP').AsString + '", ' + + '"' + DataTable.FieldByName('LOCALITE').AsString + '"' + + #13 + #10) + else + CliSocket.SendStr('Pas trouv' + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; +begin + { We use line mode. So when we call Receive, we always receive a } + { complete line, include end of line marker or nothing. } + Len := CliSocket.Receive(@Buffer[0], SizeOf(Buffer) - 1); + if Len <= 0 then + Exit; + + { Remove end of line marker } + while (Len > 0) and (Buffer[Len - 1] in [#13, #10]) do + Dec(Len); + + { Nul terminate the string } + Buffer[Len] := #0; + { Display command in label } + LineLabel.Caption := StrPas(Buffer); + { Process command } + ProcessCommand(StrPas(Buffer)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.SendButtonClick(Sender: TObject); +begin + CliSocket.SendStr(SendEdit.Text + #13 + #10); + ActiveControl := SendEdit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.DisconnectButtonClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/SrvTcp.dpr b/lib/Delphi/Internet/SrvTcp.dpr new file mode 100644 index 00000000..8b48ae65 --- /dev/null +++ b/lib/Delphi/Internet/SrvTcp.dpr @@ -0,0 +1,16 @@ +program SrvTcp; + +uses + Forms, + SrvTcp1 in 'SrvTcp1.pas' {GetGroupsForm}, + TcpCmd in 'TcpCmd.pas'; + +{$R *.RES} + +begin +{$IFNDEF VER80} + Application.Initialize; +{$ENDIF} + Application.CreateForm(TGetGroupsForm, GetGroupsForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/SrvTcp1.dfm b/lib/Delphi/Internet/SrvTcp1.dfm new file mode 100644 index 00000000..02c4c2ea Binary files /dev/null and b/lib/Delphi/Internet/SrvTcp1.dfm differ diff --git a/lib/Delphi/Internet/SrvTcp1.pas b/lib/Delphi/Internet/SrvTcp1.pas new file mode 100644 index 00000000..82062b8b --- /dev/null +++ b/lib/Delphi/Internet/SrvTcp1.pas @@ -0,0 +1,194 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This code is part of SvcTcp sample program. SvcTcp program + shows how to use TWSocket from within a Windows NT/2000 service. + This code has been tested with Delphi 5, Windows NT4 and 2000. + All TWSocket code has been encapsulated in TTcpDaemon object. + This is done so that you can see how the same code can be used + inside a service or inside a normal exe program (this sample). +Creation: July 15, 2000 +Version: 1.00 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + See http://www.rtfm.be/fpiette/supportuk.htm for subscription. +Legal issues: Copyright (C) 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit SrvTcp1; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, StdCtrls, ExtCtrls, TcpCmd; + +const + SrvTcpVersion = 100; + CopyRight : String = ' SrvTcp (c) 2000 F. Piette V1.00 '; + WM_APPSTARTUP = WM_USER + 1; + +type + TGetGroupsForm = class(TForm) + ToolPanel: TPanel; + DisplayMemo: TMemo; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FTcpDaemon : TTcpDaemon; + procedure Display(Msg : String); + procedure WMAppStartup(var Msg: TMessage); message WM_APPSTARTUP; + public + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + GetGroupsForm: TGetGroupsForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyLastServer = 'LastServer'; + KeyLastUser = 'LastUser'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FTcpDaemon := TTcpDaemon.Create; + FTcpDaemon.Banner := 'ICS Tcp Server Ready'; + FTcpDaemon.OnDisplay := Display; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.FormDestroy(Sender: TObject); +begin + if Assigned(FTcpDaemon) then begin + FTcpDaemon.Destroy; + FTcpDaemon := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + IniFile.Destroy; + DisplayMemo.Clear; + { Delay startup code until our UI is ready and visible } + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.Display(Msg : String); +var + I : Integer; +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + for I := 1 to 50 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + {$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.WMAppStartup(var Msg: TMessage); +begin + FTcpDaemon.Start; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/SvcTcp.dpr b/lib/Delphi/Internet/SvcTcp.dpr new file mode 100644 index 00000000..300c0042 --- /dev/null +++ b/lib/Delphi/Internet/SvcTcp.dpr @@ -0,0 +1,14 @@ +program SvcTcp; + +uses + SvcMgr, + SvcTcp1 in 'SvcTcp1.pas' {IcsTcpSvc: TService}, + TcpCmd in 'TcpCmd.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TIcsTcpSvc, IcsTcpSvc); + Application.Run; +end. diff --git a/lib/Delphi/Internet/SvcTcp1.dfm b/lib/Delphi/Internet/SvcTcp1.dfm new file mode 100644 index 00000000..cd8be4fa Binary files /dev/null and b/lib/Delphi/Internet/SvcTcp1.dfm differ diff --git a/lib/Delphi/Internet/SvcTcp1.pas b/lib/Delphi/Internet/SvcTcp1.pas new file mode 100644 index 00000000..61310992 --- /dev/null +++ b/lib/Delphi/Internet/SvcTcp1.pas @@ -0,0 +1,171 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Shows how to use TWSocket from within a Windows NT/2000 service. + This code has been tested with Delphi 5, Windows NT4 and 2000. + All TWSocket code has been encapsulated in TTcpDaemon object. + This is done so that you can see how the same code can be used + inside a service or inside a normal exe program (see SrvTcp). + To install SvcTcp, you need Windows NT or Windows 2000. At + command prompt, enter: to uninstall it, just + enter the command . Once installed, you can + find SvcTcp service in the "services" applet. You can start and + stop it from that applet. You can also start and stop it from + the command line with the command . + To test for service operation, use command line telnet utility + and connect to port 2120, then enter the command help and hit + return key. If you wants to see what you type, turn telnet + local echo to on. +Creation: July 15, 2000 +Version: 1.00 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + See http://www.rtfm.be/fpiette/supportuk.htm for subscription. +Legal issues: Copyright (C) 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit SvcTcp1; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, SvcMgr, TcpCmd; + +const + SvcTcpVersion = 100; + CopyRight : String = ' SvcTcp (c) 2000 F. Piette V1.00 '; + +type + TIcsTcpSvc = class(TService) + procedure ServiceExecute(Sender: TService); + procedure ServiceStop(Sender: TService; var Stopped: Boolean); + procedure ServiceCreate(Sender: TObject); + procedure ServiceDestroy(Sender: TObject); + procedure ServiceStart(Sender: TService; var Started: Boolean); + private + FTcpDaemon : TTcpDaemon; + procedure Display(Msg: String); + public + function GetServiceController: TServiceController; override; + end; + +var + IcsTcpSvc: TIcsTcpSvc; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure ServiceController(CtrlCode: DWord); stdcall; +begin + IcsTcpSvc.Controller(CtrlCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TIcsTcpSvc.GetServiceController: TServiceController; +begin + Result := ServiceController; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.ServiceStart(Sender: TService; var Started: Boolean); +begin + try + FTcpDaemon.Start; + Started := TRUE; + except + Started := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.ServiceStop(Sender: TService; var Stopped: Boolean); +begin + FTcpDaemon.Stop; + Stopped := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.ServiceExecute(Sender: TService); +begin + while not Terminated do + ServiceThread.ProcessRequests(TRUE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.Display(Msg : String); +begin + // A service has no access to the GUI. + // Simply ignore any display :-( + // We could log messages to the EventViewer +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.ServiceCreate(Sender: TObject); +begin + FTcpDaemon := TTcpDaemon.Create; + FTcpDaemon.Banner := DisplayName + ' Ready'; + FTcpDaemon.OnDisplay := Display; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.ServiceDestroy(Sender: TObject); +begin + if Assigned(FTcpDaemon) then begin + FTcpDaemon.Destroy; + FTcpDaemon := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/TcpCmd.pas b/lib/Delphi/Internet/TcpCmd.pas new file mode 100644 index 00000000..f0831ddc --- /dev/null +++ b/lib/Delphi/Internet/TcpCmd.pas @@ -0,0 +1,366 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This code is part of SvcTcp and SrvTcp sample programs. In those + samples, all TWSocket code has been encapsulated in TTcpDaemon + object. This is done so that you can see how the same code can + be used inside a service or inside a normal exe program. +Creation: July 15, 2000 +Version: 1.00 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + See http://www.rtfm.be/fpiette/supportuk.htm for subscription. +Legal issues: Copyright (C) 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TcpCmd; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, WSocket, WSocketS; + +const + TcpCmdVersion = 100; + CopyRight : String = ' TcpCmd (c) 2000 F. Piette V1.00 '; + +type + { This class is used as a client class for TWSocketServer. Each time a } + { client connect to the server, TWSocketServer will instanciate a new } + { TTcpSrvClient to handle the client. } + TTcpSrvClient = class(TWSocketClient) + public + RcvdLine : String; + Param : array [0..10] of String; + ParamCount : Integer; + ConnectTime : TDateTime; + end; + + TDisplayProc = procedure (Msg : String) of object; + + { This class encapsulate all the work for a basic TCP server. It include } + { a basic command interpreter. } + TTcpDaemon = class(TObject) + private + WSocketServer1 : TWSocketServer; + FPort : String; + FAddr : String; + FOnDisplay : TDisplayProc; + procedure Display(Msg : String); + procedure WSocketServer1BgException(Sender: TObject; E: Exception; + var CanClose: Boolean); + procedure WSocketServer1ClientConnect(Sender: TObject; + Client: TWSocketClient; + Error: Word); + procedure WSocketServer1ClientDisconnect(Sender: TObject; + Client: TWSocketClient; + Error: Word); + procedure ClientDataAvailable(Sender: TObject; Error: Word); + procedure ProcessData(Client: TTcpSrvClient); + procedure ClientBgException(Sender: TObject; E: Exception; + var CanClose: Boolean); + function GetBanner: String; + procedure SetBanner(const Value: String); + public + constructor Create; virtual; + destructor Destroy; override; + procedure Start; + procedure Stop; + property OnDisplay : TDisplayProc read FOnDisplay write FOnDisplay; + { Make Banner property available to the outside. We could make other } + { TWSocket properties available. } + property Banner : String read GetBanner write SetBanner; + property Port : String read FPort write FPort; + property Addr : String read FAddr write FAddr; + end; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTcpDaemon.Create; +begin + inherited Create; + WSocketServer1 := TWSocketServer.Create(nil); + WSocketServer1.Banner := 'ICS Tcp Service Ready'; + FPort := '2120'; + FAddr := '0.0.0.0'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTcpDaemon.Destroy; +begin + if Assigned(WSocketServer1) then begin + WSocketServer1.Destroy; + WSocketServer1 := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.WSocketServer1BgException(Sender: TObject; + E: Exception; var CanClose: Boolean); +begin + Display('Server exception occured: ' + E.ClassName + ': ' + E.Message); + CanClose := FALSE; { Hoping that server will still work ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is called each time a new client connect. We can setup our } +{ client class to fit our needs (We use line mode and two events) } +procedure TTcpDaemon.WSocketServer1ClientConnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TTcpSrvClient do begin + Display('Client connecting: ' + PeerAddr); + LineMode := TRUE; + LineEdit := TRUE; + OnDataAvailable := ClientDataAvailable; + OnBgException := ClientBgException; + ConnectTime := Now; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is called each time a client disconnect. No many things to do } +{ here. Just display a message. } +procedure TTcpDaemon.WSocketServer1ClientDisconnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TTcpSrvClient do begin + Display('Client disconnecting: ' + PeerAddr + ' ' + + 'Duration: ' + FormatDateTime('hh:nn:ss', + Now - ConnectTime)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.ClientDataAvailable( + Sender : TObject; + Error : Word); +begin + with Sender as TTcpSrvClient do begin + { We use line mode. We will receive complete lines } + RcvdLine := ReceiveStr; + { Remove trailing CR/LF } + while (Length(RcvdLine) > 0) and + (RcvdLine[Length(RcvdLine)] in [#13, #10]) do + RcvdLine := Copy(RcvdLine, 1, Length(RcvdLine) - 1); + Display('Received from ' + GetPeerAddr + ': ''' + RcvdLine + ''''); + ProcessData(Sender as TTcpSrvClient); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Split a command line into an array of words. Use spaces or tabs as } +{ command delimiter. Commands words have to be delimited by doubles quotes } +{ if they include spaces or tabs. } +function ParseCommandLine( + const CmdLine : String; + var ParamsArray : array of string) : Integer; +var + Index : Integer; + I, J : Integer; +begin + I := 1; + Index := Low(ParamsArray); + while (Index <= High(ParamsArray)) and + (I <= Length(CmdLine)) do begin + { Skip spaces and tabs } + while (I <= Length(CmdLine)) and (CmdLine[I] in [' ', #9]) do + Inc(I); + if I > Length(CmdLine) then + break; + { Check if quoted parameters (can have embeded spaces) } + if CmdLine[I] = '"' then begin + Inc(I); + ParamsArray[Index] := ''; + while I <= Length(CmdLine) do begin + if CmdLine[I] = '"' then begin + if (I >= Length(CmdLine)) or (CmdLine[I + 1] <> '"') then begin + Inc(I); + break; + end; + ParamsArray[Index] := ParamsArray[Index] + '"'; + Inc(I, 2); + end + else begin + ParamsArray[Index] := ParamsArray[Index] + CmdLine[I]; + Inc(I); + end; + end; + end + else begin + J := I; + while (I <= Length(CmdLine)) and (not (CmdLine[I] in [' ', #9])) do + Inc(I); + if J = I then + break; + ParamsArray[Index] := Copy(CmdLine, J, I - J); + end; + Inc(Index); + end; + Result := Index - Low(ParamsArray); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Process a command line received from any client. If process takes time, } +{ you should use a thread to do the work and return immediately. } +procedure TTcpDaemon.ProcessData(Client : TTcpSrvClient); +var + I : Integer; + AClient : TTcpSrvClient; +begin + { Parse command line. } + Client.ParamCount := ParseCommandLine(Client.RcvdLine, Client.Param); + if Client.ParamCount <= 0 then + Exit; + + { We could replace all those CompareText with a table lookup } + if CompareText(Client.Param[0], 'exit') = 0 then + { We can't call Client.Close here because we will immediately } + { reenter DataAvailable event handler with same line because } + { a line is removed from buffer AFTER it has been processed. } + { Using CloseDelayed will delay Close until we are out of } + { current event handler. } + Client.CloseDelayed + else if CompareText(Client.Param[0], 'time') = 0 then + { Send server date and time to client } + Client.SendStr(DateTimeToStr(Now) + #13#10) + else if CompareText(Client.Param[0], 'who') = 0 then begin + { Send client list to client } + Client.SendStr('There are ' + IntToStr(WSocketServer1.ClientCount) + + ' connected users:' + #13#10); + for I := WSocketServer1.ClientCount - 1 downto 0 do begin + AClient := TTcpSrvClient(WSocketServer1.Client[I]); + Client.SendStr(AClient.PeerAddr + ':' + AClient.GetPeerPort + ' ' + + DateTimeToStr(AClient.ConnectTime) + #13#10); + end; + end + else if CompareText(Client.Param[0], 'help') = 0 then begin + Client.SendStr('Commands are:' + #13#10 + + ' exit Close current session' + #13#10 + + ' time Display server time and date' + #13#10 + + ' who Display connected clients' + #13#10 + + ' help Show this help text' + #13#10); + end + else begin + if Client.State = wsConnected then + Client.SendStr('Unknown command: ''' + + Client.Param[0] + '''' + #13#10 + + 'Type help if you need help...' +#13#10); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when a client socket experience a background } +{ exception. It is likely to occurs when client aborted connection and data } +{ has not been sent yet. } +procedure TTcpDaemon.ClientBgException( + Sender : TObject; + E : Exception; + var CanClose : Boolean); +begin + Display('Client exception occured: ' + E.ClassName + ': ' + E.Message); + CanClose := TRUE; { Goodbye client ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.Display(Msg: String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.Start; +begin + WSocketServer1.OnBgException := WSocketServer1BgException; + WSocketServer1.OnClientConnect := WSocketServer1ClientConnect; + WSocketServer1.OnClientDisconnect := WSocketServer1ClientDisconnect; + WSocketServer1.Proto := 'tcp'; + WSocketServer1.Port := FPort; + WSocketServer1.Addr := FAddr; + WSocketServer1.ClientClass := TTcpSrvClient; + WSocketServer1.Listen; + Display('Waiting for clients...'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.Stop; +begin + WSocketServer1.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTcpDaemon.GetBanner: String; +begin + Result := WSocketServer1.Banner; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.SetBanner(const Value: String); +begin + WSocketServer1.Banner := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/TcpSrv.dpr b/lib/Delphi/Internet/TcpSrv.dpr new file mode 100644 index 00000000..dee37a0b --- /dev/null +++ b/lib/Delphi/Internet/TcpSrv.dpr @@ -0,0 +1,12 @@ +program TcpSrv; + +uses + Forms, + TcpSrv1 in 'TcpSrv1.pas' {TcpSrvForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTcpSrvForm, TcpSrvForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/TcpSrv1.dfm b/lib/Delphi/Internet/TcpSrv1.dfm new file mode 100644 index 00000000..d81da256 Binary files /dev/null and b/lib/Delphi/Internet/TcpSrv1.dfm differ diff --git a/lib/Delphi/Internet/TcpSrv1.pas b/lib/Delphi/Internet/TcpSrv1.pas new file mode 100644 index 00000000..1066303d --- /dev/null +++ b/lib/Delphi/Internet/TcpSrv1.pas @@ -0,0 +1,350 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois Piette +Creation: Aug 29, 1999 +Version: 1.04 +Description: Basic TCP server showing how to use TWSocketServer and + TWSocketClient components. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + francois.piette@swing.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1999-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. +History: +Sep 05, 1999 V1.01 Adapted for Delphi 1 +Oct 15, 2000 V1.02 Display remote and local socket binding when a client + connect. +Nov 11, 2000 V1.03 Implemented OnLineLimitExceeded event +Dec 15, 2001 V1.03 In command help changed #10#13 to the correct value #13#10. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TcpSrv1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, StdCtrls, ExtCtrls, WSocket, WSocketS; + +const + TcpSrvVersion = 104; + CopyRight = ' TcpSrv (c) 1999-2001 by Franois PIETTE. V1.04'; + WM_APPSTARTUP = WM_USER + 1; + +type + { TTcpSrvClient is the class which will be instanciated by server component } + { for each new client. N simultaneous clients means N TTcpSrvClient will be } + { instanciated. Each being used to handle only a single client. } + { We can add any data that has to be private for each client, such as } + { receive buffer or any other data needed for processing. } + TTcpSrvClient = class(TWSocketClient) + public + RcvdLine : String; + ConnectTime : TDateTime; + end; + + TTcpSrvForm = class(TForm) + ToolPanel: TPanel; + DisplayMemo: TMemo; + WSocketServer1: TWSocketServer; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure WSocketServer1ClientConnect(Sender: TObject; + Client: TWSocketClient; Error: Word); + procedure WSocketServer1ClientDisconnect(Sender: TObject; + Client: TWSocketClient; Error: Word); + procedure WSocketServer1BgException(Sender: TObject; E: Exception; + var CanClose: Boolean); + private + FIniFileName : String; + FInitialized : Boolean; + procedure Display(Msg : String); + procedure WMAppStartup(var Msg: TMessage); message WM_APPSTARTUP; + procedure ClientDataAvailable(Sender: TObject; Error: Word); + procedure ProcessData(Client : TTcpSrvClient); + procedure ClientBgException(Sender : TObject; + E : Exception; + var CanClose : Boolean); + procedure ClientLineLimitExceeded(Sender : TObject; + Cnt : LongInt; + var ClearData : Boolean); + public + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + TcpSrvForm: TTcpSrvForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'WindowTcpSrv'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormCreate(Sender: TObject); +begin + { Compute INI file name based on exe file name. Remove path to make it } + { go to windows directory. } + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + { Fetch persistent parameters from INI file } + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + IniFile.Destroy; + DisplayMemo.Clear; + { Delay startup code until our UI is ready and visible } + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + { Save persistent data to INI file } + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in our display memo. Delete lines to be sure to not } +{ overflow the memo which may have a limited capacity. } +procedure TTcpSrvForm.Display(Msg : String); +var + I : Integer; +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + for I := 1 to 50 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is our custom message handler. We posted a WM_APPSTARTUP message } +{ from FormShow event handler. Now UI is ready and visible. } +procedure TTcpSrvForm.WMAppStartup(var Msg: TMessage); +begin + Display(CopyRight); + Display(WSocket.Copyright); + Display(WSockets.CopyRight); + WSocketServer1.Proto := 'tcp'; { Use TCP protocol } + WSocketServer1.Port := 'telnet'; { Use telnet port } + WSocketServer1.Addr := '0.0.0.0'; { Use any interface } + WSocketServer1.ClientClass := TTcpSrvClient; { Use our component } + WSocketServer1.Listen; { Start litening } + Display('Waiting for clients...'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.WSocketServer1ClientConnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TTcpSrvClient do begin + Display('Client connected.' + + ' Remote: ' + PeerAddr + '/' + PeerPort + + ' Local: ' + GetXAddr + '/' + GetXPort); + Display('There is now ' + + IntToStr(TWSocketServer(Sender).ClientCount) + + ' clients connected.'); + LineMode := TRUE; + LineEdit := TRUE; + LineLimit := 80; { Do not accept long lines } + OnDataAvailable := ClientDataAvailable; + OnLineLimitExceeded := ClientLineLimitExceeded; + OnBgException := ClientBgException; + ConnectTime := Now; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.WSocketServer1ClientDisconnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TTcpSrvClient do begin + Display('Client disconnecting: ' + PeerAddr + ' ' + + 'Duration: ' + FormatDateTime('hh:nn:ss', + Now - ConnectTime)); + Display('There is now ' + + IntToStr(TWSocketServer(Sender).ClientCount - 1) + + ' clients connected.'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.ClientLineLimitExceeded( + Sender : TObject; + Cnt : LongInt; + var ClearData : Boolean); +begin + with Sender as TTcpSrvClient do begin + Display('Line limit exceeded from ' + GetPeerAddr + '. Closing.'); + ClearData := TRUE; + Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.ClientDataAvailable( + Sender : TObject; + Error : Word); +begin + with Sender as TTcpSrvClient do begin + { We use line mode. We will receive complete lines } + RcvdLine := ReceiveStr; + { Remove trailing CR/LF } + while (Length(RcvdLine) > 0) and + (RcvdLine[Length(RcvdLine)] in [#13, #10]) do + RcvdLine := Copy(RcvdLine, 1, Length(RcvdLine) - 1); + Display('Received from ' + GetPeerAddr + ': ''' + RcvdLine + ''''); + ProcessData(Sender as TTcpSrvClient); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.ProcessData(Client : TTcpSrvClient); +var + I : Integer; + AClient : TTcpSrvClient; +begin + { We could replace all those CompareText with a table lookup } + if CompareText(Client.RcvdLine, 'help') = 0 then + Client.SendStr('Commands are:' + #13#10 + + ' exit' + #13#10 + + ' who' + #13#10 + + ' time' + #13#10 + + ' exception' + #13#10) + else if CompareText(Client.RcvdLine, 'exit') = 0 then + { We can't call Client.Close here because we will immediately } + { reenter DataAvailable event handler with same line because } + { a line is removed from buffer AFTER it has been processed. } + { Using CloseDelayed will delay Close until we are out of } + { current event handler. } + Client.CloseDelayed + else if CompareText(Client.RcvdLine, 'time') = 0 then + { Send server date and time to client } + Client.SendStr(DateTimeToStr(Now) + #13#10) + else if CompareText(Client.RcvdLine, 'who') = 0 then begin + { Send client list to client } + Client.SendStr('There are ' + IntToStr(WSocketServer1.ClientCount) + + ' connected users:' + #13#10); + for I := WSocketServer1.ClientCount - 1 downto 0 do begin + AClient := TTcpSrvClient(WSocketServer1.Client[I]); + Client.SendStr(AClient.PeerAddr + ':' + AClient.GetPeerPort + ' ' + + DateTimeToStr(AClient.ConnectTime) + #13#10); + end; + end + else if CompareText(Client.RcvdLine, 'exception') = 0 then + { This will trigger a background exception for client } + PostMessage(Client.Handle, WM_TRIGGER_EXCEPTION, 0, 0) + else + if Client.State = wsConnected then + Client.SendStr('Unknown command: ''' + Client.RcvdLine + '''' + #13#10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when listening (server) socket experienced } +{ a background exception. Should normally never occurs. } +procedure TTcpSrvForm.WSocketServer1BgException( + Sender : TObject; + E : Exception; + var CanClose : Boolean); +begin + Display('Server exception occured: ' + E.ClassName + ': ' + E.Message); + CanClose := FALSE; { Hoping that server will still work ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when a client socket experience a background } +{ exception. It is likely to occurs when client aborted connection and data } +{ has not been sent yet. } +procedure TTcpSrvForm.ClientBgException( + Sender : TObject; + E : Exception; + var CanClose : Boolean); +begin + Display('Client exception occured: ' + E.ClassName + ': ' + E.Message); + CanClose := TRUE; { Goodbye client ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/ThrdSrv.dpr b/lib/Delphi/Internet/ThrdSrv.dpr new file mode 100644 index 00000000..1b795032 --- /dev/null +++ b/lib/Delphi/Internet/ThrdSrv.dpr @@ -0,0 +1,12 @@ +program ThrdSrv; + +uses + Forms, + ThrdSrv1 in 'ThrdSrv1.pas' {TcpSrvForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTcpSrvForm, TcpSrvForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/TnCli1.dfm b/lib/Delphi/Internet/TnCli1.dfm new file mode 100644 index 00000000..48e4ee52 Binary files /dev/null and b/lib/Delphi/Internet/TnCli1.dfm differ diff --git a/lib/Delphi/Internet/TnCli1.pas b/lib/Delphi/Internet/TnCli1.pas new file mode 100644 index 00000000..aa2aafac --- /dev/null +++ b/lib/Delphi/Internet/TnCli1.pas @@ -0,0 +1,268 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: TNCLIENT.PAS +Object: Delphi application which is a basic telnet program demonstrating + WSocket, TnCnx, TnEmulVT, EmulVT components. +Author: Franois PIETTE +Creation: July 22, 1997 +Version: 2.05 +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 05, 1997 Added display of windows socket version info. +Sep 23, 1997 Added local echo check box +Sep 24, 1997 V2.03 Added TnEmulVT1.RestoreOptions just before connecting + Added interactive support for telnet echo option. +Sep 25, 1997 V2.04 Port to C++Builder +Dec 10, 1998 V2.05 Added IniFile to save config + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnCli1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, IniFiles, EmulVT, TnEmulVT, WSocket, Winsock; + +type + TTelnetForm = class(TForm) + TnEmulVT1: TTnEmulVT; + ConnectButton: TButton; + Label1: TLabel; + HostNameEdit: TEdit; + Label2: TLabel; + PortEdit: TEdit; + DisconnectButton: TButton; + StatusLabel: TLabel; + SendButton: TButton; + OptionsButton: TButton; + LocalEchoCheckBox: TCheckBox; + RequestLocalEchoOnButton: TButton; + RequestLocalEchoOffButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure TnEmulVT1SessionConnected(Sender: TObject); + procedure TnEmulVT1SessionClosed(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure OptionsButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure LocalEchoCheckBoxClick(Sender: TObject); + procedure TnEmulVT1LocalEcho(Sender: TObject); + procedure RequestLocalEchoOnButtonClick(Sender: TObject); + procedure RequestLocalEchoOffButtonClick(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + private + FIniFileName : String; + FInitialized : Boolean; + public + { Dclarations publiques } + end; + +var + TelnetForm: TTelnetForm; + +implementation + +{$R *.DFM} +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyHostName = 'HostName'; + KeyPort = 'Port'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + StatusLabel.Caption := 'Not connected'; + TnEmulVT1.RestoreOptions; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.FormShow(Sender: TObject); +var + WinsockData : TWSADATA; + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + HostNameEdit.Text := IniFile.ReadString(SectionData, KeyHostName, + 'localhost'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, + 'telnet'); + + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, (Screen.Width - Width) div 2); + + IniFile.Free; + TnEmulVT1.Clear; + { Set auto-wrap mode. Here is the place to do other settings. } + TnEmulVT1.WriteStr(#27'[?7h'); + WinsockData := WinsockInfo; + StatusLabel.Caption := StrPas(WinsockData.szDescription); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyHostName, HostNameEdit.Text); + IniFile.WriteString(SectionData, KeyPort, PortEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.ConnectButtonClick(Sender: TObject); +begin + StatusLabel.Caption := 'Connecting'; + Refresh; + ConnectButton.Enabled := FALSE; + try + TnEmulVT1.Disconnect; + TnEmulVT1.Port := PortEdit.Text; + TnEmulVT1.HostName := HostNameEdit.Text; + TnEmulVT1.RestoreOptions; + { This can take quite a long time when hostname is unknown and } + { if DNS feature is enabled (2 or 3 minutes !) } + TnEmulVT1.Connect; + except + ConnectButton.Enabled := TRUE; + raise; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.DisconnectButtonClick(Sender: TObject); +begin + TnEmulVT1.Disconnect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.TnEmulVT1SessionConnected(Sender: TObject); +begin + DisconnectButton.Enabled := TRUE; + StatusLabel.Caption := 'Connected'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.TnEmulVT1SessionClosed(Sender: TObject); +begin + DisconnectButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + StatusLabel.Caption := 'Not connected'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.FormResize(Sender: TObject); +begin + TnEmulVT1.Width := ClientWidth; + TnEmulVT1.Height := ClientHeight - TnEmulVT1.Top; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.SendButtonClick(Sender: TObject); +begin + TnEmulVT1.SendStr('Hello world !' + #13#10); + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.OptionsButtonClick(Sender: TObject); +begin + TnEmulVT1.HostName := HostNameEdit.Text; + TnEmulVT1.EditOptions; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.TnEmulVT1LocalEcho(Sender: TObject); +begin + if TnEmulVT1.GetLocalEcho then + StatusLabel.Caption := 'Remote will not echo' + else + StatusLabel.Caption := 'Remote will echo'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.LocalEchoCheckBoxClick(Sender: TObject); +begin + TnEmulVT1.LocalEcho := LocalEchoCheckBox.Checked; + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.RequestLocalEchoOnButtonClick(Sender: TObject); +begin + TnEmulVT1.RequestLocalEcho(TRUE); + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.RequestLocalEchoOffButtonClick(Sender: TObject); +begin + TnEmulVT1.RequestLocalEcho(FALSE); + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + + +end. + diff --git a/lib/Delphi/Internet/UdpLstn1.dfm b/lib/Delphi/Internet/UdpLstn1.dfm new file mode 100644 index 00000000..362aaa7d Binary files /dev/null and b/lib/Delphi/Internet/UdpLstn1.dfm differ diff --git a/lib/Delphi/Internet/UdpLstn1.pas b/lib/Delphi/Internet/UdpLstn1.pas new file mode 100644 index 00000000..59fc2228 --- /dev/null +++ b/lib/Delphi/Internet/UdpLstn1.pas @@ -0,0 +1,288 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Copyright: You can use this software freely, at your own risks +Creation: April 4, 1997 +Version: 2.03 +Object: Demo program to show how to use TWSocket object to listen + UDP messages from the network. Use UDPSend or any other + program to send UDP messages. +EMail: francois.piette@overbyte.be http://www.overbyte.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997, 2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Jul 23, 1997 Adapted for Delphi 1, 2 and 3 +Sep 06, 1997 Version 2.01 +Sep 27, 1997 Updated for TWSocket changes + Replace loopback address by real localhost IP addr +Dec 12, 1998 V2.02 Added icomming IP and port number display +Mar 07, 1999 V2.03 Corrected compatibility bug with Delphi 1 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit UdpLstn1; + +{$J+} + +interface + +uses + WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + FormPos, StdCtrls, WinSock, WSocket, IniFiles; + +type + TMainForm = class(TForm) + WSocket: TWSocket; + StartButton: TButton; + DataAvailableLabel: TLabel; + InfoLabel: TLabel; + StopButton: TButton; + PortEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + ServerEdit: TEdit; + AnyServerCheckBox: TCheckBox; + procedure StartButtonClick(Sender: TObject); + procedure WSocketDataAvailable(Sender: TObject; Error: Word); + procedure WSocketSessionConnected(Sender: TObject; Error: Word); + procedure StopButtonClick(Sender: TObject); + procedure WSocketSessionClosed(Sender: TObject; Error: Word); + procedure FormShow(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure AnyServerCheckBoxClick(Sender: TObject); + procedure ServerEditChange(Sender: TObject); + private + { Dclarations prives } + FIniFileName : String; + FSectionName : String; + FKeyName : String; + FServerAddr : TInAddr; + public + { Dclarations publiques } + end; + +var + MainForm: TMainForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then { Petite optimisation: pas d'espace } + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.StartButtonClick(Sender: TObject); +begin + FServerAddr := WSocketResolveHost(ServerEdit.Text); + if FServerAddr.S_addr = htonl(INADDR_LOOPBACK) then begin + { Replace loopback address by real localhost IP addr } + FServerAddr := WSocketResolveHost(LocalHostName); + end; + WSocket.Proto := 'udp'; + WSocket.Addr := '0.0.0.0'; + WSocket.Port := PortEdit.Text; + WSocket.Listen; + PortEdit.Enabled := FALSE; + ServerEdit.Enabled := FALSE; + AnyServerCheckBox.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] in ['0'..'9']) do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.WSocketDataAvailable(Sender: TObject; Error: Word); +var + Buffer : array [0..1023] of char; + Len : Integer; + Src : TSockAddrIn; + SrcLen : Integer; +begin + SrcLen := SizeOf(Src); + Len := WSocket.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen); + if Len >= 0 then begin + if (FServerAddr.S_addr = INADDR_ANY) or + (FServerAddr.S_addr = Src.Sin_addr.S_addr) then begin + Buffer[Len] := #0; + DataAvailableLabel.Caption := IntToStr(atoi(DataAvailableLabel.caption) + 1) + + ' ' + StrPas(inet_ntoa(Src.sin_addr)) + + ':' + IntToStr(ntohs(Src.sin_port)) + + '--> ' + StrPas(Buffer); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.WSocketSessionConnected(Sender: TObject; + Error: Word); +begin + StartButton.Enabled := FALSE; + StopButton.Enabled := TRUE; + InfoLabel.Caption := 'Connected'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.StopButtonClick(Sender: TObject); +begin + StartButton.Enabled := TRUE; + StopButton.Enabled := FALSE; + PortEdit.Enabled := TRUE; + ServerEdit.Enabled := TRUE; + AnyServerCheckBox.Enabled := TRUE; + WSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.WSocketSessionClosed(Sender: TObject; Error: Word); +begin + StartButton.Enabled := TRUE; + StopButton.Enabled := FALSE; + PortEdit.Enabled := TRUE; + ServerEdit.Enabled := TRUE; + AnyServerCheckBox.Enabled := TRUE; + InfoLabel.Caption := 'Disconnected'; + DataAvailableLabel.Caption := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +var + IniFile : TIniFile; +begin + if FirstTime then begin + FirstTime := FALSE; + FIniFileName := 'UdpLstn'; + FSectionName := 'Windows'; + FKeyName := 'MainForm'; + LoadFormPos(Self, FIniFilename, FSectionName, FKeyName); + DataAvailableLabel.Caption := ''; + InfoLabel.Caption := 'Click on Start button'; + StartButton.Enabled := TRUE; + StopButton.Enabled := FALSE; + IniFile := TIniFile.Create(FIniFileName); + PortEdit.Text := IniFile.ReadString('data', 'port', '600'); + ServerEdit.Text := IniFile.ReadString('data', 'server', '0.0.0.0'); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +var + IniFile : TIniFile; +begin + SaveFormPos(Self, FIniFilename, FSectionName, FKeyName); + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString('data', 'port', PortEdit.Text); + IniFile.WriteString('data', 'server', ServerEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.AnyServerCheckBoxClick(Sender: TObject); +begin + if AnyServerCheckBox.Checked then + ServerEdit.Text := '0.0.0.0'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.ServerEditChange(Sender: TObject); +begin + AnyServerCheckBox.Checked := (Trim(ServerEdit.Text) = '0.0.0.0'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/UdpSend1.dfm b/lib/Delphi/Internet/UdpSend1.dfm new file mode 100644 index 00000000..5c7d050d Binary files /dev/null and b/lib/Delphi/Internet/UdpSend1.dfm differ diff --git a/lib/Delphi/Internet/UdpSend1.pas b/lib/Delphi/Internet/UdpSend1.pas new file mode 100644 index 00000000..a1a62203 --- /dev/null +++ b/lib/Delphi/Internet/UdpSend1.pas @@ -0,0 +1,150 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Copyright: You can use this software freely, at your own risks +Creation: April 4, 1997 +Version: 2.02 +Object: Demo program to show how to use TWSocket object to broadcast + UDP messages on the network. Use UDPLstn to listen to those + UDP messages, or other UDP messages. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 06, 1997 Version 2.01 +Dec 12, 1998 V2.02 Added LocalPort editbox + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit UdpSend1; + +{$J+} + +interface + +uses + WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + FormPos, StdCtrls, WSocket, IniFiles; + +type + TMainForm = class(TForm) + WSocket: TWSocket; + SendButton: TButton; + MessageEdit: TEdit; + PortEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + LocalPortEdit: TEdit; + AnyPortCheckBox: TCheckBox; + procedure FormShow(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure SendButtonClick(Sender: TObject); + procedure AnyPortCheckBoxClick(Sender: TObject); + procedure LocalPortEditChange(Sender: TObject); + private + FIniFileName : String; + FSectionName : String; + FKeyName : String; + end; + +var + MainForm: TMainForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +var + IniFile : TIniFile; +begin + if FirstTime then begin + FirstTime := FALSE; + FIniFileName := 'UdpSend'; + FSectionName := 'Windows'; + FKeyName := 'MainForm'; + LoadFormPos(Self, FIniFilename, FSectionName, FKeyName); + IniFile := TIniFile.Create(FIniFileName); + PortEdit.Text := IniFile.ReadString('data', 'Port', '600'); + LocalPortEdit.Text := IniFile.ReadString('data', 'LocalPort', '0'); + MessageEdit.Text := IniFile.ReadString('data', 'Message', ''); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +var + IniFile : TIniFile; +begin + SaveFormPos(Self, FIniFilename, FSectionName, FKeyName); + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString('data', 'Port', PortEdit.Text); + IniFile.WriteString('data', 'LocalPort', LocalPortEdit.Text); + IniFile.WriteString('data', 'Message', MessageEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.SendButtonClick(Sender: TObject); +begin + WSocket.Proto := 'udp'; + WSocket.Addr := '255.255.255.255'; + WSocket.Port := PortEdit.Text; + WSocket.LocalPort := LocalPortEdit.Text; + WSocket.Connect; + WSocket.SendStr(MessageEdit.Text); + WSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.AnyPortCheckBoxClick(Sender: TObject); +begin + if AnyPortCheckBox.Checked then + LocalPortEdit.Text := '0'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.LocalPortEditChange(Sender: TObject); +begin + AnyPortCheckBox.Checked := (LocalPortEdit.Text = '0'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/WebServ.dpr b/lib/Delphi/Internet/WebServ.dpr new file mode 100644 index 00000000..d939950d --- /dev/null +++ b/lib/Delphi/Internet/WebServ.dpr @@ -0,0 +1,12 @@ +program WebServ; + +uses + Forms, + WebServ1 in 'WebServ1.pas' {WebServForm}; + +{$R *.RES} + +begin + Application.CreateForm(TWebServForm, WebServForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/WebServ1.dfm b/lib/Delphi/Internet/WebServ1.dfm new file mode 100644 index 00000000..2512f9b5 Binary files /dev/null and b/lib/Delphi/Internet/WebServ1.dfm differ diff --git a/lib/Delphi/Internet/WebServ1.pas b/lib/Delphi/Internet/WebServ1.pas new file mode 100644 index 00000000..cae9b79e --- /dev/null +++ b/lib/Delphi/Internet/WebServ1.pas @@ -0,0 +1,755 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: Oct 10, 1999 +Description: WebSrv1 show how to use THttpServer component to implement + a web server. WARNING: The code below is for demonstration + only. You need to add code to fit your needs about security. + The code below allows to get all files on the computer running + the demo. Add code in OnGetDocument, OnHeadDocument and + OnPostDocument to check for authorized access to files. +Version: 1.01 +EMail: francois.piette@overbyte.be http://www.overbyte.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +May 21, 2000 V1.01 Worked around a bug with Delphi 3 and lpVendorInfo +Oct 07, 2001 V1.02 Added Logfile feature + Added display if time and IP Addr for GET command. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WebServ1; +{$I+} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, StdCtrls, ExtCtrls, WinSock, WSocket, WSocketS, HttpSrv; + +const + CopyRight : String = 'WebServ (c) 1999-2001 F. Piette V1.02 '; + +type + { This component is used for client connection instead of default one. } + { This enables to add any data we need to handle our application. } + { As this data is located in client component, each connected client has } + { his own private data. } + TMyHttpConnection = class(THttpConnection) + protected + FPostedDataBuffer : PChar; { Will hold dynamically allocated buffer } + FPostedDataSize : Integer; { Databuffer size } + FDataLen : Integer; { Keep track of received byte count. } + public + destructor Destroy; override; + end; + + { This is the main form for our application. Any data here is global for } + { all clients. Put provate data in TMyHttpConnection class (see above). } + TWebServForm = class(TForm) + ToolsPanel: TPanel; + DisplayMemo: TMemo; + HttpServer1: THttpServer; + Label1: TLabel; + DocDirEdit: TEdit; + Label2: TLabel; + DefaultDocEdit: TEdit; + StartButton: TButton; + StopButton: TButton; + Label3: TLabel; + PortEdit: TEdit; + ClientCountLabel: TLabel; + Label5: TLabel; + ClearButton: TButton; + DisplayHeaderCheckBox: TCheckBox; + WriteLogFileCheckBox: TCheckBox; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure HttpServer1GetDocument(Sender, Client: TObject; + var Flags: THttpGetFlag); + procedure StartButtonClick(Sender: TObject); + procedure StopButtonClick(Sender: TObject); + procedure HttpServer1ClientConnect(Sender: TObject; + Client: TObject; Error: Word); + procedure HttpServer1ClientDisconnect(Sender: TObject; + Client: TObject; Error: Word); + procedure HttpServer1ServerStarted(Sender: TObject); + procedure HttpServer1ServerStopped(Sender: TObject); + procedure HttpServer1HeadDocument(Sender, Client: TObject; + var Flags: THttpGetFlag); + procedure HttpServer1PostedData(Sender: TObject; + Client: TObject; Error: Word); + procedure HttpServer1PostDocument(Sender, Client: TObject; + var Flags: THttpGetFlag); + procedure ClearButtonClick(Sender: TObject); + procedure WriteLogFileCheckBoxClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FCountRequests : Integer; + FLogFile : TextFile; + FLogFileName : String; + FLogFileOpened : Boolean; + procedure CreateVirtualDocument_time_htm(Sender : TObject; + Client : TObject; + var Flags : THttpGetFlag); + procedure DisplayHeader(Client : TMyHttpConnection); + procedure ProcessPostedData_CgiFrm1(Client : TMyHttpConnection); + procedure CloseLogFile; + procedure OpenLogFile; + public + procedure Display(Msg : String); + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + WebServForm: TWebServForm; + +implementation + +{$R *.DFM} + +const + { IniFile layout for persistent data } + SectionWindow = 'WindowMain'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyDocDir = 'DocDir'; + KeyDefaultDoc = 'DefaultDoc'; + KeyPort = 'Port'; + KeyDisplayHeader = 'DisplayHeader'; + KeyLogToFile = 'LogToFile'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.FormCreate(Sender: TObject); +begin + { Create IniFileName based on EXE file name; } + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FLogFileName := Application.ExeName; + FLogFileName := Copy(FLogFileName, 1, Length(FLogFileName) - 3) + '.log' +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + wsi : TWSADATA; +begin + if not FInitialized then begin + FInitialized := TRUE; + + { Restore persistent data from INI file } + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + DocDirEdit.Text := IniFile.ReadString(SectionData, KeyDocDir, + 'c:\WwwRoot'); + DefaultDocEdit.Text := IniFile.ReadString(SectionData, KeyDefaultDoc, + 'index.html'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, + '80'); + DisplayHeaderCheckBox.Checked := + Boolean(IniFile.ReadInteger(SectionData, KeyDisplayHeader, 0)); + WriteLogFileCheckBox.Checked := + Boolean(IniFile.ReadInteger(SectionData, KeyLogToFile, 0)); + IniFile.Destroy; + { Start log file } + if WriteLogFileCheckBox.Checked then begin + OpenLogFile; + WriteLogFileCheckBox.Checked := FLogFileOpened; + end; + { Initialize client count caption } + ClientCountLabel.Caption := '0'; + { Display version info for program and used components } + wsi := WinsockInfo; + DisplayMemo.Clear; + Display(CopyRight); + Display('Using:'); + Display(' ' + WSocket.CopyRight); + Display(' ' + WSocketS.CopyRight); + Display(' ' + HttpSrv.CopyRight); + Display(' Winsock:'); + Display(' Version ' + + Format('%d.%d', [WinsockInfo.wHighVersion shr 8, + WinsockInfo.wHighVersion and 15])); + Display(' ' + StrPas(@wsi.szDescription)); + Display(' ' + StrPas(@wsi.szSystemStatus)); +{$IFNDEF VER100} + { A bug in Delphi 3 makes lpVendorInfo invalid } + if wsi.lpVendorInfo <> nil then + Display(' ' + StrPas(wsi.lpVendorInfo)); +{$ENDIF} + { Automatically start server } + StartButtonClick(Self); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + { Save persistent data to INI file } + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyDocDir, HttpServer1.DocDir); + IniFile.WriteString(SectionData, KeyDefaultDoc, HttpServer1.DefaultDoc); + IniFile.WriteString(SectionData, KeyPort, HttpServer1.Port); + IniFile.WriteInteger(SectionData, KeyDisplayHeader, + ord(DisplayHeaderCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyLogToFile, + ord(WriteLogFileCheckBox.Checked)); + IniFile.Destroy; + CloseLogFile; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in display memo box, making sure we don't overflow it. } +procedure TWebServForm.Display(Msg : String); +begin + DisplayMemo.Lines.BeginUpdate; + try + { We preserve only 200 lines } + while DisplayMemo.Lines.Count > 200 do + DisplayMemo.Lines.Delete(0); + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + { Makes last line visible } + {$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; + if FLogFileOpened then begin + try + WriteLn(FLogFile, Msg); + except + on E:Exception do begin + DisplayMemo.Lines.Add('*** Exception' + + E.CLassName + ': ' + E.Message + + ' writing to log file ***'); + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when user clicks on start button. It is also } +{ called from FormShow event handler, at program startup. It starts server. } +{ We need to pass default document, document directory and client class } +{ to HTTP server component. Client class is very usefull because it } +{ instruct server component to instanciate our own client class instead of } +{ defualt client class. Using our own client class will enables you to add } +{ any data we need to handle our application. This data is private for each } +{ client. } +{ When server is started, we will get OnServerStarted event triggered. } +procedure TWebServForm.StartButtonClick(Sender: TObject); +begin + HttpServer1.DocDir := Trim(DocDirEdit.Text); + HttpServer1.DefaultDoc := Trim(DefaultDocEdit.Text); + HttpServer1.Port := Trim(PortEdit.Text); + HttpServer1.ClientClass := TMyHttpConnection; + HttpServer1.Start; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when user clicks on stop button. We just } +{ stop the server. We will get OnServerStopped event triggered. } +procedure TWebServForm.StopButtonClick(Sender: TObject); +begin + HttpServer1.Stop; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when user clicks on clear buttoN; We just } +{ clear the memo used for displaying activity. } +procedure TWebServForm.ClearButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when HTTP server is started, that is when } +{ server socket has started listening. } +procedure TWebServForm.HttpServer1ServerStarted(Sender: TObject); +begin + DocDirEdit.Enabled := FALSE; + DefaultDocEdit.Enabled := FALSE; + PortEdit.Enabled := FALSE; + StartButton.Enabled := FALSE; + StopButton.Enabled := TRUE; + Display('Server is waiting for connections'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when server has been stopped, that is } +{ when server socket stop listening. } +procedure TWebServForm.HttpServer1ServerStopped(Sender: TObject); +begin + DocDirEdit.Enabled := TRUE; + DefaultDocEdit.Enabled := TRUE; + PortEdit.Enabled := TRUE; + StartButton.Enabled := TRUE; + StopButton.Enabled := FALSE; + Display('Server stopped'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when a new client has connected. } +procedure TWebServForm.HttpServer1ClientConnect( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connecting } + Error : Word); { Error in connection } +begin + ClientCountLabel.Caption := IntToStr(HttpServer1.ClientCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when a client is disconnecting, just } +{ before client component is closed. } +procedure TWebServForm.HttpServer1ClientDisconnect( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connecting } + Error : Word); { Error in disconnection } +begin + ClientCountLabel.Caption := IntToStr(HttpServer1.ClientCount - 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when HTTP server component receive a HEAD } +{ command from any client. } +{ We just count the request, display a message and let HTTP server } +{ component handle everything. } +{ We should trap every URI we handle internally... } +procedure TWebServForm.HttpServer1HeadDocument( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connection issuing command } + var Flags : THttpGetFlag); { Tells what HTTP server has to do next } +begin + Inc(FCountRequests); + Display(IntToStr(FCountRequests) + + ': HEAD ' + TMyHttpConnection(Client).Path); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when HTTP server component receive a GET } +{ command from any client. } +{ We count the request, display a message and trap '/time.htm' path for } +{ special handling. } +{ There is no document time.htm on disk, we will create it on the fly. With } +{ a classic webserver we would have used a CGI or ISAPI/NSAPI to achieve } +{ the same goal. It is much easier here since we can use Delphi code } +{ directly to generate whatever we wants. Here for the demo we generate a } +{ page with server data and time displayed. } +procedure TWebServForm.HttpServer1GetDocument( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connection issuing command } + var Flags : THttpGetFlag); { Tells what HTTP server has to do next } +begin + { Count request and display a message } + Inc(FCountRequests); + Display('[' + FormatDateTime('HH:NN:SS', Now) + ' ' + + TWSocket(Client).GetPeerAddr + '] ' + IntToStr(FCountRequests) + + ': GET ' + TMyHttpConnection(Client).Path); + DisplayHeader(TMyHttpConnection(Client)); + + { Trap '/time.htm' path to dynamically generate an answer. } + if CompareText(THttpConnection(Client).Path, '/time.htm') = 0 then + CreateVirtualDocument_time_htm(Sender, Client, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is use to generate /time.htm document } +procedure TWebServForm.CreateVirtualDocument_time_htm( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connection issuing command } + var Flags : THttpGetFlag); { Tells what HTTP server has to do next } +var + Body : String; + Header : String; + Stream : TMemoryStream; +begin + { Let HTTP server component know we will send data to client } + Flags := hgWillSendMySelf; + { Create a stream to hold data sent to client that is the answer } + { made of a HTTP header and a body made of HTML code. } + Stream := TMemoryStream.Create; + Body := '' + + '' + + 'ICS WebServer Demo' + + '' + #13#10 + + '' + + '

Time at server side:

' + #13#10 + + '

' + DateTimeToStr(Now) +'

' + #13#10 + + '' + + '' + #13#10; + Header := TMyHttpConnection(Client).Version + ' 200 OK' + #13#10 + + 'Content-Type: text/html' + #13#10 + + 'Content-Length: ' + + IntToStr(Length(Body)) + #13#10 + + #13#10; + Stream.Write(Header[1], Length(Header)); + Stream.Write(Body[1], Length(Body)); + { We need to seek to start of stream ! } + Stream.Seek(0, 0); + { We ask server component to send the stream for us. } + TMyHttpConnection(Client).DocStream := Stream; + TMyHttpConnection(Client).SendStream; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when HTTP server component receive a POST } +{ command from any client. } +{ We count the request, display a message and trap posted data. } +{ To check for posted data, you may construct the following HTML document: } +{ } +{ } +{ Test Form 1 } +{ } +{ } +{

Enter your first and last name

} +{
} +{ } +{ } +{ } +{ } +{ } +{ } +{ } +{ } +{ } +{
First name
Last name
} +{

} +{
} +{ } +{ } +procedure TWebServForm.HttpServer1PostDocument( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connection issuing command } + var Flags : THttpGetFlag); { Tells what HTTP server has to do next } +var + Remote : TMyHttpConnection; +begin + { It's easyer to do the cast one time. Could use with clause... } + Remote := TMyHttpConnection(Client); + + { Count request and display a message } + Inc(FCountRequests); + Display(IntToStr(FCountRequests) + ': POST ' + Remote.Path); + DisplayHeader(Remote); + + { Check for request past. We only accept data for '/cgi-bin/cgifrm1.exe' } + if CompareText(Remote.Path, '/cgi-bin/cgifrm1.exe') = 0 then begin + { Tell HTTP server that we will accept posted data } + { OnPostedData event will be triggered when data comes in } + Flags := hgAcceptData; + { We wants to receive any data type. So we turn line mode off on } + { client connection. } + Remote.LineMode := FALSE; + { We need a buffer to hold posted data. We allocate as much as the } + { size of posted data plus one byte for terminating nul char. } + { We should check for ContentLength = 0 and handle that case... } +{$IFDEF VER80} + if Remote.FPostedDataSize = 0 then begin + Remote.FPostedDataSize := Remote.RequestContentLength + 1; + GetMem(Remote.FPostedDataBuffer, Remote.FPostedDataSize); + end + else begin + ReallocMem(Remote.FPostedDataBuffer, Remote.FPostedDataSize, Remote.RequestContentLength + 1); + Remote.FPostedDataSize := Remote.RequestContentLength + 1; + end; +{$ELSE} + ReallocMem(Remote.FPostedDataBuffer, Remote.RequestContentLength + 1); +{$ENDIF} + { Clear received length } + Remote.FDataLen := 0; + end + else + Flags := hg404; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered for each data packet posted by client } +{ when we told HTTP server component that we will accept posted data. } +{ We have to receive ALL data which is sent by remote client, even if there } +{ is more than what ContentLength tells us ! } +{ If ContentLength = 0, then we should receive data until connection is } +{ closed... } +procedure TWebServForm.HttpServer1PostedData( + Sender : TObject; { HTTP server component } + Client : TObject; { Client posting data } + Error : Word); { Error in data receiving } +var + Len : Integer; + Remains : Integer; + Junk : array [0..255] of char; + Remote : TMyHttpConnection; +begin + { It's easyer to do the cast one time. Could use with clause... } + Remote := TMyHttpConnection(Client); + + { How much data do we have to receive ? } + Remains := Remote.RequestContentLength - Remote.FDataLen; + if Remains <= 0 then begin + { We got all our data. Junk anything else ! } + Len := Remote.Receive(@Junk, SizeOf(Junk) - 1); + if Len >= 0 then + Junk[Len] := #0; + Exit; + end; + { Receive as much data as we need to receive. But warning: we may } + { receive much less data. Data will be split into several packets we } + { have to assemble in our buffer. } + Len := Remote.Receive(Remote.FPostedDataBuffer + Remote.FDataLen, Remains); + { Sometimes, winsock doesn't wants to givve any data... } + if Len <= 0 then + Exit; + + { Add received length to our count } + Inc(Remote.FDataLen, Len); + { Add a nul terminating byte (handy to handle data as a string) } + Remote.FPostedDataBuffer[Remote.FDataLen] := #0; + { Display receive data so far } + Display('Data: ''' + StrPas(Remote.FPostedDataBuffer) + ''''); + + { When we received the whole thing, we can process it } + if Remote.FDataLen = Remote.RequestContentLength then begin + if CompareText(Remote.Path, '/cgi-bin/cgifrm1.exe') = 0 then + ProcessPostedData_CgiFrm1(Remote) + else + Remote.Answer404; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will process posted data for CgiFrm1.exe } +procedure TWebServForm.ProcessPostedData_CgiFrm1(Client : TMyHttpConnection); +var + Stream : TStream; + FileName : String; + Body : String; + Header : String; + FirstName : String; + LastName : String; + HostName : String; + Buf : String; +begin + { Extract fields from posted data. } + ExtractURLEncodedValue(Client.FPostedDataBuffer, 'FirstName', FirstName); + ExtractURLEncodedValue(Client.FPostedDataBuffer, 'LastName', LastName); + { Get client IP address. We could to ReverseDnsLookup to get hostname } + HostName := Client.PeerAddr; + { Build the record to write to data file } + Buf := FormatDateTime('YYYYMMDD HHNNSS ', Now) + + FirstName + '.' + LastName + '@' + HostName + #13#10; + + { Save data to a text file } + FileName := ExtractFilePath(Application.ExeName) + 'CgiFrm1.txt'; + if FileExists(FileName) then + Stream := TFileStream.Create(FileName, fmOpenWrite) + else + Stream := TFileStream.Create(FileName, fmCreate); + Stream.Seek(0, soFromEnd); + Stream.Write(Buf[1], Length(Buf)); + Stream.Destroy; + + { Now create output stream to send back to remote client } + Stream := TMemoryStream.Create; + Body := '' + + '' + + 'ICS WebServer Demo' + + '' + #13#10 + + '' + + '

Your data has been recorded:

' + #13#10 + + '

' + FirstName + '.' + LastName + '@' + HostName +'

' + + '' + + '' + #13#10; + Header := Client.Version + ' 200 OK' + #13#10 + + 'Content-Type: text/html' + #13#10 + + 'Content-Length: ' + + IntToStr(Length(Body)) + #13#10 + + #13#10; + Stream.Write(Header[1], Length(Header)); + Stream.Write(Body[1], Length(Body)); + Stream.Seek(0, 0); + { Ask HTTP server component to send data stream for us } + Client.DocStream := Stream; + Client.SendStream; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.DisplayHeader(Client : TMyHttpConnection); +var + I : Integer; +begin + if not DisplayHeaderCheckBox.Checked then + Exit; + for I := 0 to Client.RequestHeader.Count - 1 do + Display('HDR' + IntToStr(I + 1) + ') ' + + Client.RequestHeader.Strings[I]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We need to override parent class destructor because we have allocated } +{ memory for our data buffer. } +destructor TMyHttpConnection.Destroy; +begin + if Assigned(FPostedDataBuffer) then begin + FreeMem(FPostedDataBuffer, FPostedDataSize); + FPostedDataBuffer := nil; + FPostedDataSize := 0; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.OpenLogFile; +begin + if FLogFileOpened then + Exit; + try + AssignFile(FLogFile, FLogFileName); + if FileExists(FLogFileName) then + Append(FLogFile) + else + Rewrite(FLogFile); + WriteLn(FLogFile, '[' + FormatDateTime('HH:NN:SS YYYY/MM/DD', Now) + + ' Log file opened.]'); + FLogFileOpened := TRUE; + except + FLogFileOpened := FALSE; + Display('*** Unable to open log file ***'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.CloseLogFile; +begin + if not FLogFileOpened then + Exit; + FLogFileOpened := FALSE; + WriteLn(FLogFile, '[' + FormatDateTime('HH:NN:SS YYYY/MM/DD', Now) + + ' Log file Closed.]'); + CloseFile(FLogFile); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.WriteLogFileCheckBoxClick(Sender: TObject); +begin + if WriteLogFileCheckBox.Checked then + OpenLogFile + else + CloseLogFile; + WriteLogFileCheckBox.Checked := FLogFileOpened; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/cli5.dfm b/lib/Delphi/Internet/cli5.dfm new file mode 100644 index 00000000..28939d5e Binary files /dev/null and b/lib/Delphi/Internet/cli5.dfm differ diff --git a/lib/Delphi/Internet/cli5.pas b/lib/Delphi/Internet/cli5.pas new file mode 100644 index 00000000..b2bef581 --- /dev/null +++ b/lib/Delphi/Internet/cli5.pas @@ -0,0 +1,193 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: Simple client application demonstrating TWSocket object in action. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Creation: September 21, 1996 +Version: 2.06 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 06, 1997 Beautified +Nov 09, 1997 Added a button to display the list of IP addresses for the + local computer (you can have two IP addresses if you are connected + to a LAN and to your ISP). +Nov 11, 1997 V2.03 Added a ReadLine button to show how to read a single line + synchronously. +Nov 18, 1997 V2.04 Show how to use ReceiveStr +Dec 05, 1998 V2.05 Don't use TWait component anymore +Aug 20, 1999 V2.06 Introduced FError to disply connection errors correctly. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Cli5; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, + Forms, Dialogs, Winsock, WSocket, StdCtrls; + +const + Client5Version = 206; + +type + TClientForm = class(TForm) + ConnectButton: TButton; + CliSocket: TWSocket; + InfoLabel: TLabel; + DisconnectButton: TButton; + DataLabel: TLabel; + IPButton: TButton; + ReadLineButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure CliSocketDataAvailable(Sender: TObject; Error: Word); + procedure CliSocketSessionConnected(Sender: TObject; Error: Word); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + procedure IPButtonClick(Sender: TObject); + procedure ReadLineButtonClick(Sender: TObject); + public + FError : Word; + end; + +var + ClientForm: TClientForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler gets called when we connected the server *} +procedure TClientForm.CliSocketSessionConnected(Sender: TObject; Error: Word); +begin + FError := Error; { Remember error code for SessionClosed event } + if Error <> 0 then + InfoLabel.Caption := 'Connection failed, error #' + IntToStr(Error) + else + InfoLabel.Caption := 'Connected'; + DisconnectButton.Enabled := TRUE; + ConnectButton.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler gets called when the server's connection is broken *} +{* Either by us or by the server. *} +procedure TClientForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + DataLabel.Caption := ''; + if FError = 0 then begin + { FError = 0 means we connected succesfully } + if Error <> 0 then + InfoLabel.Caption := 'Disconnected. Error #' + IntToStr(Error) + else + InfoLabel.Caption := 'Disconnected'; + end; + DisconnectButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* The user has clicked on the connect button... *} +procedure TClientForm.ConnectButtonClick(Sender: TObject); +begin + CliSocket.Addr := 'localhost'; { Server host name } + CliSocket.Proto := 'tcp'; { Protocol we wants to use } + CliSocket.Port := 'telnet'; { The port we wants to connect } + CliSocket.Connect; { Let's connect ! } + { Connect is just a request, it returns immediately. We eventually gets } + { gets connected later. At that time we will receive the event } + { SessionConnected. If you need a timeout, you have to start a TTimer. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* The user has clicked the disconnect button... *} +procedure TClientForm.DisconnectButtonClick(Sender: TObject); +begin + CliSocket.Close; { This will close the connection } + { When the connection will be effectively closed, we will receive the } + { SessionClosed even. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +begin + DataLabel.Caption := CliSocket.ReceiveStr; +end; + +{$IFDEF NEVER} +{ The same procedure using Receive: a little bit more complicated but } +{ more efficient because data is less copied from here to there. } +procedure TClientForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +var + Buffer : String[200]; + Count : Integer; +begin + Count := CliSocket.Receive(@Buffer[1], High(Buffer)); + Buffer[0] := chr(Count); + DataLabel.Caption := Buffer; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.IPButtonClick(Sender: TObject); +var + IPList : TStrings; + I : Integer; +begin + IPList := WSocket.LocalIPList; + InfoLabel.Caption := ''; + for I := 0 to IPList.Count - 1 do + InfoLabel.Caption := InfoLabel.Caption + ' ' + IPList.Strings[I]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.ReadLineButtonClick(Sender: TObject); +var + Buf : String; +begin + ReadLineButton.Enabled := FALSE; + try + CliSocket.ReadLine(30, Buf); + DataLabel.Caption := 'Line: ''' + Buf + ''''; + finally + ReadLineButton.Enabled := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/clidemo.dpr b/lib/Delphi/Internet/clidemo.dpr new file mode 100644 index 00000000..88529f53 --- /dev/null +++ b/lib/Delphi/Internet/clidemo.dpr @@ -0,0 +1,12 @@ +program CliDemo; + +uses + Forms, + CliDemo1 in 'CliDemo1.pas' {ClientForm}; + +{$R *.RES} + +begin + Application.CreateForm(TClientForm, ClientForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/client5.dpr b/lib/Delphi/Internet/client5.dpr new file mode 100644 index 00000000..dc4bab20 --- /dev/null +++ b/lib/Delphi/Internet/client5.dpr @@ -0,0 +1,12 @@ +program client5; + +uses + Forms, + Cli5 in 'Cli5.pas' {ClientForm}; + +{$R *.RES} + +begin + Application.CreateForm(TClientForm, ClientForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/clients.DBF b/lib/Delphi/Internet/clients.DBF new file mode 100644 index 00000000..4f1066e9 Binary files /dev/null and b/lib/Delphi/Internet/clients.DBF differ diff --git a/lib/Delphi/Internet/clients.MDX b/lib/Delphi/Internet/clients.MDX new file mode 100644 index 00000000..c30a4652 Binary files /dev/null and b/lib/Delphi/Internet/clients.MDX differ diff --git a/lib/Delphi/Internet/dnslook.dpr b/lib/Delphi/Internet/dnslook.dpr new file mode 100644 index 00000000..c7d8897c --- /dev/null +++ b/lib/Delphi/Internet/dnslook.dpr @@ -0,0 +1,12 @@ +program DnsLook; + +uses + Forms, + DnsLook1 in 'DnsLook1.pas' {DnsLookupForm}; + +{$R *.RES} + +begin + Application.CreateForm(TDnsLookupForm, DnsLookupForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/finger.dpr b/lib/Delphi/Internet/finger.dpr new file mode 100644 index 00000000..6b93e8b1 --- /dev/null +++ b/lib/Delphi/Internet/finger.dpr @@ -0,0 +1,12 @@ +program Finger; + +uses + Forms, + Finger1 in 'Finger1.pas' {FingerDemoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TFingerDemoForm, FingerDemoForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/finger1.dfm b/lib/Delphi/Internet/finger1.dfm new file mode 100644 index 00000000..f01e27d6 Binary files /dev/null and b/lib/Delphi/Internet/finger1.dfm differ diff --git a/lib/Delphi/Internet/finger1.pas b/lib/Delphi/Internet/finger1.pas new file mode 100644 index 00000000..2e9df46c --- /dev/null +++ b/lib/Delphi/Internet/finger1.pas @@ -0,0 +1,216 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Finger is a FINGER client + Install the components in FingCli.pas and WSocket.pas first. +Creation: December 18, 1997 +Version: 1.02 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Apr 11, 1999 V1.01 Added command line option +Aug 18, 2001 V1.02 Changed website url + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Finger1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, FingCli, WinSock, WSocket; + +const + FingerVersion = 102; + CopyRight : String = ' Finger (c) 1997-2001 F. Piette V1.02 '; + WM_APPSTARTUP = WM_USER + 1; + +type + TFingerDemoForm = class(TForm) + FingerCli1: TFingerCli; + DisplayMemo: TMemo; + Panel1: TPanel; + QueryEdit: TEdit; + QueryButton: TButton; + CancelButton: TButton; + procedure QueryButtonClick(Sender: TObject); + procedure FingerCli1DataAvailable(Sender: TObject; Error: Word); + procedure FingerCli1QueryDone(Sender: TObject; Error: Word); + procedure FingerCli1SessionConnected(Sender: TObject; Error: Word); + procedure CancelButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + private + procedure WMAppStartup(var msg: TMessage); message WM_APPSTARTUP; + end; + +var + FingerDemoForm: TFingerDemoForm; + +const +{$IFDEF VER80} + BufferSize = 255; { Delphi 1 is limited to 255 bytes } +{$ELSE} + BufferSize = 2048; +{$ENDIF} + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.FormShow(Sender: TObject); +begin + { We use a custom message to initialize things once the form } + { is visible } + PostMessage(Handle, WM_APPSTARTUP, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.WMAppStartup(var msg: TMessage); +begin + Update; { Let the window be visible completely } + if ParamCount > 0 then begin + QueryEdit.Text := ParamStr(1); + QueryButtonClick(Self); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Display a message in the memo field, breaking with CR *} +procedure MemoAddLines(Memo : TMemo; Msg : String); +const + CR = #13; + LF = #10; +var + Start, Stop : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add(''); + + Start := 1; + Stop := Pos(CR, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := + Memo.Lines.Strings[Memo.Lines.Count - 1] + + Copy(Msg, Start, Stop - Start); + if Msg[Stop] = CR then begin + Memo.Lines.Add(''); + SendMessage(Memo.Handle, WM_KEYDOWN, VK_UP, 1); + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + while Msg[Start] in [CR, LF] do + Start := Start + 1; + Stop := Start; + while (Msg[Stop] <> CR) and (Stop <= Length(Msg)) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.QueryButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + QueryButton.Enabled := FALSE; + CancelButton.Enabled := TRUE; + FingerCli1.Query := QueryEdit.Text; + FingerCli1.StartQuery; + MemoAddLines(DisplayMemo, 'Query started.' + #13); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.FingerCli1SessionConnected(Sender: TObject; Error: Word); +begin + if Error = 0 then + MemoAddLines(DisplayMemo, 'Connected to host.' + #13); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.FingerCli1DataAvailable(Sender: TObject; Error: Word); +var + Buffer : array [0..BufferSize - 1] of char; + Len : Integer; +begin + while TRUE do begin + Len := FingerCli1.Receive(@Buffer, SizeOf(Buffer) - 1); + if Len <= 0 then + break; + Buffer[Len] := #0; + MemoAddLines(DisplayMemo, StrPas(Buffer)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.FingerCli1QueryDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + if Error = WSAECONNREFUSED then + MemoAddLines(DisplayMemo, 'No finger service available.' + #13) + else if Error = WSAETIMEDOUT then + MemoAddLines(DisplayMemo, 'Host unreachable.' + #13) + else + MemoAddLines(DisplayMemo, 'Error #' + IntToStr(Error) + #13); + end; + MemoAddLines(DisplayMemo, 'Done.' + #13); + + QueryButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; + { If we started from command line, then close application } + if ParamCount > 0 then + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.CancelButtonClick(Sender: TObject); +begin + FingerCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/ftpServ.dpr b/lib/Delphi/Internet/ftpServ.dpr new file mode 100644 index 00000000..3825f854 --- /dev/null +++ b/lib/Delphi/Internet/ftpServ.dpr @@ -0,0 +1,12 @@ +program FtpServ; + +uses + Forms, + FtpServ1 in 'FtpServ1.pas' {FtpServerForm}; + +{$R *.RES} + +begin + Application.CreateForm(TFtpServerForm, FtpServerForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/ftpcli.ico b/lib/Delphi/Internet/ftpcli.ico new file mode 100644 index 00000000..f0257c80 Binary files /dev/null and b/lib/Delphi/Internet/ftpcli.ico differ diff --git a/lib/Delphi/Internet/ftpthrd.dpr b/lib/Delphi/Internet/ftpthrd.dpr new file mode 100644 index 00000000..f896099d --- /dev/null +++ b/lib/Delphi/Internet/ftpthrd.dpr @@ -0,0 +1,13 @@ +program ftpthrd; + +uses + Forms, + FtpThrd1 in 'FtpThrd1.pas' {ThrdFtpForm}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TThrdFtpForm, ThrdFtpForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/ftptst.dpr b/lib/Delphi/Internet/ftptst.dpr new file mode 100644 index 00000000..d61df502 --- /dev/null +++ b/lib/Delphi/Internet/ftptst.dpr @@ -0,0 +1,14 @@ +program Ftptst; + +uses + Forms, + FtpTst1 in 'FtpTst1.pas' {FtpReceiveForm}, + Ftptst2 in 'Ftptst2.pas' {DirectoryForm}; + +{$R *.RES} + +begin + Application.CreateForm(TFtpReceiveForm, FtpReceiveForm); + Application.CreateForm(TDirectoryForm, DirectoryForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/ftptst1.dfm b/lib/Delphi/Internet/ftptst1.dfm new file mode 100644 index 00000000..29219a64 Binary files /dev/null and b/lib/Delphi/Internet/ftptst1.dfm differ diff --git a/lib/Delphi/Internet/ftptst1.pas b/lib/Delphi/Internet/ftptst1.pas new file mode 100644 index 00000000..1bcc4f65 --- /dev/null +++ b/lib/Delphi/Internet/ftptst1.pas @@ -0,0 +1,1203 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: Aug 1997 +Version: 2.25 +Object: Demo for TFtpClient object (RFC 959 implementation) + It is a graphical FTP client program + Compatible with Delphi 1, 2, 3, 4 and 5 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Sep 13, 97 Added directory functions. Added button to show how to makes + several transferts in one session +Sep 27, 97 Change identifiers names to be more standard with other sources +Jan 10, 98 Saved edit boxes content to an IniFile, added FileSize, Quote + and RestartGet commands +Jan 25, 1998 Completely rewritten for new component version (Asynchronous) +Feb 02, 1998 V2.17 Added a checkbox to run the synchronous or asynchronous + version of the component methods. +Feb 15, 1998 V2.18 Removed useless wait unit from the use clause. + Added display of winsock information at startup. +Feb 22, 1998 V2.19 Added Append and AppendFile commands +Aug 21, 1998 V2.20 Added a comment in OnProgress event handler to warn user + about CPU usage. +Dec 22, 1998 V2.21 Replaced DisplayFlag by DysplayFileFlag. +Oct 19, 1999 V2.22 Correctly display Winsock version +Nov 24, 1999 V2.23 Added Restart Put and NoAutoResumeAt. +Jan 28, 2000 V2.24 Added code to OnProgress event handler to update screen + only once per second. This solve problem on fast LAN. +Jul 21, 2000 V2.25 Added two button to show TSream usage instead of files. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpTst1; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, FtpCli, StdCtrls, IniFiles, ExtCtrls, WinSock, WSocket; + +const + FTPTstVersion = 225; + +type + TSyncCmd = function : Boolean of object; + TAsyncCmd = procedure of object; + + TFtpReceiveForm = class(TForm) + DisplayMemo: TMemo; + FtpClient1: TFtpClient; + Panel1: TPanel; + ExitButton: TButton; + OpenAsyncButton: TButton; + QuitAsyncButton: TButton; + CwdAsyncButton: TButton; + UserAsyncButton: TButton; + PassAsyncButton: TButton; + ConnectAsyncButton: TButton; + GetAsyncButton: TButton; + ReceiveAsyncButton: TButton; + AbortAsyncButton: TButton; + DirAsyncButton: TButton; + DirectoryAsyncButton: TButton; + LsAsyncButton: TButton; + ListAsyncButton: TButton; + SystAsyncButton: TButton; + SystemAsyncButton: TButton; + FileSizeAsyncButton: TButton; + SizeAsyncButton: TButton; + MkdAsyncButton: TButton; + MkdirAsyncButton: TButton; + RmdAsyncButton: TButton; + RmdirAsyncButton: TButton; + RenAsyncButton: TButton; + RenameAsyncButton: TButton; + DeleAsyncButton: TButton; + DeleteAsyncButton: TButton; + PwdAsyncButton: TButton; + QuoteAsyncButton: TButton; + DoQuoteAsyncButton: TButton; + PutAsyncButton: TButton; + TransmitAsyncButton: TButton; + TypeSetAsyncButton: TButton; + RestGetAsyncButton: TButton; + RestartGetAsyncButton: TButton; + CDupAsyncButton: TButton; + Panel2: TPanel; + Label1: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label2: TLabel; + Label6: TLabel; + HostNameEdit: TEdit; + HostFileEdit: TEdit; + UserNameEdit: TEdit; + PassWordEdit: TEdit; + cbDisplay: TCheckBox; + LocalFileEdit: TEdit; + cbBinary: TCheckBox; + HostDirEdit: TEdit; + PortEdit: TEdit; + InfoLabel: TLabel; + StateLabel: TLabel; + ClearButton: TButton; + SyncCheckBox: TCheckBox; + AppendFileAsyncButton: TButton; + AppendAsyncButton: TButton; + PassiveCheckBox: TCheckBox; + Button1: TButton; + RestPutAsyncButton: TButton; + RestartPutAsyncButton: TButton; + ResumeAtEdit: TEdit; + Label7: TLabel; + NoAutoResumeAtCheckBox: TCheckBox; + TransmitUsingStreamButton: TButton; + ReceiveUsingStreamButton: TButton; + StressPutButton: TButton; + AbortXferAsyncButton: TButton; + procedure ExitButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure DisplayHandler(Sender: TObject; var Msg : String); + procedure FtpClient1Progress(Sender: TObject; Count: Longint; + var Abort: Boolean); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure OpenAsyncButtonClick(Sender: TObject); + procedure FtpClient1RequestDone(Sender: TObject; RqType: TFtpRequest; + Error: Word); + procedure FtpClient1SessionConnected(Sender: TObject; Error: Word); + procedure FtpClient1SessionClosed(Sender: TObject; Error: Word); + procedure QuitAsyncButtonClick(Sender: TObject); + procedure CwdAsyncButtonClick(Sender: TObject); + procedure UserAsyncButtonClick(Sender: TObject); + procedure PassAsyncButtonClick(Sender: TObject); + procedure ConnectAsyncButtonClick(Sender: TObject); + procedure FtpClient1StateChange(Sender: TObject); + procedure GetAsyncButtonClick(Sender: TObject); + procedure ReceiveAsyncButtonClick(Sender: TObject); + procedure AbortAsyncButtonClick(Sender: TObject); + procedure DirAsyncButtonClick(Sender: TObject); + procedure DirectoryAsyncButtonClick(Sender: TObject); + procedure LsAsyncButtonClick(Sender: TObject); + procedure ListAsyncButtonClick(Sender: TObject); + procedure SystAsyncButtonClick(Sender: TObject); + procedure SystemAsyncButtonClick(Sender: TObject); + procedure FileSizeAsyncButtonClick(Sender: TObject); + procedure SizeAsyncButtonClick(Sender: TObject); + procedure MkdAsyncButtonClick(Sender: TObject); + procedure MkdirAsyncButtonClick(Sender: TObject); + procedure RmdAsyncButtonClick(Sender: TObject); + procedure RmdirAsyncButtonClick(Sender: TObject); + procedure RenAsyncButtonClick(Sender: TObject); + procedure RenameAsyncButtonClick(Sender: TObject); + procedure DeleAsyncButtonClick(Sender: TObject); + procedure DeleteAsyncButtonClick(Sender: TObject); + procedure PwdAsyncButtonClick(Sender: TObject); + procedure QuoteAsyncButtonClick(Sender: TObject); + procedure DoQuoteAsyncButtonClick(Sender: TObject); + procedure PutAsyncButtonClick(Sender: TObject); + procedure TransmitAsyncButtonClick(Sender: TObject); + procedure TypeSetAsyncButtonClick(Sender: TObject); + procedure RestGetAsyncButtonClick(Sender: TObject); + procedure RestartGetAsyncButtonClick(Sender: TObject); + procedure CDupAsyncButtonClick(Sender: TObject); + procedure ClearButtonClick(Sender: TObject); + procedure AppendAsyncButtonClick(Sender: TObject); + procedure AppendFileAsyncButtonClick(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure RestPutAsyncButtonClick(Sender: TObject); + procedure RestartPutAsyncButtonClick(Sender: TObject); + procedure TransmitUsingStreamButtonClick(Sender: TObject); + procedure ReceiveUsingStreamButtonClick(Sender: TObject); + procedure StressPutButtonClick(Sender: TObject); + procedure AbortXferAsyncButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FLastProgress : DWORD; + FProgressCount : LongInt; + FRunning : Boolean; + procedure DisplayFile(FileName : String); + procedure ExecuteCmd(SyncCmd : TSyncCmd; ASyncCmd : TAsyncCmd); + function SendFile : Boolean; + procedure Display(Msg: String); + end; + +const + TEMP_FILE_NAME = 'FTPDIR.TXT'; + +var + FtpReceiveForm: TFtpReceiveForm; + +implementation + +uses + FtpTst2; + +{$R *.DFM} +const + SectionData = 'Data'; + KeyHostName = 'HostName'; + KeyUserName = 'UserName'; + KeyPassWord = 'PassWord'; + KeyHostDir = 'HostDir'; + KeyPort = 'Port'; + KeyHostFile = 'HostFile'; + KeyLocalFile = 'LocalFile'; + KeyResumeAt = 'ResumeAt'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF VER80 } +{ To debug event driven programs, it is often handy to just use writeln to } +{ write debug messages to the console. To get a console, just ask the } +{ linker to build a console mode application. Then you'll get the default } +{ console. The function below will make it the size you like... } +procedure BigConsole(nCols, nLines : Integer); +var + sc : TCoord; + N : DWord; +begin + if not IsConsole then + Exit; + sc.x := nCols; + sc.y := nLines; + SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), sc); + SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), + BACKGROUND_BLUE or BACKGROUND_GREEN or + BACKGROUND_RED or BACKGROUND_INTENSITY); + sc.x := 0; + sc.y := 0; + FillConsoleOutputAttribute(GetStdHandle(STD_OUTPUT_HANDLE), + BACKGROUND_BLUE or BACKGROUND_GREEN or + BACKGROUND_RED or BACKGROUND_INTENSITY, + nCols * nLines, sc, N); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FormCreate(Sender: TObject); +begin +{$IFNDEF VER80} + BigConsole(80, 100); +{$ENDIF} + DisplayMemo.Clear; + InfoLabel.Caption := ''; + StateLabel.Caption := ''; + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + Data : TWSAData; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + HostNameEdit.Text := IniFile.ReadString(SectionData, KeyHostName, + 'ftp.simtel.net'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, + 'ftp'); + UserNameEdit.Text := IniFile.ReadString(SectionData, KeyUserName, + 'anonymous'); + PassWordEdit.Text := IniFile.ReadString(SectionData, KeyPassWord, + 'your.name@your.company.com'); + HostDirEdit.Text := IniFile.ReadString(SectionData, KeyHostDir, + '/pub/simtelnet'); + HostFileEdit.Text := IniFile.ReadString(SectionData, KeyHostFile, + 'index.html'); + LocalFileEdit.Text := IniFile.ReadString(SectionData, KeyLocalFile, + 'c:\temp\index.htm'); + ResumeAtEdit.Text := IniFile.ReadString(SectionData, KeyResumeAt, + '0'); + + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, (Screen.Width - Width) div 2); + + IniFile.Free; + + { Display winsock info } + Data := WinsockInfo; + Display('Winsock version ' + + IntToStr(LOBYTE(Data.wHighVersion)) + '.' + + IntToStr(HIBYTE(Data.wHighVersion))); + Display(StrPas(Data.szDescription)); + Display(StrPas(Data.szSystemStatus)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyHostName, HostNameEdit.Text); + IniFile.WriteString(SectionData, KeyPort, PortEdit.Text); + IniFile.WriteString(SectionData, KeyUserName, UserNameEdit.Text); + IniFile.WriteString(SectionData, KeyPassWord, PassWordEdit.Text); + IniFile.WriteString(SectionData, KeyHostDir, HostDirEdit.Text); + IniFile.WriteString(SectionData, KeyHostFile, HostFileEdit.Text); + IniFile.WriteString(SectionData, KeyLocalFile, LocalFileEdit.Text); + IniFile.WriteString(SectionData, KeyResumeAt, ResumeAtEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function DeleteFile(const FileName: string): Boolean; +var + F : File of char; +begin + Result := TRUE; + try + AssignFile(F, FileName); + Erase(F); + except + Result := FALSE; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.Display(Msg : String); +var + I : Integer; +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + for I := 1 to 50 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + {$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DisplayHandler(Sender : TObject; var Msg : String); +begin + Display(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ExitButtonClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FtpClient1Progress(Sender: TObject; + Count: Longint; var Abort: Boolean); +begin + FProgressCount := Count; + { Be sure to update screen only once every second } + if FLastProgress < GetTickCount then begin + FLastProgress := GetTickCount + 1000; + InfoLabel.Caption := IntToStr(FProgressCount); + InfoLabel.Repaint; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DisplayFile(FileName : String); +begin + try + DirectoryForm.DirListBox.Items.LoadFromFile(FileName); + except + DirectoryForm.DirListBox.Clear; + end; + DirectoryForm.ShowModal; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FtpClient1RequestDone(Sender: TObject; + RqType: TFtpRequest; Error: Word); +begin + Display('Request ' + IntToStr(Ord(RqType)) + ' Done.'); + Display('StatusCode = ' + IntToStr(FtpClient1.StatusCode)); + Display('LastResponse was : ''' + FtpClient1.LastResponse + ''''); + if Error = 0 then + Display('No error') + else + Display('Error = ' + IntToStr(Error) + + ' (' + FtpClient1.ErrorMessage + ')'); + + { Display last progress value } + InfoLabel.Caption := IntToStr(FProgressCount); + + if Error = 0 then begin + case RqType of + ftpDirAsync, ftpDirectoryAsync, + ftpLsAsync, ftpListAsync : DisplayFile(TEMP_FILE_NAME); + ftpSizeAsync : Display( + 'File size is ' + + IntToStr(FtpClient1.SizeResult) + + ' bytes' ); + ftpPwdAsync, ftpMkdAsync, + ftpCDupAsync, ftpCwdAsync : Display( + 'Directory is "' + + FtpClient1.DirResult + '"'); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FtpClient1SessionConnected(Sender: TObject; + Error: Word); +begin + Display('Session Connected, error = ' + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FtpClient1SessionClosed(Sender: TObject; + Error: Word); +begin + Display('Session Closed, error = ' + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FtpClient1StateChange(Sender: TObject); +begin + StateLabel.Caption := IntToStr(Ord(FtpClient1.State)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ExecuteCmd(SyncCmd : TSyncCmd; ASyncCmd : TAsyncCmd); +begin + Display('Executing Requested Command'); + { Initialize progress stuff } + FLastProgress := 0; + FProgressCount := 0; + + if SyncCheckBox.Checked then begin + if SyncCmd then + Display('Command Success') + else + Display('Command Failure'); + end + else + ASyncCmd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.OpenAsyncButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + Display('Connect Async'); + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Open, FtpClient1.OpenAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.QuitAsyncButtonClick(Sender: TObject); +begin + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Quit, FtpClient1.QuitAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.CwdAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Cwd, FtpClient1.CwdAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.UserAsyncButtonClick(Sender: TObject); +begin + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.User, FtpClient1.UserAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.PassAsyncButtonClick(Sender: TObject); +begin + FtpClient1.Password := PasswordEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Pass, FtpClient1.PassAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ConnectAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.Password := PasswordEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Connect, FtpClient1.ConnectAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.GetAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Passive := PassiveCheckBox.Checked; + ExecuteCmd(FtpClient1.Get, FtpClient1.GetAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ReceiveAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Receive, FtpClient1.ReceiveAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.AbortAsyncButtonClick(Sender: TObject); +begin + ExecuteCmd(FtpClient1.Abort, FtpClient1.AbortAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DirAsyncButtonClick(Sender: TObject); +begin + DeleteFile(TEMP_FILE_NAME); + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := TEMP_FILE_NAME; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Dir, FtpClient1.DirAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DirectoryAsyncButtonClick(Sender: TObject); +begin + DeleteFile(TEMP_FILE_NAME); + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := TEMP_FILE_NAME; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Directory, FtpClient1.DirectoryAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.LsAsyncButtonClick(Sender: TObject); +begin + DeleteFile(TEMP_FILE_NAME); + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := TEMP_FILE_NAME; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Ls, FtpClient1.LsAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ListAsyncButtonClick(Sender: TObject); +begin + DeleteFile(TEMP_FILE_NAME); + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := TEMP_FILE_NAME; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.List, FtpClient1.ListAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.SystAsyncButtonClick(Sender: TObject); +begin + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Syst, FtpClient1.SystAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.SystemAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.System, FtpClient1.SystemAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FileSizeAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.FileSize, FtpClient1.FileSizeAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.SizeAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Size, FtpClient1.SizeAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.MkdAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Mkd, FtpClient1.MkdAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.MkdirAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.MkDir, FtpClient1.MkdirAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RmdAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Rmd, FtpClient1.RmdAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RmdirAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.RmDir, FtpClient1.RmDirAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RenAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Ren, FtpClient1.RenAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RenameAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Rename, FtpClient1.RenameAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DeleAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Dele, FtpClient1.DeleAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DeleteAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Delete, FtpClient1.DeleteAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.PwdAsyncButtonClick(Sender: TObject); +begin + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Pwd, FtpClient1.PwdAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.QuoteAsyncButtonClick(Sender: TObject); +begin + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Quote, FtpClient1.QuoteAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DoQuoteAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.DoQuote, FtpClient1.DoQuoteAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.PutAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Put, FtpClient1.PutAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.TransmitAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Transmit, FtpClient1.TransmitAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.TypeSetAsyncButtonClick(Sender: TObject); +begin + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.TypeSet, FtpClient1.TypeSetAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RestGetAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Options := []; + if NoAutoResumeAtCheckBox.Checked then + FtpClient1.Options := FtpClient1.Options + [ftpNoAutoResumeAt]; + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + ExecuteCmd(FtpClient1.RestGet, FtpClient1.RestGetAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RestartGetAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Options := []; + if NoAutoResumeAtCheckBox.Checked then + FtpClient1.Options := FtpClient1.Options + [ftpNoAutoResumeAt]; + FtpClient1.OnDisplay := DisplayHandler; + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + ExecuteCmd(FtpClient1.RestartGet, FtpClient1.RestartGetAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.CDupAsyncButtonClick(Sender: TObject); +begin + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.CDup, FtpClient1.CDupAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ClearButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.AppendAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Append, FtpClient1.AppendAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.AppendFileAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.AppendFile, FtpClient1.AppendFileAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +procedure TFtpReceiveForm.Button1Click(Sender: TObject); +var + Count : Integer; +begin + SyncCheckBox.Checked := TRUE; + if not FtpClient1.Connected then begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.Password := PasswordEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Connect, FtpClient1.ConnectAsync); + if Copy(FtpClient1.LastResponse, 1, 3) <> '230' then + Exit; + end; + Count := 0; + repeat + DisplayMemo.Clear; + Inc(Count); + Display('Count=' + IntToStr(Count)); + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Put, FtpClient1.PutAsync); + until Copy(FtpClient1.LastResponse, 1, 3) <> '226'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RestPutAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + ExecuteCmd(FtpClient1.RestPut, FtpClient1.RestPutAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RestartPutAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.OnDisplay := DisplayHandler; + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + ExecuteCmd(FtpClient1.RestartPut, FtpClient1.RestartPutAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.TransmitUsingStreamButtonClick(Sender: TObject); +var + MyStream : TStream; +begin + MyStream := TFileStream.Create(LocalFileEdit.Text, fmOpenRead); + try + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalStream := MyStream; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + if ResumeAtEdit.Text > '' then + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + FtpClient1.Transmit; + finally + FtpClient1.LocalStream := nil; + MyStream.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ReceiveUsingStreamButtonClick(Sender: TObject); +var + MyStream : TStream; +begin + MyStream := TFileStream.Create(LocalFileEdit.Text, fmCreate); + try + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalStream := MyStream; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + if ResumeAtEdit.Text > '' then + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + FtpClient1.Receive; + finally + FtpClient1.LocalStream := nil; + MyStream.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetFileSize(const FileName: string): LongInt; +var + SearchRec: TSearchRec; +begin + if FindFirst(ExpandFileName(FileName), faAnyFile, SearchRec) = 0 then begin + Result := SearchRec.Size; + SysUtils.FindClose(SearchRec); + end + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpReceiveForm.SendFile : Boolean; +var + LocalSize : LongInt; +begin + try + FtpClient1.Abort; { Whatever occured, abort ! } + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.Password := PassWordEdit.Text; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.Timeout := 30; + FtpClient1.ShareMode := ftpShareDenyNone; + if not FtpClient1.Connect then + raise Exception.Create('FtpClient1.Connect failed: ' + FtpClient1.ErrorMessage); + if FtpClient1.HostDirName <> '' then begin + if not FtpClient1.Cwd then + raise Exception.Create('FtpClient1.Cwd failed: ' + FtpClient1.ErrorMessage); + end; + if not FtpClient1.TypeSet then + raise Exception.Create('FtpClient1.TypeSet failed: ' + FtpClient1.ErrorMessage); + if not FtpClient1.Put then + raise Exception.Create('FtpClient1.Put failed: ' + FtpClient1.ErrorMessage); + if FtpClient1.StatusCode <> 226 then + raise Exception.Create('FtpClient1.Put failed: ' + FtpClient1.LastResponse); + if not FtpClient1.Size then + raise Exception.Create('FtpClient1.Size failed: ' + FtpClient1.ErrorMessage); + LocalSize := GetFileSize(FtpClient1.LocalFileName); + Result := (FtpClient1.SizeResult = LocalSize); + if not Result then + Display('Incorrect file size on server (S=' + + IntToStr(FtpClient1.SizeResult) + ' L=' + + IntToStr(LocalSize) + ')'); + if not FtpClient1.Quit then + raise Exception.Create('FtpClient1.Quit failed: ' + FtpClient1.ErrorMessage); + except + on E:Exception do begin + Display('Exception ' + E.ClassName + ': ' + E.Message); + Result := FALSE; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.StressPutButtonClick(Sender: TObject); +var + Count : Integer; +begin + if FRunning then begin + FRunning := FALSE; + Display('Stress Put interrupted.'); + StressPutButton.Caption := 'Stress Put'; + Exit; + end; + FRunning := TRUE; + try + Display('Stress Put started.'); + StressPutButton.Caption := 'STOP'; + Count := 0; + while FRunning and (not Application.Terminated) do begin + Inc(Count); + Display('STRESS COUNT = ' + IntToStr(Count)); + if not SendFile then + break; + Application.ProcessMessages; + end; + finally + FRunning := FALSE; + Display('Stress Put finished.'); + StressPutButton.Caption := 'Stress Put'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.AbortXferAsyncButtonClick(Sender: TObject); +begin + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.AbortXfer, FtpClient1.AbortXferAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/httpChk.dpr b/lib/Delphi/Internet/httpChk.dpr new file mode 100644 index 00000000..4fb14696 --- /dev/null +++ b/lib/Delphi/Internet/httpChk.dpr @@ -0,0 +1,12 @@ +program httpChk; + +uses + Forms, + HttpChk1 in 'HttpChk1.pas' {CheckUrlForm}; + +{$R *.RES} + +begin + Application.CreateForm(TCheckUrlForm, CheckUrlForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/httpasp.dpr b/lib/Delphi/Internet/httpasp.dpr new file mode 100644 index 00000000..887cb644 --- /dev/null +++ b/lib/Delphi/Internet/httpasp.dpr @@ -0,0 +1,12 @@ +program HttpAsp; + +uses + Forms, + HttpAsp1 in 'HttpAsp1.pas' {HttpTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpTestForm, HttpTestForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/httpasy.dpr b/lib/Delphi/Internet/httpasy.dpr new file mode 100644 index 00000000..f3c55b6b --- /dev/null +++ b/lib/Delphi/Internet/httpasy.dpr @@ -0,0 +1,12 @@ +program HttpAsy; + +uses + Forms, + HttpAsy1 in 'HttpAsy1.pas' {HttpAsyForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpAsyForm, HttpAsyForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/httpget.dpr b/lib/Delphi/Internet/httpget.dpr new file mode 100644 index 00000000..2b9f79b9 --- /dev/null +++ b/lib/Delphi/Internet/httpget.dpr @@ -0,0 +1,12 @@ +program HttpGet; + +uses + Forms, + HttpGet1 in 'HttpGet1.pas' {HttpGetForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpGetForm, HttpGetForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/httppg.dpr b/lib/Delphi/Internet/httppg.dpr new file mode 100644 index 00000000..53ee81b1 --- /dev/null +++ b/lib/Delphi/Internet/httppg.dpr @@ -0,0 +1,12 @@ +program HttpPg; + +uses + Forms, + HttpPg1 in 'HttpPg1.pas' {HttpTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpTestForm, HttpTestForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/httpthrd.dpr b/lib/Delphi/Internet/httpthrd.dpr new file mode 100644 index 00000000..fbcef1b6 --- /dev/null +++ b/lib/Delphi/Internet/httpthrd.dpr @@ -0,0 +1,14 @@ +program HttpThrd; + +uses + Forms, + HttpThr1 in 'HttpThr1.pas' {HttpThreadForm}, + HttpThr2 in 'HttpThr2.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(THttpThreadForm, HttpThreadForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/httptst.dpr b/lib/Delphi/Internet/httptst.dpr new file mode 100644 index 00000000..b30d5856 --- /dev/null +++ b/lib/Delphi/Internet/httptst.dpr @@ -0,0 +1,12 @@ +program HttpTst; + +uses + Forms, + httptst1 in 'httptst1.pas' {HttpTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpTestForm, HttpTestForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/httptst1.dfm b/lib/Delphi/Internet/httptst1.dfm new file mode 100644 index 00000000..cb4da753 Binary files /dev/null and b/lib/Delphi/Internet/httptst1.dfm differ diff --git a/lib/Delphi/Internet/httptst1.pas b/lib/Delphi/Internet/httptst1.pas new file mode 100644 index 00000000..33a12746 --- /dev/null +++ b/lib/Delphi/Internet/httptst1.pas @@ -0,0 +1,541 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: November 23, 1997 +Version: 1.05 +Description: Sample program to demonstrate some of the THttpCli features. +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jan 16, 1998 V1.00 Adapted for reviced HTTP component. +Apr 13, 1998 V1.01 Call HttpCli1DocEnd when to request failed, to close the + document file in the case it is already opened. +Jul 09, 1998 V1.02 Adapted for Delphi 4 +Sep 15, 1998 V1.03 Added some code to check for file creation errors (those + errors mostly comes from document names not suitable as file + names). + Added code to save form size and position and to resize it + correctly. +Sep 25, 1999 V1.04 Added display proxy setting +Aug 18, 2001 V1.05 Checked for document name before trying to display. + Wrapped document file access to a try/finally. + Checked ContentType to change document name extension according + to some content type. + Added display of copyright notice and version informations. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpTst1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, HttpProt, WinSock, WSocket, StdCtrls, ExtCtrls, IniFiles; + +const + HttpTstVersion = 105; + CopyRight : String = 'HttpTst (c) 1999-2002 F. Piette V1.05 '; + +type + THttpTestForm = class(TForm) + Panel1: TPanel; + GetButton: TButton; + HttpCli1: THttpCli; + URLEdit: TEdit; + DisplayMemo: TMemo; + Label1: TLabel; + Label2: TLabel; + ProxyHostEdit: TEdit; + ProxyPortEdit: TEdit; + PostButton: TButton; + Check64Button: TButton; + DataEdit: TEdit; + Label3: TLabel; + DateTimeEdit: TEdit; + DocumentMemo: TMemo; + Label4: TLabel; + HeadButton: TButton; + AbortButton: TButton; + Label5: TLabel; + Label6: TLabel; + ParseButton: TButton; + procedure GetButtonClick(Sender: TObject); + procedure HttpCli1Command(Sender: TObject; var s: String); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormShow(Sender: TObject); + procedure HttpCli1DocBegin(Sender: TObject); + procedure HttpCli1DocEnd(Sender: TObject); + procedure PostButtonClick(Sender: TObject); + procedure Check64ButtonClick(Sender: TObject); + procedure HeadButtonClick(Sender: TObject); + procedure HttpCli1RequestDone(Sender: TObject; RqType: THttpRequest; + Error: Word); + procedure AbortButtonClick(Sender: TObject); + procedure Panel1Resize(Sender: TObject); + procedure ParseButtonClick(Sender: TObject); + procedure HttpCli1HeaderData(Sender: TObject); + procedure HttpCli1Cookie(Sender: TObject; const Data: String; + var Accept: Boolean); + procedure HttpCli1LocationChange(Sender: TObject); + private + { Dclarations prives } + Initialized : Boolean; + DocFileName : String; + procedure SetButtonState(State : Boolean); + procedure Display(const Msg : String); + public + { Dclarations publiques } + end; + +var + HttpTestForm: THttpTestForm; + +implementation + +{$R *.DFM} + +const + IniFileName = 'httptest'; + SectionWindow = 'WindowMain'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyUrl = 'URL'; + KeyProxyHost = 'ProxyHost'; + KeyProxyPort = 'ProxyPort'; + KeyData = 'Data'; + KeyDateTime = 'DateTime'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + wsi : TWSADATA; +begin + if not Initialized then begin + Initialized := TRUE; + IniFile := TIniFile.Create(IniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + URLEdit.Text := IniFile.ReadString(SectionData, KeyURL, ''); + ProxyHostEdit.Text := IniFile.ReadString(SectionData, KeyProxyHost, ''); + ProxyPortEdit.Text := IniFile.ReadString(SectionData, KeyProxyPort, '80'); + DataEdit.Text := IniFile.ReadString(SectionData, KeyData, ''); + DateTimeEdit.Text := IniFile.ReadString(SectionData, KeyDateTime, ''); + IniFile.Free; + { Display version info for program and used components } + wsi := WinsockInfo; + DisplayMemo.Clear; + Display(CopyRight); + Display('Using:'); + Display(' ' + WSocket.CopyRight); + Display(' ' + HttpProt.CopyRight); + Display(' Winsock:'); + Display(' Version ' + + Format('%d.%d', [WinsockInfo.wHighVersion shr 8, + WinsockInfo.wHighVersion and 15])); + Display(' ' + StrPas(@wsi.szDescription)); + Display(' ' + StrPas(@wsi.szSystemStatus)); +{$IFNDEF VER100} + { A bug in Delphi 3 makes lpVendorInfo invalid } + if wsi.lpVendorInfo <> nil then + Display(' ' + StrPas(wsi.lpVendorInfo)); +{$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyURL, URLEdit.Text); + IniFile.WriteString(SectionData, KeyProxyHost, ProxyHostEdit.Text); + IniFile.WriteString(SectionData, KeyProxyPort, ProxyPortEdit.Text); + IniFile.WriteString(SectionData, KeyData, DataEdit.Text); + IniFile.WriteString(SectionData, KeyDateTime, DateTimeEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in display memo box, making sure we don't overflow it. } +procedure THttpTestForm.Display(const Msg : String); +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + { We preserve only 200 lines } + while DisplayMemo.Lines.Count > 200 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + { Makes last line visible } + {$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HeadButtonClick(Sender: TObject); +var + I : Integer; +begin + DisplayMemo.Clear; + DocumentMemo.Clear; + SetButtonState(FALSE); + + try + httpcli1.URL := URLEdit.Text; + httpcli1.Proxy := ProxyHostEdit.Text; + httpcli1.ProxyPort := ProxyPortEdit.Text; + httpcli1.RcvdStream := nil; + if DateTimeEdit.Text <> '' then + httpcli1.ModifiedSince := StrToDateTime(DateTimeEdit.Text) + else + httpcli1.ModifiedSince := 0; + + if httpcli1.Proxy <> '' then + Display('Using proxy ''' + httpcli1.Proxy + ':' + + httpcli1.ProxyPort + '''') + else + Display('Not using proxy'); + + try + httpcli1.Head; + except + Display('HEAD Failed !'); + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + Display('ReasonPhrase = ' + httpcli1.ReasonPhrase); + Exit; + end; + + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + + for I := 0 to httpcli1.RcvdHeader.Count - 1 do + Display('hdr>' + httpcli1.RcvdHeader.Strings[I]); + finally + SetButtonState(TRUE); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.GetButtonClick(Sender: TObject); +var + I : Integer; + DataIn : TStream; +begin + DisplayMemo.Clear; + DocumentMemo.Clear; + SetButtonState(FALSE); + + try + httpcli1.URL := URLEdit.Text; + httpcli1.Proxy := ProxyHostEdit.Text; + httpcli1.ProxyPort := ProxyPortEdit.Text; + httpcli1.AcceptLanguage := 'en, fr'; + httpcli1.RcvdStream := nil; + if DateTimeEdit.Text <> '' then + httpcli1.ModifiedSince := StrToDateTime(DateTimeEdit.Text) + else + httpcli1.ModifiedSince := 0; + + if httpcli1.Proxy <> '' then + Display('Using proxy ''' + httpcli1.Proxy + ':' + + httpcli1.ProxyPort + '''') + else + Display('Not using proxy'); + + try + httpcli1.Get; + except + Display('GET Failed !'); + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + Display('ReasonPhrase = ' + httpcli1.ReasonPhrase); + HttpCli1DocEnd(nil); { This will close the file } + Exit; + end; + + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + + for I := 0 to httpcli1.RcvdHeader.Count - 1 do + Display('hdr>' + httpcli1.RcvdHeader.Strings[I]); + + if Length(DocFileName) = 0 then begin + DocumentMemo.Lines.Add('*** NO DOCUMENT FILE NAME ***'); + end + else begin + DataIn := TFileStream.Create(DocFileName, fmOpenRead); + try + if Copy(httpcli1.ContentType, 1, 5) = 'text/' then + DocumentMemo.Lines.LoadFromStream(DataIn) + else begin + DocumentMemo.Lines.Add('Content type is ' + + httpcli1.ContentType); + DocumentMemo.Lines.Add('Document stored in ''' + + DocFileName + + ''' Size=' + IntToStr(DataIn.Size)); + end; + finally + DataIn.Free; + end; + end; + finally + SetButtonState(TRUE); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.PostButtonClick(Sender: TObject); +var + DataOut : TMemoryStream; + DataIn : TFileStream; + Buf : String; + I : Integer; +begin + DisplayMemo.Clear; + DocumentMemo.Clear; + SetButtonState(FALSE); + + try + DataOut := TMemoryStream.Create; + Buf := DataEdit.Text; + if Length(Buf) > 0 then { Check if some data to post } + DataOut.Write(Buf[1], Length(Buf)); + DataOut.Seek(0, soFromBeginning); + + httpcli1.SendStream := DataOut; + httpcli1.Proxy := ProxyHostEdit.Text; + httpcli1.ProxyPort := ProxyPortEdit.Text; + httpcli1.RcvdStream := nil; + httpcli1.URL := URLEdit.Text; + + if httpcli1.Proxy <> '' then + Display('Using proxy ''' + httpcli1.Proxy + ':' + + httpcli1.ProxyPort + '''') + else + Display('Not using proxy'); + + try + httpcli1.Post; + except + DataOut.Free; + Display('POST Failed !'); + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + Display('ReasonPhrase = ' + httpcli1.ReasonPhrase); + Exit; + end; + DataOut.Free; + + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + + for I := 0 to httpcli1.RcvdHeader.Count - 1 do + Display('hdr>' + httpcli1.RcvdHeader.Strings[I]); + + DataIn := TFileStream.Create(httpcli1.DocName, fmOpenRead); + try + DocumentMemo.Lines.LoadFromStream(DataIn); + finally + DataIn.Free; + end; + finally + SetButtonState(TRUE); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ WARNING: With DELPHI1, change "s: String" to "s: OpenString" } +procedure THttpTestForm.HttpCli1Command(Sender: TObject; var s: String); +begin + Display('cmd> ' + s); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1DocBegin(Sender: TObject); +begin + Display(HttpCli1.ContentType + ' => ' + httpcli1.DocName); + Display('Document = ' + httpcli1.DocName); + + DocFileName := httpcli1.DocName; + + if httpcli1.ContentType = 'image/gif' then + ReplaceExt(DocFileName, 'gif') + else if httpcli1.ContentType = 'image/jpeg' then + ReplaceExt(DocFileName, 'jpg') + else if httpcli1.ContentType = 'image/bmp' then + ReplaceExt(DocFileName, 'bmp'); + + if DocFileName = '' then + DocFileName := 'HttpTst.htm'; + try + httpcli1.RcvdStream := TFileStream.Create(DocFileName, fmCreate); + except + on E:Exception do begin + Display('Error opening file: ' + E.Message); + DocFileName := 'HttpTst.htm'; + Display('Using default file name: ' + DocFileName); + httpcli1.RcvdStream := TFileStream.Create(DocFileName, fmCreate); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1DocEnd(Sender: TObject); +begin + if httpcli1.RcvdStream <> nil then begin + httpcli1.RcvdStream.Free; + httpcli1.RcvdStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.Check64ButtonClick(Sender: TObject); +const + Inp : String = 'Aladdin:open sesame'; + Res : String = 'QWxhZGRpbjpvcGVuIHNlc2FtZQ=='; +begin + if EncodeLine(encBase64, @Inp[1], Length(Inp)) <> Res then + Display('Base64 encoding do not work !') + else + Display('Base64 encoding works OK !'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.SetButtonState(State : Boolean); +begin + GetButton.Enabled := State; + PostButton.Enabled := State; + HeadButton.Enabled := State; + AbortButton.Enabled := not State; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1RequestDone(Sender: TObject; + RqType: THttpRequest; Error: Word); +begin + SetButtonState(TRUE); + if Error <> 0 then + Display('RequestDone Error = ' + IntToStr(Error)) + else + Display('RequestDone, no error'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.AbortButtonClick(Sender: TObject); +begin + HttpCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.Panel1Resize(Sender: TObject); +begin + GetButton.Left := Panel1.Width - GetButton.Width - 8; + PostButton.Left := GetButton.Left; + HeadButton.Left := GetButton.Left; + AbortButton.Left := GetButton.Left; + URLEdit.Width := GetButton.Left - URLEdit.Left - 8; + DataEdit.Width := URLEdit.Width; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.ParseButtonClick(Sender: TObject); +var + Proto, User, Pass, Host, Port, Path : String; +begin + ParseURL(URLEdit.Text, Proto, User, Pass, Host, Port, Path); + Display('URL = ''' + URLEdit.Text + ''''); + Display('Proto = ''' + Proto + ''''); + Display('Host = ''' + Host + ''''); + Display('Path = ''' + Path + ''''); + Display('Port = ''' + Port + ''''); + Display('User = ''' + User + ''''); + Display('Pass = ''' + Pass + ''''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1HeaderData(Sender: TObject); +begin +{ Display('Header: "' + HttpCli1.LastResponse + '"'); } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1Cookie(Sender: TObject; const Data: String; + var Accept: Boolean); +begin + Display('Cookie: "' + Data + '"'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1LocationChange(Sender: TObject); +begin + Display('Location changed to "' + HttpCli1.Location + '"'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/md5test.dpr b/lib/Delphi/Internet/md5test.dpr new file mode 100644 index 00000000..33970051 --- /dev/null +++ b/lib/Delphi/Internet/md5test.dpr @@ -0,0 +1,12 @@ +program md5test; + +uses + Forms, + md5test1 in 'md5test1.pas' {MD5TestForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMD5TestForm, MD5TestForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/md5test1.dfm b/lib/Delphi/Internet/md5test1.dfm new file mode 100644 index 00000000..992de182 Binary files /dev/null and b/lib/Delphi/Internet/md5test1.dfm differ diff --git a/lib/Delphi/Internet/md5test1.pas b/lib/Delphi/Internet/md5test1.pas new file mode 100644 index 00000000..4eacb22a --- /dev/null +++ b/lib/Delphi/Internet/md5test1.pas @@ -0,0 +1,81 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE. Based on work given by Louis S. Berman from + BrainTree Ltd, lsb@braintree.com +Description: MD5 is an implmentation for the MD5 Message-Digest Algorithm + as described in RFC-1321 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Creation: October 1997 +Version: 1.01 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 12, 1998 V1.01 Beautified source + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MD5Test1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, MD5, StdCtrls; + +type + TMD5TestForm = class(TForm) + DataEdit: TEdit; + MD5Button: TButton; + MD5ResultLabel: TLabel; + procedure MD5ButtonClick(Sender: TObject); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + MD5TestForm: TMD5TestForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMD5TestForm.MD5ButtonClick(Sender: TObject); +var + Buffer : String; +begin + Buffer := DataEdit.Text + #0; + MD5ResultLabel.Caption := GetMD5(@Buffer[1], Length(Buffer) - 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Internet/mtsrv.dpr b/lib/Delphi/Internet/mtsrv.dpr new file mode 100644 index 00000000..e0900c4b --- /dev/null +++ b/lib/Delphi/Internet/mtsrv.dpr @@ -0,0 +1,14 @@ +program mtsrv; + +uses + Forms, + mtsrv1 in 'mtsrv1.pas' {ServerForm}, + mtsrv2 in 'mtsrv2.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TServerForm, ServerForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/mtsrv.ico b/lib/Delphi/Internet/mtsrv.ico new file mode 100644 index 00000000..c6ead6c6 Binary files /dev/null and b/lib/Delphi/Internet/mtsrv.ico differ diff --git a/lib/Delphi/Internet/mtsrv.res b/lib/Delphi/Internet/mtsrv.res new file mode 100644 index 00000000..59352340 Binary files /dev/null and b/lib/Delphi/Internet/mtsrv.res differ diff --git a/lib/Delphi/Internet/mtsrv1.dfm b/lib/Delphi/Internet/mtsrv1.dfm new file mode 100644 index 00000000..661680b4 Binary files /dev/null and b/lib/Delphi/Internet/mtsrv1.dfm differ diff --git a/lib/Delphi/Internet/mtsrv1.pas b/lib/Delphi/Internet/mtsrv1.pas new file mode 100644 index 00000000..43571ce2 --- /dev/null +++ b/lib/Delphi/Internet/mtsrv1.pas @@ -0,0 +1,273 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This little application shows how to use the TWSocket in a + multithreaded application. It is a very basic telnet server. + Each time a client connect to the server, he receive an "hello" + message. Then every character sent is echoed back to the client. + There are two units is this application: one for the main + server code, and one for the client thread. + Each time a client connect to the server, a new TWSocket is + created and a new thread is launched to handle the client + work. When the client disconnect, the TWSocket and the thread + are destroyed. + To see this demo working on your computer, start the demo then + start several copies of the TELNET client program (the one which + comes with Windows 95 is perfect). Then using each telnet, connect + to 127.0.0.1. You'll see a new connection in the list box. You + must receive the "hello" message and see each character as you + type them. You can use the Disconnect button from the application + or from the telnet client to see what happends (the connection + should be closed). +Note: I made this multithreaded application because so many people + asked for a multithreaded sample program. Most people think they + must go multithread in order to simultaneously server several + clients. This is completely WRONG, specially with TWSocket which + is a ASYNCHONOUS (non-blocking) component. You can serve as many + simultaneous clients as you like without using threads ! See how + TnSrv or ConSrv demo program does it without using threads. + Multithreaded programs are actually SLOWER and much more difficult + to develop than event driven, asynchonous programs such as TnSrv + and ConSrv demos. You need thread only if your server must do + some blocking and lengthy tasks, such as querying a database. But + threads are only needed for processing, not for telecommunication + using TWSocket. TWSocket does send and receive in the background, + even with no thread. +Creation: September 21, 1997 +Version: 1.02 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Nov 18, 1997 V1.01 Corrected isxdigit (By Paul Taylor ) +Apr 26, 1998 V1.02 MultiThreaded property correctly setup to TRUE. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MtSrv1; + +interface + +{$IFDEF VER80} + 'This sample program use threads and hence is not compatible with Delphi 1'; +{$ENDIF} +{$J+} + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + WSocket, MtSrv2, StdCtrls; + +type + TServerForm = class(TForm) + ServerWSocket: TWSocket; + DisconnectButton: TButton; + QuitButton: TButton; + ClientListBox: TListBox; + DisconnectAllButton: TButton; + procedure ServerWSocketSessionAvailable(Sender: TObject; Error: Word); + procedure FormShow(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure QuitButtonClick(Sender: TObject); + procedure DisconnectAllButtonClick(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + private + procedure ClientThreadTerminate(Sender: TObject); + procedure DisconnectAll; + end; + +var + ServerForm: TServerForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check if a character is a valid hex digit } +function isxdigit(Ch : char) : Boolean; +begin + Result := (ch in ['0'..'9']) or (ch in ['a'..'f']) or (ch in ['A'..'F']); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Convert an hexdigit to an integer } +function xdigit(Ch : char) : Integer; +begin + if ch in ['0'..'9'] then + Result := ord(Ch) - ord('0') + else + Result := (ord(Ch) and 15) + 9; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Convert the ascii representation of a hex number to an integer } +function htoi(value : PChar) : Integer; +var + i : Integer; +begin + Result := 0; + i := 0; + while (Value[i] <> #0) and (Value[i] = ' ') do + i := i + 1; + while (Value[i] <> #0) and (isxDigit(Value[i])) do begin + Result := Result * 16 + xdigit(Value[i]); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is generated when a client is connecting } +procedure TServerForm.ServerWSocketSessionAvailable(Sender: TObject; + Error: Word); +var + ClientThread : TClientThread; +begin + { Create a new thread to handle client request } + ClientThread := TClientThread.Create(ServerWSocket.Accept); + + { Assign the thread's OnTerminate event } + ClientThread.OnTerminate := ClientThreadTerminate; + + { Add the thread to the listbox which is our client list } + ClientListBox.Items.Add(IntToHex(Integer(ClientThread), 8)); + + { Then start the client thread work } + { because it was created in the blocked state } + ClientThread.Resume; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +begin + if FirstTime then begin + FirstTime := FALSE; + ServerWSocket.Proto := 'tcp'; { We use a TCP connection } + ServerWSocket.Port := 'telnet'; { We wants to use telnet } + ServerWSocket.Addr := '0.0.0.0'; { We accept any client } + ServerWSocket.Listen; { Start server accepting } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is generated when the user clicks on the 'Disconnect' button } +{ when he wants to disconnect the selected client in the listbox. } +procedure TServerForm.DisconnectButtonClick(Sender: TObject); +var + ClientThread : TClientThread; + Buf : String; +begin + { No selected item, nothing to do } + if ClientListBox.ItemIndex < 0 then + Exit; + + { Extract the ClientThread pointer from the list box } + Buf := ClientListBox.Items[ClientListBox.ItemIndex]; + ClientThread := TClientThread(htoi(PChar(Buf))); + + { Call ClientThread.Release which will stop the thread } + { In consequence, the OnTerminate event will be generated } + ClientThread.Release; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when one of the client thread terminate } +{ We will find this thread in our listbox, remove it and destroy the } +{ TWSocket object use by the corresponding client. } +procedure TServerForm.ClientThreadTerminate(Sender: TObject); +var + ClientThread : TClientThread; + Buf : String; + Index : Integer; +begin + { A thread has been terminated, remove it from our list and destroy } + { the ClientWSocket we passed to the thread. } + for Index := 0 to ClientListBox.Items.Count - 1 do begin + Buf := ClientListBox.Items[Index]; + ClientThread := TClientThread(htoi(PChar(Buf))); + if ClientThread = TClientThread(Sender) then begin + { Remove the client from our listbox } + ClientListBox.Items.Delete(Index); + Break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure scan the listbox and halt every ClientThread } +procedure TServerForm.DisconnectAll; +var + ClientThread : TClientThread; + Buf : String; +begin + while ClientListBox.Items.Count > 0 do begin + Buf := ClientListBox.Items[0]; + ClientThread := TClientThread(htoi(PChar(Buf))); + ClientThread.Release; + Application.ProcessMessages; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.QuitButtonClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.DisconnectAllButtonClick(Sender: TObject); +begin + DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); +begin + DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/mtsrv2.pas b/lib/Delphi/Internet/mtsrv2.pas new file mode 100644 index 00000000..2fc3ab4b --- /dev/null +++ b/lib/Delphi/Internet/mtsrv2.pas @@ -0,0 +1,191 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This little application shows how to use the TWSocket in a + multithreaded application. It is a very basic telnet werver. + Each time a client connect to the server, he receive an "hello" + message. Then every character sent is echoed back to the client. + There are two units is this application: one for the main + server code, and one for the client thread. + Each time a client connect to the server, a new TWSocket is + created and a new thread is launched to handle the client + work. When the client disconnect, the TWSocket and the thread + are destroyed. + To see this demo working on your computer, start the demo then + start several copies of the TELNET client program (the one which + comes with Windows 95 is perfect). Then using each telnet, connect + to 127.0.0.1. You'll see a new connection in the list box. You + must receive the "hello" message and see each character as you + type them. You can use the Disconnect button from the application + or from the telnet client to see what happends (the connection + should be closed). +Creation: September 21, 1997 +Version: 1.02 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MtSrv2; + +interface + +uses + Windows, Messages, Classes, WinSock, WSocket; + +type + TClientThread = class(TThread) + private + FClientSocket : TWSocket; + FClientHSocket : TSocket; + procedure ServerWSocketDataAvailable(Sender: TObject; Error: Word); + procedure ServerWSocketSessionClosed(Sender: TObject; Error: Word); + protected + procedure Execute; override; + public + constructor Create(ClientHSocket : TSocket); + destructor Destroy; override; + procedure Release; + + property ClientWSocket : TWSocket read FClientSocket write FClientSocket; + end; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Create a new thread in the blocked state. This allow the user to register } +{ the client thread before it actually start working. } +constructor TClientThread.Create(ClientHSocket : TSocket); +begin + FClientHSocket := ClientHSocket; + FreeOnTerminate := TRUE; + inherited Create(TRUE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Destroy the thread. Destroy the ClientWSocket if needed. } +destructor TClientThread.Destroy; +begin + if Assigned(FClientSocket) then begin + FClientSocket.Destroy; + FClientSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This method will be called by the main server thread to terminated a } +{ client thread. } +procedure TClientThread.Release; +begin + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the main thread routine. There is not much to do because TWSocket } +{ is event driven. So everythong to do is done inside an event handler, } +{ mostly the OnDataAvailable event handler which is triggered each time } +{ the client send something to the server. } +procedure TClientThread.Execute; +begin + { Create the client TWSocket. It is important to create it inside the } + { Execute method because it *must* be created by the thread. Otherwise } + { the messages sent by winsock would be processed in the main thread } + { context, effectively disabling multi-threading. } + FClientSocket := TWSocket.Create(nil); + FClientSocket.HSocket := FClientHSocket; + FClientSocket.OnDataAvailable := ServerWSocketDataAvailable; + FClientSocket.OnSessionClosed := ServerWSocketSessionClosed; + + { Send the welcome message } + FClientSocket.SendStr('Hello !' + #10 + #13 + '> '); + + { Message loop to handle TWSocket messages } + { The loop is exited when WM_QUIT message is received } + FClientSocket.MessageLoop; + + { Returning from the Execute function effectively terminate the thread } + ReturnValue := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client connection is closed. } +procedure TClientThread.ServerWSocketSessionClosed( + Sender: TObject; Error: Word); +begin + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client has sent some data to the } +{ server. It is here that we must place the client requests execution } +{ probably by assembling data in lines, parsing those lines for commands } +{ and executing the commands. Here for simplicity, we just echo back the } +{ data sent by the user, without doing anything serious. } +{ To demonstrate that blocking a thread do not block the others, when a '*' } +{ is received, we go to Sleep for a few seconds, effectively blocking the } +{ the client. But as we are multi-threaded, this do not block any other } +{ client. } +{ Do not forget to call the Synchronize method if you need to update the } +{ user interface. Only the main thread can do it (VCL is not thread safe). } +procedure TClientThread.ServerWSocketDataAvailable( + Sender: TObject; + Error: Word); +var + Buffer : array [0..4095] of char; + Count : Integer; +begin + { Receive as much data as possible } + Count := FClientSocket.Receive(@Buffer, SizeOf(Buffer)); + + { If data received, then process it } + if Count > 0 then begin + if Buffer[0] = '*' then begin + { If the first character is '*' then go to sleep a while } + FClientSocket.SendStr('Sleeping for 15 sec...' + #10 + #13); + Sleep(15000); + FClientSocket.SendStr('Wake up !' + #10 + #13); + end + else + { Just echo data back to client } + FClientSocket.Send(@Buffer, Count); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/newsrdr.dpr b/lib/Delphi/Internet/newsrdr.dpr new file mode 100644 index 00000000..90a3d24f --- /dev/null +++ b/lib/Delphi/Internet/newsrdr.dpr @@ -0,0 +1,12 @@ +program NewsRdr; + +uses + Forms, + NewsRdr1 in 'NewsRdr1.pas' {NNTPForm}; + +{$R *.RES} + +begin + Application.CreateForm(TNNTPForm, NNTPForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/pingtst.dpr b/lib/Delphi/Internet/pingtst.dpr new file mode 100644 index 00000000..fe956a09 --- /dev/null +++ b/lib/Delphi/Internet/pingtst.dpr @@ -0,0 +1,13 @@ +program PingTst; + +uses + Forms, + PingTst1 in 'PingTst1.pas' {PingTstForm}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TPingTstForm, PingTstForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/poptst.dpr b/lib/Delphi/Internet/poptst.dpr new file mode 100644 index 00000000..c3199e73 --- /dev/null +++ b/lib/Delphi/Internet/poptst.dpr @@ -0,0 +1,14 @@ +program PopTst; + +uses + Forms, + PopTst1 in 'PopTst1.pas' {POP3ExcercizerForm}, + PopTst2 in 'PopTst2.pas' {MessageForm}; + +{$R *.RES} + +begin + Application.CreateForm(TPOP3ExcercizerForm, POP3ExcercizerForm); + Application.CreateForm(TMessageForm, MessageForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/poptst2.dfm b/lib/Delphi/Internet/poptst2.dfm new file mode 100644 index 00000000..b2ece7d5 Binary files /dev/null and b/lib/Delphi/Internet/poptst2.dfm differ diff --git a/lib/Delphi/Internet/poptst2.pas b/lib/Delphi/Internet/poptst2.pas new file mode 100644 index 00000000..ac6c5990 --- /dev/null +++ b/lib/Delphi/Internet/poptst2.pas @@ -0,0 +1,33 @@ +{ +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + +} +unit PopTst2; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls; + +type + TMessageForm = class(TForm) + DisplayMemo: TMemo; + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + MessageForm: TMessageForm; + +implementation + +{$R *.DFM} + +end. diff --git a/lib/Delphi/Internet/server5.dpr b/lib/Delphi/Internet/server5.dpr new file mode 100644 index 00000000..bcc9eba2 --- /dev/null +++ b/lib/Delphi/Internet/server5.dpr @@ -0,0 +1,12 @@ +program server5; + +uses + Forms, + Srv5 in 'Srv5.pas' {ServerForm}; + +{$R *.RES} + +begin + Application.CreateForm(TServerForm, ServerForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/srv5.dfm b/lib/Delphi/Internet/srv5.dfm new file mode 100644 index 00000000..155ad594 Binary files /dev/null and b/lib/Delphi/Internet/srv5.dfm differ diff --git a/lib/Delphi/Internet/srv5.pas b/lib/Delphi/Internet/srv5.pas new file mode 100644 index 00000000..53080d83 --- /dev/null +++ b/lib/Delphi/Internet/srv5.pas @@ -0,0 +1,142 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: Demo program to show how to use TWSocket object is a very + simple server program. This server just wait for a client to + connect, then send 'Hello'. When the user click on the + disconnect button, the client is disconnected. +Creation: September 19, 1996 +Version: 2.02 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Mar 19, 1997 Use enhanced TWSocket object +Sep 06, 1997 Beautified +Aug 20, 1999 V2.02 Changed comment to correctly talk about interface use. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Srv5; + +{$J+} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, + Controls, Forms, Dialogs, WSocket, Winsock, StdCtrls; + +type + TServerForm = class(TForm) + SrvSocket: TWSocket; + InfoLabel: TLabel; + CliSocket: TWSocket; + DisconnectButton: TButton; + procedure SrvSocketSessionAvailable(Sender: TObject; Error: Word); + procedure FormShow(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + end; + +var + ServerForm: TServerForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +begin + if FirstTime then begin + FirstTime := FALSE; { Do it only once ! } + SrvSocket.Addr := '0.0.0.0'; { Use any interface } + SrvSocket.Listen; { Start listening for client } + InfoLabel.Caption := 'Waiting for client'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler is called once a client has connected the server. *} +procedure TServerForm.SrvSocketSessionAvailable(Sender: TObject; Error: Word); +var + NewHSocket : TSocket; + PeerName : TSockAddrIn; + Peer : String; +begin + { We need to accept the client connection } + NewHSocket := SrvSocket.Accept; + + { And then associate this connection with our client socket } + CliSocket.Dup(NewHSocket); + + { Wants to know who is connected to display on screen } + CliSocket.GetPeerName(PeerName, Sizeof(PeerName)); + + { User likes to see internet address in dot notation } + Peer := IntToStr(ord(PeerName.sin_addr.S_un_b.s_b1)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b2)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b3)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b4)); + InfoLabel.Caption := 'Remote ' + Peer + ' connected'; + + { Send a welcome message to the client } + CliSocket.SendStr('Hello' + #13 + #10); + + { Enable the server user to disconect the client } + DisconnectButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler is called once the user clicks on Ddisconnect *} +procedure TServerForm.DisconnectButtonClick(Sender: TObject); +begin + CliSocket.ShutDown(2); { Shut the communication down } + CliSocket.Close; { Close the communication } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler is called once the client connection is broken. *} +{* Either by the client or the server. *} +procedure TServerForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + DisconnectButton.Enabled := FALSE; + InfoLabel.Caption := 'Waiting for client';{ Inform the user } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/srvdemo.dpr b/lib/Delphi/Internet/srvdemo.dpr new file mode 100644 index 00000000..3406c31f --- /dev/null +++ b/lib/Delphi/Internet/srvdemo.dpr @@ -0,0 +1,13 @@ +program SrvDemo; + +uses + Forms, + SrvDemo1 in 'SrvDemo1.pas' {SrvForm}, + SrvDemo2 in 'SrvDemo2.pas' {CliForm}; + +{$R *.RES} + +begin + Application.CreateForm(TSrvForm, SrvForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/thrdsrv1.dfm b/lib/Delphi/Internet/thrdsrv1.dfm new file mode 100644 index 00000000..d0f9040c Binary files /dev/null and b/lib/Delphi/Internet/thrdsrv1.dfm differ diff --git a/lib/Delphi/Internet/thrdsrv1.pas b/lib/Delphi/Internet/thrdsrv1.pas new file mode 100644 index 00000000..3c666efe --- /dev/null +++ b/lib/Delphi/Internet/thrdsrv1.pas @@ -0,0 +1,491 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois Piette +Creation: Sep 02, 2001 +Version: 1.01 +Description: Basic TCP server showing how to use TWSocketServer and + TWSocketClient components with threads. + This demo is mostly the same as TcpSrv demo but use a thread to + run client code. This is needed if client operation is lengthy + and blocking (such as a long database query) but otherwise will + consume more CPU cycles in task switching and makes thing much + more complexe because multithreading requires synchronization. +History: +Feb 24, 2002 V1.01 Wilfried Mestdagh added ThreadDetach + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit ThrdSrv1; + +interface + +{$IFDEF VER80} + 'This sample program use threads and hence is not compatible with Delphi 1'; +{$ENDIF} + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, StdCtrls, ExtCtrls, WSocket, WSocketS; + +const + ThrdSrvVersion = 101; + CopyRight = ' ThrdSrv (c) 2001-2002 by Franois PIETTE. V1.01'; + WM_APPSTARTUP = WM_USER + 1; + +type + TDisplayProc = procedure (const Msg : String) of object; + + { TClientThread is our worker thread class. Each time a client connect, a } + { new TClientThread is instanciated and client socket attached to it so } + { events are processed in the thread's context. } + { Remember that multithreading requires synchronization, specially when } + { updating GUI or accessing shared data. } + { TClientThread uses OnDisplay event to display data on the application } + { main form. Synchronization is automatically done. } + TClientThread = class(TThread) + private + FWSocket : TWSocket; { Reference to client socket } + FMsg : String; { Message to be displayed } + FOnDisplay : TDisplayProc; { Event variable } + FThreadAttached : Boolean; { TRUE once socket attached } + procedure DisplayMsg; { Synchronized procedure } + public + procedure Execute; override; { Main method } + procedure Display(const Msg : String); { Takes care of synchroniz. } + published + property WSocket : TWSocket read FWSocket + write FWSocket; + property ThreadAttached : Boolean read FThreadAttached + write FThreadAttached; + property OnDisplay : TDisplayProc read FOnDisplay + write FOnDisplay; + end; + + { TThrdSrvClient is the class which will be instanciated by server } + { component for each new client. N simultaneous clients means N } + { TThrdSrvClient will be instanciated. Each being used to handle only a } + { single client. } + { We can add any data that has to be private for each client, such as } + { receive buffer or any other data needed for processing. } + TThrdSrvClient = class(TWSocketClient) + public + ClientThread : TClientThread; + RcvdLine : String; + ConnectTime : TDateTime; + end; + + { Application main from } + TTcpSrvForm = class(TForm) + ToolPanel: TPanel; + DisplayMemo: TMemo; + WSocketServer1: TWSocketServer; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure WSocketServer1ClientConnect(Sender: TObject; + Client: TWSocketClient; Error: Word); + procedure WSocketServer1ClientDisconnect(Sender: TObject; + Client: TWSocketClient; Error: Word); + procedure WSocketServer1BgException(Sender: TObject; E: Exception; + var CanClose: Boolean); + procedure WSocketServer1ClientCreate(Sender: TObject; + Client: TWSocketClient); + private + FIniFileName : String; + FInitialized : Boolean; + procedure Display(const Msg : String); + procedure WMAppStartup(var Msg: TMessage); message WM_APPSTARTUP; + procedure ClientDataAvailable(Sender: TObject; Error: Word); + procedure ProcessData(Client : TThrdSrvClient); + procedure ClientBgException(Sender : TObject; + E : Exception; + var CanClose : Boolean); + procedure ClientLineLimitExceeded(Sender : TObject; + Cnt : LongInt; + var ClearData : Boolean); +{$IFDEF VER140} + { Delphi 6 changed the rules about synchronization... } + procedure WakeMainThread(Sender: TObject); +{$ENDIF} + public + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + TcpSrvForm: TTcpSrvForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'WindowTcpSrv'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormCreate(Sender: TObject); +begin + { Compute INI file name based on exe file name. Remove path to make it } + { go to windows directory. } + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + +{$IFDEF VER140} + { With Delphi 6, we need to waken mainthread ourself ! } + Classes.WakeMainThread := Self.WakeMainThread; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + { Fetch persistent parameters from INI file } + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + IniFile.Destroy; + DisplayMemo.Clear; + { Delay startup code until our UI is ready and visible } + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + { Save persistent data to INI file } + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in our display memo. Delete lines to be sure to not } +{ overflow the memo which may have a limited capacity. } +procedure TTcpSrvForm.Display(const Msg : String); +var + I : Integer; +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + for I := 1 to 50 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + {$IFNDEF VER80} + { Scroll to makes caret visible } + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is our custom message handler. We posted a WM_APPSTARTUP message } +{ from FormShow event handler. Now UI is ready and visible. } +procedure TTcpSrvForm.WMAppStartup(var Msg: TMessage); +begin + Display(Trim(CopyRight)); { This demo version } + Display(Trim(wsocket.Copyright)); { TWSocket version } + Display(Trim(wsockets.CopyRight)); { TWSocketServer version } + Display(''); + Display('MainThreadID : $' + IntToHex(GetCurrentThreadID, 8)); + WSocketServer1.Proto := 'tcp'; { Use TCP protocol } + WSocketServer1.Port := 'telnet'; { Use telnet port } + WSocketServer1.Addr := '0.0.0.0'; { Use any interface } + WSocketServer1.ClientClass := TThrdSrvClient; { Use our component } + WSocketServer1.Listen; { Start litening } + Display('Waiting for clients on port ''' + WSocketServer1.Port + '''...'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER140} +{ Delphi 6 requires a little help in order for TThread.Synchronize to work. } +{ We just post a do-nothing message to the form which will waken up the } +{ maine thread and execute waiting synchronized procedures. } +procedure TTcpSrvForm.WakeMainThread(Sender: TObject); +begin + PostMessage(Handle, WM_NULL, 0, 0); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Called in main thread context. } +procedure TTcpSrvForm.WSocketServer1ClientCreate( + Sender : TObject; + Client : TWSocketClient); +begin + with Client as TThrdSrvClient do begin + Client.ThreadDetach; + Client.MultiThreaded := TRUE; + ClientThread := TClientThread.Create(TRUE); + ClientThread.FreeOnTerminate := TRUE; + ClientThread.WSocket := Client; + ClientThread.OnDisplay := Display; + ClientThread.Suspended := FALSE; + { Wait until thread is started and has attached client socket to } + { his own context. } + while not ClientThread.ThreadAttached do + Sleep(0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is called each time a new client is connecting. } +{ Called in main thread context. } +procedure TTcpSrvForm.WSocketServer1ClientConnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TThrdSrvClient do begin + Display('Client connected.' + + ' Remote: ' + PeerAddr + '/' + PeerPort + + ' Local: ' + GetXAddr + '/' + GetXPort + + ' ThreadID : $' + IntToHex(ClientThread.ThreadID, 8)); + LineMode := TRUE; + LineEdit := TRUE; + LineLimit := 80; { Do not accept long lines } + OnDataAvailable := ClientDataAvailable; + OnLineLimitExceeded := ClientLineLimitExceeded; + OnBgException := ClientBgException; + ConnectTime := Now; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called each time a client disconnect. } +{ This procedure is called in main thread context. } +procedure TTcpSrvForm.WSocketServer1ClientDisconnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TThrdSrvClient do begin + Display('Client disconnecting: ' + PeerAddr + ' ' + + 'Duration: ' + FormatDateTime('hh:nn:ss', + Now - ConnectTime) + + ' ThreadID : $' + IntToHex(GetCurrentThreadID, 8)); + + { Clear WSocket reference in worker thread } + { ClientThread.WSocket := nil; } + { Break message pump within worker thread } + PostThreadMessage(ClientThread.ThreadID, WM_QUIT, 0, 0); + { Allow up to 10 second for thread termination } + WaitForSingleObject(ClientThread.Handle, 10000); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is called in client thread context. So be aware about GUI } +{ update: you must use synchronize like ClientThread.Display does. } +procedure TTcpSrvForm.ClientLineLimitExceeded( + Sender : TObject; + Cnt : LongInt; + var ClearData : Boolean); +begin + with Sender as TThrdSrvClient do begin + ClientThread.Display('Line limit exceeded from ' + GetPeerAddr + '. Closing.'); + ClearData := TRUE; + Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Each time a client has datavailable triggers this event handler. } +{ We receive data (line mode) and execute "commands". } +{ This procedure is called in client thread context. So be aware about GUI } +{ update: you must use synchronize like ClientThread.Display does. } +procedure TTcpSrvForm.ClientDataAvailable( + Sender : TObject; + Error : Word); +begin + with Sender as TThrdSrvClient do begin + { We use line mode. We will receive complete lines } + RcvdLine := ReceiveStr; + { Remove trailing CR/LF } + while (Length(RcvdLine) > 0) and + (RcvdLine[Length(RcvdLine)] in [#13, #10]) do + RcvdLine := Copy(RcvdLine, 1, Length(RcvdLine) - 1); + ClientThread.Display('Received from ' + GetPeerAddr + ': ''' + + RcvdLine + ''' ' + + 'ThreadID: $' + IntToHex(GetCurrentThreadID, 8)); + ProcessData(Sender as TThrdSrvClient); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is called in client thread context. So be aware about GUI } +{ update: you must use synchronize. } +procedure TTcpSrvForm.ProcessData(Client : TThrdSrvClient); +var + I : Integer; + AClient : TThrdSrvClient; +begin + { We could replace all those CompareText with a table lookup } + if CompareText(Client.RcvdLine, 'help') = 0 then + Client.SendStr('Commands are:' + #10#13 + + ' exit' + #10#13 + + ' who' + #10#13 + + ' sleep' + #10#13 + + ' time' + #10#13 + + ' exception' + #10#13) + else if CompareText(Client.RcvdLine, 'exit') = 0 then + { We can't call Client.Close here because we will immediately } + { reenter DataAvailable event handler with same line because } + { a line is removed from buffer AFTER it has been processed. } + { Using CloseDelayed will delay Close until we are out of } + { current event handler. } + Client.CloseDelayed + else if CompareText(Client.RcvdLine, 'time') = 0 then + { Send server date and time to client } + Client.SendStr(DateTimeToStr(Now) + #13#10) + else if CompareText(Client.RcvdLine, 'who') = 0 then begin + { Send client list to client } + Client.SendStr('There are ' + IntToStr(WSocketServer1.ClientCount) + + ' connected users:' + #13#10); + for I := WSocketServer1.ClientCount - 1 downto 0 do begin + AClient := TThrdSrvClient(WSocketServer1.Client[I]); + Client.SendStr(AClient.PeerAddr + ':' + AClient.GetPeerPort + ' ' + + DateTimeToStr(AClient.ConnectTime) + #13#10); + end; + end + else if CompareText(Client.RcvdLine, 'Sleep') = 0 then begin + Client.SendStr('Now sleeping for 15"...' + #13#10); + Sleep(15000); + Client.SendStr('Wakeup !' + #13#10); + end + else if CompareText(Client.RcvdLine, 'exception') = 0 then + { This will trigger a background exception for client } + PostMessage(Client.Handle, WM_TRIGGER_EXCEPTION, 0, 0) + else + if Client.State = wsConnected then + Client.SendStr('Unknown command: ''' + Client.RcvdLine + '''' + #13#10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when listening (server) socket experienced } +{ a background exception. Should normally never occurs. } +{ This procedure is called in main thread context. } +procedure TTcpSrvForm.WSocketServer1BgException( + Sender : TObject; + E : Exception; + var CanClose : Boolean); +begin + Display('Server exception occured: ' + E.ClassName + ': ' + E.Message); + CanClose := FALSE; { Hoping that server will still work ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when a client socket experience a background } +{ exception. It is likely to occurs when client aborted connection and data } +{ has not been sent yet. } +{ Warning: This procedure is executed in worker thread context. } +procedure TTcpSrvForm.ClientBgException( + Sender : TObject; + E : Exception; + var CanClose : Boolean); +begin + with Sender as TThrdSrvClient do begin + ClientThread.Display('Client exception occured: ' + + E.ClassName + ': ' + E.Message); + end; + CanClose := TRUE; { Goodbye client ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* *} +{* TClientThread *} +{* *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is our client worker thread main procedure. It is thread's code. } +{ We have to attach client socket to this thread's context and then } +{ process messages so that TWSocket events works. } +procedure TClientThread.Execute; +begin + if not Assigned(WSocket) then + Exit; + + { Attach client socket to this thread } + WSocket.ThreadAttach; + { Signal main thread that we've attached socket to this thread } + ThreadAttached := TRUE; + { Now let main thread continue starting the connection. } + { This little avoid race condition. } + Sleep(0); + { Then process messages until WM_QUIT message is posted. } + { TWSocket is event-driven. So even when used within a thread, we } + { have to have a "message pump". Any message pump will do and there } + { is one built in TWSocket, so use it ! } + WSocket.MessageLoop; + { Be sure to have main thread waiting for termination before terminating} + Sleep(0); + { Detach the hidden window from within the thread } + WSocket.ThreadDetach; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is called from client thread and must display a message } +{ on the GUI (main application form). As we are in a thread, we can't } +{ simply call something that act on the GUI, we MUST use synchronize to ask } +{ main thread to update the GUI. } +procedure TClientThread.Display(const Msg: String); +begin + { Synchronized procedure have no parameter, we must use a variable } + FMsg := Msg; + { Then synchronize the procedure (which will use FMsg) } + Synchronize(DisplayMsg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Never call this procedure directly, always call Synchronize(DisplayMsg) } +procedure TClientThread.DisplayMsg; +begin + if Assigned(FOnDisplay) then + FOnDisplay(FMsg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/tnclient.dpr b/lib/Delphi/Internet/tnclient.dpr new file mode 100644 index 00000000..301be2d9 --- /dev/null +++ b/lib/Delphi/Internet/tnclient.dpr @@ -0,0 +1,12 @@ +program TnClient; + +uses + Forms, + TnCli1 in 'TnCli1.pas' {TelnetForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTelnetForm, TelnetForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/tnclient.ico b/lib/Delphi/Internet/tnclient.ico new file mode 100644 index 00000000..00e85d67 Binary files /dev/null and b/lib/Delphi/Internet/tnclient.ico differ diff --git a/lib/Delphi/Internet/tndemo.dpr b/lib/Delphi/Internet/tndemo.dpr new file mode 100644 index 00000000..b136dca2 --- /dev/null +++ b/lib/Delphi/Internet/tndemo.dpr @@ -0,0 +1,12 @@ +program tndemo; + +uses + Forms, + TnDemo1 in 'TnDemo1.pas' {TnDemoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTnDemoForm, TnDemoForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/tndemo1.dfm b/lib/Delphi/Internet/tndemo1.dfm new file mode 100644 index 00000000..cd7dfa71 Binary files /dev/null and b/lib/Delphi/Internet/tndemo1.dfm differ diff --git a/lib/Delphi/Internet/tndemo1.pas b/lib/Delphi/Internet/tndemo1.pas new file mode 100644 index 00000000..0ac2e09f --- /dev/null +++ b/lib/Delphi/Internet/tndemo1.pas @@ -0,0 +1,207 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: How to use TnCnx (Telnet protocol) with a TMemo +Creation: December 11, 1997 +Version: 1.01 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Oct 23, 2002 V1.01 Changed Buffer arg in OnDataAvailable to untyped var instead + of PChar. More portable. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnDemo1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, TnCnx, WSocket, ExtCtrls; + +type + TTnDemoForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + TnCnx: TTnCnx; + HostLabel: TLabel; + HostEdit: TEdit; + ConnectButton: TButton; + InfoLabel: TLabel; + DisconnectButton: TButton; + PortLabel: TLabel; + PortEdit: TEdit; + Label1: TLabel; + DataEdit: TEdit; + SendButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure TnCnxDataAvailable(Sender: TTnCnx; Buffer : Pointer; + Len: Integer); + procedure TnCnxSessionConnected(Sender: TTnCnx; Error: Word); + procedure DisplayMemoKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure DisplayMemoKeyPress(Sender: TObject; var Key: Char); + procedure TnCnxSessionClosed(Sender: TTnCnx; Error: Word); + procedure DisconnectButtonClick(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + end; + +var + TnDemoForm: TTnDemoForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Display a message in the memo field, breaking with CR *} +procedure MemoAddLines(Memo : TMemo; Msg : String); +const + CR = #13; + LF = #10; +var + Start, Stop : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add(''); + + Start := 1; + Stop := Pos(CR, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := + Memo.Lines.Strings[Memo.Lines.Count - 1] + + Copy(Msg, Start, Stop - Start); + if Msg[Stop] = CR then begin + Memo.Lines.Add(''); + SendMessage(Memo.Handle, WM_KEYDOWN, VK_UP, 1); + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + if Msg[Start] = LF then + Start := Start + 1; + Stop := Start; + while (Msg[Stop] <> CR) and (Stop <= Length(Msg)) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.ConnectButtonClick(Sender: TObject); +begin + TnCnx.Host := HostEdit.Text; + TnCnx.Port := PortEdit.Text; + TnCnx.TermType := 'VT100'; + TnCnx.LocalEcho := FALSE; + TnCnx.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.DisconnectButtonClick(Sender: TObject); +begin + TnCnx.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.TnCnxSessionConnected(Sender: TTnCnx; Error: Word); +begin + if Error <> 0 then begin + DisplayMemo.Lines.Add('Unable to connect. Error #' + IntToStr(Error)); + Exit; + end; + + DisplayMemo.Clear; + InfoLabel.Caption := 'Connected'; + DisplayMemo.Enabled := TRUE; + ConnectButton.Enabled := FALSE; + DisconnectButton.Enabled := TRUE; + ActiveControl := DisplayMemo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.TnCnxSessionClosed(Sender: TTnCnx; Error: Word); +begin + InfoLabel.Caption := 'Disconnected'; + DisplayMemo.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + DisconnectButton.Enabled := FALSE; + ActiveControl := ConnectButton; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.TnCnxDataAvailable( + Sender: TTnCnx; Buffer : Pointer; Len: Integer); +begin + MemoAddLines(DisplayMemo, StrPas(Buffer)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.DisplayMemoKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + Key := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.DisplayMemoKeyPress(Sender: TObject; var Key: Char); +begin + TnCnx.Send(@Key, 1); + if Key = #13 then begin + { Send a LF after CR key } + Key := #10; + TnCnx.Send(@Key, 1); + end; + Key := #0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.SendButtonClick(Sender: TObject); +begin + if TnCnx.State = wsConnected then + TnCnx.SendStr(DataEdit.Text + #13#10) + else + DisplayMemo.Lines.Add('*** NOT CONNECTED ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/tnsrv.dpr b/lib/Delphi/Internet/tnsrv.dpr new file mode 100644 index 00000000..21811a59 --- /dev/null +++ b/lib/Delphi/Internet/tnsrv.dpr @@ -0,0 +1,13 @@ +program Tnsrv; + +uses + Forms, + TnSrv1 in 'TnSrv1.pas' {ServerForm}, + TnSrv2 in 'TnSrv2.pas' {ClientForm}; + +{$R *.RES} + +begin + Application.CreateForm(TServerForm, ServerForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/tnsrv.ico b/lib/Delphi/Internet/tnsrv.ico new file mode 100644 index 00000000..d6951f9a Binary files /dev/null and b/lib/Delphi/Internet/tnsrv.ico differ diff --git a/lib/Delphi/Internet/tnsrv1.dfm b/lib/Delphi/Internet/tnsrv1.dfm new file mode 100644 index 00000000..f20bc1bb Binary files /dev/null and b/lib/Delphi/Internet/tnsrv1.dfm differ diff --git a/lib/Delphi/Internet/tnsrv1.pas b/lib/Delphi/Internet/tnsrv1.pas new file mode 100644 index 00000000..5a5a45b1 --- /dev/null +++ b/lib/Delphi/Internet/tnsrv1.pas @@ -0,0 +1,325 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Copyright: Franois PIETTE +Creation: April 1996 +Version: 1.26 +Description: TnSrv implement a (very basic) Telnet server (daemon) + Compatible with both Delphi 1 and Delphi 2 + Uses TWSocket to communicate with WinSock +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 18, 1996 Added resize event and about box +Mar 19, 1997 V1.10 Use enhanced TWSocket object +Jul 22, 1997 V1.20 Adapted to Delphi 3 +Sep 27, 1997 Adapted for TWSocket converted to support C++Builder +Oct 03, 1997 V1.22 Added a $DEFINE POP3 to simulate a POP3 server + Added an editbox to select the server port +Oct 09, 1997 Added a $DEFINE SMTP to simulate a SMTP server +Oct 11, 1997 V1.23 Added PortNum to client to tell him what he has to serve +Jul 30, 1998 V1.24 Added some code to the dummy SMTP server +Aug 20, 1999 V1.25 Added some comments, added Restartserver procedure. +Sep 26, 2000 V1.26 Replaced TEdit by TMemo for data to be sent to allow + multi-line sending (see TnSrv2 source). + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnSrv1; + +{$J+} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, WSocket, WinSock, StdCtrls, TnSrv2; + +const + TnSrvVersion = 126; + +type + { TClient class is used to handle client connections. A TClient is } + { instanciated for each client which connect. } + { TnSrv keep track of all connected clients using Clients variable in } + { TServerForm (see below). } + { TClient class will dynamically create a TClientForm from his } + { constructor. Since TClientForm include a TWSocket, a new TWSocket } + { is also created dynamically and automaticcaly when the form is } + { created. } + TClient = class(TObject) + Form : TClientForm; + Peer : String; + constructor Create(AOwner : TComponent); + destructor Destroy; override; + end; + + TServerForm = class(TForm) + Memo: TMemo; + QuitButton: TButton; + AboutButton: TButton; + SrvSocket: TWSocket; + PortLabel: TLabel; + PortEdit: TEdit; + ChangePortButton: TButton; + procedure FormCreate(Sender: TObject); + procedure Display(Msg : String); + procedure QuitButtonClick(Sender: TObject); + procedure FormActivate(Sender: TObject); + procedure AboutButtonClick(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure SrvSocketSessionAvailable(Sender: TObject; Error: Word); + procedure SrvSocketSessionClosed(Sender: TObject; Error: Word); + procedure ChangePortButtonClick(Sender: TObject); + protected + procedure WMDisconnect(var msg: TMessage); message WM_DISCONNECT; + procedure RestartServer; + public + Clients : TList; { List of all TClient object (one per connection) } + end; + +var + ServerForm: TServerForm; + +implementation + +{$R *.DFM} +{DEFINE Debug} { Add or remove dollar sign before Debug to } + { generate code for debug message output } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DebugString(Msg : String); +const + Cnt : Integer = 0; +{$IFDEF Debug} +var + Buf : String[20]; +{$ENDIF} +begin +{$IFDEF Debug} + Cnt := Cnt + 1; + Buf := IntToHex(Cnt, 4) + ' ' + #0; + OutputDebugString(@Buf[1]); +{$IFDEF WIN32} + OutputDebugString(PChar(Msg)); +{$ELSE} + if Length(Msg) < High(Msg) then + Msg[Length(Msg) + 1] := #0; + + OutputDebugString(@Msg[1]); +{$ENDIF} +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TClient.Create(AOwner : TComponent); +begin + Application.CreateForm(TClientForm, Form); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TClient.Destroy; +begin + Form.Release; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormCreate(Sender: TObject); +begin + Memo.Clear; + Clients := TList.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormActivate(Sender: TObject); +const + FirstTime : Boolean = TRUE; +begin + if FirstTime then begin + FirstTime := FALSE; + RestartServer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.RestartServer; +begin + with SrvSocket do begin + Close; + Addr := '0.0.0.0'; { Use any interface for listening } + Proto := 'tcp'; + Port := PortEdit.Text; + Listen; + end; + Memo.Clear; + Display(PortEdit.Text + ' Server Ready' + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.Display(Msg : String); +var + Start, Stop : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add(''); + + Start := 1; + Stop := Pos(#13, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := Memo.Lines.Strings[Memo.Lines.Count - 1] + Copy(Msg, Start, Stop - Start); + if Msg[Stop] = #13 then begin + Memo.Lines.Add(''); + SendMessage(Memo.Handle, WM_KEYDOWN, VK_UP, 1); + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + if Msg[Start] = #10 then + Start := Start + 1; + Stop := Start; + while (Stop <= Length(Msg)) and (Msg[Stop] <> #13) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.SrvSocketSessionAvailable(Sender: TObject; Error : word); +var + NewHSocket : TSocket; + PeerName : TSockAddrIn; + Client : TClient; +begin + NewHSocket := SrvSocket.Accept; + Client := TClient.Create(Self); + Client.Form.Reference := Client; + Client.Form.PortNum := SrvSocket.PortNum; + Client.Form.AcceptForm := Self; + Client.Form.Socket.Dup(NewHSocket); + Client.Form.Socket.GetPeerName(PeerName, Sizeof(PeerName)); + Client.Peer := StrPas(inet_ntoa(PeerName.Sin_addr)); + Display('Remote ' + Client.Peer + ' connected' + #13 + #10); + Client.Form.Caption := Client.Peer; + Client.Form.Show; + Clients.Add(Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.WMDisconnect(var msg: TMessage); +var + Client : TClient; + Why : String; +begin + case msg.wParam of + DISCONNECT_SELF : Why := 'has been disconnected'; + DISCONNECT_REMOTE : Why := 'has closed the connection'; + else Why := 'disconnected'; + end; + + Client := TCLient(msg.lParam); + Display('Remote ' + Client.Peer + ' ' + Why + #13 + #10); + Client.Form.Socket.Shutdown(2); + Client.Form.Socket.Close; + Client.Form.Visible := FALSE; + Client.Form.Release; + Clients.Remove(Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.SrvSocketSessionClosed(Sender: TObject; Error : word); +begin + Display(#13 + #10 + '*** Remote has closed ***' + #13 + #10); + if SrvSocket.State = wsOpened then + SrvSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.QuitButtonClick(Sender: TObject); +begin + SrvSocket.Close; + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.AboutButtonClick(Sender: TObject); +var + Buf : String; +begin + Buf := 'TnSRV V' + + IntToStr(TnSrvVersion div 100) + '.' + + IntToStr(TnSrvVersion mod 100) + ' ' + +{$IFDEF WIN32} + '32 bit' + +{$ELSE} + '16 bit' + +{$ENDIF} + ' Created march 19, 1997' + #10 + #10 + + 'Free Software, Copyright Franois Piette' + #10 + #10 + + 'francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette' + #0; + Application.MessageBox(@Buf[1], 'About TnSrv', MB_OK); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Adjust the position for each control in the form as the user resize it *} +procedure TServerForm.FormResize(Sender: TObject); +begin + Memo.Height := ClientHeight - QuitButton.Height - 20; + QuitButton.Left := ClientWidth - QuitButton.Width - 10; + AboutButton.Left := QuitButton.Left - AboutButton.Width - 10; + QuitButton.Top := ClientHeight - QuitButton.Height - 10; + AboutButton.Top := QuitButton.Top; + ChangePortButton.Top := QuitButton.Top; + PortEdit.Top := QuitButton.Top; + PortLabel.Top := QuitButton.Top + 4; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.ChangePortButtonClick(Sender: TObject); +begin + RestartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/tnsrv2.dfm b/lib/Delphi/Internet/tnsrv2.dfm new file mode 100644 index 00000000..5bd553a8 Binary files /dev/null and b/lib/Delphi/Internet/tnsrv2.dfm differ diff --git a/lib/Delphi/Internet/tnsrv2.pas b/lib/Delphi/Internet/tnsrv2.pas new file mode 100644 index 00000000..9ba59a85 --- /dev/null +++ b/lib/Delphi/Internet/tnsrv2.pas @@ -0,0 +1,544 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TnSrv implement a (very basic) Telnet server (daemon) + Compatible with both Delphi 1 and Delphi 2 + Uses TWSocket to communicate with WinSock +Creation: April 1996 +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +Updates: +Sep 18, 1996 Accept CR/LF or LF only as line terminator + Implement Help and Exit commands as demo +Mar 19, 1997 Use enhanced TWSocket object +Oct 03, 1997 V1.22 Added a $DEFINE POP3 to simulate a POP3 server +Oct 09, 1997 Added a $DEFINE SMTP to simulate a SMTP server +Oct 11, 1997 Added PortNum to specify which port we serve + Added pseudo POP3 and SMTP interpreters (nothing really happens + except transmission of pseudo correct answers. I use this + feature to debug SMTP and POP3 components). +Jul 30, 1998 V1.24 Added some code to the dummy SMTP server +Sep 26, 2000 V1.26 Replaced TEdit by TMemo for data to be sent to allow + multi-line sending. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnSrv2; + + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, WSocket, Winsock, ExtCtrls; + +const + SMTP_PORT = 25; + POP3_PORT = 110; + + { The message WM_DISCONNECT is used by the client form to tell the server } + { form that the client has disconnected or should be disconnected. } + WM_DISCONNECT = WM_USER + 2; + DISCONNECT_SELF = 1; { Client form ask to disconnect } + DISCONNECT_REMOTE = 2; { Client user (remote) has disconnected } + +type + { A new TClientForm will be instanciated for each new client connection. } + { Instanciation is done from TClient constructor. } + TClientForm = class(TForm) + Memo: TMemo; + Socket: TWSocket; + Panel1: TPanel; + Button1: TButton; + SendButton: TButton; + DisconnectButton: TButton; + DataMemo: TMemo; + procedure FormCreate(Sender: TObject); + procedure Display(Msg : String); + procedure FormDestroy(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure SocketDataAvailable(Sender: TObject; Error: Word); + procedure SocketSessionClosed(Sender: TObject; Error: Word); + procedure Button1Click(Sender: TObject); + private + FCommand : String; + FRcvdCR : Boolean; + FDataFlag : Boolean; + procedure ProcessChar(Ch : Char); + procedure CommandInterpreter; + procedure SMTP_Interpreter(CommandVerb : String; CommandTail : String); + procedure POP3_Interpreter(CommandVerb : String; CommandTail : String); + procedure TELNET_Interpreter(CommandVerb : String; CommandTail : String); + public + AcceptForm : TForm; + Reference : Pointer; + PortNum : Integer; + end; + +var + ClientForm: TClientForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +procedure SetLength(var Str : String; Len : Integer); +begin + Str[0] := chr(Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] >= '0') and (Value[i] <= '9')do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormCreate(Sender: TObject); +begin + Memo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure display text in a memo control. } +{ I should add code to remove lines when there are too much of them... } +procedure TClientForm.Display(Msg : String); +var + Start, Stop : Integer; + SelStart : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add('') + else if Memo.Lines.Count > 200 then + Memo.Clear; + + Start := 1; + Stop := Pos(#13, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := Memo.Lines.Strings[Memo.Lines.Count - 1] + Copy(Msg, Start, Stop - Start); + if (Stop <= Length(Msg)) and (Msg[Stop] = #13) then begin + SelStart := Memo.SelStart; + Memo.Lines.Add(''); + Memo.SelStart := SelStart + 2; + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + if Msg[Start] = #10 then + Start := Start + 1; + Stop := Start; + while (Stop <= Length(Msg)) and (Msg[Stop] <> #13) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Not a real SMTP command interpreter, just enough for me to test my SMTP } +{ component. } +procedure TClientForm.SMTP_Interpreter( + CommandVerb : String; + CommandTail : String); +var + Response : String; +begin + if FDataFlag then begin + { We should add storage here of course... } + { SMTP data ends with a line having being a single dot } + if FCommand = '.' then begin + Response := '250 Data received ok'; + Socket.SendStr(Response + #13 + #10); + FDataFlag := FALSE; + end; + end + else begin + FDataFlag := FALSE; + if CommandVerb = 'MAIL' then + Response := '250 Ok' + else if CommandVerb = 'RCPT' then + Response := '250 Ok' + else if CommandVerb = 'DATA' then begin + Response := '354 Send data now'; + FDataFlag := TRUE; + end + else if CommandVerb = 'HELO' then + Response := '250 Ok' + else if CommandVerb = 'QUIT' then + Response := '221 Goodbye' + else + Response := '500 syntax error'; + + Socket.SendStr(Response + #13 + #10); + if CommandVerb = 'QUIT' then + Socket.Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Not a real POP3 command interpreter, just enough for me to test my POP3 } +{ component. } +procedure TClientForm.POP3_Interpreter( + CommandVerb : String; + CommandTail : String); +var + Response : String; +begin + if CommandVerb = 'USER' then + Response := '+OK' + else if CommandVerb = 'PASS' then + Response := '+OK' + else if CommandVerb = 'RETR' then begin + Socket.SendStr('+OK' + #13 + #10); + Socket.SendStr('This is the message body.' + #13 + #10); + Socket.SendStr('This is the last message line.' + #13 + #10); + Response := '.' + end + else if CommandVerb = 'LIST' then begin + if Trim(CommandTail) = '' then begin + Socket.SendStr('+OK 2 messages (320 octets)' + #13 + #10); + Socket.SendStr('1 120' + #13 + #10); + Socket.SendStr('2 200' + #13 + #10); + Response := '.' + end + else + Response := '+OK ' + CommandTail + ' 200' + end + else if CommandVerb = 'STAT' then + Response := '+OK 10 12345' + else if CommandVerb = 'QUIT' then + Response := '+OK' + else if CommandVerb = 'TOP' then begin + if atoi(CommandTail) <= 0 then + Response := '-ERR Message doesn''t exists' + else begin + Socket.SendStr('+OK' + #13 + #10); + Socket.SendStr('This is the message body.' + #13 + #10); + Socket.SendStr('This is the last message line.' + #13 + #10); + Response := '.' + end; + end + else if CommandVerb = 'RPOP' then + Response := '+OK' + else if CommandVerb = 'APOP' then + Response := '+OK' + else if CommandVerb = 'DELE' then + Response := '+OK' + else if CommandVerb = 'LAST' then + Response := '+OK 1' + else if CommandVerb = 'NOOP' then + Response := '+OK' + else if CommandVerb = 'UIDL' then + Response := '+OK ' + Trim(CommandTail) + ' Msg' + Trim(CommandTail) + else if CommandVerb = 'RSET' then + Response := '+OK' + else + Response := '-ERR'; + + Socket.SendStr(Response + #13 + #10); + if CommandVerb = 'QUIT' then + Socket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Not a real TELNET command interpreter, just enough to see how it could } +{ be implemented. } +procedure TClientForm.TELNET_Interpreter( + CommandVerb : String; + CommandTail : String); +begin + Socket.SendStr(#13 + #10 + 'Executing command ''' + CommandVerb + '''...' + + #13 + #10); + + if CommandVerb = 'EXIT' then + DisconnectButtonClick(Self) + else if CommandVerb = 'HELP' then + Socket.SendStr('List of commands:' + #13 + #10 + + ' Exit logoff from server' + #13 + #10 + + ' Help show this help screen' + #13 + #10) + else + Socket.SendStr('Unknown command, ignoring'); + + Socket.SendStr(#13 + #10 + '--> '); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the command line interpreter. Should extend the code to support } +{ every command needed... } +procedure TClientForm.CommandInterpreter; +var + CommandVerb : String; + CommandTail : String; + I, J : Integer; +begin + CommandVerb := FCommand; + + { Skip leading spaces } + I := 1; + while (I <= Length(CommandVerb)) and (CommandVerb[I] in [' ', #9]) do + Inc(I); + + { Find separator and separe CommandVerb and CommandTail } + J := I; + while TRUE do begin + if (J >= Length(CommandVerb)) then begin + CommandTail := ''; + break; + end; + + if CommandVerb[J] in [' ', #9, '/'] then begin + CommandTail := Copy(CommandVerb, J, Length(CommandVerb) - J + 1); + CommandVerb := Copy(CommandVerb, I, J - I); + break; + end; + Inc(J); + end; + CommandVerb := UpperCase(CommandVerb); + + if PortNum = SMTP_PORT then + SMTP_Interpreter(CommandVerb, CommandTail) + else if PortNum = POP3_PORT then + POP3_Interpreter(CommandVerb, CommandTail) + else + TELNET_Interpreter(CommandVerb, CommandTail); + + FCommand := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Process each charcter received to do minimal line editing } +procedure TClientForm.ProcessChar(Ch : Char); +begin + if Ch = #8 then begin + if Length(FCommand) > 0 then begin + SetLength(FCommand, Length(FCommand) - 1); + Socket.SendStr(#8 + ' ' + #8); + end + else + Socket.SendStr(#7); + Exit; + end + else if (Ch = #10) and FRcvdCR then begin + { Ignore LF just after CR (CR/LF is normal end of line) } + FRcvdCR := FALSE; + Exit; + end + else if Ch = #13 then begin + FRcvdCR := TRUE; + CommandInterpreter; + Exit; + end + else if Ch = #10 then begin + CommandInterpreter; + Exit; + end; + + { Ordinary character, put in buffer in some place left } +{$IFNDEF WIN32} + if Length(FCommand) = High(FCommand) then + Ch := #7 + else +{$ENDIF} + FCommand := FCommand + Ch; + + if (PortNum <> POP3_PORT) and (PortNum <> SMTP_PORT) then begin + { Echo to client } + Socket.Send(@Ch, 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Event handler for datavailable. Called each time some data is received *} +procedure TClientForm.SocketDataAvailable(Sender: TObject; Error : word); +var + Len : Integer; + Buffer : String[255]; + Socket : TWSocket; + I : Integer; +begin + Socket := Sender as TWSocket; + Len := Socket.Receive(@Buffer[1], High(Buffer)); + if Len = 0 then begin + { Remote has closed } + Display(#13 + #10 + '**** Remote has closed ****' + #13 + #10); + end + else if Len < 0 then begin + { An error has occured } + if Socket.LastError <> WSAEWOULDBLOCK then + Display(#13 + #10 + '**** ERROR: ' + IntToStr(Socket.LastError) + + ' ****' + #13 + #10); + end + else begin + Buffer[0] := chr(Len); + Display(Buffer); + for I := 1 to Len do + ProcessChar(Buffer[I]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Event handler called when the remote has closed the connection *} +procedure TClientForm.SocketSessionClosed(Sender: TObject; Error : word); +begin + Display(#13 + #10 + '**** Remote has closed ****' + #13 + #10); + PostMessage(AcceptForm.Handle, WM_DISCONNECT, + DISCONNECT_REMOTE, + LongInt(Reference)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormDestroy(Sender: TObject); +begin + Socket.Shutdown(2); + Socket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.DisconnectButtonClick(Sender: TObject); +begin + { Post a message to server form asking to disconnect the client } + PostMessage(AcceptForm.Handle, WM_DISCONNECT, + DISCONNECT_SELF, + LongInt(Reference)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormShow(Sender: TObject); +var + Buf : String; +begin + DataMemo.Text := ''; + ActiveControl := DataMemo; + + if PortNum = POP3_PORT then + Buf := '+OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>' + #13 + #10 + else if PortNum = SMTP_PORT then begin + Buf := '220-SMTP Simulator ready' + #13 + #10; + Socket.Send(@Buf[1], Length(Buf)); + Buf := '220 ESMTP spoken here' + #13 + #10; + end + else + Buf := 'Hello from TnSrv !' + #13 + #10 + '--> '; + + Socket.Send(@Buf[1], Length(Buf)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.SendButtonClick(Sender: TObject); +var + Buf : String; +begin + Buf := DataMemo.Text + #13 + #10; + Socket.Send(@Buf[1], Length(Buf)); + DataMemo.Text := ''; + ActiveControl := DataMemo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Adjust the position for each control in the form as the user resize it *} +procedure TClientForm.FormResize(Sender: TObject); +begin +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.Button1Click(Sender: TObject); +begin + Socket.SendStr('Hello !'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/twschat.dpr b/lib/Delphi/Internet/twschat.dpr new file mode 100644 index 00000000..fb4b6088 --- /dev/null +++ b/lib/Delphi/Internet/twschat.dpr @@ -0,0 +1,12 @@ +program twschat; + +uses + Forms, + TWSChat1 in 'TWSChat1.pas' {TWSChatForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTWSChatForm, TWSChatForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/twschat1.dfm b/lib/Delphi/Internet/twschat1.dfm new file mode 100644 index 00000000..73dd6f92 Binary files /dev/null and b/lib/Delphi/Internet/twschat1.dfm differ diff --git a/lib/Delphi/Internet/twschat1.pas b/lib/Delphi/Internet/twschat1.pas new file mode 100644 index 00000000..e9818d3a --- /dev/null +++ b/lib/Delphi/Internet/twschat1.pas @@ -0,0 +1,332 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TWSChat shows how to use TWSocket to build a chat program +Creation: November 26, 1997 +Version: 1.03 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Jan 04, 1998 V1.01 Corrected a bug in the CliWSocketDataAvailable which did'nt + append data to the receive buffer. +Jan 10, 1998 V1.02 Corrected yet another bug in CliWSocketDataAvailable which + did'nt take into account that variable I is zero based. +Mar 15, 1998 V1.03 Yet another bug in OnDataAvailable event. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TWSChat1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, WinSock, WSocket; + +const + TWSChatVersion = 103; + ChatPort = '2200'; { Any port would do the job... } + +type + TTWSChatForm = class(TForm) + Panel1: TPanel; + Panel2: TPanel; + DisplayMemo: TMemo; + SrvWSocket: TWSocket; + ServerEdit: TEdit; + Label1: TLabel; + ConnectButton: TButton; + CliWSocket: TWSocket; + DisconnectButton: TButton; + MessageEdit: TEdit; + SendButton: TButton; + TmpWSocket: TWSocket; + RunningRadioButton: TRadioButton; + StoppedRadioButton: TRadioButton; + procedure FormShow(Sender: TObject); + procedure ConnectButtonClick(Sender: TObject); + procedure CliWSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure CliWSocketSessionConnected(Sender: TObject; Error: Word); + procedure DisconnectButtonClick(Sender: TObject); + procedure SrvWSocketSessionAvailable(Sender: TObject; Error: Word); + procedure CliWSocketSessionClosed(Sender: TObject; Error: Word); + procedure CliWSocketDataAvailable(Sender: TObject; Error: Word); + procedure SendButtonClick(Sender: TObject); + procedure StoppedRadioButtonClick(Sender: TObject); + procedure RunningRadioButtonClick(Sender: TObject); + private + { Dclarations prives } + Initialized : Boolean; + RcvBuf : array [0..1023] of char; + RcvLen : integer; + procedure StartServer; + public + { Dclarations publiques } + end; + +var + TWSChatForm: TTWSChatForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.StartServer; +begin + { Try to be a server } + SrvWSocket.Port := ChatPort; + SrvWSocket.Proto := 'tcp'; + SrvWSocket.Addr := '0.0.0.0'; + try + SrvWSocket.Listen; + RunningRadioButton.Checked := TRUE; + StoppedRadioButton.Checked := FALSE; + except + on E:ESocketException do begin + { The socket is probably already in use } + RunningRadioButton.Checked := FALSE; + StoppedRadioButton.Checked := TRUE; + if Copy(E.Message, 1, 11) = 'Error 10048' then + DisplayMemo.Lines.Add('TWSChat already running as server') + else + raise; + end + else + raise; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.FormShow(Sender: TObject); +begin + if not Initialized then begin + Initialized := TRUE; + StartServer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The user has clicked on the 'connect' button. We will not connect here, } +{ but start the DNSLookup. We will receive a event when it is complete. } +{ The connection will be made at that later time. } +procedure TTWSChatForm.ConnectButtonClick(Sender: TObject); +begin + ConnectButton.Enabled := FALSE; + DisconnectButton.Enabled := TRUE; + CliWSocket.DnsLookup(ServerEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when the DNS lookup process is finished } +{ successfully or not. If DNS lookud failed, display a message. } +{ If DNS lookup successfull, ask TWSocket to connect the server. } +procedure TTWSChatForm.CliWSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + { DNS Lookup has failed } + DisplayMemo.Lines.Add('Server name unknown'); + ConnectButton.Enabled := TRUE; + DisconnectButton.Enabled := FALSE; + Exit; + end; + + { DNS lookup successfull. Try to see if we are the server and we are } + { trying to connect to ourself. Check loopback address, should also } + { check the local IP address (returned by LocalIPList)... } + if (SrvWSocket.State = wsListening) and + (CliWSocket.DnsResult = '127.0.0.1') then begin + DisplayMemo.Lines.Add('Your are trying to connect to yourself !'); + ConnectButton.Enabled := TRUE; + DisconnectButton.Enabled := FALSE; + Exit; + end; + + { Transfert the IP address from DNSLookup to the TWSocket for connection } + { We could use the hostname for the Addr property, TWSocket will do the } + { DNS lookup for us, but it will block, maybe for a long time if DNS if } + { down. } + CliWSocket.Addr := CliWSocket.DnsResult; + CliWSocket.Port := ChatPort; + CliWSocket.Proto := 'tcp'; + + { The connect method is asynchronous. You get the control back quickly } + { The OnSessionConnected event will be eventually generated when the } + { connection is established. } + CliWSocket.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when the connection is established with } +{ the server. Enable the send button and the message edit box. } +procedure TTWSChatForm.CliWSocketSessionConnected(Sender: TObject; Error: Word); +begin + if Error = WSAECONNREFUSED then + DisplayMemo.Lines.Add('No server available') + else if Error <> 0 then + DisplayMemo.Lines.Add('Can''t connect, error #' + IntToStr(Error)) + else begin + DisplayMemo.Lines.Add('Connected'); + SendButton.Enabled := TRUE; + MessageEdit.Enabled := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is triggered when the client connection is closed, either } +{ by the client himself or by the local user pushing the disconnect button } +procedure TTWSChatForm.CliWSocketSessionClosed(Sender: TObject; Error: Word); +begin + DisconnectButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + if SendButton.Enabled then begin + SendButton.Enabled := FALSE; + MessageEdit.Enabled := FALSE; + DisplayMemo.Lines.Add('Disconnected'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is triggered when data has been received from the client. } +{ A little bit of work here because the data can comes fragmented or in big } +{ chunks with several client lines. So we assemble the data received in a } +{ buffer and check the buffer for complete lines (there can be no complete } +{ line, exactly one complete line, several complete lines and may be an } +{ incomplete line at the end. } +procedure TTWSChatForm.CliWSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I : Integer; +begin + { Receive the data that has arrived, put it after the data already here } + Len := CliWSocket.Receive(@RcvBuf[RcvLen], SizeOf(RcvBuf) - RcvLen - 1); + if Len <= 0 then + Exit; + { Update our conter } + RcvLen := RcvLen + Len; + { Place a null byte at the end of the buffer } + RcvBuf[RcvLen] := #0; + + { Scan the buffer to process each complete line } + while TRUE do begin + { find the terminating line feed } + I := StrScan(@RcvBuf, #10) - RcvBuf; + if I < 0 then + break; { not found, incomplete line, break loop } + { Replace the line feed by a nul char, truncating the line } + RcvBuf[I] := #0; + { Display the truncated line } + DisplayMemo.Lines.Add('Remote> ' + StrPas(RcvBuf)); + { Restore the line feed } + RcvBuf[I] := #10; + { Was it the last line in the buffer ? } + if I >= (RcvLen - 1) then begin + RcvLen := 0; + break; + end; + { Not the last line, move the next one in front of buffer } + Move(RcvBuf[I + 1], RcvBuf, RcvLen - I); + RcvLen := RcvLen - I - 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is triggered when we - as a server - have received a client } +{ connection request. We must accept the connection. Two cases: we are } +{ already busy with another client, or this is the first client connecting. } +procedure TTWSChatForm.SrvWSocketSessionAvailable(Sender: TObject; Error: Word); +begin + if CliWSocket.State = wsConnected then begin + { We are already busy with a client. Use the TmpWSocket to send a } + { busy message to the second client. Display a message to notify } + { the user that someone is trying to contact him. } + TmpWSocket.HSocket := SrvWSocket.Accept; + DisplayMemo.Lines.Add('System> ' + TmpWSocket.GetPeerAddr + + ' is trying to call you'); + TmpWSocket.SendStr('Busy ! Try later...' + #13#10); + TmpWSocket.Close; + Exit; + end; + + { This is our first client trying to connect, we accept } + CliWSocket.HSocket := SrvWSocket.Accept; + ConnectButton.Enabled := FALSE; + DisconnectButton.Enabled := TRUE; + SendButton.Enabled := TRUE; + MessageEdit.Enabled := TRUE; + DisplayMemo.Lines.Add('Connected with ' + CliWSocket.GetPeerAddr); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The user clicked on the disconnect button. } +procedure TTWSChatForm.DisconnectButtonClick(Sender: TObject); +begin + CliWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The user has clicked on the send button. Just send the data in the edit } +{ box and a CRLF pair to make a complete line. } +procedure TTWSChatForm.SendButtonClick(Sender: TObject); +begin + CliWSocket.SendStr(MessageEdit.Text + #13#10); + DisplayMemo.Lines.Add(' Local> ' + MessageEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.StoppedRadioButtonClick(Sender: TObject); +begin + SrvWSocket.Close; + RunningRadioButton.Checked := FALSE; + StoppedRadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.RunningRadioButtonClick(Sender: TObject); +begin + if SrvWSocket.State <> wsListening then + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Internet/udplstn.dpr b/lib/Delphi/Internet/udplstn.dpr new file mode 100644 index 00000000..455e3c7c --- /dev/null +++ b/lib/Delphi/Internet/udplstn.dpr @@ -0,0 +1,12 @@ +program UdpLstn; + +uses + Forms, + UdpLstn1 in 'UdpLstn1.pas' {MainAutoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMainForm, MainForm); + Application.Run; +end. diff --git a/lib/Delphi/Internet/udpsend.dpr b/lib/Delphi/Internet/udpsend.dpr new file mode 100644 index 00000000..547266b2 --- /dev/null +++ b/lib/Delphi/Internet/udpsend.dpr @@ -0,0 +1,12 @@ +program UdpSend; + +uses + Forms, + UdpSend1 in 'UdpSend1.pas' {MainAutoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMainForm, MainForm); + Application.Run; +end. diff --git a/lib/Delphi/Vc/DnsQuery.dcr b/lib/Delphi/Vc/DnsQuery.dcr new file mode 100644 index 00000000..56425e70 Binary files /dev/null and b/lib/Delphi/Vc/DnsQuery.dcr differ diff --git a/lib/Delphi/Vc/FtpSrv.dcr b/lib/Delphi/Vc/FtpSrv.dcr new file mode 100644 index 00000000..8e636858 Binary files /dev/null and b/lib/Delphi/Vc/FtpSrv.dcr differ diff --git a/lib/Delphi/Vc/Pop3Prot.dcr b/lib/Delphi/Vc/Pop3Prot.dcr new file mode 100644 index 00000000..4b41c014 Binary files /dev/null and b/lib/Delphi/Vc/Pop3Prot.dcr differ diff --git a/lib/Delphi/Vc/SmtpProt.dcr b/lib/Delphi/Vc/SmtpProt.dcr new file mode 100644 index 00000000..14fc34ac Binary files /dev/null and b/lib/Delphi/Vc/SmtpProt.dcr differ diff --git a/lib/Delphi/Vc/TNSCRIPT.DCR b/lib/Delphi/Vc/TNSCRIPT.DCR new file mode 100644 index 00000000..3f4d6b81 Binary files /dev/null and b/lib/Delphi/Vc/TNSCRIPT.DCR differ diff --git a/lib/Delphi/Vc/WINSOCK.PAS b/lib/Delphi/Vc/WINSOCK.PAS new file mode 100644 index 00000000..fe5c28a9 --- /dev/null +++ b/lib/Delphi/Vc/WINSOCK.PAS @@ -0,0 +1,634 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE, C.H.R. Citadelle +EMail: francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: July 18, 1996 +Object: Windows 16bit API Interface Unit for Delphi 1.x and + compatible with Borland Delphi 2.x Winsock +Support: Please ask your question in the following newsgroup: + news://forums.borland.com/borland.public.delphi.vcl.components.using +Legal issues: Copyright (C) 1996, 1997, 1998 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 21, 1997 Added $IFDEF to warn Delphi 2 or 3 user that something is wrong + if they use this file. +Dec 13, 1997 Changed winsocket form 'WINSOCK.DLL' to 'WINSOCK' because Win 3.x + like thos have it without extension (don't ask me why !) + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Winsock; + +interface + +{$IFNDEF VER80} + 'This file is for use with Delphi 1 only. Use the Borland provided file' + 'with any other Delphi Version. If you use this file with Delphi 2 or 3' + 'this is probably because your library path is wrong or you have not' + 'restored the directory structure when unzipping the file (you must use' + 'pkunzip option -d to restore the files).' +{$ENDIF} + + +uses WinTypes, WinProcs; + +const + winsocket = 'WINSOCK'; + { If your application can't find winsock.dll on startup, please try to } + { change the preceding line to "winsocket = 'winsock.dll';" } + { Also, try upper or lower case letters. Win 3.x is very capricious ! } + + { Misc constants } + FD_SETSIZE = 64; + + { + Commands for ioctlsocket(), taken from the BSD file fcntl.h. + + Ioctl's have the command encoded in the lower word, + and the size of any in or out parameters in the upper + word. The high 2 bits of the upper word are used + to encode the in/out status of the parameter; for now + we restrict parameters to at most 128 bytes. + 0x20000000 distinguishes new & old ioctl's + } + IOCPARM_MASK = $7f; { parameters must be < 128 bytes } + IOC_VOID = $20000000; { no parameters } + IOC_OUT = $40000000; { copy out parameters } + IOC_IN = $80000000; { copy in parameters } + IOC_INOUT = (IOC_IN + IOC_OUT); + + FIONREAD = $4004667F; { get # bytes to read } + FIONBIO = $8004667E; { set/clear non-blocking i/o } + FIOASYNC = $8004667D; { set/clear async i/o } + + { Socket I/O Controls } + SIOCSHIWAT = $80047300; { set high watermark } + SIOCGHIWAT = $40047301; { set low watermark } + SIOCSLOWAT = $80047302; { set low watermark } + SIOCGLOWAT = $40047303; { get low watermark } + SIOCATMARK = $40047307; { at oob mark? } + + INADDR_ANY = $00000000; + INADDR_LOOPBACK = $7f000001; + INADDR_BROADCAST = $ffffffff; + INADDR_NONE = $ffffffff; + + WSADESCRIPTION_LEN = 256; + WSASYS_STATUS_LEN = 128; + + { Protocols } + IPPROTO_IP = 0; { dummy for IP } + IPPROTO_ICMP = 1; { control message protocol } + IPPROTO_GGP = 2; { gateway^2 (deprecated) } + IPPROTO_TCP = 6; { tcp } + IPPROTO_PUP = 12; { pup } + IPPROTO_UDP = 17; { user datagram protocol } + IPPROTO_IDP = 22; { xns idp } + IPPROTO_ND = 77; { UNOFFICIAL net disk proto } + IPPROTO_RAW = 255; { raw IP packet } + IPPROTO_MAX = 256; + + { Port/socket numbers: network standard functions } + IPPORT_ANY = 0; + IPPORT_ECHO = 7; + IPPORT_DISCARD = 9; + IPPORT_SYSTAT = 11; + IPPORT_DAYTIME = 13; + IPPORT_NETSTAT = 15; + IPPORT_FTP = 21; + IPPORT_TELNET = 23; + IPPORT_SMTP = 25; + IPPORT_TIMESERVER = 37; + IPPORT_NAMESERVER = 42; + IPPORT_WHOIS = 43; + IPPORT_MTP = 57; + + { Port/socket numbers: host specific functions } + IPPORT_TFTP = 69; + IPPORT_RJE = 77; + IPPORT_FINGER = 79; + IPPORT_TTYLINK = 87; + IPPORT_SUPDUP = 95; + + { UNIX TCP sockets } + IPPORT_EXECSERVER = 512; + IPPORT_LOGINSERVER = 513; + IPPORT_CMDSERVER = 514; + IPPORT_EFSSERVER = 520; + + { UNIX UDP sockets } + IPPORT_BIFFUDP = 512; + IPPORT_WHOSERVER = 513; + IPPORT_ROUTESERVER = 520; + + { Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root) } + IPPORT_RESERVED = 1024; + + { Link numbers } + IMPLINK_IP = 155; + IMPLINK_LOWEXPER = 156; + IMPLINK_HIGHEXPER = 158; + + INVALID_SOCKET = $ffff; + SOCKET_ERROR = (-1); + + { Types } + SOCK_STREAM = 1; { stream socket } + SOCK_DGRAM = 2; { datagram socket } + SOCK_RAW = 3; { raw-protocol interface } + SOCK_RDM = 4; { reliably-delivered message } + SOCK_SEQPACKET = 5; { sequenced packet stream } + + { Option flags per-socket } + SO_DEBUG = $0001; { turn on debugging info recording } + SO_ACCEPTCONN = $0002; { socket has had listen() } + SO_REUSEADDR = $0004; { allow local address reuse } + SO_KEEPALIVE = $0008; { keep connections alive } + SO_DONTROUTE = $0010; { just use interface addresses } + SO_BROADCAST = $0020; { permit sending of broadcast msgs } + SO_USELOOPBACK = $0040; { bypass hardware when possible } + SO_LINGER = $0080; { linger on close if data present } + SO_OOBINLINE = $0100; { leave received OOB data in line } + SO_DONTLINGER = (not SO_LINGER); + + { Additional options } + SO_SNDBUF = $1001; { send buffer size } + SO_RCVBUF = $1002; { receive buffer size } + SO_SNDLOWAT = $1003; { send low-water mark } + SO_RCVLOWAT = $1004; { receive low-water mark } + SO_SNDTIMEO = $1005; { send timeout } + SO_RCVTIMEO = $1006; { receive timeout } + SO_ERROR = $1007; { get error status and clear } + SO_TYPE = $1008; { get socket type } + + + { TCP options } + TCP_NODELAY = $0001; + + { Address families } + AF_UNSPEC = 0; { unspecified } + AF_UNIX = 1; { local to host (pipes, portals) } + AF_INET = 2; { internetwork: UDP, TCP, etc. } + AF_IMPLINK = 3; { arpanet imp addresses } + AF_PUP = 4; { pup protocols: e.g. BSP } + AF_CHAOS = 5; { mit CHAOS protocols } + AF_NS = 6; { XEROX NS protocols } + AF_ISO = 7; { ISO protocols } + AF_OSI = AF_ISO; { OSI is ISO } + AF_ECMA = 8; { european computer manufacturers } + AF_DATAKIT = 9; { datakit protocols } + AF_CCITT = 10; { CCITT protocols, X.25 etc } + AF_SNA = 11; { IBM SNA } + AF_DECnet = 12; { DECnet } + AF_DLI = 13; { Direct data link interface } + AF_LAT = 14; { LAT } + AF_HYLINK = 15; { NSC Hyperchannel } + AF_APPLETALK = 16; { AppleTalk } + AF_NETBIOS = 17; { NetBios-style addresses } + AF_MAX = 18; + + { Protocol families, same as address families for now } + PF_UNSPEC = AF_UNSPEC; + PF_UNIX = AF_UNIX; + PF_INET = AF_INET; + PF_IMPLINK = AF_IMPLINK; + PF_PUP = AF_PUP; + PF_CHAOS = AF_CHAOS; + PF_NS = AF_NS; + PF_ISO = AF_ISO; + PF_OSI = AF_OSI; + PF_ECMA = AF_ECMA; + PF_DATAKIT = AF_DATAKIT; + PF_CCITT = AF_CCITT; + PF_SNA = AF_SNA; + PF_DECnet = AF_DECnet; + PF_DLI = AF_DLI; + PF_LAT = AF_LAT; + PF_HYLINK = AF_HYLINK; + PF_APPLETALK = AF_APPLETALK; + PF_MAX = AF_MAX; + + { Level number for (get/set)sockopt() to apply to socket itself } + SOL_SOCKET = -1; { options for socket level } + + { Maximum queue length specifiable by listen } + SOMAXCONN = 5; + + MSG_OOB = 1; { process out-of-band data } + MSG_PEEK = 2; { peek at incoming message } + MSG_DONTROUTE = 4; { send without using routing tables } + + MSG_MAXIOVLEN = 16; + + { Define constant based on rfc883, used by gethostbyxxxx() calls } + MAXGETHOSTSTRUCT = 1024; + + { Define flags to be used with the WSAAsyncSelect() call } + FD_READ = 1; + FD_WRITE = 2; + FD_OOB = 4; + FD_ACCEPT = 8; + FD_CONNECT = 16; + FD_CLOSE = 32; + + { All Windows Sockets error constants are biased by WSABASEERR fromthe normal } + WSABASEERR = 10000; + + { Windows Sockets definitions of regular Microsoft C error constants } + WSAEINTR = (WSABASEERR+4); + WSAEBADF = (WSABASEERR+9); + WSAEACCES = (WSABASEERR+13); + WSAEFAULT = (WSABASEERR+14); + WSAEINVAL = (WSABASEERR+22); + WSAEMFILE = (WSABASEERR+24); + + { Windows Sockets definitions of regular Berkeley error constants } + WSAEWOULDBLOCK = (WSABASEERR+35); + WSAEINPROGRESS = (WSABASEERR+36); + WSAEALREADY = (WSABASEERR+37); + WSAENOTSOCK = (WSABASEERR+38); + WSAEDESTADDRREQ = (WSABASEERR+39); + WSAEMSGSIZE = (WSABASEERR+40); + WSAEPROTOTYPE = (WSABASEERR+41); + WSAENOPROTOOPT = (WSABASEERR+42); + WSAEPROTONOSUPPORT = (WSABASEERR+43); + WSAESOCKTNOSUPPORT = (WSABASEERR+44); + WSAEOPNOTSUPP = (WSABASEERR+45); + WSAEPFNOSUPPORT = (WSABASEERR+46); + WSAEAFNOSUPPORT = (WSABASEERR+47); + WSAEADDRINUSE = (WSABASEERR+48); + WSAEADDRNOTAVAIL = (WSABASEERR+49); + WSAENETDOWN = (WSABASEERR+50); + WSAENETUNREACH = (WSABASEERR+51); + WSAENETRESET = (WSABASEERR+52); + WSAECONNABORTED = (WSABASEERR+53); + WSAECONNRESET = (WSABASEERR+54); + WSAENOBUFS = (WSABASEERR+55); + WSAEISCONN = (WSABASEERR+56); + WSAENOTCONN = (WSABASEERR+57); + WSAESHUTDOWN = (WSABASEERR+58); + WSAETOOMANYREFS = (WSABASEERR+59); + WSAETIMEDOUT = (WSABASEERR+60); + WSAECONNREFUSED = (WSABASEERR+61); + WSAELOOP = (WSABASEERR+62); + WSAENAMETOOLONG = (WSABASEERR+63); + WSAEHOSTDOWN = (WSABASEERR+64); + WSAEHOSTUNREACH = (WSABASEERR+65); + WSAENOTEMPTY = (WSABASEERR+66); + WSAEPROCLIM = (WSABASEERR+67); + WSAEUSERS = (WSABASEERR+68); + WSAEDQUOT = (WSABASEERR+69); + WSAESTALE = (WSABASEERR+70); + WSAEREMOTE = (WSABASEERR+71); + + { Extended Windows Sockets error constant definitions } + WSASYSNOTREADY = (WSABASEERR+91); + WSAVERNOTSUPPORTED = (WSABASEERR+92); + WSANOTINITIALISED = (WSABASEERR+93); + + { Authoritative Answer: Host not found } + WSAHOST_NOT_FOUND = (WSABASEERR+1001); + HOST_NOT_FOUND = WSAHOST_NOT_FOUND; + +{ Non-Authoritative: Host not found, or SERVERFAIL } + WSATRY_AGAIN = (WSABASEERR+1002); + TRY_AGAIN = WSATRY_AGAIN; + +{ Non recoverable errors, FORMERR, REFUSED, NOTIMP } + WSANO_RECOVERY = (WSABASEERR+1003); + NO_RECOVERY = WSANO_RECOVERY; + +{ Valid name, no data record of requested type } + WSANO_DATA = (WSABASEERR+1004); + NO_DATA = WSANO_DATA; + +{ no address, look for MX record } + WSANO_ADDRESS = WSANO_DATA; + NO_ADDRESS = WSANO_ADDRESS; + +{ Windows Sockets errors redefined as regular Berkeley error constants } + EWOULDBLOCK = WSAEWOULDBLOCK; + EINPROGRESS = WSAEINPROGRESS; + EALREADY = WSAEALREADY; + ENOTSOCK = WSAENOTSOCK; + EDESTADDRREQ = WSAEDESTADDRREQ; + EMSGSIZE = WSAEMSGSIZE; + EPROTOTYPE = WSAEPROTOTYPE; + ENOPROTOOPT = WSAENOPROTOOPT; + EPROTONOSUPPORT = WSAEPROTONOSUPPORT; + ESOCKTNOSUPPORT = WSAESOCKTNOSUPPORT; + EOPNOTSUPP = WSAEOPNOTSUPP; + EPFNOSUPPORT = WSAEPFNOSUPPORT; + EAFNOSUPPORT = WSAEAFNOSUPPORT; + EADDRINUSE = WSAEADDRINUSE; + EADDRNOTAVAIL = WSAEADDRNOTAVAIL; + ENETDOWN = WSAENETDOWN; + ENETUNREACH = WSAENETUNREACH; + ENETRESET = WSAENETRESET; + ECONNABORTED = WSAECONNABORTED; + ECONNRESET = WSAECONNRESET; + ENOBUFS = WSAENOBUFS; + EISCONN = WSAEISCONN; + ENOTCONN = WSAENOTCONN; + ESHUTDOWN = WSAESHUTDOWN; + ETOOMANYREFS = WSAETOOMANYREFS; + ETIMEDOUT = WSAETIMEDOUT; + ECONNREFUSED = WSAECONNREFUSED; + ELOOP = WSAELOOP; + ENAMETOOLONG = WSAENAMETOOLONG; + EHOSTDOWN = WSAEHOSTDOWN; + EHOSTUNREACH = WSAEHOSTUNREACH; + ENOTEMPTY = WSAENOTEMPTY; + EPROCLIM = WSAEPROCLIM; + EUSERS = WSAEUSERS; + EDQUOT = WSAEDQUOT; + ESTALE = WSAESTALE; + EREMOTE = WSAEREMOTE; + +type + { Basic system type definitions, taken from the BSD file sys/types.h. } + u_char = byte; + u_short = word; + u_int = word; + u_long = longint; + short = word; + + { low level handle wich refer to sockets } + TSocket = u_int; + + { Select uses arrays of SOCKETs. } + TFDSet = packed record + fd_count : u_short; + fd_array : array [0..(FD_SETSIZE - 1)] of TSocket; + end; + PFDSet = ^TFDSet; + + { Structure used in select() call, taken from the BSD file sys/time.h. } + TTimeVal = packed record + tv_sec : longint; + tv_usec : longint; + end; + PTimeVal = ^TTimeVal; + + { Structures returned by network data base library, taken from the + BSD file netdb.h. All addresses are supplied in host order, and + returned in network order (suitable for use in system calls). } + + HostEnt = record + h_name : PChar; { official name of host } + h_aliases : ^PChar; { alias list } + h_addrtype : short; { host address type } + h_length : short; { length of address } + h_addr_list : ^PChar; { list of addresses } + end; + PHostEnt = ^HostEnt; + + NetEnt = record + n_name : PChar; { official name of net } + n_aliases : ^PChar; { alias list } + n_addrtype : short; { net address type } + n_net : u_long; { network # } + end; + PNetEnt = ^NetEnt; + + ServEnt = record + s_name : PChar; { official service name } + s_aliases : ^PChar; { alias list } + s_port : integer; { port # } + s_proto : PChar; { protocol to use } + end; + PServEnt = ^ServEnt; + + Protoent = record + p_name : PChar; { official protocol name } + p_aliases : ^PChar; { alias list } + p_proto : integer; { protocol # } + end; + Pprotoent = ^protoent; + + { Internet address (old style... should be updated) } + SunB = packed record + s_b1, s_b2, s_b3, s_b4: u_char; + end; + + SunW = packed record + s_w1, s_w2: u_short; + end; + + TInAddr = packed record + case integer of + 0: (S_un_b: SunB); + 1: (S_un_w: SunW); + 2: (S_addr: u_long); + end; + PInAddr = ^TInAddr; + + { Socket address, internet style. } + TSockAddrIn = packed record + case integer of + 0: (sin_family : u_short; + sin_port : u_short; + sin_addr : TInAddr; + sin_zero : array[0..7] of char); + 1: (sa_family: u_short; + sa_data: array [0..13] of char); + end; + PSockAddrIn = ^TSockAddrIn; + TSockAddr = TSockAddrIn; + + PWSADATA = ^TWSADATA; + TWSADATA = packed record + wVersion : word; + wHighVersion : word; + szDescription : array [0..WSADESCRIPTION_LEN] of char; + szSystemStatus : array [0..WSASYS_STATUS_LEN] of char; + iMaxSockets : u_short; + iMaxUdpDg : u_short; + lpVendorInfo : PChar; + end; + + { Structure used by kernel to pass protocol information in raw sockets. } + TSockProto = packed record + sp_family : u_short; + sp_protocol : u_short; + end; + + { Structure used for manipulating linger option. } + TLinger = packed record + l_onoff : u_short; + l_linger : u_short; + end; + +{ Socket function prototypes } + +function accept(s: TSocket; var addr: TSockAddr; var addrlen: Integer): TSocket; +function bind(s: TSocket; var addr: TSockAddr; namelen: Integer): Integer; +function closesocket(s: TSocket): Integer; +function connect(s: TSocket; var name: TSockAddr; namelen: Integer): Integer; +function ioctlsocket(s: TSocket; cmd: Longint; var arg: u_long): Integer; +function getpeername(s: TSocket; var name: TSockAddr; var namelen: Integer): Integer; +function getsockname(s: TSocket; var name: TSockAddr; var namelen: Integer): Integer; +function getsockopt(s: TSocket; level, optname: Integer; optval: PChar; var optlen: Integer): Integer; +function htonl(hostlong: u_long): u_long; +function htons(hostshort: u_short): u_short; +function inet_addr(cp: PChar): u_long; +function inet_ntoa(inaddr: TInAddr): PChar; +function listen(s: TSocket; backlog: Integer): Integer; +function ntohl(netlong: u_long): u_long; +function ntohs(netshort: u_short): u_short; +function recv(s: TSocket; var Buf; len, flags: Integer): Integer; +function recvfrom(s: TSocket; var Buf; len, flags: Integer; + var from: TSockAddr; var fromlen: Integer): Integer; +function select(nfds: Integer; readfds, writefds, exceptfds: PFDSet; + timeout: PTimeVal): Longint; +function send(s: TSocket; var Buf; len, flags: Integer): Integer; +function sendto(s: TSocket; var Buf; len, flags: Integer; var addrto: TSockAddr; + tolen: Integer): Integer; +function setsockopt(s: TSocket; level, optname: Integer; optval: PChar; + optlen: Integer): Integer; +function shutdown(s: TSocket; how: Integer): Integer; +function socket(af, struct, protocol: Integer): TSocket; +function gethostbyaddr(addr: Pointer; len, struct: Integer): PHostEnt; +function gethostbyname(name: PChar): PHostEnt; +function gethostname(name: PChar; len: Integer): Integer; +function getservbyport(port: Integer; proto: PChar): PServEnt; +function getservbyname(name, proto: PChar): PServEnt; +function getprotobynumber(proto: Integer): PProtoEnt; +function getprotobyname(name: PChar): PProtoEnt; +function WSAStartup(wVersionRequired: word; var WSData: TWSAData): Integer; +function WSACleanup: Integer; +procedure WSASetLastError(iError: Integer); +function WSAGetLastError: Integer; +function WSAIsBlocking: BOOL; +function WSAUnhookBlockingHook: Integer; +function WSASetBlockingHook(lpBlockFunc: TFarProc): TFarProc; +function WSACancelBlockingCall: Integer; +function WSAAsyncGetServByName(HWindow: HWND; wMsg: u_int; + name, proto, buf: PChar; buflen: Integer): THandle; +function WSAAsyncGetServByPort( HWindow: HWND; wMsg, port: u_int; + proto, buf: PChar; buflen: Integer): THandle; +function WSAAsyncGetProtoByName(HWindow: HWND; wMsg: u_int; + name, buf: PChar; buflen: Integer): THandle; +function WSAAsyncGetProtoByNumber(HWindow: HWND; wMsg: u_int; number: Integer; + buf: PChar; buflen: Integer): THandle; +function WSAAsyncGetHostByName(HWindow: HWND; wMsg: u_int; + name, buf: PChar; buflen: Integer): THandle; +function WSAAsyncGetHostByAddr(HWindow: HWND; wMsg: u_int; addr: PChar; + len, struct: Integer; buf: PChar; buflen: Integer): THandle; +function WSACancelAsyncRequest(hAsyncTaskHandle: THandle): Integer; +function WSAAsyncSelect(s: TSocket; HWindow: HWND; wMsg: u_int; lEvent: Longint): Integer; +function WSARecvEx(s: TSocket; var buf; len: Integer; var flags: Integer): Integer; +function WSAMakeSyncReply(Buflen, Error: Word): Longint; +function WSAMakeSelectReply(Event, Error: Word): Longint; +function WSAGetAsyncBuflen(Param: Longint): Word; +function WSAGetAsyncError(Param: Longint): Word; +function WSAGetSelectEvent(Param: Longint): Word; +function WSAGetSelectError(Param: Longint): Word; + + +implementation + +function WSAMakeSyncReply; +begin + WSAMakeSyncReply:= MakeLong(Buflen, Error); +end; + +function WSAMakeSelectReply; +begin + WSAMakeSelectReply:= MakeLong(Event, Error); +end; + +function WSAGetAsyncBuflen; +begin + WSAGetAsyncBuflen:= LOWORD(Param); +end; + +function WSAGetAsyncError; +begin + WSAGetAsyncError:= HIWORD(Param); +end; + +function WSAGetSelectEvent; +begin + WSAGetSelectEvent:= LOWORD(Param); +end; + +function WSAGetSelectError; +begin + WSAGetSelectError:= HIWORD(Param); +end; + +function accept; external winsocket name 'accept'; +function bind; external winsocket name 'bind'; +function closesocket; external winsocket name 'closesocket'; +function connect; external winsocket name 'connect'; +function getpeername; external winsocket name 'getpeername'; +function getsockname; external winsocket name 'getsockname'; +function getsockopt; external winsocket name 'getsockopt'; +function htonl; external winsocket name 'htonl'; +function htons; external winsocket name 'htons'; +function inet_addr; external winsocket name 'inet_addr'; +function inet_ntoa; external winsocket name 'inet_ntoa'; +function ioctlsocket; external winsocket name 'ioctlsocket'; +function listen; external winsocket name 'listen'; +function ntohl; external winsocket name 'ntohl'; +function ntohs; external winsocket name 'ntohs'; +function recv; external winsocket name 'recv'; +function recvfrom; external winsocket name 'recvfrom'; +function select; external winsocket name 'select'; +function send; external winsocket name 'send'; +function sendto; external winsocket name 'sendto'; +function setsockopt; external winsocket name 'setsockopt'; +function shutdown; external winsocket name 'shutdown'; +function socket; external winsocket name 'socket'; + +function gethostbyaddr; external winsocket name 'gethostbyaddr'; +function gethostbyname; external winsocket name 'gethostbyname'; +function getprotobyname; external winsocket name 'getprotobyname'; +function getprotobynumber; external winsocket name 'getprotobynumber'; +function getservbyname; external winsocket name 'getservbyname'; +function getservbyport; external winsocket name 'getservbyport'; +function gethostname; external winsocket name 'gethostname'; + +function WSAAsyncSelect; external winsocket name 'WSAAsyncSelect'; +function WSARecvEx; external winsocket name 'WSARecvEx'; +function WSAAsyncGetHostByAddr; external winsocket name 'WSAAsyncGetHostByAddr'; +function WSAAsyncGetHostByName; external winsocket name 'WSAAsyncGetHostByName'; +function WSAAsyncGetProtoByNumber; external winsocket name 'WSAAsyncGetProtoByNumber'; +function WSAAsyncGetprotoByName; external winsocket name 'WSAAsyncGetprotoByName'; +function WSAAsyncGetServByPort; external winsocket name 'WSAAsyncGetServByPort'; +function WSAAsyncGetServByName; external winsocket name 'WSAAsyncGetServByName'; +function WSACancelAsyncRequest; external winsocket name 'WSACancelAsyncRequest'; +function WSASetBlockingHook; external winsocket name 'WSASetBlockingHook'; +function WSAUnhookBlockingHook; external winsocket name 'WSAUnhookBlockingHook'; +function WSAGetLastError; external winsocket name 'WSAGetLastError'; +procedure WSASetLastError; external winsocket name 'WSASetLastError'; +function WSACancelBlockingCall; external winsocket name 'WSACancelBlockingCall'; +function WSAIsBlocking; external winsocket name 'WSAIsBlocking'; +function WSAStartup; external winsocket name 'WSAStartup'; +function WSACleanup; external winsocket name 'WSACleanup'; + +end. + diff --git a/lib/Delphi/Vc/emulvt.dcr b/lib/Delphi/Vc/emulvt.dcr new file mode 100644 index 00000000..b6f27127 Binary files /dev/null and b/lib/Delphi/Vc/emulvt.dcr differ diff --git a/lib/Delphi/Vc/fingcli.dcr b/lib/Delphi/Vc/fingcli.dcr new file mode 100644 index 00000000..8844962c Binary files /dev/null and b/lib/Delphi/Vc/fingcli.dcr differ diff --git a/lib/Delphi/Vc/ftpcli.dcr b/lib/Delphi/Vc/ftpcli.dcr new file mode 100644 index 00000000..09979fd4 Binary files /dev/null and b/lib/Delphi/Vc/ftpcli.dcr differ diff --git a/lib/Delphi/Vc/httpprot.dcr b/lib/Delphi/Vc/httpprot.dcr new file mode 100644 index 00000000..60d9005c Binary files /dev/null and b/lib/Delphi/Vc/httpprot.dcr differ diff --git a/lib/Delphi/Vc/httpsrv.dcr b/lib/Delphi/Vc/httpsrv.dcr new file mode 100644 index 00000000..1018b99f Binary files /dev/null and b/lib/Delphi/Vc/httpsrv.dcr differ diff --git a/lib/Delphi/Vc/mbxfile.dcr b/lib/Delphi/Vc/mbxfile.dcr new file mode 100644 index 00000000..98b63deb Binary files /dev/null and b/lib/Delphi/Vc/mbxfile.dcr differ diff --git a/lib/Delphi/Vc/mimedec.dcr b/lib/Delphi/Vc/mimedec.dcr new file mode 100644 index 00000000..27cfe51e Binary files /dev/null and b/lib/Delphi/Vc/mimedec.dcr differ diff --git a/lib/Delphi/Vc/nntpcli.dcr b/lib/Delphi/Vc/nntpcli.dcr new file mode 100644 index 00000000..5e5113b0 Binary files /dev/null and b/lib/Delphi/Vc/nntpcli.dcr differ diff --git a/lib/Delphi/Vc/tncnx.dcr b/lib/Delphi/Vc/tncnx.dcr new file mode 100644 index 00000000..897c60e7 Binary files /dev/null and b/lib/Delphi/Vc/tncnx.dcr differ diff --git a/lib/Delphi/Vc/tnemulvt.dcr b/lib/Delphi/Vc/tnemulvt.dcr new file mode 100644 index 00000000..6a5efeb6 Binary files /dev/null and b/lib/Delphi/Vc/tnemulvt.dcr differ diff --git a/lib/Delphi/Vc/wait.dcr b/lib/Delphi/Vc/wait.dcr new file mode 100644 index 00000000..ea366f9b Binary files /dev/null and b/lib/Delphi/Vc/wait.dcr differ diff --git a/lib/Delphi/Vc/wsocket.dcr b/lib/Delphi/Vc/wsocket.dcr new file mode 100644 index 00000000..a536b4e9 Binary files /dev/null and b/lib/Delphi/Vc/wsocket.dcr differ diff --git a/lib/Delphi/Vc/wsockets.dcr b/lib/Delphi/Vc/wsockets.dcr new file mode 100644 index 00000000..ee027a85 Binary files /dev/null and b/lib/Delphi/Vc/wsockets.dcr differ diff --git a/lib/Delphi/Vc32/DnsQuery.dcr b/lib/Delphi/Vc32/DnsQuery.dcr new file mode 100644 index 00000000..04b26c73 Binary files /dev/null and b/lib/Delphi/Vc32/DnsQuery.dcr differ diff --git a/lib/Delphi/Vc32/DnsQuery.dcu b/lib/Delphi/Vc32/DnsQuery.dcu new file mode 100644 index 00000000..41f75573 Binary files /dev/null and b/lib/Delphi/Vc32/DnsQuery.dcu differ diff --git a/lib/Delphi/Vc32/DnsQuery.pas b/lib/Delphi/Vc32/DnsQuery.pas new file mode 100644 index 00000000..8afdd967 --- /dev/null +++ b/lib/Delphi/Vc32/DnsQuery.pas @@ -0,0 +1,1046 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Component to query DNS records. + Implement a subset of RFC 1035 (A and MX records). +Creation: January 29, 1999 +Version: 1.03 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Feb 14, 1999 V0.02 Indirectly call winsock functions using wsocket because + wsocket provide runtime dynamic link instead of loadtime link. + This allows a program to use DnsQuery if it discover that winsock + is installed and still run if winsock is not installed. +Feb 24, 1999 V1.00 Added code for reverse lookup (PTR record). +Mar 07, 1999 V1.01 Adapted for Delphi 1 +Aug 20, 1999 V1.02 Revise compile time option. Adapted for BCB4 +Jul 27, 2001 V1.03 Holger Lembke implemented a few new + queries or propreties (QueryAny, LongLatToDMS, Loc2Geo, Loc) + and related data types. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit DnsQuery; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$R-} { Disable range checking } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Winsock, WSocket; + +const + DnsQueryVersion = 102; + CopyRight : String = ' TDnsQuery (c) 1999-2000 F. Piette V1.02 '; + + { Maximum answers (responses) count } + MAX_ANCOUNT = 50; + { Maximum number of MX records taken into account in responses } + MAX_MX_RECORDS = 50; + MAX_A_RECORDS = 50; + MAX_PTR_RECORDS = 10; + + { DNS Classes } + DnsClassIN = 1; { The internet } + DnsClassCS = 2; { The CSNET class (obsolete, used only for examples)} + DnsClassCH = 3; { The CHAOS class } + DnsClassHS = 4; { Hesiod name service } + DnsClassALL = 255; { Any class } + + { Type of query/response a DNS can handle } + DnsQueryA = 1; { A HostAddress } + DnsQueryNS = 2; { NS Authoritative name server } + DnsQueryMD = 3; { MD MailDestination, obsolete, use Mail Exchange } + DnsQueryMF = 4; { MF MailForwarder, obsolete, use Mail Exchange } + DnsQueryCNAME = 5; { CNAME CanonicalName } + DnsQuerySOA = 6; { SOA Start of a Zone of Authority } + DnsQueryMB = 7; { MB MailBox, experimental } + DnsQueryMG = 8; { MG MailGroup, experimental } + DnsQueryMR = 9; { MR MailRename, experimental } + DnsQueryNULL = 10; { NULL Experimental } + DnsQueryWKS = 11; { WKS Well Known Service Description } + DnsQueryPTR = 12; { PTR Domain Name Pointer } + DnsQueryHINFO = 13; { HINFO Host Information } + DnsQueryMINFO = 14; { MINFO Mailbox information } + DnsQueryMX = 15; { MX Mail Exchange } + DnsQueryTXT = 16; { TXT Text Strings } + { !!KAP!! } + DnsQueryRP = 17; + DnsQueryAFSDB = 18; + DnsQueryX25 = 19; + DnsQueryISDN = 20; + DnsQueryRT = 21; + DnsQueryNSAP = 22; + DnsQueryNSAPPTR = 23; + DnsQuerySIG = 24; { see RFC-2065 } + DnsQueryKEY = 25; { see RFC-2065 } + DnsQueryPX = 26; + DnsQueryGPOS = 27; { GPOS has the following format: + GPOS } + DnsQueryAAAA = 28; { see IP6 Address } + DnsQueryLOC = 29; (* see RFC-1876 http://rfc.net/rfc1876.html + LOC ( d1 [m1 [s1]] {"N"|"S"} d2 [m2 [s2]] + {"E"|"W"} alt["m"] [siz["m"] [hp["m"] + [vp["m"]]]] ) + *) + DnsQueryNXT = 30; { see RFC-2065 } + + DnsQuerySRV = 33; { see RFC-2052 } + DnsQueryNAPTR = 35; { see RFC-2168 } + DnsQueryKX = 36; + + { Some additional type only allowed in queries } + DnsQueryAXFR = 252; { Transfer for an entire zone } + DnsQueryMAILB = 253; { Mailbox related records (MB, MG or MR) } + DnsQueryMAILA = 254; { MailAgent, obsolete, use MX instead } + DnsQueryALL = 255; { Request ALL records } + + { Opcode field in query flags } + DnsOpCodeQUERY = 0; + DnsOpCodeIQUERY = 1; + DnsOpCodeSTATUS = 2; + +type + TDnsAnswerNameArray = packed array [0..MAX_ANCOUNT - 1] of String; + TDnsAnswerTypeArray = packed array [0..MAX_ANCOUNT - 1] of Integer; + TDnsAnswerClassArray = packed array [0..MAX_ANCOUNT - 1] of Integer; + TDnsAnswerTTLArray = packed array [0..MAX_ANCOUNT - 1] of LongInt; + TDnsAnswerTagArray = packed array [0..MAX_ANCOUNT - 1] of Integer; + TDnsMXPreferenceArray = packed array [0..MAX_MX_RECORDS - 1] of Integer; + TDnsMXExchangeArray = packed array [0..MAX_MX_RECORDS - 1] of String; + TDnsAddressArray = packed array [0..MAX_A_RECORDS - 1] of TInAddr; + TDnsHostnameArray = packed array [0..MAX_PTR_RECORDS - 1] of String; + + TDnsRequestDoneEvent = procedure (Sender : TObject; Error : WORD) of Object; + TDnsRequestHeader = packed record + ID : WORD; + Flags : WORD; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD; + end; + PDnsRequestHeader = ^TDnsRequestHeader; + + TLOCInfo = packed record { need to be 16 bytes } + version : byte; + size : byte; + horizpre : byte; + vertpre : byte; + latitude : longint; + longitude : longint; + altitude : longint; + end; + PLOCInfo = ^TLOCInfo; + + { Decoded TLOCInfo } + TLogGeo = record + version : byte; + longsize : integer; + latsize : integer; + horizpre : integer; + vertpre : integer; + { Latitude, degree, minutes, seconds, milliseconds } + lad, lam, las, lams : integer; + lahem : char; + { same for Longitude } + lod, lom, los, loms : integer; + lohem : char; + altitude : integer; + end; + + TDnsQuery = class(TComponent) + private + { Dclarations prives } + protected + FWSocket : TWSocket; + FPort : String; + FAddr : String; + FIDCount : WORD; + FQueryBuf : array [0..511] of char; + FQueryLen : Integer; + FResponseBuf : array [0..511] of char; + FResponseLen : Integer; + FResponseID : Integer; + FResponseCode : Integer; + FResponseOpCode : Integer; + FResponseAuthoritative : Boolean; + FResponseTruncation : Boolean; + FResponseRecursionAvailable : Boolean; + FResponseQDCount : Integer; + FResponseANCount : Integer; + FResponseNSCount : Integer; + FResponseARCount : Integer; + FQuestionType : Integer; + FQuestionClass : Integer; + FQuestionName : String; + FAnswerNameArray : TDnsAnswerNameArray; + FAnswerTypeArray : TDnsAnswerTypeArray; + FAnswerClassArray : TDnsAnswerClassArray; + FAnswerTTLArray : TDnsAnswerTTLArray; + FAnswerTagArray : TDnsAnswerTagArray; + FMXRecordCount : Integer; + FMXPreferenceArray : TDnsMXPreferenceArray; { For MX request } + FMXExchangeArray : TDnsMXExchangeArray; { For MX request } + FARecordCount : Integer; + FAddressArray : TDnsAddressArray; { For A request } + FPTRRecordCount : Integer; + FHostnameArray : TDnsHostnameArray; { For PTR request } + FOnRequestDone : TDnsRequestDoneEvent; + + { !!KAP!! } + fLOCInfo : TLOCInfo; + + function GetMXPreference(nIndex : Integer) : Integer; + function GetMXExchange(nIndex : Integer) : String; + function GetAnswerName(nIndex : Integer) : String; + function GetAnswerType(nIndex : Integer) : Integer; + function GetAnswerClass(nIndex : Integer) : Integer; + function GetAnswerTTL(nIndex : Integer) : LongInt; + function GetAnswerTag(nIndex : Integer) : Integer; + function GetAddress(nIndex : Integer) : TInAddr; + function GetHostname(nIndex : Integer) : String; + procedure BuildRequestHeader(Dst : PDnsRequestHeader; + ID : WORD; + OPCode : BYTE; + Recursion : Boolean; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD); virtual; + function BuildQuestionSection(Dst : PChar; + const QName : String; + QType : WORD; + QClass : WORD) : Integer; virtual; + procedure WSocketDataAvailable(Sender: TObject; Error: WORD); virtual; + procedure TriggerRequestDone(Error: WORD); virtual; + function GetResponseBuf : PChar; + procedure SendQuery; + function ExtractName(Base : PChar; + From : PChar; + var Name : String) : PChar; + function DecodeQuestion(Base : PChar; + From : PChar; + var Name : String; + var QType : Integer; + var QClass : Integer) : PChar; + function DecodeAnswer(Base : PChar; + From : PChar; + var Name : String; + var QType : Integer; + var QClass : Integer; + var TTL : LongInt; + var RDataPtr : Pointer; + var RDataLen : Integer) : PChar; + function DecodeMXData(Base : PChar; + From : PChar; + var Preference : Integer; + var Exchange : String) : PChar; + function DecodeAData(Base : PChar; + From : PChar; + var Address : TInAddr) : PChar; + function DecodePTRData(Base : PChar; + From : PChar; + var Hostname : String) : PChar; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure Notification(AComponent: TComponent; operation: TOperation); override; + function MXLookup(Domain : String) : Integer; + function ALookup(Host : String) : Integer; + function PTRLookup(IP : String) : Integer; + { !!KAP!! } + function QueryAny(Host : String; QNumber : Integer) : Integer; + + property ResponseID : Integer read FResponseID; + property ResponseCode : Integer read FResponseCode; + property ResponseOpCode : Integer read FResponseOpCode; + property ResponseAuthoritative : Boolean read FResponseAuthoritative; + property ResponseTruncation : Boolean read FResponseTruncation; + property ResponseRecursionAvailable : Boolean read FResponseRecursionAvailable; + property ResponseQDCount : Integer read FResponseQDCount; + property ResponseANCount : Integer read FResponseANCount; + property ResponseNSCount : Integer read FResponseNSCount; + property ResponseARCount : Integer read FResponseARCount; + property ResponseBuf : PChar read GetResponseBuf; + property ResponseLen : Integer read FResponseLen; + property QuestionType : Integer read FQuestionType; + property QuestionClass : Integer read FQuestionClass; + property QuestionName : String read FQuestionName; + property AnswerName[nIndex : Integer] : String read GetAnswerName; + property AnswerType[nIndex : Integer] : Integer read GetAnswerType; + property AnswerClass[nIndex : Integer] : Integer read GetAnswerClass; + property AnswerTTL[nIndex : Integer] : LongInt read GetAnswerTTL; + property AnswerTag[nIndex : Integer] : Integer read GetAnswerTag; + property MXPreference[nIndex : Integer] : Integer read GetMXPreference; + property MXExchange[nIndex : Integer] : String read GetMXExchange; + property Address[nIndex : Integer] : TInAddr read GetAddress; + property Hostname[nIndex : Integer] : String read GetHostname; + + { !!KAP!! } + property Loc : TLOCInfo read fLOCInfo; + published + property Port : String read FPort write FPort; + property Addr : String read FAddr write FAddr; + property OnRequestDone : TDnsRequestDoneEvent read FOnRequestDone + write FOnRequestDone; + end; + + +function ReverseIP(const IP : String) : String; +function LongLatToDMS(longlat : longint; hemis : String) : String; { !!KAP!! } +function Loc2Geo(loc : TLOCInfo) : TLogGeo; { !!KAP!! } +procedure Register; + +implementation + +type + PWORD = ^WORD; + PDWORD = ^DWORD; + + + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function ReverseIP(const IP : String) : String; +var + I, J : Integer; +begin + Result := ''; + if Length(IP) = 0 then + Exit; + J := Length(IP); + I := J; + while I >= 0 do begin + if (I = 0) or (IP[I] = '.') then begin + Result := Result + '.' + Copy(IP, I + 1, J - I); + J := I - 1; + end; + Dec(I); + end; + if Result[1] = '.' then + Delete(Result, 1, 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TDnsQuery]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TDnsQuery.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWSocket := TWSocket.Create(nil); + FPort := '53'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TDnsQuery.Destroy; +begin + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.Notification(AComponent: TComponent; operation: TOperation); +begin + inherited Notification(AComponent, operation); + if operation = opRemove then begin + if AComponent = FWSocket then + FWSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetMXPreference(nIndex : Integer) : Integer; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FMXPreferenceArray)) or + (nIndex > High(FMXPreferenceArray)) then + Result := 0 + else + Result := FMXPreferenceArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetMXExchange(nIndex : Integer) : String; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FMXExchangeArray)) or + (nIndex > High(FMXExchangeArray)) then + Result := '' + else + Result := FMXExchangeArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAnswerName(nIndex : Integer) : String; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAnswerNameArray)) or + (nIndex > High(FAnswerNameArray)) then + Result := '' + else + Result := FAnswerNameArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAnswerType(nIndex : Integer) : Integer; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAnswerTypeArray)) or + (nIndex > High(FAnswerTypeArray)) then + Result := 0 + else + Result := FAnswerTypeArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAnswerClass(nIndex : Integer) : Integer; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAnswerClassArray)) or + (nIndex > High(FAnswerClassArray)) then + Result := 0 + else + Result := FAnswerClassArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAnswerTTL(nIndex : Integer) : LongInt; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAnswerTTLArray)) or + (nIndex > High(FAnswerTTLArray)) then + Result := 0 + else + Result := FAnswerTTLArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAnswerTag(nIndex : Integer) : Integer; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAnswerTagArray)) or + (nIndex > High(FAnswerTagArray)) then + Result := 0 + else + Result := FAnswerTagArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAddress(nIndex : Integer) : TInAddr; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAddressArray)) or + (nIndex > High(FAddressArray)) then + Result.S_addr := 0 + else + Result := FAddressArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetHostname(nIndex : Integer) : String; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FHostnameArray)) or + (nIndex > High(FHostnameArray)) then + Result := '' + else + Result := FHostnameArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetResponseBuf : PChar; +begin + Result := @FResponseBuf; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.MXLookup(Domain : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Domain, DnsQueryMX, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.ALookup(Host : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Host, DnsQueryA, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ !!KAP!! } +function TDnsQuery.QueryAny(Host : String; QNumber : integer) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Host, QNumber, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.PTRLookup(IP : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], + ReverseIP(IP) + '.in-addr.arpa', + DnsQueryPTR, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.SendQuery; +begin + FResponseLen := -1; + FWSocket.OnDataAvailable := nil; + FWSocket.Abort; + FWSocket.OnDataAvailable := WSocketDataAvailable; + FWSocket.Proto := 'udp'; + FWSocket.Port := FPort; + FWSocket.Addr := FAddr; + FWSocket.Connect; + FWSocket.Send(@FQueryBuf, FQueryLen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.BuildQuestionSection( + Dst : PChar; + const QName : String; + QType : WORD; + QClass : WORD) : Integer; +var + I : Integer; + p : PChar; + Ptr : PChar; +begin + Ptr := Dst; + if Ptr = nil then begin + Result := 0; + Exit; + end; + I := 1; + while I <= Length(QName) do begin + p := Ptr; + Inc(Ptr); + while (I <= Length(QName)) and (QName[I] <> '.') do begin + Ptr^ := QName[I]; + Inc(Ptr); + Inc(I); + end; + p^ := Chr(Ptr - p - 1); + Inc(I); + end; + Ptr^ := #0; + Inc(Ptr); + PWORD(Ptr)^ := htons(QType); + Inc(Ptr, 2); + PWORD(Ptr)^ := htons(QClass); + Inc(Ptr, 2); + Result := Ptr - Dst; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.BuildRequestHeader( + Dst : PDnsRequestHeader; + ID : WORD; + OPCode : BYTE; + Recursion : Boolean; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD); +begin + if Dst = nil then + Exit; + Dst^.ID := htons(ID); + Dst^.Flags := htons((OpCode shl 11) + (Ord(Recursion) shl 8)); + Dst^.QDCount := htons(QDCount); + Dst^.ANCount := htons(ANCount); + Dst^.NSCount := htons(NSCount); + Dst^.ARCount := htons(ARCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.TriggerRequestDone(Error: WORD); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.WSocketDataAvailable(Sender: TObject; Error: WORD); +var + Len : Integer; + Ans : PDnsRequestHeader; + Flags : Integer; + P : PChar; + RDataPtr : Pointer; + RDataLen : Integer; + I : Integer; +begin + Ans := PDnsRequestHeader(@FResponseBuf); + Len := FWSocket.Receive(Ans, SizeOf(FResponseBuf)); + if Error <> 0 then begin + TriggerRequestDone(Error); + Exit; + end; + { Check for minimum response length } + if Len < SizeOf(TDnsRequestHeader) then + Exit; + Flags := WSocket_ntohs(Ans^.Flags); + { Check if we got a response } + if (Flags and $8000) = 0 then + Exit; + FResponseLen := Len; + { Decode response header } + FResponseID := WSocket_ntohs(Ans^.ID); + FResponseCode := Flags and $000F; + FResponseOpCode := (Flags shr 11) and $000F; + FResponseAuthoritative := (Flags and $0400) = $0400; + FResponseTruncation := (Flags and $0200) = $0200; + FResponseRecursionAvailable := (Flags and $0080) = $0080; + FResponseQDCount := WSocket_ntohs(Ans^.QDCount); + FResponseANCount := WSocket_ntohs(Ans^.ANCount); + FResponseNSCount := WSocket_ntohs(Ans^.NSCount); + FResponseARCount := WSocket_ntohs(Ans^.ARCount); + + P := @ResponseBuf[SizeOf(TDnsRequestHeader)]; + if FResponseQDCount = 0 then begin + { I don't think we could receive 0 questions } + FQuestionName := ''; + FQuestionType := 0; + FQuestionClass := 0; + end + else begin + { Should never be greater than 1 because we sent only one question } + P := DecodeQuestion(@FResponseBuf, P, + FQuestionName, FQuestionType, FQuestionClass); + end; + if FResponseANCount = 0 then begin + RDataPtr := nil; + RDataLen := 0; + FMXRecordCount := 0; + FARecordCount := 0; + FPTRRecordCount := 0; + end + else begin + FMXRecordCount := 0; + FARecordCount := 0; + FPTRRecordCount := 0; + for I := 0 to FResponseANCount - 1 do begin + P := DecodeAnswer(@FResponseBuf, P, + FAnswerNameArray[I], FAnswerTypeArray[I], + FAnswerClassArray[I], FAnswerTTLArray[I], + RDataPtr, RDataLen); + FAnswerTagArray[I] := -1; + case FAnswerTypeArray[I] of + DnsQueryMX: + begin + if FMXRecordCount <= High(FMXPreferenceArray) then begin + FAnswerTagArray[I] := FMXRecordCount; + DecodeMXData(@FResponseBuf, RDataPtr, + FMXPreferenceArray[FMXRecordCount], + FMXExchangeArray[FMXRecordCount]); + Inc(FMXRecordCount); + end; + end; + DnsQueryA: + begin + if FARecordCount <= High(FAddressArray) then begin + FAnswerTagArray[I] := FARecordCount; + DecodeAData(@FResponseBuf, RDataPtr, + FAddressArray[FARecordCount]); + Inc(FARecordCount); + end; + end; + DnsQueryPTR: + begin + if FPTRRecordCount <= High(FHostnameArray) then begin + FAnswerTagArray[I] := FPTRRecordCount; + DecodePTRData(@FResponseBuf, RDataPtr, + FHostnameArray[FPTRRecordCount]); + Inc(FPTRRecordCount); + end; + end; + { !!KAP!! } + DnsQueryLOC: + begin + { for security reasons, if recompiled with future versions of delphi } + if (RDataLen = 16) and (rdatalen = sizeof(fLOCInfo)) then + Move(rdataptr^, fLOCInfo, 16) + else + FillChar(fLOCInfo, SizeOf(fLOCInfo), 0); + end; + end; + end; + end; + TriggerRequestDone(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.ExtractName( + Base : PChar; + From : PChar; + var Name : String) : PChar; +var + N : Integer; + I : Integer; + P : PChar; + NameEnd : String; +begin + P := From; + if P^ = #0 then begin + Name := ''; + Inc(P); + end + else begin + Name := ''; + while TRUE do begin + { Get name part length } + N := Ord(P^); + if (N and $C0) = $C0 then begin + { Message compression } + N := ((N and $3F) shl 8) + Ord(P[1]); + if Length(Name) = 0 then + Self.ExtractName(Base, Base + N, Name) + else begin + Self.ExtractName(Base, Base + N, NameEnd); + Name := Name + NameEnd; + end; + Inc(P, 2); + break; + end; + Inc(P); + if N = 0 then + break; + { Copy name part } + for I := 1 to N do begin + Name := Name + P^; + Inc(P); + end; + if P^ <> #0 then + Name := Name + '.'; + end; + end; + Result := P; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.DecodeQuestion( + Base : PChar; + From : PChar; + var Name : String; + var QType : Integer; + var QClass : Integer) : PChar; +var + P : PChar; +begin + P := ExtractName(Base, From, Name); + QType := WSocket_ntohs(PWORD(P)^); + Inc(P, 2); + QClass := WSocket_ntohs(PWORD(P)^); + Inc(P, 2); + Result := P; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.DecodeAnswer( + Base : PChar; + From : PChar; + var Name : String; + var QType : Integer; + var QClass : Integer; + var TTL : LongInt; + var RDataPtr : Pointer; + var RDataLen : Integer) : PChar; +var + P : PChar; +begin + P := ExtractName(Base, From, Name); + QType := WSocket_ntohs(PWORD(P)^); + Inc(P, 2); + QClass := WSocket_ntohs(PWORD(P)^); + Inc(P, 2); + TTL := WSocket_ntohl(PDWORD(P)^); + Inc(P, 4); + RDataLen := WSocket_ntohs(PWORD(P)^); + Inc(P, 2); + RDataPtr := P; + Result := P + RDataLen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.DecodeMXData( + Base : PChar; + From : PChar; + var Preference : Integer; + var Exchange : String) : PChar; +begin + Result := From; + Preference := WSocket_ntohs(PWORD(Result)^); + Inc(Result, 2); + Result := ExtractName(Base, Result, Exchange); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.DecodePTRData( + Base : PChar; + From : PChar; + var Hostname : String) : PChar; +begin + Result := ExtractName(Base, From, Hostname); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.DecodeAData( + Base : PChar; + From : PChar; + var Address : TInAddr) : PChar; +begin + Result := From; + Address.S_addr := PDWORD(Result)^; + Inc(Result, 4); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ + <0><1><129><128><0><1><0><1><0><4><0><5><7>inp + rise<3>com<0><0><15><0><1><192><12><0> + <15><0><1><0><1>QV<0><10><0><10><5>drui + d<192><12><192><12><0><2><0><1><0><1>Qc<0><6><3> + ns1<192><12><192><12><0><2><0><1><0><1>Qc<0> + <20><3>NS1<10>SPRINTLINK + <3>NET<0><192><12><0><2><0><1><0><1>Qc<0> + <6><3>NS2<192>U<192><12><0><2><0><1><0><1>Q + c<0><6><3>NS3<192>U<192>+<0><1><0><1><0> + <1>QV<0><4><143><186><11>F<192>?<0><1><0><1><0> + <1>Qc<0><4><207>iS<30><192>Q<0><1><0><1><0> + <2><144>i<0><4><204>u<214><10><192>q<0><1><0><1><0> + <2><144>i<0><4><199><2><252><10><192><131><0><1><0><1><0> + <2><142><182><0><4><204>a<212><10> +} +{ + <0><3><129><128><0><1><0><1><0><2><0><3><4>rtf + m<2>be<0><0><15><0><1><192><12><0><15><0><1><0> + <1>.b<0><9><0><10><4>mail<192><12><192><12> + <0><2><0><1><0><1>.b<0><11><2>ns<3>dn + s<2>be<0><192><12><0><2><0><1><0><1>.b<0> + <5><2>ns<192><12><192>'<0><1><0><1><0><1>.b + <0><4><195><0>d<253><192>:<0><1><0><1><0><1>QY + <0><4><134>:J!<192>Q<0><1><0><1><0><1>.b + <0><4><195><0>d<253> +} +{ + <0><7><133><128><0><1><0><1><0><2><0><2><3>www + <4>rtfm<2>be<0><0><1><0><1><192><12><0> + <1><0><1><0><1>Q<128><0><4><195><0>d<253><4>rt + fm<2>be<0><0><2><0><1><0><1>Q<128><0><5> + <2>ns<192>-<192>-<0><2><0><1><0><1>Q<128><0> + <9><2>ns<3>dns<192>2<192>@<0><1><0><1> + <0><1>Q<128><0><4><195><0>d<253><192>Q<0><1><0><1> + <0><0><26><132><0><4><134>:J! +} +(* +<0><1><129><128><0><1><0><1><0><5><0><5><9>fu-berlin +<2>de<0><0> + +<29><0><1><192><12><0><29><0><1><0><0>, + +<0><16><0><21><22><19><139>Av<167><130><218>L<242> +<0><152><156>\<192><12><0><2><0><1><0><0><12><176> +<0>"<4>arbi<10>informatik<13>uni-oldenburg<2>de<0> +<192><12><0><2><0><1><0><0><12><176><0><12><5>deneb<3> +dfn<192>d<192><12><0><2><0><1><0><0><12><176><0><6><3> +ns3<192><12><192><12><0><2><0><1><0><0><12><176><0><6> +<3>ns2<192><12><192><12><0><2><0><1><0><0><12><176><0> +<6><3>ns1<192><12><192>F<0><1><0><1><0><0>t<169><0><4> +<134>j<1><7><192>t<0><1><0><1><0><0>9<209><0><4><192>L +<176><9><192><140><0><1><0><1><0><0>T<19><0><4><130> +<133><1>9<192><158><0><1><0><1><0><0><28><206><0><4> +<160>-<10><12><192><176><0><1><0><1><0><0>1<198><0> +<4><160>-<8><8> +*) + +{ !!KAP!! } +{raw translation of some perl-source LOC.pm from package Net::DNS::RR::LOC; + +fu-berlin.de LOC 52 27 19.591 N 13 17 40.978 E 15.00m 1000.00m 10000.00m 10.00m +} +const conv_sec = 1000.0; + conv_min = 60.0 * conv_sec; + conv_deg = 60.0 * conv_min; + zh31 = 1 shl 31; + +procedure SubLOCgeo(longlat : longint; + hemis : String; + var ldeg, lmin, lsec, lmsec : Extended; + var hemic : char); +var + Labs : Extended; +begin + LongLat := WSocket_ntohl(LongLat); + Labs := Abs(1.0 * LongLat - zh31); + Ldeg := Trunc(labs / conv_deg); + Labs := Labs - ldeg * conv_deg; + Lmin := Trunc(labs / conv_min); + Labs := Labs - lmin * conv_min; + Lsec := Trunc(labs / conv_sec); + Labs := Labs - lsec * conv_sec; + Lmsec := Labs; + Hemic := Copy(Hemis, 1 + ord(LongLat <= zh31), 1)[1]; { yeah. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LongLatToDMS(longlat : longint; hemis : string):string; +Var ldeg, lmin, lsec, lmsec : extended; + hemi : char; +begin + SubLOCgeo(longlat,hemis,ldeg,lmin,lsec,lmsec,hemi); + result := Format('%d %02d %02d.%03d', + [round(ldeg), round(lmin), round(lsec), + round(lmsec)]) + ' ' + hemi; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ in cm!! } +function LocAltToAlt(Localt : LongInt) : LongInt; +begin + Result := Round((WSocket_ntohl(localt) - 100000.0 * 100.0) / 100.0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ !!KAP!! } +function Loc2Geo(loc : TLOCInfo):TLogGeo; + { dolle umwandlung } + procedure du(longlat : Integer; + hemis : String; + var ideg, imin, isec, imsec : Integer; + var hemic : Char); + var + ldeg, lmin, lsec, lmsec : extended; + begin + SubLOCgeo(longlat, hemis, ldeg, lmin, lsec, lmsec, hemic); + ideg := Round(ldeg); + imin := Round(lmin); + isec := Round(lsec); + imsec := Round(lmsec); + end; + +begin + Result.version := Loc.version; + Result.longsize := Round(Exp(Ln(10)*(loc.size and $f))); + Result.latsize := Round(Exp(Ln(10)*(loc.size shr 4))); + + Result.horizpre := Loc.horizpre; + Result.vertpre := Loc.vertpre; + + du(loc.latitude, 'NS', result.lad, result.lam, + result.las, result.lams, result.lahem); + du(loc.longitude, 'EW', result.lod, result.lom, + result.los, result.loms, result.lohem); + + Result.altitude := LocAltToAlt(loc.altitude); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Vc32/EmulVT.dcu b/lib/Delphi/Vc32/EmulVT.dcu new file mode 100644 index 00000000..a12781a8 Binary files /dev/null and b/lib/Delphi/Vc32/EmulVT.dcu differ diff --git a/lib/Delphi/Vc32/EmulVT.pas b/lib/Delphi/Vc32/EmulVT.pas new file mode 100644 index 00000000..a0cf732c --- /dev/null +++ b/lib/Delphi/Vc32/EmulVT.pas @@ -0,0 +1,4006 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: EMULVT.PAS +Description: Delphi component which does Ansi terminal emulation + Not every escape sequence is implemented, but a large subset. +Author: Franois PIETTE +Creation: May, 1996 +Version: 2.19 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jul 22, 1997 Some optimization + Adapted to Delphi 3 +Sep 05, 1997 Version 2.01 +Dec 16, 1997 V2.02 Corrected a bug int the paint routine which caused GDI + resource leak when color was used. +Feb 24, 1998 V2.03 Added AddFKey function +Jul 15, 1998 V2.04 Adapted to Delphi 4 (moved DoKeyBuffer to protected section) +Dec 04, 1998 V2.05 Added 'single char paint' and 'char zoom' features. +Dec 09, 1998 V2.10 Added graphic char drawing using graphic primitives + Added (with permission) scroll back code developed by Steve + Endicott +Dec 21, 1998 V2.11 Corrected some screen update problems related to scrollback. + Added fixes from Steve Endicott. + Beautified code. +Mar 14, 1999 V2.12 Added OnKeyDown event. + Corrected a missing band at right of screen when painting. +Aug 15, 1999 V2.13 Moved KeyPress procedure to public section for BCB4 compat. +Aug 20, 1999 V2.14 Added compile time options. Revised for BCB4. +Nov 12, 1999 V2.15 Corrected display attribute error in delete line. + Checked for range in SetLines/GetLine +Aug 09, 2000 V2.16 Wilfried Mestdagh" and + Steve Endicott corrected a + bug related to scroll back buffer. See WM + SE 09/08/00 + tags in code. +Jul 28, 2001 V2.17 Made FCharPos and FLinePos member variables instead of + global to avoid conflict when sevaral components are used + simultaneously. Suggested by Jeroen Cranendonk + +Jan 03, 2002 V2.19 Don't adjust scroll bar if not visible + Make properties with TopMargin, LeftMargin, RightMargin, + BottomMargin. +Jan 10, 2002 V2.19 Fixed SetLineHeight to fill FLinePos up to last item. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit EmulVT; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +{$DEFINE SINGLE_CHAR_PAINT} +{$DEFINE CHAR_ZOOM} + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, ClipBrd; + +const + EmulVTVersion = 219; + CopyRight : String = ' TEmulVT (c) 1996-2002 F. Piette V2.19 '; + MAX_ROW = 50; + MAX_COL = 160; + NumPaletteEntries = 16; + +type + TBackColors = (vtsBlack, vtsRed, vtsGreen, vtsYellow, + vtsBlue, vtsMagenta, vtsCyan, vtsWhite); + + TScreenOption = (vtoBackColor, vtoCopyBackOnClear); + TScreenOptions = set of TScreenOption; + TXlatTable = array [0..255] of char; + PXlatTable = ^TXlatTable; + TFuncKeyValue = String[50]; + PFuncKeyValue = ^TFuncKeyValue; + TFuncKey = record + ScanCode : Char; + Shift : TShiftState; + Ext : Boolean; + Value : TFuncKeyValue; + end; + TFuncKeysTable = array [0..63] of TFuncKey; + PFuncKeysTable = ^TFuncKeysTable; + TKeyBufferEvent = procedure (Sender : TObject; Buffer : PChar; Len : Integer) of object; + TKeyDownEvent = procedure (Sender : TObject; + var VirtKey : Integer; + var Shift : TShiftState; + var ShiftLock : Boolean; + var ScanCode : Char; + var Ext : Boolean) of object; + + +type + { TLine is an object used to hold one line of text on screen } + TLine = class(TObject) + public + Txt : array [0..MAX_COL] of Char; + Att : array [0..MAX_COL] of Byte; + constructor Create; + procedure Clear(Attr : Byte); + end; + TLineArray = array [0..16382] of TLine; + PLineArray = ^TLineArray; + + { TScreen is an object to hold an entire screen of line and handle } + { Ansi escape sequences to update this virtual screen } + TScreen = class(TObject) + public + FLines : PLineArray; + FRow : Integer; + FCol : Integer; + FRowSaved : Integer; + FColSaved : Integer; + FScrollRowTop : Integer; + FScrollRowBottom : Integer; + FAttribute : Byte; + FForceHighBit : Boolean; + FReverseVideo : Boolean; + FUnderLine : Boolean; + FRowCount : Integer; + FColCount : Integer; + FBackRowCount : Integer; + FBackEndRow : Integer; + FBackColor : TBackColors; + FOptions : TScreenOptions; + FEscBuffer : String[80]; + FEscFlag : Boolean; + Focused : Boolean; + FAutoLF : Boolean; + FAutoCR : Boolean; + FAutoWrap : Boolean; + FCursorOff : Boolean; + FCKeyMode : Boolean; + FNoXlat : Boolean; + FNoXlatInitial : Boolean; + FCntLiteral : Integer; + FCarbonMode : Boolean; + FXlatInputTable : PXlatTable; + FXlatOutputTable : PXlatTable; + FCharSetG0 : Char; + FCharSetG1 : Char; + FCharSetG2 : Char; + FCharSetG3 : Char; + FAllInvalid : Boolean; + FInvRect : TRect; + FOnCursorVisible : TNotifyEvent; + constructor Create; + destructor Destroy; override; + procedure AdjustFLines(NewCount : Integer); + procedure CopyScreenToBack; + procedure SetRowCount(NewCount : Integer); + procedure SetBackRowCount(NewCount : Integer); + procedure InvRect(nRow, nCol : Integer); + procedure InvClear; + procedure SetLines(I : Integer; Value : TLine); + function GetLines(I : Integer) : TLine; + procedure WriteChar(Ch : Char); + procedure WriteStr(Str : String); + function ReadStr : String; + procedure GotoXY(X, Y : Integer); + procedure WriteLiteralChar(Ch : Char); + procedure ProcessEscape(EscCmd : Char); + procedure SetAttr(Att : Char); + procedure CursorRight; + procedure CursorLeft; + procedure CursorDown; + procedure CursorUp; + procedure CarriageReturn; + procedure ScrollUp; + procedure ScrollDown; + procedure ClearScreen; + procedure BackSpace; + procedure Eol; + procedure Eop; + procedure ProcessESC_D; { Index } + procedure ProcessESC_M; { Reverse index } + procedure ProcessESC_E; { Next line } + procedure ProcessCSI_u; { Restore Cursor } + procedure ProcessCSI_I; { Select IBM char set } + procedure ProcessCSI_J; { Clear the screen } + procedure ProcessCSI_K; { Erase to End of Line } + procedure ProcessCSI_L; { Insert Line } + procedure ProcessCSI_M; { Delete Line } + procedure ProcessCSI_m_lc; { Select Attributes } + procedure ProcessCSI_n_lc; { Cursor position report } + procedure ProcessCSI_at; { Insert character } + procedure ProcessCSI_r_lc; { Scrolling margins } + procedure ProcessCSI_s_lc; { Save cursor location } + procedure ProcessCSI_u_lc; { Restore cursor location } + procedure ProcessCSI_7; { Save cursor location } + procedure ProcessCSI_8; { Restore cursor location } + procedure ProcessCSI_H; { Set Cursor Position } + procedure ProcessCSI_h_lc; { Terminal mode set } + procedure ProcessCSI_l_lc; { Terminal mode reset } + procedure ProcessCSI_A; { Cursor Up } + procedure ProcessCSI_B; { Cursor Down } + procedure ProcessCSI_C; { Cursor Right } + procedure ProcessCSI_D; { Cursor Left } + procedure ProcessCSI_P; { Delete Character } + procedure ProcessCSI_S; { Scroll up } + procedure ProcessCSI_T; { Scroll down } + procedure process_charset_G0(EscCmd : Char);{ G0 character set } + procedure process_charset_G1(EscCmd : Char);{ G1 character set } + procedure process_charset_G2(EscCmd : Char);{ G2 character set } + procedure process_charset_G3(EscCmd : Char);{ G3 character set } + procedure UnimplementedEscape(EscCmd : Char); + procedure InvalidEscape(EscCmd : Char); + function GetEscapeParam(From : Integer; var Value : Integer) : Integer; + property OnCursorVisible : TNotifyEvent read FonCursorVisible + write FOnCursorVisible; + property Lines[I : Integer] : TLine read GetLines write SetLines; + end; + + { TCustomEmulVT is an visual component wich does the actual display } + { of a TScreen object wich is the virtual screen } + { No property is published. See TEmulVT class } + TCustomEmulVT = class(TCustomControl) + private + FCharPos : array [0..MAX_COL + 1] of integer; + FLinePos : array [0..MAX_ROW + 1] of integer; + FFileHandle : TextFile; + FCursorVisible : Boolean; + FCaretShown : Boolean; + FCaretCreated : Boolean; + FLineHeight : Integer; + FLineZoom : Single; + FCharWidth : Integer; + FCharZoom : Single; + FGraphicDraw : Boolean; + FInternalLeading : Integer; + FBorderStyle : TBorderStyle; + FBorderWidth : Integer; + FAutoRepaint : Boolean; + FFont : TFont; + FVScrollBar : TScrollBar; + FTopLine : Integer; + FLocalEcho : Boolean; + FOnKeyBuffer : TKeyBufferEvent; + FOnKeyDown : TKeyDownEvent; + FFKeys : Integer; + FMonoChrome : Boolean; + FLog : Boolean; + FAppOnMessage : TMessageEvent; + FFlagCirconflexe : Boolean; + FFlagTrema : Boolean; + FSelectRect : TRect; + FTopMargin : Integer; + FLeftMargin : Integer; + FRightMargin : Integer; + FBottomMargin : Integer; + FPal : HPalette; + FPaletteEntries : array[0..NumPaletteEntries - 1] of TPaletteEntry; + FMarginColor : Integer; + procedure WMPaint(var Message: TWMPaint); message WM_PAINT; + procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; + procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; + procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; + procedure WMPaletteChanged(var Message : TMessage); message WM_PALETTECHANGED; + procedure VScrollBarScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); + procedure SetCaret; + procedure AdjustScrollBar; + function ProcessFKeys(ScanCode: Char; Shift: TShiftState; Ext: Boolean) : Boolean; + function FindFKeys(ScanCode: Char; Shift: TShiftState; + Ext: Boolean) : PFuncKeyValue; + procedure CursorVisibleEvent(Sender : TObject); + procedure SetFont(Value : TFont); + procedure SetAutoLF(Value : Boolean); + procedure SetAutoCR(Value : Boolean); + procedure SetXlat(Value : Boolean); + procedure SetLog(Value : Boolean); + procedure SetRows(Value : Integer); + procedure SetCols(Value : Integer); + procedure SetBackRows(Value : Integer); + procedure SetTopLine(Value : Integer); + procedure SetBackColor(Value : TBackColors); + procedure SetOptions(Value : TScreenOptions); + procedure SetLineHeight(Value : Integer); + function GetAutoLF : Boolean; + function GetAutoCR : Boolean; + function GetXlat : Boolean; + function GetRows : Integer; + function GetCols : Integer; + function GetBackRows : Integer; + function GetBackColor : TBackColors; + function GetOptions : TScreenOptions; + procedure SetMarginColor(const Value: Integer); + procedure SetLeftMargin(const Value: Integer); + procedure SetBottomMargin(const Value: Integer); + procedure SetRightMargin(const Value: Integer); + procedure SetTopMargin(const Value: Integer); + protected + FScreen : TScreen; + procedure AppMessageHandler(var Msg: TMsg; var Handled: Boolean); + procedure DoKeyBuffer(Buffer : PChar; Len : Integer); virtual; + procedure PaintGraphicChar(DC : HDC; + X, Y : Integer; + rc : PRect; + ch : Char); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure ShowCursor; + procedure SetCursor(Row, Col : Integer); + procedure WriteChar(Ch : Char); + procedure WriteStr(Str : String); + procedure WriteBuffer(Buffer : Pointer; Len : Integer); + function ReadStr : String; + procedure CopyHostScreen; + procedure Clear; + procedure UpdateScreen; + function SnapPixelToRow(Y : Integer) : Integer; + function SnapPixelToCol(X : Integer) : Integer; + function PixelToRow(Y : Integer) : Integer; + function PixelToCol(X : Integer) : Integer; + procedure MouseToCell(X, Y: Integer; var ACol, ARow: Longint); + procedure SetLineZoom(newValue : Single); + procedure SetCharWidth(newValue : Integer); + procedure SetCharZoom(newValue : Single); + procedure KeyPress(var Key: Char); override; + property LineZoom : Single read FLineZoom write SetLineZoom; + property CharWidth : Integer read FCharWidth write SetCharWidth; + property CharZoom : Single read FCharZoom write SetCharZoom; + property GraphicDraw : Boolean read FGraphicDraw write FGraphicDraw; + property TopLine : Integer read FTopLine write SetTopLine; + property VScrollBar : TScrollBar read FVScrollBar; + property TopMargin : Integer read FTopMargin write SetTopMargin; + property LeftMargin : Integer read FLeftMargin write SetLeftMargin; + property RightMargin : Integer read FRightMargin write SetRightMargin; + property BottomMargin : Integer read FBottomMargin write SetBottomMargin; + property MarginColor : Integer read FMarginColor write SetMarginColor; + private + procedure PaintOneLine(DC: HDC; Y, Y1 : Integer; const Line : TLine; + nColFrom : Integer; nColTo : Integer; Blank : Boolean); + procedure SetupFont; + property Text : String read ReadStr write WriteStr; + property OnMouseMove; + property OnMouseDown; + property OnMouseUp; + property OnClick; + property OnKeyPress; + property OnKeyBuffer : TKeyBufferEvent read FOnKeyBuffer write FOnKeyBuffer; + property OnKeyDown : TKeyDownEvent read FOnKeyDown write FOnKeyDown; + property Ctl3D; + property Align; + property TabStop; + property TabOrder; + property BorderStyle: TBorderStyle read FBorderStyle write FBorderStyle; + property AutoRepaint : Boolean read FAutoRepaint write FAutoRepaint; + property Font : TFont read FFont write SetFont; + property LocalEcho : Boolean read FLocalEcho write FLocalEcho; + property AutoLF : Boolean read GetAutoLF write SetAutoLF; + property AutoCR : Boolean read GetAutoCR write SetAutoCR; + property Xlat : Boolean read GetXlat write SetXlat; + property MonoChrome : Boolean read FMonoChrome write FMonoChrome; + property Log : Boolean read FLog write SetLog; + property Rows : Integer read GetRows write SetRows; + property Cols : Integer read GetCols write SetCols; + property LineHeight : Integer read FLineHeight write SetLineHeight; + property FKeys : Integer read FFKeys write FFKeys; + property SelectRect : TRect read FSelectRect write FSelectRect; + property BackRows : Integer read GetBackRows write SetBackRows; + property BackColor : TBackColors read GetBackColor write SetBackColor; + property Options : TScreenOptions read GetOptions write SetOptions; + end; + + { Same as TCustomEmulVT, but with published properties } + TEmulVT = class(TCustomEmulVT) + public + property Screen : TScreen read FScreen; + property SelectRect; + property Text; + published + property OnMouseMove; + property OnMouseDown; + property OnMouseUp; + property OnClick; + property OnKeyPress; + property OnKeyDown; + property OnKeyBuffer; + property Ctl3D; + property Align; + property BorderStyle; + property AutoRepaint; + property Font; + property LocalEcho; + property AutoLF; + property AutoCR; + property Xlat; + property MonoChrome; + property Log; + property Rows; + property Cols; + property BackRows; + property BackColor; + property Options; + property LineHeight; + property CharWidth; + property TabStop; + property TabOrder; + property FKeys; + property TopMargin; + property LeftMargin; + property RightMargin; + property BottomMargin; + property MarginColor; + end; + +const + F_BLACK = $00; + F_BLUE = $01; + F_GREEN = $02; + F_CYAN = $03; + F_RED = $04; + F_MAGENTA = $05; + F_BROWN = $06; + F_WHITE = $07; + + B_BLACK = $00; + B_BLUE = $01; + B_GREEN = $02; + B_CYAN = $03; + B_RED = $04; + B_MAGENTA = $05; + B_BROWN = $06; + B_WHITE = $07; + + F_INTENSE = $08; + B_BLINK = $80; + + { Function keys (SCO Console) } + FKeys1 : TFuncKeysTable = ( + (ScanCode: #$48; Shift: []; Ext: TRUE ; Value: #$1B + '[A'), { UP } + (ScanCode: #$50; Shift: []; Ext: TRUE ; Value: #$1B + '[B'), { DOWN } + (ScanCode: #$4D; Shift: []; Ext: TRUE ; Value: #$1B + '[C'), { RIGHT } + (ScanCode: #$4B; Shift: []; Ext: TRUE ; Value: #$1B + '[D'), { LEFT } + (ScanCode: #$49; Shift: []; Ext: TRUE ; Value: #$1B + '[I'), { PREV } + (ScanCode: #$51; Shift: []; Ext: TRUE ; Value: #$1B + '[G'), { NEXT } + (ScanCode: #$47; Shift: []; Ext: TRUE ; Value: #$1B + '[H'), { HOME } + (ScanCode: #$4F; Shift: []; Ext: TRUE ; Value: #$1B + '[F'), { END } + (ScanCode: #$52; Shift: []; Ext: TRUE ; Value: #$1B + '[L'), { INS } + (ScanCode: #$0F; Shift: []; Ext: FALSE; Value: #$1B + '[Z'), { RTAB } + (ScanCode: #$53; Shift: []; Ext: TRUE ; Value: #$7F ), { DEL } + (ScanCode: #$3B; Shift: []; Ext: FALSE; Value: #$1B + '[M'), { F1 } + (ScanCode: #$3C; Shift: []; Ext: FALSE; Value: #$1B + '[N'), + (ScanCode: #$3D; Shift: []; Ext: FALSE; Value: #$1B + '[O'), + (ScanCode: #$3E; Shift: []; Ext: FALSE; Value: #$1B + '[P'), + (ScanCode: #$3F; Shift: []; Ext: FALSE; Value: #$1B + '[Q'), + (ScanCode: #$40; Shift: []; Ext: FALSE; Value: #$1B + '[R'), + (ScanCode: #$41; Shift: []; Ext: FALSE; Value: #$1B + '[S'), + (ScanCode: #$42; Shift: []; Ext: FALSE; Value: #$1B + '[T'), + (ScanCode: #$43; Shift: []; Ext: FALSE; Value: #$1B + '[U'), + (ScanCode: #$44; Shift: []; Ext: FALSE; Value: #$1B + '[V'), { F10 } + (ScanCode: #$85; Shift: []; Ext: FALSE; Value: #$1B + '[W'), { F11 } + (ScanCode: #$86; Shift: []; Ext: FALSE; Value: #$1B + '[X'), { F12 } + (ScanCode: #$3B; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[V'),{ SF1 should be 'Y' } + (ScanCode: #$3C; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[Z'), + (ScanCode: #$3D; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[a'), + (ScanCode: #$3E; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[b'), + (ScanCode: #$3F; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[c'), + (ScanCode: #$40; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[d'), + (ScanCode: #$41; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[e'), + (ScanCode: #$42; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[f'), + (ScanCode: #$43; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[g'), + (ScanCode: #$44; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[h'), + (ScanCode: #$85; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[i'), + (ScanCode: #$86; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[j'),{ SF10 } + (ScanCode: #$3B; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[k'), { CF1 } + (ScanCode: #$3C; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[l'), + (ScanCode: #$3D; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[m'), + (ScanCode: #$3E; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[n'), + (ScanCode: #$3F; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[o'), + (ScanCode: #$40; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[p'), + (ScanCode: #$41; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[q'), + (ScanCode: #$42; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[r'), + (ScanCode: #$43; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[s'), + (ScanCode: #$44; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[t'), + (ScanCode: #$85; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[u'), + (ScanCode: #$86; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[v'), { CF12 } + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ) + ); + +{ Alternate function keys (ordinary VT keys) } + FKeys2 : TFuncKeysTable = ( + (ScanCode: #$48; Shift: []; Ext: TRUE ; Value: #$1B + '[A'), { UP } + (ScanCode: #$50; Shift: []; Ext: TRUE ; Value: #$1B + '[B'), { DOWN } + (ScanCode: #$4D; Shift: []; Ext: TRUE ; Value: #$1B + '[C'), { RIGHT } + (ScanCode: #$4B; Shift: []; Ext: TRUE ; Value: #$1B + '[D'), { LEFT } + (ScanCode: #$49; Shift: []; Ext: TRUE ; Value: #$1B + '[5~'), { PREV } + (ScanCode: #$51; Shift: []; Ext: TRUE ; Value: #$1B + '[6~'), { NEXT } + (ScanCode: #$52; Shift: []; Ext: TRUE ; Value: #$1B + '[2~'), { INSERT } + (ScanCode: #$53; Shift: []; Ext: TRUE ; Value: #$7F ), { DELETE } + (ScanCode: #$3B; Shift: []; Ext: FALSE; Value: #$1B + 'OP'), { F1->PF1 } + (ScanCode: #$3C; Shift: []; Ext: FALSE; Value: #$1B + 'OQ'), { F2->PF2 } + (ScanCode: #$3D; Shift: []; Ext: FALSE; Value: #$1B + 'OR'), { F3->PF3 } + (ScanCode: #$3E; Shift: []; Ext: FALSE; Value: #$1B + 'OS'), { F4->PF4 } + (ScanCode: #$57; Shift: []; Ext: FALSE; Value: #$1B + '[28~'), { F11->Aide } + (ScanCode: #$58; Shift: []; Ext: FALSE; Value: #$1B + '[29~'), { F12->Excuter } + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ) + ); + +{ A-Series Telnet function keys (ordinary VT100 keys + specials) } + FKeys3 : TFuncKeysTable = ( + (ScanCode: #$48; Shift: []; Ext: TRUE ; Value: #$1B + '[A'), { UP } + (ScanCode: #$50; Shift: []; Ext: TRUE ; Value: #$1B + '[B'), { DOWN } + (ScanCode: #$4D; Shift: []; Ext: TRUE ; Value: #$1B + '[C'), { RIGHT } + (ScanCode: #$4B; Shift: []; Ext: TRUE ; Value: #$1B + '[D'), { LEFT } + (ScanCode: #$49; Shift: []; Ext: TRUE ; Value: #$1B + '-'), { PREV } + (ScanCode: #$51; Shift: []; Ext: TRUE ; Value: #$1B + '+'), { NEXT } + (ScanCode: #$47; Shift: []; Ext: TRUE ; Value: #$1B + 'H'), { HOME } + (ScanCode: #$47; Shift: [ssCtrl]; Ext: TRUE ; Value: #$1B + 'C'),{ HOME } + (ScanCode: #$4F; Shift: []; Ext: TRUE ; Value: #$1B + 'R'), { END } + (ScanCode: #$52; Shift: []; Ext: TRUE ; Value: #$1B + 'I'), { INSERT } + (ScanCode: #$53; Shift: []; Ext: TRUE ; Value: #$7F ), { DELETE } + (ScanCode: #$3B; Shift: []; Ext: FALSE; Value: #$1B + 'OP'), { F1->PF1 } + (ScanCode: #$3C; Shift: []; Ext: FALSE; Value: #$1B + 'OQ'), { F2->PF2 } + (ScanCode: #$3D; Shift: []; Ext: FALSE; Value: #$1B + 'OR'), { F3->PF3 } + (ScanCode: #$3E; Shift: []; Ext: FALSE; Value: #$1B + 'OS'), { F4->PF4 } + (ScanCode: #$43; Shift: []; Ext: FALSE; Value: #$1B + 'OP'), { F9 } + (ScanCode: #$44; Shift: []; Ext: FALSE; Value: ''), { F10 } + (ScanCode: #$57; Shift: []; Ext: FALSE; Value: #$1B + 'OQ'), { F11 } + (ScanCode: #$58; Shift: []; Ext: FALSE; Value: #$1B + 'OS'), { F12 } + (ScanCode: #$0F; Shift: []; Ext: FALSE; Value: #$1B + 'Z'), { RTAB } + (ScanCode: #$40; Shift: []; Ext: FALSE; Value: #$1B + 'K'), { F6 } + (ScanCode: #$53; Shift: [ssCtrl]; Ext: TRUE ; Value: #$1B + 'D'), { CDEL } + (ScanCode: #$52; Shift: [ssCtrl]; Ext: TRUE ; Value: #$1B + 'L'), { CINS } + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ) + ); + + { Ethernet to screen } + ibm_iso8859_1_G0 : TXlatTable = ( + #$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, { 00 - 07 } + #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, { 08 - 0F } + #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, { 10 - 17 } + #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, { 18 - 1F } + #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, { 20 - 27 } + #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, { 28 - 2F } + #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, { 30 - 37 } + #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, { 38 - 3F } + #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, { 40 - 47 } + #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, { 48 - 4F } + #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, { 50 - 57 } + #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, { 58 - 5F } + #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, { 60 - 67 } + #$68, #$69, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, { 68 - 6F } + #$70, #$71, #$72, #$73, #$74, #$75, #$76, #$77, { 70 - 77 } + #$78, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, { 78 - 7F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 80 - 87 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 88 - 8F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 90 - 97 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 98 - 9F } + #$B1, #$AD, #$9B, #$9C, #$0F, #$9D, #$B3, #$15, { A0 - A7 } + #$20, #$43, #$A6, #$AE, #$AA, #$C4, #$52, #$C4, { A8 - AF } + #$F8, #$F1, #$FD, #$20, #$27, #$E6, #$14, #$FA, { B0 - B7 } + #$2C, #$20, #$A7, #$AF, #$AC, #$AB, #$20, #$A8, { B8 - BF } + #$41, #$41, #$41, #$41, #$8E, #$8F, #$92, #$80, { C0 - C7 } + #$45, #$45, #$45, #$45, #$45, #$49, #$49, #$49, { C8 - CF } + #$44, #$A5, #$4F, #$4F, #$4F, #$4F, #$4F, #$78, { D0 - D7 } + #$ED, #$55, #$55, #$55, #$55, #$59, #$70, #$E1, { D8 - DF } + #$85, #$A0, #$83, #$61, #$84, #$86, #$91, #$87, { E0 - E7 } + #$8A, #$82, #$88, #$89, #$8D, #$A1, #$8C, #$49, { E8 - EF } + #$64, #$A4, #$95, #$A2, #$93, #$6F, #$94, #$F6, { F0 - F7 } + #$ED, #$97, #$A3, #$96, #$9A, #$79, #$70, #$98); { F8 - FF } + +{ Ethernet to screen } + ibm_iso8859_1_G1 : TXlatTable = ( + #$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, { 00 - 07 } + #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, { 08 - 0F } + #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, { 10 - 17 } + #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, { 18 - 1F } + #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, { 20 - 27 } + #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, { 28 - 2F } + #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, { 30 - 37 } + #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, { 38 - 3F } + #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, { 40 - 47 } + #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, { 48 - 4F } + #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, { 50 - 57 } + #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, { 58 - 5F } + #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, { 60 - 67 } + #$68, #$69, #$D9, #$BF, #$DA, #$C0, #$C5, #$6F, { 68 - 6F } + #$70, #$C4, #$72, #$73, #$C3, #$B4, #$C1, #$C2, { 70 - 77 } + #$B3, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, { 78 - 7F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 80 - 87 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 88 - 8F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 90 - 97 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 98 - 9F } + #$B1, #$AD, #$9B, #$9C, #$0F, #$9D, #$B3, #$15, { A0 - A7 } + #$20, #$43, #$A6, #$AE, #$AA, #$C4, #$52, #$C4, { A8 - AF } + #$F8, #$F1, #$FD, #$20, #$27, #$E6, #$14, #$FA, { B0 - B7 } + #$2C, #$20, #$A7, #$AF, #$AC, #$AB, #$20, #$A8, { B8 - BF } + #$41, #$41, #$41, #$41, #$8E, #$8F, #$92, #$80, { C0 - C7 } + #$45, #$45, #$45, #$45, #$45, #$49, #$49, #$49, { C8 - CF } + #$44, #$A5, #$4F, #$4F, #$4F, #$4F, #$4F, #$78, { D0 - D7 } + #$ED, #$55, #$55, #$55, #$55, #$59, #$70, #$E1, { D8 - DF } + #$85, #$A0, #$83, #$61, #$84, #$86, #$91, #$87, { E0 - E7 } + #$8A, #$82, #$88, #$89, #$8D, #$A1, #$8C, #$49, { E8 - EF } + #$64, #$A4, #$95, #$A2, #$93, #$6F, #$94, #$F6, { F0 - F7 } + #$ED, #$97, #$A3, #$96, #$9A, #$79, #$70, #$98); { F8 - FF } + +{ Keyboard to Ethernet } + Output : TXlatTable = ( + #$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, { 00 - 07 } + #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, { 08 - 0F } + #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, { 10 - 17 } + #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, { 18 - 1F } + #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, { 20 - 27 } + #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, { 28 - 2F } + #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, { 30 - 37 } + #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, { 38 - 3F } + #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, { 40 - 47 } + #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, { 48 - 4F } + #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, { 50 - 57 } + #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, { 58 - 5F } + #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, { 60 - 67 } + #$68, #$69, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, { 68 - 6F } + #$70, #$71, #$72, #$73, #$74, #$75, #$76, #$77, { 70 - 77 } + #$78, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, { 78 - 7F } + #$C7, #$FC, #$E9, #$E2, #$E4, #$E0, #$E5, #$E7, { 80 - 87 } + #$EA, #$EB, #$E8, #$EF, #$EE, #$EC, #$C4, #$C5, { 88 - 8F } + #$C9, #$E6, #$C6, #$F4, #$F6, #$F2, #$FB, #$F9, { 90 - 97 } + #$FF, #$F6, #$FC, #$A2, #$A3, #$A5, #$DE, #$20, { 98 - 9F } + #$E1, #$ED, #$F3, #$FA, #$F1, #$D1, #$AA, #$BA, { A0 - A7 } + #$BF, #$20, #$AC, #$BD, #$BC, #$A1, #$AB, #$BB, { A8 - AF } + #$A0, #$A0, #$A0, #$A6, #$A6, #$A6, #$A6, #$AD, { B0 - B7 } + #$2B, #$A6, #$A6, #$2B, #$2B, #$2B, #$2B, #$2B, { B8 - BF } + #$2B, #$AD, #$AD, #$AD, #$A6, #$AD, #$2B, #$A6, { C0 - C7 } + #$2B, #$2B, #$AD, #$AD, #$A6, #$AD, #$2B, #$AD, { C8 - CF } + #$AD, #$AD, #$AD, #$2B, #$2B, #$2B, #$2B, #$2B, { D0 - D7 } + #$2B, #$2B, #$2B, #$A0, #$A0, #$A0, #$A0, #$A0, { D8 - DF } + #$20, #$20, #$20, #$AD, #$20, #$20, #$B5, #$20, { E0 - E7 } + #$20, #$20, #$20, #$20, #$20, #$F8, #$20, #$20, { E8 - EF } + #$A0, #$B1, #$20, #$20, #$20, #$20, #$F7, #$20, { F0 - F7 } + #$B0, #$B0, #$B0, #$20, #$20, #$B2, #$A0, #$20); { F8 - FF } + +procedure Register; +procedure FKeysToFile(var FKeys : TFuncKeysTable; FName : String); +procedure FileToFKeys(var FKeys : TFuncKeysTable; FName : String); +function AddFKey(var FKeys : TFuncKeysTable; + ScanCode : Char; + Shift : TShiftState; + Ext : Boolean; + Value : TFuncKeyValue) : Boolean; + + + +implementation +{$DEFINE Debug} { Add or remove minus sign before dollar sign to } + { generate code for debug message output } + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TEmulVT]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function ShiftStateToString(var State : TShiftState) : String; +begin + Result := ''; + if ssShift in State then + Result := Result + 'ssShift '; + if ssAlt in State then + Result := Result + 'ssAlt '; + if ssCtrl in State then + Result := Result + 'ssCtrl '; + if ssLeft in State then + Result := Result + 'ssLeft '; + if ssRight in State then + Result := Result + 'ssRight '; + if ssMiddle in State then + Result := Result + 'ssMiddle '; + if ssDouble in State then + Result := Result + 'ssDouble '; + if Result = '' then + Result := 'ssNormal'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function StringToShiftState(var S : String) : TShiftState; +begin + Result := []; + if Pos('ssShift', S) <> 0 then + Result := Result + [ssShift]; + if Pos('ssAlt', S) <> 0 then + Result := Result + [ssAlt]; + if Pos('ssCtrl', S) <> 0 then + Result := Result + [ssCtrl]; + if Pos('ssLeft', S) <> 0 then + Result := Result + [ssLeft]; + if Pos('ssRight', S) <> 0 then + Result := Result + [ssRight]; + if Pos('ssMiddle', S) <> 0 then + Result := Result + [ssMiddle]; + if Pos('ssDouble', S) <> 0 then + Result := Result + [ssDouble]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function xdigit(Ch : char) : integer; +begin + if ch in ['0'..'9'] then + Result := Ord(ch) - ord('0') + else if ch in ['A'..'Z'] then + Result := Ord(ch) - Ord('A') + 10 + else if ch in ['a'..'z'] then + Result := Ord(ch) - Ord('a') + 10 + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function xdigit2(S : PChar) : integer; +begin + Result := 16 * xdigit(S[0]) + xdigit(S[1]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function FuncKeyValueToString(var S : TFuncKeyValue) : String; +var + I : Integer; +begin + Result := ''; + for I := 1 to Length(S) do begin + if (Ord(S[I]) < 32) or (Ord(S[I]) >= 127) or + (S[I] = '''') or (S[I] = '\') then + Result := Result + '\x' + IntToHex(Ord(S[I]), 2) + else + Result := Result + S[I]; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function StringToFuncKeyValue(var S : String) : TFuncKeyValue; +var + I : Integer; +begin + Result := ''; + I := 1; + while I <= Length(S) do begin + if (S[I] = '\') and + ((I + 3) <= Length(S)) and + (S[I + 1] = 'x') then begin + Result := Result + chr(xdigit2(@S[I + 2])); + I := I + 3; + end + else + Result := Result + S[I]; + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function AddFKey(var FKeys : TFuncKeysTable; + ScanCode : Char; + Shift : TShiftState; + Ext : Boolean; + Value : TFuncKeyValue) : Boolean; +var + I : Integer; +begin + { Search for existing key definition to replace it } + for I := Low(FKeys) to High(FKeys) do begin + if (FKeys[I].ScanCode = ScanCode) and + (FKeys[I].Shift = Shift) and + (FKeys[I].Ext = Ext) then begin + FKeys[I].Value := Value; + Result := TRUE; { Success} + Exit; + end; + end; + + { Key not existing, add in an empty space } + for I := Low(FKeys) to High(FKeys) do begin + if FKeys[I].ScanCode = #0 then begin + FKeys[I].ScanCode := ScanCode; + FKeys[I].Shift := Shift; + FKeys[I].Ext := Ext; + FKeys[I].Value := Value; + Result := TRUE; { Success} + Exit; + end; + end; + + { Failure, no more space available } + Result := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure FKeysToFile(var FKeys : TFuncKeysTable; FName : String); +var + I : Integer; + F : TextFile; +begin + AssignFile(F, FName); + Rewrite(F); + for I := Low(FKeys) to High(FKeys) do begin + with FKeys[I] do begin + if ScanCode <> chr(0) then + WriteLn(F, IntToHex(Ord(ScanCode), 2), ', ', + ShiftStateToString(Shift), ', ', + Ext, ', ''', + FuncKeyValueToString(Value), ''''); + end; + end; + CloseFile(F); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetToken(var S : String; var I : Integer; Delim : Char) : String; +begin + Result := ''; + while (I <= Length(S)) and (S[I] = ' ') do + Inc(I); + while (I <= Length(S)) and (S[I] <> Delim) do begin + Result := Result + S[I]; + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure FileToFKeys(var FKeys : TFuncKeysTable; FName : String); +var + I, J : Integer; + F : TextFile; + S, T : String; + sc : Integer; +begin + AssignFile(F, FName); + {$I-} + Reset(F); + if IOResult <> 0 then begin + { File do not exist, create default one } + FKeysToFile(FKeys, FName); + Exit; + end; + + for I := Low(FKeys) to High(FKeys) do begin + with FKeys[I] do begin + ScanCode := chr(0); + Shift := []; + Ext := FALSE; + Value := ''; + if not Eof(F) then begin + { 71, ssNormal, TRUE, '\x1B[H' } + ReadLn(F, S); + J := 1; + T := GetToken(S, J, ','); + if (Length(T) > 0) and (T[1] <> ';') then begin + sc := xdigit2(@T[1]); + if sc <> 0 then begin + ScanCode := chr(sc); + Inc(J); + T := GetToken(S, J, ','); + Shift := StringToShiftState(T); + Inc(J); + T := GetToken(S, J, ','); + Ext := UpperCase(T) = 'TRUE'; + Inc(J); + T := GetToken(S, J, ''''); + Inc(J); + T := GetToken(S, J, ''''); + Value := StringToFuncKeyValue(T); + end; + end; + end; + end; + end; + CloseFile(F); +{$I+} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DebugString(Msg : String); +const + Cnt : Integer = 0; +var + Buf : String[20]; +begin +{$IFDEF Debug} + Cnt := Cnt + 1; + Buf := IntToHex(Cnt, 4) + ' ' + #0; + OutputDebugString(@Buf[1]); + +{$IFNDEF WIN32} + if Length(Msg) < High(Msg) then + Msg[Length(Msg) + 1] := #0; +{$ENDIF} + + OutputDebugString(@Msg[1]); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TLine.Create; +begin + inherited Create; + FillChar(Txt, SizeOf(Txt), ' '); + FillChar(Att, SizeOf(Att), Chr(F_WHITE)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TLine.Clear(Attr : Byte); +begin + FillChar(Txt, SizeOF(Txt), ' '); + FillChar(Att, SizeOf(Att), Attr); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TScreen.Create; +begin + inherited Create; + FRowCount := 0; + FBackRowCount := 0; + FBackEndRow := 0; + FBackColor := vtsWhite; + FOptions := [vtoBackColor]; + SetRowCount(25); + FColCount := 80; + FRowSaved := -1; + FColSaved := -1; + FScrollRowTop := 0; + {FScrollRowBottom := FRowCount - 1; // WM + SE 09/08/00 } + FAttribute := F_WHITE; + InvClear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TScreen.Destroy; +var + nRow : Integer; +begin + for nRow := 0 to FRowCount + FBackRowCount - 1 do + FLines^[nRow].Free; + FreeMem (FLines, (FRowCount + FBackRowCount) * SizeOf(TObject)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.AdjustFLines(NewCount : Integer); +var + NewLines : PLineArray; + CurrCount : Integer; + nRow : Integer; +begin + CurrCount := FRowCount + FBackRowCount; + if (NewCount <> CurrCount) and (NewCount > 0) then begin + GetMem(NewLines, NewCount * SizeOf(TObject)); + if NewCount > CurrCount then begin + if CurrCount <> 0 then + Move(FLines^, NewLines^, CurrCount * SizeOf(TObject)); + for nRow := CurrCount to NewCount - 1 do + NewLines^[nRow] := TLine.Create; + if CurrCount <> 0 then + FreeMem(FLines, CurrCount * SizeOf(TObject)); + end + else begin + Move (FLines^, NewLines^, NewCount * SizeOf(TObject)); + for nRow := NewCount to CurrCount - 1 do + FLines^[nRow].Free; + FreeMem(FLines, CurrCount * SizeOf(TObject)); + end; + FLines := NewLines; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.SetRowCount(NewCount : Integer); +begin + if NewCount <> FRowCount then begin + AdjustFLines(NewCount + FBackRowCount); + FRowCount := NewCount; + FScrollRowBottom := FRowCount - 1; { WM + SE 09/08/00 } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.SetBackRowCount(NewCount : Integer); +begin + if NewCount <> FBackRowCount then begin + AdjustFLines(FRowCount + NewCount); + FBackRowCount := NewCount; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CopyScreenToBack; +{ Copies the current host screen into the scrollback buffer. } +var + Temp : TLine; + Row : Integer; + Pass : Integer; + nCol : Integer; +begin + if FBackRowCount >= FRowCount then begin + Dec (FBackEndRow, FRowCount); + if (0 - FBackEndRow) >= FBackRowCount then + FBackEndRow := 1 - FBackRowCount; + { We have to make FRowCount lines available at the head of the + scrollback buffer. These will come from the end of the scrollback + buffer. We'll make FRowCount passes through the scrollback buffer + moving the available lines up to the top and the existing lines + down a page at a time. + Net result is that we only move each line once. } + For Pass := 0 To FRowCount - 1 Do begin + Row := FBackEndRow + Pass; + Temp := Lines[Row]; + Inc (Row, FRowCount); + While Row < 0 Do begin + Lines[Row - FRowCount] := Lines[Row]; + Inc (Row, FRowCount); + end; + Lines[Row - FRowCount] := Temp; + end; + + { Now, copy the host screen lines to the ones we made available. } + For Row := 0 To FRowCount - 1 Do begin + Move (Lines[Row].Txt, Lines[Row - FRowCount].Txt, FColCount); + Move (Lines[Row].Att, Lines[Row - FRowCount].Att, FColCount); + if vtoBackColor in FOptions then begin + with Lines[Row - FRowCount] do begin + for nCol := 0 to FColCount - 1 do begin + Att[nCol] := Att[nCol] And $8F Or (Ord (FBackColor) shl 4); + end; + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ScrollUp; +var + Temp : TLine; + Row : Integer; + nCol : Integer; +begin + if FBackRowCount > 0 then begin + if (0 - FBackEndRow) < (FBackRowCount - 1) then + Dec (FBackEndRow); + Temp := Lines[FBackEndRow]; + For Row := FBackEndRow + 1 To -1 Do begin + Lines[Row - 1] := Lines[Row]; + end; + Lines[-1] := Lines[FScrollRowTop]; + if vtoBackColor in FOptions then begin + with Lines[-1] do begin + for nCol := 0 to FColCount - 1 do begin + Att[nCol] := Att[nCol] And $8F Or (Ord (FBackColor) shl 4); + end; + end; + end; + + end + else + Temp := Lines[FScrollRowTop]; + + for Row := FScrollRowTop + 1 to FScrollRowBottom do + Lines[Row - 1] := Lines[Row]; + Lines[FScrollRowBottom] := Temp; + Temp.Clear(F_WHITE {FAttribute}); + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ScrollDown; +var + Temp : TLine; + Row : Integer; +begin + Temp := Lines[FScrollRowBottom]; + for Row := FScrollRowBottom DownTo FScrollRowTop + 1 do + Lines[Row] := Lines[Row - 1]; + Lines[FScrollRowTop] := Temp; + Temp.Clear(F_WHITE {FAttribute}); + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorDown; +begin + Inc(FRow); + if FRow > FScrollRowBottom then begin + FRow := FScrollRowBottom; + ScrollUp; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorUp; +begin + Dec(FRow); + if FRow < 0 then begin + Inc(FRow); + ScrollDown; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorRight; +begin + Inc(FCol); + if FCol >= FColCount then begin + FCol := 0; + CursorDown; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorLeft; +begin + Dec(FCol); + if FCol < 0 then begin + FCol := FColCount - 1; + CursorUp; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CarriageReturn; +begin + FCol := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TScreen.GetEscapeParam(From : Integer; var Value : Integer) : Integer; +begin + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] = ' ') do + From := From + 1; + + Value := 0; + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] in ['0'..'9']) do begin + Value := Value * 10 + Ord(FEscBuffer[From]) - Ord('0'); + From := From + 1; + end; + + Result := From; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.UnimplementedEscape(EscCmd : Char); +{var + Buf : String;} +begin + DebugString('Unimplemented Escape Sequence: ' + FEscBuffer + EscCmd + #13 + #10); +{ Buf := FEscBuffer + EscCmd + #0; + MessageBox(0, @Buf[1], 'Unimplemented Escape Sequence', MB_OK); } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.InvalidEscape(EscCmd : Char); +{var + Buf : String;} +begin + DebugString('Invalid Escape Sequence: ' + FEscBuffer + EscCmd + #13 + #10); +{ Buf := FEscBuffer + EscCmd + #0; + MessageBox(0, @Buf[1], 'Invalid Escape Sequence', MB_OK); } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessESC_D; { Index } +begin + UnimplementedEscape('D'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Move cursor Up, scroll down if necessary } +procedure TScreen.ProcessESC_M; { Reverse index } +begin + Dec(FRow); + if FRow < FScrollRowTop then begin + FRow := FScrollRowTop; + ScrollDown; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessESC_E; { Next line } +begin + UnimplementedEscape('E'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_u; { Restore Cursor } +begin + UnimplementedEscape('u'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ IBM character set operation (not part of the ANSI standard) } +{ [0I => Set IBM character set } +{ [1;nnnI => Literal mode for nnn next characters } +{ [2;onoffI => Switch carbon mode on (1) or off (0) } +{ [3;ch;cl;sh;slI => Receive carbon mode keyboard code } +{ [4I => Select ANSI character set } +procedure TScreen.ProcessCSI_I; +var + From, mode, nnn : Integer; + ch, cl, sh, sl : Integer; +begin + From := GetEscapeParam(2, Mode); + + case Mode of + 0: begin { Select IBM character set } + FNoXlat := TRUE; + end; + 1: begin { Set literal mode for next N characters } + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, FCntLiteral) + else + FCntLiteral := 1; + end; + 2: begin { Switch carbon mode on or off } + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, nnn) + else + nnn := 0; + FCarbonMode := (nnn <> 0); + end; + 3: begin { Receive carbon mode key code } + ch := 0; cl := 0; sh := 0; sl := 0; + if FEscBuffer[From] = ';' then begin + From := GetEscapeParam(From + 1, cl); + if FEscBuffer[From] = ';' then begin + From := GetEscapeParam(From + 1, ch); + if FEscBuffer[From] = ';' then begin + From := GetEscapeParam(From + 1, sl); + if FEscBuffer[From] = ';' then begin + GetEscapeParam(From + 1, sh); + end; + end; + end; + end; + DebugString('Special key ' + + IntToHex(ch, 2) + IntToHex(cl, 2) + ' ' + + IntToHex(sh, 2) + IntToHex(sl, 2)); + end; + 4: begin { Select ANSI character set } + FNoXlat := FALSE; + end; + else + UnimplementedEscape('I'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.BackSpace; +begin + if FCol > 0 then + Dec(FCol); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ClearScreen; +var + Row : Integer; +begin + for Row := 0 to FRowCount - 1 do + Lines[Row].Clear(FAttribute); + FRow := 0; + FCol := 0; + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.InvClear; +begin + with FInvRect do begin + Top := 9999; + Left := 9999; + Right := -1; + Bottom := -1; + end; + FAllInvalid := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.InvRect(nRow, nCol : Integer); +begin + if not FAllInvalid then begin + if FInvRect.Top > nRow then + FInvRect.Top := nRow; + if FInvRect.Bottom < nRow then + FInvRect.Bottom := nRow; + if FInvRect.Left > nCol then + FInvRect.Left := nCol; + if FInvRect.Right < nCol then + FInvRect.Right := nCol; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The FLines array is inverted with the last host line at position 0 and + the first host line as position FRowCount - 1. } +procedure Tscreen.SetLines(I : Integer; Value : TLine); +begin + if I >= FRowCount then + FLines^[0] := Value + else + FLines^[FRowCount - 1 - I] := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TScreen.GetLines(I : Integer) : TLine; +begin + if I >= FRowCount then + Result := FLines^[0] + else + Result := FLines^[FRowCount - 1 - I]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.Eol; +begin + with Lines[FRow] do begin + FillChar(Txt[FCol], FColCount - FCol, ' '); + FillChar(Att[FCol], (FColCount - FCol) * SizeOf(Att[FCol]), FAttribute); + end; + InvRect(Frow, FCol); + InvRect(Frow, FColCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.Eop; +var + NRow : Integer; +begin + Eol; + for NRow := FRow + 1 to FRowCount - 1 do + Lines[NRow].Clear(FAttribute); + if FRow = 0 then + FAllInvalid := TRUE + else begin + InvRect(FRow, 0); + InvRect(FRowCount, FColCount); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_J; { Clear the screen } +var + Mode : Integer; + Row : Integer; +begin + GetEscapeParam(2, Mode); + case Mode of + 0: begin { Cursor to end of screen } + FAttribute := F_WHITE; + Eop; + end; + 1: begin { Start of screen to cursor } + for Row := 0 to FRow do + Lines[Row].Clear(FAttribute); + InvRect(0, 0); + InvRect(FRow, FColCount); + end; + 2: begin { Entire screen } + if vtoCopyBackOnClear in FOptions then CopyScreenToBack; + ClearScreen; + end; + else + InvalidEscape('J'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_K; { Erase to End of Line } +begin + Eol; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_L; { Insert Line } +var + nLine : Integer; + nRow : Integer; + Temp : TLine; +begin + FCol := 0; + GetEscapeParam(2, nLine); + if nLine = 0 then + nLine := 1; + + if (FRow + nLine) > FScrollRowBottom then begin + for nRow := FRow to FScrollRowBottom do + Lines[nRow].Clear(FAttribute); + Exit; + end; + + for nRow := FScrollRowBottom downto FRow + nLine do begin + Temp := Lines[nRow]; + Lines[nRow] := Lines[nRow - nLine]; + Lines[nRow - nLine] := Temp; + end; + + for nRow := FRow to FRow + nLine - 1 do + Lines[nRow].Clear(FAttribute); + + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_M; { Delete Line } +var + nLine : Integer; + nRow : Integer; + Temp : TLine; +begin + FAllInvalid := TRUE; + FCol := 0; + GetEscapeParam(2, nLine); + if nLine = 0 then + nLine := 1; + + if (FRow + nLine) > FScrollRowBottom then begin + for nRow := FRow to FScrollRowBottom do + Lines[nRow].Clear(FAttribute); + Exit; + end; + + for nRow := FRow to FRow + nLine - 1 do + Lines[nRow].Clear(F_WHITE {FAttribute}); { 12/11/99 } + for nRow := FRow to FScrollRowBottom - nLine do begin + Temp := Lines[nRow]; + Lines[nRow] := Lines[nRow + nLine]; + Lines[nRow + nLine] := Temp; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_m_lc; { Select Attributes } +var + From, n : Integer; +begin + if FEscBuffer[1] <> '[' then + Exit; + + if Length(FEscBuffer) < 2 then begin + FAttribute := F_WHITE; + FReverseVideo := FALSE; + Exit; + end; + + From := 2; + while From <= Length(FEscBuffer) do begin + if FEscBuffer[From] in [' ', '[', ';'] then + Inc(From) + else begin + From := GetEscapeParam(From, n); + case n of + 0: begin { All attributes off } + FAttribute := F_WHITE; + FReverseVideo := FALSE; + FUnderLine := FALSE; + end; + 1: begin { High intensity } + FAttribute := FAttribute or F_INTENSE; + end; + 4: begin { Underline } + FUnderLine := TRUE; + end; + 5: begin { Blinking } + FAttribute := FAttribute or B_BLINK; + end; + 7: begin { Reverse video } + FReverseVideo := TRUE; + end; + 8: begin { Secret } + FAttribute := 0; + end; + 10: begin { Don't force high bit } + FForceHighBit := FALSE; + end; + 12: begin { Force high bit on } + FForceHighBit := TRUE; + end; + 22: begin { Normal intensity } + FAttribute := FAttribute and (not F_INTENSE); + end; + 27: begin { Normal characters } + FAttribute := F_WHITE; + FReverseVideo := FALSE; + end; + 30, 31, 32, 33, 34, 35, 36, 37: + begin { Foreground color } + FAttribute := (n mod 10) or (FAttribute and $F8); + end; + 40, 41, 42, 43, 44, 45, 46, 47: + begin { Background color } + FAttribute := ((n mod 10) shl 4) or (FAttribute and $8F); + end; + else + InvalidEscape('m'); + end; + end; + end; + if FReverseVideo then begin + FAttribute := ((FAttribute and 7) shl 4) or + ((FAttribute shr 4) and 7) or + (FAttribute and $88); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_n_lc; { Cursor position report } +begin + UnimplementedEscape('n'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_at; { Insert character } +var + nChar : Integer; + nCnt : Integer; + nCol : Integer; + Line : TLine; +begin + GetEscapeParam(2, nChar); + if nChar = 0 then + nChar := 1; + + nCnt := FColCount - FCol - nChar; + if nCnt <= 0 then begin + Eol; + Exit; + end; + + Line := Lines[FRow]; + for nCol := FColCount - 1 downto FCol + nChar do begin + Line.Txt[nCol] := Line.Txt[nCol - nChar]; + Line.Att[nCol] := Line.Att[nCol - nChar]; + InvRect(Frow, nCol); + end; + + for nCol := FCol to FCol + nChar - 1 do begin + Line.Txt[nCol] := ' '; + Line.Att[nCol] := FAttribute; + InvRect(Frow, nCol); + end; + +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_r_lc; { Scrolling margins } +var + From, Top, Bottom : Integer; +begin + From := GetEscapeParam(2, Top); + if Top = 0 then begin { Default = full screen } + FScrollRowTop := 0; + FScrollRowBottom := FRowCount - 1; + end + else begin + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] = ' ') do + From := From + 1; + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, Bottom) + else + Bottom := 1; + + FScrollRowTop := Top - 1; + FScrollRowBottom := Bottom - 1; + + if (FScrollRowBottom <= FScrollRowTop) or + (FScrollRowTop < 0) or + (FScrollRowBottom >= FRowCount) then begin + FScrollRowTop := 0; + FScrollRowBottom := FRowCount - 1; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_s_lc; { Save cursor location } +begin + ProcessCSI_7; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_u_lc; { Restore cursor location } +begin + ProcessCSI_8; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_7; { Save cursor location } +begin + FRowSaved := FRow; + FColSaved := FCol; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_8; { Restore cursor location } +begin + if FRowSaved = -1 then + GotoXY(0, 0) + else + GotoXY(FColSaved, FRowSaved); + FRowSaved := -1; + FColSaved := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_H; { Set Cursor Position } +var + From, Row, Col : Integer; +begin + From := GetEscapeParam(2, Row); + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] = ' ') do + From := From + 1; + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, Col) + else + Col := 1; + + GotoXY(Col - 1, Row - 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_h_lc; { Terminal mode set } +var + Priv : Boolean; + Mode : Integer; +begin + if FEscBuffer[1] <> '[' then begin + UnimplementedEscape('h'); + Exit; + end; + + Priv := (FEscBuffer[2] = '?'); + if not Priv then begin + UnimplementedEscape('h'); + Exit; + end; + + GetEscapeParam(3, Mode); + case Mode of + 1 : { ANSI cursor keys } + FCKeyMode := TRUE; + 4 : { Smooth scroll OFF } + { Ignore }; + 7: { Auto-wrap OFF } + FAutoWrap := TRUE; + 25: { Cursor visible } + begin + FCursorOff := FALSE; + if Assigned(FOnCursorVisible) then + FOnCursorVisible(Self); + end; + else + UnimplementedEscape('h'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_l_lc; { Terminal mode reset } +var + Priv : Boolean; + Mode : Integer; +begin + if FEscBuffer[1] <> '[' then begin + UnimplementedEscape('l'); + Exit; + end; + + Priv := (FEscBuffer[2] = '?'); + if not Priv then begin + UnimplementedEscape('l'); + Exit; + end; + + GetEscapeParam(3, Mode); + case Mode of + 1 : { ANSI cursor keys } + FCKeyMode := FALSE; + 4 : { Smooth scroll OFF } + { Ignore }; + 7: { Auto-wrap OFF } + FAutoWrap := FALSE; + 25: { Cursor invisible } + begin + FCursorOff := TRUE; + if Assigned(FOnCursorVisible) then + FOnCursorVisible(Self); + end; + else + UnimplementedEscape('l'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_A; { Cursor Up } +var + Row : Integer; +begin + GetEscapeParam(2, Row); + if Row <= 0 then + Row := 1; + FRow := FRow - Row; + if FRow < 0 then + FRow := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_B; { Cursor Down } +var + Row : Integer; +begin + GetEscapeParam(2, Row); + if Row <= 0 then + Row := 1; + FRow := FRow + Row; + if FRow >= FRowCount then + FRow := FRowCount - 1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_C; { Cursor Right } +var + Col : Integer; +begin + GetEscapeParam(2, Col); + if Col <= 0 then + Col := 1; + FCol := FCol + Col; + if FCol >= FColCount then begin + if FAutoWrap then begin + FCol := FCol - FColCount; + Inc(FRow); + if FRow >= FRowCount then + FRow := FRowCount - 1; + end + else + FCol := FColCount - 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_D; { Cursor Left } +var + Col : Integer; +begin + GetEscapeParam(2, Col); + if Col <= 0 then + Col := 1; + FCol := FCol - Col; + if FCol < 0 then + FCol := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_P; { Delete Character } +var + Count : Integer; + nCol : Integer; +begin + GetEscapeParam(2, Count); + if Count <= 0 then + Count := 1; + with Lines[FRow] do begin + for nCol := Fcol to FColCount - Count - 1 do begin + Txt[nCol] := Txt[nCol + Count]; + Att[nCol] := Att[nCol + Count]; + end; + for nCol := FcolCount - Count - 1 to FColCount - 1 do begin + Txt[nCol] := ' '; + Att[nCol] := F_WHITE; + end; + end; + InvRect(Frow, FCol); + InvRect(Frow, FColCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_S; { Scroll up } +begin + ScrollUp; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_T; { Scroll down } +begin + UnimplementedEscape('T'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G0(EscCmd : Char); { G0 character set } +begin + case EscCmd of + '0': begin + FCharSetG0 := EscCmd; + FXlatInputTable := @ibm_iso8859_1_G1; + FXlatOutputTable := @ibm_iso8859_1_G1; + FNoXlat := FNoXlatInitial; +{ FNoXlat := FALSE;} + end; + 'B': begin + FCharSetG0 := EscCmd; + FXlatInputTable := @ibm_iso8859_1_G0; + FXlatOutputTable := @ibm_iso8859_1_G0; + FNoXlat := FNoXlatInitial; + end; + else + InvalidEscape(EscCmd); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G1(EscCmd : Char); { G1 character set } +begin + FCharSetG1 := EscCmd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G2(EscCmd : Char); { G2 character set } +begin + FCharSetG2 := EscCmd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G3(EscCmd : Char); { G2 character set } +begin + FCharSetG3 := EscCmd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessEscape(EscCmd : Char); +begin + if Length(FEscBuffer) = 0 then begin + case EscCmd of + 'D': ProcessESC_D; { Index } + 'M': ProcessESC_M; { Reverse index } + 'E': ProcessESC_E; { Next line } + 'H': ; { Tabulation set } + '7': ProcessCSI_7; { Save cursor } + '8': ProcessCSI_8; { Restore Cursor } + '=': ; { VT52 } { Enter Alternate keypad } + '>': ; { VT52 } { Exit Alternate keypad } + '<': ; { VT52 } { Enter ANSI mode } + else + InvalidEscape(EscCmd); + WriteLiteralChar(EscCmd); + end; + + Exit; + end; + + case FEscBuffer[1] of + ' ': begin + case EscCmd of + 'F': ; + else + InvalidEscape(EscCmd); + end; + end; + '[': begin + case EscCmd of + 'I': ProcessCSI_I; { Select IBM char set } + { Extension F. Piette !! } + 'J': ProcessCSI_J; { Clear the screen } + 'K': ProcessCSI_K; { Erase to End of Line } + 'L': ProcessCSI_L; { Insert Line } + 'M': ProcessCSI_M; { Delete Line } + 'm': ProcessCSI_m_lc; { Select Attributes } + 'n': ProcessCSI_n_lc; { Cursor position report } + '@': ProcessCSI_at; { Insert character } + 'r': ProcessCSI_r_lc; { Set Top and Bottom marg } + 's': ProcessCSI_s_lc; { Save cursor location } + 'u': ProcessCSI_u_lc; { Restore cursor location } + 'H': ProcessCSI_H; { Set Cursor Position } + 'f': ProcessCSI_H; { Set Cursor Position } + 'g': ; { Tabulation Clear } + 'h': ProcessCSI_h_lc; { Terminal mode set } + 'l': ProcessCSI_l_lc; { Terminal mode reset } + 'A': ProcessCSI_A; { Cursor Up } + 'B': ProcessCSI_B; { Cursor Down } + 'C': ProcessCSI_C; { Cursor Right } + 'D': ProcessCSI_D; { Cursor Left } + 'P': ProcessCSI_P; { Delete Character } + 'S': ProcessCSI_S; { Scroll up } + 'T': ProcessCSI_T; { Scroll down } + '>': ; { } + else + InvalidEscape(EscCmd); + end; + end; + '(': process_charset_G0(EscCmd); { G0 character set } + ')': process_charset_G1(EscCmd); { G1 character set } + '*': process_charset_G2(EscCmd); { G2 character set } + '+': process_charset_G3(EscCmd); { G3 character set } + else + InvalidEscape(EscCmd); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.WriteLiteralChar(Ch : Char); +var + Line : TLine; +begin + if FCol >= FColCount then begin + if FAutoWrap then begin + FCol := 0; + Inc(FRow); + if FRow >= FRowCount then begin + Dec(FRow); + ScrollUp; + end; + end; + end; + + if FForceHighBit then + Ch := Chr(ord(ch) or $80); + + Line := Lines[FRow]; + Line.Txt[FCol] := Ch; + Line.Att[FCol] := FAttribute; + InvRect(Frow, FCol); + + if FCol < High(Line.Txt) then + Inc(FCol); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.SetAttr(Att : Char); +begin + { Not implemented } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Write a single character at current cursor location. } +{ Update cursor position. } +procedure TScreen.WriteChar(Ch : Char); +var + bProcess : Boolean; +begin + if FCntLiteral > 0 then begin + if (FCntLiteral and 1) <> 0 then + WriteLiteralChar(Ch) + else + SetAttr(Ch); + Dec(FCntLiteral); + Exit; + end; + + if FNoXlat then + Ch := FXlatInputTable^[ord(Ch)]; + + if FEscFLag then begin + bProcess := FALSE; + if (Length(FEscBuffer) = 0) and + (Ch in ['D', 'M', 'E', 'H', '7', '8', '=', '>', '<']) then + bProcess := TRUE + else if (Length(FEscBuffer) = 1) and + (FEscBuffer[1] in ['(', ')', '*', '+']) then + bProcess := TRUE + else if (Ch in ['0'..'9', ';', '?', ' ']) or + ((Length(FEscBuffer) = 0) and + (ch in ['[', '(', ')', '*', '+'])) then begin + FEscBuffer := FEscBuffer + Ch; + if Length(FEscBuffer) >= High(FEscBuffer) then begin + MessageBeep(MB_ICONASTERISK); + FEscBuffer := ''; + FEscFlag := FALSE; + end; + end + else + bProcess := TRUE; + + if bProcess then begin + ProcessEscape(Ch); + FEscBuffer := ''; + FEscFlag := FALSE; + end; + + Exit; + end; + + case Ch of + #0: ; + #7: MessageBeep(MB_ICONASTERISK); + #8: BackSpace; + #9: begin + repeat + Inc(FCol); + until (FCol Mod 8) = 0; + end; + #10: begin + CursorDown; + if FAutoCR then + CarriageReturn; + end; + #13: begin + CarriageReturn; + if FAutoLF then + CursorDown; + end; + #14: begin + FXlatInputTable := @ibm_iso8859_1_G1; + FXlatOutputTable := @ibm_iso8859_1_G1; + end; + #15: begin + FXlatInputTable := @ibm_iso8859_1_G0; + FXlatOutputTable := @ibm_iso8859_1_G0; + end; + #27: begin + FEscBuffer := ''; + FEscFlag := TRUE; + end; + else + WriteLiteralChar(Ch); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Write characters at current cursor location. Update cursor position. } +procedure TScreen.WriteStr(Str : String); +var + I : Integer; +begin + for I := 1 to Length(Str) do + WriteChar(Str[I]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Read characters from the cursor to end of line } +function TScreen.ReadStr : String; +var + Line : TLine; + Len : Integer; +begin + Line := Lines[FRow]; + Len := FColCount - FCol; + if Len <= 0 then + Result := '' + else begin + SetLength(Result, Len); + Move(Line.Txt[FCol], Result[1], Len); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.GotoXY(X, Y : Integer); +begin + if X < 0 then + FCol := 0 + else if X >= FColCount then + FCol := FColCount - 1 + else + FCol := X; + + if Y < 0 then + FRow := 0 + else if Y >= FRowCount then + FRow := FRowCount - 1 + else + FRow := Y; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCaret; +begin +{$IFDEF CHAR_ZOOM} + SetCaretPos(FCharPos[FScreen.FCol] + FLeftMargin + 2, + FLinePos[FScreen.FRow - FTopLine] + FTopMargin + 3); +{$ELSE} + SetCaretPos(FScreen.FCol * FCharWidth + FLeftMargin, + (FScreen.FRow - FTopLine) * FLineHeight + FTopMargin); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Adjusts the scrollbar properties to match the number of host and scrollback + lines that we can scroll through. } +procedure TCustomEmulVT.AdjustScrollBar; +var + VisibleLines : Integer; +begin + if not FVScrollBar.Visible then + Exit; + FVScrollBar.Min := FScreen.FBackEndRow; +{$IFDEF CHAR_ZOOM} + VisibleLines := Trunc((Height - FTopMargin - FBottomMargin) / (LineHeight * FLineZoom)); +{$ELSE} + VisibleLines := (Height - FTopMargin - FBottomMargin) Div LineHeight; +{$ENDIF} + if VisibleLines > FScreen.FRowCount then + VisibleLines := FScreen.FRowCount; + FVScrollBar.Max := FScreen.FRowCount - VisibleLines; + FVScrollBar.Position := FTopLine; + FVScrollBar.SmallChange := 1; + FVScrollBar.LargeChange := VisibleLines; + FVScrollBar.Enabled := FVScrollBar.Max > FVScrollBar.Min; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.Clear; +begin + FScreen.ClearScreen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCursor(Row, Col : Integer); +begin + FScreen.GotoXY(Col - 1, Row - 1); +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WriteChar(Ch : Char); +begin + if FCaretCreated and FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + if FLog then + Write(FFileHandle, Ch); + FScreen.WriteChar(ch); + if FAutoRepaint then + UpdateScreen; +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WriteStr(Str : String); +var + I : Integer; +begin + if FCaretCreated and FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + for I := 1 to Length(Str) do begin + if FLog then + Write(FFileHandle, Str[I]); + FScreen.WriteChar(Str[I]); + end; + if FAutoRepaint then + UpdateScreen; +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WriteBuffer(Buffer : Pointer; Len : Integer); +var + I : Integer; +begin + if FCaretCreated and FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + for I := 0 to Len - 1 do begin + if FLog then + Write(FFileHandle, PChar(Buffer)[I]); + FScreen.WriteChar(PChar(Buffer)[I]); + end; + if FAutoRepaint then + UpdateScreen; +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.ReadStr : String; +begin + Result := FScreen.ReadStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.CopyHostScreen; +begin + FScreen.CopyScreenToBack; + AdjustScrollBar; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomEmulVT.Create(AOwner: TComponent); +type + TMyLogPalette = record + palVersion: Word; + palNumEntries: Word; + palPalEntry: array[0..NumPaletteEntries - 1] of TPaletteEntry; + end; + TPLogPalette = ^TLogPalette; +var + plgpl : ^TMyLogPalette; + I : Integer; +begin + inherited Create(AOwner); + ControlStyle := ControlStyle + [csOpaque]; + + New(plgpl); + plgpl^.palNumEntries := High(plgpl^.palPalEntry) + 1; + plgpl^.palVersion := $300; + + FTopMargin := 4; + FLeftMargin := 6; + FRightMargin := 6; + FBottomMargin := 4; + + FPaletteEntries[0].peRed := 0; { Black } + FPaletteEntries[0].peGreen := 0; + FPaletteEntries[0].peBlue := 0; + FPaletteEntries[1].peRed := 168; { Red } + FPaletteEntries[1].peGreen := 0; + FPaletteEntries[1].peBlue := 0; + FPaletteEntries[2].peRed := 0; { Green } + FPaletteEntries[2].peGreen := 168; + FPaletteEntries[2].peBlue := 0; + FPaletteEntries[3].peRed := 168; { Yellow } + FPaletteEntries[3].peGreen := 168; + FPaletteEntries[3].peBlue := 0; + FPaletteEntries[4].peRed := 0; { Dark Blue } + FPaletteEntries[4].peGreen := 0; + FPaletteEntries[4].peBlue := 168; + FPaletteEntries[5].peRed := 168; { Magenta } + FPaletteEntries[5].peGreen := 0; + FPaletteEntries[5].peBlue := 168; + FPaletteEntries[6].peRed := 0; { Cyan } + FPaletteEntries[6].peGreen := 112; + FPaletteEntries[6].peBlue := 216; + FPaletteEntries[7].peRed := 200; { White } + FPaletteEntries[7].peGreen := 200; + FPaletteEntries[7].peBlue := 200; + FPaletteEntries[8].peRed := 84; { Grey } + FPaletteEntries[8].peGreen := 84; + FPaletteEntries[8].peBlue := 84; + FPaletteEntries[9].peRed := 255; { Red Highlight } + FPaletteEntries[9].peGreen := 84; + FPaletteEntries[9].peBlue := 212; + FPaletteEntries[10].peRed := 84; { Green Highlight } + FPaletteEntries[10].peGreen := 255; + FPaletteEntries[10].peBlue := 84; + FPaletteEntries[11].peRed := 255; { Yellow Highlight } + FPaletteEntries[11].peGreen := 255; + FPaletteEntries[11].peBlue := 84; + FPaletteEntries[12].peRed := 84; { Blue Highlight } + FPaletteEntries[12].peGreen := 84; + FPaletteEntries[12].peBlue := 255; + FPaletteEntries[13].peRed := 255; { Magenta Highlight } + FPaletteEntries[13].peGreen := 84; + FPaletteEntries[13].peBlue := 255; + FPaletteEntries[14].peRed := 84; { Cyan highlight } + FPaletteEntries[14].peGreen := 255; + FPaletteEntries[14].peBlue := 255; + FPaletteEntries[15].peRed := 255; { White Highlight } + FPaletteEntries[15].peGreen := 255; + FPaletteEntries[15].peBlue := 255; + + for I := 0 to High(plgpl^.palPalEntry) do begin + plgpl^.PalPalEntry[I].peRed := FPaletteEntries[I].peRed; + plgpl^.PalPalEntry[I].peGreen := FPaletteEntries[I].peGreen; + plgpl^.PalPalEntry[I].peBlue := FPaletteEntries[I].peBlue; + plgpl^.PalPalEntry[I].peFlags := PC_NOCOLLAPSE; + end; + + FPal := CreatePalette(TPLogPalette(plgpl)^); + Dispose(plgpl); + + FScreen := TScreen.Create; + FVScrollBar := TScrollBar.Create(Self); + FFont := TFont.Create; + FFont.Name := 'Terminal'; + FFont.Size := 12; + FFont.Style := []; + FCharZoom := 1.0; + FLineZoom := 1.0; + SetupFont; + + FScreen.FXlatInputTable := @ibm_iso8859_1_G0; + FScreen.FXlatOutputTable := @ibm_iso8859_1_G0; + FScreen.OnCursorVisible := CursorVisibleEvent; + + FCursorVisible := TRUE; + Width := 250; + Height := 100; + FBorderStyle := bsSingle; + FBorderWidth := 1; + FAutoRepaint := TRUE; + FFkeys := 1; + FGraphicDraw := FALSE; + + with FVScrollBar do begin + Parent := Self; + Kind := sbVertical; + Width := 16; + Visible := TRUE; + Align := alRight; + OnScroll := VScrollBarScroll; + end; + AdjustScrollBar; + + with FScreen do begin + GotoXY(0, 0); + WriteStr('EmulVT'); + GotoXY(0, 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetRows(Value : Integer); +begin + with FScreen do begin + if FRowCount <> Value then begin + SetRowCount(Value); + AdjustScrollBar; + ClearScreen; + Repaint; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetRows : Integer; +begin + Result := FScreen.FRowCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCols(Value : Integer); +begin + with FScreen do begin + if FColCount <> Value then begin + FColCount := Value; + ClearScreen; + Repaint; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetCols : Integer; +begin + Result := FScreen.FColCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.CursorVisibleEvent(Sender : TObject); +begin + if FScreen.FCursorOff then begin + if FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + end + else begin + if FScreen.Focused and not FCaretShown then begin + ShowCaret(Handle); + FCaretShown := TRUE; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetAutoLF(Value : Boolean); +begin + FScreen.FAutoLF := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetAutoCR(Value : Boolean); +begin + FScreen.FAutoCR := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetLog(Value : Boolean); +begin + if FLog = Value then + Exit; + + FLog := Value; + + if FLog then begin +{$I-} + AssignFile(FFileHandle, 'EMULVT.LOG'); + Append(FFileHandle); + if IOResult <> 0 then + Rewrite(FFileHandle); + Write(FFileHandle, ''); +{$I+} + end + else begin + Write(FFileHandle, ''); + CloseFile(FFileHandle); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetXlat(Value : Boolean); +begin + FScreen.FNoXlat := not Value; + FScreen.FNoXlatInitial := not Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetXlat : Boolean; +begin + Result := not FScreen.FNoXlatInitial; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetAutoLF : Boolean; +begin + Result := FScreen.FAutoLF; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetAutoCR : Boolean; +begin + Result := FScreen.FAutoCR; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomEmulVT.Destroy; +begin + if FLog then + Log := FALSE; + + FFont.Free; + FVScrollBar.Free; + FScreen.Free; + DeleteObject(FPal); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetBackRows(Value : Integer); +begin + with FScreen do begin + if FBackRowCount <> Value then begin + SetBackRowCount(Value); + AdjustScrollBar; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetTopLine(Value : Integer); +begin + if Value < FVScrollBar.Min then + Value := FVScrollBar.Min; + if Value > FVScrollBar.Max then + Value := FVScrollBar.Max; + FTopLine := Value; + FVScrollBar.Position := FTopLine; + Repaint; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetBackRows : Integer; +begin + Result := FScreen.FBackRowCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetBackColor(Value : TBackColors); +begin + FScreen.FBackColor := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetBackColor : TBackColors; +begin + Result := FScreen.FBackColor; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetMarginColor(const Value: Integer); +begin + FMarginColor := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetLeftMargin(const Value: Integer); +begin + FLeftMargin := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetBottomMargin(const Value: Integer); +begin + FBottomMargin := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetRightMargin(const Value: Integer); +begin + FRightMargin := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetTopMargin(const Value: Integer); +begin + FTopMargin := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetOptions(Value : TScreenOptions); +begin + FScreen.FOptions := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetOptions : TScreenOptions; +begin + Result := FScreen.FOptions; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetupFont; +var + DC : HDC; + Metrics : TTextMetric; + hObject : THandle; +begin + DC := GetDC(0); + hObject := SelectObject(DC, FFont.Handle); + GetTextMetrics(DC, Metrics); + SelectObject(DC, hOBject); + ReleaseDC(0, DC); + + SetCharWidth(Metrics.tmMaxCharWidth); + SetLineHeight(Metrics.tmHeight); + FInternalLeading := Metrics.tmInternalLeading; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCharWidth(newValue : Integer); +var + nCol : Integer; +begin + FCharWidth := newValue; + for nCol := Low(FCharPos) to High(FCharPos) do + FCharPos[nCol] := Trunc(FCharWidth * nCol * FCharZoom); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCharZoom(newValue : Single); +begin + FCharZoom := newValue; + SetCharWidth(FCharWidth); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetLineHeight(Value : Integer); +var + nRow : Integer; +begin + FLineHeight := Value; + for nRow := 0 to High(FLinePos) do { Jan 10, 2002 } + FLinePos[nRow] := Trunc(FLineHeight * nRow * FLineZoom); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetLineZoom(newValue : Single); +begin + FLineZoom := newValue; + SetLineHeight(FLineHeight); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetFont(Value : TFont); +begin + FFont.Assign(Value); +{$IFNDEF SINGLE_CHAR_PAINT} + FFont.Pitch := fpFixed; +{$ENDIF} + SetupFont; + SetCaret; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMLButtonDown(var Message: TWMLButtonDown); +begin + inherited; + SetFocus; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.VScrollBarScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); +begin + FTopLine := ScrollPos; + Repaint; + SetFocus; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.DoKeyBuffer(Buffer : PChar; Len : Integer); +var + J : Integer; + ch : Char; +begin + if Assigned(FOnKeyBuffer) then + FOnKeyBuffer(Self, Buffer, Len) + else begin + for J := 0 to Len - 1 do begin + ch := Buffer[J]; + KeyPress(ch); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.FindFKeys(ScanCode: Char; Shift: TShiftState; + Ext: Boolean) : PFuncKeyValue; +var + I : Integer; + pFKeys : PFuncKeysTable; +begin + Result := nil; + case FKeys of + 0 : pFKeys := @FKeys1; + 1 : pFKeys := @FKeys2; + 2 : pFKeys := @FKeys3; + else + pFKeys := @FKeys2; + end; + + for I := Low(pFKeys^) to High(pFKeys^) do begin + if (pFKeys^[I].ScanCode <> #0) and (pFKeys^[I].ScanCode = ScanCode) and + (pFKeys^[I].Shift = Shift) and + (pFKeys^[I].Ext = Ext) then begin + Result := @pFKeys^[I].Value; + Break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.ProcessFKeys(ScanCode: Char; Shift: TShiftState; + Ext: Boolean) : Boolean; +var + I : Integer; + pFKeys : PFuncKeysTable; +begin + Result := FALSE; + case FKeys of + 0 : pFKeys := @FKeys1; + 1 : pFKeys := @FKeys2; + 2 : pFKeys := @FKeys3; + else + pFKeys := @FKeys2; + end; + + for I := Low(pFKeys^) to High(pFKeys^) do begin + if (pFKeys^[I].ScanCode <> #0) and (pFKeys^[I].ScanCode = ScanCode) and + (pFKeys^[I].Shift = Shift) and + (pFKeys^[I].Ext = Ext) then begin + Result := TRUE; + DoKeyBuffer(@pFKeys^[I].Value[1], Length(pFKeys^[I].Value)); + Break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.AppMessageHandler(var Msg: TMsg; var Handled: Boolean); +const + v1 : String = 'aeiou'; + v2 : String = ''; + v3 : String = ''; + SpyFlag : Boolean = FALSE; +var + Shift : TShiftState; + ShiftLock : Boolean; + VirtKey : Integer; + Key : Char; + I : Integer; + ScanCode : Char; + Ext : Boolean; + SpyBuffer : String; + FnBuffer : String; + pFV : PFuncKeyValue; +begin + if (Msg.hWnd = Handle) and (Msg.Message = WM_KEYDOWN) then begin + VirtKey := Msg.wParam; + Key := chr(Msg.wParam and $FF); +{ DebugString('AppMessageHandler KEYDOWN ' + IntToHex(Msg.wParam, 4) + #13 + #10); } + Shift := KeyDataToShiftState(Msg.lParam); + ShiftLock := ((GetKeyState(VK_CAPITAL) and 1) > 0); + ScanCode := Chr(LOBYTE(HIWORD(Msg.lParam))); + Ext := ((Msg.lParam and $1000000) <> 0); + + if Assigned(FOnKeyDown) then begin + FOnKeyDown(Self, VirtKey, Shift, ShiftLock, ScanCode, Ext); + if VirtKey = 0 then begin + Handled := TRUE; + Exit; + end; + end; + + if (Msg.wParam <> VK_SHIFT) and + (Msg.wParam <> VK_CONTROL) and + (Msg.wParam <> VK_MENU) then begin + if (ScanCode = '7') and + (Shift = [ssAlt, ssCtrl]) and (Ext = FALSE) then begin + { This is CTRL-ALT-* (on num pad) } + SpyFlag := TRUE; + Handled := TRUE; + Exit; + end; + + if SpyFlag then begin + SpyFlag := FALSE; + pFV := FindFKeys(ScanCode, Shift, Ext); + SpyBuffer := IntToHex(Ord(ScanCode), 2) + ', ' + + ShiftStateToString(Shift) + ', '; + + if Ext then + SpyBuffer := SpyBuffer + 'TRUE' + else + SpyBuffer := SpyBuffer + 'FALSE'; + + if pFV <> nil then + SpyBuffer := SpyBuffer + ', ''' + + FuncKeyValueToString(pFV^) + ''''; + + SpyBuffer := SpyBuffer + #0; + ClipBoard.SetTextBuf(@SpyBuffer[1]); + + FnBuffer := 'Key definition from tnchrk' + + IntToStr(FKeys) + '.cfg' + #0; + Application.MessageBox(@SpyBuffer[1], @FnBuffer[1], MB_OK); + Handled := TRUE; + Exit; + end; + + if ProcessFKeys(ScanCode, Shift, Ext) then begin + Handled := TRUE; + Exit; + end; + end; + + case Msg.wParam of + VK_SHIFT, VK_CONTROL, VK_MENU: ; + + VK_NEXT, VK_PRIOR, VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT, VK_HOME, VK_END: + begin + if ProcessFKeys(ScanCode, Shift, TRUE) then begin + Handled := TRUE; + Exit; + end; + end; + VK_TAB, VK_RETURN, VK_ESCAPE, VK_BACK: + begin + Handled := TRUE; + end; + + $DD: + begin + if not (ssAlt in Shift) then begin + Key := #0; + Handled := TRUE; + if (ssShift in Shift) then + FFlagTrema := TRUE + else + FFlagCirconflexe := TRUE; + end; + end; + + ord('A')..ord('Z') : + begin + if (ssCtrl in Shift) then + Key := chr(Word(Key) and $1F) + else if not ShiftLock and not (ssShift in Shift) then + Key := chr(Word(Key) or $20); + if (FFlagCirconflexe) then begin + for I := Length(v1) downto 1 do begin + if Key = v1[I] then begin + Key := v2[I]; + Break; + end; + end; + FFlagCirconflexe := FALSE; + end; + if (FFlagTrema) then begin + for I := Length(v1) downto 1 do begin + if Key = v1[I] then begin + Key := v3[I]; + Break; + end; + end; + FFlagTrema := FALSE; + end; + Handled := TRUE; + end; + end; + +{ DebugString('Char = ' + IntToHex(Integer(Key), 2) + #13 + #10); } + if Handled and (Key <> #0) then + KeyPress(Key); + end; + + if not Handled and Assigned(FAppOnMessage) then + FAppOnMessage(Msg, Handled); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.KeyPress(var Key: Char); +begin + if not FScreen.FNoXlat then + Key := FScreen.FXlatOutputTable^[ord(Key)]; + + inherited KeyPress(Key); + if FLocalEcho then begin + WriteChar(Key); + if not FAutoRepaint then + UpdateScreen; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMSetFocus(var Message: TWMSetFocus); +begin +{ inherited; } + FScreen.Focused := TRUE; +{ SetupFont; } + + if not FCursorVisible then + Exit; + + CreateCaret(Handle, 0, 2, FLineHeight); + FCaretCreated := TRUE; + SetCaret; + if not FScreen.FCursorOff then begin + ShowCaret(Handle); + FCaretShown := TRUE; + end; + + FAppOnMessage := Application.OnMessage; + Application.OnMessage := AppMessageHandler; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMKillFocus(var Message: TWMKillFocus); +begin +{ inherited; } + FScreen.Focused := FALSE; + + if not FCursorVisible then + Exit; + + if FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + if FCaretCreated then begin + DestroyCaret; + FCaretCreated := FALSE; + end; + + Application.OnMessage := FAppOnMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.MouseToCell(X, Y: Integer; var ACol, ARow: Longint); +begin +{$IFDEF CHAR_ZOOM} + aRow := FScreen.FRowCount - 1; + while (Y - FTopMargin) <= FLinePos[aRow] do + Dec(aRow); +{$ELSE} + aRow := (Y - FTopMargin) div FLineHeight; +{$ENDIF} + if aRow < 0 then + aRow := 0 + else if aRow >= FScreen.FRowCount then + aRow := FScreen.FRowCount - 1; + +{$IFDEF CHAR_ZOOM} + aCol := FScreen.FColCount - 1; + while (X - FLeftMargin) <= FCharPos[aCol] do + Dec(aCol); +{$ELSE} + aCol := (X - FLeftMargin) div FCharWidth; +{$ENDIF} + if aCol < 0 then + aCol := 0 + else if aCol >= FScreen.FColCount then + aCol := FScreen.FColCount - 1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.ShowCursor; +begin + SetCaret; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMPaletteChanged(var Message : TMessage); +{var + HandleDC : HDC;} +begin +{ if Message.wParam <> Handle then begin + HandleDC := GetDC(Handle); + SelectPalette(HandleDC, FPal, FALSE); + if RealizePalette(HandleDC) <> 0 then begin + InvalidateRect(Handle, nil, TRUE); + MessageBeep(0); + end; + ReleaseDC(Handle, HandleDC); + end; +} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.UpdateScreen; +var + rc : TRect; +begin + if FScreen.FAllInvalid then + InvalidateRect(Handle, nil, FALSE) + else begin +{$Q-} + with FScreen.FInvRect do begin +{$IFDEF CHAR_ZOOM} + if Left = 9999 then begin + rc.Top := 0; + rc.Bottom := 0; + rc.Left := 0; + rc.Right := 0; + end + else begin + rc.Top := FTopMargin + FLinePos[Top - FTopLine] + FInternalLeading; + rc.Bottom := FTopMargin + FLinePos[Bottom + 1 - FTopLine] + FInternalLeading; + rc.Left := FLeftMargin + FCharPos[Left]; + rc.Right := FLeftMargin + FCharPos[Right + 1]; + end; +{$ELSE} + rc.Top := FTopMargin + FLineHeight * (Top - FTopLine) + FInternalLeading; + rc.Bottom := FTopMargin + FLineHeight * (Bottom + 1 - FTopLine) + FInternalLeading; + rc.Left := FLeftMargin + FCharWidth * Left; + rc.Right := FLeftMargin + FCharWidth * (Right + 1); +{$ENDIF} + end; + InvalidateRect(Handle, @rc, FALSE); +{$Q+} + end; + + { Invalidate the region where the caret is. I should'nt do that, but } + { if I do'nt, the caret remains where it is ! Bug ? } +{$IFDEF CHAR_ZOOM} + rc.Top := FLinePos[FScreen.FRow - FTopLine] + FTopMargin; + rc.Bottom := FLinePos[FScreen.FRow - FTopLine + 1] + FTopMargin; + rc.Left := FLeftMargin + FCharPos[FScreen.FCol]; + rc.Right := FLeftMargin + FCharPos[FScreen.FCol + 1]; +{$ELSE} + rc.Top := FTopMargin + FLineHeight * (FScreen.FRow - FTopLine); + rc.Bottom := rc.Top + FLineHeight; + rc.Left := FLeftMargin + FCharWidth * FScreen.FCol; + rc.Right := rc.Left + FCharWidth; +{$ENDIF} + InvalidateRect(Handle, @rc, FALSE); + + FScreen.InvClear; + + if FCaretCreated then begin + ShowCaret(Handle); + FCaretShown := TRUE; + end; + SetCaret; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.SnapPixelToRow(Y : Integer) : Integer; +var + nRow : Integer; +begin + nRow := PixelToRow(Y); +{$IFDEF CHAR_ZOOM} + Result := FTopMargin + FLinePos[nRow]; +{$ELSE} + Result := FTopMargin + nRow * FLineHeight; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.SnapPixelToCol(X : Integer) : Integer; +var + nCol : Integer; +begin + nCol := PixelToCol(X); +{$IFDEF CHAR_ZOOM} + Result := FLeftMargin + FCharPos[nCol]; +{$ELSE} + Result := FLeftMargin + nCol * FCharWidth; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.PixelToRow(Y : Integer) : Integer; +var + nRow : Integer; +begin +{$IFDEF CHAR_ZOOM} + nRow := FScreen.FRowCount - 1; + while (nRow > 0) and ((Y - FTopMargin) < FLinePos[nRow]) do + Dec(nRow); +{$ELSE} + nRow := (Y - FTopMargin) div FLineHeight; +{$ENDIF} + if nRow < 0 then + nRow := 0; + Result := nRow; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.PixelToCol(X : Integer) : Integer; +var + nCol : Integer; +begin +{$IFDEF CHAR_ZOOM} + nCol := FScreen.FColCount - 1; + while (X - FLeftMargin) < FCharPos[nCol] do + Dec(nCol); +{$ELSE} + nCol := (X - FLeftMargin) div FCharWidth; +{$ENDIF} + if nCol < 0 then + nCol := 0; + Result := nCol; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure will paint graphic char from the OEM charset (lines, } +{ corners, T and other like) using GDI functions. This will result in } +{ autosized characters, necessary for example to draw a frame when zoom } +{ affect character and line spacing. } +procedure TCustomEmulVT.PaintGraphicChar( + DC : HDC; + X, Y : Integer; + rc : PRect; + ch : Char); +const + OneSpace : Char = ' '; +var + X1, X2, X3 : Integer; + Y1, Y2, Y3 : Integer; + Co : TColor; +begin + ExtTextOut(DC, + X, Y, + ETO_OPAQUE or ETO_CLIPPED, rc, + @OneSpace, 1, nil); + X1 := X; + X3 := rc^.Right; + X2 := (X1 + X3) div 2; + Y1 := rc^.Top; + Y3 := rc^.Bottom; + Y2 := (Y1 + Y3) div 2; + case Ch of + #$C4: begin { Horizontal single line } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + end; + #$B3: begin { Vertical single line } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + end; + #$DA: begin { Upper Left Single Corner } + Canvas.MoveTo(X3, Y2); + Canvas.LineTo(X2, Y2); + Canvas.LineTo(X2, Y3); + end; + #$C0: begin { Bottom Left Single Corner } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y2); + Canvas.LineTo(X3, Y2); + end; + #$C1: begin { Reverse T } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y2); + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + end; + #$C2: begin { T } + Canvas.MoveTo(X2, Y3); + Canvas.LineTo(X2, Y2); + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + end; + #$C3: begin { Left T } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + Canvas.MoveTo(X2, Y2); + Canvas.LineTo(X3, Y2); + end; + #$B4: begin { Right T } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + Canvas.MoveTo(X2, Y2); + Canvas.LineTo(X1 - 1, Y2); + end; + #$BF: begin { Top Right Single Corner } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X2, Y2); + Canvas.LineTo(X2, Y3); + end; + #$D9: begin { Bottom Right Single Corner } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X2, Y2); + Canvas.LineTo(X2, Y1 - 1); + end; + #$D6: begin { Upper Left Single/Double Corner } + Canvas.MoveTo(X3, Y2); + Canvas.LineTo(X2 - 1, Y2); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y2); + Canvas.LineTo(X2 + 1, Y3); + end; + #$D3: begin { Bottom Left Single/Double Corner } + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y2); + Canvas.LineTo(X3, Y2); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2); + end; + #$B7: begin { Top Right Single/Double Corner } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X2 + 1, Y2); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y2); + Canvas.LineTo(X2 - 1, Y3); + end; + #$BD: begin { Bottom Right Single/Double Corner } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2); + Canvas.LineTo(X1 - 1, Y2); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y2); + end; + #$D5: begin { Upper Left Double/Single Corner } + Canvas.MoveTo(X3, Y2 - 1); + Canvas.LineTo(X2, Y2 - 1); + Canvas.LineTo(X2, Y3); + Canvas.MoveTo(X3, Y2 + 1); + Canvas.LineTo(X2, Y2 + 1); + end; + #$D4: begin { Bottom Left Double/Single Corner } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X2, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + end; + #$B8: begin { Top Right Double/Single Corner } + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2, Y2 - 1); + Canvas.LineTo(X2, Y3); + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2, Y2 + 1); + end; + #$BE: begin { Bottom Right Double/Single Corner } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y2 + 1); + Canvas.LineTo(X1 - 1, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2, Y2 - 1); + end; + #$CD: begin { Horizontal Double line } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + end; + #$BA: begin { Vertical Double line } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y3); + end; + #$D1: begin { T Top Horizontal Double line } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X2, Y2 + 1); + Canvas.LineTo(X2, Y3); + end; + #$CF: begin { T Bottom Horizontal Double line } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X2, Y2 - 1); + Canvas.LineTo(X2, Y1); + end; + #$C6: begin { T Left Horizontal Double line } + Canvas.MoveTo(X2, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X2, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + end; + #$B5: begin { T Right Horizontal Double line } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2, Y2 - 1); + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + end; + #$C9: begin { Upper Left Double Corner } + Canvas.MoveTo(X3, Y2 - 1); + Canvas.LineTo(X2 - 1, Y2 - 1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X3, Y2 + 1); + Canvas.LineTo(X2 + 1, Y2 + 1); + Canvas.LineTo(X2 + 1, Y3); + end; + #$C8: begin { Bottom Left Double Corner } + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + end; + #$BB: begin { Top Right Double Corner } + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2 + 1, Y2 - 1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y3); + end; + #$BC: begin { Bottom Right Double Corner } + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y2 - 1); + Canvas.LineTo(X1 - 1, Y2 - 1); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2 + 1); + Canvas.LineTo(X1 - 1, Y2 + 1); + end; + #$CC: begin { Double left T } + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X3, Y2 + 1); + Canvas.LineTo(X2 + 1, Y2 + 1); + Canvas.LineTo(X2 + 1, Y3); + end; + #$B9: begin { Double Right T } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y2 - 1); + Canvas.LineTo(X1 - 1, Y2 - 1); + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y3); + end; + #$C7: begin { Double T Single Left } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y2); + Canvas.LineTo(X3, Y2); + end; + #$B6: begin { Double T Single Right } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 - 1, Y2); + Canvas.LineTo(X1 - 1, Y2); + end; + #$D2: begin { Single T Double Top } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + Canvas.MoveTo(X2 - 1, Y2); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y2); + Canvas.LineTo(X2 + 1, Y3); + end; + #$D0: begin { Single T Double Bottom } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + Canvas.MoveTo(X2 - 1, Y2); + Canvas.LineTo(X2 - 1, Y1); + Canvas.MoveTo(X2 + 1, Y2); + Canvas.LineTo(X2 + 1, Y1); + end; + #$DB: begin { Full Block } + Canvas.Rectangle(X1, Y1, X3, Y3); + end; + #$DC: begin { Half Bottom Block } + Canvas.Rectangle(X1, Y2, X3, Y3); + end; + #$DD: begin { Half Left Block } + Canvas.Rectangle(X1, Y1, X2, Y3); + end; + #$DE: begin { Half Right Block } + Canvas.Rectangle(X2, Y1, X3, Y3); + end; + #$DF: begin { Half Top Block } + Canvas.Rectangle(X1, Y1, X2, Y2); + end; + #$C5: begin { Single Cross } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + end; + #$CE: begin { Double Cross } + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2 - 1, Y2 - 1); + Canvas.LineTo(X2 - 1, Y1); + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X2 + 1, Y3); + Canvas.LineTo(X2 + 1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + end; + #$D8: begin { Cross Double Horizontal Single vertical } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + end; + #$D7: begin { Cross Single Horizontal Double Vertical } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + end; + #$CA: begin { Double T bottom } + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2 - 1, Y2 - 1); + Canvas.LineTo(X2 - 1, Y1); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + end; + #$CB: begin { Double T } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y3); + Canvas.LineTo(X2 + 1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + end; + #$B0: begin + Co := Canvas.Pen.Color; + for Y := Y1 to Y3 do begin + X := X1 + (Y mod 3); + while X < X3 do begin + Canvas.Pixels[X, Y] := Co; + X := X + 3; + end; + end; + end; + #$B1: begin + Co := Canvas.Pen.Color; + for Y := Y1 to Y3 do begin + X := X1 + (Y and 1); + while X < X3 do begin + Canvas.Pixels[X, Y] := Co; + X := X + 2; + end; + end; + end; + #$B2: begin + Co := Canvas.Pen.Color; + for Y := Y1 to Y3 do begin + X := X1 + (Y mod 3); + while X < X3 do begin + Canvas.Pixels[X, Y] := Co; + Inc(X); + if X < X3 then + Canvas.Pixels[X, Y] := Co; + Inc(X); + Inc(X); + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.PaintOneLine( + DC : HDC; + Y, Y1 : Integer; + const Line : TLine; + nColFrom : Integer; + nColTo : Integer; + Blank : Boolean); +var + rc : TRect; + nCnt : Integer; + nAtt : Byte; + X : Integer; + nChr : Integer; + Ch : Char; +const + BlankLine : array [0..MAX_COL] of char = ''; +begin + nAtt := Line.Att[nColFrom]; + +{ if nAtt = $0B then + X := 0; } +{ + SetBkColor(DC, PALETTEINDEX(nAtt div $0F)); + SetTextColor(DC, PALETTEINDEX(nAtt and $0F)); +} + if not FMonoChrome then begin + with FPaletteEntries[(nAtt shr 4) and $0F] do + SetBkColor(DC, PALETTERGB(peRed, peGreen, peBlue)); + with FPaletteEntries[nAtt and $0F] do begin + SetTextColor(DC, PALETTERGB(peRed, peGreen, peBlue)); + Canvas.Pen.Color := PALETTERGB(peRed, peGreen, peBlue); + Canvas.Brush.Color := PALETTERGB(peRed, peGreen, peBlue); + end; + end + else begin + if (nAtt div $0F) <> 0 then + SetBkColor(DC, RGB(127, 127, 127)) + else + SetBkColor(DC, RGB(255, 255, 255)); + + if (nAtt and $0F) <> 0 then + SetTextColor(DC, RGB(0, 0, 0)) + else + SetTextColor(DC, RGB(255, 255, 255)); + end; + + nCnt := nColTo - nColFrom; + nChr := 0; +{$IFDEF SINGLE_CHAR_PAINT} + while nChr < nCnt do begin +{$IFDEF CHAR_ZOOM} + X := FLeftMargin + FCharPos[nColFrom + nChr]; + rc.Top := Y + FInternalLeading; + rc.Bottom := Y1 + FInternalLeading; + rc.Left := X; + rc.Right := FLeftMargin + FCharPos[nColFrom + nChr + 1]; +{$ELSE} + X := FLeftMargin + (nColFrom + nChr) * FCharWidth; + rc.Top := Y + FInternalLeading; + rc.Bottom := Y1 + FInternalLeading; + rc.Left := X; + rc.Right := rc.Left + FCharWidth; +{$ENDIF} + if (nColFrom + nChr) = 0 then + rc.Left := rc.Left - FLeftMargin; + if (nColFrom + nChr) >= FScreen.FColCount then + rc.Right := rc.Right + FRightMargin; + if Blank then + Ch := ' ' + else + Ch := Line.Txt[nColFrom + nChr]; + if FGraphicDraw and + (FScreen.FXlatOutputTable = @ibm_iso8859_1_G0) and + (Ch >= #$B0) and (Ch <= #$DF) and + (Ch in [#$B3, #$C4, #$DA, #$C0, #$C1, #$C2, #$C3, #$B4, #$BF, #$D9, + #$DB, #$DC, #$DD, #$DE, #$DF, + #$BA, #$CD, #$C9, #$C8, #$BB, #$BC, + #$CC, #$B9, #$C7, #$B6, #$D2, #$D0, + #$D5, #$D4, #$B8, #$BE, + #$C6, #$D1, #$B5, #$CF, + #$D6, #$B7, #$D3, #$BD, + #$C5, #$CE, #$D8, #$D7, #$CA, #$CB, + #$B0, #$B1, #$B2]) then + PaintGraphicChar(DC, X, Y, @rc, Ch) + else + ExtTextOut(DC, X, Y, ETO_OPAQUE or ETO_CLIPPED, @rc, @Ch, 1, nil); + Inc(nChr); + end; +{$ELSE} +{$IFDEF CHAR_ZOOM} + X := LeftMargin + FCharPos[nColFrom]; + rc.Top := Y + FInternalLeading; + rc.Bottom := Y1 + FInternalLeading; + rc.Left := X; + rc.Right := LeftMargin + FCharPos[nColFrom + nCnt]; +{$ELSE} + X := LeftMargin + nColFrom * FCharWidth; + rc.Top := Y + FInternalLeading; + rc.Bottom := Y1 + FInternalLeading; + rc.Left := X; + rc.Right := rc.Left + nCnt * FCharWidth; +{$ENDIF} + if nColFrom = 0 then + rc.Left := rc.Left - LeftMargin; + if nColTo >= FScreen.FColCount then + rc.Right := rc.Right + RightMargin; + if Blank then + ExtTextOut(DC, + X, Y, + ETO_OPAQUE or ETO_CLIPPED, @rc, + @BlankLine[0], nCnt, nil) + else + ExtTextOut(DC, + X, Y, + ETO_OPAQUE or ETO_CLIPPED, @rc, + @Line.Txt[nColFrom], nCnt, nil); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMPaint(var Message: TWMPaint); +var + DC : HDC; + PS : TPaintStruct; + Y, Y1 : Integer; + rc : TRect; + OldPen : THandle; + OldBrush : THandle; + OldFont : THandle; + rcPaint : TRect; + DrawRct : TRect; + nRow : Integer; + nCol : Integer; + nColFrom : Integer; + Line : TLine; + BackBrush : HBrush; + BackIndex : Integer; +begin + { This may be a bit of overkill but we have to keep the scrollbar tracking + with the number of lines visible on the screen. The calling program can + change the Height of the screen and we don't have a good way to know that. + This routine will get called whenever the screen gets updated so it is a + good time to update the scrollbar. } + AdjustScrollBar; + + if not GetUpdateRect(WindowHandle, rc, FALSE) then + Exit; + + BackBrush := 0; + OldBrush := 0; + + DC := Message.DC; + if DC = 0 then + DC := BeginPaint(WindowHandle, PS); + try + if not FMonoChrome then begin + SelectPalette(DC, FPal, FALSE); + RealizePalette(DC); + if FMarginColor = -1 then + BackIndex := FScreen.FAttribute div $0F + else + BackIndex := FMarginColor mod NumPaletteEntries; + with FPaletteEntries[BackIndex] do + BackBrush := CreateSolidBrush(PALETTERGB(peRed, peGreen, peBlue)); + OldBrush := SelectObject(DC, BackBrush); + end; + + WinProcs.GetClientRect(WindowHandle, DrawRct); + rcPaint := PS.rcPaint; + rc.Left := 2; + rc.Right := DrawRct.Right - 2; + nRow := PixelToRow(rcPaint.top); + nRow := nRow - 1; + if nRow < 0 then + nRow := 0; + +{$IFDEF CHAR_ZOOM} + Y := FTopMargin + FLinePos[nRow]; + Y1 := FTopMargin + FLinePos[nRow + 1]; +{$ELSE} + Y := FTopMargin + nRow * FLineHeight; + Y1 := Y + FLineHeight; +{$ENDIF} + + if rcPaint.Top <= FTopMargin then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, rcPaint.left, rcPaint.Top, + rcPaint.Right + 1, + FTopMargin + FInternalLeading + 1); + SelectObject(DC, OldPen); + end; + + if (nRow = 0) and (FInternalLeading > 0) then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, rcPaint.left, rcPaint.Top, + rcPaint.Right + 1, + Y + FInternalLeading + 1); + SelectObject(DC, OldPen); + end; + + OldFont := SelectObject(DC, FFont.Handle); + nRow := nRow + FTopLine; + while nRow < FScreen.FRowCount do begin + rc.Top := Y; + rc.Bottom := Y + FLineHeight; + if rc.Bottom > (DrawRct.Bottom - FBottomMargin) then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, rc.Left - 2, rc.Top, rc.Right + 1, + DrawRct.Bottom - 1); + SelectObject(DC, OldPen); + Break; + end; + Line := FScreen.Lines[nRow]; + + nCol := 0; + nColFrom := 0; + while nCol < FScreen.FColCount do begin + while (nCol < FScreen.FColCount) and + (Line.Att[nCol] = Line.Att[nColFrom]) do + Inc(nCol); + + PaintOneLine(DC, Y, Y1, Line, nColFrom, nCol, FALSE); + nColFrom := nCol; + end; + + nRow := nRow + 1; +{$IFDEF CHAR_ZOOM} + Y := FTopMargin + FLinePos[nRow - FTopLine]; + Y1 := FTopMargin + FLinePos[nRow + 1 - FTopLine]; +{$ELSE} + Y := Y + FLineHeight; + Y1 := Y + FLineHeight; +{$ENDIF} + if Y > rcPaint.Bottom then + Break; + end; + + { Fill region between last text line and bottom of the window } + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + if (FScreen.FRowCount - FTopLine) <= MAX_ROW then begin { WM + SE 09/08/00 } + WinProcs.Rectangle(DC, rc.Left - 2, + FTopMargin + FLinePos[FScreen.FRowCount - FTopLine]{ + 1}, + rc.Right + 3, DrawRct.Bottom + 1); +{ + Line := FScreen.Lines[FScreen.FRowCount - 1]; + nCol := 0; + nColFrom := 0; + while nCol < FScreen.FColCount do begin + while (nCol < FScreen.FColCount) and + (Line.Att[nCol] = Line.Att[nColFrom]) do + Inc(nCol); + + PaintOneLine(DC, Y, Y1, Line, nColFrom, nCol, TRUE); + nColFrom := nCol; + end; +} + end; + SelectObject(DC, OldPen); + +{$IFDEF CHAR_ZOOM} + if (FLeftMargin + FCharPos[FScreen.FColCount]) < rc.Right then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, FLeftMargin + FCharPos[FScreen.FColCount], + FTopMargin, { 09/03/99 } + rcPaint.Right + 1, DrawRct.Bottom + 1); + SelectObject(DC, OldPen); + end; +{$ELSE} + if (FLeftMargin + FScreen.FColCount * FCharWidth) < rc.Right then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, FLeftMargin + FScreen.FColCount * FCharWidth, + FTopMargin, rc.Right + 1, DrawRct.Bottom - 1); + SelectObject(DC, OldPen); + end; +{$ENDIF} + + if FSelectRect.Top <> -1 then begin + SelectObject(DC, GetStockObject(NULL_BRUSH)); + SelectObject(DC, GetStockObject(BLACK_PEN)); + WinProcs.Rectangle(DC, FSelectRect.Left, + FSelectRect.Top, + FSelectRect.Right + 1, + FSelectRect.Bottom - 1); + SelectObject(DC, GetStockObject(WHITE_PEN)); + WinProcs.Rectangle(DC, FSelectRect.Left - 1, + FSelectRect.Top - 1, + FSelectRect.Right + 2, + FSelectRect.Bottom); + end; + + SelectObject(DC, OldFont); + if OldBrush <> 0 then + SelectObject(DC, OldBrush); + if BackBrush <> 0 then + DeleteObject(BackBrush); + finally + if Message.DC = 0 then + EndPaint(WindowHandle, PS); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/FingCli.dcu b/lib/Delphi/Vc32/FingCli.dcu new file mode 100644 index 00000000..f3818c27 Binary files /dev/null and b/lib/Delphi/Vc32/FingCli.dcu differ diff --git a/lib/Delphi/Vc32/FingCli.pas b/lib/Delphi/Vc32/FingCli.pas new file mode 100644 index 00000000..30d440c9 --- /dev/null +++ b/lib/Delphi/Vc32/FingCli.pas @@ -0,0 +1,230 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TFingerCli is a FINGER protocol client using TWSocket + Conform to RFC-1288 (supercede RFCs 1196, 1194 and 742) +Creation: December 18, 1997 +Version: 1.01 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Aug 20, 1999 V1.01 Added compile time options. Revised for BCB4. +Aug 18, 2001 V1.02 Angus Robertson removed + @domain from the request. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FingCli; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, WinProcs, SysUtils, Messages, Classes, Graphics, Controls, + WSocket; + +const + FingCliVersion = 102; + CopyRight : String = ' FingCli (c) 1997-2001 F. Piette V1.02 '; + +type + TFingerCli = class(TComponent) + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure StartQuery; + function Receive(Buffer : Pointer; Len : Integer) : Integer; + procedure Abort; + protected + FWSocket : TWSocket; + FQuery : String; + FQueryDoneFlag : Boolean; + FOnSessionConnected : TSessionConnected; + FOnDataAvailable : TDataAvailable; + FOnQueryDone : TSessionClosed; + procedure WSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure WSocketSessionConnected(Sender: TObject; Error: Word); + procedure WSocketDataAvailable(Sender: TObject; Error: Word); + procedure WSocketSessionClosed(Sender: TObject; Error: Word); + procedure TriggerQueryDone(Error: Word); + published + property Query : String read FQuery + write FQuery; + property OnSessionConnected : TSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnDataAvailable : TDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnQueryDone : TSessionClosed read FOnQueryDone + write FOnQueryDone; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TFingerCli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TFingerCli.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWSocket := TWSocket.Create(Self); + FWSocket.OnSessionConnected := WSocketSessionConnected; + FWSocket.OnDataAvailable := WSocketDataAvailable; + FWSocket.OnSessionClosed := WSocketSessionClosed; + FWSocket.OnDnsLookupDone := WSocketDnsLookupDone; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TFingerCli.Destroy; +begin + if Assigned(FWSocket) then + FWSocket.Destroy; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.StartQuery; +var + I : Integer; + Host : String; +begin + I := Pos('@', FQuery); + if I <= 0 then + raise Exception.CreateFmt('TFingerCli, Invalid Query: %s', [FQuery]); + Host := Copy(FQuery, I + 1, Length(FQuery)); + if Length(Host) <= 0 then + raise Exception.CreateFmt('TFingerCli, Invalid Host in query: %s', [FQuery]); + FQueryDoneFlag := FALSE; + FWSocket.DnsLookup(Host); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.Abort; +begin + FWSocket.CancelDnsLookup; + FWSocket.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFingerCli.Receive(Buffer : Pointer; Len : Integer) : Integer; +begin + Result := FWSocket.Receive(Buffer, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then + TriggerQueryDone(Error) + else begin + FWSocket.Addr := FWSocket.DnsResult; + FWSocket.Proto := 'tcp'; + FWSocket.Port := 'finger'; + FWSocket.Connect; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketSessionConnected(Sender: TObject; Error: Word); +var + I: integer ; +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); + + if Error <> 0 then begin + TriggerQueryDone(Error); + FWSocket.Close + end + else + begin + I := Pos('@', FQuery); { angus } + FWSocket.SendStr(copy (FQuery, 1, pred (I)) + #13 + #10); + end ; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketDataAvailable(Sender: TObject; Error: Word); +begin + if Assigned(FOnDataAvailable) then + FOnDataAvailable(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.TriggerQueryDone(Error: Word); +begin + if (FQueryDoneFlag = FALSE) and Assigned(FOnQueryDone) then + FOnQueryDone(Self, Error); + FQueryDoneFlag := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketSessionClosed(Sender: TObject; Error: Word); +begin + TriggerQueryDone(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/FtpCli.dcu b/lib/Delphi/Vc32/FtpCli.dcu new file mode 100644 index 00000000..2fe45beb Binary files /dev/null and b/lib/Delphi/Vc32/FtpCli.dcu differ diff --git a/lib/Delphi/Vc32/FtpCli.pas b/lib/Delphi/Vc32/FtpCli.pas new file mode 100644 index 00000000..71ae7ecf --- /dev/null +++ b/lib/Delphi/Vc32/FtpCli.pas @@ -0,0 +1,3806 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: May 1996 +Version: 2.86 +Object: TFtpClient is a FTP client (RFC 959 implementation) +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1996-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Quick Reference: + +Properties: + HostName - FTP server host name or IP address + UserName - User name for authentication on FTP server + PassWord - Passwor needed for user, can be blank + HostDirName - Directory as knwon of FTP server + HostFileName - File name as known on FTP server + LocalFileName - Local file name (complete path) + Binary - Select binary or ascii file transfert (Need to call TypeSet + or TypeSetAsync to send it to FTP server). + (There are other less used properties, see code below) + +Methods: + Open - Open the connection with the FTP server + User - Send username + Pass - Send password + Connect - Open the connection, send username and password + Quit - Disconnect gracefully from FTP server + Abort - Disconnect (close connection) immediately + AbortXfer - Abort file transfer without disconnecting. + Warning: LocalFilename property is lost after this command. + Pwd - Get current working directory + Cwd - Change Working Directory + CDup - Change to parent directory + TypeSet - Set type for file transfert (see Binary property) + TypeBinary - Set to binary type transfert and call TypeSet + TypeAscii - Set to ascii type transfert and call TypeSet + + Put - Upload a file + Transmit - Connect, Cwd, Upload a file & Quit + + Append - Upload a file, appending to existing + AppendFile - Connect, Cwd, Append a file & Quit + + Get - Download a file + Receive - Connect, Cwd, Download a file & Quit + + RestGet - Download a file, restarting from current local file size + RestartGet - Connect, Cwd, Restart downloading a file & Quit + + RestPut - Upload a file, restarting from ResumeAt property value + RestartPut - Connect, Cwd, Restart uploading a file & Quit + + Dir - Download a directory listing to a file + Directory - Connect, Cwd, Download a directory listing to a file & Quit + + Ls - Download a file name listing to a file + List - Connect, Cwd, Download a file name listing to a file & Quit + + Mkd - Create a directory on the server + Mkdir - Connect, Cwd, Create a directory on the server & Quit + + Ren - Rename a file or directory on the server + Rename - Connect, Cwd, Rename a file or directory on the server & Quit + + Dele - Delete a file on the server + Delete - Connect, Cwd, Delete a file on the server & Quit + + Rmd - Remove a directoy from the server + Rmdir - Connect, Cwd, Remove a directoy from the server & Quit + + Syst - Get system information from the server + System - Connect, Cwd, Get system information from the server & Quit + + Size - Get file size + FileSize - Connect, Cwd, get file size & Quit + + Quote - Send literal command (use LocalFileName as command to send) + DoQuote - Connect, Cwd, send literal command & Quit + + (There are two set of methods: Async and Sync. The Async are the prefered + ones to build robust applications. Their name end with Async like GetAsync) + (There are other less used methods, see code below) + +How to use a Proxy or Firewall ? + First of all, not all proxies or firewalls are the same. So have a look at + product documentation. However, most products support a transparent proxy + which doesn't require any special programming: + 1) Instead of connection to a remote FTP server, you connect to the proxy + 2) User name is replaced by user name, followed by '@' sign then followed + by target remote FTP server host name. + 3) Password is usual remote FTP server password. + 4) Most require using Passive mode. + Example: You want to connect to ftp.borland.com, using anonymous connection, + company firewall/proxy is running on host named proxyserver. + FtpCli1.HostName := 'proxyserver'; + FtpCli1.UserName := 'anonymous@ftp.borland.com'; + FtpCli1.Password := 'your.email@company'; + FtpCli1.Passive := TRUE; + +History: +Nov 04, 1996 Better error handling + Property for timeout, default to 15 sec +Dec 03, 1996 Adapted display functionnality for Delphi 2 +Dec 27, 1996 Added transmit functions + Changed all procedure to function returning boolean status +Aug 13, 1997 Added multiline response support + Added support for strange Microsoft PWS FTP behaviour +Sep 10, 1997 Added support for Dir and Ls commands + Corrected bugs to enable correct use of separate commands +Oct 16, 1997 V2.07 Adapted for changes in TWSocket object + Added FtpCliVersion constant +Nov 25, 1997 V2.08 Accept 250 as well as 226 for succesfull file transfert + Suggested by fdragon@world-net.net +Nov 26, 1997 V2.09 don't display error message in the receive event when + the socket is no more connected. +Nov 29, 1997 V2.10 added Mkd and Mkdir functions to create a directory. + As suggested by Christian Rsner +Dec 04, 1997 V2.11 Added Ren, Dele, Rmd functions + As suggested by Frank Riemann + Changed Mkd and Mkdir functions to take HostFileName to + specify the directory name. This is more consistent with the + rest of the component usage. +Dec 29, 1997 V2.12 Added a TrimLeft function for Delphi 1 +Dec 30, 1997 V2.13 Added Syst and System commands as suggested by + Fire Dragon + Added the LastResponse property + Corrected a message ("Daniel Fazekas" ) +Jan 10, 1998 V2.14 Accept response 150 and 125 for Get Submitted by Fire + Dragon . + Added a quick reference for most used properties and methods. + Made TFtpCli a TComponent descendant. + Added the Size, FileSize, Quote, DoQuote, RestartGet method. + Made ControlSocket a readonly property (allow easy DNSLookup). + Added a Port property. +Jan 25, 1998 V2.15 + Completely revised to make it asynchronous. + This means that a new set of functions is born. They all have + a name ending with Async. For example GetAsync. Asynchronous + means that when you call the function, it returns almost + immediately. The operation is done in the background. + The asynchronous operation allows to make several request + simultaneously WITHOUT using threads. Just use two or more + TFtpClient and call each GetAsync (or other) method as those + method returns almost instantly, all the request will be done + in the background, generating the OnRequestDone when finished. + Added a State property + This allows to check for component work in the background. + You can call methods only when State = ftpReady (except the + Abort method which can be called at any time) + The Asynchronous methods are the prefered ones. + + Added Pwd command + Returns the current working directory on the server. + + Added CDup command + Change to parrent directory on FTP server. + + Added DirResult property + Parse the LastResponse property to return the directory. + Do no always work when the server returns multi-line responses. + (updated by Pwd, Cwd, CDup and Mkd commands). + + Changed function IsConnected to Connected, a read-only property. + It's more object oriented. + + Replaced file I/O by stream I/O. + It's the first step to allow Stream I/O outside of the component. + + New sample application (Delphi only now, CPP later). + Every command has now a button to excercize it + (async version only) + + The synchronous commands (old commands) are implemented by + calling the asynchronous version and waiting. + + Multi-threaded property + Tells the component how to wait for command completion. + + Removed the TWait component use. + No need to have a TWait component. +Jan 31, 1998 V2.16 Accept response 150 and 125 for Put. +Feb 01, 1998 V2.17 Added intermediate message for OnRequestDone event +Feb 02, 1998 V2.18 Corrected a bug: all sync function returned always FALSE. + Added User and Pass synchronous functions. + Made PutAsync return ftpPutAsync in the OnrequestDone event. +Feb 04, 1998 V2.19 Added an OnCommand event to give a chance to the user to + modify the commands to make some custom commands. Also added the + OnResponse event to allow custom commands to get the response + and alter it as necessary. +Feb 15, 1998 V2.20 Added a FindClose after the FindFirst in GetFileSize routine + as pointed by "Daniel Fazekas" +Feb 21, 1998 V2.21 Enabled progress updated on put +Feb 22, 1998 V2.22 Accept result code 250 after Put command + Implemented Append and AppendFile commands +Mar 07, 1998 V2.23 Made RequestType a R/O property +Mar 15, 1998 V2.24 Reordered PORT/REST/RETR + Added a port command + The ByteCount passed to OnProgress now take into account the + restart byte offset. + Renamed Display to TriggerDisplay and made it virtual + Used TriggerDisplay everywhere. + Modified the Timeout mechanism to reset the timeout each + time the OnProgress event is called. + Abort command call CancelDnsLookup approprietedly +Mar 27, 1998 V2.25 Adapted for C++Builder 3 +Avr 01, 1998 V2.26 Made a valid LastResponse and ErrorMessage when DNS lookup + failed. Added some compiler options. +Apr 10, 1998 V2.27 Added some ftpFctCwd in some highlevel functions. + Suggested by Ray Andrews . +Apr 13, 1998 V2.28 Save error code when the data connection is closed to use + it later to return the status for file transfert. + Implemented passive mode, with help from Yaron Golan + . A new property Passive enable this mode. + Put do not work [yet] is passive mode. +Apr 14, 1998 V2.29 Made passive mode PUT work. + Added ShareMode property (see TFileStream.Create on-line help) + Made ResumeAt property. +Apr 15, 1998 V2.30 Added the OnReadyToTransmit event. + Correctly handled error when local file not found. + Checked if socket connected in SendCommand +Apr 22, 1998 V2.31 Corrected CDupAsync procedure (thanks to Eric + Engler englere@swcp.com) +Apr 26, 1998 V2.32 Added TypeBinary and TypeAscii just to help a little bit. +May 01, 1998 V2.33 Added check for continuation lines in NextxPutAsync +May 05, 1998 V2.34 Added some more delay in WMFtpCloseData. +May 13, 1998 V2.35 In passive mode STOR or APPE, changed the sequence: now + wait for connection established before sending the STOR or APPE + command to FTP server. +May 19, 1998 V2.36 TransfertStats made virtual. +Jun 25, 1998 V2.37 Revised code for 'connection reset by peer' syndrome +Jul 09, 1998 V2.38 Adpted for Delphi 4 +Jul 23, 1998 V2.39 Made ResumeAt property R/W + Added code from Yaron Golan to fix PASV + REST + and to add OnDisplayFile code to view a file on the fly. +Aug 04, 1998 V2.40 Frank Neuhaus found a problem in Put command + for some FTP server. See V240 in the comments. +Aug 12, 1998 V2.41 Added 200 to the valid CWD responses. +Aug 18, 1998 V2.42 Added code to accept continuation lines not beginning by + a number and a dash. Thanks to Al Cantu + for pointing this problem. +Sep 16, 1998 V2.43 Made Synchronize and WaitUntilReady virtual function in + protected section. +Oct 01, 1998 V2.44 Checked for errors in TriggerRequestDone. +Nov 09, 1998 V2.45 Reverted V2.40 changes ! Thanks to Grant Walker + for his help in testing. + Made block size equal to 1514 to minimize packet fragmentation + on ethernet. +Nov 22, 1998 V2.46 changed GetTickCount cast from Integer to LongInt because + of overflows with Delphi 1. Suggested by Terry Byrne + +Dec 22, 1998 V2.47 Corrected DisplayFile which forgot the last character. + Thanks to max@zab1.chita.ru for the bug report. + Handled exceptions while trying to connect data session. + Replaced DisplayFlag by DysplayFileFlag. +Feb 14, 1999 V2.48 Indirectly call winsock functions using wsocket because + wsocket provide runtime dynamic link instead of loadtime link. + This allows a program to use FTP if it discover that winsock is + installed and still run if winsock is not installed. +Mar 13, 1999 V2.49 Added FPutSessionOpened flag and combine it with + FStorAnswerRcvd flag to synchronize start of data sending. + Thanks to Frank Neuhaus for his clear analysis. +Mar 20, 1999 V2.50 Added Options property +Mar 23, 1999 V2.51 Corrected a bug introcuded in last version which truncated + the first character of the second line of a multiline answer on + some servers. +May 04, 1999 V2.52 Corrected an access violation in DataSocketGetDataAvailable. + Thanks to Steve Plegge for pointing that bug. +May 21, 1999 V2.53 Added FRequestResult to ControlSocketDnsLookupDone. Thanks + to Wu'hao for finding this bug. +Jul 17, 1999 V2.54 Added OnError event and DisplayFileMode property. Thanks to + Pieter Snyman for his work. + Accepted answer 200 for successful rename. + Leho Kraav found that some FTP server return + this code. + Cleared FByteCount from PortAsync as suggested by Simon Hoerup + to help some progress indicator implementation. +Aug 04, 1999 V2.55 Corrected a bug with Delphi 1 where a buffer overflow may + occurs when receiving commands longer than 254 bytes. + Thanks to Craig Johnson for finding it. + Also casted FTimeOut to LongInt for computation to prevent + overflow with Delphi 1 for long timeout. +Aug 12, 1999 V2.56 HandleError was not correctly handling error message ! + thank to Kim Mlgrd Nielsen +Aug 20, 1999 V2.57 Revised conditional compilation, adapted for BCB4, set + compile options same as TWSocket. + Added DnsResult property as suggested by Heedong Lim + . This property is accessible from + OnStateChange when state is ftpWaitingBanner. + Added checks for FLocalStream being destroyed. +Sep 5, 1999 V2.58 Heedong Lim found a missing + assignation to FRequestResult in ControlSocketSessionConnected. +Sep 11, 1999 V2.59 Added OnBgException. Thanks to William Sorensen + for suggesting it. +Oct 30, 1999 V2.60 Changed TargetPort and DataPort from integer to WORD so + that Delphi 1 is able to handle port greater than 32K. Bug and + and fix by Duncan Gold . +Nov 22, 1999 V2.61 Allow continuation lines in all responses. +Nov 24, 1999 V2.62 RestPut command by Alexander Burlakov + Added RestartPut. Added ftpNoAutoResumeAt option. +Dec 26, 1999 V2.63 Corrected a bug in DoPutAppendAsync. +Jan 24, 1999 V2.64 Added LongInt cast to all GetTickCount. +Apr 01, 2000 V2.65 Removed any set of integer. + Thanks to Grant Black , + Davie and + Stephen Williams for their work on + this subject. +Apr 09, 2000 V2.66 Proxy / Socks / Local streams support added. + Pieter Snyman added proxy and socks support. + Eric added stream support (assign LocalStream + property to switch to stream mode and LocalFileName to switch to + normal file mode). +Jun 10, 2000 V2.67 Added NOFORMS conditional compile to be able to build a + program (console mode, dll or other) without using the forms unit + (because forms unit makes programs much bigger). See NOFORMS + related comments in wsocket.pas source file for correct use. + See also OnMessagePump event and Terminated property. +Jul 15, 2000 V2.68 Added ProxyPort property. Handled non standard port when + connecting thru proxy. +Jul 21, 2000 V2.69 Implemented check for ABOR, STAT and QUIT commands so that + it doesn't check if previous command is done. + By Davie . + Tomas Lannestedt found a bug when using + streams. Now it correctly handled stream clearing. +Sep 17, 2000 V2.70 Eugene Mayevski moved Controls use + out of NOFORMS way. +Nov 11, 2000 V2.71 Cleared FErrorMessage in ExecAsync. Thanks to Jake Traynham + for finding this bug. +Nov 30, 2000 V2.72 Added a Sleep in DataSocketPutDataSent, and use CloseDelayed + this will prevent some trucated file transfers. +Feb 17, 2001 V2.73 Better WaitUntilReady: check also ftpInternalReady. + By Davie . +Jun 16, 2001 V2.74 Added conditional compile for Delphi 6 +Jun 18, 2001 V2.75 Use AllocateHWnd and DeallocateHWnd from wsocket. +Jul 26, 2001 V2.76 Accept range 150-159 for status code after RETR command. + Peter Calum found some FTP server returning + unusual status code (and not conforming to RFC !). I don't like to + work arround other's bugs, but in this case this shouldn't hurt + anything. +Jul 28, 2001 V2.77 Cleared FNextRequest in HighLevelAsync and TriggerRequestDone + as suggested by Davie . + Added AbortXfer and AbortXferAsync to abort a running transfert + without breaking connection. +Sep 09, 2001 V2.78 Beat Boegli added LocalAddr property + for multihomed hosts. +Sep 13, 2001 V2.79 Bug fix by Beat Boegli related to + his previous changes. Now works with passive mode put. +Nov 02, 2001 V2.80 Added DisplayLastResponse in ControlSocketDataAvailable to + give continuation lines to OnDisplay event. + Accept 250 answer as well as 257 for MKD command as suggested by + Simon Horup . +Feb 12, 2002 V2.82 "Soltann" added code to extract IP + from passive mode reply so that transfer from another server is + possible (See TargetIP in code). +Apr 06, 2002 V2.83 Added code 257 to allowed code list for CDUpAsync as + suggest by . + Fixed a problem in ControlSocketSessionClosed where error code was + not checked. Bug found by . +Apr 20, 2002 V2.84 Removed useless units from uses clause. +Jun 28, 2002 V2.85 Removed check for ftpFctPut and FPassive in + TriggerRequestDone which cause trouble with passive mode and sync + operation. Thanks to "Gunnar" . +Oct 26, 2002 V2.85 Use wsoNoReceiveLoop option with data session. + Set OnSessionAvalable hanlder before calling listen as suggested + by Gunnar . +Nov 11, 2002 V2.86 Changed FtpCliDeallocateHWnd argument from HWND to Cardinal + becasue BCB doesn't like HWND when deriving acomponent from + TFtpCli (BCB bug ?). + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpCli; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER130} { C++ Builder V5.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER140} { C++ Builder V6.0 } + {$ObjExportAll On} +{$ENDIF} +{_DEFINE TRACE} + + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, +{$IFNDEF NOFORMS} + Forms, Controls, +{$ENDIF} + WSocket; + +const + FtpCliVersion = 286; + CopyRight : String = ' TFtpCli (c) 1996-2002 F. Piette V2.86 '; + +const + BLOCK_SIZE = 1460; { 1514 - TCP header size } + WM_FTP_REQUEST_DONE = WM_USER + 1; + WM_FTP_SENDDATA = WM_USER + 2; +{$IFDEF VER80} + { Delphi 1 has a 255 characters string limitation } + FTP_RCV_BUF_SIZE = 255; +{$ELSE} + FTP_RCV_BUF_SIZE = 4096; +{$ENDIF} + +type + TFtpOption = (ftpAcceptLF, ftpNoAutoResumeAt); + TFtpOptions = set of TFtpOption; + TFtpState = (ftpNotConnected, ftpReady, ftpInternalReady, + ftpDnsLookup, ftpConnected, ftpAbort, + ftpInternalAbort, ftpWaitingBanner, ftpWaitingResponse, + ftpPasvReady); + TFtpRequest = (ftpNone, ftpOpenAsync, ftpUserAsync, + ftpPassAsync, ftpCwdAsync, ftpConnectAsync, + ftpReceiveAsync, ftpDirAsync, ftpLsAsync, + ftpPortAsync, ftpGetAsync, ftpDirectoryAsync, + ftpListAsync, ftpSystemAsync, ftpSystAsync, + ftpQuitAsync, ftpAbortXferAsync, + ftpSizeAsync, ftpPutAsync, ftpAppendAsync, + ftpFileSizeAsync, ftpRqAbort, ftpMkdAsync, + ftpRmdAsync, ftpRenameAsync, ftpDeleAsync, + ftpRenAsync, ftpRenToAsync, ftpRenFromAsync, + ftpDeleteAsync, ftpMkdirAsync, ftpRmdirAsync, + ftpPwdAsync, ftpQuoteAsync, ftpCDupAsync, + ftpDoQuoteAsync, ftpTransmitAsync, ftpTypeSetAsync, + ftpRestAsync, ftpRestGetAsync, ftpRestartGetAsync, + ftpRestPutAsync, ftpRestartPutAsync); + TFtpFct = (ftpFctNone, ftpFctOpen, ftpFctUser, + ftpFctPass, ftpFctCwd, ftpFctSize, + ftpFctMkd, ftpFctRmd, ftpFctRenFrom, + ftpFctRenTo, ftpFctGet, ftpFctDir, + ftpFctQuit, ftpFctSyst, ftpFctDele, + ftpFctPwd, ftpFctQuote, ftpFctPut, + ftpFctTypeSet, ftpFctRest, ftpFctCDup, + ftpFctLs, ftpFctAppend, ftpFctPort, + ftpFctAbortXfer); + TFtpFctSet = set of TFtpFct; + TFtpShareMode = (ftpShareCompat, ftpShareExclusive, + ftpShareDenyWrite, ftpShareDenyRead, + ftpShareDenyNone); + TFtpDisplayFileMode = (ftpLineByLine, ftpBinary); + TFtpConnectionType = (ftpDirect, ftpProxy, ftpSocks4, ftpSocks4A, ftpSocks5); + TFtpDisplay = procedure(Sender : TObject; + var Msg : String) of object; + TFtpProgress = procedure(Sender : TObject; + Count : LongInt; + var Abort : Boolean) of object; + TFtpCommand = procedure(Sender : TObject; + var Cmd : String) of object; + TFtpRequestDone = procedure(Sender : TObject; + RqType : TFtpRequest; + Error : Word) of object; + TFtpReadyToTransmit = procedure(Sender : TObject; + var bCancel : Boolean) of object; + TFtpNextProc = procedure of object; + + FtpException = class(Exception); + + TCustomFtpCli = class(TComponent) + protected + FWindowHandle : HWND; + FHostName : String; + FPort : String; + FLocalAddr : String; {bb} + FUserName : String; + FPassWord : String; + FLocalFileName : String; + FHostFileName : String; + FHostDirName : String; + FDnsResult : String; + FType : Char; + FShareMode : Word; + FDisplayFileMode : TFtpDisplayFileMode; + FConnectionType : TFTPConnectionType; + FProxyServer : String; + FProxyPort : String; + FAppendFlag : Boolean; + FDisplayFileFlag : Boolean; + FControlSocket : TWSocket; + FDataSocket : TWSocket; + FStartTime : LongInt; + FStopTime : LongInt; + FState : TFtpState; + FStatusCode : LongInt; + FRequestResult : Integer; + FFctSet : TFtpFctSet; + FFctPrv : TFtpFct; + FHighLevelResult : Integer; + FHighLevelFlag : Boolean; + FRestartFlag : Boolean; + FOptions : TFtpOptions; + FOnDisplay : TFtpDisplay; + FOnDisplayFile : TFtpDisplay; + FOnError : TFtpDisplay; + FOnCommand : TFtpCommand; + FOnResponse : TNotifyEvent; + FOnSessionConnected : TSessionConnected; + FOnSessionClosed : TSessionClosed; + FOnStateChange : TNotifyEvent; + FOnRequestDone : TFtpRequestDone; + FOnProgress : TFtpProgress; + FOnReadyToTransmit : TFtpReadyToTransmit; + FOnBgException : TBgExceptionEvent; + FLocalStream : TStream; + FRequestType : TFtpRequest; + FRequestDoneFlag : Boolean; + FReceiveBuffer : array [0..FTP_RCV_BUF_SIZE - 1] of char; + FReceiveLen : Integer; + FLastResponse : String; + FLastResponseSave : String; { To save FLastResponse when quitting } + FPasvResponse : String; { To fix REST + PASV transfers } + FStatusCodeSave : LongInt; { To save FStatusCode when quitting } + FErrorMessage : String; + FError : Word; { To save Error when data connection closed } + FGetCommand : String; + FConnected : Boolean; + FSendBuffer : array [0..BLOCK_SIZE - 1] of char; + FByteCount : LongInt; + FSizeResult : LongInt; + FDirResult : String; + FResumeAt : LongInt; + FNext : TFtpNextProc; + FWhenConnected : TFtpNextProc; + FDoneAsync : TFtpNextProc; + FOkResponses : array [0..15] of Integer; + FNextRequest : TFtpNextProc; + FServerSaidDone : Boolean; + FFileReceived : Boolean; + FFileSent : Boolean; + FPassive : Boolean; + FEofFlag : Boolean; + FStorAnswerRcvd : Boolean; + FPutSessionOpened : Boolean; + FStreamFlag : Boolean; + procedure SetErrorMessage; + procedure DataSocketGetDataAvailable(Sender: TObject; Error : word); + procedure DataSocketGetSessionConnected(Sender: TObject; Error : word); + procedure DataSocketPutSessionConnected(Sender: TObject; Error : word); + procedure DataSocketGetSessionAvailable(Sender: TObject; Error : word); + procedure DataSocketGetSessionClosed(Sender: TObject; Error : word); + procedure DataSocketPutDataAvailable(Sender: TObject; Error : word); + procedure DataSocketPutDataSent(Sender: TObject; Error : word); + procedure DataSocketPutSessionAvailable(Sender: TObject; Error : word); + procedure DataSocketPutSessionClosed(Sender: TObject; Error : word); + procedure SendCommand(Cmd : String); virtual; + procedure TriggerDisplay(Msg : String); virtual; + procedure TriggerReadyToTransmit(var bCancel : Boolean); virtual; + procedure TriggerDisplayFile(Msg : String); virtual; + procedure TriggerError(Msg: string); virtual; + procedure DisplayLastResponse; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + function Progress : Boolean; virtual; + procedure ControlSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure ControlSocketSessionConnected(Sender: TObject; Error: Word); + procedure ControlSocketDataAvailable(Sender: TObject; Error: Word); + procedure ControlSocketSessionClosed(Sender: TObject; Error: Word); + procedure TriggerRequestDone(Error: Word); + procedure TriggerStateChange; + procedure StateChange(NewState : TFtpState); + procedure PortAsync; virtual; + procedure DoneQuitAsync; + procedure ExecAsync(RqType : TFtpRequest; + Cmd : String; + OkResponses : array of Word; + DoneAsync : TFtpNextProc); + procedure NextExecAsync; + procedure DoGetAsync(RqType : TFtpRequest); + procedure Next1GetAsync; + procedure Next2GetAsync; + procedure Next3GetAsync; + procedure Next1PutAsync; + procedure Next2PutAsync; + procedure Next3PutAsync; + procedure DoHighLevelAsync; + procedure DoPutAppendAsync; + procedure HighLevelAsync(RqType : TFtpRequest; Fcts : TFtpFctSet); + procedure HandleError(const Msg : String); + function CheckReady : Boolean; + procedure TransfertStats; virtual; + procedure ExtractMoreResults; + procedure SetBinary(Value: Boolean); + function GetBinary: Boolean; + function GetConnected: Boolean; + procedure SetShareMode(newValue: TFtpShareMode); + function GetShareMode: TFtpShareMode; + procedure SetDisplayFileMode(NewValue: TFtpDisplayFileMode); + function GetDisplayFileMode: TFtpDisplayFileMode; + procedure SetConnectionType(NewValue: TFtpConnectionType); + function GetConnectionType: TFtpConnectionType; + procedure SetSocksPassword(NewValue: string); + function GetSocksPassword: string; + procedure SetSocksPort(NewValue: string); + function GetSocksPort: string; + procedure SetSocksServer(NewValue: string); + function GetSocksServer: string; + procedure SetSocksUserCode(NewValue: string); + function GetSocksUserCode: string; + procedure SetPassive(NewValue: Boolean); + procedure WndProc(var MsgRec: TMessage); virtual; + function FtpCliAllocateHWnd(Method: TWndMethod): HWND; virtual; + procedure FtpCliDeallocateHWnd(WHandle: Cardinal); virtual; + procedure HandleBackGroundException(E: Exception); virtual; + procedure WMFtpRequestDone(var msg: TMessage); + message WM_FTP_REQUEST_DONE; + procedure WMFtpSendData(var msg: TMessage); + message WM_FTP_SENDDATA; + procedure DestroyLocalStream; + procedure SetLocalStream (Stream:TStream); + procedure SetLocalFileName (FileName:String); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + + procedure OpenAsync; virtual; + procedure UserAsync; virtual; + procedure PassAsync; virtual; + procedure ConnectAsync; virtual; + procedure QuitAsync; virtual; + procedure AbortAsync; virtual; + procedure GetAsync; virtual; + procedure ExecGetAsync; virtual; + procedure ReceiveAsync; virtual; + procedure PutAsync; virtual; + procedure ExecPutAsync; virtual; + procedure TransmitAsync; virtual; + procedure AppendAsync; virtual; + procedure ExecAppendAsync; virtual; + procedure AppendFileAsync; virtual; + procedure ExecDirAsync; virtual; + procedure DirAsync; virtual; + procedure ExecLsAsync; virtual; + procedure LsAsync; virtual; + procedure TypeSetAsync; virtual; + procedure TypeBinaryAsync; virtual; + procedure TypeAsciiAsync; virtual; + procedure PwdAsync; virtual; + procedure CwdAsync; virtual; + procedure CDupAsync; virtual; + procedure DirectoryAsync; virtual; + procedure ListAsync; virtual; + procedure SystAsync; virtual; + procedure SystemAsync; virtual; + procedure SizeAsync; virtual; + procedure FileSizeAsync; virtual; + procedure MkdAsync; virtual; + procedure MkdirAsync; virtual; + procedure RmdAsync; virtual; + procedure RmdirAsync; virtual; + procedure DeleAsync; virtual; + procedure DeleteAsync; virtual; + procedure RenFromAsync; virtual; + procedure RenToAsync; virtual; + procedure RenAsync; virtual; + procedure RenameAsync; virtual; + procedure QuoteAsync; virtual; + procedure DoQuoteAsync; virtual; + procedure AbortXferAsync; virtual; + procedure RestAsync; virtual; + procedure RestGetAsync; virtual; + procedure RestartGetAsync; virtual; + procedure RestPutAsync; virtual; + procedure RestartPutAsync; virtual; + + property Handle : HWND read FWindowHandle; + property LastResponse : String read FLastResponse; + property ErrorMessage : String read FErrorMessage; + property DnsResult : String read FDnsResult; + property SizeResult : LongInt read FSizeResult; + property DirResult : String read FDirResult; + property ControlSocket : TWSocket read FControlSocket; + property DataSocket : TWSocket read FDataSocket; + property Connected : Boolean read GetConnected; + property StatusCode : LongInt read FStatusCode; + property ByteCount : LongInt read FByteCount; + property State : TFtpState read FState; + property RequestType : TFtpRequest read FRequestType; + property Options : TFtpOptions read FOptions + write FOptions; + property LocalStream : TStream read FLocalStream + write SetLocalStream; + property ResumeAt : LongInt read FResumeAt + write FResumeAt; + property HostName : String read FHostName + write FHostName; + property Port : String read FPort + write FPort; + property LocalAddr : String read FLocalAddr + write FLocalAddr; {bb} + property UserName : String read FUserName + write FUserName; + property PassWord : String read FPassWord + write FPassWord; + property HostDirName : String read FHostDirName + write FHostDirName; + property HostFileName : String read FHostFileName + write FHostFileName; + property LocalFileName : String read FLocalFileName + write SetLocalFileName; + property DisplayFileFlag : Boolean read FDisplayFileFlag + write FDisplayFileFlag; + property Binary : Boolean read GetBinary + write SetBinary; + property Passive : Boolean read FPassive + write SetPassive; + property ShareMode : TFtpShareMode read GetShareMode + write SetShareMode; + property DisplayFileMode : TFtpDisplayFileMode read GetDisplayFileMode + write SetDisplayFileMode; + property ConnectionType : TFtpConnectionType read GetConnectionType + write SetConnectionType; + property ProxyServer : string read FProxyServer + write FProxyServer; + property ProxyPort : string read FProxyPort + write FProxyPort; + property SocksPassword : string read GetSocksPassword + write SetSocksPassword; + property SocksPort : string read GetSocksPort + write SetSocksPort; + property SocksServer : string read GetSocksServer + write SetSocksServer; + property SocksUserCode : string read GetSocksUserCode + write SetSocksUserCode; + property OnDisplay : TFtpDisplay read FOnDisplay + write FOnDisplay; + property OnDisplayFile : TFtpDisplay read FOnDisplayFile + write FOnDisplayFile; + property OnError : TFTPDisplay read FOnError + write FOnError; + property OnCommand : TFtpCommand read FOnCommand + write FOnCommand; + property OnResponse : TNotifyEvent read FOnResponse + write FOnResponse; + property OnProgress : TFtpProgress read FOnProgress + write FOnProgress; + property OnSessionConnected : TSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnRequestDone : TFtpRequestDone read FOnRequestDone + write FOnRequestDone; + property OnStateChange : TNotifyEvent read FOnStateChange + write FOnStateChange; + property OnReadyToTransmit : TFtpReadyToTransmit read FOnReadyToTransmit + write FOnReadyToTransmit; + property OnBgException : TBgExceptionEvent read FOnBgException + write FOnBgException; + end; + + TFtpClient = class(TCustomFtpCli) + protected + FTimeout : Integer; { Given in seconds } + FTimeStop : LongInt; { Milli-seconds } + FMultiThreaded : Boolean; + FTerminated : Boolean; + FOnMessagePump : TNotifyEvent; + function Progress : Boolean; override; + function Synchronize(Proc : TFtpNextProc) : Boolean; virtual; + function WaitUntilReady : Boolean; virtual; + public + constructor Create(AOwner: TComponent); override; + procedure MessagePump; + function Open : Boolean; + function User : Boolean; + function Pass : Boolean; + function Connect : Boolean; + function Cwd : Boolean; + function Pwd : Boolean; + function CDup : Boolean; + function TypeSet : Boolean; + function TypeBinary : Boolean; + function TypeAscii : Boolean; + function Get : Boolean; + function Put : Boolean; + function RestPut : Boolean; + function RestartPut : Boolean; + function Quit : Boolean; + function Abort : Boolean; + function Receive : Boolean; + function Transmit : Boolean; + function Append : Boolean; + function AppendFile : Boolean; + function Dir : Boolean; + function Directory : Boolean; + function Ls : Boolean; + function List : Boolean; + function Mkd : Boolean; + function Mkdir : Boolean; + function Ren : Boolean; + function Rename : Boolean; + function Dele : Boolean; + function Delete : Boolean; + function Rmd : Boolean; + function Rmdir : Boolean; + function Syst : Boolean; + function System : Boolean; + function Size : Boolean; + function FileSize : Boolean; + function Quote : Boolean; + function DoQuote : Boolean; + function AbortXfer : Boolean; + function RestGet : Boolean; + function RestartGet : Boolean; +{$IFDEF NOFORMS} + property Terminated : Boolean read FTerminated + write FTerminated; + property OnMessagePump : TNotifyEvent read FOnMessagePump + write FOnMessagePump; +{$ENDIF} + published + property Timeout : Integer read FTimeout write FTimeout; + property MultiThreaded : Boolean read FMultiThreaded write FMultiThreaded; + property HostName; + property Port; + property LocalAddr; {bb} + property UserName; + property PassWord; + property HostDirName; + property HostFileName; + property LocalFileName; + property DisplayFileFlag; + property Binary; + property ErrorMessage; + property ShareMode; + property Options; + property ConnectionType; + property ProxyServer; + property SocksPassword; + property SocksPort; + property SocksServer; + property SocksUserCode; + property OnDisplay; + property OnDisplayFile; + property OnCommand; + property OnResponse; + property OnProgress; + property OnSessionConnected; + property OnSessionClosed; + property OnRequestDone; + property OnStateChange; + property OnReadyToTransmit; + property OnBgException; + end; + +procedure Register; + +implementation + +uses WinSock; + +{$IFNDEF WIN32} +const + HFILE_ERROR = $FFFF; +{$ENDIF} + +{$B-} { Do not evaluate boolean expressions more than necessary } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TFtpClient]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +procedure SetLength(var Str : String; Len : Integer); +begin + Str[0] := chr(Len); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetFileSize(const FileName: string): LongInt; +var + SearchRec: TSearchRec; +begin + if FindFirst(ExpandFileName(FileName), faAnyFile, SearchRec) = 0 then begin + Result := SearchRec.Size; + SysUtils.FindClose(SearchRec); + end + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Step over blank spaces } +function StpBlk(Data : PChar) : PChar; +begin + Result := Data; + if Result <> nil then begin + while (Result^ <> #0) and (Result^ in [' ', #9, #13, #10]) do + Inc(Result); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetInteger(Data : PChar; var Number : LongInt) : PChar; +var + bSign : Boolean; +begin + Number := 0; + Result := StpBlk(Data); + + if (Result = nil) then + Exit; + + { Remember the sign } + if Result^ in ['-', '+'] then begin + bSign := (Result^ = '-'); + Inc(Result); + end + else + bSign := FALSE; + + { Convert any number } + while (Result^ <> #0) and (Result^ in ['0'..'9']) do begin + Number := Number * 10 + ord(Result^) - ord('0'); + Inc(Result); + end; + + { Correct for sign } + if bSign then + Number := -Number; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetQuotedString(Data : PChar; var Dst : String) : PChar; +begin + Dst := ''; + Result := StpBlk(Data); + + if (Result = nil) then + Exit; + + if Result^ <> '"' then + Exit; + Inc(Result); + + while Result^ <> #0 do begin + if Result^ <> '"' then + Dst := Dst + Result^ + else begin + Inc(Result); + if Result^ <> '"' then + Break; + Dst := Dst + Result^; + end; + Inc(Result); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* * * *} +{* * TCustomFtpCli * *} +{* * * *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NOFORMS} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function FtpCliWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TObject; + MsgRec : TMessage; +begin + { At window creation asked windows to store a pointer to our object } + Obj := TObject(GetWindowLong(ahWnd, 0)); + + { If the pointer doesn't represent a TCustomFtpCli, just call the default procedure} + if not (Obj is TCustomFtpCli) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass parameter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + { May be a try/except around next line is needed. Not sure ! } + TCustomFtpCli(Obj).WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.FtpCliAllocateHWnd(Method: TWndMethod) : HWND; +begin +{$IFDEF NOFORMS} + Result := XSocketAllocateHWnd(Self); + SetWindowLong(Result, GWL_WNDPROC, LongInt(@FtpCliWindowProc)); +{$ELSE} + { If you have AllocateHWnd undifined, then your last project was } + { compiled with NOFORMS defined. Just recompile everything for } + { the new project. This will recompile wsocket.pas according to } + { this project settings. } + Result := WSocket.AllocateHWnd(Method); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.FtpCliDeallocateHWnd(WHandle : Cardinal); +begin +{$IFDEF NOFORMS} + XSocketDeallocateHWnd(WHandle); +{$ELSE} + WSocket.DeallocateHWnd(WHandle); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomFtpCli.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + FWindowHandle := FtpCliAllocateHWnd(WndProc); + FOnDisplay := nil; + FOnDisplayFile := nil; + FType := 'I'; + FPort := 'ftp'; + FProxyPort := 'ftp'; + FState := ftpReady; + FShareMode := fmShareExclusive; + FConnectionType:= ftpDirect; + FProxyServer := ''; { Should Socks properties be set to '' as well? } + FOptions := [ftpAcceptLF]; + FLocalAddr := '0.0.0.0'; {bb} + FControlSocket := TWSocket.Create(Self); + FControlSocket.OnSessionConnected := ControlSocketSessionConnected; + FControlSocket.OnDataAvailable := ControlSocketDataAvailable; + FControlSocket.OnSessionClosed := ControlSocketSessionClosed; + FControlSocket.OnDnsLookupDone := ControlSocketDnsLookupDone; + FDataSocket := TWSocket.Create(Self); + FStreamFlag := False; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomFtpCli.Destroy; +begin + FtpCliDeallocateHWnd(FWindowHandle); + { Be sure to have LocalStream closed } +{ FStreamFlag := FALSE; } + DestroyLocalStream; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.WndProc(var MsgRec: TMessage); +begin + try + with MsgRec do begin + case Msg of + WM_FTP_REQUEST_DONE : WMFtpRequestDone(MsgRec); + WM_FTP_SENDDATA : WMFtpSendData(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; + except + on E:Exception do + HandleBackGroundException(E); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All exceptions *MUST* be handled. If an exception is not handled, the } +{ application will be shut down ! } +procedure TCustomFtpCli.HandleBackGroundException(E: Exception); +var + CanAbort : Boolean; +begin + CanAbort := TRUE; + { First call the error event handler, if any } + if Assigned(FOnBgException) then begin + try + FOnBgException(Self, E, CanAbort); + except + end; + end; + { Then abort the component } + if CanAbort then begin + try + Abort; + except + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.WMFtpRequestDone(var msg: TMessage); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, FRequestType, Msg.LParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then begin + if AComponent = FControlSocket then + FControlSocket := nil + else if AComponent = FDataSocket then + FDataSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetErrorMessage; +begin + if FErrorMessage = '' then + FErrorMessage := FLastResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DestroyLocalStream; +begin + if Assigned(FLocalStream) and (FStreamFlag = FALSE) then begin + FLocalStream.Destroy; + FLocalStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetLocalFileName(FileName: String); +begin + FLocalFileName := FileName; + if FileName <> '' then + FStreamFlag := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetLocalStream(Stream: TStream); +begin + FLocalStream := Stream; + FStreamFlag := (Stream <> nil); + if FStreamFlag then + FLocalFileName := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerDisplay(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerDisplayFile(Msg : String); +begin + if Assigned(FOnDisplayFile) then + FOnDisplayFile(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerError(Msg : String); +begin + if Assigned(FOnError) then + FOnError(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DisplayLastResponse; +begin + TriggerDisplay('< ' + FLastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.StateChange(NewState : TFtpState); +begin + if FState <> NewState then begin + FState := NewState; + TriggerStateChange; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetBinary : Boolean; +begin + Result := (FType = 'I'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetBinary(Value : Boolean); +begin + if Value then + FType := 'I' + else + FType := 'A'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.Progress : Boolean; +var + Abort : Boolean; +begin + Abort := FALSE; + if Assigned(FOnProgress) then + FOnProgress(Self, FByteCount + FResumeAt, Abort); + + if Abort then begin + TriggerDisplay('! Abort requested'); + FDataSocket.Close; + end; + + Result := not Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SendCommand(Cmd : String); +begin + if Assigned(FOnCommand) then + FOnCommand(Self, Cmd); + TriggerDisplay('> ' + Cmd); + if FControlSocket.State = wsConnected then + FControlSocket.SendStr(Cmd + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.HandleError(const Msg : String); +begin + if Assigned(FOnError) then + TriggerError(Msg) + else + raise FtpException.Create(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Return TRUE if component is ready for next operation. } +{* Trigger an error or return FALSE if not ready } +function TCustomFtpCli.CheckReady : Boolean; +begin + Result := (FState in [ftpReady, ftpInternalReady]); + if not Result then + HandleError('FTP component not ready'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.OpenAsync; +begin + if not CheckReady then + Exit; + if FConnected then begin + HandleError('FTP component already connected'); + Exit; + end; + + if not FHighLevelFlag then + FRequestType := ftpOpenAsync; + + FRequestDoneFlag := FALSE; + FReceiveLen := 0; + FRequestResult := 0; + FDnsResult := ''; + StateChange(ftpDnsLookup); + case FConnectionType of + ftpDirect, ftpSocks4, ftpSocks4A, ftpSocks5: FControlSocket.DnsLookup(FHostName); + ftpProxy: FControlSocket.DnsLookup(FProxyServer); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecAsync( + RqType : TFtpRequest; + Cmd : String; { Command to execute } + OkResponses : array of Word; { List of responses like '200 221 342' } + DoneAsync : TFtpNextProc); { What to do when done } +var + I : Integer; +begin + if not((Cmd = 'ABOR') or (Cmd = 'STAT') or (Cmd = 'QUIT')) then begin + if not CheckReady then + Exit; + + if not FConnected then begin + HandleError('FTP component not connected'); + Exit; + end; + end; + + if not FHighLevelFlag then + FRequestType := RqType; + + for I := 0 to High(OkResponses) do + FOkResponses[I] := OkResponses[I]; + FOkResponses[High(OkResponses) + 1] := 0; + + FRequestDoneFlag := FALSE; + FNext := NextExecAsync; + FDoneAsync := DoneAsync; + FErrormessage := ''; + StateChange(ftpWaitingResponse); + SendCommand(Cmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExtractMoreResults; +var + NumericCode : LongInt; + p : PChar; +begin + if FRequestResult = 0 then begin + if FFctPrv in [ftpFctSize] then begin + p := GetInteger(@FLastResponse[1], NumericCode); + GetInteger(p, FSizeResult); + end; + if FFctPrv in [ftpFctCDup, ftpFctPwd, ftpFctMkd, ftpFctCwd] then begin + p := GetInteger(@FLastResponse[1], NumericCode); + GetQuotedString(p, FDirResult); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.NextExecAsync; +var + I : Integer; + p : PChar; +begin + DisplayLastResponse; + if not (FLastResponse[1] in ['0'..'9']) then + Exit; { Continuation line, nothing to do } + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Exit; { Continuation line, nothing to do } + + if FOkResponses[0] = 0 then begin + { The list of ok responses is empty } + if FStatusCode >= 500 then begin + { Not a good response } + FRequestResult := FStatusCode; + SetErrorMessage; + end + else + FRequestResult := 0; + end + else begin + { We have a list of ok response codes } + for I := 0 to High(FOkResponses) do begin + if FOkResponses[I] = 0 then begin + { No good response found } + FRequestResult := FStatusCode; + SetErrorMessage; + break; + end; + if FOkResponses[I] = FStatusCode then begin + { Good response found } + FRequestResult := 0; + Break; + end; + end; + end; + + if FPassive and (FStatusCode = 227) then begin + StateChange(ftpPasvReady); { 19.09.2002 } + FPasvResponse := FLastResponse; + end; + + ExtractMoreResults; + + if Assigned(FDoneAsync) then + FDoneAsync + else + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.QuitAsync; +begin + DestroyLocalStream; + FFctPrv := ftpFctQuit; + ExecAsync(ftpQuitAsync, 'QUIT', [221], DoneQuitAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DoneQuitAsync; +begin + FControlSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.CwdAsync; +begin + if Length(FHostDirName) <= 0 then begin + HandleError('HostDirName emtpy'); + Exit; + end; + + FFctPrv := ftpFctCwd; + ExecAsync(ftpCwdAsync, 'CWD '+ FHostDirName, [200, 250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.UserAsync; +var + CmdBuf : String; +begin + if Length(FUserName) <= 0 then begin + HandleError('UserName emtpy'); + Exit; + end; + FFctPrv := ftpFctUser; + if FConnectionType = ftpProxy then begin + if (CompareText(FPort, 'ftp') = 0) or + (CompareText(FPort, '21') = 0) then + CmdBuf := 'USER ' + FUserName + '@' + FHostName + else + CmdBuf := 'USER ' + FUserName + '@' + FHostName + ':' + FPort; + end + else + CmdBuf := 'USER ' + FUserName; + ExecAsync(ftpUserAsync, CmdBuf, [331, 230], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.PassAsync; +begin + if Length(FPassword) <= 0 then begin + HandleError('Password emtpy'); + Exit; + end; + FFctPrv := ftpFctPass; + ExecAsync(ftpPassAsync, 'PASS '+ FPassword, [230], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SystAsync; +begin + FFctPrv := ftpFctSyst; + ExecAsync(ftpSystAsync, 'SYST', [215], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RestAsync; +begin + FFctPrv := ftpFctRest; + { When restarting a download, we always start from current local file } + { size. When restarting a upload, we restart from ResumeAt property } + { value. This property could be initialized using Size command. } + if (not (FRequestType in [ftpRestartPutAsync, ftpRestPutAsync])) and + (not (ftpNoAutoResumeAt in FOptions)) then + FResumeAt := GetFileSize(FLocalFileName); + if FResumeAt > 0 then + ExecAsync(ftpRestAsync, 'REST ' + IntToStr(FResumeAt), [0], nil) + else begin + FRequestDoneFlag := FALSE; + FNext := NextExecAsync; + FDoneAsync := nil; + TriggerRequestDone(0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SizeAsync; +begin + FSizeResult := 0; + FFctPrv := ftpFctSize; + ExecAsync(ftpSizeAsync, 'SIZE ' + FHostFileName, [213], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TypeSetAsync; +begin + FFctPrv := ftpFctTypeSet; + ExecAsync(ftpTypeSetAsync, 'TYPE ' + FType, [200], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TypeBinaryAsync; +begin + Binary := TRUE; + TypeSetAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TypeAsciiAsync; +begin + Binary := FALSE; + TypeSetAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.MkdAsync; +begin + FFctPrv := ftpFctMkd; + ExecAsync(ftpMkdAsync, 'MKD ' + FHostFileName, [250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RmdAsync; +begin + FFctPrv := ftpFctRmd; + ExecAsync(ftpRmdAsync, 'RMD ' + FHostFileName, [250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DeleAsync; +begin + FFctPrv := ftpFctDele; + ExecAsync(ftpDeleAsync, 'DELE ' + FHostFileName, [250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.AbortXferAsync; +begin + FFctPrv := ftpFctAbortXfer; + ExecAsync(ftpAbortXferAsync, 'ABOR', [0], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.QuoteAsync; +begin + FFctPrv := ftpFctQuote; + ExecAsync(ftpQuoteAsync, FLocalFileName, [0], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.PwdAsync; +begin + FFctPrv := ftpFctPwd; + ExecAsync(ftpPwdAsync, 'PWD', [250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.CDupAsync; +begin + FFctPrv := ftpFctCDup; + ExecAsync(ftpCDupAsync, 'CDUP', [250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RenFromAsync; +begin + FFctPrv := ftpFctRenFrom; + ExecAsync(ftpRenFromAsync, 'RNFR ' + FHostFileName, [350], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RenToAsync; +begin + FFctPrv := ftpFctRenTo; + ExecAsync(ftpRenToAsync, 'RNTO ' + FLocalFileName, [200, 250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.AbortAsync; +var + bFlag : Boolean; +begin +{$IFDEF TRACE} TriggerDisplay('! Aborting'); {$ENDIF} + bFlag := (FState = ftpDnsLookup); + StateChange(ftpAbort); + DestroyLocalStream; + if bFlag then + FControlSocket.CancelDnsLookup; + if FControlSocket.State <> wsClosed then + FControlSocket.Close; + if FDataSocket.State <> wsClosed then + FDataSocket.Close; + DestroyLocalStream; + FConnected := FALSE; + StateChange(ftpReady); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DoHighLevelAsync; +begin +{$IFDEF TRACE} TriggerDisplay('! HighLevelAsync ' + IntToStr(FRequestResult)); {$ENDIF} + if FState = ftpAbort then begin + {$IFDEF TRACE} TriggerDisplay('! Abort detected'); {$ENDIF} + FFctSet := []; + FHighLevelResult := 426; + FErrorMessage := '426 Operation aborted.'; + end; + + FNextRequest := DoHighLevelAsync; + + if FRequestResult <> 0 then begin + { Previous command had errors } + FHighLevelResult := FRequestResult; + if (FFctPrv = ftpFctQuit) or (not (ftpFctQuit in FFctSet)) then + FFctSet := [] + else + FFctSet := [ftpFctQuit]; + end; + + ExtractMoreResults; + + if ftpFctOpen in FFctSet then begin + FFctPrv := ftpFctOpen; + FFctSet := FFctSet - [FFctPrv]; + OpenAsync; + Exit; + end; + + if ftpFctUser in FFctSet then begin + FFctPrv := ftpFctUser; + FFctSet := FFctSet - [FFctPrv]; + UserAsync; + Exit; + end; + + if ftpFctPass in FFctSet then begin + FFctSet := FFctSet - [ftpFctPass]; + if (FFctPrv <> ftpFctUser) or + ((FfctPrv = ftpFctUser) and (FStatusCode = 331)) then begin + FFctPrv := ftpFctPass; + PassAsync; + Exit; + end; + end; + + if ftpFctCwd in FFctSet then begin + FFctSet := FFctSet - [ftpFctCwd]; + if Length(FHostDirName) > 0 then begin + FFctPrv := ftpFctCwd; + CwdAsync; + Exit; + end; + end; + + if ftpFctCDup in FFctSet then begin + FFctPrv := ftpFctCDup; + FFctSet := FFctSet - [FFctPrv]; + CDupAsync; + Exit; + end; + + if ftpFctTypeSet in FFctSet then begin + FFctPrv := ftpFctTypeSet; + FFctSet := FFctSet - [FFctPrv]; + TypeSetAsync; + Exit; + end; + + if ftpFctPort in FFctSet then begin + FFctPrv := ftpFctPort; + FFctSet := FFctSet - [FFctPrv]; + PortAsync; + Exit; + end; + + if ftpFctRest in FFctSet then begin + FFctPrv := ftpFctRest; + FFctSet := FFctSet - [FFctPrv]; + RestAsync; + Exit; + end; + + if ftpFctGet in FFctSet then begin + if (FFctPrv <> ftpFctRest) or + (FResumeAt < 0) or + ((FFctPrv = ftpFctRest) and (FStatusCode <> 350)) then + FResumeAt := 0; + + FFctPrv := ftpFctGet; + FFctSet := FFctSet - [FFctPrv]; + ExecGetAsync; + Exit; + end; + + if ftpFctPut in FFctSet then begin + FFctPrv := ftpFctPut; + FFctSet := FFctSet - [FFctPrv]; + ExecPutAsync; + Exit; + end; + + if ftpFctAppend in FFctSet then begin + FFctPrv := ftpFctAppend; + FFctSet := FFctSet - [FFctPrv]; + ExecAppendAsync; + Exit; + end; + + if ftpFctDir in FFctSet then begin + FFctPrv := ftpFctDir; + FFctSet := FFctSet - [FFctPrv]; + ExecDirAsync; + Exit; + end; + + if ftpFctLs in FFctSet then begin + FFctPrv := ftpFctLs; + FFctSet := FFctSet - [FFctPrv]; + ExecLsAsync; + Exit; + end; + + if ftpFctSyst in FFctSet then begin + FFctPrv := ftpFctSyst; + FFctSet := FFctSet - [FFctPrv]; + SystAsync; + Exit; + end; + + if ftpFctMkd in FFctSet then begin + FFctPrv := ftpFctMkd; + FFctSet := FFctSet - [FFctPrv]; + MkdAsync; + Exit; + end; + + if ftpFctRmd in FFctSet then begin + FFctPrv := ftpFctRmd; + FFctSet := FFctSet - [FFctPrv]; + RmdAsync; + Exit; + end; + + if ftpFctRenFrom in FFctSet then begin + FFctPrv := ftpFctRenFrom; + FFctSet := FFctSet - [FFctPrv]; + RenFromAsync; + Exit; + end; + + if ftpFctRenTo in FFctSet then begin + FFctPrv := ftpFctRenTo; + FFctSet := FFctSet - [FFctPrv]; + RenToAsync; + Exit; + end; + + if ftpFctSize in FFctSet then begin + FFctPrv := ftpFctSize; + FFctSet := FFctSet - [FFctPrv]; + SizeAsync; + Exit; + end; + + if ftpFctDele in FFctSet then begin + FFctPrv := ftpFctDele; + FFctSet := FFctSet - [FFctPrv]; + DeleAsync; + Exit; + end; + + if ftpFctPwd in FFctSet then begin + FFctPrv := ftpFctPwd; + FFctSet := FFctSet - [FFctPrv]; + PwdAsync; + Exit; + end; + + if ftpFctAbortXfer in FFctSet then begin + FFctPrv := ftpFctAbortXfer; + FFctSet := FFctSet - [FFctPrv]; + AbortXferAsync; + Exit; + end; + + if ftpFctQuote in FFctSet then begin + FFctPrv := ftpFctQuote; + FFctSet := FFctSet - [FFctPrv]; + QuoteAsync; + Exit; + end; + + if ftpFctQuit in FFctSet then begin + FFctPrv := ftpFctQuit; + FFctSet := FFctSet - [FFctPrv]; + FLastResponseSave := FLastResponse; + FStatusCodeSave := FStatusCode; + QuitAsync; + Exit; + end; + + {$IFDEF TRACE} TriggerDisplay('! HighLevelAsync done'); {$ENDIF} + FFctSet := []; + FNextRequest := nil; + FRequestDoneFlag := FALSE; + TriggerRequestDone(FHighLevelResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.HighLevelAsync(RqType : TFtpRequest; Fcts : TFtpFctSet); +begin + if FConnected and (ftpFctOpen in Fcts) then begin + HandleError('FTP component already connected'); + Exit; + end; + if not CheckReady then + Exit; + FLastResponseSave := FLastResponse; + FStatusCodeSave := -1; + FRequestType := RqType; + FRequestResult := 0; + FFctSet := Fcts; + FFctPrv := ftpFctNone; + FHighLevelResult := 0; + FHighLevelFlag := TRUE; + FLastResponse := ''; + FErrorMessage := ''; + FRestartFlag := FALSE; + FNextRequest := nil; + DoHighLevelAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ConnectAsync; +begin + HighLevelAsync(ftpConnectAsync, [ftpFctOpen, ftpFctUser, ftpFctPass]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ReceiveAsync; +begin + HighLevelAsync(ftpReceiveAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctTypeSet, ftpFctPort, ftpFctGet, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.PutAsync; +begin + HighLevelAsync(ftpPutAsync, + [ftpFctPort, ftpFctPut]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ By A.Burlakov: new procedure for resuming uploads } +{ Uses REST + STOR commands instead APPEND } +procedure TCustomFtpCli.RestPutAsync; +begin + HighLevelAsync(ftpRestPutAsync, + [ftpFctRest, ftpFctPort, ftpFctPut]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RestartPutAsync; +begin + HighLevelAsync(ftpRestartPutAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, ftpFctCwd, + ftpFctTypeSet, ftpFctRest, ftpFctPort, ftpFctPut, + ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TransmitAsync; +begin + HighLevelAsync(ftpTransmitAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctTypeSet, ftpFctPort, + ftpFctPut, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.AppendAsync; +begin + HighLevelAsync(ftpAppendAsync, + [ftpFctPort, ftpFctAppend]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.AppendFileAsync; +begin + HighLevelAsync(ftpTransmitAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctTypeSet, ftpFctPort, + ftpFctAppend, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DirAsync; +begin + HighLevelAsync(ftpDirAsync, + [ftpFctPort, ftpFctDir]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DirectoryAsync; +begin + HighLevelAsync(ftpDirectoryAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctPort, ftpFctDir, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.LsAsync; +begin + HighLevelAsync(ftpLsAsync, + [ftpFctPort, ftpFctLs]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ListAsync; +begin + HighLevelAsync(ftpListAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctPort, ftpFctLs, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SystemAsync; +begin + HighLevelAsync(ftpSystemAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctSyst, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RestartGetAsync; +begin + HighLevelAsync(ftpRestartGetAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, ftpFctCwd, + ftpFctTypeSet, ftpFctRest, ftpFctPort, ftpFctGet, + ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RestGetAsync; +begin + HighLevelAsync(ftpRestGetAsync, + [ftpFctRest, ftpFctPort, ftpFctGet]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.GetAsync; +begin + HighLevelAsync(ftpGetAsync, + [ftpFctPort, ftpFctGet]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.MkdirAsync; +begin + HighLevelAsync(ftpMkdirAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctMkd, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RmdirAsync; +begin + HighLevelAsync(ftpRmdirAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctRmd, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DeleteAsync; +begin + HighLevelAsync(ftpDeleteAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctDele, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DoQuoteAsync; +begin + HighLevelAsync(ftpDoQuoteAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctQuote, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RenameAsync; +begin + HighLevelAsync(ftpRenameAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, ftpFctCwd, + ftpFctRenFrom, ftpFctRenTo, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RenAsync; +begin + HighLevelAsync(ftpRenAsync, [ftpFctRenFrom, ftpFctRenTo]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.FileSizeAsync; +begin + HighLevelAsync(ftpSizeAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctSize, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketGetDataAvailable(Sender: TObject; Error : word); +var + Len : Integer; + Buffer : array [1..4096] of Char; { Should use a dynamic buffer instead... } + aSocket : TWSocket; + I, J : Integer; + Line : String; +begin + if not Progress then + Exit; + + aSocket := Sender as TWSocket; + + Len := aSocket.Receive(@Buffer[1], High(Buffer)); +{TriggerDisplay('! Data received ' + IntToStr(Len));} + if Len = 0 then + { Remote has closed, ignore } + else if Len < 0 then begin + { An error has occured } + if (aSocket.State = wsConnected) and + (aSocket.LastError <> WSAEWOULDBLOCK) then begin + TriggerDisplay('! Data: Receive error ' + IntToStr(aSocket.LastError)); + aSocket.Shutdown(2); + Exit; + end; + end + else begin + { Update our statistics } + FByteCount := FByteCount + Len; + + if FLocalStream <> nil then begin + try + FLocalStream.WriteBuffer(Buffer, Len); + except + TriggerDisplay('! Error writing local file'); + aSocket.Shutdown(2); + Exit; + end; + end; + + { If requested to display the received data, do it line by line } + if FDisplayFileFlag then begin + case FDisplayFileMode of + ftpBinary: + begin + {$IFDEF VER80} + { 16 bit has max 255 characters per string } + if Len > 255 then + SetLength(Line, 255) + else + {$ENDIF} + SetLength(Line, Len); + Move(Buffer[1], Line[1], Length(Line)); + TriggerDisplayFile(Line); + end; + ftpLineByLine: + if Len > 0 then begin + i := 1; + while (i <= Len) do begin + j := 1; + while (i <= Len) and (Buffer[i] <> #10) and (Buffer[i] <> #13) do begin + i := i + 1; + j := j + 1; + end; + {$IFDEF VER80} + if (j - 1) > 255 then + SetLength(Line, 255) + else + {$ENDIF} + SetLength(Line, j - 1); + if Length(Line) > 0 then + Move(Buffer[i - j + 1], Line[1], Length(Line)); + TriggerDisplayFile(Line); + while (i <= Len) and ((Buffer[i] = #10) or (Buffer[i] = #13)) do + i := i + 1; + end; + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketGetSessionConnected( + Sender: TObject; + Error : word); +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session opened (Get)'); {$ENDIF} + + { Use the socket for the data transmission } + FDataSocket.OnSessionClosed := DataSocketGetSessionClosed; + FDataSocket.OnDataAvailable := DataSocketGetDataAvailable; + FDataSocket.OnDataSent := nil; + + { Record the starting time } + FStartTime := LongInt(GetTickCount); + + if Error <> 0 then begin + FLastResponse := 'Unable to establish data connection, error #' + + IntToStr(Error); + FStatusCode := 550; + SetErrorMessage; + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Used for passive mode } +procedure TCustomFtpCli.DataSocketPutSessionConnected( + Sender: TObject; + Error : word); +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session opened (Put)'); {$ENDIF} + + { Use the socket for the data transmission } + FDataSocket.OnSessionClosed := DataSocketPutSessionClosed; + FDataSocket.OnDataAvailable := nil; + FDataSocket.OnDataSent := nil; + + { Record we opened data session } + FPutSessionOpened := TRUE; + + { Record the starting time } + FStartTime := LongInt(GetTickCount); + + if Error <> 0 then begin + FLastResponse := 'Unable to establish data connection, error #' + + IntToStr(Error); + FStatusCode := 550; + SetErrorMessage; + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + + StateChange(ftpWaitingResponse); + FNext := Next1PutAsync; + + if FAppendFlag then + SendCommand('APPE ' + FHostFileName) + else + SendCommand('STOR ' + FHostFileName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketGetSessionAvailable(Sender: TObject; Error : word); +var + aSocket : TSocket; +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session requested'); {$ENDIF} + { Accept the incomming connection initiated by the FTP server for data } + aSocket := FDataSocket.Accept; + + { Close the listening socket, we don't need it anymore } + FDataSocket.Close; + + { Reuse the socket for the data transmission } + FDataSocket.OnSessionClosed := DataSocketGetSessionClosed; + FDataSocket.OnDataAvailable := DataSocketGetDataAvailable; + FDataSocket.OnDataSent := nil; + FDataSocket.HSocket := aSocket; + FDataSocket.ComponentOptions := [wsoNoReceiveLoop]; { 26/10/02 } + + { Record the starting time } + FStartTime := LongInt(GetTickCount); + {$IFDEF TRACE} TriggerDisplay('! Data Session opened'); {$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketGetSessionClosed( + Sender: TObject; + Error : word); +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session closed'); {$ENDIF} + + DestroyLocalStream; + FFileReceived := TRUE; + FError := Error; + Next3GetAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketPutSessionAvailable(Sender: TObject; Error : word); +var + aSocket : TSocket; + SndBufSize : Integer; + OptLen : Integer; +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session requested'); {$ENDIF} + { Accept the incomming connection initiated by the FTP server for data } + aSocket := FDataSocket.Accept; + + { Close the listening socket, we don't need it anymore } + FDataSocket.Close; + + { Reuse the socket for the data transmission } + FDataSocket.OnSessionClosed := DataSocketPutSessionClosed; + FDataSocket.OnDataAvailable := DataSocketPutDataAvailable; + FDataSocket.OnDataSent := DataSocketPutDataSent; +{ FDataSocket.OnDisplay := FOnDisplay; } { Debugging only } + FDataSocket.HSocket := aSocket; + FDataSocket.ComponentOptions := [wsoNoReceiveLoop]; { 26/10/02 } + + OptLen := SizeOf(SndBufSize); + if WSocket_getsockopt(FDataSocket.HSocket, SOL_SOCKET, + SO_SNDBUF, + @SndBufSize, OptLen) = SOCKET_ERROR then begin + HandleError('winsock.getsockopt(SO_SNDBUF) failed'); + Exit; + end; + + { Be sure to gracefully close the socket } + FDataSocket.LingerOnOff := wsLingerOff; + FDataSocket.LingerTimeout := 10; + FDataSocket.SetLingerOption; +{ FStorAnswerRcvd := TRUE; } { V240 INSERTED line } + FPutSessionOpened := TRUE; + if FStorAnswerRcvd and (FStartTime = 0) then + PostMessage(Handle, WM_FTP_SENDDATA, 0, 0); + + {$IFDEF TRACE} TriggerDisplay('! Data Session opened'); {$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.WMFtpSendData(var msg: TMessage); +begin + { Record the starting time } + FStartTime := LongInt(GetTickCount); + + { Send first data block } + DataSocketPutDataSent(FDataSocket, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketPutDataSent(Sender: TObject; Error : word); +var + Count : Integer; +begin + if (FLocalStream = nil) or (not Progress) then + Exit; + if FLocalStream = nil then + Exit; { Could be set to nil by Progress function } + + if Error <> 0 then begin + TriggerDisplay('! Error #' + IntToStr(Error) + ' sending data'); + FDataSocket.Close; + Exit; + end; + + if FEofFlag or (not FStorAnswerRcvd) or (not FPutSessionOpened) then + Exit; + + try + Count := FLocalStream.Read(FSendBuffer, BLOCK_SIZE); + if Count > 0 then begin + FByteCount := FByteCount + Count; + FDataSocket.Send(@FSendBuffer, Count); + end + else begin { EOF } + {$IFNDEF VER80} + { For an unknown reason, winsock need time to send last data } + { buffer. Without this delay, we may end with a partial file } + { transfer. See comments in DoPutAppendAsync function. } + { Normally using Linger option would handle this case. But } + { many winsock implementations will end with a 10055 error } + { after a lot of consecutive file transfers. } + Sleep(100); + {$ENDIF} + FDataSocket.CloseDelayed; + FEofFlag := TRUE; + end; + except + TriggerDisplay('! Error reading file'); + FDataSocket.Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketPutSessionClosed(Sender: TObject; Error : word); +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session closed'); {$ENDIF} + { close the local file } + DestroyLocalStream; + FFileSent := TRUE; + FError := Error; + Next3PutAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketPutDataAvailable(Sender: TObject; Error : word); +var + Buffer : array [1..2048] of Char; + aSocket : TWSocket; +begin + { We don't wants to receive data here because we are sending, not } + { receiving. But in order to not crash if we receive somthing, just } + { get it and do nothing with it ! } + aSocket := Sender as TWSocket; + aSocket.Receive(@Buffer[1], High(Buffer)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TransfertStats; +var + Buffer : String; + BytesSec : LongInt; +begin + FStopTime := LongInt(GetTickCount); + Buffer := IntToSTr(FByteCount) + ' bytes received/sent in ' + + IntToStr((FStopTime - FStartTime) div 1000) + ' seconds'; + + if FStopTime <> FStartTime then begin + if FByteCount > 32767 then + BytesSec := 1000 * (FByteCount div (FStopTime - FStartTime)) + else + BytesSec := (1000 * FByteCount) div (FStopTime - FStartTime); + Buffer := Buffer + ' (' + IntToStr(BytesSec) + ' Bytes/sec)'; + end; + TriggerDisplay('! ' + Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecGetAsync; +begin + DoGetAsync(ftpGetAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecDirAsync; +begin + DoGetAsync(ftpDirAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecLsAsync; +begin + DoGetAsync(ftpLsAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetShareMode(newValue : TFtpShareMode); +begin +{$IFNDEF VER80}{$WARNINGS OFF}{$ENDIF} + case newValue of + ftpShareCompat : FShareMode := fmShareCompat; + ftpShareExclusive : FShareMode := fmShareExclusive; + ftpShareDenyWrite : FShareMode := fmShareDenyWrite; + ftpShareDenyRead : FShareMode := fmShareDenyRead; + ftpShareDenyNone : FShareMode := fmShareDenyNone; + else + FShareMode := fmShareExclusive; + end; +{$IFNDEF VER80}{$WARNINGS ON}{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetShareMode : TFtpShareMode; +begin +{$IFNDEF VER80}{$WARNINGS OFF}{$ENDIF} + case FShareMode of + fmShareCompat : Result := ftpShareCompat; + fmShareExclusive : Result := ftpShareExclusive; + fmShareDenyWrite : Result := ftpShareDenyWrite; + fmShareDenyRead : Result := ftpShareDenyRead; + fmShareDenyNone : Result := ftpShareDenyNone; + else + Result := ftpShareExclusive; + end; +{$IFNDEF VER80}{$WARNINGS ON}{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetDisplayFileMode(NewValue : TFtpDisplayFileMode); +begin + case NewValue of + ftpLineByLine, ftpBinary : FDisplayFileMode := NewValue; + else + FDisplayFileMode := ftpLineByLine; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetDisplayFileMode : TFtpDisplayFileMode; +begin + case FDisplayFileMode of + ftpLineByLine: Result := ftpLineByLine; + ftpBinary: Result := ftpBinary; + else + Result := ftpLineByLine; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetConnectionType(NewValue: TFtpConnectionType); +begin + { Must be disconnected to change the connection type } + if FConnected then begin + HandleError('FTP component connected'); + Exit; + end; + { Change connection type } + case NewValue of + ftpDirect: begin + FConnectionType := NewValue; + FControlSocket.SocksAuthentication := socksNoAuthentication; + FDataSocket.SocksAuthentication := socksNoAuthentication; + end; + ftpProxy: begin + FConnectionType := NewValue; + FPassive := True; + FControlSocket.SocksAuthentication := socksNoAuthentication; + FDataSocket.SocksAuthentication := socksNoAuthentication; + end; + ftpSocks4: begin + FConnectionType := NewValue; + FPassive := True; + with FControlSocket do begin + SocksLevel := '4'; + SocksAuthentication := socksAuthenticateUsercode; + end; + with FDataSocket do begin + SocksLevel := '4'; + SocksAuthentication := socksAuthenticateUsercode; + end; + end; + ftpSocks4A: begin + FConnectionType := NewValue; + FPassive := True; + with FControlSocket do begin + SocksLevel := '4A'; + SocksAuthentication := socksAuthenticateUsercode; + end; + with FDataSocket do begin + SocksLevel := '4A'; + SocksAuthentication := socksAuthenticateUsercode; + end; + end; + ftpSocks5: begin + FConnectionType := NewValue; + FPassive := True; + with FControlSocket do begin + SocksLevel := '5'; + SocksAuthentication := socksAuthenticateUsercode; + end; + with FDataSocket do begin + SocksLevel := '5'; + SocksAuthentication := socksAuthenticateUsercode; + end; + end; + else + FConnectionType := ftpDirect; + FControlSocket.SocksAuthentication := socksNoAuthentication; + FDataSocket.SocksAuthentication := socksNoAuthentication; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetConnectionType: TFtpConnectionType; +begin + case FConnectionType of + ftpDirect: Result := ftpDirect; + ftpProxy: Result := ftpProxy; + ftpSocks4: Result := ftpSocks4; + ftpSocks4A: Result := ftpSocks4A; + ftpSocks5: Result := ftpSocks5; + else + Result := ftpDirect; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetSocksPassword(NewValue: string); +begin + FControlSocket.SocksPassword := NewValue; + FDataSocket.SocksPassword := NewValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetSocksPassword: string; +begin + Result := FControlSocket.SocksPassword; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetSocksPort(NewValue: string); +begin + FControlSocket.SocksPort := NewValue; + FDataSocket.SocksPort := NewValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetSocksPort: string; +begin + Result := FControlSocket.SocksPort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetSocksServer(NewValue: string); +begin + FControlSocket.SocksServer := NewValue; + FDataSocket.SocksServer := NewValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetSocksServer: string; +begin + Result := FControlSocket.SocksServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetSocksUserCode(NewValue: string); +begin + FControlSocket.SocksUserCode := NewValue; + FDataSocket.SocksUserCode := NewValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetSocksUserCode: string; +begin + Result := FControlSocket.SocksUserCode; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetPassive(NewValue: Boolean); +begin + { Passive state must not be changed if Proxy or Socks connection type is selected } + case FConnectionType of + ftpDirect: FPassive := NewValue; + ftpProxy, ftpSocks4, ftpSocks4A, ftpSocks5: FPassive := True; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Receive a file or a directory list of a file list } +procedure TCustomFtpCli.DoGetAsync(RqType : TFtpRequest); +{$IFDEF VER80} +const + FILE_END = 2; +{$ENDIF} +var + Temp : String; + I : Integer; + TargetPort : WORD; { 10/30/99 } + TargetIP : String; +begin + if not FConnected then begin + HandleError(FGetCommand + ': not connected'); + Exit; + end; + + { If no filename was assigned, check if maybe we wanna view it, } + { meaning - FDisplayFileFlag } + if (Length(FLocalFileName) <= 0) and + not (FDisplayFileFlag or FStreamFlag) then begin + HandleError('LocalFileName empty'); + Exit; + end; + + if not FHighLevelFlag then + FRequestType := RqType; + + case RqType of + ftpGetAsync: FGetCommand := 'RETR'; + ftpDirAsync: FGetCommand := 'LIST'; + ftpLsAsync: FGetCommand := 'NLST'; + end; + + FServerSaidDone := FALSE; + FFileReceived := FALSE; + FRequestDoneFlag := FALSE; + FByteCount := 0; + FError := 0; + + FDataSocket.OnSessionAvailable := DataSocketGetSessionAvailable; + +{$IFDEF VER80} + { With Delphi 1 you need to nul terminate each string } + FLocalFileName[Length(FLocalFileName) + 1] := chr(0); +{$ENDIF} + + { open the destination file } + { Don't open a file if we're on FDisplayFileFlag } + if not FDisplayFileFlag then + try + DestroyLocalStream; + if FResumeAt <= 0 then begin + if not Assigned(FLocalStream) and not FStreamFlag then begin + FLocalStream := TFileStream.Create(FLocalFileName, fmCreate); + if FShareMode <> 0 then begin + { Not default mode, need to close and reopen file with } + { the given mode } + FLocalStream.Destroy; + FLocalStream := TFileStream.Create(FLocalFileName, + fmOpenWrite + FShareMode); + end; + end; + end + else begin + if not Assigned(FLocalStream) and not FStreamFlag then + FLocalStream := TFileStream.Create(FLocalFileName, + fmOpenWrite + FShareMode); + FLocalStream.Seek(FResumeAt, soFromBeginning) + end; + except + FLastResponse := 'Unable to open local file ' + FLocalFileName; + FStatusCode := 550; + SetErrorMessage; + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + exit; + end; + + if FPassive then begin + Temp := FPasvResponse; + Delete(Temp, 1, Pos('(', Temp)); + + TargetIP := ''; + for I := 1 to 4 do begin + TargetIP := TargetIP + Copy(Temp, 1, Pos(',',Temp) - 1) + '.'; + Delete(Temp, 1, Pos(',', Temp)); + end; + TargetIP := Copy(TargetIP, 1, Length(TargetIP) - 1); + + TargetPort := StrToInt(Copy(Temp, 1, Pos(',', Temp) - 1)) * 256; + Delete(Temp, 1, Pos(',', Temp)); + TargetPort := TargetPort + StrToInt(Copy(Temp, 1, Pos(')', Temp) - 1)); + + FDataSocket.Port := IntToStr(TargetPort); + FDataSocket.Addr := TargetIP; {ControlSocket.Addr;} + FDataSocket.LocalAddr := FLocalAddr; {bb} + FDataSocket.OnSessionConnected := DataSocketGetSessionConnected; + FDataSocket.LingerOnOff := wsLingerOff; + FDataSocket.LingerTimeout := 0; + FDataSocket.ComponentOptions := [wsoNoReceiveLoop]; { 26/10/02 } + try + FDataSocket.Connect; + except + on E:Exception do begin + FLastResponse := '550 ' + E.ClassName + ': ' + E.Message; + FStatusCode := 550; + SetErrorMessage; + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + exit; + end; + end; + end; + + StateChange(ftpWaitingResponse); + FNext := Next1GetAsync; + if Length(FHostFileName) > 0 then + SendCommand(FGetCommand + ' ' + FHostFileName) + else + SendCommand(FGetCommand); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when receiving the response for the RETR command we sent } +procedure TCustomFtpCli.Next1GetAsync; +begin + DisplayLastResponse; + GetInteger(@FLastResponse[1], FStatusCode); + if not (((FStatusCode div 10) = 15) or { Accept range 150-159 } + (FStatusCode = 125)) then begin { Accept code 125 } + SetErrorMessage; + FNext := nil; + FDataSocket.Close; + DestroyLocalStream; + { Reset the starting position } + FResumeAt := 0; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + FNext := Next2GetAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when the FTP server has sent the file we asked to GET } +procedure TCustomFtpCli.Next2GetAsync; +begin + DisplayLastResponse; + GetInteger(@FLastResponse[1], FStatusCode); + if not ((FStatusCode = 125) or (FStatusCode = 226) or + (FStatusCode = 250)) then begin + SetErrorMessage; + DestroyLocalStream; + FDataSocket.Close; + TriggerDisplay('! RETR/LIST/NLST Failed'); + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + FServerSaidDone := TRUE; + Next3GetAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here either if the file has been received of the FTP server has } +{ his response. } +procedure TCustomFtpCli.Next3GetAsync; +begin + {$IFDEF TRACE} TriggerDisplay('! Next3GetAsync'); {$ENDIF} + if (not FServerSaidDone) or (not FFileReceived) then + Exit; + + { Display statistics } + TransfertStats; + + { Reset the starting position } + FResumeAt := 0; + FRequestResult := FError; + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecPutAsync; +begin + FAppendFlag := FALSE; + FRequestType := ftpPutAsync; + DoPutAppendAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecAppendAsync; +begin + FAppendFlag := TRUE; + FRequestType := ftpAppendAsync; + DoPutAppendAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DoPutAppendAsync; +{$IFDEF VER80} +const + FILE_END = 2; +{$ENDIF} +var + Temp : String; + I : Integer; + TargetPort : WORD; { 10/30/99 } + TargetIP : String; + bCancel : Boolean; +begin + if not FConnected then begin + HandleError('STOR/APPE: not connected'); + Exit; + end; + + if (not FStreamFlag) and (Length(FLocalFileName) <= 0) then begin + HandleError('LocalFileName empty'); + Exit; + end; + + FServerSaidDone := FALSE; + FFileSent := FALSE; + FRequestDoneFlag := FALSE; + FPutSessionOpened := FALSE; + FStorAnswerRcvd := FALSE; + FStartTime := 0; + FByteCount := 0; + FError := 0; + + bCancel := FALSE; + TriggerReadyToTransmit(bCancel); + if bCancel then begin + FErrorMessage := '426 Transmit cancelled by application'; + FStatusCode := 426; + TriggerDisplay('! ' + FErrorMessage); + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + + FDataSocket.OnSessionAvailable := DataSocketPutSessionAvailable; +{$IFDEF VER80} + { With Delphi 1 you need to nul terminate each string } + FLocalFileName[Length(FLocalFileName) + 1] := chr(0); +{$ENDIF} + + { open the local source file } + try + { Be sure to have previous instance closed } + DestroyLocalStream; + if not Assigned(FLocalStream) and not FStreamFlag then + FLocalStream := TFileStream.Create(FLocalFileName, + fmOpenRead + FShareMode); + FEofFlag := FALSE; + if FResumeAt > 0 then + FLocalStream.Seek(FResumeAt, soFromBeginning); + except + FErrorMessage := '426 Unable to open local file ' + FLocalFileName; + FStatusCode := 426; + TriggerDisplay('! ' + FErrorMessage); + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + + if FPassive then begin + Temp := FPasvResponse; { 26/12/99 } + Delete(Temp, 1, Pos('(', Temp)); + TargetIP := ''; + for I := 1 to 4 do begin + TargetIP := TargetIP + Copy(Temp, 1, Pos(',',Temp) - 1) + '.'; + Delete(Temp, 1, Pos(',', Temp)); + end; + TargetIP := Copy(TargetIP, 1, Length(TargetIP) - 1); + + TargetPort := StrToInt(Copy(Temp, 1, Pos(',', Temp) - 1)) * 256; + Delete(Temp, 1, Pos(',', Temp)); + TargetPort := TargetPort + StrToInt(Copy(Temp, 1, Pos(')', Temp) - 1)); + + FDataSocket.Port := IntToStr(TargetPort); + FDataSocket.Addr := TargetIP; {ControlSocket.Addr;} + FDataSocket.LocalAddr := FLocalAddr; {bb} + FDataSocket.OnSessionConnected := DataSocketPutSessionConnected; + { Normally we should use LingerOn with a timeout. But doing so will } + { often result in error 10055 triggered after a lot of consecutive } + { file transfers. There is code in DataSocketPutDataSent to make } + { sure last packet is sent completely. } + FDataSocket.LingerOnOff := wsLingerOff; + FDataSocket.LingerTimeout := 0; + FDataSocket.ComponentOptions := [wsoNoReceiveLoop]; { 26/10/02 } + try + FDataSocket.Connect; + except + on E:Exception do begin + FLastResponse := '426 ' + E.ClassName + ': ' + E.Message; + FStatusCode := 426; + SetErrorMessage; + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + end; + Exit; + end; + + StateChange(ftpWaitingResponse); + FNext := Next1PutAsync; + + if FAppendFlag then + SendCommand('APPE ' + FHostFileName) + else + SendCommand('STOR ' + FHostFileName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when receiving the response for the STOR command we sent } +procedure TCustomFtpCli.Next1PutAsync; +var + p : PChar; +begin + DisplayLastResponse; + if not (FLastResponse[1] in ['0'..'9']) then + Exit; { Continuation line, nothing to do } + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Exit; { Continuation line, nothing to do } + + if not ((FStatusCode = 150) or (FStatusCode = 125)) then begin + SetErrorMessage; + FNext := nil; + FDataSocket.Close; + DestroyLocalStream; + { Reset the starting position } + FResumeAt := 0; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + + if FPassive then begin + { Send the first data block } + {$IFDEF TRACE} TriggerDisplay('! Send first block'); {$ENDIF} + FStorAnswerRcvd := TRUE; + FDataSocket.OnDataSent := DataSocketPutDataSent; + DataSocketPutDataSent(FDataSocket, 0); + end + else begin + { V240 FStorAnswerRcvd := TRUE; } + FStorAnswerRcvd := TRUE; + if FPutSessionOpened and (FStartTime = 0) then + PostMessage(Handle, WM_FTP_SENDDATA, 0, 0); + end; + + + FNext := Next2PutAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when the FTP server has received the file we sent (STOR) } +procedure TCustomFtpCli.Next2PutAsync; +var + p : PChar; +begin + DisplayLastResponse; + if not (FLastResponse[1] in ['0'..'9']) then + Exit; { Continuation line, nothing to do } + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Exit; { Continuation line, nothing to do } + if not ((FStatusCode = 226) or (FStatusCode = 250)) then begin + SetErrorMessage; + DestroyLocalStream; + FDataSocket.Close; + TriggerDisplay('! STOR Failed'); + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + FServerSaidDone := TRUE; + Next3PutAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when the file has been sent or when the FTP server tell us } +{ he recived the file. } +procedure TCustomFtpCli.Next3PutAsync; +begin + {$IFDEF TRACE} TriggerDisplay('! Next3PutAsync'); {$ENDIF} + if (not FServerSaidDone) or (not FFileSent) then + Exit; + + { Display statistics } + TransfertStats; + + { Reset the starting position } + FResumeAt := 0; + FRequestResult := FError; + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.PortAsync; +var + Msg : String; + saddr : TSockAddrIn; + saddrlen : Integer; + DataPort : DWORD; { 10/30/99 } + IPAddr : TInAddr; +begin + { Makes the data socket listening for data connection } + FDataSocket.Proto := 'tcp'; + FDataSocket.Addr := '0.0.0.0'; { INADDR_ANY } + FDataSocket.Port := '0'; { IPPORT_ANY } + FDataSocket.OnSessionAvailable := nil; + FDataSocket.OnSessionClosed := nil; + FDataSocket.OnDataAvailable := nil; + + if FPassive then + DataPort := 0 { Not needed, makes compiler happy } + else begin + if (ftpFctGet in FFctSet) or (ftpFctDir in FFctSet) then {G.B. 2002/07/12} + FDataSocket.OnSessionAvailable := DataSocketGetSessionAvailable + else if ftpFctPut in FFctSet then + FDataSocket.OnSessionAvailable := DataSocketPutSessionAvailable; + FDataSocket.LingerOnOff := wsLingerOn; + FDataSocket.LingerTimeout := 10; + FDataSocket.Listen; + + { Get the port number as assigned by Windows } + saddrLen := SizeOf(saddr); + FDataSocket.GetSockName(saddr, saddrLen); + DataPort := WSocket_ntohs(saddr.sin_port); + end; + + { Get our IP address from our control socket } + saddrlen := SizeOf(saddr); + FControlSocket.GetSockName(saddr, saddrlen); + IPAddr := saddr.sin_addr; + + { Strange behaviour of PWS (FrontPage 97 Web Server for W95) } + { which do not like effective address when localhost is used } + if FPassive then + Msg := 'PASV' + else begin + if FControlSocket.sin.sin_addr.s_addr = WSocket_htonl($7F000001) then + Msg := Format('PORT 127,0,0,1,%d,%d', + [HiByte(DataPort), + LoByte(DataPort)]) + else + Msg := Format('PORT %d,%d,%d,%d,%d,%d', + [ord(IPAddr.S_un_b.s_b1), + ord(IPAddr.S_un_b.s_b2), + ord(IPAddr.S_un_b.s_b3), + ord(IPAddr.S_un_b.s_b4), + HiByte(DataPort), + LoByte(DataPort)]); + end; + + FByteCount := 0; + FFctPrv := ftpFctPort; + ExecAsync(ftpPortAsync, Msg, [200, 227], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ControlSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + FLastResponse := '500 ' + WSocketErrorDesc(Error) + + ' (Winsock error #' + IntToStr(Error) + ')'; + FStatusCode := 500; + FRequestResult := FStatusCode; { 21/05/99 } + SetErrorMessage; + TriggerRequestDone(Error); + end + else begin + FDnsResult := FControlSocket.DnsResult; + FControlSocket.Addr := FDnsResult; + FControlSocket.LocalAddr := FLocalAddr; {bb} + FControlSocket.Proto := 'tcp'; + if (FConnectionType = ftpProxy) and (FProxyPort <> '') then + FControlSocket.Port := FProxyPort + else + FControlSocket.Port := FPort; +{ FControlSocket.OnDisplay := FOnDisplay; } { Debugging only } + StateChange(ftpWaitingBanner); + try + FControlSocket.Connect; + except + on E:Exception do begin + FLastResponse := '500 ' + E.ClassName + ': ' + E.Message; + FStatusCode := 500; + FRequestResult := FStatusCode; { 21/05/99 } + SetErrorMessage; + TriggerRequestDone(FStatusCode); + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ControlSocketSessionConnected(Sender: TObject; Error: Word); +begin + { Do not trigger the client SessionConnected from here. We must wait } + { to have received the server banner. } + if Error <> 0 then begin + FLastResponse := '500 ' + WSocketErrorDesc(Error) + + ' (Winsock error #' + IntToStr(Error) + ')'; + FStatusCode := 500; + FRequestResult := FStatusCode; { Heedong Lim, 05/14/1999 } + SetErrorMessage; { Heedong Lim, 05/14/1999 } + FNextRequest := nil; + TriggerRequestDone(Error); + FControlSocket.Close; + StateChange(ftpReady); + end + else + FConnected := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ControlSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I, J : Integer; + p : PChar; +begin + Len := FControlSocket.Receive(@FReceiveBuffer[FReceiveLen], + sizeof(FReceiveBuffer) - FReceiveLen - 1); + + if FRequestType = ftpRqAbort then + Exit; + + if Len = 0 then begin + FControlSocket.Close; + Exit; + end; + if Len < 0 then + Exit; + + FReceiveBuffer[FReceiveLen + Len] := #0; + FReceiveLen := FReceiveLen + Len; + + while FReceiveLen > 0 do begin + if ftpAcceptLF in FOptions then begin + I := Pos(#10, FReceiveBuffer); + J := I; + end + else begin + I := Pos(#13#10, FReceiveBuffer); + J := I + 1; + end; + if I <= 0 then + break; + if I > FReceiveLen then + break; + + FLastResponse := Copy(FReceiveBuffer, 1, I - 1); + { Remove trailing control chars } + while (Length(FLastResponse) > 0) and + (FLastResponse[Length(FLastResponse)] in [#10, #13]) do + SetLength(FLastResponse, Length(FLastResponse) - 1); + + if Assigned(FOnResponse) then + FOnresponse(Self); + +{$IFDEF DUMP} + FDumpBuf := '>|'; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.WriteBuffer(FLastResponse[1], Length(FLastResponse)); + FDumpBuf := '|' + #13#10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} +{$IFDEF VER80} + { Add a nul byte at the end of string for Delphi 1 } + FLastResponse[Length(FLastResponse) + 1] := #0; +{$ENDIF} + FReceiveLen := FReceiveLen - J; + if FReceiveLen > 0 then + Move(FReceiveBuffer[J], FReceiveBuffer[0], FReceiveLen + 1) + else if FReceiveLen < 0 then + FReceiveLen := 0; + + if FState = ftpWaitingBanner then begin + DisplayLastResponse; + if not (FLastResponse[1] in ['0'..'9']) then + Continue; { Continuation line, ignore } + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Continue; { Continuation line, ignore } + if FStatusCode <> 220 then begin + SetErrorMessage; + FRequestResult := FStatusCode; + FControlSocket.Close; + Exit; + end; + + StateChange(ftpConnected); + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); + + if Assigned(FWhenConnected) then + FWhenConnected + else begin + TriggerRequestDone(0); + end; + end + else if FState = ftpWaitingResponse then begin + if not (FLastResponse[1] in ['0'..'9']) then begin { 22/11/99 } + DisplayLastResponse; { 02/11/01 } + Continue; { Continuation line, ignore } + end; + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then begin + DisplayLastResponse; { 02/11/01 } + Continue; { Continuation line, ignore } + end; + if Assigned(FNext) then + FNext + else + HandleError('Program error: FNext is nil'); + end + else { Unexpected data received } + DisplayLastResponse; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ControlSocketSessionClosed(Sender: TObject; Error: Word); +begin + if FConnected then begin + FConnected := FALSE; + if FState <> ftpAbort then + StateChange(ftpNotConnected); + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); + end; + if FState <> ftpAbort then + StateChange(ftpInternalReady); + if not (FRequestType in [ftpRqAbort]) then begin + if Error <> 0 then begin + FLastResponse := '500 Control connection closed. ' + + WSocketErrorDesc(Error) + + ' (Winsock error #' + IntToStr(Error) + ')'; + FStatusCode := 500; + FRequestResult := FStatusCode; { 06 apr 2002 } + SetErrorMessage; + end; + TriggerRequestDone(FRequestResult); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerStateChange; +begin + if Assigned(FOnStateChange) then + FOnStateChange(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerRequestDone(Error: Word); +begin + if not FRequestDoneFlag then begin + FRequestDoneFlag := TRUE; + if (Error = 0) and Assigned(FNextRequest) then begin + if (FState <> ftpAbort) + and (FState <> ftpPasvReady) { 19.09.2002 } + { and 28/06/2002 + not ((ftpFctPut in FFctSet) and (FPassive = true))} then + StateChange(ftpInternalReady); + FNextRequest; + end + else begin + StateChange(ftpReady); + if FDataSocket.State <> wsClosed then + FDataSocket.Close; + { Restore the lastresponse saved before quit command } + if FHighLevelFlag and (FStatusCodeSave >= 0) then begin + FLastResponse := FLastResponseSave; + FStatusCode := FStatusCodeSave; + end; + FHighLevelFlag := FALSE; + FNextRequest := nil; + PostMessage(Handle, WM_FTP_REQUEST_DONE, 0, Error); + { if Assigned(FOnRequestDone) then + FOnRequestDone(Self, FRequestType, Error); } + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerReadyToTransmit(var bCancel : Boolean); +begin + if Assigned(FOnReadyToTransmit) then + FOnReadyToTransmit(Self, bCancel); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetConnected : Boolean; +begin + Result := FControlSocket.State <> wsClosed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* * * *} +{* * TFtpClient * *} +{* * * *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TFtpClient.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FTimeout := 15; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Open : Boolean; +begin + Result := Synchronize(OpenAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.User : Boolean; +begin + Result := Synchronize(UserAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Pass : Boolean; +begin + Result := Synchronize(PassAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Connect : Boolean; +begin + Result := Synchronize(ConnectASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Cwd : Boolean; +begin + Result := Synchronize(CwdASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Pwd : Boolean; +begin + Result := Synchronize(PwdASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.CDup : Boolean; +begin + Result := Synchronize(CDupASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.TypeSet : Boolean; +begin + Result := Synchronize(TypeSetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.TypeBinary : Boolean; +begin + Binary := TRUE; + Result := Synchronize(TypeSetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.TypeAscii : Boolean; +begin + Binary := FALSE; + Result := Synchronize(TypeSetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Get : Boolean; +begin + Result := Synchronize(GetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Put : Boolean; +begin + Result := Synchronize(PutASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ By A.Burlakov: new function for resuming uploads } +{ Uses REST + STOR commands instead APPEND } +function TFtpClient.RestPut : Boolean; +begin + Result := Synchronize(RestPutASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.RestartPut : Boolean; +begin + Result := Synchronize(RestartPutASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Append : Boolean; +begin + Result := Synchronize(AppendASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Quit : Boolean; +begin + Result := Synchronize(QuitASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Abort : Boolean; +begin + Result := Synchronize(AbortASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Receive : Boolean; +begin + Result := Synchronize(ReceiveASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Transmit : Boolean; +begin + Result := Synchronize(TransmitASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.AppendFile : Boolean; +begin + Result := Synchronize(AppendFileASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Dir : Boolean; +begin + Result := Synchronize(DirASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Directory : Boolean; +begin + Result := Synchronize(DirectoryASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Ls : Boolean; +begin + Result := Synchronize(LsASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.List : Boolean; +begin + Result := Synchronize(ListASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Mkd : Boolean; +begin + Result := Synchronize(MkdASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Mkdir : Boolean; +begin + Result := Synchronize(MkdirASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Ren : Boolean; +begin + Result := Synchronize(RenASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Rename : Boolean; +begin + Result := Synchronize(RenameASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Dele : Boolean; +begin + Result := Synchronize(DeleASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Delete : Boolean; +begin + Result := Synchronize(DeleteASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Rmd : Boolean; +begin + Result := Synchronize(RmdASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Rmdir : Boolean; +begin + Result := Synchronize(RmdirASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Syst : Boolean; +begin + Result := Synchronize(SystASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.System : Boolean; +begin + Result := Synchronize(SystemASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Size : Boolean; +begin + Result := Synchronize(SizeASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.FileSize : Boolean; +begin + Result := Synchronize(FileSizeASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.AbortXfer: Boolean; +begin + Result := Synchronize(AbortXferASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Quote : Boolean; +begin + Result := Synchronize(QuoteASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.DoQuote : Boolean; +begin + Result := Synchronize(DoQuoteASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.RestGet : Boolean; +begin + Result := Synchronize(RestGetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.RestartGet : Boolean; +begin + Result := Synchronize(RestartGetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Progress : Boolean; +begin + Result := inherited Progress; + { Evaluate the timeout period again } + if FTimeout > 0 then + FTimeStop := LongInt(GetTickCount) + LongInt(FTimeout) * 1000; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.MessagePump; +begin +{$IFDEF VER80} + Application.ProcessMessages; +{$ELSE} + if FMultiThreaded then + FControlSocket.ProcessMessages + else +{$IFDEF NOFORMS} + { The Forms unit (TApplication object) has not been included. } + { We used either an external message pump or our internal message pump. } + { External message pump has to set Terminated property to TRUE when the } + { application is terminated. } + if Assigned(FOnMessagePump) then + FOnMessagePump(Self) + else + FControlSocket.ProcessMessages; +{$ELSE} + Application.ProcessMessages; +{$ENDIF} +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.WaitUntilReady : Boolean; +begin + Result := TRUE; { Assume success } + FTimeStop := LongInt(GetTickCount) + LongInt(FTimeout) * 1000; + while TRUE do begin + if FState in [ftpReady, ftpInternalReady] then begin + { Back to ready state, the command is finished } + Result := (FRequestResult = 0); + break; + end; + + if {$IFNDEF NOFORMS} Application.Terminated or + {$ELSE} Terminated or + {$ENDIF} + ((FTimeout > 0) and (LongInt(GetTickCount) > FTimeStop)) then begin + { Timeout occured } + AbortAsync; + FErrorMessage := '426 Timeout'; + FStatusCode := 426; + Result := FALSE; { Command failed } + break; + end; + MessagePump; + { Do not use 100% CPU, but slow down transfert on high speed LAN } + {$IFNDEF VER80} + Sleep(0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Synchronize(Proc : TFtpNextProc) : Boolean; +begin + try + Proc; + Result := WaitUntilReady; + except + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + diff --git a/lib/Delphi/Vc32/FtpSrvC.dcu b/lib/Delphi/Vc32/FtpSrvC.dcu new file mode 100644 index 00000000..1e6a1c12 Binary files /dev/null and b/lib/Delphi/Vc32/FtpSrvC.dcu differ diff --git a/lib/Delphi/Vc32/FtpSrvC.pas b/lib/Delphi/Vc32/FtpSrvC.pas new file mode 100644 index 00000000..2698c12c --- /dev/null +++ b/lib/Delphi/Vc32/FtpSrvC.pas @@ -0,0 +1,579 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TFtpCtrlSocket component. It handle the client connection for + the TFtpServer component. +Creation: April 21, 1998 +Version: 1.09 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Apr 29, 1998 V0.90 released for beta testing. +May 03, 1998 V0.93 Adapted for Delphi 2.0 and C++Builder +May 04, 1998 V0.94 Added support for UNC (not finished !) +Jul 09, 1998 V1.00 Adapted for Delphi 4, removed beta status. +Jul 21, 1998 V1.01 Publised TrumpetCompatibility property. +Aug 06, 1998 V1.02 Verified that FRcvCnt was 0 in SetRcvSize. Suggested + by Nick MacDonald +Mar 06, 1999 V1.03 Added code from Plegge, Steve to add + APPE and STRU support. +Aug 20, 1999 V1.04 Revised compile time options. Adapted for BCB4. +Nov 24, 1999 V1.05 Added MTDM support. Thanks to Bruce Christensen + for his code. +Jan 24, 2000 V1.06 Patch IE5 bug in file names. Thanks to +Nov 11, 2000 V1.07 Checked for DOS attack. Close connection when buffer + overflow occured. Thanks to Lester for finding + this security hole. +Jul 28, 2001 V1.08 Added ID property to uniquely indentify the client. +Sep 09, 2001 V1.09 Eric Pascual changed TFtpCmdType type + to make it a Byte so that new values can be added by + sub-components which add new commands. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpSrvC; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, WinProcs, Messages, Classes, SysUtils, Winsock, WSocket; + +const + FtpCtrlSocketVersion = 109; + CopyRight : String = ' TFtpCtrlSocket (c) 1998-2001 F. Piette V1.09 '; + DefaultRcvSize = 2048; + +type + EFtpCtrlSocketException = class(Exception); + TFtpCtrlState = (ftpcInvalid, ftpcWaitingUserCode, ftpcWaitingPassword, + ftpcReady, ftpcWaitingAnswer); + + { TFtpCmdType is now defined as a byte and enumerated items as constants, } + { so that new values can be added by sub-components who add new commands } + TFtpCmdType = Byte; + +const + ftpcPORT = 0; + ftpcSTOR = 1; + ftpcRETR = 2; + ftpcCWD = 3; + ftpcXPWD = 4; + ftpcPWD = 5; + ftpcUSER = 6; + ftpcPASS = 7; + ftpcLIST = 8; + ftpcRMD = 9; + ftpcTYPE = 10; + ftpcSYST = 11; + ftpcQUIT = 12; + ftpcDELE = 13; + ftpcRNFR = 14; + ftpcMKD = 15; + ftpcRNTO = 16; + ftpcNOOP = 17; + ftpcNLST = 18; + ftpcABOR = 19; + ftpcCDUP = 20; + ftpcSIZE = 21; + ftpcREST = 22; + ftpcAPPE = 23; + ftpcSTRU = 24; {jsp - Added APPE and STRU types } + ftpcMDTM = 25; {bkc - Added MDTM type } + ftpcSTOU = 26; {ep - Added STOU type } + ftpcFEAT = 27; {SSV - Added FEAT type } + +type + TFtpOption = (ftpcUNC); + TFtpOptions = set of TFtpOption; + TDisplayEvent = procedure (Sender : TObject; Msg : String) of object; + TCommandEvent = procedure (Sender : TObject; CmdBuf : PChar; CmdLen : Integer) of object; + + TFtpCtrlSocket = class(TCustomWSocket) + protected + FDataSocket : TWSocket; + FRcvBuf : PChar; + FRcvCnt : Integer; + FRcvSize : Integer; + FBusy : Boolean; + FConnectedSince : TDateTime; + FLastCommand : TDateTime; + FCommandCount : LongInt; + FBanner : String; + FUserName : String; + FPassWord : String; + FCloseRequest : Boolean; + FHomeDir : String; + FDirectory : String; + FFtpState : TFtpCtrlState; + FAbortingTransfer : Boolean; + FUserData : LongInt; { Reserved for component user } + FPeerAddr : String; + FID : LongInt; + FOnDisplay : TDisplayEvent; + FOnCommand : TCommandEvent; + procedure TriggerSessionConnected(Error : Word); override; + function TriggerDataAvailable(Error : Word) : boolean; override; + procedure TriggerCommand(CmdBuf : PChar; CmdLen : Integer); virtual; + procedure SetRcvSize(newValue : Integer); + public + BinaryMode : Boolean; + DataAddr : String; + DataPort : String; + FileName : String; + FilePath : String; + DataSessionActive : Boolean; + DataStream : TStream; + HasOpenedFile : Boolean; + TransferError : String; + ByteCount : LongInt; + DataSent : Boolean; + CurCmdType : TFtpCmdType; + RestartPos : LongInt; + FromFileName : String; + ToFileName : String; + PassiveMode : Boolean; + PassiveStart : Boolean; + PassiveConnected : Boolean; + Options : TFtpOptions; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Dup(newHSocket : TSocket); override; + procedure StartConnection; virtual; + procedure SendAnswer(Answer : String); + procedure SetDirectory(newValue : String); + procedure SetAbortingTransfer(newValue : Boolean); + function GetPeerAddr: string; override; + property DataSocket : TWSocket read FDataSocket; + property ConnectedSince : TDateTime read FConnectedSince; + property LastCommand : TDateTime read FLastCommand; + property CommandCount : LongInt read FCommandCount; + property RcvBuf : PChar read FRcvBuf; + property RcvdCount; + property CloseRequest : Boolean read FCloseRequest + write FCloseRequest; + property Directory : String read FDirectory + write SetDirectory; + property HomeDir : String read FHomeDir + write FHomeDir; + property AbortingTransfer : Boolean read FAbortingTransfer + write SetAbortingTransfer; + property ID : LongInt read FID + write FID; + published + property FtpState : TFtpCtrlState read FFtpState + write FFtpState; + property Banner : String read FBanner + write FBanner; + property RcvSize : integer read FRcvSize + write SetRcvSize; + property Busy : Boolean read FBusy + write FBusy; + property UserName : String read FUserName + write FUserName; + property PassWord : String read FPassWord + write FPassWord; + property UserData : LongInt read FUserData + write FUserData; + property OnDisplay : TDisplayEvent read FOnDisplay + write FOnDisplay; + property OnCommand : TCommandEvent read FOnCommand + write FOnCommand; + property OnSessionClosed; + property OnDataSent; + property HSocket; + property AllSent; + property State; +{$IFDEF VER80} + property TrumpetCompability; +{$ENDIF} + end; + +function IsUNC(S : String) : Boolean; +procedure PatchIE5(var S : String); +{$IFDEF VER80} +function ExtractFileDir(const FileName: String): String; +function ExtractFileDrive(const FileName: String): String; +{$ENDIF} + +implementation + +const + DefaultBanner = '220-ICS FTP Server ready'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ ExtractFileDir extracts the drive and directory parts of the given } +{ filename. The resulting string is a directory name suitable for passing } +{ to SetCurrentDir, CreateDir, etc. The resulting string is empty if } +{ FileName contains no drive and directory parts. } +function ExtractFileDir(const FileName: String): String; +var + I: Integer; +begin + I := Length(FileName); + while (I > 0) and (not (FileName[I] in ['\', ':'])) do + Dec(I); + if (I > 1) and (FileName[I] = '\') and + (not (FileName[I - 1] in ['\', ':'])) then + Dec(I); + Result := Copy(FileName, 1, I); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ ExtractFileDrive extracts the drive part of the given filename. For } +{ filenames with drive letters, the resulting string is ':'. } +{ For filenames with a UNC path, the resulting string is in the form } +{ '\\\'. If the given path contains neither } +{ style of filename, the result is an empty string. } +function ExtractFileDrive(const FileName: String): String; +var + I : Integer; +begin + if Length(FileName) <= 1 then + Result := '' + else begin + if FileName[2] = ':' then + Result := Copy(FileName, 1, 2) + else if (FileName[2] = '\') and (FileName[1] = '\') then begin + { UNC file name } + I := 3; + while (I <= Length(FileName)) and (FileName[I] <> '\') do + Inc(I); + Inc(I); + while (I <= Length(FileName)) and (FileName[I] <> '\') do + Inc(I); + Result := Copy(FileName, 1, I - 1); + end + else + Result := ''; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TFtpCtrlSocket.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FDataSocket := TWSocket.Create(Self); + FDataSocket.Name := 'DataWSocket'; + FBanner := DefaultBanner; + FFtpState := ftpcInvalid; + FHomeDir := 'C:\TEMP\'; + FDirectory := FHomeDir; + SetRcvSize(DefaultRcvSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TFtpCtrlSocket.Destroy; +begin + FRcvCnt := 0; { Clear received data } + SetRcvSize(0); { Free the buffer } + if Assigned(FDataSocket) then begin + FDataSocket.Destroy; + FDataSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.SetRcvSize(newValue : Integer); +begin + if FRcvCnt <> 0 then + raise EFtpCtrlSocketException.Create('Data in buffer, can''t change size'); + + if FRcvSize < 0 then + FRcvSize := 0; + + if FRcvSize = newValue then + Exit; { No change, nothing to do } + + { Free previously allocated buffer } + if FRcvBuf <> nil then begin + FreeMem(FRcvBuf, FRcvSize); + FRcvBuf := nil; + end; + + { Allocate new buffer } + FRcvSize := newValue; + + { If size is nul, then do not allocated the buffer } + if newValue > 0 then + GetMem(FRcvBuf, FRcvSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.StartConnection; +begin + FConnectedSince := Now; + FLastCommand := 0; + FCommandCount := 0; + FFtpState := ftpcWaitingUserCode; + SendStr(FBanner + #13#10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpCtrlSocket.GetPeerAddr: String; +begin + Result := FPeerAddr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.Dup(newHSocket : TSocket); +begin + inherited Dup(newHSocket); + FPeerAddr := inherited GetPeerAddr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.TriggerSessionConnected(Error : Word); +begin + FPeerAddr := inherited GetPeerAddr; + inherited TriggerSessionConnected(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.TriggerCommand(CmdBuf : PChar; CmdLen : Integer); +begin + if Assigned(FOnCommand) then + FOnCommand(Self, CmdBuf, CmdLen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpCtrlSocket.TriggerDataAvailable(Error : Word) : Boolean; +var + Len : Integer; + I : Integer; +begin + Result := TRUE; { We read data } + + Len := Receive(@FRcvBuf[FRcvCnt], FRcvSize - FRcvCnt - 1); + if Len <= 0 then + Exit; + + FRcvCnt := FRcvCnt + Len; + FRcvBuf[FRcvCnt] := #0; + + while TRUE do begin + I := 0; + while (I < FRcvCnt) and (FRcvBuf[I] <> #10) do + Inc(I); + if I >= FRcvCnt then begin + { Check line overflow. } + if FRcvCnt >= (FRcvSize - 1) then begin + StrPCopy(FRcvBuf, 'OVER' + #13#10); + FRcvCnt := StrLen(FRcvBuf); + I := FRcvCnt - 1; + end + else + Exit; + end; + FRcvBuf[I] := #0; + FLastCommand := Now; + Inc(FCommandCount); + if (I > 1) and (FRcvBuf[I - 1] = #13) then begin + FRcvBuf[I - 1] := #0; + TriggerCommand(FRcvBuf, I - 1); + FRcvBuf[I - 1] := #13; + end + else + TriggerCommand(FRcvBuf, I); + + FRcvBuf[I] := #10; + if I >= (FRcvCnt - 1) then begin + FRcvCnt := 0; + FRcvBuf[0] := #0; + break; + end; + Move(FRcvBuf[I + 1], FRcvBuf^, FRcvCnt - I); + FRcvCnt := FRcvCnt - I - 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.SendAnswer(Answer : String); +begin + SendStr(Answer + #13#10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function IsUNC(S : String) : Boolean; +begin + Result := (Length(S) >= 2) and (S[2] = '\') and (S[1] = '\'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure PatchIE5(var S : String); +begin + { \c:\Temp\ -> c:\Temp\ IE5 like this invalid syntax !} + if (Length(S) >= 3) and (S[3] = ':') and (S[1] = '\') then + Delete(S, 1, 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.SetDirectory(newValue : String); +var + newDrive : String; + newPath : String; + I : Integer; +begin + if FDirectory = newValue then + Exit; + + PatchIE5(newValue); + newDrive := ExtractFileDrive(newValue); + if IsUNC(newDrive) then begin + if not (ftpcUNC in Options) then + raise Exception.Create('Cannot accept UNC path'); + FDirectory := newValue; + { Always terminate with a backslash } + if (Length(FDirectory) > 0) and (FDirectory[Length(FDirectory)] <> '\') then + FDirectory := FDirectory + '\'; + Exit; + end; + + if Length(newDrive) = 0 then begin + newDrive := ExtractFileDrive(FDirectory); + newPath := newValue; + end + else + newPath := Copy(newValue, 3, Length(newValue)); + + if Pos(':', newPath) <> 0 then + raise Exception.Create('Invalid directory name syntax'); + + if newPath = '..' then begin + if IsUNC(FDirectory) then begin + I := Length(FDirectory) - 1; + while (I > 0) and (FDirectory[I] <> '\') do + Dec(I); + if I > Length(newDrive) then + SetLength(FDirectory, I); + Exit; + end + else begin + newPath := Copy(FDirectory, 3, Length(FDirectory)); + I := Length(newPath) - 1; + while (I > 0) and (newPath[I] <> '\') do + Dec(I); + SetLength(newPath, I); + end; + end; + + if (Length(newPath) > 0) and (newPath[1] <> '\') then begin + { Relative path } + if IsUNC(FDirectory) then begin + FDirectory := FDirectory + newPath; + { Always terminate with a backslash } + if (Length(FDirectory) > 0) and (FDirectory[Length(FDirectory)] <> '\') then + FDirectory := FDirectory + '\'; + Exit; + end + else begin + if UpperCase(newDrive[1]) <> UpperCase(FDirectory[1]) then + raise Exception.Create('Cannot accept path not relative to current directory'); + if Pos('.\', newPath) <> 0 then + raise Exception.Create('Cannot accept relative path using dot notation'); + if newPath = '.' then + newPath := Copy(FDirectory, 3, Length(FDirectory)) + else + newPath := Copy(FDirectory, 3, Length(FDirectory)) + newPath; + end; + end + else begin + if Pos('.\', newPath) <> 0 then + raise Exception.Create('Cannot accept relative path using dot notation'); + end; + + if Length(newPath) = 0 then begin + if UpperCase(newDrive[1]) <> UpperCase(FDirectory[1]) then + newPath := '\' + else + newPath := Copy(FDirectory, 3, Length(FDirectory)); + end; + + { Always terminate with a backslash } + if (Length(newPath) > 0) and (newPath[Length(newPath)] <> '\') then + newPath := newPath + '\'; + + FDirectory := newDrive + newPath; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.SetAbortingTransfer(newValue : Boolean); +begin + FAbortingTransfer := newValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + diff --git a/lib/Delphi/Vc32/FtpSrvT.dcu b/lib/Delphi/Vc32/FtpSrvT.dcu new file mode 100644 index 00000000..38256089 Binary files /dev/null and b/lib/Delphi/Vc32/FtpSrvT.dcu differ diff --git a/lib/Delphi/Vc32/FtpSrvT.pas b/lib/Delphi/Vc32/FtpSrvT.pas new file mode 100644 index 00000000..43a2378e --- /dev/null +++ b/lib/Delphi/Vc32/FtpSrvT.pas @@ -0,0 +1,178 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Time functions. +EMail: francois.piette@pophost.eunet.be francois.piette@swing.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Creation: Nov 24, 1999 from Bruce Christensen + code used with his permission. Thanks. +Version: 1.02 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1999-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Apr 02, 2000 V1.01 Added definition for TIME_ZONE_ID_STANDARD for BCB1 and BCB3 +May 20, 2000 V1.01 Added definition for TIME_ZONE_ID_STANDARD for Delphi 3 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpSrvT; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +const + FtpSrvT_Unit = 102; + CopyRight : String = ' FtpSrvT (c) 1999-2000 F. Piette V1.02 '; + +function FileUtcStr(cFileName : String) : String; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +implementation +uses + WinTypes, WinProcs, SysUtils; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function PadIntZero(nWord : Word; + nWidth : Byte): String; +var + cResult : String; +begin + cResult := IntToStr(nWord); + while Length(cResult) < nWidth do + cResult := '0' + cResult; + + Result := cResult; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TimeDateStr(dDateTime : TDateTime) : String; +var + nYear, nMonth, nDay, nHours, nMinutes, nSeconds, nMilliSecs : Word; +begin + DecodeDate(dDateTime, nYear, nMonth, nDay); + DecodeTime(dDateTime, nHours, nMinutes, nSeconds, nMilliSecs); + + Result := PadIntZero(nYear, 4) + + PadIntZero(nMonth, 2) + + PadIntZero(nDay, 2) + + PadIntZero(nHours, 2) + + PadIntZero(nMinutes, 2) + + PadIntZero(nSeconds, 2) + '.' + + PadIntZero(nMilliSecs, 3); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetLocalBiasUTC : LongInt; +{$IFDEF VER80} +{ Delphi 1 doesn't support GetTimeZoneInformation } +begin + Result := 0; +end; +{$ELSE} +var + tzInfo : TTimeZoneInformation; +{$IFDEF VER93} {BCB1} +const + TIME_ZONE_ID_STANDARD = 1; + TIME_ZONE_ID_DAYLIGHT = 2; +{$ENDIF} +{$IFDEF VER110} {BCB3} +const + TIME_ZONE_ID_STANDARD = 1; + TIME_ZONE_ID_DAYLIGHT = 2; +{$ENDIF} +{$IFDEF VER90} {D2} +const + TIME_ZONE_ID_STANDARD = 1; + TIME_ZONE_ID_DAYLIGHT = 2; +{$ENDIF} +{$IFDEF VER100} {D3} +const + TIME_ZONE_ID_STANDARD = 1; + TIME_ZONE_ID_DAYLIGHT = 2; +{$ENDIF} +begin + case GetTimeZoneInformation(tzInfo) of + TIME_ZONE_ID_STANDARD: Result := tzInfo.Bias + tzInfo.StandardBias; + TIME_ZONE_ID_DAYLIGHT: Result := tzInfo.Bias + tzInfo.DaylightBias; + else + Result := tzInfo.Bias; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function DateTimeToUTC(dtDT : TDateTime) : TDateTime; +begin + Result := dtDT + GetLocalBiasUTC / (60.0 * 24.0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetFileAge(cFile : String) : Integer; +begin + if cFile[Length(cFile)] in ['\', '/'] then + cFile := cFile + '.'; + Result := FileAge(cFile); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function FileUtcStr(cFileName : String) : String; +begin + Result := TimeDateStr( + DateTimeToUTC( + FileDateToDateTime(GetFileAge(cFileName)))); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/HttpSrv.dcr b/lib/Delphi/Vc32/HttpSrv.dcr new file mode 100644 index 00000000..3064c368 Binary files /dev/null and b/lib/Delphi/Vc32/HttpSrv.dcr differ diff --git a/lib/Delphi/Vc32/HttpSrv.dcu b/lib/Delphi/Vc32/HttpSrv.dcu new file mode 100644 index 00000000..ac5fe738 Binary files /dev/null and b/lib/Delphi/Vc32/HttpSrv.dcu differ diff --git a/lib/Delphi/Vc32/HttpSrv.pas b/lib/Delphi/Vc32/HttpSrv.pas new file mode 100644 index 00000000..472a5b96 --- /dev/null +++ b/lib/Delphi/Vc32/HttpSrv.pas @@ -0,0 +1,1347 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: THttpServer implement the HTTP server protocol, that is a + web server kernel. +Creation: Oct 10, 1999 +Version: 1.06 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Nov 12, 1999 Beta 3 Added Linger properties +Apr 23, 2000 Beta 4 Added Delphi 1 compatibility + Made everything public in THttpConnection because BCB has problems + when deriving a component from Delphi and protected functions. +Oct 29, 2000 Beta 5 Added Client[] property and IsClient() method. +Nov 11, 2000 Beta 6 Added code from Sven to set + Last-Modified header line. Need some more changes ! +Nov 12, 2000 Beta 7 Finished Last-Modified implementation. + Corrected TriggerServerStopped. +Jun 18, 2001 V1.01 Check if still connected before sending any data. +Jul 31, 2001 V1.02 Handle URL encoded document file (for example when there is + a space in the file name). Bug reported by Stian Grnland + . + Better handling of non existant documents or documents with invalid + file name. +Jan 13, 2002 V1.03 Changed SetPort() to SetPortValue() to avoid a conflict with + BCB6 which has a macro to replace SetPort with SetPortA ! +Apr 15, 2002 V1.04 In SendDocument, avoid calling Send(nil, 0) when a document + has to be sent. Bug and fix by Adam Laforge . +Jul 06, 2002 V1.05 Thomas Smyth fixed + ExtractURLEncodedValue which had problem with names beginning with + same sequence of chars. +Oct 12, 2002 V1.06 Added THttpConnection.PostedDataReceived to be called from + OnPostedData event handler when application has received all data + from client. + Added read/only property SrcVersion with component source version + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpSrv; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, WSocketS; + +const + THttpServerVersion = 106; + CopyRight : String = ' THttpServer (c) 1999-2002 F. Piette V1.06 '; + WM_HTTP_DONE = WM_USER + 40; + +type + THttpConnection = class; + THttpConnectionClass = class of THttpConnection; + THttpGetFlag = (hgSendDoc, hgSendStream, hgWillSendMySelf, hg404, hgAcceptData); + THttpSendType = (httpSendHead, httpSendDoc); + THttpGetEvent = procedure (Sender : TObject; + Client : TObject; + var Flags : THttpGetFlag) of object; + THttpGetConnEvent = procedure (Sender : TObject; + var Flags : THttpGetFlag) of object; + THttpConnectEvent = procedure (Sender : TObject; + Client : TObject; + Error : Word) of object; + THttpPostedDataEvent = procedure (Sender : TObject; + Client : TObject; + Error : Word) of object; + THttpConnectionState = (hcRequest, hcHeader, hcPostedData); + + { THttpConnection is used to handle client connections } + THttpConnection = class(TWSocketClient) + public + FRcvdLine : String; + FMethod : String; + FVersion : String; + FPath : String; + FParams : String; + FRequestHeader : TStringList; + FState : THttpConnectionState; + FDocDir : String; + FDefaultDoc : String; + FDocument : String; + FDocStream : TStream; + FDocBuf : PChar; + FLastModified : TDateTime; + FAnswerContentType : String; + FRequestContentLength : Integer; + FRequestContentType : String; + FRequestAccept : String; + FRequestReferer : String; + FRequestAcceptLanguage : String; + FRequestAcceptEncoding : String; + FRequestUserAgent : String; + FRequestHost : String; + FRequestConnection : String; + FAcceptPostedData : Boolean; + FOnGetDocument : THttpGetConnEvent; + FOnHeadDocument : THttpGetConnEvent; + FOnPostDocument : THttpGetConnEvent; + FOnPostedData : TDataAvailable; + procedure ConnectionDataAvailable(Sender: TObject; Error : Word); + procedure ConnectionDataSent(Sender : TObject; Error : WORD); + procedure ParseRequest; + procedure ProcessRequest; + procedure ProcessGet; + procedure ProcessHead; + procedure ProcessPost; + procedure SendDocument(SendType : THttpSendType); + procedure SendStream; + procedure Answer404; + procedure WndProc(var MsgRec: TMessage); override; + procedure WMHttpDone(var msg: TMessage); message WM_HTTP_DONE; + procedure TriggerGetDocument(var Flags : THttpGetFlag); virtual; + procedure TriggerHeadDocument(var Flags : THttpGetFlag); virtual; + procedure TriggerPostDocument(var Flags : THttpGetFlag); virtual; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure PostedDataReceived; virtual; + { Method contains GET/POST/HEAD as requested by client } + property Method : String read FMethod; + { Version contains HTTP version from client request } + property Version : String read FVersion; + { The whole header as received from client } + property RequestHeader : TStringList + read FRequestHeader; + { Stream used to send reply to client } + property DocStream : TStream + read FDocStream + write FDocStream; + { All RequestXXX are header fields from request header } + property RequestContentLength : Integer + read FRequestContentLength; + property RequestContentType : String read FRequestContentType; + property RequestAccept : String read FRequestAccept; + property RequestReferer : String read FRequestReferer; + property RequestAcceptLanguage : String read FRequestAcceptLanguage; + property RequestAcceptEncoding : String read FRequestAcceptEncoding; + property RequestUserAgent : String read FRequestUserAgent; + property RequestHost : String read FRequestHost; + property RequestConnection : String read FRequestConnection; + published + { Where all documents are stored. Default to c:\wwwroot } + property DocDir : String read FDocDir + write FDocDir; + { Default document name. Default to index.html } + property DefaultDoc : String read FDefaultDoc + write FDefaultDoc; + { Complete document path and file name on local file system } + property Document : String read FDocument + write FDocument; + { Document path as requested by client } + property Path : String read FPath + write FPath; + { Parameters in request (Question mark is separator) } + property Params : String read FParams + write FParams; + { Triggered when client sent GET request } + property OnGetDocument : THttpGetConnEvent read FOnGetDocument + write FOnGetDocument; + { Triggered when client sent HEAD request } + property OnHeadDocument : THttpGetConnEvent read FOnHeadDocument + write FOnHeadDocument; + { Triggered when client sent POST request } + property OnPostDocument : THttpGetConnEvent read FOnPostDocument + write FOnPostDocument; + { Triggered when client sent POST request and data is available } + property OnPostedData : TDataAvailable read FOnPostedData + write FOnPostedData; + end; + + { This is the HTTP server component handling all HTTP connection } + { service. Most of the work is delegated to a TWSocketServer } + THttpServer = class(TComponent) + protected + { FWSocketServer will handle all client management work } + FWSocketServer : TWSocketServer; + FPort : String; + FAddr : String; + FClientClass : THttpConnectionClass; + FDocDir : String; + FDefaultDoc : String; + FLingerOnOff : TSocketLingerOnOff; + FLingerTimeout : Integer; { In seconds, 0 = disabled } + FOnServerStarted : TNotifyEvent; + FOnServerStopped : TNotifyEvent; + FOnClientConnect : THttpConnectEvent; + FOnClientDisconnect : THttpConnectEvent; + FOnGetDocument : THttpGetEvent; + FOnHeadDocument : THttpGetEvent; + FOnPostDocument : THttpGetEvent; + FOnPostedData : THttpPostedDataEvent; + procedure Notification(AComponent: TComponent; operation: TOperation); override; + procedure WSocketServerClientConnect(Sender : TObject; + Client : TWSocketClient; + Error : Word); + procedure WSocketServerClientCreate(Sender : TObject; + Client : TWSocketClient); + procedure WSocketServerClientDisconnect(Sender : TObject; + Client : TWSocketClient; + Error : Word); + procedure WSocketServerSessionClosed(Sender : TObject; + Error : Word); + procedure WSocketServerChangeState(Sender : TObject; + OldState, NewState : TSocketState); + procedure TriggerServerStarted; virtual; + procedure TriggerServerStopped; virtual; + procedure TriggerClientConnect(Client : TObject; Error : Word); virtual; + procedure TriggerClientDisconnect(Client : TObject; Error : Word); virtual; + procedure TriggerGetDocument(Sender : TObject; + var Flags : THttpGetFlag); virtual; + procedure TriggerHeadDocument(Sender : TObject; + var Flags : THttpGetFlag); virtual; + procedure TriggerPostDocument(Sender : TObject; + var Flags : THttpGetFlag); virtual; + procedure TriggerPostedData(Sender : TObject; + Error : WORD); virtual; + procedure SetPortValue(newValue : String); + procedure SetAddr(newValue : String); + function GetClientCount : Integer; + function GetClient(nIndex : Integer) : THttpConnection; + function GetSrcVersion: String; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Start; virtual; + procedure Stop; virtual; + { Check if a given object is one of our clients } + function IsClient(SomeThing : TObject) : Boolean; + { Runtime readonly property which gives number of connected clients } + property ClientCount : Integer read GetClientCount; + { Client[] give direct access to anyone of our clients } + property Client[nIndex : Integer] : THttpConnection + read GetClient; + { Runtime property which tell the component class which has to be } + { instanciated to handle client connection } + property ClientClass : THttpConnectionClass + read FClientClass + write FClientClass; + published + { Component source version } + property SrcVersion : String read GetSrcVersion; + { We will listen to that port. Default to 80 for http service } + property Port : String read FPort + write SetPortValue; + { We will use that interface to listen. 0.0.0.0 means all } + { available interfaces } + property Addr : String read FAddr + write SetAddr; + { Where all documents are stored. Default to c:\wwwroot } + property DocDir : String read FDocDir + write FDocDir; + { Default document name. Default to index.html } + property DefaultDoc : String read FDefaultDoc + write FDefaultDoc; + property LingerOnOff : TSocketLingerOnOff + read FLingerOnOff + write FLingerOnOff; + property LingerTimeout : Integer read FLingerTimeout + write FLingerTimeout; + { OnServerStrated is triggered when server has started listening } + property OnServerStarted : TNotifyEvent + read FOnServerStarted + write FOnServerStarted; + { OnServerStopped is triggered when server has stopped listening } + property OnServerStopped : TNotifyEvent + read FOnServerStopped + write FOnServerStopped; + { OnClientConnect is triggered when a client has connected } + property OnClientConnect : THttpConnectEvent + read FOnClientConnect + write FOnClientConnect; + { OnClientDisconnect is triggered when a client is about to } + { disconnect. } + property OnClientDisconnect : THttpConnectEvent + read FOnClientDisconnect + write FOnClientDisconnect; + { OnGetDocument is triggered when a client sent GET request } + { You can either do nothing and let server handle all work, or } + { you can build a document on the fly or refuse access. } + property OnGetDocument : THttpGetEvent + read FOnGetDocument + write FOnGetDocument; + { OnGetDocument is triggered when a client sent HEAD request } + { You can either do nothing and let server handle all work, or } + { you can build a document header on the fly or refuse access. } + property OnHeadDocument : THttpGetEvent + read FOnHeadDocument + write FOnHeadDocument; + { OnGetDocument is triggered when a client sent POST request } + { You have to tell if you accept data or not. If you accept, } + { you'll get OnPostedData event with incomming data. } + property OnPostDocument : THttpGetEvent + read FOnPostDocument + write FOnPostDocument; + { On PostedData is triggered when client post data and you } + { accepted it from OnPostDocument event. } + { When you've got all data, you have to build a reply to be } + { sent to client. } + property OnPostedData : THttpPostedDataEvent + read FOnPostedData + write FOnPostedData; + end; + +{ Retrieve a single value by name out of an URL encoded data stream. } +function ExtractURLEncodedValue( + Msg : PChar; { URL Encoded stream } + Name : String; { Variable name to look for } + var Value : String): Boolean; { Where to put variable value } +{ Decode an URLEncoded string } +function UrlDecode(const Url : String) : String; +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [THttpServer]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor THttpServer.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWSocketServer := TWSocketServer.Create(Self); + FClientClass := THttpConnection; + FAddr := '0.0.0.0'; + FPort := '80'; + FDefaultDoc := 'index.html'; + FDocDir := 'c:\wwwroot'; + FLingerOnOff := wsLingerNoSet; + FLingerTimeout := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor THttpServer.Destroy; +begin + if Assigned(FWSocketServer) then begin + FWSocketServer.Destroy; + FWSocketServer := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Called by destructor when child component is created or destroyed. } +procedure THttpServer.Notification( + AComponent : TComponent; + Operation : TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then begin + if AComponent = FWSocketServer then + FWSocketServer := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Start the server. That is make FWSocketServer listening to the port. } +procedure THttpServer.Start; +begin + { Create a new FWSocketServer if needed } + if not Assigned(FWSocketServer) then + FWSocketServer := TWSocketServer.Create(Self); + { If already listening, then do nothing } + if FWSocketServer.State = wsListening then + Exit; + { Pass al parameters to FWSocketServer and make it listen } + FWSocketServer.ClientClass := FClientClass; + FWSocketServer.OnClientCreate := WSocketServerClientCreate; + FWSocketServer.OnClientConnect := WSocketServerClientConnect; + FWSocketServer.OnClientDisconnect := WSocketServerClientDisconnect; + FWSocketServer.OnSessionClosed := WSocketServerSessionClosed; + FWSocketServer.OnChangeState := WSocketServerChangeState; + FWSocketServer.Banner := ''; + FWSocketServer.Proto := 'tcp'; + FWSocketServer.Port := FPort; + FWSocketServer.Addr := FAddr; + FWSocketServer.Listen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.Stop; +var + I : Integer; +begin + if not Assigned(FWSocketServer) then + Exit; + FWSocketServer.Close; + { Disconnect all clients } + for I := FWSocketServer.ClientCount - 1 downto 0 do begin + try + FWSocketServer.Client[I].Abort; + except + { Ignore any exception here } + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.SetPortValue(newValue : String); +begin + if newValue = FPort then + Exit; + FPort := newValue; + { If server is already listening, then stop it and restart it with } + { new port. Do not disconnect already connected clients. } + if Assigned(FWSocketServer) and + (FWSocketServer.State = wsListening) then begin + FWSocketServer.Close; + Start; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.SetAddr(newValue : String); +begin + if newValue = FAddr then + Exit; + FAddr := newValue; + { If server is already listening, then stop it and restart it with } + { new Addr. Do not disconnect already connected clients. } + if Assigned(FWSocketServer) and + (FWSocketServer.State = wsListening) then begin + FWSocketServer.Close; + Start; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Get function for ClientCount property. Just return value from } +{ FWSocketServer. } +function THttpServer.GetClientCount; +begin + if not Assigned(FWSocketServer) then + Result := 0 + else + Result := FWSocketServer.ClientCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Get function for Client[] property. Just return value from } +{ FWSocketServer. } +function THttpServer.GetClient(nIndex : Integer) : THttpConnection; +begin + if not Assigned(FWSocketServer) then + Result := nil + else + Result := THttpConnection(FWSocketServer.Client[nIndex]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check is an object is one of our clients. Just return value from } +{ FWSocketServer. } +function THttpServer.IsClient(SomeThing : TObject) : Boolean; +begin + if not Assigned(FWSocketServer) then + Result := FALSE + else + Result := FWSocketServer.IsClient(SomeThing); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when state of server socket has changed. } +{ We use it to trigger our OnServerStarted event. } +procedure THttpServer.WSocketServerChangeState( + Sender : TObject; + OldState, NewState : TSocketState); +begin + if newState = wsListening then + TriggerServerStarted; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.WSocketServerSessionClosed( + Sender : TObject; + Error : Word); +begin + TriggerServerStopped; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ A new client component has been created } +procedure THttpServer.WSocketServerClientCreate( + Sender : TObject; + Client : TWSocketClient); +begin + Client.LingerOnOff := FLingerOnOff; + Client.LingerTimeout := FLingerTimeout; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ A new client just connected. Setup things to handle his requests. } +{ HTTP header is line oriented so we turn line mode on. We use LF as end of } +{ line character altough HTTP uses CR/LF pair as end of line, because many } +{ Unix client do not respect standards and use single LF... } +{ HTTP is not interactive, so we turn line editing to false (faster). } +procedure THttpServer.WSocketServerClientConnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + THttpConnection(Client).LineMode := TRUE; + THttpConnection(Client).LineEdit := FALSE; + THttpConnection(Client).LineEnd := #10; + THttpConnection(Client).DocDir := Self.DocDir; + THttpConnection(Client).DefaultDoc := Self.DefaultDoc; + THttpConnection(Client).OnGetDocument := TriggerGetDocument; + THttpConnection(Client).OnHeadDocument := TriggerHeadDocument; + THttpConnection(Client).OnPostDocument := TriggerPostDocument; + THttpConnection(Client).OnPostedData := TriggerPostedData; + TriggerClientConnect(Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ A client is about to disconnect. } +procedure THttpServer.WSocketServerClientDisconnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + TriggerClientDisconnect(Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerServerStarted; +begin + if Assigned(FOnServerStarted) then + FOnServerStarted(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerServerStopped; +begin + if Assigned(FOnServerStopped) then + FOnServerStopped(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerClientConnect( + Client : TObject; + Error : Word); +begin + if Assigned(FOnClientConnect) then + FOnClientConnect(Self, Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerClientDisconnect( + Client : TObject; + Error : Word); +begin + if Assigned(FOnClientDisconnect) then + FOnClientDisconnect(Self, Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerGetDocument( + Sender : TObject; + var Flags : THttpGetFlag); +begin + if Assigned(FOnGetDocument) then + FOnGetDocument(Self, Sender, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerHeadDocument( + Sender : TObject; + var Flags : THttpGetFlag); +begin + if Assigned(FOnHeadDocument) then + FOnHeadDocument(Self, Sender, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerPostedData(Sender : TObject; + Error : WORD); +begin + if Assigned(FOnPostedData) then + FOnPostedData(Self, Sender, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerPostDocument( + Sender : TObject; + var Flags : THttpGetFlag); +begin + if Assigned(FOnPostDocument) then + FOnPostDocument(Self, Sender, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor THttpConnection.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + LineMode := TRUE; + LineEdit := FALSE; + LineEnd := #10; + FRequestHeader := TStringList.Create; + FState := hcRequest; + OnDataAvailable := ConnectionDataAvailable; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor THttpConnection.Destroy; +begin + if Assigned(FRequestHeader) then begin + FRequestHeader.Destroy; + FRequestHeader := nil; + end; + if Assigned(FDocStream) then begin + FDocStream.Destroy; + FDocStream := nil; + end; + if Assigned(FDocBuf) then begin + FreeMem(FDocBuf, BufSize); + FDocBuf := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + { We *MUST* handle all exception to avoid application shutdown } + try + if Msg = WM_HTTP_DONE then + WMHttpDone(MsgRec) + else + inherited WndProc(MsgRec); + except + on E:Exception do + HandleBackGroundException(E); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.WMHttpDone(var msg: TMessage); +begin + FState := hcRequest; + if CompareText(FRequestConnection, 'Keep-Alive') <> 0 then + CloseDelayed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is called each time data is available from a client. } +{ We use FState variable to keep track of the where we are in the http } +{ protocol: request command, header line or posted data. } +procedure THttpConnection.ConnectionDataAvailable(Sender: TObject; Error : Word); +var + Len : Integer; + I : Integer; +begin + { If we are in data state, then the application has to receive data } + if FState = hcPostedData then begin + if FAcceptPostedData and Assigned(FOnPostedData) then + FOnPostedData(Self, Error) + else + { No one is willing data, received it and throw it away } + FRcvdLine := ReceiveStr; + Exit; + end; + { We use line mode. We will receive complete lines } + FRcvdLine := ReceiveStr; + { Remove trailing CR/LF } + Len := Length(FRcvdLine); + if (Len > 0) and (FRcvdLine[Len] = #10) then begin + Dec(Len); + if (Len > 0) and (FRcvdLine[Len] = #13) then + Dec(Len); + SetLength(FRcvdLine, Len); + end; + if FState = hcRequest then begin + { We just start a new request. Initialize all header variables } + FRequestContentType := ''; + FRequestContentLength := 0; + FRequestContentType := ''; + FRequestAccept := ''; + FRequestReferer := ''; + FRequestAcceptLanguage := ''; + FRequestAcceptEncoding := ''; + FRequestUserAgent := ''; + FRequestHost := ''; + FRequestConnection := ''; + { The line we just received is HTTP command, parse it } + ParseRequest; + { Next lines will be header lines } + FState := hcHeader; + Exit; + end; + { We can comes here only in hcHeader state } + if FRcvdLine = '' then begin + { Last header line is an empty line. Then we enter data state } + FState := hcPostedData; + { We will process request before receiving data because application } + { has to setup things to be able to receive posted data } + ProcessRequest; + Exit; + end; + { We comes here for normal header line. Extract some interesting variables } + I := Pos(':', FRcvdLine); + if I > 0 then begin + try + repeat + Inc(I); + until (I > Length(FRcvdLine)) or (FRcvdLine[I] <> ' '); + if StrLIComp(@FRcvdLine[1], 'content-type:', 13) = 0 then + FRequestContentType := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'content-length:', 15) = 0 then + FRequestContentLength := StrToInt(Copy(FRcvdLine, I, Length(FRcvdLine))) + else if StrLIComp(@FRcvdLine[1], 'Accept:', 7) = 0 then + FRequestAccept:= Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'Referer:', 8) = 0 then + FRequestReferer := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'Accept-Language:', 16) = 0 then + FRequestAcceptLanguage := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'Accept-Encoding:', 16) = 0 then + FRequestAcceptEncoding := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'User-Agent:', 11) = 0 then + FRequestUserAgent := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'Host:', 5) = 0 then + FRequestHost := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'Connection:', 11) = 0 then + FRequestConnection := Copy(FRcvdLine, I, Length(FRcvdLine)); + except + { Ignore any exception in parsing header line } + end; + end; + FRequestHeader.Add(FRcvdLine); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Request is in FRcvdLine property. } +{ Split it into FMethod, FPath, FVersion and parameters. } +procedure THttpConnection.ParseRequest; +var + I, J : Integer; +begin + I := 1; + while (I <= Length(FRcvdLine)) and (FRcvdLine[I] <> ' ') do + Inc(I); + FMethod := UpperCase(Copy(FRcvdLine, 1, I - 1)); + Inc(I); + while (I <= Length(FRcvdLine)) and (FRcvdLine[I] = ' ') do + Inc(I); + J := I; + while (I <= Length(FRcvdLine)) and (FRcvdLine[I] <> ' ') do + Inc(I); + FPath := Copy(FRcvdLine, J, I - J); + { Find parameters } + J := Pos('?', FPath); + if J <= 0 then + FParams := '' + else begin + FParams := Copy(FPath, J + 1, Length(FPath)); + FPath := Copy(FPath, 1, J - 1); + end; + Inc(I); + while (I <= Length(FRcvdLine)) and (FRcvdLine[I] = ' ') do + Inc(I); + J := I; + while (I <= Length(FRcvdLine)) and (FRcvdLine[I] <> ' ') do + Inc(I); + FVersion := Trim(UpperCase(Copy(FRcvdLine, J, I - J))); + if FVersion = '' then + FVersion := 'HTTP/1.0'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.Answer404; +var + Body : String; +begin + Body := '404 Not Found' + + '

404 Not Found

The requested URL ' + FPath + + ' was not found on this server.

' + #13#10; + PutStringInSendBuffer(FVersion + ' 404 Not Found' + #13#10 + + 'Content-Type: text/html' + #13#10 + + 'Content-Length: ' + IntToStr(Length(Body)) + #13#10 + + #13#10); + SendStr(Body); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ As its name implies... } +procedure THttpConnection.ProcessRequest; +var + I : Integer; +begin + if FPath[1] = '/' then + FDocument := FDocDir + FPath + else + FDocument := FDocDir + '\' + FPath; + { Check for default document } + if FDocument[Length(FDocument)] = '/' then + FDocument := FDocument + FDefaultDoc; + { Change slashes to backslashes } + for I := 1 to Length(FDocument) do begin + if FDocument[I] = '/' then + FDocument[I] := '\'; + end; + + FDocument := URLDecode(FDocument); + + if FMethod = 'GET' then + ProcessGet + else if FMethod = 'POST' then + ProcessPost + else if FMethod = 'HEAD' then + ProcessHead + else begin + Answer404; + CloseDelayed; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.TriggerGetDocument(var Flags : THttpGetFlag); +begin + if Assigned(FOnGetDocument) then + FOnGetDocument(Self, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.TriggerHeadDocument(var Flags : THttpGetFlag); +begin + if Assigned(FOnHeadDocument) then + FOnHeadDocument(Self, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.TriggerPostDocument(var Flags : THttpGetFlag); +begin + if Assigned(FOnPostDocument) then + FOnPostDocument(Self, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.ProcessPost; +var + Flags : THttpGetFlag; +begin + Flags := hg404; + TriggerPostDocument(Flags); + if Flags = hg404 then begin + Answer404; + CloseDelayed; + Exit; + end + else if Flags = hgAcceptData then + FAcceptPostedData := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This method has to be called by main code when all posted data has been } +{ received. } +procedure THttpConnection.PostedDataReceived; +begin + LineMode := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.ProcessHead; +var + Flags : THttpGetFlag; +begin + Flags := hgSendDoc; + TriggerHeadDocument(Flags); + case Flags of + hg404: + begin + Answer404; + CloseDelayed; + end; + hgSendDoc: + begin + if FileExists(FDocument) then + SendDocument(httpSendHead) + else begin + Answer404; + CloseDelayed; + end; + end; + hgSendStream: + SendStream; + hgWillSendMySelf: + { Nothing to do }; + else + CloseDelayed; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.ProcessGet; +var + Flags : THttpGetFlag; + TempStream : TFileStream; + OK : Boolean; +begin + Flags := hgSendDoc; + TriggerGetDocument(Flags); + case Flags of + hg404: + begin + Answer404; + CloseDelayed; + end; + hgSendDoc: + begin + OK := FALSE; + try + if not FileExists(FDocument) then begin + { File not found } + Answer404; + CloseDelayed; + end + else begin + TempStream := TFileStream.Create(FDocument, fmOpenRead + fmShareDenyWrite); + TempStream.Destroy; + OK := TRUE; + end; + except + Answer404; + CloseDelayed; + end; + if OK then + SendDocument(httpSendDoc) + end; + hgSendStream: + SendStream; + hgWillSendMySelf: + { Nothing to do }; + else + CloseDelayed; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function DocumentToContentType(FileName : String) : String; +var + Ext : String; +begin + { We probably should the registry to find MIME type for known file types } + Ext := LowerCase(ExtractFileExt(FileName)); + if Length(Ext) > 1 then + Ext := Copy(Ext, 2, Length(Ext)); + if (Ext = 'htm') or (Ext = 'html') then + Result := 'text/html' + else if Ext = 'gif' then + Result := 'image/gif' + else if Ext = 'bmp' then + Result := 'image/bmp' + else if (Ext = 'jpg') or (Ext = 'jpeg') then + Result := 'image/jpeg' + else if Ext = 'txt' then + Result := 'text/plain' + else + Result := 'application/binary'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RFC1123_Date(aDate : TDateTime) : String; +const + StrWeekDay : String = 'MonTueWedThuFriSatSun'; + StrMonth : String = 'JanFebMarAprMayJunJulAugSepOctNovDec'; +var + Year, Month, Day : Word; + Hour, Min, Sec, MSec : Word; + DayOfWeek : Word; +begin + DecodeDate(aDate, Year, Month, Day); + DecodeTime(aDate, Hour, Min, Sec, MSec); + DayOfWeek := ((Trunc(aDate) - 2) mod 7); + Result := Copy(StrWeekDay, 1 + DayOfWeek * 3, 3) + ', ' + + Format('%2.2d %s %4.4d %2.2d:%2.2d:%2.2d', + [Day, Copy(StrMonth, 1 + 3 * (Month - 1), 3), + Year, Hour, Min, Sec]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Return document file date from document filename. } +{ Return 0 if file not found. } +function FileDate(FileName : String) : TDateTime; +var + SearchRec : TSearchRec; + Status : Integer; +begin + Status := FindFirst(FileName, faAnyFile, SearchRec); + try + if Status <> 0 then + Result := 0 + else + Result := FileDateToDateTime(SearchRec.Time); + finally + FindClose(SearchRec); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ SendDocument will send FDocument file to remote client, build header and } +{ sending data (if required) } +procedure THttpConnection.SendDocument(SendType : THttpSendType); +var + DocSize : Integer; +begin + FLastModified := FileDate(FDocument); + FAnswerContentType := DocumentToContentType(FDocument); + + if Assigned(FDocStream) then begin + FDocStream.Destroy; + FDocStream := nil; + end; + FDocStream := TFileStream.Create(FDocument, fmOpenRead + fmShareDenyWrite); + DocSize := FDocStream.Size; + { Seek to end of document because HEAD will not send actual document } + if SendType = httpSendHead then + FDocStream.Seek(0, soFromEnd); + OnDataSent := ConnectionDataSent; + { Send Header } + PutStringInSendBuffer( + FVersion + ' 200 OK' + #13#10 + + 'Content-Type: ' + FAnswerContentType + #13#10 + + 'Content-Length: ' + IntToStr(DocSize) + #13#10); + if FLastModified <> 0 then + PutStringInSendBuffer( + 'Last-Modified: ' + RFC1123_Date(FLastModified) + 'GMT' + #13#10); + PutStringInSendBuffer(#13#10); + { Send(nil, 0); Removed 15/04/02 } + if SendType = httpSendDoc then + SendStream + else + Send(nil, 0); { Added 15/04/02 } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.SendStream; +begin + if not Assigned(FDocStream) then begin + CloseDelayed; + Exit; + end; + if not Assigned(FDocBuf) then + GetMem(FDocBuf, BufSize); + OnDataSent := ConnectionDataSent; + ConnectionDataSent(Self, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All data in TWSocket has been sent. Read next lock from stream and send. } +{ When end of stream is reached, closed communication. } +procedure THttpConnection.ConnectionDataSent(Sender : TObject; Error : WORD); +var + Count : Integer; +begin + if not Assigned(FDocStream) then begin + { End of file has been reached } + Exit; + end; + Count := FDocStream.Read(FDocBuf^, BufSize); + if Count <= 0 then begin + { End of file found } + FDocStream.Destroy; + FDocStream := nil; + ShutDown(1); +{$IFNDEF VER80} + Sleep(0); +{$ENDIF} + PostMessage(Handle, WM_HTTP_DONE, 0, 0); + Exit; + end; + if State = wsConnected then { Be sure to be still connected... } + Send(FDocBuf, Count); { before actually send any data. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function xdigit(Ch : char) : Integer; +begin + if ch in ['0'..'9'] then + Result := ord(Ch) - ord('0') + else + Result := (ord(Ch) and 15) + 9; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function isxdigit(Ch : char) : Boolean; +begin + Result := (ch in ['0'..'9']) or (ch in ['a'..'z']) or (ch in ['A'..'Z']); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function htoin(value : PChar; len : Integer) : Integer; +var + i : Integer; +begin + Result := 0; + i := 0; + while (i < len) and (Value[i] = ' ') do + i := i + 1; + while (i < len) and (isxDigit(Value[i])) do begin + Result := Result * 16 + xdigit(Value[i]); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function htoi2(value : PChar) : Integer; +begin + Result := htoin(value, 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Retrieve a single value by name out of an URL encoded data stream } +{ In the stream, every space is replaced by a '+'. The '%' character is } +{ an escape character. The next two are 2 digits hexadecimal codes ascii } +{ code value. The stream is constitued by name=value couples separated } +{ by a single '&' character. The special characters are coded by the '%' } +{ followed by hex-ascii character code. } +function ExtractURLEncodedValue( + Msg : PChar; { URL Encoded stream } + Name : String; { Variable name to look for } + var Value : String) { Where to put variable value } + : Boolean; { Found or not found that's the question } +var + NameLen : Integer; + FoundLen : Integer; {tps} + Ch : Char; + P, Q : PChar; +begin + Result := FALSE; + Value := ''; + if Msg = nil then { Empty source } + Exit; + + NameLen := Length(Name); + + P := Msg; + while P^ <> #0 do begin + Q := P; + while (P^ <> #0) and (P^ <> '=') do + Inc(P); + FoundLen := P - Q; {tps} + if P^ = '=' then + Inc(P); + if (StrLIComp(Q, @Name[1], NameLen) = 0) and + (NameLen = FoundLen) then begin {tps} + while (P^ <> #0) and (P^ <> '&') do begin + Ch := P^; + if Ch = '%' then begin + Ch := chr(htoi2(P + 1)); + Inc(P, 2); + end + else if Ch = '+' then + Ch := ' '; + Value := Value + Ch; + Inc(P); + end; + Result := TRUE; + break; + end; + while (P^ <> #0) and (P^ <> '&') do + Inc(P); + if P^ = '&' then + Inc(P); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function UrlDecode(const Url : String) : String; +var + I, J, K, L : Integer; +begin + Result := Url; + L := Length(Result); + I := 1; + K := 1; + while TRUE do begin + J := I; + while (J <= Length(Result)) and (Result[J] <> '%') do begin + if J <> K then + Result[K] := Result[J]; + Inc(J); + Inc(K); + end; + if J > Length(Result) then + break; { End of string } + if J > (Length(Result) - 2) then begin + while J <= Length(Result) do begin + Result[K] := Result[J]; + Inc(J); + Inc(K); + end; + break; + end; + Result[K] := Char(htoi2(@Result[J + 1])); + Inc(K); + I := J + 3; + Dec(L, 2); + end; + SetLength(Result, L); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpServer.GetSrcVersion: String; +begin + Result := Format('%d.%02.2d', [THttpServerVersion div 100, + THttpServerVersion mod 100]); + +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Vc32/IcsBcb30.bpk b/lib/Delphi/Vc32/IcsBcb30.bpk new file mode 100644 index 00000000..e0d53d8f --- /dev/null +++ b/lib/Delphi/Vc32/IcsBcb30.bpk @@ -0,0 +1,186 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = IcsBcb30.bpl +OBJFILES = WSocket.obj WSockets.obj httpprot.obj ftpcli.obj wait.obj tnscript.obj \ + fingcli.obj nntpcli.obj ping.obj tncnx.obj tnemulvt.obj emulvt.obj FtpSrv.obj \ + SmtpProt.obj wsockbuf.obj Pop3Prot.obj MimeDec.obj DnsQuery.obj IcsBcb30.obj +RESFILES = IcsBcb30.res WSocket.dcr WSockets.dcr httpprot.dcr ftpcli.dcr wait.dcr \ + tnscript.dcr fingcli.dcr nntpcli.dcr ping.dcr tncnx.dcr tnemulvt.dcr emulvt.dcr \ + FtpSrv.dcr SmtpProt.dcr Pop3Prot.dcr MimeDec.dcr DnsQuery.dcr +DEFFILE = +RESDEPEN = $(RESFILES) +LIBFILES = +LIBRARIES = VCLX35.lib VCLDB35.lib +SPARELIBS = VCL35.lib VCLDB35.lib VCLX35.lib +PACKAGES = VCL35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .; +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx +CFLAG2 = -D_RTLDLL;USEPACKAGES \ + -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -D_RTLDLL;USEPACKAGES \ + -U..\vc32;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -D_RTLDLL;USEPACKAGES \ + -i..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /d_RTLDLL /dUSEPACKAGES /mx /w2 /zd +LFLAGS = -L..\vc32;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -D"ICS components by F. Piette" -aa -Tpp -x -Gn -Gl -Gi -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0pkg32.obj $(PACKAGES) sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=3 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=ICS Components for BCB3 +FileVersion=1.0.0.3 +InternalName=IcsBcb30 +LegalCopyright=(c) 97'-'98 by F. Piette +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\vc32;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/Delphi/Vc32/IcsBcb30.cpp b/lib/Delphi/Vc32/IcsBcb30.cpp new file mode 100644 index 00000000..26a9d12d --- /dev/null +++ b/lib/Delphi/Vc32/IcsBcb30.cpp @@ -0,0 +1,50 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("IcsBcb30.res"); +USEUNIT("WSocket.pas"); +USERES("WSocket.dcr"); +USEUNIT("WSockets.pas"); +USERES("WSockets.dcr"); +USEUNIT("httpprot.pas"); +USERES("httpprot.dcr"); +USEUNIT("ftpcli.pas"); +USERES("ftpcli.dcr"); +USEUNIT("wait.pas"); +USERES("wait.dcr"); +USEUNIT("tnscript.pas"); +USERES("tnscript.dcr"); +USEUNIT("fingcli.pas"); +USERES("fingcli.dcr"); +USEUNIT("nntpcli.pas"); +USERES("nntpcli.dcr"); +USEUNIT("ping.pas"); +USERES("ping.dcr"); +USEUNIT("tncnx.pas"); +USERES("tncnx.dcr"); +USEUNIT("tnemulvt.pas"); +USERES("tnemulvt.dcr"); +USEUNIT("emulvt.pas"); +USERES("emulvt.dcr"); +USEUNIT("FtpSrv.pas"); +USERES("FtpSrv.dcr"); +USEUNIT("SmtpProt.pas"); +USERES("SmtpProt.dcr"); +USEPACKAGE("VCL35.bpi"); +USEUNIT("wsockbuf.pas"); +USEUNIT("Pop3Prot.pas"); +USERES("Pop3Prot.dcr"); +USEUNIT("MimeDec.pas"); +USERES("MimeDec.dcr"); +USEUNIT("DnsQuery.pas"); +USERES("DnsQuery.dcr"); +//--------------------------------------------------------------------------- +#pragma package(smart_init) +//--------------------------------------------------------------------------- +// Package source. +//--------------------------------------------------------------------------- +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/lib/Delphi/Vc32/IcsBcb30.res b/lib/Delphi/Vc32/IcsBcb30.res new file mode 100644 index 00000000..80f0f431 Binary files /dev/null and b/lib/Delphi/Vc32/IcsBcb30.res differ diff --git a/lib/Delphi/Vc32/IcsBcb50.bpk b/lib/Delphi/Vc32/IcsBcb50.bpk new file mode 100644 index 00000000..4454494c --- /dev/null +++ b/lib/Delphi/Vc32/IcsBcb50.bpk @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=0 +Build=16 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=ICS Components for BCB5 +FileVersion=2.0.0.16 +InternalName=IcsBcb50 +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=2.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\..\internet;..;D:\delphi\vc32\;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..\..\Delphi;D:\delphi\vc32\;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..\..\DELPHI;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=7 +Item0=$(BCB)\Projects\Lib;..\..\internet;..;D:\delphi\vc32\;$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\Source\ToolsAPI +Item1=$(BCB)\Projects\Lib;..\..\internet;..;D:\delphi\vc32\;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\internet;..\..\Delphi;D:\delphi\vc32\;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=$(BCB)\Projects\Lib;..\..\internet;..\..\DELPHI;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\vc32;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/Delphi/Vc32/IcsBcb50.cpp b/lib/Delphi/Vc32/IcsBcb50.cpp new file mode 100644 index 00000000..da11507b --- /dev/null +++ b/lib/Delphi/Vc32/IcsBcb50.cpp @@ -0,0 +1,53 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("IcsBcb50.res"); +USEUNIT("WSocket.pas"); +USERES("WSocket.dcr"); +USEUNIT("Httpprot.pas"); +USERES("Httpprot.dcr"); +USEUNIT("Ftpcli.pas"); +USERES("Ftpcli.dcr"); +USEUNIT("Wait.pas"); +USERES("Wait.dcr"); +USEUNIT("TnScript.pas"); +USERES("TnScript.dcr"); +USEUNIT("Fingcli.pas"); +USERES("Fingcli.dcr"); +USEUNIT("Nntpcli.pas"); +USERES("Nntpcli.dcr"); +USEUNIT("Ping.pas"); +USERES("Ping.dcr"); +USEUNIT("TnCnx.pas"); +USERES("TnCnx.dcr"); +USEUNIT("TnEmulVT.pas"); +USERES("TnEmulVT.dcr"); +USEUNIT("EmulVT.pas"); +USERES("EmulVT.dcr"); +USEUNIT("FtpSrv.pas"); +USERES("FtpSrv.dcr"); +USEUNIT("SmtpProt.pas"); +USERES("SmtpProt.dcr"); +USEUNIT("WSockBuf.pas"); +USEUNIT("Pop3Prot.pas"); +USERES("Pop3Prot.dcr"); +USEUNIT("MimeDec.pas"); +USERES("MimeDec.dcr"); +USEUNIT("DnsQuery.pas"); +USERES("DnsQuery.dcr"); +USEUNIT("WSocketS.pas"); +USERES("WSocketS.dcr"); +USEUNIT("HttpSrv.pas"); +USERES("HttpSrv.dcr"); +USEPACKAGE("vcl50.bpi"); +USEUNIT("WSocketE.pas"); +//--------------------------------------------------------------------------- +#pragma package(smart_init) +//--------------------------------------------------------------------------- +// Package source. +//--------------------------------------------------------------------------- +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/lib/Delphi/Vc32/IcsBcb50.res b/lib/Delphi/Vc32/IcsBcb50.res new file mode 100644 index 00000000..21465a1d Binary files /dev/null and b/lib/Delphi/Vc32/IcsBcb50.res differ diff --git a/lib/Delphi/Vc32/IcsBcb60.bpk b/lib/Delphi/Vc32/IcsBcb60.bpk new file mode 100644 index 00000000..f183aefb --- /dev/null +++ b/lib/Delphi/Vc32/IcsBcb60.bpk @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=1 +Release=0 +Build=11 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=ICS Components for BCB6 +FileVersion=2.1.0.11 +InternalName=IcsBcb60 +LegalCopyright=(c) 1997-2002 by Francois PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.overbyte.be + +[Excluded Packages] +d:\program files\borland\cbuilder6\Projects\Bpl\PXPPkg.bpl=PXPPkg +D:\PROGRAM FILES\BORLAND\CBUILDER6\BIN\DCLSTD60.BPL=Borland Standard Components +d:\program files\borland\cbuilder6\Bin\idefilters60.bpl=IDE Filter for CPP32 +d:\program files\borland\cbuilder6\Bin\dcl31w60.bpl=Delphi 1.0 Compatibility Components +d:\program files\borland\cbuilder6\Bin\dclado60.bpl=Borland ADO DB Components +D:\PROGRAM FILES\BORLAND\CBUILDER6\BIN\DCLDB60.BPL=Borland Database Components +d:\program files\borland\cbuilder6\Bin\dclbde60.bpl=Borland BDE DB Components +D:\PROGRAM FILES\BORLAND\CBUILDER6\BIN\DBX60.BPL=Borland SQL Explorer UI Package +d:\program files\borland\cbuilder6\Bin\DCLIB60.bpl=InterBase Data Access Components +d:\program files\borland\cbuilder6\Bin\dclcds60.bpl=Borland Base Cached ClientDataset Component +D:\PROGRAM FILES\BORLAND\CBUILDER6\BIN\DCLMID60.BPL=Borland MyBase DataAccess Components +d:\program files\borland\cbuilder6\Bin\dclbdecds60.bpl=Borland Local BDE ClientDataset Components +d:\program files\borland\cbuilder6\Bin\dclqrt60.bpl=QuickReport Components +d:\program files\borland\cbuilder6\Bin\dcltee60.bpl=TeeChart Components +d:\program files\borland\cbuilder6\Bin\dcldss60.bpl=Borland Decision Cube Components +d:\program files\borland\cbuilder6\Bin\dcltqr60.bpl=TeeChart for QuickReport Components +d:\program files\borland\cbuilder6\Bin\dclclxdb60.bpl=Borland CLX Database Components +D:\PROGRAM FILES\BORLAND\CBUILDER6\BIN\DCLCLXSTD60.BPL=Borland CLX Standard Components +d:\program files\borland\cbuilder6\Bin\dclmcn60.bpl=Borland DataSnap Connection Components +d:\program files\borland\cbuilder6\Bin\dclsmpedit60.bpl=Borland Editor Script Enhancements +d:\program files\borland\cbuilder6\Bin\applet60.bpl=Borland Control Panel Applet Package +d:\program files\borland\cbuilder6\Bin\dclemacsedit60.bpl=Borland Editor Emacs Enhancements +d:\program files\borland\cbuilder6\Bin\dclact60.bpl=Borland ActionBar Components +d:\program files\borland\cbuilder6\Bin\dclmlwiz60.bpl=Borland Markup Language Wizards +d:\program files\borland\cbuilder6\Bin\dclbcbsmp60.bpl=Borland Sample Controls Design Time Package +d:\program files\borland\cbuilder6\Bin\dclnet60.bpl=Borland Internet Components +d:\program files\borland\cbuilder6\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package +d:\program files\borland\cbuilder6\Bin\DCLNMF60.bpl=NetMasters Fastnet Tools +d:\program files\borland\cbuilder6\Bin\dclwbm60.bpl=Borland InternetExpress Components +d:\program files\borland\cbuilder6\Bin\dclwebsnap60.bpl=Borland WebSnap Components +d:\program files\borland\cbuilder6\Bin\dclsoap60.bpl=Borland SOAP Components +d:\program files\borland\cbuilder6\Bin\dclocx60.bpl=Borland Sample Imported ActiveX Controls +d:\program files\borland\cbuilder6\Bin\dclite60.bpl=Borland Integrated Translation Environment +d:\program files\borland\cbuilder6\Bin\dcldbx60.bpl=Borland dbExpress Components +d:\program files\borland\cbuilder6\Bin\dcldbxcds60.bpl=Borland Local DBX ClientDataset Components +d:\program files\borland\cbuilder6\Bin\dclindy60.bpl=Internet Direct (Indy) for D6 Property and Component Editors +d:\program files\borland\cbuilder6\Bin\bcb2kaxserver60.bpl=Borland C++Builder COM Server Components Sample Package +d:\program files\borland\cbuilder6\Bin\bcbie60.bpl=Borland C++Builder Internet Explorer 5 Components Package +d:\program files\borland\cbuilder6\Projects\Bpl\MwBcb60.bpl=MwBcb60 + +[HistoryLists\hlIncludePath] +Count=1 +Item0=D:\FPiette\Delphi\VC32;D:\FPiette\cpp;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=$(BCB)\Projects\Lib;D:\FPiette\Delphi\VC32;d:\program files\borland\cbuilder6\lib\debug;$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\Source\ToolsAPI +Item1=D:\FPiette\Delphi\VC32;d:\program files\borland\cbuilder6\lib\debug;$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\Source\ToolsAPI +Item2=D:\FPiette\Delphi\VC32;d:\program files\borland\cbuilder6\lib\debug;$(BCB)\lib\obj;$(BCB)\lib +Item3=D:\FPiette\Delphi\VC32;d:\program files\borland\cbuilder6\lib\debug;D:\FPiette\cpp;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Linker] +LibPrefix= +LibSuffix= +LibVersion= + + \ No newline at end of file diff --git a/lib/Delphi/Vc32/IcsBcb60.cpp b/lib/Delphi/Vc32/IcsBcb60.cpp new file mode 100644 index 00000000..30689a63 --- /dev/null +++ b/lib/Delphi/Vc32/IcsBcb60.cpp @@ -0,0 +1,19 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USEFORMNS("TnOptFrm.pas", Tnoptfrm, OptForm); +//--------------------------------------------------------------------------- +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- + \ No newline at end of file diff --git a/lib/Delphi/Vc32/IcsBcb60.res b/lib/Delphi/Vc32/IcsBcb60.res new file mode 100644 index 00000000..09b4dd96 Binary files /dev/null and b/lib/Delphi/Vc32/IcsBcb60.res differ diff --git a/lib/Delphi/Vc32/IcsDel30.dpk b/lib/Delphi/Vc32/IcsDel30.dpk new file mode 100644 index 00000000..2d2edbab --- /dev/null +++ b/lib/Delphi/Vc32/IcsDel30.dpk @@ -0,0 +1,79 @@ +package IcsDel30; + +{$R *.RES} +{$R 'wsocket.dcr'} +{$R 'wsockets.dcr'} +{$R 'wait.dcr'} +{$R 'fingcli.dcr'} +{$R 'FtpCli.dcr'} +{$R 'HttpProt.dcr'} +{$R 'MimeDec.dcr'} +{$R 'NntpCli.dcr'} +{$R 'ping.dcr'} +{$R 'tncnx.dcr'} +{$R 'tnemulvt.dcr'} +{$R 'tnscript.dcr'} +{$R 'emulvt.dcr'} +{$R 'ftpsrv.dcr'} +{$R 'MbxFile.dcr'} +{$R 'SmtpProt.dcr'} +{$R 'Pop3prot.dcr'} +{$R 'dnsquery.dcr'} +{$R 'Httpsrv.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS ON} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'Internet Component Suite (by F. Piette)'} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + wsocket, + wsockete, + wsockbuf, + wait, + wsockets, + fingcli, + formpos, + FtpCli, + HttpProt, + icmp, + md5, + MimeDec, + NntpCli, + ping, + tncnx, + tnemulvt, + tnoptfrm, + tnscript, + emulvt, + ftpsrv, + ftpsrvc, + MbxFile, + SmtpProt, + dnsquery, + Pop3prot, + Httpsrv, + FtpSrvT; + +end. diff --git a/lib/Delphi/Vc32/IcsDel40.dpk b/lib/Delphi/Vc32/IcsDel40.dpk new file mode 100644 index 00000000..2f291734 --- /dev/null +++ b/lib/Delphi/Vc32/IcsDel40.dpk @@ -0,0 +1,79 @@ +package IcsDel40; + +{$R *.RES} +{$R 'WSocket.dcr'} +{$R 'fingcli.dcr'} +{$R 'FtpCli.dcr'} +{$R 'FtpSrv.dcr'} +{$R 'HttpProt.dcr'} +{$R 'MimeDec.dcr'} +{$R 'NntpCli.dcr'} +{$R 'ping.dcr'} +{$R 'pop3prot.dcr'} +{$R 'TnCnx.dcr'} +{$R 'tnemulvt.dcr'} +{$R 'tnscript.dcr'} +{$R 'emulvt.dcr'} +{$R 'SmtpProt.dcr'} +{$R 'MbxFile.dcr'} +{$R 'wait.dcr'} +{$R 'DnsQuery.dcr'} +{$R 'WSocketS.dcr'} +{$R 'HttpSrv.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'ICS components (Freeware from F. Piette) Delphi 4'} +{$IMPLICITBUILD OFF} + +requires + vcl40; + +contains + WSockBuf in 'WSockBuf.pas', + WSocket in 'WSocket.pas', + WSocketE in 'WSocketE.pas', + FingCli in 'fingcli.pas', + Formpos in 'formpos.pas', + FtpCli in 'FtpCli.pas', + FtpSrv in 'FtpSrv.pas', + FtpSrvC in 'FtpSrvC.pas', + HttpProt in 'HttpProt.pas', + icmp in 'icmp.pas', + MD5 in 'MD5.pas', + MimeDec in 'MimeDec.pas', + NntpCli in 'NntpCli.pas', + Ping in 'ping.pas', + TnCnx in 'TnCnx.pas', + TnEmulVT in 'TnEmulVT.pas', + Tnoptfrm in 'tnoptfrm.pas' {OptForm}, + TnScript in 'TnScript.pas', + Emulvt in 'emulvt.pas', + SmtpProt in 'SmtpProt.pas', + MbxFile in 'MbxFile.pas', + Pop3Prot in 'Pop3Prot.pas', + Wait in 'wait.pas', + DnsQuery in 'DnsQuery.pas', + WSocketS in 'WSocketS.pas', + HttpSrv in 'HttpSrv.pas', + FtpSrvT in 'FtpSrvT.pas'; + +end. diff --git a/lib/Delphi/Vc32/IcsDel40.res b/lib/Delphi/Vc32/IcsDel40.res new file mode 100644 index 00000000..16221e3b Binary files /dev/null and b/lib/Delphi/Vc32/IcsDel40.res differ diff --git a/lib/Delphi/Vc32/IcsDel50.dpk b/lib/Delphi/Vc32/IcsDel50.dpk new file mode 100644 index 00000000..06b589b8 --- /dev/null +++ b/lib/Delphi/Vc32/IcsDel50.dpk @@ -0,0 +1,79 @@ +package IcsDel50; + +{$R *.RES} +{$R 'WSocket.dcr'} +{$R 'FingCli.dcr'} +{$R 'FtpCli.dcr'} +{$R 'FtpSrv.dcr'} +{$R 'HttpProt.dcr'} +{$R 'MimeDec.dcr'} +{$R 'NntpCli.dcr'} +{$R 'Ping.dcr'} +{$R 'Pop3Prot.dcr'} +{$R 'TnCnx.dcr'} +{$R 'TnEmulVT.dcr'} +{$R 'TnScript.dcr'} +{$R 'EmulVT.dcr'} +{$R 'SmtpProt.dcr'} +{$R 'MbxFile.dcr'} +{$R 'Wait.dcr'} +{$R 'DnsQuery.dcr'} +{$R 'WSocketS.dcr'} +{$R 'HttpSrv.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'ICS components (Freeware from F. Piette)'} +{$IMPLICITBUILD ON} + +requires + vcl50; + +contains + WSockBuf in 'WSockBuf.pas', + WSocket in 'WSocket.pas', + FingCli in 'FingCli.pas', + FormPos in 'FormPos.pas', + FtpCli in 'FtpCli.pas', + FtpSrv in 'FtpSrv.pas', + FtpSrvC in 'FtpSrvC.pas', + HttpProt in 'HttpProt.pas', + Icmp in 'Icmp.pas', + MD5 in 'MD5.pas', + MimeDec in 'MimeDec.pas', + NntpCli in 'NntpCli.pas', + Ping in 'Ping.pas', + TnCnx in 'TnCnx.pas', + TnEmulVT in 'TnEmulVT.pas', + TnOptFrm in 'TnOptFrm.pas' {OptForm}, + TnScript in 'TnScript.pas', + Emulvt in 'EmulVT.pas', + SmtpProt in 'SmtpProt.pas', + MbxFile in 'MbxFile.pas', + Pop3Prot in 'Pop3Prot.pas', + Wait in 'Wait.pas', + DnsQuery in 'DnsQuery.pas', + WSocketS in 'WSocketS.pas', + HttpSrv in 'HttpSrv.pas', + FtpSrvT in 'FtpSrvT.pas', + WSocketE in 'WSocketE.pas'; + +end. diff --git a/lib/Delphi/Vc32/IcsDel50.res b/lib/Delphi/Vc32/IcsDel50.res new file mode 100644 index 00000000..e644ad10 Binary files /dev/null and b/lib/Delphi/Vc32/IcsDel50.res differ diff --git a/lib/Delphi/Vc32/IcsDel60.cfg b/lib/Delphi/Vc32/IcsDel60.cfg new file mode 100644 index 00000000..246427c5 --- /dev/null +++ b/lib/Delphi/Vc32/IcsDel60.cfg @@ -0,0 +1,35 @@ +-$A8 +-$B- +-$C+ +-$D+ +-$E- +-$F- +-$G+ +-$H+ +-$I+ +-$J+ +-$K- +-$L+ +-$M- +-$N+ +-$O- +-$P+ +-$Q+ +-$R+ +-$S- +-$T- +-$U- +-$V+ +-$W- +-$X+ +-$YD +-$Z1 +-cg +-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +-H+ +-W+ +-M +-$M16384,1048576 +-K$00400000 +-LE"f:\program files\borland\delphi6\Projects\Bpl" +-LN"f:\program files\borland\delphi6\Projects\Bpl" diff --git a/lib/Delphi/Vc32/IcsDel60.dcu b/lib/Delphi/Vc32/IcsDel60.dcu new file mode 100644 index 00000000..3a959569 Binary files /dev/null and b/lib/Delphi/Vc32/IcsDel60.dcu differ diff --git a/lib/Delphi/Vc32/IcsDel60.dof b/lib/Delphi/Vc32/IcsDel60.dof new file mode 100644 index 00000000..cdc0eaa3 --- /dev/null +++ b/lib/Delphi/Vc32/IcsDel60.dof @@ -0,0 +1,108 @@ +[FileVersion] +Version=6.0 + +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=0 +P=1 +Q=1 +R=1 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription=Internet Component Suite (ICS) for Delphi 6 + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages= +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= + +[Language] +ActiveLang= +ProjectLang=$0000080C +RootDir= + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=3 +MinorVer=0 +Release=0 +Build=4 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte - http://www.overbyte.be +FileDescription=Internet Component Suite +FileVersion=3.0.0.4 +InternalName=IcsDel60 +LegalCopyright=http://www.overbyte.be +LegalTrademarks=(c) 1996-2002 by Franois Piette +OriginalFilename=IcsDel60 +ProductName=ICS +ProductVersion=3.0.0.0 +Comments=email:francois.piette@overbyte.be + +[Excluded Packages] +d:\program files\borland\delphi6\Bin\dclmcn60.bpl=Borland DataSnap Connection Components +d:\program files\borland\delphi6\Bin\dclwbm60.bpl=Borland InternetExpress Components +d:\program files\borland\delphi6\Bin\dclwebsnap60.bpl=Borland WebSnap Components + +[HistoryLists\hlConditionals] +Count=2 +Item0=NOFORMS +Item1=NOFORMSA + +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; diff --git a/lib/Delphi/Vc32/IcsDel60.dpk b/lib/Delphi/Vc32/IcsDel60.dpk new file mode 100644 index 00000000..ffd3a3a7 --- /dev/null +++ b/lib/Delphi/Vc32/IcsDel60.dpk @@ -0,0 +1,81 @@ +package IcsDel60; + +{$R *.res} +{$R 'WSocket.dcr'} +{$R 'FingCli.dcr'} +{$R 'FtpCli.dcr'} +{$R 'FtpSrv.dcr'} +{$R 'HttpProt.dcr'} +{$R 'MimeDec.dcr'} +{$R 'NntpCli.dcr'} +{$R 'Ping.dcr'} +{$R 'Pop3Prot.dcr'} +{$R 'TnCnx.dcr'} +{$R 'TnEmulVT.dcr'} +{$R 'TnScript.dcr'} +{$R 'EmulVT.dcr'} +{$R 'SmtpProt.dcr'} +{$R 'MbxFile.dcr'} +{$R 'Wait.dcr'} +{$R 'DnsQuery.dcr'} +{$R 'WSocketS.dcr'} +{$R 'HttpSrv.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'Internet Component Suite (ICS) for Delphi 6'} +{$IMPLICITBUILD ON} + +requires + vcl, + rtl, + designide; + +contains + WSockBuf in 'WSockBuf.pas', + WSocket in 'WSocket.pas', + FingCli in 'FingCli.pas', + FormPos in 'FormPos.pas', + FtpCli in 'FtpCli.pas', + FtpSrv in 'FtpSrv.pas', + FtpSrvC in 'FtpSrvC.pas', + HttpProt in 'HttpProt.pas', + Icmp in 'Icmp.pas', + MD5 in 'MD5.pas', + MimeDec in 'MimeDec.pas', + NntpCli in 'NntpCli.pas', + Ping in 'Ping.pas', + TnCnx in 'TnCnx.pas', + TnEmulVT in 'TnEmulVT.pas', + TnOptFrm in 'TnOptFrm.pas' {OptForm}, + TnScript in 'TnScript.pas', + EmulVT in 'EmulVT.pas', + SmtpProt in 'SmtpProt.pas', + MbxFile in 'MbxFile.pas', + Pop3Prot in 'Pop3Prot.pas', + Wait in 'Wait.pas', + DnsQuery in 'DnsQuery.pas', + WSocketS in 'WSocketS.pas', + HttpSrv in 'HttpSrv.pas', + FtpSrvT in 'FtpSrvT.pas', + WSocketE in 'WSocketE.pas'; + +end. diff --git a/lib/Delphi/Vc32/IcsDel60.res b/lib/Delphi/Vc32/IcsDel60.res new file mode 100644 index 00000000..46e849aa Binary files /dev/null and b/lib/Delphi/Vc32/IcsDel60.res differ diff --git a/lib/Delphi/Vc32/IcsDel70.dof b/lib/Delphi/Vc32/IcsDel70.dof new file mode 100644 index 00000000..bb1eb6a5 --- /dev/null +++ b/lib/Delphi/Vc32/IcsDel70.dof @@ -0,0 +1,152 @@ +[FileVersion] +Version=7.0 + +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=0 +P=1 +Q=1 +R=1 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +NamespacePrefix= +SymbolDeprecated=0 +SymbolLibrary=1 +SymbolPlatform=0 +UnitLibrary=1 +UnitPlatform=1 +UnitDeprecated=1 +HResultCompat=1 +HidingMember=1 +HiddenVirtual=1 +Garbage=1 +BoundsError=1 +ZeroNilCompat=1 +StringConstTruncated=1 +ForLoopVarVarPar=1 +TypedConstVarPar=1 +AsgToTypedConst=1 +CaseLabelRange=1 +ForVariable=1 +ConstructingAbstract=1 +ComparisonFalse=1 +ComparisonTrue=1 +ComparingSignedUnsigned=1 +CombiningSignedUnsigned=1 +UnsupportedConstruct=1 +FileOpen=1 +FileOpenUnitSrc=1 +BadGlobalSymbol=1 +DuplicateConstructorDestructor=1 +InvalidDirective=1 +PackageNoLink=1 +PackageThreadVar=1 +ImplicitImport=1 +HPPEMITIgnored=1 +NoRetVal=1 +UseBeforeDef=1 +ForLoopVarUndef=1 +UnitNameMismatch=1 +NoCFGFileFound=1 +MessageDirective=1 +ImplicitVariants=1 +UnicodeToLocale=1 +LocaleToUnicode=1 +ImagebaseMultiple=1 +SuspiciousTypecast=1 +PrivatePropAccessor=1 +UnsafeType=0 +UnsafeCode=0 +UnsafeCast=0 + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription=Internet Component Suite (ICS) for Delphi 7 + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages= +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= + +[Language] +ActiveLang= +ProjectLang= +RootDir= + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=3 +MinorVer=0 +Release=0 +Build=96 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte - http://www.overbyte.be +FileDescription=Internet Component Suite +FileVersion=3.0.0.96 +InternalName=IcsDel70 +LegalCopyright=http://www.overbyte.be +LegalTrademarks=(c) 1996-2002 by Franois Piette +OriginalFilename=IcsDel70 +ProductName=ICS +ProductVersion=3.0.0.0 +Comments=email:francois.piette@overbyte.be + +[HistoryLists\hlConditionals] +Count=2 +Item0=NOFORMS +Item1=NOFORMSA + +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; diff --git a/lib/Delphi/Vc32/IcsDel70.dpk b/lib/Delphi/Vc32/IcsDel70.dpk new file mode 100644 index 00000000..c13069da --- /dev/null +++ b/lib/Delphi/Vc32/IcsDel70.dpk @@ -0,0 +1,81 @@ +package IcsDel70; + +{$R *.res} +{$R 'WSocket.dcr'} +{$R 'FingCli.dcr'} +{$R 'FtpCli.dcr'} +{$R 'FtpSrv.dcr'} +{$R 'HttpProt.dcr'} +{$R 'MimeDec.dcr'} +{$R 'NntpCli.dcr'} +{$R 'Ping.dcr'} +{$R 'Pop3Prot.dcr'} +{$R 'TnCnx.dcr'} +{$R 'TnEmulVT.dcr'} +{$R 'TnScript.dcr'} +{$R 'EmulVT.dcr'} +{$R 'SmtpProt.dcr'} +{$R 'MbxFile.dcr'} +{$R 'Wait.dcr'} +{$R 'DnsQuery.dcr'} +{$R 'WSocketS.dcr'} +{$R 'HttpSrv.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'Internet Component Suite (ICS) for Delphi 7'} +{$IMPLICITBUILD ON} + +requires + vcl, + rtl, + designide; + +contains + WSockBuf in 'WSockBuf.pas', + WSocket in 'wsocket.pas', + FingCli in 'FingCli.pas', + FormPos in 'FormPos.pas', + FtpCli in 'FtpCli.pas', + FtpSrv in 'FtpSrv.pas', + FtpSrvC in 'FtpSrvC.pas', + HttpProt in 'HttpProt.pas', + Icmp in 'Icmp.pas', + MD5 in 'MD5.pas', + MimeDec in 'MimeDec.pas', + NntpCli in 'NntpCli.pas', + Ping in 'Ping.pas', + TnCnx in 'TnCnx.pas', + TnEmulVT in 'TnEmulVT.pas', + TnOptFrm in 'TnOptFrm.pas' {OptForm}, + TnScript in 'TnScript.pas', + EmulVT in 'EmulVT.pas', + SmtpProt in 'SmtpProt.pas', + MbxFile in 'MbxFile.pas', + Pop3Prot in 'Pop3Prot.pas', + Wait in 'Wait.pas', + DnsQuery in 'DnsQuery.pas', + WSocketS in 'WSocketS.pas', + HttpSrv in 'HttpSrv.pas', + FtpSrvT in 'FtpSrvT.pas', + WSocketE in 'WSocketE.pas'; + +end. diff --git a/lib/Delphi/Vc32/IcsDel70.res b/lib/Delphi/Vc32/IcsDel70.res new file mode 100644 index 00000000..b561f81a Binary files /dev/null and b/lib/Delphi/Vc32/IcsDel70.res differ diff --git a/lib/Delphi/Vc32/Icsbcb40.bpk b/lib/Delphi/Vc32/Icsbcb40.bpk new file mode 100644 index 00000000..ce54f2fb --- /dev/null +++ b/lib/Delphi/Vc32/Icsbcb40.bpk @@ -0,0 +1,221 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Icsbcb40.bpl +OBJFILES = WSocket.obj httpprot.obj ftpcli.obj wait.obj tnscript.obj fingcli.obj \ + nntpcli.obj ping.obj tncnx.obj tnemulvt.obj emulvt.obj FtpSrv.obj SmtpProt.obj \ + wsockbuf.obj Pop3Prot.obj MimeDec.obj DnsQuery.obj WSocketE.obj WSocketS.obj \ + HttpSrv.obj Icsbcb40.obj +RESFILES = Icsbcb40.res WSocket.dcr httpprot.dcr ftpcli.dcr wait.dcr tnscript.dcr \ + fingcli.dcr nntpcli.dcr ping.dcr tncnx.dcr tnemulvt.dcr emulvt.dcr FtpSrv.dcr \ + SmtpProt.dcr Pop3Prot.dcr MimeDec.dcr DnsQuery.dcr WSocketS.dcr HttpSrv.dcr +DEFFILE = +RESDEPEN = $(RESFILES) +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = vcljpg40.lib vcldbx40.lib vclmid40.lib vclx40.lib vcldb40.lib +SPARELIBS = vcl40.lib vcldb40.lib vclx40.lib vclmid40.lib vcldbx40.lib vcljpg40.lib +PACKAGES = vcl40.bpi bcbsmp40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .; +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -Od \ + -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I..\..\internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$YD \ + -$W -$O- -v -M -JPHNE +RFLAGS = -i..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i..\..\DELPHI /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL /dUSEPACKAGES +LFLAGS = -L$(BCB)\Projects\Lib;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -D"ICS components by F. Piette" -aa -Tpp -x -Gn -Gl -Gi -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=0 +Build=6 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=ICS Components for BCB4 +FileVersion=2.0.0.6 +InternalName=IcsBcb40 +LegalCopyright=(c) 97'-'99 by F. Piette +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=2.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[Excluded Packages] +$(BCB)\Bin\dcl31w40.bpl=Delphi 1.0 Compatibility Components +$(BCB)\Bin\bcbsmp40.bpl=Borland C++ Sample Components +$(BCB)\Bin\dclint40.bpl=Borland Resource DLL Wizard +C:\WINDOWS\SYSTEM\\ibsmp40.bpl=Borland C++ InterBase Alerter Component +$(BCB)\Bin\rcexpert.bpl=Borland Resource Expert +$(BCB)\Bin\dcldb40.bpl=Borland Database Components +$(BCB)\Bin\dclqrt40.bpl=QuickReport Components +$(BCB)\Bin\mfcowlwizard.bpl=MFC/OWL Wizard +$(BCB)\Bin\dcltee40.bpl=Borland TeeChart Components +$(BCB)\Bin\dcldss40.bpl=Borland Decision Cube Components + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..\..\DELPHI;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=$(BCB)\Projects\Lib;..\..\internet;..\..\DELPHI;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\vc32;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/Delphi/Vc32/Icsbcb40.cpp b/lib/Delphi/Vc32/Icsbcb40.cpp new file mode 100644 index 00000000..4cc8fdcb --- /dev/null +++ b/lib/Delphi/Vc32/Icsbcb40.cpp @@ -0,0 +1,53 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Icsbcb40.res"); +USEUNIT("WSocket.pas"); +USERES("WSocket.dcr"); +USEUNIT("httpprot.pas"); +USERES("httpprot.dcr"); +USEUNIT("ftpcli.pas"); +USERES("ftpcli.dcr"); +USEUNIT("wait.pas"); +USERES("wait.dcr"); +USEUNIT("tnscript.pas"); +USERES("tnscript.dcr"); +USEUNIT("fingcli.pas"); +USERES("fingcli.dcr"); +USEUNIT("nntpcli.pas"); +USERES("nntpcli.dcr"); +USEUNIT("ping.pas"); +USERES("ping.dcr"); +USEUNIT("tncnx.pas"); +USERES("tncnx.dcr"); +USEUNIT("tnemulvt.pas"); +USERES("tnemulvt.dcr"); +USEUNIT("emulvt.pas"); +USERES("emulvt.dcr"); +USEUNIT("FtpSrv.pas"); +USERES("FtpSrv.dcr"); +USEUNIT("SmtpProt.pas"); +USERES("SmtpProt.dcr"); +USEUNIT("wsockbuf.pas"); +USEUNIT("Pop3Prot.pas"); +USERES("Pop3Prot.dcr"); +USEUNIT("MimeDec.pas"); +USERES("MimeDec.dcr"); +USEUNIT("DnsQuery.pas"); +USERES("DnsQuery.dcr"); +USEPACKAGE("vcl40.bpi"); +USEPACKAGE("bcbsmp40.bpi"); +USEUNIT("WSocketS.pas"); +USERES("WSocketS.dcr"); +USEUNIT("HttpSrv.pas"); +USERES("HttpSrv.dcr"); +//--------------------------------------------------------------------------- +#pragma package(smart_init) +//--------------------------------------------------------------------------- +// Package source. +//--------------------------------------------------------------------------- +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/lib/Delphi/Vc32/Icsbcb40.res b/lib/Delphi/Vc32/Icsbcb40.res new file mode 100644 index 00000000..8af8373b Binary files /dev/null and b/lib/Delphi/Vc32/Icsbcb40.res differ diff --git a/lib/Delphi/Vc32/Icsdel30.res b/lib/Delphi/Vc32/Icsdel30.res new file mode 100644 index 00000000..36f26e23 Binary files /dev/null and b/lib/Delphi/Vc32/Icsdel30.res differ diff --git a/lib/Delphi/Vc32/MD5.dcu b/lib/Delphi/Vc32/MD5.dcu new file mode 100644 index 00000000..a40fa9e8 Binary files /dev/null and b/lib/Delphi/Vc32/MD5.dcu differ diff --git a/lib/Delphi/Vc32/MD5.pas b/lib/Delphi/Vc32/MD5.pas new file mode 100644 index 00000000..03f826c3 --- /dev/null +++ b/lib/Delphi/Vc32/MD5.pas @@ -0,0 +1,362 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE. Based on work given by Louis S. Berman from + BrainTree Ltd, lsb@braintree.com +Description: MD5 is an implmentation for the MD5 Message-Digest Algorithm + as described in RFC-1321 +Creation: October 11, 1997 +Version: 1.03 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Oct 26, 1997 Changed MD5Final form function to procedure to be compatible + with C++Builder. +Jul 09, 1998 V1.01 Adapted for Delphi 4 +Aug 06, 1998 V1.02 Added R- Q- directive +Jun 05, 1999 V1.03 Wolfgang Klein found a bug in MD5Update. + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MD5; + +interface + +uses + SysUtils; + +const + MD5Version = 102; + CopyRight : String = ' MD5 Message-Digest (c) 97-98 F. Piette V1.02 '; + +{$Q-} +{$R-} + +type + TMD5Context = record + State: array[0..3] of LongInt; + Count: array[0..1] of LongInt; + case Integer of + 0: (BufChar: array[0..63] of Byte); + 1: (BufLong: array[0..15] of LongInt); + end; + TMD5Digest = array[0..15] of Char; + +procedure MD5Init(var MD5Context: TMD5Context); +procedure MD5Update(var MD5Context: TMD5Context; + const Data; + Len: Integer); +procedure MD5Transform(var Buf: array of LongInt; + const Data: array of LongInt); +procedure MD5UpdateBuffer(var MD5Context: TMD5Context; + Buffer: Pointer; + BufSize: Integer); +procedure MD5Final(var Digest: TMD5Digest; var MD5Context: TMD5Context); + +function GetMD5(Buffer: Pointer; BufSize: Integer): string; +function StrMD5(Buffer : String): string; + +implementation + +const + MaxBufSize = 16384; + +type + PMD5Buffer = ^TMD5Buffer; + TMD5Buffer = array[0..(MaxBufSize - 1)] of Char; + + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 initialization. Begins an MD5 operation, writing a new context. } +procedure MD5Init(var MD5Context: TMD5Context); +begin + FillChar(MD5Context, SizeOf(TMD5Context), #0); + with MD5Context do begin + { Load magic initialization constants. } + State[0] := LongInt($67452301); + State[1] := LongInt($EFCDAB89); + State[2] := LongInt($98BADCFE); + State[3] := LongInt($10325476); + end +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 block update operation. Continues an MD5 message-digest operation, } +{ processing another message block, and updating the context. } +procedure MD5Update( + var MD5Context: TMD5Context; { Context } + const Data; { Input block } + Len: Integer); { Length of input block } +type + TByteArray = array[0..0] of Byte; +var + Index: Word; + T: LongInt; +begin + with MD5Context do begin + T := Count[0]; + Inc(Count[0], LongInt(Len) shl 3); + if Count[0] < T then + Inc(Count[1]); + Inc(Count[1], Len shr 29); + T := (T shr 3) and $3F; + Index := 0; + if T <> 0 then begin + Index := T; + T := 64 - T; + if Len < T then begin + Move(Data, BufChar[Index], Len); + Exit; + end; + Move(Data, BufChar[Index], T); + MD5Transform(State, BufLong); + Dec(Len, T); + Index := T; { Wolfgang Klein, 05/06/99 } + end; + while Len >= 64 do begin + Move(TByteArray(Data)[Index], BufChar, 64); + MD5Transform(State, BufLong); + Inc(Index, 64); + Dec(Len, 64); + end; + Move(TByteArray(Data)[Index], BufChar, Len); + end +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 finalization. Ends an MD5 message-digest operation, writing the message } +{ digest and zeroizing the context. } +procedure MD5Final(var Digest: TMD5Digest; var MD5Context: TMD5Context); +var + Cnt : Word; + P : Byte; +begin + with MD5Context do begin + Cnt := (Count[0] shr 3) and $3F; + P := Cnt; + BufChar[P] := $80; + Inc(P); + Cnt := 64 - 1 - Cnt; + if Cnt < 8 then begin + FillChar(BufChar[P], Cnt, #0); + MD5Transform(State, BufLong); + FillChar(BufChar, 56, #0); + end + else + FillChar(BufChar[P], Cnt - 8, #0); + BufLong[14] := Count[0]; + BufLong[15] := Count[1]; + MD5Transform(State, BufLong); + Move(State, Digest, 16) + end; + FillChar(MD5Context, SizeOf(TMD5Context), #0) +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 basic transformation. Transforms state based on block. } +procedure MD5Transform( + var Buf: array of LongInt; + const Data: array of LongInt); +var + A, B, C, D: LongInt; + + procedure Round1(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (Z xor (X and (Y xor Z))) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; + + procedure Round2(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (Y xor (Z and (X xor Y))) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; + + procedure Round3(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (X xor Y xor Z) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; + + procedure Round4(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (Y xor (X or not Z)) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; +begin + A := Buf[0]; + B := Buf[1]; + C := Buf[2]; + D := Buf[3]; + + Round1(A, B, C, D, Data[ 0] + LongInt($d76aa478), 7); + Round1(D, A, B, C, Data[ 1] + LongInt($e8c7b756), 12); + Round1(C, D, A, B, Data[ 2] + LongInt($242070db), 17); + Round1(B, C, D, A, Data[ 3] + LongInt($c1bdceee), 22); + Round1(A, B, C, D, Data[ 4] + LongInt($f57c0faf), 7); + Round1(D, A, B, C, Data[ 5] + LongInt($4787c62a), 12); + Round1(C, D, A, B, Data[ 6] + LongInt($a8304613), 17); + Round1(B, C, D, A, Data[ 7] + LongInt($fd469501), 22); + Round1(A, B, C, D, Data[ 8] + LongInt($698098d8), 7); + Round1(D, A, B, C, Data[ 9] + LongInt($8b44f7af), 12); + Round1(C, D, A, B, Data[10] + LongInt($ffff5bb1), 17); + Round1(B, C, D, A, Data[11] + LongInt($895cd7be), 22); + Round1(A, B, C, D, Data[12] + LongInt($6b901122), 7); + Round1(D, A, B, C, Data[13] + LongInt($fd987193), 12); + Round1(C, D, A, B, Data[14] + LongInt($a679438e), 17); + Round1(B, C, D, A, Data[15] + LongInt($49b40821), 22); + + Round2(A, B, C, D, Data[ 1] + LongInt($f61e2562), 5); + Round2(D, A, B, C, Data[ 6] + LongInt($c040b340), 9); + Round2(C, D, A, B, Data[11] + LongInt($265e5a51), 14); + Round2(B, C, D, A, Data[ 0] + LongInt($e9b6c7aa), 20); + Round2(A, B, C, D, Data[ 5] + LongInt($d62f105d), 5); + Round2(D, A, B, C, Data[10] + LongInt($02441453), 9); + Round2(C, D, A, B, Data[15] + LongInt($d8a1e681), 14); + Round2(B, C, D, A, Data[ 4] + LongInt($e7d3fbc8), 20); + Round2(A, B, C, D, Data[ 9] + LongInt($21e1cde6), 5); + Round2(D, A, B, C, Data[14] + LongInt($c33707d6), 9); + Round2(C, D, A, B, Data[ 3] + LongInt($f4d50d87), 14); + Round2(B, C, D, A, Data[ 8] + LongInt($455a14ed), 20); + Round2(A, B, C, D, Data[13] + LongInt($a9e3e905), 5); + Round2(D, A, B, C, Data[ 2] + LongInt($fcefa3f8), 9); + Round2(C, D, A, B, Data[ 7] + LongInt($676f02d9), 14); + Round2(B, C, D, A, Data[12] + LongInt($8d2a4c8a), 20); + + Round3(A, B, C, D, Data[ 5] + LongInt($fffa3942), 4); + Round3(D, A, B, C, Data[ 8] + LongInt($8771f681), 11); + Round3(C, D, A, B, Data[11] + LongInt($6d9d6122), 16); + Round3(B, C, D, A, Data[14] + LongInt($fde5380c), 23); + Round3(A, B, C, D, Data[ 1] + LongInt($a4beea44), 4); + Round3(D, A, B, C, Data[ 4] + LongInt($4bdecfa9), 11); + Round3(C, D, A, B, Data[ 7] + LongInt($f6bb4b60), 16); + Round3(B, C, D, A, Data[10] + LongInt($bebfbc70), 23); + Round3(A, B, C, D, Data[13] + LongInt($289b7ec6), 4); + Round3(D, A, B, C, Data[ 0] + LongInt($eaa127fa), 11); + Round3(C, D, A, B, Data[ 3] + LongInt($d4ef3085), 16); + Round3(B, C, D, A, Data[ 6] + LongInt($04881d05), 23); + Round3(A, B, C, D, Data[ 9] + LongInt($d9d4d039), 4); + Round3(D, A, B, C, Data[12] + LongInt($e6db99e5), 11); + Round3(C, D, A, B, Data[15] + LongInt($1fa27cf8), 16); + Round3(B, C, D, A, Data[ 2] + LongInt($c4ac5665), 23); + + Round4(A, B, C, D, Data[ 0] + LongInt($f4292244), 6); + Round4(D, A, B, C, Data[ 7] + LongInt($432aff97), 10); + Round4(C, D, A, B, Data[14] + LongInt($ab9423a7), 15); + Round4(B, C, D, A, Data[ 5] + LongInt($fc93a039), 21); + Round4(A, B, C, D, Data[12] + LongInt($655b59c3), 6); + Round4(D, A, B, C, Data[ 3] + LongInt($8f0ccc92), 10); + Round4(C, D, A, B, Data[10] + LongInt($ffeff47d), 15); + Round4(B, C, D, A, Data[ 1] + LongInt($85845dd1), 21); + Round4(A, B, C, D, Data[ 8] + LongInt($6fa87e4f), 6); + Round4(D, A, B, C, Data[15] + LongInt($fe2ce6e0), 10); + Round4(C, D, A, B, Data[ 6] + LongInt($a3014314), 15); + Round4(B, C, D, A, Data[13] + LongInt($4e0811a1), 21); + Round4(A, B, C, D, Data[ 4] + LongInt($f7537e82), 6); + Round4(D, A, B, C, Data[11] + LongInt($bd3af235), 10); + Round4(C, D, A, B, Data[ 2] + LongInt($2ad7d2bb), 15); + Round4(B, C, D, A, Data[ 9] + LongInt($eb86d391), 21); + + Inc(Buf[0], A); + Inc(Buf[1], B); + Inc(Buf[2], C); + Inc(Buf[3], D); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure MD5UpdateBuffer( + var MD5Context: TMD5Context; + Buffer: Pointer; + BufSize: Integer); +var + BufTmp : PMD5Buffer; + BufPtr : PChar; + Bytes : Word; +begin + New(BufTmp); + BufPtr := Buffer; + try + repeat + if BufSize > MaxBufSize then + Bytes := MaxBufSize + else + Bytes := BufSize; + Move(BufPtr^, BufTmp^, Bytes); + Inc(BufPtr, Bytes); + Dec(BufSize, Bytes); + if Bytes > 0 then + MD5Update(MD5Context, BufTmp^, Bytes); + until Bytes < MaxBufSize; + finally + Dispose(BufTmp); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetMD5(Buffer: Pointer; BufSize: Integer): string; +var + I : Integer; + MD5Digest : TMD5Digest; + MD5Context : TMD5Context; +begin + for I := 0 to 15 do + Byte(MD5Digest[I]) := I + 1; + MD5Init(MD5Context); + MD5UpdateBuffer(MD5Context, Buffer, BufSize); + MD5Final(MD5Digest, MD5Context); + Result := ''; + for I := 0 to 15 do + Result := Result + IntToHex(Byte(MD5Digest[I]), 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function StrMD5(Buffer : String): string; +begin + Result := GetMD5(@Buffer[1], Length(Buffer)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/MbxFile.dcr b/lib/Delphi/Vc32/MbxFile.dcr new file mode 100644 index 00000000..f4f484fe Binary files /dev/null and b/lib/Delphi/Vc32/MbxFile.dcr differ diff --git a/lib/Delphi/Vc32/MbxFile.dcu b/lib/Delphi/Vc32/MbxFile.dcu new file mode 100644 index 00000000..0173bacf Binary files /dev/null and b/lib/Delphi/Vc32/MbxFile.dcu differ diff --git a/lib/Delphi/Vc32/MbxFile.pas b/lib/Delphi/Vc32/MbxFile.pas new file mode 100644 index 00000000..8ff14f44 --- /dev/null +++ b/lib/Delphi/Vc32/MbxFile.pas @@ -0,0 +1,355 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TMbxFile handle the MBX file format (read only) + The MBX file format is used by Microsoft Internet Mail. +Warning: This component is based on my interpretation of the MBX file + format. I did'nt find any info about it. So there may be errors ! + Currently, no provision is made for deleted messages. + If you find a problem, please EMail me a description and attach + the MBX file in error. +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Creation: November 16, 1997 +Version: 1.00 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MbxFile; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, ExtCtrls; + +const + MbxFileVersion = 100; + MSG_SIGNATURE = $7F007F00; + +type + TMbxHeader = packed record + Signature : array [0..3] of char; + Reserved1 : Word; + Reserved2 : Word; + MsgCount : LongInt; + Reserved3 : LongInt; { A MsgCount copy ? } + EndPointer : LongInt; + Reserved4 : array [0..15] of LongInt; + end; + + TMsgHeader = packed record + Signature : LongInt; { $7F007F00 } + MsgNum : LongInt; + MsgSize : LongInt; + Reserved1 : LongInt; + end; + + TCustomMbxHandler = class(TComponent) + protected + FFileHdr : TMbxHeader; + FFileName : String; + FFileStream : TFileStream; + FMsgHeader : TMsgHeader; + FMsgStream : TMemoryStream; + FMsgStreamSize : Integer; + FCurPos : LongInt; + procedure InternalPrior; + procedure ReadNextMessage; + procedure SetActive(newValue : Boolean); + function GetActive : Boolean; + function GetMsgCount : Integer; + function GetMsgNum : Integer; + function GetEof : Boolean; + function GetBof : Boolean; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Open; + procedure Close; + procedure First; + procedure Next; + procedure Prior; + procedure Last; + property FileName : String read FFileName write FFileName; + property Active : Boolean read GetActive write SetActive; + property MsgCount : Integer read GetMsgCount; + property MsgNum : Integer read GetMsgNum; + property MsgStream : TMemoryStream read FMsgStream; + property Eof : Boolean read GetEof; + property Bof : Boolean read GetBof; + end; + + TMbxHandler = class(TCustomMbxHandler) + published + property FileName : String read FFileName write FFileName; + property Active : Boolean read GetActive write SetActive; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TMbxHandler]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomMbxHandler.Create(AOwner : TComponent); +begin + Inherited Create(AOwner); + FMsgStreamSize := 4096; + FMsgStream := TMemoryStream.Create; + FMsgStream.SetSize(FMsgStreamSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomMbxHandler.Destroy; +begin + Close; + FMsgStream.Free; + FMsgStreamSize := 0; + Inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.Open; +begin + Close; + FFileStream := TFileStream.Create(FFileName, fmOpenRead + fmShareDenyNone); + FFileStream.Read(FFileHdr, SizeOf(FFileHdr)); + if FFileHdr.Signature <> 'JMF6' then begin + Close; + raise Exception.Create('Not an EMail file'); + end; + + if MsgCount <= 0 then + Exit; + ReadNextMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.Close; +begin + if Assigned(FFileStream) then begin + FFileStream.Free; + FFileStream := nil; + end;; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.First; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + if MsgCount <= 0 then + Exit; + FFileStream.Position := SizeOf(TMbxHeader); + ReadNextMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.Last; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + if MsgCount <= 0 then + Exit; + FCurPos := FFileStream.Seek(0, soFromEnd); + InternalPrior; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.Next; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + + if Eof then + raise Exception.Create('No more message'); + + ReadNextMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.Prior; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + + if Bof then + raise Exception.Create('No more message'); + InternalPrior; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.ReadNextMessage; +begin + FCurPos := FFileStream.Position; + FFileStream.Read(FMsgHeader, SizeOf(FMsgHeader)); + if FMsgHeader.Signature <> MSG_SIGNATURE then begin + Close; + raise Exception.Create('Invalid signature in message header'); + end; + if FMsgStreamSize <= FMsgHeader.MsgSize then begin + FMsgStreamSize := (((FMsgHeader.MsgSize + 1) div 4096) + 1) * 4096; + FMsgStream.SetSize(FMsgStreamSize); + end; + FMsgStream.Seek(0, soFromBeginning); + FFileStream.Read(FMsgStream.Memory^, FMsgHeader.MsgSize - 16); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.SetActive(newValue : Boolean); +begin + if newValue = Assigned(FFileStream) then + Exit; + if newValue then + Open + else + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomMbxHandler.GetActive : Boolean; +begin + Result := Assigned(FFileStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomMbxHandler.GetMsgCount : Integer; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + Result := FFileHdr.MsgCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomMbxHandler.GetMsgNum : Integer; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + Result := FMsgHeader.MsgNum; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomMbxHandler.GetEof : Boolean; +begin + Result := (not Assigned(FFileStream)) or + (MsgCount <= 0) or (MsgNum >= MsgCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomMbxHandler.GetBof : Boolean; +begin + Result := (not Assigned(FFileStream)) or + (MsgCount <= 0) or (MsgNum <= 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.InternalPrior; +var + NewPos : LongInt; + Buf : PChar; + p : PChar; + More : Boolean; + Sign : LongInt; + Cnt : Integer; +begin + Buf := FMsgStream.Memory; + + Cnt := 4096; + NewPos := FCurPos - Cnt; + More := TRUE; + while More do begin + if NewPos < SizeOf(TMbxHeader) then begin + Cnt := Cnt - SizeOf(TMbxHeader) + NewPos; + NewPos := SizeOf(TMbxHeader); + end; + FFileStream.Position := NewPos; + FFileStream.Read(Buf^, Cnt); + p := Buf + Cnt - 1; + while (p > Buf) do begin + while (p >= Buf) and (p^ <> #$7F) do + Dec(p); + if p^ = #$7F then begin + FFileStream.Position := NewPos + p - Buf - 3; + FFileStream.Read(Sign, SizeOf(Sign)); + if Sign = MSG_SIGNATURE then begin + NewPos := NewPos + p - Buf - 3; + More := FALSE; + Break; + end; + end; + Dec(p); + end; + + if not More then + Break; + + if NewPos <= SizeOf(TMbxHeader) then + break; + + Cnt := 4096; + NewPos := NewPos - Cnt; + end; + FFileStream.Position := NewPos; + ReadNextMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/NntpCli.dcu b/lib/Delphi/Vc32/NntpCli.dcu new file mode 100644 index 00000000..486d3fc3 Binary files /dev/null and b/lib/Delphi/Vc32/NntpCli.dcu differ diff --git a/lib/Delphi/Vc32/NntpCli.pas b/lib/Delphi/Vc32/NntpCli.pas new file mode 100644 index 00000000..c5cc3c14 --- /dev/null +++ b/lib/Delphi/Vc32/NntpCli.pas @@ -0,0 +1,1414 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TNntpCli is a client for the NNTP protocol (RFC-977) +Creation: December 19, 1997 +Version: 1.12 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Dec 30, 1997 V0.91 Bug: StatusCode was not updated for Connect + Added PostingPermited property and ParseListLine procedure as + suggested by J. Peter Mugaas +Dec 31, 1997 V0.92 Added XOVER, LIST OVERVIEW.FMT and DATE commands +Jan 10, 1998 V0.93 Added OnStateChange event as suggested by J. Peter Mugaas + +Jan 13, 1998 V0.94 Added readonly property State +Feb 02, 1998 V0.95 Corrected a message in the Quit method. + Added the NntpCliVersion constant. +Feb 03, 1998 V0.96 Added Authenticate method, UserName and PassWord properties. +Apr 13, 1998 V1.00 Added an intermediate message for OnRequestDone event + Created the Handle property and related WndProc stuff +Apr 21, 1998 V1.01 Corrected buffer overflow in the OnDataAvailable event. + Thanks to Tim Skinner tim@palacecs.demon.co.uk who found that bug. +Sep 29, 1998 V1.02 Checked length of FLastResponse before writing it to stream. + Thanks to Michael Bartos for the hint. +Feb 01, 1999 V1.03 Added nntpConnect to solve connection problem after an + abort. Thanks to Eric Fortier . +Feb 27, 1999 V1.04 Made Connect, Abort and Quit method virtual so that they + can be overriden in descending components. + Checked line length in ParseListLine. +Mar 31, 1999 V1.05 Made all methods virtual. +Aug 14, 1999 V1.06 Implemented MODE READER and XHDR +Aug 20, 1999 V1.07 Revised conditional compilation, adapted for BCB4, set + compile options same as TWSocket. +Jun 18, 2001 V1.08 Use AllocateHWnd and DeallocateHWnd from wsocket. + Renamed property WSocket to CtrlSocket (this require code change + in user application too). +Sep 28, 2002 V1.09 Arnaud SUBTIL changed + WSocketDataAvailable so that it doesn't fail when a line is + longer than the receive buffer. +Oct 26, 2002 V1.10 Fixed double dot problem in GetArticleLineNext. + Thanks to Steve Blinch who found it. + Use TWSocket LineMode to avoid line length limit. + Introduced LineLimit to allow user to limit max line (accepting + unlimited lines can result in a Denial Of Service security hole. +Nov 02, 2002 V1.11 Added OnSendData event, OnRcvdData event, SendCount property + and RcvdCount property to easy progress bar update. +Nov 11, 2002 V1.12 Revised for Delphi 1 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit NntpCli; + +{.DEFINE DUMP} + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$Q-} { Disqble overflow checking } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER130} { C++ Builder V5.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER140} { C++ Builder V6.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, WinProcs, SysUtils, Messages, Classes, Forms, WinSock, WSocket; + +const + NntpCliVersion = 1.12; + CopyRight : String = ' TNntpCli (c) 1997-2002 F. Piette V1.12 '; +{$IFDEF VER80} + { Delphi 1 has a 255 characters string limitation } + NNTP_SND_BUF_SIZE = 255; +{$ELSE} + NNTP_SND_BUF_SIZE = 4096; +{$ENDIF} + WM_NNTP_REQUEST_DONE = WM_USER + 1; + +type + TNntpDisplay = procedure(Sender: TObject; Msg : PChar; Len : Integer) of object; + TNntpState = (nntpNotConnected, nntpDnsLookup, nntpWaitingBanner, + nntpReady, nntpWaitingResponse); + TNntpRequest = (nntpGroup, nntpList, nntpConnect, + nntpPost, nntpHelp, + nntpNewGroups, nntpNewNews, + nntpArticleByNumber, nntpArticleByID, + nntpBodyByID, nntpBodyByNumber, + nntpHeadByID, nntpHeadByNumber, + nntpStatByID, nntpStatByNumber, + nntpNext, nntpLast, + nntpQuit, nntpAbort, + nntpXOver, nntpListOverViewFmt, + nntpDate, nntpAuthenticate, + nntpModeReader, nntpXHdr); + TRequestDone = procedure(Sender: TObject; RqType: TNntpRequest; Error: Word) of object; + + NntpException = class(Exception); + + TNntpCli = class(TComponent) + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Connect; virtual; + procedure Abort; virtual; + procedure Quit; virtual; + procedure Group(NewsGroupName : String); virtual; + procedure ArticleByNumber(Number : Integer; DestStream : TStream); virtual; + procedure ArticleByID(ID : String; DestStream : TStream); virtual; + procedure HeadByNumber(Number : Integer; DestStream : TStream); virtual; + procedure HeadByID(ID : String; DestStream : TStream); virtual; + procedure BodyByNumber(Number : Integer; DestStream : TStream); virtual; + procedure BodyByID(ID : String; DestStream : TStream); virtual; + procedure StatByNumber(Number : Integer); virtual; + procedure StatByID(ID : String); virtual; + procedure Next; virtual; + procedure Last; virtual; { It is really Prior, but RFC-977 call it Last !} + procedure List(DestStream : TStream); virtual; + procedure Post(FromStream : TStream); virtual; + procedure Help(DestStream : TStream); virtual; + procedure Authenticate; virtual; + procedure XOver(Articles : String; DestStream : TStream); virtual; + procedure ListOverViewFmt(DestStream : TStream); virtual; + procedure Date; virtual; + procedure ModeReader; virtual; + procedure XHdr(DestStream : TStream; + Header : String; + Range : String); virtual; + procedure NewGroups(When : TDateTime; + GMTFLag : Boolean; + Distributions : String; + DestStream : TStream); virtual; + procedure NewNews(When : TDateTime; + GMTFLag : Boolean; + NewsGroupName : String; + Distributions : String; + DestStream : TStream); virtual; + protected + FWindowHandle : HWND; +{$IFDEF DUMP} + FDumpStream : TFileStream; + FDumpBuf : String; +{$ENDIF} + FHost : String; + FState : TNntpState; + FWSocket : TWSocket; + FRequest : String; + FRequestType : TNntpRequest; + FRequestDoneFlag : Boolean; + FSentFlag : Boolean; + FStatusCode : Integer; + FSendCount : Integer; { Count sent bytes } + FRcvdCount : Integer; { Count received bytes } + FSendBuffer : array [0..NNTP_SND_BUF_SIZE - 1] of char; + FLastResponse : String; + FLastCmdResponse : String; + FErrorMessage : String; + FArticleEstimated : Integer; + FArticleFirst : Integer; + FArticleLast : Integer; + FArticleNumber : Integer; + FArticleID : String; + FServerDate : TDateTime; + FDataStream : TStream; + FUserName : String; + FPassWord : String; + FLineLimit : Integer; + FNext : procedure of object; + FPostingPermited : Boolean; + FOnSessionConnected : TSessionConnected; + FOnSessionClosed : TSessionClosed; + FOnDataAvailable : TDataAvailable; + FOnRequestDone : TRequestDone; + FOnDisplay : TNntpDisplay; + FOnMessageBegin : TNotifyEvent; + FOnMessageEnd : TNotifyEvent; + FOnMessageLine : TNotifyEvent; + FOnXHdrBegin : TNotifyEvent; + FOnXHdrEnd : TNotifyEvent; + FOnXHdrLine : TNotifyEvent; + FOnStateChange : TNotifyEvent; + FOnSendData : TNotifyEvent; + FOnRcvdData : TNotifyEvent; + procedure SetLineLimit(NewValue : Integer); + procedure WndProc(var MsgRec: TMessage); + procedure WMNntpRequestDone(var msg: TMessage); message WM_NNTP_REQUEST_DONE; + procedure WSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure WSocketSessionConnected(Sender: TObject; Error: Word); + procedure WSocketDataAvailable(Sender: TObject; Error: Word); + procedure WSocketSessionClosed(Sender: TObject; Error: Word); + procedure WSocketDataSent(Sender: TObject; Error: Word); + procedure TriggerRequestDone(Error: Word); virtual; + procedure TriggerStateChange; virtual; + procedure StateChange(NewState : TNntpState); virtual; + procedure SendRequest; virtual; + procedure GroupNext; virtual; + procedure QuitNext; virtual; + procedure XHdrLineNext; virtual; + procedure GetArticleNext; virtual; + procedure GetArticleLineNext; virtual; + procedure GetArticleByNumber(RqType: TNntpRequest; Number : Integer; DestStream : TStream); virtual; + procedure GetArticleByID(RqType: TNntpRequest; ID : String; DestStream : TStream); virtual; + procedure GetArticle(RqType: TNntpRequest; ID : String; DestStream : TStream); virtual; + procedure PostNext; virtual; + procedure PostDone; virtual; + procedure PostBlock; virtual; + procedure PostSendNext; virtual; + procedure DateNext; virtual; + procedure ModeReaderNext; virtual; + procedure XHdrNext; virtual; + procedure AuthenticateNext1; virtual; + procedure AuthenticateNext2; virtual; + procedure TriggerSendData; virtual; + procedure TriggerRcvdData; virtual; + property Handle : HWND read FWindowHandle; + property SendCount : Integer read FSendCount + write FSendCount; + property RcvdCount : Integer read FRcvdCount + write FRcvdCount; + published + property CtrlSocket : TWSocket read FWSocket; + property State : TNntpState read FState; + property Host : String read FHost + write FHost; + property ErrorMessage : String read FErrorMessage; + property LastResponse : String read FLastResponse; + property StatusCode : Integer read FStatusCode; + property PostingPermited : Boolean read FPostingPermited; + property ArticleEstimated : Integer read FArticleEstimated; + property ArticleFirst : Integer read FArticleFirst; + property ArticleLast : Integer read FArticleLast; + property ArticleNumber : Integer read FArticleNumber; + property ArticleID : String read FArticleID; + property ServerDate : TDateTime read FServerDate; + property UserName : String read FUserName + write FUserName; + property PassWord : String read FPassWord + write FPassWord; + property LineLimit : Integer read FLineLimit + write SetLineLimit; + property OnSessionConnected : TSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnDataAvailable : TDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnRequestDone : TRequestDone read FOnRequestDone + write FOnRequestDone; + property OnDisplay : TNntpDisplay read FOnDisplay + write FOnDisplay; + property OnMessageBegin : TNotifyEvent read FOnMessageBegin + write FOnMessageBegin; + property OnMessageEnd : TNotifyEvent read FOnMessageEnd + write FOnMessageEnd; + property OnMessageLine : TNotifyEvent read FOnMessageLine + write FOnMessageLine; + property OnXHdrBegin : TNotifyEvent read FOnXHdrBegin + write FOnXHdrBegin; + property OnXHdrEnd : TNotifyEvent read FOnXHdrEnd + write FOnXHdrEnd; + property OnXHdrLine : TNotifyEvent read FOnXHdrLine + write FOnXHdrLine; + property OnStateChange : TNotifyEvent read FOnStateChange + write FOnStateChange; + { Event intended for progress bar update (send) } + property OnSendData : TNotifyEvent read FOnSendData + write FOnSendData; + { Event intended for progress bar update (receive) } + property OnRcvdData : TNotifyEvent read FOnRcvdData + write FOnRcvdData; + end; + +procedure ParseListLine(const Line : String; + var NewsGroupName : String; + var LastArticle : Integer; + var FirstArticle : Integer; + var PostingFlag : Char); +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Step over blank spaces } +function StpBlk(Data : PChar) : PChar; +begin + Result := Data; + if Result <> nil then begin + while (Result^ <> #0) and (Result^ in [' ', #9, #13, #10]) do + Inc(Result); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetInteger(Data : PChar; var Number : Integer) : PChar; +var + bSign : Boolean; +begin + Number := 0; + Result := StpBlk(Data); + + if (Result = nil) then + Exit; + + { Remember the sign } + if Result^ in ['-', '+'] then begin + bSign := (Result^ = '-'); + Inc(Result); + end + else + bSign := FALSE; + + { Convert any number } + while (Result^ <> #0) and (Result^ in ['0'..'9']) do begin + Number := Number * 10 + ord(Result^) - ord('0'); + Inc(Result); + end; + + { Correct for sign } + if bSign then + Number := -Number; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetMessageID(Data : PChar; var ID : String) : PChar; +begin + ID := ''; + Result := StpBlk(Data); + if Data = nil then + Exit; + + while not (Result^ in [#0, '<']) do + Inc(Result); + if Result^ = '<' then begin + while Result^ <> #0 do begin + Inc(Result); + if Result^ = '>' then + break; + ID := ID + Result^; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetNewsGroupName(Data : PChar; var GroupName : String) : PChar; +begin + GroupName := ''; + Result := StpBlk(Data); + if Data = nil then + Exit; + + { Copy until first white space } + while (Result^ <> #0) and (not (Result^ in [' ', #9])) do begin + GroupName := GroupName + Result^; + Inc(Result); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetChar(Data : PChar; var Ch : Char) : PChar; +begin + Ch := #0; + Result := StpBlk(Data); + if Data = nil then + Exit; + + Ch := Result^; + if Ch <> #0 then + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(Data : String) : Integer; +begin +{$IFDEF VER80} + { Nul terminate string for Delphi 1 } + Data[Length(Data) + 1] := #0; +{$ENDIF} + GetInteger(@Data[1], Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TNntpCli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TNntpCli.Create(AOwner: TComponent); +begin + inherited Create(AOwner); +{$IFDEF DUMP} + FDumpStream := TFileStream.Create('c:\temp\nntpcli.log', fmCreate); + FDumpBuf := '---- START -----' + #13 + #10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} + FWindowHandle := WSocket.AllocateHWnd(WndProc); + FState := nntpNotConnected; + FArticleNumber := -1; + FArticleID := ''; + FArticleFirst := -1; + FArticleLast := -1; + FArticleEstimated := -1; + FStatusCode := 503; { program fault } +{$IFDEF VER80} + FLineLimit := 255; +{$ELSE} + FLineLimit := 65536; +{$ENDIF} + FWSocket := TWSocket.Create(Self); + FWSocket.LineMode := TRUE; + FWSocket.LineEnd := #13#10; + FWSocket.LineLimit := FLineLimit; + FWSocket.ComponentOptions := FWSocket.ComponentOptions + [wsoNoReceiveLoop]; + FWSocket.OnSessionConnected := WSocketSessionConnected; + FWSocket.OnDataAvailable := WSocketDataAvailable; + FWSocket.OnSessionClosed := WSocketSessionClosed; + FWSocket.OnDnsLookupDone := WSocketDnsLookupDone; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TNntpCli.Destroy; +begin +{$IFDEF DUMP} + if Assigned(FDumpStream) then begin + FDumpBuf := '---- STOP -----' + #13 + #10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.Destroy; + end; +{$ENDIF} + if Assigned(FWSocket) then + FWSocket.Destroy; + WSocket.DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.SetLineLimit(NewValue: Integer); +begin + if FLineLimit <> NewValue then begin + FLineLimit := NewValue; + FWSocket.LineLimit := FLineLimit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + case Msg of + WM_NNTP_REQUEST_DONE : WMNntpRequestDone(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WMNntpRequestDone(var msg: TMessage); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, TNntpRequest(Msg.WParam), Msg.LParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.StateChange(NewState : TNntpState); +begin + if FState <> NewState then begin + FState := NewState; + TriggerStateChange; + end; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.SendRequest; +begin + FLastCmdResponse := ''; +{$IFDEF DUMP} + FDumpBuf := '<|'; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.WriteBuffer(FRequest[1], Length(FRequest)); + FDumpBuf := '|' + #13#10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} + FWSocket.SendStr(FRequest + #13 + #10); + FSendCount := (FSendCount + Length(FRequest) + 2) and $7FFFFFF; + TriggerSendData; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Connect; +begin + if FState <> nntpNotConnected then + raise NntpException.Create('Already connected'); + + FRequestType := nntpConnect; + FRequestDoneFlag := FALSE; + FRequest := ''; + FArticleNumber := -1; + FArticleID := ''; + FArticleFirst := -1; + FArticleLast := -1; + FArticleEstimated := -1; + StateChange(nntpDnsLookup); + FWSocket.DnsLookup(FHost); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Group(NewsGroupName : String); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for GROUP'); + + FRequestDoneFlag := FALSE; + FRequestType := nntpGroup; + FRequest := 'GROUP ' + Trim(NewsGroupName); + FNext := GroupNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GroupNext; +var + Data : PChar; + Error : Integer; +begin + Data := GetInteger(@FLastResponse[1], FStatusCode); + Data := GetInteger(Data, FArticleEstimated); + Data := GetInteger(Data, FArticleFirst); + GetInteger(Data, FArticleLast); + if FStatusCode = 211 then + Error := 0 + else + Error := FStatusCode; + TriggerRequestDone(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.ArticleByNumber(Number : Integer; DestStream : TStream); +begin + GetArticleByNumber(nntpArticleByNumber, Number, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.ArticleByID(ID : String; DestStream : TStream); +begin + GetArticleByID(nntpArticleByID, ID, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.BodyByNumber(Number : Integer; DestStream : TStream); +begin + GetArticleByNumber(nntpBodyByNumber, Number, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.BodyByID(ID : String; DestStream : TStream); +begin + GetArticleByID(nntpBodyByID, ID, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.HeadByNumber(Number : Integer; DestStream : TStream); +begin + GetArticleByNumber(nntpHeadByNumber, Number, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.HeadByID(ID : String; DestStream : TStream); +begin + GetArticleByID(nntpHeadByID, ID, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.StatByNumber(Number : Integer); +begin + GetArticleByNumber(nntpStatByNumber, Number, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.StatByID(ID : String); +begin + GetArticleByID(nntpStatByID, ID, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GetArticleByID( + RqType : TNntpRequest; + ID : String; + DestStream : TStream); +begin + GetArticle(RqType, ' <' + ID + '>', DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GetArticleByNumber( + RqType : TNntpRequest; + Number : Integer; + DestStream : TStream); +begin + if Number > 0 then + GetArticle(RqType, ' ' + IntToStr(Number), DestStream) + else + GetArticle(RqType, '', DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GetArticle( + RqType : TNntpRequest; + ID : String; + DestStream : TStream); +var + Cmd : String; +begin + case RqType of + nntpArticleByID, nntpArticleByNumber: + Cmd := 'ARTICLE'; + nntpBodyByID, nntpBodyByNumber: + Cmd := 'BODY'; + nntpHeadByID, nntpHeadByNumber: + Cmd := 'HEAD'; + nntpStatByID, nntpStatByNumber: + Cmd := 'STAT'; + else + raise NntpException.Create('Internal error: Invalid Request Type'); + end; + + if FState <> nntpReady then + raise NntpException.Create('Not ready for ' + Cmd); + FDataStream := DestStream; + FRequestType := RqType; + FRequestDoneFlag := FALSE; + FArticleNumber := -1; + FArticleID := ''; + FRequest := Cmd + ID; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GetArticleNext; +var + Data : PChar; +begin + Data := GetInteger(@FLastResponse[1], FStatusCode); + if not (FStatusCode in [100, 215, 220, 221, + 222, 223, 224, 231]) then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + + Data := GetInteger(Data, FArticleNumber); + GetMessageID(Data, FArticleID); + + if FStatusCode in [223] then + TriggerRequestDone(0) + else begin + FNext := GetArticleLineNext; + FLastCmdResponse := FLastResponse;; + StateChange(nntpWaitingResponse); + + if Assigned(FOnMessageBegin) then + FOnMessageBegin(Self); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GetArticleLineNext; +const + CrLf : String[2] = #13#10; +begin + if FLastResponse = '.' then begin + if FLastCmdResponse <> '' then begin + FLastResponse := FLastCmdResponse; + FLastCmdResponse := ''; + end; + if Assigned(FOnMessageEnd) then + FOnMessageEnd(Self); + TriggerRequestDone(0); + end + else begin + if (Length(FLastResponse) > 1) and { 26/10/02 } + (FLastResponse[1] ='.') and (FLastResponse[2] ='.') then + Delete(FLastResponse, 1, 1); + if Assigned(FDataStream) then begin + if Length(FLastResponse) > 0 then + FDataStream.Write(FLastResponse[1], Length(FLastResponse)); + FDataStream.Write(CrLf[1], Length(CrLf)); + end; + if Assigned(FOnMessageLine) then + FOnMessageLine(Self); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Next; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for NEXT'); + FRequestDoneFlag := FALSE; + FRequestType := nntpNext; + FArticleNumber := -1; + FArticleID := ''; + FRequest := 'NEXT'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Last; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for LAST'); + FRequestDoneFlag := FALSE; + FRequestType := nntpLast; + FArticleNumber := -1; + FArticleID := ''; + FRequest := 'LAST'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.List(DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for LIST'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpList; + FRequest := 'LIST'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Help(DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for HELP'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpHelp; + FRequest := 'HELP'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Quit; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for QUIT'); + FRequestDoneFlag := FALSE; + FRequestType := nntpQuit; + FRequest := 'QUIT'; + FNext := QuitNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.QuitNext; +begin + GetInteger(@FLastResponse[1], FStatusCode); + TriggerRequestDone(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Abort; +begin + FRequestType := nntpAbort; + FWSocket.Close; + FLastResponse := '205 Closing connection - goodbye'; + FStatusCode := 205; + FRequestDoneFlag := FALSE; + TriggerRequestDone(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Post(FromStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for POST'); + FDataStream := FromStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpPost; + FRequest := 'POST'; + FSentFlag := FALSE; + FNext := PostNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.PostNext; +begin + GetInteger(@FLastResponse[1], FStatusCode); + if FStatusCode <> 340 then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + FNext := PostSendNext; + FWSocket.OnDataSent := WSocketDataSent; + PostBlock; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.PostBlock; +var + Len : Integer; +begin + Len := FDataStream.Read(FSendBuffer, SizeOf(FSendBuffer)); + if Len <= 0 then begin + if FSentFlag then + Exit; + FSentFlag := TRUE; + StrCopy(@FSendBuffer, #13#10 + '.' + #13#10); + Len := 5; + end; + FWSocket.Send(@FSendBuffer, Len); + Inc(FSendCount, Len); + TriggerSendData; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.PostSendNext; +begin + FWSocket.OnDataSent := nil; + GetInteger(@FLastResponse[1], FStatusCode); + if FStatusCode = 240 then + TriggerRequestDone(0) + else + TriggerRequestDone(FStatusCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.PostDone; +begin + FLastResponse := '441 posting failed'; + PostSendNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.NewGroups( + When : TDateTime; + GMTFLag : Boolean; + Distributions : String; + DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for NEWGROUPS'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpNewGroups; + if When = 0 then + When := Now; + FRequest := 'NEWGROUPS ' + FormatDateTime('yymmdd hhnnss', When); + if GMTFlag then + FRequest := FRequest + ' GMT'; + if Length(Distributions) > 0 then + FRequest := FRequest + ' <' + Distributions + '>'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.NewNews( + When : TDateTime; + GMTFLag : Boolean; + NewsGroupName : String; + Distributions : String; + DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for NEWNEWS'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpNewNews; + if When = 0 then + When := Now; + if NewsGroupName = '' then + NewsGroupName := '*'; + FRequest := 'NEWNEWS ' + NewsGroupName + ' ' + + FormatDateTime('yymmdd hhnnss', When); + if GMTFlag then + FRequest := FRequest + ' GMT'; + if Length(Distributions) > 0 then + FRequest := FRequest + ' <' + Distributions + '>'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Articles can be: a) a single (positive) article number } +{ b) an article number followed by a dash } +{ c) two article numbers separated by a dash } +procedure TNntpCli.XOver( + Articles : String; + DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for XOVER'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpXOver; + FRequest := 'XOVER ' + Articles; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.ListOverViewFmt(DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for LIST OVERVIEW.FMT'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpListOverViewFmt; + FRequest := 'LIST OVERVIEW.FMT'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.DateNext; +var + Data : PChar; + Buf : String; + Year, Month, Day, Hour, Min, Sec : Word; +begin + Data := StpBlk(GetInteger(@FLastResponse[1], FStatusCode)); + if FStatusCode <> 111 then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + Buf := Trim(StrPas(Data)); + if Length(Buf) = 14 then begin + Year := atoi(Copy(Buf, 1, 4)); + Month := atoi(Copy(Buf, 5, 2)); + Day := atoi(Copy(Buf, 7, 2)); + Hour := atoi(Copy(Buf, 9, 2)); + Min := atoi(Copy(Buf, 11, 2)); + Sec := atoi(Copy(Buf, 13, 2)); + FServerDate := EncodeDate(Year, Month, Day) + + EncodeTime(Hour, Min, Sec, 0); + end; + TriggerRequestDone(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Date; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for DATE'); + FServerDate := 0; + FDataStream := nil; + FRequestDoneFlag := FALSE; + FRequestType := nntpDate; + FRequest := 'DATE'; + FNext := DateNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.ModeReaderNext; +begin + GetInteger(@FLastResponse[1], FStatusCode); + if FStatusCode in [200, 201] then + TriggerRequestDone(0) + else + TriggerRequestDone(FStatusCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.ModeReader; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for ModeReader'); + FServerDate := 0; + FDataStream := nil; + FRequestDoneFlag := FALSE; + FRequestType := nntpModeReader; + FRequest := 'MODE READER'; + FNext := ModeReaderNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.XHdrLineNext; +const + CrLf : String[2] = #13#10; +begin + if FLastResponse = '.' then begin + if FLastCmdResponse <> '' then begin + FLastResponse := FLastCmdResponse; + FLastCmdResponse := ''; + end; + if Assigned(FOnXHdrEnd) then + FOnXHdrEnd(Self); + TriggerRequestDone(0); + end + else begin + if Assigned(FDataStream) then begin + if Length(FLastResponse) > 0 then + FDataStream.Write(FLastResponse[1], Length(FLastResponse)); + FDataStream.Write(CrLf[1], Length(CrLf)); + end; + if Assigned(FOnXHdrLine) then + FOnXHdrLine(Self); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.XHdrNext; +begin + GetInteger(@FLastResponse[1], FStatusCode); + if FStatusCode <> 221 then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + + FNext := XHdrLineNext; + FLastCmdResponse := FLastResponse;; + StateChange(nntpWaitingResponse); + + if Assigned(FOnXHdrBegin) then + FOnXHdrBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Header is a header line such as "subject". } +{ Range is either: } +{ an article number } +{ an article number followed by a dash to indicate all following } +{ an article number followed by a dash followed by another article number } +{ Range can be replaced by a message id. } +{ If range is empty current article is used. } +procedure TNntpCli.XHdr(DestStream : TStream; Header : String; Range : String); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for XHDR'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpXHdr; + FRequest := 'XHDR ' + Header; + if Length(Range) > 0 then + Frequest := FRequest + ' ' + Range; + FNext := XHdrNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.AuthenticateNext1; +begin + StpBlk(GetInteger(@FLastResponse[1], FStatusCode)); + if FStatusCode <> 381 then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + FRequestDoneFlag := FALSE; + FRequest := 'AUTHINFO PASS ' + FPassWord; + FNext := AuthenticateNext2; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.AuthenticateNext2; +begin + StpBlk(GetInteger(@FLastResponse[1], FStatusCode)); + if FStatusCode <> 281 then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + TriggerRequestDone(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Authenticate; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for DATE'); + FRequestDoneFlag := FALSE; + FRequestType := nntpAuthenticate; + FRequest := 'AUTHINFO USER ' + FUserName; + FNext := AuthenticateNext1; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure ParseListLine( + const Line : String; + var NewsGroupName : String; + var LastArticle : Integer; + var FirstArticle : Integer; + var PostingFlag : Char); +var + Data : PChar; +begin + if Length(Line) = 0 then + Exit; + Data := GetNewsGroupName(@Line[1], NewsGroupName); + Data := GetInteger(Data, LastArticle); + Data := GetInteger(Data, FirstArticle); + GetChar(Data, PostingFlag); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WSocketDataSent(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + PostDone; + Exit; + end; + PostBlock; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then + TriggerRequestDone(Error) + else begin + FWSocket.Addr := FWSocket.DnsResult; + FWSocket.Proto := 'tcp'; + FWSocket.Port := 'nntp'; + StateChange(nntpWaitingBanner); + FWSocket.Connect; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WSocketSessionConnected(Sender: TObject; Error: Word); +begin + { Do not trigger the client SessionConnected from here. We must wait } + { to have received the server banner. } + if Error <> 0 then begin + TriggerRequestDone(Error); + FWSocket.Close + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; +begin + Len := FWSocket.RcvdCount; + if Len < 0 then + Exit; + + if Len = 0 then begin + FWSocket.Close; + Exit; + end; + + { We use line mode, we will receive complete lines } + FLastResponse := FWSocket.ReceiveStr; + FRcvdCount := (FRcvdCount + Length(FLastResponse)) and $7FFFFFF; + TriggerRcvdData; + + { Remove ending CR/LF, if any } + if (Length(FLastResponse) >= 1) and + (FLastResponse[Length(FLastResponse)] = #10) then + SetLength(FLastResponse, Length(FLastResponse) - 1); + if (Length(FLastResponse) >= 1) and + (FLastResponse[Length(FLastResponse)] = #13) then + SetLength(FLastResponse, Length(FLastResponse) - 1); + + if FRequestType = nntpAbort then + Exit; + + if Assigned(FOnDisplay) then + FOnDisplay(Self, @FLastResponse[1], Length(FLastResponse)); + +{$IFDEF VER80} + { Add a nul byte at the end of string for Delphi 1 } + FLastResponse[Length(FLastResponse) + 1] := #0; +{$ENDIF} + if FState = nntpWaitingBanner then begin + StateChange(nntpReady); + GetInteger(@FLastResponse[1], FStatusCode); + FPostingPermited := (FStatusCode = 200); + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); + end + else if FState = nntpWaitingResponse then begin + if Assigned(FNext) then + FNext + else + StateChange(nntpReady); + end + else begin + if Assigned(FOnDataAvailable) then + FOnDataAvailable(Self, Error); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WSocketSessionClosed(Sender: TObject; Error: Word); +begin + if not (FRequestType in [nntpAbort]) then + TriggerRequestDone(Error); + if Assigned(FOnSessionClosed) then + OnSessionClosed(Self, Error); + StateChange(nntpNotConnected); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.TriggerStateChange; +begin + if Assigned(FOnStateChange) then + FOnStateChange(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.TriggerRequestDone(Error: Word); +begin + if FRequestDoneFlag = FALSE then + PostMessage(Handle, WM_NNTP_REQUEST_DONE, WORD(FRequestType), Error); + FRequestDoneFlag := TRUE; + FNext := nil; + if FWSocket.State = wsConnected then + StateChange(nntpReady) + else + StateChange(nntpNotConnected); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.TriggerSendData; +begin + if Assigned(FOnSendData) then + FOnSendData(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.TriggerRcvdData; +begin + if Assigned(FOnRcvdData) then + FOnRcvdData(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/POP3CLI.DCR b/lib/Delphi/Vc32/POP3CLI.DCR new file mode 100644 index 00000000..81cf1d0c Binary files /dev/null and b/lib/Delphi/Vc32/POP3CLI.DCR differ diff --git a/lib/Delphi/Vc32/Ping.dcu b/lib/Delphi/Vc32/Ping.dcu new file mode 100644 index 00000000..f4988178 Binary files /dev/null and b/lib/Delphi/Vc32/Ping.dcu differ diff --git a/lib/Delphi/Vc32/Ping.pas b/lib/Delphi/Vc32/Ping.pas new file mode 100644 index 00000000..ca8c9ccb --- /dev/null +++ b/lib/Delphi/Vc32/Ping.pas @@ -0,0 +1,603 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This unit encapsulate the ICMP.DLL into a VCL of type TPing. + Using this object, you can easily ping any host on your network. + Works only in 32 bits mode (no Delphi 1) under NT or 95. + If you wants to build a console mode program, use the TICMP + object. You'll have a much smaller program. +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Creation: January 6, 1997 +Version: 1.11 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 - 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Nov 30, 1997 V1.00 Added DNSLookup capability (taken from TWSocket) +Dec 13, 1997 V1.01 Added OnEchoRequest and OnEchoReply events and removed the + corresponding OnDisplay event. This require to modify existing + programs. +May 05, 1998 V1.02 Changed lpszClassName from 'XSocketWindowClass' to + 'ICSPingWindowClass' to avoid class name conflict with TWSocket. + Thanks to Bill Parke who found the + problem. +Dec 26, 1998 V1.10 Changed all events to make sender reference TPing object + and added an argument 'Icmp' which point to the underlaying TIcmp + object (this was the sender in previous version). This require + modification of existing code. +Jan 24, 1999 V1.11 Surfaced Flags property to allow fragmentation check + (Flags = $02 to enable fragmentation check) +Nov 10, 2002 V1.12 Changed argument name from Error to Status in OnEchoReply + to better reflect his use. 0 means OK ! + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Ping; + +{$IFDEF VER80} +// This source file is *NOT* compatible with Delphi 1 because it uses +// Win 32 features. +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, Winsock, Icmp; + +const + PingVersion = 111; + CopyRight : String = ' TPing (c) 1997-2000 F. Piette V1.11 '; + WM_ASYNCGETHOSTBYNAME = WM_USER + 2; + +type + TDnsLookupDone = procedure (Sender: TObject; Error: Word) of object; + TPingDisplay = procedure(Sender: TObject; Icmp: TObject; Msg : String) of object; + TPingReply = procedure(Sender: TObject; Icmp: TObject; Status : Integer) of object; + TPingRequest = procedure(Sender: TObject; Icmp: TObject) of object; + TPing = class(TComponent) + private + FIcmp : TICMP; + FWindowHandle : HWND; + FDnsLookupBuffer : array [0..MAXGETHOSTSTRUCT] of char; + FDnsLookupHandle : THandle; + FDnsResult : String; + FOnDnsLookupDone : TDnsLookupDone; + FOnEchoRequest : TPingRequest; + FOnEchoReply : TPingReply; + FOnDisplay : TPingDisplay; + protected + procedure WndProc(var MsgRec: TMessage); + procedure WMAsyncGetHostByName(var msg: TMessage); message WM_ASYNCGETHOSTBYNAME; + procedure SetAddress(Value : String); + function GetAddress : String; + procedure SetSize(Value : Integer); + function GetSize : Integer; + procedure SetTimeout(Value : Integer); + function GetTimeout : Integer; + function GetReply : TIcmpEchoReply; + function GetErrorCode : Integer; + function GetErrorString : String; + function GetHostName : String; + function GetHostIP : String; + procedure SetTTL(Value : Integer); + function GetTTL : Integer; + procedure Setflags(Value : Integer); + function Getflags : Integer; +// procedure SetOnDisplay(Value : TICMPDisplay); +// function GetOnDisplay : TICMPDisplay; +// procedure SetOnEchoRequest(Value : TNotifyEvent); +// function GetOnEchoRequest : TNotifyEvent; +// procedure SetOnEchoReply(Value : TICMPReply); +// function GetOnEchoReply : TICMPReply; + procedure IcmpEchoReply(Sender: TObject; Error : Integer); + procedure IcmpEchoRequest(Sender: TObject); + procedure IcmpDisplay(Sender: TObject; Msg: String); + public + constructor Create(Owner : TComponent); override; + destructor Destroy; override; + function Ping : Integer; + procedure DnsLookup(HostName : String); virtual; + procedure CancelDnsLookup; + + property Reply : TIcmpEchoReply read GetReply; + property ErrorCode : Integer read GetErrorCode; + property ErrorString : String read GetErrorString; + property HostName : String read GetHostName; + property HostIP : String read GetHostIP; + property Handle : HWND read FWindowHandle; + property DnsResult : String read FDnsResult; + published + property Address : String read GetAddress + write SetAddress; + property Size : Integer read GetSize + write SetSize; + property Timeout : Integer read GetTimeout + write SetTimeout; + property TTL : Integer read GetTTL + write SetTTL; + property Flags : Integer read Getflags + write SetFlags; + property OnDisplay : TPingDisplay read FOnDisplay + write FOnDisplay; + property OnEchoRequest : TPingRequest read FOnEchoRequest + write FOnEchoRequest; + property OnEchoReply : TPingReply read FOnEchoReply + write FOnEchoReply; + property OnDnsLookupDone : TDnsLookupDone + read FOnDnsLookupDone + write FOnDnsLookupDone; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('fpiette', [TPing]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function XSocketWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TPing; + MsgRec : TMessage; +begin + { At window creation ask windows to store a pointer to our object } + Obj := TPing(GetWindowLong(ahWnd, 0)); + + { If the pointer is not assigned, just call the default procedure } + if not Assigned(Obj) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass paramter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + Obj.WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This global variable is used to store the windows class characteristic } +{ and is needed to register the window class used by TWSocket } +var + XSocketWindowClass: TWndClass = ( + style : 0; + lpfnWndProc : @XSocketWindowProc; + cbClsExtra : 0; + cbWndExtra : SizeOf(Pointer); + hInstance : 0; + hIcon : 0; + hCursor : 0; + hbrBackground : 0; + lpszMenuName : nil; + lpszClassName : 'ICSPingWindowClass'); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Allocate a window handle. This means registering a window class the first } +{ time we are called, and creating a new window each time we are called. } +function XSocketAllocateHWnd(Obj : TObject): HWND; +var + TempClass : TWndClass; + ClassRegistered : Boolean; +begin + { Check if the window class is already registered } + XSocketWindowClass.hInstance := HInstance; + ClassRegistered := GetClassInfo(HInstance, + XSocketWindowClass.lpszClassName, + TempClass); + if not ClassRegistered then begin + { Not yet registered, do it right now } + Result := Windows.RegisterClass(XSocketWindowClass); + if Result = 0 then + Exit; + end; + + { Now create a new window } + Result := CreateWindowEx(WS_EX_TOOLWINDOW, + XSocketWindowClass.lpszClassName, + '', { Window name } + WS_POPUP, { Window Style } + 0, 0, { X, Y } + 0, 0, { Width, Height } + 0, { hWndParent } + 0, { hMenu } + HInstance, { hInstance } + nil); { CreateParam } + + { if successfull, the ask windows to store the object reference } + { into the reserved byte (see RegisterClass) } + if (Result <> 0) and Assigned(Obj) then + SetWindowLong(Result, 0, Integer(Obj)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Free the window handle } +procedure XSocketDeallocateHWnd(Wnd: HWND); +begin + DestroyWindow(Wnd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + if Msg = WM_ASYNCGETHOSTBYNAME then + WMAsyncGetHostByName(MsgRec) + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.WMAsyncGetHostByName(var msg: TMessage); +var + Phe : Phostent; + IPAddr : TInAddr; + Error : Word; +begin + if msg.wParam <> LongInt(FDnsLookupHandle) then + Exit; + FDnsLookupHandle := 0; + Error := Msg.LParamHi; + if Error = 0 then begin + Phe := PHostent(@FDnsLookupBuffer); + IPAddr := PInAddr(Phe^.h_addr_list^)^; + FDnsResult := StrPas(inet_ntoa(IPAddr)); + end; + if Assigned(FOnDnsLookupDone) then + FOnDnsLookupDone(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TPing.Create(Owner : TComponent); +begin + Inherited Create(Owner); + FIcmp := TICMP.Create; + FIcmp.OnDisplay := IcmpDisplay; + FIcmp.OnEchoRequest := IcmpEchoRequest; + FIcmp.OnEchoReply := IcmpEchoReply; + { Delphi 32 bits has threads and VCL is not thread safe. } + { We need to do our own way to be thread safe. } + FWindowHandle := XSocketAllocateHWnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TPing.Destroy; +begin + CancelDnsLookup; { Cancel any pending dns lookup } + XSocketDeallocateHWnd(FWindowHandle); + if Assigned(FIcmp) then begin + FIcmp.Destroy; + FIcmp := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.IcmpDisplay(Sender: TObject; Msg: String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Sender, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.IcmpEchoReply(Sender: TObject; Error : Integer); +begin + if Assigned(FOnEchoReply) then + FOnEchoReply(Self, Sender, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.IcmpEchoRequest(Sender: TObject); +begin + if Assigned(FOnEchoRequest) then + FOnEchoRequest(Self, Sender); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.Ping : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.Ping + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.CancelDnsLookup; +begin + if FDnsLookupHandle = 0 then + Exit; + if WSACancelAsyncRequest(FDnsLookupHandle) <> 0 then + raise Exception.CreateFmt('WSACancelAsyncRequest failed, error #%d', + [WSAGetLastError]); + FDnsLookupHandle := 0; + if Assigned(FOnDnsLookupDone) then + FOnDnsLookupDone(Self, WSAEINTR); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.DnsLookup(HostName : String); +var + IPAddr : TInAddr; +begin + { Cancel any pending lookup } + if FDnsLookupHandle <> 0 then + WSACancelAsyncRequest(FDnsLookupHandle); + + FDnsResult := ''; + + IPAddr.S_addr := Inet_addr(@HostName[1]); + if IPAddr.S_addr <> u_long(INADDR_NONE) then begin + FDnsResult := StrPas(inet_ntoa(IPAddr)); + if Assigned(FOnDnsLookupDone) then + FOnDnsLookupDone(Self, 0); + Exit; + end; + + FDnsLookupHandle := WSAAsyncGetHostByName(FWindowHandle, + WM_ASYNCGETHOSTBYNAME, + @HostName[1], + @FDnsLookupBuffer, + SizeOf(FDnsLookupBuffer)); + if FDnsLookupHandle = 0 then + raise Exception.CreateFmt( + '%s: can''t start DNS lookup, error #%d', + [HostName, WSAGetLastError]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetAddress(Value : String); +begin + if Assigned(FIcmp) then + FIcmp.Address := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetAddress : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.Address + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetSize(Value : Integer); +begin + if Assigned(FIcmp) then + FIcmp.Size := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetSize : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.Size + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetTimeout(Value : Integer); +begin + if Assigned(FIcmp) then + FIcmp.Timeout := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetTimeout : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.Timeout + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetTTL(Value : Integer); +begin + if Assigned(FIcmp) then + FIcmp.TTL := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetTTL : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.TTL + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetFlags(Value : Integer); +begin + if Assigned(FIcmp) then + FIcmp.Flags := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetFlags : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.flags + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetReply : TIcmpEchoReply; +begin + if Assigned(FIcmp) then + Result := FIcmp.Reply + else + FillChar(Result, SizeOf(Result), 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetErrorCode : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.ErrorCode + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetErrorString : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.ErrorString + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetHostName : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.HostName + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetHostIP : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.HostIP + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{procedure TPing.SetOnDisplay(Value : TICMPDisplay); +begin + if Assigned(FIcmp) then + FIcmp.OnDisplay := Value; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{function TPing.GetOnDisplay : TICMPDisplay; +begin + if Assigned(FIcmp) then + Result := FIcmp.OnDisplay + else + Result := nil; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{procedure TPing.SetOnEchoRequest(Value : TNotifyEvent); +begin + if Assigned(FIcmp) then + FIcmp.OnEchoRequest := Value; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{function TPing.GetOnEchoRequest : TNotifyEvent; +begin + if Assigned(FIcmp) then + Result := FIcmp.OnEchoRequest + else + Result := nil; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{procedure TPing.SetOnEchoReply(Value : TICMPReply); +begin + if Assigned(FIcmp) then + FIcmp.OnEchoReply := Value; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{function TPing.GetOnEchoReply : TICMPReply; +begin + if Assigned(FIcmp) then + Result := FIcmp.OnEchoReply + else + Result := nil; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/Pop3Prot.dcr b/lib/Delphi/Vc32/Pop3Prot.dcr new file mode 100644 index 00000000..28494179 Binary files /dev/null and b/lib/Delphi/Vc32/Pop3Prot.dcr differ diff --git a/lib/Delphi/Vc32/Pop3Prot.dcu b/lib/Delphi/Vc32/Pop3Prot.dcu new file mode 100644 index 00000000..f754a6e6 Binary files /dev/null and b/lib/Delphi/Vc32/Pop3Prot.dcu differ diff --git a/lib/Delphi/Vc32/Pop3Prot.pas b/lib/Delphi/Vc32/Pop3Prot.pas new file mode 100644 index 00000000..51813b11 --- /dev/null +++ b/lib/Delphi/Vc32/Pop3Prot.pas @@ -0,0 +1,1776 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: TPop3Cli class implements the POP3 protocol + (RFC-1225, RFC-1939) +Creation: 03 october 1997 +Version: 2.15 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Sept 09, 1997 Modified TOP to be able to request 0 lines (bug reported by + damien@jetman.demon.co.uk) +Oct 10, 1997 V1.10. Published ProtocolState property, made TOP command + complies with RFC-1939 as suggested by damien@jetman.demon.co.uk + Implemented the UIDL command. +Oct 11, 1997 V1.11 Implemented the APOP command, but not tested because no + server available to test it. + Made internal error message look like POP3 error messages (-ERR) +Oct 28, 1997 V1.12 Modified TWSocket to handle line buffer overflow and + TPop3Client to handle that in GetMultiLine. +Jan 10, 1998 V1.13 Made FWSocket accessible with a read only property. This + eases DNSLookup without a supplementary TWSocket. + Added a Port property. +Apr 01, 1998 V1.14 Adapted for BCB V3 +May 05, 1998 V1.15 Changed GetMultiLine to correctly handle double dots at + line start. +Jun 01, 1998 V1.16 Ben Robinson found that Last did'nt + update MsgNum and MsgSize. +Aug 05, 1998 V2.00 New asynchronous version. +Sep 19, 1998 V2.01 Corrected WSocketDataAvailable to count for the added + nul byte at the end of buffer. +Nov 28, 1998 V2.02 Corrected exception triggered using highlevel function + when connection or DNS lookup failed (for example using Open). +Dec 03, 1998 V2.03 Added SetErrorMessage in WSocketSessionConnected. +Dec 22, 1998 V2.04 Handle exception when connecting (will be triggered when + an invalid port has been given). +Feb 27, 1999 V2.05 Adde State property. +Mar 07, 1999 V2.06 Made public property Connected. +Aug 20, 1999 V2.07 Revised conditional compilation, adapted for BCB4, set + compile options same as TWSocket. +Dec 26, 1999 V2.08 Makes OnRequestDone properly called after a QUIT command. + Special thanks to roger.morton@dial.pipex.com for his work + about that problem. +Jul 22, 2000 V2.09 Checked for buffer overflow in WSocketDataAvailable + as suggested by Jeroen Stolting +Nov 11, 2000 V2.10 Made ClearErrorMessage public. Cleared ErrorMessage when + connecting. Thanks to Jeroen Nijk for pointing + to problem. +Nov 25, 2000 V2.11 Converted MD5 digest to lower case before sending to the + server. Thanks to Poessler Thomas who + found the problem and fix. +Jul 30, 2001 V2.12 Jake Traynham found a problem in + end of line logic in WSocketDataAvailable when random CR are + inside a message line. Changed logic to take only CRLF pair as + end of line. +Aug 18, 2001 V2.13 Angus Robertson found a problem when + using the RetrSync and TopSync methods that it's not possible to + retrieve a body that takes longer than the timeout in + WaitUntilReady. Timeout has to be reevaluated in TriggerResponse. +Sep 09, 2001 V2.14 Beat Boegli added LocalAddr property + for multihomed hosts. +Jul 06, 2002 V2.15 Added header decoding for RETR command. Added corresponding + properties such as HeaderFrom, HeaderTo, HeaderSubject,... + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Pop3Prot; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, WinProcs, SysUtils, Messages, Classes, Graphics, Controls, + Forms, Dialogs, Menus, WSocket, WinSock, MD5; + +const + Pop3CliVersion = 215; + CopyRight : String = ' POP3 component (c) 1997-2002 F. Piette V2.15 '; +{$IFDEF VER80} + { Delphi 1 has a 255 characters string limitation } + POP3_RCV_BUF_SIZE = 255; +{$ELSE} + POP3_RCV_BUF_SIZE = 4096; +{$ENDIF} + WM_POP3_REQUEST_DONE = WM_USER + 1; + +type + Pop3Exception = class(Exception); + TPop3Display = procedure(Sender: TObject; Msg : String) of object; + TPop3ProtocolState = (pop3Disconnected, pop3WaitingUser, + pop3WaitingPass, pop3Transaction); + TPop3State = (pop3Ready, pop3DnsLookup, pop3Connecting, + pop3Connected, pop3InternalReady, + pop3WaitingBanner, pop3WaitingResponse, pop3Abort); + TPop3Request = (pop3Connect, pop3User, pop3Pass, pop3RPop, pop3Quit, + pop3Stat, pop3List, pop3Retr, pop3Top, pop3Dele, + pop3Noop, pop3Last, pop3RSet, pop3Uidl, pop3APop, + pop3Open, pop3Custom); + TPop3Fct = (pop3FctNone, pop3FctConnect, pop3FctUser, pop3FctPass, + pop3FctRPop, pop3FctQuit, pop3FctAPop, pop3FctStat, + pop3FctList, pop3FctUidl, pop3FctRetr, pop3FctTop, + pop3FctDele, pop3FctNoop, pop3FctRSet, pop3FctLast); + TPop3FctSet = set of TPop3Fct; + TPop3NextProc = procedure of object; + TPop3RequestDone = procedure(Sender : TObject; + RqType : TPop3Request; + Error : Word) of object; + TPop3Method = function : boolean of object; + TCustomPop3Cli = class(TComponent) + private + FWSocket : TWSocket; + FWindowHandle : HWND; + FState : TPop3State; + FNextProtocolState : TPop3ProtocolState; + FProtocolState : TPop3ProtocolState; + FConnected : Boolean; + FRequestType : TPop3Request; + FRequestDoneFlag : Boolean; + FReceiveLen : Integer; + FRequestResult : Integer; + FStatusCode : Integer; + FReceiveBuffer : array [0..POP3_RCV_BUF_SIZE - 1] of char; + FNext : TPop3NextProc; + FWhenConnected : TPop3NextProc; + FFctSet : TPop3FctSet; + FFctPrv : TPop3Fct; + FHighLevelResult : Integer; + FHighLevelFlag : Boolean; + FNextRequest : TPop3NextProc; + FLastResponseSave : String; + FStatusCodeSave : Integer; + FRestartFlag : Boolean; + FDoneAsync : TPop3NextProc; + FMultiLineLine : TNotifyEvent; + FMultiLineEnd : TNotifyEvent; + FMultiLineProcess : TNotifyEvent; + FHost : String; + FLocalAddr : String; {bb} + FPort : String; + FUserName : String; + FPassWord : String; + FLastResponse : String; + FErrorMessage : String; + FTimeStamp : String; + FMsgCount : Integer; + FMsgSize : Integer; + FMsgNum : Integer; + FMsgUidl : String; + FMsgLines : Integer; + FTag : LongInt; + FWaitingOnQuit : Boolean; + FHeaderPart : Boolean; + FHeaderKeyword : String; + FHeaderData : String; + FHeaderFrom : String; + FHeaderTo : String; + FHeaderSubject : String; + FHeaderReplyTo : String; + FHeaderMessageId : String; + FHeaderDate : String; + FHeaderReturnPath : String; + + FOnDisplay : TPop3Display; + FOnMessageBegin : TNotifyEvent; + FOnMessageEnd : TNotifyEvent; + FOnMessageLine : TNotifyEvent; + FOnListBegin : TNotifyEvent; + FOnListEnd : TNotifyEvent; + FOnListLine : TNotifyEvent; + FOnUidlBegin : TNotifyEvent; + FOnUidlEnd : TNotifyEvent; + FOnUidlLine : TNotifyEvent; + FOnStateChange : TNotifyEvent; + FOnRequestDone : TPop3RequestDone; + FOnResponse : TPop3Display; + FOnSessionConnected : TSessionConnected; + FOnSessionClosed : TSessionClosed; + FOnHeaderEnd : TNotifyEvent; + protected + procedure ExecAsync(RqType : TPop3Request; + Cmd : String; + NextState : TPop3ProtocolState; + DoneAsync : TPop3NextProc); + procedure NextExecAsync; + procedure StartTransaction(OpCode : String; + Params : String; + RqType : TPop3Request; + NextState : TPop3ProtocolState; + DoneTrans : TPop3NextProc); + procedure StartMultiLine(aOnBegin : TNotifyEvent; + aOnLine : TNotifyEvent; + aOnEnd : TNotifyEvent; + aProcess : TNotifyEvent); + procedure GetALine; + procedure StatDone; + procedure ListAllDone; + procedure ListSingleDone; + procedure UidlAllDone; + procedure UidlSingleDone; + procedure RetrDone; + procedure LastDone; + procedure WndProc(var MsgRec: TMessage); virtual; + procedure WMPop3RequestDone(var msg: TMessage); + message WM_POP3_REQUEST_DONE; + procedure WSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure WSocketSessionConnected(Sender: TObject; Error: Word); + procedure WSocketDataAvailable(Sender: TObject; Error: Word); + procedure WSocketSessionClosed(Sender : TObject; Error : WORD); + procedure DisplayLastResponse; + procedure TriggerDisplay(Msg : String); + procedure TriggerSessionConnected(Error : Word); virtual; + procedure TriggerSessionClosed(Error : Word); + procedure TriggerResponse(Msg : String); virtual; + procedure TriggerStateChange; virtual; + procedure TriggerRequestDone(Error: Word); virtual; + function OkResponse : Boolean; + procedure StateChange(NewState : TPop3State); + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure SetErrorMessage; + procedure Display(Msg : String); + procedure SendCommand(Cmd : String); + function ExtractNumbers(var N1 : Integer; var N2 : Integer) : Boolean; + function ExtractUidl(var N1 : Integer; var N2 : String) : Boolean; + procedure ProcessUidl(Sender : TObject); + procedure ProcessList(Sender : TObject); + procedure CheckReady; + procedure DoHighLevelAsync; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure Connect; virtual; + procedure Open; virtual; + procedure User; virtual; + procedure Pass; virtual; + procedure RPop; virtual; + procedure APop; virtual; + procedure Quit; virtual; + procedure Stat; virtual; + procedure List; virtual; + procedure Retr; virtual; + procedure Top; virtual; + procedure Dele; virtual; + procedure Noop; virtual; + procedure Last; virtual; + procedure RSet; virtual; + procedure Uidl; virtual; + procedure Abort; virtual; + procedure ClearErrorMessage; + procedure HighLevelAsync(RqType : TPop3Request; Fcts : TPop3FctSet); + + property CtrlSocket : TWSocket read FWSocket; + property Host : String read FHost + write FHost; + property LocalAddr : String read FLocalAddr {bb} + write FLocalAddr; {bb} + property Port : String read FPort + write FPort; + property UserName : String read FUserName + write FUserName; + property PassWord : String read FPassWord + write FPassWord; + property ErrorMessage : String read FErrorMessage; + property LastResponse : String read FLastResponse; + property State : TPop3State read FState; + property Connected : Boolean read FConnected; + property ProtocolState : TPop3ProtocolState read FProtocolState; + {:Updated by the Stat method with the number of + messages in the maildrop } + property MsgCount : Integer read FMsgCount; + {:Updated by the Stat method with the total size + in byte for the messages in the maildrop } + property MsgSize : Integer read FMsgSize; + {:This is the number of lines to display in the TOP command + Set to zero if you wants the default value } + property MsgLines : Integer read FMsgLines + write FMsgLines; + {:This is the message number which must be returned by the Retr + method. It is also updated by the Last method } + property MsgNum : Integer read FMsgNum + write FMsgNum; + property MsgUidl : String read FMsgUidl; + {:The following properties are decoded by RETR command } + property HeaderKeyword : String read FHeaderKeyword; + property HeaderData : String read FHeaderData; + property HeaderFrom : String read FHeaderFrom; + property HeaderTo : String read FHeaderTo; + property HeaderSubject : String read FHeaderSubject; + property HeaderReplyTo : String read FHeaderReplyTo; + property HeaderMessageId : String read FHeaderMessageId; + property HeaderDate : String read FHeaderDate; + property HeaderReturnPath : String read FHeaderReturnPath; + {:General purpose property, not used by component } + property Tag : LongInt read FTag + write FTag; + property Handle : HWND read FWindowHandle; + + property OnDisplay : TPop3Display read FOnDisplay + write FOnDisplay; + property OnMessageBegin : TNotifyEvent read FOnMessageBegin + write FOnMessageBegin; + property OnMessageEnd : TNotifyEvent read FOnMessageEnd + write FOnMessageEnd; + property OnMessageLine : TNotifyEvent read FOnMessageLine + write FOnMessageLine; + property OnListBegin : TNotifyEvent read FOnListBegin + write FOnListBegin; + property OnListEnd : TNotifyEvent read FOnListEnd + write FOnListEnd; + property OnListLine : TNotifyEvent read FOnListLine + write FOnListLine; + property OnUidlBegin : TNotifyEvent read FOnUidlBegin + write FOnUidlBegin; + property OnUidlEnd : TNotifyEvent read FOnUidlEnd + write FOnUidlEnd; + property OnUidlLine : TNotifyEvent read FOnUidlLine + write FOnUidlLine; + property OnHeaderEnd : TNotifyEvent read FOnHeaderEnd + write FOnHeaderEnd; + property OnStateChange : TNotifyEvent read FOnStateChange + write FOnStateChange; + property OnRequestDone : TPop3RequestDone read FOnRequestDone + write FOnRequestDone; + property OnResponse: TPop3Display read FOnResponse + write FOnResponse; + property OnSessionConnected : TSessionConnected + read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TSessionClosed + read FOnSessionClosed + write FOnSessionClosed; + end; + + TPop3Cli = class(TCustomPop3Cli) + published + property Host; + property LocalAddr; {bb} + property Port; + property UserName; + property PassWord; + property ErrorMessage; + property LastResponse; + property ProtocolState; + property MsgCount; + property MsgSize; + property MsgLines; + property MsgNum; + property MsgUidl; + property Tag; + property OnDisplay; + property OnMessageBegin; + property OnMessageEnd; + property OnMessageLine; + property OnListBegin; + property OnListEnd; + property OnListLine; + property OnUidlBegin; + property OnUidlEnd; + property OnUidlLine; + property OnHeaderEnd; + property OnStateChange; + property OnRequestDone; + property OnResponse; + property OnSessionConnected; + property OnSessionClosed; + end; + + { TSyncPop3Cli add synchronous functions. You should avoid using this } + { component because synchronous function, apart from being easy, result } + { in lower performance programs. } + TSyncPop3Cli = class(TPop3Cli) + protected + FTimeout : Integer; { Given in seconds } + FTimeStop : LongInt; { Milli-seconds } + FMultiThreaded : Boolean; + function WaitUntilReady : Boolean; virtual; + function Synchronize(Proc : TPop3NextProc) : Boolean; + procedure TriggerResponse(Msg : String); override; { Angus } + public + constructor Create(AOwner : TComponent); override; + function ConnectSync : Boolean; virtual; + function OpenSync : Boolean; virtual; + function UserSync : Boolean; virtual; + function PassSync : Boolean; virtual; + function RPopSync : Boolean; virtual; + function APopSync : Boolean; virtual; + function QuitSync : Boolean; virtual; + function StatSync : Boolean; virtual; + function ListSync : Boolean; virtual; + function RetrSync : Boolean; virtual; + function TopSync : Boolean; virtual; + function DeleSync : Boolean; virtual; + function NoopSync : Boolean; virtual; + function LastSync : Boolean; virtual; + function RSetSync : Boolean; virtual; + function UidlSync : Boolean; virtual; + function AbortSync : Boolean; virtual; + published + property Timeout : Integer read FTimeout + write FTimeout; + property MultiThreaded : Boolean read FMultiThreaded + write FMultiThreaded; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RTrim(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LTrim(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then { Petite optimisation: pas d'espace } + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := LTrim(Rtrim(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function stpblk(PValue : PChar) : PChar; +begin + Result := PValue; + while Result^ in [' ', #9, #10, #13] do + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(PValue : PChar) : Integer; +begin + Result := 0; + PValue := stpblk(PValue); + while PValue^ in ['0'..'9'] do begin + Result := Result * 10 + ord(PValue^) - ord('0'); + Inc(PValue); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomPop3Cli.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWindowHandle := WSocket.AllocateHWnd(WndProc); + FWSocket := TWSocket.Create(nil); + FWSocket.OnSessionClosed := WSocketSessionClosed; + FProtocolState := pop3Disconnected; + FState := pop3Ready; + FLocalAddr := '0.0.0.0'; {bb} + FPort := 'pop3'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomPop3Cli.Destroy; +begin + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + WSocket.DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + case Msg of + WM_POP3_REQUEST_DONE : WMPop3RequestDone(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WMPop3RequestDone(var msg: TMessage); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, FRequestType, Msg.LParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then begin + if AComponent = FWSocket then + FWSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + FLastResponse := '-ERR ' + WSocketErrorDesc(Error) + + ' (Winsock error #' + IntToStr(Error) + ')'; + FStatusCode := 500; + FRequestResult := Error; { V2.02 } + SetErrorMessage; + TriggerRequestDone(Error); + end + else begin + FWSocket.Addr := FWSocket.DnsResult; + FWSocket.Proto := 'tcp'; + FWSocket.Port := FPort; + FWSocket.LocalAddr := FLocalAddr; {bb} + FWSocket.OnSessionConnected := WSocketSessionConnected; + FWSocket.OnDataAvailable := WSocketDataAvailable; + StateChange(pop3Connecting); + try + FWSocket.Connect; + except + on E:Exception do begin + FLastResponse := '-ERR ' + E.ClassName + ': ' + E.Message; + FStatusCode := 500; + FRequestResult := FStatusCode; + SetErrorMessage; + TriggerRequestDone(FStatusCode); + end; + end + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WSocketSessionConnected(Sender: TObject; Error: Word); +begin + { Do not trigger the client SessionConnected from here. We must wait } + { to have received the server banner. } + if Error <> 0 then begin + FLastResponse := '-ERR ' + WSocketErrorDesc(Error) + + ' (Winsock error #' + IntToStr(Error) + ')'; + FStatusCode := 500; + FConnected := FALSE; + FRequestResult := Error; { V2.02 } + SetErrorMessage; { V2.03 } + TriggerRequestDone(Error); + FWSocket.Close; + StateChange(pop3Ready); + end + else begin + FConnected := TRUE; + StateChange(pop3WaitingBanner); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WSocketSessionClosed(Sender : TObject; Error : WORD); +begin + FConnected := FALSE; + TriggerSessionClosed(Error); + TriggerRequestDone(WSAEINTR); + FProtocolState := pop3Disconnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I, J : Integer; + Remaining : Integer; +begin + { Compute remaining space in our buffer. Preserve 3 bytes for CR/LF } + { and nul terminating byte. } + Remaining := SizeOf(FReceiveBuffer) - FReceiveLen - 3; + if Remaining <= 0 then begin + { Received message has a line longer than our buffer. This is not } + { acceptable ! We will add a CR/LF to enable processing, but this } + { will ALTER received message and could cause strange results. } + { May be it is better to raise an exception ? } + FReceiveBuffer[SizeOf(FReceiveBuffer) - 3] := #13; + FReceiveBuffer[SizeOf(FReceiveBuffer) - 2] := #10; + Len := 2; + end + else begin + Len := FWSocket.Receive(@FReceiveBuffer[FReceiveLen], Remaining); + if Len <= 0 then + Exit; + end; + + FReceiveBuffer[FReceiveLen + Len] := #0; + FReceiveLen := FReceiveLen + Len; + + while FReceiveLen > 0 do begin + { Search CRLF pair. We can't use Pos because it stops at first #0 } + I := 1; + while (I < FReceiveLen) and + (not((FReceiveBuffer[I - 1] = #13) and (FReceiveBuffer[I] = #10))) + do + Inc(I); + if I >= FReceiveLen then + break; { CRLF not found } + + { Found a CRLF. Extract data from buffer } + FLastResponse := Copy(FReceiveBuffer, 1, I - 1); + TriggerResponse(FLastResponse); + +{$IFDEF DUMP} + FDumpBuf := '>|'; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.WriteBuffer(FLastResponse[1], Length(FLastResponse)); + FDumpBuf := '|' + #13#10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} +{$IFDEF VER80} + { Add a nul byte at the end of string for Delphi 1 } + FLastResponse[Length(FLastResponse) + 1] := #0; +{$ENDIF} + FReceiveLen := FReceiveLen - I - 1; + if FReceiveLen > 0 then + Move(FReceiveBuffer[I + 1], FReceiveBuffer[0], FReceiveLen + 1); + + if FState = pop3WaitingBanner then begin + DisplayLastResponse; + if not OkResponse then begin + SetErrorMessage; + FRequestResult := FStatusCode; + FWSocket.Close; + Exit; + end; + I := Pos('<', FLastResponse); + J := Pos('>', Copy(FLastResponse, I, Length(FLastREsponse))); + if (I > 0) and (J > 0) then + FTimeStamp := Copy(FLastResponse, I, J); + + FProtocolState := pop3WaitingUser; + StateChange(pop3Connected); + TriggerSessionConnected(Error); + + if Assigned(FWhenConnected) then + FWhenConnected + else begin + TriggerRequestDone(0); + end; + end + else if FState = pop3WaitingResponse then begin + if Assigned(FNext) then + FNext + else + raise Pop3Exception.Create('Program error: FNext is nil'); + end + else begin + { Unexpected data received } + DisplayLastResponse; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerResponse(Msg : String); +begin + if Assigned(FOnResponse) then + FOnResponse(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerStateChange; +begin + if Assigned(FOnStateChange) then + FOnStateChange(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerRequestDone(Error: Word); +begin + { Special processing for Quit (Roger Morton 24-12-99) } + if FRequestType = pop3Quit then begin + if FWaitingOnQuit then + { When the second RqDone arrives (from WSocketSessionClosed), } + { treat it as a normal event by setting a zero Error code } + Error := 0 + else begin + { When the first RqDone arrives, set the FWaitingOnQuit flag so } + { we're ready to handle a second RqDone. } + { Take no other action (in particular, we don't advise the user } + { that the first RqDone has happened) } + FWaitingOnQuit := True; + Exit; + end; + { Fall down here for all normal RqDone, and after the second RqDone } + { following a Quit } + FWaitingOnQuit := False; + end; + + if not FRequestDoneFlag then begin + FRequestDoneFlag := TRUE; + if Assigned(FNextRequest) then begin + if FState <> pop3Abort then + StateChange(pop3InternalReady); + FNextRequest; + end + else begin + StateChange(pop3Ready); + { Restore the lastresponse saved before quit command } + if FHighLevelFlag and (FStatusCodeSave >= 0) then begin + FLastResponse := FLastResponseSave; + FStatusCode := FStatusCodeSave; + end; + FHighLevelFlag := FALSE; + PostMessage(Handle, WM_POP3_REQUEST_DONE, 0, Error); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerDisplay(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerSessionConnected(Error : Word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerSessionClosed(Error : Word); +begin + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.DoHighLevelAsync; +begin +{$IFDEF TRACE} TriggerDisplay('! HighLevelAsync ' + IntToStr(FRequestResult)); {$ENDIF} + if FState = pop3Abort then begin + {$IFDEF TRACE} TriggerDisplay('! Abort detected'); {$ENDIF} + FFctSet := []; + FHighLevelResult := 426; + FErrorMessage := '426 Operation aborted.'; + end; + + FNextRequest := DoHighLevelAsync; + + if FRequestResult <> 0 then begin + { Previous command had errors } + FHighLevelResult := FRequestResult; + if (FFctPrv = pop3FctQuit) or (not (pop3FctQuit in FFctSet)) then + FFctSet := [] + else + FFctSet := [pop3FctQuit]; + end; + + if pop3FctConnect in FFctSet then begin + FFctPrv := pop3FctConnect; + FFctSet := FFctSet - [FFctPrv]; + Connect; + Exit; + end; + + if pop3FctUser in FFctSet then begin + FFctPrv := pop3FctUser; + FFctSet := FFctSet - [FFctPrv]; + User; + Exit; + end; + + if pop3FctPass in FFctSet then begin + FFctPrv := pop3FctPass; + FFctSet := FFctSet - [FFctPrv]; + Pass; + Exit; + end; + + if pop3FctRPop in FFctSet then begin + FFctPrv := pop3FctRPop; + FFctSet := FFctSet - [FFctPrv]; + RPop; + Exit; + end; + + if pop3FctDele in FFctSet then begin + FFctPrv := pop3FctDele; + FFctSet := FFctSet - [FFctPrv]; + Dele; + Exit; + end; + + if pop3FctNoop in FFctSet then begin + FFctPrv := pop3FctNoop; + FFctSet := FFctSet - [FFctPrv]; + Noop; + Exit; + end; + + if pop3FctList in FFctSet then begin + FFctPrv := pop3FctList; + FFctSet := FFctSet - [FFctPrv]; + List; + Exit; + end; + + if pop3FctRSet in FFctSet then begin + FFctPrv := pop3FctRSet; + FFctSet := FFctSet - [FFctPrv]; + RSet; + Exit; + end; + + if pop3FctAPop in FFctSet then begin + FFctPrv := pop3FctAPop; + FFctSet := FFctSet - [FFctPrv]; + APop; + Exit; + end; + + if pop3FctRetr in FFctSet then begin + FFctPrv := pop3FctRetr; + FFctSet := FFctSet - [FFctPrv]; + Retr; + Exit; + end; + + if pop3FctTop in FFctSet then begin + FFctPrv := pop3FctTop; + FFctSet := FFctSet - [FFctPrv]; + Top; + Exit; + end; + + if pop3FctStat in FFctSet then begin + FFctPrv := pop3FctStat; + FFctSet := FFctSet - [FFctPrv]; + Stat; + Exit; + end; + + if pop3FctUidl in FFctSet then begin + FFctPrv := pop3FctUidl; + FFctSet := FFctSet - [FFctPrv]; + Uidl; + Exit; + end; + + if pop3FctLast in FFctSet then begin + FFctPrv := pop3FctLast; + FFctSet := FFctSet - [FFctPrv]; + Last; + Exit; + end; + + if pop3FctQuit in FFctSet then begin + FFctPrv := pop3FctQuit; + FFctSet := FFctSet - [FFctPrv]; + Quit; + Exit; + end; + + {$IFDEF TRACE} TriggerDisplay('! HighLevelAsync done'); {$ENDIF} + FFctSet := []; + FNextRequest := nil; + FRequestDoneFlag := FALSE; + TriggerRequestDone(FHighLevelResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.HighLevelAsync( + RqType : Tpop3Request; Fcts : Tpop3FctSet); +begin + if FConnected and (pop3FctConnect in Fcts) then + raise pop3Exception.Create('pop3 component already connected'); + CheckReady; + FLastResponseSave := FLastResponse; + FStatusCodeSave := -1; + FRequestType := RqType; + FRequestResult := 0; + FFctSet := Fcts; + FFctPrv := pop3FctNone; + FHighLevelResult := 0; + FHighLevelFlag := TRUE; + FLastResponse := ''; + FRestartFlag := FALSE; + ClearErrorMessage; + DoHighLevelAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ProcessUidl(Sender : TObject); +begin + ExtractUidl(FMsgNum, FMsgUidl); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ProcessList(Sender : TObject); +begin + ExtractNumbers(FMsgNum, FMsgSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomPop3Cli.ExtractUidl(var N1 : Integer; var N2 : String) : Boolean; +var + p : PChar; +begin + Result := FALSE; + N1 := 0; + N2 := ''; + +{$IFDEF VER80} + { Delphi 1 do not automatically nul terminate strings } + FLastResponse := FLastResponse + #0; +{$ENDIF} + + { Search for first digit in response } + p := @FLastResponse[1]; + while (p^ <> #0) and (not (p^ in ['0'..'9'])) do + Inc(p); + if p^ = #0 then { Invalid response, need a number } + Exit; + + { Convert first number } + N1 := atoi(p); + + { Search end of number } + while (p^ <> #0) and (p^ in ['0'..'9']) do + Inc(p); + + { Search Uidl } + while (p^ = ' ') do + Inc(p); + + { Copy UIDL } + while (p^ <> #0) and (p^ in [#33..#126]) do begin + N2 := N2 + p^; + Inc(p); + end; + + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomPop3Cli.ExtractNumbers(var N1 : Integer; var N2 : Integer) : Boolean; +var + p : PChar; +begin + Result := FALSE; + +{$IFDEF VER80} + { Delphi 1 do not automatically nul terminate strings } + FLastResponse := FLastResponse + #0; +{$ENDIF} + + { Search for first digit in response } + p := @FLastResponse[1]; + while (p^ <> #0) and (not (p^ in ['0'..'9'])) do + Inc(p); + if p^ = #0 then begin + { Invalid response, need a number } + N1 := 0; + N2 := 0; + Exit; + end; + + { Convert first number } + N1 := atoi(p); + + { Search end of number } + while (p^ <> #0) and (p^ in ['0'..'9']) do + Inc(p); + + { Search next number } + p := stpblk(p); + + if p^ = #0 then begin + { Invalid response, need a number } + N1 := 0; + N2 := 0; + Exit; + end; + + N2 := atoi(p); + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.SendCommand(Cmd : String); +begin + Display('> ' + Cmd); + Application.ProcessMessages; + FWSocket.SendStr(Cmd + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomPop3Cli.OkResponse : Boolean; +begin + Result := ((Length(FLastResponse) > 0) and (FLastResponse[1] = '+')); + if Result then + FStatusCode := 0 + else + FStatusCode := 500; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Display(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ClearErrorMessage; +begin + FErrorMessage := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.SetErrorMessage; +begin + if FErrorMessage = '' then + FErrorMessage := FLastResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.CheckReady; +begin + if not (FState in [pop3Ready, pop3InternalReady]) then + raise pop3Exception.Create('POP3 component not ready'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.StateChange(NewState : TPop3State); +begin + if FState <> NewState then begin + FState := NewState; + TriggerStateChange; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.DisplayLastResponse; +begin + TriggerDisplay('< ' + FLastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ExecAsync( + RqType : TPop3Request; + Cmd : String; { Command to execute } + NextState : TPop3ProtocolState; { Next protocol state in case of success } + DoneAsync : TPop3NextProc); { What to do when done } +begin + CheckReady; + + if not FConnected then + raise Pop3Exception.Create('POP3 component not connected'); + + if not FHighLevelFlag then + FRequestType := RqType; + + FRequestDoneFlag := FALSE; + FNext := NextExecAsync; + FNextProtocolState := NextState; + FDoneAsync := DoneAsync; + StateChange(pop3WaitingResponse); + SendCommand(Cmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.NextExecAsync; +begin + DisplayLastResponse; + + if not OkResponse then begin + FRequestResult := FStatusCode; + SetErrorMessage; + TriggerRequestDone(FRequestResult); + Exit; + end; + + FRequestResult := 0; + FProtocolState := FNextProtocolState; + + if Assigned(FDoneAsync) then + FDoneAsync + else + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.User; +begin + if FProtocolState > pop3WaitingUser then begin + FErrorMessage := '-ERR USER command invalid now'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + FFctPrv := pop3FctUser; + ExecAsync(pop3User, 'USER ' + Trim(FUserName), pop3WaitingPass, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Connect; +begin + CheckReady; + if FConnected then + raise Pop3Exception.Create('POP3 component already connected'); + + if not FHighLevelFlag then + FRequestType := pop3Connect; + + FRequestDoneFlag := FALSE; + FReceiveLen := 0; + FRequestResult := 0; + StateChange(pop3DnsLookup); + ClearErrorMessage; + FWSocket.OnDataSent := nil; + FWSocket.OnDnsLookupDone := WSocketDnsLookupDone; + FWSocket.DnsLookup(FHost); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Abort; +begin + StateChange(pop3Abort); + FWSocket.CancelDnsLookup; + FWSocket.Abort; + StateChange(pop3Ready); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Pass; +begin + if FProtocolState > pop3WaitingPass then begin + FErrorMessage := '-ERR PASS command invalid now'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + FFctPrv := pop3FctPass; + ExecAsync(pop3Pass, 'PASS ' + Trim(FPassWord), pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.RPop; +begin + if FProtocolState > pop3WaitingPass then begin + FErrorMessage := '-ERR RPOP command invalid now'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + FFctPrv := pop3FctRPop; + ExecAsync(pop3RPop, 'RPOP ' + Trim(FPassWord), pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.APop; +begin + if FProtocolState <> pop3WaitingUser then begin + FErrorMessage := '-ERR APOP command invalid now'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + if FTimeStamp = '' then begin + FErrorMessage := '-ERR Server do not support APOP (no timestamp)'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + FFctPrv := pop3FctAPop; + ExecAsync(pop3APop, 'APOP ' + Trim(FUserName) + ' ' + + LowerCase(StrMD5(FTimeStamp + FPassWord)), + pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Quit; +begin + CheckReady; + FFctPrv := pop3FctQuit; + if not FConnected then begin + { We are not connected, it's ok... } + FRequestType := pop3Quit; + FRequestDoneFlag := FALSE; + TriggerRequestDone(0); + Exit; + end; + ExecAsync(pop3Quit, 'QUIT', pop3Disconnected, nil); { Should I force a FWSocket.Close } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Stat; +begin + FFctPrv := pop3FctStat; + StartTransaction('STAT', '', pop3Stat, pop3Transaction, StatDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.StatDone; +begin + ExtractNumbers(FMsgCount, FMsgSize); + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.List; +begin + FFctPrv := pop3FctList; + if FMsgNum <= 0 then + { Scan LIST command (all messages) } + StartTransaction('LIST', '', pop3List, pop3Transaction, ListAllDone) + else + { Single message LIST command } + StartTransaction('LIST', IntToStr(FMsgNum), pop3List, + pop3Transaction, ListSingleDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Uidl; +begin + FFctPrv := pop3FctUidl; + if FMsgNum <= 0 then + { UIDL command (all messages) } + StartTransaction('UIDL', '', pop3Uidl, pop3Transaction, UidlAllDone) + else + { Single message UIDL command } + StartTransaction('UIDL', IntToStr(FMsgNum), pop3Uidl, + pop3Transaction, UidlSingleDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.UidlAllDone; +begin + StartMultiLine(FOnUidlBegin, FOnUidlLine, FOnUidlEnd, ProcessUidl); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.UidlSingleDone; +begin + ExtractUidl(FMsgNum, FMsgUidl); + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ListSingleDone; +begin + ExtractNumbers(FMsgNum, FMsgSize); + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ListAllDone; +begin + StartMultiLine(FOnListBegin, FOnListLine, FOnListEnd, ProcessList); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Retr; +begin + FFctPrv := pop3FctRetr; + StartTransaction('RETR', IntToStr(FMsgNum), + pop3Retr, pop3Transaction, RetrDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Top; +begin + if FMsgLines < 0 then + raise Pop3Exception.Create('Invalid MsgLines for TOP command'); + FFctPrv := pop3FctTop; + StartTransaction('TOP', IntToStr(FMsgNum) + ' ' + IntToStr(FMsgLines), + pop3Top, pop3Transaction, RetrDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.RetrDone; +begin + StartMultiLine(FOnMessageBegin, FOnMessageLine, FOnMessageEnd, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Dele; +begin + FFctPrv := pop3FctDele; + StartTransaction('DELE', IntToStr(FMsgNum), + pop3Dele, pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Noop; +begin + FFctPrv := pop3FctNoop; + StartTransaction('NOOP', '', pop3Noop, pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.RSet; +begin + FFctPrv := pop3FctRSet; + StartTransaction('RSET', '', pop3RSet, pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Last; +begin + FFctPrv := pop3FctLast; + StartTransaction('LAST', '', pop3Last, pop3Transaction, LastDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.LastDone; +begin + ExtractNumbers(FMsgNum, FMsgSize); + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Open; +begin + HighLevelAsync(pop3Open, [pop3FctConnect, pop3FctUser, pop3FctPass]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.StartTransaction( + OpCode : String; + Params : String; + RqType : TPop3Request; + NextState : TPop3ProtocolState; { Next protocol state in case of success} + DoneTrans : TPop3NextProc); { What to do when done } +var + Cmd : String; +begin + if FProtocolState <> pop3Transaction then begin + FErrorMessage := '-ERR ' + OpCode + ' command invalid now'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + FHeaderPart := TRUE; + FHeaderKeyword := ''; + FHeaderData := ''; + FHeaderFrom := ''; + FHeaderTo := ''; + FHeaderSubject := ''; + FHeaderReplyTo := ''; + FHeaderReturnPath := ''; + FHeaderMessageId := ''; + FHeaderDate := ''; + + Cmd := OpCode; + if Params <> '' then + Cmd := Cmd + ' ' + Params; + ExecAsync(RqType, Cmd, NextState, DoneTrans); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.StartMultiLine( + aOnBegin : TNotifyEvent; + aOnLine : TNotifyEvent; + aOnEnd : TNotifyEvent; + aProcess : TNotifyEvent); +begin + FMultiLineLine := aOnLine; + FMultiLineEnd := aOnEnd; + FMultiLineProcess := aProcess; + + { Let the application know that the message is beginning } + if Assigned(aOnBegin) then + aOnBegin(Self); + + FNext := GetALine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.GetALine; +var + I : Integer; +begin + { Check if we are still connected } + if not FConnected then begin + FErrorMessage := '-ERR Disconneced unexpectedly'; + FRequestResult := 500; + Display(FErrorMessage); + TriggerRequestDone(FRequestResult); + Exit; + end; + + { Check if end of message } + if FLastResponse = '.' then begin + { Let the application know that the message is finished } + if Assigned(FMultiLineEnd) then + FMultiLineEnd(Self); + FLastResponse := ''; + FNext := nil; + TriggerRequestDone(0); + Exit; + end; + + { Check if message contains end-of-message mark } + if (Length(FLastResponse) >= 2) and + (FLastResponse[1] = '.') and (FLastResponse[2] = '.') then + { Remove byte-stuff } + FLastResponse := Copy(FLastResponse, 2, Length(FLastResponse)); + + { Check if end of header } + if FHeaderPart then begin + if FLastResponse = '' then begin + { Last header line } + FHeaderPart := FALSE; + if Assigned(FOnHeaderEnd) then + FOnHeaderEnd(Self); + end + else if FLastResponse[1] = #9 then + { Continuation line } + { Ignore } + else begin + I := Pos(':', FLastResponse); + if I > 0 then begin + FHeaderKeyword := LowerCase(Trim(Copy(FLastResponse, 1, I - 1))); + FHeaderData := Copy(FLastResponse, I + 1, 10000); + if FHeaderKeyword = 'from' then + FHeaderFrom := FHeaderData + else if FHeaderKeyword = 'to' then + FHeaderTo := FHeaderData + else if FHeaderKeyword = 'subject' then + FHeaderSubject := FHeaderData + else if FHeaderKeyword = 'date' then + FHeaderDate := FHeaderData + else if FHeaderKeyword = 'message-id' then + FHeaderMessageId := FHeaderData + else if FHeaderKeyword = 'replyto' then + FHeaderReplyTo := FHeaderData + else if FHeaderKeyword = 'return-path' then + FHeaderReturnPath := FHeaderData; + end; + end; + end; + + { Additional process } + if Assigned(FMultiLineProcess) then + FMultiLineProcess(Self); + + { Let the application process the message line } + if Assigned(FMultiLineLine) then + FMultiLineLine(Self); + + { To process next line } + FNext := GetALine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TSyncPop3Cli.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FTimeout := 15; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSyncPop3Cli.TriggerResponse(Msg : String); { angus } +begin + inherited TriggerResponse(Msg); + { Evaluate the timeout period again } + if FTimeout > 0 then + FTimeStop := Integer(GetTickCount) + FTimeout * 1000; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.WaitUntilReady : Boolean; +begin + Result := TRUE; { Suppose success } + FTimeStop := Integer(GetTickCount) + FTimeout * 1000; + while TRUE do begin + if FState = pop3Ready then begin + { Back to ready state, the command is finiched } + Result := (FRequestResult = 0); + break; + end; + + if Application.Terminated or + ((FTimeout > 0) and (Integer(GetTickCount) > FTimeStop)) then begin + { Application is terminated or timeout occured } + inherited Abort; + FErrorMessage := '426 Timeout'; + FStatusCode := 426; + Result := FALSE; { Command failed } + break; + end; +{$IFNDEF VER80} + if FMultiThreaded then + FWSocket.ProcessMessages + else +{$ENDIF} + Application.ProcessMessages; +{$IFNDEF VER80} + { Do not use 100% CPU, but slow down transfert on high speed LAN } + Sleep(0); +{$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.Synchronize(Proc : TPop3NextProc) : Boolean; +begin + try + Proc; + Result := WaitUntilReady; + except + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.ConnectSync : Boolean; +begin + Result := Synchronize(Connect); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.OpenSync : Boolean; +begin + Result := Synchronize(Open); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.UserSync : Boolean; +begin + Result := Synchronize(User); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.PassSync : Boolean; +begin + Result := Synchronize(Pass); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.RetrSync : Boolean; +begin + Result := Synchronize(Retr); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.DeleSync : Boolean; +begin + Result := Synchronize(Dele); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.UidlSync : Boolean; +begin + Result := Synchronize(Uidl); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.LastSync : Boolean; +begin + Result := Synchronize(Last); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.RPopSync : Boolean; +begin + Result := Synchronize(RPop); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.TopSync : Boolean; +begin + Result := Synchronize(Top); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.ListSync : Boolean; +begin + Result := Synchronize(List); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.StatSync : Boolean; +begin + Result := Synchronize(Stat); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.QuitSync : Boolean; +begin + Result := Synchronize(Quit); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.APopSync : Boolean; +begin + Result := Synchronize(APop); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.AbortSync : Boolean; +begin + Result := Synchronize(Abort); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.RSetSync : Boolean; +begin + Result := Synchronize(RSet); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.NoopSync : Boolean; +begin + Result := Synchronize(Noop); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TPop3Cli, TSyncPop3Cli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/Pop3cli.pas b/lib/Delphi/Vc32/Pop3cli.pas new file mode 100644 index 00000000..e52e9692 --- /dev/null +++ b/lib/Delphi/Vc32/Pop3cli.pas @@ -0,0 +1,904 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +-----------------------------------------------------------------------+ + | THIS IS AN OUTDATED COMPONENT. FOR NEW APPLICATIONS, USE POP3PROT.PAS | + | SOURCE. THE NEW POP3 COMPONENT IS ASYNCHONOUS AND MUCH FASTER. | + | YOU NEED TO CHANGE YOUR APPLICATION BECAUSE NEW COMPONENT HAS NOT | + | EXACTLY THE SAME INTERFACE. COMPONENT CLASS NAME HAS BEEN CHANGED | + | SO THAT YOU CAN INSTALL BOTH WHILE YOU ARE UPDATING YOUR APPLICATIONS.| + | THERE IS ALSO A NEW DEMO: MAILRCV.DPR. | + +-----------------------------------------------------------------------+ + | IF YOU REALLY NEED THIS OLD COMPONENT, YOU ALSO NEED AN OLD TWSOCKET! | + +-----------------------------------------------------------------------+ + +Author: Franois PIETTE +Object: TPop3Client class implements the POP3 protocol + (RFC-1225, RFC-1939) +EMail: francois.piette@pophost.eunet.be francois.piette@ping.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +WebSite: http://www.rtfm.be/fpiette +Creation: 03 october 1997 +Version: 1.16 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Sept 09, 1997 Modified TOP to be able to request 0 lines (bug reported by + damien@jetman.demon.co.uk) +Oct 10, 1997 V1.10. Published ProtocolState property, made TOP command + complies with RFC-1939 as suggested by damien@jetman.demon.co.uk + Implemented the UIDL command. +Oct 11, 1997 V1.11 Implemented the APOP command, but not tested because no + server available to test it. + Made internal error message look like POP3 error messages (-ERR) +Oct 28, 1997 V1.12 Modified TWSocket to handle line buffer overflow and + TPop3Client to handle that in GetMultiLine. +Jan 10, 1998 V1.13 Made FWSocket accessible with a read only property. This + eases DNSLookup without a supplementary TWSocket. + Added a Port property. +Apr 01, 1998 V1.14 Adapted for BCB V3 +May 05, 1998 V1.15 Changed GetMultiLine to correctly handle double dots at + line start. +Jun 01, 1998 V1.16 Ben Robinson found that Last did'nt + update MsgNum and MsgSize. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit pop3cli; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$IFNDEF VER80} { Not for Delphi 1 } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, + WinProcs, + SysUtils, + Messages, + Classes, + Graphics, + Controls, + Forms, + Dialogs, + Menus, + WSocket, + Wait, + MD5; + +const + Pop3CliVersion = 116; + +type + TPop3Display = procedure(Sender: TObject; Msg : String) of object; + TPop3State = (pop3Disconnected, pop3WaitingUser, pop3WaitingPass, pop3Transaction, pop3Update); + TPop3Method = function : boolean of object; + TPop3Client = class(TComponent) + private + FWSocket : TWSocket; + FHost : String; + FPort : String; + FUserName : String; + FPassWord : String; + FProtocolState : TPop3State; + FLastResponse : String; + FErrorMessage : String; + FTimeStamp : String; + FWait : TWait; + FTimeout : Integer; + FTimeOutFlag : Boolean; + FLineTooLong : Boolean; + FMsgCount : Integer; + FMsgSize : Integer; + FMsgNum : Integer; + FMsgUidl : String; + FMsgLines : Integer; + FTag : LongInt; + + FOnDisplay : TPop3Display; + FOnMessageBegin : TNotifyEvent; + FOnMessageEnd : TNotifyEvent; + FOnMessageLine : TNotifyEvent; + FOnListBegin : TNotifyEvent; + FOnListEnd : TNotifyEvent; + FOnListLine : TNotifyEvent; + FOnUidlBegin : TNotifyEvent; + FOnUidlEnd : TNotifyEvent; + FOnUidlLine : TNotifyEvent; + protected + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure ClearErrorMessage; + procedure SetErrorMessage; + procedure Display(Msg : String); + procedure SetWait(Value : TWait); + function GetResponse : Boolean; + procedure SendCommand(Cmd : String); + procedure WaitTimeOut(Sender : TObject); + procedure SessionClosed(Sender : TObject; Error : WORD); + procedure LineTooLong(Sender : TObject); + function ExtractNumbers(var N1 : Integer; var N2 : Integer) : Boolean; + function ExtractUidl(var N1 : Integer; var N2 : String) : Boolean; + procedure ProcessUidl(Sender : TObject); + procedure ProcessList(Sender : TObject); + function GetMultiLine(aOnBegin : TNotifyEvent; + aOnLine : TNotifyEvent; + aOnEnd : TNotifyEvent; + aProcess : TNotifyEvent) : Boolean; + function StartTransaction(OpCode, Params : String) : Boolean; + function PassRpop(OpCode : String) : Boolean; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + function Connect : Boolean; + function User : Boolean; + function Pass : Boolean; + function Quit : Boolean; + function Stat : Boolean; + function List : Boolean; + function Retr : Boolean; + function Dele : Boolean; + function Noop : Boolean; + function Last : Boolean; + function Rset : Boolean; + function Top : Boolean; + function Rpop : Boolean; + function Uidl : Boolean; + function Apop : Boolean; + property WSocket : TWSocket read FWSocket; + published + property Host : String read FHost + write FHost; + property Port : String read FPort + write FPort; + property UserName : String read FUserName + write FUserName; + property PassWord : String read FPassWord + write FPassWord; + property Wait : TWait read FWait + write SetWait; + property TimeOut : Integer read FTimeout + write FTimeout; + property ErrorMessage : String read FErrorMessage; + property LastResponse : String read FLastResponse; + property ProtocolState : TPop3State read FProtocolState; + {:Updated by the Stat method with the number of + messages in the maildrop } + property MsgCount : Integer read FMsgCount; + {:Updated by the Stat method with the total size + in byte for the messages in the maildrop } + property MsgSize : Integer read FMsgSize; + {:This is the number of lines to display in the TOP command + Set to zero if you wants the default value } + property MsgLines : Integer read FMsgLines + write FMsgLines; + {:This is the message number which must be returned by the Retr + method. It is also updated by the Last method } + property MsgNum : Integer read FMsgNum + write FMsgNum; + property MsgUidl : String read FMsgUidl; + property Tag : LongInt read FTag + write FTag; + + property OnDisplay : TPop3Display read FOnDisplay + write FOnDisplay; + property OnMessageBegin : TNotifyEvent read FOnMessageBegin + write FOnMessageBegin; + property OnMessageEnd : TNotifyEvent read FOnMessageEnd + write FOnMessageEnd; + property OnMessageLine : TNotifyEvent read FOnMessageLine + write FOnMessageLine; + property OnListBegin : TNotifyEvent read FOnListBegin + write FOnListBegin; + property OnListEnd : TNotifyEvent read FOnListEnd + write FOnListEnd; + property OnListLine : TNotifyEvent read FOnListLine + write FOnListLine; + property OnUidlBegin : TNotifyEvent read FOnUidlBegin + write FOnUidlBegin; + property OnUidlEnd : TNotifyEvent read FOnUidlEnd + write FOnUidlEnd; + property OnUidlLine : TNotifyEvent read FOnUidlLine + write FOnUidlLine; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RTrim(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LTrim(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then { Petite optimisation: pas d'espace } + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := LTrim(Rtrim(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function stpblk(PValue : PChar) : PChar; +begin + Result := PValue; + while Result^ in [' ', #9, #10, #13] do + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(PValue : PChar) : Integer; +begin + Result := 0; + PValue := stpblk(PValue); + while PValue^ in ['0'..'9'] do begin + Result := Result * 10 + ord(PValue^) - ord('0'); + Inc(PValue); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TPop3Client.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWSocket := TWSocket.Create(nil); + FWSocket.OnSessionClosed := SessionClosed; + FWSocket.OnLineTooLong := LineTooLong; + FTimeout := 15; + FProtocolState := pop3Disconnected; + FPort := 'pop3'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TPop3Client.Destroy; +begin + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Connect : Boolean; +var + I, J : Integer; +begin + Result := FALSE; + FTimeStamp := ''; + + if FWait = nil then begin + FErrorMessage := '-ERR No wait object'; + Display(FErrorMessage); + Exit; + end; + + FWait.OnTimeout := WaitTimeout; + FTimeOutFlag := FALSE; + + if FProtocolState > pop3Disconnected then begin + { Already connected, it's ok } + Result := TRUE; + Exit; + end; + + ClearErrorMessage; + + if Length(FHost) = 0 then begin + FErrorMessage := '-ERR No host specified'; + Display(FErrorMessage); + Exit; + end; + + try + FWSocket.Proto := 'tcp'; + FWSocket.Port := FPort; + FWSocket.Addr := FHost; + FWSocket.OnDataAvailable := nil; + + FWSocket.Connect; + except + on E:ESocketException do begin + FErrorMessage := '-ERR ' + E.Message; + Exit; + end; + end; + + if not FWSocket.Wait(FTimeout, wsConnected) then begin + FErrorMessage := '-ERR Can''t connect to host ''' + FHost + ''''; + Display(FErrorMessage); + FWSocket.Close; + Exit; + end; + Display('Connected with POP3 server'); + + if not GetResponse then begin + SetErrorMessage; + FWSocket.Close; + Exit; + end; + + I := Pos('<', FLastResponse); + J := Pos('>', Copy(FLastResponse, I, Length(FLastREsponse))); + if (I > 0) and (J > 0) then + FTimeStamp := Copy(FLastResponse, I, J); + + FProtocolState := pop3WaitingUser; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Quit : Boolean; +begin + if FProtocolState = pop3Disconnected then begin + { Not connected, it's ok } + Result := TRUE; + Exit; + end; + + try + SendCommand('QUIT'); + Result := GetResponse; + except + Result := FALSE; + end; + + FProtocolState := pop3Disconnected; + FWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.User : Boolean; +begin + Result := FALSE; + if FProtocolState > pop3WaitingUser then begin + FErrorMessage := '-ERR USER command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if (FProtocolState = pop3Disconnected) and (not Connect) then + Exit; + + SendCommand('USER ' + Trim(FUserName)); + if not GetResponse then + Exit; + Result := TRUE; + FProtocolState := pop3WaitingPass; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Apop : Boolean; +begin + Result := FALSE; + if FProtocolState > pop3WaitingUser then begin + FErrorMessage := '-ERR APOP command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if (FProtocolState = pop3Disconnected) and (not Connect) then + Exit; + + if FTimeStamp = '' then begin + FErrorMessage := '-ERR Server do not support APOP (no timestamp)'; + Display(FErrorMessage); + Exit; + end; + + SendCommand('APOP ' + Trim(FUserName)+ ' ' + + StrMD5(FTimeStamp + FPassWord)); + if not GetResponse then + Exit; + Result := TRUE; + FProtocolState := pop3WaitingPass; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Pass : Boolean; +begin + Result := PassRpop('PASS'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Rpop : Boolean; +begin + Result := PassRpop('RPOP'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.PassRpop(OpCode : String) : Boolean; +begin + Result := FALSE; + if FProtocolState > pop3WaitingPass then begin + FErrorMessage := '-ERR ' + OpCode + ' command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if (FProtocolState < pop3WaitingPass) and (not User) then + Exit; + + SendCommand(OpCode + ' ' + Trim(FPassWord)); + if not GetResponse then + Exit; + Result := TRUE; + FProtocolState := pop3Transaction; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Retr : Boolean; +begin + Result := StartTransaction('RETR', IntToStr(FMsgNum)); + if not Result then + Exit; + Result := GetMultiLine(FOnMessageBegin, FOnMessageLine, FOnMessageEnd, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Stat : Boolean; +begin + FMsgCount := 0; + FMsgSize := 0; + + Result := StartTransaction('STAT', ''); + if not Result then + Exit; + + Result := ExtractNumbers(FMsgCount, FMsgSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.ProcessUidl(Sender : TObject); +begin + ExtractUidl(FMsgNum, FMsgUidl); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.ProcessList(Sender : TObject); +begin + ExtractNumbers(FMsgNum, FMsgSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.List : Boolean; +begin + if FMsgNum <= 0 then begin + { Scan LIST command (all messages) } + Result := StartTransaction('LIST', ''); + if not Result then + Exit; + Result := GetMultiLine(FOnListBegin, FOnListLine, + FOnListEnd, ProcessList); + end + else begin + { Single message LIST command } + Result := StartTransaction('LIST', IntToStr(FMsgNum)); + if not Result then + Exit; + Result := ExtractNumbers(FMsgNum, FMsgSize); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Uidl : Boolean; +begin + if FMsgNum <= 0 then begin + { UIDL command (all messages) } + Result := StartTransaction('UIDL', ''); + if not Result then + Exit; + Result := GetMultiLine(FOnUidlBegin, FOnUidlLine, + FOnUidlEnd, ProcessUidl); + end + else begin + { Single message UIDL command } + Result := StartTransaction('UIDL', IntToStr(FMsgNum)); + if not Result then + Exit; + Result := ExtractUidl(FMsgNum, FMsgUidl); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Dele : Boolean; +begin + Result := StartTransaction('DELE', IntToStr(FMsgNum)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Noop : Boolean; +begin + Result := StartTransaction('NOOP', ''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Last : Boolean; +begin + Result := StartTransaction('LAST', ''); + if Result then + Result := ExtractNumbers(FMsgNum, FMsgSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Rset : Boolean; +begin + Result := StartTransaction('RSET', ''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Top : Boolean; +begin + if FMsgLines < 0 then + Result := FALSE + else + Result := StartTransaction('TOP' , IntToStr(FMsgNum) + ' ' + + IntToStr(FMsgLines)); + if not Result then + Exit; + Result := GetMultiLine(FOnMessageBegin, FOnMessageLine, FOnMessageEnd, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.StartTransaction(OpCode, Params : String) : Boolean; +begin + Result := FALSE; + + if (FProtocolState < pop3Transaction) and (not Pass) then + Exit; + + if FProtocolState <> pop3Transaction then begin + FErrorMessage := '-ERR ' + OpCode + ' command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if Params <> '' then + SendCommand(OpCode + ' ' + Params) + else + SendCommand(OpCode); + + Result := GetResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.GetMultiLine( + aOnBegin : TNotifyEvent; + aOnLine : TNotifyEvent; + aOnEnd : TNotifyEvent; + aProcess : TNotifyEvent) : Boolean; +var + bFlag : Boolean; +begin + { Let the application know that the message is beginning } + if Assigned(aOnBegin) then + aOnBegin(Self); + + bFlag := FALSE; + try + while TRUE do begin + { Read a message line } + FLineTooLong := FALSE; + if FWSocket.State = wsConnected then + FWSocket.ReadLine(FTimeout, FLastResponse); + + { Check if we are still connected } + if FWSocket.State <> wsConnected then begin + FErrorMessage := '-ERR Disconneced unexpectedly'; + Display(FErrorMessage); + break; + end; + + { Check if we timed out } + if FTimeOutFlag then begin + FErrorMessage := '-ERR Receive Timeout'; + Display(FErrorMessage); + break; + end; + + { Check if end of message } + if (not bFlag) and (FLastResponse = '.') then begin + FLastResponse := ''; + break; + end; + + { Check if message contains end-of-message mark } + if (Length(FLastResponse) >= 2) and + (FLastResponse[1] = '.') and (FLastResponse[2] = '.') then + { Remove byte-stuff } + FLastResponse := Copy(FLastResponse, 2, Length(FLastResponse)); + + { Additional process } + if Assigned(aProcess) then + aProcess(Self); + + { Let the application process the message line } + if Assigned(aOnLine) then + aOnLine(Self); + + bFlag := FLineTooLong; + + { Let other application breaze } + Application.ProcessMessages; + end; + finally + { Let the application know that the message is finished } + if Assigned(aOnEnd) then + aOnEnd(Self); + end; + + Result := not FTimeOutFlag; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.ExtractUidl(var N1 : Integer; var N2 : String) : Boolean; +var + p : PChar; +begin + Result := FALSE; + N1 := 0; + N2 := ''; + +{$IFDEF VER80} + { Delphi 1 do not automatically nul terminate strings } + FLastResponse := FLastResponse + #0; +{$ENDIF} + + { Search for first digit in response } + p := @FLastResponse[1]; + while (p^ <> #0) and (not (p^ in ['0'..'9'])) do + Inc(p); + if p^ = #0 then { Invalid response, need a number } + Exit; + + { Convert first number } + N1 := atoi(p); + + { Search end of number } + while (p^ <> #0) and (p^ in ['0'..'9']) do + Inc(p); + + { Search Uidl } + while (p^ = ' ') do + Inc(p); + + { Copy UIDL } + while (p^ <> #0) and (p^ in [#33..#126]) do begin + N2 := N2 + p^; + Inc(p); + end; + + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.ExtractNumbers(var N1 : Integer; var N2 : Integer) : Boolean; +var + p : PChar; +begin + Result := FALSE; + +{$IFDEF VER80} + { Delphi 1 do not automatically nul terminate strings } + FLastResponse := FLastResponse + #0; +{$ENDIF} + + { Search for first digit in response } + p := @FLastResponse[1]; + while (p^ <> #0) and (not (p^ in ['0'..'9'])) do + Inc(p); + if p^ = #0 then begin + { Invalid response, need a number } + N1 := 0; + N2 := 0; + Exit; + end; + + { Convert first number } + N1 := atoi(p); + + { Search end of number } + while (p^ <> #0) and (p^ in ['0'..'9']) do + Inc(p); + + { Search next number } + p := stpblk(p); + + if p^ = #0 then begin + { Invalid response, need a number } + N1 := 0; + N2 := 0; + Exit; + end; + + N2 := atoi(p); + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.WaitTimeOut(Sender : TObject); +begin + FTimeOutFlag := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.LineTooLong(Sender : TObject); +begin + FLineTooLong := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SessionClosed(Sender : TObject; Error : WORD); +begin + if Assigned(FWait) then + FWait.Stop; + FProtocolState := pop3Disconnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SendCommand(Cmd : String); +begin + Display('> ' + Cmd); + Application.ProcessMessages; + FWSocket.SendStr(Cmd + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.GetResponse : Boolean; +begin + FWSocket.ReadLine(FTimeout, FLastResponse); + Display('< ' + FLastResponse); + Result := ((Length(FLastResponse) > 0) and (FLastResponse[1] = '+')); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SetWait(Value : TWait); +begin + FWait := Value; + FWSocket.WaitCtrl := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then begin + if AComponent = FWait then + FWait := nil + else if AComponent = FWSocket then + FWSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.Display(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.ClearErrorMessage; +begin + FErrorMessage := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SetErrorMessage; +begin + if FErrorMessage = '' then + FErrorMessage := FLastResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TPop3Client]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/SmtpProt.dcr b/lib/Delphi/Vc32/SmtpProt.dcr new file mode 100644 index 00000000..a94ff29f Binary files /dev/null and b/lib/Delphi/Vc32/SmtpProt.dcr differ diff --git a/lib/Delphi/Vc32/SmtpProt.dcu b/lib/Delphi/Vc32/SmtpProt.dcu new file mode 100644 index 00000000..06d65f9c Binary files /dev/null and b/lib/Delphi/Vc32/SmtpProt.dcu differ diff --git a/lib/Delphi/Vc32/SmtpProt.pas b/lib/Delphi/Vc32/SmtpProt.pas new file mode 100644 index 00000000..56e28501 --- /dev/null +++ b/lib/Delphi/Vc32/SmtpProt.pas @@ -0,0 +1,2427 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: TSmtpCli class implements the SMTP protocol (RFC-821) + Support file attachement using MIME format (RFC-1521) + Support authentification (RFC-2104) +Creation: 09 october 1997 +Version: 2.32 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Oct 25, 1997 Added the OnHeaderLine event to allow modification/deletion of + header lines. +Oct 26, 1997 V1.00 Released + Changed the OnGetData event arguments to have code compatible + between 16 and 32 bit versions (replaced string with PChar). +Jan 10, 1998 V1.01 Added a Port property +Feb 14, 1998 V1.02 Added an intermeditae TCustomSmtpClient in order to + support MIME in the TSmtpCli. I implemented MIME with the + help of code donated by Brad Choate + Mime is used for file attachement. + Added a SetRcptName to copy values from a string list in place + of copying the string list reference. +Feb 15, 1998 V1.03 Added a CharSet property, defaulting to iso-8859-1 +Mar 02, 1998 V1.04 Corrected result for QUIT command. + Marcus Schmutz +Mar 06, 1998 V1.05 Use OnDataSent event to prenvent over-buffering +Mar 15, 1998 V1.06 Implemented the Date header line +Apr 01, 1998 V1.07 Adapted for BCB V3 +Apr 10, 1998 V1.08 Corrected DayNames: sunday is day 1, saturday is day 7. + Changed UUEncode procedures to virtual methods to ease component + inheritance. +Apr 26, 1998 V1.09 Ignore any empty file name (a very common error !) + Check if file exists and raise an exception if not. + Made Rfc822DateTime public. + Added Rset method from Victor Garcia Aprea + Added Abort procedure to close the socket and abort any operation + Made the underlaying TWSocket accessible using a property. +Apr 28, 1998 V1.10 Reset FTimeOutFlag in the mail procedure. +May 05, 1998 V1.11 Handled correctly lines beginning with a dot. +May 21, 1998 V1.12 Check for nil argument in SetEMailFiles + Added OnCommand and OnResponse events. + Added SendDataLine procedure (same as SendCommand, but do not + trigger OnCommand event) used for header and message lines. +Jul 29, 1998 V2.00 Asynchronous functions and new TSyncSmtpCli component + to be a placer holder for synchronous version. + Renamed source file from SmtpCli to SmtpProt. +Aug 06, 1998 V2.01 Made HighLevelAsync public and added smtpCustom to be used + for custom calls to HighLevelAsync. +Sep 22, 1998 V2.02 Removed useless Wait unit from the uses clause. +Oct 04, 1998 V2.03 Checked for Error in TriggerRequestDone. +Oct 11, 1998 V2.04 Removed -1 in DataNext. Thanks to Dennis V. Turov + for finding this bug. +Nov 22, 1998 V2.05 Implemented VRFY command with code proposed by + DZ-Jay but use HdrTo property as name to verify. +Nov 29, 1998 V2.06 Added SetErrorMessage in WSocketSessionConnected when an + error occured. Thanks to DZ-Jay. + Changed FMimeBoundary format to use numbered month instead of + month names. Thanks to Dmitry Kislov who + found that some foreign charsets are invalid in mime boundaries. +Dec 22, 1998 V2.07 Handle exception when connecting (will be triggered when + an invalid port has been given). + Force readonly when reading attached files. + Added ContentType property as suggested by Henri Fournier + +Feb 13, 1999 V2.08 Published the state property and OnSessionConnected, + OnSessionClosed events. +Feb 27, 1999 V2.09 Added Connected property. + Added code from Larry Pesyna to handle time + zone bias. + Added OnAttachContentType event. Thanks to Vladimir M. + Zakharychev for his suggestion. + Added ReplyTo and ReturnPath properties. Thanks to Eric Bullen + for his code. +Mar 06, 1999 V2.10 Conditional compile to remove timezone code unsupported by + Delphi 1. +Mar 09, 1999 V2.11 Made state property [really] published. +Mar 27, 1999 V2.12 Published OnProcessHeader + Changed sign for time zone bias (thanks to Larry Pesyna). +May 10, 1999 V2.13 'daylight' functionality for timezonebias function. + Thanks to Bernhard Goebel + Do not set FRequestType in Connect when called from HighLevel + function. Thanks to Eugene V. Krapivin . +May 18, 1999 V2.14 Added Sender field. If ommited, the sender is becomes + HdrFrom. Jon Glazer +Jul 30, 1999 V2.15 Added MailMessage property by Thomas Kvamme + . MailMessage property can be used with + OnGetData event. If both are used, MailMessages lines appears + before lines got by OnGetData. +Oct 02, 1999 V2.16 Added OnAttachHeader event as suggested by Vladimir M. + Zakharychev + Accept friendly EMail addresses. Thanks to Thierry De Leeuw + for his code. +Nov 01, 1999 V2.17 Made all fields protected to easy component inheritance. +Oct 15, 2000 V2.18 Check for too long lines in TriggerGetData. + Thanks to Steve Williams +Jun 18, 2001 V2.19 Use AllocateHWnd and DeallocateHWnd from wsocket. + Renamed property WSocket to CtrlSocket (this require code change + in user application too). +Jul 26, 2001 V2.20 Angus Robertson found a problem when + using the MailSync method that it's not possible to send a body + that takes longer than the timeout in WaitUntilReady. Timeout has + to be reevaluated in TriggerGetData. + Jake Traynham added authentification and + EHLO code. Well done job. +Aug 18, 2001 V2.21 Angus V2.21 added OwnHeaders property flag which allows + mail relaying where the body includes all headers and none are + added by the component +Sep 09, 2001 V2.22 Beat Boegli added LocalAddr property + for multihomed hosts. +Dec 24, 2001 V2.23 Added support for NOFORMS (console mode without Forms unit). + Added X-Mailer header line. +Jan 09, 2001 V2.24 Corrected WSocketDnsLookupDone where FRequestResult was not + properly set with errorcode. Corrected DoHighLevelAsync to set + RequestResult to 426 when aborting. Found by "SJF" . +Mar 17, 2002 V2.25 Check for FRequestType = smtpQuit in NextExecAsync to avoid + calling OnRequestDone before remote server has closed connection. + And in WSocketSessionClosed, check if last command was smtpQuit + to select proper error code for OnRequestDone event. + Lot of peoples helped find this one (Alphabetical order): + David Colliver + DZ-Jay + Max Terentiev + Roger Morton + Wilfried Mestdagh +Apr 01, 2002 V2.26 TriggerRequestDone with correct winsock error in + WSocketDnsLookupDone. Thanks to DZ [dz@caribe.net] and + Roger Morton [roger@chez-morton.com] for fixing this bug. +Apr 20, 2002 V2.27 Enhance NOFORMS mode. +Apr 24, 2002 V2.28 Return real error code in case of error in + WSocketDnsLookupDone. Thanks to DZ-Jay . +Sep 07, 2002 V2.29 Added HdrCc property to send mail to CC. +Oct 26, 2002 V2.30 Revised Rfc822DateTime function. +Nov 01, 2002 V2.31 Changed arguments for event from PChar to Pointer to avoid + Delphi 7 bug with PCHar <-> AnsiChar. This will require small + changes in your application: change PChar to Pointer in your + event handler and probably add a PChar cast when using the args. +Nov 11, 2002 V2.32 Revised for Delphi 1 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit SmtpProt; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER130} { C++ Builder V5.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER140} { C++ Builder V6.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, WinProcs, SysUtils, Messages, Classes, +{$IFNDEF NOFORMS} + Forms, Controls, +{$ENDIF} + WSocket, WinSock, MD5; + +const + SmtpCliVersion = 232; + CopyRight : String = ' SMTP component (c) 1997-2002 Francois Piette V2.32 '; +{$IFDEF VER80} + { Delphi 1 has a 255 characters string limitation } + SMTP_RCV_BUF_SIZE = 255; +{$ELSE} + SMTP_RCV_BUF_SIZE = 4096; +{$ENDIF} + WM_SMTP_REQUEST_DONE = WM_USER + 1; + +type + SmtpException = class(Exception); + TSmtpState = (smtpReady, smtpDnsLookup, + smtpConnecting, smtpConnected, + smtpInternalReady, smtpWaitingBanner, + smtpWaitingResponse, smtpAbort); + TSmtpRequest = (smtpConnect, smtpHelo, smtpMailFrom, + smtpVrfy, smtpRcptTo, smtpData, + smtpQuit, smtpRset, smtpOpen, + smtpMail, smtpEhlo, smtpAuth, + smtpCustom); + TSmtpFct = (smtpFctNone, smtpFctHelo, smtpFctConnect, + smtpFctMailFrom, smtpFctRcptTo, smtpFctData, + smtpFctVrfy, smtpFctQuit, smtpFctRset, + smtpFctEhlo, smtpFctAuth); + TSmtpFctSet = set of TSmtpFct; + TSmtpContentType = (smtpHTML, smtpPlainText); + TSmtpAuthType = (smtpAuthNone, smtpAuthPlain, smtpAuthLogin, + smtpAuthCramMD5); + + TSmtpDisplay = procedure(Sender : TObject; + Msg : String) of object; + TSmtpHeaderLineEvent = procedure(Sender : TObject; + Msg : Pointer; + Size : Integer) of object; + TSmtpProcessHeaderEvent = procedure(Sender : TObject; + HdrLines : TStrings) of object; + TSmtpGetDataEvent = procedure(Sender : TObject; + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More: Boolean) of object; + TSmtpRequestDone = procedure(Sender : TObject; + RqType : TSmtpRequest; + ErrorCode : Word) of object; + TSmtpAttachmentContentType = procedure(Sender : TObject; + FileNumber : Integer; + var FileName : String; + var ContentType : String) of object; + TSmtpAttachHeader = procedure(Sender : TObject; + FileNumber : Integer; + FileName : String; + HdrLines : TStrings) of object; + TSmtpNextProc = procedure of object; + + { Base component, implementing the transport, without MIME support } + TCustomSmtpClient = class(TComponent) + protected + FWSocket : TWSocket; { Underlaying socket } + FHost : String; { SMTP server hostname or IP } + FLocalAddr : String; {bb} { Local Address for mulithome } + FPort : String; { Should be 'smtp' } + FSignOn : String; { Used for the 'HELO' command } + FUsername : String; { Used with the 'AUTH' command } + FPassword : String; { Used with the 'AUTH' command } + FAuthType : TSmtpAuthType;{ Used with the 'AUTH' command } + FFromName : String; { Sender's EMail } + FRcptName : TStrings; { Recepients EMails list } + FMailMessage : TStrings; + FHdrFrom : String; + FHdrTo : String; + FHdrCc : String; + FHdrReplyTo : String; + FHdrReturnPath : String; + FHdrSubject : String; + FHdrSender : String; { Mail Sender's Email } + FState : TSmtpState; + FCharSet : String; + FContentType : TSmtpContentType; + FContentTypeStr : String; + FLastResponse : String; + FErrorMessage : String; + FTag : LongInt; + FConnected : Boolean; + FESmtpSupported : Boolean; + FRequestType : TSmtpRequest; + FRequestDoneFlag : Boolean; + FReceiveLen : Integer; + FRequestResult : Integer; + FStatusCode : Integer; + FReceiveBuffer : array [0..SMTP_RCV_BUF_SIZE - 1] of char; + FNext : TSmtpNextProc; + FWhenConnected : TSmtpNextProc; + FFctSet : TSmtpFctSet; + FFctPrv : TSmtpFct; + FHighLevelResult : Integer; + FHighLevelFlag : Boolean; + FNextRequest : TSmtpNextProc; + FLastResponseSave : String; + FStatusCodeSave : Integer; + FRestartFlag : Boolean; + FOkResponses : array [0..15] of Integer; + FDoneAsync : TSmtpNextProc; + FWindowHandle : HWND; + FItemCount : LongInt; + FHdrLines : TStrings; + FLineNum : Integer; + FMoreLines : Boolean; + FOwnHeaders : Boolean ; { Angus V2.21 } + FOnDisplay : TSmtpDisplay; + FOnCommand : TSmtpDisplay; + FOnResponse : TSmtpDisplay; + FOnGetData : TSmtpGetDataEvent; + FOnHeaderLine : TSmtpHeaderLineEvent; + FOnProcessHeader : TSmtpProcessHeaderEvent; + FOnRequestDone : TSmtpRequestDone; + FOnStateChange : TNotifyEvent; + FOnSessionConnected : TSessionConnected; + FOnSessionClosed : TSessionClosed; + function SmtpClientAllocateHWnd(Method: TWndMethod): HWND; + procedure SmtpClientDeallocateHWnd(WHandle: HWND); + procedure TriggerDisplay(Msg : String); virtual; + procedure TriggerCommand(Msg : String); virtual; + procedure TriggerResponse(Msg : String); virtual; + procedure TriggerRequestDone(ErrorCode : Word); virtual; + procedure TriggerStateChange; virtual; + procedure TriggerGetData(LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); virtual; + procedure TriggerHeaderLine(Line : Pointer; Size : Integer); virtual; + procedure TriggerProcessHeader(HdrLines : TStrings); virtual; + procedure TriggerSessionConnected(ErrorCode : Word); virtual; + procedure TriggerSessionClosed(ErrorCode : Word); virtual; + procedure ClearErrorMessage; + procedure SetErrorMessage; + procedure StateChange(NewState : TSmtpState); + procedure SendCommand(Cmd : String); virtual; + procedure SetRcptName(newValue : TStrings); + procedure SetMailMessage(newValue : TStrings); + procedure InitUUEncode(var hFile: File; sFile: string); virtual; + procedure DoUUEncode(var hFile: File; var sLine: string; var More: boolean); virtual; + procedure EndUUEncode(var hFile: File); virtual; + procedure CheckReady; + procedure WSocketDnsLookupDone(Sender: TObject; ErrorCode: Word); + procedure WSocketSessionConnected(Sender: TObject; ErrorCode: Word); + procedure WSocketDataAvailable(Sender: TObject; ErrorCode: Word); + procedure WSocketDataSent(Sender : TObject; ErrorCode : Word); + procedure WSocketSessionClosed(Sender : TObject; ErrorCode : WORD); + procedure DisplayLastResponse; + procedure DoHighLevelAsync; + procedure ExecAsync(RqType : TSmtpRequest; + Cmd : String; + OkResponses : array of Word; + DoneAsync : TSmtpNextProc); + procedure NextExecAsync; + procedure EhloNext; + procedure AuthNextLogin; + procedure AuthNextLoginNext; + procedure AuthNextCramMD5; + procedure RcptToNext; + procedure RcptToDone; + procedure DataNext; + procedure WndProc(var MsgRec: TMessage); virtual; + procedure WMSmtpRequestDone(var msg: TMessage); + message WM_SMTP_REQUEST_DONE; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure Connect; virtual; { Connect to the mail server } + procedure Helo; virtual; { Send the HELO command } + procedure Ehlo; virtual; { Send the EHLO command } + procedure Auth; virtual; { Send the AUTH command } + procedure Vrfy; virtual; { Send the VRFY command } + procedure MailFrom; virtual; { Send the MAILFROM command } + procedure RcptTo; virtual; { Send RECPTTO command } + procedure Data; virtual; { Send DATA command } + procedure Quit; virtual; { Send QUITE command, close } + procedure Rset; virtual; { Send RSET command } + procedure Abort; virtual; { Abort opertaion, close } + procedure Open; virtual; { Connect, Helo/Ehlo, Auth } + procedure Mail; virtual; { MailFrom, RcptTo, Data } + + property CtrlSocket : TWSocket read FWSocket; + property Handle : HWND read FWindowHandle; + property Connected : Boolean read FConnected; + procedure HighLevelAsync(RqType : TSmtpRequest; Fcts : TSmtpFctSet); + procedure SetContentType(newValue : TSmtpContentType); + protected + property Host : String read FHost + write FHost; + property LocalAddr : String read FLocalAddr {bb} + write FLocalAddr; {bb} + property Port : String read FPort + write FPort; + property SignOn : String read FSignOn + write FSignOn; + property Username : String read FUsername + write FUsername; + property Password : String read FPassword + write FPassword; + property AuthType : TSmtpAuthType read FAuthType + write FAuthType; + property FromName : String read FFromName + write FFromName; + property RcptName : TStrings read FRcptName + write SetRcptName; + property MailMessage : TStrings read FMailMessage + write SetMailMessage; + property HdrFrom : String read FHdrFrom + write FHdrFrom; + property HdrTo : String read FHdrTo + write FHdrTo; + property HdrCc : String read FHdrCc + write FHdrCc; + property HdrReplyTo : String read FHdrReplyTo + write FHdrReplyTo; + property HdrReturnPath : String read FHdrReturnPath + write FHdrReturnPath; + property HdrSubject : String read FHdrSubject + write FHdrSubject; + property HdrSender: String read FHdrSender + write FHdrSender; + property CharSet : String read FCharSet + write FCharSet; + property ContentType : TSmtpContentType read FContentType + write SetContentType; + property ErrorMessage : String read FErrorMessage; + property LastResponse : String read FLastResponse; + property State : TSmtpState read FState; + property Tag : LongInt read FTag + write FTag; + property OwnHeaders : Boolean read FOwnHeaders + { Angus V2.21 } write FOwnHeaders; + property OnDisplay : TSmtpDisplay read FOnDisplay + write FOnDisplay; + property OnCommand: TSmtpDisplay read FOnCommand + write FOnCommand; + property OnResponse: TSmtpDisplay read FOnResponse + write FOnResponse; + property OnGetData : TSmtpGetDataEvent read FOnGetData + write FOnGetData; + property OnHeaderLine : TSmtpHeaderLineEvent read FOnHeaderLine + write FOnHeaderLine; + property OnProcessHeader : TSmtpProcessHeaderEvent + read FOnProcessHeader + write FOnProcessHeader; + property OnRequestDone : TSmtpRequestDone read FOnRequestDone + write FOnRequestDone; + property OnStateChange : TNotifyEvent read FOnStateChange + write FOnStateChange; + property OnSessionConnected : TSessionConnected + read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TSessionClosed + read FOnSessionClosed + write FOnSessionClosed; + end; + + { Descending component adding MIME (file attach) support } + TSmtpCli = class(TCustomSmtpClient) + protected + FEmailBody : TStrings; { Message body text } + FEmailFiles : TStrings; { File names for attachment } + FCurrentFile : Integer; { Current file being sent } + FMimeBoundary : String; { Message parts boundary } + FFile : File; + FFileStarted : Boolean; + FBodyFlag : Boolean; + FBodyLine : Integer; + FOnAttachContentType : TSmtpAttachmentContentType; + FOnAttachHeader : TSmtpAttachHeader; + procedure TriggerAttachContentType(FileNumber : Integer; + var FileName : String; + var ContentType : String); virtual; + procedure TriggerAttachHeader(FileNumber : Integer; + FileName : String; + HdrLines : TStrings); virtual; + procedure TriggerGetData(LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); override; + procedure TriggerHeaderLine(Line : Pointer; Size : Integer); override; + procedure SetEMailFiles(newValue : TStrings); + procedure PrepareEMail; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure Data; override; + published + property Host; + property LocalAddr; {bb} + property Port; + property SignOn; + property Username; + property Password; + property AuthType; + property FromName; + property RcptName; + property MailMessage; + property HdrFrom; + property HdrTo; + property HdrCc; + property HdrReplyTo; + property HdrReturnPath; + property HdrSubject; + property HdrSender; + property State; + property CharSet; + property ContentType; + property ErrorMessage; + property LastResponse; + property Tag; + property OwnHeaders ; { Angus V2.21 } + property OnDisplay; + property OnCommand; + property OnResponse; + property OnGetData; + property OnHeaderLine; + property OnProcessHeader; + property OnRequestDone; + property OnSessionConnected; + property OnSessionClosed; + property EmailFiles : TStrings read FEmailFiles + write SetEmailFiles; + property OnAttachContentType : TSmtpAttachmentContentType + read FOnAttachContentType + write FOnAttachContentType; + property OnAttachHeader : TSmtpAttachHeader read FOnAttachHeader + write FOnAttachHeader; + end; + + { TSyncSmtpCli add synchronous functions. You should avoid using this } + { component because synchronous function, apart from being easy, result } + { in lower performance programs. } + TSyncSmtpCli = class(TSmtpCli) + protected + FTimeout : Integer; { Given in seconds } + FTimeStop : LongInt; { Milli-seconds } + FMultiThreaded : Boolean; + function WaitUntilReady : Boolean; virtual; + function Synchronize(Proc : TSmtpNextProc) : Boolean; + procedure TriggerGetData(LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); override; + public + constructor Create(AOwner : TComponent); override; + function ConnectSync : Boolean; virtual; + function HeloSync : Boolean; virtual; + function EhloSync : Boolean; virtual; + function AuthSync : Boolean; virtual; + function VrfySync : Boolean; virtual; + function MailFromSync : Boolean; virtual; + function RcptToSync : Boolean; virtual; + function DataSync : Boolean; virtual; + function QuitSync : Boolean; virtual; + function RsetSync : Boolean; virtual; + function AbortSync : Boolean; virtual; + function OpenSync : Boolean; virtual; + function MailSync : Boolean; virtual; + published + property Timeout : Integer read FTimeout + write FTimeout; + property MultiThreaded : Boolean read FMultiThreaded + write FMultiThreaded; + end; + +{ Function to convert a TDateTime to an RFC822 timestamp string } +function Rfc822DateTime(t : TDateTime) : String; + +procedure Register; + +implementation + +{$B-} { Partial boolean evaluation } + +type + TLookup = array [0..64] of Char; + TLookup2 = array[0..127] of Byte; + +const + Base64Out: TLookup = + ( + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '=' + ); + Base64In: TLookup2 = + ( + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 255, 255, 255, 64, 255, 255, 255, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 255, 255, 255, 255, 255 + ); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RTrim(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LTrim(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then { Petite optimisation: pas d'espace } + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := LTrim(Rtrim(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function stpblk(PValue : PChar) : PChar; +begin + Result := PValue; + while Result^ in [' ', #9, #10, #13] do + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Base64Encode(Input : String) : String; +var + Final : String; + Count : Integer; + Len : Integer; +begin + Final := ''; + Count := 1; + Len := Length(Input); + while Count <= Len do begin + Final := Final + Base64Out[(Byte(Input[Count]) and $FC) shr 2]; + if (Count + 1) <= Len then begin + Final := Final + Base64Out[((Byte(Input[Count]) and $03) shl 4) + + ((Byte(Input[Count+1]) and $F0) shr 4)]; + if (Count+2) <= Len then begin + Final := Final + Base64Out[((Byte(Input[Count+1]) and $0F) shl 2) + + ((Byte(Input[Count+2]) and $C0) shr 6)]; + Final := Final + Base64Out[(Byte(Input[Count+2]) and $3F)]; + end + else begin + Final := Final + Base64Out[(Byte(Input[Count+1]) and $0F) shl 2]; + Final := Final + '='; + end + end + else begin + Final := Final + Base64Out[(Byte(Input[Count]) and $03) shl 4]; + Final := Final + '=='; + end; + Count := Count + 3; + end; + Result := Final; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Base64Decode(Input : String) : String; +var + Final : String; + Count : Integer; + Len : Integer; + DataIn0 : Byte; + DataIn1 : Byte; + DataIn2 : Byte; + DataIn3 : Byte; +begin + Final := ''; + Count := 1; + Len := Length(Input); + while Count <= Len do begin + DataIn0 := Base64In[Byte(Input[Count])]; + DataIn1 := Base64In[Byte(Input[Count+1])]; + DataIn2 := Base64In[Byte(Input[Count+2])]; + DataIn3 := Base64In[Byte(Input[Count+3])]; + + Final := Final + Char(((DataIn0 and $3F) shl 2) + + ((DataIn1 and $30) shr 4)); + if DataIn2 <> $40 then begin + Final := Final + Char(((DataIn1 and $0F) shl 4) + + ((DataIn2 and $3C) shr 2)); + if DataIn3 <> $40 then + Final := Final + Char(((DataIn2 and $03) shl 6) + + (DataIn3 and $3F)); + end; + Count := Count + 4; + end; + Result := Final; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$I+} { Activate I/O check (EInOutError exception generated) } + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.InitUUEncode(var hFile: File; sFile: string); +var + OldFileMode : Byte; +begin + AssignFile(hFile, sFile); + OldFileMode := FileMode; + FileMode := 0; { Force readonly } + try + Reset(hFile, 1); + finally + FileMode := OldFileMode; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.DoUUEncode(var hFile: File; var sLine: string; var More: boolean); +var + Count : integer; + DataIn : array [0..2] of byte; + DataOut : array [0..80] of byte; + ByteCount : integer; + i : integer; +begin + Count := 0; +{$I-} + while not Eof(hFile) do begin +{$I+} + BlockRead(hFile, DataIn, 3, ByteCount); + DataOut[Count] := (DataIn[0] and $FC) shr 2; + DataOut[Count + 1] := (DataIn[0] and $03) shl 4; + if ByteCount > 1 then begin + DataOut[Count + 1] := DataOut[Count + 1] + + (DataIn[1] and $F0) shr 4; + DataOut[Count + 2] := (DataIn[1] and $0F) shl 2; + if ByteCount > 2 then begin + DataOut[Count + 2] := DataOut[Count + 2] + + (DataIn[2] and $C0) shr 6; + DataOut[Count + 3] := (DataIn[2] and $3F); + end + else begin + DataOut[Count + 3] := $40; + end; + end + else begin + DataOut[Count + 2] := $40; + DataOut[Count + 3] := $40; + end; + + for i := 0 to 3 do + DataOut[Count + i] := Byte(Base64Out[DataOut[Count + i]]); + + Count := Count + 4; + + if Count > 59 then + break; + end; + + DataOut[Count] := $0; + sLine := StrPas(@DataOut[0]); + +{$I-} + More := not Eof(hFile); +{$I+} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.EndUUEncode(var hFile: File); +begin + CloseFile(hFile); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NOFORMS} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function SmtpClientWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TObject; + MsgRec : TMessage; +begin + { At window creation asked windows to store a pointer to our object } + Obj := TObject(GetWindowLong(ahWnd, 0)); + + { If the pointer doesn't represent a TCustomSmtpClient, just call the default procedure} + if not (Obj is TCustomSmtpClient) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass parameter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + { May be a try/except around next line is needed. Not sure ! } + TCustomSmtpClient(Obj).WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSmtpClient.SmtpClientAllocateHWnd(Method: TWndMethod) : HWND; +begin +{$IFDEF NOFORMS} + Result := XSocketAllocateHWnd(Self); + SetWindowLong(Result, GWL_WNDPROC, LongInt(@SmtpClientWindowProc)); +{$ELSE} + Result := WSocket.AllocateHWnd(Method); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SmtpClientDeallocateHWnd(WHandle : HWND); +begin +{$IFDEF NOFORMS} + XSocketDeallocateHWnd(WHandle); +{$ELSE} + WSocket.DeallocateHWnd(WHandle); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomSmtpClient.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWindowHandle := SmtpClientAllocateHWnd(WndProc); + FWSocket := TWSocket.Create(nil); + FWSocket.OnSessionClosed := WSocketSessionClosed; + FState := smtpReady; + FRcptName := TStringList.Create; + FMailMessage := TStringList.Create; + FPort := 'smtp'; + FCharSet := 'iso-8859-1'; + FAuthType := smtpAuthNone; + FLocalAddr := '0.0.0.0'; {bb} + SetContentType(smtpPlainText); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomSmtpClient.Destroy; +begin + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + if Assigned(FHdrLines) then begin + FHdrLines.Destroy; + FHdrLines := nil; + end; + + FMailMessage.Destroy; + FRcptName.Destroy; + + SmtpClientDeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + case Msg of + WM_SMTP_REQUEST_DONE : WMSmtpRequestDone(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WMSmtpRequestDone(var msg: TMessage); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, FRequestType, Msg.LParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetInteger(Data : PChar; var Number : Integer) : PChar; +var + bSign : Boolean; +begin + Number := 0; + Result := StpBlk(Data); + + if (Result = nil) then + Exit; + + { Remember the sign } + if Result^ in ['-', '+'] then begin + bSign := (Result^ = '-'); + Inc(Result); + end + else + bSign := FALSE; + + { Convert any number } + while (Result^ <> #0) and (Result^ in ['0'..'9']) do begin + Number := Number * 10 + ord(Result^) - ord('0'); + Inc(Result); + end; + + { Correct for sign } + if bSign then + Number := -Number; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.CheckReady; +begin + if not (FState in [smtpReady, smtpInternalReady]) then + raise SmtpException.Create('SMTP component not ready'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerStateChange; +begin + if Assigned(FOnStateChange) then + FOnStateChange(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerSessionConnected(ErrorCode : Word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, ErrorCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerSessionClosed(ErrorCode : Word); +begin + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, ErrorCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerRequestDone(ErrorCode: Word); +begin + if not FRequestDoneFlag then begin + FRequestDoneFlag := TRUE; + +{ --Jake Traynham, 06/12/01 Bug - removed "(ErrorCode = 0) and" because we } +{ want DoHighLevelAsync to handle any errors } +{ we get while doing a High Level function: } +{ *bug* if (ErrorCode = 0) and Assigned(FNextRequest) then begin } + if Assigned(FNextRequest) then begin + if FState <> smtpAbort then + StateChange(smtpInternalReady); + FNextRequest; + end + else begin + StateChange(smtpReady); + { Restore the lastresponse saved before quit command } + if FHighLevelFlag and (FStatusCodeSave >= 0) then begin + FLastResponse := FLastResponseSave; + FStatusCode := FStatusCodeSave; + end; + FHighLevelFlag := FALSE; + PostMessage(Handle, WM_SMTP_REQUEST_DONE, 0, ErrorCode); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.StateChange(NewState : TSmtpState); +begin + if FState <> NewState then begin + FState := NewState; + TriggerStateChange; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerDisplay(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.DisplayLastResponse; +begin + TriggerDisplay('< ' + FLastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WSocketDataAvailable(Sender: TObject; ErrorCode: Word); +var + Len : Integer; + I : Integer; + p : PChar; +begin + Len := FWSocket.Receive(@FReceiveBuffer[FReceiveLen], + sizeof(FReceiveBuffer) - FReceiveLen); + + if Len <= 0 then + Exit; + + FReceiveBuffer[FReceiveLen + Len] := #0; + FReceiveLen := FReceiveLen + Len; + + while FReceiveLen > 0 do begin + I := Pos(#13#10, FReceiveBuffer); + if I <= 0 then + break; + if I > FReceiveLen then + break; + + FLastResponse := Copy(FReceiveBuffer, 1, I - 1); + TriggerResponse(FLastResponse); + +{$IFDEF DUMP} + FDumpBuf := '>|'; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.WriteBuffer(FLastResponse[1], Length(FLastResponse)); + FDumpBuf := '|' + #13#10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} +{$IFDEF VER80} + { Add a nul byte at the end of string for Delphi 1 } + FLastResponse[Length(FLastResponse) + 1] := #0; +{$ENDIF} + FReceiveLen := FReceiveLen - I - 1; + if FReceiveLen > 0 then + Move(FReceiveBuffer[I + 1], FReceiveBuffer[0], FReceiveLen + 1); + + if FState = smtpWaitingBanner then begin + DisplayLastResponse; + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Continue; { Continuation line, ignore } + if FStatusCode <> 220 then begin + SetErrorMessage; + FRequestResult := FStatusCode; + FWSocket.Close; + Exit; + end; + + StateChange(smtpConnected); + TriggerSessionConnected(ErrorCode); + + if Assigned(FWhenConnected) then + FWhenConnected + else begin + TriggerRequestDone(0); + end; + end + else if FState = smtpWaitingResponse then begin + if Assigned(FNext) then + FNext + else + raise SmtpException.Create('Program error: FNext is nil'); + end + else begin + { Unexpected data received } + DisplayLastResponse; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WSocketSessionConnected(Sender: TObject; ErrorCode: Word); +begin + { Do not trigger the client SessionConnected from here. We must wait } + { to have received the server banner. } + if ErrorCode <> 0 then begin + FLastResponse := '500 ' + WSocketErrorDesc(ErrorCode) + + ' (Winsock error #' + IntToStr(ErrorCode) + ')'; + FStatusCode := 500; + FConnected := FALSE; +{ --Jake Traynham, 06/12/01 Bug - Need to set FRequestResult so High } +{ Level Open will exit out. (See also } +{ TriggerRequestDone bug.) } + FRequestResult:= 500; + SetErrorMessage; + TriggerRequestDone(ErrorCode); + FWSocket.Close; + StateChange(smtpReady); + end + else begin + FConnected := TRUE; + StateChange(smtpWaitingBanner); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WSocketDnsLookupDone( + Sender : TObject; + ErrorCode : Word); +begin + if ErrorCode <> 0 then begin + FLastResponse := '500 ' + WSocketErrorDesc(ErrorCode) + + ' (Winsock error #' + IntToStr(ErrorCode) + ')'; + FStatusCode := 500; + SetErrorMessage; + FRequestResult := ErrorCode; + TriggerRequestDone(ErrorCode); + end + else begin + FWSocket.Addr := FWSocket.DnsResult; + FWSocket.LocalAddr := FLocalAddr; {bb} + FWSocket.Proto := 'tcp'; + FWSocket.Port := FPort; + FWSocket.OnSessionConnected := WSocketSessionConnected; + FWSocket.OnDataAvailable := WSocketDataAvailable; + StateChange(smtpConnecting); + try + FWSocket.Connect; + except + on E:Exception do begin + FLastResponse := '500 ' + E.ClassName + ': ' + E.Message; + FStatusCode := 500; + FRequestResult := FStatusCode; + SetErrorMessage; + { TriggerRequestDone(FStatusCode); } + TriggerRequestDone(FWSocket.LastError); { Apr 01, 2002 } + end; + end + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SendCommand(Cmd : String); +begin + TriggerCommand(Cmd); + TriggerDisplay('> ' + Cmd); + if FWSocket.State = wsConnected then + FWSocket.SendStr(Cmd + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.ExecAsync( + RqType : TSmtpRequest; + Cmd : String; { Command to execute } + OkResponses : array of Word; { List of responses like '200 221 342' } + DoneAsync : TSmtpNextProc); { What to do when done } +var + I : Integer; +begin + CheckReady; + + if not FConnected then + raise SmtpException.Create('SMTP component not connected'); + + if not FHighLevelFlag then + FRequestType := RqType; + + for I := 0 to High(OkResponses) do + FOkResponses[I] := OkResponses[I]; + FOkResponses[High(OkResponses) + 1] := 0; + + FRequestDoneFlag := FALSE; + FNext := NextExecAsync; + FDoneAsync := DoneAsync; + StateChange(smtpWaitingResponse); + SendCommand(Cmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.NextExecAsync; +var + I : Integer; + p : PChar; +begin + DisplayLastResponse; + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Exit; { Continuation line, nothing to do } + + if FOkResponses[0] = 0 then begin + { The list of ok responses is empty } + if FStatusCode >= 500 then begin + { Not a good response } + FRequestResult := FStatusCode; + SetErrorMessage; + end + else + FRequestResult := 0; + end + else begin + { We have a list of ok response codes } + for I := 0 to High(FOkResponses) do begin + if FOkResponses[I] = 0 then begin + { No good response found } + FRequestResult := FStatusCode; + SetErrorMessage; + break; + end; + if FOkResponses[I] = FStatusCode then begin + { Good response found } + FRequestResult := 0; + Break; + end; + end; + end; + + if Assigned(FDoneAsync) then + FDoneAsync + else if (FRequestType <> smtpQuit) or (FConnected = FALSE) then + TriggerRequestDone(FRequestResult) + else begin + { We have to wait until remote host close connection before } + { calling TriggerRequestDone. See WSocketSessionClosed. } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Helo; +begin + FFctPrv := smtpFctHelo; + if FSignOn = '' then + ExecAsync(smtpHelo, 'HELO ' + LocalHostName, [250], nil) + else + ExecAsync(smtpHelo, 'HELO ' + FSignOn, [250], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Ehlo; +begin + FFctPrv := smtpFctEhlo; + if FSignOn = '' then + ExecAsync(smtpEhlo, 'EHLO ' + LocalHostName, [250], EhloNext) + else + ExecAsync(smtpEhlo, 'EHLO ' + FSignOn, [250], EhloNext); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.EhloNext; +begin + { It's possible that some really old mail servers will disconnect you } + { if you use the 'EHLO' command. If we've been disconnected, then do } + { nothing. RequestDone event handler is called from socket } + { SessionClose event. } + if not FConnected + then Exit; + + if (FRequestResult = 0) + then FESmtpSupported := TRUE; + + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Auth; +var + AuthPlain : String; +begin + { If ESMTP is not supported, or if we didn't start with EHLO, then we } + { can't use the AUTH command. } + if (not FESmtpSupported) + then begin + FLastResponse := '500 ESMTP not supported.'; + SetErrorMessage; + TriggerRequestDone(500); + Exit; + end; + + FFctPrv := smtpFctAuth; + case FAuthType of + smtpAuthNone : + begin + { shouldn't happen } + FLastResponse := '500 No Authorization Type Selected.'; + SetErrorMessage; + TriggerRequestDone(500); + Exit; + end; + smtpAuthPlain : + begin + AuthPlain := FUsername; + AuthPlain := AuthPlain + #0; + if (FFromName <> '') {FromName should be set before calling Auth} + then + AuthPlain := AuthPlain + FFromname + else + AuthPlain := AuthPlain + FUsername; + AuthPlain := AuthPlain + #0; + AuthPlain := AuthPlain + FPassword; + AuthPlain := Base64Encode(AuthPlain); + ExecAsync(smtpAuth, 'AUTH PLAIN ' + AuthPlain, [235], nil); + end; + smtpAuthLogin : + begin + ExecAsync(smtpAuth, 'AUTH LOGIN', [334], AuthNextLogin); + end; + smtpAuthCramMD5 : + begin + ExecAsync(smtpAuth, 'AUTH CRAM-MD5', [334], AuthNextCramMD5); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.AuthNextLogin; +begin + { If there was an error, tell the user and exit. } + if (FRequestResult <> 0) + then begin + TriggerRequestDone(FRequestResult); + Exit; + end; + + FState := smtpInternalReady; + ExecAsync(smtpAuth, Base64Encode(FUsername), [334], AuthNextLoginNext); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.AuthNextLoginNext; +begin + { If there was an error, tell the user and exit. } + if (FRequestResult <> 0) + then begin + TriggerRequestDone(FRequestResult); + Exit; + end; + + FState := smtpInternalReady; + ExecAsync(smtpAuth, Base64Encode(FPassword), [235], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.AuthNextCramMD5; +var + Challenge : String; + Response : String; + HexDigits : String; + MD5Digest : TMD5Digest; + MD5Context : TMD5Context; + Count : Integer; + IPAD : Array[0..63] of Byte; + OPAD : Array[0..63] of Byte; +begin + { If there was an error, tell the user and exit. } + if (FRequestResult <> 0) + then begin + TriggerRequestDone(FRequestResult); + Exit; + end; + + { Server should be returning something like } + { 334 PDEyMzc5MTU3NTAtNjMwNTcxMzRAZm9vLmJhci5jb20+ } + { If it does not, then exit. } + if (Length(FLastResponse) < 5) + then begin + FLastResponse := '500 Malformed MD5 Challege: ' + FLastResponse; + SetErrorMessage; + TriggerRequestDone(500); + Exit; + end; + + Challenge := Copy(FLastResponse, 5, Length(FLastResponse) - 4); + + Challenge := Base64Decode(Challenge); + + {See RFC2104 } + for Count := 0 to 63 do + begin + if ((Count+1) <= Length(FPassword)) + then begin + IPAD[Count] := Byte(FPassword[Count+1]) xor $36; + OPAD[Count] := Byte(FPassword[Count+1]) xor $5C; + end + else begin + IPAD[Count] := 0 xor $36; + OPAD[Count] := 0 xor $5C; + end; + end; + + MD5Init(MD5Context); + MD5Update(MD5Context, IPAD, 64); + MD5UpdateBuffer(MD5Context, @Challenge[1], Length(Challenge)); + MD5Final(MD5Digest, MD5Context); + + MD5Init(MD5Context); + MD5Update(MD5Context, OPAD, 64); + MD5Update(MD5Context, MD5Digest, 16); + MD5Final(MD5Digest, MD5Context); + + HexDigits := '0123456789abcdef'; + Response := FUsername; + Response := Response + ' '; + for Count := 0 to 15 do + begin + Response := Response + HexDigits[((Byte(MD5Digest[Count]) and $F0) shr 4)+1]; + Response := Response + HexDigits[(Byte(MD5Digest[Count]) and $0F)+1]; + end; + + FState := smtpInternalReady; + ExecAsync(smtpAuth, Base64Encode(Response), [235], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Vrfy; +begin + FFctPrv := smtpFctVrfy; + ExecAsync(smtpVrfy, 'VRFY ' + FHdrTo, [250], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.MailFrom; +begin + FFctPrv := smtpFctMailFrom; + if (Pos('<', FFromName) <> 0) and (Pos('>', FFromName) <> 0) then + ExecAsync(smtpMailFrom, 'MAIL FROM:' + Trim(FFromName), [250], nil) + else + ExecAsync(smtpMailFrom, + 'MAIL FROM:<' + Trim(FFromName) + '>', [250], nil) +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Rset; +begin + FFctPrv := smtpFctRset; + ExecAsync(smtpRset, 'RSET', [250], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.RcptTo; +begin + if FRcptName.Count <= 0 then + raise SmtpException.Create('RcptName list is empty'); + + FItemCount := -1; + RcptToNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.RcptToNext; +var + WhenDone : TSmtpNextProc; +begin + Inc(FItemCount); + if FItemCount >= (FRcptName.Count - 1) then + WhenDone := nil + else + WhenDone := RcptToDone; + FFctPrv := smtpFctRcptTo; + if (Pos('<', FRcptName.Strings[FItemCount]) <> 0) and + (Pos('>', FRcptName.Strings[FItemCount]) <> 0) then + ExecAsync(smtpRcptTo, + 'RCPT TO:' + Trim(FRcptName.Strings[FItemCount]), + [250, 251], WhenDone) + else + ExecAsync(smtpRcptTo, + 'RCPT TO:<' + Trim(FRcptName.Strings[FItemCount])+ '>', + [250, 251], WhenDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.RcptToDone; +begin + FState := smtpInternalReady; + RcptToNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SetContentType(newValue : TSmtpContentType); +begin + if FContentType = newValue then + Exit; + FContentType := newValue; + if FContentType = smtpPlainText then + FContentTypeStr := 'text/plain' + else + FContentTypeStr := 'text/html'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Data; +begin + FLineNum := 0; + FMoreLines := TRUE; + FItemCount := -1; + if not Assigned(FHdrLines) then + FHdrLines := TStringList.Create + else + FHdrLines.Clear; + if not FOwnHeaders then begin + { Angus V2.21 - the body must contain all the headers } + if Length(Trim(FHdrReplyTo)) > 0 then + FHdrLines.Add('Reply-To: ' + FHdrReplyTo); + if Length(Trim(FHdrReturnPath)) > 0 then + FHdrLines.Add('Return-Path: ' + FHdrReturnPath); + if Length(FHdrFrom) > 0 then + FHdrLines.Add('From: ' + FHdrFrom); + if Length(FHdrTo) > 0 then + FHdrLines.Add('To: ' + FHdrTo); + if Length(FHdrCc) > 0 then + FHdrLines.Add('Cc: ' + FHdrCc); + FHdrLines.Add('Subject: ' + FHdrSubject); + if Length(Trim(FHdrSender)) > 0 then + FHdrLines.Add('Sender: ' + FHdrSender) + else if Length(Trim(FHdrFrom)) > 0 then + FHdrLines.Add('Sender: ' + FHdrFrom); + FHdrLines.Add('Mime-Version: 1.0'); + FHdrLines.Add('Content-Type: ' + FContentTypeStr + '; charset="' + FCharSet + '"'); + FHdrLines.Add('Date: ' + Rfc822DateTime(Now)); + FHdrLines.Add('X-Mailer: ICS SMTP Component V' + + IntToStr(SmtpCliVersion div 100) + '.' + + IntToStr(SmtpCliVersion mod 100)); + TriggerProcessHeader(FHdrLines); + { An empty line mark the header's end } + FHdrLines.Add(''); + end + else + FItemCount := 0; + FFctPrv := smtpFctData; + ExecAsync(smtpData, 'DATA', [354], DataNext); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.DataNext; +var + MsgLine : array [0..1023] of char; +begin + { If we have been disconnected, then do nothing. } + { RequestDone event handler is called from socket SessionClose event. } + if not FConnected then begin + FWSocket.OnDataSent := nil; + Exit; + end; + + Inc(FItemCount); + if FItemCount < FHdrLines.Count then begin + { There are still header lines to send } + StrPCopy(@MsgLine, FHdrLines.Strings[FItemCount]); + TriggerHeaderLine(@MsgLine, SizeOf(MsgLine)); + TriggerDisplay('> ' + StrPas(MsgLine)); + FWSocket.OnDataSent := WSocketDataSent; + FWSocket.PutDataInSendBuffer(@MsgLine, strlen(MsgLine)); + FWSocket.SendStr(#13+#10); + end + else begin + { Now we need to send data lines } + if FMoreLines then begin + try + Inc(FLineNum); + TriggerGetData(FLineNum, @MsgLine, High(MsgLine), FMoreLines); + except + FMoreLines := FALSE; + end; + end; + + if FMoreLines then begin + if MsgLine[0] = '.' then + Move(MsgLine[0], MsgLine[1], StrLen(MsgLine) + 1); + TriggerDisplay('> ' + StrPas(MsgLine)); + FWSocket.OnDataSent := WSocketDataSent; + FWSocket.PutDataInSendBuffer(@MsgLine, StrLen(MsgLine)); + FWSocket.SendStr(#13 + #10); + end + else begin + { Send the last message line } + FWSocket.OnDataSent := nil; + ExecAsync(smtpData, '.', [250], nil); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WSocketDataSent(Sender : TObject; ErrorCode : Word); +begin + FState := smtpInternalReady; + DataNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Abort; +begin + StateChange(smtpAbort); + FWSocket.CancelDnsLookup; + FWSocket.Abort; + StateChange(smtpReady); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Connect; +begin + CheckReady; + if FConnected then + raise SmtpException.Create('SMTP component already connected'); + + if not FHighLevelFlag then + FRequestType := smtpConnect; { 10/05/99 } + FRequestDoneFlag := FALSE; + FReceiveLen := 0; + FRequestResult := 0; + FESmtpSupported := FALSE; + StateChange(smtpDnsLookup); + FWSocket.OnDataSent := nil; + FWSocket.OnDnsLookupDone := WSocketDnsLookupDone; + FWSocket.DnsLookup(FHost); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Quit; +begin + CheckReady; + FFctPrv := smtpFctQuit; + if not FConnected then begin + { We are not connected, it's ok... } + FRequestType := smtpQuit; + FRequestDoneFlag := FALSE; + TriggerRequestDone(0); + Exit; + end; + ExecAsync(smtpQuit, 'QUIT', [221], nil); { Should I force a FWSocket.Close } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.DoHighLevelAsync; +begin +{$IFDEF TRACE} TriggerDisplay('! HighLevelAsync ' + IntToStr(FRequestResult)); {$ENDIF} + if FState = smtpAbort then begin + {$IFDEF TRACE} TriggerDisplay('! Abort detected'); {$ENDIF} + FFctSet := []; + FHighLevelResult := 426; + FRequestResult := 426; { SJF } + FErrorMessage := '426 Operation aborted.'; + end; + + FNextRequest := DoHighLevelAsync; + + if FRequestResult <> 0 then begin + { Previous command had errors } + { EHLO wasn't supported, so just log in with HELO } + if FFctPrv = smtpFctEhlo then + FFctSet := [smtpFctHelo] + else begin + FHighLevelResult := FRequestResult; + if (FFctPrv = smtpFctQuit) or (not (smtpFctQuit in FFctSet)) then + FFctSet := [] + else + FFctSet := [smtpFctQuit]; + end; + end; + + if smtpFctConnect in FFctSet then begin + FFctPrv := smtpFctConnect; + FFctSet := FFctSet - [FFctPrv]; + Connect; + Exit; + end; + + if smtpFctHelo in FFctSet then begin + FFctPrv := smtpFctHelo; + FFctSet := FFctSet - [FFctPrv]; + Helo; + Exit; + end; + + if smtpFctEhlo in FFctSet then begin + FFctPrv := smtpFctEhlo; + FFctSet := FFctSet - [FFctPrv]; + Ehlo; + Exit; + end; + + if smtpFctAuth in FFctSet then begin + FFctPrv := smtpFctAuth; + FFctSet := FFctSet - [FFctPrv]; + Auth; + Exit; + end; + + if smtpFctVrfy in FFctSet then begin + FFctPrv := smtpFctVrfy; + FFctSet := FFctSet - [FFctPrv]; + Vrfy; + Exit; + end; + + if smtpFctMailFrom in FFctSet then begin + FFctPrv := smtpFctMailFrom; + FFctSet := FFctSet - [FFctPrv]; + MailFrom; + Exit; + end; + + if smtpFctRcptTo in FFctSet then begin + FFctPrv := smtpFctRcptTo; + FFctSet := FFctSet - [FFctPrv]; + RcptTo; + Exit; + end; + + if smtpFctData in FFctSet then begin + FFctPrv := smtpFctData; + FFctSet := FFctSet - [FFctPrv]; + Data; + Exit; + end; + + if smtpFctQuit in FFctSet then begin + FFctPrv := smtpFctQuit; + FFctSet := FFctSet - [FFctPrv]; + Quit; + Exit; + end; + + {$IFDEF TRACE} TriggerDisplay('! HighLevelAsync done'); {$ENDIF} + FFctSet := []; + FNextRequest := nil; + FRequestDoneFlag := FALSE; + TriggerRequestDone(FHighLevelResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.HighLevelAsync( + RqType : TSmtpRequest; Fcts : TSmtpFctSet); +begin + if FConnected and (smtpFctConnect in Fcts) then + raise SmtpException.Create('SMTP component already connected'); + CheckReady; + FLastResponseSave := FLastResponse; + FStatusCodeSave := -1; + FRequestType := RqType; + FRequestResult := 0; + FFctSet := Fcts; + FFctPrv := smtpFctNone; + FHighLevelResult := 0; + FHighLevelFlag := TRUE; + FLastResponse := ''; + FErrorMessage := ''; + FRestartFlag := FALSE; + DoHighLevelAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Open; +begin + if FAuthType <> smtpAuthNone then + HighLevelAsync(smtpOpen, [smtpFctConnect, smtpFctEhlo, smtpFctAuth]) + else + HighLevelAsync(smtpOpen, [smtpFctConnect, smtpFctHelo]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Mail; +begin + HighLevelAsync(smtpMail, [smtpFctMailFrom, smtpFctRcptTo, smtpFctData]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WSocketSessionClosed(Sender : TObject; ErrorCode : WORD); +begin + FConnected := FALSE; + TriggerSessionClosed(ErrorCode); + if FRequestType = smtpQuit then + TriggerRequestDone(0) { We where just waiting for close } + else + TriggerRequestDone(WSAEINTR); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerHeaderLine(Line : Pointer; Size : Integer); +begin + if Assigned(FOnHeaderLine) then + FOnHeaderLine(Self, Line, Size); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerGetData( + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); +begin + if not Assigned(FOnGetData) then + More := FALSE + else + FOnGetData(Self, LineNum, MsgLine, MaxLen, More); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SetRcptName(newValue : TStrings); +var + I : Integer; +begin + FRcptName.Clear; + for I := 0 to newValue.Count - 1 do + FRcptName.Add(newValue.Strings[I]); +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SetMailMessage(newValue : TStrings); +var + I : Integer; +begin + FMailMessage.Clear; + for I := 0 to newValue.Count - 1 do + FMailMessage.Add(newValue.Strings[I]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +{ Delphi 1 lack this function. The time will be wrong ! } +function TimeZoneBias : TDateTime; +begin + Result := 0; +end; +{$ELSE} +function TimeZoneBias : TDateTime; +const + Time_Zone_ID_DayLight = 2; +var + TZI : tTimeZoneInformation; + TZIResult : Integer; + aBias : Integer; // En minutes +begin + TZIResult := GetTimeZoneInformation(TZI); + if TZIResult = -1 then + Result := 0 + else begin + if TZIResult = Time_Zone_ID_DayLight then + aBias := TZI.Bias + TZI.DayLightBias + else + aBias := TZI.Bias + TZI.StandardBias; + Result := EncodeTime(Abs(aBias) div 60, Abs(aBias) mod 60, 0, 0); + if aBias < 0 then + Result := -Result; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Rfc822DateTime(t : TDateTime) : String; +var + Year, Month, Day : WORD; + Hour, Min, Sec, MSec : WORD; + Gmt : TDateTime; +const + Days : array [1..7] of string = + ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); + Months : array [1..12] of string = + ('Jan', 'Feb', 'Mar', 'Apr', + 'May', 'Jun', 'Jul', 'Aug', + 'Sep', 'Oct', 'Nov', 'Dec'); +begin + Gmt := T + TimeZoneBias; + DecodeDate(Gmt, Year, Month, Day); + DecodeTime(Gmt, Hour, Min, Sec, MSec); + { Format is 'ddd, d mmm yyyy hh:mm:ss GMT' with english names } + Result := Format('%s, %d %s %4d %02.2d:%02.2d:%02.2d GMT', + [Days[DayOfWeek(Gmt)], + Day, Months[Month], Year, + Hour, Min, Sec]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} +function TimeZoneBias : String; +{$IFDEF VER80} { Delphi 1 doesn't support timezone API } +begin + Result := '-0000'; +end; +{$ELSE} +const + Time_Zone_ID_DayLight = 2; +var + TZI : tTimeZoneInformation; + TZIResult : Integer; + aBias : Integer; +begin + TZIResult := GetTimeZoneInformation(TZI); + if TZIResult = -1 then + Result := '-0000' + else begin + if TZIResult = Time_Zone_ID_DayLight then { 10/05/99 } + aBias := TZI.Bias + TZI.DayLightBias + else + aBias := TZI.Bias + TZI.StandardBias; + Result := Format('-%.2d%.2d', [Abs(aBias) div 60, Abs(aBias) mod 60]); + if aBias < 0 then + Result[1] := '+'; + end; +end; +{$ENDIF} +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} +function Rfc822DateTime(t : TDateTime) : String; +var + I : Integer; + SaveShortDayNames : array[1..7] of string; + SaveShortMonthNames : array[1..12] of string; +const + MyShortDayNames: array[1..7] of string = + ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); + MyShortMonthNames: array[1..12] of string = + ('Jan', 'Feb', 'Mar', 'Apr', + 'May', 'Jun', 'Jul', 'Aug', + 'Sep', 'Oct', 'Nov', 'Dec'); +begin + if ShortDayNames[1] = MyShortDayNames[1] then + Result := FormatDateTime('ddd, d mmm yyyy hh:mm:ss', t) + + ' ' + TimeZoneBias + else begin + { We used a localized Delphi version, the day and month names are no } + { more english names ! We need to save and replace them } + for I := Low(ShortDayNames) to High(ShortDayNames) do begin + SaveShortDayNames[I] := ShortDayNames[I]; + ShortDayNames[I] := MyShortDayNames[I]; + end; + + for I := Low(ShortMonthNames) to High(ShortMonthNames) do begin + SaveShortMonthNames[I] := ShortMonthNames[I]; + ShortMonthNames[I] := MyShortMonthNames[I]; + end; + + Result := FormatDateTime('ddd, d mmm yyyy hh:mm:ss', t) + + ' ' + TimeZoneBias; + + for I := Low(ShortDayNames) to High(ShortDayNames) do + ShortDayNames[I] := SaveShortDayNames[I]; + for I := Low(ShortMonthNames) to High(ShortMonthNames) do + ShortMonthNames[I] := SaveShortMonthNames[I]; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerProcessHeader(HdrLines : TStrings); +begin + if Assigned(FOnProcessHeader) then + FOnProcessHeader(Self, HdrLines); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerCommand(Msg : String); +begin + if Assigned(FOnCommand) then + FOnCommand(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerResponse(Msg : String); +begin + if Assigned(FOnResponse) then + FOnResponse(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.ClearErrorMessage; +begin + FErrorMessage := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SetErrorMessage; +begin + if FErrorMessage = '' then + FErrorMessage := FLastResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TSmtpCli.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FEmailBody := TStringList.Create; + FEmailFiles := TStringList.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TSmtpCli.Destroy; +begin + if Assigned(FEmailBody) then begin + FEMailBody.Destroy; + FEMailBody := nil; + end; + if Assigned(FEmailFiles) then begin + FEmailFiles.Destroy; + FEmailFiles := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.TriggerAttachContentType( + FileNumber : Integer; + var FileName : String; + var ContentType : String); +begin + if Assigned(FOnAttachContentType) then + FOnAttachContentType(Self, FileNumber, FileName, ContentType); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.TriggerAttachHeader( + FileNumber : Integer; + FileName : String; + HdrLines : TStrings); +begin + if Assigned(FOnAttachHeader) then + FOnAttachHeader(Self, FileNumber, FileName, HdrLines); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.TriggerGetData( + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); +var + sLine : String; + FileName : String; + sFileName : String; + sContentType : String; +begin + if FEmailBody.Count > 0 then begin + if MaxLen > 1023 then + MaxLen := 1023; { RFC say 1024 char max, including nul char } + StrPLCopy(MsgLine, FEmailBody[0], MaxLen); + FEmailBody.Delete(0); + More := TRUE; + Exit; + end; + + if FBodyFlag then begin + Inc(FBodyLine); + inherited TriggerGetData(FBodyLine, MsgLine, MaxLen, More); + if More then + Exit; + FBodyFlag := FALSE; + end; + + if not FFileStarted then begin + if (not Assigned(FEMailFiles)) or + (FEmailFiles.Count <= FCurrentFile) then begin + { No file to send } + More := FALSE; + Exit; + end; + + StrPCopy(MsgLine, ''); + FileName := FEmailFiles[FCurrentFile]; + InitUUEncode(FFile, FileName); + sFileName := ExtractFileName(FileName); + sContentType := 'application/octet-stream'; + TriggerAttachContentType(FCurrentFile, sFileName, sContentType); + FEmailBody.Add('--' + FMimeBoundary); + FEmailBody.Add('Content-Type: ' + sContentType + ';'); + FEmailBody.Add(#9'name="' + sFileName + '"'); + FEmailBody.Add('Content-Transfer-Encoding: base64'); + FEmailBody.Add('Content-Disposition: attachment;'); + FEmailBody.Add(#9'filename="' + ExtractFileName(FileName) + '"'); + TriggerAttachHeader(FCurrentFile, sFileName, FEmailBody); + FEmailBody.Add(''); + FFileStarted := TRUE; + More := TRUE; + Exit; + end; + + DoUUEncode(FFile, sLine, More); + StrPCopy(MsgLine, sLine); + if not More then begin { we hit the end of file. } + EndUUEncode(FFile); + FFileStarted := FALSE; + Inc(FCurrentFile); + if (FEmailFiles.Count <= FCurrentFile) then begin + FEmailBody.Add(''); + FEmailBody.Add('--' + FMimeBoundary + '--'); + end; + More := TRUE; + Exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.TriggerHeaderLine(Line : Pointer; Size : Integer); +begin + { if we have a MIME type message, then replace the content-type } + { header with the proper MIME content-type. } + if FMimeBoundary <> '' then begin + if StrLIComp('CONTENT-TYPE:', Line, 13) = 0 then + StrPCopy(Line, 'Content-Type: multipart/mixed;'#13#10#9'boundary="' + + FMimeBoundary + '"'); + end; + inherited TriggerHeaderLine(Line, Size); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.SetEMailFiles(newValue : TStrings); +var + I : Integer; + FilePath : String; +begin + FEMailFiles.Clear; + if not Assigned(newValue) then + Exit; + for I := 0 to newValue.Count - 1 do begin + FilePath := Trim(newValue.Strings[I]); + { Ignore any empty file name (a very common error !) } + if FilePath > '' then begin + { Check if file exists and raise an exception if not } + if FileExists(FilePath) then + FEMailFiles.Add(FilePath) + else + raise SmtpException.Create('File not found ''' + FilePath + ''''); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.Data; +begin + PrepareEMail; + inherited Data; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.PrepareEMail; +var i : integer; +begin + FBodyFlag := TRUE; + FCurrentFile := 0; + FBodyLine := 0; + FFileStarted := FALSE; + + FEmailBody.Clear; + if Assigned(FEMailFiles) and (FEmailFiles.Count > FCurrentFile) then begin + FMimeBoundary := '= Multipart Boundary ' + + FormatDateTime('mmddyyhhnn', Now); + + FEmailBody.Add('This is a multipart MIME message.'); + FEmailBody.Add(''); + FEmailBody.Add('--' + FMimeBoundary); + FEmailBody.Add('Content-Type: ' + FContentTypeStr + '; charset="' + FCharSet + '"'); + FEmailBody.Add('Content-Transfer-Encoding: 7bit'); + FEmailBody.Add(''); + end + else + FMimeBoundary := ''; + + for i := 0 to FMailMessage.Count - 1 do + FEmailBody.Add(FMailMessage.Strings[I]); + +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TSyncSmtpCli.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FTimeout := 15; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.WaitUntilReady : Boolean; +begin + Result := TRUE; { Suppose success } + FTimeStop := Integer(GetTickCount) + FTimeout * 1000; + while TRUE do begin + if FState = smtpReady then begin + { Back to ready state, the command is finiched } + Result := (FRequestResult = 0); + break; + end; + + if {$IFNDEF NOFORMS} Application.Terminated or {$ENDIF} + ((FTimeout > 0) and (Integer(GetTickCount) > FTimeStop)) then begin + { Application is terminated or timeout occured } + inherited Abort; + FErrorMessage := '426 Timeout'; + FStatusCode := 426; + Result := FALSE; { Command failed } + break; + end; +{$IFNDEF VER80} + if FMultiThreaded then + FWSocket.ProcessMessages + else +{$ENDIF} +{$IFNDEF NOFORMS} + Application.ProcessMessages; +{$ELSE} + FWSocket.ProcessMessages; +{$ENDIF} +{$IFNDEF VER80} + { Do not use 100% CPU, but slow down transfert on high speed LAN } + Sleep(0); +{$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.Synchronize(Proc : TSmtpNextProc) : Boolean; +begin + try + Proc; + Result := WaitUntilReady; + except + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.ConnectSync : Boolean; +begin + Result := Synchronize(Connect); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.HeloSync : Boolean; +begin + Result := Synchronize(Helo); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.EhloSync : Boolean; +begin + Result := Synchronize(Ehlo); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.AuthSync : Boolean; +begin + Result := Synchronize(Auth); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.VrfySync : Boolean; +begin + Result := Synchronize(Vrfy); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.OpenSync : Boolean; +begin + Result := Synchronize(Open); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.MailFromSync : Boolean; +begin + Result := Synchronize(MailFrom); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.RcptToSync : Boolean; +begin + Result := Synchronize(RcptTo); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.DataSync : Boolean; +begin + Result := Synchronize(Data); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.MailSync : Boolean; +begin + Result := Synchronize(Mail); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.QuitSync : Boolean; +begin + Result := Synchronize(Quit); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.RsetSync : Boolean; +begin + Result := Synchronize(RSet); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.AbortSync : Boolean; +begin + Result := Synchronize(Abort); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSyncSmtpCli.TriggerGetData( + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); +begin + inherited TriggerGetData(LineNum, MsgLine, MaxLen, More); + { Evaluate the timeout period again } + if FTimeout > 0 then + FTimeStop := Integer(GetTickCount) + FTimeout * 1000; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TSmtpCli, TSyncSmtpCli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/TNCNX.HLP b/lib/Delphi/Vc32/TNCNX.HLP new file mode 100644 index 00000000..b93785dc Binary files /dev/null and b/lib/Delphi/Vc32/TNCNX.HLP differ diff --git a/lib/Delphi/Vc32/TnCnx.dcu b/lib/Delphi/Vc32/TnCnx.dcu new file mode 100644 index 00000000..fbb70255 Binary files /dev/null and b/lib/Delphi/Vc32/TnCnx.dcu differ diff --git a/lib/Delphi/Vc32/TnCnx.pas b/lib/Delphi/Vc32/TnCnx.pas new file mode 100644 index 00000000..76d1b1c2 --- /dev/null +++ b/lib/Delphi/Vc32/TnCnx.pas @@ -0,0 +1,714 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: TNCNX.PAS +Object: Delphi component which implement the TCP/IP telnet protocol + including some options negociations. + RFC854, RFC885, RFC779, RFC1091 +Author: Franois PIETTE +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Creation: April, 1996 +Version: 2.09 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jul 22, 1997 Adapted to Delphi 3 +Sep 5, 1997 Added version information, removed old code, added OnTermType + Renamed some indentifier to be more standard. +Sep 24, 1997 V2.03 Added procedures to negociate options +May 12, 1998 V2.04 Changed NegociateOption to properly handle unwanted + option as Jan Tomasek suggested. +Aug 10, 1998 V2.05 Cleared strSubOption after NegociateSubOption as Jan + Tomasek suggested. +Aug 15, 1999 V2.06 Moved Notification procedure to public section for + BCB4 compatibility +Aug 20, 1999 V2.07 Added compile time options. Revised for BCB4. +Jun 18, 2001 V2.08 Use AllocateHWnd and DeallocateHWnd from wsocket. +Oct 23, 2002 V2.09 Changed Buffer arg in OnDataAvailable to Pointer instead + of PChar to avoid Delphi 7 messing everything with AnsiChar. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnCnx; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Controls, Forms, + WSocket, Winsock; + +const + TnCnxVersion = 209; + CopyRight : String = ' TTnCnx (c) 1996-2002 F. Piette V2.09 '; + + { Telnet command characters } + TNCH_EOR = #239; { $EF End Of Record (preceded by IAC) } + TNCH_SE = #240; { $F0 End of subnegociation parameters } + TNCH_NOP = #241; { $F1 No operation } + TNCH_DATA_MARK = #242; { $F2 Data stream portion of a Synch } + TNCH_BREAK = #243; { $F3 NVT charcater break } + TNCH_IP = #244; { $F4 Interrupt process } + TNCH_AO = #245; { $F5 Abort output } + TNCH_AYT = #246; { $F6 Are you there } + TNCH_EC = #247; { $F7 Erase character } + TNCH_EL = #248; { $F8 Erase line } + TNCH_GA = #249; { $F9 Go ahead } + TNCH_SB = #250; { $FA Subnegociation } + TNCH_WILL = #251; { $FB Will } + TNCH_WONT = #252; { $FC Wont } + TNCH_DO = #253; { $FD Do } + TNCH_DONT = #254; { $FE Dont } + TNCH_IAC = #255; { $FF IAC } + + { Telnet options } + TN_TRANSMIT_BINARY = #0; { $00 } + TN_ECHO = #1; { $01 } + TN_RECONNECTION = #2; { $02 } + TN_SUPPRESS_GA = #3; { $03 } + TN_MSG_SZ_NEGOC = #4; { $04 } + TN_STATUS = #5; { $05 } + TN_TIMING_MARK = #6; { $06 } + TN_NOPTIONS = #6; { $06 } + TN_DET = #20; { $14 } + TN_SEND_LOC = #23; { $17 } + TN_TERMTYPE = #24; { $18 } + TN_EOR = #25; { $19 } + TN_NAWS = #31; { $1F } + TN_TERMSPEED = #32; { $20 } + TN_TFC = #33; { $21 } + TN_XDISPLOC = #35; { $23 } + TN_EXOPL = #255; { $FF } + + TN_TTYPE_SEND = #1; + TN_TTYPE_IS = #0; + +type + TTnCnx = class; + + TTnSessionConnected = procedure (Sender: TTnCnx; Error : word) of object; + TTnSessionClosed = procedure (Sender: TTnCnx; Error : word) of object; + TTnDataAvailable = procedure (Sender: TTnCnx; Buffer : Pointer; Len : Integer) of object; + TTnDisplay = procedure (Sender: TTnCnx; Str : String) of object; + + TTnCnx= class(TComponent) + public + Socket : TWSocket; + private + FPort : String; + FHost : String; + FLocation : String; + FTermType : String; + RemoteBinMode : Boolean; + LocalBinMode : Boolean; + FLocalEcho : Boolean; + Spga : Boolean; + FTType : Boolean; + FBuffer : array [0..2048] of char; + FBufferCnt : Integer; + FWindowHandle : HWND; + FOnSessionConnected : TTnSessionConnected; + FOnSessionClosed : TTnSessionClosed; + FOnDataAvailable : TTnDataAvailable; + FOnDisplay : TTnDisplay; + FOnEOR : TNotifyEvent; + FOnSendLoc : TNotifyEvent; + FOnTermType : TNotifyEvent; + FOnLocalEcho : TNotifyEvent; + procedure WndProc(var MsgRec: TMessage); + procedure SocketSessionConnected(Sender: TObject; Error : word); + procedure SocketSessionClosed(Sender: TObject; Error : word); + procedure SocketDataAvailable(Sender: TObject; Error : word); + procedure Display(Str : String); + procedure AddChar(Ch : Char); + procedure ReceiveChar(Ch : Char); + procedure Answer(chAns : Char; chOption : Char); + procedure NegociateSubOption(strSubOption : String); + procedure NegociateOption(chAction : Char; chOption : Char); + procedure FlushBuffer; + function GetState : TSocketState; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function Send(Data : Pointer; Len : Integer) : integer; + function SendStr(Data : String) : integer; + procedure Connect; + function IsConnected : Boolean; + procedure WillOption(chOption : Char); + procedure WontOption(chOption : Char); + procedure DontOption(chOption : Char); + procedure DoOption(chOption : Char); + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure Close; + procedure Pause; + procedure Resume; + property State : TSocketState read GetState; + property Handle : HWND read FWindowHandle; + published + property Port : String read FPort + write FPort; + property Host : String read FHost + write FHost; + property Location : String read FLocation + write FLocation; + property TermType : String read FTermType + write FTermType; + property LocalEcho : Boolean read FLocalEcho + write FLocalEcho; + property OnSessionConnected : TTnSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TTnSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnDataAvailable : TTnDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnDisplay : TTnDisplay read FOnDisplay + write FOnDisplay; + property OnEndOfRecord : TNotifyEvent read FOnEOR + write FOnEOR; + property OnSendLoc : TNotifyEvent read FOnSendLoc + write FOnSendLoc; + property OnTermType : TNotifyEvent read FOnTermType + write FOnTermType; + property OnLocalEcho : TNotifyEvent read FOnLocalEcho + write FOnLocalEcho; + end; + +procedure Register; + +implementation + +{$DEFINE Debug} { Add or remove minus sign before dollar sign to } + { generate code for debug message output } + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TTnCnx]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DebugString(Msg : String); +const + Cnt : Integer = 0; +var + Buf : String[20]; +begin +{$IFDEF Debug} + Cnt := Cnt + 1; + Buf := IntToHex(Cnt, 4) + ' ' + #0; + OutputDebugString(@Buf[1]); + +{$IFNDEF WIN32} + if Length(Msg) < High(Msg) then + Msg[Length(Msg) + 1] := #0; +{$ENDIF} + + OutputDebugString(@Msg[1]); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WndProc(var MsgRec: TMessage); +begin + with MsgRec do + Result := DefWindowProc(Handle, Msg, wParam, lParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTnCnx.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWindowHandle := WSocket.AllocateHWnd(WndProc); + FLocation := 'TNCNX'; + FTermType := 'VT100'; + FPort := '23'; + Socket := TWSocket.Create(Self); + Socket.OnSessionConnected := SocketSessionConnected; + Socket.OnDataAvailable := SocketDataAvailable; + Socket.OnSessionClosed := SocketSessionClosed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTnCnx.Destroy; +begin + if Assigned(Socket) then begin + Socket.Free; + Socket := nil; + end; + WSocket.DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if (AComponent = Socket) and (Operation = opRemove) then + Socket := nil; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Pause; +begin + if not Assigned(Socket) then + Exit; + Socket.Pause; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Resume; +begin + if not Assigned(Socket) then + Exit; + Socket.Resume; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Connect; +begin + if not Assigned(Socket) then + Exit; + + if Socket.State <> wsClosed then + Socket.Close; + + Socket.Proto := 'tcp'; + Socket.Port := FPort; + Socket.Addr := FHost; + Socket.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.IsConnected : Boolean; +begin + Result := Socket.State = wsConnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Close; +begin + if Assigned(Socket) then + Socket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Display(Str : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Str); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.GetState : TSocketState; +begin + if Assigned(Socket) then + Result := Socket.State + else + Result := wsInvalidState; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketSessionConnected(Sender: TObject; Error : word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketSessionClosed(Sender: TObject; Error : word); +begin + if Socket.State <> wsClosed then + Socket.Close; + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketDataAvailable(Sender: TObject; Error : word); +var + Len, I : Integer; + Buffer : array [1..2048] of char; + Socket : TWSocket; +begin + Socket := Sender as TWSocket; + Len := Socket.Receive(@Buffer[1], High(Buffer)); + if Len = 0 then begin + { Remote has closed } + Display(#13 + #10 + '**** Remote has closed ****' + #13 + #10); + end + else if Len < 0 then begin + { An error has occured } + if Socket.LastError <> WSAEWOULDBLOCK then + Display(#13 + #10 + '**** ERROR: ' + IntToStr(Socket.LastError) + + ' ****' + #13 + #10); + end + else begin + for I := 1 to Len do + ReceiveChar(Buffer[I]); + FlushBuffer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.Send(Data : Pointer; Len : Integer) : integer; +begin + if Assigned(Socket) then + Result := Socket.Send(Data, Len) + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.SendStr(Data : String) : integer; +begin + Result := Send(@Data[1], Length(Data)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Answer(chAns : Char; chOption : Char); +var + Buf : String[3]; +begin +{ DebugString('Answer ' + IntToHex(ord(chAns), 2) + ' ' + IntToHex(ord(ChOption), 2) + #13 + #10); } + Buf := TNCH_IAC + chAns + chOption; + Socket.Send(@Buf[1], Length(Buf)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WillOption(chOption : Char); +begin + Answer(TNCH_WILL, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WontOption(chOption : Char); +begin + Answer(TNCH_WONT, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.DontOption(chOption : Char); +begin + Answer(TNCH_DONT, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.DoOption(chOption : Char); +begin + Answer(TNCH_DO, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.NegociateSubOption(strSubOption : String); +var + Buf : String; +begin +{ DebugString('SubNegociation ' + + IntToHex(ord(strSubOption[1]), 2) + ' ' + + IntToHex(ord(strSubOption[2]), 2) + #13 + #10); } + + case strSubOption[1] of + TN_TERMTYPE: + begin + if strSubOption[2] = TN_TTYPE_SEND then begin +{ DebugString('Send TermType' + #13 + #10); } + if Assigned(FOnTermType) then + FOnTermType(Self); + Buf := TNCH_IAC + TNCH_SB + TN_TERMTYPE + TN_TTYPE_IS + FTermType + TNCH_IAC + TNCH_SE; + Socket.Send(@Buf[1], Length(Buf)); + end; + end; + else +{ DebugString('Unknown suboption' + #13 + #10); } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.NegociateOption(chAction : Char; chOption : Char); +var + Buf : String; +begin +{ DebugString('Negociation ' + IntToHex(ord(chAction), 2) + ' ' + + IntToHex(ord(ChOption), 2) + #13 + #10); } + + case chOption of + TN_TRANSMIT_BINARY: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + RemoteBinMode := TRUE; + LocalBinMode := TRUE; + end + else if chAction = TNCH_WONT then begin + if RemoteBinMode then begin + RemoteBinMode := FALSE; + LocalBinMode := FALSE; + end; + end; + end; + TN_ECHO: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + FLocalEcho := FALSE; + end + else if chAction = TNCH_WONT then begin + FLocalEcho := TRUE; + end; + if Assigned(FOnLocalEcho) then + FOnLocalEcho(self); + end; + TN_SUPPRESS_GA: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + spga := TRUE; + end; + end; + TN_TERMTYPE: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + FTType := TRUE; + end; + end; + TN_SEND_LOC: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + if Assigned(FOnSendLoc) then + FOnSendLoc(Self); + Buf := TNCH_IAC + TNCH_SB + TN_SEND_LOC + FLocation + TNCH_IAC + TNCH_SE; + Socket.Send(@Buf[1], Length(Buf)); + end; + end; + TN_EOR: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + FTType := TRUE; + end; + end; + else +{ Answer(TNCH_WONT, chOption); } + { Jan Tomasek } + if chAction = TNCH_WILL then + Answer(TNCH_DONT, chOption) + else + Answer(TNCH_WONT, chOption); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.FlushBuffer; +var + Buffer : PChar; + Count : Integer; +begin + try + if FBufferCnt > 0 then begin + if Assigned(FOnDataAvailable) then begin + { We need to make a copy for the data because we can reenter } + { during the event processing } + Count := FBufferCnt; { How much we received } + try + GetMem(Buffer, Count + 1); { Alloc memory for the copy } + except + Buffer := nil; + end; + if Buffer <> nil then begin + try + Move(FBuffer, Buffer^, Count); { Actual copy } + Buffer[Count] := #0; { Add a nul byte } + FBufferCnt := 0; { Reset receivecounter } + FOnDataAvailable(Self, Buffer, Count); { Call event handler } + finally + FreeMem(Buffer, Count + 1); { Release the buffer } + end; + end; + end + else begin + FBufferCnt := 0 + end; + end; + except + raise; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.AddChar(Ch : Char); +begin + FBuffer[FBufferCnt] := Ch; + Inc(FBufferCnt); + if FBufferCnt >= SizeOf(FBuffer) then + FlushBuffer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.ReceiveChar(Ch : Char); +const + bIAC : Boolean = FALSE; + chVerb : Char = #0; + strSubOption : String = ''; + bSubNegoc : Boolean = FALSE; +begin + if chVerb <> #0 then begin + NegociateOption(chVerb, Ch); + chVerb := #0; + strSubOption := ''; + Exit; + end; + + if bSubNegoc then begin + if Ch = TNCH_SE then begin + bSubNegoc := FALSE; + NegociateSubOption(strSubOption); + strSubOption := ''; + end + else + strSubOption := strSubOption + Ch; + Exit; + end; + + if bIAC then begin + case Ch of + TNCH_IAC: begin + AddChar(Ch); + bIAC := FALSE; + end; + TNCH_DO, TNCH_WILL, TNCH_DONT, TNCH_WONT: + begin + bIAC := FALSE; + chVerb := Ch; + end; + TNCH_EOR: + begin + DebugString('TNCH_EOR' + #13 + #10); + bIAC := FALSE; + if Assigned(FOnEOR) then + FOnEOR(Self); + end; + TNCH_SB: + begin +{ DebugString('Subnegociation' + #13 + #10); } + bSubNegoc := TRUE; + bIAC := FALSE; + end; + else + DebugString('Unknown ' + IntToHex(ord(Ch), 2) + ' ''' + Ch + '''' + #13 + #10); + bIAC := FALSE; + end; + + Exit; + end; + + case Ch of + TNCH_EL: + begin + DebugString('TNCH_EL' + #13 + #10); + AddChar(Ch); + end; + TNCH_EC: + begin + DebugString('TNCH_EC' + #13 + #10); + AddChar(Ch); + end; + TNCH_AYT: + begin + DebugString('TNCH_AYT' + #13 + #10); + AddChar(Ch); + end; + TNCH_IP: + begin + DebugString('TNCH_IP' + #13 + #10); + AddChar(Ch); + end; + TNCH_AO: + begin + DebugString('TNCH_AO' + #13 + #10); + AddChar(Ch); + end; + TNCH_IAC: + begin + bIAC := TRUE + end; + else + AddChar(Ch); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/TnEmulVT.dcu b/lib/Delphi/Vc32/TnEmulVT.dcu new file mode 100644 index 00000000..73e35c2d Binary files /dev/null and b/lib/Delphi/Vc32/TnEmulVT.dcu differ diff --git a/lib/Delphi/Vc32/TnEmulVT.pas b/lib/Delphi/Vc32/TnEmulVT.pas new file mode 100644 index 00000000..094d9d77 --- /dev/null +++ b/lib/Delphi/Vc32/TnEmulVT.pas @@ -0,0 +1,825 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: TNEMULVT.PAS +Description: Delphi component combining both TnCnx and EmulVT components. + Hence it does ANSI emulation using TCP/IP telnet protocol. +Author: Franois PIETTE +Creation: May, 1996 +Version: 2.13 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1996-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jul 22, 1997 Revised Connect method to be callable from FormCreate event + Adapted to Delphi 3 +Sep 05, 1997 TnCnx made public, Minor change to method visibility + Added OnTermType and OnDataAvailable events. +Sep 23, 1997 V202. Added local echo support (incomplete because we should ask + the remote host not to echo characters. Will implement later) + Added TnEmultVTVersion +Sep 24, 1997 V2.03 Complete local echo support. +Sep 25, 1997 V2.04 Port to C++Builder +Feb 19, 1998 V2.05 Replaced private section by protected. + Added TriggerDataAvailable virtual function. +Dec 21, 1998 V2.06 Added fixes from Steve Endicott. +Mar 01, 1999 V2.07 Added conditional compile for BCB4. Thanks to James + Legg . +Mar 14, 1999 V2.08 Added OnKeyDown event to allow key trapping. + Ignore any exception when sending fct keys. +Aug 15, 1999 V2.09 Move KeyPress procedure to public section for BCB4 compat. +Aug 20, 1999 V2.10 Added compile time options. Revised for BCB4. +Sep 25, 1999 V2.11 Corrected GetSelTextBuf so that lines are returned in + corrected order (they where returned in reverse order). + Thanks to Laurent Navarro for finding + this bug and fixing it. +Jan 12, 2002 V2.12 Replaced TnCnx public member by TnConn property to avoid + conflit with unit named TnCnx. This will require change in your + own code if you used this property. Added a notification procedure + to remove FTnCnx if component is externally destroyed. Added code + to check if we still have the component with us. +Oct 23, 2002 V2.13 Changed Buffer arg in OnDataAvailable to Pointer instead + of PChar to avoid Delphi 7 messing everything with AnsiChar. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnEmulVT; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER140} + {$IFDEF BCB} + {$DEFINE BCB_FLAG} + {$ENDIF} +{$ENDIF} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, EmulVT, TnCnx, IniFiles, TnOptFrm, WSocket; + +const + TnEmultVTVersion = 213; + CopyRight : String = ' TTnEmulVT (c) 1996-2002 F. Piette V2.13 '; + +type + TTnEmulVTDataAvailable = procedure (Sender : TObject; + Buffer : Pointer; + var Len : Integer) of object; + TTnEmulVT = class(TEmulVT) + protected + FTnCnx : TTnCnx; + FError : Word; + FIniFilename : String; + FSectionName : String; + FKeyName : String; + FHostName : String; + FPort : String; + FTag : LongInt; + FUpperLock : Boolean; + FLocalEcho : Boolean; + FOnSessionClosed : TNotifyEvent; + FOnSessionConnected : TNotifyEvent; + FOnNamesClick : TNotifyEvent; + FOnSendLoc : TNotifyEvent; + FOnTermType : TNotifyEvent; + FOnLocalEcho : TNotifyEvent; + FOnDataAvailable : TTnEmulVTDataAvailable; + FMouseDown : Boolean; + FMouseCaptured : Boolean; + FMouseTop : Integer; + FMouseLeft : Integer; + FFocusDrawn : Boolean; + FFocusRect : TRect; + procedure TriggerDataAvailable(Buffer : Pointer; Len: Integer); virtual; + procedure TnCnxDataAvailable(Sender: TTnCnx; Buffer : Pointer; Len : Integer); + procedure TnCnxSessionClosed(Sender: TTnCnx; Erc: Word); + procedure TnCnxSessionConnected(Sender: TTnCnx; Erc: Word); + procedure TnCnxSendLoc(Sender: TObject); + procedure TnCnxTermType(Sender: TObject); + procedure TnCnxLocalEcho(Sender: TObject); + procedure Display(Msg : String); + procedure DoKeyBuffer(Buffer : PChar; Len : Integer); override; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); override; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); override; +{$IFNDEF BCB_FLAG} + procedure Notification(AComponent : TComponent; + Operation : TOperation); override; +{$ENDIF} + procedure SetOnEndOfRecord(Value : TNotifyEvent); + function GetOnEndOfRecord : TNotifyEvent; + procedure SetLocation(Value : String); + function GetLocation : String; + procedure SetHostName(newValue : String); + public + procedure RequestLocalEcho(newValue : Boolean); + function GetLocalEcho : Boolean; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Connect; + procedure Disconnect; + procedure EditOptions; + procedure RestoreOptions; + function IsConnected : Boolean; + function Send(Data : Pointer; Len : Integer) : Integer; + function SendStr(Data : String) : Integer; + function GetSelTextBuf(Buffer: PChar; BufSize: Integer): Integer; + procedure KeyPress(var Key: Char); override; + property TnConn : TTnCnx read FTnCnx; + published + property IniFilename : String read FIniFileName write FIniFileName; + property SectionName : String read FSectionName write FSectionName; + property KeyName : String read FKeyName write FKeyName; + property Error : Word read FError write FError; + property HostName : String read FHostName write SetHostName; + property Port : String read FPort write FPort; + property Tag : LongInt read FTag write FTag; + property Location : String read GetLocation write SetLocation; + property UpperLock : Boolean read FUpperLock write FUpperLock; + property LocalEcho : Boolean read FLocalEcho write FLocalEcho; + + property OnKeyDown; + property OnSessionClosed : TNotifyEvent read FOnSessionClosed + write FOnSessionClosed; + property OnSessionConnected : TNotifyEvent read FOnSessionConnected + write FOnSessionConnected; + property OnEndOfRecord : TNotifyEvent read GetOnEndOfRecord + write SetOnEndOfRecord; + property OnNamesClick : TNotifyEvent read FOnNamesClick + write FOnNamesClick; + property OnSendLoc : TNotifyEvent read FOnSendLoc + write FOnSendLoc; + property OnTermType : TNotifyEvent read FOnTermType + write FOnTermType; + property OnLocalEcho : TNotifyEvent read FOnLocalEcho + write FOnLocalEcho; + property OnDataAvailable : TTnEmulVTDataAvailable read FOnDataAvailable + write FOnDataAvailable; + end; + +procedure Register; + +implementation + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TTnEmulVT]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure FontToIni(Font : TFont; IniFile : TIniFile; Section : String); +var + nBuf : Integer; +begin + IniFile.WriteString(Section, 'FontName', Font.Name); + IniFile.WriteInteger(Section, 'FontSize', Font.Size); + IniFile.WriteInteger(Section, 'FontPitch', ord(Font.Pitch)); + nBuf := 0; + if fsBold in Font.Style then + nBuf := nBuf or 1; + if fsItalic in Font.Style then + nBuf := nBuf or 2; + if fsUnderline in Font.Style then + nBuf := nBuf or 4; + if fsStrikeOut in Font.Style then + nBuf := nBuf or 8; + IniFile.WriteInteger(Section, 'FontStyle', nBuf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure IniToFont(Font : TFont; IniFile : TIniFile; Section : String); +var + FontName : String; + nBuf : Integer; +begin + FontName := IniFile.ReadString(Section, 'FontName', '*'); + if FontName <> '*' then begin + Font.Name := FontName; + Font.Size := IniFile.ReadInteger(Section, 'FontSize', 9); + Font.Pitch := TFontPitch(IniFile.ReadInteger(Section, 'FontPitch', 12)); + nBuf := IniFile.ReadInteger(Section, 'FontStyle', 0); + Font.Style := []; + if (nBuf and 1) <> 0 then + Font.Style := Font.Style + [fsBold]; + if (nBuf and 2) <> 0 then + Font.Style := Font.Style + [fsItalic]; + if (nBuf and 4) <> 0 then + Font.Style := Font.Style + [fsUnderline]; + if (nBuf and 8) <> 0 then + Font.Style := Font.Style + [fsStrikeOut]; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTnEmulVT.Create(AOwner: TComponent); +var + Rect : TRect; +begin + inherited Create(AOwner); + + if TnCnxVersion < 203 then + raise Exception.Create('TTnEmulVT need TTnCnx version 2.03 or higher ' + + 'Please download last release from ' + + 'http://www.overbyte.be'); + + FTnCnx := TTnCnx.Create(Self); + FTnCnx.OnDataAvailable := TnCnxDataAvailable; + FTnCnx.OnSessionClosed := TnCnxSessionClosed; + FTnCnx.OnSessionConnected := TnCnxSessionConnected; + FTnCnx.OnSendLoc := TnCnxSendLoc; + FTnCnx.OnTermType := TnCnxTermType; + FTnCnx.OnLocalEcho := TnCnxLocalEcho; + + FIniFileName := 'TNEMULVT.INI'; + FSectionName := 'Windows'; + FKeyName := 'TnEmulVT'; + FPort := 'telnet'; + Rect.Top := -1; + SelectRect := Rect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTnEmulVT.Destroy; +begin + if Assigned(FTnCnx) then begin + FTnCnx.Free; + FTnCnx := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF BCB_FLAG} +procedure TTnEmulVT.Notification( + AComponent : TComponent; + Operation : TOperation); +begin + inherited Notification(AComponent, operation); + if Operation = opRemove then begin + if AComponent = FTnCnx then + FTnCnx:= nil; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.SetHostName(newValue : String); +begin + FHostName := newValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.GetLocalEcho : Boolean; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.LocalEcho + else + Result := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.RequestLocalEcho(newValue : Boolean); +begin + if Assigned(FTnCnx) then begin + if newValue then + FTnCnx.DontOption(TN_ECHO) + else + FTnCnx.DoOption(TN_ECHO); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.SetLocation(Value : String); +begin + if Assigned(FTnCnx) then + FTnCnx.Location := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.GetLocation : String; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.Location; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.Display(Msg : String); +begin + WriteStr(Msg); + Repaint; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.SetOnEndOfRecord(Value : TNotifyEvent); +begin + if Assigned(FTnCnx) then + FTnCnx.OnEndOfRecord := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.GetOnEndOfRecord : TNotifyEvent; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.OnEndOfRecord; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxSendLoc(Sender: TObject); +begin + if Assigned(FOnSendLoc) then + FOnSendLoc(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxTermType(Sender: TObject); +begin + if Assigned(FOnTermType) then + FOnTermType(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxLocalEcho(Sender: TObject); +begin + if Assigned(FOnLocalEcho) then + FOnLocalEcho(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TriggerDataAvailable(Buffer : Pointer; Len: Integer); +begin + if Assigned(FOnDataAvailable) then + FOnDataAvailable(Self, Buffer, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxDataAvailable(Sender: TTnCnx; Buffer : Pointer; + Len: Integer); +var + I : Integer; +begin + TriggerDataAvailable(Buffer, Len); + + if Len <= 0 then + Exit; + + for I := 0 to Len - 1 do begin + try + WriteChar((PChar(Buffer) + I)^); + except + Break; + end; + end; + UpdateScreen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxSessionClosed(Sender: TTnCnx; Erc: Word); +begin + Display(#13 + #10 + '*** Server has closed ***' + #13 + #10); + MessageBeep(MB_ICONASTERISK); + FError := Erc; + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxSessionConnected(Sender: TTnCnx; Erc: Word); +begin + if Erc = 0 then begin + Display('Connected' + #13 + #10); + end + else begin + Display('Connection failed: ' + +{$IFDEF DELPHI} + FTnCnx.Socket.SocketErrorDesc(Error) + +{$ELSE} + WSocketErrorDesc(Error) + +{$ENDIF} + #13 + #10); + MessageBeep(MB_ICONASTERISK); + end; + FError := Erc; + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.RestoreOptions; +var + IniFile : TIniFile; + xFont : TFont; +begin + if Length(FHostname) <= 0 then + Exit; + + IniFile := TIniFile.Create(IniFilename); + xFont := TFont.Create; + IniToFont(xFont, IniFile, HostName); + Font := xFont; + xFont.Free; + + LineHeight := IniFile.ReadInteger(HostName, 'LineHeight', 12); + Rows := IniFile.ReadInteger(HostName, 'Rows', 25); + Cols := IniFile.ReadInteger(HostName, 'Cols', 80); + FKeys := IniFile.ReadInteger(HostName, 'FKeys', 0); + AutoCr := IniFile.ReadInteger(HostName, 'AutoCR', 0) <> 0; + AutoLF := IniFile.ReadInteger(HostName, 'AutoLF', 0) <> 0; + LocalEcho := IniFile.ReadInteger(HostName, 'LocalEcho', 0) <> 0; + MonoChrome := IniFile.ReadInteger(HostName, 'MonoChrome', 0) <> 0; + UpperLock := IniFile.ReadInteger(HostName, 'UpperLock', 0) <> 0; + Xlat := IniFile.ReadInteger(HostName, 'Xlat', 0) <> 0; + GraphicDraw := IniFile.ReadInteger(HostName, 'GraphicDraw', 0) <> 0; + CharZoom := StrToFloat(IniFile.ReadString(HostName, 'CharZoom', '1')); + LineZoom := StrToFloat(IniFile.ReadString(HostName, 'LineZoom', '1')); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.Connect; +var +{$IFDEF VER80} { Delphi 1 } + Form : TForm; +{$ELSE} +{$IFDEF VER90} { Delphi 2 } + Form : TForm; +{$ELSE} +{$IFDEF VER93} { Bcb 1 } + Form : TForm; +{$ELSE} { Delphi 3/4, Bcb 3/4 } + Form : TCustomForm; +{$ENDIF} +{$ENDIF} +{$ENDIF} +begin + if Length(FHostname) <= 0 then + Exit; + + Clear; + if not Assigned(FTnCnx) then + Exit; + FTnCnx.Port := FPort; + FTnCnx.Host := FHostName; + FTnCnx.Connect; + Display('Connecting to ''' + HostName + '''' + #13 + #10); + Form := GetParentForm(Self); + Form.ActiveControl := Self; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.Disconnect; +begin + if Assigned(FTnCnx) then + FTnCnx.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.Send(Data : Pointer; Len : Integer) : Integer; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.Send(Data, Len) + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.SendStr(Data : String) : Integer; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.SendStr(Data) + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.IsConnected : Boolean; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.IsConnected + else + Result := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.EditOptions; +var + IniFile : TIniFile; +begin + if Length(FHostname) <= 0 then + Exit; + + if OptForm = nil then + OptForm := TOptForm.Create(Self); + + OptForm.IniFileName := FIniFileName; + OptForm.OnNamesClick := FOnNamesClick; + + RestoreOptions; + OptForm.AFont.Assign(Font); + OptForm.LineHeight := LineHeight; + OptForm.AutoCR := AutoCr; + OptForm.AutoLF := AutoLF; + OptForm.LocalEcho := LocalEcho; + OptForm.MonoChrome := MonoChrome; + OptForm.UpperLock := UpperLock; + OptForm.Xlat := Xlat; + OptForm.GraphicDraw := GraphicDraw; + OptForm.Rows := Rows; + OptForm.Cols := Cols; + OptForm.HostName := FHostName; + OptForm.FKeys := FKeys; + OptForm.CharZoom := CharZoom; + OptForm.LineZoom := LineZoom; + if OptForm.ShowModal = IDOK then begin + Font := OptForm.AFont; + LineHeight := OptForm.LineHeight; + AutoCR := OptForm.AutoCr; + AutoLF := OptForm.AutoLF; + LocalEcho := OptForm.LocalEcho; + MonoChrome := OptForm.MonoChrome; + UpperLock := OptForm.UpperLock; + Xlat := OptForm.Xlat; + GraphicDraw := OptForm.GraphicDraw; + Rows := OptForm.Rows; + Cols := OptForm.Cols; + FKeys := OptForm.FKeys; + LineZoom := OptForm.LineZoom; + CharZoom := OptForm.CharZoom; + IniFile := TIniFile.Create(FIniFilename); + FontToIni(OptForm.AFont, IniFile, FHostName); + IniFile.WriteInteger(FHostName, 'LineHeight', LineHeight); + IniFile.WriteInteger(FHostName, 'Rows', Rows); + IniFile.WriteInteger(FHostName, 'Cols', Cols); + IniFile.WriteInteger(FHostName, 'AutoCR', ord(AutoCR)); + IniFile.WriteInteger(FHostName, 'AutoLF', ord(AutoLF)); + IniFile.WriteInteger(FHostName, 'LocalEcho', ord(LocalEcho)); + IniFile.WriteInteger(FHostName, 'MonoChrome', ord(MonoChrome)); + IniFile.WriteInteger(FHostName, 'UpperLock', ord(UpperLock)); + IniFile.WriteInteger(FHostName, 'Xlat', ord(Xlat)); + IniFile.WriteInteger(FHostName, 'GraphicDraw', ord(GraphicDraw)); + IniFile.WriteInteger(FHostName, 'FKeys', FKeys); + IniFile.WriteString(FHostName, 'LineZoom', Format('%5.3f', [LineZoom])); + IniFile.WriteString(FHostName, 'CharZoom', Format('%5.3f', [CharZoom])); + IniFile.Free; + Repaint; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.KeyPress(var Key: Char); +begin + inherited KeyPress(Key); + if FUpperLock and (Key in ['a'..'z']) then + Key := chr(ord(Key) and $DF); + if Key <> #0 then begin + try + if FLocalEcho then + WriteChar(Key); + if Assigned(FTnCnx) then + FTnCnx.Send(@Key, 1); + except + { Ignore any exception ! } + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.DoKeyBuffer(Buffer : PChar; Len : Integer); +begin + try + if FLocalEcho then + WriteBuffer(Buffer, Len); + if Assigned(FTnCnx) then + FTnCnx.Send(Buffer, Len); + except + { Ignore exception ! } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure DrawFocusRectangle(Wnd: HWnd; Rect: TRect); +var + DC : HDC; +begin + DC := GetDC(Wnd); + DrawFocusRect(DC, Rect); + ReleaseDC(Wnd, DC); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); +begin + inherited MouseDown(Button, Shift, X, Y); + FMouseDown := TRUE; + if FFocusDrawn then begin + DrawFocusRectangle(Handle, FFocusRect); + FFocusDrawn := FALSE; + end; + if SelectRect.Top <> -1 then begin + FFocusRect.Top := -1; + SelectRect := FFocusRect; + Repaint; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.MouseMove(Shift: TShiftState; X, Y: Integer); +var + Rect : TRect; + Point : TPoint; +begin + inherited MouseMove(Shift, X, Y); + if not FMouseDown then + Exit; + + if not FMouseCaptured then begin + SetCapture(Handle); + FMouseCaptured := TRUE; + FMouseTop := SnapPixelToRow(Y); + FMouseLeft := SnapPixelToCol(X); + + Point.X := 0; + Point.Y := 0; + Rect.TopLeft := ClientToScreen(Point); + Point.X := Width - 16; + Point.Y := Height; + Rect.BottomRight := ClientToScreen(Point); + ClipCursor(@Rect); + end + else if (FMouseTop <> Y) or (FMouseLeft <> X) then begin + if FFocusDrawn then + DrawFocusRectangle(Handle, FFocusRect); + Rect.Top := FMouseTop; + Rect.Left := FMouseLeft; + Rect.Bottom := SnapPixelToRow(Y) + LineHeight + 4; + Rect.Right := SnapPixelToCol(X) + CharWidth; + DrawFocusRectangle(Handle, Rect); + FFocusRect := Rect; + FFocusDrawn := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.MouseUp(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); +begin + inherited MouseUp(Button, Shift, X, Y); + FMouseDown := FALSE; + if FMouseCaptured then begin + ReleaseCapture; + FMouseCaptured := FALSE; + ClipCursor(nil); + end; + if FFocusDrawn then begin + DrawFocusRectangle(Handle, FFocusRect); + FFocusDrawn := FALSE; + if (FFocusRect.Right - FFocusRect.Left) < CharWidth then + FFocusRect.Top := -1; + if (FFocusRect.Bottom - FFocusRect.Top) < LineHeight then + FFocusRect.Top := -1; + SelectRect := FFocusRect; + Repaint; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +function TTnEmulVT.GetSelTextBuf(Buffer: PChar; BufSize: Integer): Integer; +var + StartRow : Integer; + StopRow : Integer; + StartCol : Integer; + StopCol : Integer; + nRow : Integer; + nCol : Integer; + Line : TLine; + nCnt : Integer; +begin + nCnt := 0; + if (SelectRect.Top = -1) or (BufSize < 1) then begin + if BufSize > 0 then + Buffer[0] := #0; + Result := nCnt; + Exit; + end; + + StartRow := PixelToRow(SelectRect.Top); + StopRow := PixelToRow(SelectRect.Bottom) - 1; + StartCol := PixelToCol(SelectRect.Left); + StopCol := PixelToCol(SelectRect.Right) - 1; + + for nRow := StartRow to StopRow do begin + if BufSize < 2 then + Break; + Line := Screen.FLines^[Rows - 1 - nRow]; + for nCol := StartCol to StopCol do begin + Buffer[0] := Line.Txt[nCol]; + Inc(Buffer); + Dec(BufSize); + Inc(nCnt); + if BufSize < 2 then + Break; + end; + if nRow < StopRow then begin + if BufSize < 4 then + Break; + Buffer[0] := #13; + Buffer[1] := #10; + Inc(Buffer); + Inc(Buffer); + Dec(BufSize); + Dec(BufSize); + Inc(nCnt); + Inc(nCnt); + end; + end; + + Buffer[0] := #0; + Result := nCnt; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} + + +end. + diff --git a/lib/Delphi/Vc32/TnOptFrm.dcu b/lib/Delphi/Vc32/TnOptFrm.dcu new file mode 100644 index 00000000..e08fb25b Binary files /dev/null and b/lib/Delphi/Vc32/TnOptFrm.dcu differ diff --git a/lib/Delphi/Vc32/TnOptFrm.dfm b/lib/Delphi/Vc32/TnOptFrm.dfm new file mode 100644 index 00000000..d665a0aa Binary files /dev/null and b/lib/Delphi/Vc32/TnOptFrm.dfm differ diff --git a/lib/Delphi/Vc32/TnOptFrm.pas b/lib/Delphi/Vc32/TnOptFrm.pas new file mode 100644 index 00000000..cdf8b3f9 --- /dev/null +++ b/lib/Delphi/Vc32/TnOptFrm.pas @@ -0,0 +1,564 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: User interface for TnEmulVT component options +Creation: May, 1996 +Author: Franois PIETTE +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Mar 18, 1999 Removed FormPos dependency + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnOptFrm; + +interface + +uses + WinTypes, WinProcs, SysUtils, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, IniFiles, Buttons; + +type + TOptForm = class(TForm) + Label1: TLabel; + Label2: TLabel; + AutoCRCheckBox: TCheckBox; + AutoLFCheckBox: TCheckBox; + LocalEchoCheckBox: TCheckBox; + MonoChromeCheckBox: TCheckBox; + RowsEdit: TEdit; + ColsEdit: TEdit; + OkButton: TButton; + CancelButton: TButton; + LaboButton: TButton; + RDVButton: TButton; + USUSButton: TButton; + XlatCheckBox: TCheckBox; + FontDialog1: TFontDialog; + FontButton: TButton; + LineHeightEdit: TEdit; + Label3: TLabel; + NamesButton: TButton; + UpperLockCheckBox: TCheckBox; + A11Button: TButton; + GroupBox1: TGroupBox; + FKeys1RadioButton: TRadioButton; + FKeys2RadioButton: TRadioButton; + FKeys3RadioButton: TRadioButton; + Label4: TLabel; + Label5: TLabel; + LineZoomEdit: TEdit; + CharZoomEdit: TEdit; + GraphicDrawCheckBox: TCheckBox; + procedure OkButtonClick(Sender: TObject); + procedure CancelButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure LaboButtonClick(Sender: TObject); + procedure RDVButtonClick(Sender: TObject); + procedure USUSButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FontButtonClick(Sender: TObject); + procedure NamesButtonClick(Sender: TObject); + procedure A11ButtonClick(Sender: TObject); + private + { Private declarations } + public + FIniFilename : String; + FInitialized : Boolean; + FSectionName : String; + FKeyName : String; + FHostName : String; + FFont : TFont; + FOnNamesClick : TNotifyEvent; + function GetLocalEcho : Boolean; + function GetAutoCr : Boolean; + function GetAutoLF : Boolean; + function GetAltKeys : Boolean; + function GetMonoChrome : Boolean; + function GetUpperLock : Boolean; + function GetXlat : Boolean; + function GetGraphicDraw : Boolean; + function GetRows : Integer; + function GetCols : integer; + function GetLineHeight : Integer; + function GetLineZoom : Single; + function GetCharZoom : Single; + function GetFKeys : Integer; + procedure SetLocalEcho(Value : Boolean); + procedure SetAutoCr(Value : Boolean); + procedure SetAutoLF(Value : Boolean); + procedure SetAltKeys(Value : Boolean); + procedure SetMonoChrome(Value : Boolean); + procedure SetUpperLock(Value : Boolean); + procedure SetXlat(Value : Boolean); + procedure SetGraphicDraw(Value : Boolean); + procedure SetRows(Value : Integer); + procedure SetCols(Value : Integer); + procedure SetHostName(Value : String); + procedure SetLineHeight(Value : Integer); + procedure SetLineZoom(Value : Single); + procedure SetCharZoom(Value : Single); + procedure SetFKeys(Value : Integer); + + property IniFilename : String read FIniFileName write FIniFileName; + property SectionName : String read FSectionName write FSectionName; + property KeyName : String read FKeyName write FKeyName; + property HostName : String read FHostName write SetHostName; + property LocalEcho : Boolean read GetLocalEcho write SetLocalEcho; + property AutoCR : Boolean read GetAutoCr write SetAutoCR; + property AutoLF : Boolean read GetAutoLF write SetAutoLF; + property AltKeys : Boolean read GetAltKeys write SetAltKeys; + property FKeys : Integer read GetFKeys write SetFkeys; + property MonoChrome : Boolean read GetMonoChrome write SetMonoChrome; + property UpperLock : Boolean read GetUpperLock write SetUpperLock; + property Xlat : Boolean read GetXlat write SetXlat; + property GraphicDraw : Boolean read GetGraphicDraw write SetGraphicDraw; + property Rows : Integer read GetRows write SetRows; + property Cols : Integer read GetCols write SetCols; + property AFont : TFont read FFont write FFont; + property LineHeight : Integer read GetLineHeight write SetLineHeight; + property LineZoom : Single read GetLineZoom write SetLineZoom; + property CharZoom : Single read GetCharZoom write SetCharZoom; + + property OnNamesClick : TNotifyEvent read FOnNamesClick write FOnNamesClick; + end; + +var + OptForm: TOptForm; + +implementation + +{$R *.DFM} + +const + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] in ['0'..'9']) do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetFKeys(Value : Integer); +begin + case Value of + 0 : FKeys1RadioButton.Checked := TRUE; + 1 : FKeys2RadioButton.Checked := TRUE; + 2 : FKeys3RadioButton.Checked := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetFKeys : Integer; +begin + if FKeys1RadioButton.Checked then + Result := 0 + else if FKeys2RadioButton.Checked then + Result := 1 + else + Result := 2; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetHostName(Value : String); +begin + FHostName := Value; + Caption := 'Options for ' + HostName; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetLocalEcho : Boolean; +begin + Result := LocalEchoCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetAutoCr : Boolean; +begin + Result := AutoCrCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetAutoLF : Boolean; +begin + Result := AutoLFCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetXlat : Boolean; +begin + Result := XlatCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetGraphicDraw : Boolean; +begin + Result := GraphicDrawCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetAltKeys : Boolean; +begin + Result := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetMonoChrome : Boolean; +begin + Result := MonoChromeCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetUpperLock : Boolean; +begin + Result := UpperLockCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetLocalEcho(Value : Boolean); +begin + LocalEchoCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetAutoCr(Value : Boolean); +begin + AutoCRCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetAutoLF(Value : Boolean); +begin + AutoLFCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetXlat(Value : Boolean); +begin + XlatCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetGraphicDraw(Value : Boolean); +begin + GraphicDrawCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetAltKeys(Value : Boolean); +begin +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetMonoChrome(Value : Boolean); +begin + MonoChromeCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetUpperLock(Value : Boolean); +begin + UpperLockCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetRows : Integer; +begin + Result := atoi(RowsEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetCols : integer; +begin + Result := atoi(ColsEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetLineZoom : Single; +begin + try + Result := StrToFloat(LineZoomEdit.Text); + except + Result := 1.0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetCharZoom : Single; +begin + try + Result := StrToFloat(CharZoomEdit.Text); + except + Result := 1.0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetLineHeight : integer; +var + DC : HDC; + Metrics : TTextMetric; + hObject : THandle; +begin + Result := atoi(LineHeightEdit.Text); + if Result = 0 then begin + DC := GetDC(0); + hObject := SelectObject(DC, FFont.Handle); + GetTextMetrics(DC, Metrics); + SelectObject(DC, hOBject); + ReleaseDC(0, DC); + + Result := Metrics.tmHeight; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetRows(Value : Integer); +begin + RowsEdit.Text := IntToStr(Value); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetCols(Value : Integer); +begin + ColsEdit.Text := IntToStr(Value); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetLineHeight(Value : Integer); +begin + LineHeightEdit.Text := IntToStr(Value); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetLineZoom(Value : Single); +begin + LineZoomEdit.Text := Format('%5.3f', [Value]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetCharZoom(Value : Single); +begin + CharZoomEdit.Text := Format('%5.3f', [Value]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.OkButtonClick(Sender: TObject); +begin + ModalResult := IDOK; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.CancelButtonClick(Sender: TObject); +begin + ModalResult := IDCANCEL; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionName, KeyName + KeyWidth, + Width); + Height := IniFile.ReadInteger(SectionName, KeyName + KeyHeight, + Height); + Top := IniFile.ReadInteger(SectionName, KeyName + KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionName, KeyName + KeyLeft, + (Screen.Width - Width) div 2); + IniFile.Destroy; + end; + NamesButton.Visible := Assigned(FOnNamesClick); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionName, KeyName + KeyTop, Top); + IniFile.WriteInteger(SectionName, KeyName + KeyLeft, Left); + IniFile.WriteInteger(SectionName, KeyName + KeyWidth, Width); + IniFile.WriteInteger(SectionName, KeyName + KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.A11ButtonClick(Sender: TObject); +begin + Rows := 25; + Cols := 80; + AutoCr := FALSE; + AutoLF := FALSE; + AltKeys := TRUE; + LocalEcho := FALSE; + MonoChrome := TRUE; + UpperLock := TRUE; + Xlat := FALSE; + FKeys3RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.LaboButtonClick(Sender: TObject); +begin + Rows := 24; + Cols := 80; + AutoCr := TRUE; + AutoLF := FALSE; + AltKeys := TRUE; + LocalEcho := FALSE; + MonoChrome := TRUE; + UpperLock := FALSE; + Xlat := FALSE; + FKeys2RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.RDVButtonClick(Sender: TObject); +begin + Rows := 25; + Cols := 80; + AutoCr := FALSE; + AutoLF := FALSE; + AltKeys := FALSE; + LocalEcho := FALSE; + MonoChrome := FALSE; + UpperLock := FALSE; + Xlat := TRUE; + FKeys1RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.USUSButtonClick(Sender: TObject); +begin + Rows := 25; + Cols := 80; + AutoCr := FALSE; + AutoLF := FALSE; + AltKeys := FALSE; + LocalEcho := FALSE; + MonoChrome := FALSE; + UpperLock := FALSE; + Xlat := TRUE; + FKeys2RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FormCreate(Sender: TObject); +begin + FFont := TFont.Create; + SectionName := 'Windows'; + KeyName := 'Options'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FontButtonClick(Sender: TObject); +begin + FontDialog1.Font := FFont; + if FontDialog1.Execute then + FFont := FontDialog1.Font; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.NamesButtonClick(Sender: TObject); +begin + if Assigned(FOnNamesClick) then + FOnNamesClick(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/TnScript.dcu b/lib/Delphi/Vc32/TnScript.dcu new file mode 100644 index 00000000..5ef819d5 Binary files /dev/null and b/lib/Delphi/Vc32/TnScript.dcu differ diff --git a/lib/Delphi/Vc32/TnScript.pas b/lib/Delphi/Vc32/TnScript.pas new file mode 100644 index 00000000..3232c612 --- /dev/null +++ b/lib/Delphi/Vc32/TnScript.pas @@ -0,0 +1,570 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TTnScript component add scripting capabilities to TTnEmulVT +Creation: February 24th, 1998 +Version: 1.03 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Quick Reference: + +TTnScript is a descendent from TTnEmulVT. It does exactly what TTnEmulVT does +(Ansi terminal emulation) and add some scripting capabilities. +TTnScript follows the received data and search in the data stream for +given strings. When found, an event handler is called. + +Strings to search are specified by calling AddEvent. Each string is identified +by an ID (an integer number) which must be unique. + +You can remove a string using RemoveEvent, passing the ID you gave when +inserting the string in the list. You can remove all the strings with +RemoveAllEvents. + +Each string to search for is associated with another string which will be sent +by the component when the search string is found. This can be used for example +when you search for a login prompt ('login') to send the username when this +prompt is found. Same for password. + +Each string to search for is also associated with an event handler which will +be triggered when the string is found, right after having sent the string to +send. This specific event can be used to customize what has to be done when +the string is found (for example update the user interface or query the user +for some value to send). + +Finally, each string to search is associated with a set of flags which tells +the component some special actions such as ignoring character case when +comparing text, or make the string persistant (normaly when a string has been +found, it is removed from the list). + +Strings are searched in the order they are added to the list. So it can be +very different if you add 'login' and 'password' to search for than if you +add 'login' only and then when 'login' is found, add 'password'. + +To scan the data stream, the component use a circular buffer whose dimension +is 80 characters by default. You can change that by assigning InputBufferSize. +The buffer size should be at least twice the size of the longest string to +search. If you use an oversized buffer, you have a performance penalty because +the buffer is searched as each data packet comes into the stream. + +An automatic login procedure could looks like this: + TnScript1.AddEvent(1, 'login', 'root' + #13#10, [efIgnoreCase], nil); + TnScript1.AddEvent(2, 'password', 'boss' + #13#10, [efIgnoreCase], nil); + TnScript1.Connect; + +The nil argument could be replaced by a procedure (event handler) to make some +computing when the string to search for is found. Here is an example: + + TnScript1.AddEvent(2, 'prompt', '', [efIgnoreCase], PromptEvent); + +procedure TForm1.PromptEvent(Sender : TObject; ID : Integer); +begin + .... Your code goes here. You can do everithing .... + Label1.Caption := 'Logged !'; + TnScript1.SendStr('ls -l' + #13 + #10); Like sending some data +end; + +Updates: +Mar 14, 1999 V1.01 efIgnoreCase was ignored ! +May 13, 1999 V1.02 Made all methods virtual. +Aug 20, 1999 V1.03 Added compile time options. Revised for BCB4. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnScript; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +{.DEFINE DUMP} + +uses + Wintypes, WinProcs, Classes, SysUtils, TnEmulVT; + +const + TnScriptVersion = 1.03; + CopyRight : String = ' TTnScript (c) 1998-2002 F. Piette V1.03 '; + +type + TnScriptException = class(Exception); + TEventHandler = procedure (Sender : TObject; ID : Integer) of object; + TEventFlag = (efIgnoreCase, { Ignore case in comparaisons } + efPersistent); {Do not delete event when found } + TEventFlags = set of TEventFlag; + TDisplayEvent = procedure (Sender : TObject; Msg : String) of object; + TStringMatch = procedure (Sender : TObject; ID : Integer) of object; + + TEventDescriptor = record + ID : Integer; + Search : String; + ToSend : String; + Flags : TEventFlags; + Handler : TEventHandler; + end; + PEventDescriptor = ^TEventDescriptor; + + TTnScript = class(TTnEmulVT) + protected + FEventList : TList; + FInputBuffer : PChar; + FInputBufferSize : Integer; + FInputBufferCount : Integer; + FInputBufferStart : Integer; + FOnDisplay : TDisplayEvent; + FOnStringMatch : TStringMatch; + function SearchEvent(ID : Integer) : Integer; virtual; + procedure TriggerDataAvailable(Buffer : Pointer; Len: Integer); override; + function FindEventString(S : String; Flags : TEventFlags) : Integer; virtual; + procedure ScanEvents; virtual; + procedure ProcessInputData(Buffer: PChar; Len: Integer); virtual; + procedure TriggerDisplay(Msg : String); virtual; + procedure TriggerStringMatch(ID : Integer); virtual; + procedure NextOne(var N : Integer); virtual; + procedure SetInputBufferSize(newSize : Integer); virtual; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure AddEvent(ID : Integer; + Search : String; + ToSend : String; + Flags : TEventFlags; + Handler : TEventHandler); virtual; + procedure RemoveEvent(ID : Integer); virtual; + procedure RemoveAllEvents; virtual; + published + property InputBufferSize : Integer read FInputBufferSize + write SetInputBufferSize; + property OnDisplay : TDisplayEvent read FOnDisplay + write FOnDisplay; + property OnStringMatch : TStringMatch read FOnStringMatch + write FOnStringMatch; + + end; + +procedure Register; + +implementation + +{$IFDEF DUMP} +const + CtrlCode : array [0..31] of String = ('NUL', 'SOH', 'STX', 'ETX', + 'EOT', 'ENQ', 'ACK', 'BEL', + 'BS', 'HT', 'LF', 'VT', + 'FF', 'CR', 'SO', 'SI', + 'DLE', 'DC1', 'DC2', 'DC3', + 'DC4', 'NAK', 'SYN', 'ETB', + 'CAN', 'EM', 'SUB', 'ESC', + 'FS', 'GS', 'RS', 'US'); +{$ENDIF} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TTnScript]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTnScript.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FEventList := TList.Create; + SetInputBufferSize(80); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTnScript.Destroy; +begin + if Assigned(FEventList) then begin + FEventList.Free; + FEventList := nil; + end; + if FInputBuffer <> nil then begin + FreeMem(FInputBuffer, FInputBufferSize); + FInputBuffer := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Set the input buffer size. This will clear any data already in the buffer } +procedure TTnScript.SetInputBufferSize(newSize : Integer); +begin + { Round the size to the nearest upper 16 bytes limit } + newSize := ((newSize shr 4) + 1) shl 4; + + { If no change, do nothing } + if FInputBufferSize = newSize then + Exit; + + { If buffer already allocated, free it } + if FInputBuffer <> nil then begin + FreeMem(FInputBuffer, FInputBufferSize); + FInputBuffer := nil; + end; + + { Allocate a new buffer of the given size } + FInputBufferSize := newSize; + GetMem(FInputBuffer, FInputBufferSize); + + { Clear the markers } + FInputBufferStart := 0; + FInputBufferCount := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.TriggerDisplay(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.TriggerStringMatch(ID : Integer); +begin + if Assigned(FOnStringMatch) then + FOnStringMatch(Self, ID); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnScript.SearchEvent(ID : Integer) : Integer; +begin + if Assigned(FEventList) then begin + for Result := 0 to FEventList.Count - 1 do begin + if PEventDescriptor(FEventList.Items[Result])^.ID = ID then + Exit; + end; + end; + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Add an event (a string to search for) to the list } +procedure TTnScript.AddEvent( + ID : Integer; + Search : String; + ToSend : String; + Flags : TEventFlags; + Handler : TEventHandler); +var + NewEvent : PEventDescriptor; +begin + if not Assigned(FEventList) then + raise TnScriptException.Create('AddEvent: No Event List'); + + if SearchEvent(ID) <> -1 then + raise TnScriptException.Create('AddEvent: ID ' + IntToStr(ID) + + ' already exist'); + if Length(Search) <= 0 then + raise TnScriptException.Create('AddEvent: String to search empty'); + + New(NewEvent); + FEventList.Add(NewEvent); + NewEvent^.ID := ID; + NewEvent^.ToSend := ToSend; + NewEvent^.Flags := Flags; + NewEvent^.Handler := Handler; + if efIgnoreCase in Flags then + NewEvent^.Search := UpperCase(Search) + else + NewEvent^.Search := Search; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Remove an event from the list, given his ID } +procedure TTnScript.RemoveEvent(ID : Integer); +var + Item : Integer; + PEvent : PEventDescriptor; +begin + if not Assigned(FEventList) then + raise TnScriptException.Create('AddEvent: No Event List'); + + Item := SearchEvent(ID); + if Item < 0 then + raise TnScriptException.Create('RemoveEvent: ID ' + IntToStr(ID) + + ' does''nt exist'); + PEvent := FEventList.Items[Item]; + + { Replace the ID to check later that we do not reuse the freed event } + PEvent^.ID := -1; + + { Free the memory and remove the pointer from list } + Dispose(PEvent); + FEventList.Delete(Item); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.RemoveAllEvents; +var + PEvent : PEventDescriptor; +begin + if not Assigned(FEventList) then + raise TnScriptException.Create('AddEvent: No Event List'); + + while FEventList.Count > 0 do begin + PEvent := FEventList.Items[0]; + PEvent^.ID := -1; + Dispose(PEvent); + FEventList.Delete(0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF DUMP} +procedure WriteCh(Ch : Char); +begin + if ord(Ch) < 32 then + write('<', CtrlCode[Ord(Ch)], '>') + else + write(Ch); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure WriteBuf(Buffer : PChar; Len : Integer); +var + I : Integer; +begin + for I := 0 to Len - 1 do + WriteCh(Buffer[I]); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Advance char index in the circular buffer } +procedure TTnScript.NextOne(var N : Integer); +begin + Inc(N); + if N >= FInputBufferSize then + N := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Search for a string in the circular buffer. } +{ Returns the number of chars between the buffer start and the end of the } +{ event found, or -1 if not found. } +function TTnScript.FindEventString(S : String; Flags : TEventFlags) : Integer; +var + N, M, I, J, K : Integer; + Ch : Char; +begin + Result := -1; + I := FInputBufferStart; + N := 0; + while N < FInputBufferCount do begin + if efIgnoreCase in Flags then + Ch := UpperCase(FInputBuffer[I])[1] + else + Ch := FInputBuffer[I]; + + if Ch = S[1] then begin + { Same first letter, check up to end of S } + J := I; + K := 2; + M := N; + while TRUE do begin + NextOne(J); + + Inc(M); + if M >= FInputBufferCount then + break; + + if K >= Length(S) then begin + { Found ! } + Result := M + 1; + Exit; + end; + if efIgnoreCase in Flags then + Ch := UpperCase(FInputBuffer[J])[1] + else + Ch := FInputBuffer[J]; + if Ch <> S[K] then + break; { Compare failed } + Inc(K); + end; + end; + + NextOne(I); + Inc(N); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.ScanEvents; +var + Item : Integer; + PEvent : PEventDescriptor; + I : Integer; + ID : Integer; + Handler : TEventHandler; +begin +{$IFDEF DUMP} + Write('ScanEvents Start=', FInputBufferStart, + ' Count=', FInputBufferCount, + ' '''); + I := FInputBufferStart; + for J := 1 to FInputBufferCount do begin + WriteCh(FInputBuffer[I]); + NextOne(I); + end; + WriteLn(''''); +{$ENDIF} + + for Item := 0 to FEventList.Count - 1 do begin + PEvent := PEventDescriptor(FEventList.Items[Item]); + I := FindEventString(PEvent^.Search, PEvent^.Flags); + if I <> -1 then begin +{$IFDEF DUMP} + WriteLn('Found event ''', PEvent^.Search, ''''); +{$ENDIF} + TriggerDisplay('Event ''' + PEvent^.Search + ''''); + FInputBufferCount := FInputBufferCount - I; + FInputBufferStart := FInputBufferStart + I; + if FInputBufferStart >= FInputBufferSize then + FInputBufferStart := FInputBufferStart - FInputBufferSize; + ID := PEvent^.ID; + Handler := PEvent^.Handler; + if Length(PEvent^.ToSend) > 0 then + SendStr(PEvent^.ToSend); + { Call the global event handler OnStringMatch } + TriggerStringMatch(ID); + { Call the specific event handler } + if Assigned(Handler) then + Handler(Self, ID); + { It's possible that the event has been removed ! } + { Make sure it is always there before using it } + try + if PEvent^.ID = ID then begin + if not (efPersistent in PEvent^.FLags) then + RemoveEvent(ID); + end; + except + { Ignore any exception } + end; + Exit; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.ProcessInputData(Buffer: PChar; Len: Integer); +const + Recurse : Integer = 0; +var + I, J : Integer; +begin + if not Assigned(FInputBuffer) then + Exit; + + Inc(Recurse); { For debugging purpose } + + if Len > (FInputBufferSize div 2) then begin + { Input buffer too small, process recursively two halfs } + ProcessInputData(Buffer, Len div 2); + ProcessInputData(Buffer + (Len div 2), Len - (Len div 2)); + Dec(Recurse); + Exit; + end; + +{$IFDEF DUMP} + WriteLn; + Write(Calls, ' ', Recurse, ' ', FInputBufferStart, ' ', + FInputBufferCount, ') Len=', Len, ' Buffer='''); + WriteBuf(Buffer, Len); + WriteLn(''''); +{$ENDIF} + + { Where is the end of the circular buffer, that's the question ! } + I := FInputBufferStart + FInputBufferCount; + if I >= FInputBufferSize then + I := I - FInputBufferSize; + + { Add data to the end of the circular buffer, overwriting any previously } + { stored data (remember, we don't ever receive more than 1/2 buffer size } + J := 0; + while J < Len do begin + FInputBuffer[I] := Buffer[J]; + Inc(J); + NextOne(I); + if FInputBufferCount = FInputBufferSize then + NextOne(FInputBufferStart) + else + Inc(FInputBufferCount); + end; + { Scan for events } + ScanEvents; + + Dec(Recurse); { For debugging purpose } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.TriggerDataAvailable(Buffer : Pointer; Len: Integer); +begin + if FEventList.Count > 0 then + ProcessInputData(PChar(Buffer), Len); + + inherited TriggerDataAvailable(Buffer, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/UUEncode.pas b/lib/Delphi/Vc32/UUEncode.pas new file mode 100644 index 00000000..30e07f1d --- /dev/null +++ b/lib/Delphi/Vc32/UUEncode.pas @@ -0,0 +1,142 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE + Using code donated by Brad Choate +Object: UUEncode support routine +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be +WebSite: http://www.rtfm.be/fpiette +Creation: February 14th, 1998 +Version: 1.00 +Support: Use twsocket@rtfm.be mailing list. See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit UUEncode; + +interface + +uses + SysUtils; + +const + UUEncodeVersion = 100; + CopyRight : String = ' UUEncodeVersion Unit (c) 1998 F. Piette V1.00 '; + + +procedure InitUUEncode(var hFile: File; sFile: string); +procedure DoUUEncode(var hFile: File; var sLine: string; var More: boolean); +procedure EndUUEncode(var hFile: File); + +implementation + +type + TLookup = array [0..64] of Char; + +const + Base64Out: TLookup = + ( + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '=' + ); + +{$I+} // Activate I/O check (EInOutError exception generated) + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure InitUUEncode(var hFile: File; sFile: string); +begin + AssignFile(hFile, sFile); + Reset(hFile, 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DoUUEncode(var hFile: File; var sLine: string; var More: boolean); +var + Count : integer; + DataIn : array [0..2] of byte; + DataOut : array [0..80] of byte; + ByteCount : integer; + i : integer; +begin + Count := 0; +{$I-} + while not Eof(hFile) do begin +{$I+} + BlockRead(hFile, DataIn, 3, ByteCount); + DataOut[Count] := (DataIn[0] and $FC) shr 2; + DataOut[Count + 1] := (DataIn[0] and $03) shl 4; + if ByteCount > 1 then begin + DataOut[Count + 1] := DataOut[Count + 1] + + (DataIn[1] and $F0) shr 4; + DataOut[Count + 2] := (DataIn[1] and $0F) shl 2; + if ByteCount > 2 then begin + DataOut[Count + 2] := DataOut[Count + 2] + + (DataIn[2] and $C0) shr 6; + DataOut[Count + 3] := (DataIn[2] and $3F); + end + else begin + DataOut[Count + 3] := $40; + end; + end + else begin + DataOut[Count + 2] := $40; + DataOut[Count + 3] := $40; + end; + + for i := 0 to 3 do + DataOut[Count + i] := Byte(Base64Out[DataOut[Count + i]]); + + Count := Count + 4; + + if Count > 59 then + break; + end; + + DataOut[Count] := $0; + sLine := StrPas(@DataOut[0]); + +{$I-} + More := not Eof(hFile); +{$I+} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure EndUUEncode(var hFile: File); +begin + CloseFile(hFile); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/WSOCKET.GID b/lib/Delphi/Vc32/WSOCKET.GID new file mode 100644 index 00000000..869eea80 Binary files /dev/null and b/lib/Delphi/Vc32/WSOCKET.GID differ diff --git a/lib/Delphi/Vc32/WSOCKET.HLP b/lib/Delphi/Vc32/WSOCKET.HLP new file mode 100644 index 00000000..9c3f3d49 Binary files /dev/null and b/lib/Delphi/Vc32/WSOCKET.HLP differ diff --git a/lib/Delphi/Vc32/WSockBuf.dcu b/lib/Delphi/Vc32/WSockBuf.dcu new file mode 100644 index 00000000..50a2da14 Binary files /dev/null and b/lib/Delphi/Vc32/WSockBuf.dcu differ diff --git a/lib/Delphi/Vc32/WSockBuf.pas b/lib/Delphi/Vc32/WSockBuf.pas new file mode 100644 index 00000000..016f279c --- /dev/null +++ b/lib/Delphi/Vc32/WSockBuf.pas @@ -0,0 +1,225 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TBuffer is an object wich buffers data in a single dynamically + allocated memory block. It is a kind of FIFO wich manages + characters in bloc of various sizes. +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Creation: April 1996 +Version: 2.01 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Mar 06, 1998 V2.00 Added a property and a parameter for the create method + to select the buffer size. Using a 0 value will make the object + use the default 1514 bytes (the largest size for an ethernet + packet). +Jul 08, 1998 V2.01 Adadpted for Delphi 4 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WSockBuf; + +interface + +uses + SysUtils; + +const + WSockBufVersion = 201; + +type + TBuffer = class(TObject) + Buf : Pointer; + FBufSize : Integer; + WrCount : Integer; + RdCount : Integer; + public + constructor Create(nSize : Integer); virtual; + destructor Destroy; override; + function Write(Data : Pointer; Len : Integer) : Integer; + function Read(Data : Pointer; Len : Integer) : Integer; + function Peek(var Len : Integer) : Pointer; + function Remove(Len : Integer) : Integer; + procedure SetBufSize(newSize : Integer); + property BufSize : Integer read FBufSize write SetBufSize; + end; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TBuffer.Create(nSize : Integer); +begin + inherited Create; + WrCount := 0; + RdCount := 0; + BufSize := nSize; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TBuffer.Destroy; +begin + if Assigned(Buf) then + FreeMem(Buf, FBufSize); + + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TBuffer.SetBufSize(newSize : Integer); +var + newBuf : Pointer; +begin + if newSize <= 0 then + newSize := 1514; + + if newSize = FBufSize then + Exit; + + if WrCount = RdCount then begin + { Buffer is empty } + if Assigned(Buf) then + FreeMem(Buf, FBufSize); + FBufSize := newSize; + GetMem(Buf, FBufSize); + end + else begin + { Buffer contains data } + GetMem(newBuf, newSize); + Move(Buf^, newBuf^, WrCount); + if Assigned(Buf) then + FreeMem(Buf, FBufSize); + FBufSize := newSize; + Buf := newBuf; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Write(Data : Pointer; Len : Integer) : Integer; +var + Remaining : Integer; + Copied : Integer; +begin + Remaining := FBufSize - WrCount; + if Remaining <= 0 then + Result := 0 + else begin + if Len <= Remaining then + Copied := Len + else + Copied := Remaining; + Move(Data^, (PChar(Buf) + WrCount)^, Copied); + WrCount := WrCount + Copied; + Result := Copied; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Read(Data : Pointer; Len : Integer) : Integer; +var + Remaining : Integer; + Copied : Integer; +begin + Remaining := WrCount - RdCount; + if Remaining <= 0 then + Result := 0 + else begin + if Len <= Remaining then + Copied := Len + else + Copied := Remaining; + Move((PChar(Buf) + RdCount)^, Data^, Copied); + RdCount := RdCount + Copied; + + if RdCount = WrCount then begin + RdCount := 0; + WrCount := 0; + end; + + Result := Copied; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Peek(var Len : Integer) : Pointer; +var + Remaining : Integer; +begin + Remaining := WrCount - RdCount; + if Remaining <= 0 then begin + Len := 0; + Result := nil; + end + else begin + Len := Remaining; + Result := Pointer(PChar(Buf) + RdCount); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Remove(Len : Integer) : Integer; +var + Remaining : Integer; + Removed : Integer; +begin + Remaining := WrCount - RdCount; + if Remaining <= 0 then + Result := 0 + else begin + if Len < Remaining then + Removed := Len + else + Removed := Remaining; + RdCount := RdCount + Removed; + + if RdCount = WrCount then begin + RdCount := 0; + WrCount := 0; + end; + + Result := Removed; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/WSocket.dcu b/lib/Delphi/Vc32/WSocket.dcu new file mode 100644 index 00000000..fc1fddb8 Binary files /dev/null and b/lib/Delphi/Vc32/WSocket.dcu differ diff --git a/lib/Delphi/Vc32/WSocket.pas b/lib/Delphi/Vc32/WSocket.pas new file mode 100644 index 00000000..a0cbd2b1 --- /dev/null +++ b/lib/Delphi/Vc32/WSocket.pas @@ -0,0 +1,5674 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TWSocket class encapsulate the Windows Socket paradigm +Creation: April 1996 +Version: 4.48 +EMail: francois.piette@overbyte.be http://www.overbyte.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1996-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Jul 18, 1996 Move all low level socket to winsock to be Delphi 2.x compatible +Sep 18, 1996 Use structured exception for handling errors +Sep 19, 1996 Check csDestroying before invoking event handler +Nov 04, 1996 Better error handling +Jan 31, 1997 Changed property assignation for Addr, Port and Proto + Added notification handler +Feb 14, 1997 Corrected bug in property assignation for Addr, Port and Proto +Mar 26, 1997 Make UDP protocol work correctly + Enable UDP broadcasting by using addr 255.255.255.255 +Apr 1, 1997 Added class function when independent of any open socket + Moved InitData as global + Added ReceivedFrom function + Added ResolveHost function +Jul 22, 1997 Adapted to Delphi 3 which has a modified winsock.accept +Aug 13, 1997 'sin' member made public +Aug 24, 1997 Create the only help + Makes writing HSocket the same as calling Dup. +Sep 5, 1997 Version 2.01, added WinsockInfo function +Sep 21, 1997 Version 2.02, make it really thread safe + created global WSocketVersion +Sep 25, 1997 Version 2.04, port to C++Builder +Sep 27, 1997 Version 2.05. All class methods converted to global + procedure or function because C++Builder do not like + class method very much. + Old class method New global function + ---------------- ------------------- + WinsockInfo WinsockInfo + SocketErrorDesc WSocketErrorDesc + GetHostByAddr WSocketGetHostByAddr + GetHostByName WSocketGetHostByName + ResolveHost WSocketResolveHost + HostName LocalHostName +Oct 02, 1997 V2.06 Added a check in destructor to avoid calling WSACleanup at + design time which crashes the excellent Eagle Software CDK. +Oct 16, 1997 V2.07 Added PortNum property with numeric value for Port. + Added RcvdCount property to return the number of + characters received in the buffer but not read yet. Do not + confuse with ReadCount which returns the number of chars + already received. + Added a check for FWait assignation in front of ReadLine + Prefixed each TSocketState value by 'ws' to avoid name conflict. + Moved FHSocket member to private section because the property + HSocket does the right job. + Added a check for state closed when changing Port, Proto and Addr. +Oct 22, 1997 V2.08 Added Flush method (asked by john@nexnix.co.uk) and + FlushTimeout property (default to 60 seconds). +Oct 22, 1997 V2.09 Added SendFlags property to enable sending in or out of + band data (normal or urgent, see RFC-1122) +Oct 28, 1997 V2.10 Added an OnLineTooLong event and code to handle the case + where ReadLine has been called and the buffer overflowed (line + long) +Oct 29, 1997 V2.11 Added DnsLookup functionnality (DnsLookup method, DnsResult + property and DnsLookupDone event). + Calling the connect method with a hostname work well except that + it could block for a long period (ie: 2 minutes) if DNS do not + respond. Calling the connect method with a numeric IP address will + never block. So you can call DnsLookup to start hostname + resolution in the background, after some time you evenutually + receive the OnDnsLookupDone event. The copy the DnsResult property + to the Addr property and call connect. +Oct 30, 1997 V2.12 added a check in DnsLookup to handel numeric IP which do + not require any lookup. The numeric IP is treated immediately + and immediately trigger the DnsLookupDone event. + I modified the code to be compatible with Delphi 1. +Oct 31, 1997 V2.13 added CancelDnsLookup procedure. +Nov 09, 1997 V2.14 add LocalIPList function to get the list of local IP + addresses (you have two IP addresses when connected to a LAN + and an ISP). +Nov 11, 1997 V2.15 Made TCustomWSocket with virtual functions. This will + allow to easily descend a new component from TCustomWSocket. + Make ReadLine stop when the connection is broken. +Nov 12, 1997 V2.16 Corrected bug (Justin Yunke ) + in LocalIPList: phe should be checked for nil. +Nov 18, 1997 Added ReceiveStr function (Suggested by FLDKNHA@danisco.com) +Nov 30, 1997 V2.18 Added a call to OnDnsLookupDone when canceling. +Dec 04, 1997 V2.19 Added LocalPort property and SessionConnected event + for UDP socket. + V2.20 Modified MessageLoop and ProcessMessages to process not + only the socket messages, but all messages (necessary if the + thread has several TWSocket for example). +Dec 09, 1997 V2.21 Corrected a minor bug in ReceiveStr. Detected by + david@e.co.za (David Butler). +Dec 10, 1997 V2.22 Corrected a minor bug in Send which now correctly + returns the number of bytes sent. Detected by + james.huggins@blockbuster.com +Dec 16, 1997 V2.23 Corrected a bug which prevented the receiving of datagram + from a UDP socket. + Thank to Mark Melvin (melvin@misrg.ml.org) for pointing it. +Dec 20, 1997 V2.24 Added the PeekData function as suggested by Matt Rose + mcrose@avproinc.com +Dec 26, 1997 V2.25 Added the Text property as suggested by Daniel P. Stasinski + . Made GetXPort work even when listening as + suggested by is81024@cis.nctu.edu.tw. +Jan 10, 1998 V2.26 Check for null hostname in DNSLookup + Added DnsResultList with all IP addresses returned form DNS +Jan 13, 1998 V2.27 a Added MultiThreaaded property to tell the component that + it is working in a thread and should take care of it (call + internal ProcessMessages in place of Application.ProcessMessages, + and do not use the WaitCtrl object). +Jan 15, 1998 V2.28 WMAsyncSelect revisited to work properly with NT winsock 2. +Feb 10, 1998 V2.29 Added an OnError event. If not assigned, then the component + raise an exception when the error occurs. +Feb 14, 1998 V2.30 Published Text property +Feb 16, 1998 V2.31 Added virtual methods to trigger events + Renamed all event handler variable to begin with FOn +Feb 26, 1998 V2.32 Added procedure PutDataInSendBuffer and PutStringInSendBuffer + Using PutDataInSendBuffer you can place data in the send buffer + without actualy trying to send it. This allows to place several + (probably small) data chunk before the component attempt to send + it. This prevent small packet to be sent. You can call + Send(nil, 0) to force the component to begin to send data. + If the buffer was not empty, PutDataInSendBuffer will just queue + data to the buffer. This data will be sent in sequence. +Mar 02, 1998 V2.33 Changed the error check with WSAstartup as pointed out by + Donald Strenczewilk (dstrenz@servtech.com) +Mar 06, 1998 V2.34 Added a runtime property to change the buffer size. +Mar 27, 1998 V2.35 Adapted for C++Builder 3 +Apr 08, 1998 V2.36 Made SetDefaultValue virtual +Apr 13, 1998 V2.37 Reset FDnsLookupHandle to 0 after a failed call to + WSACancelAsyncRequest +Apr 22, 1998 V2.38 Published AllSent property to let outside know if our + buffer has some data unsent. +Apr 28, 1998 V2.39 Added LingerOnOff and LingerTimeout. Default values are + wsLingerOn and timeout = 0 to behave by default as before. + This value is setup just before Connect. Call SetLingerOption to + set the linger option on the fly (the connection must be + established to set the option). See winsock.closesocket on line + help (winsock.hlp or win32.hlp) for a dsicussion of this option + usage. +May 06, 1998 V2.40 Added a workaround for Trumpet winsock inet_addr bug. + Thanks to Andrej Cuckov for his code. +May 18, 1998 V2.41 Jan Tomasek found that Trumpet + Winsock (Win 3.11) has some bugs and suggested a workaround in + TryToSend procedure. This workaround makes TWSocket blocking in + some cases. A new property enables the workaround. See code. +Jun 01, 1998 V2.42 In finalization section, check for not assigned IPList. +Jun 15, 1998 V2.43 Added code to finalization section to unload winsock if + still loaded at that point (this happend if no socket where + created but WinsockInfo called). Suggested by Daniel Fazekas + +Jun 27, 1998 V2.44 Added checks for valid arguments in SetPort, SetProto + and SetAddr. Deferred address resolution until Connect or Listen. +Jul 08, 1998 V2.45 Adadpted for Delphi 4 +Jul 20, 1998 V2.46 Added SetWindowLong(FWindowHandle, 0, 0) in the destructor + and a check for TWSocket class in XSocketWindowProc. + Added virtual method RealSend. +Jul 23, 1998 V2.47 Added a TriggerSessionClosed from TryToSend in case of + send error. This was called before, but with a nul error argument. + Now it correctly gives the error number. + Added a trashcan to receive data if no OnDataAvailable event + handler is installed. Just receive the data and throw it away. + Added reverse dns lookup asynchronous code (IP -> HostName). + Thanks to Daniel Fazekas for his code. +Jul 30, 1998 V2.48 Changed local variable "error" by FLastError in SocketError + to make it available from the OnError handler. Thanks to + dana@medical-info.com for finding this bug. + In Abort procedure, deleted all buffered data because it was send + the next time the socket is opened ! + Added CancelDnsLookup in Abort procedure. +Aug 28, 1998 V2.49 Made InternalClose and ReceiveStr virtual +Sep 01, 1998 V2.50 Ignore CancelDnsLookup exception during destroy +Sep 29, 1998 V2.51 In InternalClose, protect AssignDefaultValue with + try/except because SessionClosed event handler may have destroyed + the component. +Oct 11, 1998 V2.52 Changed Shutdown(2) to Shutdown(1) in Internal Close to + prevent data lost on send. You may have to call Shutdown(2) in + your own code before calling Close to have the same behaviour as + before. + Changed argument type for ASyncReceive and passed 0 from FD_CLOSE + message handler. +Oct 28, 1998 V2.53 Made WSocketLoadWinsock and WSocketUnloadWinsock public. +Nov 11, 1998 V2.54 Added OnDisplay event for debugging purpose +Nov 16, 1998 V2.55 Ignore WSANOTINITIALIZED error calling CloseSocket. This + occurs when using TWSocket from a DLL and the finalization + section is called before destroying TWSocket components (this is + a program logic error). + Made some properties and methods protected instead of private. + Made some methods virtual. + Added an Error argument to InternalClose. + Added DoRecv virtual function. + Added WSocketResolvePort + Added WSocketResolveProto + Deferred port and protocol resolution until really needed + Transformed Listen to procedure (in case of failure Listen + always calls SocketError which triggers an exception or the + OnError event). +Nov 22, 1998 V3.00 Skipped from V2.55 to V3.00. Socks support is major update! + Added SOCKS5 (RFC-1928) support for TCP connection and + simple usercode passwword authentication. + Consider the socks code as beta ! + New properties: SocksServer, SocksPort, SocksUsercode, + SocksPassword, FSocksAuthentication. New events: OnSocksError, + OnSocksConnected, OnSocksAuthState. + I used WinGate 2.1d to test my code. Unfortunately WinGate do + not correctly handle user authentication, so the code here is + just untested... +Dec 05, 1998 V3.10 Removed ReadLine feature using TWait component. + Added new TCustomLineWSocket and TCustomSyncWSocket. + Those modifications implies that the ReadLine functionnality is + slightly changed. Notably, the end of line marker is now + configurable and remains in the received line unless a timeout + occurs or the buffer is too small. +Dec 10, 1998 V3.11 Added missing code to resolve port in the Listen method. +Dec 12, 1998 V3.12 Added write method for LocalPort property. Thanks to + Jan Tomasek for his code. + Added background exception handling. + Fixed a bug in TCustomLineWSocket.TriggerDataAvailable which was + not calling the inherited function when it actually should. + Added a check on multithreaded in WaitForClose to call the + correct ProcessMessages procedure. + Added SOCKS4 support (only tcp connect is supported). +Dec 28, 1998 V3.13 Changed WSocketResolveHost to check for invalid numeric + IP addresses whitout trying to use them as hostnames. +Dec 30, 1998 V3.14 Changed SetPort to SetRemotePort to solve the SetPort + syndrome with BCB. Also chnaged GetPort to be consistant. +Jan 12, 1999 V3.15 Introduced DoRecvFrom virtual function. This correct a bug + introduced in V3.14 related to UDP and RecvFrom. +Jan 23, 1999 V3.16 Changed FRcvdFlag computation in DoRecv and DoRecvFrom + because it caused problems with HTTP component and large blocks. + Removed modification by Jan Tomasek in TriggerDataAvailable +Jan 30, 1999 V3.17 Added WSocketResolveIp function. + Checked for tcp protocol before setting linger off in abort. + Moved a lot of variables from private to protected sections. + Removed check for Assigned(FOnDataSent) in WMASyncSelect. +Feb 03, 1999 V3.18 Removed useless units in the uses clause. +Feb 14, 1999 V4.00 Jump to next major version number because lots of + fundamental changes have been done. See below. + + Use runtime dynamic link with winsock. All winsock functions + used by TWSocket are linked at runtime instead of loadtime. This + allows programs to run without winsock installed, provided program + doesn't try to use TWSocket or winsock function without first + checking for winsock installation. + Removed WSocketLoadWinsock and all use to DllStarted because it + is no longer necessary because winsock is automatically loaded + and initialized with the first call to a winsock function. + + Added MessagePump to centralize call to the message pump. + It is a virtual procedure so that you can override it to + cutomize your message pump. Also changed slightly ProcessMessages + to closely match what is done in the forms unit. + + Removed old stuff related to WaitCtrl (was already excluded from + compilation using a conditional directive). + + Added NOFORMS conditional compilation to exclude the Forms unit + from wsocket. This will reduce exe or dll size by 100 to 150KB. + To use this feature, you have to add NOFORMS in your project + options in the "defines" edit box in the "directory/conditional" + tab. Then you must add a message pump to your application and + call it from TWSocket.OnMessagePump event handler. TWSocket really + need a message pump in order to receive messages from winsock. + Depending on how your application is built, you can use either + TWSocket.MessageLoop or TWSocket.ProcessMessages to quickly build + a working message pump. Or you may build your own custom message + pump taylored to your needs. Your message pump must set + TWSocket.Terminated property to TRUE when your application + terminates or you may experience long delays when closing your + application. + You may use NOFORMS setting even if you use the forms unit (GUI + application). Simply call Application.ProcessMessages in the + OnMessagePump event handler. + OnMessagePump event is not visible in the object inspector. You + must assign it at run-time before using the component and after + having created it (in a GUI application you can do that in the + FormCreate event, in a console application, you can do it right + after TWSocket.Create call). +Feb 17, 1999 V4.01 Added LineEcho and LineEdit features. +Feb 27, 1999 V4.02 Added TCustomLineWSocket.GetRcvdCount to make RcvdCount + property and ReceiveStr work in line mode. +Mar 01, 1999 V4.03 Added conditional compile for BCB4. Thanks to James + Legg . +Mar 14, 1999 V4.04 Corrected a bug: wsocket hangup when there was no + OnDataAvailable handler and line mode was on. +Apr 21, 1999 V4.05 Added H+ (long strings) and X+ (extended syntax) + compilation options +May 07, 1999 V4.06 Added WSAECONNABORTED to valid error codes in TryToSend. +Jul 21, 1999 V4.07 Added GetPeerPort method, PeerPort and PeerAddr propertied + as suggested by J. Punter . +Aug 20, 1999 V4.05 Changed conditional compilation so that default is same + as latest compiler (currently Delphi 4, Bcb 4). Should be ok for + Delphi 5. + Added LocalAddr property as suggested by Rod Pickering + . LocalAddr default to '0.0.0.0' and is + intended to be used by a client when connecting to a server, to + select a local interface for multihomed computer. Note that to + select an interface for a server, use Addr property before + listening. + LocalAddr has to be an IP address in dotted form. Valid values are + '0.0.0.0' for any interface, '127.0.0.1' for localhost or any + value returned by LocalIPList. + Replaced loadtime import for ntohs and getpeername by runtime + load. + Revised check for dotted numeric IP address in WSocketResolveHost + to allow correct handling of hostnames beginning by a digit. + Added OnSendData event. Triggered each time data has been sent + to winsock. Do not confuse with OnDataSent which is triggered + when TWSocket internal buffer is emptyed. This event has been + suggested by Paul Gertzen" to + easyly implement progress bar. + Corrected WSocketGetHostByAddr to make it dynamically link to + winsock. +Sep 5, 1999 V4.09 Added CloseDelayed method. + Make sure that TriggerSessionClosed is called from WMASyncSelect + and InternalClose, even if there is no OnSessionClosed event + handler assigned. This is required to make derived components + work correctly. + Created message WM_TRIGGER_EXCEPTION to help checking background + exception handling (OnBgException event). + Corrected bug for Delphi 1 and ReallocMem. +Oct 02, 1999 V4.10 Added Release method. +Oct 16, 1999 V4.11 Corrected a bug in TCustomLineWSocket.DoRecv: need to move + data in front of buffer instead of changing buffer pointer which + will crash the whole thing at free time. +Oct 23, 1999 V4.12 Made WSocketIsDottedIP a public function +Nov 12, 1999 V4.13 removed 3 calls to TriggerSocksAuthState because it was + called twice. By A. Burlakov . +Jan 24, 1999 V4.14 Call Receive instead of DoRecv from ReceiveStr to be sure + to set LastError correctly. Thanks to Farkas Balazs + + Suppressed FDllName and used winsocket constant directly. I had + troubles with some DLL code and string handling at program + termination. +Apr 09, 2000 V4.15 Added error number when resolving proto and port +Apr 29, 2000 V4.16 Added WSocketForceLoadWinsock and + WSocketCancelForceLoadWinsock. Thanks to Steve Williams. + Created variable FSelectEvent to store current async event mask. + Added ComponentOptions property with currently only one options + wsoNoReceiveLoop which disable a receive loop in AsyncReceive. + This loop breaking was suggested by Davie + to lower resource usage with really fast LAN and large transfers. + By default, this option is disabled so there is no change needed + in current code. +May 20, 2000 V4.17 Made TSocket = u_int (same def as in winsock.pas) + Moved bind after setting options. + Thanks to Primoz Gabrijelcic +Jul 15, 2000 V4.18 Alon Gingold changed + TCustomSocksWSocket calls to inherited triggers of + TriggerSessionConnected and TriggerDataAvailable. + Now, it calls the trigger directly. This solves the problem + of descendent classes with overriden triggers, not being + called when a REAL connection was established, and when real + data starts coming in. Special care MUST be taken in such + overridden triggers to ONLY call the inherited trigger AND + IMMEDIATELY EXIT when FSocksState <> socksData to avoid loopback +Jul 22, 2000 V4.19 John Goodwin found a failure in the + logic for DnsLookup. He also implemented a workaround. + See DnsLookup comments for explanation. +Aug 09, 2000 V4.20 Alon Gingold found a bug in + SOCKS4 implementation where a nul byte was incorrectly added + (it should be added only with SOCKS4A version, not straith + SOCKS4). +Sep 17, 2000 V4.21 Eugene Mayevski added TWndMethod for + NOFORMS applications in other components. +Oct 15, 2000 V4.22 Added method GetXAddr which returns local IP address to + which a socket has been bound. There was already a GetXPort. + Thanks to Wilfried Mestdagh + and Steve Williams . +Nov 08, 2000 V4.23 Moved FSelectEvent from private to protected section. +Nov 11, 2000 V4.24 Added LineLimit property and OnLineLimitExceeded event. + When using line mode, line length is checked as each data block is + comming. If the length is greater than the limit, then the event + is triggered. You have the opportunity to close the socket or + change the limit to a higher value. Thus you can prevent a hacker + from locking your system by sending unlimited line which otherwise + would eat up all system resources. + Changed line handling variables to LongInt + Checked all length involved in StrPCopy calls. +Nov 26, 2000 V4.25 Do not trust GetRcvdCount. Always call Receive to check for + incomming data (sometime NT4 will hang if we don't do that). +Jan 24, 2001 V4.26 Blaine R Southam fixed out of bound + error in TCustomLineWSocket.TriggerDataAvailable +Feb 17, 2001 V4.27 Davie fixed a bug causing byte lost + when closing (related to wsoNoReceiveLoop option). +May 04, 2001 V4.28 Fixed W2K bug (winsock message ordering) +Jun 18, 2001 V4.29 Added AllocateHWnd and DeallocateHWnd from Forms unit to + avoid warning from Delphi 6 in all other components. +Jul 08, 2001 V4.30 Fixed small bug related to NOFOMRS and V4.29 +Jul 26, 2001 V4.31 Checked csDesigning in GetRcvdCount so that Delphi 6 does'nt + crash when object inspector wants to display RcvdCount value. + Added multicast capability and UDP ReuseAddr. Thanks to Mark + G. Lewis for his code. + Added TriggerSessionClosed to SocketError as suggested by Wilfried + Mestdagh +Jul 28, 2001 V4.32 New option wsoTcpNoDelay implemented. Code by Arnaldo Braun + +Jul 30, 2001 V4.33 Corrected at few glitches with Delphi 1 +Sep 08, 2001 V4.34 Added ThreadAttach and related functions +Nov 27, 2001 V4.35 Added type definition for in_addr and Delphi 2 (Yes there are + still some peoples who wants to use it. Don't ask me why !). +Dec 02, 2001 V4.36 david.brock2@btinternet.com found a bug in SOCKS4 where + error check incorrectly checked "FRcvBuf[1] = #$90" instead of + "FRcvBuf[1] <> #90". He also found a bug when receiving domain name + where length of name was incorrectly copyed to the buffer. +Dec 23, 2001 V4.37 Removed bWrite, nMoreCnt, bMoreFlag and nMoreMax which where + not more really used. Thanks to Al Kirk for + showing that. +Feb 24, 2002 V4.38 Wilfried Mestdagh added ThreadDetach + and a property editor for LineEnd. XSocketDeallocateHWnd made a + function. + I created a new unit WSocketE.pas to put Wilfried's property + editor so that it works correctly with Delphi 6. +Apr 24, 2002 V4.39 Removed OnLineTooLong event which was not used anywhere. + Use OnLineLimitExceeded event if you used this event. + Thanks to Alex Kook for finding this one. +Apr 27, 2002 V4.40 Added procedure WSocketUnregisterClass to be able to + unregister hidden window. This is necessary when TWSocket is + used within a DLL which is unloaded and reloaded by applications, + specially when running with Windows-XP. Thanks to Jean-Michel Aliu + who provided a test case. +Jun 02, 2002 V4.41 allow SOCK_RAW in Connect method for any protocol which is + not TCP or UDP. Thanks to Holger Lembke . +Jun 04, 2002 V4.42 Do not call Listen for SOCK_RAW. + Thanks to Holger Lembke . +Jun 08, 2002 V4.43 Add a dummy Register procedure for BCB1. + Thanks to Marc-Alexander Prowe . +Jul 07, 2002 V4.44 Added code in Connect method to check if socket still opened + after OnChangeState event. If not, trigger an error WSAINVAL. +Sep 16, 2002 V4.45 Exposed RcvdPtr and RcvdCnt readonly properties. +Sep 17, 2002 V4.46 Used InterlockedIncrement/InterlockedDecrement to Inc/Dec + socket count safely when TWSocket is used within a thread. This + was proposed by Matthew Meadows +Sep 28, 2002 V4.47 Changed DnsLookup so that a hostname is checked for dotted + IP addresse and resolve it numerically. Thanks to Bogdan Calin + who found this bug. Alos loaded the result + list with the address to be consistant with real lookup result. +Nov 17, 2002 V4.48 Roland Klabunde found a bug in + multicast code: listening on a specific interface was ignored. + He fixed Listen and Connect. + + +About multithreading and event-driven: + TWSocket is a pure asynchronous component. It is non-blocking and + event-driven. It means that when you request an operation such as connect, + the component start the operation your requested and give control back + immediately while performing the operation in the background automatically. + When the operation is done, an event is triggered (such as + OnSessionConnected if you called Connect). + + This asynchronous non-blocking behaviour is very high performance but a + little bit difficult to start with. For example, you can't call Connect and + immediately call SendStr the line below. If you try, you'll have an + exception triggered saying you are not connected. Calling connect will start + connection process but will return long before connection is established. + Calling SendStr at the next line will not work because the socket is not + connected yet. To make it works the right way, you have to put your SendStr + in the OnSessionConnected event. + + The asynchronous operation allows you to do several TCP/IP I/O + simultaneously. Just use as many component as you need. Each one will + operate independently of the other without blocking each other ! So you + basically don't need multi-threading with TWSocket, unless YOUR processing + is lengthy and blocking. + + If you have to use multithreading, you have two possibilities: + 1) Create your TWSocket from your thread's Execute method + 2) Attach a TWSocket to a given thread using ThreadAttach. + In both cases, you must set MultiThreaded property to TRUE. + If you don't use one of those methods, you'll end up with a false + multithreaded program: all events will be processed by the main tread ! + For both methods to work, you MUST have a message loop withing your thread. + Delphi create a message loop automatically for the main thread (it's in + the Forms unit), but does NOT create one in a thread ! For your convenience, + TWSocket has his own MessageLoop procedure. You can use it from your thread. + + Sample program MtSrv uses first method while ThrdSrv uses second method. + Sample program TcpSrv is much the same as ThrdSrv but doesn't use any + thread. You'll see that it is able to server a lot of simultaneous clients + as well and it is much simpler. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WSocket; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{ VER80 => Delphi 1 } +{ VER90 => Delphi 2 } +{ VER93 => Bcb 1 } +{ VER100 => Delphi 3 } +{ VER110 => Bcb 3 } +{ VER120 => Delphi 4 } +{ VER125 => Bcb 4 } +{ VER130 => Delphi 5 } +{ VER135 => Bcb 5 } +{ VER140 => Delphi 6 } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, Messages, Classes, SysUtils, +{$IFNDEF NOFORMS} { See comments in history at 14/02/99 } + Forms, +{$ENDIF} + WSockBuf, WinSock; + +const + WSocketVersion = 447; + CopyRight : String = ' TWSocket (c) 1996-2002 Francois Piette V4.47 '; + WM_ASYNCSELECT = WM_USER + 1; + WM_ASYNCGETHOSTBYNAME = WM_USER + 2; + WM_ASYNCGETHOSTBYADDR = WM_USER + 3; + WM_CLOSE_DELAYED = WM_USER + 4; + WM_WSOCKET_RELEASE = WM_USER + 5; + WM_TRIGGER_EXCEPTION = WM_USER + 6; + WM_TRIGGER_DATA_AVAILABLE = WM_USER + 20; + WSA_WSOCKET_TIMEOUT = 12001; +{$IFDEF WIN32} + winsocket = 'wsock32.dll'; { 32 bits TCP/IP system DLL } +{$ELSE} + winsocket = 'winsock.dll'; { 16 bits TCP/IP system DLL } +{$ENDIF} + +type + + TWndMethod = procedure(var Message: TMessage) of object; + ESocketException = class(Exception); + TBgExceptionEvent = procedure (Sender : TObject; + E : Exception; + var CanClose : Boolean) of object; + + TSocketState = (wsInvalidState, + wsOpened, wsBound, + wsConnecting, wsConnected, + wsAccepting, wsListening, + wsClosed); + TSocketSendFlags = (wsSendNormal, wsSendUrgent); + TSocketLingerOnOff = (wsLingerOff, wsLingerOn, wsLingerNoSet); + TSockAddr = Winsock.TSockAddr; + + TDataAvailable = procedure (Sender: TObject; Error: word) of object; + TDataSent = procedure (Sender: TObject; Error: word) of object; + TSendData = procedure (Sender: TObject; BytesSent: Integer) of object; + TSessionClosed = procedure (Sender: TObject; Error: word) of object; + TSessionAvailable = procedure (Sender: TObject; Error: word) of object; + TSessionConnected = procedure (Sender: TObject; Error: word) of object; + TDnsLookupDone = procedure (Sender: TObject; Error: Word) of object; + TChangeState = procedure (Sender: TObject; + OldState, NewState : TSocketState) of object; + TDebugDisplay = procedure (Sender: TObject; var Msg : String) of object; + TWSocketSyncNextProc = procedure of object; + TWSocketOption = (wsoNoReceiveLoop, wsoTcpNoDelay); + TWSocketOptions = set of TWSocketOption; +{ TSocket type is defined for Delphi 1/2/3 but not for all others } +{$IFNDEF VER80} { Delphi 1 } +{$IFNDEF VER90} { Delphi 2 } +{$IFNDEF VER100} { Delphi 3 } + TSocket = u_int; +{$ENDIF} +{$ENDIF} +{$ENDIF} + + TCustomWSocket = class(TComponent) + private + FDnsResult : String; + FDnsResultList : TStrings; + FASocket : TSocket; { Accepted socket } + FBufList : TList; + FBufSize : Integer; + FSendFlags : Integer; + FLastError : Integer; + FWindowHandle : HWND; + FDnsLookupBuffer : array [0..MAXGETHOSTSTRUCT] of char; + FDnsLookupHandle : THandle; + FDnsLookupCheckMsg : Boolean; + FDnsLookupTempMsg : TMessage; + {$IFDEF VER80} + FTrumpetCompability : Boolean; + {$ENDIF} + protected + FHSocket : TSocket; + FAddrStr : String; + FAddrResolved : Boolean; + FAddrFormat : Integer; + FAddrAssigned : Boolean; + FProto : integer; + FProtoAssigned : Boolean; + FProtoResolved : Boolean; + FLocalPortResolved : Boolean; + FProtoStr : String; + FPortStr : String; + FPortAssigned : Boolean; + FPortResolved : Boolean; + FPortNum : Integer; + FLocalPortStr : String; + FLocalPortNum : Integer; + FLocalAddr : String; { IP address for local interface to use } + FType : integer; + FLingerOnOff : TSocketLingerOnOff; + FLingerTimeout : Integer; { In seconds, 0 = disabled } + ReadLineCount : Integer; + {bWrite : Boolean;23/12/01} + {nMoreCnt : Integer;23/12/01} + {bMoreFlag : Boolean; 23/12/01} + {nMoreMax : Integer;23/12/01} + bAllSent : Boolean; + FReadCount : LongInt; + FPaused : Boolean; + FCloseInvoked : Boolean; + FFlushTimeout : Integer; + FMultiThreaded : Boolean; + FMultiCast : Boolean; + FMultiCastAddrStr : String; + FMultiCastIpTTL : Integer; + FReuseAddr : Boolean; + FComponentOptions : TWSocketOptions; + FState : TSocketState; + FRcvdFlag : Boolean; + FTerminated : Boolean; + FSelectEvent : LongInt; + FOnSessionAvailable : TSessionAvailable; + FOnSessionConnected : TSessionConnected; + FOnSessionClosed : TSessionClosed; + FOnChangeState : TChangeState; + FOnDataAvailable : TDataAvailable; + FOnDataSent : TDataSent; + FOnSendData : TSendData; + { FOnLineTooLong : TNotifyEvent; } + FOnDnsLookupDone : TDnsLookupDone; + FOnError : TNotifyEvent; + FOnBgException : TBgExceptionEvent; + FOnDisplay : TDebugDisplay; + FOnMessagePump : TNotifyEvent; + FThreadId : THandle; + procedure WndProc(var MsgRec: TMessage); virtual; + procedure AllocateSocketHWnd; virtual; + procedure DeallocateSocketHWnd; virtual; + procedure SocketError(sockfunc: string); + procedure WMASyncSelect(var msg: TMessage); message WM_ASYNCSELECT; + procedure WMAsyncGetHostByName(var msg: TMessage); message WM_ASYNCGETHOSTBYNAME; + procedure WMAsyncGetHostByAddr(var msg: TMessage); message WM_ASYNCGETHOSTBYADDR; + procedure WMCloseDelayed(var msg: TMessage); message WM_CLOSE_DELAYED; + procedure WMRelease(var msg: TMessage); message WM_WSOCKET_RELEASE; + procedure ChangeState(NewState : TSocketState); + procedure TryToSend; + procedure ASyncReceive(Error : Word; MySocketOptions : TWSocketOptions); + procedure AssignDefaultValue; virtual; + procedure InternalClose(bShut : Boolean; Error : Word); virtual; + procedure Notification(AComponent: TComponent; operation: TOperation); override; + procedure SetSendFlags(newValue : TSocketSendFlags); + function GetSendFlags : TSocketSendFlags; + procedure SetAddr(InAddr : String); + function GetAddr : String; + procedure SetRemotePort(sPort : String); virtual; + function GetRemotePort : String; + procedure SetLocalAddr(sLocalAddr : String); + procedure SetLocalPort(sLocalPort : String); + procedure SetProto(sProto : String); virtual; + function GetProto : String; + function GetRcvdCount : LongInt; virtual; + procedure BindSocket; virtual; + procedure SendText(Str : String); + function RealSend(Data : Pointer; Len : Integer) : Integer; virtual; + procedure RaiseExceptionFmt(const Fmt : String; args : array of const); virtual; + procedure RaiseException(const Msg : String); virtual; + procedure HandleBackGroundException(E: Exception); virtual; + procedure TriggerDisplay(Msg : String); + procedure TriggerSendData(BytesSent : Integer); + function TriggerDataAvailable(Error : Word) : Boolean; virtual; + procedure TriggerSessionAvailable(Error : Word); virtual; + procedure TriggerSessionConnected(Error : Word); virtual; + procedure TriggerSessionClosed(Error : Word); virtual; + procedure TriggerDataSent(Error : Word); virtual; + procedure TriggerChangeState(OldState, NewState : TSocketState); virtual; + procedure TriggerDNSLookupDone(Error : Word); virtual; + procedure TriggerError; virtual; + function DoRecv(var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; virtual; + function DoRecvFrom(FHSocket : TSocket; + var Buffer; + BufferSize : Integer; + Flags : Integer; + var From : TSockAddr; + var FromLen : Integer) : Integer; virtual; + public + sin : TSockAddrIn; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Connect; virtual; + procedure Close; virtual; + procedure CloseDelayed; virtual; + procedure Release; virtual; + procedure Abort; virtual; + procedure Flush; virtual; + procedure WaitForClose; virtual; + procedure Listen; virtual; + function Accept: TSocket; virtual; + function Receive(Buffer : Pointer; BufferSize: integer) : integer; virtual; + function ReceiveStr : string; virtual; + function ReceiveFrom(Buffer : Pointer; + BufferSize : Integer; + var From : TSockAddr; + var FromLen : Integer) : integer; virtual; + function PeekData(Buffer : Pointer; BufferSize: integer) : integer; + function Send(Data : Pointer; Len : Integer) : integer; virtual; + function SendTo(Dest : TSockAddr; + DestLen : Integer; + Data : Pointer; + Len : Integer) : integer; virtual; + function SendStr(Str : String) : Integer; virtual; + procedure DnsLookup(HostName : String); virtual; + procedure ReverseDnsLookup(HostAddr: String); virtual; + procedure CancelDnsLookup; virtual; + function GetPeerAddr: string; virtual; + function GetPeerPort: string; virtual; + function GetPeerName(var Name : TSockAddrIn; NameLen : Integer) : integer; virtual; + function GetXPort: string; virtual; + function GetXAddr: string; virtual; + function TimerIsSet(var tvp : TTimeVal) : Boolean; virtual; + procedure TimerClear(var tvp : TTimeVal); virtual; + function TimerCmp(var tvp : TTimeVal; var uvp : TTimeVal; IsEqual : Boolean) : Boolean; virtual; + function GetSockName(var saddr : TSockAddrIn; var saddrlen : Integer) : integer; virtual; + procedure SetLingerOption; + procedure Dup(NewHSocket : TSocket); virtual; + procedure Shutdown(How : Integer); virtual; + procedure Pause; virtual; + procedure Resume; virtual; + procedure PutDataInSendBuffer(Data : Pointer; Len : Integer); + procedure PutStringInSendBuffer(Str : String); + procedure DeleteBufferedData; + procedure MessagePump; virtual; +{$IFNDEF VER80} + procedure ThreadAttach; + procedure ThreadDetach; + procedure MessageLoop; + function ProcessMessage : Boolean; + procedure ProcessMessages; +{$ENDIF} +{$IFDEF NOFORMS} + property Terminated : Boolean read FTerminated + write FTerminated; + property OnMessagePump : TNotifyEvent read FOnMessagePump + write FOnMessagePump; +{$ENDIF} + protected + property PortNum : Integer read FPortNum; + property Handle : HWND read FWindowHandle; + property HSocket : TSocket read FHSocket + write Dup; + + property Addr : string read GetAddr + write SetAddr; + property Port : string read GetRemotePort + write SetRemotePort; + property LocalPort : String read FLocalPortStr + write SetLocalPort; + property LocalAddr : String read FLocalAddr + write SetLocalAddr; + property Proto : String read GetProto + write SetProto; + property MultiThreaded : Boolean read FMultiThreaded + write FMultiThreaded; + property MultiCast : Boolean read FMultiCast + write FMultiCast; + property MultiCastAddrStr: String read FMultiCastAddrStr + write FMultiCastAddrStr; + property MultiCastIpTTL : Integer read FMultiCastIpTTL + write FMultiCastIpTTL; + property ReuseAddr : Boolean read FReuseAddr + write FReuseAddr; + property PeerAddr : String read GetPeerAddr; + property PeerPort : String read GetPeerPort; + property DnsResult : String read FDnsResult; + property DnsResultList : TStrings read FDnsResultList; + property State : TSocketState read FState; + property AllSent : Boolean read bAllSent; + property ReadCount : LongInt read FReadCount; + property RcvdCount : LongInt read GetRcvdCount; + property LastError : Integer read FLastError; + property ComponentOptions : TWSocketOptions read FComponentOptions + write FComponentOptions; + property BufSize : Integer read FBufSize + write FBufSize; + property OnDataAvailable : TDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnDataSent : TDataSent read FOnDataSent + write FOnDataSent; + property OnSendData : TSendData read FOnSendData + write FOnSendData; + property OnSessionClosed : TSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnSessionAvailable : TSessionAvailable read FOnSessionAvailable + write FOnSessionAvailable; + property OnSessionConnected : TSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnChangeState : TChangeState read FOnChangeState + write FOnChangeState; + { property OnLineTooLong : TNotifyEvent read FOnLineTooLong + write FOnLineTooLong; } + property OnDnsLookupDone : TDnsLookupDone read FOnDnsLookupDone + write FOnDnsLookupDone; + property OnError : TNotifyEvent read FOnError + write FOnError; + property OnBgException : TBgExceptionEvent read FOnBgException + write FOnBgException; + + property FlushTimeout : Integer read FFlushTimeOut + write FFlushTimeout; + property SendFlags : TSocketSendFlags read GetSendFlags + write SetSendFlags; + property Text: String read ReceiveStr + write SendText; + property LingerOnOff : TSocketLingerOnOff read FLingerOnOff + write FLingerOnOff; + property LingerTimeout : Integer read FLingerTimeout + write FLingerTimeout; +{$IFDEF VER80} + property TrumpetCompability : Boolean read FTrumpetCompability + write FTrumpetCompability; +{$ENDIF} + property OnDisplay : TDebugDisplay read FOnDisplay + write FOnDisplay; + end; + + TSocksState = (socksData, socksNegociateMethods, socksAuthenticate, socksConnect); + TSocksAuthentication = (socksNoAuthentication, socksAuthenticateUsercode); + TSocksAuthState = (socksAuthStart, socksAuthSuccess, socksAuthFailure, socksAuthNotRequired); + TSocksAuthStateEvent = procedure(Sender : TObject; AuthState : TSocksAuthState) of object; + TSocksErrorEvent = procedure(Sender : TObject; Error : Integer; Msg : String) of Object; + + TCustomSocksWSocket = class(TCustomWSocket) + protected + FSocksState : TSocksState; + FSocksServer : String; + FSocksLevel : String; + FSocksPort : String; + FSocksPortAssigned : Boolean; + FSocksServerAssigned : Boolean; + FSocksUsercode : String; + FSocksPassword : String; + FSocksAuthentication : TSocksAuthentication; + FSocksAuthNumber : char; + FBoundAddr : String; + FBoundPort : String; + FRcvBuf : array [0..127] of char; + FRcvCnt : Integer; + FSocksRcvdCnt : Integer; + FSocksRcvdPtr : PChar; + FOnSocksError : TSocksErrorEvent; + FOnSocksConnected : TSessionConnected; + FOnSocksAuthState : TSocksAuthStateEvent; + procedure AssignDefaultValue; override; + procedure TriggerSessionConnected(Error : Word); override; + procedure TriggerSocksConnected(Error : Word); virtual; + procedure TriggerSessionClosed(Error : Word); override; + function TriggerDataAvailable(Error : Word) : Boolean; override; + procedure SetSocksPort(sPort : String); virtual; + procedure SetSocksServer(sServer : String); virtual; + procedure TriggerSocksError(Error : Integer; Msg : String); virtual; + procedure TriggerSocksAuthState(AuthState : TSocksAuthState); + function GetRcvdCount : LongInt; override; + procedure SetSocksLevel(newValue : String); + function DoRecv(var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; override; + procedure SocksDoConnect; + procedure SocksDoAuthenticate; + procedure DataAvailableError(ErrCode : Integer; Msg : String); + public + procedure Connect; override; + procedure Listen; override; + protected + property SocksServer : String read FSocksServer + write SetSocksServer; + property SocksLevel : String read FSocksLevel + write SetSocksLevel; + property SocksPort : String read FSocksPort + write SetSocksPort; + property SocksUsercode : String read FSocksUsercode + write FSocksUsercode; + property SocksPassword : String read FSocksPassword + write FSocksPassword; + property SocksAuthentication : TSocksAuthentication + read FSocksAuthentication + write FSocksAuthentication; + property OnSocksError : TSocksErrorEvent read FOnSocksError + write FOnSocksError; + property OnSocksConnected : TSessionConnected read FOnSocksConnected + write FOnSocksConnected; + property OnSocksAuthState : TSocksAuthStateEvent + read FOnSocksAuthState + write FOnSocksAuthState; + end; + + TLineLimitEvent = procedure (Sender : TObject; + RcvdLength : LongInt; + var ClearData : Boolean) of object; + TCustomLineWSocket = class (TCustomSocksWSocket) + protected + FRcvdPtr : PChar; + FRcvBufSize : LongInt; + FRcvdCnt : LongInt; + FLineEnd : String; + FLineMode : Boolean; + FLineLength : Integer; { When a line is available } + FLineLimit : LongInt; { Max line length we accept } + FLineReceivedFlag : Boolean; + FLineClearData : Boolean; + FLineEcho : Boolean; { Echo received data } + FLineEdit : Boolean; { Edit received data } + FTimeout : LongInt; { Given in milliseconds } + FTimeStop : LongInt; { Milliseconds } + FOnLineLimitExceeded : TLineLimitEvent; + procedure WndProc(var MsgRec: TMessage); override; + procedure WMTriggerDataAvailable(var msg: TMessage); message WM_TRIGGER_DATA_AVAILABLE; + function TriggerDataAvailable(Error : Word) : Boolean; override; + procedure TriggerSessionClosed(Error : Word); override; + procedure TriggerLineLimitExceeded(Cnt: Integer; + var ClearData : Boolean); virtual; + procedure SetLineMode(newValue : Boolean); virtual; + procedure EditLine(var Len : Integer); virtual; + function GetRcvdCount : LongInt; override; + function DoRecv(var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + property LineLength : Integer read FLineLength; + property RcvdPtr : PChar read FRcvdPtr; + property RcvdCnt : LongInt read FRcvdCnt; + published + property LineMode : Boolean read FLineMode + write SetLineMode; + property LineLimit : LongInt read FLineLimit + write FLineLimit; + property LineEnd : String read FLineEnd + write FLineEnd; + property LineEcho : Boolean read FLineEcho + write FLineEcho; + property LineEdit : Boolean read FLineEdit + write FLineEdit; + property OnLineLimitExceeded : TLineLimitEvent + read FOnLineLimitExceeded + write FOnLineLimitExceeded; + end; + + TCustomSyncWSocket = class(TCustomLineWSocket) + protected + FLinePointer : ^String; + function Synchronize(Proc : TWSocketSyncNextProc; var DoneFlag : Boolean) : Integer; virtual; + function WaitUntilReady(var DoneFlag : Boolean) : Integer; virtual; + procedure InternalDataAvailable(Sender: TObject; Error: Word); + public + procedure ReadLine(Timeout : integer; var Buffer : String); + end; + + TWSocket = class(TCustomSyncWSocket) + public + property PortNum; + property Handle; + property HSocket; + property BufSize; + property Text; + property AllSent; + {$IFDEF VER80} + property TrumpetCompability; + {$ENDIF} + property OnDisplay; + published + property Addr; + property Port; + property Proto; + property LocalAddr; + property LocalPort; + property PeerPort; + property PeerAddr; + property DnsResult; + property DnsResultList; + property State; + property ReadCount; + property RcvdCount; + property LastError; + property MultiThreaded; + property MultiCast; + property MultiCastAddrStr; + property MultiCastIpTTL; + property ReuseAddr; + property ComponentOptions; + property OnDataAvailable; + property OnDataSent; + property OnSendData; + property OnSessionClosed; + property OnSessionAvailable; + property OnSessionConnected; + property OnSocksConnected; + property OnChangeState; + { property OnLineTooLong; } + property OnDnsLookupDone; + property OnError; + property OnBgException; + property FlushTimeout; + property SendFlags; + property LingerOnOff; + property LingerTimeout; + property SocksLevel; + property SocksServer; + property SocksPort; + property SocksUsercode; + property SocksPassword; + property SocksAuthentication; + property OnSocksError; + property OnSocksAuthState; + end; + + TSocksWSocket = class(TWSocket) + end; + + +function WinsockInfo : TWSADATA; +function WSocketErrorDesc(error: integer) : string; +function WSocketGetHostByAddr(Addr : String) : PHostEnt; +function WSocketGetHostByName(Name : String) : PHostEnt; +function LocalHostName : String; +function LocalIPList : TStrings; +function WSocketResolveIp(IpAddr : String) : String; +function WSocketResolveHost(InAddr : String) : TInAddr; +function WSocketResolvePort(Port : String; Proto : String) : Word; +function WSocketResolveProto(sProto : String) : integer; +procedure WSocketForceLoadWinsock; +procedure WSocketCancelForceLoadWinsock; +procedure WSocketUnloadWinsock; +function WSocketIsDottedIP(const S : String) : Boolean; +{ function WSocketLoadWinsock : Boolean; 14/02/99 } +{$IFNDEF VER80} +procedure WSocketUnregisterClass; +{$ENDIF} + +type +{$IFDEF VER80} + DWORD = LongInt; + TWSAStartup = function (wVersionRequired: word; + var WSData: TWSAData): Integer; + TWSACleanup = function : Integer; + TWSASetLastError = procedure (iError: Integer); + TWSAGetLastError = function : Integer; + TWSACancelAsyncRequest = function (hAsyncTaskHandle: THandle): Integer; + TWSAAsyncGetHostByName = function (HWindow: HWND; + wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; + TWSAAsyncGetHostByAddr = function (HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; + TWSAAsyncSelect = function (s: TSocket; + HWindow: HWND; + wMsg: u_int; + lEvent: Longint): Integer; + TGetServByName = function (name, proto: PChar): PServEnt; + TGetProtoByName = function (name: PChar): PProtoEnt; + TGetHostByName = function (name: PChar): PHostEnt; + TGetHostByAddr = function (addr: Pointer; len, Struct: Integer): PHostEnt; + TGetHostName = function (name: PChar; len: Integer): Integer; + TOpenSocket = function (af, Struct, protocol: Integer): TSocket; + TShutdown = function (s: TSocket; how: Integer): Integer; + TSetSockOpt = function (s: TSocket; level, optname: Integer; + optval: PChar; + optlen: Integer): Integer; + TGetSockOpt = function (s: TSocket; level, optname: Integer; optval: PChar; var optlen: Integer): Integer; + TSendTo = function (s: TSocket; var Buf; + len, flags: Integer; + var addrto: TSockAddr; + tolen: Integer): Integer; + TSend = function (s: TSocket; var Buf; + len, flags: Integer): Integer; + TRecv = function (s: TSocket; + var Buf; + len, flags: Integer): Integer; + TRecvFrom = function (s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; + Tntohs = function (netshort: u_short): u_short; + Tntohl = function (netlong: u_long): u_long; + TListen = function (s: TSocket; backlog: Integer): Integer; + TIoctlSocket = function (s: TSocket; cmd: DWORD; + var arg: u_long): Integer; + TInet_ntoa = function (inaddr: TInAddr): PChar; + TInet_addr = function (cp: PChar): u_long; + Thtons = function (hostshort: u_short): u_short; + Thtonl = function (hostlong: u_long): u_long; + TGetSockName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; + TGetPeerName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; + TConnect = function (s: TSocket; var name: TSockAddr; + namelen: Integer): Integer; + TCloseSocket = function (s: TSocket): Integer; + TBind = function (s: TSocket; var addr: TSockAddr; + namelen: Integer): Integer; + TAccept = function (s: TSocket; var addr: TSockAddr; + var addrlen: Integer): TSocket; +{$ELSE} + TWSAStartup = function (wVersionRequired: word; + var WSData: TWSAData): Integer; stdcall; + TWSACleanup = function : Integer; stdcall; + TWSASetLastError = procedure (iError: Integer); stdcall; + TWSAGetLastError = function : Integer; stdcall; + TWSACancelAsyncRequest = function (hAsyncTaskHandle: THandle): Integer; stdcall; + TWSAAsyncGetHostByName = function (HWindow: HWND; + wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; stdcall; + TWSAAsyncGetHostByAddr = function (HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; stdcall; + TWSAAsyncSelect = function (s: TSocket; + HWindow: HWND; + wMsg: u_int; + lEvent: Longint): Integer; stdcall; + TGetServByName = function (name, proto: PChar): PServEnt; stdcall; + TGetProtoByName = function (name: PChar): PProtoEnt; stdcall; + TGetHostByName = function (name: PChar): PHostEnt; stdcall; + TGetHostByAddr = function (addr: Pointer; len, Struct: Integer): PHostEnt; stdcall; + TGetHostName = function (name: PChar; len: Integer): Integer; stdcall; + TOpenSocket = function (af, Struct, protocol: Integer): TSocket; stdcall; + TShutdown = function (s: TSocket; how: Integer): Integer; stdcall; + TSetSockOpt = function (s: TSocket; level, optname: Integer; + optval: PChar; + optlen: Integer): Integer; stdcall; + TGetSockOpt = function (s: TSocket; level, optname: Integer; + optval: PChar; + var optlen: Integer): Integer; stdcall; + TSendTo = function (s: TSocket; var Buf; + len, flags: Integer; + var addrto: TSockAddr; + tolen: Integer): Integer; stdcall; + TSend = function (s: TSocket; var Buf; + len, flags: Integer): Integer; stdcall; + TRecv = function (s: TSocket; + var Buf; + len, flags: Integer): Integer; stdcall; + TRecvFrom = function (s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; stdcall; + Tntohs = function (netshort: u_short): u_short; stdcall; + Tntohl = function (netlong: u_long): u_long; stdcall; + TListen = function (s: TSocket; + backlog: Integer): Integer; stdcall; + TIoctlSocket = function (s: TSocket; cmd: DWORD; + var arg: u_long): Integer; stdcall; + TInet_ntoa = function (inaddr: TInAddr): PChar; stdcall; + TInet_addr = function (cp: PChar): u_long; stdcall; + Thtons = function (hostshort: u_short): u_short; stdcall; + Thtonl = function (hostlong: u_long): u_long; stdcall; + TGetSockName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; stdcall; + TGetPeerName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; stdcall; + TConnect = function (s: TSocket; var name: TSockAddr; + namelen: Integer): Integer; stdcall; + TCloseSocket = function (s: TSocket): Integer; stdcall; + TBind = function (s: TSocket; var addr: TSockAddr; + namelen: Integer): Integer; stdcall; +{$IFDEF VER90} { Delphi 2 has a special definition} + TAccept = function (s: TSocket; var addr: TSockAddr; + var addrlen: Integer): TSocket; stdcall; +{$ELSE} + TAccept = function (s: TSocket; addr: PSockAddr; + addrlen: PInteger): TSocket; stdcall; +{$ENDIF} +{$ENDIF} + +var + FWSAStartup : TWSAStartup; + FWSACleanup : TWSACleanup; + FWSASetLastError : TWSASetLastError; + FWSAGetLastError : TWSAGetLastError; + FWSACancelAsyncRequest : TWSACancelAsyncRequest; + FWSAAsyncGetHostByName : TWSAAsyncGetHostByName; + FWSAAsyncGetHostByAddr : TWSAAsyncGetHostByAddr; + FWSAAsyncSelect : TWSAAsyncSelect; + FGetServByName : TGetServByName; + FGetProtoByName : TGetProtoByName; + FGetHostByName : TGetHostByName; + FGetHostByAddr : TGetHostByAddr; + FGetHostName : TGetHostName; + FOpenSocket : TOpenSocket; + FShutdown : TShutdown; + FSetSockOpt : TSetSockOpt; + FGetSockOpt : TGetSockOpt; + FSendTo : TSendTo; + FSend : TSend; + FRecv : TRecv; + FRecvFrom : TRecvFrom; + Fntohs : Tntohs; + Fntohl : Tntohl; + FListen : TListen; + FIoctlSocket : TIoctlSocket; + FInet_ntoa : TInet_ntoa; + FInet_addr : TInet_addr; + Fhtons : Thtons; + Fhtonl : Thtonl; + FGetSockName : TGetSockName; + FGetPeerName : TGetPeerName; + FConnect : TConnect; + FCloseSocket : TCloseSocket; + FBind : TBind; + FAccept : TAccept; + +function WSocketGetProc(const ProcName : String) : Pointer; +function WSocket_WSAStartup(wVersionRequired: word; + var WSData: TWSAData): Integer; +function WSocket_WSACleanup : Integer; +procedure WSocket_WSASetLastError(iError: Integer); +function WSocket_WSAGetLastError: Integer; +function WSocket_WSACancelAsyncRequest(hAsyncTaskHandle: THandle): Integer; +function WSocket_WSAAsyncGetHostByName(HWindow: HWND; wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; +function WSocket_WSAAsyncGetHostByAddr(HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; +function WSocket_WSAAsyncSelect(s: TSocket; HWindow: HWND; wMsg: u_int; lEvent: Longint): Integer; +function WSocket_recv(s: TSocket; + var Buf; len, flags: Integer): Integer; +function WSocket_recvfrom(s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; +function WSocket_getservbyname(name, proto: PChar): PServEnt; +function WSocket_getprotobyname(name: PChar): PProtoEnt; +function WSocket_gethostbyname(name: PChar): PHostEnt; +function WSocket_gethostbyaddr(addr: Pointer; len, Struct: Integer): PHostEnt; +function WSocket_gethostname(name: PChar; len: Integer): Integer; +function WSocket_socket(af, Struct, protocol: Integer): TSocket; +function WSocket_shutdown(s: TSocket; how: Integer): Integer; +function WSocket_setsockopt(s: TSocket; level, optname: Integer; optval: PChar; + optlen: Integer): Integer; +function WSocket_getsockopt(s: TSocket; level, optname: Integer; optval: PChar; + var optlen: Integer): Integer; +function WSocket_sendto(s: TSocket; var Buf; len, flags: Integer; + var addrto: TSockAddr; + tolen: Integer): Integer; +function WSocket_send(s: TSocket; var Buf; len, flags: Integer): Integer; +function WSocket_ntohs(netshort: u_short): u_short; +function WSocket_ntohl(netlong: u_long): u_long; +function WSocket_listen(s: TSocket; backlog: Integer): Integer; +function WSocket_ioctlsocket(s: TSocket; cmd: DWORD; var arg: u_long): Integer; +function WSocket_inet_ntoa(inaddr: TInAddr): PChar; +function WSocket_inet_addr(cp: PChar): u_long; +function WSocket_htons(hostshort: u_short): u_short; +function WSocket_htonl(hostlong: u_long): u_long; +function WSocket_getsockname(s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; +function WSocket_getpeername(s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; +function WSocket_connect(s: TSocket; var name: TSockAddr; + namelen: Integer): Integer; +function WSocket_closesocket(s: TSocket): Integer; +function WSocket_bind(s: TSocket; var addr: TSockAddr; namelen: Integer): Integer; +{$IFDEF VER80} +function WSocket_accept(s: TSocket; var addr: TSockAddr; var addrlen: Integer): TSocket; +{$ELSE} +{$IFDEF VER90} +function WSocket_accept(s: TSocket; var addr: TSockAddr; var addrlen: Integer): TSocket; +{$ELSE} +function WSocket_accept(s: TSocket; addr: PSockAddr; addrlen: PInteger): TSocket; +{$ENDIF} +{$ENDIF} +{$IFNDEF VER80} +function XSocketAllocateHWnd(Obj : TObject): HWND; +function XSocketDeallocateHWnd(Wnd: HWND): boolean; +{$ENDIF} +{ AllocateHWnd and DeallocateHWnd are functions from Forms unit. We just } +{ provide a warper here to avoid Delphi 6 warning everywhere. } +{$IFNDEF NOFORMS} +function AllocateHWnd(Method: TWndMethod): HWND; +procedure DeallocateHWnd(Wnd: HWND); +{$ENDIF} + +const + WSocketGCount : integer = 0; + WSocketGForced : boolean = FALSE; + +{$IFDEF VER80} +{ Delphi 1 doesn't like missing register procedure in a unit } +procedure Register; +{$ENDIF} +{$IFDEF VER93} +{ BCB 1 doesn't like missing register procedure in a unit } +procedure Register; +{$ENDIF} + +implementation + +const +{ WSocketGCount : integer = 0; } +{ DllStarted : Boolean = FALSE; 14/02/99} + FDllHandle : THandle = 0; +{ FDllName : String = winsocket; } + socksNoError = 20000; + socksProtocolError = 20001; + socksVersionError = 20002; + socksAuthMethodError = 20003; + socksGeneralFailure = 20004; + socksConnectionNotAllowed = 20005; + socksNetworkUnreachable = 20006; + socksHostUnreachable = 20007; + socksConnectionRefused = 20008; + socksTtlExpired = 20009; + socksUnknownCommand = 20010; + socksUnknownAddressType = 20011; + socksUnassignedError = 20012; + socksInternalError = 20013; + socksDataReceiveError = 20014; + socksAuthenticationFailed = 20015; + socksRejectedOrFailed = 20016; + socksHostResolutionFailed = 20017; + +{$IFDEF VER80} + IP_DEFAULT_MULTICAST_TTL = 1; + IP_MULTICAST_TTL = 3; + IP_ADD_MEMBERSHIP = 5; +type + in_addr = TInAddr; +{$ENDIF} +{$IFDEF VER90} +type + in_addr = TInAddr; +{$ENDIF} +{$IFDEF VER93} +type + in_addr = TInAddr; +{$ENDIF} +{$IFDEF VER100} +type + in_addr = TInAddr; +{$ENDIF} + +var + GInitData : TWSADATA; + IPList : TStrings; + +{const + Moulin : array [0..3] of Char = ('|', '/', '-', '\'); + MoulinCnt : Integer = 0; } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +{ Delphi 1 miss the SetLength procedure. So we rewrite it. } +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Delphi 1 doesn't like missing register procedure in a unit so we provide } +{ an empty procedure } +procedure Register; +begin +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER93} +{ BCB 1 doesn't like missing register procedure in a unit so we provide } +{ an empty procedure } +procedure Register; +begin +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] >= '0') and (Value[i] <= '9')do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function IsDigit(Ch : Char) : Boolean; +begin + Result := (ch >= '0') and (ch <= '9'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check for a valid numeric dotted IP address such as 192.161.65.25 } +{ Accept leading and trailing spaces. } +function WSocketIsDottedIP(const S : String) : Boolean; +var + I : Integer; + DotCount : Integer; + NumVal : Integer; +begin + Result := FALSE; + DotCount := 0; + NumVal := 0; + I := 1; + { Skip leading spaces } + while (S[I] = ' ') and (I <= Length(S)) do + Inc(I); + { Can't begin with a dot } + if (I <= Length(S)) and (S[I] = '.') then + Exit; + { Scan full string } + while I <= Length(S) do begin + if S[I] = '.' then begin + Inc(DotCount); + if (DotCount > 3) or (NumVal > 255) then + Exit; + NumVal := 0; + { A dot must be followed by a digit } + if (I >= Length(S)) or (not (S[I + 1] in ['0'..'9'])) then + Exit; + end + else if S[I] in ['0'..'9'] then + NumVal := NumVal * 10 + Ord(S[I]) - Ord('0') + else begin + { Not a digit nor a dot. Accept spaces until end of string } + while (S[I] = ' ') and (I <= Length(S)) do + Inc(I); + if I <= Length(S) then + Exit; { Not a space, do not accept } + break; { Only spaces, accept } + end; + Inc(I); + end; + { We must have exactly 3 dots } + if (DotCount <> 3) or (NumVal > 255) then + Exit; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] in [' ', #9]) do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.RaiseException(const Msg : String); +begin + if Assigned(FOnError) then + TriggerError + else + raise ESocketException.Create(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.RaiseExceptionFmt(const Fmt : String; args : array of const); +begin + if Assigned(FOnError) then + TriggerError + else + raise ESocketException.CreateFmt(Fmt, args); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} { 14/02/99 } +function LoadWinsock(FileName : PChar) : Boolean; +var + LastError : LongInt; +begin + if not DllStarted then begin + LastError := WSocket_WSAStartup($101, GInitData); + if LastError <> 0 then begin + raise ESocketException.CreateFmt('%s: WSAStartup error #%d', + [FileName, LastError]); + end; + DllStarted := TRUE; + end; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketLoadWinsock : Boolean; +begin + Result := LoadWinsock(winsocket); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Winsock is dynamically loaded and unloaded when needed. In some cases } +{ you may find winsock being loaded and unloaded very often in your app } +{ This happend for example when you dynamically create a TWSocket and } +{ destroy a TWSocket when there is no "permanant" TWSocket (that is a } +{ TWSocket dropped on a persitant form). It is the very inefficiant. } +{ Calling WSocketForceLoadWinsock will increament the reference count so } +{ that winsock will not be unloaded when the last TWSocket is destroyed. } +procedure WSocketForceLoadWinsock; +begin + if not WSocketGForced then begin + WSocketGForced := TRUE; + {$IFDEF VER80} + Inc(WSocketGCount); + {$ELSE} + InterlockedIncrement (WSocketGCount); + {$ENDIF} + WSocketGetProc(''); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Cancel the operation done with WSocketForceLoadWinsock. } +procedure WSocketCancelForceLoadWinsock; +begin + if WSocketGForced then begin + WSocketGForced := FALSE; + {$IFDEF VER80} + Dec(WSocketGCount); + {$ELSE} + InterlockedDecrement (WSocketGCount); + {$ENDIF} + if WSocketGCount <= 0 then + WSocketUnloadWinsock; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure WSocketUnloadWinsock; +begin +{$IFDEF NEVER} { 14/02/99 } + if DllStarted then begin + DllStarted := FALSE; + WSocket_WSACleanup; + end; +{$ENDIF} + if FDllHandle <> 0 then begin + WSocket_WSACleanup; + FreeLibrary(FDllHandle); + FDllHandle := 0; + FWSAStartup := nil; + FWSACleanup := nil; + FWSASetLastError := nil; + FWSAGetLastError := nil; + FWSACancelAsyncRequest := nil; + FWSAAsyncGetHostByName := nil; + FWSAAsyncGetHostByAddr := nil; + FWSAAsyncSelect := nil; + FGetServByName := nil; + FGetProtoByName := nil; + FGetHostByName := nil; + FGetHostByAddr := nil; + FGetHostName := nil; + FOpenSocket := nil; + FShutdown := nil; + FSetSockOpt := nil; + FGetSockOpt := nil; + FSendTo := nil; + FSend := nil; + FRecv := nil; + FRecvFrom := nil; + Fntohs := nil; + Fntohl := nil; + FListen := nil; + FIoctlSocket := nil; + FInet_ntoa := nil; + FInet_addr := nil; + Fhtons := nil; + Fhtonl := nil; + FGetSockName := nil; + FGetPeerName := nil; + FConnect := nil; + FCloseSocket := nil; + FBind := nil; + FAccept := nil; + end; + WSocketGCount := 0; + WSocketGForced := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketGetProc(const ProcName : String) : Pointer; +{$IFDEF VER80} +var + Error : THandle; + Buf : String; + LastError : LongInt; +begin + if FDllHandle = 0 then begin + { Delphi 1 strings are not nul terminated } + Buf := winsocket + #0; + FDllHandle := LoadLibrary(@Buf[1]); + if FDllHandle < HINSTANCE_ERROR then begin + Error := FDllHandle; + FDllHandle := 0; + raise ESocketException.Create('Unable to load ' + winsocket + + ' Error #' + IntToStr(Error)); + end; + LastError := WSocket_WSAStartup($101, GInitData); + if LastError <> 0 then begin + raise ESocketException.CreateFmt('%s: WSAStartup error #%d', + [winsocket, LastError]); + end; + end; + if Length(ProcName) = 0 then + Result := nil + else begin + { Delphi 1 strings are not nul terminated } + Buf := ProcName + #0; + Result := GetProcAddress(FDllHandle, @Buf[1]); + if Result = nil then + raise ESocketException.Create('Procedure ' + ProcName + + ' not found in ' + winsocket); + end; +end; +{$ELSE} +var + LastError : LongInt; +begin + if FDllHandle = 0 then begin + FDllHandle := LoadLibrary(@winsocket[1]); + if FDllHandle = 0 then + raise ESocketException.Create('Unable to load ' + winsocket + + ' Error #' + IntToStr(GetLastError)); + LastError := WSocket_WSAStartup($101, GInitData); + if LastError <> 0 then begin + raise ESocketException.CreateFmt('%s: WSAStartup error #%d', + [winsocket, LastError]); + end; + end; + if Length(ProcName) = 0 then + Result := nil + else begin + Result := GetProcAddress(FDllHandle, @ProcName[1]); + if Result = nil then + raise ESocketException.Create('Procedure ' + ProcName + + ' not found in ' + winsocket + + ' Error #' + IntToStr(GetLastError)); + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAStartup( + wVersionRequired: word; + var WSData: TWSAData): Integer; +begin + if @FWSAStartup = nil then + @FWSAStartup := WSocketGetProc('WSAStartup'); + Result := FWSAStartup(wVersionRequired, WSData); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSACleanup : Integer; +begin + if @FWSACleanup = nil then + @FWSACleanup := WSocketGetProc('WSACleanup'); + Result := FWSACleanup; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure WSocket_WSASetLastError(iError: Integer); +begin + if @FWSASetLastError = nil then + @FWSASetLastError := WSocketGetProc('WSASetLastError'); + FWSASetLastError(iError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAGetLastError: Integer; +begin + if @FWSAGetLastError = nil then + @FWSAGetLastError := WSocketGetProc('WSAGetLastError'); + Result := FWSAGetLastError; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSACancelAsyncRequest(hAsyncTaskHandle: THandle): Integer; +begin + if @FWSACancelAsyncRequest = nil then + @FWSACancelAsyncRequest := WSocketGetProc('WSACancelAsyncRequest'); + Result := FWSACancelAsyncRequest(hAsyncTaskHandle); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAAsyncGetHostByName( + HWindow: HWND; wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; +begin + if @FWSAAsyncGetHostByName = nil then + @FWSAAsyncGetHostByName := WSocketGetProc('WSAAsyncGetHostByName'); + Result := FWSAAsyncGetHostByName(HWindow, wMsg, name, buf, buflen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAAsyncGetHostByAddr( + HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; +begin + if @FWSAAsyncGetHostByAddr = nil then + @FWSAAsyncGetHostByAddr := WSocketGetProc('WSAAsyncGetHostByAddr'); + Result := FWSAAsyncGetHostByAddr(HWindow, wMsg, addr, len, struct, buf, buflen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAAsyncSelect( + s: TSocket; + HWindow: HWND; + wMsg: u_int; + lEvent: Longint): Integer; +begin + if @FWSAAsyncSelect = nil then + @FWSAAsyncSelect := WSocketGetProc('WSAAsyncSelect'); + Result := FWSAAsyncSelect(s, HWindow, wMsg, lEvent); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getservbyname(name, proto: PChar): PServEnt; +begin + if @Fgetservbyname = nil then + @Fgetservbyname := WSocketGetProc('getservbyname'); + Result := Fgetservbyname(name, proto); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getprotobyname(name: PChar): PProtoEnt; +begin + if @Fgetprotobyname = nil then + @Fgetprotobyname := WSocketGetProc('getprotobyname'); + Result := Fgetprotobyname(name); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_gethostbyname(name: PChar): PHostEnt; +begin + if @Fgethostbyname = nil then + @Fgethostbyname := WSocketGetProc('gethostbyname'); + Result := Fgethostbyname(name); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_gethostbyaddr(addr: Pointer; len, Struct: Integer): PHostEnt; +begin + if @Fgethostbyaddr = nil then + @Fgethostbyaddr := WSocketGetProc('gethostbyaddr'); + Result := Fgethostbyaddr(addr, len, Struct); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_gethostname(name: PChar; len: Integer): Integer; +begin + if @Fgethostname = nil then + @Fgethostname := WSocketGetProc('gethostname'); + Result := Fgethostname(name, len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_socket(af, Struct, protocol: Integer): TSocket; +begin + if @FOpenSocket= nil then + @FOpenSocket := WSocketGetProc('socket'); + Result := FOpenSocket(af, Struct, protocol); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_shutdown(s: TSocket; how: Integer): Integer; +begin + if @FShutdown = nil then + @FShutdown := WSocketGetProc('shutdown'); + Result := FShutdown(s, how); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_setsockopt(s: TSocket; level, optname: Integer; optval: PChar; + optlen: Integer): Integer; +begin + if @FSetSockOpt = nil then + @FSetSockOpt := WSocketGetProc('setsockopt'); + Result := FSetSockOpt(s, level, optname, optval, optlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getsockopt( + s: TSocket; level, optname: Integer; + optval: PChar; var optlen: Integer): Integer; +begin + if @FGetSockOpt = nil then + @FGetSockOpt := WSocketGetProc('getsockopt'); + Result := FGetSockOpt(s, level, optname, optval, optlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_sendto( + s : TSocket; + var Buf; + len, flags : Integer; + var addrto : TSockAddr; + tolen : Integer): Integer; +begin + if @FSendTo = nil then + @FSendTo := WSocketGetProc('sendto'); + Result := FSendTo(s, Buf, len, flags, addrto, tolen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_send(s: TSocket; var Buf; len, flags: Integer): Integer; +begin + if @FSend = nil then + @FSend := WSocketGetProc('send'); + Result := FSend(s, Buf, len, flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_ntohs(netshort: u_short): u_short; +begin + if @Fntohs = nil then + @Fntohs := WSocketGetProc('ntohs'); + Result := Fntohs(netshort); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_ntohl(netlong: u_long): u_long; +begin + if @Fntohl = nil then + @Fntohl := WSocketGetProc('ntohl'); + Result := Fntohl(netlong); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_listen(s: TSocket; backlog: Integer): Integer; +begin + if @FListen = nil then + @FListen := WSocketGetProc('listen'); + Result := FListen(s, backlog); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_ioctlsocket(s: TSocket; cmd: DWORD; var arg: u_long): Integer; +begin + if @FIoctlSocket = nil then + @FIoctlSocket := WSocketGetProc('ioctlsocket'); + Result := FIoctlSocket(s, cmd, arg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_inet_ntoa(inaddr: TInAddr): PChar; +begin + if @FInet_ntoa = nil then + @FInet_ntoa := WSocketGetProc('inet_ntoa'); + Result := FInet_ntoa(inaddr); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_inet_addr(cp: PChar): u_long; +begin + if @FInet_addr = nil then + @FInet_addr := WSocketGetProc('inet_addr'); + Result := FInet_addr(cp); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_htons(hostshort: u_short): u_short; +begin + if @Fhtons = nil then + @Fhtons := WSocketGetProc('htons'); + Result := Fhtons(hostshort); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_htonl(hostlong: u_long): u_long; +begin + if @Fhtonl = nil then + @Fhtonl := WSocketGetProc('htonl'); + Result := Fhtonl(hostlong); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getsockname( + s : TSocket; + var name : TSockAddr; + var namelen : Integer): Integer; +begin + if @FGetSockName = nil then + @FGetSockName := WSocketGetProc('getsockname'); + Result := FGetSockName(s, name, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getpeername( + s : TSocket; + var name : TSockAddr; + var namelen : Integer): Integer; +begin + if @FGetPeerName = nil then + @FGetPeerName := WSocketGetProc('getpeername'); + Result := FGetPeerName(s, name, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_connect( + s : TSocket; + var name : TSockAddr; + namelen : Integer): Integer; +begin + if @FConnect= nil then + @FConnect := WSocketGetProc('connect'); + Result := FConnect(s, name, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_closesocket(s: TSocket): Integer; +begin + if @FCloseSocket = nil then + @FCloseSocket := WSocketGetProc('closesocket'); + Result := FCloseSocket(s); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_bind( + s: TSocket; + var addr: TSockAddr; + namelen: Integer): Integer; +begin + if @FBind = nil then + @FBind := WSocketGetProc('bind'); + Result := FBind(s, addr, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_accept( + s: TSocket; +{$IFDEF VER80} { Delphi 1 } + var addr: TSockAddr; + var addrlen: Integer): TSocket; +{$ELSE} +{$IFDEF VER90} { Delphi 2 } + var addr: TSockAddr; + var addrlen: Integer): TSocket; +{$ELSE}{ Delphi 3/4/5, Bcb 1/3/4 } + addr: PSockAddr; + addrlen: PInteger): TSocket; +{$ENDIF} +{$ENDIF} +begin + if @FAccept = nil then + @FAccept := WSocketGetProc('accept'); + Result := FAccept(s, addr, addrlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_recv(s: TSocket; var Buf; len, flags: Integer): Integer; +begin + if @FRecv= nil then + @FRecv := WSocketGetProc('recv'); + Result := FRecv(s, Buf, len, flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_recvfrom( + s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; +begin + if @FRecvFrom = nil then + @FRecvFrom := WSocketGetProc('recvfrom'); + Result := FRecvFrom(s, Buf, len, flags, from, fromlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WinsockInfo : TWSADATA; +begin +{ LoadWinsock(winsocket); 14/02/99 } + { Load winsock and initialize it as needed } + WSocketGetProc(''); + Result := GInitData; + + { If no socket created, then unload winsock immediately } + if WSocketGCount <= 0 then + WSocketUnloadWinsock; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Notification(AComponent: TComponent; operation: TOperation); +begin + inherited Notification(AComponent, operation); + if operation = opRemove then begin + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.AssignDefaultValue; +begin + FillChar(sin, 0, Sizeof(sin)); + sin.sin_family := AF_INET; + FAddrFormat := PF_INET; + + FPortAssigned := FALSE; + FAddrAssigned := FALSE; + FAddrResolved := FALSE; + FPortResolved := FALSE; + FProtoResolved := FALSE; + FLocalPortResolved := FALSE; + + FProtoAssigned := TRUE; + FProto := IPPROTO_TCP; + FProtoStr := 'tcp'; + FType := SOCK_STREAM; + FLocalPortStr := '0'; + FLocalAddr := '0.0.0.0'; + + FLingerOnOff := wsLingerOn; + FLingerTimeout := 0; + FHSocket := INVALID_SOCKET; + FSelectEvent := 0; + FState := wsClosed; + bAllSent := TRUE; + FPaused := FALSE; + FReadCount := 0; + FCloseInvoked := FALSE; + FFlushTimeout := 60; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All exceptions *MUST* be handled. If an exception is not handled, the } +{ application will be shut down ! } +procedure TCustomWSocket.HandleBackGroundException(E: Exception); +var + CanAbort : Boolean; +begin + CanAbort := TRUE; + { First call the error event handler, if any } + if Assigned(FOnBgException) then begin + try + FOnBgException(Self, E, CanAbort); + except + end; + end; + { Then abort the socket } + if CanAbort then begin + try + Abort; + except + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure handle all messages for TWSocket. All exceptions must be } +{ handled or the application will be shutted down ! } +{ If WndProc is overriden in descendent components, then the same exception } +{ handling *MUST* be setup because descendent component code is executed } +{ before the base class code. } +procedure TCustomWSocket.WndProc(var MsgRec: TMessage); +begin + try + with MsgRec do begin + if Msg = WM_ASYNCSELECT then + WMASyncSelect(MsgRec) + else if Msg = WM_ASYNCGETHOSTBYNAME then + WMAsyncGetHostByName(MsgRec) + else if Msg = WM_ASYNCGETHOSTBYADDR then + WMAsyncGetHostByAddr(MsgRec) + else if Msg = WM_CLOSE_DELAYED then + WMCloseDelayed(MsgRec) + else if Msg = WM_WSOCKET_RELEASE then + WMRelease(MsgRec) + else if Msg = WM_TRIGGER_EXCEPTION then + { This is useful to check for background exceptions } + { In your application, use following code to test your handler } + { PostMessage(WSocket1.Handle, WM_TRIGGER_EXCEPTION, 0, 0); } + raise ESocketException.Create('Test exception in WSocket') + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + except + on E:Exception do + HandleBackGroundException(E); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF VER80} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function XSocketWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TObject; + MsgRec : TMessage; +begin + { At window creation asked windows to store a pointer to our object } + Obj := TObject(GetWindowLong(ahWnd, 0)); + + { If the pointer doesn't represent a TWSocket, just call the default procedure} + if not (Obj is TCustomWSocket) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass parameter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + { May be a try/except around next line is needed. Not sure ! } + TWSocket(Obj).WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.MessagePump; +begin +{$IFDEF NOFORMS} + { The Forms unit (TApplication object) has not been included. } + { We used either an external message pump or our internal message pump. } + { External message pump has to set Terminated property to TRUE when the } + { application is terminated. } + if Assigned(FOnMessagePump) then + FOnMessagePump(Self) + else + Self.ProcessMessages; +{$ELSE} +{$IFNDEF VER80} + { Delphi 1 doesn't support multithreading } + if FMultiThreaded then + Self.ProcessMessages + else +{$ENDIF} + Application.ProcessMessages; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This function is very similar to TApplication.ProcessMessage } +{ You can also use it if your application has no TApplication object (Forms } +{ unit not referenced at all). } +{$IFNDEF VER80} +function TCustomWSocket.ProcessMessage : Boolean; +var + Msg : TMsg; +begin + Result := FALSE; + if PeekMessage(Msg, 0, 0, 0, PM_REMOVE) then begin + Result := TRUE; + if Msg.Message = WM_QUIT then + FTerminated := TRUE + else begin + TranslateMessage(Msg); + DispatchMessage(Msg); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Loop thru message processing until all messages are processed. } +{ This function is very similar to TApplication.ProcessMessage } +{ This is intended for multithreaded application using TWSocket. } +{ You can also use it if your application has no TApplication object (Forms } +{ unit not referenced at all). } +procedure TCustomWSocket.ProcessMessages; +begin + while Self.ProcessMessage do { loop }; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Loop thru message processing until the WM_QUIT message is received } +{ This is intended for multithreaded application using TWSocket. } +{ MessageLoop is different from ProcessMessages because it actually block } +{ if no message is available. The loop is broken when WM_QUIT is retrieved. } +procedure TCustomWSocket.MessageLoop; +var + MsgRec : TMsg; +begin + { If GetMessage retrieves the WM_QUIT, the return value is FALSE and } + { the message loop is broken. } + while GetMessage(MsgRec, 0, 0, 0) do begin + TranslateMessage(MsgRec); + DispatchMessage(MsgRec) + end; + FTerminated := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This global variable is used to store the windows class characteristic } +{ and is needed to register the window class used by TWSocket } +var + XSocketWindowClass: TWndClass = ( + style : 0; + lpfnWndProc : @XSocketWindowProc; + cbClsExtra : 0; + cbWndExtra : SizeOf(Pointer); + hInstance : 0; + hIcon : 0; + hCursor : 0; + hbrBackground : 0; + lpszMenuName : nil; + lpszClassName : 'XSocketWindowClass'); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Unregister the window class use by the component. This is necessary to do } +{ so from a DLL when the DLL is unloaded (that is when DllEntryPoint is } +{ called with dwReason equal to DLL_PROCESS_DETACH. } +procedure WSocketUnregisterClass; +begin + Winprocs.UnregisterClass(XSocketWindowClass.lpszClassName, HInstance); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Allocate a window handle. This means registering a window class the first } +{ time we are called, and creating a new window each time we are called. } +function XSocketAllocateHWnd(Obj : TObject): HWND; +var + TempClass : TWndClass; + ClassRegistered : Boolean; +begin + { Check if the window class is already registered } + XSocketWindowClass.hInstance := HInstance; + ClassRegistered := GetClassInfo(HInstance, + XSocketWindowClass.lpszClassName, + TempClass); + if not ClassRegistered then begin + { Not yet registered, do it right now } + Result := WinProcs.RegisterClass(XSocketWindowClass); + if Result = 0 then + Exit; + end; + + { Now create a new window } + Result := CreateWindowEx(WS_EX_TOOLWINDOW, + XSocketWindowClass.lpszClassName, + '', { Window name } + WS_POPUP, { Window Style } + 0, 0, { X, Y } + 0, 0, { Width, Height } + 0, { hWndParent } + 0, { hMenu } + HInstance, { hInstance } + nil); { CreateParam } + + { if successfull, the ask windows to store the object reference } + { into the reserved byte (see RegisterClass) } + if (Result <> 0) and Assigned(Obj) then + SetWindowLong(Result, 0, Integer(Obj)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Free the window handle } +function XSocketDeallocateHWnd(Wnd: HWND): boolean; +begin + Result := DestroyWindow(Wnd); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.AllocateSocketHWnd; +begin +{$IFDEF VER80} + { Delphi 16 bits has no thread, we can use the VCL } + FWindowHandle := AllocateHWnd(WndProc); +{$ELSE} + { Delphi 32 bits has threads and VCL is not thread safe. } + { We need to do our own way to be thread safe. } + FWindowHandle := XSocketAllocateHWnd(Self); + FThreadId := GetCurrentThreadId; +{$ENDIF} + if FWindowHandle = 0 then + RaiseException('Cannot create a hidden window for TWSocket'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.DeallocateSocketHWnd; +begin +{$IFDEF VER80} + DeallocateHWnd(FWindowHandle); +{$ELSE} + { Wilfried added check for existing window } + if FWindowHandle = 0 then + Exit; + + { Remove the object reference from the window } + SetWindowLong(FWindowHandle, 0, 0); + { Wilfried } + { if Destructor call's here and it is wrong thread it will not harm } + { so no need to check Thread Id here, it is done in the ThreadDetach } + { method XSocketDeallocateHWnd(FWindowHandle); } + if XSocketDeallocateHWnd(FWindowHandle) then + FWindowHandle := 0; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF VER80} +procedure TCustomWSocket.ThreadAttach; +begin + if FWindowHandle <> 0 then + RaiseException('Cannot attach when not detached'); + + AllocateSocketHwnd; + if FHSocket <> INVALID_SOCKET then + WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, FSelectEvent); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.ThreadDetach; +begin + if GetCurrentThreadID <> FThreadID then + RaiseException('Cannot detach from other thread'); + + if FHSocket <> INVALID_SOCKET then + WSocket_WSAASyncSelect(FHSocket, Handle, 0, 0); + DeallocateSocketHWnd; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF NOFORMS} +function AllocateHWnd(Method: TWndMethod): HWND; +begin + Result := Forms.AllocateHWnd(Method); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DeallocateHWnd(Wnd: HWND); +begin + Forms.DeallocateHWnd(Wnd); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomWSocket.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + AllocateSocketHWnd; + FBufList := TList.Create; + FBufSize := 1460; {1514;} { Default buffer size } + FDnsResultList := TStringList.Create; + FMultiCastIpTTL := IP_DEFAULT_MULTICAST_TTL; + + AssignDefaultValue; + {$IFDEF VER80} + Inc(WSocketGCount); + {$ELSE} + InterlockedIncrement (WSocketGCount); + {$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomWSocket.Destroy; +begin + try + CancelDnsLookup; { Cancel any pending dns lookup } + except + { Ignore any exception here } + end; + + if FState <> wsClosed then { Close the socket if not yet closed } + Close; + + {$IFDEF VER80} + Dec(WSocketGCount); + {$ELSE} + InterlockedDecrement (WSocketGCount); + {$ENDIF} + if WSocketGCount <= 0 then begin + WSocketUnloadWinsock; + WSocketGCount := 0; + end; + + DeleteBufferedData; + if Assigned(FBufList) then begin + FBufList.Free; + FBufList := nil; + end; + if Assigned(FDnsResultList) then begin + FDnsResultList.Free; + FDnsResultList := nil; + end; + + DeallocateSocketHWnd; + +{$IFNDEF VER80} + if WSocketGCount <= 0 then + WSocketUnregisterClass; +{$ENDIF} + + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Dup(NewHSocket : TSocket); +var + iStatus : Integer; +begin + if (NewHSocket = 0) or (NewHSocket = INVALID_SOCKET) then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('Dup'); + Exit; + end; + + if FState <> wsClosed then begin + iStatus := WSocket_closesocket(FHSocket); + FHSocket := INVALID_SOCKET; + if iStatus <> 0 then begin + SocketError('Dup (closesocket)'); + Exit; + end; + + ChangeState(wsClosed); + end; + FHsocket := NewHSocket; + SetLingerOption; + + FSelectEvent := FD_READ or FD_WRITE or FD_CLOSE or FD_CONNECT; + iStatus := WSocket_WSAASyncSelect(FHSocket, Handle, + WM_ASYNCSELECT, FSelectEvent); + if iStatus <> 0 then begin + SocketError('WSAAsyncSelect'); + Exit; + end; + + ChangeState(wsConnected); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Get the number of char received and waiting to be read } +function TCustomWSocket.GetRcvdCount : LongInt; +begin + if csDesigning in ComponentState then begin + Result := -1; + Exit; + end; + if WSocket_ioctlsocket(FHSocket, FIONREAD, Result) = SOCKET_ERROR then begin + Result := -1; + SocketError('ioctlSocket'); + Exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.ChangeState(NewState : TSocketState); +var + OldState : TSocketState; +begin + OldState := FState; + FState := NewState; + + TriggerChangeState(OldState, NewState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ DoRecv is a simple wrapper around winsock recv function to make it } +{ a virtual function. } +function TCustomWSocket.DoRecv( + var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; +begin +{ MoulinCnt := (MoulinCnt + 1) and 3; } +{ Write('R', Moulin[MoulinCnt], #13); } + Result := WSocket_recv(FHSocket, Buffer, BufferSize, Flags); +{ FRcvdFlag := (Result > 0);} + { If we received the requested size, we may need to receive more } + FRcvdFlag := (Result >= BufferSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The socket is non-blocking, so this routine will only receive as much } +{ data as it is available. } +function TCustomWSocket.Receive(Buffer : Pointer; BufferSize: integer) : integer; +begin + Result := DoRecv(Buffer^, BufferSize, 0); + if Result < 0 then + FLastError := WSocket_WSAGetLastError + else + { Here we should check for overflows ! It is well possible to } + { receive more than 2GB during a single session. } + { Or we could use an Int64 variable... } + FReadCount := FReadCount + Result; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Receive as much data as possible into a string } +{ You should avoid this function and use Receive. Using string will be } +{ much slower because data will be copied several times. } +{ ReceiveStr will *NOT* wait for a line to be received. It just read } +{ already received characters and return them as a string. } +function TCustomWSocket.ReceiveStr : string; +var + lCount : LongInt; +begin + lCount := GetRcvdCount; + + if LCount < 0 then begin { GetRcvdCount returned an error } + SetLength(Result, 0); + Exit; + end; + + if lCount = 0 then { GetRcvdCount say nothing, will try anyway } + LCount := 255; { some reasonable arbitrary value } + +{$IFDEF VER80} + { Delphi 1 strings are limited } + if lCount > High(Result) then + lCount := High(Result); +{$ENDIF} + + SetLength(Result, lCount); + lCount := Receive(@Result[1], lCount); + if lCount > 0 then + SetLength(Result, lCount) + else + SetLength(Result, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.DoRecvFrom( + FHSocket : TSocket; + var Buffer; + BufferSize : Integer; + Flags : Integer; + var From : TSockAddr; + var FromLen : Integer) : Integer; +begin + Result := WSocket_recvfrom(FHSocket, Buffer, BufferSize, + Flags, From, FromLen); +{ FRcvdFlag := (Result > 0); } + FRcvdFlag := (Result >= BufferSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.ReceiveFrom( + Buffer : Pointer; + BufferSize : Integer; + var From : TSockAddr; + var FromLen : Integer) : integer; +begin + Result := DoRecvFrom(FHSocket, Buffer^, BufferSize, 0, From, FromLen); + if Result < 0 then + FLastError := WSocket_WSAGetLastError + else + FReadCount := FReadCount + Result; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.PeekData(Buffer : Pointer; BufferSize: integer) : integer; +begin + Result := DoRecv(Buffer^, BufferSize, MSG_PEEK); + if Result < 0 then + FLastError := WSocket_WSAGetLastError; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ +function SearchChar(Data : PChar; Len : Integer; Ch : Char) : PChar; +begin + while Len > 0 do begin + Len := Len - 1; + if Data^ = Ch then begin + Result := Data; + exit; + end; + Data := Data + 1; + end; + Result := nil; +end; +} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.SendTo( + Dest : TSockAddr; + DestLen : Integer; + Data : Pointer; + Len : Integer) : integer; +begin + Result := WSocket_SendTo(FHSocket, Data^, Len, FSendFlags, + TSockAddr(Dest), DestLen); + if Result > 0 then + TriggerSendData(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.RealSend(Data : Pointer; Len : Integer) : Integer; +begin +{ MoulinCnt := (MoulinCnt + 1) and 3; } +{ Write('S', Moulin[MoulinCnt], #13); } + if FType = SOCK_DGRAM then + Result := WSocket_SendTo(FHSocket, Data^, Len, FSendFlags, + TSockAddr(sin), SizeOf(sin)) + else + Result := WSocket_Send(FHSocket, Data^, Len, FSendFlags); + if Result > 0 then + TriggerSendData(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TryToSend; +var + oBuffer : TBuffer; + Len : Integer; + Count : Integer; + Data : Pointer; + LastError : Integer; + { p : PChar;23/12/01} + bMore : Boolean; +begin + if (FHSocket = INVALID_SOCKET) or { No more socket } + (FBufList.Count = 0) { Nothing to send } + {or (bMoreFlag and (nMoreCnt >= nMoreMax))23/12/01} { Waiting more signal } + then + exit; + + bMore := TRUE; + while bMore do begin + oBuffer := FBufList.First; + Data := oBuffer.Peek(Len); + if Len <= 0 then begin + { Buffer is empty } + if FBufList.Count <= 1 then begin + { Every thing has been sent } + bAllSent := TRUE; + bMore := FALSE; + end + else begin + oBuffer.Free; + FBufList.Delete(0); + FBufList.Pack; + end; + end + else begin +{ if bMoreFlag then begin + p := SearchChar(Data, Len, #10); + if Assigned(p) then begin + len := p - PChar(Data) + 1; + nMoreCnt := nMoreCnt + 1; + if nMoreCnt >= nMoreMax then + bMore := FALSE; + end; + end; +23/12/01} + Count := RealSend(Data, Len); + + if Count = 0 then + bMore := FALSE { Closed by remote } + else if count = SOCKET_ERROR then begin + LastError := WSocket_WSAGetLastError; + if (LastError = WSAECONNRESET) or (LastError = WSAENOTSOCK) or + (LastError = WSAENOTCONN) or (LastError = WSAEINVAL) or + (LastError = WSAECONNABORTED) { 07/05/99 } + then begin + FCloseInvoked := TRUE; { 23/07/98 } + Close; + TriggerSessionClosed(LastError); { 23/07/98 } + end + else if LastError <> WSAEWOULDBLOCK then begin + SocketError('TryToSend failed'); + Exit; + end; + bMore := FALSE; + end + else begin + oBuffer.Remove(Count); + if Count < Len then begin + { Could not write as much as we wanted. Stop sending } +{$IFDEF VER80} + { A bug in some Trumpet Winsock implementation break the } + { background sending. Jan Tomasek } + if not TrumpetCompability then begin + {bWrite := FALSE;23/12/01} + bMore := FALSE; + end; +{$ELSE} + {bWrite := FALSE;23/12/01} + bMore := FALSE; +{$ENDIF} + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.PutStringInSendBuffer(Str : String); +begin + PutDataInSendBuffer(@Str[1], Length(Str)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.PutDataInSendBuffer(Data : Pointer; Len : Integer); +var + oBuffer : TBuffer; + cWritten : Integer; + bMore : Boolean; +begin + if Len <= 0 then + exit; + + if FBufList.Count = 0 then begin + oBuffer := TBuffer.Create(FBufSize); + FBufList.Add(oBuffer); + end + else + oBuffer := FBufList.Last; + + bMore := TRUE; + while bMore do begin + cWritten := oBuffer.Write(Data, Len); + if cWritten >= Len then + bMore := FALSE + else begin + Len := Len - cWritten; + Data := PChar(Data) + cWritten; + if Len < 0 then + bMore := FALSE + else begin + oBuffer := TBuffer.Create(FBufSize); + FBufList.Add(oBuffer); + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Return -1 if error, else return number of byte written } +function TCustomWSocket.Send(Data : Pointer; Len : Integer) : integer; +begin + if FState <> wsConnected then begin + WSocket_WSASetLastError(WSAENOTCONN); + SocketError('Send'); + Result := -1; + Exit; + end; + + bAllSent := FALSE; + if Len <= 0 then + Result := 0 + else begin + Result := Len; + PutDataInSendBuffer(Data, Len); + end; + + if bAllSent then + Exit; + + TryToSend; + + if bAllSent then begin + { We post a message to fire the FD_WRITE message wich in turn will } + { fire the OnDataSent event. We cannot fire the event ourself } + { because the event handler will eventually call send again. } + { Sending the message prevent recursive call and stack overflow. } + { The PostMessage function posts (places) a message in a window's } + { message queue and then returns without waiting for the } + { corresponding window to process the message. The message will be } + { seen and routed by Delphi a litle later, when we will be out of } + { the send function. } + PostMessage(Handle, + WM_ASYNCSELECT, + FHSocket, + MakeLong(FD_WRITE, 0)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Return -1 if error, else return number of byte written } +function TCustomWSocket.SendStr(Str : String) : integer; +begin + if Length(Str) > 0 then + Result := Send(@Str[1], Length(Str)) + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SendText(Str : String); +begin + SendStr(Str); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.ASyncReceive( + Error : Word; + MySocketOptions : TWSocketOptions); +var + bMore : Boolean; + lCount : LongInt; + TrashCan : array [0..1023] of char; +begin + bMore := TRUE; + while bMore do begin + FLastError := 0; + + try + if not TriggerDataAvailable(Error) then begin + { Nothing wants to receive, we will receive and throw away 23/07/98 } + if DoRecv(TrashCan, SizeOf(TrashCan), 0) = SOCKET_ERROR then begin + FLastError := WSocket_WSAGetLastError; + if FLastError = WSAEWOULDBLOCK then begin + FLastError := 0; + break; + end; + end; + end; + + { DLR Honor the socket options being passed as parameters } + if wsoNoReceiveLoop in MySocketOptions then + break; + + if FLastError <> 0 then + bMore := FALSE + {* Check if we have something new arrived, if yes, process it *} + else if WSocket_ioctlsocket(FHSocket, FIONREAD, + lCount) = SOCKET_ERROR then begin + FLastError := WSocket_WSAGetLastError; + bMore := FALSE; + end + else if lCount = 0 then + bMore := FALSE; + except + bMore := FALSE; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMASyncSelect(var msg: TMessage); +var + Check : Word; +begin +{TriggerDisplay('AsyncSelect ' + IntToStr(msg.wParam) + ', ' + IntToStr(msg.lParamLo));} + { Verify that the socket handle is ours handle } + + if msg.wParam <> FHSocket then + Exit; + + if FPaused then + exit; + +{$IFDEF NO_W2K_FIX} + Check := msg.lParamLo and FD_CONNECT; + if Check <> 0 then begin + ChangeState(wsConnected); + TriggerSessionConnected(msg.lParamHi); + if (msg.lParamHi <> 0) and (FState <> wsClosed) then + Close; + end; + + Check := msg.lParamLo and FD_READ; + if Check <> 0 then begin + ASyncReceive(msg.lParamHi, FComponentOptions); + end; +{$ELSE} +Check := msg.lParamLo and FD_CONNECT; + if Check <> 0 then begin + if FState <> wsConnected then begin + ChangeState(wsConnected); + TriggerSessionConnected(msg.lParamHi); + if (msg.lParamHi <> 0) and (FState <> wsClosed) then + Close; + end; + end; + + Check := msg.lParamLo and FD_READ; + if Check <> 0 then begin + if FState <> wsConnected then begin + ChangeState(wsConnected); + TriggerSessionConnected(msg.lParamHi); + end; + ASyncReceive(msg.lParamHi, FComponentOptions); + end; +{$ENDIF} + + Check := msg.lParamLo and FD_WRITE; + if Check <> 0 then begin + TryToSend; +{ If you wants to test background exception, uncomment the next 2 lines. } +{ if bAllSent then } +{ raise Exception.Create('Test TWSocket exception'); } + if bAllSent then + TriggerDataSent(msg.lParamHi); + end; + + Check := msg.lParamLo and FD_ACCEPT; + if Check <> 0 then begin + TriggerSessionAvailable(msg.lParamHi); + end; + + Check := msg.lParamLo and FD_CLOSE; + if Check <> 0 then begin + { In some strange situations I found that we receive a FD_CLOSE } + { during the connection phase, breaking the connection early ! } + { This occurs for example after a failed FTP transfert } + if FState <> wsConnecting then begin + { Check if we have something arrived, if yes, process it } + { DLR, since we are closing MAKE SURE WE LOOP in the recieve } + { function to get ALL remainging data } + ASyncReceive(0, FComponentOptions - [wsoNoReceiveLoop]); + + if not FCloseInvoked then begin + FCloseInvoked := TRUE; + TriggerSessionClosed(msg.lParamHi); + end; + + if FState <> wsClosed then + Close; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure GetIPList(phe : PHostEnt; ToList : TStrings); +type + TaPInAddr = array [0..255] of PInAddr; + PaPInAddr = ^TaPInAddr; +var + pptr : PaPInAddr; + I : Integer; +begin + pptr := PaPInAddr(Phe^.h_addr_list); + + I := 0; + while pptr^[I] <> nil do begin + ToList.Add(StrPas(WSocket_inet_ntoa(pptr^[I]^))); + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMAsyncGetHostByName(var msg: TMessage); +var + Phe : Phostent; + Error : Word; +begin + if FDnsLookupHandle = 0 then begin + { We are still executing WSAAsyncGetHostByName and FDnsLookupHandle } + { has not been assigned yet ! We should proceed later. } + FDnsLookupTempMsg := msg; + FDnsLookupCheckMsg := TRUE; + Exit; + end + else if msg.wParam <> LongInt(FDnsLookupHandle) then + Exit; + + FDnsLookupHandle := 0; + Error := Msg.LParamHi; + if Error = 0 then begin + Phe := PHostent(@FDnsLookupBuffer); + if phe <> nil then begin + GetIpList(Phe, FDnsResultList); + FDnsResult := FDnsResultList.Strings[0]; + end; + end; + TriggerDnsLookupDone(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMAsyncGetHostByAddr(var msg: TMessage); +var + Phe : Phostent; + Error : Word; +begin + if msg.wParam <> LongInt(FDnsLookupHandle) then + Exit; + FDnsLookupHandle := 0; + Error := Msg.LParamHi; + if Error = 0 then begin + Phe := PHostent(@FDnsLookupBuffer); + if phe <> nil then begin + SetLength(FDnsResult, StrLen(Phe^.h_name)); + StrCopy(@FDnsResult[1], Phe^.h_name); + FDnsResultList.Clear; + FDnsResultList.Add(FDnsResult); + end; + end; + TriggerDnsLookupDone(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetProto(sProto : String); +begin + if FProtoAssigned and (sProto = FProtoStr) then + Exit; + + if FState <> wsClosed then begin + RaiseException('Cannot change Proto if not closed'); + Exit; + end; + + FProtoStr := Trim(sProto); + if Length(FProtoStr) = 0 then begin + FProtoAssigned := FALSE; + Exit; + end; + + FProtoResolved := FALSE; + FProtoAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetProto : String; +begin + Result := FProtoStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetRemotePort(sPort : String); +begin + if FPortAssigned and (FPortStr = sPort) then + Exit; + + if FState <> wsClosed then begin + RaiseException('Cannot change Port if not closed'); + Exit; + end; + + FPortStr := Trim(sPort); + if Length(FPortStr) = 0 then begin + FPortAssigned := FALSE; + Exit; + end; + + FPortResolved := FALSE; + FPortAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetRemotePort : String; +begin + Result := FPortStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetLocalPort(sLocalPort : String); +begin + if FState <> wsClosed then begin + RaiseException('Cannot change LocalPort if not closed'); + Exit; + end; + + FLocalPortStr := sLocalPort; + FLocalPortResolved := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetLocalAddr(sLocalAddr : String); +{var + IPAddr : TInAddr;} +begin + if FState <> wsClosed then begin + RaiseException('Cannot change LocalAddr if not closed'); + Exit; + end; + + if Length(sLocalAddr) = 0 then + sLocalAddr := '0.0.0.0'; +{$IFDEF NEVER} +{$IFDEF VER80} + sLocalAddr := sLocalAddr + #0; +{$ENDIF} + IPAddr.S_addr := WSocket_inet_addr(@sLocalAddr[1]); + if IPAddr.S_addr = u_long(INADDR_NONE) then + RaiseException('SetLocalAddr(): Invalid IP address'); + FLocalAddr := StrPas(WSocket_inet_ntoa(IPAddr)); +{$ELSE} + FLocalAddr := sLocalAddr; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetXPort: string; +var + saddr : TSockAddrIn; + saddrlen : integer; + port : integer; +begin + Result := 'error'; + if FState in [wsConnected, wsBound, wsListening] then begin + saddrlen := sizeof(saddr); + if WSocket_GetSockName(FHSocket, TSockAddr(saddr), saddrlen) = 0 then begin + port := WSocket_ntohs(saddr.sin_port); + Result := Format('%d',[port]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetXAddr: string; +var + saddr : TSockAddrIn; + saddrlen : integer; +begin + Result := 'error'; + if FState in [wsConnected, wsBound, wsListening] then begin + saddrlen := sizeof(saddr); + if WSocket_GetSockName(FHSocket, TSockAddr(saddr), saddrlen) = 0 then + Result := StrPas(WSocket_inet_ntoa(saddr.sin_addr)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetAddr(InAddr : String); +begin + if FAddrAssigned and (FAddrStr = InAddr) then + Exit; + + if FState <> wsClosed then begin + RaiseException('Cannot change Addr if not closed'); + Exit; + end; + + FAddrStr := Trim(InAddr); + if Length(FAddrStr) = 0 then begin + FAddrAssigned := FALSE; + Exit; + end; + + FAddrResolved := FALSE; + FAddrAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketResolveHost(InAddr : String) : TInAddr; +var + szData : array [0..256] of char; + Phe : Phostent; + IPAddr : u_long; +begin + if (Length(InAddr) = 0) or (Length(InAddr) >= SizeOf(szData)) then + raise ESocketException.Create('WSocketResolveHost: ''' + InAddr + ''' Invalid Hostname.'); + + StrPCopy(szData, Trim(InAddr)); { Length already checked above } + if WSocketIsDottedIP(InAddr) then begin + { Address is a dotted numeric address like 192.161.124.32 } + IPAddr := WSocket_inet_addr(szData); +{$IFDEF VER80} + { With Trumpet Winsock 2B and 30D (win 3.11), inet_addr returns faulty } + { results for 0.0.0.0 } + if (IPAddr = INADDR_NONE) and (StrComp(szData, '0.0.0.0') = 0) then begin + Result.s_addr := 0; + Exit; + end; +{$ENDIF} + if IPAddr = u_long(INADDR_NONE) then begin + if StrComp(szData, '255.255.255.255') = 0 then begin + Result.s_addr := u_long(INADDR_BROADCAST); + Exit; + end; + raise ESocketException.Create('WSocketResolveHost: ''' + InAddr + ''' Invalid IP address.'); + end; + Result.s_addr := IPAddr; + Exit; + end; + + { Address is a hostname } + Phe := WSocket_GetHostByName(szData); + if Phe = nil then + raise ESocketException.CreateFmt( + 'WSocketResolveHost: Cannot convert host address ''%s'', Error #%d', + [InAddr, WSocket_WSAGetLastError]); + Result.s_addr := PInAddr(Phe^.h_addr_list^)^.s_addr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Convert port name or number to number in host order (ftp -> 21) } +function WSocketResolvePort(Port : String; Proto : String) : Word; +var + szPort : array [0..31] of char; + szProto : array [0..31] of char; + Pse : Pservent; +begin + if (Length(Port) = 0) or (Length(Port) >= SizeOf(szPort)) then + raise ESocketException.Create('WSocketResolvePort: Invalid Port.'); + + if (Length(Proto) = 0) or (Length(Proto) >= SizeOf(szProto)) then + raise ESocketException.Create('WSocketResolvePort: Invalid Proto.'); + + if IsDigit(Port[1]) then + Result := atoi(Port) + else begin + StrPCopy(szPort, Trim(Port)); { Length already checked above } + StrPCopy(szProto, Trim(Proto)); { Length already checked above } +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + if szProto[0] = #0 then + Pse := WSocket_GetServByName(szPort, nil) + else + Pse := WSocket_GetServByName(szPort, szProto); + if Pse = nil then + raise ESocketException.CreateFmt( + 'WSocketResolvePort: Cannot convert port ''%s'', Error #%d', + [Port, WSocket_WSAGetLastError]); + Result := WSocket_ntohs(Pse^.s_port); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketResolveProto(sProto : String) : integer; +var + szProto : array [0..31] of char; + Ppe : Pprotoent; +begin + if (Length(sProto) = 0) or (Length(sProto) >= SizeOf(szProto)) then + raise ESocketException.Create('WSocketResolveProto: Invalid Protocol.'); + + sProto := Trim(sProto); + if IsDigit(sProto[1]) then + Result := atoi(sProto) + else begin + StrPCopy(szProto, sProto); { Length already checked above } +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + ppe := WSocket_getprotobyname(szProto); + if Ppe = nil then + raise ESocketException.CreateFmt( + 'WSocketResolveProto: Cannot convert protocol ''%s'', Error #%d', + [sProto, WSocket_WSAGetLastError]); + Result := ppe^.p_proto; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetAddr : String; +begin + Result := FAddrStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetSockName(var saddr : TSockAddrIn; var saddrlen : Integer) : integer; +begin + Result := WSocket_GetSockName(FHSocket, TSockAddr(saddr), saddrlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetPeerAddr: string; +var + saddr : TSockAddrIn; + saddrlen : integer; + szAddr : PChar; +begin + Result := 'error'; + if FState = wsConnected then begin + saddrlen := sizeof(saddr); + if WSocket_GetPeerName(FHSocket, TSockAddr(saddr), saddrlen) = 0 then begin + szAddr := WSocket_inet_ntoa(saddr.sin_addr); + Result := StrPas(szAddr); + end + else begin + SocketError('GetPeerName'); + Exit; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetPeerPort: string; +var + saddr : TSockAddrIn; + saddrlen : integer; +begin + Result := 'error'; + if FState = wsConnected then begin + saddrlen := sizeof(saddr); + if WSocket_GetPeerName(FHSocket, TSockAddr(saddr), saddrlen) = 0 then + Result := IntToStr(WSocket_ntohs(saddr.sin_port)) + else begin + SocketError('GetPeerPort'); + Exit; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetPeerName(var Name : TSockAddrIn; NameLen : Integer) : integer; +begin + if FState = wsConnected then + Result := WSocket_GetPeerName(FHSocket, TSockAddr(Name), NameLen) + else + Result := SOCKET_ERROR; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.CancelDnsLookup; +begin + if FDnsLookupHandle = 0 then + Exit; + if WSocket_WSACancelAsyncRequest(FDnsLookupHandle) <> 0 then begin + FDnsLookupHandle := 0; + SocketError('WSACancelAsyncRequest'); + Exit; + end; + FDnsLookupHandle := 0; + + if not (csDestroying in ComponentState) then + TriggerDnsLookupDone(WSAEINTR); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.DnsLookup(HostName : String); +var + IPAddr : TInAddr; +begin + if HostName = '' then begin + RaiseException('DNS lookup: invalid host name.'); + TriggerDnsLookupDone(WSAEINVAL); + Exit; + end; + + { Cancel any pending lookup } + if FDnsLookupHandle <> 0 then begin + WSocket_WSACancelAsyncRequest(FDnsLookupHandle); + FDnsLookupHandle := 0; + end; + + FDnsResult := ''; + FDnsResultList.Clear; + +{$IFDEF VER80} + { Delphi 1 do not automatically add a terminating nul char } + HostName := HostName + #0; +{$ENDIF} + if WSocketIsDottedIP(Hostname) then begin { 28/09/2002 } + IPAddr.S_addr := WSocket_inet_addr(@HostName[1]); + if IPAddr.S_addr <> u_long(INADDR_NONE) then begin + FDnsResultList.Add(FDnsResult); { 28/09/2002 } + FDnsResult := StrPas(WSocket_inet_ntoa(IPAddr)); + TriggerDnsLookupDone(0); + Exit; + end; + end; + + if FWindowHandle = 0 then + RaiseException('DnsLookup: Window not assigned'); + + { John Goodwin found a case where winsock dispatch WM_ASYNCGETHOSTBYNAME } + { message before returning from WSAAsyncGetHostByName call. Because of } + { that, FDnsLookupHandle is not yet assigned when execution comes in } + { WMAsyncGetHostByName. John use a flag to check this situation. } + FDnsLookupCheckMsg := FALSE; + FDnsLookupHandle := WSocket_WSAAsyncGetHostByName( + FWindowHandle, + WM_ASYNCGETHOSTBYNAME, + @HostName[1], + @FDnsLookupBuffer, + SizeOf(FDnsLookupBuffer)); + if FDnsLookupHandle = 0 then begin + RaiseExceptionFmt( + '%s: can''t start DNS lookup, error #%d', + [HostName, WSocket_WSAGetLastError]); + Exit; + end; + if FDnsLookupCheckMsg then begin + FDnsLookupCheckMsg := FALSE; + WMAsyncGetHostByName(FDnsLookupTempMsg); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.ReverseDnsLookup(HostAddr: String); +var + szAddr : array [0..256] of Char; + lAddr : u_long; +begin + if (Length(HostAddr) = 0) or (Length(HostAddr) >= SizeOf(szAddr)) then begin + RaiseException('ReverseDnsLookup: Invalid host name.'); + TriggerDnsLookupDone(WSAEINVAL); + Exit; + end; + { Cancel any pending lookup } + if FDnsLookupHandle <> 0 then + WSocket_WSACancelAsyncRequest(FDnsLookupHandle); + + FDnsResult := ''; + FDnsResultList.Clear; + + StrPCopy(szAddr, HostAddr); { Length already checked above } + lAddr := WSocket_inet_addr(szAddr); + + if FWindowHandle = 0 then + RaiseException('ReverseDnsLookup: Window not assigned'); + + FDnsLookupHandle := WSocket_WSAAsyncGetHostByAddr( + FWindowHandle, + WM_ASYNCGETHOSTBYADDR, + PChar(@lAddr), 4, PF_INET, + @FDnsLookupBuffer, + SizeOf(FDnsLookupBuffer)); + if FDnsLookupHandle = 0 then + RaiseExceptionFmt('%s: can''t start DNS lookup, error #%d', + [HostAddr, WSocket_WSAGetLastError]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.BindSocket; +var + SockName : TSockAddr; + SockNamelen : Integer; + LocalSockName : TSockAddrIn; +begin + FillChar(LocalSockName, Sizeof(LocalSockName), 0); + SockNamelen := sizeof(LocalSockName); + LocalSockName.sin_family := AF_INET; + LocalSockName.sin_port := WSocket_htons(FLocalPortNum); + LocalSockName.sin_addr.s_addr := WSocketResolveHost(FLocalAddr).s_addr; + + if WSocket_bind(HSocket, LocalSockName, SockNamelen) <> 0 then begin + RaiseExceptionFmt('winsock.bind failed, error #%d', [WSocket_WSAGetLastError]); + Exit; + end; + SockNamelen := sizeof(SockName); + if WSocket_getsockname(FHSocket, SockName, SockNamelen) <> 0 then begin + RaiseExceptionFmt('winsock.getsockname failed, error #%d', + [WSocket_WSAGetLastError]); + Exit; + end; + FLocalPortNum := WSocket_ntohs(SockName.sin_port); + FLocalPortStr := IntToStr(FLocalPortNum); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetLingerOption; +var + iStatus : integer; + li : TLinger; +begin + if FLingerOnOff = wsLingerNoSet then + Exit; { Option set is disabled, ignore } + + if FHSocket = INVALID_SOCKET then begin + RaiseException('Cannot set linger option at this time'); + Exit; + end; + + li.l_onoff := Ord(FLingerOnOff); { 0/1 = disable/enable linger } + li.l_linger := FLingerTimeout; { timeout in seconds } + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, + SO_LINGER, @li, SizeOf(li)); + + if iStatus <> 0 then begin + SocketError('setsockopt(SO_LINGER)'); + Exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Connect; +var + iStatus : integer; + optval : integer; + lAddr : TInAddr; +begin + if (FHSocket <> INVALID_SOCKET) and (FState <> wsClosed) then begin + RaiseException('Connect: Socket already in use'); + Exit; + end; + + if not FPortAssigned then begin + RaiseException('Connect: No Port Specified'); + Exit; + end; + + if not FAddrAssigned then begin + RaiseException('Connect: No IP Address Specified'); + Exit; + end; + + if not FProtoAssigned then begin + RaiseException('Connect: No Protocol Specified'); + Exit; + end; + + try + if not FProtoResolved then begin + { The next line will trigger an exception in case of failure } + FProto := WSocketResolveProto(FProtoStr); + case FProto of + IPPROTO_UDP: FType := SOCK_DGRAM; + IPPROTO_TCP: FType := SOCK_STREAM; + else + FType := SOCK_RAW; + end; + FProtoResolved := TRUE; + end; + + if not FPortResolved then begin + { The next line will trigger an exception in case of failure } + FPortNum := WSocketResolvePort(FPortStr, GetProto); + sin.sin_port := WSocket_htons(FPortNum); + FPortResolved := TRUE; + end; + + if not FLocalPortResolved then begin + { The next line will trigger an exception in case of failure } + FLocalPortNum := WSocketResolvePort(FLocalPortStr, GetProto); + FLocalPortResolved := TRUE; + end; + + if not FAddrResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_addr.s_addr := WSocketResolveHost(FAddrStr).s_addr; + FAddrResolved := TRUE; + end; + except + on E:Exception do begin + RaiseException('connect: ' + E.Message); + Exit; + end; + end; + + { Remove any data from the internal output buffer } + { (should already be empty !) } + DeleteBufferedData; + + FHSocket := WSocket_socket(FAddrFormat, FType, FProto); + if FHSocket = INVALID_SOCKET then begin + SocketError('Connect (socket)'); + Exit; + end; + ChangeState(wsOpened); + + if FState <> wsOpened then begin { 07/07/02 } + { Socket has been closed in the OnChangeState event ! } + WSocket_WSASetLastError(WSAEINVAL); + SocketError('Connect (Invalid operation in OnChangeState)'); + Exit; + end; + + if FType = SOCK_DGRAM then begin + BindSocket; + if FMultiCast then begin + if FMultiCastIpTTL <> IP_DEFAULT_MULTICAST_TTL then begin + optval := FMultiCastIpTTL; { set time-to-live for multicast } + iStatus := SetSockOpt(FHSocket, IPPROTO_IP, IP_MULTICAST_TTL, + @optval, SizeOf(optval)); + if iStatus <> 0 then begin + SocketError('setsockopt(IP_MULTICAST_TTL)'); + Exit; + end; + end; + if FLocalAddr <> '0.0.0.0' then begin { RK } + laddr.s_addr := WSocketResolveHost(FLocalAddr).s_addr; + iStatus := SetSockOpt(FHSocket, IPPROTO_IP, + IP_MULTICAST_IF, + PChar(@laddr), SizeOf(laddr)); + if iStatus <> 0 then begin + SocketError('setsockopt(IP_MULTICAST_IF)'); + Exit; + end; + end; { /RK } + end; + + if sin.sin_addr.S_addr = u_long(INADDR_BROADCAST) then begin + OptVal := 1; + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, SO_BROADCAST, + PChar(@OptVal), SizeOf(OptVal)); + if iStatus <> 0 then begin + SocketError('setsockopt(SO_BROADCAST)'); + Exit; + end; + end; + end + else begin + { Socket type is SOCK_STREAM } + optval := -1; + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, + SO_REUSEADDR, @optval, SizeOf(optval)); + + if iStatus <> 0 then begin + SocketError('setsockopt(SO_REUSEADDR)'); + Exit; + end; + + if wsoTcpNoDelay in FComponentOptions then begin + optval := -1; { true, 0=false } + iStatus := WSocket_setsockopt(FHsocket, IPPROTO_TCP, + TCP_NODELAY, @optval, SizeOf(optval)); + if iStatus <> 0 then begin + SocketError('setsockopt(IPPROTO_TCP, TCP_NODELAY)'); + Exit; + end; + end; + + SetLingerOption; + + optval := -1; + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, + SO_KEEPALIVE, @optval, SizeOf(optval)); + + if iStatus <> 0 then begin + SocketError('setsockopt(SO_KEEPALIVE)'); + Exit; + end; + + if (FLocalPortNum <> 0) or (FLocalAddr <> '0.0.0.0') then + BindSocket; + end; + + FSelectEvent := FD_READ or FD_WRITE or FD_CLOSE or + FD_ACCEPT or FD_CONNECT; + iStatus := WSocket_WSAASyncSelect(FHSocket, Handle, + WM_ASYNCSELECT, FSelectEvent); + if iStatus <> 0 then begin + SocketError('WSAAsyncSelect'); + Exit; + end; + + if FType = SOCK_DGRAM then begin + ChangeState(wsConnected); + TriggerSessionConnected(0); + end + else begin + iStatus := WSocket_connect(FHSocket, TSockAddr(sin), sizeof(sin)); + if iStatus = 0 then + ChangeState(wsConnecting) + else begin + iStatus := WSocket_WSAGetLastError; + if iStatus = WSAEWOULDBLOCK then + ChangeState(wsConnecting) + else begin + FLastError := WSocket_WSAGetLastError; + SocketError('Connect'); + Exit; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Listen; +type + ip_mreq = record + imr_multiaddr : in_addr; + imr_interface : in_addr; + end; +var + iStatus : integer; + optval : integer; + mreq : ip_mreq; + szAddr : array[0..256] of char; +begin + if not FPortAssigned then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('listen: port not assigned'); + Exit; + end; + + if not FProtoAssigned then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('listen: protocol not assigned'); + Exit; + end; + + if not FAddrAssigned then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('listen: address not assigned'); + Exit; + end; + + try + if not FProtoResolved then begin + { The next line will trigger an exception in case of failure } + FProto := WSocketResolveProto(FProtoStr); + if FProto = IPPROTO_UDP then + FType := SOCK_DGRAM + else + FType := SOCK_STREAM; + FProtoResolved := TRUE; + end; + + if not FPortResolved then begin + { The next line will trigger an exception in case of failure } + FPortNum := WSocketResolvePort(FPortStr, GetProto); + sin.sin_port := WSocket_htons(FPortNum); + FPortResolved := TRUE; + end; + + if not FAddrResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_addr.s_addr := WSocketResolveHost(FAddrStr).s_addr; + FAddrResolved := TRUE; + end; + except + on E:Exception do begin + RaiseException('listen: ' + E.Message); + Exit; + end; + end; + + { Remove any data from the internal output buffer } + { (should already be empty !) } + DeleteBufferedData; + + FHSocket := WSocket_socket(FAddrFormat, FType, FProto); + + if FHSocket = INVALID_SOCKET then begin + SocketError('socket'); + exit; + end; + + if FType = SOCK_DGRAM then begin + if FReuseAddr then begin + { Enable multiple tasks to listen on duplicate address and port } + optval := -1; + iStatus := SetSockOpt(FHSocket, SOL_SOCKET, SO_REUSEADDR, @optval, SizeOf(optval)); + + if iStatus <> 0 then begin + SocketError('setsockopt(SO_REUSEADDR)'); + Exit; + end; + end; + end; + + iStatus := WSocket_bind(FHSocket, TSockAddr(sin), sizeof(sin)); + if iStatus = 0 then + ChangeState(wsBound) + else begin + SocketError('Bind'); + Close; + Exit; + end; + + if FType = SOCK_DGRAM then begin + if FMultiCast then begin + { Use setsockopt() to join a multicast group } + { mreq.imr_multiaddr.s_addr := Inet_addr('225.0.0.37');} + { mreq.imr_multiaddr.s_addr := sin.sin_addr.s_addr;} + { mreq.imr_multiaddr.s_addr := Inet_addr(FAddrStr);} + StrPCopy(szAddr, FMultiCastAddrStr); + mreq.imr_multiaddr.s_addr := Inet_addr(szAddr); + { mreq.imr_interface.s_addr := htonl(INADDR_ANY);} { RK} + mreq.imr_interface.s_addr := WSocketResolveHost(FAddrStr).s_addr; + iStatus := SetSockOpt(FHSocket, IPPROTO_IP, + IP_ADD_MEMBERSHIP, @mreq, SizeOf(mreq)); + + if iStatus <> 0 then begin + SocketError('setsockopt(IP MULTICAST)'); + Exit; + end; + end; + end; + + case FType of + SOCK_RAW, + SOCK_DGRAM : + begin + ChangeState(wsListening); + ChangeState(wsConnected); + TriggerSessionConnected(0); + end; + SOCK_STREAM : + begin + iStatus := WSocket_listen(FHSocket, 5); + if iStatus = 0 then + ChangeState(wsListening) + else begin + SocketError('Listen'); + Exit; + end; + end; + else + SocketError('Listen: unexpected protocol.'); + Exit; + end; + + + FSelectEvent := FD_READ or FD_WRITE or + FD_ACCEPT or FD_CLOSE; + iStatus := WSocket_WSAASyncSelect(FHSocket, Handle, + WM_ASYNCSELECT, FSelectEvent); + if iStatus <> 0 then begin + SocketError('WSAASyncSelect'); + exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.Accept: TSocket; +var + len : integer; +begin + if FState <> wsListening then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('not a listening socket'); + Result := INVALID_SOCKET; + Exit; + end; + + len := sizeof(sin); +{$IFDEF VER80} { Delphi 1 } + FASocket := WSocket_accept(FHSocket, TSockAddr(sin), len); +{$ELSE} +{$IFDEF VER90} { Delphi 2} + FASocket := WSocket_accept(FHSocket, TSockAddr(sin), len); +{$ELSE} + { Delphi 3/4, Bcb 1/3/4 use pointers instead of var parameters } + FASocket := WSocket_accept(FHSocket, @sin, @len); +{$ENDIF} +{$ENDIF} + + if FASocket = INVALID_SOCKET then begin + SocketError('Accept'); + Result := INVALID_SOCKET; + Exit; + end + else + Result := FASocket; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Pause; +begin + FPaused := TRUE; + WSocket_WSAASyncSelect(FHSocket, Handle, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Resume; +begin + FPaused := FALSE; + WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, FSelectEvent); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Shutdown(How : Integer); +begin + if FHSocket <> INVALID_SOCKET then + WSocket_shutdown(FHSocket, How); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.DeleteBufferedData; +var + nItem : Integer; +begin + { Delete all data buffer } + for nItem := 0 to FBufList.Count - 1 do + TBuffer(FBufList.Items[nItem]).Free; + FBufList.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Abort; +begin + CancelDnsLookup; + DeleteBufferedData; + { Be sure to close as fast as possible (abortive close) } + if (State = wsConnected) and (FProto = IPPROTO_TCP) then begin + LingerOnOff := wsLingerOff; + SetLingerOption; + end; + InternalClose(FALSE, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Close; +begin + InternalClose(TRUE, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.CloseDelayed; +begin + PostMessage(Handle, WM_CLOSE_DELAYED, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Release; +begin + PostMessage(Handle, WM_WSOCKET_RELEASE, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMCloseDelayed(var msg: TMessage); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMRelease(var msg: TMessage); +begin + Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Flush; +begin + while (FHSocket <> INVALID_SOCKET) and { No more socket } + (not bAllSent) do begin { Nothing to send } + { Break; } + TryToSend; + MessagePump; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.InternalClose(bShut : Boolean; Error : Word); +var + iStatus : integer; +{ Buffer : array [0..127] of Char; } +begin + if FHSocket = INVALID_SOCKET then begin + if FState <> wsClosed then begin + ChangeState(wsClosed); + AssignDefaultValue; + end; + exit; + end; + + if FState = wsClosed then + Exit; + +{ 11/10/98 called shutdown(1) instead of shutdonw(2). This disable only } +{ reception. Disabling data send produced data lost is some cases. For } +{ example when a client open the connection, send some data fast then close } +{ the connection immediately, even using the linger option. } + if bShut then + ShutDown(1); + + if FHSocket <> INVALID_SOCKET then begin + repeat + { Close the socket } + iStatus := WSocket_closesocket(FHSocket); + if iStatus <> 0 then begin + FLastError := WSocket_WSAGetLastError; + if FLastError <> WSAEWOULDBLOCK then begin + FHSocket := INVALID_SOCKET; + { Ignore the error occuring when winsock DLL not } + { initialized (occurs when using TWSocket from a DLL) } + if FLastError = WSANOTINITIALISED then + break; + SocketError('Disconnect (closesocket)'); + Exit; + end; + MessagePump; + end; + until iStatus = 0; + FHSocket := INVALID_SOCKET; + end; + + ChangeState(wsClosed); + if (not (csDestroying in ComponentState)) and + (not FCloseInvoked) {and Assigned(FOnSessionClosed)} then begin + FCloseInvoked := TRUE; + TriggerSessionClosed(Error); + end; + { 29/09/98 Protect AssignDefaultValue because SessionClosed event handler } + { may have destroyed the component. } + try + AssignDefaultValue; + except + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WaitForClose; +var + lCount : LongInt; + Status : Integer; + Ch : Char; +begin + while (FHSocket <> INVALID_SOCKET) and (FState <> wsClosed) do begin + MessagePump; + + if WSocket_ioctlsocket(FHSocket, FIONREAD, lCount) = SOCKET_ERROR then + break; + if lCount > 0 then + TriggerDataAvailable(0); + + Status := DoRecv(Ch, 0, 0); + if Status <= 0 then begin + FLastError := WSocket_WSAGetLastError; + if FLastError <> WSAEWOULDBLOCK then + break; + end; + MessagePump; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketGetHostByAddr(Addr : String) : PHostEnt; +var + szAddr : array[0..256] of char; + lAddr : u_long; +begin + if (Length(Addr) = 0) or (Length(Addr) >= SizeOf(szAddr)) then + raise ESocketException.Create('WSocketGetHostByAddr: Invalid address.'); + + StrPCopy(szAddr, Addr); { Length already checked above } + lAddr := WSocket_inet_addr(szAddr); + Result := WSocket_gethostbyaddr(PChar(@lAddr), 4, PF_INET); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketResolveIp(IpAddr : String) : String; +var + Phe : PHostEnt; +begin + phe := WSocketGetHostByAddr(IpAddr); + if Phe = nil then + Result := '' + else begin + SetLength(Result, StrLen(Phe^.h_name)); + StrCopy(@Result[1], Phe^.h_name); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketGetHostByName(Name : String) : PHostEnt; +var + szName : array[0..256] of char; +begin + if (Length(Name) = 0) or (Length(Name) >= SizeOf(szName)) then + raise ESocketException.Create('WSocketGetHostByName: Invalid Hostname.'); + + StrPCopy(szName, Name); + Result := WSocket_gethostbyname(szName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LocalIPList : TStrings; +var + phe : PHostEnt; +begin + IPList.Clear; + Result := IPList; + + phe := WSocketGetHostByName(LocalHostName); + if phe <> nil then + GetIpList(Phe, IPList); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LocalHostName : String; +var + Buffer : array [0..63] of char; +begin +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + if WSocket_gethostname(Buffer, SizeOf(Buffer)) <> 0 then + raise ESocketException.Create('Winsock.GetHostName failed'); + Result := StrPas(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.TimerIsSet(var tvp : TTimeVal) : Boolean; +begin + Result := (tvp.tv_sec <> 0) or (tvp.tv_usec <> 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.TimerCmp(var tvp : TTimeVal; var uvp : TTimeVal; IsEqual : Boolean) : Boolean; +begin + Result := (tvp.tv_sec = uvp.tv_sec) and (tvp.tv_usec = uvp.tv_usec); + if not IsEqual then + Result := not Result; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TimerClear(var tvp : TTimeVal); +begin + tvp.tv_sec := 0; + tvp.tv_usec := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetSendFlags(newValue : TSocketSendFlags); +begin + case newValue of + wsSendNormal: FSendFlags := 0; + wsSendUrgent: FSendFlags := MSG_OOB; + else + RaiseException('Invalid SendFlags'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetSendFlags : TSocketSendFlags; +begin + case FSendFlags of + 0 : Result := wsSendNormal; + MSG_OOB : Result := wsSendUrgent; + else + RaiseException('Invalid internal SendFlags'); + Result := wsSendNormal; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerDisplay(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerSendData(BytesSent : Integer); +begin + if Assigned(FOnSendData) then + FOnSendData(Self, BytesSent); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerSessionAvailable(Error : Word); +begin + if Assigned(FOnSessionAvailable) then + FOnSessionAvailable(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerSessionConnected(Error : Word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerSessionClosed(Error : Word); +begin + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.TriggerDataAvailable(Error : Word) : Boolean; +begin + Result := Assigned(FOnDataAvailable); + if not Result then + Exit; +{$IFDEF TOMASEK} { 23/01/99 } + { Do not allow FD_READ messages, this will prevent reentering the } + { OnDataAvailable event handler. } + FSelectEvent := FD_WRITE or FD_CLOSE or FD_CONNECT; + WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, FSelectEvent); + try + FRcvdFlag := TRUE; + while Result and FRcvdFlag do begin + { Trigger user code. This will normally call DoRecv which will } + { update FRcvdFlag. } + { If user code is wrong, we'll loop forever ! } + FOnDataAvailable(Self, Error); + Result := Assigned(FOnDataAvailable); + end; + finally + { Allow all events now } + FSelectEvent := FD_READ or FD_WRITE or FD_CLOSE or FD_CONNECT; + WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, FSelectEvent); + end; +{$ELSE} { 23/01/99 } + FOnDataAvailable(Self, Error); { 23/01/99 } +{$ENDIF} { 23/01/99 } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerDataSent(Error : Word); +begin + if Assigned(FOnDataSent) then + FOnDataSent(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerError; +begin + if Assigned(FOnError) then + FOnError(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerDNSLookupDone(Error : Word); +begin + if Assigned(FOnDNSLookupDone) then + FOnDNSLookupDone(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerChangeState(OldState, NewState : TSocketState); +begin + if Assigned(FOnChangeState) then + FOnChangeState(Self, OldState, NewState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SocketError(sockfunc: string); +var + Error : integer; + Line : string; +begin + Error := WSocket_WSAGetLastError; + Line := 'Error '+ IntToStr(Error) + ' in function ' + sockfunc + + #13#10 + WSocketErrorDesc(Error); + + if (Error = WSAECONNRESET) or + (Error = WSAENOTCONN) then begin + WSocket_closesocket(FHSocket); + FHSocket := INVALID_SOCKET; + if FState <> wsClosed then + TriggerSessionClosed(Error); + ChangeState(wsClosed); + end; + + FLastError := Error; + RaiseException(Line); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketErrorDesc(error: integer) : string; +begin + case error of + 0: + WSocketErrorDesc := 'No Error'; + WSAEINTR: + WSocketErrorDesc := 'Interrupted system call'; + WSAEBADF: + WSocketErrorDesc := 'Bad file number'; + WSAEACCES: + WSocketErrorDesc := 'Permission denied'; + WSAEFAULT: + WSocketErrorDesc := 'Bad address'; + WSAEINVAL: + WSocketErrorDesc := 'Invalid argument'; + WSAEMFILE: + WSocketErrorDesc := 'Too many open files'; + WSAEWOULDBLOCK: + WSocketErrorDesc := 'Operation would block'; + WSAEINPROGRESS: + WSocketErrorDesc := 'Operation now in progress'; + WSAEALREADY: + WSocketErrorDesc := 'Operation already in progress'; + WSAENOTSOCK: + WSocketErrorDesc := 'Socket operation on non-socket'; + WSAEDESTADDRREQ: + WSocketErrorDesc := 'Destination address required'; + WSAEMSGSIZE: + WSocketErrorDesc := 'Message too long'; + WSAEPROTOTYPE: + WSocketErrorDesc := 'Protocol wrong type for socket'; + WSAENOPROTOOPT: + WSocketErrorDesc := 'Protocol not available'; + WSAEPROTONOSUPPORT: + WSocketErrorDesc := 'Protocol not supported'; + WSAESOCKTNOSUPPORT: + WSocketErrorDesc := 'Socket type not supported'; + WSAEOPNOTSUPP: + WSocketErrorDesc := 'Operation not supported on socket'; + WSAEPFNOSUPPORT: + WSocketErrorDesc := 'Protocol family not supported'; + WSAEAFNOSUPPORT: + WSocketErrorDesc := 'Address family not supported by protocol family'; + WSAEADDRINUSE: + WSocketErrorDesc := 'Address already in use'; + WSAEADDRNOTAVAIL: + WSocketErrorDesc := 'Address not available'; + WSAENETDOWN: + WSocketErrorDesc := 'Network is down'; + WSAENETUNREACH: + WSocketErrorDesc := 'Network is unreachable'; + WSAENETRESET: + WSocketErrorDesc := 'Network dropped connection on reset'; + WSAECONNABORTED: + WSocketErrorDesc := 'Connection aborted'; + WSAECONNRESET: + WSocketErrorDesc := 'Connection reset by peer'; + WSAENOBUFS: + WSocketErrorDesc := 'No buffer space available'; + WSAEISCONN: + WSocketErrorDesc := 'Socket is already connected'; + WSAENOTCONN: + WSocketErrorDesc := 'Socket is not connected'; + WSAESHUTDOWN: + WSocketErrorDesc := 'Can''t send after socket shutdown'; + WSAETOOMANYREFS: + WSocketErrorDesc := 'Too many references: can''t splice'; + WSAETIMEDOUT: + WSocketErrorDesc := 'Connection timed out'; + WSAECONNREFUSED: + WSocketErrorDesc := 'Connection refused'; + WSAELOOP: + WSocketErrorDesc := 'Too many levels of symbolic links'; + WSAENAMETOOLONG: + WSocketErrorDesc := 'File name too long'; + WSAEHOSTDOWN: + WSocketErrorDesc := 'Host is down'; + WSAEHOSTUNREACH: + WSocketErrorDesc := 'No route to host'; + WSAENOTEMPTY: + WSocketErrorDesc := 'Directory not empty'; + WSAEPROCLIM: + WSocketErrorDesc := 'Too many processes'; + WSAEUSERS: + WSocketErrorDesc := 'Too many users'; + WSAEDQUOT: + WSocketErrorDesc := 'Disc quota exceeded'; + WSAESTALE: + WSocketErrorDesc := 'Stale NFS file handle'; + WSAEREMOTE: + WSocketErrorDesc := 'Too many levels of remote in path'; + WSASYSNOTREADY: + WSocketErrorDesc := 'Network sub-system is unusable'; + WSAVERNOTSUPPORTED: + WSocketErrorDesc := 'WinSock DLL cannot support this application'; + WSANOTINITIALISED: + WSocketErrorDesc := 'WinSock not initialized'; + WSAHOST_NOT_FOUND: + WSocketErrorDesc := 'Host not found'; + WSATRY_AGAIN: + WSocketErrorDesc := 'Non-authoritative host not found'; + WSANO_RECOVERY: + WSocketErrorDesc := 'Non-recoverable error'; + WSANO_DATA: + WSocketErrorDesc := 'No Data'; + else + WSocketErrorDesc := 'Not a WinSock error'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + X X X X X X X X X X X X X X + X X X X X X X X X X X + X X X X X X X X + X X X X X X X X X X X + X X X X X X X X + X X X X X X X X X X X X + X X X X X X X X X X X X + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.AssignDefaultValue; +begin + inherited AssignDefaultValue; + FSocksState := socksData; + FSocksServer := ''; + FSocksPort := ''; + FSocksLevel := '5'; + FSocksRcvdCnt := 0; + FSocksPortAssigned := FALSE; + FSocksServerAssigned := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SetSocksLevel(newValue : String); +begin + if State <> wsClosed then begin + RaiseException('Can''t change socks level if not closed'); + Exit; + end; + if (newValue <> '4') and (newValue <> '5') and + (newValue <> '4A') and (newValue <> '4a') then begin + RaiseException('Invalid socks level. Must be 4, 4A or 5.'); + Exit; + end; + FSocksLevel := UpperCase(newValue); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SetSocksPort(sPort : String); +begin + if State <> wsClosed then begin + RaiseException('Can''t change socks port if not closed'); + Exit; + end; + FSocksPort := Trim(sPort); + if Length(FSocksPort) = 0 then begin + FSocksPortAssigned := FALSE; + Exit; + end; + FSocksPortAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SetSocksServer(sServer : String); +begin + if State <> wsClosed then begin + RaiseException('Can''t change socks server if not closed'); + Exit; + end; + FSocksServer := Trim(sServer); + if Length(FSocksServer) = 0 then begin + FSocksServerAssigned := FALSE; + Exit; + end; + FSocksServerAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.Listen; +begin + { Check if we really wants to use socks server } + if not FSocksServerAssigned then begin + { No socks server assigned, Listen as usual } + inherited Listen; + Exit; + end; + RaiseException('Listening is not supported thru socks server'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.Connect; +begin + { Check if we really wants to use socks server } + if not FSocksServerAssigned then begin + { No socks server assigned, connect as usual } + inherited Connect; + Exit; + end; + + if LowerCase(FProtoStr) <> 'tcp' then begin + RaiseException('tcp is the only protocol supported thru socks server'); + Exit; + end; + + try + if not FPortResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_port := WSocket_htons(WSocketResolvePort(FSocksPort, FProtoStr)); + FPortResolved := TRUE; + end; + + if not FAddrResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_addr.s_addr := WSocketResolveHost(FSocksServer).s_addr; + FAddrResolved := TRUE; + end; + { The next line will trigger an exception in case of failure } + FPortNum := WSocketResolvePort(FPortStr, FProtoStr); + except + on E:Exception do begin + RaiseException('connect: ' + E.Message); + Exit; + end; + end; + + FSocksState := socksNegociateMethods; + FRcvCnt := 0; + inherited Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{function BufToStr(Buf : PChar; Cnt : Integer) : String; +begin + Result := ''; + while Cnt > 0 do begin + if Buf^ in [#32..#126] then + Result := Result + Buf^ + else + Result := Result + '#' + Format('%2.2d', [ord(Buf^)]); + Inc(Buf); + Dec(Cnt); + end; +end;} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSessionConnected(Error : Word); +var + Buf : array [0..2] of char; +begin + if FSocksState = socksNegociateMethods then begin + TriggerSocksConnected(Error); + if Error <> 0 then begin + inherited TriggerSessionConnected(Error); + Exit; + end; + if FSocksLevel[1] = '4' then + SocksDoConnect + else begin + if FSocksAuthentication = socksNoAuthentication then + FSocksAuthNumber := #$00 { No authentification } + else + FSocksAuthNumber := #$02; { Usercode/Password } + + Buf[0] := #$05; { Version number } + Buf[1] := #$01; { Number of methods } + Buf[2] := FSocksAuthNumber; { Method identifier } +{TriggerDisplay('Send = ''' + BufToStr(Buf, 3) + '''');} + Send(@Buf, 3); + end; + end + else + inherited TriggerSessionConnected(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSessionClosed(Error : Word); +begin + if FSocksState = socksAuthenticate then + TriggerSocksAuthState(socksAuthFailure); + inherited TriggerSessionClosed(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSocksConnected(Error : Word); +begin + if Assigned(FOnSocksConnected) then + FOnSocksConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSocksError(Error : Integer; Msg : String); +begin + if Assigned(FOnSocksError) then + FOnSocksError(Self, Error, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSocksAuthState(AuthState : TSocksAuthState); +begin + if Assigned(FOnSocksAuthState) then + FOnSocksAuthState(Self, AuthState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SocksDoAuthenticate; +var + Buf : array [0..127] of char; + I : Integer; +begin + FSocksState := socksAuthenticate; + TriggerSocksAuthState(socksAuthStart); + Buf[0] := #$01; {06/03/99} { Socks version } + I := 1; + Buf[I] := chr(Length(FSocksUsercode)); + Move(FSocksUsercode[1], Buf[I + 1], Length(FSocksUsercode)); + I := I + 1 + Length(FSocksUsercode); + Buf[I] := chr(Length(FSocksPassword)); + Move(FSocksPassword[1], Buf[I + 1], Length(FSocksPassword)); + I := I + 1 + Length(FSocksPassword); + try +{TriggerDisplay('Send = ''' + BufToStr(Buf, I) + '''');} + Send(@Buf, I); + except + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SocksDoConnect; +type + pu_long = ^u_long; +var + Buf : array [0..127] of char; + I : Integer; + ErrCode : Integer; +begin + FSocksState := socksConnect; + if FSocksLevel[1] = '4' then begin + Buf[0] := #4; + Buf[1] := #1; + PWORD(@Buf[2])^ := WSocket_ntohs(FPortNum); + if FSocksLevel = '4A' then + pu_long(@Buf[4])^ := WSocket_inet_addr('0.0.0.1') + else begin + try + pu_long(@Buf[4])^ := WSocketResolveHost(FAddrStr).s_addr; + except + on E:Exception do begin + ErrCode := socksHostResolutionFailed; + TriggerSocksError(ErrCode, E.ClassName + ' ' + E.Message); + InternalClose(TRUE, ErrCode); + Exit; + end; + end; + end; + I := 8; + if Length(FSocksUsercode) > 0 then begin + { I'm not sure it has to be like that ! Should I also use the } + { password or not ? } + Move(FSocksUsercode[1], Buf[I], Length(FSocksUsercode)); + I := I + Length(FSocksUsercode); + end; + Buf[I] := #0; + Inc(I); + if FSocksLevel = '4A' then begin + Move(FAddrStr[1], Buf[I], Length(FAddrStr)); + I := I + Length(FAddrStr); + Buf[I] := #0; { Alon Gingold } + Inc(I); { Alon Gingold } + end; + { Buf[I] := #0; Alon Gingold } + { Inc(I); Alon Gingold } + end + else begin + Buf[0] := #$05; { Socks version } + Buf[1] := #$01; { Connect command } + Buf[2] := #$00; { Reserved, must be $00 } + Buf[3] := #$03; { Address type is domain name } + Buf[4] := chr(Length(FAddrStr)); + { Should check buffer overflow } + Move(FAddrStr[1], Buf[5], Length(FAddrStr)); + I := 5 + Length(FAddrStr); + PWord(@Buf[I])^ := WSocket_htons(FPortNum); + I := I + 2; + end; + + try +{TriggerDisplay('Send = ''' + BufToStr(Buf, I + 2) + '''');} + Send(@Buf, I); + except + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.DataAvailableError( + ErrCode : Integer; + Msg : String); +begin +{ TriggerSocksError(ErrCode, Msg); } +{ inherited TriggerSessionConnected(ErrCode); } +{ InternalClose(TRUE, ErrCode); } + TriggerSocksError(ErrCode, Msg); + FSocksState := socksData; + {**ALON** Added, so TriggerSessionConnected will only call inherited} + {inherited} TriggerSessionConnected(ErrCode); + {**ALON** removed 'inherited' now calls top level} + InternalClose(TRUE, ErrCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSocksWSocket.TriggerDataAvailable(Error : Word) : Boolean; +var + Len : Integer; + I : Integer; + ErrCode : Word; + ErrMsg : String; + InAddr : TInAddr; + AnsLen : Integer; +begin + if FSocksState = socksData then begin + Result := inherited TriggerDataAvailable(Error); + Exit; + end; + + if Error <> 0 then begin + DataAvailableError(Error, 'data receive error'); + Result := FALSE; + Exit; + end; + + if FSocksState = socksNegociateMethods then begin + Result := TRUE; + Len := Receive(@FRcvBuf[FRcvCnt], Sizeof(FRcvBuf) - FRcvCnt - 1); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; +{TriggerDisplay('socksNegociateMethods FrcvBuf = ''' + BufToStr(FRcvBuf, FRcvCnt) + '''');} + if FSocksLevel[1] = '4' then begin + { We should never comes here } + DataAvailableError(socksProtocolError, 'TWSocket logic error'); + Exit; + end + else begin { SOCKS5 } + { We are waiting only two bytes } + if FRcvCnt < 2 then + Exit; +{ if FRcvCnt <> 2 then begin 06/03/99} +{ DataAvailableError(socksProtocolError, 'too much data availaible');} +{ Exit; } +{ end; } + FRcvCnt := 0; { Clear receive counter } + if FRcvBuf[0] <> #$05 then begin + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + if FRcvBuf[1] = #$00 then begin + { No authentication required } + if FSocksAuthNumber <> #$00 then + { We asked for authentification, so complains... } + TriggerSocksAuthState(socksAuthNotRequired); + end + else if FRcvBuf[1] = #$02 then begin + { Usercode/Password authentication required } + SocksDoAuthenticate; + Exit; + end + else begin + DataAvailableError(socksAuthMethodError, 'authentification method not acceptable'); + Exit; + end; + SocksDoConnect; + end; + end + else if FSocksState = socksConnect then begin + Result := TRUE; +{TriggerDisplay('socksConnect FrcvBuf = ''' + BufToStr(FRcvBuf, FRcvCnt) + '''');} + if FSocksLevel[1] = '4' then begin + { We wants at most 8 characters } + Len := Receive(@FRcvBuf[FRcvCnt], 8 - FRcvCnt); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; + { We are waiting for 8 bytes } + if FRcvCnt < 8 then + Exit; + FRcvCnt := 0; { Clear receive counter } + if FRcvBuf[0] <> #0 then begin + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + if FRcvBuf[1] <> #90 then begin { david.brock } + case FRcvBuf[1] of + #91: ErrCode := socksRejectedOrFailed; + #92: ErrCode := socksConnectionRefused; + #93: ErrCode := socksAuthenticationFailed; + else + ErrCode := socksUnassignedError; + end; + case ErrCode of + socksRejectedOrFailed : + ErrMsg := 'request rejected or failed'; + socksConnectionRefused : + ErrMsg := 'connection refused'; + socksAuthenticationFailed : + ErrMsg := 'authentification failed'; + else + ErrMsg := 'unassigned error #' + IntToStr(Ord(FRcvBuf[1])); + end; + DataAvailableError(ErrCode, ErrMsg); + Exit; + end; + FSocksState := socksData; +{ inherited TriggerSessionConnected(0); } +{ Result := inherited TriggerDataAvailable(0); } + {inherited} TriggerSessionConnected(0); + {**ALON** removed 'inherited' now calls top level} + Result := {inherited} TriggerDataAvailable(0); + {**ALON** removed 'inherited' now calls top level} + end + else begin { SOCKS5 } + Len := Receive(@FRcvBuf[FRcvCnt], Sizeof(FRcvBuf) - FRcvCnt - 1); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; + if FRcvCnt >= 1 then begin + { First byte is version, we expect version 5 } + if FRcvBuf[0] <> #$05 then begin + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + end; + if FRcvCnt >= 2 then begin + if FRcvBuf[1] <> #$00 then begin + case FRcvBuf[1] of + #1: ErrCode := socksGeneralFailure; + #2: ErrCode := socksConnectionNotAllowed; + #3: ErrCode := socksNetworkUnreachable; + #4: ErrCode := socksHostUnreachable; + #5: ErrCode := socksConnectionRefused; + #6: ErrCode := socksTtlExpired; + #7: ErrCode := socksUnknownCommand; + #8: ErrCode := socksUnknownAddressType; + else + ErrCode := socksUnassignedError; + end; + case ErrCode of + socksGeneralFailure : + ErrMsg := 'general SOCKS server failure'; + socksConnectionNotAllowed : + ErrMsg := 'connection not allowed by ruleset'; + socksNetworkUnreachable : + ErrMsg := 'network unreachable'; + socksHostUnreachable : + ErrMsg := 'host unreachable'; + socksConnectionRefused : + ErrMsg := 'connection refused'; + socksTtlExpired : + ErrMsg := 'time to live expired'; + socksUnknownCommand : + ErrMsg := 'command not supported'; + socksUnknownAddressType : + ErrMsg := 'address type not supported'; + else + ErrMsg := 'unassigned error #' + IntToStr(Ord(FRcvBuf[1])); + end; + DataAvailableError(ErrCode, ErrMsg); + Exit; + end; + end; + if FRcvCnt < 5 then + Exit; + + { We have enough data to learn the answer length } + if FRcvBuf[3] = #$01 then + AnsLen := 10 { IP V4 address } + else if FRcvBuf[3] = #$03 then + AnsLen := 7 + Ord(FRcvBuf[4]) { Domain name } + else + AnsLen := 5; { Other unsupported } + + if FRcvCnt < AnsLen then + Exit; + + if FRcvBuf[3] = #$01 then begin + { IP V4 address } + Move(FRcvBuf[4], InAddr, 4); + FBoundAddr := StrPas(WSocket_inet_ntoa(InAddr)); + I := 4 + 4; + end + else if FRcvBuf[3] = #$03 then begin + { Domain name } + SetLength(FBoundAddr, Ord(FRcvBuf[4])); + Move(FRcvBuf[5], FBoundAddr[1], Length(FBoundAddr)); { david.brock } + I := 4 + Ord(FRcvBuf[4]) + 1; + end + else begin + { Unsupported address type } + DataAvailableError(socksUnknownAddressType, 'address type not supported'); + Exit; + end; + + FBoundPort := format('%d', [WSocket_ntohs(PWord(@FRcvBuf[I])^)]); + I := I + 2; + FSocksState := socksData; +{ inherited TriggerSessionConnected(0); } + {inherited} TriggerSessionConnected(0); + {**ALON** removed 'inherited' now calls top level} + FSocksRcvdCnt := FRcvCnt - I; + if FSocksRcvdCnt < 0 then + FSocksRcvdCnt := 0 + else + FSocksRcvdPtr := @FRcvBuf[I]; +{ Result := inherited TriggerDataAvailable(0);} + Result := {inherited} TriggerDataAvailable(0); + {**ALON** removed 'inherited' now calls top level} + end; + end + else if FSocksState = socksAuthenticate then begin + Result := TRUE; + Len := Receive(@FRcvBuf[FRcvCnt], Sizeof(FRcvBuf) - FRcvCnt - 1); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; +{TriggerDisplay('socksAuthenticate FrcvBuf = ''' + BufToStr(FRcvBuf, FRcvCnt) + '''');} + if FRcvCnt >= 1 then begin + { First byte is version, we expect version 5 } + if FRcvBuf[0] <> #$01 then begin { 06/03/99 } +{ TriggerSocksAuthState(socksAuthFailure); Burlakov 12/11/99 } + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + end; + if FRcvCnt = 2 then begin + { Second byte is status } + if FRcvBuf[1] <> #$00 then begin +{ TriggerSocksAuthState(socksAuthFailure); Burlakov 12/11/99 } + DataAvailableError(socksAuthenticationFailed, 'socks authentication failed'); + Exit; + end; + end + else if FRcvCnt > 2 then begin +{ TriggerSocksAuthState(socksAuthFailure); Burlakov 12/11/99 } + DataAvailableError(socksProtocolError, 'too much data availaible'); + Exit; + end; + FRcvCnt := 0; { 06/03/99 } + TriggerSocksAuthState(socksAuthSuccess); + SocksDoConnect; + end + else begin + { We should never comes here ! } + DataAvailableError(socksInternalError, 'internal error'); + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSocksWSocket.GetRcvdCount : LongInt; +begin + if FSocksRcvdCnt <= 0 then + Result := inherited GetRcvdCount + else + Result := FSocksRcvdCnt; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSocksWSocket.DoRecv( + var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; +begin + if FSocksRcvdCnt <= 0 then begin + Result := inherited DoRecv(Buffer, BufferSize, Flags); + Exit; + end; + { We already have received data into our internal buffer } + if FSocksRcvdCnt <= BufferSize then begin + { User buffer is greater than received data, copy all and clear } + Move(FSocksRcvdPtr^, Buffer, FSocksRcvdCnt); + Result := FSocksRcvdCnt; + FSocksRcvdCnt := 0; + Exit; + end; + { User buffer is smaller, copy as much as possible } + Move(FSocksRcvdPtr^, Buffer, BufferSize); + Result := BufferSize; + FSocksRcvdPtr := FSocksRcvdPtr + BufferSize; + FSocksRcvdCnt := FSocksRcvdCnt - BufferSize; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + X X X X X X X X + X X X X X X + X X X X X X + X X X X X X X X + X X X X X + X X X X X + X X X X X X X X X X X + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomLineWSocket.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FLineEnd := #13#10; + FLineMode := FALSE; + FLineLimit := 65536; { Arbitrary line limit } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomLineWSocket.Destroy; +begin + if FRcvdPtr <> nil then begin + FreeMem(FRcvdPtr, FRcvBufSize); + FRcvdPtr := nil; + FRcvBufSize := 0; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + if Msg = WM_TRIGGER_DATA_AVAILABLE then begin + { We *MUST* handle all exception to avoid application shutdown } + try + WMTriggerDataAvailable(MsgRec) + except + on E:Exception do + HandleBackGroundException(E); + end; + end + else + inherited WndProc(MsgRec); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.WMTriggerDataAvailable(var msg: TMessage); +begin + while FRcvdCnt > 0 do + TriggerDataAvailable(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.SetLineMode(newValue : Boolean); +begin + if FLineMode = newValue then + Exit; + FLineMode := newValue; + if (FRcvdCnt > 0) or (FLineLength > 0) then + PostMessage(Handle, WM_TRIGGER_DATA_AVAILABLE, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomLineWSocket.GetRcvdCount : LongInt; +begin + if not FLineMode then + Result := inherited GetRcvdCount + else + Result := FLineLength; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomLineWSocket.DoRecv( + var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; +begin + if FLineMode and (FLineLength > 0) then begin + { We are in line mode an a line is received } + if FLineLength <= BufferSize then begin + { User buffer is greater than received data, copy all and clear } + Move(FRcvdPtr^, Buffer, FLineLength); + Result := FLineLength; + FLineLength := 0; + Exit; + end; + { User buffer is smaller, copy as much as possible } + Move(FRcvdPtr^, Buffer, BufferSize); + Result := BufferSize; + { Move the end of line to beginning of buffer to be read the next time } + Move(FRcvdPtr[BufferSize], FRcvdPtr^, FLineLength - BufferSize); + FLineLength := FLineLength - BufferSize; + Exit; + end; + + if FLineMode or (FRcvdCnt <= 0) then begin + { There is nothing in our internal buffer } + Result := inherited DoRecv(Buffer, BufferSize, Flags); + Exit; + end; + + { We already have received data into our internal buffer } + if FRcvdCnt <= BufferSize then begin + { User buffer is greater than received data, copy all and clear } + Move(FRcvdPtr^, Buffer, FRcvdCnt); + Result := FRcvdCnt; + FRcvdCnt := 0; + Exit; + end; + { User buffer is smaller, copy as much as possible } + Move(FRcvdPtr^, Buffer, BufferSize); + Result := BufferSize; + { Then move remaining data to front og buffer 16/10/99 } + Move(FRcvdPtr[BufferSize], FRcvdPtr^, FRcvdCnt - BufferSize + 1); + FRcvdCnt := FRcvdCnt - BufferSize; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Edit received data. Handle TAB and BACKSPACE characters. } +{ A data packet has been received into FRcvPtr buffer, starting from } +{ FRcvdCnt offset. Packet size if passed as the Len argument. } +procedure TCustomLineWSocket.EditLine(var Len : Integer); +var + Buf : PChar; + BufSize : LongInt; + I : LongInt; + J : LongInt; + Edited : Boolean; + NewCnt : LongInt; + NewSize : LongInt; +const + BackString : String = #8 + ' ' + #8; +begin + BufSize := 0; + try + Edited := FALSE; + I := FRcvdCnt; + J := FRcvdCnt; + NewCnt := FRcvdCnt; + { Loop to process all received char } + while I < (FRcvdCnt + Len) do begin + if FRcvdPtr[I] = #8 then begin { BACKSPACE character } + if FLineEcho and (J > 0) then + SendStr(BackString); + if not Edited then begin + { Not edited yet, so we allocate a buffer to store } + { edited data and we remember we edited data. } + Edited := TRUE; + { Computer buffer size as a multiple of 256 bytes } + BufSize := ((FRcvdCnt + Len + 256) shr 8) shl 8; + GetMem(Buf, BufSize); + { Copy data already processed } + Move(FRcvdPtr^, Buf^, I); + end; + if J > 0 then begin + Dec(J); + if J < NewCnt then + NewCnt := J; + end; + Inc(I); + end + else if FRcvdPtr[I] = #9 then begin { TAB character } + if not Edited then begin + { Not edited yet, so we allocate a buffer to store } + { edited data and we remember we edited data. } + Edited := TRUE; + { Computer buffer size as a multiple of 256 bytes } + BufSize := ((FRcvdCnt + Len + 256) shr 8) shl 8; + GetMem(Buf, BufSize); + { Copy data already processed } + Move(FRcvdPtr^, Buf^, I); + end; + repeat + if FLineEcho then + SendStr(' '); + Buf[J] := ' '; + Inc(J); + until (J and 7) = 0; + Inc(I); + end + else begin + if FLineEcho then + Send(@FRcvdPtr[I], 1); + if Edited then begin + if J >= BufSize then begin + { Need to allocate more buffer space } + NewSize := BufSize + 256; + {$IFDEF VER80} + Buf := ReallocMem(Buf, BufSize, NewSize); + {$ELSE} + ReallocMem(Buf, NewSize); + {$ENDIF} + BufSize := NewSize; + end; + Buf[J] := FRcvdPtr[I]; + end; + Inc(I); + Inc(J); + end; + end; + if Edited then begin + if J >= FRcvBufSize then begin + { Current buffer is too small, allocate larger } + NewSize := J + 1; + {$IFDEF VER80} + FRcvdPtr := ReallocMem(FRcvdPtr, FRcvBufSize, NewSize); + {$ELSE} + ReallocMem(FRcvdPtr, NewSize); + {$ENDIF} + FRcvBufSize := NewSize; + end; + { Move edited data back to original buffer } + Move(Buf^, FRcvdPtr^, J); + FRcvdPtr[J] := #0; + FRcvdCnt := NewCnt; + Len := J - FRcvdCnt; + end; + finally + if BufSize > 0 then + FreeMem(Buf, BufSize); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.TriggerLineLimitExceeded( + Cnt : Integer; + var ClearData : Boolean); +begin + if Assigned(FOnLineLimitExceeded) then + FOnLineLimitExceeded(Self, Cnt, ClearData); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomLineWSocket.TriggerDataAvailable(Error : Word) : Boolean; +var + Cnt : Integer; + Len : Integer; + NewSize : LongInt; + SearchFrom : LongInt; + I : LongInt; + Found : Boolean; +begin +{ if (not FLineMode) or (Length(FLineEnd) = 0) then begin } + if (not FLineMode) or (Length(FLineEnd) = 0) or (FSocksState <> socksData) + {**ALON** added check so, if data is received while still handshaking } + { with the socks server, we ask the TCustomSocksWSocket to handle it } + then begin + { We are not in line mode } + Result := inherited TriggerDataAvailable(Error); + Exit; + end; + + { We are in line mode. We receive data ourself } + + Result := TRUE; + Cnt := inherited GetRcvdCount; + { if Cnt <= 0 then } + { Exit; } + if Cnt < 0 then + Exit; + if Cnt = 0 then + Cnt := 255; + + if (FRcvdCnt + Cnt + 1) > FRcvBufSize then begin + { Current buffer is too small, allocate larger } + NewSize := FRcvdCnt + Cnt + 1; + {$IFDEF VER80} + FRcvdPtr := ReallocMem(FRcvdPtr, FRcvBufSize, NewSize); + {$ELSE} + ReallocMem(FRcvdPtr, NewSize); + {$ENDIF} + FRcvBufSize := NewSize; + end; + + Len := Receive(FRcvdPtr + FRcvdCnt, Cnt); + if Len <= 0 then + Exit; + FRcvdPtr[FRcvdCnt + Len] := #0; + if FLineEdit then + EditLine(Len) + else if FLineEcho then + Send(FRcvdPtr + FRcvdCnt, Len); + SearchFrom := FRcvdCnt - Length(FLineEnd); + if SearchFrom < 0 then + SearchFrom := 0; + FRcvdCnt := FRcvdCnt + Len; + while FLineMode do begin + Found := FALSE; + I := SearchFrom; + while I < (FRcvdCnt - Length(FLineEnd) + 1) do begin + if FRcvdPtr[I] = FLineEnd[1] then begin + Found := (StrLComp(@FRcvdPtr[I], @FLineEnd[1], Length(FLineEnd)) = 0); + if Found then + break; { Found the end of line marker } + end; + Inc(I); + end; + if not Found then begin + if ((FLineLimit > 0) and (FRcvdCnt > FLineLimit)) then begin + FLineClearData := TRUE; + TriggerLineLimitExceeded(FRcvdCnt, FLineClearData); + if FLineClearData then begin + FLineLength := 0; + FRcvdCnt := 0; + FLineClearData := FALSE; + end; + end; + break; + end; + FLineLength := I + Length(FLineEnd); + FLineReceivedFlag := TRUE; + { We received a complete line. We need to signal it to application } + { The application may not have a large buffer so we may need } + { several events to read the entire line. In the meanwhile, the } + { application may turn line mode off. } + while FLineMode and (FLineLength > 0) do begin + if not inherited TriggerDataAvailable(0) then + { There is no handler installed } + FLineLength := 0; + end; + { Move remaining data in front of buffer } + if FLineLength > 0 then begin + { Line mode was turned off in the middle of a line read. } + { We preserve unread line and other received data. } + Move(FRcvdPtr[I], FRcvdPtr[FLineLength], + FRcvdCnt - I); + FRcvdCnt := FRcvdCnt - I + FLineLength; + end + else begin + Move(FRcvdPtr[I + Length(FLineEnd)], FRcvdPtr[0], + FRcvdCnt - I - Length(FLineEnd)); + FRcvdCnt := FRcvdCnt - I - Length(FLineEnd); + end; + if FRcvdCnt >= 0 then + FRcvdPtr[FRcvdCnt] := #0; + SearchFrom := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.TriggerSessionClosed(Error : Word); +begin + FLineReceivedFlag := TRUE; + if FRcvdPtr <> nil then begin + if FLineMode and (FRcvdCnt > 0) and (not FLineClearData) then begin + FLineLength := FRcvdCnt; + while FLineMode and (FLineLength > 0) do + inherited TriggerDataAvailable(0); + end; + FreeMem(FRcvdPtr, FRcvBufSize); + FRcvdPtr := nil; + FRcvBufSize := 0; + FRcvdCnt := 0; + end; + inherited TriggerSessionClosed(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + X X X X X X X X X + X X X X X X X X X + X X X X X X X + X X X X X X X + X X X X X + X X X X X X X X + X X X X X X X X X + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSyncWSocket.InternalDataAvailable( + Sender : TObject; + Error : Word); +var + Len : Integer; +begin + SetLength(FLinePointer^, FLineLength); + Len := Receive(@FLinePointer^[1], FLineLength); + if Len <= 0 then + FLinePointer^ := '' + else + SetLength(FLinePointer^, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSyncWSocket.WaitUntilReady(var DoneFlag : Boolean) : Integer; +begin + Result := 0; { Suppose success } + FTimeStop := Integer(GetTickCount) + FTimeout; + while TRUE do begin + if DoneFlag then begin + Result := 0; + break; + end; + + if ((FTimeout > 0) and (Integer(GetTickCount) > FTimeStop)) or +{$IFNDEF NOFORMS} + Application.Terminated or +{$ENDIF} + FTerminated then begin + { Application is terminated or timeout occured } + Result := WSA_WSOCKET_TIMEOUT; + break; + end; + MessagePump; +{$IFNDEF VER80} + { Do not use 100% CPU, but slow down transfert on high speed LAN } + Sleep(0); +{$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSyncWSocket.Synchronize( + Proc : TWSocketSyncNextProc; + var DoneFlag : Boolean) : Integer; +begin + DoneFlag := FALSE; + if Assigned(Proc) then + Proc; + Result := WaitUntilReady(DoneFlag); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSyncWSocket.ReadLine( + Timeout : Integer; { seconds if positive, milli-seconds if negative } + var Buffer : String); +var + OldDataAvailable : TDataAvailable; + OldLineMode : Boolean; + Status : Integer; +begin + Buffer := ''; + if FState <> wsConnected then begin + RaiseException('ReadLine failed: not connected'); + Exit; + end; + + { Positive timeout means seconds. Negative means milli-seconds } + { Null means 60 seconds. } + if TimeOut = 0 then + FTimeOut := 60000 + else if TimeOut > 0 then + FTimeOut := Timeout * 1000 + else + FTimeOut := -Timeout; + + FLineReceivedFlag := FALSE; + FLinePointer := @Buffer; + { Save existing OnDataAvailable handler and install our own } + OldDataAvailable := FOnDataAvailable; + FOnDataAvailable := InternalDataAvailable; + { Save existing line mode and turn it on } + OldLineMode := FLineMode; + FLineMode := TRUE; + try + Status := Synchronize(nil, FLineReceivedFlag); + if Status = WSA_WSOCKET_TIMEOUT then begin + { Sender didn't send line end within allowed time. Get all } + { data available so far. } + if FRcvdCnt > 0 then begin + SetLength(Buffer, FRcvdCnt); + Move(FRcvdPtr^, Buffer[1], FRcvdCnt); + FRcvdCnt := 0; + end; + end; + { Should I raise an exception to tell the application that } + { some error occured ? } + finally + FOnDataAvailable := OldDataAvailable; + FLineMode := OldLineMode; + end; +end; + + +{$IFDEF VER80} +begin + IPList := TStringList.Create; + { + Delphi 1 has no finalization. When your application terminates, you + should add a call to WSocketUnloadWinsock to unload winsock from memory. + It is done automatically for you when the last TWSocket component is + destroyed but if you do any winsock call after that, you must call + WSocketUnloadWinsock yourself. It is safe to call WSocketUnloadWinsock + even if it has already been done. + } +{$ELSE} +initialization + IPList := TStringList.Create; + +finalization + if Assigned(IPList) then begin + IPList.Destroy; + IPList := nil; + end; + WSocketUnloadWinsock; + +{$ENDIF} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/WSocketE.dcu b/lib/Delphi/Vc32/WSocketE.dcu new file mode 100644 index 00000000..9e9b4abe Binary files /dev/null and b/lib/Delphi/Vc32/WSocketE.dcu differ diff --git a/lib/Delphi/Vc32/WSocketE.pas b/lib/Delphi/Vc32/WSocketE.pas new file mode 100644 index 00000000..9e69b50b --- /dev/null +++ b/lib/Delphi/Vc32/WSocketE.pas @@ -0,0 +1,172 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TWSocket class encapsulate the Windows Socket paradigm +Creation: Feb 24, 2002 +Version: 1.00 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Feb 24, 2002 V1.00 Wilfried Mestdagh created a + property editor for LineEnd property. I moved his code ti this + new unit so that it is compatible with Delphi 6. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WSocketE; + +interface + +uses + WinTypes, WinProcs, Classes, +{$IFNDEF VER80} { Delphi 1 } +{$IFNDEF VER90} { Delphi 2 } +{$IFNDEF VER100} { Delphi 3 } +{$IFNDEF VER120} { Delphi 4 } +{$IFNDEF VER130} { Delphi 5 } +{$IFNDEF VER140} { Delphi 6 and Bcb 6} +{$IFNDEF VER93} { Bcb 1 } +{$IFNDEF VER110} { Bcb 3 } +{$IFNDEF VER125} { Bcb 4 } +{$IFNDEF VER135} { Bcb 5 } +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} + +{$IFDEF VER140} + { Delphi 6: Add $(DELPHI)\Source\ToolsAPI to your library path } + { and add designide.dcp to ICS package. } + DesignIntf, DesignEditors, +{$ELSE} +{$IFDEF VER150} + { Delphi 7: Add $(DELPHI)\Source\ToolsAPI to your library path } + { and add designide.dcp to ICS package. } + DesignIntf, DesignEditors, +{$ELSE} + DsgnIntf, +{$ENDIF} +{$ENDIF} + SysUtils; + +type + TWSocketLineEndProperty = class(TStringProperty) + public + function GetLineEnd(const Value: String): String; + function SetLineEnd(const Value: String): String; + function GetValue: String; override; + procedure SetValue(const Value: String); override; + end; + +procedure Register; + +implementation + +uses + WSocket; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TWSocket]); + RegisterPropertyEditor(TypeInfo(string), TWSocket, 'LineEnd', + TWSocketLineEndProperty); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ LineEnd Property Editor } +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TWSocketLineEndProperty.SetLineEnd(const Value: String): String; +var + Offset : Integer; + C : Char; +begin + if Pos('#', Value) = 0 then + raise Exception.Create('Invalid value'); + + Offset := 1; + Result := ''; + repeat + if Value[Offset] <> '#' then + break; + + Inc(Offset); + C := #0; + while (Offset <= Length(Value)) and + (Value[Offset] in ['0'..'9']) do begin + C := Char(Ord(C) * 10 + Ord(Value[Offset]) - Ord('0')); + Inc(Offset); + end; + + Result := Result + C; + until Offset > Length(Value); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TWSocketLineEndProperty.GetLineEnd(const Value: String): String; +var + N: integer; +begin + Result := ''; + for N := 1 to Length(Value) do + Result := Result + '#' + IntToStr(Ord(Value[N])); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TWSocketLineEndProperty.GetValue: String; +begin + Result := GetLineEnd(inherited GetValue); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWSocketLineEndProperty.SetValue(const Value: String); +begin + inherited SetValue(SetLineEnd(Value)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/Delphi/Vc32/WSocketS.dcr b/lib/Delphi/Vc32/WSocketS.dcr new file mode 100644 index 00000000..645f59f0 Binary files /dev/null and b/lib/Delphi/Vc32/WSocketS.dcr differ diff --git a/lib/Delphi/Vc32/WSocketS.dcu b/lib/Delphi/Vc32/WSocketS.dcu new file mode 100644 index 00000000..d9d5ab4a Binary files /dev/null and b/lib/Delphi/Vc32/WSocketS.dcu differ diff --git a/lib/Delphi/Vc32/WSocketS.pas b/lib/Delphi/Vc32/WSocketS.pas new file mode 100644 index 00000000..b07adabf --- /dev/null +++ b/lib/Delphi/Vc32/WSocketS.pas @@ -0,0 +1,456 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: A TWSocket that has server functions: it listen to connections + an create other TWSocket to handle connection for each client. +Creation: Aug 29, 1999 +Version: 1.07 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Quick reference guide: +TWSocketServer will normally be used to listen on a given tcp port. When a +client connect, it will instanciate a new TWSocketClient component to handle +communication with client. Normally you will derive your own component from +TWSocketClient to add private data and methods to handle it. You tell +TWSocketServer which component it has to instanciate using ClientClass +property. You have to initialize instances from OnClientConnect event handler. +TWSocketServer maintain a list of connected clients. You can access it using +Client[] indexed property and ClientCount property. + +History: +Sep 05, 1999 V1.01 Adpted for Delphi 1 +Oct 09, 1999 V1.02 Added intermediate class TCustomWSocket +Nov 12, 1999 V1.03 Added OnClientCreate event just after client component has + been created. +Apr 02, 2000 V1.04 Added FSessionClosedFlag to avoid double SessionClosed + event triggering +Apr 13, 2002 V1.05 When sending banner to client, add LineEnd instead of CR/LF + as suggested by David Aguirre Grazio +Sep 13, 2002 V1.06 Check if Assigned(Server) in TriggerSessionClosed. + Reported by Matthew Meadows +Sep 16, 2002 V1.07 Fixed a Delphi 1 issue in TriggerSessionClosed where + property was used in place of field variable. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WSocketS; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, Winsock; + +const + WSocketServerVersion = 107; + CopyRight : String = ' TWSocketServer (c) 1999-2002 F. Piette V1.07 '; + WM_CLIENT_CLOSED = WM_USER + 30; + DefaultBanner = 'Welcome to TcpSrv'; + +type + TCustomWSocketServer = class; + TWSocketClient = class; + TWSocketClientClass = class of TWSocketClient; + + TWSocketClientCreateEvent = procedure (Sender : TObject; + Client : TWSocketClient) of object; + + TWSocketClientConnectEvent = procedure (Sender : TObject; + Client : TWSocketClient; + Error : Word) of object; + + { TWSocketClient is used to handle all client connections. } + { Altough you may use it directly, you'll probably wants to use your } + { own derived component to add data and methods suited to your } + { application. } + { If you use a derived component, then assign it's class to } + { TWSocketServer ClientClass property. } + TWSocketClient = class(TWSocket) + protected + FBanner : String; + FServer : TCustomWSocketServer; + FPeerAddr : String; + FPeerPort : String; + FSessionClosedFlag : Boolean; + public + procedure StartConnection; virtual; + procedure TriggerSessionClosed(Error : Word); override; + procedure Dup(newHSocket : TSocket); override; + function GetPeerAddr: String; override; + function GetPeerPort: String; override; + property Server : TCustomWSocketServer read FServer + write FServer; + published + property Banner : String read FBanner + write FBanner; + end; + + { TWSocketServer is made for listening for tcp client connections. } + { For each connection, it instanciate a new TWSocketClient (or derived) } + { to handle connection. Use ClientClass to specify your derived. } + TCustomWSocketServer = class(TWSocket) + protected + FBanner : String; + FBannerToBusy : String; + FClientClass : TWSocketClientClass; + FClientList : TList; + FClientNum : LongInt; + FMaxClients : LongInt; + FOnClientCreate : TWSocketClientCreateEvent; + FOnClientConnect : TWSocketClientConnectEvent; + FOnClientDisconnect : TWSocketClientConnectEvent; + procedure WndProc(var MsgRec: TMessage); override; + procedure Notification(AComponent: TComponent; operation: TOperation); override; + procedure TriggerSessionAvailable(Error : Word); override; + procedure TriggerClientCreate(Client : TWSocketClient); virtual; + procedure TriggerClientConnect(Client : TWSocketClient; Error : Word); virtual; + procedure TriggerClientDisconnect(Client : TWSocketClient; Error : Word); virtual; + function GetClientCount : Integer; virtual; + function GetClient(nIndex : Integer) : TWSocketClient; virtual; + procedure WMClientClosed(var msg: TMessage); + message WM_CLIENT_CLOSED; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + { Check if a given object is one of our clients } + function IsClient(SomeThing : TObject) : Boolean; + protected + { TWSocketClient derived class to instanciate for each client } + property ClientClass : TWSocketClientClass + read FClientClass + write FClientClass; + { How many active clients we currently have } + property ClientCount : Integer read GetClientCount; + { Client[] give direct access to anyone of our clients } + property Client[nIndex : Integer] : TWSocketClient + read GetClient; + published + { Banner sent to client as welcome message. Can be empty. } + property Banner : String read FBanner + write FBanner; + property BannerToBusy : String read FBannerToBusy + write FBannerToBusy; + property MaxClients : LongInt read FMaxClients + write FMaxClients; + { Triggered when a client disconnect } + property OnClientDisconnect : TWSocketClientConnectEvent + read FOnClientDisconnect + write FOnClientDisconnect; + { Triggerred when a new client is connecting } + property OnClientConnect : TWSocketClientConnectEvent + read FOnClientConnect + write FOnClientConnect; + { Triggerred when a new client component has been created } + property OnClientCreate : TWSocketClientCreateEvent + read FOnClientCreate + write FOnClientCreate; + end; + + TWSocketServer = class(TCustomWSocketServer) + public + property ClientClass; + property ClientCount; + property Client; + published + property Banner; + property BannerToBusy; + property MaxClients; + property OnClientDisconnect; + property OnClientConnect; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TWSocketServer]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomWSocketServer.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FClientList := TList.Create; + FClientClass := TWSocketClient; + FBanner := DefaultBanner; + FBannerToBusy := 'Sorry, too many clients'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomWSocketServer.Destroy; +var + I : Integer; +begin + if Assigned(FClientList) then begin + { We need to destroy all clients } + for I := FClientList.Count - 1 downto 0 do begin + try + TWSocketClient(FClientList.Items[I]).Destroy; + except + { Ignore any exception here } + end; + end; + { Then we can destroy client list } + FClientList.Free; + FClientList := nil; + end; + { And finally destroy ourself } + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Message handler } +procedure TCustomWSocketServer.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + if Msg = WM_CLIENT_CLOSED then begin + { We *MUST* handle all exception to avoid application shutdown } + try + WMClientClosed(MsgRec) + except + on E:Exception do + HandleBackGroundException(E); + end; + end + else + inherited WndProc(MsgRec); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Called by destructor when child component (a clients) is create or } +{ destroyed. } +procedure TCustomWSocketServer.Notification( + AComponent : TComponent; + Operation : TOperation); +begin + inherited Notification(AComponent, Operation); + if Assigned(FClientList) and (AComponent is TWSocketClient) then begin + if Operation = opInsert then + { A new client has been created, add it to our list } + FClientList.Add(AComponent) + else if Operation = opRemove then + { If one of our client has been destroyed, remove it from our list } + FClientList.Remove(AComponent); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Called when a session is available, that is when a client is connecting } +procedure TCustomWSocketServer.TriggerSessionAvailable(Error : Word); +var + Client : TWSocketClient; +begin + { Call parent event handler } + inherited TriggerSessionAvailable(Error); + { In case of error, do nothing } + if Error <> 0 then + Exit; + + Inc(FClientNum); + Client := FClientClass.Create(Self); + TriggerClientCreate(Client); + Client.Name := Name + 'Client' + IntToStr(FClientNum); + Client.Banner := FBanner; + Client.Server := Self; + Client.HSocket := Accept; + TriggerClientConnect(Client, Error); + { The event handler may have destroyed the client ! } + if FClientList.IndexOf(Client) < 0 then + Exit; + { The event handler may have closed the connection } + if Client.State <> wsConnected then + Exit; + { Ok, the client is still there, process with the connection } + if (FMaxClients > 0) and (FMaxClients < ClientCount) then begin + { Sorry, toomuch clients } + Client.Banner := FBannerToBusy; + Client.StartConnection; + Client.Close; + end + else + Client.StartConnection; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocketServer.TriggerClientConnect( + Client : TWSocketClient; Error : Word); +begin + if Assigned(FOnClientConnect) then + FOnClientConnect(Self, Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocketServer.TriggerClientCreate(Client : TWSocketClient); +begin + if Assigned(FOnClientCreate) then + FOnClientCreate(Self, Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocketServer.TriggerClientDisconnect( + Client : TWSocketClient; Error : Word); +begin + if Assigned(FOnClientDisconnect) then + FOnClientDisconnect(Self, Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ get number of connect clients } +function TCustomWSocketServer.GetClientCount : Integer; +begin + if Assigned(FClientList) then + Result := FClientList.Count + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Acces method to return a client by index. } +{ Return nil if index is out of range. } +function TCustomWSocketServer.GetClient(nIndex : Integer) : TWSocketClient; +begin + if not Assigned(FClientList) then begin + Result := nil; + Exit; + end; + if (nIndex < 0) or (nIndex >= FClientList.Count) then begin + Result := nil; + Exit; + end; + Result := TWSocketClient(FClientList.Items[nIndex]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Client has closed. Remove it from client list and destroy component. } +procedure TCustomWSocketServer.WMClientClosed(var msg: TMessage); +var + Client : TWSocketClient; +begin + Client := TWSocketClient(Msg.LParam); + try + TriggerClientDisconnect(Client, Error); + finally + { Calling Destroy will automatically remove client from list because } + { we installed a notification handler. } + Client.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check if a given object is one of our clients. } +function TCustomWSocketServer.IsClient(SomeThing : TObject) : Boolean; +begin + if not Assigned(FClientList) then + Result := FALSE + else + Result := (FClientList.IndexOf(Pointer(SomeThing)) >= 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* *} +{* TWSocketClient *} +{* *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWSocketClient.StartConnection; +begin + if Length(FBanner) > 0 then + SendStr(FBanner + FLineEnd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Triggered when socket is closed. Need to inform server socket to update } +{ client list and trigger client disconnect event. } +procedure TWSocketClient.TriggerSessionClosed(Error : Word); +begin + if not FSessionClosedFlag then begin + FSessionClosedFlag := TRUE; + if Assigned(FServer) then + PostMessage(Server.Handle, WM_CLIENT_CLOSED, 0, LongInt(Self)); + inherited TriggerSessionClosed(Error); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This override base class GetPeerAddr. It return cached value. } +function TWSocketClient.GetPeerAddr: String; +begin + Result := FPeerAddr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This override base class GetPeerPort. It return cached value. } +function TWSocketClient.GetPeerPort: String; +begin + Result := FPeerPort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Override base class. Dup is called when a client is assigned to a } +{ TWSocket. Assigning HSocket property will call Dup. } +procedure TWSocketClient.Dup(newHSocket : TSocket); +begin + inherited Dup(newHSocket); + { Cache PeerAddr value } + FPeerAddr := inherited GetPeerAddr; + FPeerPort := inherited GetPeerPort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/emulvt.dcr b/lib/Delphi/Vc32/emulvt.dcr new file mode 100644 index 00000000..ffa22ae4 Binary files /dev/null and b/lib/Delphi/Vc32/emulvt.dcr differ diff --git a/lib/Delphi/Vc32/fingcli.dcr b/lib/Delphi/Vc32/fingcli.dcr new file mode 100644 index 00000000..05ee5530 Binary files /dev/null and b/lib/Delphi/Vc32/fingcli.dcr differ diff --git a/lib/Delphi/Vc32/formpos.dcu b/lib/Delphi/Vc32/formpos.dcu new file mode 100644 index 00000000..1a223956 Binary files /dev/null and b/lib/Delphi/Vc32/formpos.dcu differ diff --git a/lib/Delphi/Vc32/formpos.pas b/lib/Delphi/Vc32/formpos.pas new file mode 100644 index 00000000..91544e92 --- /dev/null +++ b/lib/Delphi/Vc32/formpos.pas @@ -0,0 +1,167 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FormPos; + +interface + +uses + Forms, IniFiles, SysUtils, Dialogs, WinTypes, WinProcs; + +Procedure LoadFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName: string); +Procedure SaveFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName: string); + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Gnre un chane du genre 'Left, Top, Height, Width, WindowState' *} +{* en vue de la placer dans un section d'un fichier INI *} +function WindowPosToStr(Form : TForm; iWindowState : integer) : string; +begin + Result := IntToStr(Form.Left) + ', ' + + IntToStr(Form.Top) + ', ' + + IntToStr(Form.Height) + ', ' + + IntToStr(Form.Width) + ', ' + + IntToStr(iWindowState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Recoit un string sous forme '100, 200, 300, 500, 0' et affecte *} +{* respectivement ces valeurs a Form.LEFT, Form.Top, Form.Heigt, *} +{* Form.Width, Form.WindowState *} +procedure StrToWindowPos(sBuffer : string; Form : TForm); +var + ilen, i, k : integer; + sDst : string; +begin + ilen := length(sBuffer); + k := 0; + sDst := ''; + + {i = indice ds sBuffer; j = Indice ds sDst; k = nbre d'occurences trouvs } + for i := 1 to ilen + 1 do begin + if (i > ilen) or (sBuffer[i] = ',') then begin + k := k + 1; + case k of + 1: Form.Left := StrToInt(sDst); + 2: Form.Top := StrToInt(sDst); + 3: Form.Height := StrToInt(sDst); + 4: Form.Width := StrToInt(sDst); + 5: Form.WindowState := TWindowState(StrToInt(sDst)); + else + break; + end; + sDst := ''; + end + else + sDst := sDst + sBuffer[i]; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure LoadFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName : string); +var + IniFile: TIniFile; + sWindowPositions : string; +begin + if Length(IniFileName) = 0 then + Exit; + + { Create inifile object => Open ini file } + IniFile := TIniFile.Create(IniFilename); + + {Formatage par dfaut de la ligne de la section window} + sWindowPositions := WindowPosToStr(Form, ord(Form.WindowState)); + + { Get widow's position and size from ini file } + sWindowPositions := IniFile.ReadString(SectionName, + KeyName, + sWindowPositions); + StrToWindowPos(sWindowPositions, Form); + + + { Destroy inifile object => close ini file } + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure SaveFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName : string); +var + IniFile : TIniFile; + iWindowState : integer; +begin + if Length(IniFileName) = 0 then + Exit; + + { Create inifile object => Open ini file } + IniFile := TIniFile.Create(IniFilename); + + iWindowState := ord(Form.WindowState); + + { If window minimized or maximized, restore to normal state } + if Form.WindowState <> wsNormal then + Form.WindowState := wsNormal; + + { Save the window's postion and size to the ini file } + IniFile.WriteString(SectionName, + KeyName, + WindowPosToStr(Form, iWindowState)); + + { Destroy inifile object => close ini file } + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/ftpcli.dcr b/lib/Delphi/Vc32/ftpcli.dcr new file mode 100644 index 00000000..e577474f Binary files /dev/null and b/lib/Delphi/Vc32/ftpcli.dcr differ diff --git a/lib/Delphi/Vc32/ftpsrv.dcr b/lib/Delphi/Vc32/ftpsrv.dcr new file mode 100644 index 00000000..ad818441 Binary files /dev/null and b/lib/Delphi/Vc32/ftpsrv.dcr differ diff --git a/lib/Delphi/Vc32/ftpsrv.dcu b/lib/Delphi/Vc32/ftpsrv.dcu new file mode 100644 index 00000000..181d0087 Binary files /dev/null and b/lib/Delphi/Vc32/ftpsrv.dcu differ diff --git a/lib/Delphi/Vc32/ftpsrv.pas b/lib/Delphi/Vc32/ftpsrv.pas new file mode 100644 index 00000000..b050b24b --- /dev/null +++ b/lib/Delphi/Vc32/ftpsrv.pas @@ -0,0 +1,3360 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TFtpServer class encapsulate the FTP protocol (server side) + See RFC-959 for a complete protocol description. +Creation: April 21, 1998 +Version: 1.24 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Apr 29, 1998 V0.90 released for beta testing. +May 01, 1998 V0.92 Adapted for Delphi 1.0 +May 03, 1998 V0.93 Adapted for Delphi 2.0 and C++Builder +May 04, 1998 V0.94 Use '/' or '\' as path delimiter. Expose only '/' to the + outside. Stripped any telnet options (IE send two !). Handled + absolute path. Implemented SIZE and REST commands. + Added support for UNC (not finished !) +May 06, 1998 V0.95 Corrected spurious 226 message on PASV mode STOR. + Made GetInteger retunrs a LongInt. + Use a LongInt for N in CommandPORT (needed for 16 bits) + Added slash substitution in BuildFilePath command. +Jul 09, 1998 V1.00 Adapted for Delphi 4, removed beta status. +Jul 21, 1998 V1.01 Added OnValidateDele event + Changed function to get file size (do not open the file) +Feb 14, 1999 V1.02 Replaced straight winsock call by indirect calls thru + wsocket (this provide runtime link to winsock DLL). +Mar 06, 1999 V1.03 Added code from Plegge, Steve to add + APPE, XMKD, KRMD and STRU commands support. +Jul 24, 1999 V1.04 Replaced msgStorDisabled value from '500 Cannot STOR.' to + '501 Permission Denied' because CuteFTP doesn't like error 500. + Suggested by Cedric Veilleux . +Aug 20, 1999 V1.05 Added compile time options. Revised for BCB4. + Added Addr property to select interface in multihomed computers. +Oct 02, 1999 V1.06 Added OnValidateRnFr and OnValidateRnTo events. + Initialized Allowed variable to TRUE before triggerValidateDele. +Nov 24, 1999 V1.07 Added MTDM support. Thanks to Bruce Christensen + for his code. +Jan 24, 2000 V1.08 Patch IE5 bug in file names. Thanks to +Jun 08, 2000 V1.09 Added 'A N' type for type command for AIX systems. +Oct 25, 2000 V1.10 Exposed list of clients thru Client[] property. +Oct 29, 2000 V1.11 Added IsClient() method. + Implemented OnValidateRmd event. +Nov 01, 2000 V1.12 Implemented proposals from Carl@Smotricz.com: + (1) support for MODE command, but only the default do-nothing + option S. (2) binding the data socket to the local host address + and port 20 ('ftp-data'). (3) detection of failure to open the + data connection for STOR or RETR. + Added option wsoNoReceiveLoop to sockets. See comments in TWSocket + about this option. Help in very fast LAN. +Nov 11, 2000 V1.13 Checked for DOS attack. Close connection when buffer + overflow occured. Thanks to Lester for finding + this security hole. +Jun 18, 2001 V1.14 Fixed file left open when storing and client broken data + connection. Thanks to Davie +Jul 27, 2001 V1.15 I fixed a race condition between WMFtpSrvClientClosed and + WMFtpSrvCloseData found by Matthew Comb who + worked with Davie . Now WMFtpSrvCloseData + receive Client in LParam and check if client is still in client + list. + Fixed a but with resumed put. Thanks Yvan Turkan iturcan@gamo.sk ! + Added a procedure to disconnect a single client. + Changed all Exception by FtpServerException. + Changed all "Error" by "AError" to avoid conflict with global var. + Added Client.ID property to uniquely indentify the client. Pass + this ID along with all posted messages and verify if the correct + client still exists when message is processed. +Jul 30, 2001 V1.16 Added same check as above for WMFtpSrvCloseData. +Sep 09, 2001 V1.17 Eric Pascual added Store Unique (STOU) + command. +Feb 26, 2002 V1.18 Fastream Technologies (http://www.fastream.com) found a bug + in Disconnect and DisconnectAll which prevented data connection + to be closed and client component to be destroyed. +Jul 06, 2002 V1.19 Fastream Technologies (http://www.fastream.com) fixed + CommandXPWD and CommandPWD to make the path in answer as + "/c:/windows" instead of "c:/windows" which is more compatible + with the UNIX standard that most clients expect. +Sep 16, 2002 V1.20 Added OnValidateSize event. + Allowed "REST 0" as a valid command. +Sep 17, 2002 V1.21 Sven Schmidts added partional FEAT + command, must extended, because I doesn't know what commands are + special-featured. +Oct 26, 2002 V1.22 Introduced OnBuildFilePath to allow component use to change + the file path on the fly. + Thanks to Serge Chelli who proposed + this change. +Nov 01, 2002 V1.23 When client request passive mode, select a port from a + range of ports instead of letting the OS choose one. This ease the + use of a FTP server behind a firewall. Passive mode transferts + will use port in the specified range. + Also implemented fixed IP for passive mode. + Thanks to Ian Tuck for code base. +Nov 06, 2002 V1.24 Added definition for PBoolean which is missing in some + older Delphi version and in BCB. +Nov 11, 2002 V1.25 Revised for Delphi 1 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpSrv; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER130} { C++ Builder V5.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER140} { C++ Builder V6.0 } + {$ObjExportAll On} +{$ENDIF} + +{$DEFINE BIND_FTP_DATA} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, Winsock, WSocket, FtpSrvC, FtpSrvT; + +const + FtpServerVersion = 125; + CopyRight : String = ' TFtpServer (c) 1998-2002 F. Piette V1.25 '; + WM_FTPSRV_CLOSE_REQUEST = WM_USER + 1; + WM_FTPSRV_CLIENT_CLOSED = WM_USER + 2; + WM_FTPSRV_ABORT_TRANSFER = WM_USER + 3; + WM_FTPSRV_CLOSE_DATA = WM_USER + 4; + WM_FTPSRV_START_SEND = WM_USER + 5; + +type + PBoolean = ^Boolean; + FtpServerException = class(Exception); +{ Various Delphi and C++Builder version handle string parameter passed as var } +{ differently. To get application code compatible across all versions, we } +{ need to define our own string type. We use the larger we can with the given } +{ compiler version. btw: the 255 limit is not a problem because it applies to } +{ the command lines sent to the server and 255 should be enough except if } +{ you use incredibly long file names. } +{$IFDEF VER100} { Delphi 3 } + TFtpString = String; +{$ELSE} { All others } + TFtpString = String[255]; +{$ENDIF} +{$IFDEF VER80} + WPARAM = WORD; + LPARAM = DWORD; +{$ENDIF} + TFtpCtrlSocketClass = class of TFtpCtrlSocket; + TFtpSrvAuthenticateEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + UserName : TFtpString; + Password : TFtpString; + var Authenticated : Boolean) of object; + TFtpSrvChangeDirectoryEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + Directory : TFtpString; + var Allowed : Boolean) of object; + TFtpSrvBuildDirectoryEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var Directory : TFtpString; + Detailed : Boolean) of object; + TFtpSrvClientConnectEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + AError : Word) of object; + TFtpSrvDataSessionConnectedEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word) of object; + TFtpSrvClientCommandEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString) of object; + TFtpSrvAnswerToClientEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var Answer : TFtpString) of object; + TFtpSrvValidateXferEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean) of object; + TFtpSrvBuildFilePathEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + const Directory : String; + const FileName : String; + var NewFileName : String) of object; + TFtpSrvDataAvailableEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + Data : TWSocket; + Buf : PChar; + Len : LongInt; + AError : Word) of object; + TFtpSrvRetrDataSentEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word) of object; + TFtpSrvGetUniqueFileNameEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var FileName : TFtpString) of object; + TFtpSrvGetProcessingEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var DelayedSend : Boolean) of object; + TFtpSrvCommandProc = procedure (Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString) of object; + TFtpSrvCommandTableItem = record + KeyWord : String; + Proc : TFtpSrvCommandProc; + end; + TFtpServer = class(TComponent) + protected + FAddr : String; + FPort : String; + FBanner : String; + FServSocket : TWSocket; + FWindowHandle : HWND; + FClientClass : TFtpCtrlSocketClass; + FClientList : TList; + FClientNum : LongInt; + FMaxClients : LongInt; + FCmdTable : array [0..32] of TFtpSrvCommandTableItem; + FLastCmd : Integer; + FUserData : LongInt; { Reserved for component user } + FPasvPortRangeStart : Integer; + FPasvPortRangeSize : Integer; + FPasvPortTable : PBoolean; + FPasvPortTableSize : Integer; + FPasvIpAddr : String; + FOnStart : TNotifyEvent; + FOnStop : TNotifyEvent; + FOnAuthenticate : TFtpSrvAuthenticateEvent; + FOnClientConnect : TFtpSrvClientConnectEvent; + FOnClientDisconnect : TFtpSrvClientConnectEvent; + FOnClientCommand : TFtpSrvClientCommandEvent; + FOnAnswerToClient : TFtpSrvAnswerToClientEvent; + FOnChangeDirectory : TFtpSrvChangeDirectoryEvent; + FOnMakeDirectory : TFtpSrvChangeDirectoryEvent; + FOnBuildDirectory : TFtpSrvBuildDirectoryEvent; + FOnAlterDirectory : TFtpSrvBuildDirectoryEvent; + FOnValidatePut : TFtpSrvValidateXferEvent; + FOnValidateSize : TFtpSrvValidateXferEvent; + FOnValidateDele : TFtpSrvValidateXferEvent; + FOnValidateRmd : TFtpSrvValidateXferEvent; + FOnValidateRnFr : TFtpSrvValidateXferEvent; + FOnValidateRnTo : TFtpSrvValidateXferEvent; + FOnStorSessionConnected : TFtpSrvDataSessionConnectedEvent; + FOnStorSessionClosed : TFtpSrvDataSessionConnectedEvent; + FOnStorDataAvailable : TFtpSrvDataAvailableEvent; + FOnValidateGet : TFtpSrvValidateXferEvent; + FOnRetrSessionConnected : TFtpSrvDataSessionConnectedEvent; + FOnRetrSessionClosed : TFtpSrvDataSessionConnectedEvent; + FOnRetrDataSent : TFtpSrvRetrDataSentEvent; + FOnGetUniqueFileName : TFtpSrvGetUniqueFileNameEvent ; + FOnGetProcessing : TFtpSrvGetProcessingEvent; + FOnBuildFilePath : TFtpSrvBuildFilePathEvent; { serge le 5/10/2002 } + procedure Notification(AComponent: TComponent; operation: TOperation); override; + procedure ServSocketSessionAvailable(Sender : TObject; AError : Word); + procedure ServSocketStateChange(Sender : TObject; OldState, NewState : TSocketState); + procedure ClientSessionClosed(Sender : TObject; AError : Word); + procedure ClientDataSent(Sender : TObject; AError : Word); + procedure ClientCommand(Sender : TObject; CmdBuf : PChar; CmdLen : Integer); + procedure ClientPassiveSessionAvailable(Sender : TObject; AError : Word); + procedure ClientStorSessionConnected(Sender : TObject; AError : Word); + procedure ClientStorSessionClosed(Sender : TObject; AError : Word); + procedure ClientStorDataAvailable(Sender: TObject; AError : word); + procedure ClientRetrSessionConnected(Sender : TObject; AError : Word); + procedure ClientRetrSessionClosed(Sender : TObject; AError : Word); + procedure ClientRetrDataSent(Sender : TObject; AError : Word); + procedure SendAnswer(Client : TFtpCtrlSocket; Answer : TFtpString); + procedure SendNextDataChunk(Client : TFtpCtrlSocket; Data : TWSocket); + procedure StartSendData(Client : TFtpCtrlSocket); + procedure BuildDirectory(Client : TFtpCtrlSocket; var Params : TFtpString; Stream : TStream; Detailed : Boolean); + procedure TriggerServerStart; virtual; + procedure TriggerServerStop; virtual; + procedure TriggerAuthenticate(Client : TFtpCtrlSocket; + UserName : String; + PassWord : String; + var Authenticated : Boolean); virtual; + procedure TriggerChangeDirectory(Client : TFtpCtrlSocket; + Directory : String; + var Allowed : Boolean); virtual; + procedure TriggerMakeDirectory(Client : TFtpCtrlSocket; + Directory : String; + var Allowed : Boolean); virtual; + procedure TriggerBuildDirectory(Client : TFtpCtrlSocket; + var Params : TFtpString; + Detailed : Boolean); + procedure TriggerAlterDirectory(Client : TFtpCtrlSocket; + var Params : TFtpString; + Detailed : Boolean); + procedure TriggerSendAnswer(Client : TFtpCtrlSocket; + var Answer : TFtpString); virtual; + procedure TriggerClientConnect(Client : TFtpCtrlSocket; AError : Word); virtual; + procedure TriggerClientDisconnect(Client : TFtpCtrlSocket; AError : Word); virtual; + procedure TriggerClientCommand(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure TriggerStorSessionConnected(Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); virtual; + procedure TriggerStorSessionClosed(Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); virtual; + procedure TriggerValidatePut(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerValidateSize(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerValidateDele(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerValidateRmd(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerValidateRnFr(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerValidateRnTo(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerRetrSessionConnected(Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); virtual; + procedure TriggerRetrSessionClosed(Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); virtual; + procedure TriggerValidateGet(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerStorDataAvailable(Client : TFtpCtrlSocket; + Data : TWSocket; + Buf : PChar; + Len : LongInt; + AError : Word); virtual; + procedure TriggerRetrDataSent(Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); virtual; + procedure TriggerGetUniqueFileName(Client : TFtpCtrlSocket; + var FileName : TFtpString); virtual; + procedure TriggerBuildFilePath(Client : TFtpCtrlSocket; + const Directory : String; + const FileName : String; + var NewFileName : String); virtual; + function BuildFilePath(Client : TFtpCtrlSocket; + Directory : String; + FileName : String) : String; + function GetClientCount : Integer; virtual; + function GetClient(nIndex : Integer) : TFtpCtrlSocket; virtual; +{ !!!!!!!!!!!!!!!! NGB: Added next two lines } + procedure FreeCurrentPasvPort(DataSocket : TFtpCtrlSocket); + function GetNextAvailablePasvPort : String; +{ !!!!!!!!!!!!!!!! NGB: Added last two lines } + function GetActive : Boolean; + procedure SetActive(newValue : Boolean); + procedure SetPasvPortRangeSize(const NewValue: Integer); + procedure SetPasvPortRangeStart(const NewValue: Integer); + procedure AddCommand(const Keyword : String; + const Proc : TFtpSrvCommandProc); virtual; + procedure WMFtpSrvCloseRequest(var msg: TMessage); + message WM_FTPSRV_CLOSE_REQUEST; + procedure WMFtpSrvClientClosed(var msg: TMessage); + message WM_FTPSRV_CLIENT_CLOSED; + procedure WMFtpSrvAbortTransfer(var msg: TMessage); + message WM_FTPSRV_ABORT_TRANSFER; + procedure WMFtpSrvCloseData(var msg: TMessage); + message WM_FTPSRV_CLOSE_DATA; + procedure WMFtpSrvStartSend(var msg: TMessage); + message WM_FTPSRV_START_SEND; + procedure CommandDirectory(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString; + Detailed : Boolean); + procedure CommandUSER(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandPASS(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandQUIT(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandNOOP(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandLIST(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandNLST(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandDELE(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandSIZE(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandREST(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandRNFR(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandRNTO(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandPORT(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandSTOR(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandRETR(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandTYPE(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandCWD (Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandChangeDir(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandMKD (Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandRMD (Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandCDUP(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandXPWD(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandPWD (Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandSYST(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandABOR(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandPASV(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandAPPE(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandSTRU(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandMDTM(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandMODE(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandOverflow(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandSTOU(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandFEAT(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Start; + procedure Stop; + procedure Disconnect(Client : TFtpCtrlSocket); + procedure DisconnectAll; + procedure DoStartSendData(Client: TFtpCtrlSocket); virtual; + procedure WndProc(var MsgRec: TMessage); + { Check if a given object is one of our clients } + function IsClient(SomeThing : TObject) : Boolean; + property ServSocket : TWSocket read FServSocket; + property Handle : HWND read FWindowHandle; + property ClientCount : Integer read GetClientCount; + property Active : Boolean read GetActive + write SetActive; + property ClientClass : TFtpCtrlSocketClass + read FClientClass + write FClientClass; + { Client[] give direct access to anyone of our clients } + property Client[nIndex : Integer] : TFtpCtrlSocket + read GetClient; + published + property Addr : String read FAddr + write FAddr; + property Port : String read FPort + write FPort; + property Banner : String read FBanner + write FBanner; + property UserData : LongInt read FUserData + write FUserData; + property MaxClients : LongInt read FMaxClients + write FMaxClients; + property PasvIpAddr : String read FPasvIpAddr + write FPasvIpAddr; + property PasvPortRangeStart : Integer read FPasvPortRangeStart + write SetPasvPortRangeStart; + property PasvPortRangeSize : Integer read FPasvPortRangeSize + write SetPasvPortRangeSize; + property OnStart : TNotifyEvent + read FOnStart + write FOnStart; + property OnStop : TNotifyEvent + read FOnStop + write FOnStop; + property OnAuthenticate : TFtpSrvAuthenticateEvent + read FOnAuthenticate + write FOnAuthenticate; + property OnClientDisconnect : TFtpSrvClientConnectEvent + read FOnClientDisconnect + write FOnClientDisconnect; + property OnClientConnect : TFtpSrvClientConnectEvent + read FOnClientConnect + write FOnClientConnect; + property OnClientCommand : TFtpSrvClientCommandEvent + read FOnClientCommand + write FOnClientCommand; + property OnAnswerToClient : TFtpSrvAnswerToClientEvent + read FOnAnswerToClient + write FOnAnswerToClient; + property OnChangeDirectory : TFtpSrvChangeDirectoryEvent + read FOnChangeDirectory + write FOnChangeDirectory; + property OnMakeDirectory : TFtpSrvChangeDirectoryEvent + read FOnMakeDirectory + write FOnMakeDirectory; + property OnBuildDirectory : TFtpSrvBuildDirectoryEvent + read FOnBuildDirectory + write FOnBuildDirectory; + property OnAlterDirectory : TFtpSrvBuildDirectoryEvent + read FOnAlterDirectory + write FOnAlterDirectory; + property OnStorSessionConnected : TFtpSrvDataSessionConnectedEvent + read FOnStorSessionConnected + write FOnStorSessionConnected; + property OnRetrSessionConnected : TFtpSrvDataSessionConnectedEvent + read FOnRetrSessionConnected + write FOnRetrSessionConnected; + property OnStorSessionClosed : TFtpSrvDataSessionConnectedEvent + read FOnStorSessionClosed + write FOnStorSessionClosed; + property OnRetrSessionClosed : TFtpSrvDataSessionConnectedEvent + read FOnRetrSessionClosed + write FOnRetrSessionClosed; + property OnRetrDataSent : TFtpSrvRetrDataSentEvent + read FOnRetrDataSent + write FOnRetrDataSent; + property OnValidatePut : TFtpSrvValidateXferEvent + read FOnValidatePut + write FOnValidatePut; + property OnValidateSize : TFtpSrvValidateXferEvent + read FOnValidateSize + write FOnValidateSize; + property OnValidateDele : TFtpSrvValidateXferEvent + read FOnValidateDele + write FOnValidateDele; + property OnValidateRmd : TFtpSrvValidateXferEvent + read FOnValidateRmd + write FOnValidateRmd; + property OnValidateRnFr : TFtpSrvValidateXferEvent + read FOnValidateRnFr + write FOnValidateRnFr; + property OnValidateRnTo : TFtpSrvValidateXferEvent + read FOnValidateRnTo + write FOnValidateRnTo; + property OnValidateGet : TFtpSrvValidateXferEvent + read FOnValidateGet + write FOnValidateGet; + property OnStorDataAvailable : TFtpSrvDataAvailableEvent + read FOnStorDataAvailable + write FOnStorDataAvailable; + property OnGetUniqueFileName : TFtpSrvGetUniqueFileNameEvent + read FOnGetUniqueFileName + write FOnGetUniqueFileName ; + property OnGetProcessing : TFtpSrvGetProcessingEvent + read FOnGetProcessing + write FOnGetProcessing; + property OnBuildFilePath : TFtpSrvBuildFilePathEvent + read FOnBuildFilePath + write FOnBuildFilePath; + end; + +procedure Register; + +implementation + +const + msgDftBanner = '220 ICS FTP Server ready.'; + msgTooMuchClients = '421 Too many users connected.'; + msgCmdUnknown = '500 ''%s'': command not understood.'; + msgLoginFailed = '530 Login incorrect.'; + msgNotLogged = '530 Please login with USER and PASS.'; + msgNoUser = '503 Login with USER first.'; + msgLogged = '230 User %s logged in.'; + msgPassRequired = '331 Password required for %s.'; + msgCWDSuccess = '250 CWD command successful. "%s" is current directory.'; + msgCWDFailed = '501 CWD failed. %s'; + msgPWDSuccess = '257 "%s" is current directory.'; + msgQuit = '221 Goodbye.'; + msgPortSuccess = '200 Port command successful.'; + msgPortFailed = '501 Invalid PORT command.'; + msgStorDisabled = '501 Permission Denied'; {'500 Cannot STOR.';} + msgStorSuccess = '150 Opening data connection for %s.'; + msgStorFailed = '501 Cannot STOR. %s'; + msgStorAborted = '426 Connection closed; %s.'; + msgStorOk = '226 File received ok'; + msgStorError = '426 Connection closed; transfer aborted. Error #%d'; + msgRetrDisabled = '500 Cannot RETR.'; + msgRetrSuccess = '150 Opening data connection for %s.'; + msgRetrFailed = '501 Cannot RETR. %s'; + msgRetrAborted = '426 Connection closed; %s.'; + msgRetrOk = '226 File sent ok'; + msgRetrError = '426 Connection closed; transfer aborted. Error #%d'; + msgSystem = '215 UNIX Type: L8 Internet Component Suite'; + msgDirOpen = '150 Opening data connection for directory list.'; + msgDirFailed = '451 Failed: %s.'; + msgTypeOk = '200 Type set to %s.'; + msgTypeFailed = '500 ''TYPE %s'': command not understood.'; + msgDeleNotExists = '550 ''%s'': no such file or directory.'; + msgDeleOk = '250 File ''%s'' deleted.'; + msgDeleFailed = '450 File ''%s'' can''t be deleted.'; + msgDeleSyntax = '501 Syntax error in parameter.'; + msgDeleDisabled = '550 Cannot delete.'; + msgRnfrNotExists = '550 ''%s'': no such file or directory.'; + msgRnfrSyntax = '501 Syntax error is parameter.'; + msgRnfrOk = '350 File exists, ready for destination name.'; + msgRnFrDisabled = '500 Cannot RNFR.'; + msgRntoNotExists = '550 ''%s'': no such file or directory.'; + msgRntoAlready = '553 ''%s'': file already exists.'; + msgRntoOk = '250 File ''%s'' renamed to ''%s''.'; + msgRntoFailed = '450 File ''%s'' can''t be renamed.'; + msgRntoSyntax = '501 Syntax error in parameter.'; + msgRnToDisabled = '500 Cannot RNTO.'; + msgMkdOk = '257 ''%s'': directory created.'; + msgMkdAlready = '550 ''%s'': file or directory already exists.'; + msgMkdFailed = '550 ''%s'': can''t create directory.'; + msgMkdSyntax = '501 Syntax error in parameter.'; + msgRmdOk = '250 ''%s'': directory removed.'; + msgRmdNotExists = '550 ''%s'': no such directory.'; + msgRmdFailed = '550 ''%s'': can''t remove directory.'; + msgRmdDisabled = '500 Cannot remove directory.'; + msgRmdSyntax = '501 Syntax error in parameter.'; + msgNoopOk = '200 Ok. Parameter was ''%s''.'; + msgAborOk = '225 ABOR command successful.'; + msgPasvLocal = '227 Entering Passive Mode (127,0,0,1,%d,%d).'; + msgPasvRemote = '227 Entering Passive Mode (%d,%d,%d,%d,%d,%d).'; + msgPasvExcept = '500 PASV exception: ''%s''.'; + msgSizeOk = '213 %d'; + msgSizeDisabled = '501 Permission Denied'; + msgSizeFailed = '550 Command failed: %s.'; + msgSizeSyntax = '501 Syntax error in parameter.'; + msgRestOk = '350 REST supported. Ready to resume at byte offset %d.'; + msgRestZero = '501 Required byte offset parameter bad or missing.'; + msgRestFailed = '501 Syntax error in parameter: %s.'; + msgAppeFailed = '550 APPE failed.'; + msgAppeSuccess = '150 Opening data connection for %s (append).'; + msgAppeDisabled = '500 Cannot APPE.'; + msgAppeAborted = '426 Connection closed; %s.'; + msgAppeOk = '226 File received ok'; + msgAppeError = '426 Connection closed; transfer aborted. Error #%d'; + msgAppeReady = '150 APPE supported. Ready to append file "%s" at offset %d.'; + msgStruOk = '200 Ok. STRU parameter ''%s'' ignored.'; + msgMdtmOk = '213 %s'; + msgMdtmFailed = '550 %s'; + msgMdtmSyntax = '501 Syntax error in MDTM parameter.'; + msgMdtmNotExists = '550 ''%s'': no such file or directory.'; + msgModeOK = '200 MODE Ok'; + msgModeSyntax = '501 Missing argument for MODE'; + msgModeNotS = '502 MODE other than S not supported'; + msgOverflow = '500 Command too long'; + msgStouOk = '250 ''%s'': file created.' ; + msgStouSuccess = msgStorSuccess; + msgStouFailed = '501 Cannot STOU. %s'; + msgStouAborted = msgStorAborted; + msgStouError = msgStorError; + msgFeatFollows = '211-Extensions supported:'; + msgFeatFollowDone = '211 END'; + msgFeatFailed = '211 No-Features'; + + +function SlashesToBackSlashes(const S : String) : String; forward; +function BackSlashesToSlashes(const S : String) : String; forward; +{ function BuildFilePath(const Directory : String; serge le 5/10/2002 + FileName : String) : String; forward; } + +var + ThisYear, ThisMonth, ThisDay : Word; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TFtpServer]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetFileSize(FileName : String) : LongInt; +var + SR : TSearchRec; +begin +{$IFNDEF VER80}{$WARNINGS OFF}{$ENDIF} + if FindFirst(FileName, faReadOnly or faHidden or + faSysFile or faArchive, SR) = 0 then + Result := SR.Size + else + Result := -1; + FindClose(SR); +{$IFNDEF VER80}{$WARNINGS ON}{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TFtpServer.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWindowHandle := WSocket.AllocateHWnd(WndProc); + FServSocket := TWSocket.Create(Self); + FServSocket.Name := 'ServerWSocket'; + FClientList := TList.Create; + FPort := 'ftp'; + FAddr := '0.0.0.0'; + FBanner := msgDftBanner; + FClientClass := TFtpCtrlSocket; +{ !!!!!!!!!!! NGB: Added next five lines } + FPasvIpAddr := ''; + FPasvPortRangeStart := 0; + FPasvPortRangeSize := 0; + FPasvPortTable := nil; + FPasvPortTableSize := 0; +{ !!!!!!!!!!! NGB: Added previous five lines } + AddCommand('PORT', CommandPORT); + AddCommand('STOR', CommandSTOR); + AddCommand('RETR', CommandRETR); + AddCommand('CWD', CommandCWD); + AddCommand('XPWD', CommandXPWD); + AddCommand('PWD', CommandPWD); + AddCommand('USER', CommandUSER); + AddCommand('PASS', CommandPASS); + AddCommand('LIST', CommandLIST); + AddCommand('NLST', CommandNLST); + AddCommand('TYPE', CommandTYPE); + AddCommand('SYST', CommandSYST); + AddCommand('QUIT', CommandQUIT); + AddCommand('DELE', CommandDELE); + AddCommand('SIZE', CommandSIZE); + AddCommand('REST', CommandREST); + AddCommand('RNFR', CommandRNFR); + AddCommand('RNTO', CommandRNTO); + AddCommand('MKD', CommandMKD); + AddCommand('RMD', CommandRMD); + AddCommand('ABOR', CommandABOR); + AddCommand('PASV', CommandPASV); + AddCommand('NOOP', CommandNOOP); + AddCommand('CDUP', CommandCDUP); + AddCommand('APPE', CommandAPPE); + AddCommand('STRU', CommandSTRU); + AddCommand('XMKD', CommandMKD); + AddCommand('XRMD', CommandRMD); + AddCommand('MDTM', CommandMDTM); + AddCommand('MODE', CommandMODE); + AddCommand('OVER', CommandOverflow); + AddCommand('STOU', CommandSTOU); + AddCommand('FEAT', CommandFEAT); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TFtpServer.Destroy; +begin + if Assigned(FServSocket) then begin + FServSocket.Destroy; + FServSocket := nil; + end; + if Assigned(FClientList) then begin + FClientList.Destroy; + FClientList := nil; + end; + if Assigned(FPasvPortTable) then begin + FreeMem(FPasvPortTable, FPasvPortTableSize); + FPasvPortTable := nil; + FPasvPortTableSize := 0; + end; + WSocket.DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + case Msg of + WM_FTPSRV_CLOSE_REQUEST : WMFtpSrvCloseRequest(MsgRec); + WM_FTPSRV_CLIENT_CLOSED : WMFtpSrvClientClosed(MsgRec); + WM_FTPSRV_ABORT_TRANSFER : WMFtpSrvAbortTransfer(MsgRec); + WM_FTPSRV_CLOSE_DATA : WMFtpSrvCloseData(MsgRec); + WM_FTPSRV_START_SEND : WMFtpSrvStartSend(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WMFtpSrvCloseRequest(var msg: TMessage); +var + Client : TFtpCtrlSocket; + I : Integer; +begin + Client := TFtpCtrlSocket(msg.LParam); + I := FClientList.IndexOf(Client); + if I >= 0 then begin + { Check if client.ID is still the same as when message where posted } + if WPARAM(TFtpCtrlSocket(FClientList.Items[I]).ID) = Msg.WParam then begin + if Client.AllSent then + Client.Close + else + Client.CloseRequest := TRUE; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.Notification(AComponent: TComponent; operation: TOperation); +begin + inherited Notification(AComponent, operation); + if operation = opRemove then begin + if AComponent = FServSocket then + FServSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.AddCommand( + const Keyword : String; + const Proc : TFtpSrvCommandProc); +begin + if FLastCmd > High(FCmdTable) then + raise FtpServerException.Create('Too many command'); + FCmdTable[FLastCmd].KeyWord := KeyWord; + FCmdTable[FLastCmd].Proc := Proc; + Inc(FLastCmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.Start; +begin + if FServSocket.State = wsListening then + Exit; { Server is already running } + FServSocket.Port := Port; + FServSocket.Proto := 'tcp'; + FServSocket.Addr := FAddr; + FServSocket.OnSessionAvailable := ServSocketSessionAvailable; + FServSocket.OnChangeState := ServSocketStateChange; + FServSocket.ComponentOptions := [wsoNoReceiveLoop]; + FServSocket.Listen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.Stop; +begin + FServSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.DisconnectAll; +var + Client : TFtpCtrlSocket; + Msg : TMessage; +begin + while FClientList.Count > 0 do begin + Client := TFtpCtrlSocket(FClientList.Items[0]); + FillChar(Msg, SizeOf(Msg), 0); + Msg.LParam := Integer(Client); + Msg.WParam := Client.ID; + WMFtpSrvClientClosed(Msg); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.Disconnect(Client : TFtpCtrlSocket); +var + I : Integer; + Msg : TMessage; +begin + I := FClientList.IndexOf(Client); + if I < 0 then + raise FtpServerException.Create('Disconnect: Not one of our clients'); + + FillChar(Msg, SizeOf(Msg), 0); + Msg.LParam := Integer(Client); + Msg.WParam := Client.ID; + WMFtpSrvClientClosed(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpServer.GetActive : Boolean; +begin + Result := (FServSocket.State = wsListening); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.SetActive(newValue : Boolean); +begin + if newValue then + Start + else + Stop; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ServSocketStateChange(Sender : TObject; OldState, NewState : TSocketState); +begin + if csDestroying in ComponentState then + Exit; + if NewState = wsListening then + TriggerServerStart + else if NewState = wsClosed then + TriggerServerStop; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ServSocketSessionAvailable(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; +begin + if AError <> 0 then + raise FtpServerException.Create('Session available error #' + IntToStr(AError)); + Inc(FClientNum); + Client := FClientClass.Create(Self); + FClientList.Add(Client); + Client.Name := 'ClientWSocket' + IntToStr(FClientNum); + Client.DataSocket.Name := 'DataWSocket' + IntToStr(FClientNum); + Client.ID := FClientNum; + Client.Banner := FBanner; + Client.HSocket := ServSocket.Accept; + Client.OnCommand := ClientCommand; + Client.OnSessionClosed := ClientSessionClosed; + Client.OnDataSent := ClientDataSent; + TriggerClientConnect(Client, AError); + { The event handler may have destroyed the client ! } + if FClientList.IndexOf(Client) < 0 then + Exit; + { The event handler may have closed the connection } + if Client.State <> wsConnected then + Exit; + { Ok, the client is still there, process with the connection } + if (FMaxClients > 0) and (FMaxClients < ClientCount) then begin + { Sorry, toomuch clients } + Client.Banner := msgTooMuchClients; + Client.StartConnection; + Client.Close; + end + else + Client.StartConnection; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.SendAnswer(Client : TFtpCtrlSocket; Answer : TFtpString); +begin + try + TriggerSendAnswer(Client, Answer); + Client.SendAnswer(Answer); + except + { Just ignore any exception here } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientCommand( + Sender : TObject; + CmdBuf : PChar; + CmdLen : Integer); +const + TELNET_IAC = #255; + TELNET_IP = #244; + TELNET_DATA_MARK = #242; +var + Client : TFtpCtrlSocket; + Answer : TFtpString; + Params : TFtpString; + KeyWord : TFtpString; + I, J : Integer; +begin + Client := Sender as TFtpCtrlSocket; + Answer := ''; + + { Copy the command received, removing any telnet option } + try + Params := ''; + I := 0; + while I < CmdLen do begin + if CmdBuf[I] <> TELNET_IAC then begin + Params := Params + CmdBuf[I]; + Inc(I); + end + else begin + Inc(I); + if CmdBuf[I] = TELNET_IAC then + Params := Params + CmdBuf[I]; + Inc(I); + end; + end; + + { Extract keyword, ignoring leading spaces and tabs } + I := 1; + while (I <= Length(Params)) and (Params[I] in [' ', #9]) do + Inc(I); + J := I; + while (J <= Length(Params)) and (Params[J] in ['A'..'Z', 'a'..'z', '0'..'9']) do + Inc(J); + KeyWord := UpperCase(Copy(Params, I, J - I)); + + { Extract parameters, ignoring leading spaces and tabs } + while (J <= Length(Params)) and (Params[J] in [' ', #9]) do + Inc(J); + Params := Copy(Params, J, Length(Params)); + + { Pass the command to the component user to let him a chance to } + { handle it. If it does, he must return the answer. } + TriggerClientCommand(Client, Keyword, Params, Answer); + if Answer <> '' then begin + { Event handler has processed the client command, send the answer } + SendAnswer(Client, Answer); + Exit; + end; + + { The command has not been processed, we'll process it } + if Keyword = '' then begin + { Empty keyword (should never occurs) } + SendAnswer(Client, Format(msgCmdUnknown, [Params])); + Exit; + end; + + { We need to process the client command, search our command table } + I := 0; + while I <= High(FCmdTable) do begin + if FCmdTable[I].KeyWord = KeyWord then begin + FCmdTable[I].Proc(Client, KeyWord, Params, Answer); + SendAnswer(Client, Answer); + Exit; + end; + Inc(I); + end; + SendAnswer(Client, Format(msgCmdUnknown, [KeyWord])); + except + on E:Exception do begin + SendAnswer(Client, '501 ' + E.Message); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientDataSent(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; +begin + Client := Sender as TFtpCtrlSocket; + if Client.CloseRequest then begin + Client.CloseRequest := FALSE; + PostMessage(FWindowHandle, WM_FTPSRV_CLOSE_REQUEST, + WPARAM(Client.ID), LPARAM(Client)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientSessionClosed(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; +begin + Client := Sender as TFtpCtrlSocket; + PostMessage(FWindowHandle, WM_FTPSRV_CLIENT_CLOSED, + WPARAM(Client.ID), LPARAM(Client)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WMFtpSrvClientClosed(var msg: TMessage); +var + Client : TFtpCtrlSocket; + I : Integer; + SesClosed : TSessionClosed; +begin + Client := TFtpCtrlSocket(Msg.LParam); + { Check if client still in our client list } + I := FClientList.IndexOf(Client); + if I >= 0 then begin + { Check if client.ID is still the same as when message where posted } + if WPARAM(TFtpCtrlSocket(FClientList.Items[I]).ID) = Msg.WParam then begin + try + SesClosed := Client.DataSocket.OnSessionClosed; + if Client.DataSessionActive and Assigned(SesClosed) then + Client.DataSocket.OnSessionClosed(Client.DataSocket, WSAENOTCONN); + FClientList.Remove(Client); + TriggerClientDisconnect(Client, 0); + finally + Client.Destroy; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WMFtpSrvAbortTransfer(var msg: TMessage); +var + Client : TFtpCtrlSocket; + Data : TWSocket; + I : Integer; +begin + Client := TFtpCtrlSocket(Msg.LParam); + { Check if client still in our client list } + I := FClientList.IndexOf(Client); + if I >= 0 then begin + { Check if client.ID is still the same as when message where posted } + if WPARAM(TFtpCtrlSocket(FClientList.Items[I]).ID) = Msg.WParam then begin + Data := Client.DataSocket; + Data.ShutDown(2); + Data.Close; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WMFtpSrvCloseData(var msg: TMessage); +var + Client : TFtpCtrlSocket; + Data : TWSocket; + I : Integer; +{ !!!!!!!!!!! NGB: next line changed } + {PortNumber : String;} +{ !!!!!!!!!!! NGB: previous line changed } +begin + Client := TFtpCtrlSocket(Msg.LParam); + { Check if client still in our client list } + I := FClientList.IndexOf(Client); + if I >= 0 then begin + { Check if client.ID is still the same as when message where posted } + if WPARAM(TFtpCtrlSocket(FClientList.Items[I]).ID) = Msg.WParam then begin + Data := Client.DataSocket; +{ !!!!!!!!!!! NGB: Free Up Current Port - next 5 lines changed } + if Assigned(Data) then begin + if Client.PassiveConnected and (FPasvPortRangeSize > 0) then + FreeCurrentPasvPort(Client); + Data.Close; + end; +{ !!!!!!!!!!! NGB: previous 5 lines changed } + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpServer.GetClient(nIndex : Integer) : TFtpCtrlSocket; +begin + if not Assigned(FClientList) then begin + Result := nil; + Exit; + end; + if (nIndex < 0) or (nIndex >= FClientList.Count) then begin + Result := nil; + Exit; + end; + Result := TFtpCtrlSocket(FClientList.Items[nIndex]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check if a given object is one of our clients } +function TFtpServer.IsClient(SomeThing : TObject) : Boolean; +begin + if not Assigned(FClientList) then + Result := FALSE + else + Result := (FClientList.IndexOf(Pointer(SomeThing)) >= 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpServer.GetClientCount : Integer; +begin + if Assigned(FClientList) then + Result := FClientList.Count + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerServerStart; +begin + if Assigned(FOnStart) then + FOnStart(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerServerStop; +begin + if Assigned(FOnStop) then + FOnStop(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerAuthenticate( + Client : TFtpCtrlSocket; + UserName : String; + PassWord : String; + var Authenticated : Boolean); +begin + if Assigned(FOnAuthenticate) then + FOnAuthenticate(Self, Client, UserName, Password, Authenticated); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerChangeDirectory( + Client : TFtpCtrlSocket; + Directory : String; + var Allowed : Boolean); +begin + if Assigned(FOnChangeDirectory) then + FOnChangeDirectory(Self, Client, Directory, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerMakeDirectory( + Client : TFtpCtrlSocket; + Directory : String; + var Allowed : Boolean); +begin + if Assigned(FOnMakeDirectory) then + FOnMakeDirectory(Self, Client, Directory, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerBuildDirectory( + Client : TFtpCtrlSocket; + var Params : TFtpString; + Detailed : Boolean); +begin + if Assigned(FOnBuildDirectory) then + FOnBuildDirectory(Self, Client, Params, Detailed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerAlterDirectory( + Client : TFtpCtrlSocket; + var Params : TFtpString; + Detailed : Boolean); +begin + if Assigned(FOnAlterDirectory) then + FOnAlterDirectory(Self, Client, Params, Detailed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerSendAnswer( + Client : TFtpCtrlSocket; + var Answer : TFtpString); +begin + if Assigned(FOnAnswerToClient) then + FOnAnswerToClient(Self, Client, Answer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerClientDisconnect(Client : TFtpCtrlSocket; AError : Word); +begin + if Assigned(FOnClientDisconnect) then + FOnClientDisconnect(Self, Client, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerClientConnect(Client : TFtpCtrlSocket; AError : Word); +begin + if Assigned(FOnClientConnect) then + FOnClientConnect(Self, Client, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerStorSessionConnected( + Client : TFtpCtrlSocket; Data : TWSocket; AError : Word); +begin + if Assigned(FOnStorSessionConnected) then + FOnStorSessionConnected(Self, Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerRetrSessionConnected( + Client : TFtpCtrlSocket; Data : TWSocket; AError : Word); +begin + if Assigned(FOnRetrSessionConnected) then + FOnRetrSessionConnected(Self, Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerStorSessionClosed( + Client : TFtpCtrlSocket; Data : TWSocket; AError : Word); +begin + if Assigned(FOnStorSessionClosed) then + FOnStorSessionClosed(Self, Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerRetrSessionClosed( + Client : TFtpCtrlSocket; Data : TWSocket; AError : Word); +begin + if Assigned(FOnRetrSessionClosed) then + FOnRetrSessionClosed(Self, Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerClientCommand( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Assigned(FOnClientCommand) then + FOnClientCommand(Self, Client, KeyWord, Params, Answer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidatePut( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidatePut) then + FOnValidatePut(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateSize( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateSize) then + FOnValidateSize(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateDele( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateDele) then + FOnValidateDele(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateRmd( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateRmd) then + FOnValidateRmd(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateRnFr( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateRnFr) then + FOnValidateRnFr(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateRnTo( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateRnTo) then + FOnValidateRnTo(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateGet( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateGet) then + FOnValidateGet(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerStorDataAvailable( + Client : TFtpCtrlSocket; + Data : TWSocket; + Buf : PChar; + Len : LongInt; + AError : Word); +begin + if Assigned(FOnStorDataAvailable) then + FOnStorDataAvailable(Self, Client, Data, Buf, Len, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerRetrDataSent( + Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); +begin + if Assigned(FOnRetrDataSent) then + FOnRetrDataSent(Self, Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerGetUniqueFileName( + Client : TFtpCtrlSocket; + var FileName : TFtpString); +begin + if Assigned (FOnGetUniqueFileName) then + FOnGetUniqueFileName (Self, Client, FileName) ; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandUSER( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + Client.CurCmdType := ftpcUSER; + Client.UserName := Trim(Params); + Client.FtpState := ftpcWaitingPassword; + Answer := Format(msgPassRequired, [Client.UserName]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandPASS( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Authenticated : Boolean; +begin + if Client.FtpState <> ftpcWaitingPassword then + Answer := msgNoUser + else begin + Client.CurCmdType := ftpcPASS; + Client.PassWord := Trim(Params); + Authenticated := TRUE; + TriggerAuthenticate(Client, Client.UserName, Client.PassWord, Authenticated); + if Authenticated then begin + Client.FtpState := ftpcReady; + Client.Directory := Client.HomeDir; + Answer := Format(msgLogged, [Client.UserName]) + end + else begin + Client.FtpState := ftpcWaitingUserCode; + Answer := msgLoginFailed; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandCDUP( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + Client.CurCmdType := ftpcCDUP; + Params := '..'; + CommandChangeDir(Client, Keyword, Params, Answer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandCWD( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + Client.CurCmdType := ftpcCWD; + CommandChangeDir(Client, Keyword, Params, Answer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function SlashesToBackSlashes(const S : String) : String; +var + I : Integer; +begin + Result := S; + for I := 1 to Length(Result) do begin + if Result [I] = '/' then + Result[I] := '\'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function BackSlashesToSlashes(const S : String) : String; +var + I : Integer; +begin + Result := S; + for I := 1 to Length(Result) do begin + if Result [I] = '\' then + Result[I] := '/'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandChangeDir( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Allowed : Boolean; + OldDir : String; +begin + OldDir := Client.Directory; + try + Params := SlashesToBackSlashes(Params); + Client.Directory := Trim(Params); + Allowed := TRUE; + TriggerChangeDirectory(Client, Client.Directory, Allowed); + if Allowed then + Answer := Format(msgCWDSuccess, + [BackSlashesToSlashes(Client.Directory)]) + else begin + Client.Directory := OldDir; + Answer := Format(msgCWDFailed, ['No permission']); + end; + except + on E:Exception do begin + Client.Directory := OldDir; + Answer := Format(msgCWDFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandXPWD( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcXPWD; + Answer := Format(msgPWDSuccess, + ['/' + BackSlashesToSlashes(Client.Directory)]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandPWD( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcPWD; + Answer := Format(msgPWDSuccess, + ['/' + BackSlashesToSlashes(Client.Directory)]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandQUIT( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + Client.CurCmdType := ftpcQUIT; + Answer := msgQuit; + PostMessage(FWindowHandle, WM_FTPSRV_CLOSE_REQUEST, + WPARAM(Client.ID), LPARAM(Client)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetInteger(var I : Integer; const Src : String) : LongInt; +begin + { Skip leading white spaces } + while (I <= Length(Src)) and (Src[I] in [' ' , #9]) do + Inc(I); + Result := 0; + while (I <= Length(Src)) and (Src[I] in ['0'..'9']) do begin + Result := Result * 10 + Ord(Src[I]) - Ord('0'); + Inc(I); + end; + { Skip trailing white spaces } + while (I <= Length(Src)) and (Src[I] in [' ' , #9]) do + Inc(I); + { Check if end of string of comma. If not, error, returns -1 } + if I <= Length(Src) then begin + if Src[I] = ',' then + Inc(I) { skip comma } + else + raise FtpServerException.Create('GetInteger: unexpected char'); { error, must be comma } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandPORT( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + I : Integer; + N : LongInt; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcPORT; + I := 1; + Client.DataAddr := IntToStr(GetInteger(I, Params)); + Client.DataAddr := Client.DataAddr + '.' + IntToStr(GetInteger(I, Params)); + Client.DataAddr := Client.DataAddr + '.' + IntToStr(GetInteger(I, Params)); + Client.DataAddr := Client.DataAddr + '.' + IntToStr(GetInteger(I, Params)); + N := GetInteger(I, Params); + N := (N shl 8) + GetInteger(I, Params); + Client.DataPort := IntToStr(N); + Answer := msgPortSuccess; + except + Answer := msgPortFailed; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandSTOR( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Allowed : Boolean; + FilePath : TFtpString; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcSTOR; + Client.FileName := SlashesToBackSlashes(Params); + Client.HasOpenedFile := FALSE; + Client.AbortingTransfer := FALSE; + Client.TransferError := 'Transfer Ok'; + Allowed := TRUE; + FilePath := BuildFilePath(Client, Client.Directory, Client.FileName); + TriggerValidatePut(Client, FilePath, Allowed); + if not Allowed then begin + Answer := msgStorDisabled; + Exit; + end; + Client.FilePath := FilePath; + if Client.PassiveMode then begin + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + if Client.PassiveConnected then + Client.DataSocket.OnSessionConnected(Client.DataSocket, 0) + else + Client.PassiveStart := TRUE; + end + else begin + Client.DataSocket.Proto := 'tcp'; + Client.DataSocket.Addr := Client.DataAddr; + Client.DataSocket.Port := Client.DataPort; + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + Client.DataSocket.LingerOnOff := wsLingerOff; + Client.DataSocket.LingerTimeout := 0; +{$IFDEF BIND_FTP_DATA} + Client.DataSocket.LocalAddr := Client.GetXAddr; + Client.DataSocket.LocalPort := 'ftp-data'; {20} +{$ENDIF} + Client.DataSocket.ComponentOptions := [wsoNoReceiveLoop]; + Client.DataSocket.Connect; + end; + Answer := Format(msgStorSuccess, [Params]); + except + on E:Exception do begin + Answer := Format(msgStorFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientStorSessionConnected(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + Client.DataSessionActive := TRUE; + Client.PassiveMode := FALSE; + TriggerStorSessionConnected(Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientStorSessionClosed(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); +{ !!!!!!!! NGB: Free Up Current Port - next 2 lines added } + if Client.PassiveConnected and (FPasvPortRangeSize > 0) then + FreeCurrentPasvPort(Client); +{ !!!!!!!! NGB: previous 2 lines added } + + Client.DataSessionActive := FALSE; + Client.PassiveStart := FALSE; + Client.PassiveConnected := FALSE; + Client.RestartPos := 0; + { Reset data port to standard value } + Client.DataPort := 'ftp-data'; + + { If we had opened a data stream ourself, then close it } + if Client.HasOpenedFile then begin + if Assigned(Client.DataStream) then + Client.DataStream.Destroy; + Client.DataStream := nil; + Client.HasOpenedFile := FALSE; + end; + + TriggerStorSessionClosed(Client, Data, AError); + + case Client.CurCmdType of + ftpcSTOR : + begin + if Client.AbortingTransfer then + SendAnswer(Client, Format(msgStorAborted, [Client.TransferError])) + else if AError = 0 then + SendAnswer(Client, msgStorOk) + else + SendAnswer(Client, Format(msgStorError, [AError])); + end; + ftpcAPPE : + begin + if Client.AbortingTransfer then + SendAnswer(Client, Format(msgAppeAborted, [Client.TransferError])) + else if AError = 0 then + SendAnswer(Client, msgAppeOk) + else + SendAnswer(Client, Format(msgAppeError, [AError])); + end; + ftpcSTOU : + begin + if Client.AbortingTransfer then + SendAnswer(Client, Format(msgStouAborted, [Client.TransferError])) + else if AError = 0 then + SendAnswer(Client, Format (msgStouOk, [Client.FileName])) + else + SendAnswer(Client, Format(msgStouError, [AError])); + end; + else { Should never comes here } + raise Exception.Create('Program error in ClientStorSessionClosed'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientStorDataAvailable(Sender: TObject; AError : word); +var + Len : Integer; + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + Len := Data.Receive(Client.RcvBuf, Client.RcvSize); + if Len <= 0 then + Exit; + + if Client.AbortingTransfer then + Exit; + + try + { Trigger the user event for the received data } + TriggerStorDataAvailable(Client, Data, Client.RcvBuf, Len, AError); + + { We need to open a datastream if not already done and a FilePath } + { exists (the component user can have nullified the FilePath } + if (not Client.HasOpenedFile) and + (Length(Client.FilePath) > 0) and + (not Assigned(Client.DataStream)) then begin + { Use different file modes for APPE vs STOR } + if (Client.CurCmdType = ftpcAPPE) and + (GetFileSize(Client.FilePath) > -1) then + Client.DataStream := TFileStream.Create(Client.FilePath, + fmOpenReadWrite or fmShareDenyWrite) + else if Client.RestartPos > 0 then { iturcan@gamo.sk } + Client.DataStream := TFileStream.Create(Client.FilePath, + fmOpenWrite or fmShareDenyWrite) + else + Client.DataStream := TFileStream.Create(Client.FilePath, + fmCreate); + Client.DataStream.Seek(Client.RestartPos, soFrombeginning); + Client.HasOpenedFile := TRUE; + end; + + { If we have a DataStream, then we need to write the data } + if Assigned(Client.DataStream) then + Client.DataStream.WriteBuffer(Client.RcvBuf^, Len); + except + { An exception occured, so we abort the transfer } + on E:Exception do begin + Client.TransferError := E.Message; + Client.AbortingTransfer := TRUE; + PostMessage(FWindowHandle, WM_FTPSRV_ABORT_TRANSFER, + WPARAM(Client.ID), LPARAM(Client)); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerBuildFilePath( + Client : TFtpCtrlSocket; + const Directory : String; + const FileName : String; + var NewFileName : String); +begin + if Assigned(FOnBuildFilePath) then + FOnBuildFilePath(Self, Client, Directory, FileName, NewFileName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ serge le 5/10/2002 } +function TFtpServer.BuildFilePath( + Client : TFtpCtrlSocket; + Directory : String; + FileName : String) : String; +var + Drive : String; + Path : String; +begin + FileName := SlashesToBackSlashes(FileName); + PatchIE5(FileName); + + { Gives the application a chance to do the work for us } + Result := ''; + TriggerBuildFilePath(Client, Directory, FileName, Result); + if Length(Result) > 0 then + Exit; { Work is done at the app level, done } + + if IsUNC(FileName) then + Result := FileName + else if IsUNC(Directory) then begin + if (Length(FileName) > 0) and (FileName[1] = '\') then + Result := ExtractFileDrive(Directory) + FileName + else + Result := Directory + FileName; + end + else begin + if (Length(FileName) > 1) and (FileName[2] = ':') then begin + Drive := UpperCase(Copy(FileName, 1, 2)); + Path := Copy(FileName, 3, Length(FileName)); + end + else begin + Drive := Copy(Directory, 1, 2); + Path := FileName; + end; + + if (Length(Path) > 0) and (Path[1] = '\') then + Result := Drive + Path + else begin + if Drive <> Copy(Directory, 1, 2) then + raise FtpServerException.Create('No current dir for ''' + Drive + ''''); + Result := Directory + Path; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandRETR( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Allowed : Boolean; + FilePath : TFtpString; + DelayedSend : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcRETR; + Client.HasOpenedFile := FALSE; + Client.FileName := SlashesToBackSlashes(Params); + Allowed := TRUE; + FilePath := BuildFilePath(Client, Client.Directory, Client.FileName); + TriggerValidateGet(Client, FilePath, Allowed); + if not Allowed then begin + Answer := msgRetrDisabled; + Exit; + end; + Client.FilePath := FilePath; + Answer := Format(msgRetrSuccess, [Params]); + DelayedSend := FALSE; + if Assigned(FOnGetProcessing) then + FOnGetProcessing(Self, Client, DelayedSend); + if not DelayedSend then + DoStartSendData(Client); + except + on E:Exception do begin + Answer := Format(msgRetrFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.DoStartSendData(Client : TFtpCtrlSocket); +begin + PostMessage(FWindowHandle, WM_FTPSRV_START_SEND, 0, + LongInt(Client)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WMFtpSrvStartSend(var msg: TMessage); +var + Client : TFtpCtrlSocket; +begin + Client := TObject(Msg.LParam) as TFtpCtrlSocket; + StartSendData(Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientPassiveSessionAvailable(Sender : TObject; AError : Word); +var + HSocket : TSocket; + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + HSocket := Data.Accept; + Data.OnSessionClosed := nil; + Data.Close; { We don't need to listen any more } + + if Client.CurCmdType in [ftpcSTOR, ftpcAPPE] then begin + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + end + else if Client.CurCmdType in [ftpcRETR, ftpcLIST, ftpcNLST] then begin + Client.DataSocket.OnSessionConnected := ClientRetrSessionConnected; + Client.DataSocket.OnSessionClosed := ClientRetrSessionClosed; + Client.DataSocket.OnDataAvailable := nil; + Client.DataSocket.OnDataSent := ClientRetrDataSent; + end + else begin + Client.DataSocket.OnSessionConnected := nil; + Client.DataSocket.OnSessionClosed := nil; + Client.DataSocket.OnDataAvailable := nil; + Client.DataSocket.OnDataSent := nil; + end; + Client.DataSocket.LingerOnOff := wsLingerOff; + Client.DataSocket.LingerTimeout := 0; + Client.DataSocket.HSocket := HSocket; + Client.PassiveConnected := TRUE; + if Client.PassiveStart then + Client.DataSocket.OnSessionConnected(Client.DataSocket, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.StartSendData(Client : TFtpCtrlSocket); +begin + Client.AbortingTransfer := FALSE; + Client.DataSent := FALSE; + Client.TransferError := 'Transfer Ok'; + if Client.PassiveMode then begin + Client.DataSocket.OnSessionConnected := ClientRetrSessionConnected; + Client.DataSocket.OnSessionClosed := ClientRetrSessionClosed; + Client.DataSocket.OnDataAvailable := nil; + Client.DataSocket.OnDataSent := ClientRetrDataSent; + if Client.PassiveConnected then + Client.DataSocket.OnSessionConnected(Client.DataSocket, 0) + else + Client.PassiveStart := TRUE; + end + else begin + Client.DataSocket.Close; + Client.DataSocket.Proto := 'tcp'; + Client.DataSocket.Addr := Client.DataAddr; + Client.DataSocket.Port := Client.DataPort; + Client.DataSocket.OnSessionConnected := ClientRetrSessionConnected; + Client.DataSocket.OnSessionClosed := ClientRetrSessionClosed; + Client.DataSocket.OnDataAvailable := nil; + Client.DataSocket.OnDataSent := ClientRetrDataSent; + Client.DataSocket.LingerOnOff := wsLingerOff; + Client.DataSocket.LingerTimeout := 0; +{$IFDEF BIND_FTP_DATA} + Client.DataSocket.LocalAddr := Client.GetXAddr; + Client.DataSocket.LocalPort := 'ftp-data'; {20} +{$ENDIF} + Client.DataSocket.ComponentOptions := [wsoNoReceiveLoop]; + Client.DataSocket.Connect; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientRetrSessionConnected(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + Client.DataSessionActive := (AError = 0); + Client.PassiveMode := FALSE; + + try + TriggerRetrSessionConnected(Client, Data, AError); + if AError <> 0 then + raise FtpServerException.Create('Client data socket connection error: ' + + IntToStr(AError)); + + { We need to open a datastream if not already done and a FilePath } + { exists the component user can have nullified the FilePath or } + { created his own data stream (virtual file feature) } + if (not Client.HasOpenedFile) and + (Length(Client.FilePath) > 0) and + (not Assigned(Client.DataStream)) then begin + Client.DataStream := TFileStream.Create(Client.FilePath, + fmOpenRead + fmShareDenyNone); + Client.DataStream.Seek(Client.RestartPos, soFrombeginning); + Client.HasOpenedFile := TRUE; + end; + except + on E:Exception do begin + Client.AbortingTransfer := TRUE; + Client.TransferError := E.Message; + PostMessage(FWindowHandle, WM_FTPSRV_ABORT_TRANSFER, + WPARAM(Client.ID), LPARAM(Client)); + Exit; + end; + end; + + SendNextDataChunk(Client, Data); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientRetrSessionClosed(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + Client.DataSessionActive := FALSE; + Client.PassiveStart := FALSE; + Client.PassiveConnected := FALSE; + Client.RestartPos := 0; + { Reset data port to standard value } + Client.DataPort := 'ftp-data'; + + { If we had opened a data stream ourself, then close it } + if Client.HasOpenedFile then begin + if Assigned(Client.DataStream) then begin + Client.DataStream.Destroy; + end; + Client.DataStream := nil; + Client.HasOpenedFile := FALSE; + end; + + if Client.AbortingTransfer then + SendAnswer(Client, Format(msgRetrFailed, [Client.TransferError])) + else if AError <> 0 then + SendAnswer(Client, Format(msgRetrFailed, ['Error #' + IntToStr(AError)])) + else + SendAnswer(Client, msgRetrOk); + + TriggerRetrSessionClosed(Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.SendNextDataChunk( + Client : TFtpCtrlSocket; + Data : TWSocket); +var + Count : LongInt; +begin + try + if Assigned(Client.DataStream) then + Count := Client.DataStream.Read(Client.RcvBuf^, Client.RcvSize) + else + Count := 0; + + if Count > 0 then begin + Client.ByteCount := Client.ByteCount + Count; + Data.Send(Client.RcvBuf, Count); + end + else begin { EOF } + if not Client.DataSent then begin + Client.DataSent := TRUE; +{ PostMessage(Handle, WM_FTPSRV_CLOSE_DATA, 0, LongInt(Data)); } + PostMessage(Handle, WM_FTPSRV_CLOSE_DATA, + WPARAM(Client.ID), LPARAM(Client)); + end; + end; + except + { An exception occured, so we abort the transfer } + on E:Exception do begin + Client.TransferError := E.Message; + Client.AbortingTransfer := TRUE; + PostMessage(FWindowHandle, WM_FTPSRV_ABORT_TRANSFER, + WPARAM(Client.ID), LPARAM(Client)); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientRetrDataSent(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + + if Client.AbortingTransfer then + Exit; + + try + { Trigger the user event for the received data } + TriggerRetrDataSent(Client, Data, AError); + if AError <> 0 then + raise FtpServerException.Create('Send: error #' + IntToStr(AError)); + SendNextDataChunk(Client, Data); + except + { An exception occured, so we abort the transfer } + on E:Exception do begin + Client.TransferError := E.Message; + Client.AbortingTransfer := TRUE; + SendAnswer(Client, Format(msgRetrAborted, [Client.TransferError])); + PostMessage(FWindowHandle, WM_FTPSRV_ABORT_TRANSFER, + WPARAM(Client.ID), LPARAM(Client)); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandSYST( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcSYST; + Answer := msgSystem; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandDirectory( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString; + Detailed : Boolean); +begin + if Assigned(Client.DataStream) then begin + Client.DataStream.Destroy; + Client.DataStream := nil; + end; + + try + Params := SlashesToBackSlashes(Params); + TriggerBuildDirectory(Client, Params, Detailed); + if not Assigned(Client.DataStream) then begin + Client.DataStream := TMemoryStream.Create; + Client.HasOpenedFile := TRUE; + BuildDirectory(Client, Params, Client.DataStream, Detailed); + TriggerAlterDirectory(Client, Params, Detailed); + Client.DataStream.Seek(0, 0); + end; + Client.FilePath := ''; + Answer := msgDirOpen; + StartSendData(Client); + except + on E:Exception do begin + Answer := Format(msgDirFailed, [E.Message]) + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandLIST( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcLIST; + CommandDirectory(Client, KeyWord, Params, Answer, TRUE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandNLST( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcNLST; + CommandDirectory(Client, KeyWord, Params, Answer, FALSE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function FormatUnixDirEntry(F : TSearchRec) : String; +var + Attr : String; + Ext : String; + Day, Month, Year : Integer; + Hour, Min : Integer; +const + StrMonth : array [1..12] of String = + ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); +begin +{$IFNDEF VER80}{$WARNINGS OFF}{$ENDIF} + if ((F.Attr and faVolumeID) <> 0) or + ((F.Attr and faHidden) <> 0) then begin + { Ignore hidden files and volume ID entries } + Result := ''; + Exit; + end; + + Attr := '-rw-rw-rw-'; + if (F.Attr and faDirectory) <> 0 then + Attr[1] := 'd'; + + if (F.Attr and faReadOnly) <> 0 then begin + Attr[3] := '-'; + Attr[6] := '-'; + Attr[9] := '-'; + end; +{$IFNDEF VER80}{$WARNINGS ON}{$ENDIF} + + Ext := UpperCase(ExtractFileExt(F.Name)); + if (Ext = '.EXE') or (Ext = '.COM') or (Ext = '.BAT') then begin + Attr[4] := 'x'; + Attr[7] := 'x'; + Attr[10] := 'x'; + end; + + Day := (HIWORD(F.Time) and $1F); + Month := ((HIWORD(F.Time) shr 5) and $0F); + Year := ((HIWORD(F.Time) shr 9) and $3F) + 1980; +{ Sec := ((F.Time and $1F) shl 1); } + Min := ((F.Time shr 5) and $3F); + Hour := ((F.Time shr 11) and $1F); + + Result := Attr + ' 1 ftp ftp ' + Format('%11d ', [F.Size]); + + Result := Result + Format('%s %2.2d ', [StrMonth[Month], Day]); + if Year = ThisYear then + Result := Result + Format('%2.2d:%2.2d ', [Hour, Min]) + else + Result := Result + Format('%5d ', [Year]); + + Result := Result + F.Name + #13#10; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.BuildDirectory( + Client : TFtpCtrlSocket; + var Params : TFtpString; + Stream : TStream; + Detailed : Boolean); +var + F : TSearchRec; + Path : String; + Status : Integer; + Buf : String; +begin + DecodeDate(Now, ThisYear, ThisMonth, ThisDay); + + if Params = '' then + Path := Client.Directory + '*.*' + else + Path := BuildFilePath(Client, Client.Directory, Params); + + if Path[Length(Path)] = '\' then + Path := Path + '*.*'; + + Status := FindFirst(Path, faAnyFile, F); + while Status = 0 do begin + if Detailed then + Buf := FormatUnixDirEntry(F) + else + Buf := F.Name + #13#10; + if Length(Buf) > 0 then + Stream.Write(Buf[1], Length(Buf)); + Status := FindNext(F); + end; + FindClose(F); + + if Stream.Size = 0 then begin + Buf := Path + ' not found' + #13#10; + Stream.Write(Buf[1], Length(Buf)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandTYPE( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Buf : String; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcTYPE; + Buf := UpperCase(Trim(Params)); + if (Buf = 'A') or (Buf = 'A N') or (Buf = 'I') then begin + Answer := Format(msgTypeOk, [Params]); + Client.BinaryMode := (Buf = 'I'); + end + else + Answer := Format(msgTypeFailed, [Params]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandDELE( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileName : TFtpString; + Allowed : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcDELE; + FileName := BuildFilePath(Client, Client.Directory, Params); + Allowed := TRUE; + TriggerValidateDele(Client, FileName, Allowed); + if not Allowed then begin + Answer := msgDeleDisabled; + Exit; + end; + if Params = '' then + Answer := Format(msgDeleSyntax, [Params]) + else if FileExists(FileName) then begin + if DeleteFile(FileName) then + Answer := Format(msgDeleOk, [FileName]) + else + Answer := Format(msgDeleFailed, [FileName]); + end + else + Answer := Format(msgDeleNotExists, [FileName]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandSIZE( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FilePath : TFtpString; + Allowed : Boolean; + Size : LongInt; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcSIZE; + Allowed := TRUE; + FilePath := BuildFilePath(Client, Client.Directory, Params); + TriggerValidateSize(Client, FilePath, Allowed); + if not Allowed then begin + Answer := msgSizeDisabled; + Exit; + end; + + if Params = '' then + Answer := Format(msgSizeSyntax, [Params]) + else begin + try + Size := GetFileSize(FilePath); + if Size >= 0 then + Answer := Format(msgSizeOk, [Size]) + else + Answer := Format(msgSizeFailed, ['File not found']) + except + on E:Exception do begin + Answer := Format(msgSizeFailed, [E.Message]) + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandREST( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcREST; + try + Client.RestartPos := StrToInt(Params); + if Client.RestartPos < 0 then begin { 20020916 } + Answer := msgRestZero; + Client.RestartPos := 0; + end + else + Answer := Format(msgRestOk, [Client.RestartPos]); + except + on E:Exception do begin + Answer := Format(msgRestFailed, [E.Message]); + Client.RestartPos := 0; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandRNFR( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileName : TFtpString; + Allowed : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcRNFR; + FileName := BuildFilePath(Client, Client.Directory, Params); + Allowed := TRUE; + TriggerValidateRnFr(Client, FileName, Allowed); + if not Allowed then begin + Answer := msgRnFrDisabled; + Exit; + end; + if Params = '' then + Answer := Format(msgRnfrSyntax, [Params]) + else if FileExists(FileName) then begin + Client.FromFileName := FileName; + Answer := Format(msgRnfrOk, [FileName]) + end + else + Answer := Format(msgRnfrNotExists, [FileName]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandRNTO( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileName : TFtpString; + Allowed : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcRNTO; + FileName := BuildFilePath(Client, Client.Directory, Params); + Allowed := TRUE; + TriggerValidateRnTo(Client, FileName, Allowed); + if not Allowed then begin + Answer := msgRnToDisabled; + Exit; + end; + if Params = '' then + Answer := Format(msgRntoSyntax, [Params]) + else if FileExists(FileName) then + Answer := Format(msgRntoAlready, [FileName]) + else if not FileExists(Client.FromFileName) then + Answer := Format(msgRntoNotExists, [Client.FromFileName]) + else begin + Client.ToFileName := FileName; + if RenameFile(Client.FromFileName, Client.ToFileName) then + Answer := Format(msgRntoOk, [Client.FromFileName, Client.ToFileName]) + else + Answer := Format(msgRntoFailed, [Client.FromFileName]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandNOOP( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + Client.CurCmdType := ftpcNOOP; + Answer := Format(MsgNoopOk, [Params]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandMKD( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileName : String; + Allowed : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcMKD; + FileName := BuildFilePath(Client, Client.Directory, Params); + Allowed := TRUE; + TriggerMakeDirectory(Client, FileName, Allowed); + if not Allowed then + Answer := Format(msgMkdFailed, [FileName]) + else if Params = '' then + Answer := Format(msgMkdSyntax, [Params]) + else if FileExists(FileName) then + Answer := Format(msgMkdAlready, [FileName]) + else begin + {$I-} + MkDir(FileName); + if IOResult = 0 then + Answer := Format(msgMkdOk, [FileName]) + else + Answer := Format(msgMkdFailed, [FileName]); + {$I+} + end; + except + on E:Exception do begin + Answer := Format(msgMkdFailed, [E.Message]) + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandAPPE( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Allowed : Boolean; + FilePath : TFtpString; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcAPPE; + Client.FileName := SlashesToBackSlashes(Params); + Client.HasOpenedFile := FALSE; + Client.AbortingTransfer := FALSE; + Client.TransferError := 'Transfer Ok'; + Allowed := TRUE; + FilePath := BuildFilePath(Client, Client.Directory, Client.FileName); + TriggerValidatePut(Client, FilePath, Allowed); + if not Allowed then begin + Answer := msgAppeDisabled; + Exit; + end; + Client.FilePath := FilePath; + if Client.PassiveMode then begin + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + if Client.PassiveConnected then + Client.DataSocket.OnSessionConnected(Client.DataSocket, 0) + else + Client.PassiveStart := TRUE; + end + else begin + Client.DataSocket.Proto := 'tcp'; + Client.DataSocket.Addr := Client.DataAddr; + Client.DataSocket.Port := Client.DataPort; + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + Client.DataSocket.LingerOnOff := wsLingerOff; + Client.DataSocket.LingerTimeout := 0; + Client.DataSocket.ComponentOptions := [wsoNoReceiveLoop]; + Client.DataSocket.Connect; + end; + Client.RestartPos := GetFileSize(Client.FilePath); + if Client.RestartPos < 0 then + Client.RestartPos := 0; + Answer := Format(msgAppeReady, [Params,Client.RestartPos]); + except + on E:Exception do begin + Answer := Format(msgAppeFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandSTRU( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + Client.CurCmdType := ftpcSTRU; + Answer := Format(MsgStruOk, [Params]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function DirExists(Dir : String) : Boolean; +var + F : TSearchRec; +begin + Result := (FindFirst(Dir, faDirectory, F) = 0); + FindClose(F); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandRMD( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileName : TFtpString; + Allowed : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcRMD; + FileName := BuildFilePath(Client, Client.Directory, Params); + Allowed := TRUE; + TriggerValidateRmd(Client, FileName, Allowed); + if not Allowed then begin + Answer := msgRmdDisabled; + Exit; + end; + if Params = '' then + Answer := Format(msgMkdSyntax, [Params]) + else if not DirExists(FileName) then + Answer := Format(msgRmdNotExists, [FileName]) + else begin + {$I-} + RmDir(FileName); + if IOResult = 0 then + Answer := Format(msgRmdOk, [FileName]) + else + Answer := Format(msgRmdFailed, [FileName]); + {$I+} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandABOR( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.DataSocket.State = wsConnected then begin + Client.TransferError := 'ABORT requested by client'; + Client.AbortingTransfer := TRUE; + Client.DataSocket.Close; + end; + Answer := msgAborOk; +end; + +{ !!!!!!!!! NGB : Added entire next function } +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpServer.GetNextAvailablePasvPort : String; +var + I : Integer; + NewPort : Integer; + TablePtr : PBoolean; +begin + if (FPasvPortRangeSize = 0) or (FPasvPortRangeStart = 0) then + Result := '0' + else begin + Result := ''; + TablePtr := FPasvPortTable; + I := 0; + while I < FPasvPortRangeSize do begin + if TablePtr^ = FALSE then begin + TablePtr^ := TRUE; + NewPort := FPasvPortRangeStart + I; + Result := IntToStr(NewPort); + break; + end; + Inc(I); + Inc(TablePtr); + end; + end; +end; +{ !!!!!!!!! NGB : Added previous function } + +{ !!!!!!!!! NGB : Added entire next function } +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.FreeCurrentPasvPort(DataSocket : TFtpCtrlSocket); +var + CurrentPort : Integer; + ErrorCode : Integer; +begin + Val(DataSocket.DataSocket.GetXPort, CurrentPort, ErrorCode); + if (CurrentPort >= FPasvPortRangeStart) and + (CurrentPort <= (FPasvPortRangeStart + FPasvPortRangeSize)) then + PBoolean(PChar(FPasvPortTable) + + SizeOf(Boolean) * (CurrentPort - FPasvPortRangeStart))^ := FALSE; +end; +{ !!!!!!!!! NGB : Added previous function } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandPASV( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + saddr : TSockAddrIn; + saddrlen : Integer; + DataPort : Integer; + IPAddr : TInAddr; + PASVAddr : TInAddr; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + { Get our IP address from our control socket } + saddrlen := SizeOf(saddr); + Client.GetSockName(saddr, saddrlen); + IPAddr := saddr.sin_addr; + + Client.DataSocket.Close; + Client.DataSocket.Addr := '0.0.0.0'; { Any addr } + +{ !!!!!!!!! NGB: Need to get next available port - next 3 lines modified } + Client.DataSocket.Port := GetNextAvailablePasvPort; { '0'; Any port } + if Client.DataSocket.Port = '' then + raise Exception.Create('No available PASV Ports'); +{ !!!!!!!!! NGB: previous 3 lines modified } + + Client.DataSocket.Proto := 'tcp'; + Client.DataSocket.OnSessionAvailable := ClientPassiveSessionAvailable; + Client.DataSocket.OnSessionConnected := nil; + Client.DataSocket.OnSessionClosed := nil; + Client.DataSocket.OnDataAvailable := nil; + Client.DataSocket.ComponentOptions := [wsoNoReceiveLoop]; + Client.DataSocket.Listen; +{ if Client.DataSocket.Listen <> 0 then + raise Exception.Create('Listen failed'); 18/11/98 } + + { Get the port assigned by winsock } + saddrlen := SizeOf(saddr); + Client.DataSocket.GetSockName(saddr, saddrlen); + DataPort := WSocket_ntohs(saddr.sin_port); + + if Client.sin.sin_addr.s_addr = WSocket_htonl($7F000001) then + Answer := Format(msgPasvLocal, + [HiByte(DataPort), + LoByte(DataPort)]) +{!!! NGB: Changed the following 24 lines } + else begin + if FPasvIpAddr = '' then + Answer := Format(msgPasvRemote, + [ord(IPAddr.S_un_b.s_b1), + ord(IPAddr.S_un_b.s_b2), + ord(IPAddr.S_un_b.s_b3), + ord(IPAddr.S_un_b.s_b4), + HiByte(DataPort), + LoByte(DataPort)]) + else begin + PASVAddr.S_addr := WSocket_inet_addr(@FPasvIpAddr[1]); + if PASVAddr.S_addr = u_long(INADDR_NONE) then + raise Exception.Create('Invalid PASV IP Address') + else + Answer := Format(msgPasvRemote, + [ord(PASVAddr.S_un_b.s_b1), + ord(PASVAddr.S_un_b.s_b2), + ord(PASVAddr.S_un_b.s_b3), + ord(PASVAddr.S_un_b.s_b4), + HiByte(DataPort), + LoByte(DataPort)]); + end; + end; +{!!! NGB: Changed the previous bunch of lines } + + Client.PassiveMode := TRUE; + Client.PassiveStart := FALSE; + Client.PassiveConnected := FALSE; + except + on E:Exception do begin + Answer := Format(msgPasvExcept, [E.Message]); + try + Client.DataSocket.Close; + except + { Ignore any exception here } + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandMDTM( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileTime : String; + FileName : String; +begin + Client.CurCmdType := ftpcMDTM; + FileName := BuildFilePath(Client, Client.Directory , Params); + if Params = '' then + Answer := msgMdtmSyntax + else if not FileExists(FileName) then + Answer := Format(msgMdtmNotExists, [FileName]) + else begin + try + FileTime := FileUtcStr(FileName); + if Length(FileTime) <> 0 then + Answer := Format(msgMdtmOk, [FileTime]) + else + Answer := Format(msgMdtmFailed, + ['UTC File time retrieval failed']) + except + on E:Exception do + Answer := Format(msgSizeFailed , [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandMode( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + if (Params = '') then begin + Answer := msgModeSyntax; + Exit; + end; + if (Params <> 'S') and (Params <> 's') then begin + Answer := msgModeNotS; + Exit; + end; + Answer := msgModeOK; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandOverflow( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Buf : array [0..1023] of char; +begin + { Disable receiving } + Client.Shutdown(0); + { Flush receive buffer } + while (Client.Receive(@Buf, SizeOf(buf)) > 0) do ; + { Answer to client } + Answer := msgOverflow; + { Will close connection } + PostMessage(FWindowHandle, WM_FTPSRV_CLOSE_REQUEST, + WPARAM(Client.ID), LPARAM(Client)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ [ep] STOU command support } +{ This code is more or less the same as CommandSTOR, with the addition of } +{ GetUniqueFileName event triggering to let the user a chance to provide a } +{ file name. } +procedure TFtpServer.CommandSTOU( + Client: TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + UniqueName : TFtpString; + buffer : array [0..255] of char ; + Allowed : Boolean; + FilePath : TFtpString; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcSTOU; + + { fire the GetUniqueFileName event to get the file name to be used to } + { store data } + UniqueName := ''; + TriggerGetUniqueFileName (Client, UniqueName); + + { no file name has been provided, or provided one already exists } + { => create one } + if (UniqueName = '') or + (FileExists (BuildFilePath(Client, Client.Directory, UniqueName))) then begin +{$IFDEF VER80} + GetTempFileName(Client.Directory[1], 'FTP', 0, Buffer); +{$ELSE} + GetTempFileName (PChar(Client.Directory), 'FTP', 0, buffer) ; +{$ENDIF} + UniqueName := StrPas (Buffer); + { remove the .tmp extensions generated by GetTempFileName } + UniqueName := ChangeFileExt (UniqueName, ''); + end ; + + Client.FileName := SlashesToBackSlashes(Client.FileName); + Client.HasOpenedFile := FALSE; + Client.AbortingTransfer := FALSE; + Client.TransferError := 'Transfer Ok'; + Allowed := TRUE; + FilePath := BuildFilePath(Client, Client.Directory, Client.FileName); + TriggerValidatePut(Client, FilePath, Allowed); + if not Allowed then begin + Answer := msgStorDisabled; + Exit; + end; + Client.FilePath := FilePath; + if Client.PassiveMode then begin + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + if Client.PassiveConnected then + Client.DataSocket.OnSessionConnected(Client.DataSocket, 0) + else + Client.PassiveStart := TRUE; + end + else begin + Client.DataSocket.Proto := 'tcp'; + Client.DataSocket.Addr := Client.DataAddr; + Client.DataSocket.Port := Client.DataPort; + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + Client.DataSocket.LingerOnOff := wsLingerOff; + Client.DataSocket.LingerTimeout := 0; +{$IFDEF BIND_FTP_DATA} + Client.DataSocket.LocalAddr := Client.GetXAddr; + Client.DataSocket.LocalPort := 'ftp-data'; {20} +{$ENDIF} + Client.DataSocket.ComponentOptions := [wsoNoReceiveLoop]; + Client.DataSocket.Connect; + end; + Answer := Format(msgStouSuccess, [UniqueName]); + except + on E:Exception do begin + Answer := Format(msgStouFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandFEAT( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcFEAT; + Answer := msgFeatFollows + #13#10 + + ' SIZE'+ #13#10 + + ' MDTM'+ #13#10 + + msgFeatFollowDone; + except + on E:Exception do begin + Answer := Format(msgFeatFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.SetPasvPortRangeSize(const NewValue: Integer); +var + OldValue : Integer; + TablePtr : PBoolean; + I : Integer; +begin + if (NewValue < 0) or (NewValue > 65535) then + raise ERangeError.CreateFmt('Invalid PasvPortRangeSize %d.', [NewValue]); + if FPasvPortRangeSize = NewValue then + Exit; + OldValue := FPasvPortRangeSize; + + { If we reduce the range, we must be sure to not affect any port in use } + if NewValue < OldValue then begin + { Check if any port is used before changing } + TablePtr := PBoolean(PChar(FPasvPortTable) + SizeOf(Boolean) * NewValue); + I := NewValue; + while I < OldValue do begin + if TablePtr^ then + raise Exception.Create('Unable to change PasvPortRangeSize ' + + 'when port is in use.'); + Inc(I); + Inc(TablePtr); + end; + end; + +{$IFDEF VER80} + ReallocMem(FPasvPortTable, FPasvPortTableSize, NewValue); +{$ELSE} + ReallocMem(FPasvPortTable, NewValue); +{$ENDIF} + FPasvPortTableSize := NewValue; + FPasvPortRangeSize := NewValue; + if OldValue >= NewValue then + Exit; + + TablePtr := PBoolean(PChar(FPasvPortTable) + SizeOf(Boolean) * OldValue); + while OldValue < NewValue do begin + TablePtr^ := FALSE; + Inc(TablePtr); + Inc(OldValue); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.SetPasvPortRangeStart(const NewValue: Integer); +var + TablePtr : PBoolean; + I : Integer; +begin + if (NewValue < 0) or (NewValue > 65535) then + raise ERangeError.CreateFmt('Invalid PasvPortRangeStart %d.', [NewValue]); + if FPasvPortRangeStart = NewValue then + Exit; + { Check if any port is used before changing } + TablePtr := FPasvPortTable; + I := 0; + while I < FPasvPortRangeSize do begin + if TablePtr^ then + raise Exception.Create('Unable to change PasvPortRangeStart ' + + 'when port is in use.'); + Inc(I); + Inc(TablePtr); + end; + + { Now we can change PasvPortRangeStart } + FPasvPortRangeStart := NewValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/httpprot.dcr b/lib/Delphi/Vc32/httpprot.dcr new file mode 100644 index 00000000..31887652 Binary files /dev/null and b/lib/Delphi/Vc32/httpprot.dcr differ diff --git a/lib/Delphi/Vc32/httpprot.dcu b/lib/Delphi/Vc32/httpprot.dcu new file mode 100644 index 00000000..977c82ac Binary files /dev/null and b/lib/Delphi/Vc32/httpprot.dcu differ diff --git a/lib/Delphi/Vc32/httpprot.pas b/lib/Delphi/Vc32/httpprot.pas new file mode 100644 index 00000000..d8d8a55c --- /dev/null +++ b/lib/Delphi/Vc32/httpprot.pas @@ -0,0 +1,2331 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: November 23, 1997 +Version: 1.47 +Description: THttpCli is an implementation for the HTTP protocol + RFC 1945 (V1.0), and some of RFC 2068 (V1.1) +Credit: This component was based on a freeware from by Andreas + Hoerstemeier and used with his permission. + andy@hoerstemeier.de http://www.hoerstemeier.com/index.htm +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Quick Reference: +HTTP component can retrieve documents or files using HTTP protocol; that is +connect to a HTTP server also known as a webserver. It can also trigger a +CGI/ISAPI/NSAPI script and post data using either GET or POST method. +Syntax of an URL: protocol://[user[:password]@]server[:port]/path +Path can include data: question mark followed by URL encoded data. +HTTP component is either asynchonous (non-blocking) or synchonous (blocking). +Highest performance is when using asynchonous operation. This is the +recommended way to use HTTP component. +To request several URL simultaneously, use asynchronous operation and as much +HTTP components as you wants to request URLs. All requests will be executed +simultaneously without using multi-threading and without blocking your app. +Methods: + GetASync Asynchronous, non-blocking Get + Retrieve document or file specified by URL, without blocking. + OnRequestDone event trigered when finished. Use HTTP GET + method (data contained in URL) + PostASync Asynchronous, non-blocking Post + Retrieve document or file specified by URL, without blocking. + OnRequestDone event trigered when finished. Use HTTP POST + method (data contained in request stream) + HeadASync Asynchronous, non-blocking Head + Retrieve document or file header specified by URL, without + blocking. OnRequestDone event trigered when finished. Use HTTP + HEAD method. + Get Synchronous, blocking Get. Same as GetAsync, but blocks until + finished. + Post Synchronous, blocking Post. Same as PostAsync, but blocks until + finished. + Head Synchronous, blocking Head. Same as HeadAsync, but blocks until + finished. + Abort Immediately close communication. + +Updates: +11/29/97 RcvdStream and SendStream properties moved to public section +11/30/97 Document name bug corrected +12/02/97 Removed bug occuring with terminating slash in docname +12/03/97 Added properties RcvdCount and SentCount to easily add a progress + bar feature (On receive, the ContentLength is initialized with the + value from the header. Update the progress bar in the OnDocData event, + or the OnSendData event). + Added the OnSendBegin, OnSendData and OnSendEnd events. +12/07/97 Corrected Head function to work as expected. Thanks to + R. Barry Jones . +30/12/97 V0.97 Added a Cookie property to send cookies +11/01/98 V0.98 Added WSocket read-only property which enable to access the + socket component used internally. For example to close it to abort + a connection. +13/01/98 V0.99 Added MultiThreaaded property to tell the component that it is + working in a thread and should take care of it. +15/01/98 V1.00 Completely revised internal working to make it work properly + with winsock 2. The TimeOut property is gone. + Changed OnAnswerLine event to OnHeaderData to be more consistent. + Replaced AnswserLine property by readonly LastResponse property. + Added OnRequestDone event. Added GetAsync, PostAsync, HeadAsync + asynchronous, non-blocking methods. Added Abort procedure. +16/01/98 V1.01 Corrected a bug which let some data be lost when receiving + (thanks to Fulvio J. Castelli ) + Added test for HTTP/1.1 response in header. +31/01/98 V1.02 Added an intermediate message posting for the OnRequestDone + event. Thanks to Ed Hochman for his help. + Added an intermediate PostMessage to set the component to ready state. +04/02/98 V1.03 Added some code to better handle DocName (truncating at the + first question mark). +05/02/98 V1.04 Deferred login after a relocation, using WM_HTTP_LOGIN message. + Added workarounf to support faulty webservers which sent only a single + LF in header lines. Submitted by Alwin Hoogerdijk +15/03/98 V1.05 Enlarge buffers from 2048 to 8192 bytes (not for D1) +01/04/98 V1.06 Adapted for BCB V3 +13/04/98 V1.07 Made RcvdHeader property readonly and cleared the content at the + start of a request. + Protected Abort method from calling when component is ready. + Ignore any exception triggered by CancelDnsLookup in Abort method. +14/04/98 V1.08 Corrected a relocation bug occuring with relative path +26/04/98 V1.09 Added OnLocationChange event +30/04/98 V1.10 Added ProxyUsername and ProxyPassword. Suggested by + Myers, Mike . +26/05/98 V1.11 Corrected relocation problem when used with ASP webpages +09/07/98 V1.12 Adapted for Delphi 4 + Checked argument length in SendCommand +19/09/98 V1.13 Added support for HTML document without header + Added OnSessionConnected event, httpConnected state and + httpDnsLookupDone state. + Corrected a problem with automatic relocation. The relocation + message was included in data, resulting in wrong document data. + Added two new events: OnRequestHeaderBegin and OnRequestHeaderEnd. + They replace the OnHeaderBegin and OnHeaderEnd events that where + called for both request header (to web server) and response + header (from web server) +22/11/98 V1.14 Added a Location property than gives the new location in + case of page relocation. Suggested by Jon Robertson +21/12/98 V1.15 Set ContentLength equal to -1 at start of command. +31/01/99 V1.16 Added HostName property +01/02/99 V1.17 Port was lost in DoRequestAsync when using a proxy. + Thanks to David Wright for his help. + Report Dns lookup error and session connect error in OnrequestDOne + event handler as suggested by Jack Olivera . +14/03/99 V1.18 Added OnCookie event. +16/03/99 V1.19 Added Accept property. + Added a default value to Agent property. + Changed OnCookie event signature (not fully implemented yet !). +07/05/99 V1.20 Added code to support Content Ranges by Jon Robertson + . +24/07/99 V1.21 Yet another change in relocation code. +Aug 20, 1999 V1.22 Changed conditional compilation so that default is same + as latest compiler (currently Delphi 4, Bcb 4). Should be ok for + Delphi 5. Added Sleep(0) in sync wait loop to reduce CPU usage. + Added DnsResult property as suggested by Heedong Lim + . This property is accessible from + OnStateChange when state is httpDnsLookupDone. + Triggered OnDocData after writing to the stream. +Sep 25, 1999 V1.23 Yet another change in relocation code when using proxy + Francois Demers found that some webserver + do not insert a space after colon in header line. Corrected + code to handle it correctly. + Cleared ContentType before issuing request. +Oct 02, 1999 V1.24 added AcceptRanges property. Thanks to Werner Lehmann + +Oct 30, 1999 V1.25 change parameter in OnCommand event from const to var to + allow changing header line, including deleting or adding before + or after a given line sent by the component. +Nov 26, 1999 V1.26 Yet another relocation fix ! +Jun 23, 2000 V1.27 Fixed a bug in ParseURL where hostname is followed by a '?' + (that is no path but a query). +Jul 22, 2000 V1.28 Handle exception during DnsLookup from the login procedure. + Suggested by Robert Penz +Sep 17, 2000 V1.29 Eugene Mayevski added support for + NOFORMS. +Jun 18, 2001 V1.30 Use AllocateHWnd and DeallocateHWnd from wsocket. + Renamed property WSocket to CtrlSocket (this require code change + in user application too). +Jul 25, 2001 V1.31 Danny Heijl found that ISA proxy adds + an extra space to the Content-length header so we need a trim + to extract numeric value. + Ran Margalit found some server sending + empty document (Content-Length = 0) which crashed the component. + Added a check for that case when header is finished. + Andrew N.Silich" found we need to handle + handle relative path using "../" and "./" when relocating. Thanks + for his code which was a good starting point. +Jul 28, 2001 V1.32 Sahat Bun suggested to change POST to + GET when a relocation occurs. + Created InternalClear procedure as suggested by Frank Plagge + . + When relocation, clear FRcvdHeader. If port not specified, then + use port 80. By Alexander O.Kazachkin +Jul 30, 2001 V1.33 Corected a few glitches with Delphi 1 +Aug 18, 2001 V1.34 Corrected a bug in relocation logic: when server send only a + header, with no document at all, relocation was not occuring and + OnHeaderEnd event was not triggered. + Corrected a bug in document name when a CGI was invoked (a '?' + found in the URL). Now, ignore everything after '?' which is CGI + parameter. +Sep 09, 2001 V1.35 Beat Boegli added LocalAddr property + for multihomed hosts. +Sep 29, 2001 V1.36 Alexander Alexishin corrected + ParseUrl to handle the case where http:// is not at start of url: + 'first.domain.com/cgi-bin/serv?url=http://second.domain.com' + Yet another relocation code change. +Oct 28, 2001 V1.37 Corrected SocketSessionClosed which called + LocationSessionClosed when it was not needed. +Nov 10, 2001 V1.38 Fixed a bug where component was trying to connect to proxy + using default port instead on specified port after a relocation. + Corrected a bug when relocating to a relative path. Current path + was not taken into account ! +Mar 06, 2002 V1.39 Fixed a bug in relocation when content-length was 0: no + relocation occured ! (Just check for relocation before checking + content length empty). +Mar 12, 2002 V1.40 Added UrlEncode and UrlDecode utility functions. +Mar 30, 2002 V1.41 Export a few utility functions: IsDigit, IsXDigit, XDigit, + htoin and htoi2. +Apr 14, 2002 V1.42 Paolo S. Asioli found a bug in + relocation code where new user/pass are specified. + On relocation, change DocName according to the relocation. + When DocName has no extension and ContentType is text/html the + add extension .htm (could be expanded do other content type) +Apr 20, 2002 V1.43 Added Socks code from Eugene Mayevski +Apr 21, 2002 V1.44 In LocationSessionClosed, clear status variables from + previous operation. +Sep 06, 2002 V1.45 Made a few more methods virtual. +Sep 10, 2002 V1.46 Added AcceptLanguage property. +Sep 11, 2002 V1.47 Wilfried Mestdagh added + OnBeforeHeaderSend event to help add/remove/change header lines. + He also corrected SocketSessionClosed to report error code. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpProt; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinProcs, WinTypes, Messages, SysUtils, Classes, + {$IFNDEF NOFORMS} + Forms, Controls, + {$ENDIF} + WSocket; + +const + HttpCliVersion = 147; + CopyRight : String = ' THttpCli (c) 1997-2002 F. Piette V1.47 '; + DefaultProxyPort = '80'; +{$IFDEF VER80} + { Delphi 1 has a 255 characters string limitation } + HTTP_RCV_BUF_SIZE = 255; + HTTP_SND_BUF_SIZE = 8193; +{$ELSE} + HTTP_RCV_BUF_SIZE = 8193; + HTTP_SND_BUF_SIZE = 8193; +{$ENDIF} + WM_HTTP_REQUEST_DONE = WM_USER + 1; + WM_HTTP_SET_READY = WM_USER + 2; + WM_HTTP_LOGIN = WM_USER + 3; + httperrNoError = 0; + httperrBusy = 1; + httperrNoData = 2; + httperrAborted = 3; + httperrOverflow = 4; + +type + EHttpException = class(Exception) + ErrorCode : Word; + constructor Create(const Msg : String; ErrCode : Word); + end; + + THttpEncoding = (encUUEncode, encBase64, encMime); + THttpRequest = (httpAbort, httpGET, httpPOST, httpHEAD); + THttpState = (httpReady, httpNotConnected, httpConnected, + httpDnsLookup, httpDnsLookupDone, + httpWaitingHeader, httpWaitingBody, httpAborting); + + TOnCommand = procedure (Sender : TObject; + var S: String) of object; + TDocDataEvent = procedure (Sender : TObject; + Buffer : Pointer; + Len : Integer) of object; + TCookieRcvdEvent = procedure (Sender : TObject; + const Data : String; + var Accept : Boolean) of object; + THttpRequestDone = procedure (Sender : TObject; + RqType : THttpRequest; + Error : Word) of object; + TBeforeHeaderSendEvent = procedure (Sender : TObject; + const Method : String; + Headers : TStrings) of object; + + THttpCli = class(TComponent) + protected + FCtrlSocket : TWSocket; + FWindowHandle : HWND; + FMultiThreaded : Boolean; + FState : THttpState; + FLocalAddr : string; {bb} + FHostName : String; + FTargetHost : String; + FPort : String; + FProxy : String; + FProxyPort : String; + FUsername : String; + FPassword : String; + FProxyUsername : String; + FProxyPassword : String; + FLocation : String; + FConnected : Boolean; + FDnsResult : String; + FSendBuffer : array [0..HTTP_SND_BUF_SIZE - 1] of char; + FRequestType : THttpRequest; + FReceiveBuffer : array [0..HTTP_RCV_BUF_SIZE - 1] of char; + FReceiveLen : Integer; + FLastResponse : String; + FHeaderLineCount : Integer; + FBodyLineCount : Integer; + FAllowedToSend : Boolean; + FURL : String; + FPath : String; + FDocName : String; + FSender : String; + FReference : String; + FAgent : String; + FAccept : String; + FAcceptLanguage : String; + FModifiedSince : TDateTime; { Warning ! Use GMT date/Time } + FNoCache : Boolean; + FStatusCode : Integer; + FReasonPhrase : String; + FContentLength : LongInt; + FContentType : String; + FDoAuthor : TStringList; + FContentPost : String; + FContentRangeBegin : String; {JMR!! Added this line!!!} + FContentRangeEnd : String; {JMR!! Added this line!!!} + FAcceptRanges : String; + FCookie : String; + FLocationFlag : Boolean; + FHeaderEndFlag : Boolean; + FRcvdHeader : TStrings; + FRcvdStream : TStream; { If assigned, will recv the answer } + FRcvdCount : LongInt; { Number of rcvd bytes for the body } + FSentCount : LongInt; + FSendStream : TStream; { Contains the data to send } + FReqStream : TMemoryStream; + FRequestDoneError : Integer; + FNext : procedure of object; + FOnStateChange : TNotifyEvent; + FOnSessionConnected : TNotifyEvent; + FOnRequestHeaderBegin : TNotifyEvent; + FOnRequestHeaderEnd : TNotifyEvent; + FOnHeaderBegin : TNotifyEvent; + FOnHeaderEnd : TNotifyEvent; + FOnHeaderData : TNotifyEvent; + FOnDocBegin : TNotifyEvent; + FOnDocEnd : TNotifyEvent; + FOnDocData : TDocDataEvent; + FOnSendBegin : TNotifyEvent; + FOnSendEnd : TNotifyEvent; + FOnSendData : TDocDataEvent; + FOnTrace : TNotifyEvent; + FOnCommand : TOnCommand; + FOnCookie : TCookieRcvdEvent; + FOnDataAvailable : TDataAvailable; + FOnRequestDone : THttpRequestDone; + FOnLocationChange : TNotifyEvent; + { Added by Eugene Mayevski } + FOnSocksConnected : TSessionConnected; + FOnSocksAuthState : TSocksAuthStateEvent; + FOnSocksError : TSocksErrorEvent; + FOnSocketError : TNotifyEvent; + FOnBeforeHeaderSend : TBeforeHeaderSendEvent; { Wilfried 9 sep 02} + procedure DoSocksConnected(Sender: TObject; Error: word); + procedure DoSocksAuthState(Sender : TObject; AuthState : TSocksAuthState); + procedure DoSocksError(Sender : TObject; Error : Integer; Msg : String); + procedure SocketErrorTransfer(Sender : TObject); + procedure SetSocksServer(value : String); + procedure SetSocksLevel(value : String); + procedure SetSocksPort(value : String); + procedure SetSocksUsercode(value : String); + procedure SetSocksPassword(value : String); + procedure SetSocksAuthentication(value : TSocksAuthentication); + function GetSocksServer : String; + function GetSocksLevel : String; + function GetSocksPort : String; + function GetSocksUsercode : String; + function GetSocksPassword : String; + function GetSocksAuthentication : TSocksAuthentication; + { Mayevski additions end } + procedure SendRequest(const method,Version: String); + procedure GetHeaderLineNext; virtual; + procedure GetBodyLineNext; virtual; + procedure SendCommand(const Cmd : String); virtual; + procedure Login; virtual; + procedure Logout; virtual; + procedure InternalClear; virtual; + procedure SocketDNSLookupDone(Sender: TObject; Error: Word); virtual; + procedure SocketSessionClosed(Sender: TObject; Error: Word); virtual; + procedure SocketSessionConnected(Sender : TObject; Error : Word); virtual; + procedure SocketDataSent(Sender : TObject; Error : Word); virtual; + procedure SocketDataAvailable(Sender: TObject; Error: Word); virtual; + procedure LocationSessionClosed(Sender: TObject; Error: Word); virtual; + procedure DoRequestAsync(Rq : THttpRequest); virtual; + procedure DoRequestSync(Rq : THttpRequest); virtual; + procedure SetMultiThreaded(newValue : Boolean); virtual; + procedure StateChange(NewState : THttpState); virtual; + procedure TriggerStateChange; virtual; + procedure TriggerCookie(const Data : String; + var bAccept : Boolean); virtual; + procedure TriggerSessionConnected; virtual; + procedure TriggerBeforeHeaderSend(const Method : String; + Headers : TStrings); virtual; + procedure TriggerRequestHeaderBegin; virtual; + procedure TriggerRequestHeaderEnd; virtual; + procedure TriggerHeaderBegin; virtual; + procedure TriggerHeaderEnd; virtual; + procedure TriggerDocBegin; virtual; + procedure TriggerDocData(Data : Pointer; Len : Integer); virtual; + procedure TriggerDocEnd; virtual; + procedure TriggerSendBegin; virtual; + procedure TriggerSendData(Data : Pointer; Len : Integer); virtual; + procedure TriggerSendEnd; virtual; + procedure TriggerRequestDone; virtual; + procedure WndProc(var MsgRec: TMessage); virtual; + procedure SetReady; virtual; + procedure AdjustDocName; virtual; + function HTTPCliAllocateHWnd(Method: TWndMethod): HWND; virtual; + procedure HTTPCliDeallocateHWnd(WHandle: HWND); virtual; + procedure WMHttpRequestDone(var msg: TMessage); + message WM_HTTP_REQUEST_DONE; + procedure WMHttpSetReady(var msg: TMessage); + message WM_HTTP_SET_READY; + procedure WMHttpLogin(var msg: TMessage); + message WM_HTTP_LOGIN; + public + constructor Create(Aowner:TComponent); override; + destructor Destroy; override; + procedure Get; { Synchronous blocking Get } + procedure Post; { Synchronous blocking Post } + procedure Head; { Synchronous blocking Head } + procedure GetASync; { Asynchronous, non-blocking Get } + procedure PostASync; { Asynchronous, non-blocking Post } + procedure HeadASync; { Asynchronous, non-blocking Head } + procedure Abort; + + property CtrlSocket : TWSocket read FCtrlSocket; + property Handle : HWND read FWindowHandle; + property State : THttpState read FState; + property LastResponse : String read FLastResponse; + property ContentLength : LongInt read FContentLength; + property ContentType : String read FContentType; + property RcvdCount : LongInt read FRcvdCount; + property SentCount : LongInt read FSentCount; + property StatusCode : Integer read FStatusCode; + property ReasonPhrase : String read FReasonPhrase; + property DnsResult : String read FDnsResult; + property AuthorizationRequest : TStringList read FDoAuthor; + property DocName : String read FDocName; + property Location : String read FLocation + write FLocation; + property RcvdStream : TStream read FRcvdStream + write FRcvdStream; + property SendStream : TStream read FSendStream + write FSendStream; + property RcvdHeader : TStrings read FRcvdHeader; + property Hostname : String read FHostname; + published + property URL : String read FURL + write FURL; + property LocalAddr : String read FLocalAddr {bb} + write FLocalAddr; {bb} + property Proxy : String read FProxy + write FProxy; + property ProxyPort : String read FProxyPort + write FProxyPort; + property Sender : String read FSender + write FSender; + property Agent : String read FAgent + write FAgent; + property Accept : String read FAccept + write FAccept; + property AcceptLanguage : String read FAcceptLanguage + write FAcceptLanguage; + property Reference : String read FReference + write FReference; + property Username : String read FUsername + write FUsername; + property Password : String read FPassword + write FPassword; + property ProxyUsername : String read FProxyUsername + write FProxyUsername; + property ProxyPassword : String read FProxyPassword + write FProxyPassword; + property NoCache : Boolean read FNoCache + write FNoCache; + property ModifiedSince : TDateTime read FModifiedSince + write FModifiedSince; + property Cookie : String read FCookie + write FCookie; + property ContentTypePost : String read FContentPost + write FContentPost; + property ContentRangeBegin: String read FContentRangeBegin {JMR!! Added this line!!!} + write FContentRangeBegin; {JMR!! Added this line!!!} + property ContentRangeEnd : String read FContentRangeEnd {JMR!! Added this line!!!} + write FContentRangeEnd; {JMR!! Added this line!!!} + property AcceptRanges : String read FAcceptRanges; + property MultiThreaded : Boolean read FMultiThreaded + write SetMultiThreaded; + property OnTrace : TNotifyEvent read FOnTrace + write FOnTrace; + property OnSessionConnected : TNotifyEvent read FOnSessionConnected + write FOnSessionConnected; + property OnHeaderData : TNotifyEvent read FOnHeaderData + write FOnHeaderData; + property OnCommand : TOnCommand read FOnCommand + write FOnCommand; + property OnHeaderBegin : TNotifyEvent read FOnHeaderBegin + write FOnHeaderBegin; + property OnHeaderEnd : TNotifyEvent read FOnHeaderEnd + write FOnHeaderEnd; + property OnRequestHeaderBegin : TNotifyEvent read FOnRequestHeaderBegin + write FOnRequestHeaderBegin; + property OnRequestHeaderEnd : TNotifyEvent read FOnRequestHeaderEnd + write FOnRequestHeaderEnd; + property OnDocBegin : TNotifyEvent read FOnDocBegin + write FOnDocBegin; + property OnDocData : TDocDataEvent read FOnDocData + write FOnDocData; + property OnDocEnd : TNotifyEvent read FOnDocEnd + write FOnDocEnd; + property OnSendBegin : TNotifyEvent read FOnSendBegin + write FOnSendBegin; + property OnSendData : TDocDataEvent read FOnSendData + write FOnSendData; + property OnSendEnd : TNotifyEvent read FOnSendEnd + write FOnSendEnd; + property OnStateChange : TNotifyEvent read FOnStateChange + write FOnStateChange; + property OnRequestDone : THttpRequestDone read FOnRequestDone + write FOnRequestDone; + property OnLocationChange : TNotifyEvent read FOnLocationChange + write FOnLocationChange; + property OnCookie : TCookieRcvdEvent read FOnCookie + write FOnCookie; + property SocksServer : String read GetSocksServer + write SetSocksServer; + property SocksLevel : String read GetSocksLevel + write SetSocksLevel; + property SocksPort : String read GetSocksPort + write SetSocksPort; + property SocksUsercode : String read GetSocksUsercode + write SetSocksUsercode; + property SocksPassword : String read GetSocksPassword + write SetSocksPassword; + property SocksAuthentication : TSocksAuthentication read GetSocksAuthentication + write SetSocksAuthentication; + property OnSocksConnected : TSessionConnected read FOnSocksConnected + write FOnSocksConnected; + property OnSocksAuthState : TSocksAuthStateEvent read FOnSocksAuthState + write FOnSocksAuthState; + property OnSocksError : TSocksErrorEvent read FOnSocksError + write FOnSocksError; + property OnSocketError : TNotifyEvent read FOnSocketError + write FOnSocketError; + property OnBeforeHeaderSend : TBeforeHeaderSendEvent read FOnBeforeHeaderSend + write FOnBeforeHeaderSend; + end; + +procedure Register; +{ Syntax of an URL: protocol://[user[:password]@]server[:port]/path } +procedure ParseURL(const URL : String; + var Proto, User, Pass, Host, Port, Path : String); +function Posn(const s, t : String; count : Integer) : Integer; +procedure ReplaceExt(var FName : String; const newExt : String); +function EncodeLine(Encoding : THttpEncoding; + SrcData : PChar; Size : Integer):String; +function EncodeStr(Encoding : THttpEncoding; const Value : String) : String; +function RFC1123_Date(aDate : TDateTime) : String; +function UrlEncode(S : String) : String; +function UrlDecode(S : String) : String; +function IsDigit(Ch : Char) : Boolean; +function IsXDigit(Ch : char) : Boolean; +function XDigit(Ch : char) : Integer; +function htoin(value : PChar; len : Integer) : Integer; +function htoi2(value : PChar) : Integer; + + +implementation + +const + bin2uue : String = '`!"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'; + bin2b64 : String = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + uue2bin : String = ' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ '; + b642bin : String = '~~~~~~~~~~~^~~~_TUVWXYZ[\]~~~|~~~ !"#$%&''()*+,-./0123456789~~~~~~:;<=>?@ABCDEFGHIJKLMNOPQRS'; + linesize = 45; +type + TCharSet = set of Char; +const + UriProtocolSchemeAllowedChars : TCharSet = ['a'..'z','0'..'9','+','-','.']; + +function GetBaseUrl(const Url : String) : String; forward; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [THttpCli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] in [' ', #9]) do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor EHttpException.Create(const Msg : String; ErrCode : Word); +begin + Inherited Create(Msg); + ErrorCode := ErrCode; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We cannot use Delphi own function because the date must be specified in } +{ english and Delphi use the current language. } +function RFC1123_Date(aDate : TDateTime) : String; +const + StrWeekDay : String = 'MonTueWedThuFriSatSun'; + StrMonth : String = 'JanFebMarAprMayJunJulAugSepOctNovDec'; +var + Year, Month, Day : Word; + Hour, Min, Sec, MSec : Word; + DayOfWeek : Word; +begin + DecodeDate(aDate, Year, Month, Day); + DecodeTime(aDate, Hour, Min, Sec, MSec); + DayOfWeek := ((Trunc(aDate) - 2) mod 7); + Result := Copy(StrWeekDay, 1 + DayOfWeek * 3, 3) + ', ' + + Format('%2.2d %s %4.4d %2.2d:%2.2d:%2.2d', + [Day, Copy(StrMonth, 1 + 3 * (Month - 1), 3), + Year, Hour, Min, Sec]); +end; + +{$IFDEF NOFORMS} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function HTTPCliWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TObject; + MsgRec : TMessage; +begin + { At window creation asked windows to store a pointer to our object } + Obj := TObject(GetWindowLong(ahWnd, 0)); + + { If the pointer doesn't represent a TCustomFtpCli, just call the default procedure} + if not (Obj is THTTPCli) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass parameter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + { May be a try/except around next line is needed. Not sure ! } + THTTPCli(Obj).WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.HTTPCliAllocateHWnd(Method: TWndMethod) : HWND; +begin +{$IFDEF NOFORMS} + Result := XSocketAllocateHWnd(Self); + SetWindowLong(Result, GWL_WNDPROC, LongInt(@HTTPCliWindowProc)); +{$ELSE} + Result := WSocket.AllocateHWnd(Method); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.HTTPCliDeallocateHWnd(WHandle : HWND); +begin +{$IFDEF NOFORMS} + XSocketDeallocateHWnd(WHandle); +{$ELSE} + WSocket.DeallocateHWnd(WHandle); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor THttpCli.Create(Aowner:TComponent); +begin + inherited create(AOwner); + FWindowHandle := HTTPCliAllocateHWnd(WndProc); + FCtrlSocket := TWSocket.Create(Self); + FProxyPort := DefaultProxyPort; + FContentPost := 'application/x-www-form-urlencoded'; + FAccept := 'image/gif, image/x-xbitmap, ' + + 'image/jpeg, image/pjpeg, */*'; + FAgent := 'Mozilla/3.0 (compatible)'; + FDoAuthor := TStringlist.Create; + FCtrlSocket.OnSessionClosed := SocketSessionClosed; + FCtrlSocket.OnDataAvailable := SocketDataAvailable; + FCtrlSocket.OnSessionConnected := SocketSessionConnected; + FCtrlSocket.OnDataSent := SocketDataSent; + FCtrlSocket.OnDnsLookupDone := SocketDNSLookupDone; + { Added by Eugene Mayevski } + FCtrlSocket.OnSocksError := DoSocksError; + FCtrlSocket.OnSocksConnected := DoSocksConnected; + FCtrlSocket.OnError := SocketErrorTransfer; + { Mayevski additions end } + FRcvdHeader := TStringList.Create; + FReqStream := TMemoryStream.Create; + FState := httpReady; + FLocalAddr := '0.0.0.0'; {bb} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor THttpCli.Destroy; +begin + FDoAuthor.Free; + FCtrlSocket.Free; + FRcvdHeader.Free; + FReqStream.Free; + HTTPCliDeAllocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + case Msg of + WM_HTTP_REQUEST_DONE : WMHttpRequestDone(MsgRec); + WM_HTTP_SET_READY : WMHttpSetReady(MsgRec); + WM_HTTP_LOGIN : WMHttpLogin(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPCli.DoSocksConnected(Sender: TObject; Error: word); +begin + if Assigned(FOnSocksConnected) then FOnSocksConnected(Sender, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPCli.SocketErrorTransfer(Sender : TObject); +begin + if (assigned(FOnSocketError)) then + FOnSocketError(Self); { Substitute Self for subcomponent's Sender. } +end; { SocketErrorTransfer } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPCli.DoSocksAuthState(Sender : TObject; AuthState : TSocksAuthState); +begin + if Assigned(FOnSocksAuthState) then FOnSocksAuthState(Sender, AuthState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPCli.DoSocksError(Sender : TObject; Error : Integer; Msg : String); +begin + if Assigned(FOnSocksError) then FOnSocksError(Sender, Error, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetMultiThreaded(newValue : Boolean); +begin + FMultiThreaded := newValue; + FCtrlSocket.MultiThreaded := newValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetReady; +begin + PostMessage(Handle, WM_HTTP_SET_READY, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.StateChange(NewState : THttpState); +begin + if FState <> NewState then begin + FState := NewState; + TriggerStateChange; + if NewState = httpReady then + TriggerRequestDone; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerStateChange; +begin + if Assigned(FOnStateChange) then + FOnStateChange(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerCookie(const Data : String; var bAccept : Boolean); +begin + if Assigned(FOnCookie) then + FOnCookie(Self, Data, bAccept); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerSessionConnected; +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerDocBegin; +begin + if Assigned(FOnDocBegin) then + FOnDocBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerDocEnd; +begin + if Assigned(FOnDocEnd) then + FOnDocEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerDocData(Data : Pointer; Len : Integer); +begin + if Assigned(FOnDocData) then + FOnDocData(Self, Data, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerSendBegin; +begin + if Assigned(FOnSendBegin) then + FOnSendBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerSendEnd; +begin + if Assigned(FOnSendEnd) then + FOnSendEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerSendData(Data : Pointer; Len : Integer); +begin + if Assigned(FOnSendData) then + FOnSendData(Self, Data, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerHeaderBegin; +begin + FHeaderEndFlag := TRUE; + if Assigned(FOnHeaderBegin) then + FOnHeaderBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerHeaderEnd; +begin + FHeaderEndFlag := FALSE; + if Assigned(FOnHeaderEnd) then + FOnHeaderEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerBeforeHeaderSend( + const Method : String; + Headers : TStrings); +begin + if Assigned(FOnBeforeHeaderSend) then + FOnBeforeHeaderSend(Self, Method, Headers); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerRequestHeaderBegin; +begin + if Assigned(FOnRequestHeaderBegin) then + FOnRequestHeaderBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerRequestHeaderEnd; +begin + if Assigned(FOnRequestHeaderEnd) then + FOnRequestHeaderEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerRequestDone; +begin + PostMessage(Handle, WM_HTTP_REQUEST_DONE, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.WMHttpRequestDone(var msg: TMessage); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, FRequestType, FRequestDoneError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.WMHttpSetReady(var msg: TMessage); +begin + StateChange(httpReady); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure ReplaceExt(var FName : String; const newExt : String); +var + I : Integer; +begin + I := Posn('.', FName, -1); + if I <= 0 then + FName := FName + '.' + newExt + else + FName := Copy(FName, 1, I) + newExt; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.Abort; +var + bFlag : Boolean; +begin + if FState = httpReady then begin + if FCtrlSocket.State <> wsClosed then + FCtrlSocket.Close; { This should never occurs ! } + Exit; + end; + + bFlag := (FState = httpDnsLookup); + StateChange(httpAborting); + + if bFlag then begin + try + FCtrlSocket.CancelDnsLookup; + except + { Ignore any exception } + end; + end; + + FStatusCode := 404; + FReasonPhrase := 'Connection aborted on request'; + FRequestDoneError := httperrAborted; + + if bFlag then + SocketSessionClosed(Self, 0) + else + FCtrlSocket.Close; + StateChange(httpReady); { 13/02/99 } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.Login; +begin + FDnsResult := ''; + StateChange(httpDnsLookup); + FCtrlSocket.LocalAddr := FLocalAddr; {bb} + try + FCtrlSocket.DnsLookup(FHostName); + except + on E: Exception do begin + FStatusCode := 404; + FReasonPhrase := E.Message; + FConnected := FALSE; + StateChange(httpReady); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SocketDNSLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + if FState = httpAborting then + Exit; + FRequestDoneError := Error; + FStatusCode := 404; + FReasonPhrase := 'can''t resolve hostname to IP address'; + SocketSessionClosed(Sender, Error); + end + else begin + FDnsResult := FCtrlSocket.DnsResult; + StateChange(httpDnsLookupDone); { 19/09/98 } + FCtrlSocket.Addr := FDnsResult; + FCtrlSocket.LocalAddr := FLocalAddr; {bb} + FCtrlSocket.Port := FPort; + FCtrlSocket.Proto := 'tcp'; + try + FCtrlSocket.Connect; + except + FRequestDoneError := FCtrlSocket.LastError; + FStatusCode := 404; + FReasonPhrase := 'can''t connect: ' + + WSocketErrorDesc(FCtrlSocket.LastError) + + ' (Error #' + IntToStr(FCtrlSocket.LastError) + ')'; + FCtrlSocket.Close; + SocketSessionClosed(Sender, FCtrlSocket.LastError); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SocketSessionConnected(Sender : TObject; Error : Word); +begin + if Error <> 0 then begin + FRequestDoneError := Error; + FStatusCode := 404; + FReasonPhrase := WSocketErrorDesc(Error) + + ' (Error #' + IntToStr(Error) + ')'; + SocketSessionClosed(Sender, Error); + Exit; + end; + + FConnected := TRUE; + StateChange(httpConnected); + TriggerSessionConnected; + + FNext := GetHeaderLineNext; + StateChange(httpWaitingHeader); + + try + case FRequestType of + httpPOST: + begin + SendRequest('POST', '1.0'); + TriggerSendBegin; + FAllowedToSend := TRUE; + SocketDataSent(FCtrlSocket, 0); + end; + httpHEAD: + begin + SendRequest('HEAD', '1.0'); + end; + httpGET: + begin + SendRequest('GET', '1.0'); + end; + end; + except + Logout; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.Logout; +begin + FCtrlSocket.Close; + FConnected := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SendCommand(const Cmd : String); +const + CRLF : String[2] = #13#10; +var + Buf : String; +begin + Buf := Cmd; + if Assigned(FOnCommand) then + FOnCommand(Self, Buf); + if Length(Buf) > 0 then + FReqStream.Write(Buf[1], Length(Buf)); + FReqStream.Write(CRLF[1], 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SendRequest(const Method, Version: String); +var + Headers : TStrings; + N : Integer; +begin + Headers := TStringList.Create; + try + FReqStream.Clear; + TriggerRequestHeaderBegin; + Headers.Add(method + ' ' + FPath + ' HTTP/' + Version); + if FSender <> '' then + Headers.Add('From: ' + FSender); + if FAccept <> '' then + Headers.Add('Accept: ' + FAccept); + if FReference <> '' then + Headers.Add('Referer: ' + FReference); + if FAcceptLanguage <> '' then + Headers.Add('Accept-Language: ' + FAcceptLanguage); + if (method = 'POST') and (FContentPost <> '') then + Headers.Add('Content-Type: ' + FContentPost); + if FAgent <> '' then + Headers.Add('User-Agent: ' + FAgent); + Headers.Add('Host: ' + FTargetHost); + if FNoCache then + Headers.Add('Pragma: no-cache'); + if method = 'POST' then + Headers.Add('Content-Length: ' + IntToStr(SendStream.Size)); + if FModifiedSince <> 0 then + Headers.Add('If-Modified-Since: ' + + RFC1123_Date(FModifiedSince) + ' GMT'); + if FUsername <> '' then + Headers.Add('Authorization: Basic ' + + EncodeStr(encBase64, FUsername + ':' + FPassword)); + if (FProxy <> '') and (FProxyUsername <> '') then + Headers.Add('Proxy-Authorization: Basic ' + + EncodeStr(encBase64, FProxyUsername + ':' + FProxyPassword)); + if FCookie <> '' then + Headers.Add('Cookie: ' + FCookie); + if (FContentRangeBegin <> '') or (FContentRangeEnd <> '') then begin {JMR!! Added this line!!!} + Headers.Add('Range: bytes=' + FContentRangeBegin + '-' + FContentRangeEnd); {JMR!! Added this line!!!} + FContentRangeBegin := ''; {JMR!! Added this line!!!} + FContentRangeEnd := ''; {JMR!! Added this line!!!} + end; {JMR!! Added this line!!!} + FAcceptRanges := ''; + +{SendCommand('UA-pixels: 1024x768'); } +{SendCommand('UA-color: color8'); } +{SendCommand('UA-OS: Windows 95'); } +{SendCommand('UA-CPU: x86'); } +{SendCommand('User-Agent: Mozilla/3.0 (compatible)');} {; MSIE 3.01; Update a; Windows 95)');} +{SendCommand('Proxy-Connection: Keep-Alive'); } + + TriggerBeforeHeaderSend(Method, Headers); + for N := 0 to Headers.Count - 1 do + SendCommand(Headers[N]); + + TriggerRequestHeaderEnd; + SendCommand(''); + FCtrlSocket.Send(FReqStream.Memory, FReqStream.Size); + FReqStream.Clear; + finally + Headers.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.GetBodyLineNext; +var + Len : Integer; + Data : Pointer; +const + CRLF : String[2] = #13#10; +begin + if FBodyLineCount = 0 then + TriggerDocBegin; + Inc(FBodyLineCount); + + Len := Length(FLastResponse); + if Len > 0 then + Data := @FLastResponse[1] + else + Data := @Len; + FRcvdCount := FRcvdCount + Len; + + if Assigned(FRcvdStream) then + FRcvdStream.WriteBuffer(Data^, Len); + TriggerDocData(Data, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.GetHeaderLineNext; +var + proto : String; + user : String; + pass : String; + port : String; + Host : String; + Path : String; + Field : String; + Data : String; + nSep : Integer; + tmpInt : LongInt; + bAccept : Boolean; + DocExt : String; +begin + if FHeaderLineCount = 0 then + TriggerHeaderBegin; + Inc(FHeaderLineCount); + + { Some server send HTML document without header ! I don't know if it is } + { legal, but it exists (AltaVista Discovery does that). } + if UpperCase(Copy(FLastResponse, 1, 6)) = '' then begin { 15/09/98 } + if FContentType = '' then + FContentType := 'text/html'; + StateChange(httpWaitingBody); + FNext := GetBodyLineNext; + TriggerHeaderEnd; + GetBodyLineNext; + Exit; + end; + + if FLastResponse = '' then begin + if FLocationFlag then begin + TriggerHeaderEnd; + FReceiveLen := 0; + FHeaderLineCount := 0; + FBodyLineCount := 0; + FCtrlSocket.OnSessionClosed := LocationSessionClosed; + FCtrlSocket.Close; + Exit; + end; + { FContentLength = -1 when server doesn't send a value } + if FContentLength = 0 then begin + TriggerHeaderEnd; + SetReady; + Exit; + end; + DocExt := lowercase(ExtractFileExt(FDocName)); + if (DocExt = '.exe') or (DocExt = '') then begin + if FContentType = 'text/html' then + ReplaceExt(FDocName, 'htm'); + end; + + StateChange(httpWaitingBody); + FNext := GetBodyLineNext; + TriggerHeaderEnd; + if FReceiveLen > 0 then begin + SetLength(FLastResponse, FReceiveLen); + Move(FReceiveBuffer, FLastResponse[1], FReceiveLen); + GetBodyLineNext; + FReceiveLen := 0; + end; + if FStatusCode >= 400 then { 01/11/01 } + FCtrlSocket.Close; + Exit; + end; + + FRcvdHeader.Add(FLastResponse); + + nSep := pos(':', FLastResponse); + if (Copy(FLastResponse, 1, 8) = 'HTTP/1.0') or + (Copy(FLastResponse, 1, 8) = 'HTTP/1.1') then begin + FStatusCode := StrToInt(Copy(FLastResponse, 10, 3)); + FReasonPhrase := Copy(FLastResponse, 14, Length(FLastResponse)); + end + else if nSep > 0 then begin + Field := LowerCase(Copy(FLastResponse, 1, nSep - 1)); + { Skip spaces } + Inc(nSep); + while (nSep < Length(FLastResponse)) and + (FLastResponse[nSep] = ' ') do + Inc(nSep); + Data := Copy(FLastResponse, nSep, Length(FLastResponse)); + if Field = 'location' then begin { Change the URL ! } + { URL with relocations: } + { http://www.webcom.com/~wol2wol/ } + { http://www.purescience.com/delphi/ } + { http://www.maintron.com/ } + { http://www.infoseek.com/AddURL/addurl } + { http://www.micronpc.com/ } + { http://www.amazon.com/ } + { http://count.paycounter.com/?fn=0&si=44860&bt=msie&bv=5& } + { co=32&js=1.4&sr=1024x768&re=http://www.thesite.com/you.html } + FLocationFlag := TRUE; + if Proxy <> '' then begin + { We are using a proxy } + if Data[1] = '/' then begin + { Absolute location } + ParseURL(FPath, proto, user, pass, Host, port, Path); + if Proto = '' then + Proto := 'http'; + FLocation := Proto + '://' + Host + Data; + FPath := FLocation; + + if (user <> '') and (pass <> '') then begin + { save user and password given in location @@@} + FUsername := user; + FPassword := pass; + end; + end + else if Copy(Data, 1, 7) <> 'http://' then begin + { Relative location } + FPath := GetBaseUrl(FPath) + Data; + if Proto = '' then + Proto := 'http'; + FLocation := Proto + '://' + FHostName + '/' + FPath; + end + else begin + ParseURL(Data, proto, user, pass, Host, port, Path); + if port <> '' then + FPort := port + else + FPort := '80'; + + if (user <> '') and (pass <> '') then begin + { save user and password given in location @@@} + FUsername := user; + FPassword := pass; + end; + + if (Proto <> '') and (Host <> '') then begin + { We have a full relocation URL } + FTargetHost := Host; + FLocation := Proto + '://' + Host + Path; + FPath := FLocation; + end + else begin + if Proto = '' then + Proto := 'http'; + if FPath = '' then + FLocation := Proto + '://' + FTargetHost + '/' + Host + else if Host = '' then + FLocation := Proto + '://' + FTargetHost + FPath + else + FTargetHost := Host; + end; + end; + end + { We are not using a proxy } + else begin + if Data[1] = '/' then begin + { Absolute location } + FPath := Data; + if Proto = '' then + Proto := 'http'; + FLocation := Proto + '://' + FHostName + FPath; + end + else if Copy(Data, 1, 7) <> 'http://' then begin + { Relative location } + FPath := GetBaseUrl(FPath) + Data; + if Proto = '' then + Proto := 'http'; + FLocation := Proto + '://' + FHostName + '/' + FPath; + end + else begin + ParseURL(Data, proto, user, pass, FHostName, port, FPath); + if port <> '' then + FPort := port + else + FPort := '80'; + + if (user <> '') and (pass <> '') then begin + { save user and password given in location @@@} + FUsername := user; + FPassword := pass; + end; + + if (Proto <> '') and (FHostName <> '') then begin + { We have a full relocation URL } + FTargetHost := FHostName; + if FPath = '' then begin + FPath := '/'; + FLocation := Proto + '://' + FHostName; + end + else + FLocation := Proto + '://' + FHostName + FPath; + end + else begin + if Proto = '' then + Proto := 'http'; + if FPath = '' then begin + FLocation := Proto + '://' + FTargetHost + '/' + FHostName; + FHostName := FTargetHost; + FPath := FLocation; { 26/11/99 } + end + else if FHostName = '' then begin + FLocation := Proto + '://' + FTargetHost + FPath; + FHostName := FTargetHost; + end + else + FTargetHost := FHostName; + end; + end; + end; + end + else if Field = 'content-length' then + FContentLength := StrToInt(Trim(Data)) + else if Field = 'content-range' then begin {JMR!! Added this line!!!} + tmpInt := Pos('-', Data) + 1; {JMR!! Added this line!!!} + FContentRangeBegin := Copy(Data, 7, tmpInt-8); {JMR!! Added this line!!!} + FContentRangeEnd := Copy(Data, tmpInt, Pos('/', Data) - tmpInt); {JMR!! Added this line!!!} + end {JMR!! Added this line!!!} + else if Field = 'accept-ranges' then + FAcceptRanges := Data + else if Field = 'content-type' then + FContentType := LowerCase(Data) + else if Field = 'www-authenticate' then + FDoAuthor.add(Data) + else if Field = 'set-cookie' then begin + bAccept := TRUE; + TriggerCookie(Data, bAccept); + end + { else if Field = 'date' then } + { else if Field = 'mime-version' then } + { else if Field = 'pragma' then } + { else if Field = 'allow' then } + { else if Field = 'server' then } + { else if Field = 'content-encoding' then } + { else if Field = 'expires' then } + { else if Field = 'last-modified' then } + end + else { Ignore all other responses } + ; + + if Assigned(FOnHeaderData) then + FOnHeaderData(Self); + +{ if FStatusCode >= 400 then Moved above 01/11/01 } +{ FCtrlSocket.Close; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.InternalClear; +begin + FRcvdHeader.Clear; + FRequestDoneError := 0; + FDocName := ''; + FStatusCode := 0; + FRcvdCount := 0; + FSentCount := 0; + FHeaderLineCount := 0; + FBodyLineCount := 0; + FContentLength := -1; + FContentType := ''; { 25/09/1999 } + FAllowedToSend := FALSE; + FLocation := FURL; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.DoRequestAsync(Rq : THttpRequest); +var + Proto, User, Pass, Host, Port, Path: String; +begin + if FState <> httpReady then + raise EHttpException.Create('HTTP component is busy', httperrBusy); + + if (Rq = httpPOST) and (not Assigned(FSendStream)) then + raise EHttpException.Create('HTTP component has nothing to post', + httperrNoData); + + { Now clear all internal state variables } + FCtrlSocket.OnSessionClosed := SocketSessionClosed; + StateChange(httpNotConnected); + FRequestType := Rq; + InternalClear; + + { parse url and proxy to FHostName, FPath and FPort } + if FProxy <> '' then begin + ParseURL(FURL, Proto, User, Pass, Host, Port, Path); + FTargetHost := Host; + FPath := FURL; + FDocName := Path; + if User <> '' then + FUserName := User; + if Pass <> '' then + FPassword := Pass; + { We need to remove usercode/Password from the URL given to the proxy } + { but preserve the port } + if Port <> '' then + Port := ':' + Port; + if Proto = '' then + FPath := 'http://'+ Host + Port + Path + else + FPath := Proto + '://' + Host + Port + Path; + ParseURL(FProxy, Proto, User, Pass, Host, Port, Path); + if Port = '' then + Port := ProxyPort; + end + else begin + ParseURL(FURL, Proto, User, Pass, Host, Port, FPath); + FTargetHost := Host; + FDocName := FPath; + if User <> '' then + FUserName := User; + if Pass <> '' then + FPassword := Pass; + if Port = '' then + Port := '80'; + end; + if Proto = '' then + Proto := 'http'; + if FPath = '' then + FPath := '/'; + + AdjustDocName; + + FHostName := host; + FPort := Port; + + { Ask to connect. When connected, we go at SocketSeesionConnected. } + Login; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.AdjustDocName; +var + I : Integer; +begin + I := Pos('?', FDocName); + if I > 0 then + FDocName := Copy(FDocName, 1, I - 1); + + if (FDocName = '') or (FDocName[Length(FDocName)] = '/') then + FDocName := 'document.htm' + else begin + if FDocName[Length(FDocName)] = '/' then + SetLength(FDocName, Length(FDocName) - 1); + FDocName := Copy(FDocName, Posn('/', FDocName, -1) + 1, 255); + I := Pos('?', FDocName); + if I > 0 then + FDocName := Copy(FDocName, 1, I - 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.DoRequestSync(Rq : THttpRequest); +begin + DoRequestAsync(Rq); + +{$IFDEF VER80} + { Delphi 1 has no support for multi-threading } + while FState <> httpReady do + Application.ProcessMessages; +{$ELSE} + if FMultiThreaded then begin + while FState <> httpReady do begin + FCtrlSocket.ProcessMessages; + Sleep(0); + end; + end + else begin + while FState <> httpReady do begin +{$IFNDEF NOFORMS} + Application.ProcessMessages; +{$ELSE} + FCtrlSocket.ProcessMessages; +{$ENDIF} + Sleep(0); + end; + end; +{$ENDIF} + + if FStatusCode >= 400 then + raise EHttpException.Create(FReasonPhrase, FStatusCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.LocationSessionClosed(Sender: TObject; Error: Word); +var + Proto, User, Pass, Host, Port, Path: String; + RealLocation : String; + I : Integer; +begin + { Remove any bookmark from the URL } + I := Pos('#', FLocation); + if I > 0 then + RealLocation := Copy(FLocation, 1, I - 1) + else + RealLocation := FLocation; + + { Parse the URL } + ParseURL(RealLocation, Proto, User, Pass, Host, Port, Path); + FDocName := Path; + AdjustDocName; + FConnected := FALSE; + FLocationFlag := FALSE; + { When relocation occurs doing a POST, new relocated page has to be GET } + if FRequestType = httpPOST then + FRequestType := httpGET; + { Restore normal session closed event } + FCtrlSocket.OnSessionClosed := SocketSessionClosed; + { Trigger the location changed event } + if Assigned(FOnLocationChange) then + FOnLocationChange(Self); + { Clear header from previous operation } + FRcvdHeader.Clear; + { Clear status variables from previous operation } + FHeaderLineCount := 0; + FBodyLineCount := 0; + FContentLength := -1; + FContentType := ''; + FStatusCode := 0; + { Adjust for proxy use (Fixed: Nov 10, 2001) } + if FProxy <> '' then + FPort := ProxyPort; + { Restart at login procedure } + PostMessage(FWindowHandle, WM_HTTP_LOGIN, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.WMHttpLogin(var msg: TMessage); +begin + Login; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SocketSessionClosed(Sender: TObject; Error: Word); +begin + if Error <> 0 then { WM 15 sep 2002 } + FRequestDoneError := Error; { WM 15 sep 2002 } + FConnected := FALSE; + if FHeaderEndFlag then begin + { TriggerHeaderEnd has not been called yet } + TriggerHeaderEnd; + if FLocationFlag then { 28/10/01 } + LocationSessionClosed(Self, 0); + Exit; + end; + if FBodyLineCount > 0 then + TriggerDocEnd; + SetReady; {StateChange(httpReady);} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I : Integer; +begin + I := sizeof(FReceiveBuffer) - FReceiveLen - 1; + if I <= 0 then + raise EHttpException.Create('HTTP line too long', httperrOverflow); + + Len := FCtrlSocket.Receive(@FReceiveBuffer[FReceiveLen], I); + + if FRequestType = httpAbort then + Exit; + + if Len <= 0 then + Exit; + + FReceiveBuffer[FReceiveLen + Len] := #0; + FReceiveLen := FReceiveLen + Len; + + if FState = httpWaitingBody then begin + if FReceiveLen > 0 then begin + SetLength(FLastResponse, FReceiveLen); + Move(FReceiveBuffer, FLastResponse[1], FReceiveLen); + if Assigned(FNext) then + FNext + else + SetReady; {StateChange(httpReady);} + end; + FReceiveLen := 0; + Exit; + end; + + while FReceiveLen > 0 do begin + I := Pos(#10, FReceiveBuffer); + if I <= 0 then + break; + if I > FReceiveLen then + break; + + if (I > 1) and (FReceiveBuffer[I-2] = #13) then + FLastResponse := Copy(FReceiveBuffer, 1, I - 2) + else + FLastResponse := Copy(FReceiveBuffer, 1, I - 1); + +{$IFDEF DUMP} + FDumpBuf := '>|'; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.WriteBuffer(FLastResponse[1], Length(FLastResponse)); + FDumpBuf := '|' + #13#10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} +{$IFDEF VER80} + { Add a nul byte at the end of string for Delphi 1 } + FLastResponse[Length(FLastResponse) + 1] := #0; +{$ENDIF} + FReceiveLen := FReceiveLen - I; + if FReceiveLen > 0 then + Move(FReceiveBuffer[I], FReceiveBuffer[0], FReceiveLen + 1); + + if FState in [httpWaitingHeader, httpWaitingBody] then begin + if Assigned(FNext) then + FNext + else + SetReady; {StateChange(httpReady);} + end + else begin + if Assigned(FOnDataAvailable) then + FOnDataAvailable(Self, Error); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SocketDataSent(Sender : TObject; Error : Word); +var + Len : Integer; +begin + if not FAllowedToSend then + Exit; + + Len := FSendStream.Read(FSendBuffer, sizeof(FSendBuffer)); + if Len <= 0 then begin + FAllowedToSend := FALSE; + TriggerSendEnd; + Exit; + end; + + if Len > 0 then begin + FSentCount := FSentCount + Len; + TriggerSendData(@FSendBuffer, Len); + FCtrlSocket.Send(@FSendBuffer, Len); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the Get process and wait until terminated (blocking) } +procedure THttpCli.Get; +begin + DoRequestSync(httpGet); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the Head process and wait until terminated (blocking) } +procedure THttpCli.Head; +begin + DoRequestSync(httpHEAD); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the Post process and wait until terminated (blocking) } +procedure THttpCli.Post; +begin + DoRequestSync(httpPOST); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the get process and returns immediately (non blocking) } +procedure THttpCli.GetAsync; +begin + DoRequestASync(httpGet); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the head process and returns immediately (non blocking) } +procedure THttpCli.HeadAsync; +begin + DoRequestASync(httpHEAD); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the post process and returns immediately (non blocking) } +procedure THttpCli.PostAsync; +begin + DoRequestASync(httpPOST); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetBaseUrl(const Url : String) : String; +var + I : Integer; +begin + I := 1; + while (I <= Length(Url)) and (Url[I] <> '?') do + Inc(I); + Dec(I); + while (I > 0) and (not (Url[I] in ['/', ':'])) do + Dec(I); + Result := Copy(Url, 1, I); +end; + + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Added by Eugene Mayevski } +procedure THttpCli.SetSocksServer(value : String); +begin + FCtrlSocket.SocksServer := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetSocksLevel(value : String); +begin + FCtrlSocket.SocksLevel := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetSocksPort(value : String); +begin + FCtrlSocket.SocksPort := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetSocksUsercode(value : String); +begin + FCtrlSocket.SocksUsercode := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetSocksPassword(value : String); +begin + FCtrlSocket.SocksPassword := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetSocksAuthentication(value : TSocksAuthentication); +begin + FCtrlSocket.SocksAuthentication := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksServer : String; +begin + result := FCtrlSocket.SocksServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksLevel : String; +begin + result := FCtrlSocket.SocksLevel; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksPort : String; +begin + result := FCtrlSocket.SocksPort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksUsercode : String; +begin + result := FCtrlSocket.SocksUsercode; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksPassword : String; +begin + result := FCtrlSocket.SocksPassword; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksAuthentication : TSocksAuthentication; +begin + result := FCtrlSocket.SocksAuthentication; +end; +{ Mayevski additions end } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Syntax of an URL: protocol://[user[:password]@]server[:port]/path } +procedure ParseURL( + const url : String; + var Proto, User, Pass, Host, Port, Path : String); +var + p, q, i : Integer; + s : String; + CurPath : String; +begin + CurPath := Path; + proto := ''; + User := ''; + Pass := ''; + Host := ''; + Port := ''; + Path := ''; + + if Length(url) < 1 then + Exit; + + { Handle path beginning with "./" or "../". } + { This code handle only simple cases ! } + { Handle path relative to current document directory } + if (Copy(url, 1, 2) = './') then begin + p := Posn('/', CurPath, -1); + if p > Length(CurPath) then + p := 0; + if p = 0 then + CurPath := '/' + else + CurPath := Copy(CurPath, 1, p); + Path := CurPath + Copy(url, 3, Length(url)); + Exit; + end + { Handle path relative to current document parent directory } + else if (Copy(url, 1, 3) = '../') then begin + p := Posn('/', CurPath, -1); + if p > Length(CurPath) then + p := 0; + if p = 0 then + CurPath := '/' + else + CurPath := Copy(CurPath, 1, p); + + s := Copy(url, 4, Length(url)); + { We could have several levels } + while TRUE do begin + CurPath := Copy(CurPath, 1, p-1); + p := Posn('/', CurPath, -1); + if p > Length(CurPath) then + p := 0; + if p = 0 then + CurPath := '/' + else + CurPath := Copy(CurPath, 1, p); + if (Copy(s, 1, 3) <> '../') then + break; + s := Copy(s, 4, Length(s)); + end; + + Path := CurPath + Copy(s, 1, Length(s)); + Exit; + end; + + p := pos('://', url); + q := p; + if p <> 0 then begin + S := Copy(url, 1, p - 1); + for i := 1 to Length(S) do begin + if not (S[i] in UriProtocolSchemeAllowedChars) then begin + q := i; + Break; + end; + end; + if q < p then begin + p := 0; + proto := 'http'; + end; + end; + if p = 0 then begin + if (url[1] = '/') then begin + { Relative path without protocol specified } + proto := 'http'; + p := 1; + if (Length(url) > 1) and (url[2] <> '/') then begin + { Relative path } + Path := Copy(url, 1, Length(url)); + Exit; + end; + end + else if lowercase(Copy(url, 1, 5)) = 'http:' then begin + proto := 'http'; + p := 6; + if (Length(url) > 6) and (url[7] <> '/') then begin + { Relative path } + Path := Copy(url, 6, Length(url)); + Exit; + end; + end + else if lowercase(Copy(url, 1, 7)) = 'mailto:' then begin + proto := 'mailto'; + p := pos(':', url); + end; + end + else begin + proto := Copy(url, 1, p - 1); + inc(p, 2); + end; + s := Copy(url, p + 1, Length(url)); + + p := pos('/', s); + q := pos('?', s); + if (q > 0) and ((q < p) or (p = 0)) then + p := q; + if p = 0 then + p := Length(s) + 1; + Path := Copy(s, p, Length(s)); + s := Copy(s, 1, p-1); + + p := Posn(':', s, -1); + if p > Length(s) then + p := 0; + q := Posn('@', s, -1); + if q > Length(s) then + q := 0; + if (p = 0) and (q = 0) then begin { no user, password or port } + Host := s; + Exit; + end + else if q < p then begin { a port given } + Port := Copy(s, p + 1, Length(s)); + Host := Copy(s, q + 1, p - q - 1); + if q = 0 then + Exit; { no user, password } + s := Copy(s, 1, q - 1); + end + else begin + Host := Copy(s, q + 1, Length(s)); + s := Copy(s, 1, q - 1); + end; + p := pos(':', s); + if p = 0 then + User := s + else begin + User := Copy(s, 1, p - 1); + Pass := Copy(s, p + 1, Length(s)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function EncodeStr(Encoding : THttpEncoding; const Value : String) : String; +begin + Result := EncodeLine(Encoding, @Value[1], Length(Value)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function EncodeLine( + Encoding : THttpEncoding; + SrcData : PChar; + Size : Integer) : String; +var + Offset : Integer; + Pos1 : Integer; + Pos2 : Integer; + I : Integer; +begin + SetLength(Result, Size * 4 div 3 + 4); + FillChar(Result[1], Size * 4 div 3 + 2, #0); + + if Encoding = encUUEncode then begin + Result[1] := Char(((Size - 1) and $3f) + $21); + Size := ((Size + 2) div 3) * 3; + end; + Offset := 2; + Pos1 := 0; + Pos2 := 0; + case Encoding of + encUUEncode: Pos2 := 2; + encBase64, encMime: Pos2 := 1; + end; + Result[Pos2] := #0; + + while Pos1 < Size do begin + if Offset > 0 then begin + Result[Pos2] := Char(ord(Result[Pos2]) or + ((ord(SrcData[Pos1]) and + ($3f shl Offset)) shr Offset)); + Offset := Offset - 6; + Inc(Pos2); + Result[Pos2] := #0; + end + else if Offset < 0 then begin + Offset := Abs(Offset); + Result[Pos2] := Char(ord(Result[Pos2]) or + ((ord(SrcData[Pos1]) and + ($3f shr Offset)) shl Offset)); + Offset := 8 - Offset; + Inc(Pos1); + end + else begin + Result[Pos2] := Char(ord(Result[Pos2]) or + ((ord(SrcData[Pos1]) and $3f))); + Inc(Pos2); + Inc(Pos1); + Result[Pos2] := #0; + Offset := 2; + end; + end; + + case Encoding of + encUUEncode: + begin + if Offset = 2 then + Dec(Pos2); + for i := 2 to Pos2 do + Result[i] := bin2uue[ord(Result[i])+1]; + end; + encBase64, encMime: + begin + if Offset = 2 then + Dec(Pos2); + for i := 1 to Pos2 do + Result[i] := bin2b64[ord(Result[i])+1]; + while (Pos2 and 3) <> 0 do begin + Inc(Pos2); + Result[Pos2] := '='; + end; + end; + end; + SetLength(Result, Pos2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Find the count'th occurence of the s string in the t string. } +{ If count < 0 then look from the back } +function Posn(const s , t : String; Count : Integer) : Integer; +var + i, h, Last : Integer; + u : String; +begin + u := t; + if Count > 0 then begin + Result := Length(t); + for i := 1 to Count do begin + h := Pos(s, u); + if h > 0 then + u := Copy(u, h + 1, Length(u)) + else begin + u := ''; + Inc(Result); + end; + end; + Result := Result - Length(u); + end + else if Count < 0 then begin + Last := 0; + for i := Length(t) downto 1 do begin + u := Copy(t, i, Length(t)); + h := Pos(s, u); + if (h <> 0) and ((h + i) <> Last) then begin + Last := h + i - 1; + Inc(count); + if Count = 0 then + break; + end; + end; + if Count = 0 then + Result := Last + else + Result := 0; + end + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function IsDigit(Ch : Char) : Boolean; +begin + Result := (ch in ['0'..'9']); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function IsXDigit(Ch : char) : Boolean; +begin + Result := (ch in ['0'..'9']) or (ch in ['a'..'f']) or (ch in ['A'..'F']); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function XDigit(Ch : char) : Integer; +begin + if ch in ['0'..'9'] then + Result := ord(Ch) - ord('0') + else + Result := (ord(Ch) and 15) + 9; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function htoin(value : PChar; len : Integer) : Integer; +var + i : Integer; +begin + Result := 0; + i := 0; + while (i < len) and (Value[i] = ' ') do + i := i + 1; + while (i < len) and (isxDigit(Value[i])) do begin + Result := Result * 16 + xdigit(Value[i]); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function htoi2(value : PChar) : Integer; +begin + Result := htoin(value, 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function UrlEncode(S : String) : String; +var + I : Integer; +begin + Result := ''; + for I := 1 to Length(S) do begin + if S[I] in ['0'..'9', 'A'..'Z', 'a'..'z'] then + Result := Result + S[I] + else + Result := Result + '%' + IntToHex(Ord(S[I]), 2); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function UrlDecode(S : String) : String; +var + I : Integer; + Ch : Char; +begin + Result := ''; + I := 1; + while (I <= Length(S)) and (S[I] <> '&') do begin + Ch := S[I]; + if Ch = '%' then begin + Ch := chr(htoi2(@S[I + 1])); + Inc(I, 2); + end + else if Ch = '+' then + Ch := ' '; + Result := Result + Ch; + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/icmp.dcu b/lib/Delphi/Vc32/icmp.dcu new file mode 100644 index 00000000..925a373b Binary files /dev/null and b/lib/Delphi/Vc32/icmp.dcu differ diff --git a/lib/Delphi/Vc32/icmp.pas b/lib/Delphi/Vc32/icmp.pas new file mode 100644 index 00000000..b01646ae --- /dev/null +++ b/lib/Delphi/Vc32/icmp.pas @@ -0,0 +1,449 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This unit encapsulate the ICMP.DLL into an object of type TICMP. + Using this object, you can easily ping any host on your network. + Works only in 32 bits mode (no Delphi 1) under NT or 95. + TICMP is perfect for a console mode program, but if you build a + GUI program, you could use the TPing object wich is a true VCL + encapsulating the TICMP object. Then you can use object inspector + to change properties or event handler. This is much simpler to + use for a GUI program. +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Creation: January 6, 1997 +Version: 1.04 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Dec 13, 1997 V1.01 Added OnEchoRequest and OnEchoReply events and removed the + corresponding OnDisplay event. This require to modify existing + programs. +Mar 15, 1998 V1.02 Deplaced address resolution just before use +Sep 24, 1998 V1.93 Changed TIPAddr and others to LongInt to avoid range error + problems with Delphi 4 +Jan 24, 1999 V1.11 Surfaced Flags property to allow fragmentation check + (Flags = IP_FLAG_DF to enable fragmentation check) + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Icmp; + +interface + +{$IFDEF VER80} +// This source file is *NOT* compatible with Delphi 1 because it uses +// Win 32 features. +{$ENDIF} + +uses + Windows, SysUtils, Classes, WinSock; + +const + IcmpVersion = 102; + IcmpDLL = 'icmp.dll'; + + // IP status codes returned to transports and user IOCTLs. + IP_SUCCESS = 0; + IP_STATUS_BASE = 11000; + IP_BUF_TOO_SMALL = (IP_STATUS_BASE + 1); + IP_DEST_NET_UNREACHABLE = (IP_STATUS_BASE + 2); + IP_DEST_HOST_UNREACHABLE = (IP_STATUS_BASE + 3); + IP_DEST_PROT_UNREACHABLE = (IP_STATUS_BASE + 4); + IP_DEST_PORT_UNREACHABLE = (IP_STATUS_BASE + 5); + IP_NO_RESOURCES = (IP_STATUS_BASE + 6); + IP_BAD_OPTION = (IP_STATUS_BASE + 7); + IP_HW_ERROR = (IP_STATUS_BASE + 8); + IP_PACKET_TOO_BIG = (IP_STATUS_BASE + 9); + IP_REQ_TIMED_OUT = (IP_STATUS_BASE + 10); + IP_BAD_REQ = (IP_STATUS_BASE + 11); + IP_BAD_ROUTE = (IP_STATUS_BASE + 12); + IP_TTL_EXPIRED_TRANSIT = (IP_STATUS_BASE + 13); + IP_TTL_EXPIRED_REASSEM = (IP_STATUS_BASE + 14); + IP_PARAM_PROBLEM = (IP_STATUS_BASE + 15); + IP_SOURCE_QUENCH = (IP_STATUS_BASE + 16); + IP_OPTION_TOO_BIG = (IP_STATUS_BASE + 17); + IP_BAD_DESTINATION = (IP_STATUS_BASE + 18); + + // status codes passed up on status indications. + IP_ADDR_DELETED = (IP_STATUS_BASE + 19); + IP_SPEC_MTU_CHANGE = (IP_STATUS_BASE + 20); + IP_MTU_CHANGE = (IP_STATUS_BASE + 21); + + IP_GENERAL_FAILURE = (IP_STATUS_BASE + 50); + + MAX_IP_STATUS = IP_GENERAL_FAILURE; + + IP_PENDING = (IP_STATUS_BASE + 255); + + // IP header flags + IP_FLAG_DF = $02; // Don't fragment this packet. + + // IP Option Types + IP_OPT_EOL = $00; // End of list option + IP_OPT_NOP = $01; // No operation + IP_OPT_SECURITY = $82; // Security option. + IP_OPT_LSRR = $83; // Loose source route. + IP_OPT_SSRR = $89; // Strict source route. + IP_OPT_RR = $07; // Record route. + IP_OPT_TS = $44; // Timestamp. + IP_OPT_SID = $88; // Stream ID (obsolete) + MAX_OPT_SIZE = $40; + +type + // IP types + TIPAddr = LongInt; // An IP address. + TIPMask = LongInt; // An IP subnet mask. + TIPStatus = LongInt; // Status code returned from IP APIs. + + PIPOptionInformation = ^TIPOptionInformation; + TIPOptionInformation = packed record + TTL: Byte; // Time To Live (used for traceroute) + TOS: Byte; // Type Of Service (usually 0) + Flags: Byte; // IP header flags (usually 0) + OptionsSize: Byte; // Size of options data (usually 0, max 40) + OptionsData: PChar; // Options data buffer + end; + + PIcmpEchoReply = ^TIcmpEchoReply; + TIcmpEchoReply = packed record + Address: TIPAddr; // Replying address + Status: DWord; // IP status value + RTT: DWord; // Round Trip Time in milliseconds + DataSize: Word; // Reply data size + Reserved: Word; // Reserved + Data: Pointer; // Pointer to reply data buffer + Options: TIPOptionInformation; // Reply options + end; + + // IcmpCreateFile: + // Opens a handle on which ICMP Echo Requests can be issued. + // Arguments: + // None. + // Return Value: + // An open file handle or INVALID_HANDLE_VALUE. Extended error information + // is available by calling GetLastError(). + TIcmpCreateFile = function: THandle; stdcall; + + // IcmpCloseHandle: + // Closes a handle opened by ICMPOpenFile. + // Arguments: + // IcmpHandle - The handle to close. + // Return Value: + // TRUE if the handle was closed successfully, otherwise FALSE. Extended + // error information is available by calling GetLastError(). + TIcmpCloseHandle = function(IcmpHandle: THandle): Boolean; stdcall; + + // IcmpSendEcho: + // Sends an ICMP Echo request and returns one or more replies. The + // call returns when the timeout has expired or the reply buffer + // is filled. + // Arguments: + // IcmpHandle - An open handle returned by ICMPCreateFile. + // DestinationAddress - The destination of the echo request. + // RequestData - A buffer containing the data to send in the + // request. + // RequestSize - The number of bytes in the request data buffer. + // RequestOptions - Pointer to the IP header options for the request. + // May be NULL. + // ReplyBuffer - A buffer to hold any replies to the request. + // On return, the buffer will contain an array of + // ICMP_ECHO_REPLY structures followed by options + // and data. The buffer should be large enough to + // hold at least one ICMP_ECHO_REPLY structure + // and 8 bytes of data - this is the size of + // an ICMP error message. + // ReplySize - The size in bytes of the reply buffer. + // Timeout - The time in milliseconds to wait for replies. + // Return Value: + // Returns the number of replies received and stored in ReplyBuffer. If + // the return value is zero, extended error information is available + // via GetLastError(). + TIcmpSendEcho = function(IcmpHandle: THandle; + DestinationAddress: TIPAddr; + RequestData: Pointer; + RequestSize: Word; + RequestOptions: PIPOptionInformation; + ReplyBuffer: Pointer; + ReplySize: DWord; + Timeout: DWord + ): DWord; stdcall; + + // Event handler type declaration for TICMP.OnDisplay event. + TICMPDisplay = procedure(Sender: TObject; Msg : String) of object; + TICMPReply = procedure(Sender: TObject; Error : Integer) of object; + + // The object wich encapsulate the ICMP.DLL + TICMP = class(TObject) + private + hICMPdll : HModule; // Handle for ICMP.DLL + IcmpCreateFile : TIcmpCreateFile; + IcmpCloseHandle : TIcmpCloseHandle; + IcmpSendEcho : TIcmpSendEcho; + hICMP : THandle; // Handle for the ICMP Calls + FReply : TIcmpEchoReply; // ICMP Echo reply buffer + FAddress : String; // Address given + FHostName : String; // Dotted IP of host (output) + FHostIP : String; // Name of host (Output) + FIPAddress : TIPAddr; // Address of host to contact + FSize : Integer; // Packet size (default to 56) + FTimeOut : Integer; // Timeout (default to 4000mS) + FTTL : Integer; // Time To Live (for send) + FFlags : Integer; // Options flags + FOnDisplay : TICMPDisplay; // Event handler to display + FOnEchoRequest : TNotifyEvent; + FOnEchoReply : TICMPReply; + FLastError : DWORD; // After sending ICMP packet + FAddrResolved : Boolean; + procedure ResolveAddr; + public + constructor Create; virtual; + destructor Destroy; override; + function Ping : Integer; + procedure SetAddress(Value : String); + function GetErrorString : String; + + property Address : String read FAddress write SetAddress; + property Size : Integer read FSize write FSize; + property Timeout : Integer read FTimeout write FTimeout; + property Reply : TIcmpEchoReply read FReply; + property TTL : Integer read FTTL write FTTL; + Property Flags : Integer read FFlags write FFlags; + property ErrorCode : DWORD read FLastError; + property ErrorString : String read GetErrorString; + property HostName : String read FHostName; + property HostIP : String read FHostIP; + property OnDisplay : TICMPDisplay read FOnDisplay write FOnDisplay; + property OnEchoRequest : TNotifyEvent read FOnEchoRequest + write FOnEchoRequest; + property OnEchoReply : TICMPReply read FOnEchoReply + write FOnEchoReply; + end; + + TICMPException = class(Exception); + +implementation + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TICMP.Create; +var + WSAData: TWSAData; +begin + hICMP := INVALID_HANDLE_VALUE; + FSize := 56; + FTTL := 64; + FTimeOut := 4000; + + // initialise winsock + if WSAStartup($101, WSAData) <> 0 then + raise TICMPException.Create('Error initialising Winsock'); + + // register the icmp.dll stuff + hICMPdll := LoadLibrary(icmpDLL); + if hICMPdll = 0 then + raise TICMPException.Create('Unable to register ' + icmpDLL); + + @ICMPCreateFile := GetProcAddress(hICMPdll, 'IcmpCreateFile'); + @IcmpCloseHandle := GetProcAddress(hICMPdll, 'IcmpCloseHandle'); + @IcmpSendEcho := GetProcAddress(hICMPdll, 'IcmpSendEcho'); + + if (@ICMPCreateFile = Nil) or + (@IcmpCloseHandle = Nil) or + (@IcmpSendEcho = Nil) then + raise TICMPException.Create('Error loading dll functions'); + + hICMP := IcmpCreateFile; + if hICMP = INVALID_HANDLE_VALUE then + raise TICMPException.Create('Unable to get ping handle'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TICMP.Destroy; +begin + if hICMP <> INVALID_HANDLE_VALUE then + IcmpCloseHandle(hICMP); + if hICMPdll <> 0 then + FreeLibrary(hICMPdll); + WSACleanup; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function MinInteger(X, Y: Integer): Integer; +begin + if X >= Y then + Result := Y + else + Result := X; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TICMP.ResolveAddr; +var + Phe : PHostEnt; // HostEntry buffer for name lookup +begin + // Convert host address to IP address + FIPAddress := inet_addr(PChar(FAddress)); + if FIPAddress <> LongInt(INADDR_NONE) then + // Was a numeric dotted address let it in this format + FHostName := FAddress + else begin + // Not a numeric dotted address, try to resolve by name + Phe := GetHostByName(PChar(FAddress)); + if Phe = nil then begin + FLastError := GetLastError; + if Assigned(FOnDisplay) then + FOnDisplay(Self, 'Unable to resolve ' + FAddress); + Exit; + end; + + FIPAddress := longint(plongint(Phe^.h_addr_list^)^); + FHostName := Phe^.h_name; + end; + + FHostIP := StrPas(inet_ntoa(TInAddr(FIPAddress))); + FAddrResolved := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TICMP.SetAddress(Value : String); +begin + // Only change if needed (could take a long time) + if FAddress = Value then + Exit; + FAddress := Value; + FAddrResolved := FALSE; +// ResolveAddr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TICMP.GetErrorString : String; +begin + case FLastError of + IP_SUCCESS: Result := 'No error'; + IP_BUF_TOO_SMALL: Result := 'Buffer too small'; + IP_DEST_NET_UNREACHABLE: Result := 'Destination network unreachable'; + IP_DEST_HOST_UNREACHABLE: Result := 'Destination host unreachable'; + IP_DEST_PROT_UNREACHABLE: Result := 'Destination protocol unreachable'; + IP_DEST_PORT_UNREACHABLE: Result := 'Destination port unreachable'; + IP_NO_RESOURCES: Result := 'No resources'; + IP_BAD_OPTION: Result := 'Bad option'; + IP_HW_ERROR: Result := 'Hardware error'; + IP_PACKET_TOO_BIG: Result := 'Packet too big'; + IP_REQ_TIMED_OUT: Result := 'Request timed out'; + IP_BAD_REQ: Result := 'Bad request'; + IP_BAD_ROUTE: Result := 'Bad route'; + IP_TTL_EXPIRED_TRANSIT: Result := 'TTL expired in transit'; + IP_TTL_EXPIRED_REASSEM: Result := 'TTL expired in reassembly'; + IP_PARAM_PROBLEM: Result := 'Parameter problem'; + IP_SOURCE_QUENCH: Result := 'Source quench'; + IP_OPTION_TOO_BIG: Result := 'Option too big'; + IP_BAD_DESTINATION: Result := 'Bad Destination'; + IP_ADDR_DELETED: Result := 'Address deleted'; + IP_SPEC_MTU_CHANGE: Result := 'Spec MTU change'; + IP_MTU_CHANGE: Result := 'MTU change'; + IP_GENERAL_FAILURE: Result := 'General failure'; + IP_PENDING: Result := 'Pending'; + else + Result := 'ICMP error #' + IntToStr(FLastError); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TICMP.Ping : Integer; +var + BufferSize: Integer; + pReqData, pData: Pointer; + pIPE: PIcmpEchoReply; // ICMP Echo reply buffer + IPOpt: TIPOptionInformation; // IP Options for packet to send + Msg: String; +begin + Result := 0; + FLastError := 0; + + if not FAddrResolved then + ResolveAddr; + + if FIPAddress = LongInt(INADDR_NONE) then begin + FLastError := IP_BAD_DESTINATION; + if Assigned(FOnDisplay) then + FOnDisplay(Self, 'Invalid host address'); + Exit; + end; + + // Allocate space for data buffer space + BufferSize := SizeOf(TICMPEchoReply) + FSize; + GetMem(pReqData, FSize); + GetMem(pData, FSize); + GetMem(pIPE, BufferSize); + + try + // Fill data buffer with some data bytes + FillChar(pReqData^, FSize, $20); + Msg := 'Pinging from Delphi code written by F. Piette'; + Move(Msg[1], pReqData^, MinInteger(FSize, Length(Msg))); + + pIPE^.Data := pData; + FillChar(pIPE^, SizeOf(pIPE^), 0); + + if Assigned(FOnEchoRequest) then + FOnEchoRequest(Self); + + FillChar(IPOpt, SizeOf(IPOpt), 0); + IPOpt.TTL := FTTL; + IPOpt.Flags := FFlags; + Result := IcmpSendEcho(hICMP, FIPAddress, pReqData, FSize, + @IPOpt, pIPE, BufferSize, FTimeOut); + FLastError := GetLastError; + FReply := pIPE^; + + if Assigned(FOnEchoReply) then + FOnEchoReply(Self, Result); + finally + // Free those buffers + FreeMem(pIPE); + FreeMem(pData); + FreeMem(pReqData); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/mimedec.dcr b/lib/Delphi/Vc32/mimedec.dcr new file mode 100644 index 00000000..529680d8 Binary files /dev/null and b/lib/Delphi/Vc32/mimedec.dcr differ diff --git a/lib/Delphi/Vc32/mimedec.dcu b/lib/Delphi/Vc32/mimedec.dcu new file mode 100644 index 00000000..ac7ac061 Binary files /dev/null and b/lib/Delphi/Vc32/mimedec.dcu differ diff --git a/lib/Delphi/Vc32/mimedec.pas b/lib/Delphi/Vc32/mimedec.pas new file mode 100644 index 00000000..cc501bdd --- /dev/null +++ b/lib/Delphi/Vc32/mimedec.pas @@ -0,0 +1,1576 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: TMimeDecode is a component whose job is to decode MIME encoded + EMail messages (file attach). You can use it for example to + decode messages received with a POP3 or NNTP component. + MIME is described in RFC-1521. Headers are described if RFC-822. +Creation: March 08, 1998 +Version: 1.25 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +QUICK REFERENCE: +---------------- +TMimeDecode take a file or a stream as input and produce several event when +the message is parsed. each event can be used to display or to save to a file +the message parts. + +Two methods can be called to decode either a file or a stream: +procedure DecodeFile(FileName : String); +procedure DecodeStream(aStream : TStream); + +During the decode process, the component trigger several events. You have to +use those events to save data to a file or to display somehow on the +user interface. + +Events are organized by groups of three for message header, part header and +part data: +Message header events: OnHeaderBegin OnHeaderLine OnHeaderEnd +Part header events: OnPartHeaderBegin OnPartHeaderLine OnPartHeaderEnd +Part data events: OnPartDataBegin OnPartDataLine OnPartDataEnd + +The 'Begin' event is triggered once just before the first item will occur. +The 'Line' event is triggered for each item of the given type. +The 'End' event is triggered once after the last item. + +For a multi-part message, we have this sequence: +a) The message header +OnHeaderBegin, then many OnHeaderLine, one for each line in the header. Lines +can be continuated in the message. The event here is triggered with continuated +lines concatenated (so it can be quite large !). After the last header line +has been processed, the OnHeaderEnd is triggered once. +b) The non-significant message part which can be empty. This is part 0. We +get OnPartBegin once, then OnPartLine for each line and finally OnPartEnd once. +c) The first significant part header with his three events, just like the +message header: OnPartHeaderBegin, OnPartHeaderLine and OnPartHeaderEnd. +d) The first significant part data with his three events: OnPartBegin once, +OnPartLine for each line and OnPartEnd once at the end of the part. +It's possible to have an empty part. This gives the OnPartBegin and OnPartEnd +events and NO OnPartLine event. +e) We can have many other parts. The sequence is always the same. We restart +at point (b) here above for each part (header, then data). Note that there is +often en empty part at the end of a message. + +TMimeDecode decode encoded parts using 'base64' and 'quoted-printable' methods. +For those parts, the OnPartLine event will gives DECODED data. Other methods +are passed not decoded. You can use the property ContentTransferEncoding to +know which encoding method is used and add your own decoding mechanism. + +For each OnHeaderLine, OnPartHeaderLine and OnPartLine, you can find the +actual data at the address pointed by the property CurrentData (a PChar). +The reason for a PChar is that the data can be quite large. The data pointed +is a null terminated string. You can get the length using StrLen, or convert +to a string with StrPas. It is more efficient to process the data using a +pointer. Using strings tends to copy the data several times. +The OnPartLine event passes a PChar and a length to the handler. This actully +point to the internal buffer and overwrite the original data (base64 and +quote-printable method produce decoded data smaller tha encoded one). + +>From the message header, the component extract the following values: +>From The message author. Not necessary the real author... + Looks like "Francois Piette" +Dest The message destination (To field, but To is a reserved word) + Looks like "Francois Piette" +Subject The message subject. Free text. +Date The message date. + Look like: Mon, 16 Feb 1998 12:45:11 -0800 +ContentType 'multipart/mixed' or empty. +For details about those header fields and others, read RFC-822 + +For each part, we have the following properties updated (the header is parsed +on the fly): +PartNumber Starting from 0 for the non-significant part +PartLine Starting 1 for the first line of each part or header +PartContentType Such as 'text/plain' or 'application/x-zip-compressed' +PartCharset This is a complement for the PartContentType. +ApplicationType When PartContentType is 'application/something', we + get the 'something' extracted +PartName This is the value for 'name=something' in the + Content-Type header line. +PartEncoding Encoding method (Content-Transfer-Encoding). + Can be used to decode unsupported + methods (supported methods are 'base64' and + 'quoted-printable'. '7bit' and '8bit' does'nt + generally require processing. +PartDisposition Can be 'inline' or 'attachement' and is generally + followed by a 'filename=something' +PartFileName The specified filename in Content-Disposition header + line. Be aware that the file name is not necessary + suitable for windows ! Use it with caution... +For details about those header fields and others, read RFC-1521. + +To write part data to files, you can either implement your own writing in +the OnPartLine event handler, or use the DestStream property. If assigned, +this property will be used to write the data. If not assigned, it will be +ignore. + +To select a file name for each part, you can use the PartFileName property or +the 'PartName' property or a comnination of both. But be aware that those value +can be either missing or even invalid as a filename because the message was +generated with another opertaing system which has different filename +conventions. + +Updates: +Apr 13, 1998 V1.01 Corrected a bug in ProcessLineBase64 which decoded one + byte too much. Thanks to Rune Fredriksen . +Apr 15, 1998 V1.02 Corrected bug in ProcessHeaderLine which retreived only + the first word for each item. + Added the ReturnPath property. +Apr 24, 1998 V1.03 Removed the modification made in version 1.01 ! +Apr 26, 1998 V1.04 Corrected a bug in ReallocMem with Delphi 1 +Aug 27, 1998 V1.05 Corrected a bug in decoding which incorrectly merge + the first message line with the header when the line begon + by a space. Thanks to Mitch Cant for + finding the bug and correction. +Sep 13, 1998 V1.06 Correctly handled unterminated messages. + Correctly handled parts without header. +Dec 26, 1998 V1.07 Added features coded by Eric Fortier + (Embedded mime parts, UUDecode). +Dec 30, 1998 V1.08 Check for header end when a header line begin with a + space or tab character. (Normally a header end with a blank + line, we also accept invalid header line). +Feb 01, 1999 V1.09 Corrected a bug ProcessLineUUDecode where 'end' was not + checked. Thanks to Eric Fortier. +Feb 16, 1999 V1.10 Added UUEncoded embedded parts. Thanks to Eric Fortier. + Corrected a line termination problem in ProcessLineBase64. +Jul 21, 1999 V1.11 Added support for encoded message without multipart. + Added Encoding property with the encoding value. + Thanks to Marcelo S Massuda for pinting this + lack of feature. +Aug 20, 1999 V1.12 Added compile time options. Revised for BCB4. +Nov 25, 1999 V1.13 Changed continuation line character for quoted printable + encoding. By Ken Petersen . + Created GetTokenEx function to take care of comments in header + lines. This affect ProcessPartHeaderLine and ProcessHeaderLine. + Thanks to Boris Daljevic for his code. + Added CharSet property related to main part charset (see also + existing PartCharset property). Thanks to Boris Daljevic + for his code. +Jun 20, 2000 V1.14 Poessler Thomas corrected a bug in + ProcessLineQuotedPrintable. +Jul 02, 2000 V1.15 Added OnMessageEnd event +Jul 15, 2000 V1.16 Added code from Wolfgang Baron + to support content-description header line. + Changed GetToken and GetTokenEx so that a space before a delimiter + will not break token parsing. Outlook generate such invalid + formatting thanks for Arno van Rossum + for finding this bug. + Revised code to handle inline UUEncoded messages. +Jul 21, 2000 V1.17 Use GetValue instead of GetToken to solve problem with + boundaries of embbeded parts. + With help of Jan Bartak . + As suggested by Sebastien Gariepy , I + added PartContentID. +Oct 29, 2000 V1.18 Checked for missing content-type before calling + UUProcessLine. Without the check, a part with a line beginning + with 'begin 666' will be wrongly decoded. +Feb 17, 2001 V1.19 Top of the messages with a field multipart was incorrectly + processed.Property FCharset was not initialized in procedure + MessageBegin. Thanks to Bayanov +Jul 26, 2001 V1.20 Cleared FEncoding in MessageBegin. Thanks to Joel + lauvinerie who found this bug. + Poessler Thomas added new properties: + HeaderName, FileName, HeaderLines, Disposition, EndOfMime, + IsMultipart. +Jul 29, 2001 V1.21 Moved ProcessLineBase64 to public section. Made CurrentData + property read/write. This permit to use Base64 decoding from + outside of the component. + Corrected a glitche with Delphi 1 +May 04, 2002 V1.23 Added "Len" argument to OnInlineDecodeLine event. + Corrected UUDec so that nul is handled as space. Thanks to + arnaud_courrier@yahoo.fr who provided a test case. + Made UUOutDec a little bit faster. +May 10, 2002 V1.24 Accept 'begin 644' as well as 'begin 666' for UUEncoding + start. arnaud_courrier@yahoo.fr found that OE does that. +Nov 01, 2002 V1.25 Changed PChar arguments to Pointer to work around Delphi 7 + bug with PAnsiChar<->PChar. + This will require small changes in your application code: change + PChar args to Pointer and add a PChar cast when using the arg. + Changed Base64 decoding so that is doesn't crash even if input + data is malformed (corrupted message). + Changed UUEncoded detection procedure. Thanks to Arnaud + for providing his code. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MimeDec; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, SysUtils, Classes; + +const + MimeDecodeVersion = 125; + CopyRight : String = ' TMimeDecode (c) 1998-2002 Francois Piette V1.25 '; + +type + TMimeDecodePartLine = procedure (Sender : TObject; + Data : Pointer; + DataLen : Integer) of object; + + TInlineDecodeBegin = procedure (Sender: TObject; Filename: string) of object; + TInlineDecodeLine = procedure (Sender: TObject; Line: Pointer; Len : Integer) of object; + TInlineDecodeEnd = procedure (Sender: TObject; Filename: string) of object; + + TMimeDecode = class(TComponent) + private + FFrom : String; + FDest : String; + FSubject : String; + FDate : String; + FReturnPath : String; + FEncoding : String; + FCharSet : String; + FContentType : String; + FMimeVersion : String; + FHeaderName : String; + FDisposition : String; + FFileName : String; + FHeaderLines : TStrings; + FIsMultipart : Boolean; + FEndOfMime : Boolean; + FPartContentType : String; + FPartEncoding : String; + FPartNumber : Integer; + FPartHeaderBeginSignaled : Boolean; + FPartName : String; + FPartDisposition : String; + FPartContentID : String; + FPartFileName : String; + FPartCharset : String; + FApplicationType : String; + FPartOpened : Boolean; + FHeaderFlag : Boolean; + FLineNum : Integer; + FBuffer : PChar; + FBufferSize : Integer; + FCurrentData : PChar; + FBoundary : String; + FUUProcessFlag : Boolean; + FNext : procedure of object; + FDestStream : TStream; + FOnHeaderBegin : TNotifyEvent; + FOnHeaderLine : TNotifyEvent; + FOnHeaderEnd : TNotifyEvent; + FOnPartHeaderBegin : TNotifyEvent; + FOnPartHeaderLine : TNotifyEvent; + FOnPartHeaderEnd : TNotifyEvent; + FOnPartBegin : TNotifyEvent; + FOnPartLine : TMimeDecodePartLine; + FOnPartEnd : TNotifyEvent; + FOnMessageEnd : TNotifyEvent; + cUUFilename : String; { ##ERIC } + FEmbeddedBoundary : TStringList; { ##ERIC } + cIsEmbedded : Boolean; { ##ERIC } + FOnInlineDecodeBegin : TInlineDecodeBegin; + FOnInlineDecodeLine : TInlineDecodeLine; + FOnInlineDecodeEnd : TInlineDecodeEnd; + procedure TriggerHeaderBegin; virtual; + procedure TriggerHeaderLine; virtual; + procedure TriggerHeaderEnd; virtual; + procedure TriggerPartHeaderBegin; virtual; + procedure TriggerPartHeaderLine; virtual; + procedure TriggerPartHeaderEnd; virtual; + procedure TriggerPartBegin; virtual; + procedure TriggerPartLine(Data : Pointer; DataLen : Integer); virtual; + procedure TriggerPartEnd; virtual; + procedure TriggerMessageEnd; virtual; + + procedure ProcessLineUUDecode; + function UUProcessLine(FCurrentData: PChar): boolean; + procedure ProcessLineQuotedPrintable; + procedure ProcessHeaderLine; + procedure ProcessPartHeaderLine; + procedure ProcessPartLine; + procedure ProcessWaitBoundary; + procedure ProcessMessageLine; + procedure PreparePart; + procedure PrepareNextPart; + procedure ProcessDecodedLine(Line : Pointer; Len : Integer); + procedure InternalDecodeStream(aStream : TStream); + procedure MessageBegin; + procedure MessageEnd; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + + procedure DecodeFile(FileName : String); + procedure DecodeStream(aStream : TStream); + procedure ProcessLineBase64; + property From : String read FFrom; + property Dest : String read FDest; + property Subject : String read FSubject; + property Date : String read FDate; + property ReturnPath : String read FReturnPath; + property ContentType : String read FContentType; + property Encoding : String read FEncoding; + property Charset : String read FCharset; + property MimeVersion : String read FMimeVersion; + property HeaderName : String read FHeaderName; + property Disposition : String read FDisposition; + property FileName : String read FFileName; + property HeaderLines : TStrings read FHeaderLines; + property IsMultipart : Boolean read FIsMultipart; + property EndOfMime : Boolean read FEndOfMime; + property PartContentType : String read FPartContentType; + property PartEncoding : String read FPartEncoding; + property PartName : String read FPartName; + property PartDisposition : String read FPartDisposition; + property PartContentID : String read FPartContentID; + property PartFileName : String read FPartFileName; + property PartCharset : String read FPartCharset; + property ApplicationType : String read FApplicationType; + property PartNumber : Integer read FPartNumber; + property CurrentData : PChar read FCurrentData + write FCurrentData; + property DestStream : TStream read FDestStream + write FDestStream; + published + property OnHeaderBegin : TNotifyEvent read FOnHeaderBegin + write FOnHeaderBegin; + property OnHeaderLine : TNotifyEvent read FOnHeaderLine + write FOnHeaderLine; + property OnHeaderEnd : TNotifyEvent read FOnHeaderEnd + write FOnHeaderEnd; + property OnPartHeaderBegin : TNotifyEvent read FOnPartHeaderBegin + write FOnPartHeaderBegin; + property OnPartHeaderLine : TNotifyEvent read FOnPartHeaderLine + write FOnPartHeaderLine; + property OnPartHeaderEnd : TNotifyEvent read FOnPartHeaderEnd + write FOnPartHeaderEnd; + property OnPartBegin : TNotifyEvent read FOnPartBegin + write FOnPartBegin; + property OnPartLine : TMimeDecodePartLine read FOnPartLine + write FOnPartLine; + property OnPartEnd : TNotifyEvent read FOnPartEnd + write FOnPartEnd; + property OnMessageEnd : TNotifyEvent read FOnMessageEnd + write FOnMessageEnd; + property OnInlineDecodeBegin : TInlineDecodeBegin + read FOnInlineDecodeBegin + write FOnInlineDecodeBegin; + property OnInlineDecodeLine : TInlineDecodeLine + read FOnInlineDecodeLine + write FOnInlineDecodeLine; + property OnInlineDecodeEnd : TInlineDecodeEnd + read FOnInlineDecodeEnd + write FOnInlineDecodeEnd; + end; + +procedure Register; + +implementation + +type + TLookup = array [0..127] of Byte; + +const + Base64In: TLookup = ( + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 255, 255, 255, 64, 255, 255, 255, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 255, 255, 255, 255, 255 + ); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TMimeDecode]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] in [' ', #9]) do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function HexConv(Ch : Char) : Integer; +begin + if Ch in ['0'..'9'] then + Result := Ord(Ch) - Ord('0') + else + Result := (Ord(Ch) and 15) + 9; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TMimeDecode.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FHeaderLines := TStringList.Create; + FIsMultipart := FALSE; + FEndOfMime := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TMimeDecode.Destroy; +begin + if Assigned(FHeaderLines) then begin + FHeaderLines.Destroy; + FHeaderLines := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerHeaderBegin; +begin + if Assigned(FOnHeaderBegin) then + FOnHeaderBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerHeaderLine; +begin + if Assigned(FOnHeaderLine) then + FOnHeaderLine(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerHeaderEnd; +begin + if Assigned(FOnHeaderEnd) then + FOnHeaderEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartHeaderBegin; +begin + if Assigned(FOnPartHeaderBegin) then + FOnPartHeaderBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartHeaderLine; +begin + if Assigned(FOnPartHeaderLine) then + FOnPartHeaderLine(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartHeaderEnd; +begin + if Assigned(FOnPartHeaderEnd) then + FOnPartHeaderEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartBegin; +begin + if Assigned(FOnPartBegin) then + FOnPartBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartLine(Data : Pointer; DataLen : Integer); +begin + if Assigned(FOnPartLine) then + FOnPartLine(Self, Data, DataLen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartEnd; +begin + if Assigned(FOnPartEnd) then + FOnPartEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerMessageEnd; +begin + if Assigned(FOnMessageEnd) then + FOnMessageEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessDecodedLine(Line : Pointer; Len : Integer); +begin + if Len > 0 then begin + if (FPartContentType = '') { Not sure it is always OK ! } + { As such we can't have a MIME part which } + { is uu-encoded. } + and uuprocessline(line) then + Exit; + end; + TriggerPartLine(Line, Len); + + { Write decoded characters to the destination stream } + if Assigned(FDestStream) and (Len > 0) then + FDestStream.WriteBuffer(Line^, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This works if charset="iso-8859-1" ! } +procedure TMimeDecode.ProcessLineQuotedPrintable; +var + SourceIndex : Integer; + DecodedIndex : Integer; + Ch : Char; + Code : Integer; + OldCh : Char; {tap} +begin + SourceIndex := 0; + DecodedIndex := 0; + OldCh := #0;{tap} +{ if (FCurrentData <> nil) and (FCurrentData^ <> #0) then begin --empty line means \r\n} + if (FCurrentData <> nil) then begin + while TRUE do begin + Ch := FCurrentData[SourceIndex]; + if Ch = #0 then begin + { Nov 25, 1999: Ken Petersen told me to insert CRLF } + FCurrentData[DecodedIndex] := #13; + Inc(DecodedIndex); + FCurrentData[DecodedIndex] := #10; + Inc(DecodedIndex); + break; + end; + if Ch <> '=' then begin + FCurrentData[DecodedIndex] := Ch; + Inc(SourceIndex); + Inc(DecodedIndex); + end + else begin + Inc(SourceIndex); + Ch := FCurrentData[SourceIndex]; + if Ch <> #0 then begin + Code := HexConv(Ch); + Inc(SourceIndex); + Ch := FCurrentData[SourceIndex]; + if Ch <> #0 then begin + Code := (Code shl 4) + HexConv(Ch); + Inc(SourceIndex); + end; + FCurrentData[DecodedIndex] := Chr(Code); + Inc(DecodedIndex); + end + else begin {tap: "=\0" means line continuation} + break; {tap} + end; + end; + end; + {tap: if there is no quoted-string-mapping then the first char of the next msgline will be overwritten} + OldCh := FCurrentData[DecodedIndex]; {tap} + FCurrentData[DecodedIndex] := #0; + end; + + ProcessDecodedLine(FCurrentData, DecodedIndex); + if (OldCh <> #0) then {tap} + FCurrentData[DecodedIndex] := OldCh; {tap} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessLineBase64; +var + SourceIndex : Integer; + DataIn0 : Byte; + DataIn1 : Byte; + DataIn2 : Byte; + DataIn3 : Byte; + DecodedIndex : Integer; + Len : Integer; +begin + SourceIndex := 0; + DecodedIndex := 0; + Len := StrLen(FCurrentData); + + { Remove spaces at the end of line } + while (Len > 0) and (FCurrentData[Len - 1] in [#9, ' ']) do + Dec(Len); + + { Skip white spaces at the start of line } + while (SourceIndex < Len) and (FCurrentData[SourceIndex] in [#9, ' ']) do + Inc(SourceIndex); + + { Decode until end of line. Replace coded chars by decoded ones } + { Protect agains malformed messages. Normally we have a length which } + { is multiple of four. But this may be corrupted ! } + while SourceIndex < Len do begin + { "And $7F" will clear 8th bit and avoid range error. If found in } + { a message, it is probably a corrupted message ! } + DataIn0 := Base64In[Byte(FCurrentData[SourceIndex]) and $7F]; + Inc(SourceIndex); + if SourceIndex >= Len then begin + DataIn1 := $40; + DataIn2 := $40; + DataIn3 := $40; + end + else begin + DataIn1 := Base64In[Byte(FCurrentData[SourceIndex]) and $7F]; + Inc(SourceIndex); + if SourceIndex >= Len then begin + DataIn2 := $40; + DataIn3 := $40; + end + else begin + DataIn2 := Base64In[Byte(FCurrentData[SourceIndex]) and $7F]; + Inc(SourceIndex); + if SourceIndex >= Len then + DataIn3 := $40 + else begin + DataIn3 := Base64In[Byte(FCurrentData[SourceIndex]) and $7F]; + Inc(SourceIndex); + end; + end; + end; + + FCurrentData[DecodedIndex] := Char((DataIn0 and $3F) shl 2 + (DataIn1 and $30) shr 4); + if DataIn2 <> $40 then begin + FCurrentData[DecodedIndex + 1] := Char((DataIn1 and $0F) shl 4 + (DataIn2 and $3C) shr 2); + if DataIn3 <> $40 then begin + FCurrentData[DecodedIndex + 2] := Char((DataIn2 and $03) shl 6 + (DataIn3 and $3F)); + Inc(DecodedIndex, 3); + end + else + Inc(DecodedIndex, 2); + end + else + Inc(DecodedIndex, 1); + end; + + { Nul terminate decoded line } + FCurrentData[DecodedIndex] := #0; { 16/02/99 } + ProcessDecodedLine(FCurrentData, DecodedIndex); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function UUDec(Sym : Char): Byte; +begin + if Sym = #0 then + Result := 0 + else + Result := (Ord(Sym) - Ord(' ')) and $3F; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure UUOutDec(buf: PChar; n: Integer; var out1 : String); +begin + case n of + 0: ; + 1: out1 := out1 + Char((UUDec(buf[0]) SHL 2) + (UUDec(buf[1]) SHR 4)); + 2: out1 := out1 + Char((UUDec(buf[0]) SHL 2) + (UUDec(buf[1]) SHR 4)) + + Char((UUDec(buf[1]) SHL 4) + (UUDec(buf[2]) SHR 2)); + else out1 := out1 + Char((UUDec(buf[0]) SHL 2) + (UUDec(buf[1]) SHR 4)) + + Char((UUDec(buf[1]) SHL 4) + (UUDec(buf[2]) SHR 2)) + + Char((UUDec(buf[2]) SHL 6) + (UUDec(buf[3]))); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} +procedure UUOutDec(buf: PChar; n: Integer; var out1 : String); +var + c1, c2, c3: Char; +begin + c1 := Chr((word(UUDec(buf[0])) SHL 2) or (word(UUDec(buf[1])) SHR 4)); + c2 := Chr((word(UUDec(buf[1])) SHL 4) or (word(UUDec(buf[2])) SHR 2)); + c3 := Chr((word(UUDec(buf[2])) SHL 6) or (word(UUDec(buf[3])))); + if n >= 1 then + out1 := out1 + c1; + if n >= 2 then + out1 := out1 + c2; + if n >= 3 then + out1 := out1 + c3; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessLineUUDecode; { ##ERIC } +var + count, Size : Integer; + s : String; + out1 : String; + bp : PChar; + pos1 : Integer; +begin + if FCurrentData^ = #0 then + exit; + s := StrPas(FCurrentData); + + if LowerCase(copy(s, 1, 6)) = 'begin ' then begin + out1:=lowercase(s); + if (Pos('--', out1) > 0) and (Pos('cut here', out1) > 0) then + Exit; + pos1 := Pos(' ', s); + s := Copy(s, pos1 + 1, 255); + pos1 := Pos(' ', s); + s := Copy(s, pos1 + 1, 255); + cUUFilename := s; + exit; + end + else if LowerCase(Copy(s, 1, 3)) = 'end' then begin + out1 := LowerCase(s); + if (Pos('--', out1) > 0) and (Pos('cut here', out1) > 0) then + Exit; + cUUFilename := ''; + exit; + end; + + { if no filename defined yet, exit } + if cUUFilename = '' then + exit; + + { decode the line } + count := UUDec(s[1]); + Size := Count; + if count > 0 then begin + bp := @s[2]; + repeat + UUOutDec(bp, count, out1); + count := count - 3; + bp := bp + 4; + until count <= 0; + end; + + { we're done. copy and leave } + Move(Out1[1], FCurrentData[0], Size); + ProcessDecodedLine(FCurrentData, Size); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function UUSectionBegin( + const Line : String; + var FileName : String) : Boolean; +var + I : Integer; +begin + { A UUEncoded section begins by a line having the syntax: } + { "begin nnn filename" with xxx being a number (unix file permission) } + { We accept xxx with at least 2 digits. Filename is optional. } + Result := FALSE; + FileName := ''; + if CompareText(Copy(Line, 1, 6), 'begin ') = 0 then begin + I := 7; + while I <= Length(Line) do begin + if Line[I] = ' ' then begin + Result := (I > 8); + if Result then + FileName := Copy(Line, I + 1, Length(Line)); + break + end; + if not (Line[I] in ['0'..'9']) then + break; + Inc(I) + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TMimeDecode.UUProcessLine(FCurrentData: PChar): Boolean; +var + s : String; + out1 : String; + count : Integer; + bp : PChar; +begin + Result := TRUE; + S := Trim(StrPas(FCurrentData)); + if S = '' then begin + Result := FALSE; + Exit; + end; + + if (not FUUProcessFlag) and + UUSectionBegin(S, cUUFilename) then begin + out1 := LowerCase(S); + if (Pos('--', out1) > 0) and (Pos('cut here', out1) > 0) then + Exit; + FUUProcessFlag := TRUE; + if Assigned(FOnInlineDecodeBegin) then + FOnInlineDecodeBegin(Self, cUUFilename); + Exit; + end; + + if not FUUProcessFlag then begin + Result := FALSE; + Exit; + end; + + if CompareText(Copy(S, 1, 3), 'end') = 0 then begin + out1 := LowerCase(S); + if (Pos('--', out1) > 0) and (Pos('cut here', out1) > 0) then + Exit; + FUUProcessFlag := FALSE; + if Assigned(FOnInlineDecodeEnd) then + { I also use the filename here in case the client prefer to save } + { data to a stream and save to a file when the decoding is complete } + FOnInlineDecodeEnd(self, cUUfilename); + cUUFilename := ''; + Exit; + end; + + if Assigned(FOnInlineDecodeLine) then begin + { decode the line } + Count := UUDec(S[1]); + if (Count > 0) and (Length(S) > 1) then begin + bp := @S[2]; + repeat + UUOutDec(bp, Count, out1); + Count := Count - 3; + bp := bp + 4; + until Count <= 0; + end; + {$IFDEF VER80} + if Length(Out1) = 0 then + FOnInlineDecodeLine(Self, nil, 0) + else + FOnInlineDecodeLine(Self, @Out1[1], Length(Out1)); + {$ELSE} + FOnInlineDecodeLine(Self, PChar(Out1), Length(Out1)); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function stpblk(PValue : PChar) : PChar; +begin + Result := PValue; + while Result^ in [' ', #9, #10, #13] do + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetValue(Src : PChar; var Dst : String; var Delim : Char) : PChar; +begin + Result := StpBlk(Src); + Dst := ''; + Delim := Result^; + if Delim = '"' then begin + Inc(Result); + while TRUE do begin + Delim := Result^; + if Delim = #0 then + break; + if Delim = '"' then begin + Inc(Result); + Delim := Result^; + break; + end; + Dst := Dst + Delim; + Inc(Result); + end; + end + else begin + while TRUE do begin + Delim := Result^; + if Delim in [':', ' ', ';', '=', #9, #0] then + break; + Dst := Dst + LowerCase(Result^); + Inc(Result); + end; + end; + if Delim in [' ', #9] then begin + Result := stpblk(Result); + if Result^ in [':', ';', '=', #9] then + Inc(Result); + end + else if Delim <> #0 then + Inc(Result); + Result := stpblk(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetToken(Src : PChar; var Dst : String; var Delim : Char) : PChar; +begin + Result := StpBlk(Src); + Dst := ''; + while TRUE do begin + Delim := Result^; + if Delim in [':', ' ', ';', '=', #9, #0] then + break; + Dst := Dst + LowerCase(Result^); + Inc(Result); + end; + if Delim in [' ', #9] then begin + Result := stpblk(Result); + if Result^ in [':', ';', '=', #9] then + Inc(Result); + end + else if Delim <> #0 then + Inc(Result); + Result := stpblk(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Same as GetToken, but take be aware of comments } +function GetTokenEx(Src : PChar; var Dst : String; var Delim : Char) : PChar; +var + Comment: Integer; +begin + Result := StpBlk(Src); + Dst := ''; + Comment := 0; + while TRUE do begin + Delim := Result^; + if Delim = #0 then + break; + if Delim = '(' then begin + Inc(comment); { Comments can be nested } + Inc(Result); + Continue; + end + else if Delim = ')' then begin + Dec(Comment); + Inc(Result); + Continue; + end + else if (Comment = 0) and (Delim in [':', ' ', ';', '=', #9]) then + break; + Dst := Dst + LowerCase(Result^); + Inc(Result); + end; + if Delim in [' ', #9] then begin + Result := stpblk(Result); + if Result^ in [':', ';', '=', #9] then + Inc(Result); + end + else if Delim <> #0 then + Inc(Result); + Result := StpBlk(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetQuoted(Src : PChar; var Dst : String) : PChar; +var + Quote : Char; +begin + Result := StpBlk(Src); + Dst := ''; + Quote := Result^; + if Quote <> #34 then begin { ##ERIC } + Dst := StrPas(Src); { ##ERIC } + Exit; { ##ERIC } + end; { ##ERIC } + + Inc(Result); + while (Result^ <> #0) and (Result^ <> Quote) do begin + Dst := Dst + Result^; + Inc(Result); + end; + Result := stpblk(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.PreparePart; +begin + FPartOpened := FALSE; + TriggerPartEnd; + PrepareNextPart; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessWaitBoundary; { ##ERIC } +var + t : Integer; + s : String; +begin + s := LowerCase(StrPas(FCurrentData)); + if s = FBoundary then begin + PreparePart; + Exit; + end + else begin + { are we in the embedded boundaries ? } + for t := 0 to FEmbeddedBoundary.Count - 1 do begin + if FEmbeddedBoundary[t] = s then begin + cIsEmbedded := true; + PreparePart; + Exit; + end; + end; + + { if not in primary boundary or embedded boundaries, then process it.} + ProcessDecodedLine(FCurrentData, StrLen(FCurrentData)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessMessageLine; +begin + Inc(FLineNum); + if FLineNum = 1 then + TriggerPartBegin; + if FEncoding = 'base64' then + ProcessLineBase64 + else if FEncoding = 'quoted-printable' then + ProcessLineQuotedPrintable + else if FEncoding = 'x-uuencode' then + ProcessLineUUDecode { ##ERIC } + else begin {tap} + ProcessDecodedLine(FCurrentData, StrLen(FCurrentData)); + ProcessDecodedLine(PChar(#13#10), 2); {tap: add \r\n to other encodings} + end; {tap} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.PrepareNextPart; +begin + FPartEncoding := ''; + FPartContentType := ''; + FPartDisposition := ''; + FPartContentID := ''; + FPartName := ''; + FPartFileName := ''; + FHeaderFlag := TRUE; { We begin by a header } + FLineNum := 0; + FUUProcessFlag := FALSE; + FPartHeaderBeginSignaled := FALSE; + FNext := ProcessPartHeaderLine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessPartLine; { ##ERIC } +var + Len : Integer; + t : Integer; + s : String; { ##ERIC } +begin + { Check if end of part (boundary line found) } + if (FCurrentData <> nil) and (FCurrentData^ <> #0) then begin + s := LowerCase(StrPas(FCurrentData)); + if (s = FBoundary) then begin + PreparePart; + exit; + end + else if (s = (FBoundary + '--')) then begin + FEndOfMime := TRUE; + PreparePart; + exit; + end + else begin + for t := 0 to FEmbeddedBoundary.Count - 1 do begin + if (s = FEmbeddedBoundary[t]) or + (s = (FEmbeddedBoundary[t] + '--')) then begin + { we now have to wait for the next part } + PreparePart; + exit; + end + end; + end; + end; + + if not FPartOpened then begin + FPartOpened := TRUE; + TriggerPartBegin; + end; + + if FPartEncoding = 'base64' then + ProcessLineBase64 + else if FPartEncoding = 'quoted-printable' then + ProcessLineQuotedPrintable + else if FPartEncoding = 'x-uuencode' then { ##ERIC } + ProcessLineUUDecode { ##ERIC } + else begin + if FCurrentData = nil then + Len := 0 + else + Len := StrLen(FCurrentData); + ProcessDecodedLine(FCurrentData, Len); + ProcessDecodedLine(PChar(#13#10), 2); {tap: add \r\n to other encodings} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessPartHeaderLine; +var + p : PChar; + Delim : Char; + Token : String; + KeyWord : String; + Value : String; +{ Value1 : String; } +begin + if (FCurrentData = nil) or (FCurrentData^ = #0) then begin + { End of part header } + if not FPartHeaderBeginSignaled then begin + Inc(FPartNumber); + TriggerPartHeaderBegin; + end; + TriggerPartHeaderEnd; + FHeaderFlag := FALSE; { Remember we are no more in a header } + FLineNum := 0; + FUUProcessFlag := FALSE; + FNext := ProcessPartLine; + Exit; + end; + + Inc(FLineNum); + if FLineNum = 1 then begin + Inc(FPartNumber); + FPartHeaderBeginSignaled := TRUE; + TriggerPartHeaderBegin; +{ FEmbeddedBoundary.clear; } + end; + + { A header line can't begin with a space nor tab char. If we got that } + { then we consider the header as begin finished and process line } + if FHeaderFlag and (FCurrentData[0] in [' ', #9]) then begin + TriggerPartHeaderEnd; + FHeaderFlag := FALSE; + FLineNum := 0; + FUUProcessFlag := FALSE; + FNext := ProcessPartLine; + ProcessPartLine; + Exit; + end; + + p := GetToken(FCurrentData, KeyWord, Delim); + if KeyWord = 'content-type' then begin + p := GetTokenEx(p, FPartContentType, Delim); + while Delim = ';' do begin + p := GetToken(p, Token, Delim); + if Delim = '=' then begin + p := GetValue(p, Value, Delim); + if Token = 'name' then + FPartName := Value + else if Token = 'charset' then + FPartCharset := Value + else if Token = 'boundary' then begin + { we have an embedded boundary } + FEmbeddedBoundary.Add('--' + LowerCase(Value)); +{ Value := Value + #0; }{ NUL terminate string for Delphi 1 } +{ GetQuoted(@Value[1], Value1);} { ##ERIC } +{ FEmbeddedBoundary.Add('--' + LowerCase(Value1));} { ##ERIC } + end; { ##ERIC } + end; + end; + end + else if KeyWord = 'content-transfer-encoding' then begin + GetTokenEx(p, FPartEncoding, Delim); + end + else if KeyWord = 'content-id' then begin + FPartContentID := StrPas(p); + if (Length(FPartContentID) >= 2) and + (FPartContentID[1] = '<') and + (FPartContentID[Length(FPartContentID)] = '>') then + FPartContentID := Copy(FPartContentID, 2, Length(FPartContentID) - 2); + end + else if KeyWord = 'content-disposition' then begin + p := GetTokenEx(p, FPartDisposition, Delim); + while Delim = ';' do begin + p := GetToken(p, Token, Delim); + if Delim = '=' then begin + p := GetQuoted(p, Value); + if Token = 'filename' then + FPartFileName := Value; + end; + end; + end + else if (KeyWord = 'content-description') and (FPartFileName = '') then begin + Delim:= ';'; + while Delim = ';' do begin + p := GetToken(p, Token, Delim); + if Delim = '=' then begin + p := GetQuoted(p, Value); + if Token = 'filename' then + FPartFileName := Value; + end; + end; + end; + + TriggerPartHeaderLine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessHeaderLine; +var + p : PChar; + pVal : PChar; + Delim : Char; + Token : String; + Value : String; +begin + if (FCurrentData = nil) or (FCurrentData^ = #0) then begin + FHeaderFlag := FALSE; { We are no more in a header } + TriggerHeaderEnd; + FLineNum := 0; + FUUProcessFlag := FALSE; + if FBoundary = '' then begin + FNext := ProcessMessageLine; + end + else begin + TriggerPartBegin; + FNext := ProcessWaitBoundary; + end; + Exit; + end; + + Inc(FLineNum); + if FLineNum = 1 then + TriggerHeaderBegin; + + p := GetToken(FCurrentData, Token, Delim); + pVal := StpBlk(p); + if Delim = ':' then begin + p := GetTokenEx(p, Value, Delim); + if Token = 'from' then + FFrom := StrPas(pVal) + else if Token = 'to' then + FDest := StrPas(pVal) + else if Token = 'subject' then + FSubject := StrPas(pVal) + else if Token = 'return-path' then begin + FReturnPath := StrPas(pVal); + if (Length(FReturnPath) >= 2) and + (FReturnPath[1] = '<') and + (FReturnPath[Length(FReturnPath)] = '>') then + FReturnPath := Copy(FReturnPath, 2, Length(FReturnPath) - 2); + end + else if Token = 'date' then + FDate := StrPas(pVal) + else if Token = 'mime-version' then + FMimeVersion := StrPas(pVal) + else if Token = 'content-type' then begin + FContentType := Value; + while Delim = ';' do begin + p := GetToken(p, Token, Delim); + if Delim = '=' then begin + p := GetValue(p, Value, Delim); + if Token = 'name' then + FHeaderName := Value + else if Token = 'charset' then + FCharset := Value + else if Token = 'boundary' then begin + FBoundary := '--' + LowerCase(Value); + FIsMultipart := TRUE; + end; { ##ERIC } + end; + end; + end + else if Token = 'content-transfer-encoding' then + FEncoding := Value + else if Token = 'content-disposition' then begin + FDisposition := Value; + while Delim = ';' do begin + p := GetToken(p, Token, Delim); + if Delim = '=' then begin + p := GetValue(p, Value, Delim); +{ p := GetQuoted(p, Value);} + if Token = 'filename' then + FFileName := Value; + end + end + end + end; + FHeaderLines.Add(StrPas(FCurrentData)); + TriggerHeaderLine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.MessageEnd; +begin + if (FBoundary = '') or FPartOpened then + TriggerPartEnd; + TriggerMessageEnd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.MessageBegin; +begin + FApplicationType := ''; + FBoundary := ''; + FCharset := ''; + FContentType := ''; + FCurrentData := nil; + FDate := ''; + FDest := ''; + FDisposition := ''; + FEncoding := ''; + FEndOfMime := FALSE; + FFileName := ''; + FFrom := ''; + FHeaderFlag := TRUE; + FHeaderName := ''; + FIsMultiPart := FALSE; + FLineNum := 0; + FMimeVersion := ''; + FNext := ProcessHeaderLine; + FPartContentType := ''; + FPartCharset := ''; + FPartContentID := ''; + FPartDisposition := ''; + FPartEncoding := ''; + FPartFileName := ''; + FPartHeaderBeginSignaled := FALSE; + FPartName := ''; + FPartNumber := 0; + FPartOpened := FALSE; + FReturnPath := ''; + FSubject := ''; + FUUProcessFlag := FALSE; + FHeaderLines.Clear; + FEmbeddedBoundary.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.DecodeFile(FileName : String); +var + aStream : TStream; +begin + aStream := TFileStream.Create(FileName, fmOpenRead); + try + DecodeStream(aStream); + finally + aStream.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.DecodeStream(aStream : TStream); +begin + FBufferSize := 2048; { Start with a reasonable FBuffer } + GetMem(FBuffer, FBufferSize); + try + cUUFilename := ''; { ##ERIC } + FEmbeddedBoundary := TStringList.Create; { ##ERIC } + try + InternalDecodeStream(aStream); + finally + FEmbeddedBoundary.Free; { ##ERIC } + end; + finally + FreeMem(FBuffer, FBufferSize); + FBuffer := nil; + FBufferSize := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This routine use an intelligent buffer management, trying to move data } +{ the less possible times. The buffer is enlarged as necessary to contains } +{ the largest line we encounter. } +procedure TMimeDecode.InternalDecodeStream(aStream : TStream); +var + RdCnt : LongInt; + nUsed : Integer; + nStart : Integer; + nLast : Integer; + nSearch : Integer; + I, J : Integer; +begin + nUsed := 0; + nStart := 0; + MessageBegin; + while TRUE do begin + nSearch := nStart + nUsed; + RdCnt := aStream.Read(FBuffer[nSearch], + FBufferSize - nUsed - nStart - + 2); { for next char and #0 } + if RdCnt <= 0 then begin + break; + end; + + nUsed := nUsed + RdCnt; + nLast := nStart + nUsed; + + { Nul terminate the FBuffer } + FBuffer[nLast] := #0; + + { Search for terminating line feed } + while TRUE do begin + I := nSearch; + while (I < nLast) and (FBuffer[I] <> #10) do + Inc(I); + if I >= nLast then begin + { We did'nt find any LF in the FBuffer, need to read more ! } + if nStart > (3 * (FBufferSize div 4)) then begin + { Reuse start of FBuffer because 3/4 buffer is unused } + Move(FBuffer[nStart], FBuffer[0], nUsed + 1); + nStart := 0; + end + else begin + { Makes FBuffer larger } + {$IFDEF VER80} + FBuffer := ReallocMem(FBuffer, FBufferSize, FBufferSize + 32); + {$ELSE} + ReallocMem(FBuffer, FBufferSize + 32); + {$ENDIF} + FBufferSize := FBufferSize + 32; + end; + break; + end; + + { We found a line feed, process FBuffer up to this point } + { Remove any preceding CR } + if (I > nStart) and (FBuffer[I - 1] = #13) then + j := I - 1 + else + J := I; + + { We found a LF, if we are processing a header, we must } + { have the next character to see if the line is continuated } + if FHeaderFlag then begin + if I >= (nLast - 1) then begin + { We don't have the next character in our FBuffer, } + { we need to read more data } + { Read a single byte at the end of the FBuffer } + { We have room because we preserved it previously } + RdCnt := aStream.Read(FBuffer[I + 1], 1); + if RdCnt > 0 then begin + { We have read the next char } + Inc(nLast); + Inc(nUsed); + FBuffer[I + 2] := #0; + end; + end; + + if I < nLast then begin + if (not (FBuffer[nStart] in [#10, #13])) and { 27/08/98 } + (FBuffer[I + 1] in [' ', #9]) then begin + { We have a continuation line, replace CR/LF by spaces } + FBuffer[I] := ' '; + FBuffer[J] := ' '; + FBuffer[I + 1] := ' '; + nSearch := I; + { and search new end of line } + continue; + end; + end; + end; + + FBuffer[J] := #0; + FCurrentData := FBuffer + nStart; + + FNext; + FBuffer[J] := #10; {tap: ERROR ? #13} + nStart := I + 1; + nUsed := nLast - nStart; + nSearch := nStart; + end; + end; + { Process the last line } + if nUsed > 0 then begin + FCurrentData := FBuffer + nStart; + FNext; + end; + + MessageEnd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/Delphi/Vc32/nntpcli.dcr b/lib/Delphi/Vc32/nntpcli.dcr new file mode 100644 index 00000000..55e4deda Binary files /dev/null and b/lib/Delphi/Vc32/nntpcli.dcr differ diff --git a/lib/Delphi/Vc32/ping.dcr b/lib/Delphi/Vc32/ping.dcr new file mode 100644 index 00000000..7bc5671f Binary files /dev/null and b/lib/Delphi/Vc32/ping.dcr differ diff --git a/lib/Delphi/Vc32/tncnx.dcr b/lib/Delphi/Vc32/tncnx.dcr new file mode 100644 index 00000000..3e5cfb48 Binary files /dev/null and b/lib/Delphi/Vc32/tncnx.dcr differ diff --git a/lib/Delphi/Vc32/tnemulvt.dcr b/lib/Delphi/Vc32/tnemulvt.dcr new file mode 100644 index 00000000..f171a436 Binary files /dev/null and b/lib/Delphi/Vc32/tnemulvt.dcr differ diff --git a/lib/Delphi/Vc32/tnscript.dcr b/lib/Delphi/Vc32/tnscript.dcr new file mode 100644 index 00000000..30caff81 Binary files /dev/null and b/lib/Delphi/Vc32/tnscript.dcr differ diff --git a/lib/Delphi/Vc32/wait.dcr b/lib/Delphi/Vc32/wait.dcr new file mode 100644 index 00000000..83ac26ea Binary files /dev/null and b/lib/Delphi/Vc32/wait.dcr differ diff --git a/lib/Delphi/Vc32/wait.dcu b/lib/Delphi/Vc32/wait.dcu new file mode 100644 index 00000000..1a4238a0 Binary files /dev/null and b/lib/Delphi/Vc32/wait.dcu differ diff --git a/lib/Delphi/Vc32/wait.pas b/lib/Delphi/Vc32/wait.pas new file mode 100644 index 00000000..002d0613 --- /dev/null +++ b/lib/Delphi/Vc32/wait.pas @@ -0,0 +1,336 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: WAIT.PAS +Object: Delphi component which enable a component or application to + wait for some event, optionnaly displaying a progress bar. +Author: Franois PIETTE +Creation: April, 1996 +Version: 2.13 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jul 22, 1997 Adapted to Delphi 3 +Oct 22, 1997 V2.00 Added WaitVersion constant and Running property +Nov 11, 1997 V2.10 Made a TCustomWait base component with virtual functions. + This will easy the making of descendend components. + Renamed OnWaitEvent -> OnWait + OnTimeOutEvent -> OnTimeout + Added events: + OnWaitStart When the component starts his job. + OnWaiting When the component is waiting. + OnWaitStop When the component stops his job. +Mar 27, 1998 V2.11 Adapted for C++Builder 3 +Apr 20, 1998 V2.12 Removed the second 'r' from 'courrier' +Jul 08, 1998 V2.13 Adadpted for Delphi 4 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Wait; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$IFNDEF VER80} { Not for Delphi 1 } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, ExtCtrls; + +const + WaitVersion = 212; + +type + TWaitEvent = procedure(Sender: TObject; Count : integer) of object; + + TCustomWait = class(TCustomControl) + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + private + FPen : TPen; + FFont : TFont; + FBrush : TBrush; + FCaption : String; + FTimer : TTimer; + FOnWait : TWaitEvent; + FOnWaiting : TNotifyEvent; + FOnWaitStart : TNotifyEvent; + FOnWaitStop : TNotifyEvent; + FOnTimeout : TNotifyEvent; + FModalResult : TModalResult; + FStartVal : Integer; + protected + procedure Paint; override; + procedure TimerEvent(Sender: TObject); + procedure AppMessage(var Msg: TMsg; var Handled: Boolean); + function GetRunning : Boolean; + procedure SetInterval(Value : Word); + function GetInterval : Word; + public + procedure Start; virtual; + procedure Stop; virtual; + procedure StartModal; virtual; + procedure Restart; virtual; + protected + property Caption : String read FCaption write FCaption; + property ModalResult : TModalResult read FModalResult write FModalResult; + property Interval : Word read GetInterval write SetInterval; + property Running : Boolean read GetRunning; + property OnWait : TWaitEvent read FOnWait write FOnWait; + property OnTimeout : TNotifyEvent read FOnTimeout write FOnTimeout; + property OnWaiting : TNotifyEvent read FOnWaiting write FOnWaiting; + property OnWaitStart : TNotifyEvent read FOnWaitStart write FOnWaitStart; + property OnWaitStop : TNotifyEvent read FOnWaitStop write FOnWaitStop; + end; + + TWait = class(TCustomWait) + published + property Caption; + property ModalResult; + property Interval; + property OnWait; + property OnWaiting; + property OnWaitStart; + property OnWaitStop; + property OnTimeout; + property Running; + property Visible; + end; + +procedure Register; + +implementation + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TWait]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] >= '0') and (Value[i] <= '9')do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomWait.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + IsControl := TRUE; + Width := 192; + Height := 32; + Caption := '60'; + FStartVal := 60; + FOnWait := nil; + FBrush := TBrush.Create; + FPen := TPen.Create; + FFont := TFont.Create; + FFont.Size := 8; + FFont.Name := 'Courier'; + FFont.Pitch := fpFixed; + FTimer := TTimer.Create(Self); + FTimer.Enabled := FALSE; + FTimer.OnTimer := TimerEvent; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomWait.Destroy; +begin + FPen.Free; + FFont.Free; + FBrush.Free; + FTimer.Free; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.SetInterval(Value : Word); +begin + FTimer.Interval := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWait.GetInterval : Word; +begin + Result := FTimer.Interval; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Start; +begin + FStartVal := atoi(Caption); + if FStartVal = 0 then begin + FStartVal := 15; + Caption := IntToStr(FStartVal); + end; + FTimer.Enabled := TRUE; + if Assigned(FOnWaitStart) then + FOnWaitStart(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Restart; +begin + Caption := IntToStr(FStartVal); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Stop; +begin + FModalResult := mrOk; + FTimer.Enabled := FALSE; + Caption := IntToStr(FStartVal); + if Assigned(FOnWaitStop) then + FOnWaitStop(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.TimerEvent(Sender: TObject); +var + Count : Integer; +begin + Count := atoi(FCaption) - 1; + + if Assigned(FOnWait) then + FOnWait(Self, Count); + + if Count <= 0 then begin + FTimer.Enabled := FALSE; + FCaption := 'Timeout'; + FModalResult := mrCancel; + Caption := IntToStr(FStartVal); + if Assigned(FOnTimeout) then + FOnTimeout(Self); + end + else begin + FCaption := IntToStr(count); + end; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.AppMessage(var Msg: TMsg; var Handled: Boolean); +begin + if (Msg.Message = WM_LBUTTONDOWN) or +{ (Msg.Message = WM_LBUTTONUP) or } + (Msg.Message = WM_RBUTTONDOWN) or +{ (Msg.Message = WM_RBUTTONUP) or } + (Msg.Message = WM_LBUTTONDBLCLK) or + (Msg.Message = WM_RBUTTONDBLCLK) or + (Msg.Message = WM_KEYDOWN) or +{ (Msg.Message = WM_KEYUP) or } + (Msg.Message = WM_SYSKEYDOWN) {or + (Msg.Message = WM_SYSKEYUP) } + then begin + MessageBeep(MB_OK); + Handled := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWait.GetRunning : Boolean; +begin + Result := FTimer.Enabled; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.StartModal; +var + OldOnMessage : TMessageEvent; +begin + OldOnMessage := Application.OnMessage; + Application.OnMessage := AppMessage; + FModalResult := mrNone; + Start; + while Running do begin + if Assigned(FOnWaiting) then + FOnWaiting(Self); + Application.ProcessMessages; + end; + Application.OnMessage := OldOnMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Paint; +var + Len : Integer; +begin + Len := (atoi(Caption) * (Width - 7)) div FStartVal; + + Canvas.Pen := FPen; + Canvas.Font := FFont; + Canvas.Brush := FBrush; + Canvas.Brush.Color := clWhite; + Canvas.Rectangle(0, 0, Width - 1, Height - 1); + Canvas.Brush.Color := clHighlight; + Canvas.Rectangle(3, 3, 3 + Len, Height - 4); + Canvas.TextOut(4, Height div 2 - 8, FCaption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + + diff --git a/lib/Delphi/Vc32/wsocket.dcr b/lib/Delphi/Vc32/wsocket.dcr new file mode 100644 index 00000000..2d3e5915 Binary files /dev/null and b/lib/Delphi/Vc32/wsocket.dcr differ diff --git a/lib/Delphi/Vc32/wsocket.ico b/lib/Delphi/Vc32/wsocket.ico new file mode 100644 index 00000000..c39b7fc8 Binary files /dev/null and b/lib/Delphi/Vc32/wsocket.ico differ diff --git a/lib/HID/DBT.dcu b/lib/HID/DBT.dcu new file mode 100644 index 00000000..196adf3f Binary files /dev/null and b/lib/HID/DBT.dcu differ diff --git a/lib/HID/DBT.pas b/lib/HID/DBT.pas new file mode 100644 index 00000000..d4258c53 --- /dev/null +++ b/lib/HID/DBT.pas @@ -0,0 +1,596 @@ +{******************************************************************} +{ } +{ Borland Delphi Runtime Library } +{ interface unit } +{ } +{ Portions created by Microsoft are } +{ Copyright (C) 1993-1998 Microsoft Corporation. } +{ All Rights Reserved. } +{ } +{ The original file is: dbt.h, released 24 May 1993 } +{ The original Pascal code is: dbt.pas, released 01 Jan 1998 } +{ The initial developer of the Pascal code is Tom Deprez } +{ (Tom.Deprez@village.uunet.be) } +{ } +{ Portions created by Tom Deprez are } +{ Copyright (C) 1999-2000 Tom Deprez. } +{ } +{ Contributor(s): } +{ Robert Marquardt : pointed out that TWMDeviceChange } +{ is better placed inside dbt.pas } +{ } +{ } +{ Obtained through: } +{ } +{ Joint Endeavour of Delphi Innovators (Project JEDI) } +{ } +{ You may retrieve the latest version of this file at the Project } +{ JEDI home page, located at http://delphi-jedi.org } +{ } +{ The contents of this file are used with permission, subject to } +{ the Mozilla Public License Version 1.1 (the "License"); you may } +{ not use this file except in compliance with the License. You may } +{ obtain a copy of the License at } +{ http://www.mozilla.org/MPL/MPL-1.1.html } +{ } +{ Software distributed under the License is distributed on an } +{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or } +{ implied. See the License for the specific language governing } +{ rights and limitations under the License. } +{ } +{******************************************************************} + +unit DBT; + +interface + +(*$HPPEMIT '' *) +(*$HPPEMIT '#include ' *) +(*$HPPEMIT '' *) + +uses + Windows; + +{ * + * BroadcastSpecialMessage constants + * } + +const + {$EXTERNALSYM WM_DEVICECHANGE} + WM_DEVICECHANGE = $0219; + + +{ * + * Broadcast message and receipient flags. + * + * Note that there is a third "flag". If the wParam has: + * + * bit 15 on: lparam is a pointer and bit 14 is meaningfull. + * bit 15 off: lparam is just a UNLONG data type. + * + * bit 14 on: lparam is a pointer to an ASCIIZ string. + * bit 14 off: lparam is a pointer to a binary struture starting with + * a dword describing the length of the structure. + * } + +const + {$EXTERNALSYM BSF_QUERY} + BSF_QUERY = $00000001; + {$EXTERNALSYM BSF_IGNORECURRENTTASK} + BSF_IGNORECURRENTTASK = $00000002; { Meaningless for VxDs } + {$EXTERNALSYM BSF_FLUSHDISK} + BSF_FLUSHDISK = $00000004; { Shouldn't be used by VxDs } + {$EXTERNALSYM BSF_NOHANG} + BSF_NOHANG = $00000008; + {$EXTERNALSYM BSF_POSTMESSAGE} + BSF_POSTMESSAGE = $00000010; + {$EXTERNALSYM BSF_FORCEIFHUNG} + BSF_FORCEIFHUNG = $00000020; + {$EXTERNALSYM BSF_NOTIMEOUTIFNOTHUNG} + BSF_NOTIMEOUTIFNOTHUNG = $00000040; + {$EXTERNALSYM BSF_MSGSRV32ISOK} + BSF_MSGSRV32ISOK = DWORD($80000000); { Called synchronously from PM API } + {$EXTERNALSYM BSF_MSGSRV32ISOK_BIT} + BSF_MSGSRV32ISOK_BIT = 31; { Called synchronously from PM API } + {$EXTERNALSYM BSM_ALLCOMPONENTS} + BSM_ALLCOMPONENTS = $00000000; + {$EXTERNALSYM BSM_VXDS} + BSM_VXDS = $00000001; + {$EXTERNALSYM BSM_NETDRIVER} + BSM_NETDRIVER = $00000002; + {$EXTERNALSYM BSM_INSTALLABLEDRIVERS} + BSM_INSTALLABLEDRIVERS = $00000004; + {$EXTERNALSYM BSM_APPLICATIONS} + BSM_APPLICATIONS = $00000008; + + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_APPYBEGIN + * lParam = (not used) + * + * 'Appy-time is now available. This message is itself sent + * at 'Appy-time. + * + * Message = WM_DEVICECHANGE + * wParam = DBT_APPYEND + * lParam = (not used) + * + * 'Appy-time is no longer available. This message is*NOT* sent + * at 'Appy-time. (It cannot be, because 'Appy-time is gone.) + * + * NOTE! It is possible for DBT_APPYBEGIN and DBT_APPYEND to be sent + * multiple times during a single Windows session. Each appearance of + * 'Appy-time is bracketed by these two messages, but 'Appy-time may + * momentarily become unavailable during otherwise normal Windows + * processing. The current status of 'Appy-time availability can always + * be obtained from a call to _SHELL_QueryAppyTimeAvailable. + * } + +const + {$EXTERNALSYM DBT_APPYBEGIN} + DBT_APPYBEGIN = $0000; + {$EXTERNALSYM DBT_APPYEND} + DBT_APPYEND = $0001; + + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_DEVNODES_CHANGED + * lParam = 0 + * + * send when configmg finished a process tree batch. Some devnodes + * may have been added or removed. This is used by ring3 people which + * need to be refreshed whenever any devnode changed occur (like + * device manager). People specific to certain devices should use + * DBT_DEVICE* instead. + * } + +const + {$EXTERNALSYM DBT_DEVNODES_CHANGED} + DBT_DEVNODES_CHANGED = $0007; + + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_QUERYCHANGECONFIG + * lParam = 0 + * + * sent to ask if a config change is allowed + * } + +const + {$EXTERNALSYM DBT_QUERYCHANGECONFIG} + DBT_QUERYCHANGECONFIG = $0017; + + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_CONFIGCHANGED + * lParam = 0 + * + * sent when a config has changed + * } + +const + {$EXTERNALSYM DBT_CONFIGCHANGED} + DBT_CONFIGCHANGED = $0018; + + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_CONFIGCHANGECANCELED + * lParam = 0 + * + * someone cancelled the config change + * } + +const + {$EXTERNALSYM DBT_CONFIGCHANGECANCELED} + DBT_CONFIGCHANGECANCELED = $0019; + + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_MONITORCHANGE + * lParam = new resolution to use (LOWORD=x, HIWORD=y) + * if 0, use the default res for current config + * + * this message is sent when the display monitor has changed + * and the system should change the display mode to match it. + * } + +const + {$EXTERNALSYM DBT_MONITORCHANGE} + DBT_MONITORCHANGE = $001B; + + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_SHELLLOGGEDON + * lParam = 0 + * + * The shell has finished login on: VxD can now do Shell_EXEC. + * } + +const + {$EXTERNALSYM DBT_SHELLLOGGEDON} + DBT_SHELLLOGGEDON = $0020; + + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_CONFIGMGAPI + * lParam = CONFIGMG API Packet + * + * CONFIGMG ring 3 call. + * } + +const + {$EXTERNALSYM DBT_CONFIGMGAPI32} + DBT_CONFIGMGAPI32 = $0022; + + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_VXDINITCOMPLETE + * lParam = 0 + * + * CONFIGMG ring 3 call. + * + +const + {$EXTERNALSYM DBT_VXDINITCOMPLETE} + DBT_VXDINITCOMPLETE = $0023; + + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_VOLLOCK* + * lParam = pointer to VolLockBroadcast structure described below + * + * Messages issued by IFSMGR for volume locking purposes on WM_DEVICECHANGE. + * All these messages pass a pointer to a struct which has no pointers. + * } + +const + {$EXTERNALSYM DBT_VOLLOCKQUERYLOCK} + DBT_VOLLOCKQUERYLOCK = $8041; + {$EXTERNALSYM DBT_VOLLOCKLOCKTAKEN} + DBT_VOLLOCKLOCKTAKEN = $8042; + {$EXTERNALSYM DBT_VOLLOCKLOCKFAILED} + DBT_VOLLOCKLOCKFAILED = $8043; + {$EXTERNALSYM DBT_VOLLOCKQUERYUNLOCK} + DBT_VOLLOCKQUERYUNLOCK = $8044; + {$EXTERNALSYM DBT_VOLLOCKLOCKRELEASED} + DBT_VOLLOCKLOCKRELEASED = $8045; + {$EXTERNALSYM DBT_VOLLOCKUNLOCKFAILED} + DBT_VOLLOCKUNLOCKFAILED = $8046; + + +{ * + * Device broadcast header + * } + +type + PDevBroadcastHdr = ^TDevBroadcastHdr; + {$EXTERNALSYM _DEV_BROADCAST_HDR} + _DEV_BROADCAST_HDR = packed record + dbch_size: DWORD; + dbch_devicetype: DWORD; + dbch_reserved: DWORD; + end; + TDevBroadcastHdr = _DEV_BROADCAST_HDR; + {$EXTERNALSYM DEV_BROADCAST_HDR} + DEV_BROADCAST_HDR = _DEV_BROADCAST_HDR; + + +{ * + * Structure for volume lock broadcast + * } + +type + PVolLockBroadcast = ^TVolLockBroadcast; + {$EXTERNALSYM VolLockBroadcast} + VolLockBroadcast = packed record + vlb_dbh: TDevBroadcastHdr; + vlb_owner: DWORD; + vlb_perms: Byte; + vlb_lockType: Byte; + vlb_drive: Byte; + vlb_flags: Byte; + end; + TVolLockBroadcast = VolLockBroadcast; + +{ * + * Values for vlb_perms + * } + +const + {$EXTERNALSYM LOCKP_ALLOW_WRITES} + LOCKP_ALLOW_WRITES = $01; { Bit 0 set - allow writes } + {$EXTERNALSYM LOCKP_FAIL_WRITES} + LOCKP_FAIL_WRITES = $00; { Bit 0 clear - fail writes } + {$EXTERNALSYM LOCKP_FAIL_MEM_MAPPING} + LOCKP_FAIL_MEM_MAPPING = $02; { Bit 1 set - fail memory mappings } + {$EXTERNALSYM LOCKP_ALLOW_MEM_MAPPING} + LOCKP_ALLOW_MEM_MAPPING = $00; { Bit 1 clear - allow memory mappings } + {$EXTERNALSYM LOCKP_USER_MASK} + LOCKP_USER_MASK = $03; { Mask for user lock flags } + {$EXTERNALSYM LOCKP_LOCK_FOR_FORMAT} + LOCKP_LOCK_FOR_FORMAT = $04; { Level 0 lock for format } + +{ * + * Values for vlb_flags + * } + +const + {$EXTERNALSYM LOCKF_LOGICAL_LOCK} + LOCKF_LOGICAL_LOCK = $00; { Bit 0 clear - logical lock } + {$EXTERNALSYM LOCKF_PHYSICAL_LOCK} + LOCKF_PHYSICAL_LOCK = $01; { Bit 0 set - physical lock } + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_NODISKSPACE + * lParam = drive number of drive that is out of disk space (1-based) + * + * Message issued by IFS manager when it detects that a drive is run out of + * free space. + * } + +const + {$EXTERNALSYM DBT_NO_DISK_SPACE} + DBT_NO_DISK_SPACE = $0047; + + +{ * + * Message = WM_DEVICECHANGE + * wParam = DBT_LOW_DISK_SPACE + * lParam = drive number of drive that is low on disk space (1-based) + * + * Message issued by VFAT when it detects that a drive it has mounted + * has the remaning free space below a threshold specified by the + * registry or by a disk space management application. + * The broadcast is issued by VFAT ONLY when space is either allocated + * or freed by VFAT. + * } + +const + {$EXTERNALSYM DBT_LOW_DISK_SPACE} + DBT_LOW_DISK_SPACE = $0048; + + {$EXTERNALSYM DBT_CONFIGMGPRIVATE} + DBT_CONFIGMGPRIVATE = $7FFF; + + +{ * + * The following messages are for WM_DEVICECHANGE. The immediate list + * is for the wParam. ALL THESE MESSAGES PASS A POINTER TO A STRUCT + * STARTING WITH A DWORD SIZE AND HAVING NO POINTER IN THE STRUCT. + * } + +const + {$EXTERNALSYM DBT_DEVICEARRIVAL} + DBT_DEVICEARRIVAL = $8000; { system detected a new device } + {$EXTERNALSYM DBT_DEVICEQUERYREMOVE} + DBT_DEVICEQUERYREMOVE = $8001; { wants to remove, may fail } + {$EXTERNALSYM DBT_DEVICEQUERYREMOVEFAILED} + DBT_DEVICEQUERYREMOVEFAILED = $8002; { removal aborted } + {$EXTERNALSYM DBT_DEVICEREMOVEPENDING} + DBT_DEVICEREMOVEPENDING = $8003; { about to remove, still avail. } + {$EXTERNALSYM DBT_DEVICEREMOVECOMPLETE} + DBT_DEVICEREMOVECOMPLETE = $8004; { device is gone } + {$EXTERNALSYM DBT_DEVICETYPESPECIFIC} + DBT_DEVICETYPESPECIFIC = $8005; { type specific event } + {$EXTERNALSYM DBT_CUSTOMEVENT} + DBT_CUSTOMEVENT = $8006; { user-defined event } + {$EXTERNALSYM DBT_DEVTYP_OEM} + DBT_DEVTYP_OEM = $00000000; { oem-defined device type } + {$EXTERNALSYM DBT_DEVTYP_DEVNODE} + DBT_DEVTYP_DEVNODE = $00000001; { devnode number } + {$EXTERNALSYM DBT_DEVTYP_VOLUME} + DBT_DEVTYP_VOLUME = $00000002; { logical volume } + {$EXTERNALSYM DBT_DEVTYP_PORT} + DBT_DEVTYP_PORT = $00000003; { serial, parallel } + {$EXTERNALSYM DBT_DEVTYP_NET} + DBT_DEVTYP_NET = $00000004; { network resource } + {$EXTERNALSYM DBT_DEVTYP_DEVICEINTERFACE} + DBT_DEVTYP_DEVICEINTERFACE = $00000005; { device interface class } + {$EXTERNALSYM DBT_DEVTYP_HANDLE} + DBT_DEVTYP_HANDLE = $00000006; { file system handle } + +type + {$EXTERNALSYM _DEV_BROADCAST_HEADER} + _DEV_BROADCAST_HEADER = packed record + dbcd_size: DWORD; + dbcd_devicetype: DWORD; + dbcd_reserved: DWORD; + end; + TDevBroadcastHeader = _DEV_BROADCAST_HEADER; + + PDevBroadcastOem = ^TDevBroadcastOem; + {$EXTERNALSYM _DEV_BROADCAST_OEM} + _DEV_BROADCAST_OEM = packed record + dbco_size: DWORD; + dbco_devicetype: DWORD; + dbco_reserved: DWORD; + dbco_identifier: DWORD; + dbco_suppfunc: DWORD; + end; + TDevBroadcastOem = _DEV_BROADCAST_OEM; + {$EXTERNALSYM DEV_BROADCAST_OEM} + DEV_BROADCAST_OEM = _DEV_BROADCAST_OEM; + + PDevBroadcastDevNode = ^TDevBroadcastDevNode; + {$EXTERNALSYM _DEV_BROADCAST_DEVNODE} + _DEV_BROADCAST_DEVNODE = packed record + dbcd_size: DWORD; + dbcd_devicetype: DWORD; + dbcd_reserved: DWORD; + dbcd_devnode: DWORD; + end; + TDevBroadcastDevNode = _DEV_BROADCAST_DEVNODE; + {$EXTERNALSYM DEV_BROADCAST_DEVNODE} + DEV_BROADCAST_DEVNODE = _DEV_BROADCAST_DEVNODE; + + PDevBroadcastVolume = ^TDevBroadcastVolume; + {$EXTERNALSYM _DEV_BROADCAST_VOLUME} + _DEV_BROADCAST_VOLUME = packed record + dbcv_size: DWORD; + dbcv_devicetype: DWORD; + dbcv_reserved: DWORD; + dbcv_unitmask: DWORD; + dbcv_flags: Word; + end; + TDevBroadcastVolume = _DEV_BROADCAST_VOLUME; + {$EXTERNALSYM DEV_BROADCAST_VOLUME} + DEV_BROADCAST_VOLUME = _DEV_BROADCAST_VOLUME; + +const + {$EXTERNALSYM DBTF_MEDIA} + DBTF_MEDIA = $0001; { media commings and goings } + {$EXTERNALSYM DBTF_NET} + DBTF_NET = $0002; { network volume } + +type + PDevBroadCastPortA = ^TDevBroadCastPortA; + {$EXTERNALSYM _DEV_BROADCAST_PORT_A} + _DEV_BROADCAST_PORT_A = packed record + dbcp_size: DWORD; + dbcp_devicetype: DWORD; + dbcp_reserved: DWORD; + dbcp_name: array[0..0] of AnsiChar; + end; + TDevBroadCastPortA = _DEV_BROADCAST_PORT_A; + {$EXTERNALSYM DEV_BROADCAST_PORT_A} + DEV_BROADCAST_PORT_A = _DEV_BROADCAST_PORT_A; + PDevBroadCastPortW = ^TDevBroadCastPortW; + {$EXTERNALSYM _DEV_BROADCAST_PORT_W} + _DEV_BROADCAST_PORT_W = packed record + dbcp_size: DWORD; + dbcp_devicetype: DWORD; + dbcp_reserved: DWORD; + dbcp_name: array[0..0] of WideChar; + end; + TDevBroadCastPortW = _DEV_BROADCAST_PORT_W; + {$EXTERNALSYM DEV_BROADCAST_PORT_W} + DEV_BROADCAST_PORT_W = _DEV_BROADCAST_PORT_W; + PDevBroadCastPort = PDevBroadCastPortA; + +type + PDevBroadcastNet = ^TDevBroadcastNet; + {$EXTERNALSYM _DEV_BROADCAST_NET} + _DEV_BROADCAST_NET = packed record + dbcn_size: DWORD; + dbcn_devicetype: DWORD; + dbcn_reserved: DWORD; + dbcn_resource: DWORD; + dbcn_flags: DWORD; + end; + TDevBroadcastNet = _DEV_BROADCAST_NET; + {$EXTERNALSYM DEV_BROADCAST_NET} + DEV_BROADCAST_NET = _DEV_BROADCAST_NET; + + PDevBroadcastDeviceInterfaceA = ^TDevBroadcastDeviceInterfaceA; + {$EXTERNALSYM _DEV_BROADCAST_DEVICEINTERFACE_A} + _DEV_BROADCAST_DEVICEINTERFACE_A = packed record + dbcc_size: DWORD; + dbcc_devicetype: DWORD; + dbcc_reserved: DWORD; + dbcc_classguid: TGUID; + dbcc_name: Array[0..0] of AnsiChar; + end; + TDevBroadcastDeviceInterfaceA = _DEV_BROADCAST_DEVICEINTERFACE_A; + {$EXTERNALSYM DEV_BROADCAST_DEVICEINTERFACE_A} + DEV_BROADCAST_DEVICEINTERFACE_A = _DEV_BROADCAST_DEVICEINTERFACE_A; + PDevBroadcastDeviceInterfaceW = ^TDevBroadcastDeviceInterfaceW; + {$EXTERNALSYM _DEV_BROADCAST_DEVICEINTERFACE_W} + _DEV_BROADCAST_DEVICEINTERFACE_W = packed record + dbcc_size: DWORD; + dbcc_devicetype: DWORD; + dbcc_reserved: DWORD; + dbcc_classguid: TGUID; + dbcc_name: Array[0..0] of WideChar; + end; + TDevBroadcastDeviceInterfaceW = _DEV_BROADCAST_DEVICEINTERFACE_W; + {$EXTERNALSYM DEV_BROADCAST_DEVICEINTERFACE_W} + DEV_BROADCAST_DEVICEINTERFACE_W = _DEV_BROADCAST_DEVICEINTERFACE_W; + PDevBroadcastDeviceInterface = PDevBroadcastDeviceInterfaceA; + + {$EXTERNALSYM _DEV_BROADCAST_HANDLE} + PDevBroadcastHandle = ^TDevBroadcastHandle; + _DEV_BROADCAST_HANDLE = packed record + dbch_size: DWORD; + dbch_devicetype: DWORD; + dbch_reserved: DWORD; + dbch_handle: THandle; { file handle used in call to RegisterDeviceNotification } + dbch_hdevnotify: DWORD; { HDEVNOTIFY returned from RegisterDeviceNotification } + + { The following 3 fields are only valid if wParam is DBT_CUSTOMEVENT. } + + dbch_eventguid: TGUID; + dbch_nameoffset: DWORD; { offset (bytes) of variable-length string buffer (-1 if none)} + dbch_data: Array[0..0] of BYTE; { variable-sized buffer, potentially containing binary and/or text data } + end; + TDevBroadcastHandle = _DEV_BROADCAST_HANDLE; + {$EXTERNALSYM DEV_BROADCAST_HANDLE} + DEV_BROADCAST_HANDLE = _DEV_BROADCAST_HANDLE; + +const + {$EXTERNALSYM DBTF_RESOURCE} + DBTF_RESOURCE = $00000001; { network resource } + {$EXTERNALSYM DBTF_XPORT} + DBTF_XPORT = $00000002; { new transport coming or going } + {$EXTERNALSYM DBTF_SLOWNET} + DBTF_SLOWNET = $00000004; { new incoming transport is slow } + { (dbcn_resource undefined for now) } + {$EXTERNALSYM DBT_VPOWERDAPI} + DBT_VPOWERDAPI = $8100; { VPOWERD API for Win95 } + + +{ * + * User-defined message types all use wParam = 0xFFFF with the + * lParam a pointer to the structure below. + * + * dbud_dbh - DEV_BROADCAST_HEADER must be filled in as usual. + * + * dbud_szName contains a case-sensitive ASCIIZ name which names the + * message. The message name consists of the vendor name, a backslash, + * then arbitrary user-defined ASCIIZ text. For example: + * + * "WidgetWare\QueryScannerShutdown" + * "WidgetWare\Video Q39S\AdapterReady" + * + * After the ASCIIZ name, arbitrary information may be provided. + * Make sure that dbud_dbh.dbch_size is big enough to encompass + * all the data. And remember that nothing in the structure may + * contain pointers. + * } + +const + {$EXTERNALSYM DBT_USERDEFINED} + DBT_USERDEFINED = $FFF; + +type + {$EXTERNALSYM _DEV_BROADCAST_USERDEFINED} + _DEV_BROADCAST_USERDEFINED = packed record + dbud_dbh: TDevBroadcastHdr; + dbud_szName: Array[0..0] of Char; { ASCIIZ name } + {dbud_rgbUserDefined[]: Byte; // User-defined contents } + end; + +{ added own message type for WM_DEVICECHANGE } + +type + TWMDeviceChange = record + Msg: Cardinal; + Event: UINT; + dwData: Pointer; + Result: LongInt; + end; + +implementation + +end. + diff --git a/lib/HID/DEMOS/CollectionDemo/Project1.dof b/lib/HID/DEMOS/CollectionDemo/Project1.dof new file mode 100644 index 00000000..767e8565 --- /dev/null +++ b/lib/HID/DEMOS/CollectionDemo/Project1.dof @@ -0,0 +1,83 @@ +[Compiler] +A=1 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages= +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1031 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= diff --git a/lib/HID/DEMOS/CollectionDemo/Project1.dpr b/lib/HID/DEMOS/CollectionDemo/Project1.dpr new file mode 100644 index 00000000..b9181a5e --- /dev/null +++ b/lib/HID/DEMOS/CollectionDemo/Project1.dpr @@ -0,0 +1,14 @@ +program Project1; + +uses + Forms, + Unit1 in 'Unit1.pas' {Form1}, + Hid in '..\..\Hid.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/HID/DEMOS/CollectionDemo/Project1.res b/lib/HID/DEMOS/CollectionDemo/Project1.res new file mode 100644 index 00000000..c8f2b95f Binary files /dev/null and b/lib/HID/DEMOS/CollectionDemo/Project1.res differ diff --git a/lib/HID/DEMOS/CollectionDemo/Unit1.dcu b/lib/HID/DEMOS/CollectionDemo/Unit1.dcu new file mode 100644 index 00000000..1e914501 Binary files /dev/null and b/lib/HID/DEMOS/CollectionDemo/Unit1.dcu differ diff --git a/lib/HID/DEMOS/CollectionDemo/Unit1.dfm b/lib/HID/DEMOS/CollectionDemo/Unit1.dfm new file mode 100644 index 00000000..3f81e680 Binary files /dev/null and b/lib/HID/DEMOS/CollectionDemo/Unit1.dfm differ diff --git a/lib/HID/DEMOS/CollectionDemo/Unit1.pas b/lib/HID/DEMOS/CollectionDemo/Unit1.pas new file mode 100644 index 00000000..29e0de50 --- /dev/null +++ b/lib/HID/DEMOS/CollectionDemo/Unit1.pas @@ -0,0 +1,67 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + ComCtrls, HidControllerClass, Hid; + +type + TForm1 = class(TForm) + JvHidDeviceController1: TJvHidDeviceController; + TreeView1: TTreeView; + procedure JvHidDeviceController1DeviceChange(Sender: TObject); + function JvHidDeviceController1Enumerate(HidDev: TJvHidDevice; + Index: Integer): Boolean; + private + { Private declarations } + FRoot: TTreeNode; + public + { Public declarations } + procedure EnumerateNodes(HidDev: TJvHidDevice; Parent: TTreeNode; Idx: WORD); + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +procedure TForm1.JvHidDeviceController1DeviceChange(Sender: TObject); +begin + TreeView1.Items.Clear; + FRoot := TreeView1.Items.Add(nil,'HID-Devices'); + JvHidDeviceController1.Enumerate; +end; + +procedure TForm1.EnumerateNodes(HidDev: TJvHidDevice; Parent: TTreeNode; Idx: WORD); +var + Node: TTreeNode; +begin + repeat + Node := TreeView1.Items.AddChild(Parent, + Format('CollectionType=%d Usage=%d UsagePage=%d',[HidDev.LinkCollectionNodes[Idx].CollectionType, + HidDev.LinkCollectionNodes[Idx].LinkUsage, + HidDev.LinkCollectionNodes[Idx].LinkUsagePage])); + if (HidDev.LinkCollectionNodes[Idx].FirstChild <> 0) and + (HidDev.LinkCollectionNodes[Idx].FirstChild <> Idx) then + EnumerateNodes(HidDev, Node, HidDev.LinkCollectionNodes[Idx].FirstChild); + if Idx = HidDev.LinkCollectionNodes[Idx].NextSibling then + Break; + Idx := HidDev.LinkCollectionNodes[Idx].NextSibling; + until Idx = 0; +end; + +function TForm1.JvHidDeviceController1Enumerate(HidDev: TJvHidDevice; + Index: Integer): Boolean; +var + Node: TTreeNode; +begin + Node := TreeView1.Items.AddChild(FRoot, HidDev.ProductName); + EnumerateNodes(HidDev, Node, 1); + TreeView1.FullExpand; + Result := True; +end; + +end. diff --git a/lib/HID/DEMOS/HidClassDemo/HidClassDemo.dof b/lib/HID/DEMOS/HidClassDemo/HidClassDemo.dof new file mode 100644 index 00000000..de0cd982 --- /dev/null +++ b/lib/HID/DEMOS/HidClassDemo/HidClassDemo.dof @@ -0,0 +1,91 @@ +[Compiler] +A=1 +B=0 +C=0 +D=0 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=0 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=0 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages=VCL40;VCLX40;VCLDB40;VCLDBX40;VCLSMP40;QRPT40;TEEUI40;TEEDB40;TEE40;DSS40;ibevnt40;VCLMID40;NMFAST40;INETDB40;INET40 +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1031 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[HistoryLists\hlUnitOutputDirectory] +Count=1 +Item0=..\..\BIN diff --git a/lib/HID/DEMOS/HidClassDemo/HidClassDemo.dpr b/lib/HID/DEMOS/HidClassDemo/HidClassDemo.dpr new file mode 100644 index 00000000..0b8a51c6 --- /dev/null +++ b/lib/HID/DEMOS/HidClassDemo/HidClassDemo.dpr @@ -0,0 +1,17 @@ +program HidClassDemo; + +uses + Forms, + Unit1 in 'Unit1.pas' {HidClassDemoForm}, + SetupApi in '..\..\SetupApi.pas', + Hid in '..\..\Hid.pas', + HidControllerClass in '..\..\HidControllerClass.pas', + DBT in '..\..\DBT.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(THidClassDemoForm, HidClassDemoForm); + Application.Run; +end. diff --git a/lib/HID/DEMOS/HidClassDemo/HidClassDemo.res b/lib/HID/DEMOS/HidClassDemo/HidClassDemo.res new file mode 100644 index 00000000..8230c92d Binary files /dev/null and b/lib/HID/DEMOS/HidClassDemo/HidClassDemo.res differ diff --git a/lib/HID/DEMOS/HidClassDemo/Unit1.dcu b/lib/HID/DEMOS/HidClassDemo/Unit1.dcu new file mode 100644 index 00000000..ccad0248 Binary files /dev/null and b/lib/HID/DEMOS/HidClassDemo/Unit1.dcu differ diff --git a/lib/HID/DEMOS/HidClassDemo/Unit1.dfm b/lib/HID/DEMOS/HidClassDemo/Unit1.dfm new file mode 100644 index 00000000..8b98198f Binary files /dev/null and b/lib/HID/DEMOS/HidClassDemo/Unit1.dfm differ diff --git a/lib/HID/DEMOS/HidClassDemo/Unit1.pas b/lib/HID/DEMOS/HidClassDemo/Unit1.pas new file mode 100644 index 00000000..b7d31cd3 --- /dev/null +++ b/lib/HID/DEMOS/HidClassDemo/Unit1.pas @@ -0,0 +1,85 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, Registry, Menus, + HidControllerClass, Hid; + +type + // the simple form we show + THidClassDemoForm = class(TForm) + ListBox1: TListBox; + MainMenu: TMainMenu; + QuitMenuItem: TMenuItem; + FileMenu: TMenuItem; + procedure DeviceChanges (Sender: TObject); + procedure DeviceUnplug (HidDev: TJvHidDevice); + function Enumeration (HidDev: TJvHidDevice; Index: Integer): Boolean; + procedure FormCreate (Sender: TObject); + procedure QuitMenuItemClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + HidController: TJvHidDeviceController; + end; + +var + HidClassDemoForm: THidClassDemoForm; + +implementation + +{$R *.DFM} + +procedure THidClassDemoForm.DeviceChanges(Sender: TObject); +begin + ListBox1.Clear; + HidController.Enumerate; +end; + +procedure THidClassDemoForm.DeviceUnplug(HidDev: TJvHidDevice); +var + p: String; +begin + p := HidDev.VendorName; + if p = '' then + p := HidDev.RegDescr; + ShowMessage('Unplug of ' + Format('%x %x %s: %s',[HidDev.Attributes.VendorID,HidDev.Attributes.ProductID,p,HidDev.ProductName])); +end; + +function THidClassDemoForm.Enumeration(HidDev: TJvHidDevice; Index: Integer): Boolean; +var + p: string; +begin + with HidDev do + begin + p := VendorName; + if p = '' then + p := RegDescr; + ListBox1.Items.Add(Format('VendorID=%x ProductID=%x %s: %s',[Attributes.VendorID,Attributes.ProductID,p,ProductName])); + end; + Result := True; +end; + +procedure THidClassDemoForm.FormCreate(Sender: TObject); +begin + // the HidController handles all HidDevices + // later this will be replaced by a placeable component + HidController := TJvHidDeviceController.Create(Self); + with HidController do + begin + OnDeviceChange := DeviceChanges; + OnEnumerate := Enumeration; + OnDeviceUnplug := DeviceUnplug; + Enumerate; + end; +end; + +procedure THidClassDemoForm.QuitMenuItemClick(Sender: TObject); +begin + Close; +end; + +end. diff --git a/lib/HID/DEMOS/ReadWriteDemo/SimpleHIDWrite.dof b/lib/HID/DEMOS/ReadWriteDemo/SimpleHIDWrite.dof new file mode 100644 index 00000000..767e8565 --- /dev/null +++ b/lib/HID/DEMOS/ReadWriteDemo/SimpleHIDWrite.dof @@ -0,0 +1,83 @@ +[Compiler] +A=1 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages= +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1031 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= diff --git a/lib/HID/DEMOS/ReadWriteDemo/SimpleHIDWrite.dpr b/lib/HID/DEMOS/ReadWriteDemo/SimpleHIDWrite.dpr new file mode 100644 index 00000000..347b9291 --- /dev/null +++ b/lib/HID/DEMOS/ReadWriteDemo/SimpleHIDWrite.dpr @@ -0,0 +1,14 @@ +program SimpleHIDWrite; + +uses + Forms, + Unit1 in 'Unit1.pas' {Form1}, + Unit2 in 'Unit2.pas' {InfoForm}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/HID/DEMOS/ReadWriteDemo/SimpleHIDWrite.res b/lib/HID/DEMOS/ReadWriteDemo/SimpleHIDWrite.res new file mode 100644 index 00000000..c8f2b95f Binary files /dev/null and b/lib/HID/DEMOS/ReadWriteDemo/SimpleHIDWrite.res differ diff --git a/lib/HID/DEMOS/ReadWriteDemo/Unit1.dcu b/lib/HID/DEMOS/ReadWriteDemo/Unit1.dcu new file mode 100644 index 00000000..5a3d9ffa Binary files /dev/null and b/lib/HID/DEMOS/ReadWriteDemo/Unit1.dcu differ diff --git a/lib/HID/DEMOS/ReadWriteDemo/Unit1.dfm b/lib/HID/DEMOS/ReadWriteDemo/Unit1.dfm new file mode 100644 index 00000000..0f70aa02 Binary files /dev/null and b/lib/HID/DEMOS/ReadWriteDemo/Unit1.dfm differ diff --git a/lib/HID/DEMOS/ReadWriteDemo/Unit1.pas b/lib/HID/DEMOS/ReadWriteDemo/Unit1.pas new file mode 100644 index 00000000..94c1fc17 --- /dev/null +++ b/lib/HID/DEMOS/ReadWriteDemo/Unit1.pas @@ -0,0 +1,228 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + HidControllerClass, StdCtrls; + +type + TForm1 = class(TForm) + ListBox1: TListBox; + WriteButton: TButton; + ReportID: TEdit; + Label1: TLabel; + Label2: TLabel; + Edit1: TEdit; + Edit2: TEdit; + Edit3: TEdit; + Edit4: TEdit; + Edit5: TEdit; + Edit6: TEdit; + Edit7: TEdit; + Edit8: TEdit; + Label3: TLabel; + ReadButton: TButton; + InfoButton: TButton; + JvHidDeviceController1: TJvHidDeviceController; + procedure JvHidDeviceController1DeviceChange(Sender: TObject); + function JvHidDeviceController1Enumerate(HidDev: TJvHidDevice; + Index: Integer): Boolean; + procedure WriteButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure ReadButtonClick(Sender: TObject); + procedure InfoButtonClick(Sender: TObject); + private + { Private declarations } + DevList: TList; + public + { Public declarations } + end; + +var + Form1: TForm1; + TheDev: TJvHidDevice; + +implementation + +uses Unit2; + +{$R *.DFM} + +procedure TForm1.JvHidDeviceController1DeviceChange(Sender: TObject); +var + I: Integer; +begin + if DevList <> nil then + begin + for I := 0 to DevList.Count-1 do + begin + TheDev := DevList.Items[I]; + TheDev.Free; + end; + DevList.Clear; + end + else + DevList := TList.Create; + ListBox1.Clear; + JvHidDeviceController1.Enumerate; + if ListBox1.Items.Count > 0 then + ListBox1.ItemIndex := 0; +end; + +function TForm1.JvHidDeviceController1Enumerate(HidDev: TJvHidDevice; + Index: Integer): Boolean; +var + Dev: TJvHidDevice; +begin + if HidDev.ProductName <> '' then + ListBox1.Items.Add(HidDev.ProductName) + else + ListBox1.Items.Add(Format('Device VID=%x PID=%x',[HidDev.Attributes.VendorID,HidDev.Attributes.ProductID])); + JvHidDeviceController1.CheckOutByIndex(Dev,Index); + DevList.Add(Dev); + Result := True; +end; + +function ToInt(str: string): Cardinal; +begin + Result := 0; + if str <> '' then + Result := StrToInt('$'+str); +end; + +procedure TForm1.WriteButtonClick(Sender: TObject); +var + buf: array [0..8] of Byte; + written: Cardinal; + towrite: Cardinal; +begin + buf[0] := ToInt(ReportID.Text); + buf[1] := ToInt(Edit1.Text); + buf[2] := ToInt(Edit2.Text); + buf[3] := ToInt(Edit3.Text); + buf[4] := ToInt(Edit4.Text); + buf[5] := ToInt(Edit5.Text); + buf[6] := ToInt(Edit6.Text); + buf[7] := ToInt(Edit7.Text); + buf[8] := ToInt(Edit8.Text); + towrite := 1; + if Edit1.Text <> '' then + towrite := 2; + if Edit2.Text <> '' then + towrite := 3; + if Edit3.Text <> '' then + towrite := 4; + if Edit4.Text <> '' then + towrite := 5; + if Edit5.Text <> '' then + towrite := 6; + if Edit6.Text <> '' then + towrite := 7; + if Edit7.Text <> '' then + towrite := 8; + if Edit8.Text <> '' then + towrite := 9; + written := 0; + if (Edit1.Text = '') and (towrite > 2) then + Edit1.Text := '00'; + if (Edit2.Text = '') and (towrite > 3) then + Edit2.Text := '00'; + if (Edit3.Text = '') and (towrite > 4) then + Edit3.Text := '00'; + if (Edit4.Text = '') and (towrite > 5) then + Edit4.Text := '00'; + if (Edit5.Text = '') and (towrite > 6) then + Edit5.Text := '00'; + if (Edit6.Text = '') and (towrite > 7) then + Edit6.Text := '00'; + if (Edit7.Text = '') and (towrite > 8) then + Edit7.Text := '00'; + + if (ListBox1.Items.Count > 0) and (ListBox1.ItemIndex >= 0) and (towrite > 1) then + begin + TheDev := DevList.Items[ListBox1.ItemIndex]; + Label3.Caption := Format('Writing %d Bytes...',[towrite]); + HidCheck(TheDev.WriteFile(buf,towrite,written)); + Label3.Caption := Format('%d Bytes written',[written]); + end; +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + JvHidDeviceController1.OnDeviceChange := JvHidDeviceController1DeviceChange; + JvHidDeviceController1.OnEnumerate := JvHidDeviceController1Enumerate; + JvHidDeviceController1.Enumerate; + if ListBox1.Items.Count > 0 then + ListBox1.ItemIndex := 0; +end; + +procedure TForm1.FormDestroy(Sender: TObject); +var + I: Integer; +begin + for I := 0 to DevList.Count-1 do + begin + TheDev := DevList.Items[I]; + JvHidDeviceController1.CheckIn(TheDev); + end; + DevList.Free; +end; + +procedure TForm1.ReadButtonClick(Sender: TObject); +var + buf: array [0..8] of Byte; + toread: Cardinal; + read: Cardinal; +begin + if (ListBox1.Items.Count > 0) and (ListBox1.ItemIndex >= 0) then + begin + TheDev := DevList.Items[ListBox1.ItemIndex]; + toread := TheDev.Caps.InputReportByteLength; + buf[0] := ToInt(ReportID.Text); + Label3.Caption := Format('Reading %d Bytes...',[toread]); + Update; + HidCheck(TheDev.ReadFile(buf,toread,read)); + Label3.Caption := Format('%d Bytes read',[read]); + Edit1.Text := ''; + Edit2.Text := ''; + Edit3.Text := ''; + Edit4.Text := ''; + Edit5.Text := ''; + Edit6.Text := ''; + Edit7.Text := ''; + Edit8.Text := ''; + if read > 1 then + Edit1.Text := Format('%x',[buf[1]]); + if read > 2 then + Edit2.Text := Format('%x',[buf[2]]); + if read > 3 then + Edit3.Text := Format('%x',[buf[3]]); + if read > 4 then + Edit4.Text := Format('%x',[buf[4]]); + if read > 5 then + Edit5.Text := Format('%x',[buf[5]]); + if read > 6 then + Edit6.Text := Format('%x',[buf[6]]); + if read > 7 then + Edit7.Text := Format('%x',[buf[7]]); + if read > 8 then + Edit8.Text := Format('%x',[buf[8]]); + end; +end; + +procedure TForm1.InfoButtonClick(Sender: TObject); +var + Form: TInfoForm; +begin + if (ListBox1.Items.Count > 0) and (ListBox1.ItemIndex >= 0) then + begin + TheDev := DevList.Items[ListBox1.ItemIndex]; + Form := TInfoForm.Create(Self); + Form.ShowModal; + Form.Free; + end; +end; + +end. diff --git a/lib/HID/DEMOS/ReadWriteDemo/Unit2.dcu b/lib/HID/DEMOS/ReadWriteDemo/Unit2.dcu new file mode 100644 index 00000000..60d8b964 Binary files /dev/null and b/lib/HID/DEMOS/ReadWriteDemo/Unit2.dcu differ diff --git a/lib/HID/DEMOS/ReadWriteDemo/Unit2.dfm b/lib/HID/DEMOS/ReadWriteDemo/Unit2.dfm new file mode 100644 index 00000000..8f905327 Binary files /dev/null and b/lib/HID/DEMOS/ReadWriteDemo/Unit2.dfm differ diff --git a/lib/HID/DEMOS/ReadWriteDemo/Unit2.pas b/lib/HID/DEMOS/ReadWriteDemo/Unit2.pas new file mode 100644 index 00000000..dc1bc0ff --- /dev/null +++ b/lib/HID/DEMOS/ReadWriteDemo/Unit2.pas @@ -0,0 +1,73 @@ +unit Unit2; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls; + +type + TInfoForm = class(TForm) + DevStrings: TListBox; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Vid: TLabel; + Pid: TLabel; + Vers: TLabel; + Label5: TLabel; + Label6: TLabel; + Label7: TLabel; + Label8: TLabel; + InputLen: TLabel; + OutputLen: TLabel; + FeatureLen: TLabel; + Label9: TLabel; + Label10: TLabel; + VendorName: TLabel; + ProductName: TLabel; + Label11: TLabel; + SerialNo: TLabel; + LangStrings: TListBox; + Label12: TLabel; + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + InfoForm: TInfoForm; + +implementation + +uses Unit1; + +{$R *.DFM} + +procedure TInfoForm.FormCreate(Sender: TObject); +var + I: Integer; +begin + VendorName.Caption := TheDev.VendorName; + ProductName.Caption := TheDev.ProductName; + SerialNo.Caption := TheDev.SerialNumber; + Vid.Caption := IntToHex(TheDev.Attributes.VendorID, 4); + Pid.Caption := IntToHex(TheDev.Attributes.ProductID, 4); + Vers.Caption := IntToHex(TheDev.Attributes.VersionNumber, 4); + if TheDev.Caps.InputReportByteLength > 0 then + InputLen.Caption := IntToHex(TheDev.Caps.InputReportByteLength-1, 1); + if TheDev.Caps.OutputReportByteLength > 0 then + OutputLen.Caption := IntToHex(TheDev.Caps.OutputReportByteLength-1, 1); + if TheDev.Caps.FeatureReportByteLength > 0 then + FeatureLen.Caption := IntToHex(TheDev.Caps.FeatureReportByteLength-1, 1); + for I := 1 to 255 do + if TheDev.DeviceStrings[I] <> '' then + DevStrings.Items.Add(Format('%3d) %s',[I+1,TheDev.DeviceStrings[I]])); + for I := 0 to TheDev.LanguageStrings.Count - 1 do + LangStrings.Items.Add(TheDev.LanguageStrings[I]); +end; + +end. diff --git a/lib/HID/DEMOS/ThreadDemo/GreyMouser.dof b/lib/HID/DEMOS/ThreadDemo/GreyMouser.dof new file mode 100644 index 00000000..767e8565 --- /dev/null +++ b/lib/HID/DEMOS/ThreadDemo/GreyMouser.dof @@ -0,0 +1,83 @@ +[Compiler] +A=1 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages= +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1031 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= diff --git a/lib/HID/DEMOS/ThreadDemo/GreyMouser.dpr b/lib/HID/DEMOS/ThreadDemo/GreyMouser.dpr new file mode 100644 index 00000000..f3024b5a --- /dev/null +++ b/lib/HID/DEMOS/ThreadDemo/GreyMouser.dpr @@ -0,0 +1,13 @@ +program GreyMouser; + +uses + Forms, + MouseReader in 'MouseReader.pas' {Form1}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/HID/DEMOS/ThreadDemo/GreyMouser.res b/lib/HID/DEMOS/ThreadDemo/GreyMouser.res new file mode 100644 index 00000000..c8f2b95f Binary files /dev/null and b/lib/HID/DEMOS/ThreadDemo/GreyMouser.res differ diff --git a/lib/HID/DEMOS/ThreadDemo/MouseReader.dcu b/lib/HID/DEMOS/ThreadDemo/MouseReader.dcu new file mode 100644 index 00000000..68846521 Binary files /dev/null and b/lib/HID/DEMOS/ThreadDemo/MouseReader.dcu differ diff --git a/lib/HID/DEMOS/ThreadDemo/MouseReader.dfm b/lib/HID/DEMOS/ThreadDemo/MouseReader.dfm new file mode 100644 index 00000000..2a101036 Binary files /dev/null and b/lib/HID/DEMOS/ThreadDemo/MouseReader.dfm differ diff --git a/lib/HID/DEMOS/ThreadDemo/MouseReader.pas b/lib/HID/DEMOS/ThreadDemo/MouseReader.pas new file mode 100644 index 00000000..644775b9 --- /dev/null +++ b/lib/HID/DEMOS/ThreadDemo/MouseReader.pas @@ -0,0 +1,123 @@ +unit MouseReader; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + HidControllerClass, StdCtrls; + +type + TForm1 = class(TForm) + ListBox1: TListBox; + JvHidDeviceController1: TJvHidDeviceController; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Buttons: TLabel; + DeltaX: TLabel; + DeltaY: TLabel; + procedure JvHidDeviceController1DeviceChange(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + DevList: TList; + end; + + TMouseReport = packed record + ReportID: Byte; + Buttons: Byte; + DeltaX: Shortint; + DeltaY: Shortint; + Dummy: array [0..11] of Byte; + end; + + TMouseThread = class(TThread) + private + Dev: TJvHidDevice; + DevIndex: Integer; + Data: TMouseReport; + public + procedure Execute; override; + procedure HandleMouseData; + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +procedure TForm1.JvHidDeviceController1DeviceChange(Sender: TObject); +var + I: Integer; + Trd: TMouseThread; + HidDev: TJvHidDevice; +begin + // an HID device has been plugged or unplugged + // we kill all threads and create ne ones + if DevList = nil then + DevList := TList.Create; + for i := 0 to DevList.Count - 1 do + begin + Trd := DevList.Items[I]; + // freeing the HID device closes its file handles + // and the pending ReadFileEx will fail allowing + // the thread to terminate + // a pending ReadFile would not fail but wait forever + Trd.Dev.Free; + Trd.Terminate; + end; + DevList.Clear; + ListBox1.Clear; + // get all devices we are interested in + while JvHidDeviceController1.CheckOutByClass(HidDev, cHidMouseClass) do + begin + // start a thread for each device + Trd := TMouseThread.Create(True); + with Trd do + begin + // initialize threads data + FreeOnTerminate := True; + Dev := HidDev; + DevIndex := DevList.Count; + DevList.Add(Trd); + ListBox1.Items.Add(HidDev.ProductName); + // let the thread run + Resume; + end; + end; +end; + +procedure TMouseThread.HandleMouseData; +begin + // select the device the data comes from + Form1.ListBox1.ItemIndex := DevIndex; + // show the data read + Form1.Buttons.Caption := Format('%.2x',[Data.Buttons]); + Form1.DeltaX.Caption := Format('%d', [Data.DeltaX]); + Form1.DeltaY.Caption := Format('%d', [Data.DeltaY]); +end; + +procedure TMouseThread.Execute; + + procedure Dummy(ErrorCode: DWORD; Count: DWORD; Ovl: POverlapped); stdcall; + begin + end; + +begin + while not Terminated do + begin + // read mouse data + Dev.ReadFileEx(Data, Dev.Caps.InputReportByteLength, @Dummy); + // wait for read to complete + while (not Terminated) and (SleepEx(5000, True) <> WAIT_IO_COMPLETION) do + { nothing }; + // show data read + if not Terminated then + Synchronize(HandleMouseData); + end; +end; + +end. diff --git a/lib/HID/Hid.dcu b/lib/HID/Hid.dcu new file mode 100644 index 00000000..119fb1ea Binary files /dev/null and b/lib/HID/Hid.dcu differ diff --git a/lib/HID/Hid.pas b/lib/HID/Hid.pas new file mode 100644 index 00000000..1c1f6e10 --- /dev/null +++ b/lib/HID/Hid.pas @@ -0,0 +1,2110 @@ +{******************************************************************} +{ } +{ Borland Delphi Runtime Library } +{ Public Definitions of HID functions from HID.DLL } +{ } +{ Portions created by Microsoft are } +{ Copyright (C) 1995-1999 Microsoft Corporation. } +{ All Rights Reserved. } +{ } +{ The original file are: hidsdi.h, hidpi.h, released March 1999. } +{ The original Pascal code is: Hid.pas, released 29 Jan 2000. } +{ The initial developer of the Pascal code is Robert Marquardt } +{ (robert_marquardt@gmx.de) } +{ } +{ Portions created by Robert Marquardt are } +{ Copyright (C) 1999, 2000 Robert Marquardt. } +{ } +{ Contributor(s): Marcel van Brakel (brakelm@bart.nl) } +{ } +{ Obtained through: } +{ Joint Endeavour of Delphi Innovators (Project JEDI) } +{ } +{ You may retrieve the latest version of this file at the Project } +{ JEDI home page, located at http://delphi-jedi.org } +{ } +{ The contents of this file are used with permission, subject to } +{ the Mozilla Public License Version 1.1 (the "License"); you may } +{ not use this file except in compliance with the License. You may } +{ obtain a copy of the License at } +{ http://www.mozilla.org/NPL/NPL-1_1Final.html } +{ } +{ Software distributed under the License is distributed on an } +{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or } +{ implied. See the License for the specific language governing } +{ rights and limitations under the License. } +{ } +{******************************************************************} + +unit Hid; + +{$WEAKPACKAGEUNIT} + +interface + +(*$HPPEMIT ''*) +(*$HPPEMIT '#include "hidusage.h"'*) +(*$HPPEMIT '#include "hidpi.h"'*) +(*$HPPEMIT ''*) + +uses + Windows; + +type + // (rom) moved from HidUsage.pas + PUsage = ^TUsage; + TUsage = Word; + + // (rom) from WINNT.H + NTSTATUS = LongInt; + {$EXTERNALSYM NTSTATUS} + +// FACILITY_HID_ERROR_CODE defined in ntstatus.h +const + FACILITY_HID_ERROR_CODE = $11; + {$EXTERNALSYM FACILITY_HID_ERROR_CODE} + + // + // Define NT Status codes with Facility Code of FACILITY_HID_ERROR_CODE + // (rom) vv + HIDP_STATUS_SUCCESS = NTSTATUS($00110000); + {$EXTERNALSYM HIDP_STATUS_SUCCESS} + HIDP_STATUS_NULL = NTSTATUS($80110001); + {$EXTERNALSYM HIDP_STATUS_NULL} + HIDP_STATUS_INVALID_PREPARSED_DATA = NTSTATUS($C0110001); + {$EXTERNALSYM HIDP_STATUS_INVALID_PREPARSED_DATA} + HIDP_STATUS_INVALID_REPORT_TYPE = NTSTATUS($C0110002); + {$EXTERNALSYM HIDP_STATUS_INVALID_REPORT_TYPE} + HIDP_STATUS_INVALID_REPORT_LENGTH = NTSTATUS($C0110003); + {$EXTERNALSYM HIDP_STATUS_INVALID_REPORT_LENGTH} + HIDP_STATUS_USAGE_NOT_FOUND = NTSTATUS($C0110004); + {$EXTERNALSYM HIDP_STATUS_USAGE_NOT_FOUND} + HIDP_STATUS_VALUE_OUT_OF_RANGE = NTSTATUS($C0110005); + {$EXTERNALSYM HIDP_STATUS_VALUE_OUT_OF_RANGE} + HIDP_STATUS_BAD_LOG_PHY_VALUES = NTSTATUS($C0110006); + {$EXTERNALSYM HIDP_STATUS_BAD_LOG_PHY_VALUES} + HIDP_STATUS_BUFFER_TOO_SMALL = NTSTATUS($C0110007); + {$EXTERNALSYM HIDP_STATUS_BUFFER_TOO_SMALL} + HIDP_STATUS_INTERNAL_ERROR = NTSTATUS($C0110008); + {$EXTERNALSYM HIDP_STATUS_INTERNAL_ERROR} + HIDP_STATUS_I8042_TRANS_UNKNOWN = NTSTATUS($C0110009); + {$EXTERNALSYM HIDP_STATUS_I8042_TRANS_UNKNOWN} + HIDP_STATUS_INCOMPATIBLE_REPORT_ID = NTSTATUS($C011000A); + {$EXTERNALSYM HIDP_STATUS_INCOMPATIBLE_REPORT_ID} + HIDP_STATUS_NOT_VALUE_ARRAY = NTSTATUS($C011000B); + {$EXTERNALSYM HIDP_STATUS_NOT_VALUE_ARRAY} + HIDP_STATUS_IS_VALUE_ARRAY = NTSTATUS($C011000C); + {$EXTERNALSYM HIDP_STATUS_IS_VALUE_ARRAY} + HIDP_STATUS_DATA_INDEX_NOT_FOUND = NTSTATUS($C011000D); + {$EXTERNALSYM HIDP_STATUS_DATA_INDEX_NOT_FOUND} + HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE = NTSTATUS($C011000E); + {$EXTERNALSYM HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE} + HIDP_STATUS_BUTTON_NOT_PRESSED = NTSTATUS($C011000F); + {$EXTERNALSYM HIDP_STATUS_BUTTON_NOT_PRESSED} + HIDP_STATUS_REPORT_DOES_NOT_EXIST = NTSTATUS($C0110010); + {$EXTERNALSYM HIDP_STATUS_REPORT_DOES_NOT_EXIST} + HIDP_STATUS_NOT_IMPLEMENTED = NTSTATUS($C0110020); + {$EXTERNALSYM HIDP_STATUS_NOT_IMPLEMENTED} + // + // We blundered this status code. + // + HIDP_STATUS_I8242_TRANS_UNKNOWN = HIDP_STATUS_I8042_TRANS_UNKNOWN; + {$EXTERNALSYM HIDP_STATUS_I8242_TRANS_UNKNOWN} + + // Special Link collection values for using the query functions + // + // Root collection references the collection at the base of the link + // collection tree. + // Unspecifies, references all collections in the link collection tree. + + HIDP_LINK_COLLECTION_ROOT = -1; + {$EXTERNALSYM HIDP_LINK_COLLECTION_ROOT} + HIDP_LINK_COLLECTION_UNSPECIFIED = 0; + {$EXTERNALSYM HIDP_LINK_COLLECTION_UNSPECIFIED} + + // A bitmap of the current shift state of the keyboard when using the + // below keyboard usages to i8042 translation function. + +const + // (rom) values for the bits of THIDPKeyboardModifierState + kmsLeftControl = $0001; + kmsLeftShift = $0002; + kmsLeftAlt = $0004; + kmsLeftGUI = $0008; + kmsRightControl = $0010; + kmsRightShift = $0020; + kmsRightAlt = $0040; + kmsRightGUI = $0080; + kmsCapsLock = $0100; + kmsScollLock = $0200; + kmsNumLock = $0400; +type + THIDPKeyboardModifierState = DWORD; + {$EXTERNALSYM THIDPKeyboardModifierState} + + // (rom) bit value to check IsAlias of THIDPLinkCollectionNode +const + lcnIsAlias = 1; + +type + // (rom) to represent the union names + THIDVariantFlags = (Range, NotRange); + + PHIDDConfiguration = ^THIDDConfiguration; + _HIDD_CONFIGURATION = packed record + cookie: Pointer; + size: ULONG; + RingBufferSize: ULONG; + end; + {$EXTERNALSYM _HIDD_CONFIGURATION} + THIDDConfiguration = _HIDD_CONFIGURATION; + + PHIDDAttributes = ^THIDDAttributes; + _HIDD_ATTRIBUTES = packed record + Size: ULONG; // size of structure (set before call) + VendorID: Word; + ProductID: Word; + VersionNumber: Word; + // + // Additional fields will be added to the end of this structure. + // + end; + {$EXTERNALSYM _HIDD_ATTRIBUTES} + THIDDAttributes = _HIDD_ATTRIBUTES; + + // (rom) should be Pointer but Delphi 4 objects if used as published property + PHIDPPreparsedData = DWORD; + {$EXTERNALSYM PHIDPPreparsedData} + +const + HidP_Input = 0; + {$EXTERNALSYM HidP_Input} + HidP_Output = 1; + {$EXTERNALSYM HidP_Output} + HidP_Feature = 2; + {$EXTERNALSYM HidP_Feature} + +type + PHIDPReportType = ^THIDPReportType; + THIDPReportType = DWORD; + +const + // Produce Make or Break Codes + HidP_Keyboard_Break = 0; + {$EXTERNALSYM HidP_Keyboard_Break} + HidP_Keyboard_Make = 1; + {$EXTERNALSYM HidP_Keyboard_Make} +type + PHIDPKeyboardDirection = ^THIDPKeyboardDirection; + THIDPKeyboardDirection = DWORD; + + PUsageAndPage = ^TUsageAndPage; + _USAGE_AND_PAGE = packed record + Usage: TUsage; + UsagePage: TUsage; + end; + {$EXTERNALSYM _USAGE_AND_PAGE} + TUsageAndPage = _USAGE_AND_PAGE; + + PHIDPButtonCaps = ^THIDPButtonCaps; + _HIDP_BUTTON_CAPS = packed record + UsagePage: TUsage; + ReportID: BYTE; + IsAlias: ByteBool; + + BitField: Word; + LinkCollection: Word; // A unique internal index pointer + + LinkUsage: TUsage; + LinkUsagePage: TUsage; + + IsRange: ByteBool; + IsStringRange: ByteBool; + IsDesignatorRange: ByteBool; + IsAbsolute: ByteBool; + + Reserved: array [0..9] of ULONG; + + case THIDVariantFlags of + Range: + ( UsageMin, UsageMax: TUsage; + StringMin, StringMax, + DesignatorMin, DesignatorMax, + DataIndexMin, DataIndexMax: Word ); + NotRange: + ( Usage, Reserved1: TUsage; + StringIndex, Reserved2, + DesignatorIndex, Reserved3, + DataIndex, Reserved4: Word ); + end; + {$EXTERNALSYM _HIDP_BUTTON_CAPS} + THIDPButtonCaps = _HIDP_BUTTON_CAPS; + + PHIDPValueCaps = ^THIDPValueCaps; + _HIDP_VALUE_CAPS = packed record + UsagePage: TUsage; + ReportID: BYTE; + IsAlias: ByteBool; + + BitField: Word; + LinkCollection: Word; // A unique internal index pointer + + LinkUsage: TUsage; + LinkUsagePage: TUsage; + + IsRange: ByteBool; + IsStringRange: ByteBool; + IsDesignatorRange: ByteBool; + IsAbsolute: ByteBool; + + HasNull: ByteBool; // Does this channel have a null report union + Reserved: BYTE; + BitSize: Word; // How many bits are devoted to this value? + + ReportCount: Word; // See Note below. Usually set to 1. + Reserved_: array [0..4] of Word; + // (rom) name change Reserved2 gives name clash in Pascal + UnitsExp: ULONG; + Units: ULONG; + + LogicalMin: Integer; + LogicalMax: Integer; + PhysicalMin: Integer; + PhysicalMax: Integer; + + case THIDVariantFlags of + Range: + ( UsageMin, UsageMax: TUsage; + StringMin, StringMax, + DesignatorMin, DesignatorMax, + DataIndexMin, DataIndexMax: Word ); + NotRange: + ( Usage, Reserved1: TUsage; + StringIndex, Reserved2, + DesignatorIndex, Reserved3, + DataIndex, Reserved4: Word ); + end; + {$EXTERNALSYM _HIDP_VALUE_CAPS} + THIDPValueCaps = _HIDP_VALUE_CAPS; + +// +// Notes: +// +// ReportCount: When a report descriptor declares an Input, Output, or +// Feature main item with fewer usage declarations than the report count, then +// the last usage applies to all remaining unspecified count in that main item. +// (As an example you might have data that required many fields to describe, +// possibly buffered bytes.) In this case, only one value cap structure is +// allocated for these associtated fields, all with the same usage, and Report +// Count reflects the number of fields involved. Normally ReportCount is 1. +// To access all of the fields in such a value structure would require using +// HidP_GetUsageValueArray and HidP_SetUsageValueArray. HidP_GetUsageValue/ +// HidP_SetScaledUsageValue will also work, however, these functions will only +// work with the first field of the structure. +// + +// +// The link collection tree consists of an array of LINK_COLLECTION_NODES +// where the index into this array is the same as the collection number. +// +// Given a collection A which contains a subcollection B, A is defined to be +// the parent B, and B is defined to be the child. +// +// Given collections A, B, and C where B and C are children of A, and B was +// encountered before C in the report descriptor, B is defined as a sibling of +// C. (This implies, of course, that if B is a sibling of C, then C is NOT a +// sibling of B). +// +// B is defined as the NextSibling of C if and only if there exists NO +// child collection of A, call it D, such that B is a sibling of D and D +// is a sibling of C. +// +// E is defined to be the FirstChild of A if and only if for all children of A, +// F, that are not equivalent to E, F is a sibling of E. +// (This implies, of course, that the does not exist a child of A, call it G, +// where E is a sibling of G). In other words the first sibling is the last +// link collection found in the list. +// +// In other words, if a collection B is defined within the definition of another +// collection A, B becomes a child of A. All collections with the same parent +// are considered siblings. The FirstChild of the parent collection, A, will be +// last collection defined that has A as a parent. The order of sibling pointers +// is similarly determined. When a collection B is defined, it becomes the +// FirstChild of it's parent collection. The previously defined FirstChild of the +// parent collection becomes the NextSibling of the new collection. As new +// collections with the same parent are discovered, the chain of sibling is built. +// +// With that in mind, the following describes conclusively a data structure +// that provides direct traversal up, down, and accross the link collection +// tree. + + PHIDPLinkCollectionNode = ^THIDPLinkCollectionNode; + _HIDP_LINK_COLLECTION_NODE = packed record + LinkUsage: TUsage; + LinkUsagePage: TUsage; + Parent: Word; + NumberOfChildren: Word; + NextSibling: Word; + FirstChild: Word; + CollectionType: BYTE; // As defined in 6.2.2.6 of HID spec + IsAlias: BYTE; // This link node is an alias of the next link node. + Reserved: Word; // (rom) bitfields + UserContext: Pointer; // The user can hang his coat here. + end; + {$EXTERNALSYM _HIDP_LINK_COLLECTION_NODE} + THIDPLinkCollectionNode = _HIDP_LINK_COLLECTION_NODE; + +// +// When a link collection is described by a delimiter, alias link collection +// nodes are created. (One for each usage within the delimiter). +// The parser assigns each capability description listed above only one +// link collection. +// +// If a control is defined within a collection defined by +// delimited usages, then that control is said to be within multiple link +// collections, one for each usage within the open and close delimiter tokens. +// Such multiple link collecions are said to be aliases. The first N-1 such +// collections, listed in the link collection node array, have their IsAlias +// bit set. The last such link collection is the link collection index used +// in the capabilities described above. +// Clients wishing to set a control in an aliased collection, should walk the +// collection array once for each time they see the IsAlias flag set, and use +// the last link collection as the index for the below accessor functions. +// +// NB: if IsAlias is set, then NextSibling should be one more than the current +// link collection node index. + + PHIDPReportDescriptor = PChar; + + PHIDPCaps = ^THIDPCaps; + _HIDP_CAPS = packed record + Usage: TUsage; + UsagePage: TUsage; + InputReportByteLength: Word; + OutputReportByteLength: Word; + FeatureReportByteLength: Word; + Reserved: array [0..16] of Word; + + NumberLinkCollectionNodes: Word; + + NumberInputButtonCaps: Word; + NumberInputValueCaps: Word; + NumberInputDataIndices: Word; + + NumberOutputButtonCaps: Word; + NumberOutputValueCaps: Word; + NumberOutputDataIndices: Word; + + NumberFeatureButtonCaps: Word; + NumberFeatureValueCaps: Word; + NumberFeatureDataIndices: Word; + end; + {$EXTERNALSYM _HIDP_CAPS} + THIDPCaps = _HIDP_CAPS; + + PHIDPData = ^THIDPData; + _HIDP_DATA = packed record + DataIndex: Word; + Reserved: Word; + case Integer of + 0: (RawValue: ULONG); // for values + 1: (On_: ByteBool); // for buttons MUST BE TRUE for buttons. + // (rom) name change On is reserved in Pascal + end; + {$EXTERNALSYM _HIDP_DATA} + THIDPData = _HIDP_DATA; + +// The HIDP_DATA structure is used with HidP_GetData and HidP_SetData +// functions. +// +// The parser contiguously assigns every control (button or value) in a hid +// device a unique data index from zero to NumberXXXDataIndices -1 , inclusive. +// This value is found in the HIDP_BUTTON_CAPS and HIDP_VALUE_CAPS structures. +// +// Most clients will find the Get/Set Buttons / Value accessor functions +// sufficient to their needs, as they will allow the clients to access the +// data known to them while ignoring the other controls. +// +// More complex clients, which actually read the Button / Value Caps, and which +// do a value add service to these routines (EG Direct Input), will need to +// access all the data in the device without interest in the individual usage +// or link collection location. These are the clients that will find +// HidP_Data useful. + + PHIDPUnknownToken = ^THIDPUnknownToken; + {$EXTERNALSYM PHIDPUnknownToken} + _HIDP_UNKNOWN_TOKEN = packed record + Token: BYTE; + Reserved: array [0..2] of BYTE; + BitField: DWORD; + end; + {$EXTERNALSYM _HIDP_UNKNOWN_TOKEN} + THIDPUnknownToken = _HIDP_UNKNOWN_TOKEN; + + PHIDPExtendedAttributes = ^THIDPExtendedAttributes; + _HIDP_EXTENDED_ATTRIBUTES = packed record + NumGlobalUnknowns: BYTE; + Reserved: array [0..2] of BYTE; + GlobalUnknowns: PHIDPUnknownToken; + // ... Additional attributes + Data: array [0..0] of ULONG; // variableLength DO NOT ACCESS THIS FIELD + end; + {$EXTERNALSYM _HIDP_EXTENDED_ATTRIBUTES} + THIDPExtendedAttributes = _HIDP_EXTENDED_ATTRIBUTES; + + // (rom) callback function type for HidP_TranslateUsagesToI8042ScanCodes param + // (rom) maybe calling convention is incorrect + THIDPInsertScanCodes = function( + Context: Pointer; // Some caller supplied context + NewScanCodes: PChar; // A list of i8042 scan codes + Length: ULONG // the length of the scan code list + ): Boolean; stdcall; + +// (rom) undocumented easter egg function +// (rom) fills buffer with "Hello\nI hate Jello\n" +// (rom) returns number of bytes filled in == strlen(Buffer)+1 == 20 +// (rom) bugs: handing in nil as buffer gives access violation. +// (rom) always returns 20 even if buffer length is less than 20 +// (rom) but does not produce buffer overflow + +function HidD_Hello(Buffer: PChar; BufferLength: ULONG): ULONG; stdcall; + +procedure HidD_GetHidGuid(var HidGuid: TGUID) stdcall; +{$EXTERNALSYM HidD_GetHidGuid} + +function HidD_GetPreparsedData(HidDeviceObject: THandle; + var PreparsedData: PHIDPPreparsedData): LongBool; stdcall; +{$EXTERNALSYM HidD_GetPreparsedData} + +function HidD_FreePreparsedData(PreparsedData: PHIDPPreparsedData): LongBool; stdcall; +{$EXTERNALSYM HidD_FreePreparsedData} + +// Routine Description: +// Get the configuration information for this Hid device +// +// Arguments: +// HidDeviceObject A handle to a Hid Device Object. +// +// Configuration A configuration structure. HidD_GetConfiguration MUST +// be called before the configuration can be modified and +// set using HidD_SetConfiguration +// +// ConfigurationLength That is ``sizeof (HIDD_CONFIGURATION)''. Using this +// parameter, we can later increase the length of the +// configuration array and not break older apps. +// +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_GetConfiguration(HidDeviceObject: THandle; + var HidConfig: THIDDConfiguration; Size: Integer): LongBool; stdcall; +{$EXTERNALSYM HidD_GetConfiguration} + +// Routine Description: +// Set the configuration information for this Hid device... +// +// NOTE: HidD_GetConfiguration must be called to retrieve the current +// configuration information before this information can be modified +// and set. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device Object. +// +// Configuration A configuration structure. HidD_GetConfiguration MUST +// be called before the configuration can be modified and +// set using HidD_SetConfiguration +// +// ConfigurationLength That is ``sizeof (HIDD_CONFIGURATION)''. Using this +// parameter, we can later increase the length of the +// configuration array and not break older apps. +// +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_SetConfiguration(HidDeviceObject: THandle; + var HidConfig: THIDDConfiguration; Size: Integer): LongBool; stdcall; +{$EXTERNALSYM HidD_SetConfiguration} + +// Routine Description: +// Flush the input queue for the given HID device. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device that the client obtains using +// a call to CreateFile on a valid Hid device string name. +// The string name can be obtained using standard PnP calls. +// +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_FlushQueue(HidDeviceObject: THandle): LongBool; stdcall; +{$EXTERNALSYM HidD_FlushQueue} + +// Routine Description: +// Retrieve a feature report from a HID device. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device Object. +// +// ReportBuffer The buffer that the feature report should be placed +// into. The first byte of the buffer should be set to +// the report ID of the desired report +// +// ReportBufferLength The size (in bytes) of ReportBuffer. This value +// should be greater than or equal to the +// FeatureReportByteLength field as specified in the +// HIDP_CAPS structure for the device +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_GetFeature(HidDeviceObject: THandle; + var Report; Size: Integer): LongBool; stdcall; +{$EXTERNALSYM HidD_GetFeature} + +// Routine Description: +// Send a feature report to a HID device. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device Object. +// +// ReportBuffer The buffer of the feature report to send to the device +// +// ReportBufferLength The size (in bytes) of ReportBuffer. This value +// should be greater than or equal to the +// FeatureReportByteLength field as specified in the +// HIDP_CAPS structure for the device +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_SetFeature(HidDeviceObject: THandle; + var Report; Size: Integer): LongBool; stdcall; +{$EXTERNALSYM HidD_SetFeature} + +// Routine Description: +// This function returns the number of input buffers used by the specified +// file handle to the Hid device. Each file object has a number of buffers +// associated with it to queue reports read from the device but which have +// not yet been read by the user-mode app with a handle to that device. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device Object. +// +// NumberBuffers Number of buffers currently being used for this file +// handle to the Hid device +// +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_GetNumInputBuffers(HidDeviceObject: THandle; + var NumBufs: Integer): LongBool; stdcall; +{$EXTERNALSYM HidD_GetNumInputBuffers} + +// Routine Description: +// This function sets the number of input buffers used by the specified +// file handle to the Hid device. Each file object has a number of buffers +// associated with it to queue reports read from the device but which have +// not yet been read by the user-mode app with a handle to that device. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device Object. +// +// NumberBuffers New number of buffers to use for this file handle to +// the Hid device +// +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_SetNumInputBuffers(HidDeviceObject: THandle; + NumBufs: Integer): LongBool; stdcall; +{$EXTERNALSYM HidD_SetNumInputBuffers} + +// Routine Description: +// Given a handle to a valid Hid Class Device Object, retrieve the preparsed +// data for the device. This routine will allocate the appropriately +// sized buffer to hold this preparsed data. It is up to client to call +// HidD_FreePreparsedData to free the memory allocated to this structure when +// it is no longer needed. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device that the client obtains using +// a call to CreateFile on a valid Hid device string name. +// The string name can be obtained using standard PnP calls. +// +// PreparsedData An opaque data structure used by other functions in this +// library to retrieve information about a given device. +// +// Return Value: +// TRUE if successful. +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_GetAttributes(HidDeviceObject: THandle; + var HidAttrs: THIDDAttributes): LongBool; stdcall; +{$EXTERNALSYM HidD_GetAttributes} + +// Routine Description: +// This function retrieves the manufacturer string from the specified +// Hid device. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device Object. +// +// Buffer Buffer which on return will contain the manufacturer +// string returned from the device. This string is a +// wide-character string +// +// BufferLength Length of Buffer (in bytes) +// +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_GetManufacturerString(HidDeviceObject: THandle; + Buffer: PWideChar; BufferLength: Integer): LongBool; stdcall; +{$EXTERNALSYM HidD_GetManufacturerString} + +// Routine Description: +// This function retrieves the product string from the specified +// Hid device. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device Object. +// +// Buffer Buffer which on return will contain the product +// string returned from the device. This string is a +// wide-character string +// +// BufferLength Length of Buffer (in bytes) +// +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_GetProductString(HidDeviceObject: THandle; + Buffer: PWideChar; BufferLength: Integer): LongBool; stdcall; +{$EXTERNALSYM HidD_GetProductString} + +// Routine Description: +// This function retrieves the serial number string from the specified +// Hid device. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device Object. +// +// Buffer Buffer which on return will contain the serial number +// string returned from the device. This string is a +// wide-character string +// +// BufferLength Length of Buffer (in bytes) +// +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_GetSerialNumberString(HidDeviceObject: THandle; + Buffer: PWideChar; BufferLength: Integer): LongBool; stdcall; +{$EXTERNALSYM HidD_GetSerialNumberString} + +// Routine Description: +// This function retrieves the raw physical descriptor for the specified +// Hid device. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device Object. +// +// Buffer Buffer which on return will contain the physical +// descriptor if one exists for the specified device +// handle +// +// BufferLength Length of buffer (in bytes) +// +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_GetPhysicalDescriptor(HidDeviceObject: THandle; + var Buffer; BufferLength: Integer): LongBool; stdcall; +{$EXTERNALSYM HidD_GetPhysicalDescriptor} + +// Routine Description: +// This function retrieves a string from the specified Hid device that is +// specified with a certain string index. +// +// Arguments: +// HidDeviceObject A handle to a Hid Device Object. +// +// StringIndex Index of the string to retrieve +// +// Buffer Buffer which on return will contain the product +// string returned from the device. This string is a +// wide-character string +// +// BufferLength Length of Buffer (in bytes) +// +// Return Value: +// TRUE if successful +// FALSE otherwise -- Use GetLastError() to get extended error information + +function HidD_GetIndexedString(HidDeviceObject: THandle; + Index: Integer; Buffer: PWideChar; BufferLength: Integer): LongBool; stdcall; +{$EXTERNALSYM HidD_GetIndexedString} + +// Routine Description: +// Returns a list of capabilities of a given hid device as described by its +// preparsed data. +// +// Arguments: +// PreparsedData The preparsed data returned from HIDCLASS. +// Capabilities a HIDP_CAPS structure +// +// Return Value: +// - HIDP_STATUS_SUCCESS +// - HIDP_STATUS_INVALID_PREPARSED_DATA + +function HidP_GetCaps(PreparsedData: PHIDPPreparsedData; + var Capabilities: THIDPCaps): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetCaps} + +// Routine Description: +// Return a list of PHIDP_LINK_COLLECTION_NODEs used to describe the link +// collection tree of this hid device. See the above description of +// struct _HIDP_LINK_COLLECTION_NODE. +// +// Arguments: +// LinkCollectionNodes - a caller allocated array into which +// HidP_GetLinkCollectionNodes will store the information +// +// LinkCollectionNodesLength - the caller sets this value to the length of the +// the array in terms of number of elements. +// HidP_GetLinkCollectionNodes sets this value to the actual +// number of elements set. The total number of nodes required to +// describe this HID device can be found in the +// NumberLinkCollectionNodes field in the HIDP_CAPS structure. + +function HidP_GetLinkCollectionNodes(LinkCollectionNodes: PHIDPLinkCollectionNode; + var LinkCollectionNodesLength: ULONG; PreparsedData: PHIDPPreparsedData): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetLinkCollectionNodes} + +function HidP_GetSpecificButtonCaps(ReportType: THIDPReportType; + UsagePage: TUsage; LinkCollection: Word; Usage: TUsage; ButtonCaps: PHIDPButtonCaps; + var ButtonCapsLength: Word; PreparsedData: PHIDPPreparsedData): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetSpecificButtonCaps} + +// Description: +// HidP_GetButtonCaps returns all the buttons (binary values) that are a part +// of the given report type for the Hid device represented by the given +// preparsed data. +// +// Parameters: +// ReportType One of HidP_Input, HidP_Output, or HidP_Feature. +// +// UsagePage A usage page value used to limit the button caps returned to +// those on a given usage page. If set to 0, this parameter is +// ignored. Can be used with LinkCollection and Usage parameters +// to further limit the number of button caps structures returned. +// +// LinkCollection HIDP_LINK_COLLECTION node array index used to limit the +// button caps returned to those buttons in a given link +// collection. If set to 0, this parameter is +// ignored. Can be used with UsagePage and Usage parameters +// to further limit the number of button caps structures +// returned. +// +// Usage A usage value used to limit the button caps returned to those +// with the specified usage value. If set to 0, this parameter +// is ignored. Can be used with LinkCollection and UsagePage +// parameters to further limit the number of button caps +// structures returned. +// +// ButtonCaps A _HIDP_BUTTON_CAPS array containing information about all the +// binary values in the given report. This buffer is provided by +// the caller. +// +// ButtonLength As input, this parameter specifies the length of the +// ButtonCaps parameter (array) in number of array elements. +// As output, this value is set to indicate how many of those +// array elements were filled in by the function. The maximum number of +// button caps that can be returned is found in the HIDP_CAPS +// structure. If HIDP_STATUS_BUFFER_TOO_SMALL is returned, +// this value contains the number of array elements needed to +// successfully complete the request. +// +// PreparsedData The preparsed data returned from HIDCLASS. +// +// +// Return Value +// HidP_GetSpecificButtonCaps returns the following error codes: +// - HIDP_STATUS_SUCCESS. +// - HIDP_STATUS_INVALID_REPORT_TYPE +// - HIDP_STATUS_INVALID_PREPARSED_DATA +// - HIDP_STATUS_BUFFER_TOO_SMALL (all given entries however have been filled in) +// - HIDP_STATUS_USAGE_NOT_FOUND + +function HidP_GetButtonCaps(ReportType: THIDPReportType; ButtonCaps: PHIDPButtonCaps; + var ButtonCapsLength: Word; PreparsedData: PHIDPPreparsedData): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetButtonCaps} + +function HidP_GetSpecificValueCaps(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; Usage: TUsage; ValueCaps: PHIDPValueCaps; + var ValueCapsLength: Word; PreparsedData: PHIDPPreparsedData): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetSpecificValueCaps} + +// Description: +// HidP_GetValueCaps returns all the values (non-binary) that are a part +// of the given report type for the Hid device represented by the given +// preparsed data. +// +// Parameters: +// ReportType One of HidP_Input, HidP_Output, or HidP_Feature. +// +// UsagePage A usage page value used to limit the value caps returned to +// those on a given usage page. If set to 0, this parameter is +// ignored. Can be used with LinkCollection and Usage parameters +// to further limit the number of value caps structures returned. +// +// LinkCollection HIDP_LINK_COLLECTION node array index used to limit the +// value caps returned to those buttons in a given link +// collection. If set to 0, this parameter is +// ignored. Can be used with UsagePage and Usage parameters +// to further limit the number of value caps structures +// returned. +// +// Usage A usage value used to limit the value caps returned to those +// with the specified usage value. If set to 0, this parameter +// is ignored. Can be used with LinkCollection and UsagePage +// parameters to further limit the number of value caps +// structures returned. +// +// ValueCaps A _HIDP_VALUE_CAPS array containing information about all the +// non-binary values in the given report. This buffer is provided +// by the caller. +// +// ValueLength As input, this parameter specifies the length of the ValueCaps +// parameter (array) in number of array elements. As output, +// this value is set to indicate how many of those array elements +// were filled in by the function. The maximum number of +// value caps that can be returned is found in the HIDP_CAPS +// structure. If HIDP_STATUS_BUFFER_TOO_SMALL is returned, +// this value contains the number of array elements needed to +// successfully complete the request. +// +// PreparsedData The preparsed data returned from HIDCLASS. +// +// +// Return Value +// HidP_GetValueCaps returns the following error codes: +// - HIDP_STATUS_SUCCESS. +// - HIDP_STATUS_INVALID_REPORT_TYPE +// - HIDP_STATUS_INVALID_PREPARSED_DATA +// - HIDP_STATUS_BUFFER_TOO_SMALL (all given entries however have been filled in) +// - HIDP_STATUS_USAGE_NOT_FOUND + +function HidP_GetValueCaps(ReportType: THIDPReportType; ValueCaps: PHIDPValueCaps; + var ValueCapsLength: Word; PreparsedData: PHIDPPreparsedData): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetValueCaps} + +// Routine Description: +// +// Please Note: For obvious reasons HidP_SetData and HidP_GetData will not +// access UsageValueArrays. +// +// Parameters: +// ReportType One of HidP_Input, HidP_Output, or HidP_Feature. +// +// DataList Array of HIDP_DATA structures that will receive the data +// values that are set in the given report +// +// DataLength As input, length in array elements of DataList. As output, +// contains the number of data elements that were successfully +// set by HidP_GetData. The maximum size necessary for DataList +// can be determined by calling HidP_MaxDataListLength +// +// PreparasedData Preparsed data structure returned by HIDCLASS +// +// Report Buffer which to set the data into. +// +// ReportLength Length of Report...Report should be at least as long as the +// value indicated in the HIDP_CAPS structure for the device and +// the corresponding ReportType +// +// Return Value +// HidP_GetData returns the following error codes. +// +// - HIDP_STATUS_SUCCESS -- upon successful retrieval of all data +// from the report packet. +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not equal +// to the length specified in HIDP_CAPS +// structure for the given ReportType +// - HIDP_STATUS_REPORT_DOES_NOT_EXIST -- if there are no reports on this device +// for the given ReportType +// - HIDP_STATUS_BUFFER_TOO_SMALL -- if there are not enough array entries in +// DataList to store all the indice values +// in the given report. DataLength will +// contain the number of array entries +// required to hold all data + +function HidP_GetData(ReportType: THIDPReportType; DataList: PHIDPData; + var DataLength: ULONG; PreparsedData: PHIDPPreparsedData; + var Report; ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetData} + +// Routine Description: +// +// Please Note: Since usage value arrays deal with multiple fields for +// for one usage value, they cannot be used with HidP_SetData +// and HidP_GetData. In this case, +// HIDP_STATUS_IS_USAGE_VALUE_ARRAY will be returned. +// +// Parameters: +// +// ReportType One of HidP_Input, HidP_Output, or HidP_Feature. +// +// DataList Array of HIDP_DATA structures that contains the data values +// that are to be set into the given report +// +// DataLength As input, length in array elements of DataList. As output, +// contains the number of data elements set on successful +// completion or an index into the DataList array to identify +// the faulting HIDP_DATA value if an error code is returned. +// +// PreparasedData Preparsed data structure returned by HIDCLASS +// +// Report Buffer which to set the data into. +// +// ReportLength Length of Report...Report should be at least as long as the +// value indicated in the HIDP_CAPS structure for the device and +// the corresponding ReportType +// +// Return Value +// HidP_SetData returns the following error codes. The report packet will +// have all the data set up until the HIDP_DATA structure that caused the +// error. DataLength, in the error case, will return this problem index. +// +// - HIDP_STATUS_SUCCESS -- upon successful insertion of all data +// into the report packet. +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_DATA_INDEX_NOT_FOUND -- if a HIDP_DATA structure referenced a +// data index that does not exist for this +// device's ReportType +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not equal +// to the length specified in HIDP_CAPS +// structure for the given ReportType +// - HIDP_STATUS_REPORT_DOES_NOT_EXIST -- if there are no reports on this device +// for the given ReportType +// - HIDP_STATUS_IS_USAGE_VALUE_ARRAY -- if one of the HIDP_DATA structures +// references a usage value array. +// DataLength will contain the index into +// the array that was invalid +// - HIDP_STATUS_BUTTON_NOT_PRESSED -- if a HIDP_DATA structure attempted +// to unset a button that was not already +// set in the Report +// - HIDP_STATUS_INCOMPATIBLE_REPORT_ID -- a HIDP_DATA structure was found with +// a valid index value but is contained +// in a different report than the one +// currently being processed +// - HIDP_STATUS_BUFFER_TOO_SMALL -- if there are not enough entries in +// a given Main Array Item to report all +// buttons that have been requested to be +// set + +function HidP_SetData(ReportType: THIDPReportType; DataList: PHIDPData; + var DataLength: ULONG; PreparsedData: PHIDPPreparsedData; + var Report; ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_SetData} + +// Routine Description: +// +// This function returns the maximum length of HIDP_DATA elements that +// HidP_GetData could return for the given report type. +// +// Parameters: +// +// ReportType One of HidP_Input, HidP_Output or HidP_Feature. +// +// PreparsedData Preparsed data structure returned by HIDCLASS +// +// Return Value: +// +// The length of the data list array required for the HidP_GetData function +// call. If an error occurs (either HIDP_STATUS_INVALID_REPORT_TYPE or +// HIDP_STATUS_INVALID_PREPARSED_DATA), this function returns 0. + +function HidP_MaxDataListLength(ReportType: THIDPReportType; + PreparsedData: PHIDPPreparsedData): ULONG; stdcall; +{$EXTERNALSYM HidP_MaxDataListLength} + +// Routine Description: +// This function returns the binary values (buttons) that are set in a HID +// report. Given a report packet of correct length, it searches the report +// packet for each usage for the given usage page and returns them in the +// usage list. +// +// Parameters: +// ReportType One of HidP_Input, HidP_Output or HidP_Feature. +// +// UsagePage All of the usages in the usage list, which HidP_GetUsages will +// retrieve in the report, refer to this same usage page. +// If the client wishes to get usages in a packet for multiple +// usage pages then that client needs to make multiple calls +// to HidP_GetUsages. +// +// LinkCollection An optional value which can limit which usages are returned +// in the UsageList to those usages that exist in a specific +// LinkCollection. A non-zero value indicates the index into +// the HIDP_LINK_COLLECITON_NODE list returned by +// HidP_GetLinkCollectionNodes of the link collection the +// usage should belong to. A value of 0 indicates this +// should value be ignored. +// +// UsageList The usage array that will contain all the usages found in +// the report packet. +// +// UsageLength The length of the given usage array in array elements. +// On input, this value describes the length of the usage list. +// On output, HidP_GetUsages sets this value to the number of +// usages that was found. Use HidP_MaxUsageListLength to +// determine the maximum length needed to return all the usages +// that a given report packet may contain. +// +// PreparsedData Preparsed data structure returned by HIDCLASS +// +// Report The report packet. +// +// ReportLength Length (in bytes) of the given report packet +// +// +// Return Value +// HidP_GetUsages returns the following error codes: +// +// - HIDP_STATUS_SUCCESS -- upon successfully retrieving all the +// usages from the report packet +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not +// equal to the length specified in +// the HIDP_CAPS structure for the given +// ReportType +// - HIDP_STATUS_REPORT_DOES_NOT_EXIST -- if there are no reports on this device +// for the given ReportType +// - HIDP_STATUS_BUFFER_TOO_SMALL -- if the UsageList is not big enough to +// hold all the usages found in the report +// packet. If this is returned, the buffer +// will contain UsageLength number of +// usages. Use HidP_MaxUsageListLength to +// find the maximum length needed +// - HIDP_STATUS_INCOMPATIBLE_REPORT_ID -- if no usages were found but usages +// that match the UsagePage and +// LinkCollection specified could be found +// in a report with a different report ID +// - HIDP_STATUS_USAGE_NOT_FOUND -- if there are no usages in a reports for +// the device and ReportType that match the +// UsagePage and LinkCollection that were +// specified + +function HidP_GetUsages(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; UsageList: PUsage; var UsageLength: ULONG; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetUsages} + +function HidP_GetButtons(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; UsageList: PUsage; var UsageLength: ULONG; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetButtons} + +// Routine Description: +// This function returns the binary values (buttons) in a HID report. +// Given a report packet of correct length, it searches the report packet +// for all buttons and returns the UsagePage and Usage for each of the buttons +// it finds. +// +// Parameters: +// ReportType One of HidP_Input, HidP_Output or HidP_Feature. +// +// LinkCollection An optional value which can limit which usages are returned +// in the ButtonList to those usages that exist in a specific +// LinkCollection. A non-zero value indicates the index into +// the HIDP_LINK_COLLECITON_NODE list returned by +// HidP_GetLinkCollectionNodes of the link collection the +// usage should belong to. A value of 0 indicates this +// should value be ignored. +// +// ButtonList An array of USAGE_AND_PAGE structures describing all the +// buttons currently ``down'' in the device. +// +// UsageLength The length of the given array in terms of elements. +// On input, this value describes the length of the list. On +// output, HidP_GetUsagesEx sets this value to the number of +// usages that were found. Use HidP_MaxUsageListLength to +// determine the maximum length needed to return all the usages +// that a given report packet may contain. +// +// PreparsedData Preparsed data returned by HIDCLASS +// +// Report The report packet. +// +// ReportLength Length (in bytes) of the given report packet. +// +// +// Return Value +// HidP_GetUsagesEx returns the following error codes: +// +// - HIDP_STATUS_SUCCESS -- upon successfully retrieving all the +// usages from the report packet +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not +// equal to the length specified in +// the HIDP_CAPS structure for the given +// ReportType +// - HIDP_STATUS_REPORT_DOES_NOT_EXIST -- if there are no reports on this device +// for the given ReportType +// - HIDP_STATUS_BUFFER_TOO_SMALL -- if ButtonList is not big enough to +// hold all the usages found in the report +// packet. If this is returned, the buffer +// will contain UsageLength number of +// usages. Use HidP_MaxUsageListLength to +// find the maximum length needed +// - HIDP_STATUS_INCOMPATIBLE_REPORT_ID -- if no usages were found but usages +// that match the specified LinkCollection +// exist in report with a different report +// ID. +// - HIDP_STATUS_USAGE_NOT_FOUND -- if there are no usages in any reports that +// match the LinkCollection parameter + +function HidP_GetUsagesEx(ReportType: THIDPReportType; LinkCollection: Word; + UsageList: PUsageAndPage; var UsageLength: ULONG; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetUsagesEx} + +function HidP_GetButtonsEx(ReportType: THIDPReportType; LinkCollection: Word; + UsageList: PUsageAndPage; var UsageLength: ULONG; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetButtonsEx} + +// Routine Description: +// This function sets binary values (buttons) in a report. Given an +// initialized packet of correct length, it modifies the report packet so that +// each element in the given list of usages has been set in the report packet. +// For example, in an output report with 5 LEDs, each with a given usage, +// an application could turn on any subset of these lights by placing their +// usages in any order into the usage array (UsageList). HidP_SetUsages would, +// in turn, set the appropriate bit or add the corresponding byte into the +// HID Main Array Item. +// +// A properly initialized Report packet is one of the correct byte length, +// and all zeros. +// +// NOTE: A packet that has already been set with a call to a HidP_Set routine +// can also be passed in. This routine then sets processes the UsageList +// in the same fashion but verifies that the ReportID already set in +// Report matches the report ID for the given usages. +// +// Parameters: +// ReportType One of HidP_Input, HidP_Output or HidP_Feature. +// +// UsagePage All of the usages in the usage array, which HidP_SetUsages will +// set in the report, refer to this same usage page. +// If a client wishes to set usages in a report for multiple +// usage pages then that client needs to make multiple calls to +// HidP_SetUsages for each of the usage pages. +// +// UsageList A usage array containing the usages that HidP_SetUsages will set in +// the report packet. +// +// UsageLength The length of the given usage array in array elements. +// The parser will set this value to the position in the usage +// array where it stopped processing. If successful, UsageLength +// will be unchanged. In any error condition, this parameter +// reflects how many of the usages in the usage list have +// actually been set by the parser. This is useful for finding +// the usage in the list which caused the error. +// +// PreparsedData The preparsed data recevied from HIDCLASS +// +// Report The report packet. +// +// ReportLength Length of the given report packet...Must be equal to the +// value reported in the HIDP_CAPS structure for the device +// and corresponding report type. +// +// Return Value +// HidP_SetUsages returns the following error codes. On error, the report packet +// will be correct up until the usage element that caused the error. +// +// - HIDP_STATUS_SUCCESS -- upon successful insertion of all usages +// into the report packet. +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not +// equal to the length specified in +// the HIDP_CAPS structure for the given +// ReportType +// - HIDP_STATUS_REPORT_DOES_NOT_EXIST -- if there are no reports on this device +// for the given ReportType +// - HIDP_STATUS_INCOMPATIBLE_REPORT_ID -- if a usage was found that exists in a +// different report. If the report is +// zero-initialized on entry the first +// usage in the list will determine which +// report ID is used. Otherwise, the +// parser will verify that usage matches +// the passed in report's ID +// - HIDP_STATUS_USAGE_NOT_FOUND -- if the usage does not exist for any +// report (no matter what the report ID) +// for the given report type. +// - HIDP_STATUS_BUFFER_TOO_SMALL -- if there are not enough entries in a +// given Main Array Item to list all of +// the given usages. The caller needs +// to split his request into more than +// one call + +function HidP_SetUsages(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; UsageList: PUsage; var UsageLength: ULONG; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_SetUsages} + +function HidP_SetButtons(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; ButtonList: PUsage; var ButtonLength: ULONG; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_SetButtons} + +// Routine Description: +// This function unsets (turns off) binary values (buttons) in the report. Given +// an initialized packet of correct length, it modifies the report packet so +// that each element in the given list of usages has been unset in the +// report packet. +// +// This function is the "undo" operation for SetUsages. If the given usage +// is not already set in the Report, it will return an error code of +// HIDP_STATUS_BUTTON_NOT_PRESSED. If the button is pressed, HidP_UnsetUsages +// will unset the appropriate bit or remove the corresponding index value from +// the HID Main Array Item. +// +// A properly initialized Report packet is one of the correct byte length, +// and all zeros.. +// +// NOTE: A packet that has already been set with a call to a HidP_Set routine +// can also be passed in. This routine then processes the UsageList +// in the same fashion but verifies that the ReportID already set in +// Report matches the report ID for the given usages. +// +// Parameters: +// ReportType One of HidP_Input, HidP_Output or HidP_Feature. +// +// UsagePage All of the usages in the usage array, which HidP_UnsetUsages will +// unset in the report, refer to this same usage page. +// If a client wishes to unset usages in a report for multiple +// usage pages then that client needs to make multiple calls to +// HidP_UnsetUsages for each of the usage pages. +// +// UsageList A usage array containing the usages that HidP_UnsetUsages will +// unset in the report packet. +// +// UsageLength The length of the given usage array in array elements. +// The parser will set this value to the position in the usage +// array where it stopped processing. If successful, UsageLength +// will be unchanged. In any error condition, this parameter +// reflects how many of the usages in the usage list have +// actually been unset by the parser. This is useful for finding +// the usage in the list which caused the error. +// +// PreparsedData The preparsed data recevied from HIDCLASS +// +// Report The report packet. +// +// ReportLength Length of the given report packet...Must be equal to the +// value reported in the HIDP_CAPS structure for the device +// and corresponding report type. +// +// Return Value +// HidP_UnsetUsages returns the following error codes. On error, the report +// packet will be correct up until the usage element that caused the error. +// +// - HIDP_STATUS_SUCCESS -- upon successful "unsetting" of all usages +// in the report packet. +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not +// equal to the length specified in +// the HIDP_CAPS structure for the given +// ReportType +// - HIDP_STATUS_REPORT_DOES_NOT_EXIST -- if there are no reports on this device +// for the given ReportType +// - HIDP_STATUS_INCOMPATIBLE_REPORT_ID -- if a usage was found that exists in a +// different report. If the report is +// zero-initialized on entry the first +// usage in the list will determine which +// report ID is used. Otherwise, the +// parser will verify that usage matches +// the passed in report's ID +// - HIDP_STATUS_USAGE_NOT_FOUND -- if the usage does not exist for any +// report (no matter what the report ID) +// for the given report type. +// - HIDP_STATUS_BUTTON_NOT_PRESSED -- if a usage corresponds to a button that +// is not already set in the given report + +function HidP_UnsetUsages(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; UsageList: PUsage; var UsageLength: ULONG; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_UnsetUsages} + +function HidP_UnsetButtons(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; ButtonList: PUsage; var ButtonLength: ULONG; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_UnsetButtons} + +// Routine Description: +// This function returns the maximum number of usages that a call to +// HidP_GetUsages or HidP_GetUsagesEx could return for a given HID report. +// If calling for number of usages returned by HidP_GetUsagesEx, use 0 as +// the UsagePage value. +// +// Parameters: +// ReportType One of HidP_Input, HidP_Output or HidP_Feature. +// +// UsagePage Specifies the optional UsagePage to query for. If 0, will +// return all the maximum number of usage values that could be +// returned for a given ReportType. If non-zero, will return +// the maximum number of usages that would be returned for the +// ReportType with the given UsagePage. +// +// PreparsedData Preparsed data returned from HIDCLASS +// +// Return Value: +// The length of the usage list array required for the HidP_GetUsages or +// HidP_GetUsagesEx function call. If an error occurs (such as +// HIDP_STATUS_INVALID_REPORT_TYPE or HIDP_INVALID_PREPARSED_DATA, this +// returns 0. + +function HidP_MaxUsageListLength(ReportType: THIDPReportType; UsagePage: TUsage; + PreparsedData: PHIDPPreparsedData): ULONG; stdcall; +{$EXTERNALSYM HidP_MaxUsageListLength} + +function HidP_MaxButtonListLength(ReportType: THIDPReportType; UsagePage: TUsage; + PreparsedData: PHIDPPreparsedData): ULONG; stdcall; +{$EXTERNALSYM HidP_MaxButtonListLength} + +// Description +// HidP_GetUsageValue retrieves the value from the HID Report for the usage +// specified by the combination of usage page, usage and link collection. +// If a report packet contains two different fields with the same +// Usage and UsagePage, they can be distinguished with the optional +// LinkCollection field value. +// +// Parameters: +// +// ReportType One of HidP_Input or HidP_Feature. +// +// UsagePage The usage page to which the given usage refers. +// +// LinkCollection (Optional) This value can be used to differentiate +// between two fields that may have the same +// UsagePage and Usage but exist in different +// collections. If the link collection value +// is zero, this function will set the first field +// it finds that matches the usage page and +// usage. +// +// Usage The usage whose value HidP_GetUsageValue will retrieve +// +// UsageValue The raw value that is set for the specified field in the report +// buffer. This value will either fall within the logical range +// or if NULL values are allowed, a number outside the range to +// indicate a NULL +// +// PreparsedData The preparsed data returned for HIDCLASS +// +// Report The report packet. +// +// ReportLength Length (in bytes) of the given report packet. +// +// +// Return Value: +// HidP_GetUsageValue returns the following error codes: +// +// - HIDP_STATUS_SUCCESS -- upon successfully retrieving the value +// from the report packet +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not +// equal to the length specified in +// the HIDP_CAPS structure for the given +// ReportType +// - HIDP_STATUS_REPORT_DOES_NOT_EXIST -- if there are no reports on this device +// for the given ReportType +// - HIDP_STATUS_INCOMPATIBLE_REPORT_ID -- the specified usage page, usage and +// link collection exist but exists in +// a report with a different report ID +// than the report being passed in. To +// set this value, call HidP_GetUsageValue +// again with a different report packet +// - HIDP_STATUS_USAGE_NOT_FOUND -- if the usage page, usage, and link +// collection combination does not exist +// in any reports for this ReportType + +function HidP_GetUsageValue(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; Usage: TUsage; var UsageValue: ULONG; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetUsageValue} + +// Description +// HidP_GetScaledUsageValue retrieves a UsageValue from the HID report packet +// in the field corresponding to the given usage page and usage. If a report +// packet contains two different fields with the same Usage and UsagePage, +// they can be distinguished with the optional LinkCollection field value. +// +// If the specified field has a defined physical range, this function converts +// the logical value that exists in the report packet to the corresponding +// physical value. If a physical range does not exist, the function will +// return the logical value. This function will check to verify that the +// logical value in the report falls within the declared logical range. +// +// When doing the conversion between logical and physical values, this +// function assumes a linear extrapolation between the physical max/min and +// the logical max/min. (Where logical is the values reported by the device +// and physical is the value returned by this function). If the data field +// size is less than 32 bits, then HidP_GetScaledUsageValue will sign extend +// the value to 32 bits. +// +// If the range checking fails but the field has NULL values, the function +// will set UsageValue to 0 and return HIDP_STATUS_NULL. Otherwise, it +// returns a HIDP_STATUS_OUT_OF_RANGE error. +// +// Parameters: +// +// ReportType One of HidP_Output or HidP_Feature. +// +// UsagePage The usage page to which the given usage refers. +// +// LinkCollection (Optional) This value can be used to differentiate +// between two fields that may have the same +// UsagePage and Usage but exist in different +// collections. If the link collection value +// is zero, this function will retrieve the first +// field it finds that matches the usage page +// and usage. +// +// Usage The usage whose value HidP_GetScaledUsageValue will retrieve +// +// UsageValue The value retrieved from the report buffer. See the routine +// description above for the different interpretations of this +// value +// +// PreparsedData The preparsed data returned from HIDCLASS +// +// Report The report packet. +// +// ReportLength Length (in bytes) of the given report packet. +// +// +// Return Value: +// HidP_GetScaledUsageValue returns the following error codes: +// +// - HIDP_STATUS_SUCCESS -- upon successfully retrieving the value +// from the report packet +// - HIDP_STATUS_NULL -- if the report packet had a NULL value +// set +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not +// equal to the length specified in +// the HIDP_CAPS structure for the given +// ReportType +// - HIDP_STATUS_VALUE_OUT_OF_RANGE -- if the value retrieved from the packet +// falls outside the logical range and +// the field does not support NULL values +// - HIDP_STATUS_BAD_LOG_PHY_VALUES -- if the field has a physical range but +// either the logical range is invalid +// (max <= min) or the physical range is +// invalid +// - HIDP_STATUS_INCOMPATIBLE_REPORT_ID -- the specified usage page, usage and +// link collection exist but exists in +// a report with a different report ID +// than the report being passed in. To +// set this value, call +// HidP_GetScaledUsageValue with a +// different report packet +// - HIDP_STATUS_USAGE_NOT_FOUND -- if the usage page, usage, and link +// collection combination does not exist +// in any reports for this ReportType + +function HidP_GetScaledUsageValue(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; Usage: TUsage; var UsageValue: Integer; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetScaledUsageValue} + +// Routine Descripton: +// A usage value array occurs when the last usage in the list of usages +// describing a main item must be repeated because there are less usages defined +// than there are report counts declared for the given main item. In this case +// a single value cap is allocated for that usage and the report count of that +// value cap is set to reflect the number of fields to which that usage refers. +// +// HidP_GetUsageValueArray returns the raw bits for that usage which spans +// more than one field in a report. +// +// NOTE: This function currently does not support value arrays where the +// ReportSize for each of the fields in the array is not a multiple +// of 8 bits. +// +// The UsageValue buffer will have the raw values as they are set +// in the report packet. +// +// Parameters: +// +// ReportType One of HidP_Input, HidP_Output or HidP_Feature. +// +// UsagePage The usage page to which the given usage refers. +// +// LinkCollection (Optional) This value can be used to differentiate +// between two fields that may have the same +// UsagePage and Usage but exist in different +// collections. If the link collection value +// is zero, this function will set the first field +// it finds that matches the usage page and +// usage. +// +// Usage The usage whose value HidP_GetUsageValueArray will retreive. +// +// UsageValue A pointer to an array of characters where the value will be +// placed. The number of BITS required is found by multiplying the +// BitSize and ReportCount fields of the Value Cap for this +// control. The least significant bit of this control found in the +// given report will be placed in the least significant bit location +// of the buffer (little-endian format), regardless of whether +// or not the field is byte aligned or if the BitSize is a multiple +// of sizeof (CHAR). +// +// See note above about current implementation limitations +// +// UsageValueByteLength +// the length of the given UsageValue buffer. +// +// PreparsedData The preparsed data returned by the HIDCLASS +// +// Report The report packet. +// +// ReportLength Length of the given report packet. +// +// Return Value: +// +// - HIDP_STATUS_SUCCESS -- upon successfully retrieving the value +// from the report packet +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not +// equal to the length specified in +// the HIDP_CAPS structure for the given +// ReportType +// - HIDP_STATUS_NOT_VALUE_ARRAY -- if the control specified is not a +// value array -- a value array will have +// a ReportCount field in the +// HIDP_VALUE_CAPS structure that is > 1 +// Use HidP_GetUsageValue instead +// - HIDP_STATUS_BUFFER_TOO_SMALL -- if the size of the passed in buffer in +// which to return the array is too small +// (ie. has fewer values than the number of +// fields in the array +// - HIDP_STATUS_NOT_IMPLEMENTED -- if the usage value array has field sizes +// that are not multiples of 8 bits, this +// error code is returned since the function +// currently does not handle getting values +// from such arrays. +// - HIDP_STATUS_INCOMPATIBLE_REPORT_ID -- the specified usage page, usage and +// link collection exist but exists in +// a report with a different report ID +// than the report being passed in. To +// set this value, call +// HidP_GetUsageValueArray with a +// different report packet +// - HIDP_STATUS_USAGE_NOT_FOUND -- if the usage page, usage, and link +// collection combination does not exist +// in any reports for this ReportType + +function HidP_GetUsageValueArray(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; Usage: TUsage; UsageValue: PChar; + UsageValueByteLength: Word; PreparsedData: PHIDPPreparsedData; + var Report; ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetUsageValueArray} + +// Description: +// HidP_SetUsageValue inserts a value into the HID Report Packet in the field +// corresponding to the given usage page and usage. HidP_SetUsageValue +// casts this value to the appropriate bit length. If a report packet +// contains two different fields with the same Usage and UsagePage, +// they can be distinguished with the optional LinkCollection field value. +// Using this function sets the raw value into the report packet with +// no checking done as to whether it actually falls within the logical +// minimum/logical maximum range. Use HidP_SetScaledUsageValue for this... +// +// NOTE: Although the UsageValue parameter is a ULONG, any casting that is +// done will preserve or sign-extend the value. The value being set +// should be considered a LONG value and will be treated as such by +// this function. +// +// Parameters: +// +// ReportType One of HidP_Output or HidP_Feature. +// +// UsagePage The usage page to which the given usage refers. +// +// LinkCollection (Optional) This value can be used to differentiate +// between two fields that may have the same +// UsagePage and Usage but exist in different +// collections. If the link collection value +// is zero, this function will set the first field +// it finds that matches the usage page and +// usage. +// +// Usage The usage whose value HidP_SetUsageValue will set. +// +// UsageValue The raw value to set in the report buffer. This value must be within +// the logical range or if a NULL value this value should be the +// most negative value that can be represented by the number of bits +// for this field. +// +// PreparsedData The preparsed data returned for HIDCLASS +// +// Report The report packet. +// +// ReportLength Length (in bytes) of the given report packet. +// +// +// Return Value: +// HidP_SetUsageValue returns the following error codes: +// +// - HIDP_STATUS_SUCCESS -- upon successfully setting the value +// in the report packet +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not +// equal to the length specified in +// the HIDP_CAPS structure for the given +// ReportType +// - HIDP_STATUS_REPORT_DOES_NOT_EXIST -- if there are no reports on this device +// for the given ReportType +// - HIDP_STATUS_INCOMPATIBLE_REPORT_ID -- the specified usage page, usage and +// link collection exist but exists in +// a report with a different report ID +// than the report being passed in. To +// set this value, call HidP_SetUsageValue +// again with a zero-initizialed report +// packet +// - HIDP_STATUS_USAGE_NOT_FOUND -- if the usage page, usage, and link +// collection combination does not exist +// in any reports for this ReportType + +function HidP_SetUsageValue(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; Usage: TUsage; UsageValue: ULONG; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_SetUsageValue} + +// Description: +// HidP_SetScaledUsageValue inserts the UsageValue into the HID report packet +// in the field corresponding to the given usage page and usage. If a report +// packet contains two different fields with the same Usage and UsagePage, +// they can be distinguished with the optional LinkCollection field value. +// +// If the specified field has a defined physical range, this function converts +// the physical value specified to the corresponding logical value for the +// report. If a physical value does not exist, the function will verify that +// the value specified falls within the logical range and set according. +// +// If the range checking fails but the field has NULL values, the function will +// set the field to the defined NULL value (most negative number possible) and +// return HIDP_STATUS_NULL. In other words, use this function to set NULL +// values for a given field by passing in a value that falls outside the +// physical range if it is defined or the logical range otherwise. +// +// If the field does not support NULL values, an out of range error will be +// returned instead. +// +// Parameters: +// +// ReportType One of HidP_Output or HidP_Feature. +// +// UsagePage The usage page to which the given usage refers. +// +// LinkCollection (Optional) This value can be used to differentiate +// between two fields that may have the same +// UsagePage and Usage but exist in different +// collections. If the link collection value +// is zero, this function will set the first field +// it finds that matches the usage page and +// usage. +// +// Usage The usage whose value HidP_SetScaledUsageValue will set. +// +// UsageValue The value to set in the report buffer. See the routine +// description above for the different interpretations of this +// value +// +// PreparsedData The preparsed data returned from HIDCLASS +// +// Report The report packet. +// +// ReportLength Length (in bytes) of the given report packet. +// +// +// Return Value: +// HidP_SetScaledUsageValue returns the following error codes: +// +// - HIDP_STATUS_SUCCESS -- upon successfully setting the value +// in the report packet +// - HIDP_STATUS_NULL -- upon successfully setting the value +// in the report packet as a NULL value +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not +// equal to the length specified in +// the HIDP_CAPS structure for the given +// ReportType +// - HIDP_STATUS_VALUE_OUT_OF_RANGE -- if the value specified failed to fall +// within the physical range if it exists +// or within the logical range otherwise +// and the field specified by the usage +// does not allow NULL values +// - HIDP_STATUS_BAD_LOG_PHY_VALUES -- if the field has a physical range but +// either the logical range is invalid +// (max <= min) or the physical range is +// invalid +// - HIDP_STATUS_INCOMPATIBLE_REPORT_ID -- the specified usage page, usage and +// link collection exist but exists in +// a report with a different report ID +// than the report being passed in. To +// set this value, call +// HidP_SetScaledUsageValue again with +// a zero-initialized report packet +// - HIDP_STATUS_USAGE_NOT_FOUND -- if the usage page, usage, and link +// collection combination does not exist +// in any reports for this ReportType + +function HidP_SetScaledUsageValue(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; Usage: TUsage; UsageValue: Integer; + PreparsedData: PHIDPPreparsedData; var Report; + ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_SetScaledUsageValue} + +// Routine Descripton: +// A usage value array occurs when the last usage in the list of usages +// describing a main item must be repeated because there are less usages defined +// than there are report counts declared for the given main item. In this case +// a single value cap is allocated for that usage and the report count of that +// value cap is set to reflect the number of fields to which that usage refers. +// +// HidP_SetUsageValueArray sets the raw bits for that usage which spans +// more than one field in a report. +// +// NOTE: This function currently does not support value arrays where the +// ReportSize for each of the fields in the array is not a multiple +// of 8 bits. +// +// The UsageValue buffer should have the values set as they would appear +// in the report buffer. If this function supported non 8-bit multiples +// for the ReportSize then caller should format the input buffer so that +// each new value begins at the bit immediately following the last bit +// of the previous value +// +// Parameters: +// +// ReportType One of HidP_Output or HidP_Feature. +// +// UsagePage The usage page to which the given usage refers. +// +// LinkCollection (Optional) This value can be used to differentiate +// between two fields that may have the same +// UsagePage and Usage but exist in different +// collections. If the link collection value +// is zero, this function will set the first field +// it finds that matches the usage page and +// usage. +// +// Usage The usage whose value array HidP_SetUsageValueArray will set. +// +// UsageValue The buffer with the values to set into the value array. +// The number of BITS required is found by multiplying the +// BitSize and ReportCount fields of the Value Cap for this +// control. The least significant bit of this control found in the +// given report will be placed in the least significan bit location +// of the array given (little-endian format), regardless of whether +// or not the field is byte alligned or if the BitSize is a multiple +// of sizeof (CHAR). +// +// See the above note for current implementation limitations. +// +// UsageValueByteLength Length of the UsageValue buffer (in bytes) +// +// PreparsedData The preparsed data returned from HIDCLASS +// +// Report The report packet. +// +// ReportLength Length (in bytes) of the given report packet. +// +// +// Return Value: +// - HIDP_STATUS_SUCCESS -- upon successfully setting the value +// array in the report packet +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not +// equal to the length specified in +// the HIDP_CAPS structure for the given +// ReportType +// - HIDP_STATUS_REPORT_DOES_NOT_EXIST -- if there are no reports on this device +// for the given ReportType +// - HIDP_STATUS_NOT_VALUE_ARRAY -- if the control specified is not a +// value array -- a value array will have +// a ReportCount field in the +// HIDP_VALUE_CAPS structure that is > 1 +// Use HidP_SetUsageValue instead +// - HIDP_STATUS_BUFFER_TOO_SMALL -- if the size of the passed in buffer with +// the values to set is too small (ie. has +// fewer values than the number of fields in +// the array +// - HIDP_STATUS_NOT_IMPLEMENTED -- if the usage value array has field sizes +// that are not multiples of 8 bits, this +// error code is returned since the function +// currently does not handle setting into +// such arrays. +// - HIDP_STATUS_INCOMPATIBLE_REPORT_ID -- the specified usage page, usage and +// link collection exist but exists in +// a report with a different report ID +// than the report being passed in. To +// set this value, call +// HidP_SetUsageValueArray again with +// a zero-initialized report packet +// - HIDP_STATUS_USAGE_NOT_FOUND -- if the usage page, usage, and link +// collection combination does not exist +// in any reports for this ReportType + +function HidP_SetUsageValueArray(ReportType: THIDPReportType; UsagePage: TUsage; + LinkCollection: Word; Usage: TUsage; UsageValue: PChar; + UsageValueByteLength: Word; PreparsedData: PHIDPPreparsedData; + var Report; ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_SetUsageValueArray} + +// Routine Description: +// This function will return the difference between a two lists of usages +// (as might be returned from HidP_GetUsages), In other words, it will return +// return a list of usages that are in the current list but not the previous +// list as well as a list of usages that are in the previous list but not +// the current list. +// +// Parameters: +// +// PreviousUsageList The list of usages before. +// CurrentUsageList The list of usages now. +// BreakUsageList Previous - Current. +// MakeUsageList Current - Previous. +// UsageListLength Represents the length of the usage lists in array +// elements. If comparing two lists with a differing +// number of array elements, this value should be +// the size of the larger of the two lists. Any +// zero found with a list indicates an early termination +// of the list and any usages found after the first zero +// will be ignored. + +function HidP_UsageListDifference(PreviousUsageList: PUsage; + CurrentUsageList: PUsage; BreakUsageList: PUsage; + MakeUsageList: PUsage; UsageListLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_UsageListDifference} + +// (rom) these two functions are prototyped in hidpi.h +// (rom) but are missing in all HID.DLL versions + +// function HidP_UsageAndPageListDifference(PreviousUsageList: PUsageAndPage; +// CurrentUsageList: PUsageAndPage; BreakUsageList: PUsageAndPage; +// MakeUsageList: PUsageAndPage; UsageListLength: ULONG):NTSTATUS; stdcall; +// {$EXTERNALSYM HidP_UsageAndPageListDifference} + +// function HidP_TranslateUsageAndPagesToI8042ScanCodes(ChangedUsageList: PUsageAndPage; +// UsageListLength: ULONG; KeyAction: THIDPKeyboardDirection; +// var ModifierState: THIDPKeyboardModifierState; +// InsertCodesProcedure: THIDPInsertScanCodes; +// InsertCodesContext: Pointer): NTSTATUS; stdcall; +// {$EXTERNALSYM HidP_TranslateUsageAndPagesToI8042ScanCodes} + +function HidP_TranslateUsagesToI8042ScanCodes(ChangedUsageList: PUsage; + UsageListLength: ULONG; KeyAction: THIDPKeyboardDirection; + var ModifierState: THIDPKeyboardModifierState; + InsertCodesProcedure: THIDPInsertScanCodes; + InsertCodesContext: Pointer): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_TranslateUsagesToI8042ScanCodes} + +function HidP_IsSameUsageAndPage(u1: TUsageAndPage; + u2: TUsageAndPage): Boolean; stdcall; +{$EXTERNALSYM HidP_IsSameUsageAndPage} + +// Description: +// Given a data index from the value or button capabilities of a given control +// return any extended attributes for the control if any exist. +// +// Parameters: +// ReportType One of HidP_Input, HidP_Output, or HidP_Feature. +// +// DataIndex The data index for the given control, found in the capabilities +// structure for that control +// +// PreparsedData The preparsed data returned from HIDCLASS. +// +// Attributes Pointer to a buffer into which the extended attribute data will +// be copied. +// +// LengthAttributes Length of the given buffer in bytes. +// +// Return Value +// HIDP_STATUS_SUCCESS +// HIDP_STATUS_DATA_INDEX_NOT_FOUND + +{$IFDEF WIN2000} + +// (rom) This function is not in the HID.DLL of Windows 98 +// (rom) never call it unless you have Windows 98 SE or Windows 2000 + +function HidP_GetExtendedAttributes(ReportType: THIDPReportType; + DataIndex: Word; PreparsedData: PHIDPPreparsedData; + Attributes: PHIDPExtendedAttributes; + var LengthAttributes: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_GetExtendedAttributes} + +// Routine Description: +// +// Initialize a report based on the given report ID. +// +// Parameters: +// +// ReportType One of HidP_Input, HidP_Output, or HidP_Feature. +// +// PreparsedData Preparsed data structure returned by HIDCLASS +// +// Report Buffer which to set the data into. +// +// ReportLength Length of Report...Report should be at least as long as the +// value indicated in the HIDP_CAPS structure for the device and +// the corresponding ReportType +// +// Return Value +// +// - HIDP_STATUS_INVALID_REPORT_TYPE -- if ReportType is not valid. +// - HIDP_STATUS_INVALID_PREPARSED_DATA -- if PreparsedData is not valid +// - HIDP_STATUS_INVALID_REPORT_LENGTH -- the length of the report packet is not equal +// to the length specified in HIDP_CAPS +// structure for the given ReportType +// - HIDP_STATUS_REPORT_DOES_NOT_EXIST -- if there are no reports on this device +// for the given ReportType + +// (rom) This function is not in the HID.DLL of Windows 98 +// (rom) never call it unless you have Windows 98 SE or Windows 2000 + +function HidP_InitializeReportForID(ReportType: THIDPReportType; + ReportID: BYTE; PreparsedData: PHIDPPreparsedData; + var Report; ReportLength: ULONG): NTSTATUS; stdcall; +{$EXTERNALSYM HidP_InitializeReportForID} + +{$ENDIF} + +implementation + +const + hiddll = 'hid.dll'; + +// (rom) simply adds three 0 params on call + +function HidP_GetButtonCaps( ReportType: THIDPReportType; + ButtonCaps: PHIDPButtonCaps; var ButtonCapsLength: Word; + PreparsedData: PHIDPPreparsedData): NTSTATUS; stdcall; +begin + HidP_GetButtonCaps := + HidP_GetSpecificButtonCaps(ReportType, 0, 0, 0, ButtonCaps, + ButtonCapsLength, PreparsedData); +end; + +// (rom) simply adds three 0 params on call + +function HidP_GetValueCaps(ReportType: THIDPReportType; + ValueCaps: PHIDPValueCaps; var ValueCapsLength: Word; + PreparsedData: PHIDPPreparsedData): NTSTATUS; stdcall; +begin + HidP_GetValueCaps := + HidP_GetSpecificValueCaps(ReportType, 0, 0, 0, ValueCaps, + ValueCapsLength, PreparsedData); +end; + +// (rom) implements HidP_IsSameUsageAndPage macro +// (rom) the original macro is a really dirty trick + +function HidP_IsSameUsageAndPage(u1: TUsageAndPage; + u2: TUsageAndPage): Boolean; stdcall; +begin + Result := (u1.Usage = u2.Usage) and (u1.UsagePage = u2.UsagePage); +end; + +function HidD_Hello; external hiddll name 'HidD_Hello'; +procedure HidD_GetHidGuid; external hiddll name 'HidD_GetHidGuid'; +function HidD_GetPreparsedData; external hiddll name 'HidD_GetPreparsedData'; +function HidD_FreePreparsedData; external hiddll name 'HidD_FreePreparsedData'; +function HidD_GetConfiguration; external hiddll name 'HidD_GetConfiguration'; +function HidD_SetConfiguration; external hiddll name 'HidD_SetConfiguration'; +function HidD_FlushQueue; external hiddll name 'HidD_FlushQueue'; +function HidD_GetFeature; external hiddll name 'HidD_GetFeature'; +function HidD_SetFeature; external hiddll name 'HidD_SetFeature'; +function HidD_GetNumInputBuffers; external hiddll name 'HidD_GetNumInputBuffers'; +function HidD_SetNumInputBuffers; external hiddll name 'HidD_SetNumInputBuffers'; +function HidD_GetAttributes; external hiddll name 'HidD_GetAttributes'; +function HidD_GetManufacturerString; external hiddll name 'HidD_GetManufacturerString'; +function HidD_GetProductString; external hiddll name 'HidD_GetProductString'; +function HidD_GetSerialNumberString; external hiddll name 'HidD_GetSerialNumberString'; +function HidD_GetPhysicalDescriptor; external hiddll name 'HidD_GetPhysicalDescriptor'; +function HidD_GetIndexedString; external hiddll name 'HidD_GetIndexedString'; +function HidP_GetCaps; external hiddll name 'HidP_GetCaps'; +function HidP_GetLinkCollectionNodes; external hiddll name 'HidP_GetLinkCollectionNodes'; +function HidP_GetSpecificButtonCaps; external hiddll name 'HidP_GetSpecificButtonCaps'; +function HidP_GetSpecificValueCaps; external hiddll name 'HidP_GetSpecificValueCaps'; +function HidP_GetData; external hiddll name 'HidP_GetData'; +function HidP_SetData; external hiddll name 'HidP_SetData'; +function HidP_MaxDataListLength; external hiddll name 'HidP_MaxDataListLength'; +function HidP_GetUsages; external hiddll name 'HidP_GetUsages'; +function HidP_GetButtons; external hiddll name 'HidP_GetUsages'; +function HidP_GetUsagesEx; external hiddll name 'HidP_GetUsagesEx'; +function HidP_GetButtonsEx; external hiddll name 'HidP_GetUsagesEx'; +function HidP_SetUsages; external hiddll name 'HidP_SetUsages'; +function HidP_SetButtons; external hiddll name 'HidP_SetUsages'; +function HidP_UnsetUsages; external hiddll name 'HidP_UnsetUsages'; +function HidP_UnsetButtons; external hiddll name 'HidP_UnsetUsages'; +function HidP_MaxUsageListLength; external hiddll name 'HidP_MaxUsageListLength'; +function HidP_MaxButtonListLength; external hiddll name 'HidP_MaxUsageListLength'; +function HidP_GetUsageValue; external hiddll name 'HidP_GetUsageValue'; +function HidP_GetScaledUsageValue; external hiddll name 'HidP_GetScaledUsageValue'; +function HidP_GetUsageValueArray; external hiddll name 'HidP_GetUsageValueArray'; +function HidP_SetUsageValue; external hiddll name 'HidP_SetUsageValue'; +function HidP_SetScaledUsageValue; external hiddll name 'HidP_SetScaledUsageValue'; +function HidP_SetUsageValueArray; external hiddll name 'HidP_SetUsageValueArray'; +function HidP_UsageListDifference; external hiddll name 'HidP_UsageListDifference'; +function HidP_TranslateUsagesToI8042ScanCodes; external hiddll name 'HidP_TranslateUsagesToI8042ScanCodes'; +// function HidP_UsageAndPageListDifference; external hiddll name 'function HidP_UsageAndPageListDifference'; +// function HidP_TranslateUsageAndPagesToI8042ScanCodes; external hiddll name 'HidP_TranslateUsageAndPagesToI8042ScanCodes'; +{$IFDEF WIN2000} +function HidP_GetExtendedAttributes; external hiddll name 'HidP_GetExtendedAttributes'; +function HidP_InitializeReportForID; external hiddll name 'HidP_InitializeReportForID'; +{$ENDIF} + +end. + diff --git a/lib/HID/HidController.GID b/lib/HID/HidController.GID new file mode 100644 index 00000000..a3830711 Binary files /dev/null and b/lib/HID/HidController.GID differ diff --git a/lib/HID/HidController.dcu b/lib/HID/HidController.dcu new file mode 100644 index 00000000..3d00a8b4 Binary files /dev/null and b/lib/HID/HidController.dcu differ diff --git a/lib/HID/HidController.dof b/lib/HID/HidController.dof new file mode 100644 index 00000000..afd81706 --- /dev/null +++ b/lib/HID/HidController.dof @@ -0,0 +1,91 @@ +[Compiler] +A=1 +B=0 +C=0 +D=0 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=0 +M=0 +N=1 +O=1 +P=1 +Q=1 +R=1 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=0 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription=complete HID access + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages= +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1031 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[HistoryLists\hlUnitOutputDirectory] +Count=1 +Item0=..\..\bin diff --git a/lib/HID/HidController.dpk b/lib/HID/HidController.dpk new file mode 100644 index 00000000..93778087 --- /dev/null +++ b/lib/HID/HidController.dpk @@ -0,0 +1,37 @@ +package HidController; + +{$R *.RES} +{$ALIGN ON} +{$ASSERTIONS OFF} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS OFF} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'complete HID access'} +{$IMPLICITBUILD OFF} + +requires + vcl40; + +contains + HidControllerClass in 'HidControllerClass.pas', + SetupApi in 'SetupApi.pas', + Hid in 'Hid.pas', + DBT in 'DBT.pas'; + +end. diff --git a/lib/HID/HidController.res b/lib/HID/HidController.res new file mode 100644 index 00000000..82c2c4f6 Binary files /dev/null and b/lib/HID/HidController.res differ diff --git a/lib/HID/HidControllerClass.dcr b/lib/HID/HidControllerClass.dcr new file mode 100644 index 00000000..969f6b51 Binary files /dev/null and b/lib/HID/HidControllerClass.dcr differ diff --git a/lib/HID/HidControllerClass.dcu b/lib/HID/HidControllerClass.dcu new file mode 100644 index 00000000..4a8c6057 Binary files /dev/null and b/lib/HID/HidControllerClass.dcu differ diff --git a/lib/HID/HidControllerClass.pas b/lib/HID/HidControllerClass.pas new file mode 100644 index 00000000..5e9c6a2e --- /dev/null +++ b/lib/HID/HidControllerClass.pas @@ -0,0 +1,1380 @@ +{******************************************************************************} +{ } +{ Project JEDI } +{ } +{ The contents of this file are subject to the Mozilla Public License Version } +{ 1.0 (the "License"); you may not use this file except in compliance with the } +{ License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ } +{ } +{ Software distributed under the License is distributed on an "AS IS" basis, } +{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for } +{ the specific language governing rights and limitations under the License. } +{ } +{ The Original Code is HidControllerClass.pas. } +{ } +{ The Initial Developer of the Original Code is Robert Marquardt. } +{ (robert_marquardt@gmx.de) } +{ } +{ Portions created by Robert Marquardt are } +{ Copyright (c) 1999, 2000 Robert Marquardt. } +{ } +{ Last modified: September 1, 2000 } +{ } +{******************************************************************************} + +unit HidControllerClass; + +interface + +uses + Windows, Messages, Classes, Forms, SysUtils, + DBT, SetupAPI, Hid; + +const + // strings from the registry for CheckOutByClass + cHidKeyboardClass = 'Keyboard'; + cHidMouseClass = 'Mouse'; + cHidNoClass = 'HIDClass'; + +// Definitions to allow SetUpAPI dynamic loading +(* + +type + HDEVINFO = Pointer; + + PSPDevInfoData = ^TSPDevInfoData; + _SP_DEVINFO_DATA = packed record + cbSize: DWORD; + ClassGuid: TGUID; + DevInst: DWORD; // DEVINST handle + Reserved: ULONG_PTR; + end; + TSPDevInfoData = _SP_DEVINFO_DATA; + + TSetupDiGetDeviceRegistryProperty = function (DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Property_: DWORD; + PropertyRegDataType: PDWORD; PropertyBuffer: PBYTE; PropertyBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; + + +*) + +type + // forward declarations + TJvHidDeviceController = class; + TJvHidDevice = class; + + // the Event function declarations + TJvHidEnumerateEvent = function (HidDev: TJvHidDevice; Idx: Integer): Boolean of object; + TJvHidUnplugEvent = procedure(HidDev: TJvHidDevice) of object; + + // the representation of a HID device + + TJvHidDevice = class(TObject) + private + // internal control variables + FMyController: TJvHidDeviceController; + FIsPluggedIn: Boolean; + FIsCheckedOut: Boolean; + FIsEnumerated: Boolean; + FHidFileHandle: THandle; + FHidOverlappedHandle: THandle; + // internal properties part + FDeviceID: DWORD; + FDevicePath: string; + FRegDescr: string; + FRegClass: string; + FVendorName: AnsiString; + FProductName: AnsiString; + FPhysicalDescriptor: AnsiString; + FSerialNumber: AnsiString; + FLanguageStrings: TStringList; + FPreparsedData: PHIDPPreparsedData; + FAttributes: THIDDAttributes; + FCaps: THIDPCaps; + FConfiguration: THIDDConfiguration; + FNumInputBuffers: Integer; + FNumOverlappedBuffers: Integer; + FLinkCollection: array of THIDPLinkCollectionNode; + FMaxDataListLength: ULONG; + FMaxUsageListLength: ULONG; + FMaxButtonListLength: ULONG; + FReportTypeParam: THIDPReportType; + FUsagePageParam: TUsage; + FLinkCollectionParam: WORD; + FUsageParam: TUsage; + FUnplug: TJvHidUnplugEvent; + + // tells if access to device is allowed + function IsAccessible: Boolean; + procedure GetMax; + + // internal property implementors + function GetDeviceString (Idx: Byte): string; + function GetLinkCollectionNode (Idx: WORD): THIDPLinkCollectionNode; + procedure SetConfiguration (Config: THIDDConfiguration); + procedure SetNumInputBuffers (const Num: Integer); + procedure SetNumOverlappedBuffers(const Num: Integer); + procedure SetReportTypeParam (const ReportType: THIDPReportType); + procedure SetUsagePageParam (const UsagePage: TUsage); + + // Constructor is hidden! Only a TJvHidDeviceController can create a TJvHidDevice object. + constructor Create(const DevicePath: string; const DevID: DWORD; + const DevDesc, ClassDesc: string; + Controller: TJvHidDeviceController); + + protected + // internal property implementors + procedure DoUnplug; + procedure SetUnplug(const Event: TJvHidUnplugEvent); + + public + // indexed properties + property DeviceStrings [Idx: Byte]: string read GetDeviceString; + property LinkCollectionNodes[Idx: WORD]: THIDPLinkCollectionNode read GetLinkCollectionNode; + + published + destructor Destroy; override; + + // methods + procedure CloseFile; + procedure CloseFileEx; + function DeviceIoControl (IoControlCode: DWORD; InBuffer: Pointer; InSize: DWORD; + OutBuffer: Pointer; OutSize: DWORD; + var BytesReturned: DWORD): Boolean; + function FlushQueue: Boolean; + function GetButtonCaps (ButtonCaps: PHIDPButtonCaps; var Count: WORD): NTSTATUS; + function GetButtons (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetButtonsEx (UsageList: PUsageAndPage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetData (DataList: PHIDPData; var DataLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetFeature (var Report; const Size: Integer): Boolean; + function GetScaledUsageValue (var UsageValue: Integer; + var Report; ReportLength: ULONG): NTSTATUS; + function GetSpecificButtonCaps(ButtonCaps: PHIDPButtonCaps; var Count: WORD): NTSTATUS; + function GetSpecificValueCaps (ValueCaps: PHIDPValueCaps; var Count: WORD): NTSTATUS; + function GetUsages (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetUsagesEx (UsageList: PUsageAndPage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetUsageValue (var UsageValue: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetUsageValueArray (UsageValue: PChar; UsageValueByteLength: WORD; + var Report; ReportLength: ULONG): NTSTATUS; + function GetValueCaps (ValueCaps: PHIDPValueCaps; var Count: WORD): NTSTATUS; + function OpenFile: Boolean; + function OpenFileEx: Boolean; + function SetButtons (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function SetData (DataList: PHIDPData; var DataLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function SetFeature (var Report; const Size: Integer): Boolean; + function SetScaledUsageValue (UsageValue: Integer; + var Report; ReportLength: ULONG): NTSTATUS; + function SetUsages (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function SetUsageValue (UsageValue: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function SetUsageValueArray (UsageValue: PChar; UsageValueByteLength: WORD; + var Report; ReportLength: ULONG): NTSTATUS; + function UnsetButtons (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function UnsetUsages (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function ReadFile (var Report; ToRead: DWORD; var BytesRead: DWORD): Boolean; + function ReadFileEx (var Report; ToRead: DWORD; + CallBack: TPROverlappedCompletionRoutine): Boolean; + function WriteFile (var Report; ToWrite: DWORD; var BytesWritten: DWORD): Boolean; + function WriteFileEx (var Report; ToWrite: DWORD; + CallBack: TPROverlappedCompletionRoutine): Boolean; + + // management properties + property Attributes: THIDDAttributes read FAttributes; + property Caps: THIDPCaps read FCaps; + property Configuration: THIDDConfiguration read FConfiguration write SetConfiguration; + property DevicePath: string read FDevicePath; + property DeviceID: DWORD read FDeviceID; + property HidFileHandle: THandle read FHidFileHandle; + property HidOverlappedHandle: THandle read FHidOverlappedHandle; + property IsCheckedOut: Boolean read FIsCheckedOut; + property IsPluggedIn: Boolean read FIsPluggedIn; + property LanguageStrings: TStringList read FLanguageStrings; + property LinkCollectionParam: WORD read FLinkCollectionParam write FLinkCollectionParam; + property MaxButtonListLength: ULONG read FMaxButtonListLength; + property MaxDataListLength: ULONG read FMaxDataListLength; + property MaxUsageListLength: ULONG read FMaxUsageListLength; + property NumInputBuffers: Integer read FNumInputBuffers write SetNumInputBuffers; + property NumOverlappedBuffers: Integer read FNumOverlappedBuffers write SetNumOverlappedBuffers; + property PhysicalDescriptor: string read FPhysicalDescriptor; + property PreparsedData: PHIDPPreparsedData read FPreparsedData; + property ProductName: string read FProductName; + property RegClass: string read FRegClass; + property RegDescr: string read FRegDescr; + property ReportTypeParam: THIDPReportType read FReportTypeParam write SetReportTypeParam; + property SerialNumber: string read FSerialNumber; + property VendorName: string read FVendorName; + property UsageParam: TUsage read FUsageParam write FUsageParam; + property UsagePageParam: TUsage read FUsagePageParam write SetUsagePageParam; + // the only event property + property OnUnplug: TJvHidUnplugEvent read FUnplug write SetUnplug; + end; + + // controller class to manage all HID devices + + TJvHidDeviceController = class(TComponent) + private + // internal properties part + FHidGuid: TGUID; + FDeviceChangeEvent: TNotifyEvent; + FDeviceChangeFired: Boolean; + FEnumerateEvent: TJvHidEnumerateEvent; + FDevUnplugEvent: TJvHidUnplugEvent; + // internal list of all HID device objects + FList: TList; + // counters for the list + FNumCheckedInDevices: Integer; + FNumCheckedOutDevices: Integer; + FNumUnpluggedDevices: Integer; + // internal worker functions + function CheckThisOut(var HidDev: TJvHidDevice; Idx: Integer; Check: Boolean): Boolean; + procedure FillInList (var List: TList); + function EventPipe (var Msg: TMessage): Boolean; + + protected + procedure Loaded; override; + // internal property implementors + procedure DoDeviceChange; + function DoEnumerate (HidDev: TJvHidDevice; Idx: Integer): Boolean; + procedure SetDeviceChangeEvent(const Notifier: TNotifyEvent); + procedure SetEnumerate (const Enumerator: TJvHidEnumerateEvent); + procedure SetDevUnplug (const Unplugger: TJvHidUnplugEvent); + + published + // normal constructor/destructor + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + + // methods to hand out HID device objects + procedure CheckIn (var HidDev: TJvHidDevice); + function CheckOut (var HidDev: TJvHidDevice): Boolean; + function CheckOutByClass (var HidDev: TJvHidDevice; ClassName: string): Boolean; + function CheckOutByID (var HidDev: TJvHidDevice; Vid, Pid: Integer): Boolean; + function CheckOutByIndex (var HidDev: TJvHidDevice; const Idx: Integer): Boolean; + function CheckOutByProductName(var HidDev: TJvHidDevice; ProductName: string): Boolean; + function CheckOutByVendorName (var HidDev: TJvHidDevice; VendorName: string): Boolean; + // iterate over the HID devices + function Enumerate: Integer; + + // just to be complete the GUID + property HidGuid: TGUID read FHidGuid; + property NumCheckedInDevices: Integer read FNumCheckedInDevices; + property NumCheckedOutDevices: Integer read FNumCheckedOutDevices; + property NumUnpluggedDevices: Integer read FNumUnpluggedDevices; + // this event is copied to TJvHidDeviceOnUnplug on creation + property OnDeviceUnplug: TJvHidUnplugEvent read FDevUnplugEvent write SetDevUnplug; + // the iterator event + property OnEnumerate: TJvHidEnumerateEvent read FEnumerateEvent write SetEnumerate; + // the central event for HID device changes + property OnDeviceChange: TNotifyEvent read FDeviceChangeEvent write SetDeviceChangeEvent; + end; + +// helpers to check the HID function and method results +function HidCheck(const RetVal: NTSTATUS): NTSTATUS; overload; +function HidCheck(const RetVal: LongBool): LongBool; overload; +function HidError(const RetVal: NTSTATUS): NTSTATUS; + +// to register the component in the palette +procedure Register; + +implementation + +{$R HidControllerClass.dcr} + +type + EControllerError = class(Exception); + EHidClientError = class(Exception); + +var + // counter to prevent a second TJvHidDeviceController instance + GlobalInstanceCount: Integer = 0; + +//== these are declared inconsistent in Windows.pas =================== + +function ReadFileEx(hFile: THandle; var Buffer; nNumberOfBytesToRead: DWORD; + var Overlapped: TOverlapped; lpCompletionRoutine: TPROverlappedCompletionRoutine): BOOL; stdcall; + external 'kernel32.dll' name 'ReadFileEx'; +function WriteFileEx(hFile: THandle; var Buffer; nNumberOfBytesToWrite: DWORD; + var Overlapped: TOverlapped; lpCompletionRoutine: TPROverlappedCompletionRoutine): BOOL; stdcall; + external 'kernel32.dll' name 'WriteFileEx'; + +//== TJvHidDevice ===================================================== + +// internal helper to read string values from a devices registry area + +function GetRegistryProperty(PnPHandle: HDEVINFO; var DevData: TSPDevInfoData; ClassID: DWORD): string; +var + BytesReturned: DWORD; + RegData: DWORD; + Buffer: array [0..256] of Char; +begin + BytesReturned := 0; + RegData := REG_SZ; + Buffer[0] := #0; + SetupDiGetDeviceRegistryProperty(PnPHandle, DevData, ClassID, + @RegData, @Buffer[0], SizeOf(Buffer), @BytesReturned); + Result := Buffer; +end; + +//-- TJvHidDevice: basics and internals ------------------------------- + +// create and fill in a HidDevice object +// the constructor is only accessible from TJvHidController +// DevicePath names the device "file" +// DevID is a handle to the individual device +// (differs even for two devices of the same kind) +// DevDesc and ClassDesc are two strings from the devices registry space +// Controller is the devices controller object + +constructor TJvHidDevice.Create(const DevicePath: string; const DevID: DWORD; + const DevDesc, ClassDesc: string; Controller: TJvHidDeviceController); +var + I: Integer; + Len: ULONG; + Buffer: array [0..256] of WideChar; + IDs: array [0..258] of WORD; + Name: array [0..256] of Char; +begin + inherited Create; + + // initialize private data + FMyController := Controller; + FIsPluggedIn := True; + FIsCheckedOut := False; + FIsEnumerated := False; + FHidOverlappedHandle := INVALID_HANDLE_VALUE; + FDeviceID := 0; + FDevicePath := DevicePath; + FRegDescr := ''; + FRegClass := ''; + FVendorName := ''; + FProductName := ''; + FPhysicalDescriptor := ''; + FSerialNumber := ''; + FLanguageStrings := TStringList.Create; + FPreparsedData := 0; + FillChar(FCaps, SizeOf(FCaps), #0); + FillChar(FConfiguration, SizeOf(FConfiguration), #0); + FNumInputBuffers := 0; + FNumOverlappedBuffers := 0; + SetLength(FLinkCollection, 0); + FMaxDataListLength := 0; + FMaxUsageListLength := 0; + FMaxButtonListLength := 0; + FReportTypeParam := HIDP_Input; + FUsagePageParam := 0; + FLinkCollectionParam := 0; + FUsageParam := 0; + FUnplug := Controller.FDevUnplugEvent; + + FHidFileHandle := CreateFile(PChar(FDevicePath), GENERIC_READ or GENERIC_WRITE, + FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0); + if HidFileHandle = INVALID_HANDLE_VALUE then + FHidFileHandle := CreateFile(PChar(FDevicePath), 0, + FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0); + if HidFileHandle <> INVALID_HANDLE_VALUE then + begin + // get all device data through HID functions + // this eliminates the need to redeclare them as methods + FDeviceID := DevID; + FRegDescr := DevDesc; + FRegClass := ClassDesc; + FAttributes.Size := SizeOf(THIDDAttributes); + HidD_GetPreparsedData(HidFileHandle, FPreparsedData); + HidD_GetAttributes (HidFileHandle, FAttributes); + FConfiguration.cookie := nil; + FConfiguration.size := 0; + FConfiguration.RingBufferSize := 0; + HidD_GetConfiguration(HidFileHandle, FConfiguration, SizeOf(THIDDConfiguration)); + HidP_GetCaps(FPreparsedData, FCaps); + // calculate length of StringDescriptor 0 + FillChar(IDs, SizeOf(IDs), #0); + Len := 0; + for I := 0 to 256 do + begin + if HidD_GetIndexedString(HidFileHandle, 0, PWideChar(@IDs), I*SizeOf(WORD)) then + Break; + Inc(Len); + end; + // transform id into localized language name + for I := 0 to Len - 1 do + begin + Name[0] := #0; + if GetLocaleInfo(WORD(IDs[I]), LOCALE_SLANGUAGE, Name, SizeOf(Name)) <> 0 then + FLanguageStrings.Add(Name) + else + FLanguageStrings.Add(Format('unknown Locale ID $%.4x',[WORD(IDs[I])])); + end; + if HidD_GetManufacturerString(HidFileHandle, Buffer, SizeOf(Buffer)) then + FVendorName := WideCharToString(Buffer); + if HidD_GetProductString(HidFileHandle, Buffer, SizeOf(Buffer)) then + FProductName := WideCharToString(Buffer); + if HidD_GetPhysicalDescriptor(HidFileHandle, Buffer, SizeOf(Buffer)) then + FPhysicalDescriptor := WideCharToString(Buffer); + // compensate for buggy function + if HidD_GetSerialNumberString(HidFileHandle, Buffer, SizeOf(Buffer)) then + for I := 0 to Len - 1 do + if IDs[I] <> WORD(Buffer[I]) then + begin + FSerialNumber := WideCharToString(Buffer); + Break; + end; + Len := FCaps.NumberLinkCollectionNodes; + SetLength(FLinkCollection, Len); + HidP_GetLinkCollectionNodes(@FLinkCollection[0], Len, FPreparsedData); + end; + // the file is closed to stop using up resources + CloseFile; +end; + +// If a TJvHidDevice is destroyed the TJvHidController has to be informed. +// If the device is plugged in this TJvHidDevice instance is destroyed, +// but another instance is created in the controller list + +destructor TJvHidDevice.Destroy; +var + I: Integer; +begin + // to prevent strange problems + OnUnplug := nil; + // free the data which needs special handling + CloseFile; + CloseFileEx; + HidD_FreePreparsedData(FPreparsedData); + FLanguageStrings.Free; + + // if controller exists + if FMyController <> nil then + with FMyController do + begin + // delete device from controller list + for I := 0 to FList.Count - 1 do + if FList.Items[I] = Self then + begin + // if device is plugged in create a checked in copy + if IsPluggedIn then + begin + FList.Items[I] := TJvHidDevice.Create(DevicePath, DeviceID, + RegDescr, RegClass, FMyController); + if IsCheckedOut then + begin + Dec(FNumCheckedOutDevices); + Inc(FNumCheckedInDevices); + end; + end + else + begin + FList.Delete(I); + Dec(FNumUnpluggedDevices); + end; + Break; + end; + end; + + inherited Destroy; +end; + +// if check changes change check only here + +function TJvHidDevice.IsAccessible: Boolean; +begin + Result := IsPluggedIn and (IsCheckedOut or FIsEnumerated); +end; + +// open the device "file" (for the other methods) + +function TJvHidDevice.OpenFile: Boolean; +begin + // check if open allowed (propagates this state) + if IsAccessible then + if HidFileHandle = INVALID_HANDLE_VALUE then // if not already opened + begin + FNumInputBuffers := 0; + FHidFileHandle := CreateFile(PChar(FDevicePath), GENERIC_READ or GENERIC_WRITE, + FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0); + if HidFileHandle <> INVALID_HANDLE_VALUE then + HidD_GetNumInputBuffers(HidFileHandle, FNumInputBuffers); + end; + Result := HidFileHandle <> INVALID_HANDLE_VALUE; +end; + +// open second device "file" for ReadFileEx and WriteFileEx + +function TJvHidDevice.OpenFileEx: Boolean; +begin + // check if open allowed (propagates this state) + if IsAccessible then + if HidOverlappedHandle = INVALID_HANDLE_VALUE then // if not already opened + begin + FNumOverlappedBuffers := 0; + FHidOverlappedHandle := CreateFile(PChar(FDevicePath), GENERIC_READ or GENERIC_WRITE, + FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); + if FHidOverlappedHandle <> INVALID_HANDLE_VALUE then + HidD_GetNumInputBuffers(FHidOverlappedHandle, FNumOverlappedBuffers); + end; + Result := FHidOverlappedHandle <> INVALID_HANDLE_VALUE; +end; + +// implement OnUnplug event + +procedure TJvHidDevice.DoUnplug; +begin + CloseFile; + CloseFileEx; + FIsPluggedIn := False; + // event even for checked in devices + if Assigned(FUnplug) then + FUnplug(Self); + // guarantees that event is only called once + OnUnplug := nil; +end; + +// assign the OnUnplug event + +procedure TJvHidDevice.SetUnplug(const Event: TJvHidUnplugEvent); +begin + if @Event <> @FUnplug then + FUnplug := Event; +end; + +// implementing indexed properties read + +function TJvHidDevice.GetDeviceString(Idx: Byte): string; +var + Buffer: array [0..256] of WideChar; +begin + Result := ''; + if Idx <> 0 then + if OpenFile then + if HidD_GetIndexedString(HidFileHandle, Idx, Buffer, SizeOf(Buffer)) then + Result := WideCharToString(Buffer); +end; + +function TJvHidDevice.GetLinkCollectionNode(Idx: WORD): THIDPLinkCollectionNode; +begin + FillChar(Result, SizeOf(THIDPLinkCollectionNode), #0); + if (Idx > 0) and (Idx <= Length(FLinkCollection)) then + Result := FLinkCollection[Idx-1]; +end; + +// implementing properties write + +procedure TJvHidDevice.SetNumInputBuffers(const Num: Integer); +begin + if OpenFile then + begin + HidD_SetNumInputBuffers(HidFileHandle, Num); + HidD_GetNumInputBuffers(HidFileHandle, FNumInputBuffers); + end; +end; + +procedure TJvHidDevice.SetNumOverlappedBuffers(const Num: Integer); +begin + if OpenFileEx then + begin + HidD_SetNumInputBuffers(HidOverlappedHandle, Num); + HidD_GetNumInputBuffers(HidOverlappedHandle, FNumOverlappedBuffers); + end; +end; + +// internal helper for the following functions + +procedure TJvHidDevice.GetMax; +begin + if IsAccessible then + begin + FMaxDataListLength := HidP_MaxDataListLength (ReportTypeParam, PreparsedData); + FMaxUsageListLength := HidP_MaxUsageListLength (ReportTypeParam, UsagePageParam, PreparsedData); + FMaxButtonListLength := HidP_MaxButtonListLength(ReportTypeParam, UsagePageParam, PreparsedData); + end; +end; + +procedure TJvHidDevice.SetReportTypeParam(const ReportType: THIDPReportType); +begin + FReportTypeParam := ReportType; + GetMax; +end; + +procedure TJvHidDevice.SetUsagePageParam(const UsagePage: TUsage); +begin + FUsagePageParam := UsagePage; + GetMax; +end; + +procedure TJvHidDevice.SetConfiguration(Config: THIDDConfiguration); +begin + if OpenFile then + if HidD_SetConfiguration(HidFileHandle, Config, SizeOf(THIDDConfiguration)) then + FConfiguration := Config; +end; + +//-- TJvHidDevice methods ----------------------------------------------- + +// generally the parameter count of the methods is reduced with the Param properties +// first assign the Param properties the desired value then call a method +// normally you will address the same Usage, UsagePage, ReportType or LinkCollection +// with more than one method +// +// the methods will open the device file when needed +// this file is not closed until unplug or destruction to speed up access + +// close the device "file" +// if you want to open the file directly close this +// to get undisturbed access + +procedure TJvHidDevice.CloseFile; +begin + if HidFileHandle <> INVALID_HANDLE_VALUE then + CloseHandle(HidFileHandle); + FNumInputBuffers := 0; + FHidFileHandle := INVALID_HANDLE_VALUE; +end; + +// same for the other device "file" + +procedure TJvHidDevice.CloseFileEx; +begin + if HidOverlappedHandle <> INVALID_HANDLE_VALUE then + CloseHandle(HidOverlappedHandle); + FNumOverlappedBuffers := 0; + FHidOverlappedHandle := INVALID_HANDLE_VALUE; +end; + +// all the methods which directly map to a HID-function + +function TJvHidDevice.FlushQueue: Boolean; +begin + Result := False; + if OpenFile then + Result := HidD_FlushQueue(HidFileHandle); +end; + +function TJvHidDevice.GetFeature(var Report; const Size: Integer): Boolean; +begin + Result := False; + if OpenFile then + Result := HidD_GetFeature(HidFileHandle, Report, Size); +end; + +function TJvHidDevice.SetFeature(var Report; const Size: Integer): Boolean; +begin + Result := False; + if OpenFile then + Result := HidD_SetFeature(HidFileHandle, Report, Size); +end; + +function TJvHidDevice.GetSpecificButtonCaps(ButtonCaps: PHIDPButtonCaps; var Count: WORD): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetSpecificButtonCaps(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, ButtonCaps, Count, PreparsedData); +end; + +function TJvHidDevice.GetButtonCaps(ButtonCaps: PHIDPButtonCaps; var Count: WORD): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetButtonCaps(ReportTypeParam, ButtonCaps, Count, PreparsedData); +end; + +function TJvHidDevice.GetSpecificValueCaps(ValueCaps: PHIDPValueCaps; var Count: WORD): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetSpecificValueCaps(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, ValueCaps, Count, PreparsedData); +end; + +function TJvHidDevice.GetValueCaps(ValueCaps: PHIDPValueCaps; var Count: WORD): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetValueCaps(ReportTypeParam, ValueCaps, Count, PreparsedData); +end; + +function TJvHidDevice.GetData(DataList: PHIDPData; var DataLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetData(ReportTypeParam, DataList, DataLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetData(DataList: PHIDPData; var DataLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetData(ReportTypeParam, DataList, DataLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetUsages(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetUsages(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetButtons(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetButtons(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetUsagesEx(UsageList: PUsageAndPage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetUsagesEx(ReportTypeParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetButtonsEx(UsageList: PUsageAndPage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetButtonsEx(ReportTypeParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetUsages(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetUsages(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetButtons(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetButtons(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.UnsetUsages(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_UnsetUsages(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.UnsetButtons(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_UnsetButtons(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetUsageValue(var UsageValue: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetUsageValue(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetScaledUsageValue(var UsageValue: Integer; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetScaledUsageValue(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetUsageValueArray(UsageValue: PChar; UsageValueByteLength: WORD; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetUsageValueArray(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, UsageValueByteLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetUsageValue(UsageValue: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetUsageValue(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetScaledUsageValue(UsageValue: Integer; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetScaledUsageValue(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetUsageValueArray(UsageValue: PChar; UsageValueByteLength: WORD; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetUsageValueArray(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, UsageValueByteLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.DeviceIoControl(IoControlCode: DWORD; InBuffer: Pointer; InSize: DWORD; + OutBuffer: Pointer; OutSize: DWORD; var BytesReturned: DWORD): Boolean; +begin + Result := False; + if OpenFile then + Result := Windows.DeviceIoControl(HidFileHandle, IoControlCode, InBuffer, InSize, OutBuffer, OutSize, BytesReturned, nil); +end; + +function TJvHidDevice.ReadFile(var Report; ToRead: DWORD; var BytesRead: DWORD): Boolean; +begin + Result := False; + if OpenFile then + Result := Windows.ReadFile(HidFileHandle, Report, ToRead, BytesRead, nil); +end; + +function TJvHidDevice.WriteFile(var Report; ToWrite: DWORD; var BytesWritten: DWORD): Boolean; +begin + Result := False; + if OpenFile then + Result := Windows.WriteFile(HidFileHandle, Report, ToWrite, BytesWritten, nil); +end; + +// the TOverlapped structure is not needed externally +// the hEvent element is used to transport the device object +// to the callback function +// Better not implement a Delphi event with that + +function TJvHidDevice.ReadFileEx(var Report; ToRead: DWORD; CallBack: TPROverlappedCompletionRoutine): Boolean; +var + Ovl: TOverlapped; +begin + Result := False; + if OpenFileEx then + begin + FillChar(Ovl, SizeOf(TOverlapped), #0); + Ovl.hEvent := DWORD(Self); + Result := HidControllerClass.ReadFileEx(HidOverlappedHandle, Report, ToRead, Ovl, CallBack); + end; +end; + +function TJvHidDevice.WriteFileEx(var Report; ToWrite: DWORD; CallBack: TPROverlappedCompletionRoutine): Boolean; +var + Ovl: TOverlapped; +begin + Result := False; + if OpenFileEx then + begin + FillChar(Ovl, SizeOf(TOverlapped), #0); + Ovl.hEvent := DWORD(Self); + Result := HidControllerClass.WriteFileEx(HidOverlappedHandle, Report, ToWrite, Ovl, CallBack); + end; +end; + +//== TJvHidDeviceController =========================================== + +// internal worker function to find all Hid devices and create their objects + +procedure TJvHidDeviceController.FillInList(var List: TList); +var + PnPHandle: HDEVINFO; + DevData: TSPDevInfoData; + DeviceInterfaceData: TSPDeviceInterfaceData; + FunctionClassDeviceData: PSPDeviceInterfaceDetailData; + Success: LongBool; + Devn: Integer; + BytesReturned: DWORD; + HidDev: TJvHidDevice; +begin + // create list + List := TList.Create; + + // Get a handle for the Plug and Play node and request currently active HID devices + PnPHandle := SetupDiGetClassDevs(@FHidGuid, nil, 0, DIGCF_PRESENT or DIGCF_DEVICEINTERFACE); + if PnPHandle = Pointer(INVALID_HANDLE_VALUE) then + Exit; + Devn := 0; + repeat + DeviceInterfaceData.cbSize := SizeOf(TSPDeviceInterfaceData); + // Is there a HID device at this table entry? + Success := SetupDiEnumDeviceInterfaces(PnPHandle, nil, FHidGuid, Devn, DeviceInterfaceData); + if Success then + begin + DevData.cbSize := SizeOf(DevData); + BytesReturned := 0; + SetupDiGetDeviceInterfaceDetail(PnPHandle, @DeviceInterfaceData, nil, 0, @BytesReturned, @DevData); + if (BytesReturned <> 0) and (GetLastError = ERROR_INSUFFICIENT_BUFFER) then + begin + FunctionClassDeviceData := AllocMem(BytesReturned); + FunctionClassDeviceData.cbSize := 5; + if SetupDiGetDeviceInterfaceDetail(PnPHandle, @DeviceInterfaceData, FunctionClassDeviceData, BytesReturned, @BytesReturned, @DevData) then + begin + // create HID device object and add it to the device list + HidDev := TJvHidDevice.Create(PChar(@FunctionClassDeviceData.DevicePath), DevData.DevInst, + GetRegistryProperty(PnPHandle, DevData, SPDRP_DEVICEDESC), + GetRegistryProperty(PnPHandle, DevData, SPDRP_CLASS), + Self); + List.Add(HidDev); + Inc(Devn); + end; + FreeMem(FunctionClassDeviceData); + end; + end; + until not Success; + SetupDiDestroyDeviceInfoList(PnPHandle); +end; + +// the controller fills its list on creation and connects the event pipe + +constructor TJvHidDeviceController.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FDeviceChangeEvent := nil; + FEnumerateEvent := nil; + FDevUnplugEvent := nil; + FList := nil; + FNumCheckedInDevices := 0; + FNumCheckedOutDevices := 0; + FNumUnpluggedDevices := 0; + FDeviceChangeFired := False; + HidD_GetHidGuid(FHidGuid); + + // this is just to remind you that one controller is sufficient + Inc(GlobalInstanceCount); + if GlobalInstanceCount > 1 then + raise EControllerError.Create('Only one TJvHidDeviceController allowed per program'); + + // nothing done at design time + if not (csDesigning in ComponentState) then + begin + FillInList(FList); + FNumCheckedInDevices := FList.Count; + Application.HookMainWindow(EventPipe); + end; +end; + +procedure TJvHidDeviceController.Loaded; +var + I: Integer; + Dev: TJvHidDevice; +begin + inherited Loaded; + + // after read in of properties + // propagate the OnUnplug event to the device objects + if FList <> nil then + for I := 0 to FList.Count - 1 do + begin + Dev := FList.Items[I]; + Dev.OnUnplug := FDevUnplugEvent; + end; +end; + +// unplug or kill all controlled TJvHidDevices on controller destruction + +destructor TJvHidDeviceController.Destroy; +var + I: Integer; + HidDev: TJvHidDevice; +begin + Dec(GlobalInstanceCount); + // to prevent strange problems + FDeviceChangeEvent := nil; + FDevUnplugEvent := nil; + OnEnumerate := nil; + // nothing done at design time + if not (csDesigning in ComponentState) then + begin + // unhook event pipe + Application.UnhookMainWindow(EventPipe); + for I := 0 to FList.Count - 1 do + begin + HidDev := FList.Items[I]; + with HidDev do + begin + // set to uncontrolled + FMyController := nil; + if IsCheckedOut then + // pull the plug for checked out TJvHidDevices + DoUnplug + else + // kill TJvHidDevices which are not checked out + Free; + end; + end; + end; + FList.Free; + + inherited Destroy; +end; + +// gets all the Windows events/messages directly + +function TJvHidDeviceController.EventPipe(var Msg: TMessage): Boolean; +begin + Result := False; + // sort out WM_DEVICECHANGE : DBT_DEVNODES_CHANGED + if (Msg.Msg = WM_DEVICECHANGE) and (TWMDeviceChange(Msg).Event = DBT_DEVNODES_CHANGED) then + DoDeviceChange; +end; + +// implements OnDeviceChange event + +procedure TJvHidDeviceController.DoDeviceChange; +var + I: Integer; + J: Integer; + NewList: TList; + HidDev: TJvHidDevice; + Changed: Boolean; +begin + Changed := False; + // get new device list + FillInList(NewList); + + // unplug devices in FList which are not in NewList + for I := 0 to FList.Count - 1 do + begin + HidDev := FList.Items[I]; + for J := 0 to NewList.Count - 1 do + if (TJvHidDevice(NewList.Items[J]).DeviceID = HidDev.DeviceID) and HidDev.IsPluggedIn then + begin + HidDev := nil; + Break; + end; + if HidDev <> nil then + begin + HidDev.DoUnplug; + // prepare for deletion from list + if not HidDev.IsCheckedOut then + FList.Items[I] := nil; + Changed := True; + end; + end; + + // delete the nil elements from FList + I := 0; + while I < FList.Count do + begin + if FList.Items[I] = nil then + FList.Delete(I) + else + Inc(I); + end; + + // delete devices from NewList which are in FList + for I := 0 to NewList.Count - 1 do + for J := 0 to FList.Count - 1 do + if (TJvHidDevice(NewList[I]).DeviceID = TJvHidDevice(FList[J]).DeviceID) and TJvHidDevice(FList[J]).IsPluggedIn then + begin + TJvHidDevice(NewList[I]).FMyController := nil; // prevent Free/Destroy from accessing this controller + TJvHidDevice(NewList[I]).Free; + NewList[I] := nil; + Break; + end; + + // add the remains in NewList to FList + for I := 0 to NewList.Count - 1 do + if NewList[I] <> nil then + begin + FList.Add(NewList[I]); + Changed := True; + end; + + // throw away helper list + NewList.Free; + + // recount the devices + FNumCheckedInDevices := 0; + FNumCheckedOutDevices := 0; + FNumUnpluggedDevices := 0; + for I := 0 to FList.Count - 1 do + begin + HidDev := FList.Items[I]; + Inc(FNumCheckedInDevices, Ord(not HidDev.IsCheckedOut)); + Inc(FNumCheckedOutDevices, Ord(HidDev.IsCheckedOut)); + Inc(FNumUnpluggedDevices, Ord(not HidDev.IsPluggedIn)); + end; + FNumCheckedOutDevices := FNumCheckedOutDevices - FNumUnpluggedDevices; + + if Assigned(FDeviceChangeEvent) and Changed then + FDeviceChangeEvent(Self); +end; + +// assign OnDeviceChange and immediately fire if needed + +procedure TJvHidDeviceController.SetDeviceChangeEvent(const Notifier: TNotifyEvent); +begin + if @Notifier <> @FDeviceChangeEvent then + begin + FDeviceChangeEvent := Notifier; + if Assigned(FDeviceChangeEvent) and not FDeviceChangeFired then + FDeviceChangeEvent(Self); + FDeviceChangeFired := True; + end; +end; + +// implement OnEnumerate event + +function TJvHidDeviceController.DoEnumerate(HidDev: TJvHidDevice; Idx: Integer): Boolean; +begin + Result := False; + if Assigned(FEnumerateEvent) then + begin + HidDev.FIsEnumerated := True; + Result := FEnumerateEvent(HidDev, Idx); + HidDev.FIsEnumerated := False; + if not HidDev.FIsCheckedOut then + begin + HidDev.CloseFile; + HidDev.CloseFileEx; + end; + end; +end; + +// assign OnEnumerate event + +procedure TJvHidDeviceController.SetEnumerate(const Enumerator: TJvHidEnumerateEvent); +begin + if @Enumerator <> @FEnumerateEvent then + FEnumerateEvent := Enumerator; +end; + +// assign OnDevUnplug event + +procedure TJvHidDeviceController.SetDevUnplug(const Unplugger: TJvHidUnplugEvent); +var + I: Integer; + Dev: TJvHidDevice; +begin + if @Unplugger <> @FDevUnplugEvent then + begin + // change all OnUnplug events with the same old value + if not (csDesigning in ComponentState) then + for I := 0 to FList.Count - 1 do + begin + Dev := FList.Items[I]; + if @Dev.FUnplug = @FDevUnplugEvent then + Dev.OnUnplug := Unplugger; + end; + FDevUnplugEvent := Unplugger; + end; +end; + +// send an OnEnumerate event for ALL controlled HidDevices +// it is explicitly allowed to check out any device in the event + +function TJvHidDeviceController.Enumerate: Integer; +var + I: Integer; +begin + Result := 0; + for I := 0 to FList.Count - 1 do + if TJvHidDevice(FList[I]).IsPluggedIn then + begin + Inc(Result); + if not DoEnumerate(FList[I], I) then + Break; + end; +end; + +//-- TJvHidDeviceController methods ----------------------------------- + +// internal worker function to check out a TJvHidDevice + +function TJvHidDeviceController.CheckThisOut(var HidDev: TJvHidDevice; Idx: Integer; Check: Boolean): Boolean; +begin + Result := Check and not TJvHidDevice(FList.Items[Idx]).IsCheckedOut; + if Result then + begin + HidDev := FList[Idx]; + HidDev.FIsCheckedOut := True; + Inc(FNumCheckedOutDevices); + Dec(FNumCheckedInDevices); + end; +end; + +// method CheckOutByProductName hands out the first HidDevice with a matching ProductName + +function TJvHidDeviceController.CheckOutByProductName(var HidDev: TJvHidDevice; ProductName: string): Boolean; +var + I: Integer; +begin + Result := False; + HidDev := nil; + if ProductName <> '' then + for I := 0 to FList.Count - 1 do + begin + Result := CheckThisOut(HidDev, I, ProductName = TJvHidDevice(FList[I]).ProductName); + if Result then + Break; + end; +end; + +// method CheckOutByVendorName hands out the first HidDevice with a matching VendorName + +function TJvHidDeviceController.CheckOutByVendorName(var HidDev: TJvHidDevice; VendorName: string): Boolean; +var + I: Integer; +begin + Result := False; + HidDev := nil; + if VendorName <> '' then + for I := 0 to FList.Count - 1 do + begin + Result := CheckThisOut(HidDev, I, VendorName = TJvHidDevice(FList[I]).VendorName); + if Result then + Break; + end; +end; + +// method CheckOutByClass hands out the first HidDevice with a matching Class +// Class comes from the registry (examples: 'Mouse', 'Keyboard') + +function TJvHidDeviceController.CheckOutByClass(var HidDev: TJvHidDevice; ClassName: string): Boolean; +var + I: Integer; +begin + Result := False; + HidDev := nil; + if ClassName <> '' then + for I := 0 to FList.Count - 1 do + begin + Result := CheckThisOut(HidDev, I, ClassName = TJvHidDevice(FList[I]).RegClass); + if Result then + Break; + end; +end; + +// method CheckOutByID hands out the first HidDevice with a matching VendorID and ProductID +// Pid = -1 matches all ProductIDs + +function TJvHidDeviceController.CheckOutByID(var HidDev: TJvHidDevice; Vid, Pid: Integer): Boolean; +var + I: Integer; +begin + Result := False; + HidDev := nil; + for I := 0 to FList.Count - 1 do + begin + Result := CheckThisOut(HidDev, I, (Vid = TJvHidDevice(FList[I]).Attributes.VendorID) and + ((Pid = TJvHidDevice(FList[I]).Attributes.ProductID) or (Pid = -1))); + if Result then + Break; + end; +end; + +// method CheckOutByIndex hands out the HidDevice in the list with the named index +// this is mainly for check out during OnEnumerate + +function TJvHidDeviceController.CheckOutByIndex(var HidDev: TJvHidDevice; const Idx: Integer): Boolean; +begin + Result := False; + HidDev := nil; + if (Idx >= 0) and (Idx < FList.Count) then + Result := CheckThisOut(HidDev, Idx, True); +end; + +// method CheckOut simply hands out the first available HidDevice in the list + +function TJvHidDeviceController.CheckOut(var HidDev: TJvHidDevice): Boolean; +var + I: Integer; +begin + Result := False; + HidDev := nil; + for I := 0 to FList.Count - 1 do + begin + Result := CheckThisOut(HidDev, I, True); + if Result then + Break; + end; +end; + +// method CheckIn hands a checked out HidDevice back in + +procedure TJvHidDeviceController.CheckIn(var HidDev: TJvHidDevice); +begin + if HidDev <> nil then + begin + HidDev.CloseFile; + HidDev.CloseFileEx; + + if HidDev.IsPluggedIn then + begin + HidDev.FIsCheckedOut := False; + Dec(FNumCheckedOutDevices); + Inc(FNumCheckedInDevices); + end + else + HidDev.Free; + HidDev := nil; + end; +end; + +// a helper function to check the return values just +// like Win32Check +// the functions return the parameter to be transparent + +function HidCheck(const RetVal: NTSTATUS): NTSTATUS; +begin + if RetVal <> HIDP_STATUS_SUCCESS then + HidError(RetVal); + Result := RetVal; +end; + +function HidCheck(const RetVal: LongBool): LongBool; +begin + if not RetVal then + raise EHidClientError.Create('HidClient Error: a boolean function failed'); + Result := RetVal; +end; + +function HidError(const RetVal: NTSTATUS): NTSTATUS; +var + ErrBuf: string; +begin + // only check HID errors + if ((RetVal and NTSTATUS($00FF0000)) = HIDP_STATUS_SUCCESS) and + ((RetVal and NTSTATUS($C0000000)) <> 0) then + begin + case RetVal of + HIDP_STATUS_NULL: ErrBuf := 'device not plugged in'; + HIDP_STATUS_INVALID_PREPARSED_DATA: ErrBuf := 'invalid preparsed data'; + HIDP_STATUS_INVALID_REPORT_TYPE: ErrBuf := 'invalid report type'; + HIDP_STATUS_INVALID_REPORT_LENGTH: ErrBuf := 'invalid report length'; + HIDP_STATUS_USAGE_NOT_FOUND: ErrBuf := 'usage not found'; + HIDP_STATUS_VALUE_OUT_OF_RANGE: ErrBuf := 'value out of range'; + HIDP_STATUS_BAD_LOG_PHY_VALUES: ErrBuf := 'bad logical or physical values'; + HIDP_STATUS_BUFFER_TOO_SMALL: ErrBuf := 'buffer too small'; + HIDP_STATUS_INTERNAL_ERROR: ErrBuf := 'internal error'; + HIDP_STATUS_I8042_TRANS_UNKNOWN: ErrBuf := '8042 key translation impossible'; + HIDP_STATUS_INCOMPATIBLE_REPORT_ID: ErrBuf := 'incompatible report ID'; + HIDP_STATUS_NOT_VALUE_ARRAY: ErrBuf := 'not a value array'; + HIDP_STATUS_IS_VALUE_ARRAY: ErrBuf := 'is a value array'; + HIDP_STATUS_DATA_INDEX_NOT_FOUND: ErrBuf := 'data index not found'; + HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE: ErrBuf := 'data index out of range'; + HIDP_STATUS_BUTTON_NOT_PRESSED: ErrBuf := 'button not pressed'; + HIDP_STATUS_REPORT_DOES_NOT_EXIST: ErrBuf := 'report does not exist'; + HIDP_STATUS_NOT_IMPLEMENTED: ErrBuf := 'not implemented'; + else + ErrBuf := Format('unknown HID error %x', [RetVal]); + end; + raise EHidClientError.Create('HidClient Error: ' + ErrBuf); + end; + Result := RetVal; +end; + +// We place the component on the new 'Project JEDI' palette. +// This is to encourage you to become a member. +// Have a look at www.delphi-jedi.org for further details. + +procedure Register; +begin + RegisterComponents('Project JEDI', [TJvHidDeviceController]); +end; + +end. + diff --git a/lib/HID/HidControllerClass.~pas b/lib/HID/HidControllerClass.~pas new file mode 100644 index 00000000..32038160 --- /dev/null +++ b/lib/HID/HidControllerClass.~pas @@ -0,0 +1,1357 @@ +{******************************************************************************} +{ } +{ Project JEDI } +{ } +{ The contents of this file are subject to the Mozilla Public License Version } +{ 1.0 (the "License"); you may not use this file except in compliance with the } +{ License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ } +{ } +{ Software distributed under the License is distributed on an "AS IS" basis, } +{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for } +{ the specific language governing rights and limitations under the License. } +{ } +{ The Original Code is HidControllerClass.pas. } +{ } +{ The Initial Developer of the Original Code is Robert Marquardt. } +{ (robert_marquardt@gmx.de) } +{ } +{ Portions created by Robert Marquardt are } +{ Copyright (c) 1999, 2000 Robert Marquardt. } +{ } +{ Last modified: September 1, 2000 } +{ } +{******************************************************************************} + +unit HidControllerClass; + +interface + +uses + Windows, Messages, Classes, Forms, SysUtils, + DBT, SetupAPI, Hid; + +const + // strings from the registry for CheckOutByClass + cHidKeyboardClass = 'Keyboard'; + cHidMouseClass = 'Mouse'; + cHidNoClass = 'HIDClass'; + +type + // forward declarations + TJvHidDeviceController = class; + TJvHidDevice = class; + + // the Event function declarations + TJvHidEnumerateEvent = function (HidDev: TJvHidDevice; Idx: Integer): Boolean of object; + TJvHidUnplugEvent = procedure(HidDev: TJvHidDevice) of object; + + // the representation of a HID device + + TJvHidDevice = class(TObject) + private + // internal control variables + FMyController: TJvHidDeviceController; + FIsPluggedIn: Boolean; + FIsCheckedOut: Boolean; + FIsEnumerated: Boolean; + FHidFileHandle: THandle; + FHidOverlappedHandle: THandle; + // internal properties part + FDeviceID: DWORD; + FDevicePath: string; + FRegDescr: string; + FRegClass: string; + FVendorName: AnsiString; + FProductName: AnsiString; + FPhysicalDescriptor: AnsiString; + FSerialNumber: AnsiString; + FLanguageStrings: TStringList; + FPreparsedData: PHIDPPreparsedData; + FAttributes: THIDDAttributes; + FCaps: THIDPCaps; + FConfiguration: THIDDConfiguration; + FNumInputBuffers: Integer; + FNumOverlappedBuffers: Integer; + FLinkCollection: array of THIDPLinkCollectionNode; + FMaxDataListLength: ULONG; + FMaxUsageListLength: ULONG; + FMaxButtonListLength: ULONG; + FReportTypeParam: THIDPReportType; + FUsagePageParam: TUsage; + FLinkCollectionParam: WORD; + FUsageParam: TUsage; + FUnplug: TJvHidUnplugEvent; + + // tells if access to device is allowed + function IsAccessible: Boolean; + procedure GetMax; + + // internal property implementors + function GetDeviceString (Idx: Byte): string; + function GetLinkCollectionNode (Idx: WORD): THIDPLinkCollectionNode; + procedure SetConfiguration (Config: THIDDConfiguration); + procedure SetNumInputBuffers (const Num: Integer); + procedure SetNumOverlappedBuffers(const Num: Integer); + procedure SetReportTypeParam (const ReportType: THIDPReportType); + procedure SetUsagePageParam (const UsagePage: TUsage); + + // Constructor is hidden! Only a TJvHidDeviceController can create a TJvHidDevice object. + constructor Create(const DevicePath: string; const DevID: DWORD; + const DevDesc, ClassDesc: string; + Controller: TJvHidDeviceController); + + protected + // internal property implementors + procedure DoUnplug; + procedure SetUnplug(const Event: TJvHidUnplugEvent); + + public + // indexed properties + property DeviceStrings [Idx: Byte]: string read GetDeviceString; + property LinkCollectionNodes[Idx: WORD]: THIDPLinkCollectionNode read GetLinkCollectionNode; + + published + destructor Destroy; override; + + // methods + procedure CloseFile; + procedure CloseFileEx; + function DeviceIoControl (IoControlCode: DWORD; InBuffer: Pointer; InSize: DWORD; + OutBuffer: Pointer; OutSize: DWORD; + var BytesReturned: DWORD): Boolean; + function FlushQueue: Boolean; + function GetButtonCaps (ButtonCaps: PHIDPButtonCaps; var Count: WORD): NTSTATUS; + function GetButtons (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetButtonsEx (UsageList: PUsageAndPage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetData (DataList: PHIDPData; var DataLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetFeature (var Report; const Size: Integer): Boolean; + function GetScaledUsageValue (var UsageValue: Integer; + var Report; ReportLength: ULONG): NTSTATUS; + function GetSpecificButtonCaps(ButtonCaps: PHIDPButtonCaps; var Count: WORD): NTSTATUS; + function GetSpecificValueCaps (ValueCaps: PHIDPValueCaps; var Count: WORD): NTSTATUS; + function GetUsages (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetUsagesEx (UsageList: PUsageAndPage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetUsageValue (var UsageValue: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function GetUsageValueArray (UsageValue: PChar; UsageValueByteLength: WORD; + var Report; ReportLength: ULONG): NTSTATUS; + function GetValueCaps (ValueCaps: PHIDPValueCaps; var Count: WORD): NTSTATUS; + function OpenFile: Boolean; + function OpenFileEx: Boolean; + function SetButtons (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function SetData (DataList: PHIDPData; var DataLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function SetFeature (var Report; const Size: Integer): Boolean; + function SetScaledUsageValue (UsageValue: Integer; + var Report; ReportLength: ULONG): NTSTATUS; + function SetUsages (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function SetUsageValue (UsageValue: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function SetUsageValueArray (UsageValue: PChar; UsageValueByteLength: WORD; + var Report; ReportLength: ULONG): NTSTATUS; + function UnsetButtons (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function UnsetUsages (UsageList: PUsage; var UsageLength: ULONG; + var Report; ReportLength: ULONG): NTSTATUS; + function ReadFile (var Report; ToRead: DWORD; var BytesRead: DWORD): Boolean; + function ReadFileEx (var Report; ToRead: DWORD; + CallBack: TPROverlappedCompletionRoutine): Boolean; + function WriteFile (var Report; ToWrite: DWORD; var BytesWritten: DWORD): Boolean; + function WriteFileEx (var Report; ToWrite: DWORD; + CallBack: TPROverlappedCompletionRoutine): Boolean; + + // management properties + property Attributes: THIDDAttributes read FAttributes; + property Caps: THIDPCaps read FCaps; + property Configuration: THIDDConfiguration read FConfiguration write SetConfiguration; + property DevicePath: string read FDevicePath; + property DeviceID: DWORD read FDeviceID; + property HidFileHandle: THandle read FHidFileHandle; + property HidOverlappedHandle: THandle read FHidOverlappedHandle; + property IsCheckedOut: Boolean read FIsCheckedOut; + property IsPluggedIn: Boolean read FIsPluggedIn; + property LanguageStrings: TStringList read FLanguageStrings; + property LinkCollectionParam: WORD read FLinkCollectionParam write FLinkCollectionParam; + property MaxButtonListLength: ULONG read FMaxButtonListLength; + property MaxDataListLength: ULONG read FMaxDataListLength; + property MaxUsageListLength: ULONG read FMaxUsageListLength; + property NumInputBuffers: Integer read FNumInputBuffers write SetNumInputBuffers; + property NumOverlappedBuffers: Integer read FNumOverlappedBuffers write SetNumOverlappedBuffers; + property PhysicalDescriptor: string read FPhysicalDescriptor; + property PreparsedData: PHIDPPreparsedData read FPreparsedData; + property ProductName: string read FProductName; + property RegClass: string read FRegClass; + property RegDescr: string read FRegDescr; + property ReportTypeParam: THIDPReportType read FReportTypeParam write SetReportTypeParam; + property SerialNumber: string read FSerialNumber; + property VendorName: string read FVendorName; + property UsageParam: TUsage read FUsageParam write FUsageParam; + property UsagePageParam: TUsage read FUsagePageParam write SetUsagePageParam; + // the only event property + property OnUnplug: TJvHidUnplugEvent read FUnplug write SetUnplug; + end; + + // controller class to manage all HID devices + + TJvHidDeviceController = class(TComponent) + private + // internal properties part + FHidGuid: TGUID; + FDeviceChangeEvent: TNotifyEvent; + FDeviceChangeFired: Boolean; + FEnumerateEvent: TJvHidEnumerateEvent; + FDevUnplugEvent: TJvHidUnplugEvent; + // internal list of all HID device objects + FList: TList; + // counters for the list + FNumCheckedInDevices: Integer; + FNumCheckedOutDevices: Integer; + FNumUnpluggedDevices: Integer; + // internal worker functions + function CheckThisOut(var HidDev: TJvHidDevice; Idx: Integer; Check: Boolean): Boolean; + procedure FillInList (var List: TList); + function EventPipe (var Msg: TMessage): Boolean; + + protected + procedure Loaded; override; + // internal property implementors + procedure DoDeviceChange; + function DoEnumerate (HidDev: TJvHidDevice; Idx: Integer): Boolean; + procedure SetDeviceChangeEvent(const Notifier: TNotifyEvent); + procedure SetEnumerate (const Enumerator: TJvHidEnumerateEvent); + procedure SetDevUnplug (const Unplugger: TJvHidUnplugEvent); + + published + // normal constructor/destructor + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + + // methods to hand out HID device objects + procedure CheckIn (var HidDev: TJvHidDevice); + function CheckOut (var HidDev: TJvHidDevice): Boolean; + function CheckOutByClass (var HidDev: TJvHidDevice; ClassName: string): Boolean; + function CheckOutByID (var HidDev: TJvHidDevice; Vid, Pid: Integer): Boolean; + function CheckOutByIndex (var HidDev: TJvHidDevice; const Idx: Integer): Boolean; + function CheckOutByProductName(var HidDev: TJvHidDevice; ProductName: string): Boolean; + function CheckOutByVendorName (var HidDev: TJvHidDevice; VendorName: string): Boolean; + // iterate over the HID devices + function Enumerate: Integer; + + // just to be complete the GUID + property HidGuid: TGUID read FHidGuid; + property NumCheckedInDevices: Integer read FNumCheckedInDevices; + property NumCheckedOutDevices: Integer read FNumCheckedOutDevices; + property NumUnpluggedDevices: Integer read FNumUnpluggedDevices; + // this event is copied to TJvHidDeviceOnUnplug on creation + property OnDeviceUnplug: TJvHidUnplugEvent read FDevUnplugEvent write SetDevUnplug; + // the iterator event + property OnEnumerate: TJvHidEnumerateEvent read FEnumerateEvent write SetEnumerate; + // the central event for HID device changes + property OnDeviceChange: TNotifyEvent read FDeviceChangeEvent write SetDeviceChangeEvent; + end; + +// helpers to check the HID function and method results +function HidCheck(const RetVal: NTSTATUS): NTSTATUS; overload; +function HidCheck(const RetVal: LongBool): LongBool; overload; +function HidError(const RetVal: NTSTATUS): NTSTATUS; + +// to register the component in the palette +procedure Register; + +implementation + +{$R HidControllerClass.dcr} + +type + EControllerError = class(Exception); + EHidClientError = class(Exception); + +var + // counter to prevent a second TJvHidDeviceController instance + GlobalInstanceCount: Integer = 0; + +//== these are declared inconsistent in Windows.pas =================== + +function ReadFileEx(hFile: THandle; var Buffer; nNumberOfBytesToRead: DWORD; + var Overlapped: TOverlapped; lpCompletionRoutine: TPROverlappedCompletionRoutine): BOOL; stdcall; + external 'kernel32.dll' name 'ReadFileEx'; +function WriteFileEx(hFile: THandle; var Buffer; nNumberOfBytesToWrite: DWORD; + var Overlapped: TOverlapped; lpCompletionRoutine: TPROverlappedCompletionRoutine): BOOL; stdcall; + external 'kernel32.dll' name 'WriteFileEx'; + +//== TJvHidDevice ===================================================== + +// internal helper to read string values from a devices registry area + +function GetRegistryProperty(PnPHandle: HDEVINFO; var DevData: TSPDevInfoData; ClassID: DWORD): string; +var + BytesReturned: DWORD; + RegData: DWORD; + Buffer: array [0..256] of Char; +begin + BytesReturned := 0; + RegData := REG_SZ; + Buffer[0] := #0; + SetupDiGetDeviceRegistryProperty(PnPHandle, DevData, ClassID, + @RegData, @Buffer[0], SizeOf(Buffer), @BytesReturned); + Result := Buffer; +end; + +//-- TJvHidDevice: basics and internals ------------------------------- + +// create and fill in a HidDevice object +// the constructor is only accessible from TJvHidController +// DevicePath names the device "file" +// DevID is a handle to the individual device +// (differs even for two devices of the same kind) +// DevDesc and ClassDesc are two strings from the devices registry space +// Controller is the devices controller object + +constructor TJvHidDevice.Create(const DevicePath: string; const DevID: DWORD; + const DevDesc, ClassDesc: string; Controller: TJvHidDeviceController); +var + I: Integer; + Len: ULONG; + Buffer: array [0..256] of WideChar; + IDs: array [0..258] of WORD; + Name: array [0..256] of Char; +begin + inherited Create; + + // initialize private data + FMyController := Controller; + FIsPluggedIn := True; + FIsCheckedOut := False; + FIsEnumerated := False; + FHidOverlappedHandle := INVALID_HANDLE_VALUE; + FDeviceID := 0; + FDevicePath := DevicePath; + FRegDescr := ''; + FRegClass := ''; + FVendorName := ''; + FProductName := ''; + FPhysicalDescriptor := ''; + FSerialNumber := ''; + FLanguageStrings := TStringList.Create; + FPreparsedData := 0; + FillChar(FCaps, SizeOf(FCaps), #0); + FillChar(FConfiguration, SizeOf(FConfiguration), #0); + FNumInputBuffers := 0; + FNumOverlappedBuffers := 0; + SetLength(FLinkCollection, 0); + FMaxDataListLength := 0; + FMaxUsageListLength := 0; + FMaxButtonListLength := 0; + FReportTypeParam := HIDP_Input; + FUsagePageParam := 0; + FLinkCollectionParam := 0; + FUsageParam := 0; + FUnplug := Controller.FDevUnplugEvent; + + FHidFileHandle := CreateFile(PChar(FDevicePath), GENERIC_READ or GENERIC_WRITE, + FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0); + if HidFileHandle = INVALID_HANDLE_VALUE then + FHidFileHandle := CreateFile(PChar(FDevicePath), 0, + FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0); + if HidFileHandle <> INVALID_HANDLE_VALUE then + begin + // get all device data through HID functions + // this eliminates the need to redeclare them as methods + FDeviceID := DevID; + FRegDescr := DevDesc; + FRegClass := ClassDesc; + FAttributes.Size := SizeOf(THIDDAttributes); + HidD_GetPreparsedData(HidFileHandle, FPreparsedData); + HidD_GetAttributes (HidFileHandle, FAttributes); + FConfiguration.cookie := nil; + FConfiguration.size := 0; + FConfiguration.RingBufferSize := 0; + HidD_GetConfiguration(HidFileHandle, FConfiguration, SizeOf(THIDDConfiguration)); + HidP_GetCaps(FPreparsedData, FCaps); + // calculate length of StringDescriptor 0 + FillChar(IDs, SizeOf(IDs), #0); + Len := 0; + for I := 0 to 256 do + begin + if HidD_GetIndexedString(HidFileHandle, 0, PWideChar(@IDs), I*SizeOf(WORD)) then + Break; + Inc(Len); + end; + // transform id into localized language name + for I := 0 to Len - 1 do + begin + Name[0] := #0; + if GetLocaleInfo(WORD(IDs[I]), LOCALE_SLANGUAGE, Name, SizeOf(Name)) <> 0 then + FLanguageStrings.Add(Name) + else + FLanguageStrings.Add(Format('unknown Locale ID $%.4x',[WORD(IDs[I])])); + end; + if HidD_GetManufacturerString(HidFileHandle, Buffer, SizeOf(Buffer)) then + FVendorName := WideCharToString(Buffer); + if HidD_GetProductString(HidFileHandle, Buffer, SizeOf(Buffer)) then + FProductName := WideCharToString(Buffer); + if HidD_GetPhysicalDescriptor(HidFileHandle, Buffer, SizeOf(Buffer)) then + FPhysicalDescriptor := WideCharToString(Buffer); + // compensate for buggy function + if HidD_GetSerialNumberString(HidFileHandle, Buffer, SizeOf(Buffer)) then + for I := 0 to Len - 1 do + if IDs[I] <> WORD(Buffer[I]) then + begin + FSerialNumber := WideCharToString(Buffer); + Break; + end; + Len := FCaps.NumberLinkCollectionNodes; + SetLength(FLinkCollection, Len); + HidP_GetLinkCollectionNodes(@FLinkCollection[0], Len, FPreparsedData); + end; + // the file is closed to stop using up resources + CloseFile; +end; + +// If a TJvHidDevice is destroyed the TJvHidController has to be informed. +// If the device is plugged in this TJvHidDevice instance is destroyed, +// but another instance is created in the controller list + +destructor TJvHidDevice.Destroy; +var + I: Integer; +begin + // to prevent strange problems + OnUnplug := nil; + // free the data which needs special handling + CloseFile; + CloseFileEx; + HidD_FreePreparsedData(FPreparsedData); + FLanguageStrings.Free; + + // if controller exists + if FMyController <> nil then + with FMyController do + begin + // delete device from controller list + for I := 0 to FList.Count - 1 do + if FList.Items[I] = Self then + begin + // if device is plugged in create a checked in copy + if IsPluggedIn then + begin + FList.Items[I] := TJvHidDevice.Create(DevicePath, DeviceID, + RegDescr, RegClass, FMyController); + if IsCheckedOut then + begin + Dec(FNumCheckedOutDevices); + Inc(FNumCheckedInDevices); + end; + end + else + begin + FList.Delete(I); + Dec(FNumUnpluggedDevices); + end; + Break; + end; + end; + + inherited Destroy; +end; + +// if check changes change check only here + +function TJvHidDevice.IsAccessible: Boolean; +begin + Result := IsPluggedIn and (IsCheckedOut or FIsEnumerated); +end; + +// open the device "file" (for the other methods) + +function TJvHidDevice.OpenFile: Boolean; +begin + // check if open allowed (propagates this state) + if IsAccessible then + if HidFileHandle = INVALID_HANDLE_VALUE then // if not already opened + begin + FNumInputBuffers := 0; + FHidFileHandle := CreateFile(PChar(FDevicePath), GENERIC_READ or GENERIC_WRITE, + FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, 0, 0); + if HidFileHandle <> INVALID_HANDLE_VALUE then + HidD_GetNumInputBuffers(HidFileHandle, FNumInputBuffers); + end; + Result := HidFileHandle <> INVALID_HANDLE_VALUE; +end; + +// open second device "file" for ReadFileEx and WriteFileEx + +function TJvHidDevice.OpenFileEx: Boolean; +begin + // check if open allowed (propagates this state) + if IsAccessible then + if HidOverlappedHandle = INVALID_HANDLE_VALUE then // if not already opened + begin + FNumOverlappedBuffers := 0; + FHidOverlappedHandle := CreateFile(PChar(FDevicePath), GENERIC_READ or GENERIC_WRITE, + FILE_SHARE_READ or FILE_SHARE_WRITE, nil, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); + if FHidOverlappedHandle <> INVALID_HANDLE_VALUE then + HidD_GetNumInputBuffers(FHidOverlappedHandle, FNumOverlappedBuffers); + end; + Result := FHidOverlappedHandle <> INVALID_HANDLE_VALUE; +end; + +// implement OnUnplug event + +procedure TJvHidDevice.DoUnplug; +begin + CloseFile; + CloseFileEx; + FIsPluggedIn := False; + // event even for checked in devices + if Assigned(FUnplug) then + FUnplug(Self); + // guarantees that event is only called once + OnUnplug := nil; +end; + +// assign the OnUnplug event + +procedure TJvHidDevice.SetUnplug(const Event: TJvHidUnplugEvent); +begin + if @Event <> @FUnplug then + FUnplug := Event; +end; + +// implementing indexed properties read + +function TJvHidDevice.GetDeviceString(Idx: Byte): string; +var + Buffer: array [0..256] of WideChar; +begin + Result := ''; + if Idx <> 0 then + if OpenFile then + if HidD_GetIndexedString(HidFileHandle, Idx, Buffer, SizeOf(Buffer)) then + Result := WideCharToString(Buffer); +end; + +function TJvHidDevice.GetLinkCollectionNode(Idx: WORD): THIDPLinkCollectionNode; +begin + FillChar(Result, SizeOf(THIDPLinkCollectionNode), #0); + if (Idx > 0) and (Idx <= Length(FLinkCollection)) then + Result := FLinkCollection[Idx-1]; +end; + +// implementing properties write + +procedure TJvHidDevice.SetNumInputBuffers(const Num: Integer); +begin + if OpenFile then + begin + HidD_SetNumInputBuffers(HidFileHandle, Num); + HidD_GetNumInputBuffers(HidFileHandle, FNumInputBuffers); + end; +end; + +procedure TJvHidDevice.SetNumOverlappedBuffers(const Num: Integer); +begin + if OpenFileEx then + begin + HidD_SetNumInputBuffers(HidOverlappedHandle, Num); + HidD_GetNumInputBuffers(HidOverlappedHandle, FNumOverlappedBuffers); + end; +end; + +// internal helper for the following functions + +procedure TJvHidDevice.GetMax; +begin + if IsAccessible then + begin + FMaxDataListLength := HidP_MaxDataListLength (ReportTypeParam, PreparsedData); + FMaxUsageListLength := HidP_MaxUsageListLength (ReportTypeParam, UsagePageParam, PreparsedData); + FMaxButtonListLength := HidP_MaxButtonListLength(ReportTypeParam, UsagePageParam, PreparsedData); + end; +end; + +procedure TJvHidDevice.SetReportTypeParam(const ReportType: THIDPReportType); +begin + FReportTypeParam := ReportType; + GetMax; +end; + +procedure TJvHidDevice.SetUsagePageParam(const UsagePage: TUsage); +begin + FUsagePageParam := UsagePage; + GetMax; +end; + +procedure TJvHidDevice.SetConfiguration(Config: THIDDConfiguration); +begin + if OpenFile then + if HidD_SetConfiguration(HidFileHandle, Config, SizeOf(THIDDConfiguration)) then + FConfiguration := Config; +end; + +//-- TJvHidDevice methods ----------------------------------------------- + +// generally the parameter count of the methods is reduced with the Param properties +// first assign the Param properties the desired value then call a method +// normally you will address the same Usage, UsagePage, ReportType or LinkCollection +// with more than one method +// +// the methods will open the device file when needed +// this file is not closed until unplug or destruction to speed up access + +// close the device "file" +// if you want to open the file directly close this +// to get undisturbed access + +procedure TJvHidDevice.CloseFile; +begin + if HidFileHandle <> INVALID_HANDLE_VALUE then + CloseHandle(HidFileHandle); + FNumInputBuffers := 0; + FHidFileHandle := INVALID_HANDLE_VALUE; +end; + +// same for the other device "file" + +procedure TJvHidDevice.CloseFileEx; +begin + if HidOverlappedHandle <> INVALID_HANDLE_VALUE then + CloseHandle(HidOverlappedHandle); + FNumOverlappedBuffers := 0; + FHidOverlappedHandle := INVALID_HANDLE_VALUE; +end; + +// all the methods which directly map to a HID-function + +function TJvHidDevice.FlushQueue: Boolean; +begin + Result := False; + if OpenFile then + Result := HidD_FlushQueue(HidFileHandle); +end; + +function TJvHidDevice.GetFeature(var Report; const Size: Integer): Boolean; +begin + Result := False; + if OpenFile then + Result := HidD_GetFeature(HidFileHandle, Report, Size); +end; + +function TJvHidDevice.SetFeature(var Report; const Size: Integer): Boolean; +begin + Result := False; + if OpenFile then + Result := HidD_SetFeature(HidFileHandle, Report, Size); +end; + +function TJvHidDevice.GetSpecificButtonCaps(ButtonCaps: PHIDPButtonCaps; var Count: WORD): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetSpecificButtonCaps(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, ButtonCaps, Count, PreparsedData); +end; + +function TJvHidDevice.GetButtonCaps(ButtonCaps: PHIDPButtonCaps; var Count: WORD): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetButtonCaps(ReportTypeParam, ButtonCaps, Count, PreparsedData); +end; + +function TJvHidDevice.GetSpecificValueCaps(ValueCaps: PHIDPValueCaps; var Count: WORD): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetSpecificValueCaps(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, ValueCaps, Count, PreparsedData); +end; + +function TJvHidDevice.GetValueCaps(ValueCaps: PHIDPValueCaps; var Count: WORD): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetValueCaps(ReportTypeParam, ValueCaps, Count, PreparsedData); +end; + +function TJvHidDevice.GetData(DataList: PHIDPData; var DataLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetData(ReportTypeParam, DataList, DataLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetData(DataList: PHIDPData; var DataLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetData(ReportTypeParam, DataList, DataLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetUsages(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetUsages(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetButtons(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetButtons(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetUsagesEx(UsageList: PUsageAndPage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetUsagesEx(ReportTypeParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetButtonsEx(UsageList: PUsageAndPage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetButtonsEx(ReportTypeParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetUsages(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetUsages(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetButtons(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetButtons(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.UnsetUsages(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_UnsetUsages(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.UnsetButtons(UsageList: PUsage; var UsageLength: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_UnsetButtons(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageList, UsageLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetUsageValue(var UsageValue: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetUsageValue(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetScaledUsageValue(var UsageValue: Integer; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetScaledUsageValue(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.GetUsageValueArray(UsageValue: PChar; UsageValueByteLength: WORD; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_GetUsageValueArray(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, UsageValueByteLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetUsageValue(UsageValue: ULONG; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetUsageValue(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetScaledUsageValue(UsageValue: Integer; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetScaledUsageValue(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.SetUsageValueArray(UsageValue: PChar; UsageValueByteLength: WORD; var Report; ReportLength: ULONG): NTSTATUS; +begin + Result := HIDP_STATUS_NULL; // for not plugged in + if IsAccessible then + Result := HidP_SetUsageValueArray(ReportTypeParam, UsagePageParam, LinkCollectionParam, UsageParam, + UsageValue, UsageValueByteLength, PreparsedData, Report, ReportLength); +end; + +function TJvHidDevice.DeviceIoControl(IoControlCode: DWORD; InBuffer: Pointer; InSize: DWORD; + OutBuffer: Pointer; OutSize: DWORD; var BytesReturned: DWORD): Boolean; +begin + Result := False; + if OpenFile then + Result := Windows.DeviceIoControl(HidFileHandle, IoControlCode, InBuffer, InSize, OutBuffer, OutSize, BytesReturned, nil); +end; + +function TJvHidDevice.ReadFile(var Report; ToRead: DWORD; var BytesRead: DWORD): Boolean; +begin + Result := False; + if OpenFile then + Result := Windows.ReadFile(HidFileHandle, Report, ToRead, BytesRead, nil); +end; + +function TJvHidDevice.WriteFile(var Report; ToWrite: DWORD; var BytesWritten: DWORD): Boolean; +begin + Result := False; + if OpenFile then + Result := Windows.WriteFile(HidFileHandle, Report, ToWrite, BytesWritten, nil); +end; + +// the TOverlapped structure is not needed externally +// the hEvent element is used to transport the device object +// to the callback function +// Better not implement a Delphi event with that + +function TJvHidDevice.ReadFileEx(var Report; ToRead: DWORD; CallBack: TPROverlappedCompletionRoutine): Boolean; +var + Ovl: TOverlapped; +begin + Result := False; + if OpenFileEx then + begin + FillChar(Ovl, SizeOf(TOverlapped), #0); + Ovl.hEvent := DWORD(Self); + Result := HidControllerClass.ReadFileEx(HidOverlappedHandle, Report, ToRead, Ovl, CallBack); + end; +end; + +function TJvHidDevice.WriteFileEx(var Report; ToWrite: DWORD; CallBack: TPROverlappedCompletionRoutine): Boolean; +var + Ovl: TOverlapped; +begin + Result := False; + if OpenFileEx then + begin + FillChar(Ovl, SizeOf(TOverlapped), #0); + Ovl.hEvent := DWORD(Self); + Result := HidControllerClass.WriteFileEx(HidOverlappedHandle, Report, ToWrite, Ovl, CallBack); + end; +end; + +//== TJvHidDeviceController =========================================== + +// internal worker function to find all Hid devices and create their objects + +procedure TJvHidDeviceController.FillInList(var List: TList); +var + PnPHandle: HDEVINFO; + DevData: TSPDevInfoData; + DeviceInterfaceData: TSPDeviceInterfaceData; + FunctionClassDeviceData: PSPDeviceInterfaceDetailData; + Success: LongBool; + Devn: Integer; + BytesReturned: DWORD; + HidDev: TJvHidDevice; +begin + // create list + List := TList.Create; + + // Get a handle for the Plug and Play node and request currently active HID devices + PnPHandle := SetupDiGetClassDevs(@FHidGuid, nil, 0, DIGCF_PRESENT or DIGCF_DEVICEINTERFACE); + if PnPHandle = Pointer(INVALID_HANDLE_VALUE) then + Exit; + Devn := 0; + repeat + DeviceInterfaceData.cbSize := SizeOf(TSPDeviceInterfaceData); + // Is there a HID device at this table entry? + Success := SetupDiEnumDeviceInterfaces(PnPHandle, nil, FHidGuid, Devn, DeviceInterfaceData); + if Success then + begin + DevData.cbSize := SizeOf(DevData); + BytesReturned := 0; + SetupDiGetDeviceInterfaceDetail(PnPHandle, @DeviceInterfaceData, nil, 0, @BytesReturned, @DevData); + if (BytesReturned <> 0) and (GetLastError = ERROR_INSUFFICIENT_BUFFER) then + begin + FunctionClassDeviceData := AllocMem(BytesReturned); + FunctionClassDeviceData.cbSize := 5; + if SetupDiGetDeviceInterfaceDetail(PnPHandle, @DeviceInterfaceData, FunctionClassDeviceData, BytesReturned, @BytesReturned, @DevData) then + begin + // create HID device object and add it to the device list + HidDev := TJvHidDevice.Create(PChar(@FunctionClassDeviceData.DevicePath), DevData.DevInst, + GetRegistryProperty(PnPHandle, DevData, SPDRP_DEVICEDESC), + GetRegistryProperty(PnPHandle, DevData, SPDRP_CLASS), + Self); + List.Add(HidDev); + Inc(Devn); + end; + FreeMem(FunctionClassDeviceData); + end; + end; + until not Success; + SetupDiDestroyDeviceInfoList(PnPHandle); +end; + +// the controller fills its list on creation and connects the event pipe + +constructor TJvHidDeviceController.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FDeviceChangeEvent := nil; + FEnumerateEvent := nil; + FDevUnplugEvent := nil; + FList := nil; + FNumCheckedInDevices := 0; + FNumCheckedOutDevices := 0; + FNumUnpluggedDevices := 0; + FDeviceChangeFired := False; + HidD_GetHidGuid(FHidGuid); + + // this is just to remind you that one controller is sufficient + Inc(GlobalInstanceCount); + if GlobalInstanceCount > 1 then + raise EControllerError.Create('Only one TJvHidDeviceController allowed per program'); + + // nothing done at design time + if not (csDesigning in ComponentState) then + begin + FillInList(FList); + FNumCheckedInDevices := FList.Count; + Application.HookMainWindow(EventPipe); + end; +end; + +procedure TJvHidDeviceController.Loaded; +var + I: Integer; + Dev: TJvHidDevice; +begin + inherited Loaded; + + // after read in of properties + // propagate the OnUnplug event to the device objects + if FList <> nil then + for I := 0 to FList.Count - 1 do + begin + Dev := FList.Items[I]; + Dev.OnUnplug := FDevUnplugEvent; + end; +end; + +// unplug or kill all controlled TJvHidDevices on controller destruction + +destructor TJvHidDeviceController.Destroy; +var + I: Integer; + HidDev: TJvHidDevice; +begin + Dec(GlobalInstanceCount); + // to prevent strange problems + FDeviceChangeEvent := nil; + FDevUnplugEvent := nil; + OnEnumerate := nil; + // nothing done at design time + if not (csDesigning in ComponentState) then + begin + // unhook event pipe + Application.UnhookMainWindow(EventPipe); + for I := 0 to FList.Count - 1 do + begin + HidDev := FList.Items[I]; + with HidDev do + begin + // set to uncontrolled + FMyController := nil; + if IsCheckedOut then + // pull the plug for checked out TJvHidDevices + DoUnplug + else + // kill TJvHidDevices which are not checked out + Free; + end; + end; + end; + FList.Free; + + inherited Destroy; +end; + +// gets all the Windows events/messages directly + +function TJvHidDeviceController.EventPipe(var Msg: TMessage): Boolean; +begin + Result := False; + // sort out WM_DEVICECHANGE : DBT_DEVNODES_CHANGED + if (Msg.Msg = WM_DEVICECHANGE) and (TWMDeviceChange(Msg).Event = DBT_DEVNODES_CHANGED) then + DoDeviceChange; +end; + +// implements OnDeviceChange event + +procedure TJvHidDeviceController.DoDeviceChange; +var + I: Integer; + J: Integer; + NewList: TList; + HidDev: TJvHidDevice; + Changed: Boolean; +begin + Changed := False; + // get new device list + FillInList(NewList); + + // unplug devices in FList which are not in NewList + for I := 0 to FList.Count - 1 do + begin + HidDev := FList.Items[I]; + for J := 0 to NewList.Count - 1 do + if (TJvHidDevice(NewList.Items[J]).DeviceID = HidDev.DeviceID) and HidDev.IsPluggedIn then + begin + HidDev := nil; + Break; + end; + if HidDev <> nil then + begin + HidDev.DoUnplug; + // prepare for deletion from list + if not HidDev.IsCheckedOut then + FList.Items[I] := nil; + Changed := True; + end; + end; + + // delete the nil elements from FList + I := 0; + while I < FList.Count do + begin + if FList.Items[I] = nil then + FList.Delete(I) + else + Inc(I); + end; + + // delete devices from NewList which are in FList + for I := 0 to NewList.Count - 1 do + for J := 0 to FList.Count - 1 do + if (TJvHidDevice(NewList[I]).DeviceID = TJvHidDevice(FList[J]).DeviceID) and TJvHidDevice(FList[J]).IsPluggedIn then + begin + TJvHidDevice(NewList[I]).FMyController := nil; // prevent Free/Destroy from accessing this controller + TJvHidDevice(NewList[I]).Free; + NewList[I] := nil; + Break; + end; + + // add the remains in NewList to FList + for I := 0 to NewList.Count - 1 do + if NewList[I] <> nil then + begin + FList.Add(NewList[I]); + Changed := True; + end; + + // throw away helper list + NewList.Free; + + // recount the devices + FNumCheckedInDevices := 0; + FNumCheckedOutDevices := 0; + FNumUnpluggedDevices := 0; + for I := 0 to FList.Count - 1 do + begin + HidDev := FList.Items[I]; + Inc(FNumCheckedInDevices, Ord(not HidDev.IsCheckedOut)); + Inc(FNumCheckedOutDevices, Ord(HidDev.IsCheckedOut)); + Inc(FNumUnpluggedDevices, Ord(not HidDev.IsPluggedIn)); + end; + FNumCheckedOutDevices := FNumCheckedOutDevices - FNumUnpluggedDevices; + + if Assigned(FDeviceChangeEvent) and Changed then + FDeviceChangeEvent(Self); +end; + +// assign OnDeviceChange and immediately fire if needed + +procedure TJvHidDeviceController.SetDeviceChangeEvent(const Notifier: TNotifyEvent); +begin + if @Notifier <> @FDeviceChangeEvent then + begin + FDeviceChangeEvent := Notifier; + if Assigned(FDeviceChangeEvent) and not FDeviceChangeFired then + FDeviceChangeEvent(Self); + FDeviceChangeFired := True; + end; +end; + +// implement OnEnumerate event + +function TJvHidDeviceController.DoEnumerate(HidDev: TJvHidDevice; Idx: Integer): Boolean; +begin + Result := False; + if Assigned(FEnumerateEvent) then + begin + HidDev.FIsEnumerated := True; + Result := FEnumerateEvent(HidDev, Idx); + HidDev.FIsEnumerated := False; + if not HidDev.FIsCheckedOut then + begin + HidDev.CloseFile; + HidDev.CloseFileEx; + end; + end; +end; + +// assign OnEnumerate event + +procedure TJvHidDeviceController.SetEnumerate(const Enumerator: TJvHidEnumerateEvent); +begin + if @Enumerator <> @FEnumerateEvent then + FEnumerateEvent := Enumerator; +end; + +// assign OnDevUnplug event + +procedure TJvHidDeviceController.SetDevUnplug(const Unplugger: TJvHidUnplugEvent); +var + I: Integer; + Dev: TJvHidDevice; +begin + if @Unplugger <> @FDevUnplugEvent then + begin + // change all OnUnplug events with the same old value + if not (csDesigning in ComponentState) then + for I := 0 to FList.Count - 1 do + begin + Dev := FList.Items[I]; + if @Dev.FUnplug = @FDevUnplugEvent then + Dev.OnUnplug := Unplugger; + end; + FDevUnplugEvent := Unplugger; + end; +end; + +// send an OnEnumerate event for ALL controlled HidDevices +// it is explicitly allowed to check out any device in the event + +function TJvHidDeviceController.Enumerate: Integer; +var + I: Integer; +begin + Result := 0; + for I := 0 to FList.Count - 1 do + if TJvHidDevice(FList[I]).IsPluggedIn then + begin + Inc(Result); + if not DoEnumerate(FList[I], I) then + Break; + end; +end; + +//-- TJvHidDeviceController methods ----------------------------------- + +// internal worker function to check out a TJvHidDevice + +function TJvHidDeviceController.CheckThisOut(var HidDev: TJvHidDevice; Idx: Integer; Check: Boolean): Boolean; +begin + Result := Check and not TJvHidDevice(FList.Items[Idx]).IsCheckedOut; + if Result then + begin + HidDev := FList[Idx]; + HidDev.FIsCheckedOut := True; + Inc(FNumCheckedOutDevices); + Dec(FNumCheckedInDevices); + end; +end; + +// method CheckOutByProductName hands out the first HidDevice with a matching ProductName + +function TJvHidDeviceController.CheckOutByProductName(var HidDev: TJvHidDevice; ProductName: string): Boolean; +var + I: Integer; +begin + Result := False; + HidDev := nil; + if ProductName <> '' then + for I := 0 to FList.Count - 1 do + begin + Result := CheckThisOut(HidDev, I, ProductName = TJvHidDevice(FList[I]).ProductName); + if Result then + Break; + end; +end; + +// method CheckOutByVendorName hands out the first HidDevice with a matching VendorName + +function TJvHidDeviceController.CheckOutByVendorName(var HidDev: TJvHidDevice; VendorName: string): Boolean; +var + I: Integer; +begin + Result := False; + HidDev := nil; + if VendorName <> '' then + for I := 0 to FList.Count - 1 do + begin + Result := CheckThisOut(HidDev, I, VendorName = TJvHidDevice(FList[I]).VendorName); + if Result then + Break; + end; +end; + +// method CheckOutByClass hands out the first HidDevice with a matching Class +// Class comes from the registry (examples: 'Mouse', 'Keyboard') + +function TJvHidDeviceController.CheckOutByClass(var HidDev: TJvHidDevice; ClassName: string): Boolean; +var + I: Integer; +begin + Result := False; + HidDev := nil; + if ClassName <> '' then + for I := 0 to FList.Count - 1 do + begin + Result := CheckThisOut(HidDev, I, ClassName = TJvHidDevice(FList[I]).RegClass); + if Result then + Break; + end; +end; + +// method CheckOutByID hands out the first HidDevice with a matching VendorID and ProductID +// Pid = -1 matches all ProductIDs + +function TJvHidDeviceController.CheckOutByID(var HidDev: TJvHidDevice; Vid, Pid: Integer): Boolean; +var + I: Integer; +begin + Result := False; + HidDev := nil; + for I := 0 to FList.Count - 1 do + begin + Result := CheckThisOut(HidDev, I, (Vid = TJvHidDevice(FList[I]).Attributes.VendorID) and + ((Pid = TJvHidDevice(FList[I]).Attributes.ProductID) or (Pid = -1))); + if Result then + Break; + end; +end; + +// method CheckOutByIndex hands out the HidDevice in the list with the named index +// this is mainly for check out during OnEnumerate + +function TJvHidDeviceController.CheckOutByIndex(var HidDev: TJvHidDevice; const Idx: Integer): Boolean; +begin + Result := False; + HidDev := nil; + if (Idx >= 0) and (Idx < FList.Count) then + Result := CheckThisOut(HidDev, Idx, True); +end; + +// method CheckOut simply hands out the first available HidDevice in the list + +function TJvHidDeviceController.CheckOut(var HidDev: TJvHidDevice): Boolean; +var + I: Integer; +begin + Result := False; + HidDev := nil; + for I := 0 to FList.Count - 1 do + begin + Result := CheckThisOut(HidDev, I, True); + if Result then + Break; + end; +end; + +// method CheckIn hands a checked out HidDevice back in + +procedure TJvHidDeviceController.CheckIn(var HidDev: TJvHidDevice); +begin + if HidDev <> nil then + begin + HidDev.CloseFile; + HidDev.CloseFileEx; + + if HidDev.IsPluggedIn then + begin + HidDev.FIsCheckedOut := False; + Dec(FNumCheckedOutDevices); + Inc(FNumCheckedInDevices); + end + else + HidDev.Free; + HidDev := nil; + end; +end; + +// a helper function to check the return values just +// like Win32Check +// the functions return the parameter to be transparent + +function HidCheck(const RetVal: NTSTATUS): NTSTATUS; +begin + if RetVal <> HIDP_STATUS_SUCCESS then + HidError(RetVal); + Result := RetVal; +end; + +function HidCheck(const RetVal: LongBool): LongBool; +begin + if not RetVal then + raise EHidClientError.Create('HidClient Error: a boolean function failed'); + Result := RetVal; +end; + +function HidError(const RetVal: NTSTATUS): NTSTATUS; +var + ErrBuf: string; +begin + // only check HID errors + if ((RetVal and NTSTATUS($00FF0000)) = HIDP_STATUS_SUCCESS) and + ((RetVal and NTSTATUS($C0000000)) <> 0) then + begin + case RetVal of + HIDP_STATUS_NULL: ErrBuf := 'device not plugged in'; + HIDP_STATUS_INVALID_PREPARSED_DATA: ErrBuf := 'invalid preparsed data'; + HIDP_STATUS_INVALID_REPORT_TYPE: ErrBuf := 'invalid report type'; + HIDP_STATUS_INVALID_REPORT_LENGTH: ErrBuf := 'invalid report length'; + HIDP_STATUS_USAGE_NOT_FOUND: ErrBuf := 'usage not found'; + HIDP_STATUS_VALUE_OUT_OF_RANGE: ErrBuf := 'value out of range'; + HIDP_STATUS_BAD_LOG_PHY_VALUES: ErrBuf := 'bad logical or physical values'; + HIDP_STATUS_BUFFER_TOO_SMALL: ErrBuf := 'buffer too small'; + HIDP_STATUS_INTERNAL_ERROR: ErrBuf := 'internal error'; + HIDP_STATUS_I8042_TRANS_UNKNOWN: ErrBuf := '8042 key translation impossible'; + HIDP_STATUS_INCOMPATIBLE_REPORT_ID: ErrBuf := 'incompatible report ID'; + HIDP_STATUS_NOT_VALUE_ARRAY: ErrBuf := 'not a value array'; + HIDP_STATUS_IS_VALUE_ARRAY: ErrBuf := 'is a value array'; + HIDP_STATUS_DATA_INDEX_NOT_FOUND: ErrBuf := 'data index not found'; + HIDP_STATUS_DATA_INDEX_OUT_OF_RANGE: ErrBuf := 'data index out of range'; + HIDP_STATUS_BUTTON_NOT_PRESSED: ErrBuf := 'button not pressed'; + HIDP_STATUS_REPORT_DOES_NOT_EXIST: ErrBuf := 'report does not exist'; + HIDP_STATUS_NOT_IMPLEMENTED: ErrBuf := 'not implemented'; + else + ErrBuf := Format('unknown HID error %x', [RetVal]); + end; + raise EHidClientError.Create('HidClient Error: ' + ErrBuf); + end; + Result := RetVal; +end; + +// We place the component on the new 'Project JEDI' palette. +// This is to encourage you to become a member. +// Have a look at www.delphi-jedi.org for further details. + +procedure Register; +begin + RegisterComponents('Project JEDI', [TJvHidDeviceController]); +end; + +end. + diff --git a/lib/HID/HidToken.pas b/lib/HID/HidToken.pas new file mode 100644 index 00000000..cc631f72 --- /dev/null +++ b/lib/HID/HidToken.pas @@ -0,0 +1,204 @@ +{******************************************************************} +{ } +{ Borland Delphi Runtime Library } +{ Public Definitions of HID USAGES } +{ } +{ Portions created by Microsoft are } +{ Copyright (c) 1996-1999 Microsoft Corporation. } +{ All Rights Reserved. } +{ } +{ The original file is: hidtoken.h, released March 1999. } +{ The original Pascal code is: HidToken.pas, released 31 Jan 2000. } +{ The initial developer of the Pascal code is Robert Marquardt } +{ (robert_marquardt@gmx.de) } +{ } +{ Portions created by Robert Marquardt are } +{ Copyright (c) 1999, 2000 Robert Marquardt. } +{ } +{ Contributor(s): Marcel van Brakel (brakelm@bart.nl) } +{ } +{ Obtained through: } +{ Joint Endeavour of Delphi Innovators (Project JEDI) } +{ } +{ You may retrieve the latest version of this file at the Project } +{ JEDI home page, located at http://delphi-jedi.org } +{ } +{ The contents of this file are used with permission, subject to } +{ the Mozilla Public License Version 1.1 (the "License"); you may } +{ not use this file except in compliance with the License. You may } +{ obtain a copy of the License at } +{ http://www.mozilla.org/NPL/NPL-1_1Final.html } +{ } +{ Software distributed under the License is distributed on an } +{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or } +{ implied. See the License for the specific language governing } +{ rights and limitations under the License. } +{ } +{******************************************************************} + +unit HidToken; + +{$WEAKPACKAGEUNIT} + +interface + +(*$HPPEMIT ''*) +(*$HPPEMIT '#include "hidtoken.h"'*) +(*$HPPEMIT ''*) + +const + HIDP_ITEM_LONG = $FE; + {$EXTERNALSYM HIDP_ITEM_LONG} + HIDP_ITEM_LENGTH_DATA = $03; + {$EXTERNALSYM HIDP_ITEM_LENGTH_DATA} + + // Main Items + // Only main items with one byte data (bSize = 1) are supported. + HIDP_MAIN_INPUT_1 = $81; + {$EXTERNALSYM HIDP_MAIN_INPUT_1} + HIDP_MAIN_INPUT_2 = $82; + {$EXTERNALSYM HIDP_MAIN_INPUT_2} + HIDP_MAIN_OUTPUT_1 = $91; + {$EXTERNALSYM HIDP_MAIN_OUTPUT_1} + HIDP_MAIN_OUTPUT_2 = $92; + {$EXTERNALSYM HIDP_MAIN_OUTPUT_2} + HIDP_MAIN_FEATURE_1 = $B1; + {$EXTERNALSYM HIDP_MAIN_FEATURE_1} + HIDP_MAIN_FEATURE_2 = $B2; + {$EXTERNALSYM HIDP_MAIN_FEATURE_2} + HIDP_MAIN_COLLECTION = $A1; + {$EXTERNALSYM HIDP_MAIN_COLLECTION} + HIDP_MAIN_ENDCOLLECTION = $C0; + {$EXTERNALSYM HIDP_MAIN_ENDCOLLECTION} + HIDP_MAIN_COLLECTION_LINK = $00; + {$EXTERNALSYM HIDP_MAIN_COLLECTION_LINK} + HIDP_MAIN_COLLECTION_APP = $01; + {$EXTERNALSYM HIDP_MAIN_COLLECTION_APP} + + // Global Items + HIDP_GLOBAL_USAGE_PAGE_1 = $05; // UsagePage of 1 byte + {$EXTERNALSYM HIDP_GLOBAL_USAGE_PAGE_1} + HIDP_GLOBAL_USAGE_PAGE_2 = $06; // UsagePage of 2 bytes + {$EXTERNALSYM HIDP_GLOBAL_USAGE_PAGE_2} + HIDP_GLOBAL_USAGE_PAGE_4 = $07; // UsagePage of 4 bytes + {$EXTERNALSYM HIDP_GLOBAL_USAGE_PAGE_4} + HIDP_GLOBAL_LOG_MIN_1 = $15; // minimum value of size 1 byte. + {$EXTERNALSYM HIDP_GLOBAL_LOG_MIN_1} + HIDP_GLOBAL_LOG_MIN_2 = $16; // minimum value of size 2 bytes. + {$EXTERNALSYM HIDP_GLOBAL_LOG_MIN_2} + HIDP_GLOBAL_LOG_MIN_4 = $17; // minimum value of size 4 bytes. + {$EXTERNALSYM HIDP_GLOBAL_LOG_MIN_4} + HIDP_GLOBAL_LOG_MAX_1 = $25; // maximum of size 1 byte. + {$EXTERNALSYM HIDP_GLOBAL_LOG_MAX_1} + HIDP_GLOBAL_LOG_MAX_2 = $26; // maximum of size 2 bytes. + {$EXTERNALSYM HIDP_GLOBAL_LOG_MAX_2} + HIDP_GLOBAL_LOG_MAX_4 = $27; // maximum of size 4 bytes. + {$EXTERNALSYM HIDP_GLOBAL_LOG_MAX_4} + + HIDP_GLOBAL_PHY_MIN_1 = $35; // minimum value of size 1 byte. + {$EXTERNALSYM HIDP_GLOBAL_PHY_MIN_1} + HIDP_GLOBAL_PHY_MIN_2 = $36; // minimum value of size 2 bytes. + {$EXTERNALSYM HIDP_GLOBAL_PHY_MIN_2} + HIDP_GLOBAL_PHY_MIN_4 = $37; // minimum value of size 4 bytes. + {$EXTERNALSYM HIDP_GLOBAL_PHY_MIN_4} + HIDP_GLOBAL_PHY_MAX_1 = $45; // maximum of size 1 byte. + {$EXTERNALSYM HIDP_GLOBAL_PHY_MAX_1} + HIDP_GLOBAL_PHY_MAX_2 = $46; // maximum of size 2 bytes. + {$EXTERNALSYM HIDP_GLOBAL_PHY_MAX_2} + HIDP_GLOBAL_PHY_MAX_4 = $47; // maximum of size 4 bytes. + {$EXTERNALSYM HIDP_GLOBAL_PHY_MAX_4} + + HIDP_GLOBAL_UNIT_EXP_1 = $55; // Exponent of size 1 byte. + {$EXTERNALSYM HIDP_GLOBAL_UNIT_EXP_1} + HIDP_GLOBAL_UNIT_EXP_2 = $56; // Exponent of size 2 bytes. + {$EXTERNALSYM HIDP_GLOBAL_UNIT_EXP_2} + HIDP_GLOBAL_UNIT_EXP_4 = $57; // Exponent of size 4 bytes. + {$EXTERNALSYM HIDP_GLOBAL_UNIT_EXP_4} + HIDP_GLOBAL_UNIT_1 = $65; // UNIT of size 1 byte. + {$EXTERNALSYM HIDP_GLOBAL_UNIT_1} + HIDP_GLOBAL_UNIT_2 = $66; // UNIT of size 2 bytes. + {$EXTERNALSYM HIDP_GLOBAL_UNIT_2} + HIDP_GLOBAL_UNIT_4 = $67; // UNIT of size 4 bytes. + {$EXTERNALSYM HIDP_GLOBAL_UNIT_4} + + HIDP_GLOBAL_REPORT_SIZE = $75; // Report size in bits + {$EXTERNALSYM HIDP_GLOBAL_REPORT_SIZE} + HIDP_GLOBAL_REPORT_ID = $85; // ID only size 1 byte supported + {$EXTERNALSYM HIDP_GLOBAL_REPORT_ID} + HIDP_GLOBAL_REPORT_COUNT_1 = $95; // Number of data fields 1 byte + {$EXTERNALSYM HIDP_GLOBAL_REPORT_COUNT_1} + HIDP_GLOBAL_REPORT_COUNT_2 = $96; // Number of data fields 2 bytes + {$EXTERNALSYM HIDP_GLOBAL_REPORT_COUNT_2} + HIDP_GLOBAL_PUSH = $A4; // The dreaded PUSH command + {$EXTERNALSYM HIDP_GLOBAL_PUSH} + HIDP_GLOBAL_POP = $B4; // And the dreaded POP command + {$EXTERNALSYM HIDP_GLOBAL_POP} + + // Local Items + HIDP_LOCAL_USAGE_1 = $09; + {$EXTERNALSYM HIDP_LOCAL_USAGE_1} + HIDP_LOCAL_USAGE_2 = $0A; + {$EXTERNALSYM HIDP_LOCAL_USAGE_2} + HIDP_LOCAL_USAGE_4 = $0B; + {$EXTERNALSYM HIDP_LOCAL_USAGE_4} + HIDP_LOCAL_USAGE_MIN_1 = $19; + {$EXTERNALSYM HIDP_LOCAL_USAGE_MIN_1} + HIDP_LOCAL_USAGE_MIN_2 = $1A; + {$EXTERNALSYM HIDP_LOCAL_USAGE_MIN_2} + HIDP_LOCAL_USAGE_MIN_4 = $1B; + {$EXTERNALSYM HIDP_LOCAL_USAGE_MIN_4} + HIDP_LOCAL_USAGE_MAX_1 = $29; + {$EXTERNALSYM HIDP_LOCAL_USAGE_MAX_1} + HIDP_LOCAL_USAGE_MAX_2 = $2A; + {$EXTERNALSYM HIDP_LOCAL_USAGE_MAX_2} + HIDP_LOCAL_USAGE_MAX_4 = $2B; + {$EXTERNALSYM HIDP_LOCAL_USAGE_MAX_4} + HIDP_LOCAL_DESIG_INDEX = $39; // Designators of byte size supported + {$EXTERNALSYM HIDP_LOCAL_DESIG_INDEX} + HIDP_LOCAL_DESIG_MIN = $49; + {$EXTERNALSYM HIDP_LOCAL_DESIG_MIN} + HIDP_LOCAL_DESIG_MAX = $59; + {$EXTERNALSYM HIDP_LOCAL_DESIG_MAX} + HIDP_LOCAL_STRING_INDEX = $79; // String indices of size byte supported + {$EXTERNALSYM HIDP_LOCAL_STRING_INDEX} + HIDP_LOCAL_STRING_MIN = $89; + {$EXTERNALSYM HIDP_LOCAL_STRING_MIN} + HIDP_LOCAL_STRING_MAX = $99; + {$EXTERNALSYM HIDP_LOCAL_STRING_MAX} + HIDP_LOCAL_DELIMITER = $A9; + {$EXTERNALSYM HIDP_LOCAL_DELIMITER} + +function HidPIsMain (x: Integer): Boolean; +function HidPIsMainItem (x: Integer): Boolean; +function HidPIsGlobalItem (x: Integer): Boolean; +function HidPIsLocalItem (x: Integer): Boolean; +function HidPIsReservedItem(x: Integer): Boolean; + +implementation + +function HidPIsMain(x: Integer): Boolean; +begin + Result := ((x and $0C) = 0); +end; + +function HidPIsMainItem(x: Integer): Boolean; +begin + Result := ((x and $0C) = 0); +end; + +function HidPIsGlobalItem(x: Integer): Boolean; +begin + Result := ((x and $0C) = $04); +end; + +function HidPIsLocalItem(x: Integer): Boolean; +begin + Result := ((x and $0C) = $08); +end; + +function HidPIsReservedItem(x: Integer): Boolean; +begin + Result := ((x and $0C) = $0C); +end; + +end. diff --git a/lib/HID/HidUsage.pas b/lib/HID/HidUsage.pas new file mode 100644 index 00000000..e323898b --- /dev/null +++ b/lib/HID/HidUsage.pas @@ -0,0 +1,783 @@ +{******************************************************************} +{ } +{ Borland Delphi Runtime Library } +{ Public Definitions of HID USAGES } +{ } +{ Portions created by Microsoft are } +{ Copyright (c) 1996, 1997 Microsoft Corporation } +{ All Rights Reserved. } +{ } +{ The original file is: hidusage.h, released March 1999. } +{ The original Pascal code is: HidUsage.pas, released 31 Jan 2000. } +{ The initial developer of the Pascal code is Robert Marquardt } +{ (robert_marquardt@gmx.de) } +{ } +{ Portions created by Robert Marquardt are } +{ Copyright (c) 1999, 2000 Robert Marquardt. } +{ } +{ Contributor(s): Marcel van Brakel (brakelm@bart.nl) } +{ } +{ Obtained through: } +{ Joint Endeavour of Delphi Innovators (Project JEDI) } +{ } +{ You may retrieve the latest version of this file at the Project } +{ JEDI home page, located at http://delphi-jedi.org } +{ } +{ The contents of this file are used with permission, subject to } +{ the Mozilla Public License Version 1.1 (the "License"); you may } +{ not use this file except in compliance with the License. You may } +{ obtain a copy of the License at } +{ http://www.mozilla.org/NPL/NPL-1_1Final.html } +{ } +{ Software distributed under the License is distributed on an } +{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or } +{ implied. See the License for the specific language governing } +{ rights and limitations under the License. } +{ } +{******************************************************************} + +unit HidUsage; + +interface + +{$WEAKPACKAGEUNIT} + +uses Windows; + +(*$HPPEMIT ''*) +(*$HPPEMIT '#include "hidusage.h"'*) +(*$HPPEMIT ''*) + +// +// Usage Pages +// + +const + HID_USAGE_PAGE_GENERIC = $01; + {$EXTERNALSYM HID_USAGE_PAGE_GENERIC} + HID_USAGE_PAGE_SIMULATION = $02; + {$EXTERNALSYM HID_USAGE_PAGE_SIMULATION} + HID_USAGE_PAGE_VR = $03; + {$EXTERNALSYM HID_USAGE_PAGE_VR} + HID_USAGE_PAGE_SPORT = $04; + {$EXTERNALSYM HID_USAGE_PAGE_SPORT} + HID_USAGE_PAGE_GAME = $05; + {$EXTERNALSYM HID_USAGE_PAGE_GAME} + HID_USAGE_PAGE_KEYBOARD = $07; + {$EXTERNALSYM HID_USAGE_PAGE_KEYBOARD} + HID_USAGE_PAGE_LED = $08; + {$EXTERNALSYM HID_USAGE_PAGE_LED} + HID_USAGE_PAGE_BUTTON = $09; + {$EXTERNALSYM HID_USAGE_PAGE_BUTTON} + HID_USAGE_PAGE_ORDINAL = $0A; + {$EXTERNALSYM HID_USAGE_PAGE_ORDINAL} + HID_USAGE_PAGE_TELEPHONY = $0B; + {$EXTERNALSYM HID_USAGE_PAGE_TELEPHONY} + HID_USAGE_PAGE_CONSUMER = $0C; + {$EXTERNALSYM HID_USAGE_PAGE_CONSUMER} + HID_USAGE_PAGE_DIGITIZER = $0D; + {$EXTERNALSYM HID_USAGE_PAGE_DIGITIZER} + HID_USAGE_PAGE_UNICODE = $10; + {$EXTERNALSYM HID_USAGE_PAGE_UNICODE} + HID_USAGE_PAGE_ALPHANUMERIC = $14; + {$EXTERNALSYM HID_USAGE_PAGE_ALPHANUMERIC} + +// +// Usages from Generic Desktop Page (0x01) +// + + HID_USAGE_GENERIC_POINTER = $01; + {$EXTERNALSYM HID_USAGE_GENERIC_POINTER} + HID_USAGE_GENERIC_MOUSE = $02; + {$EXTERNALSYM HID_USAGE_GENERIC_MOUSE} + HID_USAGE_GENERIC_JOYSTICK = $04; + {$EXTERNALSYM HID_USAGE_GENERIC_JOYSTICK} + HID_USAGE_GENERIC_GAMEPAD = $05; + {$EXTERNALSYM HID_USAGE_GENERIC_GAMEPAD} + HID_USAGE_GENERIC_KEYBOARD = $06; + {$EXTERNALSYM HID_USAGE_GENERIC_KEYBOARD} + HID_USAGE_GENERIC_KEYPAD = $07; + {$EXTERNALSYM HID_USAGE_GENERIC_KEYPAD} + HID_USAGE_GENERIC_MULTIAXIS = $08; + {$EXTERNALSYM HID_USAGE_GENERIC_MULTIAXIS} + HID_USAGE_GENERIC_SYSTEM_CTL = $80; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSTEM_CTL} + + HID_USAGE_GENERIC_X = $30; + {$EXTERNALSYM HID_USAGE_GENERIC_X} + HID_USAGE_GENERIC_Y = $31; + {$EXTERNALSYM HID_USAGE_GENERIC_Y} + HID_USAGE_GENERIC_Z = $32; + {$EXTERNALSYM HID_USAGE_GENERIC_Z} + HID_USAGE_GENERIC_RX = $33; + {$EXTERNALSYM HID_USAGE_GENERIC_RX} + HID_USAGE_GENERIC_RY = $34; + {$EXTERNALSYM HID_USAGE_GENERIC_RY} + HID_USAGE_GENERIC_RZ = $35; + {$EXTERNALSYM HID_USAGE_GENERIC_RZ} + HID_USAGE_GENERIC_SLIDER = $36; + {$EXTERNALSYM HID_USAGE_GENERIC_SLIDER} + HID_USAGE_GENERIC_DIAL = $37; + {$EXTERNALSYM HID_USAGE_GENERIC_DIAL} + HID_USAGE_GENERIC_WHEEL = $38; + {$EXTERNALSYM HID_USAGE_GENERIC_WHEEL} + HID_USAGE_GENERIC_HATSWITCH = $39; + {$EXTERNALSYM HID_USAGE_GENERIC_HATSWITCH} + HID_USAGE_GENERIC_COUNTED_BUFFER = $3A; + {$EXTERNALSYM HID_USAGE_GENERIC_COUNTED_BUFFER} + HID_USAGE_GENERIC_BYTE_COUNT = $3B; + {$EXTERNALSYM HID_USAGE_GENERIC_BYTE_COUNT} + HID_USAGE_GENERIC_MOTION_WAKEUP = $3C; + {$EXTERNALSYM HID_USAGE_GENERIC_MOTION_WAKEUP} + HID_USAGE_GENERIC_START = $3D; + {$EXTERNALSYM HID_USAGE_GENERIC_START} + HID_USAGE_GENERIC_SELECT = $3E; + {$EXTERNALSYM HID_USAGE_GENERIC_SELECT} + HID_USAGE_GENERIC_VX = $40; + {$EXTERNALSYM HID_USAGE_GENERIC_VX} + HID_USAGE_GENERIC_VY = $41; + {$EXTERNALSYM HID_USAGE_GENERIC_VY} + HID_USAGE_GENERIC_VZ = $42; + {$EXTERNALSYM HID_USAGE_GENERIC_VZ} + HID_USAGE_GENERIC_VBRX = $43; + {$EXTERNALSYM HID_USAGE_GENERIC_VBRX} + HID_USAGE_GENERIC_VBRY = $44; + {$EXTERNALSYM HID_USAGE_GENERIC_VBRY} + HID_USAGE_GENERIC_VBRZ = $45; + {$EXTERNALSYM HID_USAGE_GENERIC_VBRZ} + HID_USAGE_GENERIC_VNO = $46; + {$EXTERNALSYM HID_USAGE_GENERIC_VNO} + HID_USAGE_GENERIC_SYSCTL_POWER = $81; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_POWER} + HID_USAGE_GENERIC_SYSCTL_SLEEP = $82; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_SLEEP} + HID_USAGE_GENERIC_SYSCTL_WAKE = $83; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_WAKE} + HID_USAGE_GENERIC_SYSCTL_CONTEXT_MENU = $84; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_CONTEXT_MENU} + HID_USAGE_GENERIC_SYSCTL_MAIN_MENU = $85; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_MAIN_MENU} + HID_USAGE_GENERIC_SYSCTL_APP_MENU = $86; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_APP_MENU} + HID_USAGE_GENERIC_SYSCTL_HELP_MENU = $87; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_HELP_MENU} + HID_USAGE_GENERIC_SYSCTL_MENU_EXIT = $88; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_MENU_EXIT} + HID_USAGE_GENERIC_SYSCTL_MENU_SELECT = $89; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_MENU_SELECT} + HID_USAGE_GENERIC_SYSCTL_MENU_RIGHT = $8A; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_MENU_RIGHT} + HID_USAGE_GENERIC_SYSCTL_MENU_LEFT = $8B; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_MENU_LEFT} + HID_USAGE_GENERIC_SYSCTL_MENU_UP = $8C; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_MENU_UP} + HID_USAGE_GENERIC_SYSCTL_MENU_DOWN = $8D; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_MENU_DOWN} + HID_USAGE_GENERIC_SYSCTL_DPAD_UP = $90; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_DPAD_UP} + HID_USAGE_GENERIC_SYSCTL_DPAD_DOWN = $91; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_DPAD_DOWN} + HID_USAGE_GENERIC_SYSCTL_DPAD_RIGHT = $92; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_DPAD_RIGHT} + HID_USAGE_GENERIC_SYSCTL_DPAD_LEFT = $93; + {$EXTERNALSYM HID_USAGE_GENERIC_SYSCTL_DPAD_LEFT} + +// +// Usages from Simulation Controls Page (0x02) +// + + HID_USAGE_SIMULATION_RUDDER = $BA; + {$EXTERNALSYM HID_USAGE_SIMULATION_RUDDER} + HID_USAGE_SIMULATION_THROTTLE = $BB; + {$EXTERNALSYM HID_USAGE_SIMULATION_THROTTLE} + +// +// Virtual Reality Controls Page (0x03) +// + + +// +// Sport Controls Page (0x04) +// + + +// +// Game Controls Page (0x05) +// + + +// +// Keyboard/Keypad Page (0x07) +// + + // Error "keys" + HID_USAGE_KEYBOARD_NOEVENT = $00; + {$EXTERNALSYM HID_USAGE_KEYBOARD_NOEVENT} + HID_USAGE_KEYBOARD_ROLLOVER = $01; + {$EXTERNALSYM HID_USAGE_KEYBOARD_ROLLOVER} + HID_USAGE_KEYBOARD_POSTFAIL = $02; + {$EXTERNALSYM HID_USAGE_KEYBOARD_POSTFAIL} + HID_USAGE_KEYBOARD_UNDEFINED = $03; + {$EXTERNALSYM HID_USAGE_KEYBOARD_UNDEFINED} + + // Letters + HID_USAGE_KEYBOARD_aA = $04; + {$EXTERNALSYM HID_USAGE_KEYBOARD_aA} + HID_USAGE_KEYBOARD_bB = $05; + {$EXTERNALSYM HID_USAGE_KEYBOARD_bB} + HID_USAGE_KEYBOARD_cC = $06; + {$EXTERNALSYM HID_USAGE_KEYBOARD_cC} + HID_USAGE_KEYBOARD_dD = $07; + {$EXTERNALSYM HID_USAGE_KEYBOARD_dD} + HID_USAGE_KEYBOARD_eE = $08; + {$EXTERNALSYM HID_USAGE_KEYBOARD_eE} + HID_USAGE_KEYBOARD_fF = $09; + {$EXTERNALSYM HID_USAGE_KEYBOARD_fF} + HID_USAGE_KEYBOARD_gG = $0A; + {$EXTERNALSYM HID_USAGE_KEYBOARD_gG} + HID_USAGE_KEYBOARD_hH = $0B; + {$EXTERNALSYM HID_USAGE_KEYBOARD_hH} + HID_USAGE_KEYBOARD_iI = $0C; + {$EXTERNALSYM HID_USAGE_KEYBOARD_iI} + HID_USAGE_KEYBOARD_jJ = $0D; + {$EXTERNALSYM HID_USAGE_KEYBOARD_jJ} + HID_USAGE_KEYBOARD_kK = $0E; + {$EXTERNALSYM HID_USAGE_KEYBOARD_kK} + HID_USAGE_KEYBOARD_lL = $0F; + {$EXTERNALSYM HID_USAGE_KEYBOARD_lL} + HID_USAGE_KEYBOARD_mM = $10; + {$EXTERNALSYM HID_USAGE_KEYBOARD_mM} + HID_USAGE_KEYBOARD_nN = $11; + {$EXTERNALSYM HID_USAGE_KEYBOARD_nN} + HID_USAGE_KEYBOARD_oO = $12; + {$EXTERNALSYM HID_USAGE_KEYBOARD_oO} + HID_USAGE_KEYBOARD_pP = $13; + {$EXTERNALSYM HID_USAGE_KEYBOARD_pP} + HID_USAGE_KEYBOARD_qQ = $14; + {$EXTERNALSYM HID_USAGE_KEYBOARD_qQ} + HID_USAGE_KEYBOARD_rR = $15; + {$EXTERNALSYM HID_USAGE_KEYBOARD_rR} + HID_USAGE_KEYBOARD_sS = $16; + {$EXTERNALSYM HID_USAGE_KEYBOARD_sS} + HID_USAGE_KEYBOARD_tT = $17; + {$EXTERNALSYM HID_USAGE_KEYBOARD_tT} + HID_USAGE_KEYBOARD_uU = $18; + {$EXTERNALSYM HID_USAGE_KEYBOARD_uU} + HID_USAGE_KEYBOARD_vV = $19; + {$EXTERNALSYM HID_USAGE_KEYBOARD_vV} + HID_USAGE_KEYBOARD_wW = $1A; + {$EXTERNALSYM HID_USAGE_KEYBOARD_wW} + HID_USAGE_KEYBOARD_xX = $1B; + {$EXTERNALSYM HID_USAGE_KEYBOARD_xX} + HID_USAGE_KEYBOARD_yY = $1C; + {$EXTERNALSYM HID_USAGE_KEYBOARD_yY} + HID_USAGE_KEYBOARD_zZ = $1D; + {$EXTERNALSYM HID_USAGE_KEYBOARD_zZ} + + // Numbers + HID_USAGE_KEYBOARD_ONE = $1E; // or ! + {$EXTERNALSYM HID_USAGE_KEYBOARD_ONE} + HID_USAGE_KEYBOARD_TWO = $1F; // or @ + {$EXTERNALSYM HID_USAGE_KEYBOARD_TWO} + HID_USAGE_KEYBOARD_THREE = $20; // or # + {$EXTERNALSYM HID_USAGE_KEYBOARD_THREE} + HID_USAGE_KEYBOARD_FOUR = $21; // or $ + {$EXTERNALSYM HID_USAGE_KEYBOARD_FOUR} + HID_USAGE_KEYBOARD_FIVE = $22; // or % + {$EXTERNALSYM HID_USAGE_KEYBOARD_FIVE} + HID_USAGE_KEYBOARD_SIX = $23; // or ^ + {$EXTERNALSYM HID_USAGE_KEYBOARD_SIX} + HID_USAGE_KEYBOARD_SEVEN = $24; // or & + {$EXTERNALSYM HID_USAGE_KEYBOARD_SEVEN} + HID_USAGE_KEYBOARD_EIGHT = $25; // or * + {$EXTERNALSYM HID_USAGE_KEYBOARD_EIGHT} + HID_USAGE_KEYBOARD_NINE = $26; // or ( + {$EXTERNALSYM HID_USAGE_KEYBOARD_NINE} + HID_USAGE_KEYBOARD_ZERO = $27; // or ) + {$EXTERNALSYM HID_USAGE_KEYBOARD_ZERO} + + HID_USAGE_KEYBOARD_ENTER = $28; // RETURN is another key + {$EXTERNALSYM HID_USAGE_KEYBOARD_ENTER} + HID_USAGE_KEYBOARD_ESCAPE = $29; + {$EXTERNALSYM HID_USAGE_KEYBOARD_ESCAPE} + HID_USAGE_KEYBOARD_BACKSPACE = $2A; // Delete left char + {$EXTERNALSYM HID_USAGE_KEYBOARD_BACKSPACE} + HID_USAGE_KEYBOARD_TAB = $2B; + {$EXTERNALSYM HID_USAGE_KEYBOARD_TAB} + HID_USAGE_KEYBOARD_SPACE = $2C; + {$EXTERNALSYM HID_USAGE_KEYBOARD_SPACE} + HID_USAGE_KEYBOARD_MINUS = $2D; // or _ + {$EXTERNALSYM HID_USAGE_KEYBOARD_MINUS} + HID_USAGE_KEYBOARD_EQUAL = $2E; // or + + {$EXTERNALSYM HID_USAGE_KEYBOARD_EQUAL} + HID_USAGE_KEYBOARD_LSQBRACKET = $2F; // or { + {$EXTERNALSYM HID_USAGE_KEYBOARD_LSQBRACKET} + HID_USAGE_KEYBOARD_RSQBRACKET = $30; // or } + {$EXTERNALSYM HID_USAGE_KEYBOARD_RSQBRACKET} + HID_USAGE_KEYBOARD_BACKSLASH = $31; // or | + {$EXTERNALSYM HID_USAGE_KEYBOARD_BACKSLASH} + HID_USAGE_KEYBOARD_HASHMARK2 = $32; // or ~ Non US Key + {$EXTERNALSYM HID_USAGE_KEYBOARD_HASHMARK2} + HID_USAGE_KEYBOARD_SEMICOLON = $33; + {$EXTERNALSYM HID_USAGE_KEYBOARD_SEMICOLON} + HID_USAGE_KEYBOARD_APOSTROPH = $34; // or : + {$EXTERNALSYM HID_USAGE_KEYBOARD_APOSTROPH} + HID_USAGE_KEYBOARD_GRAVEACCENT = $35; // or Tilde + {$EXTERNALSYM HID_USAGE_KEYBOARD_GRAVEACCENT} + HID_USAGE_KEYBOARD_COMMA = $36; // or < + {$EXTERNALSYM HID_USAGE_KEYBOARD_COMMA} + HID_USAGE_KEYBOARD_DOT = $37; // or > + {$EXTERNALSYM HID_USAGE_KEYBOARD_DOT} + HID_USAGE_KEYBOARD_SLASH = $38; // or ? + {$EXTERNALSYM HID_USAGE_KEYBOARD_SLASH} + + HID_USAGE_KEYBOARD_CAPS_LOCK = $39; + {$EXTERNALSYM HID_USAGE_KEYBOARD_CAPS_LOCK} + + // Function keys + HID_USAGE_KEYBOARD_F1 = $3A; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F1} + HID_USAGE_KEYBOARD_F2 = $3B; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F2} + HID_USAGE_KEYBOARD_F3 = $3C; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F3} + HID_USAGE_KEYBOARD_F4 = $3D; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F4} + HID_USAGE_KEYBOARD_F5 = $3E; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F5} + HID_USAGE_KEYBOARD_F6 = $3F; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F6} + HID_USAGE_KEYBOARD_F7 = $40; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F7} + HID_USAGE_KEYBOARD_F8 = $41; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F8} + HID_USAGE_KEYBOARD_F9 = $42; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F9} + HID_USAGE_KEYBOARD_F10 = $43; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F10} + HID_USAGE_KEYBOARD_F11 = $44; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F11} + HID_USAGE_KEYBOARD_F12 = $45; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F12} + + HID_USAGE_KEYBOARD_PRINT_SCREEN = $46; + {$EXTERNALSYM HID_USAGE_KEYBOARD_PRINT_SCREEN} + HID_USAGE_KEYBOARD_SCROLL_LOCK = $47; + {$EXTERNALSYM HID_USAGE_KEYBOARD_SCROLL_LOCK} + + HID_USAGE_KEYBOARD_PAUSE = $48; + {$EXTERNALSYM HID_USAGE_KEYBOARD_PAUSE} + HID_USAGE_KEYBOARD_INSERT = $49; + {$EXTERNALSYM HID_USAGE_KEYBOARD_INSERT} + HID_USAGE_KEYBOARD_HOME = $4A; + {$EXTERNALSYM HID_USAGE_KEYBOARD_HOME} + HID_USAGE_KEYBOARD_PAGEUP = $4B; + {$EXTERNALSYM HID_USAGE_KEYBOARD_PAGEUP} + HID_USAGE_KEYBOARD_DELETE = $4C; + {$EXTERNALSYM HID_USAGE_KEYBOARD_DELETE} + HID_USAGE_KEYBOARD_END = $4D; + {$EXTERNALSYM HID_USAGE_KEYBOARD_END} + HID_USAGE_KEYBOARD_PAGEDOWN = $4E; + {$EXTERNALSYM HID_USAGE_KEYBOARD_PAGEDOWN} + HID_USAGE_KEYBOARD_RIGHT = $4F; + {$EXTERNALSYM HID_USAGE_KEYBOARD_RIGHT} + HID_USAGE_KEYBOARD_LEFT = $50; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LEFT} + HID_USAGE_KEYBOARD_DOWN = $51; + {$EXTERNALSYM HID_USAGE_KEYBOARD_DOWN} + HID_USAGE_KEYBOARD_UP = $52; + {$EXTERNALSYM HID_USAGE_KEYBOARD_UP} + + HID_USAGE_KEYPAD_NUM_LOCK = $53; + {$EXTERNALSYM HID_USAGE_KEYPAD_NUM_LOCK} + HID_USAGE_KEYPAD_SLASH = $54; + {$EXTERNALSYM HID_USAGE_KEYPAD_SLASH} + HID_USAGE_KEYPAD_STAR = $55; + {$EXTERNALSYM HID_USAGE_KEYPAD_STAR} + HID_USAGE_KEYPAD_MINUS = $56; + {$EXTERNALSYM HID_USAGE_KEYPAD_MINUS} + HID_USAGE_KEYPAD_PLUS = $57; + {$EXTERNALSYM HID_USAGE_KEYPAD_PLUS} + HID_USAGE_KEYPAD_ENTER = $58; + {$EXTERNALSYM HID_USAGE_KEYPAD_ENTER} + HID_USAGE_KEYPAD_ONE = $59; + {$EXTERNALSYM HID_USAGE_KEYPAD_ONE} + HID_USAGE_KEYPAD_TWO = $5A; + {$EXTERNALSYM HID_USAGE_KEYPAD_TWO} + HID_USAGE_KEYPAD_THREE = $5B; + {$EXTERNALSYM HID_USAGE_KEYPAD_THREE} + HID_USAGE_KEYPAD_FOUR = $5C; + {$EXTERNALSYM HID_USAGE_KEYPAD_FOUR} + HID_USAGE_KEYPAD_FIVE = $5D; + {$EXTERNALSYM HID_USAGE_KEYPAD_FIVE} + HID_USAGE_KEYPAD_SIX = $5E; + {$EXTERNALSYM HID_USAGE_KEYPAD_SIX} + HID_USAGE_KEYPAD_SEVEN = $5F; + {$EXTERNALSYM HID_USAGE_KEYPAD_SEVEN} + HID_USAGE_KEYPAD_EIGHT = $60; + {$EXTERNALSYM HID_USAGE_KEYPAD_EIGHT} + HID_USAGE_KEYPAD_NINE = $61; + {$EXTERNALSYM HID_USAGE_KEYPAD_NINE} + HID_USAGE_KEYPAD_ZERO = $62; + {$EXTERNALSYM HID_USAGE_KEYPAD_ZERO} + HID_USAGE_KEYPAD_DOT = $63; + {$EXTERNALSYM HID_USAGE_KEYPAD_DOT} + + HID_USAGE_KEYBOARD_BACKSLASH2 = $64; // or | Non US key + {$EXTERNALSYM HID_USAGE_KEYBOARD_BACKSLASH2} + + HID_USAGE_KEYBOARD_APPLICATION = $65; + {$EXTERNALSYM HID_USAGE_KEYBOARD_APPLICATION} + + // Keys not for Windows + HID_USAGE_KEYBOARD_POWER = $66; + {$EXTERNALSYM HID_USAGE_KEYBOARD_POWER} + HID_USAGE_KEYPAD_EQUAL2 = $67; + {$EXTERNALSYM HID_USAGE_KEYPAD_EQUAL2} + + // Keys not for Windows + HID_USAGE_KEYBOARD_F13 = $68; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F13} + HID_USAGE_KEYBOARD_F14 = $69; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F14} + HID_USAGE_KEYBOARD_F15 = $6A; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F15} + HID_USAGE_KEYBOARD_F16 = $6B; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F16} + HID_USAGE_KEYBOARD_F17 = $6C; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F17} + HID_USAGE_KEYBOARD_F18 = $6D; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F18} + HID_USAGE_KEYBOARD_F19 = $6E; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F19} + HID_USAGE_KEYBOARD_F20 = $6F; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F20} + HID_USAGE_KEYBOARD_F21 = $70; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F21} + HID_USAGE_KEYBOARD_F22 = $71; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F22} + HID_USAGE_KEYBOARD_F23 = $72; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F23} + HID_USAGE_KEYBOARD_F24 = $73; + {$EXTERNALSYM HID_USAGE_KEYBOARD_F24} + HID_USAGE_KEYBOARD_EXECUTE = $74; + {$EXTERNALSYM HID_USAGE_KEYBOARD_EXECUTE} + HID_USAGE_KEYBOARD_HELP = $75; + {$EXTERNALSYM HID_USAGE_KEYBOARD_HELP} + HID_USAGE_KEYBOARD_MENU = $76; + {$EXTERNALSYM HID_USAGE_KEYBOARD_MENU} + HID_USAGE_KEYBOARD_SELECT = $77; + {$EXTERNALSYM HID_USAGE_KEYBOARD_SELECT} + HID_USAGE_KEYBOARD_STOP = $78; + {$EXTERNALSYM HID_USAGE_KEYBOARD_STOP} + HID_USAGE_KEYBOARD_AGAIN = $79; + {$EXTERNALSYM HID_USAGE_KEYBOARD_AGAIN} + HID_USAGE_KEYBOARD_UNDO = $7A; + {$EXTERNALSYM HID_USAGE_KEYBOARD_UNDO} + HID_USAGE_KEYBOARD_CUT = $7B; + {$EXTERNALSYM HID_USAGE_KEYBOARD_CUT} + HID_USAGE_KEYBOARD_COPY = $7C; + {$EXTERNALSYM HID_USAGE_KEYBOARD_COPY} + HID_USAGE_KEYBOARD_PASTE = $7D; + {$EXTERNALSYM HID_USAGE_KEYBOARD_PASTE} + HID_USAGE_KEYBOARD_FIND = $7E; + {$EXTERNALSYM HID_USAGE_KEYBOARD_FIND} + HID_USAGE_KEYBOARD_MUTE = $7F; + {$EXTERNALSYM HID_USAGE_KEYBOARD_MUTE} + HID_USAGE_KEYBOARD_VOLUME_UP = $80; + {$EXTERNALSYM HID_USAGE_KEYBOARD_VOLUME_UP} + HID_USAGE_KEYBOARD_VOLUME_DOWN = $81; + {$EXTERNALSYM HID_USAGE_KEYBOARD_VOLUME_DOWN} + + HID_USAGE_KEYBOARD_LOCKCAPS = $82; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LOCKCAPS} + HID_USAGE_KEYBOARD_LOCKNUM = $83; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LOCKNUM} + HID_USAGE_KEYBOARD_LOCKSCROLL = $84; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LOCKSCROLL} + + HID_USAGE_KEYPAD_COMMA = $85; + {$EXTERNALSYM HID_USAGE_KEYPAD_COMMA} + HID_USAGE_KEYPAD_EQUALSIGN = $86; + {$EXTERNALSYM HID_USAGE_KEYPAD_EQUALSIGN} + + HID_USAGE_KEYBOARD_INATL1 = $87; + {$EXTERNALSYM HID_USAGE_KEYBOARD_INATL1} + HID_USAGE_KEYBOARD_INATL2 = $88; + {$EXTERNALSYM HID_USAGE_KEYBOARD_INATL2} + HID_USAGE_KEYBOARD_INATL3 = $89; + {$EXTERNALSYM HID_USAGE_KEYBOARD_INATL3} + HID_USAGE_KEYBOARD_INATL4 = $8A; + {$EXTERNALSYM HID_USAGE_KEYBOARD_INATL4} + HID_USAGE_KEYBOARD_INATL5 = $8B; + {$EXTERNALSYM HID_USAGE_KEYBOARD_INATL5} + HID_USAGE_KEYBOARD_INATL6 = $8C; + {$EXTERNALSYM HID_USAGE_KEYBOARD_INATL6} + HID_USAGE_KEYBOARD_INATL7 = $8D; + {$EXTERNALSYM HID_USAGE_KEYBOARD_INATL7} + HID_USAGE_KEYBOARD_INATL8 = $8E; + {$EXTERNALSYM HID_USAGE_KEYBOARD_INATL8} + HID_USAGE_KEYBOARD_INATL9 = $8F; + {$EXTERNALSYM HID_USAGE_KEYBOARD_INATL9} + HID_USAGE_KEYBOARD_LANG1 = $90; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LANG1} + HID_USAGE_KEYBOARD_LANG2 = $91; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LANG2} + HID_USAGE_KEYBOARD_LANG3 = $92; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LANG3} + HID_USAGE_KEYBOARD_LANG4 = $93; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LANG4} + HID_USAGE_KEYBOARD_LANG5 = $94; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LANG5} + HID_USAGE_KEYBOARD_LANG6 = $95; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LANG6} + HID_USAGE_KEYBOARD_LANG7 = $96; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LANG7} + HID_USAGE_KEYBOARD_LANG8 = $97; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LANG8} + HID_USAGE_KEYBOARD_LANG9 = $98; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LANG9} + + HID_USAGE_KEYBOARD_ALTERASE = $99; + {$EXTERNALSYM HID_USAGE_KEYBOARD_ALTERASE} + HID_USAGE_KEYBOARD_SYSREQ = $9A; + {$EXTERNALSYM HID_USAGE_KEYBOARD_SYSREQ} + HID_USAGE_KEYBOARD_CANCEL = $9B; + {$EXTERNALSYM HID_USAGE_KEYBOARD_CANCEL} + HID_USAGE_KEYBOARD_CLEAR = $9C; + {$EXTERNALSYM HID_USAGE_KEYBOARD_CLEAR} + HID_USAGE_KEYBOARD_PRIOR = $9D; + {$EXTERNALSYM HID_USAGE_KEYBOARD_PRIOR} + HID_USAGE_KEYBOARD_RETURN = $9E; + {$EXTERNALSYM HID_USAGE_KEYBOARD_RETURN} + HID_USAGE_KEYBOARD_SEPARATOR = $9F; + {$EXTERNALSYM HID_USAGE_KEYBOARD_SEPARATOR} + HID_USAGE_KEYBOARD_OUT = $A0; + {$EXTERNALSYM HID_USAGE_KEYBOARD_OUT} + HID_USAGE_KEYBOARD_OPER = $A1; + {$EXTERNALSYM HID_USAGE_KEYBOARD_OPER} + HID_USAGE_KEYBOARD_CLEAR_AGAIN = $A2; + {$EXTERNALSYM HID_USAGE_KEYBOARD_CLEAR_AGAIN} + HID_USAGE_KEYBOARD_CRSEL = $A3; + {$EXTERNALSYM HID_USAGE_KEYBOARD_CRSEL} + HID_USAGE_KEYBOARD_EXSEL = $A4; + {$EXTERNALSYM HID_USAGE_KEYBOARD_EXSEL} + + HID_USAGE_KEYBOARD_LCTRL = $E0; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LCTRL} + HID_USAGE_KEYBOARD_LSHFT = $E1; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LSHFT} + HID_USAGE_KEYBOARD_LALT = $E2; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LALT} + HID_USAGE_KEYBOARD_LGUI = $E3; + {$EXTERNALSYM HID_USAGE_KEYBOARD_LGUI} + HID_USAGE_KEYBOARD_RCTRL = $E4; + {$EXTERNALSYM HID_USAGE_KEYBOARD_RCTRL} + HID_USAGE_KEYBOARD_RSHFT = $E5; + {$EXTERNALSYM HID_USAGE_KEYBOARD_RSHFT} + HID_USAGE_KEYBOARD_RALT = $E6; + {$EXTERNALSYM HID_USAGE_KEYBOARD_RALT} + HID_USAGE_KEYBOARD_RGUI = $E7; + {$EXTERNALSYM HID_USAGE_KEYBOARD_RGUI} + +// and hundreds more... + // (rom) $E8 to $FFFF are reserved in "USB HID Usage Tables 1.1rc3.pdf" + +// +// LED Page (0x08) +// + + HID_USAGE_LED_NUM_LOCK = $01; + {$EXTERNALSYM HID_USAGE_LED_NUM_LOCK} + HID_USAGE_LED_CAPS_LOCK = $02; + {$EXTERNALSYM HID_USAGE_LED_CAPS_LOCK} + HID_USAGE_LED_SCROLL_LOCK = $03; + {$EXTERNALSYM HID_USAGE_LED_SCROLL_LOCK} + HID_USAGE_LED_COMPOSE = $04; + {$EXTERNALSYM HID_USAGE_LED_COMPOSE} + HID_USAGE_LED_KANA = $05; + {$EXTERNALSYM HID_USAGE_LED_KANA} + HID_USAGE_LED_POWER = $06; + {$EXTERNALSYM HID_USAGE_LED_POWER} + HID_USAGE_LED_SHIFT = $07; + {$EXTERNALSYM HID_USAGE_LED_SHIFT} + HID_USAGE_LED_DO_NOT_DISTURB = $08; + {$EXTERNALSYM HID_USAGE_LED_DO_NOT_DISTURB} + HID_USAGE_LED_MUTE = $09; + {$EXTERNALSYM HID_USAGE_LED_MUTE} + HID_USAGE_LED_TONE_ENABLE = $0A; + {$EXTERNALSYM HID_USAGE_LED_TONE_ENABLE} + HID_USAGE_LED_HIGH_CUT_FILTER = $0B; + {$EXTERNALSYM HID_USAGE_LED_HIGH_CUT_FILTER} + HID_USAGE_LED_LOW_CUT_FILTER = $0C; + {$EXTERNALSYM HID_USAGE_LED_LOW_CUT_FILTER} + HID_USAGE_LED_EQUALIZER_ENABLE = $0D; + {$EXTERNALSYM HID_USAGE_LED_EQUALIZER_ENABLE} + HID_USAGE_LED_SOUND_FIELD_ON = $0E; + {$EXTERNALSYM HID_USAGE_LED_SOUND_FIELD_ON} + HID_USAGE_LED_SURROUND_FIELD_ON = $0F; + {$EXTERNALSYM HID_USAGE_LED_SURROUND_FIELD_ON} + HID_USAGE_LED_REPEAT = $10; + {$EXTERNALSYM HID_USAGE_LED_REPEAT} + HID_USAGE_LED_STEREO = $11; + {$EXTERNALSYM HID_USAGE_LED_STEREO} + HID_USAGE_LED_SAMPLING_RATE_DETECT = $12; + {$EXTERNALSYM HID_USAGE_LED_SAMPLING_RATE_DETECT} + HID_USAGE_LED_SPINNING = $13; + {$EXTERNALSYM HID_USAGE_LED_SPINNING} + HID_USAGE_LED_CAV = $14; + {$EXTERNALSYM HID_USAGE_LED_CAV} + HID_USAGE_LED_CLV = $15; + {$EXTERNALSYM HID_USAGE_LED_CLV} + HID_USAGE_LED_RECORDING_FORMAT_DET = $16; + {$EXTERNALSYM HID_USAGE_LED_RECORDING_FORMAT_DET} + HID_USAGE_LED_OFF_HOOK = $17; + {$EXTERNALSYM HID_USAGE_LED_OFF_HOOK} + HID_USAGE_LED_RING = $18; + {$EXTERNALSYM HID_USAGE_LED_RING} + HID_USAGE_LED_MESSAGE_WAITING = $19; + {$EXTERNALSYM HID_USAGE_LED_MESSAGE_WAITING} + HID_USAGE_LED_DATA_MODE = $1A; + {$EXTERNALSYM HID_USAGE_LED_DATA_MODE} + HID_USAGE_LED_BATTERY_OPERATION = $1B; + {$EXTERNALSYM HID_USAGE_LED_BATTERY_OPERATION} + HID_USAGE_LED_BATTERY_OK = $1C; + {$EXTERNALSYM HID_USAGE_LED_BATTERY_OK} + HID_USAGE_LED_BATTERY_LOW = $1D; + {$EXTERNALSYM HID_USAGE_LED_BATTERY_LOW} + HID_USAGE_LED_SPEAKER = $1E; + {$EXTERNALSYM HID_USAGE_LED_SPEAKER} + HID_USAGE_LED_HEAD_SET = $1F; + {$EXTERNALSYM HID_USAGE_LED_HEAD_SET} + HID_USAGE_LED_HOLD = $20; + {$EXTERNALSYM HID_USAGE_LED_HOLD} + HID_USAGE_LED_MICROPHONE = $21; + {$EXTERNALSYM HID_USAGE_LED_MICROPHONE} + HID_USAGE_LED_COVERAGE = $22; + {$EXTERNALSYM HID_USAGE_LED_COVERAGE} + HID_USAGE_LED_NIGHT_MODE = $23; + {$EXTERNALSYM HID_USAGE_LED_NIGHT_MODE} + HID_USAGE_LED_SEND_CALLS = $24; + {$EXTERNALSYM HID_USAGE_LED_SEND_CALLS} + HID_USAGE_LED_CALL_PICKUP = $25; + {$EXTERNALSYM HID_USAGE_LED_CALL_PICKUP} + HID_USAGE_LED_CONFERENCE = $26; + {$EXTERNALSYM HID_USAGE_LED_CONFERENCE} + HID_USAGE_LED_STAND_BY = $27; + {$EXTERNALSYM HID_USAGE_LED_STAND_BY} + HID_USAGE_LED_CAMERA_ON = $28; + {$EXTERNALSYM HID_USAGE_LED_CAMERA_ON} + HID_USAGE_LED_CAMERA_OFF = $29; + {$EXTERNALSYM HID_USAGE_LED_CAMERA_OFF} + HID_USAGE_LED_ON_LINE = $2A; + {$EXTERNALSYM HID_USAGE_LED_ON_LINE} + HID_USAGE_LED_OFF_LINE = $2B; + {$EXTERNALSYM HID_USAGE_LED_OFF_LINE} + HID_USAGE_LED_BUSY = $2C; + {$EXTERNALSYM HID_USAGE_LED_BUSY} + HID_USAGE_LED_READY = $2D; + {$EXTERNALSYM HID_USAGE_LED_READY} + HID_USAGE_LED_PAPER_OUT = $2E; + {$EXTERNALSYM HID_USAGE_LED_PAPER_OUT} + HID_USAGE_LED_PAPER_JAM = $2F; + {$EXTERNALSYM HID_USAGE_LED_PAPER_JAM} + HID_USAGE_LED_REMOTE = $30; + {$EXTERNALSYM HID_USAGE_LED_REMOTE} + HID_USAGE_LED_FORWARD = $31; + {$EXTERNALSYM HID_USAGE_LED_FORWARD} + HID_USAGE_LED_REVERSE = $32; + {$EXTERNALSYM HID_USAGE_LED_REVERSE} + HID_USAGE_LED_STOP = $33; + {$EXTERNALSYM HID_USAGE_LED_STOP} + HID_USAGE_LED_REWIND = $34; + {$EXTERNALSYM HID_USAGE_LED_REWIND} + HID_USAGE_LED_FAST_FORWARD = $35; + {$EXTERNALSYM HID_USAGE_LED_FAST_FORWARD} + HID_USAGE_LED_PLAY = $36; + {$EXTERNALSYM HID_USAGE_LED_PLAY} + HID_USAGE_LED_PAUSE = $37; + {$EXTERNALSYM HID_USAGE_LED_PAUSE} + HID_USAGE_LED_RECORD = $38; + {$EXTERNALSYM HID_USAGE_LED_RECORD} + HID_USAGE_LED_ERROR = $39; + {$EXTERNALSYM HID_USAGE_LED_ERROR} + HID_USAGE_LED_SELECTED_INDICATOR = $3A; + {$EXTERNALSYM HID_USAGE_LED_SELECTED_INDICATOR} + HID_USAGE_LED_IN_USE_INDICATOR = $3B; + {$EXTERNALSYM HID_USAGE_LED_IN_USE_INDICATOR} + HID_USAGE_LED_MULTI_MODE_INDICATOR = $3C; + {$EXTERNALSYM HID_USAGE_LED_MULTI_MODE_INDICATOR} + HID_USAGE_LED_INDICATOR_ON = $3D; + {$EXTERNALSYM HID_USAGE_LED_INDICATOR_ON} + HID_USAGE_LED_INDICATOR_FLASH = $3E; + {$EXTERNALSYM HID_USAGE_LED_INDICATOR_FLASH} + HID_USAGE_LED_INDICATOR_SLOW_BLINK = $3F; + {$EXTERNALSYM HID_USAGE_LED_INDICATOR_SLOW_BLINK} + HID_USAGE_LED_INDICATOR_FAST_BLINK = $40; + {$EXTERNALSYM HID_USAGE_LED_INDICATOR_FAST_BLINK} + HID_USAGE_LED_INDICATOR_OFF = $41; + {$EXTERNALSYM HID_USAGE_LED_INDICATOR_OFF} + HID_USAGE_LED_FLASH_ON_TIME = $42; + {$EXTERNALSYM HID_USAGE_LED_FLASH_ON_TIME} + HID_USAGE_LED_SLOW_BLINK_ON_TIME = $43; + {$EXTERNALSYM HID_USAGE_LED_SLOW_BLINK_ON_TIME} + HID_USAGE_LED_SLOW_BLINK_OFF_TIME = $44; + {$EXTERNALSYM HID_USAGE_LED_SLOW_BLINK_OFF_TIME} + HID_USAGE_LED_FAST_BLINK_ON_TIME = $45; + {$EXTERNALSYM HID_USAGE_LED_FAST_BLINK_ON_TIME} + HID_USAGE_LED_FAST_BLINK_OFF_TIME = $46; + {$EXTERNALSYM HID_USAGE_LED_FAST_BLINK_OFF_TIME} + HID_USAGE_LED_INDICATOR_COLOR = $47; + {$EXTERNALSYM HID_USAGE_LED_INDICATOR_COLOR} + HID_USAGE_LED_RED = $48; + {$EXTERNALSYM HID_USAGE_LED_RED} + HID_USAGE_LED_GREEN = $49; + {$EXTERNALSYM HID_USAGE_LED_GREEN} + HID_USAGE_LED_AMBER = $4A; + {$EXTERNALSYM HID_USAGE_LED_AMBER} + HID_USAGE_LED_GENERIC_INDICATOR = $4B; + {$EXTERNALSYM HID_USAGE_LED_GENERIC_INDICATOR} + HID_USAGE_LED_SYSTEM_SUSPEND = $4C; + {$EXTERNALSYM HID_USAGE_LED_SYSTEM_SUSPEND} + HID_USAGE_LED_EXTERNAL_POWER = $4D; + {$EXTERNALSYM HID_USAGE_LED_EXTERNAL_POWER} + +// +// Button Page (0x09) +// +// There is no need to label these usages. +// + + +// +// Ordinal Page (0x0A) +// +// There is no need to label these usages. +// + +// +// Telephony Device Page (0x0B) +// + + HID_USAGE_TELEPHONY_PHONE = $01; + {$EXTERNALSYM HID_USAGE_TELEPHONY_PHONE} + HID_USAGE_TELEPHONY_ANSWERING_MACHINE = $02; + {$EXTERNALSYM HID_USAGE_TELEPHONY_ANSWERING_MACHINE} + HID_USAGE_TELEPHONY_MESSAGE_CONTROLS = $03; + {$EXTERNALSYM HID_USAGE_TELEPHONY_MESSAGE_CONTROLS} + HID_USAGE_TELEPHONY_HANDSET = $04; + {$EXTERNALSYM HID_USAGE_TELEPHONY_HANDSET} + HID_USAGE_TELEPHONY_HEADSET = $05; + {$EXTERNALSYM HID_USAGE_TELEPHONY_HEADSET} + HID_USAGE_TELEPHONY_KEYPAD = $06; + {$EXTERNALSYM HID_USAGE_TELEPHONY_KEYPAD} + HID_USAGE_TELEPHONY_PROGRAMMABLE_BUTTON = $07; + {$EXTERNALSYM HID_USAGE_TELEPHONY_PROGRAMMABLE_BUTTON} + +// +// and others... +// + +implementation + +end. diff --git a/lib/HID/README.TXT b/lib/HID/README.TXT new file mode 100644 index 00000000..ce67071b --- /dev/null +++ b/lib/HID/README.TXT @@ -0,0 +1,80 @@ +Method GetPhysicalDescriptor has been replaced by string property +PhysicalDescriptor. +ReadFileEx and WriteFileEx implemented. HidOverlappedHandle, +NumOverlappedBuffers, OpenFileEx and CloseFileEx accompany +these new methods. +The internal access to the device registry entries +is now made with SetupDiGetDeviceRegistryProperty and +is therefore Win2K safe. +The property HardWareKey has been deleted because it is not +needed anymore. +DeviceStrings and LinkCollectionNodes have been changed +to indexed properties. Their base index now starts correctly with 1. +Two utility functions HidCheck and HidError have been added and +documented in the help. +Added NumCheckedInDevices, NumCheckedOutDevices and NumUnpluggedDevices. +Various small improvements and bugfixes. +----------------------------------------------------------------------------- +Bugfixes since last version: +The events are set to nil in the destructor. This prevents +strange problems with debugging. +The index of the DeviceStrings now corresponds with their index +when read in from the device. This now correctly represents +device strings with nonconsecutive indices. +DeviceIoControl has been added as a method. + +A new sample ReadWriteDemo has been added. +> This sample and its data is rigged to the www.lvr.com +> hid sample for the cypress evaluation board. +Bugfixes since last version: +PAS\HID.PAS: +All params like "Report: PChar" changed to "var Report" +This allows the use of buffers or records for the reports +without any compiler warnings. +DEMOS\HIDCLASS\HidControllerClass.pas: +Propagated the untyped Report params up to the methods. +Added ReadFile and WriteFile methods. +The list of the language names (LanguageStrings) has +been introduced. +Fixed the central function FillInList to correctly use +the SetupDi* functions. +Added an exception to TJvHidDeviceController to prevent +instanciating a second one. +Various minor fixes. Help file completed. +----------------------------------------------------------------------------- +Hid.pas is a conversion of HIDPI.H and HIDSDI.H since both function groups +reside in HID.DLL and HIDSDI.H includes HIDPI.H anyway. +I added HidD_Hello() to the conversion. +This is the undocumented easter egg function of HID.DLL. +See Hid.pas for details. + +HidToken.pas is a simple conversion of hidtoken.h. +It contains only consts and some converted checking macros. + +HidUsage.pas is a more than complete conversion from hidusage.h +The TUsage and PUsage types have been moved to Hid.pas. +This eliminates the need to include HidUsage.pas in all HID projects. +So HidToken.pas and HidUsage.pas are only needed in projects where +the named constants are needed. + +Some sets of constants have been completed (mainly keys). +The constants are for Usage, UsagePage and Usage values. +That is they describe the real data you will get from USB devices. + +For real information read "USB HID Usage Tables 1.1rc3.pdf" +or newer versions thereof from www.usb.org. + +I added some comments marked (rom) to clarify some things. +Changes from Windows 98 DDK to Windows 2000 DDK i marked (Win2000). +The new functions documented in the Windows 2000 DDK have been implemented +already in the HID.DLL of Windows 98 SE. +The function declarations are inside a {$IFDEF WIN2000}. + +You will need SetupApi.pas from the SetupApi conversion and DBT.pas from the DBT conversion. + +The component in Demos\HidClass gives you access to the complete HID API. +There is no need to use the functions directly. + +known issues: +some of the new constants in HidUsage.pas may be named incorrectly +as a german i do not know all the real english key names diff --git a/lib/HID/SetupApi.dcu b/lib/HID/SetupApi.dcu new file mode 100644 index 00000000..9a305f9b Binary files /dev/null and b/lib/HID/SetupApi.dcu differ diff --git a/lib/HID/SetupApi.pas b/lib/HID/SetupApi.pas new file mode 100644 index 00000000..cd83bab9 --- /dev/null +++ b/lib/HID/SetupApi.pas @@ -0,0 +1,4720 @@ +{******************************************************************} +{ } +{ Borland Delphi Runtime Library } +{ Setup and Device Installer API interface unit } +{ } +{ Portions created by Microsoft are } +{ Copyright (C) 1995-1999 Microsoft Corporation. } +{ All Rights Reserved. } +{ } +{ The original file is: setupapi.h, released March 1999. } +{ The original Pascal code is: SetupApi.pas, released 29 Jan 2000. } +{ The initial developer of the Pascal code is Robert Marquardt } +{ (robert_marquardt@gmx.de) } +{ } +{ Portions created by Robert Marquardt are } +{ Copyright (C) 1999 Robert Marquardt. } +{ } +{ Contributor(s): Marcel van Brakel (brakelm@bart.nl) } +{ } +{ Obtained through: } +{ Joint Endeavour of Delphi Innovators (Project JEDI) } +{ } +{ You may retrieve the latest version of this file at the Project } +{ JEDI home page, located at http://delphi-jedi.org } +{ } +{ The contents of this file are used with permission, subject to } +{ the Mozilla Public License Version 1.1 (the "License"); you may } +{ not use this file except in compliance with the License. You may } +{ obtain a copy of the License at } +{ http://www.mozilla.org/NPL/NPL-1_1Final.html } +{ } +{ Software distributed under the License is distributed on an } +{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or } +{ implied. See the License for the specific language governing } +{ rights and limitations under the License. } +{ } +{******************************************************************} + +unit SetupApi; + +{$WEAKPACKAGEUNIT} + +interface + +(*$HPPEMIT ''*) +(*$HPPEMIT '#include "setupapi.h"'*) +(*$HPPEMIT ''*) + +uses + Windows, Commctrl; + +type + PPWSTR = ^PWideChar; + PPASTR = ^PAnsiChar; + PPSTR = ^PChar; + PHICON = ^HICON; + ULONG_PTR = DWORD; + DWORD_PTR = DWORD; + UINT_PTR = DWORD; + +const + ANYSIZE_ARRAY = 1; + +// +// Define maximum string length constants as specified by +// Windows 95. +// +const + LINE_LEN = 256; // Win95-compatible maximum for displayable + {$EXTERNALSYM LINE_LEN} + // strings coming from a device INF. + MAX_INF_STRING_LENGTH = 4096; // Actual maximum size of an INF string + {$EXTERNALSYM MAX_INF_STRING_LENGTH} + // (including string substitutions). + MAX_TITLE_LEN = 60; + {$EXTERNALSYM MAX_TITLE_LEN} + MAX_INSTRUCTION_LEN = 256; + {$EXTERNALSYM MAX_INSTRUCTION_LEN} + MAX_LABEL_LEN = 30; + {$EXTERNALSYM MAX_LABEL_LEN} + MAX_SERVICE_NAME_LEN = 256; + {$EXTERNALSYM MAX_SERVICE_NAME_LEN} + MAX_SUBTITLE_LEN = 256; + {$EXTERNALSYM MAX_SUBTITLE_LEN} + +// +// Define maximum length of a machine name in the format expected by ConfigMgr32 +// CM_Connect_Machine (i.e., "\\\\MachineName\0"). +// + + SP_MAX_MACHINENAME_LENGTH = (MAX_PATH + 3); + {$EXTERNALSYM SP_MAX_MACHINENAME_LENGTH} + +// +// Define type for reference to loaded inf file +// + +type + HINF = Pointer; + {$EXTERNALSYM HINF} + +// +// Inf context structure. Applications must not interpret or +// overwrite values in these structures. +// + PInfContext = ^TInfContext; + _INFCONTEXT = packed record + Inf: Pointer; + CurrentInf: Pointer; + Section: UINT; + Line: UINT; + end; + {$EXTERNALSYM _INFCONTEXT} + TInfContext = _INFCONTEXT; + +// +// Inf file information structure. +// + PSPInfInformation = ^TSPInfInformation; + _SP_INF_INFORMATION = packed record + InfStyle: DWORD; + InfCount: DWORD; + VersionData: array [0..ANYSIZE_ARRAY - 1] of Byte; + end; + {$EXTERNALSYM _SP_INF_INFORMATION} + TSPInfInformation = _SP_INF_INFORMATION; + +// +// Define structure for passing alternate platform info into +// SetupSetFileQueueAlternatePlatform and SetupQueryInfOriginalFileInformation. +// + PSPAltPlatformInfo = ^TSPAltPlatformInfo; + _SP_ALTPLATFORM_INFO = packed record + cbSize: DWORD; + // + // platform to use (VER_PLATFORM_WIN32_WINDOWS or VER_PLATFORM_WIN32_NT) + // + Platform: DWORD; + // + // major and minor version numbers to use + // + MajorVersion: DWORD; + MinorVersion: DWORD; + // + // processor architecture to use (PROCESSOR_ARCHITECTURE_INTEL, + // PROCESSOR_ARCHITECTURE_ALPHA, PROCESSOR_ARCHITECTURE_IA64, or + // PROCESSOR_ARCHITECTURE_ALPHA64) + // + ProcessorArchitecture: Word; + Reserved: Word; // must be zero. + end; + {$EXTERNALSYM _SP_ALTPLATFORM_INFO} + TSPAltPlatformInfo = _SP_ALTPLATFORM_INFO; + +// +// Define structure that is filled in by SetupQueryInfOriginalFileInformation +// to indicate the INF's original name and the original name of the (potentially +// platform-specific) catalog file specified by that INF. +// + PSPOriginalFileInfoA = ^TSPOriginalFileInfoA; + PSPOriginalFileInfoW = ^TSPOriginalFileInfoW; + PSPOriginalFileInfo = PSPOriginalFileInfoA; + _SP_ORIGINAL_FILE_INFO_A = packed record + cbSize: DWORD; + OriginalInfName: array [0..MAX_PATH - 1] of AnsiChar; + OriginalCatalogName: array [0..MAX_PATH - 1] of AnsiChar; + end; + {$EXTERNALSYM _SP_ORIGINAL_FILE_INFO_A} + _SP_ORIGINAL_FILE_INFO_W = packed record + cbSize: DWORD; + OriginalInfName: array [0..MAX_PATH - 1] of WideChar; + OriginalCatalogName: array [0..MAX_PATH - 1] of WideChar; + end; + {$EXTERNALSYM _SP_ORIGINAL_FILE_INFO_W} + _SP_ORIGINAL_FILE_INFO_ = _SP_ORIGINAL_FILE_INFO_A; + TSPOriginalFileInfoA = _SP_ORIGINAL_FILE_INFO_A; + TSPOriginalFileInfoW = _SP_ORIGINAL_FILE_INFO_W; + TSPOriginalFileInfo = TSPOriginalFileInfoA; + +// +// SP_INF_INFORMATION.InfStyle values +// +const + INF_STYLE_NONE = $00000000; // unrecognized or non-existent + {$EXTERNALSYM INF_STYLE_NONE} + INF_STYLE_OLDNT = $00000001; // winnt 3.x + {$EXTERNALSYM INF_STYLE_OLDNT} + INF_STYLE_WIN4 = $00000002; // Win95 + {$EXTERNALSYM INF_STYLE_WIN4} + +// +// Additional InfStyle flags that may be specified when calling SetupOpenInfFile. +// +// + INF_STYLE_CACHE_ENABLE = $00000010; // always cache INF, even outside of %windir%\Inf + {$EXTERNALSYM INF_STYLE_CACHE_ENABLE} + INF_STYLE_CACHE_DISABLE = $00000020; // delete cached INF information + {$EXTERNALSYM INF_STYLE_CACHE_DISABLE} + +// +// Target directory specs. +// + DIRID_ABSOLUTE = DWORD(-1); // real 32-bit -1 + {$EXTERNALSYM DIRID_ABSOLUTE} + DIRID_ABSOLUTE_16BIT = $FFFF; // 16-bit -1 for compat w/setupx + {$EXTERNALSYM DIRID_ABSOLUTE_16BIT} + DIRID_NULL = 0; + {$EXTERNALSYM DIRID_NULL} + DIRID_SRCPATH = 1; + {$EXTERNALSYM DIRID_SRCPATH} + DIRID_WINDOWS = 10; + {$EXTERNALSYM DIRID_WINDOWS} + DIRID_SYSTEM = 11; // system32 + {$EXTERNALSYM DIRID_SYSTEM} + DIRID_DRIVERS = 12; + {$EXTERNALSYM DIRID_DRIVERS} + DIRID_IOSUBSYS = DIRID_DRIVERS; + {$EXTERNALSYM DIRID_IOSUBSYS} + DIRID_INF = 17; + {$EXTERNALSYM DIRID_INF} + DIRID_HELP = 18; + {$EXTERNALSYM DIRID_HELP} + DIRID_FONTS = 20; + {$EXTERNALSYM DIRID_FONTS} + DIRID_VIEWERS = 21; + {$EXTERNALSYM DIRID_VIEWERS} + DIRID_COLOR = 23; + {$EXTERNALSYM DIRID_COLOR} + DIRID_APPS = 24; + {$EXTERNALSYM DIRID_APPS} + DIRID_SHARED = 25; + {$EXTERNALSYM DIRID_SHARED} + DIRID_BOOT = 30; + {$EXTERNALSYM DIRID_BOOT} + + DIRID_SYSTEM16 = 50; + {$EXTERNALSYM DIRID_SYSTEM16} + DIRID_SPOOL = 51; + {$EXTERNALSYM DIRID_SPOOL} + DIRID_SPOOLDRIVERS = 52; + {$EXTERNALSYM DIRID_SPOOLDRIVERS} + DIRID_USERPROFILE = 53; + {$EXTERNALSYM DIRID_USERPROFILE} + DIRID_LOADER = 54; + {$EXTERNALSYM DIRID_LOADER} + DIRID_PRINTPROCESSOR = 55; + {$EXTERNALSYM DIRID_PRINTPROCESSOR} + + DIRID_DEFAULT = DIRID_SYSTEM; + {$EXTERNALSYM DIRID_DEFAULT} + +// +// The following DIRIDs are for commonly-used shell "special folders". The +// complete list of such folders is contained in shlobj.h. In that headerfile, +// each folder is assigned a CSIDL_* value. The DIRID values below are created +// by taking the CSIDL value in shlobj.h and OR'ing it with 0x4000. Thus, if +// an INF needs to reference other special folders not defined below, it may +// generate one using the above mechanism, and setupapi will automatically deal +// with it and use the corresponding shell's path where appropriate. (Remember +// that DIRIDs must be specified in decimal, not hex, in an INF when used for +// string substitution.) +// + DIRID_COMMON_STARTMENU = 16406; // All Users\Start Menu + {$EXTERNALSYM DIRID_COMMON_STARTMENU} + DIRID_COMMON_PROGRAMS = 16407; // All Users\Start Menu\Programs + {$EXTERNALSYM DIRID_COMMON_PROGRAMS} + DIRID_COMMON_STARTUP = 16408; // All Users\Start Menu\Programs\Startup + {$EXTERNALSYM DIRID_COMMON_STARTUP} + DIRID_COMMON_DESKTOPDIRECTORY = 16409; // All Users\Desktop + {$EXTERNALSYM DIRID_COMMON_DESKTOPDIRECTORY} + DIRID_COMMON_FAVORITES = 16415; // All Users\Favorites + {$EXTERNALSYM DIRID_COMMON_FAVORITES} + DIRID_COMMON_APPDATA = 16419; // All Users\Application Data + {$EXTERNALSYM DIRID_COMMON_APPDATA} + + DIRID_PROGRAM_FILES = 16422; // Program Files + {$EXTERNALSYM DIRID_PROGRAM_FILES} + DIRID_SYSTEM_X86 = 16425; // system32 on RISC + {$EXTERNALSYM DIRID_SYSTEM_X86} + DIRID_PROGRAM_FILES_X86 = 16426; // Program Files on RISC + {$EXTERNALSYM DIRID_PROGRAM_FILES_X86} + DIRID_PROGRAM_FILES_COMMON = 16427; // Program Files\Common + {$EXTERNALSYM DIRID_PROGRAM_FILES_COMMON} + DIRID_PROGRAM_FILES_COMMONX86 = 16428; // x86 Program Files\Common on RISC + {$EXTERNALSYM DIRID_PROGRAM_FILES_COMMONX86} + + DIRID_COMMON_TEMPLATES = 16429; // All Users\Templates + {$EXTERNALSYM DIRID_COMMON_TEMPLATES} + DIRID_COMMON_DOCUMENTS = 16430; // All Users\Documents + {$EXTERNALSYM DIRID_COMMON_DOCUMENTS} + +// +// First user-definable dirid. See SetupSetDirectoryId(). +// + DIRID_USER = $8000; + {$EXTERNALSYM DIRID_USER} + +// +// Setup callback notification routine type +// +type + TSPFileCallbackA = function (Context: Pointer; Notification: UINT; + Param1, Param2: UINT_PTR): UINT; stdcall; + TSPFileCallbackW = function (Context: Pointer; Notification: UINT; + Param1, Param2: UINT_PTR): UINT; stdcall; + TSPFileCallback = TSPFileCallbackA; + +// +// Operation/queue start/end notification. These are ordinal values. +// +const + SPFILENOTIFY_STARTQUEUE = $00000001; + {$EXTERNALSYM SPFILENOTIFY_STARTQUEUE} + SPFILENOTIFY_ENDQUEUE = $00000002; + {$EXTERNALSYM SPFILENOTIFY_ENDQUEUE} + SPFILENOTIFY_STARTSUBQUEUE = $00000003; + {$EXTERNALSYM SPFILENOTIFY_STARTSUBQUEUE} + SPFILENOTIFY_ENDSUBQUEUE = $00000004; + {$EXTERNALSYM SPFILENOTIFY_ENDSUBQUEUE} + SPFILENOTIFY_STARTDELETE = $00000005; + {$EXTERNALSYM SPFILENOTIFY_STARTDELETE} + SPFILENOTIFY_ENDDELETE = $00000006; + {$EXTERNALSYM SPFILENOTIFY_ENDDELETE} + SPFILENOTIFY_DELETEERROR = $00000007; + {$EXTERNALSYM SPFILENOTIFY_DELETEERROR} + SPFILENOTIFY_STARTRENAME = $00000008; + {$EXTERNALSYM SPFILENOTIFY_STARTRENAME} + SPFILENOTIFY_ENDRENAME = $00000009; + {$EXTERNALSYM SPFILENOTIFY_ENDRENAME} + SPFILENOTIFY_RENAMEERROR = $0000000a; + {$EXTERNALSYM SPFILENOTIFY_RENAMEERROR} + SPFILENOTIFY_STARTCOPY = $0000000b; + {$EXTERNALSYM SPFILENOTIFY_STARTCOPY} + SPFILENOTIFY_ENDCOPY = $0000000c; + {$EXTERNALSYM SPFILENOTIFY_ENDCOPY} + SPFILENOTIFY_COPYERROR = $0000000d; + {$EXTERNALSYM SPFILENOTIFY_COPYERROR} + SPFILENOTIFY_NEEDMEDIA = $0000000e; + {$EXTERNALSYM SPFILENOTIFY_NEEDMEDIA} + SPFILENOTIFY_QUEUESCAN = $0000000f; + {$EXTERNALSYM SPFILENOTIFY_QUEUESCAN} + +// +// These are used with SetupIterateCabinet(). +// + SPFILENOTIFY_CABINETINFO = $00000010; + {$EXTERNALSYM SPFILENOTIFY_CABINETINFO} + SPFILENOTIFY_FILEINCABINET = $00000011; + {$EXTERNALSYM SPFILENOTIFY_FILEINCABINET} + SPFILENOTIFY_NEEDNEWCABINET = $00000012; + {$EXTERNALSYM SPFILENOTIFY_NEEDNEWCABINET} + SPFILENOTIFY_FILEEXTRACTED = $00000013; + {$EXTERNALSYM SPFILENOTIFY_FILEEXTRACTED} + SPFILENOTIFY_FILEOPDELAYED = $00000014; + {$EXTERNALSYM SPFILENOTIFY_FILEOPDELAYED} + +// +// These are used for backup operations +// + SPFILENOTIFY_STARTBACKUP = $00000015; + {$EXTERNALSYM SPFILENOTIFY_STARTBACKUP} + SPFILENOTIFY_BACKUPERROR = $00000016; + {$EXTERNALSYM SPFILENOTIFY_BACKUPERROR} + SPFILENOTIFY_ENDBACKUP = $00000017; + {$EXTERNALSYM SPFILENOTIFY_ENDBACKUP} + +// +// Extended notification for SetupScanFileQueue(Flags=SPQ_SCAN_USE_CALLBACKEX) +// + SPFILENOTIFY_QUEUESCAN_EX = $00000018; + {$EXTERNALSYM SPFILENOTIFY_QUEUESCAN_EX} + +// +// Copy notification. These are bit flags that may be combined. +// + SPFILENOTIFY_LANGMISMATCH = $00010000; + {$EXTERNALSYM SPFILENOTIFY_LANGMISMATCH} + SPFILENOTIFY_TARGETEXISTS = $00020000; + {$EXTERNALSYM SPFILENOTIFY_TARGETEXISTS} + SPFILENOTIFY_TARGETNEWER = $00040000; + {$EXTERNALSYM SPFILENOTIFY_TARGETNEWER} + +// +// File operation codes and callback outcomes. +// + FILEOP_COPY = 0; + {$EXTERNALSYM FILEOP_COPY} + FILEOP_RENAME = 1; + {$EXTERNALSYM FILEOP_RENAME} + FILEOP_DELETE = 2; + {$EXTERNALSYM FILEOP_DELETE} + FILEOP_BACKUP = 3; + {$EXTERNALSYM FILEOP_BACKUP} + + FILEOP_ABORT = 0; + {$EXTERNALSYM FILEOP_ABORT} + FILEOP_DOIT = 1; + {$EXTERNALSYM FILEOP_DOIT} + FILEOP_SKIP = 2; + {$EXTERNALSYM FILEOP_SKIP} + FILEOP_RETRY = FILEOP_DOIT; + {$EXTERNALSYM FILEOP_RETRY} + FILEOP_NEWPATH = 4; + {$EXTERNALSYM FILEOP_NEWPATH} + +// +// Flags in inf copy sections +// + COPYFLG_WARN_IF_SKIP = $00000001; // warn if user tries to skip file + {$EXTERNALSYM COPYFLG_WARN_IF_SKIP} + COPYFLG_NOSKIP = $00000002; // disallow skipping this file + {$EXTERNALSYM COPYFLG_NOSKIP} + COPYFLG_NOVERSIONCHECK = $00000004; // ignore versions and overwrite target + {$EXTERNALSYM COPYFLG_NOVERSIONCHECK} + COPYFLG_FORCE_FILE_IN_USE = $00000008; // force file-in-use behavior + {$EXTERNALSYM COPYFLG_FORCE_FILE_IN_USE} + COPYFLG_NO_OVERWRITE = $00000010; // do not copy if file exists on target + {$EXTERNALSYM COPYFLG_NO_OVERWRITE} + COPYFLG_NO_VERSION_DIALOG = $00000020; // do not copy if target is newer + {$EXTERNALSYM COPYFLG_NO_VERSION_DIALOG} + COPYFLG_OVERWRITE_OLDER_ONLY = $00000040; // leave target alone if version same as source + {$EXTERNALSYM COPYFLG_OVERWRITE_OLDER_ONLY} + COPYFLG_REPLACEONLY = $00000400; // copy only if file exists on target + {$EXTERNALSYM COPYFLG_REPLACEONLY} + COPYFLG_NODECOMP = $00000800; // don't attempt to decompress file; copy as-is + {$EXTERNALSYM COPYFLG_NODECOMP} + COPYFLG_REPLACE_BOOT_FILE = $00001000; // file must be present upon reboot (i.e., it's + {$EXTERNALSYM COPYFLG_REPLACE_BOOT_FILE} // needed by the loader); this flag implies a reboot + COPYFLG_NOPRUNE = $00002000; // never prune this file + {$EXTERNALSYM COPYFLG_NOPRUNE} + +// +// Flags in inf delete sections +// New flags go in high word +// + DELFLG_IN_USE = $00000001; // queue in-use file for delete + {$EXTERNALSYM DELFLG_IN_USE} + DELFLG_IN_USE1 = $00010000; // high-word version of DELFLG_IN_USE + {$EXTERNALSYM DELFLG_IN_USE1} + +// +// Source and file paths. Used when notifying queue callback +// of SPFILENOTIFY_STARTxxx, SPFILENOTIFY_ENDxxx, and SPFILENOTIFY_xxxERROR. +// +type + PFilePathsA = ^TFilePathsA; + PFilePathsW = ^TFilePathsW; + PFilePaths = PFilePathsA; + _FILEPATHS_A = packed record + Target: PAnsiChar; + Source: PAnsiChar; // not used for delete operations + Win32Error: UINT; + Flags: DWORD; // such as SP_COPY_NOSKIP for copy errors + end; + {$EXTERNALSYM _FILEPATHS_A} + _FILEPATHS_W = packed record + Target: PWideChar; + Source: PWideChar; // not used for delete operations + Win32Error: UINT; + Flags: DWORD; // such as SP_COPY_NOSKIP for copy errors + end; + {$EXTERNALSYM _FILEPATHS_W} + _FILEPATHS_ = _FILEPATHS_A; + TFilePathsA = _FILEPATHS_A; + TFilePathsW = _FILEPATHS_W; + TFilePaths = TFilePathsA; + +// +// Structure used with SPFILENOTIFY_NEEDMEDIA +// + PSourceMediaA = ^TSourceMediaA; + PSourceMediaW = ^TSourceMediaW; + PSourceMedia = PSourceMediaA; + _SOURCE_MEDIA_A = packed record + Reserved: PAnsiChar; + Tagfile: PAnsiChar; // may be NULL + Description: PAnsiChar; + // + // Pathname part and filename part of source file + // that caused us to need the media. + // + SourcePath: PAnsiChar; + SourceFile: PAnsiChar; + Flags: DWORD; // subset of SP_COPY_xxx + end; + {$EXTERNALSYM _SOURCE_MEDIA_A} + _SOURCE_MEDIA_W = packed record + Reserved: PWideChar; + Tagfile: PWideChar; // may be NULL + Description: PWideChar; + // + // Pathname part and filename part of source file + // that caused us to need the media. + // + SourcePath: PWideChar; + SourceFile: PWideChar; + Flags: DWORD; // subset of SP_COPY_xxx + end; + {$EXTERNALSYM _SOURCE_MEDIA_W} + _SOURCE_MEDIA_ = _SOURCE_MEDIA_A; + TSourceMediaA = _SOURCE_MEDIA_A; + TSourceMediaW = _SOURCE_MEDIA_W; + TSourceMedia = TSourceMediaA; + +// +// Structure used with SPFILENOTIFY_CABINETINFO and +// SPFILENOTIFY_NEEDNEWCABINET +// + PCabinetInfoA = ^TCabinetInfoA; + PCabinetInfoW = ^TCabinetInfoW; + PCabinetInfo = PCabinetInfoA; + _CABINET_INFO_A = packed record + CabinetPath: PAnsiChar; + CabinetFile: PAnsiChar; + DiskName: PAnsiChar; + SetId: Word; + CabinetNumber: Word; + end; + {$EXTERNALSYM _CABINET_INFO_A} + _CABINET_INFO_W = packed record + CabinetPath: PWideChar; + CabinetFile: PWideChar; + DiskName: PWideChar; + SetId: Word; + CabinetNumber: Word; + end; + {$EXTERNALSYM _CABINET_INFO_W} + _CABINET_INFO_ = _CABINET_INFO_A; + TCabinetInfoA = _CABINET_INFO_A; + TCabinetInfoW = _CABINET_INFO_W; + TCabinetInfo = TCabinetInfoA; + +// +// Structure used with SPFILENOTIFY_FILEINCABINET +// + PFileInCabinetInfoA = ^TFileInCabinetInfoA; + PFileInCabinetInfoW = ^TFileInCabinetInfoW; + PFileInCabinetInfo = PFileInCabinetInfoA; + _FILE_IN_CABINET_INFO_A = packed record + NameInCabinet: PAnsiChar; + FileSize: DWORD; + Win32Error: DWORD; + DosDate: Word; + DosTime: Word; + DosAttribs: Word; + FullTargetName: array [0..MAX_PATH - 1] of AnsiChar; + end; + {$EXTERNALSYM _FILE_IN_CABINET_INFO_A} + _FILE_IN_CABINET_INFO_W = packed record + NameInCabinet: PWideChar; + FileSize: DWORD; + Win32Error: DWORD; + DosDate: Word; + DosTime: Word; + DosAttribs: Word; + FullTargetName: array [0..MAX_PATH - 1] of WideChar; + end; + {$EXTERNALSYM _FILE_IN_CABINET_INFO_W} + _FILE_IN_CABINET_INFO_ = _FILE_IN_CABINET_INFO_A; + TFileInCabinetInfoA = _FILE_IN_CABINET_INFO_A; + TFileInCabinetInfoW = _FILE_IN_CABINET_INFO_W; + TFileInCabinetInfo = TFileInCabinetInfoA; + +// +// Define type for setup file queue +// + HSPFILEQ = Pointer; + {$EXTERNALSYM HSPFILEQ} + +// +// Structure used with SetupQueueCopyIndirect +// + PSPFileCopyParamsA = ^TSPFileCopyParamsA; + PSPFileCopyParamsW = ^TSPFileCopyParamsW; + PSPFileCopyParams = PSPFileCopyParamsA; + _SP_FILE_COPY_PARAMS_A = packed record + cbSize: DWORD; + QueueHandle: HSPFILEQ; + SourceRootPath: PAnsiChar; + SourcePath: PAnsiChar; + SourceFilename: PAnsiChar; + SourceDescription: PAnsiChar; + SourceTagfile: PAnsiChar; + TargetDirectory: PAnsiChar; + TargetFilename: PAnsiChar; + CopyStyle: DWORD; + LayoutInf: HINF; + SecurityDescriptor: PAnsiChar; + end; + {$EXTERNALSYM _SP_FILE_COPY_PARAMS_A} + _SP_FILE_COPY_PARAMS_W = packed record + cbSize: DWORD; + QueueHandle: HSPFILEQ; + SourceRootPath: PWideChar; + SourcePath: PWideChar; + SourceFilename: PWideChar; + SourceDescription: PWideChar; + SourceTagfile: PWideChar; + TargetDirectory: PWideChar; + TargetFilename: PWideChar; + CopyStyle: DWORD; + LayoutInf: HINF; + SecurityDescriptor: PWideChar; + end; + {$EXTERNALSYM _SP_FILE_COPY_PARAMS_W} + _SP_FILE_COPY_PARAMS_ = _SP_FILE_COPY_PARAMS_A; + TSPFileCopyParamsA = _SP_FILE_COPY_PARAMS_A; + TSPFileCopyParamsW = _SP_FILE_COPY_PARAMS_W; + TSPFileCopyParams = TSPFileCopyParamsA; + +// +// Define type for setup disk space list +// + HDSKSPC = Pointer; + {$EXTERNALSYM HDSKSPC} + +// +// Define type for reference to device information set +// + HDEVINFO = Pointer; + {$EXTERNALSYM HDEVINFO} + +// +// Device information structure (references a device instance +// that is a member of a device information set) +// + PSPDevInfoData = ^TSPDevInfoData; + _SP_DEVINFO_DATA = packed record + cbSize: DWORD; + ClassGuid: TGUID; + DevInst: DWORD; // DEVINST handle + Reserved: ULONG_PTR; + end; + {$EXTERNALSYM _SP_DEVINFO_DATA} + TSPDevInfoData = _SP_DEVINFO_DATA; + +// +// Device interface information structure (references a device +// interface that is associated with the device information +// element that owns it). +// + PSPDeviceInterfaceData = ^TSPDeviceInterfaceData; + _SP_DEVICE_INTERFACE_DATA = packed record + cbSize: DWORD; + InterfaceClassGuid: TGUID; + Flags: DWORD; + Reserved: ULONG_PTR; + end; + {$EXTERNALSYM _SP_DEVICE_INTERFACE_DATA} + TSPDeviceInterfaceData = _SP_DEVICE_INTERFACE_DATA; + +// +// Flags for SP_DEVICE_INTERFACE_DATA.Flags field. +// +const + SPINT_ACTIVE = $00000001; + {$EXTERNALSYM SPINT_ACTIVE} + SPINT_DEFAULT = $00000002; + {$EXTERNALSYM SPINT_DEFAULT} + SPINT_REMOVED = $00000004; + {$EXTERNALSYM SPINT_REMOVED} + +// +// Backward compatibility--do not use. +// + +type + TSPInterfaceDeviceData = TSPDeviceInterfaceData; + PSPInterfaceDeviceData = PSPDeviceInterfaceData; + +const + SPID_ACTIVE = SPINT_ACTIVE; + {$EXTERNALSYM SPID_ACTIVE} + SPID_DEFAULT = SPINT_DEFAULT; + {$EXTERNALSYM SPID_DEFAULT} + SPID_REMOVED = SPINT_REMOVED; + {$EXTERNALSYM SPID_REMOVED} + +type + PSPDeviceInterfaceDetailDataA = ^TSPDeviceInterfaceDetailDataA; + PSPDeviceInterfaceDetailDataW = ^TSPDeviceInterfaceDetailDataW; + PSPDeviceInterfaceDetailData = PSPDeviceInterfaceDetailDataA; + _SP_DEVICE_INTERFACE_DETAIL_DATA_A = packed record + cbSize: DWORD; + DevicePath: array [0..ANYSIZE_ARRAY - 1] of AnsiChar; + end; + {$EXTERNALSYM _SP_DEVICE_INTERFACE_DETAIL_DATA_A} + _SP_DEVICE_INTERFACE_DETAIL_DATA_W = packed record + cbSize: DWORD; + DevicePath: array [0..ANYSIZE_ARRAY - 1] of WideChar; + end; + {$EXTERNALSYM _SP_DEVICE_INTERFACE_DETAIL_DATA_W} + _SP_DEVICE_INTERFACE_DETAIL_DATA_ = _SP_DEVICE_INTERFACE_DETAIL_DATA_A; + TSPDeviceInterfaceDetailDataA = _SP_DEVICE_INTERFACE_DETAIL_DATA_A; + TSPDeviceInterfaceDetailDataW = _SP_DEVICE_INTERFACE_DETAIL_DATA_W; + TSPDeviceInterfaceDetailData = TSPDeviceInterfaceDetailDataA; + +// +// Backward compatibility--do not use. +// + + TSPInterfaceDeviceDetailDataA = TSPDeviceInterfaceDetailDataA; + TSPInterfaceDeviceDetailDataW = TSPDeviceInterfaceDetailDataW; + TSPInterfaceDeviceDetailData = TSPInterfaceDeviceDetailDataA; + PSPInterfaceDeviceDetailDataA = PSPDeviceInterfaceDetailDataA; + PSPInterfaceDeviceDetailDataW = PSPDeviceInterfaceDetailDataW; + PSPInterfaceDeviceDetailData = PSPInterfaceDeviceDetailDataA; + +// +// Structure for detailed information on a device information set (used for +// SetupDiGetDeviceInfoListDetail which supercedes the functionality of +// SetupDiGetDeviceInfoListClass). +// + PSPDevInfoListDetailDataA = ^TSPDevInfoListDetailDataA; + PSPDevInfoListDetailDataW = ^TSPDevInfoListDetailDataW; + PSPDevInfoListDetailData = PSPDevInfoListDetailDataA; + _SP_DEVINFO_LIST_DETAIL_DATA_A = packed record + cbSize: DWORD; + ClassGuid: TGUID; + RemoteMachineHandle: THandle; + RemoteMachineName: array [0..SP_MAX_MACHINENAME_LENGTH - 1] of AnsiChar; + end; + {$EXTERNALSYM _SP_DEVINFO_LIST_DETAIL_DATA_A} + _SP_DEVINFO_LIST_DETAIL_DATA_W = packed record + cbSize: DWORD; + ClassGuid: TGUID; + RemoteMachineHandle: THandle; + RemoteMachineName: array [0..SP_MAX_MACHINENAME_LENGTH - 1] of WideChar; + end; + {$EXTERNALSYM _SP_DEVINFO_LIST_DETAIL_DATA_W} + _SP_DEVINFO_LIST_DETAIL_DATA_ = _SP_DEVINFO_LIST_DETAIL_DATA_A; + TSPDevInfoListDetailDataA = _SP_DEVINFO_LIST_DETAIL_DATA_A; + TSPDevInfoListDetailDataW = _SP_DEVINFO_LIST_DETAIL_DATA_W; + TSPDevInfoListDetailData = TSPDevInfoListDetailDataA; + +// +// Class installer function codes +// +const + DIF_SELECTDEVICE = $00000001; + {$EXTERNALSYM DIF_SELECTDEVICE} + DIF_INSTALLDEVICE = $00000002; + {$EXTERNALSYM DIF_INSTALLDEVICE} + DIF_ASSIGNRESOURCES = $00000003; + {$EXTERNALSYM DIF_ASSIGNRESOURCES} + DIF_PROPERTIES = $00000004; + {$EXTERNALSYM DIF_PROPERTIES} + DIF_REMOVE = $00000005; + {$EXTERNALSYM DIF_REMOVE} + DIF_FIRSTTIMESETUP = $00000006; + {$EXTERNALSYM DIF_FIRSTTIMESETUP} + DIF_FOUNDDEVICE = $00000007; + {$EXTERNALSYM DIF_FOUNDDEVICE} + DIF_SELECTCLASSDRIVERS = $00000008; + {$EXTERNALSYM DIF_SELECTCLASSDRIVERS} + DIF_VALIDATECLASSDRIVERS = $00000009; + {$EXTERNALSYM DIF_VALIDATECLASSDRIVERS} + DIF_INSTALLCLASSDRIVERS = $0000000A; + {$EXTERNALSYM DIF_INSTALLCLASSDRIVERS} + DIF_CALCDISKSPACE = $0000000B; + {$EXTERNALSYM DIF_CALCDISKSPACE} + DIF_DESTROYPRIVATEDATA = $0000000C; + {$EXTERNALSYM DIF_DESTROYPRIVATEDATA} + DIF_VALIDATEDRIVER = $0000000D; + {$EXTERNALSYM DIF_VALIDATEDRIVER} + DIF_MOVEDEVICE = $0000000E; + {$EXTERNALSYM DIF_MOVEDEVICE} + DIF_DETECT = $0000000F; + {$EXTERNALSYM DIF_DETECT} + DIF_INSTALLWIZARD = $00000010; + {$EXTERNALSYM DIF_INSTALLWIZARD} + DIF_DESTROYWIZARDDATA = $00000011; + {$EXTERNALSYM DIF_DESTROYWIZARDDATA} + DIF_PROPERTYCHANGE = $00000012; + {$EXTERNALSYM DIF_PROPERTYCHANGE} + DIF_ENABLECLASS = $00000013; + {$EXTERNALSYM DIF_ENABLECLASS} + DIF_DETECTVERIFY = $00000014; + {$EXTERNALSYM DIF_DETECTVERIFY} + DIF_INSTALLDEVICEFILES = $00000015; + {$EXTERNALSYM DIF_INSTALLDEVICEFILES} + DIF_UNREMOVE = $00000016; + {$EXTERNALSYM DIF_UNREMOVE} + DIF_SELECTBESTCOMPATDRV = $00000017; + {$EXTERNALSYM DIF_SELECTBESTCOMPATDRV} + DIF_ALLOW_INSTALL = $00000018; + {$EXTERNALSYM DIF_ALLOW_INSTALL} + DIF_REGISTERDEVICE = $00000019; + {$EXTERNALSYM DIF_REGISTERDEVICE} + DIF_NEWDEVICEWIZARD_PRESELECT = $0000001A; + {$EXTERNALSYM DIF_NEWDEVICEWIZARD_PRESELECT} + DIF_NEWDEVICEWIZARD_SELECT = $0000001B; + {$EXTERNALSYM DIF_NEWDEVICEWIZARD_SELECT} + DIF_NEWDEVICEWIZARD_PREANALYZE = $0000001C; + {$EXTERNALSYM DIF_NEWDEVICEWIZARD_PREANALYZE} + DIF_NEWDEVICEWIZARD_POSTANALYZE = $0000001D; + {$EXTERNALSYM DIF_NEWDEVICEWIZARD_POSTANALYZE} + DIF_NEWDEVICEWIZARD_FINISHINSTALL = $0000001E; + {$EXTERNALSYM DIF_NEWDEVICEWIZARD_FINISHINSTALL} + DIF_UNUSED1 = $0000001F; + {$EXTERNALSYM DIF_UNUSED1} + DIF_INSTALLINTERFACES = $00000020; + {$EXTERNALSYM DIF_INSTALLINTERFACES} + DIF_DETECTCANCEL = $00000021; + {$EXTERNALSYM DIF_DETECTCANCEL} + DIF_REGISTER_COINSTALLERS = $00000022; + {$EXTERNALSYM DIF_REGISTER_COINSTALLERS} + DIF_ADDPROPERTYPAGE_ADVANCED = $00000023; + {$EXTERNALSYM DIF_ADDPROPERTYPAGE_ADVANCED} + DIF_ADDPROPERTYPAGE_BASIC = $00000024; + {$EXTERNALSYM DIF_ADDPROPERTYPAGE_BASIC} + DIF_RESERVED1 = $00000025; + {$EXTERNALSYM DIF_RESERVED1} + DIF_TROUBLESHOOTER = $00000026; + {$EXTERNALSYM DIF_TROUBLESHOOTER} + DIF_POWERMESSAGEWAKE = $00000027; + {$EXTERNALSYM DIF_POWERMESSAGEWAKE} + +type + DI_FUNCTION = UINT; // Function type for device installer + {$EXTERNALSYM DI_FUNCTION} + +// +// Device installation parameters structure (associated with a +// particular device information element, or globally with a device +// information set) +// + PSPDevInstallParamsA = ^TSPDevInstallParamsA; + PSPDevInstallParamsW = ^TSPDevInstallParamsW; + PSPDevInstallParams = PSPDevInstallParamsA; + _SP_DEVINSTALL_PARAMS_A = packed record + cbSize: DWORD; + Flags: DWORD; + FlagsEx: DWORD; + hwndParent: HWND; + InstallMsgHandler: TSPFileCallback; + InstallMsgHandlerContext: Pointer; + FileQueue: HSPFILEQ; + ClassInstallReserved: ULONG_PTR; + Reserved: DWORD; + DriverPath: array [0..MAX_PATH - 1] of AnsiChar; + end; + {$EXTERNALSYM _SP_DEVINSTALL_PARAMS_A} + _SP_DEVINSTALL_PARAMS_W = packed record + cbSize: DWORD; + Flags: DWORD; + FlagsEx: DWORD; + hwndParent: HWND; + InstallMsgHandler: TSPFileCallback; + InstallMsgHandlerContext: Pointer; + FileQueue: HSPFILEQ; + ClassInstallReserved: ULONG_PTR; + Reserved: DWORD; + DriverPath: array [0..MAX_PATH - 1] of WideChar; + end; + {$EXTERNALSYM _SP_DEVINSTALL_PARAMS_W} + _SP_DEVINSTALL_PARAMS_ = _SP_DEVINSTALL_PARAMS_A; + TSPDevInstallParamsA = _SP_DEVINSTALL_PARAMS_A; + TSPDevInstallParamsW = _SP_DEVINSTALL_PARAMS_W; + TSPDevInstallParams = TSPDevInstallParamsA; + +// +// SP_DEVINSTALL_PARAMS.Flags values +// +// Flags for choosing a device +// +const + DI_SHOWOEM = $00000001; // support Other... button + {$EXTERNALSYM DI_SHOWOEM} + DI_SHOWCOMPAT = $00000002; // show compatibility list + {$EXTERNALSYM DI_SHOWCOMPAT} + DI_SHOWCLASS = $00000004; // show class list + {$EXTERNALSYM DI_SHOWCLASS} + DI_SHOWALL = $00000007; // both class & compat list shown + {$EXTERNALSYM DI_SHOWALL} + DI_NOVCP = $00000008; // don't create a new copy queue--use + {$EXTERNALSYM DI_NOVCP} // caller-supplied FileQueue + DI_DIDCOMPAT = $00000010; // Searched for compatible devices + {$EXTERNALSYM DI_DIDCOMPAT} + DI_DIDCLASS = $00000020; // Searched for class devices + {$EXTERNALSYM DI_DIDCLASS} + DI_AUTOASSIGNRES = $00000040; // No UI for resources if possible + {$EXTERNALSYM DI_AUTOASSIGNRES} + +// flags returned by DiInstallDevice to indicate need to reboot/restart + DI_NEEDRESTART = $00000080; // Reboot required to take effect + {$EXTERNALSYM DI_NEEDRESTART} + DI_NEEDREBOOT = $00000100; // "" + {$EXTERNALSYM DI_NEEDREBOOT} + +// flags for device installation + DI_NOBROWSE = $00000200; // no Browse... in InsertDisk + {$EXTERNALSYM DI_NOBROWSE} + +// Flags set by DiBuildDriverInfoList + DI_MULTMFGS = $00000400; // Set if multiple manufacturers in + {$EXTERNALSYM DI_MULTMFGS} // class driver list + +// Flag indicates that device is disabled + DI_DISABLED = $00000800; // Set if device disabled + {$EXTERNALSYM DI_DISABLED} + +// Flags for Device/Class Properties + DI_GENERALPAGE_ADDED = $00001000; + {$EXTERNALSYM DI_GENERALPAGE_ADDED} + DI_RESOURCEPAGE_ADDED = $00002000; + {$EXTERNALSYM DI_RESOURCEPAGE_ADDED} + +// Flag to indicate the setting properties for this Device (or class) caused a change +// so the Dev Mgr UI probably needs to be updatd. + DI_PROPERTIES_CHANGE = $00004000; + {$EXTERNALSYM DI_PROPERTIES_CHANGE} + +// Flag to indicate that the sorting from the INF file should be used. + DI_INF_IS_SORTED = $00008000; + {$EXTERNALSYM DI_INF_IS_SORTED} + +// Flag to indicate that only the the INF specified by SP_DEVINSTALL_PARAMS.DriverPath +// should be searched. + DI_ENUMSINGLEINF = $00010000; + {$EXTERNALSYM DI_ENUMSINGLEINF} + +// Flag that prevents ConfigMgr from removing/re-enumerating devices during device +// registration, installation, and deletion. + DI_DONOTCALLCONFIGMG = $00020000; + {$EXTERNALSYM DI_DONOTCALLCONFIGMG} + +// The following flag can be used to install a device disabled + DI_INSTALLDISABLED = $00040000; + {$EXTERNALSYM DI_INSTALLDISABLED} + +// Flag that causes SetupDiBuildDriverInfoList to build a device's compatible driver +// list from its existing class driver list, instead of the normal INF search. + DI_COMPAT_FROM_CLASS = $00080000; + {$EXTERNALSYM DI_COMPAT_FROM_CLASS} + +// This flag is set if the Class Install params should be used. + DI_CLASSINSTALLPARAMS = $00100000; + {$EXTERNALSYM DI_CLASSINSTALLPARAMS} + +// This flag is set if the caller of DiCallClassInstaller does NOT +// want the internal default action performed if the Class installer +// returns ERROR_DI_DO_DEFAULT. + DI_NODI_DEFAULTACTION = $00200000; + {$EXTERNALSYM DI_NODI_DEFAULTACTION} + +// The setupx flag, DI_NOSYNCPROCESSING (0x00400000L) is not support in the Setup APIs. + +// flags for device installation + DI_QUIETINSTALL = $00800000; // don't confuse the user with + {$EXTERNALSYM DI_QUIETINSTALL} // questions or excess info + DI_NOFILECOPY = $01000000; // No file Copy necessary + {$EXTERNALSYM DI_NOFILECOPY} + DI_FORCECOPY = $02000000; // Force files to be copied from install path + {$EXTERNALSYM DI_FORCECOPY} + DI_DRIVERPAGE_ADDED = $04000000; // Prop provider added Driver page. + {$EXTERNALSYM DI_DRIVERPAGE_ADDED} + DI_USECI_SELECTSTRINGS = $08000000; // Use Class Installer Provided strings in the Select Device Dlg + {$EXTERNALSYM DI_USECI_SELECTSTRINGS} + DI_OVERRIDE_INFFLAGS = $10000000; // Override INF flags + {$EXTERNALSYM DI_OVERRIDE_INFFLAGS} + DI_PROPS_NOCHANGEUSAGE = $20000000; // No Enable/Disable in General Props + {$EXTERNALSYM DI_PROPS_NOCHANGEUSAGE} + + DI_NOSELECTICONS = $40000000; // No small icons in select device dialogs + {$EXTERNALSYM DI_NOSELECTICONS} + + DI_NOWRITE_IDS = DWORD($80000000); // Don't write HW & Compat IDs on install + {$EXTERNALSYM DI_NOWRITE_IDS} + +// +// SP_DEVINSTALL_PARAMS.FlagsEx values +// + DI_FLAGSEX_USEOLDINFSEARCH = $00000001; // Inf Search functions should not use Index Search + {$EXTERNALSYM DI_FLAGSEX_USEOLDINFSEARCH} + DI_FLAGSEX_AUTOSELECTRANK0 = $00000002; // SetupDiSelectDevice doesn't prompt user if rank 0 match + {$EXTERNALSYM DI_FLAGSEX_AUTOSELECTRANK0} + DI_FLAGSEX_CI_FAILED = $00000004; // Failed to Load/Call class installer + {$EXTERNALSYM DI_FLAGSEX_CI_FAILED} + + DI_FLAGSEX_DIDINFOLIST = $00000010; // Did the Class Info List + {$EXTERNALSYM DI_FLAGSEX_DIDINFOLIST} + DI_FLAGSEX_DIDCOMPATINFO = $00000020; // Did the Compat Info List + {$EXTERNALSYM DI_FLAGSEX_DIDCOMPATINFO} + + DI_FLAGSEX_FILTERCLASSES = $00000040; + {$EXTERNALSYM DI_FLAGSEX_FILTERCLASSES} + DI_FLAGSEX_SETFAILEDINSTALL = $00000080; + {$EXTERNALSYM DI_FLAGSEX_SETFAILEDINSTALL} + DI_FLAGSEX_DEVICECHANGE = $00000100; + {$EXTERNALSYM DI_FLAGSEX_DEVICECHANGE} + DI_FLAGSEX_ALWAYSWRITEIDS = $00000200; + {$EXTERNALSYM DI_FLAGSEX_ALWAYSWRITEIDS} + DI_FLAGSEX_PROPCHANGE_PENDING = $00000400; // One or more device property sheets have had changes made + {$EXTERNALSYM DI_FLAGSEX_PROPCHANGE_PENDING} // to them, and need to have a DIF_PROPERTYCHANGE occur. + + DI_FLAGSEX_ALLOWEXCLUDEDDRVS = $00000800; + {$EXTERNALSYM DI_FLAGSEX_ALLOWEXCLUDEDDRVS} + DI_FLAGSEX_NOUIONQUERYREMOVE = $00001000; + {$EXTERNALSYM DI_FLAGSEX_NOUIONQUERYREMOVE} + DI_FLAGSEX_USECLASSFORCOMPAT = $00002000; // Use the device's class when building compat drv list. + {$EXTERNALSYM DI_FLAGSEX_USECLASSFORCOMPAT} // (Ignored if DI_COMPAT_FROM_CLASS flag is specified.) + DI_FLAGSEX_OLDINF_IN_CLASSLIST = $00004000; // Search legacy INFs when building class driver list. + {$EXTERNALSYM DI_FLAGSEX_OLDINF_IN_CLASSLIST} + DI_FLAGSEX_NO_DRVREG_MODIFY = $00008000; // Don't run AddReg and DelReg for device's software (driver) key. + {$EXTERNALSYM DI_FLAGSEX_NO_DRVREG_MODIFY} + DI_FLAGSEX_IN_SYSTEM_SETUP = $00010000; // Installation is occurring during initial system setup. + {$EXTERNALSYM DI_FLAGSEX_IN_SYSTEM_SETUP} + DI_FLAGSEX_INET_DRIVER = $00020000; // Driver came from Windows Update + {$EXTERNALSYM DI_FLAGSEX_INET_DRIVER} + DI_FLAGSEX_APPENDDRIVERLIST = $00040000; // Cause SetupDiBuildDriverInfoList to append + {$EXTERNALSYM DI_FLAGSEX_APPENDDRIVERLIST} // a new driver list to an existing list. + DI_FLAGSEX_PREINSTALLBACKUP = $00080000; // backup all files required by old inf before install + {$EXTERNALSYM DI_FLAGSEX_PREINSTALLBACKUP} + DI_FLAGSEX_BACKUPONREPLACE = $00100000; // backup files required by old inf as they are replaced + {$EXTERNALSYM DI_FLAGSEX_BACKUPONREPLACE} + DI_FLAGSEX_DRIVERLIST_FROM_URL = $00200000; // build driver list from INF(s) retrieved from URL specified + {$EXTERNALSYM DI_FLAGSEX_DRIVERLIST_FROM_URL} + // in SP_DEVINSTALL_PARAMS.DriverPath (empty string means + // Windows Update website) + DI_FLAGSEX_RESERVED1 = $00400000; + {$EXTERNALSYM DI_FLAGSEX_RESERVED1} + DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS = $00800000; // Don't include old Internet drivers when building + {$EXTERNALSYM DI_FLAGSEX_EXCLUDE_OLD_INET_DRIVERS} + // a driver list. + DI_FLAGSEX_POWERPAGE_ADDED = $01000000; // class installer added their own power page + {$EXTERNALSYM DI_FLAGSEX_POWERPAGE_ADDED} + +// +// Class installation parameters header. This must be the first field of any +// class install parameter structure. The InstallFunction field must be set to +// the function code corresponding to the structure, and the cbSize field must +// be set to the size of the header structure. E.g., +// +// SP_ENABLECLASS_PARAMS EnableClassParams; +// +// EnableClassParams.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER); +// EnableClassParams.ClassInstallHeader.InstallFunction = DIF_ENABLECLASS; +// +type + PSPClassInstallHeader = ^TSPClassInstallHeader; + _SP_CLASSINSTALL_HEADER = packed record + cbSize: DWORD; + InstallFunction: DI_FUNCTION; + end; + {$EXTERNALSYM _SP_CLASSINSTALL_HEADER} + TSPClassInstallHeader = _SP_CLASSINSTALL_HEADER; + +// +// Structure corresponding to a DIF_ENABLECLASS install function. +// + PSPEnableClassParams = ^TSPEnableClassParams; + _SP_ENABLECLASS_PARAMS = packed record + ClassInstallHeader: TSPClassInstallHeader; + ClassGuid: TGUID; + EnableMessage: DWORD; + end; + {$EXTERNALSYM _SP_ENABLECLASS_PARAMS} + TSPEnableClassParams = _SP_ENABLECLASS_PARAMS; + +const + ENABLECLASS_QUERY = 0; + {$EXTERNALSYM ENABLECLASS_QUERY} + ENABLECLASS_SUCCESS = 1; + {$EXTERNALSYM ENABLECLASS_SUCCESS} + ENABLECLASS_FAILURE = 2; + {$EXTERNALSYM ENABLECLASS_FAILURE} + +// +// Structure corresponding to a DIF_MOVEDEVICE install function. +// +type + PSPMoveDevParams = ^TSPMoveDevParams; + _SP_MOVEDEV_PARAMS = packed record + ClassInstallHeader: TSPClassInstallHeader; + SourceDeviceInfoData: TSPDevInfoData; + end; + {$EXTERNALSYM _SP_MOVEDEV_PARAMS} + TSPMoveDevParams = _SP_MOVEDEV_PARAMS; + +// +// Values indicating a change in a device's state +// +const + DICS_ENABLE = $00000001; + {$EXTERNALSYM DICS_ENABLE} + DICS_DISABLE = $00000002; + {$EXTERNALSYM DICS_DISABLE} + DICS_PROPCHANGE = $00000003; + {$EXTERNALSYM DICS_PROPCHANGE} + DICS_START = $00000004; + {$EXTERNALSYM DICS_START} + DICS_STOP = $00000005; + {$EXTERNALSYM DICS_STOP} + +// +// Values specifying the scope of a device property change +// + DICS_FLAG_GLOBAL = $00000001; // make change in all hardware profiles + {$EXTERNALSYM DICS_FLAG_GLOBAL} + DICS_FLAG_CONFIGSPECIFIC = $00000002; // make change in specified profile only + {$EXTERNALSYM DICS_FLAG_CONFIGSPECIFIC} + DICS_FLAG_CONFIGGENERAL = $00000004; // 1 or more hardware profile-specific + {$EXTERNALSYM DICS_FLAG_CONFIGGENERAL} // changes to follow. + +// +// Structure corresponding to a DIF_PROPERTYCHANGE install function. +// +type + PSPPropChangeParams = ^TSPPropChangeParams; + _SP_PROPCHANGE_PARAMS = packed record + ClassInstallHeader: TSPClassInstallHeader; + StateChange: DWORD; + Scope: DWORD; + HwProfile: DWORD; + end; + {$EXTERNALSYM _SP_PROPCHANGE_PARAMS} + TSPPropChangeParams = _SP_PROPCHANGE_PARAMS; + +// +// Structure corresponding to a DIF_REMOVE install function. +// + PSPRemoveDeviceParams = ^TSPRemoveDeviceParams; + _SP_REMOVEDEVICE_PARAMS = packed record + ClassInstallHeader: TSPClassInstallHeader; + Scope: DWORD; + HwProfile: DWORD; + end; + {$EXTERNALSYM _SP_REMOVEDEVICE_PARAMS} + TSPRemoveDeviceParams = _SP_REMOVEDEVICE_PARAMS; + +const + DI_REMOVEDEVICE_GLOBAL = $00000001; + {$EXTERNALSYM DI_REMOVEDEVICE_GLOBAL} + DI_REMOVEDEVICE_CONFIGSPECIFIC = $00000002; + {$EXTERNALSYM DI_REMOVEDEVICE_CONFIGSPECIFIC} + +// +// Structure corresponding to a DIF_UNREMOVE install function. +// +type + PSPUnremoveDeviceParams = ^TSPUnremoveDeviceParams; + _SP_UNREMOVEDEVICE_PARAMS = packed record + ClassInstallHeader: TSPClassInstallHeader; + Scope: DWORD; + HwProfile: DWORD; + end; + {$EXTERNALSYM _SP_UNREMOVEDEVICE_PARAMS} + TSPUnremoveDeviceParams = _SP_UNREMOVEDEVICE_PARAMS; + +const + DI_UNREMOVEDEVICE_CONFIGSPECIFIC = $00000002; + {$EXTERNALSYM DI_UNREMOVEDEVICE_CONFIGSPECIFIC} + +// +// Structure corresponding to a DIF_SELECTDEVICE install function. +// +type + PSPSelectDeviceParamsA = ^TSPSelectDeviceParamsA; + PSPSelectDeviceParamsW = ^TSPSelectDeviceParamsW; + PSPSelectDeviceParams = PSPSelectDeviceParamsA; + _SP_SELECTDEVICE_PARAMS_A = packed record + ClassInstallHeader: TSPClassInstallHeader; + Title: array [0..MAX_TITLE_LEN - 1] of AnsiChar; + Instructions: array [0..MAX_INSTRUCTION_LEN - 1] of AnsiChar; + ListLabel: array [0..MAX_LABEL_LEN - 1] of AnsiChar; + SubTitle: array [0..MAX_SUBTITLE_LEN - 1] of AnsiChar; + Reserved: array [0..1] of Byte; // DWORD size alignment + end; + {$EXTERNALSYM _SP_SELECTDEVICE_PARAMS_A} + _SP_SELECTDEVICE_PARAMS_W = packed record + ClassInstallHeader: TSPClassInstallHeader; + Title: array [0..MAX_TITLE_LEN - 1] of WideChar; + Instructions: array [0..MAX_INSTRUCTION_LEN - 1] of WideChar; + ListLabel: array [0..MAX_LABEL_LEN - 1] of WideChar; + SubTitle: array [0..MAX_SUBTITLE_LEN - 1] of WideChar; + Reserved: array [0..1] of Byte; // DWORD size alignment + end; + {$EXTERNALSYM _SP_SELECTDEVICE_PARAMS_W} + _SP_SELECTDEVICE_PARAMS_ = _SP_SELECTDEVICE_PARAMS_A; + TSPSelectdeviceParamsA = _SP_SELECTDEVICE_PARAMS_A; + TSPSelectdeviceParamsW = _SP_SELECTDEVICE_PARAMS_W; + TSPSelectdeviceParams = TSPSelectdeviceParamsA; + +// +// Callback routine for giving progress notification during detection +// + PDetectProgressNotify = function (ProgressNotifyParam: Pointer; DetectComplete: DWORD): BOOL; stdcall; + +// where: +// ProgressNotifyParam - value supplied by caller requesting detection. +// DetectComplete - Percent completion, to be incremented by class +// installer, as it steps thru its detection. +// +// Return Value - If TRUE, then detection is cancelled. Allows caller +// requesting detection to stop detection asap. +// + +// +// Structure corresponding to a DIF_DETECT install function. +// + PSPDetectDeviceParams = ^TSPDetectDeviceParams; + _SP_DETECTDEVICE_PARAMS = packed record + ClassInstallHeader: TSPClassInstallHeader; + DetectProgressNotify: PDetectProgressNotify; + ProgressNotifyParam: Pointer; + end; + {$EXTERNALSYM _SP_DETECTDEVICE_PARAMS} + TSPDetectDeviceParams = _SP_DETECTDEVICE_PARAMS; + +// +// 'Add New Device' installation wizard structure (backward-compatibility +// only--respond to DIF_NEWDEVICEWIZARD_* requests instead). +// +// Structure corresponding to a DIF_INSTALLWIZARD install function. +// (NOTE: This structure is also applicable for DIF_DESTROYWIZARDDATA, +// but DIF_INSTALLWIZARD is the associated function code in the class +// installation parameter structure in both cases.) +// +// Define maximum number of dynamic wizard pages that can be added to +// hardware install wizard. +// +const + MAX_INSTALLWIZARD_DYNAPAGES = 20; + {$EXTERNALSYM MAX_INSTALLWIZARD_DYNAPAGES} + +type + PSPInstallWizardData = ^TSPInstallWizardData; + _SP_INSTALLWIZARD_DATA = packed record + ClassInstallHeader: TSPClassInstallHeader; + Flags: DWORD; + DynamicPages: array [0..MAX_INSTALLWIZARD_DYNAPAGES - 1] of HPROPSHEETPAGE; + NumDynamicPages: DWORD; + DynamicPageFlags: DWORD; + PrivateFlags: DWORD; + PrivateData: LPARAM; + hwndWizardDlg: HWND; + end; + {$EXTERNALSYM _SP_INSTALLWIZARD_DATA} + TSPInstallWizardData = _SP_INSTALLWIZARD_DATA; + +// +// SP_INSTALLWIZARD_DATA.Flags values +// +const + NDW_INSTALLFLAG_DIDFACTDEFS = $00000001; + {$EXTERNALSYM NDW_INSTALLFLAG_DIDFACTDEFS} + NDW_INSTALLFLAG_HARDWAREALLREADYIN = $00000002; + {$EXTERNALSYM NDW_INSTALLFLAG_HARDWAREALLREADYIN} + NDW_INSTALLFLAG_NEEDRESTART = DI_NEEDRESTART; + {$EXTERNALSYM NDW_INSTALLFLAG_NEEDRESTART} + NDW_INSTALLFLAG_NEEDREBOOT = DI_NEEDREBOOT; + {$EXTERNALSYM NDW_INSTALLFLAG_NEEDREBOOT} + NDW_INSTALLFLAG_NEEDSHUTDOWN = $00000200; + {$EXTERNALSYM NDW_INSTALLFLAG_NEEDSHUTDOWN} + NDW_INSTALLFLAG_EXPRESSINTRO = $00000400; + {$EXTERNALSYM NDW_INSTALLFLAG_EXPRESSINTRO} + NDW_INSTALLFLAG_SKIPISDEVINSTALLED = $00000800; + {$EXTERNALSYM NDW_INSTALLFLAG_SKIPISDEVINSTALLED} + NDW_INSTALLFLAG_NODETECTEDDEVS = $00001000; + {$EXTERNALSYM NDW_INSTALLFLAG_NODETECTEDDEVS} + NDW_INSTALLFLAG_INSTALLSPECIFIC = $00002000; + {$EXTERNALSYM NDW_INSTALLFLAG_INSTALLSPECIFIC} + NDW_INSTALLFLAG_SKIPCLASSLIST = $00004000; + {$EXTERNALSYM NDW_INSTALLFLAG_SKIPCLASSLIST} + NDW_INSTALLFLAG_CI_PICKED_OEM = $00008000; + {$EXTERNALSYM NDW_INSTALLFLAG_CI_PICKED_OEM} + NDW_INSTALLFLAG_PCMCIAMODE = $00010000; + {$EXTERNALSYM NDW_INSTALLFLAG_PCMCIAMODE} + NDW_INSTALLFLAG_PCMCIADEVICE = $00020000; + {$EXTERNALSYM NDW_INSTALLFLAG_PCMCIADEVICE} + NDW_INSTALLFLAG_USERCANCEL = $00040000; + {$EXTERNALSYM NDW_INSTALLFLAG_USERCANCEL} + NDW_INSTALLFLAG_KNOWNCLASS = $00080000; + {$EXTERNALSYM NDW_INSTALLFLAG_KNOWNCLASS} + +// +// SP_INSTALLWIZARD_DATA.DynamicPageFlags values +// +// This flag is set if a Class installer has added pages to the install wizard. +// + DYNAWIZ_FLAG_PAGESADDED = $00000001; + {$EXTERNALSYM DYNAWIZ_FLAG_PAGESADDED} + +// +// Set this flag if you jump to the analyze page, and want it to +// handle conflicts for you. NOTE. You will not get control back +// in the event of a conflict if you set this flag. +// + DYNAWIZ_FLAG_ANALYZE_HANDLECONFLICT = $00000008; + {$EXTERNALSYM DYNAWIZ_FLAG_ANALYZE_HANDLECONFLICT} + +// +// The following flags are not used by the Windows NT hardware wizard. +// + DYNAWIZ_FLAG_INSTALLDET_NEXT = $00000002; + {$EXTERNALSYM DYNAWIZ_FLAG_INSTALLDET_NEXT} + DYNAWIZ_FLAG_INSTALLDET_PREV = $00000004; + {$EXTERNALSYM DYNAWIZ_FLAG_INSTALLDET_PREV} + +// +// Reserve a range of wizard page resource IDs for internal use. Some of +// these IDs are for use by class installers that respond to the obsolete +// DIF_INSTALLWIZARD/DIF_DESTROYWIZARDDATA messages. These IDs are listed +// below. +// + MIN_IDD_DYNAWIZ_RESOURCE_ID = 10000; + {$EXTERNALSYM MIN_IDD_DYNAWIZ_RESOURCE_ID} + MAX_IDD_DYNAWIZ_RESOURCE_ID = 11000; + {$EXTERNALSYM MAX_IDD_DYNAWIZ_RESOURCE_ID} + +// +// Define wizard page resource IDs to be used when adding custom pages to the +// hardware install wizard via DIF_INSTALLWIZARD. Pages marked with +// (CLASS INSTALLER PROVIDED) _must_ be supplied by the class installer if it +// responds to the DIF_INSTALLWIZARD request. +// + +// +// Resource ID for the first page that the install wizard will go to after +// adding the class installer pages. (CLASS INSTALLER PROVIDED) +// + IDD_DYNAWIZ_FIRSTPAGE = 10000; + {$EXTERNALSYM IDD_DYNAWIZ_FIRSTPAGE} + +// +// Resource ID for the page that the Select Device page will go back to. +// (CLASS INSTALLER PROVIDED) +// + IDD_DYNAWIZ_SELECT_PREVPAGE = 10001; + {$EXTERNALSYM IDD_DYNAWIZ_SELECT_PREVPAGE} + +// +// Resource ID for the page that the Select Device page will go forward to. +// (CLASS INSTALLER PROVIDED) +// + IDD_DYNAWIZ_SELECT_NEXTPAGE = 10002; + {$EXTERNALSYM IDD_DYNAWIZ_SELECT_NEXTPAGE} + +// +// Resource ID for the page that the Analyze dialog should go back to +// This will only be used in the event that there is a problem, and the user +// selects Back from the analyze proc. (CLASS INSTALLER PROVIDED) +// + IDD_DYNAWIZ_ANALYZE_PREVPAGE = 10003; + {$EXTERNALSYM IDD_DYNAWIZ_ANALYZE_PREVPAGE} + +// +// Resource ID for the page that the Analyze dialog should go to if it +// continues from the analyze proc. (CLASS INSTALLER PROVIDED) +// + IDD_DYNAWIZ_ANALYZE_NEXTPAGE = 10004; + {$EXTERNALSYM IDD_DYNAWIZ_ANALYZE_NEXTPAGE} + +// +// Resource ID of the hardware install wizard's select device page. +// This ID can be used to go directly to the hardware install wizard's select +// device page. (This is the resource ID of the Select Device wizard page +// retrieved via SetupDiGetWizardPage when SPWPT_SELECTDEVICE is the requested +// PageType.) +// + IDD_DYNAWIZ_SELECTDEV_PAGE = 10009; + {$EXTERNALSYM IDD_DYNAWIZ_SELECTDEV_PAGE} + +// +// Resource ID of the hardware install wizard's device analysis page. +// This ID can be use to go directly to the hardware install wizard's analysis +// page. +// + IDD_DYNAWIZ_ANALYZEDEV_PAGE = 10010; + {$EXTERNALSYM IDD_DYNAWIZ_ANALYZEDEV_PAGE} + +// +// Resource ID of the hardware install wizard's install detected devices page. +// This ID can be use to go directly to the hardware install wizard's install +// detected devices page. +// + IDD_DYNAWIZ_INSTALLDETECTEDDEVS_PAGE = 10011; + {$EXTERNALSYM IDD_DYNAWIZ_INSTALLDETECTEDDEVS_PAGE} + +// +// Resource ID of the hardware install wizard's select class page. +// This ID can be use to go directly to the hardware install wizard's select +// class page. +// + IDD_DYNAWIZ_SELECTCLASS_PAGE = 10012; + {$EXTERNALSYM IDD_DYNAWIZ_SELECTCLASS_PAGE} + +// +// The following class installer-provided wizard page resource IDs are not used +// by the Windows NT hardware wizard. +// + IDD_DYNAWIZ_INSTALLDETECTED_PREVPAGE = 10006; + {$EXTERNALSYM IDD_DYNAWIZ_INSTALLDETECTED_PREVPAGE} + IDD_DYNAWIZ_INSTALLDETECTED_NEXTPAGE = 10007; + {$EXTERNALSYM IDD_DYNAWIZ_INSTALLDETECTED_NEXTPAGE} + IDD_DYNAWIZ_INSTALLDETECTED_NODEVS = 10008; + {$EXTERNALSYM IDD_DYNAWIZ_INSTALLDETECTED_NODEVS} + +// +// Structure corresponding to the following DIF_NEWDEVICEWIZARD_* install +// functions: +// +// DIF_NEWDEVICEWIZARD_PRESELECT +// DIF_NEWDEVICEWIZARD_SELECT +// DIF_NEWDEVICEWIZARD_PREANALYZE +// DIF_NEWDEVICEWIZARD_POSTANALYZE +// DIF_NEWDEVICEWIZARD_FINISHINSTALL +// +type + PSPNewDeviceWizardData = ^TSPNewDeviceWizardData; + _SP_NEWDEVICEWIZARD_DATA = packed record + ClassInstallHeader: TSPClassInstallHeader; + Flags: DWORD; // presently unused--must be zero. + DynamicPages: array [0..MAX_INSTALLWIZARD_DYNAPAGES - 1] of HPROPSHEETPAGE; + NumDynamicPages: DWORD; + hwndWizardDlg: HWND; + end; + {$EXTERNALSYM _SP_NEWDEVICEWIZARD_DATA} + TSPNewDeviceWizardData = _SP_NEWDEVICEWIZARD_DATA; + +// +// Structure corresponding to the DIF_TROUBLESHOOTER install function +// + PSPTroubleShooterParamsA = ^TSPTroubleShooterParamsA; + PSPTroubleShooterParamsW = ^TSPTroubleShooterParamsW; + PSPTroubleShooterParams = PSPTroubleShooterParamsA; + _SP_TROUBLESHOOTER_PARAMS_A = packed record + ClassInstallHeader: TSPClassInstallHeader; + ChmFile: array [0..MAX_PATH - 1] of AnsiChar; + HtmlTroubleShooter: array [0..MAX_PATH - 1] of AnsiChar; + end; + {$EXTERNALSYM _SP_TROUBLESHOOTER_PARAMS_A} + _SP_TROUBLESHOOTER_PARAMS_W = packed record + ClassInstallHeader: TSPClassInstallHeader; + ChmFile: array [0..MAX_PATH - 1] of WideChar; + HtmlTroubleShooter: array [0..MAX_PATH - 1] of WideChar; + end; + {$EXTERNALSYM _SP_TROUBLESHOOTER_PARAMS_W} + _SP_TROUBLESHOOTER_PARAMS_ = _SP_TROUBLESHOOTER_PARAMS_A; + TSPTroubleShooterParamsA = _SP_TROUBLESHOOTER_PARAMS_A; + TSPTroubleShooterParamsW = _SP_TROUBLESHOOTER_PARAMS_W; + TSPTroubleShooterParams = TSPTroubleShooterParamsA; + +// +// Structure corresponding to the DIF_POWERMESSAGEWAKE install function +// + PSPPowerMessageWakeParamsA = ^TSPPowerMessageWakeParamsA; + PSPPowerMessageWakeParamsW = ^TSPPowerMessageWakeParamsW; + PSPPowerMessageWakeParams = PSPPowerMessageWakeParamsA; + _SP_POWERMESSAGEWAKE_PARAMS_A = packed record + ClassInstallHeader: TSPClassInstallHeader; + PowerMessageWake: array [0..(LINE_LEN * 2) - 1] of AnsiChar; + end; + {$EXTERNALSYM _SP_POWERMESSAGEWAKE_PARAMS_A} + _SP_POWERMESSAGEWAKE_PARAMS_W = packed record + ClassInstallHeader: TSPClassInstallHeader; + PowerMessageWake: array [0..(LINE_LEN * 2) - 1] of WideChar; + end; + {$EXTERNALSYM _SP_POWERMESSAGEWAKE_PARAMS_W} + _SP_POWERMESSAGEWAKE_PARAMS_ = _SP_POWERMESSAGEWAKE_PARAMS_A; + TSPPowerMessageWakeParamsA = _SP_POWERMESSAGEWAKE_PARAMS_A; + TSPPowerMessageWakeParamsW = _SP_POWERMESSAGEWAKE_PARAMS_W; + TSPPowerMessageWakeParams = TSPPowerMessageWakeParamsA; + +// +// Driver information structure (member of a driver info list that may be associated +// with a particular device instance, or (globally) with a device information set) +// + PSPDrvInfoDataV2A = ^TSPDrvInfoDataV2A; + PSPDrvInfoDataV2W = ^TSPDrvInfoDataV2W; + PSPDrvInfoDataV2 = PSPDrvInfoDataV2A; + _SP_DRVINFO_DATA_V2_A = packed record + cbSize: DWORD; + DriverType: DWORD; + Reserved: ULONG_PTR; + Description: array [0..LINE_LEN - 1] of AnsiChar; + MfgName: array [0..LINE_LEN - 1] of AnsiChar; + ProviderName: array [0..LINE_LEN - 1] of AnsiChar; + DriverDate: TFileTime; + DriverVersion: Int64; + end; + {$EXTERNALSYM _SP_DRVINFO_DATA_V2_A} + _SP_DRVINFO_DATA_V2_W = packed record + cbSize: DWORD; + DriverType: DWORD; + Reserved: ULONG_PTR; + Description: array [0..LINE_LEN - 1] of WideChar; + MfgName: array [0..LINE_LEN - 1] of WideChar; + ProviderName: array [0..LINE_LEN - 1] of WideChar; + DriverDate: TFileTime; + DriverVersion: Int64; + end; + {$EXTERNALSYM _SP_DRVINFO_DATA_V2_W} + _SP_DRVINFO_DATA_V2_ = _SP_DRVINFO_DATA_V2_A; + TSPDrvInfoDataV2A = _SP_DRVINFO_DATA_V2_A; + TSPDrvInfoDataV2W = _SP_DRVINFO_DATA_V2_W; + TSPDrvInfoDataV2 = TSPDrvInfoDataV2A; + +// +// Version 1 of the SP_DRVINFO_DATA structures, used only for compatibility +// with Windows NT 4.0/Windows 95/98 SETUPAPI.DLL +// + PSPDrvInfoDataV1A = ^TSPDrvInfoDataV1A; + PSPDrvInfoDataV1W = ^TSPDrvInfoDataV1W; + PSPDrvInfoDataV1 = PSPDrvInfoDataV1A; + _SP_DRVINFO_DATA_V1_A = packed record + cbSize: DWORD; + DriverType: DWORD; + Reserved: ULONG_PTR; + Description: array [0..LINE_LEN - 1] of AnsiChar; + MfgName: array [0..LINE_LEN - 1] of AnsiChar; + ProviderName: array [0..LINE_LEN - 1] of AnsiChar; + end; + {$EXTERNALSYM _SP_DRVINFO_DATA_V1_A} + _SP_DRVINFO_DATA_V1_W = packed record + cbSize: DWORD; + DriverType: DWORD; + Reserved: ULONG_PTR; + Description: array [0..LINE_LEN - 1] of WideChar; + MfgName: array [0..LINE_LEN - 1] of WideChar; + ProviderName: array [0..LINE_LEN - 1] of WideChar; + end; + {$EXTERNALSYM _SP_DRVINFO_DATA_V1_W} + _SP_DRVINFO_DATA_V1_ = _SP_DRVINFO_DATA_V1_A; + TSPDrvInfoDataV1A = _SP_DRVINFO_DATA_V1_A; + TSPDrvInfoDataV1W = _SP_DRVINFO_DATA_V1_W; + TSPDrvInfoDataV1 = TSPDrvInfoDataV1A; + +{$IFDEF USE_SP_DRVINFO_DATA_V1} + TSPDrvInfoDataA = TSPDrvInfoDataV1A; + TSPDrvInfoDataW = TSPDrvInfoDataV1W; + TSPDrvInfoData = TSPDrvInfoDataA; + PSPDrvInfoDataA = PSPDrvInfoDataV1A; + PSPDrvInfoDataW = PSPDrvInfoDataV1W; + PSPDrvInfoData = PSPDrvInfoDataA; +{$ELSE} + TSPDrvInfoDataA = TSPDrvInfoDataV2A; + TSPDrvInfoDataW = TSPDrvInfoDataV2W; + TSPDrvInfoData = TSPDrvInfoDataA; + PSPDrvInfoDataA = PSPDrvInfoDataV2A; + PSPDrvInfoDataW = PSPDrvInfoDataV2W; + PSPDrvInfoData = PSPDrvInfoDataA; +{$ENDIF} + +// +// Driver information details structure (provides detailed information about a +// particular driver information structure) +// + PSPDrvInfoDetailDataA = ^TSPDrvInfoDetailDataA; + PSPDrvInfoDetailDataW = ^TSPDrvInfoDetailDataW; + PSPDrvInfoDetailData = PSPDrvInfoDetailDataA; + _SP_DRVINFO_DETAIL_DATA_A = packed record + cbSize: DWORD; + InfDate: TFileTime; + CompatIDsOffset: DWORD; + CompatIDsLength: DWORD; + Reserved: ULONG_PTR; + SectionName: array [0..LINE_LEN - 1] of AnsiChar; + InfFileName: array [0..MAX_PATH - 1] of AnsiChar; + DrvDescription: array [0..LINE_LEN - 1] of AnsiChar; + HardwareID: array [0..ANYSIZE_ARRAY - 1] of AnsiChar; + end; + {$EXTERNALSYM _SP_DRVINFO_DETAIL_DATA_A} + _SP_DRVINFO_DETAIL_DATA_W = packed record + cbSize: DWORD; + InfDate: TFileTime; + CompatIDsOffset: DWORD; + CompatIDsLength: DWORD; + Reserved: ULONG_PTR; + SectionName: array [0..LINE_LEN - 1] of WideChar; + InfFileName: array [0..MAX_PATH - 1] of WideChar; + DrvDescription: array [0..LINE_LEN - 1] of WideChar; + HardwareID: array [0..ANYSIZE_ARRAY - 1] of WideChar; + end; + {$EXTERNALSYM _SP_DRVINFO_DETAIL_DATA_W} + _SP_DRVINFO_DETAIL_DATA_ = _SP_DRVINFO_DETAIL_DATA_A; + TSPDrvInfoDetailDataA = _SP_DRVINFO_DETAIL_DATA_A; + TSPDrvInfoDetailDataW = _SP_DRVINFO_DETAIL_DATA_W; + TSPDrvInfoDetailData = TSPDrvInfoDetailDataA; + +// +// Driver installation parameters (associated with a particular driver +// information element) +// + PSPDrvInstallParams = ^TSPDrvInstallParams; + _SP_DRVINSTALL_PARAMS = packed record + cbSize: DWORD; + Rank: DWORD; + Flags: DWORD; + PrivateData: DWORD_PTR; + Reserved: DWORD; + end; + {$EXTERNALSYM _SP_DRVINSTALL_PARAMS} + TSPDrvInstallParams = _SP_DRVINSTALL_PARAMS; + +// +// SP_DRVINSTALL_PARAMS.Flags values +// +const + DNF_DUPDESC = $00000001; // Multiple providers have same desc + {$EXTERNALSYM DNF_DUPDESC} + DNF_OLDDRIVER = $00000002; // Driver node specifies old/current driver + {$EXTERNALSYM DNF_OLDDRIVER} + DNF_EXCLUDEFROMLIST = $00000004; // If set, this driver node will not be + {$EXTERNALSYM DNF_EXCLUDEFROMLIST} // displayed in any driver select dialogs. + DNF_NODRIVER = $00000008; // if we want to install no driver + {$EXTERNALSYM DNF_NODRIVER} // (e.g no mouse drv) + DNF_LEGACYINF = $00000010; // this driver node comes from an old-style INF + {$EXTERNALSYM DNF_LEGACYINF} + DNF_CLASS_DRIVER = $00000020; // Driver node represents a class driver + {$EXTERNALSYM DNF_CLASS_DRIVER} + DNF_COMPATIBLE_DRIVER = $00000040; // Driver node represents a compatible driver + {$EXTERNALSYM DNF_COMPATIBLE_DRIVER} + DNF_INET_DRIVER = $00000080; // Driver comes from an internet source + {$EXTERNALSYM DNF_INET_DRIVER} + DNF_UNUSED1 = $00000100; + {$EXTERNALSYM DNF_UNUSED1} + DNF_INDEXED_DRIVER = $00000200; // Driver is contained in the Windows Driver Index + {$EXTERNALSYM DNF_INDEXED_DRIVER} + DNF_OLD_INET_DRIVER = $00000400; // Driver came from the Internet, but we don't currently + {$EXTERNALSYM DNF_OLD_INET_DRIVER} // have access to it's source files. Never attempt to + // install a driver with this flag! + DNF_BAD_DRIVER = $00000800; // Driver node should not be used at all + {$EXTERNALSYM DNF_BAD_DRIVER} + DNF_DUPPROVIDER = $00001000; // Multiple drivers have the same provider and desc + {$EXTERNALSYM DNF_DUPPROVIDER} + +// +//Rank values (the lower the Rank number, the better the Rank) +// + DRIVER_HARDWAREID_RANK = $00000FFF; // Any rank less than or equal to + {$EXTERNALSYM DRIVER_HARDWAREID_RANK} // this value is a HardwareID match + +// +// Setup callback routine for comparing detection signatures +// +type + TSPDetsigCmpProc = function (DeviceInfoSet: HDEVINFO; NewDeviceData, + ExistingDeviceData: PSPDevInfoData; CompareContext: Pointer): DWORD; stdcall; + +// +// Define context structure handed to co-installers +// + PCoInstallerContextData = ^TCoInstallerContextData; + _COINSTALLER_CONTEXT_DATA = packed record + PostProcessing: BOOL; + InstallResult: DWORD; + PrivateData: Pointer; + end; + {$EXTERNALSYM _COINSTALLER_CONTEXT_DATA} + TCoInstallerContextData = _COINSTALLER_CONTEXT_DATA; + +// +// Structure containing class image list information. +// + PSPClassImageListData = ^TSPClassImageListData; + _SP_CLASSIMAGELIST_DATA = packed record + cbSize: DWORD; + ImageList: HIMAGELIST; + Reserved: ULONG_PTR; + end; + {$EXTERNALSYM _SP_CLASSIMAGELIST_DATA} + TSPClassImageListData = _SP_CLASSIMAGELIST_DATA; + +// +// Structure to be passed as first parameter (LPVOID lpv) to ExtensionPropSheetPageProc +// entry point in setupapi.dll or to "EnumPropPages32" or "BasicProperties32" entry +// points provided by class/device property page providers. Used to retrieve a handle +// (or, potentially, multiple handles) to property pages for a specified property page type. +// + PSPPropSheetPageRequest = ^TSPPropSheetPageRequest; + _SP_PROPSHEETPAGE_REQUEST = packed record + cbSize: DWORD; + PageRequested: DWORD; + DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; + end; + {$EXTERNALSYM _SP_PROPSHEETPAGE_REQUEST} + TSPPropSheetPageRequest = _SP_PROPSHEETPAGE_REQUEST; + +// +// Property sheet codes used in SP_PROPSHEETPAGE_REQUEST.PageRequested +// +const + SPPSR_SELECT_DEVICE_RESOURCES = 1; // supplied by setupapi.dll + {$EXTERNALSYM SPPSR_SELECT_DEVICE_RESOURCES} + SPPSR_ENUM_BASIC_DEVICE_PROPERTIES = 2; // supplied by device's BasicProperties32 provider + {$EXTERNALSYM SPPSR_ENUM_BASIC_DEVICE_PROPERTIES} + SPPSR_ENUM_ADV_DEVICE_PROPERTIES = 3; // supplied by class and/or device's EnumPropPages32 provider + {$EXTERNALSYM SPPSR_ENUM_ADV_DEVICE_PROPERTIES} + +// +// Structure used with SetupGetBackupQueue +// +type + PSPBackupQueueParamsA = ^TSPBackupQueueParamsA; + PSPBackupQueueParamsW = ^TSPBackupQueueParamsW; + PSPBackupQueueParams = PSPBackupQueueParamsA; + _SP_BACKUP_QUEUE_PARAMS_A = packed record + cbSize: DWORD; + FullInfPath: array [0..MAX_PATH - 1] of AnsiChar; // buffer to hold ANSI pathname of INF file + FilenameOffset: Integer; // offset in CHAR's of filename part (after '\') + end; + {$EXTERNALSYM _SP_BACKUP_QUEUE_PARAMS_A} + _SP_BACKUP_QUEUE_PARAMS_W = packed record + cbSize: DWORD; + FullInfPath: array [0..MAX_PATH - 1] of WideChar; // buffer to hold ANSI pathname of INF file + FilenameOffset: Integer; // offset in CHAR's of filename part (after '\') + end; + {$EXTERNALSYM _SP_BACKUP_QUEUE_PARAMS_W} + _SP_BACKUP_QUEUE_PARAMS_ = _SP_BACKUP_QUEUE_PARAMS_A; + TSPBackupQueueParamsA = _SP_BACKUP_QUEUE_PARAMS_A; + TSPBackupQueueParamsW = _SP_BACKUP_QUEUE_PARAMS_W; + TSPBackupQueueParams = TSPBackupQueueParamsA; + +// +// Setupapi-specific error codes +// +// Inf parse outcomes +// +const + APPLICATION_ERROR_MASK = DWORD($20000000); // from WINNT.h + {$EXTERNALSYM APPLICATION_ERROR_MASK} + ERROR_SEVERITY_ERROR = DWORD($C0000000); // from WINNT.h + {$EXTERNALSYM ERROR_SEVERITY_ERROR} + + ERROR_EXPECTED_SECTION_NAME = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or 0); + {$EXTERNALSYM ERROR_EXPECTED_SECTION_NAME} + ERROR_BAD_SECTION_NAME_LINE = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or 1); + {$EXTERNALSYM ERROR_BAD_SECTION_NAME_LINE} + ERROR_SECTION_NAME_TOO_LONG = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or 2); + {$EXTERNALSYM ERROR_SECTION_NAME_TOO_LONG} + ERROR_GENERAL_SYNTAX = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or 3); + {$EXTERNALSYM ERROR_GENERAL_SYNTAX} + +// +// Inf runtime errors +// + ERROR_WRONG_INF_STYLE = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $100); + {$EXTERNALSYM ERROR_WRONG_INF_STYLE} + ERROR_SECTION_NOT_FOUND = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $101); + {$EXTERNALSYM ERROR_SECTION_NOT_FOUND} + ERROR_LINE_NOT_FOUND = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $102); + {$EXTERNALSYM ERROR_LINE_NOT_FOUND} + ERROR_NO_BACKUP = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $103); + {$EXTERNALSYM ERROR_NO_BACKUP} + +// +// Device Installer/other errors +// + ERROR_NO_ASSOCIATED_CLASS = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $200); + {$EXTERNALSYM ERROR_NO_ASSOCIATED_CLASS} + ERROR_CLASS_MISMATCH = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $201); + {$EXTERNALSYM ERROR_CLASS_MISMATCH} + ERROR_DUPLICATE_FOUND = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $202); + {$EXTERNALSYM ERROR_DUPLICATE_FOUND} + ERROR_NO_DRIVER_SELECTED = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $203); + {$EXTERNALSYM ERROR_NO_DRIVER_SELECTED} + ERROR_KEY_DOES_NOT_EXIST = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $204); + {$EXTERNALSYM ERROR_KEY_DOES_NOT_EXIST} + ERROR_INVALID_DEVINST_NAME = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $205); + {$EXTERNALSYM ERROR_INVALID_DEVINST_NAME} + ERROR_INVALID_CLASS = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $206); + {$EXTERNALSYM ERROR_INVALID_CLASS} + ERROR_DEVINST_ALREADY_EXISTS = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $207); + {$EXTERNALSYM ERROR_DEVINST_ALREADY_EXISTS} + ERROR_DEVINFO_NOT_REGISTERED = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $208); + {$EXTERNALSYM ERROR_DEVINFO_NOT_REGISTERED} + ERROR_INVALID_REG_PROPERTY = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $209); + {$EXTERNALSYM ERROR_INVALID_REG_PROPERTY} + ERROR_NO_INF = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $20A); + {$EXTERNALSYM ERROR_NO_INF} + ERROR_NO_SUCH_DEVINST = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $20B); + {$EXTERNALSYM ERROR_NO_SUCH_DEVINST} + ERROR_CANT_LOAD_CLASS_ICON = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $20C); + {$EXTERNALSYM ERROR_CANT_LOAD_CLASS_ICON} + ERROR_INVALID_CLASS_INSTALLER = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $20D); + {$EXTERNALSYM ERROR_INVALID_CLASS_INSTALLER} + ERROR_DI_DO_DEFAULT = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $20E); + {$EXTERNALSYM ERROR_DI_DO_DEFAULT} + ERROR_DI_NOFILECOPY = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $20F); + {$EXTERNALSYM ERROR_DI_NOFILECOPY} + ERROR_INVALID_HWPROFILE = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $210); + {$EXTERNALSYM ERROR_INVALID_HWPROFILE} + ERROR_NO_DEVICE_SELECTED = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $211); + {$EXTERNALSYM ERROR_NO_DEVICE_SELECTED} + ERROR_DEVINFO_LIST_LOCKED = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $212); + {$EXTERNALSYM ERROR_DEVINFO_LIST_LOCKED} + ERROR_DEVINFO_DATA_LOCKED = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $213); + {$EXTERNALSYM ERROR_DEVINFO_DATA_LOCKED} + ERROR_DI_BAD_PATH = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $214); + {$EXTERNALSYM ERROR_DI_BAD_PATH} + ERROR_NO_CLASSINSTALL_PARAMS = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $215); + {$EXTERNALSYM ERROR_NO_CLASSINSTALL_PARAMS} + ERROR_FILEQUEUE_LOCKED = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $216); + {$EXTERNALSYM ERROR_FILEQUEUE_LOCKED} + ERROR_BAD_SERVICE_INSTALLSECT = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $217); + {$EXTERNALSYM ERROR_BAD_SERVICE_INSTALLSECT} + ERROR_NO_CLASS_DRIVER_LIST = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $218); + {$EXTERNALSYM ERROR_NO_CLASS_DRIVER_LIST} + ERROR_NO_ASSOCIATED_SERVICE = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $219); + {$EXTERNALSYM ERROR_NO_ASSOCIATED_SERVICE} + ERROR_NO_DEFAULT_DEVICE_INTERFACE = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $21A); + {$EXTERNALSYM ERROR_NO_DEFAULT_DEVICE_INTERFACE} + ERROR_DEVICE_INTERFACE_ACTIVE = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $21B); + {$EXTERNALSYM ERROR_DEVICE_INTERFACE_ACTIVE} + ERROR_DEVICE_INTERFACE_REMOVED = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $21C); + {$EXTERNALSYM ERROR_DEVICE_INTERFACE_REMOVED} + ERROR_BAD_INTERFACE_INSTALLSECT = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $21D); + {$EXTERNALSYM ERROR_BAD_INTERFACE_INSTALLSECT} + ERROR_NO_SUCH_INTERFACE_CLASS = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $21E); + {$EXTERNALSYM ERROR_NO_SUCH_INTERFACE_CLASS} + ERROR_INVALID_REFERENCE_STRING = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $21F); + {$EXTERNALSYM ERROR_INVALID_REFERENCE_STRING} + ERROR_INVALID_MACHINENAME = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $220); + {$EXTERNALSYM ERROR_INVALID_MACHINENAME} + ERROR_REMOTE_COMM_FAILURE = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $221); + {$EXTERNALSYM ERROR_REMOTE_COMM_FAILURE} + ERROR_MACHINE_UNAVAILABLE = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $222); + {$EXTERNALSYM ERROR_MACHINE_UNAVAILABLE} + ERROR_NO_CONFIGMGR_SERVICES = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $223); + {$EXTERNALSYM ERROR_NO_CONFIGMGR_SERVICES} + ERROR_INVALID_PROPPAGE_PROVIDER = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $224); + {$EXTERNALSYM ERROR_INVALID_PROPPAGE_PROVIDER} + ERROR_NO_SUCH_DEVICE_INTERFACE = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $225); + {$EXTERNALSYM ERROR_NO_SUCH_DEVICE_INTERFACE} + ERROR_DI_POSTPROCESSING_REQUIRED = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $226); + {$EXTERNALSYM ERROR_DI_POSTPROCESSING_REQUIRED} + ERROR_INVALID_COINSTALLER = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $227); + {$EXTERNALSYM ERROR_INVALID_COINSTALLER} + ERROR_NO_COMPAT_DRIVERS = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $228); + {$EXTERNALSYM ERROR_NO_COMPAT_DRIVERS} + ERROR_NO_DEVICE_ICON = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $229); + {$EXTERNALSYM ERROR_NO_DEVICE_ICON} + ERROR_INVALID_INF_LOGCONFIG = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $22A); + {$EXTERNALSYM ERROR_INVALID_INF_LOGCONFIG} + ERROR_DI_DONT_INSTALL = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $22B); + {$EXTERNALSYM ERROR_DI_DONT_INSTALL} + ERROR_INVALID_FILTER_DRIVER = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $22C); + {$EXTERNALSYM ERROR_INVALID_FILTER_DRIVER} + ERROR_NON_WINDOWS_NT_DRIVER = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $22D); + {$EXTERNALSYM ERROR_NON_WINDOWS_NT_DRIVER} + ERROR_NON_WINDOWS_DRIVER = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $22E); + {$EXTERNALSYM ERROR_NON_WINDOWS_DRIVER} + ERROR_NO_CATALOG_FOR_OEM_INF = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $22F); + {$EXTERNALSYM ERROR_NO_CATALOG_FOR_OEM_INF} + ERROR_DEVINSTALL_QUEUE_NONNATIVE = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $230); + {$EXTERNALSYM ERROR_DEVINSTALL_QUEUE_NONNATIVE} + ERROR_NOT_DISABLEABLE = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $231); + {$EXTERNALSYM ERROR_NOT_DISABLEABLE} + ERROR_CANT_REMOVE_DEVINST = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $232); + {$EXTERNALSYM ERROR_CANT_REMOVE_DEVINST} + +// +// Backward compatibility--do not use. +// + ERROR_NO_DEFAULT_INTERFACE_DEVICE = ERROR_NO_DEFAULT_DEVICE_INTERFACE; + {$EXTERNALSYM ERROR_NO_DEFAULT_INTERFACE_DEVICE} + ERROR_INTERFACE_DEVICE_ACTIVE = ERROR_DEVICE_INTERFACE_ACTIVE; + {$EXTERNALSYM ERROR_INTERFACE_DEVICE_ACTIVE} + ERROR_INTERFACE_DEVICE_REMOVED = ERROR_DEVICE_INTERFACE_REMOVED; + {$EXTERNALSYM ERROR_INTERFACE_DEVICE_REMOVED} + ERROR_NO_SUCH_INTERFACE_DEVICE = ERROR_NO_SUCH_DEVICE_INTERFACE; + {$EXTERNALSYM ERROR_NO_SUCH_INTERFACE_DEVICE} + +// +// Win9x migration DLL error code +// + ERROR_NOT_INSTALLED = DWORD(APPLICATION_ERROR_MASK or ERROR_SEVERITY_ERROR or $1000); + {$EXTERNALSYM ERROR_NOT_INSTALLED} + +function SetupGetInfInformationA(InfSpec: Pointer; SearchControl: DWORD; + ReturnBuffer: PSPInfInformation; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetInfInformationA} +function SetupGetInfInformationW(InfSpec: Pointer; SearchControl: DWORD; + ReturnBuffer: PSPInfInformation; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetInfInformationW} +function SetupGetInfInformation(InfSpec: Pointer; SearchControl: DWORD; + ReturnBuffer: PSPInfInformation; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetInfInformation} + +// +// SearchControl flags for SetupGetInfInformation +// +const + INFINFO_INF_SPEC_IS_HINF = 1; + {$EXTERNALSYM INFINFO_INF_SPEC_IS_HINF} + INFINFO_INF_NAME_IS_ABSOLUTE = 2; + {$EXTERNALSYM INFINFO_INF_NAME_IS_ABSOLUTE} + INFINFO_DEFAULT_SEARCH = 3; + {$EXTERNALSYM INFINFO_DEFAULT_SEARCH} + INFINFO_REVERSE_DEFAULT_SEARCH = 4; + {$EXTERNALSYM INFINFO_REVERSE_DEFAULT_SEARCH} + INFINFO_INF_PATH_LIST_SEARCH = 5; + {$EXTERNALSYM INFINFO_INF_PATH_LIST_SEARCH} + +function SetupQueryInfFileInformationA(var InfInformation: TSPInfInformation; + InfIndex: UINT; ReturnBuffer: PAnsiChar; ReturnBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryInfFileInformationA} +function SetupQueryInfFileInformationW(var InfInformation: TSPInfInformation; + InfIndex: UINT; ReturnBuffer: PWideChar; ReturnBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryInfFileInformationW} +function SetupQueryInfFileInformation(var InfInformation: TSPInfInformation; + InfIndex: UINT; ReturnBuffer: PChar; ReturnBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryInfFileInformation} + +function SetupQueryInfOriginalFileInformationA(var InfInformation: TSPInfInformation; + InfIndex: UINT; AlternatePlatformInfo: PSPAltPlatformInfo; + var OriginalFileInfo: TSPOriginalFileInfoA): LongBool; stdcall; +{$EXTERNALSYM SetupQueryInfOriginalFileInformationA} +function SetupQueryInfOriginalFileInformationW(var InfInformation: TSPInfInformation; + InfIndex: UINT; AlternatePlatformInfo: PSPAltPlatformInfo; + var OriginalFileInfo: TSPOriginalFileInfoW): LongBool; stdcall; +{$EXTERNALSYM SetupQueryInfOriginalFileInformationW} +function SetupQueryInfOriginalFileInformation(var InfInformation: TSPInfInformation; + InfIndex: UINT; AlternatePlatformInfo: PSPAltPlatformInfo; + var OriginalFileInfo: TSPOriginalFileInfoA): LongBool; stdcall; +{$EXTERNALSYM SetupQueryInfOriginalFileInformation} + +function SetupQueryInfVersionInformationA(var InfInformation: TSPInfInformation; + InfIndex: UINT; const Key, ReturnBuffer: PAnsiChar; ReturnBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryInfVersionInformationA} +function SetupQueryInfVersionInformationW(var InfInformation: TSPInfInformation; + InfIndex: UINT; const Key, ReturnBuffer: PWideChar; ReturnBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryInfVersionInformationW} +function SetupQueryInfVersionInformation(var InfInformation: TSPInfInformation; + InfIndex: UINT; const Key, ReturnBuffer: PChar; ReturnBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryInfVersionInformation} + +function SetupGetInfFileListA(const DirectoryPath: PAnsiChar; InfStyle: DWORD; + ReturnBuffer: PAnsiChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetInfFileListA} +function SetupGetInfFileListW(const DirectoryPath: PWideChar; InfStyle: DWORD; + ReturnBuffer: PWideChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetInfFileListW} +function SetupGetInfFileList(const DirectoryPath: PChar; InfStyle: DWORD; + ReturnBuffer: PChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetInfFileList} + +function SetupOpenInfFileA(const FileName: PAnsiChar; const InfClass: PAnsiChar; + InfStyle: DWORD; ErrorLine: PUINT): HINF; stdcall; +{$EXTERNALSYM SetupOpenInfFileA} +function SetupOpenInfFileW(const FileName: PWideChar; const InfClass: PWideChar; + InfStyle: DWORD; ErrorLine: PUINT): HINF; stdcall; +{$EXTERNALSYM SetupOpenInfFileW} +function SetupOpenInfFile(const FileName: PChar; const InfClass: PChar; + InfStyle: DWORD; ErrorLine: PUINT): HINF; stdcall; +{$EXTERNALSYM SetupOpenInfFile} + +function SetupOpenMasterInf: HINF; stdcall; +{$EXTERNALSYM SetupOpenMasterInf} + +function SetupOpenAppendInfFileA(const FileName: PAnsiChar; InfHandle: HINF; + ErrorLine: PUINT): LongBool; stdcall; +{$EXTERNALSYM SetupOpenAppendInfFileA} +function SetupOpenAppendInfFileW(const FileName: PWideChar; InfHandle: HINF; + ErrorLine: PUINT): LongBool; stdcall; +{$EXTERNALSYM SetupOpenAppendInfFileW} +function SetupOpenAppendInfFile(const FileName: PChar; InfHandle: HINF; + ErrorLine: PUINT): LongBool; stdcall; +{$EXTERNALSYM SetupOpenAppendInfFile} + +procedure SetupCloseInfFile(InfHandle: HINF); stdcall; +{$EXTERNALSYM SetupCloseInfFile} + +function SetupFindFirstLineA(InfHandle: HINF; Section, Key: PAnsiChar; + var Context: TInfContext): LongBool; stdcall; +{$EXTERNALSYM SetupFindFirstLineA} +function SetupFindFirstLineW(InfHandle: HINF; Section, Key: PWideChar; + var Context: TInfContext): LongBool; stdcall; +{$EXTERNALSYM SetupFindFirstLineW} +function SetupFindFirstLine(InfHandle: HINF; Section, Key: PChar; + var Context: TInfContext): LongBool; stdcall; +{$EXTERNALSYM SetupFindFirstLine} + +function SetupFindNextLine(var ContextIn, ContextOut: TInfContext): LongBool; stdcall; +{$EXTERNALSYM SetupFindNextLine} + +function SetupFindNextMatchLineA(var ContextIn: TInfContext; Key: PAnsiChar; + var ContextOut: TInfContext): LongBool; stdcall; +{$EXTERNALSYM SetupFindNextMatchLineA} +function SetupFindNextMatchLineW(var ContextIn: TInfContext; Key: PWideChar; + var ContextOut: TInfContext): LongBool; stdcall; +{$EXTERNALSYM SetupFindNextMatchLineW} +function SetupFindNextMatchLine(var ContextIn: TInfContext; Key: PChar; + var ContextOut: TInfContext): LongBool; stdcall; +{$EXTERNALSYM SetupFindNextMatchLine} + +function SetupGetLineByIndexA(InfHandle: HINF; Section: PAnsiChar; Index: DWORD; + var Context: TInfContext): LongBool; stdcall; +{$EXTERNALSYM SetupGetLineByIndexA} +function SetupGetLineByIndexW(InfHandle: HINF; Section: PWideChar; Index: DWORD; + var Context: TInfContext): LongBool; stdcall; +{$EXTERNALSYM SetupGetLineByIndexW} +function SetupGetLineByIndex(InfHandle: HINF; Section: PChar; Index: DWORD; + var Context: TInfContext): LongBool; stdcall; +{$EXTERNALSYM SetupGetLineByIndex} + +function SetupGetLineCountA(InfHandle: HINF; Section: PAnsiChar): Integer; stdcall; +{$EXTERNALSYM SetupGetLineCountA} +function SetupGetLineCountW(InfHandle: HINF; Section: PWideChar): Integer; stdcall; +{$EXTERNALSYM SetupGetLineCountW} +function SetupGetLineCount(InfHandle: HINF; Section: PChar): Integer; stdcall; +{$EXTERNALSYM SetupGetLineCount} + +function SetupGetLineTextA(Context: PInfContext; InfHandle: HINF; Section, + Key, ReturnBuffer: PAnsiChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetLineTextA} +function SetupGetLineTextW(Context: PInfContext; InfHandle: HINF; Section, + Key, ReturnBuffer: PWideChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetLineTextW} +function SetupGetLineText(Context: PInfContext; InfHandle: HINF; Section, + Key, ReturnBuffer: PChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetLineText} + +function SetupGetFieldCount(var Context: TInfContext): DWORD; stdcall; +{$EXTERNALSYM SetupGetFieldCount} + +function SetupGetStringFieldA(var Context: TInfContext; FieldIndex: DWORD; + ReturnBuffer: PAnsiChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetStringFieldA} +function SetupGetStringFieldW(var Context: TInfContext; FieldIndex: DWORD; + ReturnBuffer: PWideChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetStringFieldW} +function SetupGetStringField(var Context: TInfContext; FieldIndex: DWORD; + ReturnBuffer: PChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetStringField} + +function SetupGetIntField(var Context: TInfContext; FieldIndex: DWORD; + var IntegerValue: Integer): LongBool; stdcall; +{$EXTERNALSYM SetupGetIntField} + +function SetupGetMultiSzFieldA(var Context: TInfContext; FieldIndex: DWORD; + ReturnBuffer: PAnsiChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetMultiSzFieldA} +function SetupGetMultiSzFieldW(var Context: TInfContext; FieldIndex: DWORD; + ReturnBuffer: PWideChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetMultiSzFieldW} +function SetupGetMultiSzField(var Context: TInfContext; FieldIndex: DWORD; + ReturnBuffer: PChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetMultiSzField} + +function SetupGetBinaryField(var Context: TInfContext; FieldIndex: DWORD; + ReturnBuffer: PBYTE; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetBinaryField} + +function SetupGetFileCompressionInfoA(const SourceFileName: PAnsiChar; + var ActualSourceFileName: PAnsiChar; var SourceFileSize: DWORD; + var TargetFileSize: DWORD; var CompressionType: UINT): DWORD; stdcall; +{$EXTERNALSYM SetupGetFileCompressionInfoA} +function SetupGetFileCompressionInfoW(const SourceFileName: PWideChar; + var ActualSourceFileName: PWideChar; var SourceFileSize: DWORD; + var TargetFileSize: DWORD; var CompressionType: UINT): DWORD; stdcall; +{$EXTERNALSYM SetupGetFileCompressionInfoW} +function SetupGetFileCompressionInfo(const SourceFileName: PChar; + var ActualSourceFileName: PChar; var SourceFileSize: DWORD; + var TargetFileSize: DWORD; var CompressionType: UINT): DWORD; stdcall; +{$EXTERNALSYM SetupGetFileCompressionInfo} + +// +// Compression types +// +const + FILE_COMPRESSION_NONE = 0; + {$EXTERNALSYM FILE_COMPRESSION_NONE} + FILE_COMPRESSION_WINLZA = 1; + {$EXTERNALSYM FILE_COMPRESSION_WINLZA} + FILE_COMPRESSION_MSZIP = 2; + {$EXTERNALSYM FILE_COMPRESSION_MSZIP} + FILE_COMPRESSION_NTCAB = 3; + {$EXTERNALSYM FILE_COMPRESSION_NTCAB} + +function SetupDecompressOrCopyFileA(const SourceFileName, TargetFileName: PAnsiChar; + var CompressionType: UINT): DWORD; stdcall; +{$EXTERNALSYM SetupDecompressOrCopyFileA} +function SetupDecompressOrCopyFileW(const SourceFileName, TargetFileName: PWideChar; + var CompressionType: UINT): DWORD; stdcall; +{$EXTERNALSYM SetupDecompressOrCopyFileW} +function SetupDecompressOrCopyFile(const SourceFileName, TargetFileName: PChar; + var CompressionType: UINT): DWORD; stdcall; +{$EXTERNALSYM SetupDecompressOrCopyFile} + +function SetupGetSourceFileLocationA(InfHandle: HINF; InfContext: PInfContext; + const FileName: PAnsiChar; var SourceId: UINT; ReturnBuffer: PAnsiChar; + ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetSourceFileLocationA} +function SetupGetSourceFileLocationW(InfHandle: HINF; InfContext: PInfContext; + const FileName: PWideChar; var SourceId: UINT; ReturnBuffer: PWideChar; + ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetSourceFileLocationW} +function SetupGetSourceFileLocation(InfHandle: HINF; InfContext: PInfContext; + const FileName: PChar; var SourceId: UINT; ReturnBuffer: PChar; + ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetSourceFileLocation} + +function SetupGetSourceFileSizeA(InfHandle: HINF; InfContext: PInfContext; + const FileName: PAnsiChar; const Section: PAnsiChar; var FileSize: DWORD; + RoundingFactor: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupGetSourceFileSizeA} +function SetupGetSourceFileSizeW(InfHandle: HINF; InfContext: PInfContext; + const FileName: PWideChar; const Section: PWideChar; var FileSize: DWORD; + RoundingFactor: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupGetSourceFileSizeW} +function SetupGetSourceFileSize(InfHandle: HINF; InfContext: PInfContext; + const FileName: PChar; const Section: PChar; var FileSize: DWORD; + RoundingFactor: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupGetSourceFileSize} + +function SetupGetTargetPathA(InfHandle: HINF; InfContext: PInfContext; + const Section: PAnsiChar; ReturnBuffer: PAnsiChar; ReturnBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetTargetPathA} +function SetupGetTargetPathW(InfHandle: HINF; InfContext: PInfContext; + const Section: PWideChar; ReturnBuffer: PWideChar; ReturnBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetTargetPathW} +function SetupGetTargetPath(InfHandle: HINF; InfContext: PInfContext; + const Section: PChar; ReturnBuffer: PChar; ReturnBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetTargetPath} + +// +// Define flags for SourceList APIs. +// +const + SRCLIST_TEMPORARY = $00000001; + {$EXTERNALSYM SRCLIST_TEMPORARY} + SRCLIST_NOBROWSE = $00000002; + {$EXTERNALSYM SRCLIST_NOBROWSE} + SRCLIST_SYSTEM = $00000010; + {$EXTERNALSYM SRCLIST_SYSTEM} + SRCLIST_USER = $00000020; + {$EXTERNALSYM SRCLIST_USER} + SRCLIST_SYSIFADMIN = $00000040; + {$EXTERNALSYM SRCLIST_SYSIFADMIN} + SRCLIST_SUBDIRS = $00000100; + {$EXTERNALSYM SRCLIST_SUBDIRS} + SRCLIST_APPEND = $00000200; + {$EXTERNALSYM SRCLIST_APPEND} + SRCLIST_NOSTRIPPLATFORM = $00000400; + {$EXTERNALSYM SRCLIST_NOSTRIPPLATFORM} + +function SetupSetSourceListA(Flags: DWORD; SourceList: PPASTR; + SourceCount: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupSetSourceListA} +function SetupSetSourceListW(Flags: DWORD; SourceList: PPWSTR; + SourceCount: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupSetSourceListW} +function SetupSetSourceList(Flags: DWORD; SourceList: PPSTR; + SourceCount: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupSetSourceList} + +function SetupCancelTemporarySourceList: LongBool; stdcall; +{$EXTERNALSYM SetupCancelTemporarySourceList} + +function SetupAddToSourceListA(Flags: DWORD; const Source: PAnsiChar): LongBool; stdcall; +{$EXTERNALSYM SetupAddToSourceListA} +function SetupAddToSourceListW(Flags: DWORD; const Source: PWideChar): LongBool; stdcall; +{$EXTERNALSYM SetupAddToSourceListW} +function SetupAddToSourceList(Flags: DWORD; const Source: PChar): LongBool; stdcall; +{$EXTERNALSYM SetupAddToSourceList} + +function SetupRemoveFromSourceListA(Flags: DWORD; const Source: PAnsiChar): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveFromSourceListA} +function SetupRemoveFromSourceListW(Flags: DWORD; const Source: PWideChar): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveFromSourceListW} +function SetupRemoveFromSourceList(Flags: DWORD; const Source: PChar): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveFromSourceList} + +function SetupQuerySourceListA(Flags: DWORD; var List: PPASTR; + var Count: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupQuerySourceListA} +function SetupQuerySourceListW(Flags: DWORD; var List: PPWSTR; + var Count: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupQuerySourceListW} +function SetupQuerySourceList(Flags: DWORD; var List: PPSTR; + var Count: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupQuerySourceList} + +function SetupFreeSourceListA(var List: PPASTR; Count: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupFreeSourceListA} +function SetupFreeSourceListW(var List: PPWSTR; Count: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupFreeSourceListW} +function SetupFreeSourceList(var List: PPSTR; Count: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupFreeSourceList} + +function SetupPromptForDiskA(hwndParent: HWND; const DialogTitle, DiskName, + PathToSource, FileSought, TagFile: PAnsiChar; DiskPromptStyle: DWORD; + PathBuffer: PAnsiChar; PathBufferSize: DWORD; var PathRequiredSize: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupPromptForDiskA} +function SetupPromptForDiskW(hwndParent: HWND; const DialogTitle, DiskName, + PathToSource, FileSought, TagFile: PWideChar; DiskPromptStyle: DWORD; + PathBuffer: PWideChar; PathBufferSize: DWORD; var PathRequiredSize: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupPromptForDiskW} +function SetupPromptForDisk(hwndParent: HWND; const DialogTitle, DiskName, + PathToSource, FileSought, TagFile: PChar; DiskPromptStyle: DWORD; + PathBuffer: PChar; PathBufferSize: DWORD; var PathRequiredSize: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupPromptForDisk} + +function SetupCopyErrorA(hwndParent: HWND; const DialogTitle, DiskName, + PathToSource, SourceFile, TargetPathFile: PAnsiChar; Win32ErrorCode: UINT; Style: DWORD; + PathBuffer: PAnsiChar; PathBufferSize: DWORD; PathRequiredSize: PDWORD): UINT; stdcall; +{$EXTERNALSYM SetupCopyErrorA} +function SetupCopyErrorW(hwndParent: HWND; const DialogTitle, DiskName, + PathToSource, SourceFile, TargetPathFile: PWideChar; Win32ErrorCode: UINT; Style: DWORD; + PathBuffer: PWideChar; PathBufferSize: DWORD; PathRequiredSize: PDWORD): UINT; stdcall; +{$EXTERNALSYM SetupCopyErrorW} +function SetupCopyError(hwndParent: HWND; const DialogTitle, DiskName, + PathToSource, SourceFile, TargetPathFile: PChar; Win32ErrorCode: UINT; Style: DWORD; + PathBuffer: PChar; PathBufferSize: DWORD; PathRequiredSize: PDWORD): UINT; stdcall; +{$EXTERNALSYM SetupCopyError} + +function SetupRenameErrorA(hwndParent: HWND; const DialogTitle, SourceFile, + TargetFile: PAnsiChar; Win32ErrorCode: UINT; Style: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupRenameErrorA} +function SetupRenameErrorW(hwndParent: HWND; const DialogTitle, SourceFile, + TargetFile: PWideChar; Win32ErrorCode: UINT; Style: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupRenameErrorW} +function SetupRenameError(hwndParent: HWND; const DialogTitle, SourceFile, + TargetFile: PChar; Win32ErrorCode: UINT; Style: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupRenameError} + +function SetupDeleteErrorA(hwndParent: HWND; const DialogTitle, File_: PAnsiChar; + Win32ErrorCode: UINT; Style: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupDeleteErrorA} +function SetupDeleteErrorW(hwndParent: HWND; const DialogTitle, File_: PWideChar; + Win32ErrorCode: UINT; Style: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupDeleteErrorW} +function SetupDeleteError(hwndParent: HWND; const DialogTitle, File_: PChar; + Win32ErrorCode: UINT; Style: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupDeleteError} + +function SetupBackupErrorA(hwndParent: HWND; const DialogTitle, BackupFile, + TargetFile: PAnsiChar; Win32ErrorCode: UINT; Style: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupBackupErrorA} +function SetupBackupErrorW(hwndParent: HWND; const DialogTitle, BackupFile, + TargetFile: PWideChar; Win32ErrorCode: UINT; Style: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupBackupErrorW} +function SetupBackupError(hwndParent: HWND; const DialogTitle, BackupFile, + TargetFile: PChar; Win32ErrorCode: UINT; Style: DWORD): UINT; stdcall; +{$EXTERNALSYM SetupBackupError} + +// +// Styles for SetupPromptForDisk, SetupCopyError, +// SetupRenameError, SetupDeleteError +// +const + IDF_NOBROWSE = $00000001; + {$EXTERNALSYM IDF_NOBROWSE} + IDF_NOSKIP = $00000002; + {$EXTERNALSYM IDF_NOSKIP} + IDF_NODETAILS = $00000004; + {$EXTERNALSYM IDF_NODETAILS} + IDF_NOCOMPRESSED = $00000008; + {$EXTERNALSYM IDF_NOCOMPRESSED} + IDF_CHECKFIRST = $00000100; + {$EXTERNALSYM IDF_CHECKFIRST} + IDF_NOBEEP = $00000200; + {$EXTERNALSYM IDF_NOBEEP} + IDF_NOFOREGROUND = $00000400; + {$EXTERNALSYM IDF_NOFOREGROUND} + IDF_WARNIFSKIP = $00000800; + {$EXTERNALSYM IDF_WARNIFSKIP} + IDF_OEMDISK = DWORD($80000000); + {$EXTERNALSYM IDF_OEMDISK} + +// +// Return values for SetupPromptForDisk, SetupCopyError, +// SetupRenameError, SetupDeleteError, SetupBackupError +// +const + DPROMPT_SUCCESS = 0; + {$EXTERNALSYM DPROMPT_SUCCESS} + DPROMPT_CANCEL = 1; + {$EXTERNALSYM DPROMPT_CANCEL} + DPROMPT_SKIPFILE = 2; + {$EXTERNALSYM DPROMPT_SKIPFILE} + DPROMPT_BUFFERTOOSMALL = 3; + {$EXTERNALSYM DPROMPT_BUFFERTOOSMALL} + DPROMPT_OUTOFMEMORY = 4; + {$EXTERNALSYM DPROMPT_OUTOFMEMORY} + +function SetupSetDirectoryIdA(InfHandle: HINF; Id: DWORD; const Directory: PAnsiChar): LongBool; stdcall; +{$EXTERNALSYM SetupSetDirectoryIdA} +function SetupSetDirectoryIdW(InfHandle: HINF; Id: DWORD; const Directory: PWideChar): LongBool; stdcall; +{$EXTERNALSYM SetupSetDirectoryIdW} +function SetupSetDirectoryId(InfHandle: HINF; Id: DWORD; const Directory: PChar): LongBool; stdcall; +{$EXTERNALSYM SetupSetDirectoryId} + +function SetupSetDirectoryIdExA(InfHandle: HINF; Id: DWORD; const Directory: PAnsiChar; + Flags: DWORD; Reserved1: DWORD; Reserved2: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupSetDirectoryIdExA} +function SetupSetDirectoryIdExW(InfHandle: HINF; Id: DWORD; const Directory: PWideChar; + Flags: DWORD; Reserved1: DWORD; Reserved2: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupSetDirectoryIdExW} +function SetupSetDirectoryIdEx(InfHandle: HINF; Id: DWORD; const Directory: PChar; + Flags: DWORD; Reserved1: DWORD; Reserved2: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupSetDirectoryIdEx} + +// +// Flags for SetupSetDirectoryIdEx +// +const + SETDIRID_NOT_FULL_PATH = $00000001; + {$EXTERNALSYM SETDIRID_NOT_FULL_PATH} + +function SetupGetSourceInfoA(InfHandle: HINF; SourceId, InfoDesired: UINT; + ReturnBuffer: PAnsiChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetSourceInfoA} +function SetupGetSourceInfoW(InfHandle: HINF; SourceId, InfoDesired: UINT; + ReturnBuffer: PWideChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetSourceInfoW} +function SetupGetSourceInfo(InfHandle: HINF; SourceId, InfoDesired: UINT; + ReturnBuffer: PChar; ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupGetSourceInfo} + +// +// InfoDesired values for SetupGetSourceInfo +// +const + SRCINFO_PATH = 1; + {$EXTERNALSYM SRCINFO_PATH} + SRCINFO_TAGFILE = 2; + {$EXTERNALSYM SRCINFO_TAGFILE} + SRCINFO_DESCRIPTION = 3; + {$EXTERNALSYM SRCINFO_DESCRIPTION} + SRCINFO_FLAGS = 4; + {$EXTERNALSYM SRCINFO_FLAGS} + +function SetupInstallFileA(InfHandle: HINF; InfContext: PInfContext; + const SourceFile, SourcePathRoot, DestinationName: PAnsiChar; CopyStyle: DWORD; + CopyMsgHandler: TSPFileCallbackA; Context: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFileA} +function SetupInstallFileW(InfHandle: HINF; InfContext: PInfContext; + const SourceFile, SourcePathRoot, DestinationName: PWideChar; CopyStyle: DWORD; + CopyMsgHandler: TSPFileCallbackW; Context: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFileW} +function SetupInstallFile(InfHandle: HINF; InfContext: PInfContext; + const SourceFile, SourcePathRoot, DestinationName: PChar; CopyStyle: DWORD; + CopyMsgHandler: TSPFileCallbackA; Context: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFile} + +function SetupInstallFileExA(InfHandle: HINF; InfContext: PInfContext; + const SourceFile, SourcePathRoot, DestinationName: PAnsiChar; CopyStyle: DWORD; + CopyMsgHandler: TSPFileCallbackA; Context: Pointer; var FileWasInUse: LongBool): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFileExA} +function SetupInstallFileExW(InfHandle: HINF; InfContext: PInfContext; + const SourceFile, SourcePathRoot, DestinationName: PWideChar; CopyStyle: DWORD; + CopyMsgHandler: TSPFileCallbackW; Context: Pointer; var FileWasInUse: LongBool): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFileExW} +function SetupInstallFileEx(InfHandle: HINF; InfContext: PInfContext; + const SourceFile, SourcePathRoot, DestinationName: PChar; CopyStyle: DWORD; + CopyMsgHandler: TSPFileCallbackA; Context: Pointer; var FileWasInUse: LongBool): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFileEx} + +// +// CopyStyle values for copy and queue-related APIs +// +const + SP_COPY_DELETESOURCE = $0000001; // delete source file on successful copy + {$EXTERNALSYM SP_COPY_DELETESOURCE} + SP_COPY_REPLACEONLY = $0000002; // copy only if target file already present + {$EXTERNALSYM SP_COPY_REPLACEONLY} + SP_COPY_NEWER = $0000004; // copy only if source newer than or same as target + {$EXTERNALSYM SP_COPY_NEWER} + SP_COPY_NEWER_OR_SAME = SP_COPY_NEWER; + {$EXTERNALSYM SP_COPY_NEWER_OR_SAME} + SP_COPY_NOOVERWRITE = $0000008; // copy only if target doesn't exist + {$EXTERNALSYM SP_COPY_NOOVERWRITE} + SP_COPY_NODECOMP = $0000010; // don't decompress source file while copying + {$EXTERNALSYM SP_COPY_NODECOMP} + SP_COPY_LANGUAGEAWARE = $0000020; // don't overwrite file of different language + {$EXTERNALSYM SP_COPY_LANGUAGEAWARE} + SP_COPY_SOURCE_ABSOLUTE = $0000040; // SourceFile is a full source path + {$EXTERNALSYM SP_COPY_SOURCE_ABSOLUTE} + SP_COPY_SOURCEPATH_ABSOLUTE = $0000080; // SourcePathRoot is the full path + {$EXTERNALSYM SP_COPY_SOURCEPATH_ABSOLUTE} + SP_COPY_IN_USE_NEEDS_REBOOT = $0000100; // System needs reboot if file in use + {$EXTERNALSYM SP_COPY_IN_USE_NEEDS_REBOOT} + SP_COPY_FORCE_IN_USE = $0000200; // Force target-in-use behavior + {$EXTERNALSYM SP_COPY_FORCE_IN_USE} + SP_COPY_NOSKIP = $0000400; // Skip is disallowed for this file or section + {$EXTERNALSYM SP_COPY_NOSKIP} + SP_FLAG_CABINETCONTINUATION = $0000800; // Used with need media notification + {$EXTERNALSYM SP_FLAG_CABINETCONTINUATION} + SP_COPY_FORCE_NOOVERWRITE = $0001000; // like NOOVERWRITE but no callback nofitication + {$EXTERNALSYM SP_COPY_FORCE_NOOVERWRITE} + SP_COPY_FORCE_NEWER = $0002000; // like NEWER but no callback nofitication + {$EXTERNALSYM SP_COPY_FORCE_NEWER} + SP_COPY_WARNIFSKIP = $0004000; // system critical file: warn if user tries to skip + {$EXTERNALSYM SP_COPY_WARNIFSKIP} + SP_COPY_NOBROWSE = $0008000; // Browsing is disallowed for this file or section + {$EXTERNALSYM SP_COPY_NOBROWSE} + SP_COPY_NEWER_ONLY = $0010000; // copy only if source file newer than target + {$EXTERNALSYM SP_COPY_NEWER_ONLY} + SP_COPY_SOURCE_SIS_MASTER = $0020000; // source is single-instance store master + {$EXTERNALSYM SP_COPY_SOURCE_SIS_MASTER} + SP_COPY_OEMINF_CATALOG_ONLY = $0040000; // (SetupCopyOEMInf only) don't copy INF--just catalog + {$EXTERNALSYM SP_COPY_OEMINF_CATALOG_ONLY} + SP_COPY_REPLACE_BOOT_FILE = $0080000; // file must be present upon reboot (i.e., it's + {$EXTERNALSYM SP_COPY_REPLACE_BOOT_FILE}// needed by the loader); this flag implies a reboot + SP_COPY_NOPRUNE = $0100000; // never prune this file + {$EXTERNALSYM SP_COPY_NOPRUNE} + +function SetupOpenFileQueue: HSPFILEQ; stdcall; +{$EXTERNALSYM SetupOpenFileQueue} + +function SetupCloseFileQueue(QueueHandle: HSPFILEQ): LongBool; stdcall; +{$EXTERNALSYM SetupCloseFileQueue} + +function SetupSetFileQueueAlternatePlatformA(QueueHandle: HSPFILEQ; + AlternatePlatformInfo: PSPAltPlatformInfo; + const AlternateDefaultCatalogFile: PAnsiChar): LongBool; stdcall; +{$EXTERNALSYM SetupSetFileQueueAlternatePlatformA} +function SetupSetFileQueueAlternatePlatformW(QueueHandle: HSPFILEQ; + AlternatePlatformInfo: PSPAltPlatformInfo; + const AlternateDefaultCatalogFile: PWideChar): LongBool; stdcall; +{$EXTERNALSYM SetupSetFileQueueAlternatePlatformW} +function SetupSetFileQueueAlternatePlatform(QueueHandle: HSPFILEQ; + AlternatePlatformInfo: PSPAltPlatformInfo; + const AlternateDefaultCatalogFile: PChar): LongBool; stdcall; +{$EXTERNALSYM SetupSetFileQueueAlternatePlatform} + +function SetupSetPlatformPathOverrideA(const Override_: PAnsiChar): LongBool; stdcall; +{$EXTERNALSYM SetupSetPlatformPathOverrideA} +function SetupSetPlatformPathOverrideW(const Override_: PWideChar): LongBool; stdcall; +{$EXTERNALSYM SetupSetPlatformPathOverrideW} +function SetupSetPlatformPathOverride(const Override_: PChar): LongBool; stdcall; +{$EXTERNALSYM SetupSetPlatformPathOverride} + +function SetupQueueCopyA(QueueHandle: HSPFILEQ; const SourceRootPath, SourcePath, + SourceFilename, SourceDescription, SourceTagfile, TargetDirectory, + TargetFilename: PAnsiChar; CopyStyle: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueueCopyA} +function SetupQueueCopyW(QueueHandle: HSPFILEQ; const SourceRootPath, SourcePath, + SourceFilename, SourceDescription, SourceTagfile, TargetDirectory, + TargetFilename: PWideChar; CopyStyle: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueueCopyW} +function SetupQueueCopy(QueueHandle: HSPFILEQ; const SourceRootPath, SourcePath, + SourceFilename, SourceDescription, SourceTagfile, TargetDirectory, + TargetFilename: PChar; CopyStyle: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueueCopy} + +function SetupQueueCopyIndirectA(var CopyParams: TSPFileCopyParamsA): LongBool; stdcall; +{$EXTERNALSYM SetupQueueCopyIndirectA} +function SetupQueueCopyIndirectW(var CopyParams: TSPFileCopyParamsW): LongBool; stdcall; +{$EXTERNALSYM SetupQueueCopyIndirectW} +function SetupQueueCopyIndirect(var CopyParams: TSPFileCopyParamsA): LongBool; stdcall; +{$EXTERNALSYM SetupQueueCopyIndirect} + +function SetupQueueDefaultCopyA(QueueHandle: HSPFILEQ; InfHandle: HINF; + const SourceRootPath, SourceFilename, TargetFilename: PAnsiChar; + CopyStyle: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueueDefaultCopyA} +function SetupQueueDefaultCopyW(QueueHandle: HSPFILEQ; InfHandle: HINF; + const SourceRootPath, SourceFilename, TargetFilename: PWideChar; + CopyStyle: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueueDefaultCopyW} +function SetupQueueDefaultCopy(QueueHandle: HSPFILEQ; InfHandle: HINF; + const SourceRootPath, SourceFilename, TargetFilename: PChar; + CopyStyle: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueueDefaultCopy} + +function SetupQueueCopySectionA(QueueHandle: HSPFILEQ; const SourceRootPath: PAnsiChar; + InfHandle: HINF; ListInfHandle: HINF; const Section: PAnsiChar; CopyStyle: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueueCopySectionA} +function SetupQueueCopySectionW(QueueHandle: HSPFILEQ; const SourceRootPath: PWideChar; + InfHandle: HINF; ListInfHandle: HINF; const Section: PWideChar; CopyStyle: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueueCopySectionW} +function SetupQueueCopySection(QueueHandle: HSPFILEQ; const SourceRootPath: PChar; + InfHandle: HINF; ListInfHandle: HINF; const Section: PChar; CopyStyle: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueueCopySection} + +function SetupQueueDeleteA(QueueHandle: HSPFILEQ; const PathPart1, PathPart2: PAnsiChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueDeleteA} +function SetupQueueDeleteW(QueueHandle: HSPFILEQ; const PathPart1, PathPart2: PWideChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueDeleteW} +function SetupQueueDelete(QueueHandle: HSPFILEQ; const PathPart1, PathPart2: PChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueDelete} + +function SetupQueueDeleteSectionA(QueueHandle: HSPFILEQ; InfHandle: HINF; + ListInfHandle: HINF; const Section: PAnsiChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueDeleteSectionA} +function SetupQueueDeleteSectionW(QueueHandle: HSPFILEQ; InfHandle: HINF; + ListInfHandle: HINF; const Section: PWideChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueDeleteSectionW} +function SetupQueueDeleteSection(QueueHandle: HSPFILEQ; InfHandle: HINF; + ListInfHandle: HINF; const Section: PChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueDeleteSection} + +function SetupQueueRenameA(QueueHandle: HSPFILEQ; const SourcePath, + SourceFilename, TargetPath, TargetFilename: PAnsiChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueRenameA} +function SetupQueueRenameW(QueueHandle: HSPFILEQ; const SourcePath, + SourceFilename, TargetPath, TargetFilename: PWideChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueRenameW} +function SetupQueueRename(QueueHandle: HSPFILEQ; const SourcePath, + SourceFilename, TargetPath, TargetFilename: PChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueRename} + +function SetupQueueRenameSectionA(QueueHandle: HSPFILEQ; InfHandle: HINF; + ListInfHandle: HINF; const Section: PAnsiChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueRenameSectionA} +function SetupQueueRenameSectionW(QueueHandle: HSPFILEQ; InfHandle: HINF; + ListInfHandle: HINF; const Section: PWideChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueRenameSectionW} +function SetupQueueRenameSection(QueueHandle: HSPFILEQ; InfHandle: HINF; + ListInfHandle: HINF; const Section: PChar): LongBool; stdcall; +{$EXTERNALSYM SetupQueueRenameSection} + +function SetupCommitFileQueueA(Owner: HWND; QueueHandle: HSPFILEQ; + MsgHandler: TSPFileCallbackA; Context: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupCommitFileQueueA} +function SetupCommitFileQueueW(Owner: HWND; QueueHandle: HSPFILEQ; + MsgHandler: TSPFileCallbackW; Context: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupCommitFileQueueW} +function SetupCommitFileQueue(Owner: HWND; QueueHandle: HSPFILEQ; + MsgHandler: TSPFileCallbackA; Context: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupCommitFileQueue} + +function SetupScanFileQueueA(FileQueue: HSPFILEQ; Flags: DWORD; Window: HWND; + CallbackRoutine: TSPFileCallbackA; CallbackContext: Pointer; var Result: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupScanFileQueueA} +function SetupScanFileQueueW(FileQueue: HSPFILEQ; Flags: DWORD; Window: HWND; + CallbackRoutine: TSPFileCallbackW; CallbackContext: Pointer; var Result: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupScanFileQueueW} +function SetupScanFileQueue(FileQueue: HSPFILEQ; Flags: DWORD; Window: HWND; + CallbackRoutine: TSPFileCallbackA; CallbackContext: Pointer; var Result: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupScanFileQueue} + +// +// Define flags for SetupScanFileQueue. +// +const + SPQ_SCAN_FILE_PRESENCE = $00000001; + {$EXTERNALSYM SPQ_SCAN_FILE_PRESENCE} + SPQ_SCAN_FILE_VALIDITY = $00000002; + {$EXTERNALSYM SPQ_SCAN_FILE_VALIDITY} + SPQ_SCAN_USE_CALLBACK = $00000004; + {$EXTERNALSYM SPQ_SCAN_USE_CALLBACK} + SPQ_SCAN_USE_CALLBACKEX = $00000008; + {$EXTERNALSYM SPQ_SCAN_USE_CALLBACKEX} + SPQ_SCAN_INFORM_USER = $00000010; + {$EXTERNALSYM SPQ_SCAN_INFORM_USER} + SPQ_SCAN_PRUNE_COPY_QUEUE = $00000020; + {$EXTERNALSYM SPQ_SCAN_PRUNE_COPY_QUEUE} + +// +// Define flags used with Param2 for SPFILENOTIFY_QUEUESCAN +// + SPQ_DELAYED_COPY = $00000001; // file was in use; registered for delayed copy + {$EXTERNALSYM SPQ_DELAYED_COPY} + +// +// Define OEM Source Type values for use in SetupCopyOEMInf. +// + SPOST_NONE = 0; + {$EXTERNALSYM SPOST_NONE} + SPOST_PATH = 1; + {$EXTERNALSYM SPOST_PATH} + SPOST_URL = 2; + {$EXTERNALSYM SPOST_URL} + SPOST_MAX = 3; + {$EXTERNALSYM SPOST_MAX} + +function SetupCopyOEMInfA(const SourceInfFileName, OEMSourceMediaLocation: PAnsiChar; + OEMSourceMediaType, CopyStyle: DWORD; DestinationInfFileName: PAnsiChar; + DestinationInfFileNameSize: DWORD; RequiredSize: PDWORD; + DestinationInfFileNameComponent: PPASTR): LongBool; stdcall; +{$EXTERNALSYM SetupCopyOEMInfA} +function SetupCopyOEMInfW(const SourceInfFileName, OEMSourceMediaLocation: PWideChar; + OEMSourceMediaType, CopyStyle: DWORD; DestinationInfFileName: PWideChar; + DestinationInfFileNameSize: DWORD; RequiredSize: PDWORD; + DestinationInfFileNameComponent: PPWSTR): LongBool; stdcall; +{$EXTERNALSYM SetupCopyOEMInfW} +function SetupCopyOEMInf(const SourceInfFileName, OEMSourceMediaLocation: PChar; + OEMSourceMediaType, CopyStyle: DWORD; DestinationInfFileName: PChar; + DestinationInfFileNameSize: DWORD; RequiredSize: PDWORD; + DestinationInfFileNameComponent: PPSTR): LongBool; stdcall; +{$EXTERNALSYM SetupCopyOEMInf} + +// +// Disk space list APIs +// +function SetupCreateDiskSpaceListA(Reserved1: Pointer; Reserved2: DWORD; + Flags: UINT): HDSKSPC; stdcall; +{$EXTERNALSYM SetupCreateDiskSpaceListA} +function SetupCreateDiskSpaceListW(Reserved1: Pointer; Reserved2: DWORD; + Flags: UINT): HDSKSPC; stdcall; +{$EXTERNALSYM SetupCreateDiskSpaceListW} +function SetupCreateDiskSpaceList(Reserved1: Pointer; Reserved2: DWORD; + Flags: UINT): HDSKSPC; stdcall; +{$EXTERNALSYM SetupCreateDiskSpaceList} + +// +// Flags for SetupCreateDiskSpaceList +// +const + SPDSL_IGNORE_DISK = $00000001; // ignore deletes and on-disk files in copies + {$EXTERNALSYM SPDSL_IGNORE_DISK} + SPDSL_DISALLOW_NEGATIVE_ADJUST = $00000002; + {$EXTERNALSYM SPDSL_DISALLOW_NEGATIVE_ADJUST} + +function SetupDuplicateDiskSpaceListA(DiskSpace: HDSKSPC; Reserved1: Pointer; + Reserved2: DWORD; Flags: UINT): HDSKSPC; stdcall; +{$EXTERNALSYM SetupDuplicateDiskSpaceListA} +function SetupDuplicateDiskSpaceListW(DiskSpace: HDSKSPC; Reserved1: Pointer; + Reserved2: DWORD; Flags: UINT): HDSKSPC; stdcall; +{$EXTERNALSYM SetupDuplicateDiskSpaceListW} +function SetupDuplicateDiskSpaceList(DiskSpace: HDSKSPC; Reserved1: Pointer; + Reserved2: DWORD; Flags: UINT): HDSKSPC; stdcall; +{$EXTERNALSYM SetupDuplicateDiskSpaceList} + +function SetupDestroyDiskSpaceList(DiskSpace: HDSKSPC): LongBool; stdcall; +{$EXTERNALSYM SetupDestroyDiskSpaceList} + +function SetupQueryDrivesInDiskSpaceListA(DiskSpace: HDSKSPC; ReturnBuffer: PAnsiChar; + ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryDrivesInDiskSpaceListA} +function SetupQueryDrivesInDiskSpaceListW(DiskSpace: HDSKSPC; ReturnBuffer: PWideChar; + ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryDrivesInDiskSpaceListW} +function SetupQueryDrivesInDiskSpaceList(DiskSpace: HDSKSPC; ReturnBuffer: PChar; + ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryDrivesInDiskSpaceList} + +function SetupQuerySpaceRequiredOnDriveA(DiskSpace: HDSKSPC; const DriveSpec: PAnsiChar; + var SpaceRequired: Int64; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupQuerySpaceRequiredOnDriveA} +function SetupQuerySpaceRequiredOnDriveW(DiskSpace: HDSKSPC; const DriveSpec: PWideChar; + var SpaceRequired: Int64; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupQuerySpaceRequiredOnDriveW} +function SetupQuerySpaceRequiredOnDrive(DiskSpace: HDSKSPC; const DriveSpec: PChar; + var SpaceRequired: Int64; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupQuerySpaceRequiredOnDrive} + +function SetupAdjustDiskSpaceListA(DiskSpace: HDSKSPC; const DriveRoot: PAnsiChar; + Amount: Int64; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAdjustDiskSpaceListA} +function SetupAdjustDiskSpaceListW(DiskSpace: HDSKSPC; const DriveRoot: PWideChar; + Amount: Int64; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAdjustDiskSpaceListW} +function SetupAdjustDiskSpaceList(DiskSpace: HDSKSPC; const DriveRoot: PChar; + Amount: Int64; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAdjustDiskSpaceList} + +function SetupAddToDiskSpaceListA(DiskSpace: HDSKSPC; const TargetFilespec: PAnsiChar; + FileSize: Int64; Operation: UINT; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAddToDiskSpaceListA} +function SetupAddToDiskSpaceListW(DiskSpace: HDSKSPC; const TargetFilespec: PWideChar; + FileSize: Int64; Operation: UINT; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAddToDiskSpaceListW} +function SetupAddToDiskSpaceList(DiskSpace: HDSKSPC; const TargetFilespec: PChar; + FileSize: Int64; Operation: UINT; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAddToDiskSpaceList} + +function SetupAddSectionToDiskSpaceListA(DiskSpace: HDSKSPC; InfHandle: HINF; + ListInfHandle: HINF; const SectionName: PAnsiChar; Operation: UINT; + Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAddSectionToDiskSpaceListA} +function SetupAddSectionToDiskSpaceListW(DiskSpace: HDSKSPC; InfHandle: HINF; + ListInfHandle: HINF; const SectionName: PWideChar; Operation: UINT; + Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAddSectionToDiskSpaceListW} +function SetupAddSectionToDiskSpaceList(DiskSpace: HDSKSPC; InfHandle: HINF; + ListInfHandle: HINF; const SectionName: PChar; Operation: UINT; + Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAddSectionToDiskSpaceList} + +function SetupAddInstallSectionToDiskSpaceListA( DiskSpace: HDSKSPC; + InfHandle: HINF; LayoutInfHandle: HINF; const SectionName: PAnsiChar; + Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAddInstallSectionToDiskSpaceListA} +function SetupAddInstallSectionToDiskSpaceListW( DiskSpace: HDSKSPC; + InfHandle: HINF; LayoutInfHandle: HINF; const SectionName: PWideChar; + Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAddInstallSectionToDiskSpaceListW} +function SetupAddInstallSectionToDiskSpaceList( DiskSpace: HDSKSPC; + InfHandle: HINF; LayoutInfHandle: HINF; const SectionName: PChar; + Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupAddInstallSectionToDiskSpaceList} + +function SetupRemoveFromDiskSpaceListA(DiskSpace: HDSKSPC; const TargetFilespec: PAnsiChar; + Operation: UINT; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveFromDiskSpaceListA} +function SetupRemoveFromDiskSpaceListW(DiskSpace: HDSKSPC; const TargetFilespec: PWideChar; + Operation: UINT; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveFromDiskSpaceListW} +function SetupRemoveFromDiskSpaceList(DiskSpace: HDSKSPC; const TargetFilespec: PChar; + Operation: UINT; Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveFromDiskSpaceList} + +function SetupRemoveSectionFromDiskSpaceListA(DiskSpace: HDSKSPC; InfHandle: HINF; + ListInfHandle: HINF; const SectionName: PAnsiChar; Operation: UINT; Reserved1: Pointer; + Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveSectionFromDiskSpaceListA} +function SetupRemoveSectionFromDiskSpaceListW(DiskSpace: HDSKSPC; InfHandle: HINF; + ListInfHandle: HINF; const SectionName: PWideChar; Operation: UINT; Reserved1: Pointer; + Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveSectionFromDiskSpaceListW} +function SetupRemoveSectionFromDiskSpaceList(DiskSpace: HDSKSPC; InfHandle: HINF; + ListInfHandle: HINF; const SectionName: PChar; Operation: UINT; Reserved1: Pointer; + Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveSectionFromDiskSpaceList} + +function SetupRemoveInstallSectionFromDiskSpaceListA(DiskSpace: HDSKSPC; + InfHandle: HINF; LayoutInfHandle: HINF; const SectionName: PAnsiChar; + Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveInstallSectionFromDiskSpaceListA} +function SetupRemoveInstallSectionFromDiskSpaceListW(DiskSpace: HDSKSPC; + InfHandle: HINF; LayoutInfHandle: HINF; const SectionName: PWideChar; + Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveInstallSectionFromDiskSpaceListW} +function SetupRemoveInstallSectionFromDiskSpaceList(DiskSpace: HDSKSPC; + InfHandle: HINF; LayoutInfHandle: HINF; const SectionName: PChar; + Reserved1: Pointer; Reserved2: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveInstallSectionFromDiskSpaceList} + +// +// Cabinet APIs +// + +function SetupIterateCabinetA(const CabinetFile: PAnsiChar; Reserved: DWORD; + MsgHandler: TSPFileCallbackA; Context: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupIterateCabinetA} +function SetupIterateCabinetW(const CabinetFile: PWideChar; Reserved: DWORD; + MsgHandler: TSPFileCallbackW; Context: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupIterateCabinetW} +function SetupIterateCabinet(const CabinetFile: PChar; Reserved: DWORD; + MsgHandler: TSPFileCallbackA; Context: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupIterateCabinet} + +function SetupPromptReboot(FileQueue: HSPFILEQ; Owner: HWND; ScanOnly: LongBool): Integer; stdcall; +{$EXTERNALSYM SetupPromptReboot} + +// +// Define flags that are returned by SetupPromptReboot +// +const + SPFILEQ_FILE_IN_USE = $00000001; + {$EXTERNALSYM SPFILEQ_FILE_IN_USE} + SPFILEQ_REBOOT_RECOMMENDED = $00000002; + {$EXTERNALSYM SPFILEQ_REBOOT_RECOMMENDED} + SPFILEQ_REBOOT_IN_PROGRESS = $00000004; + {$EXTERNALSYM SPFILEQ_REBOOT_IN_PROGRESS} + +function SetupInitDefaultQueueCallback(OwnerWindow: HWND): Pointer; stdcall; +{$EXTERNALSYM SetupInitDefaultQueueCallback} + +function SetupInitDefaultQueueCallbackEx(OwnerWindow: HWND; AlternateProgressWindow: HWND; + ProgressMessage: UINT; Reserved1: DWORD; Reserved2: Pointer): Pointer; stdcall; +{$EXTERNALSYM SetupInitDefaultQueueCallbackEx} + +procedure SetupTermDefaultQueueCallback(Context: Pointer); stdcall; +{$EXTERNALSYM SetupTermDefaultQueueCallback} + +function SetupDefaultQueueCallbackA(Context: Pointer; Notification: UINT; + Param1, Param2: UINT_PTR): UINT; stdcall; +{$EXTERNALSYM SetupDefaultQueueCallbackA} +function SetupDefaultQueueCallbackW(Context: Pointer; Notification: UINT; + Param1, Param2: UINT_PTR): UINT; stdcall; +{$EXTERNALSYM SetupDefaultQueueCallbackW} +function SetupDefaultQueueCallback(Context: Pointer; Notification: UINT; + Param1, Param2: UINT_PTR): UINT; stdcall; +{$EXTERNALSYM SetupDefaultQueueCallback} + +// +// Flags for AddReg section lines in INF. The corresponding value +// is in the AddReg line format given below: +// +// ,,,,... +// +// The low word contains basic flags concerning the general data type +// and AddReg action. The high word contains values that more specifically +// identify the data type of the registry value. The high word is ignored +// by the 16-bit Windows 95 SETUPX APIs. +// +const + FLG_ADDREG_BINVALUETYPE = ($00000001); + {$EXTERNALSYM FLG_ADDREG_BINVALUETYPE} + FLG_ADDREG_NOCLOBBER = ($00000002); + {$EXTERNALSYM FLG_ADDREG_NOCLOBBER} + FLG_ADDREG_DELVAL = ($00000004); + {$EXTERNALSYM FLG_ADDREG_DELVAL} + FLG_ADDREG_APPEND = ($00000008); // Currently supported only + {$EXTERNALSYM FLG_ADDREG_APPEND} // for REG_MULTI_SZ values. + FLG_ADDREG_KEYONLY = ($00000010); // Just create the key, ignore value + {$EXTERNALSYM FLG_ADDREG_KEYONLY} + FLG_ADDREG_OVERWRITEONLY = ($00000020); // Set only if value already exists + {$EXTERNALSYM FLG_ADDREG_OVERWRITEONLY} + FLG_ADDREG_TYPE_MASK = DWORD($FFFF0000 or FLG_ADDREG_BINVALUETYPE); + {$EXTERNALSYM FLG_ADDREG_TYPE_MASK} + FLG_ADDREG_TYPE_SZ = ($00000000); + {$EXTERNALSYM FLG_ADDREG_TYPE_SZ} + FLG_ADDREG_TYPE_MULTI_SZ = ($00010000); + {$EXTERNALSYM FLG_ADDREG_TYPE_MULTI_SZ} + FLG_ADDREG_TYPE_EXPAND_SZ = ($00020000); + {$EXTERNALSYM FLG_ADDREG_TYPE_EXPAND_SZ} + FLG_ADDREG_TYPE_BINARY = ($00000000 or FLG_ADDREG_BINVALUETYPE); + {$EXTERNALSYM FLG_ADDREG_TYPE_BINARY} + FLG_ADDREG_TYPE_DWORD = ($00010000 or FLG_ADDREG_BINVALUETYPE); + {$EXTERNALSYM FLG_ADDREG_TYPE_DWORD} + FLG_ADDREG_TYPE_NONE = ($00020000 or FLG_ADDREG_BINVALUETYPE); + {$EXTERNALSYM FLG_ADDREG_TYPE_NONE} + +// +// Flags for BitReg section lines in INF. +// + FLG_BITREG_CLEARBITS = ($00000000); + {$EXTERNALSYM FLG_BITREG_CLEARBITS} + FLG_BITREG_SETBITS = ($00000001); + {$EXTERNALSYM FLG_BITREG_SETBITS} + +// +// Flags for RegSvr section lines in INF +// + FLG_REGSVR_DLLREGISTER = ($00000001); + {$EXTERNALSYM FLG_REGSVR_DLLREGISTER} + FLG_REGSVR_DLLINSTALL = ($00000002); + {$EXTERNALSYM FLG_REGSVR_DLLINSTALL} + +// Flags for RegSvr section lines in INF +// + FLG_PROFITEM_CURRENTUSER = ($00000001); + {$EXTERNALSYM FLG_PROFITEM_CURRENTUSER} + FLG_PROFITEM_DELETE = ($00000002); + {$EXTERNALSYM FLG_PROFITEM_DELETE} + FLG_PROFITEM_GROUP = ($00000004); + {$EXTERNALSYM FLG_PROFITEM_GROUP} + FLG_PROFITEM_CSIDL = ($00000008); + {$EXTERNALSYM FLG_PROFITEM_CSIDL} + +// +// The INF may supply any arbitrary data type ordinal in the highword except +// for the following: REG_NONE, REG_SZ, REG_EXPAND_SZ, REG_MULTI_SZ. If this +// technique is used, then the data is given in binary format, one byte per +// field. +// + +function SetupInstallFromInfSectionA(Owner: HWND; InfHandle: HINF; + const SectionName: PAnsiChar; Flags: UINT; RelativeKeyRoot: HKEY; + const SourceRootPath: PAnsiChar; CopyFlags: UINT; MsgHandler: TSPFileCallbackA; + Context: Pointer; DeviceInfoSet: HDEVINFO; DeviceIn: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFromInfSectionA} +function SetupInstallFromInfSectionW(Owner: HWND; InfHandle: HINF; + const SectionName: PWideChar; Flags: UINT; RelativeKeyRoot: HKEY; + const SourceRootPath: PWideChar; CopyFlags: UINT; MsgHandler: TSPFileCallbackW; + Context: Pointer; DeviceInfoSet: HDEVINFO; DeviceIn: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFromInfSectionW} +function SetupInstallFromInfSection(Owner: HWND; InfHandle: HINF; + const SectionName: PChar; Flags: UINT; RelativeKeyRoot: HKEY; + const SourceRootPath: PChar; CopyFlags: UINT; MsgHandler: TSPFileCallbackA; + Context: Pointer; DeviceInfoSet: HDEVINFO; DeviceIn: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFromInfSection} + +// +// Flags for SetupInstallFromInfSection +// +const + SPINST_LOGCONFIG = $00000001; + {$EXTERNALSYM SPINST_LOGCONFIG} + SPINST_INIFILES = $00000002; + {$EXTERNALSYM SPINST_INIFILES} + SPINST_REGISTRY = $00000004; + {$EXTERNALSYM SPINST_REGISTRY} + SPINST_INI2REG = $00000008; + {$EXTERNALSYM SPINST_INI2REG} + SPINST_FILES = $00000010; + {$EXTERNALSYM SPINST_FILES} + SPINST_BITREG = $00000020; + {$EXTERNALSYM SPINST_BITREG} + SPINST_REGSVR = $00000040; + {$EXTERNALSYM SPINST_REGSVR} + SPINST_UNREGSVR = $00000080; + {$EXTERNALSYM SPINST_UNREGSVR} + SPINST_PROFILEITEMS = $00000100; + {$EXTERNALSYM SPINST_PROFILEITEMS} + SPINST_ALL = $000001ff; + {$EXTERNALSYM SPINST_ALL} + SPINST_SINGLESECTION = $00010000; + {$EXTERNALSYM SPINST_SINGLESECTION} + SPINST_LOGCONFIG_IS_FORCED = $00020000; + {$EXTERNALSYM SPINST_LOGCONFIG_IS_FORCED} + SPINST_LOGCONFIGS_ARE_OVERRIDES = $00040000; + {$EXTERNALSYM SPINST_LOGCONFIGS_ARE_OVERRIDES} + +function SetupInstallFilesFromInfSectionA(InfHandle: HINF; LayoutInfHandle: HINF; + FileQueue: HSPFILEQ; const SectionName, SourceRootPath: PAnsiChar; + CopyFlags: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFilesFromInfSectionA} +function SetupInstallFilesFromInfSectionW(InfHandle: HINF; LayoutInfHandle: HINF; + FileQueue: HSPFILEQ; const SectionName, SourceRootPath: PWideChar; + CopyFlags: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFilesFromInfSectionW} +function SetupInstallFilesFromInfSection(InfHandle: HINF; LayoutInfHandle: HINF; + FileQueue: HSPFILEQ; const SectionName, SourceRootPath: PChar; + CopyFlags: UINT): LongBool; stdcall; +{$EXTERNALSYM SetupInstallFilesFromInfSection} + +// +// Flags for SetupInstallServicesFromInfSection(Ex). These flags are also used +// in the flags field of AddService or DelService lines in a device INF. Some +// of these flags are not permitted in the non-Ex API. These flags are marked +// as such below. +// + +// +// (AddService) move service's tag to front of its group order list +// +const + SPSVCINST_TAGTOFRONT = ($00000001); + {$EXTERNALSYM SPSVCINST_TAGTOFRONT} + +// +// (AddService) **Ex API only** mark this service as the function driver for the +// device being installed +// + SPSVCINST_ASSOCSERVICE = ($00000002); + {$EXTERNALSYM SPSVCINST_ASSOCSERVICE} + +// +// (DelService) delete the associated event log entry for a service specified in +// a DelService entry +// + SPSVCINST_DELETEEVENTLOGENTRY = ($00000004); + {$EXTERNALSYM SPSVCINST_DELETEEVENTLOGENTRY} + +// +// (AddService) don't overwrite display name if it already exists +// + SPSVCINST_NOCLOBBER_DISPLAYNAME = ($00000008); + {$EXTERNALSYM SPSVCINST_NOCLOBBER_DISPLAYNAME} + +// +// (AddService) don't overwrite start type value if service already exists +// + SPSVCINST_NOCLOBBER_STARTTYPE = ($00000010); + {$EXTERNALSYM SPSVCINST_NOCLOBBER_STARTTYPE} + +// +// (AddService) don't overwrite error control value if service already exists +// + SPSVCINST_NOCLOBBER_ERRORCONTROL = ($00000020); + {$EXTERNALSYM SPSVCINST_NOCLOBBER_ERRORCONTROL} + +// +// (AddService) don't overwrite load order group if it already exists +// + SPSVCINST_NOCLOBBER_LOADORDERGROUP = ($00000040); + {$EXTERNALSYM SPSVCINST_NOCLOBBER_LOADORDERGROUP} + +// +// (AddService) don't overwrite dependencies list if it already exists +// + SPSVCINST_NOCLOBBER_DEPENDENCIES = ($00000080); + {$EXTERNALSYM SPSVCINST_NOCLOBBER_DEPENDENCIES} + +// +// (AddService) don't overwrite description if it already exists +// + SPSVCINST_NOCLOBBER_DESCRIPTION = ($00000100); + {$EXTERNALSYM SPSVCINST_NOCLOBBER_DESCRIPTION} + +// +// (DelService) stop the associated service specified in +// a DelService entry before deleting the service +// + SPSVCINST_STOPSERVICE = ($00000200); + {$EXTERNALSYM SPSVCINST_STOPSERVICE} + +function SetupInstallServicesFromInfSectionA(InfHandle: HINF; + const SectionName: PAnsiChar; Flags: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupInstallServicesFromInfSectionA} +function SetupInstallServicesFromInfSectionW(InfHandle: HINF; + const SectionName: PWideChar; Flags: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupInstallServicesFromInfSectionW} +function SetupInstallServicesFromInfSection(InfHandle: HINF; + const SectionName: PChar; Flags: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupInstallServicesFromInfSection} + +function SetupInstallServicesFromInfSectionExA(InfHandle: HINF; + const SectionName: PAnsiChar; Flags: DWORD; DeviceInfoSet: HDEVINFO; + DeviceInfoData: TSPDevInfoData; Reserved1, Reserved2: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupInstallServicesFromInfSectionExA} +function SetupInstallServicesFromInfSectionExW(InfHandle: HINF; + const SectionName: PWideChar; Flags: DWORD; DeviceInfoSet: HDEVINFO; + DeviceInfoData: TSPDevInfoData; Reserved1, Reserved2: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupInstallServicesFromInfSectionExW} +function SetupInstallServicesFromInfSectionEx(InfHandle: HINF; + const SectionName: PChar; Flags: DWORD; DeviceInfoSet: HDEVINFO; + DeviceInfoData: TSPDevInfoData; Reserved1, Reserved2: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupInstallServicesFromInfSectionEx} + +// +// Define handle type for Setup file log. +// + +type + HSPFILELOG = Pointer; + {$EXTERNALSYM HSPFILELOG} + +function SetupInitializeFileLogA(const LogFileName: PAnsiChar; Flags: DWORD): HSPFILELOG; stdcall; +{$EXTERNALSYM SetupInitializeFileLogA} +function SetupInitializeFileLogW(const LogFileName: PWideChar; Flags: DWORD): HSPFILELOG; stdcall; +{$EXTERNALSYM SetupInitializeFileLogW} +function SetupInitializeFileLog(const LogFileName: PChar; Flags: DWORD): HSPFILELOG; stdcall; +{$EXTERNALSYM SetupInitializeFileLog} + +// +// Flags for SetupInitializeFileLog +// +const + SPFILELOG_SYSTEMLOG = $00000001; // use system log -- must be Administrator + {$EXTERNALSYM SPFILELOG_SYSTEMLOG} + SPFILELOG_FORCENEW = $00000002; // not valid with SPFILELOG_SYSTEMLOG + {$EXTERNALSYM SPFILELOG_FORCENEW} + SPFILELOG_QUERYONLY = $00000004; // allows non-administrators to read system log + {$EXTERNALSYM SPFILELOG_QUERYONLY} + +function SetupTerminateFileLog(FileLogHandle: HSPFILELOG): LongBool; stdcall; +{$EXTERNALSYM SetupTerminateFileLog} + +function SetupLogFileA(FileLogHandle: HSPFILELOG; const LogSectionName, + SourceFilename, TargetFilename: PAnsiChar; Checksum: DWORD; DiskTagfile, + DiskDescription, OtherInfo: PAnsiChar; Flags: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupLogFileA} +function SetupLogFileW(FileLogHandle: HSPFILELOG; const LogSectionName, + SourceFilename, TargetFilename: PWideChar; Checksum: DWORD; DiskTagfile, + DiskDescription, OtherInfo: PWideChar; Flags: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupLogFileW} +function SetupLogFile(FileLogHandle: HSPFILELOG; const LogSectionName, + SourceFilename, TargetFilename: PChar; Checksum: DWORD; DiskTagfile, + DiskDescription, OtherInfo: PChar; Flags: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupLogFile} + +// +// Flags for SetupLogFile +// +const + SPFILELOG_OEMFILE = $00000001; + {$EXTERNALSYM SPFILELOG_OEMFILE} + +function SetupRemoveFileLogEntryA(FileLogHandle: HSPFILELOG; + const LogSectionName: PAnsiChar; const TargetFilename: PAnsiChar): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveFileLogEntryA} +function SetupRemoveFileLogEntryW(FileLogHandle: HSPFILELOG; + const LogSectionName: PWideChar; const TargetFilename: PWideChar): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveFileLogEntryW} +function SetupRemoveFileLogEntry(FileLogHandle: HSPFILELOG; + const LogSectionName: PChar; const TargetFilename: PChar): LongBool; stdcall; +{$EXTERNALSYM SetupRemoveFileLogEntry} + +// +// Items retrievable from SetupQueryFileLog() +// + +const + SetupFileLogSourceFilename = $00000000; + {$EXTERNALSYM SetupFileLogSourceFilename} + SetupFileLogChecksum = $00000001; + {$EXTERNALSYM SetupFileLogChecksum} + SetupFileLogDiskTagfile = $00000002; + {$EXTERNALSYM SetupFileLogDiskTagfile} + SetupFileLogDiskDescription = $00000003; + {$EXTERNALSYM SetupFileLogDiskDescription} + SetupFileLogOtherInfo = $00000004; + {$EXTERNALSYM SetupFileLogOtherInfo} + SetupFileLogMax = $00000005; + {$EXTERNALSYM SetupFileLogMax} +type + SetupFileLogInfo = DWORD; + {$EXTERNALSYM SetupFileLogInfo} + +function SetupQueryFileLogA(FileLogHandle: HSPFILELOG; const LogSectionName, + TargetFilename: PAnsiChar; DesiredInfo: SETUPFILELOGINFO; DataOut: PAnsiChar; + ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryFileLogA} +function SetupQueryFileLogW(FileLogHandle: HSPFILELOG; const LogSectionName, + TargetFilename: PWideChar; DesiredInfo: SETUPFILELOGINFO; DataOut: PWideChar; + ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryFileLogW} +function SetupQueryFileLog(FileLogHandle: HSPFILELOG; const LogSectionName, + TargetFilename: PChar; DesiredInfo: SETUPFILELOGINFO; DataOut: PChar; + ReturnBufferSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupQueryFileLog} + +// +// Text logging APIs +// + +type + LogSeverity = DWORD; + {$EXTERNALSYM LogSeverity} + +const + LogSevInformation = $00000000; + {$EXTERNALSYM LogSevInformation} + LogSevWarning = $00000001; + {$EXTERNALSYM LogSevWarning} + LogSevError = $00000002; + {$EXTERNALSYM LogSevError} + LogSevFatalError = $00000003; + {$EXTERNALSYM LogSevFatalError} + LogSevMaximum = $00000004; + {$EXTERNALSYM LogSevMaximum} + +function SetupOpenLog(Erase: LongBool): LongBool; stdcall; +{$EXTERNALSYM SetupOpenLog} + +function SetupLogErrorA(const MessageString: PAnsiChar; Severity: LOGSEVERITY): LongBool; stdcall; +{$EXTERNALSYM SetupLogErrorA} +function SetupLogErrorW(const MessageString: PWideChar; Severity: LOGSEVERITY): LongBool; stdcall; +{$EXTERNALSYM SetupLogErrorW} +function SetupLogError(const MessageString: PChar; Severity: LOGSEVERITY): LongBool; stdcall; +{$EXTERNALSYM SetupLogError} + +procedure SetupCloseLog; stdcall; +{$EXTERNALSYM SetupCloseLog} + +// +// Backup Information API +// + +function SetupGetBackupInformationA(QueueHandle: HSPFILEQ; + var BackupParams: TSPBackupQueueParamsA): LongBool; stdcall; +{$EXTERNALSYM SetupGetBackupInformationA} +function SetupGetBackupInformationW(QueueHandle: HSPFILEQ; + var BackupParams: TSPBackupQueueParamsW): LongBool; stdcall; +{$EXTERNALSYM SetupGetBackupInformationW} +function SetupGetBackupInformation(QueueHandle: HSPFILEQ; + var BackupParams: TSPBackupQueueParamsA): LongBool; stdcall; +{$EXTERNALSYM SetupGetBackupInformation} + +// +// Device Installer APIs +// + +function SetupDiCreateDeviceInfoList(ClassGuid: PGUID; hwndParent: HWND): HDEVINFO; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInfoList} + +function SetupDiCreateDeviceInfoListExA(ClassGuid: PGUID; hwndParent: HWND; + const MachineName: PAnsiChar; Reserved: Pointer): HDEVINFO; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInfoListExA} +function SetupDiCreateDeviceInfoListExW(ClassGuid: PGUID; hwndParent: HWND; + const MachineName: PWideChar; Reserved: Pointer): HDEVINFO; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInfoListExW} +function SetupDiCreateDeviceInfoListEx(ClassGuid: PGUID; hwndParent: HWND; + const MachineName: PChar; Reserved: Pointer): HDEVINFO; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInfoListEx} + +function SetupDiGetDeviceInfoListClass(DeviceInfoSet: HDEVINFO; + var ClassGuid: TGUID): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInfoListClass} + +function SetupDiGetDeviceInfoListDetailA(DeviceInfoSet: HDEVINFO; + var DeviceInfoSetDetailData: TSPDevInfoListDetailDataA): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInfoListDetailA} +function SetupDiGetDeviceInfoListDetailW(DeviceInfoSet: HDEVINFO; + var DeviceInfoSetDetailData: TSPDevInfoListDetailDataW): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInfoListDetailW} +function SetupDiGetDeviceInfoListDetail(DeviceInfoSet: HDEVINFO; + var DeviceInfoSetDetailData: TSPDevInfoListDetailDataA): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInfoListDetail} + +// +// Flags for SetupDiCreateDeviceInfo +// +const + DICD_GENERATE_ID = $00000001; + {$EXTERNALSYM DICD_GENERATE_ID} + DICD_INHERIT_CLASSDRVS = $00000002; + {$EXTERNALSYM DICD_INHERIT_CLASSDRVS} + +function SetupDiCreateDeviceInfoA(DeviceInfoSet: HDEVINFO; const DeviceName: PAnsiChar; + var ClassGuid: TGUID; const DeviceDescription: PAnsiChar; hwndParent: HWND; + CreationFlags: DWORD; DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInfoA} + +function SetupDiCreateDeviceInfoW(DeviceInfoSet: HDEVINFO; const DeviceName: PWideChar; + var ClassGuid: TGUID; const DeviceDescription: PWideChar; hwndParent: HWND; + CreationFlags: DWORD; DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInfoW} + +function SetupDiCreateDeviceInfo(DeviceInfoSet: HDEVINFO; const DeviceName: PChar; + var ClassGuid: TGUID; const DeviceDescription: PChar; hwndParent: HWND; + CreationFlags: DWORD; DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInfo} + + +// +// Flags for SetupDiOpenDeviceInfo +// +const + DIOD_INHERIT_CLASSDRVS = $00000002; + {$EXTERNALSYM DIOD_INHERIT_CLASSDRVS} + DIOD_CANCEL_REMOVE = $00000004; + {$EXTERNALSYM DIOD_CANCEL_REMOVE} + +function SetupDiOpenDeviceInfoA(DeviceInfoSet: HDEVINFO; + const DeviceInstanceId: PAnsiChar; hwndParent: HWND; OpenFlags: DWORD; + DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiOpenDeviceInfoA} +function SetupDiOpenDeviceInfoW(DeviceInfoSet: HDEVINFO; + const DeviceInstanceId: PWideChar; hwndParent: HWND; OpenFlags: DWORD; + DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiOpenDeviceInfoW} +function SetupDiOpenDeviceInfo(DeviceInfoSet: HDEVINFO; + const DeviceInstanceId: PChar; hwndParent: HWND; OpenFlags: DWORD; + DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiOpenDeviceInfo} + +function SetupDiGetDeviceInstanceIdA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; DeviceInstanceId: PAnsiChar; + DeviceInstanceIdSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInstanceIdA} +function SetupDiGetDeviceInstanceIdW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; DeviceInstanceId: PWideChar; + DeviceInstanceIdSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInstanceIdW} +function SetupDiGetDeviceInstanceId(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; DeviceInstanceId: PChar; + DeviceInstanceIdSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInstanceId} + +function SetupDiDeleteDeviceInfo(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiDeleteDeviceInfo} + +function SetupDiEnumDeviceInfo(DeviceInfoSet: HDEVINFO; + MemberIndex: DWORD; var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiEnumDeviceInfo} + +function SetupDiDestroyDeviceInfoList(DeviceInfoSet: HDEVINFO): LongBool; stdcall; +{$EXTERNALSYM SetupDiDestroyDeviceInfoList} + +function SetupDiEnumDeviceInterfaces(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var InterfaceClassGuid: TGUID; + MemberIndex: DWORD; var DeviceInterfaceData: TSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiEnumDeviceInterfaces} + +// +// Backward compatibility--do not use +// + +function SetupDiEnumInterfaceDevice(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var InterfaceClassGuid: TGUID; + MemberIndex: DWORD; var DeviceInterfaceData: TSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiEnumDeviceInterfaces} + +function SetupDiCreateDeviceInterfaceA(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; var InterfaceClassGuid: TGUID; + const ReferenceString: PAnsiChar; CreationFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInterfaceA} +function SetupDiCreateDeviceInterfaceW(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; var InterfaceClassGuid: TGUID; + const ReferenceString: PWideChar; CreationFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInterfaceW} +function SetupDiCreateDeviceInterface(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; var InterfaceClassGuid: TGUID; + const ReferenceString: PChar; CreationFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInterface} + +// +// Backward compatibility--do not use. +// + +function SetupDiCreateInterfaceDeviceA(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; var InterfaceClassGuid: TGUID; + const ReferenceString: PAnsiChar; CreationFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiCreateInterfaceDeviceA} +function SetupDiCreateInterfaceDeviceW(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; var InterfaceClassGuid: TGUID; + const ReferenceString: PWideChar; CreationFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiCreateInterfaceDeviceW} +function SetupDiCreateInterfaceDevice(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; var InterfaceClassGuid: TGUID; + const ReferenceString: PChar; CreationFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiCreateInterfaceDevice} + +// +// Flags for SetupDiOpenDeviceInterface +// +const + DIODI_NO_ADD = $00000001; + {$EXTERNALSYM DIODI_NO_ADD} + +function SetupDiOpenDeviceInterfaceA(DeviceInfoSet: HDEVINFO; + const DevicePath: PAnsiChar; OpenFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiOpenDeviceInterfaceA} +function SetupDiOpenDeviceInterfaceW(DeviceInfoSet: HDEVINFO; + const DevicePath: PWideChar; OpenFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiOpenDeviceInterfaceW} +function SetupDiOpenDeviceInterface(DeviceInfoSet: HDEVINFO; + const DevicePath: PChar; OpenFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiOpenDeviceInterface} + +// +// Backward compatibility--do not use +// + +function SetupDiOpenInterfaceDeviceA(DeviceInfoSet: HDEVINFO; + const DevicePath: PAnsiChar; OpenFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiOpenInterfaceDeviceA} +function SetupDiOpenInterfaceDeviceW(DeviceInfoSet: HDEVINFO; + const DevicePath: PWideChar; OpenFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiOpenInterfaceDeviceW} +function SetupDiOpenInterfaceDevice(DeviceInfoSet: HDEVINFO; + const DevicePath: PChar; OpenFlags: DWORD; + DeviceInterfaceData: PSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiOpenInterfaceDevice} + +function SetupDiGetDeviceInterfaceAlias(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; var AliasInterfaceClassGuid: TGUID; + var AliasDeviceInterfaceData: TSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInterfaceAlias} + +// +// Backward compatibility--do not use. +// + +function SetupDiGetInterfaceDeviceAlias(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; + var AliasInterfaceClassGuid: TGUID; + var AliasDeviceInterfaceData: TSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetInterfaceDeviceAlias} + +function SetupDiDeleteDeviceInterfaceData(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiDeleteDeviceInterfaceData} + +// +// Backward compatibility--do not use. +// + +function SetupDiDeleteInterfaceDeviceData(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiDeleteInterfaceDeviceData} + +function SetupDiRemoveDeviceInterface(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiRemoveDeviceInterface} + +// +// Backward compatibility--do not use. +// + +function SetupDiRemoveInterfaceDevice(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData): LongBool; stdcall; +{$EXTERNALSYM SetupDiRemoveInterfaceDevice} + +function SetupDiGetDeviceInterfaceDetailA(DeviceInfoSet: HDEVINFO; + DeviceInterfaceData: PSPDeviceInterfaceData; + DeviceInterfaceDetailData: PSPDeviceInterfaceDetailDataA; + DeviceInterfaceDetailDataSize: DWORD; RequiredSize: PDWORD; + Device: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInterfaceDetailA} +function SetupDiGetDeviceInterfaceDetailW(DeviceInfoSet: HDEVINFO; + DeviceInterfaceData: PSPDeviceInterfaceData; + DeviceInterfaceDetailData: PSPDeviceInterfaceDetailDataW; + DeviceInterfaceDetailDataSize: DWORD; RequiredSize: PDWORD; + Device: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInterfaceDetailW} +function SetupDiGetDeviceInterfaceDetail(DeviceInfoSet: HDEVINFO; + DeviceInterfaceData: PSPDeviceInterfaceData; + DeviceInterfaceDetailData: PSPDeviceInterfaceDetailDataA; + DeviceInterfaceDetailDataSize: DWORD; RequiredSize: PDWORD; + Device: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInterfaceDetail} + +// +// Backward compatibility--do not use. +// + +function SetupDiGetInterfaceDeviceDetailA(DeviceInfoSet: HDEVINFO; + DeviceInterfaceData: PSPDeviceInterfaceData; + DeviceInterfaceDetailData: PSPDeviceInterfaceDetailDataA; + DeviceInterfaceDetailDataSize: DWORD; RequiredSize: PDWORD; + Device: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetInterfaceDeviceDetailA} +function SetupDiGetInterfaceDeviceDetailW(DeviceInfoSet: HDEVINFO; + DeviceInterfaceData: PSPDeviceInterfaceData; + DeviceInterfaceDetailData: PSPDeviceInterfaceDetailDataW; + DeviceInterfaceDetailDataSize: DWORD; RequiredSize: PDWORD; + Device: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetInterfaceDeviceDetailW} +function SetupDiGetInterfaceDeviceDetail(DeviceInfoSet: HDEVINFO; + DeviceInterfaceData: PSPDeviceInterfaceData; + DeviceInterfaceDetailData: PSPDeviceInterfaceDetailDataA; + DeviceInterfaceDetailDataSize: DWORD; RequiredSize: PDWORD; + Device: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetInterfaceDeviceDetail} + +// +// Default install handler for DIF_INSTALLINTERFACES. +// + +function SetupDiInstallDeviceInterfaces(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiInstallDeviceInterfaces} + +// +// Backward compatibility--do not use. +// + +function SetupDiInstallInterfaceDevices(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiInstallInterfaceDevices} + +// +// Default install handler for DIF_REGISTERDEVICE +// + +// +// Flags for SetupDiRegisterDeviceInfo +// +const + SPRDI_FIND_DUPS = $00000001; + {$EXTERNALSYM SPRDI_FIND_DUPS} + +function SetupDiRegisterDeviceInfo(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Flags: DWORD; CompareProc: TSPDetSigCmpProc; + CompareContext: Pointer; DupDeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiRegisterDeviceInfo} + +// +// Ordinal values distinguishing between class drivers and +// device drivers. +// (Passed in 'DriverType' parameter of driver information list APIs) +// +const + SPDIT_NODRIVER = $00000000; + {$EXTERNALSYM SPDIT_NODRIVER} + SPDIT_CLASSDRIVER = $00000001; + {$EXTERNALSYM SPDIT_CLASSDRIVER} + SPDIT_COMPATDRIVER = $00000002; + {$EXTERNALSYM SPDIT_COMPATDRIVER} + +function SetupDiBuildDriverInfoList(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; DriverType: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiBuildDriverInfoList} + +function SetupDiCancelDriverInfoSearch(DeviceInfoSet: HDEVINFO): LongBool; stdcall; +{$EXTERNALSYM SetupDiCancelDriverInfoSearch} + +function SetupDiEnumDriverInfoA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; DriverType: DWORD; MemberIndex: DWORD; + var DriverInfoData: TSPDrvInfoDataA): LongBool; stdcall; +{$EXTERNALSYM SetupDiEnumDriverInfoA} +function SetupDiEnumDriverInfoW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; DriverType: DWORD; MemberIndex: DWORD; + var DriverInfoData: TSPDrvInfoDataW): LongBool; stdcall; +{$EXTERNALSYM SetupDiEnumDriverInfoW} +function SetupDiEnumDriverInfo(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; DriverType: DWORD; MemberIndex: DWORD; + var DriverInfoData: TSPDrvInfoDataA): LongBool; stdcall; +{$EXTERNALSYM SetupDiEnumDriverInfo} + +function SetupDiGetSelectedDriverA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataA): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetSelectedDriverA} +function SetupDiGetSelectedDriverW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataW): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetSelectedDriverW} +function SetupDiGetSelectedDriver(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataA): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetSelectedDriver} + +function SetupDiSetSelectedDriverA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; DriverInfoData: PSPDrvInfoDataA): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetSelectedDriverA} +function SetupDiSetSelectedDriverW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; DriverInfoData: PSPDrvInfoDataW): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetSelectedDriverW} +function SetupDiSetSelectedDriver(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; DriverInfoData: PSPDrvInfoDataA): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetSelectedDriver} + +function SetupDiGetDriverInfoDetailA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataA; + DriverInfoDetailData: PSPDrvInfoDetailDataA; DriverInfoDetailDataSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDriverInfoDetailA} +function SetupDiGetDriverInfoDetailW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataW; + DriverInfoDetailData: PSPDrvInfoDetailDataW; DriverInfoDetailDataSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDriverInfoDetailW} +function SetupDiGetDriverInfoDetail(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataA; + DriverInfoDetailData: PSPDrvInfoDetailDataA; DriverInfoDetailDataSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDriverInfoDetail} + +function SetupDiDestroyDriverInfoList(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; DriverType: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiDestroyDriverInfoList} + +// +// Flags controlling what is included in the device information set built +// by SetupDiGetClassDevs +// +const + DIGCF_DEFAULT = $00000001; // only valid with DIGCF_DEVICEINTERFACE + {$EXTERNALSYM DIGCF_DEFAULT} + DIGCF_PRESENT = $00000002; + {$EXTERNALSYM DIGCF_PRESENT} + DIGCF_ALLCLASSES = $00000004; + {$EXTERNALSYM DIGCF_ALLCLASSES} + DIGCF_PROFILE = $00000008; + {$EXTERNALSYM DIGCF_PROFILE} + DIGCF_DEVICEINTERFACE = $00000010; + {$EXTERNALSYM DIGCF_DEVICEINTERFACE} + +// +// Backward compatibility--do not use. +// + +const + DIGCF_INTERFACEDEVICE = DIGCF_DEVICEINTERFACE; +{$EXTERNALSYM DIGCF_INTERFACEDEVICE} + +function SetupDiGetClassDevsA(ClassGuid: PGUID; const Enumerator: PAnsiChar; + hwndParent: HWND; Flags: DWORD): HDEVINFO; stdcall; +{$EXTERNALSYM SetupDiGetClassDevsA} +function SetupDiGetClassDevsW(ClassGuid: PGUID; const Enumerator: PWideChar; + hwndParent: HWND; Flags: DWORD): HDEVINFO; stdcall; +{$EXTERNALSYM SetupDiGetClassDevsW} +function SetupDiGetClassDevs(ClassGuid: PGUID; const Enumerator: PChar; + hwndParent: HWND; Flags: DWORD): HDEVINFO; stdcall; +{$EXTERNALSYM SetupDiGetClassDevs} + +function SetupDiGetClassDevsExA(ClassGuid: PGUID; const Enumerator: PAnsiChar; + hwndParent: HWND; Flags: DWORD; DeviceInfoSet: HDEVINFO; const MachineName: PAnsiChar; + Reserved: Pointer): HDEVINFO; stdcall; +{$EXTERNALSYM SetupDiGetClassDevsExA} +function SetupDiGetClassDevsExW(ClassGuid: PGUID; const Enumerator: PWideChar; + hwndParent: HWND; Flags: DWORD; DeviceInfoSet: HDEVINFO; const MachineName: PWideChar; + Reserved: Pointer): HDEVINFO; stdcall; +{$EXTERNALSYM SetupDiGetClassDevsExW} +function SetupDiGetClassDevsEx(ClassGuid: PGUID; const Enumerator: PChar; + hwndParent: HWND; Flags: DWORD; DeviceInfoSet: HDEVINFO; const MachineName: PChar; + Reserved: Pointer): HDEVINFO; stdcall; +{$EXTERNALSYM SetupDiGetClassDevsEx} + +function SetupDiGetINFClassA(const InfName: PAnsiChar; var ClassGuid: TGUID; + ClassName: PAnsiChar; ClassNameSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetINFClassA} +function SetupDiGetINFClassW(const InfName: PWideChar; var ClassGuid: TGUID; + ClassName: PWideChar; ClassNameSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetINFClassW} +function SetupDiGetINFClass(const InfName: PChar; var ClassGuid: TGUID; + ClassName: PChar; ClassNameSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetINFClass} + +// +// Flags controlling exclusion from the class information list built +// by SetupDiBuildClassInfoList(Ex) +// +const + DIBCI_NOINSTALLCLASS = $00000001; + {$EXTERNALSYM DIBCI_NOINSTALLCLASS} + DIBCI_NODISPLAYCLASS = $00000002; + {$EXTERNALSYM DIBCI_NODISPLAYCLASS} + +function SetupDiBuildClassInfoList(Flags: DWORD; ClassGuidList: PGUID; + ClassGuidListSize: DWORD; var RequiredSize: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiBuildClassInfoList} + +function SetupDiBuildClassInfoListExA(Flags: DWORD; ClassGuidList: PGUID; + ClassGuidListSize: DWORD; var RequiredSize: DWORD; const MachineName: PAnsiChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiBuildClassInfoListExA} +function SetupDiBuildClassInfoListExW(Flags: DWORD; ClassGuidList: PGUID; + ClassGuidListSize: DWORD; var RequiredSize: DWORD; const MachineName: PWideChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiBuildClassInfoListExW} +function SetupDiBuildClassInfoListEx(Flags: DWORD; ClassGuidList: PGUID; + ClassGuidListSize: DWORD; var RequiredSize: DWORD; const MachineName: PChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiBuildClassInfoListEx} + +function SetupDiGetClassDescriptionA(var ClassGuid: TGUID; ClassDescription: PAnsiChar; + ClassDescriptionSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassDescriptionA} +function SetupDiGetClassDescriptionW(var ClassGuid: TGUID; ClassDescription: PWideChar; + ClassDescriptionSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassDescriptionW} +function SetupDiGetClassDescription(var ClassGuid: TGUID; ClassDescription: PChar; + ClassDescriptionSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassDescription} + +function SetupDiGetClassDescriptionExA(var ClassGuid: TGUID; + ClassDescription: PAnsiChar; ClassDescriptionSize: DWORD; RequiredSize: PDWORD; + const MachineName: PAnsiChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassDescriptionExA} +function SetupDiGetClassDescriptionExW(var ClassGuid: TGUID; + ClassDescription: PWideChar; ClassDescriptionSize: DWORD; RequiredSize: PDWORD; + const MachineName: PWideChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassDescriptionExW} +function SetupDiGetClassDescriptionEx(var ClassGuid: TGUID; + ClassDescription: PChar; ClassDescriptionSize: DWORD; RequiredSize: PDWORD; + const MachineName: PChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassDescriptionEx} + +function SetupDiCallClassInstaller(InstallFunction: DI_FUNCTION; + DeviceInfoSet: HDEVINFO; DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiCallClassInstaller} + +// +// Default install handler for DIF_SELECTDEVICE +// + +function SetupDiSelectDevice(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiSelectDevice} + +// +// Default install handler for DIF_SELECTBESTCOMPATDRV +// + +function SetupDiSelectBestCompatDrv(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiSelectBestCompatDrv} + +// +// Default install handler for DIF_INSTALLDEVICE +// +function SetupDiInstallDevice(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiInstallDevice} + +// +// Default install handler for DIF_INSTALLDEVICEFILES +// + +function SetupDiInstallDriverFiles(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiInstallDriverFiles} + +// +// Default install handler for DIF_REGISTER_COINSTALLERS +// +function SetupDiRegisterCoDeviceInstallers(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiRegisterCoDeviceInstallers} + +// +// Default install handler for DIF_REMOVE +// + +function SetupDiRemoveDevice(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiRemoveDevice} + +// +// Default install handler for DIF_UNREMOVE +// + +function SetupDiUnremoveDevice(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiUnremoveDevice} + +// +// Default install handler for DIF_MOVEDEVICE +// +function SetupDiMoveDuplicateDevice(DeviceInfoSet: HDEVINFO; + var DestinationDeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiMoveDuplicateDevice} + +// +// Default install handler for DIF_PROPERTYCHANGE +// +function SetupDiChangeState(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiChangeState} + +function SetupDiInstallClassA(hwndParent: HWND; const InfFileName: PAnsiChar; + Flags: DWORD; FileQueue: HSPFILEQ): LongBool; stdcall; +{$EXTERNALSYM SetupDiInstallClassA} +function SetupDiInstallClassW(hwndParent: HWND; const InfFileName: PWideChar; + Flags: DWORD; FileQueue: HSPFILEQ): LongBool; stdcall; +{$EXTERNALSYM SetupDiInstallClassW} +function SetupDiInstallClass(hwndParent: HWND; const InfFileName: PChar; + Flags: DWORD; FileQueue: HSPFILEQ): LongBool; stdcall; +{$EXTERNALSYM SetupDiInstallClass} + +function SetupDiInstallClassExA(hwndParent: HWND; const InfFileName: PAnsiChar; + Flags: DWORD; FileQueue: HSPFILEQ; InterfaceClassGuid: PGUID; Reserved1, + Reserved2: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiInstallClassExA} +function SetupDiInstallClassExW(hwndParent: HWND; const InfFileName: PWideChar; + Flags: DWORD; FileQueue: HSPFILEQ; InterfaceClassGuid: PGUID; Reserved1, + Reserved2: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiInstallClassExW} +function SetupDiInstallClassEx(hwndParent: HWND; const InfFileName: PChar; + Flags: DWORD; FileQueue: HSPFILEQ; InterfaceClassGuid: PGUID; Reserved1, + Reserved2: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiInstallClassEx} + +function SetupDiOpenClassRegKey(ClassGuid: PGUID; samDesired: REGSAM): HKEY; stdcall; +{$EXTERNALSYM SetupDiOpenClassRegKey} + +// +// Flags for SetupDiOpenClassRegKeyEx +// +const + DIOCR_INSTALLER = $00000001; // class installer registry branch + {$EXTERNALSYM DIOCR_INSTALLER} + DIOCR_INTERFACE = $00000002; // interface class registry branch + {$EXTERNALSYM DIOCR_INTERFACE} + +function SetupDiOpenClassRegKeyExA(ClassGuid: PGUID; samDesired: REGSAM; + Flags: DWORD; const MachineName: PAnsiChar; Reserved: Pointer): HKEY; stdcall; +{$EXTERNALSYM SetupDiOpenClassRegKeyExA} +function SetupDiOpenClassRegKeyExW(ClassGuid: PGUID; samDesired: REGSAM; + Flags: DWORD; const MachineName: PWideChar; Reserved: Pointer): HKEY; stdcall; +{$EXTERNALSYM SetupDiOpenClassRegKeyExW} +function SetupDiOpenClassRegKeyEx(ClassGuid: PGUID; samDesired: REGSAM; + Flags: DWORD; const MachineName: PChar; Reserved: Pointer): HKEY; stdcall; +{$EXTERNALSYM SetupDiOpenClassRegKeyEx} + +function SetupDiCreateDeviceInterfaceRegKeyA(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; Reserved: DWORD; + samDesired: REGSAM; InfHandle: HINF; const InfSectionName: PAnsiChar): HKEY; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInterfaceRegKeyA} +function SetupDiCreateDeviceInterfaceRegKeyW(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; Reserved: DWORD; + samDesired: REGSAM; InfHandle: HINF; const InfSectionName: PWideChar): HKEY; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInterfaceRegKeyW} +function SetupDiCreateDeviceInterfaceRegKey(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; Reserved: DWORD; + samDesired: REGSAM; InfHandle: HINF; const InfSectionName: PChar): HKEY; stdcall; +{$EXTERNALSYM SetupDiCreateDeviceInterfaceRegKey} + +// +// Backward compatibility--do not use. +// + +function SetupDiCreateInterfaceDeviceRegKeyA(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; Reserved: DWORD; + samDesired: REGSAM; InfHandle: HINF; const InfSectionName: PAnsiChar): HKEY; stdcall; +{$EXTERNALSYM SetupDiCreateInterfaceDeviceRegKeyA} +function SetupDiCreateInterfaceDeviceRegKeyW(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; Reserved: DWORD; + samDesired: REGSAM; InfHandle: HINF; const InfSectionName: PWideChar): HKEY; stdcall; +{$EXTERNALSYM SetupDiCreateInterfaceDeviceRegKeyW} +function SetupDiCreateInterfaceDeviceRegKey(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; Reserved: DWORD; + samDesired: REGSAM; InfHandle: HINF; const InfSectionName: PChar): HKEY; stdcall; +{$EXTERNALSYM SetupDiCreateInterfaceDeviceRegKey} + +function SetupDiOpenDeviceInterfaceRegKey(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; Reserved: DWORD; + samDesired: REGSAM): HKEY; stdcall; +{$EXTERNALSYM SetupDiOpenDeviceInterfaceRegKey} + +// +// Backward compatibility--do not use. +// + +function SetupDiOpenInterfaceDeviceRegKey(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; Reserved: DWORD; + samDesired: REGSAM): HKEY; stdcall; +{$EXTERNALSYM SetupDiOpenInterfaceDeviceRegKey} + +function SetupDiDeleteDeviceInterfaceRegKey(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; Reserved: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiDeleteDeviceInterfaceRegKey} + +// +// Backward compatibility--do not use. +// + +function SetupDiDeleteInterfaceDeviceRegKey(DeviceInfoSet: HDEVINFO; + var DeviceInterfaceData: TSPDeviceInterfaceData; Reserved: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiDeleteInterfaceDeviceRegKey} + +// +// KeyType values for SetupDiCreateDevRegKey, SetupDiOpenDevRegKey, and +// SetupDiDeleteDevRegKey. +// +const + DIREG_DEV = $00000001; // Open/Create/Delete device key + {$EXTERNALSYM DIREG_DEV} + DIREG_DRV = $00000002; // Open/Create/Delete driver key + {$EXTERNALSYM DIREG_DRV} + DIREG_BOTH = $00000004; // Delete both driver and Device key + {$EXTERNALSYM DIREG_BOTH} + +function SetupDiCreateDevRegKeyA(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Scope, HwProfile, KeyType: DWORD; + InfHandle: HINF; const InfSectionName: PAnsiChar): HKEY; stdcall; +{$EXTERNALSYM SetupDiCreateDevRegKeyA} + +function SetupDiCreateDevRegKeyW(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Scope, HwProfile, KeyType: DWORD; + InfHandle: HINF; const InfSectionName: PWideChar): HKEY; stdcall; +{$EXTERNALSYM SetupDiCreateDevRegKeyW} + +function SetupDiCreateDevRegKey(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Scope, HwProfile, KeyType: DWORD; + InfHandle: HINF; const InfSectionName: PChar): HKEY; stdcall; +{$EXTERNALSYM SetupDiCreateDevRegKey} + + +function SetupDiOpenDevRegKey(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Scope, HwProfile, KeyType: DWORD; + samDesired: REGSAM): HKEY; stdcall; +{$EXTERNALSYM SetupDiOpenDevRegKey} + +function SetupDiDeleteDevRegKey(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Scope, HwProfile, + KeyType: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiDeleteDevRegKey} + +function SetupDiGetHwProfileList(HwProfileList: PDWORD; HwProfileListSize: DWORD; + var RequiredSize: DWORD; CurrentlyActiveIndex: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetHwProfileList} + +function SetupDiGetHwProfileListExA(HwProfileList: PDWORD; + HwProfileListSize: DWORD; var RequiredSize: DWORD; CurrentlyActiveIndex: PDWORD; + const MachineName: PAnsiChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetHwProfileListExA} +function SetupDiGetHwProfileListExW(HwProfileList: PDWORD; + HwProfileListSize: DWORD; var RequiredSize: DWORD; CurrentlyActiveIndex: PDWORD; + const MachineName: PWideChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetHwProfileListExW} +function SetupDiGetHwProfileListEx(HwProfileList: PDWORD; + HwProfileListSize: DWORD; var RequiredSize: DWORD; CurrentlyActiveIndex: PDWORD; + const MachineName: PChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetHwProfileListEx} + +// +// Device registry property codes +// (Codes marked as read-only (R) may only be used for +// SetupDiGetDeviceRegistryProperty) +// +// These values should cover the same set of registry properties +// as defined by the CM_DRP codes in cfgmgr32.h. +// +const + SPDRP_DEVICEDESC = $00000000; // DeviceDesc (R/W) + {$EXTERNALSYM SPDRP_DEVICEDESC} + SPDRP_HARDWAREID = $00000001; // HardwareID (R/W) + {$EXTERNALSYM SPDRP_HARDWAREID} + SPDRP_COMPATIBLEIDS = $00000002; // CompatibleIDs (R/W) + {$EXTERNALSYM SPDRP_COMPATIBLEIDS} + SPDRP_UNUSED0 = $00000003; // unused + {$EXTERNALSYM SPDRP_UNUSED0} + SPDRP_SERVICE = $00000004; // Service (R/W) + {$EXTERNALSYM SPDRP_SERVICE} + SPDRP_UNUSED1 = $00000005; // unused + {$EXTERNALSYM SPDRP_UNUSED1} + SPDRP_UNUSED2 = $00000006; // unused + {$EXTERNALSYM SPDRP_UNUSED2} + SPDRP_CLASS = $00000007; // Class (R--tied to ClassGUID) + {$EXTERNALSYM SPDRP_CLASS} + SPDRP_CLASSGUID = $00000008; // ClassGUID (R/W) + {$EXTERNALSYM SPDRP_CLASSGUID} + SPDRP_DRIVER = $00000009; // Driver (R/W) + {$EXTERNALSYM SPDRP_DRIVER} + SPDRP_CONFIGFLAGS = $0000000A; // ConfigFlags (R/W) + {$EXTERNALSYM SPDRP_CONFIGFLAGS} + SPDRP_MFG = $0000000B; // Mfg (R/W) + {$EXTERNALSYM SPDRP_MFG} + SPDRP_FRIENDLYNAME = $0000000C; // FriendlyName (R/W) + {$EXTERNALSYM SPDRP_FRIENDLYNAME} + SPDRP_LOCATION_INFORMATION = $0000000D; // LocationInformation (R/W) + {$EXTERNALSYM SPDRP_LOCATION_INFORMATION} + SPDRP_PHYSICAL_DEVICE_OBJECT_NAME = $0000000E; // PhysicalDeviceObjectName (R) + {$EXTERNALSYM SPDRP_PHYSICAL_DEVICE_OBJECT_NAME} + SPDRP_CAPABILITIES = $0000000F; // Capabilities (R) + {$EXTERNALSYM SPDRP_CAPABILITIES} + SPDRP_UI_NUMBER = $00000010; // UiNumber (R) + {$EXTERNALSYM SPDRP_UI_NUMBER} + SPDRP_UPPERFILTERS = $00000011; // UpperFilters (R/W) + {$EXTERNALSYM SPDRP_UPPERFILTERS} + SPDRP_LOWERFILTERS = $00000012; // LowerFilters (R/W) + {$EXTERNALSYM SPDRP_LOWERFILTERS} + SPDRP_BUSTYPEGUID = $00000013; // BusTypeGUID (R) + {$EXTERNALSYM SPDRP_BUSTYPEGUID} + SPDRP_LEGACYBUSTYPE = $00000014; // LegacyBusType (R) + {$EXTERNALSYM SPDRP_LEGACYBUSTYPE} + SPDRP_BUSNUMBER = $00000015; // BusNumber (R) + {$EXTERNALSYM SPDRP_BUSNUMBER} + SPDRP_ENUMERATOR_NAME = $00000016; // Enumerator Name (R) + {$EXTERNALSYM SPDRP_ENUMERATOR_NAME} + SPDRP_SECURITY = $00000017; // Security (R/W, binary form) + {$EXTERNALSYM SPDRP_SECURITY} + SPDRP_SECURITY_SDS = $00000018; // Security (W, SDS form) + {$EXTERNALSYM SPDRP_SECURITY_SDS} + SPDRP_DEVTYPE = $00000019; // Device Type (R/W) + {$EXTERNALSYM SPDRP_DEVTYPE} + SPDRP_EXCLUSIVE = $0000001A; // Device is exclusive-access (R/W) + {$EXTERNALSYM SPDRP_EXCLUSIVE} + SPDRP_CHARACTERISTICS = $0000001B; // Device Characteristics (R/W) + {$EXTERNALSYM SPDRP_CHARACTERISTICS} + SPDRP_ADDRESS = $0000001C; // Device Address (R) + {$EXTERNALSYM SPDRP_ADDRESS} + SPDRP_UI_NUMBER_DESC_FORMAT = $0000001E; // UiNumberDescFormat (R/W) + {$EXTERNALSYM SPDRP_UI_NUMBER_DESC_FORMAT} + SPDRP_MAXIMUM_PROPERTY = $0000001F; // Upper bound on ordinals + {$EXTERNALSYM SPDRP_MAXIMUM_PROPERTY} +// +// Class registry property codes +// (Codes marked as read-only (R) may only be used for +// SetupDiGetClassRegistryProperty) +// +// These values should cover the same set of registry properties +// as defined by the CM_CRP codes in cfgmgr32.h. +// they should also have a 1:1 correspondence with Device registers, where applicable +// but no overlap otherwise +// + SPCRP_SECURITY = $00000017; // Security (R/W, binary form) + {$EXTERNALSYM SPCRP_SECURITY} + SPCRP_SECURITY_SDS = $00000018; // Security (W, SDS form) + {$EXTERNALSYM SPCRP_SECURITY_SDS} + SPCRP_DEVTYPE = $00000019; // Device Type (R/W) + {$EXTERNALSYM SPCRP_DEVTYPE} + SPCRP_EXCLUSIVE = $0000001A; // Device is exclusive-access (R/W) + {$EXTERNALSYM SPCRP_EXCLUSIVE} + SPCRP_CHARACTERISTICS = $0000001B; // Device Characteristics (R/W) + {$EXTERNALSYM SPCRP_CHARACTERISTICS} + SPCRP_MAXIMUM_PROPERTY = $0000001C; // Upper bound on ordinals + {$EXTERNALSYM SPCRP_MAXIMUM_PROPERTY} + +function SetupDiGetDeviceRegistryPropertyA(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Property_: DWORD; + PropertyRegDataType: PDWORD; PropertyBuffer: PBYTE; PropertyBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceRegistryPropertyA} +function SetupDiGetDeviceRegistryPropertyW(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Property_: DWORD; + PropertyRegDataType: PDWORD; PropertyBuffer: PBYTE; PropertyBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceRegistryPropertyW} +function SetupDiGetDeviceRegistryProperty(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Property_: DWORD; + PropertyRegDataType: PDWORD; PropertyBuffer: PBYTE; PropertyBufferSize: DWORD; + RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceRegistryProperty} + +function SetupDiGetClassRegistryPropertyA(var ClassGuid: TGUID; + Property_: DWORD; PropertyRegDataType: PDWORD; PropertyBuffer: PBYTE; + PropertyBufferSize: DWORD; RequiredSize: PDWORD; const MachineName: PAnsiChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassRegistryPropertyA} +function SetupDiGetClassRegistryPropertyW(var ClassGuid: TGUID; + Property_: DWORD; PropertyRegDataType: PDWORD; PropertyBuffer: PBYTE; + PropertyBufferSize: DWORD; RequiredSize: PDWORD; const MachineName: PWideChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassRegistryPropertyW} +function SetupDiGetClassRegistryProperty(var ClassGuid: TGUID; + Property_: DWORD; PropertyRegDataType: PDWORD; PropertyBuffer: PBYTE; + PropertyBufferSize: DWORD; RequiredSize: PDWORD; const MachineName: PChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassRegistryProperty} + +function SetupDiSetDeviceRegistryPropertyA(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Property_: DWORD; + const PropertyBuffer: PBYTE; PropertyBufferSize: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetDeviceRegistryPropertyA} +function SetupDiSetDeviceRegistryPropertyW(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Property_: DWORD; + const PropertyBuffer: PBYTE; PropertyBufferSize: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetDeviceRegistryPropertyW} +function SetupDiSetDeviceRegistryProperty(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData; Property_: DWORD; + const PropertyBuffer: PBYTE; PropertyBufferSize: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetDeviceRegistryProperty} + +function SetupDiSetClassRegistryPropertyA(var ClassGuid: TGUID; + Property_: DWORD; const PropertyBuffer: PBYTE; PropertyBufferSize: DWORD; + const MachineName: PAnsiChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetClassRegistryPropertyA} +function SetupDiSetClassRegistryPropertyW(var ClassGuid: TGUID; + Property_: DWORD; const PropertyBuffer: PBYTE; PropertyBufferSize: DWORD; + const MachineName: PWideChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetClassRegistryPropertyW} +function SetupDiSetClassRegistryProperty(var ClassGuid: TGUID; + Property_: DWORD; const PropertyBuffer: PBYTE; PropertyBufferSize: DWORD; + const MachineName: PChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetClassRegistryProperty} + +function SetupDiGetDeviceInstallParamsA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; + var DeviceInstallParams: TSPDevInstallParamsA): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInstallParamsA} + +function SetupDiGetDeviceInstallParamsW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; + var DeviceInstallParams: TSPDevInstallParamsW): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInstallParamsW} + +function SetupDiGetDeviceInstallParams(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; + var DeviceInstallParams: TSPDevInstallParamsA): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDeviceInstallParams} + + +function SetupDiGetClassInstallParamsA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; ClassInstallParams: PSPClassInstallHeader; + ClassInstallParamsSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassInstallParamsA} +function SetupDiGetClassInstallParamsW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; ClassInstallParams: PSPClassInstallHeader; + ClassInstallParamsSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassInstallParamsW} +function SetupDiGetClassInstallParams(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; ClassInstallParams: PSPClassInstallHeader; + ClassInstallParamsSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassInstallParams} + +function SetupDiSetDeviceInstallParamsA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; + var DeviceInstallParams: TSPDevInstallParamsA): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetDeviceInstallParamsA} +function SetupDiSetDeviceInstallParamsW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; + var DeviceInstallParams: TSPDevInstallParamsW): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetDeviceInstallParamsW} +function SetupDiSetDeviceInstallParams(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; + var DeviceInstallParams: TSPDevInstallParamsA): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetDeviceInstallParams} + +function SetupDiSetClassInstallParamsA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; ClassInstallParams: PSPClassInstallHeader; + ClassInstallParamsSize: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetClassInstallParamsA} +function SetupDiSetClassInstallParamsW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; ClassInstallParams: PSPClassInstallHeader; + ClassInstallParamsSize: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetClassInstallParamsW} +function SetupDiSetClassInstallParams(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; ClassInstallParams: PSPClassInstallHeader; + ClassInstallParamsSize: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetClassInstallParams} + +function SetupDiGetDriverInstallParamsA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataA; + var DriverInstallParams: TSPDrvInstallParams): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDriverInstallParamsA} +function SetupDiGetDriverInstallParamsW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataW; + var DriverInstallParams: TSPDrvInstallParams): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDriverInstallParamsW} +function SetupDiGetDriverInstallParams(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataA; + var DriverInstallParams: TSPDrvInstallParams): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetDriverInstallParams} + +function SetupDiSetDriverInstallParamsA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataA; + var DriverInstallParams: TSPDrvInstallParams): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetDriverInstallParamsA} +function SetupDiSetDriverInstallParamsW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataW; + var DriverInstallParams: TSPDrvInstallParams): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetDriverInstallParamsW} +function SetupDiSetDriverInstallParams(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var DriverInfoData: TSPDrvInfoDataA; + var DriverInstallParams: TSPDrvInstallParams): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetDriverInstallParams} + +function SetupDiLoadClassIcon(var ClassGuid: TGUID; LargeIcon: PHICON; + MiniIconIndex: PINT): LongBool; stdcall; +{$EXTERNALSYM SetupDiLoadClassIcon} + +// +// Flags controlling the drawing of mini-icons +// +const + DMI_MASK = $00000001; + {$EXTERNALSYM DMI_MASK} + DMI_BKCOLOR = $00000002; + {$EXTERNALSYM DMI_BKCOLOR} + DMI_USERECT = $00000004; + {$EXTERNALSYM DMI_USERECT} + +function SetupDiDrawMiniIcon(hdc: HDC; rc: TRect; MiniIconIndex: Integer; + Flags: DWORD): Integer; stdcall; +{$EXTERNALSYM SetupDiDrawMiniIcon} + +function SetupDiGetClassBitmapIndex(ClassGuid: PGUID; + var MiniIconIndex: Integer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassBitmapIndex} + +function SetupDiGetClassImageList( + var ClassImageListData: TSPClassImageListData): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassImageList} + +function SetupDiGetClassImageListExA(var ClassImageListData: TSPClassImageListData; + const MachineName: PAnsiChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassImageListExA} +function SetupDiGetClassImageListExW(var ClassImageListData: TSPClassImageListData; + const MachineName: PWideChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassImageListExW} +function SetupDiGetClassImageListEx(var ClassImageListData: TSPClassImageListData; + const MachineName: PChar; Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassImageListEx} + +function SetupDiGetClassImageIndex(var ClassImageListData: TSPClassImageListData; + var ClassGuid: TGUID; var ImageIndex: Integer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassImageIndex} + +function SetupDiDestroyClassImageList( + var ClassImageListData: TSPClassImageListData): LongBool; stdcall; +{$EXTERNALSYM SetupDiDestroyClassImageList} + +// +// PropertySheetType values for the SetupDiGetClassDevPropertySheets API +// +const + DIGCDP_FLAG_BASIC = $00000001; + {$EXTERNALSYM DIGCDP_FLAG_BASIC} + DIGCDP_FLAG_ADVANCED = $00000002; + {$EXTERNALSYM DIGCDP_FLAG_ADVANCED} + +function SetupDiGetClassDevPropertySheetsA(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var PropertySheetHeader: TPropSheetHeaderA; + PropertySheetHeaderPageListSize: DWORD; RequiredSize: PDWORD; + PropertySheetType: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassDevPropertySheetsA} +function SetupDiGetClassDevPropertySheetsW(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var PropertySheetHeader: TPropSheetHeaderW; + PropertySheetHeaderPageListSize: DWORD; RequiredSize: PDWORD; + PropertySheetType: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassDevPropertySheetsW} +function SetupDiGetClassDevPropertySheets(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var PropertySheetHeader: TPropSheetHeaderA; + PropertySheetHeaderPageListSize: DWORD; RequiredSize: PDWORD; + PropertySheetType: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetClassDevPropertySheets} + +// +// Define ICON IDs publicly exposed from setupapi. +// +const + IDI_RESOURCEFIRST = 159; + {$EXTERNALSYM IDI_RESOURCEFIRST} + IDI_RESOURCE = 159; + {$EXTERNALSYM IDI_RESOURCE} + IDI_RESOURCELAST = 161; + {$EXTERNALSYM IDI_RESOURCELAST} + IDI_RESOURCEOVERLAYFIRST = 161; + {$EXTERNALSYM IDI_RESOURCEOVERLAYFIRST} + IDI_RESOURCEOVERLAYLAST = 161; + {$EXTERNALSYM IDI_RESOURCEOVERLAYLAST} + IDI_CONFLICT = 161; + {$EXTERNALSYM IDI_CONFLICT} + + IDI_CLASSICON_OVERLAYFIRST = 500; + {$EXTERNALSYM IDI_CLASSICON_OVERLAYFIRST} + IDI_CLASSICON_OVERLAYLAST = 502; + {$EXTERNALSYM IDI_CLASSICON_OVERLAYLAST} + IDI_PROBLEM_OVL = 500; + {$EXTERNALSYM IDI_PROBLEM_OVL} + IDI_DISABLED_OVL = 501; + {$EXTERNALSYM IDI_DISABLED_OVL} + IDI_FORCED_OVL = 502; + {$EXTERNALSYM IDI_FORCED_OVL} + +function SetupDiAskForOEMDisk(DeviceInfoSet: HDEVINFO; DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiAskForOEMDisk} + +function SetupDiSelectOEMDrv(hwndParent: HWND; DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiSelectOEMDrv} + +function SetupDiClassNameFromGuidA(var ClassGuid: TGUID; ClassName: PAnsiChar; + ClassNameSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassNameFromGuidA} +function SetupDiClassNameFromGuidW(var ClassGuid: TGUID; ClassName: PWideChar; + ClassNameSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassNameFromGuidW} +function SetupDiClassNameFromGuid(var ClassGuid: TGUID; ClassName: PChar; + ClassNameSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassNameFromGuid} + +function SetupDiClassNameFromGuidExA(var ClassGuid: TGUID; ClassName: PAnsiChar; + ClassNameSize: DWORD; RequiredSize: PDWORD; const MachineName: PAnsiChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassNameFromGuidExA} +function SetupDiClassNameFromGuidExW(var ClassGuid: TGUID; ClassName: PWideChar; + ClassNameSize: DWORD; RequiredSize: PDWORD; const MachineName: PWideChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassNameFromGuidExW} +function SetupDiClassNameFromGuidEx(var ClassGuid: TGUID; ClassName: PChar; + ClassNameSize: DWORD; RequiredSize: PDWORD; const MachineName: PChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassNameFromGuidEx} + +function SetupDiClassGuidsFromNameA(const ClassName: PAnsiChar; ClassGuidList: PGUID; + ClassGuidListSize: DWORD; var RequiredSize: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassGuidsFromNameA} +function SetupDiClassGuidsFromNameW(const ClassName: PWideChar; ClassGuidList: PGUID; + ClassGuidListSize: DWORD; var RequiredSize: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassGuidsFromNameW} +function SetupDiClassGuidsFromName(const ClassName: PChar; ClassGuidList: PGUID; + ClassGuidListSize: DWORD; var RequiredSize: DWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassGuidsFromName} + +function SetupDiClassGuidsFromNameExA(const ClassName: PAnsiChar; ClassGuidList: PGUID; + ClassGuidListSize: DWORD; var RequiredSize: DWORD; const MachineName: PAnsiChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassGuidsFromNameExA} +function SetupDiClassGuidsFromNameExW(const ClassName: PWideChar; ClassGuidList: PGUID; + ClassGuidListSize: DWORD; var RequiredSize: DWORD; const MachineName: PWideChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassGuidsFromNameExW} +function SetupDiClassGuidsFromNameEx(const ClassName: PChar; ClassGuidList: PGUID; + ClassGuidListSize: DWORD; var RequiredSize: DWORD; const MachineName: PChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiClassGuidsFromNameEx} + +function SetupDiGetHwProfileFriendlyNameA(HwProfile: DWORD; FriendlyName: PAnsiChar; + FriendlyNameSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetHwProfileFriendlyNameA} +function SetupDiGetHwProfileFriendlyNameW(HwProfile: DWORD; FriendlyName: PWideChar; + FriendlyNameSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetHwProfileFriendlyNameW} +function SetupDiGetHwProfileFriendlyName(HwProfile: DWORD; FriendlyName: PChar; + FriendlyNameSize: DWORD; RequiredSize: PDWORD): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetHwProfileFriendlyName} + +function SetupDiGetHwProfileFriendlyNameExA(HwProfile: DWORD; FriendlyName: PAnsiChar; + FriendlyNameSize: DWORD; RequiredSize: PDWORD; const MachineName: PAnsiChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetHwProfileFriendlyNameExA} +function SetupDiGetHwProfileFriendlyNameExW(HwProfile: DWORD; FriendlyName: PWideChar; + FriendlyNameSize: DWORD; RequiredSize: PDWORD; const MachineName: PWideChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetHwProfileFriendlyNameExW} +function SetupDiGetHwProfileFriendlyNameEx(HwProfile: DWORD; FriendlyName: PChar; + FriendlyNameSize: DWORD; RequiredSize: PDWORD; const MachineName: PChar; + Reserved: Pointer): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetHwProfileFriendlyNameEx} + +// +// PageType values for SetupDiGetWizardPage API +// +const + SPWPT_SELECTDEVICE = $00000001; + {$EXTERNALSYM SPWPT_SELECTDEVICE} + +// +// Flags for SetupDiGetWizardPage API +// + SPWP_USE_DEVINFO_DATA = $00000001; +{$EXTERNALSYM SPWP_USE_DEVINFO_DATA} + +function SetupDiGetWizardPage(DeviceInfoSet: HDEVINFO; + DeviceInfoData: PSPDevInfoData; var InstallWizardData: TSPInstallWizardData; + PageType: DWORD; Flags: DWORD): HPROPSHEETPAGE; stdcall; +{$EXTERNALSYM SetupDiGetWizardPage} + +function SetupDiGetSelectedDevice(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetSelectedDevice} + +function SetupDiSetSelectedDevice(DeviceInfoSet: HDEVINFO; + var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; +{$EXTERNALSYM SetupDiSetSelectedDevice} + +function SetupDiGetActualSectionToInstallA(InfHandle: HINF; + const InfSectionName: PAnsiChar; InfSectionWithExt: PAnsiChar; InfSectionWithExtSize: DWORD; + RequiredSize: PDWORD; Extension: PPASTR): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetActualSectionToInstallA} +function SetupDiGetActualSectionToInstallW(InfHandle: HINF; + const InfSectionName: PWideChar; InfSectionWithExt: PWideChar; InfSectionWithExtSize: DWORD; + RequiredSize: PDWORD; Extension: PPWSTR): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetActualSectionToInstallW} +function SetupDiGetActualSectionToInstall(InfHandle: HINF; + const InfSectionName: PChar; InfSectionWithExt: PChar; InfSectionWithExtSize: DWORD; + RequiredSize: PDWORD; Extension: PPSTR): LongBool; stdcall; +{$EXTERNALSYM SetupDiGetActualSectionToInstall} + +implementation + +const + SetupAPIdll = 'SetupAPI.dll'; + +function SetupGetInfInformationA; external SetupAPIdll name 'SetupGetInfInformationA'; +function SetupGetInfInformationW; external SetupAPIdll name 'SetupGetInfInformationW'; +function SetupGetInfInformation; external SetupAPIdll name 'SetupGetInfInformationA'; +function SetupQueryInfFileInformationA; external SetupAPIdll name 'SetupQueryInfFileInformationA'; +function SetupQueryInfFileInformationW; external SetupAPIdll name 'SetupQueryInfFileInformationW'; +function SetupQueryInfFileInformation; external SetupAPIdll name 'SetupQueryInfFileInformationA'; +function SetupQueryInfOriginalFileInformationA; external SetupAPIdll name 'SetupQueryInfOriginalFileInformationA'; +function SetupQueryInfOriginalFileInformationW; external SetupAPIdll name 'SetupQueryInfOriginalFileInformationW'; +function SetupQueryInfOriginalFileInformation; external SetupAPIdll name 'SetupQueryInfOriginalFileInformationA'; +function SetupQueryInfVersionInformationA; external SetupAPIdll name 'SetupQueryInfVersionInformationA'; +function SetupQueryInfVersionInformationW; external SetupAPIdll name 'SetupQueryInfVersionInformationW'; +function SetupQueryInfVersionInformation; external SetupAPIdll name 'SetupQueryInfVersionInformationA'; +function SetupGetInfFileListA; external SetupAPIdll name 'SetupGetInfFileListA'; +function SetupGetInfFileListW; external SetupAPIdll name 'SetupGetInfFileListW'; +function SetupGetInfFileList; external SetupAPIdll name 'SetupGetInfFileListA'; +function SetupOpenInfFileA; external SetupAPIdll name 'SetupOpenInfFileA'; +function SetupOpenInfFileW; external SetupAPIdll name 'SetupOpenInfFileW'; +function SetupOpenInfFile; external SetupAPIdll name 'SetupOpenInfFileA'; +function SetupOpenMasterInf; external SetupAPIdll name 'SetupOpenMasterInf'; +function SetupOpenAppendInfFileA; external SetupAPIdll name 'SetupOpenAppendInfFileA'; +function SetupOpenAppendInfFileW; external SetupAPIdll name 'SetupOpenAppendInfFileW'; +function SetupOpenAppendInfFile; external SetupAPIdll name 'SetupOpenAppendInfFileA'; +procedure SetupCloseInfFile; external SetupAPIdll name 'SetupCloseInfFile'; +function SetupFindFirstLineA; external SetupAPIdll name 'SetupFindFirstLineA'; +function SetupFindFirstLineW; external SetupAPIdll name 'SetupFindFirstLineW'; +function SetupFindFirstLine; external SetupAPIdll name 'SetupFindFirstLineA'; +function SetupFindNextLine; external SetupAPIdll name 'SetupFindNextLine'; +function SetupFindNextMatchLineA; external SetupAPIdll name 'SetupFindNextMatchLineA'; +function SetupFindNextMatchLineW; external SetupAPIdll name 'SetupFindNextMatchLineW'; +function SetupFindNextMatchLine; external SetupAPIdll name 'SetupFindNextMatchLineA'; +function SetupGetLineByIndexA; external SetupAPIdll name 'SetupGetLineByIndexA'; +function SetupGetLineByIndexW; external SetupAPIdll name 'SetupGetLineByIndexW'; +function SetupGetLineByIndex; external SetupAPIdll name 'SetupGetLineByIndexA'; +function SetupGetLineCountA; external SetupAPIdll name 'SetupGetLineCountA'; +function SetupGetLineCountW; external SetupAPIdll name 'SetupGetLineCountW'; +function SetupGetLineCount; external SetupAPIdll name 'SetupGetLineCountA'; +function SetupGetLineTextA; external SetupAPIdll name 'SetupGetLineTextA'; +function SetupGetLineTextW; external SetupAPIdll name 'SetupGetLineTextW'; +function SetupGetLineText; external SetupAPIdll name 'SetupGetLineTextA'; +function SetupGetFieldCount; external SetupAPIdll name 'SetupGetFieldCount'; +function SetupGetStringFieldA; external SetupAPIdll name 'SetupGetStringFieldA'; +function SetupGetStringFieldW; external SetupAPIdll name 'SetupGetStringFieldW'; +function SetupGetStringField; external SetupAPIdll name 'SetupGetStringFieldA'; +function SetupGetIntField; external SetupAPIdll name 'SetupGetIntField'; +function SetupGetMultiSzFieldA; external SetupAPIdll name 'SetupGetMultiSzFieldA'; +function SetupGetMultiSzFieldW; external SetupAPIdll name 'SetupGetMultiSzFieldW'; +function SetupGetMultiSzField; external SetupAPIdll name 'SetupGetMultiSzFieldA'; +function SetupGetBinaryField; external SetupAPIdll name 'SetupGetBinaryField'; +function SetupGetFileCompressionInfoA; external SetupAPIdll name 'SetupGetFileCompressionInfoA'; +function SetupGetFileCompressionInfoW; external SetupAPIdll name 'SetupGetFileCompressionInfoW'; +function SetupGetFileCompressionInfo; external SetupAPIdll name 'SetupGetFileCompressionInfoA'; +function SetupDecompressOrCopyFileA; external SetupAPIdll name 'SetupDecompressOrCopyFileA'; +function SetupDecompressOrCopyFileW; external SetupAPIdll name 'SetupDecompressOrCopyFileW'; +function SetupDecompressOrCopyFile; external SetupAPIdll name 'SetupDecompressOrCopyFileA'; +function SetupGetSourceFileLocationA; external SetupAPIdll name 'SetupGetSourceFileLocationA'; +function SetupGetSourceFileLocationW; external SetupAPIdll name 'SetupGetSourceFileLocationW'; +function SetupGetSourceFileLocation; external SetupAPIdll name 'SetupGetSourceFileLocationA'; +function SetupGetSourceFileSizeA; external SetupAPIdll name 'SetupGetSourceFileSizeA'; +function SetupGetSourceFileSizeW; external SetupAPIdll name 'SetupGetSourceFileSizeW'; +function SetupGetSourceFileSize; external SetupAPIdll name 'SetupGetSourceFileSizeA'; +function SetupGetTargetPathA; external SetupAPIdll name 'SetupGetTargetPathA'; +function SetupGetTargetPathW; external SetupAPIdll name 'SetupGetTargetPathW'; +function SetupGetTargetPath; external SetupAPIdll name 'SetupGetTargetPathA'; +function SetupSetSourceListA; external SetupAPIdll name 'SetupSetSourceListA'; +function SetupSetSourceListW; external SetupAPIdll name 'SetupSetSourceListW'; +function SetupSetSourceList; external SetupAPIdll name 'SetupSetSourceListA'; +function SetupCancelTemporarySourceList; external SetupAPIdll name 'SetupCancelTemporarySourceList'; +function SetupAddToSourceListA; external SetupAPIdll name 'SetupAddToSourceListA'; +function SetupAddToSourceListW; external SetupAPIdll name 'SetupAddToSourceListW'; +function SetupAddToSourceList; external SetupAPIdll name 'SetupAddToSourceListA'; +function SetupRemoveFromSourceListA; external SetupAPIdll name 'SetupRemoveFromSourceListA'; +function SetupRemoveFromSourceListW; external SetupAPIdll name 'SetupRemoveFromSourceListW'; +function SetupRemoveFromSourceList; external SetupAPIdll name 'SetupRemoveFromSourceListA'; +function SetupQuerySourceListA; external SetupAPIdll name 'SetupQuerySourceListA'; +function SetupQuerySourceListW; external SetupAPIdll name 'SetupQuerySourceListW'; +function SetupQuerySourceList; external SetupAPIdll name 'SetupQuerySourceListA'; +function SetupFreeSourceListA; external SetupAPIdll name 'SetupFreeSourceListA'; +function SetupFreeSourceListW; external SetupAPIdll name 'SetupFreeSourceListW'; +function SetupFreeSourceList; external SetupAPIdll name 'SetupFreeSourceListA'; +function SetupPromptForDiskA; external SetupAPIdll name 'SetupPromptForDiskA'; +function SetupPromptForDiskW; external SetupAPIdll name 'SetupPromptForDiskW'; +function SetupPromptForDisk; external SetupAPIdll name 'SetupPromptForDiskA'; +function SetupCopyErrorA; external SetupAPIdll name 'SetupCopyErrorA'; +function SetupCopyErrorW; external SetupAPIdll name 'SetupCopyErrorW'; +function SetupCopyError; external SetupAPIdll name 'SetupCopyErrorA'; +function SetupRenameErrorA; external SetupAPIdll name 'SetupRenameErrorA'; +function SetupRenameErrorW; external SetupAPIdll name 'SetupRenameErrorW'; +function SetupRenameError; external SetupAPIdll name 'SetupRenameErrorA'; +function SetupDeleteErrorA; external SetupAPIdll name 'SetupDeleteErrorA'; +function SetupDeleteErrorW; external SetupAPIdll name 'SetupDeleteErrorW'; +function SetupDeleteError; external SetupAPIdll name 'SetupDeleteErrorA'; +function SetupBackupErrorA; external SetupAPIdll name 'SetupBackupErrorA'; +function SetupBackupErrorW; external SetupAPIdll name 'SetupBackupErrorW'; +function SetupBackupError; external SetupAPIdll name 'SetupBackupErrorA'; +function SetupSetDirectoryIdA; external SetupAPIdll name 'SetupSetDirectoryIdA'; +function SetupSetDirectoryIdW; external SetupAPIdll name 'SetupSetDirectoryIdW'; +function SetupSetDirectoryId; external SetupAPIdll name 'SetupSetDirectoryIdA'; +function SetupSetDirectoryIdExA; external SetupAPIdll name 'SetupSetDirectoryIdExA'; +function SetupSetDirectoryIdExW; external SetupAPIdll name 'SetupSetDirectoryIdExW'; +function SetupSetDirectoryIdEx; external SetupAPIdll name 'SetupSetDirectoryIdExA'; +function SetupGetSourceInfoA; external SetupAPIdll name 'SetupGetSourceInfoA'; +function SetupGetSourceInfoW; external SetupAPIdll name 'SetupGetSourceInfoW'; +function SetupGetSourceInfo; external SetupAPIdll name 'SetupGetSourceInfoA'; +function SetupInstallFileA; external SetupAPIdll name 'SetupInstallFileA'; +function SetupInstallFileW; external SetupAPIdll name 'SetupInstallFileW'; +function SetupInstallFile; external SetupAPIdll name 'SetupInstallFileA'; +function SetupInstallFileExA; external SetupAPIdll name 'SetupInstallFileExA'; +function SetupInstallFileExW; external SetupAPIdll name 'SetupInstallFileExW'; +function SetupInstallFileEx; external SetupAPIdll name 'SetupInstallFileExA'; +function SetupOpenFileQueue; external SetupAPIdll name 'SetupOpenFileQueue'; +function SetupCloseFileQueue; external SetupAPIdll name 'SetupCloseFileQueue'; +function SetupSetFileQueueAlternatePlatformA; external SetupAPIdll name 'SetupSetFileQueueAlternatePlatformA'; +function SetupSetFileQueueAlternatePlatformW; external SetupAPIdll name 'SetupSetFileQueueAlternatePlatformW'; +function SetupSetFileQueueAlternatePlatform; external SetupAPIdll name 'SetupSetFileQueueAlternatePlatformA'; +function SetupSetPlatformPathOverrideA; external SetupAPIdll name 'SetupSetPlatformPathOverrideA'; +function SetupSetPlatformPathOverrideW; external SetupAPIdll name 'SetupSetPlatformPathOverrideW'; +function SetupSetPlatformPathOverride; external SetupAPIdll name 'SetupSetPlatformPathOverrideA'; +function SetupQueueCopyA; external SetupAPIdll name 'SetupQueueCopyA'; +function SetupQueueCopyW; external SetupAPIdll name 'SetupQueueCopyW'; +function SetupQueueCopy; external SetupAPIdll name 'SetupQueueCopyA'; +function SetupQueueCopyIndirectA; external SetupAPIdll name 'SetupQueueCopyIndirectA'; +function SetupQueueCopyIndirectW; external SetupAPIdll name 'SetupQueueCopyIndirectW'; +function SetupQueueCopyIndirect; external SetupAPIdll name 'SetupQueueCopyIndirectA'; +function SetupQueueDefaultCopyA; external SetupAPIdll name 'SetupQueueDefaultCopyA'; +function SetupQueueDefaultCopyW; external SetupAPIdll name 'SetupQueueDefaultCopyW'; +function SetupQueueDefaultCopy; external SetupAPIdll name 'SetupQueueDefaultCopyA'; +function SetupQueueCopySectionA; external SetupAPIdll name 'SetupQueueCopySectionA'; +function SetupQueueCopySectionW; external SetupAPIdll name 'SetupQueueCopySectionW'; +function SetupQueueCopySection; external SetupAPIdll name 'SetupQueueCopySectionA'; +function SetupQueueDeleteA; external SetupAPIdll name 'SetupQueueDeleteA'; +function SetupQueueDeleteW; external SetupAPIdll name 'SetupQueueDeleteW'; +function SetupQueueDelete; external SetupAPIdll name 'SetupQueueDeleteA'; +function SetupQueueDeleteSectionA; external SetupAPIdll name 'SetupQueueDeleteSectionA'; +function SetupQueueDeleteSectionW; external SetupAPIdll name 'SetupQueueDeleteSectionW'; +function SetupQueueDeleteSection; external SetupAPIdll name 'SetupQueueDeleteSectionA'; +function SetupQueueRenameA; external SetupAPIdll name 'SetupQueueRenameA'; +function SetupQueueRenameW; external SetupAPIdll name 'SetupQueueRenameW'; +function SetupQueueRename; external SetupAPIdll name 'SetupQueueRenameA'; +function SetupQueueRenameSectionA; external SetupAPIdll name 'SetupQueueRenameSectionA'; +function SetupQueueRenameSectionW; external SetupAPIdll name 'SetupQueueRenameSectionW'; +function SetupQueueRenameSection; external SetupAPIdll name 'SetupQueueRenameSectionA'; +function SetupCommitFileQueueA; external SetupAPIdll name 'SetupCommitFileQueueA'; +function SetupCommitFileQueueW; external SetupAPIdll name 'SetupCommitFileQueueW'; +function SetupCommitFileQueue; external SetupAPIdll name 'SetupCommitFileQueueA'; +function SetupScanFileQueueA; external SetupAPIdll name 'SetupScanFileQueueA'; +function SetupScanFileQueueW; external SetupAPIdll name 'SetupScanFileQueueW'; +function SetupScanFileQueue; external SetupAPIdll name 'SetupScanFileQueueA'; +function SetupCopyOEMInfA; external SetupAPIdll name 'SetupCopyOEMInfA'; +function SetupCopyOEMInfW; external SetupAPIdll name 'SetupCopyOEMInfW'; +function SetupCopyOEMInf; external SetupAPIdll name 'SetupCopyOEMInfA'; +function SetupCreateDiskSpaceListA; external SetupAPIdll name 'SetupCreateDiskSpaceListA'; +function SetupCreateDiskSpaceListW; external SetupAPIdll name 'SetupCreateDiskSpaceListW'; +function SetupCreateDiskSpaceList; external SetupAPIdll name 'SetupCreateDiskSpaceListA'; +function SetupDuplicateDiskSpaceListA; external SetupAPIdll name 'SetupDuplicateDiskSpaceListA'; +function SetupDuplicateDiskSpaceListW; external SetupAPIdll name 'SetupDuplicateDiskSpaceListW'; +function SetupDuplicateDiskSpaceList; external SetupAPIdll name 'SetupDuplicateDiskSpaceListA'; +function SetupDestroyDiskSpaceList; external SetupAPIdll name 'SetupDestroyDiskSpaceList'; +function SetupQueryDrivesInDiskSpaceListA; external SetupAPIdll name 'SetupQueryDrivesInDiskSpaceListA'; +function SetupQueryDrivesInDiskSpaceListW; external SetupAPIdll name 'SetupQueryDrivesInDiskSpaceListW'; +function SetupQueryDrivesInDiskSpaceList; external SetupAPIdll name 'SetupQueryDrivesInDiskSpaceListA'; +function SetupQuerySpaceRequiredOnDriveA; external SetupAPIdll name 'SetupQuerySpaceRequiredOnDriveA'; +function SetupQuerySpaceRequiredOnDriveW; external SetupAPIdll name 'SetupQuerySpaceRequiredOnDriveW'; +function SetupQuerySpaceRequiredOnDrive; external SetupAPIdll name 'SetupQuerySpaceRequiredOnDriveA'; +function SetupAdjustDiskSpaceListA; external SetupAPIdll name 'SetupAdjustDiskSpaceListA'; +function SetupAdjustDiskSpaceListW; external SetupAPIdll name 'SetupAdjustDiskSpaceListW'; +function SetupAdjustDiskSpaceList; external SetupAPIdll name 'SetupAdjustDiskSpaceListA'; +function SetupAddToDiskSpaceListA; external SetupAPIdll name 'SetupAddToDiskSpaceListA'; +function SetupAddToDiskSpaceListW; external SetupAPIdll name 'SetupAddToDiskSpaceListW'; +function SetupAddToDiskSpaceList; external SetupAPIdll name 'SetupAddToDiskSpaceListA'; +function SetupAddSectionToDiskSpaceListA; external SetupAPIdll name 'SetupAddSectionToDiskSpaceListA'; +function SetupAddSectionToDiskSpaceListW; external SetupAPIdll name 'SetupAddSectionToDiskSpaceListW'; +function SetupAddSectionToDiskSpaceList; external SetupAPIdll name 'SetupAddSectionToDiskSpaceListA'; +function SetupAddInstallSectionToDiskSpaceListA; external SetupAPIdll name 'SetupAddInstallSectionToDiskSpaceListA'; +function SetupAddInstallSectionToDiskSpaceListW; external SetupAPIdll name 'SetupAddInstallSectionToDiskSpaceListW'; +function SetupAddInstallSectionToDiskSpaceList; external SetupAPIdll name 'SetupAddInstallSectionToDiskSpaceListA'; +function SetupRemoveFromDiskSpaceListA; external SetupAPIdll name 'SetupRemoveFromDiskSpaceListA'; +function SetupRemoveFromDiskSpaceListW; external SetupAPIdll name 'SetupRemoveFromDiskSpaceListW'; +function SetupRemoveFromDiskSpaceList; external SetupAPIdll name 'SetupRemoveFromDiskSpaceListA'; +function SetupRemoveSectionFromDiskSpaceListA; external SetupAPIdll name 'SetupRemoveSectionFromDiskSpaceListA'; +function SetupRemoveSectionFromDiskSpaceListW; external SetupAPIdll name 'SetupRemoveSectionFromDiskSpaceListW'; +function SetupRemoveSectionFromDiskSpaceList; external SetupAPIdll name 'SetupRemoveSectionFromDiskSpaceListA'; +function SetupRemoveInstallSectionFromDiskSpaceListA; external SetupAPIdll name 'SetupRemoveInstallSectionFromDiskSpaceListA'; +function SetupRemoveInstallSectionFromDiskSpaceListW; external SetupAPIdll name 'SetupRemoveInstallSectionFromDiskSpaceListW'; +function SetupRemoveInstallSectionFromDiskSpaceList; external SetupAPIdll name 'SetupRemoveInstallSectionFromDiskSpaceListA'; +function SetupIterateCabinetA; external SetupAPIdll name 'SetupIterateCabinetA'; +function SetupIterateCabinetW; external SetupAPIdll name 'SetupIterateCabinetW'; +function SetupIterateCabinet; external SetupAPIdll name 'SetupIterateCabinetA'; +function SetupPromptReboot; external SetupAPIdll name 'SetupPromptReboot'; +function SetupInitDefaultQueueCallback; external SetupAPIdll name 'SetupInitDefaultQueueCallback'; +function SetupInitDefaultQueueCallbackEx; external SetupAPIdll name 'SetupInitDefaultQueueCallbackEx'; +procedure SetupTermDefaultQueueCallback; external SetupAPIdll name 'SetupTermDefaultQueueCallback'; +function SetupDefaultQueueCallbackA; external SetupAPIdll name 'SetupDefaultQueueCallbackA'; +function SetupDefaultQueueCallbackW; external SetupAPIdll name 'SetupDefaultQueueCallbackW'; +function SetupDefaultQueueCallback; external SetupAPIdll name 'SetupDefaultQueueCallbackA'; +function SetupInstallFromInfSectionA; external SetupAPIdll name 'SetupInstallFromInfSectionA'; +function SetupInstallFromInfSectionW; external SetupAPIdll name 'SetupInstallFromInfSectionW'; +function SetupInstallFromInfSection; external SetupAPIdll name 'SetupInstallFromInfSectionA'; +function SetupInstallFilesFromInfSectionA; external SetupAPIdll name 'SetupInstallFilesFromInfSectionA'; +function SetupInstallFilesFromInfSectionW; external SetupAPIdll name 'SetupInstallFilesFromInfSectionW'; +function SetupInstallFilesFromInfSection; external SetupAPIdll name 'SetupInstallFilesFromInfSectionA'; +function SetupInstallServicesFromInfSectionA; external SetupAPIdll name 'SetupInstallServicesFromInfSectionA'; +function SetupInstallServicesFromInfSectionW; external SetupAPIdll name 'SetupInstallServicesFromInfSectionW'; +function SetupInstallServicesFromInfSection; external SetupAPIdll name 'SetupInstallServicesFromInfSectionA'; +function SetupInstallServicesFromInfSectionExA; external SetupAPIdll name 'SetupInstallServicesFromInfSectionExA'; +function SetupInstallServicesFromInfSectionExW; external SetupAPIdll name 'SetupInstallServicesFromInfSectionExW'; +function SetupInstallServicesFromInfSectionEx; external SetupAPIdll name 'SetupInstallServicesFromInfSectionExA'; +function SetupInitializeFileLogA; external SetupAPIdll name 'SetupInitializeFileLogA'; +function SetupInitializeFileLogW; external SetupAPIdll name 'SetupInitializeFileLogW'; +function SetupInitializeFileLog; external SetupAPIdll name 'SetupInitializeFileLogA'; +function SetupTerminateFileLog; external SetupAPIdll name 'SetupTerminateFileLog'; +function SetupLogFileA; external SetupAPIdll name 'SetupLogFileA'; +function SetupLogFileW; external SetupAPIdll name 'SetupLogFileW'; +function SetupLogFile; external SetupAPIdll name 'SetupLogFileA'; +function SetupRemoveFileLogEntryA; external SetupAPIdll name 'SetupRemoveFileLogEntryA'; +function SetupRemoveFileLogEntryW; external SetupAPIdll name 'SetupRemoveFileLogEntryW'; +function SetupRemoveFileLogEntry; external SetupAPIdll name 'SetupRemoveFileLogEntryA'; +function SetupQueryFileLogA; external SetupAPIdll name 'SetupQueryFileLogA'; +function SetupQueryFileLogW; external SetupAPIdll name 'SetupQueryFileLogW'; +function SetupQueryFileLog; external SetupAPIdll name 'SetupQueryFileLogA'; +function SetupOpenLog; external SetupAPIdll name 'SetupOpenLog'; +function SetupLogErrorA; external SetupAPIdll name 'SetupLogErrorA'; +function SetupLogErrorW; external SetupAPIdll name 'SetupLogErrorW'; +function SetupLogError; external SetupAPIdll name 'SetupLogErrorA'; +procedure SetupCloseLog; external SetupAPIdll name 'SetupCloseLog'; +function SetupGetBackupInformationA; external SetupAPIdll name 'SetupGetBackupInformationA'; +function SetupGetBackupInformationW; external SetupAPIdll name 'SetupGetBackupInformationW'; +function SetupGetBackupInformation; external SetupAPIdll name 'SetupGetBackupInformationA'; +function SetupDiCreateDeviceInfoList; external SetupAPIdll name 'SetupDiCreateDeviceInfoList'; +function SetupDiCreateDeviceInfoListExA; external SetupAPIdll name 'SetupDiCreateDeviceInfoListExA'; +function SetupDiCreateDeviceInfoListExW; external SetupAPIdll name 'SetupDiCreateDeviceInfoListExW'; +function SetupDiCreateDeviceInfoListEx; external SetupAPIdll name 'SetupDiCreateDeviceInfoListExA'; +function SetupDiGetDeviceInfoListClass; external SetupAPIdll name 'SetupDiGetDeviceInfoListClass'; +function SetupDiGetDeviceInfoListDetailA; external SetupAPIdll name 'SetupDiGetDeviceInfoListDetailA'; +function SetupDiGetDeviceInfoListDetailW; external SetupAPIdll name 'SetupDiGetDeviceInfoListDetailW'; +function SetupDiGetDeviceInfoListDetail; external SetupAPIdll name 'SetupDiGetDeviceInfoListDetailA'; +function SetupDiCreateDeviceInfoA; external SetupAPIdll name 'SetupDiCreateDeviceInfoA'; +function SetupDiCreateDeviceInfoW; external SetupAPIdll name 'SetupDiCreateDeviceInfoW'; +function SetupDiCreateDeviceInfo; external SetupAPIdll name 'SetupDiCreateDeviceInfoA'; +function SetupDiOpenDeviceInfoA; external SetupAPIdll name 'SetupDiOpenDeviceInfoA'; +function SetupDiOpenDeviceInfoW; external SetupAPIdll name 'SetupDiOpenDeviceInfoW'; +function SetupDiOpenDeviceInfo; external SetupAPIdll name 'SetupDiOpenDeviceInfoA'; +function SetupDiGetDeviceInstanceIdA; external SetupAPIdll name 'SetupDiGetDeviceInstanceIdA'; +function SetupDiGetDeviceInstanceIdW; external SetupAPIdll name 'SetupDiGetDeviceInstanceIdW'; +function SetupDiGetDeviceInstanceId; external SetupAPIdll name 'SetupDiGetDeviceInstanceIdA'; +function SetupDiDeleteDeviceInfo; external SetupAPIdll name 'SetupDiDeleteDeviceInfo'; +function SetupDiEnumDeviceInfo; external SetupAPIdll name 'SetupDiEnumDeviceInfo'; +function SetupDiDestroyDeviceInfoList; external SetupAPIdll name 'SetupDiDestroyDeviceInfoList'; +function SetupDiEnumDeviceInterfaces; external SetupAPIdll name 'SetupDiEnumDeviceInterfaces'; +function SetupDiEnumInterfaceDevice; external SetupAPIdll name 'SetupDiEnumDeviceInterfaces'; +function SetupDiCreateDeviceInterfaceA; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceA'; +function SetupDiCreateInterfaceDeviceA; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceA'; +function SetupDiCreateDeviceInterfaceW; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceW'; +function SetupDiCreateInterfaceDeviceW; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceW'; +function SetupDiCreateDeviceInterface; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceA'; +function SetupDiCreateInterfaceDevice; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceA'; +function SetupDiOpenDeviceInterfaceA; external SetupAPIdll name 'SetupDiOpenDeviceInterfaceA'; +function SetupDiOpenInterfaceDeviceA; external SetupAPIdll name 'SetupDiOpenDeviceInterfaceA'; +function SetupDiOpenDeviceInterfaceW; external SetupAPIdll name 'SetupDiOpenDeviceInterfaceW'; +function SetupDiOpenInterfaceDeviceW; external SetupAPIdll name 'SetupDiOpenDeviceInterfaceW'; +function SetupDiOpenDeviceInterface; external SetupAPIdll name 'SetupDiOpenDeviceInterfaceA'; +function SetupDiOpenInterfaceDevice; external SetupAPIdll name 'SetupDiOpenDeviceInterfaceA'; +function SetupDiGetDeviceInterfaceAlias; external SetupAPIdll name 'SetupDiGetDeviceInterfaceAlias'; +function SetupDiGetInterfaceDeviceAlias; external SetupAPIdll name 'SetupDiGetDeviceInterfaceAlias'; +function SetupDiDeleteDeviceInterfaceData; external SetupAPIdll name 'SetupDiDeleteDeviceInterfaceData'; +function SetupDiDeleteInterfaceDeviceData; external SetupAPIdll name 'SetupDiDeleteDeviceInterfaceData'; +function SetupDiRemoveDeviceInterface; external SetupAPIdll name 'SetupDiRemoveDeviceInterface'; +function SetupDiRemoveInterfaceDevice; external SetupAPIdll name 'SetupDiRemoveDeviceInterface'; +function SetupDiGetDeviceInterfaceDetailA; external SetupAPIdll name 'SetupDiGetDeviceInterfaceDetailA'; +function SetupDiGetInterfaceDeviceDetailA; external SetupAPIdll name 'SetupDiGetDeviceInterfaceDetailA'; +function SetupDiGetDeviceInterfaceDetailW; external SetupAPIdll name 'SetupDiGetDeviceInterfaceDetailW'; +function SetupDiGetInterfaceDeviceDetailW; external SetupAPIdll name 'SetupDiGetDeviceInterfaceDetailW'; +function SetupDiGetDeviceInterfaceDetail; external SetupAPIdll name 'SetupDiGetDeviceInterfaceDetailA'; +function SetupDiGetInterfaceDeviceDetail; external SetupAPIdll name 'SetupDiGetDeviceInterfaceDetailA'; +function SetupDiInstallDeviceInterfaces; external SetupAPIdll name 'SetupDiInstallDeviceInterfaces'; +function SetupDiInstallInterfaceDevices; external SetupAPIdll name 'SetupDiInstallDeviceInterfaces'; +function SetupDiRegisterDeviceInfo; external SetupAPIdll name 'SetupDiRegisterDeviceInfo'; +function SetupDiBuildDriverInfoList; external SetupAPIdll name 'SetupDiBuildDriverInfoList'; +function SetupDiCancelDriverInfoSearch; external SetupAPIdll name 'SetupDiCancelDriverInfoSearch'; +function SetupDiEnumDriverInfoA; external SetupAPIdll name 'SetupDiEnumDriverInfoA'; +function SetupDiEnumDriverInfoW; external SetupAPIdll name 'SetupDiEnumDriverInfoW'; +function SetupDiEnumDriverInfo; external SetupAPIdll name 'SetupDiEnumDriverInfoA'; +function SetupDiGetSelectedDriverA; external SetupAPIdll name 'SetupDiGetSelectedDriverA'; +function SetupDiGetSelectedDriverW; external SetupAPIdll name 'SetupDiGetSelectedDriverW'; +function SetupDiGetSelectedDriver; external SetupAPIdll name 'SetupDiGetSelectedDriverA'; +function SetupDiSetSelectedDriverA; external SetupAPIdll name 'SetupDiSetSelectedDriverA'; +function SetupDiSetSelectedDriverW; external SetupAPIdll name 'SetupDiSetSelectedDriverW'; +function SetupDiSetSelectedDriver; external SetupAPIdll name 'SetupDiSetSelectedDriverA'; +function SetupDiGetDriverInfoDetailA; external SetupAPIdll name 'SetupDiGetDriverInfoDetailA'; +function SetupDiGetDriverInfoDetailW; external SetupAPIdll name 'SetupDiGetDriverInfoDetailW'; +function SetupDiGetDriverInfoDetail; external SetupAPIdll name 'SetupDiGetDriverInfoDetailA'; +function SetupDiDestroyDriverInfoList; external SetupAPIdll name 'SetupDiDestroyDriverInfoList'; +function SetupDiGetClassDevsA; external SetupAPIdll name 'SetupDiGetClassDevsA'; +function SetupDiGetClassDevsW; external SetupAPIdll name 'SetupDiGetClassDevsW'; +function SetupDiGetClassDevs; external SetupAPIdll name 'SetupDiGetClassDevsA'; +function SetupDiGetClassDevsExA; external SetupAPIdll name 'SetupDiGetClassDevsExA'; +function SetupDiGetClassDevsExW; external SetupAPIdll name 'SetupDiGetClassDevsExW'; +function SetupDiGetClassDevsEx; external SetupAPIdll name 'SetupDiGetClassDevsExA'; +function SetupDiGetINFClassA; external SetupAPIdll name 'SetupDiGetINFClassA'; +function SetupDiGetINFClassW; external SetupAPIdll name 'SetupDiGetINFClassW'; +function SetupDiGetINFClass; external SetupAPIdll name 'SetupDiGetINFClassA'; +function SetupDiBuildClassInfoList; external SetupAPIdll name 'SetupDiBuildClassInfoList'; +function SetupDiBuildClassInfoListExA; external SetupAPIdll name 'SetupDiBuildClassInfoListExA'; +function SetupDiBuildClassInfoListExW; external SetupAPIdll name 'SetupDiBuildClassInfoListExW'; +function SetupDiBuildClassInfoListEx; external SetupAPIdll name 'SetupDiBuildClassInfoListExA'; +function SetupDiGetClassDescriptionA; external SetupAPIdll name 'SetupDiGetClassDescriptionA'; +function SetupDiGetClassDescriptionW; external SetupAPIdll name 'SetupDiGetClassDescriptionW'; +function SetupDiGetClassDescription; external SetupAPIdll name 'SetupDiGetClassDescriptionA'; +function SetupDiGetClassDescriptionExA; external SetupAPIdll name 'SetupDiGetClassDescriptionExA'; +function SetupDiGetClassDescriptionExW; external SetupAPIdll name 'SetupDiGetClassDescriptionExW'; +function SetupDiGetClassDescriptionEx; external SetupAPIdll name 'SetupDiGetClassDescriptionExA'; +function SetupDiCallClassInstaller; external SetupAPIdll name 'SetupDiCallClassInstaller'; +function SetupDiSelectDevice; external SetupAPIdll name 'SetupDiSelectDevice'; +function SetupDiSelectBestCompatDrv; external SetupAPIdll name 'SetupDiSelectBestCompatDrv'; +function SetupDiInstallDevice; external SetupAPIdll name 'SetupDiInstallDevice'; +function SetupDiInstallDriverFiles; external SetupAPIdll name 'SetupDiInstallDriverFiles'; +function SetupDiRegisterCoDeviceInstallers; external SetupAPIdll name 'SetupDiRegisterCoDeviceInstallers'; +function SetupDiRemoveDevice; external SetupAPIdll name 'SetupDiRemoveDevice'; +function SetupDiUnremoveDevice; external SetupAPIdll name 'SetupDiUnremoveDevice'; +function SetupDiMoveDuplicateDevice; external SetupAPIdll name 'SetupDiMoveDuplicateDevice'; +function SetupDiChangeState; external SetupAPIdll name 'SetupDiChangeState'; +function SetupDiInstallClassA; external SetupAPIdll name 'SetupDiInstallClassA'; +function SetupDiInstallClassW; external SetupAPIdll name 'SetupDiInstallClassW'; +function SetupDiInstallClass; external SetupAPIdll name 'SetupDiInstallClassA'; +function SetupDiInstallClassExA; external SetupAPIdll name 'SetupDiInstallClassExA'; +function SetupDiInstallClassExW; external SetupAPIdll name 'SetupDiInstallClassExW'; +function SetupDiInstallClassEx; external SetupAPIdll name 'SetupDiInstallClassExA'; +function SetupDiOpenClassRegKey; external SetupAPIdll name 'SetupDiOpenClassRegKey'; +function SetupDiOpenClassRegKeyExA; external SetupAPIdll name 'SetupDiOpenClassRegKeyExA'; +function SetupDiOpenClassRegKeyExW; external SetupAPIdll name 'SetupDiOpenClassRegKeyExW'; +function SetupDiOpenClassRegKeyEx; external SetupAPIdll name 'SetupDiOpenClassRegKeyExA'; +function SetupDiCreateDeviceInterfaceRegKeyA; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceRegKeyA'; +function SetupDiCreateInterfaceDeviceRegKeyA; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceRegKeyA'; +function SetupDiCreateDeviceInterfaceRegKeyW; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceRegKeyW'; +function SetupDiCreateInterfaceDeviceRegKeyW; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceRegKeyW'; +function SetupDiCreateDeviceInterfaceRegKey; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceRegKeyA'; +function SetupDiCreateInterfaceDeviceRegKey; external SetupAPIdll name 'SetupDiCreateDeviceInterfaceRegKeyA'; +function SetupDiOpenDeviceInterfaceRegKey; external SetupAPIdll name 'SetupDiOpenDeviceInterfaceRegKey'; +function SetupDiOpenInterfaceDeviceRegKey; external SetupAPIdll name 'SetupDiOpenDeviceInterfaceRegKey'; +function SetupDiDeleteDeviceInterfaceRegKey; external SetupAPIdll name 'SetupDiDeleteDeviceInterfaceRegKey'; +function SetupDiDeleteInterfaceDeviceRegKey; external SetupAPIdll name 'SetupDiDeleteDeviceInterfaceRegKey'; +function SetupDiCreateDevRegKeyA; external SetupAPIdll name 'SetupDiCreateDevRegKeyA'; +function SetupDiCreateDevRegKeyW; external SetupAPIdll name 'SetupDiCreateDevRegKeyW'; +function SetupDiCreateDevRegKey; external SetupAPIdll name 'SetupDiCreateDevRegKeyA'; +function SetupDiOpenDevRegKey; external SetupAPIdll name 'SetupDiOpenDevRegKey'; +function SetupDiDeleteDevRegKey; external SetupAPIdll name 'SetupDiDeleteDevRegKey'; +function SetupDiGetHwProfileList; external SetupAPIdll name 'SetupDiGetHwProfileList'; +function SetupDiGetHwProfileListExA; external SetupAPIdll name 'SetupDiGetHwProfileListExA'; +function SetupDiGetHwProfileListExW; external SetupAPIdll name 'SetupDiGetHwProfileListExW'; +function SetupDiGetHwProfileListEx; external SetupAPIdll name 'SetupDiGetHwProfileListExA'; +function SetupDiGetDeviceRegistryPropertyA; external SetupAPIdll name 'SetupDiGetDeviceRegistryPropertyA'; +function SetupDiGetDeviceRegistryPropertyW; external SetupAPIdll name 'SetupDiGetDeviceRegistryPropertyW'; +function SetupDiGetDeviceRegistryProperty; external SetupAPIdll name 'SetupDiGetDeviceRegistryPropertyA'; +function SetupDiGetClassRegistryPropertyA; external SetupAPIdll name 'SetupDiGetClassRegistryPropertyA'; +function SetupDiGetClassRegistryPropertyW; external SetupAPIdll name 'SetupDiGetClassRegistryPropertyW'; +function SetupDiGetClassRegistryProperty; external SetupAPIdll name 'SetupDiGetClassRegistryPropertyA'; +function SetupDiSetDeviceRegistryPropertyA; external SetupAPIdll name 'SetupDiSetDeviceRegistryPropertyA'; +function SetupDiSetDeviceRegistryPropertyW; external SetupAPIdll name 'SetupDiSetDeviceRegistryPropertyW'; +function SetupDiSetDeviceRegistryProperty; external SetupAPIdll name 'SetupDiSetDeviceRegistryPropertyA'; +function SetupDiSetClassRegistryPropertyA; external SetupAPIdll name 'SetupDiSetClassRegistryPropertyA'; +function SetupDiSetClassRegistryPropertyW; external SetupAPIdll name 'SetupDiSetClassRegistryPropertyW'; +function SetupDiSetClassRegistryProperty; external SetupAPIdll name 'SetupDiSetClassRegistryPropertyA'; +function SetupDiGetDeviceInstallParamsA; external SetupAPIdll name 'SetupDiGetDeviceInstallParamsA'; +function SetupDiGetDeviceInstallParamsW; external SetupAPIdll name 'SetupDiGetDeviceInstallParamsW'; +function SetupDiGetDeviceInstallParams; external SetupAPIdll name 'SetupDiGetDeviceInstallParamsA'; +function SetupDiGetClassInstallParamsA; external SetupAPIdll name 'SetupDiGetClassInstallParamsA'; +function SetupDiGetClassInstallParamsW; external SetupAPIdll name 'SetupDiGetClassInstallParamsW'; +function SetupDiGetClassInstallParams; external SetupAPIdll name 'SetupDiGetClassInstallParamsA'; +function SetupDiSetDeviceInstallParamsA; external SetupAPIdll name 'SetupDiSetDeviceInstallParamsA'; +function SetupDiSetDeviceInstallParamsW; external SetupAPIdll name 'SetupDiSetDeviceInstallParamsW'; +function SetupDiSetDeviceInstallParams; external SetupAPIdll name 'SetupDiSetDeviceInstallParamsA'; +function SetupDiSetClassInstallParamsA; external SetupAPIdll name 'SetupDiSetClassInstallParamsA'; +function SetupDiSetClassInstallParamsW; external SetupAPIdll name 'SetupDiSetClassInstallParamsW'; +function SetupDiSetClassInstallParams; external SetupAPIdll name 'SetupDiSetClassInstallParamsA'; +function SetupDiGetDriverInstallParamsA; external SetupAPIdll name 'SetupDiGetDriverInstallParamsA'; +function SetupDiGetDriverInstallParamsW; external SetupAPIdll name 'SetupDiGetDriverInstallParamsW'; +function SetupDiGetDriverInstallParams; external SetupAPIdll name 'SetupDiGetDriverInstallParamsA'; +function SetupDiSetDriverInstallParamsA; external SetupAPIdll name 'SetupDiSetDriverInstallParamsA'; +function SetupDiSetDriverInstallParamsW; external SetupAPIdll name 'SetupDiSetDriverInstallParamsW'; +function SetupDiSetDriverInstallParams; external SetupAPIdll name 'SetupDiSetDriverInstallParamsA'; +function SetupDiLoadClassIcon; external SetupAPIdll name 'SetupDiLoadClassIcon'; +function SetupDiDrawMiniIcon; external SetupAPIdll name 'SetupDiDrawMiniIcon'; +function SetupDiGetClassBitmapIndex; external SetupAPIdll name 'SetupDiGetClassBitmapIndex'; +function SetupDiGetClassImageList; external SetupAPIdll name 'SetupDiGetClassImageList'; +function SetupDiGetClassImageListExA; external SetupAPIdll name 'SetupDiGetClassImageListExA'; +function SetupDiGetClassImageListExW; external SetupAPIdll name 'SetupDiGetClassImageListExW'; +function SetupDiGetClassImageListEx; external SetupAPIdll name 'SetupDiGetClassImageListExA'; +function SetupDiGetClassImageIndex; external SetupAPIdll name 'SetupDiGetClassImageIndex'; +function SetupDiDestroyClassImageList; external SetupAPIdll name 'SetupDiDestroyClassImageList'; +function SetupDiGetClassDevPropertySheetsA; external SetupAPIdll name 'SetupDiGetClassDevPropertySheetsA'; +function SetupDiGetClassDevPropertySheetsW; external SetupAPIdll name 'SetupDiGetClassDevPropertySheetsW'; +function SetupDiGetClassDevPropertySheets; external SetupAPIdll name 'SetupDiGetClassDevPropertySheetsA'; +function SetupDiAskForOEMDisk; external SetupAPIdll name 'SetupDiAskForOEMDisk'; +function SetupDiSelectOEMDrv; external SetupAPIdll name 'SetupDiSelectOEMDrv'; +function SetupDiClassNameFromGuidA; external SetupAPIdll name 'SetupDiClassNameFromGuidA'; +function SetupDiClassNameFromGuidW; external SetupAPIdll name 'SetupDiClassNameFromGuidW'; +function SetupDiClassNameFromGuid; external SetupAPIdll name 'SetupDiClassNameFromGuidA'; +function SetupDiClassNameFromGuidExA; external SetupAPIdll name 'SetupDiClassNameFromGuidExA'; +function SetupDiClassNameFromGuidExW; external SetupAPIdll name 'SetupDiClassNameFromGuidExW'; +function SetupDiClassNameFromGuidEx; external SetupAPIdll name 'SetupDiClassNameFromGuidExA'; +function SetupDiClassGuidsFromNameA; external SetupAPIdll name 'SetupDiClassGuidsFromNameA'; +function SetupDiClassGuidsFromNameW; external SetupAPIdll name 'SetupDiClassGuidsFromNameW'; +function SetupDiClassGuidsFromName; external SetupAPIdll name 'SetupDiClassGuidsFromNameA'; +function SetupDiClassGuidsFromNameExA; external SetupAPIdll name 'SetupDiClassGuidsFromNameExA'; +function SetupDiClassGuidsFromNameExW; external SetupAPIdll name 'SetupDiClassGuidsFromNameExW'; +function SetupDiClassGuidsFromNameEx; external SetupAPIdll name 'SetupDiClassGuidsFromNameExA'; +function SetupDiGetHwProfileFriendlyNameA; external SetupAPIdll name 'SetupDiGetHwProfileFriendlyNameA'; +function SetupDiGetHwProfileFriendlyNameW; external SetupAPIdll name 'SetupDiGetHwProfileFriendlyNameW'; +function SetupDiGetHwProfileFriendlyName; external SetupAPIdll name 'SetupDiGetHwProfileFriendlyNameA'; +function SetupDiGetHwProfileFriendlyNameExA; external SetupAPIdll name 'SetupDiGetHwProfileFriendlyNameExA'; +function SetupDiGetHwProfileFriendlyNameExW; external SetupAPIdll name 'SetupDiGetHwProfileFriendlyNameExW'; +function SetupDiGetHwProfileFriendlyNameEx; external SetupAPIdll name 'SetupDiGetHwProfileFriendlyNameExA'; +function SetupDiGetWizardPage; external SetupAPIdll name 'SetupDiGetWizardPage'; +function SetupDiGetSelectedDevice; external SetupAPIdll name 'SetupDiGetSelectedDevice'; +function SetupDiSetSelectedDevice; external SetupAPIdll name 'SetupDiSetSelectedDevice'; +function SetupDiGetActualSectionToInstallA; external SetupAPIdll name 'SetupDiGetActualSectionToInstallA'; +function SetupDiGetActualSectionToInstallW; external SetupAPIdll name 'SetupDiGetActualSectionToInstallW'; +function SetupDiGetActualSectionToInstall; external SetupAPIdll name 'SetupDiGetActualSectionToInstallA'; + +end. diff --git a/lib/HID/help/BMP/empty.bmp b/lib/HID/help/BMP/empty.bmp new file mode 100644 index 00000000..605940d8 Binary files /dev/null and b/lib/HID/help/BMP/empty.bmp differ diff --git a/lib/HID/help/BMP/published.bmp b/lib/HID/help/BMP/published.bmp new file mode 100644 index 00000000..f149b2e5 Binary files /dev/null and b/lib/HID/help/BMP/published.bmp differ diff --git a/lib/HID/help/BMP/readonly.bmp b/lib/HID/help/BMP/readonly.bmp new file mode 100644 index 00000000..3c0e5f54 Binary files /dev/null and b/lib/HID/help/BMP/readonly.bmp differ diff --git a/lib/HID/help/BMP/usb.bmp b/lib/HID/help/BMP/usb.bmp new file mode 100644 index 00000000..36cfdaed Binary files /dev/null and b/lib/HID/help/BMP/usb.bmp differ diff --git a/lib/HID/help/HidController.GID b/lib/HID/help/HidController.GID new file mode 100644 index 00000000..b5a4bfe0 Binary files /dev/null and b/lib/HID/help/HidController.GID differ diff --git a/lib/HID/help/HidController.hpj b/lib/HID/help/HidController.hpj new file mode 100644 index 00000000..2c07f37a --- /dev/null +++ b/lib/HID/help/HidController.hpj @@ -0,0 +1,22 @@ +; This file is maintained by HCW. Do not modify this file directly. + +[OPTIONS] +COMPRESS=12 Hall Zeck +LCID=0x409 0x0 0x0 ; Englisch (USA) +REPORT=Yes +TITLE=HID +CNT=HidController.cnt +COPYRIGHT=Complete HID access brought to you by Project JEDI www.delphi-jedi.org +BMROOT=BMP +HLP=.\HIDController.hlp + +[FILES] +RTF\_#HID_Overview.RTF +RTF\HidController.RTF + +[WINDOWS] +main="Human Interface Device Component",(480,300,540,530),27908,,(r12632256),f2 +pme="Properties, Methods and Events",(200,300,275,512),4,(r14876671),(r12632256),f2 + +[CONFIG] +BrowseButtons() diff --git a/lib/HID/help/HidController.toc b/lib/HID/help/HidController.toc new file mode 100644 index 00000000..09bc11eb --- /dev/null +++ b/lib/HID/help/HidController.toc @@ -0,0 +1,8 @@ +:BASE HidController.hlp>main +:TITLE complete access to HID +; +1 Accessing HID devices +2 HID = IDH_Library_HID +1 HID Objects +2 TJvHidDeviceController=IDH_Class_TJvHidDeviceController +2 TJvHidDevice=IDH_Class_TJvHidDevice diff --git a/lib/HID/help/RTF/_#HID_Overview.RTF b/lib/HID/help/RTF/_#HID_Overview.RTF new file mode 100644 index 00000000..87bcc653 --- /dev/null +++ b/lib/HID/help/RTF/_#HID_Overview.RTF @@ -0,0 +1,16 @@ +{\rtf1\ansi{\fonttbl{\f0\fswiss Courier New;}{\f1\fswiss Arial;}{\f2\fswiss Wingdings;}{\f3\fswiss MS Sans Serif;}}{\colortbl\red0\green0\blue196;\red0\green0\blue255;}\sa50\sb50\f3\fs20 +#{\footnote # IDH_Library_HID} +${\footnote $ HID - Overview} +>{\footnote > main} +\sa50\sb50 +{\keepn{\{bml usb.bmp\}\f1\fs28\cf1\b Human Interface Device component\b0}\par\pard} +The HID component gives you complete access to all HID devices of Windows 98, Windows 98 SE and Windows 2000. A HID device is a USB device which you can interact with. Most of the USB devices are HID. +Keyboard, mice or scanners are definitely HID. A USB Hub is not HID. There is no need to touch it to make it work. +Some non USB devices are added to HID by a legacy driver.\par + +The main feature of USB is the hotplugging of the devices. Consequently the HID component is a controller component which handles all the HID device plugs and unplugs. You will therefore only need a single instance of the {\uldb HID component\v IDH_Class_TJvHidDeviceController} in your program. +Each individual HID device is represented by an instance of a HID device object. The HID controller holds a list of all HID device objects. When a HID device is plugged Windows sends a WM_DEVICECHANGE event. +The HID component catches this event and adds a new instance of a HID device object to its list of HID devices.\par + +Now you can ask the HID component to hand out one of its {\uldb HID device objects\v IDH_Class_TJvHidDevice}. With this HID device object you can then access the individual device. When you are finished with the device hand back the HID device object to the HID component.\page +} diff --git a/lib/HID/help/RTF/hidController.rtf b/lib/HID/help/RTF/hidController.rtf new file mode 100644 index 00000000..522ef9b8 --- /dev/null +++ b/lib/HID/help/RTF/hidController.rtf @@ -0,0 +1,1614 @@ +{\rtf1\ansi{\fonttbl{\f0\fswiss Courier New;}{\f1\fswiss Arial;}{\f2\fswiss Wingdings;}{\f3\fswiss MS Sans Serif;}}{\colortbl\red0\green0\blue196;\red100\green0\blue255;\red0\green0\blue255;} +\sa50\sb50\f3\fs20 +#{\footnote # IDH_Class_TJvHidDevice} +${\footnote $ TJvHidDevice} +K{\footnote K TJvHidDevice} +A{\footnote A TJvHidDevice_Object;TJvHidDevice} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50 +{\keepn{\{bml usb.bmp\}\f1\fs28 \cf2 TJvHidDevice Object}\line +{\fs20{\ul Hierarchy\v IDH_Anym_3FAMT_1} {\uldb Properties\v pme_cp_TJvHidDevice>pme} {\uldb Methods\v pme_cm_TJvHidDevice>pme} {\uldb Events\v pme_ce_TJvHidDevice>pme}\tab{\uldb Utilities\v pme_ce_Utilities>pme} }\par\pard} +\b Declaration\b0\par +{\f0 TJvHidDevice = \b class\b0 (TObject)}\par\pard\sa0\sb0 +{#{\footnote # IDH_ClassTopic_TJvHidDevice_Properties}} +A TJvHidDevice object represents a physical HID device. All static informations of the +device have been read into properties of the object. The object is created at runtime +by a TJvHidDeviceController which reigns all TJVHidDevice object. +\par\page + +#{\footnote # pme_cp_TJvHidDevice} +${\footnote $ Properties for TJvHidDevice} ++{\footnote + Auto} +\sa50\sb50 +{\keepn{\f1\fs20\cf2\b{\uldb TJvHidDevice\v IDH_Class_TJvHidDevice>Main} Properties\b0}\line +{\fs20{\ul Legend\v IDH_Legend}}\par\pard} +{\f1\tx300\b In TJvHidDevice\b0\line +\{bmct readonly.bmp\}\tab{\uldb Attributes\v IDH_TJvHidDevice_Attributes>Main}\line +\{bmct readonly.bmp\}\tab{\uldb Caps\v IDH_TJvHidDevice_Caps>Main}\line +\{bmct Published.bmp\}\tab{\uldb Configuration\v IDH_TJvHidDevice_Configuration>Main}\line +\{bmct readonly.bmp\}\tab{\uldb DevicePath\v IDH_TJvHidDevice_DevicePath>Main}\line +\{bmct readonly.bmp\}\tab{\uldb DeviceStrings\v IDH_TJvHidDevice_DeviceStrings>Main}\line +\{bmct readonly.bmp\}\tab{\uldb DevRegKey\v IDH_TJvHidDevice_DevRegKey>Main}\line +\{bmct readonly.bmp\}\tab{\uldb HidFileHandle\v IDH_TJvHidDevice_HidFileHandle>Main}\line +\{bmct readonly.bmp\}\tab{\uldb HidOverlappedHandle\v IDH_TJvHidDevice_HidOverlappedHandle>Main}\line +\{bmct readonly.bmp\}\tab{\uldb IsCheckedOut\v IDH_TJvHidDevice_IsCheckedOut>Main}\line +\{bmct readonly.bmp\}\tab{\uldb IsPluggedIn\v IDH_TJvHidDevice_IsPluggedIn>Main}\line +\{bmct readonly.bmp\}\tab{\uldb LanguageStrings\v IDH_TJvHidDevice_LanguageStrings>Main}\line +\{bmct readonly.bmp\}\tab{\uldb LinkCollectionNodes\v IDH_TJvHidDevice_LinkCollectionNodes>Main}\line +\{bmct Published.bmp\}\tab{\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}\line +\{bmct readonly.bmp\}\tab{\uldb MaxButtonListLength\v IDH_TJvHidDevice_MaxButtonListLength>Main}\line +\{bmct readonly.bmp\}\tab{\uldb MaxDataListLength\v IDH_TJvHidDevice_MaxDataListLength>Main}\line +\{bmct readonly.bmp\}\tab{\uldb MaxUsageListLength\v IDH_TJvHidDevice_MaxUsageListLength>Main}\line +\{bmct Published.bmp\}\tab{\uldb NumInputBuffers\v IDH_TJvHidDevice_NumInputBuffers>Main}\line +\{bmct Published.bmp\}\tab{\uldb NumOverlappedBuffers\v IDH_TJvHidDevice_NumOverlappedBuffers>Main}\line +\{bmct readonly.bmp\}\tab{\uldb PhysicalDescriptor\v IDH_TJvHidDevice_PhysicalDescriptor>Main}\line +\{bmct readonly.bmp\}\tab{\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}\line +\{bmct readonly.bmp\}\tab{\uldb ProductName\v IDH_TJvHidDevice_ProductName>Main}\line +\{bmct readonly.bmp\}\tab{\uldb RegClass\v IDH_TJvHidDevice_RegClass>Main}\line +\{bmct readonly.bmp\}\tab{\uldb RegDescr\v IDH_TJvHidDevice_RegDescr>Main}\line +\{bmct Published.bmp\}\tab{\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}\line +\{bmct readonly.bmp\}\tab{\uldb SerialNumber\v IDH_TJvHidDevice_SerialNumber>Main}\line +\{bmct Published.bmp\}\tab{\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}\line +\{bmct Published.bmp\}\tab{\uldb UsageParam\v IDH_TJvHidDevice_UsageParam>Main}\line +\{bmct readonly.bmp\}\tab{\uldb VendorName\v IDH_TJvHidDevice_VendorName>Main} +}\par\page + +#{\footnote # pme_cm_TJvHidDevice} +${\footnote $ Methods for TJvHidDevice} ++{\footnote + Auto} +\sa50\sb50{\keepn{\f1\fs20\cf2\b{\uldb TJvHidDevice\v IDH_Class_TJvHidDevice>Main} Methods\b0}\line +{\fs20{\ul Legend\v IDH_Legend}}\par\pard} +{\f1\tx300\b In TJvHidDevice\b0\line +\{bmct empty.bmp\}\tab{\uldb CloseFile\v IDH_TJvHidDevice_CloseFile>Main}\line +\{bmct empty.bmp\}\tab{\uldb CloseFileEx\v IDH_TJvHidDevice_CloseFileEx>Main}\line +\{bmct empty.bmp\}\tab{\uldb DeviceIoControl\v IDH_TJvHidDevice_DeviceIoControl>Main}\line +\{bmct empty.bmp\}\tab{\uldb Destroy\v IDH_TJvHidDevice_Destroy>Main}\line +\{bmct empty.bmp\}\tab{\uldb FlushQueue\v IDH_TJvHidDevice_FlushQueue>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetButtonCaps\v IDH_TJvHidDevice_GetButtonCaps>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetButtons\v IDH_TJvHidDevice_GetButtons>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetButtonsEx\v IDH_TJvHidDevice_GetButtonsEx>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetData\v IDH_TJvHidDevice_GetData>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetFeature\v IDH_TJvHidDevice_GetFeature>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetScaledUsageValue\v IDH_TJvHidDevice_GetScaledUsageValue>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetSpecificButtonCaps\v IDH_TJvHidDevice_GetSpecificButtonCaps>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetSpecificValueCaps\v IDH_TJvHidDevice_GetSpecificValueCaps>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetUsages\v IDH_TJvHidDevice_GetUsages>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetUsagesEx\v IDH_TJvHidDevice_GetUsagesEx>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetUsageValue\v IDH_TJvHidDevice_GetUsageValue>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetUsageValueArray\v IDH_TJvHidDevice_GetUsageValueArray>Main}\line +\{bmct empty.bmp\}\tab{\uldb GetValueCaps\v IDH_TJvHidDevice_GetValueCaps>Main}\line +\{bmct empty.bmp\}\tab{\uldb OpenFile\v IDH_TJvHidDevice_OpenFile>Main}\line +\{bmct empty.bmp\}\tab{\uldb OpenFileEx\v IDH_TJvHidDevice_OpenFileEx>Main}\line +\{bmct empty.bmp\}\tab{\uldb ReadFile\v IDH_TJvHidDevice_ReadFile>Main}\line +\{bmct empty.bmp\}\tab{\uldb ReadFileEx\v IDH_TJvHidDevice_ReadFileEx>Main}\line +\{bmct empty.bmp\}\tab{\uldb SetButtons\v IDH_TJvHidDevice_SetButtons>Main}\line +\{bmct empty.bmp\}\tab{\uldb SetData\v IDH_TJvHidDevice_SetData>Main}\line +\{bmct empty.bmp\}\tab{\uldb SetFeature\v IDH_TJvHidDevice_SetFeature>Main}\line +\{bmct empty.bmp\}\tab{\uldb SetScaledUsageValue\v IDH_TJvHidDevice_SetScaledUsageValue>Main}\line +\{bmct empty.bmp\}\tab{\uldb SetUsages\v IDH_TJvHidDevice_SetUsages>Main}\line +\{bmct empty.bmp\}\tab{\uldb SetUsageValue\v IDH_TJvHidDevice_SetUsageValue>Main}\line +\{bmct empty.bmp\}\tab{\uldb SetUsageValueArray\v IDH_TJvHidDevice_SetUsageValueArray>Main}\line +\{bmct empty.bmp\}\tab{\uldb UnsetButtons\v IDH_TJvHidDevice_UnsetButtons>Main}\line +\{bmct empty.bmp\}\tab{\uldb UnsetUsages\v IDH_TJvHidDevice_UnsetUsages>Main}\line +\{bmct empty.bmp\}\tab{\uldb WriteFile\v IDH_TJvHidDevice_WriteFile>Main}\line +\{bmct empty.bmp\}\tab{\uldb WriteFileEx\v IDH_TJvHidDevice_WriteFileEx>Main} +}\par\page + +#{\footnote # pme_ce_TJvHidDevice} +${\footnote $ Events for TJvHidDevice} ++{\footnote + Auto} +\sa50\sb50{\keepn{\f1\fs20\cf2\b{\uldb TJvHidDevice\v IDH_Class_TJvHidDevice>Main} Events\b0}\line +{\fs20{\ul Legend\v IDH_Legend}}\par\pard} +{\f1\tx300\b In TJvHidDevice\b0\line +\{bmct Published.bmp\}\tab{\uldb OnUnplug\v IDH_TJvHidDevice_OnUnplug>Main} +}\par\page + +#{\footnote # IDH_TJvHidDevice_Attributes} +${\footnote $ TJvHidDevice.Attributes} +K{\footnote K TJvHidDevice,Attributes;Attributes,TJvHidDevice;Attributes} +A{\footnote A TJvHidDevice_Attributes;Attributes_Property;Attributes} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.Attributes\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} Attributes: THIDDAttributes;}\par +{\f0 THIDDAttributes = packed record\line + Size: ULONG;\line + VendorID: Word;\line + ProductID: Word;\line + VersionNumber: Word;\line +end;\par} +The global unique Vendor ID, Product ID and Version of the device. +The values come directly from the device. Size is of no importance. +The record is read in with HidD_GetAttributes. +\par\page + +#{\footnote # IDH_TJvHidDevice_Caps} +${\footnote $ TJvHidDevice.Caps} +K{\footnote K TJvHidDevice,Caps;Caps,TJvHidDevice;Caps} +A{\footnote A TJvHidDevice_Caps;Caps_Property;Caps} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.Caps\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} Caps: THIDPCaps;}\par +{\f0 THIDPCaps = packed record\line + Usage: TUsage;\line + UsagePage: TUsage;\line + InputReportByteLength: Word;\line + OutputReportByteLength: Word;\line + FeatureReportByteLength: Word;\line + Reserved: array [0..16] of Word;\line\line + NumberLinkCollectionNodes: Word;\line\line + NumberInputButtonCaps: Word;\line + NumberInputValueCaps: Word;\line + NumberInputDataIndices: Word;\line\line + NumberOutputButtonCaps: Word;\line + NumberOutputValueCaps: Word;\line + NumberOutputDataIndices: Word;\line + NumberFeatureButtonCaps: Word;\line + NumberFeatureValueCaps: Word;\line + NumberFeatureDataIndices: Word;\line +end;\par} +The capabilities of the device. Various sizes and counts of the device. +The record is read in with HidP_GetCaps. +\par\page + +#{\footnote # IDH_TJvHidDevice_Configuration} +${\footnote $ TJvHidDevice.Configuration} +K{\footnote K TJvHidDevice,Configuration;Configuration,TJvHidDevice;Configuration} +A{\footnote A TJvHidDevice_Configuration;Configuration_Property;Configuration} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.Configuration\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} Configuration: THIDDConfiguration;}\par +{\f0 THIDDConfiguration = packed record\line + cookie: Pointer;\line + size: ULONG;\line + RingBufferSize: ULONG;\line +end;\par} +This seems to describe the buffer size the driver allocates to receive packets from the device. +Tests with a mouse and a keyboard showed that cookie is set on read. size seems untouched. +A write failed. +The record is read in with HidD_GetConfiguration and written with HidD_SetConfiguration. +\par\page + +#{\footnote # IDH_TJvHidDevice_DevicePath} +${\footnote $ TJvHidDevice.DevicePath} +K{\footnote K TJvHidDevice,DevicePath;DevicePath,TJvHidDevice;DevicePath} +A{\footnote A TJvHidDevice_DevicePath;DevicePath_Property;DevicePath} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.DevicePath\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} DevicePath: {\b string};}\par +The path name which is is used to open the {\uldb HidFileHandle\v IDH_TJvHidDevice_HidFileHandle>Main} +of the device. This is a special path which starts with \'27\\\\.\\\'27 and names the driver of the device. +\par\page + +#{\footnote # IDH_TJvHidDevice_DeviceStrings} +${\footnote $ TJvHidDevice.DeviceStrings} +K{\footnote K TJvHidDevice,DeviceStrings;DeviceStrings,TJvHidDevice;DeviceStrings} +A{\footnote A TJvHidDevice_DeviceStrings;DeviceStrings_Property;DeviceStrings} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.DeviceStrings\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} DeviceStrings[Idx: Byte]: string;}\par +The string array of all the strings from the firmware of the device. +{\uldb VendorName\v IDH_TJvHidDevice_VendorName>Main}, {\uldb ProductName\v IDH_TJvHidDevice_ProductName>Main} +and {\uldb SerialNumber\v IDH_TJvHidDevice_SerialNumber>Main} are in this array if set.\line +There may be empty strings in the array if the device does not return a string for a specific index. +Index 0 will always return ''. +\par\page + +#{\footnote # IDH_TJvHidDevice_DevRegKey} +${\footnote $ TJvHidDevice.DevRegKey} +K{\footnote K TJvHidDevice,DevRegKey;DevRegKey,TJvHidDevice;DevRegKey} +A{\footnote A TJvHidDevice_DevRegKey;DevRegKey_Property;DevRegKey} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.DevRegKey\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} DevRegKey: DWORD;}\par +Unique device instance ID. For each plugged device Windows assigns a unique number. +Even for two devices of the same kind the number is different. +The value serves as root entry to the registry values of this device. +The registry key is formed of HKEY_DYN_DATA\\Config\~Manager\\Enum\\{\i DevRegKey}. +Use the number with 8 hex digits. All devices of Windows have an entry there. +This is only valid for Windows 98. Windows 2000 uses another scheme to access +the device registry entries. +\par\page + + +#{\footnote # IDH_TJvHidDevice_HidFileHandle} +${\footnote $ TJvHidDevice.HidFileHandle} +K{\footnote K TJvHidDevice,HidFileHandle;HidFileHandle,TJvHidDevice;HidFileHandle} +A{\footnote A TJvHidDevice_HidFileHandle;HidFileHandle_Property;HidFileHandle} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.HidFileHandle\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} HidFileHandle: THandle;}\par +The file handle of the device opened with\line +CreateFile({\uldb DevicePath\v IDH_TJvHidDevice_DevicePath>Main}, GENERIC_READ {\b or} GENERIC_WRITE,\line + FILE_SHARE_READ {\b or} FILE_SHARE_WRITE, {\b nil}, OPEN_EXISTING, 0, 0);\line +The file is opened by the methods if needed. It stays open until explicitly closed with {\uldb CloseFile\v IDH_TJvHidDevice_CloseFile>Main} or +the device is checked back in. You can open the file with the method {\uldb OpenFile\v IDH_TJvHidDevice_OpenFile>Main}. +\par\page + +#{\footnote # IDH_TJvHidDevice_HidOverlappedHandle} +${\footnote $ TJvHidDevice.HidOverlappedHandle} +K{\footnote K TJvHidDevice,HidOverlappedHandle;HidOverlappedHandle,TJvHidDevice;HidOverlappedHandle} +A{\footnote A TJvHidDevice_HidOverlappedHandle;HidOverlappedHandle_Property;HidOverlappedHandle} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.HidOverlappedHandle\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} HidOverlappedHandle: THandle;}\par +The file handle of the device opened with\line +CreateFile({\uldb DevicePath\v IDH_TJvHidDevice_DevicePath>Main}, GENERIC_READ {\b or} GENERIC_WRITE,\line + FILE_SHARE_READ {\b or} FILE_SHARE_WRITE, {\b nil}, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0);\line +The file is opened by the methods if needed. It stays open until explicitly closed with {\uldb CloseFileEx\v IDH_TJvHidDevice_CloseFileEx>Main} or +the device is checked back in. You can open the file with the method {\uldb OpenFileEx\v IDH_TJvHidDevice_OpenFileEx>Main}. +Only the methods {\uldb ReadFileEx\v IDH_TJvHidDevice_ReadFileEx>Main} and {\uldb WriteFileEx\v IDH_TJvHidDevice_WriteFileEx>Main} need this file handle. +\par\page + +#{\footnote # IDH_TJvHidDevice_IsCheckedOut} +${\footnote $ TJvHidDevice.IsCheckedOut} +K{\footnote K TJvHidDevice,IsCheckedOut;IsCheckedOut,TJvHidDevice;IsCheckedOut} +A{\footnote A TJvHidDevice_IsCheckedOut;IsCheckedOut_Property;IsCheckedOut} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.IsCheckedOut\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} IsCheckedOut: Boolean;}\par +A simple flag which tells you if the device has been checked out with one of the CheckOut-methods. +\par\page + +#{\footnote # IDH_TJvHidDevice_IsPluggedIn} +${\footnote $ TJvHidDevice.IsPluggedIn} +K{\footnote K TJvHidDevice,IsPluggedIn;IsPluggedIn,TJvHidDevice;IsPluggedIn} +A{\footnote A TJvHidDevice_IsPluggedIn;IsPluggedIn_Property;IsPluggedIn} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.IsPluggedIn\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} IsPluggedIn: Boolean;}\par +The flag tells if the device of this object has been unplugged. All methods and all writes to properties +will cease to work. Destruction of the {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController>Main} also pulls the plug. +\par\page + +#{\footnote # IDH_TJvHidDevice_LanguageStrings} +${\footnote $ TJvHidDevice.LanguageStrings} +K{\footnote K TJvHidDevice,LanguageStrings;LanguageStrings,TJvHidDevice;LanguageStrings} +A{\footnote A TJvHidDevice_LanguageStrings;LanguageStrings_Property;LanguageStrings} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.LanguageStrings\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} LanguageStrings: TStringList;}\par +The list of all languages that are supported in the string descriptors of the device. +The entries of the list are localized language names from Windows. The list may be empty.\line +Which of the languages Windows uses for {\uldb DeviceStrings\v IDH_TJvHidDevice_DeviceStrings>Main} is not +documented. There is no way to specify the desired language with HID functions. +\par\page + +#{\footnote # IDH_TJvHidDevice_LinkCollectionNodes} +${\footnote $ TJvHidDevice.LinkCollectionNodes} +K{\footnote K TJvHidDevice,LinkCollectionNodes;LinkCollectionNodes,TJvHidDevice;LinkCollectionNodes} +A{\footnote A TJvHidDevice_LinkCollectionNodes;LinkCollectionNodes_Property;LinkCollectionNodes} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.LinkCollectionNodes\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} LinkCollectionNodes[Idx: WORD]: THIDPLinkCollectionNode;}\par +The array of all the link collection nodes of the device.\par +{\f0 THIDPLinkCollectionNode = packed record\line + LinkUsage: TUsage;\line + LinkUsagePage: TUsage;\line + Parent: Word;\line + NumberOfChildren: Word;\line + NextSibling: Word;\line + FirstChild: Word;\line + CollectionType: BYTE;\line + IsAlias: BYTE;\line + Reserved: Word;\line + UserContext: Pointer;\line +end;}\par +The elements Parent, NextSibling and FirstChild span the tree of the nodes in the usual way.\line +Zero signals no link. {\b Be warned!} This is not always true! +\par\page + +#{\footnote # IDH_TJvHidDevice_LinkCollectionParam} +${\footnote $ TJvHidDevice.LinkCollectionParam} +K{\footnote K TJvHidDevice,LinkCollectionParam;LinkCollectionParam,TJvHidDevice;LinkCollectionParam} +A{\footnote A TJvHidDevice_LinkCollectionParam;LinkCollectionParam_Property;LinkCollectionParam} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.LinkCollectionParam\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} LinkCollectionParam: WORD;}\par +Many methods share common parameters. All properties with suffix Param are used as +parameters in the implementation of the methods. So addressing the same link collection +with more than one method reduces code by first setting LinkCollectionParam and then calling the methods. +The Max*ListLength properties are interconnected to the Param properties. Setting the Param properties +results in an update of the Max*ListLength properties to the correct value. +\par\page + +#{\footnote # IDH_TJvHidDevice_MaxButtonListLength} +${\footnote $ TJvHidDevice.MaxButtonListLength} +K{\footnote K TJvHidDevice,MaxButtonListLength;MaxButtonListLength,TJvHidDevice;MaxButtonListLength} +A{\footnote A TJvHidDevice_MaxButtonListLength;MaxButtonListLength_Property;MaxButtonListLength} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.MaxButtonListLength\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} MaxButtonListLength: ULONG;}\par +The maximum number of elements {\uldb GetButtonCaps\v IDH_TJvHidDevice_GetButtonCaps>Main} can return. +Use this value to allocate the right amount of memory. +\par\page + +#{\footnote # IDH_TJvHidDevice_MaxDataListLength} +${\footnote $ TJvHidDevice.MaxDataListLength} +K{\footnote K TJvHidDevice,MaxDataListLength;MaxDataListLength,TJvHidDevice;MaxDataListLength} +A{\footnote A TJvHidDevice_MaxDataListLength;MaxDataListLength_Property;MaxDataListLength} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.MaxDataListLength\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} MaxDataListLength: ULONG;}\par +The maximum number of elements {\uldb GetData\v IDH_TJvHidDevice_GetData>Main} can return. +Use this value to allocate the right amount of memory. +\par\page + +#{\footnote # IDH_TJvHidDevice_MaxUsageListLength} +${\footnote $ TJvHidDevice.MaxUsageListLength} +K{\footnote K TJvHidDevice,MaxUsageListLength;MaxUsageListLength,TJvHidDevice;MaxUsageListLength} +A{\footnote A TJvHidDevice_MaxUsageListLength;MaxUsageListLength_Property;MaxUsageListLength} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.MaxUsageListLength\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} MaxUsageListLength: ULONG;}\par +The maximum number of elements {\uldb GetUsages\v IDH_TJvHidDevice_GetUsages>Main} +or {\uldb GetUsagesEx\v IDH_TJvHidDevice_GetUsagesEx>Main} can return. +Use this value to allocate the right amount of memory. +\par\page + +#{\footnote # IDH_TJvHidDevice_NumInputBuffers} +${\footnote $ TJvHidDevice.NumInputBuffers} +K{\footnote K TJvHidDevice,NumInputBuffers;NumInputBuffers,TJvHidDevice;NumInputBuffers} +A{\footnote A TJvHidDevice_NumInputBuffers;NumInputBuffers_Property;NumInputBuffers} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.NumInputBuffers\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} NumInputBuffers: Integer;}\par +Tells the number of buffers for reports {\uldb HidFileHandle\v IDH_TJvHidDevice_HidFileHandle>Main} uses. +Assign a value to change the number of buffers. The property is read with HidD_GetNumInputBuffers and written +with HidD_SetNumInputBuffers. +\par\page + +#{\footnote # IDH_TJvHidDevice_NumOverlappedBuffers} +${\footnote $ TJvHidDevice.NumOverlappedBuffers} +K{\footnote K TJvHidDevice,NumOverlappedBuffers;NumOverlappedBuffers,TJvHidDevice;NumOverlappedBuffers} +A{\footnote A TJvHidDevice_NumOverlappedBuffers;NumOverlappedBuffers_Property;NumOverlappedBuffers} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.NumOverlappedBuffers\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} NumOverlappedBuffers: Integer;}\par +Tells the number of buffers for reports {\uldb HidOverlappedHandle\v IDH_TJvHidDevice_HidOverlappedHandle>Main} uses. +Assign a value to change the number of buffers. The property is read with HidD_GetNumInputBuffers and written +with HidD_SetNumInputBuffers. +\par\page + +#{\footnote # IDH_TJvHidDevice_PhysicalDescriptor} +${\footnote $ TJvHidDevice.PhysicalDescriptor} +K{\footnote K TJvHidDevice,PhysicalDescriptor;PhysicalDescriptor,TJvHidDevice;PhysicalDescriptor} +A{\footnote A TJvHidDevice_PhysicalDescriptor;PhysicalDescriptor_Property;PhysicalDescriptor} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.PhysicalDescriptor\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} PhysicalDescriptor: {\b string};}\par +The physical descriptor of the device coming directly from the firmware of the device. +It may be an empty string since it is optional. +The string has been converted from Unicode to ANSI. +\par\page + +#{\footnote # IDH_TJvHidDevice_PreparsedData} +${\footnote $ TJvHidDevice.PreparsedData} +K{\footnote K TJvHidDevice,PreparsedData;PreparsedData,TJvHidDevice;PreparsedData} +A{\footnote A TJvHidDevice_PreparsedData;PreparsedData_Property;PreparsedData} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.PreparsedData\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} PreparsedData: PHIDPPreparsedData;}\par +PreparsedData is an opaque data structure which is needed in the implementation of most +methods. It is exposed as property to allow to call the HID functions directly. +\par\page + +#{\footnote # IDH_TJvHidDevice_ProductName} +${\footnote $ TJvHidDevice.ProductName} +K{\footnote K TJvHidDevice,ProductName;ProductName,TJvHidDevice;ProductName} +A{\footnote A TJvHidDevice_ProductName;ProductName_Property;ProductName} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.ProductName\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} ProductName: {\b string};}\par +The product name of the device coming directly from the firmware of the device. +It may be an empty string since it is optional. +The string has been converted from Unicode to ANSI. +\par\page + +#{\footnote # IDH_TJvHidDevice_RegClass} +${\footnote $ TJvHidDevice.RegClass} +K{\footnote K TJvHidDevice,RegClass;RegClass,TJvHidDevice;RegClass} +A{\footnote A TJvHidDevice_RegClass;RegClass_Property;RegClass} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.RegClass\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} RegClass: {\b string};}\par +The user friendly name of the HID class the device is in. +{\uldb cHidKeyboardClass\v IDH_TJvHidDeviceController_CheckOutByClass>Main} and +{\uldb cHidMouseClass\v IDH_TJvHidDeviceController_CheckOutByClass>Main} name two of the possible classes. +\par\page + +#{\footnote # IDH_TJvHidDevice_RegDescr} +${\footnote $ TJvHidDevice.RegDescr} +K{\footnote K TJvHidDevice,RegDescr;RegDescr,TJvHidDevice;RegDescr} +A{\footnote A TJvHidDevice_RegDescr;RegDescr_Property;RegDescr} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.RegDescr\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} RegDescr: {\b string};}\par +The user friendly description of the HID device from the registry. +This description comes from the INF file which installed the driver or is synthesized by Windows. +The description is localized. +\par\page + +#{\footnote # IDH_TJvHidDevice_ReportTypeParam} +${\footnote $ TJvHidDevice.ReportTypeParam} +K{\footnote K TJvHidDevice,ReportTypeParam;ReportTypeParam,TJvHidDevice;ReportTypeParam} +A{\footnote A TJvHidDevice_ReportTypeParam;ReportTypeParam_Property;ReportTypeParam} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.ReportTypeParam\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} ReportTypeParam: THIDPReportType;}\par +Many methods share common parameters. All properties with suffix Param are used as +parameters in the implementation of the methods. So addressing the same report type +with more than one method reduces code by first setting ReportTypeParam and then calling the methods. +The Max*ListLength properties are interconnected to the Param properties. Setting the Param properties +results in an update of the Max*ListLength properties to the correct value. +\par\page + +#{\footnote # IDH_TJvHidDevice_SerialNumber} +${\footnote $ TJvHidDevice.SerialNumber} +K{\footnote K TJvHidDevice,SerialNumber;SerialNumber,TJvHidDevice;SerialNumber} +A{\footnote A TJvHidDevice_SerialNumber;SerialNumber_Property;SerialNumber} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.SerialNumber\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} SerialNumber: {\b string};}\par +The serial number string of the device coming directly from the firmware of the device. +It may be an empty string since it is optional. +The string has been converted from Unicode to ANSI. +\par\page + +#{\footnote # IDH_TJvHidDevice_UsagePageParam} +${\footnote $ TJvHidDevice.UsagePageParam} +K{\footnote K TJvHidDevice,UsagePageParam;UsagePageParam,TJvHidDevice;UsagePageParam} +A{\footnote A TJvHidDevice_UsagePageParam;UsagePageParam_Property;UsagePageParam} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.UsagePageParam\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} UsagePageParam: TUsage;}\par +Many methods share common parameters. All properties with suffix Param are used as +parameters in the implementation of the methods. So addressing the same usage page +with more than one method reduces code by first setting UsagePageParam and then calling the methods. +The Max*ListLength properties are interconnected to the Param properties. Setting the Param properties +results in an update of the Max*ListLength properties to the correct value. +\par\page + +#{\footnote # IDH_TJvHidDevice_UsageParam} +${\footnote $ TJvHidDevice.UsageParam} +K{\footnote K TJvHidDevice,UsageParam;UsageParam,TJvHidDevice;UsageParam} +A{\footnote A TJvHidDevice_UsageParam;UsageParam_Property;UsageParam} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.UsageParam\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} UsageParam: TUsage;}\par +Many methods share common parameters. All properties with suffix Param are used as +parameters in the implementation of the methods. So addressing the same usage +with more than one method reduces code by first setting UsageParam and then calling the methods. +The Max*ListLength properties are interconnected to the Param properties. Setting the Param properties +Results in an update of the Max*ListLength properties to the correct value. +\par\page + +#{\footnote # IDH_TJvHidDevice_VendorName} +${\footnote $ TJvHidDevice.VendorName} +K{\footnote K TJvHidDevice,VendorName;VendorName,TJvHidDevice;VendorName} +A{\footnote A TJvHidDevice_VendorName;VendorName_Property;VendorName} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.VendorName\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} VendorName: {\b string};}\par +The vendor name of the device coming directly from the firmware of the device. +It may be an empty string since it is optional. +The string has been converted from Unicode to ANSI. +\par\page + +#{\footnote # IDH_TJvHidDevice_CloseFile} +${\footnote $ TJvHidDevice.CloseFile} +K{\footnote K TJvHidDevice,CloseFile;CloseFile,TJvHidDevice;CloseFile} +A{\footnote A TJvHidDevice_CloseFile;CloseFile_Method;CloseFile} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.CloseFile\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b procedure} CloseFile;}\par +Closes the file handle {\uldb HidFileHandle\v IDH_TJvHidDevice_HidFileHandle>Main} if opened. +The file is automatically reopened when a method needs the file handle. +Use {\uldb OpenFile\v IDH_TJvHidDevice_OpenFile>Main} to open the file if needed.\par +\par\page + +#{\footnote # IDH_TJvHidDevice_CloseFileEx} +${\footnote $ TJvHidDevice.CloseFileEx} +K{\footnote K TJvHidDevice,CloseFileEx;CloseFileEx,TJvHidDevice;CloseFileEx} +A{\footnote A TJvHidDevice_CloseFileEx;CloseFileEx_Method;CloseFileEx} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.CloseFileEx\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b procedure} CloseFileEx;}\par +Closes the file handle {\uldb HidOverlappedHandle\v IDH_TJvHidDevice_HidOverlappedHandle>Main} if opened. +The file is automatically reopened when a method needs the file handle. +Use {\uldb OpenFileEx\v IDH_TJvHidDevice_OpenFileEx>Main} to open the file if needed.\par +\par\page + +#{\footnote # IDH_TJvHidDevice_DeviceIoControl} +${\footnote $ TJvHidDevice.DeviceIoControl} +K{\footnote K TJvHidDevice,DeviceIoControl;DeviceIoControl,TJvHidDevice;DeviceIoControl} +A{\footnote A TJvHidDevice_DeviceIoControl;DeviceIoControl_Method;DeviceIoControl} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.DeviceIoControl\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} DeviceIoControl(IoControlCode: DWORD; InBuffer: Pointer; InSize: DWORD; +OutBuffer: Pointer; OutSize: DWORD; {\b var} BytesReturned: DWORD): Boolean;}\par +Calls {\f0 Windows.DeviceIoControl({\uldb HidFileHandle\v IDH_TJvHidDevice_HidFileHandle>Main}, IoControlCode, InBuffer, InSize, OutBuffer, OutSize, BytesReturned, {\b nil});}\par +The return value comes from Windows.DeviceIoControl or {\uldb OpenFile\v IDH_TJvHidDevice_OpenFile>Main}. +\par\page + +#{\footnote # IDH_TJvHidDevice_Destroy} +${\footnote $ TJvHidDevice.Destroy} +K{\footnote K TJvHidDevice,Destroy;Destroy,TJvHidDevice;Destroy} +K{\footnote K TJvHidDevice,Destroy;Destroy,TJvHidDevice;Destroy} +A{\footnote A TJvHidDevice_Destroy;Destroy_Method;Destroy} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.Destroy\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b destructor} Destroy; {\b override};}\par +The destructor of the TJvHidDevice class. The constructor is not exposed. +Only TJvHidDeviceController can (or should) create a TJvHidDevice object. +If the device is checked out and plugged in the TJvHidDeviceController creates a new +checked in object to represent this device.\line +As usual call the Free method of the object to destroy it. +You may override the destructor if you like, but do not forget to call "{\b inherited} Destroy;" +as last statement of the overridden destructor or the TJvHidDeviceController component cannot clean up correctly. +\par\page + +#{\footnote # IDH_TJvHidDevice_FlushQueue} +${\footnote $ TJvHidDevice.FlushQueue} +K{\footnote K TJvHidDevice,FlushQueue;FlushQueue,TJvHidDevice;FlushQueue} +A{\footnote A TJvHidDevice_FlushQueue;FlushQueue_Method;FlushQueue} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.FlushQueue\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} FlushQueue: Boolean;}\par +Calls {\f0 HidD_FlushQueue({\uldb HidFileHandle\v IDH_TJvHidDevice_HidFileHandle>Main});} to delete all pending information from the input queue of the device.\par +The return value comes from HidD_FlushQueue or {\uldb OpenFile\v IDH_TJvHidDevice_OpenFile>Main}. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetButtonCaps} +${\footnote $ TJvHidDevice.GetButtonCaps} +K{\footnote K TJvHidDevice,GetButtonCaps;GetButtonCaps,TJvHidDevice;GetButtonCaps} +A{\footnote A TJvHidDevice_GetButtonCaps;GetButtonCaps_Method;GetButtonCaps} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetButtonCaps\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetButtonCaps(ButtonCaps: PHIDPButtonCaps; {\b var} Count: WORD): NTSTATUS;}\par +Calls {\f0 HidP_GetButtonCaps({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, ButtonCaps, Count, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main});}\par +The return value value comes from HidP_GetButtonCaps or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetButtons} +${\footnote $ TJvHidDevice.GetButtons} +K{\footnote K TJvHidDevice,GetButtons;GetButtons,TJvHidDevice;GetButtons} +A{\footnote A TJvHidDevice_GetButtons;GetButtons_Method;GetButtons} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetButtons\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetButtons(UsageList: PUsage; {\b var} UsageLength: ULONG; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_GetButtons({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, UsageList, UsageLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_GetButtons or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetButtonsEx} +${\footnote $ TJvHidDevice.GetButtonsEx} +K{\footnote K TJvHidDevice,GetButtonsEx;GetButtonsEx,TJvHidDevice;GetButtonsEx} +A{\footnote A TJvHidDevice_GetButtonsEx;GetButtonsEx_Method;GetButtonsEx} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetButtonsEx\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetButtonsEx(UsageList: PUsageAndPage; {\b var} UsageLength: ULONG; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +{\f0 TUsageAndPage = packed record\line + Usage: TUsage;\line + UsagePage: TUsage;\line +end;\par} +Calls {\f0 HidP_GetButtonsEx({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, UsageList, UsageLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_GetButtonsEx or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetData} +${\footnote $ TJvHidDevice.GetData} +K{\footnote K TJvHidDevice,GetData;GetData,TJvHidDevice;GetData} +A{\footnote A TJvHidDevice_GetData;GetData_Method;GetData} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetData\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetData(DataList: PHIDPData; {\b var} DataLength: ULONG; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_GetData({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, DataList, DataLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_GetData or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetFeature} +${\footnote $ TJvHidDevice.GetFeature} +K{\footnote K TJvHidDevice,GetFeature;GetFeature,TJvHidDevice;GetFeature} +A{\footnote A TJvHidDevice_GetFeature;GetFeature_Method;GetFeature} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetFeature\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetFeature({\b var} Report; {\b const} Size: Integer): Boolean;}\par +Reads in a feature report from the device. Set the first byte of the report buffer to the report ID you want to read. +Add this extra byte to the length of the report to read.\par +Calls {\f0 HidD_GetFeature({\uldb HidFileHandle\v IDH_TJvHidDevice_HidFileHandle>Main}, Report, Size);}\par +The return value comes from HidD_GetFeature or {\uldb OpenFile\v IDH_TJvHidDevice_OpenFile>Main}. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetScaledUsageValue} +${\footnote $ TJvHidDevice.GetScaledUsageValue} +K{\footnote K TJvHidDevice,GetScaledUsageValue;GetScaledUsageValue,TJvHidDevice;GetScaledUsageValue} +A{\footnote A TJvHidDevice_GetScaledUsageValue;GetScaledUsageValue_Method;GetScaledUsageValue} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetScaledUsageValue\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetScaledUsageValue({\b var} UsageValue: Integer; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_GetScaledUsageValue({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, +{\uldb UsageParam\v IDH_TJvHidDevice_UsageParam>Main}, UsageValue, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_GetScaledUsageValue or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetSpecificButtonCaps} +${\footnote $ TJvHidDevice.GetSpecificButtonCaps} +K{\footnote K TJvHidDevice,GetSpecificButtonCaps;GetSpecificButtonCaps,TJvHidDevice;GetSpecificButtonCaps} +A{\footnote A TJvHidDevice_GetSpecificButtonCaps;GetSpecificButtonCaps_Method;GetSpecificButtonCaps} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetSpecificButtonCaps\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetSpecificButtonCaps(ButtonCaps: PHIDPButtonCaps; {\b var} Count: WORD): NTSTATUS;}\par +Calls {\f0 HidP_GetSpecificButtonCaps({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, {\uldb UsageParam\v IDH_TJvHidDevice_UsageParam>Main}, ButtonCaps, Count, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main});}\par +The return value value comes from HidP_GetSpecificButtonCaps or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetSpecificValueCaps} +${\footnote $ TJvHidDevice.GetSpecificValueCaps} +K{\footnote K TJvHidDevice,GetSpecificValueCaps;GetSpecificValueCaps,TJvHidDevice;GetSpecificValueCaps} +A{\footnote A TJvHidDevice_GetSpecificValueCaps;GetSpecificValueCaps_Method;GetSpecificValueCaps} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetSpecificValueCaps\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetSpecificValueCaps(ValueCaps: PHIDPValueCaps; {\b var} Count: WORD): NTSTATUS;}\par +Calls {\f0 HidP_GetSpecificValueCaps({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, {\uldb UsageParam\v IDH_TJvHidDevice_UsageParam>Main}, ValueCaps, Count, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main});}\par +The return value value comes from HidP_GetSpecificValueCaps or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetUsages} +${\footnote $ TJvHidDevice.GetUsages} +K{\footnote K TJvHidDevice,GetUsages;GetUsages,TJvHidDevice;GetUsages} +A{\footnote A TJvHidDevice_GetUsages;GetUsages_Method;GetUsages} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetUsages\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetUsages(UsageList: PUsage; {\b var} UsageLength: ULONG; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_GetUsages({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, UsageList, UsageLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_GetUsages or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetUsagesEx} +${\footnote $ TJvHidDevice.GetUsagesEx} +K{\footnote K TJvHidDevice,GetUsagesEx;GetUsagesEx,TJvHidDevice;GetUsagesEx} +A{\footnote A TJvHidDevice_GetUsagesEx;GetUsagesEx_Method;GetUsagesEx} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetUsagesEx\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetUsagesEx(UsageList: PUsageAndPage; {\b var} UsageLength: ULONG; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +{\f0 TUsageAndPage = packed record\line + Usage: TUsage;\line + UsagePage: TUsage;\line +end;\par} +Calls {\f0 HidP_GetUsagesEx({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, UsageList, UsageLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_GetUsagesEx or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetUsageValue} +${\footnote $ TJvHidDevice.GetUsageValue} +K{\footnote K TJvHidDevice,GetUsageValue;GetUsageValue,TJvHidDevice;GetUsageValue} +A{\footnote A TJvHidDevice_GetUsageValue;GetUsageValue_Method;GetUsageValue} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetUsageValue\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetUsageValue({\b var} UsageValue: ULONG; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_GetUsageValue({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, {\uldb UsageParam\v IDH_TJvHidDevice_UsageParam>Main}, UsageValue, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_GetUsageValue or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetUsageValueArray} +${\footnote $ TJvHidDevice.GetUsageValueArray} +K{\footnote K TJvHidDevice,GetUsageValueArray;GetUsageValueArray,TJvHidDevice;GetUsageValueArray} +A{\footnote A TJvHidDevice_GetUsageValueArray;GetUsageValueArray_Method;GetUsageValueArray} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetUsageValueArray\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetUsageValueArray(UsageValue: PChar; UsageValueByteLength: WORD; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_GetUsageValueArray({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, {\uldb UsageParam\v IDH_TJvHidDevice_UsageParam>Main}, UsageValue, UsageValueByteLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_GetUsageValueArray or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_GetValueCaps} +${\footnote $ TJvHidDevice.GetValueCaps} +K{\footnote K TJvHidDevice,GetValueCaps;GetValueCaps,TJvHidDevice;GetValueCaps} +A{\footnote A TJvHidDevice_GetValueCaps;GetValueCaps_Method;GetValueCaps} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.GetValueCaps\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} GetValueCaps(ValueCaps: PHIDPValueCaps; {\b var} Count: WORD): NTSTATUS;}\par +Calls {\f0 HidP_GetValueCaps({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, ValueCaps, Count, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main});}\par +The return value value comes from HidP_GetValueCaps or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_OpenFile} +${\footnote $ TJvHidDevice.OpenFile} +K{\footnote K TJvHidDevice,OpenFile;OpenFile,TJvHidDevice;OpenFile} +A{\footnote A TJvHidDevice_OpenFile;OpenFile_Method;OpenFile} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.OpenFile\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} OpenFile: Boolean;}\par +Opens the file handle {\uldb HidFileHandle\v IDH_TJvHidDevice_HidFileHandle>Main} if not already opened. +The file is closed with {\uldb CloseFile\v IDH_TJvHidDevice_CloseFile>Main}.\par +The return value is True for an already open or a successfully opened file. +\par\page + +#{\footnote # IDH_TJvHidDevice_OpenFileEx} +${\footnote $ TJvHidDevice.OpenFileEx} +K{\footnote K TJvHidDevice,OpenFileEx;OpenFileEx,TJvHidDevice;OpenFileEx} +A{\footnote A TJvHidDevice_OpenFileEx;OpenFileEx_Method;OpenFileEx} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.OpenFileEx\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} OpenFileEx: Boolean;}\par +Opens the file handle {\uldb HidOverlappedHandle\v IDH_TJvHidDevice_HidOverlappedHandle>Main} if not already opened. +The file is closed with {\uldb CloseFileEx\v IDH_TJvHidDevice_CloseFileEx>Main}.\par +The return value is True for an already open or a successfully opened file. +\par\page + +#{\footnote # IDH_TJvHidDevice_ReadFile} +${\footnote $ TJvHidDevice.ReadFile} +K{\footnote K TJvHidDevice,ReadFile;ReadFile,TJvHidDevice;ReadFile} +A{\footnote A TJvHidDevice_ReadFile;ReadFile_Method;ReadFile} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.ReadFile\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} ReadFile({\b var} Report; ToRead: DWORD; {\b var} BytesRead: DWORD): Boolean;}\par +Calls {\f0 Windows.ReadFile({\uldb HidFileHandle\v IDH_TJvHidDevice_HidFileHandle>Main}, Report, ToRead, BytesRead, {\b nil});}\par +The return value comes from Windows.ReadFile or {\uldb OpenFile\v IDH_TJvHidDevice_OpenFile>Main}. +\par\page + +#{\footnote # IDH_TJvHidDevice_ReadFileEx} +${\footnote $ TJvHidDevice.ReadFileEx} +K{\footnote K TJvHidDevice,ReadFileEx;ReadFileEx,TJvHidDevice;ReadFileEx} +A{\footnote A TJvHidDevice_ReadFileEx;ReadFileEx_Method;ReadFileEx} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.ReadFileEx\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} ReadFileEx({\b var} Report; ToRead: DWORD; CallBack: TPROverlappedCompletionRoutine): Boolean;}\par +Calls {\f0 Windows.ReadFileEx({\uldb HidOverlappedHandle\v IDH_TJvHidDevice_HidOverlappedHandle>Main}, Report, ToRead, Ovl, CallBack);}\par +The return value comes from Windows.ReadFileEx or {\uldb OpenFileEx\v IDH_TJvHidDevice_OpenFileEx>Main}.\line +Ovl is internal. Ovl.hEvent is initialized to {\f0 Ovl.hEvent := DWORD(Self);}. +\par\page + +#{\footnote # IDH_TJvHidDevice_SetButtons} +${\footnote $ TJvHidDevice.SetButtons} +K{\footnote K TJvHidDevice,SetButtons;SetButtons,TJvHidDevice;SetButtons} +A{\footnote A TJvHidDevice_SetButtons;SetButtons_Method;SetButtons} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.SetButtons\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} SetButtons(UsageList: PUsage; {\b var} UsageLength: ULONG; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_SetButtons({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, UsageList, UsageLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_SetButtons or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_SetData} +${\footnote $ TJvHidDevice.SetData} +K{\footnote K TJvHidDevice,SetData;SetData,TJvHidDevice;SetData} +A{\footnote A TJvHidDevice_SetData;SetData_Method;SetData} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.SetData\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} SetData(DataList: PHIDPData; {\b var} DataLength: ULONG; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_SetData({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, DataList, DataLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_SetData or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_SetFeature} +${\footnote $ TJvHidDevice.SetFeature} +K{\footnote K TJvHidDevice,SetFeature;SetFeature,TJvHidDevice;SetFeature} +A{\footnote A TJvHidDevice_SetFeature;SetFeature_Method;SetFeature} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.SetFeature\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} SetFeature({\b var} Report; {\b const} Size: Integer): Boolean;}\par +Writes a feature report to the device. Set the first byte of the report buffer to the report ID you want to write. +Add this extra byte to the length of the report to write.\par +Calls {\f0 HidD_SetFeature({\uldb HidFileHandle\v IDH_TJvHidDevice_HidFileHandle>Main}, Report, Size);}\par +The return value comes from HidD_SetFeature or {\uldb OpenFile\v IDH_TJvHidDevice_OpenFile>Main}. +\par\page + +#{\footnote # IDH_TJvHidDevice_SetScaledUsageValue} +${\footnote $ TJvHidDevice.SetScaledUsageValue} +K{\footnote K TJvHidDevice,SetScaledUsageValue;SetScaledUsageValue,TJvHidDevice;SetScaledUsageValue} +A{\footnote A TJvHidDevice_SetScaledUsageValue;SetScaledUsageValue_Method;SetScaledUsageValue} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.SetScaledUsageValue\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} function SetScaledUsageValue(UsageValue: Integer; {\b var} Report; ReportLength: ULong): NTSTATUS;}\par +Calls {\f0 HidP_SetScaledUsageValue({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, {\uldb UsageParam\v IDH_TJvHidDevice_UsageParam>Main}, UsageValue, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_SetScaledUsageValue or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_SetUsages} +${\footnote $ TJvHidDevice.SetUsages} +K{\footnote K TJvHidDevice,SetUsages;SetUsages,TJvHidDevice;SetUsages} +A{\footnote A TJvHidDevice_SetUsages;SetUsages_Method;SetUsages} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.SetUsages\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} SetUsages(UsageList: PUsage; {\b var} UsageLength: ULong; {\b var} Report; ReportLength: ULong): NTSTATUS;}\par +Calls {\f0 HidP_SetUsages({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, UsageList, UsageLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_SetUsages or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_SetUsageValue} +${\footnote $ TJvHidDevice.SetUsageValue} +K{\footnote K TJvHidDevice,SetUsageValue;SetUsageValue,TJvHidDevice;SetUsageValue} +A{\footnote A TJvHidDevice_SetUsageValue;SetUsageValue_Method;SetUsageValue} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.SetUsageValue\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} SetUsageValue(UsageValue: ULONG; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_SetUsageValue({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, {\uldb UsageParam\v IDH_TJvHidDevice_UsageParam>Main}, UsageValue, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_SetUsageValue or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_SetUsageValueArray} +${\footnote $ TJvHidDevice.SetUsageValueArray} +K{\footnote K TJvHidDevice,SetUsageValueArray;SetUsageValueArray,TJvHidDevice;SetUsageValueArray} +A{\footnote A TJvHidDevice_SetUsageValueArray;SetUsageValueArray_Method;SetUsageValueArray} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.SetUsageValueArray\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} SetUsageValueArray(UsageValue: PChar; UsageValueByteLength: WORD; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_SetUsageValueArray({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, {\uldb UsageParam\v IDH_TJvHidDevice_UsageParam>Main}, UsageValue, UsageValueByteLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_SetUsageValueArray or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_UnsetButtons} +${\footnote $ TJvHidDevice.UnsetButtons} +K{\footnote K TJvHidDevice,UnsetButtons;UnsetButtons,TJvHidDevice;UnsetButtons} +A{\footnote A TJvHidDevice_UnsetButtons;UnsetButtons_Method;UnsetButtons} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.UnsetButtons\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} UnsetButtons(UsageList: PUsage; {\b var} UsageLength: ULONG; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_UnsetButtons({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, UsageList, UsageLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_UnsetButtons or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_UnsetUsages} +${\footnote $ TJvHidDevice.UnsetUsages} +K{\footnote K TJvHidDevice,UnsetUsages;UnsetUsages,TJvHidDevice;UnsetUsages} +A{\footnote A TJvHidDevice_UnsetUsages;UnsetUsages_Method;UnsetUsages} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.UnsetUsages\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} UnsetUsages(UsageList: PUsage; {\b var} UsageLength: ULONG; {\b var} Report; ReportLength: ULONG): NTSTATUS;}\par +Calls {\f0 HidP_UnsetUsages({\uldb ReportTypeParam\v IDH_TJvHidDevice_ReportTypeParam>Main}, {\uldb UsagePageParam\v IDH_TJvHidDevice_UsagePageParam>Main}, {\uldb LinkCollectionParam\v IDH_TJvHidDevice_LinkCollectionParam>Main}, UsageList, UsageLength, {\uldb PreparsedData\v IDH_TJvHidDevice_PreparsedData>Main}, Report, ReportLength);}\par +The return value value comes from HidP_UnsetUsages or is {\f0 HIDP_STATUS_NULL} if the device +is not plugged in. +\par\page + +#{\footnote # IDH_TJvHidDevice_WriteFile} +${\footnote $ TJvHidDevice.WriteFile} +K{\footnote K TJvHidDevice,WriteFile;WriteFile,TJvHidDevice;WriteFile} +A{\footnote A TJvHidDevice_WriteFile;WriteFile_Method;WriteFile} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.WriteFile\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} WriteFile({\b var} Report; ToWrite: DWORD; {\b var} BytesWritten: DWORD): Boolean;}\par +Calls {\f0 Windows.WriteFile({\uldb HidFileHandle\v IDH_TJvHidDevice_HidFileHandle>Main}, Report, ToWrite, BytesWritten, {\b nil});}\par +The return value comes from Windows.WriteFile or {\uldb OpenFile\v IDH_TJvHidDevice_OpenFile>Main}. +\par\page + +#{\footnote # IDH_TJvHidDevice_WriteFileEx} +${\footnote $ TJvHidDevice.WriteFileEx} +K{\footnote K TJvHidDevice,WriteFileEx;WriteFileEx,TJvHidDevice;WriteFileEx} +A{\footnote A TJvHidDevice_WriteFileEx;WriteFileEx_Method;WriteFileEx} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDevice.WriteFileEx\b0}} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} WriteFileEx({\b var} Report; ToWrite: DWORD; CallBack: TPROverlappedCompletionRoutine): Boolean;}\par +Calls {\f0 Windows.WriteFileEx({\uldb HidOverlappedHandle\v IDH_TJvHidDevice_HidOverlappedHandle>Main}, Report, ToWrite, Ovl, CallBack);}\par +The return value comes from Windows.WriteFileEx or {\uldb OpenFileEx\v IDH_TJvHidDevice_OpenFile>Main}. +Ovl is internal. Ovl.hEvent is initialized to {\f0 Ovl.hEvent := DWORD(Self);}. +\par\page + +#{\footnote # IDH_TJvHidDevice_OnUnplug} +${\footnote $ TJvHidDevice.OnUnplug} +K{\footnote K TJvHidDevice,OnUnplug;OnUnplug,TJvHidDevice;OnUnplug} +A{\footnote A TJvHidDevice_OnUnplug;OnUnplug_Event;OnUnplug} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDevice.OnUnplug\b0} \line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 TJvHidUnplugEvent = {\b procedure}(HidDev: {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice}) {\b of} {\b object};}\par +This event occurs if you pull the plug of the device. It is sent even for checked in devices. +The object is already in unplugged state. No method will work.\line +You can assign the event function directly at runtime or for all devices at design time with {\uldb OnDeviceUnplug\v IDH_TJvHidDeviceController_OnDeviceUnplug>Main}. +\par\page + +#{\footnote # IDH_Class_TJvHidDeviceController} +${\footnote $ TJvHidDeviceController} +K{\footnote K TJvHidDeviceController} +A{\footnote A TJvHidDeviceController_Object;TJvHidDeviceController} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\{bml usb.bmp\}\f1\fs28 \cf2 TJvHidDeviceController Object}\line +{\fs20{\ul Hierarchy\v IDH_Anym_3FAMT_2} {\uldb Properties\v pme_cp_TJvHidDeviceController>pme} {\uldb Methods\v pme_cm_TJvHidDeviceController>pme} {\uldb Events\v pme_ce_TJvHidDeviceController>pme}\tab{\uldb Other\v pme_ce_Other>pme}}\par\pard} +\b Declaration\b0\par +{\f0 TJvHidDeviceController = \b class\b0 (TComponent)}\par\pard\sa0\sb0{ +#{\footnote # IDH_ClassTopic_TJvHidDeviceController_Properties}} +The main purpose of a TJvHidDeviceController object is to handle TJvHidDevice objects. +For each plugged HID device the controller creates a TJvHidDevice object to represent the device. +The controller monitors device plugs and unplugs. On device plug a new TJvHidDevice object is created. +On unplug the object is not destroyed but is signalled and goes to an unplugged state.\line +The methods of TJvHidDeviceController are mainly for handing out TJvHidDevice objects by various criteria.\line +There is no need to instantiate more than one TJVHidDeviceController per program. +\par\page + +#{\footnote # pme_cp_TJvHidDeviceController} +${\footnote $ Properties for TJvHidDeviceController} ++{\footnote + Auto} +\sa50\sb50{\keepn{\f1\fs20\cf2\b{\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController>Main} Properties\b0}\line +{\fs20{\ul Legend\v IDH_Legend}}\par\pard} +{\f1\tx300\b In TJvHidDeviceController\b0\line +\{bmct readonly.bmp\}\tab{\uldb HidGuid\v IDH_TJvHidDeviceController_HidGuid>Main}\line +\{bmct readonly.bmp\}\tab{\uldb NumCheckedInDevices\v IDH_TJvHidDeviceController_NumCheckedInDevices>Main}\line +\{bmct readonly.bmp\}\tab{\uldb NumCheckedOutDevices\v IDH_TJvHidDeviceController_NumCheckedOutDevices>Main}\line +\{bmct readonly.bmp\}\tab{\uldb NumUnpluggedDevices\v IDH_TJvHidDeviceController_NumUnpluggedDevices>Main} +}\par\page + +#{\footnote # pme_cm_TJvHidDeviceController} +${\footnote $ Methods for TJvHidDeviceController} ++{\footnote + Auto} +\sa50\sb50{\keepn{\f1\fs20\cf2\b{\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController>Main} Methods\b0}\line +{\fs20{\ul Legend\v IDH_Legend}}\par\pard} +{\f1\tx300\b In TJvHidDeviceController\b0\line +\{bmct empty.bmp\}\tab{\uldb CheckIn\v IDH_TJvHidDeviceController_CheckIn>Main}\line +\{bmct empty.bmp\}\tab{\uldb CheckOut\v IDH_TJvHidDeviceController_CheckOut>Main}\line +\{bmct empty.bmp\}\tab{\uldb CheckOutByClass\v IDH_TJvHidDeviceController_CheckOutByClass>Main}\line +\{bmct empty.bmp\}\tab{\uldb CheckOutByID\v IDH_TJvHidDeviceController_CheckOutByID>Main}\line +\{bmct empty.bmp\}\tab{\uldb CheckOutByIndex\v IDH_TJvHidDeviceController_CheckOutByIndex>Main}\line +\{bmct empty.bmp\}\tab{\uldb CheckOutByProductName\v IDH_TJvHidDeviceController_CheckOutByProductName>Main}\line +\{bmct empty.bmp\}\tab{\uldb CheckOutByVendorName\v IDH_TJvHidDeviceController_CheckOutByVendorName>Main}\line +\{bmct empty.bmp\}\tab{\uldb Create\v IDH_TJvHidDeviceController_Create>Main}\line +\{bmct empty.bmp\}\tab{\uldb Destroy\v IDH_TJvHidDeviceController_Destroy>Main}\line +\{bmct empty.bmp\}\tab{\uldb Enumerate\v IDH_TJvHidDeviceController_Enumerate>Main} +}\par\page + +#{\footnote # pme_ce_TJvHidDeviceController} +${\footnote $ Events for TJvHidDeviceController} ++{\footnote + Auto} +\sa50\sb50{\keepn{\f1\fs20\cf2\b{\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController>Main} Events\b0}\line +{\fs20{\ul Legend\v IDH_Legend}}\par\pard} +{\f1\tx300\b In TJvHidDeviceController\b0\line +\{bmct Published.bmp\}\tab{\uldb OnDeviceChange\v IDH_TJvHidDeviceController_OnDeviceChange>Main}\line +\{bmct Published.bmp\}\tab{\uldb OnDeviceUnplug\v IDH_TJvHidDeviceController_OnDeviceUnplug>Main}\line +\{bmct Published.bmp\}\tab{\uldb OnEnumerate\v IDH_TJvHidDeviceController_OnEnumerate>Main} +}\par\page + +#{\footnote # pme_ce_Other} +${\footnote $ HID functions not in scope} ++{\footnote + Auto} +\sa50\sb50{\keepn{\f1\fs20\cf2\b{\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController>Main} Other\b0}\line +{\fs20{\ul Legend\v IDH_Legend}}\par\pard} +{\f1\tx300\b Functions not in component\b0\line +{\uldb HidD_Hello\v Other_HidD_Hello>Main}\line +{\uldb HidP_UsageListDifference\v Other_HidP_UsageListDifference>Main}\line +{\uldb HidP_TranslateUsagesToI8042ScanCodes\v Other_HidP_TranslateUsagesToI8042ScanCodes>Main}\line +{\uldb HidP_GetExtendedAttributes\v Other_HidP_GetExtendedAttributes>Main}\line +{\uldb HidP_InitializeReportForID\v Other_HidP_InitializeReportForID>Main} +}\par\page + +#{\footnote # Other_HidD_Hello} +${\footnote $ HidD_Hello} +K{\footnote K HidD_Hello} +A{\footnote A HidD_Hello} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b HidD_Hello\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} HidD_Hello(Buffer: PChar; BufferLength: ULONG): ULONG; {\b stdcall};}\par +The undocumented easter egg function of HID.DLL. +The function fills Buffer with\line +{\f0 'Hello\\nI hate Jello\\n'}\line +and returns the +number of bytes filled in (StrLen(Buffer)+1 = 20).\par +The function does not check its parameters completely. +Handing in {\f0\b nil} as buffer gives access violation. +It always returns 20 even if buffer length is less than 20, +but does not produce buffer overflow. +\par\page + +#{\footnote # Other_HidP_UsageListDifference} +${\footnote $ HidP_UsageListDifference} +K{\footnote K HidP_UsageListDifference} +A{\footnote A HidP_UsageListDifference} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b HidP_UsageListDifference\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} HidP_UsageListDifference(PreviousUsageList: PUsage;\line + CurrentUsageList: PUsage; BreakUsageList: PUsage;\line + MakeUsageList: PUsage; UsageListLength: ULONG): NTSTATUS; {\b stdcall};}\par +Fills BreakUsageList with all usages which are in PreviousUsageList but not in CurrentUsageList. +MakeUsageList is filled with all usages in CurrentUsageList but not in PreviousUsageList. +UsageListLength is the length for all lists and should be the length of the longer of PreviousUsageList and CurrentUsageList. +A Usage value of zero marks the end of a list. +\par\page + +#{\footnote # Other_HidP_TranslateUsagesToI8042ScanCodes} +${\footnote $ HidP_TranslateUsagesToI8042ScanCodes} +K{\footnote K HidP_TranslateUsagesToI8042ScanCodes} +A{\footnote A HidP_TranslateUsagesToI8042ScanCodes} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b HidP_TranslateUsagesToI8042ScanCodes\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} HidP_TranslateUsagesToI8042ScanCodes(\line + ChangedUsageList: PUsage;\line + UsageListLength: ULONG;\line + KeyAction: THIDPKeyboardDirection;\line + var ModifierState: THIDPKeyboardModifierState;\line + InsertCodesProcedure: THIDPInsertScanCodes;\line + InsertCodesContext: Pointer): NTSTATUS; {\b stdcall};}\par +There is no documentation for this function. It seems to be a utility function for a keyboard driver. +It takes the raw data of USB keys and converts it to scan codes as if the keys are from a normal PC keyboard. +This function is mainly for special USB keyboard drivers. +\par\page + +#{\footnote # Other_HidP_GetExtendedAttributes} +${\footnote $ HidP_GetExtendedAttributes} +K{\footnote K HidP_GetExtendedAttributes} +A{\footnote A HidP_GetExtendedAttributes} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b HidP_GetExtendedAttributes\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} HidP_GetExtendedAttributes(ReportType: THIDPReportType;\line + DataIndex: Word; PreparsedData: PHIDPPreparsedData;\line + Attributes: PHIDPExtendedAttributes;\line + var LengthAttributes: ULONG): NTSTATUS; {\b stdcall};}\par +There is no documentation for this function. It is only implemented in the HID.DLL of Windows 98 SE and Windows 2000. +\par\page + +#{\footnote # Other_HidP_InitializeReportForID} +${\footnote $ HidP_InitializeReportForID} +K{\footnote K HidP_InitializeReportForID} +A{\footnote A HidP_InitializeReportForID} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b HidP_InitializeReportForID\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} HidP_InitializeReportForID(ReportType: THIDPReportType;\line + ReportID: BYTE; PreparsedData: PHIDPPreparsedData;\line + {\b var} Report; ReportLength: ULONG): NTSTATUS; {\b stdcall};}\par +There is no documentation for this function. It is only implemented in the HID.DLL of Windows 98 SE and Windows 2000. +This seems to be a simple initialization helper function. +\par\page + +#{\footnote # pme_ce_Utilities} +${\footnote $ Utility functions for TJvHidDevice} ++{\footnote + Auto} +\sa50\sb50{\keepn{\f1\fs20\cf2\b{\uldb TJvHidDevice\v IDH_Class_TJvHidDevice>Main} Utilities\b0}\line +{\fs20{\ul Legend\v IDH_Legend}}\par\pard} +{\f1\tx300\b Utility functions for TJvHidDevice\b0\line +{\uldb HidCheck\v Utilities_HidCheck>Main}\line +{\uldb HidError\v Utilities_HidError>Main}\line +}\par\page + +#{\footnote # Utilities_HidCheck} +${\footnote $ HidCheck} +K{\footnote K HidCheck} +A{\footnote A HidCheck} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b HidCheck\b0}\line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} HidCheck({\b const} RetVal: NTSTATUS): NTSTATUS; {\b overload};\line +{\b function} HidCheck({\b const} RetVal: LongBool): LongBool; {\b overload};}\par +This function checks the return value of a HID-function or method of +a TJvHidDevice object. If the method returns an error HidCheck throws an exception +by calling {\uldb HidError\v Utilities_HidError}. The return value is always RetVal. +\par\page + +#{\footnote # Utilities_HidError} +${\footnote $ HidError} +K{\footnote K HidError} +A{\footnote A HidError} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b HidError\b0}\line +{\fs20 {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} HidError({\b const} RetVal: NTSTATUS): NTSTATUS;}\par +HidError throws an exception with an appropriate error text +if RetVal is in the range of the HID error values. The return value is always RetVal. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_HidGuid} +${\footnote $ TJvHidDeviceController.HidGuid} +K{\footnote K TJvHidDeviceController,HidGuid;HidGuid,TJvHidDeviceController;HidGuid} +A{\footnote A TJvHidDeviceController_HidGuid;HidGuid_Property;HidGuid} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDeviceController.HidGuid\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} HidGuid: TGUID;}\par +The GUID of the HID stack. It is of no importance for TJvHidDeviceController.\line +It is only present to provide all elements of the HID API if you want to enumerate the +HID devices directly with SetupDiGetClassDevs() and SetupDiEnumDeviceInterfaces() +from the Setup API conversion (SetupApi.pas, www.delphi-jedi.org). +\par\page + +#{\footnote # IDH_TJvHidDeviceController_NumCheckedInDevices} +${\footnote $ TJvHidDeviceController.NumCheckedInDevices} +K{\footnote K TJvHidDeviceController,NumCheckedInDevices;NumCheckedInDevices,TJvHidDeviceController;NumCheckedInDevices} +A{\footnote A TJvHidDeviceController_NumCheckedInDevices;NumCheckedInDevices_Property;NumCheckedInDevices} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDeviceController.NumCheckedInDevices\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} NumCheckedInDevices: Integer;}\par +The property tells the number of currently checked in HID devices. +{\uldb NumCheckedInDevices\v IDH_TJvHidDeviceController_NumCheckedInDevices} + +{\uldb NumCheckedOutDevices\v IDH_TJvHidDeviceController_NumCheckedInDevices} tells the number of all controlled devices. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_NumCheckedOutDevices} +${\footnote $ TJvHidDeviceController.NumCheckedOutDevices} +K{\footnote K TJvHidDeviceController,NumCheckedOutDevices;NumCheckedOutDevices,TJvHidDeviceController;NumCheckedOutDevices} +A{\footnote A TJvHidDeviceController_NumCheckedOutDevices;NumCheckedOutDevices_Property;NumCheckedOutDevices} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDeviceController.NumCheckedOutDevices\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} NumCheckedOutDevices: Integer;}\par +The property tells the number of currently checked out HID devices. +{\uldb NumCheckedInDevices\v IDH_TJvHidDeviceController_NumCheckedInDevices} + +{\uldb NumCheckedOutDevices\v IDH_TJvHidDeviceController_NumCheckedInDevices} tells the number of all controlled devices. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_NumUnpluggedDevices} +${\footnote $ TJvHidDeviceController.NumUnpluggedDevices} +K{\footnote K TJvHidDeviceController,NumUnpluggedDevices;NumUnpluggedDevices,TJvHidDeviceController;NumUnpluggedDevices} +A{\footnote A TJvHidDeviceController_NumUnpluggedDevices;NumUnpluggedDevices_Property;NumUnpluggedDevices} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDeviceController.NumUnpluggedDevices\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b property} NumUnpluggedDevices: Integer;}\par +The property tells the number of device objects where the device has been unplugged, but +the device object has not been freed or checked back in yet.\line +{\uldb NumCheckedOutDevices\v IDH_TJvHidDeviceController_NumCheckedInDevices} does not count such device objects +despite the fact that they are formally in the state of being checked out. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_CheckIn} +${\footnote $ TJvHidDeviceController.CheckIn} +K{\footnote K TJvHidDeviceController,CheckIn;CheckIn,TJvHidDeviceController;CheckIn} +A{\footnote A TJvHidDeviceController_CheckIn;CheckIn_Method;CheckIn} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDeviceController.CheckIn\b0}}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b procedure} CheckIn({\b var} HidDev: {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice});}\par +Gives a checked out {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice} object back to the TJvHidDeviceController.\line +Hand the object back if you are finished using it. +CheckIn also sets HidDev to {\b nil} to prevent further use.\line +As an alternative call TJvHidDevice.Free. The TJvHidDeviceController gets informed and will create a new +checked in TJvHidDevice object for the device if neccessary.\line +Destroying a TJvHidDeviceController with checked out TJvHidDevice objects results in pulling the virtual plug +of all the TJvHidDevice objects. You will also receive an {\uldb OnUnplug\v IDH_TJvHidDevice_OnUnplug>Main} event +for each device unplugged if the event is connected. The TJvHidDevice objects remain but cease to work. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_CheckOut} +${\footnote $ TJvHidDeviceController.CheckOut} +K{\footnote K TJvHidDeviceController,CheckOut;CheckOut,TJvHidDeviceController;CheckOut} +A{\footnote A TJvHidDeviceController_CheckOut;CheckOut_Method;CheckOut} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDeviceController.CheckOut\b0}}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} CheckOut({\b var} HidDev: {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice}): Boolean;}\par +Hands out the first TJvHidDevice object which is not checked out already.\line +The return value is True if there was a TJvHidDevice object to hand out. +Otherwise the return value is False and HidDev is set to {\b nil}. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_CheckOutByClass} +${\footnote $ TJvHidDeviceController.CheckOutByClass} +K{\footnote K TJvHidDeviceController,CheckOutByClass;CheckOutByClass,TJvHidDeviceController;CheckOutByClass;cHidMouseClass;cHidKeyboardClass} +A{\footnote A TJvHidDeviceController_CheckOutByClass;CheckOutByClass_Method;CheckOutByClass} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDeviceController.CheckOutByClass\b0}}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} CheckOutByClass({\b var} HidDev: {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice}; ClassName: {\b string}): Boolean;}\par +Hands out the first TJvHidDevice object which is not checked out already and where the device class matches the string of ClassName. +The string is a user friendly class description and is defined in the registry under +HKEY_LOCAL_MACHINE\\Enum\\HID\\...\\Class.\line +The return value is True if there was a TJvHidDevice object to hand out. +Otherwise the return value is False and HidDev is set to {\b nil}.\par +The are two predefined string constants for ClassName:\line +{\f0 cHidMouseClass = 'Mouse';}\line +{\f0 cHidKeyboardClass = 'Keyboard';}\line +For the other possible HID classes the information for the strings is missing. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_CheckOutByID} +${\footnote $ TJvHidDeviceController.CheckOutByID} +K{\footnote K TJvHidDeviceController,CheckOutByID;CheckOutByID,TJvHidDeviceController;CheckOutByID} +A{\footnote A TJvHidDeviceController_CheckOutByID;CheckOutByID_Method;CheckOutByID} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDeviceController.CheckOutByID\b0}}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} CheckOutByID({\b var} HidDev: {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice}; Vid, Pid: Integer): Boolean;}\par +Hands out the first TJvHidDevice object which is not checked out already and where the device VendorID and ProductID match Vid and Pid. +The value -1 for Pid matches all ProductIDs.\line +The return value is True if there was a TJvHidDevice object to hand out. +Otherwise the return value is False and HidDev is set to {\b nil}.\par +\par\page + +#{\footnote # IDH_TJvHidDeviceController_CheckOutByIndex} +${\footnote $ TJvHidDeviceController.CheckOutByIndex} +K{\footnote K TJvHidDeviceController,CheckOutByIndex;CheckOutByIndex,TJvHidDeviceController;CheckOutByIndex} +A{\footnote A TJvHidDeviceController_CheckOutByIndex;CheckOutByIndex_Method;CheckOutByIndex} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDeviceController.CheckOutByIndex\b0}}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} CheckOutByIndex({\b var} HidDev: {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice}; {\b const} Index: Integer): Boolean;}\par +Hands out the TJvHidDevice object with the index Index if it is not checked out already. +The index is zero based. The {\uldb OnEnumerate\v IDH_TJvHidDeviceController_OnEnumerate>Main} event provides the index of the enumerated device.\line +The return value is True if the index is within bounds and the TJvHidDevice object was not checked out already. +Otherwise the return value is False and HidDev is set to {\b nil}.\par +\par\page + +#{\footnote # IDH_TJvHidDeviceController_CheckOutByProductName} +${\footnote $ TJvHidDeviceController.CheckOutByProductName} +K{\footnote K TJvHidDeviceController,CheckOutByProductName;CheckOutByProductName,TJvHidDeviceController;CheckOutByProductName} +A{\footnote A TJvHidDeviceController_CheckOutByProductName;CheckOutByProductName_Method;CheckOutByProductName} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDeviceController.CheckOutByProductName\b0}}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} CheckOutByProductName({\b var} HidDev: {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice}; ProductName: {\b string}): Boolean;}\par +Hands out the first TJvHidDevice object which is not checked out already and where the product name of the device matches ProductName. +The product name comes directly from the firmware of the device. It may be an empty string.\line +The return value is True if there was a TJvHidDevice object to hand out. +Otherwise the return value is False and HidDev is set to {\b nil}.\par +\par\page + +#{\footnote # IDH_TJvHidDeviceController_CheckOutByVendorName} +${\footnote $ TJvHidDeviceController.CheckOutByVendorName} +K{\footnote K TJvHidDeviceController,CheckOutByVendorName;CheckOutByVendorName,TJvHidDeviceController;CheckOutByVendorName} +A{\footnote A TJvHidDeviceController_CheckOutByVendorName;CheckOutByVendorName_Method;CheckOutByVendorName} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDeviceController.CheckOutByVendorName\b0}}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} CheckOutByVendorName({\b var} HidDev: {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice}; VendorName: {\b string}): Boolean;}\par +Hands out the first TJvHidDevice object which is not checked out already and where the vendor name of the device matches VendorName. +The vendor name comes directly from the firmware of the device. It may be an empty string.\line +The return value is True if there was a TJvHidDevice object to hand out. +Otherwise the return value is False and HidDev is set to {\b nil}.\par +\par\page + +#{\footnote # IDH_TJvHidDeviceController_Create} +${\footnote $ TJvHidDeviceController.Create} +K{\footnote K TJvHidDeviceController,Create;Create,TJvHidDeviceController;Create} +A{\footnote A TJvHidDeviceController_Create;Create_Method;Create} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDeviceController.Create\b0}}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b constructor} Create(AOwner: TComponent); {\b override};}\par +You may override the constructor if you like, but do not forget to call "{\b inherited} Create(AOwner);" +as first statement of the overridden constructor or the whole component will never start to work. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_Destroy} +${\footnote $ TJvHidDeviceController.Destroy} +K{\footnote K TJvHidDeviceController,Destroy;Destroy,TJvHidDeviceController;Destroy} +A{\footnote A TJvHidDeviceController_Destroy;Destroy_Method;Destroy} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDeviceController.Destroy\b0}}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b destructor} Destroy; {\b override};}\par +You may override the destructor if you like, but do not forget to call "{\b inherited} Destroy;" +as last statement of the overridden destructor or the component cannot clean up correctly. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_Enumerate} +${\footnote $ TJvHidDeviceController.Enumerate} +K{\footnote K TJvHidDeviceController,Enumerate;Enumerate,TJvHidDeviceController;Enumerate} +A{\footnote A TJvHidDeviceController_Enumerate;Enumerate_Method;Enumerate} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{{\fs24\cf2\b TJvHidDeviceController.Enumerate\b0}}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 {\b function} Enumerate: Integer;}\par +The Enumerate method fires an {\uldb OnEnumerate\v IDH_TJvHidDeviceController_OnEnumerate>Main} +event for each device in the list of the TJvHidDeviceController. This is the only way to get an OnEnumerate event. +All devices in the list are enumerated. Checked in or not, plugged in or not. +If the OnEnumerate event returns False the enumeration process stops prematurely. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_OnDeviceChange} +${\footnote $ TJvHidDeviceController.OnDeviceChange} +K{\footnote K TJvHidDeviceController,OnDeviceChange;OnDeviceChange,TJvHidDeviceController;OnDeviceChange} +A{\footnote A TJvHidDeviceController_OnDeviceChange;OnDeviceChange_Event;OnDeviceChange} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDeviceController.OnDeviceChange\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 TNotifyEvent = {\b procedure}(Sender: TObject) {\b of object};}\par +The TJvHidDeviceController fires this event each time a HID device is plugged or unplugged. +The event is also fired at runtime when the OnDeviceChange is assigned the first time, +which happens automatically at program start if the event has been set at design time. +Fireing the event on assignment simulates the plug of all devices already plugged.\line +This is the place to check out a freshly arrived device. Sender is of course the TJvHidDeviceController component itself. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_OnDeviceUnplug} +${\footnote $ TJvHidDeviceController.OnDeviceUnplug} +K{\footnote K TJvHidDeviceController,OnDeviceUnplug;OnDeviceUnplug,TJvHidDeviceController;OnDeviceUnplug} +A{\footnote A TJvHidDeviceController_OnDeviceUnplug;OnDeviceUnplug_Event;OnDeviceUnplug} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDeviceController.OnDeviceUnplug\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 TJvHidUnplugEvent = {\b procedure}(HidDev: {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice}) {\b of} {\b object};}\par +This event is not for the TJvHidDeviceController but is set to the {\uldb OnUnplug\v IDH_TJvHidDevice_OnUnplug>Main} +event of each TJvHidDevice on creation. This allows to set the OnUnplug event for all TJvHidDevice objects at design time. +Changing the OnOnplug event for an individual device is only possible at runtime. Only then the TJvHidDevice object exists.\line +Setting OnDeviceUnplug at runtime to a new value changes all TJvHidDevice.OnUnplug events which have the same old value. +That is if you set a TJvHidDevice.OnUnplug to an individual event then it will not be changed by OnDeviceUnplug assignment. +\par\page + +#{\footnote # IDH_TJvHidDeviceController_OnEnumerate} +${\footnote $ TJvHidDeviceController.OnEnumerate} +K{\footnote K TJvHidDeviceController,OnEnumerate;OnEnumerate,TJvHidDeviceController;OnEnumerate} +A{\footnote A TJvHidDeviceController_OnEnumerate;OnEnumerate_Event;OnEnumerate} +>{\footnote > main} ++{\footnote + Auto} +\sa50\sb50{\keepn{\fs24\cf2\b TJvHidDeviceController.OnEnumerate\b0}\line +{\fs20 {\uldb TJvHidDeviceController\v IDH_Class_TJvHidDeviceController} }\par\pard} +\b Declaration\b0\par +{\f0 TJvHidEnumerateEvent = {\b function}(HidDev: {\uldb TJvHidDevice\v IDH_Class_TJvHidDevice}; Index: Integer): Boolean {\b of object};}\par +The OnEnumerate event is fired by the {\uldb Enumerate\v IDH_TJvHidDeviceController_Enumerate>Main} method for each device in the list of the TJvHidDeviceController. +Returning False for this event stops the enumeration process prematurely.\line +All devices in the list are enumerated. Checked in or not, plugged in or not. +It is explicitely allowed to check out or check in a device inside the event. +This allows to implement complicated matches which are not covered by the CheckOut-methods. +The Index is provided to check out a device with {\uldb CheckOutByIndex\v IDH_TJvHidDeviceController_CheckOutByIndex>Main}. +\par\page + +#{\footnote # IDH_Anym_3FAMT_1} +\sa50\sb50 +{\f1\fs20\b Hierarchy\b0\par +TObject\line + |\line +{\cf2 TJvHidDevice}\line +\line +\b Subclasses\b0\line + None}\par\page + +#{\footnote # IDH_Anym_3FAMT_2} +\sa50\sb50{\f1\fs20\b Hierarchy\b0\par +TComponent\line + |\line +{\cf2 TJvHidDeviceController}\line +\line +\b Subclasses\b0\line + None}\par\page + +#{\footnote # IDH_Legend} +\sa50\sb50 +{\f1\fs20\b Scope\b0\line +\{bmct Published.bmp\}\tab Published\par +\b Accessibility\b0\line +\{bmct readonly.bmp\}\tab Read-only +}\par\page +} diff --git a/lib/VNTI files/AND_Gate_152_GFPUV.gb b/lib/VNTI files/AND_Gate_152_GFPUV.gb new file mode 100644 index 00000000..950f4d81 --- /dev/null +++ b/lib/VNTI files/AND_Gate_152_GFPUV.gb @@ -0,0 +1,139 @@ +LOCUS AND\Gate\152\GFP 3135 bp DNA circular 11-JAN-2008 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.informaxinc.com/ + +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|471021163| +COMMENT VNTDBDATE|471021163| +COMMENT LSOWNER| +COMMENT VNTNAME|AND Gate 152 GFPUV| +COMMENT VNTAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +FEATURES Location/Qualifiers + rep_origin 1734..2372 + /vntifkey="33" + /label=ColE1 + terminator 1506..1610 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2431..2536) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2562..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2648..2669 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev\(Sequencing\Primer) + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 656..730 + /vntifkey="21" + /label=TPP\Aptamer + misc_feature 609..635 + /vntifkey="21" + /label=Theo28\Aptamer + primer complement(618..635) + /vntifkey="27" + /label=Theo28r + misc_feature 636..655 + /vntifkey="21" + /label=N20\Linker + CDS 759..1499 + /vntifkey="4" + /label=gfpuv +BASE COUNT 851 a 763 c 728 g 793 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattctga taccagccga aaggcccttg gcagcagcag ttcatcccaa caatagactc + 661 ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc acctgatctg gataatgcca + 721 gcgtagggaa gctattacaa gaagatcagg agcaaactat gcaagtcgac ctgctggatc + 781 cattgagtaa aggagaagaa cttttcactg gagttgtccc aattcttgtt gaattagatg + 841 gtgatgttaa tgggcacaaa ttttctgtca gtggagaggg tgaaggtgat gcaacatacg + 901 gaaaacttac ccttaaattt atttgcacta ctggaaaact acctgttcca tggccaacac + 961 ttgtcactac tttctcttat ggtgttcaat gcttttcccg ttatccggat catatgaaac + 1021 ggcatgactt tttcaagagt gccatgcccg aaggttatgt acaggaacgc actatatctt + 1081 tcaaagatga cgggaactac aagacgcgtg ctgaagtcaa gtttgaaggt gatacccttg + 1141 ttaatcgtat cgagttaaaa ggtattgatt ttaaagaaga tggaaacatt ctcggacaca + 1201 aactcgagta caactataac tcacacaatg tatacatcac ggcagacaaa caaaagaatg + 1261 gaatcaaagc taacttcaaa attcgccaca acattgaaga tggatccgtt caactagcag + 1321 accattatca acaaaatact ccaattggcg atggccctgt ccttttacca gacaaccatt + 1381 acctgtcgac acaatctgcc ctttcgaaag atcccaacga aaagcgtgac cacatggtcc + 1441 ttcttgagtt tgtaactgct gctgggatta cacatggcat ggatgagctc tacaaataat + 1501 ctagaggcat caaataaaac gaaaggctca gtcgaaagac tgggcctttc gttttatctg + 1561 ttgtttgtcg gtgaacgctc tcctgagtag gacaaatccg ccgccctaga cctaggcgtt + 1621 cggctgcggc gagcggtatc agctcactca aaggcggtaa tacggttatc cacagaatca + 1681 ggggataacg caggaaagaa catgtgagca aaaggccagc aaaaggccag gaaccgtaaa + 1741 aaggccgcgt tgctggcgtt tttccatagg ctccgccccc ctgacgagca tcacaaaaat + 1801 cgacgctcaa gtcagaggtg gcgaaacccg acaggactat aaagatacca ggcgtttccc + 1861 cctggaagct ccctcgtgcg ctctcctgtt ccgaccctgc cgcttaccgg atacctgtcc + 1921 gcctttctcc cttcgggaag cgtggcgctt tctcaatgct cacgctgtag gtatctcagt + 1981 tcggtgtagg tcgttcgctc caagctgggc tgtgtgcacg aaccccccgt tcagcccgac + 2041 cgctgcgcct tatccggtaa ctatcgtctt gagtccaacc cggtaagaca cgacttatcg + 2101 ccactggcag cagccactgg taacaggatt agcagagcga ggtatgtagg cggtgctaca + 2161 gagttcttga agtggtggcc taactacggc tacactagaa ggacagtatt tggtatctgc + 2221 gctctgctga agccagttac cttcggaaaa agagttggta gctcttgatc cggcaaacaa + 2281 accaccgctg gtagcggtgg tttttttgtt tgcaagcagc agattacgcg cagaaaaaaa + 2341 ggatctcaag aagatccttt gatcttttct acggggtctg acgctcagtg gaacgaaaac + 2401 tcacgttaag ggattttggt catgactagt gcttggattc tcaccaataa aaaacgcccg + 2461 gcggcaaccg agcgttctga acaaatccag atggagttct gaggtcatta ctggatctat + 2521 caacaggagt ccaagcgagc tcaaacttgg tctgacagtt accaatgctt aatcagtgag + 2581 gcacctatct cagcgatctg tctatttcgt tcatccatag ttgcctgact ccccgtcgtg + 2641 tagataacta cgatacggga gggcttacca tctggcccca gtgctgcaat gataccgcga + 2701 gacccacgct caccggctcc agatttatca gcaataaacc agccagccgg aagggccgag + 2761 cgcagaagtg gtcctgcaac tttatccgcc tccatccagt ctattaattg ttgccgggaa + 2821 gctagagtaa gtagttcgcc agttaatagt ttgcgcaacg ttgttgccat tgctacaggc + 2881 atcgtggtgt cacgctcgtc gtttggtatg gcttcattca gctccggttc ccaacgatca + 2941 aggcgagtta catgatcccc catgttgtgc aaaaaagcgg ttagctcctt cggtcctccg + 3001 atcgttgtca gaagtaagtt ggccgcagtg ttatcactca tggttatggc agcactgcat + 3061 aattctctta ctgtcatgcc atccgtaaga tgcttttctg tgactggtga gtactcaacc + 3121 aagtcattct gagaa +// diff --git a/lib/VNTI files/ApE_pLacthiM2lacZ.gb b/lib/VNTI files/ApE_pLacthiM2lacZ.gb new file mode 100644 index 00000000..baed8da2 --- /dev/null +++ b/lib/VNTI files/ApE_pLacthiM2lacZ.gb @@ -0,0 +1,246 @@ +LOCUS ApE_pLacthiM2lacZ 5468 bp ds-DNA linear 22-JUN-2009 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT ApEinfo:methylated:1 +FEATURES Location/Qualifiers + rep_origin 4067..4705 + /vntifkey="33" + /label=ColE1 + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + terminator 3839..3943 + /vntifkey="43" + /note="transcription termination sequence" + /label=T1 + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + terminator complement(4764..4869) + /vntifkey="43" + /note="transcription termination sequence" + /label=T0 + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + CDS complement(join(244..284,1..221)) + /vntifkey="4" + /label=AmpR + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + CDS complement(222..243) + /vntifkey="4" + /label=AmpR(1) + /ApEinfo_label=AmpR + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + misc_feature 4981..5002 + /vntifkey="21" + /label=bla-rev? + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + primer_bind 326..345 + /vntifkey="28" + /note="sequencing primer" + /label=pbla-rev + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + promoter 498..601 + /vntifkey="30" + /label=P(lac) + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + primer 517..537 + /vntifkey="27" + /label=PlacF + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + -35_signal 545..550 + /vntifkey="48" + /label=-35 + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + protein_bind 581..601 + /vntifkey="31" + /label=lacO + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + mutation 496..497 + /vntifkey="62" + /note="two base insertion found in sequencing" + /label=AG\insertion + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + misc_feature 581..581 + /vntifkey="21" + /label=1 + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + misc_feature 616..735 + /vntifkey="21" + /label=core\riboswitch + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + -10_signal 569..574 + /vntifkey="47" + /label=-10 + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + /ApEinfo_fwdcolor=pink + /ApEinfo_revcolor=pink + rep_origin complement(4076..4758) + /label=ColE1 origin + /ApEinfo_fwdcolor=gray50 + /ApEinfo_revcolor=gray50 + CDS 839..907 + /label=LacZ alpha + /ApEinfo_fwdcolor=cornflower blue + /ApEinfo_revcolor=cornflower blue + CDS complement(join(4895..5468,1..86)) + /label=AmpR(2) + /ApEinfo_label=AmpR + /ApEinfo_fwdcolor=#f8c887 + /ApEinfo_revcolor=#f8c887 + misc_feature 736..741 + /label=BamHI + /ApEinfo_fwdcolor=#00ff00 + /ApEinfo_revcolor=#00ff00 + misc_feature 3833..3838 + /label=XbaI + /ApEinfo_fwdcolor=#00ffff + /ApEinfo_revcolor=#00ffff + misc_feature 4758..4763 + /label=SpeI + /ApEinfo_fwdcolor=#00ffff + /ApEinfo_revcolor=#00ffff + misc_feature 602..607 + /label=EcoRI + /ApEinfo_fwdcolor=#0080ff + /ApEinfo_revcolor=#0080ff + misc_feature 490..495 + /label=XhoI + /ApEinfo_fwdcolor=#00ff00 + /ApEinfo_revcolor=#00ff00 + promoter 1382..1700 + /label=test f + /ApEinfo_fwdcolor=cyan + /ApEinfo_revcolor=green + misc_feature complement(1258..1267) + /label=New Feature + /ApEinfo_fwdcolor=cyan + /ApEinfo_revcolor=#0000ff + misc_feature complement(1289..1298) + /label=New Feature(1) + /ApEinfo_label=New Feature + /ApEinfo_fwdcolor=cyan + /ApEinfo_revcolor=#0000ff +ORIGIN + 1 TAGTGTATGC GGCGACCGAG TTGCTCTTGC CCGGCGTCAA TACGGGATAA TACCGCGCCA + 61 CATAGCAGAA CTTTAAAAGT GCTCATCATT GGAAAACGTT CTTCGGGGCG AAAACTCTCA + 121 AGGATCTTAC CGCTGTTGAG ATCCAGTTCG ATGTAACCCA CTCGTGCACC CAACTGATCT + 181 TCAGCATCTT TTACTTTCAC CAGCGTTTCT GGGTGAGCAA AAACAGGAAG GCAAAATGCC + 241 GCAAAAAAGG GAATAAGGGC GACACGGAAA TGTTGAATAC TCATACTCTT CCTTTTTCAA + 301 TATTATTGAA GCATTTATCA GGGTTATTGT CTCATGAGCG GATACATATT TGAATGTATT + 361 TAGAAAAATA AACAAATAGG GGTTCCGCGC ACATTTCCCC GAAAAGTGCC ACCTGACGTC + 421 TAAGAAACCA TTATTATCAT GACATTAACC TATAAAAATA GGCGTATCAC GAGGCCCTTT + 481 CGTCTTCACC TCGAGAGCGC AACGCAATTA ATGTGAGTTA GCTCACTCAT TAGGCACCCC + 541 AGGCTTTACA CTTTATGCTT CCGGCTCGTA TGTTGTGTGG AATTGTGAGC GGATAACAAT + 601 TGAATTCAAC CAAACGACTC GGGGTGCCCT TCTGCGTGAA GGCTGAGAAA TACCCGTATC + 661 ACCTGATCTG GATAATGCCA GCGTAGGGAA GCTATTACAA GAAGATCAGG AGCAAACTAT + 721 GCAAGTCGAC CTGCTGGATC CACTGCATAT AGATCCCGTC GTTTTACAAC GTCGTGACTG + 781 GGAAAACCCT GGCGTTACCC AACTTAATCG CCTTGCAGCA CATCCCCCTT TCGCCAGCTG + 841 GCGTAATAGC GAAGAGGCCC GCACCGATCG CCCTTCCCAA CAGTTGCGCA GCCTGAATGG + 901 CGAATGGCGC TTTGCCTGGT TTCCGGCACC AGCCGGAAAG CTGGCTGGAA GCGGTGAGTG + 961 CGATCTTCCT GAGGCCGATA CTGTCGTCGT CCCCTCAAAC TGGCAGATGC ACGGTTACGA + 1021 TGCGCCCATC TACACCAACG TGACCTATCC CATTACGGTC AATCCGCCGT TTGTTCCCAC + 1081 GGAGAATCCG ACGGGTTGTT ACTCGCTCAC ATTTAATGTT GATGAAAGCT GGCTACAGGA + 1141 AGGCCAGACG CGAATTATTT TTGATGGCGT TAACTCGGCG TTTCATCTGT GGTGCAACGG + 1201 GCGCTGGGTC GGTTACGGCC AGGACAGTCG TTTGCCGTCT GAATTTGACC TGAGCGCATT + 1261 TTTACGCGCC GGAGAAAACC GCGAGCGCAT TTTTACGCGC CGGAGAAAAC TCGCGGTGAT + 1321 GGTGCTGCGT TGGAGTGACG GCAGTTATCT GGAAGATCAG GATATGTGGC GGATGAGCGG + 1381 CATTTTCCGT GACGTCTCGT TGCTGCATAA ACCGACTACA CAAATCAGCG ATTTCCATGT + 1441 TGCCACTCGC TTTAATGATG ATTTCAGCCG CGCTGTACTG GAGGCTGAAG TTCAGATGTG + 1501 CGGCGAGTTG CGTGACTACC TACGGGTAAC AGTTTCTTTA TGGCAGGGTG AAACGCAGGT + 1561 CGCCAGCGGC ACCGCGCCTT TCGGCGGTGA AATTATCGAT GAGCGTGGTG GTTATGCCGA + 1621 TCGCGTCACA CTACGTCTGA ACGTCGAAAA CCCGAAACTG TGGAGCGCCG AAATCCCGAA + 1681 TCTCTATCGT GCGGTGGTTG AACTGCACAC CGCCGACGGC ACGCTGATTG AAGCAGAAGC + 1741 CTGCGATGTC GGTTTCCGCG AGGTGCGGAT TGAAAATGGT CTGCTGCTGC TGAACGGCAA + 1801 GCCGTTGCTG ATTCGAGGCG TTAACCGTCA CGAGCATCAT CCTCTGCATG GTCAGGTCAT + 1861 GGATGAGCAG ACGATGGTGC AGGATATCCT GCTGATGAAG CAGAACAACT TTAACGCCGT + 1921 GCGCTGTTCG CATTATCCGA ACCATCCGCT GTGGTACACG CTGTGCGACC GCTACGGCCT + 1981 GTATGTGGTG GATGAAGCCA ATATTGAAAC CCACGGCATG GTGCCAATGA ATCGTCTGAC + 2041 CGATGATCCG CGCTGGCTAC CGGCGATGAG CGAACGCGTA ACGCGAATGG TGCAGCGCGA + 2101 TCGTAATCAC CCGAGTGTGA TCATCTGGTC GCTGGGGAAT GAATCAGGCC ACGGCGCTAA + 2161 TCACGACGCG CTGTATCGCT GGATCAAATC TGTCGATCCT TCCCGCCCGG TGCAGTATGA + 2221 AGGCGGCGGA GCCGACACCA CGGCCACCGA TATTATTTGC CCGATGTACG CGCGCGTGGA + 2281 TGAAGACCAG CCCTTCCCGG CTGTGCCGAA ATGGTCCATC AAAAAATGGC TTTCGCTACC + 2341 TGGAGAGACG CGCCCGCTGA TCCTTTGCGA ATACGCCCAC GCGATGGGTA ACAGTCTTGG + 2401 CGGTTTCGCT AAATACTGGC AGGCGTTTCG TCAGTATCCC CGTTTACAGG GCGGCTTCGT + 2461 CTGGGACTGG GTGGATCAGT CGCTGATTAA ATATGATGAA AACGGCAACC CGTGGTCGGC + 2521 TTACGGCGGT GATTTTGGCG ATACGCCGAA CGATCGCCAG TTCTGTATGA ACGGTCTGGT + 2581 CTTTGCCGAC CGCACGCCGC ATCCAGCGCT GACGGAAGCA AAACACCAGC AGCAGTTTTT + 2641 CCAGTTCCGT TTATCCGGGC AAACCATCGA AGTGACCAGC GAATACCTGT TCCGTCATAG + 2701 CGATAACGAG CTCCTGCACT GGATGGTGGC GCTGGATGGT AAGCCGCTGG CAAGCGGTGA + 2761 AGTGCCTCTG GATGTCGCTC CACAAGGTAA ACAGTTGATT GAACTGCCTG AACTACCGCA + 2821 GCCGGAGAGC GCCGGGCAAC TCTGGCTCAC AGTACGCGTA GTGCAACCGA ACGCGACCGC + 2881 ATGGTCAGAA GCCGGGCACA TCAGCGCCTG GCAGCAGTGG CGTCTGGCGG AAAACCTCAG + 2941 TGTGACGCTC CCCGCCGCGT CCCACGCCAT CCCGCATCTG ACCACCAGCG AAATGGATTT + 3001 TTGCATCGAG CTGGGTAATA AGCGTTGGCA ATTTAACCGC CAGTCAGGCT TTCTTTCACA + 3061 GATGTGGATT GGCGATAAAA AACAACTGCT GACGCCGCTG CGCGATCAGT TCACCCGTGC + 3121 ACCGCTGGAT AACGACATTG GCGTAAGTGA AGCGACCCGC ATTGACCCTA ACGCCTGGGT + 3181 CGAACGCTGG AAGGCGGCGG GCCATTACCA GGCCGAAGCA GCGTTGTTGC AGTGCACGGC + 3241 AGATACACTT GCTGATGCGG TGCTGATTAC GACCGCTCAC GCGTGGCAGC ATCAGGGGAA + 3301 AACCTTATTT ATCAGCCGGA AAACCTACCG GATTGATGGT AGTGGTCAAA TGGCGATTAC + 3361 CGTTGATGTT GAAGTGGCGA GCGATACACC GCATCCGGCG CGGATTGGCC TGAACTGCCA + 3421 GCTGGCGCAG GTAGCAGAGC GGGTAAACTG GCTCGGATTA GGGCCGCAAG AAAACTATCC + 3481 CGACCGCCTT ACTGCCGCCT GTTTTGACCG CTGGGATCTG CCATTGTCAG ACATGTATAC + 3541 CCCGTACGTC TTCCCGAGCG AAAACGGTCT GCGCTGCGGG ACGCGCGAAT TGAATTATGG + 3601 CCCACACCAG TGGCGCGGCG ACTTCCAGTT CAACATCAGC CGCTACAGTC AACAGCAACT + 3661 GATGGAAACC AGCCATCGCC ATCTGCTGCA CGCGGAAGAA GGCACATGGC TGAATATCGA + 3721 CGGTTTCCAT ATGGGGATTG GTGGCGACGA CTCCTGGAGC CCGTCAGTAT CGGCGGAATT + 3781 TCAGCTGAGC GCCGGTCGCT ACCATTACCA GTTGGTCTGG TGTCAAAAAT AATCTAGAGG + 3841 CATCAAATAA AACGAAAGGC TCAGTCGAAA GACTGGGCCT TTCGTTTTAT CTGTTGTTTG + 3901 TCGGTGAACG CTCTCCTGAG TAGGACAAAT CCGCCGCCCT AGACCTAGGC GTTCGGCTGC + 3961 GGCGAGCGGT ATCAGCTCAC TCAAAGGCGG TAATACGGTT ATCCACAGAA TCAGGGGATA + 4021 ACGCAGGAAA GAACATGTGA GCAAAAGGCC AGCAAAAGGC CAGGAACCGT AAAAAGGCCG + 4081 CGTTGCTGGC GTTTTTCCAT AGGCTCCGCC CCCCTGACGA GCATCACAAA AATCGACGCT + 4141 CAAGTCAGAG GTGGCGAAAC CCGACAGGAC TATAAAGATA CCAGGCGTTT CCCCCTGGAA + 4201 GCTCCCTCGT GCGCTCTCCT GTTCCGACCC TGCCGCTTAC CGGATACCTG TCCGCCTTTC + 4261 TCCCTTCGGG AAGCGTGGCG CTTTCTCAAT GCTCACGCTG TAGGTATCTC AGTTCGGTGT + 4321 AGGTCGTTCG CTCCAAGCTG GGCTGTGTGC ACGAACCCCC CGTTCAGCCC GACCGCTGCG + 4381 CCTTATCCGG TAACTATCGT CTTGAGTCCA ACCCGGTAAG ACACGACTTA TCGCCACTGG + 4441 CAGCAGCCAC TGGTAACAGG ATTAGCAGAG CGAGGTATGT AGGCGGTGCT ACAGAGTTCT + 4501 TGAAGTGGTG GCCTAACTAC GGCTACACTA GAAGGACAGT ATTTGGTATC TGCGCTCTGC + 4561 TGAAGCCAGT TACCTTCGGA AAAAGAGTTG GTAGCTCTTG ATCCGGCAAA CAAACCACCG + 4621 CTGGTAGCGG TGGTTTTTTT GTTTGCAAGC AGCAGATTAC GCGCAGAAAA AAAGGATCTC + 4681 AAGAAGATCC TTTGATCTTT TCTACGGGGT CTGACGCTCA GTGGAACGAA AACTCACGTT + 4741 AAGGGATTTT GGTCATGACT AGTGCTTGGA TTCTCACCAA TAAAAAACGC CCGGCGGCAA + 4801 CCGAGCGTTC TGAACAAATC CAGATGGAGT TCTGAGGTCA TTACTGGATC TATCAACAGG + 4861 AGTCCAAGCG AGCTCAAACT TGGTCTGACA GTTACCAATG CTTAATCAGT GAGGCACCTA + 4921 TCTCAGCGAT CTGTCTATTT CGTTCATCCA TAGTTGCCTG ACTCCCCGTC GTGTAGATAA + 4981 CTACGATACG GGAGGGCTTA CCATCTGGCC CCAGTGCTGC AATGATACCG CGAGACCCAC + 5041 GCTCACCGGC TCCAGATTTA TCAGCAATAA ACCAGCCAGC CGGAAGGGCC GAGCGCAGAA + 5101 GTGGTCCTGC AACTTTATCC GCCTCCATCC AGTCTATTAA TTGTTGCCGG GAAGCTAGAG + 5161 TAAGTAGTTC GCCAGTTAAT AGTTTGCGCA ACGTTGTTGC CATTGCTACA GGCATCGTGG + 5221 TGTCACGCTC GTCGTTTGGT ATGGCTTCAT TCAGCTCCGG TTCCCAACGA TCAAGGCGAG + 5281 TTACATGATC CCCCATGTTG TGCAAAAAAG CGGTTAGCTC CTTCGGTCCT CCGATCGTTG + 5341 TCAGAAGTAA GTTGGCCGCA GTGTTATCAC TCATGGTTAT GGCAGCACTG CATAATTCTC + 5401 TTACTGTCAT GCCATCCGTA AGATGCTTTT CTGTGACTGG TGAGTACTCA ACCAAGTCAT + 5461 TCTGAGAA +// diff --git a/lib/VNTI files/CLC_pBADHisA.gb b/lib/VNTI files/CLC_pBADHisA.gb new file mode 100644 index 00000000..a0bf43d5 --- /dev/null +++ b/lib/VNTI files/CLC_pBADHisA.gb @@ -0,0 +1,127 @@ +LOCUS pBADHisA 4102 bp DNA circular UNA 26-MAR-2006 +DEFINITION invitrogen. +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +FEATURES Location/Qualifiers + promoter 4..276 + /vntifkey="30" + /label=P(BAD) + /note="araBAD promoter" + primer 159..180 + /vntifkey="27" + /label=BADFWD + primer 197..217 + /vntifkey="27" + /label=pBADFWD + -35_signal 248..252 + /vntifkey="48" + /label=-35 + -10_signal 272..276 + /vntifkey="47" + /label=-10 + misc_feature 319..321 + /vntifkey="21" + /label="start codon" + misc_feature 331..348 + /vntifkey="21" + /label="His x 6" + misc_feature 388..411 + /vntifkey="21" + /label="Xpress epitope" + misc_feature 397..411 + /vntifkey="21" + /label="EK recognition site" + /note="enterokinase" + misc_feature 430..470 + /vntifkey="21" + /label=MCS + primer_bind 546..564 + /vntifkey="28" + /label=AatII-rrnB-f + terminator 553..710 + /vntifkey="43" + /label="rrnB term" + primer_bind complement(695..713) + /vntifkey="28" + /label=AatII-rrnB-r + CDS 989..1849 + /vntifkey="4" + /label=bla + /note="amp(R)" + rep_origin 1994..2667 + /vntifkey="33" + /label=pBR322 + CDS complement(3198..4076) + /vntifkey="4" + /label=araC +ORIGIN + 1 AAGAAACCAA TTGTCCATAT TGCATCAGAC ATTGCCGTCA CTGCGTCTTT TACTGGCTCT + 61 TCTCGCTAAC CAAACCGGTA ACCCCGCTTA TTAAAAGCAT TCTGTAACAA AGCGGGACCA + 121 AAGCCATGAC AAAAACGCGT AACAAAAGTG TCTATAATCA CGGCAGAAAA GTCCACATTG + 181 ATTATTTGCA CGGCGTCACA CTTTGCTATG CCATAGCATT TTTATCCATA AGATTAGCGG + 241 ATCCTACCTG ACGCTTTTTA TCGCAACTCT CTACTGTTTC TCCATACCCG TTTTTTGGGC + 301 TAACAGGAGG AATTAACCAT GGGGGGTTCT CATCATCATC ATCATCATGG TATGGCTAGC + 361 ATGACTGGTG GACAGCAAAT GGGTCGGGAT CTGTACGACG ATGACGATAA GGATCGATGG + 421 GGATCCGAGC TCGAGATCTG CAGCTGGTAC CATATGGGAA TTCGAAGCTT GGCTGTTTTG + 481 GCGGATGAGA GAAGATTTTC AGCCTGATAC AGATTAAATC AGAACGCAGA AGCGGTCTGA + 541 TAAAACAGAA TTTGCCTGGC GGCAGTAGCG CGGTGGTCCC ACCTGACCCC ATGCCGAACT + 601 CAGAAGTGAA ACGCCGTAGC GCCGATGGTA GTGTGGGGTC TCCCCATGCG AGAGTAGGGA + 661 ACTGCCAGGC ATCAAATAAA ACGAAAGGCT CAGTCGAAAG ACTGGGCCTT TCGTTTTATC + 721 TGTTGTTTGT CGGTGAACGC TCTCCTGAGT AGGACAAATC CGCCGGGAGC GGATTTGAAC + 781 GTTGCGAAGC AACGGCCCGG AGGGTGGCGG GCAGGACGCC CGCCATAAAC TGCCAGGCAT + 841 CAAATTAAGC AGAAGGCCAT CCTGACGGAT GGCCTTTTTG CGTTTCTACA AACTCTTTTG + 901 TTTATTTTTC TAAATACATT CAAATATGTA TCCGCTCATG AGACAATAAC CCTGATAAAT + 961 GCTTCAATAA TATTGAAAAA GGAAGAGTAT GAGTATTCAA CATTTCCGTG TCGCCCTTAT + 1021 TCCCTTTTTT GCGGCATTTT GCCTTCCTGT TTTTGCTCAC CCAGAAACGC TGGTGAAAGT + 1081 AAAAGATGCT GAAGATCAGT TGGGTGCACG AGTGGGTTAC ATCGAACTGG ATCTCAACAG + 1141 CGGTAAGATC CTTGAGAGTT TTCGCCCCGA AGAACGTTTT CCAATGATGA GCACTTTTAA + 1201 AGTTCTGCTA TGTGGCGCGG TATTATCCCG TGTTGACGCC GGGCAAGAGC AACTCGGTCG + 1261 CCGCATACAC TATTCTCAGA ATGACTTGGT TGAGTACTCA CCAGTCACAG AAAAGCATCT + 1321 TACGGATGGC ATGACAGTAA GAGAATTATG CAGTGCTGCC ATAACCATGA GTGATAACAC + 1381 TGCGGCCAAC TTACTTCTGA CAACGATCGG AGGACCGAAG GAGCTAACCG CTTTTTTGCA + 1441 CAACATGGGG GATCATGTAA CTCGCCTTGA TCGTTGGGAA CCGGAGCTGA ATGAAGCCAT + 1501 ACCAAACGAC GAGCGTGACA CCACGATGCC TGTAGCAATG GCAACAACGT TGCGCAAACT + 1561 ATTAACTGGC GAACTACTTA CTCTAGCTTC CCGGCAACAA TTAATAGACT GGATGGAGGC + 1621 GGATAAAGTT GCAGGACCAC TTCTGCGCTC GGCCCTTCCG GCTGGCTGGT TTATTGCTGA + 1681 TAAATCTGGA GCCGGTGAGC GTGGGTCTCG CGGTATCATT GCAGCACTGG GGCCAGATGG + 1741 TAAGCCCTCC CGTATCGTAG TTATCTACAC GACGGGGAGT CAGGCAACTA TGGATGAACG + 1801 AAATAGACAG ATCGCTGAGA TAGGTGCCTC ACTGATTAAG CATTGGTAAC TGTCAGACCA + 1861 AGTTTACTCA TATATACTTT AGATTGATTT AAAACTTCAT TTTTAATTTA AAAGGATCTA + 1921 GGTGAAGATC CTTTTTGATA ATCTCATGAC CAAAATCCCT TAACGTGAGT TTTCGTTCCA + 1981 CTGAGCGTCA GACCCCGTAG AAAAGATCAA AGGATCTTCT TGAGATCCTT TTTTTCTGCG + 2041 CGTAATCTGC TGCTTGCAAA CAAAAAAACC ACCGCTACCA GCGGTGGTTT GTTTGCCGGA + 2101 TCAAGAGCTA CCAACTCTTT TTCCGAAGGT AACTGGCTTC AGCAGAGCGC AGATACCAAA + 2161 TACTGTCCTT CTAGTGTAGC CGTAGTTAGG CCACCACTTC AAGAACTCTG TAGCACCGCC + 2221 TACATACCTC GCTCTGCTAA TCCTGTTACC AGTGGCTGCT GCCAGTGGCG ATAAGTCGTG + 2281 TCTTACCGGG TTGGACTCAA GACGATAGTT ACCGGATAAG GCGCAGCGGT CGGGCTGAAC + 2341 GGGGGGTTCG TGCACACAGC CCAGCTTGGA GCGAACGACC TACACCGAAC TGAGATACCT + 2401 ACAGCGTGAG CTATGAGAAA GCGCCACGCT TCCCGAAGGG AGAAAGGCGG ACAGGTATCC + 2461 GGTAAGCGGC AGGGTCGGAA CAGGAGAGCG CACGAGGGAG CTTCCAGGGG GAAACGCCTG + 2521 GTATCTTTAT AGTCCTGTCG GGTTTCGCCA CCTCTGACTT GAGCGTCGAT TTTTGTGATG + 2581 CTCGTCAGGG GGGCGGAGCC TATGGAAAAA CGCCAGCAAC GCGGCCTTTT TACGGTTCCT + 2641 GGCCTTTTGC TGGCCTTTTG CTCACATGTT CTTTCCTGCG TTATCCCCTG ATTCTGTGGA + 2701 TAACCGTATT ACCGCCTTTG AGTGAGCTGA TACCGCTCGC CGCAGCCGAA CGACCGAGCG + 2761 CAGCGAGTCA GTGAGCGAGG AAGCGGAAGA GCGCCTGATG CGGTATTTTC TCCTTACGCA + 2821 TCTGTGCGGT ATTTCACACC GCATATGGTG CACTCTCAGT ACAATCTGCT CTGATGCCGC + 2881 ATAGTTAAGC CAGTATACAC TCCGCTATCG CTACGTGACT GGGTCATGGC TGCGCCCCGA + 2941 CACCCGCCAA CACCCGCTGA CGCGCCCTGA CGGGCTTGTC TGCTCCCGGC ATCCGCTTAC + 3001 AGACAAGCTG TGACCGTCTC CGGGAGCTGC ATGTGTCAGA GGTTTTCACC GTCATCACCG + 3061 AAACGCGCGA GGCAGCAGAT CAATTCGCGC GCGAAGGCGA AGCGGCATGC ATAATGTGCC + 3121 TGTCAAATGG ACGAAGCAGG GATTCTGCAA ACCCTATGCT ACTCCGTCAA GCCGTCAATT + 3181 GTCTGATTCG TTACCAATTA TGACAACTTG ACGGCTACAT CATTCACTTT TTCTTCACAA + 3241 CCGGCACGGA ACTCGCTCGG GCTGGCCCCG GTGCATTTTT TAAATACCCG CGAGAAATAG + 3301 AGTTGATCGT CAAAACCAAC ATTGCGACCG ACGGTGGCGA TAGGCATCCG GGTGGTGCTC + 3361 AAAAGCAGCT TCGCCTGGCT GATACGTTGG TCCTCGCGCC AGCTTAAGAC GCTAATCCCT + 3421 AACTGCTGGC GGAAAAGATG TGACAGACGC GACGGCGACA AGCAAACATG CTGTGCGACG + 3481 CTGGCGATAT CAAAATTGCT GTCTGCCAGG TGATCGCTGA TGTACTGACA AGCCTCGCGT + 3541 ACCCGATTAT CCATCGGTGG ATGGAGCGAC TCGTTAATCG CTTCCATGCG CCGCAGTAAC + 3601 AATTGCTCAA GCAGATTTAT CGCCAGCAGC TCCGAATAGC GCCCTTCCCC TTGCCCGGCG + 3661 TTAATGATTT GCCCAAACAG GTCGCTGAAA TGCGGCTGGT GCGCTTCATC CGGGCGAAAG + 3721 AACCCCGTAT TGGCAAATAT TGACGGCCAG TTAAGCCATT CATGCCAGTA GGCGCGCGGA + 3781 CGAAAGTAAA CCCACTGGTG ATACCATTCG CGAGCCTCCG GATGACGACC GTAGTGATGA + 3841 ATCTCTCCTG GCGGGAACAG CAAAATATCA CCCGGTCGGC AAACAAATTC TCGTCCCTGA + 3901 TTTTTCACCA CCCCCTGACC GCGAATGGTG AGATTGAGAA TATAACCTTT CATTCCCAGC + 3961 GGTCGGTCGA TAAAAAAATC GAGATAACCG TTGGCCTCAA TCGGCGTTAA ACCCGCCACC + 4021 AGATGGGCAT TAAACGAGTA TCCCGGCAGC AGGGGATCAT TTTGCGCTTC AGCCATACTT + 4081 TTCATACTCC CGCCATTCAG AG +// diff --git a/lib/VNTI files/Hashimoto-Goto et al 2000.pdf b/lib/VNTI files/Hashimoto-Goto et al 2000.pdf new file mode 100644 index 00000000..fa8da681 Binary files /dev/null and b/lib/VNTI files/Hashimoto-Goto et al 2000.pdf differ diff --git a/lib/VNTI files/Theophylline Aptamer for Riboswitch.gb b/lib/VNTI files/Theophylline Aptamer for Riboswitch.gb new file mode 100644 index 00000000..40eae6dd --- /dev/null +++ b/lib/VNTI files/Theophylline Aptamer for Riboswitch.gb @@ -0,0 +1,488 @@ +LOCUS Theophylli 146 bp DNA 26-APR-2005 +SOURCE + ORGANISM +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT VNTDATE|357506064| +COMMENT VNTDBDATE|372795230| +COMMENT LSOWNER| +COMMENT VNTNAME|Theophylline Aptamer for Riboswitch| +COMMENT VNTAUTHORNAME|Demo User| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "Theophylline Aptamer for Riboswitch" 1 146 +COMMENT (CDBMol 1 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 146 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 2 2 0 65 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 0 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "theo28" 21 0 0 71 97 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #28=(CFSignal (CObList) "theo32" 21 0 0 8 39 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #29=(CFSignal (CObList) "2xtheo28" 21 0 0 103 146 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #30=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #31=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "Theophylline Aptamer for Riboswitch" 2) 5 "" 0 4) +COMMENT #32=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #33=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'Theophylline Aptamer for Riboswitch'" 1) +COMMENT #34=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Demo User" 1) +COMMENT #35=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 12/09/04 07:14PM" 1) +COMMENT #36=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 04/26/05 06:13PM" 1) +COMMENT #37=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 146 bp" 1) +COMMENT #38=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #39=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Linear" 1))) "General Description") +COMMENT #40=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) (CObjectList)) +COMMENT "Standard Fields") +COMMENT #41=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "Demo User" +COMMENT 1))) "Original Author") +COMMENT #43=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #44=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #45=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #46=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #47=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 8 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #48=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 8 End: 39 " 1))) "theo32") +COMMENT #49=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 71 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #50=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 71 End: 97 " 1))) "theo28") +COMMENT #51=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 103 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #52=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 103 End: 146 " 1))) "2xtheo28"))) +COMMENT "Misc. Feature (3 total)"))) "Feature Map") +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25093904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #55=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27238808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 0 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #56=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27229456 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #57=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26833528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 0 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #58=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21426760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #59=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26823920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BamHI: 0 sites") 1 5 "GGATCC" +COMMENT "CCTAGG") +COMMENT #60=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27155688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 "GAAGACNNNNNNN" +COMMENT "CTTCTGNNNNNNN") +COMMENT #61=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25264176 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #62=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27155928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #63=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27238888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #64=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27155448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BsaI: 0 sites") 7 11 "GGTCTCNNNNNN" +COMMENT "CCAGAGNNNNNN") +COMMENT #65=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27155608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 0 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #66=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21411048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #67=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25263296 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #68=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 2 " 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (1 #10# 2) 1 2 2 0 191) +COMMENT " N2: 65 " 1))))) "EcoRI: 2 sites") 1 5 +COMMENT "GAATTC" "CTTAAG") +COMMENT #71=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25251448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #72=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25261216 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #73=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27239288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #74=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25419160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #75=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27229536 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 0 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #76=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25251848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #77=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25182336 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 0 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #78=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27155528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 "GCTCTTCNNNNN" +COMMENT "CGAGAAGNNNNN") +COMMENT #79=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26833768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #80=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21410728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #81=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27239368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XhoI: 0 sites") 1 5 "CTCGAG" +COMMENT "GAGCTC") +COMMENT #82=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27238728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #83=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #84=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #85=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #86=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #87=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #88=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #89=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #90=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #91=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #92=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #93=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 5 +COMMENT "@N (@S)" 0) +COMMENT #94=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 1 +COMMENT 2 "?" 0) +COMMENT #95=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" 0) +COMMENT #96=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 1 +COMMENT 65535 "@N (@H)" 0) +COMMENT #97=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #98=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #99=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #100=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #101=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #102=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #103=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #104=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #105=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #106=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #107=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #108=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #109=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #110=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #111=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #112=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #113=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #114=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #115=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #116=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #117=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #118=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #119=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #120=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #121=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #122=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -146) 1 0 1 0 0 +COMMENT (mapper: 18.4867 -3.97946 43.875 43.875 0.01 10 14 146 146 1 0 1) +COMMENT #123=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -104 100) +COMMENT (CObjectList +COMMENT #124=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -102 100) +COMMENT (CObjectList +COMMENT #125=(CAxis +COMMENT (CWideLine (CWidget 0 (0 0) 1 2 0 0 #89# 21387948 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 0.033967 0.031967 1 0.0214037) 4.2967) +COMMENT #126=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #86# 27147684 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 2.53336 0.833333 0 +COMMENT "Theophylline Aptamer for Riboswitch" "@N" 1 0 0.5 0 +COMMENT -2.91312 15.0883 1.07123 Nil) +COMMENT #127=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #85# 25330180 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 2.53336 0.555556 0 "146 bp" "@L bp" 16 0 -0.8 0 +COMMENT -4.1798 1.82336 0.683761 Nil)) (CObjectList)) +COMMENT #128=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -102 100) +COMMENT (CObjectList +COMMENT #129=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -104 100) +COMMENT (CObjectList +COMMENT #130=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #88# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 2.10538 3.26549 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #131=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #84# 1129600065 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "theo28" "@N" 1 +COMMENT 0 0 3.23708 1.97573 2.2792 0.797721 #130#) +COMMENT #132=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #88# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 4.59747 5.97242 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #133=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #84# 25244052 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "theo32" "@N" 1 +COMMENT 0 0 -11.2783 1.97573 2.2792 0.797721 #132#) +COMMENT #134=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #88# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0 1.89055 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #135=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #84# 25402148 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "2xtheo28" "@N" +COMMENT 1 0 0 11.6375 1.97573 3.07692 0.797721 #134#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #136=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -104 100) +COMMENT (CObjectList +COMMENT #137=(CGroupWidget +COMMENT (CWidget 2 (10 #10# 0) 1 2 0 0 Nil -104 100) +COMMENT (CObjectList +COMMENT #138=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #91# 25587816 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 6.23022 1.9 +COMMENT 0.082322 1) +COMMENT #139=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #83# 22046692 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 0 +COMMENT "{\\i Eco}RI (2)" "@N (@S)" 5 0 0 -15.5504 +COMMENT 1.97573 2.66667 0.683761 #138#) +COMMENT #140=(CScratch +COMMENT (CWidget 2 (1 #10# 2) 1 2 0 0 #91# 25781568 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.5233 1.9 +COMMENT 0.082322 1) +COMMENT #141=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #83# 25436220 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 0 +COMMENT "{\\i Eco}RI (65)" "@N (@S)" 5 0 0 -4.0424 +COMMENT 1.97573 3.00855 0.683761 #140#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #142=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -372 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #143=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -325 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 0 0 (CObList))) +FEATURES Location/Qualifiers + misc_feature 71..97 + /vntifkey="21" + /label=theo28 + misc_feature 8..39 + /vntifkey="21" + /label=theo32 + misc_feature 103..146 + /vntifkey="21" + /label=2xtheo28 +BASE COUNT 32 a 38 c 30 g 27 t 19 others +ORIGIN + 1 gaattctgat accagcatcg tcttgatgcc cttggcagca attcnnnnnn nnnnnnnnnn + 61 nnngaattct gataccagcc gaaaggccct tggcagcaat tcgataccag ataccagccg + 121 aaaggccctt ggcagccctt ggcagc +// diff --git a/lib/VNTI files/p+thiM#2lacZ.gb b/lib/VNTI files/p+thiM#2lacZ.gb new file mode 100644 index 00000000..763b478f --- /dev/null +++ b/lib/VNTI files/p+thiM#2lacZ.gb @@ -0,0 +1,1440 @@ +LOCUS pLacthiMla 5441 bp DNA circular 28-JUL-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|453139909| +COMMENT VNTDBDATE|453139909| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMlacZ-N30#2| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMlacZ-N30#2" 0 5441 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5441 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 737 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1570 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3807 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2686 0 4848 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 726 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1369 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3918 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3091 0 3206 0 +COMMENT 4321 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 2048 0 2828 0 3253 0 +COMMENT 3505 0 4007 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 869 0 1595 0 2075 0 2528 +COMMENT 0 5309 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 5000 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4727 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2263 0 3515 1 0 +COMMENT "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4040 4678 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 3812 3916 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 4737 4842 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 4868 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 4954 4975 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 735 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "lacZ*" 4 0 0 719 3805 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #46=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #47=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacthiMlacZ-N30#2" 2) 5 "" 0 4) +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMlacZ-N30#2'" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/28/07 04:11\214\337\214\343" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/28/07 04:11\214\337\214\343" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5441 bp" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #61=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 719 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 719 End: 3805" 1))) "lacZ*") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4868 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4868 End: 284 (Complementary)" +COMMENT 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 735 " 1))) +COMMENT "core riboswitch") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1))) +COMMENT "TPP aptamer") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4954 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4954 End: 4975" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #88=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4040 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4040 End: 4678" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3812 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3812 End: 3916" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4737 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4737 End: 4842 (Complementary)" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #131=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #132=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #146=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20954240 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 1369 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24951760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 5 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24952560 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24859168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #153=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20954160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #154=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 3918 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24922024 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #157=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 737 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 2263 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 3515 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24859248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24951840 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 5000 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4727 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20985632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #176=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 1570 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24859408 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20985392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20985552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24952240 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24859328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24952640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20954400 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2686 " 1) +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 4848 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20954320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 726 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24859088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20985472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3807 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24952320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24951680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #202=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #203=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #204=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #205=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #206=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #207=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #208=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #209=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #210=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #211=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #212=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #213=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #214=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #215=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #216=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #217=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #218=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #219=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #220=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #221=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #222=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #223=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #224=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #225=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #226=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #227=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #228=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #229=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #230=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #231=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #232=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #233=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #234=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #235=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #236=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #237=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #238=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #239=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #240=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #241=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.443 -26.6852 40.0378 40.0378 0.01 10 -1 5441 5441 1 0 0) +COMMENT #242=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -736 100) +COMMENT (CObjectList +COMMENT #243=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1062 100) +COMMENT (CObjectList +COMMENT #244=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 24758628 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27534 6.27334 1 0.0214037) 0.115295) +COMMENT #245=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #205# 25138416 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMlacZ-N30#2" "@N" 1 0 +COMMENT 0.871165 0 -10 11.1395 1.44863 Nil) +COMMENT #246=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #204# 26575660 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5441 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.19698 0.924127 Nil)) (CObjectList)) +COMMENT #247=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #248=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil 393219 100) +COMMENT (CObjectList +COMMENT #249=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.94575 0.661792 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #250=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# -1643 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.20695 15.681 0 -10 2.72243 1.04901 #249#) +COMMENT #251=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #206# +COMMENT 268634488 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.88622 5.44537 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #252=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 25186324 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ*" "@N" 1 +COMMENT 8.01475 -15.681 0 -10 2.27285 1.04901 #251#)) +COMMENT (CObjectList)) +COMMENT #253=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -461 100) +COMMENT (CObjectList +COMMENT #254=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.562638 1.9 +COMMENT 0.082322 1) +COMMENT #255=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 25191988 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -8.81796 12.1963 0 -10 3.97125 1.04901 +COMMENT #254#) +COMMENT #256=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.60448 1.9 +COMMENT 0.082322 1) +COMMENT #257=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.5071 0 0 -10 1.14891 1.04901 #256#) +COMMENT #258=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.42577 +COMMENT 5.56412 1 0.082322) 0.8 1.8 0) +COMMENT #259=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3736136 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 13.185 -6.96932 0 +COMMENT -10 7.26813 1.04901 #258#) +COMMENT #260=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #207# +COMMENT 268634488 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.47765 +COMMENT 5.56412 1 0.082322) 0.8 1.8 0) +COMMENT #261=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3736208 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 13.579 -5.22699 0 -10 5.8195 1.04901 +COMMENT #260#)) (CObjectList)) +COMMENT #262=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1121 100) +COMMENT (CObjectList +COMMENT #263=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.67826 1.9 +COMMENT 0.082322 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 24955052 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 11.2336 6.96932 0 -10 2.59755 1.04901 #263#)) +COMMENT (CObjectList)) +COMMENT #265=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil 393219 100) +COMMENT (CObjectList +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.72784 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 26420292 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 8.38047 13.9386 0 -10 2.59755 1.04901 #266#) +COMMENT #268=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.11638 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 24818108 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.80716 24.3926 0 -10 3.92129 1.04901 #268#) +COMMENT #270=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.89848 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 26450828 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.31602 22.6503 0 -10 3.97125 1.04901 #270#)) +COMMENT (CObjectList)) +COMMENT #272=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 393219 100) +COMMENT (CObjectList +COMMENT #273=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.83161 5.94575 1 0.082322) 0.8 1.8 1) +COMMENT #274=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 6.91247 19.1656 0 -10 2.72243 1.04901 #273#) +COMMENT #275=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.58026 5.70017 1 0.082322) 0.8 1.8 0) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 26450268 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.731 3.48466 0 -10 2.67247 1.04901 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.60448 1.9 0.082322 +COMMENT 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 21563056 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.823 -1.74233 0 -10 2.14797 1.04901 #278#)) +COMMENT (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -457 100) +COMMENT (CObjectList +COMMENT #281=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.879699 1.61643 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 25704200 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7746 3.48466 0 -10 2.72243 1.04901 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #284=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #211# 100 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 1.75824 +COMMENT 1.8793) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 26577548 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.2382 -3.48466 0 -10 1.14891 1.04901 #284#) +COMMENT #286=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 0.690615 +COMMENT 0.812828) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3736008 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.24187 8.71165 0 -10 1.14891 1.04901 #286#)) +COMMENT (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1922 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.61831 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 54196124 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.5181 1.74233 0 -10 1.47361 1.04901 #289#)) +COMMENT (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #292=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.64598 1.9 +COMMENT 0.082322 1) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 24955508 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 11.6276 5.22699 0 -10 1.47361 1.04901 #292#)) +COMMENT (CObjectList)) +COMMENT #294=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #295=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.70248 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3736112 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 11.2368 8.71165 0 -10 5.8195 1.04901 +COMMENT #295#)) (CObjectList))) (CObjectList)) +COMMENT #297=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #298=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42462 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24957788 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (737)" "@N (@S)" 5 12.2047 +COMMENT -10.454 0 -10 5.09519 0.924127 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.46421 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24956876 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (1570)" "@N (@S)" 5 14.6335 +COMMENT -13.9386 0 -10 4.37087 0.924127 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #210# 25182936 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.88507 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 25188148 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3807)" "@N (@S)" 5 -13.9408 +COMMENT -5.22699 0 -10 4.77049 0.924127 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.4373 1.9 0.082322 +COMMENT 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24956420 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (726)" "@N (@S)" 5 11.3393 +COMMENT -8.71165 0 -10 3.92129 0.924127 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.75709 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24958244 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (3918)" "@N (@S)" 5 -14.2604 +COMMENT -1.74233 0 -10 4.84542 0.924127 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.57911 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 25188604 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.8984 +COMMENT -3.48466 0 -10 4.64561 0.924127 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.70824 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736848 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 9.19942 10.454 +COMMENT 0 -10 4.17106 0.924127 #317#)) (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.509603 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 21624204 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (5000)" "@N (@S)" 5 -9.04979 +COMMENT 13.9386 0 -10 4.64561 0.924127 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil 25149288 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.17752 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 25187692 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2686)" "@N (@S)" 5 3.76772 +COMMENT -19.1656 0 -10 4.64561 0.924127 #323#) +COMMENT #325=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.684851 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 24959156 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (4848)" "@N (@S)" 5 -10.4629 +COMMENT 10.454 0 -10 4.64561 0.924127 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.7901 1.9 0.082322 +COMMENT 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 24957332 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 8.88463 +COMMENT 17.4233 0 -10 4.29594 0.924127 #328#) +COMMENT #330=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.69595 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 24955964 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (1369)" "@N (@S)" 5 15.0661 +COMMENT -12.1963 0 -10 4.77049 0.924127 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.89041 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 21416380 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 8.08771 +COMMENT 20.908 0 -10 4.77049 0.924127 #333#) +COMMENT #335=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.76935 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 21391996 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 9.25728 +COMMENT 15.681 0 -10 4.77049 0.924127 #335#) +COMMENT #337=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.824357 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 26739148 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4727)" "@N (@S)" 5 -12.6275 +COMMENT 6.96932 0 -10 5.295 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.72554 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 21060624 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 9.1071 12.1963 +COMMENT 0 -10 4.12111 0.924127 #340#) +COMMENT #342=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.66522 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 21417492 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (2263)" "@N (@S)" 5 9.29124 +COMMENT -17.4233 0 -10 4.64561 0.924127 #342#) +COMMENT #344=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.22173 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 20929292 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3515)" "@N (@S)" 5 -12.2877 +COMMENT -6.96932 0 -10 4.57068 0.924127 #344#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #346=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #347=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21222776 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4040..4678 + /vntifkey="33" + /label=ColE1 + terminator 3812..3916 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4737..4842) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4868..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 4954..4975 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..735 + /vntifkey="21" + /label=core\riboswitch + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 719..3805 + /vntifkey="4" + /label=lacZ* +BASE COUNT 1288 a 1438 c 1459 g 1256 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gctattacaa gaagatcagg agcaaactat + 721 gcaagtcgac ctgctggatc cactgcatat agatcccgtc gttttacaac gtcgtgactg + 781 ggaaaaccct ggcgttaccc aacttaatcg ccttgcagca catccccctt tcgccagctg + 841 gcgtaatagc gaagaggccc gcaccgatcg cccttcccaa cagttgcgca gcctgaatgg + 901 cgaatggcgc tttgcctggt ttccggcacc agaagcggtg ccggaaagct ggctggagtg + 961 cgatcttcct gaggccgata ctgtcgtcgt cccctcaaac tggcagatgc acggttacga + 1021 tgcgcccatc tacaccaacg tgacctatcc cattacggtc aatccgccgt ttgttcccac + 1081 ggagaatccg acgggttgtt actcgctcac atttaatgtt gatgaaagct ggctacagga + 1141 aggccagacg cgaattattt ttgatggcgt taactcggcg tttcatctgt ggtgcaacgg + 1201 gcgctgggtc ggttacggcc aggacagtcg tttgccgtct gaatttgacc tgagcgcatt + 1261 tttacgcgcc ggagaaaacc gcctcgcggt gatggtgctg cgttggagtg acggcagtta + 1321 tctggaagat caggatatgt ggcggatgag cggcattttc cgtgacgtct cgttgctgca + 1381 taaaccgact acacaaatca gcgatttcca tgttgccact cgctttaatg atgatttcag + 1441 ccgcgctgta ctggaggctg aagttcagat gtgcggcgag ttgcgtgact acctacgggt + 1501 aacagtttct ttatggcagg gtgaaacgca ggtcgccagc ggcaccgcgc ctttcggcgg + 1561 tgaaattatc gatgagcgtg gtggttatgc cgatcgcgtc acactacgtc tgaacgtcga + 1621 aaacccgaaa ctgtggagcg ccgaaatccc gaatctctat cgtgcggtgg ttgaactgca + 1681 caccgccgac ggcacgctga ttgaagcaga agcctgcgat gtcggtttcc gcgaggtgcg + 1741 gattgaaaat ggtctgctgc tgctgaacgg caagccgttg ctgattcgag gcgttaaccg + 1801 tcacgagcat catcctctgc atggtcaggt catggatgag cagacgatgg tgcaggatat + 1861 cctgctgatg aagcagaaca actttaacgc cgtgcgctgt tcgcattatc cgaaccatcc + 1921 gctgtggtac acgctgtgcg accgctacgg cctgtatgtg gtggatgaag ccaatattga + 1981 aacccacggc atggtgccaa tgaatcgtct gaccgatgat ccgcgctggc taccggcgat + 2041 gagcgaacgc gtaacgcgaa tggtgcagcg cgatcgtaat cacccgagtg tgatcatctg + 2101 gtcgctgggg aatgaatcag gccacggcgc taatcacgac gcgctgtatc gctggatcaa + 2161 atctgtcgat ccttcccgcc cggtgcagta tgaaggcggc ggagccgaca ccacggccac + 2221 cgatattatt tgcccgatgt acgcgcgcgt ggatgaagac cagcccttcc cggctgtgcc + 2281 gaaatggtcc atcaaaaaat ggctttcgct acctggagag acgcgcccgc tgatcctttg + 2341 cgaatacgcc cacgcgatgg gtaacagtct tggcggtttc gctaaatact ggcaggcgtt + 2401 tcgtcagtat ccccgtttac agggcggctt cgtctgggac tgggtggatc agtcgctgat + 2461 taaatatgat gaaaacggca acccgtggtc ggcttacggc ggtgattttg gcgatacgcc + 2521 gaacgatcgc cagttctgta tgaacggtct ggtctttgcc gaccgcacgc cgcatccagc + 2581 gctgacggaa gcaaaacacc agcagcagtt tttccagttc cgtttatccg ggcaaaccat + 2641 cgaagtgacc agcgaatacc tgttccgtca tagcgataac gagctcctgc actggatggt + 2701 ggcgctggat ggtaagccgc tggcaagcgg tgaagtgcct ctggatgtcg ctccacaagg + 2761 taaacagttg attgaactgc ctgaactacc gcagccggag agcgccgggc aactctggct + 2821 cacagtacgc gtagtgcaac cgaacgcgac cgcatggtca gaagccgggc acatcagcgc + 2881 ctggcagcag tggcgtctgg cggaaaacct cagtgtgacg ctccccgccg cgtcccacgc + 2941 catcccgcat ctgaccacca gcgaaatgga tttttgcatc gagctgggta ataagcgttg + 3001 gcaatttaac cgccagtcag gctttctttc acagatgtgg attggcgata aaaaacaact + 3061 gctgacgccg ctgcgcgatc agttcacccg tgcaccgctg gataacgaca ttggcgtaag + 3121 tgaagcgacc cgcattgacc ctaacgcctg ggtcgaacgc tggaaggcgg cgggccatta + 3181 ccaggccgaa gcagcgttgt tgcagtgcac ggcagataca cttgctgatg cggtgctgat + 3241 tacgaccgct cacgcgtggc agcatcaggg gaaaacctta tttatcagcc ggaaaaccta + 3301 ccggattgat ggtagtggtc aaatggcgat taccgttgat gttgaagtgg cgagcgatac + 3361 accgcatccg gcgcggattg gcctgaactg ccagctggcg caggtagcag agcgggtaaa + 3421 ctggctcgga ttagggccgc aagaaaacta tcccgaccgc cttactgccg cctgttttga + 3481 ccgctgggat ctgccattgt cagacatgta taccccgtac gtcttcccga gcgaaaacgg + 3541 tctgcgctgc gggacgcgcg aattgaatta tggcccacac cagtggcgcg gcgacttcca + 3601 gttcaacatc agccgctaca gtcaacagca actgatggaa accagccatc gccatctgct + 3661 gcacgcggaa gaaggcacat ggctgaatat cgacggtttc catatgggga ttggtggcga + 3721 cgactcctgg agcccgtcag tatcggcgga atttcagctg agcgccggtc gctaccatta + 3781 ccagttggtc tggtgtcaaa aataatctag aggcatcaaa taaaacgaaa ggctcagtcg + 3841 aaagactggg cctttcgttt tatctgttgt ttgtcggtga acgctctcct gagtaggaca + 3901 aatccgccgc cctagaccta ggcgttcggc tgcggcgagc ggtatcagct cactcaaagg + 3961 cggtaatacg gttatccaca gaatcagggg ataacgcagg aaagaacatg tgagcaaaag + 4021 gccagcaaaa ggccaggaac cgtaaaaagg ccgcgttgct ggcgtttttc cataggctcc + 4081 gcccccctga cgagcatcac aaaaatcgac gctcaagtca gaggtggcga aacccgacag + 4141 gactataaag ataccaggcg tttccccctg gaagctccct cgtgcgctct cctgttccga + 4201 ccctgccgct taccggatac ctgtccgcct ttctcccttc gggaagcgtg gcgctttctc + 4261 aatgctcacg ctgtaggtat ctcagttcgg tgtaggtcgt tcgctccaag ctgggctgtg + 4321 tgcacgaacc ccccgttcag cccgaccgct gcgccttatc cggtaactat cgtcttgagt + 4381 ccaacccggt aagacacgac ttatcgccac tggcagcagc cactggtaac aggattagca + 4441 gagcgaggta tgtaggcggt gctacagagt tcttgaagtg gtggcctaac tacggctaca + 4501 ctagaaggac agtatttggt atctgcgctc tgctgaagcc agttaccttc ggaaaaagag + 4561 ttggtagctc ttgatccggc aaacaaacca ccgctggtag cggtggtttt tttgtttgca + 4621 agcagcagat tacgcgcaga aaaaaaggat ctcaagaaga tcctttgatc ttttctacgg + 4681 ggtctgacgc tcagtggaac gaaaactcac gttaagggat tttggtcatg actagtgctt + 4741 ggattctcac caataaaaaa cgcccggcgg caaccgagcg ttctgaacaa atccagatgg + 4801 agttctgagg tcattactgg atctatcaac aggagtccaa gcgagctcaa acttggtctg + 4861 acagttacca atgcttaatc agtgaggcac ctatctcagc gatctgtcta tttcgttcat + 4921 ccatagttgc ctgactcccc gtcgtgtaga taactacgat acgggagggc ttaccatctg + 4981 gccccagtgc tgcaatgata ccgcgagacc cacgctcacc ggctccagat ttatcagcaa + 5041 taaaccagcc agccggaagg gccgagcgca gaagtggtcc tgcaacttta tccgcctcca + 5101 tccagtctat taattgttgc cgggaagcta gagtaagtag ttcgccagtt aatagtttgc + 5161 gcaacgttgt tgccattgct acaggcatcg tggtgtcacg ctcgtcgttt ggtatggctt + 5221 cattcagctc cggttcccaa cgatcaaggc gagttacatg atcccccatg ttgtgcaaaa + 5281 aagcggttag ctccttcggt cctccgatcg ttgtcagaag taagttggcc gcagtgttat + 5341 cactcatggt tatggcagca ctgcataatt ctcttactgt catgccatcc gtaagatgct + 5401 tttctgtgac tggtgagtac tcaaccaagt cattctgaga a +// diff --git a/lib/VNTI files/pBADHisA.gb b/lib/VNTI files/pBADHisA.gb new file mode 100644 index 00000000..9c4c9597 --- /dev/null +++ b/lib/VNTI files/pBADHisA.gb @@ -0,0 +1,1369 @@ +LOCUS pBADHisA 4102 bp DNA circular 26-MAR-2006 +DEFINITION invitrogen. +SOURCE + ORGANISM +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT VNTDATE|300364408| +COMMENT VNTDBDATE|405955336| +COMMENT LSOWNER| +COMMENT VNTNAME|pBADHisA| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT VNTEXTCHREPL|Bacteria +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pBADHisA" 0 4102 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4102 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 240 0 422 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 415 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 451 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 466 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 432 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 459 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 3112 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 3110 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 3 1105 0 2351 0 2849 0 0 +COMMENT "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 136 0 2665 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 360 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 356 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 431 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 1408 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 2 644 0 1711 0 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 2 64 0 2782 1 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 2 937 0 1945 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 1 435 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "P(BAD)" 30 0 0 4 276 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #28=(CFSignal (CObList) "start codon" 21 0 0 319 321 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #29=(CFSignal (CObList) "His x 6" 21 0 0 331 348 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #30=(CFSignal (CObList) "Xpress epitope" 21 0 0 388 411 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #31=(CFSignal (CObList) "EK recognition site" 21 0 0 397 411 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #32=(CFSignal (CObList) "MCS" 21 0 0 430 470 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #33=(CFSignal (CObList) "rrnB term" 43 0 0 553 710 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #34=(CFSignal (CObList) "bla" 4 0 0 989 1849 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #35=(CFSignal (CObList) "pBR322" 33 0 0 1994 2667 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #36=(CFSignal (CObList) "araC" 4 0 1 3198 4076 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #37=(CFSignal (CObList) "-10" 47 0 0 272 276 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 248 252 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "BADFWD" 27 0 0 159 180 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "pBADFWD" 27 0 0 197 217 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #41=(CFSignal (CObList) "AatII-rrnB-f" 28 0 0 546 564 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "AatII-rrnB-r" 28 0 1 695 713 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #43=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #44=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pBADHisA" 2) 5 "" +COMMENT 0 4) +COMMENT #45=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pBADHisA'" 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "invitrogen" +COMMENT 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 04/20/03 10:33\214\337\221O" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 03/26/06 01:22\214\337\214\343" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4102 bp" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) (CObjectList)) +COMMENT "Standard Fields") +COMMENT #55=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #57=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #61=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 989 (3 #34# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #62=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 989 End: 1849" 1) +COMMENT #63=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "amp(R)" 1))) "bla") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3198 (3 #36# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3198 End: 4076 (Complementary)" +COMMENT 1))) "araC"))) "CDS (2 total)") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 319 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 319 End: 321 " 1))) +COMMENT "start codon") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 331 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 331 End: 348 " 1))) "His x 6") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 388 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 388 End: 411 " 1))) +COMMENT "Xpress epitope") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 397 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 397 End: 411 " 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "enterokinase" 1))) +COMMENT "EK recognition site") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 430 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 430 End: 470 " 1))) "MCS"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #79=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 159 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 159 End: 180 " 1))) "BADFWD") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 197 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 197 End: 217 " 1))) "pBADFWD"))) +COMMENT "Primer (2 total)") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #84=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 546 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 546 End: 564 " 1))) +COMMENT "AatII-rrnB-f") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 695 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 695 End: 713 (Complementary)" +COMMENT 1))) "AatII-rrnB-r"))) +COMMENT "Primer Binding Site (2 total)") +COMMENT #88=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4 End: 276 " 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "araBAD promoter" 1))) "P(BAD)"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #93=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1994 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1994 End: 2667" 1))) "pBR322"))) +COMMENT "Replication Origin (1 total)") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 553 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 553 End: 710 " 1))) +COMMENT "rrnB term"))) "Terminator (1 total)") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 272 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 272 End: 276 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 248 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 248 End: 252 " 1))) "-35"))) +COMMENT "-35 Signal (1 total)"))) "Feature Map") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #105=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26443352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #106=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25071600 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #107=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 136 " 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 2665 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #110=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26420656 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #111=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26451680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #112=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 1105 " 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2351 " 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (1 #13# 3) 1 2 2 0 191) +COMMENT " N3: 2849 " 1))))) "ApaLI: 3 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #116=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26443992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #117=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26451920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #118=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 240 " 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 422 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #121=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26407304 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #122=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26451280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #123=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 3110 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #125=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26407384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #126=(CGroupPar +COMMENT (CParagraph 0 (10 #26# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (1 #26# 1) 1 2 2 0 191) +COMMENT " N1: 435 " 1))))) "BglII: 1 site") +COMMENT 1 5 "AGATCT" "TCTAGA") +COMMENT #128=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25071680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 360 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #131=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26407064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #132=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 644 " 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #22# 2) 1 2 2 0 191) +COMMENT " N2: 1711 " 1))))) "BsaI: 2 sites") +COMMENT 7 11 "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26407224 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 937 " 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 1945 " 1))))) "BspHI: 2 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26452160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 415 " 1))))) "ClaI: 1 site") 2 +COMMENT 4 "ATCGAT" "TAGCTA") +COMMENT #142=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26454080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #143=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 459 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #145=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26445432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #146=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 466 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #148=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26452240 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #149=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 451 " 1))))) "KpnI: 1 site") 5 +COMMENT 1 "GGTACC" "CCATGG") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26420496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #152=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 356 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26451200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 3112 " 1))))) "NsiI: 1 site") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26403864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 1408 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26445512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 432 " 1))))) "SacI: 1 site") 5 +COMMENT 1 "GAGCTC" "CTCGAG") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26443272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 0 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26407144 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #165=(CGroupPar +COMMENT (CParagraph 0 (10 #23# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #23# 1) 1 2 2 0 191) +COMMENT " N1: 64 " 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (1 #23# 2) 1 2 2 0 191) +COMMENT " N2: 2782 (on complementary strand)" +COMMENT 1))))) "SapI: 2 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #168=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26451760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26451040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26420576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 431 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25071520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #174=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #175=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #176=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #177=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #178=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #179=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #180=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #181=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #182=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #183=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #184=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #185=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #186=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #187=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #188=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #189=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #190=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #191=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #192=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #193=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #194=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #195=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #196=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #197=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #198=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #199=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #200=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #201=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #202=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #203=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #204=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #205=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #206=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #207=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #208=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #209=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #210=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #211=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #212=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #213=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -211) 1 1 0 1 1 +COMMENT (mapper: 18.528 -30.0921 40.0378 40.0378 0.01 10 -1 4102 4102 1 0 0) +COMMENT #214=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 1367 100) +COMMENT (CObjectList +COMMENT #215=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil 1367 100) +COMMENT (CObjectList +COMMENT #216=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 26680012 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27571 6.27371 1 0.0214037) 0.15293) +COMMENT #217=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #177# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pBADHisA" "@N" 1 0 0.871165 0 +COMMENT -10 5.34495 1.44863 Nil) +COMMENT #218=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #176# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4102 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.24693 0.924127 Nil)) (CObjectList)) +COMMENT #219=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #220=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #221=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #178# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.44551 4.76224 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #222=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 21607964 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla" "@N" 1 +COMMENT 11.6605 -24.3926 0 -10 1.49858 1.04901 #221#) +COMMENT #223=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #178# +COMMENT 268634488 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.0397618 1.38402 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #224=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 26441900 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "araC" "@N" 1 +COMMENT -9.68617 8.71165 0 -10 2.2229 1.04901 #223#)) +COMMENT (CObjectList)) +COMMENT #225=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -100 100) +COMMENT (CObjectList +COMMENT #226=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #183# 796 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.78687 1.9 +COMMENT 0.082322 1) +COMMENT #227=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 1128748099 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "start codon" +COMMENT "@N" 1 8.91039 13.9386 0 -10 5.41988 1.04901 +COMMENT #226#) +COMMENT #228=(CScratch +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.76852 1.9 +COMMENT 0.082322 1) +COMMENT #229=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 1128743235 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "His x 6" "@N" 1 +COMMENT 8.06353 12.1963 0 -10 3.14703 1.04901 #228#) +COMMENT #230=(CScratch +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.68135 1.9 +COMMENT 0.082322 1) +COMMENT #231=(CLabel (CWidget 0 (0 0) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Xpress epitope" +COMMENT "@N" 1 13.124 6.96932 0 -10 7.1932 1.04901 +COMMENT #230#) +COMMENT #232=(CScratch +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.66758 1.9 +COMMENT 0.082322 1) +COMMENT #233=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 21598836 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "EK recognition site" "@N" 1 14.8335 5.22699 +COMMENT 0 -10 8.9915 1.04901 #232#) +COMMENT #234=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #179# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.55441 +COMMENT 5.61712 1 0.082322) 0.8 1.8 0) +COMMENT #235=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 21267076 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "MCS" "@N" 1 +COMMENT 11.9587 -5.22699 0 -10 2.2229 1.04901 #234#)) +COMMENT (CObjectList)) +COMMENT #236=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #237=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 6.03156 1.9 +COMMENT 0.082322 1) +COMMENT #238=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 24931844 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BADFWD" "@N" 1 +COMMENT 6.05605 22.6503 0 -10 4.14608 1.04901 #237#) +COMMENT #239=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.97344 1.9 +COMMENT 0.082322 1) +COMMENT #240=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 26417636 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pBADFWD" "@N" 1 +COMMENT 6.95391 20.908 0 -10 4.74552 1.04901 #239#)) +COMMENT (CObjectList)) +COMMENT #241=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #242=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.43972 1.9 +COMMENT 0.082322 1) +COMMENT #243=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 26415356 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AatII-rrnB-f" +COMMENT "@N" 1 11.9676 -12.1963 0 -10 5.14514 1.04901 +COMMENT #242#) +COMMENT #244=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.21185 1.9 +COMMENT 0.082322 1) +COMMENT #245=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 26418092 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AatII-rrnB-r" +COMMENT "@N" 1 13.842 -17.4233 0 -10 5.22007 1.04901 +COMMENT #244#)) (CObjectList)) +COMMENT #246=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #247=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.8511 6.2686 1 0.082322) 0.8 1.8 0) +COMMENT #248=(CLabel (CWidget 0 (0 0) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(BAD)" "@N" 1 +COMMENT 5.34062 24.3926 0 -10 3.29688 1.04901 #247#)) +COMMENT (CObjectList)) +COMMENT #249=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -176 100) +COMMENT (CObjectList +COMMENT #250=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #178# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.19454 3.22529 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #251=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 21587356 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pBR322" "@N" 1 +COMMENT -7.38815 -12.1963 0 -10 3.62158 1.04901 #250#)) +COMMENT (CObjectList)) +COMMENT #252=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -472 100) +COMMENT (CObjectList +COMMENT #253=(CLine +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #183# 21471076 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 5.18738 5.42901) +COMMENT #254=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 26464708 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "rrnB term" "@N" +COMMENT 1 12.754 -13.9386 0 -10 4.5457 1.04901 #253#)) +COMMENT (CObjectList)) +COMMENT #255=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -455 100) +COMMENT (CObjectList +COMMENT #256=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.85875 1.9 +COMMENT 0.082322 1) +COMMENT #257=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 26412196 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 6.56905 15.681 0 -10 1.49858 1.04901 #256#)) +COMMENT (CObjectList)) +COMMENT #258=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #259=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.89545 1.9 +COMMENT 0.082322 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 24932300 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 6.23681 17.4233 0 -10 1.49858 1.04901 #259#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #261=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #262=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil 2228229 100) +COMMENT (CObjectList +COMMENT #263=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.64006 1.9 +COMMENT 0.082322 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 26416724 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (415)" "@N (@S)" 5 13.4802 +COMMENT 3.48466 0 -10 3.87134 0.924127 #263#)) +COMMENT (CObjectList)) +COMMENT #265=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil 2228229 100) +COMMENT (CObjectList +COMMENT #266=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.585 1.9 0.082322 +COMMENT 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 26413532 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (451)" "@N (@S)" 5 12.1657 +COMMENT -6.96932 0 -10 4.14608 0.924127 #266#)) +COMMENT (CObjectList)) +COMMENT #268=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #269=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.56206 1.9 +COMMENT 0.082322 1) +COMMENT #270=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 25149540 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (466)" "@N (@S)" 5 11.1601 +COMMENT -10.454 0 -10 5.07021 0.924127 #269#)) +COMMENT (CObjectList)) +COMMENT #271=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #272=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.61406 1.9 +COMMENT 0.082322 1) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 25149996 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (432)" "@N (@S)" 5 13.8597 +COMMENT -1.74233 0 -10 4.14608 0.924127 #272#)) +COMMENT (CObjectList)) +COMMENT #274=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 2228229 100) +COMMENT (CObjectList +COMMENT #275=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.57277 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 26417180 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (459)" "@N (@S)" 5 11.0539 +COMMENT -8.71165 0 -10 4.67059 0.924127 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.51554 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 26435396 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (3112)" "@N (@S)" 5 -14.0839 0 0 +COMMENT -10 4.42082 0.924127 #278#)) (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #281=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.51859 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 26454924 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (3110)" "@N (@S)" 5 -14.3715 +COMMENT -1.74233 0 -10 4.74552 0.924127 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #284=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.72417 1.9 +COMMENT 0.082322 1) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 24421564 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (360)" "@N (@S)" 5 10.8622 +COMMENT 8.71165 0 -10 4.27096 0.924127 #284#)) +COMMENT (CObjectList)) +COMMENT #286=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #287=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.73028 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 21542780 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (356)" "@N (@S)" 5 9.01117 10.454 +COMMENT 0 -10 4.27096 0.924127 #287#)) (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.61559 1.9 +COMMENT 0.082322 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 25065652 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (431)" "@N (@S)" 5 14.0404 0 0 +COMMENT -10 4.19603 0.924127 #290#)) (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #293=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.12146 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel (CWidget 0 (0 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (1408)" "@N (@S)" 5 13.4026 +COMMENT -22.6503 0 -10 4.69556 0.924127 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 1 (10 #26# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 1 (1 #26# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.60947 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 26727180 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bgl}II (435)" "@N (@S)" 5 13.6893 +COMMENT -3.48466 0 -10 4.22101 0.924127 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil 2228229 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.90768 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26413076 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (240)" "@N (@S)" 5 8.0954 +COMMENT 19.1656 0 -10 5.12016 0.924127 #299#) +COMMENT #301=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.62935 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26413988 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (422)" "@N (@S)" 5 14.4434 +COMMENT 1.74233 0 -10 5.12016 0.924127 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil 2228229 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.06673 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26414444 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (136)" "@N (@S)" 5 5.91354 +COMMENT 26.1349 0 -10 4.29594 0.924127 #304#) +COMMENT #306=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.19913 1.9 +COMMENT 0.082322 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 24795940 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2665)" "@N (@S)" 5 -12.5142 +COMMENT -6.96932 0 -10 4.8704 0.924127 #306#)) +COMMENT (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 2 (10 #22# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.28985 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26728484 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (644)" "@N (@S)" 5 13.0564 +COMMENT -15.681 0 -10 4.14608 0.924127 #309#) +COMMENT #311=(CScratch +COMMENT (CWidget 2 (1 #22# 2) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.65808 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 21570916 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (1711)" "@N (@S)" 5 9.21196 +COMMENT -26.1349 0 -10 4.47078 0.924127 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 2 (10 #23# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #23# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.17684 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 21337084 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (64)" "@N (@S)" 5 4.27787 27.8773 +COMMENT 0 -10 3.69651 0.924127 #314#) +COMMENT #316=(CScratch +COMMENT (CWidget 2 (1 #23# 2) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.0202 1.9 0.082322 +COMMENT 1) +COMMENT #317=(CLabel (CWidget 0 (0 0) 1 2 0 0 #174# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (2782)" "@N (@S)" 5 -13.2685 +COMMENT -5.22699 0 -10 4.74552 0.924127 #316#)) +COMMENT (CObjectList)) +COMMENT #318=(CGroupWidget +COMMENT (CWidget 2 (10 #24# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #319=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.84176 1.9 +COMMENT 0.082322 1) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26727636 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (937)" "@N (@S)" 5 15.3438 +COMMENT -19.1656 0 -10 4.79547 0.924127 #319#) +COMMENT #321=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.30023 1.9 +COMMENT 0.082322 1) +COMMENT #322=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26664564 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (1945)" "@N (@S)" 5 5.65643 +COMMENT -27.8773 0 -10 5.27002 0.924127 #321#)) +COMMENT (CObjectList)) +COMMENT #323=(CGroupWidget +COMMENT (CWidget 3 (10 #13# 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #324=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.58484 1.9 +COMMENT 0.082322 1) +COMMENT #325=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 21335268 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1105)" "@N (@S)" 5 15.5217 +COMMENT -20.908 0 -10 5.12016 0.924127 #324#) +COMMENT #326=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.67933 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26416268 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2351)" "@N (@S)" 5 -9.0086 +COMMENT -10.454 0 -10 5.19509 0.924127 #326#) +COMMENT #328=(CScratch +COMMENT (CWidget 3 (1 #13# 3) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.91774 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26415812 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2849)" "@N (@S)" 5 -14.151 +COMMENT -3.48466 0 -10 5.27002 0.924127 #328#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #330=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #331=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21199224 (CObList))) +FEATURES Location/Qualifiers + promoter 4..276 + /vntifkey="30" + /label=P(BAD) + /note="araBAD promoter" + misc_feature 319..321 + /vntifkey="21" + /label=start\codon + misc_feature 331..348 + /vntifkey="21" + /label=His\x\6 + misc_feature 388..411 + /vntifkey="21" + /label=Xpress\epitope + misc_feature 397..411 + /vntifkey="21" + /label=EK\recognition\site + /note="enterokinase" + misc_feature 430..470 + /vntifkey="21" + /label=MCS + terminator 553..710 + /vntifkey="43" + /label=rrnB\term + CDS 989..1849 + /vntifkey="4" + /label=bla + /note="amp(R)" + rep_origin 1994..2667 + /vntifkey="33" + /label=pBR322 + CDS complement(3198..4076) + /vntifkey="4" + /label=araC + -10_signal 272..276 + /vntifkey="47" + /label=-10 + -35_signal 248..252 + /vntifkey="48" + /label=-35 + primer 159..180 + /vntifkey="27" + /label=BADFWD + primer 197..217 + /vntifkey="27" + /label=pBADFWD + primer_bind 546..564 + /vntifkey="28" + /label=AatII-rrnB-f + primer_bind complement(695..713) + /vntifkey="28" + /label=AatII-rrnB-r +BASE COUNT 1034 a 1045 c 1031 g 992 t +ORIGIN + 1 aagaaaccaa ttgtccatat tgcatcagac attgccgtca ctgcgtcttt tactggctct + 61 tctcgctaac caaaccggta accccgctta ttaaaagcat tctgtaacaa agcgggacca + 121 aagccatgac aaaaacgcgt aacaaaagtg tctataatca cggcagaaaa gtccacattg + 181 attatttgca cggcgtcaca ctttgctatg ccatagcatt tttatccata agattagcgg + 241 atcctacctg acgcttttta tcgcaactct ctactgtttc tccatacccg ttttttgggc + 301 taacaggagg aattaaccat ggggggttct catcatcatc atcatcatgg tatggctagc + 361 atgactggtg gacagcaaat gggtcgggat ctgtacgacg atgacgataa ggatcgatgg + 421 ggatccgagc tcgagatctg cagctggtac catatgggaa ttcgaagctt ggctgttttg + 481 gcggatgaga gaagattttc agcctgatac agattaaatc agaacgcaga agcggtctga + 541 taaaacagaa tttgcctggc ggcagtagcg cggtggtccc acctgacccc atgccgaact + 601 cagaagtgaa acgccgtagc gccgatggta gtgtggggtc tccccatgcg agagtaggga + 661 actgccaggc atcaaataaa acgaaaggct cagtcgaaag actgggcctt tcgttttatc + 721 tgttgtttgt cggtgaacgc tctcctgagt aggacaaatc cgccgggagc ggatttgaac + 781 gttgcgaagc aacggcccgg agggtggcgg gcaggacgcc cgccataaac tgccaggcat + 841 caaattaagc agaaggccat cctgacggat ggcctttttg cgtttctaca aactcttttg + 901 tttatttttc taaatacatt caaatatgta tccgctcatg agacaataac cctgataaat + 961 gcttcaataa tattgaaaaa ggaagagtat gagtattcaa catttccgtg tcgcccttat + 1021 tccctttttt gcggcatttt gccttcctgt ttttgctcac ccagaaacgc tggtgaaagt + 1081 aaaagatgct gaagatcagt tgggtgcacg agtgggttac atcgaactgg atctcaacag + 1141 cggtaagatc cttgagagtt ttcgccccga agaacgtttt ccaatgatga gcacttttaa + 1201 agttctgcta tgtggcgcgg tattatcccg tgttgacgcc gggcaagagc aactcggtcg + 1261 ccgcatacac tattctcaga atgacttggt tgagtactca ccagtcacag aaaagcatct + 1321 tacggatggc atgacagtaa gagaattatg cagtgctgcc ataaccatga gtgataacac + 1381 tgcggccaac ttacttctga caacgatcgg aggaccgaag gagctaaccg cttttttgca + 1441 caacatgggg gatcatgtaa ctcgccttga tcgttgggaa ccggagctga atgaagccat + 1501 accaaacgac gagcgtgaca ccacgatgcc tgtagcaatg gcaacaacgt tgcgcaaact + 1561 attaactggc gaactactta ctctagcttc ccggcaacaa ttaatagact ggatggaggc + 1621 ggataaagtt gcaggaccac ttctgcgctc ggcccttccg gctggctggt ttattgctga + 1681 taaatctgga gccggtgagc gtgggtctcg cggtatcatt gcagcactgg ggccagatgg + 1741 taagccctcc cgtatcgtag ttatctacac gacggggagt caggcaacta tggatgaacg + 1801 aaatagacag atcgctgaga taggtgcctc actgattaag cattggtaac tgtcagacca + 1861 agtttactca tatatacttt agattgattt aaaacttcat ttttaattta aaaggatcta + 1921 ggtgaagatc ctttttgata atctcatgac caaaatccct taacgtgagt tttcgttcca + 1981 ctgagcgtca gaccccgtag aaaagatcaa aggatcttct tgagatcctt tttttctgcg + 2041 cgtaatctgc tgcttgcaaa caaaaaaacc accgctacca gcggtggttt gtttgccgga + 2101 tcaagagcta ccaactcttt ttccgaaggt aactggcttc agcagagcgc agataccaaa + 2161 tactgtcctt ctagtgtagc cgtagttagg ccaccacttc aagaactctg tagcaccgcc + 2221 tacatacctc gctctgctaa tcctgttacc agtggctgct gccagtggcg ataagtcgtg + 2281 tcttaccggg ttggactcaa gacgatagtt accggataag gcgcagcggt cgggctgaac + 2341 ggggggttcg tgcacacagc ccagcttgga gcgaacgacc tacaccgaac tgagatacct + 2401 acagcgtgag ctatgagaaa gcgccacgct tcccgaaggg agaaaggcgg acaggtatcc + 2461 ggtaagcggc agggtcggaa caggagagcg cacgagggag cttccagggg gaaacgcctg + 2521 gtatctttat agtcctgtcg ggtttcgcca cctctgactt gagcgtcgat ttttgtgatg + 2581 ctcgtcaggg gggcggagcc tatggaaaaa cgccagcaac gcggcctttt tacggttcct + 2641 ggccttttgc tggccttttg ctcacatgtt ctttcctgcg ttatcccctg attctgtgga + 2701 taaccgtatt accgcctttg agtgagctga taccgctcgc cgcagccgaa cgaccgagcg + 2761 cagcgagtca gtgagcgagg aagcggaaga gcgcctgatg cggtattttc tccttacgca + 2821 tctgtgcggt atttcacacc gcatatggtg cactctcagt acaatctgct ctgatgccgc + 2881 atagttaagc cagtatacac tccgctatcg ctacgtgact gggtcatggc tgcgccccga + 2941 cacccgccaa cacccgctga cgcgccctga cgggcttgtc tgctcccggc atccgcttac + 3001 agacaagctg tgaccgtctc cgggagctgc atgtgtcaga ggttttcacc gtcatcaccg + 3061 aaacgcgcga ggcagcagat caattcgcgc gcgaaggcga agcggcatgc ataatgtgcc + 3121 tgtcaaatgg acgaagcagg gattctgcaa accctatgct actccgtcaa gccgtcaatt + 3181 gtctgattcg ttaccaatta tgacaacttg acggctacat cattcacttt ttcttcacaa + 3241 ccggcacgga actcgctcgg gctggccccg gtgcattttt taaatacccg cgagaaatag + 3301 agttgatcgt caaaaccaac attgcgaccg acggtggcga taggcatccg ggtggtgctc + 3361 aaaagcagct tcgcctggct gatacgttgg tcctcgcgcc agcttaagac gctaatccct + 3421 aactgctggc ggaaaagatg tgacagacgc gacggcgaca agcaaacatg ctgtgcgacg + 3481 ctggcgatat caaaattgct gtctgccagg tgatcgctga tgtactgaca agcctcgcgt + 3541 acccgattat ccatcggtgg atggagcgac tcgttaatcg cttccatgcg ccgcagtaac + 3601 aattgctcaa gcagatttat cgccagcagc tccgaatagc gcccttcccc ttgcccggcg + 3661 ttaatgattt gcccaaacag gtcgctgaaa tgcggctggt gcgcttcatc cgggcgaaag + 3721 aaccccgtat tggcaaatat tgacggccag ttaagccatt catgccagta ggcgcgcgga + 3781 cgaaagtaaa cccactggtg ataccattcg cgagcctccg gatgacgacc gtagtgatga + 3841 atctctcctg gcgggaacag caaaatatca cccggtcggc aaacaaattc tcgtccctga + 3901 tttttcacca ccccctgacc gcgaatggtg agattgagaa tataaccttt cattcccagc + 3961 ggtcggtcga taaaaaaatc gagataaccg ttggcctcaa tcggcgttaa acccgccacc + 4021 agatgggcat taaacgagta tcccggcagc aggggatcat tttgcgcttc agccatactt + 4081 ttcatactcc cgccattcag ag +// diff --git a/lib/VNTI files/pCIBT.gb b/lib/VNTI files/pCIBT.gb new file mode 100644 index 00000000..132c203a --- /dev/null +++ b/lib/VNTI files/pCIBT.gb @@ -0,0 +1,1278 @@ +LOCUS pCIBT 4054 bp DNA circular 17-DEC-2003 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|322245098| +COMMENT VNTDBDATE|322245324| +COMMENT LSOWNER| +COMMENT VNTNAME|pCIBT| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pCIBT" 0 4054 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4054 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 1021 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 97 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 703 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2971 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 618 0 1297 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 3984 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2041 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 72 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 360 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 358 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 2444 0 3729 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 253 0 2130 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 879 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 875 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 1 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3432 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3123 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 1135 0 2850 0 3897 0 +COMMENT 4002 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 1376 1 4040 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2163 2801 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2363..3001") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1935 2039 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2135..2239") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2860 2965 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3060..3165)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2991 3848 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3191..4048)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 3849 3947 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(4049..4147)") +COMMENT #32=(CFSignal (CObList) "P(R-O12)" 30 0 0 6 70 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..70") +COMMENT #33=(CFSignal (CObList) "OR2" 20 0 0 13 29 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "13..29") +COMMENT #34=(CFSignal (CObList) "OR1" 20 0 0 37 50 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "37..50") +COMMENT #35=(CFSignal (CObList) "-35" 48 0 0 27 32 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "27..32") +COMMENT #36=(CFSignal (CObList) "-10" 21 0 0 50 55 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "50..55") +COMMENT #37=(CFSignal (CObList) "blip2" 4 0 0 206 701 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "206..701") +COMMENT #38=(CFSignal (CObList) "Tc(R)" 4 0 0 731 1921 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #39=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #40=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pCIBT" 2) 5 "" 0 +COMMENT 4) +COMMENT #41=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pCIBT'" 1) +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 12/17/03 04:31\214\337\214\343" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 12/17/03 04:35\214\337\214\343" 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4054 bp" 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #49=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 17-JUL-2003" 1))) +COMMENT "Standard Fields") +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #54=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #55=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #58=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 206 (3 #37# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #59=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 206 End: 701 " 1) +COMMENT #60=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "partially synthetic blip gene" 1) +COMMENT #61=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #62=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 206..701" 1))) "blip2") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 731 (3 #38# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #64=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 731 End: 1921" 1))) "Tc(R)") +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2991 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2991 End: 3848 (Complementary)" +COMMENT 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3191..4048)" 1))) "AmpR"))) +COMMENT "CDS (3 total)") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar (CParagraph 20 (7 20 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #70=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 13 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 13 End: 29 " 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 13..29" 1))) "OR2") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 37 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 37 End: 50 " 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 37..50" 1))) "OR1"))) +COMMENT "Misc. Binding Site (2 total)") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #79=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 50 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 50 End: 55 " 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 50..55" 1))) "-10"))) +COMMENT "Misc. Feature (1 total)") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #84=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 6 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 6 End: 70 " 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..70" 1))) "P(R-O12)") +COMMENT #88=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3849 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3849 End: 3947 (Complementary)" +COMMENT 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(4049..4147)" 1))) +COMMENT "P(bla)"))) "Promoter Prokaryotic (2 total)") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #93=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2163 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2163 End: 2801" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2363..3001" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #98=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1935 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1935 End: 2039" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2135..2239" 1))) "T1") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2860 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2860 End: 2965 (Complementary)" +COMMENT 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3060..3165)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 27 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 27 End: 32 " 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..32" 1))) "-35"))) +COMMENT "-35 Signal (1 total)"))) "Feature Map") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #114=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26161512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 3984 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #117=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26241800 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #118=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 253 " 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 2130 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #121=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26253976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #122=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26208976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #123=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 2444 " 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 3729 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #126=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26205376 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #127=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2041 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #129=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26209136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #130=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 1021 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26265824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 1376 (on complementary strand)" +COMMENT 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 4040 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #136=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26219248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #137=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 358 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26265744 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #140=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26241880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #141=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 879 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #143=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26254136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3123 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #146=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26265904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #147=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26209056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #148=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26254696 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #149=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 72 " 1))))) "EcoRI: 1 site") 1 +COMMENT 5 "GAATTC" "CTTAAG") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26209216 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #152=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 703 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26218688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 97 " 1))))) "KpnI: 1 site") 5 +COMMENT 1 "GGTACC" "CCATGG") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26241960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 875 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26219328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 360 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26254056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3432 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26208576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2971 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26205216 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 618 " 1) +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1297 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26254216 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26208896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26218608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26242040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #177=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 1 " 1))))) "XhoI: 1 site") 1 5 +COMMENT "CTCGAG" "GAGCTC") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26241720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #180=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #181=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #182=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #183=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #184=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #185=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #186=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #187=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #188=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #189=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #190=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #191=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #192=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #193=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #194=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #195=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #196=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #197=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #198=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #199=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #200=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #201=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #202=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #203=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #204=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #205=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #206=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #207=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #208=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #209=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #210=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #211=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #212=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #213=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #214=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #215=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #216=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #217=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #218=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #219=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 18.1783 -21.3853 40.0378 40.0378 0.01 10 -1 4054 4054 1 0 0) +COMMENT #220=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #221=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1362 100) +COMMENT (CObjectList +COMMENT #222=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #186# 24504028 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27573 6.27373 1 0.0214037) 0.154741) +COMMENT #223=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #183# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pCIBT" "@N" 1 0 0.871165 0 -10 +COMMENT 3.34684 1.44863 Nil) +COMMENT #224=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4054 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #225=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -664 100) +COMMENT (CObjectList +COMMENT #226=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #227=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.318766 1.64644 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #228=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -12.2636 5.22699 0 -10 2.7474 1.04901 #227#) +COMMENT #229=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.18845 5.95597 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #230=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "blip2" "@N" 1 +COMMENT 13.0037 0 0 -10 2.34778 1.04901 #229#) +COMMENT #231=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.30062 5.14358 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #232=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Tc(R)" "@N" 1 +COMMENT 12.4547 -12.1963 0 -10 2.49764 1.04901 #231#)) +COMMENT (CObjectList)) +COMMENT #233=(CGroupWidget +COMMENT (CWidget 20 (7 20 0) 1 2 0 0 Nil -804 100) +COMMENT (CObjectList +COMMENT #234=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 6.25462 1.9 0.082322 +COMMENT 1) +COMMENT #235=(CLabel (CWidget 0 (0 0) 1 2 0 0 #181# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "OR2" "@N" 1 +COMMENT 2.30358 17.4233 0 -10 2.02309 1.04901 #234#) +COMMENT #236=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 6.21748 1.9 0.082322 +COMMENT 1) +COMMENT #237=(CLabel (CWidget 0 (0 0) 1 2 0 0 #181# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "OR1" "@N" 1 +COMMENT 2.5827 13.9386 0 -10 2.02309 1.04901 #236#)) +COMMENT (CObjectList)) +COMMENT #238=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #239=(CScratch +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #189# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 6.19736 1.9 +COMMENT 0.082322 1) +COMMENT #240=(CLabel (CWidget 0 (0 0) 1 2 0 0 #181# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 7.13559 10.454 0 -10 1.49858 1.04901 #239#)) +COMMENT (CObjectList)) +COMMENT #241=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #242=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #197# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 1 +COMMENT 0.165572 0.318766 1 0.082322) 0.8 1.8 1) +COMMENT #243=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT -7.69314 10.454 0 -10 2.7474 1.04901 #242#) +COMMENT #244=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #197# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 6.16487 6.26545 1 0.082322) 0.8 1.8 0) +COMMENT #245=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(R-O12)" "@N" +COMMENT 1 3.42687 12.1963 0 -10 4.14608 1.04901 #244#)) +COMMENT (CObjectList)) +COMMENT #246=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -525 100) +COMMENT (CObjectList +COMMENT #247=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.9389 2.92769 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #248=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 572950157 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -9.9388 -8.71165 0 -10 2.7474 1.04901 #247#)) +COMMENT (CObjectList)) +COMMENT #249=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #250=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #189# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 3.11802 +COMMENT 3.2805) +COMMENT #251=(CLabel (CWidget 0 (0 0) 1 2 0 0 #181# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.21432 -15.681 0 -10 1.17389 1.04901 #250#) +COMMENT #252=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #189# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 1.68513 +COMMENT 1.84915) +COMMENT #253=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.3832 -3.48466 0 -10 1.17389 1.04901 #252#)) +COMMENT (CObjectList)) +COMMENT #254=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -595 100) +COMMENT (CObjectList +COMMENT #255=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #189# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 6.23295 1.9 +COMMENT 0.082322 1) +COMMENT #256=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 2.23863 15.681 0 -10 1.49858 1.04901 #255#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #257=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1083 100) +COMMENT (CObjectList +COMMENT #258=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1153 100) +COMMENT (CObjectList +COMMENT #259=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.69483 1.9 +COMMENT 0.082322 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (1021)" "@N (@S)" 5 15.2024 +COMMENT -8.71165 0 -10 5.51978 0.924127 #259#)) +COMMENT (CObjectList)) +COMMENT #261=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil -734 100) +COMMENT (CObjectList +COMMENT #262=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.12463 1.9 +COMMENT 0.082322 1) +COMMENT #263=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (97)" "@N (@S)" 5 11.9567 6.96932 +COMMENT 0 -10 3.69651 0.924127 #262#)) (CObjectList)) +COMMENT #264=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -804 100) +COMMENT (CObjectList +COMMENT #265=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.18691 1.9 +COMMENT 0.082322 1) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (703)" "@N (@S)" 5 14.1685 +COMMENT -3.48466 0 -10 5.07021 0.924127 #265#)) +COMMENT (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -525 100) +COMMENT (CObjectList +COMMENT #268=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.67739 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2971)" "@N (@S)" 5 -14.0847 +COMMENT -1.74233 0 -10 4.62063 0.924127 #268#)) +COMMENT (CObjectList)) +COMMENT #270=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -385 100) +COMMENT (CObjectList +COMMENT #271=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.109866 1.9 +COMMENT 0.082322 1) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (3984)" "@N (@S)" 5 -4.49215 +COMMENT 12.1963 0 -10 4.8704 0.924127 #271#)) +COMMENT (CObjectList)) +COMMENT #273=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #274=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.11648 1.9 +COMMENT 0.082322 1) +COMMENT #275=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 2 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2041)" "@N (@S)" 5 -3.60425 +COMMENT -13.9386 0 -10 4.8704 0.924127 #274#)) +COMMENT (CObjectList)) +COMMENT #276=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1013 100) +COMMENT (CObjectList +COMMENT #277=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.16332 1.9 +COMMENT 0.082322 1) +COMMENT #278=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (72)" "@N (@S)" 5 10.7925 +COMMENT 8.71165 0 -10 4.14608 0.924127 #277#)) +COMMENT (CObjectList)) +COMMENT #279=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -595 100) +COMMENT (CObjectList +COMMENT #280=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.71767 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (360)" "@N (@S)" 5 13.8684 +COMMENT 1.74233 0 -10 4.0212 0.924127 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -1223 100) +COMMENT (CObjectList +COMMENT #283=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.72076 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (358)" "@N (@S)" 5 13.8026 +COMMENT 3.48466 0 -10 4.37087 0.924127 #283#)) +COMMENT (CObjectList)) +COMMENT #285=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -1505 100) +COMMENT (CObjectList +COMMENT #286=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.91456 1.9 +COMMENT 0.082322 1) +COMMENT #287=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (879)" "@N (@S)" 5 14.2022 +COMMENT -6.96932 0 -10 4.27096 0.924127 #286#)) +COMMENT (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -1226 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.92075 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (875)" "@N (@S)" 5 14.0069 +COMMENT -5.22699 0 -10 4.27096 0.924127 #289#)) +COMMENT (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #292=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.27319 1.9 +COMMENT 0.082322 1) +COMMENT #293=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 2 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (1)" "@N (@S)" 5 2.83005 19.1656 +COMMENT 0 -10 3.14703 0.924127 #292#)) (CObjectList)) +COMMENT #294=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #295=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.964034 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3432)" "@N (@S)" 5 -12.4739 +COMMENT 6.96932 0 -10 4.74552 0.924127 #295#)) +COMMENT (CObjectList)) +COMMENT #297=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -319 100) +COMMENT (CObjectList +COMMENT #298=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.44218 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 1094796097 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3123)" "@N (@S)" 5 -14.1234 +COMMENT 1.74233 0 -10 4.62063 0.924127 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil -1432 100) +COMMENT (CObjectList +COMMENT #301=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.31844 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel (CWidget 0 (0 0) 1 2 0 0 #180# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (618)" "@N (@S)" 5 13.7639 +COMMENT -1.74233 0 -10 3.87134 0.924127 #301#) +COMMENT #303=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.26775 1.9 +COMMENT 0.082322 1) +COMMENT #304=(CLabel (CWidget 0 (0 0) 1 2 0 0 #180# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1297)" "@N (@S)" 5 13.5333 +COMMENT -10.454 0 -10 4.42082 0.924127 #303#)) +COMMENT (CObjectList)) +COMMENT #305=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -249 100) +COMMENT (CObjectList +COMMENT #306=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.49287 1.9 +COMMENT 0.082322 1) +COMMENT #307=(CLabel (CWidget 0 (0 0) 1 2 0 0 #180# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2444)" "@N (@S)" 5 -10.4452 +COMMENT -10.454 0 -10 5.27002 0.924127 #306#) +COMMENT #308=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.504454 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 1095193671 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (3729)" "@N (@S)" 5 -11.2543 +COMMENT 8.71165 0 -10 5.27002 0.924127 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.88324 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 1196704596 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (253)" "@N (@S)" 5 13.1783 +COMMENT 5.22699 0 -10 4.34589 0.924127 #311#) +COMMENT #313=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.97876 1.9 +COMMENT 0.082322 1) +COMMENT #314=(CLabel (CWidget 0 (0 0) 1 2 0 0 #180# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2130)" "@N (@S)" 5 -5.12054 +COMMENT -12.1963 0 -10 4.82044 0.924127 #313#)) +COMMENT (CObjectList)) +COMMENT #315=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #316=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.1455 1.9 0.082322 +COMMENT 1) +COMMENT #317=(CLabel (CWidget 0 (0 0) 1 2 0 0 #180# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1376)" "@N (@S)" 5 13.1969 +COMMENT -13.9386 0 -10 4.62063 0.924127 #316#) +COMMENT #318=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.0232111 1.9 +COMMENT 0.082322 1) +COMMENT #319=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 3736144 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (4040)" "@N (@S)" 5 -3.48561 +COMMENT 13.9386 0 -10 4.67059 0.924127 #318#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #320=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -319 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #321=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21420304 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2163..2801 + /vntifkey="33" + /label=ColE1 + terminator 1935..2039 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2860..2965) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2991..3848) + /vntifkey="4" + /label=AmpR + promoter complement(3849..3947) + /vntifkey="30" + /label=P(bla) + promoter 6..70 + /vntifkey="30" + /label=P(R-O12) + misc_binding 13..29 + /vntifkey="20" + /label=OR2 + misc_binding 37..50 + /vntifkey="20" + /label=OR1 + -35_signal 27..32 + /vntifkey="48" + /label=-35 + misc_feature 50..55 + /vntifkey="21" + /label=-10 + CDS 206..701 + /vntifkey="4" + /label=blip2 + /note="partially synthetic blip gene" + CDS 731..1921 + /vntifkey="4" + /label=Tc(R) +BASE COUNT 919 a 1088 c 1059 g 988 t +ORIGIN + 1 tcgagaaata tctaacaccg tgcgtgttga ctattttacc tctggcggtg ataatggttg + 61 catgtcctcg gaattcatta aagaggagaa aggtacccat gcttttatat aaaatgtgtg + 121 acaatcaaaa ttatggggtt acttacatga agtttttatt ggcattttcg cttttaatac + 181 catccgtggt ttttgcaagt agtgcaggtg ttatgacagg agcaaaattc acgcagatcc + 241 agtttggtat gacacgtcag caggtcctcg acatagcagg tgctgagaac tgtgagactg + 301 gtggatcgtt cggtgacagc atccattgtc gtggacatgc agcaggagac tattatgcat + 361 acgcaacctt cggcttcacc agcgcagctg cagacgcaaa ggtggattcg aaaagccagg + 421 aaaaactgct tgcaccaagc gcaccaactc ttactcttgc taagttcaac caagtcactg + 481 ttggtatgac tagagcacaa gtacttgcta ccgtcggaca gggttcttgt accacttgga + 541 gtgagtacta tccagcatat ccatcgacgg caggagtgac tctcagcctg tcctgcttcg + 601 atgtggacgg ttactcgtcg acggggttct accgaggctc ggcgcacctc tggttcacgg + 661 acggggtgct tcagggcaag cggcagtggg accttgtata aaagcttgct aacgcagtca + 721 ggcaccgtgt atgaaatcta acaatgcgct catcgtcatc ctcggcaccg tcaccctgga + 781 tgctgtaggc ataggcttgg ttatgccggt actgccgggc ctcttgcggg atatcgtcca + 841 ttccgacagc atcgccagtc actatggcgt gctgctagcg ctatatgcgt tgatgcaatt + 901 tctatgcgca cccgttctcg gagcactgtc cgaccgcttt ggccgccgcc cagtcctgct + 961 cgcttcgcta cttggagcca ctatcgacta cgcgatcatg gcgaccacac ccgtcctgtg + 1021 gatcctctac gccggacgca tcgtggccgg catcaccggc gccacaggtg cggttgctgg + 1081 cgcctatatc gccgacatca ccgatgggga agatcgggct cgccacttcg ggctcatgag + 1141 cgcttgtttc ggcgtgggta tggtggcagg ccccgtggcc gggggactgt tgggcgccat + 1201 ctccttgcat gcaccattcc ttgcggcggc ggtgctcaac ggcctcaacc tactactggg + 1261 ctgcttccta atgcaggagt cgcataaggg agagcgtcga ccgatgccct tgagagcctt + 1321 caacccagtc agctccttcc ggtgggcgcg gggcatgact atcgtcgccg cacttatgac + 1381 tgtcttcttt atcatgcaac tcgtaggaca ggtgccggca gcgctctggg tcattttcgg + 1441 cgaggaccgc tttcgctgga gcgcgacgat gatcggcctg tcgcttgcgg tattcggaat + 1501 cttgcacgcc ctcgctcaag ccttcgtcac tggtcccgcc accaaacgtt tcggcgagaa + 1561 gcaggccatt atcgccggca tggcggccga cgcgctgggc tacgtcttgc tggcgttcgc + 1621 gacgcgaggc tggatggcct tccccattat gattcttctc gcttccggcg gcatcgggat + 1681 gcccgcgttg caggccatgc tgtccaggca ggtagatgac gaccatcagg gacagcttca + 1741 aggatcgctc gcggctctta ccagcctaac ttcgatcact ggaccgctga tcgtcacggc + 1801 gatttatgcc gcctcggcga gcacatggaa cgggttggca tggattgtag gcgccgccct + 1861 ataccttgtc tgcctccccg cgttgcgtcg cggtgcatgg agccgggcca cctcgacctg + 1921 aatggaagcc tagaggcatc aaataaaacg aaaggctcag tcgaaagact gggcctttcg + 1981 ttttatctgt tgtttgtcgg tgaacgctct cctgagtagg acaaatccgc cgccctagac + 2041 ctaggcgttc ggctgcggcg agcggtatca gctcactcaa aggcggtaat acggttatcc + 2101 acagaatcag gggataacgc aggaaagaac atgtgagcaa aaggccagca aaaggccagg + 2161 aaccgtaaaa aggccgcgtt gctggcgttt ttccataggc tccgcccccc tgacgagcat + 2221 cacaaaaatc gacgctcaag tcagaggtgg cgaaacccga caggactata aagataccag + 2281 gcgtttcccc ctggaagctc cctcgtgcgc tctcctgttc cgaccctgcc gcttaccgga + 2341 tacctgtccg cctttctccc ttcgggaagc gtggcgcttt ctcaatgctc acgctgtagg + 2401 tatctcagtt cggtgtaggt cgttcgctcc aagctgggct gtgtgcacga accccccgtt + 2461 cagcccgacc gctgcgcctt atccggtaac tatcgtcttg agtccaaccc ggtaagacac + 2521 gacttatcgc cactggcagc agccactggt aacaggatta gcagagcgag gtatgtaggc + 2581 ggtgctacag agttcttgaa gtggtggcct aactacggct acactagaag gacagtattt + 2641 ggtatctgcg ctctgctgaa gccagttacc ttcggaaaaa gagttggtag ctcttgatcc + 2701 ggcaaacaaa ccaccgctgg tagcggtggt ttttttgttt gcaagcagca gattacgcgc + 2761 agaaaaaaag gatctcaaga agatcctttg atcttttcta cggggtctga cgctcagtgg + 2821 aacgaaaact cacgttaagg gattttggtc atgactagtg cttggattct caccaataaa + 2881 aaacgcccgg cggcaaccga gcgttctgaa caaatccaga tggagttctg aggtcattac + 2941 tggatctatc aacaggagtc caagcgagct caaacttggt ctgacagtta ccaatgctta + 3001 atcagtgagg cacctatctc agcgatctgt ctatttcgtt catccatagt tgcctgactc + 3061 cccgtcgtgt agataactac gatacgggag ggcttaccat ctggccccag tgctgcaatg + 3121 ataccgcgag acccacgctc accggctcca gatttatcag caataaacca gccagccgga + 3181 agggccgagc gcagaagtgg tcctgcaact ttatccgcct ccatccagtc tattaattgt + 3241 tgccgggaag ctagagtaag tagttcgcca gttaatagtt tgcgcaacgt tgttgccatt + 3301 gctacaggca tcgtggtgtc acgctcgtcg tttggtatgg cttcattcag ctccggttcc + 3361 caacgatcaa ggcgagttac atgatccccc atgttgtgca aaaaagcggt tagctccttc + 3421 ggtcctccga tcgttgtcag aagtaagttg gccgcagtgt tatcactcat ggttatggca + 3481 gcactgcata attctcttac tgtcatgcca tccgtaagat gcttttctgt gactggtgag + 3541 tactcaacca agtcattctg agaatagtgt atgcggcgac cgagttgctc ttgcccggcg + 3601 tcaatacggg ataataccgc gccacatagc agaactttaa aagtgctcat cattggaaaa + 3661 cgttcttcgg ggcgaaaact ctcaaggatc ttaccgctgt tgagatccag ttcgatgtaa + 3721 cccactcgtg cacccaactg atcttcagca tcttttactt tcaccagcgt ttctgggtga + 3781 gcaaaaacag gaaggcaaaa tgccgcaaaa aagggaataa gggcgacacg gaaatgttga + 3841 atactcatac tcttcctttt tcaatattat tgaagcattt atcagggtta ttgtctcatg + 3901 agcggataca tatttgaatg tatttagaaa aataaacaaa taggggttcc gcgcacattt + 3961 ccccgaaaag tgccacctga cgtctaagaa accattatta tcatgacatt aacctataaa + 4021 aataggcgta tcacgaggcc ctttcgtctt cacc +// diff --git a/lib/VNTI files/pDelEStheogfpuv2.1.gb b/lib/VNTI files/pDelEStheogfpuv2.1.gb new file mode 100644 index 00000000..450c0056 --- /dev/null +++ b/lib/VNTI files/pDelEStheogfpuv2.1.gb @@ -0,0 +1,1485 @@ +LOCUS pDelEStheo 2990 bp DNA circular 17-JUL-2005 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|380300252| +COMMENT VNTDBDATE|380300252| +COMMENT LSOWNER| +COMMENT VNTNAME|pDelEStheogfpuv2.1| +COMMENT VNTAUTHORNAME|Demo User| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pDelEStheogfpuv2.1" 0 2990 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII" +COMMENT "StuI") (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 4294967295 1 2990 0 0 0 0 0 0 0 0) (CStringList) +COMMENT (CStringList) (CObList) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 1025 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1223 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1212 0 2264 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 1108 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 287 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1334 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 470 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 510 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 508 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 32 0 1737 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 827 0 1423 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 2 358 0 926 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2725 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2416 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 200 0 305 0 2143 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 343 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "") +COMMENT #27=(CRSite (CStringList) "StuI" "aggcct" 4 0 0 0 "")) +COMMENT (CObList +COMMENT #28=(CFSignal (CObList) "ColE1" 33 0 0 1456 2094 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1475..2113") +COMMENT #29=(CFSignal (CObList) "T1" 43 0 0 1228 1332 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1247..1351") +COMMENT #30=(CFSignal (CObList) "T0" 43 0 1 2153 2258 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2172..2277)") +COMMENT #31=(CFSignal (CObList) "AmpR" 4 0 1 2284 151 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2303..151)") +COMMENT #32=(CFSignal (CObList) "P(bla)" 30 0 1 152 250 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(152..250)") +COMMENT #33=(CFSignal (CObList) "BLI06" 28 0 1 341 362 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(341..362)") +COMMENT #34=(CFSignal (CObList) "bla-rev2" 28 0 0 4 25 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "4..25") +COMMENT #35=(CFSignal (CObList) "bla-rev?" 21 0 0 2370 2391 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2389..2410") +COMMENT #36=(CFSignal (CObList) "pbla-rev" 28 0 0 193 212 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "193..212") +COMMENT #37=(CFSignal (CObList) "P(lac)" 30 0 0 365 468 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "365..468") +COMMENT #38=(CFSignal (CObList) "PlacF" 27 0 0 384 404 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "384..404") +COMMENT #39=(CFSignal (CObList) "-35" 48 0 0 412 417 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "412..417") +COMMENT #40=(CFSignal (CObList) "lacO" 31 0 0 448 468 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "448..468") +COMMENT #41=(CFSignal (CObList) "-10" 47 0 0 446 451 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "446..451") +COMMENT #42=(CFSignal (CObList) "AG insertion" 62 0 0 363 364 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "363..364") +COMMENT #43=(CFSignal (CObList) "theo28" 21 0 0 474 483 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "476..502") +COMMENT #44=(CFSignal (CObList) "RBS" 32 0 0 493 504 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "512..523") +COMMENT #45=(CFSignal (CObList) "gfpuv" 4 0 0 505 1221 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "524..1240")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #46=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #47=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "ptheogfpuv2.1" 2) +COMMENT 5 "" 0 4) +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'ptheogfpuv2.1'" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Demo User" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/15/05 10:48AM" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/15/05 10:48AM" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 2990 bp" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 25-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "Demo User" +COMMENT 1))) "Original Author") +COMMENT #61=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 505 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 505 End: 1221" 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 524..1240" 1))) "gfpuv") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2284 (3 #31# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2284 End: 151 (Complementary)" +COMMENT 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2303..151)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 483 " 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 476..502" 1))) "theo28") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2370 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2370 End: 2391" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2389..2410" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (2 total)") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 384 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 384 End: 404 " 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 384..404" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #88=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4 End: 25 " 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 4..25" 1))) "bla-rev2") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 193 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 193 End: 212 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 193..212" 1))) "pbla-rev") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 341 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 341 End: 362 (Complementary)" +COMMENT 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(341..362)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 152 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 152 End: 250 (Complementary)" +COMMENT 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(152..250)" 1))) +COMMENT "P(bla)") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 365 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 365 End: 468 " 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 365..468" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 448 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 448 End: 468 " 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 448..468" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 493 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 493 End: 504 " 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 512..523" 1))) "RBS"))) +COMMENT "RBS (1 total)") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1456 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1456 End: 2094" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1475..2113" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #125=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1228 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1228 End: 1332" 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1247..1351" 1))) "T1") +COMMENT #131=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2153 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2153 End: 2258 (Complementary)" +COMMENT 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2172..2277)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #136=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #137=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 446 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 446 End: 451 " 1) +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 446..451" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #141=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #142=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 412 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 412 End: 417 " 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 412..417" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #146=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 363 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 363 End: 364 " 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 363..364" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #152=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #153=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25249928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #154=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 287 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25276832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #157=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 827 " 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1423 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25436792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #161=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #162=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 32 " 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1737 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25249848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #166=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1334 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #168=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250488 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #169=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 1025 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25437512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #172=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 343 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #175=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 508 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25437592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25288216 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25436952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #180=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2416 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25437112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 200 " 1) +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 305 " 1) +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2143 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250408 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #189=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 470 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25288296 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #195=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #196=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 510 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25436872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #198=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #199=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2725 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #201=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1212 " 1) +COMMENT #203=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2264 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #205=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #206=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 1108 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25437032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22146016 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "StuI: 0 sites") 3 3 "AGGCCT" +COMMENT "TCCGGA") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #211=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1223 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #213=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25436712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #214=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #215=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 358 " 1) +COMMENT #216=(CLinePar +COMMENT (CParagraph 0 (1 #19# 2) 1 2 2 0 191) +COMMENT " N2: 926 " 1))))) "XhoI: 2 sites") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25276752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #218=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #219=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #220=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #221=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #222=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #223=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #224=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #225=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #226=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #227=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #228=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #229=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #230=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #231=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #232=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #233=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #234=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #235=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #236=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #237=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #238=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #239=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #240=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #241=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #242=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #243=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #244=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #245=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #246=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #247=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #248=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #249=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #250=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #251=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #252=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #253=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #254=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #255=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #256=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #257=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -280) 1 1 0 1 1 +COMMENT (mapper: 18.528 -24.957 40.0378 40.0378 0.01 10 -1 2990 2990 1 0 0) +COMMENT #258=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1855 100) +COMMENT (CObjectList +COMMENT #259=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -951 100) +COMMENT (CObjectList +COMMENT #260=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 27037140 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27628 6.27428 1 0.0214037) 0.209806) +COMMENT #261=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #221# 26403396 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "ptheogfpuv2.1" "@N" 1 0 0.871165 +COMMENT 0 -10 7.96747 1.44863 Nil) +COMMENT #262=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #220# 27160236 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "2990 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.12205 0.949103 Nil)) (CObjectList)) +COMMENT #263=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1090 100) +COMMENT (CObjectList +COMMENT #264=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1439 100) +COMMENT (CObjectList +COMMENT #265=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.95638 1.48333 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 25777080 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -10.0085 8.71165 0 -10 2.67247 1.12394 #265#) +COMMENT #267=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.71146 5.21577 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #268=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 24996748 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 13.8019 -15.681 0 -10 2.67247 1.12394 #267#)) +COMMENT (CObjectList)) +COMMENT #269=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1021 100) +COMMENT (CObjectList +COMMENT #270=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.30289 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 25646212 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -13.5809 1.74233 0 -10 3.79641 1.12394 +COMMENT #270#) +COMMENT #272=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.28081 1.9 +COMMENT 0.082322 1) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 24994468 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "theo28" "@N" 1 +COMMENT 11.8661 -6.96932 0 -10 3.09707 1.12394 #272#)) +COMMENT (CObjectList)) +COMMENT #274=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 985 100) +COMMENT (CObjectList +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.46963 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 27208004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.7397 3.48466 0 -10 2.54759 1.12394 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1160 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.55985 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 26534032 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 9.77747 10.454 0 -10 2.59755 1.12394 #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.26689 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 26952064 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 3.05164 22.6503 0 -10 3.72148 1.12394 #280#) +COMMENT #282=(CScratch +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.87036 1.9 +COMMENT 0.082322 1) +COMMENT #283=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.61949 19.1656 0 -10 3.79641 1.12394 #282#)) +COMMENT (CObjectList)) +COMMENT #284=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1439 100) +COMMENT (CObjectList +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.74867 5.95638 1 0.082322) 0.8 1.8 1) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 26229552 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 7.19438 15.681 0 -10 2.67247 1.12394 #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.2913 5.50949 1 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 24994924 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.1605 0 0 -10 2.59755 1.12394 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 861 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.33535 1.9 0.082322 +COMMENT 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 25811252 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.522 -3.48466 0 -10 2.09802 1.12394 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil -602 100) +COMMENT (CObjectList +COMMENT #293=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 5.24094 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 27259004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "RBS" "@N" 1 +COMMENT 11.7842 -8.71165 0 -10 2.09802 1.12394 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1021 100) +COMMENT (CObjectList +COMMENT #296=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.87986 3.22051 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 1413695299 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -8.57122 -10.454 0 -10 2.72243 1.12394 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -2137 100) +COMMENT (CObjectList +COMMENT #299=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #227# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 3.47858 3.69887) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 1095188801 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 6.92536 -26.1349 0 -10 1.22384 1.12394 #299#) +COMMENT #301=(CLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #227# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.53578 1.75817) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 27600524 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.5237 -1.74233 0 -10 1.22384 1.12394 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -253 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.33955 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 26231952 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.5355 -1.74233 0 -10 1.42365 1.12394 #304#)) +COMMENT (CObjectList)) +COMMENT #306=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -393 100) +COMMENT (CObjectList +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.41088 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 24951524 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.5355 1.74233 0 -10 1.42365 1.12394 #307#)) +COMMENT (CObjectList)) +COMMENT #309=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -114 100) +COMMENT (CObjectList +COMMENT #310=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #227# 25915512 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.51369 1.9 +COMMENT 0.082322 1) +COMMENT #311=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 24994012 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 13.5616 5.22699 0 -10 5.59471 1.12394 +COMMENT #310#)) (CObjectList))) (CObjectList)) +COMMENT #312=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -881 100) +COMMENT (CObjectList +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1300 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.12478 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #228# 27239780 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (1025)" "@N (@S)" 5 13.6966 +COMMENT -19.1656 0 -10 5.295 0.949103 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -881 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.70936 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #228# 24995380 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1223)" "@N (@S)" 5 9.79024 +COMMENT -24.3926 0 -10 4.47078 0.949103 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -672 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.95064 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #228# -460 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (1108)" "@N (@S)" 5 11.804 +COMMENT -20.908 0 -10 4.12111 0.949103 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -1053 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.67314 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #228# 1096045639 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (287)" "@N (@S)" 5 9.78111 +COMMENT 13.9386 0 -10 4.12111 0.949103 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -993 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #226# 25922800 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.47648 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #228# 24997204 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1334)" "@N (@S)" 5 7.37823 +COMMENT -27.8773 0 -10 4.59566 0.949103 #326#)) +COMMENT (CObjectList)) +COMMENT #328=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #329=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.2892 1.9 0.082322 +COMMENT 1) +COMMENT #330=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #228# 25405036 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (470)" "@N (@S)" 5 13.187 +COMMENT -5.22699 0 -10 4.49575 0.949103 #329#)) +COMMENT (CObjectList)) +COMMENT #331=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #332=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.20528 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #228# 25226172 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (510)" "@N (@S)" 5 13.1631 +COMMENT -12.1963 0 -10 3.67153 0.949103 #332#)) +COMMENT (CObjectList)) +COMMENT #334=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -1300 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #226# 441 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.20947 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #228# 26775572 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (508)" "@N (@S)" 5 13.3094 +COMMENT -10.454 0 -10 4.17106 0.949103 #335#)) +COMMENT (CObjectList)) +COMMENT #337=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #338=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.558083 1.9 +COMMENT 0.082322 1) +COMMENT #339=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #228# 268697602 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2725)" "@N (@S)" 5 -9.12487 +COMMENT 10.454 0 -10 4.42082 0.949103 #338#)) +COMMENT (CObjectList)) +COMMENT #340=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -672 100) +COMMENT (CObjectList +COMMENT #341=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #226# 28208280 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.20638 1.9 +COMMENT 0.082322 1) +COMMENT #342=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2416)" "@N (@S)" 5 -13.6545 +COMMENT 3.48466 0 -10 4.42082 0.949103 #341#)) +COMMENT (CObjectList)) +COMMENT #343=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #344=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.55565 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #228# 393241 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (343)" "@N (@S)" 5 10.6357 +COMMENT 8.71165 0 -10 3.99622 0.949103 #344#)) +COMMENT (CObjectList)) +COMMENT #346=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -1718 100) +COMMENT (CObjectList +COMMENT #347=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.73244 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24999028 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1212)" "@N (@S)" 5 9.85011 +COMMENT -22.6503 0 -10 4.29594 0.949103 #347#) +COMMENT #349=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.52529 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24997660 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2264)" "@N (@S)" 5 -14.0752 0 0 +COMMENT -10 4.42082 0.949103 #349#)) (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.20815 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 25220004 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (32)" "@N (@S)" 5 4.02713 20.908 +COMMENT 0 -10 3.97125 0.949103 #352#) +COMMENT #354=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.63096 1.9 +COMMENT 0.082322 1) +COMMENT #355=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 3735968 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1737)" "@N (@S)" 5 -8.96225 +COMMENT -12.1963 0 -10 4.92035 0.949103 #354#)) +COMMENT (CObjectList)) +COMMENT #356=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #357=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #226# 41555336 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.54019 1.9 +COMMENT 0.082322 1) +COMMENT #358=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24993556 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (827)" "@N (@S)" 5 14.7711 +COMMENT -13.9386 0 -10 4.12111 0.949103 #357#) +COMMENT #359=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.28975 1.9 +COMMENT 0.082322 1) +COMMENT #360=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24998116 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1423)" "@N (@S)" 5 5.22149 +COMMENT -29.6196 0 -10 4.5457 0.949103 #359#)) +COMMENT (CObjectList)) +COMMENT #361=(CGroupWidget +COMMENT (CWidget 2 (10 #19# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #362=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.52418 1.9 +COMMENT 0.082322 1) +COMMENT #363=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 27159508 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (358)" "@N (@S)" 5 12.0961 +COMMENT 6.96932 0 -10 3.97125 0.949103 #362#) +COMMENT #364=(CScratch +COMMENT (CWidget 2 (1 #19# 2) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.33248 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 25219548 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (926)" "@N (@S)" 5 14.1723 +COMMENT -17.4233 0 -10 4.04618 0.949103 #364#)) +COMMENT (CObjectList)) +COMMENT #366=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil 2228229 100) +COMMENT (CObjectList +COMMENT #367=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.85567 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (200)" "@N (@S)" 5 8.31189 +COMMENT 17.4233 0 -10 4.62063 0.949103 #367#) +COMMENT #369=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.63538 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 1040 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (305)" "@N (@S)" 5 10.275 +COMMENT 12.1963 0 -10 4.5457 0.949103 #369#) +COMMENT #371=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.77915 1.9 +COMMENT 0.082322 1) +COMMENT #372=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2143)" "@N (@S)" 5 -14.236 +COMMENT -3.48466 0 -10 5.04523 0.949103 #371#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #373=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #374=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21658024 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1456..2094 + /vntifkey="33" + /label=ColE1 + terminator 1228..1332 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2153..2258) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2284..151) + /vntifkey="4" + /label=AmpR + promoter complement(152..250) + /vntifkey="30" + /label=P(bla) + primer_bind complement(341..362) + /vntifkey="28" + /label=BLI06 + primer_bind 4..25 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2370..2391 + /vntifkey="21" + /label=bla-rev? + primer_bind 193..212 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 365..468 + /vntifkey="30" + /label=P(lac) + primer 384..404 + /vntifkey="27" + /label=PlacF + -35_signal 412..417 + /vntifkey="48" + /label=-35 + protein_bind 448..468 + /vntifkey="31" + /label=lacO + -10_signal 446..451 + /vntifkey="47" + /label=-10 + mutation 363..364 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 474..483 + /vntifkey="21" + /label=theo28 + RBS 493..504 + /vntifkey="32" + /label=RBS + CDS 505..1221 + /vntifkey="4" + /label=gfpuv +BASE COUNT 817 a 723 c 688 g 762 t +ORIGIN + 1 tgttgagatc cagttcgatg taacccactc gtgcacccaa ctgatcttca gcatctttta + 61 ctttcaccag cgtttctggg tgagcaaaaa caggaaggca aaatgccgca aaaaagggaa + 121 taagggcgac acggaaatgt tgaatactca tactcttcct ttttcaatat tattgaagca + 181 tttatcaggg ttattgtctc atgagcggat acatatttga atgtatttag aaaaataaac + 241 aaataggggt tccgcgcaca tttccccgaa aagtgccacc tgacgtctaa gaaaccatta + 301 ttatcatgac attaacctat aaaaataggc gtatcacgag gccctttcgt cttcacctcg + 361 agagcgcaac gcaattaatg tgagttagct cactcattag gcaccccagg ctttacactt + 421 tatgcttccg gctcgtatgt tgtgtggaat tgtgagcgga taacaattga attccttggc + 481 agcaagctat aaaggaaaaa aaaaatgcat aaaggagaag aacttttcac tggagttgtc + 541 ccaattcttg ttgaattaga tggtgatgtt aatgggcaca aattttctgt cagtggagag + 601 ggtgaaggtg atgcaacata cggaaaactt acccttaaat ttatttgcac tactggaaaa + 661 ctacctgttc catggccaac acttgtcact actttctctt atggtgttca atgcttttcc + 721 cgttatccgg atcatatgaa acggcatgac tttttcaaga gtgccatgcc cgaaggttat + 781 gtacaggaac gcactatatc tttcaaagat gacgggaact acaagacgcg tgctgaagtc + 841 aagtttgaag gtgataccct tgttaatcgt atcgagttaa aaggtattga ttttaaagaa + 901 gatggaaaca ttctcggaca caaactcgag tacaactata actcacacaa tgtatacatc + 961 acggcagaca aacaaaagaa tggaatcaaa gctaacttca aaattcgcca caacattgaa + 1021 gatggatccg ttcaactagc agaccattat caacaaaata ctccaattgg cgatggccct + 1081 gtccttttac cagacaacca ttacctgtcg acacaatctg ccctttcgaa agatcccaac + 1141 gaaaagcgtg accacatggt ccttcttgag tttgtaactg ctgctgggat tacacatggc + 1201 atggatgagc tctacaaata atctagaggc atcaaataaa acgaaaggct cagtcgaaag + 1261 actgggcctt tcgttttatc tgttgtttgt cggtgaacgc tctcctgagt aggacaaatc + 1321 cgccgcccta gacctaggcg ttcggctgcg gcgagcggta tcagctcact caaaggcggt + 1381 aatacggtta tccacagaat caggggataa cgcaggaaag aacatgtgag caaaaggcca + 1441 gcaaaaggcc aggaaccgta aaaaggccgc gttgctggcg tttttccata ggctccgccc + 1501 ccctgacgag catcacaaaa atcgacgctc aagtcagagg tggcgaaacc cgacaggact + 1561 ataaagatac caggcgtttc cccctggaag ctccctcgtg cgctctcctg ttccgaccct + 1621 gccgcttacc ggatacctgt ccgcctttct cccttcggga agcgtggcgc tttctcaatg + 1681 ctcacgctgt aggtatctca gttcggtgta ggtcgttcgc tccaagctgg gctgtgtgca + 1741 cgaacccccc gttcagcccg accgctgcgc cttatccggt aactatcgtc ttgagtccaa + 1801 cccggtaaga cacgacttat cgccactggc agcagccact ggtaacagga ttagcagagc + 1861 gaggtatgta ggcggtgcta cagagttctt gaagtggtgg cctaactacg gctacactag + 1921 aaggacagta tttggtatct gcgctctgct gaagccagtt accttcggaa aaagagttgg + 1981 tagctcttga tccggcaaac aaaccaccgc tggtagcggt ggtttttttg tttgcaagca + 2041 gcagattacg cgcagaaaaa aaggatctca agaagatcct ttgatctttt ctacggggtc + 2101 tgacgctcag tggaacgaaa actcacgtta agggattttg gtcatgacta gtgcttggat + 2161 tctcaccaat aaaaaacgcc cggcggcaac cgagcgttct gaacaaatcc agatggagtt + 2221 ctgaggtcat tactggatct atcaacagga gtccaagcga gctcaaactt ggtctgacag + 2281 ttaccaatgc ttaatcagtg aggcacctat ctcagcgatc tgtctatttc gttcatccat + 2341 agttgcctga ctccccgtcg tgtagataac tacgatacgg gagggcttac catctggccc + 2401 cagtgctgca atgataccgc gagacccacg ctcaccggct ccagatttat cagcaataaa + 2461 ccagccagcc ggaagggccg agcgcagaag tggtcctgca actttatccg cctccatcca + 2521 gtctattaat tgttgccggg aagctagagt aagtagttcg ccagttaata gtttgcgcaa + 2581 cgttgttgcc attgctacag gcatcgtggt gtcacgctcg tcgtttggta tggcttcatt + 2641 cagctccggt tcccaacgat caaggcgagt tacatgatcc cccatgttgt gcaaaaaagc + 2701 ggttagctcc ttcggtcctc cgatcgttgt cagaagtaag ttggccgcag tgttatcact + 2761 catggttatg gcagcactgc ataattctct tactgtcatg ccatccgtaa gatgcttttc + 2821 tgtgactggt gagtactcaa ccaagtcatt ctgagaatag tgtatgcggc gaccgagttg + 2881 ctcttgcccg gcgtcaatac gggataatac cgcgccacat agcagaactt taaaagtgct + 2941 catcattgga aaacgttctt cggggcgaaa actctcaagg atcttaccgc +// diff --git a/lib/VNTI files/pE19T.gb b/lib/VNTI files/pE19T.gb new file mode 100644 index 00000000..68b5d7cb --- /dev/null +++ b/lib/VNTI files/pE19T.gb @@ -0,0 +1,1422 @@ +LOCUS pE19T 4902 bp DNA circular 21-JUN-2006 +SOURCE + ORGANISM +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|413824823| +COMMENT VNTDBDATE|413832178| +COMMENT LSOWNER| +COMMENT VNTNAME|pE19T| +COMMENT VNTAUTHORNAME|Yokobayashi Lab| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pE19T" 0 4902 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII" +COMMENT "AseI") (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4902 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 479 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 400 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 3078 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 4351 0 4838 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 4434 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 2 812 0 4127 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 2 4620 0 4692 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 2 4618 0 4690 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 5 178 0 1582 0 2828 0 +COMMENT 3788 0 4090 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 1 4415 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 1 4413 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 1268 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 3 280 0 2531 0 4012 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2222 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 1 1152 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 1988 0 4751 0 4856 0 0 +COMMENT "") #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "") +COMMENT #27=(CRSite (CStringList) "AseI" "attaat" 3 0 5 655 0 875 0 1039 0 1098 +COMMENT 0 2333 0 0 "")) +COMMENT (CObList +COMMENT #28=(CFSignal (CObList) "Hygromycin" 4 0 1 3349 4374 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3332..4357)") +COMMENT #29=(CFSignal (CObList) "Ampicilin" 4 0 1 2088 2947 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2071..2930)") +COMMENT #30=(CFSignal (CObList) "SV40 Promoter" 29 0 1 4394 4718 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(4377..4701)") +COMMENT #31=(CFSignal (CObList) "SV40 polyA" 25 0 1 2968 3340 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2951..3323)") +COMMENT #32=(CFSignal (CObList) "ColE1 origin" 33 0 1 1141 2026 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(1124..2009)") +COMMENT #33=(CFSignal (CObList) "M13 Forward (-40) primer" 27 0 0 333 350 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "333..350") +COMMENT #34=(CFSignal (CObList) "M13 Reverse Primer" 27 0 0 926 942 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "909..925") +COMMENT #35=(CFSignal (CObList) "pSilencer2.1-f" 27 0 0 285 303 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "285..303") +COMMENT #36=(CFSignal (CObList) "M13 Reverse primer" 27 0 0 3033 3049 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "3016..3032") +COMMENT #37=(CFSignal (CObList) "T7 Promoter" 30 0 1 857 876 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(840..859)") +COMMENT #38=(CFSignal (CObList) "pSilencer2.1-r" 27 0 1 580 602 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "U6 promoter" 29 0 1 479 812 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "Pol III terminator" 43 0 1 409 414 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #41=(CFSignal (CObList) "EGFP anti-sense" 21 0 1 415 433 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "EGFP sense strand" 21 0 1 459 477 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "Theophylline aptamer" 21 0 1 434 458 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "")) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #44=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #45=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pE19T" 2) 5 "" 0 +COMMENT 4) +COMMENT #46=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pE19T'" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 06/21/06 03:20PM" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 06/21/06 05:22PM" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4902 bp" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 19-NOV-2004" 1))) +COMMENT "Standard Fields") +COMMENT #57=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #59=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #63=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2088 (3 #29# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #64=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2088 End: 2947 (Complementary)" +COMMENT 1) +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Ampicilin resistance gene" 1) +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2071..2930)" 1))) +COMMENT "Ampicilin") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3349 (3 #28# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3349 End: 4374 (Complementary)" +COMMENT 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Hygromycin resistance gene" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3332..4357)" 1))) +COMMENT "Hygromycin"))) "CDS (2 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 415 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 415 End: 433 (Complementary)" +COMMENT 1))) "EGFP anti-sense") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 434 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 434 End: 458 (Complementary)" +COMMENT 1))) "Theophylline aptamer") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 459 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 459 End: 477 (Complementary)" +COMMENT 1))) "EGFP sense strand"))) +COMMENT "Misc. Feature (3 total)") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar (CParagraph 25 (7 25 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2968 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2968 End: 3340 (Complementary)" +COMMENT 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "SV40 early polyA signal" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2951..3323)" 1))) +COMMENT "SV40 polyA"))) "PolyA Signal (1 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 303 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 285..303" 1))) "pSilencer2.1-f") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 333 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 333 End: 350 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 333..350" 1))) +COMMENT "M13 Forward (-40) primer") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 580 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 580 End: 602 (Complementary)" +COMMENT 1))) "pSilencer2.1-r") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 926 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 926 End: 942 " 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 909..925" 1))) "M13 Reverse Primer") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3033 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3033 End: 3049" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3016..3032" 1))) +COMMENT "M13 Reverse primer"))) "Primer (5 total)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar (CParagraph 29 (7 29 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 479 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 479 End: 812 (Complementary)" +COMMENT 1))) "U6 promoter") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4394 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4394 End: 4718 (Complementary)" +COMMENT 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "SV40 early promoter" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(4377..4701)" 1))) +COMMENT "SV40 Promoter"))) +COMMENT "Promoter Eukaryotic (2 total)") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #114=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 857 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 857 End: 876 (Complementary)" +COMMENT 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(840..859)" 1))) +COMMENT "T7 Promoter"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #118=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #119=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1141 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1141 End: 2026 (Complementary)" +COMMENT 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "ColE1 origin" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(1124..2009)" 1))) +COMMENT "ColE1 origin"))) +COMMENT "Replication Origin (1 total)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 409 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 409 End: 414 (Complementary)" +COMMENT 1))) "Pol III terminator"))) +COMMENT "Terminator (1 total)"))) "Feature Map") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #128=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20448512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 4351 " 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 4838 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26738640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 1268 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26738960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #136=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20489336 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 5 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #137=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26739520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AseI: 5 sites") 2 4 "ATTAAT" +COMMENT "TAATTA") +COMMENT #138=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20448272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 4434 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #141=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20426136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #142=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 479 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #144=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26739360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #145=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20489416 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #146=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 4618 " 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (1 #12# 2) 1 2 2 0 191) +COMMENT " N2: 4690 " 1))))) "BfrBI: 2 sites") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #149=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26739440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26738720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26739120 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #152=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2222 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26739280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 1988 " 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 4751 " 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4856 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20426056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20489576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 812 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #10# 2) 1 2 2 0 191) +COMMENT " N2: 4127 " 1))))) "EcoRI: 2 sites") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20448752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #165=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 400 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20449232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #168=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26738800 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20489496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 4620 " 1) +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #11# 2) 1 2 2 0 191) +COMMENT " N2: 4692 " 1))))) "NsiI: 2 sites") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26739040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 280 " 1) +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #21# 2) 1 2 2 0 191) +COMMENT " N2: 2531 " 1) +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (1 #21# 3) 1 2 2 0 191) +COMMENT " N3: 4012 " 1))))) "PvuI: 3 sites") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20448672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20448592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #180=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 3078 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26739200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #23# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #23# 1) 1 2 2 0 191) +COMMENT " N1: 1152 " 1))))) "SapI: 1 site") +COMMENT 8 11 "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20489256 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #186=(CGroupPar +COMMENT (CParagraph 0 (10 #14# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #14# 1) 1 2 2 0 191) +COMMENT " N1: 4415 " 1))))) "SmaI: 1 site") +COMMENT 3 3 "CCCGGG" "GGGCCC") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20449152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26738880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XhoI: 0 sites") 1 5 "CTCGAG" +COMMENT "GAGCTC") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26738560 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #15# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #15# 1) 1 2 2 0 191) +COMMENT " N1: 4413 " 1))))) "XmaI: 1 site") +COMMENT 1 5 "CCCGGG" "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #193=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #194=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #195=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #196=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #197=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #198=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #199=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #200=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #201=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #202=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #203=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #204=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #205=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #206=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #207=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #208=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #209=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #210=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #211=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #212=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #213=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #214=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #215=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #216=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #217=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #218=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #219=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #220=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #221=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #222=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #223=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #224=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #225=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #226=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #227=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #228=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #229=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #230=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #231=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #232=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 19.1923 -26.6354 40.0378 40.0378 0.01 10 -1 4902 4902 1 0 0) +COMMENT #233=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -666 100) +COMMENT (CObjectList +COMMENT #234=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1060 100) +COMMENT (CObjectList +COMMENT #235=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #199# 26338972 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27546 6.27346 1 0.0214037) 0.127972) +COMMENT #236=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #196# 29399432 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pE19T" "@N" 1 0 0.871165 0 -10 +COMMENT 3.54665 1.44863 Nil) +COMMENT #237=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #195# 29410024 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4902 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.12205 0.949103 Nil)) (CObjectList)) +COMMENT #238=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -736 100) +COMMENT (CObjectList +COMMENT #239=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #240=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #197# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.675692 1.98868 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #241=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 1129595732 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Hygromycin" +COMMENT "@N" 1 -14.4934 0 0 -10 5.22007 1.12394 #240#) +COMMENT #242=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #197# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.50185 3.60241 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #243=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 1195458900 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Ampicilin" "@N" +COMMENT 1 -3.88558 -13.9386 0 -10 4.04618 1.12394 +COMMENT #242#)) (CObjectList)) +COMMENT #244=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1643 100) +COMMENT (CObjectList +COMMENT #245=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #202# 1003 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.74338 1.9 +COMMENT 0.082322 1) +COMMENT #246=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 3670616 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "EGFP anti-sense" "@N" 1 12.1167 8.71165 0 +COMMENT -10 7.54287 1.12394 #245#) +COMMENT #247=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.68707 1.9 +COMMENT 0.082322 1) +COMMENT #248=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 3670640 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "EGFP sense strand" "@N" 1 14.9381 5.22699 0 +COMMENT -10 8.66681 1.12394 #247#) +COMMENT #249=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.71907 1.9 +COMMENT 0.082322 1) +COMMENT #250=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 3670640 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "Theophylline aptamer" "@N" 1 14.5179 6.96932 +COMMENT 0 -10 9.66587 1.12394 #249#)) (CObjectList)) +COMMENT #251=(CGroupWidget (CWidget 25 (7 25 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #252=(CLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #213# +COMMENT 1944545584 100) (LOGPEN 0 6 32768) 8 +COMMENT 0.835356 1.99892 2.47626) +COMMENT #253=(CLabel (CWidget 0 (0 0) 1 2 0 0 #194# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SV40 polyA" +COMMENT "@N" 1 -12.4707 -6.96932 0 -10 4.92035 +COMMENT 1.12394 #252#)) (CObjectList)) +COMMENT #254=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -108 100) +COMMENT (CObjectList +COMMENT #255=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #202# 1003 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.84832 1.9 +COMMENT 0.082322 1) +COMMENT #256=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 27005404 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "M13 Forward (-40) primer" "@N" 1 11.0406 +COMMENT 13.9386 0 -10 11.0895 1.12394 #255#) +COMMENT #257=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #202# 530 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.08944 1.9 +COMMENT 0.082322 1) +COMMENT #258=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 3670432 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "M13 Reverse Primer" "@N" 1 15.4719 -5.22699 +COMMENT 0 -10 9.16634 1.12394 #257#) +COMMENT #259=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #202# 27011784 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.90974 1.9 +COMMENT 0.082322 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 26979404 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pSilencer2.1-f" +COMMENT "@N" 1 8.17551 15.681 0 -10 6.21912 1.12394 +COMMENT #259#) +COMMENT #261=(CScratch +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #202# 1003 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.39308 1.9 +COMMENT 0.082322 1) +COMMENT #262=(CLabel (CWidget 0 (0 0) 1 2 0 0 #194# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "M13 Reverse primer" "@N" 1 -12.8932 -10.454 +COMMENT 0 -10 9.09141 1.12394 #261#) +COMMENT #263=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #202# 530 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.53223 1.9 +COMMENT 0.082322 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 28168080 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pSilencer2.1-r" +COMMENT "@N" 1 14.7396 1.74233 0 -10 6.29405 1.12394 +COMMENT #263#)) (CObjectList)) +COMMENT #265=(CGroupWidget +COMMENT (CWidget 29 (7 29 0) 1 2 0 0 Nil -248 100) +COMMENT (CObjectList +COMMENT #266=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0.235468 0.651377 +COMMENT 1 0.082322) 0.8 1.8 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 6862024 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SV40 Promoter" +COMMENT "@N" 1 -9.01399 12.1963 0 -10 6.6687 1.12394 +COMMENT #266#) +COMMENT #268=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #198# 3670504 +COMMENT 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.23405 +COMMENT 5.66148 1 0.082322) 0.8 1.8 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 26411556 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "U6 promoter" +COMMENT "@N" 1 14.5544 0 0 -10 5.59471 1.12394 #268#)) +COMMENT (CObjectList)) +COMMENT #270=(CGroupWidget (CWidget 30 (7 30 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #271=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 4 128) 6 0.670712 5.17775 5.26501) +COMMENT 0.4 0.082322 0.750712 1.8 1.8 1) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 28301012 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T7 Promoter" +COMMENT "@N" 1 14.1162 -3.48466 0 -10 5.59471 1.12394 +COMMENT #271#)) (CObjectList)) +COMMENT #273=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1120 100) +COMMENT (CObjectList +COMMENT #274=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #197# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.68047 4.8143 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 1414812743 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1 origin" +COMMENT "@N" 1 13.8792 -10.454 0 -10 5.54476 1.12394 +COMMENT #274#)) (CObjectList)) +COMMENT #276=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #277=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #202# 26307160 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.75106 1.9 +COMMENT 0.082322 1) +COMMENT #278=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 28336156 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "Pol III terminator" "@N" 1 10.0613 10.454 0 +COMMENT -10 7.34306 1.12394 #277#)) (CObjectList))) +COMMENT (CObjectList)) +COMMENT #279=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1227 100) +COMMENT (CObjectList +COMMENT #280=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1506 100) +COMMENT (CObjectList +COMMENT #281=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #201# 27004336 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.66148 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3670640 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (479)" "@N (@S)" 5 13.9594 +COMMENT 3.48466 0 -10 4.92035 0.949103 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -945 100) +COMMENT (CObjectList +COMMENT #284=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.76258 1.9 +COMMENT 0.082322 1) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3670640 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (400)" "@N (@S)" 5 9.24914 +COMMENT 12.1963 0 -10 4.84542 0.949103 #284#)) +COMMENT (CObjectList)) +COMMENT #286=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -666 100) +COMMENT (CObjectList +COMMENT #287=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.33549 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3670640 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (3078)" "@N (@S)" 5 -11.1907 +COMMENT -8.71165 0 -10 4.24599 0.949103 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #201# 527 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.600188 1.9 +COMMENT 0.082322 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 26331280 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (4434)" "@N (@S)" 5 -9.69496 +COMMENT 10.454 0 -10 4.67059 0.949103 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 1 (10 #14# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #293=(CScratch +COMMENT (CWidget 1 (1 #14# 1) 1 2 0 0 #201# 536 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.624503 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3670792 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sma}I (4415)" "@N (@S)" 5 -10.9406 +COMMENT 8.71165 0 -10 4.62063 0.949103 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 1 (10 #15# 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 1 (1 #15# 1) 1 2 0 0 #201# 26470872 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.627063 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 26739268 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xma}I (4413)" "@N (@S)" 5 -12.3835 +COMMENT 6.96932 0 -10 4.72054 0.949103 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #201# 26983048 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.65178 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3670736 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (1268)" "@N (@S)" 5 14.7206 +COMMENT -8.71165 0 -10 4.5457 0.949103 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -457 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #201# 530 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.43093 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3670744 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2222)" "@N (@S)" 5 6.45029 +COMMENT -13.9386 0 -10 4.49575 0.949103 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 1 (10 #23# 0) 1 2 0 0 Nil -387 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 1 (1 #23# 1) 1 2 0 0 #201# 1003 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.80023 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 26862796 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sap}I (1152)" "@N (@S)" 5 14.3302 +COMMENT -6.96932 0 -10 4.29594 0.949103 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.706405 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 3670640 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (4351)" "@N (@S)" 5 -13.187 +COMMENT 5.22699 0 -10 4.49575 0.949103 #308#) +COMMENT #310=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #201# 27005376 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.0831818 1.9 +COMMENT 0.082322 1) +COMMENT #311=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 28435692 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (4838)" "@N (@S)" 5 -4.45263 +COMMENT 22.6503 0 -10 4.62063 0.949103 #310#)) +COMMENT (CObjectList)) +COMMENT #312=(CGroupWidget +COMMENT (CWidget 2 (10 #10# 0) 1 2 0 0 Nil 196613 100) +COMMENT (CObjectList +COMMENT #313=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #201# 26558560 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.23533 1.9 +COMMENT 0.082322 1) +COMMENT #314=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 3670664 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Eco}RI (812)" "@N (@S)" 5 14.0601 +COMMENT -1.74233 0 -10 4.42082 0.949103 #313#) +COMMENT #315=(CScratch +COMMENT (CWidget 2 (1 #10# 2) 1 2 0 0 #201# 530 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.993062 1.9 +COMMENT 0.082322 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 26432620 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Eco}RI (4127)" "@N (@S)" 5 -13.9158 +COMMENT 3.48466 0 -10 4.92035 0.949103 #315#)) +COMMENT (CObjectList)) +COMMENT #317=(CGroupWidget +COMMENT (CWidget 2 (10 #11# 0) 1 2 0 0 Nil 26432844 100) +COMMENT (CObjectList +COMMENT #318=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #201# 28267768 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.362161 1.9 +COMMENT 0.082322 1) +COMMENT #319=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 27005668 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Nsi}I (4620)" "@N (@S)" 5 -7.32639 +COMMENT 15.681 0 -10 4.29594 0.949103 #318#) +COMMENT #320=(CScratch +COMMENT (CWidget 2 (1 #11# 2) 1 2 0 0 #201# 26996696 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.270021 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 26323140 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Nsi}I (4692)" "@N (@S)" 5 -6.38397 +COMMENT 19.1656 0 -10 4.29594 0.949103 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 2 (10 #12# 0) 1 2 0 0 Nil 26424604 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #201# 507 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.36472 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 393227 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bfr}BI (4618)" "@N (@S)" 5 -7.45312 +COMMENT 13.9386 0 -10 4.67059 0.949103 #323#) +COMMENT #325=(CScratch +COMMENT (CWidget 2 (1 #12# 2) 1 2 0 0 #201# 26475192 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.27258 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel (CWidget 0 (0 0) 1 2 0 0 #193# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bfr}BI (4690)" "@N (@S)" 5 -6.61428 +COMMENT 17.4233 0 -10 4.74552 0.949103 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 3 (10 #21# 0) 1 2 0 0 Nil -178 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #201# 26981928 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.91614 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 3670736 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pvu}I (280)" "@N (@S)" 5 7.34801 +COMMENT 17.4233 0 -10 3.99622 0.949103 #328#) +COMMENT #330=(CScratch +COMMENT (CWidget 2 (1 #21# 2) 1 2 0 0 #201# 27003856 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.03549 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 3670744 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pvu}I (2531)" "@N (@S)" 5 -4.16852 +COMMENT -12.1963 0 -10 4.37087 0.949103 #330#) +COMMENT #332=(CScratch +COMMENT (CWidget 3 (1 #21# 3) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.14023 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 26706484 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pvu}I (4012)" "@N (@S)" 5 -14.0165 +COMMENT 1.74233 0 -10 4.42082 0.949103 #332#)) +COMMENT (CObjectList)) +COMMENT #334=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #201# 530 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.73038 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel (CWidget 0 (0 0) 1 2 0 0 #193# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (1988)" "@N (@S)" 5 9.89083 +COMMENT -12.1963 0 -10 5.04523 0.949103 #335#) +COMMENT #337=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #201# 1003 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.194517 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 3670752 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4751)" "@N (@S)" 5 -5.8623 +COMMENT 20.908 0 -10 4.99528 0.949103 #337#) +COMMENT #339=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.0601468 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 3670760 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4856)" "@N (@S)" 5 -4.39246 +COMMENT 24.3926 0 -10 5.04523 0.949103 #339#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #341=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1573 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #342=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 1970431100 +COMMENT (CStringList) 1919973477 1769173861 (CObList))) +FEATURES Location/Qualifiers + CDS complement(3349..4374) + /vntifkey="4" + /label=Hygromycin + /note="Hygromycin resistance gene" + CDS complement(2088..2947) + /vntifkey="4" + /label=Ampicilin + /note="Ampicilin resistance gene" + promoter complement(4394..4718) + /vntifkey="29" + /label=SV40\Promoter + /note="SV40 early promoter" + polyA_signal complement(2968..3340) + /vntifkey="25" + /label=SV40\polyA + /note="SV40 early polyA signal" + rep_origin complement(1141..2026) + /vntifkey="33" + /label=ColE1\origin + /note="ColE1 origin" + primer 333..350 + /vntifkey="27" + /label=M13\Forward\(-40)\primer + primer 926..942 + /vntifkey="27" + /label=M13\Reverse\Primer + primer 285..303 + /vntifkey="27" + /label=pSilencer2.1-f + primer 3033..3049 + /vntifkey="27" + /label=M13\Reverse\primer + promoter complement(857..876) + /vntifkey="30" + /label=T7\Promoter + primer complement(580..602) + /vntifkey="27" + /label=pSilencer2.1-r + promoter complement(479..812) + /vntifkey="29" + /label=U6\promoter + terminator complement(409..414) + /vntifkey="43" + /label=Pol\III\terminator + misc_feature complement(415..433) + /vntifkey="21" + /label=EGFP\anti-sense + misc_feature complement(459..477) + /vntifkey="21" + /label=EGFP\sense\strand + misc_feature complement(434..458) + /vntifkey="21" + /label=Theophylline\aptamer +BASE COUNT 1204 a 1259 c 1240 g 1199 t +ORIGIN + 1 tcgcgcgttt cggtgatgac ggtgaaaacc tctgacacat gcagctcccg gagacggtca + 61 cagcttgtct gtaagcggat gccgggagca gacaagcccg tcagggcgcg tcagcgggtg + 121 ttggcgggtg tcggggctgg cttaactatg cggcatcaga gcagattgta ctgagagtgc + 181 accatatgcg gtgtgaaata ccgcacagat gcgtaaggag aaaataccgc atcaggcgcc + 241 attcgccatt caggctgcgc aactgttggg aagggcgatc ggtgcgggcc tcttcgctat + 301 tacgccagct ggcgaaaggg ggatgtgctg caaggcgatt aagttgggta acgccagggt + 361 tttcccagtc acgacgttgt aaaacgacgg ccagtgccaa gcttttccaa aaaaggcaag + 421 ctgaccctga agtctgccaa gggcctttcg gctggtatac ttcagggtca gcttgccgga + 481 tcccgcgtcc tttccacaag atatataaac ccaagaaatc gaaatacttt caagttacgg + 541 taagcatatg atagtccatt ttaaaacata attttaaaac tgcaaactac ccaagaaatt + 601 attactttct acgtcacgta ttttgtacta atatctttgt gtttacagtc aaattaattc + 661 taattatctc tctaacagcc ttgtatcgta tatgcaaata tgaaggaatc atgggaaata + 721 ggccctcttc ctgcccgacc ttggcgcgcg ctcggcgcgc ggtcacgctc cgtcacgtgg + 781 tgcgttttgc ctgcgcgtct ttccactggg gaattcatgc ttctcctccc tttagtgagg + 841 gtaattctct ctctctccct atagtgagtc gtattaattc cttctcttct atagtgtcac + 901 ctaaatcgtt gcaattcgta atcatgtcat agctgtttcc tgtgtgaaat tgttatccgc + 961 tcacaattcc acacaacata cgagccggaa gcataaagtg taaagcctgg ggtgcctaat + 1021 gagtgagcta actcacatta attgcgttgc gctcactgcc cgctttccag tcgggaaacc + 1081 tgtcgtgcca gctgcattaa tgaatcggcc aacgcgcggg gagaggcggt ttgcgtattg + 1141 ggcgctcttc cgcttcctcg ctcactgact cgctgcgctc ggtcgttcgg ctgcggcgag + 1201 cggtatcagc tcactcaaag gcggtaatac ggttatccac agaatcaggg gataacgcag + 1261 gaaagaacat gtgagcaaaa ggccagcaaa aggccaggaa ccgtaaaaag gccgcgttgc + 1321 tggcgttttt ccataggctc cgcccccctg acgagcatca caaaaatcga cgctcaagtc + 1381 agaggtggcg aaacccgaca ggactataaa gataccaggc gtttccccct ggaagctccc + 1441 tcgtgcgctc tcctgttccg accctgccgc ttaccggata cctgtccgcc tttctccctt + 1501 cgggaagcgt ggcgctttct catagctcac gctgtaggta tctcagttcg gtgtaggtcg + 1561 ttcgctccaa gctgggctgt gtgcacgaac cccccgttca gcccgaccgc tgcgccttat + 1621 ccggtaacta tcgtcttgag tccaacccgg taagacacga cttatcgcca ctggcagcag + 1681 ccactggtaa caggattagc agagcgaggt atgtaggcgg tgctacagag ttcttgaagt + 1741 ggtggcctaa ctacggctac actagaagaa cagtatttgg tatctgcgct ctgctgaagc + 1801 cagttacctt cggaaaaaga gttggtagct cttgatccgg caaaaaaacc accgctggta + 1861 gcggtggttt ttttgtttgc aagcagcaga ttacgcgcag aaaaaaagga tctcaagaag + 1921 atcctttgat cttttctacg gggtctgacg ctcagtggaa cgaaaactca cgttaaggga + 1981 ttttggtcat gagattatca aaaaggatct tcacctagat ccttttaaat taaaaatgaa + 2041 gttttaaatc aatctaaagt atatatgagt aaacttggtc tgacagttac caatgcttaa + 2101 tcagtgaggc acctatctca gcgatctgtc tatttcgttc atccatagtt gcctgactcc + 2161 ccgtcgtgta gataactacg atacgggagg gcttaccatc tggccccagt gctgcaatga + 2221 taccgcgaga cccacgctca ccggctccag atttatcagc aataaaccag ccagccggaa + 2281 gggccgagcg cagaagtggt cctgcaactt tatccgcctc catccagtct attaattgtt + 2341 gccgggaagc tagagtaagt agttcgccag ttaatagttt gcgcaacgtt gttgccattg + 2401 ctacaggcat cgtggtgtca cgctcgtcgt ttggtatggc ttcattcagc tccggttccc + 2461 aacgatcaag gcgagttaca tgatccccca tgttgtgcaa aaaagcggtt agctccttcg + 2521 gtcctccgat cgttgtcaga agtaagttgg ccgcagtgtt atcactcatg gttatggcag + 2581 cactgcataa ttctcttact gtcatgccat ccgtaagatg cttttctgtg actggtgagt + 2641 actcaaccaa gtcattctga gaatagtgta tgcggcgacc gagttgctct tgcccggcgt + 2701 caatacggga taataccgcg ccacatagca gaactttaaa agtgctcatc attggaaaac + 2761 gttcttcggg gcgaaaactc tcaaggatct taccgctgtt gagatccagt tcgatgtaac + 2821 ccactcgtgc acccaactga tcttcagcat cttttacttt caccagcgtt tctgggtgag + 2881 caaaaacagg aaggcaaaat gccgcaaaaa agggaataag ggcgacacgg aaatgttgaa + 2941 tactcatact cttccttttt caatattcag gcttaccttt atgcttccgg ctcgtatgtt + 3001 gtgtggaatt gtgagcggat aacaatttca cacaggaaac agctatgacc atgattacgc + 3061 caagctctag ctagaggtcg acggtataca gacatgataa gatacattga tgagtttgga + 3121 caaaccacaa ctagaatgca gtgaaaaaaa tgctttattt gtgaaatttg tgatgctatt + 3181 gctttatttg taaccattat aagctgcaat aaacaagttg gggtgggcga agaactccag + 3241 catgagatcc ccgcgctgga ggatcatcca gccggcgtcc cggaaaacga ttccgaagcc + 3301 caacctttca tagaaggcgg cggtggaatc gaaatctcgt agcacgtgct attcctttgc + 3361 cctcggacga gtgctggggc gtcggtttcc actatcggcg agtacttcta cacagccatc + 3421 ggtccagacg gccgcgcttc tgcgggcgat ttgtgtacgc ccgacagtcc cggctccgga + 3481 tcggacgatt gcgtcgcatc gaccctgcgc ccaagctgca tcatcgaaat tgccgtcaac + 3541 caagctctga tagagttggt caagaccaat gcggagcata tacgcccgga gccgcggcga + 3601 tcctgcaagc tccggatgcc tccgctcgaa gtagcgcgtc tgctgctcca tacaagccaa + 3661 ccacggcctc cagaagaaga tgttggcgac ctcgtattgg gaatccccga acatcgcctc + 3721 gctccagtca atgaccgctg ttatgcggcc attgtccgtc aggacattgt tggagccgaa + 3781 atccgcgtgc acgaggtgcc ggacttcggg gcagtcctcg gcccaaagca tcagctcatc + 3841 gagagcctgc gcgacggacg cactgacggt gtcgtccatc acagtttgcc agtgatacac + 3901 atggggatca gcaatcgcgc atatgaaatc acgccatgta gtgtattgac cgattccttg + 3961 cggtccgaat gggccgaacc cgctcgtctg gctaagatcg gccgcagcga tcgcatccat + 4021 ggcctccgcg accggctgca gaacagcggg cagttcggtt tcaggcaggt cttgcaacgt + 4081 gacaccctgt gcacggcggg agatgcaata ggtcaggctc tcgctgaatt ccccaatgtc + 4141 aagcacttcc ggaatcggga gcgcggccga tgcaaagtgc cgataaacat aacgatcttt + 4201 gtagaaacca tcggcgcagc tatttacccg caggacatat ccacgccctc ctacatcgaa + 4261 gctgaaagca cgagattctt cgccctccga gagctgcatc aggtcggaga cgctgtcgaa + 4321 cttttcgatc agaaacttct cgacagacgt cgcggtgagt tcaggctttt tcatcacgtg + 4381 ctgatcagat ccgaaaatgg atatacaagc tcccgggagc tttttgcaaa agcctaggcc + 4441 tccaaaaaag cctccccact acttctggaa tagctcagag gcagaggcgg cctcggcctc + 4501 tgcataaata aaaaaaatta gtcagccatg gggcggagaa tgggcggaac tgggcggagt + 4561 taggggcggg atgggcggag ttaggggcgg gactatggtt gctgactaat tgagatgcat + 4621 gctttgcata cttctgcctg ctggggagcc tggggacttt ccacacctgg ttgctaacta + 4681 attgagatgc atgctttgca tacttctgcc tgctggaata ttattgaagc atttatcagg + 4741 gttattgtct catgagcgga tacatatttg aatgtattta gaaaaataaa caaatagggg + 4801 ttccgcgcac atttccccga aaagtgccac ctgacgtcta agaaaccatt attatcatga + 4861 cattaaccta taaaaatagg cgtatcacga ggccctttcg tc +// diff --git a/lib/VNTI files/pEGFP-N1.gb b/lib/VNTI files/pEGFP-N1.gb new file mode 100644 index 00000000..192ab502 --- /dev/null +++ b/lib/VNTI files/pEGFP-N1.gb @@ -0,0 +1,1315 @@ +LOCUS pEGFP-N1 4733 bp DNA circular 25-MAR-2005 +DEFINITION pEGFP-N1 from Clontech. +SOURCE + ORGANISM +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT VNTDATE|369931526| +COMMENT VNTDBDATE|369933231| +COMMENT LSOWNER| +COMMENT VNTNAME|pEGFP-N1| +COMMENT VNTAUTHORNAME|Demo User| +COMMENT VNTREPLTYPE|Plasmid +COMMENT VNTEXTCHREPL|Bacteria +COMMENT VNTEXTCHREPL|Animal/Other Eukaryotic +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pEGFP-N1" 0 4733 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4733 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 661 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 2598 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 650 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1412 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 623 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 621 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 640 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 4 126 0 179 0 262 0 448 0 +COMMENT 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 2 2580 0 3595 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 630 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 3 2330 0 2402 0 4733 0 0 +COMMENT "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 3 2328 0 2400 0 4731 0 0 +COMMENT "") #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 1 4362 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 1 659 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 1 657 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 4676 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 596 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 592 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 614 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 1 658 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3747 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 2 3102 1 3312 1 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 2 2184 0 3956 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 1 610 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "PCMV" 29 0 0 1 589 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #28=(CFSignal (CObList) "MCS" 21 0 0 591 671 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #29=(CFSignal (CObList) "EGFP" 4 0 0 679 1398 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #30=(CFSignal (CObList) "Transcription Start" 21 0 0 583 583 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #31=(CFSignal (CObList) "SV40 poly A" 25 0 0 1552 1557 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #32=(CFSignal (CObList) "SV40 polyA" 25 0 0 1581 1586 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #33=(CFSignal (CObList) "f1 ori" 21 0 0 1649 2104 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #34=(CFSignal (CObList) "SV40 ori" 33 0 0 2445 2580 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #35=(CFSignal (CObList) "kanR/neoR" 4 0 0 2629 3423 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #36=(CFSignal (CObList) "pUC ori" 33 0 0 4008 4651 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #37=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #38=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pEGFP-N1" 2) 5 "" +COMMENT 0 4) +COMMENT #39=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #40=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pEGFP-N1'" 1) +COMMENT #41=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "pEGFP-N1 from Clontech" 1) +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Demo User" 1) +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 03/25/05 02:45PM" 1) +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 03/25/05 03:13PM" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4733 bp" 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) (CObjectList)) +COMMENT "Standard Fields") +COMMENT #49=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "Demo User" +COMMENT 1))) "Original Author") +COMMENT #51=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #55=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 679 (3 #29# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #56=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 679 End: 1398" 1))) "EGFP") +COMMENT #57=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2629 (3 #35# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #58=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2629 End: 3423" 1))) +COMMENT "kanR/neoR"))) "CDS (2 total)") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #60=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 583 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #61=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 583 End: 583 " 1))) +COMMENT "Transcription Start") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 591 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #63=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 591 End: 671 " 1))) "MCS") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1649 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1649 End: 2104" 1))) "f1 ori"))) +COMMENT "Misc. Feature (3 total)") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 25 (7 25 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1552 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1552 End: 1557" 1))) +COMMENT "SV40 poly A") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1581 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1581 End: 1586" 1))) +COMMENT "SV40 polyA"))) "PolyA Signal (2 total)") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 29 (7 29 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1 End: 589 " 1))) "PCMV"))) +COMMENT "Promoter Eukaryotic (1 total)") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #75=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2445 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2445 End: 2580" 1))) "SV40 ori") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4008 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4008 End: 4651" 1))) "pUC ori"))) +COMMENT "Replication Origin (2 total)"))) "Feature Map") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #80=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25555200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 4 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #81=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #82=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 4676 " 1))))) "AflIII: 1 site") 1 +COMMENT 5 "ACRYGT" "TGYRCA") +COMMENT #84=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #85=(CGroupPar +COMMENT (CParagraph 0 (10 #20# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (1 #20# 1) 1 2 2 0 191) +COMMENT " N1: 658 " 1))))) "ApaI: 1 site") 5 1 +COMMENT "GGGCCC" "CCCGGG") +COMMENT #87=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25542256 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #88=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 4362 " 1))))) "ApaLI: 1 site") 1 5 +COMMENT "GTGCAC" "CACGTG") +COMMENT #90=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25554800 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #91=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2580 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (1 #9# 2) 1 2 2 0 191) +COMMENT " N2: 3595 " 1))))) "AvrII: 2 sites") 1 +COMMENT 5 "CCTAGG" "GGATCC") +COMMENT #94=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25539936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #95=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 661 " 1))))) "BamHI: 1 site") 1 5 +COMMENT "GGATCC" "CCTAGG") +COMMENT #97=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25313048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 "GAAGACNNNNNNN" +COMMENT "CTTCTGNNNNNNN") +COMMENT #98=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25542336 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #99=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 2328 " 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (1 #12# 2) 1 2 2 0 191) +COMMENT " N2: 2400 " 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (1 #12# 3) 1 2 2 0 191) +COMMENT " N3: 4731 " 1))))) "BfrBI: 3 sites") 3 +COMMENT 3 "ATGCAT" "TACGTA") +COMMENT #103=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21397432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #104=(CGroupPar +COMMENT (CParagraph 0 (10 #26# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (1 #26# 1) 1 2 2 0 191) +COMMENT " N1: 610 " 1))))) "BglII: 1 site") 1 +COMMENT 5 "AGATCT" "TCTAGA") +COMMENT #106=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312408 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #107=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 596 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #109=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #110=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3747 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #112=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #113=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 2184 " 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 3956 " 1))))) "BspHI: 2 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #116=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25539856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #117=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 2598 " 1))))) "ClaI: 1 site") 2 +COMMENT 4 "ATCGAT" "TAGCTA") +COMMENT #119=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25549352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 630 " 1))))) "EcoRI: 1 site") 1 +COMMENT 5 "GAATTC" "CTTAAG") +COMMENT #122=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25555600 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #123=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 623 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #125=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25555760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #126=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 650 " 1))))) "KpnI: 1 site") 5 +COMMENT 1 "GGTACC" "CCATGG") +COMMENT #128=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312488 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 592 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #131=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25549272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #132=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 2330 " 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #11# 2) 1 2 2 0 191) +COMMENT " N2: 2402 " 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (1 #11# 3) 1 2 2 0 191) +COMMENT " N3: 4733 " 1))))) "NsiI: 3 sites") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #136=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 0 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #137=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25555520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #138=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 621 " 1))))) "SacI: 1 site") 5 +COMMENT 1 "GAGCTC" "CTCGAG") +COMMENT #140=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25555280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #141=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 640 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #143=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CGroupPar +COMMENT (CParagraph 0 (10 #23# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (1 #23# 1) 1 2 2 0 191) +COMMENT " N1: 3102 (on complementary strand)" +COMMENT 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (1 #23# 2) 1 2 2 0 191) +COMMENT " N2: 3312 (on complementary strand)" +COMMENT 1))))) "SapI: 2 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #147=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25540096 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #148=(CGroupPar +COMMENT (CParagraph 0 (10 #14# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (1 #14# 1) 1 2 2 0 191) +COMMENT " N1: 659 " 1))))) "SmaI: 1 site") 3 +COMMENT 3 "CCCGGG" "GGGCCC") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25555680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #151=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1412 " 1))))) "XbaI: 1 site") 1 +COMMENT 5 "TCTAGA" "AGATCT") +COMMENT #153=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312568 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #154=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 614 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #157=(CGroupPar +COMMENT (CParagraph 0 (10 #15# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #15# 1) 1 2 2 0 191) +COMMENT " N1: 657 " 1))))) "XmaI: 1 site") 1 +COMMENT 5 "CCCGGG" "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #159=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #160=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #161=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #162=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #163=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #164=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #165=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #166=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #167=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #168=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #169=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #170=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #171=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #172=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #173=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #174=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #175=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #176=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #177=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #178=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #179=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #180=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #181=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #182=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #183=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #184=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #185=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #186=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #187=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #188=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #189=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #190=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #191=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #192=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #193=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #194=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #195=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #196=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #197=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #198=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (33 (CShapeMapEntry 0 "Shape 5" 1 "Signal Label") 70 +COMMENT (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 18.6929 -23.1337 40.0378 40.0378 0.01 10 -1 4733 4733 1 0 0) +COMMENT #199=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -945 100) +COMMENT (CObjectList +COMMENT #200=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -920 100) +COMMENT (CObjectList +COMMENT #201=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #165# 25176188 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27551 6.27351 1 0.0214037) 0.132541) +COMMENT #202=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #162# 1413695303 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pEGFP-N1" "@N" 1 0 0.871165 0 +COMMENT -10 5.54476 1.47361 Nil) +COMMENT #203=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #161# 25554324 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4733 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.949103 Nil)) (CObjectList)) +COMMENT #204=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1154 100) +COMMENT (CObjectList +COMMENT #205=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #206=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #163# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 4.42026 5.37455 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #207=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #160# 1195852609 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "EGFP" "@N" 1 +COMMENT 13.4753 -8.71165 0 -10 2.42271 1.12394 #206#) +COMMENT #208=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #163# 25432620 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.73629 2.79 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #209=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #160# 3736152 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "kanR/neoR" "@N" +COMMENT 1 -12.3574 -6.96932 0 -10 4.59566 1.12394 +COMMENT #208#)) (CObjectList)) +COMMENT #210=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -666 100) +COMMENT (CObjectList +COMMENT #211=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #164# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 5.38383 5.49119 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #212=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #160# 25555236 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "MCS" "@N" 1 +COMMENT 12.5481 3.48466 0 -10 1.97314 1.12394 #211#) +COMMENT #213=(CScratch +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #168# 2162697 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.50179 1.9 +COMMENT 0.082322 1) +COMMENT #214=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #160# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "Transcription Start" "@N" 1 13.2705 17.4233 +COMMENT 0 -10 7.79264 1.12394 #213#) +COMMENT #215=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #164# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 3.48451 4.0889 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #216=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #160# 25427980 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "f1 ori" "@N" 1 +COMMENT 9.23894 -15.681 0 -10 2.2229 1.12394 #215#)) +COMMENT (CObjectList)) +COMMENT #217=(CGroupWidget +COMMENT (CWidget 25 (7 25 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #218=(CScratch +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #179# 26588160 +COMMENT 100) (LOGPEN 0 6 32768) 8 1 4.21747 1.9 +COMMENT 0.082322 1) +COMMENT #219=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #160# 25534844 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SV40 poly A" +COMMENT "@N" 1 13.8049 -12.1963 0 -10 5.09519 1.12394 +COMMENT #218#) +COMMENT #220=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #179# 26584800 +COMMENT 100) (LOGPEN 0 6 32768) 8 1 4.17903 1.9 +COMMENT 0.082322 1) +COMMENT #221=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #160# 3798828 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SV40 polyA" +COMMENT "@N" 1 13.5897 -13.9386 0 -10 4.84542 1.12394 +COMMENT #220#)) (CObjectList)) +COMMENT #222=(CGroupWidget +COMMENT (CWidget 29 (7 29 0) 1 2 0 0 Nil -1084 100) +COMMENT (CObjectList +COMMENT #223=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #164# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.49252 +COMMENT 6.27319 1 0.082322) 0.8 1.8 0) +COMMENT #224=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #160# 25499092 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PCMV" "@N" 1 +COMMENT 7.0465 19.1656 0 -10 2.54759 1.12394 #223#)) +COMMENT (CObjectList)) +COMMENT #225=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil 393222 100) +COMMENT (CObjectList +COMMENT #226=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #194# 0 100) +COMMENT (LOGPEN 0 2 0) 3 (LOGBRUSH 0 16777113 0) 1 +COMMENT 2.85362 3.03387 1 0.082322) 0.8 1.8 0) +COMMENT #227=(CLabel (CWidget 0 (0 0) 1 2 0 0 #160# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SV40 ori" "@N" +COMMENT 1 -4.86222 -12.1963 0 -10 3.54665 1.12394 +COMMENT #226#) +COMMENT #228=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #194# 26754824 +COMMENT 100) (LOGPEN 0 2 0) 3 +COMMENT (LOGBRUSH 0 16777113 0) 1 0.108684 0.962251 +COMMENT 1 0.082322) 0.8 1.8 0) +COMMENT #229=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #160# 3736016 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pUC ori" "@N" 1 +COMMENT -10.2698 8.71165 0 -10 3.172 1.12394 #228#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #230=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1573 100) +COMMENT (CObjectList +COMMENT #231=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1712 100) +COMMENT (CObjectList +COMMENT #232=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #167# 26586480 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.39841 1.9 +COMMENT 0.082322 1) +COMMENT #233=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 26794484 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (661)" "@N (@S)" 5 12.5752 +COMMENT -6.96932 0 -10 5.09519 0.949103 #232#)) +COMMENT (CObjectList)) +COMMENT #234=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil 393223 100) +COMMENT (CObjectList +COMMENT #235=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #167# 26580512 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.83108 1.9 +COMMENT 0.082322 1) +COMMENT #236=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 25179276 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (2598)" "@N (@S)" 5 -10.8971 +COMMENT -8.71165 0 -10 4.5457 0.949103 #235#)) +COMMENT (CObjectList)) +COMMENT #237=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil 5439490 100) +COMMENT (CObjectList +COMMENT #238=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #167# 26587840 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.41299 1.9 +COMMENT 0.082322 1) +COMMENT #239=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 3736128 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (650)" "@N (@S)" 5 14.1014 0 0 +COMMENT -10 4.42082 0.949103 #238#)) (CObjectList)) +COMMENT #240=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 25012752 100) +COMMENT (CObjectList +COMMENT #241=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #167# 26612336 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.40303 1.9 +COMMENT 0.082322 1) +COMMENT #242=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 3736184 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1412)" "@N (@S)" 5 14.2947 +COMMENT -10.454 0 -10 4.74552 0.949103 #241#)) +COMMENT (CObjectList)) +COMMENT #243=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #244=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #167# 26607208 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.44878 1.9 +COMMENT 0.082322 1) +COMMENT #245=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 26803736 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (623)" "@N (@S)" 5 12.6623 +COMMENT 6.96932 0 -10 5.41988 0.949103 #244#)) +COMMENT (CObjectList)) +COMMENT #246=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #247=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #167# 26601752 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.45143 1.9 +COMMENT 0.082322 1) +COMMENT #248=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 3736192 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (621)" "@N (@S)" 5 11.3134 +COMMENT 8.71165 0 -10 4.09613 0.949103 #247#)) +COMMENT (CObjectList)) +COMMENT #249=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #250=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #167# 26593344 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.42625 1.9 +COMMENT 0.082322 1) +COMMENT #251=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 3736192 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (640)" "@N (@S)" 5 13.8423 +COMMENT 1.74233 0 -10 4.04618 0.949103 #250#)) +COMMENT (CObjectList)) +COMMENT #252=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #253=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #167# 504 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.4395 1.9 0.082322 +COMMENT 1) +COMMENT #254=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 25357636 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (630)" "@N (@S)" 5 13.3003 +COMMENT 5.22699 0 -10 4.8704 0.949103 #253#)) +COMMENT (CObjectList)) +COMMENT #255=(CGroupWidget +COMMENT (CWidget 1 (10 #13# 0) 1 2 0 0 Nil 3736000 100) +COMMENT (CObjectList +COMMENT #256=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #167# 26583920 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.493054 1.9 +COMMENT 0.082322 1) +COMMENT #257=(CLabel (CWidget 0 (0 0) 1 2 0 0 #169# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Apa}LI (4362)" "@N (@S)" 5 -9.06087 +COMMENT 10.454 0 -10 5.41988 0.949103 #256#)) +COMMENT (CObjectList)) +COMMENT #258=(CGroupWidget +COMMENT (CWidget 1 (10 #14# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #259=(CScratch +COMMENT (CWidget 1 (1 #14# 1) 1 2 0 0 #167# 26591024 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.40106 1.9 +COMMENT 0.082322 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 3736272 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sma}I (659)" "@N (@S)" 5 13.1696 +COMMENT -5.22699 0 -10 4.49575 0.949103 #259#)) +COMMENT (CObjectList)) +COMMENT #261=(CGroupWidget +COMMENT (CWidget 1 (10 #15# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #262=(CScratch +COMMENT (CWidget 1 (1 #15# 1) 1 2 0 0 #167# 25588256 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.40371 1.9 +COMMENT 0.082322 1) +COMMENT #263=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 25315500 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xma}I (657)" "@N (@S)" 5 14.1036 +COMMENT -1.74233 0 -10 4.67059 0.949103 #262#)) +COMMENT (CObjectList)) +COMMENT #264=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #265=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #167# 25588576 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.076874 1.9 +COMMENT 0.082322 1) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 3736144 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (4676)" "@N (@S)" 5 -4.09879 +COMMENT 12.1963 0 -10 5.22007 0.949103 #265#)) +COMMENT (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #268=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #167# 26577952 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.48456 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 3736288 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (596)" "@N (@S)" 5 11.5866 +COMMENT 13.9386 0 -10 4.37087 0.949103 #268#)) +COMMENT (CObjectList)) +COMMENT #270=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #271=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #167# 25557736 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.48987 1.9 +COMMENT 0.082322 1) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 25206436 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (592)" "@N (@S)" 5 11.6184 15.681 +COMMENT 0 -10 4.37087 0.949103 #271#)) (CObjectList)) +COMMENT #273=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #274=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #167# 26584720 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.46071 1.9 +COMMENT 0.082322 1) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 3736296 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (614)" "@N (@S)" 5 11.4721 10.454 +COMMENT 0 -10 4.29594 0.949103 #274#)) (CObjectList)) +COMMENT #276=(CGroupWidget +COMMENT (CWidget 1 (10 #20# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #277=(CScratch +COMMENT (CWidget 1 (1 #20# 1) 1 2 0 0 #167# 26604888 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.40239 1.9 +COMMENT 0.082322 1) +COMMENT #278=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 3736304 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Apa}I (658)" "@N (@S)" 5 13.6545 +COMMENT -3.48466 0 -10 4.42082 0.949103 #277#)) +COMMENT (CObjectList)) +COMMENT #279=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #280=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #167# 26597912 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.30818 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 3736328 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3747)" "@N (@S)" 5 -13.8753 +COMMENT 3.48466 0 -10 4.79547 0.949103 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 1 (10 #26# 0) 1 2 0 0 Nil 25357860 100) +COMMENT (CObjectList +COMMENT #283=(CScratch +COMMENT (CWidget 1 (1 #26# 1) 1 2 0 0 #167# 26588640 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.46601 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #169# 24977692 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bgl}II (610)" "@N (@S)" 5 11.5809 +COMMENT 12.1963 0 -10 4.42082 0.949103 #283#)) +COMMENT (CObjectList)) +COMMENT #285=(CGroupWidget +COMMENT (CWidget 2 (10 #9# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #286=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #167# 26605048 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.85494 1.9 +COMMENT 0.082322 1) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 453 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Avr}II (2580)" "@N (@S)" 5 -8.93019 +COMMENT -10.454 0 -10 5.22007 0.949103 #286#) +COMMENT #288=(CScratch +COMMENT (CWidget 2 (1 #9# 2) 1 2 0 0 #167# 26588720 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.50965 1.9 +COMMENT 0.082322 1) +COMMENT #289=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 26946468 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Avr}II (3595)" "@N (@S)" 5 -14.354 0 0 +COMMENT -10 5.17011 0.949103 #288#)) (CObjectList)) +COMMENT #290=(CGroupWidget +COMMENT (CWidget 2 (10 #23# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #291=(CScratch +COMMENT (CWidget 1 (1 #23# 1) 1 2 0 0 #167# 26591584 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.16308 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 3736328 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (3102)" "@N (@S)" 5 -13.2393 +COMMENT -5.22699 0 -10 4.74552 0.949103 #291#) +COMMENT #293=(CScratch +COMMENT (CWidget 2 (1 #23# 2) 1 2 0 0 #167# 26605848 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.88474 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 3736352 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (3312)" "@N (@S)" 5 -13.7677 +COMMENT -3.48466 0 -10 4.67059 0.949103 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 2 (10 #24# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #167# 26604808 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.37981 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 25380404 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2184)" "@N (@S)" 5 6.41645 +COMMENT -17.4233 0 -10 5.22007 0.949103 #296#) +COMMENT #298=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #167# 26603688 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.03117 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 1046 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (3956)" "@N (@S)" 5 -13.18 +COMMENT 6.96932 0 -10 5.295 0.949103 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 3 (10 #11# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #301=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #167# 26580432 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.1863 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 25104416 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Nsi}I (2330)" "@N (@S)" 5 3.89099 +COMMENT -20.908 0 -10 4.59566 0.949103 #301#) +COMMENT #303=(CScratch +COMMENT (CWidget 2 (1 #11# 2) 1 2 0 0 #167# 26593904 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.09087 1.9 +COMMENT 0.082322 1) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 25316336 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Nsi}I (2402)" "@N (@S)" 5 -3.75391 +COMMENT -13.9386 0 -10 4.59566 0.949103 #303#) +COMMENT #305=(CScratch +COMMENT (CWidget 3 (1 #11# 3) 1 2 0 0 #167# 26578032 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 6.27319 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 25121288 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Nsi}I (4733)" "@N (@S)" 5 3.43201 +COMMENT 20.908 0 -10 4.59566 0.949103 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 3 (10 #12# 0) 1 2 0 0 Nil 24880264 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #167# 25216064 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.18895 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 3736256 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bfr}BI (2328)" "@N (@S)" 5 4.10478 +COMMENT -19.1656 0 -10 4.92035 0.949103 #308#) +COMMENT #310=(CScratch +COMMENT (CWidget 2 (1 #12# 2) 1 2 0 0 #167# 26584480 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.09352 1.9 +COMMENT 0.082322 1) +COMMENT #311=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 24509748 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bfr}BI (2400)" "@N (@S)" 5 -4.05099 +COMMENT -15.681 0 -10 5.04523 0.949103 #310#) +COMMENT #312=(CScratch +COMMENT (CWidget 3 (1 #12# 3) 1 2 0 0 #167# 26579312 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.00397624 +COMMENT 1.9 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #159# 25001564 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bfr}BI (4731)" "@N (@S)" 5 -3.28142 +COMMENT 13.9386 0 -10 4.92035 0.949103 #312#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #314=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 1195459412 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #315=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3736016 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21695624 (CObList))) +FEATURES Location/Qualifiers + promoter 1..589 + /vntifkey="29" + /label=PCMV + misc_feature 591..671 + /vntifkey="21" + /label=MCS + CDS 679..1398 + /vntifkey="4" + /label=EGFP + misc_feature 583..583 + /vntifkey="21" + /label=Transcription\Start + polyA_signal 1552..1557 + /vntifkey="25" + /label=SV40\poly\A + polyA_signal 1581..1586 + /vntifkey="25" + /label=SV40\polyA + misc_feature 1649..2104 + /vntifkey="21" + /label=f1\ori + rep_origin 2445..2580 + /vntifkey="33" + /label=SV40\ori + CDS 2629..3423 + /vntifkey="4" + /label=kanR/neoR + rep_origin 4008..4651 + /vntifkey="33" + /label=pUC\ori +BASE COUNT 1140 a 1285 c 1246 g 1062 t +ORIGIN + 1 tagttattaa tagtaatcaa ttacggggtc attagttcat agcccatata tggagttccg + 61 cgttacataa cttacggtaa atggcccgcc tggctgaccg cccaacgacc cccgcccatt + 121 gacgtcaata atgacgtatg ttcccatagt aacgccaata gggactttcc attgacgtca + 181 atgggtggag tatttacggt aaactgccca cttggcagta catcaagtgt atcatatgcc + 241 aagtacgccc cctattgacg tcaatgacgg taaatggccc gcctggcatt atgcccagta + 301 catgacctta tgggactttc ctacttggca gtacatctac gtattagtca tcgctattac + 361 catggtgatg cggttttggc agtacatcaa tgggcgtgga tagcggtttg actcacgggg + 421 atttccaagt ctccacccca ttgacgtcaa tgggagtttg ttttggcacc aaaatcaacg + 481 ggactttcca aaatgtcgta acaactccgc cccattgacg caaatgggcg gtaggcgtgt + 541 acggtgggag gtctatataa gcagagctgg tttagtgaac cgtcagatcc gctagcgcta + 601 ccggactcag atctcgagct caagcttcga attctgcagt cgacggtacc gcgggcccgg + 661 gatccaccgg tcgccaccat ggtgagcaag ggcgaggagc tgttcaccgg ggtggtgccc + 721 atcctggtcg agctggacgg cgacgtaaac ggccacaagt tcagcgtgtc cggcgagggc + 781 gagggcgatg ccacctacgg caagctgacc ctgaagttca tctgcaccac cggcaagctg + 841 cccgtgccct ggcccaccct cgtgaccacc ctgacctacg gcgtgcagtg cttcagccgc + 901 taccccgacc acatgaagca gcacgacttc ttcaagtccg ccatgcccga aggctacgtc + 961 caggagcgca ccatcttctt caaggacgac ggcaactaca agacccgcgc cgaggtgaag + 1021 ttcgagggcg acaccctggt gaaccgcatc gagctgaagg gcatcgactt caaggaggac + 1081 ggcaacatcc tggggcacaa gctggagtac aactacaaca gccacaacgt ctatatcatg + 1141 gccgacaagc agaagaacgg catcaaggtg aacttcaaga tccgccacaa catcgaggac + 1201 ggcagcgtgc agctcgccga ccactaccag cagaacaccc ccatcggcga cggccccgtg + 1261 ctgctgcccg acaaccacta cctgagcacc cagtccgccc tgagcaaaga ccccaacgag + 1321 aagcgcgatc acatggtcct gctggagttc gtgaccgccg ccgggatcac tctcggcatg + 1381 gacgagctgt acaagtaaag cggccgcgac tctagatcat aatcagccat accacatttg + 1441 tagaggtttt acttgcttta aaaaacctcc cacacctccc cctgaacctg aaacataaaa + 1501 tgaatgcaat tgttgttgtt aacttgttta ttgcagctta taatggttac aaataaagca + 1561 atagcatcac aaatttcaca aataaagcat ttttttcact gcattctagt tgtggtttgt + 1621 ccaaactcat caatgtatct taaggcgtaa attgtaagcg ttaatatttt gttaaaattc + 1681 gcgttaaatt tttgttaaat cagctcattt tttaaccaat aggccgaaat cggcaaaatc + 1741 ccttataaat caaaagaata gaccgagata gggttgagtg ttgttccagt ttggaacaag + 1801 agtccactat taaagaacgt ggactccaac gtcaaagggc gaaaaaccgt ctatcagggc + 1861 gatggcccac tacgtgaacc atcaccctaa tcaagttttt tggggtcgag gtgccgtaaa + 1921 gcactaaatc ggaaccctaa agggagcccc cgatttagag cttgacgggg aaagccggcg + 1981 aacgtggcga gaaaggaagg gaagaaagcg aaaggagcgg gcgctagggc gctggcaagt + 2041 gtagcggtca cgctgcgcgt aaccaccaca cccgccgcgc ttaatgcgcc gctacagggc + 2101 gcgtcaggtg gcacttttcg gggaaatgtg cgcggaaccc ctatttgttt atttttctaa + 2161 atacattcaa atatgtatcc gctcatgaga caataaccct gataaatgct tcaataatat + 2221 tgaaaaagga agagtcctga ggcggaaaga accagctgtg gaatgtgtgt cagttagggt + 2281 gtggaaagtc cccaggctcc ccagcaggca gaagtatgca aagcatgcat ctcaattagt + 2341 cagcaaccag gtgtggaaag tccccaggct ccccagcagg cagaagtatg caaagcatgc + 2401 atctcaatta gtcagcaacc atagtcccgc ccctaactcc gcccatcccg cccctaactc + 2461 cgcccagttc cgcccattct ccgccccatg gctgactaat tttttttatt tatgcagagg + 2521 ccgaggccgc ctcggcctct gagctattcc agaagtagtg aggaggcttt tttggaggcc + 2581 taggcttttg caaagatcga tcaagagaca ggatgaggat cgtttcgcat gattgaacaa + 2641 gatggattgc acgcaggttc tccggccgct tgggtggaga ggctattcgg ctatgactgg + 2701 gcacaacaga caatcggctg ctctgatgcc gccgtgttcc ggctgtcagc gcaggggcgc + 2761 ccggttcttt ttgtcaagac cgacctgtcc ggtgccctga atgaactgca agacgaggca + 2821 gcgcggctat cgtggctggc cacgacgggc gttccttgcg cagctgtgct cgacgttgtc + 2881 actgaagcgg gaagggactg gctgctattg ggcgaagtgc cggggcagga tctcctgtca + 2941 tctcaccttg ctcctgccga gaaagtatcc atcatggctg atgcaatgcg gcggctgcat + 3001 acgcttgatc cggctacctg cccattcgac caccaagcga aacatcgcat cgagcgagca + 3061 cgtactcgga tggaagccgg tcttgtcgat caggatgatc tggacgaaga gcatcagggg + 3121 ctcgcgccag ccgaactgtt cgccaggctc aaggcgagca tgcccgacgg cgaggatctc + 3181 gtcgtgaccc atggcgatgc ctgcttgccg aatatcatgg tggaaaatgg ccgcttttct + 3241 ggattcatcg actgtggccg gctgggtgtg gcggaccgct atcaggacat agcgttggct + 3301 acccgtgata ttgctgaaga gcttggcggc gaatgggctg accgcttcct cgtgctttac + 3361 ggtatcgccg ctcccgattc gcagcgcatc gccttctatc gccttcttga cgagttcttc + 3421 tgagcgggac tctggggttc gaaatgaccg accaagcgac gcccaacctg ccatcacgag + 3481 atttcgattc caccgccgcc ttctatgaaa ggttgggctt cggaatcgtt ttccgggacg + 3541 ccggctggat gatcctccag cgcggggatc tcatgctgga gttcttcgcc caccctaggg + 3601 ggaggctaac tgaaacacgg aaggagacaa taccggaagg aacccgcgct atgacggcaa + 3661 taaaaagaca gaataaaacg cacggtgttg ggtcgtttgt tcataaacgc ggggttcggt + 3721 cccagggctg gcactctgtc gataccccac cgagacccca ttggggccaa tacgcccgcg + 3781 tttcttcctt ttccccaccc caccccccaa gttcgggtga aggcccaggg ctcgcagcca + 3841 acgtcggggc ggcaggccct gccatagcct caggttactc atatatactt tagattgatt + 3901 taaaacttca tttttaattt aaaaggatct aggtgaagat cctttttgat aatctcatga + 3961 ccaaaatccc ttaacgtgag ttttcgttcc actgagcgtc agaccccgta gaaaagatca + 4021 aaggatcttc ttgagatcct ttttttctgc gcgtaatctg ctgcttgcaa acaaaaaaac + 4081 caccgctacc agcggtggtt tgtttgccgg atcaagagct accaactctt tttccgaagg + 4141 taactggctt cagcagagcg cagataccaa atactgtcct tctagtgtag ccgtagttag + 4201 gccaccactt caagaactct gtagcaccgc ctacatacct cgctctgcta atcctgttac + 4261 cagtggctgc tgccagtggc gataagtcgt gtcttaccgg gttggactca agacgatagt + 4321 taccggataa ggcgcagcgg tcgggctgaa cggggggttc gtgcacacag cccagcttgg + 4381 agcgaacgac ctacaccgaa ctgagatacc tacagcgtga gctatgagaa agcgccacgc + 4441 ttcccgaagg gagaaaggcg gacaggtatc cggtaagcgg cagggtcgga acaggagagc + 4501 gcacgaggga gcttccaggg ggaaacgcct ggtatcttta tagtcctgtc gggtttcgcc + 4561 acctctgact tgagcgtcga tttttgtgat gctcgtcagg ggggcggagc ctatggaaaa + 4621 acgccagcaa cgcggccttt ttacggttcc tggccttttg ctggcctttt gctcacatgt + 4681 tctttcctgc gttatcccct gattctgtgg ataaccgtat taccgccatg cat +// diff --git a/lib/VNTI files/pINV-107bgfpuv.gb b/lib/VNTI files/pINV-107bgfpuv.gb new file mode 100644 index 00000000..7e13cfa3 --- /dev/null +++ b/lib/VNTI files/pINV-107bgfpuv.gb @@ -0,0 +1,1475 @@ +LOCUS pINV-107b/ 3756 bp DNA circular 10-FEB-2004 +SOURCE + ORGANISM +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|329658387| +COMMENT VNTDBDATE|329940042| +COMMENT LSOWNER| +COMMENT VNTNAME|pINV-107b/gfpuv| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTUDF|JM2.300 Cells|1|#1 / 17-18| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pINV-107b/gfpuv" 0 3756 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3756 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 553 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 2 763 0 3669 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 740 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 636 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 3644 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 2 6 0 767 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 3 1645 0 2143 0 3389 0 0 +COMMENT "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 355 0 1829 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 3679 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 3675 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 454 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3092 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 0 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 1 1713 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 2 2549 0 3557 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 949 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "SD_SEQ" 32 0 0 1260 1264 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1260..1264") +COMMENT #28=(CFSignal (CObList) "H_Y_EFF" 21 0 0 1366 1522 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1366..1522") +COMMENT #29=(CFSignal (CObList) "L_Y_EFF" 21 0 1 1706 1769 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(1706..1769)") +COMMENT #30=(CFSignal (CObList) "SD_SEQ" 32 0 1 3516 3520 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3516..3520)") +COMMENT #31=(CFSignal (CObList) "P3_P" 30 0 1 3543 3549 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3543..3549)") +COMMENT #32=(CFSignal (CObList) "ROP" 4 0 0 1270 1461 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1270..1461") +COMMENT #33=(CFSignal (CObList) "AP(R)" 4 0 1 2648 3511 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2648..3511)") +COMMENT #34=(CFSignal (CObList) "ColE1 ORI" 33 0 0 1862 2500 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1862..2500") +COMMENT #35=(CFSignal (CObList) "RBSII" 32 0 0 15 23 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "15..23") +COMMENT #36=(CFSignal (CObList) "-35 P(R)" 48 0 0 3717 3722 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3717..3722") +COMMENT #37=(CFSignal (CObList) "-35 P(RM)" 48 0 1 3699 3704 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3699..3704)") +COMMENT #38=(CFSignal (CObList) "cI OR2" 31 0 0 3703 3719 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3703..3719") +COMMENT #39=(CFSignal (CObList) "cI OR1" 31 0 0 3727 3743 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3727..3743") +COMMENT #40=(CFSignal (CObList) "-10 P(R)" 47 0 0 3740 3745 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3740..3745") +COMMENT #41=(CFSignal (CObList) "Lambda P(R-O12)" 30 0 0 3696 3755 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "3696..3755") +COMMENT #42=(CFSignal (CObList) "PR-rev" 28 0 1 3750 18 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3750..18)") +COMMENT #43=(CFSignal (CObList) "gfpuv" 4 0 0 33 749 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "33..749") +COMMENT #44=(CFSignal (CObList) "BsaI-PRO12-f annealing" 28 0 0 3685 3713 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "BsaI-gfpuv-r" 28 0 1 726 751 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #46=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #47=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pINV-107b/gfpuv" +COMMENT 2) 5 "" 0 4) +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pINV-107b/gfpuv'" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 02/07/04 11:46\214\337\221O" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 02/10/04 06:00\214\337\214\343" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3756 bp" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-FEB-2004" 1))) +COMMENT "Standard Fields") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 6 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 1 0 234) +COMMENT "JM2.300 Cells: #1 / 17-18" 1) 2 "JM2.300 Cells" 0 0))) +COMMENT "User Fields") +COMMENT #63=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 33 (3 #43# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 33 End: 749 " 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 33..749" 1))) "gfpuv") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1270 (3 #32# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1270 End: 1461" 1) +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1270..1461" 1))) "ROP") +COMMENT #75=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2648 (3 #33# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2648 End: 3511 (Complementary)" +COMMENT 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) "E-286" +COMMENT 1) +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2648..3511)" 1))) "AP(R)"))) +COMMENT "CDS (3 total)") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1366 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1366 End: 1522" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "H-strand Y effector site" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1366..1522" 1))) "H_Y_EFF") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1706 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1706 End: 1769 (Complementary)" +COMMENT 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "L-strand Y effector site" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(1706..1769)" 1))) +COMMENT "L_Y_EFF"))) "Misc. Feature (2 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 726 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 726 End: 751 (Complementary)" +COMMENT 1))) "BsaI-gfpuv-r") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3685 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3685 End: 3713" 1))) +COMMENT "BsaI-PRO12-f annealing") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3750 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3750 End: 18 (Complementary)" +COMMENT 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3750..18)" 1))) "PR-rev"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3543 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3543 End: 3549 (Complementary)" +COMMENT 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "promoter P3" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3543..3549)" 1))) +COMMENT "P3_P") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3696 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3696 End: 3755" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3696..3755" 1))) +COMMENT "Lambda P(R-O12)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3703 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3703 End: 3719" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3703..3719" 1))) "cI OR2") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3727 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3727 End: 3743" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3727..3743" 1))) "cI OR1"))) +COMMENT "Protein Binding Site (2 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 15 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 15 End: 23 " 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 15..23" 1))) "RBSII") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1260 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1260 End: 1264" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Shine-Dalgarno sequence" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1260..1264" 1))) "SD_SEQ") +COMMENT #129=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3516 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3516 End: 3520 (Complementary)" +COMMENT 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Shine-Dalgarno sequence" 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3516..3520)" 1))) +COMMENT "SD_SEQ"))) "RBS (3 total)") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1862 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1862 End: 2500" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1862..2500" 1))) "ColE1 ORI"))) +COMMENT "Replication Origin (1 total)") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3740 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3740 End: 3745" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3740..3745" 1))) "-10 P(R)"))) +COMMENT "-10 Signal (1 total)") +COMMENT #144=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #145=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3699 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3699 End: 3704 (Complementary)" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3699..3704)" 1))) +COMMENT "-35 P(RM)") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3717 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3717 End: 3722" 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3717..3722" 1))) "-35 P(R)"))) +COMMENT "-35 Signal (2 total)"))) "Feature Map") +COMMENT #153=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25401760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 3644 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26590680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 355 " 1) +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1829 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #161=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26600936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25349312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #163=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 1645 " 1) +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2143 " 1) +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #13# 3) 1 2 2 0 191) +COMMENT " N3: 3389 " 1))))) "ApaLI: 3 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25328912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1 " 1))))) "AvrII: 1 site") 1 +COMMENT 5 "CCTAGG" "GGATCC") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25349152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 553 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26611848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 949 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25348352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26611768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26590760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 3679 " 1))))) "BmtI: 1 site") +COMMENT 5 1 "GCTAGC" "CGATCG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26601096 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BsaI: 0 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26611928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 2549 " 1) +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 3557 " 1))))) "BspHI: 2 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25349232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26601656 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #188=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 6 " 1) +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #10# 2) 1 2 2 0 191) +COMMENT " N2: 767 " 1))))) "EcoRI: 2 sites") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25349072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25348912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26590840 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 3675 " 1))))) "NheI: 1 site") +COMMENT 1 5 "GCTAGC" "CGATCG") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25348272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26601016 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #198=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #199=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3092 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25349712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #201=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 740 " 1))))) "SacI: 1 site") 5 +COMMENT 1 "GAGCTC" "CTCGAG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25328432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 636 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26601176 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #207=(CGroupPar +COMMENT (CParagraph 0 (10 #23# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #208=(CLinePar +COMMENT (CParagraph 0 (1 #23# 1) 1 2 2 0 191) +COMMENT " N1: 1713 " 1))))) "SapI: 1 site") +COMMENT 8 11 "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25349392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25348992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #211=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 763 " 1) +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #4# 2) 1 2 2 0 191) +COMMENT " N2: 3669 " 1))))) "XbaI: 2 sites") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26590920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #215=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #216=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 454 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26590600 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #218=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #219=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #220=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #221=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #222=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #223=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #224=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #225=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #226=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #227=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #228=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #229=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #230=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #231=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #232=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #233=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #234=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #235=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #236=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #237=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #238=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #239=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #240=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #241=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #242=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #243=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #244=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #245=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #246=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #247=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #248=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #249=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #250=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #251=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #252=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #253=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #254=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #255=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #256=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #257=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 18.8926 -28.4088 40.0378 40.0378 0.01 10 -1 3756 3756 1 0 0) +COMMENT #258=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #259=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #260=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 26573192 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27586 6.27386 1 0.0214037) 0.167018) +COMMENT #261=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #221# 1195853635 100) +COMMENT (LOGPEN 1094796097 1195589959 1095193667) 1129596737 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pINV-107b/gfpuv" "@N" 1 0 +COMMENT 0.871165 0 -10 9.3162 1.44863 Nil) +COMMENT #262=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #220# 1413563201 100) +COMMENT (LOGPEN 1196704071 1129595207 1128350019) 1128743252 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3756 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #263=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #264=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil 24527320 100) +COMMENT (CObjectList +COMMENT #265=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.83306 4.15373 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 3801480 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ROP" "@N" 1 +COMMENT 10.6008 -10.454 0 -10 2.07304 1.04901 #265#) +COMMENT #267=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.409193 1.85223 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #268=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AP{\\super r}" +COMMENT "@N" 1 -12.3739 -3.48466 0 -10 1.64844 +COMMENT 1.04901 #267#) +COMMENT #269=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.02222 6.21974 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #270=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 11.2597 6.96932 0 -10 2.79736 1.04901 #269#)) +COMMENT (CObjectList)) +COMMENT #271=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #272=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 3.73118 +COMMENT 3.99339 1 0.082322) 0.8 1.8 0) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 1195853635 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "H Y EFF" "@N" 1 +COMMENT 10.3153 -12.1963 0 -10 3.72148 1.04901 #272#) +COMMENT #274=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 3.31864 3.42553 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #275=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "L Y EFF" "@N" 1 +COMMENT 5.37697 -17.4233 0 -10 3.5966 1.04901 #274#)) +COMMENT (CObjectList)) +COMMENT #276=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #277=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 0.0116912 1.9 +COMMENT 0.082322 1) +COMMENT #278=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PR-rev" "@N" 1 +COMMENT -2.71491 26.1349 0 -10 3.24693 1.04901 #277#) +COMMENT #279=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 0.120253 1.9 +COMMENT 0.082322 1) +COMMENT #280=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "BsaI-PRO12-f annealing" "@N" 1 -7.05744 +COMMENT 13.9386 0 -10 10.8897 1.04901 #279#) +COMMENT #281=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.06231 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BsaI-gfpuv-r" +COMMENT "@N" 1 14.4585 0 0 -10 5.8195 1.04901 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #284=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 4 128) 6 0.835356 0.357418 +COMMENT 0.444684) 0.4 0.082322 0.915356 1.8 1.8 1) +COMMENT #285=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P3 P" "@N" 1 +COMMENT -12.5045 3.48466 0 -10 2.07304 1.04901 #284#) +COMMENT #286=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 0.00167018 0.101881 1 0.082322) 0.8 1.8 0) +COMMENT #287=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "Lambda P(R-O12)" "@N" 1 -5.29976 20.908 0 +COMMENT -10 7.91752 1.04901 #286#)) (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1386484163 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 0.0901896 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "cI OR2" "@N" 1 +COMMENT -3.49312 17.4233 0 -10 3.04712 1.04901 #289#) +COMMENT #291=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 0.0501053 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "cI OR1" "@N" 1 +COMMENT -3.12527 22.6503 0 -10 3.04712 1.04901 #291#)) +COMMENT (CObjectList)) +COMMENT #293=(CGroupWidget (CWidget 32 (7 32 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #294=(CScratch +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #239# 432 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 4.17043 1.9 +COMMENT 0.082322 1) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 1195594819 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SD SEQ" "@N" 1 +COMMENT 12.3644 -8.71165 0 -10 3.52167 1.04901 #294#) +COMMENT #296=(CScratch +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 0.402513 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SD SEQ" "@N" 1 +COMMENT -13.4851 1.74233 0 -10 3.52167 1.04901 #296#) +COMMENT #298=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 6.2498 1.9 0.082322 +COMMENT 1) +COMMENT #299=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "RBSII" "@N" 1 +COMMENT 7.63215 10.454 0 -10 2.52262 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #301=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.09774 3.16499 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #302=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1 ORI" "@N" +COMMENT 1 -8.56197 -10.454 0 -10 4.64561 1.04901 +COMMENT #301#)) (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.028393 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10 P(R)" "@N" +COMMENT 1 -3.13269 24.3926 0 -10 3.64655 1.04901 +COMMENT #304#)) (CObjectList)) +COMMENT #306=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.0668071 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35 P(R)" "@N" +COMMENT 1 -3.51847 19.1656 0 -10 3.64655 1.04901 +COMMENT #307#) +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.0968703 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35 P(RM)" "@N" +COMMENT 1 -4.10234 15.681 0 -10 4.49575 1.04901 #309#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #311=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #312=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil 3801504 100) +COMMENT (CObjectList +COMMENT #313=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.35125 1.9 +COMMENT 0.082322 1) +COMMENT #314=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (553)" "@N (@S)" 5 14.0988 +COMMENT 3.48466 0 -10 5.09519 0.924127 #313#)) +COMMENT (CObjectList)) +COMMENT #315=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #316=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.03892 1.9 +COMMENT 0.082322 1) +COMMENT #317=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (740)" "@N (@S)" 5 13.851 +COMMENT -1.74233 0 -10 4.12111 0.924127 #316#)) +COMMENT (CObjectList)) +COMMENT #318=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #319=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.21262 1.9 +COMMENT 0.082322 1) +COMMENT #320=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (636)" "@N (@S)" 5 13.7813 +COMMENT 1.74233 0 -10 3.92129 0.924127 #319#)) +COMMENT (CObjectList)) +COMMENT #321=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #322=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.18873 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (3644)" "@N (@S)" 5 -12.4532 +COMMENT 6.96932 0 -10 4.84542 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.27319 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1)" "@N (@S)" 5 2.68276 13.9386 +COMMENT 0 -10 3.27191 0.924127 #325#)) (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.130274 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (3679)" "@N (@S)" 5 -4.65638 +COMMENT 12.1963 0 -10 4.77049 0.924127 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.136955 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (3675)" "@N (@S)" 5 -8.75596 +COMMENT 10.454 0 -10 4.77049 0.924127 #331#)) +COMMENT (CObjectList)) +COMMENT #333=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.51659 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (454)" "@N (@S)" 5 13.0738 +COMMENT 5.22699 0 -10 4.24599 0.924127 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.11067 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3092)" "@N (@S)" 5 -14.1733 +COMMENT -1.74233 0 -10 4.69556 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 1 (10 #23# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #23# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.41384 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sap}I (1713)" "@N (@S)" 5 6.33855 +COMMENT -15.681 0 -10 4.57068 0.924127 #340#)) +COMMENT (CObjectList)) +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.68986 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (949)" "@N (@S)" 5 14.3385 +COMMENT -6.96932 0 -10 4.12111 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 2 (10 #4# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.00051 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (763)" "@N (@S)" 5 13.6442 +COMMENT -3.48466 0 -10 4.24599 0.924127 #346#) +COMMENT #348=(CScratch +COMMENT (CWidget 2 (1 #4# 2) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.146976 1.9 +COMMENT 0.082322 1) +COMMENT #349=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (3669)" "@N (@S)" 5 -11.0278 +COMMENT 8.71165 0 -10 4.77049 0.924127 #348#)) +COMMENT (CObjectList)) +COMMENT #350=(CGroupWidget +COMMENT (CWidget 2 (10 #10# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #351=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.26483 1.9 +COMMENT 0.082322 1) +COMMENT #352=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Eco}RI (6)" "@N (@S)" 5 2.84999 12.1963 +COMMENT 0 -10 3.5966 0.924127 #351#) +COMMENT #353=(CScratch +COMMENT (CWidget 2 (1 #10# 2) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.99383 1.9 +COMMENT 0.082322 1) +COMMENT #354=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Eco}RI (767)" "@N (@S)" 5 13.9864 +COMMENT -5.22699 0 -10 4.64561 0.924127 #353#)) +COMMENT (CObjectList)) +COMMENT #355=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #356=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.68194 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (355)" "@N (@S)" 5 10.8971 +COMMENT 8.71165 0 -10 4.29594 0.924127 #356#) +COMMENT #358=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.2201 1.9 0.082322 +COMMENT 1) +COMMENT #359=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1829)" "@N (@S)" 5 4.43357 +COMMENT -19.1656 0 -10 4.74552 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 2 (10 #24# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.01757 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2549)" "@N (@S)" 5 -13.6045 +COMMENT -5.22699 0 -10 5.295 0.924127 #361#) +COMMENT #363=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.334035 1.9 +COMMENT 0.082322 1) +COMMENT #364=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 149 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (3557)" "@N (@S)" 5 -13.5529 +COMMENT 5.22699 0 -10 5.295 0.924127 #363#)) +COMMENT (CObjectList)) +COMMENT #365=(CGroupWidget +COMMENT (CWidget 3 (10 #13# 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #366=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.52741 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1645)" "@N (@S)" 5 7.89732 +COMMENT -13.9386 0 -10 5.17011 0.924127 #366#) +COMMENT #368=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.69567 1.9 +COMMENT 0.082322 1) +COMMENT #369=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2143)" "@N (@S)" 5 -8.43996 +COMMENT -12.1963 0 -10 5.17011 0.924127 #368#) +COMMENT #370=(CScratch +COMMENT (CWidget 3 (1 #13# 3) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.614625 1.9 +COMMENT 0.082322 1) +COMMENT #371=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (3389)" "@N (@S)" 5 -14.5457 0 0 +COMMENT -10 5.22007 0.924127 #370#)) (CObjectList))) +COMMENT (CObjectList)) +COMMENT #372=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #373=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21016760 (CObList))) +FEATURES Location/Qualifiers + RBS 1260..1264 + /vntifkey="32" + /label=SD_SEQ + /note="Shine-Dalgarno sequence" + misc_feature 1366..1522 + /vntifkey="21" + /label=H_Y_EFF + /note="H-strand Y effector site" + misc_feature complement(1706..1769) + /vntifkey="21" + /label=L_Y_EFF + /note="L-strand Y effector site" + RBS complement(3516..3520) + /vntifkey="32" + /label=SD_SEQ + /note="Shine-Dalgarno sequence" + promoter complement(3543..3549) + /vntifkey="30" + /label=P3_P + /note="promoter P3" + CDS 1270..1461 + /vntifkey="4" + /label=ROP + CDS complement(2648..3511) + /vntifkey="4" + /label=AP(R) + /note="E-286" + rep_origin 1862..2500 + /vntifkey="33" + /label=ColE1\ORI + RBS 15..23 + /vntifkey="32" + /label=RBSII + -35_signal 3717..3722 + /vntifkey="48" + /label=-35\P(R) + -35_signal complement(3699..3704) + /vntifkey="48" + /label=-35\P(RM) + protein_bind 3703..3719 + /vntifkey="31" + /label=cI\OR2 + protein_bind 3727..3743 + /vntifkey="31" + /label=cI\OR1 + -10_signal 3740..3745 + /vntifkey="47" + /label=-10\P(R) + promoter 3696..3755 + /vntifkey="30" + /label=Lambda\P(R-O12) + primer_bind complement(3750..18) + /vntifkey="28" + /label=PR-rev + CDS 33..749 + /vntifkey="4" + /label=gfpuv + primer_bind 3685..3713 + /vntifkey="28" + /label=BsaI-PRO12-f\annealing + primer_bind complement(726..751) + /vntifkey="28" + /label=BsaI-gfpuv-r +BASE COUNT 983 a 935 c 903 g 935 t +ORIGIN + 1 ctaggaattc aattaaagag gagaaattaa gcatgagtaa aggagaagaa cttttcactg + 61 gagttgtccc aattcttgtt gaattagatg gtgatgttaa tgggcacaaa ttttctgtca + 121 gtggagaggg tgaaggtgat gcaacatacg gaaaacttac ccttaaattt atttgcacta + 181 ctggaaaact acctgttcca tggccaacac ttgtcactac tttctcttat ggtgttcaat + 241 gcttttcccg ttatccggat catatgaaac ggcatgactt tttcaagagt gccatgcccg + 301 aaggttatgt acaggaacgc actatatctt tcaaagatga cgggaactac aagacgcgtg + 361 ctgaagtcaa gtttgaaggt gatacccttg ttaatcgtat cgagttaaaa ggtattgatt + 421 ttaaagaaga tggaaacatt ctcggacaca aactcgagta caactataac tcacacaatg + 481 tatacatcac ggcagacaaa caaaagaatg gaatcaaagc taacttcaaa attcgccaca + 541 acattgaaga tggatccgtt caactagcag accattatca acaaaatact ccaattggcg + 601 atggccctgt ccttttacca gacaaccatt acctgtcgac acaatctgcc ctttcgaaag + 661 atcccaacga aaagcgtgac cacatggtcc ttcttgagtt tgtaactgct gctgggatta + 721 cacatggcat ggatgagctc tacaaataaa gcggccgcga ctctagaatt cttagctgat + 781 tcgggcagcg ttgggtcctg gccacgggtg cgcatgatcg tgctcctgtc gttgaggacc + 841 cggctaggct ggcggggttg ccttactggt tagcagaatg aatcaccgat acgcgagcga + 901 acgtgaagcg actgctgctg caaaacgtct gcgacctgag caacaacatg aatggtcttc + 961 ggtttccgtg tttcgtaaag tctggaaacg cggaagtcag cgccctgcac cattatgttc + 1021 cggatctgca tcgcaggatg ctgctggcta ccctgtggaa cacctacatc tgtattaacg + 1081 aagcgctggc attgaccctg agtgattttt ctctggtccc gccgcatcca taccgccagt + 1141 tgtttaccct cacaacgttc cagtaaccgg gcatgttcat catcagtaac ccgtatcgtg + 1201 agcatcctct ctcgtttcat cggtatcatt acccccatga acagaaatcc cccttacacg + 1261 gaggcatcag tgaccaaaca ggaaaaaacc gcccttaaca tggcccgctt tatcagaagc + 1321 cagacattaa cgcttctgga gaaactcaac gagctggacg cggatgaaca ggcagacatc + 1381 tgtgaatcgc ttcacgacca cgctgatgag ctttaccgca gctgcctcgc gcgtttcggt + 1441 gatgacggtg aaaacctctg acacatgcag ctcccggaga cggtcacagc ttgtctgtaa + 1501 gcggatgccg ggagcagaca agcccgtcag ggcgcgtcag cgggtgttgg cgggtgtcgg + 1561 ggcgcagcca tgacccagtc acgtagcgat agcggagtgt atactggctt aactatgcgg + 1621 catcagagca gattgtactg agagtgcacc atatgcggtg tgaaataccg cacagatgcg + 1681 taaggagaaa ataccgcatc aggcgctctt ccgcttcctc gctcactgac tcgctgcgct + 1741 cggtcgttcg gctgcggcga gcggtatcag ctcactcaaa ggcggtaata cggttatcca + 1801 cagaatcagg ggataacgca ggaaagaaca tgtgagcaaa aggccagcaa aaggccagga + 1861 accgtaaaaa ggccgcgttg ctggcgtttt tccataggct ccgcccccct gacgagcatc + 1921 acaaaaatcg acgctcaagt cagaggtggc gaaacccgac aggactataa agataccagg + 1981 cgtttccccc tggaagctcc ctcgtgcgct ctcctgttcc gaccctgccg cttaccggat + 2041 acctgtccgc ctttctccct tcgggaagcg tggcgctttc tcatagctca cgctgtaggt + 2101 atctcagttc ggtgtaggtc gttcgctcca agctgggctg tgtgcacgaa ccccccgttc + 2161 agcccgaccg ctgcgcctta tccggtaact atcgtcttga gtccaacccg gtaagacacg + 2221 acttatcgcc actggcagca gccactggta acaggattag cagagcgagg tatgtaggcg + 2281 gtgctacaga gttcttgaag tggtggccta actacggcta cactagaagg acagtatttg + 2341 gtatctgcgc tctgctgaag ccagttacct tcggaaaaag agttggtagc tcttgatccg + 2401 gcaaacaaac caccgctggt agcggtggtt tttttgtttg caagcagcag attacgcgca + 2461 gaaaaaaagg atctcaagaa gatcctttga tcttttctac ggggtctgac gctcagtgga + 2521 acgaaaactc acgttaaggg attttggtca tgagattatc aaaaaggatc ttcacctaga + 2581 tccttttaaa ttaaaaatga agttttaaat caatctaaag tatatatgag taaacttggt + 2641 ctgacagtta ccaatgctta atcagtgagg cacctatctc agcgatctgt ctatttcgtt + 2701 catccatagt tgcctgactc cccgtcgtgt agataactac gatacgggag ggcttaccat + 2761 ctggccccag tgctgcaatg ataccgcgcg acccacgctc accggctcca gatttatcag + 2821 caataaacca gccagccgga agggccgagc gcagaagtgg tcctgcaact ttatccgcct + 2881 ccatccagtc tattaattgt tgccgggaag ctagagtaag tagttcgcca gttaatagtt + 2941 tgcgcaacgt tgttgccatt gctgcaggca tcgtggtgtc acgctcgtcg tttggtatgg + 3001 cttcattcag ctccggttcc caacgatcaa ggcgagttac atgatccccc atgttgtgca + 3061 aaaaagcggt tagctccttc ggtcctccga tcgttgtcag aagtaagttg gccgcagtgt + 3121 tatcactcat ggttatggca gcactgcata attctcttac tgtcatgcca tccgtaagat + 3181 gcttttctgt gactggtgag tactcaacca agtcattctg agaatagtgt atgcggcgac + 3241 cgagttgctc ttgcccggcg tcaacacggg ataataccgc gccacatagc agaactttaa + 3301 aagtgctcat cattggaaaa cgttcttcgg ggcgaaaact ctcaaggatc ttaccgctgt + 3361 tgagatccag ttcgatgtaa cccactcgtg cacccaactg atcttcagca tcttttactt + 3421 tcaccagcgt ttctgggtga gcaaaaacag gaaggcaaaa tgccgcaaaa aagggaataa + 3481 gggcgacacg gaaatgttga atactcatac tcttcctttt tcaatattat tgaagcattt + 3541 atcagggtta ttgtctcatg agcggataca tatttgaatg tatttagaaa aataaacaaa + 3601 taggggttcc gcgcacattt ccccgaaaag tgccacctga cgtcaccatt cgatggtgtc + 3661 aacgtaatct agagctagca cgacaggttc ctagtaaata tctaacaccg tgcgtgttga + 3721 ctattttacc tctggcggtg ataatggttg catgtc +// diff --git a/lib/VNTI files/pK-A-CIT1.gb b/lib/VNTI files/pK-A-CIT1.gb new file mode 100644 index 00000000..70a0c19e --- /dev/null +++ b/lib/VNTI files/pK-A-CIT1.gb @@ -0,0 +1,1529 @@ +LOCUS pK-A-CIT1 3030 bp DNA circular SYN 7-JAN-2004 +DEFINITION p15A low copy expression vector based on pK184/pK184.1. Weaker rbs and KpnI site for cloning. T1 terminator added to pK184.2. +ACCESSION U00800 +VERSION U00800.1 GI:392879 +SOURCE Cloning vector Pk184. + ORGANISM Cloning vector Pk184 + artificial sequences; vectors. +REFERENCE 1 (bases 1 to 2432) + AUTHORS Jobling,M.G. and Holmes,R.K. + TITLE Construction of vectors with the p15a replicon, kanamycin + resistance, inducible lacZ alpha and pUC18 or pUC19 multiple + cloning sites + JOURNAL Nucleic Acids Res. 18 (17), 5315-5316 (1990) + MEDLINE 90384866 +REFERENCE 2 (bases 1 to 2432) + AUTHORS Jobling,M.G. + TITLE Direct Submission + JOURNAL Submitted (16-AUG-1993) Jobling M. G., Uniformed Services + University of the Health Sciences, Microbiology, 4301 Jones Bridge + Road, Bethesda, MD 20814-4799, USA +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|320871763| +COMMENT VNTDBDATE|326892540| +COMMENT LSOWNER| +COMMENT VNTNAME|pK-A-CIT1| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pK-A-CIT1" 0 3030 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3030 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3026 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 2788 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 107 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 2482 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 2480 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 175 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 123 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 119 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 0 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 3 949 1 1159 1 2085 1 0 +COMMENT "") #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 1 441 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "CDS(kan)_2" 4 0 0 476 1270 0 (CStringList) +COMMENT (CStringList "/gene=\"kan\"" "/function=\"kanamycin resistance\"" +COMMENT "/codon_start=1" "/transl_table=11" +COMMENT "/product=\"kanamycin phosphotransferase\"" +COMMENT "/protein_id=\"AAC43251.1\"" "/db_xref=\"GI:392880\"") 1 1 1 1 +COMMENT "365..1159") +COMMENT #28=(CFSignal (CObList) "oriV" 33 0 0 1970 1972 0 (CStringList) +COMMENT (CStringList "/standard_name=\"oriV\"") 1 1 1 1 "1861..1863") +COMMENT #29=(CFSignal (CObList) "-35_Signal_1" 48 0 0 2235 2240 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2126..2131") +COMMENT #30=(CFSignal (CObList) "-10_Signal_1" 47 0 0 2269 2274 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2160..2165") +COMMENT #31=(CFSignal (CObList) "P(lac)" 30 0 0 2187 2270 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2078..2161") +COMMENT #32=(CFSignal (CObList) "lacO" 20 0 0 2271 2291 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2162..2182") +COMMENT #33=(CFSignal (CObList) "p15a start" 21 0 0 1398 1401 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #34=(CFSignal (CObList) "SeqPK184.1" 28 0 0 2090 2110 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #35=(CFSignal (CObList) "SeqPK184.2r" 28 0 1 123 143 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #36=(CFSignal (CObList) "SeqPK184.3r" 28 0 1 2248 2268 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #37=(CFSignal (CObList) "pK184xba-rev" 28 0 1 1358 1381 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "pK184xba-fwd" 28 0 0 1382 1411 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "kanfwd" 28 0 0 1225 1247 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "T1" 43 0 0 1 105 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "") +COMMENT #41=(CFSignal (CObList) "cI857s7" 4 0 0 2311 3024 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "lacIq2" 28 0 0 2163 2180 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "lacIq1" 28 0 0 2137 2156 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "cI-fwd" 27 0 0 2871 2889 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "rbsA-cI-f" 28 0 0 2302 2338 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "pK-rbs-Plac-r" 27 0 1 2277 2301 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "rbsA" 32 0 0 2298 2310 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #48=(CFSignal (CObList) "XhoI-pKACIT1-r" 28 0 1 2156 2178 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #49=(CFSignal (CObList) "BspHI-pKACIT1-f" 28 0 0 2292 2318 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "")) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #50=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #51=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pK-A-CIT1" 2) 5 +COMMENT "" 0 4) +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pK-A-CIT1'" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "p15A low copy expression vector based on pK184/pK184.1. Weaker rbs and KpnI site for cloning. T1 terminator added to pK184.2" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 12/01/03 07:02\214\337\214\343" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 01/07/04 11:29\214\337\221O" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3030 bp" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 6-MAR-2003" 1) +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): U00800" +COMMENT 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: U00800.1 GI:392879" 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Cloning vector Pk184." 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Cloning vector Pk184(Cloning vector Pk184)" +COMMENT 1) +COMMENT #69=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: artificial sequences; vectors" 1) +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Associated Genes: lacZalpha; kan" 1))) +COMMENT "Standard Fields") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #72=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 2432)" 1) +COMMENT #73=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Jobling,M.G. and Holmes,R.K." 1) +COMMENT #74=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Construction of vectors with the p15a replicon, kanamycin" +COMMENT 1) +COMMENT #75=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " resistance, inducible lacZ alpha and pUC18 or pUC19 multiple" +COMMENT 1) +COMMENT #76=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " cloning sites" 1) +COMMENT #77=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nucleic Acids Res. 18 (17), 5315-5316 (1990)" +COMMENT 1) +COMMENT #78=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " MEDLINE 90384866" +COMMENT 1) +COMMENT #79=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 2432)" 1) +COMMENT #80=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Jobling,M.G." 1) +COMMENT #81=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #82=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (16-AUG-1993) Jobling M. G., Uniformed Services" +COMMENT 1) +COMMENT #83=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " University of the Health Sciences, Microbiology, 4301 Jones Bridge" +COMMENT 1) +COMMENT #84=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Road, Bethesda, MD 20814-4799, USA" 1))) +COMMENT "References") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #86=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #87=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #88=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #90=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 476 (3 #27# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 476 End: 1270" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 365..1159" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"kan\"" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /function=\"kanamycin resistance\"" +COMMENT 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"kanamycin phosphotransferase\"" +COMMENT 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=AAC43251.1" +COMMENT 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:392880" +COMMENT 1))) "CDS(kan)_2") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2311 (3 #41# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2311 End: 3024" 1))) +COMMENT "cI857s7"))) "CDS (2 total)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar (CParagraph 20 (7 20 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2271 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2271 End: 2291" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2162..2182" 1))) "lacO"))) +COMMENT "Misc. Binding Site (1 total)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1398 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1398 End: 1401" 1))) +COMMENT "p15a start"))) "Misc. Feature (1 total)") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #114=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2277 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2277 End: 2301 (Complementary)" +COMMENT 1))) "pK-rbs-Plac-r") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2871 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2871 End: 2889" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) "cI-fwd"))) +COMMENT "Primer (2 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 123 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 123 End: 143 (Complementary)" +COMMENT 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) +COMMENT "SeqPK184.2r") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1225 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1225 End: 1247" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer for XbaI site" 1))) +COMMENT "kanfwd") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1358 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1358 End: 1381 (Complementary)" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "primer used to create pK184.1" 1))) +COMMENT "pK184xba-rev") +COMMENT #129=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1382 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1382 End: 1411" 1))) +COMMENT "pK184xba-fwd") +COMMENT #131=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2090 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2090 End: 2110" 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) "SeqPK184.1") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2137 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2137 End: 2156" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "BsaI primer binding site. 5'-tgcc overhang" +COMMENT 1))) "lacIq1") +COMMENT #137=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2156 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2156 End: 2178 (Complementary)" +COMMENT 1))) "XhoI-pKACIT1-r") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2163 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2163 End: 2180" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "BsaI primer binding site. 5'-cgac overhang" +COMMENT 1))) "lacIq2") +COMMENT #142=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2248 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2248 End: 2268 (Complementary)" +COMMENT 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) +COMMENT "SeqPK184.3r") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2292 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2292 End: 2318" 1))) +COMMENT "BspHI-pKACIT1-f") +COMMENT #147=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2302 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2302 End: 2338" 1))) +COMMENT "rbsA-cI-f"))) +COMMENT "Primer Binding Site (11 total)") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #150=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2187 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2187 End: 2270" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2078..2161" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #154=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2298 (3 #47# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2298 End: 2310" 1))) "rbsA"))) +COMMENT "RBS (1 total)") +COMMENT #157=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1970 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1970 End: 1972" 1) +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "p15a origin of DNA replication" 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1861..1863" 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /standard_name=\"oriV\"" 1))) +COMMENT "oriV"))) "Replication Origin (1 total)") +COMMENT #165=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #166=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1 End: 105 " 1))) "T1"))) +COMMENT "Terminator (1 total)") +COMMENT #168=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #169=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2269 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2269 End: 2274" 1) +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2160..2165" 1))) "-10_Signal_1"))) +COMMENT "-10 Signal (1 total)") +COMMENT #173=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2235 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2235 End: 2240" 1) +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2126..2131" 1))) "-35_Signal_1"))) +COMMENT "-35 Signal (1 total)"))) "Feature Map") +COMMENT #178=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #179=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (0 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #180=(CFolderPar +COMMENT (CGroupPar (CParagraph 0 (0 0) 1 2 2 0 178) +COMMENT (CObjectList +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 0 End: 0 " 1) +COMMENT #182=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 0..0" 1) +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"lacZalpha\"" 1) +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"lacZ alpha peptide\"" +COMMENT 1) +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=\"AAC43252.1\"" 1) +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=\"GI:392881\"" 1))) +COMMENT "CDS(lacZalpha)_1"))) "CDS (1 total)") +COMMENT #191=(CFolderPar +COMMENT (CGroupPar (CParagraph 60 (0 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #192=(CFolderPar +COMMENT (CGroupPar (CParagraph 0 (0 0) 1 2 2 0 178) +COMMENT (CObjectList +COMMENT #193=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 0 End: 0 " 1) +COMMENT #194=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 0..0" 1) +COMMENT #196=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"lacZalpha\"" 1))) +COMMENT "Gene(lacZalpha)_1"))) "Gene (1 total)"))) +COMMENT "Imported Features Not Shown on Map") +COMMENT #198=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26246160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26320208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #201=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 175 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26331072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26291288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 0 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26282488 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #206=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #207=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 107 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26291448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BamHI: 0 sites") 1 5 "GGATCC" +COMMENT "CCTAGG") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26337472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26292248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #211=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 2480 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #213=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26337392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #214=(CGroupPar +COMMENT (CParagraph 0 (10 #26# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #215=(CLinePar +COMMENT (CParagraph 0 (1 #26# 1) 1 2 2 0 191) +COMMENT " N1: 441 " 1))))) "BglII: 1 site") +COMMENT 1 5 "AGATCT" "TCTAGA") +COMMENT #216=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26320288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #217=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #218=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 123 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #219=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26331232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BsaI: 0 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #220=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26337552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 0 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #221=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26291368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26334352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "EcoRI: 0 sites") 1 5 "GAATTC" +COMMENT "CTTAAG") +COMMENT #223=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26291528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #224=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #225=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 2788 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #226=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26291688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #227=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26320368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #228=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #229=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 119 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #230=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26292328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #231=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #232=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 2482 " 1))))) "NsiI: 1 site") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #233=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26331152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 0 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #234=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26290888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #235=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26282328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 0 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #236=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26331312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #237=(CGroupPar +COMMENT (CParagraph 0 (10 #23# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #238=(CLinePar +COMMENT (CParagraph 0 (1 #23# 1) 1 2 2 0 191) +COMMENT " N1: 949 (on complementary strand)" +COMMENT 1) +COMMENT #239=(CLinePar +COMMENT (CParagraph 0 (1 #23# 2) 1 2 2 0 191) +COMMENT " N2: 1159 (on complementary strand)" +COMMENT 1) +COMMENT #240=(CLinePar +COMMENT (CParagraph 0 (1 #23# 3) 1 2 2 0 191) +COMMENT " N3: 2085 (on complementary strand)" +COMMENT 1))))) "SapI: 3 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #241=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26291208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #242=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26291608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #243=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #244=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3026 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #245=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26320448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XhoI: 0 sites") 1 5 "CTCGAG" +COMMENT "GAGCTC") +COMMENT #246=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26320128 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #247=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #248=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #249=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #250=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #251=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #252=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #253=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #254=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #255=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #256=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #257=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #258=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #259=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #260=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #261=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #262=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #263=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #264=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #265=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #266=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #267=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #268=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #269=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #270=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #271=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #272=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #273=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #274=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #275=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #276=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #277=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #278=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #279=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #280=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #281=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #282=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #283=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #284=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #285=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #286=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 21.5352 -24.8571 40.0378 40.0378 0.01 10 -1 3030 3030 1 0 0) +COMMENT #287=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #288=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #289=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #253# 24977268 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27626 6.27426 1 0.0214037) 0.207036) +COMMENT #290=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #250# 709571466 100) +COMMENT (LOGPEN 846402460 -225709357 852169308) 720036235 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pK-A-CIT1" "@N" 1 0 0.871165 0 +COMMENT -10 5.61969 1.44863 Nil) +COMMENT #291=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #249# 0 100) +COMMENT (LOGPEN 1 12 1944749780) 21217672 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3030 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #292=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil 786443 100) +COMMENT (CObjectList +COMMENT #293=(CGroupWidget (CWidget 4 (7 4 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #294=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.64383 5.28977 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 2167 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "CDS(kan) 2" +COMMENT "@N" 1 13.9701 -3.48466 0 -10 5.09519 1.04901 +COMMENT #294#) +COMMENT #296=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.0124221 1.49066 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 1945 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "cI857s7" "@N" 1 +COMMENT -10.7741 17.4233 0 -10 3.52167 1.04901 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 20 (7 20 0) 1 2 0 0 Nil 3801536 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #254# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 1.57347 1.9 0.082322 +COMMENT 1) +COMMENT #300=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT -13.1334 5.22699 0 -10 2.14797 1.04901 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget (CWidget 21 (7 21 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #256# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.38089 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "p15a start" +COMMENT "@N" 1 5.82616 -15.681 0 -10 4.64561 1.04901 +COMMENT #302#)) (CObjectList)) +COMMENT #304=(CGroupWidget (CWidget 27 (7 27 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #256# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.331257 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 30998543 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "cI-fwd" "@N" 1 +COMMENT -6.28372 20.908 0 -10 2.87229 1.04901 #305#) +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #256# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.56105 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pK-rbs-Plac-r" +COMMENT "@N" 1 -14.9857 6.96932 0 -10 6.14419 1.04901 +COMMENT #307#)) (CObjectList)) +COMMENT #309=(CGroupWidget (CWidget 28 (7 28 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #310=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #269# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 1.94821 1.9 +COMMENT 0.082322 1) +COMMENT #311=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 367 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.1" +COMMENT "@N" 1 -14.0391 -8.71165 0 -10 5.49481 +COMMENT 1.04901 #310#) +COMMENT #312=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #269# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.0206 1.9 0.082322 +COMMENT 1) +COMMENT #313=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.2r" +COMMENT "@N" 1 9.06087 10.454 0 -10 5.89443 1.04901 +COMMENT #312#) +COMMENT #314=(CScratch +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #269# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 1.62109 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.3r" +COMMENT "@N" 1 -14.5644 1.74233 0 -10 5.89443 1.04901 +COMMENT #314#) +COMMENT #316=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #269# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 3.46371 1.9 +COMMENT 0.082322 1) +COMMENT #317=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pK184xba-rev" +COMMENT "@N" 1 7.32746 -12.1963 0 -10 6.46889 1.04901 +COMMENT #316#) +COMMENT #318=(CLine +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #269# 720906 +COMMENT 100) (LOGPEN 0 0 16711680) 1 0.835356 +COMMENT 3.35191 3.41402) +COMMENT #319=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 110 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pK184xba-fwd" +COMMENT "@N" 1 6.6017 -13.9386 0 -10 6.54382 1.04901 +COMMENT #318#) +COMMENT #320=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #269# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 3.73907 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 5898255 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "kanfwd" "@N" 1 +COMMENT 8.84921 -10.454 0 -10 3.39679 1.04901 #320#) +COMMENT #322=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #269# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 1.79707 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacIq2" "@N" 1 +COMMENT -12.9875 -3.48466 0 -10 2.79736 1.04901 #322#) +COMMENT #324=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #269# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 1.8509 1.9 0.082322 +COMMENT 1) +COMMENT #325=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacIq1" "@N" 1 +COMMENT -13.0734 -6.96932 0 -10 2.79736 1.04901 #324#) +COMMENT #326=(CLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #269# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 0.835356 1.43269 +COMMENT 1.50929) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 9581 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "rbsA-cI-f" "@N" +COMMENT 1 -14.4418 12.1963 0 -10 3.97125 1.04901 +COMMENT #326#) +COMMENT #328=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #269# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 1.81156 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 1691 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "XhoI-pKACIT1-r" +COMMENT "@N" 1 -14.9659 -5.22699 0 -10 6.99339 +COMMENT 1.04901 #328#) +COMMENT #330=(CLine +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #269# 21178768 +COMMENT 100) (LOGPEN 0 0 16711680) 1 0.670712 1.4741 +COMMENT 1.52999) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 30998543 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "BspHI-pKACIT1-f" "@N" 1 -15.9849 10.454 0 +COMMENT -10 7.59282 1.04901 #330#)) (CObjectList)) +COMMENT #332=(CGroupWidget (CWidget 30 (7 30 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #333=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #264# 107 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 1.57347 1.74738 1 0.082322) 0.8 1.8 0) +COMMENT #334=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT -13.1289 -1.74233 0 -10 2.67247 1.04901 #333#)) +COMMENT (CObjectList)) +COMMENT #335=(CGroupWidget (CWidget 32 (7 32 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #336=(CScratch +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #268# 0 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 1.51757 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "rbsA" "@N" 1 +COMMENT -13.445 8.71165 0 -10 2.19792 1.04901 #336#)) +COMMENT (CObjectList)) +COMMENT #338=(CGroupWidget (CWidget 33 (7 33 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #339=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #256# 432 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.19665 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "oriV" "@N" 1 +COMMENT -11.3343 -12.1963 0 -10 1.94816 1.04901 #339#)) +COMMENT (CObjectList)) +COMMENT #341=(CGroupWidget (CWidget 43 (7 43 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #342=(CLine +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #256# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 6.0558 +COMMENT 6.27319) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 284425978 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.93346 15.681 0 -10 1.14891 1.04901 #342#)) +COMMENT (CObjectList)) +COMMENT #344=(CGroupWidget (CWidget 47 (7 47 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #345=(CScratch +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #256# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.57761 1.9 +COMMENT 0.082322 1) +COMMENT #346=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10 Signal 1" +COMMENT "@N" 1 -14.4163 3.48466 0 -10 5.36993 1.04901 +COMMENT #345#)) (CObjectList)) +COMMENT #347=(CGroupWidget (CWidget 48 (7 48 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #348=(CScratch +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #256# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.64801 1.9 +COMMENT 0.082322 1) +COMMENT #349=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35 Signal 1" +COMMENT "@N" 1 -14.3192 0 0 -10 5.36993 1.04901 #348#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #350=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.0103518 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel (CWidget 0 (0 0) 1 2 0 0 #257# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3026)" "@N (@S)" 5 -3.63386 +COMMENT 22.6503 0 -10 4.77049 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.503097 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel (CWidget 0 (0 0) 1 2 0 0 #257# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (2788)" "@N (@S)" 5 -9.73005 +COMMENT 19.1656 0 -10 5.56974 0.924127 #355#)) +COMMENT (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.05373 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel (CWidget 0 (0 0) 1 2 0 0 #257# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (107)" "@N (@S)" 5 5.7486 +COMMENT 13.9386 0 -10 4.32092 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -411 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.13663 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #257# -411 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (2482)" "@N (@S)" 5 -14.0526 +COMMENT 15.681 0 -10 4.49575 0.924127 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.14077 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel (CWidget 0 (0 0) 1 2 0 0 #257# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (2480)" "@N (@S)" 5 -14.2499 +COMMENT 13.9386 0 -10 4.82044 0.924127 #364#)) +COMMENT (CObjectList)) +COMMENT #366=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 184011996 100) +COMMENT (CObjectList +COMMENT #367=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.91294 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel (CWidget 0 (0 0) 1 2 0 0 #257# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (175)" "@N (@S)" 5 12.2006 +COMMENT 6.96932 0 -10 4.22101 0.924127 #367#)) +COMMENT (CObjectList)) +COMMENT #369=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #370=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.0206 1.9 0.082322 +COMMENT 1) +COMMENT #371=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #257# 2949135 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (123)" "@N (@S)" 5 10.7838 +COMMENT 8.71165 0 -10 4.17106 0.924127 #370#)) +COMMENT (CObjectList)) +COMMENT #372=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #373=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.02888 1.9 +COMMENT 0.082322 1) +COMMENT #374=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #257# 21242808 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (119)" "@N (@S)" 5 5.75623 +COMMENT 12.1963 0 -10 4.12111 0.924127 #373#)) +COMMENT (CObjectList)) +COMMENT #375=(CGroupWidget +COMMENT (CWidget 1 (10 #26# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #376=(CScratch +COMMENT (CWidget 1 (1 #26# 1) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.36223 1.9 +COMMENT 0.082322 1) +COMMENT #377=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #257# 2949135 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bgl}II (441)" "@N (@S)" 5 13.0476 +COMMENT 5.22699 0 -10 4.12111 0.924127 #376#)) +COMMENT (CObjectList)) +COMMENT #378=(CGroupWidget +COMMENT (CWidget 3 (10 #23# 0) 1 2 0 0 Nil 1 100) +COMMENT (CObjectList +COMMENT #379=(CScratch +COMMENT (CWidget 1 (1 #23# 1) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.31049 1.9 +COMMENT 0.082322 1) +COMMENT #380=(CLabel (CWidget 0 (0 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (949)" "@N (@S)" 5 13.2507 +COMMENT -5.22699 0 -10 4.17106 0.924127 #379#) +COMMENT #381=(CScratch +COMMENT (CWidget 2 (1 #23# 2) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.87571 1.9 +COMMENT 0.082322 1) +COMMENT #382=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 11195280 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (1159)" "@N (@S)" 5 10.871 +COMMENT -8.71165 0 -10 4.57068 0.924127 #381#) +COMMENT #383=(CScratch +COMMENT (CWidget 3 (1 #23# 3) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.95856 1.9 +COMMENT 0.082322 1) +COMMENT #384=(CLabel (CWidget 0 (0 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (2085)" "@N (@S)" 5 -14.0177 +COMMENT -10.454 0 -10 4.69556 0.924127 #383#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #385=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #386=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 1944749780 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21338048 (CObList))) +FEATURES Location/Qualifiers + gene 0..0 + /gene="lacZalpha" + /vntifkey="60" + CDS 0..0 + /gene="lacZalpha" + /codon_start=1 + /transl_table=11 + /product="lacZ alpha peptide" + /protein_id="AAC43252.1" + /db_xref="GI:392881" + /vntifkey="4" + /label=CDS(lacZalpha)_1 + gene 476..1270 + /gene="kan" + /vntifkey="60" + CDS 476..1270 + /gene="kan" + /function="kanamycin resistance" + /codon_start=1 + /transl_table=11 + /product="kanamycin phosphotransferase" + /protein_id="AAC43251.1" + /db_xref="GI:392880" + /vntifkey="4" + /label=CDS(kan)_2 + rep_origin 1970..1972 + /standard_name="oriV" + /vntifkey="33" + /label=oriV + /note="p15a origin of DNA replication" + -35_signal 2235..2240 + /vntifkey="48" + /label=-35_Signal_1 + -10_signal 2269..2274 + /vntifkey="47" + /label=-10_Signal_1 + promoter 2187..2270 + /vntifkey="30" + /label=P(lac) + misc_binding 2271..2291 + /vntifkey="20" + /label=lacO + misc_feature 1398..1401 + /vntifkey="21" + /label=p15a\start + primer_bind 2090..2110 + /vntifkey="28" + /label=SeqPK184.1 + /note="sequencing primer" + primer_bind complement(123..143) + /vntifkey="28" + /label=SeqPK184.2r + /note="sequencing primer" + primer_bind complement(2248..2268) + /vntifkey="28" + /label=SeqPK184.3r + /note="sequencing primer" + primer_bind complement(1358..1381) + /vntifkey="28" + /label=pK184xba-rev + /note="primer used to create pK184.1" + primer_bind 1382..1411 + /vntifkey="28" + /label=pK184xba-fwd + primer_bind 1225..1247 + /vntifkey="28" + /label=kanfwd + /note="sequencing primer for XbaI site" + terminator 1..105 + /vntifkey="43" + /label=T1 + CDS 2311..3024 + /vntifkey="4" + /label=cI857s7 + primer_bind 2163..2180 + /vntifkey="28" + /label=lacIq2 + /note="BsaI primer binding site. 5'-cgac overhang" + primer_bind 2137..2156 + /vntifkey="28" + /label=lacIq1 + /note="BsaI primer binding site. 5'-tgcc overhang" + primer 2871..2889 + /vntifkey="27" + /label=cI-fwd + /note="sequencing primer" + primer_bind 2302..2338 + /vntifkey="28" + /label=rbsA-cI-f + primer complement(2277..2301) + /vntifkey="27" + /label=pK-rbs-Plac-r + RBS 2298..2310 + /vntifkey="32" + /label=rbsA + primer_bind complement(2156..2178) + /vntifkey="28" + /label=XhoI-pKACIT1-r + primer_bind 2292..2318 + /vntifkey="28" + /label=BspHI-pKACIT1-f +BASE COUNT 742 a 729 c 857 g 702 t +ORIGIN + 1 ggcatcaaat aaaacgaaag gctcagtcga aagactgggc ctttcgtttt atctgttgtt + 61 tgtcggtgaa cgctctcctg agtaggacaa atccgccgcc ctagacctag gcgttcggct + 121 agcttcacgc tgccgcaagc actcagggcg caagggctgc taaaggaagc ggaacacgta + 181 gaaagccagt ccgcagaaac ggtgctgacc ccggatgaat gtcagctact gggctatctg + 241 gacaagggaa aacgcaagcg caaagagaaa gcaggtagct tgcagtgggc ttacatggcg + 301 atagctagac tgggcggttt tatggacagc aagcgaaccg gaattgccag ctggggcgcc + 361 ctctggtaag gttgggaagc cctgcaaagt aaactggatg gctttcttgc cgccaaggat + 421 ctgatggcgc aggggatcaa gatctgatca agagacagga tgaggatcgt ttcgcatgat + 481 tgaacaagat ggattgcacg caggttctcc ggccgcttgg gtggagaggc tattcggcta + 541 tgactgggca caacagacaa tcggctgctc tgatgccgcc gtgttccggc tgtcagcgca + 601 ggggcgcccg gttctttttg tcaagaccga cctgtccggt gccctgaatg aactccaaga + 661 cgaggcagcg cggctatcgt ggctggccac gacgggcgtt ccttgcgcag ctgtgctcga + 721 cgttgtcact gaagcgggaa gggactggct gctattgggc gaagtgccgg ggcaggatct + 781 cctgtcatct caccttgctc ctgccgagaa agtatccatc atggctgatg caatgcggcg + 841 gctgcatacg cttgatccgg ctacctgccc attcgaccac caagcgaaac atcgcatcga + 901 gcgagcacgt actcggatgg aagccggtct tgtcgatcag gatgatctgg acgaagagca + 961 tcaggggctc gcgccagccg aactgttcgc caggctcaag gcgcggatgc ccgacggcga + 1021 ggatctcgtc gtgacccatg gcgatgcctg cttgccgaat atcatggtgg aaaatggccg + 1081 cttttctgga ttcatcgact gtggccggct gggtgtggcg gaccgctatc aggacatagc + 1141 gttggctacc cgtgatattg ctgaagagct tggcggcgaa tgggctgacc gcttcctcgt + 1201 gctttacggt atcgccgctc ccgattcgca gcgcatcgcc ttctatcgcc ttcttgacga + 1261 gttcttctga gcgggactct ggggttcgcg atgataagct gtcaaacatg agaattacaa + 1321 cttatatcgt atggggctga cttcaggtgc tacatttgaa gagataaatt gcactgaaat + 1381 cgaaatattt tatctgatta ataagatgat cttcttgaga tcgttttggt ctgcgcgtaa + 1441 tctcttgctc tgaaaacgaa aaaaccgcct tgcagggcgg tttttcgaag gttctctgag + 1501 ctaccaactc tttgaaccga ggtaactggc ttggaggagc gcagtcacca aaacttgtcc + 1561 tttcagttta gccttaaccg gcgcatgact tcaagactaa ctcctctaaa tcaattacca + 1621 gtggctgctg ccagtggtgc ttttgcatgt ctttccgggt tggactcaag acgatagtta + 1681 ccggataagg cgcagcggtc ggactgaacg gggggttcgt gcatacagtc cagcttggag + 1741 cgaactgcct acccggaact gagtgtcagg cgtggaatga gacaaacgcg gccataacag + 1801 cggaatgaca ccggtaaacc gaaaggcagg aacaggagag cgcacgaggg agccgccagg + 1861 ggaaacgcct ggtatcttta tagtcctgtc gggtttcgcc accactgatt tgagcgtcag + 1921 atttcgtgat gcttgtcagg ggggcggagc ctatggaaaa acggctttgc cttctttcct + 1981 gcgttatccc ctgattctgt ggataaccgt attaccgcct ttgagtgagc tgataccgct + 2041 cgccgcagcc gaacgaccga gcgcagcgag tcagtgagcg aggaagcgga agagcgccca + 2101 atacgcaaac cgcctctccc cgcgcgttgg ccgattcatt aatgcagctg gcacgacagg + 2161 tttcccgact ggaaagcggg cagtgagcgc aacgcaatta atgtgagtta gctcactcat + 2221 taggcacccc aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc + 2281 ggataacaat ttcacacagg aggaaaaaaa atgagcacaa aaaagaaacc attaacacaa + 2341 gagcagcttg aggacgcacg tcgccttaaa gcaatttatg aaaaaaagaa aaatgaactt + 2401 ggcttatccc aggaatctgt cgcagacaag atggggatgg ggcagtcagg cgttggtgct + 2461 ttatttaatg gcatcaatgc attaaatgct tataacgccg cattgcttac aaaaattctc + 2521 aaagttagcg ttgaagaatt tagcccttca atcgccagag aaatctacga gatgtatgaa + 2581 gcggttagta tgcagccgtc acttagaagt gagtatgagt accctgtttt ttctcatgtt + 2641 caggcaggga tgttctcacc tgagcttaga acctttacca aaggtgatgc ggagagatgg + 2701 gtaagcacaa ccaaaaaagc cagtgattct gcattctggc ttgaggttga aggtaattcc + 2761 atgaccgcac caacaggctc caagccaagc tttcctgacg gaatgttaat tctcgttgac + 2821 cctgagcagg ctgttgagcc aggtgatttc tgcatagcca gacttggggg tgatgagttt + 2881 accttcaaga aactgatcag ggatagcggt caggtgtttt tacaaccact aaacccacag + 2941 tacccaatga tcccatgcaa tgagagttgt tccgttgtgg ggaaagttat cgctagtcag + 3001 tggcctgaag agacgtttgg ctaatctaga +// diff --git a/lib/VNTI files/pK184.1.gb b/lib/VNTI files/pK184.1.gb new file mode 100644 index 00000000..b629bb7b --- /dev/null +++ b/lib/VNTI files/pK184.1.gb @@ -0,0 +1,1389 @@ +LOCUS pK184.1 2430 bp DNA circular SYN 8-APR-2009 +DEFINITION Cloning vector Pk184, complete sequence. +ACCESSION U00800 +VERSION U00800.1 GI:392879 +SOURCE Cloning vector Pk184. + ORGANISM Cloning vector Pk184 + artificial sequences; vectors. +REFERENCE 1 (bases 1 to 2432) + AUTHORS Jobling,M.G. and Holmes,R.K. + TITLE Construction of vectors with the p15a replicon, kanamycin + resistance, inducible lacZ alpha and pUC18 or pUC19 multiple + cloning sites + JOURNAL Nucleic Acids Res. 18 (17), 5315-5316 (1990) + MEDLINE 90384866 +REFERENCE 2 (bases 1 to 2432) + AUTHORS Jobling,M.G. + TITLE Direct Submission + JOURNAL Submitted (16-AUG-1993) Jobling M. G., Uniformed Services + University of the Health Sciences, Microbiology, 4301 Jones Bridge + Road, Bethesda, MD 20814-4799, USA +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|298488460| +COMMENT VNTDBDATE|514987727| +COMMENT LSOWNER| +COMMENT VNTNAME|pK184.1| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pK184.1" 0 2430 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 0 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 2430 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 2234 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 2229 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 2240 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 2264 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2223 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 2246 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 2213 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 1 2231 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 1 2229 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 64 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 12 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 8 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2390 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 0 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 3 838 1 1048 1 1974 1 0 +COMMENT "") #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 1 330 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "CDS(kan)_2" 4 0 0 365 1159 0 (CStringList) +COMMENT (CStringList "/gene=\"kan\"" "/function=\"kanamycin resistance\"" +COMMENT "/codon_start=1" "/transl_table=11" +COMMENT "/product=\"kanamycin phosphotransferase\"" +COMMENT "/protein_id=\"AAC43251.1\"" "/db_xref=\"GI:392880\"") 1 1 1 1 +COMMENT "365..1159") +COMMENT #28=(CFSignal (CObList) "oriV" 33 0 0 1859 1861 0 (CStringList) +COMMENT (CStringList "/standard_name=\"oriV\"") 1 1 1 1 "1861..1863") +COMMENT #29=(CFSignal (CObList) "lacZalpha" 4 0 0 2198 49 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2200..49") +COMMENT #30=(CFSignal (CObList) "P(lac)" 30 0 0 2076 2159 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2078..2161") +COMMENT #31=(CFSignal (CObList) "lacO" 20 0 0 2160 2180 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2162..2182") +COMMENT #32=(CFSignal (CObList) "p15a start" 21 0 0 1287 1290 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #33=(CFSignal (CObList) "SeqPK184.1" 28 0 0 1979 1999 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #34=(CFSignal (CObList) "SeqPK184.2r" 28 0 1 12 32 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #35=(CFSignal (CObList) "SeqPK184.3r" 28 0 1 2137 2157 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #36=(CFSignal (CObList) "pK184xba-rev" 28 0 1 1247 1270 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #37=(CFSignal (CObList) "pK184xba-fwd" 28 0 0 1271 1300 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "kanfwd" 28 0 0 1114 1136 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "-10" 47 0 0 2148 2153 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "-35" 48 0 0 2124 2129 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2126..2131")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #41=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #42=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pK184.1" 2) 5 "" +COMMENT 0 4) +COMMENT #43=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pK184.1'" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Cloning vector Pk184, complete sequence." 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 03/30/03 05:27\214\337\214\343" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 04/08/09 12:08\214\337\214\343" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 2430 bp" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 6-MAR-2003" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): U00800" +COMMENT 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: U00800.1 GI:392879" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Cloning vector Pk184." 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Cloning vector Pk184(Cloning vector Pk184)" +COMMENT 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: artificial sequences; vectors" 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Associated Genes: lacZalpha; kan" 1))) +COMMENT "Standard Fields") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 2432)" 1) +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Jobling,M.G. and Holmes,R.K." 1) +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Construction of vectors with the p15a replicon, kanamycin" +COMMENT 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " resistance, inducible lacZ alpha and pUC18 or pUC19 multiple" +COMMENT 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " cloning sites" 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nucleic Acids Res. 18 (17), 5315-5316 (1990)" +COMMENT 1) +COMMENT #69=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " MEDLINE 90384866" +COMMENT 1) +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 2432)" 1) +COMMENT #71=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Jobling,M.G." 1) +COMMENT #72=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #73=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (16-AUG-1993) Jobling M. G., Uniformed Services" +COMMENT 1) +COMMENT #74=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " University of the Health Sciences, Microbiology, 4301 Jones Bridge" +COMMENT 1) +COMMENT #75=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Road, Bethesda, MD 20814-4799, USA" 1))) +COMMENT "References") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #77=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #78=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 2 0 0 178) +COMMENT (CObjectList +COMMENT #81=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 365 (3 #27# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 365 End: 1159" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 365..1159" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"kan\"" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /function=\"kanamycin resistance\"" +COMMENT 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"kanamycin phosphotransferase\"" +COMMENT 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=AAC43251.1" +COMMENT 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:392880" +COMMENT 1))) "CDS(kan)_2") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2198 (3 #29# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2198 End: 49 " 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2200..49" 1))) "lacZalpha"))) +COMMENT "CDS (2 total)") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar (CParagraph 20 (7 20 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2160 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2160 End: 2180" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2162..2182" 1))) "lacO"))) +COMMENT "Misc. Binding Site (1 total)") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1287 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1287 End: 1290" 1))) +COMMENT "p15a start"))) "Misc. Feature (1 total)") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #107=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 12 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 12 End: 32 (Complementary)" +COMMENT 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) +COMMENT "SeqPK184.2r") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1114 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1114 End: 1136" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer for XbaI site" 1))) +COMMENT "kanfwd") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1247 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1247 End: 1270 (Complementary)" +COMMENT 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "primer used to create pK184.1" 1))) +COMMENT "pK184xba-rev") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1271 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1271 End: 1300" 1))) +COMMENT "pK184xba-fwd") +COMMENT #118=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1979 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1979 End: 1999" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) "SeqPK184.1") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2137 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2137 End: 2157 (Complementary)" +COMMENT 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) +COMMENT "SeqPK184.3r"))) +COMMENT "Primer Binding Site (6 total)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2076 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2076 End: 2159" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2078..2161" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #129=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1859 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1859 End: 1861" 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "p15a origin of DNA replication" 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1861..1863" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /standard_name=\"oriV\"" 1))) +COMMENT "oriV"))) "Replication Origin (1 total)") +COMMENT #137=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #138=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2148 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2148 End: 2153" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #140=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 2 1 0 178) +COMMENT (CObjectList +COMMENT #141=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2124 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2124 End: 2129" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2126..2131" 1))) "-35"))) +COMMENT "-35 Signal (1 total)"))) "Feature Map") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #146=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (0 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CFolderPar +COMMENT (CGroupPar (CParagraph 0 (0 0) 1 2 2 0 178) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 0 End: 0 " 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 0..0" 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"lacZalpha\"" 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"lacZ alpha peptide\"" +COMMENT 1) +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=\"AAC43252.1\"" 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=\"GI:392881\"" 1))) +COMMENT "CDS(lacZalpha)_1"))) "CDS (1 total)") +COMMENT #158=(CFolderPar +COMMENT (CGroupPar (CParagraph 60 (0 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #159=(CFolderPar +COMMENT (CGroupPar (CParagraph 0 (0 0) 1 2 2 0 178) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 0 End: 0 " 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 0..0" 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"lacZalpha\"" 1))) +COMMENT "Gene(lacZalpha)_1"))) "Gene (1 total)"))) +COMMENT "Imported Features Not Shown on Map") +COMMENT #165=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26609192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25350512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 64 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25328352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26619136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 0 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26597896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26619296 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 2234 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25353800 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26012184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25341864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #26# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #26# 1) 1 2 2 0 191) +COMMENT " N1: 330 " 1))))) "BglII: 1 site") +COMMENT 1 5 "AGATCT" "TCTAGA") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25340344 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #182=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 12 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25329712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BsaI: 0 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25353880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 0 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26619216 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25331232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #188=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 2213 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25357160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 2264 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25348112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 2229 " 1))))) "KpnI: 1 site") +COMMENT 5 1 "GGTACC" "CCATGG") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25347952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 8 " 1))))) "NheI: 1 site") 1 5 +COMMENT "GCTAGC" "CGATCG") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26178712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25354520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #201=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2390 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26610952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2223 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26597736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #207=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #208=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 2246 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25347712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #210=(CGroupPar +COMMENT (CParagraph 0 (10 #23# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #211=(CLinePar +COMMENT (CParagraph 0 (1 #23# 1) 1 2 2 0 191) +COMMENT " N1: 838 (on complementary strand)" +COMMENT 1) +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #23# 2) 1 2 2 0 191) +COMMENT " N2: 1048 (on complementary strand)" +COMMENT 1) +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #23# 3) 1 2 2 0 191) +COMMENT " N3: 1974 (on complementary strand)" +COMMENT 1))))) "SapI: 3 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26611272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #215=(CGroupPar +COMMENT (CParagraph 0 (10 #14# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #216=(CLinePar +COMMENT (CParagraph 0 (1 #14# 1) 1 2 2 0 191) +COMMENT " N1: 2231 " 1))))) "SmaI: 1 site") +COMMENT 3 3 "CCCGGG" "GGGCCC") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25461448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #218=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #219=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 2240 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #220=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25348992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XhoI: 0 sites") 1 5 "CTCGAG" +COMMENT "GAGCTC") +COMMENT #221=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25337960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #222=(CGroupPar +COMMENT (CParagraph 0 (10 #15# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #223=(CLinePar +COMMENT (CParagraph 0 (1 #15# 1) 1 2 2 0 191) +COMMENT " N1: 2229 " 1))))) "XmaI: 1 site") +COMMENT 1 5 "CCCGGG" "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #224=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #225=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #226=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #227=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #228=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #229=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #230=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #231=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #232=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #233=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #234=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #235=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #236=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #237=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #238=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #239=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #240=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #241=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #242=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #243=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #244=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #245=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #246=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #247=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #248=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #249=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #250=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #251=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #252=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #253=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #254=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #255=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #256=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #257=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #258=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #259=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #260=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #261=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #262=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #263=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 18.8877 -30.0771 40.0378 40.0378 0.01 10 -1 2430 2430 1 0 0) +COMMENT #264=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #265=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -664 100) +COMMENT (CObjectList +COMMENT #266=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 27559476 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27677 6.27477 1 0.0214037) 0.258156) +COMMENT #267=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pK184.1" "@N" 1 0 0.871165 0 -10 +COMMENT 4.49575 1.44863 Nil) +COMMENT #268=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #226# 1414808404 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "2430 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #269=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -454 100) +COMMENT (CObjectList +COMMENT #270=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1085 100) +COMMENT (CObjectList +COMMENT #271=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.28116 5.3335 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #272=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "CDS(kan) 2" +COMMENT "@N" 1 13.4711 -5.22699 0 -10 5.09519 1.04901 +COMMENT #271#) +COMMENT #273=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 6.14669 0.601503 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #274=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZalpha" "@N" +COMMENT 1 -5.90925 26.1349 0 -10 4.4458 1.04901 #273#)) +COMMENT (CObjectList)) +COMMENT #275=(CGroupWidget +COMMENT (CWidget 20 (7 20 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #276=(CLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #231# 3801528 +COMMENT 100) (LOGPEN 0 6 6723840) 8 0.835356 +COMMENT 0.645389 0.699602) +COMMENT #277=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 27951112 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT -9.66003 8.71165 0 -10 2.14797 1.04901 #276#)) +COMMENT (CObjectList)) +COMMENT #278=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 425 100) +COMMENT (CObjectList +COMMENT #279=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.9533 1.9 +COMMENT 0.082322 1) +COMMENT #280=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 24517572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "p15a start" +COMMENT "@N" 1 -8.4859 -10.454 0 -10 4.64561 1.04901 +COMMENT #279#)) (CObjectList)) +COMMENT #281=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #282=(CLine +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #246# 720906 +COMMENT 100) (LOGPEN 0 0 16711680) 1 0.835356 +COMMENT 1.11265 1.16686) +COMMENT #283=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.1" +COMMENT "@N" 1 -14.3889 0 0 -10 5.49481 1.04901 #282#) +COMMENT #284=(CLine +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #246# +COMMENT 1944545584 100) (LOGPEN 0 0 16711680) 1 +COMMENT 0.835356 6.19058 6.24479) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 1128748116 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.2r" +COMMENT "@N" 1 9.06087 10.454 0 -10 5.89443 1.04901 +COMMENT #284#) +COMMENT #286=(CLine +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #246# 720906 +COMMENT 100) (LOGPEN 0 0 16711680) 1 0.835356 +COMMENT 0.704765 0.758978) +COMMENT #287=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.3r" +COMMENT "@N" 1 -13.5616 5.22699 0 -10 5.89443 1.04901 +COMMENT #286#) +COMMENT #288=(CLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #246# 3801528 +COMMENT 100) (LOGPEN 0 0 16711680) 1 0.835356 +COMMENT 2.99461 3.05656) +COMMENT #289=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pK184xba-rev" +COMMENT "@N" 1 -5.03811 -13.9386 0 -10 6.46889 +COMMENT 1.04901 #288#) +COMMENT #290=(CLine +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #246# 3801528 +COMMENT 100) (LOGPEN 0 0 16711680) 1 0.835356 +COMMENT 2.91716 2.99461) +COMMENT #291=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pK184xba-fwd" +COMMENT "@N" 1 -5.83461 -12.1963 0 -10 6.54382 +COMMENT 1.04901 #290#) +COMMENT #292=(CLine +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #246# 3801528 +COMMENT 100) (LOGPEN 0 0 16711680) 1 0.835356 +COMMENT 3.34054 3.39991) +COMMENT #293=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "kanfwd" "@N" 1 +COMMENT 4.96115 -12.1963 0 -10 3.39679 1.04901 #292#)) +COMMENT (CObjectList)) +COMMENT #294=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList +COMMENT #295=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 1 +COMMENT 0.699602 0.916453 1 0.082322) 0.8 1.8 0) +COMMENT #296=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT -13.0495 1.74233 0 -10 2.67247 1.04901 #295#)) +COMMENT (CObjectList)) +COMMENT #297=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #298=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.47665 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "oriV" "@N" 1 +COMMENT -12.8739 -3.48466 0 -10 1.94816 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.730581 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT -10.7283 6.96932 0 -10 1.47361 1.04901 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1783 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.792538 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 168540081 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT -12.1996 3.48466 0 -10 1.47361 1.04901 #304#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #306=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1015 100) +COMMENT (CObjectList +COMMENT #307=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.508567 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #234# 1966095 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (2234)" "@N (@S)" 5 -9.71765 +COMMENT 19.1656 0 -10 5.61969 0.924127 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.521475 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (2229)" "@N (@S)" 5 -9.19962 +COMMENT 13.9386 0 -10 4.69556 0.924127 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1643 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.493078 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (2240)" "@N (@S)" 5 -9.15507 +COMMENT 20.908 0 -10 4.77049 0.924127 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.43112 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (2264)" "@N (@S)" 5 -9.00815 +COMMENT 24.3926 0 -10 5.56974 0.924127 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -178 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.536964 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #234# 1128748099 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2223)" "@N (@S)" 5 -9.10464 +COMMENT 12.1963 0 -10 4.64561 0.924127 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.477588 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (2246)" "@N (@S)" 5 -8.80532 +COMMENT 22.6503 0 -10 4.4458 0.924127 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1257 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.56278 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (2213)" "@N (@S)" 5 -9.52969 +COMMENT 10.454 0 -10 5.09519 0.924127 #326#)) +COMMENT (CObjectList)) +COMMENT #328=(CGroupWidget +COMMENT (CWidget 1 (10 #14# 0) 1 2 0 0 Nil -1198 100) +COMMENT (CObjectList +COMMENT #329=(CScratch +COMMENT (CWidget 1 (1 #14# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.516312 1.9 +COMMENT 0.082322 1) +COMMENT #330=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sma}I (2231)" "@N (@S)" 5 -9.31105 +COMMENT 17.4233 0 -10 4.89537 0.924127 #329#)) +COMMENT (CObjectList)) +COMMENT #331=(CGroupWidget +COMMENT (CWidget 1 (10 #15# 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #332=(CScratch +COMMENT (CWidget 1 (1 #15# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.521475 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xma}I (2229)" "@N (@S)" 5 -9.40645 +COMMENT 15.681 0 -10 5.02026 0.924127 #332#)) +COMMENT (CObjectList)) +COMMENT #334=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 425 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.11055 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (64)" "@N (@S)" 5 10.6619 +COMMENT 8.71165 0 -10 3.77144 0.924127 #335#)) +COMMENT (CObjectList)) +COMMENT #337=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -1714 100) +COMMENT (CObjectList +COMMENT #338=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.24479 1.9 +COMMENT 0.082322 1) +COMMENT #339=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (12)" "@N (@S)" 5 3.07254 12.1963 +COMMENT 0 -10 3.64655 0.924127 #338#)) (CObjectList)) +COMMENT #340=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -1783 100) +COMMENT (CObjectList +COMMENT #341=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.25511 1.9 +COMMENT 0.082322 1) +COMMENT #342=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (8)" "@N (@S)" 5 2.85557 13.9386 +COMMENT 0 -10 3.19698 0.924127 #341#)) (CObjectList)) +COMMENT #343=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #344=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.105844 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2390)" "@N (@S)" 5 -4.75975 +COMMENT 27.8773 0 -10 4.69556 0.924127 #344#)) +COMMENT (CObjectList)) +COMMENT #346=(CGroupWidget +COMMENT (CWidget 1 (10 #26# 0) 1 2 0 0 Nil -524 100) +COMMENT (CObjectList +COMMENT #347=(CScratch +COMMENT (CWidget 1 (1 #26# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42385 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bgl}II (330)" "@N (@S)" 5 12.218 +COMMENT 6.96932 0 -10 4.17106 0.924127 #347#)) +COMMENT (CObjectList)) +COMMENT #349=(CGroupWidget +COMMENT (CWidget 3 (10 #23# 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #350=(CScratch +COMMENT (CWidget 1 (1 #23# 1) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.11242 1.9 +COMMENT 0.082322 1) +COMMENT #351=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 24955372 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (838)" "@N (@S)" 5 12.2936 +COMMENT -6.96932 0 -10 4.17106 0.924127 #350#) +COMMENT #352=(CScratch +COMMENT (CWidget 2 (1 #23# 2) 1 2 0 0 #232# 432 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.57029 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (1048)" "@N (@S)" 5 8.72982 +COMMENT -10.454 0 -10 4.62063 0.924127 #352#) +COMMENT #354=(CScratch +COMMENT (CWidget 3 (1 #23# 3) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.17977 1.9 +COMMENT 0.082322 1) +COMMENT #355=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (1974)" "@N (@S)" 5 -14.0514 +COMMENT -1.74233 0 -10 4.62063 0.924127 #354#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #356=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1015 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #357=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 27066520 (CObList))) +FEATURES Location/Qualifiers + source 1..2430 + /organism="Cloning vector Pk184" + /db_xref="taxon:147269" + /lab_host="Escherichia coli" + /vntifkey="98" + gene 0..0 + /gene="lacZalpha" + /vntifkey="60" + CDS 0..0 + /gene="lacZalpha" + /codon_start=1 + /transl_table=11 + /product="lacZ alpha peptide" + /protein_id="AAC43252.1" + /db_xref="GI:392881" + /vntifkey="4" + /label=CDS(lacZalpha)_1 + gene 365..1159 + /gene="kan" + /vntifkey="60" + CDS 365..1159 + /gene="kan" + /function="kanamycin resistance" + /codon_start=1 + /transl_table=11 + /product="kanamycin phosphotransferase" + /protein_id="AAC43251.1" + /db_xref="GI:392880" + /vntifkey="4" + /label=CDS(kan)_2 + rep_origin 1859..1861 + /standard_name="oriV" + /vntifkey="33" + /label=oriV + /note="p15a origin of DNA replication" + -35_signal 2124..2129 + /vntifkey="48" + /label=-35 + CDS 2198..49 + /vntifkey="4" + /label=lacZalpha + promoter 2076..2159 + /vntifkey="30" + /label=P(lac) + misc_binding 2160..2180 + /vntifkey="20" + /label=lacO + misc_feature 1287..1290 + /vntifkey="21" + /label=p15a\start + primer_bind 1979..1999 + /vntifkey="28" + /label=SeqPK184.1 + /note="sequencing primer" + primer_bind complement(12..32) + /vntifkey="28" + /label=SeqPK184.2r + /note="sequencing primer" + primer_bind complement(2137..2157) + /vntifkey="28" + /label=SeqPK184.3r + /note="sequencing primer" + primer_bind complement(1247..1270) + /vntifkey="28" + /label=pK184xba-rev + /note="primer used to create pK184.1" + primer_bind 1271..1300 + /vntifkey="28" + /label=pK184xba-fwd + primer_bind 1114..1136 + /vntifkey="28" + /label=kanfwd + /note="sequencing primer for XbaI site" + -10_signal 2148..2153 + /vntifkey="47" + /label=-10 +BASE COUNT 550 a 630 c 711 g 539 t +ORIGIN + 1 cgataagcta gcttcacgct gccgcaagca ctcagggcgc aagggctgct aaaggaagcg + 61 gaacacgtag aaagccagtc cgcagaaacg gtgctgaccc cggatgaatg tcagctactg + 121 ggctatctgg acaagggaaa acgcaagcgc aaagagaaag caggtagctt gcagtgggct + 181 tacatggcga tagctagact gggcggtttt atggacagca agcgaaccgg aattgccagc + 241 tggggcgccc tctggtaagg ttgggaagcc ctgcaaagta aactggatgg ctttcttgcc + 301 gccaaggatc tgatggcgca ggggatcaag atctgatcaa gagacaggat gaggatcgtt + 361 tcgcatgatt gaacaagatg gattgcacgc aggttctccg gccgcttggg tggagaggct + 421 attcggctat gactgggcac aacagacaat cggctgctct gatgccgccg tgttccggct + 481 gtcagcgcag gggcgcccgg ttctttttgt caagaccgac ctgtccggtg ccctgaatga + 541 actccaagac gaggcagcgc ggctatcgtg gctggccacg acgggcgttc cttgcgcagc + 601 tgtgctcgac gttgtcactg aagcgggaag ggactggctg ctattgggcg aagtgccggg + 661 gcaggatctc ctgtcatctc accttgctcc tgccgagaaa gtatccatca tggctgatgc + 721 aatgcggcgg ctgcatacgc ttgatccggc tacctgccca ttcgaccacc aagcgaaaca + 781 tcgcatcgag cgagcacgta ctcggatgga agccggtctt gtcgatcagg atgatctgga + 841 cgaagagcat caggggctcg cgccagccga actgttcgcc aggctcaagg cgcggatgcc + 901 cgacggcgag gatctcgtcg tgacccatgg cgatgcctgc ttgccgaata tcatggtgga + 961 aaatggccgc ttttctggat tcatcgactg tggccggctg ggtgtggcgg accgctatca + 1021 ggacatagcg ttggctaccc gtgatattgc tgaagagctt ggcggcgaat gggctgaccg + 1081 cttcctcgtg ctttacggta tcgccgctcc cgattcgcag cgcatcgcct tctatcgcct + 1141 tcttgacgag ttcttctgag cgggactctg gggttcgcga tgataagctg tcaaacatga + 1201 gaattacaac ttatatcgta tggggctgac ttcaggtgct acatttgaag agataaattg + 1261 cactgaaatc gaaatatttt atctgattaa taagatgatc ttcttgagat cgttttggtc + 1321 tgcgcgtaat ctcttgctct gaaaacgaaa aaaccgcctt gcagggcggt ttttcgaagg + 1381 ttctctgagc taccaactct ttgaaccgag gtaactggct tggaggagcg cagtcaccaa + 1441 aacttgtcct ttcagtttag ccttaaccgg cgcatgactt caagactaac tcctctaaat + 1501 caattaccag tggctgctgc cagtggtgct tttgcatgtc tttccgggtt ggactcaaga + 1561 cgatagttac cggataaggc gcagcggtcg gactgaacgg ggggttcgtg catacagtcc + 1621 agcttggagc gaactgccta cccggaactg agtgtcaggc gtggaatgag acaaacgcgg + 1681 ccataacagc ggaatgacac cggtaaaccg aaaggcagga acaggagagc gcacgaggga + 1741 gccgccaggg gaaacgcctg gtatctttat agtcctgtcg ggtttcgcca ccactgattt + 1801 gagcgtcaga tttcgtgatg cttgtcaggg gggcggagcc tatggaaaaa cggctttgcc + 1861 ttctttcctg cgttatcccc tgattctgtg gataaccgta ttaccgcctt tgagtgagct + 1921 gataccgctc gccgcagccg aacgaccgag cgcagcgagt cagtgagcga ggaagcggaa + 1981 gagcgcccaa tacgcaaacc gcctctcccc gcgcgttggc cgattcatta atgcagctgg + 2041 cacgacaggt ttcccgactg gaaagcgggc agtgagcgca acgcaattaa tgtgagttag + 2101 ctcactcatt aggcacccca ggctttacac tttatgcttc cggctcgtat gttgtgtgga + 2161 attgtgagcg gataacaatt tcacacagga aacagctatg accatgatta cgaattcgag + 2221 ctcggtaccc ggggatcctc tagagtcgac ctgcaggcat gcaagcttgg cactggccgt + 2281 cgttttacaa cgtcgtgact gggaaaaccc tggcgttacc caacttaatc gccttgcagc + 2341 acatccccct ttcgccagct ggcgtaatag cgaagaggcc cgcaccgatc gcccttccca + 2401 acagttgcgc agcctgaatg gcgaatggcg +// diff --git a/lib/VNTI files/pK184.3.gb b/lib/VNTI files/pK184.3.gb new file mode 100644 index 00000000..d3bda797 --- /dev/null +++ b/lib/VNTI files/pK184.3.gb @@ -0,0 +1,1317 @@ +LOCUS pK184.3 2327 bp DNA circular SYN 2-SEP-2003 +DEFINITION p15A low copy expression vector based on pK184/pK184.1. Weaker rbs and KpnI site for cloning. T1 terminator added to pK184.2. +ACCESSION U00800 +VERSION U00800.1 GI:392879 +SOURCE Cloning vector Pk184. + ORGANISM Cloning vector Pk184 + artificial sequences; vectors. +REFERENCE 1 (bases 1 to 2432) + AUTHORS Jobling,M.G. and Holmes,R.K. + TITLE Construction of vectors with the p15a replicon, kanamycin + resistance, inducible lacZ alpha and pUC18 or pUC19 multiple + cloning sites + JOURNAL Nucleic Acids Res. 18 (17), 5315-5316 (1990) + MEDLINE 90384866 +REFERENCE 2 (bases 1 to 2432) + AUTHORS Jobling,M.G. + TITLE Direct Submission + JOURNAL Submitted (16-AUG-1993) Jobling M. G., Uniformed Services + University of the Health Sciences, Microbiology, 4301 Jones Bridge + Road, Bethesda, MD 20814-4799, USA +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|300659698| +COMMENT VNTDBDATE|312680200| +COMMENT LSOWNER| +COMMENT VNTNAME|pK184.3| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pK184.3" 0 2327 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 0 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 2327 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 2317 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 2308 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 2323 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 107 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 175 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 123 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 119 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 0 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 3 949 1 1159 1 2085 1 0 +COMMENT "") #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 1 441 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "CDS(kan)_2" 4 0 0 476 1270 0 (CStringList) +COMMENT (CStringList "/gene=\"kan\"" "/function=\"kanamycin resistance\"" +COMMENT "/codon_start=1" "/transl_table=11" +COMMENT "/product=\"kanamycin phosphotransferase\"" +COMMENT "/protein_id=\"AAC43251.1\"" "/db_xref=\"GI:392880\"") 1 1 1 1 +COMMENT "365..1159") +COMMENT #28=(CFSignal (CObList) "oriV" 33 0 0 1970 1972 0 (CStringList) +COMMENT (CStringList "/standard_name=\"oriV\"") 1 1 1 1 "1861..1863") +COMMENT #29=(CFSignal (CObList) "P(lac)" 30 0 0 2187 2270 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2078..2161") +COMMENT #30=(CFSignal (CObList) "lacO" 20 0 0 2271 2291 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2162..2182") +COMMENT #31=(CFSignal (CObList) "p15a start" 21 0 0 1398 1401 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #32=(CFSignal (CObList) "SeqPK184.1" 28 0 0 2090 2110 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #33=(CFSignal (CObList) "SeqPK184.2r" 28 0 1 123 143 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #34=(CFSignal (CObList) "SeqPK184.3r" 28 0 1 2248 2268 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #35=(CFSignal (CObList) "pK184xba-rev" 28 0 1 1358 1381 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #36=(CFSignal (CObList) "pK184xba-fwd" 28 0 0 1382 1411 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #37=(CFSignal (CObList) "kanfwd" 28 0 0 1225 1247 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "start codon" 21 0 0 2309 2311 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "T1" 43 0 0 1 105 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "PlacF" 27 0 0 2207 2227 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #41=(CFSignal (CObList) "-10" 47 0 0 2259 2264 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "-35" 48 0 0 2235 2240 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2126..2131")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #43=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #44=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pK184.3" 2) 5 "" +COMMENT 0 4) +COMMENT #45=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pK184.3'" 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "p15A low copy expression vector based on pK184/pK184.1. Weaker rbs and KpnI site for cloning. T1 terminator added to pK184.2" +COMMENT 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 04/23/03 08:34\214\337\214\343" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 09/02/03 11:36\214\337\214\343" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 2327 bp" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 6-MAR-2003" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): U00800" +COMMENT 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: U00800.1 GI:392879" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Cloning vector Pk184." 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Cloning vector Pk184(Cloning vector Pk184)" +COMMENT 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: artificial sequences; vectors" 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Associated Genes: lacZalpha; kan" 1))) +COMMENT "Standard Fields") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 2432)" 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Jobling,M.G. and Holmes,R.K." 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Construction of vectors with the p15a replicon, kanamycin" +COMMENT 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " resistance, inducible lacZ alpha and pUC18 or pUC19 multiple" +COMMENT 1) +COMMENT #69=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " cloning sites" 1) +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nucleic Acids Res. 18 (17), 5315-5316 (1990)" +COMMENT 1) +COMMENT #71=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " MEDLINE 90384866" +COMMENT 1) +COMMENT #72=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 2432)" 1) +COMMENT #73=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Jobling,M.G." 1) +COMMENT #74=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #75=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (16-AUG-1993) Jobling M. G., Uniformed Services" +COMMENT 1) +COMMENT #76=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " University of the Health Sciences, Microbiology, 4301 Jones Bridge" +COMMENT 1) +COMMENT #77=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Road, Bethesda, MD 20814-4799, USA" 1))) +COMMENT "References") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 1 178) +COMMENT (CObjectList +COMMENT #79=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #80=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #81=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 2 0 0 178) +COMMENT (CObjectList +COMMENT #83=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #84=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 476 (3 #27# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 476 End: 1270" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 365..1159" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"kan\"" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /function=\"kanamycin resistance\"" +COMMENT 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"kanamycin phosphotransferase\"" +COMMENT 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=AAC43251.1" +COMMENT 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:392880" +COMMENT 1))) "CDS(kan)_2"))) "CDS (1 total)") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar (CParagraph 20 (7 20 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2271 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2271 End: 2291" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2162..2182" 1))) "lacO"))) +COMMENT "Misc. Binding Site (1 total)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1398 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1398 End: 1401" 1))) +COMMENT "p15a start") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2309 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2309 End: 2311" 1))) +COMMENT "start codon"))) "Misc. Feature (2 total)") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #107=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2207 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2207 End: 2227" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 123 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 123 End: 143 (Complementary)" +COMMENT 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) +COMMENT "SeqPK184.2r") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1225 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1225 End: 1247" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer for XbaI site" 1))) +COMMENT "kanfwd") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1358 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1358 End: 1381 (Complementary)" +COMMENT 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "primer used to create pK184.1" 1))) +COMMENT "pK184xba-rev") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1382 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1382 End: 1411" 1))) +COMMENT "pK184xba-fwd") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2090 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2090 End: 2110" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) "SeqPK184.1") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2248 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2248 End: 2268 (Complementary)" +COMMENT 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) +COMMENT "SeqPK184.3r"))) +COMMENT "Primer Binding Site (6 total)") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #128=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2187 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2187 End: 2270" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2078..2161" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1970 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1970 End: 1972" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "p15a origin of DNA replication" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1861..1863" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /standard_name=\"oriV\"" 1))) +COMMENT "oriV"))) "Replication Origin (1 total)") +COMMENT #140=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #141=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1 End: 105 " 1))) "T1"))) +COMMENT "Terminator (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2259 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2259 End: 2264" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #146=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 2 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2235 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2235 End: 2240" 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2126..2131" 1))) "-35"))) +COMMENT "-35 Signal (1 total)"))) "Feature Map") +COMMENT #151=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #152=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (0 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CFolderPar +COMMENT (CGroupPar (CParagraph 0 (0 0) 1 2 2 0 178) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 0 End: 0 " 1) +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 0..0" 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"lacZalpha\"" 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"lacZ alpha peptide\"" +COMMENT 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=\"AAC43252.1\"" 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=\"GI:392881\"" 1))) +COMMENT "CDS(lacZalpha)_1"))) "CDS (1 total)") +COMMENT #164=(CFolderPar +COMMENT (CGroupPar (CParagraph 60 (0 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #165=(CFolderPar +COMMENT (CGroupPar (CParagraph 0 (0 0) 1 2 2 0 178) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 0 End: 0 " 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 0..0" 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"lacZalpha\"" 1))) +COMMENT "Gene(lacZalpha)_1"))) "Gene (1 total)"))) +COMMENT "Imported Features Not Shown on Map") +COMMENT #171=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26274608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26885344 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 175 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26885664 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26271768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 0 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26845832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 107 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26844872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #182=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 2317 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26886384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26262880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26886464 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #26# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #26# 1) 1 2 2 0 191) +COMMENT " N1: 441 " 1))))) "BglII: 1 site") +COMMENT 1 5 "AGATCT" "TCTAGA") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26885424 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 123 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26885824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BsaI: 0 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26886304 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 0 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26271928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26271048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "EcoRI: 0 sites") 1 5 "GAATTC" +COMMENT "CTTAAG") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26274048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26845032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #198=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #199=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 2308 " 1))))) "KpnI: 1 site") +COMMENT 5 1 "GGTACC" "CCATGG") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26885504 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #201=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 119 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26255096 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26885744 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 0 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26274128 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26274208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 0 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26886224 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #208=(CGroupPar +COMMENT (CParagraph 0 (10 #23# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #209=(CLinePar +COMMENT (CParagraph 0 (1 #23# 1) 1 2 2 0 191) +COMMENT " N1: 949 (on complementary strand)" +COMMENT 1) +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #23# 2) 1 2 2 0 191) +COMMENT " N2: 1159 (on complementary strand)" +COMMENT 1) +COMMENT #211=(CLinePar +COMMENT (CParagraph 0 (1 #23# 3) 1 2 2 0 191) +COMMENT " N3: 2085 (on complementary strand)" +COMMENT 1))))) "SapI: 3 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #212=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26288840 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #213=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26272008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #214=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #215=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 2323 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #216=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26885584 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XhoI: 0 sites") 1 5 "CTCGAG" +COMMENT "GAGCTC") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26885264 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #218=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #219=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #220=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #221=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #222=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #223=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #224=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #225=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #226=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #227=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #228=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #229=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #230=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #231=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #232=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #233=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #234=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #235=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #236=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #237=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #238=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #239=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #240=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #241=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #242=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #243=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #244=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #245=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #246=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #247=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #248=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #249=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #250=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #251=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #252=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #253=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #254=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #255=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #256=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #257=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 18.9724 -26.6054 40.0378 40.0378 0.01 10 -1 2327 2327 1 0 0) +COMMENT #258=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #259=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #260=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 27031948 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27688 6.27488 1 0.0214037) 0.269583) +COMMENT #261=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #221# 1128350535 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pK184.3" "@N" 1 0 0.871165 0 -10 +COMMENT 4.49575 1.44863 Nil) +COMMENT #262=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "2327 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #263=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -315 100) +COMMENT (CObjectList +COMMENT #264=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -176 100) +COMMENT (CObjectList +COMMENT #265=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.84949 4.99267 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #266=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "CDS(kan) 2" +COMMENT "@N" 1 12.9244 -8.71165 0 -10 5.09519 1.04901 +COMMENT #265#)) (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 20 (7 20 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #268=(CLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #225# +COMMENT 1944545584 100) (LOGPEN 0 6 6723840) 8 +COMMENT 0.835356 0.0970497 0.153662) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 1944749780 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT -3.60764 17.4233 0 -10 2.14797 1.04901 #268#)) +COMMENT (CObjectList)) +COMMENT #270=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #271=(CScratch +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.50712 1.9 +COMMENT 0.082322 1) +COMMENT #272=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "p15a start" +COMMENT "@N" 1 -12.6718 -8.71165 0 -10 4.64561 +COMMENT 1.04901 #271#) +COMMENT #273=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.0512207 1.9 +COMMENT 0.082322 1) +COMMENT #274=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "start codon" +COMMENT "@N" 1 -4.0815 20.908 0 -10 5.36993 1.04901 +COMMENT #273#)) (CObjectList)) +COMMENT #275=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList +COMMENT #276=(CPrimerArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1.16464 0.269583 +COMMENT 0.326195) 0.4 0.082322 1.8 1.8 0) +COMMENT #277=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT -11.818 8.71165 0 -10 2.59755 1.04901 #276#)) +COMMENT (CObjectList)) +COMMENT #278=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #279=(CLine +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #240# +COMMENT 1944545584 100) (LOGPEN 0 0 16711680) 1 +COMMENT 0.835356 0.584994 0.641606) +COMMENT #280=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.1" +COMMENT "@N" 1 -14.2077 6.96932 0 -10 5.49481 1.04901 +COMMENT #279#) +COMMENT #281=(CLine +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #240# 3801504 +COMMENT 100) (LOGPEN 0 0 16711680) 1 0.835356 +COMMENT 5.88768 5.94429) +COMMENT #282=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.2r" +COMMENT "@N" 1 13.2467 8.71165 0 -10 5.89443 1.04901 +COMMENT #281#) +COMMENT #283=(CLine +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #240# 98 100) +COMMENT (LOGPEN 0 0 16711680) 1 0.835356 0.159054 +COMMENT 0.215666) +COMMENT #284=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.3r" +COMMENT "@N" 1 -5.87485 13.9386 0 -10 5.89443 1.04901 +COMMENT #283#) +COMMENT #285=(CLine +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #240# 3801528 +COMMENT 100) (LOGPEN 0 0 16711680) 1 0.835356 +COMMENT 2.55025 2.61495) +COMMENT #286=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pK184xba-rev" +COMMENT "@N" 1 -10.5707 -12.1963 0 -10 6.46889 +COMMENT 1.04901 #285#) +COMMENT #287=(CLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #240# 3801528 +COMMENT 100) (LOGPEN 0 0 16711680) 1 0.835356 +COMMENT 2.46938 2.55025) +COMMENT #288=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pK184xba-fwd" +COMMENT "@N" 1 -11.867 -10.454 0 -10 6.54382 1.04901 +COMMENT #287#) +COMMENT #289=(CLine +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #240# 3801528 +COMMENT 100) (LOGPEN 0 0 16711680) 1 0.835356 +COMMENT 2.91149 2.9735) +COMMENT #290=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "kanfwd" "@N" 1 +COMMENT -4.92352 -13.9386 0 -10 3.39679 1.04901 #289#)) +COMMENT (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #292=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 1 +COMMENT 0.153662 0.380111 1 0.082322) 0.8 1.8 0) +COMMENT #293=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT -10.1944 10.454 0 -10 2.67247 1.04901 #292#)) +COMMENT (CObjectList)) +COMMENT #294=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #295=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.965105 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #219# 44677320 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "oriV" "@N" 1 +COMMENT -13.9301 3.48466 0 -10 1.94816 1.04901 #295#)) +COMMENT (CObjectList)) +COMMENT #297=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil 604 100) +COMMENT (CObjectList +COMMENT #298=(CLine +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #227# 293 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 5.99012 +COMMENT 6.27319) +COMMENT #299=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 3.45416 15.681 0 -10 1.14891 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.186012 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT -4.02482 15.681 0 -10 1.47361 1.04901 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.250712 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel (CWidget 0 (0 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT -7.005 12.1963 0 -10 1.47361 1.04901 #304#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #306=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -528 100) +COMMENT (CObjectList +COMMENT #307=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.0296541 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (2317)" "@N (@S)" 5 -4.23772 +COMMENT 22.6503 0 -10 5.56974 0.924127 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil -807 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.0539165 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (2308)" "@N (@S)" 5 -4.15434 +COMMENT 19.1656 0 -10 4.69556 0.924127 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.0134791 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (2323)" "@N (@S)" 5 -3.65378 +COMMENT 24.3926 0 -10 4.77049 0.924127 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -249 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.98743 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (107)" "@N (@S)" 5 6.84628 +COMMENT 13.9386 0 -10 4.32092 0.924127 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil -1435 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.80411 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (175)" "@N (@S)" 5 13.9115 +COMMENT 6.96932 0 -10 4.22101 0.924127 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.94429 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (123)" "@N (@S)" 5 11.0917 10.454 +COMMENT 0 -10 4.17106 0.924127 #323#)) (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -1435 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.95508 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (119)" "@N (@S)" 5 8.32917 +COMMENT 12.1963 0 -10 4.12111 0.924127 #326#)) +COMMENT (CObjectList)) +COMMENT #328=(CGroupWidget +COMMENT (CWidget 1 (10 #26# 0) 1 2 0 0 Nil -1059 100) +COMMENT (CObjectList +COMMENT #329=(CScratch +COMMENT (CWidget 1 (1 #26# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.08702 1.9 +COMMENT 0.082322 1) +COMMENT #330=(CLabel (CWidget 0 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bgl}II (441)" "@N (@S)" 5 14.7568 +COMMENT 5.22699 0 -10 4.12111 0.924127 #329#)) +COMMENT (CObjectList)) +COMMENT #331=(CGroupWidget +COMMENT (CWidget 3 (10 #23# 0) 1 2 0 0 Nil -1118 100) +COMMENT (CObjectList +COMMENT #332=(CScratch +COMMENT (CWidget 1 (1 #23# 1) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.71754 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24665612 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (949)" "@N (@S)" 5 11.0394 +COMMENT -10.454 0 -10 4.17106 0.924127 #332#) +COMMENT #334=(CScratch +COMMENT (CWidget 2 (1 #23# 2) 1 2 0 0 #226# 432 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.15142 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (1159)" "@N (@S)" 5 3.08227 +COMMENT -13.9386 0 -10 4.57068 0.924127 #334#) +COMMENT #336=(CScratch +COMMENT (CWidget 3 (1 #23# 3) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.655086 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (2085)" "@N (@S)" 5 -14.8602 +COMMENT 5.22699 0 -10 4.69556 0.924127 #336#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #338=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #339=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 27066520 (CObList))) +FEATURES Location/Qualifiers + source 118..2327 + /organism="Cloning vector Pk184" + /db_xref="taxon:147269" + /lab_host="Escherichia coli" + /vntifkey="98" + gene 0..0 + /gene="lacZalpha" + /vntifkey="60" + CDS 0..0 + /gene="lacZalpha" + /codon_start=1 + /transl_table=11 + /product="lacZ alpha peptide" + /protein_id="AAC43252.1" + /db_xref="GI:392881" + /vntifkey="4" + /label=CDS(lacZalpha)_1 + gene 476..1270 + /gene="kan" + /vntifkey="60" + CDS 476..1270 + /gene="kan" + /function="kanamycin resistance" + /codon_start=1 + /transl_table=11 + /product="kanamycin phosphotransferase" + /protein_id="AAC43251.1" + /db_xref="GI:392880" + /vntifkey="4" + /label=CDS(kan)_2 + rep_origin 1970..1972 + /standard_name="oriV" + /vntifkey="33" + /label=oriV + /note="p15a origin of DNA replication" + -35_signal 2235..2240 + /vntifkey="48" + /label=-35 + promoter 2187..2270 + /vntifkey="30" + /label=P(lac) + misc_binding 2271..2291 + /vntifkey="20" + /label=lacO + misc_feature 1398..1401 + /vntifkey="21" + /label=p15a\start + primer_bind 2090..2110 + /vntifkey="28" + /label=SeqPK184.1 + /note="sequencing primer" + primer_bind complement(123..143) + /vntifkey="28" + /label=SeqPK184.2r + /note="sequencing primer" + primer_bind complement(2248..2268) + /vntifkey="28" + /label=SeqPK184.3r + /note="sequencing primer" + primer_bind complement(1358..1381) + /vntifkey="28" + /label=pK184xba-rev + /note="primer used to create pK184.1" + primer_bind 1382..1411 + /vntifkey="28" + /label=pK184xba-fwd + primer_bind 1225..1247 + /vntifkey="28" + /label=kanfwd + /note="sequencing primer for XbaI site" + misc_feature 2309..2311 + /vntifkey="21" + /label=start\codon + terminator 1..105 + /vntifkey="43" + /label=T1 + primer 2207..2227 + /vntifkey="27" + /label=PlacF + -10_signal 2259..2264 + /vntifkey="47" + /label=-10 +BASE COUNT 526 a 590 c 687 g 524 t +ORIGIN + 1 ggcatcaaat aaaacgaaag gctcagtcga aagactgggc ctttcgtttt atctgttgtt + 61 tgtcggtgaa cgctctcctg agtaggacaa atccgccgcc ctagacctag gcgttcggct + 121 agcttcacgc tgccgcaagc actcagggcg caagggctgc taaaggaagc ggaacacgta + 181 gaaagccagt ccgcagaaac ggtgctgacc ccggatgaat gtcagctact gggctatctg + 241 gacaagggaa aacgcaagcg caaagagaaa gcaggtagct tgcagtgggc ttacatggcg + 301 atagctagac tgggcggttt tatggacagc aagcgaaccg gaattgccag ctggggcgcc + 361 ctctggtaag gttgggaagc cctgcaaagt aaactggatg gctttcttgc cgccaaggat + 421 ctgatggcgc aggggatcaa gatctgatca agagacagga tgaggatcgt ttcgcatgat + 481 tgaacaagat ggattgcacg caggttctcc ggccgcttgg gtggagaggc tattcggcta + 541 tgactgggca caacagacaa tcggctgctc tgatgccgcc gtgttccggc tgtcagcgca + 601 ggggcgcccg gttctttttg tcaagaccga cctgtccggt gccctgaatg aactccaaga + 661 cgaggcagcg cggctatcgt ggctggccac gacgggcgtt ccttgcgcag ctgtgctcga + 721 cgttgtcact gaagcgggaa gggactggct gctattgggc gaagtgccgg ggcaggatct + 781 cctgtcatct caccttgctc ctgccgagaa agtatccatc atggctgatg caatgcggcg + 841 gctgcatacg cttgatccgg ctacctgccc attcgaccac caagcgaaac atcgcatcga + 901 gcgagcacgt actcggatgg aagccggtct tgtcgatcag gatgatctgg acgaagagca + 961 tcaggggctc gcgccagccg aactgttcgc caggctcaag gcgcggatgc ccgacggcga + 1021 ggatctcgtc gtgacccatg gcgatgcctg cttgccgaat atcatggtgg aaaatggccg + 1081 cttttctgga ttcatcgact gtggccggct gggtgtggcg gaccgctatc aggacatagc + 1141 gttggctacc cgtgatattg ctgaagagct tggcggcgaa tgggctgacc gcttcctcgt + 1201 gctttacggt atcgccgctc ccgattcgca gcgcatcgcc ttctatcgcc ttcttgacga + 1261 gttcttctga gcgggactct ggggttcgcg atgataagct gtcaaacatg agaattacaa + 1321 cttatatcgt atggggctga cttcaggtgc tacatttgaa gagataaatt gcactgaaat + 1381 cgaaatattt tatctgatta ataagatgat cttcttgaga tcgttttggt ctgcgcgtaa + 1441 tctcttgctc tgaaaacgaa aaaaccgcct tgcagggcgg tttttcgaag gttctctgag + 1501 ctaccaactc tttgaaccga ggtaactggc ttggaggagc gcagtcacca aaacttgtcc + 1561 tttcagttta gccttaaccg gcgcatgact tcaagactaa ctcctctaaa tcaattacca + 1621 gtggctgctg ccagtggtgc ttttgcatgt ctttccgggt tggactcaag acgatagtta + 1681 ccggataagg cgcagcggtc ggactgaacg gggggttcgt gcatacagtc cagcttggag + 1741 cgaactgcct acccggaact gagtgtcagg cgtggaatga gacaaacgcg gccataacag + 1801 cggaatgaca ccggtaaacc gaaaggcagg aacaggagag cgcacgaggg agccgccagg + 1861 ggaaacgcct ggtatcttta tagtcctgtc gggtttcgcc accactgatt tgagcgtcag + 1921 atttcgtgat gcttgtcagg ggggcggagc ctatggaaaa acggctttgc cttctttcct + 1981 gcgttatccc ctgattctgt ggataaccgt attaccgcct ttgagtgagc tgataccgct + 2041 cgccgcagcc gaacgaccga gcgcagcgag tcagtgagcg aggaagcgga agagcgccca + 2101 atacgcaaac cgcctctccc cgcgcgttgg ccgattcatt aatgcagctg gcacgacagg + 2161 tttcccgact ggaaagcggg cagtgagcgc aacgcaatta atgtgagtta gctcactcat + 2221 taggcacccc aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc + 2281 ggataacaat ttcacacagg acggtaccat ggcggggatc ctctaga +// diff --git a/lib/VNTI files/pK184.gb b/lib/VNTI files/pK184.gb new file mode 100644 index 00000000..7a720092 --- /dev/null +++ b/lib/VNTI files/pK184.gb @@ -0,0 +1,1446 @@ +LOCUS pK184 2432 bp DNA circular SYN 8-APR-2009 +DEFINITION Cloning vector Pk184, complete sequence. +ACCESSION U00800 +VERSION U00800.1 GI:392879 +SOURCE Cloning vector Pk184. + ORGANISM Cloning vector Pk184 + artificial sequences; vectors. +REFERENCE 1 (bases 1 to 2432) + AUTHORS Jobling,M.G. and Holmes,R.K. + TITLE Construction of vectors with the p15a replicon, kanamycin + resistance, inducible lacZ alpha and pUC18 or pUC19 multiple + cloning sites + JOURNAL Nucleic Acids Res. 18 (17), 5315-5316 (1990) + MEDLINE 90384866 +REFERENCE 2 (bases 1 to 2432) + AUTHORS Jobling,M.G. + TITLE Direct Submission + JOURNAL Submitted (16-AUG-1993) Jobling M. G., Uniformed Services + University of the Health Sciences, Microbiology, 4301 Jones Bridge + Road, Bethesda, MD 20814-4799, USA +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|296409279| +COMMENT VNTDBDATE|514986622| +COMMENT LSOWNER| +COMMENT VNTNAME|pK184| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pK184" 0 2432 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 0 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 2432 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 2236 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 2231 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 2 1270 0 2242 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 2266 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2225 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 2248 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 2215 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 1 2233 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 1 2231 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 64 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 12 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 8 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2392 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 0 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 3 838 1 1048 1 1976 1 0 +COMMENT "") #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 1 330 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "CDS(kan)_2" 4 0 0 365 1159 0 (CStringList) +COMMENT (CStringList "/gene=\"kan\"" "/function=\"kanamycin resistance\"" +COMMENT "/codon_start=1" "/transl_table=11" +COMMENT "/product=\"kanamycin phosphotransferase\"" +COMMENT "/protein_id=\"AAC43251.1\"" "/db_xref=\"GI:392880\"") 1 1 1 1 +COMMENT "365..1159") +COMMENT #28=(CFSignal (CObList) "oriV" 33 0 0 1861 1863 0 (CStringList) +COMMENT (CStringList "/standard_name=\"oriV\"") 1 1 1 1 "1861..1863") +COMMENT #29=(CFSignal (CObList) "lacZalpha" 4 0 0 2200 49 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2200..49") +COMMENT #30=(CFSignal (CObList) "P(lac)" 30 0 0 2078 2161 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2078..2161") +COMMENT #31=(CFSignal (CObList) "lacO" 20 0 0 2162 2182 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2162..2182") +COMMENT #32=(CFSignal (CObList) "p15a start" 21 0 0 1289 1292 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #33=(CFSignal (CObList) "SeqPK184.1" 28 0 0 1981 2001 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #34=(CFSignal (CObList) "SeqPK184.2r" 28 0 1 12 32 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #35=(CFSignal (CObList) "SeqPK184.3r" 28 0 1 2139 2159 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #36=(CFSignal (CObList) "pK184xba-rev" 28 0 1 1247 1270 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #37=(CFSignal (CObList) "pK184xba-fwd" 28 0 0 1273 1302 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "kanfwd" 28 0 0 1114 1136 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "PlacF" 27 0 0 2098 2118 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "-10" 47 0 0 2150 2155 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #41=(CFSignal (CObList) "-35" 48 0 0 2126 2131 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2126..2131")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #42=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #43=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pK184" 2) 5 "" 0 +COMMENT 4) +COMMENT #44=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pK184'" 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Cloning vector Pk184, complete sequence." 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 03/06/03 03:54\214\337\214\343" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 04/08/09 11:50\214\337\221O" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 2432 bp" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 6-MAR-2003" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): U00800" +COMMENT 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: U00800.1 GI:392879" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Cloning vector Pk184." 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Cloning vector Pk184(Cloning vector Pk184)" +COMMENT 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: artificial sequences; vectors" 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Associated Genes: lacZalpha; kan" 1))) +COMMENT "Standard Fields") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 2432)" 1) +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Jobling,M.G. and Holmes,R.K." 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Construction of vectors with the p15a replicon, kanamycin" +COMMENT 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " resistance, inducible lacZ alpha and pUC18 or pUC19 multiple" +COMMENT 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " cloning sites" 1) +COMMENT #69=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nucleic Acids Res. 18 (17), 5315-5316 (1990)" +COMMENT 1) +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " MEDLINE 90384866" +COMMENT 1) +COMMENT #71=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 2432)" 1) +COMMENT #72=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Jobling,M.G." 1) +COMMENT #73=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #74=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (16-AUG-1993) Jobling M. G., Uniformed Services" +COMMENT 1) +COMMENT #75=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " University of the Health Sciences, Microbiology, 4301 Jones Bridge" +COMMENT 1) +COMMENT #76=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Road, Bethesda, MD 20814-4799, USA" 1))) +COMMENT "References") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #78=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #79=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #80=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 2 0 0 178) +COMMENT (CObjectList +COMMENT #82=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 365 (3 #27# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 365 End: 1159" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 365..1159" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"kan\"" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /function=\"kanamycin resistance\"" +COMMENT 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"kanamycin phosphotransferase\"" +COMMENT 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=AAC43251.1" +COMMENT 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:392880" +COMMENT 1))) "CDS(kan)_2") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2200 (3 #29# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2200 End: 49 " 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2200..49" 1))) "lacZalpha"))) +COMMENT "CDS (2 total)") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar (CParagraph 20 (7 20 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2162 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2162 End: 2182" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2162..2182" 1))) "lacO"))) +COMMENT "Misc. Binding Site (1 total)") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1289 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1289 End: 1292" 1))) +COMMENT "p15a start"))) "Misc. Feature (1 total)") +COMMENT #107=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2098 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2098 End: 2118" 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #111=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #112=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 12 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 12 End: 32 (Complementary)" +COMMENT 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) +COMMENT "SeqPK184.2r") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1114 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1114 End: 1136" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer for XbaI site" 1))) +COMMENT "kanfwd") +COMMENT #118=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1247 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1247 End: 1270 (Complementary)" +COMMENT 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "primer used to create pK184.1" 1))) +COMMENT "pK184xba-rev") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1273 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1273 End: 1302" 1))) +COMMENT "pK184xba-fwd") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1981 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1981 End: 2001" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) "SeqPK184.1") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2139 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2139 End: 2159 (Complementary)" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1))) +COMMENT "SeqPK184.3r"))) +COMMENT "Primer Binding Site (6 total)") +COMMENT #129=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2078 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2078 End: 2161" 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2078..2161" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1861 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1861 End: 1863" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "p15a origin of DNA replication" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1861..1863" 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /standard_name=\"oriV\"" 1))) +COMMENT "oriV"))) "Replication Origin (1 total)") +COMMENT #142=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #143=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2150 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2150 End: 2155" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 2 1 0 178) +COMMENT (CObjectList +COMMENT #146=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2126 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2126 End: 2131" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2126..2131" 1))) "-35"))) +COMMENT "-35 Signal (1 total)"))) "Feature Map") +COMMENT #150=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #151=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (0 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #152=(CFolderPar +COMMENT (CGroupPar (CParagraph 0 (0 0) 1 2 2 0 178) +COMMENT (CObjectList +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 0 End: 0 " 1) +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 0..0" 1) +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"lacZalpha\"" 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"lacZ alpha peptide\"" +COMMENT 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=\"AAC43252.1\"" 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=\"GI:392881\"" 1))) +COMMENT "CDS(lacZalpha)_1"))) "CDS (1 total)") +COMMENT #163=(CFolderPar +COMMENT (CGroupPar (CParagraph 60 (0 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CFolderPar +COMMENT (CGroupPar (CParagraph 0 (0 0) 1 2 2 0 178) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 0 End: 0 " 1) +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 0..0" 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"lacZalpha\"" 1))) +COMMENT "Gene(lacZalpha)_1"))) "Gene (1 total)"))) +COMMENT "Imported Features Not Shown on Map") +COMMENT #170=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26254376 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26327896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #173=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 64 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26338624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26299680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 0 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26290040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26299840 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 2236 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26345920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26300640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26345840 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #184=(CGroupPar +COMMENT (CParagraph 0 (10 #26# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #26# 1) 1 2 2 0 191) +COMMENT " N1: 330 " 1))))) "BglII: 1 site") +COMMENT 1 5 "AGATCT" "TCTAGA") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26327976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 12 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26338784 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BsaI: 0 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26346000 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 0 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26299760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26339344 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #193=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #194=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 2215 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26299920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 2266 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26300080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 2231 " 1))))) "KpnI: 1 site") +COMMENT 5 1 "GGTACC" "CCATGG") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26328056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #202=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #203=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 8 " 1))))) "NheI: 1 site") 1 5 +COMMENT "GCTAGC" "CGATCG") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26300720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26338704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #206=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #207=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2392 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26299280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2225 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26289880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #212=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 2248 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26338864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #215=(CGroupPar +COMMENT (CParagraph 0 (10 #23# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #216=(CLinePar +COMMENT (CParagraph 0 (1 #23# 1) 1 2 2 0 191) +COMMENT " N1: 838 (on complementary strand)" +COMMENT 1) +COMMENT #217=(CLinePar +COMMENT (CParagraph 0 (1 #23# 2) 1 2 2 0 191) +COMMENT " N2: 1048 (on complementary strand)" +COMMENT 1) +COMMENT #218=(CLinePar +COMMENT (CParagraph 0 (1 #23# 3) 1 2 2 0 191) +COMMENT " N3: 1976 (on complementary strand)" +COMMENT 1))))) "SapI: 3 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #219=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26299600 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #220=(CGroupPar +COMMENT (CParagraph 0 (10 #14# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #221=(CLinePar +COMMENT (CParagraph 0 (1 #14# 1) 1 2 2 0 191) +COMMENT " N1: 2233 " 1))))) "SmaI: 1 site") +COMMENT 3 3 "CCCGGG" "GGGCCC") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26300000 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #223=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #224=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1270 " 1) +COMMENT #225=(CLinePar +COMMENT (CParagraph 0 (1 #4# 2) 1 2 2 0 191) +COMMENT " N2: 2242 " 1))))) "XbaI: 2 sites") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #226=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26328136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XhoI: 0 sites") 1 5 "CTCGAG" +COMMENT "GAGCTC") +COMMENT #227=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26326200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #228=(CGroupPar +COMMENT (CParagraph 0 (10 #15# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #229=(CLinePar +COMMENT (CParagraph 0 (1 #15# 1) 1 2 2 0 191) +COMMENT " N1: 2231 " 1))))) "XmaI: 1 site") +COMMENT 1 5 "CCCGGG" "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #230=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #231=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #232=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #233=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #234=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #235=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #236=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #237=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #238=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #239=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #240=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #241=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #242=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #243=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #244=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #245=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #246=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #247=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #248=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #249=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #250=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #251=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #252=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #253=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #254=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #255=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #256=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #257=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #258=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #259=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #260=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #261=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #262=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #263=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #264=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #265=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #266=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #267=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #268=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #269=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 20.3862 -31.8255 40.0378 40.0378 0.01 10 -1 2432 2432 1 0 0) +COMMENT #270=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #271=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1361 100) +COMMENT (CObjectList +COMMENT #272=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 24763140 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27676 6.27476 1 0.0214037) 0.257943) +COMMENT #273=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #233# 1966095 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pK184" "@N" 1 0 0.871165 0 -10 +COMMENT 3.44674 1.44863 Nil) +COMMENT #274=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #232# 268742952 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "2432 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #275=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1780 100) +COMMENT (CObjectList +COMMENT #276=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1571 100) +COMMENT (CObjectList +COMMENT #277=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.28362 5.33427 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #278=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 1128748116 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "CDS(kan) 2" +COMMENT "@N" 1 14.8253 -5.22699 0 -10 5.09519 1.04901 +COMMENT #277#) +COMMENT #279=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #234# +COMMENT 1413956419 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 6.14679 0.601008 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #280=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 24691448 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZalpha" "@N" +COMMENT 1 -6.24194 27.8773 0 -10 4.4458 1.04901 #279#)) +COMMENT (CObjectList)) +COMMENT #281=(CGroupWidget +COMMENT (CWidget 20 (7 20 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #282=(CLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #237# +COMMENT 1944545584 100) (LOGPEN 0 6 6723840) 8 +COMMENT 0.835356 0.644859 0.699027) +COMMENT #283=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 1096041287 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT -9.96788 10.454 0 -10 2.14797 1.04901 #282#)) +COMMENT (CObjectList)) +COMMENT #284=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #285=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.95087 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel (CWidget 0 (0 0) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "p15a start" +COMMENT "@N" 1 -8.36402 -12.1963 0 -10 4.64561 +COMMENT 1.04901 #285#)) (CObjectList)) +COMMENT #287=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -734 100) +COMMENT (CObjectList +COMMENT #288=(CPrimerArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1.16464 0.809942 +COMMENT 0.864111) 0.4 0.082322 1.8 1.8 0) +COMMENT #289=(CLabel (CWidget 0 (0 0) 1 2 0 0 #231# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT -14.5141 1.74233 0 -10 2.59755 1.04901 #288#)) +COMMENT (CObjectList)) +COMMENT #290=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -664 100) +COMMENT (CObjectList +COMMENT #291=(CLine +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #252# +COMMENT 1944545584 100) (LOGPEN 0 0 16711680) 1 +COMMENT 0.835356 1.11174 1.1659) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 1493406990 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.1" +COMMENT "@N" 1 -15.8707 0 0 -10 5.49481 1.04901 #291#) +COMMENT #293=(CLine +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #252# +COMMENT 1944545584 100) (LOGPEN 0 0 16711680) 1 +COMMENT 0.835356 6.19064 6.24481) +COMMENT #294=(CLabel (CWidget 0 (0 0) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.2r" +COMMENT "@N" 1 8.93899 12.1963 0 -10 5.89443 1.04901 +COMMENT #293#) +COMMENT #295=(CLine +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #252# +COMMENT 1944545584 100) (LOGPEN 0 0 16711680) 1 +COMMENT 0.835356 0.704186 0.758354) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SeqPK184.3r" +COMMENT "@N" 1 -14.3733 6.96932 0 -10 5.89443 1.04901 +COMMENT #295#) +COMMENT #297=(CLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #252# +COMMENT 1944749780 100) (LOGPEN 0 0 16711680) 1 +COMMENT 0.835356 2.9973 3.05921) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 149 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pK184xba-rev" +COMMENT "@N" 1 -5.25906 -17.4233 0 -10 6.46889 +COMMENT 1.04901 #297#) +COMMENT #299=(CLine +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #252# 349 100) +COMMENT (LOGPEN 0 0 16711680) 1 0.835356 2.91476 +COMMENT 2.99214) +COMMENT #300=(CLabel (CWidget 0 (0 0) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pK184xba-fwd" +COMMENT "@N" 1 -6.15523 -13.9386 0 -10 6.54382 +COMMENT 1.04901 #299#) +COMMENT #301=(CLine +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #252# +COMMENT 1128743747 100) (LOGPEN 0 0 16711680) 1 +COMMENT 0.835356 3.34295 3.40227) +COMMENT #302=(CLabel (CWidget 0 (0 0) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "kanfwd" "@N" 1 +COMMENT 5.34315 -13.9386 0 -10 3.39679 1.04901 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1920 100) +COMMENT (CObjectList +COMMENT #304=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 1 +COMMENT 0.699027 0.915699 1 0.082322) 0.8 1.8 0) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 2949135 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT -14.2524 3.48466 0 -10 2.67247 1.04901 #304#)) +COMMENT (CObjectList)) +COMMENT #306=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -385 100) +COMMENT (CObjectList +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.47544 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 1094797123 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "oriV" "@N" 1 +COMMENT -14.3279 -3.48466 0 -10 1.94816 1.04901 #307#)) +COMMENT (CObjectList)) +COMMENT #309=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -873 100) +COMMENT (CObjectList +COMMENT #310=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.72998 1.9 +COMMENT 0.082322 1) +COMMENT #311=(CLabel (CWidget 0 (0 0) 1 2 0 0 #231# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT -11.3128 8.71165 0 -10 1.47361 1.04901 #310#)) +COMMENT (CObjectList)) +COMMENT #312=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -594 100) +COMMENT (CObjectList +COMMENT #313=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.791886 1.9 +COMMENT 0.082322 1) +COMMENT #314=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# -1572426297 +COMMENT 100) (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT -13.2136 5.22699 0 -10 1.47361 1.04901 #313#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #315=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -524 100) +COMMENT (CObjectList +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -803 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.508149 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# -2117672534 +COMMENT 100) (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (2236)" "@N (@S)" 5 -10.4195 +COMMENT 20.908 0 -10 5.61969 0.924127 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil -315 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.521046 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 312848134 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (2231)" "@N (@S)" 5 -9.89017 +COMMENT 15.681 0 -10 4.62063 0.924127 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -245 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.430766 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (2266)" "@N (@S)" 5 -9.61437 +COMMENT 26.1349 0 -10 5.56974 0.924127 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -664 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.536522 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2225)" "@N (@S)" 5 -9.87239 +COMMENT 13.9386 0 -10 4.64561 0.924127 #326#)) +COMMENT (CObjectList)) +COMMENT #328=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -455 100) +COMMENT (CObjectList +COMMENT #329=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.477195 1.9 +COMMENT 0.082322 1) +COMMENT #330=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (2248)" "@N (@S)" 5 -9.49648 +COMMENT 24.3926 0 -10 4.4458 0.924127 #329#)) +COMMENT (CObjectList)) +COMMENT #331=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1085 100) +COMMENT (CObjectList +COMMENT #332=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.562317 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (2215)" "@N (@S)" 5 -10.3473 +COMMENT 12.1963 0 -10 5.09519 0.924127 #332#)) +COMMENT (CObjectList)) +COMMENT #334=(CGroupWidget +COMMENT (CWidget 1 (10 #14# 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 1 (1 #14# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.515887 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 248 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sma}I (2233)" "@N (@S)" 5 -10.0678 +COMMENT 19.1656 0 -10 4.9703 0.924127 #335#)) +COMMENT (CObjectList)) +COMMENT #337=(CGroupWidget +COMMENT (CWidget 1 (10 #15# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #338=(CScratch +COMMENT (CWidget 1 (1 #15# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.521046 1.9 +COMMENT 0.082322 1) +COMMENT #339=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 7577 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xma}I (2231)" "@N (@S)" 5 -10.0876 +COMMENT 17.4233 0 -10 4.94533 0.924127 #338#)) +COMMENT (CObjectList)) +COMMENT #340=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #341=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.11068 1.9 +COMMENT 0.082322 1) +COMMENT #342=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (64)" "@N (@S)" 5 10.9697 +COMMENT 10.454 0 -10 3.77144 0.924127 #341#)) +COMMENT (CObjectList)) +COMMENT #343=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 485 100) +COMMENT (CObjectList +COMMENT #344=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.24481 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (12)" "@N (@S)" 5 3.14398 13.9386 +COMMENT 0 -10 3.64655 0.924127 #344#)) (CObjectList)) +COMMENT #346=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #347=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #238# 432 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.25513 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (8)" "@N (@S)" 5 2.8979 15.681 0 +COMMENT -10 3.19698 0.924127 #347#)) (CObjectList)) +COMMENT #349=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #350=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.105757 1.9 +COMMENT 0.082322 1) +COMMENT #351=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2392)" "@N (@S)" 5 -4.88487 +COMMENT 29.6196 0 -10 4.69556 0.924127 #350#)) +COMMENT (CObjectList)) +COMMENT #352=(CGroupWidget +COMMENT (CWidget 1 (10 #26# 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #353=(CScratch +COMMENT (CWidget 1 (1 #26# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42455 1.9 +COMMENT 0.082322 1) +COMMENT #354=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 1196 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bgl}II (330)" "@N (@S)" 5 12.8024 +COMMENT 8.71165 0 -10 4.17106 0.924127 #353#)) +COMMENT (CObjectList)) +COMMENT #355=(CGroupWidget +COMMENT (CWidget 2 (10 #4# 0) 1 2 0 0 Nil -734 100) +COMMENT (CObjectList +COMMENT #356=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.99988 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 1537 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (1270)" "@N (@S)" 5 -5.06574 +COMMENT -15.681 0 -10 4.69556 0.924127 #356#) +COMMENT #358=(CScratch +COMMENT (CWidget 2 (1 #4# 2) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.492672 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel (CWidget 0 (0 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (2242)" "@N (@S)" 5 -9.81185 +COMMENT 22.6503 0 -10 4.77049 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 3 (10 #23# 0) 1 2 0 0 Nil -1992 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #23# 1) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.1142 1.9 0.082322 +COMMENT 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 1343 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (838)" "@N (@S)" 5 13.8593 +COMMENT -6.96932 0 -10 4.17106 0.924127 #361#) +COMMENT #363=(CScratch +COMMENT (CWidget 2 (1 #23# 2) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.57252 1.9 +COMMENT 0.082322 1) +COMMENT #364=(CLabel (CWidget 0 (0 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (1048)" "@N (@S)" 5 8.60794 +COMMENT -12.1963 0 -10 4.62063 0.924127 #363#) +COMMENT #365=(CScratch +COMMENT (CWidget 3 (1 #23# 3) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.1788 1.9 0.082322 +COMMENT 1) +COMMENT #366=(CLabel (CWidget 0 (0 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (1976)" "@N (@S)" 5 -15.5421 +COMMENT -1.74233 0 -10 4.62063 0.924127 #365#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #367=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #368=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21338952 (CObList))) +FEATURES Location/Qualifiers + source 1..2432 + /organism="Cloning vector Pk184" + /db_xref="taxon:147269" + /lab_host="Escherichia coli" + /vntifkey="98" + gene 0..0 + /gene="lacZalpha" + /vntifkey="60" + CDS 0..0 + /gene="lacZalpha" + /codon_start=1 + /transl_table=11 + /product="lacZ alpha peptide" + /protein_id="AAC43252.1" + /db_xref="GI:392881" + /vntifkey="4" + /label=CDS(lacZalpha)_1 + gene 365..1159 + /gene="kan" + /vntifkey="60" + CDS 365..1159 + /gene="kan" + /function="kanamycin resistance" + /codon_start=1 + /transl_table=11 + /product="kanamycin phosphotransferase" + /protein_id="AAC43251.1" + /db_xref="GI:392880" + /vntifkey="4" + /label=CDS(kan)_2 + rep_origin 1861..1863 + /standard_name="oriV" + /vntifkey="33" + /label=oriV + /note="p15a origin of DNA replication" + -35_signal 2126..2131 + /vntifkey="48" + /label=-35 + CDS 2200..49 + /vntifkey="4" + /label=lacZalpha + promoter 2078..2161 + /vntifkey="30" + /label=P(lac) + misc_binding 2162..2182 + /vntifkey="20" + /label=lacO + misc_feature 1289..1292 + /vntifkey="21" + /label=p15a\start + primer_bind 1981..2001 + /vntifkey="28" + /label=SeqPK184.1 + /note="sequencing primer" + primer_bind complement(12..32) + /vntifkey="28" + /label=SeqPK184.2r + /note="sequencing primer" + primer_bind complement(2139..2159) + /vntifkey="28" + /label=SeqPK184.3r + /note="sequencing primer" + primer_bind complement(1247..1270) + /vntifkey="28" + /label=pK184xba-rev + /note="primer used to create pK184.1" + primer_bind 1273..1302 + /vntifkey="28" + /label=pK184xba-fwd + primer_bind 1114..1136 + /vntifkey="28" + /label=kanfwd + /note="sequencing primer for XbaI site" + primer 2098..2118 + /vntifkey="27" + /label=PlacF + /note="sequencing primer" + -10_signal 2150..2155 + /vntifkey="47" + /label=-10 +BASE COUNT 551 a 630 c 711 g 540 t +ORIGIN + 1 cgataagcta gcttcacgct gccgcaagca ctcagggcgc aagggctgct aaaggaagcg + 61 gaacacgtag aaagccagtc cgcagaaacg gtgctgaccc cggatgaatg tcagctactg + 121 ggctatctgg acaagggaaa acgcaagcgc aaagagaaag caggtagctt gcagtgggct + 181 tacatggcga tagctagact gggcggtttt atggacagca agcgaaccgg aattgccagc + 241 tggggcgccc tctggtaagg ttgggaagcc ctgcaaagta aactggatgg ctttcttgcc + 301 gccaaggatc tgatggcgca ggggatcaag atctgatcaa gagacaggat gaggatcgtt + 361 tcgcatgatt gaacaagatg gattgcacgc aggttctccg gccgcttggg tggagaggct + 421 attcggctat gactgggcac aacagacaat cggctgctct gatgccgccg tgttccggct + 481 gtcagcgcag gggcgcccgg ttctttttgt caagaccgac ctgtccggtg ccctgaatga + 541 actccaagac gaggcagcgc ggctatcgtg gctggccacg acgggcgttc cttgcgcagc + 601 tgtgctcgac gttgtcactg aagcgggaag ggactggctg ctattgggcg aagtgccggg + 661 gcaggatctc ctgtcatctc accttgctcc tgccgagaaa gtatccatca tggctgatgc + 721 aatgcggcgg ctgcatacgc ttgatccggc tacctgccca ttcgaccacc aagcgaaaca + 781 tcgcatcgag cgagcacgta ctcggatgga agccggtctt gtcgatcagg atgatctgga + 841 cgaagagcat caggggctcg cgccagccga actgttcgcc aggctcaagg cgcggatgcc + 901 cgacggcgag gatctcgtcg tgacccatgg cgatgcctgc ttgccgaata tcatggtgga + 961 aaatggccgc ttttctggat tcatcgactg tggccggctg ggtgtggcgg accgctatca + 1021 ggacatagcg ttggctaccc gtgatattgc tgaagagctt ggcggcgaat gggctgaccg + 1081 cttcctcgtg ctttacggta tcgccgctcc cgattcgcag cgcatcgcct tctatcgcct + 1141 tcttgacgag ttcttctgag cgggactctg gggttcgcga tgataagctg tcaaacatga + 1201 gaattacaac ttatatcgta tggggctgac ttcaggtgct acatttgaag agataaattg + 1261 cactgaaatc tagaaatatt ttatctgatt aataagatga tcttcttgag atcgttttgg + 1321 tctgcgcgta atctcttgct ctgaaaacga aaaaaccgcc ttgcagggcg gtttttcgaa + 1381 ggttctctga gctaccaact ctttgaaccg aggtaactgg cttggaggag cgcagtcacc + 1441 aaaacttgtc ctttcagttt agccttaacc ggcgcatgac ttcaagacta actcctctaa + 1501 atcaattacc agtggctgct gccagtggtg cttttgcatg tctttccggg ttggactcaa + 1561 gacgatagtt accggataag gcgcagcggt cggactgaac ggggggttcg tgcatacagt + 1621 ccagcttgga gcgaactgcc tacccggaac tgagtgtcag gcgtggaatg agacaaacgc + 1681 ggccataaca gcggaatgac accggtaaac cgaaaggcag gaacaggaga gcgcacgagg + 1741 gagccgccag gggaaacgcc tggtatcttt atagtcctgt cgggtttcgc caccactgat + 1801 ttgagcgtca gatttcgtga tgcttgtcag gggggcggag cctatggaaa aacggctttg + 1861 ccttctttcc tgcgttatcc cctgattctg tggataaccg tattaccgcc tttgagtgag + 1921 ctgataccgc tcgccgcagc cgaacgaccg agcgcagcga gtcagtgagc gaggaagcgg + 1981 aagagcgccc aatacgcaaa ccgcctctcc ccgcgcgttg gccgattcat taatgcagct + 2041 ggcacgacag gtttcccgac tggaaagcgg gcagtgagcg caacgcaatt aatgtgagtt + 2101 agctcactca ttaggcaccc caggctttac actttatgct tccggctcgt atgttgtgtg + 2161 gaattgtgag cggataacaa tttcacacag gaaacagcta tgaccatgat tacgaattcg + 2221 agctcggtac ccggggatcc tctagagtcg acctgcaggc atgcaagctt ggcactggcc + 2281 gtcgttttac aacgtcgtga ctgggaaaac cctggcgtta cccaacttaa tcgccttgca + 2341 gcacatcccc ctttcgccag ctggcgtaat agcgaagagg cccgcaccga tcgcccttcc + 2401 caacagttgc gcagcctgaa tggcgaatgg cg +// diff --git a/lib/VNTI files/pLac+thiM#2tetA (JACS).gb b/lib/VNTI files/pLac+thiM#2tetA (JACS).gb new file mode 100644 index 00000000..593ac8f6 --- /dev/null +++ b/lib/VNTI files/pLac+thiM#2tetA (JACS).gb @@ -0,0 +1,981 @@ +LOCUS pLac+thiM# 3566 bp DNA circular 19-MAR-2009 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|513168591| +COMMENT VNTDBDATE|513168872| +COMMENT LSOWNER| +COMMENT VNTNAME|pLac+thiM#2tetA (JACS)| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLac+thiM#2tetA (JACS)" 0 3566 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 1 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3566 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 737 0 1030 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1932 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2973 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 726 0 1306 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2043 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2446 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2132 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 888 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 884 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3434 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3125 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1144 0 2852 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1385 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2165 2803 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1937 2041 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2862 2967 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2993 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #33=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #34=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #35=(CFSignal (CObList) "tetA*" 4 0 0 719 1930 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #36=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #37=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLac+thiM#2tetA (JACS)" 2) 5 "" 0 4) +COMMENT #38=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #39=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLac+thiM#2tetA (JACS)'" 1) +COMMENT #40=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #41=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 03/19/09 10:49\214\337\221O" 1) +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 03/19/09 10:54\214\337\221O" 1) +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3566 bp" 1) +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #46=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #49=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #51=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #55=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 719 (3 #35# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #56=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 719 End: 1930" 1))) "tetA*") +COMMENT #57=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2993 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #58=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2993 End: 284 (Complementary)" +COMMENT 1) +COMMENT #59=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #60=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #62=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #63=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1))) +COMMENT "TPP aptamer"))) "Misc. Feature (1 total)") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #79=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2165 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2165 End: 2803" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #84=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1937 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1937 End: 2041" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2862 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2862 End: 2967 (Complementary)" +COMMENT 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)"))) "Feature Map") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #95=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27269952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #96=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") 5 1 +COMMENT "GACGTC" "CTGCAG") +COMMENT #98=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24870296 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #99=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2132 " 1))))) "AflIII: 1 site") 1 +COMMENT 5 "ACRYGT" "TGYRCA") +COMMENT #101=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24870616 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #102=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 2 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #103=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27269872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #104=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2043 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #106=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BamHI: 2 sites") 1 5 "GGATCC" +COMMENT "CCTAGG") +COMMENT #107=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24871336 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #108=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #109=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24856832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #110=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24870216 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #111=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 888 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #113=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24871096 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #114=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3125 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #116=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24871416 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #117=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #118=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #119=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") 1 +COMMENT 5 "GAATTC" "CTTAAG") +COMMENT #121=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #122=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #123=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24870456 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #124=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 884 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #126=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #127=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24870536 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #128=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3434 " 1))))) "PvuI: 1 site") 4 +COMMENT 2 "CGATCG" "GCTAGC") +COMMENT #130=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #131=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2973 " 1))))) "SacI: 1 site") 5 +COMMENT 1 "GAGCTC" "CTCGAG") +COMMENT #133=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 2 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #134=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24871016 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 "GCTCTTCNNNNN" +COMMENT "CGAGAAGNNNNN") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #136=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27270272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #137=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1932 " 1))))) "XbaI: 1 site") 1 +COMMENT 5 "TCTAGA" "AGATCT") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24870376 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #142=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24852832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 1 site)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #143=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #144=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #145=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #146=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #147=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #148=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #149=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #150=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #151=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #152=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #153=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #154=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #155=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #156=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #157=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #158=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #159=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #160=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #161=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #162=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #163=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #164=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #165=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #166=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #167=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #168=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #169=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #170=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #171=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #172=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #173=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #174=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #175=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #176=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #177=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #178=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #179=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #180=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #181=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #182=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 17.2441 -14.3968 40.0378 40.0378 0.01 10 -1 3566 3566 1 0 0) +COMMENT #183=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1131 100) +COMMENT (CObjectList +COMMENT #184=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -245 100) +COMMENT (CObjectList +COMMENT #185=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #149# 21575772 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27594 6.27394 1 0.0214037) 0.175917) +COMMENT #186=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #146# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLac+thiM#2tetA (JACS)" "@N" 1 0 +COMMENT 0.871165 0 -10 13.3124 1.44863 Nil) +COMMENT #187=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #145# 25606756 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3566 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #188=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #189=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -733 100) +COMMENT (CObjectList +COMMENT #190=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #147# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.77358 1.00976 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #191=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #144# 24726444 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.77154 10.454 0 -10 2.72243 1.04901 #190#) +COMMENT #192=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #147# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.878 5.0101 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #193=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #144# 268634488 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 10.1237 -8.71165 0 -10 2.27285 1.04901 #192#)) +COMMENT (CObjectList)) +COMMENT #194=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1012 100) +COMMENT (CObjectList +COMMENT #195=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #148# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 5.05936 5.1913 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #196=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #144# 54175548 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 14.5718 0 0 -10 5.8195 1.04901 #195#)) +COMMENT (CObjectList)) +COMMENT #197=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #198=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #160# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 1 +COMMENT 5.59942 5.77358 1 0.082322) 0.8 1.8 1) +COMMENT #199=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #144# 26514284 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.57131 10.454 0 -10 2.72243 1.04901 #198#) +COMMENT #200=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #160# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 1 +COMMENT 5.21593 5.39888 1 0.082322) 0.8 1.8 0) +COMMENT #201=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #144# 26578004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.159 5.22699 0 -10 2.67247 1.04901 #200#)) +COMMENT (CObjectList)) +COMMENT #202=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -524 100) +COMMENT (CObjectList +COMMENT #203=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #150# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.25287 1.9 0.082322 +COMMENT 1) +COMMENT #204=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #144# 977 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5045 3.48466 0 -10 2.14797 1.04901 #203#)) +COMMENT (CObjectList)) +COMMENT #205=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -315 100) +COMMENT (CObjectList +COMMENT #206=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #147# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.34224 2.46635 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #207=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #144# 27130516 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7746 -3.48466 0 -10 2.72243 1.04901 #206#)) +COMMENT (CObjectList)) +COMMENT #208=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -664 100) +COMMENT (CObjectList +COMMENT #209=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #152# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 2.68273 2.86744) +COMMENT #210=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #144# 21189644 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -5.59767 -12.1963 0 -10 1.14891 1.04901 #209#) +COMMENT #211=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #152# 131079 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 1.05374 1.24021) +COMMENT #212=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #144# 26553188 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.0864 3.48466 0 -10 1.14891 1.04901 #211#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #213=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -245 100) +COMMENT (CObjectList +COMMENT #214=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -385 100) +COMMENT (CObjectList +COMMENT #215=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #151# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.87624 1.9 +COMMENT 0.082322 1) +COMMENT #216=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #153# 25227300 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1932)" "@N (@S)" 5 -6.30478 +COMMENT -13.9386 0 -10 4.69556 0.924127 #215#)) +COMMENT (CObjectList)) +COMMENT #217=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -1152 100) +COMMENT (CObjectList +COMMENT #218=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #151# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.04494 1.9 +COMMENT 0.082322 1) +COMMENT #219=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #153# 25230100 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2973)" "@N (@S)" 5 -13.1696 +COMMENT 5.22699 0 -10 4.64561 0.924127 #218#)) +COMMENT (CObjectList)) +COMMENT #220=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -457 100) +COMMENT (CObjectList +COMMENT #221=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #151# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.53609 1.9 +COMMENT 0.082322 1) +COMMENT #222=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #153# 24846468 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 10.871 +COMMENT 8.71165 0 -10 4.29594 0.924127 #221#)) +COMMENT (CObjectList)) +COMMENT #223=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1085 100) +COMMENT (CObjectList +COMMENT #224=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #151# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.68097 1.9 +COMMENT 0.082322 1) +COMMENT #225=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #153# 26765620 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2043)" "@N (@S)" 5 -8.91277 +COMMENT -10.454 0 -10 4.92035 0.924127 #224#)) +COMMENT (CObjectList)) +COMMENT #226=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -736 100) +COMMENT (CObjectList +COMMENT #227=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #151# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.21417 1.9 +COMMENT 0.082322 1) +COMMENT #228=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #153# 21617332 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.2169 +COMMENT 1.74233 0 -10 4.64561 0.924127 #227#)) +COMMENT (CObjectList)) +COMMENT #229=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil -457 100) +COMMENT (CObjectList +COMMENT #230=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #151# 25182936 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.5244 1.9 +COMMENT 0.082322 1) +COMMENT #231=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #153# 26743508 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2132)" "@N (@S)" 5 -11.08 +COMMENT -8.71165 0 -10 4.74552 0.924127 #230#)) +COMMENT (CObjectList)) +COMMENT #232=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #233=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #151# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.71281 1.9 +COMMENT 0.082322 1) +COMMENT #234=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #153# 26740612 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (888)" "@N (@S)" 5 14.2598 +COMMENT -3.48466 0 -10 4.24599 0.924127 #233#)) +COMMENT (CObjectList)) +COMMENT #235=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 1012 100) +COMMENT (CObjectList +COMMENT #236=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #151# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.71984 1.9 +COMMENT 0.082322 1) +COMMENT #237=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #153# 27470892 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (884)" "@N (@S)" 5 14.1087 +COMMENT -1.74233 0 -10 4.24599 0.924127 #236#)) +COMMENT (CObjectList)) +COMMENT #238=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -178 100) +COMMENT (CObjectList +COMMENT #239=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #151# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.41119 1.9 +COMMENT 0.082322 1) +COMMENT #240=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #153# 27458404 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 12.1309 +COMMENT 6.96932 0 -10 4.17106 0.924127 #239#)) +COMMENT (CObjectList)) +COMMENT #241=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 892 100) +COMMENT (CObjectList +COMMENT #242=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #151# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.233969 1.9 +COMMENT 0.082322 1) +COMMENT #243=(CLabel (CWidget 0 (0 0) 1 2 0 0 #153# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3434)" "@N (@S)" 5 -5.82485 +COMMENT 12.1963 0 -10 4.69556 0.924127 #242#)) +COMMENT (CObjectList)) +COMMENT #244=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #245=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #151# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.777551 1.9 +COMMENT 0.082322 1) +COMMENT #246=(CLabel (CWidget 0 (0 0) 1 2 0 0 #153# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3125)" "@N (@S)" 5 -11.0985 +COMMENT 8.71165 0 -10 4.57068 0.924127 #245#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #247=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #248=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -178 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21290392 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2165..2803 + /vntifkey="33" + /label=ColE1 + terminator 1937..2041 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2862..2967) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2993..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + promoter 498..601 + /vntifkey="30" + /label=P(lac) + protein_bind 581..601 + /vntifkey="31" + /label=lacO + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 719..1930 + /vntifkey="4" + /label=tetA* +BASE COUNT 803 a 980 c 926 g 857 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gctattacaa gaagatcagg agcaaactat + 721 gcaagtcgac ctgctggatc caaaatctaa caatgcgctc atcgtcatcc tcggcaccgt + 781 caccctggat gctgtaggca taggcttggt tatgccggta ctgccgggcc tcttgcggga + 841 tatcgtccat tccgacagca tcgccagtca ctatggcgtg ctgctagcgc tatatgcgtt + 901 gatgcaattt ctatgcgcac ccgttctcgg agcactgtcc gaccgctttg gccgccgccc + 961 agtcctgctc gcttcgctac ttggagccac tatcgactac gcgatcatgg cgaccacacc + 1021 cgtcctgtgg atcctctacg ccggacgcat cgtggccggc atcaccggcg ccacaggtgc + 1081 ggttgctggc gcctatatcg ccgacatcac cgatggggaa gatcgggctc gccacttcgg + 1141 gctcatgagc gcttgtttcg gcgtgggtat ggtggcaggc cccgtggccg ggggactgtt + 1201 gggcgccatc tccttgcatg caccattcct tgcggcggcg gtgctcaacg gcctcaacct + 1261 actactgggc tgcttcctaa tgcaggagtc gcataaggga gagcgtcgac cgatgccctt + 1321 gagagccttc aacccagtca gctccttccg gtgggcgcgg ggcatgacta tcgtcgccgc + 1381 acttatgact gtcttcttta tcatgcaact cgtaggacag gtgccggcag cgctctgggt + 1441 cattttcggc gaggaccgct ttcgctggag cgcgacgatg atcggcctgt cgcttgcggt + 1501 attcggaatc ttgcacgccc tcgctcaagc cttcgtcact ggtcccgcca ccaaacgttt + 1561 cggcgagaag caggccatta tcgccggcat ggcggccgac gcgctgggct acgtcttgct + 1621 ggcgttcgcg acgcgaggct ggatggcctt ccccattatg attcttctcg cttccggcgg + 1681 catcgggatg cccgcgttgc aggccatgct gtccaggcag gtagatgacg accatcaggg + 1741 acagcttcaa ggatcgctcg cggctcttac cagcctaact tcgatcactg gaccgctgat + 1801 cgtcacggcg atttatgccg cctcggcgag cacatggaac gggttggcat ggattgtagg + 1861 cgccgcccta taccttgtct gcctccccgc gttgcgtcgc ggtgcatgga gccgggccac + 1921 ctcgacctaa tctagaggca tcaaataaaa cgaaaggctc agtcgaaaga ctgggccttt + 1981 cgttttatct gttgtttgtc ggtgaacgct ctcctgagta ggacaaatcc gccgccctag + 2041 acctaggcgt tcggctgcgg cgagcggtat cagctcactc aaaggcggta atacggttat + 2101 ccacagaatc aggggataac gcaggaaaga acatgtgagc aaaaggccag caaaaggcca + 2161 ggaaccgtaa aaaggccgcg ttgctggcgt ttttccatag gctccgcccc cctgacgagc + 2221 atcacaaaaa tcgacgctca agtcagaggt ggcgaaaccc gacaggacta taaagatacc + 2281 aggcgtttcc ccctggaagc tccctcgtgc gctctcctgt tccgaccctg ccgcttaccg + 2341 gatacctgtc cgcctttctc ccttcgggaa gcgtggcgct ttctcaatgc tcacgctgta + 2401 ggtatctcag ttcggtgtag gtcgttcgct ccaagctggg ctgtgtgcac gaaccccccg + 2461 ttcagcccga ccgctgcgcc ttatccggta actatcgtct tgagtccaac ccggtaagac + 2521 acgacttatc gccactggca gcagccactg gtaacaggat tagcagagcg aggtatgtag + 2581 gcggtgctac agagttcttg aagtggtggc ctaactacgg ctacactaga aggacagtat + 2641 ttggtatctg cgctctgctg aagccagtta ccttcggaaa aagagttggt agctcttgat + 2701 ccggcaaaca aaccaccgct ggtagcggtg gtttttttgt ttgcaagcag cagattacgc + 2761 gcagaaaaaa aggatctcaa gaagatcctt tgatcttttc tacggggtct gacgctcagt + 2821 ggaacgaaaa ctcacgttaa gggattttgg tcatgactag tgcttggatt ctcaccaata + 2881 aaaaacgccc ggcggcaacc gagcgttctg aacaaatcca gatggagttc tgaggtcatt + 2941 actggatcta tcaacaggag tccaagcgag ctcaaacttg gtctgacagt taccaatgct + 3001 taatcagtga ggcacctatc tcagcgatct gtctatttcg ttcatccata gttgcctgac + 3061 tccccgtcgt gtagataact acgatacggg agggcttacc atctggcccc agtgctgcaa + 3121 tgataccgcg agacccacgc tcaccggctc cagatttatc agcaataaac cagccagccg + 3181 gaagggccga gcgcagaagt ggtcctgcaa ctttatccgc ctccatccag tctattaatt + 3241 gttgccggga agctagagta agtagttcgc cagttaatag tttgcgcaac gttgttgcca + 3301 ttgctacagg catcgtggtg tcacgctcgt cgtttggtat ggcttcattc agctccggtt + 3361 cccaacgatc aaggcgagtt acatgatccc ccatgttgtg caaaaaagcg gttagctcct + 3421 tcggtcctcc gatcgttgtc agaagtaagt tggccgcagt gttatcactc atggttatgg + 3481 cagcactgca taattctctt actgtcatgc catccgtaag atgcttttct gtgactggtg + 3541 agtactcaac caagtcattc tgagaa +// diff --git a/lib/VNTI files/pLac+thiM#2tetA.gb b/lib/VNTI files/pLac+thiM#2tetA.gb new file mode 100644 index 00000000..486545a1 --- /dev/null +++ b/lib/VNTI files/pLac+thiM#2tetA.gb @@ -0,0 +1,1480 @@ +LOCUS pLacthiMte 3566 bp DNA circular 23-JUL-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|452686080| +COMMENT VNTDBDATE|452686080| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMtetA-N30#2| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMtetA-N30#2" 0 3566 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3566 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 737 0 1030 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1932 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2973 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 726 0 1306 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2043 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2446 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2132 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 888 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 884 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3434 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3125 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1144 0 2852 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1385 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2165 2803 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1937 2041 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2862 2967 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2993 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3079 3100 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 741 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 740 740 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 738 738 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "tetA*" 4 0 0 719 1930 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #48=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #49=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacthiMtetA-N30#2" 2) 5 "" 0 4) +COMMENT #50=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMtetA-N30#2'" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/23/07 10:08\214\337\221O" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/23/07 10:08\214\337\221O" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3566 bp" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #63=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 719 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 719 End: 1930" 1))) "tetA*") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2993 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2993 End: 284 (Complementary)" +COMMENT 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 741 " 1))) +COMMENT "core riboswitch") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1))) +COMMENT "TPP aptamer") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 738 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 738 End: 738 " 1))) "orig G") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3079 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3079 End: 3100" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2165 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2165 End: 2803" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1937 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1937 End: 2041" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2862 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2862 End: 2967 (Complementary)" +COMMENT 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 740 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 740 End: 740 " 1))) +COMMENT "orig T"))) "Mutation (2 total)"))) +COMMENT "Feature Map") +COMMENT #151=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964664 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25199448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2132 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25202664 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2446 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964584 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2043 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24965224 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 737 " 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1030 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25203064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1385 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25203304 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25199528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #177=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 888 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25202824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #180=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3125 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25202984 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24965144 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24975048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #185=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24965064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25202504 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 884 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25202744 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3434 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2973 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964744 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #200=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 726 " 1) +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1306 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25202904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24965384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964984 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #206=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #207=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1932 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25202584 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25211552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #212=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #213=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #214=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #215=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #216=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #217=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #218=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #219=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #220=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #221=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #222=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #223=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #224=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #225=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #226=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #227=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #228=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #229=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #230=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #231=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #232=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #233=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #234=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #235=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #236=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #237=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #238=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #239=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #240=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #241=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #242=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #243=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #244=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #245=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #246=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #247=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #248=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #249=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #250=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #251=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.1932 -23.1885 40.0378 40.0378 0.01 10 -1 3566 3566 1 0 0) +COMMENT #252=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #253=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -922 100) +COMMENT (CObjectList +COMMENT #254=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24634092 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27594 6.27394 1 0.0214037) 0.175917) +COMMENT #255=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #215# 24967812 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMtetA-N30#2" "@N" 1 0 +COMMENT 0.871165 0 -10 11.1145 1.44863 Nil) +COMMENT #256=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3566 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #257=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #258=(CGroupWidget (CWidget 4 (7 4 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #259=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.77358 1.00976 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26578004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.76283 10.454 0 -10 2.7474 1.04901 #259#) +COMMENT #261=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #216# 24636724 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.878 5.0101 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #262=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26538192 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 10.8204 -24.3926 0 -10 2.29783 1.04901 #261#)) +COMMENT (CObjectList)) +COMMENT #263=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #264=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.858473 1.9 +COMMENT 0.082322 1) +COMMENT #265=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 100 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.7563 6.96932 0 -10 4.0212 1.04901 #264#) +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.25287 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24684660 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4136 -1.74233 0 -10 1.17389 1.04901 #266#) +COMMENT #268=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #217# -388 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.96964 +COMMENT 5.1913 1 0.082322) 0.8 1.8 0) +COMMENT #269=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 14.7942 -8.71165 0 +COMMENT -10 7.34306 1.04901 #268#) +COMMENT #270=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.97668 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 13.7309 -13.9386 0 -10 2.94721 1.04901 #270#) +COMMENT #272=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.05936 +COMMENT 5.1913 1 0.082322) 0.8 1.8 0) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24605248 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 13.9099 -6.96932 0 -10 5.86945 1.04901 +COMMENT #272#)) (CObjectList)) +COMMENT #274=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.36546 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.1503 5.22699 0 -10 2.62252 1.04901 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.4411 1.9 0.082322 +COMMENT 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736120 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 10.8937 12.1963 0 -10 2.62252 1.04901 #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #234# 25182936 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.03394 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 393219 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.74366 20.908 0 -10 3.94627 1.04901 #280#) +COMMENT #282=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.70146 1.9 +COMMENT 0.082322 1) +COMMENT #283=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 393242 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 9.30842 17.4233 0 -10 4.0212 1.04901 #282#)) +COMMENT (CObjectList)) +COMMENT #284=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1131 100) +COMMENT (CObjectList +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.59942 5.77358 1 0.082322) 0.8 1.8 1) +COMMENT #286=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.92403 15.681 0 -10 2.7474 1.04901 #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.21593 5.39888 1 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.0582 1.74233 0 -10 2.69745 1.04901 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.25287 1.9 0.082322 +COMMENT 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736120 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5132 -3.48466 0 -10 2.14797 1.04901 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #293=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.34224 2.46635 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 6751096 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 -3.48466 0 -10 2.7474 1.04901 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #296=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #221# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 2.68273 2.86744) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736192 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -5.60638 -12.1963 0 -10 1.17389 1.04901 #296#) +COMMENT #298=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #221# 131079 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 1.05374 1.24021) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26577548 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.0951 3.48466 0 -10 1.17389 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #221# 1149 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.27398 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.6291 0 0 -10 1.49858 1.04901 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.3162 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.2083 3.48466 0 -10 1.49858 1.04901 #304#)) +COMMENT (CObjectList)) +COMMENT #306=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.4024 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24685572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 12.6362 6.96932 0 -10 5.86945 1.04901 +COMMENT #307#) +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.97316 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 54196124 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 13.7657 -15.681 0 -10 2.7474 1.04901 #309#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #311=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #312=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1577 100) +COMMENT (CObjectList +COMMENT #313=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.87624 1.9 +COMMENT 0.082322 1) +COMMENT #314=(CLabel (CWidget 0 (0 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1932)" "@N (@S)" 5 -6.3222 +COMMENT -13.9386 0 -10 4.74552 0.924127 #313#)) +COMMENT (CObjectList)) +COMMENT #315=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -809 100) +COMMENT (CObjectList +COMMENT #316=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.04494 1.9 +COMMENT 0.082322 1) +COMMENT #317=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736000 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2973)" "@N (@S)" 5 -13.1783 +COMMENT 5.22699 0 -10 4.67059 0.924127 #316#)) +COMMENT (CObjectList)) +COMMENT #318=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #319=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.53609 1.9 +COMMENT 0.082322 1) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24605044 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.1972 +COMMENT 13.9386 0 -10 4.34589 0.924127 #319#)) +COMMENT (CObjectList)) +COMMENT #321=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #322=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.68097 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 2228241 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2043)" "@N (@S)" 5 -8.9389 +COMMENT -10.454 0 -10 4.94533 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.21417 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 393219 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.3438 +COMMENT -5.22699 0 -10 4.67059 0.924127 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.5244 1.9 0.082322 +COMMENT 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24831972 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2132)" "@N (@S)" 5 -11.0975 +COMMENT -8.71165 0 -10 4.82044 0.924127 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.71281 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 21622288 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (888)" "@N (@S)" 5 15.2784 +COMMENT -19.1656 0 -10 4.27096 0.924127 #331#)) +COMMENT (CObjectList)) +COMMENT #333=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.71984 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 21622384 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (884)" "@N (@S)" 5 15.1565 +COMMENT -17.4233 0 -10 4.27096 0.924127 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 131080 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.41119 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736248 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 11.7265 +COMMENT 8.71165 0 -10 4.19603 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.233969 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel (CWidget 0 (0 0) 1 2 0 0 #222# 1 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3434)" "@N (@S)" 5 -5.84228 +COMMENT 12.1963 0 -10 4.74552 0.924127 #340#)) +COMMENT (CObjectList)) +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.777551 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 21543528 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3125)" "@N (@S)" 5 -11.116 +COMMENT 8.71165 0 -10 4.62063 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.97844 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24650788 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (737)" "@N (@S)" 5 14.8554 +COMMENT -12.1963 0 -10 5.12016 0.924127 #346#) +COMMENT #348=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.463 1.9 0.082322 +COMMENT 1) +COMMENT #349=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26410364 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1030)" "@N (@S)" 5 15.5535 +COMMENT -20.908 0 -10 5.59471 0.924127 #348#)) +COMMENT (CObjectList)) +COMMENT #350=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #351=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.99779 1.9 +COMMENT 0.082322 1) +COMMENT #352=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24968032 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (726)" "@N (@S)" 5 14.0216 +COMMENT -10.454 0 -10 3.94627 0.924127 #351#) +COMMENT #353=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.97747 1.9 +COMMENT 0.082322 1) +COMMENT #354=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 268634488 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1306)" "@N (@S)" 5 12.1767 +COMMENT -22.6503 0 -10 4.42082 0.924127 #353#)) +COMMENT (CObjectList)) +COMMENT #355=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #356=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.98468 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.92045 +COMMENT 19.1656 0 -10 4.67059 0.924127 #356#) +COMMENT #358=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.97202 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24831748 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2446)" "@N (@S)" 5 -13.8027 +COMMENT -5.22699 0 -10 5.27002 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.43758 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 21543624 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 11.6146 10.454 +COMMENT 0 -10 4.14608 0.924127 #361#) +COMMENT #363=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.8385 1.9 0.082322 +COMMENT 1) +COMMENT #364=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 25704200 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1385)" "@N (@S)" 5 11.124 +COMMENT -26.1349 0 -10 4.62063 0.924127 #363#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #365=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #366=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21419056 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2165..2803 + /vntifkey="33" + /label=ColE1 + terminator 1937..2041 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2862..2967) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2993..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3079..3100 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..741 + /vntifkey="21" + /label=core\riboswitch + mutation 740..740 + /vntifkey="62" + /label=orig\T + misc_feature 738..738 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 719..1930 + /vntifkey="4" + /label=tetA* +BASE COUNT 803 a 980 c 926 g 857 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gctattacaa gaagatcagg agcaaactat + 721 gcaagtcgac ctgctggatc caaaatctaa caatgcgctc atcgtcatcc tcggcaccgt + 781 caccctggat gctgtaggca taggcttggt tatgccggta ctgccgggcc tcttgcggga + 841 tatcgtccat tccgacagca tcgccagtca ctatggcgtg ctgctagcgc tatatgcgtt + 901 gatgcaattt ctatgcgcac ccgttctcgg agcactgtcc gaccgctttg gccgccgccc + 961 agtcctgctc gcttcgctac ttggagccac tatcgactac gcgatcatgg cgaccacacc + 1021 cgtcctgtgg atcctctacg ccggacgcat cgtggccggc atcaccggcg ccacaggtgc + 1081 ggttgctggc gcctatatcg ccgacatcac cgatggggaa gatcgggctc gccacttcgg + 1141 gctcatgagc gcttgtttcg gcgtgggtat ggtggcaggc cccgtggccg ggggactgtt + 1201 gggcgccatc tccttgcatg caccattcct tgcggcggcg gtgctcaacg gcctcaacct + 1261 actactgggc tgcttcctaa tgcaggagtc gcataaggga gagcgtcgac cgatgccctt + 1321 gagagccttc aacccagtca gctccttccg gtgggcgcgg ggcatgacta tcgtcgccgc + 1381 acttatgact gtcttcttta tcatgcaact cgtaggacag gtgccggcag cgctctgggt + 1441 cattttcggc gaggaccgct ttcgctggag cgcgacgatg atcggcctgt cgcttgcggt + 1501 attcggaatc ttgcacgccc tcgctcaagc cttcgtcact ggtcccgcca ccaaacgttt + 1561 cggcgagaag caggccatta tcgccggcat ggcggccgac gcgctgggct acgtcttgct + 1621 ggcgttcgcg acgcgaggct ggatggcctt ccccattatg attcttctcg cttccggcgg + 1681 catcgggatg cccgcgttgc aggccatgct gtccaggcag gtagatgacg accatcaggg + 1741 acagcttcaa ggatcgctcg cggctcttac cagcctaact tcgatcactg gaccgctgat + 1801 cgtcacggcg atttatgccg cctcggcgag cacatggaac gggttggcat ggattgtagg + 1861 cgccgcccta taccttgtct gcctccccgc gttgcgtcgc ggtgcatgga gccgggccac + 1921 ctcgacctaa tctagaggca tcaaataaaa cgaaaggctc agtcgaaaga ctgggccttt + 1981 cgttttatct gttgtttgtc ggtgaacgct ctcctgagta ggacaaatcc gccgccctag + 2041 acctaggcgt tcggctgcgg cgagcggtat cagctcactc aaaggcggta atacggttat + 2101 ccacagaatc aggggataac gcaggaaaga acatgtgagc aaaaggccag caaaaggcca + 2161 ggaaccgtaa aaaggccgcg ttgctggcgt ttttccatag gctccgcccc cctgacgagc + 2221 atcacaaaaa tcgacgctca agtcagaggt ggcgaaaccc gacaggacta taaagatacc + 2281 aggcgtttcc ccctggaagc tccctcgtgc gctctcctgt tccgaccctg ccgcttaccg + 2341 gatacctgtc cgcctttctc ccttcgggaa gcgtggcgct ttctcaatgc tcacgctgta + 2401 ggtatctcag ttcggtgtag gtcgttcgct ccaagctggg ctgtgtgcac gaaccccccg + 2461 ttcagcccga ccgctgcgcc ttatccggta actatcgtct tgagtccaac ccggtaagac + 2521 acgacttatc gccactggca gcagccactg gtaacaggat tagcagagcg aggtatgtag + 2581 gcggtgctac agagttcttg aagtggtggc ctaactacgg ctacactaga aggacagtat + 2641 ttggtatctg cgctctgctg aagccagtta ccttcggaaa aagagttggt agctcttgat + 2701 ccggcaaaca aaccaccgct ggtagcggtg gtttttttgt ttgcaagcag cagattacgc + 2761 gcagaaaaaa aggatctcaa gaagatcctt tgatcttttc tacggggtct gacgctcagt + 2821 ggaacgaaaa ctcacgttaa gggattttgg tcatgactag tgcttggatt ctcaccaata + 2881 aaaaacgccc ggcggcaacc gagcgttctg aacaaatcca gatggagttc tgaggtcatt + 2941 actggatcta tcaacaggag tccaagcgag ctcaaacttg gtctgacagt taccaatgct + 3001 taatcagtga ggcacctatc tcagcgatct gtctatttcg ttcatccata gttgcctgac + 3061 tccccgtcgt gtagataact acgatacggg agggcttacc atctggcccc agtgctgcaa + 3121 tgataccgcg agacccacgc tcaccggctc cagatttatc agcaataaac cagccagccg + 3181 gaagggccga gcgcagaagt ggtcctgcaa ctttatccgc ctccatccag tctattaatt + 3241 gttgccggga agctagagta agtagttcgc cagttaatag tttgcgcaac gttgttgcca + 3301 ttgctacagg catcgtggtg tcacgctcgt cgtttggtat ggcttcattc agctccggtt + 3361 cccaacgatc aaggcgagtt acatgatccc ccatgttgtg caaaaaagcg gttagctcct + 3421 tcggtcctcc gatcgttgtc agaagtaagt tggccgcagt gttatcactc atggttatgg + 3481 cagcactgca taattctctt actgtcatgc catccgtaag atgcttttct gtgactggtg + 3541 agtactcaac caagtcattc tgagaa +// diff --git a/lib/VNTI files/pLacECR#48-LibAL1.gb b/lib/VNTI files/pLacECR#48-LibAL1.gb new file mode 100644 index 00000000..ca60deaa --- /dev/null +++ b/lib/VNTI files/pLacECR#48-LibAL1.gb @@ -0,0 +1,1700 @@ +LOCUS pLacECR#48-LibAL 4258 bp DNA circular 3-JUL-2009 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.informaxinc.com/ +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|522886571| +COMMENT VNTDBDATE|522887431| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacECR#48-LibAL1.gb| +COMMENT VNTAUTHORNAME|Demo User| +COMMENT VNTOAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacECR#48-LibAL1.gb" 0 4258 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "(0,{1,2})" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4258 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 3 658 0 951 0 2426 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 2624 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 1901 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2613 0 3665 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 3 647 0 1227 0 2509 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2735 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 3138 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 2228 0 2824 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 809 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 805 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 2 491 0 2327 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 4126 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3817 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1065 0 3544 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1306 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2857 3495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2857..3495") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 2629 2733 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2629..2733") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 3554 3659 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3554..3659)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3685 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3685..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3771 3792 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3771..3792") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "orig T" 62 0 0 661 661 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "661..661") +COMMENT #43=(CFSignal (CObList) "orig G" 21 0 0 659 659 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "659..659") +COMMENT #44=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #45=(CFSignal (CObList) "tetA*" 4 0 0 640 1848 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "640..1848") +COMMENT #46=(CFSignal (CObList) "GFPuv" 4 0 0 1906 2622 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1906..2622") +COMMENT #47=(CFSignal (CObList) "(GGGS)4 Linker" 4 0 0 1852 1899 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1852..1899") +COMMENT #48=(CFSignal (CObList) "#48 seq" 21 0 0 608 627 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "608..627") +COMMENT #49=(CFSignal (CObList) "LibAL1-rev" 27 0 1 580 611 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #50=(CFSignal (CObList) "N5-LibAL1-fwd" 27 0 0 612 642 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #51=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #52=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pLacECR#48-LibAL1.gb" 2) 5 "" 0 4) +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacECR#48-LibAL1.gb'" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/03/09 10:16PM" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/03/09 10:30PM" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4258 bp" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 9-DEC-2008" 1))) +COMMENT "Standard Fields") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #66=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 2 0 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #70=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 640 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 640 End: 1848" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 640..1848" 1))) "tetA*") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1852 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1852 End: 1899" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1852..1899" 1))) "(GGGS)4 Linker") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1906 (3 #46# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1906 End: 2622" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1906..2622" 1))) "GFPuv") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3685 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3685 End: 284 (Complementary)" +COMMENT 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3685..284)" 1))) "AmpR"))) +COMMENT "CDS (4 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 608 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 608 End: 627 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 608..627" 1))) "#48 seq") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 659 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 659 End: 659 " 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 659..659" 1))) "orig G") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3771 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3771 End: 3792" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3771..3792" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 2 1 0 178) +COMMENT (CObjectList +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 580 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 580 End: 611 (Complementary)" +COMMENT 1))) "LibAL1-rev") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 612 (3 #50# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 612 End: 642 " 1))) +COMMENT "N5-LibAL1-fwd"))) "Primer (3 total)") +COMMENT #112=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #113=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #122=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #127=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #131=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #140=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #141=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2857 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2857 End: 3495" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2857..3495" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #146=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2629 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2629 End: 2733" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2629..2733" 1))) "T1") +COMMENT #151=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3554 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3554 End: 3659 (Complementary)" +COMMENT 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3554..3659)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #156=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #157=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #161=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #162=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #166=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #172=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 661 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 661 End: 661 " 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 661..661" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #176=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32440312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #180=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22609296 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #181=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #182=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2228 " 1) +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 2824 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22618096 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32444712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #186=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 3138 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32440088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2735 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32443288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #193=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #194=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 658 " 1) +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 951 " 1) +COMMENT #196=(CLinePar +COMMENT (CParagraph 0 (1 #1# 3) 1 2 2 0 191) +COMMENT " N3: 2426 " 1))))) "BamHI: 3 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22601496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #198=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #199=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1306 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32444800 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22613456 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22602680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 809 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22606312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #207=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #208=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3817 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22601920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32443200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32439752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #212=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32441912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #215=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #216=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 1901 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32442512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #218=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22602232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #219=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #220=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 805 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #221=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32445784 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22600736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #223=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #224=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 4126 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #225=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32441512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #226=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #227=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2613 " 1) +COMMENT #228=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 3665 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #229=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32441288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #230=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #231=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 647 " 1) +COMMENT #232=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1227 " 1) +COMMENT #233=(CLinePar +COMMENT (CParagraph 0 (1 #7# 3) 1 2 2 0 191) +COMMENT " N3: 2509 " 1))))) "SalI: 3 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #234=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22615704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #235=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32444064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #236=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32442424 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #237=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #238=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 2624 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #239=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22603200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #240=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #241=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1) +COMMENT #242=(CLinePar +COMMENT (CParagraph 0 (1 #19# 2) 1 2 2 0 191) +COMMENT " N2: 2327 " 1))))) "XhoI: 2 sites") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #243=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 32443976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #244=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #245=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #246=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #247=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #248=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #249=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #250=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #251=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #252=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #253=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #254=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #255=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #256=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #257=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #258=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #259=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #260=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #261=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #262=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #263=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #264=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #265=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #266=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #267=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #268=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #269=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #270=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #271=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #272=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #273=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #274=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #275=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #276=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #277=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #278=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #279=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #280=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #281=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #282=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #283=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -20) 1 1 0 1 1 +COMMENT (mapper: 18.8577 -28.4086 40.0378 40.0378 0.01 10 -1 4258 4258 1 0 0) +COMMENT #284=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1506 100) +COMMENT (CObjectList +COMMENT #285=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1297 100) +COMMENT (CObjectList +COMMENT #286=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #250# 32005892 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27566 6.27366 1 0.0214037) 0.147327) +COMMENT #287=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #247# 26588560 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacECR#48-LibAL1.gb" "@N" 1 0 +COMMENT 0.871165 0 -10 12.5631 1.44863 Nil) +COMMENT #288=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #246# 26592672 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4258 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #289=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1018 100) +COMMENT (CObjectList +COMMENT #290=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -321 100) +COMMENT (CObjectList +COMMENT #291=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.85478 0.845657 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 28508244 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.53561 12.1963 0 -10 2.7474 1.04901 #291#) +COMMENT #293=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.55058 5.33177 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 2081903016 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 13.709 -20.908 0 -10 2.29783 1.04901 #293#) +COMMENT #295=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.41027 3.46661 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26772516 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "GFPuv" "@N" 1 +COMMENT -4.70046 -13.9386 0 -10 3.22196 1.04901 #295#) +COMMENT #297=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.47544 3.54616 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26593408 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "(GGGS)4 Linker" +COMMENT "@N" 1 8.6826 -24.3926 0 -10 7.26813 1.04901 +COMMENT #297#)) (CObjectList)) +COMMENT #299=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -460 100) +COMMENT (CObjectList +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #253# 27060248 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 0.718956 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 28486852 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -10.3831 8.71165 0 -10 4.0212 1.04901 #300#) +COMMENT #302=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #253# 20539776 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.41869 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26405632 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4136 1.74233 0 -10 1.17389 1.04901 #302#) +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #253# 20558224 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.30377 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26997756 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 11.8624 -10.454 0 -10 2.94721 1.04901 #304#) +COMMENT #306=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #253# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.37891 1.9 +COMMENT 0.082322 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26629868 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "#48 seq" "@N" 1 +COMMENT 13.1318 -3.48466 0 -10 3.67153 1.04901 #306#)) +COMMENT (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1018 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #253# 20519240 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.51298 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 22455064 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 10.1458 10.454 0 -10 2.62252 1.04901 #309#) +COMMENT #311=(CScratch +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #253# 20523480 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.42016 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 28637628 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "LibAL1-rev" +COMMENT "@N" 1 13.7851 3.48466 0 -10 5.07021 1.04901 +COMMENT #311#) +COMMENT #313=(CScratch +COMMENT (CWidget 0 (3 #50# 0) 1 2 0 0 #253# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.37302 1.9 +COMMENT 0.082322 1) +COMMENT #314=(CLabel (CWidget 0 (0 0) 1 2 0 0 #245# 3 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "N5-LibAL1-fwd" +COMMENT "@N" 1 13.9711 -5.22699 0 -10 6.6687 1.04901 +COMMENT #313#)) (CObjectList)) +COMMENT #315=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -112 100) +COMMENT (CObjectList +COMMENT #316=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #266# 20537048 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.57633 1.9 +COMMENT 0.082322 1) +COMMENT #317=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26593460 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 10.0179 17.4233 0 -10 2.62252 1.04901 #316#) +COMMENT #318=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #266# 20532648 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.07282 1.9 +COMMENT 0.082322 1) +COMMENT #319=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26588476 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.33698 26.1349 0 -10 3.94627 1.04901 #318#) +COMMENT #320=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #266# 20515448 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.79437 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26594428 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 8.46263 22.6503 0 -10 4.0212 1.04901 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -251 100) +COMMENT (CObjectList +COMMENT #323=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #261# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.70892 5.85478 1 0.082322) 0.8 1.8 1) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26590724 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.10948 20.908 0 -10 2.7474 1.04901 #323#) +COMMENT #325=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #261# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.38775 5.54097 1 0.082322) 0.8 1.8 0) +COMMENT #326=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26593004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 11.2684 6.96932 0 -10 2.69745 1.04901 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1367 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.41869 1.9 0.082322 +COMMENT 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 22223852 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.934 0 0 -10 2.14797 1.04901 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1158 100) +COMMENT (CObjectList +COMMENT #331=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.12411 2.06553 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26739876 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -13.298 3.48466 0 -10 2.7474 1.04901 #331#)) +COMMENT (CObjectList)) +COMMENT #333=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -879 100) +COMMENT (CObjectList +COMMENT #334=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #253# +COMMENT 1886220099 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 2.24674 2.40143) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 28501708 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.0951 -3.48466 0 -10 1.17389 1.04901 #334#) +COMMENT #336=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #253# +COMMENT 1702043758 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 0.882489 1.03866) +COMMENT #337=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 393218 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -11.5231 5.22699 0 -10 1.17389 1.04901 #336#)) +COMMENT (CObjectList)) +COMMENT #338=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1576 100) +COMMENT (CObjectList +COMMENT #339=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #253# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.43637 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 393241 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 11.6363 5.22699 0 -10 1.49858 1.04901 #339#)) +COMMENT (CObjectList)) +COMMENT #341=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -739 100) +COMMENT (CObjectList +COMMENT #342=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #253# 20514008 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.47173 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 22079700 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 9.83237 8.71165 0 -10 1.49858 1.04901 #342#)) +COMMENT (CObjectList)) +COMMENT #344=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1297 100) +COMMENT (CObjectList +COMMENT #345=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #253# 20559104 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.54392 1.9 +COMMENT 0.082322 1) +COMMENT #346=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 2081903016 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 11.3958 12.1963 0 -10 5.86945 1.04901 +COMMENT #345#) +COMMENT #347=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #253# 20519560 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.30083 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26589812 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 11.9471 -12.1963 0 -10 2.7474 1.04901 #347#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #349=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1088 100) +COMMENT (CObjectList +COMMENT #350=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -2135 100) +COMMENT (CObjectList +COMMENT #351=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #252# 20522920 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.4088 1.9 +COMMENT 0.082322 1) +COMMENT #352=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #254# 393227 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (2624)" "@N (@S)" 5 -13.3264 +COMMENT -5.22699 0 -10 4.79547 0.924127 #351#)) +COMMENT (CObjectList)) +COMMENT #353=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -1716 100) +COMMENT (CObjectList +COMMENT #354=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #252# 20515848 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.47397 1.9 +COMMENT 0.082322 1) +COMMENT #355=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #254# 2081903016 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (1901)" "@N (@S)" 5 7.86764 +COMMENT -26.1349 0 -10 5.46983 0.924127 #354#)) +COMMENT (CObjectList)) +COMMENT #356=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -1190 100) +COMMENT (CObjectList +COMMENT #357=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #252# 20516808 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.65588 1.9 +COMMENT 0.082322 1) +COMMENT #358=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #254# 3736008 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 10.3058 +COMMENT 19.1656 0 -10 4.34589 0.924127 #357#)) +COMMENT (CObjectList)) +COMMENT #359=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1131 100) +COMMENT (CObjectList +COMMENT #360=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #252# 20534648 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.24526 1.9 +COMMENT 0.082322 1) +COMMENT #361=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #254# 28531756 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2735)" "@N (@S)" 5 -14.2866 +COMMENT -1.74233 0 -10 4.94533 0.924127 #360#)) +COMMENT (CObjectList)) +COMMENT #362=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1856 100) +COMMENT (CObjectList +COMMENT #363=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #252# 26534648 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.38628 1.9 +COMMENT 0.082322 1) +COMMENT #364=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #254# 32209748 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.2343 +COMMENT -1.74233 0 -10 4.67059 0.924127 #363#)) +COMMENT (CObjectList)) +COMMENT #365=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -1062 100) +COMMENT (CObjectList +COMMENT #366=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #252# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.08278 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel (CWidget 0 (0 0) 1 2 0 0 #254# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (809)" "@N (@S)" 5 14.3167 +COMMENT -15.681 0 -10 4.27096 0.924127 #366#)) +COMMENT (CObjectList)) +COMMENT #368=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -1647 100) +COMMENT (CObjectList +COMMENT #369=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #252# 235 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.08868 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel (CWidget 0 (0 0) 1 2 0 0 #254# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (805)" "@N (@S)" 5 14.1539 +COMMENT -13.9386 0 -10 4.27096 0.924127 #369#)) +COMMENT (CObjectList)) +COMMENT #371=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -1062 100) +COMMENT (CObjectList +COMMENT #372=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #252# 27209832 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.195945 1.9 +COMMENT 0.082322 1) +COMMENT #373=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #254# 2082602612 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (4126)" "@N (@S)" 5 -5.46085 +COMMENT 13.9386 0 -10 4.69556 0.924127 #372#)) +COMMENT (CObjectList)) +COMMENT #374=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -1089 100) +COMMENT (CObjectList +COMMENT #375=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #252# 27085272 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.651185 1.9 +COMMENT 0.082322 1) +COMMENT #376=(CLabel (CWidget 0 (0 0) 1 2 0 0 #254# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3817)" "@N (@S)" 5 -10.1202 +COMMENT 10.454 0 -10 4.62063 0.924127 #375#)) +COMMENT (CObjectList)) +COMMENT #377=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -1995 100) +COMMENT (CObjectList +COMMENT #378=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #252# 20556144 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.425 1.9 +COMMENT 0.082322 1) +COMMENT #379=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 26740788 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2613)" "@N (@S)" 5 -12.2529 +COMMENT -6.96932 0 -10 4.62063 0.924127 #378#) +COMMENT #380=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #252# 20536088 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.875123 1.9 +COMMENT 0.082322 1) +COMMENT #381=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 26599732 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (3665)" "@N (@S)" 5 -12.3051 +COMMENT 6.96932 0 -10 4.67059 0.924127 #380#)) +COMMENT (CObjectList)) +COMMENT #382=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 1114118 100) +COMMENT (CObjectList +COMMENT #383=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #252# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.03157 1.9 +COMMENT 0.082322 1) +COMMENT #384=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 194 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.45382 +COMMENT 24.3926 0 -10 4.67059 0.924127 #383#) +COMMENT #385=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #252# 27088720 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.65154 1.9 +COMMENT 0.082322 1) +COMMENT #386=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 14746168 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (3138)" "@N (@S)" 5 -14.5057 +COMMENT 1.74233 0 -10 5.19509 0.924127 #385#)) +COMMENT (CObjectList)) +COMMENT #387=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -2066 100) +COMMENT (CObjectList +COMMENT #388=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #252# 27085752 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.99221 1.9 +COMMENT 0.082322 1) +COMMENT #389=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 14746016 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2228)" "@N (@S)" 5 -5.22292 +COMMENT -15.681 0 -10 4.8704 0.924127 #388#) +COMMENT #390=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #252# 27074952 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.11414 1.9 +COMMENT 0.082322 1) +COMMENT #391=(CLabel (CWidget 0 (0 0) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2824)" "@N (@S)" 5 -14.4324 0 +COMMENT 0 -10 4.8704 0.924127 #390#)) (CObjectList)) +COMMENT #392=(CGroupWidget +COMMENT (CWidget 2 (10 #19# 0) 1 2 0 0 Nil -1438 100) +COMMENT (CObjectList +COMMENT #393=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #252# 27089760 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.55128 1.9 +COMMENT 0.082322 1) +COMMENT #394=(CLabel (CWidget 0 (0 0) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 10.9582 +COMMENT 13.9386 0 -10 4.19603 0.924127 #393#) +COMMENT #395=(CScratch +COMMENT (CWidget 2 (1 #19# 2) 1 2 0 0 #252# 20558544 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.84636 1.9 +COMMENT 0.082322 1) +COMMENT #396=(CLabel (CWidget 0 (0 0) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (2327)" "@N (@S)" 5 -6.57646 +COMMENT -12.1963 0 -10 4.79547 0.924127 #395#)) +COMMENT (CObjectList)) +COMMENT #397=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil -1926 100) +COMMENT (CObjectList +COMMENT #398=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #252# 20534808 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.57338 1.9 +COMMENT 0.082322 1) +COMMENT #399=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 2081903016 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 10.8007 15.681 +COMMENT 0 -10 4.14608 0.924127 #398#) +COMMENT #400=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #252# 20533048 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.35057 1.9 +COMMENT 0.082322 1) +COMMENT #401=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 32462428 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1306)" "@N (@S)" 5 14.6144 +COMMENT -22.6503 0 -10 4.62063 0.924127 #400#)) +COMMENT (CObjectList)) +COMMENT #402=(CGroupWidget +COMMENT (CWidget 3 (10 #1# 0) 1 2 0 0 Nil -809 100) +COMMENT (CObjectList +COMMENT #403=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #252# 27112432 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.30525 1.9 +COMMENT 0.082322 1) +COMMENT #404=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 3736184 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (658)" "@N (@S)" 5 13.0212 +COMMENT -8.71165 0 -10 5.12016 0.924127 #403#) +COMMENT #405=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #252# 20517768 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.87358 1.9 +COMMENT 0.082322 1) +COMMENT #406=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 26740332 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (951)" "@N (@S)" 5 15.4024 +COMMENT -17.4233 0 -10 5.07021 0.924127 #405#) +COMMENT #407=(CScratch +COMMENT (CWidget 3 (1 #1# 3) 1 2 0 0 #252# 20528800 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.7005 1.9 +COMMENT 0.082322 1) +COMMENT #408=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 28477196 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (2426)" "@N (@S)" 5 -9.28737 +COMMENT -10.454 0 -10 5.66964 0.924127 #407#)) +COMMENT (CObjectList)) +COMMENT #409=(CGroupWidget +COMMENT (CWidget 3 (10 #7# 0) 1 2 0 0 Nil -670 100) +COMMENT (CObjectList +COMMENT #410=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #252# 20522760 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.32145 1.9 +COMMENT 0.082322 1) +COMMENT #411=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 26773840 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (647)" "@N (@S)" 5 12.0575 +COMMENT -6.96932 0 -10 3.94627 0.924127 #410#) +COMMENT #412=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #252# 20535608 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.46696 1.9 +COMMENT 0.082322 1) +COMMENT #413=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 26377108 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1227)" "@N (@S)" 5 14.8063 +COMMENT -19.1656 0 -10 4.42082 0.924127 #412#) +COMMENT #414=(CScratch +COMMENT (CWidget 3 (1 #7# 3) 1 2 0 0 #252# 20538656 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.57822 1.9 +COMMENT 0.082322 1) +COMMENT #415=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 2081903016 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (2509)" "@N (@S)" 5 -10.8797 +COMMENT -8.71165 0 -10 4.47078 0.924127 #414#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #416=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1121 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #417=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1647 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList #418=(AnlzFontMaskItem 611 615 1)) +COMMENT 1 (CObList)) (CObList) 1970431100 (CStringList) 1919973477 1769173861 +COMMENT (CObList))) +FEATURES Location/Qualifiers + rep_origin 2857..3495 + /vntifkey="33" + /label=ColE1 + terminator 2629..2733 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(3554..3659) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3685..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3771..3792 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + mutation 661..661 + /vntifkey="62" + /label=orig\T + misc_feature 659..659 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + CDS 640..1848 + /vntifkey="4" + /label=tetA* + CDS 1906..2622 + /vntifkey="4" + /label=GFPuv + CDS 1852..1899 + /vntifkey="4" + /label=(GGGS)4\Linker + misc_feature 608..627 + /vntifkey="21" + /label=#48\seq + primer complement(580..611) + /vntifkey="27" + /label=LibAL1-rev + primer 612..642 + /vntifkey="27" + /label=N5-LibAL1-fwd +BASE COUNT 1009 a 1124 c 1072 g 1048 t 5 others +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcttt annnnnactc gatccgacag gagcaaacta tgcaagtcga cctgctggat + 661 ccaaaatcta acaatgcgct catcgtcatc ctcggcaccg tcaccctgga tgctgtaggc + 721 ataggcttgg ttatgccggt actgccgggc ctcttgcggg atatcgtcca ttccgacagc + 781 atcgccagtc actatggcgt gctgctagcg ctatatgcgt tgatgcaatt tctatgcgca + 841 cccgttctcg gagcactgtc cgaccgcttt ggccgccgcc cagtcctgct cgcttcgcta + 901 cttggagcca ctatcgacta cgcgatcatg gcgaccacac ccgtcctgtg gatcctctac + 961 gccggacgca tcgtggccgg catcaccggc gccacaggtg cggttgctgg cgcctatatc + 1021 gccgacatca ccgatgggga agatcgggct cgccacttcg ggctcatgag cgcttgtttc + 1081 ggcgtgggta tggtggcagg ccccgtggcc gggggactgt tgggcgccat ctccttgcat + 1141 gcaccattcc ttgcggcggc ggtgctcaac ggcctcaacc tactactggg ctgcttccta + 1201 atgcaggagt cgcataaggg agagcgtcga ccgatgccct tgagagcctt caacccagtc + 1261 agctccttcc ggtgggcgcg gggcatgact atcgtcgccg cacttatgac tgtcttcttt + 1321 atcatgcaac tcgtaggaca ggtgccggca gcgctctggg tcattttcgg cgaggaccgc + 1381 tttcgctgga gcgcgacgat gatcggcctg tcgcttgcgg tattcggaat cttgcacgcc + 1441 ctcgctcaag ccttcgtcac tggtcccgcc accaaacgtt tcggcgagaa gcaggccatt + 1501 atcgccggca tggcggccga cgcgctgggc tacgtcttgc tggcgttcgc gacgcgaggc + 1561 tggatggcct tccccattat gattcttctc gcttccggcg gcatcgggat gcccgcgttg + 1621 caggccatgc tgtccaggca ggtagatgac gaccatcagg gacagcttca aggatcgctc + 1681 gcggctctta ccagcctaac ttcgatcact ggaccgctga tcgtcacggc gatttatgcc + 1741 gcctcggcga gcacatggaa cgggttggca tggattgtag gcgccgccct ataccttgtc + 1801 tgcctccccg cgttgcgtcg cggtgcatgg agccgggcca cctcgaccct gggcggtgga + 1861 agcggcggcg gctccggtgg tggttctgga ggcggttcta agcttatgag taaaggagaa + 1921 gaacttttca ctggagttgt cccaattctt gttgaattag atggtgatgt taatgggcac + 1981 aaattttctg tcagtggaga gggtgaaggt gatgcaacat acggaaaact tacccttaaa + 2041 tttatttgca ctactggaaa actacctgtt ccatggccaa cacttgtcac tactttctct + 2101 tatggtgttc aatgcttttc ccgttatccg gatcatatga aacggcatga ctttttcaag + 2161 agtgccatgc ccgaaggtta tgtacaggaa cgcactatat ctttcaaaga tgacgggaac + 2221 tacaagacgc gtgctgaagt caagtttgaa ggtgataccc ttgttaatcg tatcgagtta + 2281 aaaggtattg attttaaaga agatggaaac attctcggac acaaactcga gtacaactat + 2341 aactcacaca atgtatacat cacggcagac aaacaaaaga atggaatcaa agctaacttc + 2401 aaaattcgcc acaacattga agatggatcc gttcaactag cagaccatta tcaacaaaat + 2461 actccaattg gcgatggccc tgtcctttta ccagacaacc attacctgtc gacacaatct + 2521 gccctttcga aagatcccaa cgaaaagcgt gaccacatgg tccttcttga gtttgtaact + 2581 gctgctggga ttacacatgg catggatgag ctctacaaat aatctagagg catcaaataa + 2641 aacgaaaggc tcagtcgaaa gactgggcct ttcgttttat ctgttgtttg tcggtgaacg + 2701 ctctcctgag taggacaaat ccgccgccct agacctaggc gttcggctgc ggcgagcggt + 2761 atcagctcac tcaaaggcgg taatacggtt atccacagaa tcaggggata acgcaggaaa + 2821 gaacatgtga gcaaaaggcc agcaaaaggc caggaaccgt aaaaaggccg cgttgctggc + 2881 gtttttccat aggctccgcc cccctgacga gcatcacaaa aatcgacgct caagtcagag + 2941 gtggcgaaac ccgacaggac tataaagata ccaggcgttt ccccctggaa gctccctcgt + 3001 gcgctctcct gttccgaccc tgccgcttac cggatacctg tccgcctttc tcccttcggg + 3061 aagcgtggcg ctttctcaat gctcacgctg taggtatctc agttcggtgt aggtcgttcg + 3121 ctccaagctg ggctgtgtgc acgaaccccc cgttcagccc gaccgctgcg ccttatccgg + 3181 taactatcgt cttgagtcca acccggtaag acacgactta tcgccactgg cagcagccac + 3241 tggtaacagg attagcagag cgaggtatgt aggcggtgct acagagttct tgaagtggtg + 3301 gcctaactac ggctacacta gaaggacagt atttggtatc tgcgctctgc tgaagccagt + 3361 taccttcgga aaaagagttg gtagctcttg atccggcaaa caaaccaccg ctggtagcgg + 3421 tggttttttt gtttgcaagc agcagattac gcgcagaaaa aaaggatctc aagaagatcc + 3481 tttgatcttt tctacggggt ctgacgctca gtggaacgaa aactcacgtt aagggatttt + 3541 ggtcatgact agtgcttgga ttctcaccaa taaaaaacgc ccggcggcaa ccgagcgttc + 3601 tgaacaaatc cagatggagt tctgaggtca ttactggatc tatcaacagg agtccaagcg + 3661 agctcaaact tggtctgaca gttaccaatg cttaatcagt gaggcaccta tctcagcgat + 3721 ctgtctattt cgttcatcca tagttgcctg actccccgtc gtgtagataa ctacgatacg + 3781 ggagggctta ccatctggcc ccagtgctgc aatgataccg cgagacccac gctcaccggc + 3841 tccagattta tcagcaataa accagccagc cggaagggcc gagcgcagaa gtggtcctgc + 3901 aactttatcc gcctccatcc agtctattaa ttgttgccgg gaagctagag taagtagttc + 3961 gccagttaat agtttgcgca acgttgttgc cattgctaca ggcatcgtgg tgtcacgctc + 4021 gtcgtttggt atggcttcat tcagctccgg ttcccaacga tcaaggcgag ttacatgatc + 4081 ccccatgttg tgcaaaaaag cggttagctc cttcggtcct ccgatcgttg tcagaagtaa + 4141 gttggccgca gtgttatcac tcatggttat ggcagcactg cataattctc ttactgtcat + 4201 gccatccgta agatgctttt ctgtgactgg tgagtactca accaagtcat tctgagaa +// diff --git a/lib/VNTI files/pLacECR#48-lacZ.gb b/lib/VNTI files/pLacECR#48-lacZ.gb new file mode 100644 index 00000000..8e754953 --- /dev/null +++ b/lib/VNTI files/pLacECR#48-lacZ.gb @@ -0,0 +1,1513 @@ +LOCUS pLacECR#48 5362 bp DNA circular 1-JUL-2009 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|522683451| +COMMENT VNTDBDATE|522683451| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacECR#48-lacZ| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacECR#48-lacZ" 0 5362 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "(0,{1,2})" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5362 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 658 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1491 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3728 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2607 0 4769 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 647 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1290 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3839 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3012 0 3127 0 +COMMENT 4242 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 1969 0 2749 0 3174 0 +COMMENT 3426 0 3928 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 790 0 1516 0 1996 0 2449 +COMMENT 0 5230 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 4921 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4648 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2184 0 3436 1 0 +COMMENT "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 3961 4599 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1615..2253") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 3733 3837 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1387..1491") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 4658 4763 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2312..2417)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 4789 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2443..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 4875 4896 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2529..2550") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "orig T" 62 0 0 661 661 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "661..661") +COMMENT #43=(CFSignal (CObList) "orig G" 21 0 0 659 659 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "659..659") +COMMENT #44=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #45=(CFSignal (CObList) "tetA*" 4 0 0 640 662 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "640..662") +COMMENT #46=(CFSignal (CObList) "pORFrev" 21 0 0 640 662 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "640..662") +COMMENT #47=(CFSignal (CObList) "lacZ" 4 0 0 640 3726 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #48=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #49=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pLacECR#48-GFP.gb" 2) 5 "" 0 4) +COMMENT #50=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacECR#48-GFP.gb'" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 06/23/09 12:32\214\337\214\343" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 06/23/09 12:32\214\337\214\343" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5362 bp" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 16-JAN-2009" 1))) +COMMENT "Standard Fields") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #63=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 2 0 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 2 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 640 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 640 End: 662 " 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 640..662" 1))) "tetA*") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 640 (3 #47# 0) 1 2 2 1 327) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 640 End: 3726" 1))) "lacZ") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4789 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4789 End: 284 (Complementary)" +COMMENT 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2443..284)" 1))) "AmpR"))) +COMMENT "CDS (3 total)") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 640 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 640 End: 662 " 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 640..662" 1))) "pORFrev") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 659 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 659 End: 659 " 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 659..659" 1))) "orig G") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4875 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4875 End: 4896" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2529..2550" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #114=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #118=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #122=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #128=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3961 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3961 End: 4599" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1615..2253" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3733 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3733 End: 3837" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1387..1491" 1))) "T1") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4658 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4658 End: 4763 (Complementary)" +COMMENT 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2312..2417)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #148=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #153=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #154=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #159=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 661 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 661 End: 661 " 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 661..661" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #163=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26787424 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #165=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 1290 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #168=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22512000 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 5 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22512320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26790712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26787344 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #172=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 3839 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26791352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #175=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 658 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22512720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 2184 " 1) +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 3436 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26790792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22514248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22512080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22512480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #186=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 4921 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22512640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #189=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4648 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26790472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 1491 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26791272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26789592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26790392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22512160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26791192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22512400 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26787584 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #205=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #206=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2607 " 1) +COMMENT #207=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 4769 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26787504 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 647 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22512560 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #212=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26790632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #213=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26789672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #214=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #215=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3728 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #216=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22512240 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #217=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #218=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #219=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22511920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #220=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #221=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #222=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #223=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #224=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #225=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #226=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #227=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #228=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #229=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #230=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #231=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #232=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #233=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #234=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #235=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #236=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #237=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #238=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #239=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #240=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #241=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #242=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #243=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #244=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #245=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #246=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #247=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #248=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #249=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #250=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #251=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #252=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #253=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #254=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #255=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #256=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #257=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #258=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #259=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -20) 1 1 0 1 1 +COMMENT (mapper: 18.5179 -30.1569 40.0378 40.0378 0.01 10 -1 5362 5362 1 0 0) +COMMENT #260=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #261=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #262=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 28147804 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27536 6.27336 1 0.0214037) 0.116993) +COMMENT #263=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #223# 26419152 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacECR#48-GFP.gb" "@N" 1 0 +COMMENT 0.871165 0 -10 11.1395 1.44863 Nil) +COMMENT #264=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #222# 23049196 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5362 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #265=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #266=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #267=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.94092 0.671542 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #268=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 393221 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.23606 15.681 0 -10 2.72243 1.04901 #267#) +COMMENT #269=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #229# 27085752 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.5256 1.9 +COMMENT 0.082322 1) +COMMENT #270=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 26629868 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 12.8927 -1.74233 0 -10 2.27285 1.04901 #269#) +COMMENT #271=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 0.835356 1.91401 +COMMENT 5.5256 1 0.082322) 0.8 1.8 0) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 23008428 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ" "@N" 1 +COMMENT 8.40888 -15.681 0 -10 1.94816 1.04901 #271#)) +COMMENT (CObjectList)) +COMMENT #273=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #274=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.570928 1.9 +COMMENT 0.082322 1) +COMMENT #275=(CLabel (CWidget 0 (0 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -8.90171 12.1963 0 -10 3.97125 1.04901 +COMMENT #274#) +COMMENT #276=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #229# 235 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.59462 1.9 +COMMENT 0.082322 1) +COMMENT #277=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 26594428 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.0864 3.48466 0 -10 1.14891 1.04901 #276#) +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #229# 20522920 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.50337 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 26997756 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 10.1857 -8.71165 0 -10 2.92224 1.04901 #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #229# 20537048 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.5256 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 26593408 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pORFrev" "@N" 1 +COMMENT 13.3496 -3.48466 0 -10 4.24599 1.04901 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #283=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #229# 20534808 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.6695 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 22791836 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 8.6865 10.454 0 -10 2.59755 1.04901 #283#)) +COMMENT (CObjectList)) +COMMENT #285=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #286=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #242# 20533048 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.71981 1.9 +COMMENT 0.082322 1) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 3801648 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 8.62715 17.4233 0 -10 2.59755 1.04901 #286#) +COMMENT #288=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #242# 20515448 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.11407 1.9 +COMMENT 0.082322 1) +COMMENT #289=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 26593004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.84806 27.8773 0 -10 3.92129 1.04901 #288#) +COMMENT #290=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #242# +COMMENT 1818324545 100) (LOGPEN 0 0 16711680) 1 1 +COMMENT 5.89296 1.9 0.082322 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# -1124 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.40053 26.1349 0 -10 3.97125 1.04901 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -248 100) +COMMENT (CObjectList +COMMENT #293=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.8251 5.94092 1 0.082322) 0.8 1.8 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 26599916 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 7.03414 22.6503 0 -10 2.72243 1.04901 #293#) +COMMENT #295=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.57005 5.69173 1 0.082322) 0.8 1.8 0) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 3801512 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 11.2597 6.96932 0 -10 2.67247 1.04901 #295#)) +COMMENT (CObjectList)) +COMMENT #297=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #298=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #227# 5439490 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1 5.59462 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 2081903016 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.823 1.74233 0 -10 2.14797 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #301=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.89266 1.64025 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# -326 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7746 3.48466 0 -10 2.72243 1.04901 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #304=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #229# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.78415 1.90699) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 22964332 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.1553 -3.48466 0 -10 1.14891 1.04901 #304#) +COMMENT #306=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #229# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 0.70079 0.824803) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.29908 8.71165 0 -10 1.14891 1.04901 #306#)) +COMMENT (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #229# 20559104 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.60866 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 26772516 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 11.6276 5.22699 0 -10 1.47361 1.04901 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1992 100) +COMMENT (CObjectList +COMMENT #312=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #229# 27112432 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.63674 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 28162740 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 9.35512 8.71165 0 -10 1.47361 1.04901 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #315=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #229# 27088720 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.69407 1.9 +COMMENT 0.082322 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 3801504 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 9.95508 12.1963 0 -10 5.8195 1.04901 +COMMENT #315#) +COMMENT #317=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #229# 20534648 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.50103 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 393219 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 10.2828 -10.454 0 -10 2.72243 1.04901 #317#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #319=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #320=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #321=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #228# 20536088 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.50454 1.9 +COMMENT 0.082322 1) +COMMENT #322=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 3801512 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (658)" "@N (@S)" 5 12.6536 +COMMENT -6.96932 0 -10 5.09519 0.924127 #321#)) +COMMENT (CObjectList)) +COMMENT #323=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #324=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.52998 1.9 +COMMENT 0.082322 1) +COMMENT #325=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 22918188 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (1491)" "@N (@S)" 5 14.7582 +COMMENT -13.9386 0 -10 4.32092 0.924127 #324#)) +COMMENT (CObjectList)) +COMMENT #326=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1783 100) +COMMENT (CObjectList +COMMENT #327=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #228# 20515848 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.91284 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel (CWidget 0 (0 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3728)" "@N (@S)" 5 -13.8074 +COMMENT -5.22699 0 -10 4.77049 0.924127 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -1646 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #228# 20519560 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.51741 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 3801720 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (647)" "@N (@S)" 5 12.8647 +COMMENT -5.22699 0 -10 3.92129 0.924127 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -879 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #228# 20556144 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.78298 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 3725180 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (3839)" "@N (@S)" 5 -14.304 +COMMENT -1.74233 0 -10 4.92035 0.924127 #333#)) +COMMENT (CObjectList)) +COMMENT #335=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1019 100) +COMMENT (CObjectList +COMMENT #336=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #228# 20519240 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.56889 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 3801680 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.3192 0 0 +COMMENT -10 4.64561 0.924127 #336#)) (CObjectList)) +COMMENT #338=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -879 100) +COMMENT (CObjectList +COMMENT #339=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.69992 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel (CWidget 0 (0 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 9.53329 +COMMENT 13.9386 0 -10 4.17106 0.924127 #339#)) +COMMENT (CObjectList)) +COMMENT #341=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -1367 100) +COMMENT (CObjectList +COMMENT #342=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #228# 20514008 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.517111 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 3801680 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (4921)" "@N (@S)" 5 -9.01486 +COMMENT 13.9386 0 -10 4.57068 0.924127 #342#)) +COMMENT (CObjectList)) +COMMENT #344=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #345=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #228# 27074952 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.22434 1.9 +COMMENT 0.082322 1) +COMMENT #346=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #220# 3736184 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2607)" "@N (@S)" 5 4.30119 +COMMENT -19.1656 0 -10 4.64561 0.924127 #345#) +COMMENT #347=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #228# 20528800 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.694941 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #220# 268634520 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (4769)" "@N (@S)" 5 -10.4951 +COMMENT 10.454 0 -10 4.64561 0.924127 #347#)) +COMMENT (CObjectList)) +COMMENT #349=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil -740 100) +COMMENT (CObjectList +COMMENT #350=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #228# 20517768 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.78298 1.9 +COMMENT 0.082322 1) +COMMENT #351=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #220# 22965324 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 9.04714 +COMMENT 20.908 0 -10 4.29594 0.924127 #350#) +COMMENT #352=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.76514 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #220# 28637628 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (1290)" "@N (@S)" 5 15.0772 +COMMENT -12.1963 0 -10 4.77049 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1088 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #228# 27060248 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.88477 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #220# 3736248 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 8.18803 +COMMENT 24.3926 0 -10 4.77049 0.924127 #355#) +COMMENT #357=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #228# 27209832 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.76192 1.9 +COMMENT 0.082322 1) +COMMENT #358=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #220# 28179268 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 9.45794 +COMMENT 19.1656 0 -10 4.77049 0.924127 #357#) +COMMENT #359=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #228# 20522760 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.836503 1.9 +COMMENT 0.082322 1) +COMMENT #360=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #220# 697 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4648)" "@N (@S)" 5 -12.6972 +COMMENT 6.96932 0 -10 5.295 0.924127 #359#)) +COMMENT (CObjectList)) +COMMENT #361=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil -1158 100) +COMMENT (CObjectList +COMMENT #362=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #228# 27085272 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.71747 1.9 +COMMENT 0.082322 1) +COMMENT #363=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #220# 3801520 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 9.39817 15.681 +COMMENT 0 -10 4.12111 0.924127 #362#) +COMMENT #364=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #228# 20532648 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.71922 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #220# 3801520 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (2184)" "@N (@S)" 5 9.82486 +COMMENT -17.4233 0 -10 4.57068 0.924127 #364#) +COMMENT #366=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #228# 20516808 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.25446 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #220# 393218 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3436)" "@N (@S)" 5 -12.3313 +COMMENT -6.96932 0 -10 4.64561 0.924127 #366#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #368=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #369=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -321 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList #370=(XLATFRAGMENT 639 1028 0 1 640 3086)) +COMMENT (CObList #371=(AnlzXLATItem 639 3725 1 639 3725)) 1 (CObList)) (CObList) +COMMENT 0 (CStringList) 1944749780 23032144 (CObList))) +FEATURES Location/Qualifiers + rep_origin 3961..4599 + /vntifkey="33" + /label=ColE1 + terminator 3733..3837 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4658..4763) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4789..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 4875..4896 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + mutation 661..661 + /vntifkey="62" + /label=orig\T + misc_feature 659..659 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + CDS 640..662 + /vntifkey="4" + /label=tetA* + misc_feature 640..662 + /vntifkey="21" + /label=pORFrev + CDS 640..3726 + /vntifkey="4" + /label=lacZ +BASE COUNT 1262 a 1423 c 1435 g 1242 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcttt acccctactc gatccgacag gagcaaacta tgcaagtcga cctgctggat + 661 ccactgcata tagatcccgt cgttttacaa cgtcgtgact gggaaaaccc tggcgttacc + 721 caacttaatc gccttgcagc acatccccct ttcgccagct ggcgtaatag cgaagaggcc + 781 cgcaccgatc gcccttccca acagttgcgc agcctgaatg gcgaatggcg ctttgcctgg + 841 tttccggcac cagaagcggt gccggaaagc tggctggagt gcgatcttcc tgaggccgat + 901 actgtcgtcg tcccctcaaa ctggcagatg cacggttacg atgcgcccat ctacaccaac + 961 gtgacctatc ccattacggt caatccgccg tttgttccca cggagaatcc gacgggttgt + 1021 tactcgctca catttaatgt tgatgaaagc tggctacagg aaggccagac gcgaattatt + 1081 tttgatggcg ttaactcggc gtttcatctg tggtgcaacg ggcgctgggt cggttacggc + 1141 caggacagtc gtttgccgtc tgaatttgac ctgagcgcat ttttacgcgc cggagaaaac + 1201 cgcctcgcgg tgatggtgct gcgttggagt gacggcagtt atctggaaga tcaggatatg + 1261 tggcggatga gcggcatttt ccgtgacgtc tcgttgctgc ataaaccgac tacacaaatc + 1321 agcgatttcc atgttgccac tcgctttaat gatgatttca gccgcgctgt actggaggct + 1381 gaagttcaga tgtgcggcga gttgcgtgac tacctacggg taacagtttc tttatggcag + 1441 ggtgaaacgc aggtcgccag cggcaccgcg cctttcggcg gtgaaattat cgatgagcgt + 1501 ggtggttatg ccgatcgcgt cacactacgt ctgaacgtcg aaaacccgaa actgtggagc + 1561 gccgaaatcc cgaatctcta tcgtgcggtg gttgaactgc acaccgccga cggcacgctg + 1621 attgaagcag aagcctgcga tgtcggtttc cgcgaggtgc ggattgaaaa tggtctgctg + 1681 ctgctgaacg gcaagccgtt gctgattcga ggcgttaacc gtcacgagca tcatcctctg + 1741 catggtcagg tcatggatga gcagacgatg gtgcaggata tcctgctgat gaagcagaac + 1801 aactttaacg ccgtgcgctg ttcgcattat ccgaaccatc cgctgtggta cacgctgtgc + 1861 gaccgctacg gcctgtatgt ggtggatgaa gccaatattg aaacccacgg catggtgcca + 1921 atgaatcgtc tgaccgatga tccgcgctgg ctaccggcga tgagcgaacg cgtaacgcga + 1981 atggtgcagc gcgatcgtaa tcacccgagt gtgatcatct ggtcgctggg gaatgaatca + 2041 ggccacggcg ctaatcacga cgcgctgtat cgctggatca aatctgtcga tccttcccgc + 2101 ccggtgcagt atgaaggcgg cggagccgac accacggcca ccgatattat ttgcccgatg + 2161 tacgcgcgcg tggatgaaga ccagcccttc ccggctgtgc cgaaatggtc catcaaaaaa + 2221 tggctttcgc tacctggaga gacgcgcccg ctgatccttt gcgaatacgc ccacgcgatg + 2281 ggtaacagtc ttggcggttt cgctaaatac tggcaggcgt ttcgtcagta tccccgttta + 2341 cagggcggct tcgtctggga ctgggtggat cagtcgctga ttaaatatga tgaaaacggc + 2401 aacccgtggt cggcttacgg cggtgatttt ggcgatacgc cgaacgatcg ccagttctgt + 2461 atgaacggtc tggtctttgc cgaccgcacg ccgcatccag cgctgacgga agcaaaacac + 2521 cagcagcagt ttttccagtt ccgtttatcc gggcaaacca tcgaagtgac cagcgaatac + 2581 ctgttccgtc atagcgataa cgagctcctg cactggatgg tggcgctgga tggtaagccg + 2641 ctggcaagcg gtgaagtgcc tctggatgtc gctccacaag gtaaacagtt gattgaactg + 2701 cctgaactac cgcagccgga gagcgccggg caactctggc tcacagtacg cgtagtgcaa + 2761 ccgaacgcga ccgcatggtc agaagccggg cacatcagcg cctggcagca gtggcgtctg + 2821 gcggaaaacc tcagtgtgac gctccccgcc gcgtcccacg ccatcccgca tctgaccacc + 2881 agcgaaatgg atttttgcat cgagctgggt aataagcgtt ggcaatttaa ccgccagtca + 2941 ggctttcttt cacagatgtg gattggcgat aaaaaacaac tgctgacgcc gctgcgcgat + 3001 cagttcaccc gtgcaccgct ggataacgac attggcgtaa gtgaagcgac ccgcattgac + 3061 cctaacgcct gggtcgaacg ctggaaggcg gcgggccatt accaggccga agcagcgttg + 3121 ttgcagtgca cggcagatac acttgctgat gcggtgctga ttacgaccgc tcacgcgtgg + 3181 cagcatcagg ggaaaacctt atttatcagc cggaaaacct accggattga tggtagtggt + 3241 caaatggcga ttaccgttga tgttgaagtg gcgagcgata caccgcatcc ggcgcggatt + 3301 ggcctgaact gccagctggc gcaggtagca gagcgggtaa actggctcgg attagggccg + 3361 caagaaaact atcccgaccg ccttactgcc gcctgttttg accgctggga tctgccattg + 3421 tcagacatgt ataccccgta cgtcttcccg agcgaaaacg gtctgcgctg cgggacgcgc + 3481 gaattgaatt atggcccaca ccagtggcgc ggcgacttcc agttcaacat cagccgctac + 3541 agtcaacagc aactgatgga aaccagccat cgccatctgc tgcacgcgga agaaggcaca + 3601 tggctgaata tcgacggttt ccatatgggg attggtggcg acgactcctg gagcccgtca + 3661 gtatcggcgg aatttcagct gagcgccggt cgctaccatt accagttggt ctggtgtcaa + 3721 aaataatcta gaggcatcaa ataaaacgaa aggctcagtc gaaagactgg gcctttcgtt + 3781 ttatctgttg tttgtcggtg aacgctctcc tgagtaggac aaatccgccg ccctagacct + 3841 aggcgttcgg ctgcggcgag cggtatcagc tcactcaaag gcggtaatac ggttatccac + 3901 agaatcaggg gataacgcag gaaagaacat gtgagcaaaa ggccagcaaa aggccaggaa + 3961 ccgtaaaaag gccgcgttgc tggcgttttt ccataggctc cgcccccctg acgagcatca + 4021 caaaaatcga cgctcaagtc agaggtggcg aaacccgaca ggactataaa gataccaggc + 4081 gtttccccct ggaagctccc tcgtgcgctc tcctgttccg accctgccgc ttaccggata + 4141 cctgtccgcc tttctccctt cgggaagcgt ggcgctttct caatgctcac gctgtaggta + 4201 tctcagttcg gtgtaggtcg ttcgctccaa gctgggctgt gtgcacgaac cccccgttca + 4261 gcccgaccgc tgcgccttat ccggtaacta tcgtcttgag tccaacccgg taagacacga + 4321 cttatcgcca ctggcagcag ccactggtaa caggattagc agagcgaggt atgtaggcgg + 4381 tgctacagag ttcttgaagt ggtggcctaa ctacggctac actagaagga cagtatttgg + 4441 tatctgcgct ctgctgaagc cagttacctt cggaaaaaga gttggtagct cttgatccgg + 4501 caaacaaacc accgctggta gcggtggttt ttttgtttgc aagcagcaga ttacgcgcag + 4561 aaaaaaagga tctcaagaag atcctttgat cttttctacg gggtctgacg ctcagtggaa + 4621 cgaaaactca cgttaaggga ttttggtcat gactagtgct tggattctca ccaataaaaa + 4681 acgcccggcg gcaaccgagc gttctgaaca aatccagatg gagttctgag gtcattactg + 4741 gatctatcaa caggagtcca agcgagctca aacttggtct gacagttacc aatgcttaat + 4801 cagtgaggca cctatctcag cgatctgtct atttcgttca tccatagttg cctgactccc + 4861 cgtcgtgtag ataactacga tacgggaggg cttaccatct ggccccagtg ctgcaatgat + 4921 accgcgagac ccacgctcac cggctccaga tttatcagca ataaaccagc cagccggaag + 4981 ggccgagcgc agaagtggtc ctgcaacttt atccgcctcc atccagtcta ttaattgttg + 5041 ccgggaagct agagtaagta gttcgccagt taatagtttg cgcaacgttg ttgccattgc + 5101 tacaggcatc gtggtgtcac gctcgtcgtt tggtatggct tcattcagct ccggttccca + 5161 acgatcaagg cgagttacat gatcccccat gttgtgcaaa aaagcggtta gctccttcgg + 5221 tcctccgatc gttgtcagaa gtaagttggc cgcagtgtta tcactcatgg ttatggcagc + 5281 actgcataat tctcttactg tcatgccatc cgtaagatgc ttttctgtga ctggtgagta + 5341 ctcaaccaag tcattctgag aa +// diff --git a/lib/VNTI files/pLacECR#48-tetA-GS-GFP.gb b/lib/VNTI files/pLacECR#48-tetA-GS-GFP.gb new file mode 100644 index 00000000..93b03b55 --- /dev/null +++ b/lib/VNTI files/pLacECR#48-tetA-GS-GFP.gb @@ -0,0 +1,1651 @@ +LOCUS pLacECR#48-tetA- 4258 bp DNA circular 3-JUL-2009 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.informaxinc.com/ +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|501244605| +COMMENT VNTDBDATE|522885398| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacECR#48-tetA-GS-GFP.gb| +COMMENT VNTAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacECR#48-tetA-GS-GFP.gb" 0 4258 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "(0,{1,2})" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4258 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 3 658 0 951 0 2426 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 2624 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 1901 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2613 0 3665 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 3 647 0 1227 0 2509 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2735 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 3138 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 2228 0 2824 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 809 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 805 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 2 491 0 2327 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 4126 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3817 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1065 0 3544 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1306 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2857 3495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2936..3574") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 2629 2733 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2708..2812") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 3554 3659 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3633..3738)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3685 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3764..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3771 3792 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3850..3871") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "orig T" 62 0 0 661 661 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "740..740") +COMMENT #43=(CFSignal (CObList) "orig G" 21 0 0 659 659 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "738..738") +COMMENT #44=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #45=(CFSignal (CObList) "tetA*" 4 0 0 640 1848 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "719..1927") +COMMENT #46=(CFSignal (CObList) "GFPuv" 4 0 0 1906 2622 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1985..2701") +COMMENT #47=(CFSignal (CObList) "(GGGS)4 Linker" 4 0 0 1852 1899 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1931..1978") +COMMENT #48=(CFSignal (CObList) "#48 seq" 21 0 0 608 627 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #49=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #50=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacECR#48-tetA-GS-GFP.gb" 2) 5 "" 0 4) +COMMENT #51=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacECR#48-tetA-GS-GFP.gb'" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Foreign object. Author: Yokobayashi Lab. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 12/09/08 10:36AM" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/03/09 09:56PM" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4258 bp" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 2-AUG-2007" 1))) +COMMENT "Standard Fields") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #64=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 640 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 640 End: 1848" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 719..1927" 1))) "tetA*") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1852 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1852 End: 1899" 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1931..1978" 1))) "(GGGS)4 Linker") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1906 (3 #46# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1906 End: 2622" 1) +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1985..2701" 1))) "GFPuv") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3685 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3685 End: 284 (Complementary)" +COMMENT 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3764..284)" 1))) "AmpR"))) +COMMENT "CDS (4 total)") +COMMENT #84=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #85=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 608 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 608 End: 627 " 1))) "#48 seq") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 659 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 659 End: 659 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 738..738" 1))) "orig G") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3771 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3771 End: 3792" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3850..3871" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #118=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #119=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #128=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2857 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2857 End: 3495" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2936..3574" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #137=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #138=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2629 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2629 End: 2733" 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2708..2812" 1))) "T1") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3554 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3554 End: 3659 (Complementary)" +COMMENT 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3633..3738)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #148=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #153=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #154=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #158=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #159=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #164=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 661 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 661 End: 661 " 1) +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 740..740" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #168=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26902816 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28855856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #173=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2228 " 1) +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 2824 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28837584 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26874152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 3138 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26902736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #182=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2735 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26873912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #185=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 658 " 1) +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 951 " 1) +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #1# 3) 1 2 2 0 191) +COMMENT " N3: 2426 " 1))))) "BamHI: 3 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28849112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1306 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26874232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28849192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28856256 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 809 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28837904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3817 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28849032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26873832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26874392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26903056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #207=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #208=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 1901 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26873752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28836624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #211=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 805 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #213=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26874312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28837664 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #215=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #216=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 4126 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26902976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #218=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #219=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2613 " 1) +COMMENT #220=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 3665 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #221=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26902896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #222=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #223=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 647 " 1) +COMMENT #224=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1227 " 1) +COMMENT #225=(CLinePar +COMMENT (CParagraph 0 (1 #7# 3) 1 2 2 0 191) +COMMENT " N3: 2509 " 1))))) "SalI: 3 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #226=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28848952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #227=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26874072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #228=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26873672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #229=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #230=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 2624 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #231=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28836704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #232=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #233=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1) +COMMENT #234=(CLinePar +COMMENT (CParagraph 0 (1 #19# 2) 1 2 2 0 191) +COMMENT " N2: 2327 " 1))))) "XhoI: 2 sites") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #235=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28855776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #236=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #237=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #238=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #239=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #240=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #241=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #242=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #243=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #244=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #245=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #246=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #247=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #248=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #249=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #250=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #251=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #252=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #253=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #254=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #255=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #256=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #257=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #258=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #259=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #260=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #261=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #262=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #263=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #264=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #265=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #266=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #267=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #268=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #269=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #270=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #271=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #272=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #273=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #274=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #275=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -20) 1 1 0 1 1 +COMMENT (mapper: 18.7329 -26.6852 40.0378 40.0378 0.01 10 -1 4258 4258 1 0 0) +COMMENT #276=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1506 100) +COMMENT (CObjectList +COMMENT #277=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1063 100) +COMMENT (CObjectList +COMMENT #278=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 28786140 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27566 6.27366 1 0.0214037) 0.147327) +COMMENT #279=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #239# 26773840 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacECR#48-tetA-GS-GFP.gb" "@N" +COMMENT 1 0 0.871165 0 -10 15.885 1.44863 Nil) +COMMENT #280=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #238# 28486852 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4258 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #281=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -530 100) +COMMENT (CObjectList +COMMENT #282=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil 393219 100) +COMMENT (CObjectList +COMMENT #283=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.85478 0.845657 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28531756 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.55303 12.1963 0 -10 2.7474 1.04901 #283#) +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #240# -1855 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.55058 5.33177 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26377108 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 13.682 -19.1656 0 -10 2.29783 1.04901 #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #240# -1297 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.41027 3.46661 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28477196 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "GFPuv" "@N" 1 +COMMENT -4.7353 -13.9386 0 -10 3.22196 1.04901 #287#) +COMMENT #289=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.47544 3.54616 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26503268 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "(GGGS)4 Linker" +COMMENT "@N" 1 8.70285 -22.6503 0 -10 7.26813 1.04901 +COMMENT #289#)) (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -993 100) +COMMENT (CObjectList +COMMENT #292=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #245# 20519240 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 0.718956 1.9 +COMMENT 0.082322 1) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 268634520 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -10.4179 8.71165 0 -10 4.0212 1.04901 #292#) +COMMENT #294=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #245# 20516808 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.41869 1.9 +COMMENT 0.082322 1) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28789020 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4048 1.74233 0 -10 1.17389 1.04901 #294#) +COMMENT #296=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #245# 20559104 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.30377 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26599916 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 11.733 -8.71165 0 -10 2.94721 1.04901 #296#) +COMMENT #298=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #245# 20558224 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.37891 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28729572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "#48 seq" "@N" 1 +COMMENT 13.1753 -3.48466 0 -10 3.67153 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1716 100) +COMMENT (CObjectList +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #245# 27112432 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.51298 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28501708 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 10.0164 8.71165 0 -10 2.62252 1.04901 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1123 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #258# 26534648 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.57633 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26594428 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 9.97246 15.681 0 -10 2.62252 1.04901 #304#) +COMMENT #306=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #258# 27085272 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.07282 1.9 +COMMENT 0.082322 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 393241 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.37185 24.3926 0 -10 3.94627 1.04901 #306#) +COMMENT #308=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #258# 20534808 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.79437 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26646904 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 8.47408 20.908 0 -10 4.0212 1.04901 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 6862024 100) +COMMENT (CObjectList +COMMENT #311=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #253# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.70892 5.85478 1 0.082322) 0.8 1.8 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28508244 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.07377 19.1656 0 -10 2.7474 1.04901 #311#) +COMMENT #313=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #253# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.38775 5.54097 1 0.082322) 0.8 1.8 0) +COMMENT #314=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28516020 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.1677 5.22699 0 -10 2.69745 1.04901 #313#)) +COMMENT (CObjectList)) +COMMENT #315=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList +COMMENT #316=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.41869 1.9 0.082322 +COMMENT 1) +COMMENT #317=(CLabel (CWidget 0 (0 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.9427 0 0 -10 2.14797 1.04901 #316#)) +COMMENT (CObjectList)) +COMMENT #318=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1646 100) +COMMENT (CObjectList +COMMENT #319=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.12411 2.06553 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26772516 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -13.3242 3.48466 0 -10 2.7474 1.04901 #319#)) +COMMENT (CObjectList)) +COMMENT #321=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1367 100) +COMMENT (CObjectList +COMMENT #322=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #245# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 2.24674 2.40143) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3735976 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.1125 -3.48466 0 -10 1.17389 1.04901 #322#) +COMMENT #324=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #245# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 0.882489 1.03866) +COMMENT #325=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3736184 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -11.5405 5.22699 0 -10 1.17389 1.04901 #324#)) +COMMENT (CObjectList)) +COMMENT #326=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #327=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #245# 27209832 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.43637 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26644700 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.217 3.48466 0 -10 1.49858 1.04901 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #245# 27060248 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.47173 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel (CWidget 0 (0 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 10.7457 6.96932 0 -10 1.49858 1.04901 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #245# 20522920 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.54392 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3736048 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 11.2872 10.454 0 -10 5.86945 1.04901 +COMMENT #333#) +COMMENT #335=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #245# 20536088 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.30083 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26646956 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 11.8298 -10.454 0 -10 2.7474 1.04901 #335#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #337=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #338=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #339=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #244# 20514008 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.4088 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 26740332 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (2624)" "@N (@S)" 5 -13.1957 +COMMENT -5.22699 0 -10 4.79547 0.924127 #339#)) +COMMENT (CObjectList)) +COMMENT #341=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #342=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #244# 20532648 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.47397 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 26629412 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (1901)" "@N (@S)" 5 7.71086 +COMMENT -24.3926 0 -10 5.46983 0.924127 #342#)) +COMMENT (CObjectList)) +COMMENT #344=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList +COMMENT #345=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.65588 1.9 +COMMENT 0.082322 1) +COMMENT #346=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 26405632 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 10.1407 +COMMENT 17.4233 0 -10 4.34589 0.924127 #345#)) +COMMENT (CObjectList)) +COMMENT #347=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #348=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.24526 1.9 +COMMENT 0.082322 1) +COMMENT #349=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 26997756 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2735)" "@N (@S)" 5 -14.1472 +COMMENT -1.74233 0 -10 4.94533 0.924127 #348#)) +COMMENT (CObjectList)) +COMMENT #350=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1646 100) +COMMENT (CObjectList +COMMENT #351=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.38628 1.9 +COMMENT 0.082322 1) +COMMENT #352=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 393227 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.1036 +COMMENT -1.74233 0 -10 4.67059 0.924127 #351#)) +COMMENT (CObjectList)) +COMMENT #353=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 26405732 100) +COMMENT (CObjectList +COMMENT #354=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #244# 20522760 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.08278 1.9 +COMMENT 0.082322 1) +COMMENT #355=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 26739876 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (809)" "@N (@S)" 5 14.1099 +COMMENT -13.9386 0 -10 4.27096 0.924127 #354#)) +COMMENT (CObjectList)) +COMMENT #356=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #357=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #244# 20528800 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.08868 1.9 +COMMENT 0.082322 1) +COMMENT #358=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 26629868 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (805)" "@N (@S)" 5 13.9249 +COMMENT -12.1963 0 -10 4.27096 0.924127 #357#)) +COMMENT (CObjectList)) +COMMENT #359=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 1114118 100) +COMMENT (CObjectList +COMMENT #360=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #244# 20538656 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.195945 1.9 +COMMENT 0.082322 1) +COMMENT #361=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 26593004 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (4126)" "@N (@S)" 5 -5.3476 +COMMENT 13.9386 0 -10 4.69556 0.924127 #360#)) +COMMENT (CObjectList)) +COMMENT #362=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 26593228 100) +COMMENT (CObjectList +COMMENT #363=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #244# 20535608 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.651185 1.9 +COMMENT 0.082322 1) +COMMENT #364=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 26589812 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3817)" "@N (@S)" 5 -9.99828 +COMMENT 10.454 0 -10 4.62063 0.924127 #363#)) +COMMENT (CObjectList)) +COMMENT #365=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #366=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #244# 27089760 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.425 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 3736008 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2613)" "@N (@S)" 5 -12.1396 +COMMENT -6.96932 0 -10 4.62063 0.924127 #366#) +COMMENT #368=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #244# 20534648 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.875123 1.9 +COMMENT 0.082322 1) +COMMENT #369=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 3736184 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (3665)" "@N (@S)" 5 -12.1832 +COMMENT 6.96932 0 -10 4.67059 0.924127 #368#)) +COMMENT (CObjectList)) +COMMENT #370=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -599 100) +COMMENT (CObjectList +COMMENT #371=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #244# 20515448 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 6.03157 1.9 +COMMENT 0.082322 1) +COMMENT #372=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 393218 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.30854 +COMMENT 22.6503 0 -10 4.67059 0.924127 #371#) +COMMENT #373=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #244# 20515848 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.65154 1.9 +COMMENT 0.082322 1) +COMMENT #374=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26599732 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (3138)" "@N (@S)" 5 -14.3663 +COMMENT 1.74233 0 -10 5.19509 0.924127 #373#)) +COMMENT (CObjectList)) +COMMENT #375=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -1436 100) +COMMENT (CObjectList +COMMENT #376=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #244# 20539776 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.99221 1.9 +COMMENT 0.082322 1) +COMMENT #377=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 28637628 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2228)" "@N (@S)" 5 -5.08353 +COMMENT -15.681 0 -10 4.8704 0.924127 #376#) +COMMENT #378=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #244# 27074952 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.11414 1.9 +COMMENT 0.082322 1) +COMMENT #379=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26405508 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2824)" "@N (@S)" 5 -14.293 0 0 +COMMENT -10 4.8704 0.924127 #378#)) (CObjectList)) +COMMENT #380=(CGroupWidget +COMMENT (CWidget 2 (10 #19# 0) 1 2 0 0 Nil -948 100) +COMMENT (CObjectList +COMMENT #381=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #244# 27088720 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.55128 1.9 +COMMENT 0.082322 1) +COMMENT #382=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26740788 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 10.7293 +COMMENT 12.1963 0 -10 4.19603 0.924127 #381#) +COMMENT #383=(CScratch +COMMENT (CWidget 2 (1 #19# 2) 1 2 0 0 #244# 20558544 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.84636 1.9 +COMMENT 0.082322 1) +COMMENT #384=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26590724 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (2327)" "@N (@S)" 5 -6.44579 +COMMENT -12.1963 0 -10 4.79547 0.924127 #383#)) +COMMENT (CObjectList)) +COMMENT #385=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil 1114118 100) +COMMENT (CObjectList +COMMENT #386=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #244# 235 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.57338 1.9 +COMMENT 0.082322 1) +COMMENT #387=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 3736144 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 10.5939 +COMMENT 13.9386 0 -10 4.14608 0.924127 #386#) +COMMENT #388=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #244# 20537048 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.35057 1.9 +COMMENT 0.082322 1) +COMMENT #389=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 3736248 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1306)" "@N (@S)" 5 14.4603 +COMMENT -20.908 0 -10 4.62063 0.924127 #388#)) +COMMENT (CObjectList)) +COMMENT #390=(CGroupWidget +COMMENT (CWidget 3 (10 #1# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #391=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #244# 20517768 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.30525 1.9 +COMMENT 0.082322 1) +COMMENT #392=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26588560 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (658)" "@N (@S)" 5 12.7248 +COMMENT -6.96932 0 -10 5.12016 0.924127 #391#) +COMMENT #393=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #244# 27085752 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.87358 1.9 +COMMENT 0.082322 1) +COMMENT #394=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26593460 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (951)" "@N (@S)" 5 15.1827 +COMMENT -15.681 0 -10 5.07021 0.924127 #393#) +COMMENT #395=(CScratch +COMMENT (CWidget 3 (1 #1# 3) 1 2 0 0 #244# 20556144 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.7005 1.9 +COMMENT 0.082322 1) +COMMENT #396=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26588476 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (2426)" "@N (@S)" 5 -9.12185 +COMMENT -10.454 0 -10 5.66964 0.924127 #395#)) +COMMENT (CObjectList)) +COMMENT #397=(CGroupWidget +COMMENT (CWidget 3 (10 #7# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #398=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #244# 20523480 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.32145 1.9 +COMMENT 0.082322 1) +COMMENT #399=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26592672 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (647)" "@N (@S)" 5 12.7776 +COMMENT -5.22699 0 -10 3.94627 0.924127 #398#) +COMMENT #400=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #244# 20519560 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.46696 1.9 +COMMENT 0.082322 1) +COMMENT #401=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 3736184 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1227)" "@N (@S)" 5 14.6412 +COMMENT -17.4233 0 -10 4.42082 0.924127 #400#) +COMMENT #402=(CScratch +COMMENT (CWidget 3 (1 #7# 3) 1 2 0 0 #244# 20533048 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.57822 1.9 +COMMENT 0.082322 1) +COMMENT #403=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26593408 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (2509)" "@N (@S)" 5 -10.7664 +COMMENT -8.71165 0 -10 4.47078 0.924127 #402#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #404=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 26741012 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #405=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 1114118 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 1970431100 +COMMENT (CStringList) 1919973477 1769173861 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2857..3495 + /vntifkey="33" + /label=ColE1 + terminator 2629..2733 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(3554..3659) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3685..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3771..3792 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + mutation 661..661 + /vntifkey="62" + /label=orig\T + misc_feature 659..659 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + CDS 640..1848 + /vntifkey="4" + /label=tetA* + CDS 1906..2622 + /vntifkey="4" + /label=GFPuv + CDS 1852..1899 + /vntifkey="4" + /label=(GGGS)4\Linker + misc_feature 608..627 + /vntifkey="21" + /label=#48\seq +BASE COUNT 1009 a 1128 c 1072 g 1049 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcttt acccctactc gatccgacag gagcaaacta tgcaagtcga cctgctggat + 661 ccaaaatcta acaatgcgct catcgtcatc ctcggcaccg tcaccctgga tgctgtaggc + 721 ataggcttgg ttatgccggt actgccgggc ctcttgcggg atatcgtcca ttccgacagc + 781 atcgccagtc actatggcgt gctgctagcg ctatatgcgt tgatgcaatt tctatgcgca + 841 cccgttctcg gagcactgtc cgaccgcttt ggccgccgcc cagtcctgct cgcttcgcta + 901 cttggagcca ctatcgacta cgcgatcatg gcgaccacac ccgtcctgtg gatcctctac + 961 gccggacgca tcgtggccgg catcaccggc gccacaggtg cggttgctgg cgcctatatc + 1021 gccgacatca ccgatgggga agatcgggct cgccacttcg ggctcatgag cgcttgtttc + 1081 ggcgtgggta tggtggcagg ccccgtggcc gggggactgt tgggcgccat ctccttgcat + 1141 gcaccattcc ttgcggcggc ggtgctcaac ggcctcaacc tactactggg ctgcttccta + 1201 atgcaggagt cgcataaggg agagcgtcga ccgatgccct tgagagcctt caacccagtc + 1261 agctccttcc ggtgggcgcg gggcatgact atcgtcgccg cacttatgac tgtcttcttt + 1321 atcatgcaac tcgtaggaca ggtgccggca gcgctctggg tcattttcgg cgaggaccgc + 1381 tttcgctgga gcgcgacgat gatcggcctg tcgcttgcgg tattcggaat cttgcacgcc + 1441 ctcgctcaag ccttcgtcac tggtcccgcc accaaacgtt tcggcgagaa gcaggccatt + 1501 atcgccggca tggcggccga cgcgctgggc tacgtcttgc tggcgttcgc gacgcgaggc + 1561 tggatggcct tccccattat gattcttctc gcttccggcg gcatcgggat gcccgcgttg + 1621 caggccatgc tgtccaggca ggtagatgac gaccatcagg gacagcttca aggatcgctc + 1681 gcggctctta ccagcctaac ttcgatcact ggaccgctga tcgtcacggc gatttatgcc + 1741 gcctcggcga gcacatggaa cgggttggca tggattgtag gcgccgccct ataccttgtc + 1801 tgcctccccg cgttgcgtcg cggtgcatgg agccgggcca cctcgaccct gggcggtgga + 1861 agcggcggcg gctccggtgg tggttctgga ggcggttcta agcttatgag taaaggagaa + 1921 gaacttttca ctggagttgt cccaattctt gttgaattag atggtgatgt taatgggcac + 1981 aaattttctg tcagtggaga gggtgaaggt gatgcaacat acggaaaact tacccttaaa + 2041 tttatttgca ctactggaaa actacctgtt ccatggccaa cacttgtcac tactttctct + 2101 tatggtgttc aatgcttttc ccgttatccg gatcatatga aacggcatga ctttttcaag + 2161 agtgccatgc ccgaaggtta tgtacaggaa cgcactatat ctttcaaaga tgacgggaac + 2221 tacaagacgc gtgctgaagt caagtttgaa ggtgataccc ttgttaatcg tatcgagtta + 2281 aaaggtattg attttaaaga agatggaaac attctcggac acaaactcga gtacaactat + 2341 aactcacaca atgtatacat cacggcagac aaacaaaaga atggaatcaa agctaacttc + 2401 aaaattcgcc acaacattga agatggatcc gttcaactag cagaccatta tcaacaaaat + 2461 actccaattg gcgatggccc tgtcctttta ccagacaacc attacctgtc gacacaatct + 2521 gccctttcga aagatcccaa cgaaaagcgt gaccacatgg tccttcttga gtttgtaact + 2581 gctgctggga ttacacatgg catggatgag ctctacaaat aatctagagg catcaaataa + 2641 aacgaaaggc tcagtcgaaa gactgggcct ttcgttttat ctgttgtttg tcggtgaacg + 2701 ctctcctgag taggacaaat ccgccgccct agacctaggc gttcggctgc ggcgagcggt + 2761 atcagctcac tcaaaggcgg taatacggtt atccacagaa tcaggggata acgcaggaaa + 2821 gaacatgtga gcaaaaggcc agcaaaaggc caggaaccgt aaaaaggccg cgttgctggc + 2881 gtttttccat aggctccgcc cccctgacga gcatcacaaa aatcgacgct caagtcagag + 2941 gtggcgaaac ccgacaggac tataaagata ccaggcgttt ccccctggaa gctccctcgt + 3001 gcgctctcct gttccgaccc tgccgcttac cggatacctg tccgcctttc tcccttcggg + 3061 aagcgtggcg ctttctcaat gctcacgctg taggtatctc agttcggtgt aggtcgttcg + 3121 ctccaagctg ggctgtgtgc acgaaccccc cgttcagccc gaccgctgcg ccttatccgg + 3181 taactatcgt cttgagtcca acccggtaag acacgactta tcgccactgg cagcagccac + 3241 tggtaacagg attagcagag cgaggtatgt aggcggtgct acagagttct tgaagtggtg + 3301 gcctaactac ggctacacta gaaggacagt atttggtatc tgcgctctgc tgaagccagt + 3361 taccttcgga aaaagagttg gtagctcttg atccggcaaa caaaccaccg ctggtagcgg + 3421 tggttttttt gtttgcaagc agcagattac gcgcagaaaa aaaggatctc aagaagatcc + 3481 tttgatcttt tctacggggt ctgacgctca gtggaacgaa aactcacgtt aagggatttt + 3541 ggtcatgact agtgcttgga ttctcaccaa taaaaaacgc ccggcggcaa ccgagcgttc + 3601 tgaacaaatc cagatggagt tctgaggtca ttactggatc tatcaacagg agtccaagcg + 3661 agctcaaact tggtctgaca gttaccaatg cttaatcagt gaggcaccta tctcagcgat + 3721 ctgtctattt cgttcatcca tagttgcctg actccccgtc gtgtagataa ctacgatacg + 3781 ggagggctta ccatctggcc ccagtgctgc aatgataccg cgagacccac gctcaccggc + 3841 tccagattta tcagcaataa accagccagc cggaagggcc gagcgcagaa gtggtcctgc + 3901 aactttatcc gcctccatcc agtctattaa ttgttgccgg gaagctagag taagtagttc + 3961 gccagttaat agtttgcgca acgttgttgc cattgctaca ggcatcgtgg tgtcacgctc + 4021 gtcgtttggt atggcttcat tcagctccgg ttcccaacga tcaaggcgag ttacatgatc + 4081 ccccatgttg tgcaaaaaag cggttagctc cttcggtcct ccgatcgttg tcagaagtaa + 4141 gttggccgca gtgttatcac tcatggttat ggcagcactg cataattctc ttactgtcat + 4201 gccatccgta agatgctttt ctgtgactgg tgagtactca accaagtcat tctgagaa +// diff --git a/lib/VNTI files/pLacECR48-GFP.gb b/lib/VNTI files/pLacECR48-GFP.gb new file mode 100644 index 00000000..08f34078 --- /dev/null +++ b/lib/VNTI files/pLacECR48-GFP.gb @@ -0,0 +1,1559 @@ +LOCUS pLacECR#48 3016 bp DNA circular 23-JUN-2009 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|521814720| +COMMENT VNTDBDATE|521814720| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacECR#48-GFP.gb| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTOAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacECR#48-GFP.gb" 0 3016 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "(0,{1,2})" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 1 1086 1086 1 3016 0 0 0 0 0 0 0 0) (CStringList) +COMMENT (CStringList) (CObList) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 658 0 1184 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1382 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1371 0 2423 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 647 0 1267 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1493 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 1896 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 986 0 1582 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2884 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2575 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 2302 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 476 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1615 2253 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1615..2253") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1387 1491 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1387..1491") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2312 2417 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2312..2417)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2443 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2443..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2529 2550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2529..2550") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "orig T" 62 0 0 661 661 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "661..661") +COMMENT #43=(CFSignal (CObList) "orig G" 21 0 0 659 659 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "659..659") +COMMENT #44=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #45=(CFSignal (CObList) "tetA*" 4 0 0 640 662 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "640..662") +COMMENT #46=(CFSignal (CObList) "GFPuv" 4 0 0 663 1380 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "663..1380") +COMMENT #47=(CFSignal (CObList) "pORFrev" 21 0 0 640 662 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "640..662") +COMMENT #48=(CFSignal (CObList) "pGFPfw" 21 0 0 665 689 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "665..689")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #49=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #50=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacECR#48NNNNNN-GFP.gb" 2) 5 "" 0 4) +COMMENT #51=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacECR#48NNNNNN-GFP.gb'" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 01/16/09 03:05\214\337\214\343" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 01/16/09 03:05\214\337\214\343" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3016 bp" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 16-JAN-2009" 1))) +COMMENT "Standard Fields") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #64=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 640 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 640 End: 662 " 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 640..662" 1))) "tetA*") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 663 (3 #46# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 663 End: 1380" 1) +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 663..1380" 1))) "GFPuv") +COMMENT #75=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2443 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2443 End: 284 (Complementary)" +COMMENT 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2443..284)" 1))) "AmpR"))) +COMMENT "CDS (3 total)") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #84=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 640 (3 #47# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 640 End: 662 " 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 640..662" 1))) "pORFrev") +COMMENT #88=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 659 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 659 End: 659 " 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 659..659" 1))) "orig G") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 665 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 665 End: 689 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 665..689" 1))) "pGFPfw") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2529 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2529 End: 2550" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2529..2550" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #128=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #133=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #134=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1615 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1615 End: 2253" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1615..2253" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1387 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1387 End: 1491" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1387..1491" 1))) "T1") +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2312 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2312 End: 2417 (Complementary)" +COMMENT 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2312..2417)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #150=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #154=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #159=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #165=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 661 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 661 End: 661 " 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 661..661" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #169=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19527344 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19523584 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 986 " 1) +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1582 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19522704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19537832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1896 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19529264 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1493 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19538072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #186=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 658 " 1) +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1184 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19523104 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19537912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19523184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19523664 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19522864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2575 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19523024 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2302 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19537992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19537752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #205=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #206=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19538712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19538232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19522544 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19537672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19522784 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #212=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2884 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19538632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #215=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #216=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1371 " 1) +COMMENT #217=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2423 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #218=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19527424 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #219=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #220=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 647 " 1) +COMMENT #221=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1267 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19522944 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #223=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19537592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #224=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19538152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #225=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #226=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1382 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #227=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19522624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #228=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #229=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #230=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 19523504 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction Map: (no more than 3 sites)") +COMMENT #231=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #232=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #233=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #234=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #235=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #236=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #237=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #238=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #239=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #240=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #241=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #242=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #243=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #244=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #245=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #246=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #247=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #248=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #249=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #250=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #251=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #252=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #253=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #254=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #255=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #256=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #257=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #258=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #259=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #260=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #261=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #262=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #263=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #264=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #265=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #266=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #267=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #268=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #269=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #270=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #271=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -20) 1 1 0 1 1 +COMMENT (mapper: 19.0225 -24.9368 40.0378 40.0378 0.01 10 -1 3016 3016 1 0 0) +COMMENT #272=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -254 100) +COMMENT (CObjectList +COMMENT #273=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -993 100) +COMMENT (CObjectList +COMMENT #274=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 20694996 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27627 6.27427 1 0.0214037) 0.207997) +COMMENT #275=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #235# 2081903016 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacECR#48NNNNNN-GFP.gb" "@N" 1 +COMMENT 0 0.871165 0 -10 15.885 1.44863 Nil) +COMMENT #276=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #234# 393221 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3016 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.19698 0.924127 Nil)) (CObjectList)) +COMMENT #277=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil 945 100) +COMMENT (CObjectList +COMMENT #278=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1052 100) +COMMENT (CObjectList +COMMENT #279=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #236# +COMMENT 2081903016 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.68247 1.1939 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #280=(CLabel (CWidget 0 (0 0) 1 2 0 0 #233# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.79768 10.454 0 -10 2.72243 1.04901 #279#) +COMMENT #281=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #241# 27112432 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 4.94409 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 26593408 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 13.2116 -8.71165 0 -10 2.27285 1.04901 #281#) +COMMENT #283=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #236# -1509 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 0.835356 3.40283 +COMMENT 4.89625 1 0.082322) 0.8 1.8 0) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# -1019 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "GFPuv" "@N" 1 +COMMENT 12.7235 -22.6503 0 -10 3.19698 1.04901 #283#)) +COMMENT (CObjectList)) +COMMENT #285=(CGroupWidget (CWidget 21 (7 21 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #286=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #241# 27074952 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 1.01502 1.9 +COMMENT 0.082322 1) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# -1124 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -12.7166 5.22699 0 -10 3.97125 1.04901 +COMMENT #286#) +COMMENT #288=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #241# 27085272 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.0668 1.9 +COMMENT 0.082322 1) +COMMENT #289=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 393234 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.1125 -3.48466 0 -10 1.14891 1.04901 #288#) +COMMENT #290=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #241# 27209832 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 4.90457 1.9 +COMMENT 0.082322 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# -1302 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 14.0285 -15.681 0 -10 2.92224 1.04901 #290#) +COMMENT #292=(CScratch +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #241# 27085752 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 4.94409 1.9 +COMMENT 0.082322 1) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 26629868 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pORFrev" "@N" 1 +COMMENT 14.1686 -10.454 0 -10 4.24599 1.04901 #292#) +COMMENT #294=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #241# 235 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.89209 1.9 +COMMENT 0.082322 1) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 26599916 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pGFPfw" "@N" 1 +COMMENT 14.5455 -19.1656 0 -10 3.64655 1.04901 #294#)) +COMMENT (CObjectList)) +COMMENT #296=(CGroupWidget (CWidget 27 (7 27 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #297=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.19992 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 26593004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.7572 3.48466 0 -10 2.59755 1.04901 #297#)) +COMMENT (CObjectList)) +COMMENT #299=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -2416 100) +COMMENT (CObjectList +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #254# 20528800 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.28936 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# -326 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 11.9054 10.454 0 -10 2.59755 1.04901 #300#) +COMMENT #302=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #254# 20556144 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.99031 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 393218 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 6.35755 22.6503 0 -10 3.92129 1.04901 #302#) +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #254# 20519560 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.5972 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 268634520 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 10.4269 19.1656 0 -10 3.97125 1.04901 #304#)) +COMMENT (CObjectList)) +COMMENT #306=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1998 100) +COMMENT (CObjectList +COMMENT #307=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #249# 30942100 +COMMENT 100) (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) +COMMENT 0.835356 5.47656 5.68247 1 0.082322) 0.8 1.8 +COMMENT 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 28637628 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 9.96082 15.681 0 -10 2.72243 1.04901 #307#) +COMMENT #309=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #249# +COMMENT 2081903016 100) (LOGPEN 0 0 0) 1 +COMMENT (LOGBRUSH 0 128 0) 0.835356 5.02312 5.23944 +COMMENT 1 0.082322) 0.8 1.8 0) +COMMENT #310=(CLabel (CWidget 0 (0 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.2041 0 0 -10 2.67247 1.04901 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget (CWidget 31 (7 31 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #312=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #239# 20515848 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1 5.0668 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 26997756 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.4501 -5.22699 0 -10 2.14797 1.04901 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1021 100) +COMMENT (CObjectList +COMMENT #315=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #236# +COMMENT 2081903016 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.58702 2.91612 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 26772516 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.3469 -6.96932 0 -10 2.72243 1.04901 #315#)) +COMMENT (CObjectList)) +COMMENT #317=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -951 100) +COMMENT (CObjectList +COMMENT #318=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #241# +COMMENT 1598667368 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 3.17195 3.39035) +COMMENT #319=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 3736248 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 3.42217 -31.3619 0 -10 1.14891 1.04901 #318#) +COMMENT #320=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #241# +COMMENT 1128350017 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.2459 1.46638) +COMMENT #321=(CLabel (CWidget 0 (0 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.431 1.74233 0 -10 1.14891 1.04901 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 393227 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #241# 20536088 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.09176 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 26594428 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.5704 -1.74233 0 -10 1.47361 1.04901 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget (CWidget 48 (7 48 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #241# 20537048 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.14168 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 3736184 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.5704 1.74233 0 -10 1.47361 1.04901 #326#)) +COMMENT (CObjectList)) +COMMENT #328=(CGroupWidget (CWidget 62 (7 62 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #329=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #241# 20515448 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.2436 1.9 +COMMENT 0.082322 1) +COMMENT #330=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 3725180 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 13.5877 5.22699 0 -10 5.8195 1.04901 +COMMENT #329#) +COMMENT #331=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.90041 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 2081903016 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 14.0224 -17.4233 0 -10 2.72243 1.04901 #331#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #333=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -116 100) +COMMENT (CObjectList +COMMENT #334=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1926 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #240# 20534648 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.40075 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26588476 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1382)" "@N (@S)" 5 6.60975 +COMMENT -29.6196 0 -10 4.69556 0.924127 #335#)) +COMMENT (CObjectList)) +COMMENT #337=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -1647 100) +COMMENT (CObjectList +COMMENT #338=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #240# 20534808 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.40168 1.9 +COMMENT 0.082322 1) +COMMENT #339=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# -1093 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 12.4145 +COMMENT 13.9386 0 -10 4.29594 0.924127 #338#)) +COMMENT (CObjectList)) +COMMENT #340=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1509 100) +COMMENT (CObjectList +COMMENT #341=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #240# 20533048 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.16987 1.9 +COMMENT 0.082322 1) +COMMENT #342=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 28789020 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1493)" "@N (@S)" 5 4.05571 +COMMENT -33.1043 0 -10 4.84542 0.924127 #341#)) +COMMENT (CObjectList)) +COMMENT #343=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1368 100) +COMMENT (CObjectList +COMMENT #344=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #240# 20559104 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.02104 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# -116 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.1851 +COMMENT -6.96932 0 -10 4.64561 0.924127 #344#)) +COMMENT (CObjectList)) +COMMENT #346=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -114 100) +COMMENT (CObjectList +COMMENT #347=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #240# 5439490 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.254 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26740332 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 12.7757 +COMMENT 6.96932 0 -10 4.17106 0.924127 #347#)) +COMMENT (CObjectList)) +COMMENT #349=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -1230 100) +COMMENT (CObjectList +COMMENT #350=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #240# +COMMENT 1818324545 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 0.276636 1.9 0.082322 1) +COMMENT #351=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26740788 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2884)" "@N (@S)" 5 -6.41505 +COMMENT 12.1963 0 -10 4.69556 0.924127 #350#)) +COMMENT (CObjectList)) +COMMENT #352=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -602 100) +COMMENT (CObjectList +COMMENT #353=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #240# 20532648 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.919346 1.9 +COMMENT 0.082322 1) +COMMENT #354=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 393227 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2575)" "@N (@S)" 5 -12.3661 +COMMENT 6.96932 0 -10 4.64561 0.924127 #353#)) +COMMENT (CObjectList)) +COMMENT #355=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -393 100) +COMMENT (CObjectList +COMMENT #356=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.2852 1.9 0.082322 +COMMENT 1) +COMMENT #357=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# -1300 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 12.6481 +COMMENT 8.71165 0 -10 4.12111 0.924127 #356#)) +COMMENT (CObjectList)) +COMMENT #358=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil 1095188807 100) +COMMENT (CObjectList +COMMENT #359=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #240# 26534648 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.90665 1.9 +COMMENT 0.082322 1) +COMMENT #360=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26589812 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (658)" "@N (@S)" 5 15.2631 +COMMENT -13.9386 0 -10 5.09519 0.924127 #359#) +COMMENT #361=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #240# 20516808 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.81258 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 28729572 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1184)" "@N (@S)" 5 11.4497 +COMMENT -24.3926 0 -10 5.49481 0.924127 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -993 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #240# 20514008 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.42363 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26644700 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1371)" "@N (@S)" 5 6.73171 +COMMENT -27.8773 0 -10 4.52073 0.924127 #364#) +COMMENT #366=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #240# 20522920 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.2355 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26646956 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2423)" "@N (@S)" 5 -13.8374 +COMMENT 3.48466 0 -10 4.64561 0.924127 #366#)) +COMMENT (CObjectList)) +COMMENT #368=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil -1160 100) +COMMENT (CObjectList +COMMENT #369=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #240# 20523480 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.92953 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 393234 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (647)" "@N (@S)" 5 14.4467 +COMMENT -12.1963 0 -10 3.92129 0.924127 #369#) +COMMENT #371=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #240# 27088720 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.63994 1.9 +COMMENT 0.082322 1) +COMMENT #372=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26588560 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1267)" "@N (@S)" 5 9.05696 +COMMENT -26.1349 0 -10 4.37087 0.924127 #371#)) +COMMENT (CObjectList)) +COMMENT #373=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -461 100) +COMMENT (CObjectList +COMMENT #374=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.93207 1.9 +COMMENT 0.082322 1) +COMMENT #375=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# -1646 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 7.60548 +COMMENT 20.908 0 -10 4.64561 0.924127 #374#) +COMMENT #376=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #240# 20539776 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.33164 1.9 +COMMENT 0.082322 1) +COMMENT #377=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26405508 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1896)" "@N (@S)" 5 -11.7365 +COMMENT -8.71165 0 -10 5.17011 0.924127 #376#)) +COMMENT (CObjectList)) +COMMENT #378=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -1439 100) +COMMENT (CObjectList +COMMENT #379=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #240# 20519240 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.22442 1.9 +COMMENT 0.082322 1) +COMMENT #380=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26590724 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (986)" "@N (@S)" 5 14.0383 +COMMENT -20.908 0 -10 4.29594 0.924127 #379#) +COMMENT #381=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #240# 20522760 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.98475 1.9 +COMMENT 0.082322 1) +COMMENT #382=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 393234 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1582)" "@N (@S)" 5 -5.15417 +COMMENT -12.1963 0 -10 4.74552 0.924127 #381#)) +COMMENT (CObjectList)) +COMMENT #383=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil 1056 100) +COMMENT (CObjectList +COMMENT #384=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #240# 27089760 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.58264 1.9 +COMMENT 0.082322 1) +COMMENT #385=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 3736008 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 11.1712 +COMMENT 17.4233 0 -10 4.77049 0.924127 #384#) +COMMENT #386=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #240# 20517768 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.36424 1.9 +COMMENT 0.082322 1) +COMMENT #387=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 544106784 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 12.7168 +COMMENT 12.1963 0 -10 4.77049 0.924127 #386#) +COMMENT #388=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #240# 27060248 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.48718 1.9 +COMMENT 0.082322 1) +COMMENT #389=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 3736184 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2302)" "@N (@S)" 5 -14.6241 0 0 +COMMENT -10 5.295 0.924127 #388#)) (CObjectList))) +COMMENT (CObjectList)) +COMMENT #390=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -881 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #391=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -602 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 1970431100 +COMMENT (CStringList) 1919973477 1769173861 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1615..2253 + /vntifkey="33" + /label=ColE1 + terminator 1387..1491 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2312..2417) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2443..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2529..2550 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + mutation 661..661 + /vntifkey="62" + /label=orig\T + misc_feature 659..659 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + CDS 640..662 + /vntifkey="4" + /label=tetA* + CDS 663..1380 + /vntifkey="4" + /label=GFPuv + misc_feature 640..662 + /vntifkey="21" + /label=pORFrev + misc_feature 665..689 + /vntifkey="21" + /label=pGFPfw +BASE COUNT 815 a 735 c 694 g 772 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcttt acccctactc gatccgacag gagcaaacta tgcaagtcga cctgctggat + 661 ccattgagta aaggagaaga acttttcact ggagttgtcc caattcttgt tgaattagat + 721 ggtgatgtta atgggcacaa attttctgtc agtggagagg gtgaaggtga tgcaacatac + 781 ggaaaactta cccttaaatt tatttgcact actggaaaac tacctgttcc atggccaaca + 841 cttgtcacta ctttctctta tggtgttcaa tgcttttccc gttatccgga tcatatgaaa + 901 cggcatgact ttttcaagag tgccatgccc gaaggttatg tacaggaacg cactatatct + 961 ttcaaagatg acgggaacta caagacgcgt gctgaagtca agtttgaagg tgataccctt + 1021 gttaatcgta tcgagttaaa aggtattgat tttaaagaag atggaaacat tctcggacac + 1081 aaacttgagt acaactataa ctcacacaat gtatacatca cggcagacaa acaaaagaat + 1141 ggaatcaaag ctaacttcaa aattcgccac aacattgaag atggatccgt tcaactagca + 1201 gaccattatc aacaaaatac tccaattggc gatggccctg tccttttacc agacaaccat + 1261 tacctgtcga cacaatctgc cctttcgaaa gatcccaacg aaaagcgtga ccacatggtc + 1321 cttcttgagt ttgtaactgc tgctgggatt acacatggca tggatgagct ctacaaataa + 1381 tctagaggca tcaaataaaa cgaaaggctc agtcgaaaga ctgggccttt cgttttatct + 1441 gttgtttgtc ggtgaacgct ctcctgagta ggacaaatcc gccgccctag acctaggcgt + 1501 tcggctgcgg cgagcggtat cagctcactc aaaggcggta atacggttat ccacagaatc + 1561 aggggataac gcaggaaaga acatgtgagc aaaaggccag caaaaggcca ggaaccgtaa + 1621 aaaggccgcg ttgctggcgt ttttccatag gctccgcccc cctgacgagc atcacaaaaa + 1681 tcgacgctca agtcagaggt ggcgaaaccc gacaggacta taaagatacc aggcgtttcc + 1741 ccctggaagc tccctcgtgc gctctcctgt tccgaccctg ccgcttaccg gatacctgtc + 1801 cgcctttctc ccttcgggaa gcgtggcgct ttctcaatgc tcacgctgta ggtatctcag + 1861 ttcggtgtag gtcgttcgct ccaagctggg ctgtgtgcac gaaccccccg ttcagcccga + 1921 ccgctgcgcc ttatccggta actatcgtct tgagtccaac ccggtaagac acgacttatc + 1981 gccactggca gcagccactg gtaacaggat tagcagagcg aggtatgtag gcggtgctac + 2041 agagttcttg aagtggtggc ctaactacgg ctacactaga aggacagtat ttggtatctg + 2101 cgctctgctg aagccagtta ccttcggaaa aagagttggt agctcttgat ccggcaaaca + 2161 aaccaccgct ggtagcggtg gtttttttgt ttgcaagcag cagattacgc gcagaaaaaa + 2221 aggatctcaa gaagatcctt tgatcttttc tacggggtct gacgctcagt ggaacgaaaa + 2281 ctcacgttaa gggattttgg tcatgactag tgcttggatt ctcaccaata aaaaacgccc + 2341 ggcggcaacc gagcgttctg aacaaatcca gatggagttc tgaggtcatt actggatcta + 2401 tcaacaggag tccaagcgag ctcaaacttg gtctgacagt taccaatgct taatcagtga + 2461 ggcacctatc tcagcgatct gtctatttcg ttcatccata gttgcctgac tccccgtcgt + 2521 gtagataact acgatacggg agggcttacc atctggcccc agtgctgcaa tgataccgcg + 2581 agacccacgc tcaccggctc cagatttatc agcaataaac cagccagccg gaagggccga + 2641 gcgcagaagt ggtcctgcaa ctttatccgc ctccatccag tctattaatt gttgccggga + 2701 agctagagta agtagttcgc cagttaatag tttgcgcaac gttgttgcca ttgctacagg + 2761 catcgtggtg tcacgctcgt cgtttggtat ggcttcattc agctccggtt cccaacgatc + 2821 aaggcgagtt acatgatccc ccatgttgtg caaaaaagcg gttagctcct tcggtcctcc + 2881 gatcgttgtc agaagtaagt tggccgcagt gttatcactc atggttatgg cagcactgca + 2941 taattctctt actgtcatgc catccgtaag atgcttttct gtgactggtg agtactcaac + 3001 caagtcattc tgagaa +// diff --git a/lib/VNTI files/pLacN99mtetA.gb b/lib/VNTI files/pLacN99mtetA.gb new file mode 100644 index 00000000..9a59081b --- /dev/null +++ b/lib/VNTI files/pLacN99mtetA.gb @@ -0,0 +1,1487 @@ +LOCUS pLacN99mte 3524 bp DNA circular 26-APR-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|444679269| +COMMENT VNTDBDATE|444679269| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacN99mtetA| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacN99mtetA" 0 3524 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3524 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 682 0 988 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1890 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2931 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 1264 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2001 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 700 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 698 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2404 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2090 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 846 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 842 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3392 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3083 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1102 0 2810 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1343 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2123 2761 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1895 1999 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2820 2925 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2951 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3037 3058 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "-10" 47 0 0 579 584 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "89..94") +COMMENT #41=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #42=(CFSignal (CObList) "lacZ" 4 0 0 695 700 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "N99 ribozyme" 21 0 0 615 679 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "tetA" 4 0 0 695 1888 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "N99m mutation" 62 0 0 650 650 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #47=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #48=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pLacN99mtetA" 2) +COMMENT 5 "" 0 4) +COMMENT #49=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacN99mtetA'" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 04/26/07 06:01\214\337\214\343" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 04/26/07 06:01\214\337\214\343" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3524 bp" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #57=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #62=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 695 (3 #42# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 695 End: 700 " 1))) "lacZ") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 695 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 695 End: 1888" 1))) "tetA") +COMMENT #70=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2951 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2951 End: 284 (Complementary)" +COMMENT 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (3 total)") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #75=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 615 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 615 End: 679 " 1))) +COMMENT "N99 ribozyme") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3037 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3037 End: 3058" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (3 total)") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #84=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #88=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #93=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #102=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #107=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #111=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #112=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #117=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2123 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2123 End: 2761" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #122=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1895 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1895 End: 1999" 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2820 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2820 End: 2925 (Complementary)" +COMMENT 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 579 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 579 End: 584 " 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 89..94" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #137=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #138=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #142=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #143=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion") +COMMENT #148=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 650 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 650 End: 650 " 1))) +COMMENT "N99m mutation"))) "Mutation (2 total)"))) +COMMENT "Feature Map") +COMMENT #150=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25181808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #152=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20935448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2090 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20935768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25176208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #159=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2404 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25181088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #163=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2001 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25174688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #166=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 682 " 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 988 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1343 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25176288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 698 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20935528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 846 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #180=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20935928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #181=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #182=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3083 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25174608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25176448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #186=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25182048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25182208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20935608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 842 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25176368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 700 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20935848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3392 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25181968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #200=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2931 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25181888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #203=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #204=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 1264 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25175808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25182128 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #208=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #209=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1890 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20935688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #211=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #213=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20935368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #214=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #215=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #216=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #217=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #218=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #219=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #220=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #221=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #222=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #223=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #224=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #225=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #226=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #227=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #228=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #229=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #230=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #231=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #232=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #233=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #234=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #235=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #236=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #237=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #238=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #239=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #240=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #241=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #242=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #243=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #244=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #245=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #246=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #247=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #248=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #249=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #250=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #251=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #252=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #253=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -106) 1 1 0 1 1 +COMMENT (mapper: 18.0933 -23.1885 40.0378 40.0378 0.01 10 -1 3524 3524 1 0 0) +COMMENT #254=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #255=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -922 100) +COMMENT (CObjectList +COMMENT #256=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #220# 26429100 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27597 6.27397 1 0.0214037) 0.178013) +COMMENT #257=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #217# 26410824 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacN99mtetA" "@N" 1 0 0.871165 +COMMENT 0 -10 7.91752 1.44863 Nil) +COMMENT #258=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #216# 26447308 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3524 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #259=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #260=(CGroupWidget (CWidget 4 (7 4 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #261=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.76763 1.0218 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #262=(CLabel (CWidget 0 (0 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.76283 10.454 0 -10 2.7474 1.04901 #261#) +COMMENT #263=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #223# +COMMENT -1220241006 100) (LOGPEN 0 8 13395507) 10 1 +COMMENT 5.03777 1.9 0.082322 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 3736120 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ" "@N" 1 +COMMENT 13.0106 -12.1963 0 -10 1.94816 1.04901 #263#) +COMMENT #265=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 0.835356 2.9123 +COMMENT 5.03777 1 0.082322) 0.8 1.8 0) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 3736136 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA" "@N" 1 +COMMENT 10.9085 -24.3926 0 -10 1.94816 1.04901 #265#)) +COMMENT (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #268=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #223# 20924872 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 0.868704 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 26549508 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.7563 6.96932 0 -10 4.0212 1.04901 #268#) +COMMENT #270=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #223# 393228 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.24071 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 1952645122 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4136 -1.74233 0 -10 1.17389 1.04901 #270#) +COMMENT #272=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.06448 +COMMENT 5.18018 1 0.082322) 0.8 1.8 0) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "N99 ribozyme" +COMMENT "@N" 1 14.0898 -6.96932 0 -10 6.26908 1.04901 +COMMENT #272#)) (CObjectList)) +COMMENT #274=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #223# 25165008 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.35464 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.1503 5.22699 0 -10 2.62252 1.04901 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #236# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.43118 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 3736272 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 10.9724 12.1963 0 -10 2.62252 1.04901 #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #236# 25180776 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.03109 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 26547684 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.77674 20.908 0 -10 3.94627 1.04901 #280#) +COMMENT #282=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #236# 3774952 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.69464 1.9 +COMMENT 0.082322 1) +COMMENT #283=(CLabel (CWidget 0 (0 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 9.37644 17.4233 0 -10 4.0212 1.04901 #282#)) +COMMENT (CObjectList)) +COMMENT #284=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.59139 5.76763 1 0.082322) 0.8 1.8 1) +COMMENT #286=(CLabel (CWidget 0 (0 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.99313 15.681 0 -10 2.7474 1.04901 #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.20333 5.38846 1 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 3736224 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.0582 1.74233 0 -10 2.69745 1.04901 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 24792632 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.24071 1.9 0.082322 +COMMENT 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 25042660 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5132 -3.48466 0 -10 2.14797 1.04901 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #293=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.35824 2.49575 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 24811240 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 -3.48466 0 -10 2.7474 1.04901 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList +COMMENT #296=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #223# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 2.7147 2.90162) +COMMENT #297=(CLabel (CWidget 0 (0 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -5.23432 -12.1963 0 -10 1.17389 1.04901 #296#) +COMMENT #298=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #223# 1428 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 1.0663 +COMMENT 1.25499) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 1095193671 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.0951 3.48466 0 -10 1.17389 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.24427 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel (CWidget 0 (0 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.6291 0 0 -10 1.49858 1.04901 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #223# 10 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.30479 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel (CWidget 0 (0 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.2083 3.48466 0 -10 1.49858 1.04901 #304#)) +COMMENT (CObjectList)) +COMMENT #306=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #223# 20916664 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.39202 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 25039548 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 12.6362 6.96932 0 -10 5.86945 1.04901 +COMMENT #307#) +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #223# 3735968 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.11788 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 3736144 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "N99m mutation" +COMMENT "@N" 1 14.5555 -8.71165 0 -10 6.94344 1.04901 +COMMENT #309#)) (CObjectList))) (CObjectList)) +COMMENT #311=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 5439490 100) +COMMENT (CObjectList +COMMENT #312=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #313=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #222# 20924632 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.91052 1.9 +COMMENT 0.082322 1) +COMMENT #314=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 3736016 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1890)" "@N (@S)" 5 -5.97655 +COMMENT -13.9386 0 -10 4.74552 0.924127 #313#)) +COMMENT (CObjectList)) +COMMENT #315=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #316=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.0574 1.9 0.082322 +COMMENT 1) +COMMENT #317=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 26362324 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2931)" "@N (@S)" 5 -13.1522 +COMMENT 5.22699 0 -10 4.62063 0.924127 #316#)) +COMMENT (CObjectList)) +COMMENT #318=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #319=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #222# 20917464 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.02488 1.9 +COMMENT 0.082322 1) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 196640 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (1264)" "@N (@S)" 5 12.5211 +COMMENT -22.6503 0 -10 4.42082 0.924127 #319#)) +COMMENT (CObjectList)) +COMMENT #321=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #322=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #222# 20925992 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.52731 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 3736192 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.274 +COMMENT 13.9386 0 -10 4.34589 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3736016 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.71292 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 3736192 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2001)" "@N (@S)" 5 -8.91277 +COMMENT -10.454 0 -10 4.8704 0.924127 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3736016 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #222# 20923992 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.20155 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.3438 +COMMENT -5.22699 0 -10 4.67059 0.924127 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #222# 20945536 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.02887 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (700)" "@N (@S)" 5 14.3599 +COMMENT -15.681 0 -10 4.0212 0.924127 #331#)) +COMMENT (CObjectList)) +COMMENT #333=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #222# 25268352 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.03243 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 3736200 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (698)" "@N (@S)" 5 14.5056 +COMMENT -13.9386 0 -10 4.37087 0.924127 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #222# 20943776 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.55449 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 3736240 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2090)" "@N (@S)" 5 -11.1846 +COMMENT -8.71165 0 -10 4.8704 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #222# 25128348 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.76897 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 24784260 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (846)" "@N (@S)" 5 15.2157 +COMMENT -19.1656 0 -10 4.27096 0.924127 #340#)) +COMMENT (CObjectList)) +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 47 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #222# 20921912 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.77609 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 3736248 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (842)" "@N (@S)" 5 15.1151 +COMMENT -17.4233 0 -10 4.27096 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3736016 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #222# 10 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.40092 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 25047632 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 11.8052 +COMMENT 8.71165 0 -10 4.19603 0.924127 #346#)) +COMMENT (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 3736016 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #222# +COMMENT 1944545584 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 0.236758 1.9 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 3736256 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3392)" "@N (@S)" 5 -5.87475 +COMMENT 12.1963 0 -10 4.74552 0.924127 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3736016 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #222# 20945616 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.786818 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 24677568 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3083)" "@N (@S)" 5 -11.2905 +COMMENT 8.71165 0 -10 4.67059 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #222# 247 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.06092 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #214# -981 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (682)" "@N (@S)" 5 14.4917 +COMMENT -10.454 0 -10 5.12016 0.924127 #355#) +COMMENT #357=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #222# 441 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.51619 1.9 +COMMENT 0.082322 1) +COMMENT #358=(CLabel (CWidget 0 (0 0) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (988)" "@N (@S)" 5 15.5025 +COMMENT -20.908 0 -10 5.12016 0.924127 #357#)) +COMMENT (CObjectList)) +COMMENT #359=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 131077 100) +COMMENT (CObjectList +COMMENT #360=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #222# 20917144 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.98124 1.9 +COMMENT 0.082322 1) +COMMENT #361=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #214# 25025460 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.95979 +COMMENT 19.1656 0 -10 4.67059 0.924127 #360#) +COMMENT #362=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #222# +COMMENT 1944749780 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 1.99553 1.9 0.082322 1) +COMMENT #363=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #214# 3736208 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2404)" "@N (@S)" 5 -13.7159 +COMMENT -5.22699 0 -10 5.27002 0.924127 #362#)) +COMMENT (CObjectList)) +COMMENT #364=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil 3736016 100) +COMMENT (CObjectList +COMMENT #365=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #222# 20941776 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.42762 1.9 +COMMENT 0.082322 1) +COMMENT #366=(CLabel (CWidget 0 (0 0) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 11.6933 10.454 +COMMENT 0 -10 4.14608 0.924127 #365#) +COMMENT #367=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.88425 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #214# 3736280 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1343)" "@N (@S)" 5 11.5098 +COMMENT -26.1349 0 -10 4.62063 0.924127 #367#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #369=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 25047756 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #370=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3736024 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21272632 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2123..2761 + /vntifkey="33" + /label=ColE1 + terminator 1895..1999 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2820..2925) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2951..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3037..3058 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + -10_signal 579..584 + /vntifkey="47" + /label=-10 + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + CDS 695..700 + /vntifkey="4" + /label=lacZ + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 615..679 + /vntifkey="21" + /label=N99\ribozyme + CDS 695..1888 + /vntifkey="4" + /label=tetA + mutation 650..650 + /vntifkey="62" + /label=N99m\mutation +BASE COUNT 785 a 970 c 916 g 853 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcgga tcttaggtac atcccactga tgagtcccaa ataggacgag acgcgcttcg + 661 gtgcgtctgg gattccacta ggatccggat tcaaatgcat aaatctaaca atgcgctcat + 721 cgtcatcctc ggcaccgtca ccctggatgc tgtaggcata ggcttggtta tgccggtact + 781 gccgggcctc ttgcgggata tcgtccattc cgacagcatc gccagtcact atggcgtgct + 841 gctagcgcta tatgcgttga tgcaatttct atgcgcaccc gttctcggag cactgtccga + 901 ccgctttggc cgccgcccag tcctgctcgc ttcgctactt ggagccacta tcgactacgc + 961 gatcatggcg accacacccg tcctgtggat cctctacgcc ggacgcatcg tggccggcat + 1021 caccggcgcc acaggtgcgg ttgctggcgc ctatatcgcc gacatcaccg atggggaaga + 1081 tcgggctcgc cacttcgggc tcatgagcgc ttgtttcggc gtgggtatgg tggcaggccc + 1141 cgtggccggg ggactgttgg gcgccatctc cttgcatgca ccattccttg cggcggcggt + 1201 gctcaacggc ctcaacctac tactgggctg cttcctaatg caggagtcgc ataagggaga + 1261 gcgtcgaccg atgcccttga gagccttcaa cccagtcagc tccttccggt gggcgcgggg + 1321 catgactatc gtcgccgcac ttatgactgt cttctttatc atgcaactcg taggacaggt + 1381 gccggcagcg ctctgggtca ttttcggcga ggaccgcttt cgctggagcg cgacgatgat + 1441 cggcctgtcg cttgcggtat tcggaatctt gcacgccctc gctcaagcct tcgtcactgg + 1501 tcccgccacc aaacgtttcg gcgagaagca ggccattatc gccggcatgg cggccgacgc + 1561 gctgggctac gtcttgctgg cgttcgcgac gcgaggctgg atggccttcc ccattatgat + 1621 tcttctcgct tccggcggca tcgggatgcc cgcgttgcag gccatgctgt ccaggcaggt + 1681 agatgacgac catcagggac agcttcaagg atcgctcgcg gctcttacca gcctaacttc + 1741 gatcactgga ccgctgatcg tcacggcgat ttatgccgcc tcggcgagca catggaacgg + 1801 gttggcatgg attgtaggcg ccgccctata ccttgtctgc ctccccgcgt tgcgtcgcgg + 1861 tgcatggagc cgggccacct cgacctaatc tagaggcatc aaataaaacg aaaggctcag + 1921 tcgaaagact gggcctttcg ttttatctgt tgtttgtcgg tgaacgctct cctgagtagg + 1981 acaaatccgc cgccctagac ctaggcgttc ggctgcggcg agcggtatca gctcactcaa + 2041 aggcggtaat acggttatcc acagaatcag gggataacgc aggaaagaac atgtgagcaa + 2101 aaggccagca aaaggccagg aaccgtaaaa aggccgcgtt gctggcgttt ttccataggc + 2161 tccgcccccc tgacgagcat cacaaaaatc gacgctcaag tcagaggtgg cgaaacccga + 2221 caggactata aagataccag gcgtttcccc ctggaagctc cctcgtgcgc tctcctgttc + 2281 cgaccctgcc gcttaccgga tacctgtccg cctttctccc ttcgggaagc gtggcgcttt + 2341 ctcaatgctc acgctgtagg tatctcagtt cggtgtaggt cgttcgctcc aagctgggct + 2401 gtgtgcacga accccccgtt cagcccgacc gctgcgcctt atccggtaac tatcgtcttg + 2461 agtccaaccc ggtaagacac gacttatcgc cactggcagc agccactggt aacaggatta + 2521 gcagagcgag gtatgtaggc ggtgctacag agttcttgaa gtggtggcct aactacggct + 2581 acactagaag gacagtattt ggtatctgcg ctctgctgaa gccagttacc ttcggaaaaa + 2641 gagttggtag ctcttgatcc ggcaaacaaa ccaccgctgg tagcggtggt ttttttgttt + 2701 gcaagcagca gattacgcgc agaaaaaaag gatctcaaga agatcctttg atcttttcta + 2761 cggggtctga cgctcagtgg aacgaaaact cacgttaagg gattttggtc atgactagtg + 2821 cttggattct caccaataaa aaacgcccgg cggcaaccga gcgttctgaa caaatccaga + 2881 tggagttctg aggtcattac tggatctatc aacaggagtc caagcgagct caaacttggt + 2941 ctgacagtta ccaatgctta atcagtgagg cacctatctc agcgatctgt ctatttcgtt + 3001 catccatagt tgcctgactc cccgtcgtgt agataactac gatacgggag ggcttaccat + 3061 ctggccccag tgctgcaatg ataccgcgag acccacgctc accggctcca gatttatcag + 3121 caataaacca gccagccgga agggccgagc gcagaagtgg tcctgcaact ttatccgcct + 3181 ccatccagtc tattaattgt tgccgggaag ctagagtaag tagttcgcca gttaatagtt + 3241 tgcgcaacgt tgttgccatt gctacaggca tcgtggtgtc acgctcgtcg tttggtatgg + 3301 cttcattcag ctccggttcc caacgatcaa ggcgagttac atgatccccc atgttgtgca + 3361 aaaaagcggt tagctccttc ggtcctccga tcgttgtcag aagtaagttg gccgcagtgt + 3421 tatcactcat ggttatggca gcactgcata attctcttac tgtcatgcca tccgtaagat + 3481 gcttttctgt gactggtgag tactcaacca agtcattctg agaa +// diff --git a/lib/VNTI files/pLacNH-H6.gb b/lib/VNTI files/pLacNH-H6.gb new file mode 100644 index 00000000..f280a44d --- /dev/null +++ b/lib/VNTI files/pLacNH-H6.gb @@ -0,0 +1,653 @@ +LOCUS pLacNH-H6 2598 bp DNA circular SYN 13-APR-2006 +DEFINITION Cloning vector pGFPuv, complete sequence. +ACCESSION U62636 +VERSION U62636.1 GI:1490528 +SOURCE Cloning vector pGFPuv. + ORGANISM Cloning vector pGFPuv + artificial sequences; vectors. +REFERENCE 1 (bases 1 to 3337) + AUTHORS Kitts,P.A. + TITLE pGFPuv complete sequence + JOURNAL Unpublished +REFERENCE 2 (bases 1 to 3337) + AUTHORS Kitts,P.A. + TITLE Direct Submission + JOURNAL Submitted (28-JUN-1996) CLONTECH Laboratories, Inc., 1020 East + Meadow Circle, Palo Alto, CA 94303-4230, USA +COMMENT This vector can be obtained from CLONTECH Laboratories, Inc., 1020 + East Meadow Circle, Palo Alto, CA 94303-4230, USA. To place an + order call (415) 424-8222 or (800) 662-2566, extension 1. + International customers, please contact your local distributor. For + technical information, call (415) 424-8222 or (800) 662-2566, + extension 3. + This sequence has been compiled from information in the sequence + databases, published literature and other sources, together with + partial sequences obtained by CLONTECH. If you suspect there is an + error in this sequence, please contact CLONTECH's Technical Service + Department at (415) 424-8222 or (800) 662-2566, extension 3 or + E-mail TECH@CLONTECH.COM. +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|407611823| +COMMENT VNTDBDATE|407616550| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacNH-H6| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacNH-H6" 0 2598 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "HindIII" "NheI") (CStringList "atg" "gtg") +COMMENT (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 2598 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 241 0 0 "") +COMMENT #2=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 227 0 0 "")) +COMMENT (CObList +COMMENT #3=(CFSignal (CObList) "AmpR" 4 0 0 798 1658 0 (CStringList) +COMMENT (CStringList "/gene=\"bla\"" +COMMENT "/function=\"confers resistance to ampicillin\"" "/codon_start=1" +COMMENT "/transl_table=11" "/product=\"beta-lactamase\"" +COMMENT "/protein_id=\"AAB06049.1\"" "/db_xref=\"GI:1490530\"") 1 1 1 1 +COMMENT "1537..2397") +COMMENT #4=(CFSignal (CObList) "lacO" 20 0 0 179 199 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #5=(CFSignal (CObList) "-10" 47 0 0 167 172 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #6=(CFSignal (CObList) "-35" 48 0 0 143 148 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #7=(CFSignal (CObList) "6xHis" 21 0 0 246 263 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #8=(CFSignal (CObList) "RBS" 32 0 0 206 209 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #9=(CFSignal (CObList) "start codon" 21 0 0 217 219 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #10=(CFSignal (CObList) "stop codon" 21 0 0 264 266 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #11=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #12=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pLacNH-H6" 2) 5 +COMMENT "" 0 4) +COMMENT #13=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #14=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pLacNH-H6'" 1) +COMMENT #15=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Cloning vector pGFPuv, complete sequence." 1) +COMMENT #16=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #17=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 04/13/06 05:30\214\337\214\343" 1) +COMMENT #18=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 04/13/06 06:49\214\337\214\343" 1) +COMMENT #19=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 2598 bp" 1) +COMMENT #20=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #21=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #22=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #23=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #24=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #25=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 14-AUG-1996" 1) +COMMENT #26=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): U62636" +COMMENT 1) +COMMENT #27=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: U62636.1 GI:1490528" 1) +COMMENT #28=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Cloning vector pGFPuv" 1) +COMMENT #29=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Cloning vector pGFPuv(Cloning vector pGFPuv)" +COMMENT 1) +COMMENT #30=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: artificial sequences; vectors" 1) +COMMENT #31=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Associated Genes: gfpuv; bla" 1))) +COMMENT "Standard Fields") +COMMENT #32=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #33=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 3337)" 1) +COMMENT #34=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Kitts,P.A." 1) +COMMENT #35=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE pGFPuv complete sequence" 1) +COMMENT #36=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Unpublished" 1) +COMMENT #37=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 3337)" 1) +COMMENT #38=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Kitts,P.A." 1) +COMMENT #39=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #40=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (28-JUN-1996) CLONTECH Laboratories, Inc., 1020 East" +COMMENT 1) +COMMENT #41=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Meadow Circle, Palo Alto, CA 94303-4230, USA" +COMMENT 1))) "References") +COMMENT #42=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #44=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #45=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #46=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #47=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #48=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 798 (3 #3# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #49=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 798 End: 1658" 1) +COMMENT #50=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #51=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1537..2397" 1) +COMMENT #52=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #53=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"bla\"" 1) +COMMENT #54=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /function=\"confers resistance to ampicillin\"" +COMMENT 1) +COMMENT #55=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #56=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #57=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"beta-lactamase\"" 1) +COMMENT #58=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=AAB06049.1" +COMMENT 1) +COMMENT #59=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:1490530" +COMMENT 1))) "AmpR"))) "CDS (1 total)") +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 20 (7 20 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #61=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 179 (3 #4# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #62=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 179 End: 199 " 1))) "lacO"))) +COMMENT "Misc. Binding Site (1 total)") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 217 (3 #9# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 217 End: 219 " 1))) +COMMENT "start codon") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 246 (3 #7# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 246 End: 263 " 1))) "6xHis") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 264 (3 #10# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 264 End: 266 " 1))) +COMMENT "stop codon"))) "Misc. Feature (3 total)") +COMMENT #70=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 206 (3 #8# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 206 End: 209 " 1))) "RBS"))) +COMMENT "RBS (1 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 167 (3 #5# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 167 End: 172 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 143 (3 #6# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 143 End: 148 " 1))) "-35"))) +COMMENT "-35 Signal (1 total)"))) "Feature Map") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #80=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25211592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #81=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 241 " 1))))) "HindIII: 1 site") 1 +COMMENT 5 "AAGCTT" "TTCGAA") +COMMENT #83=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25211512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #84=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 227 " 1))))) "NheI: 1 site") 1 5 +COMMENT "GCTAGC" "CGATCG"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #86=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #87=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #88=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #89=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #90=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #91=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #92=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #93=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #94=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #95=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #96=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 5 +COMMENT "@N (@S)" 0) +COMMENT #97=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 1 +COMMENT 2 "?" 0) +COMMENT #98=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" 0) +COMMENT #99=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 1 +COMMENT 65535 "@N (@H)" 0) +COMMENT #100=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #101=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #102=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #103=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #104=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #105=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #106=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #107=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #108=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #109=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #110=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #111=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #112=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #113=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #114=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #115=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #116=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #117=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #118=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #119=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #120=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #121=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #122=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #123=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #124=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #125=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -149) 1 1 0 1 1 +COMMENT (mapper: 12.2288 -17.9734 40.0378 40.0378 0.01 10 -1 2598 2598 1 0 0) +COMMENT #126=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -182 100) +COMMENT (CObjectList +COMMENT #127=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil 1313 100) +COMMENT (CObjectList +COMMENT #128=(CAxis +COMMENT (CWideLine (CWidget 0 (0 0) 1 2 0 0 #92# 24735148 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.2766 6.2746 1 0.0214037) 0.241462) +COMMENT #129=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #89# 1195852611 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacNH-H6" "@N" 1 0 0.871165 0 +COMMENT -10 6.06926 1.44863 Nil) +COMMENT #130=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #88# 1128350535 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "2598 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #131=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -391 100) +COMMENT (CObjectList +COMMENT #132=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -112 100) +COMMENT (CObjectList +COMMENT #133=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #3# 0) 1 2 0 0 #90# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.26974 4.34873 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #134=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #87# 27964852 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT 4.05355 -12.1963 0 -10 2.7474 1.04901 #133#)) +COMMENT (CObjectList)) +COMMENT #135=(CGroupWidget +COMMENT (CWidget 20 (7 20 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #136=(CScratch +COMMENT (CWidget 0 (3 #4# 0) 1 2 0 0 #93# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.84338 1.9 0.082322 +COMMENT 1) +COMMENT #137=(CLabel (CWidget 0 (0 0) 1 2 0 0 #87# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 6.83173 12.1963 0 -10 2.14797 1.04901 #136#)) +COMMENT (CObjectList)) +COMMENT #138=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #139=(CScratch +COMMENT (CWidget 0 (3 #7# 0) 1 2 0 0 #95# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.6816 1.9 +COMMENT 0.082322 1) +COMMENT #140=(CLabel (CWidget 0 (0 0) 1 2 0 0 #87# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "6xHis" "@N" 1 +COMMENT 12.7223 3.48466 0 -10 2.62252 1.04901 #139#) +COMMENT #141=(CScratch +COMMENT (CWidget 0 (3 #9# 0) 1 2 0 0 #95# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.75163 1.9 +COMMENT 0.082322 1) +COMMENT #142=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #87# 24597212 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "start codon" +COMMENT "@N" 1 11.0278 8.71165 0 -10 5.41988 1.04901 +COMMENT #141#) +COMMENT #143=(CScratch +COMMENT (CWidget 0 (3 #10# 0) 1 2 0 0 #95# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.63814 1.9 +COMMENT 0.082322 1) +COMMENT #144=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #87# 26477956 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "stop codon" +COMMENT "@N" 1 14.1733 1.74233 0 -10 5.34495 1.04901 +COMMENT #143#)) (CObjectList)) +COMMENT #145=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #146=(CScratch +COMMENT (CWidget 0 (3 #8# 0) 1 2 0 0 #107# 0 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 5.77819 1.9 +COMMENT 0.082322 1) +COMMENT #147=(CLabel (CWidget 0 (0 0) 1 2 0 0 #87# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "RBS" "@N" 1 +COMMENT 7.41436 10.454 0 -10 2.02309 1.04901 #146#)) +COMMENT (CObjectList)) +COMMENT #148=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #149=(CScratch +COMMENT (CWidget 0 (3 #5# 0) 1 2 0 0 #95# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.87236 1.9 +COMMENT 0.082322 1) +COMMENT #150=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #87# 1196704067 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 6.32646 13.9386 0 -10 1.49858 1.04901 #149#)) +COMMENT (CObjectList)) +COMMENT #151=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -528 100) +COMMENT (CObjectList +COMMENT #152=(CScratch +COMMENT (CWidget 0 (3 #6# 0) 1 2 0 0 #95# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.93031 1.9 +COMMENT 0.082322 1) +COMMENT #153=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #87# 1128744771 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 5.7761 15.681 0 -10 1.49858 1.04901 #152#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #154=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #155=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #156=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #94# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.69368 1.9 +COMMENT 0.082322 1) +COMMENT #157=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #96# 21483316 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (241)" "@N (@S)" 5 13.5529 +COMMENT 5.22699 0 -10 4.99528 0.924127 #156#)) +COMMENT (CObjectList)) +COMMENT #158=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #159=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #94# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.72748 1.9 +COMMENT 0.082322 1) +COMMENT #160=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #96# 24720196 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (227)" "@N (@S)" 5 12.1396 +COMMENT 6.96932 0 -10 4.27096 0.924127 #159#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #161=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #162=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21223208 (CObList))) +FEATURES Location/Qualifiers + gene 798..1658 + /gene="bla" + /vntifkey="60" + CDS 798..1658 + /gene="bla" + /function="confers resistance to ampicillin" + /codon_start=1 + /transl_table=11 + /product="beta-lactamase" + /protein_id="AAB06049.1" + /db_xref="GI:1490530" + /vntifkey="4" + /label=AmpR + misc_binding 179..199 + /vntifkey="20" + /label=lacO + -10_signal 167..172 + /vntifkey="47" + /label=-10 + -35_signal 143..148 + /vntifkey="48" + /label=-35 + misc_feature 246..263 + /vntifkey="21" + /label=6xHis + RBS 206..209 + /vntifkey="32" + /label=RBS + misc_feature 217..219 + /vntifkey="21" + /label=start\codon + misc_feature 264..266 + /vntifkey="21" + /label=stop\codon +BASE COUNT 657 a 628 c 666 g 647 t +ORIGIN + 1 agcgcccaat acgcaaaccg cctctccccg cgcgttggcc gattcattaa tgcagctggc + 61 acgacaggtt tcccgactgg aaagcgggca gtgagcgcaa cgcaattaat gtgagttagc + 121 tcactcatta ggcaccccag gctttacact ttatgcttcc ggctcgtatg ttgtgtggaa + 181 ttgtgagcgg ataacaattt cacacaggaa acagctatga ccatggctag ccataaaaaa + 241 agcttcatca tcatcatcat cattaatgaa ttccaactga gcgccggtcg ctaccattac + 301 caacttgtct ggtgtcaaaa ataataggcc tactagtcgg ccgtacgggc cctttcgtct + 361 cgcgcgtttc ggtgatgacg gtgaaaacct ctgacacatg cagctcccgg agacggtcac + 421 agcttgtctg taagcggatg ccgggagcag acaagcccgt cagggcgcgt cagcgggtgt + 481 tggcgggtgt cggggctggc ttaactatgc ggcatcagag cagattgtac tgagagtgca + 541 ccatatgcgg tgtgaaatac cgcacagatg cgtaaggaga aaataccgca tcaggcggcc + 601 ttaagggcct cgtgatacgc ctatttttat aggttaatgt catgataata atggtttctt + 661 agacgtcagg tggcactttt cggggaaatg tgcgcggaac ccctatttgt ttatttttct + 721 aaatacattc aaatatgtat ccgctcatga gacaataacc ctgataaatg cttcaataat + 781 attgaaaaag gaagagtatg agtattcaac atttccgtgt cgcccttatt cccttttttg + 841 cggcattttg ccttcctgtt tttgctcacc cagaaacgct ggtgaaagta aaagatgctg + 901 aagatcagtt gggtgcacga gtgggttaca tcgaactgga tctcaacagc ggtaagatcc + 961 ttgagagttt tcgccccgaa gaacgttttc caatgatgag cacttttaaa gttctgctat + 1021 gtggcgcggt attatcccgt attgacgccg ggcaagagca actcggtcgc cgcatacact + 1081 attctcagaa tgacttggtt gagtactcac cagtcacaga aaagcatctt acggatggca + 1141 tgacagtaag agaattatgc agtgctgcca taaccatgag tgataacact gcggccaact + 1201 tacttctgac aacgatcgga ggaccgaagg agctaaccgc ttttttgcac aacatggggg + 1261 atcatgtaac tcgccttgat cgttgggaac cggagctgaa tgaagccata ccaaacgacg + 1321 agcgtgacac cacgatgcct gtagcaatgg caacaacgtt gcgcaaacta ttaactggcg + 1381 aactacttac tctagcttcc cggcaacaat taatagactg gatggaggcg gataaagttg + 1441 caggaccact tctgcgctcg gcccttccgg ctggctggtt tattgctgat aaatctggag + 1501 ccggtgagcg tgggtctcgc ggtatcattg cagcactggg gccagatggt aagccctccc + 1561 gtatcgtagt tatctacacg acggggagtc aggcaactat ggatgaacga aatagacaga + 1621 tcgctgagat aggtgcctca ctgattaagc attggtaact gtcagaccaa gtttactcat + 1681 atatacttta gattgattta aaacttcatt tttaatttaa aaggatctag gtgaagatcc + 1741 tttttgataa tctcatgacc aaaatccctt aacgtgagtt ttcgttccac tgagcgtcag + 1801 accccgtaga aaagatcaaa ggatcttctt gagatccttt ttttctgcgc gtaatctgct + 1861 gcttgcaaac aaaaaaacca ccgctaccag cggtggtttg tttgccggat caagagctac + 1921 caactctttt tccgaaggta actggcttca gcagagcgca gataccaaat actgtccttc + 1981 tagtgtagcc gtagttaggc caccacttca agaactctgt agcaccgcct acatacctcg + 2041 ctctgctaat cctgttacca gtggctgctg ccagtggcga taagtcgtgt cttaccgggt + 2101 tggactcaag acgatagtta ccggataagg cgcagcggtc gggctgaacg gggggttcgt + 2161 gcacacagcc cagcttggag cgaacgacct acaccgaact gagataccta cagcgtgagc + 2221 tatgagaaag cgccacgctt cccgaaggga gaaaggcgga caggtatccg gtaagcggca + 2281 gggtcggaac aggagagcgc acgagggagc ttccaggggg aaacgcctgg tatctttata + 2341 gtcctgtcgg gtttcgccac ctctgacttg agcgtcgatt tttgtgatgc tcgtcagggg + 2401 ggcggagcct atggaaaaac gccagcaacg cggccttttt acggttcctg gccttttgct + 2461 ggccttttgc tcacatgttc tttcctgcgt tatcccctga ttctgtggat aaccgtatta + 2521 ccgcctttga gtgagctgat accgctcgcc gcagccgaac gaccgagcgc agcgagtcag + 2581 tgagcgagga agcggaag +// diff --git a/lib/VNTI files/pLacStrHNgfpuvX.gb b/lib/VNTI files/pLacStrHNgfpuvX.gb new file mode 100644 index 00000000..d8d8d56f --- /dev/null +++ b/lib/VNTI files/pLacStrHNgfpuvX.gb @@ -0,0 +1,880 @@ +LOCUS pLacStrHNg 3020 bp DNA circular 1-AUG-2005 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|381321573| +COMMENT VNTDBDATE|381671265| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacStrHNgfpuvX| +COMMENT VNTAUTHORNAME|Demo User| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacStrHNgfpuvX" 1 218 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 1 0 0 0 357 574 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList #1=(CDocZoom 1 3020 0)) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #2=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 1055 0 0 "") +COMMENT #3=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1253 0 0 "") +COMMENT #6=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 515 0 0 "") +COMMENT #7=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1242 0 2294 0 0 "") +COMMENT #8=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 1138 0 0 "") +COMMENT #9=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 287 0 0 "") +COMMENT #10=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1364 0 0 "") +COMMENT #11=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 470 0 0 "") +COMMENT #12=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 540 0 0 "") +COMMENT #13=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 538 0 0 "") +COMMENT #14=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 32 0 1767 0 0 "") +COMMENT #15=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #17=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 857 0 1453 0 0 "") +COMMENT #18=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #20=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 2 358 0 956 0 0 "") +COMMENT #21=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #22=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2755 0 0 "") +COMMENT #23=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2446 1 0 "") +COMMENT #24=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #25=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 200 0 305 0 2173 0 0 "") +COMMENT #26=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 343 1 0 "") +COMMENT #27=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #28=(CFSignal (CObList) "ColE1" 33 0 0 1486 2124 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1475..2113") +COMMENT #29=(CFSignal (CObList) "T1" 43 0 0 1258 1362 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1247..1351") +COMMENT #30=(CFSignal (CObList) "T0" 43 0 1 2183 2288 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2172..2277)") +COMMENT #31=(CFSignal (CObList) "AmpR" 4 0 1 2314 151 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2303..151)") +COMMENT #32=(CFSignal (CObList) "P(bla)" 30 0 1 152 250 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(152..250)") +COMMENT #33=(CFSignal (CObList) "BLI06" 28 0 1 341 362 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(341..362)") +COMMENT #34=(CFSignal (CObList) "bla-rev2" 28 0 0 4 25 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "4..25") +COMMENT #35=(CFSignal (CObList) "bla-rev?" 21 0 0 2400 2421 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2389..2410") +COMMENT #36=(CFSignal (CObList) "pbla-rev" 28 0 0 193 212 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "193..212") +COMMENT #37=(CFSignal (CObList) "P(lac)" 30 0 0 365 468 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "365..468") +COMMENT #38=(CFSignal (CObList) "PlacF" 27 0 0 384 404 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "384..404") +COMMENT #39=(CFSignal (CObList) "-35" 48 0 0 412 417 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "412..417") +COMMENT #40=(CFSignal (CObList) "lacO" 31 0 0 448 468 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "448..468") +COMMENT #41=(CFSignal (CObList) "-10" 47 0 0 446 451 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "446..451") +COMMENT #42=(CFSignal (CObList) "AG insertion" 62 0 0 363 364 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "363..364") +COMMENT #43=(CFSignal (CObList) "RBS" 32 0 0 523 534 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "512..523") +COMMENT #44=(CFSignal (CObList) "gfpuv" 4 0 0 535 1251 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "524..1240") +COMMENT #45=(CFSignal (CObList) "Str Aptamer" 21 0 0 476 513 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #46=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #47=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pLacStrHNgfpuvX" +COMMENT 2) 5 "" 0 4) +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA molecule name: pLacStrHNgfpuvX" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Entire molecule length: 3020 bp" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "fragment length: 218 bp" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "from: 357" +COMMENT 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "to: 574" +COMMENT 1))) "General Description") +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 29-JUL-2005" 1))) +COMMENT "Standard Fields") +COMMENT #57=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "Demo User" +COMMENT 1))) "Author") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "Demo User" +COMMENT 1))) "Original Author") +COMMENT #61=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 476 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 476 End: 513 " 1))) +COMMENT "Str Aptamer"))) "Misc. Feature (1 total)") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 384 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 384 End: 404 " 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 384..404" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 365 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 365 End: 468 " 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 365..468" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 448 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 448 End: 468 " 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 448..468" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 523 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 523 End: 534 " 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 512..523" 1))) "RBS"))) +COMMENT "RBS (1 total)") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #88=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 446 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 446 End: 451 " 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 446..451" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #93=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 412 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 412 End: 417 " 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 412..417" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #98=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 363 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 363 End: 364 " 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 363..364" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #102=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #103=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27016256 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #104=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26999072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 0 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #105=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27013216 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #106=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27016496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 0 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #107=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27006648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #108=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25257968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BamHI: 0 sites") 1 5 "GGATCC" +COMMENT "CCTAGG") +COMMENT #109=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26997712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #110=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27035648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #111=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 538 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #113=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26997872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #114=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27012736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #115=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27014976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BsaI: 0 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #116=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27015456 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 0 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #117=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25280232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #118=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27006808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #119=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 470 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #121=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27015136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #122=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 515 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #124=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25242792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #125=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27012896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #126=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27032448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #127=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 540 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #129=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27014496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 0 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #130=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27015616 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #131=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27015776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 0 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27015296 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #133=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27017136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #134=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25280472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27013056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CGroupPar +COMMENT (CParagraph 0 (10 #20# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (1 #20# 1) 1 2 2 0 191) +COMMENT " N1: 358 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #138=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26998112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #139=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #140=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #141=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #142=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #143=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #144=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #145=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #146=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #147=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #148=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #149=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #150=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #151=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #152=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #153=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #154=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #155=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #156=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #157=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #158=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #159=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #160=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #161=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #162=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #163=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #164=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #165=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #166=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #167=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #168=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #169=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #170=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #171=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #172=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #173=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #174=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #175=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #176=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #177=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #178=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -218) 1 0 1 1 0 +COMMENT (mapper: 19.3528 -10.5436 43.875 43.875 0.01 10 14 3020 218 357 0 0) +COMMENT #179=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -993 100) +COMMENT (CObjectList +COMMENT #180=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -992 100) +COMMENT (CObjectList +COMMENT #181=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #145# 26823396 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27419 6.27219 1 0.0214037) 2.87761) +COMMENT #182=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #154# 25559228 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 50 19 0 0 400 0 0 0 0 3 2 1 34 "Arial") +COMMENT 2.53336 0.91 0 "Fragment of pLacStrHNgfpuvX" +COMMENT "Fragment of @N" 1 0 0.5 0 -2.91312 13.5385 1.1396 +COMMENT Nil) +COMMENT #183=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #153# 24747876 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 49 +COMMENT "Courier New") 2.53336 1.05 0 +COMMENT "218 bp (molecule 3020 bp)" "@F bp (molecule @L bp)" +COMMENT 48 0 -0.8 0 -4.1798 13.7208 1.32194 Nil)) +COMMENT (CObjectList)) +COMMENT #184=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #185=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #186=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #144# -670 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 1.75534 2.84883 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #187=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #140# 25257484 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "Str Aptamer" +COMMENT "@N" 1 0 0 5.91149 8.52424 4.10256 0.843305 +COMMENT #186#)) (CObjectList)) +COMMENT #188=(CGroupWidget (CWidget 27 (7 27 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #189=(CPrimerArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #146# 26761284 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1.16464 4.89193 +COMMENT 5.49623) 0.4 0.082322 1.8 1.8 0) +COMMENT #190=(CLabel (CWidget 0 (0 0) 1 2 0 0 #140# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "PlacF" "@N" 1 0 +COMMENT 0 -10.6128 3.45752 1.73219 0.843305 #189#)) +COMMENT (CObjectList)) +COMMENT #191=(CGroupWidget (CWidget 30 (7 30 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #192=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #156# 393228 +COMMENT 100) (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 1 +COMMENT 3.05026 6.04298 1 0.082322) 0.8 1.8 0) +COMMENT #193=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #140# 27141676 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "P(lac)" "@N" 1 +COMMENT 0 0 -7.88772 4.7242 1.86895 0.843305 #192#)) +COMMENT (CObjectList)) +COMMENT #194=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #195=(CLine +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #146# +COMMENT 1944545584 100) (LOGPEN 0 6 6723840) 8 +COMMENT 0.835356 3.05026 3.65456) +COMMENT #196=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #140# 25005332 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "lacO" "@N" 1 0 +COMMENT 0 -2.5188 4.7242 1.4359 0.843305 #195#)) +COMMENT (CObjectList)) +COMMENT #197=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #198=(CLine +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #160# +COMMENT 1944545584 100) (LOGPEN 0 6 16711680) 8 +COMMENT 0.835356 1.15104 1.49636) +COMMENT #199=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #140# 21862164 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "RBS" "@N" 1 0 0 +COMMENT 9.01998 5.99088 1.32194 0.843305 #198#)) +COMMENT (CObjectList)) +COMMENT #200=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #201=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #155# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 2 8388608 5) +COMMENT 0.670712 3.53946 3.71211 1 0.082322) 0.8 1.8 +COMMENT 0) +COMMENT #202=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #140# 21915708 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "-10" "@N" 1 0 0 +COMMENT -3.49313 3.45752 1.02564 0.843305 #201#)) +COMMENT (CObjectList)) +COMMENT #203=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #204=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #144# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.51784 +COMMENT 4.6905 1 0.082322) 0.8 1.8 0) +COMMENT #205=(CLabel (CWidget 0 (0 0) 1 2 0 0 #140# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "-35" "@N" 1 0 0 +COMMENT -7.71437 3.45752 1.02564 0.843305 #204#)) +COMMENT (CObjectList)) +COMMENT #206=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #207=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #144# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 6.04298 6.10053 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #208=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #140# 27058452 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "AG insertion" +COMMENT "@N" 1 0 0 -15.6417 4.7242 4.21652 0.843305 +COMMENT #207#)) (CObjectList))) (CObjectList)) +COMMENT #209=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 393219 100) +COMMENT (CObjectList +COMMENT #210=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #211=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #147# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.72656 1.9 +COMMENT 0.082322 1) +COMMENT #212=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #149# 21726236 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Hin}dIII (515)" "@N (@S)" 5 0 0 7.97665 +COMMENT 7.25756 2.94017 0.547009 #211#)) +COMMENT (CObjectList)) +COMMENT #213=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil 327685 100) +COMMENT (CObjectList +COMMENT #214=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #147# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.02149 1.9 +COMMENT 0.082322 1) +COMMENT #215=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #149# 25474188 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Eco}RI (470)" "@N (@S)" 5 0 0 1.93118 +COMMENT 3.45752 2.75783 0.547009 #214#)) +COMMENT (CObjectList)) +COMMENT #216=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil 201266868 100) +COMMENT (CObjectList +COMMENT #217=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #147# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.00716 1.9 +COMMENT 0.082322 1) +COMMENT #218=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #149# 25260220 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Nsi}I (540)" "@N (@S)" 5 0 0 10.9427 +COMMENT 3.45752 2.25641 0.547009 #217#)) +COMMENT (CObjectList)) +COMMENT #219=(CGroupWidget +COMMENT (CWidget 1 (10 #13# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #220=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #147# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.06471 1.9 +COMMENT 0.082322 1) +COMMENT #221=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #149# 25259764 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Bfr}BI (538)" "@N (@S)" 5 0 0 10.8376 +COMMENT 4.7242 2.5755 0.547009 #220#)) (CObjectList)) +COMMENT #222=(CGroupWidget +COMMENT (CWidget 1 (10 #20# 0) 1 2 0 0 Nil 310869584 100) +COMMENT (CObjectList +COMMENT #223=(CScratch +COMMENT (CWidget 1 (1 #20# 1) 1 2 0 0 #147# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.24441 1.9 +COMMENT 0.082322 1) +COMMENT #224=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #149# 26535092 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Xho}I (358)" "@N (@S)" 5 0 0 -15.5091 +COMMENT 3.45752 2.46154 0.547009 #223#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #225=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 131076 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #226=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 189953828 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21652560 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1486..2124 + /vntifkey="33" + /label=ColE1 + terminator 1258..1362 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2183..2288) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2314..151) + /vntifkey="4" + /label=AmpR + promoter complement(152..250) + /vntifkey="30" + /label=P(bla) + primer_bind complement(341..362) + /vntifkey="28" + /label=BLI06 + primer_bind 4..25 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2400..2421 + /vntifkey="21" + /label=bla-rev? + primer_bind 193..212 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 365..468 + /vntifkey="30" + /label=P(lac) + primer 384..404 + /vntifkey="27" + /label=PlacF + -35_signal 412..417 + /vntifkey="48" + /label=-35 + protein_bind 448..468 + /vntifkey="31" + /label=lacO + -10_signal 446..451 + /vntifkey="47" + /label=-10 + mutation 363..364 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + RBS 523..534 + /vntifkey="32" + /label=RBS + CDS 535..1251 + /vntifkey="4" + /label=gfpuv + misc_feature 476..513 + /vntifkey="21" + /label=Str\Aptamer +BASE COUNT 819 a 733 c 698 g 770 t +ORIGIN + 1 tgttgagatc cagttcgatg taacccactc gtgcacccaa ctgatcttca gcatctttta + 61 ctttcaccag cgtttctggg tgagcaaaaa caggaaggca aaatgccgca aaaaagggaa + 121 taagggcgac acggaaatgt tgaatactca tactcttcct ttttcaatat tattgaagca + 181 tttatcaggg ttattgtctc atgagcggat acatatttga atgtatttag aaaaataaac + 241 aaataggggt tccgcgcaca tttccccgaa aagtgccacc tgacgtctaa gaaaccatta + 301 ttatcatgac attaacctat aaaaataggc gtatcacgag gccctttcgt cttcacctcg + 361 agagcgcaac gcaattaatg tgagttagct cactcattag gcaccccagg ctttacactt + 421 tatgcttccg gctcgtatgt tgtgtggaat tgtgagcgga taacaattga attctcgcat + 481 ttggacttct gcccagggtg gcaccacggt cggaagctta tcaggaaaaa aaaaatgcat + 541 aaaggagaag aacttttcac tggagttgtc ccaattcttg ttgaattaga tggtgatgtt + 601 aatgggcaca aattttctgt cagtggagag ggtgaaggtg atgcaacata cggaaaactt + 661 acccttaaat ttatttgcac tactggaaaa ctacctgttc catggccaac acttgtcact + 721 actttctctt atggtgttca atgcttttcc cgttatccgg atcatatgaa acggcatgac + 781 tttttcaaga gtgccatgcc cgaaggttat gtacaggaac gcactatatc tttcaaagat + 841 gacgggaact acaagacgcg tgctgaagtc aagtttgaag gtgataccct tgttaatcgt + 901 atcgagttaa aaggtattga ttttaaagaa gatggaaaca ttctcggaca caaactcgag + 961 tacaactata actcacacaa tgtatacatc acggcagaca aacaaaagaa tggaatcaaa + 1021 gctaacttca aaattcgcca caacattgaa gatggatccg ttcaactagc agaccattat + 1081 caacaaaata ctccaattgg cgatggccct gtccttttac cagacaacca ttacctgtcg + 1141 acacaatctg ccctttcgaa agatcccaac gaaaagcgtg accacatggt ccttcttgag + 1201 tttgtaactg ctgctgggat tacacatggc atggatgagc tctacaaata atctagaggc + 1261 atcaaataaa acgaaaggct cagtcgaaag actgggcctt tcgttttatc tgttgtttgt + 1321 cggtgaacgc tctcctgagt aggacaaatc cgccgcccta gacctaggcg ttcggctgcg + 1381 gcgagcggta tcagctcact caaaggcggt aatacggtta tccacagaat caggggataa + 1441 cgcaggaaag aacatgtgag caaaaggcca gcaaaaggcc aggaaccgta aaaaggccgc + 1501 gttgctggcg tttttccata ggctccgccc ccctgacgag catcacaaaa atcgacgctc + 1561 aagtcagagg tggcgaaacc cgacaggact ataaagatac caggcgtttc cccctggaag + 1621 ctccctcgtg cgctctcctg ttccgaccct gccgcttacc ggatacctgt ccgcctttct + 1681 cccttcggga agcgtggcgc tttctcaatg ctcacgctgt aggtatctca gttcggtgta + 1741 ggtcgttcgc tccaagctgg gctgtgtgca cgaacccccc gttcagcccg accgctgcgc + 1801 cttatccggt aactatcgtc ttgagtccaa cccggtaaga cacgacttat cgccactggc + 1861 agcagccact ggtaacagga ttagcagagc gaggtatgta ggcggtgcta cagagttctt + 1921 gaagtggtgg cctaactacg gctacactag aaggacagta tttggtatct gcgctctgct + 1981 gaagccagtt accttcggaa aaagagttgg tagctcttga tccggcaaac aaaccaccgc + 2041 tggtagcggt ggtttttttg tttgcaagca gcagattacg cgcagaaaaa aaggatctca + 2101 agaagatcct ttgatctttt ctacggggtc tgacgctcag tggaacgaaa actcacgtta + 2161 agggattttg gtcatgacta gtgcttggat tctcaccaat aaaaaacgcc cggcggcaac + 2221 cgagcgttct gaacaaatcc agatggagtt ctgaggtcat tactggatct atcaacagga + 2281 gtccaagcga gctcaaactt ggtctgacag ttaccaatgc ttaatcagtg aggcacctat + 2341 ctcagcgatc tgtctatttc gttcatccat agttgcctga ctccccgtcg tgtagataac + 2401 tacgatacgg gagggcttac catctggccc cagtgctgca atgataccgc gagacccacg + 2461 ctcaccggct ccagatttat cagcaataaa ccagccagcc ggaagggccg agcgcagaag + 2521 tggtcctgca actttatccg cctccatcca gtctattaat tgttgccggg aagctagagt + 2581 aagtagttcg ccagttaata gtttgcgcaa cgttgttgcc attgctacag gcatcgtggt + 2641 gtcacgctcg tcgtttggta tggcttcatt cagctccggt tcccaacgat caaggcgagt + 2701 tacatgatcc cccatgttgt gcaaaaaagc ggttagctcc ttcggtcctc cgatcgttgt + 2761 cagaagtaag ttggccgcag tgttatcact catggttatg gcagcactgc ataattctct + 2821 tactgtcatg ccatccgtaa gatgcttttc tgtgactggt gagtactcaa ccaagtcatt + 2881 ctgagaatag tgtatgcggc gaccgagttg ctcttgcccg gcgtcaatac gggataatac + 2941 cgcgccacat agcagaactt taaaagtgct catcattgga aaacgttctt cggggcgaaa + 3001 actctcaagg atcttaccgc +// diff --git a/lib/VNTI files/pLacT.gb b/lib/VNTI files/pLacT.gb new file mode 100644 index 00000000..f71d38e4 --- /dev/null +++ b/lib/VNTI files/pLacT.gb @@ -0,0 +1,1365 @@ +LOCUS pLacT 3463 bp DNA circular 16-SEP-2005 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|367172722| +COMMENT VNTDBDATE|385743758| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacT| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTOAUTHORNAME|Demo User| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacT" 0 3463 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3463 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 430 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 138 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2380 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 706 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 3393 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1450 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 113 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 1853 0 3138 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 1539 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 288 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 284 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 1 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2841 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2532 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 544 0 2259 0 3306 0 +COMMENT 3411 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 785 1 3449 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1572 2210 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2363..3001") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1344 1448 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2135..2239") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2269 2374 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3060..3165)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2400 3257 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3191..4048)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 3258 3356 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(4049..4147)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 3447 5 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(4238..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 3110 3131 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3901..3922") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2486 2507 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3277..3298") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 3299 3318 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "4090..4109") +COMMENT #36=(CFSignal (CObList) "Tc(R)" 4 0 0 143 1330 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #37=(CFSignal (CObList) "P(lac)" 30 0 0 8 111 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "PlacF" 27 0 0 27 47 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "-35" 48 0 0 55 60 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "lacO" 31 0 0 91 111 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #41=(CFSignal (CObList) "AG insertion" 62 0 0 6 7 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "tetA-257-236" 27 0 1 375 396 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "-10" 47 0 0 79 84 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "rand-Plac-f" 21 0 0 85 112 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "rand-Plac-r" 21 0 1 54 78 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #46=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #47=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pLacT" 2) 5 "" 0 +COMMENT 4) +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacT'" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Demo User" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 02/25/05 04:25\214\337\214\343" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 09/16/05 03:02\214\337\214\343" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3463 bp" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 1-MAY-2005" 1))) +COMMENT "Standard Fields") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "Demo User" +COMMENT 1))) "Original Author") +COMMENT #61=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 143 (3 #36# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 143 End: 1330" 1))) "Tc(R)") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2400 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2400 End: 3257 (Complementary)" +COMMENT 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3191..4048)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 54 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 54 End: 78 (Complementary)" +COMMENT 1))) "rand-Plac-r") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 85 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 85 End: 112 " 1))) +COMMENT "rand-Plac-f") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2486 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2486 End: 2507" 1) +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3277..3298" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (3 total)") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 27 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 27 End: 47 " 1))) "PlacF") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 375 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 375 End: 396 (Complementary)" +COMMENT 1))) "tetA-257-236"))) +COMMENT "Primer (2 total)") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3110 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3110 End: 3131" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3901..3922" 1))) "bla-rev2") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3299 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3299 End: 3318" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 4090..4109" 1))) "pbla-rev") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3447 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3447 End: 5 (Complementary)" +COMMENT 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(4238..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 8 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 8 End: 111 " 1))) "P(lac)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3258 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3258 End: 3356 (Complementary)" +COMMENT 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(4049..4147)" 1))) +COMMENT "P(bla)"))) "Promoter Prokaryotic (2 total)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 91 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 91 End: 111 " 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1572 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1572 End: 2210" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2363..3001" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #114=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1344 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1344 End: 1448" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2135..2239" 1))) "T1") +COMMENT #118=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2269 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2269 End: 2374 (Complementary)" +COMMENT 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3060..3165)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #122=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 79 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 79 End: 84 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #125=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 55 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 55 End: 60 " 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #128=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 6 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 6 End: 7 " 1))) +COMMENT "AG insertion"))) "Mutation (1 total)"))) +COMMENT "Feature Map") +COMMENT #131=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27312736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 3393 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27295984 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 1539 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #138=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27309696 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27312976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 1853 " 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 3138 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #143=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27302992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1450 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #146=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26143296 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 430 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #149=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27294624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #150=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 785 (on complementary strand)" +COMMENT 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 3449 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #153=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27331968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27294784 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27309216 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 288 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27311456 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #159=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2532 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #161=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27311936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26169912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27303152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 113 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27311616 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26150104 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 138 " 1))))) "KpnI: 1 site") 5 +COMMENT 1 "GGTACC" "CCATGG") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27309376 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 284 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27327312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27310976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #175=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2841 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27312096 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2380 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #180=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27312256 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #181=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #182=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 706 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27311776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27313616 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26169672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27309536 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 1 " 1))))) "XhoI: 1 site") 1 5 +COMMENT "CTCGAG" "GAGCTC") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27295024 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #190=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #191=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #192=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #193=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #194=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #195=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #196=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #197=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #198=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #199=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #200=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #201=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #202=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #203=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #204=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #205=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #206=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #207=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #208=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #209=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #210=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #211=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #212=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #213=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #214=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #215=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #216=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #217=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #218=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #219=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #220=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #221=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #222=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #223=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #224=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #225=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #226=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #227=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #228=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #229=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -340) 1 1 0 1 1 +COMMENT (mapper: 18.2682 -23.1087 40.0378 40.0378 0.01 10 -1 3463 3463 1 0 0) +COMMENT #230=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #231=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -176 100) +COMMENT (CObjectList +COMMENT #232=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 26631548 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.276 6.274 1 0.0214037) 0.181149) +COMMENT #233=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #193# 25046532 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacT" "@N" 1 0 0.871165 0 -10 +COMMENT 3.22196 1.44863 Nil) +COMMENT #234=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #192# 26799348 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3463 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #235=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1223 100) +COMMENT (CObjectList +COMMENT #236=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #237=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #194# +COMMENT 1944545584 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.373167 1.92742 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #238=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -12.8356 3.48466 0 -10 2.7474 1.04901 #237#) +COMMENT #239=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #194# +COMMENT 1944545584 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.86391 6.01595 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #240=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 393230 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Tc(R)" "@N" 1 +COMMENT 13.1269 -6.96932 0 -10 2.49764 1.04901 #239#)) +COMMENT (CObjectList)) +COMMENT #241=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -804 100) +COMMENT (CObjectList +COMMENT #242=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #199# 25925280 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 1.77164 1.9 +COMMENT 0.082322 1) +COMMENT #243=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 3736144 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -13.5051 -3.48466 0 -10 4.0212 1.04901 +COMMENT #242#) +COMMENT #244=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #199# 25899672 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 6.12102 1.9 +COMMENT 0.082322 1) +COMMENT #245=(CLabel (CWidget 0 (0 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "rand-Plac-f" +COMMENT "@N" 1 10.9406 8.71165 0 -10 5.14514 1.04901 +COMMENT #244#) +COMMENT #246=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #199# 25911024 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 6.17718 1.9 +COMMENT 0.082322 1) +COMMENT #247=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "rand-Plac-r" +COMMENT "@N" 1 4.4987 15.681 0 -10 5.22007 1.04901 +COMMENT #246#)) (CObjectList)) +COMMENT #248=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -874 100) +COMMENT (CObjectList +COMMENT #249=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #199# 25905256 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 6.22609 1.9 +COMMENT 0.082322 1) +COMMENT #250=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 25043340 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 2.90627 17.4233 0 -10 2.62252 1.04901 #249#) +COMMENT #251=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #199# 25313264 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.59569 1.9 +COMMENT 0.082322 1) +COMMENT #252=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 3736104 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA-257-236" +COMMENT "@N" 1 14.3998 -1.74233 0 -10 5.79452 1.04901 +COMMENT #251#)) (CObjectList)) +COMMENT #253=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #254=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 0.0307953 1.9 +COMMENT 0.082322 1) +COMMENT #255=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 24626484 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT -2.53746 15.681 0 -10 2.62252 1.04901 #254#) +COMMENT #256=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #212# 25911344 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 0.641267 1.9 +COMMENT 0.082322 1) +COMMENT #257=(CLabel (CWidget 0 (0 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 -11.7302 6.96932 0 -10 3.94627 1.04901 +COMMENT #256#) +COMMENT #258=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #212# 25905176 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 0.298896 1.9 +COMMENT 0.082322 1) +COMMENT #259=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 268634488 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 -8.15485 10.454 0 -10 4.0212 1.04901 #258#)) +COMMENT (CObjectList)) +COMMENT #260=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -664 100) +COMMENT (CObjectList +COMMENT #261=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #207# +COMMENT 1944545584 100) (LOGPEN 0 0 0) 1 +COMMENT (LOGBRUSH 0 128 0) 0.835356 0.193829 +COMMENT 0.373167 1 0.082322) 0.8 1.8 1) +COMMENT #262=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT -5.33537 12.1963 0 -10 2.7474 1.04901 #261#) +COMMENT #263=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #207# 27331808 +COMMENT 100) (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) +COMMENT 0.835356 6.07211 6.2605 1 0.082322) 0.8 1.8 +COMMENT 0) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 25042884 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 3.35595 12.1963 0 -10 2.69745 1.04901 #263#)) +COMMENT (CObjectList)) +COMMENT #265=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -664 100) +COMMENT (CObjectList +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #197# 27311296 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1 6.11015 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 26440732 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 11.0419 6.96932 0 -10 2.14797 1.04901 #266#)) +COMMENT (CObjectList)) +COMMENT #268=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -525 100) +COMMENT (CObjectList +COMMENT #269=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #194# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.2698 3.42734 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #270=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 26548788 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -5.4622 -12.1963 0 -10 2.7474 1.04901 #269#)) +COMMENT (CObjectList)) +COMMENT #271=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1432 100) +COMMENT (CObjectList +COMMENT #272=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #199# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 3.65015 3.84036) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 26875272 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 7.97818 -10.454 0 -10 1.17389 1.04901 #272#) +COMMENT #274=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #199# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.97271 2.16473) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 24051548 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -11.4064 -6.96932 0 -10 1.17389 1.04901 #274#)) +COMMENT (CObjectList)) +COMMENT #276=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -316 100) +COMMENT (CObjectList +COMMENT #277=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #199# 21403048 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 6.13189 1.9 +COMMENT 0.082322 1) +COMMENT #278=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 26873716 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 7.13559 10.454 0 -10 1.49858 1.04901 #277#)) +COMMENT (CObjectList)) +COMMENT #279=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1432 100) +COMMENT (CObjectList +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #199# 25904376 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 6.17536 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 24514580 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 2.83247 13.9386 0 -10 1.49858 1.04901 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1362 100) +COMMENT (CObjectList +COMMENT #283=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #199# 25915512 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 6.26413 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 25046988 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 3.88807 19.1656 0 -10 5.86945 1.04901 +COMMENT #283#)) (CObjectList))) (CObjectList)) +COMMENT #285=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1083 100) +COMMENT (CObjectList +COMMENT #286=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1083 100) +COMMENT (CObjectList +COMMENT #287=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #198# 25903816 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.49606 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 25045604 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (430)" "@N (@S)" 5 14.151 +COMMENT -3.48466 0 -10 5.12016 0.924127 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil -734 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #198# 25900392 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 6.02501 1.9 +COMMENT 0.082322 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 26387724 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (138)" "@N (@S)" 5 13.6545 +COMMENT 3.48466 0 -10 4.14608 0.924127 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -1013 100) +COMMENT (CObjectList +COMMENT #293=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #198# 25896472 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.96365 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 24901196 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2380)" "@N (@S)" 5 -13.5366 +COMMENT -5.22699 0 -10 4.67059 0.924127 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #198# 3793064 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.99609 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 3735968 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (706)" "@N (@S)" 5 13.6217 +COMMENT -5.22699 0 -10 3.94627 0.924127 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -319 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #198# 25904616 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.128616 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 3736048 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (3393)" "@N (@S)" 5 -4.80467 +COMMENT 13.9386 0 -10 4.8704 0.924127 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #198# 3776464 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.64834 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 3736128 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1450)" "@N (@S)" 5 9.00001 +COMMENT -12.1963 0 -10 4.8704 0.924127 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1156 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #198# 25693544 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 6.0703 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 3736128 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (113)" "@N (@S)" 5 13.2306 +COMMENT 5.22699 0 -10 4.5457 0.924127 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil -1365 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #198# 25794560 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.48712 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 268634488 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (1539)" "@N (@S)" 5 7.3334 +COMMENT -13.9386 0 -10 4.82044 0.924127 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -598 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #198# 25899592 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.75329 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 26891844 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (288)" "@N (@S)" 5 14.1449 0 0 +COMMENT -10 4.27096 0.924127 #311#)) (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #198# 21667432 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.76053 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 3736024 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (284)" "@N (@S)" 5 13.9817 +COMMENT 1.74233 0 -10 4.27096 0.924127 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 739 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #198# 25691064 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 6.27319 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 27184236 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (1)" "@N (@S)" 5 2.86576 20.908 0 +COMMENT -10 3.14703 0.924127 #317#)) (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #198# 25695304 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.12856 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 26670244 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2841)" "@N (@S)" 5 -13.2968 +COMMENT 5.22699 0 -10 4.69556 0.924127 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 642 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.68831 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 25079852 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2532)" "@N (@S)" 5 -14.192 +COMMENT -1.74233 0 -10 4.67059 0.924127 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #198# 25911264 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.91831 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 21146924 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1853)" "@N (@S)" 5 -6.086 +COMMENT -13.9386 0 -10 5.19509 0.924127 #326#) +COMMENT #328=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #198# 25895752 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.590545 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (3138)" "@N (@S)" 5 -11.2543 +COMMENT 8.71165 0 -10 5.19509 0.924127 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #198# 25697640 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.85298 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 24608092 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (785)" "@N (@S)" 5 14.3892 +COMMENT -8.71165 0 -10 4.14608 0.924127 #331#) +COMMENT #333=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.0271723 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 24819524 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3449)" "@N (@S)" 5 -3.65459 +COMMENT 17.4233 0 -10 4.67059 0.924127 #333#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #335=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -598 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #336=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -249 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21604160 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1572..2210 + /vntifkey="33" + /label=ColE1 + terminator 1344..1448 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2269..2374) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2400..3257) + /vntifkey="4" + /label=AmpR + promoter complement(3258..3356) + /vntifkey="30" + /label=P(bla) + primer_bind complement(3447..5) + /vntifkey="28" + /label=BLI06 + primer_bind 3110..3131 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2486..2507 + /vntifkey="21" + /label=bla-rev? + primer_bind 3299..3318 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + CDS 143..1330 + /vntifkey="4" + /label=Tc(R) + promoter 8..111 + /vntifkey="30" + /label=P(lac) + primer 27..47 + /vntifkey="27" + /label=PlacF + -35_signal 55..60 + /vntifkey="48" + /label=-35 + protein_bind 91..111 + /vntifkey="31" + /label=lacO + mutation 6..7 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + primer complement(375..396) + /vntifkey="27" + /label=tetA-257-236 + -10_signal 79..84 + /vntifkey="47" + /label=-10 + misc_feature 85..112 + /vntifkey="21" + /label=rand-Plac-f + misc_feature complement(54..78) + /vntifkey="21" + /label=rand-Plac-r +BASE COUNT 775 a 951 c 902 g 835 t +ORIGIN + 1 tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc aggctttaca + 61 ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat tgaattcatt + 121 aaagaggaga aaggtaccca tgaaatctaa caatgcgctc atcgtcatcc tcggcaccgt + 181 caccctggat gctgtaggca taggcttggt tatgccggta ctgccgggcc tcttgcggga + 241 tatcgtccat tccgacagca tcgccagtca ctatggcgtg ctgctagcgc tatatgcgtt + 301 gatgcaattt ctatgcgcac ccgttctcgg agcactgtcc gaccgctttg gccgccgccc + 361 agtcctgctc gcttcgctac ttggagccac tatcgactac gcgatcatgg cgaccacacc + 421 cgtcctgtgg atcctctacg ccggacgcat cgtggccggc atcaccggcg ccacaggtgc + 481 ggttgctggc gcctatatcg ccgacatcac cgatggggaa gatcgggctc gccacttcgg + 541 gctcatgagc gcttgtttcg gcgtgggtat ggtggcaggc cccgtggccg ggggactgtt + 601 gggcgccatc tccttgcatg caccattcct tgcggcggcg gtgctcaacg gcctcaacct + 661 actactgggc tgcttcctaa tgcaggagtc gcataaggga gagcgtcgac cgatgccctt + 721 gagagccttc aacccagtca gctccttccg gtgggcgcgg ggcatgacta tcgtcgccgc + 781 acttatgact gtcttcttta tcatgcaact cgtaggacag gtgccggcag cgctctgggt + 841 cattttcggc gaggaccgct ttcgctggag cgcgacgatg atcggcctgt cgcttgcggt + 901 attcggaatc ttgcacgccc tcgctcaagc cttcgtcact ggtcccgcca ccaaacgttt + 961 cggcgagaag caggccatta tcgccggcat ggcggccgac gcgctgggct acgtcttgct + 1021 ggcgttcgcg acgcgaggct ggatggcctt ccccattatg attcttctcg cttccggcgg + 1081 catcgggatg cccgcgttgc aggccatgct gtccaggcag gtagatgacg accatcaggg + 1141 acagcttcaa ggatcgctcg cggctcttac cagcctaact tcgatcactg gaccgctgat + 1201 cgtcacggcg atttatgccg cctcggcgag cacatggaac gggttggcat ggattgtagg + 1261 cgccgcccta taccttgtct gcctccccgc gttgcgtcgc ggtgcatgga gccgggccac + 1321 ctcgacctga atggaagcct agaggcatca aataaaacga aaggctcagt cgaaagactg + 1381 ggcctttcgt tttatctgtt gtttgtcggt gaacgctctc ctgagtagga caaatccgcc + 1441 gccctagacc taggcgttcg gctgcggcga gcggtatcag ctcactcaaa ggcggtaata + 1501 cggttatcca cagaatcagg ggataacgca ggaaagaaca tgtgagcaaa aggccagcaa + 1561 aaggccagga accgtaaaaa ggccgcgttg ctggcgtttt tccataggct ccgcccccct + 1621 gacgagcatc acaaaaatcg acgctcaagt cagaggtggc gaaacccgac aggactataa + 1681 agataccagg cgtttccccc tggaagctcc ctcgtgcgct ctcctgttcc gaccctgccg + 1741 cttaccggat acctgtccgc ctttctccct tcgggaagcg tggcgctttc tcaatgctca + 1801 cgctgtaggt atctcagttc ggtgtaggtc gttcgctcca agctgggctg tgtgcacgaa + 1861 ccccccgttc agcccgaccg ctgcgcctta tccggtaact atcgtcttga gtccaacccg + 1921 gtaagacacg acttatcgcc actggcagca gccactggta acaggattag cagagcgagg + 1981 tatgtaggcg gtgctacaga gttcttgaag tggtggccta actacggcta cactagaagg + 2041 acagtatttg gtatctgcgc tctgctgaag ccagttacct tcggaaaaag agttggtagc + 2101 tcttgatccg gcaaacaaac caccgctggt agcggtggtt tttttgtttg caagcagcag + 2161 attacgcgca gaaaaaaagg atctcaagaa gatcctttga tcttttctac ggggtctgac + 2221 gctcagtgga acgaaaactc acgttaaggg attttggtca tgactagtgc ttggattctc + 2281 accaataaaa aacgcccggc ggcaaccgag cgttctgaac aaatccagat ggagttctga + 2341 ggtcattact ggatctatca acaggagtcc aagcgagctc aaacttggtc tgacagttac + 2401 caatgcttaa tcagtgaggc acctatctca gcgatctgtc tatttcgttc atccatagtt + 2461 gcctgactcc ccgtcgtgta gataactacg atacgggagg gcttaccatc tggccccagt + 2521 gctgcaatga taccgcgaga cccacgctca ccggctccag atttatcagc aataaaccag + 2581 ccagccggaa gggccgagcg cagaagtggt cctgcaactt tatccgcctc catccagtct + 2641 attaattgtt gccgggaagc tagagtaagt agttcgccag ttaatagttt gcgcaacgtt + 2701 gttgccattg ctacaggcat cgtggtgtca cgctcgtcgt ttggtatggc ttcattcagc + 2761 tccggttccc aacgatcaag gcgagttaca tgatccccca tgttgtgcaa aaaagcggtt + 2821 agctccttcg gtcctccgat cgttgtcaga agtaagttgg ccgcagtgtt atcactcatg + 2881 gttatggcag cactgcataa ttctcttact gtcatgccat ccgtaagatg cttttctgtg + 2941 actggtgagt actcaaccaa gtcattctga gaatagtgta tgcggcgacc gagttgctct + 3001 tgcccggcgt caatacggga taataccgcg ccacatagca gaactttaaa agtgctcatc + 3061 attggaaaac gttcttcggg gcgaaaactc tcaaggatct taccgctgtt gagatccagt + 3121 tcgatgtaac ccactcgtgc acccaactga tcttcagcat cttttacttt caccagcgtt + 3181 tctgggtgag caaaaacagg aaggcaaaat gccgcaaaaa agggaataag ggcgacacgg + 3241 aaatgttgaa tactcatact cttccttttt caatattatt gaagcattta tcagggttat + 3301 tgtctcatga gcggatacat atttgaatgt atttagaaaa ataaacaaat aggggttccg + 3361 cgcacatttc cccgaaaagt gccacctgac gtctaagaaa ccattattat catgacatta + 3421 acctataaaa ataggcgtat cacgaggccc tttcgtcttc acc +// diff --git a/lib/VNTI files/pLacT1.gb b/lib/VNTI files/pLacT1.gb new file mode 100644 index 00000000..ad026cb3 --- /dev/null +++ b/lib/VNTI files/pLacT1.gb @@ -0,0 +1,1163 @@ +LOCUS pLacT1 3463 bp DNA circular 18-MAR-2006 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|390664915| +COMMENT VNTDBDATE|405268795| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacT1| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacT1" 0 3463 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 14 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3463 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 756 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 464 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2706 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 1032 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 256 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1776 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 439 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 1 0 2179 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 1865 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 614 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 610 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 327 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3167 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2858 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 169 0 274 0 870 0 2585 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 312 1 1111 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1898 2536 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1572..2210") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1670 1774 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1344..1448") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2595 2700 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2269..2374)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2726 120 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2400..3257)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 121 219 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3258..3356)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 310 331 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3447..5)") +COMMENT #33=(CFSignal (CObList) "Tc(R)" 4 0 0 469 1656 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "143..1330") +COMMENT #34=(CFSignal (CObList) "P(lac)" 30 0 0 334 437 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #35=(CFSignal (CObList) "-35" 48 0 0 381 386 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #36=(CFSignal (CObList) "lacO" 31 0 0 417 437 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #37=(CFSignal (CObList) "-10" 47 0 0 405 410 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #38=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #39=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pLacT1" 2) 5 "" 0 +COMMENT 4) +COMMENT #40=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #41=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacT1'" 1) +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 11/09/05 02:01\214\337\214\343" 1) +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 03/18/06 02:39\214\337\214\343" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3463 bp" 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 1-MAY-2005" 1))) +COMMENT "Standard Fields") +COMMENT #51=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #53=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #55=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #57=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 469 (3 #33# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #58=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 469 End: 1656" 1) +COMMENT #59=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #60=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 143..1330" 1))) "Tc(R)") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2726 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #62=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2726 End: 120 (Complementary)" +COMMENT 1) +COMMENT #63=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #64=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2400..3257)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 310 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 310 End: 331 (Complementary)" +COMMENT 1) +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3447..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (1 total)") +COMMENT #70=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 121 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 121 End: 219 (Complementary)" +COMMENT 1) +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3258..3356)" 1))) +COMMENT "P(bla)") +COMMENT #75=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 334 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 334 End: 437 " 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 417 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 417 End: 437 " 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #84=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #85=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1898 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1898 End: 2536" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1572..2210" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1670 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1670 End: 1774" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1344..1448" 1))) "T1") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2595 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2595 End: 2700 (Complementary)" +COMMENT 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2269..2374)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 405 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 405 End: 410 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 381 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 381 End: 386 " 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)"))) "Feature Map") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #109=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27106768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #110=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 256 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #112=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27066472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #113=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 1865 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #115=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27066792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #116=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27107568 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #117=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 1 " 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2179 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #120=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27106688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #121=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1776 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #123=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27107328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #124=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 756 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #126=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27067192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #127=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 312 (on complementary strand)" +COMMENT 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1111 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #130=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27107648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #131=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27067272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27066552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 614 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27066952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2858 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #138=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27067112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27107248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #140=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27107808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #141=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 439 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #143=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27107008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #144=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27107168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #145=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 464 " 1))))) "KpnI: 1 site") 5 +COMMENT 1 "GGTACC" "CCATGG") +COMMENT #147=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27066632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #148=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 610 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27107728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27066872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #152=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3167 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27106928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2706 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27106848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 1032 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27067032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #161=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27107488 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27107088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27066712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 327 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27066392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #167=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #168=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #169=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #170=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #171=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #172=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #173=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #174=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #175=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #176=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #177=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #178=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #179=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #180=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #181=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #182=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #183=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #184=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #185=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #186=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #187=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #188=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #189=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #190=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #191=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #192=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #193=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #194=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #195=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #196=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #197=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #198=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #199=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #200=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #201=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #202=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #203=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #204=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #205=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #206=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -3463) 1 1 0 1 1 +COMMENT (mapper: 18.1582 -19.637 40.0378 40.0378 0.01 10 -1 3463 3463 1 0 0) +COMMENT #207=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #208=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #209=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #173# 24692140 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.276 6.274 1 0.0214037) 0.181149) +COMMENT #210=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #170# 100 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacT1" "@N" 1 0 0.871165 0 -10 +COMMENT 3.92129 1.44863 Nil) +COMMENT #211=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #169# 27013180 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3463 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #212=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -385 100) +COMMENT (CObjectList +COMMENT #213=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -594 100) +COMMENT (CObjectList +COMMENT #214=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #171# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 6.05581 1.33688 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #215=(CLabel (CWidget 0 (0 0) 1 2 0 0 #168# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -9.99979 8.71165 0 -10 2.72243 1.04901 #214#) +COMMENT #216=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #171# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.27336 5.42541 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #217=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #168# 26528452 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Tc(R)" "@N" 1 +COMMENT 12.9416 -10.454 0 -10 2.47266 1.04901 #216#)) +COMMENT (CObjectList)) +COMMENT #218=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -455 100) +COMMENT (CObjectList +COMMENT #219=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #189# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.71344 1.9 +COMMENT 0.082322 1) +COMMENT #220=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #168# 27179896 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 8.4107 12.1963 0 -10 2.59755 1.04901 #219#)) +COMMENT (CObjectList)) +COMMENT #221=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -385 100) +COMMENT (CObjectList +COMMENT #222=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 1 +COMMENT 5.87647 6.05581 1 0.082322) 0.8 1.8 1) +COMMENT #223=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #168# 196632 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 5.91973 15.681 0 -10 2.72243 1.04901 #222#) +COMMENT #224=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.48156 5.66996 1 0.082322) 0.8 1.8 0) +COMMENT #225=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #168# 24494004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.159 5.22699 0 -10 2.67247 1.04901 #224#)) +COMMENT (CObjectList)) +COMMENT #226=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1013 100) +COMMENT (CObjectList +COMMENT #227=(CScratch +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #174# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.51961 1.9 0.082322 +COMMENT 1) +COMMENT #228=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #168# 25070180 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.823 1.74233 0 -10 2.14797 1.04901 #227#)) +COMMENT (CObjectList)) +COMMENT #229=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1153 100) +COMMENT (CObjectList +COMMENT #230=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #171# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.67925 2.83679 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #231=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #168# 24529028 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.3033 -6.96932 0 -10 2.72243 1.04901 #230#)) +COMMENT (CObjectList)) +COMMENT #232=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #233=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #176# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 3.0596 3.24981) +COMMENT #234=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #168# 24918732 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 1.57883 -13.9386 0 -10 1.14891 1.04901 #233#) +COMMENT #235=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #176# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.38217 1.57418) +COMMENT #236=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #168# 27177332 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.5071 0 0 -10 1.14891 1.04901 #235#)) +COMMENT (CObjectList)) +COMMENT #237=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #238=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #176# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.54134 1.9 +COMMENT 0.082322 1) +COMMENT #239=(CLabel (CWidget 0 (0 0) 1 2 0 0 #168# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.1996 3.48466 0 -10 1.47361 1.04901 #238#)) +COMMENT (CObjectList)) +COMMENT #240=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #241=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #176# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.58482 1.9 +COMMENT 0.082322 1) +COMMENT #242=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #168# 26633836 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 10.7283 6.96932 0 -10 1.47361 1.04901 #241#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #243=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -804 100) +COMMENT (CObjectList +COMMENT #244=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1362 100) +COMMENT (CObjectList +COMMENT #245=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.90551 1.9 +COMMENT 0.082322 1) +COMMENT #246=(CLabel (CWidget 0 (0 0) 1 2 0 0 #177# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (756)" "@N (@S)" 5 14.6242 +COMMENT -6.96932 0 -10 5.09519 0.924127 #245#)) +COMMENT (CObjectList)) +COMMENT #247=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil -246 100) +COMMENT (CObjectList +COMMENT #248=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.43447 1.9 +COMMENT 0.082322 1) +COMMENT #249=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #177# 25069268 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (464)" "@N (@S)" 5 13.9904 +COMMENT -1.74233 0 -10 4.17106 0.924127 #248#)) +COMMENT (CObjectList)) +COMMENT #250=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -1153 100) +COMMENT (CObjectList +COMMENT #251=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.37311 1.9 +COMMENT 0.082322 1) +COMMENT #252=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #177# 26634748 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2706)" "@N (@S)" 5 -14.0775 +COMMENT 1.74233 0 -10 4.64561 0.924127 #251#)) +COMMENT (CObjectList)) +COMMENT #253=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -734 100) +COMMENT (CObjectList +COMMENT #254=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.40554 1.9 +COMMENT 0.082322 1) +COMMENT #255=(CLabel (CWidget 0 (0 0) 1 2 0 0 #177# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (1032)" "@N (@S)" 5 14.0264 +COMMENT -8.71165 0 -10 4.37087 0.924127 #254#)) +COMMENT (CObjectList)) +COMMENT #256=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -873 100) +COMMENT (CObjectList +COMMENT #257=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.81126 1.9 +COMMENT 0.082322 1) +COMMENT #258=(CLabel (CWidget 0 (0 0) 1 2 0 0 #177# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (256)" "@N (@S)" 5 8.46896 +COMMENT 13.9386 0 -10 4.29594 0.924127 #257#)) +COMMENT (CObjectList)) +COMMENT #259=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1083 100) +COMMENT (CObjectList +COMMENT #260=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.05779 1.9 +COMMENT 0.082322 1) +COMMENT #261=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #177# 26631556 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1776)" "@N (@S)" 5 -4.21005 +COMMENT -13.9386 0 -10 4.84542 0.924127 #260#)) +COMMENT (CObjectList)) +COMMENT #262=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -528 100) +COMMENT (CObjectList +COMMENT #263=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.47975 1.9 +COMMENT 0.082322 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #177# 26632012 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (439)" "@N (@S)" 5 14.293 0 0 +COMMENT -10 4.64561 0.924127 #263#)) (CObjectList)) +COMMENT #265=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil -807 100) +COMMENT (CObjectList +COMMENT #266=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.89657 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #177# 26632468 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (1865)" "@N (@S)" 5 -6.0667 +COMMENT -12.1963 0 -10 4.74552 0.924127 #266#)) +COMMENT (CObjectList)) +COMMENT #268=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -1365 100) +COMMENT (CObjectList +COMMENT #269=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #175# 21403048 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.16274 1.9 +COMMENT 0.082322 1) +COMMENT #270=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #177# 26653180 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (614)" "@N (@S)" 5 13.0632 +COMMENT -5.22699 0 -10 4.17106 0.924127 #269#)) +COMMENT (CObjectList)) +COMMENT #271=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -1086 100) +COMMENT (CObjectList +COMMENT #272=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.16999 1.9 +COMMENT 0.082322 1) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #177# 26629732 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (610)" "@N (@S)" 5 13.5935 +COMMENT -3.48466 0 -10 4.17106 0.924127 #272#)) +COMMENT (CObjectList)) +COMMENT #274=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #275=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.68264 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel (CWidget 0 (0 0) 1 2 0 0 #177# 2 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (327)" "@N (@S)" 5 10.7751 +COMMENT 8.71165 0 -10 4.24599 0.924127 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.538012 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel (CWidget 0 (0 0) 1 2 0 0 #177# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3167)" "@N (@S)" 5 -8.9807 +COMMENT 10.454 0 -10 4.62063 0.924127 #278#)) +COMMENT (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 928 100) +COMMENT (CObjectList +COMMENT #281=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.09776 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #177# 26632924 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2858)" "@N (@S)" 5 -13.2741 +COMMENT 5.22699 0 -10 4.64561 0.924127 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #284=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.27319 1.9 +COMMENT 0.082322 1) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #167# 25222520 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1)" "@N (@S)" 5 2.98726 17.4233 +COMMENT 0 -10 3.5966 0.924127 #284#) +COMMENT #286=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.32776 1.9 +COMMENT 0.082322 1) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #167# 393254 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2179)" "@N (@S)" 5 -11.6726 +COMMENT -8.71165 0 -10 5.17011 0.924127 #286#)) +COMMENT (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.70981 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #167# 26633380 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (312)" "@N (@S)" 5 9.11393 10.454 +COMMENT 0 -10 4.04618 0.924127 #289#) +COMMENT #291=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.26243 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #167# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1111)" "@N (@S)" 5 13.6231 +COMMENT -12.1963 0 -10 4.37087 0.924127 #291#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #293=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 834 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #294=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21222168 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1898..2536 + /vntifkey="33" + /label=ColE1 + terminator 1670..1774 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2595..2700) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2726..120) + /vntifkey="4" + /label=AmpR + promoter complement(121..219) + /vntifkey="30" + /label=P(bla) + primer_bind complement(310..331) + /vntifkey="28" + /label=BLI06 + CDS 469..1656 + /vntifkey="4" + /label=Tc(R) + promoter 334..437 + /vntifkey="30" + /label=P(lac) + -35_signal 381..386 + /vntifkey="48" + /label=-35 + protein_bind 417..437 + /vntifkey="31" + /label=lacO + -10_signal 405..410 + /vntifkey="47" + /label=-10 +BASE COUNT 776 a 954 c 902 g 831 t +ORIGIN + 1 tgcacccaac tgatcttcag catcttttac tttcaccagc gtttctgggt gagcaaaaac + 61 aggaaggcaa aatgccgcaa aaaagggaat aagggcgaca cggaaatgtt gaatactcat + 121 actcttcctt tttcaatatt attgaagcat ttatcagggt tattgtctca tgagcggata + 181 catatttgaa tgtatttaga aaaataaaca aataggggtt ccgcgcacat ttccccgaaa + 241 agtgccacct gacgtctaag aaaccattat tatcatgaca ttaacctata aaaataggcg + 301 tatcacgagg ccctttcgtc ttcacctcga gagcgcaacg caattaatgt gagttagctc + 361 actcattagg caccccaggc tttacacttt atgcttccgg ctcgaccacg gtgtggaatt + 421 gtgagcggat aacaattgaa ttcattaaag aggagaaagg tacccatgaa atctaacaat + 481 gcgctcatcg tcatcctcgg caccgtcacc ctggatgctg taggcatagg cttggttatg + 541 ccggtactgc cgggcctctt gcgggatatc gtccattccg acagcatcgc cagtcactat + 601 ggcgtgctgc tagcgctata tgcgttgatg caatttctat gcgcacccgt tctcggagca + 661 ctgtccgacc gctttggccg ccgcccagtc ctgctcgctt cgctacttgg agccactatc + 721 gactacgcga tcatggcgac cacacccgtc ctgtggatcc tctacgccgg acgcatcgtg + 781 gccggcatca ccggcgccac aggtgcggtt gctggcgcct atatcgccga catcaccgat + 841 ggggaagatc gggctcgcca cttcgggctc atgagcgctt gtttcggcgt gggtatggtg + 901 gcaggccccg tggccggggg actgttgggc gccatctcct tgcatgcacc attccttgcg + 961 gcggcggtgc tcaacggcct caacctacta ctgggctgct tcctaatgca ggagtcgcat + 1021 aagggagagc gtcgaccgat gcccttgaga gccttcaacc cagtcagctc cttccggtgg + 1081 gcgcggggca tgactatcgt cgccgcactt atgactgtct tctttatcat gcaactcgta + 1141 ggacaggtgc cggcagcgct ctgggtcatt ttcggcgagg accgctttcg ctggagcgcg + 1201 acgatgatcg gcctgtcgct tgcggtattc ggaatcttgc acgccctcgc tcaagccttc + 1261 gtcactggtc ccgccaccaa acgtttcggc gagaagcagg ccattatcgc cggcatggcg + 1321 gccgacgcgc tgggctacgt cttgctggcg ttcgcgacgc gaggctggat ggccttcccc + 1381 attatgattc ttctcgcttc cggcggcatc gggatgcccg cgttgcaggc catgctgtcc + 1441 aggcaggtag atgacgacca tcagggacag cttcaaggat cgctcgcggc tcttaccagc + 1501 ctaacttcga tcactggacc gctgatcgtc acggcgattt atgccgcctc ggcgagcaca + 1561 tggaacgggt tggcatggat tgtaggcgcc gccctatacc ttgtctgcct ccccgcgttg + 1621 cgtcgcggtg catggagccg ggccacctcg acctgaatgg aagcctagag gcatcaaata + 1681 aaacgaaagg ctcagtcgaa agactgggcc tttcgtttta tctgttgttt gtcggtgaac + 1741 gctctcctga gtaggacaaa tccgccgccc tagacctagg cgttcggctg cggcgagcgg + 1801 tatcagctca ctcaaaggcg gtaatacggt tatccacaga atcaggggat aacgcaggaa + 1861 agaacatgtg agcaaaaggc cagcaaaagg ccaggaaccg taaaaaggcc gcgttgctgg + 1921 cgtttttcca taggctccgc ccccctgacg agcatcacaa aaatcgacgc tcaagtcaga + 1981 ggtggcgaaa cccgacagga ctataaagat accaggcgtt tccccctgga agctccctcg + 2041 tgcgctctcc tgttccgacc ctgccgctta ccggatacct gtccgccttt ctcccttcgg + 2101 gaagcgtggc gctttctcaa tgctcacgct gtaggtatct cagttcggtg taggtcgttc + 2161 gctccaagct gggctgtgtg cacgaacccc ccgttcagcc cgaccgctgc gccttatccg + 2221 gtaactatcg tcttgagtcc aacccggtaa gacacgactt atcgccactg gcagcagcca + 2281 ctggtaacag gattagcaga gcgaggtatg taggcggtgc tacagagttc ttgaagtggt + 2341 ggcctaacta cggctacact agaaggacag tatttggtat ctgcgctctg ctgaagccag + 2401 ttaccttcgg aaaaagagtt ggtagctctt gatccggcaa acaaaccacc gctggtagcg + 2461 gtggtttttt tgtttgcaag cagcagatta cgcgcagaaa aaaaggatct caagaagatc + 2521 ctttgatctt ttctacgggg tctgacgctc agtggaacga aaactcacgt taagggattt + 2581 tggtcatgac tagtgcttgg attctcacca ataaaaaacg cccggcggca accgagcgtt + 2641 ctgaacaaat ccagatggag ttctgaggtc attactggat ctatcaacag gagtccaagc + 2701 gagctcaaac ttggtctgac agttaccaat gcttaatcag tgaggcacct atctcagcga + 2761 tctgtctatt tcgttcatcc atagttgcct gactccccgt cgtgtagata actacgatac + 2821 gggagggctt accatctggc cccagtgctg caatgatacc gcgagaccca cgctcaccgg + 2881 ctccagattt atcagcaata aaccagccag ccggaagggc cgagcgcaga agtggtcctg + 2941 caactttatc cgcctccatc cagtctatta attgttgccg ggaagctaga gtaagtagtt + 3001 cgccagttaa tagtttgcgc aacgttgttg ccattgctac aggcatcgtg gtgtcacgct + 3061 cgtcgtttgg tatggcttca ttcagctccg gttcccaacg atcaaggcga gttacatgat + 3121 cccccatgtt gtgcaaaaaa gcggttagct ccttcggtcc tccgatcgtt gtcagaagta + 3181 agttggccgc agtgttatca ctcatggtta tggcagcact gcataattct cttactgtca + 3241 tgccatccgt aagatgcttt tctgtgactg gtgagtactc aaccaagtca ttctgagaat + 3301 agtgtatgcg gcgaccgagt tgctcttgcc cggcgtcaat acgggataat accgcgccac + 3361 atagcagaac tttaaaagtg ctcatcattg gaaaacgttc ttcggggcga aaactctcaa + 3421 ggatcttacc gctgttgaga tccagttcga tgtaacccac tcg +// diff --git a/lib/VNTI files/pLacTheo28-N20+thiM2gfpuv.gb b/lib/VNTI files/pLacTheo28-N20+thiM2gfpuv.gb new file mode 100644 index 00000000..b0507c2d --- /dev/null +++ b/lib/VNTI files/pLacTheo28-N20+thiM2gfpuv.gb @@ -0,0 +1,1613 @@ +LOCUS pLacTheo28 3136 bp DNA circular 19-SEP-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|457876916| +COMMENT VNTDBDATE|457876916| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacTheo28-N20+thiM2gfpuv| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTOAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacTheo28-N20+thiM2gfpuv" 0 3136 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3136 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 777 0 1303 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1490 0 2543 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 766 0 1386 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1613 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2016 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 1105 0 1702 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 2 491 0 1204 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3004 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2695 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 2422 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 661 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1735 2373 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2205..2843") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1507 1611 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1977..2081") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2432 2537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2902..3007)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2563 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3033..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2649 2670 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3119..3140") +COMMENT #35=(CFSignal (CObList) "pbla-rev (Sequencing Primer)" 28 0 0 326 345 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "Core Riboswitch" 21 0 0 656 781 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "656..781") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 780 780 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "780..780") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 778 778 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "778..778") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #46=(CFSignal (CObList) "TPP Aptamer" 21 0 0 656 730 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "656..730") +COMMENT #47=(CFSignal (CObList) "Theo28 Aptamer" 21 0 0 609 635 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "609..635") +COMMENT #48=(CFSignal (CObList) "Theo28r" 27 0 1 618 635 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(618..635)") +COMMENT #49=(CFSignal (CObList) "N20 Linker" 21 0 0 636 655 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "636..655") +COMMENT #50=(CFSignal (CObList) "gfpuv" 4 0 0 759 1499 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #51=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #52=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pLacTheo28-N20-thiMtetA-N30" 2) 5 "" 0 4) +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacTheo28-N20-thiMtetA-N30'" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Foreign object. Author: Yokobayashi Lab. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 09/17/07 11:26\214\337\221O" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 09/19/07 11:39\214\337\221O" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3136 bp" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 17-SEP-2007" 1))) +COMMENT "Standard Fields") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Author") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #68=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #69=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #70=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 759 (3 #50# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 759 End: 1499" 1))) "gfpuv") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2563 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2563 End: 284 (Complementary)" +COMMENT 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3033..284)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #79=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 609 (3 #47# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 609 End: 635 " 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 609..635" 1))) "Theo28 Aptamer") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 636 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 636 End: 655 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 636..655" 1))) "N20 Linker") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 656 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 656 End: 781 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 656..781" 1))) "Core Riboswitch") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 656 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 656 End: 730 " 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 656..730" 1))) "TPP Aptamer") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 778 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 778 End: 778 " 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 778..778" 1))) "orig G") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2649 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2649 End: 2670" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3119..3140" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (7 total)") +COMMENT #107=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF") +COMMENT #112=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 618 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 618 End: 635 (Complementary)" +COMMENT 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(618..635)" 1))) +COMMENT "Theo28r"))) "Primer (2 total)") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #117=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) +COMMENT "pbla-rev (Sequencing Primer)") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #131=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #144=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #145=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1735 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1735 End: 2373" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2205..2843" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #150=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1507 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1507 End: 1611" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1977..2081" 1))) "T1") +COMMENT #155=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2432 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2432 End: 2537 (Complementary)" +COMMENT 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2902..3007)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #160=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #165=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #166=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #170=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #176=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 780 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 780 End: 780 " 1) +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 780..780" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #180=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43237904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #182=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43195304 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #185=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 1105 " 1) +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1702 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43195624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43238704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2016 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43237824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1613 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43238464 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 777 " 1) +COMMENT #199=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1303 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43196024 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #201=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #203=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 661 " 1))))) "BbsI: 2 sites") +COMMENT 8 12 "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43238784 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43196104 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43195384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43195784 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #208=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #209=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2695 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43195944 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #211=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #214=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2422 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #215=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43238384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #216=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43238944 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #217=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #218=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #219=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43238144 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #220=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43238304 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #221=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43195464 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43238864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #223=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43195704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #224=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #225=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3004 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #226=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43238064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #227=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #228=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1490 " 1) +COMMENT #229=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2543 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #230=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43237984 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #231=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #232=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 766 " 1) +COMMENT #233=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1386 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #234=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43195864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #235=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43238624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #236=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43238224 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #237=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43195544 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #238=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #239=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1) +COMMENT #240=(CLinePar +COMMENT (CParagraph 0 (1 #19# 2) 1 2 2 0 191) +COMMENT " N2: 1204 " 1))))) "XhoI: 2 sites") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #241=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 43195224 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #242=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #243=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #244=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #245=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #246=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #247=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #248=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #249=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #250=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #251=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #252=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #253=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #254=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #255=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #256=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #257=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #258=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #259=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #260=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #261=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #262=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #263=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #264=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #265=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #266=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #267=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #268=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #269=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #270=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #271=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #272=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #273=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #274=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #275=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #276=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #277=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #278=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #279=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #280=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #281=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 18.9376 -24.9369 40.0378 40.0378 0.01 10 -1 3136 3136 1 0 0) +COMMENT #282=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #283=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #284=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 42637044 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27619 6.27419 1 0.0214037) 0.200038) +COMMENT #285=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacTheo28-N20-thiMtetA-N30" +COMMENT "@N" 1 0 0.871165 0 -10 16.6093 1.44863 Nil) +COMMENT #286=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #244# 1634166631 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3136 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.24693 0.924127 Nil)) (CObjectList)) +COMMENT #287=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -528 100) +COMMENT (CObjectList +COMMENT #288=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #289=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.70508 1.14822 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #290=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.76283 10.454 0 -10 2.7474 1.04901 #289#) +COMMENT #291=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #50# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.27462 4.7569 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #292=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 11.565 -27.8773 0 -10 2.82233 1.04901 #291#)) +COMMENT (CObjectList)) +COMMENT #293=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #294=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.976184 1.9 +COMMENT 0.082322 1) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26835652 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.9377 6.96932 0 -10 4.0212 1.04901 #294#) +COMMENT #296=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #251# 27833488 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.11297 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.0951 -3.48466 0 -10 1.17389 1.04901 #296#) +COMMENT #298=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.71089 +COMMENT 4.96294 1 0.082322) 0.8 1.8 0) +COMMENT #299=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "Core Riboswitch" "@N" 1 16.275 -17.4233 0 +COMMENT -10 7.71771 1.04901 #298#) +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.71889 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 27941732 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 14.4225 -22.6503 0 -10 2.94721 1.04901 #300#) +COMMENT #302=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 4.81291 +COMMENT 4.96294 1 0.082322) 0.8 1.8 0) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 21320440 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP Aptamer" +COMMENT "@N" 1 15.4414 -15.681 0 -10 5.94438 1.04901 +COMMENT #302#) +COMMENT #304=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.00295 +COMMENT 5.05696 1 0.082322) 0.8 1.8 0) +COMMENT #305=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Theo28 Aptamer" +COMMENT "@N" 1 15.336 -10.454 0 -10 7.59282 1.04901 +COMMENT #304#) +COMMENT #306=(CScratch +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.00295 1.9 +COMMENT 0.082322 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 1952932705 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "N20 Linker" +COMMENT "@N" 1 14.4263 -12.1963 0 -10 5.02026 1.04901 +COMMENT #306#)) (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -2062 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #251# 28203492 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.24099 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 1 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.7223 3.48466 0 -10 2.62252 1.04901 #309#) +COMMENT #311=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.03895 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Theo28r" "@N" 1 +COMMENT 13.5085 -8.71165 0 -10 3.87134 1.04901 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #264# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.32701 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 11.6088 10.454 0 -10 2.62252 1.04901 #314#) +COMMENT #316=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #264# 14 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.00113 1.9 +COMMENT 0.082322 1) +COMMENT #317=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 1734566772 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 6.14612 22.6503 0 -10 3.94627 1.04901 #316#) +COMMENT #318=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #264# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.62306 1.9 +COMMENT 0.082322 1) +COMMENT #319=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "pbla-rev (Sequencing Primer)" "@N" 1 14.314 +COMMENT 19.1656 0 -10 13.8369 1.04901 #318#)) +COMMENT (CObjectList)) +COMMENT #320=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -2132 100) +COMMENT (CObjectList +COMMENT #321=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #259# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.50704 5.70508 1 0.082322) 0.8 1.8 1) +COMMENT #322=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 30 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 9.69832 15.681 0 -10 2.7474 1.04901 #321#) +COMMENT #323=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #259# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.07096 5.279 1 0.082322) 0.8 1.8 0) +COMMENT #324=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.1605 0 0 -10 2.69745 1.04901 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #249# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.11297 1.9 0.082322 +COMMENT 1) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 43033364 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.1941 -5.22699 0 -10 2.14797 1.04901 #326#)) +COMMENT (CObjectList)) +COMMENT #328=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #329=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.52629 2.80453 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #330=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 21320440 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.4934 -6.96932 0 -10 2.7474 1.04901 #329#)) +COMMENT (CObjectList)) +COMMENT #331=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #332=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #251# 1162 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 3.05058 +COMMENT 3.26062) +COMMENT #333=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 1.90771 -36.5889 0 -10 1.17389 1.04901 #332#) +COMMENT #334=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #251# 2555911 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 1.19823 1.41027) +COMMENT #335=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.1904 3.48466 0 -10 1.17389 1.04901 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1783 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.13697 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.5268 -1.74233 0 -10 1.49858 1.04901 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1365 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.18498 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.5268 1.74233 0 -10 1.49858 1.04901 #340#)) +COMMENT (CObjectList)) +COMMENT #342=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -2272 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.283 1.9 0.082322 +COMMENT 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 43114004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 13.5355 5.22699 0 -10 5.86945 1.04901 +COMMENT #343#) +COMMENT #345=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.71489 1.9 +COMMENT 0.082322 1) +COMMENT #346=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 14.3677 -24.3926 0 -10 2.7474 1.04901 #345#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #347=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -807 100) +COMMENT (CObjectList +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #250# 28197420 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.43503 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #252# 3736312 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 12.0421 +COMMENT 13.9386 0 -10 4.34589 0.924127 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -528 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #250# 680 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.04858 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #252# 16777215 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1613)" "@N (@S)" 5 -4.34614 +COMMENT -13.9386 0 -10 4.79547 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #250# 16777215 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.06896 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel (CWidget 0 (0 0) 1 2 0 0 #252# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.9281 +COMMENT -6.96932 0 -10 4.67059 0.924127 #355#)) +COMMENT (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -810 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #250# 1077 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.26605 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #252# 1668573027 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3004)" "@N (@S)" 5 -6.25807 +COMMENT 12.1963 0 -10 4.74552 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.884167 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel (CWidget 0 (0 0) 1 2 0 0 #252# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2695)" "@N (@S)" 5 -12.0287 +COMMENT 8.71165 0 -10 4.67059 0.924127 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -2341 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #250# 21320440 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.72089 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26693424 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (777)" "@N (@S)" 5 15.6186 +COMMENT -20.908 0 -10 5.12016 0.924127 #364#) +COMMENT #366=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #250# 28203796 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.66869 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel (CWidget 0 (0 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1303)" "@N (@S)" 5 10.0019 +COMMENT -31.3619 0 -10 5.59471 0.924127 #366#)) +COMMENT (CObjectList)) +COMMENT #368=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -2202 100) +COMMENT (CObjectList +COMMENT #369=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #250# 16777215 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.29462 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel (CWidget 0 (0 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1490)" "@N (@S)" 5 5.22058 +COMMENT -34.8466 0 -10 4.62063 0.924127 #369#) +COMMENT #371=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.18822 1.9 +COMMENT 0.082322 1) +COMMENT #372=(CLabel (CWidget 0 (0 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2543)" "@N (@S)" 5 -13.5396 +COMMENT 5.22699 0 -10 4.67059 0.924127 #371#)) +COMMENT (CObjectList)) +COMMENT #373=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #374=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.7429 1.9 0.082322 +COMMENT 1) +COMMENT #375=(CLabel (CWidget 0 (0 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (766)" "@N (@S)" 5 14.9679 +COMMENT -19.1656 0 -10 3.94627 0.924127 #374#) +COMMENT #376=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.50266 1.9 +COMMENT 0.082322 1) +COMMENT #377=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26835428 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1386)" "@N (@S)" 5 7.55579 +COMMENT -33.1043 0 -10 4.42082 0.924127 #376#)) +COMMENT (CObjectList)) +COMMENT #378=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #379=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #250# 27947324 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.94512 1.9 +COMMENT 0.082322 1) +COMMENT #380=(CLabel (CWidget 0 (0 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 7.40609 +COMMENT 20.908 0 -10 4.67059 0.924127 #379#) +COMMENT #381=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.24242 1.9 +COMMENT 0.082322 1) +COMMENT #382=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 21320440 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2016)" "@N (@S)" 5 -12.4116 +COMMENT -8.71165 0 -10 5.19509 0.924127 #381#)) +COMMENT (CObjectList)) +COMMENT #383=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #384=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.06477 1.9 +COMMENT 0.082322 1) +COMMENT #385=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 28098600 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1105)" "@N (@S)" 5 13.1015 +COMMENT -26.1349 0 -10 4.74552 0.924127 #384#) +COMMENT #386=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #250# 28207908 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.87054 1.9 +COMMENT 0.082322 1) +COMMENT #387=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 3736072 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1702)" "@N (@S)" 5 -6.36807 +COMMENT -12.1963 0 -10 4.82044 0.924127 #386#)) +COMMENT (CObjectList)) +COMMENT #388=(CGroupWidget +COMMENT (CWidget 2 (10 #19# 0) 1 2 0 0 Nil -1996 100) +COMMENT (CObjectList +COMMENT #389=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.293 1.9 0.082322 +COMMENT 1) +COMMENT #390=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 16777215 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 12.4226 +COMMENT 6.96932 0 -10 4.19603 0.924127 #389#) +COMMENT #391=(CScratch +COMMENT (CWidget 2 (1 #19# 2) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.86673 1.9 +COMMENT 0.082322 1) +COMMENT #392=(CLabel (CWidget 0 (0 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (1204)" "@N (@S)" 5 11.4574 +COMMENT -29.6196 0 -10 4.74552 0.924127 #391#)) +COMMENT (CObjectList)) +COMMENT #393=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil -879 100) +COMMENT (CObjectList +COMMENT #394=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #250# 27832272 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.32301 1.9 +COMMENT 0.082322 1) +COMMENT #395=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 28098648 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 12.3171 +COMMENT 8.71165 0 -10 4.14608 0.924127 #394#) +COMMENT #396=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #250# 28196964 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.95294 1.9 +COMMENT 0.082322 1) +COMMENT #397=(CLabel (CWidget 0 (0 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (661)" "@N (@S)" 5 14.5163 +COMMENT -13.9386 0 -10 4.07115 0.924127 #396#)) +COMMENT (CObjectList)) +COMMENT #398=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1089 100) +COMMENT (CObjectList +COMMENT #399=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.60906 1.9 +COMMENT 0.082322 1) +COMMENT #400=(CLabel (CWidget 0 (0 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 10.9179 +COMMENT 17.4233 0 -10 4.79547 0.924127 #399#) +COMMENT #401=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.39902 1.9 +COMMENT 0.082322 1) +COMMENT #402=(CLabel (CWidget 0 (0 0) 1 2 0 0 #242# 8 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 12.4496 +COMMENT 12.1963 0 -10 4.79547 0.924127 #401#) +COMMENT #403=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #250# 33030285 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.43027 1.9 +COMMENT 0.082322 1) +COMMENT #404=(CLabel (CWidget 0 (0 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2422)" "@N (@S)" 5 -14.505 +COMMENT 1.74233 0 -10 5.34495 0.924127 #403#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #405=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -2414 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #406=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1298 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21555960 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1735..2373 + /vntifkey="33" + /label=ColE1 + terminator 1507..1611 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2432..2537) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2563..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2649..2670 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev\(Sequencing\Primer) + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 656..781 + /vntifkey="21" + /label=Core\Riboswitch + mutation 780..780 + /vntifkey="62" + /label=orig\T + misc_feature 778..778 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 656..730 + /vntifkey="21" + /label=TPP\Aptamer + misc_feature 609..635 + /vntifkey="21" + /label=Theo28\Aptamer + primer complement(618..635) + /vntifkey="27" + /label=Theo28r + misc_feature 636..655 + /vntifkey="21" + /label=N20\Linker + CDS 759..1499 + /vntifkey="4" + /label=gfpuv +BASE COUNT 851 a 759 c 734 g 792 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattctga taccagccga aaggcccttg gcagcgggaa tattggaagc tcgaagactc + 661 ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc acctgatctg gataatgcca + 721 gcgtagggaa gctattacaa gaagatcagg agcaaactat gcaagtcgac ctgctggatc + 781 cattgagtaa aggagaagaa cttttcactg gagttgtccc aattcttgtt gaattagatg + 841 gtgatgttaa tgggcacaaa ttttctgtca gtggagaggg tgaaggtgat gcaacatacg + 901 gaaaacttac ccttaaattt atttgcacta ctggaaaact acctgttcca tggccaacac + 961 ttgtcactac tttctcttat ggtgttcaat gcttttcccg ttatccggat catatgaaac + 1021 ggcatgactt tttcaagagt gccatgcccg aaggttatgt acaggaacgc actatatctt + 1081 tcaaagatga cgggaactac aagacgcgtg ctgaagtcaa gtttgaaggt gatacccttg + 1141 ttaatcgtat cgagttaaaa ggtattgatt ttaaagaaga tggaaacatt ctcggacaca + 1201 aactcgagta caactataac tcacacaatg tatacatcac ggcagacaaa caaaagaatg + 1261 gaatcaaagc taacttcaaa attcgccaca acattgaaga tggatccgtt caactagcag + 1321 accattatca acaaaatact ccaattggcg atggccctgt ccttttacca gacaaccatt + 1381 acctgtcgac acaatctgcc ctttcgaaag atcccaacga aaagcgtgac cacatggtcc + 1441 ttcttgagtt tgtaactgct gctgggatta cacatggcat ggatgagctc tacaaataaa + 1501 gctagaggca tcaaataaaa cgaaaggctc agtcgaaaga ctgggccttt cgttttatct + 1561 gttgtttgtc ggtgaacgct ctcctgagta ggacaaatcc gccgccctag acctaggcgt + 1621 tcggctgcgg cgagcggtat cagctcactc aaaggcggta atacggttat ccacagaatc + 1681 aggggataac gcaggaaaga acatgtgagc aaaaggccag caaaaggcca ggaaccgtaa + 1741 aaaggccgcg ttgctggcgt ttttccatag gctccgcccc cctgacgagc atcacaaaaa + 1801 tcgacgctca agtcagaggt ggcgaaaccc gacaggacta taaagatacc aggcgtttcc + 1861 ccctggaagc tccctcgtgc gctctcctgt tccgaccctg ccgcttaccg gatacctgtc + 1921 cgcctttctc ccttcgggaa gcgtggcgct ttctcaatgc tcacgctgta ggtatctcag + 1981 ttcggtgtag gtcgttcgct ccaagctggg ctgtgtgcac gaaccccccg ttcagcccga + 2041 ccgctgcgcc ttatccggta actatcgtct tgagtccaac ccggtaagac acgacttatc + 2101 gccactggca gcagccactg gtaacaggat tagcagagcg aggtatgtag gcggtgctac + 2161 agagttcttg aagtggtggc ctaactacgg ctacactaga aggacagtat ttggtatctg + 2221 cgctctgctg aagccagtta ccttcggaaa aagagttggt agctcttgat ccggcaaaca + 2281 aaccaccgct ggtagcggtg gtttttttgt ttgcaagcag cagattacgc gcagaaaaaa + 2341 aggatctcaa gaagatcctt tgatcttttc tacggggtct gacgctcagt ggaacgaaaa + 2401 ctcacgttaa gggattttgg tcatgactag tgcttggatt ctcaccaata aaaaacgccc + 2461 ggcggcaacc gagcgttctg aacaaatcca gatggagttc tgaggtcatt actggatcta + 2521 tcaacaggag tccaagcgag ctcaaacttg gtctgacagt taccaatgct taatcagtga + 2581 ggcacctatc tcagcgatct gtctatttcg ttcatccata gttgcctgac tccccgtcgt + 2641 gtagataact acgatacggg agggcttacc atctggcccc agtgctgcaa tgataccgcg + 2701 agacccacgc tcaccggctc cagatttatc agcaataaac cagccagccg gaagggccga + 2761 gcgcagaagt ggtcctgcaa ctttatccgc ctccatccag tctattaatt gttgccggga + 2821 agctagagta agtagttcgc cagttaatag tttgcgcaac gttgttgcca ttgctacagg + 2881 catcgtggtg tcacgctcgt cgtttggtat ggcttcattc agctccggtt cccaacgatc + 2941 aaggcgagtt acatgatccc ccatgttgtg caaaaaagcg gttagctcct tcggtcctcc + 3001 gatcgttgtc agaagtaagt tggccgcagt gttatcactc atggttatgg cagcactgca + 3061 taattctctt actgtcatgc catccgtaag atgcttttct gtgactggtg agtactcaac + 3121 caagtcattc tgagaa +// diff --git a/lib/VNTI files/pLacTheo28-N20+thiM2lacZ.gb b/lib/VNTI files/pLacTheo28-N20+thiM2lacZ.gb new file mode 100644 index 00000000..32d6c688 --- /dev/null +++ b/lib/VNTI files/pLacTheo28-N20+thiM2lacZ.gb @@ -0,0 +1,1540 @@ +LOCUS pLacTheo28 5481 bp DNA circular 19-SEP-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|457875695| +COMMENT VNTDBDATE|457875695| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacTheo28-N20+thiM2lacZ| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTOAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacTheo28-N20+thiM2lacZ" 0 5481 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5481 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 777 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1610 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3847 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2726 0 4888 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 766 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1409 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3958 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3131 0 3246 0 +COMMENT 4361 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 2088 0 2868 0 3293 0 +COMMENT 3545 0 4047 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 909 0 1635 0 2115 0 2568 +COMMENT 0 5349 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 5040 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4767 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 4 476 1 661 0 2303 0 3555 +COMMENT 1 0 "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4080 4718 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2205..2843") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 3852 3956 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1977..2081") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 4777 4882 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2902..3007)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 4908 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3033..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 4994 5015 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3119..3140") +COMMENT #35=(CFSignal (CObList) "pbla-rev (Sequencing Primer)" 28 0 0 326 345 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "Core Riboswitch" 21 0 0 656 781 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "656..781") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 780 780 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "780..780") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 778 778 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "778..778") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #46=(CFSignal (CObList) "TPP Aptamer" 21 0 0 656 730 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "656..730") +COMMENT #47=(CFSignal (CObList) "Theo28 Aptamer" 21 0 0 609 635 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "609..635") +COMMENT #48=(CFSignal (CObList) "Theo28r" 27 0 1 618 635 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(618..635)") +COMMENT #49=(CFSignal (CObList) "N20 Linker" 21 0 0 636 655 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "636..655") +COMMENT #50=(CFSignal (CObList) "lacZ" 4 0 0 759 3845 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #51=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #52=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacTheo28-N20-thiMtetA-N30" 2) 5 "" 0 4) +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacTheo28-N20-thiMtetA-N30'" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Foreign object. Author: Yokobayashi Lab. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 09/17/07 11:26\214\337\221O" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 09/19/07 11:39\214\337\221O" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5481 bp" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 17-SEP-2007" 1))) +COMMENT "Standard Fields") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Author") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #68=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #69=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #70=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 759 (3 #50# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 759 End: 3845" 1))) "lacZ") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4908 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4908 End: 284 (Complementary)" +COMMENT 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3033..284)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #79=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 609 (3 #47# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 609 End: 635 " 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 609..635" 1))) "Theo28 Aptamer") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 636 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 636 End: 655 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 636..655" 1))) "N20 Linker") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 656 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 656 End: 781 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 656..781" 1))) "Core Riboswitch") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 656 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 656 End: 730 " 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 656..730" 1))) "TPP Aptamer") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 778 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 778 End: 778 " 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 778..778" 1))) "orig G") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4994 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4994 End: 5015" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3119..3140" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (7 total)") +COMMENT #107=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF") +COMMENT #112=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 618 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 618 End: 635 (Complementary)" +COMMENT 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(618..635)" 1))) +COMMENT "Theo28r"))) "Primer (2 total)") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #117=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) +COMMENT "pbla-rev (Sequencing Primer)") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #131=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #144=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #145=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4080 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4080 End: 4718" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2205..2843" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #150=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3852 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3852 End: 3956" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1977..2081" 1))) "T1") +COMMENT #155=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4777 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4777 End: 4882 (Complementary)" +COMMENT 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2902..3007)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #160=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #165=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #166=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #170=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #176=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 780 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 780 End: 780 " 1) +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 780..780" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #180=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25558336 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #182=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 1409 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28213328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 5 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28213648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25587632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25557936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #189=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 3958 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25587392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #192=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #193=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 777 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28214048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 4 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25587712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28214128 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28213408 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28213808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 5040 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28213968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #202=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #203=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #204=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4767 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25547792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #207=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #208=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 1610 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25587312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #210=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #211=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #212=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25558576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #213=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25559056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28213488 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #215=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25580768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #216=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28213728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25558496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #218=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #219=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2726 " 1) +COMMENT #220=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 4888 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #221=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25558416 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #222=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #223=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 766 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #224=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28213888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #225=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25587552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #226=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25558976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #227=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #228=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3847 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #229=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28213568 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #230=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #231=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #232=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28213248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #233=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #234=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #235=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #236=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #237=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #238=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #239=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #240=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #241=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #242=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #243=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #244=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #245=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #246=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #247=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #248=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #249=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #250=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #251=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #252=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #253=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #254=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #255=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #256=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #257=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #258=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #259=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #260=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #261=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #262=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #263=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #264=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #265=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #266=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #267=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #268=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #269=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #270=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #271=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #272=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 18.5679 -30.1569 40.0378 40.0378 0.01 10 -1 5481 5481 1 0 0) +COMMENT #273=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #274=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #275=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 27514748 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27533 6.27333 1 0.0214037) 0.114453) +COMMENT #276=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #236# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacTheo28-N20-thiMtetA-N30" +COMMENT "@N" 1 0 0.871165 0 -10 16.6093 1.44863 Nil) +COMMENT #277=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #235# 27000428 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5481 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.24693 0.924127 Nil)) (CObjectList)) +COMMENT #278=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #279=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #280=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.94814 0.656962 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #281=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.18382 15.681 0 -10 2.7474 1.04901 #280#) +COMMENT #282=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #50# 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.87246 5.40563 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #283=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ" "@N" 1 +COMMENT 7.71058 -19.1656 0 -10 1.94816 1.04901 #282#)) +COMMENT (CObjectList)) +COMMENT #284=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #285=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.558532 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -8.79373 12.1963 0 -10 4.0212 1.04901 #285#) +COMMENT #287=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.60936 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 11.5231 5.22699 0 -10 1.17389 1.04901 #287#) +COMMENT #289=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.3793 +COMMENT 5.52352 1 0.082322) 0.8 1.8 0) +COMMENT #290=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "Core Riboswitch" "@N" 1 13.4202 -6.96932 0 +COMMENT -10 7.71771 1.04901 #289#) +COMMENT #291=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #242# 16777215 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.38388 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 8 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 11.431 -12.1963 0 -10 2.94721 1.04901 #291#) +COMMENT #293=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.43768 +COMMENT 5.52352 1 0.082322) 0.8 1.8 0) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #234# 3736224 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP Aptamer" +COMMENT "@N" 1 13.6487 -5.22699 0 -10 5.94438 1.04901 +COMMENT #293#) +COMMENT #295=(CScratch +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.57731 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Theo28 Aptamer" +COMMENT "@N" 1 15.2949 0 0 -10 7.59282 1.04901 #295#) +COMMENT #297=(CScratch +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.54641 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #234# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "N20 Linker" +COMMENT "@N" 1 13.7329 -3.48466 0 -10 5.02026 1.04901 +COMMENT #297#)) (CObjectList)) +COMMENT #299=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.68261 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 8.70974 12.1963 0 -10 2.62252 1.04901 #300#) +COMMENT #302=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.56701 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Theo28r" "@N" 1 +COMMENT 13.5461 -1.74233 0 -10 3.87134 1.04901 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1992 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #255# 28197420 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.73182 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #234# 21320440 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 8.51375 17.4233 0 -10 2.62252 1.04901 #305#) +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #255# 27833488 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.11753 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.81598 27.8773 0 -10 3.94627 1.04901 #307#) +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.90121 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "pbla-rev (Sequencing Primer)" "@N" 1 11.5167 +COMMENT 26.1349 0 -10 13.8369 1.04901 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #312=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.83483 5.94814 1 0.082322) 0.8 1.8 1) +COMMENT #313=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 6.94925 22.6503 0 -10 2.7474 1.04901 #312#) +COMMENT #314=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.58532 5.70435 1 0.082322) 0.8 1.8 0) +COMMENT #315=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 9.89525 8.71165 0 -10 2.69745 1.04901 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.60936 1.9 0.082322 +COMMENT 1) +COMMENT #318=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5132 3.48466 0 -10 2.14797 1.04901 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -248 100) +COMMENT (CObjectList +COMMENT #320=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.873279 1.60464 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #234# 26835428 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 3.48466 0 -10 2.7474 1.04901 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #323=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #242# 3735968 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 1.74541 1.86559) +COMMENT #324=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.2849 -3.48466 0 -10 1.17389 1.04901 #323#) +COMMENT #325=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #242# 28190004 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 0.685575 0.806896) +COMMENT #326=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.25058 8.71165 0 -10 1.17389 1.04901 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.62309 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 10.737 6.96932 0 -10 1.49858 1.04901 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.65056 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #234# 16777215 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 8.37412 10.454 0 -10 1.49858 1.04901 #331#)) +COMMENT (CObjectList)) +COMMENT #333=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.70664 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel (CWidget 0 (0 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 9.9712 13.9386 0 -10 5.86945 1.04901 +COMMENT #334#) +COMMENT #336=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #242# 21320440 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.38159 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #234# 26693424 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 11.494 -13.9386 0 -10 2.7474 1.04901 #336#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #338=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1923 100) +COMMENT (CObjectList +COMMENT #339=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1643 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #241# 680 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.38503 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 3735968 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (777)" "@N (@S)" 5 12.5073 +COMMENT -10.454 0 -10 5.12016 0.924127 #340#)) +COMMENT (CObjectList)) +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -1786 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #241# 27832272 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.43163 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 27090452 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (1610)" "@N (@S)" 5 14.6967 +COMMENT -17.4233 0 -10 4.34589 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -670 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #241# 33030285 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.87131 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3847)" "@N (@S)" 5 -13.9906 +COMMENT -5.22699 0 -10 4.79547 0.924127 #346#)) +COMMENT (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #241# 28196964 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.39762 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (766)" "@N (@S)" 5 11.656 +COMMENT -8.71165 0 -10 3.94627 0.924127 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1367 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.74427 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (3958)" "@N (@S)" 5 -14.3301 +COMMENT -1.74233 0 -10 4.94533 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1088 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #241# 28203492 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.58418 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 3736312 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.2343 +COMMENT 1.74233 0 -10 4.67059 0.924127 #355#)) +COMMENT (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -1088 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.71236 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 28154400 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 9.51937 15.681 +COMMENT 0 -10 4.19603 0.924127 #358#)) (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -879 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.505884 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 28188296 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (5040)" "@N (@S)" 5 -9.01087 +COMMENT 13.9386 0 -10 4.67059 0.924127 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -809 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.15433 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 16777215 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2726)" "@N (@S)" 5 3.49096 +COMMENT -20.908 0 -10 4.67059 0.924127 #364#) +COMMENT #366=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.679853 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel (CWidget 0 (0 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (4888)" "@N (@S)" 5 -10.46 10.454 +COMMENT 0 -10 4.67059 0.924127 #366#)) (CObjectList)) +COMMENT #368=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil -879 100) +COMMENT (CObjectList +COMMENT #369=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #241# 27947324 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.79363 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel (CWidget 0 (0 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 8.94369 +COMMENT 20.908 0 -10 4.34589 0.924127 #369#) +COMMENT #371=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #241# 14 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.66168 1.9 +COMMENT 0.082322 1) +COMMENT #372=(CLabel (CWidget 0 (0 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (1409)" "@N (@S)" 5 15.3051 +COMMENT -15.681 0 -10 4.79547 0.924127 #371#)) +COMMENT (CObjectList)) +COMMENT #373=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -321 100) +COMMENT (CObjectList +COMMENT #374=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.8932 1.9 0.082322 +COMMENT 1) +COMMENT #375=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 42598626 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 8.12092 +COMMENT 24.3926 0 -10 4.79547 0.924127 #374#) +COMMENT #376=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.77302 1.9 +COMMENT 0.082322 1) +COMMENT #377=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 9.36843 +COMMENT 19.1656 0 -10 4.79547 0.924127 #376#) +COMMENT #378=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #241# 28207908 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.818341 1.9 +COMMENT 0.082322 1) +COMMENT #379=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4767)" "@N (@S)" 5 -12.6536 +COMMENT 6.96932 0 -10 5.34495 0.924127 #378#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #380=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -182 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #381=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -112 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 0 0 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4080..4718 + /vntifkey="33" + /label=ColE1 + terminator 3852..3956 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4777..4882) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4908..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 4994..5015 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev\(Sequencing\Primer) + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 656..781 + /vntifkey="21" + /label=Core\Riboswitch + mutation 780..780 + /vntifkey="62" + /label=orig\T + misc_feature 778..778 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 656..730 + /vntifkey="21" + /label=TPP\Aptamer + misc_feature 609..635 + /vntifkey="21" + /label=Theo28\Aptamer + primer complement(618..635) + /vntifkey="27" + /label=Theo28r + misc_feature 636..655 + /vntifkey="21" + /label=N20\Linker + CDS 759..3845 + /vntifkey="4" + /label=lacZ +BASE COUNT 1297 a 1446 c 1474 g 1264 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattctga taccagccga aaggcccttg gcagcgggaa tattggaagc tcgaagactc + 661 ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc acctgatctg gataatgcca + 721 gcgtagggaa gctattacaa gaagatcagg agcaaactat gcaagtcgac ctgctggatc + 781 cactgcatat agatcccgtc gttttacaac gtcgtgactg ggaaaaccct ggcgttaccc + 841 aacttaatcg ccttgcagca catccccctt tcgccagctg gcgtaatagc gaagaggccc + 901 gcaccgatcg cccttcccaa cagttgcgca gcctgaatgg cgaatggcgc tttgcctggt + 961 ttccggcacc agaagcggtg ccggaaagct ggctggagtg cgatcttcct gaggccgata + 1021 ctgtcgtcgt cccctcaaac tggcagatgc acggttacga tgcgcccatc tacaccaacg + 1081 tgacctatcc cattacggtc aatccgccgt ttgttcccac ggagaatccg acgggttgtt + 1141 actcgctcac atttaatgtt gatgaaagct ggctacagga aggccagacg cgaattattt + 1201 ttgatggcgt taactcggcg tttcatctgt ggtgcaacgg gcgctgggtc ggttacggcc + 1261 aggacagtcg tttgccgtct gaatttgacc tgagcgcatt tttacgcgcc ggagaaaacc + 1321 gcctcgcggt gatggtgctg cgttggagtg acggcagtta tctggaagat caggatatgt + 1381 ggcggatgag cggcattttc cgtgacgtct cgttgctgca taaaccgact acacaaatca + 1441 gcgatttcca tgttgccact cgctttaatg atgatttcag ccgcgctgta ctggaggctg + 1501 aagttcagat gtgcggcgag ttgcgtgact acctacgggt aacagtttct ttatggcagg + 1561 gtgaaacgca ggtcgccagc ggcaccgcgc ctttcggcgg tgaaattatc gatgagcgtg + 1621 gtggttatgc cgatcgcgtc acactacgtc tgaacgtcga aaacccgaaa ctgtggagcg + 1681 ccgaaatccc gaatctctat cgtgcggtgg ttgaactgca caccgccgac ggcacgctga + 1741 ttgaagcaga agcctgcgat gtcggtttcc gcgaggtgcg gattgaaaat ggtctgctgc + 1801 tgctgaacgg caagccgttg ctgattcgag gcgttaaccg tcacgagcat catcctctgc + 1861 atggtcaggt catggatgag cagacgatgg tgcaggatat cctgctgatg aagcagaaca + 1921 actttaacgc cgtgcgctgt tcgcattatc cgaaccatcc gctgtggtac acgctgtgcg + 1981 accgctacgg cctgtatgtg gtggatgaag ccaatattga aacccacggc atggtgccaa + 2041 tgaatcgtct gaccgatgat ccgcgctggc taccggcgat gagcgaacgc gtaacgcgaa + 2101 tggtgcagcg cgatcgtaat cacccgagtg tgatcatctg gtcgctgggg aatgaatcag + 2161 gccacggcgc taatcacgac gcgctgtatc gctggatcaa atctgtcgat ccttcccgcc + 2221 cggtgcagta tgaaggcggc ggagccgaca ccacggccac cgatattatt tgcccgatgt + 2281 acgcgcgcgt ggatgaagac cagcccttcc cggctgtgcc gaaatggtcc atcaaaaaat + 2341 ggctttcgct acctggagag acgcgcccgc tgatcctttg cgaatacgcc cacgcgatgg + 2401 gtaacagtct tggcggtttc gctaaatact ggcaggcgtt tcgtcagtat ccccgtttac + 2461 agggcggctt cgtctgggac tgggtggatc agtcgctgat taaatatgat gaaaacggca + 2521 acccgtggtc ggcttacggc ggtgattttg gcgatacgcc gaacgatcgc cagttctgta + 2581 tgaacggtct ggtctttgcc gaccgcacgc cgcatccagc gctgacggaa gcaaaacacc + 2641 agcagcagtt tttccagttc cgtttatccg ggcaaaccat cgaagtgacc agcgaatacc + 2701 tgttccgtca tagcgataac gagctcctgc actggatggt ggcgctggat ggtaagccgc + 2761 tggcaagcgg tgaagtgcct ctggatgtcg ctccacaagg taaacagttg attgaactgc + 2821 ctgaactacc gcagccggag agcgccgggc aactctggct cacagtacgc gtagtgcaac + 2881 cgaacgcgac cgcatggtca gaagccgggc acatcagcgc ctggcagcag tggcgtctgg + 2941 cggaaaacct cagtgtgacg ctccccgccg cgtcccacgc catcccgcat ctgaccacca + 3001 gcgaaatgga tttttgcatc gagctgggta ataagcgttg gcaatttaac cgccagtcag + 3061 gctttctttc acagatgtgg attggcgata aaaaacaact gctgacgccg ctgcgcgatc + 3121 agttcacccg tgcaccgctg gataacgaca ttggcgtaag tgaagcgacc cgcattgacc + 3181 ctaacgcctg ggtcgaacgc tggaaggcgg cgggccatta ccaggccgaa gcagcgttgt + 3241 tgcagtgcac ggcagataca cttgctgatg cggtgctgat tacgaccgct cacgcgtggc + 3301 agcatcaggg gaaaacctta tttatcagcc ggaaaaccta ccggattgat ggtagtggtc + 3361 aaatggcgat taccgttgat gttgaagtgg cgagcgatac accgcatccg gcgcggattg + 3421 gcctgaactg ccagctggcg caggtagcag agcgggtaaa ctggctcgga ttagggccgc + 3481 aagaaaacta tcccgaccgc cttactgccg cctgttttga ccgctgggat ctgccattgt + 3541 cagacatgta taccccgtac gtcttcccga gcgaaaacgg tctgcgctgc gggacgcgcg + 3601 aattgaatta tggcccacac cagtggcgcg gcgacttcca gttcaacatc agccgctaca + 3661 gtcaacagca actgatggaa accagccatc gccatctgct gcacgcggaa gaaggcacat + 3721 ggctgaatat cgacggtttc catatgggga ttggtggcga cgactcctgg agcccgtcag + 3781 tatcggcgga atttcagctg agcgccggtc gctaccatta ccagttggtc tggtgtcaaa + 3841 aataatctag aggcatcaaa taaaacgaaa ggctcagtcg aaagactggg cctttcgttt + 3901 tatctgttgt ttgtcggtga acgctctcct gagtaggaca aatccgccgc cctagaccta + 3961 ggcgttcggc tgcggcgagc ggtatcagct cactcaaagg cggtaatacg gttatccaca + 4021 gaatcagggg ataacgcagg aaagaacatg tgagcaaaag gccagcaaaa ggccaggaac + 4081 cgtaaaaagg ccgcgttgct ggcgtttttc cataggctcc gcccccctga cgagcatcac + 4141 aaaaatcgac gctcaagtca gaggtggcga aacccgacag gactataaag ataccaggcg + 4201 tttccccctg gaagctccct cgtgcgctct cctgttccga ccctgccgct taccggatac + 4261 ctgtccgcct ttctcccttc gggaagcgtg gcgctttctc aatgctcacg ctgtaggtat + 4321 ctcagttcgg tgtaggtcgt tcgctccaag ctgggctgtg tgcacgaacc ccccgttcag + 4381 cccgaccgct gcgccttatc cggtaactat cgtcttgagt ccaacccggt aagacacgac + 4441 ttatcgccac tggcagcagc cactggtaac aggattagca gagcgaggta tgtaggcggt + 4501 gctacagagt tcttgaagtg gtggcctaac tacggctaca ctagaaggac agtatttggt + 4561 atctgcgctc tgctgaagcc agttaccttc ggaaaaagag ttggtagctc ttgatccggc + 4621 aaacaaacca ccgctggtag cggtggtttt tttgtttgca agcagcagat tacgcgcaga + 4681 aaaaaaggat ctcaagaaga tcctttgatc ttttctacgg ggtctgacgc tcagtggaac + 4741 gaaaactcac gttaagggat tttggtcatg actagtgctt ggattctcac caataaaaaa + 4801 cgcccggcgg caaccgagcg ttctgaacaa atccagatgg agttctgagg tcattactgg + 4861 atctatcaac aggagtccaa gcgagctcaa acttggtctg acagttacca atgcttaatc + 4921 agtgaggcac ctatctcagc gatctgtcta tttcgttcat ccatagttgc ctgactcccc + 4981 gtcgtgtaga taactacgat acgggagggc ttaccatctg gccccagtgc tgcaatgata + 5041 ccgcgagacc cacgctcacc ggctccagat ttatcagcaa taaaccagcc agccggaagg + 5101 gccgagcgca gaagtggtcc tgcaacttta tccgcctcca tccagtctat taattgttgc + 5161 cgggaagcta gagtaagtag ttcgccagtt aatagtttgc gcaacgttgt tgccattgct + 5221 acaggcatcg tggtgtcacg ctcgtcgttt ggtatggctt cattcagctc cggttcccaa + 5281 cgatcaaggc gagttacatg atcccccatg ttgtgcaaaa aagcggttag ctccttcggt + 5341 cctccgatcg ttgtcagaag taagttggcc gcagtgttat cactcatggt tatggcagca + 5401 ctgcataatt ctcttactgt catgccatcc gtaagatgct tttctgtgac tggtgagtac + 5461 tcaaccaagt cattctgaga a +// diff --git a/lib/VNTI files/pLacTheo28-N20-thiMtetA-N30.gb b/lib/VNTI files/pLacTheo28-N20-thiMtetA-N30.gb new file mode 100644 index 00000000..7d3e7e53 --- /dev/null +++ b/lib/VNTI files/pLacTheo28-N20-thiMtetA-N30.gb @@ -0,0 +1,1613 @@ +LOCUS pLacTheo28-N20-t 3606 bp DNA circular 17-SEP-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.informaxinc.com/ + +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|457702003| +COMMENT VNTDBDATE|457702995| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacTheo28-N20-thiMtetA-N30| +COMMENT VNTAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacTheo28-N20-thiMtetA-N30" 0 3606 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "(0,{1,2})" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3606 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 777 0 1070 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1972 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 3013 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 766 0 1346 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2083 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2486 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2172 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 928 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 924 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3474 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3165 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1184 0 2892 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 661 0 1425 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2205 2843 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2165..2803") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1977 2081 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1937..2041") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2902 3007 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2862..2967)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3033 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2993..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3119 3140 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3079..3100") +COMMENT #35=(CFSignal (CObList) "pbla-rev (Sequencing Primer)" 28 0 0 326 345 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "Core Riboswitch" 21 0 0 656 781 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "616..741") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 780 780 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "740..740") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 778 778 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "738..738") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #46=(CFSignal (CObList) "TPP Aptamer" 21 0 0 656 730 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "616..690") +COMMENT #47=(CFSignal (CObList) "tetA*" 4 0 0 759 1970 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "719..1930") +COMMENT #48=(CFSignal (CObList) "Theo28 Aptamer" 21 0 0 609 635 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #49=(CFSignal (CObList) "Theo28r" 27 0 1 618 635 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #50=(CFSignal (CObList) "N20 Linker" 21 0 0 636 655 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #51=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #52=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacTheo28-N20-thiMtetA-N30" 2) 5 "" 0 4) +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacTheo28-N20-thiMtetA-N30'" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 09/17/07 11:26AM" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 09/17/07 11:43AM" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3606 bp" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 23-JUL-2007" 1))) +COMMENT "Standard Fields") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #66=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #70=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 759 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 759 End: 1970" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 719..1930" 1))) "tetA*") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3033 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3033 End: 284 (Complementary)" +COMMENT 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2993..284)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #79=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 609 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 609 End: 635 " 1))) +COMMENT "Theo28 Aptamer") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 636 (3 #50# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 636 End: 655 " 1))) +COMMENT "N20 Linker") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 656 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 656 End: 781 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 616..741" 1))) "Core Riboswitch") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 656 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 656 End: 730 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 616..690" 1))) "TPP Aptamer") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 778 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 778 End: 778 " 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 738..738" 1))) "orig G") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3119 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3119 End: 3140" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3079..3100" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (7 total)") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 618 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 618 End: 635 (Complementary)" +COMMENT 1))) "Theo28r"))) "Primer (2 total)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) +COMMENT "pbla-rev (Sequencing Primer)") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #129=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #133=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #134=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2205 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2205 End: 2843" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2165..2803" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1977 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1977 End: 2081" 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1937..2041" 1))) "T1") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2902 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2902 End: 3007 (Complementary)" +COMMENT 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2862..2967)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #154=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #159=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #164=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #165=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #170=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 780 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 780 End: 780 " 1) +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 740..740" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #174=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26973192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #176=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20470744 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2172 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20471864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26974712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2486 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26973112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2083 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26974312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 777 " 1) +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1070 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20456696 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #196=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 661 " 1) +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 1425 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26975112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20456776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20471464 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #201=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 928 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20473472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3165 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20473632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26965712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26975272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26986568 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #212=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26986728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #213=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20471544 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #214=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #215=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 924 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #216=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26975192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20473392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #218=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #219=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3474 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #220=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26986488 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #221=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #222=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 3013 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #223=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26973272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #224=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #225=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 766 " 1) +COMMENT #226=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1346 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #227=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20473552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #228=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26974632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #229=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26986648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #230=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #231=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1972 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #232=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20471784 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #233=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #234=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #235=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20470664 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #236=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #237=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #238=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #239=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #240=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #241=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #242=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #243=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #244=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #245=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #246=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #247=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #248=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #249=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #250=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #251=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #252=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #253=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #254=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #255=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #256=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #257=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #258=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #259=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #260=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #261=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #262=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #263=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #264=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #265=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #266=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #267=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #268=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #269=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #270=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #271=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #272=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #273=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #274=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #275=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74059 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -13) 1 1 0 1 1 +COMMENT (mapper: 18.0184 -24.9369 40.0378 40.0378 0.01 10 -1 3606 3606 1 0 0) +COMMENT #276=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1156 100) +COMMENT (CObjectList +COMMENT #277=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -992 100) +COMMENT (CObjectList +COMMENT #278=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 28433220 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27592 6.27392 1 0.0214037) 0.173965) +COMMENT #279=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #239# 26947924 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74059 0.833333 0 "pLacTheo28-N20-thiMtetA-N30" +COMMENT "@N" 1 0 0.870295 0 -10 17.0839 1.44863 Nil) +COMMENT #280=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74059 0.555556 0 "3606 bp" "@L bp" 16 0 -0.870295 +COMMENT 0 -10.8 3.12205 0.949103 Nil)) (CObjectList)) +COMMENT #281=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -599 100) +COMMENT (CObjectList +COMMENT #282=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #283=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.77912 0.99856 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #284=(CLabel (CWidget 0 (0 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "AmpR" "@N" 1 +COMMENT -5.00143 12.1841 0 -10 2.67247 1.12394 #283#) +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.84607 4.95453 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28243020 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "tetA*" "@N" 1 +COMMENT 10.4721 -29.59 0 -10 2.2229 1.12394 #285#)) +COMMENT (CObjectList)) +COMMENT #287=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #288=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.84895 1.9 +COMMENT 0.082322 1) +COMMENT #289=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.1869 8.70295 0 -10 3.79641 1.12394 +COMMENT #288#) +COMMENT #290=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.26419 1.9 +COMMENT 0.082322 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28436140 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "+1" "@N" 1 +COMMENT 12.5066 0 0 -10 1.17389 1.12394 #290#) +COMMENT #292=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.91452 +COMMENT 5.13371 1 0.082322) 0.8 1.8 0) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26540132 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 +COMMENT "Core Riboswitch" "@N" 1 15.6735 -13.9247 0 +COMMENT -10 7.41799 1.12394 #292#) +COMMENT #294=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.92148 1.9 +COMMENT 0.082322 1) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670656 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "orig G" "@N" 1 +COMMENT 14.1185 -19.1465 0 -10 2.84731 1.12394 #294#) +COMMENT #296=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.00324 +COMMENT 5.13371 1 0.082322) 0.8 1.8 0) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 20452740 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "TPP Aptamer" +COMMENT "@N" 1 14.7049 -12.1841 0 -10 5.84448 1.12394 +COMMENT #296#) +COMMENT #298=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.21548 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26352684 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "Theo28 Aptamer" +COMMENT "@N" 1 14.3706 -5.22177 0 -10 7.29311 1.12394 +COMMENT #298#) +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #50# 0) 1 2 0 0 #245# 29114756 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.16851 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28280976 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "N20 Linker" +COMMENT "@N" 1 13.4717 -8.70295 0 -10 4.84542 1.12394 +COMMENT #300#)) (CObjectList)) +COMMENT #302=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #303=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.37552 1.9 +COMMENT 0.082322 1) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26991656 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "PlacF" "@N" 1 +COMMENT 11.2717 6.96236 0 -10 2.54759 1.12394 #303#) +COMMENT #305=(CScratch +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.19982 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26959916 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "Theo28r" "@N" 1 +COMMENT 12.6571 -6.96236 0 -10 3.79641 1.12394 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #258# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.45033 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel (CWidget 0 (0 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "BLI06" "@N" 1 +COMMENT 10.9595 13.9247 0 -10 2.59755 1.12394 #308#) +COMMENT #310=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #258# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.03659 1.9 +COMMENT 0.082322 1) +COMMENT #311=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 393233 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.77788 22.6277 0 -10 3.72148 1.12394 #310#) +COMMENT #312=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #258# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.7078 1.9 0.082322 +COMMENT 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26713268 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 +COMMENT "pbla-rev (Sequencing Primer)" "@N" 1 13.5764 +COMMENT 19.1465 0 -10 13.1626 1.12394 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -922 100) +COMMENT (CObjectList +COMMENT #315=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #253# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.6069 5.77912 1 0.082322) 0.8 1.8 1) +COMMENT #316=(CLabel (CWidget 0 (0 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.92914 17.4059 0 -10 2.67247 1.12394 #315#) +COMMENT #317=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #253# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.22765 5.40858 1 0.082322) 0.8 1.8 0) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670600 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.7394 3.48118 0 -10 2.59755 1.12394 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1226 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.26419 1.9 0.082322 +COMMENT 1) +COMMENT #321=(CLabel (CWidget 0 (0 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "lacO" "@N" 1 +COMMENT 12.8397 -1.74059 0 -10 2.09802 1.12394 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -599 100) +COMMENT (CObjectList +COMMENT #323=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.32735 2.43899 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28088196 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.8091 -3.48118 0 -10 2.72243 1.12394 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -2271 100) +COMMENT (CObjectList +COMMENT #326=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #245# 720906 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 2.65297 2.83563) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28306028 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "T1" "@N" 1 +COMMENT -7.05699 -10.4435 0 -10 1.22384 1.12394 #326#) +COMMENT #328=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #245# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.04205 1.22645) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28303004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "T0" "@N" 1 +COMMENT -11.6174 5.22177 0 -10 1.22384 1.12394 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -459 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.28506 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28445884 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "-10" "@N" 1 +COMMENT 12.5351 1.74059 0 -10 1.42365 1.12394 #331#)) +COMMENT (CObjectList)) +COMMENT #333=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1923 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.32681 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670472 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "-35" "@N" 1 +COMMENT 11.6465 5.22177 0 -10 1.42365 1.12394 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -529 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.41206 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel (CWidget 0 (0 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "AG insertion" +COMMENT "@N" 1 12.2305 8.70295 0 -10 5.59471 1.12394 +COMMENT #337#) +COMMENT #339=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.918 1.9 0.082322 +COMMENT 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670616 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74059 0.666667 0 "orig T" "@N" 1 +COMMENT 14.0933 -20.8871 0 -10 2.72243 1.12394 #339#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #341=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1993 100) +COMMENT (CObjectList +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 28243244 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.84433 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 393219 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 128 +COMMENT "{\\i Xba}I (1972)" "@N (@S)" 5 -6.42243 +COMMENT -12.1841 0 -10 4.47078 0.949103 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil 20452964 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.03335 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 3670736 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 128 +COMMENT "{\\i Sac}I (3013)" "@N (@S)" 5 -12.7029 +COMMENT 6.96236 0 -10 4.34589 0.949103 #346#)) +COMMENT (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.54427 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 1031 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.1026 +COMMENT 15.6653 0 -10 4.12111 0.949103 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.65123 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 3670752 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 128 +COMMENT "{\\i Avr}II (2083)" "@N (@S)" 5 -11.0513 +COMMENT -8.70295 0 -10 4.67059 0.949103 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1435 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.22591 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 26354580 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.7838 +COMMENT -3.48118 0 -10 4.49575 0.949103 #355#)) +COMMENT (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 3670472 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.4964 1.9 0.082322 +COMMENT 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 3670776 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 128 +COMMENT "{\\i Afl}III (2172)" "@N (@S)" 5 -12.316 +COMMENT -6.96236 0 -10 4.5457 0.949103 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 26960140 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.66053 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 3670776 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 128 +COMMENT "{\\i Bmt}I (928)" "@N (@S)" 5 15.1683 +COMMENT -24.3683 0 -10 4.12111 0.949103 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 3670480 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.66749 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 3670776 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 128 +COMMENT "{\\i Nhe}I (924)" "@N (@S)" 5 15.0967 +COMMENT -22.6277 0 -10 4.04618 0.949103 #364#)) +COMMENT (CObjectList)) +COMMENT #366=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3670480 100) +COMMENT (CObjectList +COMMENT #367=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42076 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 26361996 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 11.6832 +COMMENT 10.4435 0 -10 3.97125 0.949103 #367#)) +COMMENT (CObjectList)) +COMMENT #369=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 3670480 100) +COMMENT (CObjectList +COMMENT #370=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.231374 1.9 +COMMENT 0.082322 1) +COMMENT #371=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 268634520 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 128 +COMMENT "{\\i Pvu}I (3474)" "@N (@S)" 5 -5.77666 +COMMENT 13.9247 0 -10 4.49575 0.949103 #370#)) +COMMENT (CObjectList)) +COMMENT #372=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3670480 100) +COMMENT (CObjectList +COMMENT #373=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.768926 1.9 +COMMENT 0.082322 1) +COMMENT #374=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #246# 3725404 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 128 +COMMENT "{\\i Bsa}I (3165)" "@N (@S)" 5 -11.064 +COMMENT 10.4435 0 -10 4.37087 0.949103 #373#)) +COMMENT (CObjectList)) +COMMENT #375=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -2132 100) +COMMENT (CObjectList +COMMENT #376=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.92322 1.9 +COMMENT 0.082322 1) +COMMENT #377=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 3670712 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 0 +COMMENT "{\\i Bam}HI (777)" "@N (@S)" 5 15.1239 +COMMENT -17.4059 0 -10 4.92035 0.949103 #376#) +COMMENT #378=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.4135 1.9 0.082322 +COMMENT 1) +COMMENT #379=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 20481700 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 0 +COMMENT "{\\i Bam}HI (1070)" "@N (@S)" 5 15.254 +COMMENT -26.1089 0 -10 5.34495 0.949103 #378#)) +COMMENT (CObjectList)) +COMMENT #380=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #381=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.94235 1.9 +COMMENT 0.082322 1) +COMMENT #382=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 3670736 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 0 +COMMENT "{\\i Sal}I (766)" "@N (@S)" 5 14.4365 +COMMENT -15.6653 0 -10 3.74646 0.949103 #381#) +COMMENT #383=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.93335 1.9 +COMMENT 0.082322 1) +COMMENT #384=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26562620 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 0 +COMMENT "{\\i Sal}I (1346)" "@N (@S)" 5 11.7094 +COMMENT -27.8494 0 -10 4.17106 0.949103 #383#)) +COMMENT (CObjectList)) +COMMENT #385=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 3670472 100) +COMMENT (CObjectList +COMMENT #386=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.98788 1.9 +COMMENT 0.082322 1) +COMMENT #387=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26485992 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.78633 +COMMENT 20.8871 0 -10 4.34589 0.949103 #386#) +COMMENT #388=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.95015 1.9 +COMMENT 0.082322 1) +COMMENT #389=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 3670768 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 0 +COMMENT "{\\i Apa}LI (2486)" "@N (@S)" 5 -13.7776 +COMMENT -5.22177 0 -10 4.9703 0.949103 #388#)) +COMMENT (CObjectList)) +COMMENT #390=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil 3670480 100) +COMMENT (CObjectList +COMMENT #391=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.44685 1.9 +COMMENT 0.082322 1) +COMMENT #392=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 1114134 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 11.5593 +COMMENT 12.1841 0 -10 3.99622 0.949103 #391#) +COMMENT #393=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.12501 1.9 +COMMENT 0.082322 1) +COMMENT #394=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 3670808 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 0 +COMMENT "{\\i Bbs}I (661)" "@N (@S)" 5 13.4895 +COMMENT -10.4435 0 -10 3.92129 0.949103 #393#) +COMMENT #395=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.79592 1.9 +COMMENT 0.082322 1) +COMMENT #396=(CLabel (CWidget 0 (0 0) 1 2 0 0 #236# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74059 0.555556 0 +COMMENT "{\\i Bbs}I (1425)" "@N (@S)" 5 10.5849 +COMMENT -31.3306 0 -10 4.37087 0.949103 #395#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #397=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3670480 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #398=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 1970431100 +COMMENT (CStringList) 1919973477 1769173861 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2205..2843 + /vntifkey="33" + /label=ColE1 + terminator 1977..2081 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2902..3007) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3033..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3119..3140 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev\(Sequencing\Primer) + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 656..781 + /vntifkey="21" + /label=Core\Riboswitch + mutation 780..780 + /vntifkey="62" + /label=orig\T + misc_feature 778..778 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 656..730 + /vntifkey="21" + /label=TPP\Aptamer + CDS 759..1970 + /vntifkey="4" + /label=tetA* + misc_feature 609..635 + /vntifkey="21" + /label=Theo28\Aptamer + primer complement(618..635) + /vntifkey="27" + /label=Theo28r + misc_feature 636..655 + /vntifkey="21" + /label=N20\Linker +BASE COUNT 812 a 988 c 941 g 865 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattctga taccagccga aaggcccttg gcagcgggaa tattggaagc tcgaagactc + 661 ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc acctgatctg gataatgcca + 721 gcgtagggaa gctattacaa gaagatcagg agcaaactat gcaagtcgac ctgctggatc + 781 caaaatctaa caatgcgctc atcgtcatcc tcggcaccgt caccctggat gctgtaggca + 841 taggcttggt tatgccggta ctgccgggcc tcttgcggga tatcgtccat tccgacagca + 901 tcgccagtca ctatggcgtg ctgctagcgc tatatgcgtt gatgcaattt ctatgcgcac + 961 ccgttctcgg agcactgtcc gaccgctttg gccgccgccc agtcctgctc gcttcgctac + 1021 ttggagccac tatcgactac gcgatcatgg cgaccacacc cgtcctgtgg atcctctacg + 1081 ccggacgcat cgtggccggc atcaccggcg ccacaggtgc ggttgctggc gcctatatcg + 1141 ccgacatcac cgatggggaa gatcgggctc gccacttcgg gctcatgagc gcttgtttcg + 1201 gcgtgggtat ggtggcaggc cccgtggccg ggggactgtt gggcgccatc tccttgcatg + 1261 caccattcct tgcggcggcg gtgctcaacg gcctcaacct actactgggc tgcttcctaa + 1321 tgcaggagtc gcataaggga gagcgtcgac cgatgccctt gagagccttc aacccagtca + 1381 gctccttccg gtgggcgcgg ggcatgacta tcgtcgccgc acttatgact gtcttcttta + 1441 tcatgcaact cgtaggacag gtgccggcag cgctctgggt cattttcggc gaggaccgct + 1501 ttcgctggag cgcgacgatg atcggcctgt cgcttgcggt attcggaatc ttgcacgccc + 1561 tcgctcaagc cttcgtcact ggtcccgcca ccaaacgttt cggcgagaag caggccatta + 1621 tcgccggcat ggcggccgac gcgctgggct acgtcttgct ggcgttcgcg acgcgaggct + 1681 ggatggcctt ccccattatg attcttctcg cttccggcgg catcgggatg cccgcgttgc + 1741 aggccatgct gtccaggcag gtagatgacg accatcaggg acagcttcaa ggatcgctcg + 1801 cggctcttac cagcctaact tcgatcactg gaccgctgat cgtcacggcg atttatgccg + 1861 cctcggcgag cacatggaac gggttggcat ggattgtagg cgccgcccta taccttgtct + 1921 gcctccccgc gttgcgtcgc ggtgcatgga gccgggccac ctcgacctaa tctagaggca + 1981 tcaaataaaa cgaaaggctc agtcgaaaga ctgggccttt cgttttatct gttgtttgtc + 2041 ggtgaacgct ctcctgagta ggacaaatcc gccgccctag acctaggcgt tcggctgcgg + 2101 cgagcggtat cagctcactc aaaggcggta atacggttat ccacagaatc aggggataac + 2161 gcaggaaaga acatgtgagc aaaaggccag caaaaggcca ggaaccgtaa aaaggccgcg + 2221 ttgctggcgt ttttccatag gctccgcccc cctgacgagc atcacaaaaa tcgacgctca + 2281 agtcagaggt ggcgaaaccc gacaggacta taaagatacc aggcgtttcc ccctggaagc + 2341 tccctcgtgc gctctcctgt tccgaccctg ccgcttaccg gatacctgtc cgcctttctc + 2401 ccttcgggaa gcgtggcgct ttctcaatgc tcacgctgta ggtatctcag ttcggtgtag + 2461 gtcgttcgct ccaagctggg ctgtgtgcac gaaccccccg ttcagcccga ccgctgcgcc + 2521 ttatccggta actatcgtct tgagtccaac ccggtaagac acgacttatc gccactggca + 2581 gcagccactg gtaacaggat tagcagagcg aggtatgtag gcggtgctac agagttcttg + 2641 aagtggtggc ctaactacgg ctacactaga aggacagtat ttggtatctg cgctctgctg + 2701 aagccagtta ccttcggaaa aagagttggt agctcttgat ccggcaaaca aaccaccgct + 2761 ggtagcggtg gtttttttgt ttgcaagcag cagattacgc gcagaaaaaa aggatctcaa + 2821 gaagatcctt tgatcttttc tacggggtct gacgctcagt ggaacgaaaa ctcacgttaa + 2881 gggattttgg tcatgactag tgcttggatt ctcaccaata aaaaacgccc ggcggcaacc + 2941 gagcgttctg aacaaatcca gatggagttc tgaggtcatt actggatcta tcaacaggag + 3001 tccaagcgag ctcaaacttg gtctgacagt taccaatgct taatcagtga ggcacctatc + 3061 tcagcgatct gtctatttcg ttcatccata gttgcctgac tccccgtcgt gtagataact + 3121 acgatacggg agggcttacc atctggcccc agtgctgcaa tgataccgcg agacccacgc + 3181 tcaccggctc cagatttatc agcaataaac cagccagccg gaagggccga gcgcagaagt + 3241 ggtcctgcaa ctttatccgc ctccatccag tctattaatt gttgccggga agctagagta + 3301 agtagttcgc cagttaatag tttgcgcaac gttgttgcca ttgctacagg catcgtggtg + 3361 tcacgctcgt cgtttggtat ggcttcattc agctccggtt cccaacgatc aaggcgagtt + 3421 acatgatccc ccatgttgtg caaaaaagcg gttagctcct tcggtcctcc gatcgttgtc + 3481 agaagtaagt tggccgcagt gttatcactc atggttatgg cagcactgca taattctctt + 3541 actgtcatgc catccgtaag atgcttttct gtgactggtg agtactcaac caagtcattc + 3601 tgagaa +// diff --git a/lib/VNTI files/pLacTheo28thiMtetA.gb b/lib/VNTI files/pLacTheo28thiMtetA.gb new file mode 100644 index 00000000..7a098b34 --- /dev/null +++ b/lib/VNTI files/pLacTheo28thiMtetA.gb @@ -0,0 +1,1553 @@ +LOCUS pLacTheo28thiMte 3621 bp DNA circular 3-OCT-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.informaxinc.com/ +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|459275793| +COMMENT VNTDBDATE|459275793| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacTheo28thiMtetA| +COMMENT VNTAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacTheo28thiMtetA" 0 3621 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3621 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 792 0 1085 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1987 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 3028 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 781 0 1361 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2098 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2501 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2187 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 943 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 939 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3489 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3180 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1199 0 2907 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1440 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2220 2858 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2187..2825") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1992 2096 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1959..2063") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2917 3022 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2884..2989)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3048 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3015..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3134 3155 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3101..3122") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 649 796 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "616..763") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 795 795 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "762..762") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 793 793 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "760..760") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #46=(CFSignal (CObList) "TPP aptamer" 21 0 0 649 726 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "616..693") +COMMENT #47=(CFSignal (CObList) "tetA*" 4 0 0 774 1985 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "741..1952") +COMMENT #48=(CFSignal (CObList) "Theo28 Aptamer" 21 0 0 608 640 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #49=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #50=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacTheo28thiMtetA" 2) 5 "" 0 4) +COMMENT #51=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacTheo28thiMtetA'" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 10/03/07 04:36PM" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 10/03/07 04:36PM" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3621 bp" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 5-JUN-2007" 1))) +COMMENT "Standard Fields") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #64=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 774 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 774 End: 1985" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 741..1952" 1))) "tetA*") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3048 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3048 End: 284 (Complementary)" +COMMENT 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3015..284)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 608 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 608 End: 640 " 1))) +COMMENT "Theo28 Aptamer") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 649 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 649 End: 796 " 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 616..763" 1))) "core riboswitch") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 649 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 649 End: 726 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 616..693" 1))) "TPP aptamer") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 793 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 793 End: 793 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 760..760" 1))) "orig G") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3134 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3134 End: 3155" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3101..3122" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (6 total)") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #118=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #119=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #128=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2220 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2220 End: 2858" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2187..2825" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #137=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #138=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1992 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1992 End: 2096" 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1959..2063" 1))) "T1") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2917 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2917 End: 3022 (Complementary)" +COMMENT 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2884..2989)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #148=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #153=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #154=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #158=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #159=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #164=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 795 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 795 End: 795 " 1) +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 762..762" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #168=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20741544 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21050168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #173=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2187 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21049528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20722992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #177=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2501 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #180=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20741144 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #181=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #182=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2098 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20722672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #184=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 792 " 1) +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1085 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21049448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #188=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1440 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20722832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21049048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21049768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 943 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21049688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3180 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21049368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20723472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20722032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #202=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #203=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20723552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20723632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21049848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #207=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #208=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 939 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20722352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21049608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #211=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3489 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #213=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20723312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #214=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #215=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 3028 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #216=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20741464 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #217=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #218=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 781 " 1) +COMMENT #219=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1361 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #220=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21049288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #221=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20722432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20723152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #223=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #224=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1987 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #225=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21049928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #226=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #227=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #228=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21050008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #229=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #230=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #231=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #232=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #233=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #234=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #235=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #236=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #237=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #238=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #239=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #240=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #241=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #242=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #243=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #244=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #245=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #246=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #247=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #248=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #249=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #250=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #251=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #252=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #253=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #254=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #255=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #256=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #257=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #258=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #259=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #260=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #261=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #262=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #263=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #264=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #265=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #266=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #267=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #268=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 17.9435 -23.2135 40.0378 40.0378 0.01 10 -1 3621 3621 1 0 0) +COMMENT #269=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #270=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -923 100) +COMMENT (CObjectList +COMMENT #271=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #235# 28503012 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27592 6.27392 1 0.0214037) 0.173245) +COMMENT #272=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #232# 3733932 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacTheo28thiMtetA" "@N" 1 0 +COMMENT 0.871165 0 -10 11.2144 1.44863 Nil) +COMMENT #273=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #231# -1230 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3621 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.04712 0.949103 Nil)) (CObjectList)) +COMMENT #274=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -532 100) +COMMENT (CObjectList +COMMENT #275=(CGroupWidget (CWidget 4 (7 4 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #276=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #233# 393233 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.78117 0.994424 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #277=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 1195589972 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.99147 12.1963 0 -10 2.67247 1.12394 #276#) +COMMENT #278=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #233# 27106328 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.83428 4.934 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 26382620 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 10.324 -26.1349 0 -10 2.2229 1.12394 #278#)) +COMMENT (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 393219 100) +COMMENT (CObjectList +COMMENT #281=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #238# 3670424 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 0.845433 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 3670592 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.1615 8.71165 0 -10 3.79641 1.12394 +COMMENT #281#) +COMMENT #283=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #238# 524292 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.26837 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 26460148 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4048 -1.74233 0 -10 1.17389 1.12394 #283#) +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #234# 1036 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.89416 +COMMENT 5.15056 1 0.082322) 0.8 1.8 0) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 28312020 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 15.2334 -10.454 0 +COMMENT -10 6.91846 1.12394 #285#) +COMMENT #287=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.90109 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 26461276 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 14.0451 -15.681 0 -10 2.84731 1.12394 #287#) +COMMENT #289=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 5.01543 5.15056 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 393227 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 14.3041 -8.71165 0 -10 5.79452 1.12394 +COMMENT #289#) +COMMENT #291=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #234# 3670432 +COMMENT 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.16442 +COMMENT 5.22159 1 0.082322) 0.8 1.8 0) +COMMENT #292=(CLabel (CWidget 0 (0 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Theo28 Aptamer" +COMMENT "@N" 1 14.3526 -6.96932 0 -10 7.29311 1.12394 +COMMENT #291#)) (CObjectList)) +COMMENT #293=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 6862024 100) +COMMENT (CObjectList +COMMENT #294=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #238# 268747808 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.37924 1.9 +COMMENT 0.082322 1) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 28372892 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.1677 5.22699 0 -10 2.54759 1.12394 #294#)) +COMMENT (CObjectList)) +COMMENT #296=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil 393219 100) +COMMENT (CObjectList +COMMENT #297=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #251# 3670496 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.45374 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# -253 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 10.8184 12.1963 0 -10 2.59755 1.12394 #297#) +COMMENT #299=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #251# 26922760 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.03757 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel (CWidget 0 (0 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.74502 20.908 0 -10 3.72148 1.12394 #299#) +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #251# 268747808 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.71014 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 20482948 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 9.25612 17.4233 0 -10 3.79641 1.12394 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget (CWidget 30 (7 30 0) 1 2 0 0 Nil 2 100) +COMMENT (CObjectList +COMMENT #304=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #246# 3670520 +COMMENT 100) (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) +COMMENT 0.835356 5.60966 5.78117 1 0.082322) 0.8 1.8 +COMMENT 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 196630 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.83549 15.681 0 -10 2.67247 1.12394 #304#) +COMMENT #306=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.23199 5.41216 1 0.082322) 0.8 1.8 0) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 20482572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.0582 1.74233 0 -10 2.59755 1.12394 #306#)) +COMMENT (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #236# 393233 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1 5.26837 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 28460300 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.522 -3.48466 0 -10 2.09802 1.12394 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1299 100) +COMMENT (CObjectList +COMMENT #312=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.32186 2.42889 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 26551652 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.8094 -3.48466 0 -10 2.72243 1.12394 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -853 100) +COMMENT (CObjectList +COMMENT #315=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #238# 720906 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 2.64198 2.82389) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 1094926663 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -7.03976 -10.454 0 -10 1.22384 1.12394 #315#) +COMMENT #317=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #238# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.03773 1.22137) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 28357608 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -11.5944 5.22699 0 -10 1.22384 1.12394 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #238# 40 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.28916 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 26460900 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.6378 0 0 -10 1.42365 1.12394 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget (CWidget 48 (7 48 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #238# 26307496 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.33073 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 26422460 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.217 3.48466 0 -10 1.42365 1.12394 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #238# 3670520 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.41562 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 26460524 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 12.6623 6.96932 0 -10 5.59471 1.12394 +COMMENT #326#) +COMMENT #328=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #238# 26344516 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 4.89762 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #230# 26461652 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 14.0547 -17.4233 0 -10 2.72243 1.12394 #328#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #330=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #331=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #332=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #237# 27093616 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.83255 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 28505932 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1987)" "@N (@S)" 5 -6.58625 +COMMENT -12.1963 0 -10 4.47078 0.949103 #332#)) +COMMENT (CObjectList)) +COMMENT #334=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.02907 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# -983 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (3028)" "@N (@S)" 5 -12.7489 +COMMENT 6.96932 0 -10 4.42082 0.949103 #335#)) +COMMENT (CObjectList)) +COMMENT #337=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #338=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #237# 393233 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.54729 1.9 +COMMENT 0.082322 1) +COMMENT #339=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3670464 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 10.985 +COMMENT 13.9386 0 -10 4.12111 0.949103 #338#)) +COMMENT (CObjectList)) +COMMENT #340=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList +COMMENT #341=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #237# 3670520 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.64025 1.9 +COMMENT 0.082322 1) +COMMENT #342=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3670896 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2098)" "@N (@S)" 5 -11.0452 +COMMENT -8.71165 0 -10 4.67059 0.949103 #341#)) +COMMENT (CObjectList)) +COMMENT #343=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #344=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #237# 26619644 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.23025 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3734844 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.2131 +COMMENT -5.22699 0 -10 4.49575 0.949103 #344#)) +COMMENT (CObjectList)) +COMMENT #346=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #347=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #237# 26680624 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.48606 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 28786428 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2187)" "@N (@S)" 5 -12.34 +COMMENT -6.96932 0 -10 4.5457 0.949103 #347#)) +COMMENT (CObjectList)) +COMMENT #349=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -923 100) +COMMENT (CObjectList +COMMENT #350=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #237# 393233 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.64122 1.9 +COMMENT 0.082322 1) +COMMENT #351=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26342452 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (943)" "@N (@S)" 5 15.1009 +COMMENT -20.908 0 -10 4.12111 0.949103 #350#)) +COMMENT (CObjectList)) +COMMENT #352=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #353=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #237# 393233 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.64815 1.9 +COMMENT 0.082322 1) +COMMENT #354=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26358412 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (939)" "@N (@S)" 5 15.0272 +COMMENT -19.1656 0 -10 4.04618 0.949103 #353#)) +COMMENT (CObjectList)) +COMMENT #355=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #356=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42429 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26359324 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 11.5116 +COMMENT 8.71165 0 -10 3.97125 0.949103 #356#)) +COMMENT (CObjectList)) +COMMENT #358=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #359=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #237# 27089448 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.230415 1.9 +COMMENT 0.082322 1) +COMMENT #360=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26344276 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3489)" "@N (@S)" 5 -5.81203 +COMMENT 13.9386 0 -10 4.49575 0.949103 #359#)) +COMMENT (CObjectList)) +COMMENT #361=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList +COMMENT #362=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #237# 1077 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.765741 1.9 +COMMENT 0.082322 1) +COMMENT #363=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26343364 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3180)" "@N (@S)" 5 -11.083 +COMMENT 10.454 0 -10 4.42082 0.949103 #362#)) +COMMENT (CObjectList)) +COMMENT #364=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList +COMMENT #365=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #237# 3670840 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.90282 1.9 +COMMENT 0.082322 1) +COMMENT #366=(CLabel (CWidget 0 (0 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (792)" "@N (@S)" 5 15.054 +COMMENT -13.9386 0 -10 4.92035 0.949103 #365#) +COMMENT #367=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #237# 1114121 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.39521 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #229# 26610644 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1085)" "@N (@S)" 5 15.1845 +COMMENT -22.6503 0 -10 5.295 0.949103 #367#)) +COMMENT (CObjectList)) +COMMENT #369=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #370=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.92188 1.9 +COMMENT 0.082322 1) +COMMENT #371=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #229# 26578836 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (781)" "@N (@S)" 5 14.2657 +COMMENT -12.1963 0 -10 3.67153 0.949103 #370#) +COMMENT #372=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #237# 393233 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.91706 1.9 +COMMENT 0.082322 1) +COMMENT #373=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #229# 393219 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1361)" "@N (@S)" 5 11.5161 +COMMENT -24.3926 0 -10 4.12111 0.949103 #372#)) +COMMENT (CObjectList)) +COMMENT #374=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 1944545584 100) +COMMENT (CObjectList +COMMENT #375=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #237# 1114135 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.98906 1.9 +COMMENT 0.082322 1) +COMMENT #376=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #229# 1128485953 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.73958 +COMMENT 19.1656 0 -10 4.34589 0.949103 #375#) +COMMENT #377=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.94207 1.9 +COMMENT 0.082322 1) +COMMENT #378=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #229# -529 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2501)" "@N (@S)" 5 -13.7723 +COMMENT -5.22699 0 -10 4.84542 0.949103 #377#)) +COMMENT (CObjectList)) +COMMENT #379=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #380=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #237# 20458392 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.45027 1.9 +COMMENT 0.082322 1) +COMMENT #381=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #229# 26341996 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 11.3998 10.454 +COMMENT 0 -10 3.99622 0.949103 #380#) +COMMENT #382=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #237# 393220 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.7802 1.9 +COMMENT 0.082322 1) +COMMENT #383=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #229# 26342908 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1440)" "@N (@S)" 5 10.45 +COMMENT -27.8773 0 -10 4.42082 0.949103 #382#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #384=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #385=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 2087857526 +COMMENT (CStringList) 1095462957 827607363 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2220..2858 + /vntifkey="33" + /label=ColE1 + terminator 1992..2096 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2917..3022) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3048..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3134..3155 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 649..796 + /vntifkey="21" + /label=core\riboswitch + mutation 795..795 + /vntifkey="62" + /label=orig\T + misc_feature 793..793 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 649..726 + /vntifkey="21" + /label=TPP\aptamer + CDS 774..1985 + /vntifkey="4" + /label=tetA* + misc_feature 608..640 + /vntifkey="21" + /label=Theo28\Aptamer +BASE COUNT 812 a 999 c 940 g 870 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattctga taccagccga aaggcccttg gcagcaattc aaccaaacga ctcggggtgc + 661 ccttctgcgt gaaggctgag aaatacccgt atcacctgat ctggataatg ccagcgtagg + 721 gaagtcacgg accaccaggt cattgcttct tcacgttatg gcaggagcaa actatgcaag + 781 tcgacctgct ggatccaaaa tctaacaatg cgctcatcgt catcctcggc accgtcaccc + 841 tggatgctgt aggcataggc ttggttatgc cggtactgcc gggcctcttg cgggatatcg + 901 tccattccga cagcatcgcc agtcactatg gcgtgctgct agcgctatat gcgttgatgc + 961 aatttctatg cgcacccgtt ctcggagcac tgtccgaccg ctttggccgc cgcccagtcc + 1021 tgctcgcttc gctacttgga gccactatcg actacgcgat catggcgacc acacccgtcc + 1081 tgtggatcct ctacgccgga cgcatcgtgg ccggcatcac cggcgccaca ggtgcggttg + 1141 ctggcgccta tatcgccgac atcaccgatg gggaagatcg ggctcgccac ttcgggctca + 1201 tgagcgcttg tttcggcgtg ggtatggtgg caggccccgt ggccggggga ctgttgggcg + 1261 ccatctcctt gcatgcacca ttccttgcgg cggcggtgct caacggcctc aacctactac + 1321 tgggctgctt cctaatgcag gagtcgcata agggagagcg tcgaccgatg cccttgagag + 1381 ccttcaaccc agtcagctcc ttccggtggg cgcggggcat gactatcgtc gccgcactta + 1441 tgactgtctt ctttatcatg caactcgtag gacaggtgcc ggcagcgctc tgggtcattt + 1501 tcggcgagga ccgctttcgc tggagcgcga cgatgatcgg cctgtcgctt gcggtattcg + 1561 gaatcttgca cgccctcgct caagccttcg tcactggtcc cgccaccaaa cgtttcggcg + 1621 agaagcaggc cattatcgcc ggcatggcgg ccgacgcgct gggctacgtc ttgctggcgt + 1681 tcgcgacgcg aggctggatg gccttcccca ttatgattct tctcgcttcc ggcggcatcg + 1741 ggatgcccgc gttgcaggcc atgctgtcca ggcaggtaga tgacgaccat cagggacagc + 1801 ttcaaggatc gctcgcggct cttaccagcc taacttcgat cactggaccg ctgatcgtca + 1861 cggcgattta tgccgcctcg gcgagcacat ggaacgggtt ggcatggatt gtaggcgccg + 1921 ccctatacct tgtctgcctc cccgcgttgc gtcgcggtgc atggagccgg gccacctcga + 1981 cctaatctag aggcatcaaa taaaacgaaa ggctcagtcg aaagactggg cctttcgttt + 2041 tatctgttgt ttgtcggtga acgctctcct gagtaggaca aatccgccgc cctagaccta + 2101 ggcgttcggc tgcggcgagc ggtatcagct cactcaaagg cggtaatacg gttatccaca + 2161 gaatcagggg ataacgcagg aaagaacatg tgagcaaaag gccagcaaaa ggccaggaac + 2221 cgtaaaaagg ccgcgttgct ggcgtttttc cataggctcc gcccccctga cgagcatcac + 2281 aaaaatcgac gctcaagtca gaggtggcga aacccgacag gactataaag ataccaggcg + 2341 tttccccctg gaagctccct cgtgcgctct cctgttccga ccctgccgct taccggatac + 2401 ctgtccgcct ttctcccttc gggaagcgtg gcgctttctc aatgctcacg ctgtaggtat + 2461 ctcagttcgg tgtaggtcgt tcgctccaag ctgggctgtg tgcacgaacc ccccgttcag + 2521 cccgaccgct gcgccttatc cggtaactat cgtcttgagt ccaacccggt aagacacgac + 2581 ttatcgccac tggcagcagc cactggtaac aggattagca gagcgaggta tgtaggcggt + 2641 gctacagagt tcttgaagtg gtggcctaac tacggctaca ctagaaggac agtatttggt + 2701 atctgcgctc tgctgaagcc agttaccttc ggaaaaagag ttggtagctc ttgatccggc + 2761 aaacaaacca ccgctggtag cggtggtttt tttgtttgca agcagcagat tacgcgcaga + 2821 aaaaaaggat ctcaagaaga tcctttgatc ttttctacgg ggtctgacgc tcagtggaac + 2881 gaaaactcac gttaagggat tttggtcatg actagtgctt ggattctcac caataaaaaa + 2941 cgcccggcgg caaccgagcg ttctgaacaa atccagatgg agttctgagg tcattactgg + 3001 atctatcaac aggagtccaa gcgagctcaa acttggtctg acagttacca atgcttaatc + 3061 agtgaggcac ctatctcagc gatctgtcta tttcgttcat ccatagttgc ctgactcccc + 3121 gtcgtgtaga taactacgat acgggagggc ttaccatctg gccccagtgc tgcaatgata + 3181 ccgcgagacc cacgctcacc ggctccagat ttatcagcaa taaaccagcc agccggaagg + 3241 gccgagcgca gaagtggtcc tgcaacttta tccgcctcca tccagtctat taattgttgc + 3301 cgggaagcta gagtaagtag ttcgccagtt aatagtttgc gcaacgttgt tgccattgct + 3361 acaggcatcg tggtgtcacg ctcgtcgttt ggtatggctt cattcagctc cggttcccaa + 3421 cgatcaaggc gagttacatg atcccccatg ttgtgcaaaa aagcggttag ctccttcggt + 3481 cctccgatcg ttgtcagaag taagttggcc gcagtgttat cactcatggt tatggcagca + 3541 ctgcataatt ctcttactgt catgccatcc gtaagatgct tttctgtgac tggtgagtac + 3601 tcaaccaagt cattctgaga a +// diff --git a/lib/VNTI files/pLactenA#59tetA-GS-GFP.gb b/lib/VNTI files/pLactenA#59tetA-GS-GFP.gb new file mode 100644 index 00000000..93572989 --- /dev/null +++ b/lib/VNTI files/pLactenA#59tetA-GS-GFP.gb @@ -0,0 +1,1648 @@ +LOCUS pLactenA#5 4357 bp DNA circular 12-JUN-2008 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|484917544| +COMMENT VNTDBDATE|484917656| +COMMENT LSOWNER| +COMMENT VNTNAME|pLactenA#59tetA-GS-GFP| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLactenA#59tetA-GS-GFP" 0 4357 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 2 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "(0,{1,2})" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4357 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 757 0 1050 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 2 681 0 2723 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 2000 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2712 0 3764 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 3 746 0 1326 0 2608 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2834 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 3237 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 2327 0 2923 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 2 695 0 908 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 2 691 0 904 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 4225 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3916 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1164 0 3643 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1405 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2956 3594 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2936..3574") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 2728 2832 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2708..2812") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 3653 3758 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3633..3738)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3784 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3764..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3870 3891 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3850..3871") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "orig T" 62 0 0 760 760 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "740..740") +COMMENT #43=(CFSignal (CObList) "orig G" 21 0 0 758 758 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "738..738") +COMMENT #44=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #45=(CFSignal (CObList) "tetA*" 4 0 0 739 1947 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "719..1927") +COMMENT #46=(CFSignal (CObList) "GFPuv" 4 0 0 2005 2721 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1985..2701") +COMMENT #47=(CFSignal (CObList) "(GGGS)4 Linker" 4 0 0 1951 1998 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1931..1978") +COMMENT #48=(CFSignal (CObList) "TPP aptamer (tenA)" 21 0 0 612 707 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "612..707") +COMMENT #49=(CFSignal (CObList) "randomized" 21 0 0 708 726 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #50=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #51=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLactenA#59tetA-GS-GFP" 2) 5 "" 0 4) +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLactenA#59tetA-GS-GFP'" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 06/12/08 11:19\214\337\221O" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 06/12/08 11:20\214\337\221O" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4357 bp" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 5-JUN-2008" 1))) +COMMENT "Standard Fields") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #65=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 739 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 739 End: 1947" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 719..1927" 1))) "tetA*") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1951 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1951 End: 1998" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1931..1978" 1))) "(GGGS)4 Linker") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2005 (3 #46# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2005 End: 2721" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1985..2701" 1))) "GFPuv") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3784 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3784 End: 284 (Complementary)" +COMMENT 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3764..284)" 1))) "AmpR"))) +COMMENT "CDS (4 total)") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 612 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 612 End: 707 " 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 612..707" 1))) "TPP aptamer (tenA)") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 708 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 708 End: 726 " 1))) +COMMENT "randomized") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 758 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 758 End: 758 " 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 738..738" 1))) "orig G") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3870 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3870 End: 3891" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3850..3871" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #128=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #137=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #138=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2956 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2956 End: 3594" 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2936..3574" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #142=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #143=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2728 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2728 End: 2832" 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2708..2812" 1))) "T1") +COMMENT #148=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3653 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3653 End: 3758 (Complementary)" +COMMENT 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3633..3738)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #153=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #154=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #158=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #159=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #163=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #169=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 760 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 760 End: 760 " 1) +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 740..740" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #173=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20923816 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #175=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2327 " 1) +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 2923 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 3237 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20923736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2834 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924536 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 757 " 1) +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1050 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25310808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #196=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1405 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25310888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #200=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 695 " 1) +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #17# 2) 1 2 2 0 191) +COMMENT " N2: 908 " 1))))) "BmtI: 2 sites") +COMMENT 5 1 "GCTAGC" "CGATCG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3916 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924456 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20925016 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #212=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 2000 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924376 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #215=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #216=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #217=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 691 " 1) +COMMENT #218=(CLinePar +COMMENT (CParagraph 0 (1 #18# 2) 1 2 2 0 191) +COMMENT " N2: 904 " 1))))) "NheI: 2 sites") +COMMENT 1 5 "GCTAGC" "CGATCG") +COMMENT #219=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #220=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #221=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #222=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 4225 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #223=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20923976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #224=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #225=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2712 " 1) +COMMENT #226=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 3764 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #227=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20923896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 3 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #228=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #229=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924696 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #230=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924296 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #231=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #232=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 681 " 1) +COMMENT #233=(CLinePar +COMMENT (CParagraph 0 (1 #4# 2) 1 2 2 0 191) +COMMENT " N2: 2723 " 1))))) "XbaI: 2 sites") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #234=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #235=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #236=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #237=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 2 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #238=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #239=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #240=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #241=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #242=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #243=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #244=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #245=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #246=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #247=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #248=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #249=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #250=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #251=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #252=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #253=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #254=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #255=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #256=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #257=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #258=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #259=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #260=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #261=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #262=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #263=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #264=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #265=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #266=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #267=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #268=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #269=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #270=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #271=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #272=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #273=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #274=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #275=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #276=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #277=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.8777 -26.6852 40.0378 40.0378 0.01 10 -1 4357 4357 1 0 0) +COMMENT #278=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -600 100) +COMMENT (CObjectList +COMMENT #279=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1062 100) +COMMENT (CObjectList +COMMENT #280=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 26586780 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27562 6.27362 1 0.0214037) 0.143979) +COMMENT #281=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLactenA#59tetA-GS-GFP" "@N" 1 0 +COMMENT 0.871165 0 -10 13.9868 1.44863 Nil) +COMMENT #282=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #240# 26446188 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4357 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #283=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -809 100) +COMMENT (CObjectList +COMMENT #284=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -531 100) +COMMENT (CObjectList +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.86428 0.826442 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26442996 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.60313 13.9386 0 -10 2.72243 1.04901 #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.46991 5.21062 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3736120 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 13.3418 -22.6503 0 -10 2.27285 1.04901 #287#) +COMMENT #289=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #242# 24662076 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.3555 3.38784 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# -1996 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "GFPuv" "@N" 1 +COMMENT -5.35321 -12.1963 0 -10 3.19698 1.04901 #289#) +COMMENT #291=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #242# 24941228 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.39648 3.46559 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "(GGGS)4 Linker" +COMMENT "@N" 1 7.75269 -26.1349 0 -10 7.1932 1.04901 +COMMENT #291#)) (CObjectList)) +COMMENT #293=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #294=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.70262 1.9 +COMMENT 0.082322 1) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 28763904 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -10.0341 10.454 0 -10 3.97125 1.04901 #294#) +COMMENT #296=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.4381 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4048 1.74233 0 -10 1.14891 1.04901 #296#) +COMMENT #298=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.18326 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 393241 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 12.8347 -13.9386 0 -10 2.92224 1.04901 #298#) +COMMENT #300=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #243# 3736056 +COMMENT 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.25525 +COMMENT 5.39347 1 0.082322) 0.8 1.8 0) +COMMENT #301=(CLabel (CWidget 0 (0 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "TPP aptamer (tenA)" "@N" 1 15.4578 -3.48466 +COMMENT 0 -10 8.84164 1.04901 #300#) +COMMENT #302=(CScratch +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #247# 28557520 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.25525 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel (CWidget 0 (0 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "randomized" +COMMENT "@N" 1 13.2897 -10.454 0 -10 5.49481 1.04901 +COMMENT #302#)) (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -879 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.53025 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 9.8604 8.71165 0 -10 2.59755 1.04901 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #260# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.59216 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3670688 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 9.79245 15.681 0 -10 2.59755 1.04901 #308#) +COMMENT #310=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #260# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.07737 1.9 +COMMENT 0.082322 1) +COMMENT #311=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3736224 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.26624 24.3926 0 -10 3.92129 1.04901 #310#) +COMMENT #312=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #260# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.80525 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26445732 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 8.30645 20.908 0 -10 3.97125 1.04901 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1121 100) +COMMENT (CObjectList +COMMENT #315=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.72174 5.86428 1 0.082322) 0.8 1.8 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 327 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 7.94745 19.1656 0 -10 2.72243 1.04901 #315#) +COMMENT #317=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.40787 5.55761 1 0.082322) 0.8 1.8 0) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26446644 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.159 5.22699 0 -10 2.67247 1.04901 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.4381 1.9 0.082322 +COMMENT 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26948448 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.9253 0 0 -10 2.14797 1.04901 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -112 100) +COMMENT (CObjectList +COMMENT #323=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.09856 2.01859 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -13.1954 0 0 -10 2.72243 1.04901 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -530 100) +COMMENT (CObjectList +COMMENT #326=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #247# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 2.19569 2.34687) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26576100 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -10.6151 -6.96932 0 -10 1.14891 1.04901 #326#) +COMMENT #328=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #247# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 0.862437 1.01506) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 27319140 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -10.6151 6.96932 0 -10 1.14891 1.04901 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 954 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.45538 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 268634488 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.1996 3.48466 0 -10 1.47361 1.04901 #331#)) +COMMENT (CObjectList)) +COMMENT #333=(CGroupWidget (CWidget 48 (7 48 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.48994 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 786443 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 10.7283 6.96932 0 -10 1.47361 1.04901 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.56049 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 268742920 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 11.0872 10.454 0 -10 5.8195 1.04901 +COMMENT #337#) +COMMENT #339=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.18038 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26444820 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 12.8742 -15.681 0 -10 2.72243 1.04901 #339#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #341=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 5439490 100) +COMMENT (CObjectList +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -391 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.39504 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 20975028 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (2000)" "@N (@S)" 5 7.08972 +COMMENT -27.8773 0 -10 5.56974 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.66991 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 24773756 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 10.1086 +COMMENT 17.4233 0 -10 4.29594 0.924127 #346#)) +COMMENT (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.19425 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 26448012 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2834)" "@N (@S)" 5 -13.4135 +COMMENT -5.22699 0 -10 4.92035 0.924127 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.40643 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.2169 +COMMENT -1.74233 0 -10 4.64561 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #246# 268634520 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.56769 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 3736112 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 10.6779 +COMMENT 12.1963 0 -10 4.17106 0.924127 #355#)) +COMMENT (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.191493 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 24851620 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (4225)" "@N (@S)" 5 -5.53695 +COMMENT 15.681 0 -10 4.69556 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.636389 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 2228241 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3916)" "@N (@S)" 5 -10.0958 +COMMENT 12.1963 0 -10 4.57068 0.924127 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #246# 28874920 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.1847 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3736152 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (757)" "@N (@S)" 5 13.9395 +COMMENT -12.1963 0 -10 5.09519 0.924127 #364#) +COMMENT #366=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.76284 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26589412 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1050)" "@N (@S)" 5 15.8826 +COMMENT -20.908 0 -10 5.56974 0.924127 #366#)) +COMMENT (CObjectList)) +COMMENT #368=(CGroupWidget +COMMENT (CWidget 2 (10 #4# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #369=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.29412 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3736192 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (681)" "@N (@S)" 5 13.0476 +COMMENT -5.22699 0 -10 4.17106 0.924127 #369#) +COMMENT #371=(CScratch +COMMENT (CWidget 2 (1 #4# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.35406 1.9 +COMMENT 0.082322 1) +COMMENT #372=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 28416868 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (2723)" "@N (@S)" 5 -11.2791 +COMMENT -8.71165 0 -10 4.77049 0.924127 #371#)) +COMMENT (CObjectList)) +COMMENT #373=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -600 100) +COMMENT (CObjectList +COMMENT #374=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.3699 1.9 0.082322 +COMMENT 1) +COMMENT #375=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 24558460 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2712)" "@N (@S)" 5 -11.1255 +COMMENT -10.454 0 -10 4.57068 0.924127 #374#) +COMMENT #376=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.855238 1.9 +COMMENT 0.082322 1) +COMMENT #377=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 24933712 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (3764)" "@N (@S)" 5 -11.7181 +COMMENT 8.71165 0 -10 4.64561 0.924127 #376#)) +COMMENT (CObjectList)) +COMMENT #378=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #379=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.03706 1.9 +COMMENT 0.082322 1) +COMMENT #380=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 20930344 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.35807 +COMMENT 22.6503 0 -10 4.64561 0.924127 #379#) +COMMENT #381=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.61401 1.9 +COMMENT 0.082322 1) +COMMENT #382=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3736288 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (3237)" "@N (@S)" 5 -14.5073 +COMMENT -1.74233 0 -10 5.22007 0.924127 #381#)) +COMMENT (CObjectList)) +COMMENT #383=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #384=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #246# 28789152 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.92422 1.9 +COMMENT 0.082322 1) +COMMENT #385=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3736288 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2327)" "@N (@S)" 5 -5.86007 +COMMENT -13.9386 0 -10 4.82044 0.924127 #384#) +COMMENT #386=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.06611 1.9 +COMMENT 0.082322 1) +COMMENT #387=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 25077408 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2923)" "@N (@S)" 5 -13.9681 +COMMENT -3.48466 0 -10 4.82044 0.924127 #386#)) +COMMENT (CObjectList)) +COMMENT #388=(CGroupWidget +COMMENT (CWidget 2 (10 #17# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #389=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.27397 1.9 +COMMENT 0.082322 1) +COMMENT #390=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3736312 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bmt}I (695)" "@N (@S)" 5 12.7465 +COMMENT -8.71165 0 -10 4.24599 0.924127 #389#) +COMMENT #391=(CScratch +COMMENT (CWidget 2 (1 #17# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.96729 1.9 +COMMENT 0.082322 1) +COMMENT #392=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3736328 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bmt}I (908)" "@N (@S)" 5 14.8566 +COMMENT -19.1656 0 -10 4.24599 0.924127 #391#)) +COMMENT (CObjectList)) +COMMENT #393=(CGroupWidget +COMMENT (CWidget 2 (10 #18# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #394=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.27973 1.9 +COMMENT 0.082322 1) +COMMENT #395=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 24931500 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Nhe}I (691)" "@N (@S)" 5 12.4654 +COMMENT -6.96932 0 -10 4.17106 0.924127 #394#) +COMMENT #396=(CScratch +COMMENT (CWidget 2 (1 #18# 2) 1 2 0 0 #246# 25102016 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.97305 1.9 +COMMENT 0.082322 1) +COMMENT #397=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3736336 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Nhe}I (904)" "@N (@S)" 5 14.7088 +COMMENT -17.4233 0 -10 4.24599 0.924127 #396#)) +COMMENT (CObjectList)) +COMMENT #398=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil 25174408 100) +COMMENT (CObjectList +COMMENT #399=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.58928 1.9 +COMMENT 0.082322 1) +COMMENT #400=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3736368 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 10.5443 +COMMENT 13.9386 0 -10 4.12111 0.924127 #399#) +COMMENT #401=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.25171 1.9 +COMMENT 0.082322 1) +COMMENT #402=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3736144 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1405)" "@N (@S)" 5 14.1385 +COMMENT -24.3926 0 -10 4.57068 0.924127 #401#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #403=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #404=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21258808 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2956..3594 + /vntifkey="33" + /label=ColE1 + terminator 2728..2832 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(3653..3758) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3784..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3870..3891 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + mutation 760..760 + /vntifkey="62" + /label=orig\T + misc_feature 758..758 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + CDS 739..1947 + /vntifkey="4" + /label=tetA* + CDS 2005..2721 + /vntifkey="4" + /label=GFPuv + CDS 1951..1998 + /vntifkey="4" + /label=(GGGS)4\Linker + misc_feature 612..707 + /vntifkey="21" + /label=TPP\aptamer\(tenA) + misc_feature 708..726 + /vntifkey="21" + /label=randomized +BASE COUNT 1038 a 1138 c 1098 g 1083 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaaa attgctagga gagctggtgt tgccagctga gagtaagacc ttaagtcttt + 661 gatccttttt attacctgat ctagattatg ctagcgtagg gaagcaacat gatcacgctt + 721 attgatcagg agcaaactat gcaagtcgac ctgctggatc caaaatctaa caatgcgctc + 781 atcgtcatcc tcggcaccgt caccctggat gctgtaggca taggcttggt tatgccggta + 841 ctgccgggcc tcttgcggga tatcgtccat tccgacagca tcgccagtca ctatggcgtg + 901 ctgctagcgc tatatgcgtt gatgcaattt ctatgcgcac ccgttctcgg agcactgtcc + 961 gaccgctttg gccgccgccc agtcctgctc gcttcgctac ttggagccac tatcgactac + 1021 gcgatcatgg cgaccacacc cgtcctgtgg atcctctacg ccggacgcat cgtggccggc + 1081 atcaccggcg ccacaggtgc ggttgctggc gcctatatcg ccgacatcac cgatggggaa + 1141 gatcgggctc gccacttcgg gctcatgagc gcttgtttcg gcgtgggtat ggtggcaggc + 1201 cccgtggccg ggggactgtt gggcgccatc tccttgcatg caccattcct tgcggcggcg + 1261 gtgctcaacg gcctcaacct actactgggc tgcttcctaa tgcaggagtc gcataaggga + 1321 gagcgtcgac cgatgccctt gagagccttc aacccagtca gctccttccg gtgggcgcgg + 1381 ggcatgacta tcgtcgccgc acttatgact gtcttcttta tcatgcaact cgtaggacag + 1441 gtgccggcag cgctctgggt cattttcggc gaggaccgct ttcgctggag cgcgacgatg + 1501 atcggcctgt cgcttgcggt attcggaatc ttgcacgccc tcgctcaagc cttcgtcact + 1561 ggtcccgcca ccaaacgttt cggcgagaag caggccatta tcgccggcat ggcggccgac + 1621 gcgctgggct acgtcttgct ggcgttcgcg acgcgaggct ggatggcctt ccccattatg + 1681 attcttctcg cttccggcgg catcgggatg cccgcgttgc aggccatgct gtccaggcag + 1741 gtagatgacg accatcaggg acagcttcaa ggatcgctcg cggctcttac cagcctaact + 1801 tcgatcactg gaccgctgat cgtcacggcg atttatgccg cctcggcgag cacatggaac + 1861 gggttggcat ggattgtagg cgccgcccta taccttgtct gcctccccgc gttgcgtcgc + 1921 ggtgcatgga gccgggccac ctcgaccctg ggcggtggaa gcggcggcgg ctccggtggt + 1981 ggttctggag gcggttctaa gcttatgagt aaaggagaag aacttttcac tggagttgtc + 2041 ccaattcttg ttgaattaga tggtgatgtt aatgggcaca aattttctgt cagtggagag + 2101 ggtgaaggtg atgcaacata cggaaaactt acccttaaat ttatttgcac tactggaaaa + 2161 ctacctgttc catggccaac acttgtcact actttctctt atggtgttca atgcttttcc + 2221 cgttatccgg atcatatgaa acggcatgac tttttcaaga gtgccatgcc cgaaggttat + 2281 gtacaggaac gcactatatc tttcaaagat gacgggaact acaagacgcg tgctgaagtc + 2341 aagtttgaag gtgataccct tgttaatcgt atcgagttaa aaggtattga ttttaaagaa + 2401 gatggaaaca ttctcggaca caaacttgag tacaactata actcacacaa tgtatacatc + 2461 acggcagaca aacaaaagaa tggaatcaaa gctaacttca aaattcgcca caacattgaa + 2521 gatggatctg ttcaactagc agaccattat caacaaaata ctccaattgg cgatggccct + 2581 gtccttttac cagacaacca ttacctgtcg acacaatctg ccctttcgaa agatcccaac + 2641 gaaaagcgtg accacatggt ccttcttgag tttgtaactg ctgctgggat tacacatggc + 2701 atggatgagc tctacaaata atctagaggc atcaaataaa acgaaaggct cagtcgaaag + 2761 actgggcctt tcgttttatc tgttgtttgt cggtgaacgc tctcctgagt aggacaaatc + 2821 cgccgcccta gacctaggcg ttcggctgcg gcgagcggta tcagctcact caaaggcggt + 2881 aatacggtta tccacagaat caggggataa cgcaggaaag aacatgtgag caaaaggcca + 2941 gcaaaaggcc aggaaccgta aaaaggccgc gttgctggcg tttttccata ggctccgccc + 3001 ccctgacgag catcacaaaa atcgacgctc aagtcagagg tggcgaaacc cgacaggact + 3061 ataaagatac caggcgtttc cccctggaag ctccctcgtg cgctctcctg ttccgaccct + 3121 gccgcttacc ggatacctgt ccgcctttct cccttcggga agcgtggcgc tttctcaatg + 3181 ctcacgctgt aggtatctca gttcggtgta ggtcgttcgc tccaagctgg gctgtgtgca + 3241 cgaacccccc gttcagcccg accgctgcgc cttatccggt aactatcgtc ttgagtccaa + 3301 cccggtaaga cacgacttat cgccactggc agcagccact ggtaacagga ttagcagagc + 3361 gaggtatgta ggcggtgcta cagagttctt gaagtggtgg cctaactacg gctacactag + 3421 aaggacagta tttggtatct gcgctctgct gaagccagtt accttcggaa aaagagttgg + 3481 tagctcttga tccggcaaac aaaccaccgc tggtagcggt ggtttttttg tttgcaagca + 3541 gcagattacg cgcagaaaaa aaggatctca agaagatcct ttgatctttt ctacggggtc + 3601 tgacgctcag tggaacgaaa actcacgtta agggattttg gtcatgacta gtgcttggat + 3661 tctcaccaat aaaaaacgcc cggcggcaac cgagcgttct gaacaaatcc agatggagtt + 3721 ctgaggtcat tactggatct atcaacagga gtccaagcga gctcaaactt ggtctgacag + 3781 ttaccaatgc ttaatcagtg aggcacctat ctcagcgatc tgtctatttc gttcatccat + 3841 agttgcctga ctccccgtcg tgtagataac tacgatacgg gagggcttac catctggccc + 3901 cagtgctgca atgataccgc gagacccacg ctcaccggct ccagatttat cagcaataaa + 3961 ccagccagcc ggaagggccg agcgcagaag tggtcctgca actttatccg cctccatcca + 4021 gtctattaat tgttgccggg aagctagagt aagtagttcg ccagttaata gtttgcgcaa + 4081 cgttgttgcc attgctacag gcatcgtggt gtcacgctcg tcgtttggta tggcttcatt + 4141 cagctccggt tcccaacgat caaggcgagt tacatgatcc cccatgttgt gcaaaaaagc + 4201 ggttagctcc ttcggtcctc cgatcgttgt cagaagtaag ttggccgcag tgttatcact + 4261 catggttatg gcagcactgc ataattctct tactgtcatg ccatccgtaa gatgcttttc + 4321 tgtgactggt gagtactcaa ccaagtcatt ctgagaa +// diff --git a/lib/VNTI files/pLactenAtetA-GS-GFP-lib2(Archit).gb b/lib/VNTI files/pLactenAtetA-GS-GFP-lib2(Archit).gb new file mode 100644 index 00000000..f22e293c --- /dev/null +++ b/lib/VNTI files/pLactenAtetA-GS-GFP-lib2(Archit).gb @@ -0,0 +1,1637 @@ +LOCUS pLactenAte 4347 bp DNA circular 24-JUN-2008 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|485957957| +COMMENT VNTDBDATE|485957957| +COMMENT LSOWNER| +COMMENT VNTNAME|pLactenAtetA-GS-GFP-lib2(Archit)| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLactenAtetA-GS-GFP-lib2(Archit)" 0 4347 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 2 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "(0,{1,2})" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4347 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 747 0 1040 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 2 681 0 2713 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 1990 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2702 0 3754 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 3 736 0 1316 0 2598 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2824 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 3227 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 2317 0 2913 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 2 695 0 898 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 2 691 0 894 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 4215 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3906 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1154 0 3633 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1395 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2946 3584 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2936..3574") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 2718 2822 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2708..2812") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 3643 3748 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3633..3738)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3774 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3764..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3860 3881 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3850..3871") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "orig T" 62 0 0 750 750 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "740..740") +COMMENT #43=(CFSignal (CObList) "orig G" 21 0 0 748 748 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "738..738") +COMMENT #44=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #45=(CFSignal (CObList) "tetA*" 4 0 0 729 1937 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "719..1927") +COMMENT #46=(CFSignal (CObList) "GFPuv" 4 0 0 1995 2711 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1985..2701") +COMMENT #47=(CFSignal (CObList) "(GGGS)4 Linker" 4 0 0 1941 1988 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1931..1978") +COMMENT #48=(CFSignal (CObList) "TPP aptamer (tenA)" 21 0 0 612 707 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "612..707") +COMMENT #49=(CFSignal (CObList) "SD" 21 0 0 718 721 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #50=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #51=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pLactenA#59tetA-GS-GFP" 2) 5 "" 0 4) +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLactenA#59tetA-GS-GFP'" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 06/12/08 11:19\214\337\221O" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 06/12/08 11:20\214\337\221O" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4347 bp" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 5-JUN-2008" 1))) +COMMENT "Standard Fields") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #65=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 729 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 729 End: 1937" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 719..1927" 1))) "tetA*") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1941 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1941 End: 1988" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1931..1978" 1))) "(GGGS)4 Linker") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1995 (3 #46# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1995 End: 2711" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1985..2701" 1))) "GFPuv") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3774 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3774 End: 284 (Complementary)" +COMMENT 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3764..284)" 1))) "AmpR"))) +COMMENT "CDS (4 total)") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 612 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 612 End: 707 " 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 612..707" 1))) "TPP aptamer (tenA)") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 718 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 718 End: 721 " 1))) "SD") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 748 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 748 End: 748 " 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 738..738" 1))) "orig G") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3860 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3860 End: 3881" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3850..3871" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #128=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #137=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #138=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2946 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2946 End: 3584" 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2936..3574" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #142=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #143=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2718 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2718 End: 2822" 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2708..2812" 1))) "T1") +COMMENT #148=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3643 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3643 End: 3748 (Complementary)" +COMMENT 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3633..3738)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #153=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #154=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #158=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #159=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #163=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #169=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 750 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 750 End: 750 " 1) +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 740..740" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #173=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20923816 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #175=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25312008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2317 " 1) +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 2913 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 3227 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20923736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2824 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924536 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 747 " 1) +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1040 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25310808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #196=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1395 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25310888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #200=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 695 " 1) +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #17# 2) 1 2 2 0 191) +COMMENT " N2: 898 " 1))))) "BmtI: 2 sites") +COMMENT 5 1 "GCTAGC" "CGATCG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3906 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924456 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20925016 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #212=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 1990 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924376 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #215=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #216=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #217=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 691 " 1) +COMMENT #218=(CLinePar +COMMENT (CParagraph 0 (1 #18# 2) 1 2 2 0 191) +COMMENT " N2: 894 " 1))))) "NheI: 2 sites") +COMMENT 1 5 "GCTAGC" "CGATCG") +COMMENT #219=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #220=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #221=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #222=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 4215 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #223=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20923976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #224=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #225=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2702 " 1) +COMMENT #226=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 3754 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #227=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20923896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 3 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #228=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #229=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924696 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #230=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20924296 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #231=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #232=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 681 " 1) +COMMENT #233=(CLinePar +COMMENT (CParagraph 0 (1 #4# 2) 1 2 2 0 191) +COMMENT " N2: 2713 " 1))))) "XbaI: 2 sites") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #234=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #235=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #236=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #237=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25311928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 2 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #238=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #239=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #240=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #241=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #242=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #243=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #244=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #245=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #246=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #247=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #248=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #249=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #250=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #251=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #252=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #253=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #254=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #255=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #256=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #257=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #258=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #259=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #260=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #261=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #262=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #263=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #264=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #265=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #266=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #267=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #268=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #269=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #270=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #271=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #272=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #273=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #274=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #275=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #276=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #277=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.8527 -26.6852 40.0378 40.0378 0.01 10 -1 4347 4347 1 0 0) +COMMENT #278=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1062 100) +COMMENT (CObjectList +COMMENT #279=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1993 100) +COMMENT (CObjectList +COMMENT #280=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #244# 26582196 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27563 6.27363 1 0.0214037) 0.144311) +COMMENT #281=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #241# 26445732 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLactenA#59tetA-GS-GFP" "@N" 1 0 +COMMENT 0.871165 0 -10 13.9868 1.44863 Nil) +COMMENT #282=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #240# -1996 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4347 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #283=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -528 100) +COMMENT (CObjectList +COMMENT #284=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1784 100) +COMMENT (CObjectList +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.86334 0.828343 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #286=(CLabel (CWidget 0 (0 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.49306 12.1963 0 -10 2.72243 1.04901 #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.47789 5.2226 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26589412 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 13.3847 -22.6503 0 -10 2.27285 1.04901 #287#) +COMMENT #289=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.36092 3.39563 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #290=(CLabel (CWidget 0 (0 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "GFPuv" "@N" 1 +COMMENT -5.2769 -12.1963 0 -10 3.19698 1.04901 #289#) +COMMENT #291=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.40429 3.47356 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "(GGGS)4 Linker" +COMMENT "@N" 1 7.84317 -26.1349 0 -10 7.1932 1.04901 +COMMENT #291#)) (CObjectList)) +COMMENT #293=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList +COMMENT #294=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.704236 1.9 +COMMENT 0.082322 1) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26446644 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -10.3657 8.71165 0 -10 3.97125 1.04901 +COMMENT #294#) +COMMENT #296=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.43618 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 6751096 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4048 1.74233 0 -10 1.14891 1.04901 #296#) +COMMENT #298=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #247# 25102016 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.19518 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel (CWidget 0 (0 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 12.7692 -13.9386 0 -10 2.92224 1.04901 #298#) +COMMENT #300=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.25291 +COMMENT 5.39145 1 0.082322) 0.8 1.8 0) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 26444820 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "TPP aptamer (tenA)" "@N" 1 15.4578 -3.48466 +COMMENT 0 -10 8.84164 1.04901 #300#) +COMMENT #302=(CScratch +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.23848 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3670688 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SD" "@N" 1 +COMMENT 11.6235 -10.454 0 -10 1.34873 1.04901 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1156 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #247# 268634520 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.52854 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel (CWidget 0 (0 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 9.8604 8.71165 0 -10 2.59755 1.04901 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #260# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.5906 1.9 0.082322 +COMMENT 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 786443 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 9.8069 15.681 0 -10 2.59755 1.04901 #308#) +COMMENT #310=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #260# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.07692 1.9 +COMMENT 0.082322 1) +COMMENT #311=(CLabel (CWidget 0 (0 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.27152 24.3926 0 -10 3.92129 1.04901 #310#) +COMMENT #312=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #260# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.80418 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 8.31789 20.908 0 -10 3.97125 1.04901 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1435 100) +COMMENT (CObjectList +COMMENT #315=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.72048 5.86334 1 0.082322) 0.8 1.8 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 7.95912 19.1656 0 -10 2.72243 1.04901 #315#) +COMMENT #317=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #255# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.40588 5.55596 1 0.082322) 0.8 1.8 0) +COMMENT #318=(CLabel (CWidget 0 (0 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.159 5.22699 0 -10 2.67247 1.04901 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -807 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.43618 1.9 0.082322 +COMMENT 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3736192 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.9253 0 0 -10 2.14797 1.04901 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1714 100) +COMMENT (CObjectList +COMMENT #323=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.10109 2.02324 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #324=(CLabel (CWidget 0 (0 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -13.1954 0 0 -10 2.72243 1.04901 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1365 100) +COMMENT (CObjectList +COMMENT #326=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #247# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 2.20074 2.35226) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 25077408 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -10.6151 -6.96932 0 -10 1.14891 1.04901 #326#) +COMMENT #328=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #247# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 0.864421 1.01739) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 262146 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -11.5144 5.22699 0 -10 1.14891 1.04901 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1435 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.4535 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 27319140 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.1996 3.48466 0 -10 1.47361 1.04901 #331#)) +COMMENT (CObjectList)) +COMMENT #333=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.48814 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 28416868 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 10.7283 6.96932 0 -10 1.47361 1.04901 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.55885 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 268742920 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 11.1019 10.454 0 -10 5.8195 1.04901 +COMMENT #337#) +COMMENT #339=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.1923 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel (CWidget 0 (0 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 12.8091 -15.681 0 -10 2.72243 1.04901 #339#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #341=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.40285 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 24657812 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (1990)" "@N (@S)" 5 7.09306 +COMMENT -27.8773 0 -10 5.49481 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -598 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.66852 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 327 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 10.1222 +COMMENT 17.4233 0 -10 4.29594 0.924127 #346#)) +COMMENT (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1156 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.19929 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 28763904 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2824)" "@N (@S)" 5 -13.4135 +COMMENT -5.22699 0 -10 4.92035 0.924127 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.40443 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.2169 +COMMENT -1.74233 0 -10 4.64561 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -810 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.56606 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 10.6926 +COMMENT 12.1963 0 -10 4.17106 0.924127 #355#)) +COMMENT (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.191933 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel (CWidget 0 (0 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (4215)" "@N (@S)" 5 -5.405 +COMMENT 13.9386 0 -10 4.62063 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -880 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.637853 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3906)" "@N (@S)" 5 -10.0449 +COMMENT 10.454 0 -10 4.64561 0.924127 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #246# 28874920 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.19663 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 24933712 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (747)" "@N (@S)" 5 13.8738 +COMMENT -12.1963 0 -10 5.09519 0.924127 #364#) +COMMENT #366=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.7738 1.9 0.082322 +COMMENT 1) +COMMENT #367=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26948448 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1040)" "@N (@S)" 5 15.8752 +COMMENT -20.908 0 -10 5.56974 0.924127 #366#)) +COMMENT (CObjectList)) +COMMENT #368=(CGroupWidget +COMMENT (CWidget 2 (10 #4# 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #369=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.29187 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (681)" "@N (@S)" 5 13.0476 +COMMENT -5.22699 0 -10 4.17106 0.924127 #369#) +COMMENT #371=(CScratch +COMMENT (CWidget 2 (1 #4# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.35948 1.9 +COMMENT 0.082322 1) +COMMENT #372=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 393241 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (2713)" "@N (@S)" 5 -11.1809 +COMMENT -8.71165 0 -10 4.69556 0.924127 #371#)) +COMMENT (CObjectList)) +COMMENT #373=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -528 100) +COMMENT (CObjectList +COMMENT #374=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.37535 1.9 +COMMENT 0.082322 1) +COMMENT #375=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2702)" "@N (@S)" 5 -11.1483 +COMMENT -10.454 0 -10 4.64561 0.924127 #374#) +COMMENT #376=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #246# 28557520 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.857205 1.9 +COMMENT 0.082322 1) +COMMENT #377=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26576100 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (3754)" "@N (@S)" 5 -12.2703 +COMMENT 6.96932 0 -10 4.64561 0.924127 #376#)) +COMMENT (CObjectList)) +COMMENT #378=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #379=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.03652 1.9 +COMMENT 0.082322 1) +COMMENT #380=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 25069600 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.36438 +COMMENT 22.6503 0 -10 4.64561 0.924127 #379#) +COMMENT #381=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.61772 1.9 +COMMENT 0.082322 1) +COMMENT #382=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (3227)" "@N (@S)" 5 -14.5053 +COMMENT -1.74233 0 -10 5.22007 0.924127 #381#)) +COMMENT (CObjectList)) +COMMENT #383=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -2132 100) +COMMENT (CObjectList +COMMENT #384=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.93095 1.9 +COMMENT 0.082322 1) +COMMENT #385=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3736224 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2317)" "@N (@S)" 5 -5.73779 +COMMENT -13.9386 0 -10 4.74552 0.924127 #384#) +COMMENT #386=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.07086 1.9 +COMMENT 0.082322 1) +COMMENT #387=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26442996 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2913)" "@N (@S)" 5 -13.9245 +COMMENT -3.48466 0 -10 4.74552 0.924127 #386#)) +COMMENT (CObjectList)) +COMMENT #388=(CGroupWidget +COMMENT (CWidget 2 (10 #17# 0) 1 2 0 0 Nil -1647 100) +COMMENT (CObjectList +COMMENT #389=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.27167 1.9 +COMMENT 0.082322 1) +COMMENT #390=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 24558460 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bmt}I (695)" "@N (@S)" 5 12.7611 +COMMENT -8.71165 0 -10 4.24599 0.924127 #389#) +COMMENT #391=(CScratch +COMMENT (CWidget 2 (1 #17# 2) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.97872 1.9 +COMMENT 0.082322 1) +COMMENT #392=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 20975028 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bmt}I (898)" "@N (@S)" 5 14.8213 +COMMENT -19.1656 0 -10 4.24599 0.924127 #391#)) +COMMENT (CObjectList)) +COMMENT #393=(CGroupWidget +COMMENT (CWidget 2 (10 #18# 0) 1 2 0 0 Nil -670 100) +COMMENT (CObjectList +COMMENT #394=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.27744 1.9 +COMMENT 0.082322 1) +COMMENT #395=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 25145008 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Nhe}I (691)" "@N (@S)" 5 12.4801 +COMMENT -6.96932 0 -10 4.17106 0.924127 #394#) +COMMENT #396=(CScratch +COMMENT (CWidget 2 (1 #18# 2) 1 2 0 0 #246# 28789152 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.98449 1.9 +COMMENT 0.082322 1) +COMMENT #397=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 2 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Nhe}I (894)" "@N (@S)" 5 14.6727 +COMMENT -17.4233 0 -10 4.24599 0.924127 #396#)) +COMMENT (CObjectList)) +COMMENT #398=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil -1368 100) +COMMENT (CObjectList +COMMENT #399=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.58771 1.9 +COMMENT 0.082322 1) +COMMENT #400=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 10.5588 +COMMENT 13.9386 0 -10 4.12111 0.924127 #399#) +COMMENT #401=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #246# 235 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.26149 1.9 +COMMENT 0.082322 1) +COMMENT #402=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1395)" "@N (@S)" 5 14.164 +COMMENT -24.3926 0 -10 4.57068 0.924127 #401#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #403=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1089 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #404=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1089 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList #405=(AnlzFontMaskItem 705 717 1)) +COMMENT 1 (CObList)) (CObList) 0 (CStringList) 1944749780 21258808 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2946..3584 + /vntifkey="33" + /label=ColE1 + terminator 2718..2822 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(3643..3748) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3774..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3860..3881 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + mutation 750..750 + /vntifkey="62" + /label=orig\T + misc_feature 748..748 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + CDS 729..1937 + /vntifkey="4" + /label=tetA* + CDS 1995..2711 + /vntifkey="4" + /label=GFPuv + CDS 1941..1988 + /vntifkey="4" + /label=(GGGS)4\Linker + misc_feature 612..707 + /vntifkey="21" + /label=TPP\aptamer\(tenA) + misc_feature 718..721 + /vntifkey="21" + /label=SD +BASE COUNT 1030 a 1133 c 1095 g 1076 t 13 others +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaaa attgctagga gagctggtgt tgccagctga gagtaagacc ttaagtcttt + 661 gatccttttt attacctgat ctagattatg ctagcgtagg gaagcrrnnn nnnnnnnrgg + 721 agcaaactat gcaagtcgac ctgctggatc caaaatctaa caatgcgctc atcgtcatcc + 781 tcggcaccgt caccctggat gctgtaggca taggcttggt tatgccggta ctgccgggcc + 841 tcttgcggga tatcgtccat tccgacagca tcgccagtca ctatggcgtg ctgctagcgc + 901 tatatgcgtt gatgcaattt ctatgcgcac ccgttctcgg agcactgtcc gaccgctttg + 961 gccgccgccc agtcctgctc gcttcgctac ttggagccac tatcgactac gcgatcatgg + 1021 cgaccacacc cgtcctgtgg atcctctacg ccggacgcat cgtggccggc atcaccggcg + 1081 ccacaggtgc ggttgctggc gcctatatcg ccgacatcac cgatggggaa gatcgggctc + 1141 gccacttcgg gctcatgagc gcttgtttcg gcgtgggtat ggtggcaggc cccgtggccg + 1201 ggggactgtt gggcgccatc tccttgcatg caccattcct tgcggcggcg gtgctcaacg + 1261 gcctcaacct actactgggc tgcttcctaa tgcaggagtc gcataaggga gagcgtcgac + 1321 cgatgccctt gagagccttc aacccagtca gctccttccg gtgggcgcgg ggcatgacta + 1381 tcgtcgccgc acttatgact gtcttcttta tcatgcaact cgtaggacag gtgccggcag + 1441 cgctctgggt cattttcggc gaggaccgct ttcgctggag cgcgacgatg atcggcctgt + 1501 cgcttgcggt attcggaatc ttgcacgccc tcgctcaagc cttcgtcact ggtcccgcca + 1561 ccaaacgttt cggcgagaag caggccatta tcgccggcat ggcggccgac gcgctgggct + 1621 acgtcttgct ggcgttcgcg acgcgaggct ggatggcctt ccccattatg attcttctcg + 1681 cttccggcgg catcgggatg cccgcgttgc aggccatgct gtccaggcag gtagatgacg + 1741 accatcaggg acagcttcaa ggatcgctcg cggctcttac cagcctaact tcgatcactg + 1801 gaccgctgat cgtcacggcg atttatgccg cctcggcgag cacatggaac gggttggcat + 1861 ggattgtagg cgccgcccta taccttgtct gcctccccgc gttgcgtcgc ggtgcatgga + 1921 gccgggccac ctcgaccctg ggcggtggaa gcggcggcgg ctccggtggt ggttctggag + 1981 gcggttctaa gcttatgagt aaaggagaag aacttttcac tggagttgtc ccaattcttg + 2041 ttgaattaga tggtgatgtt aatgggcaca aattttctgt cagtggagag ggtgaaggtg + 2101 atgcaacata cggaaaactt acccttaaat ttatttgcac tactggaaaa ctacctgttc + 2161 catggccaac acttgtcact actttctctt atggtgttca atgcttttcc cgttatccgg + 2221 atcatatgaa acggcatgac tttttcaaga gtgccatgcc cgaaggttat gtacaggaac + 2281 gcactatatc tttcaaagat gacgggaact acaagacgcg tgctgaagtc aagtttgaag + 2341 gtgataccct tgttaatcgt atcgagttaa aaggtattga ttttaaagaa gatggaaaca + 2401 ttctcggaca caaacttgag tacaactata actcacacaa tgtatacatc acggcagaca + 2461 aacaaaagaa tggaatcaaa gctaacttca aaattcgcca caacattgaa gatggatctg + 2521 ttcaactagc agaccattat caacaaaata ctccaattgg cgatggccct gtccttttac + 2581 cagacaacca ttacctgtcg acacaatctg ccctttcgaa agatcccaac gaaaagcgtg + 2641 accacatggt ccttcttgag tttgtaactg ctgctgggat tacacatggc atggatgagc + 2701 tctacaaata atctagaggc atcaaataaa acgaaaggct cagtcgaaag actgggcctt + 2761 tcgttttatc tgttgtttgt cggtgaacgc tctcctgagt aggacaaatc cgccgcccta + 2821 gacctaggcg ttcggctgcg gcgagcggta tcagctcact caaaggcggt aatacggtta + 2881 tccacagaat caggggataa cgcaggaaag aacatgtgag caaaaggcca gcaaaaggcc + 2941 aggaaccgta aaaaggccgc gttgctggcg tttttccata ggctccgccc ccctgacgag + 3001 catcacaaaa atcgacgctc aagtcagagg tggcgaaacc cgacaggact ataaagatac + 3061 caggcgtttc cccctggaag ctccctcgtg cgctctcctg ttccgaccct gccgcttacc + 3121 ggatacctgt ccgcctttct cccttcggga agcgtggcgc tttctcaatg ctcacgctgt + 3181 aggtatctca gttcggtgta ggtcgttcgc tccaagctgg gctgtgtgca cgaacccccc + 3241 gttcagcccg accgctgcgc cttatccggt aactatcgtc ttgagtccaa cccggtaaga + 3301 cacgacttat cgccactggc agcagccact ggtaacagga ttagcagagc gaggtatgta + 3361 ggcggtgcta cagagttctt gaagtggtgg cctaactacg gctacactag aaggacagta + 3421 tttggtatct gcgctctgct gaagccagtt accttcggaa aaagagttgg tagctcttga + 3481 tccggcaaac aaaccaccgc tggtagcggt ggtttttttg tttgcaagca gcagattacg + 3541 cgcagaaaaa aaggatctca agaagatcct ttgatctttt ctacggggtc tgacgctcag + 3601 tggaacgaaa actcacgtta agggattttg gtcatgacta gtgcttggat tctcaccaat + 3661 aaaaaacgcc cggcggcaac cgagcgttct gaacaaatcc agatggagtt ctgaggtcat + 3721 tactggatct atcaacagga gtccaagcga gctcaaactt ggtctgacag ttaccaatgc + 3781 ttaatcagtg aggcacctat ctcagcgatc tgtctatttc gttcatccat agttgcctga + 3841 ctccccgtcg tgtagataac tacgatacgg gagggcttac catctggccc cagtgctgca + 3901 atgataccgc gagacccacg ctcaccggct ccagatttat cagcaataaa ccagccagcc + 3961 ggaagggccg agcgcagaag tggtcctgca actttatccg cctccatcca gtctattaat + 4021 tgttgccggg aagctagagt aagtagttcg ccagttaata gtttgcgcaa cgttgttgcc + 4081 attgctacag gcatcgtggt gtcacgctcg tcgtttggta tggcttcatt cagctccggt + 4141 tcccaacgat caaggcgagt tacatgatcc cccatgttgt gcaaaaaagc ggttagctcc + 4201 ttcggtcctc cgatcgttgt cagaagtaag ttggccgcag tgttatcact catggttatg + 4261 gcagcactgc ataattctct tactgtcatg ccatccgtaa gatgcttttc tgtgactggt + 4321 gagtactcaa ccaagtcatt ctgagaa +// diff --git a/lib/VNTI files/pLactenAtetA.gb b/lib/VNTI files/pLactenAtetA.gb new file mode 100644 index 00000000..bb091248 --- /dev/null +++ b/lib/VNTI files/pLactenAtetA.gb @@ -0,0 +1,1497 @@ +LOCUS pLactenAte 3567 bp DNA circular 29-JUL-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|453227096| +COMMENT VNTDBDATE|453227096| +COMMENT LSOWNER| +COMMENT VNTNAME|pLactenAtetA| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLactenAtetA" 0 3567 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3567 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 738 0 1031 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 2 681 0 1933 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2974 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 727 0 1307 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2044 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2447 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2133 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 2 695 0 889 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 2 691 0 885 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3435 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3126 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1145 0 2853 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1386 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2166 2804 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1938 2042 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2863 2968 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2994 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3080 3101 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "orig T" 62 0 0 741 741 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "orig G" 21 0 0 739 739 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "tetA*" 4 0 0 720 1931 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "TPP aptamer (tenA)" 21 0 0 612 707 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "")) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #47=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #48=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pLactenAtetA" 2) +COMMENT 5 "" 0 4) +COMMENT #49=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLactenAtetA'" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/29/07 04:24\214\337\214\343" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/29/07 04:24\214\337\214\343" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3567 bp" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #57=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #62=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 720 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 720 End: 1931" 1))) "tetA*") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2994 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2994 End: 284 (Complementary)" +COMMENT 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #75=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 612 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 612 End: 707 " 1))) +COMMENT "TPP aptamer (tenA)") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 739 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 739 End: 739 " 1))) "orig G") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3080 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3080 End: 3101" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #84=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #88=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #93=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #102=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #107=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #111=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #112=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #117=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2166 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2166 End: 2804" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #122=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1938 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1938 End: 2042" 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2863 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2863 End: 2968 (Complementary)" +COMMENT 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #140=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #141=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion") +COMMENT #146=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 741 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 741 End: 741 " 1))) +COMMENT "orig T"))) "Mutation (2 total)"))) +COMMENT "Feature Map") +COMMENT #148=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #149=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25191240 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #150=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20935872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2133 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25186112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #157=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2447 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25189072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2044 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25184592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 738 " 1) +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1031 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1386 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25186192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20935952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 695 " 1) +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #17# 2) 1 2 2 0 191) +COMMENT " N2: 889 " 1))))) "BmtI: 2 sites") +COMMENT 5 1 "GCTAGC" "CGATCG") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3126 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #180=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25184512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25186352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25191480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25191640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #188=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 691 " 1) +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #18# 2) 1 2 2 0 191) +COMMENT " N2: 885 " 1))))) "NheI: 2 sites") +COMMENT 1 5 "GCTAGC" "CGATCG") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25186272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #193=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #194=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3435 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25191400 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2974 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25191320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 727 " 1) +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1307 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25185712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25191560 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #205=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #206=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 681 " 1) +COMMENT #207=(CLinePar +COMMENT (CParagraph 0 (1 #4# 2) 1 2 2 0 191) +COMMENT " N2: 1933 " 1))))) "XbaI: 2 sites") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20936112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20935792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #212=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #213=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #214=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #215=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #216=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #217=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #218=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #219=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #220=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #221=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #222=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #223=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #224=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #225=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #226=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #227=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #228=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #229=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #230=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #231=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #232=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #233=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #234=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #235=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #236=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #237=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #238=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #239=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #240=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #241=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #242=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #243=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #244=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #245=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #246=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #247=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #248=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #249=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #250=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #251=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.1683 -24.9369 40.0378 40.0378 0.01 10 -1 3567 3567 1 0 0) +COMMENT #252=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #253=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -992 100) +COMMENT (CObjectList +COMMENT #254=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24841348 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27594 6.27394 1 0.0214037) 0.175867) +COMMENT #255=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #215# 3736080 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLactenAtetA" "@N" 1 0 0.871165 +COMMENT 0 -10 7.1932 1.44863 Nil) +COMMENT #256=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #214# 3736152 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3567 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #257=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1923 100) +COMMENT (CObjectList +COMMENT #258=(CGroupWidget (CWidget 4 (7 4 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #259=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.77372 1.00948 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24652572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.76283 10.454 0 -10 2.7474 1.04901 #259#) +COMMENT #261=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.87719 5.0087 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #262=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24645004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 10.8199 -26.1349 0 -10 2.29783 1.04901 #261#)) +COMMENT (CObjectList)) +COMMENT #263=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #264=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #221# 1149 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.858232 1.9 +COMMENT 0.082322 1) +COMMENT #265=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.7563 6.96932 0 -10 4.0212 1.04901 #264#) +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.25316 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 25092276 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.5159 0 0 -10 1.17389 1.04901 #266#) +COMMENT #268=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.97528 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736120 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 13.8288 -15.681 0 -10 2.94721 1.04901 #268#) +COMMENT #270=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #217# +COMMENT 1649361704 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.0298 +COMMENT 5.19864 1 0.082322) 0.8 1.8 0) +COMMENT #271=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "TPP aptamer (tenA)" "@N" 1 15.1502 -5.22699 +COMMENT 0 -10 8.91657 1.04901 #270#)) (CObjectList)) +COMMENT #272=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #273=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.36571 1.9 +COMMENT 0.082322 1) +COMMENT #274=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 11.251 6.96932 0 -10 2.62252 1.04901 #273#)) +COMMENT (CObjectList)) +COMMENT #275=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #276=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.44133 1.9 +COMMENT 0.082322 1) +COMMENT #277=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 27916528 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 11.0076 13.9386 0 -10 2.62252 1.04901 #276#) +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.03401 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 25141176 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.76628 22.6503 0 -10 3.94627 1.04901 #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.70162 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736288 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 9.35867 19.1656 0 -10 4.0212 1.04901 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #283=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #229# 180 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.59961 5.77372 1 0.082322) 0.8 1.8 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 20961668 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.99395 17.4233 0 -10 2.7474 1.04901 #283#) +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.21622 5.39912 1 0.082322) 0.8 1.8 0) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24514780 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.7397 3.48466 0 -10 2.69745 1.04901 #285#)) +COMMENT (CObjectList)) +COMMENT #287=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #288=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.25316 1.9 0.082322 +COMMENT 1) +COMMENT #289=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736232 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.8317 -1.74233 0 -10 2.14797 1.04901 #288#)) +COMMENT (CObjectList)) +COMMENT #290=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1365 100) +COMMENT (CObjectList +COMMENT #291=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.34187 2.46566 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 -3.48466 0 -10 2.7474 1.04901 #291#)) +COMMENT (CObjectList)) +COMMENT #293=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1783 100) +COMMENT (CObjectList +COMMENT #294=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #221# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 2.68198 2.86664) +COMMENT #295=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -5.61507 -12.1963 0 -10 1.17389 1.04901 #294#) +COMMENT #296=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #221# 131079 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 1.05344 1.23986) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736136 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.0951 3.48466 0 -10 1.17389 1.04901 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.27426 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24799484 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.5268 1.74233 0 -10 1.49858 1.04901 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.31647 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736256 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 11.6363 5.22699 0 -10 1.49858 1.04901 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 100 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.40264 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 12.2799 8.71165 0 -10 5.86945 1.04901 +COMMENT #305#) +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.97177 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 100 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 13.8415 -17.4233 0 -10 2.7474 1.04901 #307#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #309=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 5439490 100) +COMMENT (CObjectList +COMMENT #310=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.04465 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736192 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2974)" "@N (@S)" 5 -13.1783 +COMMENT 5.22699 0 -10 4.67059 0.924127 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 24759296 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.5363 1.9 0.082322 +COMMENT 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736248 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.2889 +COMMENT 15.681 0 -10 4.34589 0.924127 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.68022 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2044)" "@N (@S)" 5 -8.9389 +COMMENT -10.454 0 -10 4.94533 0.924127 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.21446 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel (CWidget 0 (0 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.9158 +COMMENT -3.48466 0 -10 4.67059 0.924127 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.5237 1.9 0.082322 +COMMENT 1) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 26426820 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2133)" "@N (@S)" 5 -11.0975 +COMMENT -8.71165 0 -10 4.82044 0.924127 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.41144 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 25021844 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 11.8715 10.454 +COMMENT 0 -10 4.19603 0.924127 #326#)) (CObjectList)) +COMMENT #328=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #329=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.233903 1.9 +COMMENT 0.082322 1) +COMMENT #330=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 1114134 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3435)" "@N (@S)" 5 -5.84151 +COMMENT 12.1963 0 -10 4.74552 0.924127 #329#)) +COMMENT (CObjectList)) +COMMENT #331=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #332=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.777333 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736344 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3126)" "@N (@S)" 5 -11.1141 +COMMENT 8.71165 0 -10 4.62063 0.924127 #332#)) +COMMENT (CObjectList)) +COMMENT #334=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.97704 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (738)" "@N (@S)" 5 15.0191 +COMMENT -13.9386 0 -10 5.12016 0.924127 #335#) +COMMENT #337=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.46175 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24843980 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1031)" "@N (@S)" 5 15.5035 +COMMENT -22.6503 0 -10 5.51978 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 2 (10 #4# 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.07729 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736008 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (681)" "@N (@S)" 5 13.6141 +COMMENT -6.96932 0 -10 4.19603 0.924127 #340#) +COMMENT #342=(CScratch +COMMENT (CWidget 2 (1 #4# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.87543 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 393219 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (1933)" "@N (@S)" 5 -6.33152 +COMMENT -13.9386 0 -10 4.74552 0.924127 #342#)) +COMMENT (CObjectList)) +COMMENT #344=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #345=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.99639 1.9 +COMMENT 0.082322 1) +COMMENT #346=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736048 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (727)" "@N (@S)" 5 14.1437 +COMMENT -12.1963 0 -10 3.94627 0.924127 #345#) +COMMENT #347=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.97636 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26457860 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1307)" "@N (@S)" 5 12.1563 +COMMENT -24.3926 0 -10 4.42082 0.924127 #347#)) +COMMENT (CObjectList)) +COMMENT #349=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #350=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.98476 1.9 +COMMENT 0.082322 1) +COMMENT #351=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.95524 +COMMENT 20.908 0 -10 4.67059 0.924127 #350#) +COMMENT #352=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.97147 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736288 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2447)" "@N (@S)" 5 -13.7792 +COMMENT -5.22699 0 -10 5.27002 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 2 (10 #17# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #220# 25182936 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.05267 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24986684 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bmt}I (695)" "@N (@S)" 5 14.0546 +COMMENT -10.454 0 -10 4.27096 0.924127 #355#) +COMMENT #357=(CScratch +COMMENT (CWidget 2 (1 #17# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.71148 1.9 +COMMENT 0.082322 1) +COMMENT #358=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736312 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bmt}I (889)" "@N (@S)" 5 15.288 -20.908 +COMMENT 0 -10 4.27096 0.924127 #357#)) (CObjectList)) +COMMENT #359=(CGroupWidget +COMMENT (CWidget 2 (10 #18# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #360=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.0597 1.9 0.082322 +COMMENT 1) +COMMENT #361=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736328 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Nhe}I (691)" "@N (@S)" 5 13.7923 +COMMENT -8.71165 0 -10 4.19603 0.924127 #360#) +COMMENT #362=(CScratch +COMMENT (CWidget 2 (1 #18# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.71852 1.9 +COMMENT 0.082322 1) +COMMENT #363=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736328 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Nhe}I (885)" "@N (@S)" 5 15.2085 +COMMENT -19.1656 0 -10 4.27096 0.924127 #362#)) +COMMENT (CObjectList)) +COMMENT #364=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #365=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.43782 1.9 +COMMENT 0.082322 1) +COMMENT #366=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736120 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 11.7475 +COMMENT 12.1963 0 -10 4.14608 0.924127 #365#) +COMMENT #367=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.83742 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736352 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1386)" "@N (@S)" 5 11.119 +COMMENT -27.8773 0 -10 4.62063 0.924127 #367#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #369=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #370=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21266424 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2166..2804 + /vntifkey="33" + /label=ColE1 + terminator 1938..2042 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2863..2968) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2994..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3080..3101 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + mutation 741..741 + /vntifkey="62" + /label=orig\T + misc_feature 739..739 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + CDS 720..1931 + /vntifkey="4" + /label=tetA* + misc_feature 612..707 + /vntifkey="21" + /label=TPP\aptamer\(tenA) +BASE COUNT 801 a 973 c 925 g 868 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaaa attgctagga gagctggtgt tgccagctga gagtaagacc ttaagtcttt + 661 gatccttttt attacctgat ctagattatg ctagcgtagg gaagcaacag gagcaaacta + 721 tgcaagtcga cctgctggat ccaaaatcta acaatgcgct catcgtcatc ctcggcaccg + 781 tcaccctgga tgctgtaggc ataggcttgg ttatgccggt actgccgggc ctcttgcggg + 841 atatcgtcca ttccgacagc atcgccagtc actatggcgt gctgctagcg ctatatgcgt + 901 tgatgcaatt tctatgcgca cccgttctcg gagcactgtc cgaccgcttt ggccgccgcc + 961 cagtcctgct cgcttcgcta cttggagcca ctatcgacta cgcgatcatg gcgaccacac + 1021 ccgtcctgtg gatcctctac gccggacgca tcgtggccgg catcaccggc gccacaggtg + 1081 cggttgctgg cgcctatatc gccgacatca ccgatgggga agatcgggct cgccacttcg + 1141 ggctcatgag cgcttgtttc ggcgtgggta tggtggcagg ccccgtggcc gggggactgt + 1201 tgggcgccat ctccttgcat gcaccattcc ttgcggcggc ggtgctcaac ggcctcaacc + 1261 tactactggg ctgcttccta atgcaggagt cgcataaggg agagcgtcga ccgatgccct + 1321 tgagagcctt caacccagtc agctccttcc ggtgggcgcg gggcatgact atcgtcgccg + 1381 cacttatgac tgtcttcttt atcatgcaac tcgtaggaca ggtgccggca gcgctctggg + 1441 tcattttcgg cgaggaccgc tttcgctgga gcgcgacgat gatcggcctg tcgcttgcgg + 1501 tattcggaat cttgcacgcc ctcgctcaag ccttcgtcac tggtcccgcc accaaacgtt + 1561 tcggcgagaa gcaggccatt atcgccggca tggcggccga cgcgctgggc tacgtcttgc + 1621 tggcgttcgc gacgcgaggc tggatggcct tccccattat gattcttctc gcttccggcg + 1681 gcatcgggat gcccgcgttg caggccatgc tgtccaggca ggtagatgac gaccatcagg + 1741 gacagcttca aggatcgctc gcggctctta ccagcctaac ttcgatcact ggaccgctga + 1801 tcgtcacggc gatttatgcc gcctcggcga gcacatggaa cgggttggca tggattgtag + 1861 gcgccgccct ataccttgtc tgcctccccg cgttgcgtcg cggtgcatgg agccgggcca + 1921 cctcgaccta atctagaggc atcaaataaa acgaaaggct cagtcgaaag actgggcctt + 1981 tcgttttatc tgttgtttgt cggtgaacgc tctcctgagt aggacaaatc cgccgcccta + 2041 gacctaggcg ttcggctgcg gcgagcggta tcagctcact caaaggcggt aatacggtta + 2101 tccacagaat caggggataa cgcaggaaag aacatgtgag caaaaggcca gcaaaaggcc + 2161 aggaaccgta aaaaggccgc gttgctggcg tttttccata ggctccgccc ccctgacgag + 2221 catcacaaaa atcgacgctc aagtcagagg tggcgaaacc cgacaggact ataaagatac + 2281 caggcgtttc cccctggaag ctccctcgtg cgctctcctg ttccgaccct gccgcttacc + 2341 ggatacctgt ccgcctttct cccttcggga agcgtggcgc tttctcaatg ctcacgctgt + 2401 aggtatctca gttcggtgta ggtcgttcgc tccaagctgg gctgtgtgca cgaacccccc + 2461 gttcagcccg accgctgcgc cttatccggt aactatcgtc ttgagtccaa cccggtaaga + 2521 cacgacttat cgccactggc agcagccact ggtaacagga ttagcagagc gaggtatgta + 2581 ggcggtgcta cagagttctt gaagtggtgg cctaactacg gctacactag aaggacagta + 2641 tttggtatct gcgctctgct gaagccagtt accttcggaa aaagagttgg tagctcttga + 2701 tccggcaaac aaaccaccgc tggtagcggt ggtttttttg tttgcaagca gcagattacg + 2761 cgcagaaaaa aaggatctca agaagatcct ttgatctttt ctacggggtc tgacgctcag + 2821 tggaacgaaa actcacgtta agggattttg gtcatgacta gtgcttggat tctcaccaat + 2881 aaaaaacgcc cggcggcaac cgagcgttct gaacaaatcc agatggagtt ctgaggtcat + 2941 tactggatct atcaacagga gtccaagcga gctcaaactt ggtctgacag ttaccaatgc + 3001 ttaatcagtg aggcacctat ctcagcgatc tgtctatttc gttcatccat agttgcctga + 3061 ctccccgtcg tgtagataac tacgatacgg gagggcttac catctggccc cagtgctgca + 3121 atgataccgc gagacccacg ctcaccggct ccagatttat cagcaataaa ccagccagcc + 3181 ggaagggccg agcgcagaag tggtcctgca actttatccg cctccatcca gtctattaat + 3241 tgttgccggg aagctagagt aagtagttcg ccagttaata gtttgcgcaa cgttgttgcc + 3301 attgctacag gcatcgtggt gtcacgctcg tcgtttggta tggcttcatt cagctccggt + 3361 tcccaacgat caaggcgagt tacatgatcc cccatgttgt gcaaaaaagc ggttagctcc + 3421 ttcggtcctc cgatcgttgt cagaagtaag ttggccgcag tgttatcact catggttatg + 3481 gcagcactgc ataattctct tactgtcatg ccatccgtaa gatgcttttc tgtgactggt + 3541 gagtactcaa ccaagtcatt ctgagaa +// diff --git a/lib/VNTI files/pLactheo28bgl-lacZX.gb b/lib/VNTI files/pLactheo28bgl-lacZX.gb new file mode 100644 index 00000000..65ef3b80 --- /dev/null +++ b/lib/VNTI files/pLactheo28bgl-lacZX.gb @@ -0,0 +1,1121 @@ +LOCUS pLactheo28 5405 bp DNA circular 27-APR-2006 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|406034813| +COMMENT VNTDBDATE|408797983| +COMMENT LSOWNER| +COMMENT VNTNAME|pLactheo28bgl-lacZX| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLactheo28bgl-lacZX" 1 1128 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 9 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 1 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 1 1 0 470 469 471 1598 0 0 0 0 0 0 0 0) (CStringList) +COMMENT (CStringList) (CObList #1=(CDocZoom 1 5405 0)) +COMMENT (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #2=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1534 0 0 "") +COMMENT #4=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 894 0 0 "") +COMMENT #5=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3771 0 0 "") +COMMENT #6=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 687 0 0 "") +COMMENT #7=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2650 0 4812 0 0 "") +COMMENT #8=(CRSite (CStringList) "SalI" "gtcgac" 2 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1333 0 0 "") +COMMENT #10=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3882 0 0 "") +COMMENT #11=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 2 603 0 3714 0 0 "") +COMMENT #12=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 712 0 0 "") +COMMENT #13=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 710 0 0 "") +COMMENT #14=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3055 0 3170 0 +COMMENT 4285 0 0 "") #15=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #17=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 2012 0 2792 0 3217 0 +COMMENT 3469 0 3971 0 0 "") +COMMENT #18=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #20=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #21=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #22=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 833 0 1559 0 2039 0 2492 +COMMENT 0 5273 0 0 "") +COMMENT #23=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 4964 1 0 "") +COMMENT #24=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #25=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4691 0 0 "") +COMMENT #26=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2227 0 3479 1 0 +COMMENT "") #27=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #28=(CFSignal (CObList) "ColE1" 33 0 0 4004 4642 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #29=(CFSignal (CObList) "T1" 43 0 0 3776 3880 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #30=(CFSignal (CObList) "T0" 43 0 1 4701 4806 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #31=(CFSignal (CObList) "AmpR" 4 0 1 4832 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #32=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #33=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #34=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #35=(CFSignal (CObList) "bla-rev?" 21 0 0 4918 4939 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #36=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #37=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #38=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #39=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #40=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #41=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #42=(CFSignal (CObList) "theo28" 21 0 0 609 635 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "122..148") +COMMENT #43=(CFSignal (CObList) "RBS" 32 0 0 695 706 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "158..169") +COMMENT #44=(CFSignal (CObList) "lacZ" 4 0 0 707 3769 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "bgl-term" 43 0 0 636 685 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #48=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #49=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pLactheo28bgl-lacZX" 2) 5 "" 0 4) +COMMENT #50=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA molecule name: pLactheo28bgl-lacZX" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Entire molecule length: 5405 bp" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "fragment length: 1128 bp" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "from: 471" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "to: 1598" +COMMENT 1))) "General Description") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #61=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 609 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 609 End: 635 " 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 122..148" 1))) "theo28"))) +COMMENT "Misc. Feature (2 total)") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (1 total)") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 695 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 695 End: 706 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 158..169" 1))) "RBS"))) +COMMENT "RBS (1 total)") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 636 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 636 End: 685 " 1))) "bgl-term"))) +COMMENT "Terminator (1 total)") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #47# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #102=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #107=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #114=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24948504 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (1 #9# 2) 1 2 2 0 191) +COMMENT " N2: 1333 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #117=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25176928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 0 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #118=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25177248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #119=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24949304 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 0 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #120=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24948424 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #121=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24949064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BamHI: 0 sites") 1 5 "GGATCC" +COMMENT "CCTAGG") +COMMENT #122=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25177808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #123=(CGroupPar +COMMENT (CParagraph 0 (10 #26# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (1 #26# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #125=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24949384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #126=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 710 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #128=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25178048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #129=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25177008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #130=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25177408 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BsaI: 0 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #131=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25177728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 0 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24948984 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 1534 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24949544 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #138=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24948744 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 687 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #141=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24948904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #142=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 894 " 1))))) "KpnI: 1 site") 5 +COMMENT 1 "GGTACC" "CCATGG") +COMMENT #144=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25177088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #145=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24949464 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #146=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 712 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #148=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25177328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #149=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 833 " 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (1 #22# 2) 1 2 2 0 191) +COMMENT " N2: 1559 " 1))))) "PvuI: 2 sites") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24948664 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #153=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24948584 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 0 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25177488 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24949224 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24948824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25177168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CGroupPar +COMMENT (CParagraph 0 (10 #20# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #20# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25175568 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #161=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #162=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #163=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #164=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #165=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #166=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #167=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #168=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #169=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #170=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #171=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #172=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #173=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #174=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #175=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #176=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #177=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #178=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #179=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #180=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #181=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #182=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #183=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #184=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #185=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #186=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #187=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #188=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #189=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #190=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #191=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #192=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #193=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #194=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #195=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #196=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #197=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #198=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #199=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #200=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -1128) 1 0 1 1 0 +COMMENT (mapper: 19.6035 -25.6091 43.875 43.875 0.01 10 14 5405 1128 471 0 0) +COMMENT #201=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -736 100) +COMMENT (CObjectList +COMMENT #202=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -983 100) +COMMENT (CObjectList +COMMENT #203=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #167# 26396228 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27419 6.27219 1 0.0214037) 0.556133) +COMMENT #204=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #176# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 50 19 0 0 400 0 0 0 0 3 2 1 34 "Arial") +COMMENT 2.53336 0.91 0 "Fragment of pLactheo28bgl-lacZX" +COMMENT "Fragment of @N" 1 0 0.5 0 -2.91312 14.9744 1.1396 +COMMENT Nil) +COMMENT #205=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #175# 3736208 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 49 +COMMENT "Courier New") 2.53336 1.05 0 +COMMENT "1128 bp (molecule 5405 bp)" +COMMENT "@F bp (molecule @L bp)" 48 0 -0.8 0 -4.1798 14.2678 +COMMENT 1.32194 Nil)) (CObjectList)) +COMMENT #206=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -983 100) +COMMENT (CObjectList +COMMENT #207=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -261 100) +COMMENT (CObjectList +COMMENT #208=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #166# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 5.35557 5.50572 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #209=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #162# 24731916 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "theo28" "@N" 1 +COMMENT 0 0 -11.907 17.391 2.2792 0.843305 #208#) +COMMENT #210=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #170# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.66144 1.9 +COMMENT 0.082322 1) +COMMENT #211=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #162# 24958076 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "+1" "@N" 1 0 0 +COMMENT -12.1506 13.591 0.774929 0.843305 #210#)) +COMMENT (CObjectList)) +COMMENT #212=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -150 100) +COMMENT (CObjectList +COMMENT #213=(CPrimerArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #168# +COMMENT 1944545584 100) (LOGPEN 0 6 6723840) 8 +COMMENT 1.16464 5.90058 6.01736) 0.4 0.082322 1.8 +COMMENT 1.8 0) +COMMENT #214=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #162# 3736280 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "PlacF" "@N" 1 0 +COMMENT 0 -13.9129 8.52424 1.73219 0.843305 #213#)) +COMMENT (CObjectList)) +COMMENT #215=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -983 100) +COMMENT (CObjectList +COMMENT #216=(CLine +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #183# +COMMENT 1944545584 100) (LOGPEN 0 0 16711680) 1 +COMMENT 0.835356 6.13415 6.2565) +COMMENT #217=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #162# 26362916 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "BLI06" "@N" 1 0 +COMMENT 0 -14.9669 4.7242 1.80057 0.843305 #216#)) +COMMENT (CObjectList)) +COMMENT #218=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -872 100) +COMMENT (CObjectList +COMMENT #219=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #178# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.54465 6.12303 1 0.082322) 0.8 1.8 0) +COMMENT #220=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #162# 21557284 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "P(lac)" "@N" 1 +COMMENT 0 0 -13.4414 11.0576 1.86895 0.843305 #219#)) +COMMENT (CObjectList)) +COMMENT #221=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -428 100) +COMMENT (CObjectList +COMMENT #222=(CLine +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #168# +COMMENT 1944545584 100) (LOGPEN 0 6 6723840) 8 +COMMENT 0.670712 5.54465 5.66144) +COMMENT #223=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #162# 393244 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "lacO" "@N" 1 0 +COMMENT 0 -12.2291 14.8576 1.4359 0.843305 #222#)) +COMMENT (CObjectList)) +COMMENT #224=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil -928 100) +COMMENT (CObjectList +COMMENT #225=(CLine +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #182# +COMMENT 1944545584 100) (LOGPEN 0 6 16711680) 8 +COMMENT 0.835356 4.96071 5.02745) +COMMENT #226=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #162# 3736312 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "RBS" "@N" 1 0 0 +COMMENT -9.54477 21.191 1.32194 0.843305 #225#)) +COMMENT (CObjectList)) +COMMENT #227=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -928 100) +COMMENT (CObjectList +COMMENT #228=(CLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #170# 720906 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 5.0775 5.35557) +COMMENT #229=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #162# 3736272 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "bgl-term" "@N" +COMMENT 1 0 0 -11.3251 18.6577 2.96296 0.843305 #228#)) +COMMENT (CObjectList)) +COMMENT #230=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -823 100) +COMMENT (CObjectList +COMMENT #231=(CScratch +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #170# 28208280 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.72817 1.9 +COMMENT 0.082322 1) +COMMENT #232=(CLabel (CWidget 0 (0 0) 1 2 0 0 #162# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "-10" "@N" 1 0 0 +COMMENT -12.5639 12.3243 1.02564 0.843305 #231#)) +COMMENT (CObjectList)) +COMMENT #233=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -94 100) +COMMENT (CObjectList +COMMENT #234=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #170# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.86165 1.9 +COMMENT 0.082322 1) +COMMENT #235=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #162# 27029332 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "-35" "@N" 1 0 0 +COMMENT -13.1397 9.79092 1.02564 0.843305 #234#)) +COMMENT (CObjectList)) +COMMENT #236=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -983 100) +COMMENT (CObjectList +COMMENT #237=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #170# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 6.13415 1.9 +COMMENT 0.082322 1) +COMMENT #238=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #162# 24959452 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 36 14 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "AG insertion" +COMMENT "@N" 1 0 0 -15.9109 7.25756 4.21652 0.843305 +COMMENT #237#)) (CObjectList))) (CObjectList)) +COMMENT #239=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -712 100) +COMMENT (CObjectList +COMMENT #240=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil -600 100) +COMMENT (CObjectList +COMMENT #241=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #169# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.361487 1.9 +COMMENT 0.082322 1) +COMMENT #242=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #171# 24521376 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Cla}I (1534)" "@N (@S)" 5 0 0 14.0142 +COMMENT 4.7242 2.46154 0.547009 #241#)) (CObjectList)) +COMMENT #243=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -322 100) +COMMENT (CObjectList +COMMENT #244=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #169# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.92074 1.9 +COMMENT 0.082322 1) +COMMENT #245=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #171# 3736288 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Kpn}I (894)" "@N (@S)" 5 0 0 -5.57483 +COMMENT 4.7242 2.64387 0.547009 #244#)) (CObjectList)) +COMMENT #246=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -211 100) +COMMENT (CObjectList +COMMENT #247=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #169# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.07194 1.9 +COMMENT 0.082322 1) +COMMENT #248=(CLabel (CWidget 0 (0 0) 1 2 0 0 #171# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Hin}dIII (687)" "@N (@S)" 5 0 0 -10.781 +COMMENT 19.9244 3.12251 0.547009 #247#)) +COMMENT (CObjectList)) +COMMENT #249=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -489 100) +COMMENT (CObjectList +COMMENT #250=(CScratch +COMMENT (CWidget 2 (1 #9# 2) 1 2 0 0 #169# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.47931 1.9 +COMMENT 0.082322 1) +COMMENT #251=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #171# 25073584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Aat}II (1333)" "@N (@S)" 5 0 0 8.9654 +COMMENT 3.45752 2.64387 0.547009 #250#)) +COMMENT (CObjectList)) +COMMENT #252=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -656 100) +COMMENT (CObjectList +COMMENT #253=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #169# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.53909 1.9 +COMMENT 0.082322 1) +COMMENT #254=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #171# 25064924 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 0 0 -12.6142 +COMMENT 16.1243 2.75783 0.547009 #253#)) +COMMENT (CObjectList)) +COMMENT #255=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -934 100) +COMMENT (CObjectList +COMMENT #256=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #169# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.9329 1.9 0.082322 +COMMENT 1) +COMMENT #257=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #171# 26563896 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Nsi}I (712)" "@N (@S)" 5 0 0 -9.6569 +COMMENT 23.7244 2.07407 0.547009 #256#)) +COMMENT (CObjectList)) +COMMENT #258=(CGroupWidget +COMMENT (CWidget 1 (10 #13# 0) 1 2 0 0 Nil -767 100) +COMMENT (CObjectList +COMMENT #259=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #169# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.94403 1.9 +COMMENT 0.082322 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #171# 1128481089 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Bfr}BI (710)" "@N (@S)" 5 0 0 -9.92141 +COMMENT 22.4577 2.50712 0.547009 #259#)) +COMMENT (CObjectList)) +COMMENT #261=(CGroupWidget +COMMENT (CWidget 1 (10 #20# 0) 1 2 0 0 Nil -545 100) +COMMENT (CObjectList +COMMENT #262=(CScratch +COMMENT (CWidget 1 (1 #20# 1) 1 2 0 0 #169# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.16196 1.9 +COMMENT 0.082322 1) +COMMENT #263=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #171# 24585052 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 0 0 -15.1534 +COMMENT 5.99088 2.46154 0.547009 #262#)) +COMMENT (CObjectList)) +COMMENT #264=(CGroupWidget +COMMENT (CWidget 1 (10 #26# 0) 1 2 0 0 Nil -1335 100) +COMMENT (CObjectList +COMMENT #265=(CScratch +COMMENT (CWidget 1 (1 #26# 1) 1 2 0 0 #169# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.24538 1.9 +COMMENT 0.082322 1) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #171# 20916664 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 0 0 -15.4449 +COMMENT 3.45752 2.32479 0.547009 #265#)) +COMMENT (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 2 (10 #22# 0) 1 2 0 0 Nil -378 100) +COMMENT (CObjectList +COMMENT #268=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #169# 268742984 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.25998 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #161# 3736104 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 0 +COMMENT "{\\i Pvu}I (833)" "@N (@S)" 5 0 0 -6.91313 +COMMENT 3.45752 2.39316 0.547009 #268#) +COMMENT #270=(CScratch +COMMENT (CWidget 2 (1 #22# 2) 1 2 0 0 #169# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.222453 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #161# 20916824 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 30 11 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 0 +COMMENT "{\\i Pvu}I (1559)" "@N (@S)" 5 0 0 14.7105 +COMMENT 3.45752 2.5755 0.547009 #270#)) (CObjectList))) +COMMENT (CObjectList)) +COMMENT #272=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1276 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #273=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 1474 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 9 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21272968 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4004..4642 + /vntifkey="33" + /label=ColE1 + terminator 3776..3880 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4701..4806) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4832..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 4918..4939 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 609..635 + /vntifkey="21" + /label=theo28 + RBS 695..706 + /vntifkey="32" + /label=RBS + CDS 707..3769 + /vntifkey="4" + /label=lacZ + misc_feature 581..581 + /vntifkey="21" + /label=+1 + terminator 636..685 + /vntifkey="43" + /label=bgl-term + -10_signal 569..574 + /vntifkey="47" + /label=-10 +BASE COUNT 1284 a 1422 c 1445 g 1254 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattctga taccagccga aaggcccttg gcagcaaaac ctgacataac cagagaatac + 661 tggtgaagtc gggttttttt gttttaagct tatcaggaaa aaaaaaatgc atatagatcc + 721 cgtcgtttta caacgtcgtg actgggaaaa ccctggcgtt acccaactta atcgccttgc + 781 agcacatccc cctttcgcca gctggcgtaa tagcgaagag gcccgcaccg atcgcccttc + 841 ccaacagttg cgcagcctga atggcgaatg gcgctttgcc tggtttccgg taccagaagc + 901 ggtgccggaa agctggctgg agtgcgatct tcctgaggcc gatactgtcg tcgtcccctc + 961 aaactggcag atgcacggtt acgatgcgcc catctacacc aacgtaacct atcccattac + 1021 ggtcaatccg ccgtttgttc ccacggagaa tccgacgggt tgttactcgc tcacatttaa + 1081 tgttgatgaa agctggctac aggaaggcca gacgcgaatt atttttgatg gcgttaactc + 1141 ggcgtttcat ctgtggtgca acgggcgctg ggtcggttac ggccaggaca gtcgtttgcc + 1201 gtctgaattt gacctgagcg catttttacg cgccggagaa aaccgcctcg cggtgatggt + 1261 gctgcgttgg agtgacggca gttatctgga agatcaggat atgtggcgga tgagcggcat + 1321 tttccgtgac gtctcgttgc tgcataaacc gactacacaa atcagcgatt tccatgttgc + 1381 cactcgcttt aatgatgatt tcagccgcgc tgtactggag gctgaagttc agatgtgcgg + 1441 cgagttgcgt gactacctac gggtaacagt ttctttatgg cagggtgaaa cgcaggtcgc + 1501 cagcggcacc gcgcctttcg gcggtgaaat tatcgatgag cgtggtggtt atgccgatcg + 1561 cgtcacacta cgtctgaacg tcgaaaaccc gaaactgtgg agcgccgaaa tcccgaatct + 1621 ctatcgtgcg gtggttgaac tgcacaccgc cgacggcacg ctgattgaag cagaagcctg + 1681 cgatgtcggt ttccgcgagg tgcggattga aaatggtctg ctgctgctga acggcaagcc + 1741 gttgctgatt cgaggcgtta accgtcacga gcatcatcct ctgcatggtc aggtcatgga + 1801 tgagcagacg atggtgcagg atatcctgct gatgaagcag aacaacttta acgccgtgcg + 1861 ctgttcgcat tatccgaacc atccgctgtg gtacacgctg tgcgaccgct acggcctgta + 1921 tgtggtggat gaagccaata ttgaaaccca cggcatggtg ccaatgaatc gtctgaccga + 1981 tgatccgcgc tggctaccgg cgatgagcga acgcgtaacg cgaatggtgc agcgcgatcg + 2041 taatcacccg agtgtgatca tctggtcgct ggggaatgaa tcaggccacg gcgctaatca + 2101 cgacgcgctg tatcgctgga tcaaatctgt cgatccttcc cgcccggtgc agtatgaagg + 2161 cggcggagcc gacaccacgg ccaccgatat tatttgcccg atgtacgcgc gcgtggatga + 2221 agaccagccc ttcccggctg tgccgaaatg gtccatcaaa aaatggcttt cgctacctgg + 2281 agagacgcgc ccgctgatcc tttgcgaata cgcccacgcg atgggtaaca gtcttggcgg + 2341 tttcgctaaa tactggcagg cgtttcgtca gtatccccgt ttacagggcg gcttcgtctg + 2401 ggactgggtg gatcagtcgc tgattaaata tgatgaaaac ggcaacccgt ggtcggctta + 2461 cggcggtgat tttggcgata cgccgaacga tcgccagttc tgtatgaacg gtctggtctt + 2521 tgccgaccgc acgccgcatc cagcgctgac ggaagcaaaa caccagcagc agtttttcca + 2581 gttccgttta tccgggcaaa ccatcgaagt gaccagcgaa tacctgttcc gtcatagcga + 2641 taacgagctc ctgcactgga tggtggcgct ggatggtaag ccgctggcaa gcggtgaagt + 2701 gcctctggat gtcgctccac aaggtaaaca gttgattgaa ctgcctgaac taccgcagcc + 2761 ggagagcgcc gggcaactct ggctcacagt acgcgtagtg caaccgaacg cgaccgcatg + 2821 gtcagaagcc gggcacatca gcgcctggca gcagtggcgt ctggcggaaa acctcagtgt + 2881 gacgctcccc gccgcgtccc acgccatccc gcatctgacc accagcgaaa tggatttttg + 2941 catcgagctg ggtaataagc gttggcaatt taaccgccag tcaggctttc tttcacagat + 3001 gtggattggc gataaaaaac aactgctgac gccgctgcgc gatcagttca cccgtgcacc + 3061 gctggataac gacattggcg taagtgaagc gacccgcatt gaccctaacg cctgggtcga + 3121 acgctggaag gcggcgggcc attaccaggc cgaagcagcg ttgttgcagt gcacggcaga + 3181 tacacttgct gatgcggtgc tgattacgac cgctcacgcg tggcagcatc aggggaaaac + 3241 cttatttatc agccggaaaa cctaccggat tgatggtagt ggtcaaatgg cgattaccgt + 3301 tgatgttgaa gtggcgagcg atacaccgca tccggcgcgg attggcctga actgccagct + 3361 ggcgcaggta gcagagcggg taaactggct cggattaggg ccgcaagaaa actatcccga + 3421 ccgccttact gccgcctgtt ttgaccgctg ggatctgcca ttgtcagaca tgtatacccc + 3481 gtacgtcttc ccgagcgaaa acggtctgcg ctgcgggacg cgcgaattga attatggccc + 3541 acaccagtgg cgcggcgact tccagttcaa catcagccgc tacagtcaac agcaactgat + 3601 ggaaaccagc catcgccatc tgctgcacgc ggaagaaggc acatggctga atatcgacgg + 3661 tttccatatg gggattggtg gcgacgactc ctggagcccg tcagtatcgg cggaattcca + 3721 gctgagcgcc ggtcgctacc attaccagtt ggtctggtgt caaaaataat ctagaggcat + 3781 caaataaaac gaaaggctca gtcgaaagac tgggcctttc gttttatctg ttgtttgtcg + 3841 gtgaacgctc tcctgagtag gacaaatccg ccgccctaga cctaggcgtt cggctgcggc + 3901 gagcggtatc agctcactca aaggcggtaa tacggttatc cacagaatca ggggataacg + 3961 caggaaagaa catgtgagca aaaggccagc aaaaggccag gaaccgtaaa aaggccgcgt + 4021 tgctggcgtt tttccatagg ctccgccccc ctgacgagca tcacaaaaat cgacgctcaa + 4081 gtcagaggtg gcgaaacccg acaggactat aaagatacca ggcgtttccc cctggaagct + 4141 ccctcgtgcg ctctcctgtt ccgaccctgc cgcttaccgg atacctgtcc gcctttctcc + 4201 cttcgggaag cgtggcgctt tctcaatgct cacgctgtag gtatctcagt tcggtgtagg + 4261 tcgttcgctc caagctgggc tgtgtgcacg aaccccccgt tcagcccgac cgctgcgcct + 4321 tatccggtaa ctatcgtctt gagtccaacc cggtaagaca cgacttatcg ccactggcag + 4381 cagccactgg taacaggatt agcagagcga ggtatgtagg cggtgctaca gagttcttga + 4441 agtggtggcc taactacggc tacactagaa ggacagtatt tggtatctgc gctctgctga + 4501 agccagttac cttcggaaaa agagttggta gctcttgatc cggcaaacaa accaccgctg + 4561 gtagcggtgg tttttttgtt tgcaagcagc agattacgcg cagaaaaaaa ggatctcaag + 4621 aagatccttt gatcttttct acggggtctg acgctcagtg gaacgaaaac tcacgttaag + 4681 ggattttggt catgactagt gcttggattc tcaccaataa aaaacgcccg gcggcaaccg + 4741 agcgttctga acaaatccag atggagttct gaggtcatta ctggatctat caacaggagt + 4801 ccaagcgagc tcaaacttgg tctgacagtt accaatgctt aatcagtgag gcacctatct + 4861 cagcgatctg tctatttcgt tcatccatag ttgcctgact ccccgtcgtg tagataacta + 4921 cgatacggga gggcttacca tctggcccca gtgctgcaat gataccgcga gacccacgct + 4981 caccggctcc agatttatca gcaataaacc agccagccgg aagggccgag cgcagaagtg + 5041 gtcctgcaac tttatccgcc tccatccagt ctattaattg ttgccgggaa gctagagtaa + 5101 gtagttcgcc agttaatagt ttgcgcaacg ttgttgccat tgctacaggc atcgtggtgt + 5161 cacgctcgtc gtttggtatg gcttcattca gctccggttc ccaacgatca aggcgagtta + 5221 catgatcccc catgttgtgc aaaaaagcgg ttagctcctt cggtcctccg atcgttgtca + 5281 gaagtaagtt ggccgcagtg ttatcactca tggttatggc agcactgcat aattctctta + 5341 ctgtcatgcc atccgtaaga tgcttttctg tgactggtga gtactcaacc aagtcattct + 5401 gagaa +// diff --git a/lib/VNTI files/pLacthiM2gfpuv.gb b/lib/VNTI files/pLacthiM2gfpuv.gb new file mode 100644 index 00000000..09fc2f39 --- /dev/null +++ b/lib/VNTI files/pLacthiM2gfpuv.gb @@ -0,0 +1,1512 @@ +LOCUS pLacthiMgf 3096 bp DNA circular 19-SEP-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|454947700| +COMMENT VNTDBDATE|457876691| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMgfpuv-N30#2| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMgfpuv-N30#2" 0 3096 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3096 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 737 0 1263 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1450 0 2503 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 726 0 1346 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1573 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 1976 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 1065 0 1662 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 2 491 0 1164 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2964 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2655 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 2382 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 476 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1695 2333 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1467 1571 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2392 2497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2523 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2609 2630 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 741 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 740 740 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 738 738 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "gfpuv" 4 0 0 719 1459 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #48=(CFSignal (CObList) "stop codon" 21 0 0 1457 1459 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #49=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #50=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacthiMgfpuv-N30#2" 2) 5 "" 0 4) +COMMENT #51=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMgfpuv-N30#2'" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 08/17/07 02:21\214\337\214\343" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 09/19/07 11:58\214\337\221O" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3096 bp" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #64=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 719 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 719 End: 1459" 1))) "gfpuv") +COMMENT #70=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2523 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2523 End: 284 (Complementary)" +COMMENT 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #75=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 741 " 1))) +COMMENT "core riboswitch") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1))) +COMMENT "TPP aptamer") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 738 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 738 End: 738 " 1))) "orig G") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1457 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1457 End: 1459" 1))) +COMMENT "stop codon") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2609 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2609 End: 2630" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (6 total)") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #118=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #122=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1695 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1695 End: 2333" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #128=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1467 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1467 End: 1571" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2392 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2392 End: 2497 (Complementary)" +COMMENT 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #141=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #142=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #146=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion") +COMMENT #152=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 740 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 740 End: 740 " 1))) +COMMENT "orig T"))) "Mutation (2 total)"))) +COMMENT "Feature Map") +COMMENT #154=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27157688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27117392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #159=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 1065 " 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1662 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27117712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27158488 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1976 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27157608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1573 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27158248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 737 " 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1263 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27118112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #175=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27158568 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27118192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27117472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #180=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27117872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #181=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #182=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2655 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27118032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #184=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2382 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27158168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27158728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27157928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27158088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27117552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27158648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27117792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2964 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27157848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #200=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1450 " 1) +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2503 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27157768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 726 " 1) +COMMENT #206=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1346 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27117952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27158408 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27158008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27117632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #211=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1) +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #19# 2) 1 2 2 0 191) +COMMENT " N2: 1164 " 1))))) "XhoI: 2 sites") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27117312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #215=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #216=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #217=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #218=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #219=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #220=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #221=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #222=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #223=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #224=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #225=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #226=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #227=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #228=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #229=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #230=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #231=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #232=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #233=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #234=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #235=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #236=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #237=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #238=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #239=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #240=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #241=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #242=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #243=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #244=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #245=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #246=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #247=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #248=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #249=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #250=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #251=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #252=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #253=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #254=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -87) 1 1 0 1 1 +COMMENT (mapper: 18.9326 -21.4402 40.0378 40.0378 0.01 10 -1 3096 3096 1 0 0) +COMMENT #255=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #256=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #257=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 27049012 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27621 6.27421 1 0.0214037) 0.202622) +COMMENT #258=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMgfpuv-N30#2" "@N" 1 0 +COMMENT 0.871165 0 -10 11.9387 1.44863 Nil) +COMMENT #259=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #217# 54196124 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3096 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #260=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #261=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -736 100) +COMMENT (CObjectList +COMMENT #262=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.69774 1.16305 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #263=(CLabel (CWidget 0 (0 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.77154 10.454 0 -10 2.72243 1.04901 #262#) +COMMENT #264=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.31693 4.81836 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #265=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 54124604 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 11.9288 -24.3926 0 -10 2.79736 1.04901 #264#)) +COMMENT (CObjectList)) +COMMENT #266=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #267=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.988797 1.9 +COMMENT 0.082322 1) +COMMENT #268=(CLabel (CWidget 0 (0 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -12.0041 6.96932 0 -10 3.97125 1.04901 +COMMENT #267#) +COMMENT #269=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.09798 1.9 +COMMENT 0.082322 1) +COMMENT #270=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 24636596 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 11.9726 -6.96932 0 -10 1.14891 1.04901 #269#) +COMMENT #271=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.77175 +COMMENT 5.02706 1 0.082322) 0.8 1.8 0) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 20927380 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 15.7586 -13.9386 0 +COMMENT -10 7.26813 1.04901 #271#) +COMMENT #273=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #224# 20915864 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 4.77986 1.9 +COMMENT 0.082322 1) +COMMENT #274=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27165252 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 14.3277 -19.1656 0 -10 2.92224 1.04901 #273#) +COMMENT #275=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 4.87509 +COMMENT 5.02706 1 0.082322) 0.8 1.8 0) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 21189644 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 15.0069 -12.1963 0 -10 5.8195 1.04901 +COMMENT #275#) +COMMENT #277=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.32301 1.9 +COMMENT 0.082322 1) +COMMENT #278=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 24967812 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "stop codon" +COMMENT "@N" 1 5.63381 -33.1043 0 -10 5.295 1.04901 +COMMENT #277#)) (CObjectList)) +COMMENT #279=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -178 100) +COMMENT (CObjectList +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.22765 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel (CWidget 0 (0 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 13.1257 0 0 -10 2.59755 1.04901 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1783 100) +COMMENT (CObjectList +COMMENT #283=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.31478 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 3736232 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 11.3886 6.96932 0 -10 2.59755 1.04901 #283#) +COMMENT #285=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.99762 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel (CWidget 0 (0 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 6.11871 19.1656 0 -10 3.92129 1.04901 #285#) +COMMENT #287=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.61466 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel (CWidget 0 (0 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 10.062 15.681 0 -10 3.97125 1.04901 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList +COMMENT #290=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.49714 5.69774 1 0.082322) 0.8 1.8 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 9.56049 12.1963 0 -10 2.72243 1.04901 #290#) +COMMENT #292=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.05543 5.26615 1 0.082322) 0.8 1.8 0) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 24609212 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.731 -3.48466 0 -10 2.67247 1.04901 #292#)) +COMMENT (CObjectList)) +COMMENT #294=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #295=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.09798 1.9 0.082322 +COMMENT 1) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 24636140 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5391 -8.71165 0 -10 2.14797 1.04901 #295#)) +COMMENT (CObjectList)) +COMMENT #297=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #298=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.54601 2.84076 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 26580300 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.3033 -6.96932 0 -10 2.72243 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1922 100) +COMMENT (CObjectList +COMMENT #301=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #224# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 3.08999 3.30274) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 3736200 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.38678 -34.8466 0 -10 1.14891 1.04901 #301#) +COMMENT #303=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #224# 720906 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 1.21371 1.42849) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 3736152 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.2332 3.48466 0 -10 1.14891 1.04901 #303#)) +COMMENT (CObjectList)) +COMMENT #305=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -2132 100) +COMMENT (CObjectList +COMMENT #306=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.12229 1.9 +COMMENT 0.082322 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 24800436 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 11.8365 -5.22699 0 -10 1.47361 1.04901 #306#)) +COMMENT (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -2062 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.17092 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 25419684 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.5181 -1.74233 0 -10 1.47361 1.04901 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #312=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.27021 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 6751096 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 14.3998 1.74233 0 -10 5.8195 1.04901 +COMMENT #312#) +COMMENT #314=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.77581 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 14.2969 -20.908 0 -10 2.72243 1.04901 #314#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #316=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1992 100) +COMMENT (CObjectList +COMMENT #317=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #318=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.4242 1.9 0.082322 +COMMENT 1) +COMMENT #319=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 6751096 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.8682 +COMMENT 10.454 0 -10 4.29594 0.924127 #318#)) +COMMENT (CObjectList)) +COMMENT #320=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1294 100) +COMMENT (CObjectList +COMMENT #321=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.08796 1.9 +COMMENT 0.082322 1) +COMMENT #322=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 26744396 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1573)" "@N (@S)" 5 -3.87574 +COMMENT -13.9386 0 -10 4.84542 0.924127 #321#)) +COMMENT (CObjectList)) +COMMENT #323=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #324=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.0534 1.9 0.082322 +COMMENT 1) +COMMENT #325=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 3801744 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.2695 +COMMENT -10.454 0 -10 4.64561 0.924127 #324#)) +COMMENT (CObjectList)) +COMMENT #326=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #327=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.269488 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 27335564 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2964)" "@N (@S)" 5 -6.23678 +COMMENT 12.1963 0 -10 4.69556 0.924127 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -1088 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.89559 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 26742508 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2655)" "@N (@S)" 5 -12.0887 +COMMENT 8.71165 0 -10 4.64561 0.924127 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -2274 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.31073 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 21028300 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 12.9779 +COMMENT 5.22699 0 -10 4.12111 0.924127 #333#)) +COMMENT (CObjectList)) +COMMENT #335=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #336=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.78189 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 26897756 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (737)" "@N (@S)" 5 15.5025 +COMMENT -17.4233 0 -10 5.09519 0.924127 #336#) +COMMENT #338=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.71609 1.9 +COMMENT 0.082322 1) +COMMENT #339=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 26578004 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1263)" "@N (@S)" 5 10.4292 +COMMENT -27.8773 0 -10 5.56974 0.924127 #338#)) +COMMENT (CObjectList)) +COMMENT #340=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #341=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.33719 1.9 +COMMENT 0.082322 1) +COMMENT #342=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 27210188 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1450)" "@N (@S)" 5 5.71286 +COMMENT -31.3619 0 -10 4.57068 0.924127 #341#) +COMMENT #343=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.20358 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 26868756 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2503)" "@N (@S)" 5 -13.6156 +COMMENT 5.22699 0 -10 4.64561 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.80417 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel (CWidget 0 (0 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (726)" "@N (@S)" 5 14.791 -15.681 +COMMENT 0 -10 3.92129 0.924127 #346#) +COMMENT #348=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.54792 1.9 +COMMENT 0.082322 1) +COMMENT #349=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 21380836 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1346)" "@N (@S)" 5 8.02137 +COMMENT -29.6196 0 -10 4.37087 0.924127 #348#)) +COMMENT (CObjectList)) +COMMENT #350=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -457 100) +COMMENT (CObjectList +COMMENT #351=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.94088 1.9 +COMMENT 0.082322 1) +COMMENT #352=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 26583700 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 7.34894 +COMMENT 17.4233 0 -10 4.64561 0.924127 #351#) +COMMENT #353=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.2714 1.9 0.082322 +COMMENT 1) +COMMENT #354=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 21536012 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1976)" "@N (@S)" 5 -12.1221 +COMMENT -8.71165 0 -10 5.17011 0.924127 #353#)) +COMMENT (CObjectList)) +COMMENT #355=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -1716 100) +COMMENT (CObjectList +COMMENT #356=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.11728 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 21378956 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1065)" "@N (@S)" 5 13.4704 +COMMENT -22.6503 0 -10 4.74552 0.924127 #356#) +COMMENT #358=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.90763 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 21386236 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1662)" "@N (@S)" 5 -5.92061 +COMMENT -12.1963 0 -10 4.74552 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 2 (10 #19# 0) 1 2 0 0 Nil -809 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.28034 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 3801800 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 13.6022 +COMMENT 3.48466 0 -10 4.17106 0.924127 #361#) +COMMENT #363=(CScratch +COMMENT (CWidget 2 (1 #19# 2) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.91669 1.9 +COMMENT 0.082322 1) +COMMENT #364=(CLabel (CWidget 0 (0 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (1164)" "@N (@S)" 5 11.8004 +COMMENT -26.1349 0 -10 4.64561 0.924127 #363#)) +COMMENT (CObjectList)) +COMMENT #365=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -739 100) +COMMENT (CObjectList +COMMENT #366=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.60048 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 27066420 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 10.8066 +COMMENT 13.9386 0 -10 4.77049 0.924127 #366#) +COMMENT #368=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.38773 1.9 +COMMENT 0.082322 1) +COMMENT #369=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 27274252 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 12.2271 +COMMENT 8.71165 0 -10 4.77049 0.924127 #368#) +COMMENT #370=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.44875 1.9 +COMMENT 0.082322 1) +COMMENT #371=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 21517372 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2382)" "@N (@S)" 5 -14.5253 +COMMENT 1.74233 0 -10 5.295 0.924127 #370#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #372=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1158 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #373=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1228 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21288632 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1695..2333 + /vntifkey="33" + /label=ColE1 + terminator 1467..1571 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2392..2497) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2523..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2609..2630 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..741 + /vntifkey="21" + /label=core\riboswitch + mutation 740..740 + /vntifkey="62" + /label=orig\T + misc_feature 738..738 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 719..1459 + /vntifkey="4" + /label=gfpuv + misc_feature 1457..1459 + /vntifkey="21" + /label=stop\codon +BASE COUNT 842 a 751 c 719 g 784 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gctattacaa gaagatcagg agcaaactat + 721 gcaagtcgac ctgctggatc cattgagtaa aggagaagaa cttttcactg gagttgtccc + 781 aattcttgtt gaattagatg gtgatgttaa tgggcacaaa ttttctgtca gtggagaggg + 841 tgaaggtgat gcaacatacg gaaaacttac ccttaaattt atttgcacta ctggaaaact + 901 acctgttcca tggccaacac ttgtcactac tttctcttat ggtgttcaat gcttttcccg + 961 ttatccggat catatgaaac ggcatgactt tttcaagagt gccatgcccg aaggttatgt + 1021 acaggaacgc actatatctt tcaaagatga cgggaactac aagacgcgtg ctgaagtcaa + 1081 gtttgaaggt gatacccttg ttaatcgtat cgagttaaaa ggtattgatt ttaaagaaga + 1141 tggaaacatt ctcggacaca aactcgagta caactataac tcacacaatg tatacatcac + 1201 ggcagacaaa caaaagaatg gaatcaaagc taacttcaaa attcgccaca acattgaaga + 1261 tggatccgtt caactagcag accattatca acaaaatact ccaattggcg atggccctgt + 1321 ccttttacca gacaaccatt acctgtcgac acaatctgcc ctttcgaaag atcccaacga + 1381 aaagcgtgac cacatggtcc ttcttgagtt tgtaactgct gctgggatta cacatggcat + 1441 ggatgagctc tacaaataaa gctagaggca tcaaataaaa cgaaaggctc agtcgaaaga + 1501 ctgggccttt cgttttatct gttgtttgtc ggtgaacgct ctcctgagta ggacaaatcc + 1561 gccgccctag acctaggcgt tcggctgcgg cgagcggtat cagctcactc aaaggcggta + 1621 atacggttat ccacagaatc aggggataac gcaggaaaga acatgtgagc aaaaggccag + 1681 caaaaggcca ggaaccgtaa aaaggccgcg ttgctggcgt ttttccatag gctccgcccc + 1741 cctgacgagc atcacaaaaa tcgacgctca agtcagaggt ggcgaaaccc gacaggacta + 1801 taaagatacc aggcgtttcc ccctggaagc tccctcgtgc gctctcctgt tccgaccctg + 1861 ccgcttaccg gatacctgtc cgcctttctc ccttcgggaa gcgtggcgct ttctcaatgc + 1921 tcacgctgta ggtatctcag ttcggtgtag gtcgttcgct ccaagctggg ctgtgtgcac + 1981 gaaccccccg ttcagcccga ccgctgcgcc ttatccggta actatcgtct tgagtccaac + 2041 ccggtaagac acgacttatc gccactggca gcagccactg gtaacaggat tagcagagcg + 2101 aggtatgtag gcggtgctac agagttcttg aagtggtggc ctaactacgg ctacactaga + 2161 aggacagtat ttggtatctg cgctctgctg aagccagtta ccttcggaaa aagagttggt + 2221 agctcttgat ccggcaaaca aaccaccgct ggtagcggtg gtttttttgt ttgcaagcag + 2281 cagattacgc gcagaaaaaa aggatctcaa gaagatcctt tgatcttttc tacggggtct + 2341 gacgctcagt ggaacgaaaa ctcacgttaa gggattttgg tcatgactag tgcttggatt + 2401 ctcaccaata aaaaacgccc ggcggcaacc gagcgttctg aacaaatcca gatggagttc + 2461 tgaggtcatt actggatcta tcaacaggag tccaagcgag ctcaaacttg gtctgacagt + 2521 taccaatgct taatcagtga ggcacctatc tcagcgatct gtctatttcg ttcatccata + 2581 gttgcctgac tccccgtcgt gtagataact acgatacggg agggcttacc atctggcccc + 2641 agtgctgcaa tgataccgcg agacccacgc tcaccggctc cagatttatc agcaataaac + 2701 cagccagccg gaagggccga gcgcagaagt ggtcctgcaa ctttatccgc ctccatccag + 2761 tctattaatt gttgccggga agctagagta agtagttcgc cagttaatag tttgcgcaac + 2821 gttgttgcca ttgctacagg catcgtggtg tcacgctcgt cgtttggtat ggcttcattc + 2881 agctccggtt cccaacgatc aaggcgagtt acatgatccc ccatgttgtg caaaaaagcg + 2941 gttagctcct tcggtcctcc gatcgttgtc agaagtaagt tggccgcagt gttatcactc + 3001 atggttatgg cagcactgca taattctctt actgtcatgc catccgtaag atgcttttct + 3061 gtgactggtg agtactcaac caagtcattc tgagaa +// diff --git a/lib/VNTI files/pLacthiM2lacZ.gb b/lib/VNTI files/pLacthiM2lacZ.gb new file mode 100644 index 00000000..7fc18496 --- /dev/null +++ b/lib/VNTI files/pLacthiM2lacZ.gb @@ -0,0 +1,1434 @@ +LOCUS pLacthiMla 5441 bp DNA circular 28-JUL-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|453139909| +COMMENT VNTDBDATE|453139909| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMlacZ-N30#2| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMlacZ-N30#2" 0 5441 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5441 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 737 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1570 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3807 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2686 0 4848 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 726 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1369 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3918 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3091 0 3206 0 +COMMENT 4321 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 2048 0 2828 0 3253 0 +COMMENT 3505 0 4007 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 869 0 1595 0 2075 0 2528 +COMMENT 0 5309 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 5000 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4727 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2263 0 3515 1 0 +COMMENT "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4040 4678 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 3812 3916 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 4737 4842 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 4868 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 4954 4975 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 735 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "lacZ*" 4 0 0 719 3805 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #46=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #47=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacthiMlacZ-N30#2" 2) 5 "" 0 4) +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMlacZ-N30#2'" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/28/07 04:11\214\337\214\343" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/28/07 04:11\214\337\214\343" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5441 bp" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #61=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 719 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 719 End: 3805" 1))) "lacZ*") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4868 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4868 End: 284 (Complementary)" +COMMENT 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 735 " 1))) +COMMENT "core riboswitch") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1))) +COMMENT "TPP aptamer") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4954 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4954 End: 4975" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #88=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4040 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4040 End: 4678" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3812 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3812 End: 3916" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4737 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4737 End: 4842 (Complementary)" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #131=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #132=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #146=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20916904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 1369 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24947336 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 5 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24947656 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25189912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #153=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20916824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #154=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 3918 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20946120 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #157=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 737 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24948056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 2263 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 3515 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25189992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24948136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24947416 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24947816 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 5000 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24947976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4727 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20946040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #176=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 1570 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25190152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20917144 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20945960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24947496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25190072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24947736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20917064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2686 " 1) +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 4848 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20916984 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 726 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24947896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25189832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20945880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3807 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24947576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24947256 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #202=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #203=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #204=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #205=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #206=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #207=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #208=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #209=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #210=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #211=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #212=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #213=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #214=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #215=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #216=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #217=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #218=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #219=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #220=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #221=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #222=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #223=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #224=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #225=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #226=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #227=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #228=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #229=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #230=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #231=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #232=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #233=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #234=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #235=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #236=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #237=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #238=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #239=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #240=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #241=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.468 -26.6852 40.0378 40.0378 0.01 10 -1 5441 5441 1 0 0) +COMMENT #242=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #243=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1062 100) +COMMENT (CObjectList +COMMENT #244=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 24514132 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27534 6.27334 1 0.0214037) 0.115295) +COMMENT #245=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #205# 25138416 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMlacZ-N30#2" "@N" 1 0 +COMMENT 0.871165 0 -10 11.1145 1.44863 Nil) +COMMENT #246=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #204# 26575660 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5441 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.24693 0.924127 Nil)) (CObjectList)) +COMMENT #247=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -248 100) +COMMENT (CObjectList +COMMENT #248=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #249=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.94575 0.661792 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #250=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3736136 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.19824 15.681 0 -10 2.7474 1.04901 #249#) +COMMENT #251=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #206# 3736008 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.88622 5.44537 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #252=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 25077996 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ*" "@N" 1 +COMMENT 8.02346 -15.681 0 -10 2.29783 1.04901 #251#)) +COMMENT (CObjectList)) +COMMENT #253=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1121 100) +COMMENT (CObjectList +COMMENT #254=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.562638 1.9 +COMMENT 0.082322 1) +COMMENT #255=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -8.83538 12.1963 0 -10 4.0212 1.04901 #254#) +COMMENT #256=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.60448 1.9 +COMMENT 0.082322 1) +COMMENT #257=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.5159 0 0 -10 1.17389 1.04901 #256#) +COMMENT #258=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.42577 +COMMENT 5.56412 1 0.082322) 0.8 1.8 0) +COMMENT #259=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3736136 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 13.2111 -6.96932 0 +COMMENT -10 7.34306 1.04901 #258#) +COMMENT #260=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #207# 3736008 +COMMENT 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.47765 +COMMENT 5.56412 1 0.082322) 0.8 1.8 0) +COMMENT #261=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 24985420 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 13.579 -5.22699 0 -10 5.86945 1.04901 +COMMENT #260#)) (CObjectList)) +COMMENT #262=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #263=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.67826 1.9 +COMMENT 0.082322 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 26578004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 11.251 6.96932 0 -10 2.62252 1.04901 #263#)) +COMMENT (CObjectList)) +COMMENT #265=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -461 100) +COMMENT (CObjectList +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.72784 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 28185292 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 8.38918 13.9386 0 -10 2.62252 1.04901 #266#) +COMMENT #268=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.11638 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 1062 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.81587 24.3926 0 -10 3.94627 1.04901 #268#) +COMMENT #270=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.89848 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# -981 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.33344 22.6503 0 -10 4.0212 1.04901 #270#)) +COMMENT (CObjectList)) +COMMENT #272=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #273=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.83161 5.94575 1 0.082322) 0.8 1.8 1) +COMMENT #274=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 54196124 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 6.92118 19.1656 0 -10 2.7474 1.04901 #273#) +COMMENT #275=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.58026 5.70017 1 0.082322) 0.8 1.8 0) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.7397 3.48466 0 -10 2.69745 1.04901 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.60448 1.9 0.082322 +COMMENT 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 25149236 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.8317 -1.74233 0 -10 2.14797 1.04901 #278#)) +COMMENT (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1643 100) +COMMENT (CObjectList +COMMENT #281=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.879699 1.61643 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 25704200 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 3.48466 0 -10 2.7474 1.04901 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -736 100) +COMMENT (CObjectList +COMMENT #284=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #211# 100 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 1.75824 +COMMENT 1.8793) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 26577548 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.2469 -3.48466 0 -10 1.17389 1.04901 #284#) +COMMENT #286=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 0.690615 +COMMENT 0.812828) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3736008 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.25058 8.71165 0 -10 1.17389 1.04901 #286#)) +COMMENT (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 393218 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.61831 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.5268 1.74233 0 -10 1.49858 1.04901 #289#)) +COMMENT (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 196614 100) +COMMENT (CObjectList +COMMENT #292=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.64598 1.9 +COMMENT 0.082322 1) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3736144 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 11.6363 5.22699 0 -10 1.49858 1.04901 #292#)) +COMMENT (CObjectList)) +COMMENT #294=(CGroupWidget (CWidget 62 (7 62 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #295=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.70248 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 3736120 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 11.263 8.71165 0 -10 5.86945 1.04901 +COMMENT #295#)) (CObjectList))) (CObjectList)) +COMMENT #297=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 5439490 100) +COMMENT (CObjectList +COMMENT #298=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42462 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (737)" "@N (@S)" 5 12.2308 +COMMENT -10.454 0 -10 5.12016 0.924127 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.46421 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24907604 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (1570)" "@N (@S)" 5 14.651 +COMMENT -13.9386 0 -10 4.42082 0.924127 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #210# 25182936 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.88507 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24516292 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3807)" "@N (@S)" 5 -13.9582 +COMMENT -5.22699 0 -10 4.79547 0.924127 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.4373 1.9 0.082322 +COMMENT 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24673724 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (726)" "@N (@S)" 5 11.3481 +COMMENT -8.71165 0 -10 3.94627 0.924127 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3736016 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.75709 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 25036440 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (3918)" "@N (@S)" 5 -14.2866 +COMMENT -1.74233 0 -10 4.8704 0.924127 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 24827524 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.57911 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736192 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.9158 +COMMENT -3.48466 0 -10 4.67059 0.924127 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 24631436 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.70824 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 9.21684 10.454 +COMMENT 0 -10 4.19603 0.924127 #317#)) (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.509603 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736112 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (5000)" "@N (@S)" 5 -9.07592 +COMMENT 13.9386 0 -10 4.67059 0.924127 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.17752 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2686)" "@N (@S)" 5 3.77643 +COMMENT -19.1656 0 -10 4.67059 0.924127 #323#) +COMMENT #325=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.684851 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (4848)" "@N (@S)" 5 -10.4803 +COMMENT 10.454 0 -10 4.67059 0.924127 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.7901 1.9 0.082322 +COMMENT 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 26419992 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 8.89334 +COMMENT 17.4233 0 -10 4.34589 0.924127 #328#) +COMMENT #330=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.69595 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 25103032 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (1369)" "@N (@S)" 5 15.0835 +COMMENT -12.1963 0 -10 4.79547 0.924127 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1922 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.89041 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 8.11384 +COMMENT 20.908 0 -10 4.79547 0.924127 #333#) +COMMENT #335=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.76935 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 25041780 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 9.28341 +COMMENT 15.681 0 -10 4.79547 0.924127 #335#) +COMMENT #337=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.824357 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 3736248 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4727)" "@N (@S)" 5 -12.6536 +COMMENT 6.96932 0 -10 5.34495 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.72554 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 24979552 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 9.12453 +COMMENT 12.1963 0 -10 4.14608 0.924127 #340#) +COMMENT #342=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.66522 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 3736248 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (2263)" "@N (@S)" 5 9.31737 +COMMENT -17.4233 0 -10 4.67059 0.924127 #342#) +COMMENT #344=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.22173 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 25013604 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3515)" "@N (@S)" 5 -12.3051 +COMMENT -6.96932 0 -10 4.62063 0.924127 #344#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #346=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #347=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3736024 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList #348=(XLATFRAGMENT 718 22 0 1 719 66)) +COMMENT (CObList #349=(AnlzXLATItem 718 784 2 718 784)) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 1944749780 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4040..4678 + /vntifkey="33" + /label=ColE1 + terminator 3812..3916 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4737..4842) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4868..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 4954..4975 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..735 + /vntifkey="21" + /label=core\riboswitch + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 719..3805 + /vntifkey="4" + /label=lacZ* +BASE COUNT 1288 a 1438 c 1459 g 1256 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gctattacaa gaagatcagg agcaaactat + 721 gcaagtcgac ctgctggatc cactgcatat agatcccgtc gttttacaac gtcgtgactg + 781 ggaaaaccct ggcgttaccc aacttaatcg ccttgcagca catccccctt tcgccagctg + 841 gcgtaatagc gaagaggccc gcaccgatcg cccttcccaa cagttgcgca gcctgaatgg + 901 cgaatggcgc tttgcctggt ttccggcacc agaagcggtg ccggaaagct ggctggagtg + 961 cgatcttcct gaggccgata ctgtcgtcgt cccctcaaac tggcagatgc acggttacga + 1021 tgcgcccatc tacaccaacg tgacctatcc cattacggtc aatccgccgt ttgttcccac + 1081 ggagaatccg acgggttgtt actcgctcac atttaatgtt gatgaaagct ggctacagga + 1141 aggccagacg cgaattattt ttgatggcgt taactcggcg tttcatctgt ggtgcaacgg + 1201 gcgctgggtc ggttacggcc aggacagtcg tttgccgtct gaatttgacc tgagcgcatt + 1261 tttacgcgcc ggagaaaacc gcctcgcggt gatggtgctg cgttggagtg acggcagtta + 1321 tctggaagat caggatatgt ggcggatgag cggcattttc cgtgacgtct cgttgctgca + 1381 taaaccgact acacaaatca gcgatttcca tgttgccact cgctttaatg atgatttcag + 1441 ccgcgctgta ctggaggctg aagttcagat gtgcggcgag ttgcgtgact acctacgggt + 1501 aacagtttct ttatggcagg gtgaaacgca ggtcgccagc ggcaccgcgc ctttcggcgg + 1561 tgaaattatc gatgagcgtg gtggttatgc cgatcgcgtc acactacgtc tgaacgtcga + 1621 aaacccgaaa ctgtggagcg ccgaaatccc gaatctctat cgtgcggtgg ttgaactgca + 1681 caccgccgac ggcacgctga ttgaagcaga agcctgcgat gtcggtttcc gcgaggtgcg + 1741 gattgaaaat ggtctgctgc tgctgaacgg caagccgttg ctgattcgag gcgttaaccg + 1801 tcacgagcat catcctctgc atggtcaggt catggatgag cagacgatgg tgcaggatat + 1861 cctgctgatg aagcagaaca actttaacgc cgtgcgctgt tcgcattatc cgaaccatcc + 1921 gctgtggtac acgctgtgcg accgctacgg cctgtatgtg gtggatgaag ccaatattga + 1981 aacccacggc atggtgccaa tgaatcgtct gaccgatgat ccgcgctggc taccggcgat + 2041 gagcgaacgc gtaacgcgaa tggtgcagcg cgatcgtaat cacccgagtg tgatcatctg + 2101 gtcgctgggg aatgaatcag gccacggcgc taatcacgac gcgctgtatc gctggatcaa + 2161 atctgtcgat ccttcccgcc cggtgcagta tgaaggcggc ggagccgaca ccacggccac + 2221 cgatattatt tgcccgatgt acgcgcgcgt ggatgaagac cagcccttcc cggctgtgcc + 2281 gaaatggtcc atcaaaaaat ggctttcgct acctggagag acgcgcccgc tgatcctttg + 2341 cgaatacgcc cacgcgatgg gtaacagtct tggcggtttc gctaaatact ggcaggcgtt + 2401 tcgtcagtat ccccgtttac agggcggctt cgtctgggac tgggtggatc agtcgctgat + 2461 taaatatgat gaaaacggca acccgtggtc ggcttacggc ggtgattttg gcgatacgcc + 2521 gaacgatcgc cagttctgta tgaacggtct ggtctttgcc gaccgcacgc cgcatccagc + 2581 gctgacggaa gcaaaacacc agcagcagtt tttccagttc cgtttatccg ggcaaaccat + 2641 cgaagtgacc agcgaatacc tgttccgtca tagcgataac gagctcctgc actggatggt + 2701 ggcgctggat ggtaagccgc tggcaagcgg tgaagtgcct ctggatgtcg ctccacaagg + 2761 taaacagttg attgaactgc ctgaactacc gcagccggag agcgccgggc aactctggct + 2821 cacagtacgc gtagtgcaac cgaacgcgac cgcatggtca gaagccgggc acatcagcgc + 2881 ctggcagcag tggcgtctgg cggaaaacct cagtgtgacg ctccccgccg cgtcccacgc + 2941 catcccgcat ctgaccacca gcgaaatgga tttttgcatc gagctgggta ataagcgttg + 3001 gcaatttaac cgccagtcag gctttctttc acagatgtgg attggcgata aaaaacaact + 3061 gctgacgccg ctgcgcgatc agttcacccg tgcaccgctg gataacgaca ttggcgtaag + 3121 tgaagcgacc cgcattgacc ctaacgcctg ggtcgaacgc tggaaggcgg cgggccatta + 3181 ccaggccgaa gcagcgttgt tgcagtgcac ggcagataca cttgctgatg cggtgctgat + 3241 tacgaccgct cacgcgtggc agcatcaggg gaaaacctta tttatcagcc ggaaaaccta + 3301 ccggattgat ggtagtggtc aaatggcgat taccgttgat gttgaagtgg cgagcgatac + 3361 accgcatccg gcgcggattg gcctgaactg ccagctggcg caggtagcag agcgggtaaa + 3421 ctggctcgga ttagggccgc aagaaaacta tcccgaccgc cttactgccg cctgttttga + 3481 ccgctgggat ctgccattgt cagacatgta taccccgtac gtcttcccga gcgaaaacgg + 3541 tctgcgctgc gggacgcgcg aattgaatta tggcccacac cagtggcgcg gcgacttcca + 3601 gttcaacatc agccgctaca gtcaacagca actgatggaa accagccatc gccatctgct + 3661 gcacgcggaa gaaggcacat ggctgaatat cgacggtttc catatgggga ttggtggcga + 3721 cgactcctgg agcccgtcag tatcggcgga atttcagctg agcgccggtc gctaccatta + 3781 ccagttggtc tggtgtcaaa aataatctag aggcatcaaa taaaacgaaa ggctcagtcg + 3841 aaagactggg cctttcgttt tatctgttgt ttgtcggtga acgctctcct gagtaggaca + 3901 aatccgccgc cctagaccta ggcgttcggc tgcggcgagc ggtatcagct cactcaaagg + 3961 cggtaatacg gttatccaca gaatcagggg ataacgcagg aaagaacatg tgagcaaaag + 4021 gccagcaaaa ggccaggaac cgtaaaaagg ccgcgttgct ggcgtttttc cataggctcc + 4081 gcccccctga cgagcatcac aaaaatcgac gctcaagtca gaggtggcga aacccgacag + 4141 gactataaag ataccaggcg tttccccctg gaagctccct cgtgcgctct cctgttccga + 4201 ccctgccgct taccggatac ctgtccgcct ttctcccttc gggaagcgtg gcgctttctc + 4261 aatgctcacg ctgtaggtat ctcagttcgg tgtaggtcgt tcgctccaag ctgggctgtg + 4321 tgcacgaacc ccccgttcag cccgaccgct gcgccttatc cggtaactat cgtcttgagt + 4381 ccaacccggt aagacacgac ttatcgccac tggcagcagc cactggtaac aggattagca + 4441 gagcgaggta tgtaggcggt gctacagagt tcttgaagtg gtggcctaac tacggctaca + 4501 ctagaaggac agtatttggt atctgcgctc tgctgaagcc agttaccttc ggaaaaagag + 4561 ttggtagctc ttgatccggc aaacaaacca ccgctggtag cggtggtttt tttgtttgca + 4621 agcagcagat tacgcgcaga aaaaaaggat ctcaagaaga tcctttgatc ttttctacgg + 4681 ggtctgacgc tcagtggaac gaaaactcac gttaagggat tttggtcatg actagtgctt + 4741 ggattctcac caataaaaaa cgcccggcgg caaccgagcg ttctgaacaa atccagatgg + 4801 agttctgagg tcattactgg atctatcaac aggagtccaa gcgagctcaa acttggtctg + 4861 acagttacca atgcttaatc agtgaggcac ctatctcagc gatctgtcta tttcgttcat + 4921 ccatagttgc ctgactcccc gtcgtgtaga taactacgat acgggagggc ttaccatctg + 4981 gccccagtgc tgcaatgata ccgcgagacc cacgctcacc ggctccagat ttatcagcaa + 5041 taaaccagcc agccggaagg gccgagcgca gaagtggtcc tgcaacttta tccgcctcca + 5101 tccagtctat taattgttgc cgggaagcta gagtaagtag ttcgccagtt aatagtttgc + 5161 gcaacgttgt tgccattgct acaggcatcg tggtgtcacg ctcgtcgttt ggtatggctt + 5221 cattcagctc cggttcccaa cgatcaaggc gagttacatg atcccccatg ttgtgcaaaa + 5281 aagcggttag ctccttcggt cctccgatcg ttgtcagaag taagttggcc gcagtgttat + 5341 cactcatggt tatggcagca ctgcataatt ctcttactgt catgccatcc gtaagatgct + 5401 tttctgtgac tggtgagtac tcaaccaagt cattctgaga a +// diff --git a/lib/VNTI files/pLacthiM2tetA-GS-GFP.gb b/lib/VNTI files/pLacthiM2tetA-GS-GFP.gb new file mode 100644 index 00000000..1a843c8b --- /dev/null +++ b/lib/VNTI files/pLacthiM2tetA-GS-GFP.gb @@ -0,0 +1,1677 @@ +LOCUS pLacthiM2t 4337 bp DNA circular 10-FEB-2009 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|484320715| +COMMENT VNTDBDATE|509654507| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiM2tetA-GS-GFP.gb| +COMMENT VNTAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiM2tetA-GS-GFP.gb" 0 4337 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "(0,{1,2})" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4337 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 3 737 0 1030 0 2505 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 2703 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 1980 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2692 0 3744 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 3 726 0 1306 0 2588 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2814 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 3217 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 2307 0 2903 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 888 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 884 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 4205 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3896 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1144 0 3623 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1385 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2936 3574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2936..3574") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 2708 2812 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2708..2812") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 3633 3738 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3633..3738)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3764 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3764..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3850 3871 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3850..3871") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 741 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "616..741") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 740 740 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "740..740") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 738 738 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "738..738") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #46=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "616..690") +COMMENT #47=(CFSignal (CObList) "tetA*" 4 0 0 719 1927 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "719..1927") +COMMENT #48=(CFSignal (CObList) "GFPuv" 4 0 0 1985 2701 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1985..2701") +COMMENT #49=(CFSignal (CObList) "(GGGS)4 Linker" 4 0 0 1931 1978 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1931..1978")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #50=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #51=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pLacthiM2tetA-GS-GFP.gb" 2) 5 "" 0 4) +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiM2tetA-GS-GFP.gb'" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Foreign object. Author: Yokobayashi Lab. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 06/05/08 01:31\214\337\214\343" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 02/10/09 06:41\214\337\214\343" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4337 bp" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 2-AUG-2007" 1))) +COMMENT "Standard Fields") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #65=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 719 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 719 End: 1927" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 719..1927" 1))) "tetA*") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1931 (3 #49# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1931 End: 1978" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1931..1978" 1))) "(GGGS)4 Linker") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1985 (3 #48# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1985 End: 2701" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1985..2701" 1))) "GFPuv") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3764 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3764 End: 284 (Complementary)" +COMMENT 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3764..284)" 1))) "AmpR"))) +COMMENT "CDS (4 total)") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 741 " 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 616..741" 1))) "core riboswitch") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 616..690" 1))) "TPP aptamer") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 738 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 738 End: 738 " 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 738..738" 1))) "orig G") +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3850 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3850 End: 3871" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3850..3871" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #107=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #111=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #112=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #125=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2936 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2936 End: 3574" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2936..3574" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #144=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #145=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2708 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2708 End: 2812" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2708..2812" 1))) "T1") +COMMENT #150=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3633 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3633 End: 3738 (Complementary)" +COMMENT 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3633..3738)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #155=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #160=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #165=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #166=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #171=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 740 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 740 End: 740 " 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 740..740" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #175=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3784472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #177=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26819056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #180=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2307 " 1) +COMMENT #182=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 2903 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20528320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3785592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #185=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 3217 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3783912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #189=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2814 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3785352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #192=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #193=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 737 " 1) +COMMENT #194=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1030 " 1) +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #1# 3) 1 2 2 0 191) +COMMENT " N3: 2505 " 1))))) "BamHI: 3 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26819776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #199=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1385 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3785672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20522680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20527760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #203=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #204=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 888 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26819856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #206=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #207=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3896 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20529200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3785272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3786008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #211=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #213=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3784872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #214=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #215=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 1980 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #216=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3785192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20527200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #218=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #219=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 884 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #220=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3785928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #221=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27200304 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #222=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #223=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 4205 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #224=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3784792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #225=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #226=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2692 " 1) +COMMENT #227=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 3744 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #228=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3784552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #229=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #230=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 726 " 1) +COMMENT #231=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1306 " 1) +COMMENT #232=(CLinePar +COMMENT (CParagraph 0 (1 #7# 3) 1 2 2 0 191) +COMMENT " N3: 2588 " 1))))) "SalI: 3 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #233=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28408672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #234=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3785512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #235=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3785112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #236=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #237=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 2703 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #238=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26819936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #239=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #240=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #241=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20527280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #242=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #243=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #244=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #245=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #246=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #247=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #248=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #249=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #250=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #251=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #252=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #253=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #254=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #255=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #256=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #257=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #258=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #259=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #260=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #261=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #262=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #263=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #264=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #265=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #266=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #267=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #268=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #269=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #270=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #271=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #272=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #273=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #274=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #275=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #276=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #277=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #278=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #279=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #280=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #281=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.6779 -24.9369 40.0378 40.0378 0.01 10 -1 4337 4337 1 0 0) +COMMENT #282=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 1 100) +COMMENT (CObjectList +COMMENT #283=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1367 100) +COMMENT (CObjectList +COMMENT #284=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #248# 28754988 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27563 6.27363 1 0.0214037) 0.144643) +COMMENT #285=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #245# 3736160 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiM2tetA-GS-GFP.gb" "@N" 1 +COMMENT 0 0.871165 0 -10 13.9868 1.44863 Nil) +COMMENT #286=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #244# 20543828 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4337 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #287=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1855 100) +COMMENT (CObjectList +COMMENT #288=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1785 100) +COMMENT (CObjectList +COMMENT #289=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.8624 0.830253 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26528220 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.50743 12.1963 0 -10 2.72243 1.04901 #289#) +COMMENT #291=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.48591 5.23465 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26529452 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 13.4441 -22.6503 0 -10 2.27285 1.04901 #291#) +COMMENT #293=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.36637 3.40346 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26539412 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "GFPuv" "@N" 1 +COMMENT -5.24365 -12.1963 0 -10 3.19698 1.04901 #293#) +COMMENT #295=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.41214 3.48157 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 28637324 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "(GGGS)4 Linker" +COMMENT "@N" 1 8.00355 -26.1349 0 -10 7.1932 1.04901 +COMMENT #295#)) (CObjectList)) +COMMENT #297=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -530 100) +COMMENT (CObjectList +COMMENT #298=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.70586 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 3736064 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -10.4179 8.71165 0 -10 3.97125 1.04901 +COMMENT #298#) +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #251# 268634520 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.43425 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26490100 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.5071 0 0 -10 1.14891 1.04901 #300#) +COMMENT #302=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.20138 +COMMENT 5.38363 1 0.082322) 0.8 1.8 0) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26490356 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 13.5497 -6.96932 0 +COMMENT -10 7.26813 1.04901 #302#) +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.20716 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 28448460 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 12.6122 -12.1963 0 -10 2.92224 1.04901 #304#) +COMMENT #306=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.27515 +COMMENT 5.38363 1 0.082322) 0.8 1.8 0) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26529828 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 13.6313 -5.22699 0 -10 5.8195 1.04901 +COMMENT #306#)) (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1018 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #251# 25182936 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.52683 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26685212 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 11.2684 6.96932 0 -10 2.59755 1.04901 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1995 100) +COMMENT (CObjectList +COMMENT #312=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #264# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.58902 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26942428 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 9.76267 13.9386 0 -10 2.59755 1.04901 #312#) +COMMENT #314=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #264# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.07647 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 28442732 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.31449 22.6503 0 -10 3.92129 1.04901 #314#) +COMMENT #316=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #264# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.80309 1.9 +COMMENT 0.082322 1) +COMMENT #317=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 3736176 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 8.34594 19.1656 0 -10 3.97125 1.04901 #316#)) +COMMENT (CObjectList)) +COMMENT #318=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1436 100) +COMMENT (CObjectList +COMMENT #319=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #259# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.7192 5.8624 1 0.082322) 0.8 1.8 1) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26648940 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 7.92769 17.4233 0 -10 2.72243 1.04901 #319#) +COMMENT #321=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #259# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.40388 5.55431 1 0.082322) 0.8 1.8 0) +COMMENT #322=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 3736176 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.7397 3.48466 0 -10 2.67247 1.04901 #321#)) +COMMENT (CObjectList)) +COMMENT #323=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -948 100) +COMMENT (CObjectList +COMMENT #324=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #249# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.43425 1.9 0.082322 +COMMENT 1) +COMMENT #325=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26775172 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.8404 -1.74233 0 -10 2.14797 1.04901 #324#)) +COMMENT (CObjectList)) +COMMENT #326=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1367 100) +COMMENT (CObjectList +COMMENT #327=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.10363 2.0279 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #328=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 3736176 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -13.3275 3.48466 0 -10 2.72243 1.04901 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1436 100) +COMMENT (CObjectList +COMMENT #330=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #251# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 2.20581 2.35769) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 3736144 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.1125 -3.48466 0 -10 1.14891 1.04901 #330#) +COMMENT #332=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #251# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 0.866414 1.01974) +COMMENT #333=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26648564 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -11.5405 5.22699 0 -10 1.14891 1.04901 #332#)) +COMMENT (CObjectList)) +COMMENT #334=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -739 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #251# 28874920 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.45161 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26656388 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.5355 1.74233 0 -10 1.47361 1.04901 #335#)) +COMMENT (CObjectList)) +COMMENT #337=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1576 100) +COMMENT (CObjectList +COMMENT #338=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.48632 1.9 +COMMENT 0.082322 1) +COMMENT #339=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 6862024 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 11.645 5.22699 0 -10 1.47361 1.04901 #338#)) +COMMENT (CObjectList)) +COMMENT #340=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -181 100) +COMMENT (CObjectList +COMMENT #341=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #251# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.5572 1.9 +COMMENT 0.082322 1) +COMMENT #342=(CLabel (CWidget 0 (0 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 11.2891 8.71165 0 -10 5.8195 1.04901 +COMMENT #341#) +COMMENT #343=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #251# 28556880 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.20427 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 27050292 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 12.6747 -13.9386 0 -10 2.72243 1.04901 #343#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #345=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1297 100) +COMMENT (CObjectList +COMMENT #346=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -460 100) +COMMENT (CObjectList +COMMENT #347=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.36492 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #252# 26505252 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (2703)" "@N (@S)" 5 -13.1957 +COMMENT -5.22699 0 -10 4.77049 0.924127 #347#)) +COMMENT (CObjectList)) +COMMENT #349=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -599 100) +COMMENT (CObjectList +COMMENT #350=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #250# 28789152 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.41069 1.9 +COMMENT 0.082322 1) +COMMENT #351=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #252# 26631692 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (1980)" "@N (@S)" 5 7.07049 +COMMENT -27.8773 0 -10 5.49481 0.924127 #350#)) +COMMENT (CObjectList)) +COMMENT #352=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -1157 100) +COMMENT (CObjectList +COMMENT #353=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.66713 1.9 +COMMENT 0.082322 1) +COMMENT #354=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #252# 26843932 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 9.95971 +COMMENT 15.681 0 -10 4.29594 0.924127 #353#)) +COMMENT (CObjectList)) +COMMENT #355=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1088 100) +COMMENT (CObjectList +COMMENT #356=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.20437 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #252# 26675996 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2814)" "@N (@S)" 5 -14.1472 +COMMENT -1.74233 0 -10 4.84542 0.924127 #356#)) +COMMENT (CObjectList)) +COMMENT #358=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -390 100) +COMMENT (CObjectList +COMMENT #359=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.40243 1.9 +COMMENT 0.082322 1) +COMMENT #360=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #252# 26989892 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.7851 +COMMENT -3.48466 0 -10 4.64561 0.924127 #359#)) +COMMENT (CObjectList)) +COMMENT #361=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -1579 100) +COMMENT (CObjectList +COMMENT #362=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #250# 28556240 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.9902 1.9 +COMMENT 0.082322 1) +COMMENT #363=(CLabel (CWidget 0 (0 0) 1 2 0 0 #252# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (888)" "@N (@S)" 5 14.6454 +COMMENT -17.4233 0 -10 4.24599 0.924127 #362#)) +COMMENT (CObjectList)) +COMMENT #364=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -672 100) +COMMENT (CObjectList +COMMENT #365=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.99598 1.9 +COMMENT 0.082322 1) +COMMENT #366=(CLabel (CWidget 0 (0 0) 1 2 0 0 #252# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (884)" "@N (@S)" 5 14.4937 +COMMENT -15.681 0 -10 4.24599 0.924127 #365#)) +COMMENT (CObjectList)) +COMMENT #367=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -812 100) +COMMENT (CObjectList +COMMENT #368=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.56443 1.9 +COMMENT 0.082322 1) +COMMENT #369=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #252# 26974316 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 10.4767 10.454 +COMMENT 0 -10 4.17106 0.924127 #368#)) (CObjectList)) +COMMENT #370=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -951 100) +COMMENT (CObjectList +COMMENT #371=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.192376 1.9 +COMMENT 0.082322 1) +COMMENT #372=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #252# 27056068 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (4205)" "@N (@S)" 5 -5.36664 +COMMENT 13.9386 0 -10 4.69556 0.924127 #371#)) +COMMENT (CObjectList)) +COMMENT #373=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -812 100) +COMMENT (CObjectList +COMMENT #374=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.639324 1.9 +COMMENT 0.082322 1) +COMMENT #375=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #252# 26612044 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3896)" "@N (@S)" 5 -9.94577 +COMMENT 10.454 0 -10 4.64561 0.924127 #374#)) +COMMENT (CObjectList)) +COMMENT #376=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -1646 100) +COMMENT (CObjectList +COMMENT #377=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.38083 1.9 +COMMENT 0.082322 1) +COMMENT #378=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26829372 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2692)" "@N (@S)" 5 -12.1832 +COMMENT -6.96932 0 -10 4.64561 0.924127 #377#) +COMMENT #379=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.859182 1.9 +COMMENT 0.082322 1) +COMMENT #380=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26899180 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (3744)" "@N (@S)" 5 -12.157 +COMMENT 6.96932 0 -10 4.64561 0.924127 #379#)) +COMMENT (CObjectList)) +COMMENT #381=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -2134 100) +COMMENT (CObjectList +COMMENT #382=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.03597 1.9 +COMMENT 0.082322 1) +COMMENT #383=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 28405820 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.23407 +COMMENT 20.908 0 -10 4.64561 0.924127 #382#) +COMMENT #384=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #250# 28889056 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.62145 1.9 +COMMENT 0.082322 1) +COMMENT #385=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26872112 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (3217)" "@N (@S)" 5 -14.3464 +COMMENT 1.74233 0 -10 5.17011 0.924127 #384#)) +COMMENT (CObjectList)) +COMMENT #386=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -1227 100) +COMMENT (CObjectList +COMMENT #387=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.93771 1.9 +COMMENT 0.082322 1) +COMMENT #388=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 28493532 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2307)" "@N (@S)" 5 -5.61503 +COMMENT -13.9386 0 -10 4.82044 0.924127 #387#) +COMMENT #389=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.07563 1.9 +COMMENT 0.082322 1) +COMMENT #390=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 28839996 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2903)" "@N (@S)" 5 -14.293 0 0 +COMMENT -10 4.82044 0.924127 #389#)) (CObjectList)) +COMMENT #391=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil -1160 100) +COMMENT (CObjectList +COMMENT #392=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #250# 28557520 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.58613 1.9 +COMMENT 0.082322 1) +COMMENT #393=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 28511212 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 10.3618 +COMMENT 12.1963 0 -10 4.12111 0.924127 #392#) +COMMENT #394=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.27132 1.9 +COMMENT 0.082322 1) +COMMENT #395=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 3799492 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1385)" "@N (@S)" 5 14.1276 +COMMENT -24.3926 0 -10 4.57068 0.924127 #394#)) +COMMENT (CObjectList)) +COMMENT #396=(CGroupWidget +COMMENT (CWidget 3 (10 #1# 0) 1 2 0 0 Nil -599 100) +COMMENT (CObjectList +COMMENT #397=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.20861 1.9 +COMMENT 0.082322 1) +COMMENT #398=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26919772 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (737)" "@N (@S)" 5 13.5495 +COMMENT -10.454 0 -10 5.09519 0.924127 #397#) +COMMENT #399=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.7848 1.9 0.082322 +COMMENT 1) +COMMENT #400=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26864644 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1030)" "@N (@S)" 5 15.6913 +COMMENT -19.1656 0 -10 5.56974 0.924127 #399#) +COMMENT #401=(CScratch +COMMENT (CWidget 3 (1 #1# 3) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.65131 1.9 +COMMENT 0.082322 1) +COMMENT #402=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26864268 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (2505)" "@N (@S)" 5 -9.14798 +COMMENT -10.454 0 -10 5.61969 0.924127 #401#)) +COMMENT (CObjectList)) +COMMENT #403=(CGroupWidget +COMMENT (CWidget 3 (10 #7# 0) 1 2 0 0 Nil -1716 100) +COMMENT (CObjectList +COMMENT #404=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.22452 1.9 +COMMENT 0.082322 1) +COMMENT #405=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 26490612 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (726)" "@N (@S)" 5 12.727 +COMMENT -8.71165 0 -10 3.92129 0.924127 #404#) +COMMENT #406=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.38559 1.9 +COMMENT 0.082322 1) +COMMENT #407=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 28618812 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1306)" "@N (@S)" 5 14.4974 +COMMENT -20.908 0 -10 4.37087 0.924127 #406#) +COMMENT #408=(CScratch +COMMENT (CWidget 3 (1 #7# 3) 1 2 0 0 #250# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.53126 1.9 +COMMENT 0.082322 1) +COMMENT #409=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #242# 28619188 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (2588)" "@N (@S)" 5 -10.7925 +COMMENT -8.71165 0 -10 4.4458 0.924127 #408#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #410=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -881 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #411=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1091 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 1970431100 +COMMENT (CStringList) 1919973477 1769173861 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2936..3574 + /vntifkey="33" + /label=ColE1 + terminator 2708..2812 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(3633..3738) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3764..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3850..3871 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..741 + /vntifkey="21" + /label=core\riboswitch + mutation 740..740 + /vntifkey="62" + /label=orig\T + misc_feature 738..738 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 719..1927 + /vntifkey="4" + /label=tetA* + CDS 1985..2701 + /vntifkey="4" + /label=GFPuv + CDS 1931..1978 + /vntifkey="4" + /label=(GGGS)4\Linker +BASE COUNT 1035 a 1141 c 1096 g 1065 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gctattacaa gaagatcagg agcaaactat + 721 gcaagtcgac ctgctggatc caaaatctaa caatgcgctc atcgtcatcc tcggcaccgt + 781 caccctggat gctgtaggca taggcttggt tatgccggta ctgccgggcc tcttgcggga + 841 tatcgtccat tccgacagca tcgccagtca ctatggcgtg ctgctagcgc tatatgcgtt + 901 gatgcaattt ctatgcgcac ccgttctcgg agcactgtcc gaccgctttg gccgccgccc + 961 agtcctgctc gcttcgctac ttggagccac tatcgactac gcgatcatgg cgaccacacc + 1021 cgtcctgtgg atcctctacg ccggacgcat cgtggccggc atcaccggcg ccacaggtgc + 1081 ggttgctggc gcctatatcg ccgacatcac cgatggggaa gatcgggctc gccacttcgg + 1141 gctcatgagc gcttgtttcg gcgtgggtat ggtggcaggc cccgtggccg ggggactgtt + 1201 gggcgccatc tccttgcatg caccattcct tgcggcggcg gtgctcaacg gcctcaacct + 1261 actactgggc tgcttcctaa tgcaggagtc gcataaggga gagcgtcgac cgatgccctt + 1321 gagagccttc aacccagtca gctccttccg gtgggcgcgg ggcatgacta tcgtcgccgc + 1381 acttatgact gtcttcttta tcatgcaact cgtaggacag gtgccggcag cgctctgggt + 1441 cattttcggc gaggaccgct ttcgctggag cgcgacgatg atcggcctgt cgcttgcggt + 1501 attcggaatc ttgcacgccc tcgctcaagc cttcgtcact ggtcccgcca ccaaacgttt + 1561 cggcgagaag caggccatta tcgccggcat ggcggccgac gcgctgggct acgtcttgct + 1621 ggcgttcgcg acgcgaggct ggatggcctt ccccattatg attcttctcg cttccggcgg + 1681 catcgggatg cccgcgttgc aggccatgct gtccaggcag gtagatgacg accatcaggg + 1741 acagcttcaa ggatcgctcg cggctcttac cagcctaact tcgatcattg gaccgctgat + 1801 cgtcacggcg atttatgccg cctcggcgag cacatggaac gggttggcat ggattgtagg + 1861 cgccgcccta taccttgtct gcctccccgc gttgcgtcgc ggtgcatgga gccgggccac + 1921 ctcgaccctg ggcggtggaa gcggcggcgg ctccggtggt ggttctggag gcggttctaa + 1981 gcttatgagt aaaggagaag aacttttcac tggagttgtc ccaattcttg ttgaattaga + 2041 tggtgatgtt aatgggcaca aattttctgt cagtggagag ggtgaaggtg atgcaacata + 2101 cggaaaactt acccttaaat ttatttgcac tactggaaaa ctacctgttc catggccaac + 2161 acttgtcact actttctctt atggtgttca atgcttttcc cgttatccgg atcatatgaa + 2221 acggcatgac tttttcaaga gtgccatgcc cgaaggttat gtacaggaac gcactatatc + 2281 tttcaaagat gacgggaact acaagacgcg tgctgaagtc aagtttgaag gtgataccct + 2341 tgttaatcgt atcgagttaa aaggtattga ttttaaagaa gatggaaaca ttctcggaca + 2401 caaacttgag tacaactata actcacacaa tgtatacatc acggcagaca aacaaaagaa + 2461 tggaatcaaa gctaacttca aaattcgcca caacattgaa gatggatccg ttcaactagc + 2521 agaccattat caacaaaata ctccaattgg cgatggccct gtccttttac cagacaacca + 2581 ttacctgtcg acacaatctg ccctttcgaa agatcccaac gaaaagcgtg accacatggt + 2641 ccttcttgag tttgtaactg ctgctgggat tacacatggc atggatgagc tctacaaata + 2701 atctagaggc atcaaataaa acgaaaggct cagtcgaaag actgggcctt tcgttttatc + 2761 tgttgtttgt cggtgaacgc tctcctgagt aggacaaatc cgccgcccta gacctaggcg + 2821 ttcggctgcg gcgagcggta tcagctcact caaaggcggt aatacggtta tccacagaat + 2881 caggggataa cgcaggaaag aacatgtgag caaaaggcca gcaaaaggcc aggaaccgta + 2941 aaaaggccgc gttgctggcg tttttccata ggctccgccc ccctgacgag catcacaaaa + 3001 atcgacgctc aagtcagagg tggcgaaacc cgacaggact ataaagatac caggcgtttc + 3061 cccctggaag ctccctcgtg cgctctcctg ttccgaccct gccgcttacc ggatacctgt + 3121 ccgcctttct cccttcggga agcgtggcgc tttctcaatg ctcacgctgt aggtatctca + 3181 gttcggtgta ggtcgttcgc tccaagctgg gctgtgtgca cgaacccccc gttcagcccg + 3241 accgctgcgc cttatccggt aactatcgtc ttgagtccaa cccggtaaga cacgacttat + 3301 cgccactggc agcagccact ggtaacagga ttagcagagc gaggtatgta ggcggtgcta + 3361 cagagttctt gaagtggtgg cctaactacg gctacactag aaggacagta tttggtatct + 3421 gcgctctgct gaagccagtt accttcggaa aaagagttgg tagctcttga tccggcaaac + 3481 aaaccaccgc tggtagcggt ggtttttttg tttgcaagca gcagattacg cgcagaaaaa + 3541 aaggatctca agaagatcct ttgatctttt ctacggggtc tgacgctcag tggaacgaaa + 3601 actcacgtta agggattttg gtcatgacta gtgcttggat tctcaccaat aaaaaacgcc + 3661 cggcggcaac cgagcgttct gaacaaatcc agatggagtt ctgaggtcat tactggatct + 3721 atcaacagga gtccaagcga gctcaaactt ggtctgacag ttaccaatgc ttaatcagtg + 3781 aggcacctat ctcagcgatc tgtctatttc gttcatccat agttgcctga ctccccgtcg + 3841 tgtagataac tacgatacgg gagggcttac catctggccc cagtgctgca atgataccgc + 3901 gagacccacg ctcaccggct ccagatttat cagcaataaa ccagccagcc ggaagggccg + 3961 agcgcagaag tggtcctgca actttatccg cctccatcca gtctattaat tgttgccggg + 4021 aagctagagt aagtagttcg ccagttaata gtttgcgcaa cgttgttgcc attgctacag + 4081 gcatcgtggt gtcacgctcg tcgtttggta tggcttcatt cagctccggt tcccaacgat + 4141 caaggcgagt tacatgatcc cccatgttgt gcaaaaaagc ggttagctcc ttcggtcctc + 4201 cgatcgttgt cagaagtaag ttggccgcag tgttatcact catggttatg gcagcactgc + 4261 ataattctct tactgtcatg ccatccgtaa gatgcttttc tgtgactggt gagtactcaa + 4321 ccaagtcatt ctgagaa +// diff --git a/lib/VNTI files/pLacthiM2tetA.gb b/lib/VNTI files/pLacthiM2tetA.gb new file mode 100644 index 00000000..d8f4c82e --- /dev/null +++ b/lib/VNTI files/pLacthiM2tetA.gb @@ -0,0 +1,1482 @@ +LOCUS pLacthiMte 3580 bp DNA circular 27-JUN-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|450280021| +COMMENT VNTDBDATE|450280021| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMtetA-N30| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMtetA-N30" 0 3580 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3580 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 751 0 1044 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1946 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2987 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 740 0 1320 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2057 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2460 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2146 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 902 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 898 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3448 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3139 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1158 0 2866 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1399 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2179 2817 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1951 2055 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2876 2981 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3007 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3093 3114 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 755 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 754 754 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 752 752 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "tetA*" 4 0 0 733 1944 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #48=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #49=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pLacthiMtetA-N30" +COMMENT 2) 5 "" 0 4) +COMMENT #50=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMtetA-N30'" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 06/27/07 01:47\214\337\214\343" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 06/27/07 01:47\214\337\214\343" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3580 bp" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #63=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 733 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 733 End: 1944" 1))) "tetA*") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3007 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3007 End: 284 (Complementary)" +COMMENT 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 755 " 1))) +COMMENT "core riboswitch") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1))) +COMMENT "TPP aptamer") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 752 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 752 End: 752 " 1))) "orig G") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3093 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3093 End: 3114" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2179 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2179 End: 2817" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1951 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1951 End: 2055" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2876 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2876 End: 2981 (Complementary)" +COMMENT 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 754 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 754 End: 754 " 1))) +COMMENT "orig T"))) "Mutation (2 total)"))) +COMMENT "Feature Map") +COMMENT #151=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24963592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25197448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2146 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25199048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2460 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24963512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2057 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 751 " 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1044 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25199448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1399 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25199688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25197528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #177=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 902 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25199208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #180=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3139 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25199368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #185=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24963832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24963992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25198888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 898 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25199128 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3448 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24963752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2987 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24963672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #200=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 740 " 1) +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1320 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25199288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24964312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24963912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #206=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #207=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1946 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25198968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25209384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #212=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #213=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #214=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #215=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #216=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #217=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #218=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #219=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #220=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #221=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #222=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #223=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #224=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #225=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #226=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #227=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #228=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #229=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #230=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #231=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #232=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #233=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #234=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #235=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #236=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #237=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #238=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #239=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #240=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #241=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #242=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #243=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #244=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #245=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #246=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #247=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #248=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #249=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #250=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #251=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.2432 -23.1885 40.0378 40.0378 0.01 10 -1 3580 3580 1 0 0) +COMMENT #252=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #253=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -922 100) +COMMENT (CObjectList +COMMENT #254=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24568244 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27594 6.27394 1 0.0214037) 0.175229) +COMMENT #255=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #215# 3736192 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMtetA-N30" "@N" 1 0 +COMMENT 0.871165 0 -10 9.59094 1.44863 Nil) +COMMENT #256=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #214# 6751096 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3580 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #257=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #258=(CGroupWidget (CWidget 4 (7 4 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #259=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.77554 1.00581 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# -1783 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.76283 10.454 0 -10 2.7474 1.04901 #259#) +COMMENT #261=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #216# 393231 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.86674 4.99051 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #262=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24967812 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 10.691 -24.3926 0 -10 2.29783 1.04901 #261#)) +COMMENT (CObjectList)) +COMMENT #263=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #264=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.855116 1.9 +COMMENT 0.082322 1) +COMMENT #265=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736120 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.7563 6.96932 0 -10 4.0212 1.04901 #264#) +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.25686 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4136 -1.74233 0 -10 1.17389 1.04901 #266#) +COMMENT #268=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.95021 +COMMENT 5.19553 1 0.082322) 0.8 1.8 0) +COMMENT #269=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 14.8266 -8.71165 0 +COMMENT -10 7.34306 1.04901 #268#) +COMMENT #270=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.95722 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24906208 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 13.7896 -13.9386 0 -10 2.94721 1.04901 #270#) +COMMENT #272=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #217# 393230 +COMMENT 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.06411 +COMMENT 5.19553 1 0.082322) 0.8 1.8 0) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736192 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 13.8882 -6.96932 0 -10 5.86945 1.04901 +COMMENT #272#)) (CObjectList)) +COMMENT #274=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.36901 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26265892 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.1503 5.22699 0 -10 2.62252 1.04901 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1131 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.44435 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 10.8677 12.1963 0 -10 2.62252 1.04901 #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.03487 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.7328 20.908 0 -10 3.94627 1.04901 #280#) +COMMENT #282=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.70369 1.9 +COMMENT 0.082322 1) +COMMENT #283=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 393241 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 9.28603 17.4233 0 -10 4.0212 1.04901 #282#)) +COMMENT (CObjectList)) +COMMENT #284=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 393219 100) +COMMENT (CObjectList +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.60206 5.77554 1 0.082322) 0.8 1.8 1) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# -1364 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.90128 15.681 0 -10 2.7474 1.04901 #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.22006 5.4023 1 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24766324 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.0582 1.74233 0 -10 2.69745 1.04901 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 24695544 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.25686 1.9 0.082322 +COMMENT 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24887036 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5132 -3.48466 0 -10 2.14797 1.04901 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #293=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.33699 2.45671 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #294=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 -3.48466 0 -10 2.7474 1.04901 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1992 100) +COMMENT (CObjectList +COMMENT #296=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #221# 131079 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 2.67224 2.85623) +COMMENT #297=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -5.72745 -12.1963 0 -10 1.17389 1.04901 #296#) +COMMENT #298=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #221# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.04962 1.23536) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.0951 3.48466 0 -10 1.17389 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 24696456 100) +COMMENT (CObjectList +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.27789 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 1157 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.6291 0 0 -10 1.49858 1.04901 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.31994 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24050436 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.2083 3.48466 0 -10 1.49858 1.04901 #304#)) +COMMENT (CObjectList)) +COMMENT #306=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 24696152 100) +COMMENT (CObjectList +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.4058 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 12.6362 6.96932 0 -10 5.86945 1.04901 +COMMENT #307#) +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.95371 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24570876 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 13.8236 -15.681 0 -10 2.7474 1.04901 #309#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #311=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #312=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #313=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.86499 1.9 +COMMENT 0.082322 1) +COMMENT #314=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 26579828 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1946)" "@N (@S)" 5 -6.45199 +COMMENT -13.9386 0 -10 4.74552 0.924127 #313#)) +COMMENT (CObjectList)) +COMMENT #315=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #316=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.04086 1.9 +COMMENT 0.082322 1) +COMMENT #317=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24973372 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2987)" "@N (@S)" 5 -13.2044 +COMMENT 5.22699 0 -10 4.67059 0.924127 #316#)) +COMMENT (CObjectList)) +COMMENT #318=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #319=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.53898 1.9 +COMMENT 0.082322 1) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24780484 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.1718 +COMMENT 13.9386 0 -10 4.34589 0.924127 #319#)) +COMMENT (CObjectList)) +COMMENT #321=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #322=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.67048 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24763492 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2057)" "@N (@S)" 5 -8.91277 +COMMENT -10.454 0 -10 4.94533 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.21831 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 26444036 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.3438 +COMMENT -5.22699 0 -10 4.67059 0.924127 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.51453 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736056 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2146)" "@N (@S)" 5 -11.0975 +COMMENT -8.71165 0 -10 4.82044 0.924127 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.69438 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24676216 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (902)" "@N (@S)" 5 15.2329 +COMMENT -19.1656 0 -10 4.27096 0.924127 #331#)) +COMMENT (CObjectList)) +COMMENT #333=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.70138 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 393219 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (898)" "@N (@S)" 5 15.1561 +COMMENT -17.4233 0 -10 4.27096 0.924127 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.41456 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel (CWidget 0 (0 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 11.7005 +COMMENT 8.71165 0 -10 4.19603 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.233054 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 26373760 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3448)" "@N (@S)" 5 -5.84904 +COMMENT 12.1963 0 -10 4.74552 0.924127 #340#)) +COMMENT (CObjectList)) +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #220# 25182936 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.774511 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 26373856 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3139)" "@N (@S)" 5 -11.09 +COMMENT 8.71165 0 -10 4.62063 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.95897 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26575660 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (751)" "@N (@S)" 5 14.8884 +COMMENT -12.1963 0 -10 5.07021 0.924127 #346#) +COMMENT #348=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.44555 1.9 +COMMENT 0.082322 1) +COMMENT #349=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736152 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1044)" "@N (@S)" 5 15.474 +COMMENT -20.908 0 -10 5.59471 0.924127 #348#)) +COMMENT (CObjectList)) +COMMENT #350=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #351=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.97825 1.9 +COMMENT 0.082322 1) +COMMENT #352=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 21129088 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (740)" "@N (@S)" 5 14.1115 +COMMENT -10.454 0 -10 3.94627 0.924127 #351#) +COMMENT #353=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.96192 1.9 +COMMENT 0.082322 1) +COMMENT #354=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26716180 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1320)" "@N (@S)" 5 12.0508 +COMMENT -22.6503 0 -10 4.42082 0.924127 #353#)) +COMMENT (CObjectList)) +COMMENT #355=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #356=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.98581 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 21310772 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.90753 +COMMENT 19.1656 0 -10 4.67059 0.924127 #356#) +COMMENT #358=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.96431 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 196654 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2460)" "@N (@S)" 5 -13.8646 +COMMENT -5.22699 0 -10 5.27002 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil 5439490 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #220# 1149 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.44085 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 27916528 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 11.5886 10.454 +COMMENT 0 -10 4.14608 0.924127 #361#) +COMMENT #363=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.82349 1.9 +COMMENT 0.082322 1) +COMMENT #364=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24628288 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1399)" "@N (@S)" 5 10.9591 +COMMENT -26.1349 0 -10 4.62063 0.924127 #363#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #365=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #366=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21418264 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2179..2817 + /vntifkey="33" + /label=ColE1 + terminator 1951..2055 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2876..2981) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3007..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3093..3114 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..755 + /vntifkey="21" + /label=core\riboswitch + mutation 754..754 + /vntifkey="62" + /label=orig\T + misc_feature 752..752 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 733..1944 + /vntifkey="4" + /label=tetA* +BASE COUNT 796 a 978 c 923 g 853 t 30 others +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn + 721 caggagcaaa ctatgcaagt cgacctgctg gatccaaaat ctaacaatgc gctcatcgtc + 781 atcctcggca ccgtcaccct ggatgctgta ggcataggct tggttatgcc ggtactgccg + 841 ggcctcttgc gggatatcgt ccattccgac agcatcgcca gtcactatgg cgtgctgcta + 901 gcgctatatg cgttgatgca atttctatgc gcacccgttc tcggagcact gtccgaccgc + 961 tttggccgcc gcccagtcct gctcgcttcg ctacttggag ccactatcga ctacgcgatc + 1021 atggcgacca cacccgtcct gtggatcctc tacgccggac gcatcgtggc cggcatcacc + 1081 ggcgccacag gtgcggttgc tggcgcctat atcgccgaca tcaccgatgg ggaagatcgg + 1141 gctcgccact tcgggctcat gagcgcttgt ttcggcgtgg gtatggtggc aggccccgtg + 1201 gccgggggac tgttgggcgc catctccttg catgcaccat tccttgcggc ggcggtgctc + 1261 aacggcctca acctactact gggctgcttc ctaatgcagg agtcgcataa gggagagcgt + 1321 cgaccgatgc ccttgagagc cttcaaccca gtcagctcct tccggtgggc gcggggcatg + 1381 actatcgtcg ccgcacttat gactgtcttc tttatcatgc aactcgtagg acaggtgccg + 1441 gcagcgctct gggtcatttt cggcgaggac cgctttcgct ggagcgcgac gatgatcggc + 1501 ctgtcgcttg cggtattcgg aatcttgcac gccctcgctc aagccttcgt cactggtccc + 1561 gccaccaaac gtttcggcga gaagcaggcc attatcgccg gcatggcggc cgacgcgctg + 1621 ggctacgtct tgctggcgtt cgcgacgcga ggctggatgg ccttccccat tatgattctt + 1681 ctcgcttccg gcggcatcgg gatgcccgcg ttgcaggcca tgctgtccag gcaggtagat + 1741 gacgaccatc agggacagct tcaaggatcg ctcgcggctc ttaccagcct aacttcgatc + 1801 actggaccgc tgatcgtcac ggcgatttat gccgcctcgg cgagcacatg gaacgggttg + 1861 gcatggattg taggcgccgc cctatacctt gtctgcctcc ccgcgttgcg tcgcggtgca + 1921 tggagccggg ccacctcgac ctaatctaga ggcatcaaat aaaacgaaag gctcagtcga + 1981 aagactgggc ctttcgtttt atctgttgtt tgtcggtgaa cgctctcctg agtaggacaa + 2041 atccgccgcc ctagacctag gcgttcggct gcggcgagcg gtatcagctc actcaaaggc + 2101 ggtaatacgg ttatccacag aatcagggga taacgcagga aagaacatgt gagcaaaagg + 2161 ccagcaaaag gccaggaacc gtaaaaaggc cgcgttgctg gcgtttttcc ataggctccg + 2221 cccccctgac gagcatcaca aaaatcgacg ctcaagtcag aggtggcgaa acccgacagg + 2281 actataaaga taccaggcgt ttccccctgg aagctccctc gtgcgctctc ctgttccgac + 2341 cctgccgctt accggatacc tgtccgcctt tctcccttcg ggaagcgtgg cgctttctca + 2401 atgctcacgc tgtaggtatc tcagttcggt gtaggtcgtt cgctccaagc tgggctgtgt + 2461 gcacgaaccc cccgttcagc ccgaccgctg cgccttatcc ggtaactatc gtcttgagtc + 2521 caacccggta agacacgact tatcgccact ggcagcagcc actggtaaca ggattagcag + 2581 agcgaggtat gtaggcggtg ctacagagtt cttgaagtgg tggcctaact acggctacac + 2641 tagaaggaca gtatttggta tctgcgctct gctgaagcca gttaccttcg gaaaaagagt + 2701 tggtagctct tgatccggca aacaaaccac cgctggtagc ggtggttttt ttgtttgcaa + 2761 gcagcagatt acgcgcagaa aaaaaggatc tcaagaagat cctttgatct tttctacggg + 2821 gtctgacgct cagtggaacg aaaactcacg ttaagggatt ttggtcatga ctagtgcttg + 2881 gattctcacc aataaaaaac gcccggcggc aaccgagcgt tctgaacaaa tccagatgga + 2941 gttctgaggt cattactgga tctatcaaca ggagtccaag cgagctcaaa cttggtctga + 3001 cagttaccaa tgcttaatca gtgaggcacc tatctcagcg atctgtctat ttcgttcatc + 3061 catagttgcc tgactccccg tcgtgtagat aactacgata cgggagggct taccatctgg + 3121 ccccagtgct gcaatgatac cgcgagaccc acgctcaccg gctccagatt tatcagcaat + 3181 aaaccagcca gccggaaggg ccgagcgcag aagtggtcct gcaactttat ccgcctccat + 3241 ccagtctatt aattgttgcc gggaagctag agtaagtagt tcgccagtta atagtttgcg + 3301 caacgttgtt gccattgcta caggcatcgt ggtgtcacgc tcgtcgtttg gtatggcttc + 3361 attcagctcc ggttcccaac gatcaaggcg agttacatga tcccccatgt tgtgcaaaaa + 3421 agcggttagc tccttcggtc ctccgatcgt tgtcagaagt aagttggccg cagtgttatc + 3481 actcatggtt atggcagcac tgcataattc tcttactgtc atgccatccg taagatgctt + 3541 ttctgtgact ggtgagtact caaccaagtc attctgagaa +// diff --git a/lib/VNTI files/pLacthiMN15#19gfpuv.gb b/lib/VNTI files/pLacthiMN15#19gfpuv.gb new file mode 100644 index 00000000..80662796 --- /dev/null +++ b/lib/VNTI files/pLacthiMN15#19gfpuv.gb @@ -0,0 +1,1383 @@ +LOCUS pthiM19gfp 3096 bp DNA circular 22-MAY-2009 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|518964387| +COMMENT VNTDBDATE|518964387| +COMMENT LSOWNER| +COMMENT VNTNAME|pthiM19gfpuv.gb| +COMMENT VNTAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pthiM19gfpuv.gb" 0 3096 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "(0,{1,2})" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3096 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 738 0 1264 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1462 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1451 0 2503 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 727 0 1347 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1573 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 1976 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 1066 0 1662 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2964 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2655 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 2382 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 476 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1695 2333 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2936..3574") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1467 1571 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2708..2812") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2392 2497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3633..3738)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2523 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3764..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #34=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #35=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #36=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #37=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #38=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #39=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #40=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #41=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "616..690") +COMMENT #42=(CFSignal (CObList) "GFPuv" 4 0 0 720 1460 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1985..2701")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #43=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #44=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pthiM19gfpuv.gb" +COMMENT 2) 5 "" 0 4) +COMMENT #45=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pthiM19gfpuv.gb'" 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Foreign object. Author: Yokobayashi Lab. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 05/22/09 12:46\214\337\214\343" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 05/22/09 12:46\214\337\214\343" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3096 bp" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 22-MAY-2009" 1))) +COMMENT "Standard Fields") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Author") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #60=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 720 (3 #42# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 720 End: 1460" 1) +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1985..2701" 1))) "GFPuv") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2523 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2523 End: 284 (Complementary)" +COMMENT 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3764..284)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 616..690" 1))) "TPP aptamer"))) +COMMENT "Misc. Feature (2 total)") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (2 total)") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) "P(bla)") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1695 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1695 End: 2333" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2936..3574" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1467 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1467 End: 1571" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2708..2812" 1))) "T1") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2392 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2392 End: 2497 (Complementary)" +COMMENT 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3633..3738)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #128=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #133=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #134=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27157160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #142=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27140328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #143=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 1066 " 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1662 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #146=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27154120 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #147=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27157400 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #148=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1976 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27147552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #152=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1573 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25387064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 738 " 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1264 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27138968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #159=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #161=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27176520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27139128 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27153640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27155880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #165=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2655 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27156360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2382 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25411136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27147712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27156040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25369096 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27153800 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27173320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #180=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27155400 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #181=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #182=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2964 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27156520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #184=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1451 " 1) +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2503 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27156680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #188=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 727 " 1) +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1347 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27156200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27158040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25411376 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1462 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27153960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27139368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #200=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #201=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #202=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #203=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #204=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #205=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #206=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #207=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #208=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #209=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #210=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #211=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #212=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #213=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #214=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #215=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #216=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #217=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #218=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #219=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #220=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #221=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #222=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #223=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #224=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #225=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #226=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #227=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #228=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #229=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #230=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #231=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #232=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #233=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #234=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #235=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #236=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #237=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #238=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #239=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.9326 -19.6419 40.0378 40.0378 0.01 10 -1 3096 3096 1 0 0) +COMMENT #240=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1994 100) +COMMENT (CObjectList +COMMENT #241=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -734 100) +COMMENT (CObjectList +COMMENT #242=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 24624876 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27621 6.27421 1 0.0214037) 0.202622) +COMMENT #243=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #203# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pthiM19gfpuv.gb" "@N" 1 0 +COMMENT 0.871165 0 -10 9.04146 1.44863 Nil) +COMMENT #244=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #202# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3096 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #245=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -455 100) +COMMENT (CObjectList +COMMENT #246=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1571 100) +COMMENT (CObjectList +COMMENT #247=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #204# +COMMENT 1944545584 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.69774 1.16305 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #248=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 268634520 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.77154 10.454 0 -10 2.72243 1.04901 #247#) +COMMENT #249=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #204# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.3149 4.81633 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #250=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 26558836 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "GFPuv" "@N" 1 +COMMENT 12.0495 -19.1656 0 -10 3.19698 1.04901 #249#)) +COMMENT (CObjectList)) +COMMENT #251=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1711 100) +COMMENT (CObjectList +COMMENT #252=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.09798 1.9 +COMMENT 0.082322 1) +COMMENT #253=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 27116404 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 11.9726 -6.96932 0 -10 1.14891 1.04901 #252#) +COMMENT #254=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #205# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.87509 +COMMENT 5.02706 1 0.082322) 0.8 1.8 0) +COMMENT #255=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 1164 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 15.0069 -12.1963 0 -10 5.8195 1.04901 +COMMENT #254#)) (CObjectList)) +COMMENT #256=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1781 100) +COMMENT (CObjectList +COMMENT #257=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.22765 1.9 +COMMENT 0.082322 1) +COMMENT #258=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 27122908 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 13.1257 0 0 -10 2.59755 1.04901 #257#)) +COMMENT (CObjectList)) +COMMENT #259=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #260=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.31478 1.9 +COMMENT 0.082322 1) +COMMENT #261=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 27109900 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 11.3886 6.96932 0 -10 2.59755 1.04901 #260#) +COMMENT #262=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.61466 1.9 +COMMENT 0.082322 1) +COMMENT #263=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 3736096 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 10.062 15.681 0 -10 3.97125 1.04901 #262#)) +COMMENT (CObjectList)) +COMMENT #264=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1153 100) +COMMENT (CObjectList +COMMENT #265=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #217# +COMMENT 1944545584 100) (LOGPEN 0 0 0) 1 +COMMENT (LOGBRUSH 0 128 0) 0.835356 5.49714 5.69774 +COMMENT 1 0.082322) 0.8 1.8 1) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 3736176 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 9.56049 12.1963 0 -10 2.72243 1.04901 #265#) +COMMENT #267=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.05543 5.26615 1 0.082322) 0.8 1.8 0) +COMMENT #268=(CLabel (CWidget 0 (0 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.731 -3.48466 0 -10 2.67247 1.04901 #267#)) +COMMENT (CObjectList)) +COMMENT #269=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -595 100) +COMMENT (CObjectList +COMMENT #270=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.09798 1.9 0.082322 +COMMENT 1) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 20647892 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5391 -8.71165 0 -10 2.14797 1.04901 #270#)) +COMMENT (CObjectList)) +COMMENT #272=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -246 100) +COMMENT (CObjectList +COMMENT #273=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #204# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.54601 2.84076 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #274=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 26052812 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.3033 -6.96932 0 -10 2.72243 1.04901 #273#)) +COMMENT (CObjectList)) +COMMENT #275=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #276=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #209# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 3.08999 3.30274) +COMMENT #277=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# -318 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.38172 -27.8773 0 -10 1.14891 1.04901 #276#) +COMMENT #278=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #209# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.21371 1.42849) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.2332 3.48466 0 -10 1.14891 1.04901 #278#)) +COMMENT (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1502 100) +COMMENT (CObjectList +COMMENT #281=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.12229 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 24537684 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 11.8365 -5.22699 0 -10 1.47361 1.04901 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1432 100) +COMMENT (CObjectList +COMMENT #284=(CScratch +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #209# 25182936 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.17092 1.9 +COMMENT 0.082322 1) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# -911 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.5181 -1.74233 0 -10 1.47361 1.04901 #284#)) +COMMENT (CObjectList)) +COMMENT #286=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1850 100) +COMMENT (CObjectList +COMMENT #287=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #209# 28889056 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.27021 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 14.3998 1.74233 0 -10 5.8195 1.04901 +COMMENT #287#)) (CObjectList))) (CObjectList)) +COMMENT #289=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -595 100) +COMMENT (CObjectList +COMMENT #290=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -316 100) +COMMENT (CObjectList +COMMENT #291=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #208# 28556880 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.31287 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel (CWidget 0 (0 0) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1462)" "@N (@S)" 5 5.50469 +COMMENT -26.1349 0 -10 4.69556 0.924127 #291#)) +COMMENT (CObjectList)) +COMMENT #293=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -1362 100) +COMMENT (CObjectList +COMMENT #294=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.4242 1.9 0.082322 +COMMENT 1) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #210# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.8682 +COMMENT 10.454 0 -10 4.29594 0.924127 #294#)) +COMMENT (CObjectList)) +COMMENT #296=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -385 100) +COMMENT (CObjectList +COMMENT #297=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.08796 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #210# 3801648 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1573)" "@N (@S)" 5 -3.87574 +COMMENT -13.9386 0 -10 4.84542 0.924127 #297#)) +COMMENT (CObjectList)) +COMMENT #299=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1920 100) +COMMENT (CObjectList +COMMENT #300=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.0534 1.9 0.082322 +COMMENT 1) +COMMENT #301=(CLabel (CWidget 0 (0 0) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.2695 +COMMENT -10.454 0 -10 4.64561 0.924127 #300#)) +COMMENT (CObjectList)) +COMMENT #302=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #303=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.28034 1.9 +COMMENT 0.082322 1) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #210# 3736144 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 13.6022 +COMMENT 3.48466 0 -10 4.17106 0.924127 #303#)) +COMMENT (CObjectList)) +COMMENT #305=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #306=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.269488 1.9 +COMMENT 0.082322 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #210# 21011860 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2964)" "@N (@S)" 5 -6.23678 +COMMENT 12.1963 0 -10 4.69556 0.924127 #306#)) +COMMENT (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -1993 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.89559 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #210# 25273484 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2655)" "@N (@S)" 5 -12.3313 +COMMENT 6.96932 0 -10 4.64561 0.924127 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -1156 100) +COMMENT (CObjectList +COMMENT #312=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #208# 268634520 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.31073 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #210# 3801090 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 12.9779 +COMMENT 5.22699 0 -10 4.12111 0.924127 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -525 100) +COMMENT (CObjectList +COMMENT #315=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.77986 1.9 +COMMENT 0.082322 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 3735968 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (738)" "@N (@S)" 5 15.4762 +COMMENT -15.681 0 -10 5.09519 0.924127 #315#) +COMMENT #317=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.71407 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 27013148 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1264)" "@N (@S)" 5 10.3572 +COMMENT -20.908 0 -10 5.56974 0.924127 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -664 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.33516 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1451)" "@N (@S)" 5 5.60168 +COMMENT -24.3926 0 -10 4.52073 0.924127 #320#) +COMMENT #322=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.20358 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 27102940 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2503)" "@N (@S)" 5 -13.6156 +COMMENT 5.22699 0 -10 4.64561 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil -1222 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.80215 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (727)" "@N (@S)" 5 14.6822 +COMMENT -13.9386 0 -10 3.92129 0.924127 #325#) +COMMENT #327=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #208# 28557520 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.54589 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1347)" "@N (@S)" 5 7.94204 +COMMENT -22.6503 0 -10 4.37087 0.924127 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.94088 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 7.34894 +COMMENT 17.4233 0 -10 4.64561 0.924127 #330#) +COMMENT #332=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.2714 1.9 0.082322 +COMMENT 1) +COMMENT #333=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 1 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1976)" "@N (@S)" 5 -12.1221 +COMMENT -8.71165 0 -10 5.17011 0.924127 #332#)) +COMMENT (CObjectList)) +COMMENT #334=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -877 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #208# 28789152 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.11526 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 27128956 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1066)" "@N (@S)" 5 13.3458 +COMMENT -17.4233 0 -10 4.74552 0.924127 #335#) +COMMENT #337=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.90763 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1662)" "@N (@S)" 5 -5.92061 +COMMENT -12.1963 0 -10 4.74552 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1086 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.60048 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 25287004 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 10.8066 +COMMENT 13.9386 0 -10 4.77049 0.924127 #340#) +COMMENT #342=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.38773 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 25293052 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 12.2271 +COMMENT 8.71165 0 -10 4.77049 0.924127 #342#) +COMMENT #344=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.44875 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #200# 24627604 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2382)" "@N (@S)" 5 -14.5253 +COMMENT 1.74233 0 -10 5.295 0.924127 #344#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #346=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #347=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 1056 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 1932009550 +COMMENT (CStringList) 1986359920 1766358067 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1695..2333 + /vntifkey="33" + /label=ColE1 + terminator 1467..1571 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2392..2497) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2523..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 720..1460 + /vntifkey="4" + /label=GFPuv +BASE COUNT 840 a 751 c 718 g 787 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gctcttaaga atcagatcag gagcaaacta + 721 tgcaagtcga cctgctggat ccattgagta aaggagaaga acttttcact ggagttgtcc + 781 caattcttgt tgaattagat ggtgatgtta atgggcacaa attttctgtc agtggagagg + 841 gtgaaggtga tgcaacatac ggaaaactta cccttaaatt tatttgcact actggaaaac + 901 tacctgttcc atggccaaca cttgtcacta ctttctctta tggtgttcaa tgcttttccc + 961 gttatccgga tcatatgaaa cggcatgact ttttcaagag tgccatgccc gaaggttatg + 1021 tacaggaacg cactatatct ttcaaagatg acgggaacta caagacgcgt gctgaagtca + 1081 agtttgaagg tgataccctt gttaatcgta tcgagttaaa aggtattgat tttaaagaag + 1141 atggaaacat tctcggacac aaacttgagt acaactataa ctcacacaat gtatacatca + 1201 cggcagacaa acaaaagaat ggaatcaaag ctaacttcaa aattcgccac aacattgaag + 1261 atggatccgt tcaactagca gaccattatc aacaaaatac tccaattggc gatggccctg + 1321 tccttttacc agacaaccat tacctgtcga cacaatctgc cctttcgaaa gatcccaacg + 1381 aaaagcgtga ccacatggtc cttcttgagt ttgtaactgc tgctgggatt acacatggca + 1441 tggatgagct ctacaaataa tctagaggca tcaaataaaa cgaaaggctc agtcgaaaga + 1501 ctgggccttt cgttttatct gttgtttgtc ggtgaacgct ctcctgagta ggacaaatcc + 1561 gccgccctag acctaggcgt tcggctgcgg cgagcggtat cagctcactc aaaggcggta + 1621 atacggttat ccacagaatc aggggataac gcaggaaaga acatgtgagc aaaaggccag + 1681 caaaaggcca ggaaccgtaa aaaggccgcg ttgctggcgt ttttccatag gctccgcccc + 1741 cctgacgagc atcacaaaaa tcgacgctca agtcagaggt ggcgaaaccc gacaggacta + 1801 taaagatacc aggcgtttcc ccctggaagc tccctcgtgc gctctcctgt tccgaccctg + 1861 ccgcttaccg gatacctgtc cgcctttctc ccttcgggaa gcgtggcgct ttctcaatgc + 1921 tcacgctgta ggtatctcag ttcggtgtag gtcgttcgct ccaagctggg ctgtgtgcac + 1981 gaaccccccg ttcagcccga ccgctgcgcc ttatccggta actatcgtct tgagtccaac + 2041 ccggtaagac acgacttatc gccactggca gcagccactg gtaacaggat tagcagagcg + 2101 aggtatgtag gcggtgctac agagttcttg aagtggtggc ctaactacgg ctacactaga + 2161 aggacagtat ttggtatctg cgctctgctg aagccagtta ccttcggaaa aagagttggt + 2221 agctcttgat ccggcaaaca aaccaccgct ggtagcggtg gtttttttgt ttgcaagcag + 2281 cagattacgc gcagaaaaaa aggatctcaa gaagatcctt tgatcttttc tacggggtct + 2341 gacgctcagt ggaacgaaaa ctcacgttaa gggattttgg tcatgactag tgcttggatt + 2401 ctcaccaata aaaaacgccc ggcggcaacc gagcgttctg aacaaatcca gatggagttc + 2461 tgaggtcatt actggatcta tcaacaggag tccaagcgag ctcaaacttg gtctgacagt + 2521 taccaatgct taatcagtga ggcacctatc tcagcgatct gtctatttcg ttcatccata + 2581 gttgcctgac tccccgtcgt gtagataact acgatacggg agggcttacc atctggcccc + 2641 agtgctgcaa tgataccgcg agacccacgc tcaccggctc cagatttatc agcaataaac + 2701 cagccagccg gaagggccga gcgcagaagt ggtcctgcaa ctttatccgc ctccatccag + 2761 tctattaatt gttgccggga agctagagta agtagttcgc cagttaatag tttgcgcaac + 2821 gttgttgcca ttgctacagg catcgtggtg tcacgctcgt cgtttggtat ggcttcattc + 2881 agctccggtt cccaacgatc aaggcgagtt acatgatccc ccatgttgtg caaaaaagcg + 2941 gttagctcct tcggtcctcc gatcgttgtc agaagtaagt tggccgcagt gttatcactc + 3001 atggttatgg cagcactgca taattctctt actgtcatgc catccgtaag atgcttttct + 3061 gtgactggtg agtactcaac caagtcattc tgagaa +// diff --git a/lib/VNTI files/pLacthiMgfpuv-sp1+thiM81lacZ.gb b/lib/VNTI files/pLacthiMgfpuv-sp1+thiM81lacZ.gb new file mode 100644 index 00000000..87975b52 --- /dev/null +++ b/lib/VNTI files/pLacthiMgfpuv-sp1+thiM81lacZ.gb @@ -0,0 +1,1668 @@ +LOCUS pLacthiMgf 6357 bp DNA circular 5-NOV-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|462205723| +COMMENT VNTDBDATE|462207645| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMgfpuv-sp1+thiM81lacZ| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMgfpuv-sp1+thiM81lacZ" 0 6357 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 6357 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 3 759 0 1285 0 1653 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 2486 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 4723 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 1482 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 3 1472 0 3602 0 5764 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 3 748 0 1368 0 1642 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 2285 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 4834 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 4007 0 4122 0 +COMMENT 5237 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 7 1087 0 1608 0 2964 0 +COMMENT 3744 0 4169 0 4421 0 4923 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 1515 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 1511 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 2 491 0 1186 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 1785 0 2511 0 2991 0 +COMMENT 3444 0 6225 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 5916 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 5643 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 4 476 1 1611 0 3179 0 +COMMENT 4431 1 0 "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4956 5594 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 4728 4832 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 5653 5758 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 5784 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 5870 5891 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 1531 1651 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "TPP aptamer" 21 0 0 1531 1605 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "lacZ*" 4 0 0 1635 4721 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "core riboswitch" 21 0 0 616 763 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "orig T" 62 0 0 762 762 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #48=(CFSignal (CObList) "orig G" 21 0 0 760 760 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #49=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 693 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #50=(CFSignal (CObList) "gfpuv" 4 0 0 741 1481 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #51=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #52=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacthiMgfpuv-sp1+thiM81lacZ" 2) 5 "" 0 4) +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMgfpuv-sp1+thiM81lacZ'" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 11/05/07 02:28\214\337\214\343" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 11/05/07 03:00\214\337\214\343" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 6357 bp" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #66=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #70=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 741 (3 #50# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 741 End: 1481" 1))) "gfpuv") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1635 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1635 End: 4721" 1))) "lacZ*") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 5784 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 5784 End: 284 (Complementary)" +COMMENT 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (3 total)") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #79=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 763 " 1))) +COMMENT "core riboswitch") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 693 " 1))) +COMMENT "TPP aptamer") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 760 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 760 End: 760 " 1))) "orig G") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1531 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1531 End: 1651" 1))) +COMMENT "core riboswitch") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1531 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1531 End: 1605" 1))) +COMMENT "TPP aptamer") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 5870 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 5870 End: 5891" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (7 total)") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #128=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4956 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4956 End: 5594" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #133=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #134=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4728 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4728 End: 4832" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 5653 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 5653 End: 5758 (Complementary)" +COMMENT 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #144=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #145=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #147=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #148=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #152=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion") +COMMENT #158=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 762 (3 #47# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 762 End: 762 " 1))) +COMMENT "orig T"))) "Mutation (2 total)"))) +COMMENT "Feature Map") +COMMENT #160=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #161=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24952832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #162=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 2285 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26715768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 7 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26701432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24971288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #168=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24952752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #169=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 4834 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24971048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #172=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 759 " 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1285 " 1) +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #1# 3) 1 2 2 0 191) +COMMENT " N3: 1653 " 1))))) "BamHI: 3 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26685832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 4 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24971528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26685912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26720472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #180=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 1515 " 1))))) "BmtI: 1 site") +COMMENT 5 1 "GCTAGC" "CGATCG") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26702072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 5916 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26684952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #186=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 5643 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24970968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 2486 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24971688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24970728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 1482 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24970888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26720552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #201=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 1511 " 1))))) "NheI: 1 site") +COMMENT 1 5 "GCTAGC" "CGATCG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24971608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26701672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24960368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #206=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #207=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1472 " 1) +COMMENT #208=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 3602 " 1) +COMMENT #209=(CLinePar +COMMENT (CParagraph 0 (1 #6# 3) 1 2 2 0 191) +COMMENT " N3: 5764 " 1))))) "SacI: 3 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24960288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #211=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 748 " 1) +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1368 " 1) +COMMENT #214=(CLinePar +COMMENT (CParagraph 0 (1 #7# 3) 1 2 2 0 191) +COMMENT " N3: 1642 " 1))))) "SalI: 3 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #215=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26684872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #216=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24971208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24970808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #218=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #219=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 4723 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #220=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26701352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #221=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #222=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1) +COMMENT #223=(CLinePar +COMMENT (CParagraph 0 (1 #19# 2) 1 2 2 0 191) +COMMENT " N2: 1186 " 1))))) "XhoI: 2 sites") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #224=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26687992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #225=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #226=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #227=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #228=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #229=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #230=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #231=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #232=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #233=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #234=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #235=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #236=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #237=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #238=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #239=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #240=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #241=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #242=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #243=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #244=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #245=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #246=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #247=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #248=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #249=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #250=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #251=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #252=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #253=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #254=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #255=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #256=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #257=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #258=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #259=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #260=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #261=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #262=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #263=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #264=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.6529 -30.1669 40.0378 40.0378 0.01 10 -1 6357 6357 1 0 0) +COMMENT #265=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #266=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1201 100) +COMMENT (CObjectList +COMMENT #267=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 26560060 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27517 6.27317 1 0.0214037) 0.0986815) +COMMENT #268=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMgfpuv-sp1+thiM81lacZ" +COMMENT "@N" 1 0 0.871165 0 -10 16.8091 1.44863 Nil) +COMMENT #269=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #227# 24664080 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "6357 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #270=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -2481 100) +COMMENT (CObjectList +COMMENT #271=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil 393219 100) +COMMENT (CObjectList +COMMENT #272=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.99293 0.566432 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# -1647 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -3.91301 15.681 0 -10 2.7474 1.04901 #272#) +COMMENT #274=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #229# 3736040 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.61443 4.66073 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 24559284 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ*" "@N" 1 +COMMENT -1.86811 -12.1963 0 -10 2.29783 1.04901 #274#) +COMMENT #276=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #50# 0) 1 2 0 0 #229# +COMMENT 268634488 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 4.81171 5.54294 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #277=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 574 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 12.5292 -10.454 0 -10 2.82233 1.04901 #276#)) +COMMENT (CObjectList)) +COMMENT #278=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #279=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.481566 1.9 +COMMENT 0.082322 1) +COMMENT #280=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 21240612 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -7.99406 12.1963 0 -10 4.0212 1.04901 #279#) +COMMENT #281=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.70083 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# -1260 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 11.5231 5.22699 0 -10 1.17389 1.04901 #281#) +COMMENT #283=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.64395 +COMMENT 4.76336 1 0.082322) 0.8 1.8 0) +COMMENT #284=(CLabel (CWidget 0 (0 0) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 16.2925 -26.1349 0 +COMMENT -10 7.34306 1.04901 #283#) +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 4.68935 4.76336 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 21258844 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 15.7517 -24.3926 0 -10 5.86945 1.04901 +COMMENT #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #230# 3736040 +COMMENT 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.52025 +COMMENT 5.66629 1 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 24561108 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 15.0009 -1.74233 0 +COMMENT -10 7.34306 1.04901 #287#) +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.52419 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 26567908 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 11.3643 -6.96932 0 -10 2.94721 1.04901 #289#) +COMMENT #291=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #230# +COMMENT 268634488 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.58932 +COMMENT 5.66629 1 0.082322) 0.8 1.8 0) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 25031328 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 14.5718 0 0 -10 5.86945 1.04901 #291#)) +COMMENT (CObjectList)) +COMMENT #293=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #294=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #234# 26958024 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.76399 1.9 +COMMENT 0.082322 1) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 196632 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 7.88417 12.1963 0 -10 2.62252 1.04901 #294#)) +COMMENT (CObjectList)) +COMMENT #296=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -2411 100) +COMMENT (CObjectList +COMMENT #297=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #247# 1114129 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.80642 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# -1330 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 7.73601 17.4233 0 -10 2.62252 1.04901 #297#) +COMMENT #299=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.13898 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel (CWidget 0 (0 0) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.56219 27.8773 0 -10 3.94627 1.04901 #299#) +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #247# 2228241 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.95247 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 3736048 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 6.75114 26.1349 0 -10 4.0212 1.04901 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1271 100) +COMMENT (CObjectList +COMMENT #304=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.89523 5.99293 1 0.082322) 0.8 1.8 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 26552244 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 6.361 22.6503 0 -10 2.7474 1.04901 #304#) +COMMENT #306=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #242# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.68011 5.78274 1 0.082322) 0.8 1.8 0) +COMMENT #307=(CLabel (CWidget 0 (0 0) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 9.89525 8.71165 0 -10 2.69745 1.04901 #306#)) +COMMENT (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.70083 1.9 0.082322 +COMMENT 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 26432940 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5132 3.48466 0 -10 2.14797 1.04901 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -877 100) +COMMENT (CObjectList +COMMENT #312=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.75294 1.38352 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 25015484 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.2113 5.22699 0 -10 2.7474 1.04901 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -249 100) +COMMENT (CObjectList +COMMENT #315=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #234# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.50489 1.60851) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 24598812 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.5159 0 0 -10 1.17389 1.04901 #315#) +COMMENT #317=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #234# 100 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 0.591102 +COMMENT 0.695705) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.25058 8.71165 0 -10 1.17389 1.04901 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #234# 2228241 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.71267 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 26562284 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 10.737 6.96932 0 -10 1.49858 1.04901 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.73636 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 3736136 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 7.52044 10.454 0 -10 1.49858 1.04901 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.78471 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 24980332 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 9.1683 13.9386 0 -10 5.86945 1.04901 +COMMENT #326#) +COMMENT #328=(CScratch +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.52222 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# -1647 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 9.96273 -8.71165 0 -10 2.7474 1.04901 #328#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #330=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #331=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -1435 100) +COMMENT (CObjectList +COMMENT #332=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.82095 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #235# 24643972 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (2486)" "@N (@S)" 5 10.9452 +COMMENT -33.1043 0 -10 4.47078 0.924127 #332#)) +COMMENT (CObjectList)) +COMMENT #334=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1505 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.61344 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #235# 24643516 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (4723)" "@N (@S)" 5 -14.3073 +COMMENT -1.74233 0 -10 4.79547 0.924127 #335#)) +COMMENT (CObjectList)) +COMMENT #337=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #338=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.81171 1.9 +COMMENT 0.082322 1) +COMMENT #339=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #235# 24646252 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (1482)" "@N (@S)" 5 15.8466 +COMMENT -19.1656 0 -10 5.51978 0.924127 #338#)) +COMMENT (CObjectList)) +COMMENT #340=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #341=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #233# 2228241 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.50391 1.9 +COMMENT 0.082322 1) +COMMENT #342=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #235# 27162396 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (4834)" "@N (@S)" 5 -14.4308 +COMMENT 1.74233 0 -10 4.94533 0.924127 #341#)) +COMMENT (CObjectList)) +COMMENT #343=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #344=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.67912 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #235# 3736256 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.2343 +COMMENT 1.74233 0 -10 4.67059 0.924127 #344#)) +COMMENT (CObjectList)) +COMMENT #346=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #347=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.77915 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel (CWidget 0 (0 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (1515)" "@N (@S)" 5 15.3805 +COMMENT -22.6503 0 -10 4.67059 0.924127 #347#)) +COMMENT (CObjectList)) +COMMENT #349=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #350=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.78309 1.9 +COMMENT 0.082322 1) +COMMENT #351=(CLabel (CWidget 0 (0 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (1511)" "@N (@S)" 5 15.2668 +COMMENT -20.908 0 -10 4.59566 0.924127 #350#)) +COMMENT (CObjectList)) +COMMENT #352=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #353=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.436172 1.9 +COMMENT 0.082322 1) +COMMENT #354=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #235# 21259252 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (5916)" "@N (@S)" 5 -8.17126 +COMMENT 13.9386 0 -10 4.62063 0.924127 #353#)) +COMMENT (CObjectList)) +COMMENT #355=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #356=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.85971 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 21630316 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 8.23346 +COMMENT 20.908 0 -10 4.34589 0.924127 #356#) +COMMENT #358=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.0193 1.9 0.082322 +COMMENT 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 21206004 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (2285)" "@N (@S)" 5 12.8158 +COMMENT -31.3619 0 -10 4.8704 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 2 (10 #19# 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.78965 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 268742920 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 8.72205 15.681 +COMMENT 0 -10 4.19603 0.924127 #361#) +COMMENT #363=(CScratch +COMMENT (CWidget 2 (1 #19# 2) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.10381 1.9 +COMMENT 0.082322 1) +COMMENT #364=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 26807796 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (1186)" "@N (@S)" 5 14.1184 +COMMENT -12.1963 0 -10 4.67059 0.924127 #363#)) +COMMENT (CObjectList)) +COMMENT #365=(CGroupWidget +COMMENT (CWidget 3 (10 #1# 0) 1 2 0 0 Nil -2551 100) +COMMENT (CObjectList +COMMENT #366=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.52518 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (759)" "@N (@S)" 5 13.5268 +COMMENT -5.22699 0 -10 5.12016 0.924127 #366#) +COMMENT #368=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #233# 24625848 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.00611 1.9 +COMMENT 0.082322 1) +COMMENT #369=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 24646708 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1285)" "@N (@S)" 5 15.1322 +COMMENT -13.9386 0 -10 5.59471 0.924127 #368#) +COMMENT #370=(CScratch +COMMENT (CWidget 3 (1 #1# 3) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.64297 1.9 +COMMENT 0.082322 1) +COMMENT #371=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 24644428 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1653)" "@N (@S)" 5 15.8971 +COMMENT -29.6196 0 -10 5.59471 0.924127 #370#)) +COMMENT (CObjectList)) +COMMENT #372=(CGroupWidget +COMMENT (CWidget 3 (10 #6# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #373=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #233# 3736008 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.82158 1.9 +COMMENT 0.082322 1) +COMMENT #374=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 24560652 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1472)" "@N (@S)" 5 15.1117 +COMMENT -17.4233 0 -10 4.62063 0.924127 #373#) +COMMENT #375=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #233# 1114129 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.71966 1.9 +COMMENT 0.082322 1) +COMMENT #376=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 24644884 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (3602)" "@N (@S)" 5 -8.72111 +COMMENT -10.454 0 -10 4.67059 0.924127 #375#) +COMMENT #377=(CScratch +COMMENT (CWidget 3 (1 #6# 3) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.586168 1.9 +COMMENT 0.082322 1) +COMMENT #378=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 3736240 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (5764)" "@N (@S)" 5 -9.45991 +COMMENT 10.454 0 -10 4.67059 0.924127 #377#)) +COMMENT (CObjectList)) +COMMENT #379=(CGroupWidget +COMMENT (CWidget 3 (10 #7# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #380=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #233# 25182936 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.53603 1.9 +COMMENT 0.082322 1) +COMMENT #381=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 192 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (748)" "@N (@S)" 5 13.4715 +COMMENT -3.48466 0 -10 3.94627 0.924127 #380#) +COMMENT #382=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.92421 1.9 +COMMENT 0.082322 1) +COMMENT #383=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 21189372 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1368)" "@N (@S)" 5 14.8177 +COMMENT -15.681 0 -10 4.42082 0.924127 #382#) +COMMENT #384=(CScratch +COMMENT (CWidget 3 (1 #7# 3) 1 2 0 0 #233# 1114131 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.65382 1.9 +COMMENT 0.082322 1) +COMMENT #385=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 21516348 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1642)" "@N (@S)" 5 15.2494 +COMMENT -27.8773 0 -10 4.42082 0.924127 #384#)) +COMMENT (CObjectList)) +COMMENT #386=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #387=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.94556 1.9 +COMMENT 0.082322 1) +COMMENT #388=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 25045972 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 7.53495 +COMMENT 24.3926 0 -10 4.79547 0.924127 #387#) +COMMENT #389=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #233# 26811048 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.84195 1.9 +COMMENT 0.082322 1) +COMMENT #390=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 26606732 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 8.63482 +COMMENT 19.1656 0 -10 4.79547 0.924127 #389#) +COMMENT #391=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.705573 1.9 +COMMENT 0.082322 1) +COMMENT #392=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 26270892 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (5643)" "@N (@S)" 5 -12.7059 +COMMENT 6.96932 0 -10 5.34495 0.924127 #391#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #393=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #394=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21223152 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4956..5594 + /vntifkey="33" + /label=ColE1 + terminator 4728..4832 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(5653..5758) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(5784..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 5870..5891 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 1531..1651 + /vntifkey="21" + /label=core\riboswitch + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 1531..1605 + /vntifkey="21" + /label=TPP\aptamer + CDS 1635..4721 + /vntifkey="4" + /label=lacZ* + misc_feature 616..763 + /vntifkey="21" + /label=core\riboswitch + mutation 762..762 + /vntifkey="62" + /label=orig\T + misc_feature 760..760 + /vntifkey="21" + /label=orig\G + misc_feature 616..693 + /vntifkey="21" + /label=TPP\aptamer + CDS 741..1481 + /vntifkey="4" + /label=gfpuv +BASE COUNT 1570 a 1641 c 1649 g 1497 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gtcacggacc accaggtcat tgcttcttca + 721 cgttatggca ggagcaaact atgcaagtcg acctgctgga tccattgagt aaaggagaag + 781 aacttttcac tggagttgtc ccaattcttg ttgaattaga tggtgatgtt aatgggcaca + 841 aattttctgt cagtggagag ggtgaaggtg atgcaacata cggaaaactt acccttaaat + 901 ttatttgcac tactggaaaa ctacctgttc catggccaac acttgtcact actttctctt + 961 atggtgttca atgcttttcc cgttatccgg atcatatgaa acggcatgac tttttcaaga + 1021 gtgccatgcc cgaaggttat gtacaggaac gcactatatc tttcaaagat gacgggaact + 1081 acaagacgcg tgctgaagtc aagtttgaag gtgataccct tgttaatcgt atcgagttaa + 1141 aaggtattga ttttaaagaa gatggaaaca ttctcggaca caaactcgag tacaactata + 1201 actcacacaa tgtatacatc acggcagaca aacaaaagaa tggaatcaaa gctaacttca + 1261 aaattcgcca caacattgaa gatggatccg ttcaactagc agaccattat caacaaaata + 1321 ctccaattgg cgatggccct gtccttttac cagacaacca ttacctgtcg acacaatctg + 1381 ccctttcgaa agatcccaac gaaaagcgtg accacatggt ccttcttgag tttgtaactg + 1441 ctgctgggat tacacatggc atggatgagc tctacaaata aagcttaact aactaaccta + 1501 acctaaagcg ctagcttaat tcaaccaaac gactcggggt gcccttctgc gtgaaggctg + 1561 agaaataccc gtatcacctg atctggataa tgccagcgta gggaagacgt gtatagtatg + 1621 tacaggagca aactatgcaa gtcgacctgc tggatccact gcatatagat cccgtcgttt + 1681 tacaacgtcg tgactgggaa aaccctggcg ttacccaact taatcgcctt gcagcacatc + 1741 cccctttcgc cagctggcgt aatagcgaag aggcccgcac cgatcgccct tcccaacagt + 1801 tgcgcagcct gaatggcgaa tggcgctttg cctggtttcc ggcaccagaa gcggtgccgg + 1861 aaagctggct ggagtgcgat cttcctgagg ccgatactgt cgtcgtcccc tcaaactggc + 1921 agatgcacgg ttacgatgcg cccatctaca ccaacgtgac ctatcccatt acggtcaatc + 1981 cgccgtttgt tcccacggag aatccgacgg gttgttactc gctcacattt aatgttgatg + 2041 aaagctggct acaggaaggc cagacgcgaa ttatttttga tggcgttaac tcggcgtttc + 2101 atctgtggtg caacgggcgc tgggtcggtt acggccagga cagtcgtttg ccgtctgaat + 2161 ttgacctgag cgcattttta cgcgccggag aaaaccgcct cgcggtgatg gtgctgcgtt + 2221 ggagtgacgg cagttatctg gaagatcagg atatgtggcg gatgagcggc attttccgtg + 2281 acgtctcgtt gctgcataaa ccgactacac aaatcagcga tttccatgtt gccactcgct + 2341 ttaatgatga tttcagccgc gctgtactgg aggctgaagt tcagatgtgc ggcgagttgc + 2401 gtgactacct acgggtaaca gtttctttat ggcagggtga aacgcaggtc gccagcggca + 2461 ccgcgccttt cggcggtgaa attatcgatg agcgtggtgg ttatgccgat cgcgtcacac + 2521 tacgtctgaa cgtcgaaaac ccgaaactgt ggagcgccga aatcccgaat ctctatcgtg + 2581 cggtggttga actgcacacc gccgacggca cgctgattga agcagaagcc tgcgatgtcg + 2641 gtttccgcga ggtgcggatt gaaaatggtc tgctgctgct gaacggcaag ccgttgctga + 2701 ttcgaggcgt taaccgtcac gagcatcatc ctctgcatgg tcaggtcatg gatgagcaga + 2761 cgatggtgca ggatatcctg ctgatgaagc agaacaactt taacgccgtg cgctgttcgc + 2821 attatccgaa ccatccgctg tggtacacgc tgtgcgaccg ctacggcctg tatgtggtgg + 2881 atgaagccaa tattgaaacc cacggcatgg tgccaatgaa tcgtctgacc gatgatccgc + 2941 gctggctacc ggcgatgagc gaacgcgtaa cgcgaatggt gcagcgcgat cgtaatcacc + 3001 cgagtgtgat catctggtcg ctggggaatg aatcaggcca cggcgctaat cacgacgcgc + 3061 tgtatcgctg gatcaaatct gtcgatcctt cccgcccggt gcagtatgaa ggcggcggag + 3121 ccgacaccac ggccaccgat attatttgcc cgatgtacgc gcgcgtggat gaagaccagc + 3181 ccttcccggc tgtgccgaaa tggtccatca aaaaatggct ttcgctacct ggagagacgc + 3241 gcccgctgat cctttgcgaa tacgcccacg cgatgggtaa cagtcttggc ggtttcgcta + 3301 aatactggca ggcgtttcgt cagtatcccc gtttacaggg cggcttcgtc tgggactggg + 3361 tggatcagtc gctgattaaa tatgatgaaa acggcaaccc gtggtcggct tacggcggtg + 3421 attttggcga tacgccgaac gatcgccagt tctgtatgaa cggtctggtc tttgccgacc + 3481 gcacgccgca tccagcgctg acggaagcaa aacaccagca gcagtttttc cagttccgtt + 3541 tatccgggca aaccatcgaa gtgaccagcg aatacctgtt ccgtcatagc gataacgagc + 3601 tcctgcactg gatggtggcg ctggatggta agccgctggc aagcggtgaa gtgcctctgg + 3661 atgtcgctcc acaaggtaaa cagttgattg aactgcctga actaccgcag ccggagagcg + 3721 ccgggcaact ctggctcaca gtacgcgtag tgcaaccgaa cgcgaccgca tggtcagaag + 3781 ccgggcacat cagcgcctgg cagcagtggc gtctggcgga aaacctcagt gtgacgctcc + 3841 ccgccgcgtc ccacgccatc ccgcatctga ccaccagcga aatggatttt tgcatcgagc + 3901 tgggtaataa gcgttggcaa tttaaccgcc agtcaggctt tctttcacag atgtggattg + 3961 gcgataaaaa acaactgctg acgccgctgc gcgatcagtt cacccgtgca ccgctggata + 4021 acgacattgg cgtaagtgaa gcgacccgca ttgaccctaa cgcctgggtc gaacgctgga + 4081 aggcggcggg ccattaccag gccgaagcag cgttgttgca gtgcacggca gatacacttg + 4141 ctgatgcggt gctgattacg accgctcacg cgtggcagca tcaggggaaa accttattta + 4201 tcagccggaa aacctaccgg attgatggta gtggtcaaat ggcgattacc gttgatgttg + 4261 aagtggcgag cgatacaccg catccggcgc ggattggcct gaactgccag ctggcgcagg + 4321 tagcagagcg ggtaaactgg ctcggattag ggccgcaaga aaactatccc gaccgcctta + 4381 ctgccgcctg ttttgaccgc tgggatctgc cattgtcaga catgtatacc ccgtacgtct + 4441 tcccgagcga aaacggtctg cgctgcggga cgcgcgaatt gaattatggc ccacaccagt + 4501 ggcgcggcga cttccagttc aacatcagcc gctacagtca acagcaactg atggaaacca + 4561 gccatcgcca tctgctgcac gcggaagaag gcacatggct gaatatcgac ggtttccata + 4621 tggggattgg tggcgacgac tcctggagcc cgtcagtatc ggcggaattt cagctgagcg + 4681 ccggtcgcta ccattaccag ttggtctggt gtcaaaaata atctagaggc atcaaataaa + 4741 acgaaaggct cagtcgaaag actgggcctt tcgttttatc tgttgtttgt cggtgaacgc + 4801 tctcctgagt aggacaaatc cgccgcccta gacctaggcg ttcggctgcg gcgagcggta + 4861 tcagctcact caaaggcggt aatacggtta tccacagaat caggggataa cgcaggaaag + 4921 aacatgtgag caaaaggcca gcaaaaggcc aggaaccgta aaaaggccgc gttgctggcg + 4981 tttttccata ggctccgccc ccctgacgag catcacaaaa atcgacgctc aagtcagagg + 5041 tggcgaaacc cgacaggact ataaagatac caggcgtttc cccctggaag ctccctcgtg + 5101 cgctctcctg ttccgaccct gccgcttacc ggatacctgt ccgcctttct cccttcggga + 5161 agcgtggcgc tttctcaatg ctcacgctgt aggtatctca gttcggtgta ggtcgttcgc + 5221 tccaagctgg gctgtgtgca cgaacccccc gttcagcccg accgctgcgc cttatccggt + 5281 aactatcgtc ttgagtccaa cccggtaaga cacgacttat cgccactggc agcagccact + 5341 ggtaacagga ttagcagagc gaggtatgta ggcggtgcta cagagttctt gaagtggtgg + 5401 cctaactacg gctacactag aaggacagta tttggtatct gcgctctgct gaagccagtt + 5461 accttcggaa aaagagttgg tagctcttga tccggcaaac aaaccaccgc tggtagcggt + 5521 ggtttttttg tttgcaagca gcagattacg cgcagaaaaa aaggatctca agaagatcct + 5581 ttgatctttt ctacggggtc tgacgctcag tggaacgaaa actcacgtta agggattttg + 5641 gtcatgacta gtgcttggat tctcaccaat aaaaaacgcc cggcggcaac cgagcgttct + 5701 gaacaaatcc agatggagtt ctgaggtcat tactggatct atcaacagga gtccaagcga + 5761 gctcaaactt ggtctgacag ttaccaatgc ttaatcagtg aggcacctat ctcagcgatc + 5821 tgtctatttc gttcatccat agttgcctga ctccccgtcg tgtagataac tacgatacgg + 5881 gagggcttac catctggccc cagtgctgca atgataccgc gagacccacg ctcaccggct + 5941 ccagatttat cagcaataaa ccagccagcc ggaagggccg agcgcagaag tggtcctgca + 6001 actttatccg cctccatcca gtctattaat tgttgccggg aagctagagt aagtagttcg + 6061 ccagttaata gtttgcgcaa cgttgttgcc attgctacag gcatcgtggt gtcacgctcg + 6121 tcgtttggta tggcttcatt cagctccggt tcccaacgat caaggcgagt tacatgatcc + 6181 cccatgttgt gcaaaaaagc ggttagctcc ttcggtcctc cgatcgttgt cagaagtaag + 6241 ttggccgcag tgttatcact catggttatg gcagcactgc ataattctct tactgtcatg + 6301 ccatccgtaa gatgcttttc tgtgactggt gagtactcaa ccaagtcatt ctgagaa +// diff --git a/lib/VNTI files/pLacthiMgfpuv.gb b/lib/VNTI files/pLacthiMgfpuv.gb new file mode 100644 index 00000000..7f91d8e7 --- /dev/null +++ b/lib/VNTI files/pLacthiMgfpuv.gb @@ -0,0 +1,1493 @@ +LOCUS pLacthiMgf 3118 bp DNA circular 19-SEP-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|456684439| +COMMENT VNTDBDATE|457876665| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMgfpuv| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMgfpuv" 0 3118 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3118 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 759 0 1285 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1472 0 2525 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 748 0 1368 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1595 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 1998 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 1087 0 1684 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 2 491 0 1186 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2986 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2677 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 2404 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 476 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1717 2355 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1489 1593 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2414 2519 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2545 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2631 2652 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 763 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 762 762 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 760 760 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 693 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "gfpuv" 4 0 0 741 1481 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #48=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #49=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pLacthiMgfpuv" 2) +COMMENT 5 "" 0 4) +COMMENT #50=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMgfpuv'" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 09/05/07 04:47\214\337\214\343" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 09/19/07 11:57\214\337\221O" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3118 bp" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #63=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 741 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 741 End: 1481" 1))) "gfpuv") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2545 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2545 End: 284 (Complementary)" +COMMENT 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 763 " 1))) +COMMENT "core riboswitch") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 693 " 1))) +COMMENT "TPP aptamer") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 760 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 760 End: 760 " 1))) "orig G") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2631 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2631 End: 2652" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1717 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1717 End: 2355" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1489 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1489 End: 1593" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2414 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2414 End: 2519 (Complementary)" +COMMENT 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 762 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 762 End: 762 " 1))) +COMMENT "orig T"))) "Mutation (2 total)"))) +COMMENT "Feature Map") +COMMENT #151=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21031704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25143184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 1087 " 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1684 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24977160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21022736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1998 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21031624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #165=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1595 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21020664 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 759 " 1) +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1285 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25135008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #172=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21022816 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25135088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25137088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24980040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2677 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #180=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25134928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #181=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #182=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2404 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21020584 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21023136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21032584 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21020504 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25137168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21022896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24979960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2986 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21032024 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1472 " 1) +COMMENT #199=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2525 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21031944 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #201=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 748 " 1) +COMMENT #203=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1368 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25134848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21022656 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21032664 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24977080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #208=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #209=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1) +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #19# 2) 1 2 2 0 191) +COMMENT " N2: 1186 " 1))))) "XhoI: 2 sites") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25143104 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #212=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #213=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #214=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #215=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #216=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #217=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #218=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #219=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #220=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #221=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #222=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #223=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #224=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #225=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #226=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #227=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #228=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #229=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #230=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #231=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #232=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #233=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #234=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #235=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #236=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #237=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #238=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #239=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #240=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #241=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #242=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #243=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #244=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #245=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #246=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #247=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #248=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #249=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #250=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #251=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.9226 -21.4402 40.0378 40.0378 0.01 10 -1 3118 3118 1 0 0) +COMMENT #252=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1714 100) +COMMENT (CObjectList +COMMENT #253=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #254=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24668948 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.2762 6.2742 1 0.0214037) 0.201193) +COMMENT #255=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #215# 25891496 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMgfpuv" "@N" 1 0 0.871165 +COMMENT 0 -10 7.86757 1.44863 Nil) +COMMENT #256=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #214# 26577092 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3118 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.14703 0.924127 Nil)) (CObjectList)) +COMMENT #257=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #258=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -736 100) +COMMENT (CObjectList +COMMENT #259=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.7018 1.15485 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736088 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.77154 10.454 0 -10 2.72243 1.04901 #259#) +COMMENT #261=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.29352 4.78436 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #262=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24926940 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 11.7183 -24.3926 0 -10 2.79736 1.04901 #261#)) +COMMENT (CObjectList)) +COMMENT #263=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #264=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.98182 1.9 +COMMENT 0.082322 1) +COMMENT #265=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 27916528 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.9579 6.96932 0 -10 3.97125 1.04901 +COMMENT #264#) +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.10627 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 21122612 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 11.9349 -6.96932 0 -10 1.14891 1.04901 #266#) +COMMENT #268=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.73809 +COMMENT 5.03585 1 0.082322) 0.8 1.8 0) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 21199628 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 15.7854 -13.9386 0 +COMMENT -10 7.26813 1.04901 #268#) +COMMENT #270=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.74613 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 14.3482 -19.1656 0 -10 2.92224 1.04901 #270#) +COMMENT #272=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 4.87892 +COMMENT 5.03585 1 0.082322) 0.8 1.8 0) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26497404 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 14.9888 -12.1963 0 -10 5.8195 1.04901 +COMMENT #272#)) (CObjectList)) +COMMENT #274=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -178 100) +COMMENT (CObjectList +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.23503 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26253152 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 13.1257 0 0 -10 2.59755 1.04901 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1783 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.32154 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 11.3425 6.96932 0 -10 2.59755 1.04901 #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.99956 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26578460 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 6.09636 19.1656 0 -10 3.92129 1.04901 #280#) +COMMENT #282=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.61931 1.9 +COMMENT 0.082322 1) +COMMENT #283=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736400 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 10.0183 15.681 0 -10 3.97125 1.04901 #282#)) +COMMENT (CObjectList)) +COMMENT #284=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.50262 5.7018 1 0.082322) 0.8 1.8 1) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26579828 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 9.51622 12.1963 0 -10 2.72243 1.04901 #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.06402 5.27326 1 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.731 -3.48466 0 -10 2.67247 1.04901 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.10627 1.9 0.082322 +COMMENT 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26615364 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5014 -8.71165 0 -10 2.14797 1.04901 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #293=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.5351 2.82072 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 20942016 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.4 -6.96932 0 -10 2.72243 1.04901 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1922 100) +COMMENT (CObjectList +COMMENT #296=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #221# 1094 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 3.06819 +COMMENT 3.27944) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 268634488 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.11663 -33.1043 0 -10 1.14891 1.04901 #296#) +COMMENT #298=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #221# 117 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 1.20514 +COMMENT 1.41841) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 42563624 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.2051 3.48466 0 -10 1.14891 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -2132 100) +COMMENT (CObjectList +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.13041 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3801688 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 11.7974 -5.22699 0 -10 1.47361 1.04901 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -2062 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.1787 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26575660 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.5181 -1.74233 0 -10 1.47361 1.04901 #304#)) +COMMENT (CObjectList)) +COMMENT #306=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.27728 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736008 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 14.3998 1.74233 0 -10 5.8195 1.04901 +COMMENT #307#) +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.74211 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 268634488 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 14.3157 -20.908 0 -10 2.72243 1.04901 #309#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #311=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1992 100) +COMMENT (CObjectList +COMMENT #312=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #313=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.43019 1.9 +COMMENT 0.082322 1) +COMMENT #314=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24851404 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.8212 +COMMENT 10.454 0 -10 4.29594 0.924127 #313#)) +COMMENT (CObjectList)) +COMMENT #315=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1294 100) +COMMENT (CObjectList +COMMENT #316=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #220# 1149 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.06618 1.9 +COMMENT 0.082322 1) +COMMENT #317=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24850948 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1595)" "@N (@S)" 5 -4.15354 +COMMENT -13.9386 0 -10 4.84542 0.924127 #316#)) +COMMENT (CObjectList)) +COMMENT #318=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #319=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.06201 1.9 +COMMENT 0.082322 1) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24884220 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.2346 +COMMENT -10.454 0 -10 4.64561 0.924127 #319#)) +COMMENT (CObjectList)) +COMMENT #321=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #322=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.267586 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 26814040 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2986)" "@N (@S)" 5 -6.24096 +COMMENT 12.1963 0 -10 4.69556 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -1088 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.889271 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 25158012 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2677)" "@N (@S)" 5 -11.9976 +COMMENT 8.71165 0 -10 4.64561 0.924127 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -2204 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.31752 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3801840 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 12.9779 +COMMENT 5.22699 0 -10 4.12111 0.924127 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.74815 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24659164 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (759)" "@N (@S)" 5 15.5499 +COMMENT -17.4233 0 -10 5.09519 0.924127 #331#) +COMMENT #333=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.68987 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 21600172 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1285)" "@N (@S)" 5 10.1895 +COMMENT -27.8773 0 -10 5.56974 0.924127 #333#)) +COMMENT (CObjectList)) +COMMENT #335=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #336=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.31364 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 21600668 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1472)" "@N (@S)" 5 5.38336 +COMMENT -31.3619 0 -10 4.57068 0.924127 #336#) +COMMENT #338=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.19508 1.9 +COMMENT 0.082322 1) +COMMENT #339=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24854596 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2525)" "@N (@S)" 5 -13.5526 +COMMENT 5.22699 0 -10 4.64561 0.924127 #338#)) +COMMENT (CObjectList)) +COMMENT #340=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #341=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.77028 1.9 +COMMENT 0.082322 1) +COMMENT #342=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24850492 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (748)" "@N (@S)" 5 14.8475 +COMMENT -15.681 0 -10 3.92129 0.924127 #341#) +COMMENT #343=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.52288 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24851860 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1368)" "@N (@S)" 5 7.77067 +COMMENT -29.6196 0 -10 4.37087 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -457 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.94323 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24886500 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 7.32248 +COMMENT 17.4233 0 -10 4.64561 0.924127 #346#) +COMMENT #348=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #220# 25182936 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.25537 1.9 +COMMENT 0.082322 1) +COMMENT #349=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24852316 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1998)" "@N (@S)" 5 -12.2882 +COMMENT -8.71165 0 -10 5.17011 0.924127 #348#)) +COMMENT (CObjectList)) +COMMENT #350=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -1716 100) +COMMENT (CObjectList +COMMENT #351=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.08823 1.9 +COMMENT 0.082322 1) +COMMENT #352=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24853684 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1087)" "@N (@S)" 5 13.2712 +COMMENT -22.6503 0 -10 4.74552 0.924127 #351#) +COMMENT #353=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.88711 1.9 +COMMENT 0.082322 1) +COMMENT #354=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24886044 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1684)" "@N (@S)" 5 -6.17643 +COMMENT -12.1963 0 -10 4.74552 0.924127 #353#)) +COMMENT (CObjectList)) +COMMENT #355=(CGroupWidget +COMMENT (CWidget 2 (10 #19# 0) 1 2 0 0 Nil -809 100) +COMMENT (CObjectList +COMMENT #356=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.28734 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24885588 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 13.6022 +COMMENT 3.48466 0 -10 4.17106 0.924127 #356#) +COMMENT #358=(CScratch +COMMENT (CWidget 2 (1 #19# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.88905 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26574060 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (1186)" "@N (@S)" 5 11.5782 +COMMENT -26.1349 0 -10 4.64561 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -739 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.60523 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 10.7625 +COMMENT 13.9386 0 -10 4.77049 0.924127 #361#) +COMMENT #363=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #220# 1149 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.39397 1.9 +COMMENT 0.082322 1) +COMMENT #364=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26686780 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 12.1801 +COMMENT 8.71165 0 -10 4.77049 0.924127 #363#) +COMMENT #365=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.43853 1.9 +COMMENT 0.082322 1) +COMMENT #366=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26843524 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2404)" "@N (@S)" 5 -14.5098 +COMMENT 1.74233 0 -10 5.295 0.924127 #365#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #367=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1158 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #368=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1228 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21273256 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1717..2355 + /vntifkey="33" + /label=ColE1 + terminator 1489..1593 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2414..2519) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2545..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2631..2652 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..763 + /vntifkey="21" + /label=core\riboswitch + mutation 762..762 + /vntifkey="62" + /label=orig\T + misc_feature 760..760 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..693 + /vntifkey="21" + /label=TPP\aptamer + CDS 741..1481 + /vntifkey="4" + /label=gfpuv +BASE COUNT 842 a 760 c 725 g 791 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gtcacggacc accaggtcat tgcttcttca + 721 cgttatggca ggagcaaact atgcaagtcg acctgctgga tccattgagt aaaggagaag + 781 aacttttcac tggagttgtc ccaattcttg ttgaattaga tggtgatgtt aatgggcaca + 841 aattttctgt cagtggagag ggtgaaggtg atgcaacata cggaaaactt acccttaaat + 901 ttatttgcac tactggaaaa ctacctgttc catggccaac acttgtcact actttctctt + 961 atggtgttca atgcttttcc cgttatccgg atcatatgaa acggcatgac tttttcaaga + 1021 gtgccatgcc cgaaggttat gtacaggaac gcactatatc tttcaaagat gacgggaact + 1081 acaagacgcg tgctgaagtc aagtttgaag gtgataccct tgttaatcgt atcgagttaa + 1141 aaggtattga ttttaaagaa gatggaaaca ttctcggaca caaactcgag tacaactata + 1201 actcacacaa tgtatacatc acggcagaca aacaaaagaa tggaatcaaa gctaacttca + 1261 aaattcgcca caacattgaa gatggatccg ttcaactagc agaccattat caacaaaata + 1321 ctccaattgg cgatggccct gtccttttac cagacaacca ttacctgtcg acacaatctg + 1381 ccctttcgaa agatcccaac gaaaagcgtg accacatggt ccttcttgag tttgtaactg + 1441 ctgctgggat tacacatggc atggatgagc tctacaaata aagctagagg catcaaataa + 1501 aacgaaaggc tcagtcgaaa gactgggcct ttcgttttat ctgttgtttg tcggtgaacg + 1561 ctctcctgag taggacaaat ccgccgccct agacctaggc gttcggctgc ggcgagcggt + 1621 atcagctcac tcaaaggcgg taatacggtt atccacagaa tcaggggata acgcaggaaa + 1681 gaacatgtga gcaaaaggcc agcaaaaggc caggaaccgt aaaaaggccg cgttgctggc + 1741 gtttttccat aggctccgcc cccctgacga gcatcacaaa aatcgacgct caagtcagag + 1801 gtggcgaaac ccgacaggac tataaagata ccaggcgttt ccccctggaa gctccctcgt + 1861 gcgctctcct gttccgaccc tgccgcttac cggatacctg tccgcctttc tcccttcggg + 1921 aagcgtggcg ctttctcaat gctcacgctg taggtatctc agttcggtgt aggtcgttcg + 1981 ctccaagctg ggctgtgtgc acgaaccccc cgttcagccc gaccgctgcg ccttatccgg + 2041 taactatcgt cttgagtcca acccggtaag acacgactta tcgccactgg cagcagccac + 2101 tggtaacagg attagcagag cgaggtatgt aggcggtgct acagagttct tgaagtggtg + 2161 gcctaactac ggctacacta gaaggacagt atttggtatc tgcgctctgc tgaagccagt + 2221 taccttcgga aaaagagttg gtagctcttg atccggcaaa caaaccaccg ctggtagcgg + 2281 tggttttttt gtttgcaagc agcagattac gcgcagaaaa aaaggatctc aagaagatcc + 2341 tttgatcttt tctacggggt ctgacgctca gtggaacgaa aactcacgtt aagggatttt + 2401 ggtcatgact agtgcttgga ttctcaccaa taaaaaacgc ccggcggcaa ccgagcgttc + 2461 tgaacaaatc cagatggagt tctgaggtca ttactggatc tatcaacagg agtccaagcg + 2521 agctcaaact tggtctgaca gttaccaatg cttaatcagt gaggcaccta tctcagcgat + 2581 ctgtctattt cgttcatcca tagttgcctg actccccgtc gtgtagataa ctacgatacg + 2641 ggagggctta ccatctggcc ccagtgctgc aatgataccg cgagacccac gctcaccggc + 2701 tccagattta tcagcaataa accagccagc cggaagggcc gagcgcagaa gtggtcctgc + 2761 aactttatcc gcctccatcc agtctattaa ttgttgccgg gaagctagag taagtagttc + 2821 gccagttaat agtttgcgca acgttgttgc cattgctaca ggcatcgtgg tgtcacgctc + 2881 gtcgtttggt atggcttcat tcagctccgg ttcccaacga tcaaggcgag ttacatgatc + 2941 ccccatgttg tgcaaaaaag cggttagctc cttcggtcct ccgatcgttg tcagaagtaa + 3001 gttggccgca gtgttatcac tcatggttat ggcagcactg cataattctc ttactgtcat + 3061 gccatccgta agatgctttt ctgtgactgg tgagtactca accaagtcat tctgagaa +// diff --git a/lib/VNTI files/pLacthiMlacZ-N30#2mutCCGG.gb b/lib/VNTI files/pLacthiMlacZ-N30#2mutCCGG.gb new file mode 100644 index 00000000..4d47f3b6 --- /dev/null +++ b/lib/VNTI files/pLacthiMlacZ-N30#2mutCCGG.gb @@ -0,0 +1,1410 @@ +LOCUS pLacthiMla 5441 bp DNA circular 28-JUL-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|453141596| +COMMENT VNTDBDATE|453141596| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMlacZ-N30#2mutCC/GG| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMlacZ-N30#2mutCC/GG" 0 5441 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5441 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 737 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1570 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3807 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2686 0 4848 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 726 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1369 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3918 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3091 0 3206 0 +COMMENT 4321 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 2048 0 2828 0 3253 0 +COMMENT 3505 0 4007 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 869 0 1595 0 2075 0 2528 +COMMENT 0 5309 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 5000 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4727 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2263 0 3515 1 0 +COMMENT "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4040 4678 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 3812 3916 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 4737 4842 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 4868 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 4954 4975 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 735 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "lacZ*" 4 0 0 719 3805 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #46=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #47=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacthiMlacZ-N30#2mutCC/GG" 2) 5 "" 0 4) +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMlacZ-N30#2mutCC/GG'" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/28/07 04:39\214\337\214\343" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/28/07 04:39\214\337\214\343" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5441 bp" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #61=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 719 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 719 End: 3805" 1))) "lacZ*") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4868 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4868 End: 284 (Complementary)" +COMMENT 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 735 " 1))) +COMMENT "core riboswitch") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1))) +COMMENT "TPP aptamer") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4954 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4954 End: 4975" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #88=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4040 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4040 End: 4678" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3812 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3812 End: 3916" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4737 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4737 End: 4842 (Complementary)" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #131=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #132=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #146=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27949528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 1369 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25941912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 5 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25796624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25755480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #153=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27372512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #154=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 3918 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27364808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #157=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 737 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25788808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 2263 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 3515 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 28043216 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25788648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25928992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25820544 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 5000 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25905048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4727 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27950008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #176=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 1570 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27373608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27949608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26671160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25809416 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27373768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25929472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26401656 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2686 " 1) +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 4848 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27877288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 726 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25750592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24935064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27941536 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3807 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25796704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25888096 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #202=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #203=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #204=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #205=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #206=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #207=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #208=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #209=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #210=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #211=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #212=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #213=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #214=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #215=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #216=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #217=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #218=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #219=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #220=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #221=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #222=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #223=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #224=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #225=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #226=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #227=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #228=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #229=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #230=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #231=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #232=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #233=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #234=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #235=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #236=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #237=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #238=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #239=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #240=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #241=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -179) 1 1 0 1 1 +COMMENT (mapper: 18.468 -26.6852 40.0378 40.0378 0.01 10 -1 5441 5441 1 0 0) +COMMENT #242=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #243=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -94 100) +COMMENT (CObjectList +COMMENT #244=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 26729724 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27534 6.27334 1 0.0214037) 0.115295) +COMMENT #245=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #205# 27456756 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMlacZ-N30#2mutCC/GG" "@N" +COMMENT 1 0 0.871165 0 -10 16.884 1.44863 Nil) +COMMENT #246=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #204# 26959932 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5441 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.24693 0.924127 Nil)) (CObjectList)) +COMMENT #247=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -94 100) +COMMENT (CObjectList +COMMENT #248=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -155 100) +COMMENT (CObjectList +COMMENT #249=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.94575 0.661792 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #250=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 24765556 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.19824 15.681 0 -10 2.7474 1.04901 #249#) +COMMENT #251=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.88622 5.44537 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #252=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ*" "@N" 1 +COMMENT 8.02346 -15.681 0 -10 2.29783 1.04901 #251#)) +COMMENT (CObjectList)) +COMMENT #253=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -509 100) +COMMENT (CObjectList +COMMENT #254=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.562638 1.9 +COMMENT 0.082322 1) +COMMENT #255=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -8.83538 12.1963 0 -10 4.0212 1.04901 #254#) +COMMENT #256=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.60448 1.9 +COMMENT 0.082322 1) +COMMENT #257=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.5159 0 0 -10 1.17389 1.04901 #256#) +COMMENT #258=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.42577 +COMMENT 5.56412 1 0.082322) 0.8 1.8 0) +COMMENT #259=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 13.2111 -6.96932 0 +COMMENT -10 7.34306 1.04901 #258#) +COMMENT #260=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.47765 +COMMENT 5.56412 1 0.082322) 0.8 1.8 0) +COMMENT #261=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 13.579 -5.22699 0 -10 5.86945 1.04901 +COMMENT #260#)) (CObjectList)) +COMMENT #262=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -449 100) +COMMENT (CObjectList +COMMENT #263=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.67826 1.9 +COMMENT 0.082322 1) +COMMENT #264=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 11.251 6.96932 0 -10 2.62252 1.04901 #263#)) +COMMENT (CObjectList)) +COMMENT #265=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -155 100) +COMMENT (CObjectList +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.72784 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 26922308 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 8.38918 13.9386 0 -10 2.62252 1.04901 #266#) +COMMENT #268=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.11638 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 27480124 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.81587 24.3926 0 -10 3.94627 1.04901 #268#) +COMMENT #270=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.89848 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.33344 22.6503 0 -10 4.0212 1.04901 #270#)) +COMMENT (CObjectList)) +COMMENT #272=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -155 100) +COMMENT (CObjectList +COMMENT #273=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.83161 5.94575 1 0.082322) 0.8 1.8 1) +COMMENT #274=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 21401428 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 6.92118 19.1656 0 -10 2.7474 1.04901 #273#) +COMMENT #275=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.58026 5.70017 1 0.082322) 0.8 1.8 0) +COMMENT #276=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.7397 3.48466 0 -10 2.69745 1.04901 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 1330 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.60448 1.9 0.082322 +COMMENT 1) +COMMENT #279=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.8317 -1.74233 0 -10 2.14797 1.04901 #278#)) +COMMENT (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -149 100) +COMMENT (CObjectList +COMMENT #281=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.879699 1.61643 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 24546084 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 3.48466 0 -10 2.7474 1.04901 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -155 100) +COMMENT (CObjectList +COMMENT #284=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #211# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.75824 1.8793) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 27645420 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.2469 -3.48466 0 -10 1.17389 1.04901 #284#) +COMMENT #286=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #211# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 0.690615 0.812828) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 25176868 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.25058 8.71165 0 -10 1.17389 1.04901 #286#)) +COMMENT (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -155 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.61831 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.5268 1.74233 0 -10 1.49858 1.04901 #289#)) +COMMENT (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 1330 100) +COMMENT (CObjectList +COMMENT #292=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.64598 1.9 +COMMENT 0.082322 1) +COMMENT #293=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 11.6363 5.22699 0 -10 1.49858 1.04901 #292#)) +COMMENT (CObjectList)) +COMMENT #294=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -449 100) +COMMENT (CObjectList +COMMENT #295=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.70248 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 11.263 8.71165 0 -10 5.86945 1.04901 +COMMENT #295#)) (CObjectList))) (CObjectList)) +COMMENT #297=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -509 100) +COMMENT (CObjectList +COMMENT #298=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -155 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42462 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (737)" "@N (@S)" 5 12.2308 +COMMENT -10.454 0 -10 5.12016 0.924127 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -155 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.46421 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (1570)" "@N (@S)" 5 14.651 +COMMENT -13.9386 0 -10 4.42082 0.924127 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -94 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.88507 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3807)" "@N (@S)" 5 -13.9582 +COMMENT -5.22699 0 -10 4.79547 0.924127 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -155 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.4373 1.9 0.082322 +COMMENT 1) +COMMENT #309=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (726)" "@N (@S)" 5 11.3481 +COMMENT -8.71165 0 -10 3.94627 0.924127 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -455 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.75709 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (3918)" "@N (@S)" 5 -14.2866 +COMMENT -1.74233 0 -10 4.8704 0.924127 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -246 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.57911 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.9158 +COMMENT -3.48466 0 -10 4.67059 0.924127 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -734 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.70824 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 9.21684 10.454 +COMMENT 0 -10 4.19603 0.924127 #317#)) (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -780 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.509603 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (5000)" "@N (@S)" 5 -9.07592 +COMMENT 13.9386 0 -10 4.67059 0.924127 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -149 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.17752 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2686)" "@N (@S)" 5 3.77643 +COMMENT -19.1656 0 -10 4.67059 0.924127 #323#) +COMMENT #325=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.684851 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (4848)" "@N (@S)" 5 -10.4803 +COMMENT 10.454 0 -10 4.67059 0.924127 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil -94 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.7901 1.9 0.082322 +COMMENT 1) +COMMENT #329=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 8.89334 +COMMENT 17.4233 0 -10 4.34589 0.924127 #328#) +COMMENT #330=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.69595 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (1369)" "@N (@S)" 5 15.0835 +COMMENT -12.1963 0 -10 4.79547 0.924127 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1086 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.89041 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 8.11384 +COMMENT 20.908 0 -10 4.79547 0.924127 #333#) +COMMENT #335=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.76935 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 9.28341 +COMMENT 15.681 0 -10 4.79547 0.924127 #335#) +COMMENT #337=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.824357 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4727)" "@N (@S)" 5 -12.6536 +COMMENT 6.96932 0 -10 5.34495 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil -1222 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.72554 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 9.12453 +COMMENT 12.1963 0 -10 4.14608 0.924127 #340#) +COMMENT #342=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.66522 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (2263)" "@N (@S)" 5 9.31737 +COMMENT -17.4233 0 -10 4.67059 0.924127 #342#) +COMMENT #344=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.22173 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3515)" "@N (@S)" 5 -12.3051 +COMMENT -6.96932 0 -10 4.62063 0.924127 #344#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #346=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1222 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #347=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -664 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21399488 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4040..4678 + /vntifkey="33" + /label=ColE1 + terminator 3812..3916 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4737..4842) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4868..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 4954..4975 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..735 + /vntifkey="21" + /label=core\riboswitch + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 719..3805 + /vntifkey="4" + /label=lacZ* +BASE COUNT 1287 a 1439 c 1460 g 1255 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatggg gataatgcca gcgtagggaa gctattacaa gaccatcagg agcaaactat + 721 gcaagtcgac ctgctggatc cactgcatat agatcccgtc gttttacaac gtcgtgactg + 781 ggaaaaccct ggcgttaccc aacttaatcg ccttgcagca catccccctt tcgccagctg + 841 gcgtaatagc gaagaggccc gcaccgatcg cccttcccaa cagttgcgca gcctgaatgg + 901 cgaatggcgc tttgcctggt ttccggcacc agaagcggtg ccggaaagct ggctggagtg + 961 cgatcttcct gaggccgata ctgtcgtcgt cccctcaaac tggcagatgc acggttacga + 1021 tgcgcccatc tacaccaacg tgacctatcc cattacggtc aatccgccgt ttgttcccac + 1081 ggagaatccg acgggttgtt actcgctcac atttaatgtt gatgaaagct ggctacagga + 1141 aggccagacg cgaattattt ttgatggcgt taactcggcg tttcatctgt ggtgcaacgg + 1201 gcgctgggtc ggttacggcc aggacagtcg tttgccgtct gaatttgacc tgagcgcatt + 1261 tttacgcgcc ggagaaaacc gcctcgcggt gatggtgctg cgttggagtg acggcagtta + 1321 tctggaagat caggatatgt ggcggatgag cggcattttc cgtgacgtct cgttgctgca + 1381 taaaccgact acacaaatca gcgatttcca tgttgccact cgctttaatg atgatttcag + 1441 ccgcgctgta ctggaggctg aagttcagat gtgcggcgag ttgcgtgact acctacgggt + 1501 aacagtttct ttatggcagg gtgaaacgca ggtcgccagc ggcaccgcgc ctttcggcgg + 1561 tgaaattatc gatgagcgtg gtggttatgc cgatcgcgtc acactacgtc tgaacgtcga + 1621 aaacccgaaa ctgtggagcg ccgaaatccc gaatctctat cgtgcggtgg ttgaactgca + 1681 caccgccgac ggcacgctga ttgaagcaga agcctgcgat gtcggtttcc gcgaggtgcg + 1741 gattgaaaat ggtctgctgc tgctgaacgg caagccgttg ctgattcgag gcgttaaccg + 1801 tcacgagcat catcctctgc atggtcaggt catggatgag cagacgatgg tgcaggatat + 1861 cctgctgatg aagcagaaca actttaacgc cgtgcgctgt tcgcattatc cgaaccatcc + 1921 gctgtggtac acgctgtgcg accgctacgg cctgtatgtg gtggatgaag ccaatattga + 1981 aacccacggc atggtgccaa tgaatcgtct gaccgatgat ccgcgctggc taccggcgat + 2041 gagcgaacgc gtaacgcgaa tggtgcagcg cgatcgtaat cacccgagtg tgatcatctg + 2101 gtcgctgggg aatgaatcag gccacggcgc taatcacgac gcgctgtatc gctggatcaa + 2161 atctgtcgat ccttcccgcc cggtgcagta tgaaggcggc ggagccgaca ccacggccac + 2221 cgatattatt tgcccgatgt acgcgcgcgt ggatgaagac cagcccttcc cggctgtgcc + 2281 gaaatggtcc atcaaaaaat ggctttcgct acctggagag acgcgcccgc tgatcctttg + 2341 cgaatacgcc cacgcgatgg gtaacagtct tggcggtttc gctaaatact ggcaggcgtt + 2401 tcgtcagtat ccccgtttac agggcggctt cgtctgggac tgggtggatc agtcgctgat + 2461 taaatatgat gaaaacggca acccgtggtc ggcttacggc ggtgattttg gcgatacgcc + 2521 gaacgatcgc cagttctgta tgaacggtct ggtctttgcc gaccgcacgc cgcatccagc + 2581 gctgacggaa gcaaaacacc agcagcagtt tttccagttc cgtttatccg ggcaaaccat + 2641 cgaagtgacc agcgaatacc tgttccgtca tagcgataac gagctcctgc actggatggt + 2701 ggcgctggat ggtaagccgc tggcaagcgg tgaagtgcct ctggatgtcg ctccacaagg + 2761 taaacagttg attgaactgc ctgaactacc gcagccggag agcgccgggc aactctggct + 2821 cacagtacgc gtagtgcaac cgaacgcgac cgcatggtca gaagccgggc acatcagcgc + 2881 ctggcagcag tggcgtctgg cggaaaacct cagtgtgacg ctccccgccg cgtcccacgc + 2941 catcccgcat ctgaccacca gcgaaatgga tttttgcatc gagctgggta ataagcgttg + 3001 gcaatttaac cgccagtcag gctttctttc acagatgtgg attggcgata aaaaacaact + 3061 gctgacgccg ctgcgcgatc agttcacccg tgcaccgctg gataacgaca ttggcgtaag + 3121 tgaagcgacc cgcattgacc ctaacgcctg ggtcgaacgc tggaaggcgg cgggccatta + 3181 ccaggccgaa gcagcgttgt tgcagtgcac ggcagataca cttgctgatg cggtgctgat + 3241 tacgaccgct cacgcgtggc agcatcaggg gaaaacctta tttatcagcc ggaaaaccta + 3301 ccggattgat ggtagtggtc aaatggcgat taccgttgat gttgaagtgg cgagcgatac + 3361 accgcatccg gcgcggattg gcctgaactg ccagctggcg caggtagcag agcgggtaaa + 3421 ctggctcgga ttagggccgc aagaaaacta tcccgaccgc cttactgccg cctgttttga + 3481 ccgctgggat ctgccattgt cagacatgta taccccgtac gtcttcccga gcgaaaacgg + 3541 tctgcgctgc gggacgcgcg aattgaatta tggcccacac cagtggcgcg gcgacttcca + 3601 gttcaacatc agccgctaca gtcaacagca actgatggaa accagccatc gccatctgct + 3661 gcacgcggaa gaaggcacat ggctgaatat cgacggtttc catatgggga ttggtggcga + 3721 cgactcctgg agcccgtcag tatcggcgga atttcagctg agcgccggtc gctaccatta + 3781 ccagttggtc tggtgtcaaa aataatctag aggcatcaaa taaaacgaaa ggctcagtcg + 3841 aaagactggg cctttcgttt tatctgttgt ttgtcggtga acgctctcct gagtaggaca + 3901 aatccgccgc cctagaccta ggcgttcggc tgcggcgagc ggtatcagct cactcaaagg + 3961 cggtaatacg gttatccaca gaatcagggg ataacgcagg aaagaacatg tgagcaaaag + 4021 gccagcaaaa ggccaggaac cgtaaaaagg ccgcgttgct ggcgtttttc cataggctcc + 4081 gcccccctga cgagcatcac aaaaatcgac gctcaagtca gaggtggcga aacccgacag + 4141 gactataaag ataccaggcg tttccccctg gaagctccct cgtgcgctct cctgttccga + 4201 ccctgccgct taccggatac ctgtccgcct ttctcccttc gggaagcgtg gcgctttctc + 4261 aatgctcacg ctgtaggtat ctcagttcgg tgtaggtcgt tcgctccaag ctgggctgtg + 4321 tgcacgaacc ccccgttcag cccgaccgct gcgccttatc cggtaactat cgtcttgagt + 4381 ccaacccggt aagacacgac ttatcgccac tggcagcagc cactggtaac aggattagca + 4441 gagcgaggta tgtaggcggt gctacagagt tcttgaagtg gtggcctaac tacggctaca + 4501 ctagaaggac agtatttggt atctgcgctc tgctgaagcc agttaccttc ggaaaaagag + 4561 ttggtagctc ttgatccggc aaacaaacca ccgctggtag cggtggtttt tttgtttgca + 4621 agcagcagat tacgcgcaga aaaaaaggat ctcaagaaga tcctttgatc ttttctacgg + 4681 ggtctgacgc tcagtggaac gaaaactcac gttaagggat tttggtcatg actagtgctt + 4741 ggattctcac caataaaaaa cgcccggcgg caaccgagcg ttctgaacaa atccagatgg + 4801 agttctgagg tcattactgg atctatcaac aggagtccaa gcgagctcaa acttggtctg + 4861 acagttacca atgcttaatc agtgaggcac ctatctcagc gatctgtcta tttcgttcat + 4921 ccatagttgc ctgactcccc gtcgtgtaga taactacgat acgggagggc ttaccatctg + 4981 gccccagtgc tgcaatgata ccgcgagacc cacgctcacc ggctccagat ttatcagcaa + 5041 taaaccagcc agccggaagg gccgagcgca gaagtggtcc tgcaacttta tccgcctcca + 5101 tccagtctat taattgttgc cgggaagcta gagtaagtag ttcgccagtt aatagtttgc + 5161 gcaacgttgt tgccattgct acaggcatcg tggtgtcacg ctcgtcgttt ggtatggctt + 5221 cattcagctc cggttcccaa cgatcaaggc gagttacatg atcccccatg ttgtgcaaaa + 5281 aagcggttag ctccttcggt cctccgatcg ttgtcagaag taagttggcc gcagtgttat + 5341 cactcatggt tatggcagca ctgcataatt ctcttactgt catgccatcc gtaagatgct + 5401 tttctgtgac tggtgagtac tcaaccaagt cattctgaga a +// diff --git a/lib/VNTI files/pLacthiMlacZ-N30#2mutTCGA.gb b/lib/VNTI files/pLacthiMlacZ-N30#2mutTCGA.gb new file mode 100644 index 00000000..2e22891a --- /dev/null +++ b/lib/VNTI files/pLacthiMlacZ-N30#2mutTCGA.gb @@ -0,0 +1,1410 @@ +LOCUS pLacthiMla 5441 bp DNA circular 28-JUL-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|453141044| +COMMENT VNTDBDATE|453141334| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMlacZ-N30#2mutTC/GA| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMlacZ-N30#2mutTC/GA" 0 5441 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5441 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 737 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1570 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3807 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2686 0 4848 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 726 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1369 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3918 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3091 0 3206 0 +COMMENT 4321 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 2048 0 2828 0 3253 0 +COMMENT 3505 0 4007 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 869 0 1595 0 2075 0 2528 +COMMENT 0 5309 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 5000 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4727 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2263 0 3515 1 0 +COMMENT "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4040 4678 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 3812 3916 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 4737 4842 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 4868 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 4954 4975 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 735 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "lacZ*" 4 0 0 719 3805 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #46=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #47=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacthiMlacZ-N30#2mutTC/GA" 2) 5 "" 0 4) +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMlacZ-N30#2mutTC/GA'" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/28/07 04:30\214\337\214\343" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/28/07 04:35\214\337\214\343" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5441 bp" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #61=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 719 (3 #45# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 719 End: 3805" 1))) "lacZ*") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4868 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4868 End: 284 (Complementary)" +COMMENT 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 735 " 1))) +COMMENT "core riboswitch") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1))) +COMMENT "TPP aptamer") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4954 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4954 End: 4975" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #88=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4040 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4040 End: 4678" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3812 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3812 End: 3916" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4737 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4737 End: 4842 (Complementary)" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #131=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #132=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #146=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27825688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 1369 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27651288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 5 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25952272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24575432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #153=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27480080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #154=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 3918 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27504320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #157=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 737 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25951152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 2263 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 3515 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27504640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25003616 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25973552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 54399448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 5000 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 54388136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4727 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27480400 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #176=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 1570 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27480560 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27308616 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27504160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20979432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27818720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 54389016 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27480240 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2686 " 1) +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 4848 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25038208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 726 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 54399368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27504480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27819200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3807 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25001936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25861808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #202=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #203=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #204=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #205=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #206=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #207=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #208=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #209=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #210=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #211=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #212=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #213=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #214=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #215=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #216=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #217=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #218=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #219=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #220=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #221=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #222=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #223=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #224=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #225=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #226=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #227=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #228=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #229=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #230=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #231=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #232=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #233=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #234=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #235=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #236=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #237=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #238=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #239=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #240=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #241=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -179) 1 1 0 1 1 +COMMENT (mapper: 18.468 -26.6852 40.0378 40.0378 0.01 10 -1 5441 5441 1 0 0) +COMMENT #242=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #243=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil 1330 100) +COMMENT (CObjectList +COMMENT #244=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 27626868 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27534 6.27334 1 0.0214037) 0.115295) +COMMENT #245=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #205# 27456756 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMlacZ-N30#2mutTC/GA" "@N" +COMMENT 1 0 0.871165 0 -10 16.6842 1.44863 Nil) +COMMENT #246=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #204# 26959932 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5441 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.24693 0.924127 Nil)) (CObjectList)) +COMMENT #247=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #248=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #249=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.94575 0.661792 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #250=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 24765556 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.19824 15.681 0 -10 2.7474 1.04901 #249#) +COMMENT #251=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.88622 5.44537 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #252=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ*" "@N" 1 +COMMENT 8.02346 -15.681 0 -10 2.29783 1.04901 #251#)) +COMMENT (CObjectList)) +COMMENT #253=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1784 100) +COMMENT (CObjectList +COMMENT #254=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.562638 1.9 +COMMENT 0.082322 1) +COMMENT #255=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -8.83538 12.1963 0 -10 4.0212 1.04901 #254#) +COMMENT #256=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.60448 1.9 +COMMENT 0.082322 1) +COMMENT #257=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.5159 0 0 -10 1.17389 1.04901 #256#) +COMMENT #258=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.42577 +COMMENT 5.56412 1 0.082322) 0.8 1.8 0) +COMMENT #259=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 13.2111 -6.96932 0 +COMMENT -10 7.34306 1.04901 #258#) +COMMENT #260=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.47765 +COMMENT 5.56412 1 0.082322) 0.8 1.8 0) +COMMENT #261=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 13.579 -5.22699 0 -10 5.86945 1.04901 +COMMENT #260#)) (CObjectList)) +COMMENT #262=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -598 100) +COMMENT (CObjectList +COMMENT #263=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.67826 1.9 +COMMENT 0.082322 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 743178492 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 11.251 6.96932 0 -10 2.62252 1.04901 #263#)) +COMMENT (CObjectList)) +COMMENT #265=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -249 100) +COMMENT (CObjectList +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.72784 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 26922308 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 8.38918 13.9386 0 -10 2.62252 1.04901 #266#) +COMMENT #268=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.11638 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 27480124 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.81587 24.3926 0 -10 3.94627 1.04901 #268#) +COMMENT #270=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.89848 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.33344 22.6503 0 -10 4.0212 1.04901 #270#)) +COMMENT (CObjectList)) +COMMENT #272=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #273=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.83161 5.94575 1 0.082322) 0.8 1.8 1) +COMMENT #274=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 24546084 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 6.92118 19.1656 0 -10 2.7474 1.04901 #273#) +COMMENT #275=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.58026 5.70017 1 0.082322) 0.8 1.8 0) +COMMENT #276=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.7397 3.48466 0 -10 2.69745 1.04901 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1365 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.60448 1.9 0.082322 +COMMENT 1) +COMMENT #279=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.8317 -1.74233 0 -10 2.14797 1.04901 #278#)) +COMMENT (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #281=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.879699 1.61643 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 27645420 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 3.48466 0 -10 2.7474 1.04901 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #284=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #211# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.75824 1.8793) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 21401428 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.2469 -3.48466 0 -10 1.17389 1.04901 #284#) +COMMENT #286=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #211# 720906 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 0.690615 0.812828) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 25176868 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.25058 8.71165 0 -10 1.17389 1.04901 #286#)) +COMMENT (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.61831 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.5268 1.74233 0 -10 1.49858 1.04901 #289#)) +COMMENT (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -807 100) +COMMENT (CObjectList +COMMENT #292=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.64598 1.9 +COMMENT 0.082322 1) +COMMENT #293=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 11.6363 5.22699 0 -10 1.49858 1.04901 #292#)) +COMMENT (CObjectList)) +COMMENT #294=(CGroupWidget (CWidget 62 (7 62 0) 1 2 0 0 Nil 1 100) +COMMENT (CObjectList +COMMENT #295=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.70248 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 11.263 8.71165 0 -10 5.86945 1.04901 +COMMENT #295#)) (CObjectList))) (CObjectList)) +COMMENT #297=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -858993459 100) +COMMENT (CObjectList +COMMENT #298=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil 7701 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42462 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (737)" "@N (@S)" 5 12.2308 +COMMENT -10.454 0 -10 5.12016 0.924127 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil 1337 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.46421 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (1570)" "@N (@S)" 5 14.651 +COMMENT -13.9386 0 -10 4.42082 0.924127 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 1161 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.88507 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3807)" "@N (@S)" 5 -13.9582 +COMMENT -5.22699 0 -10 4.79547 0.924127 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil 27500960 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.4373 1.9 0.082322 +COMMENT 1) +COMMENT #309=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (726)" "@N (@S)" 5 11.3481 +COMMENT -8.71165 0 -10 3.94627 0.924127 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3735992 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.75709 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (3918)" "@N (@S)" 5 -14.2866 +COMMENT -1.74233 0 -10 4.8704 0.924127 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3735992 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.57911 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.9158 +COMMENT -3.48466 0 -10 4.67059 0.924127 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3735992 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.70824 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 9.21684 10.454 +COMMENT 0 -10 4.19603 0.924127 #317#)) (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3735992 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.509603 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (5000)" "@N (@S)" 5 -9.07592 +COMMENT 13.9386 0 -10 4.67059 0.924127 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil 6539 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.17752 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2686)" "@N (@S)" 5 3.77643 +COMMENT -19.1656 0 -10 4.67059 0.924127 #323#) +COMMENT #325=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.684851 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (4848)" "@N (@S)" 5 -10.4803 +COMMENT 10.454 0 -10 4.67059 0.924127 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil 3735992 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.7901 1.9 0.082322 +COMMENT 1) +COMMENT #329=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 8.89334 +COMMENT 17.4233 0 -10 4.34589 0.924127 #328#) +COMMENT #330=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.69595 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (1369)" "@N (@S)" 5 15.0835 +COMMENT -12.1963 0 -10 4.79547 0.924127 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil 3735992 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.89041 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 8.11384 +COMMENT 20.908 0 -10 4.79547 0.924127 #333#) +COMMENT #335=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.76935 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 9.28341 +COMMENT 15.681 0 -10 4.79547 0.924127 #335#) +COMMENT #337=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.824357 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4727)" "@N (@S)" 5 -12.6536 +COMMENT 6.96932 0 -10 5.34495 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil 3735992 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.72554 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 9.12453 +COMMENT 12.1963 0 -10 4.14608 0.924127 #340#) +COMMENT #342=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.66522 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (2263)" "@N (@S)" 5 9.31737 +COMMENT -17.4233 0 -10 4.67059 0.924127 #342#) +COMMENT #344=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.22173 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3515)" "@N (@S)" 5 -12.3051 +COMMENT -6.96932 0 -10 4.62063 0.924127 #344#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #346=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #347=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21131768 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4040..4678 + /vntifkey="33" + /label=ColE1 + terminator 3812..3916 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4737..4842) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4868..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 4954..4975 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..735 + /vntifkey="21" + /label=core\riboswitch + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 719..3805 + /vntifkey="4" + /label=lacZ* +BASE COUNT 1288 a 1438 c 1459 g 1256 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatgag gataatgcca gcgtagggaa gctattacaa gatcatcagg agcaaactat + 721 gcaagtcgac ctgctggatc cactgcatat agatcccgtc gttttacaac gtcgtgactg + 781 ggaaaaccct ggcgttaccc aacttaatcg ccttgcagca catccccctt tcgccagctg + 841 gcgtaatagc gaagaggccc gcaccgatcg cccttcccaa cagttgcgca gcctgaatgg + 901 cgaatggcgc tttgcctggt ttccggcacc agaagcggtg ccggaaagct ggctggagtg + 961 cgatcttcct gaggccgata ctgtcgtcgt cccctcaaac tggcagatgc acggttacga + 1021 tgcgcccatc tacaccaacg tgacctatcc cattacggtc aatccgccgt ttgttcccac + 1081 ggagaatccg acgggttgtt actcgctcac atttaatgtt gatgaaagct ggctacagga + 1141 aggccagacg cgaattattt ttgatggcgt taactcggcg tttcatctgt ggtgcaacgg + 1201 gcgctgggtc ggttacggcc aggacagtcg tttgccgtct gaatttgacc tgagcgcatt + 1261 tttacgcgcc ggagaaaacc gcctcgcggt gatggtgctg cgttggagtg acggcagtta + 1321 tctggaagat caggatatgt ggcggatgag cggcattttc cgtgacgtct cgttgctgca + 1381 taaaccgact acacaaatca gcgatttcca tgttgccact cgctttaatg atgatttcag + 1441 ccgcgctgta ctggaggctg aagttcagat gtgcggcgag ttgcgtgact acctacgggt + 1501 aacagtttct ttatggcagg gtgaaacgca ggtcgccagc ggcaccgcgc ctttcggcgg + 1561 tgaaattatc gatgagcgtg gtggttatgc cgatcgcgtc acactacgtc tgaacgtcga + 1621 aaacccgaaa ctgtggagcg ccgaaatccc gaatctctat cgtgcggtgg ttgaactgca + 1681 caccgccgac ggcacgctga ttgaagcaga agcctgcgat gtcggtttcc gcgaggtgcg + 1741 gattgaaaat ggtctgctgc tgctgaacgg caagccgttg ctgattcgag gcgttaaccg + 1801 tcacgagcat catcctctgc atggtcaggt catggatgag cagacgatgg tgcaggatat + 1861 cctgctgatg aagcagaaca actttaacgc cgtgcgctgt tcgcattatc cgaaccatcc + 1921 gctgtggtac acgctgtgcg accgctacgg cctgtatgtg gtggatgaag ccaatattga + 1981 aacccacggc atggtgccaa tgaatcgtct gaccgatgat ccgcgctggc taccggcgat + 2041 gagcgaacgc gtaacgcgaa tggtgcagcg cgatcgtaat cacccgagtg tgatcatctg + 2101 gtcgctgggg aatgaatcag gccacggcgc taatcacgac gcgctgtatc gctggatcaa + 2161 atctgtcgat ccttcccgcc cggtgcagta tgaaggcggc ggagccgaca ccacggccac + 2221 cgatattatt tgcccgatgt acgcgcgcgt ggatgaagac cagcccttcc cggctgtgcc + 2281 gaaatggtcc atcaaaaaat ggctttcgct acctggagag acgcgcccgc tgatcctttg + 2341 cgaatacgcc cacgcgatgg gtaacagtct tggcggtttc gctaaatact ggcaggcgtt + 2401 tcgtcagtat ccccgtttac agggcggctt cgtctgggac tgggtggatc agtcgctgat + 2461 taaatatgat gaaaacggca acccgtggtc ggcttacggc ggtgattttg gcgatacgcc + 2521 gaacgatcgc cagttctgta tgaacggtct ggtctttgcc gaccgcacgc cgcatccagc + 2581 gctgacggaa gcaaaacacc agcagcagtt tttccagttc cgtttatccg ggcaaaccat + 2641 cgaagtgacc agcgaatacc tgttccgtca tagcgataac gagctcctgc actggatggt + 2701 ggcgctggat ggtaagccgc tggcaagcgg tgaagtgcct ctggatgtcg ctccacaagg + 2761 taaacagttg attgaactgc ctgaactacc gcagccggag agcgccgggc aactctggct + 2821 cacagtacgc gtagtgcaac cgaacgcgac cgcatggtca gaagccgggc acatcagcgc + 2881 ctggcagcag tggcgtctgg cggaaaacct cagtgtgacg ctccccgccg cgtcccacgc + 2941 catcccgcat ctgaccacca gcgaaatgga tttttgcatc gagctgggta ataagcgttg + 3001 gcaatttaac cgccagtcag gctttctttc acagatgtgg attggcgata aaaaacaact + 3061 gctgacgccg ctgcgcgatc agttcacccg tgcaccgctg gataacgaca ttggcgtaag + 3121 tgaagcgacc cgcattgacc ctaacgcctg ggtcgaacgc tggaaggcgg cgggccatta + 3181 ccaggccgaa gcagcgttgt tgcagtgcac ggcagataca cttgctgatg cggtgctgat + 3241 tacgaccgct cacgcgtggc agcatcaggg gaaaacctta tttatcagcc ggaaaaccta + 3301 ccggattgat ggtagtggtc aaatggcgat taccgttgat gttgaagtgg cgagcgatac + 3361 accgcatccg gcgcggattg gcctgaactg ccagctggcg caggtagcag agcgggtaaa + 3421 ctggctcgga ttagggccgc aagaaaacta tcccgaccgc cttactgccg cctgttttga + 3481 ccgctgggat ctgccattgt cagacatgta taccccgtac gtcttcccga gcgaaaacgg + 3541 tctgcgctgc gggacgcgcg aattgaatta tggcccacac cagtggcgcg gcgacttcca + 3601 gttcaacatc agccgctaca gtcaacagca actgatggaa accagccatc gccatctgct + 3661 gcacgcggaa gaaggcacat ggctgaatat cgacggtttc catatgggga ttggtggcga + 3721 cgactcctgg agcccgtcag tatcggcgga atttcagctg agcgccggtc gctaccatta + 3781 ccagttggtc tggtgtcaaa aataatctag aggcatcaaa taaaacgaaa ggctcagtcg + 3841 aaagactggg cctttcgttt tatctgttgt ttgtcggtga acgctctcct gagtaggaca + 3901 aatccgccgc cctagaccta ggcgttcggc tgcggcgagc ggtatcagct cactcaaagg + 3961 cggtaatacg gttatccaca gaatcagggg ataacgcagg aaagaacatg tgagcaaaag + 4021 gccagcaaaa ggccaggaac cgtaaaaagg ccgcgttgct ggcgtttttc cataggctcc + 4081 gcccccctga cgagcatcac aaaaatcgac gctcaagtca gaggtggcga aacccgacag + 4141 gactataaag ataccaggcg tttccccctg gaagctccct cgtgcgctct cctgttccga + 4201 ccctgccgct taccggatac ctgtccgcct ttctcccttc gggaagcgtg gcgctttctc + 4261 aatgctcacg ctgtaggtat ctcagttcgg tgtaggtcgt tcgctccaag ctgggctgtg + 4321 tgcacgaacc ccccgttcag cccgaccgct gcgccttatc cggtaactat cgtcttgagt + 4381 ccaacccggt aagacacgac ttatcgccac tggcagcagc cactggtaac aggattagca + 4441 gagcgaggta tgtaggcggt gctacagagt tcttgaagtg gtggcctaac tacggctaca + 4501 ctagaaggac agtatttggt atctgcgctc tgctgaagcc agttaccttc ggaaaaagag + 4561 ttggtagctc ttgatccggc aaacaaacca ccgctggtag cggtggtttt tttgtttgca + 4621 agcagcagat tacgcgcaga aaaaaaggat ctcaagaaga tcctttgatc ttttctacgg + 4681 ggtctgacgc tcagtggaac gaaaactcac gttaagggat tttggtcatg actagtgctt + 4741 ggattctcac caataaaaaa cgcccggcgg caaccgagcg ttctgaacaa atccagatgg + 4801 agttctgagg tcattactgg atctatcaac aggagtccaa gcgagctcaa acttggtctg + 4861 acagttacca atgcttaatc agtgaggcac ctatctcagc gatctgtcta tttcgttcat + 4921 ccatagttgc ctgactcccc gtcgtgtaga taactacgat acgggagggc ttaccatctg + 4981 gccccagtgc tgcaatgata ccgcgagacc cacgctcacc ggctccagat ttatcagcaa + 5041 taaaccagcc agccggaagg gccgagcgca gaagtggtcc tgcaacttta tccgcctcca + 5101 tccagtctat taattgttgc cgggaagcta gagtaagtag ttcgccagtt aatagtttgc + 5161 gcaacgttgt tgccattgct acaggcatcg tggtgtcacg ctcgtcgttt ggtatggctt + 5221 cattcagctc cggttcccaa cgatcaaggc gagttacatg atcccccatg ttgtgcaaaa + 5281 aagcggttag ctccttcggt cctccgatcg ttgtcagaag taagttggcc gcagtgttat + 5341 cactcatggt tatggcagca ctgcataatt ctcttactgt catgccatcc gtaagatgct + 5401 tttctgtgac tggtgagtac tcaaccaagt cattctgaga a +// diff --git a/lib/VNTI files/pLacthiMlacZ-N30.gb b/lib/VNTI files/pLacthiMlacZ-N30.gb new file mode 100644 index 00000000..d452f7db --- /dev/null +++ b/lib/VNTI files/pLacthiMlacZ-N30.gb @@ -0,0 +1,1271 @@ +LOCUS pLacthiMla 5455 bp DNA circular 13-AUG-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|454612461| +COMMENT VNTDBDATE|454612461| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMlacZ-N30| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMlacZ-N30" 0 5455 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5455 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 751 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1584 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3821 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2700 0 4862 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 740 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1383 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3932 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3105 0 3220 0 +COMMENT 4335 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 2062 0 2842 0 3267 0 +COMMENT 3519 0 4021 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 883 0 1609 0 2089 0 2542 +COMMENT 0 5323 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 5014 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4741 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2277 0 3529 1 0 +COMMENT "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4054 4692 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 3826 3930 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 4751 4856 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 4882 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #33=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #34=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #35=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #36=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #37=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "lacZ*" 4 0 0 733 3819 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "core riboswitch" 21 0 0 616 755 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #41=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #42=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pLacthiMlacZ-N30" +COMMENT 2) 5 "" 0 4) +COMMENT #43=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMlacZ-N30'" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 08/13/07 05:14\214\337\214\343" 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 08/13/07 05:14\214\337\214\343" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5455 bp" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #51=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #56=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #57=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #60=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 733 (3 #39# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #61=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 733 End: 3819" 1))) "lacZ*") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4882 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #63=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4882 End: 284 (Complementary)" +COMMENT 1) +COMMENT #64=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1))) +COMMENT "TPP aptamer") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 755 " 1))) +COMMENT "core riboswitch"))) "Misc. Feature (3 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev"))) +COMMENT "Primer Binding Site (1 total)") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #84=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #88=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #93=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4054 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4054 End: 4692" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3826 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3826 End: 3930" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4751 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4751 End: 4856 (Complementary)" +COMMENT 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #112=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #113=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)"))) "Feature Map") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #118=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27005280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #119=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 1383 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #122=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26966840 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 5 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #123=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26967160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #124=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27007936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #125=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27005200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #126=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 3932 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #128=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27005840 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 751 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #131=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26967560 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #132=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 2277 " 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 3529 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #136=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27008016 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #137=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26967640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #138=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26966920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26967320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 5014 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #142=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26967480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #143=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4741 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #147=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27005760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #148=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 1584 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27008176 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #151=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #153=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27005520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27005680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26967000 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27008096 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26967240 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27005440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #159=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2700 " 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 4862 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27005360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #163=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 740 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26967400 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27006000 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27005600 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3821 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26967080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26966760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #174=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #175=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #176=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #177=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #178=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #179=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #180=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #181=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #182=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #183=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #184=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #185=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #186=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #187=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #188=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #189=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #190=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #191=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #192=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #193=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #194=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #195=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #196=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #197=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #198=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #199=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #200=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #201=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #202=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #203=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #204=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #205=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #206=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #207=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #208=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #209=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #210=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #211=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #212=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #213=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.5429 -23.1885 40.0378 40.0378 0.01 10 -1 5455 5455 1 0 0) +COMMENT #214=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #215=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #216=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 26659324 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27534 6.27334 1 0.0214037) 0.114999) +COMMENT #217=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #177# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMlacZ-N30" "@N" 1 0 +COMMENT 0.871165 0 -10 9.59094 1.44863 Nil) +COMMENT #218=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #176# 3736008 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5455 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #219=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #220=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #221=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #178# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.94659 0.660093 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #222=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 27095164 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.0996 13.9386 0 -10 2.7474 1.04901 #221#) +COMMENT #223=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #178# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.88138 5.43139 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #224=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 26769392 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ*" "@N" 1 +COMMENT 7.71638 -12.1963 0 -10 2.29783 1.04901 #223#)) +COMMENT (CObjectList)) +COMMENT #225=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList +COMMENT #226=(CScratch +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.60619 1.9 +COMMENT 0.082322 1) +COMMENT #227=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 3736136 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.0951 3.48466 0 -10 1.17389 1.04901 #226#) +COMMENT #228=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #179# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.47969 +COMMENT 5.56594 1 0.082322) 0.8 1.8 0) +COMMENT #229=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 14.4695 -1.74233 0 -10 5.86945 1.04901 +COMMENT #228#) +COMMENT #230=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #179# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.40494 +COMMENT 5.56594 1 0.082322) 0.8 1.8 0) +COMMENT #231=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 21456052 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 14.6824 -3.48466 0 +COMMENT -10 7.34306 1.04901 #230#)) (CObjectList)) +COMMENT #232=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList +COMMENT #233=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.89944 1.9 +COMMENT 0.082322 1) +COMMENT #234=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 3736096 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.29937 20.908 0 -10 4.0212 1.04901 #233#)) +COMMENT (CObjectList)) +COMMENT #235=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #236=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.83274 5.94659 1 0.082322) 0.8 1.8 1) +COMMENT #237=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 26275088 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 6.85841 17.4233 0 -10 2.7474 1.04901 #236#) +COMMENT #238=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.58204 5.70164 1 0.082322) 0.8 1.8 0) +COMMENT #239=(CLabel (CWidget 0 (0 0) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 11.2684 6.96932 0 -10 2.69745 1.04901 #238#)) +COMMENT (CObjectList)) +COMMENT #240=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #241=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #181# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.60619 1.9 0.082322 +COMMENT 1) +COMMENT #242=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 26751892 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.8317 1.74233 0 -10 2.14797 1.04901 #241#)) +COMMENT (CObjectList)) +COMMENT #243=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #244=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #178# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.877441 1.61228 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #245=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 3736160 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 3.48466 0 -10 2.7474 1.04901 #244#)) +COMMENT (CObjectList)) +COMMENT #246=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #247=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #183# 100 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 1.75373 +COMMENT 1.87448) +COMMENT #248=(CLabel (CWidget 0 (0 0) 1 2 0 0 #175# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.2605 -3.48466 0 -10 1.17389 1.04901 #247#) +COMMENT #249=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 0.688843 +COMMENT 0.810742) +COMMENT #250=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 26661944 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.25058 8.71165 0 -10 1.17389 1.04901 #249#)) +COMMENT (CObjectList)) +COMMENT #251=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #252=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.61999 1.9 +COMMENT 0.082322 1) +COMMENT #253=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 3736112 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 11.6363 5.22699 0 -10 1.49858 1.04901 #252#)) +COMMENT (CObjectList)) +COMMENT #254=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #255=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.64759 1.9 +COMMENT 0.082322 1) +COMMENT #256=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #175# 3736152 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 9.36384 8.71165 0 -10 1.49858 1.04901 #255#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #257=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #258=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #259=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.41069 1.9 +COMMENT 0.082322 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (751)" "@N (@S)" 5 12.5839 +COMMENT -6.96932 0 -10 5.07021 0.924127 #259#)) +COMMENT (CObjectList)) +COMMENT #261=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #262=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.45275 1.9 +COMMENT 0.082322 1) +COMMENT #263=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 26901336 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (1584)" "@N (@S)" 5 14.3922 +COMMENT -10.454 0 -10 4.42082 0.924127 #262#)) +COMMENT (CObjectList)) +COMMENT #264=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #265=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.88023 1.9 +COMMENT 0.082322 1) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 3735968 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3821)" "@N (@S)" 5 -13.9324 +COMMENT -5.22699 0 -10 4.74552 0.924127 #265#)) +COMMENT (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #268=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42334 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 24765828 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (740)" "@N (@S)" 5 12.8995 +COMMENT -5.22699 0 -10 3.94627 0.924127 #268#)) +COMMENT (CObjectList)) +COMMENT #270=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -600 100) +COMMENT (CObjectList +COMMENT #271=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.75258 1.9 +COMMENT 0.082322 1) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (3932)" "@N (@S)" 5 -14.304 +COMMENT -1.74233 0 -10 4.94533 0.924127 #271#)) +COMMENT (CObjectList)) +COMMENT #273=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -670 100) +COMMENT (CObjectList +COMMENT #274=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.58089 1.9 +COMMENT 0.082322 1) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 20931464 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.3366 0 0 +COMMENT -10 4.67059 0.924127 #274#)) (CObjectList)) +COMMENT #276=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -809 100) +COMMENT (CObjectList +COMMENT #277=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.70969 1.9 +COMMENT 0.082322 1) +COMMENT #278=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 26629172 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 9.20226 10.454 +COMMENT 0 -10 4.19603 0.924127 #277#)) (CObjectList)) +COMMENT #279=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -600 100) +COMMENT (CObjectList +COMMENT #280=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.508295 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 26990944 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (5014)" "@N (@S)" 5 -8.85071 +COMMENT 12.1963 0 -10 4.62063 0.924127 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #283=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.16937 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 24714848 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2700)" "@N (@S)" 5 3.55541 +COMMENT -15.681 0 -10 4.67059 0.924127 #283#) +COMMENT #285=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.683093 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 24967812 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (4862)" "@N (@S)" 5 -10.4378 +COMMENT 10.454 0 -10 4.67059 0.924127 #285#)) +COMMENT (CObjectList)) +COMMENT #287=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #288=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.79134 1.9 +COMMENT 0.082322 1) +COMMENT #289=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 24644560 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 8.80871 +COMMENT 15.681 0 -10 4.34589 0.924127 #288#) +COMMENT #290=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.6839 1.9 0.082322 +COMMENT 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26666504 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (1383)" "@N (@S)" 5 14.8248 +COMMENT -8.71165 0 -10 4.79547 0.924127 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1088 100) +COMMENT (CObjectList +COMMENT #293=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.89139 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26669116 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 8.06726 +COMMENT 19.1656 0 -10 4.79547 0.924127 #293#) +COMMENT #295=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.77064 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 21353972 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 9.17635 +COMMENT 13.9386 0 -10 4.79547 0.924127 #295#) +COMMENT #297=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #182# 25182936 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.822242 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26420180 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4741)" "@N (@S)" 5 -12.6362 +COMMENT 6.96932 0 -10 5.27002 0.924127 #297#)) +COMMENT (CObjectList)) +COMMENT #299=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil -809 100) +COMMENT (CObjectList +COMMENT #300=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.72694 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 9.11024 +COMMENT 12.1963 0 -10 4.14608 0.924127 #300#) +COMMENT #302=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.65581 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 26996568 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (2277)" "@N (@S)" 5 9.00216 +COMMENT -13.9386 0 -10 4.67059 0.924127 #302#) +COMMENT #304=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #182# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.21603 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #174# 3736008 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3529)" "@N (@S)" 5 -12.3574 +COMMENT -6.96932 0 -10 4.67059 0.924127 #304#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #306=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #307=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -740 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21223208 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4054..4692 + /vntifkey="33" + /label=ColE1 + terminator 3826..3930 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4751..4856) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4882..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..755 + /vntifkey="21" + /label=core\riboswitch + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 733..3819 + /vntifkey="4" + /label=lacZ* +BASE COUNT 1281 a 1436 c 1456 g 1252 t 30 others +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa nnnnnnnnnn nnnnnnnnnn nnnnnnnnnn + 721 caggagcaaa ctatgcaagt cgacctgctg gatccactgc atatagatcc cgtcgtttta + 781 caacgtcgtg actgggaaaa ccctggcgtt acccaactta atcgccttgc agcacatccc + 841 cctttcgcca gctggcgtaa tagcgaagag gcccgcaccg atcgcccttc ccaacagttg + 901 cgcagcctga atggcgaatg gcgctttgcc tggtttccgg caccagaagc ggtgccggaa + 961 agctggctgg agtgcgatct tcctgaggcc gatactgtcg tcgtcccctc aaactggcag + 1021 atgcacggtt acgatgcgcc catctacacc aacgtgacct atcccattac ggtcaatccg + 1081 ccgtttgttc ccacggagaa tccgacgggt tgttactcgc tcacatttaa tgttgatgaa + 1141 agctggctac aggaaggcca gacgcgaatt atttttgatg gcgttaactc ggcgtttcat + 1201 ctgtggtgca acgggcgctg ggtcggttac ggccaggaca gtcgtttgcc gtctgaattt + 1261 gacctgagcg catttttacg cgccggagaa aaccgcctcg cggtgatggt gctgcgttgg + 1321 agtgacggca gttatctgga agatcaggat atgtggcgga tgagcggcat tttccgtgac + 1381 gtctcgttgc tgcataaacc gactacacaa atcagcgatt tccatgttgc cactcgcttt + 1441 aatgatgatt tcagccgcgc tgtactggag gctgaagttc agatgtgcgg cgagttgcgt + 1501 gactacctac gggtaacagt ttctttatgg cagggtgaaa cgcaggtcgc cagcggcacc + 1561 gcgcctttcg gcggtgaaat tatcgatgag cgtggtggtt atgccgatcg cgtcacacta + 1621 cgtctgaacg tcgaaaaccc gaaactgtgg agcgccgaaa tcccgaatct ctatcgtgcg + 1681 gtggttgaac tgcacaccgc cgacggcacg ctgattgaag cagaagcctg cgatgtcggt + 1741 ttccgcgagg tgcggattga aaatggtctg ctgctgctga acggcaagcc gttgctgatt + 1801 cgaggcgtta accgtcacga gcatcatcct ctgcatggtc aggtcatgga tgagcagacg + 1861 atggtgcagg atatcctgct gatgaagcag aacaacttta acgccgtgcg ctgttcgcat + 1921 tatccgaacc atccgctgtg gtacacgctg tgcgaccgct acggcctgta tgtggtggat + 1981 gaagccaata ttgaaaccca cggcatggtg ccaatgaatc gtctgaccga tgatccgcgc + 2041 tggctaccgg cgatgagcga acgcgtaacg cgaatggtgc agcgcgatcg taatcacccg + 2101 agtgtgatca tctggtcgct ggggaatgaa tcaggccacg gcgctaatca cgacgcgctg + 2161 tatcgctgga tcaaatctgt cgatccttcc cgcccggtgc agtatgaagg cggcggagcc + 2221 gacaccacgg ccaccgatat tatttgcccg atgtacgcgc gcgtggatga agaccagccc + 2281 ttcccggctg tgccgaaatg gtccatcaaa aaatggcttt cgctacctgg agagacgcgc + 2341 ccgctgatcc tttgcgaata cgcccacgcg atgggtaaca gtcttggcgg tttcgctaaa + 2401 tactggcagg cgtttcgtca gtatccccgt ttacagggcg gcttcgtctg ggactgggtg + 2461 gatcagtcgc tgattaaata tgatgaaaac ggcaacccgt ggtcggctta cggcggtgat + 2521 tttggcgata cgccgaacga tcgccagttc tgtatgaacg gtctggtctt tgccgaccgc + 2581 acgccgcatc cagcgctgac ggaagcaaaa caccagcagc agtttttcca gttccgttta + 2641 tccgggcaaa ccatcgaagt gaccagcgaa tacctgttcc gtcatagcga taacgagctc + 2701 ctgcactgga tggtggcgct ggatggtaag ccgctggcaa gcggtgaagt gcctctggat + 2761 gtcgctccac aaggtaaaca gttgattgaa ctgcctgaac taccgcagcc ggagagcgcc + 2821 gggcaactct ggctcacagt acgcgtagtg caaccgaacg cgaccgcatg gtcagaagcc + 2881 gggcacatca gcgcctggca gcagtggcgt ctggcggaaa acctcagtgt gacgctcccc + 2941 gccgcgtccc acgccatccc gcatctgacc accagcgaaa tggatttttg catcgagctg + 3001 ggtaataagc gttggcaatt taaccgccag tcaggctttc tttcacagat gtggattggc + 3061 gataaaaaac aactgctgac gccgctgcgc gatcagttca cccgtgcacc gctggataac + 3121 gacattggcg taagtgaagc gacccgcatt gaccctaacg cctgggtcga acgctggaag + 3181 gcggcgggcc attaccaggc cgaagcagcg ttgttgcagt gcacggcaga tacacttgct + 3241 gatgcggtgc tgattacgac cgctcacgcg tggcagcatc aggggaaaac cttatttatc + 3301 agccggaaaa cctaccggat tgatggtagt ggtcaaatgg cgattaccgt tgatgttgaa + 3361 gtggcgagcg atacaccgca tccggcgcgg attggcctga actgccagct ggcgcaggta + 3421 gcagagcggg taaactggct cggattaggg ccgcaagaaa actatcccga ccgccttact + 3481 gccgcctgtt ttgaccgctg ggatctgcca ttgtcagaca tgtatacccc gtacgtcttc + 3541 ccgagcgaaa acggtctgcg ctgcgggacg cgcgaattga attatggccc acaccagtgg + 3601 cgcggcgact tccagttcaa catcagccgc tacagtcaac agcaactgat ggaaaccagc + 3661 catcgccatc tgctgcacgc ggaagaaggc acatggctga atatcgacgg tttccatatg + 3721 gggattggtg gcgacgactc ctggagcccg tcagtatcgg cggaatttca gctgagcgcc + 3781 ggtcgctacc attaccagtt ggtctggtgt caaaaataat ctagaggcat caaataaaac + 3841 gaaaggctca gtcgaaagac tgggcctttc gttttatctg ttgtttgtcg gtgaacgctc + 3901 tcctgagtag gacaaatccg ccgccctaga cctaggcgtt cggctgcggc gagcggtatc + 3961 agctcactca aaggcggtaa tacggttatc cacagaatca ggggataacg caggaaagaa + 4021 catgtgagca aaaggccagc aaaaggccag gaaccgtaaa aaggccgcgt tgctggcgtt + 4081 tttccatagg ctccgccccc ctgacgagca tcacaaaaat cgacgctcaa gtcagaggtg + 4141 gcgaaacccg acaggactat aaagatacca ggcgtttccc cctggaagct ccctcgtgcg + 4201 ctctcctgtt ccgaccctgc cgcttaccgg atacctgtcc gcctttctcc cttcgggaag + 4261 cgtggcgctt tctcaatgct cacgctgtag gtatctcagt tcggtgtagg tcgttcgctc + 4321 caagctgggc tgtgtgcacg aaccccccgt tcagcccgac cgctgcgcct tatccggtaa + 4381 ctatcgtctt gagtccaacc cggtaagaca cgacttatcg ccactggcag cagccactgg + 4441 taacaggatt agcagagcga ggtatgtagg cggtgctaca gagttcttga agtggtggcc + 4501 taactacggc tacactagaa ggacagtatt tggtatctgc gctctgctga agccagttac + 4561 cttcggaaaa agagttggta gctcttgatc cggcaaacaa accaccgctg gtagcggtgg + 4621 tttttttgtt tgcaagcagc agattacgcg cagaaaaaaa ggatctcaag aagatccttt + 4681 gatcttttct acggggtctg acgctcagtg gaacgaaaac tcacgttaag ggattttggt + 4741 catgactagt gcttggattc tcaccaataa aaaacgcccg gcggcaaccg agcgttctga + 4801 acaaatccag atggagttct gaggtcatta ctggatctat caacaggagt ccaagcgagc + 4861 tcaaacttgg tctgacagtt accaatgctt aatcagtgag gcacctatct cagcgatctg + 4921 tctatttcgt tcatccatag ttgcctgact ccccgtcgtg tagataacta cgatacggga + 4981 gggcttacca tctggcccca gtgctgcaat gataccgcga gacccacgct caccggctcc + 5041 agatttatca gcaataaacc agccagccgg aagggccgag cgcagaagtg gtcctgcaac + 5101 tttatccgcc tccatccagt ctattaattg ttgccgggaa gctagagtaa gtagttcgcc + 5161 agttaatagt ttgcgcaacg ttgttgccat tgctacaggc atcgtggtgt cacgctcgtc + 5221 gtttggtatg gcttcattca gctccggttc ccaacgatca aggcgagtta catgatcccc + 5281 catgttgtgc aaaaaagcgg ttagctcctt cggtcctccg atcgttgtca gaagtaagtt + 5341 ggccgcagtg ttatcactca tggttatggc agcactgcat aattctctta ctgtcatgcc + 5401 atccgtaaga tgcttttctg tgactggtga gtactcaacc aagtcattct gagaa +// diff --git a/lib/VNTI files/pLacthiMlacZ.gb b/lib/VNTI files/pLacthiMlacZ.gb new file mode 100644 index 00000000..0913e2ff --- /dev/null +++ b/lib/VNTI files/pLacthiMlacZ.gb @@ -0,0 +1,1533 @@ +LOCUS pLacthiMla 5463 bp DNA circular 29-MAY-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|442069741| +COMMENT VNTDBDATE|447698804| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMlacZ*| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMlacZ*" 0 5463 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5463 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 759 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1592 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3829 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2708 0 4870 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 748 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1391 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3940 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3113 0 3228 0 +COMMENT 4343 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 2070 0 2850 0 3275 0 +COMMENT 3527 0 4029 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 891 0 1617 0 2097 0 2550 +COMMENT 0 5331 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 5022 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4749 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2285 0 3537 1 0 +COMMENT "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4062 4700 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 3834 3938 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 4759 4864 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 4890 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 4976 4997 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "lacZ" 4 0 0 741 3827 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "silent mutation C->T" 62 0 0 3776 3776 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "core riboswitch" 21 0 0 616 763 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "orig T" 62 0 0 762 762 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "orig G" 21 0 0 760 760 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "mut?" 21 0 0 1064 1064 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #48=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #49=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 693 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #50=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #51=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pLacthiMlacZ*" 2) +COMMENT 5 "" 0 4) +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMlacZ*'" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 03/28/07 01:09\214\337\214\343" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 05/29/07 04:46\214\337\214\343" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5463 bp" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #65=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 741 (3 #41# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 741 End: 3827" 1))) "lacZ") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4890 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4890 End: 284 (Complementary)" +COMMENT 1) +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #75=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 763 " 1))) +COMMENT "core riboswitch") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 693 " 1))) +COMMENT "TPP aptamer") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 760 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 760 End: 760 " 1))) "orig G") +COMMENT #84=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1064 (3 #47# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1064 End: 1064" 1))) "mut?") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4976 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4976 End: 4997" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (6 total)") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #118=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #119=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4062 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4062 End: 4700" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #128=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3834 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3834 End: 3938" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4759 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4759 End: 4864 (Complementary)" +COMMENT 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #142=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #143=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #147=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #148=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion") +COMMENT #153=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 762 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 762 End: 762 " 1))) +COMMENT "orig T") +COMMENT #155=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3776 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3776 End: 3776" 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "remove EcoRI" 1))) +COMMENT "silent mutation C->T"))) +COMMENT "Mutation (3 total)"))) "Feature Map") +COMMENT #158=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 1391 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25220512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 5 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25208976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974688 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 3940 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 759 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25212104 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #173=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 2285 " 1) +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 3537 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25212184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25220592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #180=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25211864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #181=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #182=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 5022 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25212024 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #184=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4749 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #189=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 1592 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #192=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #193=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974128 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25220832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25209056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #200=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2708 " 1) +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 4870 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 748 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25211944 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24974208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3829 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25220912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #212=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25220112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #215=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #216=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #217=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #218=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #219=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #220=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #221=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #222=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #223=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #224=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #225=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #226=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #227=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #228=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #229=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #230=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #231=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #232=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #233=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #234=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #235=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #236=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #237=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #238=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #239=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #240=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #241=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #242=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #243=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #244=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #245=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #246=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #247=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #248=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #249=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #250=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #251=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #252=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #253=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #254=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 21.8398 -28.4086 40.0378 40.0378 0.01 10 -1 5463 5463 1 0 0) +COMMENT #255=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -989 100) +COMMENT (CObjectList +COMMENT #256=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1131 100) +COMMENT (CObjectList +COMMENT #257=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 24705972 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27533 6.27333 1 0.0214037) 0.11483) +COMMENT #258=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMlacZ*" "@N" 1 0 0.871165 +COMMENT 0 -10 7.71771 1.44863 Nil) +COMMENT #259=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #217# 26575660 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5463 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #260=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1323 100) +COMMENT (CObjectList +COMMENT #261=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #262=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.94707 0.659127 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #263=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 268634488 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.199 15.681 0 -10 2.72243 1.04901 #262#) +COMMENT #264=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.87863 5.42344 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #265=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27916528 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ" "@N" 1 +COMMENT 7.82765 -19.1656 0 -10 1.94816 1.04901 #264#)) +COMMENT (CObjectList)) +COMMENT #266=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1190 100) +COMMENT (CObjectList +COMMENT #267=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.560372 1.9 +COMMENT 0.082322 1) +COMMENT #268=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 24636596 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -8.79499 12.1963 0 -10 3.97125 1.04901 +COMMENT #267#) +COMMENT #269=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.60717 1.9 +COMMENT 0.082322 1) +COMMENT #270=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4048 1.74233 0 -10 1.14891 1.04901 #269#) +COMMENT #271=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 5.39703 +COMMENT 5.56698 1 0.082322) 0.8 1.8 0) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 26578460 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 14.0843 -5.22699 0 +COMMENT -10 7.26813 1.04901 #271#) +COMMENT #273=(CScratch +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #224# 25210520 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.40162 1.9 +COMMENT 0.082322 1) +COMMENT #274=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 24674728 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 11.1539 -10.454 0 -10 2.92224 1.04901 #273#) +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.05254 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 24791796 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mut?" "@N" 1 +COMMENT 13.2602 -13.9386 0 -10 2.39773 1.04901 #275#) +COMMENT #277=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #220# 24711392 +COMMENT 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.47741 +COMMENT 5.56698 1 0.082322) 0.8 1.8 0) +COMMENT #278=(CLabel (CWidget 0 (0 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 14.151 -3.48466 0 -10 5.8195 1.04901 +COMMENT #277#)) (CObjectList)) +COMMENT #279=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1714 100) +COMMENT (CObjectList +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #224# 20945616 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.68066 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 26576636 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 9.8604 8.71165 0 -10 2.59755 1.04901 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -530 100) +COMMENT (CObjectList +COMMENT #283=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #237# 20921912 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.73004 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27130516 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 8.45168 15.681 0 -10 2.59755 1.04901 #283#) +COMMENT #285=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.11702 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 24636140 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.80839 26.1349 0 -10 3.92129 1.04901 #285#) +COMMENT #287=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #237# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.89999 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 26726172 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.31387 24.3926 0 -10 3.97125 1.04901 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #290=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #232# 2228229 +COMMENT 100) (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) +COMMENT 0.835356 5.83338 5.94707 1 0.082322) 0.8 1.8 +COMMENT 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 26716180 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 6.93106 20.908 0 -10 2.72243 1.04901 #290#) +COMMENT #292=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.58305 5.70248 1 0.082322) 0.8 1.8 0) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 26578004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 12.159 5.22699 0 -10 2.67247 1.04901 #292#)) +COMMENT (CObjectList)) +COMMENT #294=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1156 100) +COMMENT (CObjectList +COMMENT #295=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.60717 1.9 0.082322 +COMMENT 1) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.9253 0 0 -10 2.14797 1.04901 #295#)) +COMMENT (CObjectList)) +COMMENT #297=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1267 100) +COMMENT (CObjectList +COMMENT #298=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.876156 1.60992 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #299=(CLabel (CWidget 0 (0 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7746 3.48466 0 -10 2.72243 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -267 100) +COMMENT (CObjectList +COMMENT #301=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #224# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.75116 1.87174) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 21380148 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.4048 -1.74233 0 -10 1.14891 1.04901 #301#) +COMMENT #303=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #224# 3735968 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 0.687834 0.809554) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 393238 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.24187 8.71165 0 -10 1.14891 1.04901 #303#)) +COMMENT (CObjectList)) +COMMENT #305=(CGroupWidget (CWidget 47 (7 47 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #306=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.62095 1.9 +COMMENT 0.082322 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.1996 3.48466 0 -10 1.47361 1.04901 #306#)) +COMMENT (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 24637412 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #224# 25182936 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.64851 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 26579828 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 10.7283 6.96932 0 -10 1.47361 1.04901 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #312=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.70477 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 9.71336 10.454 0 -10 5.8195 1.04901 +COMMENT #312#) +COMMENT #314=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.93834 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 26577548 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "silent mutation C->T" "@N" 1 -15.4524 +COMMENT -5.22699 0 -10 9.24127 1.04901 #314#) +COMMENT #316=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.39933 1.9 +COMMENT 0.082322 1) +COMMENT #317=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 3736120 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 11.2364 -12.1963 0 -10 2.72243 1.04901 #316#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #318=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1489 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.40277 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 26465496 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (759)" "@N (@S)" 5 12.2528 +COMMENT -8.71165 0 -10 5.09519 0.924127 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil 196617 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.44623 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 3736152 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (1592)" "@N (@S)" 5 14.7439 +COMMENT -17.4233 0 -10 4.37087 0.924127 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.87748 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 24708132 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3829)" "@N (@S)" 5 -13.8984 +COMMENT -3.48466 0 -10 4.77049 0.924127 #326#)) +COMMENT (CObjectList)) +COMMENT #328=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #329=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.4154 1.9 0.082322 +COMMENT 1) +COMMENT #330=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (748)" "@N (@S)" 5 11.9915 +COMMENT -6.96932 0 -10 3.92129 0.924127 #329#)) +COMMENT (CObjectList)) +COMMENT #331=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #332=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.75002 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel (CWidget 0 (0 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (3940)" "@N (@S)" 5 -14.4063 0 0 +COMMENT -10 4.92035 0.924127 #332#)) (CObjectList)) +COMMENT #334=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 24914392 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.58191 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 25067560 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.2169 +COMMENT -1.74233 0 -10 4.64561 0.924127 #335#)) +COMMENT (CObjectList)) +COMMENT #337=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #338=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.71052 1.9 +COMMENT 0.082322 1) +COMMENT #339=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 24941816 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 9.31127 +COMMENT 12.1963 0 -10 4.17106 0.924127 #338#)) +COMMENT (CObjectList)) +COMMENT #340=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #341=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.50755 1.9 +COMMENT 0.082322 1) +COMMENT #342=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #225# 25102060 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (5022)" "@N (@S)" 5 -8.98476 +COMMENT 13.9386 0 -10 4.64561 0.924127 #341#)) +COMMENT (CObjectList)) +COMMENT #343=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #344=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.16473 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 3736192 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2708)" "@N (@S)" 5 3.67365 +COMMENT -22.6503 0 -10 4.64561 0.924127 #344#) +COMMENT #346=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.682093 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 24846500 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (4870)" "@N (@S)" 5 -10.4198 +COMMENT 10.454 0 -10 4.64561 0.924127 #346#)) +COMMENT (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil -823 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.79205 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 3736192 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 8.91596 +COMMENT 19.1656 0 -10 4.29594 0.924127 #349#) +COMMENT #351=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.67704 1.9 +COMMENT 0.082322 1) +COMMENT #352=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 25059924 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (1391)" "@N (@S)" 5 15.2259 +COMMENT -15.681 0 -10 4.69556 0.924127 #351#)) +COMMENT (CObjectList)) +COMMENT #353=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #354=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.89195 1.9 +COMMENT 0.082322 1) +COMMENT #355=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 26577092 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 8.09404 +COMMENT 22.6503 0 -10 4.77049 0.924127 #354#) +COMMENT #356=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.77138 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 26374204 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 9.30765 +COMMENT 17.4233 0 -10 4.77049 0.924127 #356#) +COMMENT #358=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.821037 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 26615364 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4749)" "@N (@S)" 5 -12.6536 +COMMENT 6.96932 0 -10 5.295 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.72774 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 24771644 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 9.20039 +COMMENT 13.9386 0 -10 4.12111 0.924127 #361#) +COMMENT #363=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.65046 1.9 +COMMENT 0.082322 1) +COMMENT #364=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 3736288 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (2285)" "@N (@S)" 5 9.25122 +COMMENT -20.908 0 -10 4.64561 0.924127 #363#) +COMMENT #365=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.21278 1.9 +COMMENT 0.082322 1) +COMMENT #366=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #215# 24574556 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3537)" "@N (@S)" 5 -12.3138 +COMMENT -6.96932 0 -10 4.64561 0.924127 #365#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #367=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #368=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 0 0 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4062..4700 + /vntifkey="33" + /label=ColE1 + terminator 3834..3938 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4759..4864) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4890..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 4976..4997 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + CDS 741..3827 + /vntifkey="4" + /label=lacZ + misc_feature 581..581 + /vntifkey="21" + /label=+1 + mutation 3776..3776 + /vntifkey="62" + /label=silent\mutation\C->T + /note="remove EcoRI" + misc_feature 616..763 + /vntifkey="21" + /label=core\riboswitch + mutation 762..762 + /vntifkey="62" + /label=orig\T + misc_feature 760..760 + /vntifkey="21" + /label=orig\G + misc_feature 1064..1064 + /vntifkey="21" + /label=mut? + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..693 + /vntifkey="21" + /label=TPP\aptamer +BASE COUNT 1288 a 1447 c 1465 g 1263 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gtcacggacc accaggtcat tgcttcttca + 721 cgttatggca ggagcaaact atgcaagtcg acctgctgga tccactgcat atagatcccg + 781 tcgttttaca acgtcgtgac tgggaaaacc ctggcgttac ccaacttaat cgccttgcag + 841 cacatccccc tttcgccagc tggcgtaata gcgaagaggc ccgcaccgat cgcccttccc + 901 aacagttgcg cagcctgaat ggcgaatggc gctttgcctg gtttccggca ccagaagcgg + 961 tgccggaaag ctggctggag tgcgatcttc ctgaggccga tactgtcgtc gtcccctcaa + 1021 actggcagat gcacggttac gatgcgccca tctacaccaa cgtgacctat cccattacgg + 1081 tcaatccgcc gtttgttccc acggagaatc cgacgggttg ttactcgctc acatttaatg + 1141 ttgatgaaag ctggctacag gaaggccaga cgcgaattat ttttgatggc gttaactcgg + 1201 cgtttcatct gtggtgcaac gggcgctggg tcggttacgg ccaggacagt cgtttgccgt + 1261 ctgaatttga cctgagcgca tttttacgcg ccggagaaaa ccgcctcgcg gtgatggtgc + 1321 tgcgttggag tgacggcagt tatctggaag atcaggatat gtggcggatg agcggcattt + 1381 tccgtgacgt ctcgttgctg cataaaccga ctacacaaat cagcgatttc catgttgcca + 1441 ctcgctttaa tgatgatttc agccgcgctg tactggaggc tgaagttcag atgtgcggcg + 1501 agttgcgtga ctacctacgg gtaacagttt ctttatggca gggtgaaacg caggtcgcca + 1561 gcggcaccgc gcctttcggc ggtgaaatta tcgatgagcg tggtggttat gccgatcgcg + 1621 tcacactacg tctgaacgtc gaaaacccga aactgtggag cgccgaaatc ccgaatctct + 1681 atcgtgcggt ggttgaactg cacaccgccg acggcacgct gattgaagca gaagcctgcg + 1741 atgtcggttt ccgcgaggtg cggattgaaa atggtctgct gctgctgaac ggcaagccgt + 1801 tgctgattcg aggcgttaac cgtcacgagc atcatcctct gcatggtcag gtcatggatg + 1861 agcagacgat ggtgcaggat atcctgctga tgaagcagaa caactttaac gccgtgcgct + 1921 gttcgcatta tccgaaccat ccgctgtggt acacgctgtg cgaccgctac ggcctgtatg + 1981 tggtggatga agccaatatt gaaacccacg gcatggtgcc aatgaatcgt ctgaccgatg + 2041 atccgcgctg gctaccggcg atgagcgaac gcgtaacgcg aatggtgcag cgcgatcgta + 2101 atcacccgag tgtgatcatc tggtcgctgg ggaatgaatc aggccacggc gctaatcacg + 2161 acgcgctgta tcgctggatc aaatctgtcg atccttcccg cccggtgcag tatgaaggcg + 2221 gcggagccga caccacggcc accgatatta tttgcccgat gtacgcgcgc gtggatgaag + 2281 accagccctt cccggctgtg ccgaaatggt ccatcaaaaa atggctttcg ctacctggag + 2341 agacgcgccc gctgatcctt tgcgaatacg cccacgcgat gggtaacagt cttggcggtt + 2401 tcgctaaata ctggcaggcg tttcgtcagt atccccgttt acagggcggc ttcgtctggg + 2461 actgggtgga tcagtcgctg attaaatatg atgaaaacgg caacccgtgg tcggcttacg + 2521 gcggtgattt tggcgatacg ccgaacgatc gccagttctg tatgaacggt ctggtctttg + 2581 ccgaccgcac gccgcatcca gcgctgacgg aagcaaaaca ccagcagcag tttttccagt + 2641 tccgtttatc cgggcaaacc atcgaagtga ccagcgaata cctgttccgt catagcgata + 2701 acgagctcct gcactggatg gtggcgctgg atggtaagcc gctggcaagc ggtgaagtgc + 2761 ctctggatgt cgctccacaa ggtaaacagt tgattgaact gcctgaacta ccgcagccgg + 2821 agagcgccgg gcaactctgg ctcacagtac gcgtagtgca accgaacgcg accgcatggt + 2881 cagaagccgg gcacatcagc gcctggcagc agtggcgtct ggcggaaaac ctcagtgtga + 2941 cgctccccgc cgcgtcccac gccatcccgc atctgaccac cagcgaaatg gatttttgca + 3001 tcgagctggg taataagcgt tggcaattta accgccagtc aggctttctt tcacagatgt + 3061 ggattggcga taaaaaacaa ctgctgacgc cgctgcgcga tcagttcacc cgtgcaccgc + 3121 tggataacga cattggcgta agtgaagcga cccgcattga ccctaacgcc tgggtcgaac + 3181 gctggaaggc ggcgggccat taccaggccg aagcagcgtt gttgcagtgc acggcagata + 3241 cacttgctga tgcggtgctg attacgaccg ctcacgcgtg gcagcatcag gggaaaacct + 3301 tatttatcag ccggaaaacc taccggattg atggtagtgg tcaaatggcg attaccgttg + 3361 atgttgaagt ggcgagcgat acaccgcatc cggcgcggat tggcctgaac tgccagctgg + 3421 cgcaggtagc agagcgggta aactggctcg gattagggcc gcaagaaaac tatcccgacc + 3481 gccttactgc cgcctgtttt gaccgctggg atctgccatt gtcagacatg tataccccgt + 3541 acgtcttccc gagcgaaaac ggtctgcgct gcgggacgcg cgaattgaat tatggcccac + 3601 accagtggcg cggcgacttc cagttcaaca tcagccgcta cagtcaacag caactgatgg + 3661 aaaccagcca tcgccatctg ctgcacgcgg aagaaggcac atggctgaat atcgacggtt + 3721 tccatatggg gattggtggc gacgactcct ggagcccgtc agtatcggcg gaatttcagc + 3781 tgagcgccgg tcgctaccat taccagttgg tctggtgtca aaaataatct agaggcatca + 3841 aataaaacga aaggctcagt cgaaagactg ggcctttcgt tttatctgtt gtttgtcggt + 3901 gaacgctctc ctgagtagga caaatccgcc gccctagacc taggcgttcg gctgcggcga + 3961 gcggtatcag ctcactcaaa ggcggtaata cggttatcca cagaatcagg ggataacgca + 4021 ggaaagaaca tgtgagcaaa aggccagcaa aaggccagga accgtaaaaa ggccgcgttg + 4081 ctggcgtttt tccataggct ccgcccccct gacgagcatc acaaaaatcg acgctcaagt + 4141 cagaggtggc gaaacccgac aggactataa agataccagg cgtttccccc tggaagctcc + 4201 ctcgtgcgct ctcctgttcc gaccctgccg cttaccggat acctgtccgc ctttctccct + 4261 tcgggaagcg tggcgctttc tcaatgctca cgctgtaggt atctcagttc ggtgtaggtc + 4321 gttcgctcca agctgggctg tgtgcacgaa ccccccgttc agcccgaccg ctgcgcctta + 4381 tccggtaact atcgtcttga gtccaacccg gtaagacacg acttatcgcc actggcagca + 4441 gccactggta acaggattag cagagcgagg tatgtaggcg gtgctacaga gttcttgaag + 4501 tggtggccta actacggcta cactagaagg acagtatttg gtatctgcgc tctgctgaag + 4561 ccagttacct tcggaaaaag agttggtagc tcttgatccg gcaaacaaac caccgctggt + 4621 agcggtggtt tttttgtttg caagcagcag attacgcgca gaaaaaaagg atctcaagaa + 4681 gatcctttga tcttttctac ggggtctgac gctcagtgga acgaaaactc acgttaaggg + 4741 attttggtca tgactagtgc ttggattctc accaataaaa aacgcccggc ggcaaccgag + 4801 cgttctgaac aaatccagat ggagttctga ggtcattact ggatctatca acaggagtcc + 4861 aagcgagctc aaacttggtc tgacagttac caatgcttaa tcagtgaggc acctatctca + 4921 gcgatctgtc tatttcgttc atccatagtt gcctgactcc ccgtcgtgta gataactacg + 4981 atacgggagg gcttaccatc tggccccagt gctgcaatga taccgcgaga cccacgctca + 5041 ccggctccag atttatcagc aataaaccag ccagccggaa gggccgagcg cagaagtggt + 5101 cctgcaactt tatccgcctc catccagtct attaattgtt gccgggaagc tagagtaagt + 5161 agttcgccag ttaatagttt gcgcaacgtt gttgccattg ctacaggcat cgtggtgtca + 5221 cgctcgtcgt ttggtatggc ttcattcagc tccggttccc aacgatcaag gcgagttaca + 5281 tgatccccca tgttgtgcaa aaaagcggtt agctccttcg gtcctccgat cgttgtcaga + 5341 agtaagttgg ccgcagtgtt atcactcatg gttatggcag cactgcataa ttctcttact + 5401 gtcatgccat ccgtaagatg cttttctgtg actggtgagt actcaaccaa gtcattctga + 5461 gaa +// diff --git a/lib/VNTI files/pLacthiMmcherry-N30#2.gb b/lib/VNTI files/pLacthiMmcherry-N30#2.gb new file mode 100644 index 00000000..1a71c2e9 --- /dev/null +++ b/lib/VNTI files/pLacthiMmcherry-N30#2.gb @@ -0,0 +1,1429 @@ +LOCUS pLacthiMmc 3080 bp DNA circular 20-AUG-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|452944057| +COMMENT VNTDBDATE|455212555| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMmcherry-N30#2| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMmcherry-N30#2" 0 3080 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3080 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 737 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 1438 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1446 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2487 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 726 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1557 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 1960 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 1646 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2948 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2639 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 766 0 2366 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1039 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1679 2317 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1451 1555 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2376 2481 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2507 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2593 2614 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 741 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 740 740 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 738 738 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "mcherry" 4 0 0 719 1444 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #48=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #49=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacthiMmcherry-N30#2" 2) 5 "" 0 4) +COMMENT #50=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMmcherry-N30#2'" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/26/07 09:47\214\337\221O" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 08/20/07 03:55\214\337\214\343" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3080 bp" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #63=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 719 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 719 End: 1444" 1))) "mcherry") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2507 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2507 End: 284 (Complementary)" +COMMENT 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 741 " 1))) +COMMENT "core riboswitch") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 690 " 1))) +COMMENT "TPP aptamer") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 738 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 738 End: 738 " 1))) "orig G") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2593 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2593 End: 2614" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1679 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1679 End: 2317" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1451 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1451 End: 1555" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2376 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2376 End: 2481 (Complementary)" +COMMENT 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 740 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 740 End: 740 " 1))) +COMMENT "orig T"))) "Mutation (2 total)"))) +COMMENT "Feature Map") +COMMENT #151=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26686072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20974760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 1646 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20979864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26686872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1960 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26685992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1557 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26686632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 737 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20971480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1039 " 1))))) "BbsI: 2 sites") +COMMENT 8 12 "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26686952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20971560 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20979624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20980184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #177=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2639 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20971400 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #180=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26686552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26687112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #182=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26686312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26686472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #186=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 1438 " 1))))) "KpnI: 1 site") +COMMENT 5 1 "GGTACC" "CCATGG") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20979704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26687032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20980104 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2948 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26686232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2487 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26686152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 726 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20971320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26686792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26686392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #202=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #203=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1446 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20979784 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #205=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #206=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20974680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #208=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #209=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #210=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #211=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #212=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #213=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #214=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #215=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #216=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #217=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #218=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #219=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #220=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #221=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #222=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #223=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #224=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #225=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #226=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #227=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #228=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #229=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #230=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #231=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #232=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #233=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #234=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #235=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #236=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #237=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #238=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #239=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #240=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #241=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #242=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #243=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #244=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #245=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #246=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #247=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -43) 1 1 0 1 1 +COMMENT (mapper: 17.8436 -19.7168 40.0378 40.0378 0.01 10 -1 3080 3080 1 0 0) +COMMENT #248=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #249=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -783 100) +COMMENT (CObjectList +COMMENT #250=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #214# 26623484 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27622 6.27422 1 0.0214037) 0.203675) +COMMENT #251=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #211# 27136836 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMmcherry-N30#2" "@N" 1 0 +COMMENT 0.871165 0 -10 13.4373 1.44863 Nil) +COMMENT #252=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #210# 27130516 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3080 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #253=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList +COMMENT #254=(CGroupWidget (CWidget 4 (7 4 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #255=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.69475 1.16909 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #256=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.77154 10.454 0 -10 2.72243 1.04901 #255#) +COMMENT #257=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #212# 393230 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.33212 4.8108 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #258=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 24626860 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mcherry" "@N" 1 +COMMENT 12.473 -22.6503 0 -10 3.84637 1.04901 #257#)) +COMMENT (CObjectList)) +COMMENT #259=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -842 100) +COMMENT (CObjectList +COMMENT #260=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.993933 1.9 +COMMENT 0.082322 1) +COMMENT #261=(CLabel (CWidget 0 (0 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -12.6382 5.22699 0 -10 3.97125 1.04901 +COMMENT #260#) +COMMENT #262=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.09187 1.9 +COMMENT 0.082322 1) +COMMENT #263=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 6751096 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 11.8633 -5.22699 0 -10 1.14891 1.04901 #262#) +COMMENT #264=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.76395 +COMMENT 5.02058 1 0.082322) 0.8 1.8 0) +COMMENT #265=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 24957804 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 15.6585 -12.1963 0 +COMMENT -10 7.26813 1.04901 #264#) +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.7721 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 24627316 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 14.2818 -17.4233 0 -10 2.92224 1.04901 #266#) +COMMENT #268=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #213# 3736040 +COMMENT 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 4.86783 +COMMENT 5.02058 1 0.082322) 0.8 1.8 0) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 24631420 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 14.8914 -10.454 0 -10 5.8195 1.04901 +COMMENT #268#)) (CObjectList)) +COMMENT #270=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1131 100) +COMMENT (CObjectList +COMMENT #271=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.22222 1.9 +COMMENT 0.082322 1) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 268634488 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 13.0234 1.74233 0 -10 2.59755 1.04901 #271#)) +COMMENT (CObjectList)) +COMMENT #273=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -391 100) +COMMENT (CObjectList +COMMENT #274=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.3098 1.9 0.082322 +COMMENT 1) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 393219 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 11.5706 8.71165 0 -10 2.59755 1.04901 #274#) +COMMENT #276=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.99619 1.9 +COMMENT 0.082322 1) +COMMENT #277=(CLabel (CWidget 0 (0 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 6.08329 17.4233 0 -10 3.92129 1.04901 #276#) +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.61124 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 26626116 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 10.0006 13.9386 0 -10 3.97125 1.04901 #278#)) +COMMENT (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 393219 100) +COMMENT (CObjectList +COMMENT #281=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.49311 5.69475 1 0.082322) 0.8 1.8 1) +COMMENT #282=(CLabel (CWidget 0 (0 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 9.59298 12.1963 0 -10 2.72243 1.04901 #281#) +COMMENT #283=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.0491 5.26092 1 0.082322) 0.8 1.8 0) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 24630964 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.0495 -1.74233 0 -10 2.67247 1.04901 #283#)) +COMMENT (CObjectList)) +COMMENT #285=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #286=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.09187 1.9 0.082322 +COMMENT 1) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.418 -6.96932 0 -10 2.14797 1.04901 #286#)) +COMMENT (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #289=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.55404 2.85552 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# -1367 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.3033 -6.96932 0 -10 2.72243 1.04901 #289#)) +COMMENT (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1643 100) +COMMENT (CObjectList +COMMENT #292=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #217# 2095 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 3.10604 +COMMENT 3.3199) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 24636140 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.58017 -27.8773 0 -10 1.14891 1.04901 #292#) +COMMENT #294=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #217# 720906 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 1.22001 1.43591) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.4048 1.74233 0 -10 1.14891 1.04901 #294#)) +COMMENT (CObjectList)) +COMMENT #296=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #297=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.11631 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 24627772 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.1996 -3.48466 0 -10 1.47361 1.04901 #297#)) +COMMENT (CObjectList)) +COMMENT #299=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.16519 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 26836532 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.6204 0 0 -10 1.47361 1.04901 #300#)) +COMMENT (CObjectList)) +COMMENT #302=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #303=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.26499 1.9 +COMMENT 0.082322 1) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 14431952 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 14.0813 3.48466 0 -10 5.8195 1.04901 +COMMENT #303#) +COMMENT #305=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.76803 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 24958716 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 14.2667 -19.1656 0 -10 2.72243 1.04901 #305#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #307=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -178 100) +COMMENT (CObjectList +COMMENT #308=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.77414 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24628228 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (737)" "@N (@S)" 5 15.4371 +COMMENT -15.681 0 -10 5.09519 0.924127 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #312=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.34638 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24631876 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (1438)" "@N (@S)" 5 5.94241 +COMMENT -24.3926 0 -10 4.62063 0.924127 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 24763248 100) +COMMENT (CObjectList +COMMENT #315=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.33008 1.9 +COMMENT 0.082322 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24630052 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1446)" "@N (@S)" 5 5.70746 +COMMENT -26.1349 0 -10 4.69556 0.924127 #315#)) +COMMENT (CObjectList)) +COMMENT #317=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #318=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.20983 1.9 +COMMENT 0.082322 1) +COMMENT #319=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24958260 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2487)" "@N (@S)" 5 -13.759 +COMMENT 3.48466 0 -10 4.64561 0.924127 #318#)) +COMMENT (CObjectList)) +COMMENT #320=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #321=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.79654 1.9 +COMMENT 0.082322 1) +COMMENT #322=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24629140 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (726)" "@N (@S)" 5 14.7054 +COMMENT -13.9386 0 -10 3.92129 0.924127 #321#)) +COMMENT (CObjectList)) +COMMENT #323=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #324=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.41979 1.9 +COMMENT 0.082322 1) +COMMENT #325=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24657748 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.9026 +COMMENT 10.454 0 -10 4.29594 0.924127 #324#)) +COMMENT (CObjectList)) +COMMENT #326=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #327=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.104 1.9 0.082322 +COMMENT 1) +COMMENT #328=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 24657292 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1557)" "@N (@S)" 5 -3.68384 +COMMENT -13.9386 0 -10 4.84542 0.924127 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.04706 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 26575660 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.1478 +COMMENT -8.71165 0 -10 4.64561 0.924127 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.92273 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# -597 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (1646)" "@N (@S)" 5 -5.74434 +COMMENT -12.1963 0 -10 4.74552 0.924127 #333#)) +COMMENT (CObjectList)) +COMMENT #335=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #336=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.27518 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 26850204 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 13.0302 +COMMENT 5.22699 0 -10 4.17106 0.924127 #336#)) +COMMENT (CObjectList)) +COMMENT #338=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #339=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.270888 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 25175084 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2948)" "@N (@S)" 5 -6.27908 +COMMENT 12.1963 0 -10 4.69556 0.924127 #339#)) +COMMENT (CObjectList)) +COMMENT #341=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #342=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.900243 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 26751676 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2639)" "@N (@S)" 5 -12.3313 +COMMENT 6.96932 0 -10 4.64561 0.924127 #342#)) +COMMENT (CObjectList)) +COMMENT #344=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #345=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.93916 1.9 +COMMENT 0.082322 1) +COMMENT #346=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 21476148 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 7.29686 +COMMENT 15.681 0 -10 4.64561 0.924127 #345#) +COMMENT #347=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.2832 1.9 0.082322 +COMMENT 1) +COMMENT #348=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 21414396 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1960)" "@N (@S)" 5 -12.0739 +COMMENT -8.71165 0 -10 5.17011 0.924127 #347#)) +COMMENT (CObjectList)) +COMMENT #349=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #350=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.30573 1.9 +COMMENT 0.082322 1) +COMMENT #351=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 24840652 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 12.2685 +COMMENT 6.96932 0 -10 4.12111 0.924127 #350#) +COMMENT #352=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.15904 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 26776428 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1039)" "@N (@S)" 5 13.5618 +COMMENT -20.908 0 -10 4.57068 0.924127 #352#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #354=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #355=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21224344 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1679..2317 + /vntifkey="33" + /label=ColE1 + terminator 1451..1555 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2376..2481) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2507..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2593..2614 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..741 + /vntifkey="21" + /label=core\riboswitch + mutation 740..740 + /vntifkey="62" + /label=orig\T + misc_feature 738..738 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..690 + /vntifkey="21" + /label=TPP\aptamer + CDS 719..1444 + /vntifkey="4" + /label=mcherry +BASE COUNT 849 a 725 c 748 g 758 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gctattacaa gaagatcagg agcaaactat + 721 gcaagtcgac ctgctggatc caaacatggc aatcattaag gagttcatga gattcaaagt + 781 tcacatggaa ggttctgtaa atggacatga atttgaaata gaaggtgaag gagaaggaag + 841 gccttatgaa ggaacccaaa ccgcgaagct aaaagttact aagggtggcc cattaccatt + 901 tgcatgggat atccttagcc ctcaattcat gtatgggtca aaggcttatg tcaagcaccc + 961 cgccgacatt ccagactatc taaagttatc ttttcccgaa gggtttaagt gggagcgtgt + 1021 gatgaacttc gaagacggtg gcgtggtaac agtgactcag gattcgtccc tgcaagatgg + 1081 tgaatttatc tacaaagtca aattaagagg aactaacttt ccatctgacg gcccggttat + 1141 gcaaaaaaag acaatgggct gggaggcctc ctcagaacga atgtaccctg aagatggtgc + 1201 cttgaagggt gagattaaac aaagattgaa attgaaagat ggtggacatt atgacgctga + 1261 ggttaaaacg acatacaaag ctaagaaacc tgtccagctc ccaggtgctt acaatgtaaa + 1321 tataaaactt gatattacat cacataatga agattatacg atagttgaac aatacgaaag + 1381 ggctgagggg agacatagta ctggtggcat ggatgaacta tacaaaggtt ctggtaccgc + 1441 ataatctaga ggcatcaaat aaaacgaaag gctcagtcga aagactgggc ctttcgtttt + 1501 atctgttgtt tgtcggtgaa cgctctcctg agtaggacaa atccgccgcc ctagacctag + 1561 gcgttcggct gcggcgagcg gtatcagctc actcaaaggc ggtaatacgg ttatccacag + 1621 aatcagggga taacgcagga aagaacatgt gagcaaaagg ccagcaaaag gccaggaacc + 1681 gtaaaaaggc cgcgttgctg gcgtttttcc ataggctccg cccccctgac gagcatcaca + 1741 aaaatcgacg ctcaagtcag aggtggcgaa acccgacagg actataaaga taccaggcgt + 1801 ttccccctgg aagctccctc gtgcgctctc ctgttccgac cctgccgctt accggatacc + 1861 tgtccgcctt tctcccttcg ggaagcgtgg cgctttctca atgctcacgc tgtaggtatc + 1921 tcagttcggt gtaggtcgtt cgctccaagc tgggctgtgt gcacgaaccc cccgttcagc + 1981 ccgaccgctg cgccttatcc ggtaactatc gtcttgagtc caacccggta agacacgact + 2041 tatcgccact ggcagcagcc actggtaaca ggattagcag agcgaggtat gtaggcggtg + 2101 ctacagagtt cttgaagtgg tggcctaact acggctacac tagaaggaca gtatttggta + 2161 tctgcgctct gctgaagcca gttaccttcg gaaaaagagt tggtagctct tgatccggca + 2221 aacaaaccac cgctggtagc ggtggttttt ttgtttgcaa gcagcagatt acgcgcagaa + 2281 aaaaaggatc tcaagaagat cctttgatct tttctacggg gtctgacgct cagtggaacg + 2341 aaaactcacg ttaagggatt ttggtcatga ctagtgcttg gattctcacc aataaaaaac + 2401 gcccggcggc aaccgagcgt tctgaacaaa tccagatgga gttctgaggt cattactgga + 2461 tctatcaaca ggagtccaag cgagctcaaa cttggtctga cagttaccaa tgcttaatca + 2521 gtgaggcacc tatctcagcg atctgtctat ttcgttcatc catagttgcc tgactccccg + 2581 tcgtgtagat aactacgata cgggagggct taccatctgg ccccagtgct gcaatgatac + 2641 cgcgagaccc acgctcaccg gctccagatt tatcagcaat aaaccagcca gccggaaggg + 2701 ccgagcgcag aagtggtcct gcaactttat ccgcctccat ccagtctatt aattgttgcc + 2761 gggaagctag agtaagtagt tcgccagtta atagtttgcg caacgttgtt gccattgcta + 2821 caggcatcgt ggtgtcacgc tcgtcgtttg gtatggcttc attcagctcc ggttcccaac + 2881 gatcaaggcg agttacatga tcccccatgt tgtgcaaaaa agcggttagc tccttcggtc + 2941 ctccgatcgt tgtcagaagt aagttggccg cagtgttatc actcatggtt atggcagcac + 3001 tgcataattc tcttactgtc atgccatccg taagatgctt ttctgtgact ggtgagtact + 3061 caaccaagtc attctgagaa +// diff --git a/lib/VNTI files/pLacthiMtetA(BamHI-).gb b/lib/VNTI files/pLacthiMtetA(BamHI-).gb new file mode 100644 index 00000000..e15a9ec2 --- /dev/null +++ b/lib/VNTI files/pLacthiMtetA(BamHI-).gb @@ -0,0 +1,1470 @@ +LOCUS pLacthiMte 3588 bp DNA circular 4-APR-2008 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|478715964| +COMMENT VNTDBDATE|478715964| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMtetA(BamHI-)| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMtetA(BamHI-)" 0 3588 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3588 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 759 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1954 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2995 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 748 0 1328 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2065 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2468 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2154 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 910 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 906 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3456 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3147 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1166 0 2874 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1407 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2187 2825 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1959 2063 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2884 2989 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3015 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3101 3122 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 763 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 762 762 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 760 760 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 693 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "tetA*" 4 0 0 741 1952 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #48=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #49=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pLacthiMtetA(BamHI-)" 2) 5 "" 0 4) +COMMENT #50=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMtetA(BamHI-)'" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 04/04/08 04:39\214\337\214\343" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 04/04/08 04:39\214\337\214\343" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3588 bp" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #63=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 741 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 741 End: 1952" 1))) "tetA*") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3015 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3015 End: 284 (Complementary)" +COMMENT 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 763 " 1))) +COMMENT "core riboswitch") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 693 " 1))) +COMMENT "TPP aptamer") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 760 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 760 End: 760 " 1))) "orig G") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3101 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3101 End: 3122" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2187 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2187 End: 2825" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1959 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1959 End: 2063" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2884 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2884 End: 2989 (Complementary)" +COMMENT 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 762 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 762 End: 762 " 1))) +COMMENT "orig T"))) "Mutation (2 total)"))) +COMMENT "Feature Map") +COMMENT #151=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25284416 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21003072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2154 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21003392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25276648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2468 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25284336 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2065 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25286336 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 759 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21000432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1407 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25276728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21000512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21003152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #176=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 910 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21003712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3147 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21003872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25286256 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25276888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #184=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25266648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25285696 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21003232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #189=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 906 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25276808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21003632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #193=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #194=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3456 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25266568 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2995 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25284496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 748 " 1) +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1328 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21003792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25288424 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25285616 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #205=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #206=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1954 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21003312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #208=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #209=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21002992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #211=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #212=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #213=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #214=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #215=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #216=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #217=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #218=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #219=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #220=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #221=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #222=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #223=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #224=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #225=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #226=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #227=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #228=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #229=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #230=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #231=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #232=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #233=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #234=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #235=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #236=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #237=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #238=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #239=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #240=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #241=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #242=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #243=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #244=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #245=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #246=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #247=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #248=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #249=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #250=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.2182 -23.1885 40.0378 40.0378 0.01 10 -1 3588 3588 1 0 0) +COMMENT #251=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList +COMMENT #252=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -922 100) +COMMENT (CObjectList +COMMENT #253=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 25158452 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27593 6.27393 1 0.0214037) 0.174838) +COMMENT #254=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #214# 268634488 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMtetA(BamHI-)" "@N" 1 0 +COMMENT 0.871165 0 -10 12.0636 1.44863 Nil) +COMMENT #255=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #213# 25049872 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3588 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #256=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #257=(CGroupWidget (CWidget 4 (7 4 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #258=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.77665 1.00357 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #259=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.77154 10.454 0 -10 2.72243 1.04901 #258#) +COMMENT #260=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #215# +COMMENT 268743208 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.86035 4.97938 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #261=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 10.5933 -22.6503 0 -10 2.27285 1.04901 #260#)) +COMMENT (CObjectList)) +COMMENT #262=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #263=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.853209 1.9 +COMMENT 0.082322 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26542636 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.7389 6.96932 0 -10 3.97125 1.04901 +COMMENT #263#) +COMMENT #265=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.25913 1.9 +COMMENT 0.082322 1) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3801656 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4048 -1.74233 0 -10 1.14891 1.04901 #265#) +COMMENT #267=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #216# 24857052 +COMMENT 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.93917 +COMMENT 5.19793 1 0.082322) 0.8 1.8 0) +COMMENT #268=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 393241 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 14.8186 -8.71165 0 +COMMENT -10 7.26813 1.04901 #267#) +COMMENT #269=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.94617 1.9 +COMMENT 0.082322 1) +COMMENT #270=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26579828 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 13.8122 -13.9386 0 -10 2.92224 1.04901 #269#) +COMMENT #271=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.06156 +COMMENT 5.19793 1 0.082322) 0.8 1.8 0) +COMMENT #272=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 13.8886 -6.96932 0 -10 5.8195 1.04901 +COMMENT #271#)) (CObjectList)) +COMMENT #273=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList +COMMENT #274=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.37102 1.9 +COMMENT 0.082322 1) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736192 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.1329 5.22699 0 -10 2.59755 1.04901 #274#)) +COMMENT (CObjectList)) +COMMENT #276=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil 5439490 100) +COMMENT (CObjectList +COMMENT #277=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.4462 1.9 0.082322 +COMMENT 1) +COMMENT #278=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26716180 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 10.8442 12.1963 0 -10 2.59755 1.04901 #277#) +COMMENT #279=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.03541 1.9 +COMMENT 0.082322 1) +COMMENT #280=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.71792 20.908 0 -10 3.92129 1.04901 #279#) +COMMENT #281=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.70496 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26576636 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 9.25588 17.4233 0 -10 3.97125 1.04901 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 3801520 100) +COMMENT (CObjectList +COMMENT #284=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.60356 5.77665 1 0.082322) 0.8 1.8 1) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 6751096 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.87964 15.681 0 -10 2.72243 1.04901 #284#) +COMMENT #286=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.22241 5.40424 1 0.082322) 0.8 1.8 0) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.0495 1.74233 0 -10 2.67247 1.04901 #286#)) +COMMENT (CObjectList)) +COMMENT #288=(CGroupWidget (CWidget 31 (7 31 0) 1 2 0 0 Nil 1 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.25913 1.9 0.082322 +COMMENT 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736224 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5045 -3.48466 0 -10 2.14797 1.04901 #289#)) +COMMENT (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #292=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.33401 2.45123 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 25104884 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7746 -3.48466 0 -10 2.72243 1.04901 #292#)) +COMMENT (CObjectList)) +COMMENT #294=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #295=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #220# 131079 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 2.66628 2.84986) +COMMENT #296=(CLabel (CWidget 0 (0 0) 1 2 0 0 #212# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -5.78728 -12.1963 0 -10 1.14891 1.04901 #295#) +COMMENT #297=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #220# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.04728 1.23261) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24636596 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.0864 3.48466 0 -10 1.14891 1.04901 #297#)) +COMMENT (CObjectList)) +COMMENT #299=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 24935668 100) +COMMENT (CObjectList +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.28011 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3801504 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.6204 0 0 -10 1.47361 1.04901 #300#)) +COMMENT (CObjectList)) +COMMENT #302=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 3801544 100) +COMMENT (CObjectList +COMMENT #303=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.32207 1.9 +COMMENT 0.082322 1) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24846500 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.1996 3.48466 0 -10 1.47361 1.04901 #303#)) +COMMENT (CObjectList)) +COMMENT #305=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3801552 100) +COMMENT (CObjectList +COMMENT #306=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.40774 1.9 +COMMENT 0.082322 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3801648 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 12.61 6.96932 0 -10 5.8195 1.04901 +COMMENT #306#) +COMMENT #308=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.94267 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24713668 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 13.8457 -15.681 0 -10 2.72243 1.04901 #308#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #310=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 26491596 100) +COMMENT (CObjectList +COMMENT #311=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil 25157516 100) +COMMENT (CObjectList +COMMENT #312=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.94791 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 25161084 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (759)" "@N (@S)" 5 14.9461 +COMMENT -12.1963 0 -10 5.09519 0.924127 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 25163988 100) +COMMENT (CObjectList +COMMENT #315=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.8586 1.9 0.082322 +COMMENT 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 26475636 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1954)" "@N (@S)" 5 -6.50809 +COMMENT -13.9386 0 -10 4.69556 0.924127 #315#)) +COMMENT (CObjectList)) +COMMENT #317=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil 25161932 100) +COMMENT (CObjectList +COMMENT #318=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.03854 1.9 +COMMENT 0.082322 1) +COMMENT #319=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 24791752 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2995)" "@N (@S)" 5 -13.187 +COMMENT 5.22699 0 -10 4.64561 0.924127 #318#)) +COMMENT (CObjectList)) +COMMENT #320=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 25134956 100) +COMMENT (CObjectList +COMMENT #321=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.54061 1.9 +COMMENT 0.082322 1) +COMMENT #322=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 24628288 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.1487 +COMMENT 13.9386 0 -10 4.29594 0.924127 #321#)) +COMMENT (CObjectList)) +COMMENT #323=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #324=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.66453 1.9 +COMMENT 0.082322 1) +COMMENT #325=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 3801696 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2065)" "@N (@S)" 5 -8.91277 +COMMENT -10.454 0 -10 4.92035 0.924127 #324#)) +COMMENT (CObjectList)) +COMMENT #326=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 2228229 100) +COMMENT (CObjectList +COMMENT #327=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #219# 25182936 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.22066 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 3801752 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.3264 +COMMENT -5.22699 0 -10 4.64561 0.924127 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.50892 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 3801760 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2154)" "@N (@S)" 5 -11.08 +COMMENT -8.71165 0 -10 4.74552 0.924127 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.68391 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 24854060 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (910)" "@N (@S)" 5 15.169 +COMMENT -19.1656 0 -10 4.17106 0.924127 #333#)) +COMMENT (CObjectList)) +COMMENT #335=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 24845176 100) +COMMENT (CObjectList +COMMENT #336=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #219# 1149 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.6909 1.9 0.082322 +COMMENT 1) +COMMENT #337=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 25000432 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (906)" "@N (@S)" 5 15.1105 +COMMENT -17.4233 0 -10 4.24599 0.924127 #336#)) +COMMENT (CObjectList)) +COMMENT #338=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 1114122 100) +COMMENT (CObjectList +COMMENT #339=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.41648 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 24642680 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 11.6682 +COMMENT 8.71165 0 -10 4.17106 0.924127 #339#)) +COMMENT (CObjectList)) +COMMENT #341=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #342=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.232534 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 3801784 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3456)" "@N (@S)" 5 -5.80814 +COMMENT 12.1963 0 -10 4.69556 0.924127 #342#)) +COMMENT (CObjectList)) +COMMENT #344=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #345=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.772784 1.9 +COMMENT 0.082322 1) +COMMENT #346=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 25268380 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3147)" "@N (@S)" 5 -11.0316 +COMMENT 8.71165 0 -10 4.57068 0.924127 #345#)) +COMMENT (CObjectList)) +COMMENT #347=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil 25299604 100) +COMMENT (CObjectList +COMMENT #348=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.96715 1.9 +COMMENT 0.082322 1) +COMMENT #349=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #211# 25126756 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (748)" "@N (@S)" 5 14.137 -10.454 +COMMENT 0 -10 3.92129 0.924127 #348#) +COMMENT #350=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.95309 1.9 +COMMENT 0.082322 1) +COMMENT #351=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #211# 3801728 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1328)" "@N (@S)" 5 11.9462 +COMMENT -20.908 0 -10 4.37087 0.924127 #350#)) +COMMENT (CObjectList)) +COMMENT #352=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 1002 100) +COMMENT (CObjectList +COMMENT #353=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.98645 1.9 +COMMENT 0.082322 1) +COMMENT #354=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #211# 3801752 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.88277 +COMMENT 19.1656 0 -10 4.64561 0.924127 #353#) +COMMENT #355=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.95993 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #211# 3801584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2468)" "@N (@S)" 5 -13.8585 +COMMENT -5.22699 0 -10 5.22007 0.924127 #355#)) +COMMENT (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil 25000556 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.4427 1.9 0.082322 +COMMENT 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #211# 3801792 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 11.5564 10.454 +COMMENT 0 -10 4.12111 0.924127 #358#) +COMMENT #360=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.81496 1.9 +COMMENT 0.082322 1) +COMMENT #361=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #211# 3736152 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1407)" "@N (@S)" 5 10.8535 +COMMENT -24.3926 0 -10 4.57068 0.924127 #360#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #362=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 24712012 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #363=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 21035364 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21341072 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2187..2825 + /vntifkey="33" + /label=ColE1 + terminator 1959..2063 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2884..2989) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3015..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3101..3122 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..763 + /vntifkey="21" + /label=core\riboswitch + mutation 762..762 + /vntifkey="62" + /label=orig\T + misc_feature 760..760 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..693 + /vntifkey="21" + /label=TPP\aptamer + CDS 741..1952 + /vntifkey="4" + /label=tetA* +BASE COUNT 803 a 988 c 932 g 865 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gtcacggacc accaggtcat tgcttcttca + 721 cgttatggca ggagcaaact atgcaagtcg acctgctgga tccaaaatct aacaatgcgc + 781 tcatcgtcat cctcggcacc gtcaccctgg atgctgtagg cataggcttg gttatgccgg + 841 tactgccggg cctcttgcgg gatatcgtcc attccgacag catcgccagt cactatggcg + 901 tgctgctagc gctatatgcg ttgatgcaat ttctatgcgc acccgttctc ggagcactgt + 961 ccgaccgctt tggccgccgc ccagtcctgc tcgcttcgct acttggagcc actatcgact + 1021 acgcgatcat ggcgaccaca cccgtcctgt ggattctcta cgccggacgc atcgtggccg + 1081 gcatcaccgg cgccacaggt gcggttgctg gcgcctatat cgccgacatc accgatgggg + 1141 aagatcgggc tcgccacttc gggctcatga gcgcttgttt cggcgtgggt atggtggcag + 1201 gccccgtggc cgggggactg ttgggcgcca tctccttgca tgcaccattc cttgcggcgg + 1261 cggtgctcaa cggcctcaac ctactactgg gctgcttcct aatgcaggag tcgcataagg + 1321 gagagcgtcg accgatgccc ttgagagcct tcaacccagt cagctccttc cggtgggcgc + 1381 ggggcatgac tatcgtcgcc gcacttatga ctgtcttctt tatcatgcaa ctcgtaggac + 1441 aggtgccggc agcgctctgg gtcattttcg gcgaggaccg ctttcgctgg agcgcgacga + 1501 tgatcggcct gtcgcttgcg gtattcggaa tcttgcacgc cctcgctcaa gccttcgtca + 1561 ctggtcccgc caccaaacgt ttcggcgaga agcaggccat tatcgccggc atggcggccg + 1621 acgcgctggg ctacgtcttg ctggcgttcg cgacgcgagg ctggatggcc ttccccatta + 1681 tgattcttct cgcttccggc ggcatcggga tgcccgcgtt gcaggccatg ctgtccaggc + 1741 aggtagatga cgaccatcag ggacagcttc aaggatcgct cgcggctctt accagcctaa + 1801 cttcgatcac tggaccgctg atcgtcacgg cgatttatgc cgcctcggcg agcacatgga + 1861 acgggttggc atggattgta ggcgccgccc tataccttgt ctgcctcccc gcgttgcgtc + 1921 gcggtgcatg gagccgggcc acctcgacct aatctagagg catcaaataa aacgaaaggc + 1981 tcagtcgaaa gactgggcct ttcgttttat ctgttgtttg tcggtgaacg ctctcctgag + 2041 taggacaaat ccgccgccct agacctaggc gttcggctgc ggcgagcggt atcagctcac + 2101 tcaaaggcgg taatacggtt atccacagaa tcaggggata acgcaggaaa gaacatgtga + 2161 gcaaaaggcc agcaaaaggc caggaaccgt aaaaaggccg cgttgctggc gtttttccat + 2221 aggctccgcc cccctgacga gcatcacaaa aatcgacgct caagtcagag gtggcgaaac + 2281 ccgacaggac tataaagata ccaggcgttt ccccctggaa gctccctcgt gcgctctcct + 2341 gttccgaccc tgccgcttac cggatacctg tccgcctttc tcccttcggg aagcgtggcg + 2401 ctttctcaat gctcacgctg taggtatctc agttcggtgt aggtcgttcg ctccaagctg + 2461 ggctgtgtgc acgaaccccc cgttcagccc gaccgctgcg ccttatccgg taactatcgt + 2521 cttgagtcca acccggtaag acacgactta tcgccactgg cagcagccac tggtaacagg + 2581 attagcagag cgaggtatgt aggcggtgct acagagttct tgaagtggtg gcctaactac + 2641 ggctacacta gaaggacagt atttggtatc tgcgctctgc tgaagccagt taccttcgga + 2701 aaaagagttg gtagctcttg atccggcaaa caaaccaccg ctggtagcgg tggttttttt + 2761 gtttgcaagc agcagattac gcgcagaaaa aaaggatctc aagaagatcc tttgatcttt + 2821 tctacggggt ctgacgctca gtggaacgaa aactcacgtt aagggatttt ggtcatgact + 2881 agtgcttgga ttctcaccaa taaaaaacgc ccggcggcaa ccgagcgttc tgaacaaatc + 2941 cagatggagt tctgaggtca ttactggatc tatcaacagg agtccaagcg agctcaaact + 3001 tggtctgaca gttaccaatg cttaatcagt gaggcaccta tctcagcgat ctgtctattt + 3061 cgttcatcca tagttgcctg actccccgtc gtgtagataa ctacgatacg ggagggctta + 3121 ccatctggcc ccagtgctgc aatgataccg cgagacccac gctcaccggc tccagattta + 3181 tcagcaataa accagccagc cggaagggcc gagcgcagaa gtggtcctgc aactttatcc + 3241 gcctccatcc agtctattaa ttgttgccgg gaagctagag taagtagttc gccagttaat + 3301 agtttgcgca acgttgttgc cattgctaca ggcatcgtgg tgtcacgctc gtcgtttggt + 3361 atggcttcat tcagctccgg ttcccaacga tcaaggcgag ttacatgatc ccccatgttg + 3421 tgcaaaaaag cggttagctc cttcggtcct ccgatcgttg tcagaagtaa gttggccgca + 3481 gtgttatcac tcatggttat ggcagcactg cataattctc ttactgtcat gccatccgta + 3541 agatgctttt ctgtgactgg tgagtactca accaagtcat tctgagaa +// diff --git a/lib/VNTI files/pLacthiMtetA.gb b/lib/VNTI files/pLacthiMtetA.gb new file mode 100644 index 00000000..e24a8ab6 --- /dev/null +++ b/lib/VNTI files/pLacthiMtetA.gb @@ -0,0 +1,1486 @@ +LOCUS pLacthiMte 3588 bp DNA circular 5-JUN-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|448368530| +COMMENT VNTDBDATE|448368530| +COMMENT LSOWNER| +COMMENT VNTNAME|pLacthiMtetA| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pLacthiMtetA" 0 3588 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3588 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 759 0 1052 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1954 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 2995 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 748 0 1328 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2065 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2468 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2154 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 910 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 906 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3456 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3147 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1166 0 2874 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1407 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2187 2825 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1959 2063 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2884 2989 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3015 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3101 3122 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 616 763 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 762 762 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 760 760 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "TPP aptamer" 21 0 0 616 693 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "tetA*" 4 0 0 741 1952 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #48=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #49=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pLacthiMtetA" 2) +COMMENT 5 "" 0 4) +COMMENT #50=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pLacthiMtetA'" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 06/05/07 10:48\214\337\221O" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 06/05/07 10:48\214\337\221O" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3588 bp" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #63=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 741 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 741 End: 1952" 1))) "tetA*") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3015 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3015 End: 284 (Complementary)" +COMMENT 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 763 " 1))) +COMMENT "core riboswitch") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 616 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 616 End: 693 " 1))) +COMMENT "TPP aptamer") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 760 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 760 End: 760 " 1))) "orig G") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3101 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3101 End: 3122" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2187 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2187 End: 2825" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1959 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1959 End: 2063" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2884 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2884 End: 2989 (Complementary)" +COMMENT 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 762 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 762 End: 762 " 1))) +COMMENT "orig T"))) "Mutation (2 total)"))) +COMMENT "Feature Map") +COMMENT #151=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24972832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25206200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2154 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25207800 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2468 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24972752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2065 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 759 " 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1052 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25208200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1407 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25208440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25206280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #177=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 910 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25207960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #180=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3147 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25208120 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #185=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25207640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 906 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25207880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3456 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24972992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2995 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24972912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #200=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 748 " 1) +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1328 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25208040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24973152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #206=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #207=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1954 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25207720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25218136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #212=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #213=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #214=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #215=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #216=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #217=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #218=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #219=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #220=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #221=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #222=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #223=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #224=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #225=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #226=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #227=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #228=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #229=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #230=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #231=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #232=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #233=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #234=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #235=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #236=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #237=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #238=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #239=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #240=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #241=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #242=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #243=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #244=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #245=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #246=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #247=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #248=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #249=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #250=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #251=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -5463) 1 1 0 1 1 +COMMENT (mapper: 18.2682 -23.1885 40.0378 40.0378 0.01 10 -1 3588 3588 1 0 0) +COMMENT #252=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #253=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -922 100) +COMMENT (CObjectList +COMMENT #254=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 26452108 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27593 6.27393 1 0.0214037) 0.174838) +COMMENT #255=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #215# 26577548 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pLacthiMtetA" "@N" 1 0 0.871165 +COMMENT 0 -10 6.99339 1.44863 Nil) +COMMENT #256=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #214# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3588 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #257=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #258=(CGroupWidget (CWidget 4 (7 4 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #259=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.77665 1.00357 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.76283 10.454 0 -10 2.7474 1.04901 #259#) +COMMENT #261=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #216# 24989104 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.86035 4.97938 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #262=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736192 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 10.6166 -24.3926 0 -10 2.29783 1.04901 #261#)) +COMMENT (CObjectList)) +COMMENT #263=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1131 100) +COMMENT (CObjectList +COMMENT #264=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.853209 1.9 +COMMENT 0.082322 1) +COMMENT #265=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26578004 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.7563 6.96932 0 -10 4.0212 1.04901 #264#) +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.25913 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736136 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4136 -1.74233 0 -10 1.17389 1.04901 #266#) +COMMENT #268=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.93917 +COMMENT 5.19793 1 0.082322) 0.8 1.8 0) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 14.8447 -8.71165 0 +COMMENT -10 7.34306 1.04901 #268#) +COMMENT #270=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #221# 1149 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.94617 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26454740 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 13.8209 -13.9386 0 -10 2.94721 1.04901 #270#) +COMMENT #272=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #217# +COMMENT 268742920 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 5.06156 +COMMENT 5.19793 1 0.082322) 0.8 1.8 0) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24915740 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 13.8886 -6.96932 0 -10 5.86945 1.04901 +COMMENT #272#)) (CObjectList)) +COMMENT #274=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.37102 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 21380148 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.1503 5.22699 0 -10 2.62252 1.04901 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil 393218 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #234# 25182936 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.4462 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 10.8529 12.1963 0 -10 2.62252 1.04901 #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.03541 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26575660 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.72663 20.908 0 -10 3.94627 1.04901 #280#) +COMMENT #282=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.70496 1.9 +COMMENT 0.082322 1) +COMMENT #283=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 9.2733 17.4233 0 -10 4.0212 1.04901 #282#)) +COMMENT (CObjectList)) +COMMENT #284=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.60356 5.77665 1 0.082322) 0.8 1.8 1) +COMMENT #286=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.88835 15.681 0 -10 2.7474 1.04901 #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.22241 5.40424 1 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 27130516 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.0582 1.74233 0 -10 2.69745 1.04901 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #219# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.25913 1.9 0.082322 +COMMENT 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736120 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5132 -3.48466 0 -10 2.14797 1.04901 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList +COMMENT #293=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.33401 2.45123 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 977 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 -3.48466 0 -10 2.7474 1.04901 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1923 100) +COMMENT (CObjectList +COMMENT #296=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #221# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 2.66628 2.84986) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736232 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -5.79599 -12.1963 0 -10 1.17389 1.04901 #296#) +COMMENT #298=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #221# 131079 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 1.04728 1.23261) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3736008 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.0951 3.48466 0 -10 1.17389 1.04901 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 1944749780 100) +COMMENT (CObjectList +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.28011 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24850220 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.6291 0 0 -10 1.49858 1.04901 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 3736472 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.32207 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 24543072 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.2083 3.48466 0 -10 1.49858 1.04901 #304#)) +COMMENT (CObjectList)) +COMMENT #306=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.40774 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 393241 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 12.6362 6.96932 0 -10 5.86945 1.04901 +COMMENT #307#) +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.94267 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 13.8545 -15.681 0 -10 2.7474 1.04901 #309#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #311=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #312=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList +COMMENT #313=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.8586 1.9 0.082322 +COMMENT 1) +COMMENT #314=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 27916528 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1954)" "@N (@S)" 5 -6.52551 +COMMENT -13.9386 0 -10 4.74552 0.924127 #313#)) +COMMENT (CObjectList)) +COMMENT #315=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #316=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.03854 1.9 +COMMENT 0.082322 1) +COMMENT #317=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 26726172 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (2995)" "@N (@S)" 5 -13.2044 +COMMENT 5.22699 0 -10 4.67059 0.924127 #316#)) +COMMENT (CObjectList)) +COMMENT #318=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 1114117 100) +COMMENT (CObjectList +COMMENT #319=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.54061 1.9 +COMMENT 0.082322 1) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24894332 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.1574 +COMMENT 13.9386 0 -10 4.34589 0.924127 #319#)) +COMMENT (CObjectList)) +COMMENT #321=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #322=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.66453 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736248 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2065)" "@N (@S)" 5 -8.9389 +COMMENT -10.454 0 -10 4.94533 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.22066 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 25102208 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.3438 +COMMENT -5.22699 0 -10 4.67059 0.924127 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.50892 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24585628 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2154)" "@N (@S)" 5 -11.0975 +COMMENT -8.71165 0 -10 4.82044 0.924127 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.68391 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 25079972 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (910)" "@N (@S)" 5 15.1777 +COMMENT -19.1656 0 -10 4.19603 0.924127 #331#)) +COMMENT (CObjectList)) +COMMENT #333=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.6909 1.9 0.082322 +COMMENT 1) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 25030724 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (906)" "@N (@S)" 5 15.1367 +COMMENT -17.4233 0 -10 4.27096 0.924127 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.41648 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 196649 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 11.6857 +COMMENT 8.71165 0 -10 4.19603 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.232534 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 268634488 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3456)" "@N (@S)" 5 -5.82556 +COMMENT 12.1963 0 -10 4.74552 0.924127 #340#)) +COMMENT (CObjectList)) +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.772784 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3147)" "@N (@S)" 5 -11.0578 +COMMENT 8.71165 0 -10 4.62063 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.94791 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736192 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (759)" "@N (@S)" 5 14.9636 +COMMENT -12.1963 0 -10 5.12016 0.924127 #346#) +COMMENT #348=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.43564 1.9 +COMMENT 0.082322 1) +COMMENT #349=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 26579828 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1052)" "@N (@S)" 5 15.4421 +COMMENT -20.908 0 -10 5.59471 0.924127 #348#)) +COMMENT (CObjectList)) +COMMENT #350=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #351=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.96715 1.9 +COMMENT 0.082322 1) +COMMENT #352=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736256 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (748)" "@N (@S)" 5 14.1457 +COMMENT -10.454 0 -10 3.94627 0.924127 #351#) +COMMENT #353=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.95309 1.9 +COMMENT 0.082322 1) +COMMENT #354=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 25094068 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1328)" "@N (@S)" 5 11.9783 +COMMENT -22.6503 0 -10 4.42082 0.924127 #353#)) +COMMENT (CObjectList)) +COMMENT #355=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #356=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.98645 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736248 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.9002 +COMMENT 19.1656 0 -10 4.67059 0.924127 #356#) +COMMENT #358=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.95993 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 24825360 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2468)" "@N (@S)" 5 -13.8846 +COMMENT -5.22699 0 -10 5.27002 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.4427 1.9 0.082322 +COMMENT 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736288 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 11.5738 10.454 +COMMENT 0 -10 4.14608 0.924127 #361#) +COMMENT #363=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.81496 1.9 +COMMENT 0.082322 1) +COMMENT #364=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 3736288 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1407)" "@N (@S)" 5 10.8796 +COMMENT -26.1349 0 -10 4.62063 0.924127 #363#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #365=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #366=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21272912 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2187..2825 + /vntifkey="33" + /label=ColE1 + terminator 1959..2063 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2884..2989) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3015..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3101..3122 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 616..763 + /vntifkey="21" + /label=core\riboswitch + mutation 762..762 + /vntifkey="62" + /label=orig\T + misc_feature 760..760 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 616..693 + /vntifkey="21" + /label=TPP\aptamer + CDS 741..1952 + /vntifkey="4" + /label=tetA* +BASE COUNT 803 a 989 c 932 g 864 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaac caaacgactc ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc + 661 acctgatctg gataatgcca gcgtagggaa gtcacggacc accaggtcat tgcttcttca + 721 cgttatggca ggagcaaact atgcaagtcg acctgctgga tccaaaatct aacaatgcgc + 781 tcatcgtcat cctcggcacc gtcaccctgg atgctgtagg cataggcttg gttatgccgg + 841 tactgccggg cctcttgcgg gatatcgtcc attccgacag catcgccagt cactatggcg + 901 tgctgctagc gctatatgcg ttgatgcaat ttctatgcgc acccgttctc ggagcactgt + 961 ccgaccgctt tggccgccgc ccagtcctgc tcgcttcgct acttggagcc actatcgact + 1021 acgcgatcat ggcgaccaca cccgtcctgt ggatcctcta cgccggacgc atcgtggccg + 1081 gcatcaccgg cgccacaggt gcggttgctg gcgcctatat cgccgacatc accgatgggg + 1141 aagatcgggc tcgccacttc gggctcatga gcgcttgttt cggcgtgggt atggtggcag + 1201 gccccgtggc cgggggactg ttgggcgcca tctccttgca tgcaccattc cttgcggcgg + 1261 cggtgctcaa cggcctcaac ctactactgg gctgcttcct aatgcaggag tcgcataagg + 1321 gagagcgtcg accgatgccc ttgagagcct tcaacccagt cagctccttc cggtgggcgc + 1381 ggggcatgac tatcgtcgcc gcacttatga ctgtcttctt tatcatgcaa ctcgtaggac + 1441 aggtgccggc agcgctctgg gtcattttcg gcgaggaccg ctttcgctgg agcgcgacga + 1501 tgatcggcct gtcgcttgcg gtattcggaa tcttgcacgc cctcgctcaa gccttcgtca + 1561 ctggtcccgc caccaaacgt ttcggcgaga agcaggccat tatcgccggc atggcggccg + 1621 acgcgctggg ctacgtcttg ctggcgttcg cgacgcgagg ctggatggcc ttccccatta + 1681 tgattcttct cgcttccggc ggcatcggga tgcccgcgtt gcaggccatg ctgtccaggc + 1741 aggtagatga cgaccatcag ggacagcttc aaggatcgct cgcggctctt accagcctaa + 1801 cttcgatcac tggaccgctg atcgtcacgg cgatttatgc cgcctcggcg agcacatgga + 1861 acgggttggc atggattgta ggcgccgccc tataccttgt ctgcctcccc gcgttgcgtc + 1921 gcggtgcatg gagccgggcc acctcgacct aatctagagg catcaaataa aacgaaaggc + 1981 tcagtcgaaa gactgggcct ttcgttttat ctgttgtttg tcggtgaacg ctctcctgag + 2041 taggacaaat ccgccgccct agacctaggc gttcggctgc ggcgagcggt atcagctcac + 2101 tcaaaggcgg taatacggtt atccacagaa tcaggggata acgcaggaaa gaacatgtga + 2161 gcaaaaggcc agcaaaaggc caggaaccgt aaaaaggccg cgttgctggc gtttttccat + 2221 aggctccgcc cccctgacga gcatcacaaa aatcgacgct caagtcagag gtggcgaaac + 2281 ccgacaggac tataaagata ccaggcgttt ccccctggaa gctccctcgt gcgctctcct + 2341 gttccgaccc tgccgcttac cggatacctg tccgcctttc tcccttcggg aagcgtggcg + 2401 ctttctcaat gctcacgctg taggtatctc agttcggtgt aggtcgttcg ctccaagctg + 2461 ggctgtgtgc acgaaccccc cgttcagccc gaccgctgcg ccttatccgg taactatcgt + 2521 cttgagtcca acccggtaag acacgactta tcgccactgg cagcagccac tggtaacagg + 2581 attagcagag cgaggtatgt aggcggtgct acagagttct tgaagtggtg gcctaactac + 2641 ggctacacta gaaggacagt atttggtatc tgcgctctgc tgaagccagt taccttcgga + 2701 aaaagagttg gtagctcttg atccggcaaa caaaccaccg ctggtagcgg tggttttttt + 2761 gtttgcaagc agcagattac gcgcagaaaa aaaggatctc aagaagatcc tttgatcttt + 2821 tctacggggt ctgacgctca gtggaacgaa aactcacgtt aagggatttt ggtcatgact + 2881 agtgcttgga ttctcaccaa taaaaaacgc ccggcggcaa ccgagcgttc tgaacaaatc + 2941 cagatggagt tctgaggtca ttactggatc tatcaacagg agtccaagcg agctcaaact + 3001 tggtctgaca gttaccaatg cttaatcagt gaggcaccta tctcagcgat ctgtctattt + 3061 cgttcatcca tagttgcctg actccccgtc gtgtagataa ctacgatacg ggagggctta + 3121 ccatctggcc ccagtgctgc aatgataccg cgagacccac gctcaccggc tccagattta + 3181 tcagcaataa accagccagc cggaagggcc gagcgcagaa gtggtcctgc aactttatcc + 3241 gcctccatcc agtctattaa ttgttgccgg gaagctagag taagtagttc gccagttaat + 3301 agtttgcgca acgttgttgc cattgctaca ggcatcgtgg tgtcacgctc gtcgtttggt + 3361 atggcttcat tcagctccgg ttcccaacga tcaaggcgag ttacatgatc ccccatgttg + 3421 tgcaaaaaag cggttagctc cttcggtcct ccgatcgttg tcagaagtaa gttggccgca + 3481 gtgttatcac tcatggttat ggcagcactg cataattctc ttactgtcat gccatccgta + 3541 agatgctttt ctgtgactgg tgagtactca accaagtcat tctgagaa +// diff --git a/lib/VNTI files/pNAND10tetA.gb b/lib/VNTI files/pNAND10tetA.gb new file mode 100644 index 00000000..e04cec29 --- /dev/null +++ b/lib/VNTI files/pNAND10tetA.gb @@ -0,0 +1,1558 @@ +LOCUS pNAND10tet 3629 bp DNA circular 8-NOV-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|462375272| +COMMENT VNTDBDATE|462449856| +COMMENT LSOWNER| +COMMENT VNTNAME|pNAND10tetA| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pNAND10tetA" 0 3629 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 4294967295 1 3629 0 0 0 0 0 0 0 0) (CStringList) +COMMENT (CStringList) (CObList) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 800 0 1093 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1995 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 3036 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 789 0 1369 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2106 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2509 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2195 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 951 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 947 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3497 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3188 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1207 0 2915 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1448 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2228 2866 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2220..2858") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 2000 2104 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1992..2096") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2925 3030 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2917..3022)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3056 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3048..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3142 3163 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3134..3155") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 657 804 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "649..796") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 803 803 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "795..795") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 801 801 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "793..793") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #46=(CFSignal (CObList) "TPP aptamer" 21 0 0 657 734 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "649..726") +COMMENT #47=(CFSignal (CObList) "tetA*" 4 0 0 782 1993 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "774..1985") +COMMENT #48=(CFSignal (CObList) "Theo28 Aptamer" 21 0 0 608 635 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "608..640")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #49=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #50=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pNAND10tetA" 2) 5 +COMMENT "" 0 4) +COMMENT #51=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pNAND10tetA'" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 11/07/07 01:34\214\337\214\343" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 11/08/07 10:17\214\337\221O" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3629 bp" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 3-OCT-2007" 1))) +COMMENT "Standard Fields") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #64=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 782 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 782 End: 1993" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 774..1985" 1))) "tetA*") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3056 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3056 End: 284 (Complementary)" +COMMENT 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3048..284)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 608 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 608 End: 635 " 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 608..640" 1))) "Theo28 Aptamer") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 657 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 657 End: 804 " 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 649..796" 1))) "core riboswitch") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 657 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 657 End: 734 " 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 649..726" 1))) "TPP aptamer") +COMMENT #93=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 801 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 801 End: 801 " 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 793..793" 1))) "orig G") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3142 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3142 End: 3163" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3134..3155" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (6 total)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #107=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #129=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2228 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2228 End: 2866" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2220..2858" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2000 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2000 End: 2104" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1992..2096" 1))) "T1") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2925 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2925 End: 3030 (Complementary)" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2917..3022)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #150=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #151=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #155=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #160=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #166=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 803 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 803 End: 803 " 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 795..795" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #170=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20957432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #172=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #175=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2195 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2509 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20957352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2106 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20958792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #186=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 800 " 1) +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1093 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20960392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1448 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20960552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20960472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 951 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3188 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20958232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20964080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20957992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20958152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 947 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20960632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #212=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #213=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #214=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3497 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #215=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20957912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #216=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #217=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 3036 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #218=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20957832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #219=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #220=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 789 " 1) +COMMENT #221=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1369 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #223=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #224=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20958072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #225=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #226=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1995 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #227=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #228=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #229=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #230=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20959112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #231=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #232=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #233=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #234=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #235=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #236=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #237=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #238=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #239=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #240=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #241=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #242=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #243=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #244=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #245=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #246=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #247=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #248=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #249=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #250=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #251=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #252=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #253=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #254=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #255=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #256=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #257=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #258=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #259=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #260=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #261=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #262=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #263=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #264=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #265=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #266=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #267=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #268=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #269=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #270=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -3629) 1 1 0 1 1 +COMMENT (mapper: 18.3681 -23.1885 40.0378 40.0378 0.01 10 -1 3629 3629 1 0 0) +COMMENT #271=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -100 100) +COMMENT (CObjectList +COMMENT #272=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -317 100) +COMMENT (CObjectList +COMMENT #273=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 24910156 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27591 6.27391 1 0.0214037) 0.172863) +COMMENT #274=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #234# 26423132 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pNAND10tetA" "@N" 1 0 0.871165 0 +COMMENT -10 7.39301 1.44863 Nil) +COMMENT #275=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #233# 3736256 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3629 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #276=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1539 100) +COMMENT (CObjectList +COMMENT #277=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1428 100) +COMMENT (CObjectList +COMMENT #278=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.78226 0.992232 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24529348 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.96762 12.1963 0 -10 2.7474 1.04901 #278#) +COMMENT #280=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #235# +COMMENT 268634488 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.82803 4.92313 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26666100 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 10.2395 -26.1349 0 -10 2.29783 1.04901 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -434 100) +COMMENT (CObjectList +COMMENT #283=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.84357 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 25091572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.1118 8.71165 0 -10 4.0212 1.04901 #283#) +COMMENT #285=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.27058 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24747724 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4136 -1.74233 0 -10 1.17389 1.04901 #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #236# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.88337 +COMMENT 5.13921 1 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26499380 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 15.2121 -10.454 0 +COMMENT -10 7.34306 1.04901 #287#) +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.89028 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26642924 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 14.0513 -15.681 0 -10 2.94721 1.04901 #289#) +COMMENT #291=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #236# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 5.00437 5.13921 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24528468 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 14.2997 -8.71165 0 -10 5.86945 1.04901 +COMMENT #291#) +COMMENT #293=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.22391 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24531660 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Theo28 Aptamer" +COMMENT "@N" 1 14.1067 -6.96932 0 -10 7.59282 1.04901 +COMMENT #293#)) (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1212 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.38121 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24675524 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.1503 5.22699 0 -10 2.62252 1.04901 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1373 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #253# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.45554 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24909564 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 10.7776 12.1963 0 -10 2.62252 1.04901 #299#) +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #253# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.03809 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 25092068 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.69543 20.908 0 -10 3.94627 1.04901 #301#) +COMMENT #303=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #253# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.71138 1.9 +COMMENT 0.082322 1) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26773892 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 9.20878 17.4233 0 -10 4.0212 1.04901 #303#)) +COMMENT (CObjectList)) +COMMENT #305=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1428 100) +COMMENT (CObjectList +COMMENT #306=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.61112 5.78226 1 0.082322) 0.8 1.8 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 25091076 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.82279 15.681 0 -10 2.7474 1.04901 #306#) +COMMENT #308=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.23428 5.41406 1 0.082322) 0.8 1.8 0) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24698676 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.0582 1.74233 0 -10 2.69745 1.04901 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -990 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.27058 1.9 0.082322 +COMMENT 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24975180 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5132 -3.48466 0 -10 2.14797 1.04901 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -817 100) +COMMENT (CObjectList +COMMENT #314=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.31894 2.42353 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 1096040775 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 -3.48466 0 -10 2.7474 1.04901 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1484 100) +COMMENT (CObjectList +COMMENT #317=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #240# 720906 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 2.63616 2.81766) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# -1230 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -7.02234 -10.454 0 -10 1.17389 1.04901 #317#) +COMMENT #319=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #240# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.03545 1.21868) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26773476 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -11.5642 5.22699 0 -10 1.17389 1.04901 #319#)) +COMMENT (CObjectList)) +COMMENT #321=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #322=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.29133 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24795932 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.6291 0 0 -10 1.49858 1.04901 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1101 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.33281 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26642340 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.2083 3.48466 0 -10 1.49858 1.04901 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1379 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.41752 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24796844 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 12.6362 6.96932 0 -10 5.86945 1.04901 +COMMENT #328#) +COMMENT #330=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.88683 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24981756 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 14.0604 -17.4233 0 -10 2.7474 1.04901 #330#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #332=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1656 100) +COMMENT (CObjectList +COMMENT #333=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1045 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.8263 1.9 0.082322 +COMMENT 1) +COMMENT #335=(CLabel (CWidget 0 (0 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1995)" "@N (@S)" 5 -6.77938 +COMMENT -12.1963 0 -10 4.74552 0.924127 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -1490 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.0268 1.9 0.082322 +COMMENT 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 24529836 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (3036)" "@N (@S)" 5 -12.8307 +COMMENT 6.96932 0 -10 4.67059 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -1656 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.54889 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 24795020 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.0841 +COMMENT 13.9386 0 -10 4.34589 0.924127 #340#)) +COMMENT (CObjectList)) +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1379 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.63443 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 25179180 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2106)" "@N (@S)" 5 -11.1236 +COMMENT -8.71165 0 -10 4.8704 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1156 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.23255 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 26542040 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.3438 +COMMENT -5.22699 0 -10 4.67059 0.924127 #346#)) +COMMENT (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil -712 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #239# 26680624 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.48058 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# -94 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2195)" "@N (@S)" 5 -12.4707 +COMMENT -6.96932 0 -10 4.82044 0.924127 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -489 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.63099 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# -1539 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (951)" "@N (@S)" 5 15.1612 +COMMENT -20.908 0 -10 4.19603 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -656 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #239# 26619644 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.6379 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (947)" "@N (@S)" 5 15.1058 +COMMENT -19.1656 0 -10 4.27096 0.924127 #355#)) +COMMENT (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -878 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42616 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 25307780 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 11.6102 +COMMENT 8.71165 0 -10 4.19603 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -1490 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.229907 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 26215920 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3497)" "@N (@S)" 5 -5.88451 +COMMENT 13.9386 0 -10 4.74552 0.924127 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -156 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.764053 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 24563532 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3188)" "@N (@S)" 5 -11.1991 +COMMENT 10.454 0 -10 4.62063 0.924127 #364#)) +COMMENT (CObjectList)) +COMMENT #366=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -934 100) +COMMENT (CObjectList +COMMENT #367=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.89201 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 24532116 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (800)" "@N (@S)" 5 15.313 +COMMENT -13.9386 0 -10 5.12016 0.924127 #367#) +COMMENT #369=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.38553 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 14431952 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1093)" "@N (@S)" 5 15.2871 +COMMENT -22.6503 0 -10 5.59471 0.924127 #369#)) +COMMENT (CObjectList)) +COMMENT #371=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil -1545 100) +COMMENT (CObjectList +COMMENT #372=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.91103 1.9 +COMMENT 0.082322 1) +COMMENT #373=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 26731748 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (789)" "@N (@S)" 5 14.4315 +COMMENT -12.1963 0 -10 3.94627 0.924127 #372#) +COMMENT #374=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.90842 1.9 +COMMENT 0.082322 1) +COMMENT #375=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 26665604 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1369)" "@N (@S)" 5 11.59 +COMMENT -24.3926 0 -10 4.42082 0.924127 #374#)) +COMMENT (CObjectList)) +COMMENT #376=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -767 100) +COMMENT (CObjectList +COMMENT #377=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.98969 1.9 +COMMENT 0.082322 1) +COMMENT #378=(CLabel (CWidget 0 (0 0) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.86308 +COMMENT 19.1656 0 -10 4.67059 0.924127 #377#) +COMMENT #379=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.93779 1.9 +COMMENT 0.082322 1) +COMMENT #380=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 3736112 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2509)" "@N (@S)" 5 -13.9825 +COMMENT -5.22699 0 -10 5.27002 0.924127 #379#)) +COMMENT (CObjectList)) +COMMENT #381=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil -1601 100) +COMMENT (CObjectList +COMMENT #382=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.45209 1.9 +COMMENT 0.082322 1) +COMMENT #383=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 26654080 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 11.4984 10.454 +COMMENT 0 -10 4.14608 0.924127 #382#) +COMMENT #384=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #239# 268747808 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.77186 1.9 +COMMENT 0.082322 1) +COMMENT #385=(CLabel (CWidget 0 (0 0) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1448)" "@N (@S)" 5 10.5003 +COMMENT -27.8773 0 -10 4.62063 0.924127 #384#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #386=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1993 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #387=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1947 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21474200 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2228..2866 + /vntifkey="33" + /label=ColE1 + terminator 2000..2104 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2925..3030) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3056..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3142..3163 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 657..804 + /vntifkey="21" + /label=core\riboswitch + mutation 803..803 + /vntifkey="62" + /label=orig\T + misc_feature 801..801 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 657..734 + /vntifkey="21" + /label=TPP\aptamer + CDS 782..1993 + /vntifkey="4" + /label=tetA* + misc_feature 608..635 + /vntifkey="21" + /label=Theo28\Aptamer +BASE COUNT 810 a 1001 c 944 g 874 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattctga taccagccga aaggcccttg gcagcagata gtgcttatgc ccatccgact + 661 cggggtgccc ttctgcgtga aggctgagaa atacccgtat cacctgatct ggataatgcc + 721 agcgtaggga agtcacggac caccaggtca ttgcttcttc acgttatggc aggagcaaac + 781 tatgcaagtc gacctgctgg atccaaaatc taacaatgcg ctcatcgtca tcctcggcac + 841 cgtcaccctg gatgctgtag gcataggctt ggttatgccg gtactgccgg gcctcttgcg + 901 ggatatcgtc cattccgaca gcatcgccag tcactatggc gtgctgctag cgctatatgc + 961 gttgatgcaa tttctatgcg cacccgttct cggagcactg tccgaccgct ttggccgccg + 1021 cccagtcctg ctcgcttcgc tacttggagc cactatcgac tacgcgatca tggcgaccac + 1081 acccgtcctg tggatcctct acgccggacg catcgtggcc ggcatcaccg gcgccacagg + 1141 tgcggttgct ggcgcctata tcgccgacat caccgatggg gaagatcggg ctcgccactt + 1201 cgggctcatg agcgcttgtt tcggcgtggg tatggtggca ggccccgtgg ccgggggact + 1261 gttgggcgcc atctccttgc atgcaccatt ccttgcggcg gcggtgctca acggcctcaa + 1321 cctactactg ggctgcttcc taatgcagga gtcgcataag ggagagcgtc gaccgatgcc + 1381 cttgagagcc ttcaacccag tcagctcctt ccggtgggcg cggggcatga ctatcgtcgc + 1441 cgcacttatg actgtcttct ttatcatgca actcgtagga caggtgccgg cagcgctctg + 1501 ggtcattttc ggcgaggacc gctttcgctg gagcgcgacg atgatcggcc tgtcgcttgc + 1561 ggtattcgga atcttgcacg ccctcgctca agccttcgtc actggtcccg ccaccaaacg + 1621 tttcggcgag aagcaggcca ttatcgccgg catggcggcc gacgcgctgg gctacgtctt + 1681 gctggcgttc gcgacgcgag gctggatggc cttccccatt atgattcttc tcgcttccgg + 1741 cggcatcggg atgcccgcgt tgcaggccat gctgtccagg caggtagatg acgaccatca + 1801 gggacagctt caaggatcgc tcgcggctct taccagccta acttcgatca ctggaccgct + 1861 gatcgtcacg gcgatttatg ccgcctcggc gagcacatgg aacgggttgg catggattgt + 1921 aggcgccgcc ctataccttg tctgcctccc cgcgttgcgt cgcggtgcat ggagccgggc + 1981 cacctcgacc taatctagag gcatcaaata aaacgaaagg ctcagtcgaa agactgggcc + 2041 tttcgtttta tctgttgttt gtcggtgaac gctctcctga gtaggacaaa tccgccgccc + 2101 tagacctagg cgttcggctg cggcgagcgg tatcagctca ctcaaaggcg gtaatacggt + 2161 tatccacaga atcaggggat aacgcaggaa agaacatgtg agcaaaaggc cagcaaaagg + 2221 ccaggaaccg taaaaaggcc gcgttgctgg cgtttttcca taggctccgc ccccctgacg + 2281 agcatcacaa aaatcgacgc tcaagtcaga ggtggcgaaa cccgacagga ctataaagat + 2341 accaggcgtt tccccctgga agctccctcg tgcgctctcc tgttccgacc ctgccgctta + 2401 ccggatacct gtccgccttt ctcccttcgg gaagcgtggc gctttctcaa tgctcacgct + 2461 gtaggtatct cagttcggtg taggtcgttc gctccaagct gggctgtgtg cacgaacccc + 2521 ccgttcagcc cgaccgctgc gccttatccg gtaactatcg tcttgagtcc aacccggtaa + 2581 gacacgactt atcgccactg gcagcagcca ctggtaacag gattagcaga gcgaggtatg + 2641 taggcggtgc tacagagttc ttgaagtggt ggcctaacta cggctacact agaaggacag + 2701 tatttggtat ctgcgctctg ctgaagccag ttaccttcgg aaaaagagtt ggtagctctt + 2761 gatccggcaa acaaaccacc gctggtagcg gtggtttttt tgtttgcaag cagcagatta + 2821 cgcgcagaaa aaaaggatct caagaagatc ctttgatctt ttctacgggg tctgacgctc + 2881 agtggaacga aaactcacgt taagggattt tggtcatgac tagtgcttgg attctcacca + 2941 ataaaaaacg cccggcggca accgagcgtt ctgaacaaat ccagatggag ttctgaggtc + 3001 attactggat ctatcaacag gagtccaagc gagctcaaac ttggtctgac agttaccaat + 3061 gcttaatcag tgaggcacct atctcagcga tctgtctatt tcgttcatcc atagttgcct + 3121 gactccccgt cgtgtagata actacgatac gggagggctt accatctggc cccagtgctg + 3181 caatgatacc gcgagaccca cgctcaccgg ctccagattt atcagcaata aaccagccag + 3241 ccggaagggc cgagcgcaga agtggtcctg caactttatc cgcctccatc cagtctatta + 3301 attgttgccg ggaagctaga gtaagtagtt cgccagttaa tagtttgcgc aacgttgttg + 3361 ccattgctac aggcatcgtg gtgtcacgct cgtcgtttgg tatggcttca ttcagctccg + 3421 gttcccaacg atcaaggcga gttacatgat cccccatgtt gtgcaaaaaa gcggttagct + 3481 ccttcggtcc tccgatcgtt gtcagaagta agttggccgc agtgttatca ctcatggtta + 3541 tggcagcact gcataattct cttactgtca tgccatccgt aagatgcttt tctgtgactg + 3601 gtgagtactc aaccaagtca ttctgagaa +// diff --git a/lib/VNTI files/pNAND1tetA.gb b/lib/VNTI files/pNAND1tetA.gb new file mode 100644 index 00000000..86eb1ad1 --- /dev/null +++ b/lib/VNTI files/pNAND1tetA.gb @@ -0,0 +1,1550 @@ +LOCUS pNAND1tetA 3628 bp DNA circular 7-NOV-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|462375297| +COMMENT VNTDBDATE|462378272| +COMMENT LSOWNER| +COMMENT VNTNAME|pNAND1tetA| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pNAND1tetA" 0 3628 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3628 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 799 0 1092 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1994 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 3035 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 788 0 1368 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 2105 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2508 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2194 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 950 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 946 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 3496 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 3187 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 4 333 0 438 0 1206 0 2914 +COMMENT 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 476 1 1447 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 2227 2865 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2220..2858") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1999 2103 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1992..2096") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2924 3029 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2917..3022)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 3055 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3048..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 3141 3162 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3134..3155") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "core riboswitch" 21 0 0 656 803 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "649..796") +COMMENT #43=(CFSignal (CObList) "orig T" 62 0 0 802 802 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "795..795") +COMMENT #44=(CFSignal (CObList) "orig G" 21 0 0 800 800 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "793..793") +COMMENT #45=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #46=(CFSignal (CObList) "TPP aptamer" 21 0 0 656 733 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "649..726") +COMMENT #47=(CFSignal (CObList) "tetA*" 4 0 0 781 1992 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "774..1985") +COMMENT #48=(CFSignal (CObList) "Theo28 Aptamer" 21 0 0 608 635 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "608..640")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #49=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #50=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pNAND1tetA" 2) 5 +COMMENT "" 0 4) +COMMENT #51=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pNAND1tetA'" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 11/07/07 01:34\214\337\214\343" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 11/07/07 02:24\214\337\214\343" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3628 bp" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 3-OCT-2007" 1))) +COMMENT "Standard Fields") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #64=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 781 (3 #47# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 781 End: 1992" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 774..1985" 1))) "tetA*") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3055 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3055 End: 284 (Complementary)" +COMMENT 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3048..284)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 608 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 608 End: 635 " 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 608..640" 1))) "Theo28 Aptamer") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 656 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 656 End: 803 " 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 649..796" 1))) "core riboswitch") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 656 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 656 End: 733 " 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 649..726" 1))) "TPP aptamer") +COMMENT #93=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 800 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 800 End: 800 " 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 793..793" 1))) "orig G") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3141 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3141 End: 3162" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3134..3155" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (6 total)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #107=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #129=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2227 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2227 End: 2865" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2220..2858" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1999 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1999 End: 2103" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1992..2096" 1))) "T1") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2924 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2924 End: 3029 (Complementary)" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2917..3022)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #150=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #151=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #155=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #160=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #166=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 802 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 802 End: 802 " 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 795..795" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #170=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25211848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #172=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3795560 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #175=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2194 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3793960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25214568 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2508 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25210160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2105 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25207600 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #186=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 799 " 1) +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1092 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3794360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 1447 (on complementary strand)" +COMMENT 1))))) "BbsI: 2 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25214648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3794440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3795640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 950 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3794120 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 3187 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3794280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 4 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25207520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25214808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25212248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25212408 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3793320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 946 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25214728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #212=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3794040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #213=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #214=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 3496 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #215=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25212168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #216=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #217=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 3035 " 1))))) "SacI: 1 site") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #218=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25211928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #219=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #220=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 788 " 1) +COMMENT #221=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1368 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3794200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #223=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25208880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #224=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25212328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #225=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #226=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1994 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #227=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3793400 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #228=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #229=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #230=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3795480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #231=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #232=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #233=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #234=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #235=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #236=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #237=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #238=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #239=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #240=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #241=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #242=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #243=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #244=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #245=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #246=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #247=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #248=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #249=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #250=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #251=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #252=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #253=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #254=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #255=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #256=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #257=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #258=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #259=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #260=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #261=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #262=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #263=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #264=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #265=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #266=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #267=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #268=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #269=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #270=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -253) 1 1 0 1 1 +COMMENT (mapper: 18.3931 -23.1885 40.0378 40.0378 0.01 10 -1 3628 3628 1 0 0) +COMMENT #271=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #272=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil 1358 100) +COMMENT (CObjectList +COMMENT #273=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 24864844 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27591 6.27391 1 0.0214037) 0.17291) +COMMENT #274=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #234# 26485868 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pNAND1tetA" "@N" 1 0 0.871165 0 +COMMENT -10 6.74363 1.44863 Nil) +COMMENT #275=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #233# 27423552 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3628 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #276=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #277=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -155 100) +COMMENT (CObjectList +COMMENT #278=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.78212 0.992505 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24832820 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.96842 12.1963 0 -10 2.7474 1.04901 #278#) +COMMENT #280=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #235# 3736056 +COMMENT 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.82881 4.92448 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 3736232 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tetA*" "@N" 1 +COMMENT 10.249 -26.1349 0 -10 2.29783 1.04901 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #283=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #240# 393233 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 0.843802 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 25155604 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.1137 8.71165 0 -10 4.0212 1.04901 #283#) +COMMENT #285=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.27031 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24866484 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.4136 -1.74233 0 -10 1.17389 1.04901 #285#) +COMMENT #287=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #236# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.88472 +COMMENT 5.14062 1 0.082322) 0.8 1.8 0) +COMMENT #288=(CLabel (CWidget 0 (0 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 15.2073 -10.454 0 +COMMENT -10 7.34306 1.04901 #287#) +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.89163 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 3736168 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 14.0484 -15.681 0 -10 2.94721 1.04901 #289#) +COMMENT #291=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #236# 24933180 +COMMENT 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 5.00575 5.14062 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 24632572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 14.2938 -8.71165 0 -10 5.86945 1.04901 +COMMENT #291#) +COMMENT #293=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.22362 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 25159780 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Theo28 Aptamer" +COMMENT "@N" 1 14.1084 -6.96932 0 -10 7.59282 1.04901 +COMMENT #293#)) (CObjectList)) +COMMENT #295=(CGroupWidget (CWidget 27 (7 27 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #240# 393233 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.38097 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel (CWidget 0 (0 0) 1 2 0 0 #232# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.1503 5.22699 0 -10 2.62252 1.04901 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget (CWidget 28 (7 28 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #253# 26922760 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.45532 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 10.7794 12.1963 0 -10 2.62252 1.04901 #299#) +COMMENT #301=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #253# 1114135 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.03803 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel (CWidget 0 (0 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.69618 20.908 0 -10 3.94627 1.04901 #301#) +COMMENT #303=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #253# 27093616 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.71123 1.9 +COMMENT 0.082322 1) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 9.21034 17.4233 0 -10 4.0212 1.04901 #303#)) +COMMENT (CObjectList)) +COMMENT #305=(CGroupWidget (CWidget 30 (7 30 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #306=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.61094 5.78212 1 0.082322) 0.8 1.8 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 3736120 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 8.82437 15.681 0 -10 2.7474 1.04901 #306#) +COMMENT #308=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.23399 5.41382 1 0.082322) 0.8 1.8 0) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 268742920 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.0582 1.74233 0 -10 2.69745 1.04901 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.27031 1.9 0.082322 +COMMENT 1) +COMMENT #312=(CLabel (CWidget 0 (0 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.5132 -3.48466 0 -10 2.14797 1.04901 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #314=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.31931 2.4242 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 191 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 -3.48466 0 -10 2.7474 1.04901 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1923 100) +COMMENT (CObjectList +COMMENT #317=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #240# 720906 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 2.63688 2.81844) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26983840 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -7.02234 -10.454 0 -10 1.17389 1.04901 #317#) +COMMENT #319=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 1.03573 +COMMENT 1.21902) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26433716 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -11.5658 5.22699 0 -10 1.17389 1.04901 #319#)) +COMMENT (CObjectList)) +COMMENT #321=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 5439490 100) +COMMENT (CObjectList +COMMENT #322=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.29105 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 3736192 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.6291 0 0 -10 1.49858 1.04901 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.33255 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel (CWidget 0 (0 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.2083 3.48466 0 -10 1.49858 1.04901 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.41728 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 3736152 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 12.6362 6.96932 0 -10 5.86945 1.04901 +COMMENT #328#) +COMMENT #330=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.88817 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel (CWidget 0 (0 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 14.0576 -17.4233 0 -10 2.7474 1.04901 #330#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #332=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 3735992 100) +COMMENT (CObjectList +COMMENT #333=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.82708 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel (CWidget 0 (0 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1994)" "@N (@S)" 5 -6.77051 +COMMENT -12.1963 0 -10 4.74552 0.924127 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.02709 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 24699108 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (3035)" "@N (@S)" 5 -12.8324 +COMMENT 6.96932 0 -10 4.67059 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.54869 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 3736280 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.0858 +COMMENT 13.9386 0 -10 4.34589 0.924127 #340#)) +COMMENT (CObjectList)) +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.63515 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 3736288 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (2105)" "@N (@S)" 5 -11.1236 +COMMENT -8.71165 0 -10 4.8704 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.23227 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 3736288 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 13.3438 +COMMENT -5.22699 0 -10 4.67059 0.924127 #346#)) +COMMENT (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.48126 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# -106 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2194)" "@N (@S)" 5 -12.4707 +COMMENT -6.96932 0 -10 4.82044 0.924127 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 3736016 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.63227 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 3736328 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (950)" "@N (@S)" 5 15.2321 +COMMENT -20.908 0 -10 4.27096 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.63918 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 3736328 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (946)" "@N (@S)" 5 15.1331 +COMMENT -19.1656 0 -10 4.27096 0.924127 #355#)) +COMMENT (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 24557884 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42592 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 393240 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 11.612 8.71165 +COMMENT 0 -10 4.19603 0.924127 #358#)) (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil 1063777500 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.229971 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 26476546 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (3496)" "@N (@S)" 5 -5.91138 +COMMENT 13.9386 0 -10 4.74552 0.924127 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 24866188 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.764263 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #241# 25029908 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (3187)" "@N (@S)" 5 -11.1487 +COMMENT 10.454 0 -10 4.62063 0.924127 #364#)) +COMMENT (CObjectList)) +COMMENT #366=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #367=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.89336 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 24557760 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (799)" "@N (@S)" 5 15.2143 +COMMENT -13.9386 0 -10 5.12016 0.924127 #367#) +COMMENT #369=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.38673 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 24619816 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1092)" "@N (@S)" 5 15.2918 +COMMENT -22.6503 0 -10 5.59471 0.924127 #369#)) +COMMENT (CObjectList)) +COMMENT #371=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #372=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.91238 1.9 +COMMENT 0.082322 1) +COMMENT #373=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 3736280 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (788)" "@N (@S)" 5 14.4544 +COMMENT -12.1963 0 -10 3.94627 0.924127 #372#) +COMMENT #374=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.9095 1.9 0.082322 +COMMENT 1) +COMMENT #375=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 24801340 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1368)" "@N (@S)" 5 11.6254 +COMMENT -24.3926 0 -10 4.42082 0.924127 #374#)) +COMMENT (CObjectList)) +COMMENT #376=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #377=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.98961 1.9 +COMMENT 0.082322 1) +COMMENT #378=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 3736048 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 6.86398 +COMMENT 19.1656 0 -10 4.67059 0.924127 #377#) +COMMENT #379=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.93832 1.9 +COMMENT 0.082322 1) +COMMENT #380=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 3736304 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2508)" "@N (@S)" 5 -13.9976 +COMMENT -5.22699 0 -10 5.27002 0.924127 #379#)) +COMMENT (CObjectList)) +COMMENT #381=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil 24966716 100) +COMMENT (CObjectList +COMMENT #382=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.45186 1.9 +COMMENT 0.082322 1) +COMMENT #383=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 1114122 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 11.5003 10.454 +COMMENT 0 -10 4.14608 0.924127 #382#) +COMMENT #384=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.7729 1.9 0.082322 +COMMENT 1) +COMMENT #385=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 25190272 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (1447)" "@N (@S)" 5 10.4668 +COMMENT -27.8773 0 -10 4.62063 0.924127 #384#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #386=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 24890804 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #387=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 25210940 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21273016 (CObList))) +FEATURES Location/Qualifiers + rep_origin 2227..2865 + /vntifkey="33" + /label=ColE1 + terminator 1999..2103 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2924..3029) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(3055..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 3141..3162 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + misc_feature 656..803 + /vntifkey="21" + /label=core\riboswitch + mutation 802..802 + /vntifkey="62" + /label=orig\T + misc_feature 800..800 + /vntifkey="21" + /label=orig\G + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 656..733 + /vntifkey="21" + /label=TPP\aptamer + CDS 781..1992 + /vntifkey="4" + /label=tetA* + misc_feature 608..635 + /vntifkey="21" + /label=Theo28\Aptamer +BASE COUNT 812 a 1000 c 944 g 872 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattctga taccagccga aaggcccttg gcagcggaac aatctttaaa cgcgcgactc + 661 ggggtgccct tctgcgtgaa ggctgagaaa tacccgtatc acctgatctg gataatgcca + 721 gcgtagggaa gtcacggacc accaggtcat tgcttcttca cgttatggca ggagcaaact + 781 atgcaagtcg acctgctgga tccaaaatct aacaatgcgc tcatcgtcat cctcggcacc + 841 gtcaccctgg atgctgtagg cataggcttg gttatgccgg tactgccggg cctcttgcgg + 901 gatatcgtcc attccgacag catcgccagt cactatggcg tgctgctagc gctatatgcg + 961 ttgatgcaat ttctatgcgc acccgttctc ggagcactgt ccgaccgctt tggccgccgc + 1021 ccagtcctgc tcgcttcgct acttggagcc actatcgact acgcgatcat ggcgaccaca + 1081 cccgtcctgt ggatcctcta cgccggacgc atcgtggccg gcatcaccgg cgccacaggt + 1141 gcggttgctg gcgcctatat cgccgacatc accgatgggg aagatcgggc tcgccacttc + 1201 gggctcatga gcgcttgttt cggcgtgggt atggtggcag gccccgtggc cgggggactg + 1261 ttgggcgcca tctccttgca tgcaccattc cttgcggcgg cggtgctcaa cggcctcaac + 1321 ctactactgg gctgcttcct aatgcaggag tcgcataagg gagagcgtcg accgatgccc + 1381 ttgagagcct tcaacccagt cagctccttc cggtgggcgc ggggcatgac tatcgtcgcc + 1441 gcacttatga ctgtcttctt tatcatgcaa ctcgtaggac aggtgccggc agcgctctgg + 1501 gtcattttcg gcgaggaccg ctttcgctgg agcgcgacga tgatcggcct gtcgcttgcg + 1561 gtattcggaa tcttgcacgc cctcgctcaa gccttcgtca ctggtcccgc caccaaacgt + 1621 ttcggcgaga agcaggccat tatcgccggc atggcggccg acgcgctggg ctacgtcttg + 1681 ctggcgttcg cgacgcgagg ctggatggcc ttccccatta tgattcttct cgcttccggc + 1741 ggcatcggga tgcccgcgtt gcaggccatg ctgtccaggc aggtagatga cgaccatcag + 1801 ggacagcttc aaggatcgct cgcggctctt accagcctaa cttcgatcac tggaccgctg + 1861 atcgtcacgg cgatttatgc cgcctcggcg agcacatgga acgggttggc atggattgta + 1921 ggcgccgccc tataccttgt ctgcctcccc gcgttgcgtc gcggtgcatg gagccgggcc + 1981 acctcgacct aatctagagg catcaaataa aacgaaaggc tcagtcgaaa gactgggcct + 2041 ttcgttttat ctgttgtttg tcggtgaacg ctctcctgag taggacaaat ccgccgccct + 2101 agacctaggc gttcggctgc ggcgagcggt atcagctcac tcaaaggcgg taatacggtt + 2161 atccacagaa tcaggggata acgcaggaaa gaacatgtga gcaaaaggcc agcaaaaggc + 2221 caggaaccgt aaaaaggccg cgttgctggc gtttttccat aggctccgcc cccctgacga + 2281 gcatcacaaa aatcgacgct caagtcagag gtggcgaaac ccgacaggac tataaagata + 2341 ccaggcgttt ccccctggaa gctccctcgt gcgctctcct gttccgaccc tgccgcttac + 2401 cggatacctg tccgcctttc tcccttcggg aagcgtggcg ctttctcaat gctcacgctg + 2461 taggtatctc agttcggtgt aggtcgttcg ctccaagctg ggctgtgtgc acgaaccccc + 2521 cgttcagccc gaccgctgcg ccttatccgg taactatcgt cttgagtcca acccggtaag + 2581 acacgactta tcgccactgg cagcagccac tggtaacagg attagcagag cgaggtatgt + 2641 aggcggtgct acagagttct tgaagtggtg gcctaactac ggctacacta gaaggacagt + 2701 atttggtatc tgcgctctgc tgaagccagt taccttcgga aaaagagttg gtagctcttg + 2761 atccggcaaa caaaccaccg ctggtagcgg tggttttttt gtttgcaagc agcagattac + 2821 gcgcagaaaa aaaggatctc aagaagatcc tttgatcttt tctacggggt ctgacgctca + 2881 gtggaacgaa aactcacgtt aagggatttt ggtcatgact agtgcttgga ttctcaccaa + 2941 taaaaaacgc ccggcggcaa ccgagcgttc tgaacaaatc cagatggagt tctgaggtca + 3001 ttactggatc tatcaacagg agtccaagcg agctcaaact tggtctgaca gttaccaatg + 3061 cttaatcagt gaggcaccta tctcagcgat ctgtctattt cgttcatcca tagttgcctg + 3121 actccccgtc gtgtagataa ctacgatacg ggagggctta ccatctggcc ccagtgctgc + 3181 aatgataccg cgagacccac gctcaccggc tccagattta tcagcaataa accagccagc + 3241 cggaagggcc gagcgcagaa gtggtcctgc aactttatcc gcctccatcc agtctattaa + 3301 ttgttgccgg gaagctagag taagtagttc gccagttaat agtttgcgca acgttgttgc + 3361 cattgctaca ggcatcgtgg tgtcacgctc gtcgtttggt atggcttcat tcagctccgg + 3421 ttcccaacga tcaaggcgag ttacatgatc ccccatgttg tgcaaaaaag cggttagctc + 3481 cttcggtcct ccgatcgttg tcagaagtaa gttggccgca gtgttatcac tcatggttat + 3541 ggcagcactg cataattctc ttactgtcat gccatccgta agatgctttt ctgtgactgg + 3601 tgagtactca accaagtcat tctgagaa +// diff --git a/lib/VNTI files/pNMS1-29 gfp-NheI.gb b/lib/VNTI files/pNMS1-29 gfp-NheI.gb new file mode 100644 index 00000000..7e7caf82 --- /dev/null +++ b/lib/VNTI files/pNMS1-29 gfp-NheI.gb @@ -0,0 +1,1745 @@ +LOCUS pNMS1-29\g 6135 bp DNA circular 5-OCT-2006 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|422724329| +COMMENT VNTDBDATE|423509558| +COMMENT LSOWNER| +COMMENT VNTNAME|pNMS1-29 gfp-NheI| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pNMS1-29 gfp-NheI" 0 6135 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "Courier New" 12 4294967295 0 0 +COMMENT 0 0 0 0 1 "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 6135 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 1230 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 2264 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 1624 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 4501 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 687 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 3 1417 0 3380 0 5542 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 1313 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 2063 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 4612 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 4444 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 1442 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 1440 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3785 0 3900 0 +COMMENT 5015 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 6 1032 0 2742 0 3522 0 +COMMENT 3947 0 4199 0 4701 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 1433 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 1429 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 2 491 0 1131 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 1563 0 2289 0 2769 0 +COMMENT 3222 0 6003 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 5694 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 5421 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2957 0 4209 1 0 +COMMENT "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4734 5372 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 4506 4610 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 5431 5536 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 5562 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 5648 5669 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "theo28" 21 0 0 606 632 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "122..148") +COMMENT #42=(CFSignal (CObList) "RBS" 32 0 0 695 706 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "158..169") +COMMENT #43=(CFSignal (CObList) "lacZ" 4 0 0 1437 4499 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "bgl-term" 43 0 0 636 685 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "lacZ-r" 27 0 1 1492 1512 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #48=(CFSignal (CObList) "lacZ-40" 27 0 1 1465 1482 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #49=(CFSignal (CObList) "M13 f" 27 0 1 1462 1481 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #50=(CFSignal (CObList) "gfpuv" 4 0 0 707 1426 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #51=(CFSignal (CObList) "lacZ-r2" 27 0 1 1587 1607 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #52=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #53=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pNMS1-29 gfp-NheI" 2) 5 "" 0 4) +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pNMS1-29 gfp-NheI'" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 09/28/06 03:25\214\337\214\343" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 10/05/06 05:32\214\337\214\343" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 6135 bp" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #65=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #67=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #70=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 707 (3 #50# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 707 End: 1426" 1))) "gfpuv") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1437 (3 #43# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1437 End: 4499" 1))) "lacZ") +COMMENT #75=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 5562 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 5562 End: 284 (Complementary)" +COMMENT 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (3 total)") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 606 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 606 End: 632 " 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 122..148" 1))) "theo28") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 5648 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 5648 End: 5669" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (3 total)") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1462 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1462 End: 1481 (Complementary)" +COMMENT 1))) "M13 f") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1465 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1465 End: 1482 (Complementary)" +COMMENT 1))) "lacZ-40") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1492 (3 #47# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1492 End: 1512 (Complementary)" +COMMENT 1))) "lacZ-r") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1587 (3 #51# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1587 End: 1607 (Complementary)" +COMMENT 1))) "lacZ-r2"))) "Primer (5 total)") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #118=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #122=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #127=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #131=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #132=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 695 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 695 End: 706 " 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 158..169" 1))) "RBS"))) +COMMENT "RBS (1 total)") +COMMENT #136=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #137=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4734 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4734 End: 5372" 1) +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #141=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #142=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 636 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 636 End: 685 " 1))) +COMMENT "bgl-term") +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4506 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4506 End: 4610" 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 5431 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 5431 End: 5536 (Complementary)" +COMMENT 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (3 total)") +COMMENT #154=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #157=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #162=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #163=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #168=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25172936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 2063 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25268960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 6 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25267040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25163672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25172856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #177=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 4612 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25163432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #180=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 1230 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25266320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 2957 " 1) +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 4209 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25163912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #188=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 1440 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25266400 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25268080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #192=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #193=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 1433 " 1))))) "BmtI: 1 site") +COMMENT 5 1 "GCTAGC" "CGATCG") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25266720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #195=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #196=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 5694 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25266560 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #198=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #199=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 5421 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25163352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #203=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #204=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 2264 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25165032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #206=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #207=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 4444 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25163112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 687 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25163272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #212=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 1624 " 1))))) "KpnI: 1 site") +COMMENT 5 1 "GGTACC" "CCATGG") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25268160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #215=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #216=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 1429 " 1))))) "NheI: 1 site") +COMMENT 1 5 "GCTAGC" "CGATCG") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25163992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #218=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #219=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 1442 " 1))))) "NsiI: 1 site") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #220=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25266640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #221=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25173576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #222=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #223=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1417 " 1) +COMMENT #224=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 3380 " 1) +COMMENT #225=(CLinePar +COMMENT (CParagraph 0 (1 #6# 3) 1 2 2 0 191) +COMMENT " N3: 5542 " 1))))) "SacI: 3 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #226=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25173496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #227=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #228=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 1313 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #229=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25266480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #230=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25163592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #231=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25163192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #232=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #233=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 4501 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #234=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25266960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #235=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #236=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1) +COMMENT #237=(CLinePar +COMMENT (CParagraph 0 (1 #19# 2) 1 2 2 0 191) +COMMENT " N2: 1131 " 1))))) "XhoI: 2 sites") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #238=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25268880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #239=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #240=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #241=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #242=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #243=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #244=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #245=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #246=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #247=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #248=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #249=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #250=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #251=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #252=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #253=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #254=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #255=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #256=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #257=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #258=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #259=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #260=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #261=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #262=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #263=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #264=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #265=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #266=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #267=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #268=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #269=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #270=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #271=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #272=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #273=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #274=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #275=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #276=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #277=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #278=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -260) 1 1 0 1 1 +COMMENT (mapper: 18.8378 -30.1569 40.0378 40.0378 0.01 10 -1 6135 6135 1 0 0) +COMMENT #279=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #280=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1201 100) +COMMENT (CObjectList +COMMENT #281=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #245# 26527516 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27521 6.27321 1 0.0214037) 0.102252) +COMMENT #282=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #242# 1944749780 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pNMS1-29 gfp-NheI" "@N" 1 0 +COMMENT 0.871165 0 -10 10.8398 1.44863 Nil) +COMMENT #283=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #241# 14431952 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "6135 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.24693 0.924127 Nil)) (CObjectList)) +COMMENT #284=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #285=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #286=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.98279 0.586929 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 393218 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -3.9744 15.681 0 -10 2.7474 1.04901 #286#) +COMMENT #288=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.67285 4.80484 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #289=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ" "@N" 1 +COMMENT 3.25132 -36.5889 0 -10 1.94816 1.04901 #288#) +COMMENT #290=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #50# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 4.81507 5.55128 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #291=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 12.2024 -6.96932 0 -10 2.82233 1.04901 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1201 100) +COMMENT (CObjectList +COMMENT #293=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.498992 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 26531856 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -8.17816 12.1963 0 -10 4.0212 1.04901 #293#) +COMMENT #295=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.65456 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 268634488 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "theo28" "@N" 1 +COMMENT 13.3696 0 0 -10 3.29688 1.04901 #295#) +COMMENT #297=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.68012 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 7995407 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.0951 3.48466 0 -10 1.17389 1.04901 #297#)) +COMMENT (CObjectList)) +COMMENT #299=(CGroupWidget (CWidget 27 (7 27 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #248# 26562904 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.74556 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 1649361704 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 7.94 10.454 0 -10 2.62252 1.04901 #300#) +COMMENT #302=(CScratch +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.7486 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 3736120 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ-r" "@N" 1 +COMMENT 14.3424 -26.1349 0 -10 2.69745 1.04901 #302#) +COMMENT #304=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #248# 7012367 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 4.77621 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 24907336 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ-40" "@N" 1 +COMMENT 14.6221 -24.3926 0 -10 3.34684 1.04901 #304#) +COMMENT #306=(CScratch +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.77928 1.9 +COMMENT 0.082322 1) +COMMENT #307=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "M13 f" "@N" 1 +COMMENT 14.2305 -22.6503 0 -10 2.62252 1.04901 #306#) +COMMENT #308=(CScratch +COMMENT (CWidget 0 (3 #51# 0) 1 2 0 0 #248# 21310960 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 4.65146 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 26529692 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ-r2" "@N" 1 +COMMENT 14.5682 -27.8773 0 -10 3.22196 1.04901 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1260 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #261# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.78953 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 733 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 7.91493 17.4233 0 -10 2.62252 1.04901 #311#) +COMMENT #313=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #261# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.13412 1.9 +COMMENT 0.082322 1) +COMMENT #314=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.61972 27.8773 0 -10 3.94627 1.04901 #313#) +COMMENT #315=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #261# 7143439 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.94086 1.9 +COMMENT 0.082322 1) +COMMENT #316=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 6.88232 26.1349 0 -10 4.0212 1.04901 #315#)) +COMMENT (CObjectList)) +COMMENT #317=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 393221 100) +COMMENT (CObjectList +COMMENT #318=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #256# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.88156 5.98279 1 0.082322) 0.8 1.8 1) +COMMENT #319=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 6.49521 22.6503 0 -10 2.7474 1.04901 #318#) +COMMENT #320=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #256# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.65865 5.76499 1 0.082322) 0.8 1.8 0) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 25065380 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 11.2684 6.96932 0 -10 2.69745 1.04901 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -2550 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #246# 327692 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1 5.68012 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.8317 1.74233 0 -10 2.14797 1.04901 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil 3735952 100) +COMMENT (CObjectList +COMMENT #326=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #260# 3736872 +COMMENT 100) (LOGPEN 0 6 16711680) 8 1 5.56355 1.9 +COMMENT 0.082322 1) +COMMENT #327=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 26836520 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "RBS" "@N" 1 +COMMENT 11.9151 -5.22699 0 -10 2.02309 1.04901 #326#)) +COMMENT (CObjectList)) +COMMENT #328=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -248 100) +COMMENT (CObjectList +COMMENT #329=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.780186 1.43358 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #330=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.2113 5.22699 0 -10 2.7474 1.04901 #329#)) +COMMENT (CObjectList)) +COMMENT #331=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList +COMMENT #332=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #248# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.55935 1.66671) +COMMENT #333=(CLabel (CWidget 0 (0 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.5159 0 0 -10 1.17389 1.04901 #332#) +COMMENT #334=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #248# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 0.612492 0.720879) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 24899420 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.25058 8.71165 0 -10 1.17389 1.04901 #334#) +COMMENT #336=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #248# 34 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.62388 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 3736072 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bgl-term" "@N" +COMMENT 1 13.5896 -1.74233 0 -10 4.0212 1.04901 #336#)) +COMMENT (CObjectList)) +COMMENT #338=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 3735992 100) +COMMENT (CObjectList +COMMENT #339=(CScratch +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #248# 880 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.69239 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# -139088221 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 11.6363 5.22699 0 -10 1.49858 1.04901 #339#)) +COMMENT (CObjectList)) +COMMENT #341=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #342=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #248# 327710 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.71693 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 21161492 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 9.36384 8.71165 0 -10 1.49858 1.04901 #342#)) +COMMENT (CObjectList)) +COMMENT #344=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3735984 100) +COMMENT (CObjectList +COMMENT #345=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #248# 26531856 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.76704 1.9 +COMMENT 0.082322 1) +COMMENT #346=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #240# 3736008 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 9.23761 12.1963 0 -10 5.86945 1.04901 +COMMENT #345#)) (CObjectList))) (CObjectList)) +COMMENT #347=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 554 100) +COMMENT (CObjectList +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #247# 1944749780 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.0165 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #249# 24674548 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (1230)" "@N (@S)" 5 14.8451 +COMMENT -10.454 0 -10 5.59471 0.924127 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -1573 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #247# 327725 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.95921 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #249# 26575984 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (2264)" "@N (@S)" 5 12.14 +COMMENT -33.1043 0 -10 4.47078 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.61363 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #249# 3736216 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (1624)" "@N (@S)" 5 15.4233 +COMMENT -29.6196 0 -10 4.69556 0.924127 #355#)) +COMMENT (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 32 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.67183 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel (CWidget 0 (0 0) 1 2 0 0 #249# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (4501)" "@N (@S)" 5 -14.2571 +COMMENT -1.74233 0 -10 4.74552 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -2411 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.57173 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #249# 3736232 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (687)" "@N (@S)" 5 14.1685 +COMMENT -3.48466 0 -10 5.07021 0.924127 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil 511 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.93163 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #249# 26593996 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (1313)" "@N (@S)" 5 14.5197 +COMMENT -12.1963 0 -10 4.34589 0.924127 #364#)) +COMMENT (CObjectList)) +COMMENT #366=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #367=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #247# 504 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.55833 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel (CWidget 0 (0 0) 1 2 0 0 #249# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (4612)" "@N (@S)" 5 -14.3869 +COMMENT 1.74233 0 -10 4.8704 0.924127 #367#)) +COMMENT (CObjectList)) +COMMENT #369=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #370=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #247# 131090 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.73011 1.9 +COMMENT 0.082322 1) +COMMENT #371=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #249# 25167724 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (4444)" "@N (@S)" 5 -14.4914 +COMMENT -3.48466 0 -10 5.19509 0.924127 #370#)) +COMMENT (CObjectList)) +COMMENT #372=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #373=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.79973 1.9 +COMMENT 0.082322 1) +COMMENT #374=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #249# 3736288 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (1442)" "@N (@S)" 5 15.2249 +COMMENT -20.908 0 -10 4.49575 0.924127 #373#)) +COMMENT (CObjectList)) +COMMENT #375=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #376=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.80177 1.9 +COMMENT 0.082322 1) +COMMENT #377=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #249# 3736288 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (1440)" "@N (@S)" 5 15.4658 +COMMENT -19.1656 0 -10 4.82044 0.924127 #376#)) +COMMENT (CObjectList)) +COMMENT #378=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #379=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.80893 1.9 +COMMENT 0.082322 1) +COMMENT #380=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #249# 3736288 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (1433)" "@N (@S)" 5 15.284 +COMMENT -17.4233 0 -10 4.74552 0.924127 #379#)) +COMMENT (CObjectList)) +COMMENT #381=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #382=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.81302 1.9 +COMMENT 0.082322 1) +COMMENT #383=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #249# 25037612 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (1429)" "@N (@S)" 5 15.1641 +COMMENT -15.681 0 -10 4.74552 0.924127 #382#)) +COMMENT (CObjectList)) +COMMENT #384=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #385=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.451956 1.9 +COMMENT 0.082322 1) +COMMENT #386=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #249# 3736328 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (5694)" "@N (@S)" 5 -8.39421 +COMMENT 13.9386 0 -10 4.67059 0.924127 #385#)) +COMMENT (CObjectList)) +COMMENT #387=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #388=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #247# 26839712 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.84475 1.9 +COMMENT 0.082322 1) +COMMENT #389=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 25118860 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 8.39626 +COMMENT 20.908 0 -10 4.34589 0.924127 #388#) +COMMENT #390=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.16474 1.9 +COMMENT 0.082322 1) +COMMENT #391=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 24803624 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (2063)" "@N (@S)" 5 13.8274 +COMMENT -31.3619 0 -10 4.8704 0.924127 #390#)) +COMMENT (CObjectList)) +COMMENT #392=(CGroupWidget +COMMENT (CWidget 2 (10 #19# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #393=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.77215 1.9 +COMMENT 0.082322 1) +COMMENT #394=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3736312 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 8.81214 +COMMENT 13.9386 0 -10 4.19603 0.924127 #393#) +COMMENT #395=(CScratch +COMMENT (CWidget 2 (1 #19# 2) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.11773 1.9 +COMMENT 0.082322 1) +COMMENT #396=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3736328 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (1131)" "@N (@S)" 5 13.7024 +COMMENT -8.71165 0 -10 4.59566 0.924127 #395#)) +COMMENT (CObjectList)) +COMMENT #397=(CGroupWidget +COMMENT (CWidget 3 (10 #6# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #398=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.82529 1.9 +COMMENT 0.082322 1) +COMMENT #399=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 25058676 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1417)" "@N (@S)" 5 14.8894 +COMMENT -13.9386 0 -10 4.5457 0.924127 #398#) +COMMENT #400=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #247# 3736424 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.81808 1.9 +COMMENT 0.082322 1) +COMMENT #401=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# -1260 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (3380)" "@N (@S)" 5 -6.8468 +COMMENT -12.1963 0 -10 4.67059 0.924127 #400#) +COMMENT #402=(CScratch +COMMENT (CWidget 3 (1 #6# 3) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.607379 1.9 +COMMENT 0.082322 1) +COMMENT #403=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3736328 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (5542)" "@N (@S)" 5 -9.69615 +COMMENT 10.454 0 -10 4.67059 0.924127 #402#)) +COMMENT (CObjectList)) +COMMENT #404=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #405=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.93371 1.9 +COMMENT 0.082322 1) +COMMENT #406=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 3736328 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 7.66863 +COMMENT 24.3926 0 -10 4.79547 0.924127 #405#) +COMMENT #407=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #247# 2 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.82634 1.9 +COMMENT 0.082322 1) +COMMENT #408=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 25060320 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 8.80317 +COMMENT 19.1656 0 -10 4.79547 0.924127 #407#) +COMMENT #409=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.731105 1.9 +COMMENT 0.082322 1) +COMMENT #410=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 327685 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (5421)" "@N (@S)" 5 -12.6536 +COMMENT 6.96932 0 -10 5.27002 0.924127 #409#)) +COMMENT (CObjectList)) +COMMENT #411=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #412=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.78749 1.9 +COMMENT 0.082322 1) +COMMENT #413=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 24732100 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 8.69255 15.681 +COMMENT 0 -10 4.14608 0.924127 #412#) +COMMENT #414=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.2506 1.9 0.082322 +COMMENT 1) +COMMENT #415=(CLabel (CWidget 0 (0 0) 1 2 0 0 #239# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (2957)" "@N (@S)" 5 4.75026 +COMMENT -34.8466 0 -10 4.67059 0.924127 #414#) +COMMENT #416=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.9704 1.9 0.082322 +COMMENT 1) +COMMENT #417=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #239# 393276 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (4209)" "@N (@S)" 5 -13.5315 +COMMENT -5.22699 0 -10 4.67059 0.924127 #416#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #418=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #419=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21271544 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4734..5372 + /vntifkey="33" + /label=ColE1 + terminator 4506..4610 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(5431..5536) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(5562..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 5648..5669 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 606..632 + /vntifkey="21" + /label=theo28 + RBS 695..706 + /vntifkey="32" + /label=RBS + CDS 1437..4499 + /vntifkey="4" + /label=lacZ + misc_feature 581..581 + /vntifkey="21" + /label=+1 + terminator 636..685 + /vntifkey="43" + /label=bgl-term + -10_signal 569..574 + /vntifkey="47" + /label=-10 + primer complement(1492..1512) + /vntifkey="27" + /label=lacZ-r + primer complement(1465..1482) + /vntifkey="27" + /label=lacZ-40 + primer complement(1462..1481) + /vntifkey="27" + /label=M13\f + CDS 707..1426 + /vntifkey="4" + /label=gfpuv + primer complement(1587..1607) + /vntifkey="27" + /label=lacZ-r2 +BASE COUNT 1519 a 1576 c 1592 g 1448 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaatgatac cagccgaaag gcccttggca gcgtcaaaac ctgacataac cagagaatac + 661 tggtgaagtc gggttttttt gttttaagct tatcaggaaa aaaaaaatgc agagtaaagg + 721 agaagaactt ttcactggag ttgtcccaat tcttgttgaa ttagatggtg atgttaatgg + 781 gcacaaattt tctgtcagtg gagagggtga aggtgatgca acatacggaa aacttaccct + 841 taaatttatt tgcactactg gaaaactacc tgttccatgg ccaacacttg tcactacttt + 901 ctcttatggt gttcaatgct tttcccgtta tccggatcat atgaaacggc atgacttttt + 961 caagagtgcc atgcccgaag gttatgtaca ggaacgcact atatctttca aagatgacgg + 1021 gaactacaag acgcgtgctg aagtcaagtt tgaaggtgat acccttgtta atcgtatcga + 1081 gttaaaaggt attgatttta aagaagatgg aaacattctc ggacacaaac tcgagtacaa + 1141 ctataactca cacaatgtat acatcacggc agacaaacaa aagaatggaa tcaaagctaa + 1201 cttcaaaatt cgccacaaca ttgaagatgg atccgttcaa ctagcagacc attatcaaca + 1261 aaatactcca attggcgatg gccctgtcct tttaccagac aaccattacc tgtcgacaca + 1321 atctgccctt tcgaaagatc ccaacgaaaa gcgtgaccac atggtccttc ttgagtttgt + 1381 aactgctgct gggattacac atggcatgga tgagctctac aaataaagct agcaaaatgc + 1441 atatagatcc cgtcgtttta caacgtcgtg actgggaaaa ccctggcgtt acccaactta + 1501 atcgccttgc agcacatccc cctttcgcca gctggcgtaa tagcgaagag gcccgcaccg + 1561 atcgcccttc ccaacagttg cgcagcctga atggcgaatg gcgctttgcc tggtttccgg + 1621 taccagaagc ggtgccggaa agctggctgg agtgcgatct tcctgaggcc gatactgtcg + 1681 tcgtcccctc aaactggcag atgcacggtt acgatgcgcc catctacacc aacgtaacct + 1741 atcccattac ggtcaatccg ccgtttgttc ccacggagaa tccgacgggt tgttactcgc + 1801 tcacatttaa tgttgatgaa agctggctac aggaaggcca gacgcgaatt atttttgatg + 1861 gcgttaactc ggcgtttcat ctgtggtgca acgggcgctg ggtcggttac ggccaggaca + 1921 gtcgtttgcc gtctgaattt gacctgagcg catttttacg cgccggagaa aaccgcctcg + 1981 cggtgatggt gctgcgttgg agtgacggca gttatctgga agatcaggat atgtggcgga + 2041 tgagcggcat tttccgtgac gtctcgttgc tgcataaacc gactacacaa atcagcgatt + 2101 tccatgttgc cactcgcttt aatgatgatt tcagccgcgc tgtactggag gctgaagttc + 2161 agatgtgcgg cgagttgcgt gactacctac gggtaacagt ttctttatgg cagggtgaaa + 2221 cgcaggtcgc cagcggcacc gcgcctttcg gcggtgaaat tatcgatgag cgtggtggtt + 2281 atgccgatcg cgtcacacta cgtctgaacg tcgaaaaccc gaaactgtgg agcgccgaaa + 2341 tcccgaatct ctatcgtgcg gtggttgaac tgcacaccgc cgacggcacg ctgattgaag + 2401 cagaagcctg cgatgtcggt ttccgcgagg tgcggattga aaatggtctg ctgctgctga + 2461 acggcaagcc gttgctgatt cgaggcgtta accgtcacga gcatcatcct ctgcatggtc + 2521 aggtcatgga tgagcagacg atggtgcagg atatcctgct gatgaagcag aacaacttta + 2581 acgccgtgcg ctgttcgcat tatccgaacc atccgctgtg gtacacgctg tgcgaccgct + 2641 acggcctgta tgtggtggat gaagccaata ttgaaaccca cggcatggtg ccaatgaatc + 2701 gtctgaccga tgatccgcgc tggctaccgg cgatgagcga acgcgtaacg cgaatggtgc + 2761 agcgcgatcg taatcacccg agtgtgatca tctggtcgct ggggaatgaa tcaggccacg + 2821 gcgctaatca cgacgcgctg tatcgctgga tcaaatctgt cgatccttcc cgcccggtgc + 2881 agtatgaagg cggcggagcc gacaccacgg ccaccgatat tatttgcccg atgtacgcgc + 2941 gcgtggatga agaccagccc ttcccggctg tgccgaaatg gtccatcaaa aaatggcttt + 3001 cgctacctgg agagacgcgc ccgctgatcc tttgcgaata cgcccacgcg atgggtaaca + 3061 gtcttggcgg tttcgctaaa tactggcagg cgtttcgtca gtatccccgt ttacagggcg + 3121 gcttcgtctg ggactgggtg gatcagtcgc tgattaaata tgatgaaaac ggcaacccgt + 3181 ggtcggctta cggcggtgat tttggcgata cgccgaacga tcgccagttc tgtatgaacg + 3241 gtctggtctt tgccgaccgc acgccgcatc cagcgctgac ggaagcaaaa caccagcagc + 3301 agtttttcca gttccgttta tccgggcaaa ccatcgaagt gaccagcgaa tacctgttcc + 3361 gtcatagcga taacgagctc ctgcactgga tggtggcgct ggatggtaag ccgctggcaa + 3421 gcggtgaagt gcctctggat gtcgctccac aaggtaaaca gttgattgaa ctgcctgaac + 3481 taccgcagcc ggagagcgcc gggcaactct ggctcacagt acgcgtagtg caaccgaacg + 3541 cgaccgcatg gtcagaagcc gggcacatca gcgcctggca gcagtggcgt ctggcggaaa + 3601 acctcagtgt gacgctcccc gccgcgtccc acgccatccc gcatctgacc accagcgaaa + 3661 tggatttttg catcgagctg ggtaataagc gttggcaatt taaccgccag tcaggctttc + 3721 tttcacagat gtggattggc gataaaaaac aactgctgac gccgctgcgc gatcagttca + 3781 cccgtgcacc gctggataac gacattggcg taagtgaagc gacccgcatt gaccctaacg + 3841 cctgggtcga acgctggaag gcggcgggcc attaccaggc cgaagcagcg ttgttgcagt + 3901 gcacggcaga tacacttgct gatgcggtgc tgattacgac cgctcacgcg tggcagcatc + 3961 aggggaaaac cttatttatc agccggaaaa cctaccggat tgatggtagt ggtcaaatgg + 4021 cgattaccgt tgatgttgaa gtggcgagcg atacaccgca tccggcgcgg attggcctga + 4081 actgccagct ggcgcaggta gcagagcggg taaactggct cggattaggg ccgcaagaaa + 4141 actatcccga ccgccttact gccgcctgtt ttgaccgctg ggatctgcca ttgtcagaca + 4201 tgtatacccc gtacgtcttc ccgagcgaaa acggtctgcg ctgcgggacg cgcgaattga + 4261 attatggccc acaccagtgg cgcggcgact tccagttcaa catcagccgc tacagtcaac + 4321 agcaactgat ggaaaccagc catcgccatc tgctgcacgc ggaagaaggc acatggctga + 4381 atatcgacgg tttccatatg gggattggtg gcgacgactc ctggagcccg tcagtatcgg + 4441 cggaattcca gctgagcgcc ggtcgctacc attaccagtt ggtctggtgt caaaaataat + 4501 ctagaggcat caaataaaac gaaaggctca gtcgaaagac tgggcctttc gttttatctg + 4561 ttgtttgtcg gtgaacgctc tcctgagtag gacaaatccg ccgccctaga cctaggcgtt + 4621 cggctgcggc gagcggtatc agctcactca aaggcggtaa tacggttatc cacagaatca + 4681 ggggataacg caggaaagaa catgtgagca aaaggccagc aaaaggccag gaaccgtaaa + 4741 aaggccgcgt tgctggcgtt tttccatagg ctccgccccc ctgacgagca tcacaaaaat + 4801 cgacgctcaa gtcagaggtg gcgaaacccg acaggactat aaagatacca ggcgtttccc + 4861 cctggaagct ccctcgtgcg ctctcctgtt ccgaccctgc cgcttaccgg atacctgtcc + 4921 gcctttctcc cttcgggaag cgtggcgctt tctcaatgct cacgctgtag gtatctcagt + 4981 tcggtgtagg tcgttcgctc caagctgggc tgtgtgcacg aaccccccgt tcagcccgac + 5041 cgctgcgcct tatccggtaa ctatcgtctt gagtccaacc cggtaagaca cgacttatcg + 5101 ccactggcag cagccactgg taacaggatt agcagagcga ggtatgtagg cggtgctaca + 5161 gagttcttga agtggtggcc taactacggc tacactagaa ggacagtatt tggtatctgc + 5221 gctctgctga agccagttac cttcggaaaa agagttggta gctcttgatc cggcaaacaa + 5281 accaccgctg gtagcggtgg tttttttgtt tgcaagcagc agattacgcg cagaaaaaaa + 5341 ggatctcaag aagatccttt gatcttttct acggggtctg acgctcagtg gaacgaaaac + 5401 tcacgttaag ggattttggt catgactagt gcttggattc tcaccaataa aaaacgcccg + 5461 gcggcaaccg agcgttctga acaaatccag atggagttct gaggtcatta ctggatctat + 5521 caacaggagt ccaagcgagc tcaaacttgg tctgacagtt accaatgctt aatcagtgag + 5581 gcacctatct cagcgatctg tctatttcgt tcatccatag ttgcctgact ccccgtcgtg + 5641 tagataacta cgatacggga gggcttacca tctggcccca gtgctgcaat gataccgcga + 5701 gacccacgct caccggctcc agatttatca gcaataaacc agccagccgg aagggccgag + 5761 cgcagaagtg gtcctgcaac tttatccgcc tccatccagt ctattaattg ttgccgggaa + 5821 gctagagtaa gtagttcgcc agttaatagt ttgcgcaacg ttgttgccat tgctacaggc + 5881 atcgtggtgt cacgctcgtc gtttggtatg gcttcattca gctccggttc ccaacgatca + 5941 aggcgagtta catgatcccc catgttgtgc aaaaaagcgg ttagctcctt cggtcctccg + 6001 atcgttgtca gaagtaagtt ggccgcagtg ttatcactca tggttatggc agcactgcat + 6061 aattctctta ctgtcatgcc atccgtaaga tgcttttctg tgactggtga gtactcaacc + 6121 aagtcattct gagaa +// diff --git a/lib/VNTI files/pNMS1-29.gb b/lib/VNTI files/pNMS1-29.gb new file mode 100644 index 00000000..2981773c --- /dev/null +++ b/lib/VNTI files/pNMS1-29.gb @@ -0,0 +1,1603 @@ +LOCUS pNMS1-29 5405 bp DNA circular 5-OCT-2006 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|422546439| +COMMENT VNTDBDATE|423509546| +COMMENT LSOWNER| +COMMENT VNTNAME|pNMS1-29| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pNMS1-29" 0 5405 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "Courier New" 12 4294967295 0 0 +COMMENT 0 0 0 0 1 "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5405 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1534 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 894 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3771 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 687 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2650 0 4812 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1333 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3882 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 3714 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 712 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 710 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3055 0 3170 0 +COMMENT 4285 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 2012 0 2792 0 3217 0 +COMMENT 3469 0 3971 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 833 0 1559 0 2039 0 2492 +COMMENT 0 5273 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 4964 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4691 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2227 0 3479 1 0 +COMMENT "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4004 4642 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 3776 3880 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 4701 4806 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 4832 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 4918 4939 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "8..111") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "27..47") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "55..60") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "91..111") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "6..7") +COMMENT #41=(CFSignal (CObList) "theo28" 21 0 0 606 632 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "122..148") +COMMENT #42=(CFSignal (CObList) "RBS" 32 0 0 695 706 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "158..169") +COMMENT #43=(CFSignal (CObList) "lacZ" 4 0 0 707 3769 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "bgl-term" 43 0 0 636 685 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #46=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #47=(CFSignal (CObList) "lacZ-r" 27 0 1 762 782 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #48=(CFSignal (CObList) "lacZ-40" 27 0 1 735 752 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #49=(CFSignal (CObList) "M13 f" 27 0 1 732 751 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #50=(CFSignal (CObList) "lacZ-r2" 27 0 1 857 877 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #51=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #52=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pNMS1-29" 2) 5 "" +COMMENT 0 4) +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pNMS1-29'" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 09/26/06 02:00\214\337\214\343" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 10/05/06 05:32\214\337\214\343" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5405 bp" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #66=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #70=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 707 (3 #43# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 707 End: 3769" 1))) "lacZ") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4832 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4832 End: 284 (Complementary)" +COMMENT 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1))) "+1") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 606 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 606 End: 632 " 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 122..148" 1))) "theo28") +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4918 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4918 End: 4939" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (3 total)") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #88=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 27..47" 1))) "PlacF") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 732 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 732 End: 751 (Complementary)" +COMMENT 1))) "M13 f") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 735 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 735 End: 752 (Complementary)" +COMMENT 1))) "lacZ-40") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 762 (3 #47# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 762 End: 782 (Complementary)" +COMMENT 1))) "lacZ-r") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 857 (3 #50# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 857 End: 877 (Complementary)" +COMMENT 1))) "lacZ-r2"))) "Primer (5 total)") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 8..111" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 91..111" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #128=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 695 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 695 End: 706 " 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 158..169" 1))) "RBS"))) +COMMENT "RBS (1 total)") +COMMENT #133=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #134=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4004 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4004 End: 4642" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 636 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 636 End: 685 " 1))) +COMMENT "bgl-term") +COMMENT #141=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3776 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3776 End: 3880" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #146=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4701 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4701 End: 4806 (Complementary)" +COMMENT 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (3 total)") +COMMENT #151=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #152=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #154=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 55..60" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #159=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 6..7" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #165=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25028832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 1333 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24992384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 5 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24992704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24876712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25028752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 3882 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25017072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BamHI: 0 sites") 1 5 "GGATCC" +COMMENT "CCTAGG") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24993104 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 2227 " 1) +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 3479 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24876792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 710 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24993184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24992464 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24992864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #188=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 4964 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24993024 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #193=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #194=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4691 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25016992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 1534 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25033808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 3714 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25011856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #202=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #203=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 687 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25020112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #205=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #206=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 894 " 1))))) "KpnI: 1 site") 5 +COMMENT 1 "GGTACC" "CCATGG") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24992544 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25033728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 712 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24992784 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #212=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25011776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #213=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #214=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2650 " 1) +COMMENT #215=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 4812 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #216=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25028912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 0 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #217=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24992944 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #218=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24876312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #219=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25020032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #220=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #221=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3771 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24992624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #223=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #224=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #225=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24992304 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #226=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #227=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #228=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #229=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #230=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #231=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #232=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #233=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #234=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #235=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #236=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #237=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #238=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #239=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #240=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #241=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #242=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #243=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #244=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #245=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #246=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #247=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #248=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #249=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #250=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #251=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #252=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #253=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #254=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #255=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #256=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #257=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #258=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #259=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #260=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #261=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #262=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #263=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #264=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #265=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -179) 1 1 0 1 1 +COMMENT (mapper: 18.6928 -30.1569 40.0378 40.0378 0.01 10 -1 5405 5405 1 0 0) +COMMENT #266=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #267=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1201 100) +COMMENT (CObjectList +COMMENT #268=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #232# 26540164 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27535 6.27335 1 0.0214037) 0.116063) +COMMENT #269=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #229# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pNMS1-29" "@N" 1 0 0.871165 0 +COMMENT -10 5.66964 1.44863 Nil) +COMMENT #270=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #228# 24792340 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5405 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #271=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #272=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -600 100) +COMMENT (CObjectList +COMMENT #273=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.94357 0.6662 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #274=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# -1260 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.2114 15.681 0 -10 2.7474 1.04901 #273#) +COMMENT #275=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.89878 5.45378 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 26256188 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ" "@N" 1 +COMMENT 8.17218 -24.3926 0 -10 1.94816 1.04901 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.566386 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 393219 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -8.8733 12.1963 0 -10 4.0212 1.04901 #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.57101 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel (CWidget 0 (0 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "theo28" "@N" 1 +COMMENT 13.3696 0 0 -10 3.29688 1.04901 #280#) +COMMENT #282=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.60002 1.9 +COMMENT 0.082322 1) +COMMENT #283=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 1114134 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.0951 3.48466 0 -10 1.17389 1.04901 #282#)) +COMMENT (CObjectList)) +COMMENT #284=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 3735976 100) +COMMENT (CObjectList +COMMENT #285=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.6743 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel (CWidget 0 (0 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 8.65683 10.454 0 -10 2.62252 1.04901 #285#) +COMMENT #287=(CScratch +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #235# 3735976 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.38995 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 24932288 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ-r" "@N" 1 +COMMENT 11.4055 -13.9386 0 -10 2.69745 1.04901 #287#) +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #235# 3 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.42129 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 20930212 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ-40" "@N" 1 +COMMENT 11.3549 -12.1963 0 -10 3.34684 1.04901 #289#) +COMMENT #291=(CScratch +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.42477 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel (CWidget 0 (0 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "M13 f" "@N" 1 +COMMENT 10.8184 -10.454 0 -10 2.62252 1.04901 #291#) +COMMENT #293=(CScratch +COMMENT (CWidget 0 (3 #50# 0) 1 2 0 0 #235# 26641944 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.27969 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ-r2" "@N" 1 +COMMENT 12.5037 -15.681 0 -10 3.22196 1.04901 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -2132 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #248# 26835992 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.72421 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 393219 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 8.59122 17.4233 0 -10 2.62252 1.04901 #296#) +COMMENT #298=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #248# 26837188 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.11534 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel (CWidget 0 (0 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.84183 27.8773 0 -10 3.94627 1.04901 #298#) +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #248# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.89598 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 26542396 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.38443 26.1349 0 -10 4.0212 1.04901 #300#)) +COMMENT (CObjectList)) +COMMENT #302=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1201 100) +COMMENT (CObjectList +COMMENT #303=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.82867 5.94357 1 0.082322) 0.8 1.8 1) +COMMENT #304=(CLabel (CWidget 0 (0 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 7.00859 22.6503 0 -10 2.7474 1.04901 #303#) +COMMENT #305=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.57565 5.69635 1 0.082322) 0.8 1.8 0) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 26785972 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 11.2684 6.96932 0 -10 2.69745 1.04901 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.60002 1.9 0.082322 +COMMENT 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 20929804 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.8317 1.74233 0 -10 2.14797 1.04901 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 5.46771 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 24500772 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "RBS" "@N" 1 +COMMENT 11.9151 -5.22699 0 -10 2.02309 1.04901 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #314=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.885558 1.6272 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #315=(CLabel (CWidget 0 (0 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.7833 3.48466 0 -10 2.7474 1.04901 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #317=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #235# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.76996 1.89182) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 191 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.4136 -1.74233 0 -10 1.17389 1.04901 #317#) +COMMENT #319=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #235# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 0.695215 0.818242) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.2551 8.71165 0 -10 1.17389 1.04901 #319#) +COMMENT #321=(CLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #235# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 5.47816 5.53619) +COMMENT #322=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 3736224 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bgl-term" "@N" +COMMENT 1 13.5896 -1.74233 0 -10 4.0212 1.04901 #321#)) +COMMENT (CObjectList)) +COMMENT #323=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -2271 100) +COMMENT (CObjectList +COMMENT #324=(CScratch +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #235# 2 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.61395 1.9 +COMMENT 0.082322 1) +COMMENT #325=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 26559612 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 11.6363 5.22699 0 -10 1.49858 1.04901 #324#)) +COMMENT (CObjectList)) +COMMENT #326=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 393222 100) +COMMENT (CObjectList +COMMENT #327=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #235# 2426008 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.6418 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 26790348 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 9.36384 8.71165 0 -10 1.49858 1.04901 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #235# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.69868 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 393233 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 9.93527 12.1963 0 -10 5.86945 1.04901 +COMMENT #330#)) (CObjectList))) (CObjectList)) +COMMENT #332=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #333=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #234# 131086 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.49395 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26350548 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (1534)" "@N (@S)" 5 14.986 +COMMENT -20.908 0 -10 4.42082 0.924127 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #234# 26838728 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.23675 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 1114122 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (894)" "@N (@S)" 5 13.574 +COMMENT -17.4233 0 -10 4.22101 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #234# 26840728 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.89762 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26805652 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3771)" "@N (@S)" 5 -13.8026 +COMMENT -3.48466 0 -10 4.74552 0.924127 #340#)) +COMMENT (CObjectList)) +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #234# 3736024 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.477 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 26805876 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (687)" "@N (@S)" 5 14.1685 +COMMENT -3.48466 0 -10 5.07021 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #234# 131090 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.76879 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 24431500 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (3882)" "@N (@S)" 5 -14.4585 0 0 +COMMENT -10 4.94533 0.924127 #346#)) (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #234# 504 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.96378 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 1114129 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (3714)" "@N (@S)" 5 -13.7712 +COMMENT -5.22699 0 -10 5.14514 0.924127 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #234# 26844712 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.44798 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 24601808 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (712)" "@N (@S)" 5 11.2714 +COMMENT -8.71165 0 -10 3.94627 0.924127 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #234# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.4503 1.9 0.082322 +COMMENT 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 24601904 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (710)" "@N (@S)" 5 12.2616 +COMMENT -6.96932 0 -10 4.29594 0.924127 #355#)) +COMMENT (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #234# 26843328 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.70448 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 24750764 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 9.50505 +COMMENT 13.9386 0 -10 4.19603 0.924127 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #234# 26843332 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.512997 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #236# 2228258 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (4964)" "@N (@S)" 5 -9.04168 +COMMENT 13.9386 0 -10 4.67059 0.924127 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #234# 3736424 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.19869 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# -2205 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2650)" "@N (@S)" 5 4.11201 +COMMENT -26.1349 0 -10 4.67059 0.924127 #364#) +COMMENT #366=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #234# 26839712 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.689412 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 6751096 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (4812)" "@N (@S)" 5 -10.4528 +COMMENT 10.454 0 -10 4.62063 0.924127 #366#)) +COMMENT (CObjectList)) +COMMENT #368=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #369=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #234# 3736040 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.78688 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 26637904 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 9.01483 +COMMENT 20.908 0 -10 4.34589 0.924127 #369#) +COMMENT #371=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #234# 3736072 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.72723 1.9 +COMMENT 0.082322 1) +COMMENT #372=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 26567644 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (1333)" "@N (@S)" 5 15.4165 +COMMENT -19.1656 0 -10 4.79547 0.924127 #371#)) +COMMENT (CObjectList)) +COMMENT #373=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList +COMMENT #374=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #234# 3735960 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.88786 1.9 +COMMENT 0.082322 1) +COMMENT #375=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 24630732 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 8.18003 +COMMENT 24.3926 0 -10 4.79547 0.924127 #374#) +COMMENT #376=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #234# 131082 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.76599 1.9 +COMMENT 0.082322 1) +COMMENT #377=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 2228260 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 9.44179 +COMMENT 19.1656 0 -10 4.79547 0.924127 #376#) +COMMENT #378=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #234# 26842540 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.829848 1.9 +COMMENT 0.082322 1) +COMMENT #379=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 3736472 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4691)" "@N (@S)" 5 -12.6536 +COMMENT 6.96932 0 -10 5.27002 0.924127 #378#)) +COMMENT (CObjectList)) +COMMENT #380=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil 12583167 100) +COMMENT (CObjectList +COMMENT #381=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #234# 26845072 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.72189 1.9 +COMMENT 0.082322 1) +COMMENT #382=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 24888480 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 9.37083 15.681 +COMMENT 0 -10 4.14608 0.924127 #381#) +COMMENT #383=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #234# 268634488 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.68963 1.9 +COMMENT 0.082322 1) +COMMENT #384=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 25030372 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (2227)" "@N (@S)" 5 9.65358 +COMMENT -22.6503 0 -10 4.67059 0.924127 #383#) +COMMENT #385=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #234# 3735944 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.23653 1.9 +COMMENT 0.082322 1) +COMMENT #386=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 2228264 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3479)" "@N (@S)" 5 -12.3313 +COMMENT -6.96932 0 -10 4.67059 0.924127 #385#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #387=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3736008 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #388=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3735968 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21201608 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4004..4642 + /vntifkey="33" + /label=ColE1 + terminator 3776..3880 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4701..4806) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4832..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 4918..4939 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 606..632 + /vntifkey="21" + /label=theo28 + RBS 695..706 + /vntifkey="32" + /label=RBS + CDS 707..3769 + /vntifkey="4" + /label=lacZ + misc_feature 581..581 + /vntifkey="21" + /label=+1 + terminator 636..685 + /vntifkey="43" + /label=bgl-term + -10_signal 569..574 + /vntifkey="47" + /label=-10 + primer complement(762..782) + /vntifkey="27" + /label=lacZ-r + primer complement(735..752) + /vntifkey="27" + /label=lacZ-40 + primer complement(732..751) + /vntifkey="27" + /label=M13\f + primer complement(857..877) + /vntifkey="27" + /label=lacZ-r2 +BASE COUNT 1284 a 1422 c 1446 g 1253 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaatgatac cagccgaaag gcccttggca gcgtcaaaac ctgacataac cagagaatac + 661 tggtgaagtc gggttttttt gttttaagct tatcaggaaa aaaaaaatgc atatagatcc + 721 cgtcgtttta caacgtcgtg actgggaaaa ccctggcgtt acccaactta atcgccttgc + 781 agcacatccc cctttcgcca gctggcgtaa tagcgaagag gcccgcaccg atcgcccttc + 841 ccaacagttg cgcagcctga atggcgaatg gcgctttgcc tggtttccgg taccagaagc + 901 ggtgccggaa agctggctgg agtgcgatct tcctgaggcc gatactgtcg tcgtcccctc + 961 aaactggcag atgcacggtt acgatgcgcc catctacacc aacgtaacct atcccattac + 1021 ggtcaatccg ccgtttgttc ccacggagaa tccgacgggt tgttactcgc tcacatttaa + 1081 tgttgatgaa agctggctac aggaaggcca gacgcgaatt atttttgatg gcgttaactc + 1141 ggcgtttcat ctgtggtgca acgggcgctg ggtcggttac ggccaggaca gtcgtttgcc + 1201 gtctgaattt gacctgagcg catttttacg cgccggagaa aaccgcctcg cggtgatggt + 1261 gctgcgttgg agtgacggca gttatctgga agatcaggat atgtggcgga tgagcggcat + 1321 tttccgtgac gtctcgttgc tgcataaacc gactacacaa atcagcgatt tccatgttgc + 1381 cactcgcttt aatgatgatt tcagccgcgc tgtactggag gctgaagttc agatgtgcgg + 1441 cgagttgcgt gactacctac gggtaacagt ttctttatgg cagggtgaaa cgcaggtcgc + 1501 cagcggcacc gcgcctttcg gcggtgaaat tatcgatgag cgtggtggtt atgccgatcg + 1561 cgtcacacta cgtctgaacg tcgaaaaccc gaaactgtgg agcgccgaaa tcccgaatct + 1621 ctatcgtgcg gtggttgaac tgcacaccgc cgacggcacg ctgattgaag cagaagcctg + 1681 cgatgtcggt ttccgcgagg tgcggattga aaatggtctg ctgctgctga acggcaagcc + 1741 gttgctgatt cgaggcgtta accgtcacga gcatcatcct ctgcatggtc aggtcatgga + 1801 tgagcagacg atggtgcagg atatcctgct gatgaagcag aacaacttta acgccgtgcg + 1861 ctgttcgcat tatccgaacc atccgctgtg gtacacgctg tgcgaccgct acggcctgta + 1921 tgtggtggat gaagccaata ttgaaaccca cggcatggtg ccaatgaatc gtctgaccga + 1981 tgatccgcgc tggctaccgg cgatgagcga acgcgtaacg cgaatggtgc agcgcgatcg + 2041 taatcacccg agtgtgatca tctggtcgct ggggaatgaa tcaggccacg gcgctaatca + 2101 cgacgcgctg tatcgctgga tcaaatctgt cgatccttcc cgcccggtgc agtatgaagg + 2161 cggcggagcc gacaccacgg ccaccgatat tatttgcccg atgtacgcgc gcgtggatga + 2221 agaccagccc ttcccggctg tgccgaaatg gtccatcaaa aaatggcttt cgctacctgg + 2281 agagacgcgc ccgctgatcc tttgcgaata cgcccacgcg atgggtaaca gtcttggcgg + 2341 tttcgctaaa tactggcagg cgtttcgtca gtatccccgt ttacagggcg gcttcgtctg + 2401 ggactgggtg gatcagtcgc tgattaaata tgatgaaaac ggcaacccgt ggtcggctta + 2461 cggcggtgat tttggcgata cgccgaacga tcgccagttc tgtatgaacg gtctggtctt + 2521 tgccgaccgc acgccgcatc cagcgctgac ggaagcaaaa caccagcagc agtttttcca + 2581 gttccgttta tccgggcaaa ccatcgaagt gaccagcgaa tacctgttcc gtcatagcga + 2641 taacgagctc ctgcactgga tggtggcgct ggatggtaag ccgctggcaa gcggtgaagt + 2701 gcctctggat gtcgctccac aaggtaaaca gttgattgaa ctgcctgaac taccgcagcc + 2761 ggagagcgcc gggcaactct ggctcacagt acgcgtagtg caaccgaacg cgaccgcatg + 2821 gtcagaagcc gggcacatca gcgcctggca gcagtggcgt ctggcggaaa acctcagtgt + 2881 gacgctcccc gccgcgtccc acgccatccc gcatctgacc accagcgaaa tggatttttg + 2941 catcgagctg ggtaataagc gttggcaatt taaccgccag tcaggctttc tttcacagat + 3001 gtggattggc gataaaaaac aactgctgac gccgctgcgc gatcagttca cccgtgcacc + 3061 gctggataac gacattggcg taagtgaagc gacccgcatt gaccctaacg cctgggtcga + 3121 acgctggaag gcggcgggcc attaccaggc cgaagcagcg ttgttgcagt gcacggcaga + 3181 tacacttgct gatgcggtgc tgattacgac cgctcacgcg tggcagcatc aggggaaaac + 3241 cttatttatc agccggaaaa cctaccggat tgatggtagt ggtcaaatgg cgattaccgt + 3301 tgatgttgaa gtggcgagcg atacaccgca tccggcgcgg attggcctga actgccagct + 3361 ggcgcaggta gcagagcggg taaactggct cggattaggg ccgcaagaaa actatcccga + 3421 ccgccttact gccgcctgtt ttgaccgctg ggatctgcca ttgtcagaca tgtatacccc + 3481 gtacgtcttc ccgagcgaaa acggtctgcg ctgcgggacg cgcgaattga attatggccc + 3541 acaccagtgg cgcggcgact tccagttcaa catcagccgc tacagtcaac agcaactgat + 3601 ggaaaccagc catcgccatc tgctgcacgc ggaagaaggc acatggctga atatcgacgg + 3661 tttccatatg gggattggtg gcgacgactc ctggagcccg tcagtatcgg cggaattcca + 3721 gctgagcgcc ggtcgctacc attaccagtt ggtctggtgt caaaaataat ctagaggcat + 3781 caaataaaac gaaaggctca gtcgaaagac tgggcctttc gttttatctg ttgtttgtcg + 3841 gtgaacgctc tcctgagtag gacaaatccg ccgccctaga cctaggcgtt cggctgcggc + 3901 gagcggtatc agctcactca aaggcggtaa tacggttatc cacagaatca ggggataacg + 3961 caggaaagaa catgtgagca aaaggccagc aaaaggccag gaaccgtaaa aaggccgcgt + 4021 tgctggcgtt tttccatagg ctccgccccc ctgacgagca tcacaaaaat cgacgctcaa + 4081 gtcagaggtg gcgaaacccg acaggactat aaagatacca ggcgtttccc cctggaagct + 4141 ccctcgtgcg ctctcctgtt ccgaccctgc cgcttaccgg atacctgtcc gcctttctcc + 4201 cttcgggaag cgtggcgctt tctcaatgct cacgctgtag gtatctcagt tcggtgtagg + 4261 tcgttcgctc caagctgggc tgtgtgcacg aaccccccgt tcagcccgac cgctgcgcct + 4321 tatccggtaa ctatcgtctt gagtccaacc cggtaagaca cgacttatcg ccactggcag + 4381 cagccactgg taacaggatt agcagagcga ggtatgtagg cggtgctaca gagttcttga + 4441 agtggtggcc taactacggc tacactagaa ggacagtatt tggtatctgc gctctgctga + 4501 agccagttac cttcggaaaa agagttggta gctcttgatc cggcaaacaa accaccgctg + 4561 gtagcggtgg tttttttgtt tgcaagcagc agattacgcg cagaaaaaaa ggatctcaag + 4621 aagatccttt gatcttttct acggggtctg acgctcagtg gaacgaaaac tcacgttaag + 4681 ggattttggt catgactagt gcttggattc tcaccaataa aaaacgcccg gcggcaaccg + 4741 agcgttctga acaaatccag atggagttct gaggtcatta ctggatctat caacaggagt + 4801 ccaagcgagc tcaaacttgg tctgacagtt accaatgctt aatcagtgag gcacctatct + 4861 cagcgatctg tctatttcgt tcatccatag ttgcctgact ccccgtcgtg tagataacta + 4921 cgatacggga gggcttacca tctggcccca gtgctgcaat gataccgcga gacccacgct + 4981 caccggctcc agatttatca gcaataaacc agccagccgg aagggccgag cgcagaagtg + 5041 gtcctgcaac tttatccgcc tccatccagt ctattaattg ttgccgggaa gctagagtaa + 5101 gtagttcgcc agttaatagt ttgcgcaacg ttgttgccat tgctacaggc atcgtggtgt + 5161 cacgctcgtc gtttggtatg gcttcattca gctccggttc ccaacgatca aggcgagtta + 5221 catgatcccc catgttgtgc aaaaaagcgg ttagctcctt cggtcctccg atcgttgtca + 5281 gaagtaagtt ggccgcagtg ttatcactca tggttatggc agcactgcat aattctctta + 5341 ctgtcatgcc atccgtaaga tgcttttctg tgactggtga gtactcaacc aagtcattct + 5401 gagaa +// diff --git a/lib/VNTI files/pPantACIT1.gb b/lib/VNTI files/pPantACIT1.gb new file mode 100644 index 00000000..e13449ef --- /dev/null +++ b/lib/VNTI files/pPantACIT1.gb @@ -0,0 +1,1169 @@ +LOCUS pPantACIT1 2969 bp DNA circular SYN 28-JAN-2004 +DEFINITION p15A low copy expression vector based on pK184/pK184.1. Weaker rbs and KpnI site for cloning. T1 terminator added to pK184.2. +ACCESSION U00800 +VERSION U00800.1 GI:392879 +SOURCE Cloning vector Pk184. + ORGANISM Cloning vector Pk184 + artificial sequences; vectors. +REFERENCE 1 (bases 1 to 2432) + AUTHORS Jobling,M.G. and Holmes,R.K. + TITLE Construction of vectors with the p15a replicon, kanamycin + resistance, inducible lacZ alpha and pUC18 or pUC19 multiple + cloning sites + JOURNAL Nucleic Acids Res. 18 (17), 5315-5316 (1990) + MEDLINE 90384866 +REFERENCE 2 (bases 1 to 2432) + AUTHORS Jobling,M.G. + TITLE Direct Submission + JOURNAL Submitted (16-AUG-1993) Jobling M. G., Uniformed Services + University of the Health Sciences, Microbiology, 4301 Jones Bridge + Road, Bethesda, MD 20814-4799, USA +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|328702898| +COMMENT VNTDBDATE|328702898| +COMMENT LSOWNER| +COMMENT VNTNAME|pPantACIT1| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pPantACIT1" 0 2969 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 2969 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 2965 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 2727 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 107 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 2421 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 2419 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 175 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 123 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 119 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 2180 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 0 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 3 949 1 1159 1 2085 1 0 +COMMENT "") #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 1 2225 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 1 441 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "CDS(kan)_2" 4 0 0 476 1270 0 (CStringList) +COMMENT (CStringList "/gene=\"kan\"" "/function=\"kanamycin resistance\"" +COMMENT "/codon_start=1" "/transl_table=11" +COMMENT "/product=\"kanamycin phosphotransferase\"" +COMMENT "/protein_id=\"AAC43251.1\"" "/db_xref=\"GI:392880\"") 1 1 1 1 +COMMENT "365..1159") +COMMENT #28=(CFSignal (CObList) "oriV" 33 0 0 1970 1972 0 (CStringList) +COMMENT (CStringList "/standard_name=\"oriV\"") 1 1 1 1 "1861..1863") +COMMENT #29=(CFSignal (CObList) "T1" 43 0 0 1 105 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "") +COMMENT #30=(CFSignal (CObList) "cI857s7" 4 0 0 2250 2963 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #31=(CFSignal (CObList) "rbsA" 32 0 0 2237 2249 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #32=(CFSignal (CObList) "P(ANT)" 30 0 0 2185 2223 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #33=(CFSignal (CObList) "-35" 48 0 0 2185 2190 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #34=(CFSignal (CObList) "arcO" 20 0 0 2190 2210 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #35=(CFSignal (CObList) "-10" 47 0 0 2208 2213 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #36=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #37=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pPantACIT1" 2) 5 +COMMENT "" 0 4) +COMMENT #38=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #39=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pPantACIT1'" 1) +COMMENT #40=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "p15A low copy expression vector based on pK184/pK184.1. Weaker rbs and KpnI site for cloning. T1 terminator added to pK184.2" +COMMENT 1) +COMMENT #41=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 01/28/04 10:21\214\337\221O" 1) +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 01/28/04 10:21\214\337\221O" 1) +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 2969 bp" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #47=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 6-MAR-2003" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): U00800" +COMMENT 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: U00800.1 GI:392879" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Cloning vector Pk184." 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Cloning vector Pk184(Cloning vector Pk184)" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: artificial sequences; vectors" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Associated Genes: lacZalpha; kan" 1))) +COMMENT "Standard Fields") +COMMENT #57=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 2432)" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Jobling,M.G. and Holmes,R.K." 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Construction of vectors with the p15a replicon, kanamycin" +COMMENT 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " resistance, inducible lacZ alpha and pUC18 or pUC19 multiple" +COMMENT 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " cloning sites" 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nucleic Acids Res. 18 (17), 5315-5316 (1990)" +COMMENT 1) +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " MEDLINE 90384866" +COMMENT 1) +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 2432)" 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Jobling,M.G." 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (16-AUG-1993) Jobling M. G., Uniformed Services" +COMMENT 1) +COMMENT #69=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " University of the Health Sciences, Microbiology, 4301 Jones Bridge" +COMMENT 1) +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Road, Bethesda, MD 20814-4799, USA" 1))) +COMMENT "References") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #72=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #73=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #74=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #75=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #76=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 476 (3 #27# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 476 End: 1270" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 365..1159" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"kan\"" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /function=\"kanamycin resistance\"" +COMMENT 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"kanamycin phosphotransferase\"" +COMMENT 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=AAC43251.1" +COMMENT 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:392880" +COMMENT 1))) "CDS(kan)_2") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2250 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2250 End: 2963" 1))) "cI857s7"))) +COMMENT "CDS (2 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 20 (7 20 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2190 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2190 End: 2210" 1))) "arcO"))) +COMMENT "Misc. Binding Site (1 total)") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2185 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2185 End: 2223" 1))) "P(ANT)"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #98=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2237 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2237 End: 2249" 1))) "rbsA"))) +COMMENT "RBS (1 total)") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1970 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1970 End: 1972" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "p15a origin of DNA replication" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1861..1863" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /standard_name=\"oriV\"" 1))) +COMMENT "oriV"))) "Replication Origin (1 total)") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1 End: 105 " 1))) "T1"))) +COMMENT "Terminator (1 total)") +COMMENT #111=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #112=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2208 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2208 End: 2213" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2185 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2185 End: 2190" 1))) "-35"))) +COMMENT "-35 Signal (1 total)"))) "Feature Map") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #118=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (0 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 0 (0 0) 1 2 2 0 178) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 0 End: 0 " 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 0..0" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"lacZalpha\"" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"lacZ alpha peptide\"" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=\"AAC43252.1\"" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=\"GI:392881\"" 1))) +COMMENT "CDS(lacZalpha)_1"))) "CDS (1 total)") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar (CParagraph 60 (0 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #131=(CFolderPar +COMMENT (CGroupPar (CParagraph 0 (0 0) 1 2 2 0 178) +COMMENT (CObjectList +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 0 End: 0 " 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 0..0" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"lacZalpha\"" 1))) +COMMENT "Gene(lacZalpha)_1"))) "Gene (1 total)"))) +COMMENT "Imported Features Not Shown on Map") +COMMENT #137=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #138=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26256696 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26732656 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 175 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #142=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26752200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #143=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26206976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 0 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #144=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26186496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #145=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 107 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #147=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26207136 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BamHI: 0 sites") 1 5 "GGATCC" +COMMENT "CCTAGG") +COMMENT #148=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26756040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #149=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26207936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #150=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 2419 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26755960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #26# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #26# 1) 1 2 2 0 191) +COMMENT " N1: 441 " 1))))) "BglII: 1 site") +COMMENT 1 5 "AGATCT" "TCTAGA") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26732736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 123 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26752360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BsaI: 0 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26771480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 2225 " 1))))) "BspHI: 1 site") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26207056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26752920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "EcoRI: 0 sites") 1 5 "GAATTC" +COMMENT "CTTAAG") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26207216 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #165=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 2727 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26207376 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #168=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26732816 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #169=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 119 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26208016 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #172=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 2421 " 1))))) "NsiI: 1 site") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26752280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 0 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26206576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26184896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 0 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26752440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #23# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #23# 1) 1 2 2 0 191) +COMMENT " N1: 949 (on complementary strand)" +COMMENT 1) +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #23# 2) 1 2 2 0 191) +COMMENT " N2: 1159 (on complementary strand)" +COMMENT 1) +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #23# 3) 1 2 2 0 191) +COMMENT " N3: 2085 (on complementary strand)" +COMMENT 1))))) "SapI: 3 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26206896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26207296 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #184=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 2965 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26732896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 2180 " 1))))) "XhoI: 1 site") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26732576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #190=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #191=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #192=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #193=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #194=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #195=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #196=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #197=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #198=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #199=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #200=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #201=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #202=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #203=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #204=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #205=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #206=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #207=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #208=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #209=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #210=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #211=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #212=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #213=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #214=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #215=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #216=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #217=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #218=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #219=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #220=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #221=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #222=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #223=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #224=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #225=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #226=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #227=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #228=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #229=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -194) 1 1 0 1 1 +COMMENT (mapper: 19.2374 -17.8887 40.0378 40.0378 0.01 10 -1 2969 2969 1 0 0) +COMMENT #230=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 720906 100) +COMMENT (CObjectList +COMMENT #231=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #232=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 21629140 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.2763 6.2743 1 0.0214037) 0.211289) +COMMENT #233=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #193# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pPantACIT1" "@N" 1 0 0.871165 0 +COMMENT -10 6.39396 1.44863 Nil) +COMMENT #234=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "2969 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #235=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1083 100) +COMMENT (CObjectList +COMMENT #236=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #237=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #194# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.58981 5.26956 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #238=(CLabel (CWidget 0 (0 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "CDS(kan) 2" +COMMENT "@N" 1 13.8715 -3.48466 0 -10 5.14514 1.04901 +COMMENT #237#) +COMMENT #239=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #194# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.0126774 1.52128 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #240=(CLabel (CWidget 0 (0 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "cI857s7" "@N" 1 +COMMENT -10.6448 12.1963 0 -10 3.54665 1.04901 #239#)) +COMMENT (CObjectList)) +COMMENT #241=(CGroupWidget +COMMENT (CWidget 20 (7 20 0) 1 2 0 0 Nil -455 100) +COMMENT (CObjectList +COMMENT #242=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #197# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 1.64806 1.9 0.082322 +COMMENT 1) +COMMENT #243=(CLabel (CWidget 0 (0 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "arcO" "@N" 1 +COMMENT -12.9776 0 0 -10 2.29783 1.04901 #242#)) +COMMENT (CObjectList)) +COMMENT #244=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -315 100) +COMMENT (CObjectList +COMMENT #245=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 1.57622 1.65862 1 0.082322) 0.8 1.8 0) +COMMENT #246=(CLabel (CWidget 0 (0 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(ANT)" "@N" 1 +COMMENT -13.4514 1.74233 0 -10 3.14703 1.04901 #245#)) +COMMENT (CObjectList)) +COMMENT #247=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil -873 100) +COMMENT (CObjectList +COMMENT #248=(CScratch +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 1.54875 1.9 +COMMENT 0.082322 1) +COMMENT #249=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 1128481607 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "rbsA" "@N" 1 +COMMENT -13.3194 6.96932 0 -10 2.2229 1.04901 #248#)) +COMMENT (CObjectList)) +COMMENT #250=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -524 100) +COMMENT (CObjectList +COMMENT #251=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #199# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.11289 1.9 +COMMENT 0.082322 1) +COMMENT #252=(CLabel (CWidget 0 (0 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "oriV" "@N" 1 +COMMENT -11.4659 -6.96932 0 -10 1.94816 1.04901 #251#)) +COMMENT (CObjectList)) +COMMENT #253=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -524 100) +COMMENT (CObjectList +COMMENT #254=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #199# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 6.05133 +COMMENT 6.27319) +COMMENT #255=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 1128351572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.87515 13.9386 0 -10 1.17389 1.04901 #254#)) +COMMENT (CObjectList)) +COMMENT #256=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -385 100) +COMMENT (CObjectList +COMMENT #257=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #199# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.61003 1.9 +COMMENT 0.082322 1) +COMMENT #258=(CLabel (CWidget 0 (0 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT -12.7173 3.48466 0 -10 1.49858 1.04901 #257#)) +COMMENT (CObjectList)) +COMMENT #259=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -385 100) +COMMENT (CObjectList +COMMENT #260=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #199# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.65862 1.9 +COMMENT 0.082322 1) +COMMENT #261=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #191# 1129595207 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT -12.6081 -1.74233 0 -10 1.49858 1.04901 #260#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #262=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -315 100) +COMMENT (CObjectList +COMMENT #263=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -245 100) +COMMENT (CObjectList +COMMENT #264=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.0105645 1.9 +COMMENT 0.082322 1) +COMMENT #265=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (2965)" "@N (@S)" 5 -3.45389 +COMMENT 15.681 0 -10 4.79547 0.924127 #264#)) +COMMENT (CObjectList)) +COMMENT #266=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -176 100) +COMMENT (CObjectList +COMMENT #267=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.513433 1.9 +COMMENT 0.082322 1) +COMMENT #268=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (2727)" "@N (@S)" 5 -9.56893 +COMMENT 13.9386 0 -10 5.59471 0.924127 #267#)) +COMMENT (CObjectList)) +COMMENT #269=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #270=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.04922 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (107)" "@N (@S)" 5 5.70286 +COMMENT 12.1963 0 -10 4.34589 0.924127 #270#)) +COMMENT (CObjectList)) +COMMENT #272=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #273=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.15998 1.9 +COMMENT 0.082322 1) +COMMENT #274=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (2421)" "@N (@S)" 5 -13.771 +COMMENT 10.454 0 -10 4.49575 0.924127 #273#)) +COMMENT (CObjectList)) +COMMENT #275=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #276=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.16421 1.9 +COMMENT 0.082322 1) +COMMENT #277=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (2419)" "@N (@S)" 5 -13.8969 +COMMENT 8.71165 0 -10 4.82044 0.924127 #276#)) +COMMENT (CObjectList)) +COMMENT #278=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #279=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.90554 1.9 +COMMENT 0.082322 1) +COMMENT #280=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (175)" "@N (@S)" 5 12.2093 +COMMENT 6.96932 0 -10 4.29594 0.924127 #279#)) +COMMENT (CObjectList)) +COMMENT #281=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #282=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.01541 1.9 +COMMENT 0.082322 1) +COMMENT #283=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (123)" "@N (@S)" 5 10.7925 +COMMENT 8.71165 0 -10 4.19603 0.924127 #282#)) +COMMENT (CObjectList)) +COMMENT #284=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #285=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.02386 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (119)" "@N (@S)" 5 8.46847 10.454 +COMMENT 0 -10 4.14608 0.924127 #285#)) (CObjectList)) +COMMENT #287=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #288=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.66919 1.9 +COMMENT 0.082322 1) +COMMENT #289=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (2180)" "@N (@S)" 5 -14.3587 +COMMENT -3.48466 0 -10 4.74552 0.924127 #288#)) +COMMENT (CObjectList)) +COMMENT #290=(CGroupWidget +COMMENT (CWidget 1 (10 #24# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #291=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.57411 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsp}HI (2225)" "@N (@S)" 5 -14.806 +COMMENT 5.22699 0 -10 5.34495 0.924127 #291#)) +COMMENT (CObjectList)) +COMMENT #293=(CGroupWidget +COMMENT (CWidget 1 (10 #26# 0) 1 2 0 0 Nil -248 100) +COMMENT (CObjectList +COMMENT #294=(CScratch +COMMENT (CWidget 1 (1 #26# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.34351 1.9 +COMMENT 0.082322 1) +COMMENT #295=(CLabel (CWidget 0 (0 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bgl}II (441)" "@N (@S)" 5 13.065 +COMMENT 5.22699 0 -10 4.14608 0.924127 #294#)) +COMMENT (CObjectList)) +COMMENT #296=(CGroupWidget +COMMENT (CWidget 3 (10 #23# 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #297=(CScratch +COMMENT (CWidget 1 (1 #23# 1) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.27016 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (949)" "@N (@S)" 5 13.0703 +COMMENT -5.22699 0 -10 4.22101 0.924127 #297#) +COMMENT #299=(CScratch +COMMENT (CWidget 2 (1 #23# 2) 1 2 0 0 #198# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.82645 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (1159)" "@N (@S)" 5 10.8884 +COMMENT -8.71165 0 -10 4.62063 0.924127 #299#) +COMMENT #301=(CScratch +COMMENT (CWidget 3 (1 #23# 3) 1 2 0 0 #198# 432 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.86991 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sap}I (2085)" "@N (@S)" 5 -13.9694 +COMMENT -5.22699 0 -10 4.74552 0.924127 #301#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #303=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #304=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -769 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21266248 (CObList))) +FEATURES Location/Qualifiers + gene 0..0 + /gene="lacZalpha" + /vntifkey="60" + CDS 0..0 + /gene="lacZalpha" + /codon_start=1 + /transl_table=11 + /product="lacZ alpha peptide" + /protein_id="AAC43252.1" + /db_xref="GI:392881" + /vntifkey="4" + /label=CDS(lacZalpha)_1 + gene 476..1270 + /gene="kan" + /vntifkey="60" + CDS 476..1270 + /gene="kan" + /function="kanamycin resistance" + /codon_start=1 + /transl_table=11 + /product="kanamycin phosphotransferase" + /protein_id="AAC43251.1" + /db_xref="GI:392880" + /vntifkey="4" + /label=CDS(kan)_2 + rep_origin 1970..1972 + /standard_name="oriV" + /vntifkey="33" + /label=oriV + /note="p15a origin of DNA replication" + terminator 1..105 + /vntifkey="43" + /label=T1 + CDS 2250..2963 + /vntifkey="4" + /label=cI857s7 + RBS 2237..2249 + /vntifkey="32" + /label=rbsA + promoter 2185..2223 + /vntifkey="30" + /label=P(ANT) + -35_signal 2185..2190 + /vntifkey="48" + /label=-35 + misc_binding 2190..2210 + /vntifkey="20" + /label=arcO + -10_signal 2208..2213 + /vntifkey="47" + /label=-10 +BASE COUNT 730 a 716 c 838 g 685 t +ORIGIN + 1 ggcatcaaat aaaacgaaag gctcagtcga aagactgggc ctttcgtttt atctgttgtt + 61 tgtcggtgaa cgctctcctg agtaggacaa atccgccgcc ctagacctag gcgttcggct + 121 agcttcacgc tgccgcaagc actcagggcg caagggctgc taaaggaagc ggaacacgta + 181 gaaagccagt ccgcagaaac ggtgctgacc ccggatgaat gtcagctact gggctatctg + 241 gacaagggaa aacgcaagcg caaagagaaa gcaggtagct tgcagtgggc ttacatggcg + 301 atagctagac tgggcggttt tatggacagc aagcgaaccg gaattgccag ctggggcgcc + 361 ctctggtaag gttgggaagc cctgcaaagt aaactggatg gctttcttgc cgccaaggat + 421 ctgatggcgc aggggatcaa gatctgatca agagacagga tgaggatcgt ttcgcatgat + 481 tgaacaagat ggattgcacg caggttctcc ggccgcttgg gtggagaggc tattcggcta + 541 tgactgggca caacagacaa tcggctgctc tgatgccgcc gtgttccggc tgtcagcgca + 601 ggggcgcccg gttctttttg tcaagaccga cctgtccggt gccctgaatg aactccaaga + 661 cgaggcagcg cggctatcgt ggctggccac gacgggcgtt ccttgcgcag ctgtgctcga + 721 cgttgtcact gaagcgggaa gggactggct gctattgggc gaagtgccgg ggcaggatct + 781 cctgtcatct caccttgctc ctgccgagaa agtatccatc atggctgatg caatgcggcg + 841 gctgcatacg cttgatccgg ctacctgccc attcgaccac caagcgaaac atcgcatcga + 901 gcgagcacgt actcggatgg aagccggtct tgtcgatcag gatgatctgg acgaagagca + 961 tcaggggctc gcgccagccg aactgttcgc caggctcaag gcgcggatgc ccgacggcga + 1021 ggatctcgtc gtgacccatg gcgatgcctg cttgccgaat atcatggtgg aaaatggccg + 1081 cttttctgga ttcatcgact gtggccggct gggtgtggcg gaccgctatc aggacatagc + 1141 gttggctacc cgtgatattg ctgaagagct tggcggcgaa tgggctgacc gcttcctcgt + 1201 gctttacggt atcgccgctc ccgattcgca gcgcatcgcc ttctatcgcc ttcttgacga + 1261 gttcttctga gcgggactct ggggttcgcg atgataagct gtcaaacatg agaattacaa + 1321 cttatatcgt atggggctga cttcaggtgc tacatttgaa gagataaatt gcactgaaat + 1381 cgaaatattt tatctgatta ataagatgat cttcttgaga tcgttttggt ctgcgcgtaa + 1441 tctcttgctc tgaaaacgaa aaaaccgcct tgcagggcgg tttttcgaag gttctctgag + 1501 ctaccaactc tttgaaccga ggtaactggc ttggaggagc gcagtcacca aaacttgtcc + 1561 tttcagttta gccttaaccg gcgcatgact tcaagactaa ctcctctaaa tcaattacca + 1621 gtggctgctg ccagtggtgc ttttgcatgt ctttccgggt tggactcaag acgatagtta + 1681 ccggataagg cgcagcggtc ggactgaacg gggggttcgt gcatacagtc cagcttggag + 1741 cgaactgcct acccggaact gagtgtcagg cgtggaatga gacaaacgcg gccataacag + 1801 cggaatgaca ccggtaaacc gaaaggcagg aacaggagag cgcacgaggg agccgccagg + 1861 ggaaacgcct ggtatcttta tagtcctgtc gggtttcgcc accactgatt tgagcgtcag + 1921 atttcgtgat gcttgtcagg ggggcggagc ctatggaaaa acggctttgc cttctttcct + 1981 gcgttatccc ctgattctgt ggataaccgt attaccgcct ttgagtgagc tgataccgct + 2041 cgccgcagcc gaacgaccga gcgcagcgag tcagtgagcg aggaagcgga agagcgccca + 2101 atacgcaaac cgcctctccc cgcgcgttgg ccgattcatt aatgcagctg gcacgacagg + 2161 tttcccgact ggaaagcgct cgagttgaca tgatagaagc actctactat attctgggta + 2221 acctcatgat tcacacagga ggaaaaaaaa tgagcacaaa aaagaaacca ttaacacaag + 2281 agcagcttga ggacgcacgt cgccttaaag caatttatga aaaaaagaaa aatgaacttg + 2341 gcttatccca ggaatctgtc gcagacaaga tggggatggg gcagtcaggc gttggtgctt + 2401 tatttaatgg catcaatgca ttaaatgctt ataacgccgc attgcttaca aaaattctca + 2461 aagttagcgt tgaagaattt agcccttcaa tcgccagaga aatctacgag atgtatgaag + 2521 cggttagtat gcagccgtca cttagaagtg agtatgagta ccctgttttt tctcatgttc + 2581 aggcagggat gttctcacct gagcttagaa cctttaccaa aggtgatgcg gagagatggg + 2641 taagcacaac caaaaaagcc agtgattctg cattctggct tgaggttgaa ggtaattcca + 2701 tgaccgcacc aacaggctcc aagccaagct ttcctgacgg aatgttaatt ctcgttgacc + 2761 ctgagcaggc tgttgagcca ggtgatttct gcatagccag acttgggggt gatgagttta + 2821 ccttcaagaa actgatcagg gatagcggtc aggtgttttt acaaccacta aacccacagt + 2881 acccaatgat cccatgcaat gagagttgtt ccgttgtggg gaaagttatc gctagtcagt + 2941 ggcctgaaga gacgtttggc taatctaga +// diff --git a/lib/VNTI files/pRDV-1.4k-His6-mcherry.gb b/lib/VNTI files/pRDV-1.4k-His6-mcherry.gb new file mode 100644 index 00000000..d605f6ef --- /dev/null +++ b/lib/VNTI files/pRDV-1.4k-His6-mcherry.gb @@ -0,0 +1,1446 @@ +LOCUS pRDV-1.4k- 5480 bp DNA circular SYN 28-MAR-2009 +DEFINITION Ribosome display vector pRDV, complete sequence. +ACCESSION AY327136 +VERSION AY327136.1 GI:37575398 +SOURCE Ribosome display vector pRDV. + ORGANISM Ribosome display vector pRDV + other sequences; artificial sequences; vectors. +REFERENCE 1 (bases 1 to 4279) + AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P., + Grutter,M.G. and Pluckthun,A. + TITLE High-affinity binders selected from designed ankyrin repeat protein + libraries + JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004) +REFERENCE 2 (bases 1 to 4279) + AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and + Pluckthun,A. + TITLE Direct Submission + JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich, + Winterthurerstrasse 190, Zurich 8057, Switzerland +COMMENT http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|513971448| +COMMENT VNTDBDATE|513971448| +COMMENT LSOWNER| +COMMENT VNTNAME|pRDV-1.4k-His6-mcherry| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pRDV-1.4k-His6-mcherry" 0 5480 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 0 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5480 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 3309 0 3363 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 2 1987 0 4064 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 2425 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 3352 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 1950 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 3332 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 3330 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 329 0 1575 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 2190 0 2681 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 1956 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 632 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 2 935 0 1925 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 1 1970 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 161 0 1169 0 3392 0 0 +COMMENT "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 2 3259 0 3665 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 1 2456 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "Promoter_P_1" 30 0 0 1911 1927 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1911..1927") +COMMENT #28=(CFSignal (CObList) "Stem_Loop_1" 39 0 0 1928 1948 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1928..1948") +COMMENT #29=(CFSignal (CObList) "tolA spacer" 21 0 0 4068 4955 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2808..3695") +COMMENT #30=(CFSignal (CObList) "Rep_Origin_1" 33 0 0 1229 1885 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1229..1885") +COMMENT #31=(CFSignal (CObList) "AmpR" 4 0 0 213 1073 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "213..1073") +COMMENT #32=(CFSignal (CObList) "annealing site of tolAk" 21 0 1 4311 4331 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(3051..3071)") +COMMENT #33=(CFSignal (CObList) "orig T" 62 0 0 3366 3366 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2106..2106") +COMMENT #34=(CFSignal (CObList) "orig G" 21 0 0 3364 3364 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2104..2104") +COMMENT #35=(CFSignal (CObList) "Histag" 21 0 0 3330 3347 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2070..2087") +COMMENT #36=(CFSignal (CObList) "mcherry" 4 0 0 3327 4058 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2067..2798") +COMMENT #37=(CFSignal (CObList) "IVS-KpnI-mCherry-r" 21 0 1 4041 4069 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "IVS-KpnI-stop-mCherry-r (annealing site)" 28 0 +COMMENT 1 4029 4058 0 (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "T7-pRDV-f (annealing site)" 28 0 0 1905 1932 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "pRDV-seq" 27 0 0 1767 1787 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #41=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #42=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pRDV-His6-mcherry" 2) 5 "" 0 4) +COMMENT #43=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pRDV-His6-mcherry'" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Ribosome display vector pRDV, complete sequence." 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 03/19/09 04:07\214\337\214\343" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 03/19/09 04:10\214\337\214\343" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5480 bp" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 21-NOV-2008" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AY327136" +COMMENT 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AY327136.1 GI:37575398" +COMMENT 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Ribosome display vector pRDV." 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Ribosome display vector pRDV(Ribosome display vector pRDV)" +COMMENT 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1))) "Standard Fields") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 4279)" 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P.," +COMMENT 1) +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Grutter,M.G. and Pluckthun,A." 1) +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE High-affinity binders selected from designed ankyrin repeat protein" +COMMENT 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " libraries" 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004)" +COMMENT 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 4279)" 1) +COMMENT #69=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and" +COMMENT 1) +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Pluckthun,A." 1) +COMMENT #71=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #72=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich," +COMMENT 1) +COMMENT #73=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Winterthurerstrasse 190, Zurich 8057, Switzerland" +COMMENT 1))) "References") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #75=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #76=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #77=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 213 (3 #31# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 213 End: 1073" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 213..1073" 1))) "AmpR") +COMMENT #84=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3327 (3 #36# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3327 End: 4058" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2067..2798" 1))) "mcherry"))) +COMMENT "CDS (2 total)") +COMMENT #88=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3330 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3330 End: 3347" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2070..2087" 1))) "Histag") +COMMENT #93=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3364 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3364 End: 3364" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2104..2104" 1))) "orig G") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4041 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4041 End: 4069 (Complementary)" +COMMENT 1))) "IVS-KpnI-mCherry-r") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4068 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4068 End: 4955" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "tolA spacer" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2808..3695" 1))) "tolA spacer") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4311 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4311 End: 4331 (Complementary)" +COMMENT 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3051..3071)" 1))) +COMMENT "annealing site of tolAk"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1767 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1767 End: 1787" 1))) +COMMENT "pRDV-seq"))) "Primer (1 total)") +COMMENT #112=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #113=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1905 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1905 End: 1932" 1))) +COMMENT "T7-pRDV-f (annealing site)") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4029 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4029 End: 4058 (Complementary)" +COMMENT 1))) +COMMENT "IVS-KpnI-stop-mCherry-r (annealing site)"))) +COMMENT "Primer Binding Site (2 total)") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #118=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1911 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1911 End: 1927" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) "T7" +COMMENT 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1911..1927" 1))) "Promoter_P_1"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1229 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1229 End: 1885" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "ColE1" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1229..1885" 1))) "Rep_Origin_1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #129=(CFolderPar +COMMENT (CGroupPar (CParagraph 39 (7 39 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1928 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1928 End: 1948" 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1928..1948" 1))) "Stem_Loop_1"))) +COMMENT "Stem Loop (1 total)") +COMMENT #134=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #135=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3366 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3366 End: 3366" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2106..2106" 1))) "orig T"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #139=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #140=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27928808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #141=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25161120 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #142=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2190 " 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 2681 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #145=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27467280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #146=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27912760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 329 " 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1575 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27929048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27916056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #152=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 3309 " 1) +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 3363 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27512520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 3259 " 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 3665 " 1))))) "BbsI: 2 sites") +COMMENT 8 12 "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27917816 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 3330 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26883480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #163=(CGroupPar +COMMENT (CParagraph 0 (10 #26# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (1 #26# 1) 1 2 2 0 191) +COMMENT " N1: 2456 " 1))))) "BglII: 1 site") +COMMENT 1 5 "AGATCT" "TCTAGA") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27371904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25111232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 935 " 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #22# 2) 1 2 2 0 191) +COMMENT " N2: 1925 (on complementary strand)" +COMMENT 1))))) "BsaI: 2 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27512440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 161 " 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 1169 " 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 3392 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27915976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27912680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #177=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 1950 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27928888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #180=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 2425 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27929208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 1987 " 1) +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #3# 2) 1 2 2 0 191) +COMMENT " N2: 4064 " 1))))) "KpnI: 2 sites") +COMMENT 5 1 "GGTACC" "CCATGG") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27466320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27912440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #188=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 3332 " 1))))) "NsiI: 1 site") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27452936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 632 " 1))))) "PvuI: 1 site") 4 +COMMENT 2 "CGATCG" "GCTAGC") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27928968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27928728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #195=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #196=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 3352 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27463344 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #198=(CGroupPar +COMMENT (CParagraph 0 (10 #23# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #199=(CLinePar +COMMENT (CParagraph 0 (1 #23# 1) 1 2 2 0 191) +COMMENT " N1: 1970 " 1))))) "SapI: 1 site") +COMMENT 8 11 "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27917976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27925432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26246392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #203=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #204=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 1956 " 1))))) "XhoI: 1 site") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20998760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #206=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #207=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #208=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #209=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #210=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #211=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #212=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #213=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #214=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #215=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #216=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #217=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #218=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #219=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #220=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #221=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #222=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #223=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #224=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #225=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #226=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #227=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #228=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #229=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #230=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #231=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #232=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #233=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #234=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #235=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #236=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #237=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #238=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #239=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #240=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #241=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #242=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #243=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #244=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #245=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -6) 1 1 0 1 1 +COMMENT (mapper: 32.5897 -16.1501 40.0378 40.0378 0.01 10 -1 5480 5480 1 0 0) +COMMENT #246=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1641 100) +COMMENT (CObjectList +COMMENT #247=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1710 100) +COMMENT (CObjectList +COMMENT #248=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #212# 27243396 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27533 6.27333 1 0.0214037) 0.114474) +COMMENT #249=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pRDV-His6-mcherry" "@N" 1 0 +COMMENT 0.871165 0 -10 10.8148 1.44863 Nil) +COMMENT #250=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5480 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #251=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -594 100) +COMMENT (CObjectList +COMMENT #252=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -176 100) +COMMENT (CObjectList +COMMENT #253=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.04488 6.0305 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #254=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #207# 393260 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT 11.9574 8.71165 0 -10 2.72243 1.04901 #253#) +COMMENT #255=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.62782 2.46577 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #256=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #207# 3801664 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mcherry" "@N" 1 +COMMENT -15.165 0 0 -10 3.84637 1.04901 #255#)) +COMMENT (CObjectList)) +COMMENT #257=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -524 100) +COMMENT (CObjectList +COMMENT #258=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0.600989 1.61752 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #259=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #207# 3801824 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tolA spacer" +COMMENT "@N" 1 -14.7601 8.71165 0 -10 5.295 1.04901 +COMMENT #258#) +COMMENT #260=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.33935 1.9 +COMMENT 0.082322 1) +COMMENT #261=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #207# 3801664 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "annealing site of tolAk" "@N" 1 -17.8413 +COMMENT 6.96932 0 -10 10.3652 1.04901 #260#) +COMMENT #262=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #215# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 1 +COMMENT 2.42342 1.9 0.082322 1) +COMMENT #263=(CLabel (CWidget 0 (0 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT -13.0665 -6.96932 0 -10 2.92224 1.04901 #262#) +COMMENT #264=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #215# 554 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.46234 1.9 +COMMENT 0.082322 1) +COMMENT #265=(CLabel (CWidget 0 (0 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Histag" "@N" 1 +COMMENT -10.6609 -15.681 0 -10 2.99717 1.04901 #264#) +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.64843 1.9 +COMMENT 0.082322 1) +COMMENT #267=(CLabel (CWidget 0 (0 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-KpnI-mCherry-r" "@N" 1 -17.4238 3.48466 +COMMENT 0 -10 8.91657 1.04901 #266#)) (CObjectList)) +COMMENT #268=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #269=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.25157 1.9 +COMMENT 0.082322 1) +COMMENT #270=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #207# 3801504 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pRDV-seq" "@N" +COMMENT 1 15.0975 -3.48466 0 -10 4.64561 1.04901 +COMMENT #269#)) (CObjectList)) +COMMENT #271=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -315 100) +COMMENT (CObjectList +COMMENT #272=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 1.66217 1.9 +COMMENT 0.082322 1) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #207# 3801664 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-KpnI-stop-mCherry-r (annealing site)" +COMMENT "@N" 1 -21.497 1.74233 0 -10 18.7073 1.04901 +COMMENT #272#) +COMMENT #274=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #228# 24889180 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 4.0936 1.9 +COMMENT 0.082322 1) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #207# 3801664 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "T7-pRDV-f (annealing site)" "@N" 1 17.7786 +COMMENT -5.22699 0 -10 12.0636 1.04901 #274#)) +COMMENT (CObjectList)) +COMMENT #276=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #277=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 4 128) 6 1.16464 3.99946 4.08673) +COMMENT 0.4 0.082322 1.08464 1.8 1.8 0) +COMMENT #278=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #207# 3801664 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Promoter P 1" +COMMENT "@N" 1 13.7462 -10.454 0 -10 6.01931 1.04901 +COMMENT #277#)) (CObjectList)) +COMMENT #279=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -734 100) +COMMENT (CObjectList +COMMENT #280=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 0.835356 4.11535 +COMMENT 4.86744 1 0.082322) 0.8 1.8 0) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #207# 393244 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Rep Origin 1" +COMMENT "@N" 1 15.9665 0 0 -10 5.8195 1.04901 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 39 (7 39 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #283=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 4.06727 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #207# 148 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Stem Loop 1" +COMMENT "@N" 1 13.7162 -8.71165 0 -10 5.74457 1.04901 +COMMENT #283#)) (CObjectList)) +COMMENT #285=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1152 100) +COMMENT (CObjectList +COMMENT #286=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #215# 3801544 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 2.42113 1.9 +COMMENT 0.082322 1) +COMMENT #287=(CLabel (CWidget 0 (0 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT -13.7712 -5.22699 0 -10 2.72243 1.04901 #286#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #288=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1361 100) +COMMENT (CObjectList +COMMENT #289=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -873 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #214# 3801504 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.49833 1.9 +COMMENT 0.082322 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 1195458887 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (2425)" "@N (@S)" 5 8.61483 +COMMENT -20.908 0 -10 5.56974 0.924127 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -1501 100) +COMMENT (CObjectList +COMMENT #293=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.43716 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 178 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (3352)" "@N (@S)" 5 -11.3932 +COMMENT -10.454 0 -10 4.4458 0.924127 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.04208 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 25083100 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (1950)" "@N (@S)" 5 13.7443 +COMMENT -12.1963 0 -10 5.09519 0.924127 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #214# +COMMENT 1944545584 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 2.46005 1.9 0.082322 1) +COMMENT #300=(CLabel (CWidget 0 (0 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (3332)" "@N (@S)" 5 -11.3282 +COMMENT -12.1963 0 -10 4.49575 0.924127 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.46234 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 3801824 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (3330)" "@N (@S)" 5 -11.6917 +COMMENT -13.9386 0 -10 4.82044 0.924127 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.03521 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel (CWidget 0 (0 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (1956)" "@N (@S)" 5 13.5513 +COMMENT -13.9386 0 -10 4.69556 0.924127 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.55085 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# -106 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (632)" "@N (@S)" 5 11.5887 10.454 +COMMENT 0 -10 4.17106 0.924127 #308#)) (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 1 (10 #23# 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #23# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.01919 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 24984984 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sap}I (1970)" "@N (@S)" 5 13.4469 +COMMENT -15.681 0 -10 4.62063 0.924127 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #26# 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #26# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.46284 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 25201328 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bgl}II (2456)" "@N (@S)" 5 7.72209 +COMMENT -22.6503 0 -10 4.72054 0.924127 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -1152 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.48638 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 178 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (3309)" "@N (@S)" 5 -11.972 +COMMENT -17.4233 0 -10 5.61969 0.924127 #317#) +COMMENT #319=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #214# 24943096 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.42456 1.9 +COMMENT 0.082322 1) +COMMENT #320=(CLabel (CWidget 0 (0 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (3363)" "@N (@S)" 5 -13.4471 +COMMENT -8.71165 0 -10 5.61969 0.924127 #319#)) +COMMENT (CObjectList)) +COMMENT #321=(CGroupWidget +COMMENT (CWidget 2 (10 #3# 0) 1 2 0 0 Nil -1431 100) +COMMENT (CObjectList +COMMENT #322=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #214# 25945968 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.99973 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 25133364 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Kpn}I (1987)" "@N (@S)" 5 13.4577 +COMMENT -17.4233 0 -10 4.62063 0.924127 #322#) +COMMENT #324=(CScratch +COMMENT (CWidget 2 (1 #3# 2) 1 2 0 0 #214# 393220 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.6221 1.9 0.082322 +COMMENT 1) +COMMENT #325=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 3801824 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Kpn}I (4064)" "@N (@S)" 5 -15.9774 +COMMENT 5.22699 0 -10 4.69556 0.924127 #324#)) +COMMENT (CObjectList)) +COMMENT #326=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -1085 100) +COMMENT (CObjectList +COMMENT #327=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.89771 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 26537220 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (329)" "@N (@S)" 5 8.67764 +COMMENT 12.1963 0 -10 4.69556 0.924127 #327#) +COMMENT #329=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #214# +COMMENT 1414808404 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 4.47136 1.9 0.082322 1) +COMMENT #330=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 24806468 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1575)" "@N (@S)" 5 15.8383 +COMMENT -1.74233 0 -10 5.17011 0.924127 #329#)) +COMMENT (CObjectList)) +COMMENT #331=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #332=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.76735 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 27777888 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2190)" "@N (@S)" 5 11.3113 +COMMENT -19.1656 0 -10 4.74552 0.924127 #332#) +COMMENT #334=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.20528 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 1196704579 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (2681)" "@N (@S)" 5 4.39854 +COMMENT -24.3926 0 -10 4.74552 0.924127 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 2 (10 #22# 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.204 1.9 0.082322 +COMMENT 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 1195442178 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (935)" "@N (@S)" 5 14.1672 +COMMENT 6.96932 0 -10 4.12111 0.924127 #337#) +COMMENT #339=(CScratch +COMMENT (CWidget 2 (1 #22# 2) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.0707 1.9 0.082322 +COMMENT 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 1195856967 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (1925)" "@N (@S)" 5 13.9987 +COMMENT -6.96932 0 -10 4.57068 0.924127 #339#)) +COMMENT (CObjectList)) +COMMENT #341=(CGroupWidget +COMMENT (CWidget 2 (10 #25# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #342=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.54362 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 50460420 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3259)" "@N (@S)" 5 -10.8659 +COMMENT -19.1656 0 -10 4.64561 0.924127 #342#) +COMMENT #344=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.07885 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 25803460 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3665)" "@N (@S)" 5 -15.6118 +COMMENT -1.74233 0 -10 4.64561 0.924127 #344#)) +COMMENT (CObjectList)) +COMMENT #346=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #347=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.09003 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 26335456 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (161)" "@N (@S)" 5 5.64658 +COMMENT 13.9386 0 -10 4.64561 0.924127 #347#) +COMMENT #349=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.93613 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 27648492 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (1169)" "@N (@S)" 5 15.7002 +COMMENT 3.48466 0 -10 5.17011 0.924127 #349#) +COMMENT #351=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.39137 1.9 +COMMENT 0.082322 1) +COMMENT #352=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #206# 3801680 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (3392)" "@N (@S)" 5 -15.6724 +COMMENT -3.48466 0 -10 5.295 0.924127 #351#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #353=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1085 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #354=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21564000 (CObList))) +FEATURES Location/Qualifiers + promoter 1911..1927 + /vntifkey="30" + /label=Promoter_P_1 + /note="T7" + stem_loop 1928..1948 + /vntifkey="39" + /label=Stem_Loop_1 + misc_feature 4068..4955 + /vntifkey="21" + /label=tolA\spacer + /note="tolA spacer" + rep_origin 1229..1885 + /vntifkey="33" + /label=Rep_Origin_1 + /note="ColE1" + CDS 213..1073 + /vntifkey="4" + /label=AmpR + misc_feature complement(4311..4331) + /vntifkey="21" + /label=annealing\site\of\tolAk + /note="Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" + mutation 3366..3366 + /vntifkey="62" + /label=orig\T + misc_feature 3364..3364 + /vntifkey="21" + /label=orig\G + misc_feature 3330..3347 + /vntifkey="21" + /label=Histag + CDS 3327..4058 + /vntifkey="4" + /label=mcherry + misc_feature complement(4041..4069) + /vntifkey="21" + /label=IVS-KpnI-mCherry-r + primer_bind complement(4029..4058) + /vntifkey="28" + /label=IVS-KpnI-stop-mCherry-r\(annealing\site) + primer_bind 1905..1932 + /vntifkey="28" + /label=T7-pRDV-f\(annealing\site) + primer 1767..1787 + /vntifkey="27" + /label=pRDV-seq +BASE COUNT 1555 a 1191 c 1374 g 1360 t +ORIGIN + 1 tttcggccta ttggttaaaa aatgagctga tttaacaaaa atttaacgcg aattttaaca + 61 aaatattaac gtttacaatt tcaggtggca cttttcgggg aaatgtgcgc ggaaccccta + 121 tttgtttatt tttctaaata cattcaaata tgtatccgct catgagacaa taaccctgat + 181 aaatgcttca ataatattga aaaaggaaga gtatgagtat tcaacatttc cgtgtcgccc + 241 ttattccctt ttttgcggca ttttgccttc ctgtttttgc tcacccagaa acgctggtga + 301 aagtaaaaga tgctgaagat cagttgggtg cacgagtggg ttacatcgaa ctggatctca + 361 acagcggtaa gatccttgag agttttcgcc ccgaagaacg ttttccaatg atgagcactt + 421 ttaaagttct gctatgtggc gcggtattat cccgtattga cgccgggcaa gagcaactcg + 481 gtcgccgcat acactattct cagaatgact tggttgagta ctcaccagtc acagaaaagc + 541 atcttacgga tggcatgaca gtaagagaat tatgcagtgc tgccataacc atgagtgata + 601 acactgcggc caacttactt ctgacaacga tcggaggacc gaaggagcta accgcttttt + 661 tgcacaacat gggggatcat gtaactcgcc ttgatcgttg ggaaccggag ctgaatgaag + 721 ccataccaaa cgacgagcgt gacaccacga tgcctgtagc aatggcaaca acgttgcgca + 781 aactattaac tggcgaacta cttactctag cttcccggca acaattaata gactggatgg + 841 aggcggataa agttgcagga ccacttctgc gctcggccct tccggctggc tggtttattg + 901 ctgataaatc tggagccggt gagcgtgggt ctcgcggtat cattgcagca ctggggccag + 961 atggtaagcc ctcccgtatc gtagttatct acacgacggg gagtcaggca actatggatg + 1021 aacgaaatag acagatcgct gagataggtg cctcactgat taagcattgg taactgtcag + 1081 accaagttta ctcatatata ctttagattg atttaaaact tcatttttaa tttaaaagga + 1141 tctaggtgaa gatccttttt gataatctca tgaccaaaat cccttaacgt gagttttcgt + 1201 tccactgagc gtcagacccc gtagaaaaga tcaaaggatc ttcttgagat cctttttttc + 1261 tgcgcgtaat ctgctgcttg caaacaaaaa aaccaccgct accagcggtg gtttgtttgc + 1321 cggatcaaga gctaccaact ctttttccga aggtaactgg cttcagcaga gcgcagatac + 1381 caaatactgt ccttctagtg tagccgtagt taggccacca cttcaagaac tctgtagcac + 1441 cgcctacata cctcgctctg ctaatcctgt taccagtggc tgctgccagt ggcgataagt + 1501 cgtgtcttac cgggttggac tcaagacgat agttaccgga taaggcgcag cggtcgggct + 1561 gaacgggggg ttcgtgcaca cagcccagct tggagcgaac gacctacacc gaactgagat + 1621 acctacagcg tgagctatga gaaagcgcca cgcttcccga agggagaaag gcggacaggt + 1681 atccggtaag cggcagggtc ggaacaggag agcgcacgag ggagcttcca gggggaaacg + 1741 cctggtatct ttatagtcct gtcgggtttc gccacctctg acttgagcgt cgatttttgt + 1801 gatgctcgtc aggggggcgg agcctatgga aaaacgccag caacgcggcc tttttacggt + 1861 tcctggcctt ttgctggcct tttgctcaca tgacccgaca ccatcgaaat taatacgact + 1921 cactataggg agaccacaac ggtttcccga attcctcgag ggctcttcct gctttgccaa + 1981 gggtaccaat gttttaatgg cggatgggtc tattgaatgt attgaaaaca ttgaggttgg + 2041 taataaggtc atgggtaaag atggcagacc tcgtgaggta attaaattgc ccagaggaag + 2101 agaaactatg tacagcgtcg tgcagaaaag tcagcacaga gcccacaaaa gtgactcaag + 2161 tcgtgaagtg ccagaattac tcaagtttac gtgtaatgcg acccatgagt tggttgttag + 2221 aacacctcgt agtgtccgcc gtttgtctcg taccattaag ggtgtcgaat attttgaagt + 2281 tattactttt gagatgggcc aaaagaaagc ccccgacggt agaattgttg agcttgtcaa + 2341 ggaagtttca aagagctacc caatatctga ggggcctgag agagccaacg aattagtaga + 2401 atcctataga aaggcttcaa ataaagctta ttttgagtgg actattgagg ccagagatct + 2461 ttctctgttg ggttcccatg ttcgtaaagc tacctaccag acttacgctc caattcttta + 2521 tgagaatgac cactttttcg actacatgca aaaaagtaag tttcatctca ccattgaagg + 2581 tccaaaagta cttgcttatt tacttggttt atggattggt gatggattgt ctgacagggc + 2641 aactttttcg gttgattcca gagatacttc tttgatggaa cgtgttactg aatatgctga + 2701 aaagttgaat ttgtgcgccg agtataagga cagaaaagaa ccacaagttg ccaaaactgt + 2761 taatttgtac tctaaagttg tcagaggtaa tggtattcgc aataatctta atactgagaa + 2821 tccattatgg gacgctattg ttggcttagg attcttgaag gacggtgtca aaaatattcc + 2881 ttctttcttg tctacggaca atatcggtac tcgtgaaaca tttcttgctg gtctaattga + 2941 ttctgatggc tatgttactg atgagcatgg tattaaagca acaataaaga caattcatac + 3001 ttctgtcaga gatggtttgg tttcccttgc tcgttcttta ggcttagtag tctcggttaa + 3061 cgcagaacct gctaaggttg acatgaatgt caccaaacat aaaattagtt atgctattta + 3121 tatgtctggt ggagatgttt tgcttaacgt tctttcgaag tgtgccggct ctaaaaaatt + 3181 caggcctgct cccgccgctg cttttgcacg tgagtgccgc ggattttatt tcgagttaca + 3241 agaattgaag gaagacgatt attatgggat tactttatct gatgattctg atcatcagtt + 3301 tttgcttgga tcccaggttg tcgtccatgc atcatcacca tcatcaccaa gtcgacctgc + 3361 tggatccaaa catggcaatc attaaggagt tcatgagatt caaagttcac atggaaggtt + 3421 ctgtaaatgg acatgaattt gaaatagaag gtgaaggaga aggaaggcct tatgaaggaa + 3481 cccaaaccgc gaagctaaaa gttactaagg gtggcccatt accatttgca tgggatatcc + 3541 ttagccctca attcatgtat gggtcaaagg cttatgtcaa gcaccccgcc gacattccag + 3601 actatctaaa gttatctttt cccgaagggt ttaagtggga gcgtgtgatg aacttcgaag + 3661 acggtggcgt ggtaacagtg actcaggatt cgtccctgca agatggtgaa tttatctaca + 3721 aagtcaaatt aagaggaact aactttccat ctgacggccc ggttatgcaa aaaaagacaa + 3781 tgggctggga ggcctcctca gaacgaatgt accctgaaga tggtgccttg aagggtgaga + 3841 ttaaacaaag attgaaattg aaagatggtg gacattatga cgctgaggtt aaaacgacat + 3901 acaaagctaa gaaacctgtc cagctcccag gtgcttacaa tgtaaatata aaacttgata + 3961 ttacatcaca taatgaagat tatacgatag ttgaacaata cgaaagggct gaggggagac + 4021 atagtactgg tggcatggat gaactataca aaggttctgg taccgcagga tctggtggcc + 4081 agaagcaagc tgaagaggcg gcagcgaaag cggcggcaga tgctaaagcg aaggccgaag + 4141 cagatgctaa agctgcggaa gaagcagcga agaaagcggc tgcagacgca aagaaaaaag + 4201 cagaagcaga agccgccaaa gccgcagccg aagcgcagaa aaaagccgag gcagccgctg + 4261 cggcactgaa gaagaaagcg gaagcggcag aagcagctgc agctgaagca agaaagaaag + 4321 cggcaactga agctgctgaa aaagccaaag cagaagctga gaagaaagcg gctgctgaaa + 4381 aggctgcagc tgataagaaa gcggcagcag agaaagctgc agccgacaaa aaagcagcag + 4441 aaaaagcggc tgctgaaaag gcagcagctg ataagaaagc agcggcagaa aaagccgccg + 4501 cagacaaaaa agcggcagcg gcaaaagctg cagctgaaaa agccgctgca gcaaaagcgg + 4561 ccgcagaggc agatgatatt ttcggtgagc taagctctgg taagaatgca ccgaaaacgg + 4621 ggggaggggc gaaagggaac aatgcttcgc ctgccgggag tggtaatact aaaaacaatg + 4681 gcgcatcagg ggccgatatc aataactatg ccgggcagat taaatctgct atcgaaagta + 4741 agttctatga cgcatcgtcc tatgcaggca aaacctgtac gctgcgcata aaactggcac + 4801 ccgatggtat gttactggat atcaaacctg aaggtggcga tcccgcactt tgtcaggctg + 4861 cgttggcagc agctaaactt gcgaagatcc cgaaaccacc aagccaggca gtatatgaag + 4921 tgttcaaaaa cgcgccattg gacttcaaac cgtagtagag atccggctgc taacaaagcc + 4981 cgaaaggaag ctgagttggc tgctgccacc gctgagcaat aactagcata accccttggg + 5041 gcctctaaac gggtcttgag gggttttttg ctgaaaggag gaactatatc cggatcgaga + 5101 tccccacgcg ccctgtagcg gcgcattaag cgcggcgggt gtggtggtta cgcgcagcgt + 5161 gaccgctaca cttgccagcg ccctagcgcc cgctcctttc gctttcttcc cttcctttct + 5221 cgccacgttc gccggctttc cccgtcaagc tctaaatcgg ggcatccctt tagggttccg + 5281 atttagtgct ttacggcacc tcgaccccaa aaaacttgat tagggtgatg gttcacgtag + 5341 tgggccatcg ccctgataga cggtttttcg ccctttgacg ttggagtcca cgttctttaa + 5401 tagtggactc ttgttccaaa ctggaacaac actcaaccct atctcggtct attcttttga + 5461 tttataaggg attttgccga +// diff --git a/lib/VNTI files/pRDV-His6-mcherry(SD-).gb b/lib/VNTI files/pRDV-His6-mcherry(SD-).gb new file mode 100644 index 00000000..5d689148 --- /dev/null +++ b/lib/VNTI files/pRDV-His6-mcherry(SD-).gb @@ -0,0 +1,1358 @@ +LOCUS pRDV-His6- 4128 bp DNA circular SYN 18-JUN-2009 +DEFINITION Ribosome display vector pRDV, complete sequence. +ACCESSION AY327136 +VERSION AY327136.1 GI:37575398 +SOURCE Ribosome display vector pRDV. + ORGANISM Ribosome display vector pRDV + other sequences; artificial sequences; vectors. +REFERENCE 1 (bases 1 to 4279) + AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P., + Grutter,M.G. and Pluckthun,A. + TITLE High-affinity binders selected from designed ankyrin repeat protein + libraries + JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004) +REFERENCE 2 (bases 1 to 4279) + AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and + Pluckthun,A. + TITLE Direct Submission + JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich, + Winterthurerstrasse 190, Zurich 8057, Switzerland +COMMENT http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|521327479| +COMMENT VNTDBDATE|521401540| +COMMENT LSOWNER| +COMMENT VNTNAME|pRDV-His6-mcherry(SD-)| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pRDV-His6-mcherry(SD-)" 0 4128 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 0 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4128 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 2011 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 2712 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 1956 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 2000 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 1950 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 1980 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 1978 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 329 0 1575 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 632 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 2 935 0 1925 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 161 0 1169 0 2040 0 0 +COMMENT "") #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 2313 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "Promoter_P_1" 30 0 0 1911 1927 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1911..1927") +COMMENT #28=(CFSignal (CObList) "Stem_Loop_1" 39 0 0 1928 1948 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1928..1948") +COMMENT #29=(CFSignal (CObList) "tolA spacer" 21 0 0 2716 3603 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2716..3603") +COMMENT #30=(CFSignal (CObList) "Rep_Origin_1" 33 0 0 1229 1885 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1229..1885") +COMMENT #31=(CFSignal (CObList) "AmpR" 4 0 0 213 1073 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "213..1073") +COMMENT #32=(CFSignal (CObList) "annealing site of tolAk" 21 0 1 2959 2979 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(2959..2979)") +COMMENT #33=(CFSignal (CObList) "orig T" 62 0 0 2014 2014 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2014..2014") +COMMENT #34=(CFSignal (CObList) "orig G" 21 0 0 2012 2012 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2012..2012") +COMMENT #35=(CFSignal (CObList) "Histag" 21 0 0 1978 1995 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1978..1995") +COMMENT #36=(CFSignal (CObList) "mcherry" 4 0 0 1975 2706 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1975..2706") +COMMENT #37=(CFSignal (CObList) "IVS-KpnI-mCherry-r" 21 0 1 2689 2717 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(2689..2717)") +COMMENT #38=(CFSignal (CObList) "IVS-KpnI-stop-mCherry-r (annealing site)" 28 0 +COMMENT 1 2677 2706 0 (CStringList) (CStringList) 1 1 1 1 +COMMENT "complement(2677..2706)") +COMMENT #39=(CFSignal (CObList) "T7-pRDV-f (annealing site)" 28 0 0 1905 1932 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "1905..1932") +COMMENT #40=(CFSignal (CObList) "pRDV-seq" 27 0 0 1767 1787 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1767..1787") +COMMENT #41=(CFSignal (CObList) "T7-pRDV-f2" 27 0 0 1909 1955 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "IVS-BamHI-r" 27 0 1 2003 2028 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #43=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #44=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pRDV-His6-mcherry(SD-)" 2) 5 "" 0 4) +COMMENT #45=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pRDV-His6-mcherry(SD-)'" 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Ribosome display vector pRDV, complete sequence." 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 06/17/09 09:11\214\337\214\343" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 06/18/09 05:45\214\337\214\343" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4128 bp" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 17-JUN-2009" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AY327136" +COMMENT 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AY327136.1 GI:37575398" +COMMENT 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Ribosome display vector pRDV." 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Ribosome display vector pRDV(Ribosome display vector pRDV)" +COMMENT 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1))) "Standard Fields") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 4279)" 1) +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P.," +COMMENT 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Grutter,M.G. and Pluckthun,A." 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE High-affinity binders selected from designed ankyrin repeat protein" +COMMENT 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " libraries" 1) +COMMENT #69=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004)" +COMMENT 1) +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 4279)" 1) +COMMENT #71=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and" +COMMENT 1) +COMMENT #72=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Pluckthun,A." 1) +COMMENT #73=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #74=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich," +COMMENT 1) +COMMENT #75=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Winterthurerstrasse 190, Zurich 8057, Switzerland" +COMMENT 1))) "References") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #77=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #78=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #81=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 213 (3 #31# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 213 End: 1073" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 213..1073" 1))) "AmpR") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1975 (3 #36# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1975 End: 2706" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1975..2706" 1))) "mcherry"))) +COMMENT "CDS (2 total)") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1978 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1978 End: 1995" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1978..1995" 1))) "Histag") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2012 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2012 End: 2012" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2012..2012" 1))) "orig G") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2689 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2689 End: 2717 (Complementary)" +COMMENT 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2689..2717)" 1))) +COMMENT "IVS-KpnI-mCherry-r") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2716 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2716 End: 3603" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "tolA spacer" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2716..3603" 1))) "tolA spacer") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2959 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2959 End: 2979 (Complementary)" +COMMENT 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2959..2979)" 1))) +COMMENT "annealing site of tolAk"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #114=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1767 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1767 End: 1787" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1767..1787" 1))) "pRDV-seq") +COMMENT #118=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1909 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1909 End: 1955" 1))) +COMMENT "T7-pRDV-f2") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2003 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2003 End: 2028 (Complementary)" +COMMENT 1))) "IVS-BamHI-r"))) +COMMENT "Primer (3 total)") +COMMENT #122=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1905 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1905 End: 1932" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1905..1932" 1))) +COMMENT "T7-pRDV-f (annealing site)") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2677 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2677 End: 2706 (Complementary)" +COMMENT 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2677..2706)" 1))) +COMMENT "IVS-KpnI-stop-mCherry-r (annealing site)"))) +COMMENT "Primer Binding Site (2 total)") +COMMENT #131=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #132=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1911 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1911 End: 1927" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) "T7" +COMMENT 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1911..1927" 1))) "Promoter_P_1"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #137=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #138=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1229 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1229 End: 1885" 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "ColE1" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1229..1885" 1))) "Rep_Origin_1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 39 (7 39 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1928 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1928 End: 1948" 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1928..1948" 1))) "Stem_Loop_1"))) +COMMENT "Stem Loop (1 total)") +COMMENT #148=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2014 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2014 End: 2014" 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2014..2014" 1))) "orig T"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #153=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21687104 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21045616 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 0 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21046656 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21686304 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 329 " 1) +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1575 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #161=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21686384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21686224 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #163=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 2011 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25004208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #166=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 2313 " 1))))) "BbsI: 1 site") +COMMENT 8 12 "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #168=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21685824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #169=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 1978 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25203552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25296384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27522840 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 935 " 1) +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #22# 2) 1 2 2 0 191) +COMMENT " N2: 1925 (on complementary strand)" +COMMENT 1))))) "BsaI: 2 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21046816 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 161 " 1) +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 1169 " 1) +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2040 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21686144 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21685984 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #184=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 1950 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21686544 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 1956 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21685904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 2712 " 1))))) "KpnI: 1 site") +COMMENT 5 1 "GGTACC" "CCATGG") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27522200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21685424 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 1980 " 1))))) "NsiI: 1 site") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27522680 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 632 " 1))))) "PvuI: 1 site") 4 +COMMENT 2 "CGATCG" "GCTAGC") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21686464 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21686624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #201=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 2000 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27522920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #204=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21685664 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21686784 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27522280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XhoI: 0 sites") 1 5 "CTCGAG" +COMMENT "GAGCTC") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21556752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #208=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #209=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #210=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #211=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #212=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #213=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #214=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #215=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #216=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #217=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #218=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #219=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #220=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #221=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #222=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #223=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #224=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #225=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #226=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #227=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #228=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #229=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #230=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #231=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #232=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #233=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #234=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #235=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #236=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #237=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #238=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #239=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #240=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #241=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #242=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #243=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #244=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #245=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #246=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #247=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -6) 1 1 0 1 1 +COMMENT (mapper: 31.7804 -16.1501 40.0378 40.0378 0.01 10 -1 4128 4128 1 0 0) +COMMENT #248=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1641 100) +COMMENT (CObjectList +COMMENT #249=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1990 100) +COMMENT (CObjectList +COMMENT #250=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #214# 21218860 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.2757 6.2737 1 0.0214037) 0.151967) +COMMENT #251=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #211# 2081903016 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pRDV-His6-mcherry(SD-)" "@N" 1 0 +COMMENT 0.871165 0 -10 13.787 1.44863 Nil) +COMMENT #252=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #210# 32314956 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4128 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.19698 0.924127 Nil)) (CObjectList)) +COMMENT #253=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -664 100) +COMMENT (CObjectList +COMMENT #254=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -176 100) +COMMENT (CObjectList +COMMENT #255=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 4.64258 5.95102 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #256=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 25133364 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT 14.9194 6.96932 0 -10 2.72243 1.04901 #255#) +COMMENT #257=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #212# +COMMENT 1944545584 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.16097 3.27336 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #258=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 393260 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mcherry" "@N" 1 +COMMENT -8.61524 -13.9386 0 -10 3.84637 1.04901 #257#)) +COMMENT (CObjectList)) +COMMENT #259=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -594 100) +COMMENT (CObjectList +COMMENT #260=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0.797825 2.14729 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #261=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 3801090 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tolA spacer" +COMMENT "@N" 1 -17.3469 1.74233 0 -10 5.295 1.04901 +COMMENT #260#) +COMMENT #262=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.77801 1.9 +COMMENT 0.082322 1) +COMMENT #263=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 11195280 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "annealing site of tolAk" "@N" 1 -19.3034 +COMMENT -3.48466 0 -10 10.3652 1.04901 #262#) +COMMENT #264=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.21713 1.9 +COMMENT 0.082322 1) +COMMENT #265=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 3801824 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 3.58616 -29.6196 0 -10 2.92224 1.04901 #264#) +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #217# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 1 +COMMENT 3.2688 1.9 0.082322 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 1195458887 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Histag" "@N" 1 +COMMENT 4.19184 -19.1656 0 -10 2.99717 1.04901 #266#) +COMMENT #268=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.18832 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 3801504 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-KpnI-mCherry-r" "@N" 1 -16.607 -8.71165 +COMMENT 0 -10 8.91657 1.04901 #268#)) (CObjectList)) +COMMENT #270=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1501 100) +COMMENT (CObjectList +COMMENT #271=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.58945 1.9 +COMMENT 0.082322 1) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 65537 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pRDV-seq" "@N" +COMMENT 1 16.3272 -5.22699 0 -10 4.64561 1.04901 +COMMENT #271#) +COMMENT #273=(CPrimerArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #215# 26503268 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1.16464 3.30224 +COMMENT 3.37366) 0.4 0.082322 1.8 1.8 0) +COMMENT #274=(CLabel (CWidget 0 (0 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T7-pRDV-f2" +COMMENT "@N" 1 11.7842 -12.1963 0 -10 5.17011 1.04901 +COMMENT #273#) +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.23081 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 1195442178 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "IVS-BamHI-r" +COMMENT "@N" 1 4.9685 -26.1349 0 -10 5.49481 1.04901 +COMMENT #275#)) (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -315 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 2.20656 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel (CWidget 0 (0 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-KpnI-stop-mCherry-r (annealing site)" +COMMENT "@N" 1 -20.6854 -10.454 0 -10 18.7073 1.04901 +COMMENT #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 3.37974 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 178 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "T7-pRDV-f (annealing site)" "@N" 1 18.8396 +COMMENT -6.96932 0 -10 12.0636 1.04901 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #283=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 4 128) 6 1.32929 3.28335 3.37062) +COMMENT 0.4 0.082322 1.24929 1.8 1.8 0) +COMMENT #284=(CLabel (CWidget 0 (0 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Promoter P 1" +COMMENT "@N" 1 9.15385 -13.9386 0 -10 6.01931 1.04901 +COMMENT #283#)) (CObjectList)) +COMMENT #285=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -804 100) +COMMENT (CObjectList +COMMENT #286=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 0.835356 3.40861 +COMMENT 4.40703 1 0.082322) 0.8 1.8 0) +COMMENT #287=(CLabel (CWidget 0 (0 0) 1 2 0 0 #209# 6 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Rep Origin 1" +COMMENT "@N" 1 17.528 -1.74233 0 -10 5.8195 1.04901 +COMMENT #286#)) (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 39 (7 39 0) 1 2 0 0 Nil -1013 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #230# +COMMENT 1414808404 100) (LOGPEN 0 0 16711680) 1 1 +COMMENT 3.34479 1.9 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 2081903016 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Stem Loop 1" +COMMENT "@N" 1 13.9108 -10.454 0 -10 5.74457 1.04901 +COMMENT #289#)) (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #292=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.2141 1.9 +COMMENT 0.082322 1) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 2082602612 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 3.48023 -31.3619 0 -10 2.72243 1.04901 #292#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #294=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1571 100) +COMMENT (CObjectList +COMMENT #295=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #216# 3801504 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.21865 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 3801664 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (2011)" "@N (@S)" 5 5.03233 +COMMENT -27.8773 0 -10 5.49481 0.924127 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil -1641 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #216# 393220 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.15337 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (2712)" "@N (@S)" 5 -15.9038 +COMMENT -6.96932 0 -10 4.62063 0.924127 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -1362 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #216# 25945968 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.30224 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 393244 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (1956)" "@N (@S)" 5 6.0778 +COMMENT -17.4233 0 -10 5.49481 0.924127 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #216# 24943096 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.23537 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 1413698625 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (2000)" "@N (@S)" 5 4.72999 +COMMENT -24.3926 0 -10 4.4458 0.924127 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1780 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.31135 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 1196704579 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (1950)" "@N (@S)" 5 5.86977 +COMMENT -15.681 0 -10 5.09519 0.924127 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -1923 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.26576 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (1980)" "@N (@S)" 5 5.12196 +COMMENT -22.6503 0 -10 4.42082 0.924127 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -1086 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #216# 554 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.2688 1.9 0.082322 +COMMENT 1) +COMMENT #315=(CLabel (CWidget 0 (0 0) 1 2 0 0 #218# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (1978)" "@N (@S)" 5 5.31789 +COMMENT -20.908 0 -10 4.77049 0.924127 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.31428 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 3801664 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (632)" "@N (@S)" 5 14.8366 +COMMENT 8.71165 0 -10 4.17106 0.924127 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #216# 3801544 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.75972 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #218# 1128482627 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (2313)" "@N (@S)" 5 -8.62436 +COMMENT -15.681 0 -10 4.57068 0.924127 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #323=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.77473 1.9 +COMMENT 0.082322 1) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 3801664 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (329)" "@N (@S)" 5 11.8017 +COMMENT 12.1963 0 -10 4.69556 0.924127 #323#) +COMMENT #325=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #216# 24889180 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.88123 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel (CWidget 0 (0 0) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1575)" "@N (@S)" 5 17.2328 +COMMENT -3.48466 0 -10 5.17011 0.924127 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 2 (10 #22# 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.85382 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 3801664 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (935)" "@N (@S)" 5 17.0401 +COMMENT 1.74233 0 -10 4.12111 0.924127 #328#) +COMMENT #330=(CScratch +COMMENT (CWidget 2 (1 #22# 2) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.34935 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 1128482627 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (1925)" "@N (@S)" 5 14.8821 +COMMENT -8.71165 0 -10 4.57068 0.924127 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1086 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #216# 3801544 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 6.03004 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 3801824 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (161)" "@N (@S)" 5 8.77925 +COMMENT 13.9386 0 -10 4.64561 0.924127 #333#) +COMMENT #335=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.49821 1.9 +COMMENT 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 112 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (1169)" "@N (@S)" 5 17.6042 0 0 +COMMENT -10 5.17011 0.924127 #335#) +COMMENT #337=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #216# +COMMENT 1944545584 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 3.17458 1.9 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #208# 3725180 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2040)" "@N (@S)" 5 4.32801 +COMMENT -33.1043 0 -10 5.295 0.924127 #337#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #339=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #340=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21546888 (CObList))) +FEATURES Location/Qualifiers + promoter 1911..1927 + /vntifkey="30" + /label=Promoter_P_1 + /note="T7" + stem_loop 1928..1948 + /vntifkey="39" + /label=Stem_Loop_1 + misc_feature 2716..3603 + /vntifkey="21" + /label=tolA\spacer + /note="tolA spacer" + rep_origin 1229..1885 + /vntifkey="33" + /label=Rep_Origin_1 + /note="ColE1" + CDS 213..1073 + /vntifkey="4" + /label=AmpR + misc_feature complement(2959..2979) + /vntifkey="21" + /label=annealing\site\of\tolAk + /note="Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" + mutation 2014..2014 + /vntifkey="62" + /label=orig\T + misc_feature 2012..2012 + /vntifkey="21" + /label=orig\G + misc_feature 1978..1995 + /vntifkey="21" + /label=Histag + CDS 1975..2706 + /vntifkey="4" + /label=mcherry + misc_feature complement(2689..2717) + /vntifkey="21" + /label=IVS-KpnI-mCherry-r + primer_bind complement(2677..2706) + /vntifkey="28" + /label=IVS-KpnI-stop-mCherry-r\(annealing\site) + primer_bind 1905..1932 + /vntifkey="28" + /label=T7-pRDV-f\(annealing\site) + primer 1767..1787 + /vntifkey="27" + /label=pRDV-seq + primer 1909..1955 + /vntifkey="27" + /label=T7-pRDV-f2 + primer complement(2003..2028) + /vntifkey="27" + /label=IVS-BamHI-r +BASE COUNT 1182 a 951 c 1058 g 937 t +ORIGIN + 1 tttcggccta ttggttaaaa aatgagctga tttaacaaaa atttaacgcg aattttaaca + 61 aaatattaac gtttacaatt tcaggtggca cttttcgggg aaatgtgcgc ggaaccccta + 121 tttgtttatt tttctaaata cattcaaata tgtatccgct catgagacaa taaccctgat + 181 aaatgcttca ataatattga aaaaggaaga gtatgagtat tcaacatttc cgtgtcgccc + 241 ttattccctt ttttgcggca ttttgccttc ctgtttttgc tcacccagaa acgctggtga + 301 aagtaaaaga tgctgaagat cagttgggtg cacgagtggg ttacatcgaa ctggatctca + 361 acagcggtaa gatccttgag agttttcgcc ccgaagaacg ttttccaatg atgagcactt + 421 ttaaagttct gctatgtggc gcggtattat cccgtattga cgccgggcaa gagcaactcg + 481 gtcgccgcat acactattct cagaatgact tggttgagta ctcaccagtc acagaaaagc + 541 atcttacgga tggcatgaca gtaagagaat tatgcagtgc tgccataacc atgagtgata + 601 acactgcggc caacttactt ctgacaacga tcggaggacc gaaggagcta accgcttttt + 661 tgcacaacat gggggatcat gtaactcgcc ttgatcgttg ggaaccggag ctgaatgaag + 721 ccataccaaa cgacgagcgt gacaccacga tgcctgtagc aatggcaaca acgttgcgca + 781 aactattaac tggcgaacta cttactctag cttcccggca acaattaata gactggatgg + 841 aggcggataa agttgcagga ccacttctgc gctcggccct tccggctggc tggtttattg + 901 ctgataaatc tggagccggt gagcgtgggt ctcgcggtat cattgcagca ctggggccag + 961 atggtaagcc ctcccgtatc gtagttatct acacgacggg gagtcaggca actatggatg + 1021 aacgaaatag acagatcgct gagataggtg cctcactgat taagcattgg taactgtcag + 1081 accaagttta ctcatatata ctttagattg atttaaaact tcatttttaa tttaaaagga + 1141 tctaggtgaa gatccttttt gataatctca tgaccaaaat cccttaacgt gagttttcgt + 1201 tccactgagc gtcagacccc gtagaaaaga tcaaaggatc ttcttgagat cctttttttc + 1261 tgcgcgtaat ctgctgcttg caaacaaaaa aaccaccgct accagcggtg gtttgtttgc + 1321 cggatcaaga gctaccaact ctttttccga aggtaactgg cttcagcaga gcgcagatac + 1381 caaatactgt ccttctagtg tagccgtagt taggccacca cttcaagaac tctgtagcac + 1441 cgcctacata cctcgctctg ctaatcctgt taccagtggc tgctgccagt ggcgataagt + 1501 cgtgtcttac cgggttggac tcaagacgat agttaccgga taaggcgcag cggtcgggct + 1561 gaacgggggg ttcgtgcaca cagcccagct tggagcgaac gacctacacc gaactgagat + 1621 acctacagcg tgagctatga gaaagcgcca cgcttcccga agggagaaag gcggacaggt + 1681 atccggtaag cggcagggtc ggaacaggag agcgcacgag ggagcttcca gggggaaacg + 1741 cctggtatct ttatagtcct gtcgggtttc gccacctctg acttgagcgt cgatttttgt + 1801 gatgctcgtc aggggggcgg agcctatgga aaaacgccag caacgcggcc tttttacggt + 1861 tcctggcctt ttgctggcct tttgctcaca tgacccgaca ccatcgaaat taatacgact + 1921 cactataggg agaccacaac ggtttcccga attcaagctt acctcctctt aaagatgcat + 1981 catcaccatc atcaccaagt cgacctgctg gatccaaaca tggcaatcat taaggagttc + 2041 atgagattca aagttcacat ggaaggttct gtaaatggac atgaatttga aatagaaggt + 2101 gaaggagaag gaaggcctta tgaaggaacc caaaccgcga agctaaaagt tactaagggt + 2161 ggcccattac catttgcatg ggatatcctt agccctcaat tcatgtatgg gtcaaaggct + 2221 tatgtcaagc accccgccga cattccagac tatctaaagt tatcttttcc cgaagggttt + 2281 aagtgggagc gtgtgatgaa cttcgaagac ggtggcgtgg taacagtgac tcaggattcg + 2341 tccctgcaag atggtgaatt tatctacaaa gtcaaattaa gaggaactaa ctttccatct + 2401 gacggcccgg ttatgcaaaa aaagacaatg ggctgggagg cctcctcaga acgaatgtac + 2461 cctgaagatg gtgccttgaa gggtgagatt aaacaaagat tgaaattgaa agatggtgga + 2521 cattatgacg ctgaggttaa aacgacatac aaagctaaga aacctgtcca gctcccaggt + 2581 gcttacaatg taaatataaa acttgatatt acatcacata atgaagatta tacgatagtt + 2641 gaacaatacg aaagggctga ggggagacat agtactggtg gcatggatga actatacaaa + 2701 ggttctggta ccgcaggatc tggtggccag aagcaagctg aagaggcggc agcgaaagcg + 2761 gcggcagatg ctaaagcgaa ggccgaagca gatgctaaag ctgcggaaga agcagcgaag + 2821 aaagcggctg cagacgcaaa gaaaaaagca gaagcagaag ccgccaaagc cgcagccgaa + 2881 gcgcagaaaa aagccgaggc agccgctgcg gcactgaaga agaaagcgga agcggcagaa + 2941 gcagctgcag ctgaagcaag aaagaaagcg gcaactgaag ctgctgaaaa agccaaagca + 3001 gaagctgaga agaaagcggc tgctgaaaag gctgcagctg ataagaaagc ggcagcagag + 3061 aaagctgcag ccgacaaaaa agcagcagaa aaagcggctg ctgaaaaggc agcagctgat + 3121 aagaaagcag cggcagaaaa agccgccgca gacaaaaaag cggcagcggc aaaagctgca + 3181 gctgaaaaag ccgctgcagc aaaagcggcc gcagaggcag atgatatttt cggtgagcta + 3241 agctctggta agaatgcacc gaaaacgggg ggaggggcga aagggaacaa tgcttcgcct + 3301 gccgggagtg gtaatactaa aaacaatggc gcatcagggg ccgatatcaa taactatgcc + 3361 gggcagatta aatctgctat cgaaagtaag ttctatgacg catcgtccta tgcaggcaaa + 3421 acctgtacgc tgcgcataaa actggcaccc gatggtatgt tactggatat caaacctgaa + 3481 ggtggcgatc ccgcactttg tcaggctgcg ttggcagcag ctaaacttgc gaagatcccg + 3541 aaaccaccaa gccaggcagt atatgaagtg ttcaaaaacg cgccattgga cttcaaaccg + 3601 tagtagagat ccggctgcta acaaagcccg aaaggaagct gagttggctg ctgccaccgc + 3661 tgagcaataa ctagcataac cccttggggc ctctaaacgg gtcttgaggg gttttttgct + 3721 gaaaggagga actatatccg gatcgagatc cccacgcgcc ctgtagcggc gcattaagcg + 3781 cggcgggtgt ggtggttacg cgcagcgtga ccgctacact tgccagcgcc ctagcgcccg + 3841 ctcctttcgc tttcttccct tcctttctcg ccacgttcgc cggctttccc cgtcaagctc + 3901 taaatcgggg catcccttta gggttccgat ttagtgcttt acggcacctc gaccccaaaa + 3961 aacttgatta gggtgatggt tcacgtagtg ggccatcgcc ctgatagacg gtttttcgcc + 4021 ctttgacgtt ggagtccacg ttctttaata gtggactctt gttccaaact ggaacaacac + 4081 tcaaccctat ctcggtctat tcttttgatt tataagggat tttgccga +// diff --git a/lib/VNTI files/pRDV-His6-mcherry.gb b/lib/VNTI files/pRDV-His6-mcherry.gb new file mode 100644 index 00000000..52d78e4c --- /dev/null +++ b/lib/VNTI files/pRDV-His6-mcherry.gb @@ -0,0 +1,1355 @@ +LOCUS pRDV-His6- 4128 bp DNA circular SYN 31-MAR-2009 +DEFINITION Ribosome display vector pRDV, complete sequence. +ACCESSION AY327136 +VERSION AY327136.1 GI:37575398 +SOURCE Ribosome display vector pRDV. + ORGANISM Ribosome display vector pRDV + other sequences; artificial sequences; vectors. +REFERENCE 1 (bases 1 to 4279) + AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P., + Grutter,M.G. and Pluckthun,A. + TITLE High-affinity binders selected from designed ankyrin repeat protein + libraries + JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004) +REFERENCE 2 (bases 1 to 4279) + AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and + Pluckthun,A. + TITLE Direct Submission + JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich, + Winterthurerstrasse 190, Zurich 8057, Switzerland +COMMENT http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|513187672| +COMMENT VNTDBDATE|514211405| +COMMENT LSOWNER| +COMMENT VNTNAME|pRDV-His6-mcherry| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pRDV-His6-mcherry" 0 4128 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 0 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4128 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 2011 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 2712 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 2000 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 1950 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 1980 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 1978 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 329 0 1575 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 1957 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 632 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 2 935 0 1925 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 161 0 1169 0 2040 0 0 +COMMENT "") #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 2313 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "Promoter_P_1" 30 0 0 1911 1927 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1911..1927") +COMMENT #28=(CFSignal (CObList) "Stem_Loop_1" 39 0 0 1928 1948 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1928..1948") +COMMENT #29=(CFSignal (CObList) "tolA spacer" 21 0 0 2716 3603 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2808..3695") +COMMENT #30=(CFSignal (CObList) "Rep_Origin_1" 33 0 0 1229 1885 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1229..1885") +COMMENT #31=(CFSignal (CObList) "AmpR" 4 0 0 213 1073 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "213..1073") +COMMENT #32=(CFSignal (CObList) "annealing site of tolAk" 21 0 1 2959 2979 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(3051..3071)") +COMMENT #33=(CFSignal (CObList) "orig T" 62 0 0 2014 2014 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2106..2106") +COMMENT #34=(CFSignal (CObList) "orig G" 21 0 0 2012 2012 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2104..2104") +COMMENT #35=(CFSignal (CObList) "Histag" 21 0 0 1978 1995 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2070..2087") +COMMENT #36=(CFSignal (CObList) "mcherry" 4 0 0 1975 2706 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2067..2798") +COMMENT #37=(CFSignal (CObList) "IVS-KpnI-mCherry-r" 21 0 1 2689 2717 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "IVS-KpnI-stop-mCherry-r (annealing site)" 28 0 +COMMENT 1 2677 2706 0 (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "T7-pRDV-f (annealing site)" 28 0 0 1905 1932 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "pRDV-seq" 27 0 0 1767 1787 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #41=(CFSignal (CObList) "mCherry-int-r" 21 0 1 2210 2233 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "T7-pRDV-f2" 27 0 0 1909 1955 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "IVS-BamHI-r" 27 0 1 2003 2028 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #44=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #45=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pRDV-His6-mcherry" 2) 5 "" 0 4) +COMMENT #46=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pRDV-His6-mcherry'" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Ribosome display vector pRDV, complete sequence." 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 03/19/09 04:07\214\337\214\343" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 03/31/09 12:30\214\337\214\343" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4128 bp" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #55=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 21-NOV-2008" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AY327136" +COMMENT 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AY327136.1 GI:37575398" +COMMENT 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Ribosome display vector pRDV." 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Ribosome display vector pRDV(Ribosome display vector pRDV)" +COMMENT 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1))) "Standard Fields") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 4279)" 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P.," +COMMENT 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Grutter,M.G. and Pluckthun,A." 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE High-affinity binders selected from designed ankyrin repeat protein" +COMMENT 1) +COMMENT #69=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " libraries" 1) +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004)" +COMMENT 1) +COMMENT #71=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 4279)" 1) +COMMENT #72=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and" +COMMENT 1) +COMMENT #73=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Pluckthun,A." 1) +COMMENT #74=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #75=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich," +COMMENT 1) +COMMENT #76=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Winterthurerstrasse 190, Zurich 8057, Switzerland" +COMMENT 1))) "References") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #78=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #79=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #80=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #82=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 213 (3 #31# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 213 End: 1073" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 213..1073" 1))) "AmpR") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1975 (3 #36# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1975 End: 2706" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2067..2798" 1))) "mcherry"))) +COMMENT "CDS (2 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1978 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1978 End: 1995" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2070..2087" 1))) "Histag") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2012 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2012 End: 2012" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2104..2104" 1))) "orig G") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2210 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2210 End: 2233 (Complementary)" +COMMENT 1))) "mCherry-int-r") +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2689 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2689 End: 2717 (Complementary)" +COMMENT 1))) "IVS-KpnI-mCherry-r") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2716 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2716 End: 3603" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "tolA spacer" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2808..3695" 1))) "tolA spacer") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2959 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2959 End: 2979 (Complementary)" +COMMENT 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3051..3071)" 1))) +COMMENT "annealing site of tolAk"))) +COMMENT "Misc. Feature (6 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1767 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1767 End: 1787" 1))) +COMMENT "pRDV-seq") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1909 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1909 End: 1955" 1))) +COMMENT "T7-pRDV-f2") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2003 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2003 End: 2028 (Complementary)" +COMMENT 1))) "IVS-BamHI-r"))) +COMMENT "Primer (3 total)") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #122=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1905 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1905 End: 1932" 1))) +COMMENT "T7-pRDV-f (annealing site)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2677 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2677 End: 2706 (Complementary)" +COMMENT 1))) +COMMENT "IVS-KpnI-stop-mCherry-r (annealing site)"))) +COMMENT "Primer Binding Site (2 total)") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #127=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1911 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1911 End: 1927" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) "T7" +COMMENT 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1911..1927" 1))) "Promoter_P_1"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1229 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1229 End: 1885" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "ColE1" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1229..1885" 1))) "Rep_Origin_1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 39 (7 39 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1928 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1928 End: 1948" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1928..1948" 1))) "Stem_Loop_1"))) +COMMENT "Stem Loop (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2014 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2014 End: 2014" 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2106..2106" 1))) "orig T"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #148=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #149=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3860936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26479848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 0 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26480168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3859816 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 329 " 1) +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1575 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3860856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3859576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 2011 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26480568 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 2313 " 1))))) "BbsI: 1 site") +COMMENT 8 12 "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3859896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 1978 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26480648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26479928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #168=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26480328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #169=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 935 " 1) +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #22# 2) 1 2 2 0 191) +COMMENT " N2: 1925 (on complementary strand)" +COMMENT 1))))) "BsaI: 2 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26480488 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #173=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 161 " 1) +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 1169 " 1) +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2040 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3859496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3860056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 1950 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3861176 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3858936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 2712 " 1))))) "KpnI: 1 site") +COMMENT 5 1 "GGTACC" "CCATGG") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26480008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3859976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 1980 " 1))))) "NsiI: 1 site") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26480248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 632 " 1))))) "PvuI: 1 site") 4 +COMMENT 2 "CGATCG" "GCTAGC") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3861096 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3861016 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 2000 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26480408 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3859736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3858856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26480088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #200=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 1957 " 1))))) "XhoI: 1 site") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26479768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #203=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #204=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #205=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #206=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #207=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #208=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #209=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #210=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #211=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #212=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #213=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #214=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #215=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #216=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #217=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #218=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #219=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #220=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #221=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #222=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #223=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #224=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #225=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #226=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #227=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #228=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #229=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #230=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #231=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #232=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #233=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #234=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #235=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #236=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #237=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #238=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #239=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #240=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #241=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #242=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -6) 1 1 0 1 1 +COMMENT (mapper: 31.7804 -16.1501 40.0378 40.0378 0.01 10 -1 4128 4128 1 0 0) +COMMENT #243=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1361 100) +COMMENT (CObjectList +COMMENT #244=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #245=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #209# 24763028 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.2757 6.2737 1 0.0214037) 0.151967) +COMMENT #246=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #206# 25064020 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pRDV-His6-mcherry" "@N" 1 0 +COMMENT 0.871165 0 -10 10.8148 1.44863 Nil) +COMMENT #247=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #205# 1196704579 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4128 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.19698 0.924127 Nil)) (CObjectList)) +COMMENT #248=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1013 100) +COMMENT (CObjectList +COMMENT #249=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -315 100) +COMMENT (CObjectList +COMMENT #250=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 4.64258 5.95102 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #251=(CLabel (CWidget 0 (0 0) 1 2 0 0 #204# 28 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT 14.9194 6.96932 0 -10 2.72243 1.04901 #250#) +COMMENT #252=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.16097 3.27336 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #253=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 393241 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mcherry" "@N" 1 +COMMENT -11.1918 -12.1963 0 -10 3.84637 1.04901 #252#)) +COMMENT (CObjectList)) +COMMENT #254=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -176 100) +COMMENT (CObjectList +COMMENT #255=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #208# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0.797825 2.14729 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #256=(CLabel (CWidget 0 (0 0) 1 2 0 0 #204# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tolA spacer" +COMMENT "@N" 1 -17.3469 1.74233 0 -10 5.295 1.04901 +COMMENT #255#) +COMMENT #257=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #212# 3801544 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 1.77801 1.9 +COMMENT 0.082322 1) +COMMENT #258=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 25133364 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "annealing site of tolAk" "@N" 1 -19.3034 +COMMENT -3.48466 0 -10 10.3652 1.04901 #257#) +COMMENT #259=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #212# 554 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.21713 1.9 +COMMENT 0.082322 1) +COMMENT #260=(CLabel (CWidget 0 (0 0) 1 2 0 0 #204# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 3.58616 -29.6196 0 -10 2.92224 1.04901 #259#) +COMMENT #261=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #212# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 1 +COMMENT 3.2688 1.9 0.082322 1) +COMMENT #262=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 24900628 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Histag" "@N" 1 +COMMENT 4.19184 -19.1656 0 -10 2.99717 1.04901 #261#) +COMMENT #263=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #212# 3801544 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 2.18832 1.9 +COMMENT 0.082322 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 3801728 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-KpnI-mCherry-r" "@N" 1 -16.607 -8.71165 +COMMENT 0 -10 8.91657 1.04901 #263#) +COMMENT #265=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #212# -1501 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.91624 1.9 +COMMENT 0.082322 1) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 3801504 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mCherry-int-r" +COMMENT "@N" 1 -6.87591 -15.681 0 -10 6.21912 1.04901 +COMMENT #265#)) (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1571 100) +COMMENT (CObjectList +COMMENT #268=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.58945 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 3801672 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pRDV-seq" "@N" +COMMENT 1 16.3272 -5.22699 0 -10 4.64561 1.04901 +COMMENT #268#) +COMMENT #270=(CPrimerArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #210# 1 100) +COMMENT (LOGPEN 0 6 6723840) 8 1.16464 3.30224 +COMMENT 3.37366) 0.4 0.082322 1.8 1.8 0) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 1195458887 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T7-pRDV-f2" +COMMENT "@N" 1 11.7842 -12.1963 0 -10 5.17011 1.04901 +COMMENT #270#) +COMMENT #272=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.23081 1.9 +COMMENT 0.082322 1) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 3801736 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "IVS-BamHI-r" +COMMENT "@N" 1 4.9685 -26.1349 0 -10 5.49481 1.04901 +COMMENT #272#)) (CObjectList)) +COMMENT #274=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1501 100) +COMMENT (CObjectList +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 2.20656 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 24806468 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-KpnI-stop-mCherry-r (annealing site)" +COMMENT "@N" 1 -20.6854 -10.454 0 -10 18.7073 1.04901 +COMMENT #275#) +COMMENT #277=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #225# 24889180 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 3.37974 1.9 +COMMENT 0.082322 1) +COMMENT #278=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 21563936 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "T7-pRDV-f (annealing site)" "@N" 1 18.8396 +COMMENT -6.96932 0 -10 12.0636 1.04901 #277#)) +COMMENT (CObjectList)) +COMMENT #279=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -594 100) +COMMENT (CObjectList +COMMENT #280=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 4 128) 6 1.32929 3.28335 3.37062) +COMMENT 0.4 0.082322 1.24929 1.8 1.8 0) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 25175484 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Promoter P 1" +COMMENT "@N" 1 9.15385 -13.9386 0 -10 6.01931 1.04901 +COMMENT #280#)) (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1222 100) +COMMENT (CObjectList +COMMENT #283=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 0.835356 3.40861 +COMMENT 4.40703 1 0.082322) 0.8 1.8 0) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 25083100 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Rep Origin 1" +COMMENT "@N" 1 17.528 -1.74233 0 -10 5.8195 1.04901 +COMMENT #283#)) (CObjectList)) +COMMENT #285=(CGroupWidget +COMMENT (CWidget 39 (7 39 0) 1 2 0 0 Nil -804 100) +COMMENT (CObjectList +COMMENT #286=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 3.34479 1.9 +COMMENT 0.082322 1) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 1414809415 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Stem Loop 1" +COMMENT "@N" 1 13.9108 -10.454 0 -10 5.74457 1.04901 +COMMENT #286#)) (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1362 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.2141 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #204# 3801672 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 3.48023 -31.3619 0 -10 2.72243 1.04901 #289#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #291=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #292=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1641 100) +COMMENT (CObjectList +COMMENT #293=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.21865 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 26537220 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (2011)" "@N (@S)" 5 5.03233 +COMMENT -27.8773 0 -10 5.49481 0.924127 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #211# 24943096 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.15337 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (2712)" "@N (@S)" 5 -15.9038 +COMMENT -6.96932 0 -10 4.62063 0.924127 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -1711 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #211# 25945968 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.23537 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (2000)" "@N (@S)" 5 4.72999 +COMMENT -24.3926 0 -10 4.4458 0.924127 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #211# 393220 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.31135 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 25092068 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (1950)" "@N (@S)" 5 5.86977 +COMMENT -15.681 0 -10 5.09519 0.924127 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -1086 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #211# 3801504 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.26576 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel (CWidget 0 (0 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (1980)" "@N (@S)" 5 5.12196 +COMMENT -22.6503 0 -10 4.42082 0.924127 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.2688 1.9 0.082322 +COMMENT 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 3801584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (1978)" "@N (@S)" 5 5.31789 +COMMENT -20.908 0 -10 4.77049 0.924127 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.30072 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 25135584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (1957)" "@N (@S)" 5 5.52373 +COMMENT -17.4233 0 -10 4.69556 0.924127 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -1086 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.31428 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 393240 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (632)" "@N (@S)" 5 14.8366 +COMMENT 8.71165 0 -10 4.17106 0.924127 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.75972 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #213# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (2313)" "@N (@S)" 5 -8.70956 +COMMENT -13.9386 0 -10 4.57068 0.924127 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.77473 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 24768836 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (329)" "@N (@S)" 5 11.8017 +COMMENT 12.1963 0 -10 4.69556 0.924127 #320#) +COMMENT #322=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.88123 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 24999528 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1575)" "@N (@S)" 5 17.2328 +COMMENT -3.48466 0 -10 5.17011 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 2 (10 #22# 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.85382 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 2 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (935)" "@N (@S)" 5 17.0401 +COMMENT 1.74233 0 -10 4.12111 0.924127 #325#) +COMMENT #327=(CScratch +COMMENT (CWidget 2 (1 #22# 2) 1 2 0 0 #211# +COMMENT 1944545584 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 3.34935 1.9 0.082322 1) +COMMENT #328=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #203# 24707074 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (1925)" "@N (@S)" 5 14.8821 +COMMENT -8.71165 0 -10 4.57068 0.924127 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #211# +COMMENT 1414808404 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 6.03004 1.9 0.082322 1) +COMMENT #331=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (161)" "@N (@S)" 5 8.77925 +COMMENT 13.9386 0 -10 4.64561 0.924127 #330#) +COMMENT #332=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.49821 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (1169)" "@N (@S)" 5 17.6042 0 0 +COMMENT -10 5.17011 0.924127 #332#) +COMMENT #334=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.17458 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel (CWidget 0 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2040)" "@N (@S)" 5 4.32801 +COMMENT -33.1043 0 -10 5.295 0.924127 #334#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #336=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #337=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21207712 (CObList))) +FEATURES Location/Qualifiers + promoter 1911..1927 + /vntifkey="30" + /label=Promoter_P_1 + /note="T7" + stem_loop 1928..1948 + /vntifkey="39" + /label=Stem_Loop_1 + misc_feature 2716..3603 + /vntifkey="21" + /label=tolA\spacer + /note="tolA spacer" + rep_origin 1229..1885 + /vntifkey="33" + /label=Rep_Origin_1 + /note="ColE1" + CDS 213..1073 + /vntifkey="4" + /label=AmpR + misc_feature complement(2959..2979) + /vntifkey="21" + /label=annealing\site\of\tolAk + /note="Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" + mutation 2014..2014 + /vntifkey="62" + /label=orig\T + misc_feature 2012..2012 + /vntifkey="21" + /label=orig\G + misc_feature 1978..1995 + /vntifkey="21" + /label=Histag + CDS 1975..2706 + /vntifkey="4" + /label=mcherry + misc_feature complement(2689..2717) + /vntifkey="21" + /label=IVS-KpnI-mCherry-r + primer_bind complement(2677..2706) + /vntifkey="28" + /label=IVS-KpnI-stop-mCherry-r\(annealing\site) + primer_bind 1905..1932 + /vntifkey="28" + /label=T7-pRDV-f\(annealing\site) + primer 1767..1787 + /vntifkey="27" + /label=pRDV-seq + misc_feature complement(2210..2233) + /vntifkey="21" + /label=mCherry-int-r + primer 1909..1955 + /vntifkey="27" + /label=T7-pRDV-f2 + primer complement(2003..2028) + /vntifkey="27" + /label=IVS-BamHI-r +BASE COUNT 1188 a 947 c 1061 g 932 t +ORIGIN + 1 tttcggccta ttggttaaaa aatgagctga tttaacaaaa atttaacgcg aattttaaca + 61 aaatattaac gtttacaatt tcaggtggca cttttcgggg aaatgtgcgc ggaaccccta + 121 tttgtttatt tttctaaata cattcaaata tgtatccgct catgagacaa taaccctgat + 181 aaatgcttca ataatattga aaaaggaaga gtatgagtat tcaacatttc cgtgtcgccc + 241 ttattccctt ttttgcggca ttttgccttc ctgtttttgc tcacccagaa acgctggtga + 301 aagtaaaaga tgctgaagat cagttgggtg cacgagtggg ttacatcgaa ctggatctca + 361 acagcggtaa gatccttgag agttttcgcc ccgaagaacg ttttccaatg atgagcactt + 421 ttaaagttct gctatgtggc gcggtattat cccgtattga cgccgggcaa gagcaactcg + 481 gtcgccgcat acactattct cagaatgact tggttgagta ctcaccagtc acagaaaagc + 541 atcttacgga tggcatgaca gtaagagaat tatgcagtgc tgccataacc atgagtgata + 601 acactgcggc caacttactt ctgacaacga tcggaggacc gaaggagcta accgcttttt + 661 tgcacaacat gggggatcat gtaactcgcc ttgatcgttg ggaaccggag ctgaatgaag + 721 ccataccaaa cgacgagcgt gacaccacga tgcctgtagc aatggcaaca acgttgcgca + 781 aactattaac tggcgaacta cttactctag cttcccggca acaattaata gactggatgg + 841 aggcggataa agttgcagga ccacttctgc gctcggccct tccggctggc tggtttattg + 901 ctgataaatc tggagccggt gagcgtgggt ctcgcggtat cattgcagca ctggggccag + 961 atggtaagcc ctcccgtatc gtagttatct acacgacggg gagtcaggca actatggatg + 1021 aacgaaatag acagatcgct gagataggtg cctcactgat taagcattgg taactgtcag + 1081 accaagttta ctcatatata ctttagattg atttaaaact tcatttttaa tttaaaagga + 1141 tctaggtgaa gatccttttt gataatctca tgaccaaaat cccttaacgt gagttttcgt + 1201 tccactgagc gtcagacccc gtagaaaaga tcaaaggatc ttcttgagat cctttttttc + 1261 tgcgcgtaat ctgctgcttg caaacaaaaa aaccaccgct accagcggtg gtttgtttgc + 1321 cggatcaaga gctaccaact ctttttccga aggtaactgg cttcagcaga gcgcagatac + 1381 caaatactgt ccttctagtg tagccgtagt taggccacca cttcaagaac tctgtagcac + 1441 cgcctacata cctcgctctg ctaatcctgt taccagtggc tgctgccagt ggcgataagt + 1501 cgtgtcttac cgggttggac tcaagacgat agttaccgga taaggcgcag cggtcgggct + 1561 gaacgggggg ttcgtgcaca cagcccagct tggagcgaac gacctacacc gaactgagat + 1621 acctacagcg tgagctatga gaaagcgcca cgcttcccga agggagaaag gcggacaggt + 1681 atccggtaag cggcagggtc ggaacaggag agcgcacgag ggagcttcca gggggaaacg + 1741 cctggtatct ttatagtcct gtcgggtttc gccacctctg acttgagcgt cgatttttgt + 1801 gatgctcgtc aggggggcgg agcctatgga aaaacgccag caacgcggcc tttttacggt + 1861 tcctggcctt ttgctggcct tttgctcaca tgacccgaca ccatcgaaat taatacgact + 1921 cactataggg agaccacaac ggtttcccga attcactcga gaaaggagaa aaaaatgcat + 1981 catcaccatc atcaccaagt cgacctgctg gatccaaaca tggcaatcat taaggagttc + 2041 atgagattca aagttcacat ggaaggttct gtaaatggac atgaatttga aatagaaggt + 2101 gaaggagaag gaaggcctta tgaaggaacc caaaccgcga agctaaaagt tactaagggt + 2161 ggcccattac catttgcatg ggatatcctt agccctcaat tcatgtatgg gtcaaaggct + 2221 tatgtcaagc accccgccga cattccagac tatctaaagt tatcttttcc cgaagggttt + 2281 aagtgggagc gtgtgatgaa cttcgaagac ggtggcgtgg taacagtgac tcaggattcg + 2341 tccctgcaag atggtgaatt tatctacaaa gtcaaattaa gaggaactaa ctttccatct + 2401 gacggcccgg ttatgcaaaa aaagacaatg ggctgggagg cctcctcaga acgaatgtac + 2461 cctgaagatg gtgccttgaa gggtgagatt aaacaaagat tgaaattgaa agatggtgga + 2521 cattatgacg ctgaggttaa aacgacatac aaagctaaga aacctgtcca gctcccaggt + 2581 gcttacaatg taaatataaa acttgatatt acatcacata atgaagatta tacgatagtt + 2641 gaacaatacg aaagggctga ggggagacat agtactggtg gcatggatga actatacaaa + 2701 ggttctggta ccgcaggatc tggtggccag aagcaagctg aagaggcggc agcgaaagcg + 2761 gcggcagatg ctaaagcgaa ggccgaagca gatgctaaag ctgcggaaga agcagcgaag + 2821 aaagcggctg cagacgcaaa gaaaaaagca gaagcagaag ccgccaaagc cgcagccgaa + 2881 gcgcagaaaa aagccgaggc agccgctgcg gcactgaaga agaaagcgga agcggcagaa + 2941 gcagctgcag ctgaagcaag aaagaaagcg gcaactgaag ctgctgaaaa agccaaagca + 3001 gaagctgaga agaaagcggc tgctgaaaag gctgcagctg ataagaaagc ggcagcagag + 3061 aaagctgcag ccgacaaaaa agcagcagaa aaagcggctg ctgaaaaggc agcagctgat + 3121 aagaaagcag cggcagaaaa agccgccgca gacaaaaaag cggcagcggc aaaagctgca + 3181 gctgaaaaag ccgctgcagc aaaagcggcc gcagaggcag atgatatttt cggtgagcta + 3241 agctctggta agaatgcacc gaaaacgggg ggaggggcga aagggaacaa tgcttcgcct + 3301 gccgggagtg gtaatactaa aaacaatggc gcatcagggg ccgatatcaa taactatgcc + 3361 gggcagatta aatctgctat cgaaagtaag ttctatgacg catcgtccta tgcaggcaaa + 3421 acctgtacgc tgcgcataaa actggcaccc gatggtatgt tactggatat caaacctgaa + 3481 ggtggcgatc ccgcactttg tcaggctgcg ttggcagcag ctaaacttgc gaagatcccg + 3541 aaaccaccaa gccaggcagt atatgaagtg ttcaaaaacg cgccattgga cttcaaaccg + 3601 tagtagagat ccggctgcta acaaagcccg aaaggaagct gagttggctg ctgccaccgc + 3661 tgagcaataa ctagcataac cccttggggc ctctaaacgg gtcttgaggg gttttttgct + 3721 gaaaggagga actatatccg gatcgagatc cccacgcgcc ctgtagcggc gcattaagcg + 3781 cggcgggtgt ggtggttacg cgcagcgtga ccgctacact tgccagcgcc ctagcgcccg + 3841 ctcctttcgc tttcttccct tcctttctcg ccacgttcgc cggctttccc cgtcaagctc + 3901 taaatcgggg catcccttta gggttccgat ttagtgcttt acggcacctc gaccccaaaa + 3961 aacttgatta gggtgatggt tcacgtagtg ggccatcgcc ctgatagacg gtttttcgcc + 4021 ctttgacgtt ggagtccacg ttctttaata gtggactctt gttccaaact ggaacaacac + 4081 tcaaccctat ctcggtctat tcttttgatt tataagggat tttgccga +// diff --git a/lib/VNTI files/pRDV-His6-tolAk.gb b/lib/VNTI files/pRDV-His6-tolAk.gb new file mode 100644 index 00000000..61bee13d --- /dev/null +++ b/lib/VNTI files/pRDV-His6-tolAk.gb @@ -0,0 +1,1248 @@ +LOCUS pRDV-His6- 3438 bp DNA circular SYN 30-JUN-2009 +DEFINITION Ribosome display vector pRDV, complete sequence. +ACCESSION AY327136 +VERSION AY327136.1 GI:37575398 +SOURCE Ribosome display vector pRDV. + ORGANISM Ribosome display vector pRDV + other sequences; artificial sequences; vectors. +REFERENCE 1 (bases 1 to 4279) + AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P., + Grutter,M.G. and Pluckthun,A. + TITLE High-affinity binders selected from designed ankyrin repeat protein + libraries + JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004) +REFERENCE 2 (bases 1 to 4279) + AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and + Pluckthun,A. + TITLE Direct Submission + JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich, + Winterthurerstrasse 190, Zurich 8057, Switzerland +COMMENT http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|522433243| +COMMENT VNTDBDATE|522433752| +COMMENT LSOWNER| +COMMENT VNTNAME|pRDV-His6-tolAk| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pRDV-His6-tolAk" 0 3438 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 0 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3438 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 2011 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 2000 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 1950 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 1980 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 1978 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 329 0 1575 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 1957 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 632 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 2 935 0 1925 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 2 161 0 1169 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "Promoter_P_1" 30 0 0 1911 1927 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1911..1927") +COMMENT #28=(CFSignal (CObList) "Stem_Loop_1" 39 0 0 1928 1948 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1928..1948") +COMMENT #29=(CFSignal (CObList) "tolA spacer" 21 0 0 2029 2913 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2808..3695") +COMMENT #30=(CFSignal (CObList) "Rep_Origin_1" 33 0 0 1229 1885 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1229..1885") +COMMENT #31=(CFSignal (CObList) "AmpR" 4 0 0 213 1073 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "213..1073") +COMMENT #32=(CFSignal (CObList) "annealing site of tolAk" 21 0 1 2269 2289 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(3051..3071)") +COMMENT #33=(CFSignal (CObList) "orig T" 62 0 0 2014 2014 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2106..2106") +COMMENT #34=(CFSignal (CObList) "orig G" 21 0 0 2012 2012 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2104..2104") +COMMENT #35=(CFSignal (CObList) "Histag" 21 0 0 1978 1995 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2070..2087") +COMMENT #36=(CFSignal (CObList) "mcherry" 4 0 0 1975 2028 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2067..2798") +COMMENT #37=(CFSignal (CObList) "T7-pRDV-f (annealing site)" 28 0 0 1905 1932 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "pRDV-seq" 27 0 0 1767 1787 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "T7-pRDV-f2" 27 0 0 1909 1955 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "IVS-BamHI-r" 27 0 1 2003 2028 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #41=(CFSignal (CObList) "tolA-f" 27 0 0 2029 2053 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #42=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #43=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "pRDV-His6-tolAk" +COMMENT 2) 5 "" 0 4) +COMMENT #44=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pRDV-His6-tolAk'" 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Ribosome display vector pRDV, complete sequence." 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 06/30/09 04:20\214\337\214\343" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 06/30/09 04:29\214\337\214\343" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3438 bp" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #53=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 21-NOV-2008" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AY327136" +COMMENT 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AY327136.1 GI:37575398" +COMMENT 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Ribosome display vector pRDV." 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Ribosome display vector pRDV(Ribosome display vector pRDV)" +COMMENT 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1))) "Standard Fields") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 4279)" 1) +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P.," +COMMENT 1) +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Grutter,M.G. and Pluckthun,A." 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE High-affinity binders selected from designed ankyrin repeat protein" +COMMENT 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " libraries" 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004)" +COMMENT 1) +COMMENT #69=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 4279)" 1) +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and" +COMMENT 1) +COMMENT #71=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Pluckthun,A." 1) +COMMENT #72=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #73=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich," +COMMENT 1) +COMMENT #74=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Winterthurerstrasse 190, Zurich 8057, Switzerland" +COMMENT 1))) "References") +COMMENT #75=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #76=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #77=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 2 0 0 178) +COMMENT (CObjectList +COMMENT #80=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 213 (3 #31# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 213 End: 1073" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 213..1073" 1))) "AmpR") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1975 (3 #36# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1975 End: 2028" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2067..2798" 1))) "mcherry"))) +COMMENT "CDS (2 total)") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1978 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1978 End: 1995" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2070..2087" 1))) "Histag") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2012 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2012 End: 2012" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2104..2104" 1))) "orig G") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2029 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2029 End: 2913" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "tolA spacer" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2808..3695" 1))) "tolA spacer") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2269 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2269 End: 2289 (Complementary)" +COMMENT 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3051..3071)" 1))) +COMMENT "annealing site of tolAk"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 2 1 0 178) +COMMENT (CObjectList +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1767 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1767 End: 1787" 1))) +COMMENT "pRDV-seq") +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1909 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1909 End: 1955" 1))) +COMMENT "T7-pRDV-f2") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2003 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2003 End: 2028 (Complementary)" +COMMENT 1))) "IVS-BamHI-r") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2029 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2029 End: 2053" 1))) +COMMENT "tolA-f"))) "Primer (4 total)") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #118=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1905 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1905 End: 1932" 1))) +COMMENT "T7-pRDV-f (annealing site)"))) +COMMENT "Primer Binding Site (1 total)") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1911 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1911 End: 1927" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) "T7" +COMMENT 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1911..1927" 1))) "Promoter_P_1"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #127=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1229 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1229 End: 1885" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "ColE1" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1229..1885" 1))) "Rep_Origin_1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 39 (7 39 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1928 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1928 End: 1948" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1928..1948" 1))) "Stem_Loop_1"))) +COMMENT "Stem Loop (1 total)") +COMMENT #137=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #138=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2014 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2014 End: 2014" 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2106..2106" 1))) "orig T"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #142=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #143=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29407888 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #144=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29426872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 0 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #145=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29435352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #146=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29423832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 329 " 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1575 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29407808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29423592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #152=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 2011 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29441840 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29423912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 1978 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29442880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29426952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29438552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 935 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #22# 2) 1 2 2 0 191) +COMMENT " N2: 1925 (on complementary strand)" +COMMENT 1))))) "BsaI: 2 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29441760 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #165=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 161 " 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 1169 " 1))))) "BspHI: 2 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #168=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29408368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29424072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 1950 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29408128 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29408288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29427032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29423992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #176=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 1980 " 1))))) "NsiI: 1 site") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29435432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 632 " 1))))) "PvuI: 1 site") 4 +COMMENT 2 "CGATCG" "GCTAGC") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29408048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29407968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 2000 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29438632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29423752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29408208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29427112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #189=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 1957 " 1))))) "XhoI: 1 site") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 29445040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #192=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #193=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #194=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #195=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #196=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #197=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #198=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #199=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #200=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #201=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #202=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #203=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #204=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #205=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #206=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #207=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #208=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #209=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #210=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #211=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #212=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #213=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #214=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #215=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #216=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #217=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #218=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #219=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #220=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #221=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #222=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #223=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #224=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #225=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #226=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #227=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #228=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #229=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #230=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #231=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -6) 1 1 0 1 1 +COMMENT (mapper: 26.1607 -16.1501 40.0378 40.0378 0.01 10 -1 3438 3438 1 0 0) +COMMENT #232=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1361 100) +COMMENT (CObjectList +COMMENT #233=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1013 100) +COMMENT (CObjectList +COMMENT #234=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #198# 29418756 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27601 6.27401 1 0.0214037) 0.182466) +COMMENT #235=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #195# 1196704579 100) +COMMENT (LOGPEN 1414812739 1195463745 1195594823) 1414809415 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pRDV-His6-tolAk" "@N" 1 0 +COMMENT 0.871165 0 -10 8.96653 1.44863 Nil) +COMMENT #236=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #194# 1128350019 100) +COMMENT (LOGPEN 1414808387 1096045652 1413694292) 1128482631 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3438 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #237=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #238=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -455 100) +COMMENT (CObjectList +COMMENT #239=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 4.31532 5.88636 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #240=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 27928148 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT 16.048 3.48466 0 -10 2.72243 1.04901 #239#) +COMMENT #241=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.57277 2.6713 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #242=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 23986156 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mcherry" "@N" 1 +COMMENT -15.3375 -6.96932 0 -10 3.84637 1.04901 #241#)) +COMMENT (CObjectList)) +COMMENT #243=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #244=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #197# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0.957947 2.57277 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #245=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 27962796 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tolA spacer" +COMMENT "@N" 1 -17.2543 5.22699 0 -10 5.295 1.04901 +COMMENT #244#) +COMMENT #246=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #201# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 1 +COMMENT 2.13485 1.9 0.082322 1) +COMMENT #247=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 27927892 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "annealing site of tolAk" "@N" 1 -19.2191 +COMMENT 3.48466 0 -10 10.3652 1.04901 #246#) +COMMENT #248=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.60379 1.9 +COMMENT 0.082322 1) +COMMENT #249=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 27927636 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT -16.2909 -1.74233 0 -10 2.92224 1.04901 #248#) +COMMENT #250=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #201# 24889180 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 2.66583 1.9 +COMMENT 0.082322 1) +COMMENT #251=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 27963052 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Histag" "@N" 1 +COMMENT -8.92127 -13.9386 0 -10 2.99717 1.04901 #250#)) +COMMENT (CObjectList)) +COMMENT #252=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1083 100) +COMMENT (CObjectList +COMMENT #253=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.05083 1.9 +COMMENT 0.082322 1) +COMMENT #254=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 1128482627 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pRDV-seq" "@N" +COMMENT 1 -4.55026 -27.8773 0 -10 4.64561 1.04901 +COMMENT #253#) +COMMENT #255=(CPrimerArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #199# 29518500 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1.16464 2.70597 +COMMENT 2.79173) 0.4 0.082322 1.8 1.8 0) +COMMENT #256=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 27777604 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T7-pRDV-f2" +COMMENT "@N" 1 -9.10389 -20.908 0 -10 5.17011 1.04901 +COMMENT #255#) +COMMENT #257=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #201# 3801544 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 2.62021 1.9 +COMMENT 0.082322 1) +COMMENT #258=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 1414812739 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "IVS-BamHI-r" +COMMENT "@N" 1 -16.7889 -5.22699 0 -10 5.49481 +COMMENT 1.04901 #257#) +COMMENT #259=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #201# 3801544 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 2.57277 1.9 +COMMENT 0.082322 1) +COMMENT #260=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 27927380 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tolA-f" "@N" 1 +COMMENT -16.1515 1.74233 0 -10 2.52262 1.04901 #259#)) +COMMENT (CObjectList)) +COMMENT #261=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1152 100) +COMMENT (CObjectList +COMMENT #262=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #214# 554 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 2.79903 1.9 +COMMENT 0.082322 1) +COMMENT #263=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 27927124 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "T7-pRDV-f (annealing site)" "@N" 1 -11.4229 +COMMENT -26.1349 0 -10 12.0636 1.04901 #262#)) +COMMENT (CObjectList)) +COMMENT #264=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1641 100) +COMMENT (CObjectList +COMMENT #265=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #215# 0 100) +COMMENT (LOGPEN 0 4 128) 6 1.32929 2.70082 2.78808) +COMMENT 0.4 0.082322 1.24929 1.8 1.8 0) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 1414809415 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Promoter P 1" +COMMENT "@N" 1 -9.45051 -19.1656 0 -10 6.01931 +COMMENT 1.04901 #265#)) (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -176 100) +COMMENT (CObjectList +COMMENT #268=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 0.835356 2.8337 +COMMENT 4.0325 1 0.082322) 0.8 1.8 0) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 27780164 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Rep Origin 1" +COMMENT "@N" 1 9.01446 -13.9386 0 -10 5.8195 1.04901 +COMMENT #268#)) (CObjectList)) +COMMENT #270=(CGroupWidget +COMMENT (CWidget 39 (7 39 0) 1 2 0 0 Nil -734 100) +COMMENT (CObjectList +COMMENT #271=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 2.75706 1.9 +COMMENT 0.082322 1) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 1196704583 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Stem Loop 1" +COMMENT "@N" 1 -9.29174 -22.6503 0 -10 5.74457 +COMMENT 1.04901 #271#)) (CObjectList)) +COMMENT #273=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #274=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #201# -1501 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.60014 1.9 +COMMENT 0.082322 1) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 27868812 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT -16.3062 0 0 -10 2.72243 1.04901 #274#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #276=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1362 100) +COMMENT (CObjectList +COMMENT #277=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1013 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.60562 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 1414809415 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (2011)" "@N (@S)" 5 -17.468 +COMMENT -3.48466 0 -10 5.49481 0.924127 #278#)) +COMMENT (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -804 100) +COMMENT (CObjectList +COMMENT #281=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.62569 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 1414809415 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (2000)" "@N (@S)" 5 -14.8821 +COMMENT -8.71165 0 -10 4.4458 0.924127 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #284=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.71692 1.9 +COMMENT 0.082322 1) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 25175484 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (1950)" "@N (@S)" 5 -9.63239 +COMMENT -17.4233 0 -10 5.09519 0.924127 #284#)) +COMMENT (CObjectList)) +COMMENT #286=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #287=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.66218 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 1094795591 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (1980)" "@N (@S)" 5 -13.5362 +COMMENT -10.454 0 -10 4.42082 0.924127 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.66583 1.9 +COMMENT 0.082322 1) +COMMENT #291=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (1978)" "@N (@S)" 5 -11.8626 +COMMENT -12.1963 0 -10 4.77049 0.924127 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -1714 100) +COMMENT (CObjectList +COMMENT #293=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #200# 24943096 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.70415 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 27785036 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (1957)" "@N (@S)" 5 -9.43765 +COMMENT -15.681 0 -10 4.69556 0.924127 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #200# 3801504 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.12182 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 1195458887 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (632)" "@N (@S)" 5 16.3534 +COMMENT 5.22699 0 -10 4.17106 0.924127 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.6747 1.9 0.082322 +COMMENT 1) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 27895492 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (329)" "@N (@S)" 5 11.8017 +COMMENT 12.1963 0 -10 4.69556 0.924127 #299#) +COMMENT #301=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #200# 25945968 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.40117 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 27403500 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1575)" "@N (@S)" 5 7.14247 +COMMENT -15.681 0 -10 5.17011 0.924127 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 2 (10 #22# 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #200# +COMMENT 1414808404 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 4.56895 1.9 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 3801736 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (935)" "@N (@S)" 5 17.0401 +COMMENT -1.74233 0 -10 4.12111 0.924127 #304#) +COMMENT #306=(CScratch +COMMENT (CWidget 2 (1 #22# 2) 1 2 0 0 #200# 393220 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.76254 1.9 +COMMENT 0.082322 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 393240 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (1925)" "@N (@S)" 5 -8.90476 +COMMENT -24.3926 0 -10 4.57068 0.924127 #306#)) +COMMENT (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 2 (10 #24# 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.98124 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 21563936 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (161)" "@N (@S)" 5 8.77925 +COMMENT 13.9386 0 -10 4.64561 0.924127 #309#) +COMMENT #311=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.14198 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 26537220 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (1169)" "@N (@S)" 5 15.5526 +COMMENT -8.71165 0 -10 5.17011 0.924127 #311#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #313=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1783 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #314=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList #315=(XLATFRAGMENT 1974 104 0 1 1975 314)) +COMMENT (CObList #316=(AnlzXLATItem 1974 2288 1 1974 2288)) 1 (CObList)) +COMMENT (CObList) 0 (CStringList) 1944749780 24224416 (CObList))) +FEATURES Location/Qualifiers + promoter 1911..1927 + /vntifkey="30" + /label=Promoter_P_1 + /note="T7" + stem_loop 1928..1948 + /vntifkey="39" + /label=Stem_Loop_1 + misc_feature 2029..2913 + /vntifkey="21" + /label=tolA\spacer + /note="tolA spacer" + rep_origin 1229..1885 + /vntifkey="33" + /label=Rep_Origin_1 + /note="ColE1" + CDS 213..1073 + /vntifkey="4" + /label=AmpR + misc_feature complement(2269..2289) + /vntifkey="21" + /label=annealing\site\of\tolAk + /note="Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" + mutation 2014..2014 + /vntifkey="62" + /label=orig\T + misc_feature 2012..2012 + /vntifkey="21" + /label=orig\G + misc_feature 1978..1995 + /vntifkey="21" + /label=Histag + CDS 1975..2028 + /vntifkey="4" + /label=mcherry + primer_bind 1905..1932 + /vntifkey="28" + /label=T7-pRDV-f\(annealing\site) + primer 1767..1787 + /vntifkey="27" + /label=pRDV-seq + primer 1909..1955 + /vntifkey="27" + /label=T7-pRDV-f2 + primer complement(2003..2028) + /vntifkey="27" + /label=IVS-BamHI-r + primer 2029..2053 + /vntifkey="27" + /label=tolA-f +BASE COUNT 958 a 825 c 888 g 767 t +ORIGIN + 1 tttcggccta ttggttaaaa aatgagctga tttaacaaaa atttaacgcg aattttaaca + 61 aaatattaac gtttacaatt tcaggtggca cttttcgggg aaatgtgcgc ggaaccccta + 121 tttgtttatt tttctaaata cattcaaata tgtatccgct catgagacaa taaccctgat + 181 aaatgcttca ataatattga aaaaggaaga gtatgagtat tcaacatttc cgtgtcgccc + 241 ttattccctt ttttgcggca ttttgccttc ctgtttttgc tcacccagaa acgctggtga + 301 aagtaaaaga tgctgaagat cagttgggtg cacgagtggg ttacatcgaa ctggatctca + 361 acagcggtaa gatccttgag agttttcgcc ccgaagaacg ttttccaatg atgagcactt + 421 ttaaagttct gctatgtggc gcggtattat cccgtattga cgccgggcaa gagcaactcg + 481 gtcgccgcat acactattct cagaatgact tggttgagta ctcaccagtc acagaaaagc + 541 atcttacgga tggcatgaca gtaagagaat tatgcagtgc tgccataacc atgagtgata + 601 acactgcggc caacttactt ctgacaacga tcggaggacc gaaggagcta accgcttttt + 661 tgcacaacat gggggatcat gtaactcgcc ttgatcgttg ggaaccggag ctgaatgaag + 721 ccataccaaa cgacgagcgt gacaccacga tgcctgtagc aatggcaaca acgttgcgca + 781 aactattaac tggcgaacta cttactctag cttcccggca acaattaata gactggatgg + 841 aggcggataa agttgcagga ccacttctgc gctcggccct tccggctggc tggtttattg + 901 ctgataaatc tggagccggt gagcgtgggt ctcgcggtat cattgcagca ctggggccag + 961 atggtaagcc ctcccgtatc gtagttatct acacgacggg gagtcaggca actatggatg + 1021 aacgaaatag acagatcgct gagataggtg cctcactgat taagcattgg taactgtcag + 1081 accaagttta ctcatatata ctttagattg atttaaaact tcatttttaa tttaaaagga + 1141 tctaggtgaa gatccttttt gataatctca tgaccaaaat cccttaacgt gagttttcgt + 1201 tccactgagc gtcagacccc gtagaaaaga tcaaaggatc ttcttgagat cctttttttc + 1261 tgcgcgtaat ctgctgcttg caaacaaaaa aaccaccgct accagcggtg gtttgtttgc + 1321 cggatcaaga gctaccaact ctttttccga aggtaactgg cttcagcaga gcgcagatac + 1381 caaatactgt ccttctagtg tagccgtagt taggccacca cttcaagaac tctgtagcac + 1441 cgcctacata cctcgctctg ctaatcctgt taccagtggc tgctgccagt ggcgataagt + 1501 cgtgtcttac cgggttggac tcaagacgat agttaccgga taaggcgcag cggtcgggct + 1561 gaacgggggg ttcgtgcaca cagcccagct tggagcgaac gacctacacc gaactgagat + 1621 acctacagcg tgagctatga gaaagcgcca cgcttcccga agggagaaag gcggacaggt + 1681 atccggtaag cggcagggtc ggaacaggag agcgcacgag ggagcttcca gggggaaacg + 1741 cctggtatct ttatagtcct gtcgggtttc gccacctctg acttgagcgt cgatttttgt + 1801 gatgctcgtc aggggggcgg agcctatgga aaaacgccag caacgcggcc tttttacggt + 1861 tcctggcctt ttgctggcct tttgctcaca tgacccgaca ccatcgaaat taatacgact + 1921 cactataggg agaccacaac ggtttcccga attcactcga gaaaggagaa aaaaatgcat + 1981 catcaccatc atcaccaagt cgacctgctg gatccaaaca tggcaatctc tggtggccag + 2041 aagcaagctg aagaggcggc agcgaaagcg gcggcagatg ctaaagcgaa ggccgaagca + 2101 gatgctaaag ctgcggaaga agcagcgaag aaagcggctg cagacgcaaa gaaaaaagca + 2161 gaagcagaag ccgccaaagc cgcagccgaa gcgcagaaaa aagccgaggc agccgctgcg + 2221 gcactgaaga agaaagcgga agcggcagaa gcagctgcag ctgaagcaag aaagaaagcg + 2281 gcaactgaag ctgctgaaaa agccaaagca gaagctgaga agaaagcggc tgctgaaaag + 2341 gctgcagctg ataagaaagc ggcagcagag aaagctgcag ccgacaaaaa agcagcagaa + 2401 aaagcggctg ctgaaaaggc agcagctgat aagaaagcag cggcagaaaa agccgccgca + 2461 gacaaaaaag cggcagcggc aaaagctgca gctgaaaaag ccgctgcagc aaaagcggcc + 2521 gcagaggcag atgatatttt cggtgagcta agctctggta agaatgcacc gaaaacgggg + 2581 ggaggggcga aagggaacaa tgcttcgcct gccgggagtg gtaatactaa aaacaatggc + 2641 gcatcagggg ccgatatcaa taactatgcc gggcagatta aatctgctat cgaaagtaag + 2701 ttctatgacg catcgtccta tgcaggcaaa acctgtacgc tgcgcataaa actggcaccc + 2761 gatggtatgt tactggatat caaacctgaa ggtggcgatc ccgcactttg tcaggctgcg + 2821 ttggcagcag ctaaacttgc gaagatcccg aaaccaccaa gccaggcagt atatgaagtg + 2881 ttcaaaaacg cgccattgga cttcaaaccg tagtagagat ccggctgcta acaaagcccg + 2941 aaaggaagct gagttggctg ctgccaccgc tgagcaataa ctagcataac cccttggggc + 3001 ctctaaacgg gtcttgaggg gttttttgct gaaaggagga actatatccg gatcgagatc + 3061 cccacgcgcc ctgtagcggc gcattaagcg cggcgggtgt ggtggttacg cgcagcgtga + 3121 ccgctacact tgccagcgcc ctagcgcccg ctcctttcgc tttcttccct tcctttctcg + 3181 ccacgttcgc cggctttccc cgtcaagctc taaatcgggg catcccttta gggttccgat + 3241 ttagtgcttt acggcacctc gaccccaaaa aacttgatta gggtgatggt tcacgtagtg + 3301 ggccatcgcc ctgatagacg gtttttcgcc ctttgacgtt ggagtccacg ttctttaata + 3361 gtggactctt gttccaaact ggaacaacac tcaaccctat ctcggtctat tcttttgatt + 3421 tataagggat tttgccga +// diff --git a/lib/VNTI files/pRDV-NanoTag15-mcherry(SD-).gb b/lib/VNTI files/pRDV-NanoTag15-mcherry(SD-).gb new file mode 100644 index 00000000..26851a89 --- /dev/null +++ b/lib/VNTI files/pRDV-NanoTag15-mcherry(SD-).gb @@ -0,0 +1,956 @@ +LOCUS pRDV-NanoTag15-m 4155 bp DNA circular SYN 13-JUL-2009 +DEFINITION Ribosome display vector pRDV, complete sequence. +ACCESSION AY327136 +VERSION AY327136.1 GI:37575398 +SOURCE Ribosome display vector pRDV. + ORGANISM Ribosome display vector pRDV + other sequences; artificial sequences; vectors. +REFERENCE 1 (bases 1 to 4279) + AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P., + Grutter,M.G. and Pluckthun,A. + TITLE High-affinity binders selected from designed ankyrin repeat protein + libraries + JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004) +REFERENCE 2 (bases 1 to 4279) + AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and + Pluckthun,A. + TITLE Direct Submission + JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich, + Winterthurerstrasse 190, Zurich 8057, Switzerland +COMMENT http://www.informaxinc.com/ +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|523748990| +COMMENT VNTDBDATE|523748990| +COMMENT LSOWNER| +COMMENT VNTNAME|pRDV-NanoTag15-mcherry(SD-)| +COMMENT VNTAUTHORNAME|Demo User| +COMMENT VNTOAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pRDV-NanoTag15-mcherry(SD-)" 0 4155 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 2 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 0 3 75) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 7 9 61 102 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 103 104 274 +COMMENT 25 26 55 91 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 105 57 38 +COMMENT 36 39 40 41 42 43 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "Acc65I" "ApaLI" "BamHI" "ClaI" "EcoRI" "HindIII" "NcoI" +COMMENT "PstI" "SacI" "SmaI" "XhoI" "XmaI") (CStringList "atg" "gtg") +COMMENT (CStringList "taa" "tga" "tag") (CObList) 1 "{(0,1),2}" 0 0 "" 0 +COMMENT 4294967295 0 0 0 0 0 0 0 "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 70 20 1 1 1 1 0 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 4294967295 1 4155 0 0 0 0 0 0 0 0) (CStringList) +COMMENT (CStringList) (CObList) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #0=(CRSite (CStringList) "Acc65I" "ggtacc" 2 0 1 2735 0 0 "") +COMMENT #1=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 329 0 1575 0 0 "") +COMMENT #2=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 2038 0 0 "") +COMMENT #3=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 1950 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 1956 0 0 "") +COMMENT #6=(CRSite (CStringList) "NcoI" "ccatgg" 2 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "PstI" "ctgcag" 6 0 6 2860 0 2977 0 3064 0 3097 +COMMENT 0 3208 0 3226 0 0 "") +COMMENT #8=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 0 0 "") +COMMENT #11=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #12=(CFSignal (CObList) "Promoter_P_1" 30 0 0 1911 1927 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1911..1927") +COMMENT #13=(CFSignal (CObList) "Stem_Loop_1" 39 0 0 1928 1948 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1928..1948") +COMMENT #14=(CFSignal (CObList) "tolA spacer" 21 0 0 2743 3630 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2835..3722") +COMMENT #15=(CFSignal (CObList) "Rep_Origin_1" 33 0 0 1229 1885 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1229..1885") +COMMENT #16=(CFSignal (CObList) "AmpR" 4 0 0 213 1073 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "213..1073") +COMMENT #17=(CFSignal (CObList) "annealing site of tolAk" 21 0 1 2986 3006 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(3078..3098)") +COMMENT #18=(CFSignal (CObList) "orig T" 62 0 0 2041 2041 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2133..2133") +COMMENT #19=(CFSignal (CObList) "orig G" 21 0 0 2039 2039 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2131..2131") +COMMENT #20=(CFSignal (CObList) "mcherry" 4 0 0 1975 2733 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2067..2825") +COMMENT #21=(CFSignal (CObList) "NanoTag15" 21 0 0 1975 2022 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2067..2114") +COMMENT #22=(CFSignal (CObList) "mCherry-int-r" 27 0 1 2237 2260 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #23=(CFSignal (CObList) "BamHI-Nanotag-r" 27 0 1 2023 2046 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "")) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #24=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #25=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pRDV-NanoTag15-mcherry(SD-)" 2) 5 "" 0 4) +COMMENT #26=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #27=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pRDV-NanoTag15-mcherry(SD-)'" 1) +COMMENT #28=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Ribosome display vector pRDV, complete sequence." 1) +COMMENT #29=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #30=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/13/09 09:49PM" 1) +COMMENT #31=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/13/09 09:49PM" 1) +COMMENT #32=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4155 bp" 1) +COMMENT #33=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #34=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #35=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #36=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #37=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #38=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 11-DEC-2008" 1) +COMMENT #39=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AY327136" +COMMENT 1) +COMMENT #40=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AY327136.1 GI:37575398" +COMMENT 1) +COMMENT #41=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Ribosome display vector pRDV." 1) +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Ribosome display vector pRDV(Ribosome display vector pRDV)" +COMMENT 1) +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1))) "Standard Fields") +COMMENT #44=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 4279)" 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P.," +COMMENT 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Grutter,M.G. and Pluckthun,A." 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE High-affinity binders selected from designed ankyrin repeat protein" +COMMENT 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " libraries" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004)" +COMMENT 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 4279)" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and" +COMMENT 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Pluckthun,A." 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich," +COMMENT 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Winterthurerstrasse 190, Zurich 8057, Switzerland" +COMMENT 1))) "References") +COMMENT #57=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #59=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #63=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 213 (3 #16# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #64=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 213 End: 1073" 1) +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 213..1073" 1))) "AmpR") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1975 (3 #20# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1975 End: 2733" 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2067..2825" 1))) "mcherry"))) +COMMENT "CDS (2 total)") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1975 (3 #21# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1975 End: 2022" 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2067..2114" 1))) "NanoTag15") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2039 (3 #19# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2039 End: 2039" 1) +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2131..2131" 1))) "orig G") +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2743 (3 #14# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2743 End: 3630" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "tolA spacer" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2835..3722" 1))) "tolA spacer") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2986 (3 #17# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2986 End: 3006 (Complementary)" +COMMENT 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3078..3098)" 1))) +COMMENT "annealing site of tolAk"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2023 (3 #23# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2023 End: 2046 (Complementary)" +COMMENT 1))) "BamHI-Nanotag-r") +COMMENT #93=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2237 (3 #22# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2237 End: 2260 (Complementary)" +COMMENT 1))) "mCherry-int-r"))) +COMMENT "Primer (2 total)") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1911 (3 #12# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1911 End: 1927" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) "T7" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1911..1927" 1))) "Promoter_P_1"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1229 (3 #15# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1229 End: 1885" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "ColE1" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1229..1885" 1))) "Rep_Origin_1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #107=(CFolderPar +COMMENT (CGroupPar (CParagraph 39 (7 39 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1928 (3 #13# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1928 End: 1948" 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1928..1948" 1))) "Stem_Loop_1"))) +COMMENT "Stem Loop (1 total)") +COMMENT #112=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #113=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2041 (3 #18# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2041 End: 2041" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2133..2133" 1))) "orig T"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #118=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22005568 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #119=(CGroupPar +COMMENT (CParagraph 0 (10 #0# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (1 #0# 1) 1 2 2 0 191) +COMMENT " N1: 2735 " 1))))) "Acc65I: 1 site") +COMMENT 1 5 "GGTACC" "CCATGG") +COMMENT #121=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22000984 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #122=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 329 " 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1575 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #125=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21998144 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #126=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 2038 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #128=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22454416 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #129=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22418832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #130=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1950 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22539856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 1956 " 1))))) +COMMENT "HindIII: 1 site") 1 5 "AAGCTT" "TTCGAA") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21906168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NcoI: 0 sites") 1 5 "CCATGG" +COMMENT "GGTACC") +COMMENT #136=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22697872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PstI: 6 sites") 5 1 "CTGCAG" +COMMENT "GACGTC") +COMMENT #137=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22470056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #138=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22526272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 33289776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XhoI: 0 sites") 1 5 "CTCGAG" +COMMENT "GAGCTC") +COMMENT #140=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 33289992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 2 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #141=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #142=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #143=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #144=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #145=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #146=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #147=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #148=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #149=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #150=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #151=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #152=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #153=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #154=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #155=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #156=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #157=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #158=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #159=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #160=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #161=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #162=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #163=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #164=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #165=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #166=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #167=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #168=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #169=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #170=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #171=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #172=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #173=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #174=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #175=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #176=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #177=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #178=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #179=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #180=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 39 39 0.1 -265) +COMMENT 1 1 0 1 1 +COMMENT (mapper: 24.762 -14.4018 40.0378 40.0378 0.01 10 -1 4155 4155 1 0 0) +COMMENT #181=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -300 100) +COMMENT (CObjectList +COMMENT #182=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -873 100) +COMMENT (CObjectList +COMMENT #183=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #147# 33869172 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27569 6.27369 1 0.0214037) 0.150979) +COMMENT #184=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #144# 26552684 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pRDV-NanoTag15-mcherry(SD-)" +COMMENT "@N" 1 0 0.871165 0 -10 17.4835 1.44863 Nil) +COMMENT #185=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #143# 1 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4155 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.24693 0.924127 Nil)) (CObjectList)) +COMMENT #186=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #187=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #188=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #16# 0) 1 2 0 0 #145# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 4.65318 5.95311 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #189=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #142# 22624044 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT 13.0752 6.96932 0 -10 2.7474 1.04901 #188#) +COMMENT #190=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #20# 0) 1 2 0 0 #145# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.14692 3.29286 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #191=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #142# 24791868 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mcherry" "@N" 1 +COMMENT -8.05911 -12.1963 0 -10 3.87134 1.04901 #190#)) +COMMENT (CObjectList)) +COMMENT #192=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1361 100) +COMMENT (CObjectList +COMMENT #193=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #14# 0) 1 2 0 0 #146# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0.792641 2.13334 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #194=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #142# 14746160 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tolA spacer" +COMMENT "@N" 1 -15.7166 1.74233 0 -10 5.34495 1.04901 +COMMENT #193#) +COMMENT #195=(CScratch +COMMENT (CWidget 0 (3 #17# 0) 1 2 0 0 #150# +COMMENT 1129595207 100) (LOGPEN 0 8 13395507) 10 1 +COMMENT 1.76646 1.9 0.082322 1) +COMMENT #196=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #142# 14746160 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "annealing site of tolAk" "@N" 1 -17.7738 +COMMENT -3.48466 0 -10 10.4401 1.04901 #195#) +COMMENT #197=(CScratch +COMMENT (CWidget 0 (3 #19# 0) 1 2 0 0 #150# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.19623 1.9 +COMMENT 0.082322 1) +COMMENT #198=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #142# 3801720 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 3.10815 -20.908 0 -10 2.94721 1.04901 #197#) +COMMENT #199=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #21# 0) 1 2 0 0 #146# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 3.22039 +COMMENT 3.29286 1 0.082322) 0.8 1.8 0) +COMMENT #200=(CLabel (CWidget 0 (0 0) 1 2 0 0 #142# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "NanoTag15" "@N" +COMMENT 1 4.73577 -15.681 0 -10 5.22007 1.04901 #199#)) +COMMENT (CObjectList)) +COMMENT #201=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #202=(CScratch +COMMENT (CWidget 0 (3 #22# 0) 1 2 0 0 #150# 1114197 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 2.89729 1.9 +COMMENT 0.082322 1) +COMMENT #203=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #142# 24903452 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mCherry-int-r" +COMMENT "@N" 1 -6.75395 -13.9386 0 -10 6.26908 +COMMENT 1.04901 #202#) +COMMENT #204=(CScratch +COMMENT (CWidget 0 (3 #23# 0) 1 2 0 0 #150# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.22039 1.9 +COMMENT 0.082322 1) +COMMENT #205=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #142# 26560244 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "BamHI-Nanotag-r" "@N" 1 5.51072 -17.4233 0 +COMMENT -10 7.91752 1.04901 #204#)) (CObjectList)) +COMMENT #206=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1152 100) +COMMENT (CObjectList +COMMENT #207=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #12# 0) 1 2 0 0 #164# 0 100) +COMMENT (LOGPEN 0 4 128) 6 1.16464 3.30222 3.38948) +COMMENT 0.4 0.082322 1.08464 1.8 1.8 0) +COMMENT #208=(CLabel (CWidget 0 (0 0) 1 2 0 0 #142# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Promoter P 1" +COMMENT "@N" 1 11.6667 -10.454 0 -10 6.06926 1.04901 +COMMENT #207#)) (CObjectList)) +COMMENT #209=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -873 100) +COMMENT (CObjectList +COMMENT #210=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #15# 0) 1 2 0 0 #145# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.42723 4.41916 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #211=(CLabel (CWidget 0 (0 0) 1 2 0 0 #142# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Rep Origin 1" +COMMENT "@N" 1 15.0954 -5.22699 0 -10 5.86945 1.04901 +COMMENT #210#)) (CObjectList)) +COMMENT #212=(CGroupWidget +COMMENT (CWidget 39 (7 39 0) 1 2 0 0 Nil -1082 100) +COMMENT (CObjectList +COMMENT #213=(CScratch +COMMENT (CWidget 0 (3 #13# 0) 1 2 0 0 #163# 27243256 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 3.36382 1.9 +COMMENT 0.082322 1) +COMMENT #214=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #142# 24653580 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Stem Loop 1" +COMMENT "@N" 1 13.2206 -8.71165 0 -10 5.79452 1.04901 +COMMENT #213#)) (CObjectList)) +COMMENT #215=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #216=(CScratch +COMMENT (CWidget 0 (3 #18# 0) 1 2 0 0 #150# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.19321 1.9 +COMMENT 0.082322 1) +COMMENT #217=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #142# 1075860544 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 3.03463 -22.6503 0 -10 2.7474 1.04901 #216#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #218=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #219=(CGroupWidget +COMMENT (CWidget 1 (10 #0# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #220=(CScratch +COMMENT (CWidget 1 (1 #0# 1) 1 2 0 0 #149# 24779124 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.14541 1.9 +COMMENT 0.082322 1) +COMMENT #221=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #151# 655382 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Acc}65I (2735)" "@N (@S)" 5 -14.4517 +COMMENT -6.96932 0 -10 5.74457 0.924127 #220#)) +COMMENT (CObjectList)) +COMMENT #222=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #223=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #149# 3847696 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.19774 1.9 +COMMENT 0.082322 1) +COMMENT #224=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #151# 24904820 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (2038)" "@N (@S)" 5 4.64602 +COMMENT -19.1656 0 -10 5.66964 0.924127 #223#)) +COMMENT (CObjectList)) +COMMENT #225=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #226=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #149# 1330257952 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.3306 1.9 +COMMENT 0.082322 1) +COMMENT #227=(CLabel (CWidget 0 (0 0) 1 2 0 0 #151# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (1950)" "@N (@S)" 5 8.91285 +COMMENT -12.1963 0 -10 5.14514 0.924127 #226#)) +COMMENT (CObjectList)) +COMMENT #228=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #229=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #149# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.32154 1.9 +COMMENT 0.082322 1) +COMMENT #230=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #151# 14746160 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (1956)" "@N (@S)" 5 5.9946 +COMMENT -13.9386 0 -10 5.51978 0.924127 #229#)) +COMMENT (CObjectList)) +COMMENT #231=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #232=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #149# 27235592 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.77797 1.9 +COMMENT 0.082322 1) +COMMENT #233=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #141# 22820828 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (329)" "@N (@S)" 5 9.52026 +COMMENT 12.1963 0 -10 4.74552 0.924127 #232#) +COMMENT #234=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #149# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.89677 1.9 +COMMENT 0.082322 1) +COMMENT #235=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #141# 14746088 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1575)" "@N (@S)" 5 14.2949 +COMMENT -6.96932 0 -10 5.19509 0.924127 #234#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #236=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #237=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1085 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21288200 (CObList))) +FEATURES Location/Qualifiers + promoter 1911..1927 + /vntifkey="30" + /label=Promoter_P_1 + /note="T7" + stem_loop 1928..1948 + /vntifkey="39" + /label=Stem_Loop_1 + misc_feature 2743..3630 + /vntifkey="21" + /label=tolA\spacer + /note="tolA spacer" + rep_origin 1229..1885 + /vntifkey="33" + /label=Rep_Origin_1 + /note="ColE1" + CDS 213..1073 + /vntifkey="4" + /label=AmpR + misc_feature complement(2986..3006) + /vntifkey="21" + /label=annealing\site\of\tolAk + /note="Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" + mutation 2041..2041 + /vntifkey="62" + /label=orig\T + misc_feature 2039..2039 + /vntifkey="21" + /label=orig\G + CDS 1975..2733 + /vntifkey="4" + /label=mcherry + misc_feature 1975..2022 + /vntifkey="21" + /label=NanoTag15 + primer complement(2237..2260) + /vntifkey="27" + /label=mCherry-int-r + primer complement(2023..2046) + /vntifkey="27" + /label=BamHI-Nanotag-r +BASE COUNT 1182 a 953 c 1076 g 944 t +ORIGIN + 1 tttcggccta ttggttaaaa aatgagctga tttaacaaaa atttaacgcg aattttaaca + 61 aaatattaac gtttacaatt tcaggtggca cttttcgggg aaatgtgcgc ggaaccccta + 121 tttgtttatt tttctaaata cattcaaata tgtatccgct catgagacaa taaccctgat + 181 aaatgcttca ataatattga aaaaggaaga gtatgagtat tcaacatttc cgtgtcgccc + 241 ttattccctt ttttgcggca ttttgccttc ctgtttttgc tcacccagaa acgctggtga + 301 aagtaaaaga tgctgaagat cagttgggtg cacgagtggg ttacatcgaa ctggatctca + 361 acagcggtaa gatccttgag agttttcgcc ccgaagaacg ttttccaatg atgagcactt + 421 ttaaagttct gctatgtggc gcggtattat cccgtattga cgccgggcaa gagcaactcg + 481 gtcgccgcat acactattct cagaatgact tggttgagta ctcaccagtc acagaaaagc + 541 atcttacgga tggcatgaca gtaagagaat tatgcagtgc tgccataacc atgagtgata + 601 acactgcggc caacttactt ctgacaacga tcggaggacc gaaggagcta accgcttttt + 661 tgcacaacat gggggatcat gtaactcgcc ttgatcgttg ggaaccggag ctgaatgaag + 721 ccataccaaa cgacgagcgt gacaccacga tgcctgtagc aatggcaaca acgttgcgca + 781 aactattaac tggcgaacta cttactctag cttcccggca acaattaata gactggatgg + 841 aggcggataa agttgcagga ccacttctgc gctcggccct tccggctggc tggtttattg + 901 ctgataaatc tggagccggt gagcgtgggt ctcgcggtat cattgcagca ctggggccag + 961 atggtaagcc ctcccgtatc gtagttatct acacgacggg gagtcaggca actatggatg + 1021 aacgaaatag acagatcgct gagataggtg cctcactgat taagcattgg taactgtcag + 1081 accaagttta ctcatatata ctttagattg atttaaaact tcatttttaa tttaaaagga + 1141 tctaggtgaa gatccttttt gataatctca tgaccaaaat cccttaacgt gagttttcgt + 1201 tccactgagc gtcagacccc gtagaaaaga tcaaaggatc ttcttgagat cctttttttc + 1261 tgcgcgtaat ctgctgcttg caaacaaaaa aaccaccgct accagcggtg gtttgtttgc + 1321 cggatcaaga gctaccaact ctttttccga aggtaactgg cttcagcaga gcgcagatac + 1381 caaatactgt ccttctagtg tagccgtagt taggccacca cttcaagaac tctgtagcac + 1441 cgcctacata cctcgctctg ctaatcctgt taccagtggc tgctgccagt ggcgataagt + 1501 cgtgtcttac cgggttggac tcaagacgat agttaccgga taaggcgcag cggtcgggct + 1561 gaacgggggg ttcgtgcaca cagcccagct tggagcgaac gacctacacc gaactgagat + 1621 acctacagcg tgagctatga gaaagcgcca cgcttcccga agggagaaag gcggacaggt + 1681 atccggtaag cggcagggtc ggaacaggag agcgcacgag ggagcttcca gggggaaacg + 1741 cctggtatct ttatagtcct gtcgggtttc gccacctctg acttgagcgt cgatttttgt + 1801 gatgctcgtc aggggggcgg agcctatgga aaaacgccag caacgcggcc tttttacggt + 1861 tcctggcctt ttgctggcct tttgctcaca tgacccgaca ccatcgaaat taatacgact + 1921 cactataggg agaccacaac ggtttcccga attcaagctt acctcctctt aaagatggac + 1981 gttgaagcgt ggctgggtgc gcgtgttccg ctggttgaaa cccaagtcga cctgctggat + 2041 ccaaacatgg caatcattaa ggagttcatg agattcaaag ttcacatgga aggttctgta + 2101 aatggacatg aatttgaaat agaaggtgaa ggagaaggaa ggccttatga aggaacccaa + 2161 accgcgaagc taaaagttac taagggtggc ccattaccat ttgcatggga tatccttagc + 2221 cctcaattca tgtatgggtc aaaggcttat gtcaagcacc ccgccgacat tccagactat + 2281 ctaaagttat cttttcccga agggtttaag tgggagcgtg tgatgaactt cgaagacggt + 2341 ggcgtggtaa cagtgactca ggattcgtcc ctgcaagatg gtgaatttat ctacaaagtc + 2401 aaattaagag gaactaactt tccatctgac ggcccggtta tgcaaaaaaa gacaatgggc + 2461 tgggaggcct cctcagaacg aatgtaccct gaagatggtg ccttgaaggg tgagattaaa + 2521 caaagattga aattgaaaga tggtggacat tatgacgctg aggttaaaac gacatacaaa + 2581 gctaagaaac ctgtccagct cccaggtgct tacaatgtaa atataaaact tgatattaca + 2641 tcacataatg aagattatac gatagttgaa caatacgaaa gggctgaggg gagacatagt + 2701 actggtggca tggatgaact atacaaaggt tctggtaccg caggatctgg tggccagaag + 2761 caagctgaag aggcggcagc gaaagcggcg gcagatgcta aagcgaaggc cgaagcagat + 2821 gctaaagctg cggaagaagc agcgaagaaa gcggctgcag acgcaaagaa aaaagcagaa + 2881 gcagaagccg ccaaagccgc agccgaagcg cagaaaaaag ccgaggcagc cgctgcggca + 2941 ctgaagaaga aagcggaagc ggcagaagca gctgcagctg aagcaagaaa gaaagcggca + 3001 actgaagctg ctgaaaaagc caaagcagaa gctgagaaga aagcggctgc tgaaaaggct + 3061 gcagctgata agaaagcggc agcagagaaa gctgcagccg acaaaaaagc agcagaaaaa + 3121 gcggctgctg aaaaggcagc agctgataag aaagcagcgg cagaaaaagc cgccgcagac + 3181 aaaaaagcgg cagcggcaaa agctgcagct gaaaaagccg ctgcagcaaa agcggccgca + 3241 gaggcagatg atattttcgg tgagctaagc tctggtaaga atgcaccgaa aacgggggga + 3301 ggggcgaaag ggaacaatgc ttcgcctgcc gggagtggta atactaaaaa caatggcgca + 3361 tcaggggccg atatcaataa ctatgccggg cagattaaat ctgctatcga aagtaagttc + 3421 tatgacgcat cgtcctatgc aggcaaaacc tgtacgctgc gcataaaact ggcacccgat + 3481 ggtatgttac tggatatcaa acctgaaggt ggcgatcccg cactttgtca ggctgcgttg + 3541 gcagcagcta aacttgcgaa gatcccgaaa ccaccaagcc aggcagtata tgaagtgttc + 3601 aaaaacgcgc cattggactt caaaccgtag tagagatccg gctgctaaca aagcccgaaa + 3661 ggaagctgag ttggctgctg ccaccgctga gcaataacta gcataacccc ttggggcctc + 3721 taaacgggtc ttgaggggtt ttttgctgaa aggaggaact atatccggat cgagatcccc + 3781 acgcgccctg tagcggcgca ttaagcgcgg cgggtgtggt ggttacgcgc agcgtgaccg + 3841 ctacacttgc cagcgcccta gcgcccgctc ctttcgcttt cttcccttcc tttctcgcca + 3901 cgttcgccgg ctttccccgt caagctctaa atcggggcat ccctttaggg ttccgattta + 3961 gtgctttacg gcacctcgac cccaaaaaac ttgattaggg tgatggttca cgtagtgggc + 4021 catcgccctg atagacggtt tttcgccctt tgacgttgga gtccacgttc tttaatagtg + 4081 gactcttgtt ccaaactgga acaacactca accctatctc ggtctattct tttgatttat + 4141 aagggatttt gccga +// diff --git a/lib/VNTI files/pRDV-NanoTag15-mcherry.gb b/lib/VNTI files/pRDV-NanoTag15-mcherry.gb new file mode 100644 index 00000000..59119cb1 --- /dev/null +++ b/lib/VNTI files/pRDV-NanoTag15-mcherry.gb @@ -0,0 +1,981 @@ +LOCUS pRDV-NanoTag15-m 4155 bp DNA circular SYN 13-JUL-2009 +DEFINITION Ribosome display vector pRDV, complete sequence. +ACCESSION AY327136 +VERSION AY327136.1 GI:37575398 +SOURCE Ribosome display vector pRDV. + ORGANISM Ribosome display vector pRDV + other sequences; artificial sequences; vectors. +REFERENCE 1 (bases 1 to 4279) + AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P., + Grutter,M.G. and Pluckthun,A. + TITLE High-affinity binders selected from designed ankyrin repeat protein + libraries + JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004) +REFERENCE 2 (bases 1 to 4279) + AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and + Pluckthun,A. + TITLE Direct Submission + JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich, + Winterthurerstrasse 190, Zurich 8057, Switzerland +COMMENT http://www.informaxinc.com/ +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|523748663| +COMMENT VNTDBDATE|523748890| +COMMENT LSOWNER| +COMMENT VNTNAME|pRDV-NanoTag15-mcherry| +COMMENT VNTAUTHORNAME|Demo User| +COMMENT VNTOAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pRDV-NanoTag15-mcherry" 0 4155 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 2 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 0 3 75) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 7 9 61 102 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 103 104 274 +COMMENT 25 26 55 91 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 105 57 38 +COMMENT 36 39 40 41 42 43 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "Acc65I" "ApaLI" "BamHI" "ClaI" "EcoRI" "HindIII" "NcoI" +COMMENT "PstI" "SacI" "SmaI" "XhoI" "XmaI") (CStringList "atg" "gtg") +COMMENT (CStringList "taa" "tga" "tag") (CObList) 1 "{(0,1),2}" 0 0 "" 0 +COMMENT 4294967295 0 0 0 0 0 0 0 "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 70 20 1 1 1 1 0 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4155 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #0=(CRSite (CStringList) "Acc65I" "ggtacc" 2 0 1 2735 0 0 "") +COMMENT #1=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 329 0 1575 0 0 "") +COMMENT #2=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 2038 0 0 "") +COMMENT #3=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 1950 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "NcoI" "ccatgg" 2 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "PstI" "ctgcag" 6 0 6 2860 0 2977 0 3064 0 3097 +COMMENT 0 3208 0 3226 0 0 "") +COMMENT #8=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 1957 0 0 "") +COMMENT #11=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #12=(CFSignal (CObList) "Promoter_P_1" 30 0 0 1911 1927 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1911..1927") +COMMENT #13=(CFSignal (CObList) "Stem_Loop_1" 39 0 0 1928 1948 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1928..1948") +COMMENT #14=(CFSignal (CObList) "tolA spacer" 21 0 0 2743 3630 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2835..3722") +COMMENT #15=(CFSignal (CObList) "Rep_Origin_1" 33 0 0 1229 1885 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1229..1885") +COMMENT #16=(CFSignal (CObList) "AmpR" 4 0 0 213 1073 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "213..1073") +COMMENT #17=(CFSignal (CObList) "annealing site of tolAk" 21 0 1 2986 3006 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(3078..3098)") +COMMENT #18=(CFSignal (CObList) "orig T" 62 0 0 2041 2041 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2133..2133") +COMMENT #19=(CFSignal (CObList) "orig G" 21 0 0 2039 2039 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2131..2131") +COMMENT #20=(CFSignal (CObList) "mcherry" 4 0 0 1975 2733 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2067..2825") +COMMENT #21=(CFSignal (CObList) "NanoTag15" 21 0 0 1975 2022 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2067..2114") +COMMENT #22=(CFSignal (CObList) "mCherry-int-r" 27 0 1 2237 2260 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #23=(CFSignal (CObList) "BamHI-Nanotag-r" 27 0 1 2023 2046 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #24=(CFSignal (CObList) "+SD-Nanotag-f" 27 0 0 1953 1995 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #25=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #26=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pRDV-NanoTag15-mcherry" 2) 5 "" 0 4) +COMMENT #27=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #28=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pRDV-NanoTag15-mcherry'" 1) +COMMENT #29=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Ribosome display vector pRDV, complete sequence." 1) +COMMENT #30=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #31=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/13/09 09:44PM" 1) +COMMENT #32=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/13/09 09:48PM" 1) +COMMENT #33=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4155 bp" 1) +COMMENT #34=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #35=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #36=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #37=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #38=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #39=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 11-DEC-2008" 1) +COMMENT #40=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AY327136" +COMMENT 1) +COMMENT #41=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AY327136.1 GI:37575398" +COMMENT 1) +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Ribosome display vector pRDV." 1) +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Ribosome display vector pRDV(Ribosome display vector pRDV)" +COMMENT 1) +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1))) "Standard Fields") +COMMENT #45=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 4279)" 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P.," +COMMENT 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Grutter,M.G. and Pluckthun,A." 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE High-affinity binders selected from designed ankyrin repeat protein" +COMMENT 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " libraries" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004)" +COMMENT 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 4279)" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and" +COMMENT 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Pluckthun,A." 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich," +COMMENT 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Winterthurerstrasse 190, Zurich 8057, Switzerland" +COMMENT 1))) "References") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #60=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 213 (3 #16# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 213 End: 1073" 1) +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 213..1073" 1))) "AmpR") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1975 (3 #20# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1975 End: 2733" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2067..2825" 1))) "mcherry"))) +COMMENT "CDS (2 total)") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1975 (3 #21# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1975 End: 2022" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2067..2114" 1))) "NanoTag15") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2039 (3 #19# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2039 End: 2039" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2131..2131" 1))) "orig G") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2743 (3 #14# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2743 End: 3630" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "tolA spacer" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2835..3722" 1))) "tolA spacer") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2986 (3 #17# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2986 End: 3006 (Complementary)" +COMMENT 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3078..3098)" 1))) +COMMENT "annealing site of tolAk"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1953 (3 #24# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1953 End: 1995" 1))) +COMMENT "+SD-Nanotag-f") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2023 (3 #23# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2023 End: 2046 (Complementary)" +COMMENT 1))) "BamHI-Nanotag-r") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2237 (3 #22# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2237 End: 2260 (Complementary)" +COMMENT 1))) "mCherry-int-r"))) +COMMENT "Primer (3 total)") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1911 (3 #12# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1911 End: 1927" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) "T7" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1911..1927" 1))) "Promoter_P_1"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1229 (3 #15# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1229 End: 1885" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "ColE1" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1229..1885" 1))) "Rep_Origin_1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar (CParagraph 39 (7 39 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1928 (3 #13# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1928 End: 1948" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1928..1948" 1))) "Stem_Loop_1"))) +COMMENT "Stem Loop (1 total)") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #116=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2041 (3 #18# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2041 End: 2041" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2133..2133" 1))) "orig T"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #121=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 33439736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #122=(CGroupPar +COMMENT (CParagraph 0 (10 #0# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (1 #0# 1) 1 2 2 0 191) +COMMENT " N1: 2735 " 1))))) "Acc65I: 1 site") +COMMENT 1 5 "GGTACC" "CCATGG") +COMMENT #124=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 34173288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #125=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 329 " 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1575 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #128=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 34173184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 2038 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #131=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 34173080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22722480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1950 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 33822672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #136=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 33690640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NcoI: 0 sites") 1 5 "CCATGG" +COMMENT "GGTACC") +COMMENT #137=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22796024 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PstI: 6 sites") 5 1 "CTGCAG" +COMMENT "GACGTC") +COMMENT #138=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22835600 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22668048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #140=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 34108824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #141=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 1957 " 1))))) "XhoI: 1 site") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #143=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 34173704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 2 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #144=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #145=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #146=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #147=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #148=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #149=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #150=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #151=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #152=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #153=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #154=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #155=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #156=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #157=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #158=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #159=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #160=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #161=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #162=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #163=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #164=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #165=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #166=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #167=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #168=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #169=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #170=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #171=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #172=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #173=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #174=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #175=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #176=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #177=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #178=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #179=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #180=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #181=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #182=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #183=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 39 39 0.1 -265) +COMMENT 1 1 0 1 1 +COMMENT (mapper: 26.3605 -16.1501 40.0378 40.0378 0.01 10 -1 4155 4155 1 0 0) +COMMENT #184=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -300 100) +COMMENT (CObjectList +COMMENT #185=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1013 100) +COMMENT (CObjectList +COMMENT #186=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #150# 34373860 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27569 6.27369 1 0.0214037) 0.150979) +COMMENT #187=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #147# 14746160 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pRDV-NanoTag15-mcherry" "@N" 1 0 +COMMENT 0.871165 0 -10 14.5612 1.44863 Nil) +COMMENT #188=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #146# 22820828 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4155 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.24693 0.924127 Nil)) (CObjectList)) +COMMENT #189=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #190=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #191=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #16# 0) 1 2 0 0 #148# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 4.65318 5.95311 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #192=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #145# 24653580 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT 14.1644 8.71165 0 -10 2.7474 1.04901 #191#) +COMMENT #193=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #20# 0) 1 2 0 0 #148# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.14692 3.29286 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #194=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #145# 3801720 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mcherry" "@N" 1 +COMMENT -8.56899 -13.9386 0 -10 3.87134 1.04901 #193#)) +COMMENT (CObjectList)) +COMMENT #195=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1222 100) +COMMENT (CObjectList +COMMENT #196=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #14# 0) 1 2 0 0 #149# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0.792641 2.13334 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #197=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #145# 14746088 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tolA spacer" +COMMENT "@N" 1 -17.3494 1.74233 0 -10 5.34495 1.04901 +COMMENT #196#) +COMMENT #198=(CScratch +COMMENT (CWidget 0 (3 #17# 0) 1 2 0 0 #153# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.76646 1.9 +COMMENT 0.082322 1) +COMMENT #199=(CLabel (CWidget 0 (0 0) 1 2 0 0 #145# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "annealing site of tolAk" "@N" 1 -19.3732 +COMMENT -3.48466 0 -10 10.4401 1.04901 #198#) +COMMENT #200=(CScratch +COMMENT (CWidget 0 (3 #19# 0) 1 2 0 0 #153# 1114197 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 3.19623 1.9 +COMMENT 0.082322 1) +COMMENT #201=(CLabel (CWidget 0 (0 0) 1 2 0 0 #145# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 3.21703 -24.3926 0 -10 2.94721 1.04901 #200#) +COMMENT #202=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #21# 0) 1 2 0 0 #149# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 3.22039 +COMMENT 3.29286 1 0.082322) 0.8 1.8 0) +COMMENT #203=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #145# 21470324 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "NanoTag15" "@N" +COMMENT 1 4.9936 -19.1656 0 -10 5.22007 1.04901 #202#)) +COMMENT (CObjectList)) +COMMENT #204=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #205=(CScratch +COMMENT (CWidget 0 (3 #22# 0) 1 2 0 0 #153# 27243256 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 2.89729 1.9 +COMMENT 0.082322 1) +COMMENT #206=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #145# 26560244 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mCherry-int-r" +COMMENT "@N" 1 -7.15427 -15.681 0 -10 6.26908 1.04901 +COMMENT #205#) +COMMENT #207=(CScratch +COMMENT (CWidget 0 (3 #23# 0) 1 2 0 0 #153# +COMMENT 1129595207 100) (LOGPEN 0 8 13395507) 10 1 +COMMENT 3.22039 1.9 0.082322 1) +COMMENT #208=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #145# 24791868 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "BamHI-Nanotag-r" "@N" 1 5.68821 -20.908 0 +COMMENT -10 7.91752 1.04901 #207#) +COMMENT #209=(CPrimerArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #24# 0) 1 2 0 0 #151# 22103496 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1.16464 3.26115 +COMMENT 3.32607) 0.4 0.082322 1.8 1.8 0) +COMMENT #210=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #145# 24903452 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+SD-Nanotag-f" +COMMENT "@N" 1 6.14077 -17.4233 0 -10 6.74363 1.04901 +COMMENT #209#)) (CObjectList)) +COMMENT #211=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1292 100) +COMMENT (CObjectList +COMMENT #212=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #12# 0) 1 2 0 0 #167# 0 100) +COMMENT (LOGPEN 0 4 128) 6 1.32929 3.30222 3.38948) +COMMENT 0.4 0.082322 1.24929 1.8 1.8 0) +COMMENT #213=(CLabel (CWidget 0 (0 0) 1 2 0 0 #145# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Promoter P 1" +COMMENT "@N" 1 12.1327 -12.1963 0 -10 6.06926 1.04901 +COMMENT #212#)) (CObjectList)) +COMMENT #214=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1571 100) +COMMENT (CObjectList +COMMENT #215=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #15# 0) 1 2 0 0 #148# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.42723 4.41916 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #216=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #145# 14746160 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Rep Origin 1" +COMMENT "@N" 1 16.1564 -6.96932 0 -10 5.86945 1.04901 +COMMENT #215#)) (CObjectList)) +COMMENT #217=(CGroupWidget +COMMENT (CWidget 39 (7 39 0) 1 2 0 0 Nil -1013 100) +COMMENT (CObjectList +COMMENT #218=(CScratch +COMMENT (CWidget 0 (3 #13# 0) 1 2 0 0 #166# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 3.36382 1.9 +COMMENT 0.082322 1) +COMMENT #219=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #145# 1075860544 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Stem Loop 1" +COMMENT "@N" 1 13.9108 -10.454 0 -10 5.79452 1.04901 +COMMENT #218#)) (CObjectList)) +COMMENT #220=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1086 100) +COMMENT (CObjectList +COMMENT #221=(CScratch +COMMENT (CWidget 0 (3 #18# 0) 1 2 0 0 #153# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.19321 1.9 +COMMENT 0.082322 1) +COMMENT #222=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #145# 393238 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 3.1301 -26.1349 0 -10 2.7474 1.04901 #221#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #223=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #224=(CGroupWidget +COMMENT (CWidget 1 (10 #0# 0) 1 2 0 0 Nil -1365 100) +COMMENT (CObjectList +COMMENT #225=(CScratch +COMMENT (CWidget 1 (1 #0# 1) 1 2 0 0 #152# 3847696 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.14541 1.9 +COMMENT 0.082322 1) +COMMENT #226=(CLabel (CWidget 0 (0 0) 1 2 0 0 #154# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Acc}65I (2735)" "@N (@S)" 5 -15.6749 +COMMENT -8.71165 0 -10 5.74457 0.924127 #225#)) +COMMENT (CObjectList)) +COMMENT #227=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #228=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #152# 1330257952 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.19774 1.9 +COMMENT 0.082322 1) +COMMENT #229=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #154# 24900260 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (2038)" "@N (@S)" 5 4.76968 +COMMENT -22.6503 0 -10 5.66964 0.924127 #228#)) +COMMENT (CObjectList)) +COMMENT #230=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #231=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #152# 24779124 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.3306 1.9 +COMMENT 0.082322 1) +COMMENT #232=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #154# 655382 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (1950)" "@N (@S)" 5 9.05802 +COMMENT -13.9386 0 -10 5.14514 0.924127 #231#)) +COMMENT (CObjectList)) +COMMENT #233=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList +COMMENT #234=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #152# 27243576 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.32003 1.9 +COMMENT 0.082322 1) +COMMENT #235=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #154# 26552684 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (1957)" "@N (@S)" 5 5.74622 +COMMENT -15.681 0 -10 4.74552 0.924127 #234#)) +COMMENT (CObjectList)) +COMMENT #236=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #237=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #152# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.77797 1.9 +COMMENT 0.082322 1) +COMMENT #238=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #144# 24904820 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (329)" "@N (@S)" 5 10.3329 +COMMENT 13.9386 0 -10 4.74552 0.924127 #237#) +COMMENT #239=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #152# 27235592 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.89677 1.9 +COMMENT 0.082322 1) +COMMENT #240=(CLabel (CWidget 0 (0 0) 1 2 0 0 #144# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1575)" "@N (@S)" 5 15.1783 +COMMENT -8.71165 0 -10 5.19509 0.924127 #239#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #241=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -807 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #242=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 33696944 +COMMENT (CStringList) 11822 3538968 (CObList))) +FEATURES Location/Qualifiers + promoter 1911..1927 + /vntifkey="30" + /label=Promoter_P_1 + /note="T7" + stem_loop 1928..1948 + /vntifkey="39" + /label=Stem_Loop_1 + misc_feature 2743..3630 + /vntifkey="21" + /label=tolA\spacer + /note="tolA spacer" + rep_origin 1229..1885 + /vntifkey="33" + /label=Rep_Origin_1 + /note="ColE1" + CDS 213..1073 + /vntifkey="4" + /label=AmpR + misc_feature complement(2986..3006) + /vntifkey="21" + /label=annealing\site\of\tolAk + /note="Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" + mutation 2041..2041 + /vntifkey="62" + /label=orig\T + misc_feature 2039..2039 + /vntifkey="21" + /label=orig\G + CDS 1975..2733 + /vntifkey="4" + /label=mcherry + misc_feature 1975..2022 + /vntifkey="21" + /label=NanoTag15 + primer complement(2237..2260) + /vntifkey="27" + /label=mCherry-int-r + primer complement(2023..2046) + /vntifkey="27" + /label=BamHI-Nanotag-r + primer 1953..1995 + /vntifkey="27" + /label=+SD-Nanotag-f +BASE COUNT 1188 a 949 c 1079 g 939 t +ORIGIN + 1 tttcggccta ttggttaaaa aatgagctga tttaacaaaa atttaacgcg aattttaaca + 61 aaatattaac gtttacaatt tcaggtggca cttttcgggg aaatgtgcgc ggaaccccta + 121 tttgtttatt tttctaaata cattcaaata tgtatccgct catgagacaa taaccctgat + 181 aaatgcttca ataatattga aaaaggaaga gtatgagtat tcaacatttc cgtgtcgccc + 241 ttattccctt ttttgcggca ttttgccttc ctgtttttgc tcacccagaa acgctggtga + 301 aagtaaaaga tgctgaagat cagttgggtg cacgagtggg ttacatcgaa ctggatctca + 361 acagcggtaa gatccttgag agttttcgcc ccgaagaacg ttttccaatg atgagcactt + 421 ttaaagttct gctatgtggc gcggtattat cccgtattga cgccgggcaa gagcaactcg + 481 gtcgccgcat acactattct cagaatgact tggttgagta ctcaccagtc acagaaaagc + 541 atcttacgga tggcatgaca gtaagagaat tatgcagtgc tgccataacc atgagtgata + 601 acactgcggc caacttactt ctgacaacga tcggaggacc gaaggagcta accgcttttt + 661 tgcacaacat gggggatcat gtaactcgcc ttgatcgttg ggaaccggag ctgaatgaag + 721 ccataccaaa cgacgagcgt gacaccacga tgcctgtagc aatggcaaca acgttgcgca + 781 aactattaac tggcgaacta cttactctag cttcccggca acaattaata gactggatgg + 841 aggcggataa agttgcagga ccacttctgc gctcggccct tccggctggc tggtttattg + 901 ctgataaatc tggagccggt gagcgtgggt ctcgcggtat cattgcagca ctggggccag + 961 atggtaagcc ctcccgtatc gtagttatct acacgacggg gagtcaggca actatggatg + 1021 aacgaaatag acagatcgct gagataggtg cctcactgat taagcattgg taactgtcag + 1081 accaagttta ctcatatata ctttagattg atttaaaact tcatttttaa tttaaaagga + 1141 tctaggtgaa gatccttttt gataatctca tgaccaaaat cccttaacgt gagttttcgt + 1201 tccactgagc gtcagacccc gtagaaaaga tcaaaggatc ttcttgagat cctttttttc + 1261 tgcgcgtaat ctgctgcttg caaacaaaaa aaccaccgct accagcggtg gtttgtttgc + 1321 cggatcaaga gctaccaact ctttttccga aggtaactgg cttcagcaga gcgcagatac + 1381 caaatactgt ccttctagtg tagccgtagt taggccacca cttcaagaac tctgtagcac + 1441 cgcctacata cctcgctctg ctaatcctgt taccagtggc tgctgccagt ggcgataagt + 1501 cgtgtcttac cgggttggac tcaagacgat agttaccgga taaggcgcag cggtcgggct + 1561 gaacgggggg ttcgtgcaca cagcccagct tggagcgaac gacctacacc gaactgagat + 1621 acctacagcg tgagctatga gaaagcgcca cgcttcccga agggagaaag gcggacaggt + 1681 atccggtaag cggcagggtc ggaacaggag agcgcacgag ggagcttcca gggggaaacg + 1741 cctggtatct ttatagtcct gtcgggtttc gccacctctg acttgagcgt cgatttttgt + 1801 gatgctcgtc aggggggcgg agcctatgga aaaacgccag caacgcggcc tttttacggt + 1861 tcctggcctt ttgctggcct tttgctcaca tgacccgaca ccatcgaaat taatacgact + 1921 cactataggg agaccacaac ggtttcccga attcactcga gaaaggagaa aaaaatggac + 1981 gttgaagcgt ggctgggtgc gcgtgttccg ctggttgaaa cccaagtcga cctgctggat + 2041 ccaaacatgg caatcattaa ggagttcatg agattcaaag ttcacatgga aggttctgta + 2101 aatggacatg aatttgaaat agaaggtgaa ggagaaggaa ggccttatga aggaacccaa + 2161 accgcgaagc taaaagttac taagggtggc ccattaccat ttgcatggga tatccttagc + 2221 cctcaattca tgtatgggtc aaaggcttat gtcaagcacc ccgccgacat tccagactat + 2281 ctaaagttat cttttcccga agggtttaag tgggagcgtg tgatgaactt cgaagacggt + 2341 ggcgtggtaa cagtgactca ggattcgtcc ctgcaagatg gtgaatttat ctacaaagtc + 2401 aaattaagag gaactaactt tccatctgac ggcccggtta tgcaaaaaaa gacaatgggc + 2461 tgggaggcct cctcagaacg aatgtaccct gaagatggtg ccttgaaggg tgagattaaa + 2521 caaagattga aattgaaaga tggtggacat tatgacgctg aggttaaaac gacatacaaa + 2581 gctaagaaac ctgtccagct cccaggtgct tacaatgtaa atataaaact tgatattaca + 2641 tcacataatg aagattatac gatagttgaa caatacgaaa gggctgaggg gagacatagt + 2701 actggtggca tggatgaact atacaaaggt tctggtaccg caggatctgg tggccagaag + 2761 caagctgaag aggcggcagc gaaagcggcg gcagatgcta aagcgaaggc cgaagcagat + 2821 gctaaagctg cggaagaagc agcgaagaaa gcggctgcag acgcaaagaa aaaagcagaa + 2881 gcagaagccg ccaaagccgc agccgaagcg cagaaaaaag ccgaggcagc cgctgcggca + 2941 ctgaagaaga aagcggaagc ggcagaagca gctgcagctg aagcaagaaa gaaagcggca + 3001 actgaagctg ctgaaaaagc caaagcagaa gctgagaaga aagcggctgc tgaaaaggct + 3061 gcagctgata agaaagcggc agcagagaaa gctgcagccg acaaaaaagc agcagaaaaa + 3121 gcggctgctg aaaaggcagc agctgataag aaagcagcgg cagaaaaagc cgccgcagac + 3181 aaaaaagcgg cagcggcaaa agctgcagct gaaaaagccg ctgcagcaaa agcggccgca + 3241 gaggcagatg atattttcgg tgagctaagc tctggtaaga atgcaccgaa aacgggggga + 3301 ggggcgaaag ggaacaatgc ttcgcctgcc gggagtggta atactaaaaa caatggcgca + 3361 tcaggggccg atatcaataa ctatgccggg cagattaaat ctgctatcga aagtaagttc + 3421 tatgacgcat cgtcctatgc aggcaaaacc tgtacgctgc gcataaaact ggcacccgat + 3481 ggtatgttac tggatatcaa acctgaaggt ggcgatcccg cactttgtca ggctgcgttg + 3541 gcagcagcta aacttgcgaa gatcccgaaa ccaccaagcc aggcagtata tgaagtgttc + 3601 aaaaacgcgc cattggactt caaaccgtag tagagatccg gctgctaaca aagcccgaaa + 3661 ggaagctgag ttggctgctg ccaccgctga gcaataacta gcataacccc ttggggcctc + 3721 taaacgggtc ttgaggggtt ttttgctgaa aggaggaact atatccggat cgagatcccc + 3781 acgcgccctg tagcggcgca ttaagcgcgg cgggtgtggt ggttacgcgc agcgtgaccg + 3841 ctacacttgc cagcgcccta gcgcccgctc ctttcgcttt cttcccttcc tttctcgcca + 3901 cgttcgccgg ctttccccgt caagctctaa atcggggcat ccctttaggg ttccgattta + 3961 gtgctttacg gcacctcgac cccaaaaaac ttgattaggg tgatggttca cgtagtgggc + 4021 catcgccctg atagacggtt tttcgccctt tgacgttgga gtccacgttc tttaatagtg + 4081 gactcttgtt ccaaactgga acaacactca accctatctc ggtctattct tttgatttat + 4141 aagggatttt gccga +// diff --git a/lib/VNTI files/pRDV-thiMN15#19-His6-mcherry.gb b/lib/VNTI files/pRDV-thiMN15#19-His6-mcherry.gb new file mode 100644 index 00000000..ac2f42cb --- /dev/null +++ b/lib/VNTI files/pRDV-thiMN15#19-His6-mcherry.gb @@ -0,0 +1,1326 @@ +LOCUS pRDV-thiMN 4220 bp DNA circular SYN 27-FEB-2009 +DEFINITION Ribosome display vector pRDV, complete sequence. +ACCESSION AY327136 +VERSION AY327136.1 GI:37575398 +SOURCE Ribosome display vector pRDV. + ORGANISM Ribosome display vector pRDV + other sequences; artificial sequences; vectors. +REFERENCE 1 (bases 1 to 4279) + AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P., + Grutter,M.G. and Pluckthun,A. + TITLE High-affinity binders selected from designed ankyrin repeat protein + libraries + JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004) +REFERENCE 2 (bases 1 to 4279) + AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and + Pluckthun,A. + TITLE Direct Submission + JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich, + Winterthurerstrasse 190, Zurich 8057, Switzerland +COMMENT http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|499468494| +COMMENT VNTDBDATE|511117422| +COMMENT LSOWNER| +COMMENT VNTNAME|pRDV-thiMN15#19-His6-mcherry| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pRDV-thiMN15#19-His6-mcherry" 0 4220 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 0 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 1890 1889 1 4220 0 0 0 0 0 0 0 0) (CStringList) +COMMENT (CStringList) (CObList) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 329 0 1575 0 0 "") +COMMENT #2=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 2103 0 0 "") +COMMENT #3=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 1950 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #8=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 2804 0 0 "") +COMMENT #10=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #11=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 2092 0 0 "") +COMMENT #12=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "AvrII" "cctagg" 2 0 0 0 "") +COMMENT #14=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 2072 0 0 "") +COMMENT #15=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 2070 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 632 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 2 935 0 1925 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 161 0 1169 0 2132 0 0 +COMMENT "") #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 2405 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "Promoter_P_1" 30 0 0 1911 1927 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1911..1927") +COMMENT #28=(CFSignal (CObList) "Stem_Loop_1" 39 0 0 1928 1948 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1928..1948") +COMMENT #29=(CFSignal (CObList) "tolA spacer" 21 0 0 2808 3695 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2808..3695") +COMMENT #30=(CFSignal (CObList) "Rep_Origin_1" 33 0 0 1229 1885 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1229..1885") +COMMENT #31=(CFSignal (CObList) "AmpR" 4 0 0 213 1073 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "213..1073") +COMMENT #32=(CFSignal (CObList) "annealing site of tolAk" 21 0 1 3051 3071 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(3051..3071)") +COMMENT #33=(CFSignal (CObList) "orig T" 62 0 0 2106 2106 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2106..2106") +COMMENT #34=(CFSignal (CObList) "orig G" 21 0 0 2104 2104 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2104..2104") +COMMENT #35=(CFSignal (CObList) "TPP aptamer" 21 0 0 1963 2037 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1963..2037") +COMMENT #36=(CFSignal (CObList) "Histag" 21 0 0 2070 2087 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2070..2087") +COMMENT #37=(CFSignal (CObList) "mcherry" 4 0 0 2067 2798 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2067..2798") +COMMENT #38=(CFSignal (CObList) "IVS-f" 21 0 0 1933 1958 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "IVS-thiM-r annealing site" 28 0 1 2012 2037 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "IVS-KpnI-stop-mCherry-r (annealing site)" 28 0 +COMMENT 1 2769 2798 0 (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #41=(CFSignal (CObList) "T7-pRDV-f (annealing site)" 28 0 0 1905 1932 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "pRDV-seq" 27 0 0 1767 1787 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "IVS-KpnI-mCherry-r" 21 0 1 2781 2809 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "")) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #44=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #45=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pRDV-thiMN15#19-His6-mcherry" 2) 5 "" 0 4) +COMMENT #46=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pRDV-thiMN15#19-His6-mcherry'" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Ribosome display vector pRDV, complete sequence." 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Local object" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 11/20/08 09:14\214\337\214\343" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 02/27/09 05:03\214\337\214\343" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4220 bp" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #55=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 21-NOV-2008" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AY327136" +COMMENT 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AY327136.1 GI:37575398" +COMMENT 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Ribosome display vector pRDV." 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Ribosome display vector pRDV(Ribosome display vector pRDV)" +COMMENT 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1))) "Standard Fields") +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 4279)" 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P.," +COMMENT 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Grutter,M.G. and Pluckthun,A." 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE High-affinity binders selected from designed ankyrin repeat protein" +COMMENT 1) +COMMENT #69=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " libraries" 1) +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004)" +COMMENT 1) +COMMENT #71=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 4279)" 1) +COMMENT #72=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and" +COMMENT 1) +COMMENT #73=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Pluckthun,A." 1) +COMMENT #74=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #75=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich," +COMMENT 1) +COMMENT #76=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Winterthurerstrasse 190, Zurich 8057, Switzerland" +COMMENT 1))) "References") +COMMENT #77=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 2 0 0 178) +COMMENT (CObjectList +COMMENT #80=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 213 (3 #31# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 213 End: 1073" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 213..1073" 1))) "AmpR") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2067 (3 #37# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2067 End: 2798" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2067..2798" 1))) "mcherry"))) +COMMENT "CDS (2 total)") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 2 1 0 178) +COMMENT (CObjectList +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1933 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1933 End: 1958" 1))) "IVS-f") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1963 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1963 End: 2037" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1963..2037" 1))) "TPP aptamer") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2070 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2070 End: 2087" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2070..2087" 1))) "Histag") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2104 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2104 End: 2104" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2104..2104" 1))) "orig G") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2781 (3 #43# 0) 1 2 2 1 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2781 End: 2809 (Complementary)" +COMMENT 1))) "IVS-KpnI-mCherry-r") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2808 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2808 End: 3695" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "tolA spacer" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2808..3695" 1))) "tolA spacer") +COMMENT #111=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3051 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3051 End: 3071 (Complementary)" +COMMENT 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3051..3071)" 1))) +COMMENT "annealing site of tolAk"))) +COMMENT "Misc. Feature (7 total)") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #117=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1767 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1767 End: 1787" 1))) +COMMENT "pRDV-seq"))) "Primer (1 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1905 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1905 End: 1932" 1))) +COMMENT "T7-pRDV-f (annealing site)") +COMMENT #122=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2012 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2012 End: 2037 (Complementary)" +COMMENT 1))) "IVS-thiM-r annealing site") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2769 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2769 End: 2798 (Complementary)" +COMMENT 1))) +COMMENT "IVS-KpnI-stop-mCherry-r (annealing site)"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #127=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1911 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1911 End: 1927" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) "T7" +COMMENT 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1911..1927" 1))) "Promoter_P_1"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1229 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1229 End: 1885" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "ColE1" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1229..1885" 1))) "Rep_Origin_1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 39 (7 39 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1928 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1928 End: 1948" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1928..1948" 1))) "Stem_Loop_1"))) +COMMENT "Stem Loop (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2106 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2106 End: 2106" 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2106..2106" 1))) "orig T"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #148=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #149=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25772280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25824152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 0 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #151=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25437712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26736936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 329 " 1) +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1575 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25714976 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26736776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 2103 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25860648 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 2405 " 1))))) "BbsI: 1 site") +COMMENT 8 12 "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25714896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #15# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #15# 1) 1 2 2 0 191) +COMMENT " N1: 2070 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25846472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25887896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #168=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25433856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #169=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #170=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 935 " 1) +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #22# 2) 1 2 2 0 191) +COMMENT " N2: 1925 (on complementary strand)" +COMMENT 1))))) "BsaI: 2 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25846792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #173=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 161 " 1) +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 1169 " 1) +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2132 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26736696 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26736616 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1950 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26736536 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25772040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 2804 " 1))))) "KpnI: 1 site") +COMMENT 5 1 "GGTACC" "CCATGG") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25431936 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25568464 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #187=(CGroupPar +COMMENT (CParagraph 0 (10 #14# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #14# 1) 1 2 2 0 191) +COMMENT " N1: 2072 " 1))))) "NsiI: 1 site") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25440992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #190=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 632 " 1))))) "PvuI: 1 site") 4 +COMMENT 2 "CGATCG" "GCTAGC") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26737256 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25772200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 2092 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25450048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26736296 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25769080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25445880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XhoI: 0 sites") 1 5 "CTCGAG" +COMMENT "GAGCTC") +COMMENT #200=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26737416 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #201=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #202=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #203=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #204=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #205=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #206=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #207=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #208=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #209=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #210=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #211=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #212=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #213=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #214=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #215=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #216=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #217=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #218=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #219=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #220=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #221=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #222=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #223=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #224=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #225=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #226=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #227=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #228=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #229=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #230=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #231=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #232=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #233=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #234=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #235=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #236=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #237=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #238=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #239=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #240=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -6) 1 1 0 1 1 +COMMENT (mapper: 30.7814 -14.4018 40.0378 40.0378 0.01 10 -1 4220 4220 1 0 0) +COMMENT #241=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #242=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1152 100) +COMMENT (CObjectList +COMMENT #243=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #207# 27370780 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27567 6.27367 1 0.0214037) 0.148654) +COMMENT #244=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #204# 27777888 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pRDV-thiMN15#19-His6-mcherry" +COMMENT "@N" 1 0 0.871165 0 -10 17.7832 1.44863 Nil) +COMMENT #245=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4220 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #246=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -594 100) +COMMENT (CObjectList +COMMENT #247=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -176 100) +COMMENT (CObjectList +COMMENT #248=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #205# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 4.67813 5.95804 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #249=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT 13.0839 6.96932 0 -10 2.72243 1.04901 #248#) +COMMENT #250=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #205# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.11386 3.202 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #251=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mcherry" "@N" 1 +COMMENT -10.7258 -10.454 0 -10 3.84637 1.04901 #250#)) +COMMENT (CObjectList)) +COMMENT #252=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -524 100) +COMMENT (CObjectList +COMMENT #253=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0.780432 2.10048 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #254=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 178 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tolA spacer" +COMMENT "@N" 1 -15.6641 1.74233 0 -10 5.295 1.04901 +COMMENT #253#) +COMMENT #255=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.73925 1.9 +COMMENT 0.082322 1) +COMMENT #256=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "annealing site of tolAk" "@N" 1 -17.8246 +COMMENT -1.74233 0 -10 10.3652 1.04901 #255#) +COMMENT #257=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #210# 24889180 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 3.147 1.9 +COMMENT 0.082322 1) +COMMENT #258=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 21020184 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 2.5352 -29.6196 0 -10 2.92224 1.04901 #257#) +COMMENT #259=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 3.24511 +COMMENT 3.3566 1 0.082322) 0.8 1.8 0) +COMMENT #260=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 5.7058 -17.4233 0 -10 5.8195 1.04901 +COMMENT #259#) +COMMENT #261=(CScratch +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.19754 1.9 +COMMENT 0.082322 1) +COMMENT #262=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Histag" "@N" 1 +COMMENT 3.16061 -20.908 0 -10 2.99717 1.04901 #261#) +COMMENT #263=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #210# 3801544 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 3.4012 1.9 +COMMENT 0.082322 1) +COMMENT #264=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "IVS-f" "@N" 1 +COMMENT 7.35346 -12.1963 0 -10 2.19792 1.04901 #263#) +COMMENT #265=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.14061 1.9 +COMMENT 0.082322 1) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 178 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-KpnI-mCherry-r" "@N" 1 -15.7236 -6.96932 +COMMENT 0 -10 8.91657 1.04901 #265#)) (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1501 100) +COMMENT (CObjectList +COMMENT #268=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #210# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.64796 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pRDV-seq" "@N" +COMMENT 1 14.5901 -5.22699 0 -10 4.64561 1.04901 +COMMENT #268#)) (CObjectList)) +COMMENT #270=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -245 100) +COMMENT (CObjectList +COMMENT #271=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #223# 3801544 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 3.28376 1.9 +COMMENT 0.082322 1) +COMMENT #272=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-thiM-r annealing site" "@N" 1 7.81871 +COMMENT -19.1656 0 -10 11.4142 1.04901 #271#) +COMMENT #273=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #223# +COMMENT 1944545584 100) (LOGPEN 0 0 16711680) 1 1 +COMMENT 2.15845 1.9 0.082322 1) +COMMENT #274=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 393244 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-KpnI-stop-mCherry-r (annealing site)" +COMMENT "@N" 1 -19.6864 -8.71165 0 -10 18.7073 +COMMENT 1.04901 #273#) +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 3.44282 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 3736176 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "T7-pRDV-f (annealing site)" "@N" 1 17.0042 +COMMENT -6.96932 0 -10 12.0636 1.04901 #275#)) +COMMENT (CObjectList)) +COMMENT #277=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #278=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 4 128) 6 1.16464 3.34663 3.4339) +COMMENT 0.4 0.082322 1.08464 1.8 1.8 0) +COMMENT #279=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Promoter P 1" +COMMENT "@N" 1 6.75003 -13.9386 0 -10 6.01931 1.04901 +COMMENT #278#)) (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -734 100) +COMMENT (CObjectList +COMMENT #281=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #205# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 0.835356 3.47106 +COMMENT 4.44772 1 0.082322) 0.8 1.8 0) +COMMENT #282=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Rep Origin 1" +COMMENT "@N" 1 15.8732 -1.74233 0 -10 5.8195 1.04901 +COMMENT #281#)) (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 39 (7 39 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #284=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 3.40863 1.9 +COMMENT 0.082322 1) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 1096045639 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Stem Loop 1" +COMMENT "@N" 1 11.5708 -10.454 0 -10 5.74457 1.04901 +COMMENT #284#)) (CObjectList)) +COMMENT #286=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1082 100) +COMMENT (CObjectList +COMMENT #287=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #210# 24943096 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 3.14403 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT 2.42969 -31.3619 0 -10 2.72243 1.04901 #287#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #289=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1571 100) +COMMENT (CObjectList +COMMENT #290=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -803 100) +COMMENT (CObjectList +COMMENT #291=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #209# 25945968 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.14848 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #211# 24614572 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (2103)" "@N (@S)" 5 4.02921 +COMMENT -27.8773 0 -10 5.56974 0.924127 #291#)) +COMMENT (CObjectList)) +COMMENT #293=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1222 100) +COMMENT (CObjectList +COMMENT #294=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #209# 393220 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.37593 1.9 +COMMENT 0.082322 1) +COMMENT #295=(CLabel (CWidget 0 (0 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (1950)" "@N (@S)" 5 6.54244 +COMMENT -15.681 0 -10 5.09519 0.924127 #294#)) +COMMENT (CObjectList)) +COMMENT #296=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1710 100) +COMMENT (CObjectList +COMMENT #297=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #209# 3801504 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.10642 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel (CWidget 0 (0 0) 1 2 0 0 #211# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (2804)" "@N (@S)" 5 -14.956 +COMMENT -5.22699 0 -10 4.69556 0.924127 #297#)) +COMMENT (CObjectList)) +COMMENT #299=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #300=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.16484 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #211# 24890092 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (2092)" "@N (@S)" 5 3.64565 +COMMENT -26.1349 0 -10 4.4458 0.924127 #300#)) +COMMENT (CObjectList)) +COMMENT #302=(CGroupWidget +COMMENT (CWidget 1 (10 #14# 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #303=(CScratch +COMMENT (CWidget 1 (1 #14# 1) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.19457 1.9 +COMMENT 0.082322 1) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #211# 1096040788 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (2072)" "@N (@S)" 5 4.04558 +COMMENT -24.3926 0 -10 4.49575 0.924127 #303#)) +COMMENT (CObjectList)) +COMMENT #305=(CGroupWidget +COMMENT (CWidget 1 (10 #15# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #306=(CScratch +COMMENT (CWidget 1 (1 #15# 1) 1 2 0 0 #209# +COMMENT 1944545584 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 3.19754 1.9 0.082322 1) +COMMENT #307=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #211# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (2070)" "@N (@S)" 5 4.32989 +COMMENT -22.6503 0 -10 4.82044 0.924127 #306#)) +COMMENT (CObjectList)) +COMMENT #308=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #309=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.33518 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel (CWidget 0 (0 0) 1 2 0 0 #211# 2 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (632)" "@N (@S)" 5 13.389 8.71165 +COMMENT 0 -10 4.17106 0.924127 #309#)) (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList +COMMENT #312=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.69955 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #211# 3801504 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (2405)" "@N (@S)" 5 -8.70287 +COMMENT -12.1963 0 -10 4.64561 0.924127 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -1641 100) +COMMENT (CObjectList +COMMENT #315=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #209# 1414808404 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.7856 1.9 +COMMENT 0.082322 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 24892828 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (329)" "@N (@S)" 5 11.3356 +COMMENT 10.454 0 -10 4.69556 0.924127 #315#) +COMMENT #317=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.93338 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel (CWidget 0 (0 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1575)" "@N (@S)" 5 15.5505 +COMMENT -3.48466 0 -10 5.17011 0.924127 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 2 (10 #22# 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.88476 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel (CWidget 0 (0 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (935)" "@N (@S)" 5 15.3853 +COMMENT 1.74233 0 -10 4.12111 0.924127 #320#) +COMMENT #322=(CScratch +COMMENT (CWidget 2 (1 #22# 2) 1 2 0 0 #209# 3801680 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.41309 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel (CWidget 0 (0 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (1925)" "@N (@S)" 5 12.8721 +COMMENT -8.71165 0 -10 4.57068 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -946 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.03534 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel (CWidget 0 (0 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (161)" "@N (@S)" 5 8.63408 +COMMENT 12.1963 0 -10 4.64561 0.924127 #325#) +COMMENT #327=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.53691 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel (CWidget 0 (0 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (1169)" "@N (@S)" 5 15.9578 0 0 +COMMENT -10 5.17011 0.924127 #327#) +COMMENT #329=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.10538 1.9 +COMMENT 0.082322 1) +COMMENT #330=(CLabel (CWidget 0 (0 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2132)" "@N (@S)" 5 -3.82062 +COMMENT -13.9386 0 -10 5.24504 0.924127 #329#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #331=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #332=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) +COMMENT (CObList #333=(AnlzFontColorItem 2037 2054 37173247) +COMMENT #334=(AnlzFontColorItem 2055 2058 33554432) +COMMENT #335=(AnlzFontColorItem 2060 2065 37173247) +COMMENT #336=(AnlzFontColorItem 2059 2059 33554432)) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21293640 (CObList))) +FEATURES Location/Qualifiers + promoter 1911..1927 + /vntifkey="30" + /label=Promoter_P_1 + /note="T7" + stem_loop 1928..1948 + /vntifkey="39" + /label=Stem_Loop_1 + misc_feature 2808..3695 + /vntifkey="21" + /label=tolA\spacer + /note="tolA spacer" + rep_origin 1229..1885 + /vntifkey="33" + /label=Rep_Origin_1 + /note="ColE1" + CDS 213..1073 + /vntifkey="4" + /label=AmpR + misc_feature complement(3051..3071) + /vntifkey="21" + /label=annealing\site\of\tolAk + /note="Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" + mutation 2106..2106 + /vntifkey="62" + /label=orig\T + misc_feature 2104..2104 + /vntifkey="21" + /label=orig\G + misc_feature 1963..2037 + /vntifkey="21" + /label=TPP\aptamer + misc_feature 2070..2087 + /vntifkey="21" + /label=Histag + CDS 2067..2798 + /vntifkey="4" + /label=mcherry + misc_feature 1933..1958 + /vntifkey="21" + /label=IVS-f + misc_feature complement(2781..2809) + /vntifkey="21" + /label=IVS-KpnI-mCherry-r + primer_bind complement(2012..2037) + /vntifkey="28" + /label=IVS-thiM-r\annealing\site + primer_bind complement(2769..2798) + /vntifkey="28" + /label=IVS-KpnI-stop-mCherry-r\(annealing\site) + primer_bind 1905..1932 + /vntifkey="28" + /label=T7-pRDV-f\(annealing\site) + primer 1767..1787 + /vntifkey="27" + /label=pRDV-seq +BASE COUNT 1210 a 972 c 1085 g 953 t +ORIGIN + 1 tttcggccta ttggttaaaa aatgagctga tttaacaaaa atttaacgcg aattttaaca + 61 aaatattaac gtttacaatt tcaggtggca cttttcgggg aaatgtgcgc ggaaccccta + 121 tttgtttatt tttctaaata cattcaaata tgtatccgct catgagacaa taaccctgat + 181 aaatgcttca ataatattga aaaaggaaga gtatgagtat tcaacatttc cgtgtcgccc + 241 ttattccctt ttttgcggca ttttgccttc ctgtttttgc tcacccagaa acgctggtga + 301 aagtaaaaga tgctgaagat cagttgggtg cacgagtggg ttacatcgaa ctggatctca + 361 acagcggtaa gatccttgag agttttcgcc ccgaagaacg ttttccaatg atgagcactt + 421 ttaaagttct gctatgtggc gcggtattat cccgtattga cgccgggcaa gagcaactcg + 481 gtcgccgcat acactattct cagaatgact tggttgagta ctcaccagtc acagaaaagc + 541 atcttacgga tggcatgaca gtaagagaat tatgcagtgc tgccataacc atgagtgata + 601 acactgcggc caacttactt ctgacaacga tcggaggacc gaaggagcta accgcttttt + 661 tgcacaacat gggggatcat gtaactcgcc ttgatcgttg ggaaccggag ctgaatgaag + 721 ccataccaaa cgacgagcgt gacaccacga tgcctgtagc aatggcaaca acgttgcgca + 781 aactattaac tggcgaacta cttactctag cttcccggca acaattaata gactggatgg + 841 aggcggataa agttgcagga ccacttctgc gctcggccct tccggctggc tggtttattg + 901 ctgataaatc tggagccggt gagcgtgggt ctcgcggtat cattgcagca ctggggccag + 961 atggtaagcc ctcccgtatc gtagttatct acacgacggg gagtcaggca actatggatg + 1021 aacgaaatag acagatcgct gagataggtg cctcactgat taagcattgg taactgtcag + 1081 accaagttta ctcatatata ctttagattg atttaaaact tcatttttaa tttaaaagga + 1141 tctaggtgaa gatccttttt gataatctca tgaccaaaat cccttaacgt gagttttcgt + 1201 tccactgagc gtcagacccc gtagaaaaga tcaaaggatc ttcttgagat cctttttttc + 1261 tgcgcgtaat ctgctgcttg caaacaaaaa aaccaccgct accagcggtg gtttgtttgc + 1321 cggatcaaga gctaccaact ctttttccga aggtaactgg cttcagcaga gcgcagatac + 1381 caaatactgt ccttctagtg tagccgtagt taggccacca cttcaagaac tctgtagcac + 1441 cgcctacata cctcgctctg ctaatcctgt taccagtggc tgctgccagt ggcgataagt + 1501 cgtgtcttac cgggttggac tcaagacgat agttaccgga taaggcgcag cggtcgggct + 1561 gaacgggggg ttcgtgcaca cagcccagct tggagcgaac gacctacacc gaactgagat + 1621 acctacagcg tgagctatga gaaagcgcca cgcttcccga agggagaaag gcggacaggt + 1681 atccggtaag cggcagggtc ggaacaggag agcgcacgag ggagcttcca gggggaaacg + 1741 cctggtatct ttatagtcct gtcgggtttc gccacctctg acttgagcgt cgatttttgt + 1801 gatgctcgtc aggggggcgg agcctatgga aaaacgccag caacgcggcc tttttacggt + 1861 tcctggcctt ttgctggcct tttgctcaca tgacccgaca ccatcgaaat taatacgact + 1921 cactataggg agaccacaac ggtttcccga attcaaccaa acgactcggg gtgcccttct + 1981 gcgtgaaggc tgagaaatac ccgtatcacc tgatctggat aatgccagcg tagggaagct + 2041 cttaagaatc agatcaggag caaactatgc atcatcacca tcatcaccaa gtcgacctgc + 2101 tggatccaaa catggcaatc attaaggagt tcatgagatt caaagttcac atggaaggtt + 2161 ctgtaaatgg acatgaattt gaaatagaag gtgaaggaga aggaaggcct tatgaaggaa + 2221 cccaaaccgc gaagctaaaa gttactaagg gtggcccatt accatttgca tgggatatcc + 2281 ttagccctca attcatgtat gggtcaaagg cttatgtcaa gcaccccgcc gacattccag + 2341 actatctaaa gttatctttt cccgaagggt ttaagtggga gcgtgtgatg aacttcgaag + 2401 acggtggcgt ggtaacagtg actcaggatt cgtccctgca agatggtgaa tttatctaca + 2461 aagtcaaatt aagaggaact aactttccat ctgacggccc ggttatgcaa aaaaagacaa + 2521 tgggctggga ggcctcctca gaacgaatgt accctgaaga tggtgccttg aagggtgaga + 2581 ttaaacaaag attgaaattg aaagatggtg gacattatga cgctgaggtt aaaacgacat + 2641 acaaagctaa gaaacctgtc cagctcccag gtgcttacaa tgtaaatata aaacttgata + 2701 ttacatcaca taatgaagat tatacgatag ttgaacaata cgaaagggct gaggggagac + 2761 atagtactgg tggcatggat gaactataca aaggttctgg taccgcagga tctggtggcc + 2821 agaagcaagc tgaagaggcg gcagcgaaag cggcggcaga tgctaaagcg aaggccgaag + 2881 cagatgctaa agctgcggaa gaagcagcga agaaagcggc tgcagacgca aagaaaaaag + 2941 cagaagcaga agccgccaaa gccgcagccg aagcgcagaa aaaagccgag gcagccgctg + 3001 cggcactgaa gaagaaagcg gaagcggcag aagcagctgc agctgaagca agaaagaaag + 3061 cggcaactga agctgctgaa aaagccaaag cagaagctga gaagaaagcg gctgctgaaa + 3121 aggctgcagc tgataagaaa gcggcagcag agaaagctgc agccgacaaa aaagcagcag + 3181 aaaaagcggc tgctgaaaag gcagcagctg ataagaaagc agcggcagaa aaagccgccg + 3241 cagacaaaaa agcggcagcg gcaaaagctg cagctgaaaa agccgctgca gcaaaagcgg + 3301 ccgcagaggc agatgatatt ttcggtgagc taagctctgg taagaatgca ccgaaaacgg + 3361 ggggaggggc gaaagggaac aatgcttcgc ctgccgggag tggtaatact aaaaacaatg + 3421 gcgcatcagg ggccgatatc aataactatg ccgggcagat taaatctgct atcgaaagta + 3481 agttctatga cgcatcgtcc tatgcaggca aaacctgtac gctgcgcata aaactggcac + 3541 ccgatggtat gttactggat atcaaacctg aaggtggcga tcccgcactt tgtcaggctg + 3601 cgttggcagc agctaaactt gcgaagatcc cgaaaccacc aagccaggca gtatatgaag + 3661 tgttcaaaaa cgcgccattg gacttcaaac cgtagtagag atccggctgc taacaaagcc + 3721 cgaaaggaag ctgagttggc tgctgccacc gctgagcaat aactagcata accccttggg + 3781 gcctctaaac gggtcttgag gggttttttg ctgaaaggag gaactatatc cggatcgaga + 3841 tccccacgcg ccctgtagcg gcgcattaag cgcggcgggt gtggtggtta cgcgcagcgt + 3901 gaccgctaca cttgccagcg ccctagcgcc cgctcctttc gctttcttcc cttcctttct + 3961 cgccacgttc gccggctttc cccgtcaagc tctaaatcgg ggcatccctt tagggttccg + 4021 atttagtgct ttacggcacc tcgaccccaa aaaacttgat tagggtgatg gttcacgtag + 4081 tgggccatcg ccctgataga cggtttttcg ccctttgacg ttggagtcca cgttctttaa + 4141 tagtggactc ttgttccaaa ctggaacaac actcaaccct atctcggtct attcttttga + 4201 tttataaggg attttgccga +// diff --git a/lib/VNTI files/pRDV-thiMN15#19-NanoTag15-mcherry.gb b/lib/VNTI files/pRDV-thiMN15#19-NanoTag15-mcherry.gb new file mode 100644 index 00000000..27f82998 --- /dev/null +++ b/lib/VNTI files/pRDV-thiMN15#19-NanoTag15-mcherry.gb @@ -0,0 +1,1022 @@ +LOCUS pRDV-thiMN15#19- 4247 bp DNA circular SYN 13-JUL-2009 +DEFINITION Ribosome display vector pRDV, complete sequence. +ACCESSION AY327136 +VERSION AY327136.1 GI:37575398 +SOURCE Ribosome display vector pRDV. + ORGANISM Ribosome display vector pRDV + other sequences; artificial sequences; vectors. +REFERENCE 1 (bases 1 to 4279) + AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P., + Grutter,M.G. and Pluckthun,A. + TITLE High-affinity binders selected from designed ankyrin repeat protein + libraries + JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004) +REFERENCE 2 (bases 1 to 4279) + AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and + Pluckthun,A. + TITLE Direct Submission + JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich, + Winterthurerstrasse 190, Zurich 8057, Switzerland +COMMENT http://www.informaxinc.com/ +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|501439828| +COMMENT VNTDBDATE|523748464| +COMMENT LSOWNER| +COMMENT VNTNAME|pRDV-thiMN15#19-NanoTag15-mcherry| +COMMENT VNTAUTHORNAME|Demo User| +COMMENT VNTOAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pRDV-thiMN15#19-NanoTag15-mcherry" 0 4247 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 2 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 0 3 75) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 7 9 61 102 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 103 104 274 +COMMENT 25 26 55 91 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 105 57 38 +COMMENT 36 39 40 41 42 43 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "ApaLI" "AvaI" "BamHI" "ClaI" "EcoRI" "HindIII" "NcoI" +COMMENT "PstI" "SmaI" "XmaI" "Acc65I" "SacI") (CStringList "atg" "gtg") +COMMENT (CStringList "taa" "tga" "tag") (CObList) 1 "{(0,1),2}" 0 0 "" 0 +COMMENT 4294967295 0 0 0 0 0 0 0 "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 70 20 1 1 1 1 0 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4247 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #0=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 329 0 1575 0 0 "") +COMMENT #1=(CRSite (CStringList) "AvaI" "cycgrg" 2 0 1 1966 0 0 "") +COMMENT #2=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 2130 0 0 "") +COMMENT #3=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 1950 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "NcoI" "ccatgg" 2 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "PstI" "ctgcag" 6 0 6 2952 0 3069 0 3156 0 3189 +COMMENT 0 3300 0 3318 0 0 "") +COMMENT #8=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "Acc65I" "ggtacc" 2 0 1 2827 0 0 "") +COMMENT #11=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "")) +COMMENT (CObList +COMMENT #12=(CFSignal (CObList) "Promoter_P_1" 30 0 0 1911 1927 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1911..1927") +COMMENT #13=(CFSignal (CObList) "Stem_Loop_1" 39 0 0 1928 1948 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1928..1948") +COMMENT #14=(CFSignal (CObList) "tolA spacer" 21 0 0 2835 3722 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2835..3722") +COMMENT #15=(CFSignal (CObList) "Rep_Origin_1" 33 0 0 1229 1885 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1229..1885") +COMMENT #16=(CFSignal (CObList) "AmpR" 4 0 0 213 1073 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "213..1073") +COMMENT #17=(CFSignal (CObList) "annealing site of tolAk" 21 0 1 3078 3098 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(3078..3098)") +COMMENT #18=(CFSignal (CObList) "core riboswitch" 21 0 0 1963 2134 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "1963..2134") +COMMENT #19=(CFSignal (CObList) "orig T" 62 0 0 2133 2133 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2133..2133") +COMMENT #20=(CFSignal (CObList) "orig G" 21 0 0 2131 2131 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2131..2131") +COMMENT #21=(CFSignal (CObList) "TPP aptamer" 21 0 0 1963 2037 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1963..2037") +COMMENT #22=(CFSignal (CObList) "mcherry" 4 0 0 2067 2825 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2067..2825") +COMMENT #23=(CFSignal (CObList) "NanoTag15" 21 0 0 2067 2114 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2067..2114") +COMMENT #24=(CFSignal (CObList) "mCherry-int-r" 27 0 1 2329 2352 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #25=(CFSignal (CObList) "BamHI-Nanotag-r" 27 0 1 2115 2138 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "")) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #26=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #27=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pRDV-thiMN15#19-NanoTag15-mcherry" 2) 5 "" 0 4) +COMMENT #28=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #29=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pRDV-thiMN15#19-NanoTag15-mcherry'" 1) +COMMENT #30=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Ribosome display vector pRDV, complete sequence." 1) +COMMENT #31=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #32=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 12/11/08 04:50PM" 1) +COMMENT #33=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/13/09 09:41PM" 1) +COMMENT #34=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4247 bp" 1) +COMMENT #35=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #36=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #37=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #38=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #39=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #40=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 11-DEC-2008" 1) +COMMENT #41=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AY327136" +COMMENT 1) +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AY327136.1 GI:37575398" +COMMENT 1) +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Ribosome display vector pRDV." 1) +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Ribosome display vector pRDV(Ribosome display vector pRDV)" +COMMENT 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1))) "Standard Fields") +COMMENT #46=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 4279)" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P.," +COMMENT 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Grutter,M.G. and Pluckthun,A." 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE High-affinity binders selected from designed ankyrin repeat protein" +COMMENT 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " libraries" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004)" +COMMENT 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 4279)" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Pluckthun,A." 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich," +COMMENT 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Winterthurerstrasse 190, Zurich 8057, Switzerland" +COMMENT 1))) "References") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #61=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 213 (3 #16# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 213 End: 1073" 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 213..1073" 1))) "AmpR") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2067 (3 #22# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2067 End: 2825" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2067..2825" 1))) "mcherry"))) +COMMENT "CDS (2 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1963 (3 #18# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1963 End: 2134" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1963..2134" 1))) "core riboswitch") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1963 (3 #21# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1963 End: 2037" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1963..2037" 1))) "TPP aptamer") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2067 (3 #23# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2067 End: 2114" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2067..2114" 1))) "NanoTag15") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2131 (3 #20# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2131 End: 2131" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2131..2131" 1))) "orig G") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2835 (3 #14# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2835 End: 3722" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "tolA spacer" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2835..3722" 1))) "tolA spacer") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3078 (3 #17# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3078 End: 3098 (Complementary)" +COMMENT 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3078..3098)" 1))) +COMMENT "annealing site of tolAk"))) +COMMENT "Misc. Feature (6 total)") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2115 (3 #25# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2115 End: 2138 (Complementary)" +COMMENT 1))) "BamHI-Nanotag-r") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2329 (3 #24# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2329 End: 2352 (Complementary)" +COMMENT 1))) "mCherry-int-r"))) +COMMENT "Primer (2 total)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1911 (3 #12# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1911 End: 1927" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) "T7" +COMMENT 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1911..1927" 1))) "Promoter_P_1"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #111=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #112=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1229 (3 #15# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1229 End: 1885" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "ColE1" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1229..1885" 1))) "Rep_Origin_1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar (CParagraph 39 (7 39 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #118=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1928 (3 #13# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1928 End: 1948" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1928..1948" 1))) "Stem_Loop_1"))) +COMMENT "Stem Loop (1 total)") +COMMENT #122=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2133 (3 #19# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2133 End: 2133" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2133..2133" 1))) "orig T"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #128=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 34000632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #129=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 2827 " 1))))) "Acc65I: 1 site") +COMMENT 1 5 "GGTACC" "CCATGG") +COMMENT #131=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21882560 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #132=(CGroupPar +COMMENT (CParagraph 0 (10 #0# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (1 #0# 1) 1 2 2 0 191) +COMMENT " N1: 329 " 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #0# 2) 1 2 2 0 191) +COMMENT " N2: 1575 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 33289064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 1966 " 1))))) "AvaI: 1 site") +COMMENT 1 5 "CYCGRG" "GRGCYC") +COMMENT #138=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 34057792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 2130 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #141=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22216856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #142=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22651584 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #143=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1950 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #145=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 33491152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #146=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22779736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NcoI: 0 sites") 1 5 "CCATGG" +COMMENT "GGTACC") +COMMENT #147=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22773880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PstI: 6 sites") 5 1 "CTGCAG" +COMMENT "GACGTC") +COMMENT #148=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 33984376 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #149=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22450720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #150=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 33734552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 2 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #151=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #152=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #153=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #154=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #155=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #156=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #157=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #158=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #159=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #160=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #161=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #162=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #163=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #164=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #165=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #166=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #167=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #168=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #169=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #170=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #171=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #172=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #173=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #174=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #175=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #176=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #177=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #178=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #179=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #180=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #181=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #182=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #183=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #184=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #185=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #186=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #187=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #188=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #189=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #190=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 39 39 0.1 -265) +COMMENT 1 1 0 1 1 +COMMENT (mapper: 24.837 -14.4018 40.0378 40.0378 0.01 10 -1 4247 4247 1 0 0) +COMMENT #191=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -300 100) +COMMENT (CObjectList +COMMENT #192=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #193=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #157# 33424084 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27566 6.27366 1 0.0214037) 0.147709) +COMMENT #194=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #154# 26560244 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 +COMMENT "pRDV-thiMN15#19-NanoTag15-mcherry" "@N" 1 0 +COMMENT 0.871165 0 -10 21.6046 1.44863 Nil) +COMMENT #195=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #153# 12 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4247 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #196=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #197=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1085 100) +COMMENT (CObjectList +COMMENT #198=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #16# 0) 1 2 0 0 #155# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 4.68827 5.96004 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #199=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 14746160 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT 13.0752 6.96932 0 -10 2.7474 1.04901 #198#) +COMMENT #200=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #22# 0) 1 2 0 0 #155# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.10042 3.22153 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #201=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 24903452 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mcherry" "@N" 1 +COMMENT -12.3669 -8.71165 0 -10 3.87134 1.04901 #200#)) +COMMENT (CObjectList)) +COMMENT #202=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1222 100) +COMMENT (CObjectList +COMMENT #203=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #14# 0) 1 2 0 0 #156# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0.77547 2.08712 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #204=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 33941192 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tolA spacer" +COMMENT "@N" 1 -15.6815 1.74233 0 -10 5.34495 1.04901 +COMMENT #203#) +COMMENT #205=(CScratch +COMMENT (CWidget 0 (3 #17# 0) 1 2 0 0 #160# 27243256 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 1.72819 1.9 +COMMENT 0.082322 1) +COMMENT #206=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 22168548 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "annealing site of tolAk" "@N" 1 -17.8594 +COMMENT -1.74233 0 -10 10.4401 1.04901 #205#) +COMMENT #207=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #18# 0) 1 2 0 0 #156# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 3.12108 +COMMENT 3.37514 1 0.082322) 0.8 1.8 0) +COMMENT #208=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 26552684 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core riboswitch" "@N" 1 5.60039 -19.1656 0 +COMMENT -10 7.34306 1.04901 #207#) +COMMENT #209=(CScratch +COMMENT (CWidget 0 (3 #20# 0) 1 2 0 0 #160# +COMMENT 1129595207 100) (LOGPEN 0 8 13395507) 10 1 +COMMENT 3.12699 1.9 0.082322 1) +COMMENT #210=(CLabel (CWidget 0 (0 0) 1 2 0 0 #152# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT -2.26663 -13.9386 0 -10 2.94721 1.04901 #209#) +COMMENT #211=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #21# 0) 1 2 0 0 #156# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 3.26436 3.37514 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #212=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 21470324 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 5.95649 -17.4233 0 -10 5.86945 1.04901 +COMMENT #211#) +COMMENT #213=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #23# 0) 1 2 0 0 #156# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.670712 3.15062 +COMMENT 3.22153 1 0.082322) 0.8 1.8 0) +COMMENT #214=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 24791868 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "NanoTag15" "@N" +COMMENT 1 3.99093 -20.908 0 -10 5.22007 1.04901 #213#)) +COMMENT (CObjectList)) +COMMENT #215=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #216=(CScratch +COMMENT (CWidget 0 (3 #24# 0) 1 2 0 0 #160# 27243576 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 2.83453 1.9 +COMMENT 0.082322 1) +COMMENT #217=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 3801720 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mCherry-int-r" +COMMENT "@N" 1 -11.7276 -10.454 0 -10 6.26908 1.04901 +COMMENT #216#) +COMMENT #218=(CScratch +COMMENT (CWidget 0 (3 #25# 0) 1 2 0 0 #160# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.15062 1.9 +COMMENT 0.082322 1) +COMMENT #219=(CLabel (CWidget 0 (0 0) 1 2 0 0 #152# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "BamHI-Nanotag-r" "@N" 1 4.72688 -22.6503 0 +COMMENT -10 7.91752 1.04901 #218#)) (CObjectList)) +COMMENT #220=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -873 100) +COMMENT (CObjectList +COMMENT #221=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #12# 0) 1 2 0 0 #174# 0 100) +COMMENT (LOGPEN 0 4 128) 6 1.16464 3.36468 3.45195) +COMMENT 0.4 0.082322 1.08464 1.8 1.8 0) +COMMENT #222=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 24900260 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Promoter P 1" +COMMENT "@N" 1 9.00868 -12.1963 0 -10 6.06926 1.04901 +COMMENT #221#)) (CObjectList)) +COMMENT #223=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1222 100) +COMMENT (CObjectList +COMMENT #224=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #15# 0) 1 2 0 0 #155# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.48888 4.45932 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #225=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 34245364 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Rep Origin 1" +COMMENT "@N" 1 14.321 -6.96932 0 -10 5.86945 1.04901 +COMMENT #224#)) (CObjectList)) +COMMENT #226=(CGroupWidget +COMMENT (CWidget 39 (7 39 0) 1 2 0 0 Nil -1152 100) +COMMENT (CObjectList +COMMENT #227=(CScratch +COMMENT (CWidget 0 (3 #13# 0) 1 2 0 0 #173# 1114197 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 3.42684 1.9 +COMMENT 0.082322 1) +COMMENT #228=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 3801664 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Stem Loop 1" +COMMENT "@N" 1 11.5708 -10.454 0 -10 5.79452 1.04901 +COMMENT #227#)) (CObjectList)) +COMMENT #229=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #230=(CScratch +COMMENT (CWidget 0 (3 #19# 0) 1 2 0 0 #160# +COMMENT 1330257952 100) (LOGPEN 0 8 13395507) 10 1 +COMMENT 3.12404 1.9 0.082322 1) +COMMENT #231=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# -106 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT -7.57126 -12.1963 0 -10 2.7474 1.04901 #230#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #232=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1085 100) +COMMENT (CObjectList +COMMENT #233=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #234=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #159# 24779124 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.37071 1.9 +COMMENT 0.082322 1) +COMMENT #235=(CLabel (CWidget 0 (0 0) 1 2 0 0 #161# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Ava}I (1966)" "@N (@S)" 5 6.21279 +COMMENT -15.681 0 -10 4.74552 0.924127 #234#)) +COMMENT (CObjectList)) +COMMENT #236=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #237=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #159# 3847696 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.12847 1.9 +COMMENT 0.082322 1) +COMMENT #238=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #161# 1684625219 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (2130)" "@N (@S)" 5 -3.84694 +COMMENT -15.681 0 -10 5.59471 0.924127 #237#)) +COMMENT (CObjectList)) +COMMENT #239=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #240=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #159# 24562352 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.39434 1.9 +COMMENT 0.082322 1) +COMMENT #241=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #161# 26566148 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (1950)" "@N (@S)" 5 6.70735 +COMMENT -13.9386 0 -10 5.14514 0.924127 #240#)) +COMMENT (CObjectList)) +COMMENT #242=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #243=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #159# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.09894 1.9 +COMMENT 0.082322 1) +COMMENT #244=(CLabel (CWidget 0 (0 0) 1 2 0 0 #161# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Acc}65I (2827)" "@N (@S)" 5 -14.5893 +COMMENT -6.96932 0 -10 5.74457 0.924127 #243#)) +COMMENT (CObjectList)) +COMMENT #245=(CGroupWidget +COMMENT (CWidget 2 (10 #0# 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #246=(CScratch +COMMENT (CWidget 1 (1 #0# 1) 1 2 0 0 #159# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.7887 1.9 0.082322 +COMMENT 1) +COMMENT #247=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #151# 24653580 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (329)" "@N (@S)" 5 9.39356 +COMMENT 12.1963 0 -10 4.74552 0.924127 #246#) +COMMENT #248=(CScratch +COMMENT (CWidget 2 (1 #0# 2) 1 2 0 0 #159# 27235592 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.94825 1.9 +COMMENT 0.082322 1) +COMMENT #249=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #151# 24904820 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1575)" "@N (@S)" 5 13.1683 +COMMENT -8.71165 0 -10 5.19509 0.924127 #248#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #250=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #251=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 1075 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 34275432 +COMMENT (CStringList) 33973760 327684 (CObList))) +FEATURES Location/Qualifiers + promoter 1911..1927 + /vntifkey="30" + /label=Promoter_P_1 + /note="T7" + stem_loop 1928..1948 + /vntifkey="39" + /label=Stem_Loop_1 + misc_feature 2835..3722 + /vntifkey="21" + /label=tolA\spacer + /note="tolA spacer" + rep_origin 1229..1885 + /vntifkey="33" + /label=Rep_Origin_1 + /note="ColE1" + CDS 213..1073 + /vntifkey="4" + /label=AmpR + misc_feature complement(3078..3098) + /vntifkey="21" + /label=annealing\site\of\tolAk + /note="Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" + misc_feature 1963..2134 + /vntifkey="21" + /label=core\riboswitch + mutation 2133..2133 + /vntifkey="62" + /label=orig\T + misc_feature 2131..2131 + /vntifkey="21" + /label=orig\G + misc_feature 1963..2037 + /vntifkey="21" + /label=TPP\aptamer + CDS 2067..2825 + /vntifkey="4" + /label=mcherry + misc_feature 2067..2114 + /vntifkey="21" + /label=NanoTag15 + primer complement(2329..2352) + /vntifkey="27" + /label=mCherry-int-r + primer complement(2115..2138) + /vntifkey="27" + /label=BamHI-Nanotag-r +BASE COUNT 1210 a 974 c 1103 g 960 t +ORIGIN + 1 tttcggccta ttggttaaaa aatgagctga tttaacaaaa atttaacgcg aattttaaca + 61 aaatattaac gtttacaatt tcaggtggca cttttcgggg aaatgtgcgc ggaaccccta + 121 tttgtttatt tttctaaata cattcaaata tgtatccgct catgagacaa taaccctgat + 181 aaatgcttca ataatattga aaaaggaaga gtatgagtat tcaacatttc cgtgtcgccc + 241 ttattccctt ttttgcggca ttttgccttc ctgtttttgc tcacccagaa acgctggtga + 301 aagtaaaaga tgctgaagat cagttgggtg cacgagtggg ttacatcgaa ctggatctca + 361 acagcggtaa gatccttgag agttttcgcc ccgaagaacg ttttccaatg atgagcactt + 421 ttaaagttct gctatgtggc gcggtattat cccgtattga cgccgggcaa gagcaactcg + 481 gtcgccgcat acactattct cagaatgact tggttgagta ctcaccagtc acagaaaagc + 541 atcttacgga tggcatgaca gtaagagaat tatgcagtgc tgccataacc atgagtgata + 601 acactgcggc caacttactt ctgacaacga tcggaggacc gaaggagcta accgcttttt + 661 tgcacaacat gggggatcat gtaactcgcc ttgatcgttg ggaaccggag ctgaatgaag + 721 ccataccaaa cgacgagcgt gacaccacga tgcctgtagc aatggcaaca acgttgcgca + 781 aactattaac tggcgaacta cttactctag cttcccggca acaattaata gactggatgg + 841 aggcggataa agttgcagga ccacttctgc gctcggccct tccggctggc tggtttattg + 901 ctgataaatc tggagccggt gagcgtgggt ctcgcggtat cattgcagca ctggggccag + 961 atggtaagcc ctcccgtatc gtagttatct acacgacggg gagtcaggca actatggatg + 1021 aacgaaatag acagatcgct gagataggtg cctcactgat taagcattgg taactgtcag + 1081 accaagttta ctcatatata ctttagattg atttaaaact tcatttttaa tttaaaagga + 1141 tctaggtgaa gatccttttt gataatctca tgaccaaaat cccttaacgt gagttttcgt + 1201 tccactgagc gtcagacccc gtagaaaaga tcaaaggatc ttcttgagat cctttttttc + 1261 tgcgcgtaat ctgctgcttg caaacaaaaa aaccaccgct accagcggtg gtttgtttgc + 1321 cggatcaaga gctaccaact ctttttccga aggtaactgg cttcagcaga gcgcagatac + 1381 caaatactgt ccttctagtg tagccgtagt taggccacca cttcaagaac tctgtagcac + 1441 cgcctacata cctcgctctg ctaatcctgt taccagtggc tgctgccagt ggcgataagt + 1501 cgtgtcttac cgggttggac tcaagacgat agttaccgga taaggcgcag cggtcgggct + 1561 gaacgggggg ttcgtgcaca cagcccagct tggagcgaac gacctacacc gaactgagat + 1621 acctacagcg tgagctatga gaaagcgcca cgcttcccga agggagaaag gcggacaggt + 1681 atccggtaag cggcagggtc ggaacaggag agcgcacgag ggagcttcca gggggaaacg + 1741 cctggtatct ttatagtcct gtcgggtttc gccacctctg acttgagcgt cgatttttgt + 1801 gatgctcgtc aggggggcgg agcctatgga aaaacgccag caacgcggcc tttttacggt + 1861 tcctggcctt ttgctggcct tttgctcaca tgacccgaca ccatcgaaat taatacgact + 1921 cactataggg agaccacaac ggtttcccga attcaaccaa acgactcggg gtgcccttct + 1981 gcgtgaaggc tgagaaatac ccgtatcacc tgatctggat aatgccagcg tagggaagct + 2041 cttaagaatc agatcaggag caaactatgg acgttgaagc gtggctgggt gcgcgtgttc + 2101 cgctggttga aacccaagtc gacctgctgg atccaaacat ggcaatcatt aaggagttca + 2161 tgagattcaa agttcacatg gaaggttctg taaatggaca tgaatttgaa atagaaggtg + 2221 aaggagaagg aaggccttat gaaggaaccc aaaccgcgaa gctaaaagtt actaagggtg + 2281 gcccattacc atttgcatgg gatatcctta gccctcaatt catgtatggg tcaaaggctt + 2341 atgtcaagca ccccgccgac attccagact atctaaagtt atcttttccc gaagggttta + 2401 agtgggagcg tgtgatgaac ttcgaagacg gtggcgtggt aacagtgact caggattcgt + 2461 ccctgcaaga tggtgaattt atctacaaag tcaaattaag aggaactaac tttccatctg + 2521 acggcccggt tatgcaaaaa aagacaatgg gctgggaggc ctcctcagaa cgaatgtacc + 2581 ctgaagatgg tgccttgaag ggtgagatta aacaaagatt gaaattgaaa gatggtggac + 2641 attatgacgc tgaggttaaa acgacataca aagctaagaa acctgtccag ctcccaggtg + 2701 cttacaatgt aaatataaaa cttgatatta catcacataa tgaagattat acgatagttg + 2761 aacaatacga aagggctgag gggagacata gtactggtgg catggatgaa ctatacaaag + 2821 gttctggtac cgcaggatct ggtggccaga agcaagctga agaggcggca gcgaaagcgg + 2881 cggcagatgc taaagcgaag gccgaagcag atgctaaagc tgcggaagaa gcagcgaaga + 2941 aagcggctgc agacgcaaag aaaaaagcag aagcagaagc cgccaaagcc gcagccgaag + 3001 cgcagaaaaa agccgaggca gccgctgcgg cactgaagaa gaaagcggaa gcggcagaag + 3061 cagctgcagc tgaagcaaga aagaaagcgg caactgaagc tgctgaaaaa gccaaagcag + 3121 aagctgagaa gaaagcggct gctgaaaagg ctgcagctga taagaaagcg gcagcagaga + 3181 aagctgcagc cgacaaaaaa gcagcagaaa aagcggctgc tgaaaaggca gcagctgata + 3241 agaaagcagc ggcagaaaaa gccgccgcag acaaaaaagc ggcagcggca aaagctgcag + 3301 ctgaaaaagc cgctgcagca aaagcggccg cagaggcaga tgatattttc ggtgagctaa + 3361 gctctggtaa gaatgcaccg aaaacggggg gaggggcgaa agggaacaat gcttcgcctg + 3421 ccgggagtgg taatactaaa aacaatggcg catcaggggc cgatatcaat aactatgccg + 3481 ggcagattaa atctgctatc gaaagtaagt tctatgacgc atcgtcctat gcaggcaaaa + 3541 cctgtacgct gcgcataaaa ctggcacccg atggtatgtt actggatatc aaacctgaag + 3601 gtggcgatcc cgcactttgt caggctgcgt tggcagcagc taaacttgcg aagatcccga + 3661 aaccaccaag ccaggcagta tatgaagtgt tcaaaaacgc gccattggac ttcaaaccgt + 3721 agtagagatc cggctgctaa caaagcccga aaggaagctg agttggctgc tgccaccgct + 3781 gagcaataac tagcataacc ccttggggcc tctaaacggg tcttgagggg ttttttgctg + 3841 aaaggaggaa ctatatccgg atcgagatcc ccacgcgccc tgtagcggcg cattaagcgc + 3901 ggcgggtgtg gtggttacgc gcagcgtgac cgctacactt gccagcgccc tagcgcccgc + 3961 tcctttcgct ttcttccctt cctttctcgc cacgttcgcc ggctttcccc gtcaagctct + 4021 aaatcggggc atccctttag ggttccgatt tagtgcttta cggcacctcg accccaaaaa + 4081 acttgattag ggtgatggtt cacgtagtgg gccatcgccc tgatagacgg tttttcgccc + 4141 tttgacgttg gagtccacgt tctttaatag tggactcttg ttccaaactg gaacaacact + 4201 caaccctatc tcggtctatt cttttgattt ataagggatt ttgccga +// diff --git a/lib/VNTI files/pRDV-thiMN25SDN6-His6-mcherry.gb b/lib/VNTI files/pRDV-thiMN25SDN6-His6-mcherry.gb new file mode 100644 index 00000000..80a3abf6 --- /dev/null +++ b/lib/VNTI files/pRDV-thiMN25SDN6-His6-mcherry.gb @@ -0,0 +1,1265 @@ +LOCUS pRDV-thiMN 4227 bp DNA circular SYN 10-MAY-2009 +DEFINITION Ribosome display vector pRDV, complete sequence. +ACCESSION AY327136 +VERSION AY327136.1 GI:37575398 +SOURCE Ribosome display vector pRDV. + ORGANISM Ribosome display vector pRDV + other sequences; artificial sequences; vectors. +REFERENCE 1 (bases 1 to 4279) + AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P., + Grutter,M.G. and Pluckthun,A. + TITLE High-affinity binders selected from designed ankyrin repeat protein + libraries + JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004) +REFERENCE 2 (bases 1 to 4279) + AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and + Pluckthun,A. + TITLE Direct Submission + JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich, + Winterthurerstrasse 190, Zurich 8057, Switzerland +COMMENT http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|511655611| +COMMENT VNTDBDATE|517932571| +COMMENT LSOWNER| +COMMENT VNTNAME|pRDV-thiMN25SDN6-His6-mcherry| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pRDV-thiMN25SDN6-His6-mcherry" 0 4227 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 0 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 0 3 75) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 7 9 61 102 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 103 104 274 +COMMENT 25 26 55 91 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 105 57 38 +COMMENT 36 39 40 41 42 43 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "ApaLI" "AvaI" "BamHI" "ClaI" "EcoRI" "HindIII" "NcoI" +COMMENT "PstI" "SmaI" "XmaI" "NsiI") (CStringList "atg" "gtg") +COMMENT (CStringList "taa" "tga" "tag") (CObList) 1 "{(0,1),2}" 0 0 "" 0 +COMMENT 4294967295 0 0 0 0 0 0 0 "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 70 20 1 1 1 1 0 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4227 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #0=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 329 0 1575 0 0 "") +COMMENT #1=(CRSite (CStringList) "AvaI" "cycgrg" 2 0 1 1966 0 0 "") +COMMENT #2=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 2110 0 0 "") +COMMENT #3=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 1950 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "NcoI" "ccatgg" 2 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "PstI" "ctgcag" 6 0 6 2932 0 3049 0 3136 0 3169 +COMMENT 0 3280 0 3298 0 0 "") +COMMENT #8=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 2079 0 0 "")) +COMMENT (CObList +COMMENT #11=(CFSignal (CObList) "Promoter_P_1" 30 0 0 1911 1927 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1911..1927") +COMMENT #12=(CFSignal (CObList) "Stem_Loop_1" 39 0 0 1928 1948 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1928..1948") +COMMENT #13=(CFSignal (CObList) "tolA spacer" 21 0 0 2815 3702 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2815..3702") +COMMENT #14=(CFSignal (CObList) "Rep_Origin_1" 33 0 0 1229 1885 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1229..1885") +COMMENT #15=(CFSignal (CObList) "AmpR" 4 0 0 213 1073 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "213..1073") +COMMENT #16=(CFSignal (CObList) "annealing site of tolAk" 21 0 1 3058 3078 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(3058..3078)") +COMMENT #17=(CFSignal (CObList) "orig T" 62 0 0 2113 2113 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2113..2113") +COMMENT #18=(CFSignal (CObList) "orig G" 21 0 0 2111 2111 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2111..2111") +COMMENT #19=(CFSignal (CObList) "TPP aptamer" 21 0 0 1963 2037 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1963..2037") +COMMENT #20=(CFSignal (CObList) "Histag" 21 0 0 2077 2094 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2077..2094") +COMMENT #21=(CFSignal (CObList) "mcherry" 4 0 0 2074 2805 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2074..2805") +COMMENT #22=(CFSignal (CObList) "IVS-f" 21 0 0 1933 1958 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1933..1958") +COMMENT #23=(CFSignal (CObList) "IVS-KpnI-mCherry-r" 21 0 1 2788 2816 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(2788..2816)") +COMMENT #24=(CFSignal (CObList) "IVS-thiM-r annealing site" 28 0 1 2012 2037 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "complement(2012..2037)") +COMMENT #25=(CFSignal (CObList) "IVS-KpnI-stop-mCherry-r (annealing site)" 28 0 +COMMENT 1 2776 2805 0 (CStringList) (CStringList) 1 1 1 1 +COMMENT "complement(2776..2805)") +COMMENT #26=(CFSignal (CObList) "T7-pRDV-f (annealing site)" 28 0 0 1905 1932 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "1905..1932") +COMMENT #27=(CFSignal (CObList) "pRDV-seq" 27 0 0 1767 1787 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1767..1787") +COMMENT #28=(CFSignal (CObList) "IVS-BamHI-r" 27 0 1 2102 2127 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2102..2127)") +COMMENT #29=(CFSignal (CObList) "T7-IVS-f" 27 0 0 1908 1957 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #30=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #31=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pRDV-thiMN25SDN6-His6-mcherry" 2) 5 "" 0 4) +COMMENT #32=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #33=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pRDV-thiMN25SDN6-His6-mcherry'" 1) +COMMENT #34=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Ribosome display vector pRDV, complete sequence." 1) +COMMENT #35=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Local object" 1) +COMMENT #36=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 03/01/09 10:33\214\337\214\343" 1) +COMMENT #37=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 05/10/09 02:09\214\337\214\343" 1) +COMMENT #38=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4227 bp" 1) +COMMENT #39=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #40=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #41=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 9-MAR-2009" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AY327136" +COMMENT 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AY327136.1 GI:37575398" +COMMENT 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Ribosome display vector pRDV." 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Ribosome display vector pRDV(Ribosome display vector pRDV)" +COMMENT 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1))) "Standard Fields") +COMMENT #50=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 4279)" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P.," +COMMENT 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Grutter,M.G. and Pluckthun,A." 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE High-affinity binders selected from designed ankyrin repeat protein" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " libraries" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004)" +COMMENT 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 4279)" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and" +COMMENT 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Pluckthun,A." 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich," +COMMENT 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Winterthurerstrasse 190, Zurich 8057, Switzerland" +COMMENT 1))) "References") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "Demo User" +COMMENT 1))) "Author") +COMMENT #65=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 213 (3 #15# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 213 End: 1073" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 213..1073" 1))) "AmpR") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2074 (3 #21# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2074 End: 2805" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2074..2805" 1))) "mcherry"))) +COMMENT "CDS (2 total)") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1933 (3 #22# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1933 End: 1958" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1933..1958" 1))) "IVS-f") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1963 (3 #19# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1963 End: 2037" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1963..2037" 1))) "TPP aptamer") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2077 (3 #20# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2077 End: 2094" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2077..2094" 1))) "Histag") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2111 (3 #18# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2111 End: 2111" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2111..2111" 1))) "orig G") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2788 (3 #23# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2788 End: 2816 (Complementary)" +COMMENT 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2788..2816)" 1))) +COMMENT "IVS-KpnI-mCherry-r") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2815 (3 #13# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2815 End: 3702" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "tolA spacer" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2815..3702" 1))) "tolA spacer") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3058 (3 #16# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3058 End: 3078 (Complementary)" +COMMENT 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3058..3078)" 1))) +COMMENT "annealing site of tolAk"))) +COMMENT "Misc. Feature (7 total)") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1767 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1767 End: 1787" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1767..1787" 1))) "pRDV-seq") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1908 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1908 End: 1957" 1))) +COMMENT "T7-IVS-f") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2102 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2102 End: 2127 (Complementary)" +COMMENT 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2102..2127)" 1))) +COMMENT "IVS-BamHI-r"))) "Primer (3 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1905 (3 #26# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1905 End: 1932" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1905..1932" 1))) +COMMENT "T7-pRDV-f (annealing site)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2012 (3 #24# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2012 End: 2037 (Complementary)" +COMMENT 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2012..2037)" 1))) +COMMENT "IVS-thiM-r annealing site") +COMMENT #128=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2776 (3 #25# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2776 End: 2805 (Complementary)" +COMMENT 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2776..2805)" 1))) +COMMENT "IVS-KpnI-stop-mCherry-r (annealing site)"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1911 (3 #11# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1911 End: 1927" 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) "T7" +COMMENT 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1911..1927" 1))) "Promoter_P_1"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1229 (3 #14# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1229 End: 1885" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "ColE1" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1229..1885" 1))) "Rep_Origin_1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #144=(CFolderPar +COMMENT (CGroupPar (CParagraph 39 (7 39 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #145=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1928 (3 #12# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1928 End: 1948" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1928..1948" 1))) "Stem_Loop_1"))) +COMMENT "Stem Loop (1 total)") +COMMENT #149=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #150=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2113 (3 #17# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2113 End: 2113" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2113..2113" 1))) "orig T"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #154=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3840968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #0# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #0# 1) 1 2 2 0 191) +COMMENT " N1: 329 " 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #0# 2) 1 2 2 0 191) +COMMENT " N2: 1575 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20996440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #160=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #161=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 1966 " 1))))) "AvaI: 1 site") +COMMENT 1 5 "CYCGRG" "GRGCYC") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20996360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #163=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 2110 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20996280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20996200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1950 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20996120 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3863496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NcoI: 0 sites") 1 5 "CCATGG" +COMMENT "GGTACC") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20989032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #172=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 2079 " 1))))) "NsiI: 1 site") +COMMENT 5 1 "ATGCAT" "TACGTA") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3863256 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #175=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 2932 " 1) +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 3049 " 1) +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (1 #7# 3) 1 2 2 0 191) +COMMENT " N3: 3136 " 1) +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #7# 4) 1 2 2 0 191) +COMMENT " N4: 3169 " 1) +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #7# 5) 1 2 2 0 191) +COMMENT " N5: 3280 " 1) +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #7# 6) 1 2 2 0 191) +COMMENT " N6: 3298 " 1))))) "PstI: 6 sites") +COMMENT 5 1 "CTGCAG" "GACGTC") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 3863176 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20991512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) "Restriction/Methylation Map")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #184=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #185=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #186=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #187=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #188=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #189=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #190=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #191=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #192=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #193=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #194=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #195=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #196=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #197=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #198=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #199=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #200=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #201=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #202=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #203=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #204=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #205=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #206=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #207=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #208=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #209=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #210=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #211=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #212=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #213=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #214=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #215=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #216=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #217=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #218=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #219=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #220=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #221=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #222=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #223=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 39 39 0.1 -365) +COMMENT 1 1 0 1 1 +COMMENT (mapper: 32.2251 -16.1501 40.0378 40.0378 0.01 10 -1 4227 4227 1 0 0) +COMMENT #224=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -570 100) +COMMENT (CObjectList +COMMENT #225=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -570 100) +COMMENT (CObjectList +COMMENT #226=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 25273380 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27567 6.27367 1 0.0214037) 0.148408) +COMMENT #227=(CLabel (CWidget 1001 (0 0) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pRDV-thiMN25SDN6-His6-mcherry" +COMMENT "@N" 1 0 0.871165 0 -10 18.6324 1.44863 Nil) +COMMENT #228=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #186# 32086148 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4227 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #229=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #230=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #231=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #15# 0) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 4.68077 5.95856 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #232=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 1095188807 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT 14.0324 8.71165 0 -10 2.72243 1.04901 #231#) +COMMENT #233=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #21# 0) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 2.11035 3.1967 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #234=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 24656040 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mcherry" "@N" 1 +COMMENT -9.47796 -13.9386 0 -10 3.84637 1.04901 #233#)) +COMMENT (CObjectList)) +COMMENT #235=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #236=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #13# 0) 1 2 0 0 #189# +COMMENT 268742920 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0.779139 2.097 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #237=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 24862652 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tolA spacer" +COMMENT "@N" 1 -17.3332 3.48466 0 -10 5.295 1.04901 +COMMENT #236#) +COMMENT #238=(CScratch +COMMENT (CWidget 0 (3 #16# 0) 1 2 0 0 #193# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.73637 1.9 +COMMENT 0.082322 1) +COMMENT #239=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 22565244 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "annealing site of tolAk" "@N" 1 -19.4794 +COMMENT -1.74233 0 -10 10.3652 1.04901 #238#) +COMMENT #240=(CScratch +COMMENT (CWidget 0 (3 #18# 0) 1 2 0 0 #193# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.14179 1.9 +COMMENT 0.082322 1) +COMMENT #241=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 3801824 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig G" "@N" 1 +COMMENT 2.44919 -29.6196 0 -10 2.92224 1.04901 #240#) +COMMENT #242=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #19# 0) 1 2 0 0 #189# +COMMENT 1869182064 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 3.25012 3.36143 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #243=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 1094926663 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 6.02495 -19.1656 0 -10 5.8195 1.04901 +COMMENT #242#) +COMMENT #244=(CScratch +COMMENT (CWidget 0 (3 #20# 0) 1 2 0 0 #193# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.19225 1.9 +COMMENT 0.082322 1) +COMMENT #245=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 6751096 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Histag" "@N" 1 +COMMENT 3.15357 -22.6503 0 -10 2.99717 1.04901 #244#) +COMMENT #246=(CScratch +COMMENT (CWidget 0 (3 #22# 0) 1 2 0 0 #193# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.40595 1.9 +COMMENT 0.082322 1) +COMMENT #247=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 7249792 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "IVS-f" "@N" 1 +COMMENT 12.3514 -10.454 0 -10 2.19792 1.04901 #246#) +COMMENT #248=(CScratch +COMMENT (CWidget 0 (3 #23# 0) 1 2 0 0 #193# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 2.13707 1.9 +COMMENT 0.082322 1) +COMMENT #249=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-KpnI-mCherry-r" "@N" 1 -17.0149 -8.71165 +COMMENT 0 -10 8.91657 1.04901 #248#)) (CObjectList)) +COMMENT #250=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -594 100) +COMMENT (CObjectList +COMMENT #251=(CScratch +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #193# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.65231 1.9 +COMMENT 0.082322 1) +COMMENT #252=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# -803 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pRDV-seq" "@N" +COMMENT 1 16.3272 -5.22699 0 -10 4.64561 1.04901 +COMMENT #251#) +COMMENT #253=(CScratch +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #193# 3801504 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 3.15514 1.9 +COMMENT 0.082322 1) +COMMENT #254=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 24794252 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "IVS-BamHI-r" +COMMENT "@N" 1 3.82739 -26.1349 0 -10 5.49481 1.04901 +COMMENT #253#) +COMMENT #255=(CPrimerArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #191# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1.16464 3.36885 +COMMENT 3.44305) 0.4 0.082322 1.8 1.8 0) +COMMENT #256=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 1114146 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T7-IVS-f" "@N" +COMMENT 1 11.096 -12.1963 0 -10 3.5966 1.04901 #255#)) +COMMENT (CObjectList)) +COMMENT #257=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #258=(CScratch +COMMENT (CWidget 0 (3 #24# 0) 1 2 0 0 #206# 3801680 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 3.28871 1.9 +COMMENT 0.082322 1) +COMMENT #259=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 24861836 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-thiM-r annealing site" "@N" 1 8.10727 +COMMENT -20.908 0 -10 11.4142 1.04901 #258#) +COMMENT #260=(CScratch +COMMENT (CWidget 0 (3 #25# 0) 1 2 0 0 #206# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 2.15488 1.9 +COMMENT 0.082322 1) +COMMENT #261=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 2228241 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "IVS-KpnI-stop-mCherry-r (annealing site)" +COMMENT "@N" 1 -21.1325 -10.454 0 -10 18.7073 1.04901 +COMMENT #260#) +COMMENT #262=(CScratch +COMMENT (CWidget 0 (3 #26# 0) 1 2 0 0 #206# 393220 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 3.44751 1.9 +COMMENT 0.082322 1) +COMMENT #263=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 32126340 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "T7-pRDV-f (annealing site)" "@N" 1 18.8396 +COMMENT -6.96932 0 -10 12.0636 1.04901 #262#)) +COMMENT (CObjectList)) +COMMENT #264=(CGroupWidget (CWidget 30 (7 30 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #265=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #11# 0) 1 2 0 0 #207# 0 100) +COMMENT (LOGPEN 0 4 128) 6 1.32929 3.35134 3.4386) +COMMENT 0.4 0.082322 1.24929 1.8 1.8 0) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 1869836130 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Promoter P 1" +COMMENT "@N" 1 9.15385 -13.9386 0 -10 6.01931 1.04901 +COMMENT #265#)) (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #268=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #14# 0) 1 2 0 0 #188# +COMMENT 537543508 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 0.835356 3.4757 +COMMENT 4.45074 1 0.082322) 0.8 1.8 0) +COMMENT #269=(CLabel (CWidget 0 (0 0) 1 2 0 0 #185# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Rep Origin 1" +COMMENT "@N" 1 17.528 -1.74233 0 -10 5.8195 1.04901 +COMMENT #268#)) (CObjectList)) +COMMENT #270=(CGroupWidget (CWidget 39 (7 39 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #271=(CScratch +COMMENT (CWidget 0 (3 #12# 0) 1 2 0 0 #206# +COMMENT 1414808404 100) (LOGPEN 0 0 16711680) 1 1 +COMMENT 3.41337 1.9 0.082322 1) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 22634412 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Stem Loop 1" +COMMENT "@N" 1 15.2305 -8.71165 0 -10 5.74457 1.04901 +COMMENT #271#)) (CObjectList)) +COMMENT #273=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1085 100) +COMMENT (CObjectList +COMMENT #274=(CScratch +COMMENT (CWidget 0 (3 #17# 0) 1 2 0 0 #193# 25945968 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 3.13882 1.9 +COMMENT 0.082322 1) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 25236764 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "orig T" "@N" 1 +COMMENT -2.03572 -15.681 0 -10 2.72243 1.04901 #274#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #276=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -629 100) +COMMENT (CObjectList +COMMENT #277=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #278=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.35698 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 268742920 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Ava}I (1966)" "@N (@S)" 5 6.35853 +COMMENT -17.4233 0 -10 4.69556 0.924127 #278#)) +COMMENT (CObjectList)) +COMMENT #280=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #281=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.14327 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 24654440 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (2110)" "@N (@S)" 5 3.89489 +COMMENT -27.8773 0 -10 5.49481 0.924127 #281#)) +COMMENT (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #284=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.38072 1.9 +COMMENT 0.082322 1) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 24900868 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (1950)" "@N (@S)" 5 6.89548 +COMMENT -15.681 0 -10 5.09519 0.924127 #284#)) +COMMENT (CObjectList)) +COMMENT #286=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #287=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.18928 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #194# 21636916 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (2079)" "@N (@S)" 5 4.00946 +COMMENT -24.3926 0 -10 4.49575 0.924127 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 2 (10 #0# 0) 1 2 0 0 Nil -1501 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 1 (1 #0# 1) 1 2 0 0 #192# 24889180 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.78641 1.9 +COMMENT 0.082322 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 1944749780 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (329)" "@N (@S)" 5 10.2037 +COMMENT 13.9386 0 -10 4.69556 0.924127 #290#) +COMMENT #292=(CScratch +COMMENT (CWidget 2 (1 #0# 2) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.93725 1.9 +COMMENT 0.082322 1) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 24654100 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1575)" "@N (@S)" 5 17.2328 +COMMENT -3.48466 0 -10 5.17011 0.924127 #292#)) +COMMENT (CObjectList)) +COMMENT #294=(CGroupWidget +COMMENT (CWidget 6 (10 #7# 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #295=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #192# 3801544 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.92336 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 24901092 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pst}I (2932)" "@N (@S)" 5 -16.4447 +COMMENT -5.22699 0 -10 4.4458 0.924127 #295#) +COMMENT #297=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #192# 24943096 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.74972 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 3801544 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pst}I (3049)" "@N (@S)" 5 -17.0855 +COMMENT -3.48466 0 -10 4.4458 0.924127 #297#) +COMMENT #299=(CScratch +COMMENT (CWidget 3 (1 #7# 3) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.62061 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 24726780 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pst}I (3136)" "@N (@S)" 5 -17.1948 0 0 +COMMENT -10 4.37087 0.924127 #299#) +COMMENT #301=(CScratch +COMMENT (CWidget 4 (1 #7# 4) 1 2 0 0 #192# 3801544 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.57164 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel (CWidget 0 (0 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pst}I (3169)" "@N (@S)" 5 -17.2106 +COMMENT 1.74233 0 -10 4.37087 0.924127 #301#) +COMMENT #303=(CScratch +COMMENT (CWidget 5 (1 #7# 5) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.4069 1.9 0.082322 +COMMENT 1) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #184# 24727240 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pst}I (3280)" "@N (@S)" 5 -17.2149 +COMMENT 5.22699 0 -10 4.4458 0.924127 #303#) +COMMENT #305=(CScratch +COMMENT (CWidget 6 (1 #7# 6) 1 2 0 0 #192# 1944545584 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.38019 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel (CWidget 0 (0 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pst}I (3298)" "@N (@S)" 5 -17.221 +COMMENT 6.96932 0 -10 4.4458 0.924127 #305#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #307=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #308=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21512520 (CObList))) +FEATURES Location/Qualifiers + promoter 1911..1927 + /vntifkey="30" + /label=Promoter_P_1 + /note="T7" + stem_loop 1928..1948 + /vntifkey="39" + /label=Stem_Loop_1 + misc_feature 2815..3702 + /vntifkey="21" + /label=tolA\spacer + /note="tolA spacer" + rep_origin 1229..1885 + /vntifkey="33" + /label=Rep_Origin_1 + /note="ColE1" + CDS 213..1073 + /vntifkey="4" + /label=AmpR + misc_feature complement(3058..3078) + /vntifkey="21" + /label=annealing\site\of\tolAk + /note="Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" + mutation 2113..2113 + /vntifkey="62" + /label=orig\T + misc_feature 2111..2111 + /vntifkey="21" + /label=orig\G + misc_feature 1963..2037 + /vntifkey="21" + /label=TPP\aptamer + misc_feature 2077..2094 + /vntifkey="21" + /label=Histag + CDS 2074..2805 + /vntifkey="4" + /label=mcherry + misc_feature 1933..1958 + /vntifkey="21" + /label=IVS-f + misc_feature complement(2788..2816) + /vntifkey="21" + /label=IVS-KpnI-mCherry-r + primer_bind complement(2012..2037) + /vntifkey="28" + /label=IVS-thiM-r\annealing\site + primer_bind complement(2776..2805) + /vntifkey="28" + /label=IVS-KpnI-stop-mCherry-r\(annealing\site) + primer_bind 1905..1932 + /vntifkey="28" + /label=T7-pRDV-f\(annealing\site) + primer 1767..1787 + /vntifkey="27" + /label=pRDV-seq + primer complement(2102..2127) + /vntifkey="27" + /label=IVS-BamHI-r + primer 1908..1957 + /vntifkey="27" + /label=T7-IVS-f +BASE COUNT 1201 a 966 c 1082 g 947 t 31 others +ORIGIN + 1 tttcggccta ttggttaaaa aatgagctga tttaacaaaa atttaacgcg aattttaaca + 61 aaatattaac gtttacaatt tcaggtggca cttttcgggg aaatgtgcgc ggaaccccta + 121 tttgtttatt tttctaaata cattcaaata tgtatccgct catgagacaa taaccctgat + 181 aaatgcttca ataatattga aaaaggaaga gtatgagtat tcaacatttc cgtgtcgccc + 241 ttattccctt ttttgcggca ttttgccttc ctgtttttgc tcacccagaa acgctggtga + 301 aagtaaaaga tgctgaagat cagttgggtg cacgagtggg ttacatcgaa ctggatctca + 361 acagcggtaa gatccttgag agttttcgcc ccgaagaacg ttttccaatg atgagcactt + 421 ttaaagttct gctatgtggc gcggtattat cccgtattga cgccgggcaa gagcaactcg + 481 gtcgccgcat acactattct cagaatgact tggttgagta ctcaccagtc acagaaaagc + 541 atcttacgga tggcatgaca gtaagagaat tatgcagtgc tgccataacc atgagtgata + 601 acactgcggc caacttactt ctgacaacga tcggaggacc gaaggagcta accgcttttt + 661 tgcacaacat gggggatcat gtaactcgcc ttgatcgttg ggaaccggag ctgaatgaag + 721 ccataccaaa cgacgagcgt gacaccacga tgcctgtagc aatggcaaca acgttgcgca + 781 aactattaac tggcgaacta cttactctag cttcccggca acaattaata gactggatgg + 841 aggcggataa agttgcagga ccacttctgc gctcggccct tccggctggc tggtttattg + 901 ctgataaatc tggagccggt gagcgtgggt ctcgcggtat cattgcagca ctggggccag + 961 atggtaagcc ctcccgtatc gtagttatct acacgacggg gagtcaggca actatggatg + 1021 aacgaaatag acagatcgct gagataggtg cctcactgat taagcattgg taactgtcag + 1081 accaagttta ctcatatata ctttagattg atttaaaact tcatttttaa tttaaaagga + 1141 tctaggtgaa gatccttttt gataatctca tgaccaaaat cccttaacgt gagttttcgt + 1201 tccactgagc gtcagacccc gtagaaaaga tcaaaggatc ttcttgagat cctttttttc + 1261 tgcgcgtaat ctgctgcttg caaacaaaaa aaccaccgct accagcggtg gtttgtttgc + 1321 cggatcaaga gctaccaact ctttttccga aggtaactgg cttcagcaga gcgcagatac + 1381 caaatactgt ccttctagtg tagccgtagt taggccacca cttcaagaac tctgtagcac + 1441 cgcctacata cctcgctctg ctaatcctgt taccagtggc tgctgccagt ggcgataagt + 1501 cgtgtcttac cgggttggac tcaagacgat agttaccgga taaggcgcag cggtcgggct + 1561 gaacgggggg ttcgtgcaca cagcccagct tggagcgaac gacctacacc gaactgagat + 1621 acctacagcg tgagctatga gaaagcgcca cgcttcccga agggagaaag gcggacaggt + 1681 atccggtaag cggcagggtc ggaacaggag agcgcacgag ggagcttcca gggggaaacg + 1741 cctggtatct ttatagtcct gtcgggtttc gccacctctg acttgagcgt cgatttttgt + 1801 gatgctcgtc aggggggcgg agcctatgga aaaacgccag caacgcggcc tttttacggt + 1861 tcctggcctt ttgctggcct tttgctcaca tgacccgaca ccatcgaaat taatacgact + 1921 cactataggg agaccacaac ggtttcccga attcaaccaa acgactcggg gtgcccttct + 1981 gcgtgaaggc tgagaaatac ccgtatcacc tgatctggat aatgccagcg tagggaannn + 2041 nnnnnnnnnn nnnnnnnnnn nnaggagnnn nnnatgcatc atcaccatca tcaccaagtc + 2101 gacctgctgg atccaaacat ggcaatcatt aaggagttca tgagattcaa agttcacatg + 2161 gaaggttctg taaatggaca tgaatttgaa atagaaggtg aaggagaagg aaggccttat + 2221 gaaggaaccc aaaccgcgaa gctaaaagtt actaagggtg gcccattacc atttgcatgg + 2281 gatatcctta gccctcaatt catgtatggg tcaaaggctt atgtcaagca ccccgccgac + 2341 attccagact atctaaagtt atcttttccc gaagggttta agtgggagcg tgtgatgaac + 2401 ttcgaagacg gtggcgtggt aacagtgact caggattcgt ccctgcaaga tggtgaattt + 2461 atctacaaag tcaaattaag aggaactaac tttccatctg acggcccggt tatgcaaaaa + 2521 aagacaatgg gctgggaggc ctcctcagaa cgaatgtacc ctgaagatgg tgccttgaag + 2581 ggtgagatta aacaaagatt gaaattgaaa gatggtggac attatgacgc tgaggttaaa + 2641 acgacataca aagctaagaa acctgtccag ctcccaggtg cttacaatgt aaatataaaa + 2701 cttgatatta catcacataa tgaagattat acgatagttg aacaatacga aagggctgag + 2761 gggagacata gtactggtgg catggatgaa ctatacaaag gttctggtac cgcaggatct + 2821 ggtggccaga agcaagctga agaggcggca gcgaaagcgg cggcagatgc taaagcgaag + 2881 gccgaagcag atgctaaagc tgcggaagaa gcagcgaaga aagcggctgc agacgcaaag + 2941 aaaaaagcag aagcagaagc cgccaaagcc gcagccgaag cgcagaaaaa agccgaggca + 3001 gccgctgcgg cactgaagaa gaaagcggaa gcggcagaag cagctgcagc tgaagcaaga + 3061 aagaaagcgg caactgaagc tgctgaaaaa gccaaagcag aagctgagaa gaaagcggct + 3121 gctgaaaagg ctgcagctga taagaaagcg gcagcagaga aagctgcagc cgacaaaaaa + 3181 gcagcagaaa aagcggctgc tgaaaaggca gcagctgata agaaagcagc ggcagaaaaa + 3241 gccgccgcag acaaaaaagc ggcagcggca aaagctgcag ctgaaaaagc cgctgcagca + 3301 aaagcggccg cagaggcaga tgatattttc ggtgagctaa gctctggtaa gaatgcaccg + 3361 aaaacggggg gaggggcgaa agggaacaat gcttcgcctg ccgggagtgg taatactaaa + 3421 aacaatggcg catcaggggc cgatatcaat aactatgccg ggcagattaa atctgctatc + 3481 gaaagtaagt tctatgacgc atcgtcctat gcaggcaaaa cctgtacgct gcgcataaaa + 3541 ctggcacccg atggtatgtt actggatatc aaacctgaag gtggcgatcc cgcactttgt + 3601 caggctgcgt tggcagcagc taaacttgcg aagatcccga aaccaccaag ccaggcagta + 3661 tatgaagtgt tcaaaaacgc gccattggac ttcaaaccgt agtagagatc cggctgctaa + 3721 caaagcccga aaggaagctg agttggctgc tgccaccgct gagcaataac tagcataacc + 3781 ccttggggcc tctaaacggg tcttgagggg ttttttgctg aaaggaggaa ctatatccgg + 3841 atcgagatcc ccacgcgccc tgtagcggcg cattaagcgc ggcgggtgtg gtggttacgc + 3901 gcagcgtgac cgctacactt gccagcgccc tagcgcccgc tcctttcgct ttcttccctt + 3961 cctttctcgc cacgttcgcc ggctttcccc gtcaagctct aaatcggggc atccctttag + 4021 ggttccgatt tagtgcttta cggcacctcg accccaaaaa acttgattag ggtgatggtt + 4081 cacgtagtgg gccatcgccc tgatagacgg tttttcgccc tttgacgttg gagtccacgt + 4141 tctttaatag tggactcttg ttccaaactg gaacaacact caaccctatc tcggtctatt + 4201 cttttgattt ataagggatt ttgccga +// diff --git a/lib/VNTI files/pRDV.gb b/lib/VNTI files/pRDV.gb new file mode 100644 index 00000000..87c07826 --- /dev/null +++ b/lib/VNTI files/pRDV.gb @@ -0,0 +1,943 @@ +LOCUS pRDV 4279 bp DNA circular SYN 8-OCT-2008 +DEFINITION Ribosome display vector pRDV, complete sequence. +ACCESSION AY327136 +VERSION AY327136.1 GI:37575398 +SOURCE Ribosome display vector pRDV. + ORGANISM Ribosome display vector pRDV + other sequences; artificial sequences; vectors. +REFERENCE 1 (bases 1 to 4279) + AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P., + Grutter,M.G. and Pluckthun,A. + TITLE High-affinity binders selected from designed ankyrin repeat protein + libraries + JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004) +REFERENCE 2 (bases 1 to 4279) + AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and + Pluckthun,A. + TITLE Direct Submission + JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich, + Winterthurerstrasse 190, Zurich 8057, Switzerland +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|495593319| +COMMENT VNTDBDATE|495593319| +COMMENT LSOWNER| +COMMENT VNTNAME|pRDV| +COMMENT VNTAUTHORNAME|Demo User| +COMMENT VNTOAUTHORNAME|UNKNOWN| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pRDV" 0 4279 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 2 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 0 3 75) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 7 9 61 102 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 103 104 274 +COMMENT 25 26 55 91 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 105 57 38 +COMMENT 36 39 40 41 42 43 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "ApaLI" "AvaI" "BamHI" "ClaI" "EcoRI" "HindIII" "NcoI" +COMMENT "PstI" "SmaI" "XmaI") (CStringList "atg" "gtg") +COMMENT (CStringList "taa" "tga" "tag") (CObList) 1 "{(0,1),2}" 0 0 "" 0 +COMMENT 4294967295 0 0 0 0 0 0 0 "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 70 20 1 1 1 1 0 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 4279 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #0=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 3 200 0 2716 0 3962 0 0 "") +COMMENT #1=(CRSite (CStringList) "AvaI" "cycgrg" 2 0 1 960 0 0 "") +COMMENT #2=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 148 0 0 "") +COMMENT #3=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 970 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 946 0 0 "") +COMMENT #6=(CRSite (CStringList) "NcoI" "ccatgg" 2 0 1 116 0 0 "") +COMMENT #7=(CRSite (CStringList) "PstI" "ctgcag" 6 0 7 630 0 1092 0 1209 0 1296 +COMMENT 0 1329 0 1440 0 1458 0 0 "") +COMMENT #8=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #10=(CFSignal (CObList) "Promoter_P_1" 30 0 0 19 35 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "19..35") +COMMENT #11=(CFSignal (CObList) "Stem_Loop_1" 39 0 0 36 56 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "36..56") +COMMENT #12=(CFSignal (CObList) "RBS_1" 32 0 0 103 108 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "103..108") +COMMENT #13=(CFSignal (CObList) "FLAG_betalactamase_tolA" 4 0 0 117 1862 0 +COMMENT (CStringList) +COMMENT (CStringList "/codon_start=1" "/transl_table=11" +COMMENT "/product=\"RDfusion\"" "/protein_id=\"AAQ93652.1\"" +COMMENT "/db_xref=\"GI:37575400\"") 1 1 1 1 "117..1862") +COMMENT #14=(CFSignal (CObList) "Misc_Feature_1" 21 0 0 117 146 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "117..146") +COMMENT #15=(CFSignal (CObList) "Misc_Feature_2" 21 0 0 147 974 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "147..974") +COMMENT #16=(CFSignal (CObList) "tolA spacer" 21 0 0 975 1862 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "975..1862") +COMMENT #17=(CFSignal (CObList) "Rep_Origin_1" 33 0 0 3616 4272 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3616..4272") +COMMENT #18=(CFSignal (CObList) "AmpR" 4 0 0 2600 3460 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #19=(CFSignal (CObList) "annealing site of tolAk" 21 0 1 1218 1238 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "")) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #20=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #21=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pRDV" 2) 5 "" 0 4) +COMMENT #22=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #23=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "DNA 'pRDV'" +COMMENT 1) +COMMENT #24=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Ribosome display vector pRDV, complete sequence." 1) +COMMENT #25=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: UNKNOWN" 1) +COMMENT #26=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 10/08/08 12:48AM" 1) +COMMENT #27=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 10/08/08 12:48AM" 1) +COMMENT #28=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 4279 bp" 1) +COMMENT #29=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #30=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #31=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #32=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #33=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #34=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 07-MAY-2004" 1) +COMMENT #35=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AY327136" +COMMENT 1) +COMMENT #36=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AY327136.1 GI:37575398" +COMMENT 1) +COMMENT #37=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Ribosome display vector pRDV" 1) +COMMENT #38=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Ribosome display vector pRDV(Ribosome display vector pRDV)" +COMMENT 1) +COMMENT #39=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1))) "Standard Fields") +COMMENT #40=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #41=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1 (bases 1 to 4279)" 1) +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Binz,H.K., Amstutz,P., Kohl,A., Stumpp,M.T., Briand,C., Forrer,P.," +COMMENT 1) +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Grutter,M.G. and Pluckthun,A." 1) +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE High-affinity binders selected from designed ankyrin repeat protein" +COMMENT 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " libraries" 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Nat. Biotechnol. 22 (5), 575-582 (2004)" +COMMENT 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 4279)" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Amstutz,P., Zahnd,C., Binz,K.H., Stumpp,M.T., Forrer,P. and" +COMMENT 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Pluckthun,A." 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (20-JUN-2003) Biochemistry, University of Zurich," +COMMENT 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Winterthurerstrasse 190, Zurich 8057, Switzerland" +COMMENT 1))) "References") +COMMENT #53=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #55=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #57=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 117 (3 #13# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #58=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 117 End: 1862" 1) +COMMENT #59=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Flag-tag_beta-lactamase_tolA fusion protein" +COMMENT 1) +COMMENT #60=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #61=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 117..1862" 1) +COMMENT #62=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #63=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #64=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"RDfusion\"" 1) +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=AAQ93652.1" +COMMENT 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:37575400" +COMMENT 1))) "FLAG_betalactamase_tolA") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2600 (3 #18# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2600 End: 3460" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #70=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 117 (3 #14# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 117 End: 146 " 1) +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Flag-tag" 1) +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 117..146" 1))) "Misc_Feature_1") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 147 (3 #15# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 147 End: 974 " 1) +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "beta-lactamase insert flanked by restriction sites" +COMMENT 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 147..974" 1))) "Misc_Feature_2") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 975 (3 #16# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 975 End: 1862" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "tolA spacer" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 975..1862" 1))) "tolA spacer") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1218 (3 #19# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1218 End: 1238 (Complementary)" +COMMENT 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" 1))) +COMMENT "annealing site of tolAk"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 19 (3 #10# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 19 End: 35 " 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) "T7" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 19..35" 1))) "Promoter_P_1"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 103 (3 #12# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 103 End: 108 " 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 103..108" 1))) "RBS_1"))) +COMMENT "RBS (1 total)") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3616 (3 #17# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3616 End: 4272" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "ColE1" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3616..4272" 1))) "Rep_Origin_1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #106=(CFolderPar +COMMENT (CGroupPar (CParagraph 39 (7 39 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #107=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 36 (3 #11# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 36 End: 56 " 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 36..56" 1))) "Stem_Loop_1"))) +COMMENT "Stem Loop (1 total)"))) "Feature Map") +COMMENT #111=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #112=(CFolderPar +COMMENT (CGroupPar (CParagraph 98 (0 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #113=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 2 2 0 178) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1 End: 4279" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1..4279" 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /organism=\"Ribosome display vector pRDV\"" +COMMENT 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /mol_type=\"genomic DNA\"" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=\"taxon:248461\"" 1))) +COMMENT "Source_1"))) "Source (1 total)"))) +COMMENT "Imported Features Not Shown on Map") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #122=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22585584 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 3 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #123=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22585552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #124=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 960 " 1))))) "AvaI: 1 site") 1 +COMMENT 5 "CYCGRG" "GRGCYC") +COMMENT #126=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22585520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #127=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 148 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #129=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22585488 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #130=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22585456 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #131=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 970 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #133=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22585424 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #134=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 946 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #136=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22585392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #137=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 116 " 1))))) "NcoI: 1 site") 1 +COMMENT 5 "CCATGG" "GGTACC") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22585360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PstI: 7 sites") 5 1 "CTGCAG" +COMMENT "GACGTC") +COMMENT #140=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22305032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #141=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 22304864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 2 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #142=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #143=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #144=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #145=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #146=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #147=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #148=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #149=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #150=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #151=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #152=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #153=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #154=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #155=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #156=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #157=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #158=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #159=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #160=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #161=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #162=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #163=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #164=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #165=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #166=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #167=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #168=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #169=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #170=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #171=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #172=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #173=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #174=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #175=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #176=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #177=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #178=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #179=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #180=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #181=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 39 39 0.1 -365) +COMMENT 1 1 0 1 1 +COMMENT (mapper: 17.4939 -19.7027 40.0378 40.0378 0.01 10 -1 4279 4279 1 0 0) +COMMENT #182=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #183=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #184=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #148# 22585860 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27565 6.27365 1 0.0214037) 0.146604) +COMMENT #185=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #145# 22638404 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pRDV" "@N" 1 0 0.871165 0 -10 +COMMENT 3.02214 1.44863 Nil) +COMMENT #186=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #144# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "4279 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.29688 0.924127 Nil)) (CObjectList)) +COMMENT #187=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #188=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -112 100) +COMMENT (CObjectList +COMMENT #189=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #13# 0) 1 2 0 0 #146# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.54342 6.10312 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #190=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #143# 2082602612 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "FLAG betalactamase tolA" "@N" 1 18.4911 +COMMENT -1.74233 0 -10 11.589 1.04901 #189#) +COMMENT #191=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #18# 0) 1 2 0 0 #146# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.20069 2.46295 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #192=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #143# 14746192 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -14.3601 -3.48466 0 -10 2.7474 1.04901 #191#)) +COMMENT (CObjectList)) +COMMENT #193=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -321 100) +COMMENT (CObjectList +COMMENT #194=(CScratch +COMMENT (CWidget 0 (3 #14# 0) 1 2 0 0 #151# 14746056 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 6.10312 1.9 +COMMENT 0.082322 1) +COMMENT #195=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #143# 22347572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Misc Feature 1" +COMMENT "@N" 1 11.9628 10.454 0 -10 6.99339 1.04901 +COMMENT #194#) +COMMENT #196=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #15# 0) 1 2 0 0 #147# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.84526 +COMMENT 6.05914 1 0.082322) 0.8 1.8 0) +COMMENT #197=(CLabel (CWidget 0 (0 0) 1 2 0 0 #143# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Misc Feature 2" +COMMENT "@N" 1 14.7391 6.96932 0 -10 6.99339 1.04901 +COMMENT #196#) +COMMENT #198=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #16# 0) 1 2 0 0 #147# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 3.54342 +COMMENT 4.84526 1 0.082322) 0.8 1.8 0) +COMMENT #199=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #143# 2081903016 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "tolA spacer" +COMMENT "@N" 1 14.2913 -6.96932 0 -10 5.34495 1.04901 +COMMENT #198#) +COMMENT #200=(CScratch +COMMENT (CWidget 0 (3 #19# 0) 1 2 0 0 #151# 22410976 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 4.48901 1.9 +COMMENT 0.082322 1) +COMMENT #201=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #143# 14746176 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "annealing site of tolAk" "@N" 1 17.6962 +COMMENT -3.48466 0 -10 10.4401 1.04901 #200#)) +COMMENT (CObjectList)) +COMMENT #202=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #203=(CPromoterArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #10# 0) 1 2 0 0 #165# 0 100) +COMMENT (LOGPEN 0 4 128) 6 1.16464 6.15953 6.2468) +COMMENT 0.4 0.082322 1.08464 1.8 1.8 0) +COMMENT #204=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #143# 393233 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Promoter P 1" +COMMENT "@N" 1 4.6154 15.681 0 -10 6.06926 1.04901 +COMMENT #203#)) (CObjectList)) +COMMENT #205=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #206=(CScratch +COMMENT (CWidget 0 (3 #12# 0) 1 2 0 0 #163# 14746056 +COMMENT 100) (LOGPEN 0 6 16711680) 8 1 6.12365 1.9 +COMMENT 0.082322 1) +COMMENT #207=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #143# 22554268 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "RBS 1" "@N" 1 +COMMENT 4.20801 13.9386 0 -10 2.82233 1.04901 #206#)) +COMMENT (CObjectList)) +COMMENT #208=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -251 100) +COMMENT (CObjectList +COMMENT #209=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #17# 0) 1 2 0 0 #146# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.0102623 0.973451 +COMMENT 1 0.082322) 0.8 1.8 0) +COMMENT #210=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #143# 22613028 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Rep Origin 1" +COMMENT "@N" 1 -9.55406 12.1963 0 -10 5.86945 1.04901 +COMMENT #209#)) (CObjectList)) +COMMENT #211=(CGroupWidget +COMMENT (CWidget 39 (7 39 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #212=(CScratch +COMMENT (CWidget 0 (3 #11# 0) 1 2 0 0 #164# 14746056 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.22187 1.9 +COMMENT 0.082322 1) +COMMENT #213=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #143# 1550738791 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Stem Loop 1" +COMMENT "@N" 1 4.3526 17.4233 0 -10 5.79452 1.04901 +COMMENT #212#)) (CObjectList))) (CObjectList)) +COMMENT #214=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -182 100) +COMMENT (CObjectList +COMMENT #215=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #216=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #150# 14746056 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.86725 1.9 +COMMENT 0.082322 1) +COMMENT #217=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 14746192 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Ava}I (960)" "@N (@S)" 5 15.4724 +COMMENT 1.74233 0 -10 4.27096 0.924127 #216#)) +COMMENT (CObjectList)) +COMMENT #218=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -1088 100) +COMMENT (CObjectList +COMMENT #219=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #150# 14746024 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 6.05768 1.9 +COMMENT 0.082322 1) +COMMENT #220=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 22363296 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (148)" "@N (@S)" 5 13.2119 +COMMENT 8.71165 0 -10 5.07021 0.924127 #219#)) +COMMENT (CObjectList)) +COMMENT #221=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -530 100) +COMMENT (CObjectList +COMMENT #222=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #150# 21766132 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.85259 1.9 +COMMENT 0.082322 1) +COMMENT #223=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 22576568 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (970)" "@N (@S)" 5 15.801 0 0 +COMMENT -10 4.67059 0.924127 #222#)) (CObjectList)) +COMMENT #224=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -391 100) +COMMENT (CObjectList +COMMENT #225=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #150# 21761428 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.88778 1.9 +COMMENT 0.082322 1) +COMMENT #226=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 22338904 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (946)" "@N (@S)" 5 15.9424 +COMMENT 3.48466 0 -10 5.07021 0.924127 #225#)) +COMMENT (CObjectList)) +COMMENT #227=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #228=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #150# 21763780 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 6.10459 1.9 +COMMENT 0.082322 1) +COMMENT #229=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #152# 22575600 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nco}I (116)" "@N (@S)" 5 8.34659 +COMMENT 12.1963 0 -10 4.14608 0.924127 #228#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #230=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -879 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #231=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -841 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 22355528 +COMMENT (CStringList) 22355560 22355564 (CObList))) +FEATURES Location/Qualifiers + source 1..4279 + /organism="Ribosome display vector pRDV" + /mol_type="genomic DNA" + /db_xref="taxon:248461" + /vntifkey="98" + promoter 19..35 + /vntifkey="30" + /label=Promoter_P_1 + /note="T7" + stem_loop 36..56 + /vntifkey="39" + /label=Stem_Loop_1 + RBS 103..108 + /vntifkey="32" + /label=RBS_1 + CDS 117..1862 + /codon_start=1 + /transl_table=11 + /product="RDfusion" + /protein_id="AAQ93652.1" + /db_xref="GI:37575400" + /vntifkey="4" + /label=FLAG_betalactamase_tolA + /note="Flag-tag_beta-lactamase_tolA fusion protein" + misc_feature 117..146 + /vntifkey="21" + /label=Misc_Feature_1 + /note="Flag-tag" + misc_feature 147..974 + /vntifkey="21" + /label=Misc_Feature_2 + /note="beta-lactamase insert flanked by restriction sites" + misc_feature 975..1862 + /vntifkey="21" + /label=tolA\spacer + /note="tolA spacer" + rep_origin 3616..4272 + /vntifkey="33" + /label=Rep_Origin_1 + /note="ColE1" + CDS 2600..3460 + /vntifkey="4" + /label=AmpR + misc_feature complement(1218..1238) + /vntifkey="21" + /label=annealing\site\of\tolAk + /note="Extra 5'-CCGCACACCAGTAAGGTGTGCGGT" +BASE COUNT 1186 a 1008 c 1120 g 965 t +ORIGIN + 1 acccgacacc atcgaaatta atacgactca ctatagggag accacaacgg tttcccgaat + 61 tgtgagcgga taacaataga aataattttg tttaacttta agaaggagat atatccatgg + 121 cggactacaa agatgacgat gacaaaggat cccacccaga aacgctggtg aaagtaaaag + 181 atgctgaaga tcagttgggt gcacgagtgg gttacatcga actggatctc aacagcggta + 241 agatccttga gagttttcgc cccgaagaac gttttccaat gatgagcact tttaaagttc + 301 tgctatgtgg cgcggtatta tcccgtgttg acgccgggca agagcaactc ggtcgccgca + 361 tacactattc tcagaatgac ttggttgagt actcaccagt cacagaaaag catcttacgg + 421 atggcatgac agtaagagaa ttatgcagtg ctgccataac catgagtgat aacactgcgg + 481 ccaacttact tctgacaacg atcggaggac cgaaggagct aaccgctttt ttgcacaaca + 541 tgggggatca tgtaactcgc cttgatcgtt gggaaccgga gctgaatgaa gccataccaa + 601 acgacgagcg tgacaccacg atgcctgcag caatggcaac aacgttgcgc aaactattaa + 661 ctggcgaact acttactcta gcttcccggc aacaattaat agactggatg gaggcggata + 721 aagttgcagg accacttctg cgctcggccc ttccggctgg ctggtttatt gctgataaat + 781 ctggagccgg tgagcgtggg tctcgcggta tcattgcagc actggggcca gatggtaagc + 841 cctcccgtat cgtagttatc tacacgacgg ggagtcaggc aactatggat gaacgaaata + 901 gacagatcgc tgagataggt gcctcactga ttaagcattg gggaaagctt tatatggcct + 961 cgggggccga attcggatct ggtggccaga agcaagctga agaggcggca gcgaaagcgg + 1021 cggcagatgc taaagcgaag gccgaagcag atgctaaagc tgcggaagaa gcagcgaaga + 1081 aagcggctgc agacgcaaag aaaaaagcag aagcagaagc cgccaaagcc gcagccgaag + 1141 cgcagaaaaa agccgaggca gccgctgcgg cactgaagaa gaaagcggaa gcggcagaag + 1201 cagctgcagc tgaagcaaga aagaaagcgg caactgaagc tgctgaaaaa gccaaagcag + 1261 aagctgagaa gaaagcggct gctgaaaagg ctgcagctga taagaaagcg gcagcagaga + 1321 aagctgcagc cgacaaaaaa gcagcagaaa aagcggctgc tgaaaaggca gcagctgata + 1381 agaaagcagc ggcagaaaaa gccgccgcag acaaaaaagc ggcagcggca aaagctgcag + 1441 ctgaaaaagc cgctgcagca aaagcggccg cagaggcaga tgatattttc ggtgagctaa + 1501 gctctggtaa gaatgcaccg aaaacggggg gaggggcgaa agggaacaat gcttcgcctg + 1561 ccgggagtgg taatactaaa aacaatggcg catcaggggc cgatatcaat aactatgccg + 1621 ggcagattaa atctgctatc gaaagtaagt tctatgacgc atcgtcctat gcaggcaaaa + 1681 cctgtacgct gcgcataaaa ctggcacccg atggtatgtt actggatatc aaacctgaag + 1741 gtggcgatcc cgcactttgt caggctgcgt tggcagcagc taaacttgcg aagatcccga + 1801 aaccaccaag ccaggcagta tatgaagtgt tcaaaaacgc gccattggac ttcaaaccgt + 1861 agtagagatc cggctgctaa caaagcccga aaggaagctg agttggctgc tgccaccgct + 1921 gagcaataac tagcataacc ccttggggcc tctaaacggg tcttgagggg ttttttgctg + 1981 aaaggaggaa ctatatccgg atcgagatcc ccacgcgccc tgtagcggcg cattaagcgc + 2041 ggcgggtgtg gtggttacgc gcagcgtgac cgctacactt gccagcgccc tagcgcccgc + 2101 tcctttcgct ttcttccctt cctttctcgc cacgttcgcc ggctttcccc gtcaagctct + 2161 aaatcggggc atccctttag ggttccgatt tagtgcttta cggcacctcg accccaaaaa + 2221 acttgattag ggtgatggtt cacgtagtgg gccatcgccc tgatagacgg tttttcgccc + 2281 tttgacgttg gagtccacgt tctttaatag tggactcttg ttccaaactg gaacaacact + 2341 caaccctatc tcggtctatt cttttgattt ataagggatt ttgccgattt cggcctattg + 2401 gttaaaaaat gagctgattt aacaaaaatt taacgcgaat tttaacaaaa tattaacgtt + 2461 tacaatttca ggtggcactt ttcggggaaa tgtgcgcgga acccctattt gtttattttt + 2521 ctaaatacat tcaaatatgt atccgctcat gagacaataa ccctgataaa tgcttcaata + 2581 atattgaaaa aggaagagta tgagtattca acatttccgt gtcgccctta ttcccttttt + 2641 tgcggcattt tgccttcctg tttttgctca cccagaaacg ctggtgaaag taaaagatgc + 2701 tgaagatcag ttgggtgcac gagtgggtta catcgaactg gatctcaaca gcggtaagat + 2761 ccttgagagt tttcgccccg aagaacgttt tccaatgatg agcactttta aagttctgct + 2821 atgtggcgcg gtattatccc gtattgacgc cgggcaagag caactcggtc gccgcataca + 2881 ctattctcag aatgacttgg ttgagtactc accagtcaca gaaaagcatc ttacggatgg + 2941 catgacagta agagaattat gcagtgctgc cataaccatg agtgataaca ctgcggccaa + 3001 cttacttctg acaacgatcg gaggaccgaa ggagctaacc gcttttttgc acaacatggg + 3061 ggatcatgta actcgccttg atcgttggga accggagctg aatgaagcca taccaaacga + 3121 cgagcgtgac accacgatgc ctgtagcaat ggcaacaacg ttgcgcaaac tattaactgg + 3181 cgaactactt actctagctt cccggcaaca attaatagac tggatggagg cggataaagt + 3241 tgcaggacca cttctgcgct cggcccttcc ggctggctgg tttattgctg ataaatctgg + 3301 agccggtgag cgtgggtctc gcggtatcat tgcagcactg gggccagatg gtaagccctc + 3361 ccgtatcgta gttatctaca cgacggggag tcaggcaact atggatgaac gaaatagaca + 3421 gatcgctgag ataggtgcct cactgattaa gcattggtaa ctgtcagacc aagtttactc + 3481 atatatactt tagattgatt taaaacttca tttttaattt aaaaggatct aggtgaagat + 3541 cctttttgat aatctcatga ccaaaatccc ttaacgtgag ttttcgttcc actgagcgtc + 3601 agaccccgta gaaaagatca aaggatcttc ttgagatcct ttttttctgc gcgtaatctg + 3661 ctgcttgcaa acaaaaaaac caccgctacc agcggtggtt tgtttgccgg atcaagagct + 3721 accaactctt tttccgaagg taactggctt cagcagagcg cagataccaa atactgtcct + 3781 tctagtgtag ccgtagttag gccaccactt caagaactct gtagcaccgc ctacatacct + 3841 cgctctgcta atcctgttac cagtggctgc tgccagtggc gataagtcgt gtcttaccgg + 3901 gttggactca agacgatagt taccggataa ggcgcagcgg tcgggctgaa cggggggttc + 3961 gtgcacacag cccagcttgg agcgaacgac ctacaccgaa ctgagatacc tacagcgtga + 4021 gctatgagaa agcgccacgc ttcccgaagg gagaaaggcg gacaggtatc cggtaagcgg + 4081 cagggtcgga acaggagagc gcacgaggga gcttccaggg ggaaacgcct ggtatcttta + 4141 tagtcctgtc gggtttcgcc acctctgact tgagcgtcga tttttgtgat gctcgtcagg + 4201 ggggcggagc ctatggaaaa acgccagcaa cgcggccttt ttacggttcc tggccttttg + 4261 ctggcctttt gctcacatg +// diff --git a/lib/VNTI files/pTH18XXA.gb b/lib/VNTI files/pTH18XXA.gb new file mode 100644 index 00000000..b47817f5 --- /dev/null +++ b/lib/VNTI files/pTH18XXA.gb @@ -0,0 +1,772 @@ +LOCUS pTH18XXA 2749 bp DNA circular SYN 28-MAR-2007 +DEFINITION Cloning vector pTH18cr DNA, complete sequence. +ACCESSION AB019609 +VERSION AB019609.2 GI:5139816 +SOURCE Cloning vector pTH18cr. + ORGANISM Cloning vector pTH18cr + other sequences; artificial sequences; vectors. +REFERENCE 1 + AUTHORS Hashimoto-Gotoh,T., Yamaguchi,M., Yasojima,K., Tsujimura,A., + Wakabayashi,Y. and Watanabe,Y. + TITLE A set of temperature sensitive-replication/-segregation and + temperature resistant plasmid vectors with different copy numbers + and in an isogenic background (chloramphenicol, kanamycin, lacZ, + repA, par, polA) + JOURNAL Gene 241 (1), 185-191 (2000) +REFERENCE 2 (bases 1 to 3064) + AUTHORS Hashimoto-Gotoh,T. + TITLE Direct Submission + JOURNAL Submitted (10-NOV-1998) Tamotsu Hashimoto-Gotoh, Res. Inst. for + Geriatrics, Kyoto Pref. Univ. Med., Biochem. and Mol. Genet.; + Kawaramachi-Hirokoji, Kajii-Cho 465, Kamigyo-ku, Kyoto, Kyoto + 602-8566, Japan (E-mail:e54093@sakura.kudpc.kyoto-u.ac.jp, + Tel:81-75-251-5798, Fax:81-75-251-5799) +COMMENT On Jun 23, 1999 this sequence version replaced gi:3970881. + The copy number of pKF38wt is 5 per chromosome. Drug concentration + for chloramphenicol selection should be 10 to 15 microgramms per + ml. + TOP10 but neither DH5alpha nor JM109 is advisable as a host strain + for alpha-complemetation selection . + The multiple cloning sites are as in pKF18c (Gene, 1994; 152, + 271-275). +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|420913732| +COMMENT VNTDBDATE|442057881| +COMMENT LSOWNER| +COMMENT VNTNAME|pTH18XXA| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pTH18XXA" 0 2749 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII" +COMMENT "NdeI") (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 2749 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 352 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 361 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2437 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 343 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 0 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "") +COMMENT #27=(CRSite (CStringList) "NdeI" "catatg" 3 0 0 0 "")) +COMMENT (CObList +COMMENT #28=(CFSignal (CObList) "cat-1" 4 0 1 668 1327 0 (CStringList) +COMMENT (CStringList "/gene=\"cat-1\"" "/codon_start=1" "/transl_table=11" +COMMENT "/product=\"chloramphenicol acetyltransferase\"" +COMMENT "/protein_id=\"BAA34760.1\"" "/db_xref=\"GI:3970883\"") 1 1 1 1 +COMMENT "complement(534..1193)") +COMMENT #29=(CFSignal (CObList) "repA" 4 0 0 2041 242 0 (CStringList) +COMMENT (CStringList "/codon_start=1" "/transl_table=11" +COMMENT "/product=\"replication initiator\"" "/protein_id=\"BAA34761.1\"" +COMMENT "/db_xref=\"GI:3970884\"") 1 1 1 1 "1907..2857") +COMMENT #30=(CFSignal (CObList) "pSC101-f" 27 0 0 202 224 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #31=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #32=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pTH18XXA" 2) 5 "" +COMMENT 0 4) +COMMENT #33=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #34=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pTH18XXA'" 1) +COMMENT #35=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Cloning vector pTH18cr DNA, complete sequence." 1) +COMMENT #36=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #37=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 09/07/06 04:28\214\337\214\343" 1) +COMMENT #38=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 03/28/07 09:51\214\337\221O" 1) +COMMENT #39=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 2749 bp" 1) +COMMENT #40=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #41=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #42=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 21-MAY-2003" 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AB019609" +COMMENT 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AB019609.2 GI:5139816" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Cloning vector pTH18cr" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Cloning vector pTH18cr(Cloning vector pTH18cr)" +COMMENT 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Associated Genes: lacZ'; cat-1" 1))) +COMMENT "Standard Fields") +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Hashimoto-Gotoh,T., Yamaguchi,M., Yasojima,K., Tsujimura,A.," +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Wakabayashi,Y. and Watanabe,Y." 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE A set of temperature sensitive-replication/-segregation and" +COMMENT 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " temperature resistant plasmid vectors with different copy numbers" +COMMENT 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " and in an isogenic background (chloramphenicol, kanamycin, lacZ," +COMMENT 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " repA, par, polA)" 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Gene 241 (1), 185-191 (2000)" 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 3064)" 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Hashimoto-Gotoh,T." 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (10-NOV-1998) Tamotsu Hashimoto-Gotoh, Res. Inst. for" +COMMENT 1) +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Geriatrics, Kyoto Pref. Univ. Med., Biochem. and Mol. Genet.;" +COMMENT 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Kawaramachi-Hirokoji, Kajii-Cho 465, Kamigyo-ku, Kyoto, Kyoto" +COMMENT 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " 602-8566, Japan (E-mail:e54093@sakura.kudpc.kyoto-u.ac.jp," +COMMENT 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Tel:81-75-251-5798, Fax:81-75-251-5799)" +COMMENT 1))) "References") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #71=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #72=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #75=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 668 (3 #28# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 668 End: 1327 (Complementary)" +COMMENT 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(534..1193)" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"cat-1\"" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"chloramphenicol acetyltransferase\"" +COMMENT 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=BAA34760.1" +COMMENT 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:3970883" +COMMENT 1))) "cat-1") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2041 (3 #29# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2041 End: 242 " 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "wild type repA in pSC101" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1907..2857" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"replication initiator\"" +COMMENT 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=BAA34761.1" +COMMENT 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:3970884" +COMMENT 1))) "repA"))) "CDS (2 total)") +COMMENT #97=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #98=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 202 (3 #30# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 202 End: 224 " 1))) "pSC101-f"))) +COMMENT "Primer (1 total)"))) "Feature Map") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #101=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21031864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #102=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25083000 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #103=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2437 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #105=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24914432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #106=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21036752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 0 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #107=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21038272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #108=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 361 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #110=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21050264 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BamHI: 0 sites") 1 5 "GGATCC" +COMMENT "CCTAGG") +COMMENT #111=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26456064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #112=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21036832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #113=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26456144 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #114=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25083080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #115=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26455824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BsaI: 0 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #116=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26455984 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 0 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #117=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21050184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #118=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21036992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "EcoRI: 0 sites") 1 5 "GAATTC" +COMMENT "CTTAAG") +COMMENT #119=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21032264 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #120=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21032424 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #121=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26456224 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NdeI: 0 sites") 2 4 "CATATG" +COMMENT "GTATAC") +COMMENT #122=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25083160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #123=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21036912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #124=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26435608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 0 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #125=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21032184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SacI: 0 sites") 5 1 "GAGCTC" +COMMENT "CTCGAG") +COMMENT #126=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21031944 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 0 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #127=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26455904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #128=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21036352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #129=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21032344 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #130=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 352 " 1))))) "XbaI: 1 site") 1 +COMMENT 5 "TCTAGA" "AGATCT") +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24959432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 343 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25082920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #136=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #137=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #138=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #139=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #140=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #141=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #142=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #143=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #144=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #145=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #146=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #147=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #148=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #149=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #150=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #151=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #152=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #153=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #154=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #155=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #156=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #157=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #158=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #159=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #160=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #161=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #162=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #163=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #164=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #165=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #166=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #167=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #168=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #169=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #170=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #171=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #172=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #173=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #174=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #175=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -434) 1 1 0 1 1 +COMMENT (mapper: 15.8954 -14.4718 40.0378 40.0378 0.01 10 -1 2749 2749 1 0 0) +COMMENT #176=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -178 100) +COMMENT (CObjectList +COMMENT #177=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -573 100) +COMMENT (CObjectList +COMMENT #178=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #142# 26852948 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27647 6.27447 1 0.0214037) 0.228199) +COMMENT #179=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #139# 3735984 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pTH18XXA" "@N" 1 0 0.871165 0 +COMMENT -10 5.69462 1.44863 Nil) +COMMENT #180=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #138# 1128748116 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "2749 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #181=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -248 100) +COMMENT (CObjectList +COMMENT #182=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #183=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #140# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.24499 4.7511 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #184=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #137# 1128743747 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "cat-1" "@N" 1 +COMMENT 11.6874 -8.71165 0 -10 2.34778 1.04901 #183#) +COMMENT #185=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #140# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.72094 1.61793 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #186=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #137# 572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "repA" "@N" 1 +COMMENT -8.4435 12.1963 0 -10 2.27285 1.04901 #185#)) +COMMENT (CObjectList)) +COMMENT #187=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -178 100) +COMMENT (CObjectList +COMMENT #188=(CPrimerArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #143# 21536604 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1.16464 5.76202 +COMMENT 5.81451) 0.4 0.082322 1.8 1.8 0) +COMMENT #189=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #137# 21118156 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pSC101-f" "@N" +COMMENT 1 8.90218 12.1963 0 -10 4.17106 1.04901 #188#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #190=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 786443 100) +COMMENT (CObjectList +COMMENT #191=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #192=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #144# 1617106727 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.47221 1.9 +COMMENT 0.082322 1) +COMMENT #193=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #146# 24687748 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (352)" "@N (@S)" 5 12.7589 +COMMENT 8.71165 0 -10 4.24599 0.924127 #192#)) +COMMENT (CObjectList)) +COMMENT #194=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #195=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #144# 1944749780 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.45167 1.9 +COMMENT 0.082322 1) +COMMENT #196=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #146# 21457844 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (361)" "@N (@S)" 5 13.929 +COMMENT 6.96932 0 -10 4.32092 0.924127 #195#)) +COMMENT (CObjectList)) +COMMENT #197=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #198=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #144# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.714262 1.9 +COMMENT 0.082322 1) +COMMENT #199=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #146# 26247596 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2437)" "@N (@S)" 5 -11.7462 +COMMENT 10.454 0 -10 4.82044 0.924127 #198#)) +COMMENT (CObjectList)) +COMMENT #200=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #201=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #144# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.49275 1.9 +COMMENT 0.082322 1) +COMMENT #202=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #146# 21460428 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (343)" "@N (@S)" 5 12.1982 10.454 +COMMENT 0 -10 4.24599 0.924127 #201#)) (CObjectList))) +COMMENT (CObjectList)) +COMMENT #203=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #204=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21289928 (CObList))) +FEATURES Location/Qualifiers + gene complement(668..1327) + /gene="cat-1" + /vntifkey="60" + CDS complement(668..1327) + /gene="cat-1" + /codon_start=1 + /transl_table=11 + /product="chloramphenicol acetyltransferase" + /protein_id="BAA34760.1" + /db_xref="GI:3970883" + /vntifkey="4" + /label=cat-1 + CDS 2041..242 + /codon_start=1 + /transl_table=11 + /product="replication initiator" + /protein_id="BAA34761.1" + /db_xref="GI:3970884" + /vntifkey="4" + /label=repA + /note="wild type repA in pSC101" + primer 202..224 + /vntifkey="27" + /label=pSC101-f +BASE COUNT 889 a 566 c 556 g 738 t +ORIGIN + 1 accagataaa aatgaatggt gacaaaatac caacaaccat tacatcagat tcctacctac + 61 ataacggact aagaaaaaca ctacacgatg ctttaactgc aaaaattcag ctcaccagtt + 121 ttgaggcaaa atttttgagt gacatgcaaa gtaagtatga tctcaatggt tcgttctcat + 181 ggctcacgca aaaacaacga accacactag agaacatact ggctaaatac ggaaggatct + 241 gaggttctta tggctcttgt atctatcagt gaagcatcaa gactaacaaa caaaagtaga + 301 acaactgttc accgttacat atcaaaggga aaactgtcca tctcgagaaa tctagaaagc + 361 ctaggcgcta accgttttta tcaggctctg ggaggcagaa taaatgatca tatcgtcaat + 421 tattacctcc acggggagag cctgagcaaa ctggcctcag gcatttgaga agcacacggt + 481 cacactgctt ccggtagtca ataaaccggt aaaccagcaa tagacataag cggctattta + 541 acgaccctgc cctgaaccga cgaccgggtc gaatttgctt tcgaatttct gccattcatc + 601 cgcttattat cacttattca ggcgtagcac caggcgttta agggcaccaa taactgcctt + 661 aaaaaaatta cgccccgccc tgccactcat cgcagtactg ttgtaattca ttaagcattc + 721 tgccgacatg gaagccatca cagacggcat gatgaacctg aatcgccagc ggcatcagca + 781 ccttgtcgcc ttgcgtataa tatttgccca tggtgaaaac gggggcgaag aagttgtcca + 841 tattggccac gtttaaatca aaactggtga aactcaccca gggattggct gagacgaaaa + 901 acatattctc aataaaccct ttagggaaat aggccaggtt ttcaccgtaa cacgccacat + 961 cttgcgaata tatgtgtaga aactgccgga aatcgtcgtg gtattcactc cagagcgatg + 1021 aaaacgtttc agtttgctca tggaaaacgg tgtaacaagg gtgaacacta tcccatatca + 1081 ccagctcacc gtctttcatt gccatacgaa attccggatg agcattcatc aggcgggcaa + 1141 gaatgtgaat aaaggccgga taaaacttgt gcttattttt ctttacggtc tttaaaaagg + 1201 ccgtaatatc cagctgaacg gtctggttat aggtacattg agcaactgac tgaaatgcct + 1261 caaaatgttc tttacgatgc cattgggata tatcaacggt ggtatatcca gtgatttttt + 1321 tctccatttt agcttcctta gctcctgaaa atctcgataa ctcaaaaaat acgcccggta + 1381 gtgatcttat ttcattatgg tgaaagttgg aacctcttac gtgccgatca acgtctcatt + 1441 ttcgccaaaa gttggcccag ggcttcccgg tatcaacagg gacaccagga tttatttatt + 1501 ctgcgaagtg atcttccgtc acaggtattt attcgctgta gtgccattta cccccattca + 1561 ctgccagagc cgtgagcgca gcgaactgaa tgtcacgaaa aagacagcga ctcaggtgcc + 1621 tgatggtcgg agacaaaagg aatattcagc gatttgcccg agcttgcgag ggtgctactt + 1681 aagcctttag ggttttaagg tctgttttgt agaggagcaa acagcgtttg cgacatcctt + 1741 ttgtaatact gcggaactga ctaaagtagt gagttataca cagggctggg atctattctt + 1801 tttatctttt tttattcttt ctttattcta taaattataa ccacttgaat ataaacaaaa + 1861 aaaacacaca aaggtctagc ggaatttaca gagggtctag cagaatttac aagttttcca + 1921 gcaaaggtct agcagaattt acagataccc acaactcaaa ggaaaaggac tagtaattat + 1981 cattgactag cccatctcaa ttggtatagt gattaaaatc acctagacca attgagatgt + 2041 atgtctgaat tagttgtttt caaagcaaat gaactagcga ttagtcgcta tgacttaacg + 2101 gagcatgaaa ccaagctaat tttatgctgt gtggcactac tcaaccccac gattgaaaac + 2161 cctacaagga aagaacggac ggtatcgttc acttataacc aatacgctca gatgatgaac + 2221 atcagtaggg aaaatgctta tggtgtatta gctaaagcaa ccagagagct gatgacgaga + 2281 actgtggaaa tcaggaatcc tttggttaaa ggctttgaga ttttccagtg gacaaactat + 2341 gccaagttct caagcgaaaa attagaatta gtttttagtg aagagatatt gccttatctt + 2401 ttccagttaa aaaaattcat aaaatataat ctggaacatg ttaagtcttt tgaaaacaaa + 2461 tactctatga ggatttatga gtggttatta aaagaactaa cacaaaagaa aactcacaag + 2521 gcaaatatag agattagcct tgatgaattt aagttcatgt taatgcttga aaataactac + 2581 catgagttta aaaggcttaa ccaatgggtt ttgaaaccaa taagtaaaga tttaaacact + 2641 tacagcaata tgaaattggt ggttgataag cgaggccgcc cgactgatac gttgattttc + 2701 caagttgaac tagatagaca aatggatctc gtaaccgaac ttgagaaca +// diff --git a/lib/VNTI files/pTH18cr (AB019609).gb b/lib/VNTI files/pTH18cr (AB019609).gb new file mode 100644 index 00000000..ef211d3e --- /dev/null +++ b/lib/VNTI files/pTH18cr (AB019609).gb @@ -0,0 +1,1122 @@ +LOCUS pTH18cr\(A 3064 bp DNA circular SYN 30-AUG-2006 +DEFINITION Cloning vector pTH18cr DNA, complete sequence. +ACCESSION AB019609 +VERSION AB019609.2 GI:5139816 +SOURCE Cloning vector pTH18cr. + ORGANISM Cloning vector pTH18cr + other sequences; artificial sequences; vectors. +REFERENCE 1 + AUTHORS Hashimoto-Gotoh,T., Yamaguchi,M., Yasojima,K., Tsujimura,A., + Wakabayashi,Y. and Watanabe,Y. + TITLE A set of temperature sensitive-replication/-segregation and + temperature resistant plasmid vectors with different copy numbers + and in an isogenic background (chloramphenicol, kanamycin, lacZ, + repA, par, polA) + JOURNAL Gene 241 (1), 185-191 (2000) +REFERENCE 2 (bases 1 to 3064) + AUTHORS Hashimoto-Gotoh,T. + TITLE Direct Submission + JOURNAL Submitted (10-NOV-1998) Tamotsu Hashimoto-Gotoh, Res. Inst. for + Geriatrics, Kyoto Pref. Univ. Med., Biochem. and Mol. Genet.; + Kawaramachi-Hirokoji, Kajii-Cho 465, Kamigyo-ku, Kyoto, Kyoto + 602-8566, Japan (E-mail:e54093@sakura.kudpc.kyoto-u.ac.jp, + Tel:81-75-251-5798, Fax:81-75-251-5799) +COMMENT On Jun 23, 1999 this sequence version replaced gi:3970881. + The copy number of pKF38wt is 5 per chromosome. Drug concentration + for chloramphenicol selection should be 10 to 15 microgramms per + ml. + TOP10 but neither DH5alpha nor JM109 is advisable as a host strain + for alpha-complemetation selection . + The multiple cloning sites are as in pKF18c (Gene, 1994; 152, + 271-275). +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|419534095| +COMMENT VNTDBDATE|420140554| +COMMENT LSOWNER| +COMMENT VNTNAME|pTH18cr (AB019609)| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pTH18cr (AB019609)" 0 3064 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII" +COMMENT "NdeI") (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3064 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 40 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 35 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 46 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 70 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 1 29 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 52 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 19 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 1 37 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 1 35 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 1 2303 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 193 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 0 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 0 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "") +COMMENT #27=(CRSite (CStringList) "NdeI" "catatg" 3 0 1 3064 0 0 "")) +COMMENT (CObList +COMMENT #28=(CFSignal (CObList) "lacZ'" 4 0 0 1 237 0 (CStringList) +COMMENT (CStringList "/gene=\"lacZ'\"" "/codon_start=1" "/transl_table=11" +COMMENT "/product=\"beta-galactosidase alpha-peptide\"" +COMMENT "/protein_id=\"BAA34759.1\"" "/db_xref=\"GI:3970882\"") 1 1 1 1 +COMMENT "1..237") +COMMENT #29=(CFSignal (CObList) "cat-1" 4 0 1 534 1193 0 (CStringList) +COMMENT (CStringList "/gene=\"cat-1\"" "/codon_start=1" "/transl_table=11" +COMMENT "/product=\"chloramphenicol acetyltransferase\"" +COMMENT "/protein_id=\"BAA34760.1\"" "/db_xref=\"GI:3970883\"") 1 1 1 1 +COMMENT "complement(534..1193)") +COMMENT #30=(CFSignal (CObList) "CDS_1" 4 0 0 1907 2857 0 (CStringList) +COMMENT (CStringList "/codon_start=1" "/transl_table=11" +COMMENT "/product=\"replication initiator\"" "/protein_id=\"BAA34761.1\"" +COMMENT "/db_xref=\"GI:3970884\"") 1 1 1 1 "1907..2857") +COMMENT #31=(CFSignal (CObList) "lacO" 31 0 0 3028 3048 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #32=(CFSignal (CObList) "-10" 47 0 0 3016 3021 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #33=(CFSignal (CObList) "-35" 48 0 0 2992 2997 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #34=(CFSignal (CObList) "Plac-f" 27 0 0 2964 2984 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #35=(CFSignal (CObList) "pSC101-f" 27 0 0 2817 2839 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #36=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #37=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pTH18cr (AB019609)" 2) 5 "" 0 4) +COMMENT #38=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #39=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'pTH18cr (AB019609)'" 1) +COMMENT #40=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Cloning vector pTH18cr DNA, complete sequence." 1) +COMMENT #41=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #42=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 08/23/06 05:14\214\337\214\343" 1) +COMMENT #43=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 08/30/06 05:42\214\337\214\343" 1) +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3064 bp" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #47=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Division: SYN" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 21-MAY-2003" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Accession Number(s): AB019609" +COMMENT 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Version in the Original DB: AB019609.2 GI:5139816" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Sequence Source: Cloning vector pTH18cr" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Organizm(s): Cloning vector pTH18cr(Cloning vector pTH18cr)" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Taxonomy: other sequences; artificial sequences; vectors" +COMMENT 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Associated Genes: lacZ'; cat-1" 1))) +COMMENT "Standard Fields") +COMMENT #57=(CFolderPar +COMMENT (CGroupPar (CParagraph 3 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 1" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Hashimoto-Gotoh,T., Yamaguchi,M., Yasojima,K., Tsujimura,A.," +COMMENT 1) +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Wakabayashi,Y. and Watanabe,Y." 1) +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE A set of temperature sensitive-replication/-segregation and" +COMMENT 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " temperature resistant plasmid vectors with different copy numbers" +COMMENT 1) +COMMENT #63=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " and in an isogenic background (chloramphenicol, kanamycin, lacZ," +COMMENT 1) +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " repA, par, polA)" 1) +COMMENT #65=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Gene 241 (1), 185-191 (2000)" 1) +COMMENT #66=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "REFERENCE 2 (bases 1 to 3064)" 1) +COMMENT #67=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " AUTHORS Hashimoto-Gotoh,T." 1) +COMMENT #68=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " TITLE Direct Submission" 1) +COMMENT #69=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " JOURNAL Submitted (10-NOV-1998) Tamotsu Hashimoto-Gotoh, Res. Inst. for" +COMMENT 1) +COMMENT #70=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Geriatrics, Kyoto Pref. Univ. Med., Biochem. and Mol. Genet.;" +COMMENT 1) +COMMENT #71=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Kawaramachi-Hirokoji, Kajii-Cho 465, Kamigyo-ku, Kyoto, Kyoto" +COMMENT 1) +COMMENT #72=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " 602-8566, Japan (E-mail:e54093@sakura.kudpc.kyoto-u.ac.jp," +COMMENT 1) +COMMENT #73=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT " Tel:81-75-251-5798, Fax:81-75-251-5799)" +COMMENT 1))) "References") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #75=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #76=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #77=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #79=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #80=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1 (3 #28# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1 End: 237 " 1) +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "MCS as those in pKF18c" 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1..237" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"lacZ'\"" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"beta-galactosidase alpha-peptide\"" +COMMENT 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=BAA34759.1" +COMMENT 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:3970882" +COMMENT 1))) "lacZ'") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 534 (3 #29# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 534 End: 1193 (Complementary)" +COMMENT 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(534..1193)" 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /gene=\"cat-1\"" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"chloramphenicol acetyltransferase\"" +COMMENT 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=BAA34760.1" +COMMENT 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:3970883" +COMMENT 1))) "cat-1") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1907 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1907 End: 2857" 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "wild type repA in pSC101" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1907..2857" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Qualifiers:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /codon_start=1" 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /transl_table=11" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /product=\"replication initiator\"" +COMMENT 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /protein_id=BAA34761.1" +COMMENT 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " /db_xref=GI:3970884" +COMMENT 1))) "CDS_1"))) "CDS (3 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2817 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2817 End: 2839" 1))) +COMMENT "pSC101-f") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2964 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2964 End: 2984" 1))) +COMMENT "Plac-f"))) "Primer (2 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3028 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3028 End: 3048" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #122=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3016 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3016 End: 3021" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #125=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2992 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2992 End: 2997" 1))) "-35"))) +COMMENT "-35 Signal (1 total)"))) "Feature Map") +COMMENT #128=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #129=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25298144 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AatII: 0 sites") 5 1 "GACGTC" +COMMENT "CTGCAG") +COMMENT #130=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27229512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #131=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 2303 " 1))))) "AflIII: 1 site") +COMMENT 1 5 "ACRYGT" "TGYRCA") +COMMENT #133=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27229832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #134=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21004776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 0 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25295424 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AvrII: 0 sites") 1 5 "CCTAGG" +COMMENT "GGATCC") +COMMENT #136=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25078024 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #137=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 40 " 1))))) "BamHI: 1 site") 1 +COMMENT 5 "GGATCC" "CCTAGG") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27230232 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BbsI: 0 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #140=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21004856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #141=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27230312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #142=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27229592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #143=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27229992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BsaI: 0 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #144=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27230152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BspHI: 0 sites") 1 5 "TCATGA" +COMMENT "AGTACT") +COMMENT #145=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20997880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #146=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21008472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #147=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 19 " 1))))) "EcoRI: 1 site") 1 +COMMENT 5 "GAATTC" "CTTAAG") +COMMENT #149=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20990392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #150=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 70 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25283824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 35 " 1))))) "KpnI: 1 site") 5 +COMMENT 1 "GGTACC" "CCATGG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27230392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #27# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #27# 1) 1 2 2 0 191) +COMMENT " N1: 3064 " 1))))) "NdeI: 1 site") +COMMENT 2 4 "CATATG" "GTATAC") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27229672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21008392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27229912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 193 " 1))))) "PvuI: 1 site") 4 +COMMENT 2 "CGATCG" "GCTAGC") +COMMENT #163=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25057440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #164=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 29 " 1))))) "SacI: 1 site") 5 +COMMENT 1 "GAGCTC" "CTCGAG") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25303192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 52 " 1))))) "SalI: 1 site") 1 +COMMENT 5 "GTCGAC" "CAGCTG") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27230072 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25251064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #14# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #14# 1) 1 2 2 0 191) +COMMENT " N1: 37 " 1))))) "SmaI: 1 site") 3 +COMMENT 3 "CCCGGG" "GGGCCC") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25275256 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 46 " 1))))) "XbaI: 1 site") 1 +COMMENT 5 "TCTAGA" "AGATCT") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27229752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XhoI: 0 sites") 1 5 "CTCGAG" +COMMENT "GAGCTC") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27229432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #15# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #15# 1) 1 2 2 0 191) +COMMENT " N1: 35 " 1))))) "XmaI: 1 site") 1 +COMMENT 5 "CCCGGG" "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #180=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #181=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #182=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #183=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #184=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #185=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #186=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #187=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #188=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #189=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #190=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #191=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #192=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #193=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #194=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #195=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #196=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #197=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #198=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #199=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #200=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #201=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #202=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #203=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #204=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #205=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #206=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #207=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #208=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #209=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #210=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #211=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #212=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #213=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #214=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #215=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #216=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #217=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #218=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #219=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -434) 1 1 0 1 1 +COMMENT (mapper: 18.563 -23.1087 40.0378 40.0378 0.01 10 -1 3064 3064 1 0 0) +COMMENT #220=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 786443 100) +COMMENT (CObjectList +COMMENT #221=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -106 100) +COMMENT (CObjectList +COMMENT #222=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #186# 27235684 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27623 6.27423 1 0.0214037) 0.204738) +COMMENT #223=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #183# 1195459412 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pTH18cr (AB019609)" "@N" 1 0 +COMMENT 0.871165 0 -10 11.2893 1.44863 Nil) +COMMENT #224=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #182# 1128748116 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3064 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.27191 0.924127 Nil)) (CObjectList)) +COMMENT #225=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -873 100) +COMMENT (CObjectList +COMMENT #226=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -943 100) +COMMENT (CObjectList +COMMENT #227=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.78796 6.27319 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #228=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 1128743747 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ'" "@N" 1 +COMMENT 12.522 3.48466 0 -10 2.14797 1.04901 #227#) +COMMENT #229=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.83066 5.18193 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #230=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "cat-1" "@N" 1 +COMMENT 12.8927 -1.74233 0 -10 2.34778 1.04901 #229#) +COMMENT #231=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.423809 2.37087 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #232=(CLabel (CWidget 0 (0 0) 1 2 0 0 #181# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "CDS 1" "@N" 1 +COMMENT -13.1453 1.74233 0 -10 2.79736 1.04901 #231#)) +COMMENT (CObjectList)) +COMMENT #233=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -664 100) +COMMENT (CObjectList +COMMENT #234=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #189# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.206786 1.9 +COMMENT 0.082322 1) +COMMENT #235=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 268634488 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "Plac-f" "@N" 1 +COMMENT -7.65829 10.454 0 -10 2.67247 1.04901 #234#) +COMMENT #236=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #189# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.507751 1.9 +COMMENT 0.082322 1) +COMMENT #237=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# -958 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pSC101-f" "@N" +COMMENT 1 -10.5486 8.71165 0 -10 4.17106 1.04901 +COMMENT #236#)) (CObjectList)) +COMMENT #238=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -385 100) +COMMENT (CObjectList +COMMENT #239=(CScratch +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 0.0757532 1.9 +COMMENT 0.082322 1) +COMMENT #240=(CLabel (CWidget 0 (0 0) 1 2 0 0 #181# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT -2.83984 15.681 0 -10 2.14797 1.04901 #239#)) +COMMENT (CObjectList)) +COMMENT #241=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -454 100) +COMMENT (CObjectList +COMMENT #242=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #189# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.100322 1.9 +COMMENT 0.082322 1) +COMMENT #243=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 25060036 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT -2.73444 13.9386 0 -10 1.47361 1.04901 #242#)) +COMMENT (CObjectList)) +COMMENT #244=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -175 100) +COMMENT (CObjectList +COMMENT #245=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #189# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.149459 1.9 +COMMENT 0.082322 1) +COMMENT #246=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #181# 25138292 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT -3.20254 12.1963 0 -10 1.47361 1.04901 #245#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #247=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -245 100) +COMMENT (CObjectList +COMMENT #248=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -733 100) +COMMENT (CObjectList +COMMENT #249=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.19334 1.9 +COMMENT 0.082322 1) +COMMENT #250=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 27720600 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (40)" "@N (@S)" 5 8.82565 10.454 +COMMENT 0 -10 4.57068 0.924127 #249#)) (CObjectList)) +COMMENT #251=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil -594 100) +COMMENT (CObjectList +COMMENT #252=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.20357 1.9 +COMMENT 0.082322 1) +COMMENT #253=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 24646220 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (35)" "@N (@S)" 5 3.81805 15.681 +COMMENT 0 -10 3.64655 0.924127 #252#)) (CObjectList)) +COMMENT #254=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -315 100) +COMMENT (CObjectList +COMMENT #255=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.18105 1.9 +COMMENT 0.082322 1) +COMMENT #256=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 21046592 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (46)" "@N (@S)" 5 10.566 8.71165 +COMMENT 0 -10 3.72148 0.924127 #255#)) (CObjectList)) +COMMENT #257=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil -524 100) +COMMENT (CObjectList +COMMENT #258=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #188# 1077 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.13192 1.9 +COMMENT 0.082322 1) +COMMENT #259=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (70)" "@N (@S)" 5 13.3525 +COMMENT 5.22699 0 -10 4.49575 0.924127 #258#)) +COMMENT (CObjectList)) +COMMENT #260=(CGroupWidget +COMMENT (CWidget 1 (10 #6# 0) 1 2 0 0 Nil -457 100) +COMMENT (CObjectList +COMMENT #261=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.21586 1.9 +COMMENT 0.082322 1) +COMMENT #262=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 26733316 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sac}I (29)" "@N (@S)" 5 3.60349 17.4233 +COMMENT 0 -10 3.5966 0.924127 #261#)) (CObjectList)) +COMMENT #263=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #264=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #188# 139088221 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 6.16877 1.9 +COMMENT 0.082322 1) +COMMENT #265=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 21354820 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (52)" "@N (@S)" 5 11.7563 6.96932 +COMMENT 0 -10 3.39679 0.924127 #264#)) (CObjectList)) +COMMENT #266=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #267=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #188# 1 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.23633 1.9 +COMMENT 0.082322 1) +COMMENT #268=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 26731988 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (19)" "@N (@S)" 5 3.70676 +COMMENT 19.1656 0 -10 4.04618 0.924127 #267#)) +COMMENT (CObjectList)) +COMMENT #269=(CGroupWidget +COMMENT (CWidget 1 (10 #14# 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #270=(CScratch +COMMENT (CWidget 1 (1 #14# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.19948 1.9 +COMMENT 0.082322 1) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 26699996 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sma}I (37)" "@N (@S)" 5 3.68378 12.1963 +COMMENT 0 -10 3.92129 0.924127 #270#)) (CObjectList)) +COMMENT #272=(CGroupWidget +COMMENT (CWidget 1 (10 #15# 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #273=(CScratch +COMMENT (CWidget 1 (1 #15# 1) 1 2 0 0 #188# -958 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.20357 1.9 +COMMENT 0.082322 1) +COMMENT #274=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xma}I (35)" "@N (@S)" 5 3.83773 13.9386 +COMMENT 0 -10 3.97125 0.924127 #273#)) (CObjectList)) +COMMENT #275=(CGroupWidget +COMMENT (CWidget 1 (10 #16# 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #276=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.56011 1.9 +COMMENT 0.082322 1) +COMMENT #277=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Afl}III (2303)" "@N (@S)" 5 -14.415 0 0 +COMMENT -10 4.82044 0.924127 #276#)) (CObjectList)) +COMMENT #278=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -1015 100) +COMMENT (CObjectList +COMMENT #279=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.88009 1.9 +COMMENT 0.082322 1) +COMMENT #280=(CLabel (CWidget 0 (0 0) 1 2 0 0 #190# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (193)" "@N (@S)" 5 13.8771 +COMMENT 1.74233 0 -10 4.09613 0.924127 #279#)) +COMMENT (CObjectList)) +COMMENT #281=(CGroupWidget +COMMENT (CWidget 1 (10 #27# 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #282=(CScratch +COMMENT (CWidget 1 (1 #27# 1) 1 2 0 0 #188# +COMMENT 1617106727 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 6.27319 1.9 0.082322 1) +COMMENT #283=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #190# 25060796 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nde}I (3064)" "@N (@S)" 5 3.58011 +COMMENT 20.908 0 -10 4.77049 0.924127 #282#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #284=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -978 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #285=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -919 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21289928 (CObList))) +FEATURES Location/Qualifiers + source 1..3064 + /organism="Cloning vector pTH18cr" + /mol_type="other DNA" + /specific_host="Escherichia coli" + /db_xref="taxon:84732" + /vntifkey="98" + /note="plasmid vector" + gene 1..237 + /gene="lacZ'" + /vntifkey="60" + CDS 1..237 + /gene="lacZ'" + /codon_start=1 + /transl_table=11 + /product="beta-galactosidase alpha-peptide" + /protein_id="BAA34759.1" + /db_xref="GI:3970882" + /vntifkey="4" + /label=lacZ' + /note="MCS as those in pKF18c" + gene complement(534..1193) + /gene="cat-1" + /vntifkey="60" + CDS complement(534..1193) + /gene="cat-1" + /codon_start=1 + /transl_table=11 + /product="chloramphenicol acetyltransferase" + /protein_id="BAA34760.1" + /db_xref="GI:3970883" + /vntifkey="4" + /label=cat-1 + CDS 1907..2857 + /codon_start=1 + /transl_table=11 + /product="replication initiator" + /protein_id="BAA34761.1" + /db_xref="GI:3970884" + /vntifkey="4" + /label=CDS_1 + /note="wild type repA in pSC101" + protein_bind 3028..3048 + /vntifkey="31" + /label=lacO + -10_signal 3016..3021 + /vntifkey="47" + /label=-10 + -35_signal 2992..2997 + /vntifkey="48" + /label=-35 + primer 2964..2984 + /vntifkey="27" + /label=Plac-f + primer 2817..2839 + /vntifkey="27" + /label=pSC101-f +BASE COUNT 960 a 657 c 633 g 814 t +ORIGIN + 1 atgaccatga ttacgccgaa ttcgagctcg gtacccgggg atcctctaga gtcgacctgc + 61 aggcatgcaa gcttactggc cgtcgtttta caacgtcgtg actgggaaaa ccctggcgtt + 121 acccaactta atcgccttgc agcacatccc cctttcgcca gctggcgtaa tagcgaagag + 181 gcccgcaccg atcgcccttc ccaacagttg cgcagcctga atggcgaatg gcgctaaccg + 241 tttttatcag gctctgggag gcagaataaa tgatcatatc gtcaattatt acctccacgg + 301 ggagagcctg agcaaactgg cctcaggcat ttgagaagca cacggtcaca ctgcttccgg + 361 tagtcaataa accggtaaac cagcaataga cataagcggc tatttaacga ccctgccctg + 421 aaccgacgac cgggtcgaat ttgctttcga atttctgcca ttcatccgct tattatcact + 481 tattcaggcg tagcaccagg cgtttaaggg caccaataac tgccttaaaa aaattacgcc + 541 ccgccctgcc actcatcgca gtactgttgt aattcattaa gcattctgcc gacatggaag + 601 ccatcacaga cggcatgatg aacctgaatc gccagcggca tcagcacctt gtcgccttgc + 661 gtataatatt tgcccatggt gaaaacgggg gcgaagaagt tgtccatatt ggccacgttt + 721 aaatcaaaac tggtgaaact cacccaggga ttggctgaga cgaaaaacat attctcaata + 781 aaccctttag ggaaataggc caggttttca ccgtaacacg ccacatcttg cgaatatatg + 841 tgtagaaact gccggaaatc gtcgtggtat tcactccaga gcgatgaaaa cgtttcagtt + 901 tgctcatgga aaacggtgta acaagggtga acactatccc atatcaccag ctcaccgtct + 961 ttcattgcca tacgaaattc cggatgagca ttcatcaggc gggcaagaat gtgaataaag + 1021 gccggataaa acttgtgctt atttttcttt acggtcttta aaaaggccgt aatatccagc + 1081 tgaacggtct ggttataggt acattgagca actgactgaa atgcctcaaa atgttcttta + 1141 cgatgccatt gggatatatc aacggtggta tatccagtga tttttttctc cattttagct + 1201 tccttagctc ctgaaaatct cgataactca aaaaatacgc ccggtagtga tcttatttca + 1261 ttatggtgaa agttggaacc tcttacgtgc cgatcaacgt ctcattttcg ccaaaagttg + 1321 gcccagggct tcccggtatc aacagggaca ccaggattta tttattctgc gaagtgatct + 1381 tccgtcacag gtatttattc gctgtagtgc catttacccc cattcactgc cagagccgtg + 1441 agcgcagcga actgaatgtc acgaaaaaga cagcgactca ggtgcctgat ggtcggagac + 1501 aaaaggaata ttcagcgatt tgcccgagct tgcgagggtg ctacttaagc ctttagggtt + 1561 ttaaggtctg ttttgtagag gagcaaacag cgtttgcgac atccttttgt aatactgcgg + 1621 aactgactaa agtagtgagt tatacacagg gctgggatct attcttttta tcttttttta + 1681 ttctttcttt attctataaa ttataaccac ttgaatataa acaaaaaaaa cacacaaagg + 1741 tctagcggaa tttacagagg gtctagcaga atttacaagt tttccagcaa aggtctagca + 1801 gaatttacag atacccacaa ctcaaaggaa aaggactagt aattatcatt gactagccca + 1861 tctcaattgg tatagtgatt aaaatcacct agaccaattg agatgtatgt ctgaattagt + 1921 tgttttcaaa gcaaatgaac tagcgattag tcgctatgac ttaacggagc atgaaaccaa + 1981 gctaatttta tgctgtgtgg cactactcaa ccccacgatt gaaaacccta caaggaaaga + 2041 acggacggta tcgttcactt ataaccaata cgctcagatg atgaacatca gtagggaaaa + 2101 tgcttatggt gtattagcta aagcaaccag agagctgatg acgagaactg tggaaatcag + 2161 gaatcctttg gttaaaggct ttgagatttt ccagtggaca aactatgcca agttctcaag + 2221 cgaaaaatta gaattagttt ttagtgaaga gatattgcct tatcttttcc agttaaaaaa + 2281 attcataaaa tataatctgg aacatgttaa gtcttttgaa aacaaatact ctatgaggat + 2341 ttatgagtgg ttattaaaag aactaacaca aaagaaaact cacaaggcaa atatagagat + 2401 tagccttgat gaatttaagt tcatgttaat gcttgaaaat aactaccatg agtttaaaag + 2461 gcttaaccaa tgggttttga aaccaataag taaagattta aacacttaca gcaatatgaa + 2521 attggtggtt gataagcgag gccgcccgac tgatacgttg attttccaag ttgaactaga + 2581 tagacaaatg gatctcgtaa ccgaacttga gaacaaccag ataaaaatga atggtgacaa + 2641 aataccaaca accattacat cagattccta cctacataac ggactaagaa aaacactaca + 2701 cgatgcttta actgcaaaaa ttcagctcac cagttttgag gcaaaatttt tgagtgacat + 2761 gcaaagtaag tatgatctca atggttcgtt ctcatggctc acgcaaaaac aacgaaccac + 2821 actagagaac atactggcta aatacggaag gatctgaggt tcttatggct cttgtatcta + 2881 tcagtgaagc atcaagacta acaaacaaaa gtagaacaac tgttcaccgt tacatatcaa + 2941 agggaaaact gtccataatg tgagttagct cactcattag gcaccccagg ctttacactt + 3001 tatgcttccg gctcgtatgt tgtgtggaat tgtgagcgga taacaatttc acacaggaaa + 3061 acat +// diff --git a/lib/VNTI files/pTH18kr.gb b/lib/VNTI files/pTH18kr.gb new file mode 100644 index 00000000..1e1f152c --- /dev/null +++ b/lib/VNTI files/pTH18kr.gb @@ -0,0 +1,124 @@ +LOCUS AB019603 2972 bp DNA circular SYN 21-MAY-2003 +DEFINITION Cloning vector pTH18kr DNA, complete sequence. +ACCESSION AB019603 +VERSION AB019603.1 +KEYWORDS . +SOURCE Cloning vector pTH18kr + ORGANISM Cloning vector pTH18kr + artificial sequences; vectors. +REFERENCE 1 (bases 1 to 2972) + AUTHORS Hashimoto-Gotoh,T. + TITLE Direct Submission + JOURNAL Submitted (10-NOV-1998) to the DDBJ/EMBL/GenBank databases. + Tamotsu Hashimoto-Gotoh, Res. Inst. for Geriatrics, Kyoto Pref. + Univ. Med., Biochem. and Mol. Genet.; Kawaramachi-Hirokoji, + Kajii-Cho 465, Kamigyo-ku, Kyoto, Kyoto 602-8566, Japan + (E-mail:e54093@sakura.kudpc.kyoto-u.ac.jp, Tel:81-75-251-5798, + Fax:81-75-251-5799) +REFERENCE 2 + AUTHORS Hashimoto-Gotoh,T., Yamaguchi,M., Yasojima,K., Tsujimura,A., + Wakabayashi,Y. and Watanabe,Y. + TITLE A set of temperature sensitive-replication/-segregation and + temperature resistant plasmid vectors with different copy numbers + and in an isogenic background (chloramphenicol, kanamycin, lacZ, + repA, par, polA) + JOURNAL Gene 241, 185-191 (2000) +COMMENT The copy number of pKF28wt is 5 per chromosome. + Drug concentration for kanamycin selection is 20 microgramms per + ml. + TOP10 but neither DH5alpha nor JM109 is advisable as a host strain + for alpha-complemetation selection. + The multiple cloning sites are as in pKF18k (Gene, 1995; 167, + 333-334). +FEATURES Location/Qualifiers + source 1..2972 + /mol_type="other DNA" + /note="plasmid vector" + /organism="Cloning vector pTH18kr" + /specific_host="Escherichia coli" + CDS 1..309 + /codon_start=1 + /gene="lacZ'" + /note="MCS as those in pKF18k" + /product="beta-galactosidase alpha-peptide" + /protein_id="BAA34741.1" + /transl_table=11 + /translation="MTMITPNSSSVPGDPLESTCRHASLLAVVLQRRDWENPGVTQLN + RLAAHPPFASWRNSEEARTDRPSQQLRSLNGECDLFNKAAVPSSQRNALPVLQPINQF + " + CDS complement(310..1125) + /codon_start=1 + /gene="agp-5" + /product="aminoglucoside phosphotransferase" + /protein_id="BAA34742.1" + /transl_table=11 + /translation="MSHIQRETSCSKPRLNSNMDADLYGYKWARDNVGQSGATIYRLY + GKPDAPELFLKHGKGSVANDVTDEMVRLNWLTEFMPLPTIKHFIRTPDDAWLLTTAIP + GKTAFQVLEEYPDSGENIVDALAVFLRRLHSIPVCNCPFNSDRVFRLAQAQSRMNNGL + VDASDFDDERNGWPVEQVWKEMHKLLPFSPDSVVTHGDFSLDNLIFDEGKLIGCIDVG + RVGIADRYQDLAILWNCLGEFSPSLQKRLFQKYGIDNPDMNKLQFHLMLDEFF" + CDS 1815..2765 + /codon_start=1 + /note="wild type repA in pSC101" + /product="replication initiator" + /protein_id="BAA34743.1" + /transl_table=11 + /translation="MSELVVFKANELAISRYDLTEHETKLILCCVALLNPTIENPTRK + ERTVSFTYNQYAQMMNISRENAYGVLAKATRELMTRTVEIRNPLVKGFEIFQWTNYAK + FSSEKLELVFSEEILPYLFQLKKFIKYNLEHVKSFENKYSMRIYEWLLKELTQKKTHK + ANIEISLDEFKFMLMLENNYHEFKRLNQWVLKPISKDLNTYSNMKLVVDKRGRPTDTL + IFQVELDRQMDLVTELENNQIKMNGDKIPTTITSDSYLHNGLRKTLHDALTAKIQLTS + FEAKFLSDMQSKYDLNGSFSWLTQKQRTTLENILAKYGRI" +BASE COUNT 950 a 634 c 595 g 793 t +ORIGIN + 1 atgaccatga ttacgccgaa ttcgagctcg gtacccgggg atcctctaga gtcgacctgc + 61 aggcatgcaa gcttactggc cgtcgtttta caacgtcgtg actgggaaaa ccctggcgtt + 121 acccaactta atcgccttgc agcacatccc cctttcgcca gctggcgtaa tagcgaagag + 181 gcccgcaccg atcgcccttc ccaacagttg cgcagcctga atggcgaatg cgatttattc + 241 aacaaagccg ccgtcccgtc aagtcagcgt aatgctctgc cagtgttaca accaattaac + 301 caattctgat tagaaaaact catcgagcat caaatgaaac tgcaatttat tcatatcagg + 361 attatcaata ccatattttt gaaaaagccg tttctgtaat gaaggagaaa actcaccgag + 421 gcagttccat aggatggcaa gatcctggta tcggtctgcg attccgactc gtccaacatc + 481 aatacaacct attaatttcc cctcgtcaaa aataaggtta tcaagtgaga aatcaccatg + 541 agtgacgact gaatccggtg agaatggcaa gagcttatgc atttctttcc agacttgttc + 601 aacaggccag ccattacgct cgtcatcaaa atcactcgca tcaaccaaac cgttattcat + 661 tcgtgactgc gcctgagcga gacgaaatac gcgatcgctg ttaaaaggac aattacaaac + 721 aggaatcgaa tgcaaccggc gcaggaacac tgccagcgca tcaacaatat tttcacctga + 781 atcaggatat tcttctaata cctggaatgc tgtttttccg gggatcgcag tggtgagtaa + 841 ccatgcatca tcaggagtac ggataaaatg cttgatggtc ggaagaggca taaattccgt + 901 cagccagttt agtctgacca tctcatctgt aacatcattg gcaacgctac ctttgccatg + 961 tttcagaaac aactctggcg catcgggctt cccatacaac cgatagattg tcgcacctga + 1021 ttgcccgaca ttatcgcgcg cccatttata cccatataaa tcagcatcca tgttggaatt + 1081 taatcgcggc ttcgagcaag acgtttcccg ttgaatatgg ctcataacac cccttgtatt + 1141 actgtttatg taagcagaca gttttattgt tcatgatgat atatttttat cttgtgcaat + 1201 gtaacatcag agattttgag acacaacgtg gctttgttga ataaatcgaa cttttgctga + 1261 gttgaaggat cagatcacgc atcttcccga caacgcagac cgttccgtgc tgtagtgcca + 1321 tttaccccca ttcactgcca gagccgtgag cgcagcgaac tgaatgtcac gaaaaagaca + 1381 gcgactcagg tgcctgatgg tcggagacaa aaggaatatt cagcgatttg cccgagcttg + 1441 cgagggtgct acttaagcct ttagggtttt aaggtctgtt ttgtagagga gcaaacagcg + 1501 tttgcgacat ccttttgtaa tactgcggaa ctgactaaag tagtgagtta tacacagggc + 1561 tgggatctat tctttttatc tttttttatt ctttctttat tctataaatt ataaccactt + 1621 gaatataaac aaaaaaaaca cacaaaggtc tagcggaatt tacagagggt ctagcagaat + 1681 ttacaagttt tccagcaaag gtctagcaga atttacagat acccacaact caaaggaaaa + 1741 ggactagtaa ttatcattga ctagcccatc tcaattggta tagtgattaa aatcacctag + 1801 accaattgag atgtatgtct gaattagttg ttttcaaagc aaatgaacta gcgattagtc + 1861 gctatgactt aacggagcat gaaaccaagc taattttatg ctgtgtggca ctactcaacc + 1921 ccacgattga aaaccctaca aggaaagaac ggacggtatc gttcacttat aaccaatacg + 1981 ctcagatgat gaacatcagt agggaaaatg cttatggtgt attagctaaa gcaaccagag + 2041 agctgatgac gagaactgtg gaaatcagga atcctttggt taaaggcttt gagattttcc + 2101 agtggacaaa ctatgccaag ttctcaagcg aaaaattaga attagttttt agtgaagaga + 2161 tattgcctta tcttttccag ttaaaaaaat tcataaaata taatctggaa catgttaagt + 2221 cttttgaaaa caaatactct atgaggattt atgagtggtt attaaaagaa ctaacacaaa + 2281 agaaaactca caaggcaaat atagagatta gccttgatga atttaagttc atgttaatgc + 2341 ttgaaaataa ctaccatgag tttaaaaggc ttaaccaatg ggttttgaaa ccaataagta + 2401 aagatttaaa cacttacagc aatatgaaat tggtggttga taagcgaggc cgcccgactg + 2461 atacgttgat tttccaagtt gaactagata gacaaatgga tctcgtaacc gaacttgaga + 2521 acaaccagat aaaaatgaat ggtgacaaaa taccaacaac cattacatca gattcctacc + 2581 tacataacgg actaagaaaa acactacacg atgctttaac tgcaaaaatt cagctcacca + 2641 gttttgaggc aaaatttttg agtgacatgc aaagtaagta tgatctcaat ggttcgttct + 2701 catggctcac gcaaaaacaa cgaaccacac tagagaacat actggctaaa tacggaagga + 2761 tctgaggttc ttatggctct tgtatctatc agtgaagcat caagactaac aaacaaaagt + 2821 agaacaactg ttcaccgtta catatcaaag ggaaaactgt ccataatgtg agttagctca + 2881 ctcattaggc accccaggct ttacacttta tgcttccggc tcgtatgttg tgtggaattg + 2941 tgagcggata acaatttcac acaggaaaac at +// \ No newline at end of file diff --git a/lib/VNTI files/pTenA gfpuv (1uM ON) #59.gb b/lib/VNTI files/pTenA gfpuv (1uM ON) #59.gb new file mode 100644 index 00000000..eb989e49 --- /dev/null +++ b/lib/VNTI files/pTenA gfpuv (1uM ON) #59.gb @@ -0,0 +1,1539 @@ +LOCUS pTenA\gfpu 3115 bp DNA circular 3-APR-2008 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|478628264| +COMMENT VNTDBDATE|478628264| +COMMENT LSOWNER| +COMMENT VNTNAME|pTenA gfpuv (1uM ON) #59| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pTenA gfpuv (1uM ON) #59" 0 3115 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 4294967295 1 3115 0 0 0 0 0 0 0 0) (CStringList) +COMMENT (CStringList) (CObList) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 757 0 1283 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 2 681 0 1481 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1470 0 2522 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 746 0 1366 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1592 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 1995 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 1085 0 1681 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 695 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 691 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 2 491 0 1184 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2983 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2674 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 2401 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 476 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1714 2352 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1720..2358") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1486 1590 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1492..1596") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2411 2516 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2417..2522)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2542 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2548..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2628 2649 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2634..2655") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #43=(CFSignal (CObList) "TPP aptamer (tenA)" 21 0 0 612 707 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "612..707") +COMMENT #44=(CFSignal (CObList) "gfpuv" 4 0 0 739 1479 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "745..1485") +COMMENT #45=(CFSignal (CObList) "randomized" 21 0 0 708 726 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #46=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #47=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pTenA gfpuv N25 lib (vandy)" 2) 5 "" 0 4) +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pTenA gfpuv N25 lib (vandy)'" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 04/03/08 04:14\214\337\214\343" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 04/03/08 04:14\214\337\214\343" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3115 bp" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 11-JAN-2008" 1))) +COMMENT "Standard Fields") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #61=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 739 (3 #44# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 739 End: 1479" 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 745..1485" 1))) "gfpuv") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2542 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2542 End: 284 (Complementary)" +COMMENT 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2548..284)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 612 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 612 End: 707 " 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 612..707" 1))) "TPP aptamer (tenA)") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 708 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 708 End: 726 " 1))) +COMMENT "randomized") +COMMENT #84=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2628 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2628 End: 2649" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2634..2655" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #88=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #89=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #93=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #94=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #98=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #107=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #112=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #116=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #117=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #122=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1714 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1714 End: 2352" 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1720..2358" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #127=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1486 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1486 End: 1590" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1492..1596" 1))) "T1") +COMMENT #132=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2411 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2411 End: 2516 (Complementary)" +COMMENT 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2417..2522)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #137=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #138=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #142=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #143=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #147=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #148=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #153=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24885576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #155=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25160856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 1085 " 1) +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1681 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #161=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25159416 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #162=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24530168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #163=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1995 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25127632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #167=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1592 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24529928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 757 " 1) +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1283 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25159816 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24530248 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25159896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25159176 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 695 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25159576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #182=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2674 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25159736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #185=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #188=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2401 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24529848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24530408 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #191=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26379512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26379672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #195=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25159256 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #196=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #197=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 691 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24530328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25159496 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #200=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2983 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26363184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #203=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #204=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1470 " 1) +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2522 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24842128 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #207=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #208=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 746 " 1) +COMMENT #209=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1366 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #210=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25159656 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 24530088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #212=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26379592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #213=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #214=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 681 " 1) +COMMENT #215=(CLinePar +COMMENT (CParagraph 0 (1 #4# 2) 1 2 2 0 191) +COMMENT " N2: 1481 " 1))))) "XbaI: 2 sites") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #216=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25159336 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #217=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #218=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1) +COMMENT #219=(CLinePar +COMMENT (CParagraph 0 (1 #19# 2) 1 2 2 0 191) +COMMENT " N2: 1184 " 1))))) "XhoI: 2 sites") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #220=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25160776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #221=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #222=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #223=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #224=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #225=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #226=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #227=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #228=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #229=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #230=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #231=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #232=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #233=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #234=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #235=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #236=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #237=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #238=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #239=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #240=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #241=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #242=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #243=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #244=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #245=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #246=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #247=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #248=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #249=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #250=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #251=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #252=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #253=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #254=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #255=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #256=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #257=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #258=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #259=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #260=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -3115) 1 1 0 1 1 +COMMENT (mapper: 18.8477 -23.1885 40.0378 40.0378 0.01 10 -1 3115 3115 1 0 0) +COMMENT #261=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 1344 100) +COMMENT (CObjectList +COMMENT #262=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1205 100) +COMMENT (CObjectList +COMMENT #263=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #227# 24752252 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.2762 6.2742 1 0.0214037) 0.201386) +COMMENT #264=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #224# 24745236 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pTenA gfpuv N25 lib (vandy)" +COMMENT "@N" 1 0 0.871165 0 -10 15.5603 1.44863 Nil) +COMMENT #265=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3115 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.14703 0.924127 Nil)) (CObjectList)) +COMMENT #266=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1094 100) +COMMENT (CObjectList +COMMENT #267=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -927 100) +COMMENT (CObjectList +COMMENT #268=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.70125 1.15596 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #269=(CLabel (CWidget 0 (0 0) 1 2 0 0 #222# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.77154 10.454 0 -10 2.72243 1.04901 #268#) +COMMENT #270=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.29468 4.78695 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 27004440 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 11.7323 -24.3926 0 -10 2.79736 1.04901 #270#)) +COMMENT (CObjectList)) +COMMENT #272=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1372 100) +COMMENT (CObjectList +COMMENT #273=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.982765 1.9 +COMMENT 0.082322 1) +COMMENT #274=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# -100 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.9642 6.96932 0 -10 3.97125 1.04901 +COMMENT #273#) +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.10514 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24534984 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 11.8034 -5.22699 0 -10 1.14891 1.04901 #275#) +COMMENT #277=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #226# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.84938 +COMMENT 5.04271 1 0.082322) 0.8 1.8 0) +COMMENT #278=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 27291288 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "TPP aptamer (tenA)" "@N" 1 16.193 -10.454 0 +COMMENT -10 8.84164 1.04901 #277#) +COMMENT #279=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.84938 1.9 +COMMENT 0.082322 1) +COMMENT #280=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 25990132 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "randomized" +COMMENT "@N" 1 15.3147 -17.4233 0 -10 5.49481 1.04901 +COMMENT #279#)) (CObjectList)) +COMMENT #281=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1372 100) +COMMENT (CObjectList +COMMENT #282=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #230# 3736008 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.23403 1.9 +COMMENT 0.082322 1) +COMMENT #283=(CLabel (CWidget 0 (0 0) 1 2 0 0 #222# 37 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 13.0234 1.74233 0 -10 2.59755 1.04901 #282#)) +COMMENT (CObjectList)) +COMMENT #284=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1427 100) +COMMENT (CObjectList +COMMENT #285=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.32063 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736056 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 11.4971 8.71165 0 -10 2.59755 1.04901 #285#) +COMMENT #287=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.9993 1.9 0.082322 +COMMENT 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 6751096 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 6.1351 20.908 0 -10 3.92129 1.04901 #287#) +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #243# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.61868 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736288 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 10.0958 17.4233 0 -10 3.97125 1.04901 #289#)) +COMMENT (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1427 100) +COMMENT (CObjectList +COMMENT #292=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.50188 5.70125 1 0.082322) 0.8 1.8 1) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736328 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 9.63794 13.9386 0 -10 2.72243 1.04901 #292#) +COMMENT #294=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.06285 5.27229 1 0.082322) 0.8 1.8 0) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736288 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.0495 -1.74233 0 -10 2.67247 1.04901 #294#)) +COMMENT (CObjectList)) +COMMENT #296=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -149 100) +COMMENT (CObjectList +COMMENT #297=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #228# 25199856 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1 5.10514 1.9 +COMMENT 0.082322 1) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24945848 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.3582 -6.96932 0 -10 2.14797 1.04901 #297#)) +COMMENT (CObjectList)) +COMMENT #299=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1261 100) +COMMENT (CObjectList +COMMENT #300=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.53658 2.82344 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #301=(CLabel (CWidget 0 (0 0) 1 2 0 0 #222# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.3857 -6.96932 0 -10 2.72243 1.04901 #300#)) +COMMENT (CObjectList)) +COMMENT #302=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1316 100) +COMMENT (CObjectList +COMMENT #303=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 3.07114 +COMMENT 3.2826) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 26822476 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.15354 -34.8466 0 -10 1.14891 1.04901 #303#) +COMMENT #305=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 1.2063 +COMMENT 1.41977) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736088 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.2089 3.48466 0 -10 1.14891 1.04901 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1150 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #230# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.12931 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 24535304 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.1996 -3.48466 0 -10 1.47361 1.04901 #308#)) +COMMENT (CObjectList)) +COMMENT #310=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -1205 100) +COMMENT (CObjectList +COMMENT #311=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #230# 25194488 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.17764 1.9 +COMMENT 0.082322 1) +COMMENT #312=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.6204 0 0 -10 1.47361 1.04901 #311#)) +COMMENT (CObjectList)) +COMMENT #313=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1316 100) +COMMENT (CObjectList +COMMENT #314=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #230# 1 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.27632 1.9 +COMMENT 0.082322 1) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 3736328 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 14.0813 3.48466 0 -10 5.8195 1.04901 +COMMENT #314#)) (CObjectList))) (CObjectList)) +COMMENT #316=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1094 100) +COMMENT (CObjectList +COMMENT #317=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -1427 100) +COMMENT (CObjectList +COMMENT #318=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42938 1.9 +COMMENT 0.082322 1) +COMMENT #319=(CLabel (CWidget 0 (0 0) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.9623 +COMMENT 12.1963 0 -10 4.29594 0.924127 #318#)) +COMMENT (CObjectList)) +COMMENT #320=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1427 100) +COMMENT (CObjectList +COMMENT #321=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.06913 1.9 +COMMENT 0.082322 1) +COMMENT #322=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1592)" "@N (@S)" 5 -4.11828 +COMMENT -13.9386 0 -10 4.84542 0.924127 #321#)) +COMMENT (CObjectList)) +COMMENT #323=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -316 100) +COMMENT (CObjectList +COMMENT #324=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #229# 3736008 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.06084 1.9 +COMMENT 0.082322 1) +COMMENT #325=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 25180032 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.0925 +COMMENT -8.71165 0 -10 4.64561 0.924127 #324#)) +COMMENT (CObjectList)) +COMMENT #326=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -1372 100) +COMMENT (CObjectList +COMMENT #327=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.87556 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 25604424 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (695)" "@N (@S)" 5 14.9175 +COMMENT -15.681 0 -10 4.24599 0.924127 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -1150 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #229# 25197608 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.88362 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 25602664 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (691)" "@N (@S)" 5 14.7121 +COMMENT -13.9386 0 -10 4.17106 0.924127 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -767 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.267844 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 25499848 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2983)" "@N (@S)" 5 -6.24394 +COMMENT 12.1963 0 -10 4.69556 0.924127 #333#)) +COMMENT (CObjectList)) +COMMENT #335=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -655 100) +COMMENT (CObjectList +COMMENT #336=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.890128 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #231# 25497208 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2674)" "@N (@S)" 5 -12.0302 +COMMENT 8.71165 0 -10 4.64561 0.924127 #336#)) +COMMENT (CObjectList)) +COMMENT #338=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -1044 100) +COMMENT (CObjectList +COMMENT #339=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.3166 1.9 0.082322 +COMMENT 1) +COMMENT #340=(CLabel (CWidget 0 (0 0) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 12.1951 +COMMENT 6.96932 0 -10 4.12111 0.924127 #339#)) +COMMENT (CObjectList)) +COMMENT #341=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -371 100) +COMMENT (CObjectList +COMMENT #342=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.7507 1.9 0.082322 +COMMENT 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 27280280 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (757)" "@N (@S)" 5 15.6102 +COMMENT -20.908 0 -10 5.09519 0.924127 #342#) +COMMENT #344=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.69141 1.9 +COMMENT 0.082322 1) +COMMENT #345=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 27253904 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1283)" "@N (@S)" 5 10.2053 +COMMENT -27.8773 0 -10 5.56974 0.924127 #344#)) +COMMENT (CObjectList)) +COMMENT #346=(CGroupWidget +COMMENT (CWidget 2 (10 #4# 0) 1 2 0 0 Nil -1261 100) +COMMENT (CObjectList +COMMENT #347=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.90376 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 3736128 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (681)" "@N (@S)" 5 14.5964 +COMMENT -12.1963 0 -10 4.17106 0.924127 #347#) +COMMENT #349=(CScratch +COMMENT (CWidget 2 (1 #4# 2) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.29267 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 3736128 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (1481)" "@N (@S)" 5 5.24938 +COMMENT -33.1043 0 -10 4.64561 0.924127 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -94 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.31482 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel (CWidget 0 (0 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1470)" "@N (@S)" 5 5.42339 +COMMENT -31.3619 0 -10 4.57068 0.924127 #352#) +COMMENT #354=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.19623 1.9 +COMMENT 0.082322 1) +COMMENT #355=(CLabel (CWidget 0 (0 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2522)" "@N (@S)" 5 -13.5576 +COMMENT 5.22699 0 -10 4.64561 0.924127 #354#)) +COMMENT (CObjectList)) +COMMENT #356=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil -983 100) +COMMENT (CObjectList +COMMENT #357=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.77286 1.9 +COMMENT 0.082322 1) +COMMENT #358=(CLabel (CWidget 0 (0 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (746)" "@N (@S)" 5 14.9429 +COMMENT -19.1656 0 -10 3.92129 0.924127 #357#) +COMMENT #359=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.52426 1.9 +COMMENT 0.082322 1) +COMMENT #360=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 3736136 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1366)" "@N (@S)" 5 7.75986 +COMMENT -29.6196 0 -10 4.37087 0.924127 #359#)) +COMMENT (CObjectList)) +COMMENT #361=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -260 100) +COMMENT (CObjectList +COMMENT #362=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.94291 1.9 +COMMENT 0.082322 1) +COMMENT #363=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 24541784 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 7.37793 +COMMENT 19.1656 0 -10 4.64561 0.924127 #362#) +COMMENT #364=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.25754 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 27327800 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1995)" "@N (@S)" 5 -12.2543 +COMMENT -8.71165 0 -10 5.17011 0.924127 #364#)) +COMMENT (CObjectList)) +COMMENT #366=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -483 100) +COMMENT (CObjectList +COMMENT #367=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.09016 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# -536870912 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1085)" "@N (@S)" 5 13.3108 +COMMENT -22.6503 0 -10 4.74552 0.924127 #367#) +COMMENT #369=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.88989 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel (CWidget 0 (0 0) 1 2 0 0 #221# 2 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1681)" "@N (@S)" 5 -6.10063 +COMMENT -12.1963 0 -10 4.69556 0.924127 #369#)) +COMMENT (CObjectList)) +COMMENT #371=(CGroupWidget +COMMENT (CWidget 2 (10 #19# 0) 1 2 0 0 Nil -878 100) +COMMENT (CObjectList +COMMENT #372=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.28639 1.9 +COMMENT 0.082322 1) +COMMENT #373=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 25700464 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 13.0302 +COMMENT 5.22699 0 -10 4.17106 0.924127 #372#) +COMMENT #374=(CScratch +COMMENT (CWidget 2 (1 #19# 2) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.89078 1.9 +COMMENT 0.082322 1) +COMMENT #375=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 25499208 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (1184)" "@N (@S)" 5 11.5934 +COMMENT -26.1349 0 -10 4.64561 0.924127 #374#)) +COMMENT (CObjectList)) +COMMENT #376=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1267 100) +COMMENT (CObjectList +COMMENT #377=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.60458 1.9 +COMMENT 0.082322 1) +COMMENT #378=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 26168008 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 10.862 15.681 +COMMENT 0 -10 4.77049 0.924127 #377#) +COMMENT #379=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.39313 1.9 +COMMENT 0.082322 1) +COMMENT #380=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 26114192 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 12.3334 +COMMENT 10.454 0 -10 4.77049 0.924127 #379#) +COMMENT #381=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #229# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.43991 1.9 +COMMENT 0.082322 1) +COMMENT #382=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #221# 3736152 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2401)" "@N (@S)" 5 -14.4684 +COMMENT 1.74233 0 -10 5.24504 0.924127 #381#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #383=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1433 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #384=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -600 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21253152 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1714..2352 + /vntifkey="33" + /label=ColE1 + terminator 1486..1590 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2411..2516) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2542..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2628..2649 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 612..707 + /vntifkey="21" + /label=TPP\aptamer\(tenA) + CDS 739..1479 + /vntifkey="4" + /label=gfpuv + misc_feature 708..726 + /vntifkey="21" + /label=randomized +BASE COUNT 844 a 748 c 720 g 803 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaaa attgctagga gagctggtgt tgccagctga gagtaagacc ttaagtcttt + 661 gatccttttt attacctgat ctagattatg ctagcgtagg gaagcaacat gatcacgctt + 721 attgatcagg agcaaactat gcaagtcgac ctgctggatc cattgagtaa aggagaagaa + 781 cttttcactg gagttgtccc aattcttgtt gaattagatg gtgatgttaa tgggcacaaa + 841 ttttctgtca gtggagaggg tgaaggtgat gcaacatacg gaaaacttac ccttaaattt + 901 atttgcacta ctggaaaact acctgttcca tggccaacac ttgtcactac tttctcttat + 961 ggtgttcaat gcttttcccg ttatccggat catatgaaac ggcatgactt tttcaagagt + 1021 gccatgcccg aaggttatgt acaggaacgc actatatctt tcaaagatga cgggaactac + 1081 aagacgcgtg ctgaagtcaa gtttgaaggt gatacccttg ttaatcgtat cgagttaaaa + 1141 ggtattgatt ttaaagaaga tggaaacatt ctcggacaca aactcgagta caactataac + 1201 tcacacaatg tatacatcac ggcagacaaa caaaagaatg gaatcaaagc taacttcaaa + 1261 attcgccaca acattgaaga tggatccgtt caactagcag accattatca acaaaatact + 1321 ccaattggcg atggccctgt ccttttacca gacaaccatt acctgtcgac acaatctgcc + 1381 ctttcgaaag atcccaacga aaagcgtgac cacatggtcc ttcttgagtt tgtaactgct + 1441 gctgggatta cacatggcat ggatgagctc tacaaataat ctagaggcat caaataaaac + 1501 gaaaggctca gtcgaaagac tgggcctttc gttttatctg ttgtttgtcg gtgaacgctc + 1561 tcctgagtag gacaaatccg ccgccctaga cctaggcgtt cggctgcggc gagcggtatc + 1621 agctcactca aaggcggtaa tacggttatc cacagaatca ggggataacg caggaaagaa + 1681 catgtgagca aaaggccagc aaaaggccag gaaccgtaaa aaggccgcgt tgctggcgtt + 1741 tttccatagg ctccgccccc ctgacgagca tcacaaaaat cgacgctcaa gtcagaggtg + 1801 gcgaaacccg acaggactat aaagatacca ggcgtttccc cctggaagct ccctcgtgcg + 1861 ctctcctgtt ccgaccctgc cgcttaccgg atacctgtcc gcctttctcc cttcgggaag + 1921 cgtggcgctt tctcaatgct cacgctgtag gtatctcagt tcggtgtagg tcgttcgctc + 1981 caagctgggc tgtgtgcacg aaccccccgt tcagcccgac cgctgcgcct tatccggtaa + 2041 ctatcgtctt gagtccaacc cggtaagaca cgacttatcg ccactggcag cagccactgg + 2101 taacaggatt agcagagcga ggtatgtagg cggtgctaca gagttcttga agtggtggcc + 2161 taactacggc tacactagaa ggacagtatt tggtatctgc gctctgctga agccagttac + 2221 cttcggaaaa agagttggta gctcttgatc cggcaaacaa accaccgctg gtagcggtgg + 2281 tttttttgtt tgcaagcagc agattacgcg cagaaaaaaa ggatctcaag aagatccttt + 2341 gatcttttct acggggtctg acgctcagtg gaacgaaaac tcacgttaag ggattttggt + 2401 catgactagt gcttggattc tcaccaataa aaaacgcccg gcggcaaccg agcgttctga + 2461 acaaatccag atggagttct gaggtcatta ctggatctat caacaggagt ccaagcgagc + 2521 tcaaacttgg tctgacagtt accaatgctt aatcagtgag gcacctatct cagcgatctg + 2581 tctatttcgt tcatccatag ttgcctgact ccccgtcgtg tagataacta cgatacggga + 2641 gggcttacca tctggcccca gtgctgcaat gataccgcga gacccacgct caccggctcc + 2701 agatttatca gcaataaacc agccagccgg aagggccgag cgcagaagtg gtcctgcaac + 2761 tttatccgcc tccatccagt ctattaattg ttgccgggaa gctagagtaa gtagttcgcc + 2821 agttaatagt ttgcgcaacg ttgttgccat tgctacaggc atcgtggtgt cacgctcgtc + 2881 gtttggtatg gcttcattca gctccggttc ccaacgatca aggcgagtta catgatcccc + 2941 catgttgtgc aaaaaagcgg ttagctcctt cggtcctccg atcgttgtca gaagtaagtt + 3001 ggccgcagtg ttatcactca tggttatggc agcactgcat aattctctta ctgtcatgcc + 3061 atccgtaaga tgcttttctg tgactggtga gtactcaacc aagtcattct gagaa +// diff --git a/lib/VNTI files/pTenA gfpuv (XhoI-) (1uM ON) #59.gb b/lib/VNTI files/pTenA gfpuv (XhoI-) (1uM ON) #59.gb new file mode 100644 index 00000000..83bacff1 --- /dev/null +++ b/lib/VNTI files/pTenA gfpuv (XhoI-) (1uM ON) #59.gb @@ -0,0 +1,1546 @@ +LOCUS pTenA\gfpu 3115 bp DNA circular 3-APR-2008 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.invitrogen.com/ +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|478628264| +COMMENT VNTDBDATE|478628264| +COMMENT LSOWNER| +COMMENT VNTNAME|pTenA gfpuv (1uM ON) #59| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pTenA gfpuv (1uM ON) #59" 0 3115 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 4294967295 1 3115 0 0 0 0 0 0 0 0) (CStringList) +COMMENT (CStringList) (CObList) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 757 0 1283 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 2 681 0 1481 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1470 0 2522 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 2 746 0 1366 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1592 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 603 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 1995 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 1085 0 1681 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 1 695 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 1 691 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2983 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2674 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 2401 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 476 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1714 2352 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1714..2352") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1486 1590 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1486..1590") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2411 2516 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2411..2516)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2542 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2542..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2628 2649 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2628..2649") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #42=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #43=(CFSignal (CObList) "TPP aptamer (tenA)" 21 0 0 612 707 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "612..707") +COMMENT #44=(CFSignal (CObList) "gfpuv" 4 0 0 739 1479 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "739..1479") +COMMENT #45=(CFSignal (CObList) "randomized" 21 0 0 708 726 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "708..726") +COMMENT #46=(CFSignal (CObList) "silent mut (XhoI)" 62 0 0 1185 1185 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "")) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #47=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #48=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "pTenA gfpuv (1uM ON) #59" 2) 5 "" 0 4) +COMMENT #49=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pTenA gfpuv (1uM ON) #59'" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Local object" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 04/03/08 04:17\214\337\214\343" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 04/03/08 04:17\214\337\214\343" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3115 bp" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #57=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 3-APR-2008" 1))) +COMMENT "Standard Fields") +COMMENT #60=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 739 (3 #44# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 739 End: 1479" 1) +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 739..1479" 1))) "gfpuv") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2542 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2542 End: 284 (Complementary)" +COMMENT 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2542..284)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 612 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 612 End: 707 " 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 612..707" 1))) "TPP aptamer (tenA)") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 708 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #82=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 708 End: 726 " 1) +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 708..726" 1))) "randomized") +COMMENT #85=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2628 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2628 End: 2649" 1) +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2628..2649" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #89=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #90=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #94=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #113=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #118=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #122=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1714 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1714 End: 2352" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1714..2352" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #128=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1486 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1486 End: 1590" 1) +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1486..1590" 1))) "T1") +COMMENT #133=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2411 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2411 End: 2516 (Complementary)" +COMMENT 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2411..2516)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #138=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #143=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #144=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #145=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #148=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #149=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #154=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1185 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #155=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1185 End: 1185" 1))) +COMMENT "silent mut (XhoI)"))) "Mutation (2 total)"))) +COMMENT "Feature Map") +COMMENT #156=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26058616 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25276576 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 1085 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1681 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26529840 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25261192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #166=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1995 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25257984 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1592 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25281368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #173=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 757 " 1) +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1283 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25386816 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #177=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #178=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #179=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25252376 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BfrBI: 0 sites") 3 3 "ATGCAT" +COMMENT "TACGTA") +COMMENT #180=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25386896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25261432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #182=(CGroupPar +COMMENT (CParagraph 0 (10 #17# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #17# 1) 1 2 2 0 191) +COMMENT " N1: 695 " 1))))) "BmtI: 1 site") 5 +COMMENT 1 "GCTAGC" "CGATCG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25700896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #185=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2674 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25386736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #188=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2401 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25252456 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25333864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 603 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25249896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25251336 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26526960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #18# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #18# 1) 1 2 2 0 191) +COMMENT " N1: 691 " 1))))) "NheI: 1 site") 1 +COMMENT 5 "GCTAGC" "CGATCG") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25240384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NsiI: 0 sites") 5 1 "ATGCAT" +COMMENT "TACGTA") +COMMENT #202=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25701056 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #203=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #204=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2983 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #205=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25241184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #206=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #207=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1470 " 1) +COMMENT #208=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2522 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25278416 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #210=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #211=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 746 " 1) +COMMENT #212=(CLinePar +COMMENT (CParagraph 0 (1 #7# 2) 1 2 2 0 191) +COMMENT " N2: 1366 " 1))))) "SalI: 2 sites") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #213=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26755824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #214=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25250856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #215=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25258064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #216=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #217=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 681 " 1) +COMMENT #218=(CLinePar +COMMENT (CParagraph 0 (1 #4# 2) 1 2 2 0 191) +COMMENT " N2: 1481 " 1))))) "XbaI: 2 sites") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #219=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26527040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #220=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #221=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25285528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #223=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #224=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #225=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #226=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #227=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #228=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #229=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #230=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #231=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #232=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #233=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #234=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #235=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #236=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #237=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #238=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #239=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #240=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #241=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #242=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #243=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #244=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #245=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #246=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #247=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #248=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #249=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #250=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #251=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #252=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #253=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #254=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #255=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #256=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #257=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #258=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #259=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #260=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #261=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #262=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -3115) 1 1 0 1 1 +COMMENT (mapper: 18.8477 -23.1885 40.0378 40.0378 0.01 10 -1 3115 3115 1 0 0) +COMMENT #263=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil 1344 100) +COMMENT (CObjectList +COMMENT #264=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #265=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #229# 27242092 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.2762 6.2742 1 0.0214037) 0.201386) +COMMENT #266=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #226# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pTenA gfpuv (1uM ON) #59" "@N" 1 +COMMENT 0 0.871165 0 -10 15.0358 1.44863 Nil) +COMMENT #267=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #225# 26717324 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3115 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.14703 0.924127 Nil)) (CObjectList)) +COMMENT #268=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #269=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #270=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.70125 1.15596 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #271=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.77154 10.454 0 -10 2.72243 1.04901 #270#) +COMMENT #272=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #227# +COMMENT 1944545584 100) (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.29468 4.78695 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #273=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 268742952 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 11.7323 -24.3926 0 -10 2.79736 1.04901 #272#)) +COMMENT (CObjectList)) +COMMENT #274=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -2062 100) +COMMENT (CObjectList +COMMENT #275=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.982765 1.9 +COMMENT 0.082322 1) +COMMENT #276=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.9642 6.96932 0 -10 3.97125 1.04901 +COMMENT #275#) +COMMENT #277=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.10514 1.9 +COMMENT 0.082322 1) +COMMENT #278=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 11.8034 -5.22699 0 -10 1.14891 1.04901 #277#) +COMMENT #279=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #228# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 4.84938 +COMMENT 5.04271 1 0.082322) 0.8 1.8 0) +COMMENT #280=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 420 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "TPP aptamer (tenA)" "@N" 1 16.193 -10.454 0 +COMMENT -10 8.84164 1.04901 #279#) +COMMENT #281=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.84938 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 26973284 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "randomized" +COMMENT "@N" 1 15.3147 -17.4233 0 -10 5.49481 1.04901 +COMMENT #281#)) (CObjectList)) +COMMENT #283=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #284=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.23403 1.9 +COMMENT 0.082322 1) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 26607772 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 13.0234 1.74233 0 -10 2.59755 1.04901 #284#)) +COMMENT (CObjectList)) +COMMENT #286=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #287=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.32063 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 26778668 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 11.4971 8.71165 0 -10 2.59755 1.04901 #287#) +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.9993 1.9 0.082322 +COMMENT 1) +COMMENT #290=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 6.1351 20.908 0 -10 3.92129 1.04901 #289#) +COMMENT #291=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.61868 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 24757832 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 10.0958 17.4233 0 -10 3.97125 1.04901 #291#)) +COMMENT (CObjectList)) +COMMENT #293=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #294=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #240# +COMMENT 1944545584 100) (LOGPEN 0 0 0) 1 +COMMENT (LOGBRUSH 0 128 0) 0.835356 5.50188 5.70125 +COMMENT 1 0.082322) 0.8 1.8 1) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 26745480 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 9.63794 13.9386 0 -10 2.72243 1.04901 #294#) +COMMENT #296=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #240# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.06285 5.27229 1 0.082322) 0.8 1.8 0) +COMMENT #297=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.0495 -1.74233 0 -10 2.67247 1.04901 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -2132 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #230# 25197608 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1 5.10514 1.9 +COMMENT 0.082322 1) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 3736144 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.3582 -6.96932 0 -10 2.14797 1.04901 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #302=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #227# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.53658 2.82344 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 25157356 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.3857 -6.96932 0 -10 2.72243 1.04901 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #305=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 3.07114 +COMMENT 3.2826) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 21484788 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.15354 -34.8466 0 -10 1.14891 1.04901 #305#) +COMMENT #307=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #232# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.2063 1.41977) +COMMENT #308=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.2089 3.48466 0 -10 1.14891 1.04901 #307#)) +COMMENT (CObjectList)) +COMMENT #309=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #310=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.12931 1.9 +COMMENT 0.082322 1) +COMMENT #311=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 3736008 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.1996 -3.48466 0 -10 1.47361 1.04901 #310#)) +COMMENT (CObjectList)) +COMMENT #312=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #313=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.17764 1.9 +COMMENT 0.082322 1) +COMMENT #314=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.6204 0 0 -10 1.47361 1.04901 #313#)) +COMMENT (CObjectList)) +COMMENT #315=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -2202 100) +COMMENT (CObjectList +COMMENT #316=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #232# 25199856 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.27632 1.9 +COMMENT 0.082322 1) +COMMENT #317=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #224# 24828044 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 14.0813 3.48466 0 -10 5.8195 1.04901 +COMMENT #316#) +COMMENT #318=(CScratch +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #232# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 3.88877 1.9 +COMMENT 0.082322 1) +COMMENT #319=(CLabel (CWidget 0 (0 0) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "silent mut (XhoI)" "@N" 1 12.6385 -26.1349 0 +COMMENT -10 7.59282 1.04901 #318#)) (CObjectList))) +COMMENT (CObjectList)) +COMMENT #320=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1992 100) +COMMENT (CObjectList +COMMENT #321=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #322=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.42938 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel (CWidget 0 (0 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.9623 +COMMENT 12.1963 0 -10 4.29594 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.06913 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 24132972 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1592)" "@N (@S)" 5 -4.11828 +COMMENT -13.9386 0 -10 4.84542 0.924127 #325#)) +COMMENT (CObjectList)) +COMMENT #327=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #328=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #231# 25194488 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.06084 1.9 +COMMENT 0.082322 1) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 21145796 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (603)" "@N (@S)" 5 14.0925 +COMMENT -8.71165 0 -10 4.64561 0.924127 #328#)) +COMMENT (CObjectList)) +COMMENT #330=(CGroupWidget +COMMENT (CWidget 1 (10 #17# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #331=(CScratch +COMMENT (CWidget 1 (1 #17# 1) 1 2 0 0 #231# 3736008 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.87556 1.9 +COMMENT 0.082322 1) +COMMENT #332=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bmt}I (695)" "@N (@S)" 5 14.9175 +COMMENT -15.681 0 -10 4.24599 0.924127 #331#)) +COMMENT (CObjectList)) +COMMENT #333=(CGroupWidget +COMMENT (CWidget 1 (10 #18# 0) 1 2 0 0 Nil -809 100) +COMMENT (CObjectList +COMMENT #334=(CScratch +COMMENT (CWidget 1 (1 #18# 1) 1 2 0 0 #231# 1 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.88362 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nhe}I (691)" "@N (@S)" 5 14.7121 +COMMENT -13.9386 0 -10 4.17106 0.924127 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -949 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #231# 3736008 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.28639 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 268634488 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 13.0302 +COMMENT 5.22699 0 -10 4.17106 0.924127 #337#)) +COMMENT (CObjectList)) +COMMENT #339=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -1088 100) +COMMENT (CObjectList +COMMENT #340=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.267844 1.9 +COMMENT 0.082322 1) +COMMENT #341=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 25183852 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2983)" "@N (@S)" 5 -6.24394 +COMMENT 12.1963 0 -10 4.69556 0.924127 #340#)) +COMMENT (CObjectList)) +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -809 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.890128 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel (CWidget 0 (0 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2674)" "@N (@S)" 5 -12.0302 +COMMENT 8.71165 0 -10 4.64561 0.924127 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -1228 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #231# +COMMENT 1944749780 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 5.3166 1.9 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #233# 26971676 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 12.1951 +COMMENT 6.96932 0 -10 4.12111 0.924127 #346#)) +COMMENT (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -1783 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.7507 1.9 0.082322 +COMMENT 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #223# 26972908 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (757)" "@N (@S)" 5 15.6102 +COMMENT -20.908 0 -10 5.09519 0.924127 #349#) +COMMENT #351=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.69141 1.9 +COMMENT 0.082322 1) +COMMENT #352=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #223# 26804452 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1283)" "@N (@S)" 5 10.2053 +COMMENT -27.8773 0 -10 5.56974 0.924127 #351#)) +COMMENT (CObjectList)) +COMMENT #353=(CGroupWidget +COMMENT (CWidget 2 (10 #4# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #354=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.90376 1.9 +COMMENT 0.082322 1) +COMMENT #355=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #223# 26798676 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (681)" "@N (@S)" 5 14.5964 +COMMENT -12.1963 0 -10 4.17106 0.924127 #354#) +COMMENT #356=(CScratch +COMMENT (CWidget 2 (1 #4# 2) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.29267 1.9 +COMMENT 0.082322 1) +COMMENT #357=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #223# 24830732 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xba}I (1481)" "@N (@S)" 5 5.24938 +COMMENT -33.1043 0 -10 4.64561 0.924127 #356#)) +COMMENT (CObjectList)) +COMMENT #358=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #359=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.31482 1.9 +COMMENT 0.082322 1) +COMMENT #360=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #223# 26738012 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1470)" "@N (@S)" 5 5.42339 +COMMENT -31.3619 0 -10 4.57068 0.924127 #359#) +COMMENT #361=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.19623 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #223# 26856940 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2522)" "@N (@S)" 5 -13.5576 +COMMENT 5.22699 0 -10 4.64561 0.924127 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 2 (10 #7# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.77286 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel (CWidget 0 (0 0) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (746)" "@N (@S)" 5 14.9429 +COMMENT -19.1656 0 -10 3.92129 0.924127 #364#) +COMMENT #366=(CScratch +COMMENT (CWidget 2 (1 #7# 2) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.52426 1.9 +COMMENT 0.082322 1) +COMMENT #367=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #223# 393233 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sal}I (1366)" "@N (@S)" 5 7.75986 +COMMENT -29.6196 0 -10 4.37087 0.924127 #366#)) +COMMENT (CObjectList)) +COMMENT #368=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #369=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.94291 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #223# 25189580 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 7.37793 +COMMENT 19.1656 0 -10 4.64561 0.924127 #369#) +COMMENT #371=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.25754 1.9 +COMMENT 0.082322 1) +COMMENT #372=(CLabel (CWidget 0 (0 0) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1995)" "@N (@S)" 5 -12.2543 +COMMENT -8.71165 0 -10 5.17011 0.924127 #371#)) +COMMENT (CObjectList)) +COMMENT #373=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #374=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.09016 1.9 +COMMENT 0.082322 1) +COMMENT #375=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #223# 24706300 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1085)" "@N (@S)" 5 13.3108 +COMMENT -22.6503 0 -10 4.74552 0.924127 #374#) +COMMENT #376=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.88989 1.9 +COMMENT 0.082322 1) +COMMENT #377=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #223# 25112540 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1681)" "@N (@S)" 5 -6.10063 +COMMENT -12.1963 0 -10 4.69556 0.924127 #376#)) +COMMENT (CObjectList)) +COMMENT #378=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -2274 100) +COMMENT (CObjectList +COMMENT #379=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.60458 1.9 +COMMENT 0.082322 1) +COMMENT #380=(CLabel (CWidget 0 (0 0) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 10.862 15.681 +COMMENT 0 -10 4.77049 0.924127 #379#) +COMMENT #381=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.39313 1.9 +COMMENT 0.082322 1) +COMMENT #382=(CLabel (CWidget 0 (0 0) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 12.3334 +COMMENT 10.454 0 -10 4.77049 0.924127 #381#) +COMMENT #383=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #231# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.43991 1.9 +COMMENT 0.082322 1) +COMMENT #384=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #223# 24046980 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2401)" "@N (@S)" 5 -14.4684 +COMMENT 1.74233 0 -10 5.24504 0.924127 #383#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #385=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1228 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #386=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1019 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21253152 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1714..2352 + /vntifkey="33" + /label=ColE1 + terminator 1486..1590 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2411..2516) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2542..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2628..2649 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 581..581 + /vntifkey="21" + /label=+1 + -10_signal 569..574 + /vntifkey="47" + /label=-10 + misc_feature 612..707 + /vntifkey="21" + /label=TPP\aptamer\(tenA) + CDS 739..1479 + /vntifkey="4" + /label=gfpuv + misc_feature 708..726 + /vntifkey="21" + /label=randomized + mutation 1185..1185 + /vntifkey="62" + /label=silent\mut\(XhoI) +BASE COUNT 844 a 747 c 720 g 804 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tgaattcaaa attgctagga gagctggtgt tgccagctga gagtaagacc ttaagtcttt + 661 gatccttttt attacctgat ctagattatg ctagcgtagg gaagcaacat gatcacgctt + 721 attgatcagg agcaaactat gcaagtcgac ctgctggatc cattgagtaa aggagaagaa + 781 cttttcactg gagttgtccc aattcttgtt gaattagatg gtgatgttaa tgggcacaaa + 841 ttttctgtca gtggagaggg tgaaggtgat gcaacatacg gaaaacttac ccttaaattt + 901 atttgcacta ctggaaaact acctgttcca tggccaacac ttgtcactac tttctcttat + 961 ggtgttcaat gcttttcccg ttatccggat catatgaaac ggcatgactt tttcaagagt + 1021 gccatgcccg aaggttatgt acaggaacgc actatatctt tcaaagatga cgggaactac + 1081 aagacgcgtg ctgaagtcaa gtttgaaggt gatacccttg ttaatcgtat cgagttaaaa + 1141 ggtattgatt ttaaagaaga tggaaacatt ctcggacaca aacttgagta caactataac + 1201 tcacacaatg tatacatcac ggcagacaaa caaaagaatg gaatcaaagc taacttcaaa + 1261 attcgccaca acattgaaga tggatccgtt caactagcag accattatca acaaaatact + 1321 ccaattggcg atggccctgt ccttttacca gacaaccatt acctgtcgac acaatctgcc + 1381 ctttcgaaag atcccaacga aaagcgtgac cacatggtcc ttcttgagtt tgtaactgct + 1441 gctgggatta cacatggcat ggatgagctc tacaaataat ctagaggcat caaataaaac + 1501 gaaaggctca gtcgaaagac tgggcctttc gttttatctg ttgtttgtcg gtgaacgctc + 1561 tcctgagtag gacaaatccg ccgccctaga cctaggcgtt cggctgcggc gagcggtatc + 1621 agctcactca aaggcggtaa tacggttatc cacagaatca ggggataacg caggaaagaa + 1681 catgtgagca aaaggccagc aaaaggccag gaaccgtaaa aaggccgcgt tgctggcgtt + 1741 tttccatagg ctccgccccc ctgacgagca tcacaaaaat cgacgctcaa gtcagaggtg + 1801 gcgaaacccg acaggactat aaagatacca ggcgtttccc cctggaagct ccctcgtgcg + 1861 ctctcctgtt ccgaccctgc cgcttaccgg atacctgtcc gcctttctcc cttcgggaag + 1921 cgtggcgctt tctcaatgct cacgctgtag gtatctcagt tcggtgtagg tcgttcgctc + 1981 caagctgggc tgtgtgcacg aaccccccgt tcagcccgac cgctgcgcct tatccggtaa + 2041 ctatcgtctt gagtccaacc cggtaagaca cgacttatcg ccactggcag cagccactgg + 2101 taacaggatt agcagagcga ggtatgtagg cggtgctaca gagttcttga agtggtggcc + 2161 taactacggc tacactagaa ggacagtatt tggtatctgc gctctgctga agccagttac + 2221 cttcggaaaa agagttggta gctcttgatc cggcaaacaa accaccgctg gtagcggtgg + 2281 tttttttgtt tgcaagcagc agattacgcg cagaaaaaaa ggatctcaag aagatccttt + 2341 gatcttttct acggggtctg acgctcagtg gaacgaaaac tcacgttaag ggattttggt + 2401 catgactagt gcttggattc tcaccaataa aaaacgcccg gcggcaaccg agcgttctga + 2461 acaaatccag atggagttct gaggtcatta ctggatctat caacaggagt ccaagcgagc + 2521 tcaaacttgg tctgacagtt accaatgctt aatcagtgag gcacctatct cagcgatctg + 2581 tctatttcgt tcatccatag ttgcctgact ccccgtcgtg tagataacta cgatacggga + 2641 gggcttacca tctggcccca gtgctgcaat gataccgcga gacccacgct caccggctcc + 2701 agatttatca gcaataaacc agccagccgg aagggccgag cgcagaagtg gtcctgcaac + 2761 tttatccgcc tccatccagt ctattaattg ttgccgggaa gctagagtaa gtagttcgcc + 2821 agttaatagt ttgcgcaacg ttgttgccat tgctacaggc atcgtggtgt cacgctcgtc + 2881 gtttggtatg gcttcattca gctccggttc ccaacgatca aggcgagtta catgatcccc + 2941 catgttgtgc aaaaaagcgg ttagctcctt cggtcctccg atcgttgtca gaagtaagtt + 3001 ggccgcagtg ttatcactca tggttatggc agcactgcat aattctctta ctgtcatgcc + 3061 atccgtaaga tgcttttctg tgactggtga gtactcaacc aagtcattct gagaa +// diff --git a/lib/VNTI files/pWY1.gb b/lib/VNTI files/pWY1.gb new file mode 100644 index 00000000..fa2936f5 --- /dev/null +++ b/lib/VNTI files/pWY1.gb @@ -0,0 +1,1619 @@ +LOCUS pWY1 5403 bp DNA circular 26-JAN-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.informaxinc.com/ +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|436377035| +COMMENT VNTDBDATE|436377035| +COMMENT LSOWNER| +COMMENT VNTNAME|pWY1| +COMMENT VNTAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pWY1" 0 5403 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 9 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "Courier New" 12 4294967295 0 0 +COMMENT 0 0 0 0 1 "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5403 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1532 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 892 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3769 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 685 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2648 0 4810 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1331 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3880 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 3712 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 710 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 708 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3053 0 3168 0 +COMMENT 4283 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 2010 0 2790 0 3215 0 +COMMENT 3467 0 3969 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 831 0 1557 0 2037 0 2490 +COMMENT 0 5271 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 4962 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4689 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2225 0 3477 1 0 +COMMENT "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4002 4640 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "4004..4642") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 3774 3878 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3776..3880") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 4699 4804 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(4701..4806)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 4830 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(4832..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 4916 4937 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "4918..4939") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "theo28" 21 0 0 607 633 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "609..635") +COMMENT #42=(CFSignal (CObList) "RBS" 32 0 0 693 704 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "695..706") +COMMENT #43=(CFSignal (CObList) "lacZ" 4 0 0 705 3767 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "707..3769") +COMMENT #44=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #45=(CFSignal (CObList) "bgl-term" 43 0 0 634 683 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "636..685") +COMMENT #46=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #47=(CFSignal (CObList) "lacZ-r" 27 0 1 760 780 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(762..782)") +COMMENT #48=(CFSignal (CObList) "lacZ-40" 27 0 1 733 750 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(735..752)") +COMMENT #49=(CFSignal (CObList) "theo28f" 27 0 0 607 626 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "609..628")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #50=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #51=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pWY1" 2) 5 "" 0 4) +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pWY1'" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 01/26/07 03:50PM" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 01/26/07 03:50PM" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5403 bp" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 11-JAN-2007" 1))) +COMMENT "Standard Fields") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #65=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 705 (3 #43# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 705 End: 3767" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 707..3769" 1))) "lacZ") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4830 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4830 End: 284 (Complementary)" +COMMENT 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(4832..284)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 607 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 607 End: 633 " 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 609..635" 1))) "theo28") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4916 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4916 End: 4937" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 4918..4939" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (3 total)") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 607 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 607 End: 626 " 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 609..628" 1))) "theo28f") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 733 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 733 End: 750 (Complementary)" +COMMENT 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(735..752)" 1))) +COMMENT "lacZ-40") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 760 (3 #47# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 760 End: 780 (Complementary)" +COMMENT 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(762..782)" 1))) +COMMENT "lacZ-r"))) "Primer (4 total)") +COMMENT #107=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #112=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #122=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #131=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 693 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 693 End: 704 " 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 695..706" 1))) "RBS"))) +COMMENT "RBS (1 total)") +COMMENT #140=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #141=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4002 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4002 End: 4640" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 4004..4642" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #146=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 634 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 634 End: 683 " 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 636..685" 1))) "bgl-term") +COMMENT #150=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3774 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3774 End: 3878" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3776..3880" 1))) "T1") +COMMENT #155=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4699 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4699 End: 4804 (Complementary)" +COMMENT 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(4701..4806)" 1))) "T0"))) +COMMENT "Terminator (3 total)") +COMMENT #160=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #165=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #166=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #170=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #176=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26950432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 1331 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20467800 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 5 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20468120 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26954440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26950352 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #185=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 3880 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26954200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BamHI: 0 sites") 1 5 "GGATCC" +COMMENT "CCTAGG") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20468520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #189=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 2225 " 1) +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 3477 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26947472 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 708 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20468920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20467880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20468280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 4962 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20468440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #202=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #203=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #204=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4689 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26954120 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #207=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #208=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 1532 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26948592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #210=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #211=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 3712 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #212=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26953240 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #213=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #214=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 685 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #215=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26954040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #216=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #217=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 892 " 1))))) "KpnI: 1 site") 5 +COMMENT 1 "GGTACC" "CCATGG") +COMMENT #218=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20467960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #219=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26947552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #220=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #221=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 710 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20468200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #223=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26950752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #224=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #225=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2648 " 1) +COMMENT #226=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 4810 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #227=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26950672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 0 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #228=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20468360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #229=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26954360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #230=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26953320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #231=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #232=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3769 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #233=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20468040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #234=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #235=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #236=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 20467720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #237=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #238=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #239=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #240=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #241=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #242=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #243=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #244=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #245=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #246=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #247=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #248=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #249=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #250=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #251=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #252=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #253=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #254=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #255=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #256=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #257=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #258=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #259=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #260=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #261=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #262=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #263=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #264=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #265=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #266=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #267=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #268=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #269=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #270=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #271=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #272=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #273=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #274=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #275=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #276=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -154) 1 1 0 1 1 +COMMENT (mapper: 18.418 -30.1819 40.0378 40.0378 0.01 10 -1 5403 5403 1 0 0) +COMMENT #277=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1788 100) +COMMENT (CObjectList +COMMENT #278=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1202 100) +COMMENT (CObjectList +COMMENT #279=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26397556 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27535 6.27335 1 0.0214037) 0.116106) +COMMENT #280=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #240# 3736008 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pWY1" "@N" 1 0 0.871165 0 -10 +COMMENT 3.22196 1.44863 Nil) +COMMENT #281=(CLabel (CWidget 1002 (0 0) 1 2 0 0 #239# 393233 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5403 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.04712 0.949103 Nil)) (CObjectList)) +COMMENT #282=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -811 100) +COMMENT (CObjectList +COMMENT #283=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1262 100) +COMMENT (CObjectList +COMMENT #284=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.94345 0.666446 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #285=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.22956 15.681 0 -10 2.67247 1.12394 #284#) +COMMENT #286=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.89949 5.4558 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26562580 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ" "@N" 1 +COMMENT 8.18902 -22.6503 0 -10 1.84825 1.12394 #286#)) +COMMENT (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #246# 26693864 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 0.566595 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26563076 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -8.91026 12.1963 0 -10 3.79641 1.12394 +COMMENT #289#) +COMMENT #291=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #246# 26688088 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.56959 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3670672 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "theo28" "@N" 1 +COMMENT 13.4044 0 0 -10 3.09707 1.12394 #291#) +COMMENT #293=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.59977 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.0864 3.48466 0 -10 1.17389 1.12394 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #246# 26786712 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.67408 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 8.67643 10.454 0 -10 2.54759 1.12394 #296#) +COMMENT #298=(CScratch +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #246# 26688168 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.39194 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 28437196 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ-r" "@N" 1 +COMMENT 11.4166 -13.9386 0 -10 2.54759 1.12394 #298#) +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.42329 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26582196 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ-40" "@N" 1 +COMMENT 11.3654 -12.1963 0 -10 3.172 1.12394 #300#) +COMMENT #302=(CScratch +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #246# 26678176 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.56959 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26406940 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "theo28f" "@N" 1 +COMMENT 13.4328 -1.74233 0 -10 3.42177 1.12394 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #259# 26688728 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.72401 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 28251348 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 8.61942 17.4233 0 -10 2.59755 1.12394 #305#) +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #259# 26679936 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.11528 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26564732 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.88608 27.8773 0 -10 3.72148 1.12394 #307#) +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #259# 26694424 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.89584 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 393219 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.42082 26.1349 0 -10 3.79641 1.12394 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #312=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #254# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.8285 5.94345 1 0.082322) 0.8 1.8 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 28267588 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 7.01018 22.6503 0 -10 2.67247 1.12394 #312#) +COMMENT #314=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #254# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.57539 5.69614 1 0.082322) 0.8 1.8 0) +COMMENT #315=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 20895708 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 11.2684 6.96932 0 -10 2.59755 1.12394 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1230 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #244# 26694104 +COMMENT 100) (LOGPEN 0 6 6723840) 8 1 5.59977 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26583236 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.8404 1.74233 0 -10 2.09802 1.12394 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil -602 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #258# 0 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 5.46973 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3670648 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "RBS" "@N" 1 +COMMENT 11.0332 -6.96932 0 -10 2.09802 1.12394 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1300 100) +COMMENT (CObjectList +COMMENT #323=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.885886 1.6278 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #324=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 24809584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.8094 3.48466 0 -10 2.72243 1.12394 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1202 100) +COMMENT (CObjectList +COMMENT #326=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #246# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.77061 1.89252) +COMMENT #327=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.431 -1.74233 0 -10 1.22384 1.12394 #326#) +COMMENT #328=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #246# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 0.695473 0.818544) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.27497 8.71165 0 -10 1.22384 1.12394 #328#) +COMMENT #330=(CLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #246# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 5.48018 5.53824) +COMMENT #331=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bgl-term" "@N" +COMMENT 1 13.2886 -3.48466 0 -10 3.79641 1.12394 +COMMENT #330#)) (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.61371 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 11.645 5.22699 0 -10 1.42365 1.12394 #333#)) +COMMENT (CObjectList)) +COMMENT #335=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -2137 100) +COMMENT (CObjectList +COMMENT #336=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.64157 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 9.37255 8.71165 0 -10 1.42365 1.12394 #336#)) +COMMENT (CObjectList)) +COMMENT #338=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1262 100) +COMMENT (CObjectList +COMMENT #339=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #246# 26693384 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.69846 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 9.96353 12.1963 0 -10 5.59471 1.12394 +COMMENT #339#)) (CObjectList))) (CObjectList)) +COMMENT #341=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil 20870512 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #245# 26673680 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.49561 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 3670768 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (1532)" "@N (@S)" 5 14.8413 +COMMENT -19.1656 0 -10 4.17106 0.949103 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil 3670440 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #245# 26674400 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.23868 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 20866228 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (892)" "@N (@S)" 5 13.3689 +COMMENT -15.681 0 -10 4.04618 0.949103 #346#)) +COMMENT (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 196614 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #245# 26695144 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.89833 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 28441124 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3769)" "@N (@S)" 5 -13.7416 +COMMENT -3.48466 0 -10 4.5457 0.949103 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #245# 26694824 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.47902 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 28441348 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (685)" "@N (@S)" 5 13.4745 +COMMENT -5.22699 0 -10 4.79547 0.949103 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 1 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #245# 677406339 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.76945 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# -1366 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (3880)" "@N (@S)" 5 -14.3366 0 0 +COMMENT -10 4.67059 0.949103 #355#)) (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 5439490 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #245# 26684088 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.96451 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 1944545584 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (3712)" "@N (@S)" 5 -13.6285 +COMMENT -5.22699 0 -10 4.92035 0.949103 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil 3670416 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #245# 26681456 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.45 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel (CWidget 0 (0 0) 1 2 0 0 #247# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (710)" "@N (@S)" 5 11.3237 +COMMENT -10.454 0 -10 3.72148 0.949103 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #245# 26798432 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.45232 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# -602 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (708)" "@N (@S)" 5 11.4543 +COMMENT -8.71165 0 -10 4.24599 0.949103 #364#)) +COMMENT (CObjectList)) +COMMENT #366=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #367=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.70427 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 26409388 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 9.39391 +COMMENT 13.9386 0 -10 3.97125 0.949103 #367#)) +COMMENT (CObjectList)) +COMMENT #369=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #370=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #245# 26695304 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.513187 1.9 +COMMENT 0.082322 1) +COMMENT #371=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 3670696 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (4962)" "@N (@S)" 5 -8.91299 +COMMENT 13.9386 0 -10 4.49575 0.949103 #370#)) +COMMENT (CObjectList)) +COMMENT #372=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil 26562804 100) +COMMENT (CObjectList +COMMENT #373=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #245# 26695544 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.19987 1.9 +COMMENT 0.082322 1) +COMMENT #374=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 20741780 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2648)" "@N (@S)" 5 3.99551 +COMMENT -24.3926 0 -10 4.42082 0.949103 #373#) +COMMENT #375=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #245# 26637008 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.689667 1.9 +COMMENT 0.082322 1) +COMMENT #376=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 20742004 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (4810)" "@N (@S)" 5 -10.3594 +COMMENT 10.454 0 -10 4.34589 0.949103 #375#)) +COMMENT (CObjectList)) +COMMENT #377=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil 327686 100) +COMMENT (CObjectList +COMMENT #378=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.7867 1.9 0.082322 +COMMENT 1) +COMMENT #379=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26857088 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 8.90347 +COMMENT 20.908 0 -10 4.12111 0.949103 #378#) +COMMENT #380=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #245# 26684328 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.72898 1.9 +COMMENT 0.082322 1) +COMMENT #381=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 268634520 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (1331)" "@N (@S)" 5 15.1901 +COMMENT -17.4233 0 -10 4.49575 0.949103 #380#)) +COMMENT (CObjectList)) +COMMENT #382=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #383=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.88771 1.9 +COMMENT 0.082322 1) +COMMENT #384=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670520 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 8.04222 +COMMENT 24.3926 0 -10 4.62063 0.949103 #383#) +COMMENT #385=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #245# 26686568 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.7658 1.9 +COMMENT 0.082322 1) +COMMENT #386=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 20866488 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 9.30435 +COMMENT 19.1656 0 -10 4.62063 0.949103 #385#) +COMMENT #387=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #245# 26670160 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.830155 1.9 +COMMENT 0.082322 1) +COMMENT #388=(CLabel (CWidget 0 (0 0) 1 2 0 0 #237# 45 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4689)" "@N (@S)" 5 -12.5752 +COMMENT 6.96932 0 -10 5.12016 0.949103 #387#)) +COMMENT (CObjectList)) +COMMENT #389=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil 26470296 100) +COMMENT (CObjectList +COMMENT #390=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #245# 26684968 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.72168 1.9 +COMMENT 0.082322 1) +COMMENT #391=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26579004 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 9.25965 15.681 +COMMENT 0 -10 3.99622 0.949103 #390#) +COMMENT #392=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #245# 26670720 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.691 1.9 +COMMENT 0.082322 1) +COMMENT #393=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 2228241 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (2225)" "@N (@S)" 5 9.5396 +COMMENT -20.908 0 -10 4.42082 0.949103 #392#) +COMMENT #394=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #245# 26681696 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 2.23735 1.9 +COMMENT 0.082322 1) +COMMENT #395=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 26579424 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3477)" "@N (@S)" 5 -12.1832 +COMMENT -6.96932 0 -10 4.49575 0.949103 #394#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #396=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 26952680 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #397=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3670432 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 9 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 2087857526 +COMMENT (CStringList) 1095462957 827607363 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4002..4640 + /vntifkey="33" + /label=ColE1 + terminator 3774..3878 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4699..4804) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4830..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 4916..4937 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 607..633 + /vntifkey="21" + /label=theo28 + RBS 693..704 + /vntifkey="32" + /label=RBS + CDS 705..3767 + /vntifkey="4" + /label=lacZ + misc_feature 581..581 + /vntifkey="21" + /label=+1 + terminator 634..683 + /vntifkey="43" + /label=bgl-term + -10_signal 569..574 + /vntifkey="47" + /label=-10 + primer complement(760..780) + /vntifkey="27" + /label=lacZ-r + primer complement(733..750) + /vntifkey="27" + /label=lacZ-40 + primer 607..626 + /vntifkey="27" + /label=theo28f +BASE COUNT 1283 a 1421 c 1446 g 1253 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tggattgata ccagccgaaa ggcccttggc agcaaaacct gacataacca gagaatactg + 661 gtgaagtcgg gtttttttgt tttaagctta tcaggaaaaa aaaaatgcat atagatcccg + 721 tcgttttaca acgtcgtgac tgggaaaacc ctggcgttac ccaacttaat cgccttgcag + 781 cacatccccc tttcgccagc tggcgtaata gcgaagaggc ccgcaccgat cgcccttccc + 841 aacagttgcg cagcctgaat ggcgaatggc gctttgcctg gtttccggta ccagaagcgg + 901 tgccggaaag ctggctggag tgcgatcttc ctgaggccga tactgtcgtc gtcccctcaa + 961 actggcagat gcacggttac gatgcgccca tctacaccaa cgtaacctat cccattacgg + 1021 tcaatccgcc gtttgttccc acggagaatc cgacgggttg ttactcgctc acatttaatg + 1081 ttgatgaaag ctggctacag gaaggccaga cgcgaattat ttttgatggc gttaactcgg + 1141 cgtttcatct gtggtgcaac gggcgctggg tcggttacgg ccaggacagt cgtttgccgt + 1201 ctgaatttga cctgagcgca tttttacgcg ccggagaaaa ccgcctcgcg gtgatggtgc + 1261 tgcgttggag tgacggcagt tatctggaag atcaggatat gtggcggatg agcggcattt + 1321 tccgtgacgt ctcgttgctg cataaaccga ctacacaaat cagcgatttc catgttgcca + 1381 ctcgctttaa tgatgatttc agccgcgctg tactggaggc tgaagttcag atgtgcggcg + 1441 agttgcgtga ctacctacgg gtaacagttt ctttatggca gggtgaaacg caggtcgcca + 1501 gcggcaccgc gcctttcggc ggtgaaatta tcgatgagcg tggtggttat gccgatcgcg + 1561 tcacactacg tctgaacgtc gaaaacccga aactgtggag cgccgaaatc ccgaatctct + 1621 atcgtgcggt ggttgaactg cacaccgccg acggcacgct gattgaagca gaagcctgcg + 1681 atgtcggttt ccgcgaggtg cggattgaaa atggtctgct gctgctgaac ggcaagccgt + 1741 tgctgattcg aggcgttaac cgtcacgagc atcatcctct gcatggtcag gtcatggatg + 1801 agcagacgat ggtgcaggat atcctgctga tgaagcagaa caactttaac gccgtgcgct + 1861 gttcgcatta tccgaaccat ccgctgtggt acacgctgtg cgaccgctac ggcctgtatg + 1921 tggtggatga agccaatatt gaaacccacg gcatggtgcc aatgaatcgt ctgaccgatg + 1981 atccgcgctg gctaccggcg atgagcgaac gcgtaacgcg aatggtgcag cgcgatcgta + 2041 atcacccgag tgtgatcatc tggtcgctgg ggaatgaatc aggccacggc gctaatcacg + 2101 acgcgctgta tcgctggatc aaatctgtcg atccttcccg cccggtgcag tatgaaggcg + 2161 gcggagccga caccacggcc accgatatta tttgcccgat gtacgcgcgc gtggatgaag + 2221 accagccctt cccggctgtg ccgaaatggt ccatcaaaaa atggctttcg ctacctggag + 2281 agacgcgccc gctgatcctt tgcgaatacg cccacgcgat gggtaacagt cttggcggtt + 2341 tcgctaaata ctggcaggcg tttcgtcagt atccccgttt acagggcggc ttcgtctggg + 2401 actgggtgga tcagtcgctg attaaatatg atgaaaacgg caacccgtgg tcggcttacg + 2461 gcggtgattt tggcgatacg ccgaacgatc gccagttctg tatgaacggt ctggtctttg + 2521 ccgaccgcac gccgcatcca gcgctgacgg aagcaaaaca ccagcagcag tttttccagt + 2581 tccgtttatc cgggcaaacc atcgaagtga ccagcgaata cctgttccgt catagcgata + 2641 acgagctcct gcactggatg gtggcgctgg atggtaagcc gctggcaagc ggtgaagtgc + 2701 ctctggatgt cgctccacaa ggtaaacagt tgattgaact gcctgaacta ccgcagccgg + 2761 agagcgccgg gcaactctgg ctcacagtac gcgtagtgca accgaacgcg accgcatggt + 2821 cagaagccgg gcacatcagc gcctggcagc agtggcgtct ggcggaaaac ctcagtgtga + 2881 cgctccccgc cgcgtcccac gccatcccgc atctgaccac cagcgaaatg gatttttgca + 2941 tcgagctggg taataagcgt tggcaattta accgccagtc aggctttctt tcacagatgt + 3001 ggattggcga taaaaaacaa ctgctgacgc cgctgcgcga tcagttcacc cgtgcaccgc + 3061 tggataacga cattggcgta agtgaagcga cccgcattga ccctaacgcc tgggtcgaac + 3121 gctggaaggc ggcgggccat taccaggccg aagcagcgtt gttgcagtgc acggcagata + 3181 cacttgctga tgcggtgctg attacgaccg ctcacgcgtg gcagcatcag gggaaaacct + 3241 tatttatcag ccggaaaacc taccggattg atggtagtgg tcaaatggcg attaccgttg + 3301 atgttgaagt ggcgagcgat acaccgcatc cggcgcggat tggcctgaac tgccagctgg + 3361 cgcaggtagc agagcgggta aactggctcg gattagggcc gcaagaaaac tatcccgacc + 3421 gccttactgc cgcctgtttt gaccgctggg atctgccatt gtcagacatg tataccccgt + 3481 acgtcttccc gagcgaaaac ggtctgcgct gcgggacgcg cgaattgaat tatggcccac + 3541 accagtggcg cggcgacttc cagttcaaca tcagccgcta cagtcaacag caactgatgg + 3601 aaaccagcca tcgccatctg ctgcacgcgg aagaaggcac atggctgaat atcgacggtt + 3661 tccatatggg gattggtggc gacgactcct ggagcccgtc agtatcggcg gaattccagc + 3721 tgagcgccgg tcgctaccat taccagttgg tctggtgtca aaaataatct agaggcatca + 3781 aataaaacga aaggctcagt cgaaagactg ggcctttcgt tttatctgtt gtttgtcggt + 3841 gaacgctctc ctgagtagga caaatccgcc gccctagacc taggcgttcg gctgcggcga + 3901 gcggtatcag ctcactcaaa ggcggtaata cggttatcca cagaatcagg ggataacgca + 3961 ggaaagaaca tgtgagcaaa aggccagcaa aaggccagga accgtaaaaa ggccgcgttg + 4021 ctggcgtttt tccataggct ccgcccccct gacgagcatc acaaaaatcg acgctcaagt + 4081 cagaggtggc gaaacccgac aggactataa agataccagg cgtttccccc tggaagctcc + 4141 ctcgtgcgct ctcctgttcc gaccctgccg cttaccggat acctgtccgc ctttctccct + 4201 tcgggaagcg tggcgctttc tcaatgctca cgctgtaggt atctcagttc ggtgtaggtc + 4261 gttcgctcca agctgggctg tgtgcacgaa ccccccgttc agcccgaccg ctgcgcctta + 4321 tccggtaact atcgtcttga gtccaacccg gtaagacacg acttatcgcc actggcagca + 4381 gccactggta acaggattag cagagcgagg tatgtaggcg gtgctacaga gttcttgaag + 4441 tggtggccta actacggcta cactagaagg acagtatttg gtatctgcgc tctgctgaag + 4501 ccagttacct tcggaaaaag agttggtagc tcttgatccg gcaaacaaac caccgctggt + 4561 agcggtggtt tttttgtttg caagcagcag attacgcgca gaaaaaaagg atctcaagaa + 4621 gatcctttga tcttttctac ggggtctgac gctcagtgga acgaaaactc acgttaaggg + 4681 attttggtca tgactagtgc ttggattctc accaataaaa aacgcccggc ggcaaccgag + 4741 cgttctgaac aaatccagat ggagttctga ggtcattact ggatctatca acaggagtcc + 4801 aagcgagctc aaacttggtc tgacagttac caatgcttaa tcagtgaggc acctatctca + 4861 gcgatctgtc tatttcgttc atccatagtt gcctgactcc ccgtcgtgta gataactacg + 4921 atacgggagg gcttaccatc tggccccagt gctgcaatga taccgcgaga cccacgctca + 4981 ccggctccag atttatcagc aataaaccag ccagccggaa gggccgagcg cagaagtggt + 5041 cctgcaactt tatccgcctc catccagtct attaattgtt gccgggaagc tagagtaagt + 5101 agttcgccag ttaatagttt gcgcaacgtt gttgccattg ctacaggcat cgtggtgtca + 5161 cgctcgtcgt ttggtatggc ttcattcagc tccggttccc aacgatcaag gcgagttaca + 5221 tgatccccca tgttgtgcaa aaaagcggtt agctccttcg gtcctccgat cgttgtcaga + 5281 agtaagttgg ccgcagtgtt atcactcatg gttatggcag cactgcataa ttctcttact + 5341 gtcatgccat ccgtaagatg cttttctgtg actggtgagt actcaaccaa gtcattctga + 5401 gaa +// diff --git a/lib/VNTI files/pWY2.gb b/lib/VNTI files/pWY2.gb new file mode 100644 index 00000000..930bd895 --- /dev/null +++ b/lib/VNTI files/pWY2.gb @@ -0,0 +1,1624 @@ +LOCUS pWY2 5404 bp DNA circular 26-JAN-2007 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: + http://www.informaxinc.com/ +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|436377060| +COMMENT VNTDBDATE|436377060| +COMMENT LSOWNER| +COMMENT VNTNAME|pWY2| +COMMENT VNTAUTHORNAME|Yokobayashi Lab| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pWY2" 0 5404 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 9 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "Courier New" 12 4294967295 0 0 +COMMENT 0 0 0 0 1 "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 5404 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 1 1533 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 1 893 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 3770 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 1 686 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 2649 0 4811 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 2 420 0 1332 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 3881 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 3713 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 711 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 709 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 4 165 0 3054 0 3169 0 +COMMENT 4284 0 0 "") #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 5 2011 0 2791 0 3216 0 +COMMENT 3468 0 3970 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 5 832 0 1558 0 2038 0 2491 +COMMENT 0 5272 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 4963 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 4690 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 3 476 1 2226 0 3478 1 0 +COMMENT "") #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 4003 4641 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "4004..4642") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 3775 3879 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3776..3880") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 4700 4805 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(4701..4806)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 4831 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(4832..284)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(285..383)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(474..495)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "137..158") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 4917 4938 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "4918..4939") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "326..345") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 498 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 517 537 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 545 550 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "545..550") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 581 601 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #40=(CFSignal (CObList) "AG insertion" 62 0 0 496 497 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #41=(CFSignal (CObList) "theo28" 21 0 0 608 634 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "609..635") +COMMENT #42=(CFSignal (CObList) "RBS" 32 0 0 694 705 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "695..706") +COMMENT #43=(CFSignal (CObList) "lacZ" 4 0 0 706 3768 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "707..3769") +COMMENT #44=(CFSignal (CObList) "+1" 21 0 0 581 581 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..581") +COMMENT #45=(CFSignal (CObList) "bgl-term" 43 0 0 635 684 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "636..685") +COMMENT #46=(CFSignal (CObList) "-10" 47 0 0 569 574 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "569..574") +COMMENT #47=(CFSignal (CObList) "lacZ-r" 27 0 1 761 781 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(762..782)") +COMMENT #48=(CFSignal (CObList) "lacZ-40" 27 0 1 734 751 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(735..752)") +COMMENT #49=(CFSignal (CObList) "theo28f" 27 0 0 608 627 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "609..628")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #50=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #51=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pWY2" 2) 5 "" 0 4) +COMMENT #52=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pWY2'" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yokobayashi Lab" +COMMENT 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 01/26/07 03:51PM" 1) +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 01/26/07 03:51PM" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 5404 bp" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #60=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #61=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #62=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 11-JAN-2007" 1))) +COMMENT "Standard Fields") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yokobayashi Lab" 1))) "Original Author") +COMMENT #65=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 706 (3 #43# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 706 End: 3768" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 707..3769" 1))) "lacZ") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4831 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4831 End: 284 (Complementary)" +COMMENT 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(4832..284)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 581 " 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 608 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 608 End: 634 " 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 609..635" 1))) "theo28") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4917 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4917 End: 4938" 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 4918..4939" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (3 total)") +COMMENT #90=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 517 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 517 End: 537 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 608 (3 #49# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #96=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 608 End: 627 " 1) +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 609..628" 1))) "theo28f") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 734 (3 #48# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 734 End: 751 (Complementary)" +COMMENT 1) +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(735..752)" 1))) +COMMENT "lacZ-40") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 761 (3 #47# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 761 End: 781 (Complementary)" +COMMENT 1) +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(762..782)" 1))) +COMMENT "lacZ-r"))) "Primer (4 total)") +COMMENT #107=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #108=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 137..158" 1))) "bla-rev2") +COMMENT #112=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 326..345" 1))) "pbla-rev") +COMMENT #117=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #120=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(474..495)" 1))) +COMMENT "BLI06"))) "Primer Binding Site (3 total)") +COMMENT #121=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #122=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(285..383)" 1))) +COMMENT "P(bla)") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 498 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 498 End: 601 " 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #131=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 581 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 581 End: 601 " 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 694 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 694 End: 705 " 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 695..706" 1))) "RBS"))) +COMMENT "RBS (1 total)") +COMMENT #140=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #141=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4003 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4003 End: 4641" 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 4004..4642" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #146=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 635 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 635 End: 684 " 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 636..685" 1))) "bgl-term") +COMMENT #150=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 3775 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 3775 End: 3879" 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #153=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3776..3880" 1))) "T1") +COMMENT #155=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4700 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #156=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4700 End: 4805 (Complementary)" +COMMENT 1) +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(4701..4806)" 1))) "T0"))) +COMMENT "Terminator (3 total)") +COMMENT #160=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 569 (3 #46# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 569 End: 574 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #165=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #166=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 545 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 545 End: 550 " 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #170=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 496 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 496 End: 497 " 1) +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #174=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #176=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26267952 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1) +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #8# 2) 1 2 2 0 191) +COMMENT " N2: 1332 " 1))))) "AatII: 2 sites") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26436152 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "AflIII: 5 sites") 1 5 "ACRYGT" +COMMENT "TGYRCA") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26465800 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #183=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26268032 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 4 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #184=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26696168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #185=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #186=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 3881 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26268272 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BamHI: 0 sites") 1 5 "GGATCC" +COMMENT "CCTAGG") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26465320 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #189=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1) +COMMENT #191=(CLinePar +COMMENT (CParagraph 0 (1 #25# 2) 1 2 2 0 191) +COMMENT " N2: 2226 " 1) +COMMENT #192=(CLinePar +COMMENT (CParagraph 0 (1 #25# 3) 1 2 2 0 191) +COMMENT " N3: 3478 (on complementary strand)" +COMMENT 1))))) "BbsI: 3 sites") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26268192 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 709 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26465240 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #197=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26465480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #198=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26466520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #199=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #200=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 4963 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #201=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26466360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #202=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #203=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #204=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 4690 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26970728 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #207=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #208=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 1533 " 1))))) "ClaI: 1 site") +COMMENT 2 4 "ATCGAT" "TAGCTA") +COMMENT #209=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26267712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #210=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #211=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 3713 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #212=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26695848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #213=(CGroupPar +COMMENT (CParagraph 0 (10 #5# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #214=(CLinePar +COMMENT (CParagraph 0 (1 #5# 1) 1 2 2 0 191) +COMMENT " N1: 686 " 1))))) "HindIII: 1 site") +COMMENT 1 5 "AAGCTT" "TTCGAA") +COMMENT #215=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26695928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #216=(CGroupPar +COMMENT (CParagraph 0 (10 #3# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #217=(CLinePar +COMMENT (CParagraph 0 (1 #3# 1) 1 2 2 0 191) +COMMENT " N1: 893 " 1))))) "KpnI: 1 site") 5 +COMMENT 1 "GGTACC" "CCATGG") +COMMENT #218=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26465560 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #219=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26310112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #220=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #221=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 711 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #222=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26465720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PvuI: 5 sites") 4 2 "CGATCG" +COMMENT "GCTAGC") +COMMENT #223=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26267872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #224=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #225=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 2649 " 1) +COMMENT #226=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 4811 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #227=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26696088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SalI: 0 sites") 1 5 "GTCGAC" +COMMENT "CAGCTG") +COMMENT #228=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26659408 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #229=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26268112 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #230=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26695768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #231=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #232=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 3770 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #233=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26465640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #234=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #235=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #236=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26466280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #237=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #238=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #239=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #240=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #241=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #242=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #243=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #244=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #245=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #246=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #247=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #248=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #249=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #250=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #251=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #252=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #253=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #254=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #255=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #256=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #257=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #258=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #259=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #260=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #261=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #262=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #263=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #264=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #265=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #266=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #267=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #268=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #269=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #270=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #271=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #272=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #273=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #274=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #275=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #276=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -154) 1 1 0 1 1 +COMMENT (mapper: 18.3181 -30.1819 40.0378 40.0378 0.01 10 -1 5404 5404 1 0 0) +COMMENT #277=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -250 100) +COMMENT (CObjectList +COMMENT #278=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1202 100) +COMMENT (CObjectList +COMMENT #279=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #243# 26546780 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27535 6.27335 1 0.0214037) 0.116084) +COMMENT #280=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #240# 24809584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pWY2" "@N" 1 0 0.871165 0 -10 +COMMENT 3.22196 1.44863 Nil) +COMMENT #281=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #239# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "5404 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.04712 0.949103 Nil)) (CObjectList)) +COMMENT #282=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1925 100) +COMMENT (CObjectList +COMMENT #283=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil 393219 100) +COMMENT (CObjectList +COMMENT #284=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.94351 0.666323 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 25669968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -4.22919 15.681 0 -10 2.67247 1.12394 #284#) +COMMENT #286=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.89914 5.45479 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #287=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3670552 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ" "@N" 1 +COMMENT 8.18201 -22.6503 0 -10 1.84825 1.12394 #286#)) +COMMENT (CObjectList)) +COMMENT #288=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil 3670432 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #246# 26695304 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 0.56649 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 20868060 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -8.9092 12.1963 0 -10 3.79641 1.12394 #289#) +COMMENT #291=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.56855 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "theo28" "@N" 1 +COMMENT 13.4044 0 0 -10 3.09707 1.12394 #291#) +COMMENT #293=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #246# 26684088 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.5999 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3670512 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "+1" "@N" 1 +COMMENT 12.0864 3.48466 0 -10 1.17389 1.12394 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #246# 26798432 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.67419 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26408648 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 8.67534 10.454 0 -10 2.54759 1.12394 #296#) +COMMENT #298=(CScratch +COMMENT (CWidget 0 (3 #47# 0) 1 2 0 0 #246# 26670720 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.39095 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3670624 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ-r" "@N" 1 +COMMENT 11.4241 -13.9386 0 -10 2.54759 1.12394 #298#) +COMMENT #300=(CScratch +COMMENT (CWidget 0 (3 #48# 0) 1 2 0 0 #246# 26670160 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.42229 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3670608 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacZ-40" "@N" 1 +COMMENT 11.3732 -12.1963 0 -10 3.172 1.12394 #300#) +COMMENT #302=(CScratch +COMMENT (CWidget 0 (3 #49# 0) 1 2 0 0 #246# 26684328 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.56855 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 28264612 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "theo28f" "@N" 1 +COMMENT 13.4328 -1.74233 0 -10 3.42177 1.12394 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -948 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #259# 26684968 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.72411 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 3670584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 8.61839 17.4233 0 -10 2.59755 1.12394 #305#) +COMMENT #307=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #259# 26637008 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 6.11531 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 393219 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 4.88573 27.8773 0 -10 3.72148 1.12394 #307#) +COMMENT #309=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #259# 26686568 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.89591 1.9 +COMMENT 0.082322 1) +COMMENT #310=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26511316 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.42005 26.1349 0 -10 3.79641 1.12394 #309#)) +COMMENT (CObjectList)) +COMMENT #311=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #312=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #254# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.82858 5.94351 1 0.082322) 0.8 1.8 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 28505660 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 7.00938 22.6503 0 -10 2.67247 1.12394 #312#) +COMMENT #314=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #254# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.57552 5.69625 1 0.082322) 0.8 1.8 0) +COMMENT #315=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 11.2684 6.96932 0 -10 2.59755 1.12394 #314#)) +COMMENT (CObjectList)) +COMMENT #316=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #317=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #244# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.5999 1.9 0.082322 +COMMENT 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 28309132 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.8404 1.74233 0 -10 2.09802 1.12394 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #258# 677406339 +COMMENT 100) (LOGPEN 0 6 16711680) 8 1 5.46872 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26549204 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "RBS" "@N" 1 +COMMENT 11.0332 -6.96932 0 -10 2.09802 1.12394 #320#)) +COMMENT (CObjectList)) +COMMENT #322=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -808 100) +COMMENT (CObjectList +COMMENT #323=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #241# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 0.885722 1.6275 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #324=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -12.8094 3.48466 0 -10 2.72243 1.12394 #323#)) +COMMENT (CObjectList)) +COMMENT #325=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1506 100) +COMMENT (CObjectList +COMMENT #326=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #246# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.77028 1.89217) +COMMENT #327=(CLabel (CWidget 0 (0 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT -12.431 -1.74233 0 -10 1.22384 1.12394 #326#) +COMMENT #328=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #246# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 0.695344 0.818393) +COMMENT #329=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# -328 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -9.27375 8.71165 0 -10 1.22384 1.12394 #328#) +COMMENT #330=(CLine +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #246# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 5.47917 5.53721) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26514628 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bgl-term" "@N" +COMMENT 1 13.2886 -3.48466 0 -10 3.79641 1.12394 +COMMENT #330#)) (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 0 (3 #46# 0) 1 2 0 0 #246# 26681696 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.61383 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 20868804 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 11.645 5.22699 0 -10 1.42365 1.12394 #333#)) +COMMENT (CObjectList)) +COMMENT #335=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil 3670432 100) +COMMENT (CObjectList +COMMENT #336=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #246# 26681456 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.64169 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 28329292 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 9.37255 8.71165 0 -10 1.42365 1.12394 #336#)) +COMMENT (CObjectList)) +COMMENT #338=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #339=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #246# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.69857 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #238# 26357140 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 9.96246 12.1963 0 -10 5.59471 1.12394 +COMMENT #339#)) (CObjectList))) (CObjectList)) +COMMENT #341=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList +COMMENT #342=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #343=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #245# 26695544 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.49478 1.9 +COMMENT 0.082322 1) +COMMENT #344=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 26417052 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Cla}I (1533)" "@N (@S)" 5 14.8392 +COMMENT -19.1656 0 -10 4.17106 0.949103 #343#)) +COMMENT (CObjectList)) +COMMENT #345=(CGroupWidget +COMMENT (CWidget 1 (10 #3# 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #346=(CScratch +COMMENT (CWidget 1 (1 #3# 1) 1 2 0 0 #245# 26694824 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.23771 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 3670432 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Kpn}I (893)" "@N (@S)" 5 13.3747 +COMMENT -15.681 0 -10 4.04618 0.949103 #346#)) +COMMENT (CObjectList)) +COMMENT #348=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList +COMMENT #349=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #245# 26695144 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.89798 1.9 +COMMENT 0.082322 1) +COMMENT #350=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 26564412 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (3770)" "@N (@S)" 5 -13.7416 +COMMENT -3.48466 0 -10 4.5457 0.949103 #349#)) +COMMENT (CObjectList)) +COMMENT #351=(CGroupWidget +COMMENT (CWidget 1 (10 #5# 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #352=(CScratch +COMMENT (CWidget 1 (1 #5# 1) 1 2 0 0 #245# 26674400 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.47801 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 26566068 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Hin}dIII (686)" "@N (@S)" 5 13.4745 +COMMENT -5.22699 0 -10 4.84542 0.949103 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #245# 26673680 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 1.76912 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 28265612 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (3881)" "@N (@S)" 5 -14.2669 0 0 +COMMENT -10 4.59566 0.949103 #355#)) (CObjectList)) +COMMENT #357=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #358=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.96414 1.9 +COMMENT 0.082322 1) +COMMENT #359=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 26565460 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (3713)" "@N (@S)" 5 -13.6302 +COMMENT -5.22699 0 -10 4.92035 0.949103 #358#)) +COMMENT (CObjectList)) +COMMENT #360=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #361=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #245# 26786712 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.44899 1.9 +COMMENT 0.082322 1) +COMMENT #362=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 3670528 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (711)" "@N (@S)" 5 11.2621 +COMMENT -10.454 0 -10 3.67153 0.949103 #361#)) +COMMENT (CObjectList)) +COMMENT #363=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #364=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #245# 26688088 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.45131 1.9 +COMMENT 0.082322 1) +COMMENT #365=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 28251028 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (709)" "@N (@S)" 5 11.445 +COMMENT -8.71165 0 -10 4.24599 0.949103 #364#)) +COMMENT (CObjectList)) +COMMENT #366=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #367=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #245# 26693864 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.70437 1.9 +COMMENT 0.082322 1) +COMMENT #368=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 28265004 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 9.39286 +COMMENT 13.9386 0 -10 3.97125 0.949103 #367#)) +COMMENT (CObjectList)) +COMMENT #369=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -599 100) +COMMENT (CObjectList +COMMENT #370=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #245# 26694104 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.513092 1.9 +COMMENT 0.082322 1) +COMMENT #371=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #247# 3670624 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (4963)" "@N (@S)" 5 -8.91199 +COMMENT 13.9386 0 -10 4.49575 0.949103 #370#)) +COMMENT (CObjectList)) +COMMENT #372=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil 3670448 100) +COMMENT (CObjectList +COMMENT #373=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.19928 1.9 +COMMENT 0.082322 1) +COMMENT #374=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670608 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2649)" "@N (@S)" 5 3.97101 +COMMENT -24.3926 0 -10 4.42082 0.949103 #373#) +COMMENT #375=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.68954 1.9 +COMMENT 0.082322 1) +COMMENT #376=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28267268 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (4811)" "@N (@S)" 5 -10.2885 +COMMENT 10.454 0 -10 4.29594 0.949103 #375#)) +COMMENT (CObjectList)) +COMMENT #377=(CGroupWidget +COMMENT (CWidget 2 (10 #8# 0) 1 2 0 0 Nil 268634520 100) +COMMENT (CObjectList +COMMENT #378=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.78679 1.9 +COMMENT 0.082322 1) +COMMENT #379=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 28266964 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 8.90253 +COMMENT 20.908 0 -10 4.12111 0.949103 #378#) +COMMENT #380=(CScratch +COMMENT (CWidget 2 (1 #8# 2) 1 2 0 0 #245# 26688728 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.72811 1.9 +COMMENT 0.082322 1) +COMMENT #381=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670624 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Aat}II (1332)" "@N (@S)" 5 15.2338 +COMMENT -17.4233 0 -10 4.5457 0.949103 #380#)) +COMMENT (CObjectList)) +COMMENT #382=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #383=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #245# 26694424 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.88779 1.9 +COMMENT 0.082322 1) +COMMENT #384=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670624 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 8.04144 +COMMENT 24.3926 0 -10 4.62063 0.949103 #383#) +COMMENT #385=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #245# 26679936 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.7659 1.9 +COMMENT 0.082322 1) +COMMENT #386=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670624 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 9.30338 +COMMENT 19.1656 0 -10 4.62063 0.949103 #385#) +COMMENT #387=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #245# 26688168 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.830001 1.9 +COMMENT 0.082322 1) +COMMENT #388=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670608 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (4690)" "@N (@S)" 5 -12.5752 +COMMENT 6.96932 0 -10 5.12016 0.949103 #387#)) +COMMENT (CObjectList)) +COMMENT #389=(CGroupWidget +COMMENT (CWidget 3 (10 #25# 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #390=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #245# 26678176 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.72179 1.9 +COMMENT 0.082322 1) +COMMENT #391=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 20684836 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 9.25862 15.681 +COMMENT 0 -10 3.99622 0.949103 #390#) +COMMENT #392=(CScratch +COMMENT (CWidget 2 (1 #25# 2) 1 2 0 0 #245# 26693384 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.69031 1.9 +COMMENT 0.082322 1) +COMMENT #393=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670624 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (2226)" "@N (@S)" 5 9.53262 +COMMENT -20.908 0 -10 4.49575 0.949103 #392#) +COMMENT #394=(CScratch +COMMENT (CWidget 3 (1 #25# 3) 1 2 0 0 #245# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.23694 1.9 +COMMENT 0.082322 1) +COMMENT #395=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #237# 3670608 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bbs}I (3478)" "@N (@S)" 5 -12.2267 +COMMENT -6.96932 0 -10 4.49575 0.949103 #394#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #396=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #397=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3670432 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 9 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 2087857526 +COMMENT (CStringList) 1095462957 827607363 (CObList))) +FEATURES Location/Qualifiers + rep_origin 4003..4641 + /vntifkey="33" + /label=ColE1 + terminator 3775..3879 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(4700..4805) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(4831..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 4917..4938 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 498..601 + /vntifkey="30" + /label=P(lac) + primer 517..537 + /vntifkey="27" + /label=PlacF + -35_signal 545..550 + /vntifkey="48" + /label=-35 + protein_bind 581..601 + /vntifkey="31" + /label=lacO + mutation 496..497 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 608..634 + /vntifkey="21" + /label=theo28 + RBS 694..705 + /vntifkey="32" + /label=RBS + CDS 706..3768 + /vntifkey="4" + /label=lacZ + misc_feature 581..581 + /vntifkey="21" + /label=+1 + terminator 635..684 + /vntifkey="43" + /label=bgl-term + -10_signal 569..574 + /vntifkey="47" + /label=-10 + primer complement(761..781) + /vntifkey="27" + /label=lacZ-r + primer complement(734..751) + /vntifkey="27" + /label=lacZ-40 + primer 608..627 + /vntifkey="27" + /label=theo28f +BASE COUNT 1282 a 1421 c 1446 g 1255 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagagcgc aacgcaatta atgtgagtta gctcactcat taggcacccc + 541 aggctttaca ctttatgctt ccggctcgta tgttgtgtgg aattgtgagc ggataacaat + 601 tggttttgat accagccgaa aggcccttgg cagcaaaacc tgacataacc agagaatact + 661 ggtgaagtcg ggtttttttg ttttaagctt atcaggaaaa aaaaaatgca tatagatccc + 721 gtcgttttac aacgtcgtga ctgggaaaac cctggcgtta cccaacttaa tcgccttgca + 781 gcacatcccc ctttcgccag ctggcgtaat agcgaagagg cccgcaccga tcgcccttcc + 841 caacagttgc gcagcctgaa tggcgaatgg cgctttgcct ggtttccggt accagaagcg + 901 gtgccggaaa gctggctgga gtgcgatctt cctgaggccg atactgtcgt cgtcccctca + 961 aactggcaga tgcacggtta cgatgcgccc atctacacca acgtaaccta tcccattacg + 1021 gtcaatccgc cgtttgttcc cacggagaat ccgacgggtt gttactcgct cacatttaat + 1081 gttgatgaaa gctggctaca ggaaggccag acgcgaatta tttttgatgg cgttaactcg + 1141 gcgtttcatc tgtggtgcaa cgggcgctgg gtcggttacg gccaggacag tcgtttgccg + 1201 tctgaatttg acctgagcgc atttttacgc gccggagaaa accgcctcgc ggtgatggtg + 1261 ctgcgttgga gtgacggcag ttatctggaa gatcaggata tgtggcggat gagcggcatt + 1321 ttccgtgacg tctcgttgct gcataaaccg actacacaaa tcagcgattt ccatgttgcc + 1381 actcgcttta atgatgattt cagccgcgct gtactggagg ctgaagttca gatgtgcggc + 1441 gagttgcgtg actacctacg ggtaacagtt tctttatggc agggtgaaac gcaggtcgcc + 1501 agcggcaccg cgcctttcgg cggtgaaatt atcgatgagc gtggtggtta tgccgatcgc + 1561 gtcacactac gtctgaacgt cgaaaacccg aaactgtgga gcgccgaaat cccgaatctc + 1621 tatcgtgcgg tggttgaact gcacaccgcc gacggcacgc tgattgaagc agaagcctgc + 1681 gatgtcggtt tccgcgaggt gcggattgaa aatggtctgc tgctgctgaa cggcaagccg + 1741 ttgctgattc gaggcgttaa ccgtcacgag catcatcctc tgcatggtca ggtcatggat + 1801 gagcagacga tggtgcagga tatcctgctg atgaagcaga acaactttaa cgccgtgcgc + 1861 tgttcgcatt atccgaacca tccgctgtgg tacacgctgt gcgaccgcta cggcctgtat + 1921 gtggtggatg aagccaatat tgaaacccac ggcatggtgc caatgaatcg tctgaccgat + 1981 gatccgcgct ggctaccggc gatgagcgaa cgcgtaacgc gaatggtgca gcgcgatcgt + 2041 aatcacccga gtgtgatcat ctggtcgctg gggaatgaat caggccacgg cgctaatcac + 2101 gacgcgctgt atcgctggat caaatctgtc gatccttccc gcccggtgca gtatgaaggc + 2161 ggcggagccg acaccacggc caccgatatt atttgcccga tgtacgcgcg cgtggatgaa + 2221 gaccagccct tcccggctgt gccgaaatgg tccatcaaaa aatggctttc gctacctgga + 2281 gagacgcgcc cgctgatcct ttgcgaatac gcccacgcga tgggtaacag tcttggcggt + 2341 ttcgctaaat actggcaggc gtttcgtcag tatccccgtt tacagggcgg cttcgtctgg + 2401 gactgggtgg atcagtcgct gattaaatat gatgaaaacg gcaacccgtg gtcggcttac + 2461 ggcggtgatt ttggcgatac gccgaacgat cgccagttct gtatgaacgg tctggtcttt + 2521 gccgaccgca cgccgcatcc agcgctgacg gaagcaaaac accagcagca gtttttccag + 2581 ttccgtttat ccgggcaaac catcgaagtg accagcgaat acctgttccg tcatagcgat + 2641 aacgagctcc tgcactggat ggtggcgctg gatggtaagc cgctggcaag cggtgaagtg + 2701 cctctggatg tcgctccaca aggtaaacag ttgattgaac tgcctgaact accgcagccg + 2761 gagagcgccg ggcaactctg gctcacagta cgcgtagtgc aaccgaacgc gaccgcatgg + 2821 tcagaagccg ggcacatcag cgcctggcag cagtggcgtc tggcggaaaa cctcagtgtg + 2881 acgctccccg ccgcgtccca cgccatcccg catctgacca ccagcgaaat ggatttttgc + 2941 atcgagctgg gtaataagcg ttggcaattt aaccgccagt caggctttct ttcacagatg + 3001 tggattggcg ataaaaaaca actgctgacg ccgctgcgcg atcagttcac ccgtgcaccg + 3061 ctggataacg acattggcgt aagtgaagcg acccgcattg accctaacgc ctgggtcgaa + 3121 cgctggaagg cggcgggcca ttaccaggcc gaagcagcgt tgttgcagtg cacggcagat + 3181 acacttgctg atgcggtgct gattacgacc gctcacgcgt ggcagcatca ggggaaaacc + 3241 ttatttatca gccggaaaac ctaccggatt gatggtagtg gtcaaatggc gattaccgtt + 3301 gatgttgaag tggcgagcga tacaccgcat ccggcgcgga ttggcctgaa ctgccagctg + 3361 gcgcaggtag cagagcgggt aaactggctc ggattagggc cgcaagaaaa ctatcccgac + 3421 cgccttactg ccgcctgttt tgaccgctgg gatctgccat tgtcagacat gtataccccg + 3481 tacgtcttcc cgagcgaaaa cggtctgcgc tgcgggacgc gcgaattgaa ttatggccca + 3541 caccagtggc gcggcgactt ccagttcaac atcagccgct acagtcaaca gcaactgatg + 3601 gaaaccagcc atcgccatct gctgcacgcg gaagaaggca catggctgaa tatcgacggt + 3661 ttccatatgg ggattggtgg cgacgactcc tggagcccgt cagtatcggc ggaattccag + 3721 ctgagcgccg gtcgctacca ttaccagttg gtctggtgtc aaaaataatc tagaggcatc + 3781 aaataaaacg aaaggctcag tcgaaagact gggcctttcg ttttatctgt tgtttgtcgg + 3841 tgaacgctct cctgagtagg acaaatccgc cgccctagac ctaggcgttc ggctgcggcg + 3901 agcggtatca gctcactcaa aggcggtaat acggttatcc acagaatcag gggataacgc + 3961 aggaaagaac atgtgagcaa aaggccagca aaaggccagg aaccgtaaaa aggccgcgtt + 4021 gctggcgttt ttccataggc tccgcccccc tgacgagcat cacaaaaatc gacgctcaag + 4081 tcagaggtgg cgaaacccga caggactata aagataccag gcgtttcccc ctggaagctc + 4141 cctcgtgcgc tctcctgttc cgaccctgcc gcttaccgga tacctgtccg cctttctccc + 4201 ttcgggaagc gtggcgcttt ctcaatgctc acgctgtagg tatctcagtt cggtgtaggt + 4261 cgttcgctcc aagctgggct gtgtgcacga accccccgtt cagcccgacc gctgcgcctt + 4321 atccggtaac tatcgtcttg agtccaaccc ggtaagacac gacttatcgc cactggcagc + 4381 agccactggt aacaggatta gcagagcgag gtatgtaggc ggtgctacag agttcttgaa + 4441 gtggtggcct aactacggct acactagaag gacagtattt ggtatctgcg ctctgctgaa + 4501 gccagttacc ttcggaaaaa gagttggtag ctcttgatcc ggcaaacaaa ccaccgctgg + 4561 tagcggtggt ttttttgttt gcaagcagca gattacgcgc agaaaaaaag gatctcaaga + 4621 agatcctttg atcttttcta cggggtctga cgctcagtgg aacgaaaact cacgttaagg + 4681 gattttggtc atgactagtg cttggattct caccaataaa aaacgcccgg cggcaaccga + 4741 gcgttctgaa caaatccaga tggagttctg aggtcattac tggatctatc aacaggagtc + 4801 caagcgagct caaacttggt ctgacagtta ccaatgctta atcagtgagg cacctatctc + 4861 agcgatctgt ctatttcgtt catccatagt tgcctgactc cccgtcgtgt agataactac + 4921 gatacgggag ggcttaccat ctggccccag tgctgcaatg ataccgcgag acccacgctc + 4981 accggctcca gatttatcag caataaacca gccagccgga agggccgagc gcagaagtgg + 5041 tcctgcaact ttatccgcct ccatccagtc tattaattgt tgccgggaag ctagagtaag + 5101 tagttcgcca gttaatagtt tgcgcaacgt tgttgccatt gctacaggca tcgtggtgtc + 5161 acgctcgtcg tttggtatgg cttcattcag ctccggttcc caacgatcaa ggcgagttac + 5221 atgatccccc atgttgtgca aaaaagcggt tagctccttc ggtcctccga tcgttgtcag + 5281 aagtaagttg gccgcagtgt tatcactcat ggttatggca gcactgcata attctcttac + 5341 tgtcatgcca tccgtaagat gcttttctgt gactggtgag tactcaacca agtcattctg + 5401 agaa +// diff --git a/lib/VNTI files/ptheogfpuv2.1.gb b/lib/VNTI files/ptheogfpuv2.1.gb new file mode 100644 index 00000000..5df9fd26 --- /dev/null +++ b/lib/VNTI files/ptheogfpuv2.1.gb @@ -0,0 +1,1483 @@ +LOCUS ptheogfpuv 3009 bp DNA circular 15-JUL-2005 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|380112480| +COMMENT VNTDBDATE|380112480| +COMMENT LSOWNER| +COMMENT VNTNAME|ptheogfpuv2.1| +COMMENT VNTAUTHORNAME|Demo User| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "ptheogfpuv2.1" 0 3009 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3009 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 1044 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 1 1242 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1231 0 2283 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 1127 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 287 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1353 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 470 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 529 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 527 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 32 0 1756 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 2 846 0 1442 0 0 "") +COMMENT #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 2 358 0 945 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 1 2744 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 1 2435 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 200 0 305 0 2162 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 343 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1475 2113 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1475..2113") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1247 1351 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1247..1351") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2172 2277 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2172..2277)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2303 151 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2303..151)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 152 250 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(152..250)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 341 362 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(341..362)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 4 25 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "4..25") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2389 2410 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2389..2410") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 193 212 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "193..212") +COMMENT #36=(CFSignal (CObList) "P(lac)" 30 0 0 365 468 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "365..468") +COMMENT #37=(CFSignal (CObList) "PlacF" 27 0 0 384 404 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "384..404") +COMMENT #38=(CFSignal (CObList) "-35" 48 0 0 412 417 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "412..417") +COMMENT #39=(CFSignal (CObList) "lacO" 31 0 0 448 468 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "448..468") +COMMENT #40=(CFSignal (CObList) "-10" 47 0 0 446 451 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "446..451") +COMMENT #41=(CFSignal (CObList) "AG insertion" 62 0 0 363 364 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "363..364") +COMMENT #42=(CFSignal (CObList) "theo28" 21 0 0 476 502 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "476..502") +COMMENT #43=(CFSignal (CObList) "RBS" 32 0 0 512 523 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "512..523") +COMMENT #44=(CFSignal (CObList) "gfpuv" 4 0 0 524 1240 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "524..1240")) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #45=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #46=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "ptheogfpuv2.1" 2) +COMMENT 5 "" 0 4) +COMMENT #47=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'ptheogfpuv2.1'" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Demo User" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/15/05 10:48AM" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/15/05 10:48AM" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3009 bp" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #55=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 25-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) "Demo User" +COMMENT 1))) "Original Author") +COMMENT #60=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 524 (3 #44# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 524 End: 1240" 1) +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 524..1240" 1))) "gfpuv") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2303 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2303 End: 151 (Complementary)" +COMMENT 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2303..151)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #72=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 476 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 476 End: 502 " 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 476..502" 1))) "theo28") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2389 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2389 End: 2410" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2389..2410" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (2 total)") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 384 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 384 End: 404 " 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 384..404" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 4 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 4 End: 25 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 4..25" 1))) "bla-rev2") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 193 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 193 End: 212 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 193..212" 1))) "pbla-rev") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 341 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 341 End: 362 (Complementary)" +COMMENT 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(341..362)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 152 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 152 End: 250 (Complementary)" +COMMENT 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #104=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(152..250)" 1))) +COMMENT "P(bla)") +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 365 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 365 End: 468 " 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 365..468" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (2 total)") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 448 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 448 End: 468 " 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 448..468" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 512 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 512 End: 523 " 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 512..523" 1))) "RBS"))) +COMMENT "RBS (1 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1475 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1475 End: 2113" 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1475..2113" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1247 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1247 End: 1351" 1) +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #129=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1247..1351" 1))) "T1") +COMMENT #130=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2172 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2172 End: 2277 (Complementary)" +COMMENT 1) +COMMENT #132=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #133=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2172..2277)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #135=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 446 (3 #40# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 446 End: 451 " 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 446..451" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #140=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #141=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 412 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #142=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 412 End: 417 " 1) +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 412..417" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #145=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #146=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 363 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 363 End: 364 " 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "two base insertion found in sequencing" +COMMENT 1) +COMMENT #149=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 363..364" 1))) "AG insertion"))) +COMMENT "Mutation (1 total)"))) "Feature Map") +COMMENT #151=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27755200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 287 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26643856 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 846 " 1) +COMMENT #158=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1442 " 1))))) +COMMENT "AflIII: 2 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26617288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27756480 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 32 " 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 1756 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27755120 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #165=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1353 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27756240 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #168=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #169=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 1044 " 1))))) "BamHI: 1 site") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26630904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #171=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #172=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 343 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27765800 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #174=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #175=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 527 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #176=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26626896 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26632904 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26613280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 2435 (on complementary strand)" +COMMENT 1))))) "BsaI: 1 site") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26630824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #182=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 200 " 1) +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 305 " 1) +COMMENT #185=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2162 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27756160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27767720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #188=(CGroupPar +COMMENT (CParagraph 0 (10 #10# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #189=(CLinePar +COMMENT (CParagraph 0 (1 #10# 1) 1 2 2 0 191) +COMMENT " N1: 470 " 1))))) "EcoRI: 1 site") +COMMENT 1 5 "GAATTC" "CTTAAG") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27755920 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27756080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #192=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26637792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #193=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27765880 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #194=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #195=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 529 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #196=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26617368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #197=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #198=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 2744 " 1))))) "PvuI: 1 site") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #199=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27755360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #200=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #201=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1231 " 1) +COMMENT #202=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2283 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #203=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27755280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #204=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #205=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 1127 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #206=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26613360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #207=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27756400 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #208=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27756000 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #209=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #210=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 1242 " 1))))) "XbaI: 1 site") +COMMENT 1 5 "TCTAGA" "AGATCT") +COMMENT #211=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26643776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #212=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #213=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 358 " 1) +COMMENT #214=(CLinePar +COMMENT (CParagraph 0 (1 #19# 2) 1 2 2 0 191) +COMMENT " N2: 945 " 1))))) "XhoI: 2 sites") +COMMENT 1 5 "CTCGAG" "GAGCTC") +COMMENT #215=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26627776 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #216=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #217=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #218=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #219=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #220=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #221=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #222=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #223=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #224=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #225=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #226=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #227=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #228=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #229=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #230=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #231=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #232=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #233=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #234=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #235=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #236=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #237=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #238=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #239=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #240=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #241=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #242=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #243=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #244=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #245=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #246=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #247=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #248=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #249=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #250=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #251=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #252=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #253=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #254=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #255=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -280) 1 1 0 1 1 +COMMENT (mapper: 18.568 -24.957 40.0378 40.0378 0.01 10 -1 3009 3009 1 0 0) +COMMENT #256=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1063 100) +COMMENT (CObjectList +COMMENT #257=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -1087 100) +COMMENT (CObjectList +COMMENT #258=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #222# 27822868 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27627 6.27427 1 0.0214037) 0.208481) +COMMENT #259=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #219# 25222956 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "ptheogfpuv2.1" "@N" 1 0 0.871165 +COMMENT 0 -10 7.96747 1.44863 Nil) +COMMENT #260=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #218# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3009 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.12205 0.949103 Nil)) (CObjectList)) +COMMENT #261=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -529 100) +COMMENT (CObjectList +COMMENT #262=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -739 100) +COMMENT (CObjectList +COMMENT #263=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.95838 1.47396 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 41637116 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -10.0085 8.71165 0 -10 2.67247 1.12394 #263#) +COMMENT #265=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.68802 5.18283 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 24050804 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 13.7142 -15.681 0 -10 2.67247 1.12394 #265#)) +COMMENT (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1506 100) +COMMENT (CObjectList +COMMENT #268=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 1.29467 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 6750210 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -13.327 3.48466 0 -10 3.79641 1.12394 #268#) +COMMENT #270=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #221# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 5.22661 5.2829 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #271=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# -94 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "theo28" "@N" 1 +COMMENT 12.0305 -6.96932 0 -10 3.09707 1.12394 #270#)) +COMMENT (CObjectList)) +COMMENT #272=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -181 100) +COMMENT (CObjectList +COMMENT #273=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.4747 1.9 +COMMENT 0.082322 1) +COMMENT #274=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 3736008 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "PlacF" "@N" 1 +COMMENT 12.7397 3.48466 0 -10 2.54759 1.12394 #273#)) +COMMENT (CObjectList)) +COMMENT #275=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -1576 100) +COMMENT (CObjectList +COMMENT #276=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.56435 1.9 +COMMENT 0.082322 1) +COMMENT #277=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 25129372 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 9.73696 10.454 0 -10 2.59755 1.12394 #276#) +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 6.26693 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel (CWidget 0 (0 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 3.05117 22.6503 0 -10 3.72148 1.12394 #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #238# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.8729 1.9 0.082322 +COMMENT 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 268742920 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 7.59157 19.1656 0 -10 3.79641 1.12394 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -2204 100) +COMMENT (CObjectList +COMMENT #283=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.75198 5.95838 1 0.082322) 0.8 1.8 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# -1788 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 7.16545 15.681 0 -10 2.67247 1.12394 #283#) +COMMENT #285=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #233# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.2975 5.51432 1 0.082322) 0.8 1.8 0) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 21037492 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(lac)" "@N" 1 +COMMENT 13.1605 0 0 -10 2.59755 1.12394 #285#)) +COMMENT (CObjectList)) +COMMENT #287=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -1925 100) +COMMENT (CObjectList +COMMENT #288=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #223# 0 100) +COMMENT (LOGPEN 0 6 6723840) 8 1 5.34128 1.9 0.082322 +COMMENT 1) +COMMENT #289=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 26720652 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "lacO" "@N" 1 +COMMENT 12.522 -3.48466 0 -10 2.09802 1.12394 #288#)) +COMMENT (CObjectList)) +COMMENT #290=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil -599 100) +COMMENT (CObjectList +COMMENT #291=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #237# 28208280 +COMMENT 100) (LOGPEN 0 6 16711680) 8 1 5.20785 1.9 +COMMENT 0.082322 1) +COMMENT #292=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 25405036 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "RBS" "@N" 1 +COMMENT 11.9783 -8.71165 0 -10 2.09802 1.12394 #291#)) +COMMENT (CObjectList)) +COMMENT #293=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -320 100) +COMMENT (CObjectList +COMMENT #294=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #220# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.86799 3.20018 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #295=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 3736312 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -8.73044 -10.454 0 -10 2.72243 1.12394 #294#)) +COMMENT (CObjectList)) +COMMENT #296=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1715 100) +COMMENT (CObjectList +COMMENT #297=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #225# 414 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 3.45661 +COMMENT 3.67552) +COMMENT #298=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 41538356 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 6.67935 -26.1349 0 -10 1.22384 1.12394 #297#) +COMMENT #299=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #225# +COMMENT 1944545584 100) (LOGPEN 0 8 13395507) 10 +COMMENT 0.835356 1.52608 1.74707) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 21300620 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.5333 0 0 -10 1.22384 1.12394 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -669 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.34545 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel (CWidget 0 (0 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10" "@N" 1 +COMMENT 12.5355 -1.74233 0 -10 1.42365 1.12394 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -948 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.41633 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 25348812 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35" "@N" 1 +COMMENT 12.5355 1.74233 0 -10 1.42365 1.12394 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -808 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #225# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.51848 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #217# 26775572 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AG insertion" +COMMENT "@N" 1 13.5616 5.22699 0 -10 5.59471 1.12394 +COMMENT #308#)) (CObjectList))) (CObjectList)) +COMMENT #310=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1436 100) +COMMENT (CObjectList +COMMENT #311=(CGroupWidget +COMMENT (CWidget 1 (10 #1# 0) 1 2 0 0 Nil -1506 100) +COMMENT (CObjectList +COMMENT #312=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.09873 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 26403396 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bam}HI (1044)" "@N (@S)" 5 13.5203 +COMMENT -19.1656 0 -10 5.34495 0.949103 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -1227 100) +COMMENT (CObjectList +COMMENT #315=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #224# 41555336 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.68594 1.9 +COMMENT 0.082322 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 26843172 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xba}I (1242)" "@N (@S)" 5 9.552 +COMMENT -24.3926 0 -10 4.47078 0.949103 #315#)) +COMMENT (CObjectList)) +COMMENT #317=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -460 100) +COMMENT (CObjectList +COMMENT #318=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #224# 441 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.92569 1.9 +COMMENT 0.082322 1) +COMMENT #319=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 27263596 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (1127)" "@N (@S)" 5 11.5254 +COMMENT -20.908 0 -10 4.12111 0.949103 #318#)) +COMMENT (CObjectList)) +COMMENT #320=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -1855 100) +COMMENT (CObjectList +COMMENT #321=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.67693 1.9 +COMMENT 0.082322 1) +COMMENT #322=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 27469796 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (287)" "@N (@S)" 5 9.74388 +COMMENT 13.9386 0 -10 4.12111 0.949103 #321#)) +COMMENT (CObjectList)) +COMMENT #323=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1994 100) +COMMENT (CObjectList +COMMENT #324=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.45453 1.9 +COMMENT 0.082322 1) +COMMENT #325=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 27661148 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1353)" "@N (@S)" 5 7.12902 +COMMENT -27.8773 0 -10 4.5457 0.949103 #324#)) +COMMENT (CObjectList)) +COMMENT #326=(CGroupWidget +COMMENT (CWidget 1 (10 #10# 0) 1 2 0 0 Nil -1785 100) +COMMENT (CObjectList +COMMENT #327=(CScratch +COMMENT (CWidget 1 (1 #10# 1) 1 2 0 0 #224# 25922800 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.29541 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 27309068 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Eco}RI (470)" "@N (@S)" 5 13.187 +COMMENT -5.22699 0 -10 4.49575 0.949103 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -811 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.17241 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 27147724 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (529)" "@N (@S)" 5 13.3697 +COMMENT -12.1963 0 -10 3.72148 0.949103 #330#)) +COMMENT (CObjectList)) +COMMENT #332=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -951 100) +COMMENT (CObjectList +COMMENT #333=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.17658 1.9 +COMMENT 0.082322 1) +COMMENT #334=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 27579612 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (527)" "@N (@S)" 5 13.4218 +COMMENT -10.454 0 -10 4.17106 0.949103 #333#)) +COMMENT (CObjectList)) +COMMENT #335=(CGroupWidget +COMMENT (CWidget 1 (10 #21# 0) 1 2 0 0 Nil -1439 100) +COMMENT (CObjectList +COMMENT #336=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.554559 1.9 +COMMENT 0.082322 1) +COMMENT #337=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 22024476 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Pvu}I (2744)" "@N (@S)" 5 -9.08903 +COMMENT 10.454 0 -10 4.49575 0.949103 #336#)) +COMMENT (CObjectList)) +COMMENT #338=(CGroupWidget +COMMENT (CWidget 1 (10 #22# 0) 1 2 0 0 Nil -1370 100) +COMMENT (CObjectList +COMMENT #339=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.19876 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #226# 27155076 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bsa}I (2435)" "@N (@S)" 5 -13.5077 +COMMENT 5.22699 0 -10 4.42082 0.949103 #339#)) +COMMENT (CObjectList)) +COMMENT #341=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -1021 100) +COMMENT (CObjectList +COMMENT #342=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #224# 25915512 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.56018 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel (CWidget 0 (0 0) 1 2 0 0 #226# 16 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (343)" "@N (@S)" 5 10.6357 +COMMENT 8.71165 0 -10 3.99622 0.949103 #342#)) +COMMENT (CObjectList)) +COMMENT #344=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -2134 100) +COMMENT (CObjectList +COMMENT #345=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.70887 1.9 +COMMENT 0.082322 1) +COMMENT #346=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 26856948 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1231)" "@N (@S)" 5 9.61388 +COMMENT -22.6503 0 -10 4.29594 0.949103 #345#) +COMMENT #347=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.51565 1.9 +COMMENT 0.082322 1) +COMMENT #348=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27316116 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2283)" "@N (@S)" 5 -14.0996 +COMMENT 1.74233 0 -10 4.42082 0.949103 #347#)) +COMMENT (CObjectList)) +COMMENT #349=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -1090 100) +COMMENT (CObjectList +COMMENT #350=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 6.20856 1.9 +COMMENT 0.082322 1) +COMMENT #351=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27212212 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (32)" "@N (@S)" 5 4.02222 20.908 +COMMENT 0 -10 3.97125 0.949103 #350#) +COMMENT #352=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.61435 1.9 +COMMENT 0.082322 1) +COMMENT #353=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27689412 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (1756)" "@N (@S)" 5 -9.16115 +COMMENT -12.1963 0 -10 4.84542 0.949103 #352#)) +COMMENT (CObjectList)) +COMMENT #354=(CGroupWidget +COMMENT (CWidget 2 (10 #16# 0) 1 2 0 0 Nil -1021 100) +COMMENT (CObjectList +COMMENT #355=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.51152 1.9 +COMMENT 0.082322 1) +COMMENT #356=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27256596 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (846)" "@N (@S)" 5 14.7248 +COMMENT -13.9386 0 -10 4.12111 0.949103 #355#) +COMMENT #357=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.26898 1.9 +COMMENT 0.082322 1) +COMMENT #358=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27256220 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1442)" "@N (@S)" 5 4.97508 +COMMENT -29.6196 0 -10 4.5457 0.949103 #357#)) +COMMENT (CObjectList)) +COMMENT #359=(CGroupWidget +COMMENT (CWidget 2 (10 #19# 0) 1 2 0 0 Nil -2067 100) +COMMENT (CObjectList +COMMENT #360=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.52891 1.9 +COMMENT 0.082322 1) +COMMENT #361=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27652292 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (358)" "@N (@S)" 5 12.0961 +COMMENT 6.96932 0 -10 3.97125 0.949103 #360#) +COMMENT #362=(CScratch +COMMENT (CWidget 2 (1 #19# 2) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.30513 1.9 +COMMENT 0.082322 1) +COMMENT #363=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 21752660 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Xho}I (945)" "@N (@S)" 5 14.0467 +COMMENT -17.4233 0 -10 3.97125 0.949103 #362#)) +COMMENT (CObjectList)) +COMMENT #364=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1160 100) +COMMENT (CObjectList +COMMENT #365=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.85831 1.9 +COMMENT 0.082322 1) +COMMENT #366=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27896684 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (200)" "@N (@S)" 5 8.28315 +COMMENT 17.4233 0 -10 4.62063 0.949103 #365#) +COMMENT #367=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.6394 1.9 0.082322 +COMMENT 1) +COMMENT #368=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27900660 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (305)" "@N (@S)" 5 10.2365 +COMMENT 12.1963 0 -10 4.5457 0.949103 #367#) +COMMENT #369=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #224# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.76792 1.9 +COMMENT 0.082322 1) +COMMENT #370=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #216# 27970852 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2162)" "@N (@S)" 5 -14.2953 +COMMENT -1.74233 0 -10 5.04523 0.949103 #369#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #371=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil 987 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #372=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -393 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21658120 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1475..2113 + /vntifkey="33" + /label=ColE1 + terminator 1247..1351 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2172..2277) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2303..151) + /vntifkey="4" + /label=AmpR + promoter complement(152..250) + /vntifkey="30" + /label=P(bla) + primer_bind complement(341..362) + /vntifkey="28" + /label=BLI06 + primer_bind 4..25 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2389..2410 + /vntifkey="21" + /label=bla-rev? + primer_bind 193..212 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + promoter 365..468 + /vntifkey="30" + /label=P(lac) + primer 384..404 + /vntifkey="27" + /label=PlacF + -35_signal 412..417 + /vntifkey="48" + /label=-35 + protein_bind 448..468 + /vntifkey="31" + /label=lacO + -10_signal 446..451 + /vntifkey="47" + /label=-10 + mutation 363..364 + /vntifkey="62" + /label=AG\insertion + /note="two base insertion found in sequencing" + misc_feature 476..502 + /vntifkey="21" + /label=theo28 + RBS 512..523 + /vntifkey="32" + /label=RBS + CDS 524..1240 + /vntifkey="4" + /label=gfpuv +BASE COUNT 823 a 729 c 693 g 764 t +ORIGIN + 1 tgttgagatc cagttcgatg taacccactc gtgcacccaa ctgatcttca gcatctttta + 61 ctttcaccag cgtttctggg tgagcaaaaa caggaaggca aaatgccgca aaaaagggaa + 121 taagggcgac acggaaatgt tgaatactca tactcttcct ttttcaatat tattgaagca + 181 tttatcaggg ttattgtctc atgagcggat acatatttga atgtatttag aaaaataaac + 241 aaataggggt tccgcgcaca tttccccgaa aagtgccacc tgacgtctaa gaaaccatta + 301 ttatcatgac attaacctat aaaaataggc gtatcacgag gccctttcgt cttcacctcg + 361 agagcgcaac gcaattaatg tgagttagct cactcattag gcaccccagg ctttacactt + 421 tatgcttccg gctcgtatgt tgtgtggaat tgtgagcgga taacaattga attctgatac + 481 cagccgaaag gcccttggca gcaagctata aaggaaaaaa aaaatgcata aaggagaaga + 541 acttttcact ggagttgtcc caattcttgt tgaattagat ggtgatgtta atgggcacaa + 601 attttctgtc agtggagagg gtgaaggtga tgcaacatac ggaaaactta cccttaaatt + 661 tatttgcact actggaaaac tacctgttcc atggccaaca cttgtcacta ctttctctta + 721 tggtgttcaa tgcttttccc gttatccgga tcatatgaaa cggcatgact ttttcaagag + 781 tgccatgccc gaaggttatg tacaggaacg cactatatct ttcaaagatg acgggaacta + 841 caagacgcgt gctgaagtca agtttgaagg tgataccctt gttaatcgta tcgagttaaa + 901 aggtattgat tttaaagaag atggaaacat tctcggacac aaactcgagt acaactataa + 961 ctcacacaat gtatacatca cggcagacaa acaaaagaat ggaatcaaag ctaacttcaa + 1021 aattcgccac aacattgaag atggatccgt tcaactagca gaccattatc aacaaaatac + 1081 tccaattggc gatggccctg tccttttacc agacaaccat tacctgtcga cacaatctgc + 1141 cctttcgaaa gatcccaacg aaaagcgtga ccacatggtc cttcttgagt ttgtaactgc + 1201 tgctgggatt acacatggca tggatgagct ctacaaataa tctagaggca tcaaataaaa + 1261 cgaaaggctc agtcgaaaga ctgggccttt cgttttatct gttgtttgtc ggtgaacgct + 1321 ctcctgagta ggacaaatcc gccgccctag acctaggcgt tcggctgcgg cgagcggtat + 1381 cagctcactc aaaggcggta atacggttat ccacagaatc aggggataac gcaggaaaga + 1441 acatgtgagc aaaaggccag caaaaggcca ggaaccgtaa aaaggccgcg ttgctggcgt + 1501 ttttccatag gctccgcccc cctgacgagc atcacaaaaa tcgacgctca agtcagaggt + 1561 ggcgaaaccc gacaggacta taaagatacc aggcgtttcc ccctggaagc tccctcgtgc + 1621 gctctcctgt tccgaccctg ccgcttaccg gatacctgtc cgcctttctc ccttcgggaa + 1681 gcgtggcgct ttctcaatgc tcacgctgta ggtatctcag ttcggtgtag gtcgttcgct + 1741 ccaagctggg ctgtgtgcac gaaccccccg ttcagcccga ccgctgcgcc ttatccggta + 1801 actatcgtct tgagtccaac ccggtaagac acgacttatc gccactggca gcagccactg + 1861 gtaacaggat tagcagagcg aggtatgtag gcggtgctac agagttcttg aagtggtggc + 1921 ctaactacgg ctacactaga aggacagtat ttggtatctg cgctctgctg aagccagtta + 1981 ccttcggaaa aagagttggt agctcttgat ccggcaaaca aaccaccgct ggtagcggtg + 2041 gtttttttgt ttgcaagcag cagattacgc gcagaaaaaa aggatctcaa gaagatcctt + 2101 tgatcttttc tacggggtct gacgctcagt ggaacgaaaa ctcacgttaa gggattttgg + 2161 tcatgactag tgcttggatt ctcaccaata aaaaacgccc ggcggcaacc gagcgttctg + 2221 aacaaatcca gatggagttc tgaggtcatt actggatcta tcaacaggag tccaagcgag + 2281 ctcaaacttg gtctgacagt taccaatgct taatcagtga ggcacctatc tcagcgatct + 2341 gtctatttcg ttcatccata gttgcctgac tccccgtcgt gtagataact acgatacggg + 2401 agggcttacc atctggcccc agtgctgcaa tgataccgcg agacccacgc tcaccggctc + 2461 cagatttatc agcaataaac cagccagccg gaagggccga gcgcagaagt ggtcctgcaa + 2521 ctttatccgc ctccatccag tctattaatt gttgccggga agctagagta agtagttcgc + 2581 cagttaatag tttgcgcaac gttgttgcca ttgctacagg catcgtggtg tcacgctcgt + 2641 cgtttggtat ggcttcattc agctccggtt cccaacgatc aaggcgagtt acatgatccc + 2701 ccatgttgtg caaaaaagcg gttagctcct tcggtcctcc gatcgttgtc agaagtaagt + 2761 tggccgcagt gttatcactc atggttatgg cagcactgca taattctctt actgtcatgc + 2821 catccgtaag atgcttttct gtgactggtg agtactcaac caagtcattc tgagaatagt + 2881 gtatgcggcg accgagttgc tcttgcccgg cgtcaatacg ggataatacc gcgccacata + 2941 gcagaacttt aaaagtgctc atcattggaa aacgttcttc ggggcgaaaa ctctcaagga + 3001 tcttaccgc +// diff --git a/lib/VNTI files/pthiCgfp#19.gb b/lib/VNTI files/pthiCgfp#19.gb new file mode 100644 index 00000000..0372ccf1 --- /dev/null +++ b/lib/VNTI files/pthiCgfp#19.gb @@ -0,0 +1,1417 @@ +LOCUS pthiC*gfp# 3122 bp DNA circular 10-JAN-2008 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|470943841| +COMMENT VNTDBDATE|470943881| +COMMENT LSOWNER| +COMMENT VNTNAME|pthiC*gfp#19| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pthiC*gfp#19" 0 3122 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3122 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 633 0 1289 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1476 0 2529 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 1372 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1599 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 774 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 772 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2002 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 3 552 0 1091 0 1688 0 0 +COMMENT "") #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 2 711 0 2990 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 2 612 1 2681 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 2408 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 476 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1721 2359 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1493 1597 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2418 2523 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2549 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2635 2656 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "core thiC riboswitch" 21 0 0 568 719 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #37=(CFSignal (CObList) "SD" 32 0 0 759 761 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "-35?" 21 0 0 533 538 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "-10?" 21 0 0 556 561 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "gfpuv" 4 0 0 769 1485 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #41=(CFSignal (CObList) "mut" 62 0 0 559 559 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "mut" 62 0 0 603 603 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "mut" 62 0 0 611 611 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "mut" 62 0 0 690 690 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #45=(CFSignal (CObList) "mut" 62 0 0 695 695 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #46=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #47=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pthiC*gfp#19" 2) +COMMENT 5 "" 0 4) +COMMENT #48=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pthiC*gfp#19'" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 01/10/08 05:44\214\337\214\343" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 01/10/08 05:44\214\337\214\343" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3122 bp" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #56=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #58=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #60=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #61=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #65=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 769 (3 #40# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 769 End: 1485" 1))) "gfpuv") +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2549 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2549 End: 284 (Complementary)" +COMMENT 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #72=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 533 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #73=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 533 End: 538 " 1))) "-35?") +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 556 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 556 End: 561 " 1))) "-10?") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 568 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #77=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 568 End: 719 " 1))) +COMMENT "core thiC riboswitch") +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2635 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2635 End: 2656" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #83=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #91=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)"))) "Promoter Prokaryotic (1 total)") +COMMENT #101=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 759 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 759 End: 761 " 1))) "SD"))) +COMMENT "RBS (1 total)") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1721 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1721 End: 2359" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #109=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1493 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1493 End: 1597" 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2418 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2418 End: 2523 (Complementary)" +COMMENT 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #119=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #120=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #121=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 559 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 559 End: 559 " 1))) "mut") +COMMENT #123=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 603 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #124=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 603 End: 603 " 1))) "mut") +COMMENT #125=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 611 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #126=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 611 End: 611 " 1))) "mut") +COMMENT #127=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 690 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 690 End: 690 " 1))) "mut") +COMMENT #129=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 695 (3 #45# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #130=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 695 End: 695 " 1))) "mut"))) +COMMENT "Mutation (5 total)"))) "Feature Map") +COMMENT #131=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27115048 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #135=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061144 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #136=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #137=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 552 " 1) +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1091 " 1) +COMMENT #139=(CLinePar +COMMENT (CParagraph 0 (1 #16# 3) 1 2 2 0 191) +COMMENT " N3: 1688 " 1))))) +COMMENT "AflIII: 3 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #140=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061464 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #141=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27115848 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #142=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #143=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2002 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #145=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27114968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #146=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1599 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #148=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27115608 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #149=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 633 " 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1289 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27115928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #156=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #157=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 772 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061944 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #159=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061224 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #160=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #161=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #162=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 612 (on complementary strand)" +COMMENT 1) +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #22# 2) 1 2 2 0 191) +COMMENT " N2: 2681 (on complementary strand)" +COMMENT 1))))) "BsaI: 2 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #164=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061784 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #165=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #166=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2408 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27115528 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27116088 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "EcoRI: 0 sites") 1 5 "GAATTC" +COMMENT "CTTAAG") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27115288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27115448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061304 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27116008 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #175=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 774 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #177=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061544 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #178=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #179=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 711 " 1) +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #21# 2) 1 2 2 0 191) +COMMENT " N2: 2990 " 1))))) "PvuI: 2 sites") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #181=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27115208 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #182=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #183=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1476 " 1) +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2529 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27115128 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #186=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #187=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 1372 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061704 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #189=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27115768 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #190=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27115368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061384 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #192=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #193=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #194=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27061064 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #195=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #196=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #197=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #198=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #199=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #200=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #201=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #202=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #203=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #204=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #205=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #206=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #207=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #208=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #209=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #210=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #211=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #212=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #213=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #214=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #215=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #216=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #217=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #218=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #219=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #220=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #221=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #222=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #223=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #224=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #225=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #226=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #227=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #228=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #229=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #230=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #231=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #232=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #233=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #234=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -320) 1 1 0 1 1 +COMMENT (mapper: 18.9476 -23.1885 40.0378 40.0378 0.01 10 -1 3122 3122 1 0 0) +COMMENT #235=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -713 100) +COMMENT (CObjectList +COMMENT #236=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #237=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #201# 27164844 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27619 6.27419 1 0.0214037) 0.200935) +COMMENT #238=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #198# 3736288 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pthiC*gfp#19" "@N" 1 0 0.871165 +COMMENT 0 -10 7.34306 1.44863 Nil) +COMMENT #239=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #197# 26761980 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3122 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.19698 0.924127 Nil)) (CObjectList)) +COMMENT #240=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #241=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1853 100) +COMMENT (CObjectList +COMMENT #242=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #199# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.70253 1.15337 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #243=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.77154 10.454 0 -10 2.72243 1.04901 #242#) +COMMENT #244=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #199# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.2893 4.73001 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #245=(CLabel (CWidget 0 (0 0) 1 2 0 0 #196# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 11.4955 -24.3926 0 -10 2.79736 1.04901 #244#)) +COMMENT (CObjectList)) +COMMENT #246=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #247=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #204# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.980562 1.9 +COMMENT 0.082322 1) +COMMENT #248=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 393242 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.9495 6.96932 0 -10 3.97125 1.04901 +COMMENT #247#) +COMMENT #249=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 4.82846 5.13388 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #250=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 26546828 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core thiC riboswitch" "@N" 1 16.2017 -10.454 +COMMENT 0 -10 9.36615 1.04901 #249#) +COMMENT #251=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #204# 1156 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.20421 1.9 +COMMENT 0.082322 1) +COMMENT #252=(CLabel (CWidget 0 (0 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35?" "@N" 1 +COMMENT 12.4523 3.48466 0 -10 2.07304 1.04901 #251#) +COMMENT #253=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #204# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.158 1.9 0.082322 +COMMENT 1) +COMMENT #254=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 3736328 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10?" "@N" 1 +COMMENT 12.873 0 0 -10 2.07304 1.04901 #253#)) +COMMENT (CObjectList)) +COMMENT #255=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -597 100) +COMMENT (CObjectList +COMMENT #256=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.32276 1.9 +COMMENT 0.082322 1) +COMMENT #257=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 3735968 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 11.4825 8.71165 0 -10 2.59755 1.04901 #256#) +COMMENT #258=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.99991 1.9 +COMMENT 0.082322 1) +COMMENT #259=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 760 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 6.12804 20.908 0 -10 3.92129 1.04901 #258#) +COMMENT #260=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #217# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.62015 1.9 +COMMENT 0.082322 1) +COMMENT #261=(CLabel (CWidget 0 (0 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 10.0819 17.4233 0 -10 3.97125 1.04901 #260#)) +COMMENT (CObjectList)) +COMMENT #262=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #263=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #212# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.5036 5.70253 1 0.082322) 0.8 1.8 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 24783908 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 9.62392 13.9386 0 -10 2.72243 1.04901 #263#)) +COMMENT (CObjectList)) +COMMENT #265=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #266=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #216# 0 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 4.7501 1.9 0.082322 +COMMENT 1) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 3736280 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SD" "@N" 1 +COMMENT 13.6499 -17.4233 0 -10 1.34873 1.04901 #266#)) +COMMENT (CObjectList)) +COMMENT #268=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #269=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #199# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.53313 2.81711 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #270=(CLabel (CWidget 0 (0 0) 1 2 0 0 #196# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.419 -6.96932 0 -10 2.72243 1.04901 #269#)) +COMMENT (CObjectList)) +COMMENT #271=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1434 100) +COMMENT (CObjectList +COMMENT #272=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #204# 1148 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 3.06426 +COMMENT 3.27524) +COMMENT #273=(CLabel (CWidget 0 (0 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.06727 -31.3619 0 -10 1.14891 1.04901 #272#) +COMMENT #274=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #204# 720906 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 1.2036 1.41659) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 26996612 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.1999 3.48466 0 -10 1.14891 1.04901 #274#)) +COMMENT (CObjectList)) +COMMENT #276=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -1574 100) +COMMENT (CObjectList +COMMENT #277=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #204# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.15197 1.9 +COMMENT 0.082322 1) +COMMENT #278=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 24784452 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mut" "@N" 1 +COMMENT 12.7098 -1.74233 0 -10 1.7983 1.04901 #277#) +COMMENT #279=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #204# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.06356 1.9 +COMMENT 0.082322 1) +COMMENT #280=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 26433488 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mut" "@N" 1 +COMMENT 12.3913 -3.48466 0 -10 1.7983 1.04901 #279#) +COMMENT #281=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #204# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.04748 1.9 +COMMENT 0.082322 1) +COMMENT #282=(CLabel (CWidget 0 (0 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mut" "@N" 1 +COMMENT 12.3541 -5.22699 0 -10 1.7983 1.04901 #281#) +COMMENT #283=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #204# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.88874 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 24654948 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mut" "@N" 1 +COMMENT 13.401 -12.1963 0 -10 1.7983 1.04901 #283#) +COMMENT #285=(CScratch +COMMENT (CWidget 0 (3 #45# 0) 1 2 0 0 #204# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.8787 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #196# 24654692 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mut" "@N" 1 +COMMENT 13.5372 -13.9386 0 -10 1.7983 1.04901 #285#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #287=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #288=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -2132 100) +COMMENT (CObjectList +COMMENT #289=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #203# 27346304 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.51837 1.9 +COMMENT 0.082322 1) +COMMENT #290=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #205# 27012988 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (1372)" "@N (@S)" 5 7.66551 +COMMENT -27.8773 0 -10 4.37087 0.924127 #289#)) +COMMENT (CObjectList)) +COMMENT #291=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -1992 100) +COMMENT (CObjectList +COMMENT #292=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.43127 1.9 +COMMENT 0.082322 1) +COMMENT #293=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #205# 26724716 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.9474 +COMMENT 12.1963 0 -10 4.29594 0.924127 #292#)) +COMMENT (CObjectList)) +COMMENT #294=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #295=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.06225 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #205# 24780652 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1599)" "@N (@S)" 5 -4.20045 +COMMENT -13.9386 0 -10 4.84542 0.924127 #295#)) +COMMENT (CObjectList)) +COMMENT #297=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #298=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.71996 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #205# 27127548 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (774)" "@N (@S)" 5 15.0263 +COMMENT -20.908 0 -10 3.97125 0.924127 #298#)) +COMMENT (CObjectList)) +COMMENT #300=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #301=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.72398 1.9 +COMMENT 0.082322 1) +COMMENT #302=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #205# 26719004 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (772)" "@N (@S)" 5 15.234 +COMMENT -19.1656 0 -10 4.29594 0.924127 #301#)) +COMMENT (CObjectList)) +COMMENT #303=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #304=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #203# 33554432 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.2886 1.9 +COMMENT 0.082322 1) +COMMENT #305=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #205# 27012388 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 13.0302 +COMMENT 5.22699 0 -10 4.17106 0.924127 #304#)) +COMMENT (CObjectList)) +COMMENT #306=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -1437 100) +COMMENT (CObjectList +COMMENT #307=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #203# 24718032 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.31874 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #205# 25262412 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 12.1805 +COMMENT 6.96932 0 -10 4.12111 0.924127 #307#)) +COMMENT (CObjectList)) +COMMENT #309=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #310=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.00328 1.9 +COMMENT 0.082322 1) +COMMENT #311=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 24654436 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (633)" "@N (@S)" 5 14.5095 +COMMENT -8.71165 0 -10 5.09519 0.924127 #310#) +COMMENT #312=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.68514 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 24990020 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1289)" "@N (@S)" 5 10.1362 +COMMENT -26.1349 0 -10 5.56974 0.924127 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #315=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #203# 1944749780 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.3094 1.9 +COMMENT 0.082322 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 24655204 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1476)" "@N (@S)" 5 5.33186 +COMMENT -29.6196 0 -10 4.57068 0.924127 #315#) +COMMENT #317=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.19355 1.9 +COMMENT 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 24654180 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2529)" "@N (@S)" 5 -13.5458 +COMMENT 5.22699 0 -10 4.64561 0.924127 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.94365 1.9 +COMMENT 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 26716212 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 7.36957 +COMMENT 19.1656 0 -10 4.64561 0.924127 #320#) +COMMENT #322=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.25248 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 26715836 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2002)" "@N (@S)" 5 -12.3798 +COMMENT -8.71165 0 -10 5.22007 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 2 (10 #21# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #203# 441 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.84655 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 26527356 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pvu}I (711)" "@N (@S)" 5 14.786 -15.681 +COMMENT 0 -10 4.04618 0.924127 #325#) +COMMENT #327=(CScratch +COMMENT (CWidget 2 (1 #21# 2) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.267243 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 26987164 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pvu}I (2990)" "@N (@S)" 5 -6.237 +COMMENT 12.1963 0 -10 4.69556 0.924127 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 2 (10 #22# 0) 1 2 0 0 Nil -2062 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.04547 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 26697060 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (612)" "@N (@S)" 5 13.6398 +COMMENT -6.96932 0 -10 4.04618 0.924127 #330#) +COMMENT #332=(CScratch +COMMENT (CWidget 2 (1 #22# 2) 1 2 0 0 #203# 27345664 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.888132 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 26923324 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (2681)" "@N (@S)" 5 -12.0152 +COMMENT 8.71165 0 -10 4.57068 0.924127 #332#)) +COMMENT (CObjectList)) +COMMENT #334=(CGroupWidget +COMMENT (CWidget 3 (10 #16# 0) 1 2 0 0 Nil -1783 100) +COMMENT (CObjectList +COMMENT #335=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #203# +COMMENT 1944749780 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 5.16603 1.9 0.082322 1) +COMMENT #336=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 26756644 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (552)" "@N (@S)" 5 14.0601 +COMMENT 1.74233 0 -10 4.29594 0.924127 #335#) +COMMENT #337=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.083 1.9 0.082322 +COMMENT 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 26807788 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1091)" "@N (@S)" 5 13.1909 +COMMENT -22.6503 0 -10 4.69556 0.924127 #337#) +COMMENT #339=(CScratch +COMMENT (CWidget 3 (1 #16# 3) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.88341 1.9 +COMMENT 0.082322 1) +COMMENT #340=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 25057700 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1688)" "@N (@S)" 5 -6.24542 +COMMENT -12.1963 0 -10 4.74552 0.924127 #339#)) +COMMENT (CObjectList)) +COMMENT #341=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1507 100) +COMMENT (CObjectList +COMMENT #342=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.60608 1.9 +COMMENT 0.082322 1) +COMMENT #343=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 24531220 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 10.848 15.681 +COMMENT 0 -10 4.77049 0.924127 #342#) +COMMENT #344=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.3951 1.9 0.082322 +COMMENT 1) +COMMENT #345=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 26735332 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 12.3185 +COMMENT 10.454 0 -10 4.77049 0.924127 #344#) +COMMENT #346=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #203# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.43668 1.9 +COMMENT 0.082322 1) +COMMENT #347=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #195# 27199588 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2408)" "@N (@S)" 5 -14.533 +COMMENT 1.74233 0 -10 5.295 0.924127 #346#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #348=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1158 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #349=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1088 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21290056 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1721..2359 + /vntifkey="33" + /label=ColE1 + terminator 1493..1597 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2418..2523) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2549..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2635..2656 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + misc_feature 568..719 + /vntifkey="21" + /label=core\thiC\riboswitch + RBS 759..761 + /vntifkey="32" + /label=SD + misc_feature 533..538 + /vntifkey="21" + /label=-35? + misc_feature 556..561 + /vntifkey="21" + /label=-10? + CDS 769..1485 + /vntifkey="4" + /label=gfpuv + mutation 559..559 + /vntifkey="62" + /label=mut + mutation 603..603 + /vntifkey="62" + /label=mut + mutation 611..611 + /vntifkey="62" + /label=mut + mutation 690..690 + /vntifkey="62" + /label=mut + mutation 695..695 + /vntifkey="62" + /label=mut +BASE COUNT 830 a 769 c 724 g 799 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagtgctg gtgcttgacg ccgcccgcgt caaacatcct gcttgagttc + 541 tgcgctgtta acgcgtaaat tacattcaat gccccatttg cggggctaat ttcttgtcgg + 601 agagccttaa ttggctgaga ccgtttattc gggatccgcg gaacctgatc aggctaatac + 661 ctgcgaaggg aacaagagtt aatctgctac cgcaacgccc ctgcggcgat cgtctcttgc + 721 ttcatccgtc gtctgacaag ccacgtcctt aactttttgg aatgagctat gcataaagga + 781 gaagaacttt tcactggagt tgtcccaatt cttgttgaat tagatggtga tgttaatggg + 841 cacaaatttt ctgtcagtgg agagggtgaa ggtgatgcaa catacggaaa acttaccctt + 901 aaatttattt gcactactgg aaaactacct gttccatggc caacacttgt cactactttc + 961 tcttatggtg ttcaatgctt ttcccgttat ccggatcata tgaaacggca tgactttttc + 1021 aagagtgcca tgcccgaagg ttatgtacag gaacgcacta tatctttcaa agatgacggg + 1081 aactacaaga cgcgtgctga agtcaagttt gaaggtgata cccttgttaa tcgtatcgag + 1141 ttaaaaggta ttgattttaa agaagatgga aacattctcg gacacaaact tgagtacaac + 1201 tataactcac acaatgtata catcacggca gacaaacaaa agaatggaat caaagctaac + 1261 ttcaaaattc gccacaacat tgaagatgga tccgttcaac tagcagacca ttatcaacaa + 1321 aatactccaa ttggcgatgg ccctgtcctt ttaccagaca accattacct gtcgacacaa + 1381 tctgcccttt cgaaagatcc caacgaaaag cgtgaccaca tggtccttct tgagtttgta + 1441 actgctgctg ggattacaca tggcatggat gagctctaca aataaagcta gaggcatcaa + 1501 ataaaacgaa aggctcagtc gaaagactgg gcctttcgtt ttatctgttg tttgtcggtg + 1561 aacgctctcc tgagtaggac aaatccgccg ccctagacct aggcgttcgg ctgcggcgag + 1621 cggtatcagc tcactcaaag gcggtaatac ggttatccac agaatcaggg gataacgcag + 1681 gaaagaacat gtgagcaaaa ggccagcaaa aggccaggaa ccgtaaaaag gccgcgttgc + 1741 tggcgttttt ccataggctc cgcccccctg acgagcatca caaaaatcga cgctcaagtc + 1801 agaggtggcg aaacccgaca ggactataaa gataccaggc gtttccccct ggaagctccc + 1861 tcgtgcgctc tcctgttccg accctgccgc ttaccggata cctgtccgcc tttctccctt + 1921 cgggaagcgt ggcgctttct caatgctcac gctgtaggta tctcagttcg gtgtaggtcg + 1981 ttcgctccaa gctgggctgt gtgcacgaac cccccgttca gcccgaccgc tgcgccttat + 2041 ccggtaacta tcgtcttgag tccaacccgg taagacacga cttatcgcca ctggcagcag + 2101 ccactggtaa caggattagc agagcgaggt atgtaggcgg tgctacagag ttcttgaagt + 2161 ggtggcctaa ctacggctac actagaagga cagtatttgg tatctgcgct ctgctgaagc + 2221 cagttacctt cggaaaaaga gttggtagct cttgatccgg caaacaaacc accgctggta + 2281 gcggtggttt ttttgtttgc aagcagcaga ttacgcgcag aaaaaaagga tctcaagaag + 2341 atcctttgat cttttctacg gggtctgacg ctcagtggaa cgaaaactca cgttaaggga + 2401 ttttggtcat gactagtgct tggattctca ccaataaaaa acgcccggcg gcaaccgagc + 2461 gttctgaaca aatccagatg gagttctgag gtcattactg gatctatcaa caggagtcca + 2521 agcgagctca aacttggtct gacagttacc aatgcttaat cagtgaggca cctatctcag + 2581 cgatctgtct atttcgttca tccatagttg cctgactccc cgtcgtgtag ataactacga + 2641 tacgggaggg cttaccatct ggccccagtg ctgcaatgat accgcgagac ccacgctcac + 2701 cggctccaga tttatcagca ataaaccagc cagccggaag ggccgagcgc agaagtggtc + 2761 ctgcaacttt atccgcctcc atccagtcta ttaattgttg ccgggaagct agagtaagta + 2821 gttcgccagt taatagtttg cgcaacgttg ttgccattgc tacaggcatc gtggtgtcac + 2881 gctcgtcgtt tggtatggct tcattcagct ccggttccca acgatcaagg cgagttacat + 2941 gatcccccat gttgtgcaaa aaagcggtta gctccttcgg tcctccgatc gttgtcagaa + 3001 gtaagttggc cgcagtgtta tcactcatgg ttatggcagc actgcataat tctcttactg + 3061 tcatgccatc cgtaagatgc ttttctgtga ctggtgagta ctcaaccaag tcattctgag + 3121 aa +// diff --git a/lib/VNTI files/pthiCgfp#35.gb b/lib/VNTI files/pthiCgfp#35.gb new file mode 100644 index 00000000..e6246ca0 --- /dev/null +++ b/lib/VNTI files/pthiCgfp#35.gb @@ -0,0 +1,1393 @@ +LOCUS pthiC*gfp# 3122 bp DNA circular 10-JAN-2008 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|470944777| +COMMENT VNTDBDATE|470944777| +COMMENT LSOWNER| +COMMENT VNTNAME|pthiC*gfp#35| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pthiC*gfp#35" 0 3122 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3122 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 633 0 1289 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1476 0 2529 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 1372 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1599 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 774 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 772 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2002 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 3 552 0 1091 0 1688 0 0 +COMMENT "") #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 2 711 0 2990 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 2 612 1 2681 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 2408 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 476 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1721 2359 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1493 1597 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2418 2523 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2549 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2635 2656 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "core thiC riboswitch" 21 0 0 568 719 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #37=(CFSignal (CObList) "SD" 32 0 0 759 761 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "-35?" 21 0 0 533 538 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "-10?" 21 0 0 556 561 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "gfpuv" 4 0 0 769 1485 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #41=(CFSignal (CObList) "mut" 62 0 0 520 520 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #42=(CFSignal (CObList) "mut" 62 0 0 606 606 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #43=(CFSignal (CObList) "mut" 62 0 0 681 681 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #44=(CFSignal (CObList) "mut" 62 0 0 713 713 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #45=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #46=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) "pthiC*gfp#35" 2) +COMMENT 5 "" 0 4) +COMMENT #47=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pthiC*gfp#35'" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 01/10/08 05:59\214\337\214\343" 1) +COMMENT #51=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 01/10/08 05:59\214\337\214\343" 1) +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3122 bp" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #54=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #55=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #56=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #57=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #60=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #61=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 769 (3 #40# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 769 End: 1485" 1))) "gfpuv") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2549 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2549 End: 284 (Complementary)" +COMMENT 1) +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #69=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #70=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 533 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 533 End: 538 " 1))) "-35?") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 556 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 556 End: 561 " 1))) "-10?") +COMMENT #75=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 568 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 568 End: 719 " 1))) +COMMENT "core thiC riboswitch") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2635 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2635 End: 2656" 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #87=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #96=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #97=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)"))) "Promoter Prokaryotic (1 total)") +COMMENT #100=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #101=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 759 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 759 End: 761 " 1))) "SD"))) +COMMENT "RBS (1 total)") +COMMENT #103=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #104=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1721 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #105=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1721 End: 2359" 1) +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #108=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #109=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1493 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #110=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1493 End: 1597" 1) +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #114=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2418 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #115=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2418 End: 2523 (Complementary)" +COMMENT 1) +COMMENT #116=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #117=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)") +COMMENT #119=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 520 (3 #41# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 520 End: 520 " 1))) "mut") +COMMENT #122=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 606 (3 #42# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 606 End: 606 " 1))) "mut") +COMMENT #124=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 681 (3 #43# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #125=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 681 End: 681 " 1))) "mut") +COMMENT #126=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 713 (3 #44# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 713 End: 713 " 1))) "mut"))) +COMMENT "Mutation (4 total)"))) "Feature Map") +COMMENT #128=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #129=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25203512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #130=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25282520 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 552 " 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1091 " 1) +COMMENT #136=(CLinePar +COMMENT (CParagraph 0 (1 #16# 3) 1 2 2 0 191) +COMMENT " N3: 1688 " 1))))) +COMMENT "AflIII: 3 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #137=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25295824 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #138=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25204632 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #139=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #140=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2002 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #142=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25203432 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #143=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #144=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1599 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #145=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25204392 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #146=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 633 " 1) +COMMENT #148=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1289 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #149=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25281000 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #150=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #152=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25204712 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #153=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #154=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 772 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25281080 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25292864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25280280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #158=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #159=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 612 (on complementary strand)" +COMMENT 1) +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (1 #22# 2) 1 2 2 0 191) +COMMENT " N2: 2681 (on complementary strand)" +COMMENT 1))))) "BsaI: 2 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #161=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25280440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #162=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #165=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2408 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #166=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25203992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #167=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25204872 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "EcoRI: 0 sites") 1 5 "GAATTC" +COMMENT "CTTAAG") +COMMENT #168=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25203752 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25203912 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #170=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25292944 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #171=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25204792 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #172=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #173=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 774 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25280200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #175=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #176=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 711 " 1) +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (1 #21# 2) 1 2 2 0 191) +COMMENT " N2: 2990 " 1))))) "PvuI: 2 sites") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25203672 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #179=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #180=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1476 " 1) +COMMENT #181=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2529 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #182=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25203592 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #183=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #184=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 1372 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #185=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25280360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #186=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25204552 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #187=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25203832 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #188=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25295744 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #189=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #190=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #191=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 25282440 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #192=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #193=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #194=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #195=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #196=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #197=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #198=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #199=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #200=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #201=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #202=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #203=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #204=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #205=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #206=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #207=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #208=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #209=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #210=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #211=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #212=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #213=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #214=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #215=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #216=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #217=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #218=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #219=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #220=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #221=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #222=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #223=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #224=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #225=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #226=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #227=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #228=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #229=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #230=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #231=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -320) 1 1 0 1 1 +COMMENT (mapper: 18.9476 -21.4402 40.0378 40.0378 0.01 10 -1 3122 3122 1 0 0) +COMMENT #232=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #233=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -852 100) +COMMENT (CObjectList +COMMENT #234=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #198# 24613348 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27619 6.27419 1 0.0214037) 0.200935) +COMMENT #235=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #195# 24883876 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pthiC*gfp#35" "@N" 1 0 0.871165 +COMMENT 0 -10 7.34306 1.44863 Nil) +COMMENT #236=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #194# 24884788 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3122 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.19698 0.924127 Nil)) (CObjectList)) +COMMENT #237=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -1155 100) +COMMENT (CObjectList +COMMENT #238=(CGroupWidget (CWidget 4 (7 4 0) 1 2 0 0 Nil 0 100) +COMMENT (CObjectList +COMMENT #239=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.70253 1.15337 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #240=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 24886156 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.77154 10.454 0 -10 2.72243 1.04901 #239#) +COMMENT #241=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.2893 4.73001 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #242=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 21379444 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 11.4955 -24.3926 0 -10 2.79736 1.04901 #241#)) +COMMENT (CObjectList)) +COMMENT #243=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -911 100) +COMMENT (CObjectList +COMMENT #244=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.980562 1.9 +COMMENT 0.082322 1) +COMMENT #245=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 268742952 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.9495 6.96932 0 -10 3.97125 1.04901 +COMMENT #244#) +COMMENT #246=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #197# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 4.82846 5.13388 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #247=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 3801656 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core thiC riboswitch" "@N" 1 16.2017 -10.454 +COMMENT 0 -10 9.36615 1.04901 #246#) +COMMENT #248=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #201# 1156 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.20421 1.9 +COMMENT 0.082322 1) +COMMENT #249=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 21377788 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35?" "@N" 1 +COMMENT 12.873 0 0 -10 2.07304 1.04901 #248#) +COMMENT #250=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.158 1.9 0.082322 +COMMENT 1) +COMMENT #251=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 21697476 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10?" "@N" 1 +COMMENT 12.4523 -3.48466 0 -10 2.07304 1.04901 #250#)) +COMMENT (CObjectList)) +COMMENT #252=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -460 100) +COMMENT (CObjectList +COMMENT #253=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.32276 1.9 +COMMENT 0.082322 1) +COMMENT #254=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 24907372 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 11.3341 6.96932 0 -10 2.59755 1.04901 #253#) +COMMENT #255=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.99991 1.9 +COMMENT 0.082322 1) +COMMENT #256=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 6.09233 19.1656 0 -10 3.92129 1.04901 #255#) +COMMENT #257=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #214# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.62015 1.9 +COMMENT 0.082322 1) +COMMENT #258=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 268742984 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 10.0104 15.681 0 -10 3.97125 1.04901 #257#)) +COMMENT (CObjectList)) +COMMENT #259=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil 393218 100) +COMMENT (CObjectList +COMMENT #260=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #209# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.5036 5.70253 1 0.082322) 0.8 1.8 1) +COMMENT #261=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 24631100 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 9.50821 12.1963 0 -10 2.72243 1.04901 #260#)) +COMMENT (CObjectList)) +COMMENT #262=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #263=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #213# 0 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 4.7501 1.9 0.082322 +COMMENT 1) +COMMENT #264=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 24681232 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SD" "@N" 1 +COMMENT 13.6499 -17.4233 0 -10 1.34873 1.04901 #263#)) +COMMENT (CObjectList)) +COMMENT #265=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -1713 100) +COMMENT (CObjectList +COMMENT #266=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.53313 2.81711 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #267=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 26660260 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.419 -6.96932 0 -10 2.72243 1.04901 #266#)) +COMMENT (CObjectList)) +COMMENT #268=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -806 100) +COMMENT (CObjectList +COMMENT #269=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #201# 1148 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 3.06426 +COMMENT 3.27524) +COMMENT #270=(CLabel (CWidget 0 (0 0) 1 2 0 0 #193# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.06727 -31.3619 0 -10 1.14891 1.04901 #269#) +COMMENT #271=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #201# 720906 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 1.2036 1.41659) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# -946 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.1999 3.48466 0 -10 1.14891 1.04901 #271#)) +COMMENT (CObjectList)) +COMMENT #273=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #274=(CScratch +COMMENT (CWidget 0 (3 #41# 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.23033 1.9 +COMMENT 0.082322 1) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 21293028 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mut" "@N" 1 +COMMENT 12.7098 1.74233 0 -10 1.7983 1.04901 #274#) +COMMENT #276=(CScratch +COMMENT (CWidget 0 (3 #42# 0) 1 2 0 0 #201# 24718032 +COMMENT 100) (LOGPEN 0 8 13395507) 10 1 5.05753 1.9 +COMMENT 0.082322 1) +COMMENT #277=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 25037136 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mut" "@N" 1 +COMMENT 12.314 -5.22699 0 -10 1.7983 1.04901 #276#) +COMMENT #278=(CScratch +COMMENT (CWidget 0 (3 #43# 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.90683 1.9 +COMMENT 0.082322 1) +COMMENT #279=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 268742920 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mut" "@N" 1 +COMMENT 13.361 -12.1963 0 -10 1.7983 1.04901 #278#) +COMMENT #280=(CScratch +COMMENT (CWidget 0 (3 #44# 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 4.84253 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #193# 268742984 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "mut" "@N" 1 +COMMENT 13.6947 -15.681 0 -10 1.7983 1.04901 #280#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #282=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil 3801512 100) +COMMENT (CObjectList +COMMENT #283=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil 3801640 100) +COMMENT (CObjectList +COMMENT #284=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #200# 27345664 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.51837 1.9 +COMMENT 0.082322 1) +COMMENT #285=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 26660324 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (1372)" "@N (@S)" 5 7.66551 +COMMENT -27.8773 0 -10 4.37087 0.924127 #284#)) +COMMENT (CObjectList)) +COMMENT #286=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil 5439490 100) +COMMENT (CObjectList +COMMENT #287=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #200# 1401 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.43127 1.9 +COMMENT 0.082322 1) +COMMENT #288=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 24715324 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 11.8127 +COMMENT 10.454 0 -10 4.29594 0.924127 #287#)) +COMMENT (CObjectList)) +COMMENT #289=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -527 100) +COMMENT (CObjectList +COMMENT #290=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.06225 1.9 +COMMENT 0.082322 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 3801840 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1599)" "@N (@S)" 5 -4.20045 +COMMENT -13.9386 0 -10 4.84542 0.924127 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil 268634488 100) +COMMENT (CObjectList +COMMENT #293=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.71996 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel (CWidget 0 (0 0) 1 2 0 0 #202# 1 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (774)" "@N (@S)" 5 15.0263 +COMMENT -20.908 0 -10 3.97125 0.924127 #293#)) +COMMENT (CObjectList)) +COMMENT #295=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil 3801544 100) +COMMENT (CObjectList +COMMENT #296=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #200# 27346304 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.72398 1.9 +COMMENT 0.082322 1) +COMMENT #297=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 3801880 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (772)" "@N (@S)" 5 15.234 +COMMENT -19.1656 0 -10 4.29594 0.924127 #296#)) +COMMENT (CObjectList)) +COMMENT #298=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil 3801544 100) +COMMENT (CObjectList +COMMENT #299=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.2886 1.9 0.082322 +COMMENT 1) +COMMENT #300=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 24781468 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 13.6022 +COMMENT 3.48466 0 -10 4.17106 0.924127 #299#)) +COMMENT (CObjectList)) +COMMENT #301=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #302=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.31874 1.9 +COMMENT 0.082322 1) +COMMENT #303=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #202# 24829024 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 12.9779 +COMMENT 5.22699 0 -10 4.12111 0.924127 #302#)) +COMMENT (CObjectList)) +COMMENT #304=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil 1631400378 100) +COMMENT (CObjectList +COMMENT #305=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.00328 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 131089 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (633)" "@N (@S)" 5 14.5095 +COMMENT -8.71165 0 -10 5.09519 0.924127 #305#) +COMMENT #307=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.68514 1.9 +COMMENT 0.082322 1) +COMMENT #308=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 24873996 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1289)" "@N (@S)" 5 10.1362 +COMMENT -26.1349 0 -10 5.56974 0.924127 #307#)) +COMMENT (CObjectList)) +COMMENT #309=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -1364 100) +COMMENT (CObjectList +COMMENT #310=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.3094 1.9 0.082322 +COMMENT 1) +COMMENT #311=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 3801864 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1476)" "@N (@S)" 5 5.33186 +COMMENT -29.6196 0 -10 4.57068 0.924127 #310#) +COMMENT #312=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.19355 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel (CWidget 0 (0 0) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2529)" "@N (@S)" 5 -13.5458 +COMMENT 5.22699 0 -10 4.64561 0.924127 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil 3801504 100) +COMMENT (CObjectList +COMMENT #315=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.94365 1.9 +COMMENT 0.082322 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 26513964 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 7.31771 +COMMENT 17.4233 0 -10 4.64561 0.924127 #315#) +COMMENT #317=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #200# +COMMENT 1944749780 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 2.25248 1.9 0.082322 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 26462620 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2002)" "@N (@S)" 5 -12.3798 +COMMENT -8.71165 0 -10 5.22007 0.924127 #317#)) +COMMENT (CObjectList)) +COMMENT #319=(CGroupWidget +COMMENT (CWidget 2 (10 #21# 0) 1 2 0 0 Nil 3801544 100) +COMMENT (CObjectList +COMMENT #320=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #200# +COMMENT 1944749780 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 4.84655 1.9 0.082322 1) +COMMENT #321=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 24781808 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pvu}I (711)" "@N (@S)" 5 14.6925 +COMMENT -13.9386 0 -10 4.04618 0.924127 #320#) +COMMENT #322=(CScratch +COMMENT (CWidget 2 (1 #21# 2) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.267243 1.9 +COMMENT 0.082322 1) +COMMENT #323=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 393219 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pvu}I (2990)" "@N (@S)" 5 -6.237 +COMMENT 12.1963 0 -10 4.69556 0.924127 #322#)) +COMMENT (CObjectList)) +COMMENT #324=(CGroupWidget +COMMENT (CWidget 2 (10 #22# 0) 1 2 0 0 Nil 3801544 100) +COMMENT (CObjectList +COMMENT #325=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.04547 1.9 +COMMENT 0.082322 1) +COMMENT #326=(CLabel (CWidget 0 (0 0) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (612)" "@N (@S)" 5 13.6398 +COMMENT -6.96932 0 -10 4.04618 0.924127 #325#) +COMMENT #327=(CScratch +COMMENT (CWidget 2 (1 #22# 2) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.888132 1.9 +COMMENT 0.082322 1) +COMMENT #328=(CLabel (CWidget 0 (0 0) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (2681)" "@N (@S)" 5 -12.0152 +COMMENT 8.71165 0 -10 4.57068 0.924127 #327#)) +COMMENT (CObjectList)) +COMMENT #329=(CGroupWidget +COMMENT (CWidget 3 (10 #16# 0) 1 2 0 0 Nil 3801544 100) +COMMENT (CObjectList +COMMENT #330=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.16603 1.9 +COMMENT 0.082322 1) +COMMENT #331=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 1114134 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (552)" "@N (@S)" 5 14.0601 +COMMENT -1.74233 0 -10 4.29594 0.924127 #330#) +COMMENT #332=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #200# 24947352 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 4.083 1.9 +COMMENT 0.082322 1) +COMMENT #333=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 26663780 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1091)" "@N (@S)" 5 13.1909 +COMMENT -22.6503 0 -10 4.69556 0.924127 #332#) +COMMENT #334=(CScratch +COMMENT (CWidget 3 (1 #16# 3) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.88341 1.9 +COMMENT 0.082322 1) +COMMENT #335=(CLabel (CWidget 0 (0 0) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1688)" "@N (@S)" 5 -6.24542 +COMMENT -12.1963 0 -10 4.74552 0.924127 #334#)) +COMMENT (CObjectList)) +COMMENT #336=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil 3801544 100) +COMMENT (CObjectList +COMMENT #337=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.60608 1.9 +COMMENT 0.082322 1) +COMMENT #338=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 24881596 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 10.7545 +COMMENT 13.9386 0 -10 4.77049 0.924127 #337#) +COMMENT #339=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.3951 1.9 0.082322 +COMMENT 1) +COMMENT #340=(CLabel (CWidget 0 (0 0) 1 2 0 0 #192# 0 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 12.1716 +COMMENT 8.71165 0 -10 4.77049 0.924127 #339#) +COMMENT #341=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.43668 1.9 +COMMENT 0.082322 1) +COMMENT #342=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #192# 25082732 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2408)" "@N (@S)" 5 -14.533 +COMMENT 1.74233 0 -10 5.295 0.924127 #341#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #343=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -739 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #344=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil 3801544 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21598304 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1721..2359 + /vntifkey="33" + /label=ColE1 + terminator 1493..1597 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2418..2523) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2549..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2635..2656 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + misc_feature 568..719 + /vntifkey="21" + /label=core\thiC\riboswitch + RBS 759..761 + /vntifkey="32" + /label=SD + misc_feature 533..538 + /vntifkey="21" + /label=-35? + misc_feature 556..561 + /vntifkey="21" + /label=-10? + CDS 769..1485 + /vntifkey="4" + /label=gfpuv + mutation 520..520 + /vntifkey="62" + /label=mut + mutation 606..606 + /vntifkey="62" + /label=mut + mutation 681..681 + /vntifkey="62" + /label=mut + mutation 713..713 + /vntifkey="62" + /label=mut +BASE COUNT 827 a 769 c 725 g 801 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagtgctg gtgcttgacg ccgcccgcga caaacatcct gcttgagttc + 541 tgcgctgtta acgcgtaatt tacattcaat gccccatttg cggggctaat ttcttgtcgg + 601 agtgctttaa ctggctgaga ccgtttattc gggatccgcg gaacctgatc aggctaatac + 661 ctgcgaaggg aacaagagtt gatctgctat cgcatcgccc ctgcggcgat cgcctcttgc + 721 ttcatccgtc gtctgacaag ccacgtcctt aactttttgg aatgagctat gcataaagga + 781 gaagaacttt tcactggagt tgtcccaatt cttgttgaat tagatggtga tgttaatggg + 841 cacaaatttt ctgtcagtgg agagggtgaa ggtgatgcaa catacggaaa acttaccctt + 901 aaatttattt gcactactgg aaaactacct gttccatggc caacacttgt cactactttc + 961 tcttatggtg ttcaatgctt ttcccgttat ccggatcata tgaaacggca tgactttttc + 1021 aagagtgcca tgcccgaagg ttatgtacag gaacgcacta tatctttcaa agatgacggg + 1081 aactacaaga cgcgtgctga agtcaagttt gaaggtgata cccttgttaa tcgtatcgag + 1141 ttaaaaggta ttgattttaa agaagatgga aacattctcg gacacaaact tgagtacaac + 1201 tataactcac acaatgtata catcacggca gacaaacaaa agaatggaat caaagctaac + 1261 ttcaaaattc gccacaacat tgaagatgga tccgttcaac tagcagacca ttatcaacaa + 1321 aatactccaa ttggcgatgg ccctgtcctt ttaccagaca accattacct gtcgacacaa + 1381 tctgcccttt cgaaagatcc caacgaaaag cgtgaccaca tggtccttct tgagtttgta + 1441 actgctgctg ggattacaca tggcatggat gagctctaca aataaagcta gaggcatcaa + 1501 ataaaacgaa aggctcagtc gaaagactgg gcctttcgtt ttatctgttg tttgtcggtg + 1561 aacgctctcc tgagtaggac aaatccgccg ccctagacct aggcgttcgg ctgcggcgag + 1621 cggtatcagc tcactcaaag gcggtaatac ggttatccac agaatcaggg gataacgcag + 1681 gaaagaacat gtgagcaaaa ggccagcaaa aggccaggaa ccgtaaaaag gccgcgttgc + 1741 tggcgttttt ccataggctc cgcccccctg acgagcatca caaaaatcga cgctcaagtc + 1801 agaggtggcg aaacccgaca ggactataaa gataccaggc gtttccccct ggaagctccc + 1861 tcgtgcgctc tcctgttccg accctgccgc ttaccggata cctgtccgcc tttctccctt + 1921 cgggaagcgt ggcgctttct caatgctcac gctgtaggta tctcagttcg gtgtaggtcg + 1981 ttcgctccaa gctgggctgt gtgcacgaac cccccgttca gcccgaccgc tgcgccttat + 2041 ccggtaacta tcgtcttgag tccaacccgg taagacacga cttatcgcca ctggcagcag + 2101 ccactggtaa caggattagc agagcgaggt atgtaggcgg tgctacagag ttcttgaagt + 2161 ggtggcctaa ctacggctac actagaagga cagtatttgg tatctgcgct ctgctgaagc + 2221 cagttacctt cggaaaaaga gttggtagct cttgatccgg caaacaaacc accgctggta + 2281 gcggtggttt ttttgtttgc aagcagcaga ttacgcgcag aaaaaaagga tctcaagaag + 2341 atcctttgat cttttctacg gggtctgacg ctcagtggaa cgaaaactca cgttaaggga + 2401 ttttggtcat gactagtgct tggattctca ccaataaaaa acgcccggcg gcaaccgagc + 2461 gttctgaaca aatccagatg gagttctgag gtcattactg gatctatcaa caggagtcca + 2521 agcgagctca aacttggtct gacagttacc aatgcttaat cagtgaggca cctatctcag + 2581 cgatctgtct atttcgttca tccatagttg cctgactccc cgtcgtgtag ataactacga + 2641 tacgggaggg cttaccatct ggccccagtg ctgcaatgat accgcgagac ccacgctcac + 2701 cggctccaga tttatcagca ataaaccagc cagccggaag ggccgagcgc agaagtggtc + 2761 ctgcaacttt atccgcctcc atccagtcta ttaattgttg ccgggaagct agagtaagta + 2821 gttcgccagt taatagtttg cgcaacgttg ttgccattgc tacaggcatc gtggtgtcac + 2881 gctcgtcgtt tggtatggct tcattcagct ccggttccca acgatcaagg cgagttacat + 2941 gatcccccat gttgtgcaaa aaagcggtta gctccttcgg tcctccgatc gttgtcagaa + 3001 gtaagttggc cgcagtgtta tcactcatgg ttatggcagc actgcataat tctcttactg + 3061 tcatgccatc cgtaagatgc ttttctgtga ctggtgagta ctcaaccaag tcattctgag + 3121 aa +// diff --git a/lib/VNTI files/pthiCgfpuv (XhoI-).gb b/lib/VNTI files/pthiCgfpuv (XhoI-).gb new file mode 100644 index 00000000..a06f76a5 --- /dev/null +++ b/lib/VNTI files/pthiCgfpuv (XhoI-).gb @@ -0,0 +1,1298 @@ +LOCUS pthiCgfpuv 3122 bp DNA circular 10-JAN-2008 +SOURCE + ORGANISM +COMMENT This file is best viewed with a free Vector NTI Viewer: +COMMENT This file is created by Vector NTI + http://www.informaxinc.com/ +COMMENT ORIGDB|GenBank +COMMENT VNTDATE|470943967| +COMMENT VNTDBDATE|470943967| +COMMENT LSOWNER| +COMMENT VNTNAME|pthiCgfpuv* (XhoI-)| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT VNTREPLTYPE|Plasmid +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "pthiCgfpuv* (XhoI-)" 0 3122 +COMMENT (CDBMol 0 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 3 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 9 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 1 3 55) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "BamHI" "ClaI" "KpnI" "XbaI" "HindIII" "SacI" "SalI" +COMMENT "AatII" "AvrII" "EcoRI" "NsiI" "BfrBI" "ApaLI" "SmaI" "XmaI" "AflIII" +COMMENT "BmtI" "NheI" "XhoI" "ApaI" "PvuI" "BsaI" "SapI" "BspHI" "BbsI" "BglII") +COMMENT (CStringList "atg" "gtg") (CStringList "taa" "tga" "tag") +COMMENT (CObList +COMMENT #0=(COligo "tmp2-RVS [overlap]" "TTTAAGCAATTCTAGGTACCAATTG" "" 0 +COMMENT (CStringList) 0)) 1 "{(0,1),2}" 0 0 "" 0 4294967295 0 0 0 0 0 0 1 +COMMENT "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 100 10 1 1 1 1 1 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 0 1 3122 0 0 0 0 0 0 0 0) (CStringList) (CStringList) +COMMENT (CObList) (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList +COMMENT #1=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 2 633 0 1289 0 0 "") +COMMENT #2=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #3=(CRSite (CStringList) "KpnI" "ggtacc" 6 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "XbaI" "tctaga" 2 0 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "SacI" "gagctc" 6 0 2 1476 0 2529 0 0 "") +COMMENT #7=(CRSite (CStringList) "SalI" "gtcgac" 2 0 1 1372 0 0 "") +COMMENT #8=(CRSite (CStringList) "AatII" "gacgtc" 6 0 1 420 0 0 "") +COMMENT #9=(CRSite (CStringList) "AvrII" "cctagg" 2 0 1 1599 0 0 "") +COMMENT #10=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 0 0 "") +COMMENT #11=(CRSite (CStringList) "NsiI" "atgcat" 6 0 1 774 0 0 "") +COMMENT #12=(CRSite (CStringList) "BfrBI" "atgcat" 4 0 1 772 0 0 "") +COMMENT #13=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 2 165 0 2002 0 0 "") +COMMENT #14=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #15=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "") +COMMENT #16=(CRSite (CStringList) "AflIII" "acrygt" 2 0 3 552 0 1091 0 1688 0 0 +COMMENT "") #17=(CRSite (CStringList) "BmtI" "gctagc" 6 0 0 0 "") +COMMENT #18=(CRSite (CStringList) "NheI" "gctagc" 2 0 0 0 "") +COMMENT #19=(CRSite (CStringList) "XhoI" "ctcgag" 2 0 1 491 0 0 "") +COMMENT #20=(CRSite (CStringList) "ApaI" "gggccc" 6 0 0 0 "") +COMMENT #21=(CRSite (CStringList) "PvuI" "cgatcg" 5 0 2 711 0 2990 0 0 "") +COMMENT #22=(CRSite (CStringList) "BsaI" "ggtctc" 8 12 2 612 1 2681 1 0 "") +COMMENT #23=(CRSite (CStringList) "SapI" "gctcttc" 9 12 0 0 "") +COMMENT #24=(CRSite (CStringList) "BspHI" "tcatga" 2 0 3 333 0 438 0 2408 0 0 "") +COMMENT #25=(CRSite (CStringList) "BbsI" "gaagac" 9 13 1 476 1 0 "") +COMMENT #26=(CRSite (CStringList) "BglII" "agatct" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #27=(CFSignal (CObList) "ColE1" 33 0 0 1721 2359 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1602..2240") +COMMENT #28=(CFSignal (CObList) "T1" 43 0 0 1493 1597 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "1374..1478") +COMMENT #29=(CFSignal (CObList) "T0" 43 0 1 2418 2523 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2299..2404)") +COMMENT #30=(CFSignal (CObList) "AmpR" 4 0 1 2549 284 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(2430..3287)") +COMMENT #31=(CFSignal (CObList) "P(bla)" 30 0 1 285 383 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3288..3386)") +COMMENT #32=(CFSignal (CObList) "BLI06" 28 0 1 474 495 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "complement(3477..5)") +COMMENT #33=(CFSignal (CObList) "bla-rev2" 28 0 0 137 158 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3140..3161") +COMMENT #34=(CFSignal (CObList) "bla-rev?" 21 0 0 2635 2656 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "2516..2537") +COMMENT #35=(CFSignal (CObList) "pbla-rev" 28 0 0 326 345 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "3329..3348") +COMMENT #36=(CFSignal (CObList) "core thiC riboswitch" 21 0 0 568 719 0 +COMMENT (CStringList) (CStringList) 1 1 1 1 "") +COMMENT #37=(CFSignal (CObList) "SD" 32 0 0 759 761 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #38=(CFSignal (CObList) "-35?" 21 0 0 533 538 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #39=(CFSignal (CObList) "-10?" 21 0 0 556 561 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #40=(CFSignal (CObList) "gfpuv" 4 0 0 769 1485 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #41=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #42=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 1 233) +COMMENT "pthiCgfpuv* (XhoI-)" 2) 5 "" 0 4) +COMMENT #43=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #44=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA Plasmid 'pthiCgfpuv* (XhoI-)'" 1) +COMMENT #45=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #46=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 01/10/08 05:46\214\337\214\343" 1) +COMMENT #47=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 01/10/08 05:46\214\337\214\343" 1) +COMMENT #48=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 3122 bp" 1) +COMMENT #49=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #50=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Circular" 1))) "General Description") +COMMENT #51=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #52=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Original Source Database: GenBank" 1) +COMMENT #53=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Modification Date in the Original DB: 7-JUN-2005" 1))) +COMMENT "Standard Fields") +COMMENT #54=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #55=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #56=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #57=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #59=(CFolderPar +COMMENT (CGroupPar (CParagraph 4 (7 4 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #60=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 769 (3 #40# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #61=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 769 End: 1485" 1))) "gfpuv") +COMMENT #62=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2549 (3 #30# 0) 1 2 2 0 327) +COMMENT (CObjectList +COMMENT #63=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2549 End: 284 (Complementary)" +COMMENT 1) +COMMENT #64=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2430..3287)" 1))) "AmpR"))) +COMMENT "CDS (2 total)") +COMMENT #66=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #67=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 533 (3 #38# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #68=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 533 End: 538 " 1))) "-35?") +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 556 (3 #39# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 556 End: 561 " 1))) "-10?") +COMMENT #71=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 568 (3 #36# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 568 End: 719 " 1))) +COMMENT "core thiC riboswitch") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2635 (3 #34# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #74=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2635 End: 2656" 1) +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #76=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 2516..2537" 1))) "bla-rev?"))) +COMMENT "Misc. Feature (4 total)") +COMMENT #77=(CFolderPar +COMMENT (CGroupPar (CParagraph 28 (7 28 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #78=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 137 (3 #33# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 137 End: 158 " 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #81=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3140..3161" 1))) "bla-rev2") +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 326 (3 #35# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 326 End: 345 " 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "sequencing primer" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #86=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 3329..3348" 1))) "pbla-rev") +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 474 (3 #32# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 474 End: 495 (Complementary)" +COMMENT 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3477..5)" 1))) "BLI06"))) +COMMENT "Primer Binding Site (3 total)") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #92=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 285 (3 #31# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 285 End: 383 (Complementary)" +COMMENT 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #95=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(3288..3386)" 1))) +COMMENT "P(bla)"))) "Promoter Prokaryotic (1 total)") +COMMENT #96=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #97=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 759 (3 #37# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #98=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 759 End: 761 " 1))) "SD"))) +COMMENT "RBS (1 total)") +COMMENT #99=(CFolderPar +COMMENT (CGroupPar (CParagraph 33 (7 33 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #100=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1721 (3 #27# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #101=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1721 End: 2359" 1) +COMMENT #102=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1602..2240" 1))) "ColE1"))) +COMMENT "Replication Origin (1 total)") +COMMENT #104=(CFolderPar +COMMENT (CGroupPar (CParagraph 43 (7 43 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #105=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 1493 (3 #28# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #106=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 1493 End: 1597" 1) +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #108=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #109=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 1374..1478" 1))) "T1") +COMMENT #110=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 2418 (3 #29# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #111=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 2418 End: 2523 (Complementary)" +COMMENT 1) +COMMENT #112=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "transcription termination sequence" +COMMENT 1) +COMMENT #113=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #114=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " complement(2299..2404)" 1))) "T0"))) +COMMENT "Terminator (2 total)"))) "Feature Map") +COMMENT #115=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #116=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26612280 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #117=(CGroupPar +COMMENT (CParagraph 0 (10 #8# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #118=(CLinePar +COMMENT (CParagraph 0 (1 #8# 1) 1 2 2 0 191) +COMMENT " N1: 420 " 1))))) "AatII: 1 site") +COMMENT 5 1 "GACGTC" "CTGCAG") +COMMENT #119=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21036944 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #120=(CGroupPar +COMMENT (CParagraph 0 (10 #16# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #121=(CLinePar +COMMENT (CParagraph 0 (1 #16# 1) 1 2 2 0 191) +COMMENT " N1: 552 " 1) +COMMENT #122=(CLinePar +COMMENT (CParagraph 0 (1 #16# 2) 1 2 2 0 191) +COMMENT " N2: 1091 " 1) +COMMENT #123=(CLinePar +COMMENT (CParagraph 0 (1 #16# 3) 1 2 2 0 191) +COMMENT " N3: 1688 " 1))))) +COMMENT "AflIII: 3 sites") 1 5 "ACRYGT" "TGYRCA") +COMMENT #124=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21037264 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaI: 0 sites") 5 1 "GGGCCC" +COMMENT "CCCGGG") +COMMENT #125=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26572184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #126=(CGroupPar +COMMENT (CParagraph 0 (10 #13# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #127=(CLinePar +COMMENT (CParagraph 0 (1 #13# 1) 1 2 2 0 191) +COMMENT " N1: 165 " 1) +COMMENT #128=(CLinePar +COMMENT (CParagraph 0 (1 #13# 2) 1 2 2 0 191) +COMMENT " N2: 2002 " 1))))) "ApaLI: 2 sites") +COMMENT 1 5 "GTGCAC" "CACGTG") +COMMENT #129=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26733640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #130=(CGroupPar +COMMENT (CParagraph 0 (10 #9# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #131=(CLinePar +COMMENT (CParagraph 0 (1 #9# 1) 1 2 2 0 191) +COMMENT " N1: 1599 " 1))))) "AvrII: 1 site") +COMMENT 1 5 "CCTAGG" "GGATCC") +COMMENT #132=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26735640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #133=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #134=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 633 " 1) +COMMENT #135=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 1289 " 1))))) "BamHI: 2 sites") +COMMENT 1 5 "GGATCC" "CCTAGG") +COMMENT #136=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21036544 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #137=(CGroupPar +COMMENT (CParagraph 0 (10 #25# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #138=(CLinePar +COMMENT (CParagraph 0 (1 #25# 1) 1 2 2 0 191) +COMMENT " N1: 476 (on complementary strand)" +COMMENT 1))))) "BbsI: 1 site") 8 12 +COMMENT "GAAGACNNNNNNN" "CTTCTGNNNNNNN") +COMMENT #139=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26286736 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #140=(CGroupPar +COMMENT (CParagraph 0 (10 #12# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #141=(CLinePar +COMMENT (CParagraph 0 (1 #12# 1) 1 2 2 0 191) +COMMENT " N1: 772 " 1))))) "BfrBI: 1 site") +COMMENT 3 3 "ATGCAT" "TACGTA") +COMMENT #142=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21036624 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BglII: 0 sites") 1 5 "AGATCT" +COMMENT "TCTAGA") +COMMENT #143=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21037024 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "BmtI: 0 sites") 5 1 "GCTAGC" +COMMENT "CGATCG") +COMMENT #144=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26480160 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #145=(CGroupPar +COMMENT (CParagraph 0 (10 #22# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #146=(CLinePar +COMMENT (CParagraph 0 (1 #22# 1) 1 2 2 0 191) +COMMENT " N1: 612 (on complementary strand)" +COMMENT 1) +COMMENT #147=(CLinePar +COMMENT (CParagraph 0 (1 #22# 2) 1 2 2 0 191) +COMMENT " N2: 2681 (on complementary strand)" +COMMENT 1))))) "BsaI: 2 sites") 7 11 +COMMENT "GGTCTCNNNNNN" "CCAGAGNNNNNN") +COMMENT #148=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21036464 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #149=(CGroupPar +COMMENT (CParagraph 0 (10 #24# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #150=(CLinePar +COMMENT (CParagraph 0 (1 #24# 1) 1 2 2 0 191) +COMMENT " N1: 333 " 1) +COMMENT #151=(CLinePar +COMMENT (CParagraph 0 (1 #24# 2) 1 2 2 0 191) +COMMENT " N2: 438 " 1) +COMMENT #152=(CLinePar +COMMENT (CParagraph 0 (1 #24# 3) 1 2 2 0 191) +COMMENT " N3: 2408 " 1))))) "BspHI: 3 sites") +COMMENT 1 5 "TCATGA" "AGTACT") +COMMENT #153=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26612200 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #154=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26611640 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "EcoRI: 0 sites") 1 5 "GAATTC" +COMMENT "CTTAAG") +COMMENT #155=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26611960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #156=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26612120 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "KpnI: 0 sites") 5 1 "GGTACC" +COMMENT "CCATGG") +COMMENT #157=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21037104 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NheI: 0 sites") 1 5 "GCTAGC" +COMMENT "CGATCG") +COMMENT #158=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26335968 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #159=(CGroupPar +COMMENT (CParagraph 0 (10 #11# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #160=(CLinePar +COMMENT (CParagraph 0 (1 #11# 1) 1 2 2 0 191) +COMMENT " N1: 774 " 1))))) "NsiI: 1 site") 5 +COMMENT 1 "ATGCAT" "TACGTA") +COMMENT #161=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21046928 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #162=(CGroupPar +COMMENT (CParagraph 0 (10 #21# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #163=(CLinePar +COMMENT (CParagraph 0 (1 #21# 1) 1 2 2 0 191) +COMMENT " N1: 711 " 1) +COMMENT #164=(CLinePar +COMMENT (CParagraph 0 (1 #21# 2) 1 2 2 0 191) +COMMENT " N2: 2990 " 1))))) "PvuI: 2 sites") +COMMENT 4 2 "CGATCG" "GCTAGC") +COMMENT #165=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26733720 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #166=(CGroupPar +COMMENT (CParagraph 0 (10 #6# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #167=(CLinePar +COMMENT (CParagraph 0 (1 #6# 1) 1 2 2 0 191) +COMMENT " N1: 1476 " 1) +COMMENT #168=(CLinePar +COMMENT (CParagraph 0 (1 #6# 2) 1 2 2 0 191) +COMMENT " N2: 2529 " 1))))) "SacI: 2 sites") +COMMENT 5 1 "GAGCTC" "CTCGAG") +COMMENT #169=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26612360 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #170=(CGroupPar +COMMENT (CParagraph 0 (10 #7# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #171=(CLinePar +COMMENT (CParagraph 0 (1 #7# 1) 1 2 2 0 191) +COMMENT " N1: 1372 " 1))))) "SalI: 1 site") +COMMENT 1 5 "GTCGAC" "CAGCTG") +COMMENT #172=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26885512 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SapI: 0 sites") 8 11 +COMMENT "GCTCTTCNNNNN" "CGAGAAGNNNNN") +COMMENT #173=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26532808 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #174=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26612040 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XbaI: 0 sites") 1 5 "TCTAGA" +COMMENT "AGATCT") +COMMENT #175=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21037184 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #176=(CGroupPar +COMMENT (CParagraph 0 (10 #19# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #177=(CLinePar +COMMENT (CParagraph 0 (1 #19# 1) 1 2 2 0 191) +COMMENT " N1: 491 " 1))))) "XhoI: 1 site") 1 +COMMENT 5 "CTCGAG" "GAGCTC") +COMMENT #178=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 21036864 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) +COMMENT "Restriction/Methylation Map: (no more than 3 sites)")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #179=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #180=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #181=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #182=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #183=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #184=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #185=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #186=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #187=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #188=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #189=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #190=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #191=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #192=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #193=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #194=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #195=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #196=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #197=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #198=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #199=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #200=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #201=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #202=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #203=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #204=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #205=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #206=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #207=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #208=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #209=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #210=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #211=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #212=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #213=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #214=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #215=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #216=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #217=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #218=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 43.875 43.875 +COMMENT 0.1 -320) 1 1 0 1 1 +COMMENT (mapper: 18.9476 -17.9685 40.0378 40.0378 0.01 10 -1 3122 3122 1 0 0) +COMMENT #219=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -1228 100) +COMMENT (CObjectList +COMMENT #220=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #221=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #185# 27458796 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 6.27619 6.27419 1 0.0214037) 0.200935) +COMMENT #222=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #182# 24882964 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 58 22 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 1.74233 0.833333 0 "pthiCgfpuv* (XhoI-)" "@N" 1 0 +COMMENT 0.871165 0 -10 10.7648 1.44863 Nil) +COMMENT #223=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #181# 24598292 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 1.74233 0.555556 0 "3122 bp" "@L bp" 16 0 -0.871165 +COMMENT 0 -10.8 3.19698 0.924127 Nil)) (CObjectList)) +COMMENT #224=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -528 100) +COMMENT (CObjectList +COMMENT #225=(CGroupWidget +COMMENT (CWidget 4 (7 4 0) 1 2 0 0 Nil -1504 100) +COMMENT (CObjectList +COMMENT #226=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #30# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 5.70253 1.15337 1 +COMMENT 0.082322) 0.8 1.8 1) +COMMENT #227=(CLabel (CWidget 0 (0 0) 1 2 0 0 #180# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "AmpR" "@N" 1 +COMMENT -7.77154 10.454 0 -10 2.72243 1.04901 #226#) +COMMENT #228=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #40# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 3.2893 4.73001 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #229=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 24886156 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "gfpuv" "@N" 1 +COMMENT 11.4575 -20.908 0 -10 2.79736 1.04901 #228#)) +COMMENT (CObjectList)) +COMMENT #230=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -1016 100) +COMMENT (CObjectList +COMMENT #231=(CScratch +COMMENT (CWidget 0 (3 #34# 0) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 0.980562 1.9 +COMMENT 0.082322 1) +COMMENT #232=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 24881140 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev?" "@N" +COMMENT 1 -11.9495 6.96932 0 -10 3.97125 1.04901 +COMMENT #231#) +COMMENT #233=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #36# 0) 1 2 0 0 #184# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 4.82846 5.13388 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #234=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 24881596 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 +COMMENT "core thiC riboswitch" "@N" 1 16.2017 -10.454 +COMMENT 0 -10 9.36615 1.04901 #233#) +COMMENT #235=(CScratch +COMMENT (CWidget 0 (3 #38# 0) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.20421 1.9 +COMMENT 0.082322 1) +COMMENT #236=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 24882052 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-35?" "@N" 1 +COMMENT 12.7707 -1.74233 0 -10 2.07304 1.04901 #235#) +COMMENT #237=(CScratch +COMMENT (CWidget 0 (3 #39# 0) 1 2 0 0 #188# 0 100) +COMMENT (LOGPEN 0 8 13395507) 10 1 5.158 1.9 0.082322 +COMMENT 1) +COMMENT #238=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 24907372 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "-10?" "@N" 1 +COMMENT 11.9117 -5.22699 0 -10 2.07304 1.04901 #237#)) +COMMENT (CObjectList)) +COMMENT #239=(CGroupWidget +COMMENT (CWidget 28 (7 28 0) 1 2 0 0 Nil -388 100) +COMMENT (CObjectList +COMMENT #240=(CScratch +COMMENT (CWidget 0 (3 #32# 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.32276 1.9 +COMMENT 0.082322 1) +COMMENT #241=(CLabel (CWidget 0 (0 0) 1 2 0 0 #180# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "BLI06" "@N" 1 +COMMENT 12.731 3.48466 0 -10 2.59755 1.04901 #240#) +COMMENT #242=(CScratch +COMMENT (CWidget 0 (3 #33# 0) 1 2 0 0 #201# 24718032 +COMMENT 100) (LOGPEN 0 0 16711680) 1 1 5.99991 1.9 +COMMENT 0.082322 1) +COMMENT #243=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 26714156 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "bla-rev2" "@N" +COMMENT 1 5.96892 15.681 0 -10 3.92129 1.04901 #242#) +COMMENT #244=(CScratch +COMMENT (CWidget 0 (3 #35# 0) 1 2 0 0 #201# 0 100) +COMMENT (LOGPEN 0 0 16711680) 1 1 5.62015 1.9 +COMMENT 0.082322 1) +COMMENT #245=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 27005956 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "pbla-rev" "@N" +COMMENT 1 9.8011 12.1963 0 -10 3.97125 1.04901 #244#)) +COMMENT (CObjectList)) +COMMENT #246=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -876 100) +COMMENT (CObjectList +COMMENT #247=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #31# 0) 1 2 0 0 #196# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 5.5036 5.70253 1 0.082322) 0.8 1.8 1) +COMMENT #248=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 25082732 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "P(bla)" "@N" 1 +COMMENT 9.91267 8.71165 0 -10 2.72243 1.04901 #247#)) +COMMENT (CObjectList)) +COMMENT #249=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil -249 100) +COMMENT (CObjectList +COMMENT #250=(CScratch +COMMENT (CWidget 0 (3 #37# 0) 1 2 0 0 #200# 0 100) +COMMENT (LOGPEN 0 6 16711680) 8 1 4.7501 1.9 0.082322 +COMMENT 1) +COMMENT #251=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 24873996 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "SD" "@N" 1 +COMMENT 13.4848 -13.9386 0 -10 1.34873 1.04901 #250#)) +COMMENT (CObjectList)) +COMMENT #252=(CGroupWidget +COMMENT (CWidget 33 (7 33 0) 1 2 0 0 Nil -318 100) +COMMENT (CObjectList +COMMENT #253=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #27# 0) 1 2 0 0 #183# 0 100) +COMMENT (LOGPEN 0 0 3355545) 1 +COMMENT (LOGBRUSH 0 6724095 0) 1 1.53313 2.81711 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #254=(CLabel (CWidget 0 (0 0) 1 2 0 0 #180# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "ColE1" "@N" 1 +COMMENT -11.419 -6.96932 0 -10 2.72243 1.04901 #253#)) +COMMENT (CObjectList)) +COMMENT #255=(CGroupWidget +COMMENT (CWidget 43 (7 43 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #256=(CLine +COMMENT (CWidget 0 (3 #28# 0) 1 2 0 0 #188# 1148 100) +COMMENT (LOGPEN 0 8 13395507) 10 0.835356 3.06426 +COMMENT 3.27524) +COMMENT #257=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #180# 24884788 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T1" "@N" 1 +COMMENT 2.06321 -27.8773 0 -10 1.14891 1.04901 #256#) +COMMENT #258=(CLine +COMMENT (CWidget 0 (3 #29# 0) 1 2 0 0 #188# 720906 +COMMENT 100) (LOGPEN 0 8 13395507) 10 0.835356 +COMMENT 1.2036 1.41659) +COMMENT #259=(CLabel (CWidget 0 (0 0) 1 2 0 0 #180# 0 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 46 17 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 1.74233 0.666667 0 "T0" "@N" 1 +COMMENT -12.1999 3.48466 0 -10 1.14891 1.04901 #258#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #260=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -1225 100) +COMMENT (CObjectList +COMMENT #261=(CGroupWidget +COMMENT (CWidget 1 (10 #7# 0) 1 2 0 0 Nil -528 100) +COMMENT (CObjectList +COMMENT #262=(CScratch +COMMENT (CWidget 1 (1 #7# 1) 1 2 0 0 #187# 1944749780 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.51837 1.9 +COMMENT 0.082322 1) +COMMENT #263=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #189# 26732172 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Sal}I (1372)" "@N (@S)" 5 7.65188 +COMMENT -24.3926 0 -10 4.37087 0.924127 #262#)) +COMMENT (CObjectList)) +COMMENT #264=(CGroupWidget +COMMENT (CWidget 1 (10 #8# 0) 1 2 0 0 Nil -1783 100) +COMMENT (CObjectList +COMMENT #265=(CScratch +COMMENT (CWidget 1 (1 #8# 1) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.43127 1.9 +COMMENT 0.082322 1) +COMMENT #266=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #189# 26731916 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Aat}II (420)" "@N (@S)" 5 12.2442 +COMMENT 6.96932 0 -10 4.29594 0.924127 #265#)) +COMMENT (CObjectList)) +COMMENT #267=(CGroupWidget +COMMENT (CWidget 1 (10 #9# 0) 1 2 0 0 Nil -1644 100) +COMMENT (CObjectList +COMMENT #268=(CScratch +COMMENT (CWidget 1 (1 #9# 1) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.06225 1.9 +COMMENT 0.082322 1) +COMMENT #269=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #189# 26732428 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Avr}II (1599)" "@N (@S)" 5 -4.20045 +COMMENT -13.9386 0 -10 4.84542 0.924127 #268#)) +COMMENT (CObjectList)) +COMMENT #270=(CGroupWidget +COMMENT (CWidget 1 (10 #11# 0) 1 2 0 0 Nil -1086 100) +COMMENT (CObjectList +COMMENT #271=(CScratch +COMMENT (CWidget 1 (1 #11# 1) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.71996 1.9 +COMMENT 0.082322 1) +COMMENT #272=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #189# 26903636 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Nsi}I (774)" "@N (@S)" 5 14.9387 +COMMENT -17.4233 0 -10 3.97125 0.924127 #271#)) +COMMENT (CObjectList)) +COMMENT #273=(CGroupWidget +COMMENT (CWidget 1 (10 #12# 0) 1 2 0 0 Nil -667 100) +COMMENT (CObjectList +COMMENT #274=(CScratch +COMMENT (CWidget 1 (1 #12# 1) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.72398 1.9 +COMMENT 0.082322 1) +COMMENT #275=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #189# 27393644 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bfr}BI (772)" "@N (@S)" 5 15.1106 +COMMENT -15.681 0 -10 4.29594 0.924127 #274#)) +COMMENT (CObjectList)) +COMMENT #276=(CGroupWidget +COMMENT (CWidget 1 (10 #19# 0) 1 2 0 0 Nil -1435 100) +COMMENT (CObjectList +COMMENT #277=(CScratch +COMMENT (CWidget 1 (1 #19# 1) 1 2 0 0 #187# 27345664 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 5.2886 1.9 +COMMENT 0.082322 1) +COMMENT #278=(CLabel (CWidget 0 (0 0) 1 2 0 0 #189# 0 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Xho}I (491)" "@N (@S)" 5 14.023 0 0 -10 +COMMENT 4.17106 0.924127 #277#)) (CObjectList)) +COMMENT #279=(CGroupWidget +COMMENT (CWidget 1 (10 #25# 0) 1 2 0 0 Nil -600 100) +COMMENT (CObjectList +COMMENT #280=(CScratch +COMMENT (CWidget 1 (1 #25# 1) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.31874 1.9 +COMMENT 0.082322 1) +COMMENT #281=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #189# 27178964 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 128 +COMMENT "{\\i Bbs}I (476)" "@N (@S)" 5 13.8684 +COMMENT 1.74233 0 -10 4.12111 0.924127 #280#)) +COMMENT (CObjectList)) +COMMENT #282=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -1086 100) +COMMENT (CObjectList +COMMENT #283=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.00328 1.9 +COMMENT 0.082322 1) +COMMENT #284=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 26842060 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (633)" "@N (@S)" 5 14.5095 +COMMENT -8.71165 0 -10 5.09519 0.924127 #283#) +COMMENT #285=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 3.68514 1.9 +COMMENT 0.082322 1) +COMMENT #286=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 27277828 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bam}HI (1289)" "@N (@S)" 5 10.1129 +COMMENT -22.6503 0 -10 5.56974 0.924127 #285#)) +COMMENT (CObjectList)) +COMMENT #287=(CGroupWidget +COMMENT (CWidget 2 (10 #6# 0) 1 2 0 0 Nil -179 100) +COMMENT (CObjectList +COMMENT #288=(CScratch +COMMENT (CWidget 1 (1 #6# 1) 1 2 0 0 #187# 27346304 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.3094 1.9 +COMMENT 0.082322 1) +COMMENT #289=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 26628356 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (1476)" "@N (@S)" 5 5.32426 +COMMENT -26.1349 0 -10 4.57068 0.924127 #288#) +COMMENT #290=(CScratch +COMMENT (CWidget 2 (1 #6# 2) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 1.19355 1.9 +COMMENT 0.082322 1) +COMMENT #291=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 26732684 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Sac}I (2529)" "@N (@S)" 5 -13.5458 +COMMENT 5.22699 0 -10 4.64561 0.924127 #290#)) +COMMENT (CObjectList)) +COMMENT #292=(CGroupWidget +COMMENT (CWidget 2 (10 #13# 0) 1 2 0 0 Nil -737 100) +COMMENT (CObjectList +COMMENT #293=(CScratch +COMMENT (CWidget 1 (1 #13# 1) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.94365 1.9 +COMMENT 0.082322 1) +COMMENT #294=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 27325204 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (165)" "@N (@S)" 5 7.15259 +COMMENT 13.9386 0 -10 4.64561 0.924127 #293#) +COMMENT #295=(CScratch +COMMENT (CWidget 2 (1 #13# 2) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.25248 1.9 +COMMENT 0.082322 1) +COMMENT #296=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 26958796 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Apa}LI (2002)" "@N (@S)" 5 -12.3798 +COMMENT -8.71165 0 -10 5.22007 0.924127 #295#)) +COMMENT (CObjectList)) +COMMENT #297=(CGroupWidget +COMMENT (CWidget 2 (10 #21# 0) 1 2 0 0 Nil -1295 100) +COMMENT (CObjectList +COMMENT #298=(CScratch +COMMENT (CWidget 1 (1 #21# 1) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.84655 1.9 +COMMENT 0.082322 1) +COMMENT #299=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 27509868 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pvu}I (711)" "@N (@S)" 5 14.5768 +COMMENT -12.1963 0 -10 4.04618 0.924127 #298#) +COMMENT #300=(CScratch +COMMENT (CWidget 2 (1 #21# 2) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.267243 1.9 +COMMENT 0.082322 1) +COMMENT #301=(CLabel (CWidget 0 (0 0) 1 2 0 0 #179# 16 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Pvu}I (2990)" "@N (@S)" 5 -6.237 +COMMENT 12.1963 0 -10 4.69556 0.924127 #300#)) +COMMENT (CObjectList)) +COMMENT #302=(CGroupWidget +COMMENT (CWidget 2 (10 #22# 0) 1 2 0 0 Nil -458 100) +COMMENT (CObjectList +COMMENT #303=(CScratch +COMMENT (CWidget 1 (1 #22# 1) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.04547 1.9 +COMMENT 0.082322 1) +COMMENT #304=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 27058908 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (612)" "@N (@S)" 5 13.6398 +COMMENT -6.96932 0 -10 4.04618 0.924127 #303#) +COMMENT #305=(CScratch +COMMENT (CWidget 2 (1 #22# 2) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 0.888132 1.9 +COMMENT 0.082322 1) +COMMENT #306=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 393245 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsa}I (2681)" "@N (@S)" 5 -12.0152 +COMMENT 8.71165 0 -10 4.57068 0.924127 #305#)) +COMMENT (CObjectList)) +COMMENT #307=(CGroupWidget +COMMENT (CWidget 3 (10 #16# 0) 1 2 0 0 Nil -1365 100) +COMMENT (CObjectList +COMMENT #308=(CScratch +COMMENT (CWidget 1 (1 #16# 1) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.16603 1.9 +COMMENT 0.082322 1) +COMMENT #309=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 26847644 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (552)" "@N (@S)" 5 13.7416 +COMMENT -3.48466 0 -10 4.29594 0.924127 #308#) +COMMENT #310=(CScratch +COMMENT (CWidget 2 (1 #16# 2) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 4.083 1.9 0.082322 +COMMENT 1) +COMMENT #311=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 26836332 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1091)" "@N (@S)" 5 13.1318 +COMMENT -19.1656 0 -10 4.69556 0.924127 #310#) +COMMENT #312=(CScratch +COMMENT (CWidget 3 (1 #16# 3) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 2.88341 1.9 +COMMENT 0.082322 1) +COMMENT #313=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 131072 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Afl}III (1688)" "@N (@S)" 5 -6.24542 +COMMENT -12.1963 0 -10 4.74552 0.924127 #312#)) +COMMENT (CObjectList)) +COMMENT #314=(CGroupWidget +COMMENT (CWidget 3 (10 #24# 0) 1 2 0 0 Nil -1714 100) +COMMENT (CObjectList +COMMENT #315=(CScratch +COMMENT (CWidget 1 (1 #24# 1) 1 2 0 0 #187# 1156 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.60608 1.9 +COMMENT 0.082322 1) +COMMENT #316=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 27139116 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (333)" "@N (@S)" 5 10.504 10.454 +COMMENT 0 -10 4.77049 0.924127 #315#) +COMMENT #317=(CScratch +COMMENT (CWidget 2 (1 #24# 2) 1 2 0 0 #187# 0 100) +COMMENT (LOGPEN 0 6 10053171) 8 1 5.3951 1.9 0.082322 +COMMENT 1) +COMMENT #318=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 24862468 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (438)" "@N (@S)" 5 13.37 5.22699 +COMMENT 0 -10 4.77049 0.924127 #317#) +COMMENT #319=(CScratch +COMMENT (CWidget 3 (1 #24# 3) 1 2 0 0 #187# +COMMENT 1944749780 100) (LOGPEN 0 6 10053171) 8 1 +COMMENT 1.43668 1.9 0.082322 1) +COMMENT #320=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #179# 26657348 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 38 14 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 1.74233 0.555556 0 +COMMENT "{\\i Bsp}HI (2408)" "@N (@S)" 5 -14.533 +COMMENT 1.74233 0 -10 5.295 0.924127 #319#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #321=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -1856 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #322=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -1019 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 9 (CObjectList) (CObList) 1 (CObList)) (CObList) 0 +COMMENT (CStringList) 1944749780 21268568 (CObList))) +FEATURES Location/Qualifiers + rep_origin 1721..2359 + /vntifkey="33" + /label=ColE1 + terminator 1493..1597 + /vntifkey="43" + /label=T1 + /note="transcription termination sequence" + terminator complement(2418..2523) + /vntifkey="43" + /label=T0 + /note="transcription termination sequence" + CDS complement(2549..284) + /vntifkey="4" + /label=AmpR + promoter complement(285..383) + /vntifkey="30" + /label=P(bla) + primer_bind complement(474..495) + /vntifkey="28" + /label=BLI06 + primer_bind 137..158 + /vntifkey="28" + /label=bla-rev2 + misc_feature 2635..2656 + /vntifkey="21" + /label=bla-rev? + primer_bind 326..345 + /vntifkey="28" + /label=pbla-rev + /note="sequencing primer" + misc_feature 568..719 + /vntifkey="21" + /label=core\thiC\riboswitch + RBS 759..761 + /vntifkey="32" + /label=SD + misc_feature 533..538 + /vntifkey="21" + /label=-35? + misc_feature 556..561 + /vntifkey="21" + /label=-10? + CDS 769..1485 + /vntifkey="4" + /label=gfpuv +BASE COUNT 827 a 769 c 724 g 802 t +ORIGIN + 1 tagtgtatgc ggcgaccgag ttgctcttgc ccggcgtcaa tacgggataa taccgcgcca + 61 catagcagaa ctttaaaagt gctcatcatt ggaaaacgtt cttcggggcg aaaactctca + 121 aggatcttac cgctgttgag atccagttcg atgtaaccca ctcgtgcacc caactgatct + 181 tcagcatctt ttactttcac cagcgtttct gggtgagcaa aaacaggaag gcaaaatgcc + 241 gcaaaaaagg gaataagggc gacacggaaa tgttgaatac tcatactctt cctttttcaa + 301 tattattgaa gcatttatca gggttattgt ctcatgagcg gatacatatt tgaatgtatt + 361 tagaaaaata aacaaatagg ggttccgcgc acatttcccc gaaaagtgcc acctgacgtc + 421 taagaaacca ttattatcat gacattaacc tataaaaata ggcgtatcac gaggcccttt + 481 cgtcttcacc tcgagtgctg gtgcttgacg ccgcccgcgt caaacatcct gcttgagttc + 541 tgcgctgtta acgcgtaatt tacattcaat gccccatttg cggggctaat ttcttgtcgg + 601 agtgccttaa ctggctgaga ccgtttattc gggatccgcg gaacctgatc aggctaatac + 661 ctgcgaaggg aacaagagtt aatctgctat cgcatcgccc ctgcggcgat cgtctcttgc + 721 ttcatccgtc gtctgacaag ccacgtcctt aactttttgg aatgagctat gcataaagga + 781 gaagaacttt tcactggagt tgtcccaatt cttgttgaat tagatggtga tgttaatggg + 841 cacaaatttt ctgtcagtgg agagggtgaa ggtgatgcaa catacggaaa acttaccctt + 901 aaatttattt gcactactgg aaaactacct gttccatggc caacacttgt cactactttc + 961 tcttatggtg ttcaatgctt ttcccgttat ccggatcata tgaaacggca tgactttttc + 1021 aagagtgcca tgcccgaagg ttatgtacag gaacgcacta tatctttcaa agatgacggg + 1081 aactacaaga cgcgtgctga agtcaagttt gaaggtgata cccttgttaa tcgtatcgag + 1141 ttaaaaggta ttgattttaa agaagatgga aacattctcg gacacaaact tgagtacaac + 1201 tataactcac acaatgtata catcacggca gacaaacaaa agaatggaat caaagctaac + 1261 ttcaaaattc gccacaacat tgaagatgga tccgttcaac tagcagacca ttatcaacaa + 1321 aatactccaa ttggcgatgg ccctgtcctt ttaccagaca accattacct gtcgacacaa + 1381 tctgcccttt cgaaagatcc caacgaaaag cgtgaccaca tggtccttct tgagtttgta + 1441 actgctgctg ggattacaca tggcatggat gagctctaca aataaagcta gaggcatcaa + 1501 ataaaacgaa aggctcagtc gaaagactgg gcctttcgtt ttatctgttg tttgtcggtg + 1561 aacgctctcc tgagtaggac aaatccgccg ccctagacct aggcgttcgg ctgcggcgag + 1621 cggtatcagc tcactcaaag gcggtaatac ggttatccac agaatcaggg gataacgcag + 1681 gaaagaacat gtgagcaaaa ggccagcaaa aggccaggaa ccgtaaaaag gccgcgttgc + 1741 tggcgttttt ccataggctc cgcccccctg acgagcatca caaaaatcga cgctcaagtc + 1801 agaggtggcg aaacccgaca ggactataaa gataccaggc gtttccccct ggaagctccc + 1861 tcgtgcgctc tcctgttccg accctgccgc ttaccggata cctgtccgcc tttctccctt + 1921 cgggaagcgt ggcgctttct caatgctcac gctgtaggta tctcagttcg gtgtaggtcg + 1981 ttcgctccaa gctgggctgt gtgcacgaac cccccgttca gcccgaccgc tgcgccttat + 2041 ccggtaacta tcgtcttgag tccaacccgg taagacacga cttatcgcca ctggcagcag + 2101 ccactggtaa caggattagc agagcgaggt atgtaggcgg tgctacagag ttcttgaagt + 2161 ggtggcctaa ctacggctac actagaagga cagtatttgg tatctgcgct ctgctgaagc + 2221 cagttacctt cggaaaaaga gttggtagct cttgatccgg caaacaaacc accgctggta + 2281 gcggtggttt ttttgtttgc aagcagcaga ttacgcgcag aaaaaaagga tctcaagaag + 2341 atcctttgat cttttctacg gggtctgacg ctcagtggaa cgaaaactca cgttaaggga + 2401 ttttggtcat gactagtgct tggattctca ccaataaaaa acgcccggcg gcaaccgagc + 2461 gttctgaaca aatccagatg gagttctgag gtcattactg gatctatcaa caggagtcca + 2521 agcgagctca aacttggtct gacagttacc aatgcttaat cagtgaggca cctatctcag + 2581 cgatctgtct atttcgttca tccatagttg cctgactccc cgtcgtgtag ataactacga + 2641 tacgggaggg cttaccatct ggccccagtg ctgcaatgat accgcgagac ccacgctcac + 2701 cggctccaga tttatcagca ataaaccagc cagccggaag ggccgagcgc agaagtggtc + 2761 ctgcaacttt atccgcctcc atccagtcta ttaattgttg ccgggaagct agagtaagta + 2821 gttcgccagt taatagtttg cgcaacgttg ttgccattgc tacaggcatc gtggtgtcac + 2881 gctcgtcgtt tggtatggct tcattcagct ccggttccca acgatcaagg cgagttacat + 2941 gatcccccat gttgtgcaaa aaagcggtta gctccttcgg tcctccgatc gttgtcagaa + 3001 gtaagttggc cgcagtgtta tcactcatgg ttatggcagc actgcataat tctcttactg + 3061 tcatgccatc cgtaagatgc ttttctgtga ctggtgagta ctcaaccaag tcattctgag + 3121 aa +// diff --git a/lib/VNTI files/thiM riboswitch library.gb b/lib/VNTI files/thiM riboswitch library.gb new file mode 100644 index 00000000..84e36e66 --- /dev/null +++ b/lib/VNTI files/thiM riboswitch library.gb @@ -0,0 +1,780 @@ +LOCUS thiM\riboswitch\ 268 bp DNA linear 19-JUL-2007 +SOURCE + ORGANISM +COMMENT This file is created by Vector NTI + http://www.invitrogen.com/ +COMMENT VNTDATE|452376413| +COMMENT VNTDBDATE|452376413| +COMMENT LSOWNER| +COMMENT VNTNAME|thiM riboswitch library| +COMMENT VNTAUTHORNAME|Yohei Yokobayashi| +COMMENT Vector_NTI_Display_Data_(Do_Not_Edit!) +COMMENT (SXF +COMMENT (CGexDoc "thiM riboswitch library" 1 268 +COMMENT (CDBMol 1 0 1 1 1 0 0 0 0 "" "" 0 0 0 0 (CObList) (CObList) (CObList) +COMMENT (CObList) -1 "") +COMMENT (CDocSetData 1 1 0 0 0 0 "MAIN" 1 1 1 1 0 0 1 1 0 1 10 10 4294967295 50 0 +COMMENT 1 0 (CHomObj 0 0 0 3 75) +COMMENT (CWordArray 47 49 50 48 51 52 81 0 1 3 4 82 5 83 2 6 8 7 9 61 10 11 12 +COMMENT 13 14 15 16 17 18 19 84 20 85 21 22 86 87 88 23 54 62 24 89 25 26 55 91 +COMMENT 27 28 29 30 31 92 32 34 35 33 53 58 93 56 94 37 57 38 36 39 40 41 42 43 +COMMENT 95 44 59 99 96 97 45 100 46) (CWordArray) +COMMENT (CStringList "ApaLI" "AvaI" "BamHI" "ClaI" "EcoRI" "HindIII" "NcoI" +COMMENT "PstI" "SmaI" "XmaI") (CStringList "atg" "gtg") +COMMENT (CStringList "taa" "tga" "tag") (CObList) 1 "{(0,1),2}" 0 0 "" 0 +COMMENT 4294967295 0 0 0 0 0 0 0 "MAIN" 0 0 30 0 +COMMENT (CProteinMotifSearchObject 70 20 1 1 1 1 0 0 1 0 0 0 0 0)) +COMMENT (CMolPar 0 0 0 0 4294967295 1 268 0 0 0 0 0 0 0 0) (CStringList) +COMMENT (CStringList) (CObList) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (COAPar 25 250 50 0 6 4 3 7) (COAPar 25 250 50 0 6 4 3 7) +COMMENT (CObList #0=(CRSite (CStringList) "ApaLI" "gtgcac" 2 0 0 0 "") +COMMENT #1=(CRSite (CStringList) "AvaI" "cycgrg" 2 0 2 4 0 132 0 0 "") +COMMENT #2=(CRSite (CStringList) "BamHI" "ggatcc" 2 0 1 264 0 0 "") +COMMENT #3=(CRSite (CStringList) "ClaI" "atcgat" 3 0 0 0 "") +COMMENT #4=(CRSite (CStringList) "EcoRI" "gaattc" 2 0 1 116 0 0 "") +COMMENT #5=(CRSite (CStringList) "HindIII" "aagctt" 2 0 0 0 "") +COMMENT #6=(CRSite (CStringList) "NcoI" "ccatgg" 2 0 0 0 "") +COMMENT #7=(CRSite (CStringList) "PstI" "ctgcag" 6 0 0 0 "") +COMMENT #8=(CRSite (CStringList) "SmaI" "cccggg" 4 0 0 0 "") +COMMENT #9=(CRSite (CStringList) "XmaI" "cccggg" 2 0 0 0 "")) +COMMENT (CObList +COMMENT #10=(CFSignal (CObList) "P(lac)" 30 0 0 11 114 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "498..601") +COMMENT #11=(CFSignal (CObList) "PlacF" 27 0 0 30 50 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "517..537") +COMMENT #12=(CFSignal (CObList) "-35" 48 0 0 58 63 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "545..550") +COMMENT #13=(CFSignal (CObList) "lacO" 31 0 0 94 114 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "581..601") +COMMENT #14=(CFSignal (CObList) "AG insertion" 62 0 0 9 10 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "496..497") +COMMENT #15=(CFSignal (CObList) "+1" 21 0 0 94 94 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "581..581") +COMMENT #16=(CFSignal (CObList) "core riboswitch" 21 0 0 129 268 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "616..755") +COMMENT #17=(CFSignal (CObList) "orig T" 62 0 0 267 267 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "754..754") +COMMENT #18=(CFSignal (CObList) "orig G" 21 0 0 265 265 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "752..752") +COMMENT #19=(CFSignal (CObList) "-10" 47 0 0 82 87 0 (CStringList) (CStringList) +COMMENT 1 1 1 1 "569..574") +COMMENT #20=(CFSignal (CObList) "TPP aptamer" 21 0 0 129 203 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "616..690") +COMMENT #21=(CFSignal (CObList) "SD" 32 0 0 235 239 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "") +COMMENT #22=(CFSignal (CObList) "start codon" 21 0 0 246 248 0 (CStringList) +COMMENT (CStringList) 1 1 1 1 "")) (CObList) (CObList) (CObList) (CObList) +COMMENT (CObList) (CObList) +COMMENT (CTextView 0 +COMMENT #23=(CGroupPar (CParagraph 0 (0 0) 1 2 0 0 180) +COMMENT (CObjectList +COMMENT #24=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) +COMMENT "thiM riboswitch library" 2) 5 "" 0 4) +COMMENT #25=(CFolderPar +COMMENT (CGroupPar (CParagraph 1 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #26=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "DNA 'thiM riboswitch library'" 1) +COMMENT #27=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Currently local object. Original author: Yohei Yokobayashi" +COMMENT 1) +COMMENT #28=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Created: 07/19/07 08:06PM" 1) +COMMENT #29=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Last Modified: 07/19/07 08:06PM" 1) +COMMENT #30=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "length: 268 bp" 1) +COMMENT #31=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "storage type: Basic" 1) +COMMENT #32=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "form: Linear" 1))) "General Description") +COMMENT #33=(CFolderPar +COMMENT (CGroupPar (CParagraph 2 (0 0) 1 1 0 0 178) (CObjectList)) +COMMENT "Standard Fields") +COMMENT #34=(CFolderPar +COMMENT (CGroupPar (CParagraph 5 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #35=(CLinePar (CParagraph 0 (0 0) 1 2 1 0 180) +COMMENT "Yohei Yokobayashi" 1))) "Original Author") +COMMENT #36=(CRefLinePar +COMMENT (CLinePar (CParagraph 0 (0 0) 0 2 0 0 233) "Comments" 2) 1 "" +COMMENT 0 0) +COMMENT #37=(CFolderPar +COMMENT (CGroupPar (CParagraph 8 (0 0) 1 2 0 0 178) (CObjectList)) +COMMENT "Annotations") +COMMENT #38=(CFolderPar +COMMENT (CGroupPar (CParagraph 12 (6 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #39=(CFolderPar +COMMENT (CGroupPar (CParagraph 21 (7 21 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #40=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 94 (3 #15# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #41=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 94 End: 94 " 1) +COMMENT #42=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #43=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..581" 1))) "+1") +COMMENT #44=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 129 (3 #16# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #45=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 129 End: 268 " 1) +COMMENT #46=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #47=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 616..755" 1))) "core riboswitch") +COMMENT #48=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 129 (3 #20# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #49=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 129 End: 203 " 1) +COMMENT #50=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #51=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 616..690" 1))) "TPP aptamer") +COMMENT #52=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 246 (3 #22# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #53=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 246 End: 248 " 1))) +COMMENT "start codon") +COMMENT #54=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 265 (3 #18# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #55=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 265 End: 265 " 1) +COMMENT #56=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #57=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 752..752" 1))) "orig G"))) +COMMENT "Misc. Feature (5 total)") +COMMENT #58=(CFolderPar +COMMENT (CGroupPar (CParagraph 27 (7 27 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #59=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 30 (3 #11# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #60=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 30 End: 50 " 1) +COMMENT #61=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #62=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 517..537" 1))) "PlacF"))) +COMMENT "Primer (1 total)") +COMMENT #63=(CFolderPar +COMMENT (CGroupPar (CParagraph 30 (7 30 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #64=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 11 (3 #10# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #65=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 11 End: 114 " 1) +COMMENT #66=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #67=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 498..601" 1))) "P(lac)"))) +COMMENT "Promoter Prokaryotic (1 total)") +COMMENT #68=(CFolderPar +COMMENT (CGroupPar (CParagraph 31 (7 31 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #69=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 94 (3 #13# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #70=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 94 End: 114 " 1) +COMMENT #71=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #72=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 581..601" 1))) "lacO"))) +COMMENT "Protein Binding Site (1 total)") +COMMENT #73=(CFolderPar +COMMENT (CGroupPar (CParagraph 32 (7 32 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #74=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 235 (3 #21# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #75=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 235 End: 239 " 1))) "SD"))) +COMMENT "RBS (1 total)") +COMMENT #76=(CFolderPar +COMMENT (CGroupPar (CParagraph 47 (7 47 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #77=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 82 (3 #19# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #78=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 82 End: 87 " 1) +COMMENT #79=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #80=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 569..574" 1))) "-10"))) +COMMENT "-10 Signal (1 total)") +COMMENT #81=(CFolderPar +COMMENT (CGroupPar (CParagraph 48 (7 48 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #82=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 58 (3 #12# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #83=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 58 End: 63 " 1) +COMMENT #84=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #85=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 545..550" 1))) "-35"))) +COMMENT "-35 Signal (1 total)") +COMMENT #86=(CFolderPar +COMMENT (CGroupPar (CParagraph 62 (7 62 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #87=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 9 (3 #14# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #88=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 9 End: 10 " 1) +COMMENT #89=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #90=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 496..497" 1))) "AG insertion") +COMMENT #91=(CFolderPar +COMMENT (CGroupPar +COMMENT (CParagraph 267 (3 #17# 0) 1 2 2 0 194) +COMMENT (CObjectList +COMMENT #92=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Start: 267 End: 267 " 1) +COMMENT #93=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT "Original Location Description:" 1) +COMMENT #94=(CLinePar +COMMENT (CParagraph 0 (0 0) 1 2 3 0 180) +COMMENT " 754..754" 1))) "orig T"))) +COMMENT "Mutation (2 total)"))) "Feature Map") +COMMENT #95=(CFolderPar +COMMENT (CGroupPar (CParagraph 13 (0 0) 1 1 0 0 178) +COMMENT (CObjectList +COMMENT #96=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27020328 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ApaLI: 0 sites") 1 5 "GTGCAC" +COMMENT "CACGTG") +COMMENT #97=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27021448 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #98=(CGroupPar +COMMENT (CParagraph 0 (10 #1# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #99=(CLinePar +COMMENT (CParagraph 0 (1 #1# 1) 1 2 2 0 191) +COMMENT " N1: 4 " 1) +COMMENT #100=(CLinePar +COMMENT (CParagraph 0 (1 #1# 2) 1 2 2 0 191) +COMMENT " N2: 132 " 1))))) "AvaI: 2 sites") 1 5 +COMMENT "CYCGRG" "GRGCYC") +COMMENT #101=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27020168 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #102=(CGroupPar +COMMENT (CParagraph 0 (10 #2# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #103=(CLinePar +COMMENT (CParagraph 0 (1 #2# 1) 1 2 2 0 191) +COMMENT " N1: 264 " 1))))) "BamHI: 1 site") 1 +COMMENT 5 "GGATCC" "CCTAGG") +COMMENT #104=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26974960 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "ClaI: 0 sites") 2 4 "ATCGAT" +COMMENT "TAGCTA") +COMMENT #105=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27010944 (8 0) 1 1 1 0 178) +COMMENT (CObjectList +COMMENT #106=(CGroupPar +COMMENT (CParagraph 0 (10 #4# 0) 1 2 2 0 180) +COMMENT (CObjectList +COMMENT #107=(CLinePar +COMMENT (CParagraph 0 (1 #4# 1) 1 2 2 0 191) +COMMENT " N1: 116 " 1))))) "EcoRI: 1 site") 1 +COMMENT 5 "GAATTC" "CTTAAG") +COMMENT #108=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27021368 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "HindIII: 0 sites") 1 5 "AAGCTT" +COMMENT "TTCGAA") +COMMENT #109=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27011104 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "NcoI: 0 sites") 1 5 "CCATGG" +COMMENT "GGTACC") +COMMENT #110=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27110312 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "PstI: 0 sites") 5 1 "CTGCAG" +COMMENT "GACGTC") +COMMENT #111=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 26997992 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "SmaI: 0 sites") 3 3 "CCCGGG" +COMMENT "GGGCCC") +COMMENT #112=(CRSFolderPar +COMMENT (CFolderPar +COMMENT (CGroupPar (CParagraph 27021288 (8 0) 1 1 1 0 178) +COMMENT (CObjectList)) "XmaI: 0 sites") 1 5 "CCCGGG" +COMMENT "GGGCCC"))) "Restriction/Methylation Map")))) +COMMENT (CGraphView +COMMENT (CWStyleSheet +COMMENT (CObjectList +COMMENT #113=(CWidgetStyle "RSite Label" 1 (LOGPEN 0 0 13408563) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 5 +COMMENT "@N (@S)" 0) +COMMENT #114=(CWidgetStyle "Signal Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 0 0 0 0 3 2 1 34 "Arial") 0.666667 0 1 1 +COMMENT "@N" 0) +COMMENT #115=(CWidgetStyle "Molecule Label 2" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 0 1 16 +COMMENT "@L bp" 0) +COMMENT #116=(CWidgetStyle "Molecule Label 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Verdana") 0.833333 0 1 1 +COMMENT "@N" 0) +COMMENT #117=(CWidgetStyle "Shape 3" 1 (LOGPEN 0 0 3355545) 1 1 +COMMENT (LOGBRUSH 0 6724095 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #118=(CWidgetStyle "Shape 1" 1 (LOGPEN 0 0 6723840) 1 1 +COMMENT (LOGBRUSH 0 10079334 0) 0 0 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #119=(CWidgetStyle "Axis" 1 (LOGPEN 0 0 10079436) 2 1 +COMMENT (LOGBRUSH 0 13434879 0) 0 0 1 (LOGSHAPE 10 1 0 0 0)) +COMMENT #120=(CWidgetStyle "Line 2" 1 (LOGPEN 0 0 6723840) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #121=(CWidgetStyle "RSite" 1 (LOGPEN 0 0 10053171) 8 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #122=(CWidgetStyle "Short Signal" 1 (LOGPEN 0 0 13395507) 10 0 0 0 1 +COMMENT (LOGSHAPE 1 1.9 0 0 0)) +COMMENT #123=(CWidgetStyle "Uniq RSite Label" 1 (LOGPEN 0 0 153) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Georgia") 0.555556 128 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #124=(CWidgetStyle "Vanilla" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 18 "Times New Roman") 0.8 0 +COMMENT 1 2 "?" 0) +COMMENT #125=(CWidgetStyle "Mark 1" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 2 7 48 2 2 "Windings") 0.7 0 1 2 "?" +COMMENT 0) +COMMENT #126=(CWidgetStyle "Motif Label" 1 (LOGPEN 0 0 16744512) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.611111 8388608 +COMMENT 1 65535 "@N (@H)" 0) +COMMENT #127=(CWidgetStyle "Fragment Label 2" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 49 "Courier New") 1.05 0 1 48 +COMMENT "@F bp (molecule @L bp)" 0) +COMMENT #128=(CWidgetStyle "Fragment Label 1" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.91 0 1 1 +COMMENT "Fragment of @N" 0) +COMMENT #129=(CWidgetStyle "Shape 4" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 2 8388608 5) 0 0 0) +COMMENT #130=(CWidgetStyle "Shape 2" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 128 0) 0 +COMMENT 0 0) +COMMENT #131=(CWidgetStyle "Shape 0" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 0 0 0) 0 0 +COMMENT 0) +COMMENT #132=(CWidgetStyle "ORF" 1 (LOGPEN 0 0 16384) 8 0 0 0 1 +COMMENT (LOGSHAPE 7 0.2 3.41182 2.86186 0.609808)) +COMMENT #133=(CWidgetStyle "Line 4" 1 (LOGPEN 0 0 32768) 8 0 0 0 0) +COMMENT #134=(CWidgetStyle "Line 3" 1 (LOGPEN 0 0 16711680) 8 0 0 0 0) +COMMENT #135=(CWidgetStyle "Line 1" 1 (LOGPEN 0 0 16711680) 1 0 0 0 0) +COMMENT #136=(CWidgetStyle "Short Promoter" 1 (LOGPEN 0 0 128) 6 0 0 0 0) +COMMENT #137=(CWidgetStyle "Motif" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #138=(CWidgetStyle "Line 0" 1 (LOGPEN 0 0 0) 8 0 0 0 0) +COMMENT #139=(CWidgetStyle "Void" 0 0 0 0 0) +COMMENT #140=(CWidgetStyle "General Label" 1 (LOGPEN 0 0 0) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 1 3 "@T @N " 0) +COMMENT #141=(CWidgetStyle "Position" 1 (LOGPEN 0 0 0) 1 0 0 0 0) +COMMENT #142=(CWidgetStyle "Annotation" 0 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") 0.91 0 +COMMENT 0 0) +COMMENT #143=(CWidgetStyle "Position Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #144=(CWidgetStyle "Range" 1 (LOGPEN 0 0 0) 1 1 +COMMENT (LOGBRUSH 0 16777215 0) 0 0 0) +COMMENT #145=(CWidgetStyle "Range Label" 1 (LOGPEN 0 0 8388608) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 1 0 0 3 2 1 34 "Arial") 0.63 8388608 1 1 +COMMENT "@N" 0) +COMMENT #146=(CWidgetStyle "ORF Label" 1 (LOGPEN 0 0 49216) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 18 "Times New Roman") +COMMENT 0.611111 0 1 65535 "@N" 0) +COMMENT #147=(CWidgetStyle "CDS Label" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.555556 255 1 1 +COMMENT "@N" 0) +COMMENT #148=(CWidgetStyle "Shape 5" 1 (LOGPEN 0 0 0) 3 1 +COMMENT (LOGBRUSH 0 16777113 0) 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 7 48 2 50 "Arial") 0.9 0 0 1 +COMMENT (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #149=(CWidgetStyle "CDS" 1 (LOGPEN 0 0 0) 1 1 (LOGBRUSH 2 39423 3) 0 0 +COMMENT 1 (LOGSHAPE 9 1 0.8 1.8 0)) +COMMENT #150=(CWidgetStyle "Label 2" 1 (LOGPEN 0 0 4227264) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.944444 8388608 +COMMENT 1 1 "@N" 0) +COMMENT #151=(CWidgetStyle "Label 3" 1 (LOGPEN 0 0 8421376) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 700 255 0 0 0 3 2 1 34 "Arial") 0.833333 255 1 +COMMENT 5 "@N (@S)" 0) +COMMENT #152=(CWidgetStyle "Label 4" 1 (LOGPEN 0 0 8437824) 1 0 1 +COMMENT (LOGFONT 0 0 0 0 400 0 0 0 0 3 2 1 34 "Arial") 0.722222 0 1 5 +COMMENT "@N (@S)" 0)) 0.164644 1.74233 0.164644 2.53336 +COMMENT (70 (CShapeMapEntry 0 "Unique RSite" 1 "Uniq RSite Label") 67 +COMMENT (CShapeMapEntry 0 "ORF" 0 "ORF Label")) 40.0378 40.0378 39 39 0.1 -268) +COMMENT 1 0 1 0 0 (mapper: 19.6092 -12.0079 39 39 0.01 10 14 268 268 1 0 1) +COMMENT #153=(CGroupWidget (CWidget 0 (0 0) 1 2 0 0 Nil -223 100) +COMMENT (CObjectList +COMMENT #154=(CGroupWidget (CWidget 1 (0 0) 1 2 0 0 Nil -94 100) +COMMENT (CObjectList +COMMENT #155=(CAxis +COMMENT (CWideLine +COMMENT (CWidget 0 (0 0) 1 2 0 0 #119# 27281588 0) +COMMENT (LOGPEN 0 0 10079436) 2 (LOGBRUSH 0 13434879 0) 1 +COMMENT 0.0144074 0.0124074 1 0.0214037) 2.34074) +COMMENT #156=(CLabel +COMMENT (CWidget 1001 (0 0) 1 2 0 0 #116# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 41 15 0 0 400 0 0 0 0 3 2 1 34 "Verdana") +COMMENT 2.53336 0.833333 0 "thiM riboswitch library" "@N" 1 +COMMENT 0 0.5 0 -2.91312 8.69231 1.07692 Nil) +COMMENT #157=(CLabel +COMMENT (CWidget 1002 (0 0) 1 2 0 0 #115# 3736128 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 27 10 0 0 400 0 0 0 0 3 2 1 18 "Georgia") +COMMENT 2.53336 0.555556 0 "268 bp" "@L bp" 16 0 -0.8 0 +COMMENT -4.1798 1.74359 0.615385 Nil)) (CObjectList)) +COMMENT #158=(CGroupWidget (CWidget 10 (6 0) 1 2 0 0 Nil -242 100) +COMMENT (CObjectList +COMMENT #159=(CGroupWidget +COMMENT (CWidget 21 (7 21 0) 1 2 0 0 Nil -246 100) +COMMENT (CObjectList +COMMENT #160=(CScratch +COMMENT (CWidget 0 (3 #15# 0) 1 2 0 0 #122# 1114128 +COMMENT 100) (LOGPEN 0 6 13395507) 10 1 4.0963 1.9 +COMMENT 0.082322 1) +COMMENT #161=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #114# 440509466 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "+1" "@N" 1 0 0 +COMMENT -5.44622 3.45752 0.871795 0.820513 #160#) +COMMENT #162=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #16# 0) 1 2 0 0 #118# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 0 3.27704 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #163=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #114# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 +COMMENT "core riboswitch" "@N" 1 0 0 9.56526 8.52424 +COMMENT 5.30769 0.820513 #162#) +COMMENT #164=(CScratch +COMMENT (CWidget 0 (3 #18# 0) 1 2 0 0 #122# 1114128 +COMMENT 100) (LOGPEN 0 6 13395507) 10 1 0.0936296 +COMMENT 1.9 0.082322 1) +COMMENT #165=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #114# 20259172 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "orig G" "@N" 1 +COMMENT 0 0 15.0664 4.7242 2.10256 0.820513 #164#) +COMMENT #166=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #20# 0) 1 2 0 0 #118# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 1.52148 +COMMENT 3.27704 1 0.082322) 0.8 1.8 0) +COMMENT #167=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #114# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "TPP aptamer" +COMMENT "@N" 1 0 0 5.55441 9.79092 4.28205 0.820513 +COMMENT #166#) +COMMENT #168=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #22# 0) 1 2 0 0 #118# 0 100) +COMMENT (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 0.835356 0.468148 +COMMENT 0.53837 1 0.082322) 0.8 1.8 0) +COMMENT #169=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #114# 3736088 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "start codon" +COMMENT "@N" 1 0 0 14.029 7.25756 3.79487 0.820513 +COMMENT #168#)) (CObjectList)) +COMMENT #170=(CGroupWidget +COMMENT (CWidget 27 (7 27 0) 1 2 0 0 Nil -143 100) +COMMENT (CObjectList +COMMENT #171=(CPrimerArrow +COMMENT (CLine +COMMENT (CWidget 0 (3 #11# 0) 1 2 0 0 #120# 1242 100) +COMMENT (LOGPEN 0 6 6723840) 8 1.16464 5.10281 +COMMENT 5.59437) 0.4 0.082322 1.8 1.8 0) +COMMENT #172=(CLabel (CWidget 0 (0 0) 1 2 0 0 #114# 1 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "PlacF" "@N" 1 0 +COMMENT 0 -11.3877 3.45752 1.94872 0.820513 #171#)) +COMMENT (CObjectList)) +COMMENT #173=(CGroupWidget +COMMENT (CWidget 30 (7 30 0) 1 2 0 0 Nil -143 100) +COMMENT (CObjectList +COMMENT #174=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #10# 0) 1 2 0 0 #130# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 0 128 0) 0.835356 +COMMENT 3.60474 6.03911 1 0.082322) 0.8 1.8 0) +COMMENT #175=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #114# 19338396 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "P(lac)" "@N" 1 +COMMENT 0 0 -9.11541 4.7242 1.94872 0.820513 #174#)) +COMMENT (CObjectList)) +COMMENT #176=(CGroupWidget +COMMENT (CWidget 31 (7 31 0) 1 2 0 0 Nil -197 100) +COMMENT (CObjectList +COMMENT #177=(CLine +COMMENT (CWidget 0 (3 #13# 0) 1 2 0 0 #120# 720906 +COMMENT 100) (LOGPEN 0 6 6723840) 8 0.670712 3.60474 +COMMENT 4.0963) +COMMENT #178=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #114# 3736272 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "lacO" "@N" 1 0 +COMMENT 0 -4.75761 4.7242 1.61538 0.820513 #177#)) +COMMENT (CObjectList)) +COMMENT #179=(CGroupWidget +COMMENT (CWidget 32 (7 32 0) 1 2 0 0 Nil -197 100) +COMMENT (CObjectList +COMMENT #180=(CLine +COMMENT (CWidget 0 (3 #21# 0) 1 2 0 0 #134# +COMMENT 1944545584 100) (LOGPEN 0 6 16711680) 8 +COMMENT 0.835356 0.678815 0.795852) +COMMENT #181=(CLabel (CWidget 0 (0 0) 1 2 0 0 #114# 2 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "SD" "@N" 1 0 0 +COMMENT 11.5552 3.45752 1 0.820513 #180#)) +COMMENT (CObjectList)) +COMMENT #182=(CGroupWidget +COMMENT (CWidget 47 (7 47 0) 1 2 0 0 Nil -246 100) +COMMENT (CObjectList +COMMENT #183=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #19# 0) 1 2 0 0 #129# 0 100) +COMMENT (LOGPEN 0 0 0) 1 (LOGBRUSH 2 8388608 5) 1 +COMMENT 4.23674 4.37719 1 0.082322) 0.8 1.8 0) +COMMENT #184=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #114# 19352356 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "-10" "@N" 1 0 0 +COMMENT -6.45771 3.45752 1.07692 0.820513 #183#)) +COMMENT (CObjectList)) +COMMENT #185=(CGroupWidget +COMMENT (CWidget 48 (7 48 0) 1 2 0 0 Nil -246 100) +COMMENT (CObjectList +COMMENT #186=(CWideArrow +COMMENT (CWideLine +COMMENT (CWidget 0 (3 #12# 0) 1 2 0 0 #118# +COMMENT 1944545584 100) (LOGPEN 0 0 6723840) 1 +COMMENT (LOGBRUSH 0 10079334 0) 1 4.79852 4.93896 1 +COMMENT 0.082322) 0.8 1.8 0) +COMMENT #187=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #114# 1944545584 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "-35" "@N" 1 0 0 +COMMENT -8.88149 3.45752 1.07692 0.820513 #186#)) +COMMENT (CObjectList)) +COMMENT #188=(CGroupWidget +COMMENT (CWidget 62 (7 62 0) 1 2 0 0 Nil -246 100) +COMMENT (CObjectList +COMMENT #189=(CScratch +COMMENT (CWidget 0 (3 #14# 0) 1 2 0 0 #122# 20259396 +COMMENT 100) (LOGPEN 0 6 13395507) 10 1 6.08593 1.9 +COMMENT 0.082322 1) +COMMENT #190=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #114# 20261292 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "AG insertion" +COMMENT "@N" 1 0 0 -15.6971 4.7242 4.20513 0.820513 +COMMENT #189#) +COMMENT #191=(CScratch +COMMENT (CWidget 0 (3 #17# 0) 1 2 0 0 #122# -143 100) +COMMENT (LOGPEN 0 6 13395507) 10 1 0.0468148 1.9 +COMMENT 0.082322 1) +COMMENT #192=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #114# 27079304 100) +COMMENT (LOGPEN 0 0 0) 1 +COMMENT (LOGFONT 32 12 0 0 700 0 0 0 0 3 2 1 34 +COMMENT "Arial") 2.53336 0.666667 0 "orig T" "@N" 1 +COMMENT 0 0 15.1791 3.45752 1.89744 0.820513 #191#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #193=(CGroupWidget (CWidget 11 (8 0) 1 2 0 0 Nil -197 100) +COMMENT (CObjectList +COMMENT #194=(CGroupWidget +COMMENT (CWidget 1 (10 #2# 0) 1 2 0 0 Nil -147 100) +COMMENT (CObjectList +COMMENT #195=(CScratch +COMMENT (CWidget 1 (1 #2# 1) 1 2 0 0 #121# 27076664 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 0.117037 1.9 +COMMENT 0.082322 1) +COMMENT #196=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #123# 27444276 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 27 10 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Bam}HI (264)" "@N (@S)" 5 0 0 15.6254 +COMMENT 5.99088 3.4359 0.615385 #195#)) (CObjectList)) +COMMENT #197=(CGroupWidget +COMMENT (CWidget 1 (10 #4# 0) 1 2 0 0 Nil -197 100) +COMMENT (CObjectList +COMMENT #198=(CScratch +COMMENT (CWidget 1 (1 #4# 1) 1 2 0 0 #121# 27083952 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.58133 1.9 +COMMENT 0.082322 1) +COMMENT #199=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #123# 27088368 100) +COMMENT (LOGPEN 0 0 153) 1 +COMMENT (LOGFONT 27 10 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 128 +COMMENT "{\\i Eco}RI (116)" "@N (@S)" 5 0 0 -4.23724 +COMMENT 5.99088 2.89744 0.615385 #198#)) +COMMENT (CObjectList)) +COMMENT #200=(CGroupWidget +COMMENT (CWidget 2 (10 #1# 0) 1 2 0 0 Nil -246 100) +COMMENT (CObjectList +COMMENT #201=(CScratch +COMMENT (CWidget 1 (1 #1# 1) 1 2 0 0 #121# 27080264 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 6.20296 1.9 +COMMENT 0.082322 1) +COMMENT #202=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #113# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 27 10 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 0 +COMMENT "{\\i Ava}I (4)" "@N (@S)" 5 0 0 -15.1764 +COMMENT 3.45752 2.15385 0.615385 #201#) +COMMENT #203=(CScratch +COMMENT (CWidget 2 (1 #1# 2) 1 2 0 0 #121# 27080184 +COMMENT 100) (LOGPEN 0 6 10053171) 8 1 3.20681 1.9 +COMMENT 0.082322 1) +COMMENT #204=(CLabel +COMMENT (CWidget 0 (0 0) 1 2 0 0 #113# 1944545584 100) +COMMENT (LOGPEN 0 0 13408563) 1 +COMMENT (LOGFONT 27 10 0 0 400 0 0 0 0 3 2 1 18 +COMMENT "Georgia") 2.53336 0.555556 0 +COMMENT "{\\i Ava}I (132)" "@N (@S)" 5 0 0 -2.4419 +COMMENT 7.25756 2.53846 0.615385 #203#)) +COMMENT (CObjectList))) (CObjectList)) +COMMENT #205=(CGroupWidget (CWidget 14 (16 0) 1 2 0 0 Nil -197 100) +COMMENT (CObjectList) (CObjectList)) +COMMENT #206=(CGroupWidget (CWidget 12 (0 0) 1 2 0 0 Nil -246 100) +COMMENT (CObjectList) (CObjectList))) (CObjectList))) +COMMENT (CSeqView 10 10 (CObjectList) (CObList) 1 (CObList)) (CObList) 1953066364 +COMMENT (CStringList) 1869112175 1769104494 (CObList))) +FEATURES Location/Qualifiers + promoter 11..114 + /vntifkey="30" + /label=P(lac) + primer 30..50 + /vntifkey="27" + /label=PlacF + -35_signal 58..63 + /vntifkey="48" + /label=-35 + protein_bind 94..114 + /vntifkey="31" + /label=lacO + mutation 9..10 + /vntifkey="62" + /label=AG\insertion + misc_feature 94..94 + /vntifkey="21" + /label=+1 + misc_feature 129..268 + /vntifkey="21" + /label=core\riboswitch + mutation 267..267 + /vntifkey="62" + /label=orig\T + misc_feature 265..265 + /vntifkey="21" + /label=orig\G + -10_signal 82..87 + /vntifkey="47" + /label=-10 + misc_feature 129..203 + /vntifkey="21" + /label=TPP\aptamer + RBS 235..239 + /vntifkey="32" + /label=SD + misc_feature 246..248 + /vntifkey="21" + /label=start\codon +BASE COUNT 63 a 58 c 60 g 57 t 30 others +ORIGIN + 1 acctcgagag cgcaacgcaa ttaatgtgag ttagctcact cattaggcac cccaggcttt + 61 acactttatg cttccggctc gtatgttgtg tggaattgtg agcggataac aattgaattc + 121 aaccaaacga ctcggggtgc ccttctgcgt gaaggctgag aaatacccgt atcacctgat + 181 ctggataatg ccagcgtagg gaannnnnnn nnnnnnnnnn nnnnnnnnnn nnncaggagc + 241 aaactatgca agtcgacctg ctggatcc +// diff --git a/lib/WSockets/Examples/TCPClient.dpr b/lib/WSockets/Examples/TCPClient.dpr new file mode 100644 index 00000000..63a4de21 --- /dev/null +++ b/lib/WSockets/Examples/TCPClient.dpr @@ -0,0 +1,13 @@ +program TCPClient; + +uses + Forms, + TCPClientUnit in 'TCPClientUnit.pas' {Form1}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/WSockets/Examples/TCPClientUnit.dcu b/lib/WSockets/Examples/TCPClientUnit.dcu new file mode 100644 index 00000000..58110a8e Binary files /dev/null and b/lib/WSockets/Examples/TCPClientUnit.dcu differ diff --git a/lib/WSockets/Examples/TCPClientUnit.dfm b/lib/WSockets/Examples/TCPClientUnit.dfm new file mode 100644 index 00000000..e35873f7 Binary files /dev/null and b/lib/WSockets/Examples/TCPClientUnit.dfm differ diff --git a/lib/WSockets/Examples/TCPClientUnit.pas b/lib/WSockets/Examples/TCPClientUnit.pas new file mode 100644 index 00000000..d2a70526 --- /dev/null +++ b/lib/WSockets/Examples/TCPClientUnit.pas @@ -0,0 +1,153 @@ +unit TCPClientUnit; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + WSockets, WinSock, StdCtrls, ComCtrls; + +type + TForm1 = class(TForm) + Memo1: TMemo; + Label1: TLabel; + Label2: TLabel; + Edit1: TEdit; + Edit2: TEdit; + Button1: TButton; + Button2: TButton; + Label3: TLabel; + Edit3: TEdit; + Button3: TButton; + StatusBar1: TStatusBar; + procedure Edit1Change(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + private + { Private declarations } + TCPClient1: TTCPClient; + procedure TCPClient1Error(Sender: TObject; Error: integer; Msg: string); + procedure TCPClient1Connect(Sender: TObject; Socket: TSocket); + procedure TCPClient1Data(Sender: TObject; Socket: TSocket); + procedure TCPClient1Close(Sender: TObject; Socket: TSocket); + public + { Public declarations } + procedure TTY(Msg: string); + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +procedure TForm1.TTY(Msg: string); +begin + with Memo1.Lines do + begin + if Count > 100 then + Delete(0); + Add(Msg); + end; +end; + +procedure TForm1.TCPClient1Error(Sender: TObject; Error: integer; Msg: string); +begin + MessageDlg(Msg, mtError, [mbOK], 0); +end; + +procedure TForm1.TCPClient1Connect(Sender: TObject; Socket: TSocket); +begin + Memo1.Lines.Clear; + with TCPClient1 do + begin + StatusBar1.SimpleText:= 'Connected on local port '+SocketToPort(LocalSocket); + end; + Button3.Enabled:= true; +end; + +procedure TForm1.TCPClient1Data(Sender: TObject; Socket: TSocket); +begin + TTY(TCPClient1.Read); +end; + +procedure TForm1.TCPClient1Close(Sender: TObject; Socket: TSocket); +begin + TCPClient1.Close; + Edit1.Enabled:= true; + Edit2.Enabled:= true; + Button1.Enabled:= true; + Button2.Enabled:= false; + Button3.Enabled:= false; + //Memo1.Lines.Clear; + StatusBar1.SimpleText:= 'Connection closed by server!'; +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + TCPClient1:= TTCPClient.Create(Self); + with TCPClient1 do + begin + OnError:= TCPClient1Error; + OnConnect:= TCPClient1Connect; + OnData:= TCPClient1Data; + OnClose:= TCPClient1Close; + TTY('WinSocket Version: '+Version); + TTY('Description: '+Description); + TTY('SystemStatus: '+SystemStatus); + TTY(''); + TTY('Local Host Name: '+LocalHostName); + TTY('Local Host Address: '+LocalHostAddress); + TTY(''); + end; +end; + +procedure TForm1.FormDestroy(Sender: TObject); +begin + TCPClient1.Free; +end; + +procedure TForm1.Edit1Change(Sender: TObject); +begin + Button1.Enabled:= (Edit1.Text <> '') and (Edit2.Text <> ''); +end; + +procedure TForm1.Button1Click(Sender: TObject); +begin + with TCPClient1 do + begin + Host:= Edit1.Text; + Port:= Edit2.Text; + StatusBar1.SimpleText:= 'Trying to connect to '+Host+' at port '+Port; + Open; + if SocketState = ssOpen then + begin + Edit1.Enabled:= false; + Edit2.Enabled:= false; + Button1.Enabled:= false; + Button2.Enabled:= true; + end; + end; +end; + +procedure TForm1.Button2Click(Sender: TObject); +begin + TCPClient1.Close; + Edit1.Enabled:= true; + Edit2.Enabled:= true; + Button1.Enabled:= true; + Button2.Enabled:= false; + Button3.Enabled:= false; + Memo1.Lines.Clear; + StatusBar1.SimpleText:= ''; +end; + +procedure TForm1.Button3Click(Sender: TObject); +begin + TCPClient1.Write(Edit3.Text); +end; + +end. diff --git a/lib/WSockets/Examples/TCPServer.dpr b/lib/WSockets/Examples/TCPServer.dpr new file mode 100644 index 00000000..19df48db --- /dev/null +++ b/lib/WSockets/Examples/TCPServer.dpr @@ -0,0 +1,13 @@ +program TCPServer; + +uses + Forms, + TCPServerUnit in 'TCPServerUnit.pas' {Form1}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/WSockets/Examples/TCPServerUnit.dfm b/lib/WSockets/Examples/TCPServerUnit.dfm new file mode 100644 index 00000000..e17633c6 Binary files /dev/null and b/lib/WSockets/Examples/TCPServerUnit.dfm differ diff --git a/lib/WSockets/Examples/TCPServerUnit.pas b/lib/WSockets/Examples/TCPServerUnit.pas new file mode 100644 index 00000000..452a62aa --- /dev/null +++ b/lib/WSockets/Examples/TCPServerUnit.pas @@ -0,0 +1,184 @@ +unit TCPServerUnit; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + WSockets, WinSock, StdCtrls, ComCtrls; + +type + TForm1 = class(TForm) + Memo1: TMemo; + Button1: TButton; + Button2: TButton; + Label1: TLabel; + Edit1: TEdit; + Label2: TLabel; + Edit2: TEdit; + Button3: TButton; + Edit3: TEdit; + UpDown1: TUpDown; + Label3: TLabel; + StatusBar1: TStatusBar; + procedure Edit1Change(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure Edit3Exit(Sender: TObject); + private + { Private declarations } + TCPServer1: TTCPServer; + procedure TCPServer1Error(Sender: TObject; Error: integer; Msg: string); + procedure TCPServer1Accept(Sender: TObject; Socket: TSocket); + procedure TCPServer1Data(Sender: TObject; Socket: TSocket); + procedure TCPServer1Close(Sender: TObject; Socket: TSocket); + public + { Public declarations } + procedure TTY(Msg: string); + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +procedure TForm1.TTY(Msg: string); +begin + with Memo1.Lines do + begin + if Count > 100 then + Delete(0); + Add(Msg); + end; +end; + +procedure TForm1.TCPServer1Error(Sender: TObject; Error: integer; Msg: string); +begin + MessageDlg(Msg, mtError, [mbOK], 0); +end; + +procedure TForm1.TCPServer1Accept(Sender: TObject; Socket: TSocket); +begin + with TCPServer1 do + begin + if Clients.Count > StrToInt(Edit3.Text) then + begin + Write(Socket, 'Sorry! TTCPServer Demo reached max client limit...'); + TTY('New connection rejected for '+PeerToAddress(Socket)+' on port '+PeerToPort(Socket)); + Disconnect(Socket); + end + else + begin + Write(Socket, 'Hello! Connection accepted by TTCPServer Demo'); + TTY('New connection accepted for '+PeerToAddress(Socket)+' on port '+PeerToPort(Socket)); + StatusBar1.SimpleText:= IntToStr(Clients.Count)+' Client(s) connected'; + Button3.Enabled:= true; + end; + end; +end; + +procedure TForm1.TCPServer1Data(Sender: TObject; Socket: TSocket); +var + Data: string; +begin + with TCPServer1 do + begin + Data:= Read(Socket); + TTY('<'+PeerToAddress(Socket)+':'+PeerToPort(Socket)+'> '+Data); + Write(Socket, ' '+Data); + end; +end; + +procedure TForm1.TCPServer1Close(Sender: TObject; Socket: TSocket); +begin + with TCPServer1 do + begin + TTY('Connection closed by '+PeerToAddress(Socket)+' on port '+PeerToPort(Socket)); + StatusBar1.SimpleText:= IntToStr(Clients.Count-1)+' Client(s) connected'; + Button3.Enabled:= (Clients.Count > 1); + end; +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + TCPServer1:= TTCPServer.Create(Self); + with TCPServer1 do + begin + OnError:= TCPServer1Error; + OnAccept:= TCPServer1Accept; + OnData:= TCPServer1Data; + OnClose:= TCPServer1Close; + TTY('WinSocket Version: '+Version); + TTY('Description: '+Description); + TTY('SystemStatus: '+SystemStatus); + TTY(''); + TTY('Local Host Name: '+LocalHostName); + TTY('Local Host Address: '+LocalHostAddress); + TTY(''); + end; +end; + +procedure TForm1.FormDestroy(Sender: TObject); +begin + TCPServer1.Free; +end; + +procedure TForm1.Edit1Change(Sender: TObject); +begin + Button1.Enabled:= (Edit1.Text <> ''); +end; + +procedure TForm1.Button1Click(Sender: TObject); +begin + with TCPServer1 do + begin + Port:= Edit1.Text; + Open; + if SocketState = ssListening then + begin + Memo1.Lines.Clear; + StatusBar1.SimpleText:= LocalHostAddress+' Listening on port: '+Port; + Edit1.Enabled:= false; + Button1.Enabled:= false; + Button2.Enabled:= true; + end; + end; +end; + +procedure TForm1.Button2Click(Sender: TObject); +begin + TCPServer1.Close; + Edit1.Enabled:= true; + Button1.Enabled:= true; + Button2.Enabled:= false; + Button3.Enabled:= false; + Memo1.Lines.Clear; + StatusBar1.SimpleText:= ''; +end; + +procedure TForm1.Button3Click(Sender: TObject); +var + i: integer; +begin + with TCPServer1 do + for i:= 0 to Clients.Count-1 do + Write(Clients[i], Edit2.Text); +end; + +procedure TForm1.Edit3Exit(Sender: TObject); +var + i: integer; +begin + try + i:= StrToInt(Edit3.Text); + except + on EConvertError do + Edit3.Text:= '1'; + end; +end; + +end. diff --git a/lib/WSockets/Examples/UDPClient.dpr b/lib/WSockets/Examples/UDPClient.dpr new file mode 100644 index 00000000..12f52883 --- /dev/null +++ b/lib/WSockets/Examples/UDPClient.dpr @@ -0,0 +1,13 @@ +program UDPClient; + +uses + Forms, + UDPClientUnit in 'UDPClientUnit.pas' {Form1}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/WSockets/Examples/UDPClientUnit.dfm b/lib/WSockets/Examples/UDPClientUnit.dfm new file mode 100644 index 00000000..6a155019 Binary files /dev/null and b/lib/WSockets/Examples/UDPClientUnit.dfm differ diff --git a/lib/WSockets/Examples/UDPClientUnit.pas b/lib/WSockets/Examples/UDPClientUnit.pas new file mode 100644 index 00000000..b1b95a18 --- /dev/null +++ b/lib/WSockets/Examples/UDPClientUnit.pas @@ -0,0 +1,130 @@ +unit UDPClientUnit; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + WSockets, WinSock, StdCtrls, ComCtrls; + +type + TForm1 = class(TForm) + Memo1: TMemo; + Label1: TLabel; + Label2: TLabel; + Edit1: TEdit; + Edit2: TEdit; + Button1: TButton; + Button2: TButton; + Label3: TLabel; + Edit3: TEdit; + Button3: TButton; + StatusBar1: TStatusBar; + procedure Edit1Change(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + private + { Private declarations } + UDPClient1: TUDPClient; + procedure UDPClient1Error(Sender: TObject; Error: integer; Msg: string); + procedure UDPClient1Data(Sender: TObject; Socket: TSocket); + public + { Public declarations } + procedure TTY(Msg: string); + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +procedure TForm1.TTY(Msg: string); +begin + with Memo1.Lines do + begin + if Count > 100 then + Delete(0); + Add(Msg); + end; +end; + +procedure TForm1.UDPClient1Error(Sender: TObject; Error: integer; Msg: string); +begin + MessageDlg(Msg, mtError, [mbOK], 0); +end; + +procedure TForm1.UDPClient1Data(Sender: TObject; Socket: TSocket); +begin + TTY(UDPClient1.Read); +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + UDPClient1:= TUDPClient.Create(Self); + with UDPClient1 do + begin + OnError:= UDPClient1Error; + OnData:= UDPClient1Data; + TTY('WinSocket Version: '+Version); + TTY('Description: '+Description); + TTY('SystemStatus: '+SystemStatus); + TTY(IntToStr(MaxUDPSize)); + TTY(''); + TTY('Local Host Name: '+LocalHostName); + TTY('Local Host Address: '+LocalHostAddress); + TTY(''); + end; +end; + +procedure TForm1.FormDestroy(Sender: TObject); +begin + UDPClient1.Free; +end; + +procedure TForm1.Edit1Change(Sender: TObject); +begin + Button1.Enabled:= (Edit1.Text <> '') and (Edit2.Text <> ''); +end; + +procedure TForm1.Button1Click(Sender: TObject); +begin + with UDPClient1 do + begin + Host:= Edit1.Text; + Port:= Edit2.Text; + Open; + if SocketState = ssOpen then + begin + Edit1.Enabled:= false; + Edit2.Enabled:= false; + Button1.Enabled:= false; + Button2.Enabled:= true; + Button3.Enabled:= true; + Memo1.Lines.Clear; + StatusBar1.SimpleText:= 'Opened on local port '+SocketToPort(LocalSocket); + end; + end; +end; + +procedure TForm1.Button2Click(Sender: TObject); +begin + UDPClient1.Close; + Edit1.Enabled:= true; + Edit2.Enabled:= true; + Button1.Enabled:= true; + Button2.Enabled:= false; + Button3.Enabled:= false; + Memo1.Lines.Clear; + StatusBar1.SimpleText:= ''; +end; + +procedure TForm1.Button3Click(Sender: TObject); +begin + UDPClient1.Write(Edit3.Text); +end; + +end. diff --git a/lib/WSockets/Examples/UDPServer.dpr b/lib/WSockets/Examples/UDPServer.dpr new file mode 100644 index 00000000..c75bb544 --- /dev/null +++ b/lib/WSockets/Examples/UDPServer.dpr @@ -0,0 +1,13 @@ +program UDPServer; + +uses + Forms, + UDPServerUnit in 'UDPServerUnit.pas' {Form1}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/WSockets/Examples/UDPServerUnit.dfm b/lib/WSockets/Examples/UDPServerUnit.dfm new file mode 100644 index 00000000..6cdbc981 Binary files /dev/null and b/lib/WSockets/Examples/UDPServerUnit.dfm differ diff --git a/lib/WSockets/Examples/UDPServerUnit.pas b/lib/WSockets/Examples/UDPServerUnit.pas new file mode 100644 index 00000000..520d4dcb --- /dev/null +++ b/lib/WSockets/Examples/UDPServerUnit.pas @@ -0,0 +1,121 @@ +unit UDPServerUnit; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + WSockets, WinSock, StdCtrls, ComCtrls; + +type + TForm1 = class(TForm) + Memo1: TMemo; + Button1: TButton; + Button2: TButton; + Label1: TLabel; + Edit1: TEdit; + StatusBar1: TStatusBar; + procedure Edit1Change(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure Button2Click(Sender: TObject); + private + { Private declarations } + UDPServer1: TUDPServer; + procedure UDPServer1Error(Sender: TObject; Error: integer; Msg: string); + procedure UDPServer1Data(Sender: TObject; Socket: TSocket); + public + { Public declarations } + procedure TTY(Msg: string); + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +procedure TForm1.TTY(Msg: string); +begin + with Memo1.Lines do + begin + if Count > 100 then + Delete(0); + Add(Msg); + end; +end; + +procedure TForm1.UDPServer1Error(Sender: TObject; Error: integer; Msg: string); +begin + MessageDlg(Msg, mtError, [mbOK], 0); +end; + +procedure TForm1.UDPServer1Data(Sender: TObject; Socket: TSocket); +var + Data: string; + SockAddrIn: TSockAddrIn; +begin + with UDPServer1 do + begin + Data:= Read(Socket, SockAddrIn); + TTY('<'+SockAddrInToAddress(SockAddrIn)+':'+SockAddrInToPort(SockAddrIn)+'> '+Data); + Write(Socket, ' '+Data, SockAddrIn); + end; +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + UDPServer1:= TUDPServer.Create(Self); + with UDPServer1 do + begin + OnError:= UDPServer1Error; + OnData:= UDPServer1Data; + TTY('WinSocket Version: '+Version); + TTY('Description: '+Description); + TTY('SystemStatus: '+SystemStatus); + TTY(''); + TTY('Local Host Name: '+LocalHostName); + TTY('Local Host Address: '+LocalHostAddress); + TTY(''); + end; +end; + +procedure TForm1.FormDestroy(Sender: TObject); +begin + UDPServer1.Free; +end; + +procedure TForm1.Edit1Change(Sender: TObject); +begin + Button1.Enabled:= (Edit1.Text <> ''); +end; + +procedure TForm1.Button1Click(Sender: TObject); +begin + with UDPServer1 do + begin + Port:= Edit1.Text; + Open; + if SocketState = ssListening then + begin + Memo1.Lines.Clear; + StatusBar1.SimpleText:= LocalHostAddress+' Listening on port: '+Port; + Edit1.Enabled:= false; + Button1.Enabled:= false; + Button2.Enabled:= true; + end; + end; +end; + +procedure TForm1.Button2Click(Sender: TObject); +begin + UDPServer1.Close; + Edit1.Enabled:= true; + Button1.Enabled:= true; + Button2.Enabled:= false; + Memo1.Lines.Clear; + StatusBar1.SimpleText:= ''; +end; + +end. diff --git a/lib/WSockets/Examples/WSockets.dcu b/lib/WSockets/Examples/WSockets.dcu new file mode 100644 index 00000000..c4abca6f Binary files /dev/null and b/lib/WSockets/Examples/WSockets.dcu differ diff --git a/lib/WSockets/FILE_ID.DIZ b/lib/WSockets/FILE_ID.DIZ new file mode 100644 index 00000000..dd08d37a --- /dev/null +++ b/lib/WSockets/FILE_ID.DIZ @@ -0,0 +1,6 @@ +-=* WSockets version 1.20 *=- +Delphi 2/3 WinSocket VCL with +full source code included and +TCP/UDP/Client/Server examples +* This Software is Freeware * + diff --git a/lib/WSockets/Readme.txt b/lib/WSockets/Readme.txt new file mode 100644 index 00000000..9795f6e0 --- /dev/null +++ b/lib/WSockets/Readme.txt @@ -0,0 +1,129 @@ +97-06-16 Stockholm, Sweden. + +Whats New (in version 1.20)? + +Well, I sent a version 1.11 out to some of you who sent me feedback on WSockets. +That version was left behind by a new version with a new interface, code named +"Stockholm 97", NOT! Just kidding, it is called version 2.0 and some of you +have had a chance to take a look at it. Version 2.0 took all the time and it is +still not near a final release so I thought that I had to do something for you +all that still use version 1.10. A major problem with 1.10 is that it is not +compatible with Delphi 3. I have also learned a lot about WinSockets during my +work with version 2.0 resulting in an urge to change lots of small things in +version 1.10. So I just had to drop the work on version 2.0 to update version +1.10 to this version: 1.20! My hope is that it will work better for you all +than version 1.10 (and the now not supported prereleased version 1.11). Real +news about the code is found in section "History" at the end of this file. + +Thanks again to You all that have sent me feedback! + +WSockets version 1.20 - Delphi 2 and 3 WinSocket Classes: + +I hope that my classes in WSockets.pas will make it easier four you all to +develop TCP/UDP/client/server applications. I originally made them because +all other freeware (with source) VCL packages used the application object +in one way or another. Another god reason was to lern more about Delphi +and WinSocket programming. + +There is no Windows help file (because I don't know how to make them) and no +proper documentation (because I lack the time), I just hope that you manage +to figure out how to use this stuff by yourself. Use my quick reference +(WSockets.doc) and example Delphi projects... + +I made four exaple projects just to show you the simplicity of my WinSocket +API encapsulation in a TCP/UDP/Client/Server application. The objects are +allocated on the fly so you don't have to install the VCL (if you just +want to check this thing out before you try to install it). + +This is my first Delphi VCL and I am not sure that I got everything right (yet). +Please let me know if I made som errors or if you got any kind of feedback. + +Legal issues: + +Copyright (C) 1997 by Robert T. Palmqvist + +This software is provided 'as-is', without any express or implied +warranty. In no event will the author be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented, you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. + +Credits go to: + + Gary T. Desrosiers. His unit "Sockets" inspired me to write my own. + + Martin Hall, Mark Towfig, Geoff Arnold, David Treadwell, Henry Sanders + and InfoMagic, Inc. for their Windows Help File "WinSock.hlp". + + All the guys at Borland who gave us a marvellous tool named "Delphi"! + +Recommended information sources: + + Specification: + Windows Sockets Version 1.1 Specification + + Textbook: + Quinn and Shute. "Windows Sockets Network Programming" + 1996 by Addison-Wesley Publishing Company, Inc. ISBN 0-201-63372-8 + + World Wide Web: + http://www.sockets.com + http://www.stardust.com + + Network News: + alt.winsock.programming + + Frequently Asked Questions: + "WinSock Application FAQ" Mailto: info@lcs.com Subject: faq + + Requests for Comments: + RFC 768 "User Datagram Protocol" + RFC 791 "Internet Protocol" + RFC 793 "Transmission Control Protocol" + +/Robert + +History (style conventions: [! Bug | ? Request | * Change | + Added | - Removed]): + +Version 1.00 + +Initial Release. + +! Found a message handling bug under Windows NT. +? TClientList.IndexOf method requested. + +Version 1.10 + +* Code reorganized and Windows NT message handling bug removed. ++ Added public method "IndexOf" to "TClientList" class. +? Window Message "FD_WRITE" call-back requested + +Version 1.20 + +! All read and write operations changed to prevent WSAEWOULDBLOCK errors + (Writing text will act blocking and not return until all data is sent + sending buffers will return with information about how much was sent) +* Changed source code to support both Delphi 2 and Delphi 3 + (due to differences in the runtime library, read: WinSock.pas) +* Changed name on class "TCustomSocket" to "TCustomWSocket" + (due to name collision with Delphi 3 C/S class "TCustomSocket") +* Internal code changes in the "TClientList" class +* Changed internal code and interface of "TCustomWSocket.SocketClose" +* use of "TCustomWSocket.SocketQueueSize" replaced with use of FReadBuffer field + (To minimize read operation overhead) +* Improved state checking and error handling +* Changed code to minimize "WSAASyncSelect" calls +- Deleted "Authorized" property (not 100% fault proof and seldom used) + diff --git a/lib/WSockets/WSockets.dcr b/lib/WSockets/WSockets.dcr new file mode 100644 index 00000000..9abeafa4 Binary files /dev/null and b/lib/WSockets/WSockets.dcr differ diff --git a/lib/WSockets/WSockets.dcu b/lib/WSockets/WSockets.dcu new file mode 100644 index 00000000..6d0cc2f2 Binary files /dev/null and b/lib/WSockets/WSockets.dcu differ diff --git a/lib/WSockets/WSockets.doc b/lib/WSockets/WSockets.doc new file mode 100644 index 00000000..16290a57 Binary files /dev/null and b/lib/WSockets/WSockets.doc differ diff --git a/lib/WSockets/WSockets.pas b/lib/WSockets/WSockets.pas new file mode 100644 index 00000000..80acef8d --- /dev/null +++ b/lib/WSockets/WSockets.pas @@ -0,0 +1,1550 @@ +unit WSockets; +{ + +WSockets Version 1.20 - A Simple VCL Encapsulation of the WinSocket API + +VCL Classes in this Unit: + TTCPClient - A TCP Client (derived from TCustomWSocket) + TTCPServer - A TCP Server (derived from TCustomWSocket) + TUDPClient - A UDP Client (derived from TCustomWSocket) + TUDPServer - A UDP Server (derived from TCustomWSocket) + +Other classes ni this Unit: + TCustomWSocket - A generic base class for other socket classes + TClientList - A list class used only by the TTCPServer class + +Legal issues: + +Copyright (C) 1997 by Robert T. Palmqvist + + This software is provided 'as-is', without any express or implied + warranty. In no event will the author be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented, you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. + +Credits go to: + + Gary T. Desrosiers. His unit "Sockets" inspired me to write my own. + + Martin Hall, Mark Towfig, Geoff Arnold, David Treadwell, Henry Sanders + and InfoMagic, Inc. for their Windows Help File "WinSock.hlp". + + All the guys at Borland who gave us a marvellous tool named "Delphi"! + +Recommended information sources: + + Specification: + Windows Sockets Version 1.1 Specification + + Textbook: + Quinn and Shute. "Windows Sockets Network Programming" + 1996 by Addison-Wesley Publishing Company, Inc. ISBN 0-201-63372-8 + + World Wide Web: + http://www.sockets.com + http://www.stardust.com + + Network News: + alt.winsock.programming + + Frequently Asked Questions: + "WinSock Application FAQ" Mailto: info@lcs.com Subject: faq + + Requests for Comments: + RFC 768 "User Datagram Protocol" + RFC 791 "Internet Protocol" + RFC 793 "Transmission Control Protocol" + +} +interface + +uses + Windows, WinSock, SysUtils, Classes, Messages, Forms; + +const + WM_ASYNCSELECT = WM_USER + 1; + READ_BUFFER_SIZE = 1024; + MAX_LOOP = 100; + +type + TSocketState = (ssNotStarted, ssClosed, ssConnected, ssListening, ssOpen); + + TOnError = procedure(Sender: TObject; Error: integer; Msg: string) of object; + TOnData = procedure(Sender: TObject; Socket: TSocket) of object; + TOnAccept = procedure(Sender: TObject; Socket: TSocket) of object; + TOnConnect = procedure(Sender: TObject; Socket: TSocket) of object; + TOnClose = procedure(Sender: TObject; Socket: TSocket) of object; + + TReadBuffer = array[1..READ_BUFFER_SIZE] of byte; + + TClientList = class(TObject) + private + FSockets: TList; + protected + function GetSockets(Index: integer): TSocket; + function GetCount: integer; + public + constructor Create; + destructor Destroy; override; + function Add(Socket: TSocket): boolean; + procedure Delete(Socket: TSocket); + procedure Clear; + function IndexOf(Socket: TSocket): integer; + property Sockets[Index: integer]: TSocket read GetSockets; default; + property Count: integer read GetCount; + end; + + TCustomWSocket2 = class(TComponent) + private + {WinSocket Information Private Fields} + FVersion: string; + FDescription: string; + FSystemStatus: string; + FMaxSockets: integer; + FMaxUDPSize: integer; + {End WinSocket Information Private Fields} + FProtocol: integer; + FType: integer; + + FReadBuffer: TReadBuffer; + FLocalSocket: TSocket; + FSocketState: TSocketState; + FLastError: integer; + FOnError: TOnError; + protected + procedure SocketError(Error: integer); + function LastErrorDesc: string; + + function GetLocalHostAddress: string; + function GetLocalHostName: string; + {Socket Helper Functions} + procedure SocketClose(var Socket: TSocket; Handle: HWND); + function SocketQueueSize(Socket: TSocket): longint; + + procedure SocketWrite(Socket: TSocket; Flag: integer; Data: string); + function SocketRead(Socket: TSocket; Flag: integer): string; + function SocketWriteBuffer(Socket: TSocket; Buffer: Pointer; Size, Flag: integer): integer; + function SocketReadBuffer(Socket: TSocket; Buffer: Pointer; Size, Flag: integer): integer; + + procedure SocketWriteTo(Socket: TSocket; Flag: integer; Data: string; var SockAddrIn: TSockAddrIn); + function SocketReadFrom(Socket: TSocket; Flag: integer; var SockAddrIn: TSockAddrIn): string; + function SocketWriteBufferTo(Socket: TSocket; Buffer: Pointer; Size, Flag: integer; var SockAddrIn: TSockAddrIn): integer; + function SocketReadBufferFrom(Socket: TSocket; Buffer: Pointer; Size, Flag: integer; var SockAddrIn: TSockAddrIn): integer; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + {Address and Port Resolving Helper Functions} + function GetSockAddrIn(Host, Port: string; var SockAddrIn: TSockAddrIn): boolean; + function GetAnySockAddrIn(Port: string; var SockAddrIn: TSockAddrIn): boolean; + function GetBroadcastSockAddrIn(Port: string; var SockAddrIn: TSockAddrIn): boolean; + function SockAddrInToName(SockAddrIn: TSockAddrIn): string; + function SockAddrInToAddress(SockAddrIn: TSockAddrIn): string; + function SockAddrInToPort(SockAddrIn: TSockAddrIn): string; + function SocketToName(Socket: TSocket): string; + function SocketToAddress(Socket: TSocket): string; + function SocketToPort(Socket: TSocket): string; + function PeerToName(Socket: TSocket): string; + function PeerToAddress(Socket: TSocket): string; + function PeerToPort(Socket: TSocket): string; + {WinSocket Information Properties} + property Version: string read FVersion; + property Description: string read FDescription; + property SystemStatus: string read FSystemStatus; + property MaxSockets: integer read FMaxSockets; + property MaxUDPSize: integer read FMaxUDPSize; + {End WinSocket Information Properties} + property LocalSocket: TSocket read FLocalSocket; + property SocketState: TSocketState read FSocketState; + property LastError: integer read FLastError; + property LocalHostAddress: string read GetLocalHostAddress; + property LocalHostName: string read GetLocalHostName; + published + property OnError: TOnError read FOnError write FOnError; + end; + + TTCPClient = class(TCustomWSocket2) + private + FHandle: HWND; + + FHost: string; + FPort: string; + + FOnData: TOnData; + FOnConnect: TOnConnect; + FOnClose: TOnClose; + protected + procedure WndProc(var AMsg: TMessage); + procedure OpenConnection(Socket: TSocket; Error: word); + procedure IncommingData(Socket: TSocket; Error: word); + procedure CloseConnection(Socket: TSocket; Error: word); + + function GetPeerAddress: string; + function GetPeerPort: string; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + + procedure Open; + procedure Close; + + function Peek: string; + + procedure Write(Data: string); + function Read: string; + + function WriteBuffer(Buffer: Pointer; Size: integer): integer; + function ReadBuffer(Buffer: Pointer; Size: integer): integer; + + property Handle: HWND read FHandle; + + property PeerAddress: string read GetPeerAddress; + property PeerPort: string read GetPeerPort; + published + property Host: string read FHost write FHost; + property Port: string read FPort write FPort; + + property OnData: TOnData read FOnData write FOnData; + property OnConnect: TOnConnect read FOnConnect write FOnConnect; + property OnClose: TOnClose read FOnClose write FOnClose; + end; + + TTCPServer = class(TCustomWSocket2) + private + FHandle: HWND; + FPort: string; + + FOnData: TOnData; + FOnAccept: TOnAccept; + FOnClose: TOnClose; + + FClients: TClientList; + protected + procedure WndProc(var AMsg: TMessage); + procedure OpenConnection(Socket: TSocket; Error: word); + procedure IncommingData(Socket: TSocket; Error: word); + procedure CloseConnection(Socket: TSocket; Error: word); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + + procedure Open; + procedure Close; + + function Peek(Socket: TSocket): string; + + procedure Write(Socket: TSocket; Data: string); + function Read(Socket: TSocket): string; + + function WriteBuffer(Socket: TSocket; Buffer: Pointer; Size: integer): integer; + function ReadBuffer(Socket: TSocket; Buffer: Pointer; Size: integer): integer; + + procedure Disconnect(Socket: TSocket); + + property Handle: HWND read FHandle; + property Clients: TClientList read FClients; + published + property Port: string read FPort write FPort; + + property OnData: TOnData read FOnData write FOnData; + property OnAccept: TOnAccept read FOnAccept write FOnAccept; + property OnClose: TOnClose read FOnClose write FOnClose; + end; + + TUDPClient = class(TCustomWSocket2) + private + FHandle: HWND; + + FHost: string; + FPort: string; + + FOnData: TOnData; + protected + procedure WndProc(var AMsg: TMessage); + procedure IncommingData(Socket: TSocket; Error: word); + + function GetPeerAddress: string; + function GetPeerPort: string; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + + procedure Open; + procedure Close; + + function Peek: string; + + procedure Write(Data: string); + function Read: string; + + function WriteBuffer(Buffer: Pointer; Size: integer): integer; + function ReadBuffer(Buffer: Pointer; Size: integer): integer; + + property Handle: HWND read FHandle; + + property PeerAddress: string read GetPeerAddress; + property PeerPort: string read GetPeerPort; + published + property Host: string read FHost write FHost; + property Port: string read FPort write FPort; + + property OnData: TOnData read FOnData write FOnData; + end; + + TUDPServer = class(TCustomWSocket2) + private + FHandle: HWND; + FPort: string; + + FOnData: TOnData; + protected + procedure WndProc(var AMsg: TMessage); + procedure IncommingData(Socket: TSocket; Error: word); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + + procedure Open; + procedure Close; + + function Peek(Socket: TSocket; var SockAddrIn: TSockAddrIn): string; + + procedure Write(Socket: TSocket; Data: string; var SockAddrIn: TSockAddrIn); + function Read(Socket: TSocket; var SockAddrIn: TSockAddrIn): string; + + function WriteBuffer(Socket: TSocket; Buffer: Pointer; Size: integer; var SockAddrIn: TSockAddrIn): integer; + function ReadBuffer(Socket: TSocket; Buffer: Pointer; Size: integer; var SockAddrIn: TSockAddrIn): integer; + + property Handle: HWND read FHandle; + published + property Port: string read FPort write FPort; + + property OnData: TOnData read FOnData write FOnData; + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('Samples', [TTCPClient, TTCPServer, TUDPClient, TUDPServer]); +end; + +(**** TClientList Class ****) + +constructor TClientList.Create; +begin + inherited Create; + FSockets:= TList.Create; +end; + +destructor TClientList.Destroy; +begin + Clear; + FSockets.Free; + inherited Destroy; +end; + +function TClientList.GetSockets(Index: integer): TSocket; +begin + Result:= TSocket(FSockets[Index]); +end; + +function TClientList.GetCount: integer; +begin + Result:= FSockets.Count; +end; + +function TClientList.Add(Socket: TSocket): boolean; +begin + Result:= (FSockets.Add(Ptr(Socket)) >= 0); +end; + +procedure TClientList.Delete(Socket: TSocket); +var + i: integer; +begin + for i:= 0 to FSockets.Count-1 do + begin + if TSocket(FSockets[i]) = Socket then + begin + FSockets.Delete(i); + Break; + end; + end; +end; + +procedure TClientList.Clear; +begin + FSockets.Clear; +end; + +function TClientList.IndexOf(Socket: TSocket): integer; +var + i: integer; +begin + Result:= -1; + for i:= 0 to FSockets.Count-1 do + begin + if TSocket(FSockets[i]) = Socket then + begin + Result:= i; + Break; + end; + end; +end; + +(**** TCustomWSocket2 Class ****) + +constructor TCustomWSocket2.Create(AOwner: TComponent); +var + WSAData: TWSAData; +begin + inherited Create(AOwner); + FProtocol:= IPPROTO_IP; + FType:= SOCK_RAW; + FLocalSocket:= INVALID_SOCKET; + FSocketState:= ssNotStarted; + FLastError:= WSAStartup($101, WSAData); + if FLastError = 0 then + begin + FSocketState:= ssClosed; + with WSAData do + begin + FVersion:= Concat(IntToStr(Hi(wVersion)),'.',(IntToStr(Lo(wVersion)))); + FDescription:= StrPas(szDescription); + FSystemStatus:= StrPas(szSystemStatus); + FMaxSockets:= iMaxSockets; + FMaxUDPSize:= iMaxUDPDg; + end; + end + else + SocketError(FLastError); +end; + +destructor TCustomWSocket2.Destroy; +begin + if FLocalSocket <> INVALID_SOCKET then + closesocket(FLocalSocket); + if FSocketState <> ssNotStarted then + if WSACleanUp = SOCKET_ERROR then + SocketError(WSAGetLastError); + inherited Destroy; +end; + +function TCustomWSocket2.GetSockAddrIn( + Host, Port: string; var SockAddrIn: TSockAddrIn): boolean; +var + ProtoEnt: PProtoEnt; + ServEnt: PServEnt; + HostEnt: PHostEnt; +begin + Result:= false; + SockAddrIn.sin_family:= AF_INET; + + ProtoEnt:= getprotobynumber(FProtocol); + if ProtoEnt = nil then + begin + SocketError(WSAGetLastError); + Exit; + end; + + ServEnt:= getservbyname(PAnsiChar(Port), ProtoEnt^.p_name); + if ServEnt = nil then + SockAddrIn.sin_port:= htons(StrToInt(Port)) + else + SockAddrIn.sin_port:= ServEnt^.s_port; + + SockAddrIn.sin_addr.s_addr:= inet_addr(PAnsiChar(Host)); + if SockAddrIn.sin_addr.s_addr = INADDR_NONE then + begin + HostEnt:= gethostbyname(PAnsiChar(Host)); + if HostEnt = nil then + begin + SocketError(WSAGetLastError); + Exit; + end; + SockAddrIn.sin_addr.S_addr:= longint(plongint(HostEnt^.h_addr_list^)^); + end; + Result:= true; +end; + +function TCustomWSocket2.GetAnySockAddrIn( + Port: string; var SockAddrIn: TSockAddrIn): boolean; +var + ProtoEnt: PProtoEnt; + ServEnt: PServEnt; +begin + Result:= false; + SockAddrIn.sin_family:= AF_INET; + + ProtoEnt:= getprotobynumber(FProtocol); + if ProtoEnt = nil then + Exit; + + ServEnt:= getservbyname(PAnsiChar(Port), ProtoEnt^.p_name); + if ServEnt = nil then + SockAddrIn.sin_port:= htons(StrToInt(Port)) + else + SockAddrIn.sin_port:= ServEnt^.s_port; + + SockAddrIn.sin_addr.s_addr:= INADDR_ANY; + Result:= true; +end; + +function TCustomWSocket2.GetBroadcastSockAddrIn( + Port: string; var SockAddrIn: TSockAddrIn): boolean; +var + ProtoEnt: PProtoEnt; + ServEnt: PServEnt; +begin + Result:= false; + SockAddrIn.sin_family:= AF_INET; + + ProtoEnt:= getprotobynumber(FProtocol); + if ProtoEnt = nil then + Exit; + + ServEnt:= getservbyname(PAnsiChar(Port), ProtoEnt^.p_name); + if ServEnt = nil then + SockAddrIn.sin_port:= htons(StrToInt(Port)) + else + SockAddrIn.sin_port:= ServEnt^.s_port; + + SockAddrIn.sin_addr.s_addr:= INADDR_BROADCAST; + Result:= true; +end; + +function TCustomWSocket2.SockAddrInToName(SockAddrIn: TSockAddrIn): string; +var + HostEnt: PHostEnt; +begin + HostEnt:= gethostbyaddr(@SockAddrIn.sin_addr.S_addr, 4, AF_INET); + if HostEnt <> nil then + Result:= HostEnt.h_name; +end; + +function TCustomWSocket2.SockAddrInToAddress(SockAddrIn: TSockAddrIn): string; +begin + Result:= inet_ntoa(SockAddrIn.sin_addr); +end; + +function TCustomWSocket2.SockAddrInToPort(SockAddrIn: TSockAddrIn): string; +begin + Result:= IntToStr(ntohs(SockAddrIn.sin_port)); +end; + +function TCustomWSocket2.SocketToName(Socket: TSocket): string; +var + SockAddrIn: TSockAddrIn; + Len: integer; + HostEnt: PHostEnt; +begin + if Socket <> INVALID_SOCKET then + begin + Len:= SizeOf(SockAddrIn); + if getsockname(Socket, SockAddrIn, Len) <> SOCKET_ERROR then + begin + HostEnt:= gethostbyaddr(@SockAddrIn.sin_addr.S_addr, 4, AF_INET); + if HostEnt <> nil then + Result:= HostEnt.h_name; + end; + end; +end; + +function TCustomWSocket2.SocketToAddress(Socket: TSocket): string; +var + SockAddrIn: TSockAddrIn; + Len: integer; +begin + if Socket <> INVALID_SOCKET then + begin + Len:= SizeOf(SockAddrIn); + if getsockname(Socket, SockAddrIn, Len) <> SOCKET_ERROR then + Result:= inet_ntoa(SockAddrIn.sin_addr); + end; +end; + +function TCustomWSocket2.SocketToPort(Socket: TSocket): string; +var + SockAddrIn: TSockAddrIn; + Len: integer; +begin + if Socket <> INVALID_SOCKET then + begin + Len:= SizeOf(SockAddrIn); + if getsockname(Socket, SockAddrIn, Len) <> SOCKET_ERROR then + Result:= IntToStr(ntohs(SockAddrIn.sin_port)); + end; +end; + +function TCustomWSocket2.PeerToName(Socket: TSocket): string; +var + SockAddrIn: TSockAddrIn; + Len: integer; + HostEnt: PHostEnt; +begin + if Socket <> INVALID_SOCKET then + begin + Len:= SizeOf(SockAddrIn); + if getpeername(Socket, SockAddrIn, Len) <> SOCKET_ERROR then + begin + HostEnt:= gethostbyaddr(@SockAddrIn.sin_addr.S_addr, 4, AF_INET); + if HostEnt <> nil then + Result:= HostEnt.h_name; + end; + end; +end; + +function TCustomWSocket2.PeerToAddress(Socket: TSocket): string; +var + SockAddrIn: TSockAddrIn; + Len: integer; +begin + if Socket <> INVALID_SOCKET then + begin + Len:= SizeOf(SockAddrIn); + if getpeername(Socket, SockAddrIn, Len) <> SOCKET_ERROR then + Result:= inet_ntoa(SockAddrIn.sin_addr); + end; +end; + +function TCustomWSocket2.PeerToPort(Socket: TSocket): string; +var + SockAddrIn: TSockAddrIn; + Len: integer; +begin + if Socket <> INVALID_SOCKET then + begin + Len:= SizeOf(SockAddrIn); + if getpeername(Socket, SockAddrIn, Len) <> SOCKET_ERROR then + Result:= IntToStr(ntohs(SockAddrIn.sin_port)); + end; +end; + +procedure TCustomWSocket2.SocketClose(var Socket: TSocket; Handle: HWND); +var + RC: integer; +begin + if Socket <> INVALID_SOCKET then + begin + if WSAASyncSelect(Socket, Handle, WM_ASYNCSELECT, 0) <> 0 then + begin + SocketError(WSAGetLastError); + Exit; + end; + + if shutdown(Socket, 1) <> 0 then + if WSAGetLastError <> WSAENOTCONN then + begin + SocketError(WSAGetLastError); + Exit; + end; + + repeat + RC:= recv(Socket, FReadBuffer, SizeOf(TReadBuffer), 0); + until (RC = 0) or (RC = SOCKET_ERROR); + + if closesocket(Socket) <> 0 then + SocketError(WSAGetLastError) + else + Socket:= INVALID_SOCKET; + end; +end; + +function TCustomWSocket2.SocketQueueSize(Socket: TSocket): longint; +var + Size: longint; +begin + Result:= 0; + if ioctlsocket(Socket, FIONREAD, Size) <> 0 then + SocketError(WSAGetLastError) + else + Result:= Size; +end; + +procedure TCustomWSocket2.SocketWrite(Socket: TSocket; Flag: integer; Data: string); +var + TotSent, ToSend, Sent, ErrorLoop: integer; +begin + if Data <> '' then + begin + ErrorLoop:= 0; + TotSent:= 0; + ToSend:= Length(Data); + repeat + Sent:= send(Socket, Data[TotSent+1], (ToSend-TotSent), Flag); + if Sent = SOCKET_ERROR then + begin + Inc(ErrorLoop); + if WSAGetLastError <> WSAEWOULDBLOCK then + begin + SocketError(WSAGetLastError); + Exit; + end; + end + else + Inc(TotSent, Sent); + until (TotSent >= ToSend) or (ErrorLoop > MAX_LOOP); + end; +end; + +function TCustomWSocket2.SocketRead(Socket: TSocket; Flag: integer): string; +var + Received: longint; +begin + Result:= ''; + Received:= recv(Socket, FReadBuffer, SizeOf(TReadBuffer), Flag); + if Received = SOCKET_ERROR then + begin + if WSAGetLastError <> WSAEWOULDBLOCK then + SocketError(WSAGetLastError); + end + else + begin + SetLength(Result, Received); + Move(FReadBuffer, Result[1], Received); + end; +end; + +function TCustomWSocket2.SocketWriteBuffer(Socket: TSocket; Buffer: Pointer; Size, Flag: integer): integer; +begin + Result:= send(Socket, Buffer^, Size, Flag); + if Result = SOCKET_ERROR then + begin + Result:= 0; + if WSAGetLastError <> WSAEWOULDBLOCK then + SocketError(WSAGetLastError); + end; +end; + +function TCustomWSocket2.SocketReadBuffer(Socket: TSocket; Buffer: Pointer; Size, Flag: integer): integer; +begin + Result:= recv(Socket, Buffer^, Size, Flag); + if Result = SOCKET_ERROR then + begin + Result:= 0; + if WSAGetLastError <> WSAEWOULDBLOCK then + SocketError(WSAGetLastError); + end; +end; + +procedure TCustomWSocket2.SocketWriteTo(Socket: TSocket; Flag: integer; Data: string; var SockAddrIn: TSockAddrIn); +var + TotSent, ToSend, Sent, ErrorLoop: integer; +begin + if Data <> '' then + begin + ErrorLoop:= 0; + TotSent:= 0; + ToSend:= Length(Data); + repeat + Sent:= sendto(Socket, Data[TotSent+1], (ToSend-TotSent), Flag, SockAddrIn, SizeOf(SockAddrIn)); + if Sent = SOCKET_ERROR then + begin + Inc(ErrorLoop); + if WSAGetLastError <> WSAEWOULDBLOCK then + begin + SocketError(WSAGetLastError); + Exit; + end; + end + else + Inc(TotSent, Sent); + until (TotSent >= ToSend) or (ErrorLoop > MAX_LOOP); + end; +end; + +function TCustomWSocket2.SocketReadFrom(Socket: TSocket; Flag: integer; var SockAddrIn: TSockAddrIn): string; +var + Len: integer; + Received: longint; +begin + Len:= SizeOf(SockAddrIn); + Received:= recvfrom(Socket, FReadBuffer, SizeOf(TReadBuffer), Flag, SockAddrIn, Len); + if Received = SOCKET_ERROR then + begin + if WSAGetLastError <> WSAEWOULDBLOCK then + SocketError(WSAGetLastError); + end + else + begin + SetLength(Result, Received); + Move(FReadBuffer, Result[1], Received); + end; +end; + +function TCustomWSocket2.SocketWriteBufferTo(Socket: TSocket; Buffer: Pointer; Size, Flag: integer; var SockAddrIn: TSockAddrIn): integer; +begin + Result:= sendto(Socket, Buffer^, Size, Flag, SockAddrIn, SizeOf(SockAddrIn)); + if Result = SOCKET_ERROR then + begin + Result:= 0; + if WSAGetLastError <> WSAEWOULDBLOCK then + SocketError(WSAGetLastError); + end; +end; + +function TCustomWSocket2.SocketReadBufferFrom(Socket: TSocket; Buffer: Pointer; Size, Flag: integer; var SockAddrIn: TSockAddrIn): integer; +var + Len: integer; +begin + Len:= SizeOf(SockAddrIn); + Result:= recvfrom(Socket, Buffer^, Size, Flag, SockAddrIn, Len); + if Result = SOCKET_ERROR then + begin + Result:= 0; + if WSAGetLastError <> WSAEWOULDBLOCK then + SocketError(WSAGetLastError); + end; +end; + +procedure TCustomWSocket2.SocketError(Error: integer); +begin + FLastError:= Error; + if Assigned(FOnError) then + FOnError(Self, FLastError, LastErrorDesc); +end; + +function TCustomWSocket2.LastErrorDesc: string; +begin + case FLastError of + WSAEINTR : Result:= 'Interrupted system call'; + WSAEBADF : Result:= 'Bad file number'; + WSAEACCES : Result:= 'Permission denied'; + WSAEFAULT : Result:= 'Bad address'; + WSAEINVAL : Result:= 'Invalid argument'; + WSAEMFILE : Result:= 'Too many open files'; + WSAEWOULDBLOCK : Result:= 'Operation would block'; + WSAEINPROGRESS : Result:= 'Operation now in progress'; + WSAEALREADY : Result:= 'Operation already in progress'; + WSAENOTSOCK : Result:= 'Socket operation on nonsocket'; + WSAEDESTADDRREQ : Result:= 'Destination address required'; + WSAEMSGSIZE : Result:= 'Message too long'; + WSAEPROTOTYPE : Result:= 'Protocol wrong type for socket'; + WSAENOPROTOOPT : Result:= 'Protocol not available'; + WSAEPROTONOSUPPORT : Result:= 'Protocol not supported'; + WSAESOCKTNOSUPPORT : Result:= 'Socket not supported'; + WSAEOPNOTSUPP : Result:= 'Operation not supported on socket'; + WSAEPFNOSUPPORT : Result:= 'Protocol family not supported'; + WSAEAFNOSUPPORT : Result:= 'Address family not supported'; + WSAEADDRINUSE : Result:= 'Address already in use'; + WSAEADDRNOTAVAIL : Result:= 'Can''t assign requested address'; + WSAENETDOWN : Result:= 'Network is down'; + WSAENETUNREACH : Result:= 'Network is unreachable'; + WSAENETRESET : Result:= 'Network dropped connection on reset'; + WSAECONNABORTED : Result:= 'Software caused connection abort'; + WSAECONNRESET : Result:= 'Connection reset by peer'; + WSAENOBUFS : Result:= 'No buffer space available'; + WSAEISCONN : Result:= 'Socket is already connected'; + WSAENOTCONN : Result:= 'Socket is not connected'; + WSAESHUTDOWN : Result:= 'Can''t send after socket shutdown'; + WSAETOOMANYREFS : Result:= 'Too many references:can''t splice'; + WSAETIMEDOUT : Result:= 'Connection timed out'; + WSAECONNREFUSED : Result:= 'Connection refused'; + WSAELOOP : Result:= 'Too many levels of symbolic links'; + WSAENAMETOOLONG : Result:= 'File name is too long'; + WSAEHOSTDOWN : Result:= 'Host is down'; + WSAEHOSTUNREACH : Result:= 'No route to host'; + WSAENOTEMPTY : Result:= 'Directory is not empty'; + WSAEPROCLIM : Result:= 'Too many processes'; + WSAEUSERS : Result:= 'Too many users'; + WSAEDQUOT : Result:= 'Disk quota exceeded'; + WSAESTALE : Result:= 'Stale NFS file handle'; + WSAEREMOTE : Result:= 'Too many levels of remote in path'; + WSASYSNOTREADY : Result:= 'Network subsystem is unusable'; + WSAVERNOTSUPPORTED : Result:= 'Winsock DLL cannot support this application'; + WSANOTINITIALISED : Result:= 'Winsock not initialized'; + WSAHOST_NOT_FOUND : Result:= 'Host not found'; + WSATRY_AGAIN : Result:= 'Non authoritative - host not found'; + WSANO_RECOVERY : Result:= 'Non recoverable error'; + WSANO_DATA : Result:= 'Valid name, no data record of requested type' + else + Result:= 'Not a Winsock error'; + end; +end; + +function TCustomWSocket2.GetLocalHostAddress: string; +var + SockAddrIn: TSockAddrIn; + HostEnt: PHostEnt; + szHostName: array[0..128] of char; +begin + if gethostname(szHostName, 128) = 0 then + begin + HostEnt:= gethostbyname(szHostName); + if HostEnt = nil then + Result:= '' + else + begin + SockAddrIn.sin_addr.S_addr:= longint(plongint(HostEnt^.h_addr_list^)^); + Result:= inet_ntoa(SockAddrIn.sin_addr); + end; + end + else + SocketError(WSAGetLastError); +end; + +function TCustomWSocket2.GetLocalHostName: string; +var + szHostName: array[0..128] of char; +begin + if gethostname(szHostName, 128) = 0 then + Result:= szHostName + else + SocketError(WSAGetLastError); +end; + +(**** TTCPClient Class ****) + +constructor TTCPClient.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FHandle:= AllocateHWnd(WndProc); + FProtocol:= IPPROTO_TCP; + FType:= SOCK_STREAM; +end; + +destructor TTCPClient.Destroy; +begin + Close; + DeallocateHWnd(FHandle); + inherited Destroy; +end; + +procedure TTCPClient.OpenConnection(Socket: TSocket; Error: word); +var + EventMask: longint; +begin + if Error <> 0 then + SocketError(Error) + else + begin + EventMask:= FD_READ or FD_CLOSE; + if WSAASyncSelect(FLocalSocket, FHandle, WM_ASYNCSELECT, EventMask) <> 0 then + SocketError(WSAGetLastError) + else + begin + if Assigned(FOnConnect) then + FOnConnect(Self, Socket); + FSocketState:= ssConnected; + end; + end; +end; + +procedure TTCPClient.CloseConnection(Socket: TSocket; Error: word); +begin + if Error = WSAENETDOWN then + SocketError(Error) + else + begin + if Assigned(FOnClose) then + FOnClose(Self, Socket); + Close; + end; +end; + +procedure TTCPClient.IncommingData(Socket: TSocket; Error: word); +begin + if Error <> 0 then + SocketError(Error) + else + if Assigned(FOnData) then + FOnData(Self, Socket); +end; + +procedure TTCPClient.WndProc(var AMsg: TMessage); +var + Error: word; +begin + with AMsg do + case Msg of + WM_ASYNCSELECT: + begin + if (FSocketState = ssClosed) then + Exit; + Error:= WSAGetSelectError(LParam); + case WSAGetSelectEvent(LParam) of + FD_READ : IncommingData(WParam, Error); + FD_CONNECT: OpenConnection(WParam, Error); + FD_CLOSE : CloseConnection(WParam, Error); + else + if Error <> 0 then + SocketError(Error); + end; + end; + else + Result:= DefWindowProc(FHandle, Msg, WParam, LParam); + end; +end; + +procedure TTCPClient.Open; +var + SockAddrIn: TSockAddrIn; + SockOpt: LongBool; + EventMask: longint; +begin + if (FSocketState <> ssClosed) then + Exit; + + if not GetSockAddrIn(FHost, FPort, SockAddrIn) then + Exit; + + FLocalSocket:= socket(PF_INET, FType, 0); + if FLocalSocket = INVALID_SOCKET then + begin + SocketError(WSAGetLastError); + Exit; + end; + + EventMask:= (FD_CONNECT or FD_READ or FD_CLOSE); + if WSAASyncSelect(FLocalSocket, FHandle, WM_ASYNCSELECT, EventMask) <> 0 then + begin + SocketError(WSAGetLastError); + closesocket(FLocalSocket); + Exit; + end; + + SockOpt:= true; {Enable OOB Data inline} + if setsockopt(FLocalSocket, SOL_SOCKET, SO_OOBINLINE, PAnsiChar(@SockOpt), SizeOf(SockOpt)) <> 0 then + begin + SocketError(WSAGetLastError); + closesocket(FLocalSocket); + Exit; + end; + + if connect(FLocalSocket, SockAddrIn, SizeOf(SockAddrIn)) <> 0 then + begin + if WSAGetLastError <> WSAEWOULDBLOCK then + begin + SocketError(WSAGetLastError); + closesocket(FLocalSocket); + Exit; + end; + end; + + FSocketState:= ssOpen; +end; + +procedure TTCPClient.Close; +begin + if (FSocketState = ssNotStarted) or (FSocketState = ssClosed) then + Exit; + + SocketClose(FLocalSocket, FHandle); + if FLocalSocket = INVALID_SOCKET then + FSocketState:= ssClosed; +end; + +procedure TTCPClient.Write(Data: string); +begin + SocketWrite(FLocalSocket, 0, Data); +end; + +function TTCPClient.Read: string; +begin + Result:= SocketRead(FLocalSocket, 0); +end; + +function TTCPClient.Peek: string; +begin + Result:= SocketRead(FLocalSocket, MSG_PEEK); +end; + +function TTCPClient.WriteBuffer(Buffer: Pointer; Size: integer): integer; +begin + Result:= SocketWriteBuffer(FLocalSocket, Buffer, Size, 0); +end; + +function TTCPClient.ReadBuffer(Buffer: Pointer; Size: integer): integer; +begin + Result:= SocketReadBuffer(FLocalSocket, Buffer, Size, 0); +end; + +function TTCPClient.GetPeerAddress: string; +begin + Result:= PeerToAddress(FLocalSocket); +end; + +function TTCPClient.GetPeerPort: string; +begin + Result:= PeerToPort(FLocalSocket); +end; + +(**** TTCPServer Class ****) + +constructor TTCPServer.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FHandle:= AllocateHWnd(WndProc); + FProtocol:= IPPROTO_TCP; + FType:= SOCK_STREAM; + FClients:= TClientList.Create; +end; + +destructor TTCPServer.Destroy; +begin + Close; + DeallocateHWnd(FHandle); + FClients.Free; + inherited Destroy; +end; + +procedure TTCPServer.OpenConnection(Socket: TSocket; Error: word); +var + Len: integer; + NewSocket: TSocket; + SockAddrIn: TSockAddrIn; + SockOpt: LongBool; + EventMask: longint; +begin + if Error <> 0 then + SocketError(Error) + else + begin + Len:= SizeOf(SockAddrIn); + {$IFDEF VER100} // Delphi 3 + NewSocket:= accept(FLocalSocket, @SockAddrIn, @Len); + {$ELSE} // Delphi 2 + NewSocket:= accept(FLocalSocket, SockAddrIn, Len); + {$ENDIF} + if NewSocket = INVALID_SOCKET then + begin + SocketError(WSAGetLastError); + Exit; + end; + + EventMask:= (FD_READ or FD_CLOSE); + if WSAASyncSelect(NewSocket, FHandle, WM_ASYNCSELECT, EventMask) <> 0 then + begin + SocketError(WSAGetLastError); + closesocket(NewSocket); + Exit; + end; + + SockOpt:= true; {Enable OOB Data inline} + if setsockopt(NewSocket, SOL_SOCKET, SO_OOBINLINE , PAnsiChar(@SockOpt), SizeOf(SockOpt)) <> 0 then + begin + SocketError(WSAGetLastError); + closesocket(NewSocket); + Exit; + end; + + if not FClients.Add(NewSocket) then + SocketClose(NewSocket, FHandle) + else + if Assigned(FOnAccept) then + FOnAccept(Self, NewSocket); + end; +end; + +procedure TTCPServer.CloseConnection(Socket: TSocket; Error: word); +begin + if Error = WSAENETDOWN then + SocketError(Error) + else + begin + if Assigned(FOnClose) then + FOnClose(Self, Socket); + Disconnect(Socket); + end; +end; + +procedure TTCPServer.IncommingData(Socket: TSocket; Error: word); +begin + if Error <> 0 then + SocketError(Error) + else + if Assigned(FOnData) then + FOnData(Self, Socket); +end; + +procedure TTCPServer.WndProc(var AMsg: TMessage); +var + Error: word; +begin + with AMsg do + case Msg of + WM_ASYNCSELECT: + begin + if (FSocketState = ssClosed) then + Exit; + Error:= WSAGetSelectError(LParam); + case WSAGetSelectEvent(LParam) of + FD_READ : IncommingData(WParam, Error); + FD_ACCEPT: OpenConnection(WParam, Error); + FD_CLOSE : CloseConnection(WParam, Error); + else + if Error <> 0 then + SocketError(Error); + end; + end; + else + Result:= DefWindowProc(FHandle, Msg, WParam, LParam); + end; +end; + +procedure TTCPServer.Open; +var + SockAddrIn: TSockAddrIn; +begin + if (FSocketState <> ssClosed) then + Exit; + + if not GetAnySockAddrIn(FPort, SockAddrIn) then + Exit; + + FLocalSocket:= socket(PF_INET, FType, 0); + if FLocalSocket = INVALID_SOCKET then + begin + SocketError(WSAGetLastError); + Exit; + end; + + if WSAASyncSelect(FLocalSocket, FHandle, WM_ASYNCSELECT, FD_ACCEPT) <> 0 then + begin + SocketError(WSAGetLastError); + closesocket(FLocalSocket); + Exit; + end; + + if bind(FLocalSocket, SockAddrIn, SizeOf(SockAddrIn)) <> 0 then + begin + SocketError(WSAGetLastError); + closesocket(FLocalSocket); + Exit; + end; + + if listen(FLocalSocket, 5) <> 0 then + begin + SocketError(WSAGetLastError); + closesocket(FLocalSocket); + Exit; + end; + + FSocketState:= ssListening; +end; + +procedure TTCPServer.Close; +var + i: integer; + Dummy: TSocket; +begin + if (FSocketState = ssNotStarted) or (FSocketState = ssClosed) then + Exit; + + for i:= 0 to FClients.Count-1 do + begin + Dummy:= FClients[i]; + SocketClose(Dummy, FHandle); + end; + FClients.Clear; + + SocketClose(FLocalSocket, FHandle); + if FLocalSocket = INVALID_SOCKET then + FSocketState:= ssClosed; +end; + +procedure TTCPServer.Write(Socket: TSocket; Data: string); +begin + SocketWrite(Socket, 0, Data); +end; + +function TTCPServer.Read(Socket: TSocket): string; +begin + Result:= SocketRead(Socket, 0); +end; + +function TTCPServer.Peek(Socket: TSocket): string; +begin + Result:= SocketRead(Socket, MSG_PEEK); +end; + +function TTCPServer.WriteBuffer(Socket: TSocket; Buffer: Pointer; Size: integer): integer; +begin + Result:= SocketWriteBuffer(Socket, Buffer, Size, 0); +end; + +function TTCPServer.ReadBuffer(Socket: TSocket; Buffer: Pointer; Size: integer): integer; +begin + Result:= SocketReadBuffer(Socket, Buffer, Size, 0); +end; + +procedure TTCPServer.Disconnect(Socket: TSocket); +begin + FClients.Delete(Socket); + SocketClose(Socket, FHandle); +end; + +(**** TUDPClient Class ****) + +constructor TUDPClient.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FHandle:= AllocateHWnd(WndProc); + FProtocol:= IPPROTO_UDP; + FType:= SOCK_DGRAM; +end; + +destructor TUDPClient.Destroy; +begin + Close; + DeallocateHWnd(FHandle); + inherited Destroy; +end; + +procedure TUDPClient.IncommingData(Socket: TSocket; Error: word); +begin + if Error <> 0 then + SocketError(Error) + else + if Assigned(FOnData) then + FOnData(Self, Socket); +end; + +procedure TUDPClient.WndProc(var AMsg: TMessage); +var + Error: word; +begin + with AMsg do + case Msg of + WM_ASYNCSELECT: + begin + if (FSocketState = ssClosed) then + Exit; + Error:= WSAGetSelectError(LParam); + case WSAGetSelectEvent(LParam) of + FD_READ : IncommingData(WParam, Error); + else + if Error <> 0 then + SocketError(Error); + end; + end; + else + Result:= DefWindowProc(FHandle, Msg, WParam, LParam); + end; +end; + +procedure TUDPClient.Open; +var + SockAddrIn: TSockAddrIn; +begin + if (FSocketState <> ssClosed) then + Exit; + + if not GetSockAddrIn(FHost, FPort, SockAddrIn) then + Exit; + + FLocalSocket:= socket(PF_INET, FType, 0); + if FLocalSocket = INVALID_SOCKET then + begin + SocketError(WSAGetLastError); + Exit; + end; + + if WSAASyncSelect(FLocalSocket, FHandle, WM_ASYNCSELECT, FD_READ) <> 0 then + begin + SocketError(WSAGetLastError); + closesocket(FLocalSocket); + Exit; + end; + + if connect(FLocalSocket, SockAddrIn, SizeOf(SockAddrIn)) <> 0 then + begin + if WSAGetLastError <> WSAEWOULDBLOCK then + begin + SocketError(WSAGetLastError); + closesocket(FLocalSocket); + Exit; + end; + end; + + FSocketState:= ssOpen; +end; + +procedure TUDPClient.Close; +begin + if (FSocketState = ssNotStarted) or (FSocketState = ssClosed) then + Exit; + + SocketClose(FLocalSocket, FHandle); + if FLocalSocket = INVALID_SOCKET then + FSocketState:= ssClosed; +end; + +procedure TUDPClient.Write(Data: string); +begin + SocketWrite(FLocalSocket, 0, Data); +end; + +function TUDPClient.Read: string; +begin + Result:= SocketRead(FLocalSocket, 0); +end; + +function TUDPClient.Peek: string; +begin + Result:= SocketRead(FLocalSocket, MSG_PEEK); +end; + +function TUDPClient.WriteBuffer(Buffer: Pointer; Size: integer): integer; +begin + Result:= SocketWriteBuffer(FLocalSocket, Buffer, Size, 0); +end; + +function TUDPClient.ReadBuffer(Buffer: Pointer; Size: integer): integer; +begin + Result:= SocketReadBuffer(FLocalSocket, Buffer, Size, 0); +end; + +function TUDPClient.GetPeerAddress: string; +begin + Result:= PeerToAddress(FLocalSocket); +end; + +function TUDPClient.GetPeerPort: string; +begin + Result:= PeerToPort(FLocalSocket); +end; + +(**** TUDPServer Class ****) + +constructor TUDPServer.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FHandle:= AllocateHWnd(WndProc); + FProtocol:= IPPROTO_UDP; + FType:= SOCK_DGRAM; +end; + +destructor TUDPServer.Destroy; +begin + Close; + DeallocateHWnd(FHandle); + inherited Destroy; +end; + +procedure TUDPServer.IncommingData(Socket: TSocket; Error: word); +begin + if Error <> 0 then + SocketError(Error) + else + if Assigned(FOnData) then + FOnData(Self, Socket); +end; + +procedure TUDPServer.WndProc(var AMsg: TMessage); +var + Error: word; +begin + with AMsg do + case Msg of + WM_ASYNCSELECT: + begin + if (FSocketState = ssClosed) then + Exit; + Error:= WSAGetSelectError(LParam); + case WSAGetSelectEvent(LParam) of + FD_READ : IncommingData(WParam, Error); + else + if Error <> 0 then + SocketError(Error); + end; + end; + else + Result:= DefWindowProc(FHandle, Msg, WParam, LParam); + end; +end; + +procedure TUDPServer.Open; +var + SockAddrIn: TSockAddrIn; + SockOpt: LongBool; +begin + if (FSocketState <> ssClosed) then + Exit; + + if not GetAnySockAddrIn(FPort, SockAddrIn) then + Exit; + + FLocalSocket:= socket(PF_INET, FType, 0); + if FLocalSocket = INVALID_SOCKET then + begin + SocketError(WSAGetLastError); + Exit; + end; + + if WSAASyncSelect(FLocalSocket, FHandle, WM_ASYNCSELECT, FD_READ) <> 0 then + begin + SocketError(WSAGetLastError); + closesocket(FLocalSocket); + Exit; + end; + + SockOpt:= true; {Enable Broadcasting on this Socket} + if setsockopt(FLocalSocket, SOL_SOCKET, SO_BROADCAST, PAnsiChar(@SockOpt), SizeOf(SockOpt)) <> 0 then + begin + SocketError(WSAGetLastError); + closesocket(FLocalSocket); + Exit; + end; + + if bind(FLocalSocket, SockAddrIn, SizeOf(SockAddrIn)) <> 0 then + begin + SocketError(WSAGetLastError); + closesocket(FLocalSocket); + Exit; + end; + + FSocketState:= ssListening; +end; + +procedure TUDPServer.Close; +begin + if (FSocketState = ssNotStarted) or (FSocketState = ssClosed) then + Exit; + + SocketClose(FLocalSocket, FHandle); + if FLocalSocket = INVALID_SOCKET then + FSocketState:= ssClosed; +end; + +procedure TUDPServer.Write(Socket: TSocket; Data: string; var SockAddrIn: TSockAddrIn); +begin + SocketWriteTo(Socket, 0, Data, SockAddrIn); +end; + +function TUDPServer.Read(Socket: TSocket; var SockAddrIn: TSockAddrIn): string; +begin + Result:= SocketReadFrom(Socket, 0, SockAddrIn); +end; + +function TUDPServer.Peek(Socket: TSocket; var SockAddrIn: TSockAddrIn): string; +begin + Result:= SocketReadFrom(Socket, MSG_PEEK, SockAddrIn); +end; + +function TUDPServer.WriteBuffer(Socket: TSocket; Buffer: Pointer; Size: integer; var SockAddrIn: TSockAddrIn): integer; +begin + Result:= SocketWriteBufferTo(Socket, Buffer, Size, 0, SockAddrIn); +end; + +function TUDPServer.ReadBuffer(Socket: TSocket; Buffer: Pointer; Size: integer; var SockAddrIn: TSockAddrIn): integer; +begin + Result:= SocketReadBufferFrom(Socket, Buffer, Size, 0, SockAddrIn); +end; + +end. diff --git a/lib/aligrid21/AH_COMP.DPK b/lib/aligrid21/AH_COMP.DPK new file mode 100644 index 00000000..2f6d06e2 --- /dev/null +++ b/lib/aligrid21/AH_COMP.DPK @@ -0,0 +1,35 @@ +package ah_comp; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$IMPLICITBUILD OFF} + +requires + rtl, + designide, + VclSmp; + +contains + aligridr in 'S:\andy\ALIGRIDR.PAS'; + +end. diff --git a/lib/aligrid21/AH_DEF.INC b/lib/aligrid21/AH_DEF.INC new file mode 100644 index 00000000..30dfbe77 --- /dev/null +++ b/lib/aligrid21/AH_DEF.INC @@ -0,0 +1,93 @@ +(*$define iso_latin1 *) +(*@/// Compiler switches for version checks *) +(*$ifdef ver140 *) + (*$define delphi_6 *) +(*$else *) + (*$ifdef ver130 *) + (*$define delphi_5 *) + (*$else *) + (*$ifdef ver120 *) + (*$define delphi_4 *) + (*$else *) + (*$ifdef ver110 *) + (*$define builder_3 *) + (*$else *) + (*$ifdef ver100 *) + (*$define delphi_3 *) + (*$else *) + (*$ifdef ver95 *) + (*$define builder_1 *) + (*$endif *) + (*$ifdef ver90 *) + (*$define delphi_2 *) + (*$else *) + (*$ifdef ver80 *) + (*$define Delphi_1 *) + (*$else + (*$define bp_7 *) + (*$endif *) + (*$endif *) + (*$endif *) + (*$endif *) + (*$endif *) + (*$endif *) +(*$endif *) + +(*$ifdef delphi_1 *) + (*$define delphi_ge_1 *) +(*$endif *) +(*$ifdef delphi_2 *) + (*$define delphi_gt_1 *) + (*$define delphi_ge_1 *) + (*$define delphi_ge_2 *) +(*$endif *) +(*$ifdef delphi_3 *) + (*$define delphi_gt_2 *) + (*$define delphi_gt_1 *) + (*$define delphi_ge_1 *) + (*$define delphi_ge_2 *) + (*$define delphi_ge_3 *) +(*$endif *) +(*$ifdef delphi_4 *) + (*$define delphi_gt_3 *) + (*$define delphi_gt_2 *) + (*$define delphi_gt_1 *) + (*$define delphi_ge_1 *) + (*$define delphi_ge_2 *) + (*$define delphi_ge_3 *) + (*$define delphi_ge_4 *) +(*$endif *) +(*$ifdef delphi_5 *) + (*$define delphi_gt_3 *) + (*$define delphi_gt_2 *) + (*$define delphi_gt_1 *) + (*$define delphi_ge_1 *) + (*$define delphi_ge_2 *) + (*$define delphi_ge_3 *) + (*$define delphi_ge_4 *) + (*$define delphi_ge_5 *) +(*$endif *) + +(*$ifdef delphi_6 *) + (*$define delphi_gt_4 *) + (*$define delphi_gt_3 *) + (*$define delphi_gt_2 *) + (*$define delphi_gt_1 *) + (*$define delphi_ge_1 *) + (*$define delphi_ge_2 *) + (*$define delphi_ge_3 *) + (*$define delphi_ge_4 *) + (*$define delphi_ge_5 *) + (*$define delphi_ge_6 *) +(*$endif *) + +{ shortstring defined : use string in VCL methods } +{ undefined: use ansistring instead } + +(*$ifdef delphi_1 *) + (*$define shortstring *) +(*$else *) + { The Delphi2/3 VCL only compiles with huge strings } + (*$undef shortstring *) +(*$endif *) +(*@\\\*) diff --git a/lib/aligrid21/AH_TOOL.PAS b/lib/aligrid21/AH_TOOL.PAS new file mode 100644 index 00000000..e0241c5d --- /dev/null +++ b/lib/aligrid21/AH_TOOL.PAS @@ -0,0 +1,1157 @@ +unit ah_tool; +{ Copyright 1995-200 Andreas Hrstemeier Version 1.1 2001-06-04 } +{ this utility functions are public domain. They are used by several of my } +{ components. In case you have several version of this file always use the } +{ latest one. Please check the file readme.txt of the component you found } +{ this file at for more detailed info on usage and distributing. } +(*@/// interface *) +interface + +(*$b- *) +(*$j+ *) +(*$i ah_def.inc *) + +uses +(*$ifdef delphi_1 *) + winprocs, + wintypes, +(*$else *) + windows, +(*$endif *) + messages, + sysutils, + classes, + controls, + forms; + +(*@/// String utility functions *) +{ Find n'th occurence of a substring, from left or from right } +function posn(const s,t:string; count:integer):integer; + +{ Find the n'th char unequal from left or from right } +function poscn(c:char; const s:string; n: integer):integer; + +{ Exchange all occurances of a string by another (e.g. ,->.) } +function exchange_s(const prior,after: string; const s:string):string; + +{ Delphi 1 didn't know these, but they are useful/necessary for D2/D3 } +(*$ifdef delphi_1 *) +function trim(const s:string):string; +procedure setlength(var s:string; l: byte); +(*$endif *) + +{ Write a string into a stream } +procedure String2Stream(stream:TMemorystream; const s:string); +(*@\\\0000001101*) + +{ The offset to UTC/GMT in minutes of the local time zone } +function TimeZoneBias:longint; + +{ Convert a string to HTML - currently only for latin 1 } +function text2html(const s:string):string; + +{ Why are these not in the language itself? } +function min(x,y: longint):longint; +function max(x,y: longint):longint; + +(*@/// Create a windows HWnd avoiding the stuff from forms *) +type + TWndProc = procedure (var Message: TMessage) of object; + +function AH_AllocateHWnd(Method: TWndProc): HWND; +procedure AH_DeallocateHWnd(Wnd: HWND); +(*@\\\*) + +(*@/// The routines to make the applications events use a list of methods *) +(*$ifndef delphi_ge_3 *) +procedure AddShowHintProc(proc:TShowHintEvent); +procedure RemoveShowHintProc(proc:TShowHintEvent); +(*$endif *) +procedure AddIdleProc(proc:TIdleEvent); +procedure RemoveIdleProc(proc:TIdleEvent); +(*@\\\*) + +(*@/// Make Stream and Clipboard work together *) +procedure Stream2Clipboard(stream:TStream; format:integer); +procedure Clipboard2Stream(stream:TStream; format:integer); +(*@\\\*) + +(*@/// Windows Resources and Languages *) +(*$ifdef delphi_gt_1 *) +function LoadStrEx(id:word; languageid: word):string; +(*$endif *) +function LoadStr(id:word):string; +(*@\\\*) + +function ScrollBarVisible(control: TWinControl; vertical: boolean):boolean; +(*@\\\0000002501*) +(*@/// implementation *) +implementation + +(*@/// Some string utility functions *) +(*@/// function posn(const s,t:string; count:integer):integer; *) +function posn(const s,t:string; count:integer):integer; + +{ find the count'th occurence of the substring, + if count<0 then look from the back } + +var + i,h,last: integer; + u: string; +begin + u:=t; + if count>0 then begin + result:=length(t); + for i:=1 to count do begin + h:=pos(s,u); + if h>0 then + u:=copy(u,pos(s,u)+1,length(u)) + else begin + u:=''; + inc(result); + end; + end; + result:=result-length(u); + end + else if count<0 then begin + last:=0; + for i:=length(t) downto 1 do begin + u:=copy(t,i,length(t)); + h:=pos(s,u); + if (h<>0) and (h+i<>last) then begin + last:=h+i-1; + inc(count); + if count=0 then BREAK; + end; + end; + if count=0 then result:=last + else result:=0; + end + else + result:=0; + end; +(*@\\\*) +(*@/// function exchange_s(const prior,after: string; const s:string):string; *) +function exchange_s(const prior,after: string; const s:string):string; +var + h,p: integer; +begin + result:=s; + p:=length(prior); + while true do begin + h:=pos(prior,result); + if h=0 then BREAK; + result:=copy(result,1,h-1)+after+copy(result,h+p,length(result)); + end; + end; +(*@\\\*) +(*@/// function poscn(c:char; const s:string; n: integer):integer; *) +function poscn(c:char; const s:string; n: integer):integer; + +{ Find the n'th occurence of a character different to c, + if n<0 look from the back } + +var + i: integer; +begin + if n=0 then n:=1; + if n>0 then begin + for i:=1 to length(s) do begin + if s[i]<>c then begin + dec(n); + result:=i; + if n=0 then begin + EXIT; + end; + end; + end; + end + else begin + for i:=length(s) downto 1 do begin + if s[i]<>c then begin + inc(n); + result:=i; + if n=0 then begin + EXIT; + end; + end; + end; + end; + poscn:=0; + end; +(*@\\\*) +(*@/// function filename_of(const s:string):string; *) +function filename_of(const s:string):string; +var + t:integer; +begin + t:=posn('\',s,-1); + if t>0 then + result:=copy(s,t+1,length(s)) + else begin + t:=posn(':',s,-1); + if t>0 then + result:=copy(s,t+1,length(s)) + else + result:=s; + end; + end; +(*@\\\*) +(*$ifdef delphi_1 *) +(*@/// function trim(const s:string):string; *) +function trim(const s:string):string; +var + h: integer; +begin + (* trim from left *) + h:=poscn(' ',s,1); + if h>0 then + result:=copy(s,h,length(s)) + else + result:=s; + (* trim from right *) + h:=poscn(' ',result,-1); + if h>0 then + result:=copy(result,1,h); + end; +(*@\\\*) +(*@/// procedure setlength(var s:string; l: byte); *) +procedure setlength(var s:string; l: byte); +begin + s[0]:=char(l); + end; +(*@\\\*) +(*$endif *) +(*@/// procedure String2Stream(stream:TMemorystream; const s:string); *) +procedure String2Stream(stream:TMemorystream; const s:string); +begin + stream.write(s[1],length(s)); + end; +(*@\\\*) +(*@\\\*) + +(*@/// function min(x,y: longint):longint; *) +function min(x,y: longint):longint; +begin + if xy then result:=x + else result:=y; + end; +(*@\\\*) + +(*@/// function TimeZoneBias:longint; // in minutes ! *) +function TimeZoneBias:longint; +(*@/// 16 bit way: try a 32bit API call via thunking layer, if that fails try the TZ *) +(*$ifdef delphi_1 *) +(*@/// function GetEnvVar(const s:string):string; *) +function GetEnvVar(const s:string):string; +var + L: Word; + P: PChar; +begin + L := length(s); + P := GetDosEnvironment; + while P^ <> #0 do begin + if (StrLIComp(P, PChar(@s[1]), L) = 0) and (P[L] = '=') then begin + GetEnvVar := StrPas(P + L + 1); + EXIT; + end; + Inc(P, StrLen(P) + 1); + end; + GetEnvVar := ''; + end; +(*@\\\*) + +(*@/// function day_in_month(month,year,weekday: word; count: integer):TDateTime; *) +function day_in_month(month,year,weekday: word; count: integer):TDateTime; +var + h: integer; +begin + if count>0 then begin + h:=dayofweek(encodedate(year,month,1)); + h:=((weekday-h+7) mod 7) +1 + (count-1)*7; + result:=encodedate(year,month,h); + end + else begin + h:=dayofweek(encodedate(year,month,1)); + h:=((weekday-h+7) mod 7) +1 + 6*7; + while count<0 do begin + h:=h-7; + try + result:=encodedate(year,month,h); + inc(count); + if count=0 then EXIT; + except + end; + end; + end; + end; +(*@\\\*) +(*@/// function DayLight_Start:TDateTime; // american way ! *) +function DayLight_Start:TDateTime; +var + y,m,d: word; +begin + DecodeDate(now,y,m,d); + result:=day_in_month(4,y,1,1); + (* for european one: day_in_month(3,y,1,-1) *) + end; +(*@\\\*) +(*@/// function DayLight_End:TDateTime; // american way ! *) +function DayLight_End:TDateTime; +var + y,m,d: word; +begin + DecodeDate(now,y,m,d); + result:=day_in_month(10,y,1,-1); + end; +(*@\\\*) +type (* stolen from windows.pas *) + (*@/// TSystemTime = record ... end; *) + PSystemTime = ^TSystemTime; + TSystemTime = record + wYear: Word; + wMonth: Word; + wDayOfWeek: Word; + wDay: Word; + wHour: Word; + wMinute: Word; + wSecond: Word; + wMilliseconds: Word; + end; + (*@\\\*) + (*@/// TTimeZoneInformation = record ... end; *) + TTimeZoneInformation = record + Bias: Longint; + StandardName: array[0..31] of word; (* wchar *) + StandardDate: TSystemTime; + StandardBias: Longint; + DaylightName: array[0..31] of word; (* wchar *) + DaylightDate: TSystemTime; + DaylightBias: Longint; + end; + (*@\\\*) +var + tz_info: TTimeZoneInformation; + LL32:function (LibFileName: PChar; handle: longint; special: longint):Longint; + FL32:function (hDll: Longint):boolean; + GA32:function (hDll: Longint; functionname: PChar):longint; + CP32:function (buffer:TTimeZoneInformation; prochandle,adressconvert,dwParams:Longint):longint; + hdll32,dummy,farproc: longint; + hdll:THandle; + sign: integer; + s: string; +begin + hDll:=GetModuleHandle('kernel'); { get the 16bit handle of kernel } + @LL32:=GetProcAddress(hdll,'LoadLibraryEx32W'); { get the thunking layer functions } + @FL32:=GetProcAddress(hdll,'FreeLibrary32W'); + @GA32:=GetProcAddress(hdll,'GetProcAddress32W'); + @CP32:=GetProcAddress(hdll,'CallProc32W'); + (*@/// if possible then call GetTimeZoneInformation via Thunking *) + if (@LL32<>NIL) and + (@FL32<>NIL) and + (@GA32<>NIL) and + (@CP32<>NIL) then begin + hDll32:=LL32('kernel32.dll',dummy,1); { get the 32bit handle of kernel32 } + farproc:=GA32(hDll32,'GetTimeZoneInformation'); { get the 32bit adress of the function } + case CP32(tz_info,farproc,1,1) of { and call it } + 1: result:=tz_info.StandardBias+tz_info.Bias; + 2: result:=tz_info.DaylightBias+tz_info.Bias; + else result:=0; + end; + FL32(hDll32); { and free the 32bit dll } + end + (*@\\\*) + (*@/// else calculate the bias out of the TZ environment variable *) + else begin + s:=GetEnvVar('TZ'); + while (length(s)>0) and (not(s[1] in ['+','-','0'..'9'])) do + s:=copy(s,2,length(s)); + case s[1] of + (*@/// '+': *) + '+': begin + sign:=1; + s:=copy(s,2,length(s)); + end; + (*@\\\*) + (*@/// '-': *) + '-': begin + sign:=-1; + s:=copy(s,2,length(s)); + end; + (*@\\\*) + else sign:=1; + end; + try + result:=strtoint(copy(s,1,2))*60; + s:=copy(s,3,length(s)); + except + try + result:=strtoint(s[1])*60; + s:=copy(s,2,length(s)); + except + result:=0; + end; + end; + (*@/// if s[1]=':' then minutes offset *) + if s[1]=':' then begin + try + result:=result+strtoint(copy(s,2,2)); + s:=copy(s,4,length(s)); + except + try + result:=result+strtoint(s[2]); + s:=copy(s,3,length(s)); + except + end; + end; + end; + (*@\\\*) + (*@/// if s[1]=':' then seconds offset - ignored *) + if s[1]=':' then begin + try + strtoint(copy(s,2,2)); + s:=copy(s,4,length(s)); + except + try + strtoint(s[2]); + s:=copy(s,3,length(s)); + except + end; + end; + end; + (*@\\\*) + result:=result*sign; + (*@/// if length(s)>0 then daylight saving activated, calculate it *) + if length(s)>0 then begin + (* forget about the few hours on the start/end day *) + if (now>daylight_start) and (now' : t:='>'; + #160: t:=' '; + '' : t:='¡'; + '' : t:='¢'; + '' : t:='£'; + '' : t:='¤'; (* € ??? *) + '' : t:='¥'; + '' : t:='¦'; + '' : t:='§'; + '' : t:='¨'; + '' : t:='©'; + '' : t:='ª'; + '' : t:='«'; + '' : t:='¬'; + '' : t:='­'; + '' : t:='®'; + '' : t:='¯'; + '' : t:='°'; + '' : t:='±'; + '' : t:='²'; + '' : t:='³'; + '' : t:='´'; + '' : t:='µ'; + '' : t:='¶'; + '' : t:='·'; + '' : t:='¸le;'; + '' : t:='¹'; + '' : t:='º'; + '' : t:='»'; + '' : t:='¼'; + '' : t:='½'; + '' : t:='¾'; + '' : t:='¿'; + '' : t:='À'; + '' : t:='Á'; + '' : t:='Â'; + '' : t:='Ã'; + '' : t:='Ä'; + '' : t:='Å'; + '' : t:='Æ'; + '' : t:='Ç'; + '' : t:='È'; + '' : t:='É'; + '' : t:='Ê'; + '' : t:='Ë'; + '' : t:='Ì'; + '' : t:='Í'; + '' : t:='Î'; + '' : t:='Ï'; + '' : t:='Ð'; + '' : t:='Ñ'; + '' : t:='Ò'; + '' : t:='Ó'; + '' : t:='Ô'; + '' : t:='Õ'; + '' : t:='Ö'; + '' : t:='×'; + '' : t:='Ø'; + '' : t:='Ù'; + '' : t:='Ú'; + '' : t:='Û'; + '' : t:='Ü'; + '' : t:='Ý'; + '' : t:='Þ'; + '' : t:='ß'; + '' : t:='à'; + '' : t:='á'; + '' : t:='â'; + '' : t:='ã'; + '' : t:='ä'; + '' : t:='å'; + '' : t:='æ'; + '' : t:='ç'; + '' : t:='è'; + '' : t:='é'; + '' : t:='ê'; + '' : t:='ë'; + '' : t:='ì'; + '' : t:='í'; + '' : t:='î'; + '' : t:='ï'; + '' : t:='ð'; + '' : t:='ñ'; + '' : t:='ò'; + '' : t:='ó'; + '' : t:='ô'; + '' : t:='õ'; + '' : t:='ö'; + '' : t:='÷'; + '' : t:='ø'; + '' : t:='ù'; + '' : t:='ú'; + '' : t:='û'; + '' : t:='ü'; + '' : t:='ý'; + '' : t:='þ'; + #255: t:='ÿ'; + (*$endif *) + (*@\\\000000650C*) + else t:=s[i]; + end; + result:=result+t; + end; + end; +(*@\\\*) + +(*@/// To have OnShowHint/OnIdle lists instead of single methods *) +{ These are just a few help tools for the Application.OnShowHint and } +{ Application.OnIdle methods - Borland didn't thought of the need to } +{ put more than one method in these places, so I had to do it myself. } +{ At least there's a way to avoid this stuff with Delphi 2/3 with } +{ the cm_hintshow message which is sent just before the OnSHowHint event, } +{ but as this stuff should work with any version of Delphi I stay with } +{ the event list... } +{ Some nice internals how to work with method pointer are presented here. } + +(*@/// TObjectList = class(TList) // A list which frees it's objects *) +type + TObjectList = class(TList) + public + destructor Destroy; override; + +{ Why hasn't Borland made the delete method virtual??? Now I must create } +{ a new virtual slot with all the problems this may cause just because } +{ of a missing word... - first cause is the remove method which is absolutely } +{ the same as in TList, but as Delete isn't virtual I need it here again. } + +{ I you want to use this component anywhere else be VERY careful, any call } +{ as a TList may cause problems } + + procedure Delete(Index:Integer); virtual; + function Remove(Item:Pointer):Integer; virtual; + end; + +{ TObjectList } +(*@/// destructor TObjectList.Destroy; *) +destructor TObjectList.Destroy; +var + i: integer; +begin + for i:=count-1 downto 0 do + TObject(items[i]).Free; + inherited destroy; + Clear; +end; +(*@\\\*) +(*@/// procedure TObjectList.Delete(Index:Integer); *) +procedure TObjectList.Delete(Index:Integer); +begin + TObject(items[index]).Free; + inherited delete(index); + end; +(*@\\\*) +(*@/// function TObjectList.Remove(Item:Pointer):Integer; *) +function TObjectList.Remove(Item:Pointer):Integer; +begin + Result := IndexOf(Item); + if Result <> -1 then Delete(Result); + end; +(*@\\\*) +(*@\\\*) + +type + TMethodPointer = procedure of object; + (*@/// TMethod = class(TObject) // Object with just one methodpointer *) + TMethod = class(TObject) + public + methodpointer: TMethodPointer; + end; + (*@\\\*) + +const +(*$ifndef delphi_ge_3 *) + ShowHintProcs: TObjectList =NIL; +(*$endif *) + IdleProcs: TObjectList =NIL; + +(*@/// TDummyObject = class(TObject) // A dummy object for the Application events *) +{ TDummyObject } + +{ A little dummy object which provides the methods to be put in the } +{ application's method pointers; if you use this you shouldn't access } +{ Application.OnIdle and Application.OnShowHint directly but always use } +{ the Add/RemoveXXXProc routines } +{ You can add any other Application.OnXXX method here if you need it } + +type + TDummyObject=class(TObject) +(*$ifndef delphi_ge_3 *) +(*$ifdef shortstring *) + procedure ShowHint(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo); +(*$else *) + procedure ShowHint(var HintStr: ansistring; var CanShow: Boolean; var HintInfo: THintInfo); +(*$endif *) +(*$endif *) + procedure DoIdle(sender: TObject; var done:Boolean); + end; +(*$ifndef delphi_ge_3 *) +(*@/// procedure TDummyObject.ShowHint(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo); *) + +(*$ifdef shortstring *) +procedure TDummyObject.ShowHint(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo); +(*$else *) +procedure TDummyObject.ShowHint(var HintStr: ansistring; var CanShow: Boolean; var HintInfo: THintInfo); +(*$endif *) +var + i:integer; +begin + for i:=ShowHintProcs.Count-1 downto 0 do + if ShowHintProcs.Items[i]<>NIL then begin + TShowHintEvent(TMethod(ShowHintProcs.Items[i]).methodpointer)(HintStr,CanShow,HintInfo); + end; + end; +(*@\\\*) +(*$endif *) +(*@/// procedure TDummyObject.DoIdle(sender: TObject; var done:Boolean); *) +procedure TDummyObject.DoIdle(sender: TObject; var done:Boolean); +var + i:integer; + temp_done: boolean; +begin + done:=false; + for i:=IdleProcs.Count-1 downto 0 do + if IdleProcs.Items[i]<>NIL then begin + TIdleEvent(TMethod(IdleProcs.Items[i]).methodpointer)(sender, temp_done); + done:=done and temp_done; (* done when all idle procs say done *) + end; + end; +(*@\\\*) +(*@\\\0000000301*) + +const + Dummy: TDummyObject =NIL; + +(*@/// Compare two method pointers *) +function compare_method(proc1,proc2:TMethodpointer):boolean; + +{ A method pointer is just a record of two pointers, one the procedure } +{ pointer itself, then the self pointer which is pushed as the first } +{ parameter of the procedure } + +type + (*@/// T_Method=packed record *) + T_Method=packed record + proc: Pointer; + self: TObject; + end; + (*@\\\*) +begin + result:=(T_Method(proc1).proc=T_Method(proc2).proc) and + (T_Method(proc1).self=T_Method(proc2).self); + end; +(*@\\\*) +(*@/// Include and remove the Methodpointer from the according lists *) +(*$ifndef delphi_ge_3 *) +(*@/// procedure AddShowHintProc(proc:TShowHintEvent); *) +procedure AddShowHintProc(proc:TShowHintEvent); +var + method: TMethod; +begin + if (dummy=NIL) or (showhintprocs=NIL) then exit; + method:=TMethod.Create; + method.methodpointer:=TMethodPointer(proc); + showhintprocs.add(method); + Application.OnShowHint:=dummy.ShowHint; + end; +(*@\\\0000000501*) +(*@/// procedure RemoveShowHintProc(proc:TShowHintEvent); *) +procedure RemoveShowHintProc(proc:TShowHintEvent); +var + i: integer; +begin + if (dummy=NIL) or (showhintprocs=NIL) then exit; + for i:=showhintprocs.count-1 downto 0 do + if (showhintprocs.items[i]<>NIL) and + compare_method(TMethod(showhintprocs.items[i]).methodpointer, + TMethodpointer(proc)) then + showhintprocs.delete(i); + end; +(*@\\\*) +(*$endif *) +(*@/// procedure AddIdleProc(proc:TIdleEvent); *) +procedure AddIdleProc(proc:TIdleEvent); +var + method: TMethod; +begin + if (dummy=NIL) or (idleprocs=NIL) then exit; + method:=TMethod.Create; + method.methodpointer:=TMethodPointer(proc); + idleprocs.add(method); + Application.OnIdle:=dummy.DoIdle; + end; +(*@\\\*) +(*@/// procedure RemoveIdleProc(proc:TIdleEvent); *) +procedure RemoveIdleProc(proc:TIdleEvent); +var + i: integer; +begin + if (dummy=NIL) or (idleprocs=NIL) then exit; + for i:=idleprocs.count-1 downto 0 do + if (idleprocs.items[i]<>NIL) and + compare_method(TMethod(idleprocs.items[i]).methodpointer, + TMethodpointer(proc)) then + idleprocs.delete(i); + end; +(*@\\\*) +(*@\\\000000062B*) +(*@\\\*) +(*@/// Generating HWnd's without the routines in forms *) +{ Creating a new HWnd with a WndProc for an arbitrary class. Just the same } +{ as the routines in forms, but without the assembler stuff and using simple } +{ TList's for the storage - maybe not as fast the original routines, but } +{ much easier to understand and to use. This is only for fun here as the } +{ routines in forms do absolutely the same, but this stuff may be used to } +{ create an console application without using forms but receiving Windows } +{ messages. } + +const + (*@/// UtilWindowClass: TWndClass = (...); *) + UtilWindowClass: TWndClass = ( + style: 0; + lpfnWndProc: @DefWindowProc; + cbClsExtra: 0; + cbWndExtra: 0; + hInstance: 0; + hIcon: 0; + hCursor: 0; + hbrBackground: 0; + lpszMenuName: nil; + lpszClassName: 'TAHUtilWindow'); + (*@\\\*) + WndProcs: TObjectList =NIL; + WndWnds: TList =NIL; + +{ Converts a Windows WndProc (HWnd as parameter) to a Delphi method with } +{ self as implicit first parameter by looking up the HWnd in the List } +(*@/// function AH_StdWndProc(Window: HWND; Message,WParam,LParam: Word/Longint); *) +(*$ifdef delphi_1 *) +function AH_StdWndProc(Window: HWND; Message: Longint; WParam: Word; + LParam: Longint): Longint; export; +(*$else *) +function AH_StdWndProc(Window: HWND; Message: Word; WParam: Longint; + LParam: Longint): Longint; stdcall; +(*$endif *) +var + p: integer; + m: TMessage; +begin + m.msg:=message; + m.wparam:=wparam; + m.lparam:=lparam; + m.result:=0; + p:=wndwnds.indexof(pointer(window)); + if p>=0 then + TWndProc(TMethod(wndprocs.Items[p]).methodpointer)(m); + result:=m.result; + end; +(*@\\\0000000112*) +{ Creates a new HWnd and link it with the given Method } +(*@/// function AH_AllocateHWnd(Method: TWndProc): HWND; *) +function AH_AllocateHWnd(Method: TWndProc): HWND; +var + tempmethod: TMethod; + TempClass: TWndClass; +begin + result:=0; + if (wndprocs=NIL) then exit; + + UtilWindowClass.hInstance := HInstance; + if not GetClassInfo(HInstance, UtilWindowClass.lpszClassName, TempClass) then +(*$ifdef delphi_1 *) + WinProcs.RegisterClass(UtilWindowClass); +(*$else *) + Windows.RegisterClass(UtilWindowClass); +(*$endif *) + Result := CreateWindow(UtilWindowClass.lpszClassName, '', 0, + 0, 0, 0, 0, 0, 0, HInstance, nil); + + tempmethod:=TMethod.Create; + tempmethod.methodpointer:=TMethodPointer(method); + + { These two lists must be absolutely parallel, otherwise the messages may } + { go to the wrong object } + wndprocs.add(tempmethod); + wndwnds.add(pointer(result)); + + SetWindowLong(Result, GWL_WNDPROC, Longint(@AH_StdWndProc)); +end; +(*@\\\0000000B12*) +{ Removes the HWnd both in Windows an in the internal lists } +(*@/// procedure AH_DeallocateHWnd(Wnd: HWND); *) +procedure AH_DeallocateHWnd(Wnd: HWND); +var + p: integer; +begin + DestroyWindow(Wnd); + p:=wndwnds.remove(pointer(Wnd)); + if p>=0 then + wndprocs.delete(p); +end; +(*@\\\*) +(*@\\\0000001401*) + +(*@/// Make Stream and Clipboard work together *) +(*@/// function GetPointer(index: integer; memblock: THandle):pointer; *) +function GetPointer(index: integer; memblock: THandle):pointer; +(*$ifdef delphi_1 *) +var + selector, offset: word; + P: pointer; +begin + selector:=(index div 65536) * selectorinc + memblock; + offset:=(index mod 65536); + p:=GlobalLock(Selector); + result:=Ptr(selector,offset); + end; +(*$else *) +begin + result:=pointer(longint(GlobalLock(memblock))+index); + end; +(*$endif *) +(*@\\\0000000212*) +(*@/// procedure Stream2Clipboard(stream:TStream; format:integer); *) +procedure Stream2Clipboard(stream:TStream; format:integer); +const + max_write = $8000; (* must obey ($10000 mod max_write = 0) for Delphi 1 *) +var + size: longint; + s: word; + curpos: longint; + Memblock: THandle; + FClipboardWindow: THandle; +begin + FClipboardWindow := Application.Handle; + if FClipboardWindow = 0 then + FClipboardWindow := AllocateHWnd(NIL); + OpenClipboard(FClipboardWindow); + + stream.seek(0,0); + size:=stream.size; + stream.seek(0,0); + MemBlock:=GlobalAlloc(gmem_moveable or gmem_zeroinit,size+1); + curpos:=0; + while curpos+1Application.Handle then + DeallocateHWnd(FClipboardWindow); + end; +(*@\\\0000001601*) +(*@/// procedure Clipboard2Stream(stream:TStream; format:integer); *) +procedure Clipboard2Stream(stream:TStream; format:integer); +const + max_read = $8000; (* must obey ($10000 mod max_read = 0) for Delphi 1 *) +var + size: longint; + curpos: longint; + Memblock: THandle; + FClipboardWindow: THandle; +begin + FClipboardWindow := Application.Handle; + if FClipboardWindow = 0 then + FClipboardWindow := AllocateHWnd(NIL); + OpenClipboard(FClipboardWindow); + + stream.seek(0,0); + MemBlock:=GetClipboardData(format); + size:=GlobalSize(Memblock); + curpos:=0; + while curpos+1Application.Handle then + DeallocateHWnd(FClipboardWindow); + end; +(*@\\\0000000C01*) +(*@\\\0000000301*) + +(*@/// Windows Resources and Languages *) +(*$ifdef delphi_gt_1 *) +(*@/// function makelangid(language,sublanguage: word):longint; *) +function makelangid(language,sublanguage: word):longint; +begin + result:=((language and $3FF) or ((sublanguage and $3F) shl 10)) and $FFFF; + end; +(*@\\\*) +(*@/// function primarylangid(language:word):word; *) +function primarylangid(language:word):word; +begin + result:=language and $3FF; + end; +(*@\\\*) +(*@/// function sublangid(language:word):word; *) +function sublangid(language:word):word; +begin + result:=(language shr 10) and $3F; + end; +(*@\\\*) +(*@/// function langidfromlcid(lcid:longint):word; *) +function langidfromlcid(lcid:longint):word; +begin + result:=lcid and $FFFF; + end; +(*@\\\*) + +(*@/// function MyLoadStringInternal(Instance: THandle; Id: word; languageid: word):string; *) +function MyLoadStringInternal(Instance: THandle; Id: word; languageid: word):string; +var + h,h1: THandle; + p: ^word; + _length: word; + i: integer; +begin + h:=FindResourceEx(Instance,rt_string,MakeIntResource((id div 16)+1),languageid); + if h<>0 then begin + h1:=Loadresource(Instance,h); + p:=LockResource(h1); + i:=id mod 16; + while i>0 do begin + _length:=p^; + inc(p,_length+1); + dec(i); + end; + _length:=p^; + inc(p); + setlength(result,WideCharToMultiByte(cp_acp,0,PWideChar(p),_length,NIL,0,NIL,NIL)); + WideCharToMultiByte(cp_acp,0,PWideChar(p),_length,@result[1],length(result),NIL,NIL); + FreeResource(h1); + end + else + result:=''; + end; +(*@\\\*) +(*@/// function MyLoadString(Instance: THandle; Id: word; languageid: word):string; *) +function MyLoadString(Instance: THandle; Id: word; languageid: word):string; +begin + result:=MyLoadStringInternal(Instance,id,languageid); + if result='' then + result:=MyLoadStringInternal(Instance,id,makelangid(primarylangid(languageid),sublang_default)); + if result='' then + result:=MyLoadStringInternal(Instance,id,makelangid(primarylangid(languageid),sublang_neutral)); + if result='' then + result:=MyLoadStringInternal(Instance,id,makelangid(lang_neutral,sublang_neutral)); + end; +(*@\\\*) +(*@/// function LoadStrEx(id:word; languageid: word):string; *) +function LoadStrEx(id:word; languageid: word):string; +begin + result:=MyLoadString(HInstance,id,languageid); + end; +(*@\\\*) +(*$endif *) +(*@/// function LoadStr(id:word):string; *) +function LoadStr(id:word):string; +begin + (*$ifdef delphi_gt_1 *) + result:=MyLoadString(HInstance,id,GetUserDefaultLangId); + (*$else *) + result:=sysutils.loadstr(id); + (*$endif *) + end; +(*@\\\003C00050100060100070100080100070B*) +(*@\\\*) + +(*@/// function ScrollBarVisible(control: TWinControl; vertical: boolean):boolean; *) +function ScrollBarVisible(control: TWinControl; vertical: boolean):boolean; +(*$ifdef delphi_1 *) +var + code: integer; + min,max: integer; +begin + if vertical then + code:=sb_vert + else + code:=sb_horz; + GetScrollRange(control.handle,code,min,max); + result:=(min<>max); + end; +(*$else *) +var + code: integer; + ScrollInfo: TScrollInfo; +begin + if vertical then + code:=sb_vert + else + code:=sb_horz; + scrollinfo.cbsize:=sizeof(scrollinfo); + scrollinfo.fmask:=sif_all; + if GetScrollInfo(control.handle,code,scrollinfo) then + result:=(scrollinfo.nmax<>scrollinfo.nmin) + else + result:=false; + end; +(*$endif *) +(*@\\\*) + +(*@/// procedure DoneUnit; // The cleanup of the unit, called in finalization *) +procedure DoneUnit; far; +begin +(*$ifndef delphi_ge_3 *) +{ For design mode: relink the OnShowHint back to it's default value; } +{ only needed since with Delphi 3 packages the finalization may be } +{ called without Delphi itself is closed } + + if (ShowHintProcs<>NIL) and + (ShowHintProcs.Count>0) then + Application.OnShowHint:=TShowHintEvent(TMethod(ShowHintProcs.Items[0]).methodpointer); + +{ The explicit removing of the list entries is needed since the delete method } +{ of the TLIst isn't virtual an therefore not called by the Free } + if ShowHintProcs<>NIL then + while ShowHintProcs.Count>0 do + ShowHintProcs.delete(0); + ShowHintProcs.Free; + ShowHintProcs:=NIL; +(*$endif *) + if IdleProcs<>NIL then + while IdleProcs.Count>0 do + IdleProcs.delete(0); + IdleProcs.Free; + IdleProcs:=NIL; + Dummy.Free; + Dummy:=NIL; + +{ The explicit removing of the list entries is needed since the delete method } +{ of the TLIst isn't virtual an therefore not called by the Free } + if WndProcs<>NIL then + while WndProcs.Count>0 do + WndProcs.delete(0); + WndProcs.Free; + WndProcs:=NIL; + WndWnds.Free; + WndWnds:=NIL; + end; +(*@\\\*) +(*@\\\0000001101*) +(*@/// initialization *) +(*$ifndef delphi_ge_3 *) +var + t:TShowHintEvent; +(*$endif *) +(*$ifdef delphi_1 *) +begin +(*$else *) +initialization +begin +(*$endif *) + Dummy:=TDummyObject.Create; + IdleProcs:=TObjectList.Create; + + (* Since Delphi 3 there is the CM_HINTSHOW instead, + so this isn't needed anymore *) +(*$ifndef delphi_ge_3 *) + ShowHintProcs:=TObjectList.Create; + t:=application.OnShowHint; + if assigned(t) then { D1 can't do a assigned of a property } + AddShowHintProc(t); { In design mode the OnShowHint is responsible } + { for the hints of the component palette so I } + { need to remember this } +(*$endif *) + WndProcs:=TObjectList.Create; + WndWnds:=TList.Create; +(*@\\\000000040C*) +(*@/// finalization *) +(*$ifdef delphi_1 *) + AddExitProc(DoneUnit); +(*$else *) + end; +finalization + DoneUnit; +(*$endif *) +(*@\\\0000000201*) +end. +(*@\\\0003000701000011000701*) diff --git a/lib/aligrid21/AH_TOOL.dcu b/lib/aligrid21/AH_TOOL.dcu new file mode 100644 index 00000000..9932b4e1 Binary files /dev/null and b/lib/aligrid21/AH_TOOL.dcu differ diff --git a/lib/aligrid21/AH_TOOL.~PAS b/lib/aligrid21/AH_TOOL.~PAS new file mode 100644 index 00000000..abccd656 --- /dev/null +++ b/lib/aligrid21/AH_TOOL.~PAS @@ -0,0 +1,1156 @@ +unit ah_tool; +{ Copyright 1995-200 Andreas Hrstemeier Version 1.1 2001-06-04 } +{ this utility functions are public domain. They are used by several of my } +{ components. In case you have several version of this file always use the } +{ latest one. Please check the file readme.txt of the component you found } +{ this file at for more detailed info on usage and distributing. } +(*@/// interface *) +interface + +(*$b- *) + (*$i ah_def.inc *) + +uses +(*$ifdef delphi_1 *) + winprocs, + wintypes, +(*$else *) + windows, +(*$endif *) + messages, + sysutils, + classes, + controls, + forms; + +(*@/// String utility functions *) +{ Find n'th occurence of a substring, from left or from right } +function posn(const s,t:string; count:integer):integer; + +{ Find the n'th char unequal from left or from right } +function poscn(c:char; const s:string; n: integer):integer; + +{ Exchange all occurances of a string by another (e.g. ,->.) } +function exchange_s(const prior,after: string; const s:string):string; + +{ Delphi 1 didn't know these, but they are useful/necessary for D2/D3 } +(*$ifdef delphi_1 *) +function trim(const s:string):string; +procedure setlength(var s:string; l: byte); +(*$endif *) + +{ Write a string into a stream } +procedure String2Stream(stream:TMemorystream; const s:string); +(*@\\\0000001101*) + +{ The offset to UTC/GMT in minutes of the local time zone } +function TimeZoneBias:longint; + +{ Convert a string to HTML - currently only for latin 1 } +function text2html(const s:string):string; + +{ Why are these not in the language itself? } +function min(x,y: longint):longint; +function max(x,y: longint):longint; + +(*@/// Create a windows HWnd avoiding the stuff from forms *) +type + TWndProc = procedure (var Message: TMessage) of object; + +function AH_AllocateHWnd(Method: TWndProc): HWND; +procedure AH_DeallocateHWnd(Wnd: HWND); +(*@\\\*) + +(*@/// The routines to make the applications events use a list of methods *) +(*$ifndef delphi_ge_3 *) +procedure AddShowHintProc(proc:TShowHintEvent); +procedure RemoveShowHintProc(proc:TShowHintEvent); +(*$endif *) +procedure AddIdleProc(proc:TIdleEvent); +procedure RemoveIdleProc(proc:TIdleEvent); +(*@\\\*) + +(*@/// Make Stream and Clipboard work together *) +procedure Stream2Clipboard(stream:TStream; format:integer); +procedure Clipboard2Stream(stream:TStream; format:integer); +(*@\\\*) + +(*@/// Windows Resources and Languages *) +(*$ifdef delphi_gt_1 *) +function LoadStrEx(id:word; languageid: word):string; +(*$endif *) +function LoadStr(id:word):string; +(*@\\\*) + +function ScrollBarVisible(control: TWinControl; vertical: boolean):boolean; +(*@\\\0000002501*) +(*@/// implementation *) +implementation + +(*@/// Some string utility functions *) +(*@/// function posn(const s,t:string; count:integer):integer; *) +function posn(const s,t:string; count:integer):integer; + +{ find the count'th occurence of the substring, + if count<0 then look from the back } + +var + i,h,last: integer; + u: string; +begin + u:=t; + if count>0 then begin + result:=length(t); + for i:=1 to count do begin + h:=pos(s,u); + if h>0 then + u:=copy(u,pos(s,u)+1,length(u)) + else begin + u:=''; + inc(result); + end; + end; + result:=result-length(u); + end + else if count<0 then begin + last:=0; + for i:=length(t) downto 1 do begin + u:=copy(t,i,length(t)); + h:=pos(s,u); + if (h<>0) and (h+i<>last) then begin + last:=h+i-1; + inc(count); + if count=0 then BREAK; + end; + end; + if count=0 then result:=last + else result:=0; + end + else + result:=0; + end; +(*@\\\*) +(*@/// function exchange_s(const prior,after: string; const s:string):string; *) +function exchange_s(const prior,after: string; const s:string):string; +var + h,p: integer; +begin + result:=s; + p:=length(prior); + while true do begin + h:=pos(prior,result); + if h=0 then BREAK; + result:=copy(result,1,h-1)+after+copy(result,h+p,length(result)); + end; + end; +(*@\\\*) +(*@/// function poscn(c:char; const s:string; n: integer):integer; *) +function poscn(c:char; const s:string; n: integer):integer; + +{ Find the n'th occurence of a character different to c, + if n<0 look from the back } + +var + i: integer; +begin + if n=0 then n:=1; + if n>0 then begin + for i:=1 to length(s) do begin + if s[i]<>c then begin + dec(n); + result:=i; + if n=0 then begin + EXIT; + end; + end; + end; + end + else begin + for i:=length(s) downto 1 do begin + if s[i]<>c then begin + inc(n); + result:=i; + if n=0 then begin + EXIT; + end; + end; + end; + end; + poscn:=0; + end; +(*@\\\*) +(*@/// function filename_of(const s:string):string; *) +function filename_of(const s:string):string; +var + t:integer; +begin + t:=posn('\',s,-1); + if t>0 then + result:=copy(s,t+1,length(s)) + else begin + t:=posn(':',s,-1); + if t>0 then + result:=copy(s,t+1,length(s)) + else + result:=s; + end; + end; +(*@\\\*) +(*$ifdef delphi_1 *) +(*@/// function trim(const s:string):string; *) +function trim(const s:string):string; +var + h: integer; +begin + (* trim from left *) + h:=poscn(' ',s,1); + if h>0 then + result:=copy(s,h,length(s)) + else + result:=s; + (* trim from right *) + h:=poscn(' ',result,-1); + if h>0 then + result:=copy(result,1,h); + end; +(*@\\\*) +(*@/// procedure setlength(var s:string; l: byte); *) +procedure setlength(var s:string; l: byte); +begin + s[0]:=char(l); + end; +(*@\\\*) +(*$endif *) +(*@/// procedure String2Stream(stream:TMemorystream; const s:string); *) +procedure String2Stream(stream:TMemorystream; const s:string); +begin + stream.write(s[1],length(s)); + end; +(*@\\\*) +(*@\\\*) + +(*@/// function min(x,y: longint):longint; *) +function min(x,y: longint):longint; +begin + if xy then result:=x + else result:=y; + end; +(*@\\\*) + +(*@/// function TimeZoneBias:longint; // in minutes ! *) +function TimeZoneBias:longint; +(*@/// 16 bit way: try a 32bit API call via thunking layer, if that fails try the TZ *) +(*$ifdef delphi_1 *) +(*@/// function GetEnvVar(const s:string):string; *) +function GetEnvVar(const s:string):string; +var + L: Word; + P: PChar; +begin + L := length(s); + P := GetDosEnvironment; + while P^ <> #0 do begin + if (StrLIComp(P, PChar(@s[1]), L) = 0) and (P[L] = '=') then begin + GetEnvVar := StrPas(P + L + 1); + EXIT; + end; + Inc(P, StrLen(P) + 1); + end; + GetEnvVar := ''; + end; +(*@\\\*) + +(*@/// function day_in_month(month,year,weekday: word; count: integer):TDateTime; *) +function day_in_month(month,year,weekday: word; count: integer):TDateTime; +var + h: integer; +begin + if count>0 then begin + h:=dayofweek(encodedate(year,month,1)); + h:=((weekday-h+7) mod 7) +1 + (count-1)*7; + result:=encodedate(year,month,h); + end + else begin + h:=dayofweek(encodedate(year,month,1)); + h:=((weekday-h+7) mod 7) +1 + 6*7; + while count<0 do begin + h:=h-7; + try + result:=encodedate(year,month,h); + inc(count); + if count=0 then EXIT; + except + end; + end; + end; + end; +(*@\\\*) +(*@/// function DayLight_Start:TDateTime; // american way ! *) +function DayLight_Start:TDateTime; +var + y,m,d: word; +begin + DecodeDate(now,y,m,d); + result:=day_in_month(4,y,1,1); + (* for european one: day_in_month(3,y,1,-1) *) + end; +(*@\\\*) +(*@/// function DayLight_End:TDateTime; // american way ! *) +function DayLight_End:TDateTime; +var + y,m,d: word; +begin + DecodeDate(now,y,m,d); + result:=day_in_month(10,y,1,-1); + end; +(*@\\\*) +type (* stolen from windows.pas *) + (*@/// TSystemTime = record ... end; *) + PSystemTime = ^TSystemTime; + TSystemTime = record + wYear: Word; + wMonth: Word; + wDayOfWeek: Word; + wDay: Word; + wHour: Word; + wMinute: Word; + wSecond: Word; + wMilliseconds: Word; + end; + (*@\\\*) + (*@/// TTimeZoneInformation = record ... end; *) + TTimeZoneInformation = record + Bias: Longint; + StandardName: array[0..31] of word; (* wchar *) + StandardDate: TSystemTime; + StandardBias: Longint; + DaylightName: array[0..31] of word; (* wchar *) + DaylightDate: TSystemTime; + DaylightBias: Longint; + end; + (*@\\\*) +var + tz_info: TTimeZoneInformation; + LL32:function (LibFileName: PChar; handle: longint; special: longint):Longint; + FL32:function (hDll: Longint):boolean; + GA32:function (hDll: Longint; functionname: PChar):longint; + CP32:function (buffer:TTimeZoneInformation; prochandle,adressconvert,dwParams:Longint):longint; + hdll32,dummy,farproc: longint; + hdll:THandle; + sign: integer; + s: string; +begin + hDll:=GetModuleHandle('kernel'); { get the 16bit handle of kernel } + @LL32:=GetProcAddress(hdll,'LoadLibraryEx32W'); { get the thunking layer functions } + @FL32:=GetProcAddress(hdll,'FreeLibrary32W'); + @GA32:=GetProcAddress(hdll,'GetProcAddress32W'); + @CP32:=GetProcAddress(hdll,'CallProc32W'); + (*@/// if possible then call GetTimeZoneInformation via Thunking *) + if (@LL32<>NIL) and + (@FL32<>NIL) and + (@GA32<>NIL) and + (@CP32<>NIL) then begin + hDll32:=LL32('kernel32.dll',dummy,1); { get the 32bit handle of kernel32 } + farproc:=GA32(hDll32,'GetTimeZoneInformation'); { get the 32bit adress of the function } + case CP32(tz_info,farproc,1,1) of { and call it } + 1: result:=tz_info.StandardBias+tz_info.Bias; + 2: result:=tz_info.DaylightBias+tz_info.Bias; + else result:=0; + end; + FL32(hDll32); { and free the 32bit dll } + end + (*@\\\*) + (*@/// else calculate the bias out of the TZ environment variable *) + else begin + s:=GetEnvVar('TZ'); + while (length(s)>0) and (not(s[1] in ['+','-','0'..'9'])) do + s:=copy(s,2,length(s)); + case s[1] of + (*@/// '+': *) + '+': begin + sign:=1; + s:=copy(s,2,length(s)); + end; + (*@\\\*) + (*@/// '-': *) + '-': begin + sign:=-1; + s:=copy(s,2,length(s)); + end; + (*@\\\*) + else sign:=1; + end; + try + result:=strtoint(copy(s,1,2))*60; + s:=copy(s,3,length(s)); + except + try + result:=strtoint(s[1])*60; + s:=copy(s,2,length(s)); + except + result:=0; + end; + end; + (*@/// if s[1]=':' then minutes offset *) + if s[1]=':' then begin + try + result:=result+strtoint(copy(s,2,2)); + s:=copy(s,4,length(s)); + except + try + result:=result+strtoint(s[2]); + s:=copy(s,3,length(s)); + except + end; + end; + end; + (*@\\\*) + (*@/// if s[1]=':' then seconds offset - ignored *) + if s[1]=':' then begin + try + strtoint(copy(s,2,2)); + s:=copy(s,4,length(s)); + except + try + strtoint(s[2]); + s:=copy(s,3,length(s)); + except + end; + end; + end; + (*@\\\*) + result:=result*sign; + (*@/// if length(s)>0 then daylight saving activated, calculate it *) + if length(s)>0 then begin + (* forget about the few hours on the start/end day *) + if (now>daylight_start) and (now' : t:='>'; + #160: t:=' '; + '' : t:='¡'; + '' : t:='¢'; + '' : t:='£'; + '' : t:='¤'; (* € ??? *) + '' : t:='¥'; + '' : t:='¦'; + '' : t:='§'; + '' : t:='¨'; + '' : t:='©'; + '' : t:='ª'; + '' : t:='«'; + '' : t:='¬'; + '' : t:='­'; + '' : t:='®'; + '' : t:='¯'; + '' : t:='°'; + '' : t:='±'; + '' : t:='²'; + '' : t:='³'; + '' : t:='´'; + '' : t:='µ'; + '' : t:='¶'; + '' : t:='·'; + '' : t:='¸le;'; + '' : t:='¹'; + '' : t:='º'; + '' : t:='»'; + '' : t:='¼'; + '' : t:='½'; + '' : t:='¾'; + '' : t:='¿'; + '' : t:='À'; + '' : t:='Á'; + '' : t:='Â'; + '' : t:='Ã'; + '' : t:='Ä'; + '' : t:='Å'; + '' : t:='Æ'; + '' : t:='Ç'; + '' : t:='È'; + '' : t:='É'; + '' : t:='Ê'; + '' : t:='Ë'; + '' : t:='Ì'; + '' : t:='Í'; + '' : t:='Î'; + '' : t:='Ï'; + '' : t:='Ð'; + '' : t:='Ñ'; + '' : t:='Ò'; + '' : t:='Ó'; + '' : t:='Ô'; + '' : t:='Õ'; + '' : t:='Ö'; + '' : t:='×'; + '' : t:='Ø'; + '' : t:='Ù'; + '' : t:='Ú'; + '' : t:='Û'; + '' : t:='Ü'; + '' : t:='Ý'; + '' : t:='Þ'; + '' : t:='ß'; + '' : t:='à'; + '' : t:='á'; + '' : t:='â'; + '' : t:='ã'; + '' : t:='ä'; + '' : t:='å'; + '' : t:='æ'; + '' : t:='ç'; + '' : t:='è'; + '' : t:='é'; + '' : t:='ê'; + '' : t:='ë'; + '' : t:='ì'; + '' : t:='í'; + '' : t:='î'; + '' : t:='ï'; + '' : t:='ð'; + '' : t:='ñ'; + '' : t:='ò'; + '' : t:='ó'; + '' : t:='ô'; + '' : t:='õ'; + '' : t:='ö'; + '' : t:='÷'; + '' : t:='ø'; + '' : t:='ù'; + '' : t:='ú'; + '' : t:='û'; + '' : t:='ü'; + '' : t:='ý'; + '' : t:='þ'; + #255: t:='ÿ'; + (*$endif *) + (*@\\\000000650C*) + else t:=s[i]; + end; + result:=result+t; + end; + end; +(*@\\\*) + +(*@/// To have OnShowHint/OnIdle lists instead of single methods *) +{ These are just a few help tools for the Application.OnShowHint and } +{ Application.OnIdle methods - Borland didn't thought of the need to } +{ put more than one method in these places, so I had to do it myself. } +{ At least there's a way to avoid this stuff with Delphi 2/3 with } +{ the cm_hintshow message which is sent just before the OnSHowHint event, } +{ but as this stuff should work with any version of Delphi I stay with } +{ the event list... } +{ Some nice internals how to work with method pointer are presented here. } + +(*@/// TObjectList = class(TList) // A list which frees it's objects *) +type + TObjectList = class(TList) + public + destructor Destroy; override; + +{ Why hasn't Borland made the delete method virtual??? Now I must create } +{ a new virtual slot with all the problems this may cause just because } +{ of a missing word... - first cause is the remove method which is absolutely } +{ the same as in TList, but as Delete isn't virtual I need it here again. } + +{ I you want to use this component anywhere else be VERY careful, any call } +{ as a TList may cause problems } + + procedure Delete(Index:Integer); virtual; + function Remove(Item:Pointer):Integer; virtual; + end; + +{ TObjectList } +(*@/// destructor TObjectList.Destroy; *) +destructor TObjectList.Destroy; +var + i: integer; +begin + for i:=count-1 downto 0 do + TObject(items[i]).Free; + inherited destroy; + Clear; +end; +(*@\\\*) +(*@/// procedure TObjectList.Delete(Index:Integer); *) +procedure TObjectList.Delete(Index:Integer); +begin + TObject(items[index]).Free; + inherited delete(index); + end; +(*@\\\*) +(*@/// function TObjectList.Remove(Item:Pointer):Integer; *) +function TObjectList.Remove(Item:Pointer):Integer; +begin + Result := IndexOf(Item); + if Result <> -1 then Delete(Result); + end; +(*@\\\*) +(*@\\\*) + +type + TMethodPointer = procedure of object; + (*@/// TMethod = class(TObject) // Object with just one methodpointer *) + TMethod = class(TObject) + public + methodpointer: TMethodPointer; + end; + (*@\\\*) + +const +(*$ifndef delphi_ge_3 *) + ShowHintProcs: TObjectList =NIL; +(*$endif *) + IdleProcs: TObjectList =NIL; + +(*@/// TDummyObject = class(TObject) // A dummy object for the Application events *) +{ TDummyObject } + +{ A little dummy object which provides the methods to be put in the } +{ application's method pointers; if you use this you shouldn't access } +{ Application.OnIdle and Application.OnShowHint directly but always use } +{ the Add/RemoveXXXProc routines } +{ You can add any other Application.OnXXX method here if you need it } + +type + TDummyObject=class(TObject) +(*$ifndef delphi_ge_3 *) +(*$ifdef shortstring *) + procedure ShowHint(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo); +(*$else *) + procedure ShowHint(var HintStr: ansistring; var CanShow: Boolean; var HintInfo: THintInfo); +(*$endif *) +(*$endif *) + procedure DoIdle(sender: TObject; var done:Boolean); + end; +(*$ifndef delphi_ge_3 *) +(*@/// procedure TDummyObject.ShowHint(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo); *) + +(*$ifdef shortstring *) +procedure TDummyObject.ShowHint(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo); +(*$else *) +procedure TDummyObject.ShowHint(var HintStr: ansistring; var CanShow: Boolean; var HintInfo: THintInfo); +(*$endif *) +var + i:integer; +begin + for i:=ShowHintProcs.Count-1 downto 0 do + if ShowHintProcs.Items[i]<>NIL then begin + TShowHintEvent(TMethod(ShowHintProcs.Items[i]).methodpointer)(HintStr,CanShow,HintInfo); + end; + end; +(*@\\\*) +(*$endif *) +(*@/// procedure TDummyObject.DoIdle(sender: TObject; var done:Boolean); *) +procedure TDummyObject.DoIdle(sender: TObject; var done:Boolean); +var + i:integer; + temp_done: boolean; +begin + done:=false; + for i:=IdleProcs.Count-1 downto 0 do + if IdleProcs.Items[i]<>NIL then begin + TIdleEvent(TMethod(IdleProcs.Items[i]).methodpointer)(sender, temp_done); + done:=done and temp_done; (* done when all idle procs say done *) + end; + end; +(*@\\\*) +(*@\\\0000000301*) + +const + Dummy: TDummyObject =NIL; + +(*@/// Compare two method pointers *) +function compare_method(proc1,proc2:TMethodpointer):boolean; + +{ A method pointer is just a record of two pointers, one the procedure } +{ pointer itself, then the self pointer which is pushed as the first } +{ parameter of the procedure } + +type + (*@/// T_Method=packed record *) + T_Method=packed record + proc: Pointer; + self: TObject; + end; + (*@\\\*) +begin + result:=(T_Method(proc1).proc=T_Method(proc2).proc) and + (T_Method(proc1).self=T_Method(proc2).self); + end; +(*@\\\*) +(*@/// Include and remove the Methodpointer from the according lists *) +(*$ifndef delphi_ge_3 *) +(*@/// procedure AddShowHintProc(proc:TShowHintEvent); *) +procedure AddShowHintProc(proc:TShowHintEvent); +var + method: TMethod; +begin + if (dummy=NIL) or (showhintprocs=NIL) then exit; + method:=TMethod.Create; + method.methodpointer:=TMethodPointer(proc); + showhintprocs.add(method); + Application.OnShowHint:=dummy.ShowHint; + end; +(*@\\\0000000501*) +(*@/// procedure RemoveShowHintProc(proc:TShowHintEvent); *) +procedure RemoveShowHintProc(proc:TShowHintEvent); +var + i: integer; +begin + if (dummy=NIL) or (showhintprocs=NIL) then exit; + for i:=showhintprocs.count-1 downto 0 do + if (showhintprocs.items[i]<>NIL) and + compare_method(TMethod(showhintprocs.items[i]).methodpointer, + TMethodpointer(proc)) then + showhintprocs.delete(i); + end; +(*@\\\*) +(*$endif *) +(*@/// procedure AddIdleProc(proc:TIdleEvent); *) +procedure AddIdleProc(proc:TIdleEvent); +var + method: TMethod; +begin + if (dummy=NIL) or (idleprocs=NIL) then exit; + method:=TMethod.Create; + method.methodpointer:=TMethodPointer(proc); + idleprocs.add(method); + Application.OnIdle:=dummy.DoIdle; + end; +(*@\\\*) +(*@/// procedure RemoveIdleProc(proc:TIdleEvent); *) +procedure RemoveIdleProc(proc:TIdleEvent); +var + i: integer; +begin + if (dummy=NIL) or (idleprocs=NIL) then exit; + for i:=idleprocs.count-1 downto 0 do + if (idleprocs.items[i]<>NIL) and + compare_method(TMethod(idleprocs.items[i]).methodpointer, + TMethodpointer(proc)) then + idleprocs.delete(i); + end; +(*@\\\*) +(*@\\\000000062B*) +(*@\\\*) +(*@/// Generating HWnd's without the routines in forms *) +{ Creating a new HWnd with a WndProc for an arbitrary class. Just the same } +{ as the routines in forms, but without the assembler stuff and using simple } +{ TList's for the storage - maybe not as fast the original routines, but } +{ much easier to understand and to use. This is only for fun here as the } +{ routines in forms do absolutely the same, but this stuff may be used to } +{ create an console application without using forms but receiving Windows } +{ messages. } + +const + (*@/// UtilWindowClass: TWndClass = (...); *) + UtilWindowClass: TWndClass = ( + style: 0; + lpfnWndProc: @DefWindowProc; + cbClsExtra: 0; + cbWndExtra: 0; + hInstance: 0; + hIcon: 0; + hCursor: 0; + hbrBackground: 0; + lpszMenuName: nil; + lpszClassName: 'TAHUtilWindow'); + (*@\\\*) + WndProcs: TObjectList =NIL; + WndWnds: TList =NIL; + +{ Converts a Windows WndProc (HWnd as parameter) to a Delphi method with } +{ self as implicit first parameter by looking up the HWnd in the List } +(*@/// function AH_StdWndProc(Window: HWND; Message,WParam,LParam: Word/Longint); *) +(*$ifdef delphi_1 *) +function AH_StdWndProc(Window: HWND; Message: Longint; WParam: Word; + LParam: Longint): Longint; export; +(*$else *) +function AH_StdWndProc(Window: HWND; Message: Word; WParam: Longint; + LParam: Longint): Longint; stdcall; +(*$endif *) +var + p: integer; + m: TMessage; +begin + m.msg:=message; + m.wparam:=wparam; + m.lparam:=lparam; + m.result:=0; + p:=wndwnds.indexof(pointer(window)); + if p>=0 then + TWndProc(TMethod(wndprocs.Items[p]).methodpointer)(m); + result:=m.result; + end; +(*@\\\0000000112*) +{ Creates a new HWnd and link it with the given Method } +(*@/// function AH_AllocateHWnd(Method: TWndProc): HWND; *) +function AH_AllocateHWnd(Method: TWndProc): HWND; +var + tempmethod: TMethod; + TempClass: TWndClass; +begin + result:=0; + if (wndprocs=NIL) then exit; + + UtilWindowClass.hInstance := HInstance; + if not GetClassInfo(HInstance, UtilWindowClass.lpszClassName, TempClass) then +(*$ifdef delphi_1 *) + WinProcs.RegisterClass(UtilWindowClass); +(*$else *) + Windows.RegisterClass(UtilWindowClass); +(*$endif *) + Result := CreateWindow(UtilWindowClass.lpszClassName, '', 0, + 0, 0, 0, 0, 0, 0, HInstance, nil); + + tempmethod:=TMethod.Create; + tempmethod.methodpointer:=TMethodPointer(method); + + { These two lists must be absolutely parallel, otherwise the messages may } + { go to the wrong object } + wndprocs.add(tempmethod); + wndwnds.add(pointer(result)); + + SetWindowLong(Result, GWL_WNDPROC, Longint(@AH_StdWndProc)); +end; +(*@\\\0000000B12*) +{ Removes the HWnd both in Windows an in the internal lists } +(*@/// procedure AH_DeallocateHWnd(Wnd: HWND); *) +procedure AH_DeallocateHWnd(Wnd: HWND); +var + p: integer; +begin + DestroyWindow(Wnd); + p:=wndwnds.remove(pointer(Wnd)); + if p>=0 then + wndprocs.delete(p); +end; +(*@\\\*) +(*@\\\0000001401*) + +(*@/// Make Stream and Clipboard work together *) +(*@/// function GetPointer(index: integer; memblock: THandle):pointer; *) +function GetPointer(index: integer; memblock: THandle):pointer; +(*$ifdef delphi_1 *) +var + selector, offset: word; + P: pointer; +begin + selector:=(index div 65536) * selectorinc + memblock; + offset:=(index mod 65536); + p:=GlobalLock(Selector); + result:=Ptr(selector,offset); + end; +(*$else *) +begin + result:=pointer(longint(GlobalLock(memblock))+index); + end; +(*$endif *) +(*@\\\0000000212*) +(*@/// procedure Stream2Clipboard(stream:TStream; format:integer); *) +procedure Stream2Clipboard(stream:TStream; format:integer); +const + max_write = $8000; (* must obey ($10000 mod max_write = 0) for Delphi 1 *) +var + size: longint; + s: word; + curpos: longint; + Memblock: THandle; + FClipboardWindow: THandle; +begin + FClipboardWindow := Application.Handle; + if FClipboardWindow = 0 then + FClipboardWindow := AllocateHWnd(NIL); + OpenClipboard(FClipboardWindow); + + stream.seek(0,0); + size:=stream.size; + stream.seek(0,0); + MemBlock:=GlobalAlloc(gmem_moveable or gmem_zeroinit,size+1); + curpos:=0; + while curpos+1Application.Handle then + DeallocateHWnd(FClipboardWindow); + end; +(*@\\\0000001601*) +(*@/// procedure Clipboard2Stream(stream:TStream; format:integer); *) +procedure Clipboard2Stream(stream:TStream; format:integer); +const + max_read = $8000; (* must obey ($10000 mod max_read = 0) for Delphi 1 *) +var + size: longint; + curpos: longint; + Memblock: THandle; + FClipboardWindow: THandle; +begin + FClipboardWindow := Application.Handle; + if FClipboardWindow = 0 then + FClipboardWindow := AllocateHWnd(NIL); + OpenClipboard(FClipboardWindow); + + stream.seek(0,0); + MemBlock:=GetClipboardData(format); + size:=GlobalSize(Memblock); + curpos:=0; + while curpos+1Application.Handle then + DeallocateHWnd(FClipboardWindow); + end; +(*@\\\0000000C01*) +(*@\\\0000000301*) + +(*@/// Windows Resources and Languages *) +(*$ifdef delphi_gt_1 *) +(*@/// function makelangid(language,sublanguage: word):longint; *) +function makelangid(language,sublanguage: word):longint; +begin + result:=((language and $3FF) or ((sublanguage and $3F) shl 10)) and $FFFF; + end; +(*@\\\*) +(*@/// function primarylangid(language:word):word; *) +function primarylangid(language:word):word; +begin + result:=language and $3FF; + end; +(*@\\\*) +(*@/// function sublangid(language:word):word; *) +function sublangid(language:word):word; +begin + result:=(language shr 10) and $3F; + end; +(*@\\\*) +(*@/// function langidfromlcid(lcid:longint):word; *) +function langidfromlcid(lcid:longint):word; +begin + result:=lcid and $FFFF; + end; +(*@\\\*) + +(*@/// function MyLoadStringInternal(Instance: THandle; Id: word; languageid: word):string; *) +function MyLoadStringInternal(Instance: THandle; Id: word; languageid: word):string; +var + h,h1: THandle; + p: ^word; + _length: word; + i: integer; +begin + h:=FindResourceEx(Instance,rt_string,MakeIntResource((id div 16)+1),languageid); + if h<>0 then begin + h1:=Loadresource(Instance,h); + p:=LockResource(h1); + i:=id mod 16; + while i>0 do begin + _length:=p^; + inc(p,_length+1); + dec(i); + end; + _length:=p^; + inc(p); + setlength(result,WideCharToMultiByte(cp_acp,0,PWideChar(p),_length,NIL,0,NIL,NIL)); + WideCharToMultiByte(cp_acp,0,PWideChar(p),_length,@result[1],length(result),NIL,NIL); + FreeResource(h1); + end + else + result:=''; + end; +(*@\\\*) +(*@/// function MyLoadString(Instance: THandle; Id: word; languageid: word):string; *) +function MyLoadString(Instance: THandle; Id: word; languageid: word):string; +begin + result:=MyLoadStringInternal(Instance,id,languageid); + if result='' then + result:=MyLoadStringInternal(Instance,id,makelangid(primarylangid(languageid),sublang_default)); + if result='' then + result:=MyLoadStringInternal(Instance,id,makelangid(primarylangid(languageid),sublang_neutral)); + if result='' then + result:=MyLoadStringInternal(Instance,id,makelangid(lang_neutral,sublang_neutral)); + end; +(*@\\\*) +(*@/// function LoadStrEx(id:word; languageid: word):string; *) +function LoadStrEx(id:word; languageid: word):string; +begin + result:=MyLoadString(HInstance,id,languageid); + end; +(*@\\\*) +(*$endif *) +(*@/// function LoadStr(id:word):string; *) +function LoadStr(id:word):string; +begin + (*$ifdef delphi_gt_1 *) + result:=MyLoadString(HInstance,id,GetUserDefaultLangId); + (*$else *) + result:=sysutils.loadstr(id); + (*$endif *) + end; +(*@\\\003C00050100060100070100080100070B*) +(*@\\\*) + +(*@/// function ScrollBarVisible(control: TWinControl; vertical: boolean):boolean; *) +function ScrollBarVisible(control: TWinControl; vertical: boolean):boolean; +(*$ifdef delphi_1 *) +var + code: integer; + min,max: integer; +begin + if vertical then + code:=sb_vert + else + code:=sb_horz; + GetScrollRange(control.handle,code,min,max); + result:=(min<>max); + end; +(*$else *) +var + code: integer; + ScrollInfo: TScrollInfo; +begin + if vertical then + code:=sb_vert + else + code:=sb_horz; + scrollinfo.cbsize:=sizeof(scrollinfo); + scrollinfo.fmask:=sif_all; + if GetScrollInfo(control.handle,code,scrollinfo) then + result:=(scrollinfo.nmax<>scrollinfo.nmin) + else + result:=false; + end; +(*$endif *) +(*@\\\*) + +(*@/// procedure DoneUnit; // The cleanup of the unit, called in finalization *) +procedure DoneUnit; far; +begin +(*$ifndef delphi_ge_3 *) +{ For design mode: relink the OnShowHint back to it's default value; } +{ only needed since with Delphi 3 packages the finalization may be } +{ called without Delphi itself is closed } + + if (ShowHintProcs<>NIL) and + (ShowHintProcs.Count>0) then + Application.OnShowHint:=TShowHintEvent(TMethod(ShowHintProcs.Items[0]).methodpointer); + +{ The explicit removing of the list entries is needed since the delete method } +{ of the TLIst isn't virtual an therefore not called by the Free } + if ShowHintProcs<>NIL then + while ShowHintProcs.Count>0 do + ShowHintProcs.delete(0); + ShowHintProcs.Free; + ShowHintProcs:=NIL; +(*$endif *) + if IdleProcs<>NIL then + while IdleProcs.Count>0 do + IdleProcs.delete(0); + IdleProcs.Free; + IdleProcs:=NIL; + Dummy.Free; + Dummy:=NIL; + +{ The explicit removing of the list entries is needed since the delete method } +{ of the TLIst isn't virtual an therefore not called by the Free } + if WndProcs<>NIL then + while WndProcs.Count>0 do + WndProcs.delete(0); + WndProcs.Free; + WndProcs:=NIL; + WndWnds.Free; + WndWnds:=NIL; + end; +(*@\\\*) +(*@\\\0000001101*) +(*@/// initialization *) +(*$ifndef delphi_ge_3 *) +var + t:TShowHintEvent; +(*$endif *) +(*$ifdef delphi_1 *) +begin +(*$else *) +initialization +begin +(*$endif *) + Dummy:=TDummyObject.Create; + IdleProcs:=TObjectList.Create; + + (* Since Delphi 3 there is the CM_HINTSHOW instead, + so this isn't needed anymore *) +(*$ifndef delphi_ge_3 *) + ShowHintProcs:=TObjectList.Create; + t:=application.OnShowHint; + if assigned(t) then { D1 can't do a assigned of a property } + AddShowHintProc(t); { In design mode the OnShowHint is responsible } + { for the hints of the component palette so I } + { need to remember this } +(*$endif *) + WndProcs:=TObjectList.Create; + WndWnds:=TList.Create; +(*@\\\000000040C*) +(*@/// finalization *) +(*$ifdef delphi_1 *) + AddExitProc(DoneUnit); +(*$else *) + end; +finalization + DoneUnit; +(*$endif *) +(*@\\\0000000201*) +end. +(*@\\\0003000701000011000701*) diff --git a/lib/aligrid21/ALIGREDI.DFM b/lib/aligrid21/ALIGREDI.DFM new file mode 100644 index 00000000..c5af8bae Binary files /dev/null and b/lib/aligrid21/ALIGREDI.DFM differ diff --git a/lib/aligrid21/ALIGREDI.PAS b/lib/aligrid21/ALIGREDI.PAS new file mode 100644 index 00000000..596054fe --- /dev/null +++ b/lib/aligrid21/ALIGREDI.PAS @@ -0,0 +1,700 @@ +unit AligrEdi; +{ The component editor for the TStringAlignGrid. } +(*$p+,t+,x+,b-*) + (*$i ah_def.inc *) +(*@/// interface *) +interface + +(*@/// uses *) +uses + SysUtils, + typinfo, +(*$ifdef delphi_1 *) + WinTypes, + WinProcs, +(*$else *) + windows, +(*$endif *) + Messages, + Classes, + Graphics, + Controls, + Forms, + Dialogs, + Grids, + (*$ifdef delphi_ge_6 *) + designintf, + designeditors, + (*$else *) + dsgnintf, + (*$endif *) + stdctrls, + buttons, + Spin, + ExtCtrls, + menus, + aligrid; +(*@\\\0000001703*) + +type +(*@/// TGridComponentEditor = class(TComponentEditor) *) +TGridComponentEditor = class(TComponentEditor) +public + procedure Edit; override; + end; +(*@\\\*) +(*@\\\0000000601*) +(*@/// implementation *) +implementation + +{$R aligredi.DFM} + +type +(*@/// Taligrid_edit=class(TForm) *) +Taligrid_edit = class(TForm) + grid: TStringAlignGrid; + btn_ok: TButton; + btn_cancel: TButton; + grp_edit: TGroupBox; + btn_left: TSpeedButton; + btn_right: TSpeedButton; + btn_center: TSpeedButton; + btn_ww_none: TSpeedButton; + btn_ww_wrap: TSpeedButton; + btn_ww_elli: TSpeedButton; + btn_color: TSpeedButton; + btn_font: TSpeedButton; + edt_read: TCheckBox; + grp_what: TRadioGroup; + edt_width: TSpinEdit; + lbl_width: TLabel; + grp_cell: TRadioGroup; + FontDialog: TFontDialog; + ColorDialog: TColorDialog; + lbl_height: TLabel; + edt_height: TSpinEdit; + procedure btn_colorClick(Sender: TObject); + procedure btn_fontClick(Sender: TObject); + procedure gridSelectCell(Sender: TObject; Col,Row:Longint; var CanSelect:Boolean); + procedure grp_whatClick(Sender: TObject); + procedure grp_cellClick(Sender: TObject); + procedure btn_alignClick(Sender: TObject); + procedure btn_wrapClick(Sender: TObject); + procedure edt_readClick(Sender: TObject); + procedure edt_wh_Change(Sender: TObject); +public + component_editor: TGridComponentEditor; + procedure Update_Group(col,row:longint); +private + changing: boolean; + show_cell: integer; +end; +(*@\\\*) +(*@/// THackGrid =class(TStringAligngrid) *) +(* a nasty hack: to access the protected variables and methods of an object + it is enough to create an empty descendent of this object and to typecast + any original object to the descendent - so the compiler then allows to + access the variables/methods, but as nothing of the VMT etc. is changed by + this deriving the code produced is absolutely the same. Of course one + could declare them public in first place, but as modifying the internal + stuff isn't that easy I dopn't wnat to open it to everyone, but I need it + here as the TGridComponentEditor brings the unit aligrid above the + code segment maximum size in 16 bit. *) + +THackGrid=class(TStringaligngrid) + end; +(*@\\\*) + +(*@/// Some internal help routines for copying the internal lists *) +(*@/// function CopyStringCell(Source,Target:TList; ColCount,RowCount:integer):boolean; *) +function CopyStringCell(Source,Target:TList; ColCount,RowCount:integer):boolean; +var + v,w:pstring; + ACol,ARow: integer; +begin + result:=false; + for ACol:=0 to Colcount-1 do + for ARow:=0 to Rowcount-1 do begin + v:=GetItemCell(ACol,ARow,Source); + if v<>NIL then begin + result:=true; + w:=NewStr(v^); + end + else + w:=NIL; + w:=SetItemCell(ACol,ARow, Target, w); + if w<>NIL then + DisposeStr(w); + end; + end; +(*@\\\0000000A01*) +(*@/// function CopyPropCell(Source,Target:TList; ColCount,RowCount:integer; grid:THackGrid):boolean; *) +function CopyPropCell(Source,Target:TList; ColCount,RowCount:integer; grid:THackGrid):boolean; +var + v,w:TCellProperties; + ACol,ARow: integer; +begin + result:=false; + for ACol:=0 to Colcount-1 do + for ARow:=0 to Rowcount-1 do begin + v:=GetItemCell(ACol,ARow,Source); + if v<>NIL then begin + result:=true; + w:=v.clone; + if w.font<>NIL then + w.font.OnChange:=grid.fontchanged; + if w.brush<>NIL then + w.brush.OnChange:=grid.brushchanged; + if w.selfont<>NIL then + w.selfont.OnChange:=grid.fontchanged; + if w.selbrush<>NIL then + w.selbrush.OnChange:=grid.brushchanged; + end + else + w:=NIL; + w:=SetItemCell(ACol,ARow, Target, w); + w.free; + end; + end; +(*@\\\0000001424*) +(*@/// function CopyPropCol(Source,Target:TList; Count:integer; grid:THackGrid):boolean; *) +function CopyPropCol(Source,Target:TList; Count:integer; grid:THackGrid):boolean; +var + v,w:TCellProperties; + ACol: integer; +begin + result:=false; + for ACol:=0 to Count-1 do begin + v:=GetItemCol(ACol,Source); + if v<>NIL then begin + result:=true; + w:=v.clone; + if w.font<>NIL then + w.font.OnChange:=grid.fontchanged; + if w.brush<>NIL then + w.brush.OnChange:=grid.brushchanged; + if w.selfont<>NIL then + w.selfont.OnChange:=grid.fontchanged; + if w.selbrush<>NIL then + w.selbrush.OnChange:=grid.brushchanged; + end + else + w:=NIL; + w:=SetItemCol(ACol, Target, w); + w.free; + end; + end; +(*@\\\0000000D1A*) +(*@\\\0000000201*) + +(*@/// TGridComponentEditor = class(TComponentEditor) // The component editor *) +{ TGridComponentEditor } +(*@/// procedure TGridComponentEditor.Edit; // OnCreate *) +procedure TGridComponentEditor.Edit; +var + source: THackgrid; + _grid: THackgrid; + _form: Taligrid_edit; + i: longint; +begin + source:=THackGrid(component as TStringAlignGrid); + _form:=Taligrid_edit.Create(NIL); + _grid:=THackGrid(_form.grid); + if _grid.FCell=NIL then _grid.FCell:=TList.Create; +(*@/// set grid data *) +_grid.options:=[goVertLine,goHorzLine,goEditing]; {goRowSizing,goColSizing} +_grid.fixedrows:=0; +_grid.fixedcols:=0; +if newstylecontrols then + _grid.DefaultRowHeight:=18; +_grid.FAlwaysEdit:=true; +if source<>NIL then begin + _grid.wordwrap:=source.wordwrap; + _grid.defaultColWidth:=source.defaultColWidth; + _grid.defaultRowHeight:=source.defaultRowHeight; + _grid.f_Fixedcols:=source.fixedcols; + _grid.f_fixedrows:=source.fixedrows; + _grid.colcount:=source.colcount; + _grid.rowcount:=source.rowcount; + for i:=source.colcount-1 downto 0 do + if source.colwidths[i]<>source.defaultColWidth then + _grid.ColWidths[i] :=source.colwidths[i]; + for i:=source.rowcount-1 downto 0 do + if source.rowheights[i]<>source.defaultRowHeight then + _grid.rowheights[i] :=source.rowheights[i]; + _grid.color:=source.color; + _grid.fixedcolor:=source.fixedcolor; + _grid.font:=source.font; +(*@/// copy lists source -> grid *) +CopyPropCell (source.FPropCell,_grid.FPropCell,source.colcount,source.rowcount,_grid); +CopyPropCol (source.FPropCol ,_grid.FPropCol ,source.colcount,_grid); +CopyPropCol (source.FFPropCol,_grid.FFPropCol,source.colcount,_grid); +CopyPropCol (source.FPropRow ,_grid.FPropRow ,source.rowcount,_grid); +CopyPropCol (source.FFPropRow,_grid.FFPropRow,source.rowcount,_grid); +CopyStringCell(source.FHintCell ,_grid.FHintCell,source.colcount,source.rowcount); +CopyStringCell(source.FCell ,_grid.FCell,source.colcount,source.rowcount); +(*@\\\000000074F*) + _grid.ListToCells(_grid.FCell); + end; +(*@\\\000C001501001501*) + _form.Update_Group(_grid.col,_grid.row); + if _form.ShowModal=mrOK then begin + if _form.show_cell=0 then + _grid.CellsToList(_grid.FCell) + else + _grid.CellsToList(_grid.FHintCell); + if source<>NIL then begin +(*@/// Data grid -> source *) +for i:=_grid.colcount-1 downto 0 do + if _grid.colwidths[i]<>_grid.defaultColWidth then + source.ColWidths[i] :=_grid.colwidths[i]; +for i:=_grid.rowcount-1 downto 0 do + if _grid.rowheights[i]<>_grid.defaultRowHeight then + source.rowheights[i] :=_grid.rowheights[i]; + +source.FSaveHint :=CopyStringCell(_grid.FHintCell ,source.FHintCell,source.colcount,source.rowcount); +source.FSaveCells :=CopyStringCell(_grid.FCell ,source.FCell,source.colcount,source.rowcount); +CopyPropCell (_grid.FPropCell,source.FPropCell,source.colcount,source.rowcount,source); +CopyPropCol (_grid.FPropCol ,source.FPropCol ,source.colcount,source); +CopyPropCol (_grid.FFPropCol,source.FFPropCol,source.colcount,source); +CopyPropCol (_grid.FPropRow ,source.FPropRow ,source.rowcount,source); +CopyPropCol (_grid.FFPropRow,source.FFPropRow,source.rowcount,source); +(*@\\\0032000A01000E01000A01000A01*) + if source.FCell<>NIL then + source.ListToCells(source.FCell); + end; + if GetParentForm(source).Designer<>NIL then + GetParentForm(source).Designer.Modified; + end; + _form.Free; + end; +(*@\\\0000001401*) +(*@\\\0000000201*) +(*@/// Taligrid_edit = class(TForm) // The edit form itself *) +{ Taligrid_edit } +(*@/// procedure Taligrid_edit.btn_colorClick(Sender: TObject); *) +procedure Taligrid_edit.btn_colorClick(Sender: TObject); +var + ACol,ARow: longint; + _grid: THackgrid; + result: boolean; +begin + if changing then EXIT; + try + changing:=true; + _grid:=THackgrid(grid); + ACol:=grid.col; + ARow:=grid.row; +(*@/// Colordialog.Color:=...; *) +case grp_what.itemindex of + 0: Colordialog.Color:=_grid.GetColorCell(ACol,ARow); + 1: Colordialog.Color:=_grid.GetColorCol(ACol); + 2: Colordialog.Color:=_grid.GetFixColorCol(ACol); + 3: Colordialog.Color:=_grid.GetColorRow(ARow); + 4: Colordialog.Color:=_grid.GetFixColorRow(ARow); + else ; (* this cant happen *) + end; +(*@\\\0000000701*) + result:=ColorDialog.execute; + btn_color.down:=result; + if result then +(*@/// _grid.SetColor...(...,Colordialog.Color); *) +case grp_what.itemindex of + 0: _grid.SetColorCell(ACol,ARow,Colordialog.Color); + 1: _grid.SetColorCol(ACol,Colordialog.Color); + 2: _grid.SetFixColorCol(ACol,Colordialog.Color); + 3: _grid.SetColorRow(ARow,Colordialog.Color); + 4: _grid.SetFixColorRow(ARow,Colordialog.Color); + else ; (* this cant happen *) + end +(*@\\\0000000801*) + else +(*@/// _grid.ResetColor...(...); *) +case grp_what.itemindex of + 0: _grid.ResetColorCell(ACol,ARow); + 1: _grid.ResetColorCol(ACol); + 2: _grid.ResetColorFixedCol(ACol); + 3: _grid.ResetColorRow(ARow); + 4: _grid.ResetColorFixedRow(ARow); + else ; (* this cant happen *) + end; +(*@\\\0000000801*) + if _grid.edit_visible then _grid.Update_Edit; + finally + changing:=false; + end; + end; +(*@\\\0000001301*) +(*@/// procedure Taligrid_edit.btn_fontClick(Sender: TObject); *) +procedure Taligrid_edit.btn_fontClick(Sender: TObject); +var + ACol,ARow: longint; + _grid: THackgrid; + result: boolean; +begin + if changing then EXIT; + try + changing:=true; + _grid:=THackgrid(grid); + ACol:=grid.col; + ARow:=grid.row; +(*@/// Fontdialog.Font:=...; *) +case grp_what.itemindex of + 0: Fontdialog.Font:=_grid.GetFontCell(ACol,ARow); + 1: Fontdialog.Font:=_grid.GetFontCol(ACol); + 2: Fontdialog.Font:=_grid.GetFontFixedCol(ACol); + 3: Fontdialog.Font:=_grid.GetFontRow(ARow); + 4: Fontdialog.Font:=_grid.GetFontFixedRow(ARow); + else font:=NIL; (* this cant happen *) + end; +(*@\\\0000000701*) + result:=FontDialog.execute; + btn_font.down:=result; + if result then +(*@/// _grid.SetFont...(...,fontdialog.font); *) +case grp_what.itemindex of + 0: _grid.SetFontCell(ACol,ARow,fontdialog.font); + 1: _grid.SetFontCol(ACol,fontdialog.font); + 2: _grid.SetFontFixedCol(ACol,fontdialog.font); + 3: _grid.SetfontRow(ARow,fontdialog.font); + 4: _grid.SetFontFixedRow(ARow,fontdialog.font); + end +(*@\\\0000000401*) + else +(*@/// _grid.Resetfont...(...); *) +case grp_what.itemindex of + 0: _grid.ResetfontCell(ACol,ARow); + 1: _grid.ResetfontCol(ACol); + 2: _grid.ResetfontFixedCol(ACol); + 3: _grid.ResetfontRow(ARow); + 4: _grid.ResetfontFixedRow(ARow); + end; +(*@\\\0000000206*) + if _grid.edit_visible then _grid.Update_Edit; + finally + changing:=false; + end; + end; +(*@\\\*) +(*@/// procedure Taligrid_edit.edt_readClick(Sender: TObject); *) +procedure Taligrid_edit.edt_readClick(Sender: TObject); +var + ACol,ARow: longint; + _grid: THackgrid; +begin + if changing then EXIT; + try + changing:=true; + _grid:=THackgrid(grid); + ACol:=grid.col; + ARow:=grid.row; + case edt_read.state of +(*@/// cbUnChecked: *) +cbUnChecked: + case grp_what.itemindex of + 0: _grid.EditCell[ACol,ARow]:=true; + 1: _grid.EditCol[ACol]:=true; + 3: _grid.EditRow[ARow]:=true; + end; +(*@\\\0000000105*) +(*@/// cbGrayed: *) +cbGrayed: + case grp_what.itemindex of + 0: _grid.ResetEditCell(ACol,ARow); + 1: _grid.ResetEditCol(ACol); + 3: _grid.ResetEditRow(ARow); + end; +(*@\\\*) +(*@/// cbChecked: *) +cbChecked: + case grp_what.itemindex of + 0: _grid.EditCell[ACol,ARow]:=false; + 1: _grid.EditCol[ACol]:=false; + 2: _grid.EditRow[ARow]:=false; + end; +(*@\\\0000000103*) + end; + finally + changing:=false; + end; + end; +(*@\\\0000000D01*) +(*@/// procedure Taligrid_edit.btn_alignClick(Sender: TObject); *) +procedure Taligrid_edit.btn_alignClick(Sender: TObject); +var + ACol,ARow: longint; + _grid: THackgrid; +begin + if changing then EXIT; + try + changing:=true; + _grid:=THackgrid(grid); + ACol:=grid.col; + ARow:=grid.row; + if false then +(*@/// else if btn_left.down then *) +else if btn_left.down then begin + case grp_what.itemindex of + 0: _grid.AlignCell[ACol,ARow]:=alLeft; + 1: _grid.AlignCol[ACol] :=alLeft; + 2: _grid.FixAlignCol[ACol] :=alLeft; + 3: _grid.AlignRow[ARow] :=alLeft; + 4: _grid.FixAlignRow[ARow] :=alLeft; + end; + end +(*@\\\*) +(*@/// else if btn_right.down then *) +else if btn_right.down then begin + case grp_what.itemindex of + 0: _grid.AlignCell[ACol,ARow]:=alRight; + 1: _grid.AlignCol[ACol] :=alRight; + 2: _grid.FixAlignCol[ACol] :=alRight; + 3: _grid.AlignRow[ARow] :=alRight; + 4: _grid.FixAlignRow[ARow] :=alRight; + end; + end +(*@\\\0000000326*) +(*@/// else if btn_center.down then *) +else if btn_center.down then begin + case grp_what.itemindex of + 0: _grid.AlignCell[ACol,ARow]:=alCenter; + 1: _grid.AlignCol[ACol] :=alCenter; + 2: _grid.FixAlignCol[ACol] :=alCenter; + 3: _grid.AlignRow[ARow] :=alCenter; + 4: _grid.FixAlignRow[ARow] :=alCenter; + end; + end +(*@\\\0000000201*) +(*@/// else ResetAlignment *) +else begin + case grp_what.itemindex of + 0: _grid.ResetAlignCell(ACol,ARow); + 1: _grid.ResetAlignCol(ACol); + 2: _grid.ResetAlignFixedCol(ACol); + 3: _grid.ResetAlignRow(ARow); + 4: _grid.ResetAlignFixedRow(ARow); + end; + end; +(*@\\\*) + if _grid.edit_visible then _grid.Update_Edit; + finally + changing:=false; + end; + end; +(*@\\\*) +(*@/// procedure Taligrid_edit.btn_wrapClick(Sender: TObject); *) +procedure Taligrid_edit.btn_wrapClick(Sender: TObject); +var + ACol,ARow: longint; + _grid: THackgrid; +begin + if changing then EXIT; + try + changing:=true; + _grid:=THackgrid(grid); + ACol:=grid.col; + ARow:=grid.row; + if false then +(*@/// else if btn_ww_none.down then *) +else if btn_ww_none.down then begin + case grp_what.itemindex of + 0: _grid.WordwrapCell[ACol,ARow]:=ww_none; + 1: _grid.WordwrapCol[ACol] :=ww_none; + 2: _grid.FixWordwrapCol[ACol] :=ww_none; + 3: _grid.WordwrapRow[ARow] :=ww_none; + 4: _grid.FixWordwrapRow[ARow] :=ww_none; + end; + end +(*@\\\0000000114*) +(*@/// else if btn_ww_wrap.down then *) +else if btn_ww_wrap.down then begin + case grp_what.itemindex of + 0: _grid.WordwrapCell[ACol,ARow]:=ww_wordwrap; + 1: _grid.WordwrapCol[ACol] :=ww_wordwrap; + 2: _grid.FixWordwrapCol[ACol] :=ww_wordwrap; + 3: _grid.WordwrapRow[ARow] :=ww_wordwrap; + 4: _grid.FixWordwrapRow[ARow] :=ww_wordwrap; + end; + end +(*@\\\0000000114*) +(*@/// else if btn_ww_elli.down then *) +else if btn_ww_elli.down then begin + case grp_what.itemindex of + 0: _grid.WordwrapCell[ACol,ARow]:=ww_ellipsis; + 1: _grid.WordwrapCol[ACol] :=ww_ellipsis; + 2: _grid.FixWordwrapCol[ACol] :=ww_ellipsis; + 3: _grid.WordwrapRow[ARow] :=ww_ellipsis; + 4: _grid.FixWordwrapRow[ARow] :=ww_ellipsis; + end; + end +(*@\\\0000000301*) +(*@/// else ResetWordwrap *) +else begin + case grp_what.itemindex of + 0: _grid.ResetWordwrapCell(ACol,ARow); + 1: _grid.ResetWordwrapCol(ACol); + 2: _grid.ResetWordwrapFixedCol(ACol); + 3: _grid.ResetWordwrapRow(ARow); + 4: _grid.ResetWordwrapFixedRow(ARow); + end; + end; +(*@\\\*) + finally + changing:=false; + end; + end; +(*@\\\0000000119*) +(*@/// procedure Taligrid_edit.grp_cellClick(Sender: TObject); *) +procedure Taligrid_edit.grp_cellClick(Sender: TObject); +var + _grid: THackgrid; +begin + _grid:=THackgrid(grid); + if grp_cell.itemindex=show_cell then EXIT; + _grid.Hideedit(false); + show_cell:=grp_cell.itemindex; + case show_cell of + 0: begin + _grid.CellsToList(_grid.FHintCell); + _grid.ListToCells(_grid.FCell); + end; + 1: begin + _grid.CellsToList(_grid.FCell); + _grid.ListToCells(_grid.FHintCell); + end; + end; + end; +(*@\\\0000000711*) +(*@/// procedure Taligrid_edit.gridSelectCell(Sender: TObject; Col, Row: Longint...); *) +procedure Taligrid_edit.gridSelectCell(Sender: TObject; Col, + Row: Longint; var CanSelect: Boolean); +begin + Update_Group(col,row); + end; +(*@\\\0000000401*) +(*@/// procedure Taligrid_edit.grp_whatClick(Sender: TObject); *) +procedure Taligrid_edit.grp_whatClick(Sender: TObject); +begin + Update_Group(grid.col,grid.row); + end; +(*@\\\0000000301*) +(*@/// procedure Taligrid_edit.edt_wh_Change(Sender: TObject); *) +procedure Taligrid_edit.edt_wh_Change(Sender: TObject); +begin + if changing then EXIT; + grid.ColWidths[grid.col]:=edt_width.value; + grid.RowHeights[grid.row]:=edt_height.value; + end; +(*@\\\0000000401*) + +(*@/// procedure Taligrid_edit.Update_Group(col,row:longint); *) +procedure Taligrid_edit.Update_Group(col,row:longint); +var + v:TCellProperties; + Alignment: TMyAlign; + wordwrap: t_wordwrap; + editable: byte; + font,brush: pointer; + _grid: THackgrid; +begin + try + changing:=true; + _grid:=THackgrid(grid); + if (Col>=0) or (Row>=0) then begin + case grp_what.itemindex of + 0: v:=GetItemCell(Col,Row,_grid.FPropCell); + 1: v:=GetItemCol(Col,_grid.FPropCol); + 2: v:=GetItemCol(Col,_grid.FFPropCol); + 3: v:=GetItemCol(Row,_grid.FPropRow); + 4: v:=GetItemCol(Row,_grid.FFPropRow); + else v:=NIL; + end; +(*@/// Set alignment checks *) +if v=NIL then + Alignment:=alDefault +else + Alignment:=v.align; + +case alignment of + alRight : btn_right.down:=true; + alLeft : btn_left.down:=true; + alCenter: btn_center.down:=true; + alDefault: begin + btn_left.down:=false; + btn_right.down:=false; + btn_center.down:=false; + end; + end; +(*@\\\0000000201*) +(*@/// Set wordwrap checks *) +if v=NIL then + Wordwrap:=ww_Default +else + Wordwrap:=v.wordwrap; + +case Wordwrap of + ww_none : btn_ww_none.down:=true; + ww_wordwrap : btn_ww_wrap.down:=true; + ww_ellipsis : btn_ww_elli.down:=true; + ww_default : begin + btn_ww_none.down:=false; + btn_ww_wrap.down:=false; + btn_ww_elli.down:=false; + end; + end; +(*@\\\*) +(*@/// Set editable checks *) +edt_read.enabled:=(grp_what.itemindex<>2) and (grp_what.itemindex<>4); + +if (v=NIL) or (grp_what.itemindex=2) or (grp_what.itemindex=4) then + editable:=0 +else + editable:=v.editable; + +case editable of + 0: edt_read.state:=cbGrayed; + 2: edt_read.state:=cbUnChecked; + 1: edt_read.state:=cbChecked; + end; +(*@\\\0000000A04*) +(*@/// Set font checks *) +if v=NIL then + font:=NIL +else + font:=v.font; + +if (font=NIL) or not TMyFont(font).Haschanged then + btn_font.down:=false +else + btn_font.down:=true; +(*@\\\*) +(*@/// Set color/brush checks *) +if v=NIL then + brush:=NIL +else + brush:=v.brush; + +if (Brush=NIL) or not TMyBrush(Brush).Haschanged then + btn_color.down:=false +else + btn_color.down:=true; +(*@\\\0000000801*) + edt_width.value :=grid.ColWidths[col] ; + edt_height.value:=grid.RowHeights[row]; + case grp_what.itemindex of + 0: grp_edit.caption:='Cell '+inttostr(col)+'/'+inttostr(row); + 1: grp_edit.caption:='Column '+inttostr(col); + 2: grp_edit.caption:='Fixed column '+inttostr(col); + 3: grp_edit.caption:='Row '+inttostr(row); + 4: grp_edit.caption:='Fixed Row '+inttostr(row); + end; + end; + finally + changing:=false; + end; + end; +(*@\\\0000001801*) +(*@\\\0000000110*) +(*@\\\0000000B01*) +end. +(*@\\\0001000015000601*) diff --git a/lib/aligrid21/ALIGREDI.dcu b/lib/aligrid21/ALIGREDI.dcu new file mode 100644 index 00000000..8f94ef39 Binary files /dev/null and b/lib/aligrid21/ALIGREDI.dcu differ diff --git a/lib/aligrid21/ALIGRID.D16 b/lib/aligrid21/ALIGRID.D16 new file mode 100644 index 00000000..de93c1d2 Binary files /dev/null and b/lib/aligrid21/ALIGRID.D16 differ diff --git a/lib/aligrid21/ALIGRID.PAS b/lib/aligrid21/ALIGRID.PAS new file mode 100644 index 00000000..c1287f10 --- /dev/null +++ b/lib/aligrid21/ALIGRID.PAS @@ -0,0 +1,6542 @@ +unit Aligrid; +(*$p+,t+,x+,b-*) + { These are needed, especially the p must be the same as in forms } + (*$i ah_def.inc *) +(*$ifdef Delphi_1 *) + (*$d- *) { Sorry, no debugging with Delphi 1, the unit is too complex } +(*$endif *) + +{ Copyright 1995-2000 Andreas Hrstemeier Version 2.0 2000-02-12 } +{ this component is public domain - please check aligrid.hlp for } +{ detailed info on usage and distributing } + +(*@/// interface *) +interface + +(*@/// uses *) +uses + SysUtils, + typinfo, +(*$ifdef delphi_1 *) + WinTypes, + WinProcs, +(*$else *) + windows, +(*$endif *) + Messages, + Classes, + Graphics, + Controls, + Forms, + Dialogs, + ExtCtrls, + Grids, + stdctrls, +{ buttons, } + menus, + ah_tool; +(*@\\\0000001401*) + +const + (*@/// control messages from and to the inplace edit *) + cn_edit_cancel = wm_user+2000; (* edit finished with ESC *) + cn_edit_return = wm_user+2001; (* edit finished with return *) + cn_edit_exit = wm_user+2002; (* edit finished otherwise (cursor) *) + cn_edit_show = wm_user+2003; (* edit is about to be shown *) + cn_edit_toshow = wm_user+2004; (* internal: show the editor *) + cn_edit_update = wm_user+2005; (* internal: editor position must be updated *) + (*@\\\*) + +type + TMyAlign=(alRight,alLeft,alCenter,alDefault); + T_nextcell=(nc_rightdown, nc_downright, nc_leftdown, nc_downleft, + nc_leftup, nc_upleft, nc_rightup, nc_upright); + T_lastcell=(lc_newcolrow, lc_stop, lc_first, lc_exit); + T_Wordwrap=(ww_none, ww_wordwrap, ww_ellipsis,ww_default); + TCellEvent = procedure (Sender:TObject; col,row:longint) of object; + TCellEventBool = procedure (Sender:TObject; col,row:longint; var result:boolean) of object; + TCellDrawEvent = procedure (Sender:TObject; col,row:longint; + var align:TMyAlign; var Wordwrap: T_Wordwrap); + TColEvent = procedure (Sender:TObject; col:longint) of object; + TRowEvent = procedure (Sender:TObject; row:longint) of object; + TShowHintCellProc = procedure (Sender:TObject; col,row:longint; var HintStr: string; + var CanShow: Boolean; var HintInfo: THintInfo) of object; + t_relation = (rel_greater, rel_equal, rel_less); + t_colrow = (c_column,c_fixed_column, c_row, c_fixed_row); +(*$ifdef delphi_ge_3 *) + (*@/// THintMessage=record end; *) + THintMessage=record + Msg: Cardinal; + Unused: Integer; + HintInfo: PHintInfo; + Result: Longint; + end; + (*@\\\0000000401*) +(*$endif *) + TCompareFunction = function(Sender:TObject; colrow,compare1,compare2:longint):t_relation of object; + TSortFunction = procedure (ColRow,Min,Max: longint; ByColumn,ascending: boolean) of object; + TStringAlignGrid=class; (* forward *) + (*@/// TCellProperties=class(TObject) *) + TCellProperties=class(TObject) + protected + f_grid: TStringAlignGrid; + f_brush: TBrush; + f_selBrush: TBrush; + f_font: TFont; + f_selfont: TFont; + procedure SetFont(value: TFont); + procedure SetSelFont(value: TFont); + procedure SetBrush(value: TBrush); + procedure SetSelBrush(value: TBrush); + procedure WriteToWriter(writer:TWriter); virtual; + procedure ReadFromReader(Reader:TReader; grid:TStringAlignGrid); + procedure ReadSingleProperty(Proptype:integer; Reader:TReader; grid:TStringAlignGrid); virtual; + public + align: TMyAlign; + wordwrap: T_Wordwrap; + editable: byte; + property brush:TBrush read f_brush write SetBrush; + property selbrush:TBrush read f_selbrush write SetSelBrush; + property Font:TFont read f_Font write SetFont; + property selFont:TFont read f_selFont write SetSelFont; + constructor Create(Grid:TStringAlignGrid); + destructor destroy; override; + procedure assign(value:TCellProperties); virtual; + function isempty: boolean; virtual; + function clone:TCellProperties; virtual; + end; + (*@\\\000000130B*) + TCellPropertiesClass = class of TCellProperties; + (*@/// TNewInplaceEdit = class(TInplaceEdit) *) + TNewInplaceEdit = class(TInplaceEdit) + private + FAlignment: TMyAlign; + f_multiline: boolean; + procedure WMWindowPosChanged(var Message: TMessage); message WM_WINDOWPOSCHANGED; + procedure EMSetSel(var Message: TMessage); message EM_SETSEL; + protected + Clicktime: longint; + procedure CreateParams(var Params: TCreateParams); override; + procedure SetAlignment(Value:TMyAlign); + procedure KeyPress(var Key: Char); override; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + (*$ifdef delphi_1 *) + function GetGrid:TCustomGrid; + (*$endif *) + procedure UpdateContents; (*$ifdef delphi_1 *) virtual; (*$else *) override; (*$endif *) + public + col, row: longint; (* col and row of the cell *) + event: boolean; (* Before edit event already started? *) + oldtext: string; (* The text BEFORE the edit started *) + { In Delphi 1's VCL the override is missing in TInplaceEdit } + constructor Create(AOwner:TComponent); (*$ifndef delphi_1 *) override; (*$endif *) + property Alignment: TMyAlign read FAlignment write SetAlignment; + property MultiLine: boolean read f_multiline write f_multiline; + (*$ifdef delphi_1 *) + property Grid: TCustomGrid read GetGrid; + (*$endif *) + (*$ifdef delphi_ge_3 *) + property ImeMode; + property ImeName; + (*$endif *) + end; + (*@\\\0000001001*) + (*@/// TStringAlignGrid=class(TStringGrid) *) + TStringAlignGrid = class(TStringGrid) + (*@/// - The object creation, destroying and initalizing *) + protected + procedure Initialize; virtual; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + (*@\\\0000000201*) + (*@/// - The lists *) + protected + FPropCol: TList; + FPropRow: TList; + FFPropCol: TList; + FFPropRow: TList; + FPropCell: TList; + + FCellPropertiesClass:TCellPropertiesClass; + + function GetObjectCol(ACol: longint):TCellProperties; + procedure SetObjectCol(ACol: longint; const Value: TCellProperties); + function GetObjectRow(ARow: longint):TCellProperties; + procedure SetObjectRow(ARow: longint; const Value: TCellProperties); + function GetObjectFixedCol(ACol: longint):TCellProperties; + procedure SetObjectFixedCol(ACol: longint; const Value: TCellProperties); + function GetObjectFixedRow(ARow: longint):TCellProperties; + procedure SetObjectFixedRow(ARow: longint; const Value: TCellProperties); + + function GetObjectCell(ACol,ARow: longint):TCellProperties; + procedure SetObjectCell(ACol,ARow: longint; const Value: TCellProperties); + + protected + property CellPropertiesClass:TCellPropertiesClass read FCellPropertiesClass write FCellPropertiesClass; + property ObjectCell[ACol,ARow:longint]: TCellProperties read GetObjectCell write SetObjectCell; + property ObjectRow[ACol:longint]: TCellProperties read GetObjectRow write SetObjectRow; + property ObjectCol[ACol:longint]: TCellProperties read GetObjectCol write SetObjectCol; + property ObjectFixedRow[ACol:longint]: TCellProperties read GetObjectFixedRow write SetObjectFixedRow; + property ObjectFixedCol[ACol:longint]: TCellProperties read GetObjectFixedCol write SetObjectFixedCol; + (*@\\\0000000801*) + (*@/// + Routines and variables for the alignments *) + protected + FAlign: TMyAlign; + (*@/// The DFM read procedures (compatibility only) *) + procedure ReadAlignCell(Stream: TStream); + procedure ReadAlignCol(Stream: TStream); + procedure ReadAlignRow(Stream: TStream); + procedure ReadFixedAlignCol(Stream: TStream); + procedure ReadFixedAlignRow(Stream: TStream); + (*@\\\0000000201*) + (*@/// property read/write for the alignments *) + procedure SetAlign(const Value: TMyAlign); + + function GetAlignCol(ACol: longint):TMyAlign; + procedure SetAlignCol(ACol: longint; const Value: TMyAlign); + function GetFixAlignCol(ACol: longint):TMyAlign; + procedure SetFixAlignCol(ACol: longint; const Value: TMyAlign); + + function GetAlignRow(ARow:longint):TMyAlign; + procedure SetAlignRow(ARow:longint; const Value: TMyAlign); + function GetFixAlignRow(ARow:longint):TMyAlign; + procedure SetFixAlignRow(ARow:longint; const Value: TMyAlign); + + function GetAlignCell(ACol,ARow: longint):TMyAlign; + procedure SetAlignCell(ACol,ARow: longint; const Value: TMyAlign); + (*@\\\0000000301*) + function ReadAlignColRow(Stream: TStream; colrow:t_colrow):boolean; + { procedure WriteAlignColRow(Stream: TStream; count: longint; list:TList); } + public + (*@/// property AlignCell/AlignCol/FixAlignCol/AlignRow/FixAlignRow *) + property AlignCell[ACol,ARow:longint]: TMyAlign read GetAlignCell write SetAlignCell; + property AlignCol[ACol:longint]: TMyAlign read GetAlignCol write SetAlignCol; + property FixAlignCol[ACol:longint]: TMyAlign read GetFixAlignCol write SetFixAlignCol; + property AlignRow[ARow:longint]: TMyAlign read GetAlignRow write SetAlignRow; + property FixAlignRow[ARow:longint]: TMyAlign read GetFixAlignRow write SetFixAlignRow; + (*@\\\0000000155*) + (*@/// procedure ResetAlign...; *) + procedure ResetAlignment; + procedure ResetAlignCell(ACol,ARow:longint); + procedure ResetAlignCol(ACol:longint); + procedure ResetAlignFixedCol(ACol:longint); + procedure ResetAlignRow(ARow:longint); + procedure ResetAlignFixedRow(ARow:longint); + + procedure ResetAlignCellAll; + procedure ResetAlignColAll; + procedure ResetAlignRowAll; + (*@\\\0000000801*) + published + property Alignment: TMyAlign read falign write SetAlign default alLeft; + (*@\\\0000000B15*) + (*@/// + Routines and variables for the wordwraps *) + protected + f_wordwrap: T_Wordwrap; + (*@/// property read/write for the wordwraps *) + procedure SetWordWrap(value: T_Wordwrap); + + function GetWordwrapCol(ACol: longint):t_Wordwrap; + procedure SetWordwrapCol(ACol: longint; const Value: t_Wordwrap); + function GetFixWordwrapCol(ACol: longint):t_Wordwrap; + procedure SetFixWordwrapCol(ACol: longint; const Value: t_Wordwrap); + + function GetWordwrapRow(ARow:longint):t_Wordwrap; + procedure SetWordwrapRow(ARow:longint; const Value: t_Wordwrap); + function GetFixWordwrapRow(ARow:longint):t_Wordwrap; + procedure SetFixWordwrapRow(ARow:longint; const Value: t_Wordwrap); + + function GetWordwrapCell(ACol,ARow: longint):t_Wordwrap; + procedure SetWordwrapCell(ACol,ARow: longint; const Value: t_Wordwrap); + (*@\\\*) + public + (*@/// property WordwrapCell/WordwrapCol/FixWordwrapCol/WordwrapRow/FixWordwrapRow *) + property WordwrapCell[ACol,ARow:longint]: t_Wordwrap read GetWordwrapCell write SetWordwrapCell; + property WordwrapCol[ACol:longint]: t_Wordwrap read GetWordwrapCol write SetWordwrapCol; + property FixWordwrapCol[ACol:longint]: t_Wordwrap read GetFixWordwrapCol write SetFixWordwrapCol; + property WordwrapRow[ARow:longint]: t_Wordwrap read GetWordwrapRow write SetWordwrapRow; + property FixWordwrapRow[ARow:longint]: t_Wordwrap read GetFixWordwrapRow write SetFixWordwrapRow; + (*@\\\0000000401*) + (*@/// procedure ResetWordwrap...; *) + procedure ResetWordwrapCell(ACol,ARow:longint); + procedure ResetWordwrapCol(ACol:longint); + procedure ResetWordwrapFixedCol(ACol:longint); + procedure ResetWordwrapRow(ARow:longint); + procedure ResetWordwrapFixedRow(ARow:longint); + + procedure ResetWordwrapCellAll; + procedure ResetWordwrapColAll; + procedure ResetWordwrapRowAll; + (*@\\\*) + published + property Wordwrap: T_Wordwrap read f_wordwrap write SetWordWrap default ww_none; + (*@\\\0000000814*) + (*@/// + Routines and variables for the edit-enabled *) + protected + FEditable: boolean; { allow switching on editing for single objects only } + FAlwaysEdit: boolean; { for the component editor to have all cell editable } + (*@/// The DFM read procedures (compatibility only) *) + procedure ReadEditCell(Stream: TStream); + procedure ReadEditCol(Stream: TStream); + procedure ReadEditRow(Stream: TStream); + + { Utility functions } + function ReadEditColRow(Stream: TStream; colrow:t_colrow):boolean; + (*@\\\*) + (*@/// property read/write for the edit-enabled *) + function GetEditCol(ACol: longint):Boolean; + procedure SetEditCol(ACol: longint; const Value: Boolean); + + function GetEditRow(ARow:longint):Boolean; + procedure SetEditRow(ARow:longint; const Value: Boolean); + + function GetEditCell(ACol,ARow: longint):Boolean; + procedure SetEditCell(ACol,ARow: longint; const Value: Boolean); + (*@\\\*) + public + (*@/// property EditCell/EditCol/EditRow *) + property EditCell[ACol,ARow:longint]: Boolean read GetEditCell write SetEditCell; + property EditCol[ACol:longint]: Boolean read GetEditCol write SetEditCol; + property EditRow[ARow:longint]: Boolean read GetEditRow write SetEditRow; + (*@\\\000000010A*) + (*@/// procedure ResetEdit...; *) + procedure ResetEditCell(ACol,ARow:longint); + procedure ResetEditCol(ACol:longint); + procedure ResetEditRow(ARow:longint); + + procedure ResetEditCellAll; + procedure ResetEditColAll; + procedure ResetEditRowAll; + (*@\\\000000071A*) + published + property Editable:boolean read FEditable write FEditable default true; + (*@\\\0000000714*) + (*@/// + Routines and variables for the colors *) + protected + (*@/// The DFM read procedures (compatibility) *) + procedure ReadColorCell(Reader: TReader); + procedure ReadColorCol(Reader: TReader); + procedure ReadColorRow(Reader: TReader); + procedure ReadFixedColorCol(Reader: TReader); + procedure ReadFixedColorRow(Reader: TReader); + + procedure ReadColorColRow(Reader: TReader; colrow:t_colrow); + (*@\\\000000073B*) + (*@/// property read/write for the colors *) + function GetColorCol(ACol: longint):TColor; + procedure SetColorCol(ACol: longint; const Value: TColor); + function GetFixColorCol(ACol: longint):TColor; + procedure SetFixColorCol(ACol: longint; const Value: TColor); + + function GetColorRow(ARow:longint):TColor; + procedure SetColorRow(ARow:longint; const Value: TColor); + function GetFixColorRow(ARow:longint):TColor; + procedure SetFixColorRow(ARow:longint; const Value: TColor); + + function GetColorCell(ACol,ARow: longint):TColor; + procedure SetColorCell(ACol,ARow: longint; const Value: TColor); + + procedure SetFixedColor(const Value: TColor); + (*@\\\*) + (*@/// variables and property read/write for alternating colors *) + protected + f_altcolcolor, f_altrowcolor: TColor; + f_doaltcolcolor, f_doaltrowcolor: boolean; + procedure setdoaltrowcolor(value:boolean); + procedure setdoaltcolcolor(value:boolean); + procedure setaltcolcolor(value:TColor); + procedure setaltrowcolor(value:TColor); + (*@\\\*) + public + (*@/// property ColorCell/ColorCol/FixColorCol/ColorRow/FixColorRow *) + property ColorCell[ACol,ARow:longint]: TColor read GetColorCell write SetColorCell; + property ColorCol[ACol:longint]: TColor read GetColorCol write SetColorCol; + property FixColorCol[ACol:longint]: TColor read GetFixColorCol write SetFixColorCol; + property ColorRow[ARow:longint]: TColor read GetColorRow write SetColorRow; + property FixColorRow[ARow:longint]: TColor read GetFixColorRow write SetFixColorRow; + (*@\\\0000000301*) + (*@/// procedure ResetColor...; *) + procedure ResetColorCell(ACol,ARow:longint); + procedure ResetColorCol(ACol:longint); + procedure ResetColorFixedCol(ACol:longint); + procedure ResetColorRow(ARow:longint); + procedure ResetColorFixedRow(ARow:longint); + + procedure ResetColorCellAll; + procedure ResetColorColAll; + procedure ResetColorRowAll; + (*@\\\0000000701*) + property AlternateColorCol: TColor read f_altcolcolor write setaltcolcolor default clWindow; + property AlternateColorRow: TColor read f_altrowcolor write setaltrowcolor default clWindow; + property DoAlternateColorCol: boolean read f_doaltcolcolor write setdoaltcolcolor default false; + property DoAlternateColorRow: boolean read f_doaltrowcolor write setdoaltrowcolor default false; + published + property FixedColor write SetFixedColor; + (*@\\\0000000A01*) + (*@/// + Routines and variables for the selected colors *) + protected + (*@/// The DFM read procedures (compatibility) *) + procedure ReadSelColorCell(Reader: TReader); + procedure ReadSelColorCol(Reader: TReader); + procedure ReadSelColorRow(Reader: TReader); + + function ReadSelColorColRow(Reader: TReader; colrow:t_colrow):boolean; + (*@\\\0000000501*) + protected + (*@/// property read/write for the colors *) + f_SelCellColor: TColor; + procedure SetSelCellColor(Value: TColor); + + function GetSelColorCol(ACol: longint):TColor; + procedure SetSelColorCol(ACol: longint; const Value: TColor); + + function GetSelColorRow(ARow:longint):TColor; + procedure SetSelColorRow(ARow:longint; const Value: TColor); + + function GetSelColorCell(ACol,ARow: longint):TColor; + procedure SetSelColorCell(ACol,ARow: longint; const Value: TColor); + (*@\\\0000000301*) + public + (*@/// property SelectedColorCell/SelectedColorCol/SelectedColorRow *) + property SelectedColorCell[ACol,ARow:longint]: TColor read GetSelColorCell write SetSelColorCell; + property SelectedColorCol[ACol:longint]: TColor read GetSelColorCol write SetSelColorCol; + property SelectedColorRow[ARow:longint]: TColor read GetSelColorRow write SetSelColorRow; + (*@\\\*) + (*@/// procedure ResetColor...; *) + procedure ResetSelectedColorCell(ACol,ARow:longint); + procedure ResetSelectedColorCol(ACol:longint); + procedure ResetSelectedColorRow(ARow:longint); + + procedure ResetSelectedColorCellAll; + procedure ResetSelectedColorColAll; + procedure ResetSelectedColorRowAll; + (*@\\\*) + published + property SelectedCellColor:TColor read f_SelCellColor write SetSelCellColor default clActiveCaption; + (*@\\\0000000901*) + (*@/// + Routines and variables for the selected font colors *) + protected + (*@/// The DFM read procedures (compatibility) *) + procedure ReadSelFontColorCell(Reader: TReader); + procedure ReadSelFontColorCol(Reader: TReader); + procedure ReadSelFontColorRow(Reader: TReader); + function ReadSelFontColorColRow(Reader:TReader; colrow:t_colrow):boolean; + (*@\\\000000040A*) + protected + (*@/// property read/write for the colors *) + f_SelFontColor: TColor; + procedure SetSelFontColor(Value: TColor); + + function GetSelFontColorCol(ACol: longint):TColor; + procedure SetSelFontColorCol(ACol: longint; const Value: TColor); + + function GetSelFontColorRow(ARow:longint):TColor; + procedure SetSelFontColorRow(ARow:longint; const Value: TColor); + + function GetSelFontColorCell(ACol,ARow: longint):TColor; + procedure SetSelFontColorCell(ACol,ARow: longint; const Value: TColor); + (*@\\\000000010F*) + public + (*@/// property SelectedFontColorCell/SelectedFontColorCol/SelectedFontColorRow *) + property SelectedFontColorCell[ACol,ARow:longint]: TColor read GetSelFontColorCell write SetSelFontColorCell; + property SelectedFontColorCol[ACol:longint]: TColor read GetSelFontColorCol write SetSelFontColorCol; + property SelectedFontColorRow[ARow:longint]: TColor read GetSelFontColorRow write SetSelFontColorRow; + (*@\\\*) + (*@/// procedure ResetColor...; *) + procedure ResetSelectedFontColorCell(ACol,ARow:longint); + procedure ResetSelectedFontColorCol(ACol:longint); + procedure ResetSelectedFontColorRow(ARow:longint); + + procedure ResetSelectedFontColorCellAll; + procedure ResetSelectedFontColorColAll; + procedure ResetSelectedFontColorRowAll; + (*@\\\*) + published + property SelectedFontColor:TColor read f_SelFontColor write SetSelFontColor default clWhite; + (*@\\\0000000601*) + (*@/// + Routines and variables for the fonts *) + protected + FFixedFont: TFont; + function FixedFontChanged:boolean; + (*@/// The DFM read procedures (compatibility) *) + procedure ReadFontCell(Reader: TReader); + procedure ReadFontCol(Reader: TReader); + procedure ReadFontRow(Reader: TReader); + procedure ReadFixedFontCol(Reader: TReader); + procedure ReadFixedFontRow(Reader: TReader); + + function ReadFontColRow(Reader: TReader; colrow:t_colrow):boolean; + (*@\\\*) + (*@/// property read/write for the fonts *) + function GetFontCell(ACol,ARow: longint):TFont; + procedure SetFontCell(ACol,ARow: longint; const Value: TFont); + + function GetFontCol(ACol: longint):TFont; + procedure SetFontCol(ACol: longint; const Value: TFont); + function GetFontFixedCol(ACol: longint):TFont; + procedure SetFontFixedCol(ACol: longint; const Value: TFont); + function GetFontRow(ARow: longint):TFont; + procedure SetFontRow(ARow: longint; const Value: TFont); + function GetFontFixedRow(ARow: longint):TFont; + procedure SetFontFixedRow(ARow: longint; const Value: TFont); + function GetFontColRowInternal(AColRow: longint; create:boolean; List:TList):TFont; + + procedure SetFixedFont(value: TFont); + (*@\\\0000000E01*) + (*@/// utility functions *) + function GetFontCellComplete(ACol,ARow: longint):TFont; + function GetFontCellInternal(ACol,ARow: longint; create:boolean):TFont; + procedure FontChanged(AFont: TObject); + (*@\\\0000000316*) + public + (*@/// property CellFont/ColFont/FixedColFont/RowFont/FixedRowFont *) + property CellFont[ACol,ARow:longint]: TFont read GetFontCell write SetFontCell; + property ColFont[ACol:longint]: TFont read GetFontCol write SetFontCol; + property RowFont[ARow:longint]: TFont read GetFontRow write SetFontRow; + property FixedColFont[ACol:longint]: TFont read GetFontFixedCol write SetFontFixedCol; + property FixedRowFont[ARow:longint]: TFont read GetFontFixedRow write SetFontFixedRow; + (*@\\\*) + (*@/// procedure Reset...; *) + procedure ResetFontCell(ACol,ARow:longint); + procedure ResetFontCol(ACol:longint); + procedure ResetFontFixedCol(ACol:longint); + procedure ResetFontRow(ARow:longint); + procedure ResetFontFixedRow(ARow:longint); + + procedure ResetFontCellAll; + procedure ResetFontColAll; + procedure ResetFontRowAll; + (*@\\\*) + { published } + property FixedFont: TFont read FFixedFont write SetFixedFont stored FixedFontChanged; + (*@\\\0000000901*) + (*@/// + Routines and variables for the brushs *) + protected + FFixedBrush: TBrush; + (*@/// The DFM read procedures (compatibility only) *) + procedure ReadBrushCell(Reader: TReader); + procedure ReadBrushCol(Reader: TReader); + procedure ReadBrushRow(Reader: TReader); + procedure ReadFixedBrushCol(Reader: TReader); + procedure ReadFixedBrushRow(Reader: TReader); + + function ReadBrushColRow(Reader: TReader; colrow:t_colrow):boolean; + (*@\\\0000000744*) + (*@/// property read/write for the brushs *) + function GetBrushCell(ACol,ARow: longint):TBrush; + procedure SetBrushCell(ACol,ARow: longint; const Value: TBrush); + + function GetBrushCol(ACol: longint):TBrush; + procedure SetBrushCol(ACol: longint; const Value: TBrush); + function GetBrushFixedCol(ACol: longint):TBrush; + procedure SetBrushFixedCol(ACol: longint; const Value: TBrush); + function GetBrushRow(ARow: longint):TBrush; + procedure SetBrushRow(ARow: longint; const Value: TBrush); + function GetBrushFixedRow(ARow: longint):TBrush; + procedure SetBrushFixedRow(ARow: longint; const Value: TBrush); + function GetBrushColRowInternal(AColRow: longint; create:boolean; List:TList):TBrush; + (*@\\\*) + (*@/// utility functions *) + function GetBrushCellComplete(ACol,ARow: longint):TBrush; + function GetBrushCellInternal(ACol,ARow: longint; create:boolean):TBrush; + procedure BrushChanged(ABrush: TObject); + (*@\\\000000032B*) + public + (*@/// property CellBrush/ColBrush/FixedColBrush/RowBrush/FixedRowBrush *) + { The Brush for each cell and for col and row } + property CellBrush[ACol,ARow:longint]: TBrush read GetBrushCell write SetBrushCell; + property ColBrush[ACol:longint]: TBrush read GetBrushCol write SetBrushCol; + property RowBrush[ARow:longint]: TBrush read GetBrushRow write SetBrushRow; + property FixedColBrush[ACol:longint]: TBrush read GetBrushFixedCol write SetBrushFixedCol; + property FixedRowBrush[ARow:longint]: TBrush read GetBrushFixedRow write SetBrushFixedRow; + (*@\\\0000000501*) + (*@/// procedure ResetBrush...; *) + procedure ResetBrushCell(ACol,ARow:longint); + procedure ResetBrushCol(ACol:longint); + procedure ResetBrushFixedCol(ACol:longint); + procedure ResetBrushRow(ARow:longint); + procedure ResetBrushFixedRow(ARow:longint); + + procedure ResetBrushCellAll; + procedure ResetBrushColAll; + procedure ResetBrushRowAll; + (*@\\\*) + (*@\\\0000000801*) + (*@/// + Routines and variables for the hints *) + protected + FHintCellLast: TPoint; + FShowCellHints: Boolean; + FHintCell: TList; + FSaveHint: Boolean; + FOnShowHintCell: TShowHintCellProc; + procedure ReadHint(Reader: TReader); + procedure WriteHint(Writer: TWriter); + function GetHintCell(ACol,ARow: longint):string; + procedure SetHintCell(ACol,ARow: longint; const Value: string); + procedure ShowHintCell(var HintStr: (*$ifdef shortstring*)string;(*$else*)ansistring;(*$endif*) + var CanShow: Boolean; var HintInfo: THintInfo); + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + (*$ifdef delphi_ge_3 *) + procedure CMHintShow(var Message: THintMessage); message CM_HINTSHOW; + (*$endif *) + public + property HintCell[ACol,ARow:longint]:string read GetHintCell write SetHintCell; + procedure ResetHintCellAll; + published + property ShowCellHints: boolean read FShowCellHints write FShowCellHints default true; + property OnShowHintCell: TShowHintCellProc read FOnShowHintCell write FOnShowHintCell; + (*@\\\000000161A*) + (*@/// + Routines and variables for the cells itself *) + protected + FCell: TList; { Only for loading and saving the cells property } + FSaveCells: Boolean; + procedure ReadCells(Reader: TReader); + procedure WriteCells(Writer: TWriter); + procedure ListToCells(List:TList); + procedure CellsToList(var List:TList); + function GetCellAsDate(ACol,ARow:longint):TDateTime; + procedure SetCellAsDate(ACol,ARow:longint; value:TDateTime); + function GetCellAsInt(ACol,ARow:longint):longint; + procedure SetCellAsInt(ACol,ARow:longint; value:longint); + public + property CellsAsDate[ACol,ARow:longint]: TDateTime read GetCellAsDate write SetCellAsDate; + property CellAsInt[ACol,ARow:longint]:longint read GetCellAsInt write SetCellAsInt; + (*@\\\0000000D03*) + (*@/// + The ResetAll methods as shortcuts *) + public + procedure ResetAllCell(ACol,ARow:longint); + procedure ResetAllCol(ACol:longint); + procedure ResetAllFixedCol(ACol:longint); + procedure ResetAllRow(ARow:longint); + procedure ResetAllFixedRow(ARow:longint); + + procedure ResetAllCellAll; + procedure ResetAllColAll; + procedure ResetAllRowAll; + (*@\\\0000000201*) + (*@/// + The Inplace-Edit and it's events sent to the grid *) + protected + edit_visible: boolean; + f_reshow_edit: boolean; + f_last_sel_pos: longint; + f_last_sel_len: longint; + f_on_after_edit: TCellEvent; + f_on_cancel_edit: TCellEvent; + f_on_before_edit: TCellEvent; + f_on_validate: TCellEventBool; + f_selectall: boolean; + f_edit_multi: boolean; + function CreateEditor: TInplaceEdit; override; + function CanEditShow: Boolean; override; + procedure mcn_edit_return(var msg:TMessage); message cn_edit_return; + procedure mcn_edit_cancel(var msg:TMessage); message cn_edit_cancel; + procedure mcn_edit_exit(var msg:TMessage); message cn_edit_exit; + procedure mcn_edit_show(var msg:TMessage); message cn_edit_show; + procedure mcn_edit_show_it(var msg:TMessage); message cn_edit_toshow; + procedure mcn_edit_update(var msg:TMessage); message cn_edit_update; + procedure doExit; override; + procedure doEnter; override; + procedure KeyPress(var Key: Char); override; + procedure WMLButtonDown(var Message: TMessage); message WM_LBUTTONDOWN; + procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; + procedure WMCommand(var Message: TWMCommand); message WM_COMMAND; + procedure UpdateText_; + procedure Update_Edit; + public + procedure ShowEdit; + procedure HideEdit(cancel:boolean); + published + property OnAfterEdit: TCellEvent read f_on_after_edit write f_on_after_edit; + property OnCancelEdit: TCellEvent read f_on_cancel_edit write f_on_cancel_edit; + property OnBeforeEdit: TCellEvent read f_on_before_edit write f_on_before_edit; + property OnValidateEdit: TCellEventBool read f_on_validate write f_on_validate; + property SelectEditText: boolean read f_selectall write f_selectall default true; + property EditMultiline: boolean read f_edit_multi write f_edit_multi default false; + (*@\\\0000001B01*) + (*@/// + Insertion and removing and moving and exchanging of columns and rows *) + protected + procedure RowMoved(FromIndex, ToIndex: Longint); override; + procedure ColumnMoved(FromIndex, ToIndex: Longint); override; + public + procedure RemoveCol(ACol:longint); + procedure RemoveRow(ARow:longint); + procedure InsertCol(ACol:longint); + procedure InsertRow(ARow:longint); + procedure ExchangeRow(FromIndex, ToIndex: Longint); + procedure ExchangeCol(FromIndex, ToIndex: Longint); + (*@\\\*) + (*@/// + Import and export functions *) + protected + f_html_caption: string; + f_html_border: integer; + public + property HTMLCaption: string read f_html_caption write f_html_caption; + property HTMLBorder: integer read f_html_border write f_html_border default 0; + function Contents2HTML(data:TMemorystream):TMemorystream; + procedure Contents2HTMLClipboard; + function Contents2CSV(data:TMemorystream; csv:char; range:TGridRect):TMemorystream; + procedure CSV2Contents(data:TStream; csv:char; range:TGridRect); + procedure Contents2CSVClipboard(csv:char; range:TGridRect); + procedure ClipboardCSV2Contents(csv:char; range:TGridRect); + procedure SaveToFile(const filename:string); + procedure LoadFromFile(const filename:string); + procedure CopyToClipboard; + procedure CopyFromClipboard; + (*@\\\0000000601*) + (*@/// + Miscellaneous stuff like internal calculations etc. *) + protected + function is_fixed(ACol,ARow: longint):boolean; + procedure WMChar(var Msg: TWMChar); message WM_CHAR; + procedure CalcTextSize(ACol,ARow:longint; var Width,height: integer); + function textheight(ACol,ARow:longint):integer; + function textwidth(ACol,ARow:longint):integer; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure TopLeftChanged; override; + public + procedure ClearSelection; + procedure NextEditableCell(var ACol,ARow:longint); + procedure NextCell(direction:t_nextcell; LastCellBehaviour:t_lastcell; Var ACol,ARow:longint); + (*$ifdef delphi_ge_3 *) + published + property ImeMode; + property ImeName; + (*$endif *) + (*@\\\0000000801*) + (*@/// - For the DFM read/write *) + protected + procedure Loaded; override; + procedure DefineProperties(Filer: TFiler); override; + + procedure ReadPropCell(Reader: TReader); + procedure ReadPropCol(Reader: TReader); + procedure ReadPropRow(Reader: TReader); + procedure ReadPropFixedCol(Reader: TReader); + procedure ReadPropFixedRow(Reader: TReader); + + procedure WritePropCell(Writer: TWriter); + procedure WritePropCol(Writer: TWriter); + procedure WritePropRow(Writer: TWriter); + procedure WritePropFixedCol(Writer: TWriter); + procedure WritePropFixedRow(Writer: TWriter); + + function ReadPropColRow(Reader: TReader; list:TList):boolean; + function ReadPropCellInt(Reader: TReader; list:TList):boolean; + procedure WritePropColRow(Writer: TWriter; count: longint; list:TList); + procedure WritePropCellInt(Writer: TWriter; x,y:longint; list:TList); + (*@\\\0000000201*) + (*@/// + The other properties *) + protected + f_nextcell: Boolean; + f_drawselect: boolean; + f_nextcell_edit, f_nextcell_tab: T_nextcell; + f_lastcell_edit, f_lastcell_tab: t_lastcell; + f_fixedcols, f_fixedrows: longint; + procedure SetDrawselect(value: boolean); + published + property AutoEditNextCell: boolean read f_nextcell write f_nextcell default false; + property NextCellEdit: T_nextcell read f_nextcell_edit write f_nextcell_edit default nc_rightdown; + property NextCellTab: T_nextcell read f_nextcell_tab write f_nextcell_tab default nc_rightdown; + property AfterLastCellEdit: t_lastcell read f_lastcell_edit write f_lastcell_edit default lc_newcolrow; + property AfterLastCellTab: t_lastcell read f_lastcell_tab write f_lastcell_tab default lc_first; + property DrawSelection: boolean read f_drawselect write SetDrawselect default true; + (*@\\\0000000D01*) + (*@/// + Sorting *) + private + f_compare_col: TCompareFunction; + f_compare_row: TCompareFunction; + protected + fSortMethod: TSortFunction; + procedure DoSortBubble(ColRow,Min,Max: longint; ByColumn,ascending:boolean); + procedure DoSortQuick(ColRow,Min,Max: longint; ByColumn,ascending:boolean); + public + function CompareColString(Sender: TObject; Column, Row1,Row2: longint):t_relation; + function CompareRowString(Sender: TObject; RowNr, Col1,Col2: longint):t_relation; + function CompareColInteger(Sender: TObject; Column, Row1,Row2: longint):t_relation; + function CompareRowInteger(Sender: TObject; RowNr, Col1,Col2: longint):t_relation; + procedure SortColumn(Column: longint; Ascending:boolean); + procedure SortRow(Rownumber: longint; Ascending:boolean); + published + property OnCompareRow: TCompareFunction read f_compare_row write f_compare_row; + property OnCompareCol: TCompareFunction read f_compare_col write f_compare_col; + (*@\\\000000110C*) + (*@/// + Events for col and row resizing *) + protected + fwidthschanged: TNotifyEvent; + fheightschanged: TNotifyEvent; + procedure ColWidthsChanged; override; + procedure RowHeightsChanged; override; + public + procedure AdjustRowHeight(ARow:longint); + procedure AdjustColWidth(ACol:longint); + procedure AdjustRowHeights; + procedure AdjustColWidths; + published + property OnColWidthsChanged: TNotifyEvent read fwidthschanged write fwidthschanged; + property OnRowHeightsChanged: TNotifyEvent read fheightschanged write fheightschanged; + { Suggested by Olav Lindkjolen } + protected + FAutoAdjustLastCol: Boolean; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure SetAutoAdjustLastCol(Value: Boolean); + procedure WMSize(var Msg: TWMSize); message WM_SIZE; + procedure SetGridLineWidthNew(Value: Integer); + public + procedure AdjustLastCol; + function GetTotalWidth:Longint; + function GetTotalHeight:Longint; + published + property AutoAdjustLastCol:boolean read FAutoAdjustLastCol write SetAutoAdjustLastCol default false; + { A virtual SetGridLineWidth would make this be easier... } + property GridLineWidth write SetGridLineWidthNew; + (*@\\\0000000601*) + (*@/// - The main procedure DrawCell *) + protected + f_ondrawcellpar: TCellDrawEvent; + procedure DrawCell(ACol,ARow:Longint; ARect:TRect; AState:TGridDrawState); override; + procedure DrawCellBack(ACol,ARow:Longint; var ARect:TRect; AState:TGridDrawState); virtual; + procedure DrawCellText(ACol,ARow:Longint; var ARect:TRect; AState:TGridDrawState); virtual; + procedure DrawCellCombo(ACol,ARow:Longint; var ARect:TRect; AState:TGridDrawState); virtual; + { published } + (* Last minute access to the text parameters, maybe useful *) + property OnDrawCellParameters: TCellDrawEvent read f_ondrawcellpar write f_ondrawcellpar; + procedure Paint; override; + (*@\\\0000000A01*) + (*@/// + Clicks on the fixed columns/rows *) + protected + f_fixedcolclick: TColEvent; + f_fixedrowclick: TRowEvent; + procedure MouseDown(Button:TMouseButton; Shift:TShiftState; X,Y:Integer); override; + published + property OnFixedColClick:TColEvent read f_fixedcolclick write f_fixedcolclick; + property OnFixedRowClick:TRowEvent read f_fixedRowclick write f_fixedRowclick; + (*@\\\*) + (*@/// + Allow the scrollbar to act immidiatly *) + protected + f_dyn_scroll: boolean; + public + procedure WMHScroll(var Msg:TWMHScroll); message wm_hscroll; + procedure WMVScroll(var Msg:TWMVScroll); message wm_vscroll; + function VerticalScrollBarVisible: boolean; + function HorizontalScrollBarVisible: boolean; + published + property RedrawWhileScroll:boolean read f_dyn_scroll write f_dyn_scroll default false; + (*@\\\0000000601*) + (*@/// + Cut 'n' Paste *) + protected + F_PasteEditableOnly: boolean; + f_cutnpaste: boolean; + procedure WMCut(var Message: TMessage); message WM_CUT; + procedure WMCopy(var Message: TMessage); message WM_COPY; + procedure WMPaste(var Message: TMessage); message WM_PASTE; + public + property PasteEditableOnly: boolean read F_PasteEditableOnly write F_PasteEditableOnly; + property AllowCutnPaste: boolean read f_cutnpaste write f_cutnpaste; + (*@\\\000000090C*) + (*@/// ! Comboboxes *) + protected + function CellHasCombobox(ACol,ARow:longint):boolean; + (*@\\\*) + end; + (*@\\\0000000F01*) + +(*@/// Internal routines and objects, just put here to let the be used by aligredi too *) +type + (*@/// TMyFont = class(TFont) *) + TMyFont = class(TFont) + protected + procedure Changed; override; + public + HasChanged: boolean; + end; + (*@\\\0000000503*) + (*@/// TMyBrush = class(TBrush) *) + TMyBrush = class(TBrush) + protected + procedure Changed; override; + public + HasChanged: boolean; + end; + (*@\\\*) + + +function GetItemCell(ACol,ARow: longint; List:TList):Pointer; +function SetItemCell(ACol,ARow: longint; List:TList; value:Pointer):pointer; +function GetItemCol(ACol: longint; List:TList):Pointer; +function SetItemCol(ACol: longint; List:TList; value:Pointer):pointer; + +procedure WriteFont(Writer: TWriter; v:TFont); +function ReadFont(Reader: TReader):TFont; +procedure WriteBrush(Writer: TWriter; v:TBrush); +function ReadBrush(Reader: TReader):TBrush; +(*@\\\0000000201*) +(*@\\\0000002202*) +(*@/// implementation *) +implementation + +(*$ifdef delphi_1 *) +const + DT_END_ELLIPSIS = $8000; +(*$endif *) + +const + Col_before_Row = true; + ComboDropDownWidth = 16; + +(*@/// Some internal utility procedures for handling the lists *) +{ Clean my internal lists for the three kinds of data } + +(*@/// procedure cleanlist(List:TList; size:integer); *) +procedure cleanlist(List:TList; size:integer); +var + i:longint; +begin + if list<>NIL then begin + for i:=0 to List.Count-1 do + if List.Items[i] <> NIL then + Freemem(List.Items[i],size); + end; + end; +(*@\\\0000000A07*) +(*@/// procedure cleanlist_pstring(List:TList); *) +procedure cleanlist_pstring(List:TList); +var + i:longint; +begin + if list<>NIL then begin + for i:=0 to List.Count-1 do + if List.Items[i] <> NIL then + DisposeStr(List.Items[i]); + end; + end; +(*@\\\*) +(*@/// procedure cleanlist_object(List:TList); *) +procedure cleanlist_object(List:TList); +var + i:longint; +begin + if list<>NIL then begin + for i:=0 to List.Count-1 do + TObject(List.Items[i]).Free; + end; + end; +(*@\\\*) +(*@\\\*) +(*@/// Reading and writing TFont and TBrush objects to the DFM *) +{ I HATE Borland - here a simple Writer.WriteProperties() would do, but these } +{ idiots have made this method private and only the trivial ones are public. } +{ They invent such powerfull mechanisms to access properties at design time } +{ and then they destroy any way to use these for advanced components :-( } +{ So I have to write every property and not only those that are changed } +{ from the default, and I have to do the assumption that they won't change } +{ the TFontStyles and TFontPitch types as that would run this into great } +{ problems. And of course what to do with a beast like a TButton instead of } +{ a TFont - then the mechanism below won't be enough. } +{ So anyone knowing a better way to do it is greatly welcome! } + +(*@/// procedure WriteFont(Writer: TWriter; v:TFont); *) +{ I HATE Borland - here a simple Writer.WriteProperties() would do, but these } +{ idiots have made this method private and only the trivial ones are public. } +{ They invent such powerfull mechanisms to access properties at design time } +{ and then they destroy any way to use these for advanced components :-( } +{ So I have to write every property and not only those that are changed } +{ from the default, and I have to do the assumption that they won't change } +{ the TFontStyles and TFontPitch types as that would run this into great } +{ problems. And of course what to do with a beast like a TButton instead of } +{ a TFont - then the mechanism below won't be enough. } +{ So anyone knowing a better way to do it is greatly welcome! } + +procedure WriteFont(Writer: TWriter; v:TFont); +var + t: TFontStyles; +begin + Writer.WriteInteger(v.Color); + Writer.WriteInteger(v.height); + Writer.WriteString(v.name); +{ WriteEnum is missing, have to write as an integer } + Writer.WriteInteger(cardinal(v.Pitch)); +{ The WriteSet is also missing, again only savable as an integer } + t:=v.Style; +{ and why can't I cast a set to an integer directly ? } + Writer.WriteInteger(cardinal(pointer(@t)^)); + end; +(*@\\\0000000C0B*) +(*@/// function ReadFont(Reader: TReader):TFont; *) +function ReadFont(Reader: TReader):TFont; +var + t: integer; +begin +{ The same work-around as in WriteFont } + result:=NIL; + try + result:=TMyFont.Create; + result.Color:=Reader.ReadInteger; + result.height:=Reader.ReadInteger; + result.name:=Reader.ReadString; + result.pitch:=TFontPitch(Reader.ReadInteger); + t:=reader.readinteger; + result.style:=TFontStyles(pointer(@t)^); + except + result.free; + RAISE; + end; + end; +(*@\\\*) +(*@/// procedure WriteBrush(Writer: TWriter; v:TBrush); *) +{ The same comment as in WriteFont applies here } + +procedure WriteBrush(Writer: TWriter; v:TBrush); +begin + Writer.WriteInteger(v.Color); +{ WriteEnum is missing, have to write as an integer } + Writer.WriteInteger(cardinal(v.Style)); + end; +(*@\\\*) +(*@/// function ReadBrush(Reader: TReader):TBrush; *) +function ReadBrush(Reader: TReader):TBrush; +begin + result:=NIL; + try + result:=TMyBrush.Create; + result.Color:=Reader.ReadInteger; + result.style:=TBrushStyle(Reader.ReadInteger); + except + result.free; + RAISE; + end; + end; +(*@\\\0000000B09*) +(*@\\\*) + +(*@/// TCellProperties = class(TObject) *) +const + prop_end = 0; + prop_align = 1; + prop_wrap = 2; + prop_edit = 3; + prop_brush = 4; + prop_selbrush = 5; + prop_font = 6; + prop_selfont = 7; + +(*@/// procedure copy_font(var tgt: TFont; src: TFont); *) +procedure copy_font(var tgt: TFont; src: TFont); +begin + if src=NIL then begin + tgt.free; + tgt:=NIL; + end + else begin + if tgt=NIL then + tgt:=TMyFont.Create; + tgt.assign(src); + end; + end; +(*@\\\0000000301*) +(*@/// procedure copy_brush(var tgt: TBrush; src: TBrush); *) +procedure copy_brush(var tgt: TBrush; src: TBrush); +begin + if src=NIL then begin + tgt.free; + tgt:=NIL; + end + else begin + if tgt=NIL then + tgt:=TMyBrush.create; + tgt.assign(src); + end; + end; +(*@\\\0000000120*) + +{ TCellProperties } +(*@/// constructor TCellProperties.Create(Grid:TStringAlignGrid); *) +constructor TCellProperties.Create(Grid:TStringAlignGrid); +begin + inherited create; + align:=alDefault; + wordwrap:=ww_default; + f_grid:=grid; + end; +(*@\\\0000000123*) +(*@/// destructor TCellProperties.destroy; *) +destructor TCellProperties.destroy; +begin + brush.free; + selBrush.free; + font.free; + selfont.free; + inherited destroy; + end; +(*@\\\000000060F*) +(*@/// procedure TCellProperties.assign(value:TCellProperties); *) +procedure TCellProperties.assign(value:TCellProperties); +begin + if value=NIL then begin + align:=aldefault; + wordwrap:=ww_default; + editable:=0; + brush:=NIL; + selbrush:=NIL; + font:=NIL; + selfont:=NIL; + end + else begin + align:=value.align; + wordwrap:=value.wordwrap; +{ copy_brush(f_brush,value.brush); } +{ copy_brush(f_selbrush,value.selbrush); } +{ copy_font(f_font,value.font); } +{ copy_font(f_selfont,value.selfont); } + Brush:=value.brush; + SelBrush:=value.selbrush; + font:=value.font; + Selfont:=value.selfont; + editable:=value.editable; + end; + end; +(*@\\\0000001601*) +(*@/// procedure TCellProperties.SetFont(value: TFont); *) +procedure TCellProperties.SetFont(value: TFont); +begin + copy_font(f_font,value); + if f_font<>NIL then begin + f_font.OnChange:=f_grid.FontChanged; + if value is TMyFont then + TMyFont(f_font).HasChanged:=TMyFont(value).HasChanged + else + TMyFont(f_font).HasChanged:=true; + end; + end; +(*@\\\0000000927*) +(*@/// procedure TCellProperties.SetSelFont(value: TFont); *) +procedure TCellProperties.SetSelFont(value: TFont); +begin + copy_font(f_selfont,value); + if f_selfont<>NIL then begin + f_selfont.OnChange:=f_grid.FontChanged; + if value is TMyFont then + TMyFont(f_selfont).HasChanged:=TMyFont(value).HasChanged + else + TMyFont(f_selfont).HasChanged:=true; + end; + end; +(*@\\\0000000901*) +(*@/// procedure TCellProperties.SetBrush(value: TBrush); *) +procedure TCellProperties.SetBrush(value: TBrush); +begin + copy_brush(f_brush,value); + if f_brush<>NIL then begin + f_brush.OnChange:=f_grid.BrushChanged; + if value is TMyBrush then + TMyBrush(f_Brush).HasChanged:=TMyBrush(value).HasChanged + else + TMyBrush(f_Brush).HasChanged:=true; + end; + end; +(*@\\\0000000929*) +(*@/// procedure TCellProperties.SetSelBrush(value: TBrush); *) +procedure TCellProperties.SetSelBrush(value: TBrush); +begin + copy_brush(f_selbrush,value); + if f_selbrush<>NIL then begin + f_selbrush.OnChange:=f_grid.BrushChanged; + if value is TMyBrush then + TMyBrush(f_selBrush).HasChanged:=TMyBrush(value).HasChanged + else + TMyBrush(f_selBrush).HasChanged:=true; + end; + end; +(*@\\\000000092C*) +(*@/// function TCellProperties.isempty: boolean; *) +function TCellProperties.isempty: boolean; +begin + result:=(align=aldefault) and (wordwrap=ww_default) and + (font=NIL) and (selfont=NIL) and + (brush=NIL) and (selbrush=NIL) and + (editable=0); + end; +(*@\\\0000000601*) +(*@/// function TCellProperties.clone:TCellProperties; *) +function TCellProperties.clone:TCellProperties; +begin + result:=TCellProperties.Create(self.f_grid); + result.assign(self); + end; +(*@\\\0000000301*) + +(*@/// procedure TCellProperties.WriteToWriter(writer:TWriter); *) +procedure TCellProperties.WriteToWriter(writer:TWriter); +begin + (*@/// if self.align<>aldefault then *) + if self.align<>aldefault then begin + writer.writeinteger(prop_align); + writer.writeinteger(byte(self.align)); + end; + (*@\\\*) + (*@/// if self.wordwrap<>ww_default then *) + if self.wordwrap<>ww_default then begin + writer.writeinteger(prop_wrap); + writer.writeinteger(byte(self.wordwrap)); + end; + (*@\\\*) + (*@/// if self.editable<>0 then *) + if self.editable<>0 then begin + writer.writeinteger(prop_edit); + writer.writeinteger(self.editable); + end; + (*@\\\*) + (*@/// if self.brush<>NIL then *) + if self.brush<>NIL then begin + writer.writeinteger(prop_brush); + WriteBrush(writer,self.brush); + end; + (*@\\\*) + (*@/// if self.selbrush<>NIL then *) + if self.selbrush<>NIL then begin + writer.writeinteger(prop_selbrush); + WriteBrush(writer,self.selbrush); + end; + (*@\\\*) + (*@/// if self.Font<>NIL then *) + if self.Font<>NIL then begin + writer.writeinteger(prop_Font); + WriteFont(writer,self.Font); + end; + (*@\\\*) + (*@/// if self.selFont<>NIL then *) + if self.selFont<>NIL then begin + writer.writeinteger(prop_selFont); + WriteFont(writer,self.selFont); + end; + (*@\\\*) + writer.writeinteger(prop_end); + end; +(*@\\\0000000B01*) +(*@/// procedure TCellProperties.ReadFromReader(Reader:TReader; grid:TStringAlignGrid); *) +procedure TCellProperties.ReadFromReader(Reader:TReader; grid:TStringAlignGrid); +var + k: integer; +begin + repeat + k:=Reader.ReadInteger; + ReadSingleProperty(k,reader,grid); + until k=prop_end; + end; +(*@\\\000000030E*) +(*@/// procedure TCellProperties.ReadSingleProperty(Proptype:integer; Reader:TReader; grid:TStringAlignGrid); *) +procedure TCellProperties.ReadSingleProperty(Proptype:integer; Reader:TReader; grid:TStringAlignGrid); +var + v: TBrush; + f: TFont; +begin + case proptype of + prop_end : ; + prop_align : self.align:=TMyAlign(reader.readinteger); + prop_wrap : self.wordwrap:=T_Wordwrap(reader.readinteger); + prop_edit : self.editable:=reader.readinteger; + (*@/// prop_brush : self.brush:=ReadBrush(Reader); *) + prop_brush : begin + v:=NIL; + try + v:=ReadBrush(Reader); + self.brush:=v; + self.brush.OnChange:=grid.brushchanged; + finally + v.free; + end; + end; + (*@\\\0000000621*) + (*@/// prop_selbrush: self.selbrush:=ReadBrush(Reader); *) + prop_selbrush : begin + v:=NIL; + try + v:=ReadBrush(Reader); + self.selbrush:=v; + self.selbrush.OnChange:=grid.brushchanged; + finally + v.free; + end; + end; + (*@\\\0000000624*) + (*@/// prop_font : self.font:=ReadFont(Reader); *) + prop_font : begin + f:=NIL; + try + f:=ReadFont(Reader); + self.font:=f; + self.font.OnChange:=grid.fontchanged; + finally + f.free; + end; + end; + (*@\\\0000000620*) + (*@/// prop_selfont : self.selfont:=ReadFont(Reader); *) + prop_selfont : begin + f:=NIL; + try + f:=ReadFont(Reader); + self.selfont:=f; + self.selfont.OnChange:=grid.fontchanged; + finally + f.free; + end; + end; + (*@\\\0000000623*) + end; + end; +(*@\\\0000000E01*) +(*@\\\0000001501*) + +(*@/// TMyFont = class(TFont) // To remember if changed *) +{ TMyFont } +(*@/// procedure TMyFont.Changed; *) +procedure TMyFont.Changed; +begin + HasChanged:=true; + inherited changed; + end; +(*@\\\*) +(*@\\\0000000201*) +(*@/// TMyBrush = class(TBrush) // To remember if changed *) +{ TMyBrush } +(*@/// procedure TMyBrush.Changed; *) +procedure TMyBrush.Changed; +begin + HasChanged:=true; + inherited changed; + end; +(*@\\\*) +(*@\\\*) +(*@/// TNewInplaceEdit = class(TInplaceEdit) // The internal cell editor *) +{ TNewInplaceEdit } +(*@/// procedure TNewInplaceEdit.CreateParams(var Params: TCreateParams); *) +procedure TNewInplaceEdit.CreateParams(var Params: TCreateParams); +(*$ifdef delphi_ge_4 *) +const + Alignments : array[TMyAlign] of longword = (ES_RIGHT,ES_LEFT,ES_CENTER,ES_RIGHT); +(*$else *) +const + Alignments : array[TMyAlign] of Longint = (ES_RIGHT,ES_LEFT,ES_CENTER,ES_RIGHT); +(*$endif *) +begin + inherited CreateParams(Params); + Params.Style := Params.Style +{ and (not ES_MULTILINE) (* otherwise the passwordchar won't work *) } +{ (* but makes it behave erratically *) } + or Alignments[FAlignment]; + end; +(*@\\\0000000B01*) +(*@/// procedure TNewInplaceEdit.SetAlignment(Value: TMyAlign); *) +procedure TNewInplaceEdit.SetAlignment(Value: TMyAlign); +var + start,stop: integer; +{ Loc: TRect; } +begin + if FAlignment <> Value then begin + FAlignment := Value; + GetSel(start,stop); + RecreateWnd; + SetSel(start,stop); + UpdateLoc(TStringGrid(parent).CellRect(Col, Row)); + end; + end; +(*@\\\*) +(*@/// constructor TNewInplaceEdit.Create(AOwner:TComponent); *) +constructor TNewInplaceEdit.Create(AOwner:TComponent); +begin + inherited Create(AOwner); + FAlignment := alLeft; + end; +(*@\\\*) +(*@/// procedure TNewInplaceEdit.KeyPress(var Key: Char); *) +procedure TNewInplaceEdit.KeyPress(var Key: Char); +begin + if (col=-1) or (row=-1) then key:=#0; + if (key=#13) then begin + if not f_multiline then + postmessage(TStringAlignGrid(self.owner).handle,cn_edit_return,col,row) + else if f_multiline then + if not TStringAlignGrid(self.owner).CanEditModify then + Key := #0; + end; + if (key=#27) and not f_multiline then begin + self.text:=oldtext; + postmessage(TStringAlignGrid(self.owner).handle,cn_edit_cancel,col,row); + key:=#13; + end; + if key=#9 then key:=#0; + inherited KeyPress(key); + end; +(*@\\\0000001201*) +(*@/// procedure TNewInplaceEdit.KeyDown(var Key: Word; Shift: TShiftState); *) +procedure TNewInplaceEdit.KeyDown(var Key: Word; Shift: TShiftState); +begin + if f_multiline and (key in + [VK_UP, VK_DOWN, VK_PRIOR, VK_NEXT,VK_LEFT, + VK_RIGHT, VK_HOME, VK_END]) then + { ignore it } + else inherited KeyDown(Key, Shift); +end; +(*@\\\*) +(*@/// procedure TNewInplaceEdit.UpdateContents; *) +procedure TNewInplaceEdit.UpdateContents; +var + g: TStringAlignGrid; +begin +(*$ifdef delphi_1 *) + Text := ''; + EditMask := Grid.GetEditMask(Grid.Col, Grid.Row); + Text := Grid.GetEditText(Grid.Col, Grid.Row); + MaxLength := Grid.GetEditLimit; +(*$else *) + inherited UpdateContents; +(*$endif *) + g:=grid as TStringAlignGrid; + Col:=g.Col; + Row:=g.Row; + Alignment:=G.GetAlignCell(Col,Row); + Font:=G.GetFontCellComplete(Col,Row); + Color:=G.ColorCell[Col,Row]; + MultiLine:=G.EditMultiline; + (*$ifdef delphi_ge_3 *) + ImeMode:=g.ImeMode; + ImeName:=g.ImeName; + (*$endif *) + end; +(*@\\\000000140D*) +(*$ifdef delphi_1 *) +(*@/// function TNewInplaceEdit.GetGrid:TCustomGrid; *) +function TNewInplaceEdit.GetGrid:TCustomGrid; +begin + result:=parent as TCustomGrid; + end; +(*@\\\0000000119*) +(*$endif *) +(*@/// procedure TNewInplaceEdit.WMWindowPosChanged(var Message: TMessage); *) +procedure TNewInplaceEdit.WMWindowPosChanged(var Message: TMessage); +begin + inherited; + end; +(*@\\\*) +(*@/// procedure TNewInplaceEdit.EMSetSel(var Message: TMessage); *) +procedure TNewInplaceEdit.EMSetSel(var Message: TMessage); +begin + inherited; + end; +(*@\\\*) +(*@\\\000C00071B00072900071B*) +(*@/// TStringAlignGrid = class(TStringGrid) // The grid itself *) +{ TStringAlignGrid } +(*@/// The component action: create, initialize, destroy the internal data *) +{ The component action: create, initialize, destroy the internal data } +(*@/// constructor TStringAlignGrid.Create(AOwner: TComponent); *) +constructor TStringAlignGrid.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + FSaveHint:=false; + FSaveCells:=false; + + f_reshow_edit:=false; + + FEditable:=true; + + Initialize; + end; +(*@\\\0000000501*) +(*@/// destructor TStringAlignGrid.Destroy; *) +destructor TStringAlignGrid.Destroy; +var + i:longint; +begin + (*@/// FPropCol.Free; *) + if FPropCol<>NIL then + cleanlist_object(FPropCol); + FPropCol.Free; + FPropCol:=NIL; + (*@\\\*) + (*@/// FPropRow.Free; *) + if FPropRow<>NIL then + cleanlist_object(FPropRow); + FPropRow.Free; + FPropRow:=NIL; + (*@\\\*) + (*@/// FFPropCol.Free; *) + if FFPropCol<>NIL then + cleanlist_object(FFPropCol); + FFPropCol.Free; + FFPropCol:=NIL; + (*@\\\*) + (*@/// FFPropRow.Free; *) + if FFPropRow<>NIL then + cleanlist_object(FFPropRow); + FFPropRow.Free; + FFPropRow:=NIL; + (*@\\\*) + (*@/// FPropCell.Free; *) + if FPropCell<>NIL then + for i:=FPropCell.Count-1 downto 0 do begin + cleanlist_object(TList(FPropCell.Items[i])); + TList(FPropCell.Items[i]).Free; + end; + FPropCell.Free; + FPropCell:=NIL; + (*@\\\*) + + (*@/// FHintCell.Free; *) + if FHintCell<>NIL then + for i:=FHintCell.Count-1 downto 0 do begin + cleanlist_pstring(TList(FHintCell.Items[i])); + TList(FHintCell.Items[i]).Free; + end; + FHintCell.Free; + FHintCell:=NIL; + (*@\\\0000000401*) + (*@/// FCell.Free; *) + if FCell<>NIL then + for i:=FCell.Count-1 downto 0 do begin + cleanlist_pstring(TList(FCell.Items[i])); + TList(FCell.Items[i]).Free; + end; + FCell.Free; + FCell:=NIL; + (*@\\\0000000401*) + FFixedBrush.free; + FFixedFont.free; +(*$ifndef delphi_ge_3 *) + RemoveShowHintProc(ShowHintCell); +(*$endif *) + inherited Destroy; + end; +(*@\\\0000000F01*) +(*@/// procedure TStringAlignGrid.Initialize; *) +procedure TStringAlignGrid.Initialize; +begin + FHintCell:=TList.Create; + FCell:=TList.Create; + + FPropCell:=TList.Create; + FPropCol:=TList.Create; + FFPropCol:=TList.Create; + FPropRow:=TList.Create; + FFPropRow:=TList.Create; + + CellPropertiesClass:=TCellProperties; + FAlign:=alLeft; + F_Wordwrap:=ww_none; + FShowCellHints:=true; + FHintCellLast:=point(-1,-1); + f_SelCellColor:=clActiveCaption; + f_SelFontColor:=clWhite; + f_fixedcols:=0; + f_fixedrows:=0; + f_nextcell:=false; + FAlwaysEdit:=false; + f_nextcell_edit:=nc_rightdown; + f_nextcell_tab:=nc_rightdown; + f_drawselect:=true; + f_lastcell_edit:=lc_newcolrow; + f_lastcell_tab:=lc_first; + FFixedBrush:=TMyBrush.Create; + FFixedBrush.Color:=FixedColor; + FFixedBrush.OnChange:=BrushChanged; + f_compare_col:=self.CompareColString; + f_compare_row:=self.CompareRowString; + f_selectall:=true; + f_altcolcolor:=clWindow; + f_altrowcolor:=clWindow; + FFixedFont:=TMyFont.Create; + FFixedFont.OnChange:=FontChanged; + AllowCutnPaste:=true; + fSortMethod:=self.DoSortQuick; +(*$ifndef delphi_ge_3 *) + AddShowHintProc(ShowHintCell); +(*$endif *) + end; +(*@\\\*) +(*@\\\0000000401*) + +(*@/// Internal routines for saving any data pointer (or a longint) in a List *) +{ Internal routines for saving any data pointer (or a longint) in a List } +(*@/// function GetItemCol(ACol: longint; List:TList):Pointer; *) +function GetItemCol(ACol: longint; List:TList):Pointer; +begin + if (ACol+1 > List.Count) or (ACol<0) then + GetItemCol:=NIL + else + if List.Items[ACol] = NIL then + GetItemCol:=NIL + else begin + GetItemCol:=List.Items[ACol]; + end; + end; +(*@\\\*) +(*@/// function SetItemCol(ACol: longint; List:TList; value:Pointer):pointer; *) +function SetItemCol(ACol: longint; List:TList; value:Pointer):pointer; +var + i:longint; + t:pointer; +begin + t:=NIL; + if ACol+1 > List.Count then + for i:=List.Count to ACol do + List.Add(NIL); + if List.Items[ACol] <> NIL then begin + t:=List.Items[ACol]; + List.Items[ACol]:=value; + end + else + List.Items[ACol]:=value; + SetItemCol:=t; + end; +(*@\\\*) +(*@/// procedure ExchangeItemCol(ACol1,ACol2: longint; List:TList); *) +procedure ExchangeItemCol(ACol1,ACol2: longint; List:TList); +var + p: pointer; +begin + p:=SetItemCol(ACol1,List,NIL); + p:=SetItemCol(ACol2,List,p); + SetItemCol(ACol1,List,p); + end; +(*@\\\*) +(*@/// procedure MoveItemCol(FromIndex, ToIndex: longint; list:TList); *) +procedure MoveItemCol(FromIndex, ToIndex: longint; list:TList); +var + p: pointer; +begin + p:=SetItemCol(FromIndex,list,NIL); + list.Delete(FromIndex); + while ToIndex>list.count do + list.add(NIL); + list.Insert(ToIndex,p); + end; +(*@\\\*) +(*@\\\0000000201*) +(*@/// Internal routines for saving any data pointer in a two-dimensional List *) +{ Internal routines for saving any data pointer in a two-dimensional List } +(*@/// function GetItemCell(ACol,ARow: longint; List:TList):Pointer; *) +function GetItemCell(ACol,ARow: longint; List:TList):Pointer; +var + sublist: TList; +begin + if (ACol+1 > List.Count) or (ACol<0) or (ARow<0) then + GetItemCell:=NIL + else + if List.Items[ACol] = NIL then + GetItemCell:=NIL + else begin + sublist:=TList(List.Items[ACol]); + if ARow+1 > sublist.Count then + GetItemCell:=NIL + else + GetItemCell:=sublist.Items[ARow] + end; + end; +(*@\\\*) +(*@/// function SetItemCell(ACol,ARow: longint; List:TList; value:Pointer):pointer; *) +function SetItemCell(ACol,ARow: longint; List:TList; value:Pointer):pointer; +(* give back the pointer to the previously stored element to let the caller dispose it *) +var + i:longint; + t:pointer; + sublist:TList; +begin + t:=NIL; + if ACol+1 > List.Count then + for i:=List.Count to ACol do + List.Add(NIL); + if List.Items[ACol] = NIL then + List.Items[ACol]:=TList.Create; + sublist:=TList(List.Items[ACol]); + if ARow+1 > sublist.Count then + for i:=sublist.Count to ARow do + sublist.Add(NIL); + if sublist.items[ARow] <> NIL then begin + t:=sublist.items[ARow]; +{ FreeMem(t,size); } + sublist.Items[ARow]:=value; + end + else + sublist.Items[ARow]:=value; + SetItemCell:=t; + end; +(*@\\\*) +(*@/// procedure ExchangeItemColRow(ARow1,ARow2:longint; list:TList); *) +procedure ExchangeItemColRow(ARow1,ARow2:longint; list:TList); +var + i:longint; + sublist:TList; +begin + for i:=List.Count-1 downto 0 do begin + sublist:=TList(List.Items[i]); + if sublist=NIL then begin + sublist:=TList.Create; + List.Items[i]:=sublist; + end; + ExchangeItemCol(ARow1,ARow2,sublist); + end; + end; +(*@\\\*) +(*@/// procedure MoveItemColRow(FromRow,ToRow:longint; list:TList); *) +procedure MoveItemColRow(FromRow,ToRow:longint; list:TList); +var + i:longint; + sublist:TList; + p: pointer; +begin + for i:=list.Count-1 downto 0 do begin + sublist:=TList(list.Items[i]); + if sublist=NIL then begin + sublist:=TList.Create; + list.Items[i]:=sublist; + end; + p:=SetItemCol(FromRow,sublist,NIL); + sublist.Delete(FromRow); + while ToRow>sublist.count do + sublist.add(NIL); + sublist.Insert(ToRow,p); + end; + end; +(*@\\\*) +(*@\\\0000000301*) + +(*@/// Property read and write and reset for the Objects themselves *) +(*@/// function TStringAlignGrid.GetObjectCol(ACol: longint):TCellProperties; *) +function TStringAlignGrid.GetObjectCol(ACol: longint):TCellProperties; +begin + result:=GetItemCol(ACol, FPropCol); + if result=NIL then begin + result:=CellPropertiesClass.Create(self); + SetItemCol(ACol, FPropCol, result); + end; + end; +(*@\\\0000000601*) +(*@/// procedure TStringAlignGrid.SetObjectCol(ACol: longint; const Value: TCellProperties); *) +procedure TStringAlignGrid.SetObjectCol(ACol: longint; const Value: TCellProperties); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FPropCol); + if v=NIL then begin + v:=CellPropertiesClass.Create(self); + v.assign(value); + SetItemCol(ACol, FPropCol, v); + end; + Invalidate; + end; +(*@\\\0000000501*) +(*@/// function TStringAlignGrid.GetObjectRow(ARow: longint):TCellProperties; *) +function TStringAlignGrid.GetObjectRow(ARow: longint):TCellProperties; +begin + result:=GetItemCol(ARow, FPropRow); + if result=NIL then begin + result:=CellPropertiesClass.Create(self); + SetItemCol(ARow, FPropRow, result); + end; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetObjectRow(ARow: longint; const Value: TCellProperties); *) +procedure TStringAlignGrid.SetObjectRow(ARow: longint; const Value: TCellProperties); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FPropRow); + if v=NIL then begin + v:=CellPropertiesClass.Create(self); + v.assign(value); + SetItemCol(ARow, FPropRow, v); + end; + Invalidate; + end; +(*@\\\0000000501*) + +(*@/// function TStringAlignGrid.GetObjectFixedCol(ACol: longint):TCellProperties; *) +function TStringAlignGrid.GetObjectFixedCol(ACol: longint):TCellProperties; +begin + result:=GetItemCol(ACol, FFPropCol); + if result=NIL then begin + result:=CellPropertiesClass.Create(self); + SetItemCol(ACol, FFPropCol, result); + end; + end; +(*@\\\0000000617*) +(*@/// procedure TStringAlignGrid.SetObjectFixedCol(ACol: longint; const Value: TCellProperties); *) +procedure TStringAlignGrid.SetObjectFixedCol(ACol: longint; const Value: TCellProperties); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FFPropCol); + if v=NIL then begin + v:=CellPropertiesClass.Create(self); + v.assign(value); + SetItemCol(ACol, FFPropCol, v); + end; + Invalidate; + end; +(*@\\\0000000501*) +(*@/// function TStringAlignGrid.GetObjectFixedRow(ARow: longint):TCellProperties; *) +function TStringAlignGrid.GetObjectFixedRow(ARow: longint):TCellProperties; +begin + result:=GetItemCol(ARow, FFPropRow); + if result=NIL then begin + result:=CellPropertiesClass.Create(self); + SetItemCol(ARow, FFPropRow, result); + end; + end; +(*@\\\0000000401*) +(*@/// procedure TStringAlignGrid.SetObjectFixedRow(ARow: longint; const Value: TCellProperties); *) +procedure TStringAlignGrid.SetObjectFixedRow(ARow: longint; const Value: TCellProperties); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FFPropRow); + if v=NIL then begin + v:=CellPropertiesClass.Create(self); + v.assign(value); + SetItemCol(ARow, FFPropRow, v); + end; + Invalidate; + end; +(*@\\\0000000501*) + +(*@/// function TStringAlignGrid.GetObjectCell(ACol,ARow: longint):TCellProperties; *) +function TStringAlignGrid.GetObjectCell(ACol,ARow: longint):TCellProperties; +begin + result:=GetItemCell(ACol,ARow,FPropCell); + if result=NIL then begin + result:=CellPropertiesClass.Create(self); + SetItemCell(ACol, ARow, FPropCell, result); + end; + end; +(*@\\\0000000601*) +(*@/// procedure TStringAlignGrid.SetObjectCell(ACol,ARow: longint; const Value: TCellProperties); *) +procedure TStringAlignGrid.SetObjectCell(ACol,ARow: longint; const Value: TCellProperties); +var + v:TCellProperties; +begin + v:=GetItemCell(ACol,ARow,FPropCell); + if v=NIL then begin + v:=CellPropertiesClass.Create(self); + v.assign(value); + SetItemCell(ACol,ARow, FPropCell, v); + end; + Invalidate; + end; +(*@\\\0000000501*) +(*@\\\*) + +(*@/// Property read and write and reset for the Alignments *) +(*@/// Property read and write for Alignment *) +(*@/// procedure TStringAlignGrid.SetAlign(const Value: TMyAlign); *) +procedure TStringAlignGrid.SetAlign(const Value: TMyAlign); +begin + if FAlign<>value then begin + FAlign:=Value; + Invalidate; + end; + end; +(*@\\\0000000501*) +(*@\\\*) +(*@/// Property read and write for AlignCell *) +(*@/// function TStringAlignGrid.GetAlignCell(ACol,ARow:longint):TMyAlign; *) +function TStringAlignGrid.GetAlignCell(ACol,ARow:longint):TMyAlign; +var + v:TCellProperties; + fixed: boolean; +begin + v:=GetItemCell(ACol,ARow,FPropCell); + fixed:=is_fixed(ACol,ARow); + if (v=NIL) or (v.align=alDefault) then begin + if fixed then begin + if Col_before_Row then + v:=GetItemCol(ACol,FFPropCol) + else + v:=GetItemCol(ACol,FFPropRow) + end + else begin + if Col_before_Row then + v:=GetItemCol(ACol,FPropCol) + else + v:=GetItemCol(ACol,FPropRow) + end; + if (v=NIL) or (v.align=alDefault) then begin + if fixed then begin + if Col_before_Row then + v:=GetItemCol(ARow,FFPropRow) + else + v:=GetItemCol(ARow,FFPropCol) + end + else begin + if Col_before_Row then + v:=GetItemCol(ARow,FPropRow) + else + v:=GetItemCol(ARow,FPropCol) + end; + if (v=NIL) or (v.align=alDefault) then begin + if Alignment=alDefault then + result:=alLeft + else + result:=Alignment; + end + else + result:=v.align; + end + else + result:=v.align; + end + else + result:=v.align; + end; +(*@\\\0000001001*) +(*@/// procedure TStringAlignGrid.SetAlignCell(ACol,ARow:longint; const Value: TMyAlign); *) +procedure TStringAlignGrid.SetAlignCell(ACol,ARow:longint; const Value: TMyAlign); +begin + ObjectCell[ACol,ARow].align:=value; + Invalidate; + end; +(*@\\\0000000301*) +(*@\\\0000000201*) +(*@/// Property read and write for AlignCol and FixedAlignCol *) +(*@/// function TStringAlignGrid.GetAlignCol(ACol:longint):TMyAlign; *) +function TStringAlignGrid.GetAlignCol(ACol:longint):TMyAlign; +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FPropCol); + if v=NIL then + result:=Alignment + else + result:=v.align; + end; +(*@\\\0000000501*) +(*@/// function TStringAlignGrid.GetFixAlignCol(ACol:longint):TMyAlign; *) +function TStringAlignGrid.GetFixAlignCol(ACol:longint):TMyAlign; +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FFPropCol); + if v=NIL then + result:=Alignment + else + result:=v.align; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.SetAlignCol(ACol:longint; const Value: TMyAlign); *) +procedure TStringAlignGrid.SetAlignCol(ACol:longint; const Value: TMyAlign); +begin + ObjectCol[ACol].align:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetFixAlignCol(ACol:longint; const Value: TMyAlign); *) +procedure TStringAlignGrid.SetFixAlignCol(ACol:longint; const Value: TMyAlign); +begin + ObjectFixedCol[ACol].align:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@\\\0000000401*) +(*@/// Property read and write for AlignRow and FixedAlignRow *) +(*@/// function TStringAlignGrid.GetAlignRow(ARow:longint):TMyAlign; *) +function TStringAlignGrid.GetAlignRow(ARow:longint):TMyAlign; +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FPropRow); + if v=NIL then + result:=Alignment + else + result:=v.align; + end; +(*@\\\0000000515*) +(*@/// function TStringAlignGrid.GetFixAlignRow(ARow:longint):TMyAlign; *) +function TStringAlignGrid.GetFixAlignRow(ARow:longint):TMyAlign; +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FFPropRow); + if v=NIL then + result:=Alignment + else + result:=v.align; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetAlignRow(ARow:longint; const Value: TMyAlign); *) +procedure TStringAlignGrid.SetAlignRow(ARow:longint; const Value: TMyAlign); +begin + ObjectRow[ARow].align:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetFixAlignRow(ARow:longint; const Value: TMyAlign); *) +procedure TStringAlignGrid.SetFixAlignRow(ARow:longint; const Value: TMyAlign); +begin + ObjectFixedRow[ARow].align:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@\\\0000000401*) + +(*@/// Reset alignment and use the one defined a level above *) +(*@/// procedure TStringAlignGrid.ResetAlignCell(ACol,ARow:longint); *) +procedure TStringAlignGrid.ResetAlignCell(ACol,ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCell(ACol,ARow, FPropCell); + if v<>NIL then + v.align:=alDefault; + Invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetAlignCol(ACol:longint); *) +procedure TStringAlignGrid.ResetAlignCol(ACol:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol,FPropCol); + if v<>NIL then + v.align:=alDefault; + Invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetAlignFixedCol(ACol:longint); *) +procedure TStringAlignGrid.ResetAlignFixedCol(ACol:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol,FFPropCol); + if v<>NIL then + v.align:=alDefault; + Invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetAlignRow(ARow:longint); *) +procedure TStringAlignGrid.ResetAlignRow(ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow,FPropRow); + if v<>NIL then + v.align:=alDefault; + Invalidate; + end; +(*@\\\0000000515*) +(*@/// procedure TStringAlignGrid.ResetAlignFixedRow(ARow:longint); *) +procedure TStringAlignGrid.ResetAlignFixedRow(ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow,FFPropRow); + if v<>NIL then + v.align:=alDefault; + Invalidate; + end; +(*@\\\0000000510*) +(*@/// procedure TStringAlignGrid.ResetAlignment; *) +procedure TStringAlignGrid.ResetAlignment; +begin + FAlign:=alLeft; + Invalidate; + end; +(*@\\\*) + +(*@/// procedure TStringAlignGrid.ResetAlignCellAll; *) +procedure TStringAlignGrid.ResetAlignCellAll; +var + i,j: longint; +begin + for i:=FPropCell.Count-1 downto 0 do begin + if FPropCell.Items[i]<>NIL then + for j:=TList(FPropCell.Items[i]).Count-1 downto 0 do + ResetAlignCell(i,j); + end; + invalidate; + end; +(*@\\\0000000A0D*) +(*@/// procedure TStringAlignGrid.ResetAlignColAll; *) +procedure TStringAlignGrid.ResetAlignColAll; +var + i: longint; +begin + for i:=FPropCol.Count-1 downto 0 do begin + ResetAlignCol(i); + end; + invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetAlignRowAll; *) +procedure TStringAlignGrid.ResetAlignRowAll; +var + i: longint; +begin + for i:=FPropRow.Count-1 downto 0 do begin + ResetAlignRow(i); + end; + invalidate; + end; +(*@\\\*) +(*@\\\0000000801*) +(*@\\\0000000201*) +(*@/// Property read and write and reset for the Wordwraps *) +(*@/// Property read and write for Wordwrap *) +(*@/// procedure TStringAlignGrid.SetWordWrap(value: T_Wordwrap); *) +procedure TStringAlignGrid.SetWordWrap(value: T_Wordwrap); +begin + if f_wordwrap<>value then begin + f_wordwrap:=value; + Invalidate; + end; + end; +(*@\\\*) +(*@\\\*) +(*@/// Property read and write for WordwrapCell *) +(*@/// function TStringAlignGrid.GetWordwrapCell(ACol,ARow:longint):T_Wordwrap; *) +function TStringAlignGrid.GetWordwrapCell(ACol,ARow:longint):T_Wordwrap; +var + v:TCellProperties; + fixed: boolean; +begin + v:=GetItemCell(ACol,ARow,FPropCell); + fixed:=is_fixed(ACol,ARow); + if (v=NIL) or (v.wordwrap=ww_default) then begin + if fixed then begin + if Col_before_Row then + v:=GetItemCol(ACol,FFPropCol) + else + v:=GetItemCol(ACol,FFPropRow) + end + else begin + if Col_before_Row then + v:=GetItemCol(ACol,FPropCol) + else + v:=GetItemCol(ACol,FPropRow) + end; + if (v=NIL) or (v.wordwrap=ww_default) then begin + if fixed then begin + if Col_before_Row then + v:=GetItemCol(ARow,FFPropRow) + else + v:=GetItemCol(ARow,FFPropCol) + end + else begin + if Col_before_Row then + v:=GetItemCol(ARow,FPropRow) + else + v:=GetItemCol(ARow,FPropCol) + end; + if (v=NIL) or (v.wordwrap=ww_default) then begin + if wordwrap=ww_default then + result:=ww_none + else + result:=wordwrap; + end + else + result:=v.wordwrap; + end + else + result:=v.wordwrap; + end + else + result:=v.wordwrap; + end; +(*@\\\000000210D*) +(*@/// procedure TStringAlignGrid.SetWordwrapCell(ACol,ARow:longint; const Value: T_Wordwrap); *) +procedure TStringAlignGrid.SetWordwrapCell(ACol,ARow:longint; const Value: T_wordwrap); +begin + ObjectCell[ACol,ARow].wordwrap:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@\\\0000000201*) +(*@/// Property read and write for WordwrapCol and FixedWordwrapCol *) +(*@/// function TStringAlignGrid.GetwordwrapCol(ACol:longint):t_wordwrap; *) +function TStringAlignGrid.GetwordwrapCol(ACol:longint):t_wordwrap; +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FPropCol); + if v=NIL then + result:=wordwrap + else + result:=v.wordwrap; + end; +(*@\\\0000000401*) +(*@/// function TStringAlignGrid.GetFixwordwrapCol(ACol:longint):t_wordwrap; *) +function TStringAlignGrid.GetFixwordwrapCol(ACol:longint):t_wordwrap; +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FFPropCol); + if v=NIL then + result:=wordwrap + else + result:=v.wordwrap; + end; +(*@\\\0000000401*) +(*@/// procedure TStringAlignGrid.SetwordwrapCol(ACol:longint; const Value: t_wordwrap); *) +procedure TStringAlignGrid.SetwordwrapCol(ACol:longint; const Value: t_wordwrap); +begin + ObjectCol[ACol].wordwrap:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetFixwordwrapCol(ACol:longint; const Value: t_wordwrap); *) +procedure TStringAlignGrid.SetFixwordwrapCol(ACol:longint; const Value: t_wordwrap); +begin + ObjectFixedCol[ACol].wordwrap:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@\\\0000000401*) +(*@/// Property read and write for WordwrapRow and FixedWordwrapRow *) +(*@/// function TStringAlignGrid.GetwordwrapRow(ARow:longint):t_wordwrap; *) +function TStringAlignGrid.GetwordwrapRow(ARow:longint):t_wordwrap; +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FPropRow); + if v=NIL then + result:=wordwrap + else + result:=v.wordwrap; + end; +(*@\\\0000000515*) +(*@/// function TStringAlignGrid.GetFixwordwrapRow(ARow:longint):t_wordwrap; *) +function TStringAlignGrid.GetFixwordwrapRow(ARow:longint):t_wordwrap; +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FFPropRow); + if v=NIL then + result:=wordwrap + else + result:=v.wordwrap; + end; +(*@\\\0000000515*) +(*@/// procedure TStringAlignGrid.SetwordwrapRow(ARow:longint; const Value: t_wordwrap); *) +procedure TStringAlignGrid.SetwordwrapRow(ARow:longint; const Value: t_wordwrap); +begin + ObjectRow[ARow].wordwrap:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetFixwordwrapRow(ARow:longint; const Value: t_wordwrap); *) +procedure TStringAlignGrid.SetFixwordwrapRow(ARow:longint; const Value: t_wordwrap); +begin + ObjectFixedRow[ARow].wordwrap:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@\\\0000000401*) + +(*@/// Reset Wordwrap and use the one defined a level above *) +(*@/// procedure TStringAlignGrid.ResetwordwrapCell(ACol,ARow:longint); *) +procedure TStringAlignGrid.ResetwordwrapCell(ACol,ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCell(ACol,ARow, FPropCell); + if v<>NIL then + v.wordwrap:=ww_default; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetwordwrapCol(ACol:longint); *) +procedure TStringAlignGrid.ResetwordwrapCol(ACol:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol,FPropCol); + if v<>NIL then + v.wordwrap:=ww_default; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetwordwrapFixedCol(ACol:longint); *) +procedure TStringAlignGrid.ResetwordwrapFixedCol(ACol:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol,FFPropCol); + if v<>NIL then + v.wordwrap:=ww_default; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetwordwrapRow(ARow:longint); *) +procedure TStringAlignGrid.ResetwordwrapRow(ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow,FPropRow); + if v<>NIL then + v.wordwrap:=ww_default; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetwordwrapFixedRow(ARow:longint); *) +procedure TStringAlignGrid.ResetwordwrapFixedRow(ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow,FFPropRow); + if v<>NIL then + v.wordwrap:=ww_default; + Invalidate; + end; +(*@\\\*) + +(*@/// procedure TStringAlignGrid.ResetwordwrapCellAll; *) +procedure TStringAlignGrid.ResetwordwrapCellAll; +var + i,j: longint; +begin + for i:=FPropCell.Count-1 downto 0 do begin + if FPropCell.Items[i]<>NIL then + for j:=TList(FPropCell.Items[i]).Count-1 downto 0 do + ResetwordwrapCell(i,j); + end; + invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetwordwrapColAll; *) +procedure TStringAlignGrid.ResetwordwrapColAll; +var + i: longint; +begin + for i:=FPropCol.Count-1 downto 0 do begin + ResetwordwrapCol(i); + end; + invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetwordwrapRowAll; *) +procedure TStringAlignGrid.ResetwordwrapRowAll; +var + i: longint; +begin + for i:=FPropRow.Count-1 downto 0 do begin + ResetwordwrapRow(i); + end; + invalidate; + end; +(*@\\\*) +(*@\\\*) +(*@\\\0000000401*) +(*@/// Property read and write and reset for the edit-enabled *) +(*@/// Property read and write for EditCell *) +(*@/// function TStringAlignGrid.GetEditCell(ACol,ARow:longint):boolean; *) +function TStringAlignGrid.GetEditCell(ACol,ARow:longint):boolean; +var + v:TCellProperties; + fixed: boolean; +begin + v:=GetItemCell(ACol,ARow,FPropCell); + fixed:=is_fixed(ACol,ARow); + if (v=NIL) or (v.editable=0) then begin + if fixed then begin + if Col_before_Row then + v:=GetItemCol(ACol,FFPropCol) + else + v:=GetItemCol(ACol,FFPropRow) + end + else begin + if Col_before_Row then + v:=GetItemCol(ACol,FPropCol) + else + v:=GetItemCol(ACol,FPropRow) + end; + if (v=NIL) or (v.editable=0) then begin + if fixed then begin + if Col_before_Row then + v:=GetItemCol(ARow,FFPropRow) + else + v:=GetItemCol(ARow,FFPropCol) + end + else begin + if Col_before_Row then + v:=GetItemCol(ARow,FPropRow) + else + v:=GetItemCol(ARow,FPropCol) + end; + if (v=NIL) or (v.editable=0) then + result:=editable + else + result:=v.editable=2; + end + else + result:=v.editable=2; + end + else + result:=v.editable=2; + end; +(*@\\\0000001D01*) +(*@/// procedure TStringAlignGrid.SetEditCell(ACol,ARow:longint; const Value: boolean); *) +procedure TStringAlignGrid.SetEditCell(ACol,ARow:longint; const Value: boolean); +begin + ObjectCell[ACol,ARow].editable:=ord(value)+1; + end; +(*@\\\0000000303*) +(*@\\\0000000201*) +(*@/// Property read and write for EditCol *) +(*@/// function TStringAlignGrid.GetEditCol(ACol:longint):boolean; *) +function TStringAlignGrid.GetEditCol(ACol:longint):boolean; +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FPropCol); + if v=NIL then + result:=editable + else + result:=v.editable=2; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.SetEditCol(ACol:longint; const Value: boolean); *) +procedure TStringAlignGrid.SetEditCol(ACol:longint; const Value: boolean); +begin + ObjectCol[ACol].editable:=ord(value)+1; + end; +(*@\\\0000000301*) +(*@\\\0000000201*) +(*@/// Property read and write for EditRow *) +(*@/// function TStringAlignGrid.GetEditRow(ARow:longint):boolean; *) +function TStringAlignGrid.GetEditRow(ARow:longint):boolean; +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FPropRow); + if v=NIL then + result:=editable + else + result:=v.editable=2; + end; +(*@\\\0000000515*) +(*@/// procedure TStringAlignGrid.SetEditRow(ARow:longint; const Value: boolean); *) +procedure TStringAlignGrid.SetEditRow(ARow:longint; const Value: boolean); +begin + ObjectRow[ARow].editable:=ord(value)+1; + end; +(*@\\\0000000401*) +(*@\\\0000000201*) + +(*@/// Reset Edit and use the one defined a level above *) +(*@/// procedure TStringAlignGrid.ResetEditCell(ACol,ARow:longint); *) +procedure TStringAlignGrid.ResetEditCell(ACol,ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCell(ACol,ARow, FPropCell); + if v<>NIL then + v.editable:=0; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetEditCol(ACol:longint); *) +procedure TStringAlignGrid.ResetEditCol(ACol:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol,FPropCol); + if v<>NIL then + v.editable:=0; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetEditRow(ARow:longint); *) +procedure TStringAlignGrid.ResetEditRow(ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow,FPropRow); + if v<>NIL then + v.editable:=0; + Invalidate; + end; +(*@\\\*) + +(*@/// procedure TStringAlignGrid.ResetEditCellAll; *) +procedure TStringAlignGrid.ResetEditCellAll; +var + i,j: longint; +begin + for i:=FPropCell.Count-1 downto 0 do begin + if FPropCell.Items[i]<>NIL then + for j:=TList(FPropCell.Items[i]).Count-1 downto 0 do + ResetEditCell(i,j); + end; + invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetEditColAll; *) +procedure TStringAlignGrid.ResetEditColAll; +var + i: longint; +begin + for i:=FPropCol.Count-1 downto 0 do begin + ResetEditCol(i); + end; + invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetEditRowAll; *) +procedure TStringAlignGrid.ResetEditRowAll; +var + i: longint; +begin + for i:=FPropRow.Count-1 downto 0 do begin + ResetEditRow(i); + end; + invalidate; + end; +(*@\\\*) +(*@\\\0000000401*) +(*@\\\*) +(*@/// Property read and write and reset for Fonts *) +(*@/// Property read and write for FontCell *) +(*@/// function TStringAlignGrid.GetFontCell(ACol,ARow: longint):TFont; *) +function TStringAlignGrid.GetFontCell(ACol,ARow: longint):TFont; +begin + GetFontCell:=GetFontCellInternal(ACol,ARow,true); + end; +(*@\\\0000000323*) +(*@/// procedure TStringAlignGrid.SetFontCell(ACol,ARow: longint; const Value: TFont); *) +procedure TStringAlignGrid.SetFontCell(ACol,ARow: longint; const Value: TFont); +begin + ObjectCell[ACol,ARow].font:=value; + Invalidate; + end; +(*@\\\0000000301*) +(*@\\\0000000227*) +(*@/// Property read and write for FontCol/FixedFontCol *) +(*@/// function TStringAlignGrid.GetFontCol(ACol: longint):TFont; *) +function TStringAlignGrid.GetFontCol(ACol: longint):TFont; +begin + GetFontCol:=GetFontColRowInternal(ACol,true,FPropCol); + end; +(*@\\\0000000334*) +(*@/// function TStringAlignGrid.GetFontFixedCol(ACol: longint):TFont; *) +function TStringAlignGrid.GetFontFixedCol(ACol: longint):TFont; +begin + GetFontFixedCol:=GetFontColRowInternal(ACol,true,FFPropCol); + end; +(*@\\\000000033A*) +(*@/// procedure TStringAlignGrid.SetFontCol(ACol: longint; const Value: TFont); *) +procedure TStringAlignGrid.SetFontCol(ACol: longint; const Value: TFont); +begin + ObjectCol[ACol].font:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetFontFixedCol(ACol: longint; const Value: TFont); *) +procedure TStringAlignGrid.SetFontFixedCol(ACol: longint; const Value: TFont); +begin + ObjectFixedCol[ACol].font:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@\\\0000000401*) +(*@/// Property read and write for FontRow/FixedFontRow *) +(*@/// function TStringAlignGrid.GetFontRow(ARow: longint):TFont; *) +function TStringAlignGrid.GetFontRow(ARow: longint):TFont; +begin + GetFontRow:=GetFontColRowInternal(ARow,true,FPropRow); + end; +(*@\\\0000000334*) +(*@/// function TStringAlignGrid.GetFontFixedRow(ARow: longint):TFont; *) +function TStringAlignGrid.GetFontFixedRow(ARow: longint):TFont; +begin + GetFontFixedRow:=GetFontColRowInternal(ARow,true,FFPropRow); + end; +(*@\\\000000033A*) +(*@/// procedure TStringAlignGrid.SetFontRow(ARow: longint; const Value: TFont); *) +procedure TStringAlignGrid.SetFontRow(ARow: longint; const Value: TFont); +begin + ObjectRow[ARow].font:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetFontFixedRow(ARow: longint; const Value: TFont); *) +procedure TStringAlignGrid.SetFontFixedRow(ARow: longint; const Value: TFont); +begin + ObjectFixedRow[ARow].font:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@\\\000000040A*) + +(*@/// Reset font and use the one defined a level above *) +(*@/// procedure TStringAlignGrid.ResetFontCol(ACol:longint); *) +procedure TStringAlignGrid.ResetFontCol(ACol:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FPropCol); + if v<>NIL then + v.font:=NIL; + Invalidate; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.ResetFontFixedCol(ACol:longint); *) +procedure TStringAlignGrid.ResetFontFixedCol(ACol:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FFPropCol); + if v<>NIL then + v.font:=NIL; + Invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetFontRow(ARow:longint); *) +procedure TStringAlignGrid.ResetFontRow(ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FPropRow); + if v<>NIL then + v.font:=NIL; + Invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetFontFixedRow(ARow:longint); *) +procedure TStringAlignGrid.ResetFontFixedRow(ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FFPropRow); + if v<>NIL then + v.font:=NIL; + Invalidate; + end; +(*@\\\0000000518*) +(*@/// procedure TStringAlignGrid.ResetFontCell(ACol,ARow:longint); *) +procedure TStringAlignGrid.ResetFontCell(ACol,ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCell(ACol,ARow, FPropCell); + if v<>NIL then + v.font:=NIL; + Invalidate; + end; +(*@\\\*) + +(*@/// procedure TStringAlignGrid.ResetFontCellAll; *) +procedure TStringAlignGrid.ResetFontCellAll; +var + i,j: longint; +begin + for i:=FPropCell.Count-1 downto 0 do begin + if FPropCell.Items[i]<>NIL then + for j:=TList(FPropCell.Items[i]).Count-1 downto 0 do + ResetFontCell(i,j); + end; + invalidate; + end; +(*@\\\0000000801*) +(*@/// procedure TStringAlignGrid.ResetFontColAll; *) +procedure TStringAlignGrid.ResetFontColAll; +var + i: longint; +begin + for i:=FPropCol.Count-1 downto 0 do begin + ResetFontCol(i); + end; + invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetFontRowAll; *) +procedure TStringAlignGrid.ResetFontRowAll; +var + i: longint; +begin + for i:=FPropRow.Count-1 downto 0 do begin + ResetFontRow(i); + end; + invalidate; + end; +(*@\\\*) +(*@\\\0000000701*) + +(*@/// procedure TStringAlignGrid.SetFixedFont(value: TFont); *) +procedure TStringAlignGrid.SetFixedFont(value: TFont); +begin + if value=NIL then + FFixedFont.Assign(self.font) + else + FFixedFont.assign(value); + invalidate; + end; +(*@\\\000000070E*) +(*@\\\0000000701*) +(*@/// Property read and write and reset for Brushs *) +(*@/// Property read and write for BrushCell *) +(*@/// function TStringAlignGrid.GetBrushCell(ACol,ARow: longint):TBrush; *) +function TStringAlignGrid.GetBrushCell(ACol,ARow: longint):TBrush; +begin + GetBrushCell:=GetBrushCellInternal(ACol,ARow,true); + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.SetBrushCell(ACol,ARow: longint; const Value: TBrush); *) +procedure TStringAlignGrid.SetBrushCell(ACol,ARow: longint; const Value: TBrush); +begin + ObjectCell[ACol,ARow].brush:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@\\\0000000201*) +(*@/// Property read and write for BrushCol/FixedBrushCol *) +(*@/// function TStringAlignGrid.GetBrushCol(ACol: longint):TBrush; *) +function TStringAlignGrid.GetBrushCol(ACol: longint):TBrush; +begin + GetBrushCol:=GetBrushColRowInternal(ACol,true,FPropCol); + end; +(*@\\\0000000401*) +(*@/// function TStringAlignGrid.GetBrushFixedCol(ACol: longint):TBrush; *) +function TStringAlignGrid.GetBrushFixedCol(ACol: longint):TBrush; +begin + GetBrushFixedCol:=GetBrushColRowInternal(ACol,true,FFPropCol); + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.SetBrushCol(ACol: longint; const Value: TBrush); *) +procedure TStringAlignGrid.SetBrushCol(ACol: longint; const Value: TBrush); +begin + ObjectCol[ACol].brush:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetBrushFixedCol(ACol: longint; const Value: TBrush); *) +procedure TStringAlignGrid.SetBrushFixedCol(ACol: longint; const Value: TBrush); +begin + ObjectFixedCol[ACol].brush:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@\\\0000000401*) +(*@/// Property read and write for BrushRow/FixedBrushRow *) +(*@/// function TStringAlignGrid.GetBrushRow(ARow: longint):TBrush; *) +function TStringAlignGrid.GetBrushRow(ARow: longint):TBrush; +begin + GetBrushRow:=GetBrushColRowInternal(ARow,true,FPropRow); + end; +(*@\\\*) +(*@/// function TStringAlignGrid.GetBrushFixedRow(ARow: longint):TBrush; *) +function TStringAlignGrid.GetBrushFixedRow(ARow: longint):TBrush; +begin + GetBrushFixedRow:=GetBrushColRowInternal(ARow,true,FFPropRow); + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.SetBrushRow(ARow: longint; const Value: TBrush); *) +procedure TStringAlignGrid.SetBrushRow(ARow: longint; const Value: TBrush); +begin + ObjectRow[ARow].brush:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetBrushFixedRow(ARow: longint; const Value: TBrush); *) +procedure TStringAlignGrid.SetBrushFixedRow(ARow: longint; const Value: TBrush); +begin + ObjectFixedRow[ARow].brush:=value; + Invalidate; + end; +(*@\\\0000000501*) +(*@\\\0000000401*) + +(*@/// Reset Brush and use the one defined a level above *) +(*@/// procedure TStringAlignGrid.ResetBrushCol(ACol:longint); *) +procedure TStringAlignGrid.ResetBrushCol(ACol:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FPropCol); + if v<>NIL then + v.Brush:=NIL; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetBrushFixedCol(ACol:longint); *) +procedure TStringAlignGrid.ResetBrushFixedCol(ACol:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FFPropCol); + if v<>NIL then + v.Brush:=NIL; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetBrushRow(ARow:longint); *) +procedure TStringAlignGrid.ResetBrushRow(ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FPropRow); + if v<>NIL then + v.Brush:=NIL; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetBrushFixedRow(ARow:longint); *) +procedure TStringAlignGrid.ResetBrushFixedRow(ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FFPropRow); + if v<>NIL then + v.Brush:=NIL; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetBrushCell(ACol,ARow:longint); *) +procedure TStringAlignGrid.ResetBrushCell(ACol,ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCell(ACol,ARow, FPropCell); + if v<>NIL then + v.Brush:=NIL; + Invalidate; + end; +(*@\\\*) + +(*@/// procedure TStringAlignGrid.ResetBrushCellAll; *) +procedure TStringAlignGrid.ResetBrushCellAll; +var + i,j: longint; +begin + for i:=FPropCell.Count-1 downto 0 do begin + if FPropCell.Items[i]<>NIL then + for j:=TList(FPropCell.Items[i]).Count-1 downto 0 do + ResetBrushCell(i,j); + end; + invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetBrushColAll; *) +procedure TStringAlignGrid.ResetBrushColAll; +var + i: longint; +begin + for i:=FPropCol.Count-1 downto 0 do begin + ResetBrushCol(i); + end; + invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetBrushRowAll; *) +procedure TStringAlignGrid.ResetBrushRowAll; +var + i: longint; +begin + for i:=FPropRow.Count-1 downto 0 do begin + ResetBrushRow(i); + end; + invalidate; + end; +(*@\\\*) +(*@\\\*) +(*@\\\0000000501*) +(*@/// Property read and write and reset for Colors (done via Brushes!) *) +(*@/// Property read and write for ColorCell *) +{ Property read and write for ColorCell } +(*@/// function TStringAlignGrid.GetColorCell(ACol,ARow:longint):TColor; *) +function TStringAlignGrid.GetColorCell(ACol,ARow:longint):TColor; +begin + result:=GetBrushCellComplete(ACol,ARow).color; + end; +(*@\\\000000031F*) +(*@/// procedure TStringAlignGrid.SetColorCell(ACol,ARow:longint; const Value: TColor); *) +procedure TStringAlignGrid.SetColorCell(ACol,ARow:longint; const Value: TColor); +begin + CellBrush[ACol,ARow].Color:=value; + Invalidate; + end; +(*@\\\0000000401*) +(*@\\\0000000301*) +(*@/// Property read and write for ColorCol and FixedColorCol *) +{ Property read and write for ColorCol and FixedColorCol } +(*@/// function TStringAlignGrid.GetColorCol(ACol:longint):TColor; *) +function TStringAlignGrid.GetColorCol(ACol:longint):TColor; +var + h: TBrush; +begin + h:=GetBrushColRowInternal(ACol,false,FPropCol); + if h<>NIL then + result:=h.color + else + result:=self.color; + end; +(*@\\\0000000701*) +(*@/// procedure TStringAlignGrid.SetColorCol(ACol:longint; const Value: TColor); *) +procedure TStringAlignGrid.SetColorCol(ACol:longint; const Value: TColor); +begin + ColBrush[Acol].color:=value; + Invalidate; + end; +(*@\\\0000000303*) +(*@/// function TStringAlignGrid.GetFixColorCol(ACol:longint):TColor; *) +function TStringAlignGrid.GetFixColorCol(ACol:longint):TColor; +var + h: TBrush; +begin + h:=GetBrushColRowInternal(ACol,false,FFPropCol); + if h<>NIL then + result:=h.color + else + result:=self.color; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetFixColorCol(ACol:longint; const Value: TColor); *) +procedure TStringAlignGrid.SetFixColorCol(ACol:longint; const Value: TColor); +begin + FixedColBrush[Acol].color:=value; + Invalidate; + end; +(*@\\\0000000301*) +(*@\\\0000000301*) +(*@/// Property read and write for ColorRow and FixedColorRow *) +{ Property read and write for ColorRow and FixedColorRow } +(*@/// function TStringAlignGrid.GetColorRow(ARow:longint):TColor; *) +function TStringAlignGrid.GetColorRow(ARow:longint):TColor; +var + h: TBrush; +begin + h:=GetBrushColRowInternal(ARow,false,FPropRow); + if h<>NIL then + result:=h.color + else + result:=self.color; + end; +(*@\\\000000052D*) +(*@/// procedure TStringAlignGrid.SetColorRow(ARow:longint; const Value: TColor); *) +procedure TStringAlignGrid.SetColorRow(ARow:longint; const Value: TColor); +begin + RowBrush[ARow].color:=value; + Invalidate; + end; +(*@\\\*) +(*@/// function TStringAlignGrid.GetFixColorRow(ARow:longint):TColor; *) +function TStringAlignGrid.GetFixColorRow(ARow:longint):TColor; +var + h: TBrush; +begin + h:=GetBrushColRowInternal(ARow,false,FPropRow); + if h<>NIL then + result:=h.color + else + result:=self.color; + end; +(*@\\\000000052D*) +(*@/// procedure TStringAlignGrid.SetFixColorRow(ARow:longint; const Value: TColor); *) +procedure TStringAlignGrid.SetFixColorRow(ARow:longint; const Value: TColor); +begin + FixedRowBrush[ARow].color:=value; + Invalidate; + end; +(*@\\\*) +(*@\\\0000000301*) + +(*@/// Reset color and use the one defined a level above *) +(*@/// procedure TStringAlignGrid.ResetColorCell(ACol,ARow:longint); *) +procedure TStringAlignGrid.ResetColorCell(ACol,ARow:longint); +begin + ResetBrushCell(ACol,ARow); + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetColorCol(ACol:longint); *) +procedure TStringAlignGrid.ResetColorCol(ACol:longint); +begin + ResetBrushCol(ACol); + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetColorFixedCol(ACol:longint); *) +procedure TStringAlignGrid.ResetColorFixedCol(ACol:longint); +begin + ResetBrushFixedCol(ACol); + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetColorRow(ARow:longint); *) +procedure TStringAlignGrid.ResetColorRow(ARow:longint); +begin + ResetBrushRow(ARow); + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetColorFixedRow(ARow:longint); *) +procedure TStringAlignGrid.ResetColorFixedRow(ARow:longint); +begin + ResetBrushFixedRow(ARow); + end; +(*@\\\*) + +(*@/// procedure TStringAlignGrid.ResetColorCellAll; *) +procedure TStringAlignGrid.ResetColorCellAll; +begin + ResetBrushCellAll; + end; +(*@\\\0000000301*) +(*@/// procedure TStringAlignGrid.ResetColorColAll; *) +procedure TStringAlignGrid.ResetColorColAll; +begin + ResetBrushColAll; + end; +(*@\\\000000030F*) +(*@/// procedure TStringAlignGrid.ResetColorRowAll; *) +procedure TStringAlignGrid.ResetColorRowAll; +begin + ResetBrushRowAll; + end; +(*@\\\0000000301*) +(*@\\\0000000901*) + +(*@/// procedure TStringAlignGrid.SetFixedColor(const Value: TColor); *) +procedure TStringAlignGrid.SetFixedColor(const Value: TColor); +begin + inherited FixedColor:=value; + FFixedBrush.color:=value; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.SetSelCellColor(Value: TColor); *) +procedure TStringAlignGrid.SetSelCellColor(Value: TColor); +begin + f_SelCellColor:=value; + invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.SetSelFontColor(Value: TColor); *) +procedure TStringAlignGrid.SetSelFontColor(Value: TColor); +begin + f_SelFontColor:=value; + invalidate; + end; +(*@\\\*) + +(*@/// procedure TStringAlignGrid.setaltrowcolor(value:TColor); *) +procedure TStringAlignGrid.setaltrowcolor(value:TColor); +begin + if value<>f_altrowcolor then begin + f_altrowcolor:=value; + if f_doaltrowcolor then + invalidate; + end; + end; +(*@\\\0000000405*) +(*@/// procedure TStringAlignGrid.setaltcolcolor(value:TColor); *) +procedure TStringAlignGrid.setaltcolcolor(value:TColor); +begin + if value<>f_altcolcolor then begin + f_altcolcolor:=value; + if f_doaltcolcolor then + invalidate; + end; + end; +(*@\\\0000000807*) +(*@/// procedure TStringAlignGrid.setdoaltrowcolor(value:boolean); *) +procedure TStringAlignGrid.setdoaltrowcolor(value:boolean); +begin + if f_doaltrowcolor<>value then begin + f_doaltrowcolor:=value; + invalidate; + end; + end; +(*@\\\0000000405*) +(*@/// procedure TStringAlignGrid.setdoaltcolcolor(value:boolean); *) +procedure TStringAlignGrid.setdoaltcolcolor(value:boolean); +begin + if f_doaltcolcolor<>value then begin + f_doaltcolcolor:=value; + invalidate; + end; + end; +(*@\\\*) +(*@\\\0000000D01*) +(*@/// Property read and write and reset for Selected Colors *) +(*@/// Property read and write for SelColorCell *) +(*@/// function TStringAlignGrid.GetSelColorCell(ACol,ARow:longint):TColor; *) +function TStringAlignGrid.GetSelColorCell(ACol,ARow:longint):TColor; +var + v:TCellproperties; +begin + v:=GetItemCell(ACol,ARow,FPropCell); + if (v=NIL) or (v.SelBrush=NIL) then begin + if Col_before_Row then + v:=GetItemCol(ACol,FPropCol) + else + v:=GetItemCol(ACol,FPropRow); + if (v=NIL) or (v.SelBrush=NIL) then begin + if Col_before_Row then + v:=GetItemCol(ARow,FPropRow) + else + v:=GetItemCol(ARow,FPropCol); + if (v=NIL) or (v.SelBrush=NIL) then + result:=f_SelCellColor + else + result:=v.selbrush.color; + end + else + result:=v.selbrush.color; + end + else + result:=v.selbrush.color; + end; +(*@\\\0000000C01*) +(*@/// procedure TStringAlignGrid.SetSelColorCell(ACol,ARow:longint; const Value: TColor); *) +procedure TStringAlignGrid.SetSelColorCell(ACol,ARow:longint; const Value: TColor); +var + f: TBrush; +begin + f:=NIL; + try + f:=TBrush.Create; + f.color:=value; + ObjectCell[ACol,ARow].selbrush:=f; + Invalidate; + finally + f.free; + end; + end; +(*@\\\0000000A01*) +(*@\\\0000000201*) +(*@/// Property read and write for SelColorCol *) +(*@/// function TStringAlignGrid.GetSelColorCol(ACol:longint):TColor; *) +function TStringAlignGrid.GetSelColorCol(ACol:longint):TColor; +var + v:TCellproperties; +begin + v:=GetItemCol(ACol,FPropCol); + if (v=NIL) or (v.SelBrush=NIL) then + result:=f_SelCellColor + else + result:=v.selbrush.color; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.SetSelColorCol(ACol:longint; const Value: TColor); *) +procedure TStringAlignGrid.SetSelColorCol(ACol:longint; const Value: TColor); +var + f: TBrush; +begin + f:=NIL; + try + f:=TBrush.Create; + f.color:=value; + ObjectCol[ACol].selbrush:=f; + Invalidate; + finally + f.free; + end; + end; +(*@\\\0000000A01*) +(*@\\\0000000201*) +(*@/// Property read and write for SelColorRow *) +(*@/// function TStringAlignGrid.GetSelColorRow(ARow:longint):TColor; *) +function TStringAlignGrid.GetSelColorRow(ARow:longint):TColor; +var + v:TCellproperties; +begin + v:=GetItemCol(ARow,FPropRow); + if (v=NIL) or (v.SelBrush=NIL) then + result:=f_SelCellColor + else + result:=v.selbrush.color; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.SetSelColorRow(ARow:longint; const Value: TColor); *) +procedure TStringAlignGrid.SetSelColorRow(ARow:longint; const Value: TColor); +var + f: TBrush; +begin + f:=NIL; + try + f:=TBrush.Create; + f.color:=value; + ObjectRow[ARow].selbrush:=f; + Invalidate; + finally + f.free; + end; + end; +(*@\\\0000000B01*) +(*@\\\0000000201*) + +(*@/// procedure TStringAlignGrid.ResetSelectedColorCell(ACol,ARow:longint); *) +procedure TStringAlignGrid.ResetSelectedColorCell(ACol,ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCell(ACol,ARow, FPropCell); + if v<>NIL then + v.selBrush:=NIL; + Invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetSelectedColorCol(ACol:longint); *) +procedure TStringAlignGrid.ResetSelectedColorCol(ACol:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FPropCol); + if v<>NIL then + v.selBrush:=NIL; + Invalidate; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetSelectedColorRow(ARow:longint); *) +procedure TStringAlignGrid.ResetSelectedColorRow(ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FPropRow); + if v<>NIL then + v.selBrush:=NIL; + Invalidate; + end; +(*@\\\*) + +(*@/// procedure TStringAlignGrid.ResetSelectedColorCellAll; *) +procedure TStringAlignGrid.ResetSelectedColorCellAll; +var + i,j: longint; +begin + for i:=FPropCell.Count-1 downto 0 do begin + if FPropCell.Items[i]<>NIL then + for j:=TList(FPropCell.Items[i]).Count-1 downto 0 do + ResetBrushCell(i,j); + end; + invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetSelectedColorColAll; *) +procedure TStringAlignGrid.ResetSelectedColorColAll; +var + i: longint; +begin + for i:=FPropCol.Count-1 downto 0 do begin + ResetBrushCol(i); + end; + invalidate; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ResetSelectedColorRowAll; *) +procedure TStringAlignGrid.ResetSelectedColorRowAll; +var + i: longint; +begin + for i:=FPropRow.Count-1 downto 0 do begin + ResetBrushRow(i); + end; + invalidate; + end; +(*@\\\0000000512*) +(*@\\\*) +(*@/// Property read and write and reset for Selected Font Colors *) +(*@/// Property read and write for SelFontColorCell *) +(*@/// function TStringAlignGrid.GetSelFontColorCell(ACol,ARow:longint):TColor; *) +function TStringAlignGrid.GetSelFontColorCell(ACol,ARow:longint):TColor; +var + v:TCellproperties; +begin + v:=GetItemCell(ACol,ARow,FPropCell); + if (v=NIL) or (v.SelFont=NIL) then begin + if Col_before_Row then + v:=GetItemCol(ACol,FPropCol) + else + v:=GetItemCol(ACol,FPropRow); + if (v=NIL) or (v.SelFont=NIL) then begin + if Col_before_Row then + v:=GetItemCol(ARow,FPropRow) + else + v:=GetItemCol(ARow,FPropCol); + if (v=NIL) or (v.SelFont=NIL) then + result:=f_SelFontColor + else + result:=v.selFont.color; + end + else + result:=v.selFont.color; + end + else + result:=v.selFont.color; + end; +(*@\\\0000001012*) +(*@/// procedure TStringAlignGrid.SetSelFontColorCell(ACol,ARow:longint; const Value: TColor); *) +procedure TStringAlignGrid.SetSelFontColorCell(ACol,ARow:longint; const Value: TColor); +var + f: TFont; +begin + f:=NIL; + try + f:=TFont.Create; + f.color:=value; + ObjectCell[ACol,ARow].selfont:=f; + Invalidate; + finally + f.free; + end; + end; +(*@\\\*) +(*@\\\0000000201*) +(*@/// Property read and write for SelFontColorCol *) +(*@/// function TStringAlignGrid.GetSelFontColorCol(ACol:longint):TColor; *) +function TStringAlignGrid.GetSelFontColorCol(ACol:longint):TColor; +var + v:TCellproperties; +begin + v:=GetItemCol(ACol,FPropCol); + if (v=NIL) or (v.SelFont=NIL) then + result:=f_SelCellColor + else + result:=v.selFont.color; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.SetSelFontColorCol(ACol:longint; const Value: TColor); *) +procedure TStringAlignGrid.SetSelFontColorCol(ACol:longint; const Value: TColor); +var + f: TFont; +begin + f:=NIL; + try + f:=TFont.Create; + f.color:=value; + ObjectCol[ACol].selfont:=f; + Invalidate; + finally + f.free; + end; + end; +(*@\\\0000000B01*) +(*@\\\0000000201*) +(*@/// Property read and write for SelFontColorRow *) +(*@/// function TStringAlignGrid.GetSelFontColorRow(ARow:longint):TColor; *) +function TStringAlignGrid.GetSelFontColorRow(ARow:longint):TColor; +var + v:TCellproperties; +begin + v:=GetItemCol(ARow,FPropRow); + if (v=NIL) or (v.SelFont=NIL) then + result:=f_SelCellColor + else + result:=v.selFont.color; + end; +(*@\\\0000000601*) +(*@/// procedure TStringAlignGrid.SetSelFontColorRow(ARow:longint; const Value: TColor); *) +procedure TStringAlignGrid.SetSelFontColorRow(ARow:longint; const Value: TColor); +var + f: TFont; +begin + f:=NIL; + try + f:=TFont.Create; + f.color:=value; + ObjectRow[ARow].selfont:=f; + Invalidate; + finally + f.free; + end; + end; +(*@\\\0000000B01*) +(*@\\\0000000201*) + +(*@/// procedure TStringAlignGrid.ResetSelectedFontColorCell(ACol,ARow:longint); *) +procedure TStringAlignGrid.ResetSelectedFontColorCell(ACol,ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCell(ACol,ARow, FPropCell); + if v<>NIL then + v.selFont:=NIL; + Invalidate; + end; +(*@\\\0000000907*) +(*@/// procedure TStringAlignGrid.ResetSelectedFontColorCol(ACol:longint); *) +procedure TStringAlignGrid.ResetSelectedFontColorCol(ACol:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ACol, FPropCol); + if v<>NIL then + v.selFont:=NIL; + Invalidate; + end; +(*@\\\0000000907*) +(*@/// procedure TStringAlignGrid.ResetSelectedFontColorRow(ARow:longint); *) +procedure TStringAlignGrid.ResetSelectedFontColorRow(ARow:longint); +var + v:TCellProperties; +begin + v:=GetItemCol(ARow, FPropRow); + if v<>NIL then + v.selFont:=NIL; + Invalidate; + end; +(*@\\\0000000907*) + +(*@/// procedure TStringAlignGrid.ResetSelectedFontColorCellAll; *) +procedure TStringAlignGrid.ResetSelectedFontColorCellAll; +var + i,j: longint; +begin + for i:=FPropCell.Count-1 downto 0 do begin + if FPropCell.Items[i]<>NIL then + for j:=TList(FPropCell.Items[i]).Count-1 downto 0 do + ResetFontCell(i,j); + end; + invalidate; + end; +(*@\\\0000000B07*) +(*@/// procedure TStringAlignGrid.ResetSelectedFontColorColAll; *) +procedure TStringAlignGrid.ResetSelectedFontColorColAll; +var + i: longint; +begin + for i:=FPropCol.Count-1 downto 0 do begin + ResetFontCol(i); + end; + invalidate; + end; +(*@\\\000000080D*) +(*@/// procedure TStringAlignGrid.ResetSelectedFontColorRowAll; *) +procedure TStringAlignGrid.ResetSelectedFontColorRowAll; +var + i: longint; +begin + for i:=FPropRow.Count-1 downto 0 do begin + ResetFontRow(i); + end; + invalidate; + end; +(*@\\\000000012D*) +(*@\\\*) +(*@/// Property read and write for HintCell *) +{ Property read and write for HintCell } +(*@/// function TStringAlignGrid.GetHintCell(ACol,ARow: longint):string; *) +function TStringAlignGrid.GetHintCell(ACol,ARow: longint):string; +var + v:pstring; +begin + v:=GetItemCell(ACol,ARow,FHintCell); + if v=NIL then + GetHintCell:='' + else + GetHintCell:=v^; + end; +(*@\\\0000000122*) +(*@/// procedure TStringAlignGrid.SetHintCell(ACol,ARow: longint; const Value: string); *) +procedure TStringAlignGrid.SetHintCell(ACol,ARow: longint; const Value: string); +var + v:pstring; +begin + FSaveHint:=true; + v:=NewStr(value); + v:=SetItemCell(ACol,ARow, FHintCell, v); + if v<>NIL then + DisposeStr(v); + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.ResetHintCellAll; *) +procedure TStringAlignGrid.ResetHintCellAll; +var + i: longint; +begin + for i:=FHintCell.Count-1 downto 0 do begin + cleanlist_pstring(TList(FHintCell.Items[i])); + TList(FHintCell.Items[i]).Free; + end; + FHintCell.clear; + end; +(*@\\\0000000913*) +(*@\\\0000000401*) +(*@/// Resetting all the setting at once *) +(*@/// procedure TStringAligngrid.ResetAllCell(ACol,ARow:longint); *) +procedure TStringAligngrid.ResetAllCell(ACol,ARow:longint); +begin + ResetAlignCell(ACol,ARow); + ResetWordwrapCell(ACol,ARow); + ResetEditCell(ACol,ARow); + ResetFontCell(ACol,ARow); + ResetBrushCell(ACol,ARow); + ResetSelectedColorCell(ACol,ARow); + ResetSelectedFontColorCell(ACol,ARow); + end; +(*@\\\0000000410*) +(*@/// procedure TStringAligngrid.ResetAllCol(ACol:longint); *) +procedure TStringAligngrid.ResetAllCol(ACol:longint); +begin + ResetAlignCol(ACol); + ResetWordWrapCol(ACol); + ResetEditCol(ACol); + ResetFontCol(ACol); + ResetBrushCol(ACol); + ResetSelectedColorCol(ACol); + ResetSelectedFontColorCol(ACol); + end; +(*@\\\0000000410*) +(*@/// procedure TStringAligngrid.ResetAllFixedCol(ACol:longint); *) +procedure TStringAligngrid.ResetAllFixedCol(ACol:longint); +begin + ResetAlignFixedCol(ACol); + ResetWordwrapFixedCol(ACol); + ResetFontFixedCol(ACol); + ResetBrushFixedCol(ACol); + end; +(*@\\\0000000410*) +(*@/// procedure TStringAligngrid.ResetAllRow(ARow:longint); *) +procedure TStringAligngrid.ResetAllRow(ARow:longint); +begin + ResetAlignRow(ARow); + ResetWordwrapRow(ARow); + ResetEditRow(ARow); + ResetFontRow(ARow); + ResetBrushRow(ARow); + ResetSelectedColorRow(ARow); + ResetSelectedFontColorRow(ARow); + end; +(*@\\\0000000410*) +(*@/// procedure TStringAligngrid.ResetAllFixedRow(ARow:longint); *) +procedure TStringAligngrid.ResetAllFixedRow(ARow:longint); +begin + ResetAlignFixedRow(ARow); + ResetWordwrapFixedRow(ARow); + ResetFontFixedRow(ARow); + ResetBrushFixedRow(ARow); + end; +(*@\\\0000000410*) + +(*@/// procedure TStringAligngrid.ResetAllCellAll; *) +procedure TStringAligngrid.ResetAllCellAll; +begin + ResetAlignCellAll; + ResetWordwrapCellAll; + ResetEditCellAll; + ResetFontCellAll; + ResetBrushCellAll; + ResetSelectedColorCellAll; + ResetSelectedFontColorCellAll; + end; +(*@\\\0000000410*) +(*@/// procedure TStringAligngrid.ResetAllColAll; *) +procedure TStringAligngrid.ResetAllColAll; +begin + ResetAlignColAll; + ResetWordwrapColAll; + ResetEditColAll; + ResetFontColAll; + ResetBrushColAll; + ResetSelectedColorColAll; + ResetSelectedFontColorColAll; + end; +(*@\\\0000000410*) +(*@/// procedure TStringAligngrid.ResetAllRowAll; *) +procedure TStringAligngrid.ResetAllRowAll; +begin + ResetAlignRowAll; + ResetWordwrapRowAll; + ResetEditRowAll; + ResetFontRowAll; + ResetBrushRowAll; + ResetSelectedColorRowAll; + ResetSelectedFontColorRowAll; + end; +(*@\\\0000000410*) +(*@\\\*) + +(*@/// Insertion, removing, moving and exchanging of Rows and Columns *) +{ Cols.Delete[i] isn't implemented in any Delphi version I know of, it + is abstract in D1/D2, in D3 at least an exception InvalidOp is raised. + Same hold for Rows.Delete, Rows.Insert and Cols.Insert. + Therefore all must be done by moving the Column/Row to be deleted or + newly created from/to the place it should have } + +(*@/// procedure TStringAlignGrid.RemoveCol(ACol:longint); *) +procedure TStringAlignGrid.RemoveCol(ACol:longint); +var + v: TCellProperties; + i:longint; + reshow_edit: boolean; +begin + if (ACol=Colcount) or (ColCount=FixedCols+1) then EXIT; + (* can't remove a fixed column *) + (*@/// hide the inplace editor if necessary *) + reshow_edit:=false; + if (InplaceEditor <> nil) and InplaceEditor.visible then begin + if (TNewInplaceEdit(InplaceEditor).col=ACol) then + hideeditor + else if (TNewInplaceEdit(InplaceEditor).col>ACol) then begin + hideeditor; + reshow_edit:=true; + end; + end; + (*@\\\*) + (*@/// PropertiesCol/Cell *) + if FPropCol.Count>=ACol then begin + v:=TCellProperties(SetItemCol(ACol,FPropCol,NIL)); + v.free; + FPropCol.Delete(ACol); + end; + if FPropCell.Count>ACol then begin + cleanlist_object(TList(FPropCell.Items[ACol])); + TList(FPropCell.Items[ACol]).Free; + FPropCell.Delete(ACol); + end; + (*@\\\0000000609*) + (*@/// HintCell *) + if FHintCell.Count>ACol then begin + cleanlist_pstring(TList(FHintCell.Items[ACol])); + TList(FHintCell.Items[ACol]).Free; + FHintCell.Delete(ACol); + end; + (*@\\\0000000201*) + (*@/// Cell *) + for i:=ACol to ColCount-2 do + inherited ColumnMoved(i,i+1); + Cols[Colcount-1].clear; + (*@\\\0000000201*) + colcount:=colcount-1; + if col>Acol then + col:=col-1; + if reshow_edit then + ShowEditor; + invalidate; + end; +(*@\\\0000000105*) +(*@/// procedure TStringAlignGrid.RemoveRow(ARow:longint); *) +procedure TStringAlignGrid.RemoveRow(ARow:longint); +var + v: TCellProperties; + y:pstring; + l: TList; + i:longint; + reshow_edit: boolean; +begin + if (ARow=Rowcount) or (RowCount=FixedRows+1) then EXIT; + (* can't remove a fixed row *) + reshow_edit:=false; + (*@/// hide the inplace editor if necessary *) + if (InplaceEditor <> nil) and InplaceEditor.visible then begin + if (TNewInplaceEdit(InplaceEditor).row=ARow) then + hideeditor + else if (TNewInplaceEdit(InplaceEditor).row>ARow) then begin + hideeditor; + reshow_edit:=true; + end; + end; + (*@\\\*) + (*@/// PropertiesCol/Cell *) + if FPropRow.Count>=ARow then begin + v:=TCellProperties(SetItemCol(ARow,FPropRow,NIL)); + v.free; + FPropRow.Delete(ARow); + end; + for i:=0 to FPropCell.Count-1 do begin + l:=TList(FPropCell.Items[i]); + if l<>NIL then begin + if l.Count>=ARow then begin + v:=TCellProperties(SetItemCol(ARow,l,NIL)); + v.free; + l.Delete(ARow); + end; + end; + end; + (*@\\\0000000A01*) + (*@/// HintCell *) + for i:=0 to FHintCell.Count-1 do begin + l:=TList(FHintCell.Items[i]); + if l<>NIL then begin + if l.Count>=ARow then begin + y:=SetItemCol(ARow,l,NIL); + if y<>NIL then + DisposeStr(y); + l.Delete(ARow); + end; + end; + end; + (*@\\\0000000701*) + (*@/// Cell *) + for i:=ARow to RowCount-2 do + inherited RowMoved(i,i+1); + Rows[Rowcount-1].clear; + (*@\\\*) + rowcount:=rowcount-1; + if row>ARow then + row:=row-1; + if reshow_edit then + ShowEditor; + invalidate; + end; +(*@\\\0000000501*) + +(*@/// procedure TStringAlignGrid.InsertCol(ACol:longint); *) +procedure TStringAlignGrid.InsertCol(ACol:longint); +var + i: longint; + reshow_edit: boolean; +begin + if (ACol nil) and + InplaceEditor.visible and + (TNewInplaceEdit(InplaceEditor).col>=ACol); + if reshow_edit then + HideEditor; + ColCount:=ColCount+1; + (*@/// PropCol/Cell *) + if FPropCol.Count>=ACol then + FPropCol.Insert(ACol,NIL); + if FPropCell.Count>=ACol then + FPropCell.Insert(ACol,NIL); + (*@\\\0000000401*) + (*@/// HintCell *) + if FHintCell.Count>=ACol then + FHintCell.Insert(ACol,NIL); + (*@\\\*) + (*@/// Cell *) + Cols[ColCount-1].clear; + for i:=ColCount-1 downto ACol+1 do + inherited ColumnMoved(i,i-1); { maybe faster than doing it myself as + this utilizes the internal sparselist } + (*@\\\0000000201*) + if col>=Acol then + col:=col+1; + if reshow_edit then + ShowEditor; + invalidate; + end; +(*@\\\0000000701*) +(*@/// procedure TStringAlignGrid.InsertRow(ARow:longint); *) +procedure TStringAlignGrid.InsertRow(ARow:longint); +var + i: longint; + l: TList; + reshow_edit: boolean; +begin + if (ARow nil) and + InplaceEditor.visible and + (TNewInplaceEdit(InplaceEditor).row>=ARow); + if reshow_edit then + HideEditor; + rowcount:=rowcount+1; + (*@/// FontRow/Cell *) + if FPropRow.Count>=ARow then + FPropRow.Insert(ARow,NIL); + for i:=0 to FPropCell.Count-1 do begin + l:=TList(FPropCell.Items[i]); + if (l<>NIL) and (l.Count>=ARow) then + l.Insert(ARow,NIL); + end; + (*@\\\*) + (*@/// HintCell *) + for i:=0 to FHintCell.Count-1 do begin + l:=TList(FHintCell.Items[i]); + if (l<>NIL) and (l.Count>=ARow) then begin + l.Insert(ARow,NIL); + end; + end; + (*@\\\*) + (*@/// Cell *) + Rows[RowCount-1].clear; + for i:=RowCount-1 downto ARow+1 do + inherited RowMoved(i,i-1); + (*@\\\0000000315*) + if row>=ARow then + row:=row+1; + if reshow_edit then + ShowEditor; + invalidate; + end; +(*@\\\*) + +(*@/// procedure TStringAlignGrid.RowMoved(FromIndex, ToIndex: Longint); *) +procedure TStringAlignGrid.RowMoved(FromIndex, ToIndex: Longint); +begin + if FromIndex=ToIndex then EXIT; + (*@/// adjust inplace edit *) + if (InplaceEditor <> nil) then begin + if false then + else if TNewInplaceEdit(InplaceEditor).row=FromIndex then + TNewInplaceEdit(InplaceEditor).row:=ToIndex + else if TNewInplaceEdit(InplaceEditor).row=ToIndex then + TNewInplaceEdit(InplaceEditor).row:=ToIndex+1; + end; + (*@\\\*) + (*@/// PropRow/Cell *) + MoveItemCol(FromIndex,ToIndex,FPropRow); + MoveItemColRow(FromIndex,ToIndex,FPropCell); + (*@\\\*) + (*@/// HintCell *) + MoveItemColRow(FromIndex,ToIndex,FHintCell); + (*@\\\*) + (*@/// Cells *) + inherited RowMoved(FromIndex, ToIndex); + (*@\\\*) + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.ColumnMoved(FromIndex, ToIndex: Longint); *) +procedure TStringAlignGrid.ColumnMoved(FromIndex, ToIndex: Longint); +begin + if FromIndex=ToIndex then EXIT; + (*@/// adjust inplace edit *) + if (InplaceEditor <> nil) then begin + if false then + else if TNewInplaceEdit(InplaceEditor).col=FromIndex then + TNewInplaceEdit(InplaceEditor).col:=ToIndex + else if TNewInplaceEdit(InplaceEditor).col=ToIndex then + TNewInplaceEdit(InplaceEditor).col:=ToIndex+1; + end; + (*@\\\0000000301*) + (*@/// PropCol/Cell *) + MoveItemCol(FromIndex,ToIndex,FPropCol); + MoveItemCol(FromIndex,ToIndex,FPropCell); + (*@\\\0000000201*) + (*@/// HintCell *) + MoveItemCol(FromIndex,ToIndex,FHintCell); + (*@\\\*) + (*@/// Cells *) + inherited ColumnMoved(FromIndex, ToIndex); + (*@\\\*) + end; +(*@\\\0000000507*) + +(*@/// procedure TStringAlignGrid.ExchangeRow(FromIndex, ToIndex: Longint); *) +procedure TStringAlignGrid.ExchangeRow(FromIndex, ToIndex: Longint); +var + i: longint; + s: string; + o: TObject; + reshow_edit: boolean; +begin + if FromIndex=ToIndex then EXIT; + reshow_edit:=(InplaceEditor <> nil) and + InplaceEditor.visible and + ((TNewInplaceEdit(InplaceEditor).row=FromIndex) or + (TNewInplaceEdit(InplaceEditor).row=ToIndex)); + if reshow_edit then + HideEditor; + (*@/// PropRow/Cell *) + ExchangeItemCol(FromIndex,ToIndex,FPropRow); + ExchangeItemColRow(FromIndex,ToIndex,FPropCell); + (*@\\\0000000201*) + (*@/// HintCell *) + ExchangeItemColRow(FromIndex,ToIndex,FHintCell); + (*@\\\*) + (*@/// Cells and Objects *) + for i:=0 to ColCount-1 do begin + s:=Cells[i,FromIndex]; + o:=Objects[i,FromIndex]; + Cells[i,FromIndex]:=Cells[i,ToIndex]; + Objects[i,FromIndex]:=Objects[i,ToIndex]; + Cells[i,ToIndex]:=s; + Objects[i,ToIndex]:=o; + end; + (*@\\\*) + if false then + else if row=FromIndex then row:=toIndex + else if row=toindex then row:=fromindex; + if reshow_edit then + showeditor; + end; +(*@\\\0000000F07*) +(*@/// procedure TStringAlignGrid.ExchangeCol(FromIndex, ToIndex: Longint); *) +procedure TStringAlignGrid.ExchangeCol(FromIndex, ToIndex: Longint); +var + i: longint; + s: string; + o: TObject; + reshow_edit: boolean; +begin + if FromIndex=ToIndex then EXIT; + reshow_edit:=(InplaceEditor <> nil) and + InplaceEditor.visible and + ((TNewInplaceEdit(InplaceEditor).col=FromIndex) or + (TNewInplaceEdit(InplaceEditor).col=ToIndex)); + if reshow_edit then + HideEditor; + (*@/// PropCol/Cell *) + ExchangeItemCol(FromIndex,ToIndex,FPropCol); + ExchangeItemCol(FromIndex,ToIndex,FPropCell); + (*@\\\0000000201*) + (*@/// HintCell *) + ExchangeItemCol(FromIndex,ToIndex,FHintCell); + (*@\\\*) + (*@/// Cells and Objects *) + for i:=0 to RowCount-1 do begin + s:=Cells[FromIndex,i]; + o:=Objects[FromIndex,i]; + Cells[FromIndex,i]:=Cells[ToIndex,i]; + Objects[FromIndex,i]:=Objects[ToIndex,i]; + Cells[ToIndex,i]:=s; + Objects[ToIndex,i]:=o; + end; + (*@\\\*) + if false then + else if col=FromIndex then col:=toIndex + else if col=toindex then col:=fromindex; + if reshow_edit then + showeditor; + end; +(*@\\\*) +(*@\\\0000000701*) +(*@/// Additional access methods for the cells property *) +(*@/// function TStringAlignGrid.GetCellAsDate(ACol,ARow:longint):TDateTime; *) +function TStringAlignGrid.GetCellAsDate(ACol,ARow:longint):TDateTime; +begin + result:=StrToDateTime(Cells[Acol,ARow]); + end; +(*@\\\000000030B*) +(*@/// procedure TStringAlignGrid.SetCellAsDate(ACol,ARow:longint; value:TDateTime); *) +procedure TStringAlignGrid.SetCellAsDate(ACol,ARow:longint; value:TDateTime); +begin + Cells[Acol,ARow]:=DateTimeToStr(value); + end; +(*@\\\000000032A*) +(*@/// function TStringAlignGrid.GetCellAsInt(ACol,ARow:longint):longint; *) +function TStringAlignGrid.GetCellAsInt(ACol,ARow:longint):longint; +var + s: string; +begin + s:=Cells[ACol,ARow]; + if s='' then + result:=0 + else + result:=strtoint(s); + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.SetCellAsInt(ACol,ARow:longint; value:longint); *) +procedure TStringAlignGrid.SetCellAsInt(ACol,ARow:longint; value:longint); +begin + Cells[ACol,ARow]:=inttostr(value); + end; +(*@\\\*) +(*@\\\0000000428*) + +(*@/// Utility methods for the fonts/brushs *) +(*@/// function TStringAlignGrid.GetFontColRowInternal(AColRow: longint; create:boolean; List:TList):TFont; *) +function TStringAlignGrid.GetFontColRowInternal(AColRow: longint; create:boolean; List:TList):TFont; +var + v: TCellProperties; +begin + v:=GetItemCol(AColRow,List); + if create then begin + if v=NIL then begin + v:=CellPropertiesClass.Create(self); + setitemcol(AColRow,list,v); + end; + if v.font=NIL then begin + v.f_font:=TMyFont.Create; + v.font.OnChange:=fontchanged; + v.font.assign(self.font); + TMyFont(v.font).haschanged:=false; + end; + end; + if (v=NIL) or (v.font=NIL) then + result:=self.Font + else + result:=v.font; + end; +(*@\\\0000000F15*) +(*@/// function TStringAlignGrid.GetFontCellInternal(ACol,ARow: longint; create:boolean):TFont; *) +function TStringAlignGrid.GetFontCellInternal(ACol,ARow: longint; create:boolean):TFont; +var + v: TCellProperties; +begin + v:=GetItemCell(ACol,ARow,FPropCell); + if create then begin + if v=NIL then begin + v:=CellPropertiesClass.Create(self); + setitemcell(ACol,ARow,FPropCell,v); + end; + if v.font=NIL then begin + v.f_font:=TMyFont.Create; + v.font.OnChange:=fontchanged; + v.font.assign(self.font); + TMyFont(v.font).haschanged:=false; + end; + end; + if (v=NIL) or (v.font=NIL) then begin + if is_fixed(ACol,ARow) then + result:=self.FFixedFont + else + result:=self.Font + end + else + result:=v.font; + end; +(*@\\\0000000F15*) +(*@/// function TStringAlignGrid.GetBrushColRowInternal(AColRow: longint; create:boolean; List:TList):TBrush; *) +function TStringAlignGrid.GetBrushColRowInternal(AColRow: longint; create:boolean; List:TList):TBrush; +var + v: TCellProperties; +begin + v:=GetItemCol(AColRow,List); + if create then begin + if v=NIL then begin + v:=CellPropertiesClass.Create(self); + setitemcol(AColRow,list,v); + end; + if v.brush=NIL then begin + v.f_brush:=TMybrush.Create; + v.brush.OnChange:=brushchanged; + v.brush.assign(self.brush); + TMyBrush(v.brush).haschanged:=false; + end; + end; + if (v=NIL) or (v.Brush=NIL) then + result:=self.Brush + else + result:=v.Brush; + end; +(*@\\\0000000F17*) +(*@/// function TStringAlignGrid.GetBrushCellInternal(ACol,ARow: longint; create:boolean):TBrush; *) +function TStringAlignGrid.GetBrushCellInternal(ACol,ARow: longint; create:boolean):TBrush; +var + v: TCellProperties; +begin + v:=GetItemCell(ACol,ARow,FPropCell); + if create then begin + if v=NIL then begin + v:=CellPropertiesClass.Create(self); + setitemcell(ACol,ARow,FPropCell,v); + end; + if v.brush=NIL then begin + v.f_brush:=TMybrush.Create; + v.brush.OnChange:=brushchanged; + v.brush.assign(self.brush); + TMyBrush(v.brush).haschanged:=false; + end; + end; + if (v=NIL) or (v.Brush=NIL) then begin + if is_fixed(ACol,ARow) then + result:=self.FFixedBrush + else + result:=self.Brush + end + else + result:=v.Brush; + end; +(*@\\\0000000F17*) + +{ The Font/Brush for the Cell through all levels (Cell, Col, Row, Grid) } +(*@/// function TStringAlignGrid.GetFontCellComplete(ACol,ARow: longint):TFont; *) +function TStringAlignGrid.GetFontCellComplete(ACol,ARow: longint):TFont; +var + v: TCellProperties; + fixed: boolean; +begin + v:=GetItemCell(ACol,ARow,FPropCell); + fixed:=is_fixed(ACol,ARow); + if (v=NIL) or (v.font=NIL) then begin + if fixed then begin + if Col_before_Row then + v:=GetItemCol(ACol,FFPropCol) + else + v:=GetItemCol(ACol,FFPropRow) + end + else begin + if Col_before_Row then + v:=GetItemCol(ACol,FPropCol) + else + v:=GetItemCol(ACol,FPropRow) + end; + if (v=NIL) or (v.font=NIL) then begin + if fixed then begin + if Col_before_Row then + v:=GetItemCol(ARow,FFPropRow) + else + v:=GetItemCol(ARow,FFPropCol) + end + else begin + if Col_before_Row then + v:=GetItemCol(ARow,FPropRow) + else + v:=GetItemCol(ARow,FPropCol) + end; + if (v=NIL) or (v.font=NIL) then begin + if fixed then + result:=self.FFixedFont + else + result:=self.Font + end + else + result:=v.font + end + else + result:=v.font + end + else + result:=v.font; + end; +(*@\\\0000003001*) +(*@/// function TStringAlignGrid.GetBrushCellComplete(ACol,ARow: longint):TBrush; *) +function TStringAlignGrid.GetBrushCellComplete(ACol,ARow: longint):TBrush; +var + v: TCellProperties; + fixed: boolean; +begin + v:=GetItemCell(ACol,ARow,FPropCell); + fixed:=is_fixed(ACol,ARow); + if (v=NIL) or (v.Brush=NIL) then begin + if fixed then begin + if Col_before_Row then + v:=GetItemCol(ACol,FFPropCol) + else + v:=GetItemCol(ACol,FFPropRow) + end + else begin + if Col_before_Row then + v:=GetItemCol(ACol,FPropCol) + else + v:=GetItemCol(ACol,FPropRow) + end; + if (v=NIL) or (v.Brush=NIL) then begin + if fixed then begin + if Col_before_Row then + v:=GetItemCol(ARow,FFPropRow) + else + v:=GetItemCol(ARow,FFPropCol) + end + else begin + if Col_before_Row then + v:=GetItemCol(ARow,FPropRow) + else + v:=GetItemCol(ARow,FPropCol) + end; + if (v=NIL) or (v.Brush=NIL) then begin + if fixed then + result:=self.FFixedBrush + else + result:=self.Brush + end + else + result:=v.Brush + end + else + result:=v.Brush + end + else + result:=v.Brush; + end; +(*@\\\0000001A01*) + +{ A callback to be sure the displayed font/brush is the same as the internal } +(*@/// procedure TStringAlignGrid.FontChanged(AFont: TObject); *) +procedure TStringAlignGrid.FontChanged(AFont: TObject); +begin + invalidate; + end; +(*@\\\0000000401*) +(*@/// procedure TStringAlignGrid.BrushChanged(ABrush: TObject); *) +procedure TStringAlignGrid.BrushChanged(ABrush: TObject); +begin + invalidate; + end; +(*@\\\*) + +(*@/// function TStringAlignGrid.FixedFontChanged:boolean; *) +function TStringAlignGrid.FixedFontChanged:boolean; +begin + result:=TMyFont(FFixedFont).HasChanged; + end; +(*@\\\0000000301*) +(*@\\\*) +(*@/// Utility methods for the cell-specific hints *) +(*@/// procedure TStringAlignGrid.ShowHintCell(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo); *) +procedure TStringAlignGrid.ShowHintCell(var HintStr: (*$ifdef shortstring*)string;(*$else*)ansistring;(*$endif*) + var CanShow: Boolean; var HintInfo: THintInfo); +var + col,row:longint; + HintPos:TRect; +begin + if (hintinfo.hintcontrol=self) and FShowCellHints then begin + self.mousetocell(hintinfo.cursorpos.x,hintinfo.cursorpos.y,col,row); + FHintCellLast:=Point(col,row); + hintpos:=self.Cellrect(col,row); + hintinfo.hintpos.x:=hintpos.left; + hintinfo.hintpos.y:=hintpos.bottom+6; + hintinfo.hintpos:=self.clienttoscreen(hintinfo.hintpos); + hintstr:=HintCell[col,row]; + if assigned(FOnShowHintCell) then + FOnShowHintCell(self,col,row,HintStr,CanShow,HintInfo); + end; + end; +(*@\\\000000101C*) +(*@/// procedure TStringAlignGrid.MouseMove(Shift: TShiftState; X, Y: Integer); *) +procedure TStringAlignGrid.MouseMove(Shift: TShiftState; X, Y: Integer); +var + col,row: longint; +begin + if (FHintCellLast.x>=0) and (FHintCellLast.y>=0) then begin + self.mousetocell(x,y,col,row); + if (col<>FHintCellLast.x) or (row<>FHintCellLast.y) then begin + Application.CancelHint; + FHintCellLast:=Point(-1,-1); + end; + end; + inherited MouseMove(Shift, X, Y); + end; +(*@\\\*) +(*$ifdef delphi_ge_3 *) +(*@/// procedure TStringAlignGrid.CMHintShow(var Message: THintMessage); *) +procedure TStringAlignGrid.CMHintShow(var Message: THintMessage); +var + canshow: boolean; +begin + ShowHintCell(message.HintInfo^.HintStr, canshow, message.HintInfo^); + if canshow then + message.result:=0 + else + message.result:=1; + end; +(*@\\\0000000901*) +(*$endif *) +(*@\\\*) +(*@/// The Inplace-Editor which also gets the alignment, font and color *) +{ The Inplace-Editor which also gets the alignment, font and color - + got the idea from James Sager's (jsager@ao.net) TIEAlignStringGrid - + see UNDU #19 (http://www.informant.com/undu) } + + +(*@/// function TStringAlignGrid.CreateEditor: TInplaceEdit; *) +function TStringAlignGrid.CreateEditor: TInplaceEdit; +begin + Result := TNewInplaceEdit.Create(Self); + TNewInplaceEdit(Result).Col:=-1; + TNewInplaceEdit(Result).Row:=-1; + end; +(*@\\\0000000401*) +(*@/// function TStringAlignGrid.CanEditShow: Boolean; *) +function TStringAlignGrid.CanEditShow: Boolean; +var + edit: TNewInplaceEdit; +begin + if (goAlwaysShowEditor in Options) and not Editormode then + Editormode:=true; + Result := inherited CanEditShow; + if (InplaceEditor<>nil) and (InplaceEditor is TNewInplaceEdit) then + edit:=TNewInplaceEdit(InplaceEditor) + else + edit:=NIL; + + { Cell has changed -> send OnAfterEdit for last cell } + if (edit<>NIL) and ((edit.Col<>Col) or (edit.Row<>Row)) then begin + if (edit.Col>=0) and (edit.Row>=0) then + postmessage(self.handle,cn_edit_exit,edit.Col,edit.Row); + edit.event:=false; + end; + + if not (csDesigning in ComponentState) then + result:=result and (EditCell[Col,Row] or FAlwaysEdit); + + if Result then begin + +(*$ifdef delphi_1 *) + { Set the color, font, alignment to the edit - since D2 done by inherited } + TNewInplaceEditor(InplaceEditor).UpdateContents; +(*$endif *) + + { If new edit is touched first time: save old text (for cancel) + and send the OnBeforeEdit event } + if (edit<>NIL) and (not edit.event) then begin + edit.event:=true; + self.perform(cn_edit_show,self.col,self.row); + edit.oldtext:=cells[col,row]; + end; + if (not f_selectall) and (edit<>NIL) then + edit.Deselect; + (* Hack: I may need to modify the position of inplaceedit, + but within grids.pas the move comes as the last command and like + always there's no virtual procedure to override to come after this + move - only a message comes after it. Not needed for combobox. *) + postmessage(self.handle,cn_edit_update,0,0); + end + else begin + { No edit allowed } + if edit<>NIL then begin + edit.Col:=-1; + edit.Row:=-1; + end; + EditorMode:=false; (* otherwise the grid thinks the editor is visible *) + end; + end; +(*@\\\0030001B01001C01*) + +(*@/// procedure TStringAlignGrid.ShowEdit; *) +procedure TStringAlignGrid.ShowEdit; +begin +{ if CellHasCombobox(Col,Row) then } +{ ShowCombobox } +{ else } + ShowEditor; + edit_visible:=true; + end; +(*@\\\0000000601*) +(*@/// procedure TStringAlignGrid.HideEdit(cancel:boolean); *) +procedure TStringAlignGrid.HideEdit(cancel:boolean); +var + msg: TMessage; +begin + edit_visible:=false; + if (InplaceEditor<>NIL) and InplaceEditor.visible then begin + if cancel then + SendMessage(InplaceEditor.handle,wm_char,vk_escape,0) + else begin + self.HideEditor; + msg.wparam:=col; + msg.lparam:=row; + self.mcn_edit_exit(msg); + end; + end; + end; +(*@\\\0000000607*) +(*@/// procedure TStringAlignGrid.KeyPress(var Key: Char); *) +procedure TStringAlignGrid.KeyPress(var Key: Char); +begin + if (key=#13) and f_edit_multi then + {} + else + inherited KeyPress(Key); + end; +(*@\\\0000000320*) + +{ Stuff needed to reimplement because of private or static stuff } + +(*@/// procedure TStringAlignGrid.WMLButtonDown(var Message: TMessage); *) +procedure TStringAlignGrid.WMLButtonDown(var Message: TMessage); +begin + inherited; + if InplaceEditor<>NIL then + TNewInplaceEdit(InplaceEditor).ClickTime := GetMessageTime; + end; +(*@\\\0000000505*) +(*@/// procedure TStringAlignGrid.CMFontChanged(var Message: TMessage); *) +procedure TStringAlignGrid.CMFontChanged(var Message: TMessage); +begin + inherited; (* will not honor the cellfont property *) + if InplaceEditor<>NIL then begin + TNewInplaceEdit(InplaceEditor).Font := GetFontCellComplete(Col,Row); + TNewInplaceEdit(InplaceEditor).BoundsChanged; + end; + end; +(*@\\\0000000624*) +(*@/// procedure TStringAlignGrid.WMCommand(var Message: TWMCommand); *) +procedure TStringAlignGrid.WMCommand(var Message: TWMCommand); +begin + with Message do begin + if (InplaceEditor <> nil) and (Ctl = InplaceEditor.Handle) then + case NotifyCode of + EN_CHANGE: UpdateText_; + end; + end; + end; +(*@\\\0000000614*) +(*@/// procedure TStringAlignGrid.UpdateText_; *) +procedure TStringAlignGrid.UpdateText_; +var + edit: TNewInplaceEdit; +begin + if (InplaceEditor<>NIL) and + (InplaceEditor is TNewInplaceEdit) then begin + edit:=TNewInplaceEdit(InplaceEditor); + if (edit.Col<>-1) and (edit.Row<>-1) then + edit.oldText:=Cells[edit.Col,edit.row] + end; + end; +(*@\\\0000000A09*) + +(*@/// procedure TStringAlignGrid.Update_Edit; *) +procedure TStringAlignGrid.Update_Edit; +begin + if InplaceEditor<>NIL then + TNewInplaceEdit(InplaceEditor).UpdateContents; + end; +(*@\\\0000000401*) + + +{ The stuff to get the editor's events right } + +(*@/// procedure TStringAlignGrid.doExit; *) +procedure TStringAlignGrid.doExit; +begin +{ if (InplaceEditor<>NIL) and (InplaceEditor.visible) then begin } + if (InplaceEditor<>NIL) and EditorMode then begin + f_reshow_edit:=true; + f_last_sel_pos:=InplaceEditor.SelStart; + f_last_sel_len:=InplaceEditor.SelLength; + hideedit(false); + end; +(* if the edit is still visible the contents of the cell *) +(* seems to be invalid, so just take back the focus *) + if self.edit_visible then + self.setfocus + else begin + inherited doexit; + EditorMode:=false; (* otherwise the grid thinks the editor is visible *) + end; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.DoEnter; *) +procedure TStringAlignGrid.DoEnter; +begin + inherited doenter; + if f_reshow_edit and (goAlwaysShowEditor in options) then begin + + { Showing the editor here directly comes too early, there are + other windows messages needed to be processed before, so I put + this at the end of the message queue. Ugly, but the only way I + could get this running. } + + postmessage(self.handle,cn_edit_toshow,0,0); + end; + end; +(*@\\\0000000B01*) +(*@/// procedure TStringAlignGrid.mcn_edit_return(var msg:TMessage); *) +procedure TStringAlignGrid.mcn_edit_return(var msg:TMessage); +var + ACol,ARow: longint; + ok: boolean; +begin + edit_visible:=false; + TNewInplaceEdit(InplaceEditor).event:=false; + if (msg.wparam>=0) and (msg.lparam>=0) then begin + ok:=true; + if assigned(f_on_validate) then + f_on_validate(self,msg.wparam,msg.lparam,ok); + if ok then begin + if assigned(f_on_after_edit) then + f_on_after_edit(self,msg.wparam,msg.lparam); + end + else begin + Col:=msg.wparam; + Row:=msg.lparam; + ShowEdit; + end; + end; + if f_nextcell and not edit_visible and + (msg.wparam>=0) and (msg.lparam>=0) then begin + ACol:=self.col; + ARow:=self.row; + self.NextEditableCell(ACol,ARow); + if (ACol>=0) and (ARow>=0) then begin + if InplaceEditor<>NIL then begin + TNewInplaceEdit(InplaceEditor).Col:=-1; + TNewInplaceEdit(InplaceEditor).Row:=-1; + end; + self.col:=ACol; + self.row:=ARow; + ShowEdit; + end; + end; + end; +(*@\\\0000000C01*) +(*@/// procedure TStringAlignGrid.mcn_edit_cancel(var msg:TMessage); *) +procedure TStringAlignGrid.mcn_edit_cancel(var msg:TMessage); +begin + edit_visible:=false; + TNewInplaceEdit(InplaceEditor).event:=false; + if assigned(f_on_cancel_edit) and + (msg.wparam>=0) and (msg.lparam>=0) then + f_on_cancel_edit(self,msg.wparam,msg.lparam); + end; +(*@\\\0000000401*) +(*@/// procedure TStringAlignGrid.mcn_edit_exit(var msg:TMessage); *) +procedure TStringAlignGrid.mcn_edit_exit(var msg:TMessage); +var + ok: boolean; +begin + edit_visible:=false; + TNewInplaceEdit(InplaceEditor).event:=false; + if (msg.wparam>=0) and (msg.lparam>=0) then begin + ok:=true; + if assigned(f_on_validate) then + f_on_validate(self,msg.wparam,msg.lparam,ok); + if ok then begin + if assigned(f_on_after_edit) then + f_on_after_edit(self,msg.wparam,msg.lparam); + end + else begin + Col:=msg.wparam; + Row:=msg.lparam; + ShowEdit; + end; + end; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.mcn_edit_show(var msg:TMessage); *) +procedure TStringAlignGrid.mcn_edit_show(var msg:TMessage); +begin + if assigned(f_on_before_edit) and + (msg.wparam>=0) and (msg.lparam>=0) then + f_on_before_edit(self,msg.wparam,msg.lparam); + edit_visible:=true; + end; +(*@\\\0000000601*) +(*@/// procedure TStringAlignGrid.mcn_edit_show_it(var msg:TMessage); *) +procedure TStringAlignGrid.mcn_edit_show_it(var msg:TMessage); +{ It's a hack, see DoEnter for more } +begin + showeditor; + if InplaceEditor<>NIL then begin + InplaceEditor.SelStart:=f_last_sel_pos; + InplaceEditor.SelLength:=f_last_sel_len; + end; + end; +(*@\\\0000000801*) +(*@/// procedure TStringAlignGrid.mcn_edit_update(var msg:TMessage); *) +procedure TStringAlignGrid.mcn_edit_update(var msg:TMessage); +begin + end; +(*@\\\0000000301*) +(*@\\\0000000701*) +(*@/// The stuff for reading and writing the data from/to the DFM file *) +(*@/// procedure TStringAlignGrid.DefineProperties(Filer: TFiler); *) +procedure TStringAlignGrid.DefineProperties(Filer: TFiler); +begin + inherited DefineProperties(Filer); + Filer.DefineProperty('HintCell', ReadHint, WriteHint, FSaveHint); + Filer.DefineProperty('Cells', ReadCells, WriteCells, FSaveCells); + + (* Always write these, only those non-empty entries will be written *) + Filer.DefineProperty('PropCell', ReadPropCell, WritePropCell, true); + Filer.DefineProperty('PropCol', ReadPropCol, WritePropCol, true); + Filer.DefineProperty('PropRow', ReadPropRow, WritePropRow, true); + Filer.DefineProperty('PropFixedCol', ReadPropFixedCol, WritePropFixedCol, true); + Filer.DefineProperty('PropFixedRow', ReadPropFixedRow, WritePropFixedRow, true); + + (* the following are only for compatibility, therefore only read *) + Filer.DefineBinaryProperty('AlignCell', ReadAlignCell, NIL, false); + Filer.DefineBinaryProperty('AlignCol', ReadAlignCol, NIL, false); + Filer.DefineBinaryProperty('FixedAlignCol', ReadFixedAlignCol, NIL, false); + Filer.DefineBinaryProperty('AlignRow', ReadAlignRow, NIL, false); + Filer.DefineBinaryProperty('FixedAlignRow', ReadFixedAlignRow, NIL, false); + Filer.DefineBinaryProperty('EditCell', ReadEditCell, NIL, false); + Filer.DefineBinaryProperty('EditCol', ReadEditCol, NIL, false); + Filer.DefineBinaryProperty('EditRow', ReadEditRow, NIL, false); + Filer.DefineProperty('FontCell', ReadFontCell, NIL, false); + Filer.DefineProperty('FontCol', ReadFontCol, NIL, false); + Filer.DefineProperty('FontFixedCol', ReadFixedFontCol, NIL, false); + Filer.DefineProperty('FontRow', ReadFontRow, NIL, false); + Filer.DefineProperty('FontFixedRow', ReadFixedFontRow, NIL, false); + Filer.DefineProperty('BrushCell', ReadBrushCell, NIL, false); + Filer.DefineProperty('BrushCol', ReadBrushCol, NIL, false); + Filer.DefineProperty('BrushFixedCol', ReadFixedBrushCol, NIL, false); + Filer.DefineProperty('BrushRow', ReadBrushRow, NIL, false); + Filer.DefineProperty('BrushFixedRow', ReadFixedBrushRow, NIL, false); + Filer.DefineProperty('ColorCell', ReadColorCell, NIL, false); + Filer.DefineProperty('ColorCol', ReadColorCol, NIL, false); + Filer.DefineProperty('ColorFixedCol', ReadFixedColorCol, NIL, false); + Filer.DefineProperty('ColorRow', ReadColorRow, NIL, false); + Filer.DefineProperty('ColorFixedRow', ReadFixedColorRow, NIL, false); + Filer.DefineProperty('SelectedColorCell', ReadSelColorCell, NIL, false); + Filer.DefineProperty('SelectedColorCol', ReadSelColorCol, NIL, false); + Filer.DefineProperty('SelectedColorRow', ReadSelColorRow, NIL, false); + end; +(*@\\\0000001601*) +(*@/// procedure TStringAlignGrid.Loaded; *) +procedure TStringAlignGrid.Loaded; +{ Fill the cell list into the original cells property after loading; + if in designing mode hold the internal list for the later writing } +var + i: longint; +begin + inherited Loaded; + if FCell<>NIL then begin + ListToCells(FCell); + if not (csDesigning in ComponentState) then begin + (*@/// FCell.Free; *) + for i:=FCell.Count-1 downto 0 do begin + cleanlist_pstring(TList(FCell.Items[i])); + TList(FCell.Items[i]).Free; + end; + FCell.Free; + FCell:=NIL; + (*@\\\0000000301*) + end; + end; + f_reshow_edit:=(goAlwaysShowEditor in options); + if f_reshow_edit and SelectEditText then + f_last_sel_len:=-1; + self.hideeditor; + end; +(*@\\\0000000B22*) + +(*@/// Read and write of the properties lists to the DFM *) +{ All the routines for the different property lists } +(*@/// procedure TStringAlignGrid.ReadpropCell(Reader: TReader); *) +procedure TStringAlignGrid.ReadpropCell(Reader: TReader); +begin + ReadpropCellInt(Reader,FpropCell); + end; +(*@\\\0000000303*) +(*@/// procedure TStringAlignGrid.ReadpropCol(Reader: TReader); *) +procedure TStringAlignGrid.ReadpropCol(Reader: TReader); +begin + ReadpropColRow(Reader,FpropCol); + end; +(*@\\\0000000303*) +(*@/// procedure TStringAlignGrid.ReadpropRow(Reader: TReader); *) +procedure TStringAlignGrid.ReadpropRow(Reader: TReader); +begin + ReadpropColRow(Reader,FpropRow); + end; +(*@\\\0000000303*) +(*@/// procedure TStringAlignGrid.ReadpropFixedCol(Reader: TReader); *) +procedure TStringAlignGrid.ReadpropFixedCol(Reader: TReader); +begin + ReadpropColRow(Reader,FFpropCol); + end; +(*@\\\0000000303*) +(*@/// procedure TStringAlignGrid.ReadpropFixedRow(Reader: TReader); *) +procedure TStringAlignGrid.ReadpropFixedRow(Reader: TReader); +begin + ReadpropColRow(Reader,FFpropRow); + end; +(*@\\\0000000303*) +(*@/// procedure TStringAlignGrid.WritepropCell(Writer: TWriter); *) +procedure TStringAlignGrid.WritepropCell(Writer: TWriter); +begin + WritepropCellInt(Writer,ColCount-1,RowCount-1,FpropCell); + end; +(*@\\\000000020A*) +(*@/// procedure TStringAlignGrid.WritepropCol(Writer: TWriter); *) +procedure TStringAlignGrid.WritepropCol(Writer: TWriter); +begin + WritepropColRow(Writer, ColCount-1, FpropCol); + end; +(*@\\\000000032F*) +(*@/// procedure TStringAlignGrid.WritepropRow(Writer: TWriter); *) +procedure TStringAlignGrid.WritepropRow(Writer: TWriter); +begin + WritepropColRow(Writer, RowCount-1, FpropRow); + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.WritepropFixedCol(Writer: TWriter); *) +procedure TStringAlignGrid.WritepropFixedCol(Writer: TWriter); +begin + WritepropColRow(Writer, ColCount-1, FFpropCol); + end; +(*@\\\0000000301*) +(*@/// procedure TStringAlignGrid.WritepropFixedRow(Writer: TWriter); *) +procedure TStringAlignGrid.WritepropFixedRow(Writer: TWriter); +begin + WritepropColRow(Writer, RowCount-1, FFpropRow); + end; +(*@\\\0000000301*) + +{ All the ReadCol, ReadRow are so similar, so these to routines are there + to avoid code-copy } +(*@/// function TStringAlignGrid.ReadpropCellInt(Reader: TReader; list:TList):boolean; *) +function TStringAlignGrid.ReadpropCellInt(Reader: TReader; list:TList):boolean; +var + ACol,ARow: word; + v:TCellProperties; +begin + result:=false; + Reader.ReadListBegin; + while not Reader.EndOfList do begin + ACol:=Reader.ReadInteger; + ARow:=Reader.ReadInteger; + v:=CellPropertiesClass.Create(self); + v.ReadFromReader(Reader,self); + v:=TCellProperties(SetItemCell(ACol,ARow,list,v)); + result:=true; + v.free; + end; + Reader.ReadListEnd; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.WritepropCellInt(Writer: TWriter; x,y:longint; list:TList); *) +procedure TStringAlignGrid.WritepropCellInt(Writer: TWriter; x,y:longint; list:TList); +var + v:pointer; + ACol,ARow: longint; +begin + Writer.WriteListBegin; + for ACol:=0 to x do begin + for ARow:=0 to y do begin + v:=GetItemCell(ACol,ARow,list); + if (v<>NIL) and not TCellProperties(v).isempty then begin + Writer.WriteInteger(ACol); + Writer.WriteInteger(ARow); + TCellProperties(v).WriteToWriter(Writer); + end; + end; + end; + Writer.WriteListEnd; + end; +(*@\\\*) +(*@/// function TStringAlignGrid.ReadpropColRow(Reader:TReader; list:TList):boolean; *) +function TStringAlignGrid.ReadpropColRow(Reader:TReader; list:TList):boolean; +var + AColRow: word; + v: TCellProperties; +begin + result:=false; + Reader.ReadListBegin; + while not Reader.EndOfList do begin + AColRow:=Reader.ReadInteger; + v:=CellPropertiesClass.Create(self); + v.ReadFromReader(Reader,self); + v:=TCellProperties(SetItemCol(AColRow, list, v)); + result:=true; + v.free; + end; + Reader.ReadListEnd; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.WritepropColRow(Writer:TWriter; count:longint; list:TList); *) +procedure TStringAlignGrid.WritepropColRow(Writer:TWriter; count:longint; list:TList); +var + AColRow: word; + v: pointer; +begin + Writer.WriteListBegin; + for AColRow:=0 to Count do begin + v:=GetItemCol(AColRow,List); + if (v<>NIL) and not TCellProperties(v).isempty then begin + Writer.WriteInteger(AColRow); + TCellProperties(v).WriteToWriter(Writer); + end; + end; + Writer.WriteListEnd; + end; +(*@\\\0000000933*) +(*@\\\*) + +(*@/// Read and write the hint strings to the DFM *) +{ The hint and the cell strings } +(*@/// procedure TStringAlignGrid.ReadHint(Reader: TReader); *) +procedure TStringAlignGrid.ReadHint(Reader: TReader); +var + ACol,ARow: longint; + v:pstring; +begin + Reader.ReadListBegin; + while not Reader.EndOfList do begin + ACol:=Reader.ReadInteger; + ARow:=Reader.ReadInteger; + v:=NewStr(Reader.ReadString); + v:=SetItemCell(ACol,ARow, FHintCell, v); + FSaveHint:=true; + if v<>NIL then + DisposeStr(v); + end; + Reader.ReadListEnd; + end; +(*@\\\0000000315*) +(*@/// procedure TStringAlignGrid.WriteHint(Writer: TWriter); *) +procedure TStringAlignGrid.WriteHint(Writer: TWriter); +var + v:pstring; + ACol,ARow: longint; +begin + Writer.WriteListBegin; + for ACol:=0 to ColCount-1 do begin + for ARow:=0 to RowCount-1 do begin + v:=GetItemCell(ACol,ARow,FHintCell); + if v<>NIL then begin + Writer.WriteInteger(ACol); + Writer.WriteInteger(ARow); + Writer.WriteString(v^); + end; + end; + end; + Writer.WriteListEnd; + end; +(*@\\\0000000A01*) +(*@\\\000000010A*) +(*@/// Read and write the cell strings to the DFM *) +(*@/// procedure TStringAlignGrid.ReadCells(Reader: TReader); *) +procedure TStringAlignGrid.ReadCells(Reader: TReader); +var + ACol,ARow: longint; + v:pstring; +begin + if FCell=NIL then FCell:=TList.Create; + Reader.ReadListBegin; + while not Reader.EndOfList do begin + ACol:=Reader.ReadInteger; + ARow:=Reader.ReadInteger; + v:=NewStr(Reader.ReadString); + v:=SetItemCell(ACol,ARow, FCell, v); + FSaveCells:=true; + if v<>NIL then + DisposeStr(v); + end; + Reader.ReadListEnd; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.WriteCells(Writer: TWriter); *) +procedure TStringAlignGrid.WriteCells(Writer: TWriter); +var + v:string; + ACol,ARow: longint; +begin + Writer.WriteListBegin; + for ACol:=0 to ColCount-1 do begin + for ARow:=0 to RowCount-1 do begin + v:=Cells[ACol,ARow]; + if v<>'' then begin + Writer.WriteInteger(ACol); + Writer.WriteInteger(ARow); + Writer.WriteString(v); + end; + end; + end; + Writer.WriteListEnd; + end; +(*@\\\0000000415*) + +{ To convert TStringGrid's own Cell property to my list and vice versa } +(*@/// procedure TStringAlignGrid.ListToCells(List:TList); *) +procedure TStringAlignGrid.ListToCells(List:TList); +var + v:pstring; + ACol, ARow: longint; +begin + for ACol:=0 to ColCount-1 do + for ARow:=0 to RowCount-1 do begin + v:=GetItemCell(ACol,ARow,List); + if v<>NIL then + Cells[ACol,ARow]:=v^ + else + Cells[ACol,ARow]:=''; + end; + end; +(*@\\\0000000416*) +(*@/// procedure TStringAlignGrid.CellsToList(var List:TList); *) +procedure TStringAlignGrid.CellsToList(var List:TList); +var + v:pstring; + ACol, ARow: longint; +begin + for ACol:=0 to ColCount-1 do + for ARow:=0 to RowCount-1 do begin + if cells[ACol,ARow]<>'' then begin + v:=NewStr(cells[ACol,ARow]); + end + else + v:=NIL; + v:=SetItemCell(ACol,ARow, List, v); + if v<>NIL then + DisposeStr(v); + end; + end; +(*@\\\*) +(*@\\\*) + +(*@/// Read several alignment lists to the DFM *) +{ All the routines for the several alignment lists } +(*@/// procedure TStringAlignGrid.ReadAlignCell(Stream: TStream); *) +procedure TStringAlignGrid.ReadAlignCell(Stream: TStream); +var + ACol,ARow: word; + p:tmyalign; +begin + Stream.Seek(0,0); + while Stream.Position rgb *) +function color2rgb(c:TColor):longint; +var + temp:longint; +begin + temp:=colortorgb(c); + result:=((temp and $ff) shl 16) or (temp and $ff00) or ((temp and $ff0000) shr 16); + end; +(*@\\\*) +(*@/// function point2size(v:integer):integer; *) +function point2size(v:integer):integer; +begin + case v of + 0..5: result:=1; + 6..9: result:=2; + 10 : result:=3; + 11..13: result:=4; + 14..17: result:=5; + 18..21: result:=6; + else result:=7; + end; + end; +(*@\\\*) +begin + if data<>NIL then + result:=data + else + result:=TMemorystream.Create; + addheader:=''; + if htmlborder>0 then + addheader:=addheader+' border='+inttostr(htmlborder); + if htmlcaption<>'' then + addheader:=addheader+' caption="'+text2html(htmlcaption)+'"'; + String2Stream(result,''#13#10); + for ARow:=0 to RowCount do begin + String2Stream(result,' '#13#10); + for ACol:=0 to ColCount do begin + if (AColcolor then + String2Stream(result,' bgcolor=#'+inttohex(color2rgb(c),6)); + String2Stream(result,'>'#13#10); + if cells[ACol,ARow]<>'' then begin + font:=GetFontCellComplete(ACol,ARow); + (*@/// if font.haschanged then write font data tags *) + if TMyFont(font).haschanged then begin + String2Stream(result,' '); + if fsBold in font.style then + String2Stream(result,''); + if fsItalic in font.style then + String2Stream(result,''); + if fsStrikeOut in font.style then + String2Stream(result,''); + if fsUnderline in font.style then + String2Stream(result,''); + end; + (*@\\\*) + String2Stream(result,text2html(cells[ACol,ARow])); + (*@/// if font.haschanged then close font data tags *) + if TMyFont(font).haschanged then begin + if fsUnderline in font.style then + String2Stream(result,''); + if fsStrikeOut in font.style then + String2Stream(result,''); + if fsItalic in font.style then + String2Stream(result,''); + if fsBold in font.style then + String2Stream(result,''); + String2Stream(result,''); + end; + (*@\\\*) + end; + if (ACol') + else + String2Stream(result,' '); + end; + String2Stream(result,' '#13#10); + end; + String2Stream(result,'
'#13#10); + end; +(*@\\\0000001001*) +(*@/// function TStringAlignGrid.Contents2CSV(data:TMemorystream; csv:char; range:TGridRect):TMemorystream; *) +function TStringAlignGrid.Contents2CSV(data:TMemorystream; csv:char; range:TGridRect):TMemorystream; +var + ACol,ARow: longint; + s: string; +begin + if data<>NIL then + result:=data + else + result:=TMemorystream.Create; + if (range.right=RowCount then RowCount:=RowCount+1; + ACol:=range.left; + s:=h.strings[i]+csv; + while (ACol<=range.right) and (length(s)>1) do begin + if ACol>=ColCount then ColCount:=ColCount+1; + if (not F_PasteEditableOnly) or EditCell[ACol,ARow] then + cells[ACol,ARow]:=copy(s,1,pos(csv,s)-1); + s:=copy(s,pos(csv,s)+1,length(s)); + inc(ACol); + end; + inc(ARow); + inc(i); + end; + finally + h.free; + end; + end; +(*@\\\0000001A01*) +(*@/// procedure TStringAlignGrid.SaveToFile(const filename:string); *) +procedure TStringAlignGrid.SaveToFile(const filename:string); +var + data: TMemoryStream; + rect: TGridRect; +begin + data:=NIL; + rect.left:=-1; + rect.right:=-1; + rect.top:=-1; + rect.bottom:=-1; + try + data:=Contents2CSV(data,#9,rect); + data.savetofile(filename); + finally + data.free; + end; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.LoadFromFile(const filename:string); *) +procedure TStringAlignGrid.LoadFromFile(const filename:string); +var + data: TFileStream; + rect: TGridRect; +begin + data:=NIL; + rect.left:=-1; + rect.right:=-1; + rect.top:=-1; + rect.bottom:=-1; + try + data:=TFileStream.Create(filename,fmOpenRead); + CSV2Contents(data,#9,rect); + finally + data.free; + end; + end; +(*@\\\0000000D19*) + +(*@/// procedure TStringAlignGrid.Contents2CSVClipboard(csv:char; range:TGridRect); *) +procedure TStringAlignGrid.Contents2CSVClipboard(csv:char; range:TGridRect); +var + h: TMemorystream; +begin + h:=NIL; + try + h:=TMemorystream.Create; + Contents2CSV(h,csv,range); + Stream2Clipboard(h,cf_text); + finally + h.free; + end; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.ClipboardCSV2Contents(csv:char; range:TGridRect); *) +procedure TStringAlignGrid.ClipboardCSV2Contents(csv:char; range:TGridRect); +var + h: TMemorystream; +begin + h:=NIL; + try + h:=TMemorystream.Create; + Clipboard2Stream(h,cf_text); + CSV2Contents(h,csv,range); + finally + h.free; + end; + end; +(*@\\\0000000801*) +(*@/// procedure TStringAlignGrid.Contents2HTMLClipboard; *) +procedure TStringAlignGrid.Contents2HTMLClipboard; +var + h: TMemorystream; +begin + h:=NIL; + try + h:=Contents2HTML(NIL); + Stream2Clipboard(h,cf_text); + finally + h.free; + end; + end; +(*@\\\0000000701*) + +(*@/// procedure TStringAlignGrid.CopyToClipboard; *) +procedure TStringAlignGrid.CopyToClipboard; +var + rect: TGridRect; +begin + rect.left:=-1; + rect.right:=-1; + rect.top:=-1; + rect.bottom:=-1; + Contents2CSVClipboard(#9,rect); + end; +(*@\\\0000000301*) +(*@/// procedure TStringAlignGrid.CopyFromClipboard; *) +procedure TStringAlignGrid.CopyFromClipboard; +var + rect: TGridRect; +begin + rect.left:=-1; + rect.right:=-1; + rect.top:=-1; + rect.bottom:=-1; + ClipboardCSV2Contents(#9,rect); + end; +(*@\\\0000000901*) + +(*@/// procedure TStringAlignGrid.WMCut(var Message: TMessage); *) +procedure TStringAlignGrid.WMCut(var Message: TMessage); +var + range: TGridRect; + ACol,ARow: longint; +begin + if f_cutnpaste then begin + range:=Selection; + if (range.rightk then begin + if ByColumn then + ExchangeRow(k,i) + else + ExchangeCol(k,i); + end; + end; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.DoSortQuick(ColRow,Min,Max: longint; ..) *) +procedure TStringAlignGrid.DoSortQuick(ColRow,Min,Max: longint; ByColumn,ascending: boolean); +(* Adopted from Delphi Magazine 37 - "Don Alfresco" Julian M Bucknall *) +var + comp: t_relation; + aLessThan: TCompareFunction; +(*@/// function Partition(L, R : longint): longint; *) +function Partition(L, R : longint): longint; +var + i, j : longint; +begin + i := L; + j := pred(R); + while true do begin + while aLessThan(self,colrow,i,R)=comp do + inc(i); + while aLessThan(self,colrow,R,j)=comp do begin + if (j = L) then + BREAK; + dec(j); + end; + if (i >= j) then + BREAK; + if ByColumn then + ExchangeRow(i,j) + else + ExchangeCol(i,j); + inc(i); + dec(j); + end; + if ByColumn then + ExchangeRow(i,R) + else + ExchangeCol(i,R); + Result := i; + end; +(*@\\\*) +(*@/// procedure QuickSortPrim(L, R : longint); *) +procedure QuickSortPrim(L, R : longint); +var + DividingItem : longint; +begin + if (R - L) <= 0 then + EXIT; + DividingItem := Partition(L, R); + QuicksortPrim(L, pred(DividingItem)); + QuicksortPrim(succ(DividingItem), R); + end; +(*@\\\0000000501*) +begin + if ascending then + comp:=rel_less + else + comp:=rel_greater; + if ByColumn then + aLessThan:=f_compare_col + else + aLessThan:=f_compare_row; + QuicksortPrim(Min,Max); + end; +(*@\\\0000000201*) + +{ Some ready-made sorting functions } +(*@/// function TStringAlignGrid.CompareColString(Sender: TObject; Column, Row1,Row2: longint):t_relation; *) +function TStringAlignGrid.CompareColString(Sender: TObject; Column, Row1,Row2: longint):t_relation; +begin + if false then + else if Cells[Column,Row1]Cells[Column,Row2] then + result:=rel_greater + else + result:=rel_equal; + end; +(*@\\\0000000916*) +(*@/// function TStringAlignGrid.CompareRowString(Sender: TObject; RowNr, Col1,Col2: longint):t_relation; *) +function TStringAlignGrid.CompareRowString(Sender: TObject; RowNr, Col1,Col2: longint):t_relation; +begin + if false then + else if Cells[Col1,RowNr]Cells[Col2,RowNr] then + result:=rel_greater + else + result:=rel_equal; + end; +(*@\\\0000000916*) +(*@/// function TStringAlignGrid.CompareColInteger(Sender: TObject; Column, Row1,Row2: longint):t_relation; *) +function TStringAlignGrid.CompareColInteger(Sender: TObject; Column, Row1,Row2: longint):t_relation; +var + v1,v2: longint; +begin + try + v1:=strtoint(Cells[Column,Row1]); + except + v1:=0; + end; + try + v2:=strtoint(Cells[Column,Row2]); + except + v2:=0; + end; + if false then + else if v1=v2 then + result:=rel_equal + else if v1>v2 then + result:=rel_greater + else + result:=rel_less; + end; +(*@\\\0000000801*) +(*@/// function TStringAlignGrid.CompareRowInteger(Sender: TObject; RowNr, Col1,Col2: longint):t_relation; *) +function TStringAlignGrid.CompareRowInteger(Sender: TObject; RowNr, Col1,Col2: longint):t_relation; +var + v1,v2: longint; +begin + try + v1:=strtoint(Cells[Col1,RowNr]); + except + v1:=0; + end; + try + v2:=strtoint(Cells[Col2,RowNr]); + except + v2:=0; + end; + if false then + else if v1=v2 then + result:=rel_equal + else if v1>v2 then + result:=rel_greater + else + result:=rel_less; + end; +(*@\\\*) + +{ The procedures for the user to call } +(*@/// procedure TStringAlignGrid.SortColumn(Column: longint; Ascending:boolean); *) +procedure TStringAlignGrid.SortColumn(Column: longint; Ascending:boolean); +begin + if not assigned(f_compare_col) then EXIT; + fSortMethod(Column,FixedRows,RowCount-1,true,Ascending); + end; +(*@\\\000000040E*) +(*@/// procedure TStringAlignGrid.SortRow(RowNumber: longint; Ascending:boolean); *) +procedure TStringAlignGrid.SortRow(RowNumber: longint; Ascending:boolean); +begin + if not assigned(f_compare_row) then EXIT; + fSortMethod(RowNumber,FixedCols,ColCount-1,false,Ascending); + end; +(*@\\\0000000401*) +(*@\\\0000000301*) +(*@/// Miscellaneous stuff *) +(*@/// procedure TStringAlignGrid.ClearSelection; *) +procedure TStringAlignGrid.ClearSelection; +var + t: TGridRect; +begin + t.left:=-1; + t.right:=-1; + t.top:=-1; + t.bottom:=-1; + self.selection:=t; + end; +(*@\\\*) +(*@/// function TStringAlignGrid.is_fixed(ACol,ARow: longint):boolean; *) +function TStringAlignGrid.is_fixed(ACol,ARow: longint):boolean; +begin + result:= (AColColCount) or (RowNo<>RowCount); + if (ACol=FCol) and (ARow=FRow) then BREAK; (* to avoid dead loop *) + if (ACol=-1) and (ARow=-1) then + BREAK; (* add a new line ? jump to start ? or stay in cell ? *) + until EditCell[ACol,ARow] + end; +(*@\\\0000001105*) +(*@/// procedure TStringAlignGrid.NextCell(direction:t_nextcell; ..); *) +procedure TStringAlignGrid.NextCell(direction:t_nextcell; + LastCellBehaviour: t_lastcell; Var ACol,ARow:longint); +var +(*$ifdef delphi_ge_3 *) + f: tcustomform; +(*$else *) + f: tform; +(*$endif *) +begin + case direction of + (*@/// nc_rightdown: *) + nc_rightdown: begin + inc(ACol); + if ACol>=ColCount then begin + ACol:=FixedCols; + inc(ARow); + end; + if ARow>=RowCount then begin + ACol:=-1; + ARow:=-1; + end; + end; + (*@\\\*) + (*@/// nc_rightup: *) + nc_rightup: begin + inc(ACol); + if ACol>=ColCount then begin + ACol:=FixedCols; + dec(ARow); + end; + if ARow=RowCount then begin + ACol:=-1; + ARow:=-1; + end; + end; + (*@\\\*) + (*@/// nc_leftup: *) + nc_leftup: begin + dec(ACol); + if ACol=RowCount then begin + ARow:=FixedRows; + inc(ACol); + end; + if ACol>=ColCount then begin + ACol:=-1; + ARow:=-1; + end; + end; + (*@\\\*) + (*@/// nc_downleft: *) + nc_downleft: begin + inc(ARow); + if ARow>=RowCount then begin + ARow:=FixedRows; + dec(ACol); + end; + if ACol=ColCount then begin + ACol:=-1; + ARow:=-1; + end; + end; + (*@\\\*) + end; + if (ACol=-1) and (ARow=-1) then + case LastCellBehaviour of + (*@/// lc_first: *) + lc_first: + case direction of + nc_rightdown, + nc_downright: begin ACol:=FixedCols; ARow:=FixedRows; end; + nc_rightup, + nc_upright: begin ACol:=FixedCols; ARow:=RowCount-1; end; + nc_leftdown, + nc_downleft: begin ACol:=ColCount-1; ARow:=FixedRows; end; + nc_leftup, + nc_upleft: begin ACol:=ColCount-1; ARow:=RowCount-1; end; + end; + (*@\\\*) + lc_stop: ; + (*@/// lc_newcolrow: *) + lc_newcolrow: + case direction of + (*@/// nc_rightdown: *) + nc_rightdown: begin + insertrow(RowCount); + ARow:=Rowcount-1; + ACol:=FixedCols; + end; + (*@\\\*) + (*@/// nc_leftdown: *) + nc_leftdown: begin + insertrow(RowCount); + ARow:=Rowcount-1; + ACol:=ColCount-1; + end; + (*@\\\*) + (*@/// nc_rightup: *) + nc_rightup: begin + insertrow(FixedRows); + ARow:=FixedRows; + ACol:=FixedCols; + end; + (*@\\\*) + (*@/// nc_leftup: *) + nc_leftup: begin + insertrow(FixedRows); + ARow:=FixedRows; + ACol:=ColCount-1; + end; + (*@\\\*) + (*@/// nc_downright: *) + nc_downright: begin + insertcol(ColCount); + ARow:=FixedRows; + ACol:=Colcount-1; + end; + (*@\\\*) + (*@/// nc_downleft: *) + nc_downleft: begin + insertcol(FixedCols); + ARow:=FixedRows; + ACol:=FixedCols; + end; + (*@\\\*) + (*@/// nc_upright: *) + nc_upright: begin + insertcol(ColCount); + ARow:=RowCount-1; + ACol:=ColCount-1; + end; + (*@\\\*) + (*@/// nc_upleft: *) + nc_upleft: begin + insertcol(FixedCols); + ARow:=RowCount-1; + ACol:=FixedCols; + end; + (*@\\\*) + end; + (*@\\\*) + (*@/// lc_exit: *) + lc_exit: begin + f:=GetParentForm(self); + if f<>NIL then + f.Perform(wm_nextdlgctl,0,0); + end; + (*@\\\0000000108*) + end; + end; +(*@\\\0000001901*) +(*@/// procedure TStringAlignGrid.WMChar(var Msg: TWMChar); *) +procedure TStringAlignGrid.WMChar(var Msg: TWMChar); +begin + if (goEditing in Options) and (Char(Msg.CharCode) in [^H, #32..#255]) then begin + ShowEditorChar(Char(Msg.CharCode)); + if not Editormode then begin + { This is what an inherited inherited would have done if Object Pascal + would allow it } + if not DoKeyPress(Msg) then + { no further inherited } ; + end + end + else + inherited; +end; +(*@\\\0000000401*) +(*@/// procedure TStringAlignGrid.KeyDown(var Key: Word; Shift: TShiftState); *) +procedure TStringAlignGrid.KeyDown(var Key: Word; Shift: TShiftState); +var + ACol,ARow: longint; + FCol,FRow: longint; + direction: T_nextcell; +{ ColNo, RowNo: longint; } +{ newline: boolean; } +(*@/// procedure CopyToClipboard; *) +procedure CopyToClipboard; +begin + SendMessage(Handle, WM_COPY, 0, 0); + end; +(*@\\\000000010B*) +(*@/// procedure CutToClipboard; *) +procedure CutToClipboard; +begin + SendMessage(Handle, WM_CUT, 0, 0); + end; +(*@\\\000000010B*) +(*@/// procedure PasteFromClipboard; *) +procedure PasteFromClipboard; +begin + SendMessage(Handle, WM_PASTE, 0, 0); + end; +(*@\\\000000010B*) +begin + case Key of + (*@/// VK_INSERT: *) + VK_INSERT: + if ssShift in Shift then + PasteFromClipBoard + else if ssCtrl in Shift then + CopyToClipBoard; + (*@\\\0000000301*) + (*@/// VK_DELETE: *) + VK_DELETE: + if ssShift in Shift then + CutToClipBoard; + (*@\\\*) +{ ^X: CutToClipBoard; } +{ ^C: CopyToClipBoard; } +{ ^V: PasteFromClipBoard; } + (*@/// VK_TAB: *) + VK_TAB: + if not (ssAlt in Shift) then begin + ACol:=Col; ARow:=Row; + FCol:=Col; FRow:=Row; + { ColNo:=ColCount; RowNo:=RowCount; } + { newline:=false; } + direction:=f_nextcell_tab; + (*@/// if ssShift in Shift then invert direction *) + if ssShift in Shift then + case direction of + nc_rightdown: direction:=nc_leftup; + nc_rightup: direction:=nc_leftdown; + nc_leftdown: direction:=nc_rightup; + nc_leftup: direction:=nc_rightdown; + nc_downright: direction:=nc_upleft; + nc_downleft: direction:=nc_upright; + nc_upleft: direction:=nc_downright; + nc_upright: direction:=nc_downleft; + end; + (*@\\\*) + repeat + { if newline then } + { BREAK; } + NextCell(direction,f_lastcell_tab,ACol,ARow); + { newline:=(ColNo<>ColCount) or (RowNo<>RowCount); } + if (ACol=FCol) and (ARow=FRow) then BREAK; (* to avoid dead loop *) + if (ACol=-1) and (ARow=-1) then begin + ACol:=FCol; + ARow:=FRow; + BREAK; (* add a new line ? jump to start ? or stay in cell ? *) + end; + until TabStops[ACol]; + Col:=ACol; Row:=ARow; (* why is Focuscell private? *) + key:=0; (* to avoid inherited making nonsense *) + end; + (*@\\\0000001705*) + end; + inherited KeyDown(Key, Shift); + end; +(*@\\\0000001001*) +(*@/// procedure TStringAlignGrid.MouseDown(Button:TMouseButton; Shift:TShiftState; X,Y:Integer); *) +procedure TStringAlignGrid.MouseDown(Button:TMouseButton; Shift:TShiftState; X,Y:Integer); +var + ACol,ARow: longint; + r: TRect; +begin + if ((x>=0) or (y>=0)) and (button=mbLeft) then begin + mousetocell(x,y,ACol,ARow); + if false then + else if (ACol=r.left) and (x<=r.right) and (y>=r.top) and (y<=r.bottom) then begin + Col:=ACol; + Row:=ARow; + ShowEditor; + end; + end; + end; + inherited MouseDown(Button,Shift,X,Y); + end; +(*@\\\000000140D*) + +(*@/// procedure TStringAlignGrid.ColWidthsChanged; *) +procedure TStringAlignGrid.ColWidthsChanged; +begin + inherited ColWidthsChanged; + if assigned(fwidthschanged) then fwidthschanged(self); + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.RowHeightsChanged; *) +procedure TStringAlignGrid.RowHeightsChanged; +begin + inherited RowHeightsChanged; + if assigned(fheightschanged) then fheightschanged(self); + end; +(*@\\\*) + +(*@/// procedure TStringAlignGrid.AdjustRowHeight(ARow:longint); *) +procedure TStringAlignGrid.AdjustRowHeight(ARow:longint); +var + h: longint; + ACol: longint; +begin + if ARow>=RowCount then EXIT; + h:=0; + for ACol:=ColCount-1 downto 0 do begin + h:=max(h,textheight(ACol,ARow)); + end; + RowHeights[ARow]:=h; + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.AdjustColWidth(ACol:longint); *) +procedure TStringAlignGrid.AdjustColWidth(ACol:longint); +var + h: longint; + ARow: longint; +begin + if ACol>=ColCount then EXIT; + h:=0; + for ARow:=RowCount-1 downto 0 do begin + h:=max(h,textwidth(ACol,ARow)); + end; + ColWidths[ACol]:=h; + end; +(*@\\\0000000B03*) +(*@/// procedure TStringAlignGrid.AdjustRowHeights; *) +procedure TStringAlignGrid.AdjustRowHeights; +var + ARow: longint; +begin + for ARow:=RowCount-1 downto 0 do + AdjustRowHeight(ARow); + end; +(*@\\\000000012C*) +(*@/// procedure TStringAlignGrid.AdjustColWidths; *) +procedure TStringAlignGrid.AdjustColWidths; +var + ACol: longint; +begin + for ACol:=ColCount-1 downto 0 do + AdjustColWidth(ACol); + end; +(*@\\\*) + +{ Suggested by Olav Lindkjolen } +(*@/// procedure TStringAlignGrid.AdjustLastCol; *) +procedure TStringAlignGrid.AdjustLastCol; +var + x,w,c: longint; +begin + w:=0; + for x:=0 to (ColCount-2) do + w:= w+ColWidths[x]; + if (goVertLine in Options) or (goFixedVertLine in Options) then + c:=ColCount*GridLineWidth + else + c:=0; + if (w FAutoAdjustLastCol) then + FAutoAdjustLastCol := Value; + if FAutoAdjustLastCol then + AdjustLastCol; + end; +(*@\\\0000000501*) +(*@/// procedure TStringAlignGrid.SetGridLineWidthNew(Value: Integer); *) +procedure TStringAlignGrid.SetGridLineWidthNew(Value: Integer); +begin + if GridLineWidth<>value then begin + inherited GridLineWidth:=value; + if FAutoAdjustLastCol then + AdjustLastCol; + end; + end; +(*@\\\0000000201*) +(*@/// procedure TStringAlignGrid.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); *) +procedure TStringAlignGrid.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + inherited MouseUp(Button, Shift, X, Y); + if FAutoAdjustLastCol then + AdjustLastCol; + end; +(*@\\\0000000503*) +(*@/// procedure TStringAlignGrid.WMSize(var Msg: TWMSize); *) +procedure TStringAlignGrid.WMSize(var Msg: TWMSize); +begin + inherited; + if FAutoAdjustLastCol then + AdjustLastCol; + end; +(*@\\\0000000401*) + +{ Suggested by Marian Meier } +(*@/// function TStringAlignGrid.GetTotalWidth:Longint; *) +function TStringAlignGrid.GetTotalWidth:Longint; +var + i:Longint; +begin + Result:=0; + if BorderStyle=bsSingle then + inc(Result); + if Ctl3D then + inc(Result); + for i:=0 to ColCount-1 do + Result:=Result+ColWidths[i]; + end; +(*@\\\*) +(*@/// function TStringAlignGrid.GetTotalHeight:Longint; *) +function TStringAlignGrid.GetTotalHeight:Longint; +var + i:Longint; +begin + Result:=0; + if BorderStyle=bsSingle then + inc(Result); + if Ctl3D then + inc(Result); + for i:=0 to RowCount-1 do + Result:=Result+RowHeights[i]; + end; +(*@\\\*) + +(*@/// procedure TStringAlignGrid.TopLeftChanged; *) +procedure TStringAlignGrid.TopLeftChanged; +begin + inherited TopLeftChanged; + if EditorMode then + postmessage(self.handle,cn_edit_update,0,0); + if f_doaltcolcolor or f_doaltrowcolor then + invalidate; + end; +(*@\\\000000052B*) + +(*@/// procedure TStringAlignGrid.SetDrawselect(value: boolean); *) +procedure TStringAlignGrid.SetDrawselect(value: boolean); +begin + f_drawselect:=value; + invalidate; + end; +(*@\\\*) +(*@\\\0000001C2A*) +(*@/// Allow the scrollbar to act immidiatly *) +(* Idea taken from "The Delphi Magazine", Issue 40, December 1998, pg. 59 *) +(*@/// procedure TStringAlignGrid.WMHScroll(var Msg:TWMHScroll); *) +procedure TStringAlignGrid.WMHScroll(var Msg:TWMHScroll); +begin + inherited; + if f_dyn_scroll and (msg.scrollcode=sb_thumbtrack) then + perform(wm_hscroll, makelong(sb_thumbposition, msg.pos), msg.scrollbar); + end; +(*@\\\0000000301*) +(*@/// procedure TStringAlignGrid.WMVScroll(var Msg:TWMVScroll); *) +procedure TStringAlignGrid.WMVScroll(var Msg:TWMVScroll); +begin + inherited; + if f_dyn_scroll and (msg.scrollcode=sb_thumbtrack) then + perform(wm_vscroll, makelong(sb_thumbposition, msg.pos), msg.scrollbar); + end; +(*@\\\0000000501*) + +(*@/// function TStringAlignGrid.VerticalScrollBarVisible: boolean; *) +function TStringAlignGrid.VerticalScrollBarVisible: boolean; +begin + result:=ScrollBarVisible(self,true); + end; +(*@\\\0000000301*) +(*@/// function TStringAlignGrid.HorizontalScrollBarVisible: boolean; *) +function TStringAlignGrid.HorizontalScrollBarVisible: boolean; +begin + result:=ScrollBarVisible(self,false); + end; +(*@\\\*) +(*@\\\*) + +(*@/// Comboboxes *) +(*@/// ! function TStringAlignGrid.CellHasCombobox(ACol,ARow:longint):boolean; *) +function TStringAlignGrid.CellHasCombobox(ACol,ARow:longint):boolean; +begin +{ result:=(ACol+ARow) mod 3 =0; } + result:=false; + end; +(*@\\\0002000411000411*) +(*@\\\4000000148000148*) + +(*@/// The real action - the draw of a cell *) +{ the draw of a cell, is called from the Paint Method of TCustomGrid } + +(*@/// procedure TStringAlignGrid.DrawCellBack(ACol, ARow: Longint; var ARect: TRect; *) +procedure TStringAlignGrid.DrawCellBack(ACol, ARow: Longint; var ARect: TRect; + AState: TGridDrawState); +var + TopColor, BottomColor: TColor; +(*@/// procedure AdjustColors(Bevel: TPanelBevel); *) +procedure AdjustColors(Bevel: TPanelBevel); +begin + TopColor := clBtnHighlight; + if Bevel = bvLowered then TopColor := clBtnShadow; + BottomColor := clBtnShadow; + if Bevel = bvLowered then BottomColor := clBtnHighlight; + end; +(*@\\\0000000401*) +begin + self.canvas.font:=GetFontCellComplete(ACol,ARow); + self.canvas.brush:=GetBrushCellComplete(ACol,ARow); + Arect:=Arect; + + if f_drawselect and ((gdSelected in AState) and (not (gdFocused in AState) or + ([goDrawFocusSelected, goRowSelect] * Options <> []))) then begin + self.canvas.brush.color:=SelectedColorCell[Acol,ARow]; + self.canvas.font.color:=SelectedFontColorCell[Acol,ARow]; + end; + + if DefaultDrawing then begin + self.canvas.fillrect(Arect); + if gdFixed in Astate then begin + if not (goFixedVertLine in Options) then + inc(Arect.Bottom,GridLineWidth); + if not (goFixedHorzLine in Options) then + inc(Arect.Right,GridLineWidth); + end + else begin + if not (goVertLine in Options) then + inc(Arect.Bottom,GridLineWidth); + if not (goHorzLine in Options) then + inc(Arect.Right,GridLineWidth); + end; + + SetBkMode(Canvas.Handle,transparent); + end; + end; +(*@\\\0000000715*) +(*@/// procedure TStringAlignGrid.DrawCellCombo(ACol, ARow: Longint; var ARect: TRect; *) +procedure TStringAlignGrid.DrawCellCombo(ACol, ARow: Longint; var ARect: TRect; + AState: TGridDrawState); +var + h,w,l: integer; + r: TRect; + active: boolean; +begin + r:=rect(ARect.Right-ComboDropDownWidth,ARect.Top,ARect.right,ARect.bottom); + Canvas.Brush.Color:=clBtnFace; + Canvas.FillRect(r); + Frame3D(self.Canvas,R,cl3dLight,cl3dDkShadow,1); + Frame3D(self.Canvas,R,clBtnHighlight,clBtnShadow,1); + h:=(ARect.bottom-ARect.top) div 2; + w:=(ComboDropDownWidth div 2); + l:=ARect.Right-ComboDropDownWidth; + active:=self.enabled and EditCell[ACol,ARow]; + if active then begin + Canvas.Brush.Color:=clBtnText; + Canvas.Pen.Color:=clBtnText; + end + else begin + Canvas.Brush.Color:=clBtnHighlight; + Canvas.Pen.Color:=clBtnHighlight; + Canvas.PolyGon([Point(l+w-4+2,ARect.Top+h-2+1), + Point(l+w+2+2,ARect.Top+h-2+1), + Point(l+w-1+2,ARect.Top+h+1+1)]); + Canvas.Brush.Color:=clBtnShadow; + Canvas.Pen.Color:=clBtnShadow; + end; + Canvas.PolyGon([Point(l+w-4,ARect.Top+h-2), + Point(l+w+2,ARect.Top+h-2), + Point(l+w-1,ARect.Top+h+1)]); + Dec(ARect.right,ComboDropDownWidth); + + end; +(*@\\\*) +(*@/// procedure TStringAlignGrid.DrawCellText(ACol, ARow: Longint; var ARect: TRect; *) +procedure TStringAlignGrid.DrawCellText(ACol, ARow: Longint; var ARect: TRect; + AState: TGridDrawState); +var + s: string; + flags: integer; + _align: TMyAlign; + _wordwrap: T_Wordwrap; +begin + if DefaultDrawing then begin + _align:=AlignCell[ACol,ARow]; + _wordwrap:=WordWrapCell[ACol,ARow]; + if assigned(f_ondrawcellpar) then + f_ondrawcellpar(self,ACol,ARow,_align,_wordwrap); + + s:=Cells[ACol, ARow]+#0; + InflateRect(Arect,-2,-2); + flags:=0; + case _align of + alLeft, + alDefault:flags:=dt_left; + alCenter: flags:=dt_center; + alRight: flags:=dt_Right; + end; + case _wordwrap of + ww_Wordwrap: flags:=flags or dt_wordbreak; + ww_Ellipsis: flags:=flags or dt_end_ellipsis; + ww_default : ; + end; + flags:=flags or dt_noprefix; + + DrawText(canvas.handle,PChar(@s[1]),length(s)-1,Arect,flags); + end; + end; +(*@\\\0000002107*) +(*@/// procedure TStringAlignGrid.DrawCell(ACol, ARow: Longint; ARect: TRect; *) +procedure TStringAlignGrid.DrawCell(ACol, ARow: Longint; ARect: TRect; + AState: TGridDrawState); +var + temp: TDrawCellEvent; +begin + if (not (gdFixed in AState)) and CellHasCombobox(ACol,ARow) then + DrawCellCombo(ACol,ARow,ARect,AState); + { The Defaultdrawing is parsed in there } + DrawCellBack(ACol,ARow,ARect,AState); + DrawCellText(ACol,ARow,ARect,AState); + { Delphi 1 doesn't understand a Assigned(OnDrawCell), but this way it + works with all versions } + temp:=OnDrawCell; + if Assigned(temp) then OnDrawCell(Self, ACol, ARow, ARect, AState); + end; +(*@\\\0000000623*) + +(*@/// procedure TStringAlignGrid.CalcTextSize(ACol,ARow:longint; var Width,height: integer); *) +procedure TStringAlignGrid.CalcTextSize(ACol,ARow:longint; var Width,height: integer); +const + min_width = 4; + min_height = 4; +var + s: string; + flags: integer; + ARect: TRect; +begin + self.canvas.font:=GetFontCellComplete(ACol,ARow); + s:=Cells[ACol, ARow]+#0; + Arect:=rect(0,0,0,0); + flags:=dt_noprefix or dt_calcrect or dt_right; + DrawText(canvas.handle,PChar(@s[1]),length(s)-1,ARect,flags); + height:=ARect.bottom-Arect.top+min_height; + if height<=min_height then + height:=0; + width:=Arect.right-Arect.left+min_width; + if width<=min_width then + width:=0; + end; +(*@\\\0000000501*) +(*@/// function TStringAlignGrid.textheight(ACol,ARow:longint):integer; *) +function TStringAlignGrid.textheight(ACol,ARow:longint):integer; +var + w: integer; +begin + CalcTextSize(ACol,ARow,w,result); + end; +(*@\\\000000030D*) +(*@/// function TStringAlignGrid.textwidth(ACol,ARow:longint):integer; *) +function TStringAlignGrid.textwidth(ACol,ARow:longint):integer; +var + h: integer; +begin + CalcTextSize(ACol,ARow,result,h); + end; +(*@\\\000000050D*) + +(*@/// procedure TStringAlignGrid.Paint; *) +procedure TStringAlignGrid.Paint; +var + R: TRect; +begin + inherited Paint; + if DefaultDrawing and not (csDesigning in ComponentState) and + (ValidParentForm(Self).ActiveControl = Self) and + ([goEditing, goAlwaysShowEditor] * Options <> + [goEditing, goAlwaysShowEditor]) + and (not (goRowSelect in Options)) + and CellHasCombobox(Col,Row) then begin + r:=CellRect(Col,Row); + DrawFocusRect(Canvas.Handle,r); + dec(r.right,ComboDropDownWidth); + DrawFocusRect(Canvas.Handle,r); + end; + end; +(*@\\\0000000F01*) +(*@\\\0000000301*) +(*@\\\0000002001*) +(*@\\\0000001401*) +(*$ifdef delphi_ge_2 *) (*$warnings off *) (*$endif *) +end. + +(*@/// Benutzte Routinen/properties von InplaceEdit *) +Benutzte Routinen/properties von InplaceEdit + +ok Create, Free +ok FClickTime -> WMLButtonDown berschreiben und nochmal implementieren +ok UpdateContents -> Callback ans Grid? +ok SetGrid -> unntig, parent macht dasselbe +ok UpdateLoc,Move,Hide -> WMPosChanged! +ok Font -> CMFontChanged +ok Text -> UpdateText_ +ok SelectAll, Deselect -> EMSetSel + PostMessage(wm_char) -> einfach weiterreichen + +grid.wmkillfocus: focused(inplacedit.handle) +grid.setfocus: focused(inplacedit.handle) +grid.CMCancelMode -> einfach weiterreichen +(*@\\\0000000A25*) +(*@\\\0001000011000E01*) diff --git a/lib/aligrid21/ALIGRIDR.PAS b/lib/aligrid21/ALIGRIDR.PAS new file mode 100644 index 00000000..ac9178c1 --- /dev/null +++ b/lib/aligrid21/ALIGRIDR.PAS @@ -0,0 +1,64 @@ +unit aligridr; + (*$i ah_def.inc *) +(*@/// interface *) +interface + +uses + classes, + (*$ifdef delphi_ge_6 *) + designintf, + (*$else *) + dsgnintf, + (*$endif *) + aligrid, + aligredi; + +procedure Register; +(*@\\\0000000914*) +(*@/// implementation *) +implementation + +{$ifdef delphi_1} + {$R aligrid.d16} +{$else} + {$R aligrid.d32} +{$endif} + +(*@/// procedure Register; // To display the grid in the IDE *) +procedure Register; +(*$ifdef delphi_ge_6 *) +const + TInputCategory = 'Input'; + TVisualCategory = 'Visual'; + TLocalizableCategory = 'Localizable'; + THelpCategory = 'Help and Hints'; + TActionCategory = 'Action'; + TMiscellaneousCategory = 'Miscellaneous'; +(*$endif *) +begin + RegisterComponents('Custom', [TStringAlignGrid]); + RegisterComponentEditor(TStringAlignGrid,TGridComponentEditor); +(*$ifdef delphi_ge_5 *) + RegisterPropertiesInCategory(TInputCategory, TStringAlignGrid, + ['OnAfterEdit','OnCancelEdit','OnBeforeEdit','OnValidateEdit', + 'SelectEditText','EditMultiline','Editable','PasteEditableOnly', + 'AllowCutnPaste','AutoEditNextCell','NextCellEdit','AfterLastCellEdit']); + RegisterPropertiesInCategory(TVisualCategory, TStringAlignGrid, + ['Alignment','Wordwrap','FixedColor','RedrawWhileScroll', + 'DrawSelection','AutoAdjustLastCol','SelectedCellColor', + 'SelectedFontColor']); + RegisterPropertiesInCategory(TLocalizableCategory, TStringAlignGrid, + ['HTMLCaption']); + RegisterPropertiesInCategory(THelpCategory, TStringAlignGrid, + ['ShowCellHints','OnShowHintCell']); + RegisterPropertiesInCategory(TActionCategory, TStringAlignGrid, + ['OnFixedColClick','OnFixedRowClick']); + RegisterPropertiesInCategory(TMiscellaneousCategory, TStringAlignGrid, + ['HTMLBorder','OnCompareRow','OnCompareCol', + 'NextCellTab','AfterLastCellTab']); +(*$endif *) + end; +(*@\\\003E000C01000C01000D07000D18000701000701*) +(*@\\\0000000901*) +end. +(*@\\\0001000011000401*) diff --git a/lib/aligrid21/ALIGRIDR.dcu b/lib/aligrid21/ALIGRIDR.dcu new file mode 100644 index 00000000..9e39ba20 Binary files /dev/null and b/lib/aligrid21/ALIGRIDR.dcu differ diff --git a/lib/aligrid21/D3/AH_COMP.DPK b/lib/aligrid21/D3/AH_COMP.DPK new file mode 100644 index 00000000..964a9603 --- /dev/null +++ b/lib/aligrid21/D3/AH_COMP.DPK @@ -0,0 +1,35 @@ +package ah_comp; + +{$R *.RES} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl30, + VclSmp30; + +contains + ALIGRIDR; + +end. diff --git a/lib/aligrid21/D4/AH_COMP.DPK b/lib/aligrid21/D4/AH_COMP.DPK new file mode 100644 index 00000000..9047d3cc --- /dev/null +++ b/lib/aligrid21/D4/AH_COMP.DPK @@ -0,0 +1,34 @@ +package ah_comp; + +{$R *.RES} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$IMPLICITBUILD OFF} + +requires + vcl40, + VclSmp40; + +contains + aligridr in 'S:\andy\ALIGRIDR.PAS'; + +end. diff --git a/lib/aligrid21/D5/AH_COMP.DPK b/lib/aligrid21/D5/AH_COMP.DPK new file mode 100644 index 00000000..933cf3e7 --- /dev/null +++ b/lib/aligrid21/D5/AH_COMP.DPK @@ -0,0 +1,34 @@ +package ah_comp; + +{$R *.RES} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$IMPLICITBUILD OFF} + +requires + vcl50, + VclSmp50; + +contains + aligridr in '..\..\Data\pascal\andy\ALIGRIDR.PAS'; + +end. diff --git a/lib/aligrid21/ICONGRID.PAS b/lib/aligrid21/ICONGRID.PAS new file mode 100644 index 00000000..2e92777e --- /dev/null +++ b/lib/aligrid21/ICONGRID.PAS @@ -0,0 +1,279 @@ +unit icongrid; +(*@/// interface *) +interface + (*$x+ *) + +(*@/// uses *) +uses + windows, + sysutils, + classes, + graphics, + grids, + aligrid; +(*@\\\000000030C*) + +type +(*@/// TCellPropertiesIcon=class(TCellProperties) *) +TCellPropertiesIcon=class(TCellProperties) +protected + f_icon: TIcon; + procedure SetIcon(value: TIcon); + procedure ReadSingleProperty(Proptype:integer; Reader:TReader; grid:TStringAlignGrid); override; + procedure WriteToWriter(writer:TWriter); override; +public + property Icon:TIcon read f_icon write SetIcon; + destructor destroy; override; + procedure assign(value:TCellProperties); override; + function isempty: boolean; override; + function clone:TCellProperties; override; +end; +(*@\\\*) +(*@/// TIconGrid=class(TStringAlignGrid) *) +TIconGrid=class(TStringAlignGrid) +protected + procedure DrawCellBack(ACol,ARow:Longint; var ARect:TRect; AState:TGridDrawState); override; + procedure Initialize; override; +protected +(*@/// property read/write for the icons *) +function GetIconCell(ACol,ARow: longint):TIcon; +procedure SetIconCell(ACol,ARow: longint; const Value: TIcon); +(*@\\\0000000201*) + procedure IconChanged(AIcon: TObject); +public + property CellIcon[ACol,ARow:longint]: TIcon read GetIconCell write SetIconCell; + end; +(*@\\\0032000401000401000401000401*) + +procedure Register; +(*@\\\0000000801*) +(*@/// implementation *) +implementation + +const + prop_icon = 100; (* save value to keep space for basic class to expand *) + +type + tp_char=^char; +(*@/// function buf2hexstring(p:tp_char, size:longint):string; *) +function buf2hexstring(p:tp_char; size:longint):string; +begin + result:=''; + while size>0 do begin + result:=result+inttohex(ord(p^),2); + dec(size); + inc(p); + end; + end; +(*@\\\0000000401*) +(*@/// procedure WriteStream(Writer: TWriter; v:TStream); *) +procedure WriteStream(Writer: TWriter; v:TStream); +const + linesize=100; +var + buf: pointer; + size: integer; +begin + buf:=NIL; + try + getmem(buf,linesize); + size:=linesize; + while size>0 do begin + size:=v.read(buf^,linesize); + if size>0 then + writer.writestring(buf2hexstring(buf,size)); + end; + writer.writestring('.'); + finally + if buf<>NIL then + freemem(buf,linesize); + end; + end; +(*@\\\0000000F01*) +(*@/// function ReadStream(Reader: TReader):TMemoryStream; *) +function ReadStream(Reader: TReader):TMemoryStream; +var + s: string; + h: char; +begin + result:=NIL; + try + result:=TMemoryStream.Create; + repeat + s:=reader.readstring; + if s<>'.' then + while length(s)>0 do begin + h:=chr(strtoint('$'+copy(s,1,2))); + result.write(h,1); + s:=copy(s,3,length(s)); + end; + until s='.'; + result.seek(0,0); + except + result.free; + RAISE; + end; + end; +(*@\\\0000001216*) + + +(*@/// destructor TCellPropertiesIcon.destroy; *) +destructor TCellPropertiesIcon.destroy; +begin + f_icon.free; + inherited destroy; + end; +(*@\\\0000000415*) +(*@/// procedure TCellPropertiesIcon.ReadSingleProperty(Proptype:integer; Reader:TReader; grid:TStringAlignGrid); *) +procedure TCellPropertiesIcon.ReadSingleProperty(Proptype:integer; Reader:TReader; grid:TStringAlignGrid); +var + f: TIcon; + s: TStream; +begin + case proptype of + prop_icon : begin + f:=NIL; + s:=NIL; + try + f:=TIcon.Create; + s:=ReadStream(Reader); + f.loadfromstream(s); + self.icon:=f; + self.icon.OnChange:=TIconGrid(grid).iconchanged; + finally + f.free; + s.free; + end; + end; + else inherited ReadSingleProperty(Proptype,Reader,grid); + end; + end; +(*@\\\0000000C09*) +(*@/// procedure TCellPropertiesIcon.WriteToWriter(writer:TWriter); *) +procedure TCellPropertiesIcon.WriteToWriter(writer:TWriter); +var + h: TMemoryStream; +begin +(*@/// if self.icon<>NIL then *) +if self.icon<>NIL then begin + writer.writeinteger(prop_icon); + h:=NIL; + try + h:=TMemoryStream.Create; + icon.savetostream(h); + h.seek(0,0); + WriteStream(writer,h); + finally + h.free; + end; + end; +(*@\\\0000000305*) + inherited WriteToWriter(writer); + end; +(*@\\\0000000514*) +(*@/// procedure TCellPropertiesIcon.SetIcon(value: TIcon); *) +procedure TCellPropertiesIcon.SetIcon(value: TIcon); +begin + if value=NIL then begin + f_icon.free; + f_icon:=NIL; + end + else begin + if f_icon=NIL then + f_icon:=TIcon.Create; + f_icon.assign(value); + end; + end; +(*@\\\*) +(*@/// procedure TCellPropertiesIcon.assign(value:TCellProperties); *) +procedure TCellPropertiesIcon.assign(value:TCellProperties); +begin + inherited assign(value); + if value is TCellPropertiesIcon then + SetIcon(TCellPropertiesIcon(value).icon) + else + SetIcon(NIL); + end; +(*@\\\0000000501*) +(*@/// function TCellPropertiesIcon.isempty: boolean; *) +function TCellPropertiesIcon.isempty: boolean; +begin + result:=inherited isempty and ((f_icon=NIL) or (f_icon.handle=0)); + end; +(*@\\\0000000344*) +(*@/// function TCellPropertiesIcon.clone:TCellProperties; *) +function TCellPropertiesIcon.clone:TCellProperties; +begin + result:=TCellPropertiesIcon.Create(self.f_grid); + result.assign(self); + end; +(*@\\\*) + +(*@/// procedure TIconGrid.Initialize; *) +procedure TIconGrid.Initialize; +begin + inherited Initialize; + CellPropertiesClass:=TCellPropertiesIcon; + end; +(*@\\\000C000501000501000501*) +(*@/// procedure TIconGrid.IconChanged(AIcon: TObject); *) +procedure TIconGrid.IconChanged(AIcon: TObject); +begin + invalidate; + end; +(*@\\\*) +(*@/// function TIconGrid.GetIconCell(ACol,ARow: longint):TIcon; *) +function TIconGrid.GetIconCell(ACol,ARow: longint):TIcon; +var + v,w: TCellProperties; +begin + w:=NIL; + try + v:=GetItemCell(ACol,ARow,FPropCell); + if (v=NIL) or not (v is TCellPropertiesIcon) then begin + w:=v; + v:=CellPropertiesClass.Create(self); + if w<>NIL then + v.assign(w); + setitemcell(ACol,ARow,FPropCell,v); + end; + if TCellPropertiesIcon(v).icon=NIL then begin + TCellPropertiesIcon(v).f_icon:=TIcon.Create; + TCellPropertiesIcon(v).icon.OnChange:=iconchanged; + end; + result:=TCellPropertiesIcon(v).icon; + finally + w.free; + end; + end; +(*@\\\0000000801*) +(*@/// procedure TIconGrid.SetIconCell(ACol,ARow: longint; const Value: TIcon); *) +procedure TIconGrid.SetIconCell(ACol,ARow: longint; const Value: TIcon); +begin + (ObjectCell[ACol,ARow] as TCellPropertiesIcon).icon:=value; + Invalidate; + end; +(*@\\\0000000301*) +(*@/// procedure TIconGrid.DrawCellBack(ACol,ARow:Longint; ARect:TRect; AState:TGridDrawState); *) +procedure TIconGrid.DrawCellBack(ACol,ARow:Longint; var ARect:TRect; AState:TGridDrawState); +var + v: TCellProperties; +begin + inherited DrawCellBack(ACol,ARow,ARect,AState); + v:=GetItemCell(ACol,ARow,FPropCell); + if (v<>NIL) and (v is TCellPropertiesIcon) and (TCellPropertiesIcon(v).icon<>NIL) and (TCellPropertiesIcon(v).icon.handle<>0) then begin + Canvas.Draw(Arect.Left,Arect.Top,TCellPropertiesIcon(v).icon); + Arect.Left:=ARect.Left+TCellPropertiesIcon(v).icon.width; + end; + end; +(*@\\\0000000701*) + +(*@/// procedure Register; *) +procedure Register; +begin + RegisterComponents('Custom', [TIconGrid]); + end; +(*@\\\*) +(*@\\\0000001601*) +end. +(*@\\\0001000011000201*) diff --git a/lib/aligrid21/README.TXT b/lib/aligrid21/README.TXT new file mode 100644 index 00000000..7704bcba --- /dev/null +++ b/lib/aligrid21/README.TXT @@ -0,0 +1,30 @@ +TStringAlignGrid (Version 2.1 of 2001-07-09) + +Originally it was a descendant of TStringGrid with the possibility to change +the alignment of the text to left (same as StringGrid) or right aligned or +centered and only 4k source code, but with each new version more features +appeared but the name stayed (as there is already a TSuperGrid I've to stick +to the name...), and it now has 200k of source, and there are still further +items on my to do list. + +For the quick use: move the PAS, DCR and DFM files into your component path and +include it with the file aligridr.pas in your library. You can then just drop +it onto your forms and set all the needed properties with the component editor +(just double-click the grid and the see the popup menu which comes after a +click with the right mouse button). For users of Delphi 3 or later there's +also a package file, which only includes this one component, just load this +file in Delphi and select "Install package" - but you can of course add this +component to any other package you like, too, by using the aligridr.pas file. + +This component is Freeware. If you like it you can send me a thank you +on a nice postcard from your hometown, but if you really want to send me +money I won't complain :-) , but count it as a gift not a payment. If you use +this component in one of your projects I'd appreciate it if you mention me +somewhere. Only spread this component complete with all the readme's and +sources. + +For documentation, contact information etc. read the help file supplied with +the component. + +Have fun, + Andreas H"orstemeier diff --git a/lib/aligrid21/aligrid.dcu b/lib/aligrid21/aligrid.dcu new file mode 100644 index 00000000..b98b908e Binary files /dev/null and b/lib/aligrid21/aligrid.dcu differ diff --git a/lib/async32_x/Async32.doc b/lib/async32_x/Async32.doc new file mode 100644 index 00000000..719d2c6f --- /dev/null +++ b/lib/async32_x/Async32.doc @@ -0,0 +1,399 @@ +{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fnil MS Sans Serif;}{\f1\fnil\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fnil Times New Roman;}{\f4\fnil Courier New;}{\f5\fmodern\fprq1 Courier 20 Pitch;}} +{\colortbl\red0\green0\blue0;\red0\green0\blue128;\red255\green0\blue0;\red0\green0\blue255;} +\deflang1033\pard\plain\f4\fs22\cf1\b ****************************************************************************** +\par VARIAN ASYNC32 COMPONENT v1.25 +\par (c) VARIAN SOFTWARE SERVICES NL 1996-1997 +\par ALL RIGHTS RESERVED +\par ******************************************************************************\plain\f4\fs20 +\par +\par +\par \plain\f5\fs24\cf2\b TCOMM EXCEPTIONS +\par ================ +\par \plain\f4\fs20 type +\par ECommError = class(Exception) +\par ErrorCode: Integer; +\par end; +\par +\par An ECommError exception contains an additional errorcode wich includes an +\par windows system error result. This value is set to -1 when the error is +\par handled by the component itself and no extra errorcode is available. +\par +\par \plain\f5\fs24\cf2\b PUBLISHED PROPERTIES +\par ==================== +\par \plain\f4\fs20 +\par \plain\f4\fs22\cf3\ul DeviceName\plain\f4\fs22\cf3 +\par \plain\f4\fs20 +\par property DeviceName: string; +\par +\par Name of communication device, Com1, Com2, Lpt1 etc. Can only be +\par set when the port is not assigned (closed). +\par +\par \plain\f4\fs20\cf3\ul MonitorEvents +\par \plain\f4\fs20\cf3 +\par \plain\f4\fs20 TCommEventState = (evBreak, evCTS, evDSR, evError, evRing, +\par evRlsd, evRxChar, evRxFlag, evTxEmpty); +\par TCommEventType = set of TCommEventState; +\par +\par property MonitorEvents: TCommEventType; +\par +\par Enable or disable certain system events. +\par +\par evBREAK - A break was detected on input. +\par evCTS - The CTS (clear-to-send) signal changed state. +\par evDSR - The DSR (data-set-ready) signal changed state. +\par evERROR - A line-status error occurred. Line-status errors +\par are CE_FRAME, CE_OVERRUN, and CE_RXPARITY. +\par evRING - A ring indicator was detected. +\par evRLSD - The RLSD (receive-line-signal-detect) signal changed state. +\par evRXCHAR - A character was received and placed in the input buffer. +\par evRXFLAG - The event character was received and placed in the input buffer. +\par The event character is specified in the device's DCB structure, +\par which is applied to a serial port by using the SetCommState function. +\par evTXEMPTY - The last character in the output buffer was sent. +\par +\par \plain\f4\fs20\cf3\ul Baudrate +\par \plain\f4\fs20\cf3 +\par \plain\f4\fs20 TBaudRate = (cbr110, cbr300, cbr600, cbr1200, cbr2400, cbr4800, cbr9600, +\par cbr14400, cbr19200, cbr38400, cbr56000, cbr57600, cbr115200, cbr128000, cbr256000); +\par +\par property BaudRate: TBaudRate; +\par +\par \plain\f4\fs20\cf3\ul Parity +\par \plain\f4\fs20\cf3 +\par \plain\f4\fs20 TParity = (paNone, paOdd, paEven, paMark, paSpace); +\par +\par property Parity: TParity; +\par +\par \plain\f4\fs20\cf3\ul Stopbits +\par \plain\f4\fs20\cf3 +\par \plain\f4\fs20 TStopbits = (sb10, sb15, sb20); +\par +\par property Stopbits: TStopbits; +\par +\par \plain\f4\fs20\cf3\ul Databits +\par \plain\f4\fs20\cf3 +\par \plain\f4\fs20 TDatabits=(da4, da5, da6, da7, da8); +\par +\par property Databits: TDatabits; +\par +\par \plain\f4\fs20\cf3\ul ReadBufSize +\par \plain\f4\fs20\cf3 +\par \plain\f4\fs20 property ReadBufSize: Integer; +\par +\par Specifies the recommended size, in bytes, of the device's internal input buffer. +\par +\par \plain\f4\fs20\cf3\ul WriteBufSize\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property WriteBufSize: Integer; +\par +\par Specifies the recommended size, in bytes, of the device's internal output buffer. +\par +\par \plain\f4\fs20\cf3\ul CharsTimeout +\par \plain\f4\fs20\cf3 +\par \plain\f4\fs20 property CharsTimeout: Integer; +\par +\par Specifies the maximum time, in milliseconds, allowed to elapse between +\par the arrival of two characters on the communications line. During a Read +\par operation, the time period begins when the first character is received. +\par If the interval between the arrival of any two characters exceeds this +\par amount, the Read operation is completed and any buffered data is returned. +\par A value of zero indicates that interval time-outs are not used. +\par +\par \plain\f4\fs20\cf3\ul Options +\par \plain\f4\fs20\cf3 +\par \plain\f4\fs20 TCommOption = (coParityCheck, coDsrSensitivity, coIgnoreXOff, +\par coErrorChar, coNullStrip); +\par TCommOptions = set of TCommOption; +\par +\par property Options: TCommOptions; +\par +\par coParityCheck: +\par Specifies whether parity checking is enabled. If this member is TRUE, +\par parity checking is performed and errors are reported. +\par +\par coDsrSensitivity: +\par Specifies whether the communications driver is sensitive to the state +\par of the DSR signal. If this member is TRUE, the driver ignores any bytes +\par received, unless the DSR modem input line is high. +\par +\par coIgnoreXoff: +\par Specifies whether transmission stops when the input buffer is full and the +\par driver has transmitted the XoffChar character. If this member is TRUE, +\par transmission continues after the input buffer has come within XoffLim bytes +\par of being full and the driver has transmitted the XoffChar character to stop +\par receiving bytes. If this member is FALSE, transmission does not continue until +\par the input buffer is within XonLim bytes of being empty and the driver has +\par transmitted the XonChar character to resume reception. +\par +\par coErrorChar: +\par Specifies whether bytes received with parity errors are replaced with the +\par character specified by the ErrorChar member. If this member is TRUE and +\par the fParity member is TRUE, replacement occurs. +\par +\par coNullStrip: +\par Specifies whether null bytes are discarded. If this member is TRUE, +\par null bytes are discarded when received. +\par +\par \plain\f4\fs20\cf3\ul EventChars +\par \plain\f4\fs20\cf3 +\par \plain\f4\fs20 XonChar +\par property XonChar: char; +\par Specifies the value of the XON character for both transmission and reception +\par +\par XoffChar +\par property XoffChar: char; +\par Specifies the value of the XOFF character for both transmission and reception. +\par +\par \plain\f4\fs20\cf3\ul FlowControl\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 TFlowControl = (fcNone, fcCTS, fcDTR, fcSoftware, fcDefault); +\par +\par property FlowControl: TFlowControl; +\par +\par fcNone No flowcontrol +\par fsCTS Rts/Cts flowcontrol +\par fsDTR Specifies the DTR (data-terminal-ready) flow control. +\par fsSoftware Xon/Xoff flowcontrol +\par fcDefault Use system settings +\par +\par +\par \plain\f5\fs24\cf2\b METHODS AND PUBLIC PROPERTIES +\par ============================= +\par \plain\f4\fs20 +\par \plain\f4\fs20\cf3\ul Enabled\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 function Enabled: Boolean; +\par +\par Describes the component/device state, true=Open, false=Closed +\par +\par \plain\f4\fs20\cf3\ul Open +\par \plain\f4\fs20\cf3 +\par \plain\f4\fs20 procedure Open; +\par +\par Opens the communications device and does all the needed configurations. +\par Open must be called in order to access the comport. If an invalid +\par device handle is requested, one of the following errorcodes is returned. +\par +\par 2 File not found. +\par 3 Invalid file name. +\par 4 Too many open files. +\par 5 Access denied. +\par 100 EOF. +\par 101 Disk full. +\par 106 Invalid input. +\par +\par \plain\f4\fs20\cf3\ul Close\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 procedure Close; +\par +\par Close the communications device. +\par +\par \plain\f4\fs20\cf3\ul Write\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 function Write(const Buf; Count: Integer): Integer; +\par +\par Buf is any variable, Count is an expression of type Integer. Write writes Count +\par or fewer bytes to the com port from memory, starting at the first byte occupied +\par by Buf. The actual number of bytes written (less than or equal to Count) is +\par returned in it's Result. If a write operations fails it returns -1. +\par +\par \plain\f4\fs20\cf3\ul Read\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 function Read(var Buf; Count: Integer): Integer; +\par +\par Buf is any variable, Count is an expression of type Integer. Read reades Count +\par or fewer bytes from the com port. The actual number of bytes read +\par (less than or equal to Count) is returned in it's Result. If a read operations +\par fails it returns -1. Never try to read bytes manually by specifying the +\par count parameter yourself. Use the Count parameter returned in "RxCharEvent". +\par +\par \plain\f4\fs20\cf3\ul InQueCount\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 function InQueCount: Integer; +\par +\par Number of bytes in the ReadBuffer. +\par +\par \plain\f4\fs20\cf3\ul OutQueCount\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 function OutQueCount: Integer; +\par +\par Number of bytes in the WriteBuffer. When all bytes are sent, an OnTxEmpty +\par event is triggerd. +\par +\par \plain\f4\fs20\cf3\ul PurgeIn\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 procedure PurgeIn; +\par +\par Remove all pending characters from the inputbuffer (read). +\par +\par \plain\f4\fs20\cf3\ul PurgeOut\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 procedure PurgeOut; +\par +\par Remove all pending characters from the outputbuffer (write). +\par +\par \plain\f4\fs20\cf3\ul SetDTRState\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 procedure SetDTRState(State: Boolean); +\par +\par False - Clears the DTR (data-terminal-ready) signal. +\par True - Sends the DTR (data-terminal-ready) signal. +\par +\par \plain\f4\fs20\cf3\ul SetRTSState\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 procedure SetRTSState(State: Boolean); +\par +\par False - Clears the RTS (request-to-send) signal. +\par True - Sends the RTS (request-to-send) signal. +\par +\par \plain\f4\fs20\cf3\ul SetBreakState\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 procedure SetBREAKState(State: Boolean); +\par +\par False - Restores character transmission and places the transmission line +\par in a nonbreak state. +\par True - Suspends character transmission and places the transmission line in +\par a break state. Note that this extended function does not flush data +\par that has not been transmitted. +\par +\par \plain\f4\fs20\cf3\ul SetXONState\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 procedure SetXONState(State: Boolean); +\par +\par False - Causes transmission to act as if an XOFF character has been received. +\par True - Causes transmission to act as if an XON character has been received. +\par +\par \plain\f4\fs20\cf3\ul CTS\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property CTS: Boolean; +\par +\par True - The CTS (clear-to-send) signal is on. +\par +\par \plain\f4\fs20\cf3\ul DSR\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property DSR: Boolean; +\par +\par True - The DSR (data-set-ready) signal is on. +\par +\par \plain\f4\fs20\cf3\ul RING\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property RING: Boolean; +\par +\par True - The ring indicator signal is on. +\par +\par \plain\f4\fs20\cf3\ul RLSD\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property RLSD: Boolean; +\par +\par True - The RLSD (receive-line-signal-detect) signal is on. +\par +\par \plain\f4\fs20\cf3\ul Handle\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property Handle: THandle; +\par +\par Reference to the internal devicehandle (Readonly property) +\par +\par \plain\f4\fs20\cf3\ul ProviderSubtype\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property ProviderSubtype: Integer; +\par +\par Device Id. Use the added GetProviderSubTypeName function in order +\par to get a string representation of the type of device currently +\par opened. +\par +\par Available provider subtypes: +\par PST_FAX FAX device +\par PST_LAT LAT protocol +\par PST_MODEM Modem device +\par PST_NETWORK_BRIDGE Unspecified network bridge +\par PST_PARALLELPORT Parallel port +\par PST_RS232 RS-232 serial port +\par PST_RS422 RS-422 port +\par PST_RS423 RS-423 port +\par PST_RS449 RS-449 port +\par PST_SCANNER Scanner device +\par PST_TCPIP_TELNET TCP/IP Telnet\'ae protocol +\par PST_UNSPECIFIED Unspecified +\par PST_X25 X.25 standards +\par +\par +\par \plain\f5\fs24\cf2\b EVENTS +\par ====== +\par \plain\f4\fs20 +\par \plain\f4\fs20\cf3\ul OnBreak\plain\f4\fs20\cf3 +\par \plain\f4\fs20 +\par property OnBreak: TNotifyEvent; +\par +\par A break was detected on input. +\par +\par \plain\f4\fs20\cf3\ul OnCTS\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property OnCTS: TNotifyEvent; +\par +\par The CTS (clear-to-send) signal changed state. +\par +\par \plain\f4\fs20\cf3\ul OnDSR\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property OnDSR: TNotifyEvent; +\par +\par The DSR (data-set-ready) signal changed state. +\par +\par \plain\f4\fs20\cf3\ul OnRing\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property OnRing: TNotifyEvent; +\par +\par A ring indicator was detected. +\par +\par \plain\f4\fs20\cf3\ul OnRLSD\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property OnRLSD: TNotifyEvent; +\par +\par The RLSD (receive-line-signal-detect) signal changed state. +\par +\par \plain\f4\fs20\cf3\ul OnError\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 TCommErrorEvent = procedure(Sender: TObject; Errors: Integer) of object; +\par property OnError: TCommErrorEvent; +\par +\par A line-status error occurred. +\par +\par CE_BREAK The hardware detected a break condition. +\par CE_DNS Windows 95 only: A parallel device is not selected. +\par CE_FRAME The hardware detected a framing error. +\par CE_IOE An I/O error occurred during communications with the device. +\par CE_MODE The requested mode is not supported, or the hFile parameter +\par is invalid. If this value is specified, it is the only valid error. +\par CE_OOP Windows 95 only: A parallel device signaled that it is out of paper. +\par CE_OVERRUN A character-buffer overrun has occurred. The next character is lost. +\par CE_PTO Windows 95 only: A time-out occurred on a parallel device. +\par CE_RXOVER An input buffer overflow has occurred. There is either no +\par room in the input buffer, or a character was received after +\par the end-of-file (EOF) character. +\par CE_RXPARITY The hardware detected a parity error. +\par CE_TXFULL The application tried to transmit a character, but the output +\par buffer was full. +\par +\par \plain\f4\fs20\cf3\ul OnRxChar\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 TCommRxCharEvent = procedure(Sender: TObject; Count: Integer) of object; +\par property OnRxChar: TCommRxCharEvent; +\par +\par A character was received and placed in the input buffer. Count defines +\par the number of bytes received. +\par +\par \plain\f4\fs20\cf3\ul OnRxFlag\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property OnRxFlag: TNotifyEvent; +\par +\par The event character was received and placed in the input buffer. +\par The event character is specified in the device's DCB structure, +\par which is applied to a serial port by using the SetCommState function. +\par +\par \plain\f4\fs20\cf3\ul OnTxEmpty\plain\f4\fs20\cf3 +\par +\par \plain\f4\fs20 property OnTxEmpty: TNotifyEvent; +\par +\par The last character in the output buffer was sent. +\par +\par } + \ No newline at end of file diff --git a/lib/async32_x/CommInt.dcr b/lib/async32_x/CommInt.dcr new file mode 100644 index 00000000..b5bb4d68 Binary files /dev/null and b/lib/async32_x/CommInt.dcr differ diff --git a/lib/async32_x/CommInt.dcu b/lib/async32_x/CommInt.dcu new file mode 100644 index 00000000..607011c1 Binary files /dev/null and b/lib/async32_x/CommInt.dcu differ diff --git a/lib/async32_x/CommInt.pas b/lib/async32_x/CommInt.pas new file mode 100644 index 00000000..79eb9645 --- /dev/null +++ b/lib/async32_x/CommInt.pas @@ -0,0 +1,858 @@ +//****************************************************************************** +// VARIAN ASYNC32 COMPONENT +// (c) VARIAN SOFTWARE SERVICES NL 1996-1998 +// ALL RIGHTS RESERVED +//****************************************************************************** + +unit CommInt; + +interface + +uses + Windows, Messages, SysUtils, Classes, CommObjs; + +const + DefaultDeviceName = 'Com2'; + +type + ECommError = class(Exception) + ErrorCode: Integer; + end; + + TCommEvent = procedure(Sender: TObject; Status: dword) of object; + TCommEventType = (evBreak, evCts, evDsr, evError, evRing, + evRlsd, evRxChar, evRxFlag, evTxEmpty); + TCommEventTypes = set of TCommEventType; + + TCommEventThread = class(TThread) + private + FCommHandle: THandle; + FEvent: TSimpleEvent; + FEventMask: dWord; + FOnSignal: TCommEvent; + protected + procedure Execute; override; + procedure Terminate; + procedure DoOnSignal; + public + constructor Create(Handle: THandle; Events: TCommEventTypes); + destructor Destroy; override; + property OnSignal: TCommEvent read FOnSignal write FOnSignal; + end; + + TCustomComm = class; + + TCommEventChars = class(TPersistent) + private + FOwner: TCustomComm; + FXonChar: Char; + FXoffChar: Char; + FErrorChar: Char; + FEofChar: Char; + FEvtChar: Char; + procedure SetEventChar(Index: Integer; Value: Char); + public + constructor Create(Owner: TCustomComm); + procedure Assign(Source: TPersistent); override; + published + property XonChar: Char index 1 read FXOnChar write SetEventChar default #17; + property XoffChar: Char index 2 read FXOffChar write SetEventChar default #19; + property ErrorChar: Char index 3 read FErrorChar write SetEventChar default #0; + property EofChar: Char index 4 read FEofChar write SetEventChar default #0; + property EvtChar: Char index 5 read FEvtChar write SetEventChar default #0; + end; + + TBaudrate =(br110, br300, br600, br1200, br2400, br4800, br9600, br14400, + br19200, br38400, br56000, br57600, br115200, br128000, br256000); + TParity = (paNone, paOdd, paEven, paMark, paSpace); + TStopbits = (sb10, sb15, sb20); + TDatabits=(da4, da5, da6, da7, da8); + TFlowControl = (fcNone, fcCTS, fcDTR, fcSoftware, fcDefault); + + TCommOption = (coParityCheck, coDsrSensitivity, coIgnoreXOff, + coErrorChar, coNullStrip); + TCommOptions = set of TCommOption; + + TCommRxCharEvent = procedure(Sender: TObject; Count: Integer) of object; + TCommErrorEvent = procedure(Sender: TObject; Errors: Integer) of object; + + TCustomComm = class(TComponent) + private + FHandle: THandle; + FDCB: TDCB; + FDeviceName: string; + FEvent: TSimpleEvent; + FCriticalSection: TCriticalSection; + FReadTimeout: Integer; + FWriteTimeout: Integer; + FReadBufSize: Integer; + FWriteBufSize: Integer; + FMonitorEvents: TCommEventTypes; + FBaudRate: TBaudRate; + FParity: TParity; + FStopbits: TStopbits; + FDatabits: TDatabits; + FEventThread: TCommEventThread; + FEventChars: TCommEventChars; + FOptions: TCommOptions; + FFlowControl: TFlowControl; + FOnBreak: TNotifyEvent; + FOnCts: TNotifyEvent; + FOnDsr: TNotifyEvent; + FOnError: TCommErrorEvent; + FOnRing: TNotifyEvent; + FOnRlsd: TNotifyEvent; + FOnRxChar: TCommRxCharEvent; + FOnRxFlag: TNotifyEvent; + FOnTxEmpty: TNotifyEvent; + procedure SetDeviceName(const Value: string); + procedure SetMonitorEvents(Value: TCommEventTypes); + procedure SetReadBufSize(Value: Integer); + procedure SetWriteBufSize(Value: Integer); + procedure SetBaudRate(Value: TBaudRate); + procedure SetParity(Value: TParity); + procedure SetStopbits(Value: TStopBits); + procedure SetDatabits(Value: TDatabits); + procedure SetOptions(Value: TCommOptions); + procedure SetFlowControl(Value: TFlowControl); + function GetModemState(Index: Integer): Boolean; + function GetComState(Index: Integer): Boolean; + procedure Lock; + procedure Unlock; + procedure CheckOpen; + procedure EscapeComm(Flag: Integer); + procedure InitHandshaking(var DCB: TDCB); + procedure UpdateCommTimeouts; + protected + procedure CreateHandle; virtual; + procedure DestroyHandle; + procedure HandleCommEvent(Sender: TObject; Status: dword); + procedure UpdateDataControlBlock; + property DeviceName: string read FDeviceName write SetDeviceName; + property ReadTimeout: Integer read FReadTimeout write FReadTimeout default 1000; + property WriteTimeout: Integer read FWriteTimeout write FWriteTimeout default 1000; + property ReadBufSize: Integer read FReadBufSize write SetReadBufSize default 4096; + property WriteBufSize: Integer read FWriteBufSize write SetWriteBufSize default 2048; + property MonitorEvents: TCommEventTypes read FMonitorEvents write SetMonitorEvents; + property BaudRate: TBaudRate read FBaudRate write SetBaudRate default br9600; + property Parity: TParity read FParity write SetParity default paNone; + property Stopbits: TStopbits read FStopbits write SetStopbits default sb10; + property Databits: TDatabits read FDatabits write SetDatabits default da8; + property EventChars: TCommEventChars read FEventChars; + property Options: TCommOptions read FOptions write SetOptions; + property FlowControl: TFlowControl read FFlowControl write SetFlowControl default fcDefault; + property OnBreak: TNotifyEvent read FOnBreak write FOnBreak; + property OnCts: TNotifyEvent read FOnCts write FOnCts; + property OnDsr: TNotifyEvent read FOnDsr write FOnDsr; + property OnRing: TNotifyEvent read FOnRing write FOnRing; + property OnRlsd: TNotifyEvent read FOnRlsd write FOnRlsd; + property OnError: TCommErrorEvent read FOnError write FOnError; + property OnRxChar: TCommRxCharEvent read FOnRxChar write FOnRxChar; + property OnRxFlag: TNotifyEvent read FOnRxFlag write FOnRxFlag; + property OnTxEmpty: TNotifyEvent read FOnTxEmpty write FOnTxEmpty; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Open; + procedure Close; + function Enabled: Boolean; + function Write(var Buf; Count: Integer): Integer; + function Read(var Buf; Count: Integer): Integer; + function InQueCount: Integer; + function OutQueCount: Integer; + procedure PurgeIn; + procedure PurgeOut; + {Comm escape functions} + procedure SetDTRState(State: Boolean); + procedure SetRTSState(State: Boolean); + procedure SetBREAKState(State: Boolean); + procedure SetXONState(State: Boolean); + {Comm status flags} + property CTS: Boolean index 1 read GetModemState; + property DSR: Boolean index 2 read GetModemState; + property RING: Boolean index 3 read GetModemState; + property RLSD: Boolean index 4 read GetModemState; + + property CtsHold: Boolean index 1 read GetComState; + property DsrHold: Boolean index 2 read GetComState; + property RlsdHold: Boolean index 3 read GetComState; + property XoffHold: Boolean index 4 read GetComState; + property XOffSent: Boolean index 5 read GetComState; + + property Handle: THandle read FHandle; + end; + + TComm = class(TCustomComm) + published + property DeviceName; + property ReadTimeout; + property WriteTimeout; + property ReadBufSize; + property WriteBufSize; + property MonitorEvents; + property BaudRate; + property Parity; + property Stopbits; + property Databits; + property EventChars; + property Options; + property FlowControl; + property OnBreak; + property OnCts; + property OnDsr; + property OnRing; + property OnRlsd; + property OnError; + property OnRxChar; + property OnRxFlag; + property OnTxEmpty; + end; + +procedure Register; + +implementation + +const + sOpenError = 'Error accessing specified device'; + sInvalidHandle = 'Invalid device handle, access denied'; + sPortAlreadyOpen = 'Port already assigned (open)'; + sPortNotOpen = 'Port not open, unable to complete operation'; + sSetupCommErr = 'Error initializing Read/Write Buffers'; + sUpdateDCBErr = 'Error updating DataControlBlock'; + sCommTimeoutsErr = 'Error updating CommTimeouts'; + sEscFuncError = 'EscapeCommFunction failure'; + sReadError = 'Read error'; + sWriteError = 'Write error'; + sMsgExtention = ' (Error: %d) '; + + PurgeRead = PURGE_RXABORT + PURGE_RXCLEAR; + PurgeWrite = PURGE_TXABORT + PURGE_TXCLEAR; + PurgeReadWrite = PurgeRead + PurgeWrite; + + fBinary = $00000001; + fParity = $00000002; + fOutxCtsFlow = $00000004; + fOutxDsrFlow = $00000008; + fDtrControl = $00000030; + fDtrControlDisable = $00000000; + fDtrControlEnable = $00000010; + fDtrControlHandshake = $00000020; + fDsrSensitivity = $00000040; + fTXContinueOnXoff = $00000080; + fOutX = $00000100; + fInX = $00000200; + fErrorChar = $00000400; + fNull = $00000800; + fRtsControl = $00003000; + fRtsControlDisable = $00000000; + fRtsControlEnable = $00001000; + fRtsControlHandshake = $00002000; + fRtsControlToggle = $00003000; + fAbortOnError = $00004000; + fDummy2 = $FFFF8000; + + CommEventList: array[TCommEventType] of dword = + ( EV_BREAK, + EV_CTS, + EV_DSR, + EV_ERR, + EV_RING, + EV_RLSD, + EV_RXCHAR, + EV_RXFLAG, + EV_TXEMPTY); + + CommBaudRates: array[TBaudRate] of Integer = + ( CBR_110, + CBR_300, + CBR_600, + CBR_1200, + CBR_2400, + CBR_4800, + CBR_9600, + CBR_14400, + CBR_19200, + CBR_38400, + CBR_56000, + CBR_57600, + CBR_115200, + CBR_128000, + CBR_256000); + + CommOptions: array[TCommOption] of Integer = + (fParity, fDsrSensitivity, fTXContinueOnXoff, fErrorChar, fNull); + + CommDataBits: array[TDatabits] of Integer = + ( 4, 5, 6, 7, 8); + + CommParity: array[TParity] of Integer = + ( NOPARITY, ODDPARITY, EVENPARITY, MARKPARITY, SPACEPARITY); + + CommStopBits: array[TStopbits] of Integer = + ( ONESTOPBIT, ONE5STOPBITS, TWOSTOPBITS ); + + +{ RaiseCommError } +procedure RaiseCommError(Msg: string; ErrCode: Integer); +var + E: ECommError; +begin + E := ECommError.Create(Msg + Format(sMsgExtention, [ErrCode])); + E.ErrorCode := ErrCode; + raise E; +end; { RaiseCommError } + + +{ TCommEventThread } + +constructor TCommEventThread.Create(Handle: THandle; Events: TCommEventTypes); +var + EvIndex: TCommEventType; + AttrWord: dword; +begin + Priority := tpHigher; + FreeOnTerminate := True; + FCommHandle := Handle; + AttrWord := $0; + for EvIndex := evBreak to evTxEmpty do + if EvIndex in Events then AttrWord := AttrWord or CommEventList[EvIndex]; + SetCommMask(FCommHandle, AttrWord); + FEvent := TSimpleEvent.Create; + inherited Create(false); +end; + +destructor TCommEventThread.Destroy; +begin + FEvent.Free; + Inherited Destroy; +end; + +procedure TCommEventThread.Execute; +var + Overlapped: TOverlapped; + WaitEventResult: Boolean; +begin + FillChar(Overlapped, Sizeof(Overlapped), 0); + Overlapped.hEvent := FEvent.Handle; + while (not Terminated) do + begin + WaitEventResult := WaitCommEvent(FCommHandle, FEventMask, @Overlapped); + if (GetLastError = ERROR_IO_PENDING) then + WaitEventResult := (FEvent.WaitFor(INFINITE) = wrSignaled); + if WaitEventResult then + begin + Synchronize(DoOnSignal); + FEvent.ResetEvent; + end; + end; + PurgeComm(FCommHandle, PurgeReadWrite); +end; + +procedure TCommEventThread.Terminate; +begin + FEvent.SetEvent; + inherited; +end; + +procedure TCommEventThread.DoOnSignal; +begin + if Assigned(FOnSignal) then FOnSignal(Self, FEventMask); +end; + +{TCommEventChars} + +constructor TCommEventChars.Create(Owner: TCustomComm); +begin + Inherited Create; + FOwner := Owner; + FXonChar := #17; + FXoffChar := #19; + FErrorChar := #0; + FEofChar := #0; + FEvtChar := #0; +end; + +procedure TCommEventChars.SetEventChar(Index: Integer; Value: Char); +begin + case Index of + 1: FXOnChar := Value; + 2: FXOffChar := Value; + 3: FErrorChar := Value; + 4: FEofChar := Value; + 5: FEvtChar := Value; + end; + if FOwner <> nil then + FOwner.UpdateDataControlBlock; +end; + +procedure TCommEventChars.Assign(Source: TPersistent); +begin + if (Source <> nil) and (Source is TCommEventChars) then + begin + FXonChar := TCommEventChars(Source).FXonChar; + FXoffChar := TCommEventChars(Source).FXoffChar; + FErrorChar := TCommEventChars(Source).FErrorChar; + FEofChar := TCommEventChars(Source).FEofChar; + FEvtChar := TCommEventChars(Source).FEvtChar; + end else inherited Assign(Source); +end; + + +{ TCustomComm } + +constructor TCustomComm.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FHandle := INVALID_HANDLE_VALUE; + FDeviceName := DefaultDeviceName; + FReadTimeout := 1000; + FWriteTimeout := 1000; + FReadBufSize := 4096; + FWriteBufSize := 2048; + FMonitorEvents := [evBreak, evCts, evDsr, evError, evRing, + evRlsd, evRxChar, evRxFlag, evTxEmpty]; + FBaudRate := br9600; + FParity := paNone; + FStopbits := sb10; + FDatabits := da8; + FOptions := []; + FFlowControl := fcDefault; + FEventChars := TCommEventChars.Create(self); + FEvent := TSimpleEvent.Create; + FCriticalSection := TCriticalSection.Create; +end; + +destructor TCustomComm.Destroy; +begin + Close; + FEventChars.Free; + FEvent.Free; + FCriticalSection.Free; + inherited Destroy; +end; + +procedure TCustomComm.Lock; +begin + FCriticalSection.Enter; +end; + +procedure TCustomComm.Unlock; +begin + FCriticalSection.Leave; +end; + +function TCustomComm.Enabled: Boolean; +begin + Result := FHandle <> INVALID_HANDLE_VALUE; +end; + +procedure TCustomComm.CheckOpen; +begin + if Enabled then RaiseCommError(sPortAlreadyOpen, -1); +end; + +procedure TCustomComm.CreateHandle; +begin + FHandle := CreateFile(PCHAR(FDeviceName), + GENERIC_READ or GENERIC_WRITE, 0, nil, + OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); + + if not Enabled then + RaiseCommError(sOpenError, GetLastError); + + if GetFileType(FHandle) <> FILE_TYPE_CHAR then + begin + DestroyHandle; + RaiseCommError(sInvalidHandle, -1); + end; +end; + +procedure TCustomComm.DestroyHandle; +begin + CloseHandle(FHandle); + FHandle := INVALID_HANDLE_VALUE; +end; + +procedure TCustomComm.Open; +begin + CheckOpen; + + CreateHandle; + + if Enabled then + begin + FEventThread := TCommEventThread.Create(FHandle, FMonitorEvents); + FEventThread.OnSignal := HandleCommEvent; + + UpdateCommTimeouts; + + UpdateDataControlBlock; + + if not SetupComm(FHandle, FReadBufSize, FWriteBufSize) then + RaiseCommError(sSetupCommErr, GetLastError); + end; +end; + +procedure TCustomComm.Close; +begin + if Enabled then + begin + FEventThread.Terminate; + DestroyHandle; + end; +end; + +function TCustomComm.Write(var Buf; Count: Integer): Integer; +var + Overlapped: TOverlapped; + ErrorCode: Integer; +begin + Lock; + try + FillChar(Overlapped, Sizeof(Overlapped), 0); + Overlapped.hEvent := FEvent.Handle; + if not WriteFile(FHandle, Buf, Count, dWord(Result), + @Overlapped) and (GetLastError <> ERROR_IO_PENDING) then + begin + ErrorCode := GetLastError; + RaiseCommError(sWriteError, ErrorCode); + end; + if FEvent.WaitFor(FWriteTimeout) <> wrSignaled then + Result := -1 + else + begin + GetOverlappedResult(Handle, Overlapped, dWord(Result), False); + FEvent.ResetEvent; + end; + finally + Unlock; + end; +end; + +function TCustomComm.Read(var Buf; Count: Integer): Integer; +var + Overlapped: TOverlapped; + ErrorCode: Integer; +begin + Lock; + try + FillChar(Overlapped, Sizeof(Overlapped), 0); + Overlapped.hEvent := FEvent.Handle; + if not ReadFile(FHandle, Buf, Count, dWord(Result), + @Overlapped) and (GetLastError <> ERROR_IO_PENDING) then + begin + ErrorCode := GetLastError; + RaiseCommError(sReadError, ErrorCode); + end; + if FEvent.WaitFor(FReadTimeout) <> wrSignaled then + Result := -1 + else + begin + GetOverlappedResult(Handle, Overlapped, dWord(Result), False); + FEvent.ResetEvent; + end; + finally + Unlock; + end; +end; + +function TCustomComm.InQueCount: Integer; +var + ComStat: TComStat; + Errors: dword; +begin + if Enabled then + begin + ClearCommError(FHandle, Errors, @ComStat); + Result := ComStat.cbInQue; + end else Result := -1; +end; + +function TCustomComm.OutQueCount: Integer; +var + ComStat: TComStat; + Errors: dword; +begin + if Enabled then + begin + ClearCommError(FHandle, Errors, @ComStat); + Result := ComStat.cbOutQue; + end else Result := -1; +end; + +procedure TCustomComm.PurgeIn; +begin + if Enabled then + PurgeComm(FHandle, PurgeRead); +end; + +procedure TCustomComm.PurgeOut; +begin + if Enabled then + PurgeComm(FHandle, PurgeWrite); +end; + +procedure TCustomComm.SetDeviceName(const Value: string); +begin + if FDeviceName <> Value then + begin + CheckOpen; + FDeviceName := Value; + end; +end; + +procedure TCustomComm.SetMonitorEvents(Value: TCommEventTypes); +begin + if FMonitorEvents <> Value then + begin + CheckOpen; + FMonitorEvents := Value; + end; +end; + +procedure TCustomComm.SetReadBufSize(Value: Integer); +begin + if FReadBufSize <> Value then + begin + CheckOpen; + FReadBufSize := Value; + end; +end; + +procedure TCustomComm.SetWriteBufSize(Value: Integer); +begin + if FWriteBufSize <> Value then + begin + CheckOpen; + FWriteBufSize := Value; + end; +end; + +procedure TCustomComm.SetBaudRate(Value: TBaudRate); +begin + if FBaudRate <> Value then + begin + FBaudRate := Value; + UpdateDataControlBlock; + end; +end; + +procedure TCustomComm.SetParity(Value: TParity); +begin + if FParity <> Value then + begin + FParity := Value; + UpdateDataControlBlock; + end; +end; + +procedure TCustomComm.SetStopbits(Value: TStopbits); +begin + if FStopBits <> Value then + begin + FStopbits := Value; + UpdateDataControlBlock; + end; +end; + +procedure TCustomComm.SetDataBits(Value: TDatabits); +begin + if FDataBits <> Value then + begin + FDataBits:=Value; + UpdateDataControlBlock; + end; +end; + +procedure TCustomComm.SetOptions(Value: TCommOptions); +begin + if FOptions <> Value then + begin + FOptions := Value; + UpdateDataControlBlock; + end; +end; + +procedure TCustomComm.SetFlowControl(Value: TFlowControl); +begin + if FFlowControl <> Value then + begin + FFlowControl := Value; + UpdateDataControlBlock; + end; +end; + +procedure TCustomComm.HandleCommEvent(Sender: TObject; Status: dword); +var + ComStat: TComStat; + Errors: dword; +begin + ClearCommError(FHandle, Errors, @ComStat); + if Status and EV_BREAK > 0 then + if assigned(FOnBreak) then FOnBreak(self); + if Status and EV_CTS > 0 then + if assigned(FOnCts) then FOnCts(self); + if Status and EV_DSR > 0 then + if assigned(FOnDsr) then FOnDsr(self); + if Status and EV_ERR > 0 then + if assigned(FOnError) then FOnError(self, Errors); + if Status and EV_RING > 0 then + if assigned(FOnRing) then FOnRing(self); + if Status and EV_RLSD > 0 then + if assigned(FOnRlsd) then FOnRlsd(self); + if Status and EV_RXCHAR > 0 then + if ComStat.cbInQue > 0 then + if assigned(FOnRxChar) then FOnRxChar(self, ComStat.cbInQue); + if Status and EV_RXFLAG > 0 then + if assigned(FOnRxFlag) then FOnRxFlag(self); + if Status and EV_TXEMPTY > 0 then + if assigned(FOnTxEmpty) then FOnTxEmpty(self); +end; + +function TCustomComm.GetModemState(Index: Integer): boolean; +var + Flag, State: dword; +begin + case Index of + 1: State := MS_CTS_ON; + 2: State := MS_DSR_ON; + 3: State := MS_RING_ON; + 4: State := MS_RLSD_ON; + else + State := 0; + end; + Result := false; + if Enabled then + if GetCommModemStatus(FHandle, Flag) then + Result := (Flag and State > 0); +end; + +function TCustomComm.GetComState(Index: Integer): Boolean; +var + Flag: TComStateFlag; + ComStat: TComStat; + Errors: dword; +begin + case Index of + 1: Flag := fCtlHold; + 2: Flag := fDsrHold; + 3: Flag := fRlsHold; + 4: Flag := fXoffHold; + 5: Flag := fXOffSent; + else + Flag := fCtlHold; + end; + Result := false; + if Enabled then + begin + ClearCommError(FHandle, Errors, @ComStat); + Result := Flag in ComStat.Flags; + end; +end; + + +procedure TCustomComm.UpdateDataControlBlock; +var + OptIndex: TCommOption; +begin + if Enabled then + begin + GetCommState(FHandle, FDCB); + + FDCB.BaudRate := CommBaudRates[FBaudRate]; + FDCB.Parity := CommParity[FParity]; + FDCB.Stopbits := CommStopbits[FStopbits]; + FDCB.Bytesize := CommDatabits[FDatabits]; + FDCB.XonChar := FEventChars.XonChar; + FDCB.XoffChar := FEventChars.XOffChar; + FDCB.ErrorChar := FEventChars.ErrorChar; + FDCB.EofChar := FEventChars.EofChar; + FDCB.EvtChar := FEventChars.EvtChar; + FDCB.XonLim := FReadBufSize div 4; + FDCB.XoffLim := FReadBufSize div 4; + + InitHandshaking(FDCB); + + for OptIndex := coParityCheck to coNullStrip do + if OptIndex in FOptions then FDCB.Flags := FDCB.Flags or CommOptions[OptIndex] + else FDCB.Flags := FDCB.Flags and not CommOptions[OptIndex]; + + if not SetCommState(FHandle, FDCB) then + RaiseCommError(sUpdateDCBErr, GetLastError); + end; +end; + +procedure TCustomComm.EscapeComm(Flag: Integer); +var + Escaped: Boolean; +begin + if Enabled then + begin + Escaped := EscapeCommFunction(FHandle, Flag); + if not Escaped then + RaiseCommError(SEscFuncError, GetLastError); + end else RaiseCommError(SPortNotOpen, -1); +end; + +procedure TCustomComm.SetDTRState(State: boolean); +const + DTR: array[boolean] of Integer = (CLRDTR, SETDTR); +begin + EscapeComm(DTR[State]); +end; + +procedure TCustomComm.SetRTSState(State: boolean); +const + RTS: array[boolean] of Integer = (CLRRTS, SETRTS); +begin + EscapeComm(RTS[State]); +end; + +procedure TCustomComm.SetBREAKState(State: Boolean); +const + BREAK: array[boolean] of Integer = (CLRBREAK, SETBREAK); +begin + EscapeComm(BREAK[State]); + if Enabled then + PurgeComm(FHandle, PurgeReadWrite); +end; + +procedure TCustomComm.SetXONState(State: Boolean); +const + XON: array[boolean] of Integer = (SETXOFF, SETXON); +begin + EscapeComm(XON[State]); +end; + +procedure TCustomComm.UpdateCommTimeouts; +var + CommTimeouts: TCommTimeouts; +begin + FillChar(CommTimeOuts, Sizeof(CommTimeOuts), 0); + CommTimeOuts.ReadIntervalTimeout := MAXDWORD; + if not SetCommTimeOuts(FHandle, CommTimeOuts) then + RaiseCommError(sCommTimeoutsErr, GetLastError); +end; + +procedure TCustomComm.InitHandshaking(var DCB: TDCB); +begin + case FFlowControl of + fcNone: //Clear all flags + DCB.Flags := fBinary; + fcDefault:; //do nothing; + fcCTS: + DCB.Flags := DCB.Flags or fOutxCtsFlow or fRtsControlHandshake; + fcDTR: + DCB.Flags := DCB.Flags or fOutxDsrFlow or fDtrControlHandshake; + fcSoftware: + DCB.Flags := DCB.Flags or fOutX or fInX; + end; +end; + + +procedure Register; +begin + RegisterComponents('Varian Freeware', [TComm]); +end; + +end. diff --git a/lib/async32_x/CommObjs.dcu b/lib/async32_x/CommObjs.dcu new file mode 100644 index 00000000..39c45c96 Binary files /dev/null and b/lib/async32_x/CommObjs.dcu differ diff --git a/lib/async32_x/CommObjs.pas b/lib/async32_x/CommObjs.pas new file mode 100644 index 00000000..2357d793 --- /dev/null +++ b/lib/async32_x/CommObjs.pas @@ -0,0 +1,143 @@ +//****************************************************************************** +// VARIAN ASYNC32 COMPONENT +// (c) VARIAN SOFTWARE SERVICES NL 1996-1998 +// ALL RIGHTS RESERVED +//****************************************************************************** +unit CommObjs; + +interface + +uses + Sysutils, Windows, Messages, Classes; + + +type + THandleObject = class(TObject) + private + FHandle: THandle; + FError: Integer; + public + destructor Destroy; override; + property Handle: THandle read FHandle; + property Error: Integer read FError; + end; + + TEventWaitResult = (wrSignaled, wrTimeout, wrAbandoned, wrError); + + TEvent = class(THandleObject) + public + constructor Create(EventAttributes: PSecurityAttributes; ManualReset, + InitialState: Boolean; const Name: string); + function WaitFor(Timeout: dWord): TEventWaitResult; + procedure SetEvent; + procedure ResetEvent; + end; + + TSimpleEvent = class(TEvent) + public + constructor Create; + end; + + TCriticalSection = class(TObject) + private + FSection: TRTLCriticalSection; + public + constructor Create; + destructor Destroy; override; + procedure Acquire; + procedure Release; + procedure Enter; + procedure Leave; + end; + +implementation + + +//THandleObject + +destructor THandleObject.Destroy; +begin + CloseHandle(FHandle); + inherited Destroy; +end; + +//TEvent + +constructor TEvent.Create(EventAttributes: PSecurityAttributes; ManualReset, + InitialState: Boolean; const Name: string); +begin + FHandle := CreateEvent(EventAttributes, ManualReset, InitialState, PChar(Name)); +end; + +function TEvent.WaitFor(Timeout: dWord): TEventWaitResult; +begin + case WaitForSingleObject(Handle, Timeout) of + WAIT_ABANDONED: + Result := wrAbandoned; + WAIT_OBJECT_0: + Result := wrSignaled; + WAIT_TIMEOUT: + Result := wrTimeout; + WAIT_FAILED: + begin + Result := wrError; + FError := GetLastError; + end; + else + Result := wrError; + end; +end; + +procedure TEvent.SetEvent; +begin + Windows.SetEvent(Handle); +end; + +procedure TEvent.ResetEvent; +begin + Windows.ResetEvent(Handle); +end; + +//TSimpleEvent + +constructor TSimpleEvent.Create; +begin + FHandle := CreateEvent(nil, True, False, nil); +end; + +// TCriticalSection + +constructor TCriticalSection.Create; +begin + inherited Create; + InitializeCriticalSection(FSection); +end; + +destructor TCriticalSection.Destroy; +begin + DeleteCriticalSection(FSection); + inherited Destroy; +end; + +procedure TCriticalSection.Acquire; +begin + EnterCriticalSection(FSection); +end; + +procedure TCriticalSection.Release; +begin + LeaveCriticalSection(FSection); +end; + +procedure TCriticalSection.Enter; +begin + Acquire; +end; + +procedure TCriticalSection.Leave; +begin + Release; +end; + + +end. diff --git a/lib/async32_x/CommReg.bpl b/lib/async32_x/CommReg.bpl new file mode 100644 index 00000000..1384c3d6 Binary files /dev/null and b/lib/async32_x/CommReg.bpl differ diff --git a/lib/async32_x/CommReg.dcp b/lib/async32_x/CommReg.dcp new file mode 100644 index 00000000..7756697b Binary files /dev/null and b/lib/async32_x/CommReg.dcp differ diff --git a/lib/async32_x/CommReg.dcu b/lib/async32_x/CommReg.dcu new file mode 100644 index 00000000..88568a2a Binary files /dev/null and b/lib/async32_x/CommReg.dcu differ diff --git a/lib/async32_x/CommReg.dof b/lib/async32_x/CommReg.dof new file mode 100644 index 00000000..eef02130 --- /dev/null +++ b/lib/async32_x/CommReg.dof @@ -0,0 +1,83 @@ +[FileVersion] +Version=6.0 +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=0 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription=Varian Async32 Component +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages=vcl;rtl;vclx;VclSmp;vclshlctrls;IcsDel60;user +Conditionals= +DebugSourceDirs= +UsePackages=0 +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1041 +CodePage=932 +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= diff --git a/lib/async32_x/CommReg.dpk b/lib/async32_x/CommReg.dpk new file mode 100644 index 00000000..2b061467 --- /dev/null +++ b/lib/async32_x/CommReg.dpk @@ -0,0 +1,37 @@ +package CommReg; + +{$R *.res} +{$R 'CommInt.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'Varian Async32 Component '} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl; + +contains + CommObjs in 'CommObjs.pas', + CommInt in 'CommInt.pas'; + +end. diff --git a/lib/async32_x/CommReg.res b/lib/async32_x/CommReg.res new file mode 100644 index 00000000..ee17f64d Binary files /dev/null and b/lib/async32_x/CommReg.res differ diff --git a/lib/async32_x/CommReg.~dpk b/lib/async32_x/CommReg.~dpk new file mode 100644 index 00000000..78ef33e4 --- /dev/null +++ b/lib/async32_x/CommReg.~dpk @@ -0,0 +1,37 @@ +package CommReg; + +{$R *.RES} +{$R 'CommInt.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'Varian Async32 Component '} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl40; + +contains + CommObjs in 'CommObjs.pas', + CommInt in 'CommInt.pas'; + +end. diff --git a/lib/async32_x/Demo.dpr b/lib/async32_x/Demo.dpr new file mode 100644 index 00000000..d85e650d --- /dev/null +++ b/lib/async32_x/Demo.dpr @@ -0,0 +1,13 @@ +program Demo; + +uses + Forms, + formMain in 'formMain.pas' {frmMain}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TfrmMain, frmMain); + Application.Run; +end. diff --git a/lib/async32_x/Demo.res b/lib/async32_x/Demo.res new file mode 100644 index 00000000..ee17f64d Binary files /dev/null and b/lib/async32_x/Demo.res differ diff --git a/lib/async32_x/Readme.txt b/lib/async32_x/Readme.txt new file mode 100644 index 00000000..56e62796 --- /dev/null +++ b/lib/async32_x/Readme.txt @@ -0,0 +1,32 @@ +****************************************************************************** + VARIAN ASYNC32 COMPONENT + (c) VARIAN SOFTWARE SERVICES NL 1996-1998 + ALL RIGHTS RESERVED +****************************************************************************** + +Subject: Async32 Component +Version: 1.49 +Platform: Delphi 4, Win95, NT +Date: 2 June 1997 +Last update: Oktober 1998 +Release: Freeware + +if you make any modifications to the source, please send us a copy. +We will verify your changes and give you proper credit when included. + +Please send any questions, remarks or suggestions to our following +address: Varian@worldaccess.nl + +See WHATSNEW.TXT for the latest updates... + +---------------------------------------------------------------------------- + Our thanks goes to all the people who helped creating and + testing this component for their support and suggestions. +---------------------------------------------------------------------------- + +Varian Software Services NL +The Netherlands +Email: Varian@Wxs.nl + + + *** diff --git a/lib/async32_x/Whatsnew.txt b/lib/async32_x/Whatsnew.txt new file mode 100644 index 00000000..bf3ffa60 --- /dev/null +++ b/lib/async32_x/Whatsnew.txt @@ -0,0 +1,108 @@ +******************************************************************************* + VARIAN ASYNC32 COMPONENT + (c) VARIAN SOFTWARE SERVICES NL 1996-1998 + ALL RIGHTS RESERVED +******************************************************************************* + + + +*** Version 1.49 + +- Release for Delphi 4 + +HISTORY + +** Version 1.26 + +- First, our special thanks goes to: + + Laco Laszlo + Czech Republic + E-mail: lacola@usa.net + + David J Rose + Senior Software Engineer + NexSys + E-mail: DavidRose@nexsys.demon.co.uk + + and all the others who contributed their suggestions... + + +- implementation of Exceptions and Handling + +- Removed OnOpenEvent, Error parameter replaced by exceptions. + ProviderSubtype parameter replaced by public property + +- Fixed write statement bug by setting the WriteCommTimeouts <> 0 + +- Write statement now reports the correct number of bytes send + +- The read and write statements now report an errorcode -1 when IO is pending + instead of returning zero bytecount. This gives the application the + opportunity to simply resend or cancel the operation. + +- Moved the XonChar and XOffChar to a new class object "TCommEventChars" + +- Changed properties WriteBufferSize, ReadBufferSize in WriteBufSize, ReadBufSize. + +- Removed all numeric "32" references, TComm32 is now called TComm. + +- Changed CommEscapeFunctions DTR, RTS, BREAK, XON functions in procedures + procedure SetDTRState(State: Boolean); + procedure SetRTSState(State: Boolean); + procedure SetBREAKState(State: Boolean); + procedure SetXONState(State: Boolean); + +- Added help documentation regarding properties, methods and events. + +- Some internal syntaxis rewrites + + + +* VERSION 1.01 + +- The Thread is now created in a "suspended" state and is + resumed after initialization of all variables. + By Gary Weinfurther + +- Added additional code to Escapecomm function to ensure + correct dataflow. + +- Rewritten the "write" procedure. It should work fine now. + +- Updated the demo program to test XON/XOFF flags. + + +* VERSION 1.0 + +-Changed the receive part for the demo application. + +-added device indentification to OpenEvent, see provider subtypes for + more info. + +-added device DCB profile to open procedure + +-added additional port-settings through "Options" property + +-added missing escapecomm function "xon/xoff" + +-the component waited (infinite) for write operations to be completed after + XOff or Break. Fixed. + The function now returns zero bytes written on an IOPending event. + Initial idea by Piet Jansen + +-Removed "signal" extensions from event properties. + sorry for the inconvenience this may cause. + +-Moved Event calls to dynamic procedures in order to enhance inheritance. + Initial idea by Tim Evans + +-Removed some Delphi VCL units from the uses clause. + +-Added handshake handling + by Gyula Mszros (Mr. InnMaxX), Hungary + e-mail: 100263.1465@compuserve.com + + + + *** diff --git a/lib/async32_x/formMain.dcu b/lib/async32_x/formMain.dcu new file mode 100644 index 00000000..da32de6a Binary files /dev/null and b/lib/async32_x/formMain.dcu differ diff --git a/lib/async32_x/formMain.dfm b/lib/async32_x/formMain.dfm new file mode 100644 index 00000000..48a9ffb3 Binary files /dev/null and b/lib/async32_x/formMain.dfm differ diff --git a/lib/async32_x/formMain.pas b/lib/async32_x/formMain.pas new file mode 100644 index 00000000..511dc541 --- /dev/null +++ b/lib/async32_x/formMain.pas @@ -0,0 +1,315 @@ +unit formMain; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + CommInt, StdCtrls, ComCtrls; + +type + TfrmMain = class(TForm) + Comm1: TComm; + Memo1: TMemo; + Memo2: TMemo; + ButtonOpen: TButton; + ButtonClose: TButton; + ButtonReset: TButton; + EditTransmit: TEdit; + CheckBoxAddLinefeed: TCheckBox; + ButtonTransmit: TButton; + StatusBar1: TStatusBar; + LabelBaudrate: TLabel; + LabelDataBits: TLabel; + LabelStopbits: TLabel; + LabelParity: TLabel; + ComboBaudrate: TComboBox; + ComboDatabits: TComboBox; + ComboStopbits: TComboBox; + ComboParity: TComboBox; + Button1: TButton; + LabelDevName: TLabel; + EditDevName: TEdit; + CheckBoxRTS: TCheckBox; + CheckBoxDTR: TCheckBox; + CheckBoxBREAK: TCheckBox; + CheckBoxXON: TCheckBox; + procedure FormCreate(Sender: TObject); + procedure ButtonOpenClick(Sender: TObject); + procedure ButtonCloseClick(Sender: TObject); + procedure ButtonResetClick(Sender: TObject); + procedure ButtonTransmitClick(Sender: TObject); + procedure Comm1RxChar(Sender: TObject; Count: Integer); + procedure Comm1RxFlag(Sender: TObject); + procedure Comm1TxEmpty(Sender: TObject); + procedure Comm1Break(Sender: TObject); + procedure Comm1Cts(Sender: TObject); + procedure Comm1Dsr(Sender: TObject); + procedure Comm1Error(Sender: TObject; Errors: Integer); + procedure Comm1Ring(Sender: TObject); + procedure Comm1Rlsd(Sender: TObject); + procedure ComboBaudrateChange(Sender: TObject); + procedure ComboDatabitsChange(Sender: TObject); + procedure ComboStopbitsChange(Sender: TObject); + procedure ComboParityChange(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure CheckBoxRTSClick(Sender: TObject); + procedure CheckBoxDTRClick(Sender: TObject); + procedure CheckBoxBREAKClick(Sender: TObject); + procedure CheckBoxXONClick(Sender: TObject); + private + LineData: string; + procedure HandleException(Sender: TObject; E: Exception); + public + { Public declarations } + end; + +var + frmMain: TfrmMain; + +implementation + +{$R *.DFM} + + +const + OnOff: array[0..1] of string = ('Off', 'On'); + +procedure TfrmMain.FormCreate(Sender: TObject); +begin + Application.OnException := HandleException; + + with ComboBaudrate do + ItemIndex := Items.IndexOf('cbr38400'); + with ComboDataBits do + ItemIndex := Items.IndexOf('da8'); + with ComboParity do + ItemIndex := Items.IndexOf('paNone'); + with ComboStopbits do + ItemIndex := Items.IndexOf('sb10'); + + Comm1.BaudRate := TBaudrate(ComboBaudrate.ItemIndex); + Comm1.Databits := TDataBits(ComboDatabits.ItemIndex); + Comm1.Parity := TParity(ComboParity.ItemIndex); + Comm1.StopBits := TStopBits(ComboStopbits.ItemIndex); + + EditDevName.Text := Comm1.DeviceName; +end; + +procedure TfrmMain.HandleException(Sender: TObject; E: Exception); +begin + if E is ECommError then + with E as ECommError do + ShowMessage('Async32 error: ' + Message); +end; + +procedure TfrmMain.ButtonOpenClick(Sender: TObject); +begin + Comm1.DeviceName := EditDevName.Text; + Comm1.Open; + Comm1.SetRTSState(true); + Comm1.SetDTRState(true); + Memo1.Lines.add('Device ready: ' + Comm1.DeviceName); +//Memo1.Lines.add(GetProviderSubtypeName(Comm1.ProviderSubtype)); +//UpdateControls; +end; + +procedure TfrmMain.ButtonCloseClick(Sender: TObject); +begin + Comm1.Close; + Memo1.Lines.Add('Device closed: ' + Comm1.DeviceName); +end; + +procedure TfrmMain.ButtonResetClick(Sender: TObject); +begin + Memo1.Lines.Clear; + Memo2.Lines.Clear; +end; + +procedure TfrmMain.ButtonTransmitClick(Sender: TObject); +var + S: string; + Count: Integer; +begin + S := EditTransmit.Text; + if CheckBoxAddLinefeed.Checked then + S := S + #13#10; + Count := Length(S); + Count := Comm1.Write(S[1], Count); + if Count = -1 then + Memo1.Lines.add('Error writing to: ' + Comm1.DeviceName) + else Memo1.Lines.add('Transmitting ' + IntToStr(Count) + ' characters'); +end; + +procedure TfrmMain.Comm1RxChar(Sender: TObject; Count: Integer); +type + CharBuf = array[0..9999] of Char; +var + Buffer: ^CharBuf; + Bytes, P: Integer; +begin + GetMem(Buffer, Comm1.ReadBufSize); + try + Memo1.Lines.add('RxChar signal detected...'); + Fillchar(Buffer^, Comm1.ReadBufSize, 0); + Bytes := Comm1.Read(Buffer^, Count); + if Bytes = -1 then + Memo1.Lines.add('Error reading incoming data...') + else + begin + Memo1.Lines.add('Reading ' + IntToStr(Bytes) + ' characters'); + for P := 0 to Bytes - 1 do + begin + case Buffer^[P] of + #0, #10:; + #13: begin + + Memo2.Lines.Add(LineData); + LineData := ''; + end; + else + begin + LineData := LineData + CharBuf(Buffer^)[P]; + end; + end; //case + end; //for do + end; + + Application.ProcessMessages; + finally + FreeMem(Buffer); + end; +end; + +procedure TfrmMain.Comm1RxFlag(Sender: TObject); +begin + Memo1.Lines.add('RxFlag signal detected...'); +end; + +procedure TfrmMain.Comm1TxEmpty(Sender: TObject); +begin + Memo1.Lines.add('TxEmpty signal detected...'); +end; + +procedure TfrmMain.Comm1Break(Sender: TObject); +begin + Memo1.Lines.add('Break signal detected...'); +end; + +procedure TfrmMain.Comm1Cts(Sender: TObject); +begin + Memo1.Lines.add('CTS: ' + OnOff[ord(Comm1.CTS)]); +end; + +procedure TfrmMain.Comm1Dsr(Sender: TObject); +begin + Memo1.Lines.add('DSR: ' + OnOff[ord(Comm1.DSR)]); +end; + +procedure TfrmMain.Comm1Ring(Sender: TObject); +begin + Memo1.Lines.add('RING: ' + OnOff[ord(Comm1.Ring)]); +end; + +procedure TfrmMain.Comm1Rlsd(Sender: TObject); +begin + Memo1.Lines.add('RLSD: ' + OnOff[ord(Comm1.RLSD)]); +end; + +procedure TfrmMain.Comm1Error(Sender: TObject; Errors: Integer); +begin + if (Errors and CE_BREAK > 0) then + Memo1.Lines.add('The hardware detected a break condition.'); + if (Errors and CE_DNS > 0) then + Memo1.Lines.add('Windows 95 only: A parallel device is not selected.'); + if (Errors and CE_FRAME > 0) then + Memo1.Lines.add('The hardware detected a framing error.'); + if (Errors and CE_IOE > 0) then + Memo1.Lines.add('An I/O error occurred during communications with the device.'); + if (Errors and CE_MODE > 0) then + begin + Memo1.Lines.add('The requested mode is not supported, or the hFile parameter'); + Memo1.Lines.add('is invalid. If this value is specified, it is the only valid error.'); + end; + if (Errors and CE_OOP > 0) then + Memo1.Lines.add('Windows 95 only: A parallel device signaled that it is out of paper.'); + if (Errors and CE_OVERRUN > 0) then + Memo1.Lines.add('A character-buffer overrun has occurred. The next character is lost.'); + if (Errors and CE_PTO > 0) then + Memo1.Lines.add('Windows 95 only: A time-out occurred on a parallel device.'); + if (Errors and CE_RXOVER > 0) then + begin + Memo1.Lines.add('An input buffer overflow has occurred. There is either no'); + Memo1.Lines.add('room in the input buffer, or a character was received after'); + Memo1.Lines.add('the end-of-file (EOF) character.'); + end; + if (Errors and CE_RXPARITY > 0) then + Memo1.Lines.add('The hardware detected a parity error.'); + if (Errors and CE_TXFULL > 0) then + begin + Memo1.Lines.add('The application tried to transmit a character, but the output'); + Memo1.Lines.add('buffer was full.'); + end; +end; + +procedure TfrmMain.ComboBaudrateChange(Sender: TObject); +begin + Comm1.BaudRate := TBaudrate(ComboBaudrate.ItemIndex); + Memo1.Lines.add('Baudrate: ' + ComboBaudrate.Text); +end; + +procedure TfrmMain.ComboDatabitsChange(Sender: TObject); +begin + Comm1.Databits := TDataBits(ComboDatabits.ItemIndex); + Memo1.Lines.add('Databits: ' + ComboDatabits.Text); +end; + +procedure TfrmMain.ComboStopbitsChange(Sender: TObject); +begin + Comm1.StopBits := TStopBits(ComboStopbits.ItemIndex); + Memo1.Lines.add('StopBits: ' + ComboStopbits.Text); +end; + +procedure TfrmMain.ComboParityChange(Sender: TObject); +begin + Comm1.Parity := TParity(ComboParity.ItemIndex); + Memo1.Lines.add('Parity: ' + ComboParity.Text); +end; + +procedure TfrmMain.Button1Click(Sender: TObject); +var + I: Integer; + S: string; +begin + if MessageDlg('This will sent the input a thousand times, continue?', + mtConfirmation, [mbOk, mbCancel], 0) <> mrOk then exit; + S := EditTransmit.Text; + if CheckBoxAddLinefeed.Checked then + S := S + #13#10; + for I := 0 to 1000 do + begin + Comm1.Write(S[1], Length(S)); + application.ProcessMessages; + end; +end; + +procedure TfrmMain.CheckBoxRTSClick(Sender: TObject); +begin + Comm1.SetRTSState(CheckBoxRTS.Checked); +end; + +procedure TfrmMain.CheckBoxDTRClick(Sender: TObject); +begin + Comm1.SetDTRState(CheckBoxDTR.Checked); +end; + +procedure TfrmMain.CheckBoxBREAKClick(Sender: TObject); +begin + Comm1.SetBREAKState(CheckBoxBREAK.Checked); +end; + +procedure TfrmMain.CheckBoxXONClick(Sender: TObject); +begin + Comm1.SetXONState(CheckBoxXON.Checked); +end; + +end. diff --git a/lib/cdd4/CPDReg.dcu b/lib/cdd4/CPDReg.dcu new file mode 100644 index 00000000..cdeb12f2 Binary files /dev/null and b/lib/cdd4/CPDReg.dcu differ diff --git a/lib/cdd4/CPDReg.pas b/lib/cdd4/CPDReg.pas new file mode 100644 index 00000000..0f3693f6 --- /dev/null +++ b/lib/cdd4/CPDReg.pas @@ -0,0 +1,25 @@ +unit CPDReg; + +interface + +procedure Register; + +implementation + +uses + // Delphi units + Classes, + // ComDrv32 units + CPDrv; + +{$R ComDrv32.dcr} + +const + TargetTab = 'System'; + +procedure Register; +begin + RegisterComponents( TargetTab, [CPDrv.TCommPortDriver]); +end; + +end. diff --git a/lib/cdd4/CPDrv.dcu b/lib/cdd4/CPDrv.dcu new file mode 100644 index 00000000..83b060b9 Binary files /dev/null and b/lib/cdd4/CPDrv.dcu differ diff --git a/lib/cdd4/CPDrv.pas b/lib/cdd4/CPDrv.pas new file mode 100644 index 00000000..33188818 --- /dev/null +++ b/lib/cdd4/CPDrv.pas @@ -0,0 +1,1136 @@ +//------------------------------------------------------------------------ +// UNIT : CPDrv.pas +// CONTENTS : TCommPortDriver component +// VERSION : 2.1 +// TARGET : (Inprise's) Borland Delphi 4.0 +// AUTHOR : Marco Cocco +// STATUS : Freeware +// INFOS : Implementation of TCommPortDriver component: +// - non multithreaded serial I/O +// KNOWN BUGS : none +// COMPATIBILITY : Windows 95/98/NT/2000 +// REPLACES : TCommPortDriver v2.00 (Delphi 4.0) +// TCommPortDriver v1.08/16 (Delphi 1.0) +// TCommPortDriver v1.08/32 (Delphi 2.0/3.0) +// BACK/COMPAT. : partial - a lot of properties have been renamed +// RELEASE DATE : 06/06/2000 +// (Replaces v2.0 released on 30/NOV/1998) +//------------------------------------------------------------------------ +// FOR UPDATES : - sorry, no home page - +// BUGS REPORT : mail to : mcocco@libero.it +// or: ditrek@tiscalinet.it +//------------------------------------------------------------------------ +// +// Copyright (c) 1996-2000 by Marco Cocco. All rights reseved. +// Copyright (c) 1996-2000 by d3k Software Company. All rights reserved. +// +//****************************************************************************** +//* Permission to use, copy, modify, and distribute this software and its * +//* documentation without fee for any purpose is hereby granted, * +//* provided that the above copyright notice appears on all copies and that * +//* both that copyright notice and this permission notice appear in all * +//* supporting documentation. * +//* * +//* NO REPRESENTATIONS ARE MADE ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY * +//* PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. * +//* NEITHER MARCO COCCO OR D3K SHALL BE LIABLE FOR ANY DAMAGES SUFFERED BY * +//* THE USE OF THIS SOFTWARE. * +//****************************************************************************** + +unit CPDrv; + +interface + +uses + // Delphi units + Windows, Messages, SysUtils, Classes, Forms + // ComDrv32 units + ; + +//------------------------------------------------------------------------ +// Property types +//------------------------------------------------------------------------ + +type + // Baud Rates (custom or 110...256k bauds) + TBaudRate = ( brCustom, + br110, br300, br600, br1200, br2400, br4800, + br9600, br14400, br19200, br38400, br56000, + br57600, br115200, br128000, br256000 ); + // Port Numbers ( custom or COM1..COM16 ) + TPortNumber = ( pnCustom, + pnCOM1, pnCOM2, pnCOM3, pnCOM4, pnCOM5, pnCOM6, pnCOM7, + pnCOM8, pnCOM9, pnCOM10, pnCOM11, pnCOM12, pnCOM13, + pnCOM14, pnCOM15, pnCOM16 ); + // Data bits ( 5, 6, 7, 8 ) + TDataBits = ( db5BITS, db6BITS, db7BITS, db8BITS ); + // Stop bits ( 1, 1.5, 2 ) + TStopBits = ( sb1BITS, sb1HALFBITS, sb2BITS ); + // Parity ( None, odd, even, mark, space ) + TParity = ( ptNONE, ptODD, ptEVEN, ptMARK, ptSPACE ); + // Hardware Flow Control ( None, None + RTS always on, RTS/CTS ) + THwFlowControl = ( hfNONE, hfNONERTSON, hfRTSCTS ); + // Software Flow Control ( None, XON/XOFF ) + TSwFlowControl = ( sfNONE, sfXONXOFF ); + // What to do with incomplete (incoming) packets ( Discard, Pass ) + TPacketMode = ( pmDiscard, pmPass ); + +//------------------------------------------------------------------------ +// Event types +//------------------------------------------------------------------------ + +type + // RX event ( packet mode disabled ) + TReceiveDataEvent = procedure( Sender: TObject; DataPtr: pointer; DataSize: DWORD ) of object; + // RX event ( packed mode enabled ) + TReceivePacketEvent = procedure( Sender: TObject; Packet: pointer; DataSize: DWORD ) of object; + +//------------------------------------------------------------------------ +// Other types +//------------------------------------------------------------------------ + +type + // Line status ( Clear To Send, Data Set Ready, Ring, Carrier Detect ) + TLineStatus = ( lsCTS, lsDSR, lsRING, lsCD ); + // Set of line status + TLineStatusSet = set of TLineStatus; + +//------------------------------------------------------------------------ +// Constants +//------------------------------------------------------------------------ + +const + RELEASE_NOCLOSE_PORT = HFILE(INVALID_HANDLE_VALUE-1); + +//------------------------------------------------------------------------ +// TCommPortDriver component +//------------------------------------------------------------------------ + +type + TCommPortDriver = class( TComponent ) + protected + // Device Handle ( File Handle ) + FHandle : HFILE; + // # of the COM port to use, or pnCustom to use custom port name + FPort : TPortNumber; + // Custom port name ( usually '\\.\COMn', with n = 1..x ) + FPortName : string; + // COM Port speed (brXXX) + FBaudRate : TBaudRate; + // Baud rate ( actual numeric value ) + FBaudRateValue : DWORD; + // Data bits size (dbXXX) + FDataBits : TDataBits; + // How many stop bits to use (sbXXX) + FStopBits : TStopBits; + // Type of parity to use (ptXXX) + FParity : TParity; + // Type of hw handshaking (hw flow control) to use (hfXXX) + FHwFlow : THwFlowControl; + // Type of sw handshaking (sw flow control) to use (sFXXX) + FSwFlow : TSwFlowControl; + // Size of the input buffer + FInBufSize : DWORD; + // Size of the output buffer + FOutBufSize : DWORD; + // Size of a data packet + FPacketSize : smallint; + // ms to wait for a complete packet (<=0 = disabled) + FPacketTimeout : integer; + // What to do with incomplete packets (pmXXX) + FPacketMode : TPacketMode; + // Event to raise on data reception (asynchronous) + FOnReceiveData : TReceiveDataEvent; + // Event to raise on packet reception (asynchronous) + FOnReceivePacket : TReceivePacketEvent; + // ms of delay between COM port pollings + FPollingDelay : word; + // Specifies if the DTR line must be enabled/disabled on connect + FEnableDTROnOpen : boolean; + // Output timeout - milliseconds + FOutputTimeout : word; + // Timeout for ReadData + FInputTimeout : DWORD; + // Set to TRUE to prevent hangs when no device connected or + // device is OFF + FCkLineStatus : boolean; + // This is used for the timer + FNotifyWnd : HWND; + // Temporary buffer (RX) - used internally + FTempInBuffer : pointer; + // Time of the first byte of current RX packet + FFirstByteOfPacketTime : DWORD; + // Number of RX polling timer pauses + FRXPollingPauses : integer; + + // Sets the COM port handle + procedure SetHandle( Value: HFILE ); + // Selects the COM port to use + procedure SetPort( Value: TPortNumber ); + // Sets the port name + procedure SetPortName( Value: string ); + // Selects the baud rate + procedure SetBaudRate( Value: TBaudRate ); + // Selects the baud rate ( actual baud rate value ) + procedure SetBaudRateValue( Value: DWORD ); + // Selects the number of data bits + procedure SetDataBits( Value: TDataBits ); + // Selects the number of stop bits + procedure SetStopBits( Value: TStopBits ); + // Selects the kind of parity + procedure SetParity( Value: TParity ); + // Selects the kind of hardware flow control + procedure SetHwFlowControl( Value: THwFlowControl ); + // Selects the kind of software flow control + procedure SetSwFlowControl( Value: TSwFlowControl ); + // Sets the RX buffer size + procedure SetInBufSize( Value: DWORD ); + // Sets the TX buffer size + procedure SetOutBufSize( Value: DWORD ); + // Sets the size of incoming packets + procedure SetPacketSize( Value: smallint ); + // Sets the timeout for incoming packets + procedure SetPacketTimeout( Value: integer ); + // Sets the delay between polling checks + procedure SetPollingDelay( Value: word ); + // Applies current settings to open COM port + function ApplyCOMSettings: boolean; + // Polling proc + procedure TimerWndProc( var msg: TMessage ); + public + // Constructor + constructor Create( AOwner: TComponent ); override; + // Destructor + destructor Destroy; override; + + // Opens the COM port and takes of it. Returns false if something + // goes wrong. + function Connect: boolean; + // Closes the COM port and releases control of it + procedure Disconnect; + // Returns true if COM port has been opened + function Connected: boolean; + // Returns the current state of CTS, DSR, RING and RLSD (CD) lines. + // The function fails if the hardware does not support the control-register + // values (that is, returned set is always empty). + function GetLineStatus: TLineStatusSet; + // Returns true if polling has not been paused + function IsPolling: boolean; + // Pauses polling + procedure PausePolling; + // Re-starts polling (after pause) + procedure ContinuePolling; + // Flushes the rx/tx buffers + function FlushBuffers( inBuf, outBuf: boolean ): boolean; + // Returns number of received bytes in the RX buffer + function CountRX: integer; + // Returns the output buffer free space or 65535 if not connected + function OutFreeSpace: word; + // Sends binary data + function SendData( DataPtr: pointer; DataSize: DWORD ): DWORD; + // Sends binary data. Returns number of bytes sent. Timeout overrides + // the value specifiend in the OutputTimeout property + function SendDataEx( DataPtr: pchar; DataSize, Timeout: DWORD ): DWORD; + // Sends a byte. Returns true if the byte has been sent + function SendByte( Value: byte ): boolean; + // Sends a char. Returns true if the char has been sent + function SendChar( Value: char ): boolean; + // Sends a pascal string (NULL terminated if $H+ (default)) + function SendString( s: string ): boolean; + // Sends a C-style strings (NULL terminated) + function SendZString( s: pchar ): boolean; + // Reads binary data. Returns number of bytes read + function ReadData( DataPtr: pchar; MaxDataSize: DWORD ): DWORD; + // Reads a byte. Returns true if the byte has been read + function ReadByte( var Value: byte ): boolean; + // Reads a char. Returns true if char has been read + function ReadChar( var Value: char ): boolean; + // Set DTR line high (onOff=TRUE) or low (onOff=FALSE). + // You must not use HW handshaking. + procedure ToggleDTR( onOff: boolean ); + // Set RTS line high (onOff=TRUE) or low (onOff=FALSE). + // You must not use HW handshaking. + procedure ToggleRTS( onOff: boolean ); + + // Make the Handle of the COM port public (for TAPI...) [read/write] + property Handle: HFILE read FHandle write SetHandle; + published + // # of the COM Port to use ( or pnCustom for port by name ) + property Port: TPortNumber read FPort write SetPort default pnCOM2; + // Name of COM port + property PortName: string read FPortName write SetPortName; + // Speed ( Baud Rate ) + property BaudRate: TBaudRate read FBaudRate write SetBaudRate default br9600; + // Speed ( Actual Baud Rate value ) + property BaudRateValue: DWORD read FBaudRateValue write SetBaudRateValue default 9600; + // Data bits to use (5..8, for the 8250 the use of 5 data bits with 2 stop + // bits is an invalid combination, as is 6, 7, or 8 data bits with 1.5 stop + // bits) + property DataBits: TDataBits read FDataBits write SetDataBits default db8BITS; + // Stop bits to use (1, 1.5, 2) + property StopBits: TStopBits read FStopBits write SetStopBits default sb1BITS; + // Kind of Parity to use (none,odd,even,mark,space) + property Parity: TParity read FParity write SetParity default ptNONE; + // Kind of Hardware Flow Control to use: + // hfNONE none + // hfNONERTSON no flow control but keep RTS line on + // hfRTSCTS Request-To-Send/Clear-To-Send + property HwFlow: THwFlowControl read FHwFlow write SetHwFlowControl default hfNONERTSON; + // Kind of Software Flow Control to use: + // sfNONE none + // sfXONXOFF XON/XOFF + property SwFlow: TSwFlowControl read FSwFlow write SetSwFlowControl default sfNONE; + // Input Buffer size ( suggested - driver might ignore this setting ! ) + property InBufSize: DWORD read FInBufSize write SetInBufSize default 2048; + // Output Buffer size ( suggested - driver usually ignores this setting ! ) + property OutBufSize: DWORD read FOutBufSize write SetOutBufSize default 2048; + // RX packet size ( this value must be less than InBufSize ) + // A value <= 0 means "no packet mode" ( i.e. standard mode enabled ) + property PacketSize: smallint read FPacketSize write SetPacketSize default -1; + // Timeout (ms) for a complete packet (in RX) + property PacketTimeout: integer read FPacketTimeout write SetPacketTimeout default -1; + // What to do with incomplete packets (in RX) + property PacketMode: TPacketMode read FPacketMode write FPacketMode default pmDiscard; + // ms of delay between COM port pollings + property PollingDelay: word read FPollingDelay write SetPollingDelay default 50; + // Set to TRUE to enable DTR line on connect and to leave it on until disconnect. + // Set to FALSE to disable DTR line on connect. + property EnableDTROnOpen: boolean read FEnableDTROnOpen write FEnableDTROnOpen default true; + // Output timeout (milliseconds) + property OutputTimeout: word read FOutputTimeOut write FOutputTimeout default 500; + // Input timeout (milliseconds) + property InputTimeout: DWORD read FInputTimeOut write FInputTimeout default 200; + // Set to TRUE to prevent hangs when no device connected or device is OFF + property CheckLineStatus: boolean read FCkLineStatus write FCkLineStatus default false; + // Event to raise when there is data available (input buffer has data) + // (called only if PacketSize <= 0) + property OnReceiveData: TReceiveDataEvent read FOnReceiveData write FOnReceiveData; + // Event to raise when there is data packet available (called only if PacketSize > 0) + property OnReceivePacket: TReceivePacketEvent read FOnReceivePacket write FOnReceivePacket; + end; + +function BaudRateOf( bRate: TBaudRate ): DWORD; +function DelayForRX( bRate: TBaudRate; DataSize: DWORD ): DWORD; + +implementation + +const + Win32BaudRates: array[br110..br256000] of DWORD = + ( CBR_110, CBR_300, CBR_600, CBR_1200, CBR_2400, CBR_4800, CBR_9600, + CBR_14400, CBR_19200, CBR_38400, CBR_56000, CBR_57600, CBR_115200, + CBR_128000, CBR_256000 ); + +const + dcb_Binary = $00000001; + dcb_ParityCheck = $00000002; + dcb_OutxCtsFlow = $00000004; + dcb_OutxDsrFlow = $00000008; + dcb_DtrControlMask = $00000030; + dcb_DtrControlDisable = $00000000; + dcb_DtrControlEnable = $00000010; + dcb_DtrControlHandshake = $00000020; + dcb_DsrSensivity = $00000040; + dcb_TXContinueOnXoff = $00000080; + dcb_OutX = $00000100; + dcb_InX = $00000200; + dcb_ErrorChar = $00000400; + dcb_NullStrip = $00000800; + dcb_RtsControlMask = $00003000; + dcb_RtsControlDisable = $00000000; + dcb_RtsControlEnable = $00001000; + dcb_RtsControlHandshake = $00002000; + dcb_RtsControlToggle = $00003000; + dcb_AbortOnError = $00004000; + dcb_Reserveds = $FFFF8000; + +function GetWinPlatform: string; +var ov: TOSVERSIONINFO; +begin + ov.dwOSVersionInfoSize := sizeof(ov); + if GetVersionEx( ov ) then + begin + case ov.dwPlatformId of + VER_PLATFORM_WIN32s: // Win32s on Windows 3.1 + Result := 'W32S'; + VER_PLATFORM_WIN32_WINDOWS: // Win32 on Windows 95/98 + Result := 'W95'; + VER_PLATFORM_WIN32_NT: // Windows NT + Result := 'WNT'; + end; + end + else + Result := '??'; +end; + +function GetWinVersion: DWORD; +var ov: TOSVERSIONINFO; +begin + ov.dwOSVersionInfoSize := sizeof(ov); + if GetVersionEx( ov ) then + Result := MAKELONG( ov.dwMinorVersion, ov.dwMajorVersion ) + else + Result := $00000000; +end; + +function BaudRateOf( bRate: TBaudRate ): DWORD; +begin + if bRate = brCustom then + Result := 0 + else + Result := Win32BaudRates[ bRate ]; +end; + +function DelayForRX( bRate: TBaudRate; DataSize: DWORD ): DWORD; +begin + Result := round( DataSize / (BaudRateOf(bRate) / 10) * 1000 ); +end; + +constructor TCommPortDriver.Create( AOwner: TComponent ); +begin + inherited Create( AOwner ); + // Initialize to default values ----------------------- + // Not connected + FHandle := INVALID_HANDLE_VALUE; + // COM 2 + FPort := pnCOM2; + FPortName := '\\.\COM2'; + // 9600 bauds + FBaudRate := br9600; + FBaudRateValue := BaudRateOf( br9600 ); + // 8 data bits + FDataBits := db8BITS; + // 1 stop bit + FStopBits := sb1BITS; + // no parity + FParity := ptNONE; + // No hardware flow control but RTS on + FHwFlow := hfNONERTSON; + // No software flow control + FSwFlow := sfNONE; + // Input buffer of 2048 bytes + FInBufSize := 2048; + // Output buffer of 2048 bytes + FOutBufSize := 2048; + // Don't pack data + FPacketSize := -1; + // Packet timeout disabled + FPacketTimeout := -1; + // Discard incomplete packets + FPacketMode := pmDiscard; + // Poll COM port every 50ms + FPollingDelay := 50; + // Output timeout of 500ms + FOutputTimeout := 500; + // Timeout for ReadData(), 200ms + FInputTimeout := 200; + // DTR high on connect + FEnableDTROnOpen := true; + // Time not valid ( used by the packing routines ) + FFirstByteOfPacketTime := DWORD(-1); + // Don't check of off-line devices + FCkLineStatus := false; + // Init number of RX polling timer pauses - not paused + FRXPollingPauses := 0; + // Temporary buffer for received data + FTempInBuffer := AllocMem( FInBufSize ); + // Allocate a window handle to catch timer's notification messages + if not (csDesigning in ComponentState) then + FNotifyWnd := AllocateHWnd( TimerWndProc ); +end; + +destructor TCommPortDriver.Destroy; +begin + // Be sure to release the COM port + Disconnect; + // Free the temporary buffer + FreeMem( FTempInBuffer, FInBufSize ); + // Destroy the timer's window + if not (csDesigning in ComponentState) then + DeallocateHWnd( FNotifyWnd ); + // Call inherited destructor + inherited Destroy; +end; + +// The COM port handle made public and writeable. +// This lets you connect to external opened com port. +// Setting ComPortHandle to INVALID_PORT_HANDLE acts as Disconnect. +procedure TCommPortDriver.SetHandle( Value: HFILE ); +begin + // If same COM port then do nothing + if FHandle = Value then + exit; + // If value is RELEASE_NOCLOSE_PORT then stop controlling the COM port + // without closing in + if Value = RELEASE_NOCLOSE_PORT then + begin + // Stop the timer + if Connected then + KillTimer( FNotifyWnd, 1 ); + // No more connected + FHandle := INVALID_HANDLE_VALUE; + end + else + begin + // Disconnect + Disconnect; + // If Value is INVALID_HANDLE_VALUE then exit now + if Value = INVALID_HANDLE_VALUE then + exit; + // Set COM port handle + FHandle := Value; + // Start the timer ( used for polling ) + SetTimer( FNotifyWnd, 1, FPollingDelay, nil ); + end; +end; + +// Selects the COM port to use +procedure TCommPortDriver.SetPort( Value: TPortNumber ); +begin + // Be sure we are not using any COM port + if Connected then + exit; + // Change COM port + FPort := Value; + // Update the port name + if FPort <> pnCustom then + FPortName := Format( '\\.\COM%d', [ord(FPort)] ); +end; + +// Sets the port name +procedure TCommPortDriver.SetPortName( Value: string ); +begin + // Be sure we are not using any COM port + if Connected then + exit; + // Change COM port + FPort := pnCustom; + // Update the port name + FPortName := Value; +end; + +// Selects the baud rate +procedure TCommPortDriver.SetBaudRate( Value: TBaudRate ); +begin + // Set new COM speed + FBaudRate := Value; + if FBaudRate <> brCustom then + FBaudRateValue := BaudRateOf( FBaudRate ); + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +// Selects the baud rate ( actual baud rate value ) +procedure TCommPortDriver.SetBaudRateValue( Value: DWORD ); +begin + // Set new COM speed + FBaudRate := brCustom; + FBaudRateValue := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +// Selects the number of data bits +procedure TCommPortDriver.SetDataBits( Value: TDataBits ); +begin + // Set new data bits + FDataBits := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +// Selects the number of stop bits +procedure TCommPortDriver.SetStopBits( Value: TStopBits ); +begin + // Set new stop bits + FStopBits := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +// Selects the kind of parity +procedure TCommPortDriver.SetParity( Value: TParity ); +begin + // Set new parity + FParity := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +// Selects the kind of hardware flow control +procedure TCommPortDriver.SetHwFlowControl( Value: THwFlowControl ); +begin + // Set new hardware flow control + FHwFlow := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +// Selects the kind of software flow control +procedure TCommPortDriver.SetSwFlowControl( Value: TSwFlowControl ); +begin + // Set new software flow control + FSwFlow := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +// Sets the RX buffer size +procedure TCommPortDriver.SetInBufSize( Value: DWORD ); +begin + // Do nothing if connected + if Connected then + exit; + // Free the temporary input buffer + FreeMem( FTempInBuffer, FInBufSize ); + // Set new input buffer size + if Value > 8192 then + Value := 8192 + else if Value < 128 then + Value := 128; + FInBufSize := Value; + // Allocate the temporary input buffer + FTempInBuffer := AllocMem( FInBufSize ); + // Adjust the RX packet size + SetPacketSize( FPacketSize ); +end; + +// Sets the TX buffer size +procedure TCommPortDriver.SetOutBufSize( Value: DWORD ); +begin + // Do nothing if connected + if Connected then + exit; + // Set new output buffer size + if Value > 8192 then + Value := 8192 + else if Value < 128 then + Value := 128; + FOutBufSize := Value; +end; + +// Sets the size of incoming packets +procedure TCommPortDriver.SetPacketSize( Value: smallint ); +begin + // PackeSize <= 0 if data isn't to be 'packetized' + if Value <= 0 then + FPacketSize := -1 + // If the PacketSize if greater than then RX buffer size then + // increase the RX buffer size + else if DWORD(Value) > FInBufSize then + begin + FPacketSize := Value; + SetInBufSize( FPacketSize ); + end; +end; + +// Sets the timeout for incoming packets +procedure TCommPortDriver.SetPacketTimeout( Value: integer ); +begin + // PacketTimeout <= 0 if packet timeout is to be disabled + if Value < 1 then + FPacketTimeout := -1 + // PacketTimeout cannot be less than polling delay + some extra ms + else if Value < FPollingDelay then + FPacketTimeout := FPollingDelay + (FPollingDelay*40) div 100; +end; + +// Sets the delay between polling checks +procedure TCommPortDriver.SetPollingDelay( Value: word ); +begin + // Make it greater than 4 ms + if Value < 5 then + Value := 5; + // If new delay is not equal to previous value... + if Value <> FPollingDelay then + begin + // Stop the timer + if Connected then + KillTimer( FNotifyWnd, 1 ); + // Store new delay value + FPollingDelay := Value; + // Restart the timer + if Connected then + SetTimer( FNotifyWnd, 1, FPollingDelay, nil ); + // Adjust the packet timeout + SetPacketTimeout( FPacketTimeout ); + end; +end; + +// Apply COM settings +function TCommPortDriver.ApplyCOMSettings: boolean; +var dcb: TDCB; +begin + // Do nothing if not connected + Result := false; + if not Connected then + exit; + + // ** Setup DCB (Device Control Block) fields ****************************** + + // Clear all + fillchar( dcb, sizeof(dcb), 0 ); + // DCB structure size + dcb.DCBLength := sizeof(dcb); + // Baud rate + dcb.BaudRate := FBaudRateValue; + // Set fBinary: Win32 does not support non binary mode transfers + // (also disable EOF check) + dcb.Flags := dcb_Binary; + // Enables the DTR line when the device is opened and leaves it on + if EnableDTROnOpen then + dcb.Flags := dcb.Flags or dcb_DtrControlEnable; + // Kind of hw flow control to use + case FHwFlow of + // No hw flow control + hfNONE:; + // No hw flow control but set RTS high and leave it high + hfNONERTSON: + dcb.Flags := dcb.Flags or dcb_RtsControlEnable; + // RTS/CTS (request-to-send/clear-to-send) flow control + hfRTSCTS: + dcb.Flags := dcb.Flags or dcb_OutxCtsFlow or dcb_RtsControlHandshake; + end; + // Kind of sw flow control to use + case FSwFlow of + // No sw flow control + sfNONE:; + // XON/XOFF sw flow control + sfXONXOFF: + dcb.Flags := dcb.Flags or dcb_OutX or dcb_InX; + end; + // Set XONLim: specifies the minimum number of bytes allowed in the input + // buffer before the XON character is sent (or CTS is set). + if (GetWinPlatform = 'WNT') and (GetWinVersion >= $00040000) then + begin + // WinNT 4.0 + Service Pack 3 needs XONLim to be less than or + // equal to 4096 bytes. Win95/98 doesn't have such limit. + if FInBufSize div 4 > 4096 then + dcb.XONLim := 4096 + else + dcb.XONLim := FInBufSize div 4; + end + else + dcb.XONLim := FInBufSize div 4; + // Specifies the maximum number of bytes allowed in the input buffer before + // the XOFF character is sent (or CTS is set low). The maximum number of bytes + // allowed is calculated by subtracting this value from the size, in bytes, of + // the input buffer. + dcb.XOFFLim := dcb.XONLim; + // How many data bits to use + dcb.ByteSize := 5 + ord(FDataBits); + // Kind of parity to use + dcb.Parity := ord(FParity); + // How many stop bits to use + dcb.StopBits := ord(FStopbits); + // XON ASCII char - DC1, Ctrl-Q, ASCII 17 + dcb.XONChar := #17; + // XOFF ASCII char - DC3, Ctrl-S, ASCII 19 + dcb.XOFFChar := #19; + + // Apply new settings + Result := SetCommState( FHandle, dcb ); + if not Result then + exit; + // Flush buffers + Result := FlushBuffers( true, true ); + if not Result then + exit; + // Setup buffers size + Result := SetupComm( FHandle, FInBufSize, FOutBufSize ); +end; + +function TCommPortDriver.Connect: boolean; +var tms: TCOMMTIMEOUTS; +begin + // Do nothing if already connected + Result := Connected; + if Result then + exit; + // Open the COM port + FHandle := CreateFile( pchar(FPortName), + GENERIC_READ or GENERIC_WRITE, + 0, // Not shared + nil, // No security attributes + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + 0 // No template + ) ; + Result := Connected; + if not Result then + exit; + // Apply settings + Result := ApplyCOMSettings; + if not Result then + begin + Disconnect; + exit; + end; + // Set ReadIntervalTimeout: Specifies the maximum time, in milliseconds, + // allowed to elapse between the arrival of two characters on the + // communications line. + // We disable timeouts because we are polling the com port! + tms.ReadIntervalTimeout := 1; + // Set ReadTotalTimeoutMultiplier: Specifies the multiplier, in milliseconds, + // used to calculate the total time-out period for read operations. + tms.ReadTotalTimeoutMultiplier := 0; + // Set ReadTotalTimeoutConstant: Specifies the constant, in milliseconds, + // used to calculate the total time-out period for read operations. + tms.ReadTotalTimeoutConstant := 1; + // Set WriteTotalTimeoutMultiplier: Specifies the multiplier, in milliseconds, + // used to calculate the total time-out period for write operations. + tms.WriteTotalTimeoutMultiplier := 0; + // Set WriteTotalTimeoutConstant: Specifies the constant, in milliseconds, + // used to calculate the total time-out period for write operations. + tms.WriteTotalTimeoutConstant := 10; + // Apply timeouts + SetCommTimeOuts( FHandle, tms ); + // Start the timer (used for polling) + SetTimer( FNotifyWnd, 1, FPollingDelay, nil ); +end; + +procedure TCommPortDriver.Disconnect; +begin + if Connected then + begin + // Stop the timer (used for polling) + KillTimer( FNotifyWnd, 1 ); + // Release the COM port + CloseHandle( FHandle ); + // No more connected + FHandle := INVALID_HANDLE_VALUE; + end; +end; + +// Returns true if connected +function TCommPortDriver.Connected: boolean; +begin + Result := FHandle <> INVALID_HANDLE_VALUE; +end; + +// Returns CTS, DSR, RING and RLSD (CD) signals status +function TCommPortDriver.GetLineStatus: TLineStatusSet; +var dwS: DWORD; +begin + Result := []; + if not Connected then + exit; + // Retrieves modem control-register values. + // The function fails if the hardware does not support the control-register + // values. + if not GetCommModemStatus( FHandle, dwS ) then + exit; + if dwS and MS_CTS_ON <> 0 then Result := Result + [lsCTS]; + if dwS and MS_DSR_ON <> 0 then Result := Result + [lsDSR]; + if dwS and MS_RING_ON <> 0 then Result := Result + [lsRING]; + if dwS and MS_RLSD_ON <> 0 then Result := Result + [lsCD]; +end; + +// Returns true if polling has not been paused +function TCommPortDriver.IsPolling: boolean; +begin + Result := FRXPollingPauses <= 0; +end; + +// Pauses polling +procedure TCommPortDriver.PausePolling; +begin + // Inc. RX polling pauses counter + inc( FRXPollingPauses ); +end; + +// Re-starts polling (after pause) +procedure TCommPortDriver.ContinuePolling; +begin + // Dec. RX polling pauses counter + dec( FRXPollingPauses ); +end; + +// Flush rx/tx buffers +function TCommPortDriver.FlushBuffers( inBuf, outBuf: boolean ): boolean; +var dwAction: DWORD; +begin + // Do nothing if not connected + Result := false; + if not Connected then + exit; + // Flush the RX data buffer + dwAction := 0; + if outBuf then + dwAction := dwAction or PURGE_TXABORT or PURGE_TXCLEAR; + // Flush the TX data buffer + if inBuf then + dwAction := dwAction or PURGE_RXABORT or PURGE_RXCLEAR; + Result := PurgeComm( FHandle, dwAction ); + // Used by the RX packet mechanism + if Result then + FFirstByteOfPacketTime := DWORD(-1); +end; + +// Returns number of received bytes in the RX buffer +function TCommPortDriver.CountRX: integer; +var stat: TCOMSTAT; + errs: DWORD; +begin + // Do nothing if port has not been opened + Result := 65535; + if not Connected then + exit; + // Get count + ClearCommError( FHandle, errs, @stat ); + Result := stat.cbInQue; +end; + +// Returns the output buffer free space or 65535 if not connected +function TCommPortDriver.OutFreeSpace: word; +var stat: TCOMSTAT; + errs: DWORD; +begin + if not Connected then + Result := 65535 + else + begin + ClearCommError( FHandle, errs, @stat ); + Result := FOutBufSize - stat.cbOutQue; + end; +end; + +// Sends binary data. Returns number of bytes sent. Timeout overrides +// the value specifiend in the OutputTimeout property +function TCommPortDriver.SendDataEx( DataPtr: pchar; DataSize, Timeout: DWORD ): DWORD; +var nToSend, nSent, t1: DWORD; +begin + // Do nothing if port has not been opened + Result := 0; + if not Connected then + exit; + // Current time + t1 := GetTickCount; + // Loop until all data sent or timeout occurred + while DataSize > 0 do + begin + // Get TX buffer free space + nToSend := OutFreeSpace; + // If output buffer has some free space... + if nToSend > 0 then + begin + // Check signals + if FCkLineStatus and (GetLineStatus = []) then + exit; + // Don't send more bytes than we actually have to send + if nToSend > DataSize then + nToSend := DataSize; + // Send + WriteFile( FHandle, DataPtr^, nToSend, nSent, nil ); + nSent := abs( nSent ); + if nSent > 0 then + begin + // Update number of bytes sent + Result := Result + nSent; + // Decrease the count of bytes to send + DataSize := DataSize - nSent; + // Inc. data pointer + DataPtr := DataPtr + nSent; + // Get current time + t1 := GetTickCount; + // Continue. This skips the time check below (don't stop + // trasmitting if the Timeout is set too low) + continue; + end; + end; + // Buffer is full. If we are waiting too long then exit + if DWORD(GetTickCount-t1) > Timeout then + exit; + end; +end; + +// Send data (breaks the data in small packets if it doesn't fit in the output +// buffer) +function TCommPortDriver.SendData( DataPtr: pointer; DataSize: DWORD ): DWORD; +begin + Result := SendDataEx( DataPtr, DataSize, FOutputTimeout ); +end; + +// Sends a byte. Returns true if the byte has been sent +function TCommPortDriver.SendByte( Value: byte ): boolean; +begin + Result := SendData( @Value, 1 ) = 1; +end; + +// Sends a char. Returns true if the char has been sent +function TCommPortDriver.SendChar( Value: char ): boolean; +begin + Result := SendData( @Value, 1 ) = 1; +end; + +// Sends a pascal string (NULL terminated if $H+ (default)) +function TCommPortDriver.SendString( s: string ): boolean; +var len: DWORD; +begin + len := length( s ); + {$IFOPT H+} // New syle pascal string (NULL terminated) + Result := SendData( pchar(s), len ) = len; + {$ELSE} // Old style pascal string (s[0] = length) + Result := SendData( pchar(@s[1]), len ) = len; + {$ENDIF} +end; + +// Sends a C-style string (NULL terminated) +function TCommPortDriver.SendZString( s: pchar ): boolean; +var len: DWORD; +begin + len := strlen( s ); + Result := SendData( s, len ) = len; +end; + +// Reads binary data. Returns number of bytes read +function TCommPortDriver.ReadData( DataPtr: pchar; MaxDataSize: DWORD ): DWORD; +var nToRead, nRead, t1: DWORD; +begin + // Do nothing if port has not been opened + Result := 0; + if not Connected then + exit; + // Pause polling + PausePolling; + // Current time + t1 := GetTickCount; + // Loop until all requested data read or timeout occurred + while MaxDataSize > 0 do + begin + // Get data bytes count in RX buffer + nToRead := CountRX; + // If input buffer has some data... + if nToRead > 0 then + begin + // Don't read more bytes than we actually have to read + if nToRead > MaxDataSize then + nToRead := MaxDataSize; + // Read + ReadFile( FHandle, DataPtr^, nToRead, nRead, nil ); + // Update number of bytes read + Result := Result + nRead; + // Decrease the count of bytes to read + MaxDataSize := MaxDataSize - nRead; + // Inc. data pointer + DataPtr := DataPtr + nRead; + // Get current time + t1 := GetTickCount; + // Continue. This skips the time check below (don't stop + // reading if the FInputTimeout is set too low) + continue; + end; + // Buffer is empty. If we are waiting too long then exit + if (GetTickCount-t1) > FInputTimeout then + break; + end; + // Continue polling + ContinuePolling; +end; + +// Reads a byte. Returns true if the byte has been read +function TCommPortDriver.ReadByte( var Value: byte ): boolean; +begin + Result := ReadData( @Value, 1 ) = 1; +end; + +// Reads a char. Returns true if char has been read +function TCommPortDriver.ReadChar( var Value: char ): boolean; +begin + Result := ReadData( @Value, 1 ) = 1; +end; + +// Set DTR line high (onOff=TRUE) or low (onOff=FALSE). +// You must not use HW handshaking. +procedure TCommPortDriver.ToggleDTR( onOff: boolean ); +const funcs: array[boolean] of integer = (CLRDTR,SETDTR); +begin + if Connected then + EscapeCommFunction( FHandle, funcs[onOff] ); +end; + +// Set RTS line high (onOff=TRUE) or low (onOff=FALSE). +// You must not use HW handshaking. +procedure TCommPortDriver.ToggleRTS( onOff: boolean ); +const funcs: array[boolean] of integer = (CLRRTS,SETRTS); +begin + if Connected then + EscapeCommFunction( FHandle, funcs[onOff] ); +end; + +// COM port polling proc +procedure TCommPortDriver.TimerWndProc( var msg: TMessage ); +var nRead, nToRead, dummy: DWORD; + comStat: TCOMSTAT; +begin + if (msg.Msg = WM_TIMER) and Connected then + begin + // Do nothing if RX polling has been paused + if FRXPollingPauses > 0 then + exit; + // If PacketSize is > 0 then raise the OnReceiveData event only if the RX + // buffer has at least PacketSize bytes in it. + ClearCommError( FHandle, dummy, @comStat ); + if FPacketSize > 0 then + begin + // Complete packet received ? + if DWORD(comStat.cbInQue) >= DWORD(FPacketSize) then + begin + repeat + // Read the packet and pass it to the app + nRead := 0; + if ReadFile( FHandle, FTempInBuffer^, FPacketSize, nRead, nil ) then + if (nRead <> 0) and Assigned(FOnReceivePacket) then + FOnReceivePacket( Self, FTempInBuffer, nRead ); + // Adjust time + //if comStat.cbInQue >= FPacketSize then + FFirstByteOfPacketTime := FFirstByteOfPacketTime + + DelayForRX( FBaudRate, FPacketSize ); + comStat.cbInQue := comStat.cbInQue - WORD(FPacketSize); + if comStat.cbInQue = 0 then + FFirstByteOfPacketTime := DWORD(-1); + until DWORD(comStat.cbInQue) < DWORD(FPacketSize); + // Done + exit; + end; + // Handle packet timeouts + if (FPacketTimeout > 0) and (FFirstByteOfPacketTime <> DWORD(-1)) and + (GetTickCount - FFirstByteOfPacketTime > DWORD(FPacketTimeout)) then + begin + nRead := 0; + // Read the "incomplete" packet + if ReadFile( FHandle, FTempInBuffer^, comStat.cbInQue, nRead, nil ) then + // If PacketMode is not pmDiscard then pass the packet to the app + if (FPacketMode <> pmDiscard) and (nRead <> 0) and Assigned(FOnReceivePacket) then + FOnReceivePacket( Self, FTempInBuffer, nRead ); + // Restart waiting for a packet + FFirstByteOfPacketTime := DWORD(-1); + // Done + exit; + end; + // Start time + if (comStat.cbInQue > 0) and (FFirstByteOfPacketTime = DWORD(-1)) then + FFirstByteOfPacketTime := GetTickCount; + // Done + exit; + end; + + // Standard data handling + nRead := 0; + nToRead := comStat.cbInQue; + if (nToRead > 0) and ReadFile( FHandle, FTempInBuffer^, nToRead, nRead, nil ) then + if (nRead <> 0) and Assigned(FOnReceiveData) then + FOnReceiveData( Self, FTempInBuffer, nRead ); + end + // Let Windows handle other messages + else + Msg.Result := DefWindowProc( FNotifyWnd, Msg.Msg, Msg.wParam, Msg.lParam ) ; +end; + +end. diff --git a/lib/cdd4/ComDrv32.bpl b/lib/cdd4/ComDrv32.bpl new file mode 100644 index 00000000..a5c5195f Binary files /dev/null and b/lib/cdd4/ComDrv32.bpl differ diff --git a/lib/cdd4/ComDrv32.dcr b/lib/cdd4/ComDrv32.dcr new file mode 100644 index 00000000..fdad3fe9 Binary files /dev/null and b/lib/cdd4/ComDrv32.dcr differ diff --git a/lib/cdd4/ComDrv32.dcu b/lib/cdd4/ComDrv32.dcu new file mode 100644 index 00000000..875e696c Binary files /dev/null and b/lib/cdd4/ComDrv32.dcu differ diff --git a/lib/cdd4/ComDrv32.dpk b/lib/cdd4/ComDrv32.dpk new file mode 100644 index 00000000..7a1f75ee --- /dev/null +++ b/lib/cdd4/ComDrv32.dpk @@ -0,0 +1,35 @@ +package ComDrv32; + +{$R *.RES} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'Serial I/O Components'} +{$IMPLICITBUILD OFF} + +requires + vcl40; + +contains + CPDrv in 'CPDrv.pas', + CPDReg in 'CPDReg.pas'; + +end. diff --git a/lib/cdd4/ComDrv32.res b/lib/cdd4/ComDrv32.res new file mode 100644 index 00000000..677b5464 Binary files /dev/null and b/lib/cdd4/ComDrv32.res differ diff --git a/lib/cdd4/Demos/TTY/AboutTTY.dcu b/lib/cdd4/Demos/TTY/AboutTTY.dcu new file mode 100644 index 00000000..abc7bdc3 Binary files /dev/null and b/lib/cdd4/Demos/TTY/AboutTTY.dcu differ diff --git a/lib/cdd4/Demos/TTY/AboutTTY.dfm b/lib/cdd4/Demos/TTY/AboutTTY.dfm new file mode 100644 index 00000000..3a516286 Binary files /dev/null and b/lib/cdd4/Demos/TTY/AboutTTY.dfm differ diff --git a/lib/cdd4/Demos/TTY/AboutTTY.pas b/lib/cdd4/Demos/TTY/AboutTTY.pas new file mode 100644 index 00000000..2adb7782 --- /dev/null +++ b/lib/cdd4/Demos/TTY/AboutTTY.pas @@ -0,0 +1,70 @@ +unit AboutTTY; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + ExtCtrls, StdCtrls; + +type + TAboutBoxForm = class(TForm) + Panel1: TPanel; + Panel2: TPanel; + Image1: TImage; + Label2: TLabel; + Label3: TLabel; + Panel3: TPanel; + Label4: TLabel; + Label5: TLabel; + Image2: TImage; + Image3: TImage; + procedure Panel1Click(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + private + FIsModal: boolean; + FReqToClose: boolean; + + procedure CloseMe; + public + // Constructor + constructor Create( AOwner: TComponent; isModal: boolean ); reintroduce; virtual; + + property ReqToClose: boolean read FReqToClose; + end; + +var + AboutBoxForm: TAboutBoxForm; + +implementation + +{$R *.DFM} + +// Constructor +constructor TAboutBoxForm.Create( AOwner: TComponent; isModal: boolean ); +begin + inherited Create( AOwner ); + FIsModal := isModal; + FReqToClose := false; +end; + +procedure TAboutBoxForm.CloseMe; +begin + if FIsModal then + ModalResult := mrOk + else + FReqToClose := true; +end; + +procedure TAboutBoxForm.Panel1Click(Sender: TObject); +begin + CloseMe; +end; + +procedure TAboutBoxForm.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + CloseMe; +end; + +end. diff --git a/lib/cdd4/Demos/TTY/MnForm.dfm b/lib/cdd4/Demos/TTY/MnForm.dfm new file mode 100644 index 00000000..c31a4eec Binary files /dev/null and b/lib/cdd4/Demos/TTY/MnForm.dfm differ diff --git a/lib/cdd4/Demos/TTY/MnForm.pas b/lib/cdd4/Demos/TTY/MnForm.pas new file mode 100644 index 00000000..7cbcb6bc --- /dev/null +++ b/lib/cdd4/Demos/TTY/MnForm.pas @@ -0,0 +1,448 @@ +unit MnForm; + +interface + +uses + // Delphi units + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Menus, ComCtrls, ExtCtrls, StdCtrls, ToolWin, ImgList, ClipBrd, + // ComDrv32 units + CPDrv, + // TTY units + AboutTTY, + SettingsDlg, Psock, NMFtp; + +type + TMainForm = class(TForm) + cpDrv: TCommPortDriver; + MainMenu: TMainMenu; + FileMenu: TMenuItem; + OptionsMenu: TMenuItem; + Splitter1: TSplitter; + RXPanel: TPanel; + IncomingRichEdit: TRichEdit; + Panel2: TPanel; + TXPanel: TPanel; + OutgoingRichEdit: TRichEdit; + Panel3: TPanel; + ToolBar1: TToolBar; + ConnectToolButton: TToolButton; + DisconnectToolButton: TToolButton; + SettingsToolButton: TToolButton; + E_ImageList: TImageList; + QuitTTYToolButton: TToolButton; + SerialIOSettingsCmd: TMenuItem; + Label1: TLabel; + Label2: TLabel; + IT_PopupMenu: TPopupMenu; + OT_PopupMenu: TPopupMenu; + IT_ClearCmd: TMenuItem; + OT_ClearCmd: TMenuItem; + N1: TMenuItem; + OT_CutCmd: TMenuItem; + OT_CopyCmd: TMenuItem; + N3: TMenuItem; + IT_CopyCmd: TMenuItem; + ActionsMenu: TMenuItem; + ActionsConnectCmd: TMenuItem; + ActionsDisconnectCmd: TMenuItem; + FileQuitCmd: TMenuItem; + HelpMenu: TMenuItem; + HelpAboutCmd: TMenuItem; + ToolButton1: TToolButton; + OT_PasteCmd: TMenuItem; + Panel1: TPanel; + StatusPanel: TPanel; + FrameSettingsPanel: TPanel; + FlowSettingsPanel: TPanel; + procedure SettingsToolButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure ConnectToolButtonClick(Sender: TObject); + procedure DisconnectToolButtonClick(Sender: TObject); + procedure OutgoingRichEditKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure OT_ClearCmdClick(Sender: TObject); + procedure OutgoingRichEditKeyPress(Sender: TObject; var Key: Char); + procedure cpDrvReceiveData(Sender: TObject; DataPtr: Pointer; + DataSize: Cardinal); + procedure IT_ClearCmdClick(Sender: TObject); + procedure QuitTTYToolButtonClick(Sender: TObject); + procedure HelpAboutCmdClick(Sender: TObject); + procedure OT_CutCmdClick(Sender: TObject); + procedure OT_CopyCmdClick(Sender: TObject); + procedure OT_PasteCmdClick(Sender: TObject); + procedure IT_CopyCmdClick(Sender: TObject); + procedure OT_PopupMenuPopup(Sender: TObject); + procedure IT_PopupMenuPopup(Sender: TObject); + private + // Startup about-box (splash screen) + FAboutBox: TAboutBoxForm; + FAboutBoxShownTime: DWORD; + + // Called when the message queue gets empty. + procedure IdleProc( Sender: TObject; var Done: boolean ); + // Updates the panels on bottom of this window. + procedure UpdateStatusPanels; + // Displays an error box informing the user we can't send data + procedure CannotSendError; + public + end; + +var + MainForm: TMainForm; + +implementation + +{$R *.DFM} + +// Form setup +procedure TMainForm.FormCreate(Sender: TObject); +begin + // Redirect OnIdle + Application.OnIdle := IdleProc; + // Display the splash screen + FAboutBox := TAboutBoxForm.Create( nil, false ); + Enabled := false; + FAboutBoxShownTime := GetTickCount(); + FAboutBox.Show; + FAboutBox.Update; +end; + +// Lets the user to customize I/O settings +procedure TMainForm.SettingsToolButtonClick(Sender: TObject); +var dlg: TSettingsForm; +begin + // Tell the user we cannot change settings while a connection is active + if cpDrv.Connected then + begin + if Application.MessageBox( 'Could not change settings while a connection is active.'#13#10+ + 'Close the connection and continue ?', + 'Confirm', + MB_OKCANCEL or MB_ICONQUESTION ) <> ID_OK then + exit; + cpDrv.Disconnect; + end; + // Let the user to customize settings + dlg := nil; + try + dlg := TSettingsForm.Create( Self, cpDrv ); + dlg.ShowModal; + finally + dlg.Free; + end; +end; + +// Called when the message queue gets empty. +procedure TMainForm.IdleProc( Sender: TObject; var Done: boolean ); +var elapsedTime: DWORD; +begin + Done := false; + // Hides the splash-screen + if FAboutBox <> nil then + begin + elapsedTime := GetTickCount - FAboutBoxShownTime; + if elapsedTime < 400 then + SetForegroundWindow( FAboutBox.Handle ); + if (elapsedTime > 5000) or FAboutBox.ReqToClose then + begin + FAboutBox.Free; + FAboutBox := nil; + Enabled := true; + end; + end; + // Updates status panels + UpdateStatusPanels; +end; + +// Updates the panels on bottom of this window. +procedure TMainForm.UpdateStatusPanels; +const _databits: array[TDataBits] of string = ('5','6','7','8'); + _parity: array[TParity] of string = ('N','E','O','M','S'); + _stopbits: array[TStopBits] of string = ('1','1.5','2'); + _hwflow: array[THwFlowControl] of string = ('None','None+DTR on','RTS/CTS'); + _swflow: array[TSwFlowControl] of string = ('None','XON/XOFF'); +var s: string; +begin + // Updates the connection status + if cpDrv.Connected then + s := 'Connected to "' + cpDrv.PortName + '"' + else + s := 'Not connected'; + StatusPanel.Caption := s; + // Show current frame settings + s := IntToStr( cpDrv.BaudRateValue ) + ',' + + _databits[ cpDrv.DataBits ] + ',' + + _parity[ cpDrv.Parity ] + ',' + + _stopbits[ cpDrv.StopBits ]; + FrameSettingsPanel.Caption := s; + // Show current flow control settings + s := 'Hw:' + _hwflow[ cpDrv.HwFlow ] + ' - Sw:' + _swflow[ cpDrv.SwFlow ]; + FlowSettingsPanel.Caption := s; +end; + +// Connect +procedure TMainForm.ConnectToolButtonClick(Sender: TObject); +begin + // Do nothing if already connected + if cpDrv.Connected then + exit; + // Try connecting + if not cpDrv.Connect then + begin + Application.MessageBox( 'Could not connect to serial port.'#13#10+ + 'Please, check settings and try again.', + 'Error', + MB_OK or MB_ICONERROR ); + exit; + end; +end; + +// Disconnect +procedure TMainForm.DisconnectToolButtonClick(Sender: TObject); +begin + // Do nothing if not connected + if not cpDrv.Connected then + exit; + // Disconnect + cpDrv.Disconnect; +end; + +// If user is trying to send text but the connection is not active then +// automatically bring it on. +procedure TMainForm.OutgoingRichEditKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + if not cpDrv.Connected then + begin + ConnectToolButtonClick( nil ); + if not cpDrv.Connected then + Key := 0; + end; +end; + +procedure TMainForm.OT_ClearCmdClick(Sender: TObject); +begin + OutgoingRichEdit.Lines.BeginUpdate; + OutgoingRichEdit.Lines.Clear; + OutgoingRichEdit.Lines.EndUpdate; +end; + + +// Displays an error box informing the user we can't send data +procedure TMainForm.CannotSendError; +begin + if cpDrv.CheckLineStatus then + Application.MessageBox( 'Could not send data.'#13#10+ + 'No device connected to serial port or device is off. Please, turn it on.'#13#10 + + 'Try setting Device Check to Off in the settings dialog box.'#13#10 + + 'Also, replace your two wires serial cable with a full wires cable.', + 'Warning', + MB_OK or MB_ICONINFORMATION ) + else + Application.MessageBox( 'Could not send data.'#13#10+ + 'Please, check connections and try again.'#13#10 + + 'Turn serial device on or, try setting Device Check to On in the settings dialog box.'#13#10 + + 'Also, disable Hardware Flow Control if you are using a two wires cable.', + 'Warning', + MB_OK or MB_ICONINFORMATION ) +end; + +procedure TMainForm.OutgoingRichEditKeyPress(Sender: TObject; + var Key: Char); +begin + // Do nothing if not connected + if not cpDrv.Connected then + exit; + // Send the character + if not cpDrv.SendChar( Key ) then + CannotSendError; +end; + +// Handles incoming data +procedure TMainForm.cpDrvReceiveData(Sender: TObject; DataPtr: Pointer; + DataSize: Cardinal); +var iLastLine, i: integer; + s, ss: string; +begin + // Convert incoming data into a string + s := StringOfChar( ' ', DataSize ); + move( DataPtr^, pchar(s)^, DataSize ); + // Exit if s is empty. This usually occurs when one or more NULL characters + // (chr(0)) are received. + while pos( #0, s ) > 0 do + delete( s, pos( #0, s ), 1 ); + if s = '' then + exit; + // Remove line feeds + i := pos( #10, s ); + while i <> 0 do + begin + delete( s, i, 1 ); + i := pos( #10, s ); + end; + + // Don't redraw the rich edit control until we finished updating it + //IncomingRichEdit.Lines.BeginUpdate; + // Get last line index + iLastLine := IncomingRichEdit.Lines.Count-1; + // If the rich edit is empty... + if iLastLine = -1 then + begin + // Remove line feeds from the string + i := pos( #10, s ); + while i <> 0 do + begin + delete( s, i, 1 ); + i := pos( #10, s ); + end; + // Remove carriage returns from the string (break lines) + i := pos( #13, s ); + while i <> 0 do + begin + ss := copy( s, 1, i-1 ); + delete( s, 1, i ); + IncomingRichEdit.Lines.Append( ss ); + i := pos( #13, s ); + end; + IncomingRichEdit.Lines.Append( s ); + end + else + begin + // String to add is : last line added + new one + s := IncomingRichEdit.Lines[iLastLine] + s; + // Remove carriage returns (break lines) + i := pos( #13, s ); + while i <> 0 do + begin + ss := copy( s, 1, i-1 ); + delete( s, 1, i ); + if iLastLine <> -1 then + begin + IncomingRichEdit.Lines[iLastLine] := ss; + iLastLine := -1; + end + else + IncomingRichEdit.Lines.Append( ss ); + i := pos( #13, s ); + end; + if iLastLine <> -1 then + IncomingRichEdit.Lines[iLastLine] := s + else + IncomingRichEdit.Lines.Append( s ); + end; + //IncomingRichEdit.Lines.EndUpdate; + // Scroll incoming text rich edit + SendMessage( IncomingRichEdit.Handle, EM_SCROLLCARET, 0, 0 ); +end; + +procedure TMainForm.IT_ClearCmdClick(Sender: TObject); +begin + IncomingRichEdit.Lines.BeginUpdate; + IncomingRichEdit.Lines.Clear; + IncomingRichEdit.Lines.EndUpdate; +end; + +// Quits TTY +procedure TMainForm.QuitTTYToolButtonClick(Sender: TObject); +begin + PostQuitMessage( Handle ); +end; + +procedure TMainForm.HelpAboutCmdClick(Sender: TObject); +var dlg: TAboutBoxForm; +begin + dlg := nil; + try + dlg := TAboutBoxForm.Create( Self, true ); + dlg.ShowModal; + finally + dlg.Free; + end; +end; + +procedure TMainForm.OT_CutCmdClick(Sender: TObject); +begin + OutgoingRichEdit.CutToClipboard; +end; + +procedure TMainForm.OT_CopyCmdClick(Sender: TObject); +begin + OutgoingRichEdit.CopyToClipboard; +end; + +procedure TMainForm.OT_PasteCmdClick(Sender: TObject); +var clp: TClipboard; + s, ss: string; + iLastLine, i: integer; +begin + // Get the clipboard object + clp := Clipboard; + // If the clipboard contains some text... + if clp.HasFormat( CF_TEXT ) then + begin + // Automatically connect + if not cpDrv.Connected then + begin + ConnectToolButtonClick( nil ); + if not cpDrv.Connected then + exit; + end; + // Get the text + s := clp.AsText; + // Remove line feeds + i := pos( #10, s ); + while i <> 0 do + begin + delete( s, i, 1 ); + i := pos( #10, s ); + end; + // Add the text to the rich edit and send it + iLastLine := OutgoingRichEdit.Lines.Count-1; + i := pos( #13, s ); + while i <> 0 do + begin + ss := copy( s, 1, i-1 ); + delete( s, 1, i ); + if iLastLine <> -1 then + begin + OutgoingRichEdit.Lines[iLastLine] := OutgoingRichEdit.Lines[iLastLine] + ss; + iLastLine := -1; + end + else + OutgoingRichEdit.Lines.Append( ss ); + if not cpDrv.SendString( ss + #13 ) then + begin + CannotSendError; + exit; + end; + i := pos( #13, s ); + end; + if iLastLine <> -1 then + OutgoingRichEdit.Lines[iLastLine] := OutgoingRichEdit.Lines[iLastLine] + s + else + OutgoingRichEdit.Lines.Append( s ); + if not cpDrv.SendString( s ) then + CannotSendError; + end; +end; + +procedure TMainForm.IT_CopyCmdClick(Sender: TObject); +begin + IncomingRichEdit.CopyToClipboard; +end; + +procedure TMainForm.OT_PopupMenuPopup(Sender: TObject); +begin + OT_ClearCmd.Enabled := OutgoingRichEdit.Lines.Count > 0; + OT_CutCmd.Enabled := OutgoingRichEdit.SelLength > 0; + OT_CopyCmd.Enabled := OutgoingRichEdit.SelLength > 0; + OT_PasteCmd.Enabled := Clipboard.HasFormat( CF_TEXT ); +end; + +procedure TMainForm.IT_PopupMenuPopup(Sender: TObject); +begin + IT_ClearCmd.Enabled := IncomingRichEdit.Lines.Count > 0; + IT_CopyCmd.Enabled := IncomingRichEdit.SelLength > 0; +end; + +end. diff --git a/lib/cdd4/Demos/TTY/MnForm.~dfm b/lib/cdd4/Demos/TTY/MnForm.~dfm new file mode 100644 index 00000000..56498254 Binary files /dev/null and b/lib/cdd4/Demos/TTY/MnForm.~dfm differ diff --git a/lib/cdd4/Demos/TTY/MnForm.~pas b/lib/cdd4/Demos/TTY/MnForm.~pas new file mode 100644 index 00000000..1411aa9a --- /dev/null +++ b/lib/cdd4/Demos/TTY/MnForm.~pas @@ -0,0 +1,449 @@ +unit MnForm; + +interface + +uses + // Delphi units + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Menus, ComCtrls, ExtCtrls, StdCtrls, ToolWin, ImgList, ClipBrd, + // ComDrv32 units + CPDrv, + // TTY units + AboutTTY, + SettingsDlg, Psock, NMFtp; + +type + TMainForm = class(TForm) + cpDrv: TCommPortDriver; + MainMenu: TMainMenu; + FileMenu: TMenuItem; + OptionsMenu: TMenuItem; + Splitter1: TSplitter; + RXPanel: TPanel; + IncomingRichEdit: TRichEdit; + Panel2: TPanel; + TXPanel: TPanel; + OutgoingRichEdit: TRichEdit; + Panel3: TPanel; + ToolBar1: TToolBar; + ConnectToolButton: TToolButton; + DisconnectToolButton: TToolButton; + SettingsToolButton: TToolButton; + E_ImageList: TImageList; + QuitTTYToolButton: TToolButton; + SerialIOSettingsCmd: TMenuItem; + Label1: TLabel; + Label2: TLabel; + IT_PopupMenu: TPopupMenu; + OT_PopupMenu: TPopupMenu; + IT_ClearCmd: TMenuItem; + OT_ClearCmd: TMenuItem; + N1: TMenuItem; + OT_CutCmd: TMenuItem; + OT_CopyCmd: TMenuItem; + N3: TMenuItem; + IT_CopyCmd: TMenuItem; + ActionsMenu: TMenuItem; + ActionsConnectCmd: TMenuItem; + ActionsDisconnectCmd: TMenuItem; + FileQuitCmd: TMenuItem; + HelpMenu: TMenuItem; + HelpAboutCmd: TMenuItem; + ToolButton1: TToolButton; + OT_PasteCmd: TMenuItem; + NMFTP1: TNMFTP; + Panel1: TPanel; + StatusPanel: TPanel; + FrameSettingsPanel: TPanel; + FlowSettingsPanel: TPanel; + procedure SettingsToolButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure ConnectToolButtonClick(Sender: TObject); + procedure DisconnectToolButtonClick(Sender: TObject); + procedure OutgoingRichEditKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure OT_ClearCmdClick(Sender: TObject); + procedure OutgoingRichEditKeyPress(Sender: TObject; var Key: Char); + procedure cpDrvReceiveData(Sender: TObject; DataPtr: Pointer; + DataSize: Cardinal); + procedure IT_ClearCmdClick(Sender: TObject); + procedure QuitTTYToolButtonClick(Sender: TObject); + procedure HelpAboutCmdClick(Sender: TObject); + procedure OT_CutCmdClick(Sender: TObject); + procedure OT_CopyCmdClick(Sender: TObject); + procedure OT_PasteCmdClick(Sender: TObject); + procedure IT_CopyCmdClick(Sender: TObject); + procedure OT_PopupMenuPopup(Sender: TObject); + procedure IT_PopupMenuPopup(Sender: TObject); + private + // Startup about-box (splash screen) + FAboutBox: TAboutBoxForm; + FAboutBoxShownTime: DWORD; + + // Called when the message queue gets empty. + procedure IdleProc( Sender: TObject; var Done: boolean ); + // Updates the panels on bottom of this window. + procedure UpdateStatusPanels; + // Displays an error box informing the user we can't send data + procedure CannotSendError; + public + end; + +var + MainForm: TMainForm; + +implementation + +{$R *.DFM} + +// Form setup +procedure TMainForm.FormCreate(Sender: TObject); +begin + // Redirect OnIdle + Application.OnIdle := IdleProc; + // Display the splash screen + FAboutBox := TAboutBoxForm.Create( nil, false ); + Enabled := false; + FAboutBoxShownTime := GetTickCount(); + FAboutBox.Show; + FAboutBox.Update; +end; + +// Lets the user to customize I/O settings +procedure TMainForm.SettingsToolButtonClick(Sender: TObject); +var dlg: TSettingsForm; +begin + // Tell the user we cannot change settings while a connection is active + if cpDrv.Connected then + begin + if Application.MessageBox( 'Could not change settings while a connection is active.'#13#10+ + 'Close the connection and continue ?', + 'Confirm', + MB_OKCANCEL or MB_ICONQUESTION ) <> ID_OK then + exit; + cpDrv.Disconnect; + end; + // Let the user to customize settings + dlg := nil; + try + dlg := TSettingsForm.Create( Self, cpDrv ); + dlg.ShowModal; + finally + dlg.Free; + end; +end; + +// Called when the message queue gets empty. +procedure TMainForm.IdleProc( Sender: TObject; var Done: boolean ); +var elapsedTime: DWORD; +begin + Done := false; + // Hides the splash-screen + if FAboutBox <> nil then + begin + elapsedTime := GetTickCount - FAboutBoxShownTime; + if elapsedTime < 400 then + SetForegroundWindow( FAboutBox.Handle ); + if (elapsedTime > 5000) or FAboutBox.ReqToClose then + begin + FAboutBox.Free; + FAboutBox := nil; + Enabled := true; + end; + end; + // Updates status panels + UpdateStatusPanels; +end; + +// Updates the panels on bottom of this window. +procedure TMainForm.UpdateStatusPanels; +const _databits: array[TDataBits] of string = ('5','6','7','8'); + _parity: array[TParity] of string = ('N','E','O','M','S'); + _stopbits: array[TStopBits] of string = ('1','1.5','2'); + _hwflow: array[THwFlowControl] of string = ('None','None+DTR on','RTS/CTS'); + _swflow: array[TSwFlowControl] of string = ('None','XON/XOFF'); +var s: string; +begin + // Updates the connection status + if cpDrv.Connected then + s := 'Connected to "' + cpDrv.PortName + '"' + else + s := 'Not connected'; + StatusPanel.Caption := s; + // Show current frame settings + s := IntToStr( cpDrv.BaudRateValue ) + ',' + + _databits[ cpDrv.DataBits ] + ',' + + _parity[ cpDrv.Parity ] + ',' + + _stopbits[ cpDrv.StopBits ]; + FrameSettingsPanel.Caption := s; + // Show current flow control settings + s := 'Hw:' + _hwflow[ cpDrv.HwFlow ] + ' - Sw:' + _swflow[ cpDrv.SwFlow ]; + FlowSettingsPanel.Caption := s; +end; + +// Connect +procedure TMainForm.ConnectToolButtonClick(Sender: TObject); +begin + // Do nothing if already connected + if cpDrv.Connected then + exit; + // Try connecting + if not cpDrv.Connect then + begin + Application.MessageBox( 'Could not connect to serial port.'#13#10+ + 'Please, check settings and try again.', + 'Error', + MB_OK or MB_ICONERROR ); + exit; + end; +end; + +// Disconnect +procedure TMainForm.DisconnectToolButtonClick(Sender: TObject); +begin + // Do nothing if not connected + if not cpDrv.Connected then + exit; + // Disconnect + cpDrv.Disconnect; +end; + +// If user is trying to send text but the connection is not active then +// automatically bring it on. +procedure TMainForm.OutgoingRichEditKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + if not cpDrv.Connected then + begin + ConnectToolButtonClick( nil ); + if not cpDrv.Connected then + Key := 0; + end; +end; + +procedure TMainForm.OT_ClearCmdClick(Sender: TObject); +begin + OutgoingRichEdit.Lines.BeginUpdate; + OutgoingRichEdit.Lines.Clear; + OutgoingRichEdit.Lines.EndUpdate; +end; + + +// Displays an error box informing the user we can't send data +procedure TMainForm.CannotSendError; +begin + if cpDrv.CheckLineStatus then + Application.MessageBox( 'Could not send data.'#13#10+ + 'No device connected to serial port or device is off. Please, turn it on.'#13#10 + + 'Try setting Device Check to Off in the settings dialog box.'#13#10 + + 'Also, replace your two wires serial cable with a full wires cable.', + 'Warning', + MB_OK or MB_ICONINFORMATION ) + else + Application.MessageBox( 'Could not send data.'#13#10+ + 'Please, check connections and try again.'#13#10 + + 'Turn serial device on or, try setting Device Check to On in the settings dialog box.'#13#10 + + 'Also, disable Hardware Flow Control if you are using a two wires cable.', + 'Warning', + MB_OK or MB_ICONINFORMATION ) +end; + +procedure TMainForm.OutgoingRichEditKeyPress(Sender: TObject; + var Key: Char); +begin + // Do nothing if not connected + if not cpDrv.Connected then + exit; + // Send the character + if not cpDrv.SendChar( Key ) then + CannotSendError; +end; + +// Handles incoming data +procedure TMainForm.cpDrvReceiveData(Sender: TObject; DataPtr: Pointer; + DataSize: Cardinal); +var iLastLine, i: integer; + s, ss: string; +begin + // Convert incoming data into a string + s := StringOfChar( ' ', DataSize ); + move( DataPtr^, pchar(s)^, DataSize ); + // Exit if s is empty. This usually occurs when one or more NULL characters + // (chr(0)) are received. + while pos( #0, s ) > 0 do + delete( s, pos( #0, s ), 1 ); + if s = '' then + exit; + // Remove line feeds + i := pos( #10, s ); + while i <> 0 do + begin + delete( s, i, 1 ); + i := pos( #10, s ); + end; + + // Don't redraw the rich edit control until we finished updating it + //IncomingRichEdit.Lines.BeginUpdate; + // Get last line index + iLastLine := IncomingRichEdit.Lines.Count-1; + // If the rich edit is empty... + if iLastLine = -1 then + begin + // Remove line feeds from the string + i := pos( #10, s ); + while i <> 0 do + begin + delete( s, i, 1 ); + i := pos( #10, s ); + end; + // Remove carriage returns from the string (break lines) + i := pos( #13, s ); + while i <> 0 do + begin + ss := copy( s, 1, i-1 ); + delete( s, 1, i ); + IncomingRichEdit.Lines.Append( ss ); + i := pos( #13, s ); + end; + IncomingRichEdit.Lines.Append( s ); + end + else + begin + // String to add is : last line added + new one + s := IncomingRichEdit.Lines[iLastLine] + s; + // Remove carriage returns (break lines) + i := pos( #13, s ); + while i <> 0 do + begin + ss := copy( s, 1, i-1 ); + delete( s, 1, i ); + if iLastLine <> -1 then + begin + IncomingRichEdit.Lines[iLastLine] := ss; + iLastLine := -1; + end + else + IncomingRichEdit.Lines.Append( ss ); + i := pos( #13, s ); + end; + if iLastLine <> -1 then + IncomingRichEdit.Lines[iLastLine] := s + else + IncomingRichEdit.Lines.Append( s ); + end; + //IncomingRichEdit.Lines.EndUpdate; + // Scroll incoming text rich edit + SendMessage( IncomingRichEdit.Handle, EM_SCROLLCARET, 0, 0 ); +end; + +procedure TMainForm.IT_ClearCmdClick(Sender: TObject); +begin + IncomingRichEdit.Lines.BeginUpdate; + IncomingRichEdit.Lines.Clear; + IncomingRichEdit.Lines.EndUpdate; +end; + +// Quits TTY +procedure TMainForm.QuitTTYToolButtonClick(Sender: TObject); +begin + PostQuitMessage( Handle ); +end; + +procedure TMainForm.HelpAboutCmdClick(Sender: TObject); +var dlg: TAboutBoxForm; +begin + dlg := nil; + try + dlg := TAboutBoxForm.Create( Self, true ); + dlg.ShowModal; + finally + dlg.Free; + end; +end; + +procedure TMainForm.OT_CutCmdClick(Sender: TObject); +begin + OutgoingRichEdit.CutToClipboard; +end; + +procedure TMainForm.OT_CopyCmdClick(Sender: TObject); +begin + OutgoingRichEdit.CopyToClipboard; +end; + +procedure TMainForm.OT_PasteCmdClick(Sender: TObject); +var clp: TClipboard; + s, ss: string; + iLastLine, i: integer; +begin + // Get the clipboard object + clp := Clipboard; + // If the clipboard contains some text... + if clp.HasFormat( CF_TEXT ) then + begin + // Automatically connect + if not cpDrv.Connected then + begin + ConnectToolButtonClick( nil ); + if not cpDrv.Connected then + exit; + end; + // Get the text + s := clp.AsText; + // Remove line feeds + i := pos( #10, s ); + while i <> 0 do + begin + delete( s, i, 1 ); + i := pos( #10, s ); + end; + // Add the text to the rich edit and send it + iLastLine := OutgoingRichEdit.Lines.Count-1; + i := pos( #13, s ); + while i <> 0 do + begin + ss := copy( s, 1, i-1 ); + delete( s, 1, i ); + if iLastLine <> -1 then + begin + OutgoingRichEdit.Lines[iLastLine] := OutgoingRichEdit.Lines[iLastLine] + ss; + iLastLine := -1; + end + else + OutgoingRichEdit.Lines.Append( ss ); + if not cpDrv.SendString( ss + #13 ) then + begin + CannotSendError; + exit; + end; + i := pos( #13, s ); + end; + if iLastLine <> -1 then + OutgoingRichEdit.Lines[iLastLine] := OutgoingRichEdit.Lines[iLastLine] + s + else + OutgoingRichEdit.Lines.Append( s ); + if not cpDrv.SendString( s ) then + CannotSendError; + end; +end; + +procedure TMainForm.IT_CopyCmdClick(Sender: TObject); +begin + IncomingRichEdit.CopyToClipboard; +end; + +procedure TMainForm.OT_PopupMenuPopup(Sender: TObject); +begin + OT_ClearCmd.Enabled := OutgoingRichEdit.Lines.Count > 0; + OT_CutCmd.Enabled := OutgoingRichEdit.SelLength > 0; + OT_CopyCmd.Enabled := OutgoingRichEdit.SelLength > 0; + OT_PasteCmd.Enabled := Clipboard.HasFormat( CF_TEXT ); +end; + +procedure TMainForm.IT_PopupMenuPopup(Sender: TObject); +begin + IT_ClearCmd.Enabled := IncomingRichEdit.Lines.Count > 0; + IT_CopyCmd.Enabled := IncomingRichEdit.SelLength > 0; +end; + +end. diff --git a/lib/cdd4/Demos/TTY/Res/About.bmp b/lib/cdd4/Demos/TTY/Res/About.bmp new file mode 100644 index 00000000..838b7399 Binary files /dev/null and b/lib/cdd4/Demos/TTY/Res/About.bmp differ diff --git a/lib/cdd4/Demos/TTY/Res/Connect.bmp b/lib/cdd4/Demos/TTY/Res/Connect.bmp new file mode 100644 index 00000000..b579c8b5 Binary files /dev/null and b/lib/cdd4/Demos/TTY/Res/Connect.bmp differ diff --git a/lib/cdd4/Demos/TTY/Res/Disconnect.bmp b/lib/cdd4/Demos/TTY/Res/Disconnect.bmp new file mode 100644 index 00000000..32ad50a7 Binary files /dev/null and b/lib/cdd4/Demos/TTY/Res/Disconnect.bmp differ diff --git a/lib/cdd4/Demos/TTY/Res/Quit.bmp b/lib/cdd4/Demos/TTY/Res/Quit.bmp new file mode 100644 index 00000000..af642482 Binary files /dev/null and b/lib/cdd4/Demos/TTY/Res/Quit.bmp differ diff --git a/lib/cdd4/Demos/TTY/Res/Settings.bmp b/lib/cdd4/Demos/TTY/Res/Settings.bmp new file mode 100644 index 00000000..72ef1d33 Binary files /dev/null and b/lib/cdd4/Demos/TTY/Res/Settings.bmp differ diff --git a/lib/cdd4/Demos/TTY/Res/TTYDemo.bmp b/lib/cdd4/Demos/TTY/Res/TTYDemo.bmp new file mode 100644 index 00000000..fb0bfd62 Binary files /dev/null and b/lib/cdd4/Demos/TTY/Res/TTYDemo.bmp differ diff --git a/lib/cdd4/Demos/TTY/SettingsDlg.dcu b/lib/cdd4/Demos/TTY/SettingsDlg.dcu new file mode 100644 index 00000000..00543482 Binary files /dev/null and b/lib/cdd4/Demos/TTY/SettingsDlg.dcu differ diff --git a/lib/cdd4/Demos/TTY/SettingsDlg.dfm b/lib/cdd4/Demos/TTY/SettingsDlg.dfm new file mode 100644 index 00000000..8850b01a Binary files /dev/null and b/lib/cdd4/Demos/TTY/SettingsDlg.dfm differ diff --git a/lib/cdd4/Demos/TTY/SettingsDlg.pas b/lib/cdd4/Demos/TTY/SettingsDlg.pas new file mode 100644 index 00000000..ae49e702 --- /dev/null +++ b/lib/cdd4/Demos/TTY/SettingsDlg.pas @@ -0,0 +1,119 @@ +unit SettingsDlg; + +interface + +uses + // Delphi units + Windows, Messages, SysUtils, Classes, + Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, + // ComDrv32 units + CPDrv; + +type + TSettingsForm = class( TForm ) + Panel1: TPanel; + SettingsPageControl: TPageControl; + BaseSettingsTabSheet: TTabSheet; + OkButton: TButton; + CancelButton: TButton; + PortComboBox: TComboBox; + Label1: TLabel; + BaudRateComboBox: TComboBox; + Label2: TLabel; + Label3: TLabel; + DataBitsComboBox: TComboBox; + Label4: TLabel; + ParityComboBox: TComboBox; + Label5: TLabel; + StopBitsComboBox: TComboBox; + FlowControlTabSheet: TTabSheet; + Label6: TLabel; + HwFlowComboBox: TComboBox; + Label7: TLabel; + SwFlowComboBox: TComboBox; + Label8: TLabel; + DTRControlComboBox: TComboBox; + TabSheet1: TTabSheet; + Label9: TLabel; + DevCheckComboBox: TComboBox; + procedure OkButtonClick(Sender: TObject); + private + // TCommPortDriver whose settings must be customized + FCPDrv: TCommPortDriver; + // Shows current settings + procedure UpdateControls; + public + // Constructor + constructor Create( AOwner: TComponent; ACPDrv: TCommPortDriver ); reintroduce; virtual; + end; + +implementation + +{$R *.DFM} + +// Constructor +constructor TSettingsForm.Create( AOwner: TComponent; ACPDrv: TCommPortDriver ); +begin + // Call inherited constructor + inherited Create( AOwner ); + // Save the cpDrv reference + FCPDrv := ACPDrv; + // Show current settings + UpdateControls; + // Be sure the "Base Settings" tab control is the one selected + SettingsPageControl.ActivePage := BaseSettingsTabSheet; +end; + +// Shows current settings +procedure TSettingsForm.UpdateControls; +begin + // Base Settings page + PortComboBox.Text := FCPDrv.PortName; + BaudRateComboBox.Text := IntToStr( FCPDrv.BaudRateValue ); + DataBitsComboBox.ItemIndex := ord( FCPDrv.DataBits ); + ParityComboBox.ItemIndex := ord( FCPDrv.Parity ); + StopBitsComboBox.ItemIndex := ord( FCPDrv.StopBits ); + // Flow Control page + HwFlowComboBox.ItemIndex := ord( FCPDrv.HwFlow ); + SwFlowComboBox.ItemIndex := ord( FCPDrv.SwFlow ); + DTRControlComboBox.ItemIndex := ord( not FCPDrv.EnableDTROnOpen ); + // Device Control page + DevCheckComboBox.ItemIndex := ord( not FCPDrv.CheckLineStatus ); +end; + +procedure TSettingsForm.OkButtonClick(Sender: TObject); +var newPortName: string; + newBaudRate: DWORD; +begin + // Validate settings + newPortName := Trim( PortComboBox.Text ); + if newPortName = '' then + begin + Application.MessageBox( 'Please, enter a valid port name.', + 'Error', + MB_OK or MB_ICONERROR ); + exit; + end; + newBaudRate := DWORD( StrToIntDef( BaudRateComboBox.Text, -1 ) ); + if (newBaudRate < 110) or (newBaudRate > 921600) then + begin + Application.MessageBox( 'Please, enter a valid baud rate.', + 'Error', + MB_OK or MB_ICONERROR ); + exit; + end; + // Apply new settings + FCPDrv.PortName := newPortName; + FCPDrv.BaudRateValue := newBaudRate; + FCPDrv.DataBits := TDataBits( DataBitsComboBox.ItemIndex ); + FCPDrv.Parity := TParity( ParityComboBox.ItemIndex ); + FCPDrv.StopBits := TStopBits( StopBitsComboBox.ItemIndex ); + FCPDrv.HwFlow := THwFlowControl( HwFlowComboBox.ItemIndex ); + FCPDrv.SwFlow := TSwFlowControl( SwFlowComboBox.ItemIndex ); + FCPDrv.EnableDTROnOpen := DTRControlComboBox.ItemIndex = 0; + FCPDrv.CheckLineStatus := DevCheckComboBox.ItemIndex = 0; + // Done + ModalResult := mrOk; +end; + +end. diff --git a/lib/cdd4/Demos/TTY/TTY.dof b/lib/cdd4/Demos/TTY/TTY.dof new file mode 100644 index 00000000..4913a1e4 --- /dev/null +++ b/lib/cdd4/Demos/TTY/TTY.dof @@ -0,0 +1,81 @@ +[Compiler] +A=1 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages=Vcl40;tlib40;VCLIDE40;Vclx40;Vcldb40;vcldbx40;Qrpt40;VclSmp40;TeeUI40;teedb40;tee40;direct40;vcljpg40;proide40;stride40 +Conditionals= +DebugSourceDirs= +UsePackages=0 +[Parameters] +RunParams= +HostApplication= +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1033 +CodePage=1252 +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= +[Excluded Packages] +$(DELPHI)\Bin\tlib40.bpl=Borland Type Library Engine +$(DELPHI)\Bin\VCLIDE40.bpl=Integrated Development Environment Specific Components diff --git a/lib/cdd4/Demos/TTY/TTY.dpr b/lib/cdd4/Demos/TTY/TTY.dpr new file mode 100644 index 00000000..fdd6fb9a --- /dev/null +++ b/lib/cdd4/Demos/TTY/TTY.dpr @@ -0,0 +1,17 @@ +program TTY; + +uses + Forms, + MnForm in 'MnForm.pas' {MainForm}, + SettingsDlg in 'SettingsDlg.pas' {SettingsForm}, + AboutTTY in 'AboutTTY.pas' {AboutBoxForm}, + CPDrv in '..\..\CPDrv.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.Title := 'TTY Demo'; + Application.CreateForm(TMainForm, MainForm); + Application.Run; +end. diff --git a/lib/cdd4/Demos/TTY/TTY.res b/lib/cdd4/Demos/TTY/TTY.res new file mode 100644 index 00000000..d50b7083 Binary files /dev/null and b/lib/cdd4/Demos/TTY/TTY.res differ diff --git a/lib/cdd4/Help/ComDrv32.GID b/lib/cdd4/Help/ComDrv32.GID new file mode 100644 index 00000000..4ec9c7f5 Binary files /dev/null and b/lib/cdd4/Help/ComDrv32.GID differ diff --git a/lib/cdd4/Help/ComDrv32.toc b/lib/cdd4/Help/ComDrv32.toc new file mode 100644 index 00000000..5e01a185 --- /dev/null +++ b/lib/cdd4/Help/ComDrv32.toc @@ -0,0 +1,9 @@ +:Base comdrv32.hlp>main +:Title ComDrv32 Serial I/O Package + +1 ComDrv32 Reference +2 About and copyright notice=ABOUT_COPYRIGHT +2 Getting Started +3 ComDrv32 Package Overview=OVERVIEW +2 TCommPortDriver Reference +3 TCommPortDriver component=TCommPortDriver diff --git a/lib/cdd4/OpenMe.bpg b/lib/cdd4/OpenMe.bpg new file mode 100644 index 00000000..d40487be --- /dev/null +++ b/lib/cdd4/OpenMe.bpg @@ -0,0 +1,23 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = ComDrv32.bpl TTY.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +ComDrv32.bpl: ComDrv32.dpk + $(DCC) + +TTY.exe: Demos\TTY\TTY.dpr + $(DCC) + + diff --git a/lib/cologrid/Cologrid.dcu b/lib/cologrid/Cologrid.dcu new file mode 100644 index 00000000..ec1b9fa9 Binary files /dev/null and b/lib/cologrid/Cologrid.dcu differ diff --git a/lib/cologrid/Cologrid.pas b/lib/cologrid/Cologrid.pas new file mode 100644 index 00000000..4362fb25 --- /dev/null +++ b/lib/cologrid/Cologrid.pas @@ -0,0 +1,264 @@ +{Copyright 1998 by Michael Tran} +unit Cologrid; +{.$R mgrid.res} +interface + +uses WinTypes, WinProcs, Messages, SysUtils, Classes, Controls, + Graphics, Grids, menus; + +type + TSettingEvent = Procedure(ARow,Acol: Longint;var Fcolor:Longint;var Bold,Italic,underline:boolean) of object; + TMgrid = class(TStringGrid) + private + { Private fields of TMgrid } + Fsetting:TSettingEvent; + FColors1: Tcolor; + FColors2: Tcolor; + FColors3: Tcolor; + FAlignCell : TAlignment; + { Private methods of TMgrid } + { Method to set variable and property values and create objects } + procedure AutoInitialize; + { Method to free any objects created by AutoInitialize } + procedure AutoDestroy; + protected + FBorderbitmap : tbitmap; + FoddBitmap : Tbitmap; + FevenBitmap : Tbitmap; + + { Protected methods of TMgrid } + procedure Loaded; override; + procedure Paint; override; + Procedure setCellAlignment(value : TAlignment); + Procedure setBorderColor(value : tcolor); + Procedure setOddColor(value : tcolor); + Procedure setEvencolor(value : tcolor); + Procedure SetBorderBitmap(value: Tbitmap); + Procedure SetOddBitmap(value: Tbitmap); + Procedure SetEvenBitmap(value: Tbitmap); + public + { Public fields of TMgrid } + procedure DrawCell(ACol, ARow: Longint; ARect: TRect; + AState: TGridDrawState); override; + procedure DrawCellText(ACol, ARow: Longint; ARect: TRect); + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function GetPalette: HPALETTE; override; + published + { Published properties of the component } + Property Alignment : TAlignment read FAlignCell write setCellAlignment; + Property BorderColor: Tcolor read Fcolors1 write setBorderColor; + Property OddRowColor: Tcolor read Fcolors2 write setOddColor; + Property EvenRowColor: Tcolor read Fcolors3 write setEvenColor; + Property BorderPattern : Tbitmap read Fborderbitmap write SetBorderBitmap stored true; + Property OddRowPattern : Tbitmap read FOddbitmap write SetOddBitmap; + Property EvenRowPattern : Tbitmap read FEvenbitmap write SetEvenBitmap; + Property Popupmenu; + property OnClick; + property OnDblClick; + property OnDragDrop; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnKeyUp; + property OnKeyDown; + property OnKeyPress; + property OnEnter; + property OnExit; + Property OnSetting: TSettingEvent read Fsetting write Fsetting; + property OnDrawCell; +end; + +procedure Register; + +Implementation + +procedure Register; +begin + RegisterComponents('Mik', [TMgrid]); +end; + +procedure TMgrid.SetBorderBitmap(value: Tbitmap); +begin + FBorderbitmap.assign(value); + refresh; + +end; +procedure TMgrid.SetOddBitmap(value: Tbitmap); +begin + FoddBitmap.assign(value); + refresh; + +end; + +function TMgrid.GetPalette: HPALETTE; +begin + Result := 0; { default result is no palette } + Result := TBitmap(FoddBitmap).Palette; { use it if available } +end; + +procedure TMgrid.SetEvenBitmap(value: Tbitmap); +begin + FevenBitmap.assign(value); + refresh; +end; +procedure TMgrid.setCellAlignment(value : TAlignment); +begin +FAlignCell := value; +refresh; +end; +procedure TMgrid.setBorderColor(value : tcolor); +begin +fcolors1 := value; +refresh; +end; +procedure TMgrid.setOddColor(value : tcolor); +begin +fcolors2 := value; +refresh; +end; +procedure TMgrid.setEvencolor(value : tcolor); +begin +fcolors3 := value; +refresh; +end; + +procedure TMgrid.AutoInitialize; +begin +FONT.name := 'Arial'; +FONT.size := 10; +CANVAS.BRUSH.COLOR := color; +CANVAS.FONT := FONT; +FBorderbitmap := tbitmap.create; +FoddBitmap := Tbitmap.create; +FevenBitmap := Tbitmap.create; +fcolors1 := clsilver; +fcolors2 := clAqua; +fcolors3 := cllime; +FAlignCell := taLeftJustify; +refresh; +end; { of AutoInitialize } + +{ Method to free any objects created by AutoInitialize } +procedure TMgrid.AutoDestroy; +begin + FBorderbitmap.free; + FoddBitmap.free; + FevenBitmap.free; +end; { of AutoDestroy } + + +constructor TMgrid.Create(AOwner: TComponent); +begin + + inherited Create(AOwner); + AutoInitialize; + +end; + +destructor TMgrid.Destroy; +begin + AutoDestroy; + inherited Destroy; +end; + +procedure TMgrid.Loaded; +begin +inherited Loaded; +end; + +procedure TMgrid.Paint; +begin + { Make this component look like its parent component by calling + its parent's Paint method. } + inherited Paint; + +end; + + +procedure TMgrid.DrawCellText(ACol, ARow: Longint; ARect: TRect); +var + Text: array[0..255] of Char; + begin + StrPCopy(Text, Cells[ACol, ARow]); + ExtTextOut(Canvas.Handle, ARect.Left + 2, ARect.Top + 2, ETO_CLIPPED or + ETO_OPAQUE, @ARect, Text, StrLen(Text), nil); +end; + + +procedure TMgrid.DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); + +VAR OldColor : TColor; + OldBrush : TBrush; + fcolor : longint; + u,i,b : boolean; +begin +with Canvas do +begin + OldColor := Font.Color; + OldBrush := Brush; + brush.style := bssolid; +if (Acol < fixedcols) or (Arow < fixedrows) then + begin + if not Fborderbitmap.empty then + begin + brush.bitmap := Fborderbitmap; + PaletteChanged(false); + end + else + brush.color := Fcolors1; + Font.Color := clblack; + end +else +if odd(Arow) then + begin + if not Foddbitmap.empty then + begin + brush.bitmap := Foddbitmap; + PaletteChanged(false); + end + else + brush.color := Fcolors2; + end +else + begin + if not FevenBitmap.empty then + begin + brush.bitmap := FevenBitmap; + PaletteChanged(false); + end + else + brush.color := Fcolors3; + end; + FillRect(ARect); + SetBkMode(Canvas.Handle,TRANSPARENT); + b:= fsbold in canvas.font.style; + i:= fsitalic in canvas.font.style; + u:= fsUnderline in canvas.font.style; + fcolor := -1; + if assigned(Fsetting) THEN + begin + Fsetting(arow,acol,FCOLOR,b,i,u); + if fcolor >=0 then + CANVAS.FONT.COLOR := TCOLOR(FCOLOR); + CANVAS.FONT.style := []; + if b then + CANVAS.FONT.style := [fsbold]; + if i then + CANVAS.FONT.style := CANVAS.FONT.style + [fsitalic]; + if u then + CANVAS.FONT.style := CANVAS.FONT.style + [fsunderline]; + end; + + if FAlignCell = taLeftJustify then + TextOut(ARect.Left+2,ARect.Top+2,Cells[ACol,ARow]) + else + TextOut(ARect.Left+2 + (ARect.Right - ARect.Left - 3 - TextWidth(Cells[ACol,ARow])), + ARect.Top+2,Cells[ACol,ARow]); + Font.Color := OldColor; + Brush := OldBrush; + end; + +end; +end. + diff --git a/lib/cologrid/Cologrid.~pa b/lib/cologrid/Cologrid.~pa new file mode 100644 index 00000000..0428602b --- /dev/null +++ b/lib/cologrid/Cologrid.~pa @@ -0,0 +1,265 @@ +{Copyright 1998 by Michael Tran} + +unit Cologrid; +{.$R mgrid.res} +interface + +uses WinTypes, WinProcs, Messages, SysUtils, Classes, Controls, + Graphics, Grids, menus; + +type + TSettingEvent = Procedure(ARow,Acol: Longint;var Fcolor:Longint;var Bold,Italic,underline:boolean) of object; + TMgrid = class(TStringGrid) + private + { Private fields of TMgrid } + Fsetting:TSettingEvent; + FColors1: Tcolor; + FColors2: Tcolor; + FColors3: Tcolor; + FAlignCell : TAlignment; + { Private methods of TMgrid } + { Method to set variable and property values and create objects } + procedure AutoInitialize; + { Method to free any objects created by AutoInitialize } + procedure AutoDestroy; + protected + FBorderbitmap : tbitmap; + FoddBitmap : Tbitmap; + FevenBitmap : Tbitmap; + + { Protected methods of TMgrid } + procedure Loaded; override; + procedure Paint; override; + Procedure setCellAlignment(value : TAlignment); + Procedure setBorderColor(value : tcolor); + Procedure setOddColor(value : tcolor); + Procedure setEvencolor(value : tcolor); + Procedure SetBorderBitmap(value: Tbitmap); + Procedure SetOddBitmap(value: Tbitmap); + Procedure SetEvenBitmap(value: Tbitmap); + public + { Public fields of TMgrid } + procedure DrawCell(ACol, ARow: Longint; ARect: TRect; + AState: TGridDrawState); override; + procedure DrawCellText(ACol, ARow: Longint; ARect: TRect); + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function GetPalette: HPALETTE; override; + published + { Published properties of the component } + Property Alignment : TAlignment read FAlignCell write setCellAlignment; + Property BorderColor: Tcolor read Fcolors1 write setBorderColor; + Property OddRowColor: Tcolor read Fcolors2 write setOddColor; + Property EvenRowColor: Tcolor read Fcolors3 write setEvenColor; + Property BorderPattern : Tbitmap read Fborderbitmap write SetBorderBitmap stored true; + Property OddRowPattern : Tbitmap read FOddbitmap write SetOddBitmap; + Property EvenRowPattern : Tbitmap read FEvenbitmap write SetEvenBitmap; + Property Popupmenu; + property OnClick; + property OnDblClick; + property OnDragDrop; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnKeyUp; + property OnKeyDown; + property OnKeyPress; + property OnEnter; + property OnExit; + Property OnSetting: TSettingEvent read Fsetting write Fsetting; + property OnDrawCell; +end; + +procedure Register; + +Implementation + +procedure Register; +begin + RegisterComponents('Mik', [TMgrid]); +end; + +procedure TMgrid.SetBorderBitmap(value: Tbitmap); +begin + FBorderbitmap.assign(value); + refresh; + +end; +procedure TMgrid.SetOddBitmap(value: Tbitmap); +begin + FoddBitmap.assign(value); + refresh; + +end; + +function TMgrid.GetPalette: HPALETTE; +begin + Result := 0; { default result is no palette } + Result := TBitmap(FoddBitmap).Palette; { use it if available } +end; + +procedure TMgrid.SetEvenBitmap(value: Tbitmap); +begin + FevenBitmap.assign(value); + refresh; +end; +procedure TMgrid.setCellAlignment(value : TAlignment); +begin +FAlignCell := value; +refresh; +end; +procedure TMgrid.setBorderColor(value : tcolor); +begin +fcolors1 := value; +refresh; +end; +procedure TMgrid.setOddColor(value : tcolor); +begin +fcolors2 := value; +refresh; +end; +procedure TMgrid.setEvencolor(value : tcolor); +begin +fcolors3 := value; +refresh; +end; + +procedure TMgrid.AutoInitialize; +begin +FONT.name := 'Arial'; +FONT.size := 10; +CANVAS.BRUSH.COLOR := color; +CANVAS.FONT := FONT; +FBorderbitmap := tbitmap.create; +FoddBitmap := Tbitmap.create; +FevenBitmap := Tbitmap.create; +fcolors1 := clsilver; +fcolors2 := clAqua; +fcolors3 := cllime; +FAlignCell := taLeftJustify; +refresh; +end; { of AutoInitialize } + +{ Method to free any objects created by AutoInitialize } +procedure TMgrid.AutoDestroy; +begin + FBorderbitmap.free; + FoddBitmap.free; + FevenBitmap.free; +end; { of AutoDestroy } + + +constructor TMgrid.Create(AOwner: TComponent); +begin + + inherited Create(AOwner); + AutoInitialize; + +end; + +destructor TMgrid.Destroy; +begin + AutoDestroy; + inherited Destroy; +end; + +procedure TMgrid.Loaded; +begin +inherited Loaded; +end; + +procedure TMgrid.Paint; +begin + { Make this component look like its parent component by calling + its parent's Paint method. } + inherited Paint; + +end; + + +procedure TMgrid.DrawCellText(ACol, ARow: Longint; ARect: TRect); +var + Text: array[0..255] of Char; + begin + StrPCopy(Text, Cells[ACol, ARow]); + ExtTextOut(Canvas.Handle, ARect.Left + 2, ARect.Top + 2, ETO_CLIPPED or + ETO_OPAQUE, @ARect, Text, StrLen(Text), nil); +end; + + +procedure TMgrid.DrawCell(ACol, ARow: Longint; ARect: TRect; AState: TGridDrawState); + +VAR OldColor : TColor; + OldBrush : TBrush; + fcolor : longint; + u,i,b : boolean; +begin +with Canvas do +begin + OldColor := Font.Color; + OldBrush := Brush; + brush.style := bssolid; +if (Acol < fixedcols) or (Arow < fixedrows) then + begin + if not Fborderbitmap.empty then + begin + brush.bitmap := Fborderbitmap; + PaletteChanged(false); + end + else + brush.color := Fcolors1; + Font.Color := clblack; + end +else +if odd(Arow) then + begin + if not Foddbitmap.empty then + begin + brush.bitmap := Foddbitmap; + PaletteChanged(false); + end + else + brush.color := Fcolors2; + end +else + begin + if not FevenBitmap.empty then + begin + brush.bitmap := FevenBitmap; + PaletteChanged(false); + end + else + brush.color := Fcolors3; + end; + FillRect(ARect); + SetBkMode(Canvas.Handle,TRANSPARENT); + b:= fsbold in canvas.font.style; + i:= fsitalic in canvas.font.style; + u:= fsUnderline in canvas.font.style; + fcolor := -1; + if assigned(Fsetting) THEN + begin + Fsetting(arow,acol,FCOLOR,b,i,u); + if fcolor >=0 then + CANVAS.FONT.COLOR := TCOLOR(FCOLOR); + CANVAS.FONT.style := []; + if b then + CANVAS.FONT.style := [fsbold]; + if i then + CANVAS.FONT.style := CANVAS.FONT.style + [fsitalic]; + if u then + CANVAS.FONT.style := CANVAS.FONT.style + [fsunderline]; + end; + + if FAlignCell = taLeftJustify then + TextOut(ARect.Left+2,ARect.Top+2,Cells[ACol,ARow]) + else + TextOut(ARect.Left+2 + (ARect.Right - ARect.Left - 3 - TextWidth(Cells[ACol,ARow])), + ARect.Top+2,Cells[ACol,ARow]); + Font.Color := OldColor; + Brush := OldBrush; + end; + +end; +end. + diff --git a/lib/cologrid/P2.DPR b/lib/cologrid/P2.DPR new file mode 100644 index 00000000..9852b7fd --- /dev/null +++ b/lib/cologrid/P2.DPR @@ -0,0 +1,12 @@ +program P2; + +uses + Forms, + U3 in 'U3.PAS' {Form2}; + +{$R *.RES} + +begin + Application.CreateForm(TForm2, Form2); + Application.Run; +end. diff --git a/lib/cologrid/P2.OPT b/lib/cologrid/P2.OPT new file mode 100644 index 00000000..9cd0a656 --- /dev/null +++ b/lib/cologrid/P2.OPT @@ -0,0 +1,34 @@ +[Compiler] +A=1 +B=0 +D=1 +F=0 +I=1 +K=1 +L=1 +P=1 +Q=0 +R=0 +S=1 +T=0 +U=1 +V=0 +W=0 +X=1 +Y=1 + +[Linker] +MapFile=0 +LinkBuffer=0 +DebugInfo=0 +OptimizeExe=0 +StackSize=16384 +HeapSize=8192 + +[Directories] +OutputDir= +SearchPath= +Conditionals= + +[Parameters] +RunParams= diff --git a/lib/cologrid/README.TXT b/lib/cologrid/README.TXT new file mode 100644 index 00000000..0d14f6ed --- /dev/null +++ b/lib/cologrid/README.TXT @@ -0,0 +1,8 @@ +ColorGrid-MsMoney like. 1.01. +What makes it different from others? +It's small (277 LOC). It comes with full source. It take less resource. +Do anything you want with it. Consider it is yours. +More free components, tips, docs in Delphi Heritage Controls +(www.cs.monash.edu.au/~vtran) + + diff --git a/lib/cologrid/U3.DFM b/lib/cologrid/U3.DFM new file mode 100644 index 00000000..b851f8c6 Binary files /dev/null and b/lib/cologrid/U3.DFM differ diff --git a/lib/cologrid/U3.PAS b/lib/cologrid/U3.PAS new file mode 100644 index 00000000..a19267e6 --- /dev/null +++ b/lib/cologrid/U3.PAS @@ -0,0 +1,71 @@ +unit U3; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, Grids, Cologrid, ExtCtrls, StdCtrls, Moneybar, Menus; + +type + TForm2 = class(TForm) + Mgrid1: TMgrid; + PopupMenu1: TPopupMenu; + Selectoption11: TMenuItem; + SelectOption21: TMenuItem; + Option31: TMenuItem; + procedure Mgrid1Setting(ARow, Acol: Longint; var Fcolor: Longint; + var Bold, Italic, underline: Boolean); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form2: TForm2; + +implementation + +{$R *.DFM} + +procedure TForm2.Mgrid1Setting(ARow, Acol: Longint; var Fcolor: Longint; + var Bold, Italic, underline: Boolean); +begin +if acol = 0 then + begin + fcolor := clblue; + bold := true; + end; +if arow = 0 then + begin + fcolor := clblue; + bold := true; + end; +if (acol = 2) and (arow> 0) then + begin + fcolor := clred; + bold := true; + italic := true; + end; +if (acol = 4) and (arow> 0) then + begin + fcolor := clgreen; + bold := true; + italic := true; + underline := true + end; +end; + +procedure TForm2.FormCreate(Sender: TObject); +var i,f : byte; +begin +for i := 0 to 9 do + for f := 0 to 9 do + Mgrid1.cells[f,i] := inttostr(i) + 'x' + inttostr(f); + +end; + +end. + +pallete diff --git a/lib/date/CalPop97.dcu b/lib/date/CalPop97.dcu new file mode 100644 index 00000000..e7f5ed40 Binary files /dev/null and b/lib/date/CalPop97.dcu differ diff --git a/lib/date/CalPop97.dfm b/lib/date/CalPop97.dfm new file mode 100644 index 00000000..55d3a038 Binary files /dev/null and b/lib/date/CalPop97.dfm differ diff --git a/lib/date/CalPop97.pas b/lib/date/CalPop97.pas new file mode 100644 index 00000000..b136ab67 --- /dev/null +++ b/lib/date/CalPop97.pas @@ -0,0 +1,1268 @@ +unit CalPop97; + +(****************************************************************************** +tFrmCalPop97 + +This form unit is used by the DateEdit97 component. + +Author name=BOURMAD Mehdi +Author E-mail=bourmad@mygale.org +Author URL=www.mygale.org/~bourmad +******************************************************************************) + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, StdCtrls; + +const + m_DaysPerMonth: array[1..12] of Integer = + (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); + +type + TfrmCalPop97 = class(TForm) + procedure FormCancel; + procedure FormMouseDown(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); + procedure FormMouseUp(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); + procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, + Y: Integer); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure FormPaint(Sender: TObject); + procedure FormShow(Sender: TObject); + private + Button_Width,Button_Height,BORDER,TEXT_INDENT: integer; + m_CurrentDateSelected: TDateTime; + m_FontWidth: Integer; + m_FontHeight: Integer; + m_DateArray: array[1..42] of string[2]; + m_CurrentDateIndex: Integer; + m_PreviousDateHighlight, + m_PreviousDateIndex: Integer; + m_MouseDown: Bool; + m_CurrentDay, m_CurrentYear, m_CurrentMonth: Word; + m_PreviousDay, m_PreviousYear, m_PreviousMonth: Word; + ParentColor:TColor; + ctlParent : tComponent; + procedure ClosePopup; + procedure WMMouseActivate(var Message: TWMActivate); Message WM_MOUSEACTIVATE; + procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; + protected + function DaysInMonth(nMonth: Integer): Integer; + procedure DrawButtons; + procedure DrawCalendarBorder; + Function GetGoodColor (dtTest : tDateTime) : tColor; + procedure DrawDates; + procedure DrawDaysHeader; + procedure EraseDateFrame(nIndex: Integer); + procedure DrawFocusFrame(nIndex: Integer; IsUp : boolean); + procedure DrawMonthHeader; + function GetMonthBegin: Integer; + function GetCalendarRect: TRect; + function GetLeftButtonRect: TRect; + function GetRightButtonRect: TRect; + function GetDblLeftButtonRect: TRect; + function GetDblRightButtonRect: TRect; + function GetCancelButtonRect: TRect; + function GetRectFromIndex(nIndex: Integer): TRect; + function GetIndexFromDate: Integer; + function GetIndexFromPoint(nLeft: Integer; nTop: Integer): Integer; + function IsLeapYear: Boolean; + procedure LoadDateArray; + procedure NextDay; + procedure PrevDay; + procedure NextWeek; + procedure PrevWeek; + procedure NextMonth; + procedure PrevMonth; + procedure NextYear; + procedure PrevYear; + procedure SetDate(nDays: Integer); + public + constructor Create(AOwner: TComponent); override; + end; + +implementation + +uses + DateEd97; + +{$R *.DFM} + +procedure DrawLine(Canvas:TCanvas;X1,Y1,X2,Y2:integer); +begin + Canvas.MoveTo(X1,Y1); + Canvas.LineTo(X2,Y2); +end; + +function PointInRect(const rectTest: TRect; X, Y: Integer): Boolean; +begin + Result := ((X >= rectTest.Left) and + (X <= rectTest.Right) and + (Y >= rectTest.Top) and + (Y <= rectTest.Bottom)); +end; + +{************************** Create ************************ + ***** This procedure is used to initialize values ***** + ***** for control owner, calendar position and ***** + ***** other resources. ***** + **********************************************************} +constructor TfrmCalPop97.Create(AOwner: TComponent); +var + tmTextMetrics: TTextMetric; + rectPlace: TRect; + ptUpper, ptLower: TPoint; + nTop, nLeft : Integer; +begin + inherited Create(AOwner); + + ctlParent := AOwner; + + (ctlParent as TDateEdit97).DoDate; + + {if the FontWidth is not set, determine Font Height and Width for + positioning Dates} + with Canvas do + begin + Font := (ctlParent as TDateEdit97).Font; + ParentColor := Font.Color; + Pen.Color := ParentColor; + GetTextMetrics(Handle, tmTextMetrics); + m_FontWidth := Round(tmTextMetrics.tmAveCharWidth + + tmTextMetrics.tmAveCharWidth * 6 / 10); + m_FontHeight := Round(tmTextMetrics.tmHeight + + tmTextMetrics.tmHeight / 3); + + Button_Width := m_FontWidth * 3 div 2; + if Button_Width < 16 + then Button_Width := 16; + Button_Height := Button_Width; + BORDER := Button_width div 8 + 1; + TEXT_INDENT := BORDER; + end; + + {Initialize form Height & Width based on Font } + Height := (m_FontHeight * 6) + (m_FontHeight * 2) + (BORDER * 2); + Width := ((m_FontWidth *3) * 7) + (2* BORDER) + (2* TEXT_INDENT); + {comment : m_FontWidth *3 = width for 1 character} + + {Dynamically set the size and position} + rectPlace := (ctlParent as TDateEdit97).ClientRect; + ptUpper.X := rectPlace.Left; + ptUpper.Y := rectPlace.Top; + ptUpper := (ctlParent as TDateEdit97).ClientToScreen(ptUpper); + ptLower.X := rectPlace.Right; + ptLower.Y := rectPlace.Bottom; + ptLower := (ctlParent as TDateEdit97).ClientToScreen(ptLower); + + {if too far down, pop the calendar above the control} + if ptUpper.X + 1 + Width > Screen.Width then + nLeft := Screen.Width - Width - 1 + else + nLeft := ptUpper.X + 1; + + if ptLower.Y + 1 + Height > Screen.Height then + nTop := ptUpper.Y - Height + else + nTop := ptLower.Y + 1; + + SetBounds (nLeft, nTop, Width, Height); + + {Define initial date} + m_CurrentDateSelected := Date; + + {Extract date Components} + DecodeDate(m_CurrentDateSelected, m_CurrentYear, m_CurrentMonth, m_CurrentDay); + m_CurrentDateIndex := m_CurrentDay + GetMonthBegin - 1; + m_PreviousDateIndex := 0; + m_PreviousDateHighlight := 0; + + LoadDateArray; + m_MouseDown := False; + +end; + +{*********************** FormShow ************************* + ***** This procedure is used to initialize values ***** + ***** for control owner, calendar position and ***** + ***** other resources when showing it ***** + **********************************************************} +procedure TfrmCalPop97.FormShow(Sender: TObject); +var + rectPlace: TRect; + ptUpper, ptLower: TPoint; + nTop, nLeft : Integer; +begin + {Transform the number in date to assign it to varibles} + (ctlParent as TDateEdit97).DoDate; + + {Initialize form Height & Width based on Font } + Height := (m_FontHeight * 6) + (m_FontHeight * 2) + (BORDER * 2); + Width := ((m_FontWidth *3) * 7) + (2* BORDER) + (2* TEXT_INDENT); + {comment : m_FontWidth *3 = width for 1 character} + + {Dynamically set the size and position} + rectPlace := (ctlParent as TDateEdit97).ClientRect; + ptUpper.X := rectPlace.Left; + ptUpper.Y := rectPlace.Top; + ptUpper := (ctlParent as TDateEdit97).ClientToScreen(ptUpper); + ptLower.X := rectPlace.Right; + ptLower.Y := rectPlace.Bottom; + ptLower := (ctlParent as TDateEdit97).ClientToScreen(ptLower); + + {if too far down, pop the calendar above the control} + if ptUpper.X + 1 + Width > Screen.Width then + nLeft := Screen.Width - Width - 1 + else + nLeft := ptUpper.X + 1; + + if ptLower.Y + 1 + Height > Screen.Height then + nTop := ptUpper.Y - Height + else + nTop := ptLower.Y + 1; + + SetBounds (nLeft, nTop, Width, Height); + + {Define initial date} + if (Length((ctlParent as TDateEdit97).Text)=0) + or (ctlParent as TDateEdit97).PopupToday + then + m_CurrentDateSelected := Date + else + try + m_CurrentDateSelected := StrToDate((ctlParent as TDateEdit97).Text) + except + m_CurrentDateSelected := Date; + end; + + {Extract date Components} + DecodeDate(m_CurrentDateSelected, m_CurrentYear, m_CurrentMonth, m_CurrentDay); + m_CurrentDateIndex := m_CurrentDay + GetMonthBegin - 1; + m_PreviousDateIndex := 0; + m_PreviousDateHighlight := 0; + + LoadDateArray; + m_MouseDown := False; +end; + +procedure TfrmCalPop97.ClosePopup; +begin + if (ctlParent as TDateEdit97).IsModal + then Close; + (ctlParent as TDateEdit97).PopupCalendar(Self); +end; + +{********************** WMMouseActivate ******************* + *** These functions hide calendar when it loose focus *** + **********************************************************} +procedure TfrmCalPop97.WMMouseActivate(var Message: TWMActivate); +begin + inherited; + Message.Result := MA_NOACTIVATE; +end; + +procedure TfrmCalPop97.WMKillFocus(var Message: TWMKillFocus); +begin + inherited; + if Visible + then ClosePopup; +end; + +{********************** Days In Month ********************* + ***** This function returns the number of days in ***** + ***** the month specified in nMonth. ***** + **********************************************************} +function TfrmCalPop97.DaysInMonth(nMonth: Integer): Integer; +begin + Result := m_DaysPerMonth[nMonth]; + if (nMonth = 2) and IsLeapYear then Inc(Result); { leap-year Feb is special } +end; + +{******************** Draw Butttons *********************** + **********************************************************} +procedure TfrmCalPop97.DrawButtons; +var + LeftButtonRect: TRect; + RightButtonRect: TRect; + DblLeftButtonRect: TRect; + DblRightButtonRect: TRect; + CancelButtonRect: TRect; + OldStyle: TBrushStyle; + ArrowWMarg, + ArrowHMarg : integer; +begin + with Canvas do + begin + LeftButtonRect := GetLeftButtonRect; + RightButtonRect := GetRightButtonRect; + DblLeftButtonRect := GetDblLeftButtonRect; + DblRightButtonRect := GetDblRightButtonRect; + CancelButtonRect := GetCancelButtonRect; + + {Select Solid Pen} + Pen.Style := psSolid; + Pen.Width := 1; + + {Create Embossed effect - Outline left & upper in white} + Pen.Color := clWhite; + MoveTo(LeftButtonRect.Left, LeftButtonRect.Bottom - 1); + LineTo(LeftButtonRect.Left, LeftButtonRect.Top); + LineTo(LeftButtonRect.Right - 1, LeftButtonRect.Top); + + MoveTo(RightButtonRect.Left, RightButtonRect.Bottom - 1); + LineTo(RightButtonRect.Left, RightButtonRect.Top); + LineTo(RightButtonRect.Right - 1, RightButtonRect.Top); + + MoveTo(DblLeftButtonRect.Left, DblLeftButtonRect.Bottom - 1); + LineTo(DblLeftButtonRect.Left, DblLeftButtonRect.Top); + LineTo(DblLeftButtonRect.Right - 1, DblLeftButtonRect.Top); + + MoveTo(DblRightButtonRect.Left, DblRightButtonRect.Bottom - 1); + LineTo(DblRightButtonRect.Left, DblRightButtonRect.Top); + LineTo(DblRightButtonRect.Right - 1, DblRightButtonRect.Top); + + MoveTo(CancelButtonRect.Left, CancelButtonRect.Bottom - 1); + LineTo(CancelButtonRect.Left, CancelButtonRect.Top); + LineTo(CancelButtonRect.Right - 1, CancelButtonRect.Top); + + {Create Embossed effect - Outline right & bottom in gray } + Pen.Color := clBtnShadow; + MoveTo(LeftButtonRect.Right - 1, LeftButtonRect.Top); + LineTo(LeftButtonRect.Right - 1, LeftButtonRect.Bottom - 1); + LineTo(LeftButtonRect.Left, LeftButtonRect.Bottom - 1); + + MoveTo(RightButtonRect.Right - 1, RightButtonRect.Top); + LineTo(RightButtonRect.Right - 1, RightButtonRect.Bottom - 1); + LineTo(RightButtonRect.Left, RightButtonRect.Bottom - 1); + + MoveTo(DblLeftButtonRect.Right - 1, DblLeftButtonRect.Top); + LineTo(DblLeftButtonRect.Right - 1, DblLeftButtonRect.Bottom - 1); + LineTo(DblLeftButtonRect.Left, DblLeftButtonRect.Bottom - 1); + + MoveTo(DblRightButtonRect.Right - 1, DblRightButtonRect.Top); + LineTo(DblRightButtonRect.Right - 1, DblRightButtonRect.Bottom - 1); + LineTo(DblRightButtonRect.Left, DblRightButtonRect.Bottom - 1); + + MoveTo(CancelButtonRect.Right - 1, CancelButtonRect.Top); + LineTo(CancelButtonRect.Right - 1, CancelButtonRect.Bottom - 1); + LineTo(CancelButtonRect.Left, CancelButtonRect.Bottom - 1); + + ArrowWMarg := Button_Width div 4; + ArrowHMarg := Button_Height div 4; + + {Draw Arrows} + Brush.Color := (ctlParent as TDateEdit97).ColorArrow; + OldStyle := Brush.Style; + Brush.Style := bsSolid; + Pen.Color := (ctlParent as TDateEdit97).ColorArrow; +{ SUBSTITUITED + Polygon([Point (LeftButtonRect.Right - ArrowWMarg-1, + LeftButtonRect.Top + ArrowHMarg), + Point (LeftButtonRect.Right - ArrowWMarg-1, + LeftButtonRect.Bottom - ArrowHMarg-1), + Point (LeftButtonRect.Left + ArrowWMarg, + RightButtonRect.Top + Button_Height div 2-1)]); + + Polygon([Point (RightButtonRect.Left + ArrowWMarg, + RightButtonRect.Top + ArrowHMarg), + Point (RightButtonRect.Left + ArrowWMarg, + RightButtonRect.Bottom - ArrowHMarg-1), + Point (RightButtonRect.Right - ArrowWMarg-1, + RightButtonRect.Top + Button_Height div 2-1)]); +} + Polygon([Point (LeftButtonRect.Right - ArrowWMarg -3, + LeftButtonRect.Top + ArrowHMarg), + Point (LeftButtonRect.Right - ArrowWMarg -3, + LeftButtonRect.Bottom - ArrowHMarg), + Point (LeftButtonRect.Left+Button_Width div 2 -3, + LeftButtonRect.Top + Button_Height div 2)]); + + Polygon([Point (RightButtonRect.Left+Button_Width div 2 -1, + RightButtonRect.Top + ArrowHMarg), + Point (RightButtonRect.Left+Button_Width div 2 -1, + RightButtonRect.Bottom - ArrowHMarg), + Point (RightButtonRect.Right - ArrowWMarg -1, + RightButtonRect.Top + Button_Height div 2)]); + + {Draw Double Arrows} + Brush.Color := (ctlParent as TDateEdit97).ColorArrow; + OldStyle := Brush.Style; + Brush.Style := bsSolid; + Pen.Color := (ctlParent as TDateEdit97).ColorArrow; +{ SUBSTITUITED + Polygon([Point (DblLeftButtonRect.Right - ArrowWMarg-1, + DblLeftButtonRect.Top + ArrowHMarg), + Point (DblLeftButtonRect.Right - ArrowWMarg-1, + DblLeftButtonRect.Bottom - ArrowHMarg), + Point (DblLeftButtonRect.Left+Button_Width div 2, + DblLeftButtonRect.Top + Button_Height div 2-1)]); + + Polygon([Point (DblLeftButtonRect.Left + Button_Width div 2-1, + DblLeftButtonRect.Top + ArrowHMarg), + Point (DblLeftButtonRect.Left + Button_Width div 2-1, + DblLeftButtonRect.Bottom - ArrowHMarg), + Point (DblLeftButtonRect.Left + ArrowWMarg, + DblLeftButtonRect.Top + Button_Height div 2-1)]); + + Polygon([Point (DblRightButtonRect.Left+Button_Width div 2, + DblRightButtonRect.Top + ArrowHMarg), + Point (DblRightButtonRect.Left+Button_Width div 2, + DblRightButtonRect.Bottom - ArrowHMarg), + Point (DblRightButtonRect.Right - ArrowWMarg-1, + DblRightButtonRect.Top + Button_Height div 2-1)]); + + Polygon([Point (DblRightButtonRect.Left + ArrowWMarg, + DblRightButtonRect.Top + ArrowHMarg), + Point (DblRightButtonRect.Left + ArrowWMarg, + DblRightButtonRect.Bottom - ArrowHMarg), + Point (DblRightButtonRect.Left + Button_Width div 2-1, + DblRightButtonRect.Top + Button_Height div 2-1)]); +} + Polygon([Point (DblLeftButtonRect.Right - ArrowWMarg, + DblLeftButtonRect.Top + ArrowHMarg), + Point (DblLeftButtonRect.Right - ArrowWMarg, + DblLeftButtonRect.Bottom - ArrowHMarg), + Point (DblLeftButtonRect.Left+Button_Width div 2, + DblLeftButtonRect.Top + Button_Height div 2)]); + + Polygon([Point (DblLeftButtonRect.Left + Button_Width div 2 - 1, + DblLeftButtonRect.Top + ArrowHMarg), + Point (DblLeftButtonRect.Left + Button_Width div 2 - 1, + DblLeftButtonRect.Bottom - ArrowHMarg), + Point (DblLeftButtonRect.Left + ArrowWMarg - 1, + DblLeftButtonRect.Top + Button_Height div 2)]); + + Polygon([Point (DblRightButtonRect.Left+Button_Width div 2, + DblRightButtonRect.Top + ArrowHMarg), + Point (DblRightButtonRect.Left+Button_Width div 2, + DblRightButtonRect.Bottom - ArrowHMarg), + Point (DblRightButtonRect.Right - ArrowWMarg, + DblRightButtonRect.Top + Button_Height div 2)]); + + Polygon([Point (DblRightButtonRect.Left + ArrowWMarg - 1, + DblRightButtonRect.Top + ArrowHMarg), + Point (DblRightButtonRect.Left + ArrowWMarg - 1, + DblRightButtonRect.Bottom - ArrowHMarg), + Point (DblRightButtonRect.Left + Button_Width div 2-1, + DblRightButtonRect.Top + Button_Height div 2)]); + + {Draw Cancel Button} +{ SUBSTITUITED + Pen.Color := clMaroon; + Pen.Width := 2; + MoveTo(CancelButtonRect.Left + 4, CancelButtonRect.Bottom - 4); + LineTo(CancelButtonRect.Right - 4, CancelButtonRect.Top + 3); + Pen.Width := 3; + MoveTo(CancelButtonRect.Left + 4, CancelButtonRect.Top + 3); + LineTo(CancelButtonRect.Right - 4, CancelButtonRect.Bottom - 4); +} + Pen.Color := clMaroon; + Pen.Width := 2; + MoveTo(CancelButtonRect.Left + 5, CancelButtonRect.Bottom - 4); + LineTo(CancelButtonRect.Right - 5, CancelButtonRect.Top + 4); + Pen.Width := 2; + MoveTo(CancelButtonRect.Left + 5, CancelButtonRect.Top + 4); + LineTo(CancelButtonRect.Right - 5, CancelButtonRect.Bottom - 4); + + Brush.Style := OldStyle; + Brush.Color := clBtnFace; + Pen.Color := clBlack; + Pen.Width := 1; + end; +end; + +{*************** Draw Calendar Border ********************* + **********************************************************} +procedure TfrmCalPop97.DrawCalendarBorder; +var + rectDraw: TRect; +begin + rectDraw := ClientRect; + with Canvas do + begin + {Select Black Pen to outline Window } + Pen.Style := psSolid; + Pen.Width := 1; + Pen.Color := clBlack; + Brush.Color := clBtnFace; {added for use clBtnFace instead of clSilver} + Brush.Style := bsSolid; + + {Outline the window in black } + Rectangle(rectDraw.Left, rectDraw.Top, rectDraw.Right, rectDraw.Bottom); + + {Create Embossed effect - Outline left & upper in white} + Pen.Color := clWhite; + MoveTo(0, rectDraw.Bottom - 1); + LineTo(0, 0); + LineTo(rectDraw.Right - 1, 0); + + {Create Embossed effect - Outline right & bottom in gray } + Pen.Color := clBtnShadow; + LineTo(rectDraw.Right - 1, rectDraw.Bottom - 1); + LineTo(0, rectDraw.Bottom - 1); + end; +end; + +{******************* GetGoodColor ************************* + **********************************************************} +Function TfrmCalPop97.GetGoodColor (dtTest : tDateTime) : tColor; +begin + if (ctlParent as TDateEdit97).DateInList(dtTest) then + Result := (ctlParent as TDateEdit97).ColorValidDate + else begin + if DayOfWeek (dtTest) in [1, 7] + then Result := (ctlParent as TDateEdit97).ColorWeekEnd + else Result := (ctlParent as TDateEdit97).ColorDates + end; +end; + +{*********************** Draw Dates *********************** + **********************************************************} +procedure TfrmCalPop97.DrawDates; +var + nIndex, nWeek, nDay: Integer; + pDate: PChar; + TempRect: Trect; + dtTest: TDateTime; +begin + pDate := StrAlloc(3); + + with Canvas do + begin + {Define normal font } + Font := (ctlParent as TDateEdit97).Font; + + {Cycle through the weeks } + for nWeek := 1 to 6 do + begin + {Cycle through the days } + for nDay := 1 to 7 Do + begin + nIndex := nDay + ((nWeek - 1) * 7); + + StrPCopy(pDate, m_DateArray[nIndex]); + if m_DateArray[nIndex] <> ' ' then + begin + dtTest := EncodeDate (m_CurrentYear, m_CurrentMonth, + StrToInt(m_DateArray[nIndex])); + Font.Color := GetGoodColor (dtTest); + end; + + TempRect := GetCalendarRect; + with TempRect do + begin + Left := Left + ((m_FontWidth * 3) * (nDay - 1)); + Top := (m_FontHeight * nWeek) + m_FontHeight + BORDER; + Bottom := Top + m_FontHeight; + Right := Left + m_fontWidth * 3; + end; + + DrawText(Handle, pDate, Length(m_DateArray[nIndex]), + TempRect, (DT_CENTER or DT_VCENTER or DT_TOP or DT_SINGLELINE)); + end; + end; + end; + StrDispose(pDate); +end; + +{*********************** Draw Days ************************ + **********************************************************} +procedure TfrmCalPop97.DrawDaysHeader; +var + DayNo, I: Integer; + pDay: PChar; + TempRect: Trect; +begin + pDay := StrAlloc(3); + + {Calculate Rect Top. 2nd line = FontHeight * 2} + TempRect := ClientRect; + TempRect.Top := m_FontHeight + BORDER; + TempRect.Bottom := TempRect.Top + m_FontHeight; + + {Calculate each date rect. rect = FontWidth * 3 (width of two chars + space)} + TempRect.Left := TempRect.Left + BORDER + TEXT_INDENT; + TempRect.Right := BORDER + TEXT_INDENT + (m_FontWidth * 3); + + {Cycle through the days} + for I := 1 to 7 do + begin + DayNo := ((ctlParent as TDateEdit97).StartOfWeek + I - 2) mod 7 + 1; + StrPCopy(pDay, (ctlParent as TDateEdit97).DayArray^[DayNo]); + DrawText(Canvas.Handle, pDay, 2, TempRect, + (DT_CENTER or DT_TOP or DT_SINGLELINE)); + TempRect.Left := TempRect.Right; + TempRect.Right := TempRect.Right + m_FontWidth * 3; + end; + + {Draw line below days } + with Canvas do + begin + TempRect.Top := TempRect.Bottom - 3; + TempRect.Bottom := TempRect.Top + 2; + TempRect.Left := ClientRect.Left + BORDER + TEXT_INDENT; + TempRect.Right := BORDER + TEXT_INDENT + (m_FontWidth * 3 * 7); + + Pen.Color := clBtnShadow; + MoveTo(TempRect.Left , TempRect.Top); + LineTo(TempRect.Right, TempRect.Top); + Pen.Color := clWhite; + MoveTo(TempRect.Left, TempRect.Top + 1); + LineTo(TempRect.Right, TempRect.Top + 1); + end; + + StrDispose(pDay); +end; + +{******************** Draw Month Header ******************* + **********************************************************} +procedure TfrmCalPop97.DrawMonthHeader; +var + sMonth: String; + pMonth: PChar; + TempRect: Trect; +begin + with Canvas do + begin + Font.Style := [fsBold]; + Font.Color := (ctlParent as TDateEdit97).ColorTitle; + sMonth := (ctlParent as TDateEdit97).MonthArray^[m_CurrentMonth] + ' ' + + IntToStr(M_CurrentYear); + + pMonth := StrAlloc(Length(sMonth) + 1); + StrPCopy(pMonth, sMonth); + + TempRect := ClientRect; + TempRect.Top := BORDER; + TempRect.Left := BORDER + TEXT_INDENT + BUTTON_WIDTH*2; + TempRect.Right := TempRect.Right - BORDER - TEXT_INDENT - BUTTON_WIDTH*2; + TempRect.Bottom := m_FontHeight; + + Brush.Color := clBtnFace; + Brush.Style := bsSolid; + FillRect(TempRect); + + DrawText(Handle, pMonth, Length(sMonth), TempRect, + (DT_CENTER or DT_VCENTER or DT_BOTTOM or DT_SINGLELINE)); + end; + + StrDispose(pMonth); +end; + +{******************** Erase Date Frame ******************** + **********************************************************} +procedure TfrmCalPop97.EraseDateFrame(nIndex: Integer); +var + pDate :PChar; + TempRect: TRect; + dtTest: TDateTime; +begin + if nIndex > 0 then + begin + pDate := StrAlloc(3); + Canvas.Font.Style := []; + + if m_DateArray[nIndex] <> ' ' then + begin + dtTest := EncodeDate(m_CurrentYear, m_CurrentMonth, + StrToInt(m_DateArray[nIndex])); + Canvas.Font.Color := GetGoodColor(dtTest); + end; + + StrPCopy(pDate, m_DateArray[nIndex]); + Canvas.Brush.Color := clBtnFace; + TempRect := GetRectFromIndex(nIndex); + Canvas.FillRect(TempRect); + DrawText(Canvas.Handle, pDate, Length(m_DateArray[nIndex]), + TempRect, (DT_CENTER or DT_VCENTER or DT_TOP or DT_SINGLELINE)); + StrDispose(pDate); + end; +end; + +{******************** Draw Focus Frame ******************** + **********************************************************} +procedure TfrmCalPop97.DrawFocusFrame(nIndex: Integer; IsUp : boolean); +{if not Up, then Down ... for button style} +var + pDate :PChar; + TempRect: TRect; + dtTest: TDateTime; + CoulShadow, + CoulHighlight : tColor; +begin + if (nIndex > 0) and (nIndex < 42) then begin + if (m_DateArray[nIndex] <> ' ') then + begin + pDate := StrAlloc(3); + {Erase Previous Date Focus} + EraseDateFrame(m_PreviousDateIndex); + + {Draw the Date in Bold font} + Canvas.Font.Style := [fsBold]; + dtTest := EncodeDate(m_CurrentYear, m_CurrentMonth, StrToInt(m_DateArray[nIndex])); + Canvas.Font.Color := GetGoodColor (dtTest); + + TempRect := GetRectFromIndex(nIndex); + StrPCopy(pDate, m_DateArray[nIndex]); + DrawText(Canvas.Handle, pDate, Length(m_DateArray[nIndex]), + TempRect, (DT_CENTER or DT_VCENTER or DT_TOP or DT_SINGLELINE)); + + if IsUp + then begin + CoulShadow := clWhite; + CoulHighlight := clBtnShadow; + end + else begin + CoulShadow := clBtnShadow; + CoulHighlight := clWhite; + end; + {Frame date with Shadow } + Canvas.Pen.Color := CoulShadow; + Canvas.MoveTo(TempRect.Left, TempRect.Bottom - 1); + Canvas.LineTo(TempRect.Left, TempRect.Top); + Canvas.LineTo(TempRect.Right - 1, TempRect.Top); + + {Frame date with Highlight } + Canvas.Pen.Color := CoulHighlight; + Canvas.LineTo(TempRect.Right - 1, TempRect.Bottom - 1); + Canvas.LineTo(TempRect.Left, TempRect.Bottom - 1); + + StrDispose(pDate); + end; + end; +end; + +{********************* Form Cancel ************************ + **********************************************************} +procedure TfrmCalPop97.FormCancel; +begin + m_MouseDown := False; + ClosePopup; + + (ctlParent as TDateEdit97).DoEdit; +end; + +{******************* Form Key Down ************************ + **********************************************************} +procedure TfrmCalPop97.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_Left: begin + PrevDay; + if (m_CurrentMonth <> m_PreviousMonth) or + (m_CurrentYear <> m_PreviousYear) then + Refresh else DrawFocusFrame(m_CurrentDateIndex, False); + end; + + VK_Right: begin + NextDay; + if (m_CurrentMonth <> m_PreviousMonth) or + (m_CurrentYear <> m_PreviousYear) then + Refresh else DrawFocusFrame(m_CurrentDateIndex, False); + end; + + VK_Up: begin + PrevWeek; + if (m_CurrentMonth <> m_PreviousMonth) or + (m_CurrentYear <> m_PreviousYear) then + Refresh else DrawFocusFrame(m_CurrentDateIndex, False); + end; + + VK_Down: begin + NextWeek; + if (m_CurrentMonth <> m_PreviousMonth) or + (m_CurrentYear <> m_PreviousYear) then + Refresh else DrawFocusFrame(m_CurrentDateIndex, False); + end; + + VK_Prior: begin + PrevMonth; + Refresh; + end; + + VK_Next: begin + NextMonth; + Refresh; + end; + + VK_Home: begin + NextYear; + Refresh; + end; + + VK_End: begin + PrevYear; + Refresh; + end; + + VK_Return: begin + (ctlParent as TDateEdit97).Date := m_CurrentDateSelected; + (ctlParent as TDateEdit97).DoEdit; + ClosePopup; + end; + + VK_Escape: begin + FormCancel; + end; + end; +end; + +{********************** Form Mouse Down ******************* + **********************************************************} +procedure TfrmCalPop97.FormMouseDown(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +var + nIndex: Integer; + Key: Word; +begin + {Check if mouse was pressed in Left button area} + if PointInRect(GetLeftButtonRect, X, Y) then + begin + Key := VK_Prior; + FormKeyDown(Sender, Key,Shift); + end; + + {Check if mouse was pressed in Right button area} + if PointInRect(GetRightButtonRect, X, Y) then + begin + Key := VK_Next; + FormKeyDown(Sender, Key,Shift); + end; + + {Check if mouse was pressed in DblLeft button area} + if PointInRect(GetDblLeftButtonRect, X, Y) then + begin + Key := VK_End; + FormKeyDown(Sender, Key,Shift); + end; + + {Check if mouse was pressed in DblRight button area} + if PointInRect(GetDblRightButtonRect, X, Y) then + begin + Key := VK_Home; + FormKeyDown(Sender, Key,Shift); + end; + + {Check if mouse was pressed in Cancel button area} + if PointInRect(GetCancelButtonRect, X, Y) then + begin + Key := VK_Escape; + FormKeyDown(Sender, Key,Shift); + end; + + {Check if mouse was pressed in date area} + if PointInRect(GetCalendarRect, X, Y) then + begin + m_MouseDown := True; + nIndex := GetIndexFromPoint(X, Y); + + if (nIndex >= GetMonthBegin) and + (nIndex < (DaysInMonth(m_CurrentMonth) + GetMonthBegin)) then + begin + SetDate(nIndex - m_CurrentDateIndex); + DrawFocusFrame(nIndex, False); + end + else + m_MouseDown := False; + end; +end; + +{******************* Form Mouse Move ********************** + **********************************************************} +procedure TfrmCalPop97.FormMouseMove(Sender: TObject; Shift: TShiftState; X, + Y: Integer); +var + nIndex: Integer; +begin + {Check if mouse was pressed in date area} + if PointInRect(GetCalendarRect, X, Y) then + begin + nIndex := GetIndexFromPoint(X, Y); + if (nIndex >= GetMonthBegin) and + (nIndex < (DaysInMonth(m_CurrentMonth) + GetMonthBegin)) and + (nIndex <> m_CurrentDateIndex) then + begin + if not m_MouseDown then + begin + if m_PreviousDateHighlight <> nIndex + then begin + EraseDateFrame(m_PreviousDateHighlight); + DrawFocusFrame(nIndex, True); + m_PreviousDateHighlight := nIndex; + end; + end + else begin + SetDate(nIndex - m_CurrentDateIndex); + EraseDateFrame(m_PreviousDateHighlight); + DrawFocusFrame(nIndex, False); + end; + end + else + begin + EraseDateFrame(m_PreviousDateHighlight); + m_PreviousDateHighlight := 0; + end; + end + else begin + if m_PreviousDateHighlight <> m_CurrentDateIndex + then EraseDateFrame(m_PreviousDateHighlight); + m_PreviousDateHighlight := 0; + end; +end; + +{******************* Form Mouse Up ************************ + **********************************************************} +procedure TfrmCalPop97.FormMouseUp(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + if m_MouseDown then + begin + m_MouseDown := False; + (ctlParent as TDateEdit97).Date := m_CurrentDateSelected; + (ctlParent as TDateEdit97).DoEdit; + ClosePopup; + end; +end; + +{********************** Form Paint ************************ + **********************************************************} +procedure TfrmCalPop97.FormPaint(Sender: TObject); +begin + DrawCalendarBorder; + DrawMonthHeader; + DrawDaysHeader; + DrawDates; + DrawButtons; + DrawFocusFrame(m_CurrentDateIndex, False); +end; + +{********************* Get Left Button Rectangle ****************** + ***** Get the rectangle used for the left button. ***** + ******************************************************************} +function TfrmCalPop97.GetLeftButtonRect: TRect; +var + TempRect: TRect; +begin + {Define Left Button Rectangle} + TempRect.Top := ClientRect.Top + BORDER; + TempRect.Bottom := TempRect.Top + BUTTON_HEIGHT; + TempRect.Left := ClientRect.Left + (BORDER + TEXT_INDENT + BUTTON_WIDTH); + TempRect.Right := TempRect.Left + BUTTON_WIDTH; + + Result := TempRect; +end; + +{******************** Get Right Button Rectangle ****************** + ***** Get the rectangle used for the right button. ***** + ******************************************************************} +function TfrmCalPop97.GetRightButtonRect: TRect; +var + TempRect: TRect; +begin + {Define Right Button Rectangle} + TempRect.Top := ClientRect.Top + BORDER; + TempRect.Bottom := TempRect.Top + BUTTON_HEIGHT; + TempRect.Right := BORDER + TEXT_INDENT + (m_FontWidth * 3 * 7)-BUTTON_WIDTH; + TempRect.Left := TempRect.Right - BUTTON_WIDTH; + + Result := TempRect; +end; + +{********************* Get DblLeft Button Rectangle *************** + ***** Get the rectangle used for the dblleft button. ***** + ******************************************************************} +function TfrmCalPop97.GetDblLeftButtonRect: TRect; +var + TempRect: TRect; +begin + {Define DblLeft Button Rectangle} + TempRect.Top := ClientRect.Top + BORDER; + TempRect.Bottom := TempRect.Top + BUTTON_HEIGHT; + TempRect.Left := ClientRect.Left + BORDER + TEXT_INDENT; + TempRect.Right := TempRect.Left + BUTTON_WIDTH; + + Result := TempRect; +end; + +{******************** Get DblRight Button Rectangle *************** + ***** Get the rectangle used for the dblright button. ***** + ******************************************************************} +function TfrmCalPop97.GetDblRightButtonRect: TRect; +var + TempRect: TRect; +begin + {Define DblRight Button Rectangle} + TempRect.Top := ClientRect.Top + BORDER; + TempRect.Bottom := TempRect.Top + BUTTON_HEIGHT; + TempRect.Right := BORDER + TEXT_INDENT + (m_FontWidth * 3 * 7); + TempRect.Left := TempRect.Right - BUTTON_WIDTH; + + Result := TempRect; +end; + +{******************** Get Cancel Button Rectangle ***************** + ***** Get the rectangle used for the Cancel button. ***** + ******************************************************************} +function TfrmCalPop97.GetCancelButtonRect: TRect; +var + TempRect: TRect; +begin + {Define Cancel (Bottom, Right) Button Rectangle} + TempRect.Top := ClientRect.Bottom - BUTTON_WIDTH - BORDER; + TempRect.Bottom := TempRect.Top + BUTTON_HEIGHT; + TempRect.Right := BORDER + TEXT_INDENT + (m_FontWidth * 3 * 7); + TempRect.Left := TempRect.Right - BUTTON_WIDTH; + + Result := TempRect; +end; + +{********************** Get Calendar Rectangle ******************** + ***** Get the rectangle used for the calendar section ***** + ******************************************************************} +function TfrmCalPop97.GetCalendarRect: TRect; +var + TempRect: TRect; +begin + TempRect := ClientRect; + + with TempRect do + begin + Left := BORDER + TEXT_INDENT; + Top := (m_FontHeight * 2) + BORDER; + Bottom := Top + (m_FontHeight * 6); + Right := Left + (7 * (m_fontWidth * 3)); + end; + + Result := TempRect; +end; + +{******************** Get Rectangle From Index ******************** + ***** Get the rectangle used for the calendar section ***** + ******************************************************************} +function TfrmCalPop97.GetRectFromIndex(nIndex: Integer): TRect; +var + TempRect: TRect; + nWeek: Integer; + nDay: Integer; +begin + TempRect := GetCalendarRect; + + with TempRect do + begin + case nIndex of + 01..07: nWeek := 1; + 08..14: nWeek := 2; + 15..21: nWeek := 3; + 22..28: nWeek := 4; + 29..35: nWeek := 5; + 36..42: nWeek := 6; + else {see Delphi Warnings} + nWeek := 1; + end; + + nDay := nIndex - ((nWeek - 1) * 7); + + Left := Left + ((m_FontWidth * 3) * (nDay - 1)); + Top := (m_FontHeight * nWeek) + m_FontHeight + BORDER; + Bottom := Top + m_FontHeight; + Right := Left + m_fontWidth * 3; + end; + + Result := TempRect; +end; + +{*************************** Get Month Begin ************************** + ***** This function Gets the index value of the first day of the ***** + ***** month. ***** + ********************************************************************** } +function TfrmCalPop97.GetMonthBegin: Integer; +var + DOW: Integer; +begin + DOW := DayOfWeek(EncodeDate(m_CurrentYear, m_CurrentMonth, 1)) - 1; + if DOW = 0 then DOW := 7; + Result := (DOW - (ctlParent as TDateEdit97).StartOfWeek + 7) mod 7 + 1; +end; + +{********************** Is Leap Year ********************** + **********************************************************} +function TfrmCalPop97.IsLeapYear: Boolean; +begin + Result := (m_CurrentYear mod 4 = 0) and + ((m_CurrentYear mod 100 <> 0) or (m_CurrentYear mod 400 = 0)); +end; + +{********************** LoadDateArray ********************* + **********************************************************} +procedure TfrmCalPop97.LoadDateArray; +var + nIndex: Integer; + nBeginIndex, nEndIndex: Integer; +begin + nBeginIndex := GetMonthBegin; + nEndIndex := nBeginIndex + DaysInMonth(m_CurrentMonth) - 1; + for nIndex := 1 to 42 do + begin + if (nIndex < nBeginIndex) or (nIndex > nEndIndex) then + m_DateArray[nIndex] := ' ' + else + m_DateArray[nIndex] := IntToStr((nIndex - nBeginIndex) + 1); + end; +end; + +{******************** Get Index From Date ***************** + **********************************************************} +function TfrmCalPop97.GetIndexFromDate: Integer; +begin + Result := m_CurrentDay + GetMonthBegin; +end; + +{****************** Get Index From Point ****************** + **********************************************************} +function TfrmCalPop97.GetIndexFromPoint(nLeft: Integer ; nTop: Integer): Integer; +var + nIndex, nWeek, nDay: Integer; + nResult: Real; + TempRect: Trect; +begin + TempRect := GetCalendarRect; + + nIndex := -1; + {Is point in the calendar rectangle?} + if (nLeft > TempRect.Left) and (nTop > TempRect.Top) and + (nLeft < TempRect.Right) and (nTop < TempRect.Bottom) then + begin + {Determine the week number of the selected date } + nResult := (nTop - BORDER) / (m_FontHeight) - 1; + nWeek := Trunc(nResult); + + {Adjust Date Rect } + TempRect.Top := TempRect.Top + ((nWeek - 1) * m_FontHeight); + TempRect.Bottom := TempRect.Top + m_FontHeight; + TempRect.Left := BORDER + TEXT_INDENT; + TempRect.Right := TempRect.Left + m_FontWidth * 3; + + {Determine the day number of the selected date } + for nDay := 1 to 7 do {Cycle through the days} + begin + nIndex := nDay + ((nWeek - 1) * 7); + if (nLeft >= TempRect.Left) and (nLeft <= TempRect.Right) then + Break + else + begin + TempRect.Left := TempRect.Right; + TempRect.Right := TempRect.Left + m_FontWidth * 3; + end; + end; + end; + + Result := nIndex; +end; + +{******************** Get Previous Day ******************** + **********************************************************} +procedure TfrmCalPop97.PrevDay; +begin + SetDate(-1); +end; + +{********************* Get Next Day *********************** + **********************************************************} +procedure TfrmCalPop97.NextDay; +begin + SetDate(+1); +end; + +{******************** Get Previous Week ******************* + **********************************************************} +procedure TfrmCalPop97.PrevWeek; +begin + SetDate(-7); +end; + +{******************** Get Next Week *********************** + **********************************************************} +procedure TfrmCalPop97.NextWeek; +begin + SetDate(+7); +end; + +{******************** GetPreviousMonth ******************** + **********************************************************} +procedure TfrmCalPop97.PrevMonth; +var + nDays: Integer; + nMonth: Integer; +begin + if m_CurrentMonth > 1 then + nMonth := m_CurrentMonth - 1 + else + nMonth := 12; + + nDays := DaysInMonth(nMonth); + SetDate(-nDays); +end; + +{******************** Get Next Month ********************** + **********************************************************} +procedure TfrmCalPop97.NextMonth; +begin + SetDate(DaysInMonth(m_CurrentMonth)); +end; + +{******************** Get Next Year *********************** + **********************************************************} +procedure TfrmCalPop97.NextYear; +begin + {if the current year is a leap year and the date is + before February 29, add 1 day} + if IsLeapYear and (m_CurrentMonth < 3) then SetDate(+1); + + SetDate(365); + {if the current year is a leap year and the date is + after February 29, add 1 day} + if IsLeapYear and (m_CurrentMonth > 3) then SetDate(+1); +end; + +{******************* GetPrevious Year ********************* + **********************************************************} +procedure TfrmCalPop97.PrevYear; +begin + {if the current year is a leap year and the date is + after February 29, subtract 1 day} + if IsLeapYear and (m_CurrentMonth > 3) then SetDate(-1); + + SetDate(-365); + {if the Previous year is a leap year and the date is + before February 29, subtract 1 day} + if IsLeapYear and (m_CurrentMonth < 3) then SetDate(-1); +end; + +{***************** Set Date ************************** + **** This procedure adjusts the date by nDays **** + **** nDays can be possitive or negative. It **** + **** also populates the vars YEAR, MONTH and DAY **** + *****************************************************} +procedure TfrmCalPop97.SetDate(nDays: Integer); +begin + {Save current date information} + m_PreviousDateIndex := m_CurrentDateIndex; + m_PreviousDateHighlight := m_CurrentDateIndex; + DecodeDate(m_CurrentDateSelected, m_PreviousYear, m_PreviousMonth, m_PreviousDay); + + {Change the date and update member variables} + m_CurrentDateSelected := m_CurrentDateSelected + nDays; + DecodeDate(m_CurrentDateSelected, m_CurrentYear, m_CurrentMonth, m_CurrentDay); + m_CurrentDateIndex := (GetMonthBegin + m_CurrentDay) - 1; + + {Reload Date Array if month or year changed} + if (m_CurrentMonth <> m_PreviousMonth) or + (m_CurrentYear <> m_PreviousYear) then LoadDateArray; +end; + +end. diff --git a/lib/date/DATEED97.RC b/lib/date/DATEED97.RC new file mode 100644 index 00000000..efb6a9bb --- /dev/null +++ b/lib/date/DATEED97.RC @@ -0,0 +1,88 @@ +/**************************************************************************** + + +dateed97.rc + +produced by Borland Resource Workshop + + +*****************************************************************************/ + + +BTNCLEAR BITMAP LOADONCALL MOVEABLE DISCARDABLE IMPURE +{ + '42 4D 46 01 00 00 00 00 00 00 76 00 00 00 28 00' + '00 00 1A 00 00 00 0D 00 00 00 01 00 04 00 00 00' + '00 00 D0 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80' + '00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80' + '00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF' + '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' + '00 00 FF FF FF 00 AA AA AA AA AA AA AA AA AA AA' + 'AA AA AA 00 00 00 80 00 00 8A AA AA A8 00 00 08' + 'AA AA AA 00 00 00 07 F7 F7 00 AA AA A0 77 77 70' + '0A AA AA 00 00 00 0F 7F 7F 08 0A AA A0 77 77 70' + '80 AA AA 00 00 00 07 F7 F7 08 80 AA A0 77 77 70' + '88 0A AA 00 00 00 8F FF FF F0 88 0A A8 7F 7F 7F' + '08 80 AA 00 00 00 A0 FF FF FF 08 80 AA 07 F7 F7' + 'F0 88 0A 00 00 00 AA 0F FF FF F0 88 8A A0 7F 7F' + '7F 08 88 00 00 00 AA A0 FF FF FF 08 0A AA 07 F7' + 'F7 F0 80 00 00 00 AA AA 0F FF FF F8 0A AA A0 7F' + '7F 7F 80 00 00 00 AA AA A0 FF FF FF 0A AA AA 07' + 'F7 F7 70 00 00 00 AA AA AA 80 00 08 8A AA AA A8' + '00 00 88 00 00 00 AA AA AA AA AA AA AA AA AA AA' + 'AA AA AA 00 00 00' +} + + +BTNPOPUP BITMAP LOADONCALL MOVEABLE DISCARDABLE IMPURE +{ + '42 4D 46 01 00 00 00 00 00 00 76 00 00 00 28 00' + '00 00 1A 00 00 00 0D 00 00 00 01 00 04 00 00 00' + '00 00 D0 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80' + '00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80' + '00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF' + '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' + '00 00 FF FF FF 00 AA CA AA AA AA AA AA A4 FF AA' + 'AA AA AA 00 00 00 AC CC AA AA AA AA AA 44 4F FA' + 'AA AA AA 00 00 00 CC CC CA AA AA AA A4 44 44 FF' + 'FF FF FF 00 00 00 AC CC 00 00 00 00 AA 44 48 88' + '88 88 8A 00 00 00 AC CC FF FF FF FF 0A 44 4F AA' + 'AA AA A8 00 00 00 AC CC 99 F9 99 9F 0A 44 41 1A' + '11 11 A8 00 00 00 AC CC 9F FF 9F FF 0A 44 41 AA' + 'A1 AA A8 00 00 00 AC CC 9F FF F9 FF 0A 44 41 AA' + 'AA 1A A8 00 00 00 A0 FF 9F FF FF 9F 0A 8F A1 AA' + 'AA A1 A8 00 00 00 A0 F9 9F F9 FF 9F 0A 8F 11 AA' + '1A A1 A8 00 00 00 A0 FF 9F FF 99 FF 0A 8F A1 AA' + 'A1 1A A8 00 00 00 A0 FF FF FF FF FF 0A 8F FF FF' + 'FF FF F8 00 00 00 A0 00 00 00 00 00 0A 88 88 88' + '88 88 88 00 00 00' +} + + +BTNVALIDATE BITMAP +{ + '42 4D 46 01 00 00 00 00 00 00 76 00 00 00 28 00' + '00 00 1A 00 00 00 0D 00 00 00 01 00 04 00 00 00' + '00 00 D0 00 00 00 00 00 00 00 00 00 00 00 00 00' + '00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 80' + '00 00 00 80 80 00 80 00 00 00 80 00 80 00 80 80' + '00 00 C0 C0 C0 00 80 80 80 00 00 00 FF 00 00 FF' + '00 00 00 FF FF 00 FF 00 00 00 FF 00 FF 00 FF FF' + '00 00 FF FF FF 00 AA AA 00 00 AA AA AA AA A0 00' + '0A AA AA 00 00 00 AA 00 88 88 00 AA AA A0 08 88' + '80 0A AA 00 00 00 A0 88 77 77 88 0A AA 08 8A AA' + 'A8 80 AA 00 00 00 A8 77 77 77 77 80 AA 8A AA AA' + 'AA A8 0A 00 00 00 AF 77 27 77 77 80 AA FA A8 AA' + 'AA A8 0A 00 00 00 F7 72 22 77 77 78 0F AA 88 8A' + 'AA AA 80 00 00 00 F7 22 72 27 77 78 0F A8 8A 88' + 'AA AA 80 00 00 00 F2 27 77 22 77 78 0F 88 AA A8' + '8A AA 80 00 00 00 F7 77 77 72 27 78 0F AA AA AA' + '88 AA 80 00 00 00 AF 77 77 77 22 80 AA FA AA AA' + 'A8 88 0A 00 00 00 AF 77 77 77 77 80 AA FA AA AA' + 'AA A8 0A 00 00 00 AA FF 77 77 F8 0A AA AF FA AA' + 'AF 80 AA 00 00 00 AA AA FF FF AA AA AA AA AF FF' + 'FA AA AA 00 00 00' +} + diff --git a/lib/date/DEd97_b.res b/lib/date/DEd97_b.res new file mode 100644 index 00000000..3c289f8c Binary files /dev/null and b/lib/date/DEd97_b.res differ diff --git a/lib/date/DateDB97.dcu b/lib/date/DateDB97.dcu new file mode 100644 index 00000000..91b169c2 Binary files /dev/null and b/lib/date/DateDB97.dcu differ diff --git a/lib/date/DateDB97.pas b/lib/date/DateDB97.pas new file mode 100644 index 00000000..73667bd7 --- /dev/null +++ b/lib/date/DateDB97.pas @@ -0,0 +1,322 @@ +unit DateDb97; + +(****************************************************************************** +TDbDateEdit97 + +Derived from + tDateEdit97 + +Properties + DataSource, DataField : Database informations + ReadOnly : Can modify field + +Author name=BOURMAD Mehdi +Author E-mail=bourmad@mygale.org +Author URL=www.mygale.org/~bourmad +******************************************************************************) + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Dialogs, Forms, StdCtrls, Buttons, Db, DbCtrls, DbTables, DateEd97; + +type + TDbDateEdit97 = class(TDateEdit97) + private + FDataLink: TFieldDataLink; + FCanvas: TControlCanvas; + FAlignment: TAlignment; + FFocused: Boolean; + procedure DataChange(Sender: TObject); + procedure EditingChange(Sender: TObject); + function GetDataField: string; + function GetDataSource: TDataSource; + function GetField: TField; + function GetReadOnly: Boolean; + procedure SetDataField(const Value: string); + procedure SetDataSource(Value: TDataSource); + procedure SetFocused(Value: Boolean); + procedure SetReadOnly(Value: Boolean); + procedure UpdateData(Sender: TObject); + procedure WMCut(var message: TMessage); message WM_CUT; + procedure WMPaste(var message: TMessage); message WM_PASTE; + procedure CMEnter(var Message: TCMEnter); message CM_ENTER; + procedure CMExit(var Message: TCMExit); message CM_EXIT; + protected + function GetDate: TDateTime; + procedure SetDate(dtArg: TDateTime); + procedure Change; override; + procedure KeyPress(var Key: char); override; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure Click; override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + property Field: TField read GetField; + property Date: TDateTime read GetDate write SetDate; + published + property DataField: string read GetDataField write SetDataField; + property DataSource: TDataSource read GetDataSource write SetDataSource; + property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False; + end; + +implementation + +{-------------------------------------------------------------} +{-------------------- TDbDateEdit97 --------------------------} +{-------------------------------------------------------------} +constructor TDbDateEdit97.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + inherited ReadOnly := True; + FDataLink := TFieldDataLink.Create; + FDataLink.Control := Self; + FDataLink.OnDataChange := DataChange; + FDataLink.OnEditingChange := EditingChange; + FDataLink.OnUpdateData := UpdateData; +end; + +destructor TDbDateEdit97.Destroy; +begin + FDataLink.Free; + FDataLink := nil; + FCanvas.Free; + inherited Destroy; +end; + +procedure TDbDateEdit97.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if (Operation = opRemove) and (FDataLink <> nil) and + (AComponent = DataSource) then DataSource := nil; +end; + +function TDbDateEdit97.GetDate: TDateTime; +begin + GetDate := inherited Date; +end; + +procedure TDbDateEdit97.SetDate(dtArg: TDateTime); +begin + inherited SetDate(dtArg); + if FDataLink.Field.AsDateTime <> dtArg then + begin + FDataLink.Field.AsDateTime := dtArg; + FDataLink.Modified; + end; +end; + +procedure TDbDateEdit97.Click; +begin + FDataLink.Edit; + inherited Click; +end; + +procedure TDbDateEdit97.KeyPress(var Key: char); +begin + if (FDataLink.Field <> nil) and not FDataLink.Field.IsValidChar(Key) + then begin + MessageBeep(0); + Key := #0; + end; + + case Key of + ^H, ^V, ^X, '0'..'9': begin + FDataLink.Edit; + end; + + #27: begin + inherited SetDateValid(True); + FDataLink.Reset; + SelectAll; + Key := #0; + end; + end; + + inherited KeyPress(Key); +end; + +procedure TDbDateEdit97.KeyDown(var Key: Word; Shift: TShiftState); +begin + if FDataLink.Editing + then inherited KeyDown(Key, Shift) + else + begin + if (Key <> ShortCutClear) and + (Key <> ShortCutPopup) and + (Key <> ShortCutValidate) + then inherited KeyDown(Key, Shift); + end; + + if (Key = VK_DELETE) or ((Key = VK_INSERT) and (ssShift in Shift)) + then FDataLink.Edit; +end; + +procedure TDbDateEdit97.SetFocused(Value: Boolean); +begin + if FFocused <> Value then + begin + FFocused := Value; + if (FAlignment <> taLeftJustify) + then Invalidate; +{ FDataLink.Reset; {comment, because raise problem when clear a date} + end; +end; + +procedure TDbDateEdit97.Change; +begin + FDataLink.Modified; + inherited Change; +end; + +procedure TDbDateEdit97.DataChange(Sender: TObject); +begin + if Assigned(FBtnClear) + then FBtnClear.Enabled := FDataLink.Active; + if (Assigned(FBtnPopup)) and CanPopup + then FBtnPopup.Enabled := FDataLink.Active; + if Assigned(FBtnValidate) + then FBtnValidate.Enabled := FDataLink.Active; + + if FDataLink.Field <> nil then + begin + if FAlignment <> FDataLink.Field.Alignment then + begin + Text := ''; {forces update} + FAlignment := FDataLink.Field.Alignment; + end; + + if FDataLink.Field.AsDateTime = 0 + then Text := '' + else begin + inherited Date := FDataLink.Field.AsDateTime; + end; + end + else begin + FAlignment := taLeftJustify; + MaxLength := 0; + if csDesigning in ComponentState + then Text := Name + else Text := ''; + end; + + + if FDataLink.Editing + then begin + {Transform date to number before edit necessary if + the cursor is already on the edit box} + if Focused + then AdjustEdit; +(* end + else begin + {Transform number in date for display purpose necessary if + the cursor is already on the edit box} + if Focused + then begin + Text := DateToStr(Date); + SetDateValid(True); + AdjustEdit; + end;*) + end; +end; + +procedure TDbDateEdit97.EditingChange(Sender: TObject); +begin + inherited ReadOnly := not FDataLink.Editing; +end; + +procedure TDbDateEdit97.UpdateData(Sender: TObject); +begin + if Length(Text) > 0 + then AdjustDate + else begin + inherited Date := 0; {User now Can delete the date!} + Modified := False; + FDatalink.Field.AsString := ''; + end; + + + if (Date <> 0) or (Length(Text) > 0) + then + try + SetDate(StrToDate(Text)); + SetDateValid(True); + except + Text := DateToStr(Date); + AdjustEdit; + SetDateValid(False); + SelectAll; + SetFocus; + raise; + end; +end; + +procedure TDbDateEdit97.WMPaste(var message: TMessage); +begin + FDataLink.Edit; + inherited; +end; + +procedure TDbDateEdit97.WMCut(var message: TMessage); +begin + FDataLink.Edit; + inherited; +end; + +procedure TDbDateEdit97.CMEnter(var Message: TCMEnter); +begin + SetFocused(True); + FDataLink.Edit; + inherited; +end; + +procedure TDbDateEdit97.CMExit(var Message: TCMExit); +begin + FDataLink.UpdateRecord; + + inherited; + + SetFocused(False); + SetCursor(0); +end; + +function TDbDateEdit97.GetDataSource: TDataSource; +begin + Result := FDataLink.DataSource; +end; + +procedure TDbDateEdit97.SetDataSource(Value: TDataSource); +begin + FDataLink.DataSource := Value; +end; + +function TDbDateEdit97.GetDataField: string; +begin + Result := FDataLink.FieldName; +end; + +procedure TDbDateEdit97.SetDataField(const Value: string); +begin + FDataLink.FieldName := Value; +end; + +function TDbDateEdit97.GetReadOnly: Boolean; +begin + Result := FDataLink.ReadOnly; +end; + +procedure TDbDateEdit97.SetReadOnly(Value: Boolean); +begin + FDataLink.ReadOnly := Value; +end; + +function TDbDateEdit97.GetField: TField; +begin + Result := FDataLink.Field; +end; + + +end. + diff --git a/lib/date/DateEd97.dcu b/lib/date/DateEd97.dcu new file mode 100644 index 00000000..eabb4de2 Binary files /dev/null and b/lib/date/DateEd97.dcu differ diff --git a/lib/date/DateEd97.pas b/lib/date/DateEd97.pas new file mode 100644 index 00000000..e3633cf6 --- /dev/null +++ b/lib/date/DateEd97.pas @@ -0,0 +1,977 @@ +unit DateEd97; + +(****************************************************************************** +TDateEdit97 version 3.5 + +Derived from + tCustomEdit + +Properties + BorderStyle, + Font, + TabOrder, + TabStop : inherited from tCustomEdit + ButtonDateStyle : style of popup button (drop down or calendar) + ButtonStyle : select button style (new, win31, autodetect) + ButtonTabStop : choose if buttons are TabStop + CanClear : show (or hide) clear button + CanPopup : enable (or disable) popup calendar button + CanValidate : Show (or hide) validate button + ColorArrow : Color for arrow buttons of calendar + ColorDates : Color for dates of calendar + ColorWeekEnd : Color for week-end dates of calendar + ColorError : Color when date isn't correct + ColorTitle : Color for title of calendar + ColorValidDate : Color for valid dates of calendar + Date : Selected date as DateTime + DayNames : Names of each days + EmptyAsToday : If true (and canclear is false), empty date is "today" + FocusOnError : If date is invalid, keep focus or not + IsMasked : choose if you want to use mask-edit for input + IsModal : choose if you want a modal popup calendar (or not) + MonthNames : Names of each monthes + PopupToday : If true, popup calendar always start with today's date + ShortCutAddAlt : Use Alt key for Shortcuts + ShortCutAddCtrl : Use Ctrl key for Shortcuts + ShortCutClear : Shortcut key for Clear button + ShortCutPopup : Shortcut key for Popup button + ShortCutValidate: Shortcut key for Validate button + StartOfWeek : First day of week + Text : Selected date as String + +procedures + AddValidDate: Add a ValidDate + DateInList: Check if a date is in ValidDates list + ClearValidDates: Clear ValidDates list + ClearDate: Clear date + PopupCalendar: Popup the calendar + SetDateValid : Set if entered date is valid or not (change drawed color) + AfterClick : function calling OnAfterClick event; + ValidateDate : Function calling OnValidateClick event. + +events + OnChange, + OnEnter, + OnExit : inherited from tCustomEdit + OnAfterClick : When a user click for select a date. + OnValidateClick : Used for validate an entered date. + + +Author name=BOURMAD Mehdi +Author E-mail=bourmad@mygale.org +Author URL=www.mygale.org/~bourmad +******************************************************************************) + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Dialogs, Forms, StdCtrls, Buttons, DsgnIntf, CalPop97; + +{******************** Misc. types *************************} +type + PTDateTime = ^TDateTime; + TDay = string[2]; + PDayArray=^TDayArray; + TDayArray = array[1..7] of TDay; + TDayOfWeek = 1..7; + TDayName = class(TPersistent) + private + FMonday: TDay; + FTuesday: TDay; + FWednesday: TDay; + FThursday: TDay; + FFriday: TDay; + FSaturday: TDay; + FSunday: TDay; + protected + public + constructor Create; + destructor Destroy; override; + published + property Monday: TDay read FMonday write FMonday; + property Tuesday: TDay read FTuesday write FTuesday; + property Wednesday: TDay read FWednesday write FWednesday; + property Thursday: TDay read FThursday write FThursday; + property Friday: TDay read FFriday write FFriday; + property Saturday: TDay read FSaturday write FSaturday; + property Sunday: TDay read FSunday write FSunday; + end; + + TMonth = string[15]; + PMonthArray = ^TMonthArray; + TMonthArray = array[1..12] of TMonth; + TMonthName = class(TPersistent) + private + FJanuary: TMonth; + FFebruary: TMonth; + FMarch: TMonth; + FApril: TMonth; + FMay: TMonth; + FJune: TMonth; + FJuly: TMonth; + FAugust: TMonth; + FSeptember: TMonth; + FOctober: TMonth; + FNovember: TMonth; + FDecember: TMonth; + protected + public + constructor Create; + destructor Destroy; override; + published + property January: TMonth read FJanuary write FJanuary; + property February: TMonth read FFebruary write FFebruary; + property March: TMonth read FMarch write FMarch; + property April: TMonth read FApril write FApril; + property May: TMonth read FMay write FMay; + property June: TMonth read FJune write FJune; + property July: TMonth read FJuly write FJuly; + property August: TMonth read FAugust write FAugust; + property September: TMonth read FSeptember write FSeptember; + property October: TMonth read FOctober write FOctober; + property November: TMonth read FNovember write FNovember; + property December: TMonth read FDecember write FDecember; + end; + + TDateBtnStyle = (btsDropDown, btsCalendar); + + {*********** tAboutMeProperty ************} + TAboutMeProperty = class(TPropertyEditor) + public + procedure Edit; override; + function GetAttributes: TPropertyAttributes; override; + function GetValue: string; override; + end; + +{******************** DateEdit97 Component *************************} + TDateEdit97 = class(TCustomEdit) + private + FAbout : TAboutMeProperty; + FEmptyAsToday : boolean; + FIsMasked, + FIsModal : boolean; + FCanPopup, + FCanClear, + FCanValidate : boolean; + FBtnDateStyle : tDateBtnStyle; + FBtnStyle : tButtonStyle; + FBtnTabStop : boolean; + FFocusOnError : boolean; + FColorArrow, + FColorDates, + FColorWeekEnd, + FColorError, + FColorTitle, + FColorVal : TColor; + FDate : TDateTime; + FDateValid : boolean; + FDayName : TDayName; + FMonthName : TMonthName; + FPopupToday : boolean; + FStartOfWeek : TDayOfWeek; + FDayArray : TDayArray; + FMonthArray : TMonthArray; + lstDates : TList; + frmCalendar : TfrmCalPop97; + FOnAfterClick, + FOnValidated: TNotifyEvent; + FShortCutClear: Word; + FShortCutPopup: Word; + FShortCutValidate: Word; + FShortCutAlt: Boolean; + FShortCutCtrl: Boolean; + procedure SetStartOfWeek(Value: TDayOfWeek); + protected + FBtnPopup, + FBtnValidate, + FBtnClear : tBitBtn; + NewShortDateFormat : string; + procedure SetAltOn(value : boolean); + procedure SetCtrlOn(value : boolean); + function RemoveChr (aChar : Char; aStr : String) : String; + function PadTo4Year (aStr : String) : String; + procedure AdjustEdit; + procedure AdjustDate; + procedure SetCanClear (value : boolean); + procedure SetCanPopup (value : boolean); + procedure SetCanValidate (value : boolean); + procedure SetDate(dtArg: TDateTime); + function GetDayArray: PDayArray; + function GetMonthArray: PMonthArray; + procedure SetBtnDateStyle (value : tDateBtnStyle); + procedure SetBtnStyle (value : tButtonStyle); + procedure SetBtnTabStop (value : boolean); + procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; + procedure WMSize(var message: TWMSize); message WM_SIZE; + procedure KeyPress(var Key: char); override; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure DoEnter; override; + procedure DoExit; override; + public + procedure Loaded; override; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure CreateParams(var Params: TCreateParams); override; + function DateInList(dt: TDateTime): Boolean; + procedure AddValidDate(dt: TDateTime); + procedure ClearValidDates; + procedure ClearDate(Sender: TObject); + procedure PopupCalendar(Sender: TObject); + procedure SetDateValid(pValue : boolean); + procedure AfterClick(Sender: TObject); + procedure ValidateDate(Sender: TObject); + property Date: TDateTime read FDate write SetDate; + property DateValid : boolean read FDateValid; + property DayArray: PDayArray read GetDayArray; + property MonthArray: PMonthArray read GetMonthArray; + procedure DoDate; + procedure DoEdit; + published + property BorderStyle; + property Font; + property TabOrder; + property TabStop; + property About : TAboutMeProperty read FAbout write FAbout; + property ButtonDateStyle : tDateBtnStyle read FBtnDateStyle write SetBtnDateStyle default btsCalendar; + property ButtonStyle : tButtonstyle read FBtnStyle write SetBtnStyle default bsAutodetect; + property ButtonTabStop : boolean read FBtnTabStop write SetBtnTabStop default true; + property CanClear : boolean read FCanClear write SetCanClear default true; + property CanPopup : boolean read FCanPopup write SetCanPopup default true; + property CanValidate : boolean read FCanValidate write SetCanValidate default false; + property ColorArrow : tColor read FColorArrow write FColorArrow default clBlack; + property ColorDates : tColor read FColorDates write FColorDates default clBlack; + property ColorWeekEnd : tColor read FColorWeekEnd write FColorWeekEnd default clRed; + property ColorError : tColor read FColorError write FColorError default clRed; + property ColorTitle : tColor read FColorTitle write FColorTitle default clNavy; + property ColorValidDate : TColor read FColorVal write FColorVal default clMaroon; + property DayNames : TDayName read FDayName write FDayName; + property EmptyAsToday : boolean read FEmptyAsToday write FEmptyAsToday default false; + property FocusOnError : boolean read FFocusOnError write FFocusOnError default false; + property IsMasked : boolean read FIsMasked write FIsMasked default true; + property IsModal : boolean read FIsModal write FIsModal default false; + property MonthNames : TMonthName read FMonthName write FMonthName; + property PopupToday : boolean read FPopupToday write FPopupToday default false; + property ShortCutAddAlt: Boolean read FShortCutAlt write SetAltOn default False; + property ShortCutAddCtrl: Boolean read FShortCutCtrl write SetCtrlOn default False; + property ShortCutClear: Word read FShortCutClear write FShortCutClear default 0; + property ShortCutPopup: Word read FShortCutPopup write FShortCutPopup default 0; + property ShortCutValidate: Word read FShortCutValidate write FShortCutValidate default 0; + property StartOfWeek : TDayOfWeek read FStartOfWeek write SetStartOfWeek default 1; + property OnChange; + property OnEnter; + property OnExit; + property OnAfterClick : TNotifyEvent read FOnAfterClick write FOnAfterClick; + property OnValidateClick: TNotifyEvent read FOnValidated write FOnValidated; + end; + +{$IFDEF VER90} + const + OBM_COMBO = 32738; +{$ENDIF} +{$IFDEF VER93} + const + OBM_COMBO = 32738; +{$ENDIF} + +const +{ ErrDateTooShort = 'Date too short';} + ErrDateTooShort = 'Date trop courte'; + +implementation + +{$R *.RES} + +{-------------------------------------------------------------} +{---------------------- TDayName -----------------------------} +{-------------------------------------------------------------} +constructor TDayName.Create; +begin + inherited Create; + FSunday := ShortDayNames[1]; + FMonday := ShortDayNames[2]; + FTuesday := ShortDayNames[3]; + FWednesday := ShortDayNames[4]; + FThursday := ShortDayNames[5]; + FFriday := ShortDayNames[6]; + FSaturday := ShortDayNames[7]; +end; + +destructor TDayName.Destroy; +begin + inherited Destroy; +end; + +{-------------------------------------------------------------} +{---------------------- TMonthName ---------------------------} +{-------------------------------------------------------------} +constructor TMonthName.Create; +begin + inherited Create; + FJanuary := LongMonthNames[1]; + FFebruary := LongMonthNames[2]; + FMarch := LongMonthNames[3]; + FApril := LongMonthNames[4]; + FMay := LongMonthNames[5]; + FJune := LongMonthNames[6]; + FJuly := LongMonthNames[7]; + FAugust := LongMonthNames[8]; + FSeptember := LongMonthNames[9]; + FOctober := LongMonthNames[10]; + FNovember := LongMonthNames[11]; + FDecember := LongMonthNames[12]; +end; + +destructor TMonthName.Destroy; +begin + inherited Destroy; +end; + +{************************* tAboutMeProperty component *************************} +procedure TAboutMeProperty.Edit; +begin + Application.MessageBox ('tDatePack97 components v3.5.' + +#13#10'These components are freeware.' + +#13#10' 1997 BOURMAD Mehdi' + +#13#10'http://www.mygale.org/~bourmad' + +#13#10'mailto:bourmad@mygale.org', + 'About', + MB_OK+ MB_ICONINFORMATION); +end; + +function TAboutMeProperty.GetAttributes: TPropertyAttributes; +begin + Result := [paMultiSelect, paDialog, paReadOnly]; +end; + +function TAboutMeProperty.GetValue: string; +begin + Result := '(about)'; +end; + +{-------------------------------------------------------------} +{---------------------- TDateEdit97 --------------------------} +{-------------------------------------------------------------} +constructor TDateEdit97.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + FEmptyAsToday := false; + FBtnDateStyle := btsCalendar; + FBtnStyle := bsAutodetect; + FBtnTabStop := true; + FCanClear := true; + FCanPopup := true; + FCanValidate := false; + FColorArrow := clBlack; + FColorDates := clBlack; + FColorWeekEnd := clRed; + FColorError := clRed; + FColorTitle := clNavy; + FColorVal := clBlue; + FFocusOnError := false; + FIsMasked := true; + FIsModal := false; + FPopupToday := false; + FStartOfWeek := 1; + + NewShortDateFormat := PadTo4Year (RemoveChr (DateSeparator, ShortDateFormat)); + + FDate := 0; + SetDateValid(True); + + FDayName := TDayName.Create; + FMonthName := TMonthName.Create; + + if FCanClear + then begin + FBtnClear := tBitBtn.Create (Self); + FBtnClear.Visible := True; + FBtnClear.Parent := Self; + FBtnClear.Glyph.Handle := LoadBitmap(hInstance, 'BTNCLEAR'); + FBtnClear.NumGlyphs := 2; + FBtnClear.OnClick := ClearDate; + FBtnClear.TabStop := FBtnTabStop; + end; + + if FCanValidate + then begin + FBtnValidate := tBitBtn.Create (Self); + FBtnValidate.Visible := True; + FBtnValidate.Parent := Self; + FBtnValidate.Glyph.Handle := LoadBitmap(hInstance, 'BTNVALIDATE'); + FBtnValidate.NumGlyphs := 2; + FBtnValidate.OnClick := ValidateDate; + FBtnValidate.TabStop := FBtnTabStop; + end; + + FBtnPopup := tBitBtn.Create (Self); + FBtnPopup.Visible := True; + FBtnPopup.Parent := Self; + FBtnPopup.Glyph.Handle := LoadBitmap(hInstance, 'BTNPOPUP'); + FBtnPopup.NumGlyphs := 2; + FBtnPopup.OnClick := PopupCalendar; + FBtnPopup.TabStop := FBtnTabStop; + + ControlStyle := ControlStyle - [csSetCaption]; + lstDates := TList.Create; +end; + +{ create the Calendar } +procedure TDateEdit97.Loaded; +begin + frmCalendar := TfrmCalPop97.Create(self); + frmCalendar.Visible := False; +end; + +procedure TDateEdit97.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.Style := Params.Style or WS_CLIPCHILDREN; +end; + +destructor TDateEdit97.Destroy; +begin + if Assigned(fBtnClear) + then begin + FBtnClear.Free; + FBtnClear := nil; + end; + if Assigned(fBtnValidate) + then begin + FBtnValidate.Free; + FBtnValidate := nil; + end; + if Assigned(fBtnPopup) + then begin + FBtnPopup.Free; + FBtnPopup := nil; + end; + FDayName.Free; + FMonthName.Free; + ClearValidDates; + lstDates.Free; + frmCalendar.Free; + + inherited Destroy; +end; + +(********************************************* +Show (or hide) Popup Calendar when click +*********************************************) +procedure TDateEdit97.PopupCalendar (Sender: TObject); +begin + Click; + if not frmCalendar.Visible + then begin + AfterClick(Sender); +{ DoExit; {a tester} + if FIsModal + then begin + frmCalendar.ShowModal; + ValidateDate(Sender); + SetFocus; + end + else begin + frmCalendar.Show; + SendMessage(Handle,WM_KILLFOCUS,0,0); + end; + end + else begin + frmCalendar.Hide; + ValidateDate(Sender); + SetFocus; + end; +end; + +(********************************************* +Clear the Date field +*********************************************) +procedure TDateEdit97.ClearDate(Sender: TObject); +begin + Click; + FDate := 0; + ValidateDate(Sender); + SetDateValid(True); + Text := ''; + SetFocus; +end; + +procedure TDateEdit97.ValidateDate(Sender: TObject); +begin + if Assigned(FOnValidated) + then FOnValidated(Sender); +end; + +procedure TDateEdit97.AfterClick(Sender: TObject); +begin + if Assigned(FOnAfterClick) + then FOnAfterClick(Self); +end; + +procedure TDateEdit97.CMEnabledChanged(var Message: TMessage); +begin + if Assigned (FBtnClear) + then FBtnClear.Enabled := Enabled; + if Assigned (FBtnPopup) + then FBtnPopup.Enabled := Enabled; + if Assigned (FBtnValidate) + then FBtnValidate.Enabled := Enabled; + inherited; +end; + +procedure TDateEdit97.WMSize(var message: TWMSize); +var + aLeft : integer; +begin + aLeft := ClientWidth - ClientHeight - 2 ; + if Assigned(FBtnValidate) + then begin + FBtnValidate.Height := ClientHeight; + FBtnValidate.Width := ClientHeight + 2; + FBtnValidate.Left := aLeft; + FBtnValidate.Refresh; + aLeft := aLeft-FBtnValidate.Width; + end; + if Assigned(FBtnPopup) + then begin + FBtnPopup.Height := ClientHeight; + FBtnPopup.Width := ClientHeight + 2; + FBtnPopup.Left := aLeft; + FBtnPopup.Refresh; + aLeft := aLeft-FBtnPopup.Width; + end; + if Assigned(fBtnClear) + then begin + FBtnClear.Height := ClientHeight; + FBtnClear.Width := ClientHeight + 2; + FBtnClear.Left := aLeft; + FBtnClear.Refresh; + end; +end; + +procedure TDateEdit97.SetDate(dtArg: TDateTime); +var + FullYear : boolean; + jj, mm, aa : word; +begin + FDate := dtArg; + SetDateValid(True); + Modified := True; + if FDate = 0 then + Text := '' + else begin + DecodeDate (FDate, aa, mm, jj); + if aa>1999 + then FullYear := true + else FullYear := false; + + if (FullYear and (Length(ShortDateFormat) <= 8)) + then Text := FormatDateTime(PadTo4Year (ShortDateFormat), FDate) + else Text := FormatDateTime(ShortDateFormat, FDate); + end; +end; + +procedure TDateEdit97.SetDateValid (pValue : boolean); +begin + FDateValid := pValue; + if FDateValid then + Font.Color := clWindowText + else + Font.Color := FColorError; +end; + +function TDateEdit97.GetDayArray: PDayArray; +begin + FDayArray[1] := DayNames.FMonday; + FDayArray[2] := DayNames.FTuesday; + FDayArray[3] := DayNames.FWednesday; + FDayArray[4] := DayNames.FThursday; + FDayArray[5] := DayNames.FFriday; + FDayArray[6] := DayNames.FSaturday; + FDayArray[7] := DayNames.FSunday; + Result := @FDayArray; +end; + +function TDateEdit97.GetMonthArray: PMonthArray; +begin + FMonthArray[01] := MonthNames.FJanuary; + FMonthArray[02] := MonthNames.FFebruary; + FMonthArray[03] := MonthNames.FMarch; + FMonthArray[04] := MonthNames.FApril; + FMonthArray[05] := MonthNames.FMay; + FMonthArray[06] := MonthNames.FJune; + FMonthArray[07] := MonthNames.FJuly; + FMonthArray[08] := MonthNames.FAugust; + FMonthArray[09] := MonthNames.FSeptember; + FMonthArray[10] := MonthNames.FOctober; + FMonthArray[11] := MonthNames.FNovember; + FMonthArray[12] := MonthNames.FDecember; + Result := @FMonthArray; +end; + +procedure TDateEdit97.SetBtnStyle (value : tButtonStyle); +begin + FBtnStyle := value; + if Assigned (FBtnClear) + then FBtnClear.Style := FBtnStyle; + if Assigned (FBtnPopup) + then FBtnPopup.Style := FBtnStyle; + if Assigned (FBtnValidate) + then FBtnValidate.Style := FBtnStyle; +end; + +procedure TDateEdit97.SetBtnTabStop (value : boolean); +begin + FBtnTabStop := value; + if Assigned (FBtnClear) + then FBtnClear.TabStop := FBtnTabStop; + if Assigned (FBtnPopup) + then FBtnPopup.TabStop := FBtnTabStop; + if Assigned (FBtnValidate) + then FBtnValidate.TabStop := FBtnTabStop; +end; + +procedure TDateEdit97.SetBtnDateStyle (value : tDateBtnStyle); +begin + if value<>FBtnDateStyle + then begin + FBtnDateStyle := value; + Case value of + btsDropDown : begin + FBtnPopup.Glyph.Handle := LoadBitmap(0, pChar(OBM_COMBO)); + FBtnPopup.NumGlyphs := 1; + end; + btsCalendar : begin + FBtnPopup.Glyph.Handle := LoadBitmap(hInstance, 'BTNPOPUP'); + FBtnPopup.NumGlyphs := 2; + end; + end; + end; +end; + + +procedure TDateEdit97.DoEnter; +begin + AdjustEdit; + { Act like standard edit controls } + SelectAll; + inherited DoEnter; +end; + +procedure TDateEdit97.DoExit; +var PrevText: String; +begin + PrevText := Text; + DoDate; + inherited DoExit; +end; + + +(********************************************* +Like DoEnter without Selectall +*********************************************) +procedure TDateEdit97.DoEdit; +begin + AdjustEdit; + inherited DoEnter; +end; + + +(********************************************* +Transform number in date and assign values +*********************************************) +procedure TDateEdit97.DoDate; +begin + if Pos(DateSeparator, Text) = 0 + then begin + if (Length(Text) = 0) + then begin + if FEmptyAsToday + then FDate := Date + else FDate := 0; + SetDateValid(True); + end + else begin + try + if (Length(Text) < 6) then + raise EConvertError.Create(ErrDateTooShort); + + AdjustDate; + + FDate := StrToDate(Text); + SetDateValid(True); + + except + if FFocusOnError + then SetFocus; + + SetDateValid(False); + end; + end; + end; +end; + +(********************************************* +Set ALT or CTRL or none +*********************************************) +procedure TDateEdit97.SetAltOn(value : boolean); +begin + FShortCutAlt := value; + + if value + then FShortCutCtrl := (not value); +end; + + +(********************************************* +Set ALT or CTRL or none +*********************************************) +procedure TDateEdit97.SetCtrlOn(value : boolean); +begin + FShortCutCtrl := value; + + if value + then FShortCutAlt := (not value); +end; + + +(********************************************* +Remove a character from a string +*********************************************) +function TDateEdit97.RemoveChr (aChar : Char; aStr : String) : String; +var + i : Integer; +begin + Result := aStr; + i := Pos(aChar, Result); + while i<>0 do + begin + Result := Copy (Result, 1, i-1) + Copy (Result, i+1, Length(Result)-i+1); + i := Pos(aChar, Result); + end; +end; + +(********************************************* +Update local ShortDateFormat with 4digits years +*********************************************) +Function TDateEdit97.PadTo4Year (aStr : String) : String; +var + Count, + i : integer; + AddStr : String[3]; +begin + Count := 0; + for i:=1 to Length(aStr) do + if aStr[i] in ['y', 'Y'] + then inc(Count); + AddStr := ''; + for i:=Count+1 to 4 do + AddStr := AddStr + 'y'; + i := pos ('Y', UpperCase(aStr)); + Result := Copy (aStr, 1, i-1)+AddStr+Copy (aStr, i+1, Length(aStr)-i+1); +end; + +(********************************************* +Transform date in number +*********************************************) +procedure TDateEdit97.AdjustEdit; +begin + if IsMasked + then Text := FormatDateTime (NewShortDateFormat, FDate); +end; + +(********************************************* +Transform number in date +*********************************************) +procedure TDateEdit97.AdjustDate; +Var + su, sv, sw, + u, v, w: string; + lu, lv, lw, + i, j: integer; +begin + if IsMasked + then if Pos(DateSeparator, Text) = 0 + then begin + i := Pos(DateSeparator, ShortDateFormat); + j := Pos(DateSeparator, Copy(ShortDateFormat, i + 1, Length(ShortDateFormat)-i)) + i; + {extract day, month and year from ShortDateFormat} + su := Copy(ShortDateFormat, 1, i - 1); + sv := Copy(ShortDateFormat, i + 1, j - i - 1); + sw := Copy(ShortDateFormat, j + 1, 4); + + {Because we don't know where is year in DateFormat, we need to check it} + {in all 3 values} + if (su[1] in ['y', 'Y']) + then lu := 4 + else lu := 2; + if (sv[1] in ['y', 'Y']) + then lv := 4 + else lv := 2; + if (sw[1] in ['y', 'Y']) + then lw := 4 + else lw := 2; + + u := Copy(Text, 1, lu); + v := Copy(Text, lu + 1, lv); + w := Copy(Text, lu + lv + 1, lw); + + Text := u + DateSeparator + v + DateSeparator + w; + end; +end; + +(********************************************* +Is the supplied data in the date list? +*********************************************) +function TDateEdit97.DateInList(dt: TDateTime): Boolean; +var + pDate: PTDateTime; + I: Integer; +begin + Result := False; + for I := 0 to lstDates.Count - 1 do + begin + pDate := lstDates[I]; + if pDate^ = dt then + begin + Result := True; + Break; + end; + end; +end; + +(********************************************* +Maintain list of valid dates. +*********************************************) +procedure TDateEdit97.AddValidDate(dt: TDateTime); +var + pDate: PTDateTime; +begin + New(pDate); + pDate^ := dt; + lstDates.Add(PDate); +end; + +procedure TDateEdit97.ClearValidDates; +var + pDate: PTDateTime; +begin + if not Assigned (lstDates) + then Exit; + while lstDates.Count > 0 do + begin + pDate := lstDates[0]; + Dispose(pDate); + lstDates.Delete(0); + end; +end; + +procedure TDateEdit97.KeyPress(var Key: Char); +begin + if not (Key in ['0'..'9', #8, #27, #13]) + then Key := #0; + + inherited KeyPress(Key); +end; + +(********************************************* +handling procedure (SHORTCUTKEYS) +*********************************************) +procedure TDateEdit97.KeyDown(var Key: Word; Shift: TShiftState); +var AltPressed, CtrlPressed: Boolean; + NotShift: Boolean; +begin + + AltPressed := (FShortCutAlt) and (ssAlt in Shift); + CtrlPressed := (FShortCutCtrl) and (ssCtrl in Shift); + NotShift := (not FShortCutAlt) and (not FShortCutCtrl); + + if Enabled + then begin + if (AltPressed or CtrlPressed) or NotShift + then begin + if (Key = FShortCutClear) and (Assigned(fBtnClear)) + then FBtnClear.Click + else + if (Key = FShortCutPopup) and (Assigned(fBtnPopup)) + then FBtnPopup.Click + else + if (Key = FShortCutValidate) and (Assigned(fBtnValidate)) + then FBtnValidate.Click; + end; + end; + inherited KeyDown(Key, Shift); +end; + +procedure TDateEdit97.SetStartOfWeek(Value: TDayOfWeek); +begin + if FStartOfWeek <> Value then FStartOfWeek := Value; +end; + +(********************************************* +Set Buttons +*********************************************) +procedure TDateEdit97.SetCanPopup (value : boolean); +begin + FCanPopup := value; + FBtnPopup.Enabled := value; + Update; +end; + +procedure TDateEdit97.SetCanClear (value : boolean); +begin + if FCanClear<>value + then begin + FCanClear := value; + if FCanClear + then begin + if not Assigned (FBtnClear) + then FBtnClear := tBitBtn.Create (Self); + FBtnClear.Visible := True; + FBtnClear.Parent := Self; + FBtnClear.Glyph.Handle := LoadBitmap(hInstance, 'BTNCLEAR'); + FBtnClear.NumGlyphs := 2; + FBtnClear.OnClick := ClearDate; + FBtnClear.TabStop := FBtnTabStop; + Perform (WM_SIZE, SIZE_RESTORED, MAKELONG(width, height)); + end + else begin + if Assigned(fBtnClear) + then begin + FBtnClear.Free; + FBtnClear := nil; + end; + end; + Perform (WM_SIZE, SIZE_RESTORED, MAKELONG(width, height)); + end; +end; + +procedure TDateEdit97.SetCanValidate (value : boolean); +begin + if FCanValidate<>value + then begin + FCanValidate := value; + if FCanValidate + then begin + if not Assigned (FBtnValidate) + then FBtnValidate := tBitBtn.Create (Self); + FBtnValidate.Visible := True; + FBtnValidate.Parent := Self; + FBtnValidate.Glyph.Handle := LoadBitmap(hInstance, 'BTNVALIDATE'); + FBtnValidate.NumGlyphs := 2; + FBtnValidate.OnClick := ValidateDate; + FBtnValidate.TabStop := FBtnTabStop; + end + else begin + if Assigned(FBtnValidate) + then begin + FBtnValidate.Free; + FBtnValidate := nil; + end; + end; + Perform (WM_SIZE, SIZE_RESTORED, MAKELONG(width, height)); + end; +end; + +end. diff --git a/lib/date/DateEd97.res b/lib/date/DateEd97.res new file mode 100644 index 00000000..eedc3f6e Binary files /dev/null and b/lib/date/DateEd97.res differ diff --git a/lib/date/DateFT97.dcu b/lib/date/DateFT97.dcu new file mode 100644 index 00000000..d84576d2 Binary files /dev/null and b/lib/date/DateFT97.dcu differ diff --git a/lib/date/DateFT97.pas b/lib/date/DateFT97.pas new file mode 100644 index 00000000..763c82ff --- /dev/null +++ b/lib/date/DateFT97.pas @@ -0,0 +1,627 @@ +unit DateFT97; + +(****************************************************************************** +TDateFromTo97 + +Derived from + tCustomPanel + +Properties + TabOrder, BevelInner, BevelOuter, + BorderStyle, BorderWidth : Derived from tCustomPanel + DateFrom, DateTo : Dates selected + PanelOrientation : select type of panel (horizontal or vertical) + TextFrom : Caption 'From' + TextTo : Caption 'To' + and all properties from DateEdit97 + +procedures + ClearDate: Clear dates from DateFrom and DateTo + +Event + OnChangeFrom : when DateFrom is changed + OnChangeTo : when DateTo is changed + +Author name=BOURMAD Mehdi +Author E-mail=bourmad@mygale.org +Author URL=www.mygale.org/~bourmad +******************************************************************************) + +interface + +uses + Buttons, Classes, Controls, ExtCtrls, Forms, Graphics, Messages, StdCtrls, + SysUtils, DateEd97; + + +type + TOrientation = (oHorizontal, oVertical); + + TDateFromTo97 = class(TCustomPanel) + private + { Private declarations } + FAbout : TAboutMeProperty; + FDateFrom, + FDateTo : TDateEdit97; + FLabelFrom, + FLabelTo : TLabel; + FOrientation : tOrientation; + procedure PlaceComponents; + function GetOnChangeFrom : tNotifyEvent; + procedure SetOnChangeFrom (value : tNotifyEvent); + function GetOnChangeTo : tNotifyEvent; + procedure SetOnChangeTo (value : tNotifyEvent); + procedure SetOrientation (value : tOrientation); + function GetLabelFrom : string; + function GetLabelTo : string; + procedure SetLabelFrom (value : string); + procedure SetLabelTo (value : string); + function GetDateFrom : tDateTime; + function GetDateTo : tDateTime; + procedure SetDateFrom (value : tDateTime); + procedure SetDateTo (value : tDateTime); + function GetColorVal : tColor; + function GetColorArrow : tColor; + function GetColorDates : tColor; + function GetColorWeekEnd : tColor; + function GetColorError : tColor; + function GetColorTitle : tColor; + procedure SetColorVal (value : tColor); + procedure SetColorArrow (value : tColor); + procedure SetColorDates (value : tColor); + procedure SetColorWeekEnd (value : tColor); + procedure SetColorError (value : tColor); + procedure SetColorTitle (value : tColor); + function GetBtnDateStyle : tDateBtnStyle; + procedure SetBtnDateStyle (value : tDateBtnStyle); + function GetBtnBorderStyle : tBorderStyle; + procedure SetBtnBorderStyle (value : tBorderStyle); + function GetBtnStyle : tButtonStyle; + procedure SetBtnStyle (value : tButtonstyle); + function GetBtnTabStop : boolean; + procedure SetBtnTabStop (value : boolean); + function GetCanClear : boolean; + procedure SetCanClear (value : boolean); + function GetCanPopup : boolean; + procedure SetCanPopup (value : boolean); + function GetCanValidate : boolean; + procedure SetCanValidate (value : boolean); + function GetEmptyAsToday : boolean; + procedure SetEmptyAsToday (value : boolean); + function GetFocusOnError : boolean; + procedure SetFocusOnError (value : boolean); + function GetIsMasked : boolean; + procedure SetIsMasked (value : boolean); + function GetIsModal : boolean; + procedure SetIsModal (value : boolean); + function GetDayName : tDayName; + procedure SetDayName (value : tDayName); + function GetMonthName : tMonthName; + procedure SetMonthName (value : tMonthName); + function GetPopupToday : boolean; + procedure SetPopupToday (value : boolean); + function GetShortCutAlt : boolean; + procedure SetShortCutAlt (value : boolean); + function GetShortCutCtrl : boolean; + procedure SetShortCutCtrl (value : boolean); + function GetShortCutClear : word; + procedure SetShortCutClear (value : word); + function GetShortCutPopup : word; + procedure SetShortCutPopup (value : word); + function GetShortCutValidate : word; + procedure SetShortCutValidate (value : word); + function GetStartOfWeek : tDayOfWeek; + procedure SetStartOfWeek (value : tDayOfWeek); + protected + { Protected declarations } + procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED; + public + { Public declarations } + Constructor Create(AOwner:TComponent); override; + Destructor Destroy; override; + Procedure Loaded; override; + procedure ClearDate (Sender: TObject); + property DateFrom: tDateTime read GetDateFrom write SetDateFrom; + property DateTo: tDateTime read GetDateTo write SetDateTo; + published + { Published declarations } + Property BevelInner; + Property BevelOuter; + Property BorderStyle; + Property BorderWidth; + Property Font; + Property TabOrder; + Property TabStop; + property About: TAboutMeProperty read FAbout write FAbout; + property ButtonBorderStyle: tBorderStyle read GetBtnBorderStyle write SetBtnBorderStyle default bsSingle; + property ButtonDateStyle: tDateBtnStyle read GetBtnDateStyle write SetBtnDateStyle default btsCalendar; + property ButtonStyle : tButtonStyle read GetBtnStyle write SetBtnStyle default bsAutodetect; + property ButtonTabStop: boolean read GetBtnTabStop write SetBtnTabStop default true; + property CanClear: boolean read GetCanClear write SetCanClear default true; + property CanPopup: boolean read GetCanPopup write SetCanPopup default true; + property CanValidate : boolean read GetCanValidate write SetCanValidate default false; + property ColorArrow : tColor read GetColorArrow write SetColorArrow default clBlack; + property ColorDates : tColor read GetColorDates write SetColorDates default clBlack; + property ColorWeekEnd : tColor read GetColorWeekEnd write SetColorWeekEnd default clRed; + property ColorError : tColor read GetColorError write SetColorError default clRed; + property ColorTitle : tColor read GetColorTitle write SetColorTitle default clNavy; + property ColorValidDate : TColor read GetColorVal write SetColorVal default clMaroon; + property DayNames: TDayName read GetDayName write SetDayName; + property EmptyAsToday : boolean read GetEmptyAsToday write SetEmptyAsToday default false; + property FocusOnError : boolean read GetFocusOnError write SetFocusOnError default false; + property IsMasked : boolean read GetIsMasked write SetIsMasked default true; + property IsModal: boolean read GetIsModal write SetIsModal default false; + property MonthNames: TMonthName read GetMonthName write SetMonthName; + property PopupToday : boolean read GetPopupToday write SetPopupToday default false; + property ShortCutAddAlt: Boolean read GetShortCutAlt write SetShortCutAlt default False; + property ShortCutAddCtrl: Boolean read GetShortCutCtrl write SetShortCutCtrl default False; + property ShortCutClear: Word read GetShortCutClear write SetShortCutClear default 0; + property ShortCutPopup: Word read GetShortCutPopup write SetShortCutPopup default 0; + property ShortCutValidate: Word read GetShortCutValidate write SetShortCutValidate default 0; + property StartOfWeek: TDayOfWeek read GetStartOfWeek write SetStartOfWeek default 1; + property OnChangeFrom : TNotifyEvent read GetOnChangeFrom write SetOnChangeFrom; + property OnChangeTo : TNotifyEvent read GetOnChangeTo write SetOnChangeTo; + property PanelOrientation : tOrientation read FOrientation write SetOrientation default oHorizontal; + property TextFrom: String read GetLabelFrom write SetLabelFrom; + property TextTo: String read GetLabelTo write SetLabelTo; + end; + +implementation + +const + IdsFrom = 'From'; + IdsTo = 'To'; + +Constructor TDateFromTo97.Create(AOwner:TComponent); +Begin + inherited Create(AOwner); + + ParentFont := true; + + FLabelFrom:=TLabel.Create(Self); + FLabelFrom.Parent := Self; + FLabelFrom.Caption:=IdsFrom; + + FDateFrom:=TDateEdit97.Create(Self); + FDateFrom.Parent := Self; + FDateFrom.Date := Date; + + FLabelTo:=TLabel.Create(Self); + FLabelTo.Parent := Self; + FLabelTo.Caption:=IdsTo; + + FDateTo:=TDateEdit97.Create(Self); + FDateTo.Parent := Self; + FDateTo.Date := Date; + + ControlStyle := ControlStyle - [csSetCaption]; + + PanelOrientation := oHorizontal; +End; + +Procedure TDateFromTo97.Loaded; +Begin + inherited Loaded; + FDateFrom.Loaded; + FDateTo.Loaded; + PlaceComponents; + Caption:=''; +end; + +destructor TDateFromTo97.Destroy; +begin + FDateFrom.Free; + FDateTo.Free; + FLabelFrom.Free; + FLabelTo.Free; + inherited Destroy; +end; + +procedure TDateFromTo97.CMEnabledChanged(var Message: TMessage); +begin + FDateFrom.Enabled := Enabled; + FDateTo.Enabled := Enabled; + Invalidate; +end; + +procedure TDateFromTo97.ClearDate (Sender: TObject); +begin + FDateFrom.ClearDate (Sender); + FDateTo.ClearDate (Sender); +end; + +procedure TDateFromTo97.PlaceComponents; +begin + Case FOrientation of + oHorizontal : begin + FLabelFrom.Top := 8; + FLabelFrom.Left := 8; + FDateFrom.Top := 8; + FDateFrom.Left := FLabelFrom.Left+FLabelFrom.Width+8; + FLabelTo.Top := 8; + FLabelTo.Left := FDateFrom.Left+FDateFrom.Width+8; + FDateTo.Top := 8; + FDateTo.Left := FLabelTo.Left+FLabelTo.Width+8; + end; + oVertical : begin + FLabelFrom.Top := 8; + FLabelFrom.Left := 8; + FDateFrom.Top := FLabelFrom.Top+FLabelFrom.Height+8; + FDateFrom.Left := 16; + FLabelTo.Top := FDateFrom.Top+FDateFrom.Height+8; + FLabelTo.Left := 8; + FDateTo.Top := FLabelTo.Top+FLabelTo.Height+8; + FDateTo.Left := 16; + end; + end; + Width := FDateTo.Left+FDateTo.Width+8; + Height := FDateTo.Top+FDateTo.Height+8; +end; + +function TDateFromTo97.GetOnChangeFrom : tNotifyEvent; +begin + Result := FDateFrom.Onchange; +end; + +procedure TDateFromTo97.SetOnChangeFrom (value : tNotifyEvent); +begin + FDateFrom.OnChange := value; +end; + +function TDateFromTo97.GetOnChangeTo : tNotifyEvent; +begin + Result := FDateTo.Onchange; +end; + +procedure TDateFromTo97.SetOnChangeTo (value : tNotifyEvent); +begin + FDateTo.OnChange := value; +end; + +procedure TDateFromTo97.SetOrientation (value : tOrientation); +begin + if FOrientation <> value + then begin + FOrientation := value; + PlaceComponents; + end; +end; + +function TDateFromTo97.GetLabelFrom : string; +begin + Result := FLabelFrom.Caption; +end; + +function TDateFromTo97.GetLabelTo : string; +begin + Result := FLabelTo.Caption; +end; + +procedure TDateFromTo97.SetLabelFrom (value : string); +begin + FLabelFrom.Caption := value; + PlaceComponents; +end; + +procedure TDateFromTo97.SetLabelTo (value : string); +begin + FLabelTo.Caption := value; + PlaceComponents; +end; + +function TDateFromTo97.GetDateFrom : tDateTime; +begin + Result := FDateFrom.Date; +end; + +function TDateFromTo97.GetDateTo : tDateTime; +begin + Result := FDateTo.Date; +end; + +procedure TDateFromTo97.SetDateFrom (value : tDateTime); +begin + FDateFrom.Date := value; + Update; +end; + +procedure TDateFromTo97.SetDateTo (value : tDateTime); +begin + FDateTo.Date := value; + Update; +end; + +function TDateFromTo97.GetColorVal : tColor; +begin + Result := FDateFrom.ColorValidDate; +end; + +function TDateFromTo97.GetColorArrow : tColor; +begin + Result := FDateFrom.ColorArrow; +end; + +function TDateFromTo97.GetColorDates : tColor; +begin + Result := FDateFrom.ColorDates; +end; + +function TDateFromTo97.GetColorWeekEnd : tColor; +begin + Result := FDateFrom.ColorWeekEnd; +end; + +function TDateFromTo97.GetColorError : tColor; +begin + Result := FDateFrom.ColorError; +end; + +function TDateFromTo97.GetColorTitle : tColor; +begin + Result := FDateFrom.ColorTitle; +end; + +procedure TDateFromTo97.SetColorVal (value : tColor); +begin + FDateFrom.ColorValidDate := value; + FDateTo.ColorValidDate := value; + PlaceComponents; +end; + +procedure TDateFromTo97.SetColorArrow (value : tColor); +begin + FDateFrom.ColorArrow := value; + FDateTo.ColorArrow := value; + PlaceComponents; +end; + +procedure TDateFromTo97.SetColorDates (value : tColor); +begin + FDateFrom.ColorDates := value; + FDateTo.ColorDates := value; + PlaceComponents; +end; + +procedure TDateFromTo97.SetColorWeekEnd (value : tColor); +begin + FDateFrom.ColorWeekEnd := value; + FDateTo.ColorWeekEnd := value; + PlaceComponents; +end; + +procedure TDateFromTo97.SetColorError (value : tColor); +begin + FDateFrom.ColorError := value; + FDateTo.ColorError := value; + PlaceComponents; +end; + +procedure TDateFromTo97.SetColorTitle (value : tColor); +begin + FDateFrom.ColorTitle := value; + FDateTo.ColorTitle := value; + PlaceComponents; +end; + +function TDateFromTo97.GetBtnBorderStyle : tBorderStyle; +begin + Result := FDateFrom.BorderStyle; +end; + +procedure TDateFromTo97.SetBtnBorderStyle (value : tBorderStyle); +begin + FDateFrom.BorderStyle := value; + FDateTo.BorderStyle := value; +end; + +function TDateFromTo97.GetBtnDateStyle : tDateBtnStyle; +begin + Result := FDateFrom.ButtonDateStyle; +end; + +procedure TDateFromTo97.SetBtnDateStyle (value : tDateBtnStyle); +begin + FDateFrom.ButtonDateStyle := value; + FDateTo.ButtonDateStyle := value; +end; + +function TDateFromTo97.GetBtnStyle : tButtonstyle; +begin + Result := FDateFrom.ButtonStyle; +end; + +procedure TDateFromTo97.SetBtnStyle (value : tButtonstyle); +begin + FDateFrom.ButtonStyle := value; + FDateTo.ButtonStyle := value; +end; + +function TDateFromTo97.GetBtnTabStop : boolean; +begin + Result := FDateFrom.ButtonTabStop; +end; + +procedure TDateFromTo97.SetBtnTabStop (value : boolean); +begin + FDateFrom.ButtonTabStop := value; + FDateTo.ButtonTabStop := value; +end; + +function TDateFromTo97.GetCanClear : boolean; +begin + Result := FDateFrom.CanClear; +end; + +procedure TDateFromTo97.SetCanClear (value : boolean); +begin + FDateFrom.CanClear := value; + FDateTo.CanClear := value; +end; + +function TDateFromTo97.GetCanPopup : boolean; +begin + Result := FDateFrom.CanPopup; +end; + +procedure TDateFromTo97.SetCanPopup (value : boolean); +begin + FDateFrom.CanPopup := value; + FDateTo.CanPopup := value; +end; + +function TDateFromTo97.GetCanValidate : boolean; +begin + Result := FDateFrom.CanValidate; +end; + +procedure TDateFromTo97.SetCanValidate (value : boolean); +begin + FDateFrom.CanValidate := value; + FDateTo.CanValidate := value; +end; + +function TDateFromTo97.GetEmptyAsToday : boolean; +begin + Result := FDateFrom.EmptyAsToday; +end; + +procedure TDateFromTo97.SetEmptyAsToday (value : boolean); +begin + FDateFrom.EmptyAsToday := value; + FDateTo.EmptyAsToday := value; +end; + +function TDateFromTo97.GetFocusOnError : boolean; +begin + Result := FDateFrom.FocusOnError; +end; + +procedure TDateFromTo97.SetFocusOnError (value : boolean); +begin + FDateFrom.FocusOnError := value; + FDateTo.FocusOnError := value; +end; + +function TDateFromTo97.GetIsMasked : boolean; +begin + Result := FDateFrom.IsMasked; +end; + +procedure TDateFromTo97.SetIsMasked (value : boolean); +begin + FDateFrom.IsMasked := value; + FDateTo.IsMasked := value; +end; + +function TDateFromTo97.GetIsModal : boolean; +begin + Result := FDateFrom.IsModal; +end; + +procedure TDateFromTo97.SetIsModal (value : boolean); +begin + FDateFrom.IsModal := value; + FDateTo.IsModal := value; +end; + +function TDateFromTo97.GetDayName : tDayName; +begin + Result := FDateFrom.DayNames; +end; + +procedure TDateFromTo97.SetDayName (value : tDayName); +begin + FDateFrom.DayNames := value; + FDateTo.DayNames := value; +end; + +function TDateFromTo97.GetMonthName : tMonthName; +begin + Result := FDateFrom.MonthNames; +end; + +procedure TDateFromTo97.SetMonthName (value : tMonthName); +begin + FDateFrom.MonthNames := value; + FDateTo.MonthNames := value; +end; + +function TDateFromTo97.GetPopupToday : boolean; +begin + Result := FDateFrom.PopupToday; +end; + +procedure TDateFromTo97.SetPopupToday (value : boolean); +begin + FDateFrom.PopupToday := value; + FDateTo.PopupToday := value; +end; + +function TDateFromTo97.GetShortCutAlt : boolean; +begin + Result := FDateFrom.ShortCutAddAlt; +end; + +procedure TDateFromTo97.SetShortCutAlt (value : boolean); +begin + FDateFrom.ShortCutAddAlt := value; + FDateTo.ShortCutAddAlt := value; +end; + +function TDateFromTo97.GetShortCutCtrl : boolean; +begin + Result := FDateFrom.ShortCutAddCtrl; +end; + +procedure TDateFromTo97.SetShortCutCtrl (value : boolean); +begin + FDateFrom.ShortCutAddCtrl := value; + FDateTo.ShortCutAddCtrl := value; +end; + +function TDateFromTo97.GetShortCutClear : word; +begin + Result := FDateFrom.ShortCutClear; +end; + +procedure TDateFromTo97.SetShortCutClear (value : word); +begin + FDateFrom.ShortCutClear := value; + FDateTo.ShortCutClear := value; +end; + +function TDateFromTo97.GetShortCutPopup : word; +begin + Result := FDateFrom.ShortCutPopup; +end; + +procedure TDateFromTo97.SetShortCutPopup (value : word); +begin + FDateFrom.ShortCutPopup := value; + FDateTo.ShortCutPopup := value; +end; + +function TDateFromTo97.GetShortCutValidate : word; +begin + Result := FDateFrom.ShortCutValidate; +end; + +procedure TDateFromTo97.SetShortCutValidate (value : word); +begin + FDateFrom.ShortCutValidate := value; + FDateTo.ShortCutValidate := value; +end; + +function TDateFromTo97.GetStartOfWeek : tDayOfWeek; +begin + Result := FDateFrom.StartOfWeek; +end; + +procedure TDateFromTo97.SetStartOfWeek (value : tDayOfWeek); +begin + FDateFrom.StartOfWeek := value; + FDateTo.StartOfWeek := value; +end; + +end. + diff --git a/lib/date/DatePk97.txt b/lib/date/DatePk97.txt new file mode 100644 index 00000000..7b15b396 --- /dev/null +++ b/lib/date/DatePk97.txt @@ -0,0 +1,143 @@ +File Name.......: DatePk97.Zip +File Version....: Version 3.5 +File Description: DateTime field with drop down calendar like '97 (database version too). + tDateFromTo component. +Targets.........: Delphi 1, 2, 3 & C++ Builder. +Author Name.....: BOURMAD Mehdi +EMail...........: bourmad@mygale.org +WEB.............: http://www.mygale.org/~bourmad +File Status.....: Freeware +Category........: Application with source. + +(-----------------------------------------------------------------) +As usual : + +Free to use and redistribute, but my name must +appear somewhere in the source code, or in the software. +No warranty is given by the author, expressed or implied. + +WARNING! THE CODE IS PROVIDED AS IS WITH NO GUARANTEES OF ANY KIND! +USE THIS AT YOUR OWN RISK - YOU ARE THE ONLY PERSON RESPONSIBLE FOR +ANY DAMAGE THIS CODE MAY CAUSE - YOU HAVE BEEN WARNED! + +(-----------------------------------------------------------------) + +Files : + +DateRG97 : file for Register components. Install this one in Delphi. +DateEd97 : contains tDateEdit97 component. +DateDB97 : contains tDBDateEdit97 component. +DateFT97 : contains tDateFromTo97 component. +CalPop97 : popup calendar file. +DEd97_b : alternate resource files for button's bitmaps. + +Delphi 16bits (1) users : +You need to rename resource files from 16bits ones. + - Rename *.R16 files in *.RES files. + - Rename *.D16 files in *.DCR files. + +Delphi 32bits (2&3) users : +You need to rename resource files from 32bits ones. + - Rename *.R32 files in *.RES files. + - Rename *.D32 files in *.DCR files. + +(-----------------------------------------------------------------) + +History : + +26/12/97 - Version 3.5 : + Correct problems with the editmask when ShortDateFormat is with 2 digits years + and when year is not the last field. + Now, you can use this component with 2 or 4 digits year in your system date. + Correct problem when day or month have only one number. + Add property IsMasked to enable/disable editmask. + +11/11/97 - Version 3.4 : + Add an edit mask, properties for configure hotkeys. + Resize resource bitmaps (13x13 pixels). + Add new property EmptyAsToday. + When set to true, an empty fieds is used like "today" date. + +22/10/97 - Version 3.3 : + Now compatible with C++ Builder (constant OBM_COMBO redefined). + tDateEdit97 is now derived from tCustomEdit instead of tEdit. + Add new color for Week-End dates. + Reduce size of buttons bitmap. + Add property PopupToday. If true, popup calendar always start with today's date. + Keep focus when popup is hidden. + Add new event OnAfterClick, called before popup calendar is shown. + Add new button ValidateDate, and event OnValidateClick. + New public functions SetValidDate (set date valid or invalid), + AfterClick and ValidateDate calling associated events. + Minor changes in Calpop97 source. + Correct bugs (GPF) when ClearButton isn't used (CanClear=false). + +23/09/97 - Version 3.2 : + Add property ColorError (when date in invalid), and property FocusOnError (keep focus + when date is invalid). + Add property ButtonTabStop for enable or disable TabStop for Clear and Popup buttons, + property ButtonStyle (bsNew, bsWin31, bsAutodetect) + and property ButtonBorderStyle (bsSingle bsNone). + Add About property in each components. + Now, caption of tDateFromTo is hidden. + Changed some functions in tDbDateEdit97 component, correcting some bugs with + with keyboard usage. + Correct bug with Enabled property. + Change method to deactivate popup. + +13/08/97 - Version 3.1 : + This package is now compatible with C++ Builder. + Add property IsModal, now you can show popup calendar as Modal or Modeless form. + Add property CanPopup for enable or disable popup calendar button. + Make public ClearDate and PopupCalendar procedures, + so the date can be cleared and calendar popuped with program. + Correct Delphi 2 problem with OBM_COMBO constant. + Disable "mask" for entering dates manually because it's bugged. Now you can enter + dates manually (but without validity check). + When click on clear button, set focus to edit field. + Redraw bitmaps for buttons. + Enable/Disable buttons when Enable/Disable DateEdit component. + Correct bug with events OnEnter and OnExit. + Remove event OnDateChange, need to use OnChage. + Some bugs correction with DateDB97 (and inherited field Date). + +18/07/97 - Version 3.01 : + Correct new bug with DbDateEdit97 : Field is not switched in EditMode when date change. + Rename Calpop Unit to Calpop97 (frmCalPop to FrmCalPop97 component). + +10/07/97 - Version 3.0 : + Add a new component : tDateFromTo97, a panel with 2 DateEdit components. + Popup calendar is now modeless. + Now, you can close it by clicking anywhere in the screen. + You can hit ALT+SPACE or ALT+ARROWKEY DOWN for open popup calendar. + Add new properties ColorTitle, ColorDays, ColorArrow + and rename ValidDateColor to ColorValidDate. + Add new property ButtonDateStyle for choose between Calendar or DropDown bitmap + for open popup. + Can change CanClear property (visible or not) in design mode. + Font attribules for popup calendar (font, size, ...) are herited from parent. + Work around TWinControl.UpdateBounds bug. Thanks to Sam Liddicott. + And some minor improvements and corrections... + +20/05/97 - Version 2.1b : + Add resource files for 32bits version. + Other updates in previous release : + Add property StartOfWeek for indicate begin of week in popup calendar. + Correct height error of popup. + Correct problem with highlighted date on MouseMove. + Special Thanks to Claes Norreen for some updates. + +18/05/97 - Version 2.1 : + Add button for clear Date. + From Popup calendar, add buttons for mavigate throught years, and for cancel edition. + Can change caption for Month and Day. + Added property CanClear for view (or not) Clear Button. + +18/04/97 - Version 2.0 : + Rename components to tDateEd97 and tDbDateEd97 + (you need to remove the old components from your library). + Add tDateEd97 and tDbDateEd97 in the same source file. + Those components looks like '97 (mouse sensitive popup calendar). + +24/03/97 - Version 1.0 : + Primary version. diff --git a/lib/date/DateRg97.dcr b/lib/date/DateRg97.dcr new file mode 100644 index 00000000..bead7891 Binary files /dev/null and b/lib/date/DateRg97.dcr differ diff --git a/lib/date/DateRg97.dcu b/lib/date/DateRg97.dcu new file mode 100644 index 00000000..fdba511f Binary files /dev/null and b/lib/date/DateRg97.dcu differ diff --git a/lib/date/DateRg97.pas b/lib/date/DateRg97.pas new file mode 100644 index 00000000..5df3789e --- /dev/null +++ b/lib/date/DateRg97.pas @@ -0,0 +1,40 @@ +unit DateRg97; + +(****************************************************************************** +TDateEdit97 +TDbDateEdit97 +TDateFromTo97 + +Author name=BOURMAD Mehdi +Author E-mail=bourmad@mygale.org +Author URL=www.mygale.org/~bourmad +******************************************************************************) + +interface + +uses + Classes, DsgnIntf; + +Procedure Register; + +implementation + +uses + DateEd97, + DateFT97, + DateDB97; + +procedure Register; + +begin + RegisterComponents('Freeware', [TDateEdit97]); + RegisterComponents('Freeware', [TDateFromTo97]); + RegisterComponents('Freeware', [TDbDateEdit97]); + RegisterPropertyEditor (TypeInfo(TAboutMeProperty), TDateEdit97, + 'ABOUT', TAboutMeProperty); + RegisterPropertyEditor (TypeInfo(TAboutMeProperty), TDateFromTo97, + 'ABOUT', TAboutMeProperty); +end; + +end. + diff --git a/lib/graph/AABGRAPH.DCR b/lib/graph/AABGRAPH.DCR new file mode 100644 index 00000000..1121678a Binary files /dev/null and b/lib/graph/AABGRAPH.DCR differ diff --git a/lib/graph/AABGRAPH.DOC b/lib/graph/AABGRAPH.DOC new file mode 100644 index 00000000..2b090a10 Binary files /dev/null and b/lib/graph/AABGRAPH.DOC differ diff --git a/lib/graph/AABGRAPH.PAS b/lib/graph/AABGRAPH.PAS new file mode 100644 index 00000000..45c57822 --- /dev/null +++ b/lib/graph/AABGRAPH.PAS @@ -0,0 +1,2458 @@ +{**************************************************************************} +{ Component for simple graphics, it's based upon Timage component. } +{ (C) 1996-1997 AABsoft, all rights reserved. } +{ Distributed as freeware "AS IS"; may be modified as long as this } +{ copyright text remains unchanged. } +{ Version : 1.11 } +{**************************************************************************} +{ Updates to version 0.5-0.6: } +{ - MAX_XXXXXX - values increased to 100 } +{ - nXLegendsValue string length set to MAX_STR_LEN compared 160 before} +{ - New types for holding the graph data / temporary graph struct } +{ - Comments added to the source code } +{ - Event handling for MouseDown, MouseUp } +{ - ColorScheme file parameter / procedure added (default COMPASS.INI) } +{ - DefaultYLegends and DefaultGraphType is used by AutoFormatGraph } +{ procedure to produce nicely formatted charts } +{**************************************************************************} +{ Updates to version 0.6-0.7: } +{ - Support for pie charts } +{ - Extended font support procedures } +{ - Support for negative values } +{**************************************************************************} +{ Updates to version 0.7-0.72: (just bug fixes) } +{ - Pie legend show only the text that is set by the user } +{ - AutoFormatGraph rewritten for negative values } +{ - Procedure for setting negative Y values count SetNegativeYGapCount } +{ - Ylegend texts remapped to graph for precise output } +{**************************************************************************} +{ Updates to version 0.72-1.00: } +{ - Mouse click values correctly mapped } +{ - Mouse properties separeted (MouseInfo / MouseEdit) } +{ - Chart legend font size change resizes the corresponding header area} +{ - Procedure for setting max and min values (y direction): } +{**************************************************************************} +{ Updates to version 1.00-1.02: } +{ - New functions for retrieving current chart values; GetValue.... } +{**************************************************************************} +{ Updates to version 1.02-1.05: } +{ - New procedure GraphToClipboardAsMetaFile } +{**************************************************************************} +{ Updates to version 1.05-1.10: } +{ - Dropped support for GraphToClipboardAsMetaFile; if anyone knows } +{ how to draw to the clipboard, please inform me, then I might add it} +{ again. The "current" metafile was so lousy that I did not want to } +{ keep it. } +{ - NEW CHART TYPE : delta average=difference from the average line } +{ - New procedure for printing the chart as part of other print job; } +{ AddGraphToOpenPrintCanvas } +{ - New procedure to get the current chart type; GetGraphType } +{ - New properties; color settings for headers etc } +{ - Small improvements & bug fixes; layout of stacked 100% chart, } +{ legends for chart with negative values, etc } +{**************************************************************************} +{ Updates to version 1.10-1.11: marked with commented * } +{ - Bug fix for AutoFormatGraph-function, thanks to Jacques Strydom } +{ at University of Stellenbosch } +{**************************************************************************} + +{**************************************************************************} +{ DUE TO ALL MODIFICATIONS DONE TO THIS COMPONENT, THIS SOURCE IS MESSY! } +{ IF I HAVE THE TIME, I WILL REWRITE IT...SOMEDAY HOPEFULLY } +{**************************************************************************} + +unit AABGraph; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, ExtCtrls, Printers, Clipbrd, IniFiles; + +const + {MAXIMUM ENTRIES FOR MEMORY ALLOCATION} + {These values should be identical, otherwise ChangeXValuesWithSeries wont work!} + MAX_VALUES = 100; + MAX_SERIES = 100; + + MAX_Y_LEGENDS = 30; + DEFAULT_Y_LEGENDS = 20; + MAX_X_LEGENDS = 50; + + MAX_STR_LEN = 70; + + {GRAPH TYPES} + GRAPH_BAR = 1; + GRAPH_STACKED_BAR = 2; + GRAPH_LINE = 3; + GRAPH_BAR_WITH_AVE = 4; + GRAPH_STACKED_BAR_100 = 5; + GRAPH_PIE = 6; + GRAPH_LINE_WITH_MARK = 7; + GRAPH_MARK = 8; + GRAPH_DELTA_AVERAGE = 9; + + DEFAULT_GRAPH = GRAPH_BAR; + + MAX_GRAPH_LEGEND_LEN = 9; + + DEFAULT_HEADER_FONT_SIZE = 16; + DEFAULT_LEGEND_FONT_SIZE = 7; + DEFAULT_AXIS_FONT_SIZE = 9; + + DEFAULT_INI = 'COMPASS.INI'; + + REALPREC = 7; + + DEFAULT_POINT_SIZE = 3; + + CLIPBOARD_MULTIPLYER = 15; + +type + TGraphToShow3 = record + n100Value : Array[1..MAX_SERIES,1..MAX_VALUES] of real; + end; + + TGraphToShow2 = record + nValue : Array[1..MAX_SERIES,1..MAX_VALUES] of real; + end; + + TGraphToShow = record + nGraphType : Integer; + strGraphHeader : String[MAX_STR_LEN]; + strGraphXHeader : String[MAX_STR_LEN]; + strGraphYHeader : String[MAX_STR_LEN]; + nXValueCount : Integer; + nYValueCount : Integer; + nSeriesCount : Integer; + nAveValue : Array[1..MAX_VALUES] of real; + nXLegendsValue : Array[1..MAX_VALUES] of String[MAX_STR_LEN]; + nYLegendsValue : Array[1..MAX_Y_LEGENDS+1] of String[MAX_STR_LEN]; + nSeriesLegendsValue : Array[1..MAX_SERIES] of String[MAX_STR_LEN]; + nXGap : real; + nYGap : real; + nXOrigo : integer; {which value corresponds to origo} + nYOrigo : integer; + nXStartOffset : LongInt; {margin} + nYStartOffset : LongInt; + nXEnd : LongInt; {canvas size, excluding margin} + nYEnd : LongInt; + PointSize : integer; + end; + + + TAABsoftGraph = class(TImage) + private + { Private declarations } + Bitmap : TBitmap; + GraphToShow : ^TGraphToShow; + GraphToShow2 : ^TGraphToShow2; + PrintInSession : Boolean; + bStartDrag : Boolean; + bMouseLegend : Boolean; + bContainsNegative : Boolean; + strColorFile : String; + strHeaderFontName : String[70]; + strLegendFontName : String[70]; + strAxisFontName : String[70]; + nOldYOrigo : integer; + nOldYGap : real; + nMouseDownX : LongInt; + nMouseDownY : LongInt; + nMouseValue : Integer; + nMouseSeries : Integer; + nOldYValueCount : Integer; + gstrText : Array[0..255] of Char; + FColorScheme : Integer; + FDefaultGraphType : Integer; + FDefaultYLegends : Integer; + FLegendWidth : Integer; + FAutoUpdateGraph : Boolean; + FMouseEdit : Boolean; + FMouseInfo : Boolean; + FShowLegend : Boolean; + FThickLineWidth : Integer; + FAxisLineWidth : Integer; + FHeaderFontSize : Integer; + FLegendFontSize : Integer; + FAxisFontSize : Integer; + FHeaderFontColor : TColor; + FLegendFontColor : TColor; + FAxisFontColor : TColor; + procedure MyShowLegend(nXPixelGap, nYPixelGap: LongInt); + procedure MyHeader(strText: String); + procedure MyXHeader(nXPixelGap, nYPixelGap: LongInt ; strText: String); + procedure MyHeaderFont; + procedure MyGraphFont; + procedure MySmallGraphFont; + procedure MyRCTextOut(X, Y: Integer; const Text: string); + procedure MyCBTextOut(X, Y: Integer; const Text: string); + procedure MyLBTextOut(X, Y: Integer; const Text: string); + procedure MyThickLineTo(X,Y: Integer); + procedure MyAxisLineTo(X,Y: Integer); + procedure MyLineTo(X,Y: Integer); + procedure MyMoveTo(X,Y: Integer); + procedure MyRectangle(X, Y, X2, Y2: Integer); + procedure MyColorRectangle(Series : Integer; X, Y, X2, Y2: Integer); + procedure MyPie(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Longint); + procedure MyArc(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer); + procedure MyPolygon(Points: array of TPoint); + procedure MyEllipse(X1, Y1, X2, Y2: Integer); + procedure MyDrawLine(X1, Y1, X2, Y2: Integer); + procedure MyDrawDotLine(X1, Y1, X2, Y2: Integer); + function MyTextHeight(strText : String): LongInt; + function MyTextWidth(strText : String): LongInt; + procedure EditXHeader; + procedure EditHeader; + procedure SetSolidLines; + procedure SetDotLines; + procedure SetLineColor(Series : Integer); + procedure SetRectangleColor(Series : Integer); + procedure SetFontColor(Series : Integer); + procedure SaveColorScheme(nScheme : Integer); + function GetSelectedScheme: Integer; + procedure CountGraphAverage; + Procedure DrawSeriesColorBox(nColor,W,H,X,Y:Integer); + function GetDefaultColorString(nIndex : Integer): String; + procedure MyPiePercentage(X1,Y1,W: LongInt; nPercentage: real); + procedure MyDisplayAsPie(nSeries:Integer); + procedure MyDisplayAsDeltaAverage; + procedure MyPieLegend(nSeries: Integer); + procedure ShowMouseMessage(X,Y,nMouseValue,nMouseSeries: Integer); + procedure PlotCross(x, y: Integer); + procedure PlotDiamond(x, y: Integer); + procedure PlotCircle(x, y: Integer); + procedure PlotSquare(x, y: Integer); + function MyPt(AX, AY: Integer): TPoint; + function StrToPChar(strText : string): PChar; + procedure ClearScreen; + protected + {Protected declarations} + procedure MouseDown(Button: TMouseButton;Shift:TShiftState;X,Y:Integer); override; + procedure MouseUp(Button: TMouseButton;Shift:TShiftState;X,Y:Integer); override; + public + {Public declarations} + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + {General procedures for the graph...} + procedure ResetGraphModule; {Call this before totally new values and series} + procedure AutoFormatGraph; {Call this after new values} + procedure PlotGraph; {Update screen / draw graph to screen} + procedure PrintGraph; {Send picture to printer; all printing done by component} + procedure AddGraphToOpenPrintCanvas(XStartPos,YStartPos,GraphWidth,GraphHeight : LongInt); + {adds the graph to the "OPEN" printer canvas} + {printing control=outside this component; add other text etc} + procedure GraphToClipboard; {Puts picture on clipboard} + procedure UpdateGraphToScreen;{Call this after screen resize and after start up} + {Procedures to update graph values...} + procedure SetValue(nSeries,nIndex:Integer; nValue:real); {Values here!} + function GetValue(nSeries,nIndex:Integer): real; + procedure SetYGap(nValue:real); {Sets the vertical gap between dotted lines} + function GetYGap: real; + procedure SetYGapCount(nValue:Integer); {How many lines to display...} + function GetYGapCount: Integer; + procedure SetAverageLineValue(nIndex:Integer; nValue:real); {Overrides the values calculated by AutoFormatGraph} + procedure SetNegativeYGapCount(nValue:Integer); {How many lines on the negative side...} + procedure SetYMaxMin(nMaxValue,nMinValue:real); + {Procedures to update graph texts...} + procedure SetHeader(strHeader : String); + function GetHeader: String; + procedure SetXAxisHeader(strHeader : String); + function GetXAxisHeader: String; + procedure SetSeriesLegend(nSeries:Integer; strLegend:String); + function GetSeriesLegend(nSeries: Integer) : String; + procedure SetXLegend(nXValue:Integer; strLegend:String); + function GetXLegend(nXValue:Integer) :String; + procedure SetHeaderFontName(strFont:String); + procedure SetLegendFontName(strFont:String); + procedure SetAxisFontName(strFont:String); + function GetHeaderFontName : String; + function GetLegendFontName : String; + function GetAxisFontName : String; + {Display graph in different ways...} + procedure ShowAsBar; + procedure ShowAsStackedBar; + procedure ShowAsLine; + procedure ShowAsBarWithAve; + procedure ShowAs100StackedBar; + procedure ShowAsPie; + procedure ShowAsLineWithMark; + procedure ShowAsMark; + procedure ShowAsDeltaAverage; + function GetGraphType: integer; + procedure ChangeXValuesWithSeries; {Switches the x values with series! Resets AverageLine} + {Changes the color of the graph...} + procedure SetColorToScheme(nScheme,nIndex:Integer; nColor:TColor); + function GetColorFromScheme(nScheme,nIndex:Integer) : TColor; + procedure UseColorIniFile(strFileName : string); {COMPASS.INI if not used} + {These are for my own purpose...or why I did this in the first place} + procedure UsePFITemplate; + procedure UseICFTemplate; + procedure UseTLETemplate; + procedure UseBMSTemplate; + procedure UseEZTemplate; + procedure UseJDSTemplate; + procedure UseBackgroundTemplate; + published + {Published declarations} + property ColorScheme : Integer read FColorScheme write FColorScheme default 1; + property DefaultGraphType: Integer read FDefaultGraphType write FDefaultGraphType default 1; + property DefaultYLegends : Integer read FDefaultYLegends write FDefaultYLegends default DEFAULT_Y_LEGENDS; + property AutoUpdateGraph : Boolean read FAutoUpdateGraph write FAutoUpdateGraph default False; + property MouseEdit : Boolean read FMouseEdit write FMouseEdit default True; + property MouseInfo : Boolean read FMouseInfo write FMouseInfo default True; + property ShowLegend : Boolean read FShowLegend write FShowLegend default True; + property LegendWidth : Integer read FLegendWidth write FLegendWidth default 150; + property ThickLineWidth : Integer read FThickLineWidth write FThickLineWidth default 3; + property AxisLineWidth : Integer read FAxisLineWidth write FAxisLineWidth default 3; + property HeaderFontSize : Integer read FHeaderFontSize write FHeaderFontSize default DEFAULT_HEADER_FONT_SIZE; + property LegendFontSize : Integer read FLegendFontSize write FLegendFontSize default DEFAULT_LEGEND_FONT_SIZE; + property AxisFontSize : Integer read FAxisFontSize write FAxisFontSize default DEFAULT_AXIS_FONT_SIZE; + property HeaderFontColor : TColor read FHeaderFontColor write FHeaderFontColor default clNavy; + property LegendFontColor : TColor read FLegendFontColor write FLegendFontColor default clNavy; + property AxisFontColor : TColor read FAxisFontColor write FAxisFontColor default clNavy; + end; + +procedure Register; + + +implementation + + +{**************************************************************************} +{ call this function : NEVER! } +{**************************************************************************} +constructor TAABsoftGraph.Create(AOwner: TComponent); +var + I : Integer; + nXScreenResolution : LongInt; +begin + inherited Create(AOwner); {by TImage...} + + {Add code for my own data...here} + Bitmap := TBitMap.Create; + New(GraphToShow); + New(GraphToShow2); + GraphToShow^.nGraphType := DEFAULT_GRAPH; + GraphToShow^.PointSize := DEFAULT_POINT_SIZE; + + GraphToShow^.nXStartOffset := 45; {margin} + GraphToShow^.nYStartOffset := 40; + GraphToShow^.nXEnd := 360; {canvas size, excluding margin} + GraphToShow^.nYEnd := 250; + PrintInSession := FALSE; + strColorFile := DEFAULT_INI; + nOldYGap := 1; + nOldYOrigo := 0; + nOldYValueCount := 10; + bStartDrag := FALSE; + bMouseLegend := FALSE; + bContainsNegative := FALSE; + nMouseValue := 0; + nMouseSeries := 0; + strHeaderFontName := 'Arial'; + strLegendFontName := 'Arial'; + strAxisFontName := 'Arial'; + HeaderFontColor := clNavy; + LegendFontColor := clNavy; + AxisFontColor := clNavy; + + Width := 25; {VCL component initial size, IMPORTANT keep small default!} + Height := 25; {VCL component initial size, IMPORTANT keep small default!} + + {Set default values for component fields...} + FDefaultGraphType := DEFAULT_GRAPH; + FShowLegend := True; + FMouseEdit := True; + FMouseInfo := True; + FColorScheme := 1; + FLegendWidth := 150; + FThickLineWidth := 3; + FAxisLineWidth := 3; + FHeaderFontSize := DEFAULT_HEADER_FONT_SIZE; + FLegendFontSize := DEFAULT_LEGEND_FONT_SIZE; + FAxisFontSize := DEFAULT_AXIS_FONT_SIZE; + FDefaultYLegends := DEFAULT_Y_LEGENDS; + + {To do when plotting a new graph....} + ResetGraphModule; + GraphToShow^.strGraphHeader := 'Header'; + GraphToShow^.strGraphXHeader := 'x-axis header'; + GraphToShow^.strGraphYHeader := 'y-axis header'; + for I := 1 to MAX_SERIES do + GraphToShow^.nSeriesLegendsValue[I] :='Series Legend'; + for I := 1 to 25 do + begin + GraphToShow2^.nValue[1,I] := I*3.65; + GraphToShow2^.nValue[2,I] := 0.5*I; + GraphToShow2^.nValue[3,I] := 100-I*3; + GraphToShow2^.nValue[4,I] := (I mod 3)* 13.2; + GraphToShow2^.nValue[5,I] := 0; + GraphToShow2^.nValue[6,I] := 0; + GraphToShow2^.nValue[7,I] := 0; + GraphToShow2^.nValue[8,I] := 0; + GraphToShow2^.nValue[9,I] := 0; + GraphToShow2^.nValue[10,I] := 0; + GraphToShow^.nAveValue[I] := 0; + end; + for I := 1 to MAX_Y_LEGENDS do + GraphToShow^.nYLegendsValue[I] := IntToStr(Round(((I-1)-GraphToShow^.nYOrigo)*GraphToShow^.nYGap)); + for I := 1 to MAX_VALUES do + GraphToShow^.nXLegendsValue[I] := IntToStr(I); + AutoFormatGraph; {Should always be done when completed} +end; + + +{**************************************************************************} +{ call this function : NEVER! } +{**************************************************************************} +destructor TAABsoftGraph.Destroy; +begin + {Add code for detroying my own data...here} + Dispose(GraphToShow); + Dispose(GraphToShow2); + Bitmap.Free; + inherited Destroy; +end; + + +{device independent functions... no checking for printer / screen needed} + +{**************************************************************************} +{ call this function : } +{ a) before setting totally new values to the graph } +{**************************************************************************} +Procedure TAABsoftGraph.ResetGraphModule; +var + I,J : Integer; +begin + bContainsNegative := FALSE; + GraphToShow^.strGraphHeader := ''; + GraphToShow^.strGraphXHeader := ''; + GraphToShow^.strGraphYHeader := ''; + GraphToShow^.nSeriesCount := 1; + GraphToShow^.nXValueCount := 0; + GraphToShow^.nYValueCount := DefaultYLegends; + GraphToShow^.nXOrigo := 0; + GraphToShow^.nYOrigo := 0; + GraphToShow^.nXGap := 1; + GraphToShow^.nYGap := 1; + for I := 1 to MAX_SERIES do + GraphToShow^.nSeriesLegendsValue[I] :=''; + for I := 1 to MAX_VALUES do + begin + GraphToShow^.nAveValue[I] := 0; + for J := 1 to MAX_SERIES do + GraphToShow2^.nValue[J,I] := 0; + end; + for I := 1 to MAX_VALUES do + GraphToShow^.nXLegendsValue[I] := IntToStr(I); +end; + + +{**************************************************************************} +{ call this function : } +{ a) to set or change a single value in the graph } +{**************************************************************************} +procedure TAABsoftGraph.SetValue(nSeries,nIndex:Integer; nValue:real); +begin + if (nSeries<1) or (nIndex<1) or + (nSeries>MAX_SERIES) or (nIndex>MAX_VALUES) then + exit; + if (nValue<=-1) then + bContainsNegative := TRUE; + GraphToShow2^.nValue[nSeries,nIndex] := nValue; + if FAutoUpdateGraph then PlotGraph; +end; + + +{**************************************************************************} +{ call this function : } +{ a) to retrieve current graph value } +{**************************************************************************} +function TAABsoftGraph.GetValue(nSeries,nIndex:Integer): real; +begin + GetValue := GraphToShow2^.nValue[nSeries,nIndex]; +end; + + +{**************************************************************************} +{ call this function : } +{ a) to set the average value used by GRAPH_BAR_WITH_AVE type graph } +{**************************************************************************} +procedure TAABsoftGraph.SetAverageLineValue(nIndex:Integer; nValue:real); +begin + if (nIndex<1) or (nIndex>MAX_VALUES) then + exit; + if (nValue<0) then + bContainsNegative := TRUE; + GraphToShow^.nAveValue[nIndex] := nValue; + if FAutoUpdateGraph then PlotGraph; +end; + + +{**************************************************************************} +{ call this function : } +{ a) to set the header string of the graph } +{**************************************************************************} +procedure TAABsoftGraph.SetHeader(strHeader : String); +begin + GraphToShow^.strGraphHeader := Copy(strHeader,1,MAX_STR_LEN); + if FAutoUpdateGraph then PlotGraph; +end; + + +{**************************************************************************} +{ call this function : } +{ a) to retrieve currrent graph header string } +{**************************************************************************} +function TAABsoftGraph.GetHeader : String; +begin + GetHeader := GraphToShow^.strGraphHeader; +end; + + +{**************************************************************************} +{ call this function : } +{ a) to set the x axis header string shown below graph } +{**************************************************************************} +procedure TAABsoftGraph.SetXAxisHeader(strHeader : String); +begin + GraphToShow^.strGraphXHeader := Copy(strHeader,1,MAX_STR_LEN); + if FAutoUpdateGraph then PlotGraph; +end; + + +{**************************************************************************} +{ call this function : } +{ a) to retrieve x axis header string shown below graph } +{**************************************************************************} +function TAABsoftGraph.GetXAxisHeader : String; +begin + GetXAxisHeader := GraphToShow^.strGraphXHeader; +end; + + +{**************************************************************************} +{ call this function : } +{ a) to set the series legend string shown on the right of the graph } +{**************************************************************************} +procedure TAABsoftGraph.SetSeriesLegend(nSeries:Integer; strLegend:String); +begin + GraphToShow^.nSeriesLegendsValue[nSeries] := Copy(strLegend,1,MAX_STR_LEN); + if FAutoUpdateGraph then PlotGraph; +end; + + +{**************************************************************************} +{ call this function : } +{ a) to retrieve the current series legend string for a specified series } +{**************************************************************************} +function TAABsoftGraph.GetSeriesLegend(nSeries:Integer) : String; +begin + GetSeriesLegend := GraphToShow^.nSeriesLegendsValue[nSeries]; +end; + + +{**************************************************************************} +{ call this function : } +{ a) to set the x axis string for a specified value, show below or to the } +{ right of the graph depending on the length of the string } +{**************************************************************************} +procedure TAABsoftGraph.SetXLegend(nXValue:Integer; strLegend:String); +begin + GraphToShow^.nXLegendsValue[nXValue] := Copy(strLegend,1,MAX_STR_LEN); + if FAutoUpdateGraph then PlotGraph; +end; + + +{**************************************************************************} +{ call this function : } +{ a) to retrieve x axis legend string for a specified value } +{**************************************************************************} +function TAABsoftGraph.GetXLegend(nXValue:Integer) : String; +begin + GetXLegend := GraphToShow^.nXLegendsValue[nXValue]; +end; + + +procedure TAABsoftGraph.SetYGap(nValue:real); +begin + if (nValue<=0) then + ShowMessage('YGap must be positive!') + else + GraphToShow^.nYGap := nValue; + if FAutoUpdateGraph then PlotGraph; +end; + + +function TAABsoftGraph.GetYGap:real; +begin + GetYGap := GraphToShow^.nYGap; +end; + + +procedure TAABsoftGraph.SetYGapCount(nValue:Integer); +begin + if (nValue<=0) or (nValue>=MAX_Y_LEGENDS) then + ShowMessage('YGapCount must be between 0 and ' + IntToStr(MAX_Y_LEGENDS)) + else + GraphToShow^.nYValueCount := nValue; + if FAutoUpdateGraph then PlotGraph; +end; + + +function TAABsoftGraph.GetYGapCount:Integer; +begin + GetYGapCount := GraphToShow^.nYValueCount; +end; + + +procedure TAABsoftGraph.SetNegativeYGapCount(nValue:Integer); +begin + {How many lines on the negative side...} + if (nValue<0) or (nValue>=MAX_Y_LEGENDS) then + ShowMessage('YNegativeGapCount must be between 0 and ' + IntToStr(MAX_Y_LEGENDS)) + else + GraphToShow^.nYOrigo := nValue; + if FAutoUpdateGraph then PlotGraph; +end; + + +procedure TAABsoftGraph.SetYMaxMin(nMaxValue,nMinValue:real); +var + nMaxMinGap : real; +begin + {let's check the input values...} + if (nMaxValue<=nMinValue) then + begin + ShowMessage('Maximum value must be greater than minimum value.'); + exit; + end; + + nMaxMinGap := nMaxValue-nMinValue; + {check if YGap should be changed...} + if ((nMaxMinGap/9) < GraphToShow^.nYGap) then + GraphToShow^.nYGap := Round((nMaxMinGap/GraphToShow^.nYValueCount)+0.5); + + if (nMinValue<=0) and (nMaxValue>=0) then + begin + {if the nMinValue is zero or less and nMaxValue is positive ...easy!} + GraphToShow^.nYValueCount := Round((nMaxMinGap/GraphToShow^.nYGap)+0.5)+1; + SetNegativeYGapCount(Round((Abs(nMinValue)/GraphToShow^.nYGap))); + end + else + begin + GraphToShow^.nYValueCount := Round(nMaxMinGap/GraphToShow^.nYGap); + if (nMinValue<=0) then + begin + {both limits negative...} + SetNegativeYGapCount(Round(Abs(nMinValue)/GraphToShow^.nYGap)); + end + else + begin + {both limits positive...} + SetNegativeYGapCount(0); + GraphToShow^.nYOrigo := -(Round(Abs(nMinValue)/GraphToShow^.nYGap)); + end; + end; + + if FAutoUpdateGraph then PlotGraph; +end; + + +{**************************************************************************} +{ call this function : } +{ a) you have updated the graph with totally new values } +{ b) you have added a new series or x-value to the graph } +{ c) the graph looks scrambled } +{ Notice! This procedure does not make a graph perfect, but helps a little } +{ in the layout process of the graph, call SetYGap, SetYGapCount...} +{ for more personalized layouts, or do your own template function. } +{ Remember to call this anyway if you have case a) or b) } +{**************************************************************************} +Procedure TAABsoftGraph.AutoFormatGraph; +var + nYMax,nYMin : real; + nSeries : LongInt; + nMaxXValue : LongInt; + I,J : Integer; +begin + nYMax := -99999999; + nYMin := 99999999; + nMaxXValue := 0; + nSeries := 0; + {Set graph type according to component property} + GraphToShow^.nGraphType := FDefaultGraphType; + {Analyse graph for max and min values...} + for I := 1 to MAX_VALUES do + begin + for J := 1 to MAX_SERIES do + begin + if (nYMin > GraphToShow2^.nValue[J,I]) then + nYMin := GraphToShow2^.nValue[J,I]; + if (I>nMaxXValue) and (GraphToShow2^.nValue[J,I]<>0) then + nMaxXValue := I; + if (J>nSeries) and (GraphToShow2^.nValue[J,I]<>0) then + nSeries := J; + if (nYMax < GraphToShow2^.nValue[J,I]) then + nYMax := GraphToShow2^.nValue[J,I]; + end; + end; + + {Empiric based calculation how to format graph nicely...what a joke!} + {Seriously, this works for me...might work for you as well.} + {The following lines does not work with negative values...} + GraphToShow^.nYGap := Round((nYMax*1.1) / DefaultYLegends); + if (GraphToShow^.nGraphType = GRAPH_STACKED_BAR) then + GraphToShow^.nYGap := Round((((nYMax+nYMin)/1.9) / DefaultYLegends)*nSeries); + + bContainsNegative := FALSE; + if (nYMin < 0) then + begin + bContainsNegative := TRUE; + GraphToShow^.nYGap := Round(((nYMax-nYMin)*1.1) / DefaultYLegends); + if (GraphToShow^.nYGap=0) then {*} + GraphToShow^.nYGap := 1; + GraphToShow^.nGraphType := GRAPH_LINE; + GraphToShow^.nYOrigo := Round(-nYMin/GraphToShow^.nYGap); + end; + + if (GraphToShow^.nYGap=0) then + begin + GraphToShow^.nYGap := 1; + GraphToShow^.nYValueCount := Round(nYMax*nSeries); + end; + + if (GraphToShow^.nYValueCount=0) then GraphToShow^.nYValueCount := 1; + + GraphToShow^.nSeriesCount := nSeries; + GraphToShow^.nXValueCount := nMaxXValue; + for I := 1 to MAX_Y_LEGENDS do + GraphToShow^.nYLegendsValue[I] := IntToStr(Round(((I-1)-GraphToShow^.nYOrigo)*GraphToShow^.nYGap)); + CountGraphAverage; + PlotGraph; +end; + + +Procedure TAABsoftGraph.CountGraphAverage; +var + I,J : Integer; +begin + for I := 1 to MAX_VALUES do + begin + GraphToShow^.nAveValue[I] := 0; + for J := 1 to MAX_SERIES do + GraphToShow^.nAveValue[I] := GraphToShow^.nAveValue[I] + GraphToShow2^.nValue[J,I]; + if (GraphToShow^.nSeriesCount = 0) then + GraphToShow^.nAveValue[I] := 0 + else + GraphToShow^.nAveValue[I] := GraphToShow^.nAveValue[I]/GraphToShow^.nSeriesCount; + end; +end; + + +{**************************************************************************} +{ call this function : } +{ a) you want to show the graph stored in memory } +{ b) you have changed single graph value (call AutoFormatGraph if all new)} +{ c) you have changed the settings of the graph and if you do not use } +{ FAutoUpdateGraph option } +{**************************************************************************} +Procedure TAABsoftGraph.PlotGraph; +var + nXPixelGap : LongInt; + nYPixelGap : LongInt; + xOrigo : LongInt; + yOrigo : LongInt; + yOldOrigo : LongInt; + I : Integer; + J : Integer; + nStackGap : Integer; + GraphToShow3: ^TGraphToShow3; + n100Sum : real; + nOldY : LongInt; + yTempOrigo : LongInt; +begin + ClearScreen; + + {Check graph values and correct if wrong. Actually not needed if there are no bugs} + if (GraphToShow^.nYValueCount>MAX_Y_LEGENDS) then + GraphToShow^.nYValueCount := MAX_Y_LEGENDS; + if (GraphToShow^.nYValueCount=0) then + GraphToShow^.nYValueCount := 1; + if (GraphToShow^.nXValueCount>MAX_VALUES) then + GraphToShow^.nXValueCount := MAX_VALUES; + if (GraphToShow^.nSeriesCount>MAX_SERIES) then + GraphToShow^.nSeriesCount := MAX_SERIES; + if (GraphToShow^.nYGap=0) then + GraphToShow^.nYGap := 1; + + + {Resize Header area according to HeaderFont size} + if not PrintInSession then + begin + MyHeaderFont; + nOldY := GraphToShow^.nYStartOffset; + GraphToShow^.nYStartOffset := MyTextHeight('Mg') + 8; + GraphToShow^.nYEnd := GraphToShow^.nYEnd + (nOldY-GraphToShow^.nYStartOffset); + end; + + {Draw header and other stuff...} + + {Create texts for y-axis} + for I := 1 to MAX_Y_LEGENDS do + GraphToShow^.nYLegendsValue[I] := IntToStr(Round(((I-1)-GraphToShow^.nYOrigo)*GraphToShow^.nYGap)); + + if (GraphToShow^.nGraphType=GRAPH_STACKED_BAR) or + (GraphToShow^.nGraphType=GRAPH_STACKED_BAR_100) then + begin + nOldYOrigo := GraphToShow^.nYOrigo; + GraphToShow^.nYOrigo := 0; + end else + begin + nOldYOrigo := GraphToShow^.nYOrigo; + end; + if (GraphToShow^.nGraphType=GRAPH_STACKED_BAR_100) then + begin + nOldYGap := GraphToShow^.nYGap; + GraphToShow^.nYGap := 10; + nOldYValueCount := GraphToShow^.nYValueCount; + GraphToShow^.nYValueCount := 10; + for I := 1 to (GraphToShow^.nYValueCount+1) do + GraphToShow^.nYLegendsValue[I] := IntToStr(Round((I-1)*GraphToShow^.nYGap)); + end + else + begin + nOldYValueCount := GraphToShow^.nYValueCount; + nOldYGap := GraphToShow^.nYGap; + end; + + {This effects only graph type: GRAPH_STACKED_BAR(_100)} + nStackGap := 1; + if (GraphToShow^.nXEnd>200) then + nStackGap := 3; + + MyGraphFont; + + nXPixelGap := Round((GraphToShow^.nXEnd-GraphToShow^.nXStartOffset) / + (GraphToShow^.nXValueCount+1)); + nYPixelGap := Round(GraphToShow^.nYEnd/(GraphToShow^.nYValueCount+1)); + + xOrigo :=GraphToShow^.nXStartOffset + nXPixelGap*(GraphToShow^.nXOrigo); + yOrigo :=GraphToShow^.nYStartOffset + + Round(nYPixelGap*(GraphToShow^.nYValueCount-GraphToShow^.nYOrigo)); + if (GraphToShow^.nYOrigo < 0) then + yTempOrigo := GraphToShow^.nYStartOffset + Round(nYPixelGap*GraphToShow^.nYValueCount) + else + yTempOrigo := yOrigo; + + {Draw Y-axis} + MyMoveTo(xOrigo, GraphToShow^.nYStartOffset); + MyAxisLineTo(xOrigo,GraphToShow^.nYStartOffset + nYPixelGap*(GraphToShow^.nYValueCount+1)); + + {Y-axis legends and lines...} + for I := 1 to (GraphToShow^.nYValueCount+1) do + begin + MyRCTextOut(xOrigo - 3, + yOrigo - (nYPixelGap*((I-1)-GraphToShow^.nYOrigo)), + GraphToShow^.nYLegendsValue[I]); + MyDrawDotLine(GraphToShow^.nXStartOffset, + yOrigo - (nYPixelGap*((I-1)-GraphToShow^.nYOrigo)), + GraphToShow^.nXStartOffset + nXPixelGap*(GraphToShow^.nXValueCount+1), + yOrigo - (nYPixelGap*((I-1)-GraphToShow^.nYOrigo)) + ); + end; + + {Draw X-axis} + MyMoveTo(GraphToShow^.nXStartOffset, + yTempOrigo); + MyAxisLineTo(GraphToShow^.nXStartOffset + nXPixelGap*(GraphToShow^.nXValueCount+1), + yTempOrigo); + + {X-axis legends...} + MyShowLegend(nXPixelGap,nYPixelGap); + + {Main Header} + MyHeader(GraphToShow^.strGraphHeader); + + {X axis header} + MyXHeader(nXPixelGap,nYPixelGap,GraphToShow^.strGraphXHeader); + + {Create the actual graph...} + case (GraphToShow^.nGraphType) of + GRAPH_BAR, + GRAPH_BAR_WITH_AVE: + begin + for I := 1 to GraphToShow^.nSeriesCount do + for J := 1 to GraphToShow^.nXValueCount do + if (GraphToShow^.nSeriesCount=1) then + MyColorRectangle(I, + xOrigo+J*nXPixelGap+(I-1)*Round(nXPixelGap/(GraphToShow^.nSeriesCount+0.1)) + -Round(nXPixelGap/2), + yTempOrigo, + xOrigo+J*nXPixelGap+I*Round(nXPixelGap/(GraphToShow^.nSeriesCount+0.1)) + -Round(nXPixelGap/2), + yOrigo-Round((GraphToShow2^.nValue[I,J]/GraphToShow^.nYGap)*nYPixelGap)) + else + MyColorRectangle(I, + xOrigo+J*nXPixelGap+(I-1)*Round(nXPixelGap/(GraphToShow^.nSeriesCount+0.5)) + -Round(nXPixelGap/2), + yTempOrigo, + xOrigo+J*nXPixelGap+I*Round(nXPixelGap/(GraphToShow^.nSeriesCount+0.5)) + -Round(nXPixelGap/2), + yOrigo-Round((GraphToShow2^.nValue[I,J]/GraphToShow^.nYGap)*nYPixelGap)); + {add average line for the type...} + if (GraphToShow^.nGraphType=GRAPH_BAR_WITH_AVE) then + begin + SetLineColor(0); + MyMoveTo(xOrigo+1*nXPixelGap, + yOrigo-Round((GraphToShow^.nAveValue[1]/GraphToShow^.nYGap)*nYPixelGap)); + for J := 2 to GraphToShow^.nXValueCount do + MyThickLineTo(xOrigo+J*nXPixelGap, + yOrigo-Round((GraphToShow^.nAveValue[J]/GraphToShow^.nYGap)*nYPixelGap)); + SetLineColor(0); + end; + end; + GRAPH_STACKED_BAR: + begin + for J := 1 to GraphToShow^.nXValueCount do + begin + yOldOrigo := 0; + for I := 1 to GraphToShow^.nSeriesCount do + begin + MyColorRectangle(I, + xOrigo+J*nXPixelGap-Round(nXPixelGap/2), + yOrigo-yOldOrigo, + xOrigo+(J+1)*nXPixelGap-Round(nXPixelGap/2)-nStackGap, + (yOrigo-yOldOrigo) - + Round((GraphToShow2^.nValue[I,J]/GraphToShow^.nYGap)*nYPixelGap)); + yOldOrigo := yOldOrigo + + Round((GraphToShow2^.nValue[I,J]/GraphToShow^.nYGap)*nYPixelGap); + end; + end; + end; + GRAPH_LINE, + GRAPH_LINE_WITH_MARK: + begin + for I := 1 to GraphToShow^.nSeriesCount do + begin + SetLineColor(I); + MyMoveTo(xOrigo+1*nXPixelGap, + yOrigo-Round((GraphToShow2^.nValue[I,1]/GraphToShow^.nYGap)*nYPixelGap)); + for J := 2 to GraphToShow^.nXValueCount do + MyThickLineTo(xOrigo+J*nXPixelGap, + yOrigo-Round((GraphToShow2^.nValue[I,J]/GraphToShow^.nYGap)*nYPixelGap)); + end; + if (GraphToShow^.nGraphType=GRAPH_LINE_WITH_MARK) then + for I := 1 to GraphToShow^.nSeriesCount do + for J := 1 to GraphToShow^.nXValueCount do + begin + SetLineColor(I); + PlotDiamond(xOrigo+J*nXPixelGap, + yOrigo-Round((GraphToShow2^.nValue[I,J]/GraphToShow^.nYGap)*nYPixelGap)); + end; + SetLineColor(0); + end; + GRAPH_MARK: + begin + for I := 1 to GraphToShow^.nSeriesCount do + begin + SetLineColor(I); + for J := 1 to GraphToShow^.nXValueCount do + PlotDiamond(xOrigo+J*nXPixelGap, + yOrigo-Round((GraphToShow2^.nValue[I,J]/GraphToShow^.nYGap)*nYPixelGap)); + end; + SetLineColor(0); + end; + GRAPH_STACKED_BAR_100: + begin + New(GraphToShow3); + for J := 1 to GraphToShow^.nXValueCount do + begin + n100Sum := 0; + for I := 1 to GraphToShow^.nSeriesCount do + n100Sum := n100Sum + GraphToShow2^.nValue[I,J]; + + for I := 1 to GraphToShow^.nSeriesCount do + if (n100Sum<>0) then + GraphToShow3^.n100Value[I,J] := (GraphToShow2^.nValue[I,J]/n100Sum)*100 + else + GraphToShow3^.n100Value[I,J] := 0; + end; + + for J := 1 to GraphToShow^.nXValueCount do + begin + yOldOrigo := 0; + for I := 1 to GraphToShow^.nSeriesCount do + begin + if (I = GraphToShow^.nSeriesCount) then {last one; draw it always to the top line} + MyColorRectangle(I, + xOrigo+J*nXPixelGap-Round(nXPixelGap/2), + yOrigo-yOldOrigo, + xOrigo+(J+1)*nXPixelGap-Round(nXPixelGap/2)-nStackGap, + GraphToShow^.nYStartOffset) + else + begin + MyColorRectangle(I, + xOrigo+J*nXPixelGap-Round(nXPixelGap/2), + yOrigo-yOldOrigo, + xOrigo+(J+1)*nXPixelGap-Round(nXPixelGap/2)-nStackGap, + (yOrigo-yOldOrigo) - + Round((GraphToShow3^.n100Value[I,J]/GraphToShow^.nYGap)*nYPixelGap)); + yOldOrigo := yOldOrigo + Round((GraphToShow3^.n100Value[I,J]/GraphToShow^.nYGap)*nYPixelGap); + end; + end; + end; + Dispose(GraphToShow3); + end; + GRAPH_PIE: + MyDisplayAsPie(1); + GRAPH_DELTA_AVERAGE: + MyDisplayAsDeltaAverage; + else ShowMessage('DefaultGraphType not supported'); + end; +end; + + +Procedure TAABsoftGraph.MyShowLegend(nXPixelGap, nYPixelGap: LongInt); +var + I : Integer; + DoSeparate : boolean; + XLegendGap : LongInt; + nTextHeight : LongInt; + nChars : Integer; + yTempOrigo : LongInt; + nMaxLegend : Integer; +begin + {X-LEGEND: ...} + DoSeparate := FALSE; + XLegendGap := 0; + {Count how many characters to show in the separate legend} + MySmallGraphFont; + nChars := Round(FLegendWidth / MyTextWidth('1')); + {Decrease the value due to the color box shown} + if (nChars>3) and (nChars<35) then nChars := nChars-3; + {Analyse length of Xlegends; put to separate box if > MAX_GRAPH_LEGEND_LEN} + for I := 1 to GraphToShow^.nXValueCount do + if (Length(GraphToShow^.nXLegendsValue[I]) > MAX_GRAPH_LEGEND_LEN) then + DoSeparate := TRUE; + + {always separate for this type} + if (GraphToShow^.nGraphType=GRAPH_DELTA_AVERAGE) then + DoSeparate := TRUE; + + {Find out where the X-axis is in Y direction...} + if (GraphToShow^.nYOrigo < 0) then + yTempOrigo := GraphToShow^.nYStartOffset + + Round(nYPixelGap*GraphToShow^.nYValueCount)+2 + else + yTempOrigo := GraphToShow^.nYStartOffset + + Round(nYPixelGap*(GraphToShow^.nYValueCount-GraphToShow^.nYOrigo))+2;; + + if (DoSeparate) then + begin + if (GraphToShow^.nGraphType=GRAPH_DELTA_AVERAGE) then + for I := 1 to GraphToShow^.nXValueCount do + MyRCTextOut(GraphToShow^.nXStartOffset-2, + GraphToShow^.nYStartOffset + nXPixelGap*(I-1)+ (nXPixelGap div 2), + IntToStr(I)) + else + if (GraphToShow^.nXValueCount < MAX_X_LEGENDS) then + begin + for I := 1 to GraphToShow^.nXValueCount do + if (bContainsNegative) then {*} + MyCBTextOut(GraphToShow^.nXStartOffset + nXPixelGap*I, + GraphToShow^.nYEnd+3, + IntToStr(I)) + else + MyCBTextOut(GraphToShow^.nXStartOffset + nXPixelGap*I, + yTempOrigo, + IntToStr(I)); + end + else + begin + for I := 1 to (GraphToShow^.nXValueCount div 10 ) do + if (bContainsNegative) then {*} + MyCBTextOut(GraphToShow^.nXStartOffset + nXPixelGap*I, + GraphToShow^.nYEnd+3, + IntToStr(I*10)) + else + MyCBTextOut(GraphToShow^.nXStartOffset + nXPixelGap*I*10, + yTempOrigo, + IntToStr(I*10)); + end; + MySmallGraphFont; + nTextHeight := Round(MyTextHeight('Mg')*1.1); + + if FShowLegend then + begin + MyColorRectangle(0, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+6, + (GraphToShow^.nYStartOffset+6+4)-nTextHeight, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+FLegendWidth+6, + GraphToShow^.nYStartOffset+(GraphToShow^.nXValueCount-1)*nTextHeight+6+5); + MyColorRectangle(-1, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+3, + (GraphToShow^.nYStartOffset+3+4)-nTextHeight, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+FLegendWidth+3, + GraphToShow^.nYStartOffset+(GraphToShow^.nXValueCount-1)*nTextHeight+3+5); + for I := 1 to GraphToShow^.nXValueCount do + MyLBTextOut(GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+7, + GraphToShow^.nYStartOffset+(I-2)*nTextHeight+7, + IntToStr(I)+'.'+Copy(GraphToShow^.nXLegendsValue[I],1,nChars)); + XLegendGap := (I-1)*nTextHeight+7+5; + if PrintInSession then XLegendGap := XLegendGap + 5; + end; + end + else + begin + {Put legends in the actual graph...} + SetLineColor(0); + if (GraphToShow^.nXValueCount < MAX_X_LEGENDS) then + begin + for I := 1 to GraphToShow^.nXValueCount do + if (bContainsNegative) then + MyCBTextOut(GraphToShow^.nXStartOffset + nXPixelGap*I, + GraphToShow^.nYEnd+3, + GraphToShow^.nXLegendsValue[I]) + else + MyCBTextOut(GraphToShow^.nXStartOffset + nXPixelGap*I, + yTempOrigo, + GraphToShow^.nXLegendsValue[I]); + end + else + begin + for I := 1 to (GraphToShow^.nXValueCount div 10) do + if (bContainsNegative) then + MyCBTextOut(GraphToShow^.nXStartOffset + nXPixelGap*I*10, + GraphToShow^.nYEnd+3, + GraphToShow^.nXLegendsValue[I*10]) + else + MyCBTextOut(GraphToShow^.nXStartOffset + nXPixelGap*I*10, + yTempOrigo, + GraphToShow^.nXLegendsValue[I*10]); + end; + end; + + {SERIES LEGEND: only if series count is greater than one and we want them.} + if (GraphToShow^.nSeriesCount=1) or (not FShowLegend) then exit; + + MySmallGraphFont; + {10 % extra space for line height} + nTextHeight := Round(MyTextHeight('Mg')*1.1); + MyColorRectangle(0, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+6, + GraphToShow^.nYStartOffset+XLegendGap+6, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+FLegendWidth+6, + GraphToShow^.nYStartOffset+GraphToShow^.nSeriesCount*nTextHeight+XLegendGap+6+5); + MyColorRectangle(-1, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+3, + GraphToShow^.nYStartOffset+3+XLegendGap, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+FLegendWidth+3, + GraphToShow^.nYStartOffset+GraphToShow^.nSeriesCount*nTextHeight+3+XLegendGap+5); + + for I := 1 to GraphToShow^.nSeriesCount do + begin + DrawSeriesColorBox(I,MyTextWidth('12')-2,nTextHeight-2, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+7, + GraphToShow^.nYStartOffset+(I-1)*nTextHeight+7+XLegendGap); + SetFontColor(0); + MyLBTextOut(GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+7 + MyTextWidth('12'){added myTextWidth}, + GraphToShow^.nYStartOffset+(I-1)*nTextHeight+7+XLegendGap, + IntToStr(I)+'.'+Copy(GraphToShow^.nSeriesLegendsValue[I],1,nChars)); + end; +end; + + +Procedure TAABsoftGraph.DrawSeriesColorBox(nColor,W,H,X,Y:Integer); +begin + MyColorRectangle(nColor,X, Y, X+W, Y+H); + SetRectangleColor(-1); +end; + + +{**************************************************************************} +{ call this function : } +{ a) when you want to print the graph to Windows default printer } +{**************************************************************************} +Procedure TAABsoftGraph.PrintGraph; +var + nXEnd,nYEnd : LongInt; + nXStart,nYStart : LongInt; + nLegendWidth : LongInt; +begin + {Save display values...} + nXEnd := GraphToShow^.nXEnd; + nYEnd := GraphToShow^.nYEnd; + nXStart := GraphToShow^.nXStartOffset; + nYStart := GraphToShow^.nYStartOffset; + nLegendWidth := FLegendWidth; + {Calculate new values for printer....} + FLegendWidth := Round((FLegendWidth/(nXEnd+FLegendWidth))*Printer.PageWidth); + GraphToShow^.nXStartOffset := Round(Printer.PageWidth*0.08); {8%} + GraphToShow^.nYStartOffset := Round(Printer.PageHeight*0.1); {10%} + GraphToShow^.nXEnd := Round(Printer.PageWidth-(1.2*FLegendWidth))-GraphToShow^.nXStartOffset; + GraphToShow^.nYEnd := Round(Printer.PageHeight*0.75); + if (GraphToShow^.nYEnd > GraphToShow^.nXEnd) then + GraphToShow^.nYEnd := GraphToShow^.nXEnd; + {Begin printing...} + PrintInSession := TRUE; + Printer.BeginDoc; + PlotGraph; {Here it goes!} + Printer.EndDoc; + PrintInSession := FALSE; + {Restore display values...} + GraphToShow^.nXStartOffset := nXStart; {margin} + GraphToShow^.nYStartOffset := nYStart; + GraphToShow^.nXEnd := nXEnd; + GraphToShow^.nYEnd := nYEnd; + FLegendWidth := nLegendWidth; +end; + + +{**************************************************************************} +{ call this function : } +{ a) when you want to print the graph to Windows default printer } +{ AND you add something else on the same paper. This function } +{ will just add the chart to the OPEN printer canvas at given position } +{**************************************************************************} +Procedure TAABsoftGraph.AddGraphToOpenPrintCanvas(XStartPos,YStartPos,GraphWidth,GraphHeight: LongInt); +var + nXEnd,nYEnd : LongInt; + nXStart,nYStart : LongInt; + nLegendWidth : LongInt; +begin + {Save display values...} + nXEnd := GraphToShow^.nXEnd; + nYEnd := GraphToShow^.nYEnd; + nXStart := GraphToShow^.nXStartOffset; + nYStart := GraphToShow^.nYStartOffset; + nLegendWidth := FLegendWidth; + {Set new values for printing the graph at EXISTING print canvas....} + FLegendWidth := Round((FLegendWidth/(nXEnd+FLegendWidth))*GraphWidth); + GraphToShow^.nXStartOffset := Round(GraphWidth*0.08); {8%} + GraphToShow^.nYStartOffset := Round(GraphHeight*0.1); {10%} + GraphToShow^.nXEnd := Round(GraphWidth-(1.2*FLegendWidth))-GraphToShow^.nXStartOffset; + GraphToShow^.nYEnd := Round(GraphHeight*0.75); + {Begin printing...NOTICE BeginDoc And EndDoc must be done OUTSIDE this procedure call} + PrintInSession := TRUE; + PlotGraph; {Here it goes!} + PrintInSession := FALSE; + {Restore display values...} + GraphToShow^.nXStartOffset := nXStart; {margin} + GraphToShow^.nYStartOffset := nYStart; + GraphToShow^.nXEnd := nXEnd; + GraphToShow^.nYEnd := nYEnd; + FLegendWidth := nLegendWidth; +end; + + +function TAABsoftGraph.StrToPChar(strText : string): PChar; +begin + StrPCopy(gstrText,strText); + StrToPChar := gstrText; +end; + + +{**************************************************************************} +{ call this function : } +{ a) when you resize the canvas for the AABsoftGraph } +{ b) at program startup before drawing the first graph } +{**************************************************************************} +procedure TAABsoftGraph.UpdateGraphToScreen; +begin + Bitmap.Width := inherited Width; + Bitmap.Height := inherited Height; + inherited Picture.Graphic := BitMap; + GraphToShow^.nYEnd := Bitmap.Height - 2*GraphToShow^.nYStartOffset; {canvas size, excluding margin} + if (FShowLegend) then + GraphToShow^.nXEnd := Round((Bitmap.Width - 1.5*GraphToShow^.nXStartOffset) - FLegendWidth) + else + GraphToShow^.nXEnd := Round(Bitmap.Width - 0.5*GraphToShow^.nXStartOffset); + if (GraphToShow^.nXEnd<10) then GraphToShow^.nXEnd := 10; + if (GraphToShow^.nYEnd<10) then GraphToShow^.nYEnd := 10; + Invalidate; + PlotGraph; +end; + + +{This procedure is called when user clicks on the main header} +procedure TAABsoftGraph.EditHeader; +var + strString : String; +begin + strString := GraphToShow^.strGraphHeader; + if InputQuery('AABGraph',GraphToShow^.strGraphHeader+'->',strString) then + GraphToShow^.strGraphHeader := strString; + PlotGraph; +end; + + +{This procedure is called when user clicks on the x-axis header} +procedure TAABsoftGraph.EditXHeader; +var + strString : String; +begin + strString := GraphToShow^.strGraphXHeader; + if InputQuery('AABGraph',GraphToShow^.strGraphXHeader+'->',strString) then + GraphToShow^.strGraphXHeader := strString; + PlotGraph; +end; + + +{**************************************************************************} +{ call this function : } +{ a) when you want to use other INI file for color settings, default is } +{ COMPASS.INI } +{**************************************************************************} +procedure TAABsoftGraph.UseColorIniFile(strFileName : string); +begin + strColorFile := strFileName; +end; + + +Procedure TAABsoftGraph.MyXHeader(nXPixelGap, nYPixelGap: LongInt ; strText: String); +begin + MyGraphFont; + if (bContainsNegative) or (GraphToShow^.nGraphType=GRAPH_DELTA_AVERAGE) then + begin + MyCBTextOut(GraphToShow^.nXStartOffset + Round(GraphToShow^.nXEnd/2), + GraphToShow^.nYStartOffset + GraphToShow^.nYEnd + MyTextHeight(strText), + strText) + end + else + if (GraphToShow^.nYOrigo < 0) then + MyCBTextOut(GraphToShow^.nXStartOffset + Round(GraphToShow^.nXEnd/2), + GraphToShow^.nYStartOffset + MyTextHeight(strText) + + Round(nYPixelGap*GraphToShow^.nYValueCount), + strText) + else + MyCBTextOut(GraphToShow^.nXStartOffset + Round(GraphToShow^.nXEnd/2), + GraphToShow^.nYStartOffset + MyTextHeight(strText) + + Round(nYPixelGap*(GraphToShow^.nYValueCount-GraphToShow^.nYOrigo)), + strText); + MyGraphFont; +end; + + +{***************************************************************************} +{ FONT FUNCTIONS AND PROCEDURES } +{***************************************************************************} +procedure TAABsoftGraph.SetHeaderFontName(strFont:String); +begin + strHeaderFontName := Copy(strFont,1,70); + if FAutoUpdateGraph then PlotGraph; +end; + + +procedure TAABsoftGraph.SetLegendFontName(strFont:String); +begin + strLegendFontName := Copy(strFont,1,70); + if FAutoUpdateGraph then PlotGraph; +end; + + +procedure TAABsoftGraph.SetAxisFontName(strFont:String); +begin + strAxisFontName := Copy(strFont,1,70); + if FAutoUpdateGraph then PlotGraph; +end; + + +function TAABsoftGraph.GetHeaderFontName : String; +begin + GetHeaderFontName := strHeaderFontName; +end; + + +function TAABsoftGraph.GetLegendFontName : String; +begin + GetLegendFontName := strLegendFontName; +end; + + +function TAABsoftGraph.GetAxisFontName : String; +begin + GetAxisFontName := strAxisFontName; +end; + + +{***************************************************************************} +{ MOUSE FUNCTIONS AND PROCEDURES } +{***************************************************************************} +{ +function TAABsoftGraph.GetXValue(X,Y:integer): real; +var + xOrigo : LongInt; + nXPixelGap: LongInt; +begin + if (Y>GraphToShow^.nYStartOffset) and (YGraphToShow^.nXStartOffset) and (X GRAPH_PIE) + then + begin + nXPixelGap := Round((GraphToShow^.nXEnd-GraphToShow^.nXStartOffset) / + (GraphToShow^.nXValueCount+1)); + xOrigo :=GraphToShow^.nXStartOffset + nXPixelGap*(GraphToShow^.nXOrigo); + + GetXValue := Round((X-xOrigo)/nXPixelGap); + end else GetXValue := 0; +end; + + +function TAABsoftGraph.GetYValue(X,Y:integer): real; +var + yOrigo : LongInt; + nYPixelGap: LongInt; +begin + if (Y>GraphToShow^.nYStartOffset) and (YGraphToShow^.nXStartOffset) and (X GRAPH_PIE) + then + begin + nYPixelGap := Round(GraphToShow^.nYEnd/(GraphToShow^.nYValueCount+1)); + yOrigo := GraphToShow^.nYStartOffset + + Round(nYPixelGap*(GraphToShow^.nYValueCount-GraphToShow^.nYOrigo)); + GetYValue := ((yOrigo-Y)/nYPixelGap)*GraphToShow^.nYGap; + end else GetYValue := 0; +end; +} + +procedure TAABsoftGraph.MouseUp(Button: TMouseButton;Shift:TShiftState;X,Y:Integer); +begin + Screen.Cursor := crDefault; + inherited MouseUp(Button, Shift, X, Y); + + if (bStartDrag) then + begin + FLegendWidth := FLegendWidth + (nMouseDownX-X); + GraphToShow^.nXEnd := GraphToShow^.nXEnd - (nMouseDownX-X); + PlotGraph; + end; + if (bMouseLegend) then + begin + PlotGraph; + bMouseLegend := FALSE; + end; + bStartDrag := FALSE; +end; + + +procedure TAABsoftGraph.MouseDown(Button: TMouseButton;Shift:TShiftState;X,Y:Integer); +var + nXPixelGap : LongInt; + nYPixelGap : LongInt; +begin + inherited MouseDown(Button, Shift, X, Y); + + if (FMouseEdit) then + begin + if (Y(GraphToShow^.nYStartOffset+GraphToShow^.nYEnd)) then EditXHeader; + end; + + if (FMouseInfo) then + begin + bStartDrag := FALSE; + nMouseDownX := X; + nMouseDownY := Y; + if (Y>GraphToShow^.nYStartOffset) and (YGraphToShow^.nXStartOffset) and (X(GraphToShow^.nXStartOffset+GraphToShow^.nXEnd)-5) then + begin + bStartDrag := TRUE; + Screen.Cursor := crSizeWE; + end; + {Inside the actual graph...} + if (X<=(GraphToShow^.nXStartOffset+GraphToShow^.nXEnd)-5) and + (GraphToShow^.nGraphType<>GRAPH_PIE) and + (GraphToShow^.nGraphType<>GRAPH_DELTA_AVERAGE) then + begin + nXPixelGap := Round((GraphToShow^.nXEnd-GraphToShow^.nXStartOffset) / + (GraphToShow^.nXValueCount+1)); + nMouseValue := Round((X-GraphToShow^.nXStartOffset)/(nXPixelGap)); + case (GraphToShow^.nGraphType) of + GRAPH_BAR, + GRAPH_BAR_WITH_AVE: + if (GraphToShow^.nSeriesCount=1) then {check for series count} + nMouseSeries := Round( ((X+Round(nXPixelGap/2))- + (GraphToShow^.nXStartOffset+ + GraphToShow^.nXOrigo*nXPixelGap+ + nXPixelGap*nMouseValue)) / + Round(nXPixelGap/(GraphToShow^.nSeriesCount+0.1))+0.1) + else + nMouseSeries := Round( ((X+Round(nXPixelGap/2))- + (GraphToShow^.nXStartOffset+ + GraphToShow^.nXOrigo*nXPixelGap+ + nXPixelGap*nMouseValue)) / + Round(nXPixelGap/(GraphToShow^.nSeriesCount+0.5))+0.5); + GRAPH_STACKED_BAR, + GRAPH_LINE, + GRAPH_STACKED_BAR_100: + nMouseSeries := 0; + end; + if (nMouseValue>GraphToShow^.nXValueCount) or (nMouseValue < 0) then + nMouseValue := 0; + if (nMouseSeries>GraphToShow^.nYValueCount) then nMouseSeries := 0; + ShowMouseMessage(X,Y,nMouseValue,nMouseSeries); + end; + end; + end; +end; + + +procedure TAABsoftGraph.ShowMouseMessage(X,Y,nMouseValue,nMouseSeries: Integer); +var + strMessage1 : String; + strMessage2 : String; + strMessage3 : String; + strMessage5 : String; + nWidth : Integer; + nHeight : Integer; + nLineH : Integer; + nLineCount : Integer; + I : Integer; +begin + strMessage1 := 'No values here!'; + nWidth := MyTextWidth(strMessage1); + nLineH := Round(MyTextHeight(strMessage1)*1.07); + nLineCount := 0; + if (nMouseValue=0) then + begin + MyColorRectangle(0,X+3,Y+3,X+nWidth+3+5,Y+nLineH+3); + MyColorRectangle(-1,X,Y,X+nWidth+5,Y+nLineH); + MyLBTextOut(X+2,Y,strMessage1); + bMouseLegend := TRUE; + exit; + end; + {We will show some real values...} + if (nMouseSeries=0) then + begin + {show all values in the series...} + nLineCount := GraphToShow^.nSeriesCount; + nHeight := nLineH*(nLineCount+2); + strMessage1 := GraphToShow^.nXLegendsValue[nMouseValue]; + strMessage2 := '-'; + if (nWidth < MyTextWidth(strMessage1)) then + nWidth := MyTextWidth(strMessage1); + end + else + begin + nLineCount := 1; + nHeight := nLineH*(nLineCount+2); + strMessage1 := GraphToShow^.nXLegendsValue[nMouseValue]; + if (nWidth < MyTextWidth(strMessage1)) then + nWidth := MyTextWidth(strMessage1); + if (nMouseSeries>0) then + strMessage2 := GraphToShow^.nSeriesLegendsValue[nMouseSeries]; + if (MyTextWidth(strMessage2)>nWidth) then + nWidth := MyTextWidth(strMessage2); + strMessage3 := FloatToStrF(GraphToShow2^.nValue[nMouseSeries,nMouseValue],ffFixed,REALPREC,3); + end; + + nWidth := nWidth + 25; + nHeight:= nHeight + 4; + MyColorRectangle( 0,X+3,Y+3,X+nWidth+3,Y+nHeight+3); + MyColorRectangle(-2,X,Y,X+nWidth,Y+nHeight); + + MyLBTextOut(X+2,Y,strMessage1); + MyLBTextOut(X+2,Y+nLineH,strMessage2); + if (nMouseSeries=0) then + for I := 1 to nLineCount do + begin + strMessage3 := IntToStr(I)+' : ' + FloatToStrF(GraphToShow2^.nValue[I,nMouseValue],ffFixed,REALPREC,3); + MyLBTextOut(X+2, Y+(1+I)*nLineH, strMessage3); + end + else + MyLBTextOut(X+2, Y+2*nLineH, strMessage3); + + bMouseLegend := TRUE; +end; + + +{***************************************************************************} +{ PIE FUNCTIONS AND PROCEDURES } +{***************************************************************************} +Procedure TAABsoftGraph.MyDisplayAsPie(nSeries:Integer); +var + nSize : Integer; + I : Integer; + nLast : Integer; + nXExtra : Integer; + nSum : real; + n100Sum : real; + nP : real; +begin + ClearScreen; + + {Main Header} + MyHeader(GraphToShow^.strGraphHeader); + MyPieLegend(nSeries); + if (GraphToShow^.nXEnd 0) then + begin + nSum := n100Sum; + nLast := GraphToShow^.nXValueCount+1; + if (nLast>MAX_VALUES) then nLast := MAX_VALUES; + for I := nLast downto 2 do + begin + nSum := nSum - GraphToShow2^.nValue[nSeries,I]; + nP := 100*(nSum/n100Sum); + SetRectangleColor(I-1); + MyPiePercentage(GraphToShow^.nXStartOffset+nXExtra, + GraphToShow^.nYStartOffset, + nSize, nP); + end; + end; +end; + + +Procedure TAABsoftGraph.MyPiePercentage(X1,Y1,W: LongInt; nPercentage: real); +var + nOrigoX, nOrigoY : LongInt; + nGrade : real; + nStartGrade : real; + x,y : real; + nLen : real; +begin + nOrigoX := Round((W-1.01)/2)+X1; + nOrigoY := Round((W-1.01)/2)+Y1; + nGrade := (nPercentage/100)*2*Pi; + nStartGrade := (2/8)*2*Pi; + nLen := Round((W-1)/2); + x := Cos(nStartGrade+nGrade)*nLen; + y := Sin(nStartGrade+nGrade)*nLen; + MyPie(X1,Y1,X1+W,Y1+W, + nOrigoX,Y1,nOrigoX+Round(x),nOrigoY-Round(y)); +end; + + +Procedure TAABsoftGraph.MyPieLegend(nSeries: Integer); +var + I : Integer; + nTextHeight : LongInt; + nChars : Integer; +begin + {Count how many characters to show in the separate legend} + nChars := Round(FLegendWidth / MyTextWidth('1')); + {Decrease the value due to the color box shown} + if (nChars>4) then nChars := nChars-4; + + MySmallGraphFont; + nTextHeight := Round(MyTextHeight('Mg')*1.2); + + if FShowLegend then + begin + MyColorRectangle(0, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+6, + GraphToShow^.nYStartOffset+1*nTextHeight+6+4, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+FLegendWidth+6, + GraphToShow^.nYStartOffset+(GraphToShow^.nXValueCount+1)*nTextHeight+6+4); + MyColorRectangle(-1, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+3, + GraphToShow^.nYStartOffset+1*nTextHeight+3+4, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+FLegendWidth+3, + GraphToShow^.nYStartOffset+(GraphToShow^.nXValueCount+1)*nTextHeight+3+4); + for I := 1 to GraphToShow^.nXValueCount do + begin + DrawSeriesColorBox(I,MyTextWidth('12')-2,nTextHeight-4, + GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+7, + GraphToShow^.nYStartOffset+I*nTextHeight+9); + SetFontColor(0); + MyLBTextOut(GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+7+MyTextWidth('12'), + GraphToShow^.nYStartOffset+I*nTextHeight+7, + Copy(GraphToShow^.nXLegendsValue[I],1,nChars)) + end; + end; +end; + + +function TAABsoftGraph.MyPt(AX, AY: Integer): TPoint; +begin + with Result do + begin + X := AX; + Y := AY; + end; +end; + + +procedure TAABsoftGraph.PlotSquare(x, y: Integer); +begin + MyPolygon([MyPt(x - GraphToShow^.PointSize, y - GraphToShow^.PointSize), + MyPt(x + GraphToShow^.PointSize, y - GraphToShow^.PointSize), + MyPt(x + GraphToShow^.PointSize, y + GraphToShow^.PointSize), + MyPt(x - GraphToShow^.PointSize, y + GraphToShow^.PointSize)]); +end; + + +procedure TAABsoftGraph.PlotCircle(x, y: Integer); +begin + MyEllipse(x - GraphToShow^.PointSize, + y - GraphToShow^.PointSize, + x + GraphToShow^.PointSize, + y + GraphToShow^.PointSize); +end; + + +procedure TAABsoftGraph.PlotDiamond(x, y: Integer); +begin + MyPolygon([MyPt(x, y - GraphToShow^.PointSize), + MyPt(x + GraphToShow^.PointSize, y), + MyPt(x, y + GraphToShow^.PointSize), + MyPt(x - GraphToShow^.PointSize, y)]); +end; + + +procedure TAABsoftGraph.PlotCross(x, y: Integer); +begin + MyDrawLine(x - GraphToShow^.PointSize, y, x + GraphToShow^.PointSize, y); + MyDrawLine(x, y - GraphToShow^.PointSize, x, y + GraphToShow^.PointSize); +end; + + +procedure TAABsoftGraph.ClearScreen; +begin + {Clear screen} + SetLineColor(-1); + MyColorRectangle(-1, + 0, + 0, + 3*GraphToShow^.nXStartOffset+GraphToShow^.nXEnd+FLegendWidth, + 5*GraphToShow^.nYStartOffset+GraphToShow^.nYEnd); {6} + SetRectangleColor(0); + SetLineColor(0); +end; + + +{NEW chart type!!!} +procedure TAABsoftGraph.MyDisplayAsDeltaAverage; +var + nXPixelGap : LongInt; + nYPixelGap : LongInt; + xOrigo : LongInt; + yOrigo : LongInt; + I,J : LongInt; + nTempyOrigo : LongInt; +begin + {new type of chart...} + ClearScreen; + + {Check graph values and correct if wrong. Actually not needed if there are no bugs} + if (GraphToShow^.nYValueCount>MAX_Y_LEGENDS) then + GraphToShow^.nYValueCount := MAX_Y_LEGENDS; + if (GraphToShow^.nYValueCount=0) then + GraphToShow^.nYValueCount := 1; + if (GraphToShow^.nXValueCount>MAX_VALUES) then + GraphToShow^.nXValueCount := MAX_VALUES; + if (GraphToShow^.nXValueCount=0) then + GraphToShow^.nXValueCount := 1; + if (GraphToShow^.nSeriesCount>MAX_SERIES) then + GraphToShow^.nSeriesCount := MAX_SERIES; + if (GraphToShow^.nYGap=0) then + GraphToShow^.nYGap := 1; + + nXPixelGap := Round((GraphToShow^.nYEnd-GraphToShow^.nYStartOffset) / + (GraphToShow^.nXValueCount)); + nYPixelGap := Round((GraphToShow^.nXEnd-GraphToShow^.nXStartOffset) / + (GraphToShow^.nYValueCount+1)); + + nTempyOrigo := GraphToShow^.nYOrigo; + GraphToShow^.nYOrigo := GraphToShow^.nYValueCount div 2; + + yOrigo := GraphToShow^.nXStartOffset + (nYPixelGap*GraphToShow^.nYOrigo); + xOrigo := GraphToShow^.nYStartOffset; + + {Create texts for y-axis} + for I := 1 to MAX_Y_LEGENDS do + GraphToShow^.nYLegendsValue[I] := IntToStr(Round(((I-1)-GraphToShow^.nYOrigo)*GraphToShow^.nYGap)); + + {Y-axis legends and lines...} + MyGraphFont; + for I := 1 to (GraphToShow^.nYValueCount+1) do + begin + MyLBTextOut(yOrigo + (nYPixelGap*((I-1)-GraphToShow^.nYOrigo)), + xOrigo+nXPixelGap*GraphToShow^.nXValueCount+2, + GraphToShow^.nYLegendsValue[I]); + MyDrawDotLine(yOrigo - (nYPixelGap*((I-1)-GraphToShow^.nYOrigo)), + xOrigo, + yOrigo - (nYPixelGap*((I-1)-GraphToShow^.nYOrigo)), + xOrigo + (nXPixelGap*(GraphToShow^.nXValueCount)) + ); + end; + + {Draw Y-axis} + MyMoveTo(GraphToShow^.nXStartOffset, xOrigo); + MyAxisLineTo(GraphToShow^.nXEnd, xOrigo); + {Draw second y-axis} + MyMoveTo(GraphToShow^.nXStartOffset, xOrigo+nXPixelGap*GraphToShow^.nXValueCount+1); + MyAxisLineTo(GraphToShow^.nXEnd, xOrigo+nXPixelGap*GraphToShow^.nXValueCount+1); + {Draw X-axis} + MyMoveTo(yOrigo, xOrigo); + MyAxisLineTo(yOrigo, xOrigo+nXPixelGap*GraphToShow^.nXValueCount+1); + + {X-axis legends...} + MyShowLegend(nXPixelGap,nYPixelGap); + + {Main Header} + MyHeader(GraphToShow^.strGraphHeader); + + {X axis header} + MyXHeader(nXPixelGap,nYPixelGap,GraphToShow^.strGraphXHeader); + + for I := 1 to GraphToShow^.nSeriesCount do + for J := 1 to GraphToShow^.nXValueCount do + if (GraphToShow^.nSeriesCount=1) then + MyColorRectangle(I, + yOrigo, + xOrigo+J*nXPixelGap+(I-1)*Round(nXPixelGap/(GraphToShow^.nSeriesCount+0.1))-nXPixelGap, + yOrigo+Round(((GraphToShow2^.nValue[I,J]-GraphToShow^.nAveValue[J])/ + GraphToShow^.nYGap)*nYPixelGap), + xOrigo+J*nXPixelGap+I*Round(nXPixelGap/(GraphToShow^.nSeriesCount+0.1))-nXPixelGap) + else + MyColorRectangle(I, + yOrigo, + xOrigo+J*nXPixelGap+(I-1)*Round(nXPixelGap/(GraphToShow^.nSeriesCount+0.5))-nXPixelGap, + yOrigo+Round(((GraphToShow2^.nValue[I,J]-GraphToShow^.nAveValue[J])/ + GraphToShow^.nYGap)*nYPixelGap), + xOrigo+J*nXPixelGap+I*Round(nXPixelGap/(GraphToShow^.nSeriesCount+0.5))-nXPixelGap); + GraphToShow^.nYOrigo := nTempyOrigo; +end; + + + +{***************************************************************************} +{ Device depended functions for the rest of this module...check for printer } +{ or check for metafile output! } +{***************************************************************************} + +Procedure TAABsoftGraph.MyHeader(strText: String); +var + LogFont : TLogFont; + hMetaFileFont : HFont; + SaveOldFileFont : THandle; + OldColor : TColorRef; +begin + MyHeaderFont; + MyCBTextOut(GraphToShow^.nXStartOffset + Round(GraphToShow^.nXEnd/2), + GraphToShow^.nYStartOffset - (MyTextHeight(strText) + 2), + strText); + MyGraphFont; +end; + + +Procedure TAABsoftGraph.MySmallGraphFont; +begin + if PrintInSession then + begin + Printer.Canvas.Brush.Color := clWhite; + Printer.Canvas.Font.Name := strLegendFontName; + Printer.Canvas.Font.Size := FLegendFontSize; + Printer.Canvas.Font.Color := FLegendFontColor; + end + else + begin + inherited Canvas.Brush.Color := clWhite; + inherited Canvas.Font.Name := strLegendFontName; + inherited Canvas.Font.Size := FLegendFontSize; + inherited Canvas.Font.Color := FLegendFontColor; + end; +end; + + +Procedure TAABsoftGraph.MyGraphFont; +begin + if PrintInSession then + begin + Printer.Canvas.Brush.Color := clWhite; + Printer.Canvas.Font.Name := strAxisFontName; + Printer.Canvas.Font.Size := FAxisFontSize; + Printer.Canvas.Font.Color := FAxisFontColor; + end + else + begin + inherited Canvas.Brush.Color := clWhite; + inherited Canvas.Font.Name := strAxisFontName; + inherited Canvas.Font.Size := FAxisFontSize; + inherited Canvas.Font.Color := FAxisFontColor; + end; +end; + + +Procedure TAABsoftGraph.MyHeaderFont; +begin + if PrintInSession then + begin + Printer.Canvas.Brush.Color := clWhite; + Printer.Canvas.Font.Name := strHeaderFontName; + Printer.Canvas.Font.Size := FHeaderFontSize; + Printer.Canvas.Font.Color := FHeaderFontColor; + end + else + begin + inherited Canvas.Brush.Color := clWhite; + inherited Canvas.Font.Name := strHeaderFontName; + inherited Canvas.Font.Size := FHeaderFontSize; + inherited Canvas.Font.Color := FHeaderFontColor; + end; +end; + + +Procedure TAABsoftGraph.MyMoveTo(X,Y: Integer); +begin + if PrintInSession then + Printer.Canvas.MoveTo(X,Y) + else + inherited Canvas.MoveTo(X,Y); +end; + + +Procedure TAABsoftGraph.MyLineTo(X,Y: Integer); +begin + if PrintInSession then + Printer.Canvas.LineTo(X,Y) + else + inherited Canvas.LineTo(X,Y); +end; + + +Procedure TAABsoftGraph.MyThickLineTo(X,Y: Integer); +begin + if PrintInSession then + begin + Printer.Canvas.Pen.Width := FThickLineWidth; + Printer.Canvas.LineTo(X,Y); + Printer.Canvas.Pen.Width := 1; {restore} + end + else + begin + inherited Canvas.Pen.Width := FThickLineWidth; + inherited Canvas.LineTo(X,Y); + inherited Canvas.Pen.Width := 1; {restore} + end; +end; + + +Procedure TAABsoftGraph.MyAxisLineTo(X,Y: Integer); +begin + if PrintInSession then + begin + Printer.Canvas.Pen.Width := FAxisLineWidth; + Printer.Canvas.LineTo(X,Y); + Printer.Canvas.Pen.Width := 1; {restore} + end + else + begin + inherited Canvas.Pen.Width := FAxisLineWidth; + inherited Canvas.LineTo(X,Y); + inherited Canvas.Pen.Width := 1; {restore} + end; +end; + + +function TAABsoftGraph.MyTextWidth(strText : String): LongInt; +begin + if PrintInSession then + MyTextWidth := Printer.Canvas.TextWidth(strText) + else + MyTextWidth := inherited Canvas.TextWidth(strText); +end; + + +function TAABsoftGraph.MyTextHeight(strText : String): LongInt; +begin + if PrintInSession then + MyTextHeight := Printer.Canvas.TextHeight(strText) + else + MyTextHeight := inherited Canvas.TextHeight(strText); +end; + + +Procedure TAABsoftGraph.MyLBTextOut(X, Y: Integer; const Text: string); +begin + if PrintInSession then + Printer.Canvas.TextOut(X, Y+1, Text) + else + inherited Canvas.TextOut(X, Y+1, Text); +end; + + +Procedure TAABsoftGraph.MyCBTextOut(X, Y: Integer; const Text: string); +begin + if PrintInSession then + Printer.Canvas.TextOut(X-Round(Printer.Canvas.TextWidth(Text)/2), + Y+1, + Text) + else + inherited Canvas.TextOut(X-Round(inherited Canvas.TextWidth(Text)/2), + Y+1, + Text); +end; + + +Procedure TAABsoftGraph.MyRCTextOut(X, Y: Integer; const Text: string); +begin + if PrintInSession then + Printer.Canvas.TextOut(X-Printer.Canvas.TextWidth(Text), + Y-Round(Printer.Canvas.TextHeight(Text)/2), + Text) + else + inherited Canvas.TextOut(X-inherited Canvas.TextWidth(Text), + Y-Round(inherited Canvas.TextHeight(Text)/2), + Text); +end; + + +Procedure TAABsoftGraph.MyRectangle(X, Y, X2, Y2: Integer); +begin + if PrintInSession then + Printer.Canvas.Rectangle(X, Y, X2, Y2) + else + inherited Canvas.Rectangle(X, Y, X2, Y2); +end; + + +Procedure TAABsoftGraph.MyColorRectangle(Series : Integer; X, Y, X2, Y2: Integer); +begin + if PrintInSession then + begin + SetRectangleColor(Series); + Printer.Canvas.Rectangle(X, Y, X2, Y2); + end + else + begin + SetRectangleColor(Series); + inherited Canvas.Rectangle(X, Y, X2, Y2); + end; +end; + + +Procedure TAABsoftGraph.MyPie(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Longint); +begin + if PrintInSession then + Printer.Canvas.Pie(X1, Y1, X2, Y2, X3, Y3, X4, Y4) + else + inherited Canvas.Pie(X1, Y1, X2, Y2, X3, Y3, X4, Y4); +end; + + +Procedure TAABsoftGraph.MyArc(X1, Y1, X2, Y2, X3, Y3, X4, Y4: Integer); +begin + if PrintInSession then + Printer.Canvas.Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4) + else + inherited Canvas.Arc(X1, Y1, X2, Y2, X3, Y3, X4, Y4); +end; + + +Procedure TAABsoftGraph.MyPolygon(Points: array of TPoint); +begin + if PrintInSession then + Printer.Canvas.Polygon(Points) + else + inherited Canvas.Polygon(Points); +end; + + +Procedure TAABsoftGraph.MyEllipse(X1, Y1, X2, Y2: Integer); +begin + if PrintInSession then + Printer.Canvas.Ellipse(X1, Y1, X2, Y2) + else + inherited Canvas.Ellipse(X1, Y1, X2, Y2); +end; + + +procedure TAABsoftGraph.MyDrawLine(X1, Y1, X2, Y2: Integer); +begin + MyMoveTo(X1, Y1); + MyLineTo(X2, Y2); +end; + + +procedure TAABsoftGraph.MyDrawDotLine(X1, Y1, X2, Y2: Integer); +begin + SetDotLines; + MyMoveTo(X1, Y1); + MyLineTo(X2, Y2); + SetSolidLines; +end; + + +function TAABsoftGraph.GetSelectedScheme: Integer; +begin + GetSelectedScheme := FColorScheme; +end; + + +Procedure TAABsoftGraph.SetColorToScheme(nScheme,nIndex:Integer; nColor:TColor); +var + MyIni : TIniFile; +begin + {Default file is 'COMPASS.INI'} + MyIni := TIniFile.Create(strColorFile); + With MyIni do + WriteString('Scheme'+IntToStr(nScheme), + IntToStr(nIndex), + ColorToString(nColor)); + MyIni.Free; + if FAutoUpdateGraph then PlotGraph; +end; + + +Procedure TAABsoftGraph.SaveColorScheme(nScheme : Integer); +var + MyIni : TIniFile; + nIndex : Integer; +begin + {Default file is 'COMPASS.INI'} + MyIni := TIniFile.Create(strColorFile); + With MyIni do + for nIndex := 1 to MAX_SERIES do + WriteString('Scheme'+IntToStr(nScheme), + IntToStr(nIndex), + ColorToString(GetColorFromScheme(nScheme,nIndex))); + MyIni.Free; +end; + + +Function TAABsoftGraph.GetColorFromScheme(nScheme,nIndex : Integer): TColor; +var + MyIni : TIniFile; +begin + {Default file is 'COMPASS.INI'} + MyIni := TIniFile.Create(strColorFile); + With MyIni do + GetColorFromScheme := StringToColor(ReadString('Scheme'+IntToStr(nScheme), + IntToStr(nIndex), + GetDefaultColorString(nIndex))); + MyIni.Free; +end; + + +function TAABsoftGraph.GetDefaultColorString(nIndex : Integer): String; +begin + if (nIndex <= 10) then + begin + case nIndex of + -2: GetDefaultColorString := 'clWhite'; {MouseDownBox} + -1: GetDefaultColorString := 'clWhite'; + 0: GetDefaultColorString := 'clBlack'; + 1: GetDefaultColorString := 'clLime'; + 2: GetDefaultColorString := 'clBlue'; + 3: GetDefaultColorString := 'clRed'; + 4: GetDefaultColorString := 'clGreen'; + 5: GetDefaultColorString := 'clMaroon'; + 6: GetDefaultColorString := 'clOlive'; + 7: GetDefaultColorString := 'clSilver'; + 8: GetDefaultColorString := 'clTeal'; + 9: GetDefaultColorString := 'clBlack'; + 10: GetDefaultColorString := 'clAqua'; + end; + end + else + begin + GetDefaultColorString := '$00888888'; + end; +end; + + +Procedure TAABsoftGraph.SetFontColor(Series : Integer); +begin + if PrintInSession then + Printer.Canvas.Font.Color := GetColorFromScheme(GetSelectedScheme,Series) + else + inherited Canvas.Font.Color := GetColorFromScheme(GetSelectedScheme,Series); +end; + + +Procedure TAABsoftGraph.SetRectangleColor(Series : Integer); +begin + if PrintInSession then + Printer.Canvas.Brush.Color := GetColorFromScheme(GetSelectedScheme,Series) + else + inherited Canvas.Brush.Color := GetColorFromScheme(GetSelectedScheme,Series); +end; + + +Procedure TAABsoftGraph.SetLineColor(Series : Integer); +begin + if PrintInSession then + Printer.Canvas.Pen.Color := GetColorFromScheme(GetSelectedScheme,Series) + else + inherited Canvas.Pen.Color := GetColorFromScheme(GetSelectedScheme,Series); +end; + + +Procedure TAABsoftGraph.SetDotLines; +begin + if PrintInSession then + Printer.Canvas.Pen.Style := psDot + else + inherited Canvas.Pen.Style := psDot; +end; + + +Procedure TAABsoftGraph.SetSolidLines; +begin + if PrintInSession then + Printer.Canvas.Pen.Style := psSolid + else + inherited Canvas.Pen.Style := psSolid; +end; + + +Procedure TAABsoftGraph.GraphToClipboard; +begin + {This works with bitmaps at least...how to do it as a metafile?} + Clipboard.Assign(inherited Picture); +end; + + +Procedure TAABsoftGraph.ShowAsBar; +begin + GraphToShow^.nYOrigo := nOldYOrigo; + GraphToShow^.nYGap := nOldYGap; + GraphToShow^.nYValueCount := nOldYValueCount; + GraphToShow^.nGraphType := GRAPH_BAR; + PlotGraph; +end; + + +Procedure TAABsoftGraph.ShowAsStackedBar; +begin + if bContainsNegative then + begin + ShowMessage('Not supported for negative values.'); + exit; + end; + GraphToShow^.nYOrigo := nOldYOrigo; + GraphToShow^.nYGap := nOldYGap; + GraphToShow^.nYValueCount := nOldYValueCount; + GraphToShow^.nGraphType := GRAPH_STACKED_BAR; + PlotGraph; +end; + + +Procedure TAABsoftGraph.ShowAsLine; +begin + GraphToShow^.nYOrigo := nOldYOrigo; + GraphToShow^.nYGap := nOldYGap; + GraphToShow^.nYValueCount := nOldYValueCount; + GraphToShow^.nGraphType := GRAPH_LINE; + PlotGraph; +end; + + +Procedure TAABsoftGraph.ShowAsBarWithAve; +begin + GraphToShow^.nYOrigo := nOldYOrigo; + GraphToShow^.nYGap := nOldYGap; + GraphToShow^.nYValueCount := nOldYValueCount; + GraphToShow^.nGraphType := GRAPH_BAR_WITH_AVE; + PlotGraph; +end; + + +Procedure TAABsoftGraph.ShowAs100StackedBar; +begin + if bContainsNegative then + begin + ShowMessage('Not supported for negative values.'); + exit; + end; + if (GraphToShow^.nGraphType = GRAPH_STACKED_BAR_100) then exit; + GraphToShow^.nYOrigo := nOldYOrigo; + GraphToShow^.nYGap := nOldYGap; + GraphToShow^.nYValueCount := nOldYValueCount; + GraphToShow^.nGraphType := GRAPH_STACKED_BAR_100; + PlotGraph; +end; + + +Procedure TAABsoftGraph.ShowAsPie; +begin + if bContainsNegative then + begin + ShowMessage('Not supported for negative values.'); + exit; + end; + GraphToShow^.nYOrigo := nOldYOrigo; + GraphToShow^.nYGap := nOldYGap; + GraphToShow^.nYValueCount := nOldYValueCount; + if (GraphToShow^.nGraphType = GRAPH_PIE) then exit; + GraphToShow^.nGraphType := GRAPH_PIE; + PlotGraph; +end; + + +Procedure TAABsoftGraph.ShowAsLineWithMark; +begin + GraphToShow^.nYOrigo := nOldYOrigo; + GraphToShow^.nYGap := nOldYGap; + GraphToShow^.nYValueCount := nOldYValueCount; + GraphToShow^.nGraphType := GRAPH_LINE_WITH_MARK; + PlotGraph; +end; + + +Procedure TAABsoftGraph.ShowAsMark; +begin + GraphToShow^.nYOrigo := nOldYOrigo; + GraphToShow^.nYGap := nOldYGap; + GraphToShow^.nYValueCount := nOldYValueCount; + GraphToShow^.nGraphType := GRAPH_MARK; + PlotGraph; +end; + + +procedure TAABsoftGraph.ShowAsDeltaAverage; +begin + GraphToShow^.nYOrigo := nOldYOrigo; + GraphToShow^.nYGap := nOldYGap; + GraphToShow^.nYValueCount := nOldYValueCount; + GraphToShow^.nGraphType := GRAPH_DELTA_AVERAGE; + PlotGraph; +end; + + +function TAABsoftGraph.GetGraphType: integer; +begin + GetGraphType := GraphToShow^.nGraphType; +end; + + +Procedure TAABsoftGraph.ChangeXValuesWithSeries; +var + I,J : Integer; + nTempXValueCount : Integer; + nTempSeriesCount : Integer; + TempGraphToShow : ^TGraphToShow; + TempGraphToShow2 : ^TGraphToShow2; +begin + New(TempGraphToShow); + New(TempGraphToShow2); + {copy to temp....} + For I := 1 to MAX_VALUES do + TempGraphToShow^.nXLegendsValue[I] := GraphToShow^.nXLegendsValue[I]; + For I := 1 to MAX_SERIES do + TempGraphToShow^.nSeriesLegendsValue[I] := GraphToShow^.nSeriesLegendsValue[I]; + For I := 1 to MAX_SERIES do + For J := 1 to MAX_VALUES do + TempGraphToShow2^.nValue[I,J] := GraphToShow2^.nValue[I,J]; + TempGraphToShow^.nXValueCount := GraphToShow^.nXValueCount; + TempGraphToShow^.nSeriesCount := GraphToShow^.nSeriesCount; + {copy reversed back....} + For I := 1 to MAX_VALUES do + GraphToShow^.nXLegendsValue[I] := TempGraphToShow^.nSeriesLegendsValue[I]; + For I := 1 to MAX_SERIES do + GraphToShow^.nSeriesLegendsValue[I] := TempGraphToShow^.nXLegendsValue[I]; + For I := 1 to MAX_SERIES do + For J := 1 to MAX_VALUES do + GraphToShow2^.nValue[I,J] := TempGraphToShow2^.nValue[J,I]; + GraphToShow^.nXValueCount := TempGraphToShow^.nSeriesCount; + GraphToShow^.nSeriesCount := TempGraphToShow^.nXValueCount; + Dispose(TempGraphToShow); + Dispose(TempGraphToShow2); + {Necessary to count average line... as the old ones do no good} + CountGraphAverage; + PlotGraph; +end; + + +Procedure TAABsoftGraph.UsePFITemplate; +begin + GraphToShow^.nYGap := 1; + GraphToShow^.nYValueCount := 6; + GraphToShow^.nYOrigo := 0; + PlotGraph; +end; + + +Procedure TAABsoftGraph.UseICFTemplate; +begin + GraphToShow^.nYGap := 1; + GraphToShow^.nYValueCount := 6; + GraphToShow^.nYOrigo := 0; + PlotGraph; +end; + + +Procedure TAABsoftGraph.UseTLETemplate; +begin + GraphToShow^.nYGap := 1; + GraphToShow^.nYValueCount := 5; + GraphToShow^.nYOrigo := 0; + GraphToShow^.nGraphType := GRAPH_BAR; + PlotGraph; +end; + + +Procedure TAABsoftGraph.UseBMSTemplate; +begin + GraphToShow^.nYGap := 10; + GraphToShow^.nYValueCount := 10; + GraphToShow^.nYOrigo := 0; + GraphToShow^.nGraphType := GRAPH_BAR; + PlotGraph; +end; + + +Procedure TAABsoftGraph.UseEZTemplate; +begin + GraphToShow^.nYGap := 1; + GraphToShow^.nYValueCount := 7; + GraphToShow^.nYOrigo := 0; + GraphToShow^.nGraphType := GRAPH_BAR; + PlotGraph; +end; + + +Procedure TAABsoftGraph.UseJDSTemplate; +begin + GraphToShow^.nYGap := 1; + GraphToShow^.nYValueCount := 9; + GraphToShow^.nYOrigo := 0; + GraphToShow^.nGraphType := GRAPH_LINE; + PlotGraph; +end; + + +Procedure TAABsoftGraph.UseBackgroundTemplate; +begin + PlotGraph; + GraphToShow^.nYOrigo := 0; + GraphToShow^.nGraphType := GRAPH_STACKED_BAR_100; + PlotGraph; +end; + + +procedure Register; +begin + RegisterComponents('Samples', [TAABsoftGraph]); +end; + +end. diff --git a/lib/graph/AABGRAPH.TXT b/lib/graph/AABGRAPH.TXT new file mode 100644 index 00000000..d26091ec --- /dev/null +++ b/lib/graph/AABGRAPH.TXT @@ -0,0 +1,210 @@ +AABsoftGraph Delphi 16/32 Component (Version: 1.11) + +Purpose: +? Simple and small charts component like ChartFX +? Extremely easy to use (certainly easier than ChartFX) +? Includes some features not implemented in ChartFX +? But, just a small set of all the features implemented in ChartFX +? No need for a VBX or other add-on +? Works with Delphi 1.0 and Delphi 2.0 +? Source code included + +Installation: +? Install right component version, as any other Delphi component +? Component file is called: AABGRAPH.PAS +? Component installes under 'SAMPLES': AABsoftGraph (like TImage) + +Usage: +? Easisest way to find out, is to look at the Test-project included in this package +? It supports multiple series, colors, color schemes (up to 100 series * 100 values: 10.000 values) +? A lot of features are not demonstrated in the demo project +? Check out public procedures/properties in the interface description for other features +? You may also draw directly upon the finished graph (like TImage component) + +Main new features in version 1.11: +* Bug fix for AutoFormatGraph +* No compiled version supplied, only component source. + +Main new features in version 1.10: +? New chart type: DELTA_AVERAGE. call ShowAsDeltaAverage. Shows the DIFFERENCE between the values and the average line (average line is either calulated by the chart component or may be set by calling separate function) +? Procedure for printing the chart on open printer canvas: AddGraphToOpenPrintCanvas. May be used for ADDING the chart on other print job, for instance text report. +? New properties for setting the COLOR of the texts and legends +? DROPPED support for metafile clipboard format, as it did not work properly. +? Minor bug fixes in chart layouts, especially in the stacked 100 % bar chart. + +Main new features in version 1.05b (as in beta; as this metafile is still a bit unfinished, advice needed!): +? New procedure for copying the graph to the clipboard: GraphToClipboardAsMetaFile; +? Some other MINOR changes + +Main new features in version 1.02: +? New functions for retrieving information from the graph: +? New function GetValue(nSeries,nIndex:Integer): real; {*} +? New function GetYGap: real; {*} +? New function GetYGapCount: Integer; {*} +? New function GetHeader: String; {*} +? New function GetXAxisHeader: String; {*} +? New function GetSeriesLegend(nSeries: Integer) : String; {*} +? New function GetXLegend(nXValue:Integer) :String; {*} +? Improvement in the legend drawing function and mouse message/hint function. +? Minor bug fixes + +Main new features in version 1.01: +? New chart types: Line with Mark, Mark. Procedures: ShowAsLineWithMark, ShowAsMark +? A minor bug fix + +Main new features in version 1.00a: +? New procedure: SetYMaxMin(nMaxValue,nMinValue:real); A frequently asked feature for setting the maximum and minimum y-value of the chart. +? New property MouseInfo: old MouseEdit property splitted into MouseInfo and MouseEdit properties. MouseInfo enables the mouse values on the screen. The editing of the texts are enabled by MouseEdit +? A major bug fix: frees the memory allocated for the display graph at destruction of the component (in Windows 3.X, the memory used by the component was not released) +? Minor bug fixes including: mouse click values correctly mapped, chart legend font size change resizes the corresponding header area (large headers used to run of the screen) + +Main new features in version 0.72: +? No new features +? Minor bug fixes: AutoFormatGraph function on negative values, y-axis legend mapping, pie chart legend, etc +? New procedure: SetNegativeYGapCount(nValue:Integer); + +Main new features in version 0.7: +? Support for negative values +? Support PIE chart +? Extended font support (new procedures) +? Minor improvents features added in version 0.6 + +Main new features in version 0.6: +? Support for large graphs; 100 series * 100 values +? User mouse support: click on headers for editing texts, click on graph to see their actual values, drag left side of legend text box to resize it... +? New procedures for setting the graph fonts and color scheme settings file +? New property AxisLineWidth: line width for the xy-axis +? New property ThickLineWidth: line graph width +? New property MouseEdit: enabling user mouse support +? New property DefaultGraphType: default graph used by AutoFormatGraph +? New property DefaultYLegends: how many y-lines to display used by AutoFormatGraph +? New property LegendWidth: the width of the separate legend text box +? New property AutoUpdateGraph: updates the graph automatically when something is changed +? New property ShowLegend: whether or not to show the separate legend box +? New property HeaderFontSize: font size +? New property LegendFontSize: font size +? New property AxisFontSize: font size +? and lots of other minor improvements + +Future developments: +? I cannot promise to implement anything else, but if you send me a good idea and I have time to look into it, I might implement it. +? If any bugs are found; I'll try to fix them. +? Also if you find fix any bugs or improve the component, and you want to share them with other users, please send me your solution (including the changes to the source codes). I will release the improved component after some testing. I will give the credit to anyone supplying improvements, unless wished otherwise. + +Source codes: +? Due to huge interest in the previous source codes, I included in this package an encrypted zip file that contains the current source codes +? Current approved holders of the previous source codes, can email me to get the password for this file (same as in previous release) +? New users: if you want them, email me and explain to me your need for the source codes, I may give you the password for free (no commercial use allowed) +? If you need the source codes for commercial use (altering the component for a commercial use), I charge a fee of 80 US dollars. Current approved holders of previous source codes, may use the upgraded version of source codes. +? The source codes may NOT be transfered further to a third party or reselled + +Limitations: +? Maximum series count and value count is 100 (eg. 100*100). This is due to the Delphi 1.0 memory allocation limit of 64KB (100*100*real 6 bytes: is almost 64 Kb). This could be a lot higher in Delphi 2.0. +? Usually this limitation should be high enough for anyone +? Limitations can be changed in source code only. + +Warranty: +? None at all +? Use at your own risk + +You have comments, want source code or you need help: +? Send email to: moti@aabsoft.pp.fi +? Latest version, bug list and help is also available at my homepage: http://personal.eunet.fi/pp/aabsoft/ + + +unit Aabgraph; +interface +: +: +type + TAABsoftGraph = class(TImage) + private + : + : + protected + procedure MouseDown(Button: TMouseButton;Shift:TShiftState;X,Y:Integer); override; + procedure MouseUp(Button: TMouseButton;Shift:TShiftState;X,Y:Integer); override; + public + {Public declarations} + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + {General procedures for the graph...} + procedure ResetGraphModule; {Call this before totally new values and series} + procedure AutoFormatGraph; {Call this after new values} + procedure PlotGraph; {Update screen / draw graph to screen} + procedure PrintGraph; {Send picture to printer; all printing done by component} + procedure AddGraphToOpenPrintCanvas(XStartPos,YStartPos,GraphWidth,GraphHeight : LongInt); + {adds the graph to the "OPEN" printer canvas} + {printing control=outside this component; add other text etc} + procedure GraphToClipboard; {Puts picture on clipboard} + procedure UpdateGraphToScreen;{Call this after screen resize and after start up} + {Procedures to update graph values...} + procedure SetValue(nSeries,nIndex:Integer; nValue:real); {Values here!} + function GetValue(nSeries,nIndex:Integer): real; + procedure SetYGap(nValue:real); {Sets the vertical gap between dotted lines} + function GetYGap: real; + procedure SetYGapCount(nValue:Integer); {How many lines to display...} + function GetYGapCount: Integer; + procedure SetAverageLineValue(nIndex:Integer; nValue:real); {Overrides the values calculated by AutoFormatGraph} + procedure SetNegativeYGapCount(nValue:Integer); {How many lines on the negative side...} + procedure SetYMaxMin(nMaxValue,nMinValue:real); + {Procedures to update graph texts...} + procedure SetHeader(strHeader : String); + function GetHeader: String; + procedure SetXAxisHeader(strHeader : String); + function GetXAxisHeader: String; + procedure SetSeriesLegend(nSeries:Integer; strLegend:String); + function GetSeriesLegend(nSeries: Integer) : String; + procedure SetXLegend(nXValue:Integer; strLegend:String); + function GetXLegend(nXValue:Integer) :String; + procedure SetHeaderFontName(strFont:String); + procedure SetLegendFontName(strFont:String); + procedure SetAxisFontName(strFont:String); + function GetHeaderFontName : String; + function GetLegendFontName : String; + function GetAxisFontName : String; + {Display graph in different ways...} + procedure ShowAsBar; + procedure ShowAsStackedBar; + procedure ShowAsLine; + procedure ShowAsBarWithAve; + procedure ShowAs100StackedBar; + procedure ShowAsPie; + procedure ShowAsLineWithMark; + procedure ShowAsMark; + procedure ShowAsDeltaAverage; + function GetGraphType: integer; + procedure ChangeXValuesWithSeries; {Switches the x values with series! Resets AverageLine} + {Changes the color of the graph...} + procedure SetColorToScheme(nScheme,nIndex:Integer; nColor:TColor); + function GetColorFromScheme(nScheme,nIndex:Integer) : TColor; + procedure UseColorIniFile(strFileName : string); {COMPASS.INI if not used} + {These are for my own purpose...or why I did this in the first place} + procedure UsePFITemplate; + procedure UseICFTemplate; + procedure UseTLETemplate; + procedure UseBMSTemplate; + procedure UseEZTemplate; + procedure UseJDSTemplate; + procedure UseBackgroundTemplate; + published + { Published declarations } + property ColorScheme : Integer read FColorScheme write FColorScheme default 1; + property DefaultGraphType: Integer read FDefaultGraphType write FDefaultGraphType default 1; + property DefaultYLegends : Integer read FDefaultYLegends write FDefaultYLegends default DEFAULT_Y_LEGENDS; + property AutoUpdateGraph : Boolean read FAutoUpdateGraph write FAutoUpdateGraph default False; + property MouseEdit : Boolean read FMouseEdit write FMouseEdit default True; + property MouseInfo : Boolean read FMouseInfo write FMouseInfo default True; + property ShowLegend : Boolean read FShowLegend write FShowLegend default True; + property LegendWidth : Integer read FLegendWidth write FLegendWidth default 150; + property ThickLineWidth : Integer read FThickLineWidth write FThickLineWidth default 3; + property AxisLineWidth : Integer read FAxisLineWidth write FAxisLineWidth default 3; + property HeaderFontSize : Integer read FHeaderFontSize write FHeaderFontSize default DEFAULT_HEADER_FONT_SIZE; + property LegendFontSize : Integer read FLegendFontSize write FLegendFontSize default DEFAULT_LEGEND_FONT_SIZE; + property AxisFontSize : Integer read FAxisFontSize write FAxisFontSize default DEFAULT_AXIS_FONT_SIZE; + property HeaderFontColor : TColor read FHeaderFontColor write FHeaderFontColor default clNavy; + property LegendFontColor : TColor read FLegendFontColor write FLegendFontColor default clNavy; + property AxisFontColor : TColor read FAxisFontColor write FAxisFontColor default clNavy; + end; +: +: diff --git a/lib/graph/Aabgraph.dcu b/lib/graph/Aabgraph.dcu new file mode 100644 index 00000000..1b5c6664 Binary files /dev/null and b/lib/graph/Aabgraph.dcu differ diff --git a/lib/graph/DEMO/TEST.DPR b/lib/graph/DEMO/TEST.DPR new file mode 100644 index 00000000..47821885 --- /dev/null +++ b/lib/graph/DEMO/TEST.DPR @@ -0,0 +1,13 @@ +program Test; + +uses + Forms, + Test1 in 'TEST1.PAS' {Form1}; + +{$R *.RES} + + +begin + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/graph/DEMO/TEST.RES b/lib/graph/DEMO/TEST.RES new file mode 100644 index 00000000..ab743763 Binary files /dev/null and b/lib/graph/DEMO/TEST.RES differ diff --git a/lib/graph/DEMO/TEST1.DFM b/lib/graph/DEMO/TEST1.DFM new file mode 100644 index 00000000..c91939ca Binary files /dev/null and b/lib/graph/DEMO/TEST1.DFM differ diff --git a/lib/graph/DEMO/TEST1.PAS b/lib/graph/DEMO/TEST1.PAS new file mode 100644 index 00000000..81bc6314 --- /dev/null +++ b/lib/graph/DEMO/TEST1.PAS @@ -0,0 +1,292 @@ +{******************************************************************} +{ Demo program for AABsoftGraph component. } +{ (C) 1996 AABsoft and Mrten Henrichson } +{******************************************************************} + +unit Test1; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, ExtCtrls, Aabgraph, StdCtrls, Buttons, Spin; + +type + TForm1 = class(TForm) + Panel1: TPanel; + ButtonNewValues: TButton; + SpeedButton1: TSpeedButton; + SpeedButton2: TSpeedButton; + SpeedButton3: TSpeedButton; + SpeedButton4: TSpeedButton; + SpeedButton5: TSpeedButton; + SpeedButton6: TSpeedButton; + SpeedButton7: TSpeedButton; + SpeedButton8: TSpeedButton; + SpinEdit1: TSpinEdit; + LabelColorScheme: TLabel; + SpeedButton9: TSpeedButton; + ColorDialog1: TColorDialog; + Button2: TButton; + Button1: TButton; + Button3: TButton; + Panel2: TPanel; + SpeedButton10: TSpeedButton; + SpeedButton11: TSpeedButton; + FontDialog1: TFontDialog; + Button4: TButton; + AABsoftGraph1: TAABsoftGraph; + SpeedButton12: TSpeedButton; + SpeedButton14: TSpeedButton; + procedure ButtonNewValuesClick(Sender: TObject); + procedure SpeedButton1Click(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure SpeedButton2Click(Sender: TObject); + procedure SpeedButton4Click(Sender: TObject); + procedure SpeedButton3Click(Sender: TObject); + procedure SpeedButton5Click(Sender: TObject); + procedure SpeedButton6Click(Sender: TObject); + procedure SpeedButton7Click(Sender: TObject); + procedure SpeedButton8Click(Sender: TObject); + procedure SpinEdit1Change(Sender: TObject); + procedure SpeedButton9Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure SpeedButton10Click(Sender: TObject); + procedure SpeedButton11Click(Sender: TObject); + procedure Button4Click(Sender: TObject); + procedure FormActivate(Sender: TObject); + procedure SpeedButton12Click(Sender: TObject); + procedure SpeedButton14Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +procedure TForm1.ButtonNewValuesClick(Sender: TObject); +var + I : Integer; + nValueCount : Integer; +begin + Randomize; + nValueCount := 2+Random(8)*2; + AABsoftGraph1.ResetGraphModule; + for I := 1 to nValueCount do + begin + AABsoftGraph1.SetValue(1,I,(Random(I+2)+2)*5.74); + AABsoftGraph1.SetValue(2,I,(Random(I+4)+3)*8.34); + AABsoftGraph1.SetValue(3,I,(Random(I+6)+4)*10.0); + AABsoftGraph1.SetValue(4,I,(Random(I+6)+4)*10.0); + AABsoftGraph1.SetValue(5,I,(Random(I+6)+4)*10.0); + AABsoftGraph1.SetValue(6,I,(Random(I+6)+4)*10.0); + AABsoftGraph1.SetValue(7,I,(Random(I+6)+4)*10.0); + AABsoftGraph1.SetValue(8,I,(Random(I+6)+4)*10.0); + AABsoftGraph1.SetXLegend(I,'Result :' + IntToStr(I)); + end; + AABsoftGraph1.SetHeader('Main header!'); + AABsoftGraph1.SetSeriesLegend(1, 'First series'); + AABsoftGraph1.SetSeriesLegend(2, 'Second series'); + AABsoftGraph1.SetSeriesLegend(3, 'Third series'); + AABsoftGraph1.SetSeriesLegend(4, 'Third series'); + AABsoftGraph1.SetSeriesLegend(5, 'Third series'); + AABsoftGraph1.SetSeriesLegend(6, 'Third series'); + AABsoftGraph1.SetSeriesLegend(7, 'Third series'); + AABsoftGraph1.SetSeriesLegend(8, 'Third series'); + AABsoftGraph1.AutoFormatGraph; + if (not AABsoftGraph1.ShowLegend) then + begin + {if "100 values" button had been pressed, we restore legend} + AABsoftGraph1.ShowLegend := TRUE; + AABsoftGraph1.UpdateGraphToScreen; + end; +end; + +procedure TForm1.SpeedButton1Click(Sender: TObject); +begin + AABsoftGraph1.GraphToClipboard; +end; + +procedure TForm1.FormResize(Sender: TObject); +begin + AABsoftGraph1.UpdateGraphToScreen; +end; + +procedure TForm1.SpeedButton2Click(Sender: TObject); +begin + AABsoftGraph1.PrintGraph; +end; + +procedure TForm1.SpeedButton3Click(Sender: TObject); +begin + AABsoftGraph1.ShowAsBar; +end; + +procedure TForm1.SpeedButton4Click(Sender: TObject); +begin +{ AABsoftGraph1.ShowAsLine; this show it without marks} + AABsoftGraph1.ShowAsLineWithMark; +end; + +procedure TForm1.SpeedButton5Click(Sender: TObject); +begin + AABsoftGraph1.ShowAs100StackedBar; +end; + +procedure TForm1.SpeedButton6Click(Sender: TObject); +begin + AABsoftGraph1.ShowAsStackedBar; +end; + +procedure TForm1.SpeedButton7Click(Sender: TObject); +begin + AABsoftGraph1.ChangeXValuesWithSeries; +end; + +procedure TForm1.SpeedButton8Click(Sender: TObject); +begin + AABsoftGraph1.ShowAsBarWithAve; +end; + +procedure TForm1.SpeedButton10Click(Sender: TObject); +begin + AABsoftGraph1.ShowAsPie; +end; + +procedure TForm1.SpeedButton12Click(Sender: TObject); +begin + AABsoftGraph1.ShowAsMark; +end; + +procedure TForm1.SpinEdit1Change(Sender: TObject); +begin + AABsoftGraph1.ColorScheme := SpinEdit1.Value; + AABsoftGraph1.PlotGraph; +end; + +procedure TForm1.SpeedButton9Click(Sender: TObject); +var + strValue : String; + nSeries : Integer; +begin + {this is not very professionally done, + but it shows the basics how you can set the colors...} + nSeries := 1; + strValue := IntToStr(nSeries); + if InputQuery('Color for series','Series to change (1-100)?',strValue) then + begin + nSeries := StrToInt(strValue); + {ask the graph for the current color and set it as dialog default...} + ColorDialog1.Color := AABsoftGraph1.GetColorFromScheme(SpinEdit1.Value, + nSeries); + {ask the user for a new color...} + if ColorDialog1.Execute then + begin + {sets the new color...} + AABsoftGraph1.SetColorToScheme(SpinEdit1.Value, + nSeries, + ColorDialog1.Color); + {redraw the graph with new color...} + AABsoftGraph1.PlotGraph; + end; + end; +end; + +procedure TForm1.Button2Click(Sender: TObject); +begin + AABsoftGraph1.SetYGap(10); + AABsoftGraph1.SetYGapCount(15); + AABsoftGraph1.PlotGraph; +end; + +procedure TForm1.Button1Click(Sender: TObject); +begin + {this function demostrates a variety of other graph functions...} + AABsoftGraph1.SetHeaderFontName('Courier New'); + AABsoftGraph1.SetAxisFontName('Times New Roman'); + AABsoftGraph1.HeaderFontSize := 22; + AABsoftGraph1.AxisFontSize := 8; + AABsoftGraph1.LegendWidth := 65; + AABsoftGraph1.UpdateGraphToScreen; + Application.ProcessMessages; + AABsoftGraph1.SetXAxisHeader('This text is called: XAxisHeader...'); + AABsoftGraph1.SetAverageLineValue(1, 1.3); + AABsoftGraph1.SetAverageLineValue(2, 1.7); + AABsoftGraph1.SetAverageLineValue(3, 1.9); + AABsoftGraph1.SetAverageLineValue(4, 2.9); + AABsoftGraph1.ShowAsBarWithAve; +end; + +procedure TForm1.Button3Click(Sender: TObject); +var + I : Integer; + nValueCount : Integer; +begin + {This function demostrates how the component works with 3*100 values} + Randomize; + nValueCount := 100; + AABsoftGraph1.ResetGraphModule; + AABsoftGraph1.ThickLineWidth := 1; + AABsoftGraph1.ShowLegend := FALSE; + {must be called after ShowLegend changed} + AABsoftGraph1.UpdateGraphToScreen; + for I := 1 to nValueCount do + begin + AABsoftGraph1.SetValue(1,I,(Random(I+2)+2)*5.74); + AABsoftGraph1.SetValue(2,I,(Random(I+4)+3)*8.34); + AABsoftGraph1.SetValue(3,I,(Random(I+6)+4)*10.0); + if ((I mod 13)=0) then AABsoftGraph1.SetValue(4,I,I) else + AABsoftGraph1.SetValue(4,I,-(Random(I+6)+2)*2.0); + AABsoftGraph1.SetValue(5,I,-(Random(I+6)+2)*2.0); + end; + AABsoftGraph1.SetHeader('A lot of values!'); + AABsoftGraph1.SetSeriesLegend(1, 'First series'); + AABsoftGraph1.SetSeriesLegend(2, 'Second series'); + AABsoftGraph1.SetSeriesLegend(3, 'Third series'); + AABsoftGraph1.SetSeriesLegend(4, 'Forth series (neg)'); + AABsoftGraph1.SetSeriesLegend(5, 'Fifth series'); + AABsoftGraph1.SetXAxisHeader('This chart contains now 500 values.'); + AABsoftGraph1.AutoFormatGraph; + AABsoftGraph1.ShowASLine; +end; + +procedure TForm1.SpeedButton11Click(Sender: TObject); +begin + {Get the current font for the Header text...} + FontDialog1.Font.Size := AABsoftGraph1.HeaderFontSize; + FontDialog1.Font.Name := AABsoftGraph1.GetHeaderFontName; + if FontDialog1.Execute then + begin + {Set the font for the Header text...} + AABsoftGraph1.SetHeaderFontName(FontDialog1.Font.Name); + AABsoftGraph1.HeaderFontSize := FontDialog1.Font.Size; + end; + AABsoftGraph1.PlotGraph; +end; + +procedure TForm1.Button4Click(Sender: TObject); +begin + AABsoftGraph1.SetYMaxMin(50,10); + AABsoftGraph1.PlotGraph; +end; + +procedure TForm1.FormActivate(Sender: TObject); +begin + {This is needed for Win 3.X, as it does not send Resize message at startup} + AABsoftGraph1.UpdateGraphToScreen; +end; + +procedure TForm1.SpeedButton14Click(Sender: TObject); +begin + AABsoftGraph1.ShowAsDeltaAverage; +end; + +end. diff --git a/lib/graph/DEMO/TEST1.dcu b/lib/graph/DEMO/TEST1.dcu new file mode 100644 index 00000000..3dcccbbb Binary files /dev/null and b/lib/graph/DEMO/TEST1.dcu differ diff --git a/lib/hemi/HEMIBTN.DCR b/lib/hemi/HEMIBTN.DCR new file mode 100644 index 00000000..8041836b Binary files /dev/null and b/lib/hemi/HEMIBTN.DCR differ diff --git a/lib/hemi/HemiBtn.pas b/lib/hemi/HemiBtn.pas new file mode 100644 index 00000000..091d6e37 --- /dev/null +++ b/lib/hemi/HemiBtn.pas @@ -0,0 +1,970 @@ +unit Hemibtn; + +{* +** THemisphereButton implementation +** Copyright (c) 1997 Christian Schnell +** +** Author: Christian Schnell +** lulli@cs.tu-berlin.de +** http://www.cs.tu-berlin.de/~lulli +** +** History: +** +** .p00 [19970627cs] first release +** .p01 [19970801cs] [sub-release] +** removed MATH-usage, added functions ceil() and floor(). +** .p02 [19970814cs] [sub-release] +** added user-bitmap UserBitmap, lower left pixel is +** reserved for transparent color. +** .p03 [19970815cs] renamed UserBitmap to Glyph, added NumGlyphs, +** GlyphIndex +** stripped CalcImages, fixed: mouse events, default size +** added shaded glyphs +** [19970821cs] added GlyphMapped, AttenControl +** added arctan2 +** changed illumination model +** removed fColorBright, redDt, greenDt, blueDt +** renamed Pressed to Down +** added ParentShowHint, ShowHint +** .p04 [19970823cs] [sub-release] +** [19970825cs] added FaceShaded +** bmIn and bmOut now calculated in one step +** bug-fix: Glyph painting on odd width or height +** problem: ParentFont seems not possible, TControl.Font is +** protected (cannot access Parent.Font!) +** added FaceTransparent, GlyphTransparent +** .p05 [19970826cs] [sub-release] +** .p06 [19970831cs] added bmMask, background-clip-mask is now persistent +** calling Paint indirectly now (Invalidate), except SetDown +** right mouse click ignored now +** made changes for Delphi1 +** [sub-release] +** .p07 [19971006cs] 2nd release (as 2.0) +** OK for Delphi1, Delphi2 and Delphi3 +** .p08 [19971030cs] 3rd release (as 2.1) +** Bug-fix: +** - added fFont.Free in destructor +** - fixed Delphi1\HemiBtn.dcr (was bad in release 2.0) +** Changed: +** - New glyph for component-palette, note that if you +** are upgrading from release 2.0, you must reinstall +** the component to see the new image in your IDE. +*} + +interface + +uses + {$IFDEF VER80} + WinProcs, WinTypes, Menus, + {$ELSE} + Windows, + {$ENDIF} + SysUtils, Forms, Classes, Controls, Graphics; + +const + cDefaultColor = clGray; { default face color } + cDefaultWidth = 25; { default dimensions } + cDefaultHeight = 25; + cLightX = -0.5773502692; { vector to light-source, } + cLightY = -0.5773502692; { left-handed coordinate system } + cLightZ = 0.5773502692; { (points to upper-left corner, Windows-std.) } + +type + THemisphereBevel = (hbNone, hbLowered, hbRaised); + + THemisphereButton = class(TGraphicControl) + protected + faceRed, faceGreen, faceBlue : TColor; + bmUnpressed, bmPressed, bmMask, bmGlpyh: TBitmap; + oldWidth, oldHeight, fBevelWidth, fGroupIndex, + fNumGlyphs, fGlyphIndex: Integer; + GlyphValid, InMousePress, oldDown, + fDown, fAllowAllUp, fFaceShaded, fGlyphShaded, + fGlyphMapped, fGlyphTransparent, fFaceTransparent: Boolean; + fBorderColor, fFaceColor: TColor; + fOnClick, fOnDblClick: TNotifyEvent; + fBevelOuter, fBevelInner: THemisphereBevel; + fOnMouseDown, fOnMouseUp: TMouseEvent; + fOnMouseMove: TMouseMoveEvent; + fBorderStyle: TBorderStyle; + fAttenControl: Double; + fCaption: String; + fFont: TFont; + procedure CalcImages; + procedure DefineProperties(Filer: TFiler); override; + function InsideEllipse(X,Y: Integer): Boolean; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure Paint; override; + procedure ReadGlyphValid(Reader: TReader); + procedure ReadImageGlyph(Stream: TStream); + procedure ReadImageIn(Stream: TStream); + procedure ReadImageMask(Stream: TStream); + procedure ReadImageOut(Stream: TStream); + procedure RenderBorder(aCanvas: TCanvas; X0,Y0,X1,Y1, bevWidth: Integer; Raised: Boolean); + procedure RenderButtonFaces(nBorder: Integer; mskBorder, canvUp, canvDown: TCanvas); + procedure SetAllowAllUp(Value: Boolean); + procedure SetAttenControl(Value: Double); + procedure SetBevelInner(Value: THemisphereBevel); + procedure SetBevelOuter(Value: THemisphereBevel); + procedure SetBevelWidth(Value: Integer); + procedure SetBorderColor(Value: TColor); + procedure SetBorderStyle(Value: TBorderStyle); + procedure SetBounds(aLeft, aTop, aWidth, aHeight: Integer); override; + procedure SetCaption(Value: String); + procedure SetDown(Value: Boolean); + procedure SetFaceColor(Value: TColor); + procedure SetFaceShaded(Value: Boolean); + procedure SetFaceTransparent(Value: Boolean); + procedure SetFont(Value: TFont); + procedure SetGlyph(Value: TBitmap); + procedure SetGlyphIndex(Value: Integer); + procedure SetGlyphMapped(Value: Boolean); + procedure SetGlyphShaded(Value: Boolean); + procedure SetGlyphTransparent(Value: Boolean); + procedure SetNumGlyphs(Value: Integer); + procedure WriteGlyphValid(Writer: TWriter); + procedure WriteImageGlyph(Stream: TStream); + procedure WriteImageIn(Stream: TStream); + procedure WriteImageMask(Stream: TStream); + procedure WriteImageOut(Stream: TStream); + public + constructor Create(aOwner: TComponent); override; + destructor Destroy; override; + published + property Align; + property AllowAllUp: Boolean read fAllowAllUp write SetAllowAllUp; + property AttenControl: Double read fAttenControl write SetAttenControl; + property BevelInner: THemisphereBevel read fBevelInner write SetBevelInner; + property BevelOuter: THemisphereBevel read fBevelOuter write SetBevelOuter; + property BevelWidth: Integer read fBevelWidth write SetBevelWidth; + property BorderColor: TColor read fBorderColor write SetBorderColor; + property BorderStyle: TBorderStyle read fBorderStyle write SetBorderStyle; + property Caption: String read fCaption write SetCaption; + property Down: Boolean read fDown write SetDown; + property Enabled; + property FaceColor: TColor read fFaceColor write SetFaceColor; + property FaceShaded: Boolean read fFaceShaded write SetFaceShaded; + property FaceTransparent: Boolean read fFaceTransparent write SetFaceTransparent; + property Font: TFont read fFont write SetFont; + property Glyph: TBitmap read bmGlpyh write SetGlyph stored False; { We store it, TBitmap is buggy } + property GlyphIndex: Integer read fGlyphIndex write SetGlyphIndex; + property GlyphShaded: Boolean read fGlyphShaded write SetGlyphShaded; + property GlyphMapped: Boolean read fGlyphMapped write SetGlyphMapped; + property GlyphTransparent: Boolean read fGlyphTransparent write SetGlyphTransparent; + property GroupIndex: Integer read fGroupIndex write fGroupIndex; + property Hint; + property NumGlyphs: Integer read fNumGlyphs write SetNumGlyphs; + property OnClick: TNotifyEvent read fOnClick write fOnClick; + property OnDblClick: TNotifyEvent read fOnDblClick write fOnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDrag; + {$IFNDEF VER80} + property OnStartDrag; + {$ENDIF} + property OnMouseDown: TMouseEvent read fOnMouseDown write fOnMouseDown; + property OnMouseMove: TMouseMoveEvent read fOnMouseMove write fOnMouseMove; + property OnMouseUp: TMouseEvent read fOnMouseUp write fOnMouseUp; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property Visible; + end; + + procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('Rendered', [THemisphereButton]); +end; + +function Ceil(X: Double): Longint; +begin + Result := Trunc(X); + if Frac(X) > 0 then Inc(Result); +end; + +function Floor(X: Double): Longint; +begin + Result := Trunc(X); + if Frac(X) < 0 then Dec(Result); +end; + +function ArcTan2(Y, X: Double): Double; +assembler; + asm + FLD Y + FLD X + FPATAN + FWAIT +end; + +constructor THemisphereButton.Create(aOwner: TComponent); +begin + fFont := TFont.Create; + inherited Create(aOwner); + bmUnpressed := TBitmap.Create; + bmPressed := TBitmap.Create; + bmMask := TBitmap.Create; + bmGlpyh := TBitmap.Create; + oldWidth := -1; + oldHeight := -1; + fBevelWidth := 2; + fBevelInner := hbNone; + fBevelOuter := hbLowered; + fBorderStyle := bsNone; + fBorderColor := clGray; + fNumGlyphs := 1; + fGlyphIndex := 1; + fAttenControl := 1.0; + fFaceShaded := True; + fGlyphShaded := True; + fGlyphTransparent := True; + fFaceColor := cDefaultColor; + faceRed := cDefaultColor and $ff; + faceGreen := (cDefaultColor shr 8) and $ff; + faceBlue := (cDefaultColor shr 16) and $ff; + inherited SetBounds(Left, Top, cDefaultWidth, cDefaultHeight); +end; + +destructor THemisphereButton.Destroy; +begin + fFont.Free; + bmUnpressed.Free; + bmPressed.Free; + bmMask.Free; + bmGlpyh.Free; + inherited Destroy; +end; + +procedure THemisphereButton.ReadImageIn(Stream: TStream); +begin + bmPressed.LoadFromStream(Stream); +end; + +procedure THemisphereButton.ReadImageOut(Stream: TStream); +begin + bmUnpressed.LoadFromStream(Stream); +end; + +procedure THemisphereButton.ReadImageMask(Stream: TStream); +begin + bmMask.LoadFromStream(Stream); +end; + +procedure THemisphereButton.ReadImageGlyph(Stream: TStream); +begin + bmGlpyh.LoadFromStream(Stream); +end; + +procedure THemisphereButton.WriteImageIn(Stream: TStream); +begin + bmPressed.SaveToStream(Stream); +end; + +procedure THemisphereButton.WriteImageOut(Stream: TStream); +begin + bmUnpressed.SaveToStream(Stream); +end; + +procedure THemisphereButton.WriteImageMask(Stream: TStream); +begin + bmMask.SaveToStream(Stream); +end; + +procedure THemisphereButton.WriteImageGlyph(Stream: TStream); +begin + bmGlpyh.SaveToStream(Stream); +end; + +procedure THemisphereButton.ReadGlyphValid(Reader: TReader); +begin + GlyphValid := Reader.ReadBoolean; +end; + +procedure THemisphereButton.WriteGlyphValid(Writer: TWriter); +begin + Writer.WriteBoolean(GlyphValid); +end; + +procedure THemisphereButton.DefineProperties(Filer: TFiler); +begin + inherited DefineProperties(Filer); + Filer.DefineProperty('GlyphValid', ReadGlyphValid, WriteGlyphValid, True); + Filer.DefineBinaryProperty('ImageOut', ReadImageOut, WriteImageOut, True); + Filer.DefineBinaryProperty('ImageIn', ReadImageIn, WriteImageIn, True); + Filer.DefineBinaryProperty('ImageMask', ReadImageMask, WriteImageMask, True); + Filer.DefineBinaryProperty('ImageGlyph', ReadImageGlyph, WriteImageGlyph, GlyphValid); +end; + +procedure THemisphereButton.SetAllowAllUp(Value: Boolean); +var + i: Integer; +begin + if Value <> fAllowAllUp then begin + if (csLoading in ComponentState) or (GroupIndex = 0) then + fAllowAllUp := Value + else + for i:=0 to Owner.ComponentCount-1 do + if Owner.Components[i] is THemisphereButton then + if THemisphereButton(Owner.Components[i]).GroupIndex = GroupIndex then + THemisphereButton(Owner.Components[i]).fAllowAllUp := Value; + end; +end; + +procedure THemisphereButton.SetAttenControl(Value: Double); +begin + if fAttenControl <> Value then begin + fAttenControl := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetBevelWidth(Value: Integer); +begin + if (fBevelWidth <> Value) and (Value >= 1) then begin + fBevelWidth := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetBevelInner(Value: THemisphereBevel); +begin + if fBevelInner <> Value then begin + fBevelInner := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetBevelOuter(Value: THemisphereBevel); +begin + if fBevelOuter <> Value then begin + fBevelOuter := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetBorderColor(Value: TColor); +begin + if fBorderColor <> Value then begin + fBorderColor := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetBorderStyle(Value: TBorderStyle); +begin + if fBorderStyle <> Value then begin + fBorderStyle := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetBounds(aLeft, aTop, aWidth, aHeight: Integer); +begin + inherited SetBounds(aLeft, aTop, aWidth, aHeight); + if (aWidth <> oldWidth) or (aHeight <> oldHeight) then begin + if not (csLoading in ComponentState) then begin + CalcImages; + Invalidate; + end; + oldWidth := aWidth; + oldHeight := aHeight; + end; +end; + +procedure THemisphereButton.SetCaption(Value: String); +begin + if fCaption <> Value then begin + fCaption := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetDown(Value: Boolean); +begin + if fDown <> Value then begin + fDown := Value; + Paint; {Invalidate;} + end; +end; + +procedure THemisphereButton.SetFaceColor(Value: TColor); +begin + if fFaceColor <> Value then begin + faceBlue := (Value shr 16) and $ff; + faceGreen := (Value shr 8) and $ff; + faceRed := Value and $ff; + fFaceColor := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetFaceShaded(Value: Boolean); +begin + if fFaceShaded <> Value then begin + fFaceShaded := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetFaceTransparent(Value: Boolean); +begin + if fFaceTransparent <> Value then begin + fFaceTransparent := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetFont(Value: TFont); +begin + fFont.Assign(Value); + CalcImages; + Invalidate; +end; + +procedure THemisphereButton.SetGlyph(Value: TBitmap); +var + r: TRect; +begin + if bmGlpyh <> Value then begin + if Value = nil then + GlyphValid := False + else begin + GlyphValid := True; + bmGlpyh.Width := Value.Width; + bmGlpyh.Height := Value.Height; + r := Rect(0, 0, Value.Width, Value.Height); + bmGlpyh.Canvas.CopyRect(r, Value.Canvas, r); + if (bmGlpyh.Height<>0) and (bmGlpyh.Width mod bmGlpyh.Height=0) then + fNumGlyphs := bmGlpyh.Width div bmGlpyh.Height + else + fNumGlyphs := 1; + fGlyphIndex := 1; + end; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetGlyphIndex(Value: Integer); +begin + if (fGlyphIndex <> Value) and (Value > 0) and + ((csLoading in ComponentState) or (Value <= fNumGlyphs)) then begin + fGlyphIndex := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetGlyphMapped(Value: Boolean); +begin + if fGlyphMapped <> Value then begin + fGlyphMapped := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetGlyphShaded(Value: Boolean); +begin + if fGlyphShaded <> Value then begin + fGlyphShaded := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetGlyphTransparent(Value: Boolean); +begin + if fGlyphTransparent <> Value then begin + fGlyphTransparent := Value; + CalcImages; + Invalidate; + end; +end; + +procedure THemisphereButton.SetNumGlyphs(Value: Integer); +begin + if fNumGlyphs <> Value then begin + fNumGlyphs := Value; + CalcImages; + Invalidate; + end; +end; + +function THemisphereButton.InsideEllipse(X,Y: Integer): Boolean; +var + borderSz: Integer; + w2, h2: Double; +begin + w2 := Width/2; + h2 := Height/2; + borderSz := 0; + if fBevelOuter <> hbNone then inc(borderSz, fBevelWidth); + if fBevelInner <> hbNone then inc(borderSz, fBevelWidth); + Result := sqr((X-w2)/(w2-borderSz)) + sqr((Y-h2)/(h2-borderSz)) <= 1.0; +end; + +procedure THemisphereButton.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + if Enabled and InsideEllipse(X,Y) then begin + if Assigned(fOnMouseDown) then + fOnMouseDown(Self, Button, Shift, X, Y); + if (Button = mbLeft) then begin + InMousePress := True; + oldDown := Down; + Down := True; + if (ssDouble in Shift) and Assigned(fOnDblClick) then + fOnDblClick(Self); + end; + end; +end; + +procedure THemisphereButton.MouseMove(Shift: TShiftState; X, Y: Integer); +begin + if InMousePress and not oldDown then + Down := InsideEllipse(X,Y); + if Assigned(fOnMouseMove) then + fOnMouseMove(Self, Shift, X, Y); +end; + +procedure THemisphereButton.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +var + i: Integer; + aHb: THemisphereButton; +begin + if InMousePress then begin + InMousePress := False; + if InsideEllipse(X,Y) then begin + if Assigned(fOnClick) then + fOnClick(Self); + if GroupIndex = 0 then + Down := False + else begin + if not (not fAllowAllUp and oldDown) then begin + for i:=0 to Owner.ComponentCount-1 do + if (Owner.Components[i] is THemisphereButton) and + (Owner.Components[i] <> Self) then begin + aHb := THemisphereButton(Owner.Components[i]); + if aHb.GroupIndex = GroupIndex then + aHb.Down := False; + end; + Down := not oldDown; + end; + end; + end; + end; + if Assigned(fOnMouseUp) then + fOnMouseUp(Self, Button, Shift, X, Y); +end; + +procedure THemisphereButton.RenderBorder(aCanvas: TCanvas; X0,Y0,X1,Y1, bevWidth: Integer; Raised: Boolean); +var + cX, cY, Len2d, Len3d, dirX, dirY, dirZ: Double; + aGreyVal, nWayDelta: Longint; + + procedure SetPixel(X,Y: Integer; normX, normY, normZ: Double); + begin + aGreyVal := 128 + Round(128*(cLightX*normX + cLightY*normY + cLightZ*normZ)); + if aGreyVal > 255 then aGreyVal := 255 + else if aGreyVal < 0 then aGreyVal := 0; + aCanvas.Pixels[x,y] := (aGreyVal shl 16) or (aGreyVal shl 8) or aGreyVal; + end; + + procedure SetPixel4Way(X, Y: Integer); + begin + if (X=0) and (Y=0) then begin + SetPixel(0,0,0,0,1); + exit; + end; + Len2d := sqrt(sqr(X)+sqr(Y)); + Len3d := sqrt(sqr(X)+sqr(Y)+sqr(Len2d)); + dirX := -X/Len3d; + dirY := Y/Len3d; + dirZ := Len2d/Len3d; + if not Raised then begin + dirX := -dirX; + dirY := -dirY; + end; + SetPixel(Ceil(cX+X), Ceil(cY-Y), -dirX, -dirY, dirZ); { Right-Top } + SetPixel(Ceil(cX+X), Floor(cY+Y), -dirX, dirY, dirZ); { Right-Bottom } + SetPixel(Floor(cX-X), Floor(cY+Y), dirX, dirY, dirZ); { Left-Bottom } + SetPixel(Floor(cX-X), Ceil(cY-Y), dirX, -dirY, dirZ); { Left-Top } + end; + + procedure SetPixelNWay(X,Y: Integer); + var + i, j: Integer; + begin + for i := Y-nWayDelta to Y+nWayDelta do + for j := X-nWayDelta to X+nWayDelta do + SetPixel4Way(j, i); + end; + +var + a, b, x, y, a2, b2, d1, d2: Double; +begin + nWayDelta := 1 + Ceil(bevWidth/2); + a := (X1-X0-1) / 2; + b := (Y1-Y0-1) / 2; + cX := X0 + a; + cY := Y0 + b; + x := 0; + y := b; + a2 := sqr(a); + b2 := sqr(b); + d1 := b2 - a2*b + a2/4; + SetPixelNWay(Round(x), Round(y)); + while (a2*(y-0.5) > b2*(x+1)) do begin + if d1 < 0 then begin + d1 := d1 + b2*(2*x+3); + x := x + 1; + end else begin + d1 := d1 + b2*(2*x+3)+a2*(-2*y+2); + x := x + 1; + y := y - 1; + end; + SetPixelNWay(Round(x), Round(y)); + end; + d2 := b2*sqr(x+0.5)+a2*sqr(y-1)-a2*b2; + while y > 0 do begin + if d2 < 0 then begin + d2 := d2 + b2*(2*x+2)+a2*(-2*y+3); + x := x + 1; + y := y - 1; + end else begin + d2 := d2 + a2*(-2*y + 3); + y := y - 1; + end; + SetPixelNWay(Round(x), Round(y)); + end; +end; + +procedure THemisphereButton.RenderButtonFaces(nBorder: Integer; mskBorder, canvUp, canvDown: TCanvas); +var + glyWidth, glyHeight, glyXOfs, + x, y, xlen, ylen, x0, x1, y0, y1, + gX, gY, w, h: Integer; + cx, cy, Xe, Ye, Ze, atten: Double; + rr, gg, bb, rrr, ggg, bbb, transp, col: TColor; + isFromGlyph: Boolean; + + procedure SetFacePixel(pX, pY: Integer; normX, normY, normZ: Double); + function CalcRGBAtten: TColor; + begin + rrr := rr + Round(rr * atten); + ggg := gg + Round(gg * atten); + bbb := bb + Round(bb * atten); + if rrr < 0 then rrr := 0 else if rrr > 255 then rrr := 255; + if ggg < 0 then ggg := 0 else if ggg > 255 then ggg := 255; + if bbb < 0 then bbb := 0 else if bbb > 255 then bbb := 255; + Result := (bbb shl 16) or (ggg shl 8) or rrr; + end; + begin + isFromGlyph := false; + if GlyphValid then begin + if fGlyphMapped then begin + gX := Floor((glyWidth-1) * arctan2(normZ, -normX) / Pi); + gY := Floor((glyHeight-1) * arctan2(normZ, -normY) / Pi); + end else begin { map glyph 1:1 } + gX := Floor(glyWidth/2 + pX - cx); + gY := Floor(glyHeight/2 + pY - cy); + end; + { [gX, gY] inside glyph? } + if (gX>=0) and (gX=0) and (gY transp) then begin + rr := col and 255; + gg := (col shr 8) and 255; + bb := (col shr 16) and 255; + isFromGlyph := true; + end; + end; + end; + if not isFromGlyph then begin + if fFaceTransparent then begin + { enable pixels in bmMask only if not on Border } + if mskBorder.Pixels[pX, pY] <> clWhite then + bmMask.Canvas.Pixels[pX, pY] := clWhite; + exit; + end; + rr := faceRed; + gg := faceGreen; + bb := faceBlue; + end; + + if (not isFromGlyph and fFaceShaded) or (isFromGlyph and fGlyphShaded) then begin + atten := fAttenControl * (cLightX*normX + cLightY*normY + cLightZ*normZ); + canvUp.Pixels[pX, pY] := CalcRGBAtten; + atten := -atten; + canvDown.Pixels[pX, pY] := CalcRGBAtten; + end else begin + col := (bb shl 16) or (gg shl 8) or rr; + canvUp.Pixels[pX, pY] := col; + canvDown.Pixels[pX, pY] := col; + end; + end; + +begin + transp := bmGlpyh.Canvas.Pixels[0, bmGlpyh.Height-1]; + if GlyphValid then begin + glyHeight := bmGlpyh.Height; + if fNumGlyphs = 1 then begin + glyWidth := bmGlpyh.Width; + glyXOfs := 0; + end else begin + glyWidth := bmGlpyh.Width div fNumGlyphs; + glyXOfs := glyWidth * (fGlyphIndex-1); + end; + end; + cx := Width/2; + cy := Height/2; + w := Width - nBorder * fBevelWidth; + h := Height - nBorder * fBevelWidth; + ylen := Floor(h/2); + for y:=0 to ylen do begin + Ye := y/cy; + y0 := Floor(cy - y); + y1 := Ceil(cy + y); + xlen := Ceil(sqrt(1-sqr(Ye))*w/2); + if xlen > 1 then + for x:=0 to xlen do begin + Xe := x/cx; + Ze := 1-sqrt(sqr(Xe)+sqr(Ye)); + x0 := Floor(cx - x); + x1 := Ceil(cx + x); + SetFacePixel(x1,y0, Xe,-Ye,Ze); { Right-Top } + SetFacePixel(x1,y1, Xe, Ye,Ze); { Right-Bottom } + SetFacePixel(x0,y1, -Xe, Ye,Ze); { Left-Bottom } + SetFacePixel(x0,y0, -Xe,-Ye,Ze); { Left-Top } + end; + end; +end; + +procedure THemisphereButton.CalcImages; +var + r: TRect; + w, h, nBorder: Integer; + bmTmp, mskMiddle, mskInner, + bmDown, bmUp, bmBorderOuter, bmBorderInner: TBitmap; + + function NewBitmap(IsMask: Boolean): TBitmap; + begin + Result := TBitmap.Create; + Result.Width := w; + Result.Height := h; + if IsMask then begin + Result.Canvas.Brush.Color := clWhite; + Result.Canvas.FillRect(r); + Result.Canvas.Pen.Color := clBlack; + Result.Canvas.Brush.Color := clBlack; + end; + end; + + procedure DrawMasks; + { All masks (mskMiddle, mskInner and bmMask) contain white pixels + for background, black for foreground pixels. } + begin + if (fBevelOuter = hbNone) and (fBevelInner = hbNone) then + mskMiddle.Canvas.Ellipse(0,0,w,h) + else + mskMiddle.Canvas.Ellipse(fBevelWidth, fBevelWidth, w-fBevelWidth, h-fBevelWidth); + if (fBevelOuter = hbNone) or (fBevelInner = hbNone) then + mskInner.Canvas.CopyRect(r, mskMiddle.Canvas, r) + else + mskInner.Canvas.Ellipse(2*fBevelWidth, 2*fBevelWidth, w-fBevelWidth*2, h-fBevelWidth*2); + bmMask.Width := w; + bmMask.Height := h; + bmMask.Canvas.Brush.Color := clWhite; + bmMask.Canvas.FillRect(r); + bmMask.Canvas.Pen.Color := clBlack; + bmMask.Canvas.Brush.Color := clBlack; + bmMask.Canvas.Ellipse(0,0,w,h); + end; + + procedure DrawBorders; + var + ofs: Integer; + begin + nBorder := 0; + if (fBevelOuter = hbNone) and (fBevelInner = hbNone) then + exit; + if (fBevelOuter = hbNone) and (fBevelInner <> hbNone) then begin + nBorder := 1; + bmBorderOuter := NewBitmap(False); { inner border only } + ofs := Ceil(fBevelWidth / 2); + RenderBorder(bmBorderOuter.Canvas, ofs, ofs, w-ofs, h-ofs, fBevelWidth, fBevelInner = hbRaised); + bmBorderOuter.Canvas.CopyMode := cmSrcAnd; { clip to mskMiddle and !mskOuter } + bmBorderOuter.Canvas.CopyRect(r, mskMiddle.Canvas, r); + end else begin + if (fBevelOuter <> hbNone) then begin { outer border } + inc(nBorder); + bmBorderOuter := NewBitmap(False); + ofs := Floor(fBevelWidth / 2); + RenderBorder(bmBorderOuter.Canvas, ofs, ofs, w-ofs, h-ofs, fBevelWidth, fBevelOuter = hbRaised); + bmBorderOuter.Canvas.CopyMode := cmSrcAnd; { clip to mskMiddle and !mskOuter } + bmBorderOuter.Canvas.CopyRect(r, mskMiddle.Canvas, r); + end; + if (fBevelInner <> hbNone) then begin { inner border } + inc(nBorder); + bmBorderInner := NewBitmap(False); + ofs := Ceil(fBevelWidth + fBevelWidth/2); + RenderBorder(bmBorderInner.Canvas, ofs, ofs, w-ofs, h-ofs, fBevelWidth, fBevelInner = hbRaised); + bmBorderInner.Canvas.CopyMode := cmSrcAnd; { clip to mskInner and !mskMiddle } + bmBorderInner.Canvas.CopyRect(r, mskInner.Canvas, r); + if (fBevelOuter <> hbNone) then begin + bmTmp.Canvas.CopyMode := cmNotSrcCopy; { invert & copy } + bmTmp.Canvas.CopyRect(r, mskMiddle.Canvas, r); + bmBorderInner.Canvas.CopyRect(r, bmTmp.Canvas, r); + end; + end; + end; + end; + + procedure DrawCaption; + var + tx, ty: Integer; + begin + if fCaption = '' then + exit; + bmUp.Canvas.Font.Assign(Font); + bmDown.Canvas.Font.Assign(Font); + bmUp.Canvas.Brush.Style := bsClear; + bmDown.Canvas.Brush.Style := bsClear; + tx := Round((w-2 - bmUp.Canvas.TextWidth(fCaption))/2); + ty := Round((h-2 - bmUp.Canvas.TextHeight(fCaption))/2); + bmUp.Canvas.TextOut(tx, ty, fCaption); + bmDown.Canvas.TextOut(tx, ty, fCaption); + if fFaceTransparent then begin { paint the caption (in black) into bmMask } + bmMask.Canvas.Font.Assign(Font); + bmMask.Canvas.Font.Color := clBlack; + bmMask.Canvas.Brush.Style := bsClear; + bmMask.Canvas.TextOut(tx, ty, fCaption); + end; + end; + + procedure CombineImages; + var + ofs: Integer; + begin + bmTmp.Width := w; + bmTmp.Height := h; + bmTmp.Canvas.CopyMode := cmNotSrcCopy; { invert & copy } + bmTmp.Canvas.CopyRect(r, mskInner.Canvas, r); + if nBorder > 0 then begin { clip buttons to !mskInner } + bmUp.Canvas.CopyMode := cmSrcAnd; + bmUp.Canvas.CopyRect(r, bmTmp.Canvas, r); + bmDown.Canvas.CopyMode := cmSrcAnd; + bmDown.Canvas.CopyRect(r, bmTmp.Canvas, r); + end; + + bmUnpressed.Width := w; bmUnpressed.Height := h; + bmUnpressed.Canvas.CopyMode := cmSrcCopy; + bmUnpressed.Canvas.CopyRect(r, bmUp.Canvas, r); + bmUnpressed.Canvas.CopyMode := cmSrcPaint; { OR } + bmPressed.Width := w; bmPressed.Height := h; + bmPressed.Canvas.CopyMode := cmSrcCopy; + bmPressed.Canvas.CopyRect(r, bmDown.Canvas, r); + bmPressed.Canvas.CopyMode := cmSrcPaint; + if bmBorderOuter <> nil then begin + bmUnpressed.Canvas.CopyRect(r, bmBorderOuter.Canvas, r); + bmPressed.Canvas.CopyRect(r, bmBorderOuter.Canvas, r); + end; + if bmBorderInner <> nil then begin + bmUnpressed.Canvas.CopyRect(r, bmBorderInner.Canvas, r); + bmPressed.Canvas.CopyRect(r, bmBorderInner.Canvas, r); + end; + if fBorderStyle = bsSingle then begin + ofs := nBorder*fBevelWidth; + bmUnpressed.Canvas.Pen.Color := fBorderColor; + bmUnpressed.Canvas.Brush.Style := bsClear; + bmUnpressed.Canvas.Ellipse(ofs, ofs, bmUnpressed.Width-ofs, bmUnpressed.Height-ofs); + bmPressed.Canvas.Pen.Color := fBorderColor; + bmPressed.Canvas.Brush.Style := bsClear; + bmPressed.Canvas.Ellipse(ofs, ofs, bmPressed.Width-ofs, bmPressed.Height-ofs); + end; + end; + +begin + w := Width; + h := Height; + if (csLoading in ComponentState) or (w < 2) or (h < 2) then + exit; + r := Rect(0,0,w,h); + bmTmp := nil; mskMiddle := nil; mskInner := nil; bmDown := nil; bmUp := nil; + bmBorderOuter := nil; bmBorderInner := nil; + try + bmTmp := NewBitmap(False); + bmDown := NewBitmap(False); + bmUp := NewBitmap(False); + mskMiddle := NewBitmap(True); + mskInner := NewBitmap(True); + + DrawMasks; + DrawBorders; + RenderButtonFaces(nBorder, mskInner.Canvas, bmUp.Canvas, bmDown.Canvas); + DrawCaption; + + CombineImages; + finally + bmTmp.Free; mskMiddle.Free; mskInner.Free; bmDown.Free; bmUp.Free; + bmBorderOuter.Free; bmBorderInner.Free; + end; +end; + +procedure THemisphereButton.Paint; +var + r: TRect; + w, h: Integer; + bmBuf, bmTmp: TBitmap; +begin + if csLoading in ComponentState then + exit; + w := bmMask.Width; + h := bmMask.Height; + r := Rect(0, 0, w, h); + bmTmp := nil; + bmBuf := nil; + try + bmBuf := TBitmap.Create; + bmBuf.Width := w; + bmBuf.Height := h; + bmBuf.Canvas.CopyMode := cmSrcCopy; + bmBuf.Canvas.CopyRect(r, Canvas, r); + bmBuf.Canvas.CopyMode := cmSrcAnd; + bmBuf.Canvas.CopyRect(r, bmMask.Canvas, r); { bmBuf contains erased background } + + bmTmp := TBitmap.Create; + bmTmp.Width := w; + bmTmp.Height := h; + bmTmp.Canvas.CopyRect(r, bmMask.Canvas, r); + bmTmp.Canvas.CopyMode := cmSrcErase; { NOT self AND other } + if fDown then bmTmp.Canvas.CopyRect(r, bmPressed.Canvas, r) + else bmTmp.Canvas.CopyRect(r, bmUnpressed.Canvas, r); + bmBuf.Canvas.CopyMode := cmSrcPaint; { self OR other } + bmBuf.Canvas.CopyRect(r, bmTmp.Canvas, r); + + Canvas.CopyRect(r, bmBuf.Canvas, r); + finally + bmTmp.Free; + bmBuf.Free; + end; +end; + +end. diff --git a/lib/hemi/Hemibtn.dcu b/lib/hemi/Hemibtn.dcu new file mode 100644 index 00000000..1d53d242 Binary files /dev/null and b/lib/hemi/Hemibtn.dcu differ diff --git a/lib/hemi/Project1.dpr b/lib/hemi/Project1.dpr new file mode 100644 index 00000000..b84b3f52 --- /dev/null +++ b/lib/hemi/Project1.dpr @@ -0,0 +1,13 @@ +program Project1; + +uses + Forms, + unit1 in 'unit1.pas' {Form1}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/hemi/Project2.dpr b/lib/hemi/Project2.dpr new file mode 100644 index 00000000..396f6058 --- /dev/null +++ b/lib/hemi/Project2.dpr @@ -0,0 +1,13 @@ +program Project2; + +uses + Forms, + Unit2 in 'Unit2.pas' {Form1}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/hemi/Unit1.dcu b/lib/hemi/Unit1.dcu new file mode 100644 index 00000000..0b718274 Binary files /dev/null and b/lib/hemi/Unit1.dcu differ diff --git a/lib/hemi/Unit2.dfm b/lib/hemi/Unit2.dfm new file mode 100644 index 00000000..1842a58f Binary files /dev/null and b/lib/hemi/Unit2.dfm differ diff --git a/lib/hemi/Unit2.pas b/lib/hemi/Unit2.pas new file mode 100644 index 00000000..463757cd --- /dev/null +++ b/lib/hemi/Unit2.pas @@ -0,0 +1,25 @@ +unit Unit2; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Hemibtn; + +type + TForm1 = class(TForm) + HemisphereButton1: THemisphereButton; + private + { Private-Deklarationen } + public + { Public-Deklarationen } + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +end. diff --git a/lib/hemi/pHemibtn.dcp b/lib/hemi/pHemibtn.dcp new file mode 100644 index 00000000..7ae7e0e7 Binary files /dev/null and b/lib/hemi/pHemibtn.dcp differ diff --git a/lib/hemi/pHemibtn.dcu b/lib/hemi/pHemibtn.dcu new file mode 100644 index 00000000..2556be6c Binary files /dev/null and b/lib/hemi/pHemibtn.dcu differ diff --git a/lib/hemi/pHemibtn.dpk b/lib/hemi/pHemibtn.dpk new file mode 100644 index 00000000..73955739 --- /dev/null +++ b/lib/hemi/pHemibtn.dpk @@ -0,0 +1,35 @@ +package pHemibtn; + +{$R *.RES} +{$R 'HemiBtn.dcr'} +{$ALIGN ON} +{$ASSERTIONS OFF} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS OFF} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'THemisphereButton implementation'} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + HemiBtn; + +end. diff --git a/lib/hemi/pHemibtn.dpl b/lib/hemi/pHemibtn.dpl new file mode 100644 index 00000000..0d821db7 Binary files /dev/null and b/lib/hemi/pHemibtn.dpl differ diff --git a/lib/hemi/pHemibtn.res b/lib/hemi/pHemibtn.res new file mode 100644 index 00000000..36f26e23 Binary files /dev/null and b/lib/hemi/pHemibtn.res differ diff --git a/lib/hemi/pHemibtn.~dp b/lib/hemi/pHemibtn.~dp new file mode 100644 index 00000000..215e3352 --- /dev/null +++ b/lib/hemi/pHemibtn.~dp @@ -0,0 +1,35 @@ +package pHemibtn; + +{$R *.RES} +{$R 'Hemibtn.dcr'} +{$ALIGN ON} +{$ASSERTIONS OFF} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS OFF} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'THemisphereButton implementation'} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + Hemibtn; + +end. diff --git a/lib/hemi/unit1.dfm b/lib/hemi/unit1.dfm new file mode 100644 index 00000000..9230b629 Binary files /dev/null and b/lib/hemi/unit1.dfm differ diff --git a/lib/hemi/unit1.pas b/lib/hemi/unit1.pas new file mode 100644 index 00000000..35af6745 --- /dev/null +++ b/lib/hemi/unit1.pas @@ -0,0 +1,65 @@ +unit Unit1; + +interface + +uses + Classes, Graphics, Forms, Controls, HemiBtn, ExtCtrls, StdCtrls, Buttons, Dialogs, SysUtils; + +type + TForm1 = class(TForm) + Panel2: TPanel; + Edit1: TEdit; + HemisphereButton1: THemisphereButton; + HemisphereButton2: THemisphereButton; + HemisphereButton3: THemisphereButton; + HemisphereButton4: THemisphereButton; + HemisphereButton8: THemisphereButton; + HemisphereButton9: THemisphereButton; + HemisphereButton10: THemisphereButton; + HemisphereButton14: THemisphereButton; + HemisphereButton15: THemisphereButton; + HemisphereButton16: THemisphereButton; + HemisphereButton5: THemisphereButton; + HemisphereButton6: THemisphereButton; + HemisphereButton7: THemisphereButton; + HemisphereButton18: THemisphereButton; + HemisphereButton19: THemisphereButton; + HemisphereButton20: THemisphereButton; + HemisphereButton21: THemisphereButton; + HemisphereButton22: THemisphereButton; + HemisphereButton23: THemisphereButton; + HemisphereButton24: THemisphereButton; + HemisphereButton25: THemisphereButton; + HemisphereButton26: THemisphereButton; + HemisphereButton27: THemisphereButton; + HemisphereButton31: THemisphereButton; + HemisphereButton32: THemisphereButton; + HemisphereButton11: THemisphereButton; + HemisphereButton12: THemisphereButton; + procedure OnDigitClick(Sender: TObject); + procedure HemisphereButton1Click(Sender: TObject); + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +procedure TForm1.OnDigitClick(Sender: TObject); +var + aChar: char; +begin + if TControl(Sender).Tag < 10 then begin + aChar := char(48+TControl(Sender).Tag); + Edit1.Text := Edit1.Text + aChar; + end; +end; + +procedure TForm1.HemisphereButton1Click(Sender: TObject); +begin + ShowMessage('Author:'+#13+#13+'Christian Schnell'+#13+'lulli@cs.tu-berlin.de'); +end; + +end. diff --git a/lib/ics/Bcb1/DelBcb1.mak b/lib/ics/Bcb1/DelBcb1.mak new file mode 100644 index 00000000..4a75d943 --- /dev/null +++ b/lib/ics/Bcb1/DelBcb1.mak @@ -0,0 +1,77 @@ +# --------------------------------------------------------------------------- +# +# ICS - Internet Component Suite +# +# C++ Builder 1 automated construction V1.00 +# (c) 1997-2000 by Francois PIETTE +# http://www.rtfm.be/fpiette/indexuk.htm +# francois.piette@swing.be francois.piette@rtfm.be +# +# You must change BCB_PATH and ICS_PATH below to fit your system. +# +# Remember to install all components in BCB1 ! +# Remember to use BCB1 to open all forms and +# ignore Font.CharSet and OldCreateOrder properties +# +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB_PATH +BCB_PATH = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +!ifndef ICS_PATH +ICS_PATH = d:\fpiette +!endif +# --------------------------------------------------------------------------- +ICSVCL = $(ICS_PATH)\delphi\vc32 +# --------------------------------------------------------------------------- +HPPFILES = wsocket.hpp wsockbuf.hpp httpprot.hpp ftpcli.hpp wait.hpp emulvt.hpp tncnx.hpp \ + tnoptfrm.hpp tnemulvt.hpp tnscript.hpp fingcli.hpp nntpcli.hpp icmp.hpp \ + ping.hpp ftpsrvc.hpp ftpsrvt.hpp ftpsrv.hpp smtpprot.hpp md5.hpp pop3prot.hpp \ + MimeDec.hpp DnsQuery.hpp WSocketS.hpp HttpSrv.hpp wait.hpp +OBJFILES = wsocket.obj wsockbuf.obj httpprot.obj ftpcli.obj wait.obj emulvt.obj tncnx.obj \ + tnoptfrm.obj tnemulvt.obj tnscript.obj fingcli.obj nntpcli.obj icmp.obj \ + ping.obj ftpsrvc.obj ftpsrvt.obj ftpsrv.obj smtpprot.obj md5.obj pop3prot.obj \ + MimeDec.obj DnsQuery.obj WSocketS.obj HttpSrv.obj wait.obj formpos.obj +RESFILES = +RESDEPEN = +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -I$(ICS_PATH)\cpp\internet;$(ICSVCL);$(BCB_PATH)\include;$(BCB_PATH)\include\vcl \ + -H=$(BCB_PATH)\lib\vcld.csm +PFLAGS = -U$(ICS_PATH)\cpp\internet;$(ICSVCL);$(BCB_PATH)\lib\obj;$(BCB_PATH)\lib \ + -I$(ICS_PATH)\cpp\internet;$(ICSVCL);$(BCB_PATH)\include;$(BCB_PATH)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -i$(ICS_PATH)\cpp\internet;$(ICSVCL);$(BCB_PATH)\include;$(BCB_PATH)\include\vcl +LFLAGS = -L$(ICS_PATH)\cpp\internet;$(ICSVCL);$(BCB_PATH)\lib\obj;$(BCB_PATH)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +all: $(HPPFILES) $(OBJFILES) + +.pas.hpp: + $(BCB_PATH)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB_PATH)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB_PATH)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB_PATH)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB_PATH)\BIN\brcc32 $(RFLAGS) $< + diff --git a/lib/ics/Bcb1/IcsBcb1.bat b/lib/ics/Bcb1/IcsBcb1.bat new file mode 100644 index 00000000..1499b08e --- /dev/null +++ b/lib/ics/Bcb1/IcsBcb1.bat @@ -0,0 +1,45 @@ +@echo off +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * +REM * * +REM * ICS - Internet Component Suite * +REM * * +REM * C++ Builder 1 automated construction V1.00 * +REM * (c) 1997-2000 by Francois PIETTE * +REM * http://www.rtfm.be/fpiette/indexuk.htm * +REM * francois.piette@swing.be francois.piette@rtfm.be * +REM * * +REM * You must change PATH, BCB_PATH, ICS_DRIVE and * +REM * ICS_PATH below to fit your system. * +REM * * +REM * Remember to install all components in BCB1 ! * +REM * Remember to use BCB1 to open all forms and * +REM * ignore Font.CharSet and OldCreateOrder properties * +REM * * +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * + +SET BCB_PATH=C:\PROGRA~1\BORLAND\BCB1 +SET ICS_DRIVE=D: +SET ICS_PATH=%ICS_DRIVE%\FPIETTE + +PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;%BCB_PATH%\BIN + +REM Build components (Delphi code will produce OBJ and HPP files) +%ICS_DRIVE% +cd %ICS_PATH%\delphi\vc32 +make -B -f%ICS_PATH%\bcb1\delbcb1.mak +if errorlevel 1 goto error + +REM Build all projects +cd %ICS_PATH%\cpp\internet\bcb1 +make -B -f%ICS_PATH%\bcb1\IcsBcb1.mak +if errorlevel 1 goto error +goto done + +:error +@echo Compile error +goto done + +:done +@cd %ICS_PATH%\bcb1 + +:end diff --git a/lib/ics/Bcb1/IcsBcb1.mak b/lib/ics/Bcb1/IcsBcb1.mak new file mode 100644 index 00000000..68887222 --- /dev/null +++ b/lib/ics/Bcb1/IcsBcb1.mak @@ -0,0 +1,254 @@ +# --------------------------------------------------------------------------- +# +# ICS - Internet Component Suite +# +# C++ Builder 1 automated construction V1.00 +# (c) 1997-2000 by Francois PIETTE +# http://www.rtfm.be/fpiette/indexuk.htm +# francois.piette@swing.be francois.piette@rtfm.be +# +# You must change BCB_PATH and ICS_PATH below to fit your system. +# +# Remember to install all components in BCB1 ! +# Remember to use BCB1 to open all forms and +# ignore Font.CharSet and OldCreateOrder properties +# +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB_PATH +BCB_PATH = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +!ifndef ICS_PATH +ICS_PATH = d:\fpiette +!endif +# --------------------------------------------------------------------------- +ICSVCL = $(ICS_PATH)\delphi\vc32 +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -I$(ICS_PATH)\cpp\internet;$(ICS_PATH)\delphi\vc32;$(BCB_PATH)\include;$(BCB_PATH)\include\vcl \ + -H=$(BCB_PATH)\lib\vcld.csm +PFLAGS = -U$(ICS_PATH)\cpp\internet;$(ICSVCL);$(BCB_PATH)\lib\obj;$(BCB_PATH)\lib \ + -I$(ICS_PATH)\cpp\internet;$(ICSVCL);$(BCB_PATH)\include;$(BCB_PATH)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -i$(ICS_PATH)\cpp\internet;$(ICSVCL);$(BCB_PATH)\include;$(BCB_PATH)\include\vcl +LFLAGS = -L$(ICS_PATH)\cpp\internet;$(ICSVCL);$(BCB_PATH)\lib\obj;$(BCB_PATH)\lib \ + -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLLIB = vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +all: udpsend.exe udplstn.exe \ + twschat.exe tnsrv.exe tndemo.exe tnclient.exe tcpsrv.exe srvdemo.exe \ + sockstst.exe server5.exe sender.exe recv.exe pingtst.exe newsrdr.exe \ + mtsrv.exe mailsnd.exe httptst.exe httppg.exe ftptst.exe ftpserv.exe \ + concli1.exe concli2.exe clidemo.exe client5.exe client7.exe finger.exe + +# Some projects have not been ported to BCB1. See Delphi source code :-( +# dlltst1.exe dnslook.exe dynCli.exe ftpthrd.exe httpasp.exe httpasy.exe +# httpchk.exe httpdmo.exe httpget.exe httpthrd.exe icsdll1.exe mailrcv.exe +# mailrob.exe md5test.exe mimedemo.exe mimetst.exe nslookup.exe pop3mime.exe +# srvtcp.exe webserv.exe + +udpsend.exe: udpsend.obj ..\udpsend1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +udplstn.exe: udplstn.obj ..\udplstn1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +twschat.exe: twschat.obj ..\twschat1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +tnsrv.exe: tnsrv.obj ..\tnsrv1.obj ..\tnsrv2.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +tnclient.exe: tnclient.obj ..\tncli1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj $(ICSVCL)\tncnx.obj $(ICSVCL)\tnoptfrm.obj $(ICSVCL)\formpos.obj, + + $@,,$(ALLLIB),,$&.res +! + +tndemo.exe: tndemo.obj ..\tndemo1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj $(ICSVCL)\tncnx.obj, + + $@,,$(ALLLIB),,$&.res +! + +tcpsrv.exe: tcpsrv.obj ..\tcpsrv1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +srvdemo.exe: srvdemo.obj ..\srvdemo1.obj ..\srvdemo2.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +sockstst.exe: sockstst.obj ..\socks1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +server5.exe: server5.obj ..\srv5.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +sender.exe: sender.obj ..\sender1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +recv.exe: recv.obj ..\recv1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +pingtst.exe: pingtst.obj ..\pingtst1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj $(ICSVCL)\ping.obj, + + $@,,$(ALLLIB),,$&.res +! + +newsrdr.exe: newsrdr.obj ..\newsrdr1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj $(ICSVCL)\nntpcli.obj, + + $@,,$(ALLLIB),,$&.res +! + +mtsrv.exe: mtsrv.obj ..\mtsrv1.obj ..\mtsrv2.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +mailsnd.exe: mailsnd.obj ..\mailsnd1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj $(ICSVCL)\smtpprot.obj, + + $@,,$(ALLLIB),,$&.res +! + +httppg.exe: httppg.obj ..\httppg1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj $(ICSVCL)\httpprot.obj, + + $@,,$(ALLLIB),,$&.res +! + +httptst.exe: httptst.obj ..\httptst1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj $(ICSVCL)\httpprot.obj, + + $@,,$(ALLLIB),,$&.res +! + +concli1.exe: concli1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -ap + + c0x32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),, +! + +concli2.exe: concli2.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -ap + + c0x32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),, +! + +clidemo.exe: clidemo.obj ..\clidemo1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +client5.exe: client5.obj ..\cli5.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +client7.exe: client7.obj ..\cli7.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj, + + $@,,$(ALLLIB),,$&.res +! + +finger.exe: finger.obj ..\finger1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj $(ICSVCL)\fingcli.obj, + + $@,,$(ALLLIB),,$&.res +! + +ftpserv.exe: ftpserv.obj ..\ftpsrv1.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj $(ICSVCL)\ftpsrv.obj, + + $@,,$(ALLLIB),,$&.res +! + +ftptst.exe: ftptst.obj ..\ftptst1.obj ..\ftptst2.obj + $(BCB_PATH)\BIN\$(LINKER) @&&! + $(LFLAGS) -aa + + c0w32.obj $** $(ICSVCL)\wsocket.obj $(ICSVCL)\ftpcli.obj, + + $@,,$(ALLLIB),,$&.res +! + +.pas.hpp: + $(BCB_PATH)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB_PATH)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB_PATH)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB_PATH)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB_PATH)\BIN\brcc32 $(RFLAGS) $< + diff --git a/lib/ics/Cpp/Internet/Bcb1/CliDemo.cpp b/lib/ics/Cpp/Internet/Bcb1/CliDemo.cpp new file mode 100644 index 00000000..b25a9ef2 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/CliDemo.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("CliDemo.res"); +USEFORM("..\CliDemo1.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/CliDemo.mak b/lib/ics/Cpp/Internet/Bcb1/CliDemo.mak new file mode 100644 index 00000000..d686bc30 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/CliDemo.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Clidemo.exe +OBJFILES = Clidemo.obj \FPiette\CPP\INTERNET\CliDemo1.obj +RESFILES = CliDemo.res +RESDEPEN = $(RESFILES) \FPiette\CPP\INTERNET\CliDemo1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Clidemo.res b/lib/ics/Cpp/Internet/Bcb1/Clidemo.res new file mode 100644 index 00000000..3228004f Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/Clidemo.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/Client5.cpp b/lib/ics/Cpp/Internet/Bcb1/Client5.cpp new file mode 100644 index 00000000..9019b7e2 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Client5.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("Client5.res"); +USEFORM("..\cli5.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Client5.mak b/lib/ics/Cpp/Internet/Bcb1/Client5.mak new file mode 100644 index 00000000..f83afa2f --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Client5.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Client5.exe +OBJFILES = Client5.obj \FPiette\cpp\Internet\cli5.obj +RESFILES = Client5.res +RESDEPEN = $(RESFILES) \FPiette\cpp\Internet\cli5.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Client5.res b/lib/ics/Cpp/Internet/Bcb1/Client5.res new file mode 100644 index 00000000..0786466c Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/Client5.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/Client7.cpp b/lib/ics/Cpp/Internet/Bcb1/Client7.cpp new file mode 100644 index 00000000..a02d1caf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Client7.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("Client7.res"); +USEFORM("..\Cli7.cpp", Cli7Form); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TCli7Form), &Cli7Form); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Client7.mak b/lib/ics/Cpp/Internet/Bcb1/Client7.mak new file mode 100644 index 00000000..7efe3f25 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Client7.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Client7.exe +OBJFILES = Client7.obj \FPiette\CPP\INTERNET\Cli7.obj +RESFILES = Client7.res +RESDEPEN = $(RESFILES) \FPiette\CPP\INTERNET\Cli7.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Client7.res b/lib/ics/Cpp/Internet/Bcb1/Client7.res new file mode 100644 index 00000000..e4f10ec0 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/Client7.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/ConCli1.cpp b/lib/ics/Cpp/Internet/Bcb1/ConCli1.cpp new file mode 100644 index 00000000..9a1084ad --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/ConCli1.cpp @@ -0,0 +1,85 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: ConCli shows how to use TWSocket in a console mode application. +EMail: francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: Nov 22, 1997 +Version: 1.02 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 12, 1998 V1.01 Adapted for BCB3 +Dec 19, 1998 V1.02 Do not use TWait control anymore. + +---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#include +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USEUNIT("wsocket.pas"); +USEUNIT("Wait.pas"); +//--------------------------------------------------------------------------- +#include +#include +//--------------------------------------------------------------------------- +void main(void) +{ + TWSocket *WSocket1; + AnsiString Buffer; + + WSocket1 = new TWSocket((void *)NULL); + WSocket1->Addr = "localhost"; + WSocket1->Port = "telnet"; + WSocket1->Proto = "tcp"; + WSocket1->Connect(); + // Connect is asynchronous (non-blocking). We will wait while the + // session is connecting or application terminated. + while (WSocket1->State == wsConnecting) { + Application->ProcessMessages(); + if (Application->Terminated) + break; + } + if (WSocket1->State == wsConnected) { + WSocket1->ReadLine(15, Buffer); + printf("Server banner is: %s\n", Buffer.c_str()); + WSocket1->Close(); + } + else { + printf("Connection failed.\n"); + } + delete WSocket1; + + printf("Hit enter..."); + getch(); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/Bcb1/ConCli1.mak b/lib/ics/Cpp/Internet/Bcb1/ConCli1.mak new file mode 100644 index 00000000..ca767ec8 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/ConCli1.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Concli1.exe +OBJFILES = Wait.obj wsocket.obj Concli1.obj +RESFILES = +RESDEPEN = $(RESFILES) +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib -ap -Tpe -x -v \ + -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0x32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/ConCli2.cpp b/lib/ics/Cpp/Internet/Bcb1/ConCli2.cpp new file mode 100644 index 00000000..04fdb26b --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/ConCli2.cpp @@ -0,0 +1,155 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: ConCli2 shows how to use TWSocket in a console mode application. + ConCli2 use a thread to make the socket run in the program + background while the foreground is busy with the user interface + (for simplicity here we just wait for the user to hit the + enter key). +EMail: francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: Nov 22, 1997 +Version: 1.02 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 12, 1998 V1.01 Adapted for BCB3 +Dec 19, 1998 V1.02 Do not use TWait control anymore. + +---------------------------------------------------------------------------*/ +#include +#include +#include +#include +#pragma hdrstop +USEUNIT("wsocket.pas"); +USEUNIT("Wait.pas"); +//--------------------------------------------------------------------------- +#include +#include + +#define ServerHostName "localhost" +#define ServerPort "telnet" +//--------------------------------------------------------------------------- +class TWSocketThread : public TThread +{ +private: +protected: + TWSocket *FWSocket; + char FRcvBuf[1024]; + void __fastcall Execute(); + void __fastcall FWSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall FWSocketSessionConnected(TObject *Sender, WORD Error); + void __fastcall FWSocketSessionClosed(TObject *Sender, WORD Error); +public: + __fastcall TWSocketThread(); +}; +//--------------------------------------------------------------------------- +__fastcall TWSocketThread::TWSocketThread() + : TThread(TRUE) // Create suspended +{ + FreeOnTerminate = TRUE; +} +//--------------------------------------------------------------------------- +void __fastcall TWSocketThread::Execute() +{ + // Let's the user know what we are doing + printf("Connecting to server '" ServerHostName + "' on port '" ServerPort "'\n"); + + // Create the TWSocket we will use to commicate with the server + FWSocket = new TWSocket((void *)NULL); + + // Assign the event handler for the TWSocket events we care of + FWSocket->OnDataAvailable = FWSocketDataAvailable; + FWSocket->OnSessionClosed = FWSocketSessionClosed; + FWSocket->OnSessionConnected = FWSocketSessionConnected; + + // Connect to the server + FWSocket->Addr = ServerHostName; + FWSocket->Port = ServerPort; + FWSocket->Proto = "tcp"; + FWSocket->Connect(); + + // Let the TWSocket component makes his work + FWSocket->MessageLoop(); + + // We are done, destroy the objects we created + delete FWSocket; +} +//--------------------------------------------------------------------------- +// This event handler is called by the TWSocket when some data has been +// received by the lower level. +void __fastcall TWSocketThread::FWSocketDataAvailable(TObject *Sender, WORD Error) +{ + int Len; + + // Get the received data + Len = FWSocket->Receive(FRcvBuf, sizeof(FRcvBuf) - 1); + if (Len <= 0) + return; + + // Add a terminating nul byte to allow display using standard I/O + FRcvBuf[Len] = 0; + printf("%s", FRcvBuf); +} +//--------------------------------------------------------------------------- +// This event handler is called by TWSocket when the connection is +// established with the remote host +void __fastcall TWSocketThread::FWSocketSessionConnected(TObject *Sender, WORD Error) +{ + printf("Connected\n"); +} +//--------------------------------------------------------------------------- +// This event handler is called by TWSocket when the connection is broken +void __fastcall TWSocketThread::FWSocketSessionClosed(TObject *Sender, WORD Error) +{ + printf("Server has diconnected\n"); + FWSocket->Close(); +} +//--------------------------------------------------------------------------- +void main(void) +{ + TWSocketThread *WSocketThread; + + printf("Hit enter to stop the program\n"); + + // Create the socket working thread (suspended) + WSocketThread = new TWSocketThread; + + // Start the thread + WSocketThread->Resume(); + + // The main thread continue here. Process user request here. + getch(); + + // We are done, quit the program + printf("Ok.\n"); +} +//--------------------------------------------------------------------------- + + diff --git a/lib/ics/Cpp/Internet/Bcb1/ConCli2.mak b/lib/ics/Cpp/Internet/Bcb1/ConCli2.mak new file mode 100644 index 00000000..ef6586b5 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/ConCli2.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Concli2.exe +OBJFILES = Wait.obj wsocket.obj Concli2.obj +RESFILES = +RESDEPEN = $(RESFILES) +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\delphi\vc32;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\delphi\vc32;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\delphi\vc32;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\delphi\vc32;$(BCB)\projects;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\delphi\vc32;$(BCB)\projects;$(BCB)\lib\obj;$(BCB)\lib \ + -ap -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0x32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Finger.cpp b/lib/ics/Cpp/Internet/Bcb1/Finger.cpp new file mode 100644 index 00000000..a4cc9e2a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Finger.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("Finger.res"); +USEFORM("..\finger1.cpp", FingerDemoForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFingerDemoForm), &FingerDemoForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Finger.mak b/lib/ics/Cpp/Internet/Bcb1/Finger.mak new file mode 100644 index 00000000..7d9e541f --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Finger.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Finger.exe +OBJFILES = Finger.obj \FPiette\cpp\Internet\finger1.obj +RESFILES = Finger.res +RESDEPEN = $(RESFILES) \FPiette\cpp\Internet\finger1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Finger.res b/lib/ics/Cpp/Internet/Bcb1/Finger.res new file mode 100644 index 00000000..e4f10ec0 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/Finger.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/FtpServ.cpp b/lib/ics/Cpp/Internet/Bcb1/FtpServ.cpp new file mode 100644 index 00000000..69fcb7b3 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/FtpServ.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("FtpServ.res"); +USEFORM("..\Ftpsrv1.cpp", FtpServerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFtpServerForm), &FtpServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/FtpServ.mak b/lib/ics/Cpp/Internet/Bcb1/FtpServ.mak new file mode 100644 index 00000000..02114709 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/FtpServ.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Ftpserv.exe +OBJFILES = Ftpserv.obj \FPiette\CPP\INTERNET\Ftpsrv1.obj +RESFILES = FtpServ.res +RESDEPEN = $(RESFILES) \FPiette\CPP\INTERNET\Ftpsrv1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/FtpServ.res b/lib/ics/Cpp/Internet/Bcb1/FtpServ.res new file mode 100644 index 00000000..18b974ca Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/FtpServ.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/HttpPg.cpp b/lib/ics/Cpp/Internet/Bcb1/HttpPg.cpp new file mode 100644 index 00000000..9d3baabc --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/HttpPg.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("HttpPg.res"); +USEFORM("..\httppg1.cpp", HttpTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(THttpTestForm), &HttpTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/HttpPg.mak b/lib/ics/Cpp/Internet/Bcb1/HttpPg.mak new file mode 100644 index 00000000..70b4a517 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/HttpPg.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Httppg.exe +OBJFILES = Httppg.obj \FPiette\cpp\Internet\httppg1.obj +RESFILES = HttpPg.res +RESDEPEN = $(RESFILES) \FPiette\cpp\Internet\httppg1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/HttpPg.res b/lib/ics/Cpp/Internet/Bcb1/HttpPg.res new file mode 100644 index 00000000..2efcd6a8 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/HttpPg.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/MailSnd.cpp b/lib/ics/Cpp/Internet/Bcb1/MailSnd.cpp new file mode 100644 index 00000000..a2acff78 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/MailSnd.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("MailSnd.res"); +USEFORM("..\MailSnd1.cpp", MailSndForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMailSndForm), &MailSndForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/MailSnd.mak b/lib/ics/Cpp/Internet/Bcb1/MailSnd.mak new file mode 100644 index 00000000..cbbc2f66 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/MailSnd.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Mailsnd.exe +OBJFILES = Mailsnd.obj \FPiette\cpp\Internet\MailSnd1.obj +RESFILES = MailSnd.res +RESDEPEN = $(RESFILES) \FPiette\cpp\Internet\MailSnd1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/MailSnd.res b/lib/ics/Cpp/Internet/Bcb1/MailSnd.res new file mode 100644 index 00000000..07d88613 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/MailSnd.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/MtSrv.cpp b/lib/ics/Cpp/Internet/Bcb1/MtSrv.cpp new file mode 100644 index 00000000..c8d21951 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/MtSrv.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("MtSrv.res"); +USEFORM("..\mtsrv1.cpp", ServerForm); +USEUNIT("..\mtsrv2.cpp"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/MtSrv.mak b/lib/ics/Cpp/Internet/Bcb1/MtSrv.mak new file mode 100644 index 00000000..13b10c3f --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/MtSrv.mak @@ -0,0 +1,59 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Mtsrv.exe +OBJFILES = Mtsrv.obj \FPiette\cpp\Internet\mtsrv1.obj \ + \FPiette\cpp\Internet\mtsrv2.obj +RESFILES = MtSrv.res +RESDEPEN = $(RESFILES) \FPiette\cpp\Internet\mtsrv1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/MtSrv.res b/lib/ics/Cpp/Internet/Bcb1/MtSrv.res new file mode 100644 index 00000000..3228004f Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/MtSrv.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/NewsRdr.cpp b/lib/ics/Cpp/Internet/Bcb1/NewsRdr.cpp new file mode 100644 index 00000000..2c3f48e3 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/NewsRdr.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("NewsRdr.res"); +USEFORM("..\newsrdr1.cpp", NNTPForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TNNTPForm), &NNTPForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/NewsRdr.mak b/lib/ics/Cpp/Internet/Bcb1/NewsRdr.mak new file mode 100644 index 00000000..0c7b57b0 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/NewsRdr.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Newsrdr.exe +OBJFILES = Newsrdr.obj \FPiette\cpp\Internet\newsrdr1.obj +RESFILES = NewsRdr.res +RESDEPEN = $(RESFILES) \FPiette\cpp\Internet\newsrdr1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/NewsRdr.res b/lib/ics/Cpp/Internet/Bcb1/NewsRdr.res new file mode 100644 index 00000000..e4f10ec0 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/NewsRdr.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/PingTst.cpp b/lib/ics/Cpp/Internet/Bcb1/PingTst.cpp new file mode 100644 index 00000000..a60e3abf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/PingTst.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("PingTst.res"); +USEFORM("..\pingtst1.cpp", PingTstForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPingTstForm), &PingTstForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/PingTst.mak b/lib/ics/Cpp/Internet/Bcb1/PingTst.mak new file mode 100644 index 00000000..13455e3d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/PingTst.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Pingtst.exe +OBJFILES = Pingtst.obj \FPiette\cpp\Internet\pingtst1.obj +RESFILES = PingTst.res +RESDEPEN = $(RESFILES) \FPiette\cpp\Internet\pingtst1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/PingTst.res b/lib/ics/Cpp/Internet/Bcb1/PingTst.res new file mode 100644 index 00000000..4c97fd02 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/PingTst.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/Recv.cpp b/lib/ics/Cpp/Internet/Bcb1/Recv.cpp new file mode 100644 index 00000000..6162ed1c --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Recv.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("Recv.res"); +USEFORM("..\Recv1.cpp", RecvForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TRecvForm), &RecvForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Recv.mak b/lib/ics/Cpp/Internet/Bcb1/Recv.mak new file mode 100644 index 00000000..33fbbad4 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Recv.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Recv.exe +OBJFILES = Recv.obj \FPiette\CPP\INTERNET\Recv1.obj +RESFILES = Recv.res +RESDEPEN = $(RESFILES) \FPiette\CPP\INTERNET\Recv1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Recv.res b/lib/ics/Cpp/Internet/Bcb1/Recv.res new file mode 100644 index 00000000..3228004f Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/Recv.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/Sender.cpp b/lib/ics/Cpp/Internet/Bcb1/Sender.cpp new file mode 100644 index 00000000..e9eb004d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Sender.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("Sender.res"); +USEFORM("..\Sender1.cpp", SenderForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSenderForm), &SenderForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Sender.mak b/lib/ics/Cpp/Internet/Bcb1/Sender.mak new file mode 100644 index 00000000..6b4f6d34 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Sender.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Sender.exe +OBJFILES = Sender.obj \FPiette\CPP\INTERNET\Sender1.obj +RESFILES = Sender.res +RESDEPEN = $(RESFILES) \FPiette\CPP\INTERNET\Sender1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Sender.res b/lib/ics/Cpp/Internet/Bcb1/Sender.res new file mode 100644 index 00000000..4b41e805 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/Sender.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/Server5.cpp b/lib/ics/Cpp/Internet/Bcb1/Server5.cpp new file mode 100644 index 00000000..ee88d9a0 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Server5.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("Server5.res"); +USEFORM("..\srv5.cpp", ServerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Server5.mak b/lib/ics/Cpp/Internet/Bcb1/Server5.mak new file mode 100644 index 00000000..1f7c9b61 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/Server5.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Server5.exe +OBJFILES = Server5.obj \FPiette\cpp\Internet\srv5.obj +RESFILES = Server5.res +RESDEPEN = $(RESFILES) \FPiette\cpp\Internet\srv5.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Server5.res b/lib/ics/Cpp/Internet/Bcb1/Server5.res new file mode 100644 index 00000000..0786466c Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/Server5.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/SocksTst.cpp b/lib/ics/Cpp/Internet/Bcb1/SocksTst.cpp new file mode 100644 index 00000000..de8b404d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/SocksTst.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("SocksTst.res"); +USEFORM("..\Socks1.cpp", SocksTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSocksTestForm), &SocksTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/SocksTst.mak b/lib/ics/Cpp/Internet/Bcb1/SocksTst.mak new file mode 100644 index 00000000..b21fe9de --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/SocksTst.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Sockstst.exe +OBJFILES = Sockstst.obj \FPiette\CPP\INTERNET\Socks1.obj +RESFILES = SocksTst.res +RESDEPEN = $(RESFILES) \FPiette\CPP\INTERNET\Socks1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Sockstst.res b/lib/ics/Cpp/Internet/Bcb1/Sockstst.res new file mode 100644 index 00000000..efec22d4 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/Sockstst.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/SrvDemo.cpp b/lib/ics/Cpp/Internet/Bcb1/SrvDemo.cpp new file mode 100644 index 00000000..4654b7ac --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/SrvDemo.cpp @@ -0,0 +1,24 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("SrvDemo.res"); +USEFORM("..\SrvDemo1.cpp", SrvForm); +USEFORM("..\SrvDemo2.cpp", CliForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSrvForm), &SrvForm); + Application->CreateForm(__classid(TCliForm), &CliForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/SrvDemo.mak b/lib/ics/Cpp/Internet/Bcb1/SrvDemo.mak new file mode 100644 index 00000000..e088156d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/SrvDemo.mak @@ -0,0 +1,60 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = SrvDemo.exe +OBJFILES = SrvDemo.obj \FPiette\CPP\INTERNET\SrvDemo1.obj \ + \FPiette\CPP\INTERNET\SrvDemo2.obj +RESFILES = SrvDemo.res +RESDEPEN = $(RESFILES) \FPiette\CPP\INTERNET\SrvDemo1.dfm \ + \FPiette\CPP\INTERNET\SrvDemo2.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Srvdemo.res b/lib/ics/Cpp/Internet/Bcb1/Srvdemo.res new file mode 100644 index 00000000..2efcd6a8 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/Srvdemo.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/TWSChat.cpp b/lib/ics/Cpp/Internet/Bcb1/TWSChat.cpp new file mode 100644 index 00000000..2ae758e7 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/TWSChat.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("TWSChat.res"); +USEFORM("..\twschat1.cpp", TWSChatForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTWSChatForm), &TWSChatForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/TWSChat.mak b/lib/ics/Cpp/Internet/Bcb1/TWSChat.mak new file mode 100644 index 00000000..ee84bf1a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/TWSChat.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Twschat.exe +OBJFILES = Twschat.obj \FPiette\cpp\Internet\twschat1.obj +RESFILES = TWSChat.res +RESDEPEN = $(RESFILES) \FPiette\cpp\Internet\twschat1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/TcpSrv.cpp b/lib/ics/Cpp/Internet/Bcb1/TcpSrv.cpp new file mode 100644 index 00000000..0a1a33b4 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/TcpSrv.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("TcpSrv.res"); +USEFORM("..\..\INTERNET\Tcpsrv1.cpp", TcpSrvForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTcpSrvForm), &TcpSrvForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/TcpSrv.mak b/lib/ics/Cpp/Internet/Bcb1/TcpSrv.mak new file mode 100644 index 00000000..22552c30 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/TcpSrv.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = TcpSrv.exe +OBJFILES = TcpSrv.obj \FPiette\CPP\INTERNET\Tcpsrv1.obj +RESFILES = TcpSrv.res +RESDEPEN = $(RESFILES) \FPiette\CPP\INTERNET\Tcpsrv1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/Tcpsrv.res b/lib/ics/Cpp/Internet/Bcb1/Tcpsrv.res new file mode 100644 index 00000000..90a32721 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/Tcpsrv.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/TnDemo.cpp b/lib/ics/Cpp/Internet/Bcb1/TnDemo.cpp new file mode 100644 index 00000000..7583dbde --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/TnDemo.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("TnDemo.res"); +USEFORM("..\tndemo1.cpp", TnDemoForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTnDemoForm), &TnDemoForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/TnDemo.mak b/lib/ics/Cpp/Internet/Bcb1/TnDemo.mak new file mode 100644 index 00000000..497017e3 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/TnDemo.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Tndemo.exe +OBJFILES = Tndemo.obj \FPiette\cpp\Internet\tndemo1.obj +RESFILES = TnDemo.res +RESDEPEN = $(RESFILES) \FPiette\cpp\Internet\tndemo1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/TnDemo.res b/lib/ics/Cpp/Internet/Bcb1/TnDemo.res new file mode 100644 index 00000000..32704f48 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/TnDemo.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/TnSrv.res b/lib/ics/Cpp/Internet/Bcb1/TnSrv.res new file mode 100644 index 00000000..4c97fd02 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/TnSrv.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/UdpLstn.cpp b/lib/ics/Cpp/Internet/Bcb1/UdpLstn.cpp new file mode 100644 index 00000000..e0ab8261 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/UdpLstn.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("UdpLstn.res"); +USEFORM("..\udplstn1.cpp", MainForm); +USEUNIT("..\formpos.cpp"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/UdpLstn.mak b/lib/ics/Cpp/Internet/Bcb1/UdpLstn.mak new file mode 100644 index 00000000..7fe9a7eb --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/UdpLstn.mak @@ -0,0 +1,59 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Udplstn.exe +OBJFILES = Udplstn.obj \FPiette\cpp\Internet\udplstn1.obj \ + \FPiette\cpp\Internet\formpos.obj +RESFILES = UdpLstn.res +RESDEPEN = $(RESFILES) \FPiette\cpp\Internet\udplstn1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/clients.DBF b/lib/ics/Cpp/Internet/Bcb1/clients.DBF new file mode 100644 index 00000000..4f1066e9 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/clients.DBF differ diff --git a/lib/ics/Cpp/Internet/Bcb1/clients.MDX b/lib/ics/Cpp/Internet/Bcb1/clients.MDX new file mode 100644 index 00000000..c30a4652 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/clients.MDX differ diff --git a/lib/ics/Cpp/Internet/Bcb1/ftptst.cpp b/lib/ics/Cpp/Internet/Bcb1/ftptst.cpp new file mode 100644 index 00000000..a2287043 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/ftptst.cpp @@ -0,0 +1,24 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("FtpTst.res"); +USEFORM("..\ftptst1.cpp", FtpReceiveForm); +USEFORM("..\Ftptst2.cpp", DirectoryForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFtpReceiveForm), &FtpReceiveForm); + Application->CreateForm(__classid(TDirectoryForm), &DirectoryForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/ftptst.mak b/lib/ics/Cpp/Internet/Bcb1/ftptst.mak new file mode 100644 index 00000000..4ab74ebc --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/ftptst.mak @@ -0,0 +1,60 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Ftptst.exe +OBJFILES = Ftptst.obj \FPiette\CPP\INTERNET\ftptst1.obj \ + \chr\CPP\INTERNET\Ftptst2.obj +RESFILES = FtpTst.res +RESDEPEN = $(RESFILES) \FPiette\CPP\INTERNET\ftptst1.dfm \ + \chr\CPP\INTERNET\Ftptst2.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\cpp\internet\internet;d:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\cpp\internet\internet;d:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\cpp\internet\internet;d:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\cpp\internet\internet;d:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\cpp\internet\internet;d:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/ftptst.res b/lib/ics/Cpp/Internet/Bcb1/ftptst.res new file mode 100644 index 00000000..47a4cb94 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/ftptst.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/httptst.cpp b/lib/ics/Cpp/Internet/Bcb1/httptst.cpp new file mode 100644 index 00000000..9520ba1e --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/httptst.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("HttpTst.res"); +USEFORM("..\httptst1.cpp", HttpTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(THttpTestForm), &HttpTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/httptst.mak b/lib/ics/Cpp/Internet/Bcb1/httptst.mak new file mode 100644 index 00000000..866ea04d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/httptst.mak @@ -0,0 +1,58 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Httptst.exe +OBJFILES = Httptst.obj \chr\CPP\INTERNET\httptst1.obj +RESFILES = HttpTst.res +RESDEPEN = $(RESFILES) \chr\CPP\INTERNET\httptst1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/httptst.res b/lib/ics/Cpp/Internet/Bcb1/httptst.res new file mode 100644 index 00000000..4eb956fe Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/httptst.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/poptst.cpp b/lib/ics/Cpp/Internet/Bcb1/poptst.cpp new file mode 100644 index 00000000..bc3f2f86 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/poptst.cpp @@ -0,0 +1,28 @@ +//--------------------------------------------------------------------------- +// This is an outdated sample program which use an outdated POP3 component. +// For new programs, use new POP3 component in Pop3Prot.pas source file. +// New sample program is called MailRcv. The new component is not 100% +// compatible with the old one because the new is fully asynchronous. +// Name has been slightly changed to allow installation of both component +// if you need to support old code. +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("PopTst.res"); +USEFORM("..\Poptst1.cpp", POP3ExcercizerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPOP3ExcercizerForm), &POP3ExcercizerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/poptst.mak b/lib/ics/Cpp/Internet/Bcb1/poptst.mak new file mode 100644 index 00000000..9afae889 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/poptst.mak @@ -0,0 +1,57 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = PopTst.exe +OBJFILES = PopTst.obj \chr\CPP\INTERNET\Poptst1.obj +RESFILES = PopTst.res +RESDEPEN = $(RESFILES) \chr\CPP\INTERNET\Poptst1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -I..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE \ + -U..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -I..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -v -$Y -$W -$O- \ + -JPHNV -M +RFLAGS = -i..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -L..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/tnclient.cpp b/lib/ics/Cpp/Internet/Bcb1/tnclient.cpp new file mode 100644 index 00000000..33b516a3 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/tnclient.cpp @@ -0,0 +1,25 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("tnclient.res"); +USEFORM("..\tncli1.cpp", TelnetForm); +USEFORMNS("..\..\..\Delphi\VC32\tnoptfrm.pas", Tnoptfrm, OptForm); +USEUNIT("..\..\..\Delphi\VC32\formpos.pas"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTelnetForm), &TelnetForm); + Application->CreateForm(__classid(TOptForm), &OptForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/tnclient.mak b/lib/ics/Cpp/Internet/Bcb1/tnclient.mak new file mode 100644 index 00000000..9e66a837 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/tnclient.mak @@ -0,0 +1,61 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Tnclient.exe +OBJFILES = \FPiette\CPP\Delphi\VC32\formpos.obj \ + \FPiette\CPP\Delphi\VC32\tnoptfrm.obj Tnclient.obj \ + \FPiette\CPP\INTERNET\tncli1.obj +RESFILES = tnclient.res +RESDEPEN = $(RESFILES) \FPiette\CPP\INTERNET\tncli1.dfm \ + \FPiette\CPP\Delphi\VC32\tnoptfrm.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\delphi\vc32;d:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\delphi\vc32;d:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\delphi\vc32;d:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\delphi\vc32;d:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\delphi\vc32;d:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/tnclient.res b/lib/ics/Cpp/Internet/Bcb1/tnclient.res new file mode 100644 index 00000000..4eb956fe Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/tnclient.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/tnsrv.cpp b/lib/ics/Cpp/Internet/Bcb1/tnsrv.cpp new file mode 100644 index 00000000..9e81baae --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/tnsrv.cpp @@ -0,0 +1,24 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("TnSrv.res"); +USEFORM("..\tnsrv2.cpp", ClientForm); +USEFORM("..\tnsrv1.cpp", ServerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/tnsrv.mak b/lib/ics/Cpp/Internet/Bcb1/tnsrv.mak new file mode 100644 index 00000000..8863ddc7 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/tnsrv.mak @@ -0,0 +1,59 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Tnsrv.exe +OBJFILES = Tnsrv.obj \chr\CPP\INTERNET\tnsrv2.obj \chr\CPP\INTERNET\tnsrv1.obj +RESFILES = TnSrv.res +RESDEPEN = $(RESFILES) \chr\CPP\INTERNET\tnsrv2.dfm \ + \chr\CPP\INTERNET\tnsrv1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\chr\cpp\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/twschat.res b/lib/ics/Cpp/Internet/Bcb1/twschat.res new file mode 100644 index 00000000..4b41e805 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/twschat.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/udplstn.res b/lib/ics/Cpp/Internet/Bcb1/udplstn.res new file mode 100644 index 00000000..933baf59 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/udplstn.res differ diff --git a/lib/ics/Cpp/Internet/Bcb1/udpsend.cpp b/lib/ics/Cpp/Internet/Bcb1/udpsend.cpp new file mode 100644 index 00000000..2cd41437 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/udpsend.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USERES("udpsend.res"); +USEFORM("..\udpsend1.cpp", MainForm); +USEUNIT("..\formpos.cpp"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/udpsend.mak b/lib/ics/Cpp/Internet/Bcb1/udpsend.mak new file mode 100644 index 00000000..482ea385 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb1/udpsend.mak @@ -0,0 +1,59 @@ +# --------------------------------------------------------------------------- +VERSION = BCB.01 +# --------------------------------------------------------------------------- +!ifndef BCB +BCB = $(MAKEDIR)\.. +!endif +# --------------------------------------------------------------------------- +PROJECT = Udpsend.exe +OBJFILES = Udpsend.obj \Fpiette\CPP\INTERNET\udpsend1.obj \ + \Fpiette\CPP\INTERNET\formpos.obj +RESFILES = udpsend.res +RESDEPEN = $(RESFILES) \Fpiette\CPP\INTERNET\udpsend1.dfm +LIBFILES = +DEFFILE = +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -k -r- -y -v -vi- -c -a4 -b- -w-par -w-inl -Vx -Ve -x +CFLAG2 = -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcld.csm +PFLAGS = -Ud:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -Id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE -v \ + -$Y -$W -$O- -JPHNV -M +RFLAGS = -id:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +LFLAGS = -Ld:\fpiette\cpp\internet;d:\fpiette\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib \ + -aa -Tpe -x -v -V4.0 +IFLAGS = +LINKER = tlink32 +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) vcl.lib import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +.autodepend + +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! + +.pas.hpp: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.pas.obj: + $(BCB)\BIN\dcc32 $(PFLAGS) { $** } + +.cpp.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $* + +.c.obj: + $(BCB)\BIN\bcc32 $(CFLAG1) $(CFLAG2) -o$* $** + +.rc.res: + $(BCB)\BIN\brcc32 $(RFLAGS) $< +#----------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb1/udpsend.res b/lib/ics/Cpp/Internet/Bcb1/udpsend.res new file mode 100644 index 00000000..d18bd9ba Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb1/udpsend.res differ diff --git a/lib/ics/Cpp/Internet/Bcb3/Bcb30Sam.bpg b/lib/ics/Cpp/Internet/Bcb3/Bcb30Sam.bpg new file mode 100644 index 00000000..b97ff2a0 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Bcb30Sam.bpg @@ -0,0 +1,107 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = IcsBcb30 CliDemo Client5 Client7 ConCli1 ConCli2 Finger FtpServ \ + ftptst HttpPg httptst MailRcv MailSnd MtSrv NewsRdr NsLookup PingTst Recv \ + Sender Server5 SocksTst SrvDemo TcpSrv TnClient TnDemo tnsrv TWSChat UdpLstn \ + UdpSend +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +ConCli1: ConCli1.bpr + $(MAKE) + +ConCli2: ConCli2.bpr + $(MAKE) + +Client5: Client5.bpr + $(MAKE) + +Finger: Finger.bpr + $(MAKE) + +FtpServ: FtpServ.bpr + $(MAKE) + +ftptst: ftptst.bpr + $(MAKE) + +HttpPg: HttpPg.bpr + $(MAKE) + +httptst: httptst.bpr + $(MAKE) + +MailRcv: MailRcv.bpr + $(MAKE) + +MailSnd: MailSnd.bpr + $(MAKE) + +MtSrv: MtSrv.bpr + $(MAKE) + +NewsRdr: NewsRdr.bpr + $(MAKE) + +PingTst: PingTst.bpr + $(MAKE) + +Server5: Server5.bpr + $(MAKE) + +TnClient: TnClient.bpr + $(MAKE) + +TnDemo: TnDemo.bpr + $(MAKE) + +tnsrv: tnsrv.bpr + $(MAKE) + +TWSChat: TWSChat.bpr + $(MAKE) + +UdpLstn: UdpLstn.bpr + $(MAKE) + +UdpSend: UdpSend.bpr + $(MAKE) + +IcsBcb30: ..\..\..\Delphi\VC32\IcsBcb30.bpk + $(MAKE) + +Client7: Client7.bpr + $(MAKE) + +SocksTst: SocksTst.bpr + $(MAKE) + +CliDemo: CliDemo.bpr + $(MAKE) + +SrvDemo: SrvDemo.bpr + $(MAKE) + +Sender: Sender.bpr + $(MAKE) + +Recv: Recv.bpr + $(MAKE) + +NsLookup: NsLookup.bpr + $(MAKE) + +TcpSrv: TcpSrv.bpr + $(MAKE) + + diff --git a/lib/ics/Cpp/Internet/Bcb3/CliDemo.bpr b/lib/ics/Cpp/Internet/Bcb3/CliDemo.bpr new file mode 100644 index 00000000..5be2b23b --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/CliDemo.bpr @@ -0,0 +1,187 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = CliDemo.exe +OBJFILES = CliDemo.obj ..\CliDemo1.obj +RESFILES = CliDemo.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\CliDemo1.dfm +LIBFILES = +LIBRARIES = VCLX35.lib ICSBCB30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib ICSBCB30.lib VCLX35.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi ICSBCB30.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -D_RTLDLL \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -D_RTLDLL \ + -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -D_RTLDLL \ + -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /d_RTLDLL /mx /w2 /zd +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/CliDemo.cpp b/lib/ics/Cpp/Internet/Bcb3/CliDemo.cpp new file mode 100644 index 00000000..36f8525b --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/CliDemo.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("CliDemo.res"); +USEFORM("..\CliDemo1.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/Client5.bpr b/lib/ics/Cpp/Internet/Bcb3/Client5.bpr new file mode 100644 index 00000000..27690829 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Client5.bpr @@ -0,0 +1,183 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = Client5.exe +OBJFILES = Client5.obj ..\cli5.obj +RESFILES = Client5.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\cli5.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -H \ + -W -$Y -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/Client5.cpp b/lib/ics/Cpp/Internet/Bcb3/Client5.cpp new file mode 100644 index 00000000..62133f39 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Client5.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Client5.res"); +USEFORM("..\cli5.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/Client7.bpr b/lib/ics/Cpp/Internet/Bcb3/Client7.bpr new file mode 100644 index 00000000..293769ee --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Client7.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = Client7.exe +OBJFILES = Client7.obj ..\Cli7.obj +RESFILES = Client7.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\Cli7.dfm +LIBFILES = +LIBRARIES = VCLX35.lib ICSBCB30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib ICSBCB30.lib VCLX35.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi ICSBCB30.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -D_RTLDLL -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -D_RTLDLL -$Y -$W -$O- -v -JPHN -M +RFLAGS = -i..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -D_RTLDLL +AFLAGS = /i..\..\delphi\vc32 /i$(BCB)\include /i$(BCB)\include\vcl \ + /id:\fpiette\delphi\midware /d_RTLDLL /mx /w2 /zd +LFLAGS = -L..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=1 +Item0=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/Client7.cpp b/lib/ics/Cpp/Internet/Bcb3/Client7.cpp new file mode 100644 index 00000000..43e0d074 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Client7.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Client7.res"); +USEFORM("..\Cli7.cpp", Cli7Form); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TCli7Form), &Cli7Form); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/ConCli1.bpr b/lib/ics/Cpp/Internet/Bcb3/ConCli1.bpr new file mode 100644 index 00000000..6ecaea61 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/ConCli1.bpr @@ -0,0 +1,177 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = ConCli1.exe +OBJFILES = ..\..\..\delphi\vc32\WSocket.obj ..\..\..\delphi\vc32\Wait.obj ConCli1.obj +RESFILES = +RESDEPEN = $(RESFILES) +LIBFILES = +LIBRARIES = ICSBCB30.lib vcldb35.lib vcl35.lib +SPARELIBS = vcl35.lib vcldb35.lib ICSBCB30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi NMFAST35.bpi \ + INETDB35.bpi INET35.bpi +DEFFILE = +# --------------------------------------------------------------------------- +PATHCPP = .; +PATHASM = .;..\..\..\delphi\vc32 +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tWC +CFLAG2 = -I..\..\..\delphi;..\..\..\..\fpiette;..\..\..\cpp;..\..\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\..\delphi;..\..\..\..\fpiette;..\..\..\cpp;..\..\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \ + -I..\..\..\delphi;..\..\..\..\fpiette;..\..\..\cpp;..\..\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$Y -$W -$O- -v -JPHN -M +RFLAGS = -i..\..\..\delphi;..\..\..\..\fpiette;..\..\..\cpp;..\..\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\..\delphi\vc32 /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zd +LFLAGS = -L..\..\..\delphi;..\..\..\..\fpiette;..\..\..\cpp;..\..\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \ + -ap -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0x32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription=Executable (Console) +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/ConCli1.cpp b/lib/ics/Cpp/Internet/Bcb3/ConCli1.cpp new file mode 100644 index 00000000..1cc1d9cd --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/ConCli1.cpp @@ -0,0 +1,86 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: ConCli shows how to use TWSocket in a console mode application. +EMail: francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: Nov 22, 1997 +Version: 1.02 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 12, 1998 V1.01 Adapted for BCB3 +Dec 19, 1998 V1.02 Do not use TWait control anymore. + +---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#include +#include +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USEUNIT("..\..\..\delphi\vc32\WSocket.pas"); +USEUNIT("..\..\..\delphi\vc32\Wait.pas"); +//--------------------------------------------------------------------------- +#include +#include +//--------------------------------------------------------------------------- +void main(void) +{ + TWSocket *WSocket1; + AnsiString Buffer; + + WSocket1 = new TWSocket((void *)NULL); + WSocket1->Addr = "localhost"; + WSocket1->Port = "telnet"; + WSocket1->Proto = "tcp"; + printf("Connecting to localhost/telnet...\n"); + WSocket1->Connect(); + // Connect is asynchronous (non-blocking). We will wait while the + // session is connecting or application terminated. + while (WSocket1->State == wsConnecting) { + Application->ProcessMessages(); + if (Application->Terminated) + break; + } + if (WSocket1->State == wsConnected) { + WSocket1->ReadLine(15, Buffer); + printf("Server banner is: %s\n", Buffer.c_str()); + WSocket1->Close(); + } + else { + printf("Connection failed.\n"); + } + delete WSocket1; + + printf("Hit enter..."); + getch(); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/ConCli2.bpr b/lib/ics/Cpp/Internet/Bcb3/ConCli2.bpr new file mode 100644 index 00000000..89124ab5 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/ConCli2.bpr @@ -0,0 +1,161 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = ConCli2.exe +OBJFILES = wsocket.obj Wait.obj ConCli2.obj +RESFILES = +RESDEPEN = $(RESFILES) +LIBFILES = +LIBRARIES = ICSBCB30.lib vcldb35.lib vcl35.lib +SPARELIBS = vcl35.lib vcldb35.lib ICSBCB30.lib +PACKAGES = +DEFFILE = +# --------------------------------------------------------------------------- +PATHCPP = .; +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tWC +CFLAG2 = -I"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -U"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \ + -I"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$Y -$W -$O- -v -JPHN -M +RFLAGS = -i"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zd +LFLAGS = -L"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \ + -ap -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0x32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription=Executable (Console) +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/ConCli2.cpp b/lib/ics/Cpp/Internet/Bcb3/ConCli2.cpp new file mode 100644 index 00000000..bfc888c8 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/ConCli2.cpp @@ -0,0 +1,154 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: ConCli2 shows how to use TWSocket in a console mode application. + ConCli2 use a thread to make the socket run in the program + background while the foreground is busy with the user interface + (for simplicity here we just wait for the user to hit the + enter key). +EMail: francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: Nov 22, 1997 +Version: 1.02 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 12, 1998 V1.01 Adapted for BCB3 +Dec 19, 1998 V1.02 Do not use TWait control anymore. + +---------------------------------------------------------------------------*/ +#include +#include +#include +#include +#pragma hdrstop +USEUNIT("wsocket.pas"); +USEUNIT("Wait.pas"); +//--------------------------------------------------------------------------- +#include +#include + +#define ServerHostName "localhost" +#define ServerPort "telnet" +//--------------------------------------------------------------------------- +class TWSocketThread : public TThread +{ +private: +protected: + TWSocket *FWSocket; + char FRcvBuf[1024]; + void __fastcall Execute(); + void __fastcall FWSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall FWSocketSessionConnected(TObject *Sender, WORD Error); + void __fastcall FWSocketSessionClosed(TObject *Sender, WORD Error); +public: + __fastcall TWSocketThread(); +}; +//--------------------------------------------------------------------------- +__fastcall TWSocketThread::TWSocketThread() + : TThread(TRUE) // Create suspended +{ + FreeOnTerminate = TRUE; +} +//--------------------------------------------------------------------------- +void __fastcall TWSocketThread::Execute() +{ + // Let's the user know what we are doing + printf("Connecting to server '" ServerHostName + "' on port '" ServerPort "'\n"); + + // Create the TWSocket we will use to commicate with the server + FWSocket = new TWSocket((void *)NULL); + + // Assign the event handler for the TWSocket events we care of + FWSocket->OnDataAvailable = FWSocketDataAvailable; + FWSocket->OnSessionClosed = FWSocketSessionClosed; + FWSocket->OnSessionConnected = FWSocketSessionConnected; + + // Connect to the server + FWSocket->Addr = ServerHostName; + FWSocket->Port = ServerPort; + FWSocket->Proto = "tcp"; + FWSocket->Connect(); + + // Let the TWSocket component makes his work + FWSocket->MessageLoop(); + + // We are done, destroy the objects we created + delete FWSocket; +} +//--------------------------------------------------------------------------- +// This event handler is called by the TWSocket when some data has been +// received by the lower level. +void __fastcall TWSocketThread::FWSocketDataAvailable(TObject *Sender, WORD Error) +{ + int Len; + + // Get the received data + Len = FWSocket->Receive(FRcvBuf, sizeof(FRcvBuf) - 1); + if (Len <= 0) + return; + + // Add a terminating nul byte to allow display using standard I/O + FRcvBuf[Len] = 0; + printf("%s", FRcvBuf); +} +//--------------------------------------------------------------------------- +// This event handler is called by TWSocket when the connection is +// established with the remote host +void __fastcall TWSocketThread::FWSocketSessionConnected(TObject *Sender, WORD Error) +{ + printf("Connected\n"); +} +//--------------------------------------------------------------------------- +// This event handler is called by TWSocket when the connection is broken +void __fastcall TWSocketThread::FWSocketSessionClosed(TObject *Sender, WORD Error) +{ + printf("Server has diconnected\n"); + FWSocket->Close(); +} +//--------------------------------------------------------------------------- +void main(void) +{ + TWSocketThread *WSocketThread; + + printf("Hit enter to stop the program\n"); + + // Create the socket working thread (suspended) + WSocketThread = new TWSocketThread; + + // Start the thread + WSocketThread->Resume(); + + // The main thread continue here. Process user request here. + getch(); + + // We are done, quit the program + printf("Ok.\n"); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/Bcb3/Finger.bpr b/lib/ics/Cpp/Internet/Bcb3/Finger.bpr new file mode 100644 index 00000000..3a2d4e23 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Finger.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = Finger.exe +OBJFILES = Finger.obj ..\finger1.obj +RESFILES = Finger.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\finger1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\..\delphi\vc32;..;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\..\..\delphi\vc32;..;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/Finger.cpp b/lib/ics/Cpp/Internet/Bcb3/Finger.cpp new file mode 100644 index 00000000..d7c146a6 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Finger.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Finger.res"); +USEFORM("..\finger1.cpp", FingerDemoForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFingerDemoForm), &FingerDemoForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/FtpServ.bpr b/lib/ics/Cpp/Internet/Bcb3/FtpServ.bpr new file mode 100644 index 00000000..ce4db0f1 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/FtpServ.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = FtpServ.exe +OBJFILES = FtpServ.obj ..\FtpSrv1.obj +RESFILES = FtpServ.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\FtpSrv1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..\..\..\delphi\internet;..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\..\delphi\internet;..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\..\..\delphi\internet;..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$Y -$W -$O- -v -JPHN -M +RFLAGS = -i..\..\..\delphi\internet;..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\..\..\delphi\internet;..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/FtpServ.cpp b/lib/ics/Cpp/Internet/Bcb3/FtpServ.cpp new file mode 100644 index 00000000..1407aa4c --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/FtpServ.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("FtpServ.res"); +USEFORM("..\FtpSrv1.cpp", FtpServerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFtpServerForm), &FtpServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/HttpPg.bpr b/lib/ics/Cpp/Internet/Bcb3/HttpPg.bpr new file mode 100644 index 00000000..a436af1d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/HttpPg.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = HttpPg.exe +OBJFILES = HttpPg.obj ..\httppg1.obj +RESFILES = HttpPg.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\httppg1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\..\delphi\vc32;..;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\..\..\delphi\vc32;..;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/HttpPg.cpp b/lib/ics/Cpp/Internet/Bcb3/HttpPg.cpp new file mode 100644 index 00000000..4e5eb280 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/HttpPg.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("HttpPg.res"); +USEFORM("..\httppg1.cpp", HttpTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(THttpTestForm), &HttpTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/MailRcv.bpr b/lib/ics/Cpp/Internet/Bcb3/MailRcv.bpr new file mode 100644 index 00000000..5f9e3274 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/MailRcv.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = MailRcv.exe +OBJFILES = MailRcv.obj ..\MailRcv1.obj ..\MailRcv2.obj +RESFILES = MailRcv.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\MailRcv1.dfm ..\MailRcv2.dfm +LIBFILES = +LIBRARIES = VCLX35.lib ICSBCB30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib ICSBCB30.lib VCLX35.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi ICSBCB30.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -D_RTLDLL -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -U"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -D_RTLDLL -$Y -$W -$O- -v -JPHN -M +RFLAGS = -i"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -D_RTLDLL +AFLAGS = /i..\..\delphi\vc32 /i$(BCB)\include /i$(BCB)\include\vcl \ + /id:\fpiette\delphi\midware /d_RTLDLL /mx /w2 /zd +LFLAGS = -L"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=1 +Item0=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/MailRcv.cpp b/lib/ics/Cpp/Internet/Bcb3/MailRcv.cpp new file mode 100644 index 00000000..3f959235 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/MailRcv.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MailRcv.res"); +USEFORM("..\MailRcv1.cpp", POP3ExcercizerForm); +USEFORM("..\MailRcv2.cpp", MessageForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPOP3ExcercizerForm), &POP3ExcercizerForm); + Application->CreateForm(__classid(TMessageForm), &MessageForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/MailSnd.bpr b/lib/ics/Cpp/Internet/Bcb3/MailSnd.bpr new file mode 100644 index 00000000..856419c4 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/MailSnd.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = MailSnd.exe +OBJFILES = MailSnd.obj ..\MailSnd1.obj +RESFILES = MailSnd.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\MailSnd1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/MailSnd.cpp b/lib/ics/Cpp/Internet/Bcb3/MailSnd.cpp new file mode 100644 index 00000000..02185c7a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/MailSnd.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MailSnd.res"); +USEFORM("..\MailSnd1.cpp", MailSndForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMailSndForm), &MailSndForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/MtSrv.bpr b/lib/ics/Cpp/Internet/Bcb3/MtSrv.bpr new file mode 100644 index 00000000..8f6a08cb --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/MtSrv.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = MtSrv.exe +OBJFILES = MtSrv.obj ..\mtsrv1.obj ..\mtsrv2.obj +RESFILES = MtSrv.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\mtsrv1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/MtSrv.cpp b/lib/ics/Cpp/Internet/Bcb3/MtSrv.cpp new file mode 100644 index 00000000..050cdb4e --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/MtSrv.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MtSrv.res"); +USEFORM("..\mtsrv1.cpp", ServerForm); +USEUNIT("..\mtsrv2.cpp"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/NewsRdr.bpr b/lib/ics/Cpp/Internet/Bcb3/NewsRdr.bpr new file mode 100644 index 00000000..e5912526 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/NewsRdr.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = NewsRdr.exe +OBJFILES = NewsRdr.obj ..\newsrdr1.obj +RESFILES = NewsRdr.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\newsrdr1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/NewsRdr.cpp b/lib/ics/Cpp/Internet/Bcb3/NewsRdr.cpp new file mode 100644 index 00000000..2a52ac06 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/NewsRdr.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("NewsRdr.res"); +USEFORM("..\newsrdr1.cpp", NNTPForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TNNTPForm), &NNTPForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/NsLookup.bpr b/lib/ics/Cpp/Internet/Bcb3/NsLookup.bpr new file mode 100644 index 00000000..c4f55817 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/NsLookup.bpr @@ -0,0 +1,183 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = NsLookup.exe +OBJFILES = NsLookup.obj ..\NsLook1.obj +RESFILES = NsLookup.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\NsLook1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -H \ + -W -$Y -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/NsLookup.cpp b/lib/ics/Cpp/Internet/Bcb3/NsLookup.cpp new file mode 100644 index 00000000..630955c3 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/NsLookup.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("NsLookup.res"); +USEFORM("..\NsLook1.cpp", NsLookupForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TNsLookupForm), &NsLookupForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/PingTst.bpr b/lib/ics/Cpp/Internet/Bcb3/PingTst.bpr new file mode 100644 index 00000000..1eb8b54c --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/PingTst.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = PingTst.exe +OBJFILES = PingTst.obj ..\pingtst1.obj +RESFILES = PingTst.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\pingtst1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/PingTst.cpp b/lib/ics/Cpp/Internet/Bcb3/PingTst.cpp new file mode 100644 index 00000000..720a394a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/PingTst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("PingTst.res"); +USEFORM("..\pingtst1.cpp", PingTstForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPingTstForm), &PingTstForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/Recv.bpr b/lib/ics/Cpp/Internet/Bcb3/Recv.bpr new file mode 100644 index 00000000..78f71744 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Recv.bpr @@ -0,0 +1,183 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = Recv.exe +OBJFILES = Recv.obj ..\Recv1.obj +RESFILES = Recv.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\Recv1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -H \ + -W -$Y -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/Recv.cpp b/lib/ics/Cpp/Internet/Bcb3/Recv.cpp new file mode 100644 index 00000000..b279c79b --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Recv.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Recv.res"); +USEFORM("..\Recv1.cpp", RecvForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TRecvForm), &RecvForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/Sender.bpr b/lib/ics/Cpp/Internet/Bcb3/Sender.bpr new file mode 100644 index 00000000..50223522 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Sender.bpr @@ -0,0 +1,187 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = Sender.exe +OBJFILES = Sender.obj ..\Sender1.obj +RESFILES = Sender.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\Sender1.dfm +LIBFILES = +LIBRARIES = VCLX35.lib ICSBCB30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib ICSBCB30.lib VCLX35.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi ICSBCB30.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -D_RTLDLL \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -D_RTLDLL \ + -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -D_RTLDLL \ + -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /d_RTLDLL /mx /w2 /zd +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/Sender.cpp b/lib/ics/Cpp/Internet/Bcb3/Sender.cpp new file mode 100644 index 00000000..fa119bbb --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Sender.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Sender.res"); +USEFORM("..\Sender1.cpp", SenderForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSenderForm), &SenderForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/Server5.bpr b/lib/ics/Cpp/Internet/Bcb3/Server5.bpr new file mode 100644 index 00000000..47e4d069 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Server5.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = Server5.exe +OBJFILES = Server5.obj ..\srv5.obj +RESFILES = Server5.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\srv5.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\..\delphi\vc32;..;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\..\..\delphi\vc32;..;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/Server5.cpp b/lib/ics/Cpp/Internet/Bcb3/Server5.cpp new file mode 100644 index 00000000..f1759b77 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/Server5.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Server5.res"); +USEFORM("..\srv5.cpp", ServerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/SocksTst.bpr b/lib/ics/Cpp/Internet/Bcb3/SocksTst.bpr new file mode 100644 index 00000000..c2588b6d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/SocksTst.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = SocksTst.exe +OBJFILES = SocksTst.obj ..\Socks1.obj +RESFILES = SocksTst.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\Socks1.dfm +LIBFILES = +LIBRARIES = VCLX35.lib ICSBCB30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib ICSBCB30.lib VCLX35.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi ICSBCB30.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -D_RTLDLL -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -D_RTLDLL -$Y -$W -$O- -v -JPHN -M +RFLAGS = -i..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -D_RTLDLL +AFLAGS = /i..\..\delphi\vc32 /i$(BCB)\include /i$(BCB)\include\vcl \ + /id:\fpiette\delphi\midware /d_RTLDLL /mx /w2 /zd +LFLAGS = -L..\..\..\delphi\vc32;..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=1 +Item0=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/SocksTst.cpp b/lib/ics/Cpp/Internet/Bcb3/SocksTst.cpp new file mode 100644 index 00000000..18047efb --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/SocksTst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("SocksTst.res"); +USEFORM("..\Socks1.cpp", SocksTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSocksTestForm), &SocksTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/SrvDemo.bpr b/lib/ics/Cpp/Internet/Bcb3/SrvDemo.bpr new file mode 100644 index 00000000..84c50442 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/SrvDemo.bpr @@ -0,0 +1,187 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = SrvDemo.exe +OBJFILES = SrvDemo.obj ..\SrvDemo1.obj ..\SrvDemo2.obj +RESFILES = SrvDemo.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\SrvDemo1.dfm ..\SrvDemo2.dfm +LIBFILES = +LIBRARIES = VCLX35.lib ICSBCB30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib ICSBCB30.lib VCLX35.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi ICSBCB30.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -D_RTLDLL \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -D_RTLDLL \ + -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -D_RTLDLL \ + -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /d_RTLDLL /mx /w2 /zd +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\..\..\program files\borland\cbuilder3\projects;..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/SrvDemo.cpp b/lib/ics/Cpp/Internet/Bcb3/SrvDemo.cpp new file mode 100644 index 00000000..801847bc --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/SrvDemo.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("SrvDemo.res"); +USEFORM("..\SrvDemo1.cpp", SrvForm); +USEFORM("..\SrvDemo2.cpp", CliForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSrvForm), &SrvForm); + Application->CreateForm(__classid(TCliForm), &CliForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/TWSChat.bpr b/lib/ics/Cpp/Internet/Bcb3/TWSChat.bpr new file mode 100644 index 00000000..51091b45 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/TWSChat.bpr @@ -0,0 +1,179 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = TWSChat.exe +OBJFILES = TWSChat.obj ..\twschat1.obj +RESFILES = TWSChat.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\twschat1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCL35.bpi VCLDB35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/TWSChat.cpp b/lib/ics/Cpp/Internet/Bcb3/TWSChat.cpp new file mode 100644 index 00000000..94bdb805 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/TWSChat.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TWSChat.res"); +USEFORM("..\twschat1.cpp", TWSChatForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTWSChatForm), &TWSChatForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/TcpSrv.bpr b/lib/ics/Cpp/Internet/Bcb3/TcpSrv.bpr new file mode 100644 index 00000000..b4608eaf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/TcpSrv.bpr @@ -0,0 +1,188 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = TcpSrv.exe +OBJFILES = TcpSrv.obj ..\TcpSrv1.obj +RESFILES = TcpSrv.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\TcpSrv1.dfm +LIBFILES = +LIBRARIES = ICSBCB30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib ICSBCB30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\..\delphi\vc32;..;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\..\..\delphi\vc32;..;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\..\Delphi\vc32;..\..\midware;..;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\delphi\vc32;..\..\cpp;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\..\..\delphi\vc32;..;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;..\..\..\Delphi\vc32;..\..\midware;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\..\Delphi\vc32;..\..\midware;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\delphi\vc32;..\..\cpp;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/TcpSrv.cpp b/lib/ics/Cpp/Internet/Bcb3/TcpSrv.cpp new file mode 100644 index 00000000..0de4ec3a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/TcpSrv.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TcpSrv.res"); +USEFORM("..\TcpSrv1.cpp", TcpSrvForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTcpSrvForm), &TcpSrvForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/TnClient.bpr b/lib/ics/Cpp/Internet/Bcb3/TnClient.bpr new file mode 100644 index 00000000..6f50379a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/TnClient.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = TnClient.exe +OBJFILES = TnClient.obj ..\tncli1.obj +RESFILES = TnClient.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\tncli1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/TnClient.cpp b/lib/ics/Cpp/Internet/Bcb3/TnClient.cpp new file mode 100644 index 00000000..7691271f --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/TnClient.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnClient.res"); +USEFORM("..\tncli1.cpp", TelnetForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTelnetForm), &TelnetForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/TnDemo.bpr b/lib/ics/Cpp/Internet/Bcb3/TnDemo.bpr new file mode 100644 index 00000000..4ca0ac30 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/TnDemo.bpr @@ -0,0 +1,181 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = TnDemo.exe +OBJFILES = TnDemo.obj ..\tndemo1.obj +RESFILES = TnDemo.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\tndemo1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\..\delphi\vc32;..;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\..\..\delphi\vc32;..;..\..\Internet;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/TnDemo.cpp b/lib/ics/Cpp/Internet/Bcb3/TnDemo.cpp new file mode 100644 index 00000000..3f6b2de3 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/TnDemo.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnDemo.res"); +USEFORM("..\tndemo1.cpp", TnDemoForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTnDemoForm), &TnDemoForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/UdpLstn.bpr b/lib/ics/Cpp/Internet/Bcb3/UdpLstn.bpr new file mode 100644 index 00000000..6e4b73e7 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/UdpLstn.bpr @@ -0,0 +1,179 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = UdpLstn.exe +OBJFILES = UdpLstn.obj ..\udplstn1.obj ..\formpos.obj +RESFILES = UdpLstn.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\udplstn1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/UdpLstn.cpp b/lib/ics/Cpp/Internet/Bcb3/UdpLstn.cpp new file mode 100644 index 00000000..24138521 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/UdpLstn.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("UdpLstn.res"); +USEFORM("..\udplstn1.cpp", MainForm); +USEUNIT("..\formpos.cpp"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/UdpSend.bpr b/lib/ics/Cpp/Internet/Bcb3/UdpSend.bpr new file mode 100644 index 00000000..8ebd1818 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/UdpSend.bpr @@ -0,0 +1,179 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = UdpSend.exe +OBJFILES = UdpSend.obj ..\udpsend1.obj ..\formpos.obj +RESFILES = UdpSend.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\udpsend1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/UdpSend.cpp b/lib/ics/Cpp/Internet/Bcb3/UdpSend.cpp new file mode 100644 index 00000000..ab18a8dc --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/UdpSend.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("UdpSend.res"); +USEFORM("..\udpsend1.cpp", MainForm); +USEUNIT("..\formpos.cpp"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/clients.DBF b/lib/ics/Cpp/Internet/Bcb3/clients.DBF new file mode 100644 index 00000000..4f1066e9 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb3/clients.DBF differ diff --git a/lib/ics/Cpp/Internet/Bcb3/clients.MDX b/lib/ics/Cpp/Internet/Bcb3/clients.MDX new file mode 100644 index 00000000..c30a4652 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb3/clients.MDX differ diff --git a/lib/ics/Cpp/Internet/Bcb3/ftptst.bpr b/lib/ics/Cpp/Internet/Bcb3/ftptst.bpr new file mode 100644 index 00000000..70514b94 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/ftptst.bpr @@ -0,0 +1,183 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = ftptst.exe +OBJFILES = ftptst.obj ..\ftptst1.obj ..\Ftptst2.obj +RESFILES = FtpTst.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\ftptst1.dfm ..\Ftptst2.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\INTERNET /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/ftptst.cpp b/lib/ics/Cpp/Internet/Bcb3/ftptst.cpp new file mode 100644 index 00000000..33cc11a2 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/ftptst.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("FtpTst.res"); +USEFORM("..\ftptst1.cpp", FtpReceiveForm); +USEFORM("..\Ftptst2.cpp", DirectoryForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFtpReceiveForm), &FtpReceiveForm); + Application->CreateForm(__classid(TDirectoryForm), &DirectoryForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/httptst.bpr b/lib/ics/Cpp/Internet/Bcb3/httptst.bpr new file mode 100644 index 00000000..b9e8b69c --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/httptst.bpr @@ -0,0 +1,187 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = httptst.exe +OBJFILES = httptst.obj ..\httptst1.obj +RESFILES = HttpTst.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\httptst1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/httptst.cpp b/lib/ics/Cpp/Internet/Bcb3/httptst.cpp new file mode 100644 index 00000000..472031c8 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/httptst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("HttpTst.res"); +USEFORM("..\httptst1.cpp", HttpTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(THttpTestForm), &HttpTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/poptst.bpr b/lib/ics/Cpp/Internet/Bcb3/poptst.bpr new file mode 100644 index 00000000..61de56ec --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/poptst.bpr @@ -0,0 +1,183 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = poptst.exe +OBJFILES = poptst.obj ..\Poptst1.obj +RESFILES = PopTst.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\Poptst1.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi VCLDB35.bpi VCLDBX35.bpi bcbsmp35.bpi dclocx35.bpi \ + QRPT35.bpi TEEUI35.bpi VCLSMP35.bpi TEEDB35.bpi TEE35.bpi ibsmp35.bpi \ + NMFAST35.bpi INETDB35.bpi INET35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -U..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\INTERNET /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/poptst.cpp b/lib/ics/Cpp/Internet/Bcb3/poptst.cpp new file mode 100644 index 00000000..b5ac8b14 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/poptst.cpp @@ -0,0 +1,27 @@ +//--------------------------------------------------------------------------- +// This is an outdated sample program which use an outdated POP3 component. +// For new programs, use new POP3 component in Pop3Prot.pas source file. +// New sample program is called MailRcv. The new component is not 100% +// compatible with the old one because the new is fully asynchronous. +// Name has been slightly changed to allow installation of both component +// if you need to support old code. +#include +#pragma hdrstop +USERES("PopTst.res"); +USEFORM("..\Poptst1.cpp", POP3ExcercizerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPOP3ExcercizerForm), &POP3ExcercizerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/tnsrv.bpr b/lib/ics/Cpp/Internet/Bcb3/tnsrv.bpr new file mode 100644 index 00000000..df87587d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/tnsrv.bpr @@ -0,0 +1,178 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = tnsrv.exe +OBJFILES = tnsrv.obj ..\tnsrv1.obj ..\tnsrv2.obj +RESFILES = TnSrv.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\tnsrv1.dfm ..\tnsrv2.dfm +LIBFILES = +LIBRARIES = IcsBcb30.lib VCLDB35.lib VCL35.lib +SPARELIBS = VCL35.lib VCLDB35.lib IcsBcb30.lib +PACKAGES = VCLX35.bpi VCL35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx -tW +CFLAG2 = -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +CFLAG3 = -Tkh30000 +PFLAGS = -U..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -i..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb3/tnsrv.cpp b/lib/ics/Cpp/Internet/Bcb3/tnsrv.cpp new file mode 100644 index 00000000..c6ec34fc --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb3/tnsrv.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnSrv.res"); +USEFORM("..\tnsrv1.cpp", ServerForm); +USEFORM("..\tnsrv2.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Bcb40Sam.bpg b/lib/ics/Cpp/Internet/Bcb4/Bcb40Sam.bpg new file mode 100644 index 00000000..7b8e7670 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Bcb40Sam.bpg @@ -0,0 +1,108 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = Icsbcb40.bpl Clidemo.exe Client5.exe Client7.exe Concli1.exe \ + Concli2.exe Finger.exe Ftpserv.exe FtpTst.exe HttpPg.exe HttpTst.exe \ + MailRcv.exe MailSnd.exe MtSrv.exe NewsRdr.exe NsLookup.exe PingTst.exe Recv.exe \ + Sender.exe Server5.exe SocksTst.exe SrvDemo.exe TcpSrv.exe TnClient.exe \ + TnDemo.exe TnSrv.exe TWSChat.exe UdpLstn.exe UdpSend.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +Clidemo.exe: Clidemo.bpr + $(MAKE) + +Icsbcb40.bpl: ..\..\..\Delphi\VC32\Icsbcb40.bpk + $(MAKE) + +Client5.exe: Client5.bpr + $(MAKE) + +Client7.exe: Client7.bpr + $(MAKE) + +Concli1.exe: Concli1.bpr + $(MAKE) + +Concli2.exe: Concli2.bpr + $(MAKE) + +Finger.exe: Finger.bpr + $(MAKE) + +Ftpserv.exe: Ftpserv.bpr + $(MAKE) + +FtpTst.exe: FtpTst.bpr + $(MAKE) + +HttpPg.exe: HttpPg.bpr + $(MAKE) + +HttpTst.exe: HttpTst.bpr + $(MAKE) + +MailRcv.exe: MailRcv.bpr + $(MAKE) + +MailSnd.exe: MailSnd.bpr + $(MAKE) + +MtSrv.exe: MtSrv.bpr + $(MAKE) + +NewsRdr.exe: NewsRdr.bpr + $(MAKE) + +NsLookup.exe: NsLookup.bpr + $(MAKE) + +PingTst.exe: PingTst.bpr + $(MAKE) + +Recv.exe: Recv.bpr + $(MAKE) + +Sender.exe: Sender.bpr + $(MAKE) + +Server5.exe: Server5.bpr + $(MAKE) + +SocksTst.exe: SocksTst.bpr + $(MAKE) + +SrvDemo.exe: SrvDemo.bpr + $(MAKE) + +TnClient.exe: TnClient.bpr + $(MAKE) + +TnDemo.exe: TnDemo.bpr + $(MAKE) + +TnSrv.exe: TnSrv.bpr + $(MAKE) + +TWSChat.exe: TWSChat.bpr + $(MAKE) + +UdpLstn.exe: UdpLstn.bpr + $(MAKE) + +UdpSend.exe: UdpSend.bpr + $(MAKE) + +TcpSrv.exe: TcpSrv.bpr + $(MAKE) + + diff --git a/lib/ics/Cpp/Internet/Bcb4/Clidemo.bpr b/lib/ics/Cpp/Internet/Bcb4/Clidemo.bpr new file mode 100644 index 00000000..958ac3d3 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Clidemo.bpr @@ -0,0 +1,213 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Clidemo.exe +OBJFILES = Clidemo.obj ..\CliDemo1.obj +RESFILES = Clidemo.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\CliDemo1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = BCBSMP40.lib Icsbcb40.lib vclx40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib vclx40.lib Icsbcb40.lib \ + BCBSMP40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi bcbsmp40.bpi dclocx40.bpi qrpt40.bpi \ + vclsmp40.bpi nmfast40.bpi inetdb40.bpi inet40.bpi ibsmp40.bpi \ + DSS40.bpi VCLMID40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT;_RTLDLL +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\INTERNET -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U..\;..\..\INTERNET;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\ /i..\..\INTERNET /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\;..\..\INTERNET;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj Memmgr.Lib sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=7 +Item0=..\;..\..\INTERNET;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;..\..\INTERNET;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;$(BCB)\Projects\Lib;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item6=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Clidemo.cpp b/lib/ics/Cpp/Internet/Bcb4/Clidemo.cpp new file mode 100644 index 00000000..c35f1658 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Clidemo.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Clidemo.res"); +USEFORM("..\CliDemo1.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Client5.bpr b/lib/ics/Cpp/Internet/Bcb4/Client5.bpr new file mode 100644 index 00000000..a7168c1e --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Client5.bpr @@ -0,0 +1,207 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Client5.exe +OBJFILES = Client5.obj ..\cli5.obj +RESFILES = Client5.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\cli5.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = BCBSMP40.lib Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib BCBSMP40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\INTERNET -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Client5.cpp b/lib/ics/Cpp/Internet/Bcb4/Client5.cpp new file mode 100644 index 00000000..23e65ad9 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Client5.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Client5.res"); +USEFORM("..\cli5.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Client7.bpr b/lib/ics/Cpp/Internet/Bcb4/Client7.bpr new file mode 100644 index 00000000..d161f5b1 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Client7.bpr @@ -0,0 +1,207 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Client7.exe +OBJFILES = Client7.obj ..\Cli7.obj +RESFILES = Client7.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\Cli7.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = BCBSMP40.lib Icsbcb40.lib vclx40.lib vcldb40.lib \ + vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib vclx40.lib Icsbcb40.lib \ + BCBSMP40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT;_RTLDLL +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\INTERNET -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -I..\..\..\delphi\midware -src_suffixcpp +PFLAGS = -U..\;$(BCB)\Projects\Lib;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +AFLAGS = /i..\ /i..\..\INTERNET /i..\..\..\delphi\vc32 /i.. /i$(BCB)\include \ + /i$(BCB)\include\vcl /i..\..\..\delphi\midware /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\;$(BCB)\Projects\Lib;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj Memmgr.Lib sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\;..\..\INTERNET;..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item1=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Client7.cpp b/lib/ics/Cpp/Internet/Bcb4/Client7.cpp new file mode 100644 index 00000000..f7c27111 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Client7.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Client7.res"); +USEFORM("..\Cli7.cpp", Cli7Form); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TCli7Form), &Cli7Form); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Concli1.bpr b/lib/ics/Cpp/Internet/Bcb4/Concli1.bpr new file mode 100644 index 00000000..9f7c0711 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Concli1.bpr @@ -0,0 +1,205 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Concli1.exe +OBJFILES = ..\..\..\delphi\vc32\WSocket.obj ..\..\..\delphi\vc32\Wait.obj Concli1.obj +RESFILES = +RESDEPEN = $(RESFILES) +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = icsbcb40.lib dss40.lib tee40.lib teedb40.lib teeui40.lib qrpt40.lib \ + vcldbx40.lib ibsmp40.lib bcbsmp40.lib vclmid40.lib vcljpg40.lib vclx40.lib \ + vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib vclx40.lib vcljpg40.lib vclmid40.lib bcbsmp40.lib \ + ibsmp40.lib vcldbx40.lib qrpt40.lib teeui40.lib teedb40.lib tee40.lib dss40.lib \ + icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi nmfast40.bpi \ + inetdb40.bpi inet40.bpi +DEFFILE = +# --------------------------------------------------------------------------- +PATHCPP = .; +PATHASM = .; +PATHPAS = .;..\..\..\delphi\vc32 +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\..\..\delphi;..\..\..;..\..;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tWC -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I..\..\..\delphi -I..\..\.. -I..\.. -I.. -I..\..\..\delphi\vc32 \ + -I$(BCB)\include -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\..\..\delphi;..\..\..;..\..;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \ + -I..\..\..\delphi;..\..\..;..\..;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\..\..\delphi;..\..\..;..\..;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\..\delphi /i..\..\..\..\fpiette /i..\..\..\cpp /i..\..\internet \ + /i..\..\..\delphi\vc32 /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zd +LFLAGS = -L$(BCB)\Projects\Lib;..\..\..\delphi;..\..\..;..\..;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \ + -ap -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0x32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription=Executable (Console) +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Concli1.cpp b/lib/ics/Cpp/Internet/Bcb4/Concli1.cpp new file mode 100644 index 00000000..1cc1d9cd --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Concli1.cpp @@ -0,0 +1,86 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: ConCli shows how to use TWSocket in a console mode application. +EMail: francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: Nov 22, 1997 +Version: 1.02 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 12, 1998 V1.01 Adapted for BCB3 +Dec 19, 1998 V1.02 Do not use TWait control anymore. + +---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#include +#include +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USEUNIT("..\..\..\delphi\vc32\WSocket.pas"); +USEUNIT("..\..\..\delphi\vc32\Wait.pas"); +//--------------------------------------------------------------------------- +#include +#include +//--------------------------------------------------------------------------- +void main(void) +{ + TWSocket *WSocket1; + AnsiString Buffer; + + WSocket1 = new TWSocket((void *)NULL); + WSocket1->Addr = "localhost"; + WSocket1->Port = "telnet"; + WSocket1->Proto = "tcp"; + printf("Connecting to localhost/telnet...\n"); + WSocket1->Connect(); + // Connect is asynchronous (non-blocking). We will wait while the + // session is connecting or application terminated. + while (WSocket1->State == wsConnecting) { + Application->ProcessMessages(); + if (Application->Terminated) + break; + } + if (WSocket1->State == wsConnected) { + WSocket1->ReadLine(15, Buffer); + printf("Server banner is: %s\n", Buffer.c_str()); + WSocket1->Close(); + } + else { + printf("Connection failed.\n"); + } + delete WSocket1; + + printf("Hit enter..."); + getch(); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Concli2.bpr b/lib/ics/Cpp/Internet/Bcb4/Concli2.bpr new file mode 100644 index 00000000..7a27dd44 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Concli2.bpr @@ -0,0 +1,186 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Concli2.exe +OBJFILES = ..\BCB3\wsocket.obj ..\BCB3\Wait.obj Concli2.obj +RESFILES = +RESDEPEN = $(RESFILES) +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib +PACKAGES = +DEFFILE = +# --------------------------------------------------------------------------- +PATHCPP = .; +PATHASM = .; +PATHPAS = .;..\BCB3 +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\BCB3;"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tWC -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I..\BCB3 -I"..\..\..\..\program files\borland\cbuilder3\projects" \ + -I..\..\..\.. -I..\..\..\delphi\vc32 -I$(BCB)\include -I$(BCB)\include\vcl \ + -src_suffixcpp +PFLAGS = -U..\BCB3;"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \ + -I..\BCB3;"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\BCB3;"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i"..\..\..\..\program files\borland\cbuilder3\projects" /i..\..\..\.. \ + /i..\..\..\delphi\vc32 /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zd +LFLAGS = -L..\BCB3;"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(DEBUGLIBPATH) \ + -ap -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0x32.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription=Executable (Console) +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Concli2.cpp b/lib/ics/Cpp/Internet/Bcb4/Concli2.cpp new file mode 100644 index 00000000..174dd0d9 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Concli2.cpp @@ -0,0 +1,154 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: ConCli2 shows how to use TWSocket in a console mode application. + ConCli2 use a thread to make the socket run in the program + background while the foreground is busy with the user interface + (for simplicity here we just wait for the user to hit the + enter key). +EMail: francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: Nov 22, 1997 +Version: 1.02 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 12, 1998 V1.01 Adapted for BCB3 +Dec 19, 1998 V1.02 Do not use TWait control anymore. + +---------------------------------------------------------------------------*/ +#include +#include +#include +#include +#pragma hdrstop +USEUNIT("..\BCB3\wsocket.pas"); +USEUNIT("..\BCB3\Wait.pas"); +//--------------------------------------------------------------------------- +#include +#include + +#define ServerHostName "localhost" +#define ServerPort "telnet" +//--------------------------------------------------------------------------- +class TWSocketThread : public TThread +{ +private: +protected: + TWSocket *FWSocket; + char FRcvBuf[1024]; + void __fastcall Execute(); + void __fastcall FWSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall FWSocketSessionConnected(TObject *Sender, WORD Error); + void __fastcall FWSocketSessionClosed(TObject *Sender, WORD Error); +public: + __fastcall TWSocketThread(); +}; +//--------------------------------------------------------------------------- +__fastcall TWSocketThread::TWSocketThread() + : TThread(TRUE) // Create suspended +{ + FreeOnTerminate = TRUE; +} +//--------------------------------------------------------------------------- +void __fastcall TWSocketThread::Execute() +{ + // Let's the user know what we are doing + printf("Connecting to server '" ServerHostName + "' on port '" ServerPort "'\n"); + + // Create the TWSocket we will use to commicate with the server + FWSocket = new TWSocket((void *)NULL); + + // Assign the event handler for the TWSocket events we care of + FWSocket->OnDataAvailable = FWSocketDataAvailable; + FWSocket->OnSessionClosed = FWSocketSessionClosed; + FWSocket->OnSessionConnected = FWSocketSessionConnected; + + // Connect to the server + FWSocket->Addr = ServerHostName; + FWSocket->Port = ServerPort; + FWSocket->Proto = "tcp"; + FWSocket->Connect(); + + // Let the TWSocket component makes his work + FWSocket->MessageLoop(); + + // We are done, destroy the objects we created + delete FWSocket; +} +//--------------------------------------------------------------------------- +// This event handler is called by the TWSocket when some data has been +// received by the lower level. +void __fastcall TWSocketThread::FWSocketDataAvailable(TObject *Sender, WORD Error) +{ + int Len; + + // Get the received data + Len = FWSocket->Receive(FRcvBuf, sizeof(FRcvBuf) - 1); + if (Len <= 0) + return; + + // Add a terminating nul byte to allow display using standard I/O + FRcvBuf[Len] = 0; + printf("%s", FRcvBuf); +} +//--------------------------------------------------------------------------- +// This event handler is called by TWSocket when the connection is +// established with the remote host +void __fastcall TWSocketThread::FWSocketSessionConnected(TObject *Sender, WORD Error) +{ + printf("Connected\n"); +} +//--------------------------------------------------------------------------- +// This event handler is called by TWSocket when the connection is broken +void __fastcall TWSocketThread::FWSocketSessionClosed(TObject *Sender, WORD Error) +{ + printf("Server has diconnected\n"); + FWSocket->Close(); +} +//--------------------------------------------------------------------------- +void main(void) +{ + TWSocketThread *WSocketThread; + + printf("Hit enter to stop the program\n"); + + // Create the socket working thread (suspended) + WSocketThread = new TWSocketThread; + + // Start the thread + WSocketThread->Resume(); + + // The main thread continue here. Process user request here. + getch(); + + // We are done, quit the program + printf("Ok.\n"); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/Bcb4/Finger.bpr b/lib/ics/Cpp/Internet/Bcb4/Finger.bpr new file mode 100644 index 00000000..55bfdebd --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Finger.bpr @@ -0,0 +1,205 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Finger.exe +OBJFILES = Finger.obj ..\finger1.obj +RESFILES = Finger.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\finger1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = BCBSMP40.lib Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib BCBSMP40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\INTERNET -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\INTERNET;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\INTERNET;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Finger.cpp b/lib/ics/Cpp/Internet/Bcb4/Finger.cpp new file mode 100644 index 00000000..4a23becf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Finger.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Finger.res"); +USEFORM("..\finger1.cpp", FingerDemoForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFingerDemoForm), &FingerDemoForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/FtpTst.bpr b/lib/ics/Cpp/Internet/Bcb4/FtpTst.bpr new file mode 100644 index 00000000..6eb0fa14 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/FtpTst.bpr @@ -0,0 +1,206 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = FtpTst.exe +OBJFILES = FtpTst.obj ..\ftptst1.obj ..\Ftptst2.obj +RESFILES = FtpTst.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\ftptst1.dfm ..\Ftptst2.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\INTERNET /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/FtpTst.cpp b/lib/ics/Cpp/Internet/Bcb4/FtpTst.cpp new file mode 100644 index 00000000..4c16d20a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/FtpTst.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("FtpTst.res"); +USEFORM("..\ftptst1.cpp", FtpReceiveForm); +USEFORM("..\Ftptst2.cpp", DirectoryForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFtpReceiveForm), &FtpReceiveForm); + Application->CreateForm(__classid(TDirectoryForm), &DirectoryForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Ftpserv.bpr b/lib/ics/Cpp/Internet/Bcb4/Ftpserv.bpr new file mode 100644 index 00000000..3dba8fb1 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Ftpserv.bpr @@ -0,0 +1,205 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Ftpserv.exe +OBJFILES = Ftpserv.obj ..\FtpSrv1.obj +RESFILES = Ftpserv.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\FtpSrv1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = BCBSMP40.lib Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib BCBSMP40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\INTERNET;..\..\..\delphi\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\INTERNET -I..\..\..\delphi\internet -I.. -I..\..\..\delphi\vc32 \ + -I$(BCB)\include -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\INTERNET;..\..\..\delphi\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\INTERNET;..\..\..\delphi\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\INTERNET;..\..\..\delphi\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\..\delphi\internet /i.. /i..\..\Internet /i..\..\..\delphi\vc32 \ + /i$(BCB)\include /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\INTERNET;..\..\..\delphi\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Ftpserv.cpp b/lib/ics/Cpp/Internet/Bcb4/Ftpserv.cpp new file mode 100644 index 00000000..07a81a5c --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Ftpserv.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Ftpserv.res"); +USEFORM("..\FtpSrv1.cpp", FtpServerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFtpServerForm), &FtpServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/HttpPg.bpr b/lib/ics/Cpp/Internet/Bcb4/HttpPg.bpr new file mode 100644 index 00000000..c9d0423f --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/HttpPg.bpr @@ -0,0 +1,205 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = HttpPg.exe +OBJFILES = HttpPg.obj ..\httppg1.obj +RESFILES = HttpPg.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\httppg1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/HttpPg.cpp b/lib/ics/Cpp/Internet/Bcb4/HttpPg.cpp new file mode 100644 index 00000000..5bb474b4 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/HttpPg.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("HttpPg.res"); +USEFORM("..\httppg1.cpp", HttpTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(THttpTestForm), &HttpTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/HttpTst.bpr b/lib/ics/Cpp/Internet/Bcb4/HttpTst.bpr new file mode 100644 index 00000000..7ab9e7fa --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/HttpTst.bpr @@ -0,0 +1,210 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = HttpTst.exe +OBJFILES = HttpTst.obj ..\httptst1.obj +RESFILES = HttpTst.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\httptst1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/HttpTst.cpp b/lib/ics/Cpp/Internet/Bcb4/HttpTst.cpp new file mode 100644 index 00000000..e904bcd4 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/HttpTst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("HttpTst.res"); +USEFORM("..\httptst1.cpp", HttpTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(THttpTestForm), &HttpTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/MailRcv.bpr b/lib/ics/Cpp/Internet/Bcb4/MailRcv.bpr new file mode 100644 index 00000000..cf7666b2 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/MailRcv.bpr @@ -0,0 +1,206 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = MailRcv.exe +OBJFILES = MailRcv.obj ..\MailRcv1.obj ..\MailRcv2.obj +RESFILES = MailRcv.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\MailRcv1.dfm ..\MailRcv2.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vclx40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib vclx40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT;_RTLDLL +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet \ + -I"..\..\..\..\program files\borland\cbuilder3\projects" -I..\..\..\delphi\vc32 \ + -I.. -I$(BCB)\include -I$(BCB)\include\vcl -I..\..\..\delphi\midware \ + -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +AFLAGS = /i"..\..\..\..\program files\borland\cbuilder3\projects" /i..\..\..\delphi\vc32 \ + /i..\..\internet /i.. /i$(BCB)\include /i$(BCB)\include\vcl \ + /i..\..\..\delphi\midware /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;"..\..\..\..\program files\borland\cbuilder3\projects";..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj Memmgr.Lib sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=1 +Item0=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/MailRcv.cpp b/lib/ics/Cpp/Internet/Bcb4/MailRcv.cpp new file mode 100644 index 00000000..f7337c6d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/MailRcv.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MailRcv.res"); +USEFORM("..\MailRcv1.cpp", POP3ExcercizerForm); +USEFORM("..\MailRcv2.cpp", MessageForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPOP3ExcercizerForm), &POP3ExcercizerForm); + Application->CreateForm(__classid(TMessageForm), &MessageForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/MailSnd.bpr b/lib/ics/Cpp/Internet/Bcb4/MailSnd.bpr new file mode 100644 index 00000000..61c3d335 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/MailSnd.bpr @@ -0,0 +1,205 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = MailSnd.exe +OBJFILES = MailSnd.obj ..\MailSnd1.obj +RESFILES = MailSnd.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\MailSnd1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/MailSnd.cpp b/lib/ics/Cpp/Internet/Bcb4/MailSnd.cpp new file mode 100644 index 00000000..73acc8cf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/MailSnd.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MailSnd.res"); +USEFORM("..\MailSnd1.cpp", MailSndForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMailSndForm), &MailSndForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/MtSrv.bpr b/lib/ics/Cpp/Internet/Bcb4/MtSrv.bpr new file mode 100644 index 00000000..57f013fb --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/MtSrv.bpr @@ -0,0 +1,205 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = MtSrv.exe +OBJFILES = MtSrv.obj ..\mtsrv1.obj ..\mtsrv2.obj +RESFILES = MtSrv.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\mtsrv1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/MtSrv.cpp b/lib/ics/Cpp/Internet/Bcb4/MtSrv.cpp new file mode 100644 index 00000000..604fb14b --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/MtSrv.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MtSrv.res"); +USEFORM("..\mtsrv1.cpp", ServerForm); +USEUNIT("..\mtsrv2.cpp"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/NewsRdr.bpr b/lib/ics/Cpp/Internet/Bcb4/NewsRdr.bpr new file mode 100644 index 00000000..230c90cf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/NewsRdr.bpr @@ -0,0 +1,205 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = NewsRdr.exe +OBJFILES = NewsRdr.obj ..\newsrdr1.obj +RESFILES = NewsRdr.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\newsrdr1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/NewsRdr.cpp b/lib/ics/Cpp/Internet/Bcb4/NewsRdr.cpp new file mode 100644 index 00000000..28968e2f --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/NewsRdr.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("NewsRdr.res"); +USEFORM("..\newsrdr1.cpp", NNTPForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TNNTPForm), &NNTPForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/NsLookup.bpr b/lib/ics/Cpp/Internet/Bcb4/NsLookup.bpr new file mode 100644 index 00000000..15501c60 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/NsLookup.bpr @@ -0,0 +1,207 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = NsLookup.exe +OBJFILES = NsLookup.obj ..\NsLook1.obj +RESFILES = NsLookup.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\NsLook1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/NsLookup.cpp b/lib/ics/Cpp/Internet/Bcb4/NsLookup.cpp new file mode 100644 index 00000000..66545f54 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/NsLookup.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("NsLookup.res"); +USEFORM("..\NsLook1.cpp", NsLookupForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TNsLookupForm), &NsLookupForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/PingTst.bpr b/lib/ics/Cpp/Internet/Bcb4/PingTst.bpr new file mode 100644 index 00000000..280e5cd1 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/PingTst.bpr @@ -0,0 +1,205 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = PingTst.exe +OBJFILES = PingTst.obj ..\pingtst1.obj +RESFILES = PingTst.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\pingtst1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/PingTst.cpp b/lib/ics/Cpp/Internet/Bcb4/PingTst.cpp new file mode 100644 index 00000000..81d9720a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/PingTst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("PingTst.res"); +USEFORM("..\pingtst1.cpp", PingTstForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPingTstForm), &PingTstForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/PopTst.bpr b/lib/ics/Cpp/Internet/Bcb4/PopTst.bpr new file mode 100644 index 00000000..39d4549e --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/PopTst.bpr @@ -0,0 +1,206 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = PopTst.exe +OBJFILES = PopTst.obj ..\Poptst1.obj +RESFILES = PopTst.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\Poptst1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\Internet +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U..\;$(BCB)\Projects\Lib;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\INTERNET /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\;$(BCB)\Projects\Lib;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/PopTst.cpp b/lib/ics/Cpp/Internet/Bcb4/PopTst.cpp new file mode 100644 index 00000000..02b0714c --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/PopTst.cpp @@ -0,0 +1,27 @@ +//--------------------------------------------------------------------------- +// This is an outdated sample program which use an outdated POP3 component. +// For new programs, use new POP3 component in Pop3Prot.pas source file. +// New sample program is called MailRcv. The new component is not 100% +// compatible with the old one because the new is fully asynchronous. +// Name has been slightly changed to allow installation of both component +// if you need to support old code. +#include +#pragma hdrstop +USERES("PopTst.res"); +USEFORM("..\Poptst1.cpp", POP3ExcercizerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPOP3ExcercizerForm), &POP3ExcercizerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Recv.bpr b/lib/ics/Cpp/Internet/Bcb4/Recv.bpr new file mode 100644 index 00000000..32a12f93 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Recv.bpr @@ -0,0 +1,207 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Recv.exe +OBJFILES = Recv.obj ..\Recv1.obj +RESFILES = Recv.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\Recv1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Recv.cpp b/lib/ics/Cpp/Internet/Bcb4/Recv.cpp new file mode 100644 index 00000000..d08544d2 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Recv.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Recv.res"); +USEFORM("..\Recv1.cpp", RecvForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TRecvForm), &RecvForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Sender.bpr b/lib/ics/Cpp/Internet/Bcb4/Sender.bpr new file mode 100644 index 00000000..e412ed77 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Sender.bpr @@ -0,0 +1,207 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Sender.exe +OBJFILES = Sender.obj ..\Sender1.obj +RESFILES = Sender.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\Sender1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vclx40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib vclx40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT;_RTLDLL +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj Memmgr.Lib sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Sender.cpp b/lib/ics/Cpp/Internet/Bcb4/Sender.cpp new file mode 100644 index 00000000..7c1a2c4a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Sender.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Sender.res"); +USEFORM("..\Sender1.cpp", SenderForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSenderForm), &SenderForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Server5.bpr b/lib/ics/Cpp/Internet/Bcb4/Server5.bpr new file mode 100644 index 00000000..330314fb --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Server5.bpr @@ -0,0 +1,205 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Server5.exe +OBJFILES = Server5.obj ..\srv5.obj +RESFILES = Server5.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\srv5.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/Server5.cpp b/lib/ics/Cpp/Internet/Bcb4/Server5.cpp new file mode 100644 index 00000000..80e8effb --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/Server5.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Server5.res"); +USEFORM("..\srv5.cpp", ServerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/SocksTst.bpr b/lib/ics/Cpp/Internet/Bcb4/SocksTst.bpr new file mode 100644 index 00000000..e8c5a373 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/SocksTst.bpr @@ -0,0 +1,203 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = SocksTst.exe +OBJFILES = SocksTst.obj ..\Socks1.obj +RESFILES = SocksTst.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\Socks1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vclx40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib vclx40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT;_RTLDLL +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I..\..\..\delphi\vc32 -I.. -I$(BCB)\include \ + -I$(BCB)\include\vcl -I..\..\..\delphi\midware -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +AFLAGS = /i..\..\..\delphi\vc32 /i..\..\internet /i.. /i$(BCB)\include \ + /i$(BCB)\include\vcl /i..\..\..\delphi\midware /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj Memmgr.Lib sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=1 +Item0=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/SocksTst.cpp b/lib/ics/Cpp/Internet/Bcb4/SocksTst.cpp new file mode 100644 index 00000000..053a96ce --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/SocksTst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("SocksTst.res"); +USEFORM("..\Socks1.cpp", SocksTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSocksTestForm), &SocksTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/SrvDemo.bpr b/lib/ics/Cpp/Internet/Bcb4/SrvDemo.bpr new file mode 100644 index 00000000..df2a71c1 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/SrvDemo.bpr @@ -0,0 +1,207 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = SrvDemo.exe +OBJFILES = SrvDemo.obj ..\SrvDemo1.obj ..\SrvDemo2.obj +RESFILES = SrvDemo.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\SrvDemo1.dfm ..\SrvDemo2.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vclx40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib vclx40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT;_RTLDLL +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj Memmgr.Lib sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\..\..\program files\borland\cbuilder3\projects;..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/SrvDemo.cpp b/lib/ics/Cpp/Internet/Bcb4/SrvDemo.cpp new file mode 100644 index 00000000..dff1a758 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/SrvDemo.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("SrvDemo.res"); +USEFORM("..\SrvDemo1.cpp", SrvForm); +USEFORM("..\SrvDemo2.cpp", CliForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSrvForm), &SrvForm); + Application->CreateForm(__classid(TCliForm), &CliForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/TWSChat.bpr b/lib/ics/Cpp/Internet/Bcb4/TWSChat.bpr new file mode 100644 index 00000000..bbe03c34 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/TWSChat.bpr @@ -0,0 +1,203 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = TWSChat.exe +OBJFILES = TWSChat.obj ..\twschat1.obj +RESFILES = TWSChat.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\twschat1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vcl40.bpi vcldb40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/TWSChat.cpp b/lib/ics/Cpp/Internet/Bcb4/TWSChat.cpp new file mode 100644 index 00000000..561b8ded --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/TWSChat.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TWSChat.res"); +USEFORM("..\twschat1.cpp", TWSChatForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTWSChatForm), &TWSChatForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/TcpSrv.bpr b/lib/ics/Cpp/Internet/Bcb4/TcpSrv.bpr new file mode 100644 index 00000000..d83bef5a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/TcpSrv.bpr @@ -0,0 +1,208 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = TcpSrv.exe +OBJFILES = TcpSrv.obj ..\TcpSrv1.obj +RESFILES = TcpSrv.res +RESDEPEN = $(RESFILES) ..\TcpSrv1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = +SPARELIBS = VCL40.lib Icsbcb40.lib +PACKAGES = VCL40.bpi VCLX40.bpi VCLJPG40.bpi VCLMID40.bpi VCLDB40.bpi bcbsmp40.bpi \ + ibsmp40.bpi VCLDBX40.bpi QRPT40.bpi TEEUI40.bpi TEEDB40.bpi TEE40.bpi DSS40.bpi \ + Icsbcb40.bpi +DEFFILE = +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +USERDEFINES = +SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -r- -a8 -k -y -v -vi- -c -b- -w-par \ + -w-inl -Vx -tW -tWM -D$(SYSDEFINES);$(USERDEFINES) +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U..\;..\..\Internet;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -JPHNE -M +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\ /i..\..\Internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd +LFLAGS = -L..\;..\..\Internet;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=1 +Item0=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\;$(BCB)\Projects\Lib;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\;..\..\Internet;..;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(CPP32) +CPP32 = cpp32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif + +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) {$< } + +.c.i: + $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } + +.cpp.i: + $(BCB)\BIN\$(CPP32) $(CFLAG1) -n. {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/TcpSrv.cpp b/lib/ics/Cpp/Internet/Bcb4/TcpSrv.cpp new file mode 100644 index 00000000..dda5a8b1 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/TcpSrv.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TcpSrv.res"); +USEFORM("..\TcpSrv1.cpp", TcpSrvForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTcpSrvForm), &TcpSrvForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/TnClient.bpr b/lib/ics/Cpp/Internet/Bcb4/TnClient.bpr new file mode 100644 index 00000000..70134df2 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/TnClient.bpr @@ -0,0 +1,205 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = TnClient.exe +OBJFILES = TnClient.obj ..\tncli1.obj +RESFILES = TnClient.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\tncli1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/TnClient.cpp b/lib/ics/Cpp/Internet/Bcb4/TnClient.cpp new file mode 100644 index 00000000..9d2927d0 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/TnClient.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnClient.res"); +USEFORM("..\tncli1.cpp", TelnetForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTelnetForm), &TelnetForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/TnDemo.bpr b/lib/ics/Cpp/Internet/Bcb4/TnDemo.bpr new file mode 100644 index 00000000..e23d38dc --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/TnDemo.bpr @@ -0,0 +1,205 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = TnDemo.exe +OBJFILES = TnDemo.obj ..\tndemo1.obj +RESFILES = TnDemo.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\tndemo1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi vcldbx40.bpi bcbsmp40.bpi dclocx40.bpi \ + qrpt40.bpi teeui40.bpi vclsmp40.bpi teedb40.bpi tee40.bpi ibsmp40.bpi \ + nmfast40.bpi inetdb40.bpi inet40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/TnDemo.cpp b/lib/ics/Cpp/Internet/Bcb4/TnDemo.cpp new file mode 100644 index 00000000..c9c42798 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/TnDemo.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnDemo.res"); +USEFORM("..\tndemo1.cpp", TnDemoForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTnDemoForm), &TnDemoForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/TnSrv.bpr b/lib/ics/Cpp/Internet/Bcb4/TnSrv.bpr new file mode 100644 index 00000000..6462569f --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/TnSrv.bpr @@ -0,0 +1,202 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = TnSrv.exe +OBJFILES = TnSrv.obj ..\tnsrv1.obj ..\tnsrv2.obj +RESFILES = TnSrv.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\tnsrv1.dfm ..\tnsrv2.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U..\;$(BCB)\Projects\Lib;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L..\;$(BCB)\Projects\Lib;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -Gn -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/TnSrv.cpp b/lib/ics/Cpp/Internet/Bcb4/TnSrv.cpp new file mode 100644 index 00000000..935a8efa --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/TnSrv.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnSrv.res"); +USEFORM("..\tnsrv1.cpp", ServerForm); +USEFORM("..\tnsrv2.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/UdpLstn.bpr b/lib/ics/Cpp/Internet/Bcb4/UdpLstn.bpr new file mode 100644 index 00000000..a5662662 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/UdpLstn.bpr @@ -0,0 +1,203 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = UdpLstn.exe +OBJFILES = UdpLstn.obj ..\udplstn1.obj +RESFILES = UdpLstn.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\udplstn1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi vcldb40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/UdpLstn.cpp b/lib/ics/Cpp/Internet/Bcb4/UdpLstn.cpp new file mode 100644 index 00000000..e4d22699 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/UdpLstn.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("UdpLstn.res"); +USEFORM("..\udplstn1.cpp", MainForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/UdpSend.bpr b/lib/ics/Cpp/Internet/Bcb4/UdpSend.bpr new file mode 100644 index 00000000..bf6c596d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/UdpSend.bpr @@ -0,0 +1,203 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = UdpSend.exe +OBJFILES = UdpSend.obj ..\udpsend1.obj +RESFILES = UdpSend.res +DEFFILE = +RESDEPEN = $(RESFILES) ..\udpsend1.dfm +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = Icsbcb40.lib vcldb40.lib vcl40.lib +SPARELIBS = vcl40.lib vcldb40.lib Icsbcb40.lib +PACKAGES = vclx40.bpi vcl40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .;..\..\INTERNET +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -Od -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- -D$(SYSDEFINES);$(USERDEFINES) -c \ + -b- -w-par -w-inl -Vx -tW -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I"..\" -I..\..\Internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -$YD -$W -$O- -v -M -JPHNE +RFLAGS = -i..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i.. /i..\..\Internet /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL +LFLAGS = -L$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -aa -Tpe -x -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0w32.obj sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/UdpSend.cpp b/lib/ics/Cpp/Internet/Bcb4/UdpSend.cpp new file mode 100644 index 00000000..ee07b761 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb4/UdpSend.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("UdpSend.res"); +USEFORM("..\udpsend1.cpp", MainForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb4/clients.DBF b/lib/ics/Cpp/Internet/Bcb4/clients.DBF new file mode 100644 index 00000000..4f1066e9 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb4/clients.DBF differ diff --git a/lib/ics/Cpp/Internet/Bcb4/clients.MDX b/lib/ics/Cpp/Internet/Bcb4/clients.MDX new file mode 100644 index 00000000..c30a4652 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb4/clients.MDX differ diff --git a/lib/ics/Cpp/Internet/Bcb5/Bcb50Sam.bpg b/lib/ics/Cpp/Internet/Bcb5/Bcb50Sam.bpg new file mode 100644 index 00000000..b77a3037 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Bcb50Sam.bpg @@ -0,0 +1,122 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = IcsBcb50.bpl Clidemo.exe Client5.exe Client7.exe ConCli1.exe \ + ConCli2.exe Finger.exe DllTst1.exe FtpServ.exe FtpTst.exe HttpPg.exe \ + HttpTst.exe IcsDll1.dll MailRcv.exe MailSnd.exe MtSrv.exe NewsRdr.exe \ + NsLookup.exe PingTst.exe Recv.exe Sender.exe Server5.exe SocksTst.exe \ + SrvDemo.exe TcpSrv.exe TnClient.exe TnDemo.exe TnSrv.exe TWSChat.exe \ + UdpLstn.exe UdpSend.exe WebServ.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +Clidemo.exe: Clidemo.bpr + $(MAKE) + +Client5.exe: Client5.bpr + $(MAKE) + +Client7.exe: Client7.bpr + $(MAKE) + +ConCli1.exe: ConCli1.bpr + $(MAKE) + +ConCli2.exe: ConCli2.bpr + $(MAKE) + +Finger.exe: Finger.bpr + $(MAKE) + +FtpServ.exe: FtpServ.bpr + $(MAKE) + +FtpTst.exe: FtpTst.bpr + $(MAKE) + +HttpPg.exe: HttpPg.bpr + $(MAKE) + +HttpTst.exe: HttpTst.bpr + $(MAKE) + +MailRcv.exe: MailRcv.bpr + $(MAKE) + +MailSnd.exe: MailSnd.bpr + $(MAKE) + +MtSrv.exe: MtSrv.bpr + $(MAKE) + +NewsRdr.exe: NewsRdr.bpr + $(MAKE) + +NsLookup.exe: NsLookup.bpr + $(MAKE) + +PingTst.exe: PingTst.bpr + $(MAKE) + +Recv.exe: Recv.bpr + $(MAKE) + +Sender.exe: Sender.bpr + $(MAKE) + +Server5.exe: Server5.bpr + $(MAKE) + +SocksTst.exe: SocksTst.bpr + $(MAKE) + +SrvDemo.exe: SrvDemo.bpr + $(MAKE) + +TnClient.exe: TnClient.bpr + $(MAKE) + +TnDemo.exe: TnDemo.bpr + $(MAKE) + +TnSrv.exe: TnSrv.bpr + $(MAKE) + +TWSChat.exe: TWSChat.bpr + $(MAKE) + +UdpLstn.exe: UdpLstn.bpr + $(MAKE) + +UdpSend.exe: UdpSend.bpr + $(MAKE) + +TcpSrv.exe: TcpSrv.bpr + $(MAKE) + +IcsBcb50.bpl: ..\..\..\Delphi\VC32\IcsBcb50.bpk + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +DllTst1.exe: DllTst1.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +IcsDll1.dll: IcsDll1.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +WebServ.exe: WebServ.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + + diff --git a/lib/ics/Cpp/Internet/Bcb5/Clidemo.bpr b/lib/ics/Cpp/Internet/Bcb5/Clidemo.bpr new file mode 100644 index 00000000..461fd043 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Clidemo.bpr @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=3 +Build=2 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte +FileDescription= +FileVersion=1.0.3.2 +InternalName= +LegalCopyright=(c) François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=Internet Component Suite +ProductVersion=1.0.3.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=7 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item6=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/Clidemo.cpp b/lib/ics/Cpp/Internet/Bcb5/Clidemo.cpp new file mode 100644 index 00000000..c35f1658 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Clidemo.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Clidemo.res"); +USEFORM("..\CliDemo1.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/Client5.bpr b/lib/ics/Cpp/Internet/Bcb5/Client5.bpr new file mode 100644 index 00000000..b78b4afe --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Client5.bpr @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.0.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/Client5.cpp b/lib/ics/Cpp/Internet/Bcb5/Client5.cpp new file mode 100644 index 00000000..23e65ad9 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Client5.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Client5.res"); +USEFORM("..\cli5.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/Client7.bpr b/lib/ics/Cpp/Internet/Bcb5/Client7.bpr new file mode 100644 index 00000000..4a684a93 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Client7.bpr @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1998-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item2=..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item3=..\;..\..\INTERNET;..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item4=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;$(BCB)\Projects\Lib;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/Client7.cpp b/lib/ics/Cpp/Internet/Bcb5/Client7.cpp new file mode 100644 index 00000000..f7c27111 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Client7.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Client7.res"); +USEFORM("..\Cli7.cpp", Cli7Form); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TCli7Form), &Cli7Form); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/Concli1.bpr b/lib/ics/Cpp/Internet/Bcb5/Concli1.bpr new file mode 100644 index 00000000..4cca73de --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Concli1.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=Executable (Console) +FileVersion=1.0.0.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\..\..\delphi;..\..\..;..\..;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\..\delphi;D:\FPiette;..\..\..\cpp;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=$(BCB)\Projects\Lib;..\..\..\delphi;..\..\..;..\..;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\..\delphi;D:\FPiette;..\..\..\cpp;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=1 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/Concli1.cpp b/lib/ics/Cpp/Internet/Bcb5/Concli1.cpp new file mode 100644 index 00000000..73488f55 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Concli1.cpp @@ -0,0 +1,87 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: ConCli shows how to use TWSocket in a console mode application. +Creation: Nov 22, 1997 +Version: 1.02 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 12, 1998 V1.01 Adapted for BCB3 +Dec 19, 1998 V1.02 Do not use TWait control anymore. + +---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#include +#include +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USEUNIT("..\..\..\delphi\vc32\WSocket.pas"); +USERES("Concli1.res"); +//--------------------------------------------------------------------------- +#include +//--------------------------------------------------------------------------- +void main(void) +{ + TWSocket *WSocket1; + AnsiString Buffer; + + WSocket1 = new TWSocket((void *)NULL); + WSocket1->Addr = "localhost"; + WSocket1->Port = "telnet"; + WSocket1->Proto = "tcp"; + printf("Connecting to localhost/telnet...\n"); + WSocket1->Connect(); + // Connect is asynchronous (non-blocking). We will wait while the + // session is connecting or application terminated. + while (WSocket1->State == wsConnecting) { + Application->ProcessMessages(); + if (Application->Terminated) + break; + } + if (WSocket1->State == wsConnected) { + WSocket1->ReadLine(15, Buffer); + printf("Server banner is: %s\n", Buffer.c_str()); + WSocket1->Close(); + } + else { + printf("Connection failed.\n"); + } + delete WSocket1; + + printf("Hit enter..."); + getch(); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/Concli2.bpr b/lib/ics/Cpp/Internet/Bcb5/Concli2.bpr new file mode 100644 index 00000000..ac6523e5 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Concli2.bpr @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=Executable (Console) +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=1 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/Concli2.cpp b/lib/ics/Cpp/Internet/Bcb5/Concli2.cpp new file mode 100644 index 00000000..55c0d5ce --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Concli2.cpp @@ -0,0 +1,156 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: ConCli2 shows how to use TWSocket in a console mode application. + ConCli2 use a thread to make the socket run in the program + background while the foreground is busy with the user interface + (for simplicity here we just wait for the user to hit the + enter key). +Creation: Nov 22, 1997 +Version: 1.02 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 12, 1998 V1.01 Adapted for BCB3 +Dec 19, 1998 V1.02 Do not use TWait control anymore. + +---------------------------------------------------------------------------*/ +#include +#include +#include +#include +#pragma hdrstop +USEUNIT("..\BCB3\wsocket.pas"); +USERES("Concli2.res"); +//--------------------------------------------------------------------------- +#include +#include + +#define ServerHostName "localhost" +#define ServerPort "telnet" +//--------------------------------------------------------------------------- +class TWSocketThread : public TThread +{ +private: +protected: + TWSocket *FWSocket; + char FRcvBuf[1024]; + void __fastcall Execute(); + void __fastcall FWSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall FWSocketSessionConnected(TObject *Sender, WORD Error); + void __fastcall FWSocketSessionClosed(TObject *Sender, WORD Error); +public: + __fastcall TWSocketThread(); +}; +//--------------------------------------------------------------------------- +__fastcall TWSocketThread::TWSocketThread() + : TThread(TRUE) // Create suspended +{ + FreeOnTerminate = TRUE; +} +//--------------------------------------------------------------------------- +void __fastcall TWSocketThread::Execute() +{ + // Let's the user know what we are doing + printf("Connecting to server '" ServerHostName + "' on port '" ServerPort "'\n"); + + // Create the TWSocket we will use to commicate with the server + FWSocket = new TWSocket((void *)NULL); + + // Assign the event handler for the TWSocket events we care of + FWSocket->OnDataAvailable = FWSocketDataAvailable; + FWSocket->OnSessionClosed = FWSocketSessionClosed; + FWSocket->OnSessionConnected = FWSocketSessionConnected; + + // Connect to the server + FWSocket->Addr = ServerHostName; + FWSocket->Port = ServerPort; + FWSocket->Proto = "tcp"; + FWSocket->Connect(); + + // Let the TWSocket component makes his work + FWSocket->MessageLoop(); + + // We are done, destroy the objects we created + delete FWSocket; +} +//--------------------------------------------------------------------------- +// This event handler is called by the TWSocket when some data has been +// received by the lower level. +void __fastcall TWSocketThread::FWSocketDataAvailable(TObject *Sender, WORD Error) +{ + int Len; + + // Get the received data + Len = FWSocket->Receive(FRcvBuf, sizeof(FRcvBuf) - 1); + if (Len <= 0) + return; + + // Add a terminating nul byte to allow display using standard I/O + FRcvBuf[Len] = 0; + printf("%s", FRcvBuf); +} +//--------------------------------------------------------------------------- +// This event handler is called by TWSocket when the connection is +// established with the remote host +void __fastcall TWSocketThread::FWSocketSessionConnected(TObject *Sender, WORD Error) +{ + printf("Connected\n"); +} +//--------------------------------------------------------------------------- +// This event handler is called by TWSocket when the connection is broken +void __fastcall TWSocketThread::FWSocketSessionClosed(TObject *Sender, WORD Error) +{ + printf("Server has diconnected\n"); + FWSocket->Close(); +} +//--------------------------------------------------------------------------- +void main(void) +{ + TWSocketThread *WSocketThread; + + printf("Hit enter to stop the program\n"); + + // Create the socket working thread (suspended) + WSocketThread = new TWSocketThread; + + // Start the thread + WSocketThread->Resume(); + + // The main thread continue here. Process user request here. + getch(); + + // We are done, quit the program + printf("Ok.\n"); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/Bcb5/DllTst1.bpr b/lib/ics/Cpp/Internet/Bcb5/DllTst1.bpr new file mode 100644 index 00000000..7ea68372 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/DllTst1.bpr @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/DllTst1.cpp b/lib/ics/Cpp/Internet/Bcb5/DllTst1.cpp new file mode 100644 index 00000000..83827d2d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/DllTst1.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USERES("DllTst1.res"); +USEFORM("..\DllTst1.cpp", DllTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TDllTestForm), &DllTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/Finger.bpr b/lib/ics/Cpp/Internet/Bcb5/Finger.bpr new file mode 100644 index 00000000..571a4fa1 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Finger.bpr @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=6 +Item0=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/Finger.cpp b/lib/ics/Cpp/Internet/Bcb5/Finger.cpp new file mode 100644 index 00000000..4a23becf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Finger.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Finger.res"); +USEFORM("..\finger1.cpp", FingerDemoForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFingerDemoForm), &FingerDemoForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/FtpTst.bpr b/lib/ics/Cpp/Internet/Bcb5/FtpTst.bpr new file mode 100644 index 00000000..90d04e8c --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/FtpTst.bpr @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=6 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/FtpTst.cpp b/lib/ics/Cpp/Internet/Bcb5/FtpTst.cpp new file mode 100644 index 00000000..4c16d20a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/FtpTst.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("FtpTst.res"); +USEFORM("..\ftptst1.cpp", FtpReceiveForm); +USEFORM("..\Ftptst2.cpp", DirectoryForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFtpReceiveForm), &FtpReceiveForm); + Application->CreateForm(__classid(TDirectoryForm), &DirectoryForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/Ftpserv.bpr b/lib/ics/Cpp/Internet/Bcb5/Ftpserv.bpr new file mode 100644 index 00000000..cebe46c7 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Ftpserv.bpr @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1998-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=6 +Item0=..\;..\..\Internet;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\Internet;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\;..\..\INTERNET;..\..\..\delphi\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..\..\..\delphi\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/Ftpserv.cpp b/lib/ics/Cpp/Internet/Bcb5/Ftpserv.cpp new file mode 100644 index 00000000..07a81a5c --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Ftpserv.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Ftpserv.res"); +USEFORM("..\FtpSrv1.cpp", FtpServerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFtpServerForm), &FtpServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/HttpPg.bpr b/lib/ics/Cpp/Internet/Bcb5/HttpPg.bpr new file mode 100644 index 00000000..ca799b94 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/HttpPg.bpr @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1998-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/HttpPg.cpp b/lib/ics/Cpp/Internet/Bcb5/HttpPg.cpp new file mode 100644 index 00000000..5bb474b4 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/HttpPg.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("HttpPg.res"); +USEFORM("..\httppg1.cpp", HttpTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(THttpTestForm), &HttpTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/HttpTst.bpr b/lib/ics/Cpp/Internet/Bcb5/HttpTst.bpr new file mode 100644 index 00000000..743dd58e --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/HttpTst.bpr @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=4 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.4.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=7 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item6=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=8 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item7=$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/HttpTst.cpp b/lib/ics/Cpp/Internet/Bcb5/HttpTst.cpp new file mode 100644 index 00000000..e904bcd4 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/HttpTst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("HttpTst.res"); +USEFORM("..\httptst1.cpp", HttpTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(THttpTestForm), &HttpTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/IcsDll1.bpf b/lib/ics/Cpp/Internet/Bcb5/IcsDll1.bpf new file mode 100644 index 00000000..7738d86b --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/IcsDll1.bpf @@ -0,0 +1,6 @@ +USEUNIT("IcsDll1.cpp"); +USEUNIT("..\..\..\Delphi\VC32\WSocket.pas"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + DllMain \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/IcsDll1.bpr b/lib/ics/Cpp/Internet/Bcb5/IcsDll1.bpr new file mode 100644 index 00000000..b5a6c083 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/IcsDll1.bpr @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=$(BCB)\include;$(BCB)\include\vcl;..\..\..\Delphi\vc32 +Item1=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=$(BCB)\Projects\Lib;..\..\..\Delphi\VC32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication=D:\FPiette\cpp\Internet\Bcb5\DllTst1.exe +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/IcsDll1.cpp b/lib/ics/Cpp/Internet/Bcb5/IcsDll1.cpp new file mode 100644 index 00000000..81f52437 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/IcsDll1.cpp @@ -0,0 +1,273 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Creation: April 08, 2000 +Description: This is a demo showing how to use a TWSocket component in a DLL. + This demo must be used with ICS TcpSrv demo program as a server. + The DLL is a client which connect to the server and send "time" + command, then wait for the reply and return it in the buffer + passed to the DLL. + There is only one function exported from the DLL: IcsDllDemo. + It takes four arguments: a pointer to the hostname to connect to, + a pointer to the port, a pointer to a buffer and a pointer for + buffer size. On entry buffer size must be initialised with the + size of the actual buffer. On exit, it is filled with the + actual reply size. The function's return value is the error code + such as 10061 when the server is not running. +Version: 1.00 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2000-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + +---------------------------------------------------------------------------*/ +#include +#include +#pragma hdrstop +#pragma argsused +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +extern "C" __declspec(dllexport) int __stdcall IcsDllDemo(char *HostName, + char *Port, + char *Buffer, + int *BufSize); +void StrToBuffer(char *Buffer, int *BufSize, char *Msg); +//--------------------------------------------------------------------------- +// We use a workerthread to do the job. +// This will allows the DLL to be called by several processes simultaneously +class TClientThread : public TThread +{ +private: + TWSocket *FClientSocket; + void __fastcall ClientWSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall ClientWSocketSessionClosed(TObject *Sender, WORD Error); + void __fastcall ClientWSocketSessionConnected(TObject *Sender, WORD Error); +protected: + AnsiString FHostName; + AnsiString FPort; + int *FErrorCode; + BOOL FBannerReceived; + char *FBuffer; + int *FBufSize; + void __fastcall Execute(); +public: + __fastcall TClientThread(); + __fastcall ~TClientThread(); + __property char *Buffer = {read=FBuffer, write=FBuffer}; + __property int *BufSize = {read=FBufSize, write=FBufSize}; + __property int *ErrorCode = {read=FErrorCode, write=FErrorCode}; + __property AnsiString HostName = {read=FHostName, write=FHostName}; + __property AnsiString Port = {read=FPort, write=FPort}; +}; +//--------------------------------------------------------------------------- +// Create a new thread in the blocked state. This allow the user to register +// the client thread before it actually start working. +__fastcall TClientThread::TClientThread() + : TThread(TRUE) +{ + FreeOnTerminate = TRUE; +} +//--------------------------------------------------------------------------- +// Destroy the thread. Destroy the ClientWSocket if needed. +__fastcall TClientThread::~TClientThread() +{ + if (FClientSocket != NULL) { + FClientSocket->~TWSocket(); + FClientSocket = NULL; + } +} +//--------------------------------------------------------------------------- +// This is the main thread routine. There is not much to do because TWSocket +// is event drive. So everythong to do is done inside an event handler, +// mostly the OnDataAvailable event handler which is triggered each time +// something is received. +void __fastcall TClientThread::Execute() +{ + try { + // Create the client TWSocket. It is important to create it inside the + // Execute method because it *must* be created by the thread. Otherwise + // the messages sent by winsock would be processed in the main thread + // context, effectively disabling multi-threading. + FClientSocket = new TWSocket(NULL); + FClientSocket->OnDataAvailable = ClientWSocketDataAvailable; + FClientSocket->OnSessionConnected = ClientWSocketSessionConnected; + FClientSocket->OnSessionClosed = ClientWSocketSessionClosed; + FClientSocket->LineMode = TRUE; + FClientSocket->Addr = FHostName; + FClientSocket->Port = FPort; + FClientSocket->Proto = "tcp"; + FClientSocket->Connect(); + + // Message loop to handle TWSocket messages + // The loop is exited when WM_QUIT message is received + FClientSocket->MessageLoop(); + } + catch (Exception &E) + { + AnsiString Buf; + Buf = E.ClassName(); + Buf = Buf + ": " + E.Message; + *FErrorCode = -3; + StrToBuffer(Buffer, BufSize, Buf.c_str()); + } + + // Returning from the Execute function effectively terminate the thread +} +//--------------------------------------------------------------------------- +// This event handler is called when the client connection is established. +void __fastcall TClientThread::ClientWSocketSessionConnected( + TObject *Sender, WORD Error) +{ + if (Error) { + *FErrorCode = Error; + StrToBuffer(Buffer, BufSize, "Connect failed"); + PostMessage(FClientSocket->Handle, WM_QUIT, 0, 0); + } +} +//--------------------------------------------------------------------------- +// This event handler is called when the client connection is closed. +void __fastcall TClientThread::ClientWSocketSessionClosed( + TObject *Sender, WORD Error) +{ + PostMessage(FClientSocket->Handle, WM_QUIT, 0, 0); +} +//--------------------------------------------------------------------------- +// This event handler is called when data has been received from server. +// Since this sample program use line mode, we comes here only when a +// complete line has been received. +void __fastcall TClientThread::ClientWSocketDataAvailable( + TObject *Sender, WORD Error) +{ + AnsiString RcvBuffer; + + // Received the line + RcvBuffer = FClientSocket->ReceiveStr(); + // Check if we already received the banner (message sent by server + // as soon as we are connected. + if (!FBannerReceived) { + // We are just receiving the banner. Flag as received + FBannerReceived = TRUE; + // Then send the command to the server + FClientSocket->SendStr("time\r\n"); + } + else { + // We already received then banner. So this must be the answer + // to our command. Copy to the buffer, without trailling CR/LF + // and without overflowing the given buffer + if (RcvBuffer.Length() < *BufSize) + *BufSize = RcvBuffer.Length() - 2; // Remove CR/LF + if (*BufSize > 0) + memcpy(Buffer, RcvBuffer.data(), *BufSize); + // Then just close the communication + FClientSocket->CloseDelayed(); + *FErrorCode = 0; + } +} +//--------------------------------------------------------------------------- +// Copy a string to a buffer with overflow check. +void StrToBuffer(char *Buffer, int *BufSize, char *Msg) +{ + int Len; + + if ((Len = strlen(Msg)) < *BufSize) + *BufSize = Len; + if (*BufSize > 0) + memcpy(Buffer, Msg, *BufSize); +} +//--------------------------------------------------------------------------- +// This is the function exported from the DLL. It is intended to be called +// from the application using the DLL. +int __stdcall IcsDllDemo( + char *HostName, + char *Port, + char *Buffer, + int *BufSize) +{ + TClientThread *WorkerThread; + int Result; + + try { + Result = -1; + // Create a new thread. It is created in sleeping state + WorkerThread = new TClientThread; + // Then pass all parameters + WorkerThread->Buffer = Buffer; + WorkerThread->BufSize = BufSize; + WorkerThread->ErrorCode = &Result; + WorkerThread->HostName = HostName; + WorkerThread->Port = Port; + // Then let thread start his work + WorkerThread->Resume(); + // And wait until it finishes + WaitForSingleObject((void *)WorkerThread->Handle, INFINITE); + } + catch (Exception &E) + { + AnsiString Buf; + Buf = E.ClassName(); + Buf = Buf + ": " + E.Message; + Result = -2; + StrToBuffer(Buffer, BufSize, Buf.c_str()); + } + return(Result); +}; +//--------------------------------------------------------------------------- +// This function is called by Windows when the DLL is loaded/unloaded and +// each time a thread attach/detach from the DLL +BOOL WINAPI DllEntryPoint( + HINSTANCE hinstDLL, DWORD fwdreason, LPVOID lpvReserved) +{ + switch (fwdreason) { + case DLL_PROCESS_ATTACH: + // Increment WSocket reference count. This will make sure winsock will + // remains loaded. This is because there is no permanent TWSocket + // component created. + WSocketGCount++; + // This will load winsock and call WSAStartup + WSocketGetProc(""); + break; + case DLL_PROCESS_DETACH: + // Decrement WSocket reference count. + WSocketGCount--; + // If reference count goes to zero, then unload winsock. + if (WSocketGCount <= 0) { + WSocketUnloadWinsock(); + WSocketGCount = 0; + } + break; + } + return(1); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/MailRcv.bpr b/lib/ics/Cpp/Internet/Bcb5/MailRcv.bpr new file mode 100644 index 00000000..0a5b6192 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/MailRcv.bpr @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;D:\program files\borland\cbuilder3\projects\;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item1=..\;..\..\Internet;D:\program files\borland\cbuilder3\projects\;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item2=..\;..\..\Internet;..\..\..\..\program files\borland\cbuilder3\projects;..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item3=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;..;$(BCB)\Projects\Lib;D:\program files\borland\cbuilder3\projects\;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..\..\Internet;D:\program files\borland\cbuilder3\projects\;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\..\program files\borland\cbuilder3\projects;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/MailRcv.cpp b/lib/ics/Cpp/Internet/Bcb5/MailRcv.cpp new file mode 100644 index 00000000..f7337c6d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/MailRcv.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MailRcv.res"); +USEFORM("..\MailRcv1.cpp", POP3ExcercizerForm); +USEFORM("..\MailRcv2.cpp", MessageForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPOP3ExcercizerForm), &POP3ExcercizerForm); + Application->CreateForm(__classid(TMessageForm), &MessageForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/MailSnd.bpr b/lib/ics/Cpp/Internet/Bcb5/MailSnd.bpr new file mode 100644 index 00000000..b4df6e17 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/MailSnd.bpr @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F.Piette) +FileDescription= +FileVersion=2.0.1.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=7 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item6=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=6 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/MailSnd.cpp b/lib/ics/Cpp/Internet/Bcb5/MailSnd.cpp new file mode 100644 index 00000000..73acc8cf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/MailSnd.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MailSnd.res"); +USEFORM("..\MailSnd1.cpp", MailSndForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMailSndForm), &MailSndForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/MtSrv.bpr b/lib/ics/Cpp/Internet/Bcb5/MtSrv.bpr new file mode 100644 index 00000000..8f0ce749 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/MtSrv.bpr @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexukt.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/MtSrv.cpp b/lib/ics/Cpp/Internet/Bcb5/MtSrv.cpp new file mode 100644 index 00000000..604fb14b --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/MtSrv.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MtSrv.res"); +USEFORM("..\mtsrv1.cpp", ServerForm); +USEUNIT("..\mtsrv2.cpp"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/NewsRdr.bpr b/lib/ics/Cpp/Internet/Bcb5/NewsRdr.bpr new file mode 100644 index 00000000..9a4fc148 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/NewsRdr.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1998-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/NewsRdr.cpp b/lib/ics/Cpp/Internet/Bcb5/NewsRdr.cpp new file mode 100644 index 00000000..28968e2f --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/NewsRdr.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("NewsRdr.res"); +USEFORM("..\newsrdr1.cpp", NNTPForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TNNTPForm), &NNTPForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/NsLookup.bpr b/lib/ics/Cpp/Internet/Bcb5/NsLookup.bpr new file mode 100644 index 00000000..1a695341 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/NsLookup.bpr @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1999-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=6 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/NsLookup.cpp b/lib/ics/Cpp/Internet/Bcb5/NsLookup.cpp new file mode 100644 index 00000000..66545f54 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/NsLookup.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("NsLookup.res"); +USEFORM("..\NsLook1.cpp", NsLookupForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TNsLookupForm), &NsLookupForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/PingTst.bpr b/lib/ics/Cpp/Internet/Bcb5/PingTst.bpr new file mode 100644 index 00000000..3951f4ca --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/PingTst.bpr @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=1 +Release=0 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.1.0.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indeuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/PingTst.cpp b/lib/ics/Cpp/Internet/Bcb5/PingTst.cpp new file mode 100644 index 00000000..81d9720a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/PingTst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("PingTst.res"); +USEFORM("..\pingtst1.cpp", PingTstForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPingTstForm), &PingTstForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/PopTst.cpp b/lib/ics/Cpp/Internet/Bcb5/PopTst.cpp new file mode 100644 index 00000000..02b0714c --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/PopTst.cpp @@ -0,0 +1,27 @@ +//--------------------------------------------------------------------------- +// This is an outdated sample program which use an outdated POP3 component. +// For new programs, use new POP3 component in Pop3Prot.pas source file. +// New sample program is called MailRcv. The new component is not 100% +// compatible with the old one because the new is fully asynchronous. +// Name has been slightly changed to allow installation of both component +// if you need to support old code. +#include +#pragma hdrstop +USERES("PopTst.res"); +USEFORM("..\Poptst1.cpp", POP3ExcercizerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPOP3ExcercizerForm), &POP3ExcercizerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/Recv.bpr b/lib/ics/Cpp/Internet/Bcb5/Recv.bpr new file mode 100644 index 00000000..511d615a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Recv.bpr @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=3 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.3.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=6 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/Recv.cpp b/lib/ics/Cpp/Internet/Bcb5/Recv.cpp new file mode 100644 index 00000000..d08544d2 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Recv.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Recv.res"); +USEFORM("..\Recv1.cpp", RecvForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TRecvForm), &RecvForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/Sender.bpr b/lib/ics/Cpp/Internet/Bcb5/Sender.bpr new file mode 100644 index 00000000..f02b4590 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Sender.bpr @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=3 +Build=2 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.3.2 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=7 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/Sender.cpp b/lib/ics/Cpp/Internet/Bcb5/Sender.cpp new file mode 100644 index 00000000..7c1a2c4a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Sender.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Sender.res"); +USEFORM("..\Sender1.cpp", SenderForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSenderForm), &SenderForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/Server5.bpr b/lib/ics/Cpp/Internet/Bcb5/Server5.bpr new file mode 100644 index 00000000..ce245e30 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Server5.bpr @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=2.0.2.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/Server5.cpp b/lib/ics/Cpp/Internet/Bcb5/Server5.cpp new file mode 100644 index 00000000..80e8effb --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/Server5.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Server5.res"); +USEFORM("..\srv5.cpp", ServerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/SocksTst.bpr b/lib/ics/Cpp/Internet/Bcb5/SocksTst.bpr new file mode 100644 index 00000000..148f2776 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/SocksTst.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1998-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item2=..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item3=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/SocksTst.cpp b/lib/ics/Cpp/Internet/Bcb5/SocksTst.cpp new file mode 100644 index 00000000..053a96ce --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/SocksTst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("SocksTst.res"); +USEFORM("..\Socks1.cpp", SocksTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSocksTestForm), &SocksTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/SrvDemo.bpr b/lib/ics/Cpp/Internet/Bcb5/SrvDemo.bpr new file mode 100644 index 00000000..5341b1fd --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/SrvDemo.bpr @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=6 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\..\..\program files\borland\cbuilder3\projects;..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/SrvDemo.cpp b/lib/ics/Cpp/Internet/Bcb5/SrvDemo.cpp new file mode 100644 index 00000000..dff1a758 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/SrvDemo.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("SrvDemo.res"); +USEFORM("..\SrvDemo1.cpp", SrvForm); +USEFORM("..\SrvDemo2.cpp", CliForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSrvForm), &SrvForm); + Application->CreateForm(__classid(TCliForm), &CliForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/TWSChat.bpr b/lib/ics/Cpp/Internet/Bcb5/TWSChat.bpr new file mode 100644 index 00000000..4d309736 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/TWSChat.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=3 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.3.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/TWSChat.cpp b/lib/ics/Cpp/Internet/Bcb5/TWSChat.cpp new file mode 100644 index 00000000..561b8ded --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/TWSChat.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TWSChat.res"); +USEFORM("..\twschat1.cpp", TWSChatForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTWSChatForm), &TWSChatForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/TcpSrv.bpr b/lib/ics/Cpp/Internet/Bcb5/TcpSrv.bpr new file mode 100644 index 00000000..2f2273c9 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/TcpSrv.bpr @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.0.1 +InternalName= +LegalCopyright=(c) 1999-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..\..\Internet;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;$(BCB)\Projects\Lib;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=$(BCB)\Projects\Lib;..\;..\..\Internet;..;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/TcpSrv.cpp b/lib/ics/Cpp/Internet/Bcb5/TcpSrv.cpp new file mode 100644 index 00000000..dda5a8b1 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/TcpSrv.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TcpSrv.res"); +USEFORM("..\TcpSrv1.cpp", TcpSrvForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTcpSrvForm), &TcpSrvForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/TnClient.bpr b/lib/ics/Cpp/Internet/Bcb5/TnClient.bpr new file mode 100644 index 00000000..d1969e8b --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/TnClient.bpr @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=5 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=2.0.5.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=htpp://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/TnClient.cpp b/lib/ics/Cpp/Internet/Bcb5/TnClient.cpp new file mode 100644 index 00000000..9d2927d0 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/TnClient.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnClient.res"); +USEFORM("..\tncli1.cpp", TelnetForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTelnetForm), &TelnetForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/TnDemo.bpr b/lib/ics/Cpp/Internet/Bcb5/TnDemo.bpr new file mode 100644 index 00000000..3ac41f08 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/TnDemo.bpr @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/TnDemo.cpp b/lib/ics/Cpp/Internet/Bcb5/TnDemo.cpp new file mode 100644 index 00000000..c9c42798 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/TnDemo.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnDemo.res"); +USEFORM("..\tndemo1.cpp", TnDemoForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTnDemoForm), &TnDemoForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/TnSrv.bpr b/lib/ics/Cpp/Internet/Bcb5/TnSrv.bpr new file mode 100644 index 00000000..5f0a046d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/TnSrv.bpr @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;$(BCB)\Projects\Lib;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/TnSrv.cpp b/lib/ics/Cpp/Internet/Bcb5/TnSrv.cpp new file mode 100644 index 00000000..935a8efa --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/TnSrv.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnSrv.res"); +USEFORM("..\tnsrv1.cpp", ServerForm); +USEFORM("..\tnsrv2.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/UdpLstn.bpr b/lib/ics/Cpp/Internet/Bcb5/UdpLstn.bpr new file mode 100644 index 00000000..1ebf04f7 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/UdpLstn.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=3 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=2.0.3.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/UdpLstn.cpp b/lib/ics/Cpp/Internet/Bcb5/UdpLstn.cpp new file mode 100644 index 00000000..e4d22699 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/UdpLstn.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("UdpLstn.res"); +USEFORM("..\udplstn1.cpp", MainForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/UdpSend.bpr b/lib/ics/Cpp/Internet/Bcb5/UdpSend.bpr new file mode 100644 index 00000000..d2c72293 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/UdpSend.bpr @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=3 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=Overbyte (F. Piette) +FileDescription= +FileVersion=2.0.3.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/UdpSend.cpp b/lib/ics/Cpp/Internet/Bcb5/UdpSend.cpp new file mode 100644 index 00000000..ee07b761 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/UdpSend.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("UdpSend.res"); +USEFORM("..\udpsend1.cpp", MainForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/WebServ.bpr b/lib/ics/Cpp/Internet/Bcb5/WebServ.bpr new file mode 100644 index 00000000..8175fd7c --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/WebServ.bpr @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\;..\..\Internet;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb5/WebServ.cpp b/lib/ics/Cpp/Internet/Bcb5/WebServ.cpp new file mode 100644 index 00000000..7253ce67 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb5/WebServ.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USERES("WebServ.res"); +USEFORM("..\WebServ1.cpp", WebServForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TWebServForm), &WebServForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb5/clients.DBF b/lib/ics/Cpp/Internet/Bcb5/clients.DBF new file mode 100644 index 00000000..4f1066e9 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb5/clients.DBF differ diff --git a/lib/ics/Cpp/Internet/Bcb5/clients.MDX b/lib/ics/Cpp/Internet/Bcb5/clients.MDX new file mode 100644 index 00000000..c30a4652 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb5/clients.MDX differ diff --git a/lib/ics/Cpp/Internet/Bcb6/Bcb60Sam.bpg b/lib/ics/Cpp/Internet/Bcb6/Bcb60Sam.bpg new file mode 100644 index 00000000..ecde1501 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Bcb60Sam.bpg @@ -0,0 +1,122 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = IcsBcb60.bpl Clidemo.exe Client5.exe Client7.exe ConCli1.exe \ + ConCli2.exe Finger.exe DllTst1.exe FtpServ.exe FtpTst.exe HttpPg.exe \ + HttpTst.exe IcsDll1.dll MailRcv.exe MailSnd.exe MtSrv.exe NewsRdr.exe \ + NsLookup.exe PingTst.exe Recv.exe Sender.exe Server5.exe SocksTst.exe \ + SrvDemo.exe TcpSrv.exe TnClient.exe TnDemo.exe TnSrv.exe TWSChat.exe \ + UdpLstn.exe UdpSend.exe WebServ.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +Clidemo.exe: Clidemo.bpr + $(MAKE) + +Client5.exe: Client5.bpr + $(MAKE) + +Client7.exe: Client7.bpr + $(MAKE) + +ConCli1.exe: ConCli1.bpr + $(MAKE) + +ConCli2.exe: ConCli2.bpr + $(MAKE) + +Finger.exe: Finger.bpr + $(MAKE) + +FtpServ.exe: FtpServ.bpr + $(MAKE) + +FtpTst.exe: FtpTst.bpr + $(MAKE) + +HttpPg.exe: HttpPg.bpr + $(MAKE) + +HttpTst.exe: HttpTst.bpr + $(MAKE) + +MailRcv.exe: MailRcv.bpr + $(MAKE) + +MailSnd.exe: MailSnd.bpr + $(MAKE) + +MtSrv.exe: MtSrv.bpr + $(MAKE) + +NewsRdr.exe: NewsRdr.bpr + $(MAKE) + +NsLookup.exe: NsLookup.bpr + $(MAKE) + +PingTst.exe: PingTst.bpr + $(MAKE) + +Recv.exe: Recv.bpr + $(MAKE) + +Sender.exe: Sender.bpr + $(MAKE) + +Server5.exe: Server5.bpr + $(MAKE) + +SocksTst.exe: SocksTst.bpr + $(MAKE) + +SrvDemo.exe: SrvDemo.bpr + $(MAKE) + +TnClient.exe: TnClient.bpr + $(MAKE) + +TnDemo.exe: TnDemo.bpr + $(MAKE) + +TnSrv.exe: TnSrv.bpr + $(MAKE) + +TWSChat.exe: TWSChat.bpr + $(MAKE) + +UdpLstn.exe: UdpLstn.bpr + $(MAKE) + +UdpSend.exe: UdpSend.bpr + $(MAKE) + +TcpSrv.exe: TcpSrv.bpr + $(MAKE) + +IcsBcb60.bpl: ..\..\..\Delphi\VC32\IcsBcb60.bpk + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +DllTst1.exe: DllTst1.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +IcsDll1.dll: IcsDll1.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + +WebServ.exe: WebServ.bpr + $(ROOT)\bin\bpr2mak $** + $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak + + diff --git a/lib/ics/Cpp/Internet/Bcb6/Clidemo.bpr b/lib/ics/Cpp/Internet/Bcb6/Clidemo.bpr new file mode 100644 index 00000000..68d51c62 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Clidemo.bpr @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=3 +Build=2 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte +FileDescription= +FileVersion=1.0.3.2 +InternalName= +LegalCopyright=(c) François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=Internet Component Suite +ProductVersion=1.0.3.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[Excluded Packages] +d:\program files\borland\cbuilder6\Projects\Bpl\MwBcb60.bpl=MwBcb60 + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=7 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item6=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/Clidemo.cpp b/lib/ics/Cpp/Internet/Bcb6/Clidemo.cpp new file mode 100644 index 00000000..c35f1658 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Clidemo.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Clidemo.res"); +USEFORM("..\CliDemo1.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/Client5.bpr b/lib/ics/Cpp/Internet/Bcb6/Client5.bpr new file mode 100644 index 00000000..6693df31 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Client5.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.0.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/Client5.cpp b/lib/ics/Cpp/Internet/Bcb6/Client5.cpp new file mode 100644 index 00000000..23e65ad9 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Client5.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Client5.res"); +USEFORM("..\cli5.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/Client7.bpr b/lib/ics/Cpp/Internet/Bcb6/Client7.bpr new file mode 100644 index 00000000..dff675cf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Client7.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1998-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item2=..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item3=..\;..\..\INTERNET;..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item4=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;$(BCB)\Projects\Lib;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/Client7.cpp b/lib/ics/Cpp/Internet/Bcb6/Client7.cpp new file mode 100644 index 00000000..f7c27111 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Client7.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Client7.res"); +USEFORM("..\Cli7.cpp", Cli7Form); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TCli7Form), &Cli7Form); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/ConCli1.bpr b/lib/ics/Cpp/Internet/Bcb6/ConCli1.bpr new file mode 100644 index 00000000..b5cc9371 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/ConCli1.bpr @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=3 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=Executable (Console) +FileVersion=1.0.0.3 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\..\delphi;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\..\delphi;..\..\..;..\..;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\..\delphi;D:\FPiette;..\..\..\cpp;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=6 +Item0=$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\..\delphi;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\..\delphi;..\..\..;..\..;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\..\..\delphi;D:\FPiette;..\..\..\cpp;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=1 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/ConCli2.bpr b/lib/ics/Cpp/Internet/Bcb6/ConCli2.bpr new file mode 100644 index 00000000..ec73ca73 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/ConCli2.bpr @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=3 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=Executable (Console) +FileVersion=1.0.0.3 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\..\delphi;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\..\delphi;..\..\..;..\..;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\..\delphi;D:\FPiette;..\..\..\cpp;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=6 +Item0=$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\..\delphi;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\..\delphi;..\..\..;..\..;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\..\..\delphi;D:\FPiette;..\..\..\cpp;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=1 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/ConCli2.cpp b/lib/ics/Cpp/Internet/Bcb6/ConCli2.cpp new file mode 100644 index 00000000..f3d791d8 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/ConCli2.cpp @@ -0,0 +1,155 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: ConCli2 shows how to use TWSocket in a console mode application. + ConCli2 use a thread to make the socket run in the program + background while the foreground is busy with the user interface + (for simplicity here we just wait for the user to hit the + enter key). +Creation: Nov 22, 1997 +Version: 1.02 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 12, 1998 V1.01 Adapted for BCB3 +Dec 19, 1998 V1.02 Do not use TWait control anymore. + +---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#include +#include +#include +#pragma hdrstop +#include + +#define ServerHostName "localhost" +#define ServerPort "telnet" +//--------------------------------------------------------------------------- +class TWSocketThread : public TThread +{ +private: +protected: + TWSocket *FWSocket; + char FRcvBuf[1024]; + void __fastcall Execute(); + void __fastcall FWSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall FWSocketSessionConnected(TObject *Sender, WORD Error); + void __fastcall FWSocketSessionClosed(TObject *Sender, WORD Error); +public: + __fastcall TWSocketThread(); +}; +//--------------------------------------------------------------------------- +__fastcall TWSocketThread::TWSocketThread() + : TThread(TRUE) // Create suspended +{ + FreeOnTerminate = TRUE; +} +//--------------------------------------------------------------------------- +void __fastcall TWSocketThread::Execute() +{ + // Let's the user know what we are doing + printf("Connecting to server '" ServerHostName + "' on port '" ServerPort "'\n"); + + // Create the TWSocket we will use to commicate with the server + FWSocket = new TWSocket((void *)NULL); + + // Assign the event handler for the TWSocket events we care of + FWSocket->OnDataAvailable = FWSocketDataAvailable; + FWSocket->OnSessionClosed = FWSocketSessionClosed; + FWSocket->OnSessionConnected = FWSocketSessionConnected; + + // Connect to the server + FWSocket->Addr = ServerHostName; + FWSocket->Port = ServerPort; + FWSocket->Proto = "tcp"; + FWSocket->Connect(); + + // Let the TWSocket component makes his work + FWSocket->MessageLoop(); + + // We are done, destroy the objects we created + delete FWSocket; +} +//--------------------------------------------------------------------------- +// This event handler is called by the TWSocket when some data has been +// received by the lower level. +void __fastcall TWSocketThread::FWSocketDataAvailable(TObject *Sender, WORD Error) +{ + int Len; + + // Get the received data + Len = FWSocket->Receive(FRcvBuf, sizeof(FRcvBuf) - 1); + if (Len <= 0) + return; + + // Add a terminating nul byte to allow display using standard I/O + FRcvBuf[Len] = 0; + printf("%s", FRcvBuf); +} +//--------------------------------------------------------------------------- +// This event handler is called by TWSocket when the connection is +// established with the remote host +void __fastcall TWSocketThread::FWSocketSessionConnected(TObject *Sender, WORD Error) +{ + printf("Connected\n"); +} +//--------------------------------------------------------------------------- +// This event handler is called by TWSocket when the connection is broken +void __fastcall TWSocketThread::FWSocketSessionClosed(TObject *Sender, WORD Error) +{ + printf("Server has diconnected\n"); + FWSocket->Close(); +} +//--------------------------------------------------------------------------- +void main(void) +{ + TWSocketThread *WSocketThread; + + printf("Hit enter to stop the program\n"); + + // Create the socket working thread (suspended) + WSocketThread = new TWSocketThread; + + // Start the thread + WSocketThread->Resume(); + + // The main thread continue here. Process user request here. + getch(); + + // We are done, quit the program + printf("Ok.\n"); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/Bcb6/Concli1.cpp b/lib/ics/Cpp/Internet/Bcb6/Concli1.cpp new file mode 100644 index 00000000..73488f55 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Concli1.cpp @@ -0,0 +1,87 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: ConCli shows how to use TWSocket in a console mode application. +Creation: Nov 22, 1997 +Version: 1.02 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 12, 1998 V1.01 Adapted for BCB3 +Dec 19, 1998 V1.02 Do not use TWait control anymore. + +---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#include +#include +#include +#pragma hdrstop +//--------------------------------------------------------------------------- +USEUNIT("..\..\..\delphi\vc32\WSocket.pas"); +USERES("Concli1.res"); +//--------------------------------------------------------------------------- +#include +//--------------------------------------------------------------------------- +void main(void) +{ + TWSocket *WSocket1; + AnsiString Buffer; + + WSocket1 = new TWSocket((void *)NULL); + WSocket1->Addr = "localhost"; + WSocket1->Port = "telnet"; + WSocket1->Proto = "tcp"; + printf("Connecting to localhost/telnet...\n"); + WSocket1->Connect(); + // Connect is asynchronous (non-blocking). We will wait while the + // session is connecting or application terminated. + while (WSocket1->State == wsConnecting) { + Application->ProcessMessages(); + if (Application->Terminated) + break; + } + if (WSocket1->State == wsConnected) { + WSocket1->ReadLine(15, Buffer); + printf("Server banner is: %s\n", Buffer.c_str()); + WSocket1->Close(); + } + else { + printf("Connection failed.\n"); + } + delete WSocket1; + + printf("Hit enter..."); + getch(); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/DllTst1.bpr b/lib/ics/Cpp/Internet/Bcb6/DllTst1.bpr new file mode 100644 index 00000000..44e9a812 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/DllTst1.bpr @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/DllTst1.cpp b/lib/ics/Cpp/Internet/Bcb6/DllTst1.cpp new file mode 100644 index 00000000..83827d2d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/DllTst1.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USERES("DllTst1.res"); +USEFORM("..\DllTst1.cpp", DllTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TDllTestForm), &DllTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/Finger.bpr b/lib/ics/Cpp/Internet/Bcb6/Finger.bpr new file mode 100644 index 00000000..1dabae89 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Finger.bpr @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=6 +Item0=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\;..\..\INTERNET;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/Finger.cpp b/lib/ics/Cpp/Internet/Bcb6/Finger.cpp new file mode 100644 index 00000000..4a23becf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Finger.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Finger.res"); +USEFORM("..\finger1.cpp", FingerDemoForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFingerDemoForm), &FingerDemoForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/FtpServ.bpr b/lib/ics/Cpp/Internet/Bcb6/FtpServ.bpr new file mode 100644 index 00000000..fd240e76 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/FtpServ.bpr @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=2 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.2 +InternalName= +LegalCopyright=(c) 1998-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[Excluded Packages] +d:\program files\borland\cbuilder6\Projects\Bpl\MwBcb60.bpl=MwBcb60 + +[HistoryLists\hlIncludePath] +Count=7 +Item0=..\..;..\;..;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\Internet;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\Internet;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\;..\..\INTERNET;..\..\..\delphi\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item6=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=6 +Item0=..\..;..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=$(BCB)\Projects\Lib;..\;..\..\INTERNET;..\..\..\delphi\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/FtpTst.bpr b/lib/ics/Cpp/Internet/Bcb6/FtpTst.bpr new file mode 100644 index 00000000..cc10bbf9 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/FtpTst.bpr @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=6 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..;..\..\INTERNET;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/FtpTst.cpp b/lib/ics/Cpp/Internet/Bcb6/FtpTst.cpp new file mode 100644 index 00000000..4c16d20a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/FtpTst.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("FtpTst.res"); +USEFORM("..\ftptst1.cpp", FtpReceiveForm); +USEFORM("..\Ftptst2.cpp", DirectoryForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFtpReceiveForm), &FtpReceiveForm); + Application->CreateForm(__classid(TDirectoryForm), &DirectoryForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/Ftpserv.cpp b/lib/ics/Cpp/Internet/Bcb6/Ftpserv.cpp new file mode 100644 index 00000000..6941f7bd --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Ftpserv.cpp @@ -0,0 +1,20 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USEFORM("..\FtpSrv1.cpp", FtpServerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TFtpServerForm), &FtpServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/HttpPg.bpr b/lib/ics/Cpp/Internet/Bcb6/HttpPg.bpr new file mode 100644 index 00000000..26898444 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/HttpPg.bpr @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1998-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/HttpPg.cpp b/lib/ics/Cpp/Internet/Bcb6/HttpPg.cpp new file mode 100644 index 00000000..5bb474b4 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/HttpPg.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("HttpPg.res"); +USEFORM("..\httppg1.cpp", HttpTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(THttpTestForm), &HttpTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/HttpTst.bpr b/lib/ics/Cpp/Internet/Bcb6/HttpTst.bpr new file mode 100644 index 00000000..70968ebf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/HttpTst.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=4 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.4.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=7 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item6=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=8 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item7=$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/HttpTst.cpp b/lib/ics/Cpp/Internet/Bcb6/HttpTst.cpp new file mode 100644 index 00000000..e904bcd4 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/HttpTst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("HttpTst.res"); +USEFORM("..\httptst1.cpp", HttpTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(THttpTestForm), &HttpTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/IcsDll1.bpf b/lib/ics/Cpp/Internet/Bcb6/IcsDll1.bpf new file mode 100644 index 00000000..7738d86b --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/IcsDll1.bpf @@ -0,0 +1,6 @@ +USEUNIT("IcsDll1.cpp"); +USEUNIT("..\..\..\Delphi\VC32\WSocket.pas"); +//--------------------------------------------------------------------------- +This file is used by the project manager only and should be treated like the project file + + DllMain \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/IcsDll1.bpr b/lib/ics/Cpp/Internet/Bcb6/IcsDll1.bpr new file mode 100644 index 00000000..624c4c57 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/IcsDll1.bpr @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=2 +Item0=$(BCB)\include;$(BCB)\include\vcl;..\..\..\Delphi\vc32 +Item1=$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=$(BCB)\Projects\Lib;..\..\..\Delphi\VC32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication=D:\FPiette\cpp\Internet\Bcb5\DllTst1.exe +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + +[Linker] +LibPrefix= +LibSuffix= +LibVersion= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/IcsDll1.cpp b/lib/ics/Cpp/Internet/Bcb6/IcsDll1.cpp new file mode 100644 index 00000000..81f52437 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/IcsDll1.cpp @@ -0,0 +1,273 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Creation: April 08, 2000 +Description: This is a demo showing how to use a TWSocket component in a DLL. + This demo must be used with ICS TcpSrv demo program as a server. + The DLL is a client which connect to the server and send "time" + command, then wait for the reply and return it in the buffer + passed to the DLL. + There is only one function exported from the DLL: IcsDllDemo. + It takes four arguments: a pointer to the hostname to connect to, + a pointer to the port, a pointer to a buffer and a pointer for + buffer size. On entry buffer size must be initialised with the + size of the actual buffer. On exit, it is filled with the + actual reply size. The function's return value is the error code + such as 10061 when the server is not running. +Version: 1.00 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2000-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + +---------------------------------------------------------------------------*/ +#include +#include +#pragma hdrstop +#pragma argsused +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +extern "C" __declspec(dllexport) int __stdcall IcsDllDemo(char *HostName, + char *Port, + char *Buffer, + int *BufSize); +void StrToBuffer(char *Buffer, int *BufSize, char *Msg); +//--------------------------------------------------------------------------- +// We use a workerthread to do the job. +// This will allows the DLL to be called by several processes simultaneously +class TClientThread : public TThread +{ +private: + TWSocket *FClientSocket; + void __fastcall ClientWSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall ClientWSocketSessionClosed(TObject *Sender, WORD Error); + void __fastcall ClientWSocketSessionConnected(TObject *Sender, WORD Error); +protected: + AnsiString FHostName; + AnsiString FPort; + int *FErrorCode; + BOOL FBannerReceived; + char *FBuffer; + int *FBufSize; + void __fastcall Execute(); +public: + __fastcall TClientThread(); + __fastcall ~TClientThread(); + __property char *Buffer = {read=FBuffer, write=FBuffer}; + __property int *BufSize = {read=FBufSize, write=FBufSize}; + __property int *ErrorCode = {read=FErrorCode, write=FErrorCode}; + __property AnsiString HostName = {read=FHostName, write=FHostName}; + __property AnsiString Port = {read=FPort, write=FPort}; +}; +//--------------------------------------------------------------------------- +// Create a new thread in the blocked state. This allow the user to register +// the client thread before it actually start working. +__fastcall TClientThread::TClientThread() + : TThread(TRUE) +{ + FreeOnTerminate = TRUE; +} +//--------------------------------------------------------------------------- +// Destroy the thread. Destroy the ClientWSocket if needed. +__fastcall TClientThread::~TClientThread() +{ + if (FClientSocket != NULL) { + FClientSocket->~TWSocket(); + FClientSocket = NULL; + } +} +//--------------------------------------------------------------------------- +// This is the main thread routine. There is not much to do because TWSocket +// is event drive. So everythong to do is done inside an event handler, +// mostly the OnDataAvailable event handler which is triggered each time +// something is received. +void __fastcall TClientThread::Execute() +{ + try { + // Create the client TWSocket. It is important to create it inside the + // Execute method because it *must* be created by the thread. Otherwise + // the messages sent by winsock would be processed in the main thread + // context, effectively disabling multi-threading. + FClientSocket = new TWSocket(NULL); + FClientSocket->OnDataAvailable = ClientWSocketDataAvailable; + FClientSocket->OnSessionConnected = ClientWSocketSessionConnected; + FClientSocket->OnSessionClosed = ClientWSocketSessionClosed; + FClientSocket->LineMode = TRUE; + FClientSocket->Addr = FHostName; + FClientSocket->Port = FPort; + FClientSocket->Proto = "tcp"; + FClientSocket->Connect(); + + // Message loop to handle TWSocket messages + // The loop is exited when WM_QUIT message is received + FClientSocket->MessageLoop(); + } + catch (Exception &E) + { + AnsiString Buf; + Buf = E.ClassName(); + Buf = Buf + ": " + E.Message; + *FErrorCode = -3; + StrToBuffer(Buffer, BufSize, Buf.c_str()); + } + + // Returning from the Execute function effectively terminate the thread +} +//--------------------------------------------------------------------------- +// This event handler is called when the client connection is established. +void __fastcall TClientThread::ClientWSocketSessionConnected( + TObject *Sender, WORD Error) +{ + if (Error) { + *FErrorCode = Error; + StrToBuffer(Buffer, BufSize, "Connect failed"); + PostMessage(FClientSocket->Handle, WM_QUIT, 0, 0); + } +} +//--------------------------------------------------------------------------- +// This event handler is called when the client connection is closed. +void __fastcall TClientThread::ClientWSocketSessionClosed( + TObject *Sender, WORD Error) +{ + PostMessage(FClientSocket->Handle, WM_QUIT, 0, 0); +} +//--------------------------------------------------------------------------- +// This event handler is called when data has been received from server. +// Since this sample program use line mode, we comes here only when a +// complete line has been received. +void __fastcall TClientThread::ClientWSocketDataAvailable( + TObject *Sender, WORD Error) +{ + AnsiString RcvBuffer; + + // Received the line + RcvBuffer = FClientSocket->ReceiveStr(); + // Check if we already received the banner (message sent by server + // as soon as we are connected. + if (!FBannerReceived) { + // We are just receiving the banner. Flag as received + FBannerReceived = TRUE; + // Then send the command to the server + FClientSocket->SendStr("time\r\n"); + } + else { + // We already received then banner. So this must be the answer + // to our command. Copy to the buffer, without trailling CR/LF + // and without overflowing the given buffer + if (RcvBuffer.Length() < *BufSize) + *BufSize = RcvBuffer.Length() - 2; // Remove CR/LF + if (*BufSize > 0) + memcpy(Buffer, RcvBuffer.data(), *BufSize); + // Then just close the communication + FClientSocket->CloseDelayed(); + *FErrorCode = 0; + } +} +//--------------------------------------------------------------------------- +// Copy a string to a buffer with overflow check. +void StrToBuffer(char *Buffer, int *BufSize, char *Msg) +{ + int Len; + + if ((Len = strlen(Msg)) < *BufSize) + *BufSize = Len; + if (*BufSize > 0) + memcpy(Buffer, Msg, *BufSize); +} +//--------------------------------------------------------------------------- +// This is the function exported from the DLL. It is intended to be called +// from the application using the DLL. +int __stdcall IcsDllDemo( + char *HostName, + char *Port, + char *Buffer, + int *BufSize) +{ + TClientThread *WorkerThread; + int Result; + + try { + Result = -1; + // Create a new thread. It is created in sleeping state + WorkerThread = new TClientThread; + // Then pass all parameters + WorkerThread->Buffer = Buffer; + WorkerThread->BufSize = BufSize; + WorkerThread->ErrorCode = &Result; + WorkerThread->HostName = HostName; + WorkerThread->Port = Port; + // Then let thread start his work + WorkerThread->Resume(); + // And wait until it finishes + WaitForSingleObject((void *)WorkerThread->Handle, INFINITE); + } + catch (Exception &E) + { + AnsiString Buf; + Buf = E.ClassName(); + Buf = Buf + ": " + E.Message; + Result = -2; + StrToBuffer(Buffer, BufSize, Buf.c_str()); + } + return(Result); +}; +//--------------------------------------------------------------------------- +// This function is called by Windows when the DLL is loaded/unloaded and +// each time a thread attach/detach from the DLL +BOOL WINAPI DllEntryPoint( + HINSTANCE hinstDLL, DWORD fwdreason, LPVOID lpvReserved) +{ + switch (fwdreason) { + case DLL_PROCESS_ATTACH: + // Increment WSocket reference count. This will make sure winsock will + // remains loaded. This is because there is no permanent TWSocket + // component created. + WSocketGCount++; + // This will load winsock and call WSAStartup + WSocketGetProc(""); + break; + case DLL_PROCESS_DETACH: + // Decrement WSocket reference count. + WSocketGCount--; + // If reference count goes to zero, then unload winsock. + if (WSocketGCount <= 0) { + WSocketUnloadWinsock(); + WSocketGCount = 0; + } + break; + } + return(1); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/MailRcv.bpr b/lib/ics/Cpp/Internet/Bcb6/MailRcv.bpr new file mode 100644 index 00000000..7bb686c3 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/MailRcv.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;D:\program files\borland\cbuilder3\projects\;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item1=..\;..\..\Internet;D:\program files\borland\cbuilder3\projects\;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item2=..\;..\..\Internet;..\..\..\..\program files\borland\cbuilder3\projects;..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item3=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;..;$(BCB)\Projects\Lib;D:\program files\borland\cbuilder3\projects\;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..\..\Internet;D:\program files\borland\cbuilder3\projects\;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\..\program files\borland\cbuilder3\projects;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/MailRcv.cpp b/lib/ics/Cpp/Internet/Bcb6/MailRcv.cpp new file mode 100644 index 00000000..f7337c6d --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/MailRcv.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MailRcv.res"); +USEFORM("..\MailRcv1.cpp", POP3ExcercizerForm); +USEFORM("..\MailRcv2.cpp", MessageForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPOP3ExcercizerForm), &POP3ExcercizerForm); + Application->CreateForm(__classid(TMessageForm), &MessageForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/MailSnd.bpr b/lib/ics/Cpp/Internet/Bcb6/MailSnd.bpr new file mode 100644 index 00000000..2995bfe0 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/MailSnd.bpr @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F.Piette) +FileDescription= +FileVersion=2.0.1.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=7 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item6=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=6 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/MailSnd.cpp b/lib/ics/Cpp/Internet/Bcb6/MailSnd.cpp new file mode 100644 index 00000000..73acc8cf --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/MailSnd.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MailSnd.res"); +USEFORM("..\MailSnd1.cpp", MailSndForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMailSndForm), &MailSndForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/MtSrv.bpr b/lib/ics/Cpp/Internet/Bcb6/MtSrv.bpr new file mode 100644 index 00000000..7f2b3642 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/MtSrv.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexukt.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/MtSrv.cpp b/lib/ics/Cpp/Internet/Bcb6/MtSrv.cpp new file mode 100644 index 00000000..604fb14b --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/MtSrv.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("MtSrv.res"); +USEFORM("..\mtsrv1.cpp", ServerForm); +USEUNIT("..\mtsrv2.cpp"); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/NewsRdr.bpr b/lib/ics/Cpp/Internet/Bcb6/NewsRdr.bpr new file mode 100644 index 00000000..ef916795 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/NewsRdr.bpr @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1998-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/NewsRdr.cpp b/lib/ics/Cpp/Internet/Bcb6/NewsRdr.cpp new file mode 100644 index 00000000..28968e2f --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/NewsRdr.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("NewsRdr.res"); +USEFORM("..\newsrdr1.cpp", NNTPForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TNNTPForm), &NNTPForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/NsLookup.bpr b/lib/ics/Cpp/Internet/Bcb6/NsLookup.bpr new file mode 100644 index 00000000..7929899a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/NsLookup.bpr @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1999-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=6 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/NsLookup.cpp b/lib/ics/Cpp/Internet/Bcb6/NsLookup.cpp new file mode 100644 index 00000000..66545f54 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/NsLookup.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("NsLookup.res"); +USEFORM("..\NsLook1.cpp", NsLookupForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TNsLookupForm), &NsLookupForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/PingTst.bpr b/lib/ics/Cpp/Internet/Bcb6/PingTst.bpr new file mode 100644 index 00000000..1dcbdc4b --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/PingTst.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=1 +Release=0 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.1.0.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indeuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/PingTst.cpp b/lib/ics/Cpp/Internet/Bcb6/PingTst.cpp new file mode 100644 index 00000000..81d9720a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/PingTst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("PingTst.res"); +USEFORM("..\pingtst1.cpp", PingTstForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TPingTstForm), &PingTstForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/Recv.bpr b/lib/ics/Cpp/Internet/Bcb6/Recv.bpr new file mode 100644 index 00000000..6c50c385 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Recv.bpr @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=3 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.3.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=6 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item5=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/Recv.cpp b/lib/ics/Cpp/Internet/Bcb6/Recv.cpp new file mode 100644 index 00000000..d08544d2 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Recv.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Recv.res"); +USEFORM("..\Recv1.cpp", RecvForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TRecvForm), &RecvForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/Sender.bpr b/lib/ics/Cpp/Internet/Bcb6/Sender.bpr new file mode 100644 index 00000000..21ae976e --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Sender.bpr @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=3 +Build=2 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.3.2 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=7 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/Sender.cpp b/lib/ics/Cpp/Internet/Bcb6/Sender.cpp new file mode 100644 index 00000000..7c1a2c4a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Sender.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Sender.res"); +USEFORM("..\Sender1.cpp", SenderForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSenderForm), &SenderForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/Server5.bpr b/lib/ics/Cpp/Internet/Bcb6/Server5.bpr new file mode 100644 index 00000000..823cac72 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Server5.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=2.0.2.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/Server5.cpp b/lib/ics/Cpp/Internet/Bcb6/Server5.cpp new file mode 100644 index 00000000..80e8effb --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/Server5.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Server5.res"); +USEFORM("..\srv5.cpp", ServerForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/SocksTst.bpr b/lib/ics/Cpp/Internet/Bcb6/SocksTst.bpr new file mode 100644 index 00000000..9df0068a --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/SocksTst.bpr @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1998-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item2=..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\include;$(BCB)\include\vcl;..\..\..\delphi\midware +Item3=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/SocksTst.cpp b/lib/ics/Cpp/Internet/Bcb6/SocksTst.cpp new file mode 100644 index 00000000..053a96ce --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/SocksTst.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("SocksTst.res"); +USEFORM("..\Socks1.cpp", SocksTestForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSocksTestForm), &SocksTestForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/SrvDemo.bpr b/lib/ics/Cpp/Internet/Bcb6/SrvDemo.bpr new file mode 100644 index 00000000..617cce97 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/SrvDemo.bpr @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl;d:\fpiette\delphi\midware + +[HistoryLists\hlLibraryPath] +Count=7 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=..;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\..\..\..\program files\borland\cbuilder3\projects;..\..\internet;..;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/SrvDemo.cpp b/lib/ics/Cpp/Internet/Bcb6/SrvDemo.cpp new file mode 100644 index 00000000..dff1a758 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/SrvDemo.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("SrvDemo.res"); +USEFORM("..\SrvDemo1.cpp", SrvForm); +USEFORM("..\SrvDemo2.cpp", CliForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TSrvForm), &SrvForm); + Application->CreateForm(__classid(TCliForm), &CliForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/TWSChat.bpr b/lib/ics/Cpp/Internet/Bcb6/TWSChat.bpr new file mode 100644 index 00000000..adcf6fa7 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/TWSChat.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=3 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.3.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/TWSChat.cpp b/lib/ics/Cpp/Internet/Bcb6/TWSChat.cpp new file mode 100644 index 00000000..561b8ded --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/TWSChat.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TWSChat.res"); +USEFORM("..\twschat1.cpp", TWSChatForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTWSChatForm), &TWSChatForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/TcpSrv.bpr b/lib/ics/Cpp/Internet/Bcb6/TcpSrv.bpr new file mode 100644 index 00000000..efba5a44 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/TcpSrv.bpr @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.0.1 +InternalName= +LegalCopyright=(c) 1999-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=5 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;..\..\Internet;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\;$(BCB)\Projects\Lib;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=$(BCB)\Projects\Lib;..\;..\..\Internet;..;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/TcpSrv.cpp b/lib/ics/Cpp/Internet/Bcb6/TcpSrv.cpp new file mode 100644 index 00000000..dda5a8b1 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/TcpSrv.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TcpSrv.res"); +USEFORM("..\TcpSrv1.cpp", TcpSrvForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTcpSrvForm), &TcpSrvForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/TnClient.bpr b/lib/ics/Cpp/Internet/Bcb6/TnClient.bpr new file mode 100644 index 00000000..601974fe --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/TnClient.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=5 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=2.0.5.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=htpp://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/TnClient.cpp b/lib/ics/Cpp/Internet/Bcb6/TnClient.cpp new file mode 100644 index 00000000..9d2927d0 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/TnClient.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnClient.res"); +USEFORM("..\tncli1.cpp", TelnetForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTelnetForm), &TelnetForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/TnDemo.bpr b/lib/ics/Cpp/Internet/Bcb6/TnDemo.bpr new file mode 100644 index 00000000..b1c102c0 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/TnDemo.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=2 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.2.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;..;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/TnDemo.cpp b/lib/ics/Cpp/Internet/Bcb6/TnDemo.cpp new file mode 100644 index 00000000..c9c42798 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/TnDemo.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnDemo.res"); +USEFORM("..\tndemo1.cpp", TnDemoForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TTnDemoForm), &TnDemoForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/TnSrv.bpr b/lib/ics/Cpp/Internet/Bcb6/TnSrv.bpr new file mode 100644 index 00000000..6877029f --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/TnSrv.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=1 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=1.0.1.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;..;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\Internet;$(BCB)\Projects\Lib;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\;$(BCB)\Projects\Lib;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/TnSrv.cpp b/lib/ics/Cpp/Internet/Bcb6/TnSrv.cpp new file mode 100644 index 00000000..935a8efa --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/TnSrv.cpp @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("TnSrv.res"); +USEFORM("..\tnsrv1.cpp", ServerForm); +USEFORM("..\tnsrv2.cpp", ClientForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TServerForm), &ServerForm); + Application->CreateForm(__classid(TClientForm), &ClientForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/UdpLstn.bpr b/lib/ics/Cpp/Internet/Bcb6/UdpLstn.bpr new file mode 100644 index 00000000..6d6d2008 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/UdpLstn.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=3 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription= +FileVersion=2.0.3.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/UdpLstn.cpp b/lib/ics/Cpp/Internet/Bcb6/UdpLstn.cpp new file mode 100644 index 00000000..e4d22699 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/UdpLstn.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("UdpLstn.res"); +USEFORM("..\udplstn1.cpp", MainForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/UdpSend.bpr b/lib/ics/Cpp/Internet/Bcb6/UdpSend.bpr new file mode 100644 index 00000000..bb90adbd --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/UdpSend.bpr @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=3 +Build=1 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=Overbyte (F. Piette) +FileDescription= +FileVersion=2.0.3.1 +InternalName= +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=5 +Item0=..\;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item4=..\..\internet;..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=..\;$(BCB)\Projects\Lib;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=$(BCB)\Projects\Lib;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\;..\..\Internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item3=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=2 +Item0=_RTLDLL +Item1=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/UdpSend.cpp b/lib/ics/Cpp/Internet/Bcb6/UdpSend.cpp new file mode 100644 index 00000000..ee07b761 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/UdpSend.cpp @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("UdpSend.res"); +USEFORM("..\udpsend1.cpp", MainForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TMainForm), &MainForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/WebServ.bpr b/lib/ics/Cpp/Internet/Bcb6/WebServ.bpr new file mode 100644 index 00000000..bdfef7fc --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/WebServ.bpr @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1036 +CodePage=1252 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= + +[HistoryLists\hlIncludePath] +Count=3 +Item0=..\;..\..\Internet;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item2=..;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\;..\..\Internet;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib +Item1=..;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Bcb6/WebServ.cpp b/lib/ics/Cpp/Internet/Bcb6/WebServ.cpp new file mode 100644 index 00000000..7253ce67 --- /dev/null +++ b/lib/ics/Cpp/Internet/Bcb6/WebServ.cpp @@ -0,0 +1,22 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USERES("WebServ.res"); +USEFORM("..\WebServ1.cpp", WebServForm); +//--------------------------------------------------------------------------- +WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) +{ + try + { + Application->Initialize(); + Application->CreateForm(__classid(TWebServForm), &WebServForm); + Application->Run(); + } + catch (Exception &exception) + { + Application->ShowException(&exception); + } + return 0; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Bcb6/clients.DBF b/lib/ics/Cpp/Internet/Bcb6/clients.DBF new file mode 100644 index 00000000..4f1066e9 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb6/clients.DBF differ diff --git a/lib/ics/Cpp/Internet/Bcb6/clients.MDX b/lib/ics/Cpp/Internet/Bcb6/clients.MDX new file mode 100644 index 00000000..c30a4652 Binary files /dev/null and b/lib/ics/Cpp/Internet/Bcb6/clients.MDX differ diff --git a/lib/ics/Cpp/Internet/Cli7.cpp b/lib/ics/Cpp/Internet/Cli7.cpp new file mode 100644 index 00000000..b5822336 --- /dev/null +++ b/lib/ics/Cpp/Internet/Cli7.cpp @@ -0,0 +1,195 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Object: Simple client application demonstrating TWSocket object in action. +Creation: December 27, 1998 (from delphi version created nov 28, 1998) +Version: 1.01 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Aug 15, 1999 V1.01 Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). + +---------------------------------------------------------------------------*/ +#include +#include +#pragma hdrstop + +#include "Cli7.h" +#define EndOfLine "\r\n" +#define SectionWindow "Window" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +#define SectionData "Data" +#define KeyHostName "HostName" +#define KeyPort "Port" + +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "WSocket" +#pragma resource "*.dfm" +TCli7Form *Cli7Form; +//--------------------------------------------------------------------------- +__fastcall TCli7Form::TCli7Form(TComponent* Owner) + : TForm(Owner) +{ + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TCli7Form::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + + if (!FInitialized) { + FInitialized = TRUE; + IniFile = new TIniFile(FIniFileName); + HostNameEdit->Text = IniFile->ReadString(SectionData, KeyHostName, + "localhost"); + PortEdit->Text = IniFile->ReadString(SectionData, KeyPort, + "telnet"); + + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + Top = IniFile->ReadInteger(SectionWindow, KeyTop, (Screen->Height - Height) / 2); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, (Screen->Width - Width) / 2); + + delete IniFile; + DisplayMemo->Clear(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TCli7Form::FormClose(TObject *Sender, TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteString(SectionData, KeyHostName, HostNameEdit->Text); + IniFile->WriteString(SectionData, KeyPort, PortEdit->Text); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TCli7Form::Display(AnsiString Msg) +{ + if (DisplayMemo->Lines->Count > 200) // Prevent TMemo overflow + DisplayMemo->Clear(); + DisplayMemo->Lines->Add(Msg); +} +//--------------------------------------------------------------------------- +void __fastcall TCli7Form::LineOnButtonClick(TObject *Sender) +{ + WSocket1->LineMode = TRUE; +} +//--------------------------------------------------------------------------- +void __fastcall TCli7Form::LineOffButtonClick(TObject *Sender) +{ + WSocket1->LineMode = FALSE; +} +//--------------------------------------------------------------------------- +void __fastcall TCli7Form::ConnectButtonClick(TObject *Sender) +{ + WSocket1->Proto = "tcp"; + WSocket1->Port = PortEdit->Text; + WSocket1->Addr = HostNameEdit->Text; + WSocket1->LineMode = TRUE; + WSocket1->LineEnd = EndOfLine; + WSocket1->Connect(); +} +//--------------------------------------------------------------------------- +void __fastcall TCli7Form::DisconnectButtonClick(TObject *Sender) +{ + WSocket1->Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TCli7Form::WSocket1SessionConnected(TObject *Sender, + WORD Error) +{ + if (Error) + Display("Connection failed, error #" + IntToStr(Error)); + else + Display("Session Connected."); +} +//--------------------------------------------------------------------------- +void __fastcall TCli7Form::WSocket1SessionClosed(TObject *Sender, + WORD Error) +{ + Display("Session Closed."); +} +//--------------------------------------------------------------------------- +AnsiString __fastcall RemoveEndOfLine(const AnsiString Line) +{ + if ((Line.Length() >= (sizeof(EndOfLine) - 1)) && + (strncmp(Line.c_str() + (Line.Length() - sizeof(EndOfLine) + 1), + EndOfLine, + sizeof(EndOfLine) - 1) == 0)) + return(Line.SubString(1, Line.Length() - sizeof(EndOfLine) + 1)); + else + return(Line); +} +//--------------------------------------------------------------------------- +void __fastcall TCli7Form::WSocket1DataAvailable(TObject *Sender, + WORD Error) +{ + char Buf[128]; + int Len; + + Len = ((TCustomLineWSocket *)Sender)->Receive(Buf, sizeof(Buf) - 1); + if (Len <= 0) + return; + Buf[Len] = 0; + if (!WSocket1->LineMode) { + // Normal mode, data is just a buffer with all caracters + Display("DataAvailable (" + IntToStr(Len) +" bytes): \"" + + Buf + "\""); + } else { + // Line mode, buffer contains exactly one line, terminated by the + // LineEnd string, unless our buffer is too small in which case + // the line is truncated. We'll get the end of line on the next + // call to Receive. + Display("Line: \"" + RemoveEndOfLine(Buf) + "\""); + } +} +//--------------------------------------------------------------------------- +void __fastcall TCli7Form::ReadLineButtonClick(TObject *Sender) +{ + AnsiString Buffer; + + Display("Waiting for a line... (Timeout = 10Sec)"); + WSocket1->ReadLine(10000, Buffer); + Display("Received line: \"" + RemoveEndOfLine(Buffer) + "\""); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Cli7.dfm b/lib/ics/Cpp/Internet/Cli7.dfm new file mode 100644 index 00000000..cff62ca6 Binary files /dev/null and b/lib/ics/Cpp/Internet/Cli7.dfm differ diff --git a/lib/ics/Cpp/Internet/Cli7.h b/lib/ics/Cpp/Internet/Cli7.h new file mode 100644 index 00000000..9d958c83 --- /dev/null +++ b/lib/ics/Cpp/Internet/Cli7.h @@ -0,0 +1,47 @@ +//--------------------------------------------------------------------------- +#ifndef Cli7H +#define Cli7H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +#include +//--------------------------------------------------------------------------- +class TCli7Form : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TLabel *Label6; + TLabel *Label1; + TEdit *PortEdit; + TEdit *HostNameEdit; + TButton *ConnectButton; + TButton *LineOnButton; + TButton *LineOffButton; + TButton *DisconnectButton; + TButton *ReadLineButton; + TMemo *DisplayMemo; + TWSocket *WSocket1; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall LineOnButtonClick(TObject *Sender); + void __fastcall LineOffButtonClick(TObject *Sender); + void __fastcall ConnectButtonClick(TObject *Sender); + void __fastcall DisconnectButtonClick(TObject *Sender); + void __fastcall WSocket1SessionConnected(TObject *Sender, WORD Error); + void __fastcall WSocket1SessionClosed(TObject *Sender, WORD Error); + void __fastcall WSocket1DataAvailable(TObject *Sender, WORD Error); + void __fastcall ReadLineButtonClick(TObject *Sender); +private: // User declarations + AnsiString FIniFileName; + BOOL FInitialized; + __fastcall void Display(AnsiString Msg); +public: // User declarations + __fastcall TCli7Form(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TCli7Form *Cli7Form; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/CliDemo1.cpp b/lib/ics/Cpp/Internet/CliDemo1.cpp new file mode 100644 index 00000000..ac74c729 --- /dev/null +++ b/lib/ics/Cpp/Internet/CliDemo1.cpp @@ -0,0 +1,176 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: Demonstration for Client program using TWSocket. +Creation: December 28, 1998 (Translated from Delphi 8 december 1997) +Version: 1.03 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + +---------------------------------------------------------------------------*/ +#include +#include +#pragma hdrstop + +#include "CliDemo1.h" +#define IniFileName "CliDemo.ini" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "WSocket" +#pragma resource "*.dfm" +TClientForm *ClientForm; +//--------------------------------------------------------------------------- +__fastcall TClientForm::TClientForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::DisconnectButtonClick(TObject *Sender) +{ + CliSocket->Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::SendButtonClick(TObject *Sender) +{ + if (CliSocket->State != wsConnected) { + CliSocket->Proto = "tcp"; + CliSocket->Port = PortEdit->Text; + CliSocket->Addr = ServerEdit->Text; + CliSocket->Connect(); + // Connect is asynchronous (non-blocking)-> We will wait while the + // session is connecting or application terminated-> + while (CliSocket->State == wsConnecting) { + Application->ProcessMessages(); + if (Application->Terminated) + return; + } + } + // Be sure we are connected before sending anything + if (CliSocket->State == wsConnected) + CliSocket->SendStr(SendEdit->Text + "\r\n"); + ActiveControl = SendEdit; + SendEdit->SelectAll(); +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::ProcessCommand(AnsiString Cmd) +{ + DisplayMemo->Lines->Add(Cmd); +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::CliSocketDataAvailable(TObject *Sender, + WORD Error) +{ + int Len; + int I; + + Len = CliSocket->Receive(&Buffer[Count], sizeof(Buffer) - Count - 1); + if (Len <= 0) + return; + + Count = Count + Len; + Buffer[Count] = 0; + LineLabel->Caption = Buffer; + + while (TRUE) { + I = 0; + while ((I < Count) && (Buffer[I] != '\n')) + I++; + if (I >= Count) + return; + ProcessCommand(((AnsiString)Buffer).SubString(1, I)); + Count = 0; + LineLabel->Caption = ""; + if (I >= (int)strlen(Buffer)) + break; + Move(&Buffer[I + 1], &Buffer, strlen(Buffer) - I); + LineLabel->Caption = Buffer; + Count = strlen(Buffer); + } +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::CliSocketSessionConnected(TObject *Sender, + WORD Error) +{ + ConnectError = Error; + if (Error) + DisplayMemo->Lines->Add("Can't connect, error #" + IntToStr(Error)); + else + DisconnectButton->Enabled = TRUE; +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::CliSocketSessionClosed(TObject *Sender, + WORD Error) +{ + DisconnectButton->Enabled = FALSE; +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::FormClose(TObject *Sender, + TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(IniFileName); + IniFile->WriteInteger("Window", "Top", Top); + IniFile->WriteInteger("Window", "Left", Left); + IniFile->WriteInteger("Window", "Width", Width); + IniFile->WriteInteger("Window", "Height", Height); + IniFile->WriteString("Data", "Server", ServerEdit->Text); + IniFile->WriteString("Data", "Port", PortEdit->Text); + IniFile->WriteString("Data", "Command", SendEdit->Text); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + + if (Initialized) + return; + Initialized = TRUE; + IniFile = new TIniFile(IniFileName); + + Top = IniFile->ReadInteger("Window", "Top", Top); + Left = IniFile->ReadInteger("Window", "Left", Left); + Width = IniFile->ReadInteger("Window", "Width", Width); + Height = IniFile->ReadInteger("Window", "Height", Height); + + PortEdit->Text = IniFile->ReadString("Data", "Port", "telnet"); + ServerEdit->Text = IniFile->ReadString("Data", "Server", "localhost"); + SendEdit->Text = IniFile->ReadString("Data", "Command", "LASTNAME CAESAR"); + + delete IniFile; + + DisplayMemo->Clear(); + ActiveControl = SendEdit; + SendEdit->SelectAll(); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/CliDemo1.dfm b/lib/ics/Cpp/Internet/CliDemo1.dfm new file mode 100644 index 00000000..7b93da30 Binary files /dev/null and b/lib/ics/Cpp/Internet/CliDemo1.dfm differ diff --git a/lib/ics/Cpp/Internet/CliDemo1.h b/lib/ics/Cpp/Internet/CliDemo1.h new file mode 100644 index 00000000..03ab0787 --- /dev/null +++ b/lib/ics/Cpp/Internet/CliDemo1.h @@ -0,0 +1,45 @@ +//--------------------------------------------------------------------------- +#ifndef CliDemo1H +#define CliDemo1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +class TClientForm : public TForm +{ +__published: // IDE-managed Components + TMemo *DisplayMemo; + TPanel *Panel1; + TLabel *LineLabel; + TLabel *Label1; + TLabel *Label2; + TEdit *SendEdit; + TButton *SendButton; + TButton *DisconnectButton; + TEdit *PortEdit; + TEdit *ServerEdit; + TWSocket *CliSocket; + void __fastcall DisconnectButtonClick(TObject *Sender); + void __fastcall SendButtonClick(TObject *Sender); + void __fastcall CliSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall CliSocketSessionConnected(TObject *Sender, WORD Error); + void __fastcall CliSocketSessionClosed(TObject *Sender, WORD Error); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall FormShow(TObject *Sender); +private: // User declarations + char Buffer[1024]; + int Count; + WORD ConnectError; + BOOL Initialized; + void __fastcall ProcessCommand(AnsiString Cmd); +public: // User declarations + __fastcall TClientForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TClientForm *ClientForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/DllTst1.cpp b/lib/ics/Cpp/Internet/DllTst1.cpp new file mode 100644 index 00000000..4fa1b957 --- /dev/null +++ b/lib/ics/Cpp/Internet/DllTst1.cpp @@ -0,0 +1,165 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Creation: April 08, 2000 +Description: This is a demonstration program for IcsDll1.dll. It will + dynamically load the DLL, get IcsDllDemo entry point and call + it. Then display result from DLL. +Version: 1.00 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2000-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + +---------------------------------------------------------------------------*/ +#include +#include +#pragma hdrstop +#include "DllTst1.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +#define SectionWindow "Window" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +TDllTestForm *DllTestForm; +typedef __declspec(dllimport) int __stdcall (*TIcsDllDemo)(char *HostName, + char *Port, + char *Buffer, + int *BufSize); +HANDLE DllHandle; +TIcsDllDemo IcsDllDemo; +//--------------------------------------------------------------------------- +__fastcall TDllTestForm::TDllTestForm(TComponent* Owner) + : TForm(Owner) +{ + // Build Ini file name + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TDllTestForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + + if (!FInitialized) { + FInitialized = TRUE; + IniFile = new TIniFile(FIniFileName); + Top = IniFile->ReadInteger(SectionWindow, KeyTop, Top); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, Left); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + delete IniFile; + DisplayMemo->Clear(); + + DllHandle = LoadLibrary("IcsDLL1.dll"); + if (DllHandle == 0) { + Application->MessageBox("ICSDLL1.DLL not found", "Error", MB_OK); + Application->Terminate(); + return; + } + + IcsDllDemo = (TIcsDllDemo)GetProcAddress(DllHandle, "IcsDllDemo"); + if (IcsDllDemo == NULL) { + Application->MessageBox("IcsDllDemo not found (ICSDLL1.DLL)", "Error", MB_OK); + Application->Terminate(); + return; + } + } +} +//--------------------------------------------------------------------------- +void __fastcall TDllTestForm::FormDestroy(TObject *Sender) +{ + if (DllHandle) { + FreeLibrary(DllHandle); + DllHandle = 0; + } +} +//--------------------------------------------------------------------------- +// Display a message in our display memo. Delete lines to be sure to not +// overflow the memo which may have a limited capacity. +void __fastcall TDllTestForm::Display(AnsiString Msg) +{ + DisplayMemo->Lines->BeginUpdate(); + try { + if (DisplayMemo->Lines->Count > 200) { + while (DisplayMemo->Lines->Count > 200) + DisplayMemo->Lines->Delete(0); + } + DisplayMemo->Lines->Add(Msg); + } __finally { + DisplayMemo->Lines->EndUpdate(); + SendMessage(DisplayMemo->Handle, EM_SCROLLCARET, 0, 0); + } +} +//--------------------------------------------------------------------------- +void __fastcall TDllTestForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + delete IniFile; + if (DllHandle) { + FreeLibrary(DllHandle); + DllHandle = 0; + } +} +//--------------------------------------------------------------------------- +void __fastcall TDllTestForm::CallDllButtonClick(TObject *Sender) +{ + AnsiString Buffer; + int BufSize; + int Status; + + Display("Calling DLL..."); + BufSize = 100; + Buffer.SetLength(BufSize); + Status = IcsDllDemo(HostnameEdit->Text.c_str(), + PortEdit->Text.c_str(), + &Buffer[1], &BufSize); + Buffer.SetLength(BufSize); + if (Status) + Display("Error #" + IntToStr(Status)); + Display(Buffer); + Display("Done with DLL"); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/DllTst1.dfm b/lib/ics/Cpp/Internet/DllTst1.dfm new file mode 100644 index 00000000..0ab70d69 --- /dev/null +++ b/lib/ics/Cpp/Internet/DllTst1.dfm @@ -0,0 +1,84 @@ +object DllTestForm: TDllTestForm + Left = 340 + Top = 217 + Width = 396 + Height = 265 + Caption = 'DllTest - http://www.rtfm.be/fpiette/indexuk.htm' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + OnClose = FormClose + OnDestroy = FormDestroy + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object Panel1: TPanel + Left = 0 + Top = 0 + Width = 388 + Height = 41 + Align = alTop + TabOrder = 0 + object Label1: TLabel + Left = 12 + Top = 12 + Width = 48 + Height = 13 + Caption = 'Hostname' + end + object Label2: TLabel + Left = 152 + Top = 12 + Width = 19 + Height = 13 + Caption = 'Port' + end + object CallDllButton: TButton + Left = 240 + Top = 8 + Width = 75 + Height = 21 + Caption = 'CallDll' + Default = True + TabOrder = 0 + OnClick = CallDllButtonClick + end + object HostnameEdit: TEdit + Left = 64 + Top = 8 + Width = 73 + Height = 21 + TabOrder = 1 + Text = 'localhost' + end + object PortEdit: TEdit + Left = 184 + Top = 8 + Width = 45 + Height = 21 + TabOrder = 2 + Text = 'telnet' + end + end + object DisplayMemo: TMemo + Left = 0 + Top = 41 + Width = 388 + Height = 197 + Align = alClient + Font.Charset = ANSI_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Courier New' + Font.Style = [] + Lines.Strings = ( + 'DisplayMemo') + ParentFont = False + ScrollBars = ssBoth + TabOrder = 1 + end +end diff --git a/lib/ics/Cpp/Internet/DllTst1.h b/lib/ics/Cpp/Internet/DllTst1.h new file mode 100644 index 00000000..3aa19fff --- /dev/null +++ b/lib/ics/Cpp/Internet/DllTst1.h @@ -0,0 +1,36 @@ +//--------------------------------------------------------------------------- + +#ifndef DllTst1H +#define DllTst1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TDllTestForm : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TMemo *DisplayMemo; + TButton *CallDllButton; + TLabel *Label1; + TEdit *HostnameEdit; + TLabel *Label2; + TEdit *PortEdit; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall CallDllButtonClick(TObject *Sender); + void __fastcall FormDestroy(TObject *Sender); +private: // User declarations + AnsiString FIniFileName; + BOOL FInitialized; + void __fastcall Display(AnsiString Msg); +public: // User declarations + __fastcall TDllTestForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TDllTestForm *DllTestForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/FtpSrv1.cpp b/lib/ics/Cpp/Internet/FtpSrv1.cpp new file mode 100644 index 00000000..8b1ede51 --- /dev/null +++ b/lib/ics/Cpp/Internet/FtpSrv1.cpp @@ -0,0 +1,526 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This is a demo program showing how to use the TFtpServer + component to build a FTP server. +Creation: Dec 19, 1998 (Translated from Delphi version) +Version: 1.06 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Aug 15, 1999 V1.02 Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). +Mar 03, 2002 V1.03 Added DisconnectAll menu entry. +Jun 07, 2002 V1.06 Added a processing thread for Get. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +//--------------------------------------------------------------------------- +#include +#include +#pragma hdrstop + +#define FtpServVersion = 102; +#include "FtpSrv1.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "FtpSrv" +#pragma resource "*.dfm" +TFtpServerForm *FtpServerForm; +TLogMsg *Log; +#define MainTitle "FTP Server - http://www.overbyte.be" +// Ini file layout +#define SectionData "Data" +#define KeyPort "Port" + +#define SectionWindow "Window" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +#define KeyMinim "RunMinimized" + +#define STATUS_GREEN 0 +#define STATUS_YELLOW 1 +#define STATUS_RED 2 + +//--------------------------------------------------------------------------- +__fastcall TLogMsg::TLogMsg(TComponent* Owner) + : TComponent(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TLogMsg::Text(char Prefix, AnsiString Msg) +{ +} +//--------------------------------------------------------------------------- +__fastcall TFtpServerForm::TFtpServerForm(TComponent* Owner) + : TForm(Owner) +{ + // Build Ini file name + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FormCreate(TObject *Sender) +{ + // Create the Log object + Log = new TLogMsg(this); + + InfoMemo->Clear(); + GreenImage->Visible = FALSE; + RedImage->Visible = TRUE; + RedImage->Top = GreenImage->Top; + RedImage->Left = GreenImage->Left; +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + int Minim; + + if (!FInitialized) { + FInitialized = TRUE; + Caption = "Starting " MainTitle; + Left = -Width; + + IniFile = new TIniFile(FIniFileName); + FXTop = IniFile->ReadInteger(SectionWindow, KeyTop, Top); + FXLeft = IniFile->ReadInteger(SectionWindow, KeyLeft, Left); + FXWidth = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + FXHeight = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + Minim = IniFile->ReadInteger(SectionWindow, KeyMinim, 0); + + IniFile->Free(); + + LoadConfig(); + SaveConfig(); // Create the inifile keys if they don't exists + + // Be sure to always have the window visible + // with a reasonable width and height + if (FXLeft < 0) + FXLeft = 0; + if (FXTop < 0) + FXTop = 0; + if (FXWidth < 310) + FXWidth = 310; + if (FXHeight <= 250) + FXHeight = 250; + if ((FXLeft + FXWidth) > Screen->Width) + FXLeft = Screen->Width - FXWidth; + if ((FXTop + FXHeight) > Screen->Height) + FXTop = Screen->Height - FXHeight; + + StartMinimizedCheckBox->Checked = (Minim != 0); + + // We use a custom message to initialize things once the form + // is visible + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + } +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FormClose(TObject *Sender, + TCloseAction &Action) +{ + TIniFile *IniFile; + int Minim; + + try { + StopServer(); + Minim = StartMinimizedCheckBox->Checked; + IniFile = new TIniFile(FIniFileName); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + IniFile->WriteInteger(SectionWindow, KeyMinim, Minim); + IniFile->WriteString(SectionData, KeyPort, FPort); + IniFile->Free(); + } __except (TRUE) { + // Ignore any exception when we are closing + } +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::LoadConfig(void) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + FPort = IniFile->ReadString(SectionData, KeyPort, "ftp"); + IniFile->Free(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::SaveConfig(void) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteString(SectionData, KeyPort, FPort); + IniFile->Free(); +} +//--------------------------------------------------------------------------- +// This message handler is triggered by the FormShow event. We comes here +// only when the form is visible on screen. +void __fastcall TFtpServerForm::WMAppStartup(TMessage &Msg) +{ + HWND PrvWnd; + AnsiString Buf; + + if (StartMinimizedCheckBox->Checked) + Application->Minimize(); + Top = FXTop; + Left = FXLeft; + Width = FXWidth; + Height = FXHeight; + + // Prevent the server from running twice + Buf = ClassName(); + PrvWnd = FindWindow(&Buf[1], MainTitle); + if (PrvWnd) { + Log->Text('E', "Server already running. Shutdown."); + Close(); + return; + } + Caption = MainTitle; + Update(); // It's nice to have the form completely displayed + + StartServer(); + UpdateClientCount(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::StartServer(void) +{ + GreenImage->Visible = FALSE; + RedImage->Visible = TRUE; + Update(); + + FtpServer1->Start(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::StopServer(void) +{ + FtpServer1->Stop(); + FtpServer1->DisconnectAll(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::MnuQuitClick(TObject *Sender) +{ + Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::MnuStopServerClick(TObject *Sender) +{ + StopServer(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::MnuStartServerClick(TObject *Sender) +{ + StartServer(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::ImagesDblClick(TObject *Sender) +{ + if (FtpServer1->Active) + StopServer(); + else + StartServer(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::UpdateClientCount(void) +{ + if (FtpServer1->ClientCount == 0) + ClientCountLabel->Caption = "No user"; + else + ClientCountLabel->Caption = IntToStr(FtpServer1->ClientCount) + " users"; +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1ClientConnect(TObject *Sender, + TFtpCtrlSocket *Client, WORD Error) +{ + // The next test shows how to refuse a client + if (Client->GetPeerAddr() == "193.121.12.25") { + Client->SendStr("421 Connection not allowed.\r\n"); + Client->Close(); + return; + } + InfoMemo->Lines->Add("! " + Client->GetPeerAddr() + " connected"); + UpdateClientCount(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1ClientDisconnect(TObject *Sender, + TFtpCtrlSocket *Client, WORD Error) +{ + InfoMemo->Lines->Add("! " + Client->GetPeerAddr() + " disconnected"); + UpdateClientCount(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1Start(TObject *Sender) +{ + GreenImage->Visible = TRUE; + RedImage->Visible = FALSE; + InfoMemo->Lines->Add("! Server started"); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1Stop(TObject *Sender) +{ + GreenImage->Visible = FALSE; + RedImage->Visible = TRUE; + InfoMemo->Lines->Add("! Server stopped"); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1StorSessionConnected( + TObject *Sender, TFtpCtrlSocket *Client, TWSocket *Data, WORD Error) +{ + if (Error) + InfoMemo->Lines->Add("! " + Client->GetPeerAddr() + + " Data session failed to open. Error #" + + IntToStr(Error)); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1StorSessionClosed( + TObject *Sender, TFtpCtrlSocket *Client, TWSocket *Data, WORD Error) +{ + if (Error) + InfoMemo->Lines->Add("! " + Client->GetPeerAddr() + + " Data session closed. Error #" + IntToStr(Error)); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1RetrDataSent(TObject *Sender, + TFtpCtrlSocket *Client, TWSocket *Data, WORD Error) +{ + if (Error) + InfoMemo->Lines->Add("! " + Client->GetPeerAddr() + + " Data sent. Error #" + IntToStr(Error)); +} +//--------------------------------------------------------------------------- +// This event handler is called when the data session for a get file has +// been opened. This is a good place build a file or a stream if the data +// requested is not already stored in a file on the file system. +// This feature is very powerfull and enable the FTP protocol to be used to +// retrieve any kind of data. It this sample, we just check for C:\VIRTUAL +// directory. If this directory is curent, then a TMemoryStream is created +// on the fly with some data. If another directory is selected, the FTP +// server works as any other: just send the requested file, if it exist ! +// This event handler is also a place where you can abort the file transfer. +// Simply trigger an exception and transfer will not take place. +// Note that if you just wants to prohibe access to some directory or file, +// the best place to code that is in the OnValidateGet or OnValidatePut +// event handlers. +void __fastcall TFtpServerForm::FtpServer1RetrSessionConnected( + TObject *Sender, TFtpCtrlSocket *Client, TWSocket *Data, WORD Error) +{ + AnsiString Buf; + + if (Error) + InfoMemo->Lines->Add("! " + Client->GetPeerAddr() + + " Data session connected. Error #" + IntToStr(Error)); + else if (UpperCase(Client->FilePath).SubString(1, 19) == "C:\\VIRTUAL\\FORBIDEN") + throw Exception("Access prohibed !"); + else if (UpperCase(Client->FilePath).SubString(1, 11) == "C:\\VIRTUAL\\") { + InfoMemo->Lines->Add("! VIRTUAL FILE"); + Client->UserData = 1; // Remember we created a stream + if (Client->DataStream) + delete Client->DataStream; // Prevent memory leaks + Client->DataStream = new TMemoryStream; + Buf = "This is a file created on the fly by the FTP server\r\n" + "It could result of a query to a database or anything else.\r\n" + "The request was: \"" + Client->FilePath + "\"\r\n"; + Client->DataStream->Write(&Buf[1], Buf.Length()); + Client->DataStream->Seek(0, 0); + } +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1RetrSessionClosed( + TObject *Sender, TFtpCtrlSocket *Client, TWSocket *Data, WORD Error) +{ + if (Error) + InfoMemo->Lines->Add("! " + Client->GetPeerAddr() + + " Data session closed. Error #" + IntToStr(Error)); + if (Client->UserData == 1) { + // We created a stream for a virtual file or dir. Delete the TStream + if (Client->DataStream) { + // There is no reason why we should not come here, but who knows ? + delete Client->DataStream; + Client->DataStream = NULL; + } + Client->UserData = 0; // Reset the flag + } +} +//--------------------------------------------------------------------------- +// This event handler is called when the FTP component needs to build a +// directory listing. You can just return without doing anything then the +// component will build the directory for you, based on the actual disk +// content. But you can also build your own directory listing with anything +// you like in it. Just create a stream with the required content. The +// example below construct a virtual directory when the user is on the +// C:\VIRTUAL subdirectory (use elsewhere in this sample program). +void __fastcall TFtpServerForm::FtpServer1BuildDirectory(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &Directory, bool Detailed) +{ + AnsiString Buf; + + if (UpperCase(Client->Directory) != "C:\\VIRTUAL\\") + return; + InfoMemo->Lines->Add("! VIRTUAL DIR"); + Client->UserData = 1; // Remember we created a stream + if (Client->DataStream) + delete Client->DataStream; // Prevent memory leaks + Client->DataStream = new TMemoryStream; + if (Detailed) + // We need to format directory lines according to the Unix standard + Buf = + "-rwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 FORBIDEN\r\n" + "-rwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 TEST\r\n" + "drwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 SOME DIR\r\n"; + else + Buf = "FORBIDEN\r\nTEST\r\r"; + Client->DataStream->Write(&Buf[1], Buf.Length()); + Client->DataStream->Seek(0, 0); +} +//--------------------------------------------------------------------------- +// This event handler is called by the FTP component once it has built the +// directory listing. We can use this handler to alter the listing, adding +// or removing some info. This sample add the 'virtual' directory. +void __fastcall TFtpServerForm::FtpServer1AlterDirectory(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &Directory, bool Detailed) +{ + AnsiString Buf; + + if (UpperCase(Client->Directory) != "C:\\") + return; + // Add our 'virtual' directory to the list + if (Detailed) { + // We need to format directory lines according to the Unix standard + Buf = + "drwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 VIRTUAL\r\n"; + Client->DataStream->Write(&Buf[1], Buf.Length()); + } +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1ClientCommand(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &Keyword, TFtpString &Params, + TFtpString &Answer) +{ + InfoMemo->Lines->Add("< " + Client->GetPeerAddr() + " " + + Keyword + " " + Params); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1AnswerToClient(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &Answer) +{ + InfoMemo->Lines->Add("> " + Client->GetPeerAddr() + " " + Answer); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1Authenticate(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &UserName, TFtpString &Password, + bool &Authenticated) +{ + // You should place here the code needed to authenticate the user. + // For example a text file with all permitted username/password. + // If the user can't be authenticated, just set Authenticated to + // false before returning. + // It is also the right place to setup Client.HomeDir + // If you need to store info about the client for later processing + // you can use Client->UserData to store a pointer to an object or + // a record with the needed info. + InfoMemo->Lines->Add("! " + Client->GetPeerAddr() + + " User \"" + UserName + "\" is authenticated"); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1ChangeDirectory(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &Directory, bool &Allowed) +{ +#ifdef never + // It the right place to check if a user has access to a given directory + // The example below disable C:\ access to non root user. + if (UpperCase(Client->UserName) != "ROOT") && + (UpperCase(Client->Directory) = "C:\\") + Allowed = FALSE; +#endif +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::Cleardisplay1Click(TObject *Sender) +{ + InfoMemo->Clear(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::Disconnectall1Click(TObject *Sender) +{ + FtpServer1->DisconnectAll(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::FtpServer1GetProcessing(TObject *Sender, + TFtpCtrlSocket *Client, bool &DelayedSend) +{ + TFtpServer *MyServer; + TMyClient *MyClient; + + MyServer = (TFtpServer *)Sender; + MyClient = (TMyClient *)Client; + // If client request a *.ZZZ file, then start a thread to do some + // processing (here the thread just sleep 10 sec to show other clients + // are not blocked. + if (ExtractFileExt(MyClient->FileName).UpperCase() == ".ZZZ") { + MyClient->FWorkerThread = new TGetProcessingThread(TRUE); + MyClient->FWorkerThread->Server = MyServer; + MyClient->FWorkerThread->Client = MyClient; + MyClient->FWorkerThread->FreeOnTerminate = TRUE; + MyClient->FWorkerThread->OnTerminate = WorkerThreadTerminated; + MyClient->FWorkerThread->Resume(); + // Ask server component to not start sending immediately + // We will ask to start sending from WorkerThreadTerminated event + DelayedSend = TRUE; + } +} +//--------------------------------------------------------------------------- +void __fastcall TFtpServerForm::WorkerThreadTerminated(TObject *Sender) +{ + TGetProcessingThread *MyThread; + + MyThread = (TGetProcessingThread *)Sender; + MyThread->Server->DoStartSendData(MyThread->Client); +} +//--------------------------------------------------------------------------- +__fastcall TGetProcessingThread::TGetProcessingThread(bool CreateSuspended) + : TThread(CreateSuspended) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TGetProcessingThread::Execute() +{ + Sleep(10000); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/FtpSrv1.dfm b/lib/ics/Cpp/Internet/FtpSrv1.dfm new file mode 100644 index 00000000..9fb54d32 Binary files /dev/null and b/lib/ics/Cpp/Internet/FtpSrv1.dfm differ diff --git a/lib/ics/Cpp/Internet/FtpSrv1.h b/lib/ics/Cpp/Internet/FtpSrv1.h new file mode 100644 index 00000000..4692545b --- /dev/null +++ b/lib/ics/Cpp/Internet/FtpSrv1.h @@ -0,0 +1,122 @@ +//--------------------------------------------------------------------------- +#ifndef FtpSrv1H +#define FtpSrv1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "FtpSrv.hpp" +#include +#include +#include +#define WM_APPSTARTUP (WM_USER + 1) +//--------------------------------------------------------------------------- +class TMyClient; +class TGetProcessingThread : public TThread +{ +protected: + void __fastcall Execute(); +public: + TFtpServer *Server; + TMyClient *Client; + __fastcall TGetProcessingThread(bool CreateSuspended); +}; +//--------------------------------------------------------------------------- +class TMyClient :public TFtpCtrlSocket +{ +public: + TGetProcessingThread *FWorkerThread; +}; +//--------------------------------------------------------------------------- +class TLogMsg : public TComponent +{ +public: + void __fastcall Text(char Prefix, AnsiString Msg); + __fastcall TLogMsg(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +class TFtpServerForm : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TImage *GreenImage; + TLabel *ClientCountLabel; + TImage *RedImage; + TCheckBox *StartMinimizedCheckBox; + TMemo *InfoMemo; + TMainMenu *MainMenu1; + TMenuItem *File1; + TMenuItem *MnuStartServer; + TMenuItem *MnuStopServer; + TMenuItem *N1; + TMenuItem *MnuQuit; + TMenuItem *Tools1; + TMenuItem *Cleardisplay1; + TMenuItem *About1; + TFtpServer *FtpServer1; + TMenuItem *Disconnectall1; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall FormCreate(TObject *Sender); + void __fastcall MnuQuitClick(TObject *Sender); + void __fastcall MnuStopServerClick(TObject *Sender); + void __fastcall MnuStartServerClick(TObject *Sender); + void __fastcall ImagesDblClick(TObject *Sender); + void __fastcall FtpServer1ClientConnect(TObject *Sender, + TFtpCtrlSocket *Client, WORD Error); + void __fastcall FtpServer1ClientDisconnect(TObject *Sender, + TFtpCtrlSocket *Client, WORD Error); + void __fastcall FtpServer1Start(TObject *Sender); + void __fastcall FtpServer1Stop(TObject *Sender); + void __fastcall FtpServer1StorSessionConnected(TObject *Sender, + TFtpCtrlSocket *Client, TWSocket *Data, WORD Error); + void __fastcall FtpServer1StorSessionClosed(TObject *Sender, + TFtpCtrlSocket *Client, TWSocket *Data, WORD Error); + void __fastcall FtpServer1RetrDataSent(TObject *Sender, + TFtpCtrlSocket *Client, TWSocket *Data, WORD Error); + void __fastcall FtpServer1RetrSessionConnected(TObject *Sender, + TFtpCtrlSocket *Client, TWSocket *Data, WORD Error); + void __fastcall FtpServer1RetrSessionClosed(TObject *Sender, + TFtpCtrlSocket *Client, TWSocket *Data, WORD Error); + void __fastcall FtpServer1BuildDirectory(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &Directory, bool Detailed); + void __fastcall FtpServer1AlterDirectory(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &Directory, bool Detailed); + void __fastcall FtpServer1ClientCommand(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &Keyword, TFtpString &Params, + TFtpString &Answer); + void __fastcall FtpServer1AnswerToClient(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &Answer); + void __fastcall FtpServer1Authenticate(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &UserName, + TFtpString &Password, bool &Authenticated); + void __fastcall FtpServer1ChangeDirectory(TObject *Sender, + TFtpCtrlSocket *Client, TFtpString &Directory, bool &Allowed); + void __fastcall Cleardisplay1Click(TObject *Sender); + void __fastcall Disconnectall1Click(TObject *Sender); + void __fastcall FtpServer1GetProcessing(TObject *Sender, + TFtpCtrlSocket *Client, bool &DelayedSend); +protected: + void __fastcall WMAppStartup(TMessage &Msg); +BEGIN_MESSAGE_MAP + MESSAGE_HANDLER(WM_APPSTARTUP, TMessage, WMAppStartup) +END_MESSAGE_MAP(TControl) +private: // User declarations + BOOL FInitialized; + AnsiString FIniFileName; + AnsiString FPort; + int FXTop; + int FXLeft; + int FXWidth; + int FXHeight; + void __fastcall LoadConfig(void); + void __fastcall SaveConfig(void); + void __fastcall StartServer(void); + void __fastcall StopServer(void); + void __fastcall UpdateClientCount(void); + void __fastcall WorkerThreadTerminated(TObject *Sender); +public: // User declarations + __fastcall TFtpServerForm(TComponent* Owner); +}; +#endif diff --git a/lib/ics/Cpp/Internet/MailRcv1.cpp b/lib/ics/Cpp/Internet/MailRcv1.cpp new file mode 100644 index 00000000..e381ad07 --- /dev/null +++ b/lib/ics/Cpp/Internet/MailRcv1.cpp @@ -0,0 +1,462 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Object: Show how to use TPop3Cli (POP3 protocol, RFC-1225) +Creation: 03 october 1997 +Version: 1.02 (Translated from Delphi version) +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + +---------------------------------------------------------------------------*/ +#include +#include +#include +#pragma hdrstop + +#include "MailRcv1.h" +#include "MailRcv2.h" +#define IniFileName "MAILRCV.INI" + +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "Pop3Prot" +#pragma resource "*.dfm" +TPOP3ExcercizerForm *POP3ExcercizerForm; +//--------------------------------------------------------------------------- +__fastcall TPOP3ExcercizerForm::TPOP3ExcercizerForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::FormCreate(TObject *Sender) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(IniFileName); + HostEdit->Text = IniFile->ReadString("Data", "Host", ""); + PortEdit->Text = IniFile->ReadString("Data", "Port", ""); + UserNameEdit->Text = IniFile->ReadString("Data", "UserName", ""); + PassWordEdit->Text = IniFile->ReadString("Data", "Password", ""); + delete IniFile; + InfoLabel->Caption = ""; +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::FormCloseQuery( + TObject *Sender, bool &CanClose) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(IniFileName); + IniFile->WriteString("Data", "Host", HostEdit->Text); + IniFile->WriteString("Data", "Port", PortEdit->Text); + IniFile->WriteString("Data", "UserName", UserNameEdit->Text); + IniFile->WriteString("Data", "Password", PassWordEdit->Text); + delete IniFile; +} +//--------------------------------------------------------------------------- +// This event handler is called when the TPop3Client object wants to display +// some information such as connection progress or errors. +void __fastcall TPOP3ExcercizerForm::Pop3ClientDisplay( + TObject *Sender, AnsiString Msg) +{ + DisplayMemo->Lines->Add(Msg); +} +//--------------------------------------------------------------------------- +// All the TPop3Client method are of the same type. To simplify this demo +// application, Exec transfert the parameters form the various EditBoxes +// to the Pop3Client instance and then call the appropriate method, showing +// the result in the InfoLabel->Caption-> +void __fastcall TPOP3ExcercizerForm::Exec( + TPop3NextProc MethodPtr, + AnsiString MethodName) +{ + Pop3Client->Host = HostEdit->Text; + Pop3Client->Port = PortEdit->Text; + Pop3Client->UserName = UserNameEdit->Text; + Pop3Client->PassWord = PassWordEdit->Text; + Pop3Client->MsgNum = StrToInt(MsgNumEdit->Text); + Pop3Client->MsgLines = StrToInt(MsgLinesEdit->Text); + // We need to reassign event handlers because we may have changed them + // doing GetAllMessages for example + Pop3Client->OnRequestDone = Pop3ClientRequestDone; + Pop3Client->OnMessageBegin = Pop3ClientMessageBegin; + Pop3Client->OnMessageEnd = Pop3ClientMessageEnd; + Pop3Client->OnMessageLine = Pop3ClientMessageLine; + InfoLabel->Caption = MethodName + " started"; + try { + MethodPtr(); + InfoLabel->Caption = MethodName + " ok"; + } catch (Exception &E) { + InfoLabel->Caption = MethodName + " failed (" + E.Message + ")"; + } +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::ConnectButtonClick(TObject *Sender) +{ + Exec(Pop3Client->Connect, "Connect"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::OpenButtonClick(TObject *Sender) +{ + Exec(Pop3Client->Open, "Open"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::UserButtonClick(TObject *Sender) +{ + Exec(Pop3Client->User, "User"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::PassButtonClick(TObject *Sender) +{ + Exec(Pop3Client->Pass, "Pass"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::QuittButtonClick(TObject *Sender) +{ + Exec(Pop3Client->Quit, "Quit"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::RetrButtonClick(TObject *Sender) +{ + Exec(Pop3Client->Retr, "Retr"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::StatButtonClick(TObject *Sender) +{ + Exec(Pop3Client->Stat, "Stat"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::ListAllButtonClick(TObject *Sender) +{ + MsgNumEdit->Text = "0"; + Exec(Pop3Client->List, "List All"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::ListButtonClick(TObject *Sender) +{ + Exec(Pop3Client->List, "List"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::DeleteButtonClick(TObject *Sender) +{ + Exec(Pop3Client->Dele, "Delete"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::NoopButtonClick(TObject *Sender) +{ + Exec(Pop3Client->Noop, "Noop"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::LastButtonClick(TObject *Sender) +{ + Exec(Pop3Client->Last, "Last"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::ResetButtonClick(TObject *Sender) +{ + Exec(Pop3Client->RSet, "Rset"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::TopButtonClick(TObject *Sender) +{ + Exec(Pop3Client->Top, "Top"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::RpopButtonClick(TObject *Sender) +{ + Exec(Pop3Client->RPop, "Rpop"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::UidlButtonClick(TObject *Sender) +{ + Exec(Pop3Client->Uidl, "Uidl"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::ApopButtonClick(TObject *Sender) +{ + Exec(Pop3Client->APop, "Apop"); +} +//--------------------------------------------------------------------------- +// This event handler is called when TPop3Client is about to receive a +// message. The MsgNum property gives the message number. +// This event handler could be used to open the file used to store the msg. +// The file handle could be stored in the TPop3Client->Tag property to be +// easily retrieved by the OnMessageLine and OnMessageEnd event handlers. +void __fastcall TPOP3ExcercizerForm::Pop3ClientMessageBegin( + TObject *Sender) +{ + DisplayMemo->Lines->Add("*** Message " + + IntToStr(((TPop3Cli *)Sender)->MsgNum) + + " begin ***"); +} +//--------------------------------------------------------------------------- +// This event handler is called when TPop3Client has detected the end of a +// message, even if there is an error or exception, this event gets called. +// This event handler could be used to close the file used to store the msg. +void __fastcall TPOP3ExcercizerForm::Pop3ClientMessageEnd(TObject *Sender) +{ + DisplayMemo->Lines->Add("*** Message " + + IntToStr(((TPop3Cli*)Sender)->MsgNum) + + " end ***"); +} +//--------------------------------------------------------------------------- +// This event handler is called for each message line that TPop3Client is +// receiveing. This could be used to write the message lines to a file. +void __fastcall TPOP3ExcercizerForm::Pop3ClientMessageLine(TObject *Sender) +{ + DisplayMemo->Lines->Add(((TPop3Cli *)Sender)->LastResponse); +} +//--------------------------------------------------------------------------- +// This event handler is called when TPop3Client is about to receive a +// list line. The MsgNum property gives the message number. +void __fastcall TPOP3ExcercizerForm::Pop3ClientListBegin(TObject *Sender) +{ + DisplayMemo->Lines->Add("*** List begin ***"); +} +//--------------------------------------------------------------------------- +// This event handler is called when TPop3Client has received the last list +// line. +void __fastcall TPOP3ExcercizerForm::Pop3ClientListEnd(TObject *Sender) +{ + DisplayMemo->Lines->Add("*** List End ***"); +} +//--------------------------------------------------------------------------- +// This event handler is called for each list line received by TPop3Client. +void __fastcall TPOP3ExcercizerForm::Pop3ClientListLine(TObject *Sender) +{ + AnsiString Buffer; + + Buffer = "MsgNum = " + IntToStr(((TPop3Cli *)Sender)->MsgNum) + " " + + "MsgSize = " + IntToStr(((TPop3Cli *)Sender)->MsgSize) + " " + + "Line = """ + ((TPop3Cli *)Sender)->LastResponse + """"; + if (DisplayMemo->Lines->Count > 200) + DisplayMemo->Clear(); + DisplayMemo->Lines->Add(Buffer); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::Pop3ClientUidlBegin(TObject *Sender) +{ + DisplayMemo->Lines->Add("*** Uidl begin ***"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::Pop3ClientUidlEnd(TObject *Sender) +{ + DisplayMemo->Lines->Add("*** Uidl end ***"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::Pop3ClientUidlLine(TObject *Sender) +{ + AnsiString Buffer; + + Buffer = "MsgNum = " + IntToStr(((TPop3Cli *)Sender)->MsgNum) + " " + + "MsgUidl = " + ((TPop3Cli *)Sender)->MsgUidl + """"; + if (DisplayMemo->Lines->Count > 200) + DisplayMemo->Clear(); + DisplayMemo->Lines->Add(Buffer); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::MessageBegin(TObject *Sender) +{ + MessageForm->Caption = "Message " + + IntToStr(((TPop3Cli *)Sender)->MsgNum); + MessageForm->Show(); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::MessageLine(TObject *Sender) +{ + if (MessageForm->DisplayMemo->Lines->Count > 200) + MessageForm->DisplayMemo->Clear(); + MessageForm->DisplayMemo->Lines->Add(((TPop3Cli *)Sender)->LastResponse); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::NextButtonClick(TObject *Sender) +{ + MessageForm->DisplayMemo->Clear(); + MessageForm->Caption = "Message"; + Pop3Client->OnMessageBegin = MessageBegin; + Pop3Client->OnMessageEnd = NULL; + Pop3Client->OnMessageLine = MessageLine; + Pop3Client->OnRequestDone = NextMessageRequestDone; + Pop3Client->MsgNum = StrToInt(MsgNumEdit->Text); + Pop3Client->Retr(); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::NextMessageRequestDone( + TObject *Sender, + TPop3Request RqType, + WORD Error) +{ + if (Error != 0) + return; + + MsgNumEdit->Text = IntToStr(StrToInt(MsgNumEdit->Text) + 1); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::GetAllMessageLine(TObject *Sender) +{ + fprintf(FFile, "%s\n", ((TPop3Cli *)Sender)->LastResponse.c_str()); +} +//--------------------------------------------------------------------------- +// The function here after will start an event chain that will eventually +// download all messages for the POP3 server. We cannot simply loop because +// the POP3 compomnet is asynchronous: it will not wait for operation done +// before returning. We must "chain" operations one after the other using +// the OnRequestDone event handler. We use the variable FGetAllState to keep +// track of where we are. +// To get all messages, we must first call Stat to know how many messages +// are on the server, then for each message we call Uidl to get a unique +// identifier for each message to build a file name and know if we already +// have a message, then we retrieve the message, then we increment the +// message number and continue until the number of messages is reached. +// We should start a TTimer to handle timeout... +void __fastcall TPOP3ExcercizerForm::GetAllButtonClick(TObject *Sender) +{ + TIniFile *IniFile; + + // Get path from INI file + IniFile = new TIniFile(IniFileName); + FMsgPath = IniFile->ReadString("Data", "MsgPath", + ExtractFilePath(Application->ExeName)); + delete IniFile; + + // Be sure to have an ending backslash + if ((FMsgPath.Length() > 0) && (FMsgPath[FMsgPath.Length()] != '\\')) + FMsgPath = FMsgPath + "\\"; + + FGetAllState = 0; + FFileOpened = FALSE; + Pop3Client->OnRequestDone = GetAllRequestDone; + Pop3Client->OnMessageBegin = NULL; + Pop3Client->OnMessageEnd = NULL; + Pop3Client->OnMessageLine = GetAllMessageLine; + Pop3Client->Stat(); +} +//--------------------------------------------------------------------------- +// This event handler is called when a request related to GetAll is done. +// We check for errors and our state variable FGetAllState which tells us +// where we are (stat, uidl or retr which are the 4 commands we use. +// Note that we also could use Dele to remove the messages from the server. +void __fastcall TPOP3ExcercizerForm::GetAllRequestDone( + TObject *Sender, + TPop3Request RqType, + WORD Error) +{ + if (Error) { + if (FFileOpened) { + FFileOpened = FALSE; + fclose(FFile); + } + DisplayMemo->Lines->Add("Error " + Pop3Client->ErrorMessage); + return; + } + + try { + switch (FGetAllState) { + case 0: // Comes from the Stat command + if (Pop3Client->MsgCount < 1) { + DisplayMemo->Lines->Add("No message to download->"); + return; + } + Pop3Client->MsgNum = 1; // Start with first message + FGetAllState = 1; + Pop3Client->Uidl(); + break; + case 1: // Comes from the Uidl command + FFileName = FMsgPath + "Msg " + Pop3Client->MsgUidl + "->txt"; + if (FileExists(FFileName)) { + DisplayMemo->Lines->Add("Message " + IntToStr(Pop3Client->MsgNum) + " already here"); + if (Pop3Client->MsgNum == Pop3Client->MsgCount) { + DisplayMemo->Lines->Add("Finished"); + return; + } + Pop3Client->MsgNum = Pop3Client->MsgNum + 1; + FGetAllState = 1; + Pop3Client->Uidl(); + } + else { + DisplayMemo->Lines->Add("Message " + IntToStr(Pop3Client->MsgNum)); + FFile = fopen(FFileName.c_str(), "w"); + if (FFile == NULL) + throw Exception("Can't open file " + FFileName); + FFileOpened = TRUE; + FGetAllState = 2; + Pop3Client->Retr(); + } + break; + case 2: // Comes from the Retr command + FFileOpened = FALSE; + fclose(FFile); + if (Pop3Client->MsgNum == Pop3Client->MsgCount) { + DisplayMemo->Lines->Add("Finished"); + return; + } + Pop3Client->MsgNum = Pop3Client->MsgNum + 1; + FGetAllState = 1; + Pop3Client->Uidl(); + break; + default: + DisplayMemo->Lines->Add("Invalid state"); + return; + } + } catch (Exception &E) { + if (FFileOpened) { + FFileOpened = FALSE; + fclose(FFile); + } + DisplayMemo->Lines->Add("Error: " + E.Message); + } +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::Pop3ClientRequestDone( + TObject *Sender, + TPop3Request RqType, + WORD Error) +{ + DisplayMemo->Lines->Add("Request Done Rq==" + IntToStr(Integer(RqType)) + + " Error==" + IntToStr(Error)); + + if (RqType == pop3Stat) { + InfoLabel->Caption = "Stat ok, " + + IntToStr(Pop3Client->MsgCount) + " messages " + + IntToStr(Pop3Client->MsgSize) + " bytes"; + } + else if (RqType == pop3List) { + InfoLabel->Caption = "List ok, " + + IntToStr(Pop3Client->MsgNum) + " message " + + IntToStr(Pop3Client->MsgSize) + " bytes"; + } + else if (RqType == pop3Last) { + InfoLabel->Caption = "Last == " + IntToStr(Pop3Client->MsgNum); + } +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/MailRcv1.dfm b/lib/ics/Cpp/Internet/MailRcv1.dfm new file mode 100644 index 00000000..39e1c552 Binary files /dev/null and b/lib/ics/Cpp/Internet/MailRcv1.dfm differ diff --git a/lib/ics/Cpp/Internet/MailRcv1.h b/lib/ics/Cpp/Internet/MailRcv1.h new file mode 100644 index 00000000..05a4d57b --- /dev/null +++ b/lib/ics/Cpp/Internet/MailRcv1.h @@ -0,0 +1,105 @@ +//--------------------------------------------------------------------------- +#ifndef MailRcv1H +#define MailRcv1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "Pop3Prot.hpp" +#include +//--------------------------------------------------------------------------- +class TPOP3ExcercizerForm : public TForm +{ +__published: // IDE-managed Components + TMemo *DisplayMemo; + TPanel *Panel1; + TLabel *InfoLabel; + TLabel *Label1; + TLabel *Label2; + TLabel *Label3; + TLabel *Label4; + TLabel *Label5; + TLabel *Label6; + TButton *ConnectButton; + TButton *QuittButton; + TButton *UserButton; + TEdit *HostEdit; + TEdit *UserNameEdit; + TEdit *PassWordEdit; + TButton *PassButton; + TEdit *MsgNumEdit; + TButton *RetrButton; + TButton *StatButton; + TButton *ListAllButton; + TButton *ListButton; + TButton *DeleteButton; + TButton *NoopButton; + TButton *LastButton; + TButton *ResetButton; + TButton *TopButton; + TEdit *MsgLinesEdit; + TButton *RpopButton; + TButton *UidlButton; + TButton *ApopButton; + TButton *NextButton; + TButton *GetAllButton; + TEdit *PortEdit; + TButton *OpenButton; + TPop3Cli *Pop3Client; + void __fastcall FormCreate(TObject *Sender); + void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose); + void __fastcall ConnectButtonClick(TObject *Sender); + void __fastcall OpenButtonClick(TObject *Sender); + void __fastcall UserButtonClick(TObject *Sender); + void __fastcall PassButtonClick(TObject *Sender); + void __fastcall QuittButtonClick(TObject *Sender); + void __fastcall RetrButtonClick(TObject *Sender); + void __fastcall StatButtonClick(TObject *Sender); + void __fastcall ListAllButtonClick(TObject *Sender); + void __fastcall ListButtonClick(TObject *Sender); + void __fastcall DeleteButtonClick(TObject *Sender); + void __fastcall NoopButtonClick(TObject *Sender); + void __fastcall LastButtonClick(TObject *Sender); + void __fastcall ResetButtonClick(TObject *Sender); + void __fastcall TopButtonClick(TObject *Sender); + void __fastcall RpopButtonClick(TObject *Sender); + void __fastcall UidlButtonClick(TObject *Sender); + void __fastcall ApopButtonClick(TObject *Sender); + void __fastcall Pop3ClientMessageBegin(TObject *Sender); + void __fastcall Pop3ClientMessageEnd(TObject *Sender); + void __fastcall Pop3ClientMessageLine(TObject *Sender); + void __fastcall Pop3ClientListBegin(TObject *Sender); + void __fastcall Pop3ClientListLine(TObject *Sender); + void __fastcall Pop3ClientListEnd(TObject *Sender); + void __fastcall Pop3ClientUidlBegin(TObject *Sender); + void __fastcall Pop3ClientUidlEnd(TObject *Sender); + void __fastcall Pop3ClientUidlLine(TObject *Sender); + void __fastcall NextButtonClick(TObject *Sender); + void __fastcall GetAllButtonClick(TObject *Sender); + void __fastcall Pop3ClientRequestDone(TObject *Sender, + TPop3Request RqType, WORD Error); +private: // User declarations + FILE *FFile; + AnsiString FMsgPath; + AnsiString FFileName; + int FGetAllState; + BOOL FFileOpened; + void __fastcall Pop3ClientDisplay(TObject *Sender, AnsiString Msg); + void __fastcall Exec(TPop3NextProc MethodPtr, AnsiString MethodName); + void __fastcall MessageBegin(TObject *Sender); + void __fastcall MessageLine(TObject *Sender); + void __fastcall NextMessageRequestDone(TObject *Sender, + TPop3Request RqType, + WORD Error); + void __fastcall GetAllMessageLine(TObject *Sender); + void __fastcall GetAllRequestDone(TObject *Sender, + TPop3Request RqType, + WORD Error); +public: // User declarations + __fastcall TPOP3ExcercizerForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TPOP3ExcercizerForm *POP3ExcercizerForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/MailRcv2.cpp b/lib/ics/Cpp/Internet/MailRcv2.cpp new file mode 100644 index 00000000..d40cc7d5 --- /dev/null +++ b/lib/ics/Cpp/Internet/MailRcv2.cpp @@ -0,0 +1,15 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "MailRcv2.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TMessageForm *MessageForm; +//--------------------------------------------------------------------------- +__fastcall TMessageForm::TMessageForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/MailRcv2.dfm b/lib/ics/Cpp/Internet/MailRcv2.dfm new file mode 100644 index 00000000..b3be4460 Binary files /dev/null and b/lib/ics/Cpp/Internet/MailRcv2.dfm differ diff --git a/lib/ics/Cpp/Internet/MailRcv2.h b/lib/ics/Cpp/Internet/MailRcv2.h new file mode 100644 index 00000000..3c533ddf --- /dev/null +++ b/lib/ics/Cpp/Internet/MailRcv2.h @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#ifndef MailRcv2H +#define MailRcv2H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TMessageForm : public TForm +{ +__published: // IDE-managed Components + TMemo *DisplayMemo; +private: // User declarations +public: // User declarations + __fastcall TMessageForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TMessageForm *MessageForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/MailSnd1.cpp b/lib/ics/Cpp/Internet/MailSnd1.cpp new file mode 100644 index 00000000..3dcf3f0b --- /dev/null +++ b/lib/ics/Cpp/Internet/MailSnd1.cpp @@ -0,0 +1,277 @@ +/*---------------------------------------------------------------------------// + + +Author: Franois PIETTE +Object: How to use TSmtpCli component +Creation: 09 october 1997 +Version: 2.01 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Oct 26, 1997 V1.00 Released +Jan 10, 1998 V1.01 Added a Port property +Feb 15, 1998 V1.02 Added file attachement support +Mar 06, 1998 V1.03 Check for DisplayMemo overflow (100 lines allowed) +Aug 03, 1998 V2.00 Revised for new asynchronous SMTP component version +Aug 15, 1999 V2.01 Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). + + +---------------------------------------------------------------------------*/ +#include +#include +#pragma hdrstop + +#include "MailSnd1.h" +#define SectionData "Data" +#define KeyHost "HostName" +#define KeyPort "Port" +#define KeyFrom "From" +#define KeyTo "To" +#define KeySubject "Subject" +#define KeySignOn "SignOn" +#define SectionWindow "Window" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" + +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "SmtpProt" +#pragma resource "*.dfm" +TMailSndForm *MailSndForm; + +//--------------------------------------------------------------------------- +__fastcall TMailSndForm::TMailSndForm(TComponent* Owner) + : TForm(Owner) +{ + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::FormCreate(TObject *Sender) +{ + Application->OnException = ExceptionHandler; + DisplayMemo->Clear(); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + + if (!FInitialized) { + FInitialized = TRUE; + IniFile = new TIniFile(FIniFileName); + HostEdit->Text = IniFile->ReadString(SectionData, KeyHost, + "localhost"); + PortEdit->Text = IniFile->ReadString(SectionData, KeyPort, + "smtp"); + FromEdit->Text = IniFile->ReadString(SectionData, KeyFrom, + "first->last@company->com"); + ToEdit->Text = IniFile->ReadString(SectionData, KeyTo, + "john->doe@acme;tartempion@brol->fr"); + SubjectEdit->Text = IniFile->ReadString(SectionData, KeySubject, + "This is the message subject"); + SignOnEdit->Text = IniFile->ReadString(SectionData, KeySignOn, + "your name"); + + Top = IniFile->ReadInteger(SectionWindow, KeyTop, (Screen->Height - Height) / 2); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, (Screen->Width - Width) / 2); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + + delete IniFile; + } +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteString(SectionData, KeyHost, HostEdit->Text); + IniFile->WriteString(SectionData, KeyPort, PortEdit->Text); + IniFile->WriteString(SectionData, KeyFrom, FromEdit->Text); + IniFile->WriteString(SectionData, KeyTo, ToEdit->Text); + IniFile->WriteString(SectionData, KeySubject, SubjectEdit->Text); + IniFile->WriteString(SectionData, KeySignOn, SignOnEdit->Text); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::BuildRcptList(void) +{ + AnsiString Buf; + int I; + + SmtpClient->RcptName->Clear(); + Buf = ToEdit->Text; + while (TRUE) { + I = Buf.Pos(";"); + if (I <= 0) { + SmtpClient->RcptName->Add(Trim(Buf)); + break; + } + else { + SmtpClient->RcptName->Add(Trim(Buf.SubString(1, I - 1))); + Buf.Delete(1, I); + } + } +} +//--------------------------------------------------------------------------- + +void __fastcall TMailSndForm::SmtpClientDisplay(TObject *Sender, AnsiString Msg) +{ + //Memo boxes are not unlimited... + if (DisplayMemo->Lines->Count > 100) + DisplayMemo->Clear(); + DisplayMemo->Lines->Add(Msg); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::SmtpClientGetData(TObject *Sender, int LineNum, + PChar MsgLine, int MaxLen, bool &More) +{ + int Len; + + if (LineNum > MsgMemo->Lines->Count) + More = FALSE; + else { + Len = MsgMemo->Lines->Strings[LineNum - 1].Length(); + // Truncate the line if too long (should wrap to next line) + if (Len >= MaxLen) + strncpy(MsgLine, MsgMemo->Lines->Strings[LineNum - 1].c_str(), MaxLen - 1); + else + strcpy(MsgLine, MsgMemo->Lines->Strings[LineNum - 1].c_str()); + } +} +//--------------------------------------------------------------------------- + +void __fastcall TMailSndForm::SmtpClientHeaderLine(TObject *Sender, PChar Msg, + int Size) +{ + // This demonstrate how to add a line to the message header + // Just detect one of the header lines and add text at the end of this + // line. Use \r\n to form a new line + // Here we check for the From: header line and add a Comments: line + if (strncmpi(Msg, "From:", 5) == 0) + strcat(Msg, "\r\nComments: This is a test"); +} +//--------------------------------------------------------------------------- + +void __fastcall TMailSndForm::ClearDisplayButtonClick(TObject *Sender) +{ + DisplayMemo->Clear(); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::ExceptionHandler(TObject *Sender, Exception *E) +{ + Application->ShowException(E); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::ConnectButtonClick(TObject *Sender) +{ + SmtpClient->Host = HostEdit->Text; + SmtpClient->Port = PortEdit->Text; + SmtpClient->Connect(); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::HeloButtonClick(TObject *Sender) +{ + SmtpClient->SignOn = SignOnEdit->Text; + SmtpClient->Helo(); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::OpenButtonClick(TObject *Sender) +{ + SmtpClient->Host = HostEdit->Text; + SmtpClient->Port = PortEdit->Text; + SmtpClient->SignOn = SignOnEdit->Text; + SmtpClient->Open(); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::MailFromButtonClick(TObject *Sender) +{ + SmtpClient->FromName = FromEdit->Text; + SmtpClient->MailFrom(); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::RcptToButtonClick(TObject *Sender) +{ + BuildRcptList(); + SmtpClient->RcptTo(); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::DataButtonClick(TObject *Sender) +{ + BuildRcptList(); + SmtpClient->HdrFrom = FromEdit->Text; + SmtpClient->HdrTo = ToEdit->Text; + SmtpClient->HdrSubject = SubjectEdit->Text; + SmtpClient->EmailFiles = FileAttachMemo->Lines; + SmtpClient->Data(); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::MailButtonClick(TObject *Sender) +{ + BuildRcptList(); + SmtpClient->HdrFrom = FromEdit->Text; + SmtpClient->HdrTo = ToEdit->Text; + SmtpClient->HdrSubject = SubjectEdit->Text; + SmtpClient->SignOn = SignOnEdit->Text; + SmtpClient->FromName = FromEdit->Text; + SmtpClient->EmailFiles = FileAttachMemo->Lines; + SmtpClient->Host = HostEdit->Text; + SmtpClient->Port = PortEdit->Text; + SmtpClient->Mail(); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::QuitButtonClick(TObject *Sender) +{ + SmtpClient->Quit(); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::AbortButtonClick(TObject *Sender) +{ + SmtpClient->Abort(); +} +//--------------------------------------------------------------------------- +void __fastcall TMailSndForm::SmtpClientRequestDone(TObject *Sender, + TSmtpRequest RqType, WORD Error) +{ + DisplayMemo->Lines->Add("RequestDone Rq=" + IntToStr(RqType) + + " Error=" + IntToStr(Error)); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/MailSnd1.dfm b/lib/ics/Cpp/Internet/MailSnd1.dfm new file mode 100644 index 00000000..c9d238ae Binary files /dev/null and b/lib/ics/Cpp/Internet/MailSnd1.dfm differ diff --git a/lib/ics/Cpp/Internet/MailSnd1.h b/lib/ics/Cpp/Internet/MailSnd1.h new file mode 100644 index 00000000..2516f3ba --- /dev/null +++ b/lib/ics/Cpp/Internet/MailSnd1.h @@ -0,0 +1,78 @@ +//--------------------------------------------------------------------------- +#ifndef MailSnd1H +#define MailSnd1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "SmtpProt.hpp" +#include +//--------------------------------------------------------------------------- +class TMailSndForm : public TForm +{ +__published: // IDE-managed Components + TMemo *MsgMemo; + TMemo *DisplayMemo; + TPanel *ToolsPanel; + TLabel *Label1; + TLabel *Label2; + TLabel *Label3; + TLabel *Subject; + TLabel *Label4; + TLabel *Label5; + TLabel *Label8; + TEdit *HostEdit; + TEdit *FromEdit; + TEdit *ToEdit; + TEdit *SubjectEdit; + TEdit *SignOnEdit; + TEdit *PortEdit; + TButton *ClearDisplayButton; + TButton *ConnectButton; + TButton *HeloButton; + TButton *MailFromButton; + TButton *RcptToButton; + TButton *DataButton; + TButton *AbortButton; + TButton *QuitButton; + TButton *MailButton; + TButton *OpenButton; + TPanel *AttachPanel; + TLabel *Label6; + TMemo *FileAttachMemo; + TPanel *InfoPanel; + TLabel *Label7; + TSmtpCli *SmtpClient; + void __fastcall FormCreate(TObject *Sender); + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall SmtpClientDisplay(TObject *Sender, AnsiString Msg); + void __fastcall SmtpClientGetData(TObject *Sender, int LineNum, + PChar MsgLine, int MaxLen, bool &More); + void __fastcall SmtpClientHeaderLine(TObject *Sender, PChar Msg, + int Size); + void __fastcall ClearDisplayButtonClick(TObject *Sender); + void __fastcall ConnectButtonClick(TObject *Sender); + void __fastcall HeloButtonClick(TObject *Sender); + void __fastcall OpenButtonClick(TObject *Sender); + void __fastcall MailFromButtonClick(TObject *Sender); + void __fastcall RcptToButtonClick(TObject *Sender); + void __fastcall DataButtonClick(TObject *Sender); + void __fastcall MailButtonClick(TObject *Sender); + void __fastcall QuitButtonClick(TObject *Sender); + void __fastcall AbortButtonClick(TObject *Sender); + void __fastcall SmtpClientRequestDone(TObject *Sender, + TSmtpRequest RqType, WORD Error); +private: // User declarations + AnsiString FIniFileName; + BOOL FInitialized; + void __fastcall ExceptionHandler(TObject *Sender, Exception *E); + void __fastcall BuildRcptList(void); +public: // User declarations + __fastcall TMailSndForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TMailSndForm *MailSndForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/NsLook1.cpp b/lib/ics/Cpp/Internet/NsLook1.cpp new file mode 100644 index 00000000..cfb7e12a --- /dev/null +++ b/lib/ics/Cpp/Internet/NsLook1.cpp @@ -0,0 +1,205 @@ +/*--------------------------------------------------------------------------- + +Program: NsLookup +Description: Demo for DnsQuery ICS component. +Author: Franois Piette +Creation: Feb 7, 1999 (from Delphi version created January 29, 1999) +Version: 1.01 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Aug 15, 1999 V1.01 Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). + +---------------------------------------------------------------------------*/ +#include +#include +#pragma hdrstop + +#include "NsLook1.h" +#define SectionWindow "Window" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +#define SectionData "Data" +#define KeyName "Name" +#define KeyDns "Dns" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "DnsQuery" +#pragma resource "*.dfm" +TNsLookupForm *NsLookupForm; +//--------------------------------------------------------------------------- +__fastcall TNsLookupForm::TNsLookupForm(TComponent* Owner) + : TForm(Owner) +{ + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TNsLookupForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + + if (!FInitialized) { + FInitialized = TRUE; + IniFile = new TIniFile(FIniFileName); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + Top = IniFile->ReadInteger(SectionWindow, KeyTop, + (Screen->Height - Height) / 2); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, + (Screen->Width - Width) / 2); + NameEdit->Text = IniFile->ReadString(SectionData, KeyName, "inprise.com"); + DnsEdit->Text = IniFile->ReadString(SectionData, KeyDns, "193.121.171.135"); + DisplayMemo->Clear(); + delete IniFile; + } +} +//--------------------------------------------------------------------------- +void __fastcall TNsLookupForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + IniFile->WriteString(SectionData, KeyName, NameEdit->Text); + IniFile->WriteString(SectionData, KeyDns, DnsEdit->Text); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TNsLookupForm::Display(AnsiString Msg) +{ + if (DisplayMemo->Lines->Count > 200) // Prevent TMemo overflow + DisplayMemo->Clear(); + DisplayMemo->Lines->Add(Msg); +} +//--------------------------------------------------------------------------- +void __fastcall TNsLookupForm::DumpDnsResponse(void) +{ + char *P; + int I; + int Len; + AnsiString Buf; + + Display("Response dump (" + IntToStr(DnsQuery1->ResponseLen) + " bytes):"); + P = DnsQuery1->ResponseBuf; + Len = DnsQuery1->ResponseLen; + Buf = ""; + I = 0; + while (I < Len) { + if ((*P >= ' ') && (*P <= '~')) + Buf = Buf + *P; + else + Buf = Buf + '<' + IntToStr(*P) + '>'; + I++; + P++; + if ((I % 16) == 0) { + Display(" " + Buf); + Buf = ""; + } + } + if (Buf.Length()) + Display(" " + Buf); +} +//--------------------------------------------------------------------------- +void __fastcall TNsLookupForm::DnsQuery1RequestDone(TObject *Sender, WORD Error) +{ + int I; + int nIndex; + AnsiString DottedIP; + + if (Error) { + Display("Error #" + IntToStr(Error)); + return; + } + Display("ID : " + IntToStr(DnsQuery1->ResponseID)); + Display("ResponseCode : " + IntToStr(DnsQuery1->ResponseCode)); + Display("OpCode : " + IntToStr(DnsQuery1->ResponseOpCode)); + Display("Authoritative : " + IntToStr(DnsQuery1->ResponseAuthoritative)); + Display("Truncation : " + IntToStr(DnsQuery1->ResponseTruncation)); + Display("RecursionAvailable : " + IntToStr(DnsQuery1->ResponseRecursionAvailable)); + Display("QDCount : " + IntToStr(DnsQuery1->ResponseQDCount)); + Display("ANCount : " + IntToStr(DnsQuery1->ResponseANCount)); + Display("NSCount : " + IntToStr(DnsQuery1->ResponseNSCount)); + Display("ARCount : " + IntToStr(DnsQuery1->ResponseARCount)); + Display("ResponseLen : " + IntToStr(DnsQuery1->ResponseLen)); + Display("QuestionName : " + DnsQuery1->QuestionName); + Display("QuestionType : " + IntToStr(DnsQuery1->QuestionType)); + Display("QuestionClass : " + IntToStr(DnsQuery1->QuestionClass)); + + for (I = 0; I < DnsQuery1->ResponseANCount; I++) { + Display("Answer #" + IntToStr(I + 1)); + Display(" AnswerName : " + DnsQuery1->AnswerName[I]); + Display(" AnswerType : " + IntToStr(DnsQuery1->AnswerType[I])); + Display(" AnswerClass : " + IntToStr(DnsQuery1->AnswerClass[I])); + Display(" AnswerTTL : " + IntToStr(DnsQuery1->AnswerTTL[I])); + nIndex = DnsQuery1->AnswerTag[I]; + if (nIndex >= 0) { + switch (DnsQuery1->AnswerType[I]) { + case DnsQueryMX: + Display(" MXPreference : " + IntToStr(DnsQuery1->MXPreference[nIndex])); + Display(" MXExchange : " + DnsQuery1->MXExchange[nIndex]); + break; + case DnsQueryA: + DottedIP = inet_ntoa(DnsQuery1->Address[nIndex]); + Display(" Address : " + DottedIP); + break; + } + } + } + // Dump complete response + DumpDnsResponse(); +} +//--------------------------------------------------------------------------- +void __fastcall TNsLookupForm::ClearDisplayBitBtnClick(TObject *Sender) +{ + DisplayMemo->Clear(); +} +//--------------------------------------------------------------------------- +void __fastcall TNsLookupForm::MXLookupButtonClick(TObject *Sender) +{ + DnsQuery1->Addr = DnsEdit->Text; + FRequestID = DnsQuery1->MXLookup(NameEdit->Text); + Display("Request ID : " + IntToStr(FRequestID)); +} +//--------------------------------------------------------------------------- +void __fastcall TNsLookupForm::ALookupButtonClick(TObject *Sender) +{ + DnsQuery1->Addr = DnsEdit->Text; + FRequestID = DnsQuery1->ALookup(NameEdit->Text); + Display("Request ID : " + IntToStr(FRequestID)); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/NsLook1.dfm b/lib/ics/Cpp/Internet/NsLook1.dfm new file mode 100644 index 00000000..169e6860 Binary files /dev/null and b/lib/ics/Cpp/Internet/NsLook1.dfm differ diff --git a/lib/ics/Cpp/Internet/NsLook1.h b/lib/ics/Cpp/Internet/NsLook1.h new file mode 100644 index 00000000..59b54146 --- /dev/null +++ b/lib/ics/Cpp/Internet/NsLook1.h @@ -0,0 +1,42 @@ +//--------------------------------------------------------------------------- +#ifndef NsLook1H +#define NsLook1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "DnsQuery.hpp" +#include +#include +//--------------------------------------------------------------------------- +class TNsLookupForm : public TForm +{ +__published: // IDE-managed Components + TMemo *DisplayMemo; + TPanel *Panel1; + TEdit *DnsEdit; + TEdit *NameEdit; + TButton *MXLookupButton; + TBitBtn *ClearDisplayBitBtn; + TButton *ALookupButton; + TDnsQuery *DnsQuery1; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall DnsQuery1RequestDone(TObject *Sender, WORD Error); + void __fastcall ClearDisplayBitBtnClick(TObject *Sender); + void __fastcall MXLookupButtonClick(TObject *Sender); + void __fastcall ALookupButtonClick(TObject *Sender); +private: // User declarations + AnsiString FIniFileName; + BOOL FInitialized; + int FRequestID; + void __fastcall Display(AnsiString Msg); + void __fastcall DumpDnsResponse(void); +public: // User declarations + __fastcall TNsLookupForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TNsLookupForm *NsLookupForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/Poptst1.cpp b/lib/ics/Cpp/Internet/Poptst1.cpp new file mode 100644 index 00000000..e5b198c5 --- /dev/null +++ b/lib/ics/Cpp/Internet/Poptst1.cpp @@ -0,0 +1,241 @@ +/*--------------------------------------------------------------------------- + +NOTE: THIS IS AN OUTDATED SAMPLE PROGRAM. PLEASE SEE MAILRCV SAMPLE PROGRAM + FOR UP-TO-DATE CODE. IF YOU REALLY WANTS TO USE THIS SAMPLE, YOU NEED + TO INSTALL OLD POP3 COMPONENT WHICH IS IN POP3CLI.PAS FILE. + +Author: Franois PIETTE +Object: Show how to use TPop3Cli (POP3 protocol, RFC-1225) +EMail: francois.piette@pophost.eunet.be +WebSite: http://www.rtfm.be/fpiette +Creation: 03 october 1997 +Version: 1.00 +Support: Use twsocket@rtfm.be mailing list. See website for details. +Legal issues: Copyright (C) 1997, 1998, 1999 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + +---------------------------------------------------------------------------*/ +#include +#include +#pragma hdrstop + +#include "PopTst1.h" +//--------------------------------------------------------------------------- +#pragma link "Wait" +#pragma link "pop3cli" +#pragma resource "*.dfm" +TPOP3ExcercizerForm *POP3ExcercizerForm; +//--------------------------------------------------------------------------- +__fastcall TPOP3ExcercizerForm::TPOP3ExcercizerForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +// Restore some data from the INI file +void __fastcall TPOP3ExcercizerForm::FormCreate(TObject *Sender) +{ + TIniFile *IniFile; + + IniFile = new TIniFile("POPTST"); + HostEdit->Text = IniFile->ReadString("Data", "Host", ""); + UserNameEdit->Text = IniFile->ReadString("Data", "UserName", ""); + PassWordEdit->Text = IniFile->ReadString("Data", "Password", ""); + IniFile->Free(); + InfoLabel->Caption = ""; +} +//--------------------------------------------------------------------------- +// Save data to INI file +void __fastcall TPOP3ExcercizerForm::FormCloseQuery(TObject *Sender, + bool &CanClose) +{ + TIniFile *IniFile; + + IniFile = new TIniFile("POPTST"); + IniFile->WriteString("Data", "Host", HostEdit->Text); + IniFile->WriteString("Data", "UserName", UserNameEdit->Text); + IniFile->WriteString("Data", "Password", PassWordEdit->Text); + IniFile->Free(); +} +//--------------------------------------------------------------------------- +// This event handler is called when the TPop3Client object wants to display +// some information such as connection progress or errors. +void __fastcall TPOP3ExcercizerForm::Pop3ClientDisplay(TObject *Sender, + AnsiString Msg) +{ + DisplayMemo->Lines->Add(Msg); +} +//--------------------------------------------------------------------------- +// All the TPop3Client method are of the same type. To simplify this demo +// application, DoTheJob transfert the parameters form the various EditBoxes +// to the Pop3Client instance and then call the appropriate method, showing +// the result in the InfoLabel.Caption. +BOOL __fastcall TPOP3ExcercizerForm::DoTheJob( + TPop3Method MethodPtr, + AnsiString MethodName) +{ + BOOL Result; + + Pop3Client->Host = HostEdit->Text; + Pop3Client->UserName = UserNameEdit->Text; + Pop3Client->PassWord = PassWordEdit->Text; + Pop3Client->MsgNum = StrToInt(MsgNumEdit->Text); + Pop3Client->MsgLines = StrToInt(MsgLinesEdit->Text); + InfoLabel->Caption = MethodName + " started"; + Result = MethodPtr(); + if (Result) + InfoLabel->Caption = MethodName + " ok"; + else + InfoLabel->Caption = MethodName + " failed"; + return(Result); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::ConnectButtonClick(TObject *Sender) +{ + DoTheJob(Pop3Client->Connect, "Connect"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::UserButtonClick(TObject *Sender) +{ + DoTheJob(Pop3Client->User, "User"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::PassButtonClick(TObject *Sender) +{ + DoTheJob(Pop3Client->Pass, "Pass"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::RetrButtonClick(TObject *Sender) +{ + DoTheJob(Pop3Client->Retr, "Retr"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::DisconnectButtonClick(TObject *Sender) +{ + DoTheJob(Pop3Client->Quit, "Quit"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::TopButtonClick(TObject *Sender) +{ + DoTheJob(Pop3Client->Top, "Top"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::RpopButtonClick(TObject *Sender) +{ + DoTheJob(Pop3Client->Rpop, "Rpop"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::StatButtonClick(TObject *Sender) +{ + if (DoTheJob(Pop3Client->Stat, "Stat")) + InfoLabel->Caption = "Stat ok, " + + IntToStr(Pop3Client->MsgCount) + " messages " + + IntToStr(Pop3Client->MsgSize) + " bytes"; +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::ListAllButtonClick(TObject *Sender) +{ + MsgNumEdit->Text = "0"; + DoTheJob(Pop3Client->List, "List All"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::ListButtonClick(TObject *Sender) +{ + DoTheJob(Pop3Client->List, "List"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::DeleteButtonClick(TObject *Sender) +{ + DoTheJob(Pop3Client->Dele, "Dele"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::NoopButtonClick(TObject *Sender) +{ + DoTheJob(Pop3Client->Noop, "Noop"); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::LastButtonClick(TObject *Sender) +{ + if (DoTheJob(Pop3Client->Last, "Last")) + InfoLabel->Caption = "Last = " + IntToStr(Pop3Client->MsgNum); +} +//--------------------------------------------------------------------------- +void __fastcall TPOP3ExcercizerForm::ResetButtonClick(TObject *Sender) +{ + DoTheJob(Pop3Client->Rset, "Rset"); +} +//--------------------------------------------------------------------------- +// This event handler is called when TPop3Client is about to receive a +// message. The MsgNum property gives the message number. +// This event handler could be used to open the file used to store the msg. +// The file handle could be stored in the TPop3Client.Tag property to be +// easily retrieved by the OnMessageLine and OnMessageEnd event handlers. +void __fastcall TPOP3ExcercizerForm::Pop3ClientMessageBegin(TObject *Sender) +{ + DisplayMemo->Lines->Add("*** Message " + + IntToStr(((TPop3Client *)Sender)->MsgNum) + + " begin ***"); +} +//--------------------------------------------------------------------------- +// This event handler is called when TPop3Client has detected the end of a +// message, even if there is an error or exception, this event gets called. +// This event handler could be used to close the file used to store the msg. +void __fastcall TPOP3ExcercizerForm::Pop3ClientMessageEnd(TObject *Sender) +{ + DisplayMemo->Lines->Add("*** Message " + + IntToStr(((TPop3Client *)Sender)->MsgNum) + + " end ***"); +} +//--------------------------------------------------------------------------- +// This event handler is called for each message line that TPop3Client is +// receiveing. This could be used to write the message lines to a file. +void __fastcall TPOP3ExcercizerForm::Pop3ClientMessageLine(TObject *Sender) +{ + DisplayMemo->Lines->Add(((TPop3Client *)Sender)->LastResponse); +} +//--------------------------------------------------------------------------- +// This event handler is called when TPop3Client is about to receive a +// list line. The MsgNum property gives the message number. +void __fastcall TPOP3ExcercizerForm::Pop3ClientListBegin(TObject *Sender) +{ + DisplayMemo->Lines->Add("*** List begin ***"); +} +//--------------------------------------------------------------------------- +// This event handler is called when TPop3Client has received the last list +// line. +void __fastcall TPOP3ExcercizerForm::Pop3ClientListEnd(TObject *Sender) +{ + DisplayMemo->Lines->Add("*** List End ***"); +} +//--------------------------------------------------------------------------- +// This event handler is called for each list line received by TPop3Client. +void __fastcall TPOP3ExcercizerForm::Pop3ClientListLine(TObject *Sender) +{ + DisplayMemo->Lines->Add( + "MsgNum = " + IntToStr(((TPop3Client *)Sender)->MsgNum) + " " + + "MsgSize = " + IntToStr(((TPop3Client *)Sender)->MsgSize) + " " + + "Line = '" + ((TPop3Client *)Sender)->LastResponse + "'"); +} +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/Recv1.cpp b/lib/ics/Cpp/Internet/Recv1.cpp new file mode 100644 index 00000000..29a9cf36 --- /dev/null +++ b/lib/ics/Cpp/Internet/Recv1.cpp @@ -0,0 +1,234 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: Simple server program which just listen for clients and display + all incomming data. +Creation: Dec 30, 1998 (Translated from Delphi created Sep 29, 1998) +Version: 1.03 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Aug 15, 1999 V1.03 Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). + +---------------------------------------------------------------------------*/ +#include +#include +#pragma hdrstop + +#include "Recv1.h" +#define SectionWindow "RecvForm" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +#define SectionData "Data" +#define KeyPort "Port" +#define KeyLinger "Linger" +#define KeyBanner "SendBanner" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "WSocket" +#pragma resource "*.dfm" +TRecvForm *RecvForm; +//--------------------------------------------------------------------------- +__fastcall TRecvForm::TRecvForm(TComponent* Owner) + : TForm(Owner) +{ + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; + FClients = new TList; +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::FormDestroy(TObject *Sender) +{ + if (FClients) { + delete FClients; + FClients = NULL; + } +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + + if (!FInitialized) { + FInitialized = TRUE; + IniFile = new TIniFile(FIniFileName); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + Top = IniFile->ReadInteger(SectionWindow, KeyTop, + (Screen->Height - Height) / 2); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, + (Screen->Width - Width) / 2); + PortEdit->Text = IniFile->ReadString(SectionData, KeyPort, "telnet"); + LingerCheckBox->Checked = IniFile->ReadInteger(SectionData, KeyLinger, 0); + BannerCheckBox->Checked = IniFile->ReadInteger(SectionData, KeyBanner, 1); + Label2->Caption = ""; + delete IniFile; + } +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + IniFile->WriteString(SectionData, KeyPort, PortEdit->Text); + IniFile->WriteInteger(SectionData, KeyLinger, LingerCheckBox->Checked); + IniFile->WriteInteger(SectionData, KeyBanner, BannerCheckBox->Checked); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::Display(AnsiString Msg) +{ + if (DisplayMemo->Lines->Count > 200) // Prevent TMemo overflow + DisplayMemo->Clear(); + DisplayMemo->Lines->Add(Msg); +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::ActionButtonClick(TObject *Sender) +{ + if (ActionButton->Caption == "&Start") { + WSocket1->Addr = "0.0.0.0"; + WSocket1->Port = PortEdit->Text; + WSocket1->Proto = "tcp"; + WSocket1->Listen(); + ActionButton->Caption = "&Stop"; + Display("Listening for clients"); + } + else { + WSocket1->Close(); + ActionButton->Caption = "&Start"; + Display("Not listening for clients"); + } +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::PortEditChange(TObject *Sender) +{ + WSocket1->Close(); + ActionButton->Caption = "&Start"; +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::WSocket1SessionAvailable(TObject *Sender, + WORD Error) +{ + TWSocket *NewClient; + + Display("Client connected"); + Label2->Caption = ""; + NewClient = new TWSocket(NULL); + FClients->Add(NewClient); + NewClient->LineMode = TRUE; + NewClient->OnDataAvailable = ClientDataAvailable; + NewClient->OnSessionClosed = ClientSessionClosed; + NewClient->HSocket = WSocket1->Accept(); + if (LingerCheckBox->Checked) + NewClient->LingerOnOff = wsLingerOn; + else + NewClient->LingerOnOff = wsLingerOff; + NewClient->LingerTimeout = 300; + NewClient->SetLingerOption(); + if (BannerCheckBox->Checked) + NewClient->SendStr("Hello !\r\n"); +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::ClientDataAvailable(TObject *Sender, + WORD Error) +{ + char Buf[128]; + int Len; + + Len = ((TWSocket *)Sender)->Receive(&Buf, sizeof(Buf) - 1); + if (Len <= 0) + return; + + // Remove any trailing CR/LF + while ((Len > 0) && + ((Buf[Len - 1] == '\r') || (Buf[Len - 1] == '\n'))) + Len--; + // Nul terminate data + Buf[Len] = 0; + + Display("DataAvailable: \"" + (AnsiString)Buf + "\""); +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::ClientSessionClosed(TObject *Sender, + WORD Error) +{ + TWSocket *Cli; + int Itm; + + Cli = (TWSocket *)Sender; + Display("Client diconnected"); + + Itm = FClients->IndexOf(Cli); + if (Itm >= 0) + FClients->Delete(Itm); + // We can"t destroy a TWSocket from a SessionClosed event handler. + // So we post a message to delay destruction until we are out of the + // message handler. + PostMessage(Handle, WM_DESTROY_SOCKET, 0, (LPARAM)Cli); +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::WMDestroySocket(TMessage Msg) +{ + delete (TWSocket *)(Msg.LParam); +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::CloseAllButtonClick(TObject *Sender) +{ + Display("Disconnecting clients"); + while (FClients->Count > 0) + ((TWSocket *)(FClients->Items[0]))->Close(); + Display("All clients disconnected"); +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::LineModeOnButtonClick(TObject *Sender) +{ + int I; + + for (I = 0; I < FClients->Count - 1; I++) + ((TWSocket *)(FClients->Items[0]))->LineMode = TRUE; +} +//--------------------------------------------------------------------------- +void __fastcall TRecvForm::LineOffButtonClick(TObject *Sender) +{ + int I; + + for (I = 0; I < FClients->Count - 1; I++) + ((TWSocket *)(FClients->Items[0]))->LineMode = FALSE; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Recv1.dfm b/lib/ics/Cpp/Internet/Recv1.dfm new file mode 100644 index 00000000..f193dbb5 Binary files /dev/null and b/lib/ics/Cpp/Internet/Recv1.dfm differ diff --git a/lib/ics/Cpp/Internet/Recv1.h b/lib/ics/Cpp/Internet/Recv1.h new file mode 100644 index 00000000..24b39a86 --- /dev/null +++ b/lib/ics/Cpp/Internet/Recv1.h @@ -0,0 +1,55 @@ +//--------------------------------------------------------------------------- +#ifndef Recv1H +#define Recv1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +#include +#define WM_DESTROY_SOCKET (WM_USER + 1) +//--------------------------------------------------------------------------- +class TRecvForm : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TLabel *Label1; + TLabel *Label2; + TEdit *PortEdit; + TButton *ActionButton; + TButton *CloseAllButton; + TCheckBox *LingerCheckBox; + TCheckBox *BannerCheckBox; + TButton *LineModeOnButton; + TButton *LineOffButton; + TMemo *DisplayMemo; + TWSocket *WSocket1; + void __fastcall FormDestroy(TObject *Sender); + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall ActionButtonClick(TObject *Sender); + void __fastcall PortEditChange(TObject *Sender); + void __fastcall WSocket1SessionAvailable(TObject *Sender, WORD Error); + void __fastcall CloseAllButtonClick(TObject *Sender); + void __fastcall LineModeOnButtonClick(TObject *Sender); + void __fastcall LineOffButtonClick(TObject *Sender); +private: // User declarations + AnsiString FIniFileName; + BOOL FInitialized; + TList *FClients; + void __fastcall ClientDataAvailable(TObject *Sender, WORD Error); + void __fastcall ClientSessionClosed(TObject *Sender, WORD Error); + void __fastcall Display(AnsiString Msg); +protected: + void __fastcall WMDestroySocket(TMessage Msg); +BEGIN_MESSAGE_MAP + MESSAGE_HANDLER(WM_DESTROY_SOCKET, TMessage, WMDestroySocket) +END_MESSAGE_MAP(TForm) +public: // User declarations + __fastcall TRecvForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TRecvForm *RecvForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/Sender1.cpp b/lib/ics/Cpp/Internet/Sender1.cpp new file mode 100644 index 00000000..e87861d9 --- /dev/null +++ b/lib/ics/Cpp/Internet/Sender1.cpp @@ -0,0 +1,470 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: Simple client program which just send data to a server and display + all incomming data. +Creation: Dec 29, 1998 (From Delphi version created Oct 01, 1998) +Version: 1.03 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Aug 15, 1999 V1.03 Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). + +---------------------------------------------------------------------------*/ +#include +#include +#include +#pragma hdrstop + +#include "Sender1.h" +#define SectionWindow "RecvForm" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +#define SectionData "Data" +#define KeyPort "Port" +#define KeyServer "Server" +#define KeyData "Data" +#define KeyRepeat "RepeatCount" +#define KeyContinuous "ContinuousSend" +#define KeyLength "DataLength" +#define KeyUseDataSent "UseDataSent" +#define KeyDisplay "Display" +#define KeyLinger "Linger" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "WSocket" +#pragma resource "*.dfm" +TSenderForm *SenderForm; +//--------------------------------------------------------------------------- +__fastcall TSenderForm::TSenderForm(TComponent* Owner) + : TForm(Owner) +{ + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + + if (!FInitialized) { + FInitialized = TRUE; + IniFile = new TIniFile(FIniFileName); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + Top = IniFile->ReadInteger(SectionWindow, KeyTop, + (Screen->Height - Height) / 2); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, + (Screen->Width - Width) / 2); + PortEdit->Text = IniFile->ReadString(SectionData, KeyPort, "telnet"); + ServerEdit->Text = IniFile->ReadString(SectionData, KeyServer, "localhost"); + DataEdit->Text = IniFile->ReadString(SectionData, KeyData, "The quick brown fox jumps over the lazy dog"); + RepeatEdit->Text = IniFile->ReadString(SectionData, KeyRepeat, ""); + LengthEdit->Text = IniFile->ReadString(SectionData, KeyLength, "60"); + ContCheckBox->Checked = IniFile->ReadInteger(SectionData, KeyContinuous, 0); + LingerCheckBox->Checked = IniFile->ReadInteger(SectionData, KeyLinger, 1); + DisplayDataCheckBox->Checked = IniFile->ReadInteger(SectionData, KeyDisplay, 0); + UseDataSentCheckBox->Checked = IniFile->ReadInteger(SectionData, KeyUseDataSent, 1); + delete IniFile; + RepeatEdit->Enabled = !ContCheckBox->Checked; + CountLabel->Caption = ""; + } +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::FormClose(TObject *Sender, + TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + IniFile->WriteString(SectionData, KeyPort, PortEdit->Text); + IniFile->WriteString(SectionData, KeyServer, ServerEdit->Text); + IniFile->WriteString(SectionData, KeyData, DataEdit->Text); + IniFile->WriteString(SectionData, KeyRepeat, RepeatEdit->Text); + IniFile->WriteString(SectionData, KeyLength, LengthEdit->Text); + IniFile->WriteInteger(SectionData, KeyContinuous, ContCheckBox->Checked); + IniFile->WriteInteger(SectionData, KeyLinger, LingerCheckBox->Checked); + IniFile->WriteInteger(SectionData, KeyUseDataSent, UseDataSentCheckBox->Checked); + IniFile->WriteInteger(SectionData, KeyDisplay, DisplayDataCheckBox->Checked); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::FormDestroy(TObject *Sender) +{ + if (FDataBuf) { + free(FDataBuf); + FDataBuf = NULL; + } +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::ContCheckBoxClick(TObject *Sender) +{ + RepeatEdit->Enabled = !ContCheckBox->Checked; +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::Display(AnsiString Msg) +{ + if (DisplayMemo->Lines->Count > 200) + DisplayMemo->Clear(); + DisplayMemo->Lines->Add(Msg); +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::ActionButtonClick(TObject *Sender) +{ + int Len; + int N; + int T; + AnsiString Buf; + + // The ActionButton is used to start or stop data transmission + if (FSending) { + // We are already sending, so user wants to stop + // Display updated counter + CountLabel->Caption = IntToStr(FCount); + + // Check if some data remains in TWSocket"s internal buffer + if (!WSocket1->AllSent && + (Application->MessageBox("Data is still being sent\n" + "Close anyway ?", + "Warning", MB_YESNO) != IDYES)) + return; + + Display("Stop requested"); + if (!WSocket1->AllSent) + Display("Not all data has been sent"); + + FAutoStart = 0; + // Close the socket-> This will delete any data not already sent to + // winsock. + PostMessage(Handle, WM_CLOSE_REQUEST, 0, (LPARAM)WSocket1); + return; + } + + // The user wants to start data transmission + CountLabel->Caption = ""; + PauseButton->Caption = "&Pause"; + PauseButton->Visible = TRUE; + ActionButton->Caption = "&Stop"; + FPaused = FALSE; + FSending = TRUE; + FFinished = FALSE; + FCount = 0; + + // Setup final count + if (ContCheckBox->Checked) + FFinalCount = 0; + else + FFinalCount = StrToInt(Trim(RepeatEdit->Text)); + + // Check which method use to send more data + // Using OnDataSent event will prevent internal TWSocket buffer to be + // enlarged without limit. + FUseDataSent = UseDataSentCheckBox->Checked; + if (FUseDataSent) + WSocket1->OnDataSent = WSocket1DataSent; + else + WSocket1->OnDataSent = WSocket1NoDataSent; + + // Prepare data to be sent + Buf = "0000 " + DataEdit->Text; + Len = StrToInt(Trim(LengthEdit->Text)); + if (Len <= 0) + Len = Buf.Length(); + if (FDataBuf) + free(FDataBuf); + FDataBufSize = Len + 3; + FDataBuf = (char *)malloc(FDataBufSize); + if (Len > 0) { + if (Len < Buf.Length()) + Move(&Buf[1], &FDataBuf[0], Len); + else { + T = 0; + while (T < Len) { + N = Buf.Length(); + if ((T + N) > Len) + N = Len - T; + if (N > 0) + Move(&Buf[1], &FDataBuf[T], N); + T = T + N; + } + } + } + FDataBuf[Len] = '\r'; + FDataBuf[Len + 1] = '\n'; + FDataBuf[Len + 2] = 0; + + // Launch DNS lookup-> When done, we'll try to connect. + WSocket1->DnsLookup(Trim(ServerEdit->Text)); +} +//--------------------------------------------------------------------------- +// We comes here when DNS lookup is finished, even in case of failure. +void __fastcall TSenderForm::WSocket1DnsLookupDone(TObject *Sender, + WORD Error) +{ + // If any error occured, we just display info and prepare to restart. + if (Error) { + MessageBeep(MB_OK); + Display("DNS failure-> Error #" + IntToStr(Error)); + ActionButton->Caption = "&Start"; + PauseButton->Visible = FALSE; + return; + } + + // Now we know the IP address-> Try to connect. + WSocket1->Addr = WSocket1->DnsResult; + WSocket1->Port = Trim(PortEdit->Text); + WSocket1->Proto = "tcp"; + try { + WSocket1->Connect(); + } catch (const Exception &E) { + MessageBeep(MB_OK); + Display("Connect failed: " + E.Message); + ActionButton->Caption = "&Start"; + PauseButton->Visible = FALSE; + FAutoStart = 0; + return; + } +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::WSocket1SessionConnected(TObject *Sender, + WORD Error) +{ + if (Error) { + MessageBeep(MB_OK); + Display("Can't connect. Error #" + IntToStr(Error)); + ActionButton->Caption = "&Start"; + FAutoStart = 0; + return; + } + Display("Connected"); + if (LingerCheckBox->Checked) + WSocket1->LingerOnOff = wsLingerOn; + else + WSocket1->LingerOnOff = wsLingerOff; + WSocket1->LingerTimeout = 300; + WSocket1->SetLingerOption(); + DoSend(); + if (FUseDataSent) + return; + + // User requested to not use OnDataSent event-> We will simply loop. + // until all data has been sent-> This will fill TWSocket internal buffer + // very quickly while data is being sent in the background at network + // speed. + while ((FFinalCount <= 0) || (FFinalCount > FCount)) { + // We must break the loop if user temrinated the application, + // or if connection is broke, or if user stopped. + if (Application->Terminated || + (WSocket1->State != wsConnected) || + !FSending) + return; + // Otherwise, we can send data + DoSend(); + } + CountLabel->Caption = IntToStr(FCount); + PauseButton->Visible = FALSE; + Display("All data is in TWSocket buffer and being sent in the background"); + FFinished = TRUE; +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::DoSend(void) +{ + AnsiString Buf; + + do { + // Calling ProcessMessages let a chance to button and other events + // to be handled. + Application->ProcessMessages(); + // We must stop if the user clicked the close button. + if (Application->Terminated) { + Display("Application terminated"); + return; + } + // We must stop if the user requested to stop send + if (!FSending) + return; + // We must stop if connection is broken + if (WSocket1->State != wsConnected) + return; + // We don't wants to use 100% CPU just looping. Sleep a little bit + if (FPaused) + Sleep(250); + } while (FPaused); + + // We need to check if we are still connected before sending + if (WSocket1->State != wsConnected) + return; + + if ((FFinalCount <= 0) || (FFinalCount > FCount)) { + // Count the message sent + FCount++; + // Put the counter into the message, truvated to 4 digits + Buf = IntToStr(FCount % 10000) + " "; + Move(&Buf[1], &FDataBuf[0], 4); + + // If required, display in memo box (slow down !) + if (FDisplayData) + Display("Sending " + IntToStr(FCount)); + // Display the counter every 100 sends + if ((FCount % 100) == 0) + CountLabel->Caption = IntToStr(FCount); + + // Try to send data-> Send may fail ! + try { + WSocket1->Send(FDataBuf, FDataBufSize - 1); + } catch (const Exception &E) { + Display("Exception during TWSocket->Send(): " + E.Message); + FAutoStart = 0; + PostMessage(Handle, WM_CLOSE_REQUEST, 0, (LPARAM)WSocket1); + } + } + else { + Display("Required data has been sent. Closing."); + // We may have not read data send by server-> But anyway, close the + // session. + PostMessage(Handle, WM_CLOSE_REQUEST, 0, (LPARAM)WSocket1); + } +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::WSocket1DataSent(TObject *Sender, WORD Error) +{ + DoSend(); +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::WSocket1NoDataSent(TObject *Sender, WORD Error) +{ + if (FFinished) { + if (!WSocket1->AllSent) + Display("Not all sent"); + Display("Required data has been sent. Closing."); + PostMessage(Handle, WM_CLOSE_REQUEST, 0, (LPARAM)WSocket1); + } +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::WSocket1DataAvailable(TObject *Sender, + WORD Error) +{ + char *Buf; + TWSocket *Cli; + int Len; + int Cnt; + + Cli = (TWSocket *)Sender; + Cnt = Cli->RcvdCount; + if (Cnt <= 0) + return; + + Buf = (char *)malloc(Cnt + 1); + try { + Len = Cli->Receive(Buf, Cnt); + if (Len > 0) { + Buf[Cnt] = 0; + Display("Received: " + (AnsiString)Buf); + } + } catch (Exception &exception) + { + Application->ShowException(&exception); + } + free(Buf); +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::WSocket1SessionClosed(TObject *Sender, + WORD Error) +{ + if (Error == 0) + Display("Socket closed, no error"); + else { + Display("Socket closed, Error #" + IntToStr(Error)); + FAutoStart = 0; + } + FSending = FALSE; + ActionButton->Caption = "&Start"; + PauseButton->Visible = FALSE; + FPaused = FALSE; + if (FAutoStart > 0) { + FAutoStart++; + AutoStartButton->Caption = IntToStr(FAutoStart); + PostMessage(Handle, WM_AUTO_START, 0, 0); + } +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::DisplayDataCheckBoxClick(TObject *Sender) +{ + FDisplayData = DisplayDataCheckBox->Checked; +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::UseDataSentCheckBoxClick(TObject *Sender) +{ + FUseDataSent = UseDataSentCheckBox->Checked; +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::PauseButtonClick(TObject *Sender) +{ + CountLabel->Caption = IntToStr(FCount); + FPaused = !FPaused; + if (FPaused) + PauseButton->Caption = "&Resume"; + else + PauseButton->Caption = "&Pause"; +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::AutoStartButtonClick(TObject *Sender) +{ + if (FAutoStart != 0) { + FAutoStart = 0; + return; + } + + FAutoStart = 1; + AutoStartButton->Caption = IntToStr(FAutoStart); + PostMessage(Handle, WM_AUTO_START, 0, 0); +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::WMCloseRequest(TMessage Msg) +{ + TWSocket *WSocket; + + WSocket = (TWSocket *)(Msg.LParam); + WSocket->Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TSenderForm::WMAutoStart(TMessage Msg) +{ + ActionButtonClick(this); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Sender1.dfm b/lib/ics/Cpp/Internet/Sender1.dfm new file mode 100644 index 00000000..d265206d Binary files /dev/null and b/lib/ics/Cpp/Internet/Sender1.dfm differ diff --git a/lib/ics/Cpp/Internet/Sender1.h b/lib/ics/Cpp/Internet/Sender1.h new file mode 100644 index 00000000..9f6b33d2 --- /dev/null +++ b/lib/ics/Cpp/Internet/Sender1.h @@ -0,0 +1,81 @@ +//--------------------------------------------------------------------------- +#ifndef Sender1H +#define Sender1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include "WSocket.hpp" +#define WM_AUTO_START (WM_USER + 1) +#define WM_CLOSE_REQUEST (WM_USER + 2) +//--------------------------------------------------------------------------- +class TSenderForm : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TLabel *Label1; + TLabel *Label2; + TLabel *Label3; + TLabel *Label4; + TLabel *Label5; + TLabel *CountLabel; + TEdit *ServerEdit; + TEdit *PortEdit; + TEdit *DataEdit; + TEdit *RepeatEdit; + TCheckBox *ContCheckBox; + TButton *ActionButton; + TEdit *LengthEdit; + TCheckBox *DisplayDataCheckBox; + TCheckBox *UseDataSentCheckBox; + TButton *PauseButton; + TButton *AutoStartButton; + TCheckBox *LingerCheckBox; + TMemo *DisplayMemo; + TWSocket *WSocket1; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall FormDestroy(TObject *Sender); + void __fastcall ContCheckBoxClick(TObject *Sender); + void __fastcall ActionButtonClick(TObject *Sender); + void __fastcall WSocket1DnsLookupDone(TObject *Sender, WORD Error); + void __fastcall WSocket1SessionConnected(TObject *Sender, WORD Error); + void __fastcall WSocket1DataSent(TObject *Sender, WORD Error); + void __fastcall WSocket1DataAvailable(TObject *Sender, WORD Error); + void __fastcall WSocket1SessionClosed(TObject *Sender, WORD Error); + void __fastcall DisplayDataCheckBoxClick(TObject *Sender); + void __fastcall UseDataSentCheckBoxClick(TObject *Sender); + void __fastcall PauseButtonClick(TObject *Sender); + void __fastcall AutoStartButtonClick(TObject *Sender); +private: // User declarations + AnsiString FIniFileName; + BOOL FInitialized; + char *FDataBuf; + int FDataBufSize; + int FCount; + int FFinalCount; + BOOL FSending; + BOOL FDisplayData; + BOOL FUseDataSent; + BOOL FFinished; + BOOL FPaused; + int FAutoStart; + void __fastcall Display(AnsiString Msg); + void __fastcall DoSend(void); + void __fastcall WSocket1NoDataSent(TObject *Sender, WORD Error); +protected: + void __fastcall WMAutoStart(TMessage Msg); + void __fastcall WMCloseRequest(TMessage Msg); +BEGIN_MESSAGE_MAP + MESSAGE_HANDLER(WM_AUTO_START, TMessage, WMAutoStart) + MESSAGE_HANDLER(WM_CLOSE_REQUEST, TMessage, WMCloseRequest) +END_MESSAGE_MAP(TForm) +public: // User declarations + __fastcall TSenderForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TSenderForm *SenderForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/Socks1.cpp b/lib/ics/Cpp/Internet/Socks1.cpp new file mode 100644 index 00000000..fb5c174c --- /dev/null +++ b/lib/ics/Cpp/Internet/Socks1.cpp @@ -0,0 +1,239 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: Show how to use TWSocket with SOCKS protocol to traverse + a firewall. +Creation: December 27, 1998 (from Delphi version created November 21, 1998) +Version: 1.01 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Aug 15, 1999 V1.01 Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). + + +---------------------------------------------------------------------------*/ +#include +#include +#pragma hdrstop + +#include "Socks1.h" +#define SectionWindow "Windows" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +#define SectionData "Data" +#define KeyTargetHost "TargetHost" +#define KeyTargetPort "TargetPort" +#define KeySocksServer "SocksServer" +#define KeySocksPort "SocksPort" +#define KeySocksUsercode "SocksUsercode" +#define KeySocksPassword "SocksPassword" +#define KeySocksAuth "SocksAuthentification" +#define KeySocks4 "Socks4" +#define KeySocks5 "Socks5" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "WSocket" +#pragma resource "*.dfm" +TSocksTestForm *SocksTestForm; +//--------------------------------------------------------------------------- +__fastcall TSocksTestForm::TSocksTestForm(TComponent* Owner) + : TForm(Owner) +{ + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + + if (!FInitialized) { + FInitialized = TRUE; + DisplayMemo->Clear(); + IniFile = new TIniFile(FIniFileName); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + Top = IniFile->ReadInteger(SectionWindow, KeyTop, + (Screen->Height - Height) / 2); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, + (Screen->Width - Width) / 2); + TargetHostEdit->Text = IniFile->ReadString(SectionData, KeyTargetHost, ""); + TargetPortEdit->Text = IniFile->ReadString(SectionData, KeyTargetPort, ""); + SocksServerEdit->Text = IniFile->ReadString(SectionData, KeySocksServer, ""); + SocksPortEdit->Text = IniFile->ReadString(SectionData, KeySocksPort, "1080"); + SocksUsercodeEdit->Text = IniFile->ReadString(SectionData, KeySocksUsercode, ""); + SocksPasswordEdit->Text = IniFile->ReadString(SectionData, KeySocksPassword, ""); + SocksAuthCheckBox->Checked = IniFile->ReadInteger(SectionData, KeySocksAuth, 0); + Socks4RadioButton->Checked = IniFile->ReadInteger(SectionData, KeySocks4, 0); + Socks5RadioButton->Checked = IniFile->ReadInteger(SectionData, KeySocks5, 1); + delete IniFile; + } +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::FormClose(TObject *Sender, + TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + IniFile->WriteString(SectionData, KeyTargetHost, Trim(TargetHostEdit->Text)); + IniFile->WriteString(SectionData, KeyTargetPort, Trim(TargetPortEdit->Text)); + IniFile->WriteString(SectionData, KeySocksServer, Trim(SocksServerEdit->Text)); + IniFile->WriteString(SectionData, KeySocksPort, Trim(SocksPortEdit->Text)); + IniFile->WriteString(SectionData, KeySocksUsercode, Trim(SocksUsercodeEdit->Text)); + IniFile->WriteString(SectionData, KeySocksPassword, Trim(SocksPasswordEdit->Text)); + IniFile->WriteInteger(SectionData, KeySocksAuth, SocksAuthCheckBox->Checked); + IniFile->WriteInteger(SectionData, KeySocks5, Socks5RadioButton->Checked); + IniFile->WriteInteger(SectionData, KeySocks4, Socks4RadioButton->Checked); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::DisplayMsg(TObject *Sender, AnsiString &Msg) +{ + DisplayMemo->Lines->Add(Msg); +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::ConnectButtonClick(TObject *Sender) +{ + if (Socks5RadioButton->Checked) + WSocket1->SocksLevel = "5"; + else if (Socks4RadioButton->Checked && SocksAuthCheckBox->Checked) + WSocket1->SocksLevel = "4A"; + else + WSocket1->SocksLevel = "4"; + DisplayMemo->Lines->Add("Connecting using Socks" + WSocket1->SocksLevel); + + WSocket1->SocksServer = Trim(SocksServerEdit->Text); + WSocket1->SocksPort = Trim(SocksPortEdit->Text); + WSocket1->SocksUsercode = Trim(SocksUsercodeEdit->Text); + WSocket1->SocksPassword = Trim(SocksPasswordEdit->Text); + WSocket1->SocksAuthentication = (SocksAuthCheckBox->Checked) ? + socksAuthenticateUsercode : + socksNoAuthentication; + WSocket1->Proto = "tcp"; + WSocket1->Addr = Trim(TargetHostEdit->Text); + WSocket1->Port = Trim(TargetPortEdit->Text); + WSocket1->OnDisplay = DisplayMsg; + WSocket1->Connect(); +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::DisconnectButtonClick(TObject *Sender) +{ + WSocket1->Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::WSocket1SessionConnected(TObject *Sender, + WORD Error) +{ + DisplayMemo->Lines->Add("Session connected to remote host."); +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::WSocket1SocksConnected(TObject *Sender, + WORD Error) +{ + DisplayMemo->Lines->Add("Session connected to socks server."); +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::WSocket1SocksAuthState(TObject *Sender, + TSocksAuthState AuthState) +{ + switch (AuthState) { + case socksAuthStart: + DisplayMemo->Lines->Add("Socks authentification start."); + break; + case socksAuthSuccess: + DisplayMemo->Lines->Add("Socks authentification success."); + break; + case socksAuthFailure: + DisplayMemo->Lines->Add("Socks authentification failure."); + break; + case socksAuthNotRequired: + DisplayMemo->Lines->Add("Socks authentification not required."); + break; + default: + DisplayMemo->Lines->Add("Unknown socks authentification state."); + break; + } +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::WSocket1SessionClosed(TObject *Sender, + WORD Error) +{ + DisplayMemo->Lines->Add("Session Closed"); +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::WSocket1DataAvailable(TObject *Sender, + WORD Error) +{ + int Len; + int I; + char *p; + + Len = ((TWSocket *)Sender)->Receive(&FRcvBuf[FRcvCnt], sizeof(FRcvBuf) - FRcvCnt - 1); + if (Len < 0) + return; + FRcvCnt = FRcvCnt + Len; + FRcvBuf[FRcvCnt] = 0; + + while (FRcvCnt > 0) { + p = strchr(FRcvBuf, '\n'); + if (p == NULL) + return; + I = p - FRcvBuf; + + FRcvBuf[I] = 0; + if ((I > 0) && (FRcvBuf[I - 1] == '\r')) + FRcvBuf[I - 1] = 0; + + DisplayMemo->Lines->Add("Received: \"" + (AnsiString)FRcvBuf + "\""); + Move(&FRcvBuf[I + 1], &FRcvBuf[0], FRcvCnt - I); + FRcvCnt = FRcvCnt - I - 1; + } +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::WSocket1SocksError(TObject *Sender, + int Error, AnsiString Msg) +{ + DisplayMemo->Lines->Add("Socks error #" + IntToStr(Error) + " " + Msg); +} +//--------------------------------------------------------------------------- +void __fastcall TSocksTestForm::ClearButtonClick(TObject *Sender) +{ + DisplayMemo->Clear(); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/Socks1.dfm b/lib/ics/Cpp/Internet/Socks1.dfm new file mode 100644 index 00000000..3e7479ce Binary files /dev/null and b/lib/ics/Cpp/Internet/Socks1.dfm differ diff --git a/lib/ics/Cpp/Internet/Socks1.h b/lib/ics/Cpp/Internet/Socks1.h new file mode 100644 index 00000000..8c97a9da --- /dev/null +++ b/lib/ics/Cpp/Internet/Socks1.h @@ -0,0 +1,61 @@ +//--------------------------------------------------------------------------- +#ifndef Socks1H +#define Socks1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +#include +//--------------------------------------------------------------------------- +class TSocksTestForm : public TForm +{ +__published: // IDE-managed Components + TMemo *DisplayMemo; + TPanel *Panel1; + TLabel *Label1; + TLabel *Label2; + TButton *ConnectButton; + TButton *DisconnectButton; + TEdit *TargetHostEdit; + TEdit *TargetPortEdit; + TEdit *SocksServerEdit; + TEdit *SocksPortEdit; + TEdit *SocksUsercodeEdit; + TEdit *SocksPasswordEdit; + TButton *ClearButton; + TWSocket *WSocket1; + TLabel *Label6; + TLabel *Label5; + TLabel *Label4; + TLabel *Label3; + TCheckBox *SocksAuthCheckBox; + TRadioButton *Socks5RadioButton; + TRadioButton *Socks4RadioButton; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall ConnectButtonClick(TObject *Sender); + void __fastcall DisconnectButtonClick(TObject *Sender); + void __fastcall WSocket1SessionConnected(TObject *Sender, WORD Error); + void __fastcall WSocket1SocksConnected(TObject *Sender, WORD Error); + void __fastcall WSocket1SocksAuthState(TObject *Sender, + TSocksAuthState AuthState); + void __fastcall WSocket1SessionClosed(TObject *Sender, WORD Error); + void __fastcall WSocket1DataAvailable(TObject *Sender, WORD Error); + void __fastcall WSocket1SocksError(TObject *Sender, int Error, + AnsiString Msg); + void __fastcall ClearButtonClick(TObject *Sender); +private: // User declarations + AnsiString FIniFileName; + BOOL FInitialized; + char FRcvBuf[2048]; + int FRcvCnt; + void __fastcall DisplayMsg(TObject *Sender, AnsiString &Msg); +public: // User declarations + __fastcall TSocksTestForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TSocksTestForm *SocksTestForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/SrvDemo1.cpp b/lib/ics/Cpp/Internet/SrvDemo1.cpp new file mode 100644 index 00000000..9fbc157b --- /dev/null +++ b/lib/ics/Cpp/Internet/SrvDemo1.cpp @@ -0,0 +1,152 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: Server program demo using TWSocket. +Creation: Dec 28, 1998 (From Delphi version created dec 8, 1997) +Version: 1.01 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + +---------------------------------------------------------------------------*/ +#include +#include +#pragma hdrstop + +#include "SrvDemo1.h" +#include "SrvDemo2.h" +#define IniFileName "SrvDemo.ini'" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "WSocket" +#pragma resource "*.dfm" +TSrvForm *SrvForm; +//--------------------------------------------------------------------------- +__fastcall TSrvForm::TSrvForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TSrvForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + AnsiString Buffer; + + if (!Initialized) { + Initialized = TRUE; + IniFile = new TIniFile(IniFileName); + Top = IniFile->ReadInteger("Window", "Top", Top); + Left = IniFile->ReadInteger("Window", "Left", Left); + Width = IniFile->ReadInteger("Window", "Width", Width); + Height = IniFile->ReadInteger("Window", "Height", Height); + PortEdit->Text = IniFile->ReadString("Data", "Port", "telnet"); + delete IniFile; + + DataTable->DatabaseName = ExtractFilePath(Application->ExeName); + try { + DataTable->Open(); + } catch (const Exception &E) { + Buffer = "Unable to open " + DataTable->DatabaseName + + DataTable->TableName; + Application->MessageBox(Buffer.c_str(), "Error", MB_OK); + Application->Terminate(); + return; + } + StartServer(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TSrvForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(IniFileName); + IniFile->WriteInteger("Window", "Top", Top); + IniFile->WriteInteger("Window", "Left", Left); + IniFile->WriteInteger("Window", "Width", Width); + IniFile->WriteInteger("Window", "Height", Height); + IniFile->WriteString("Data", "Port", PortEdit->Text); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TSrvForm::RestartButtonClick(TObject *Sender) +{ + StartServer(); +} +//--------------------------------------------------------------------------- +void __fastcall TSrvForm::StartServer(void) +{ + SrvSocket->Close(); + SrvSocket->Addr = "0.0.0.0"; + SrvSocket->Port = PortEdit->Text; + SrvSocket->Proto = "tcp"; + SrvSocket->Listen(); +} +//--------------------------------------------------------------------------- +void __fastcall TSrvForm::SrvSocketSessionAvailable(TObject *Sender, + WORD Error) +{ + TCliForm *Form; + + ClientNumber++; + // Create a new TCliForm instance to handle the incomming client + Form = new TCliForm(this); + // Add the form address as an identifier in our client list + ClientListBox->Items->Add(IntToStr((int)Form)); + // We request line mode, to receive only complete line. + // TWSocket does all the job for us... + Form->CliSocket->LineMode = TRUE; + Form->CliSocket->LineEnd = "\r\n"; + // Now accept the new client connection + Form->CliSocket->HSocket = SrvSocket->Accept(); + Form->DataTable = DataTable; + Form->Caption = "Client " + IntToStr(ClientNumber); + // Showing the form is not mandatory. In a real server, this can be + // annoying to have a form displayed for each client. In some situation, + // it may be handy to have a user interface for each connected client. + Form->Show(); +} +//--------------------------------------------------------------------------- +void __fastcall TSrvForm::WMUser(TMessage Message) +{ + TCliForm *Form; + int I; + + Form = (TCliForm *)(Message.LParam); + Form->Release(); + for (I = 0; I < ClientListBox->Items->Count; I++) { + if (ClientListBox->Items->Strings[I] == IntToStr((int)Form)) { + ClientListBox->Items->Delete(I); + break; + } + } +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/SrvDemo1.dfm b/lib/ics/Cpp/Internet/SrvDemo1.dfm new file mode 100644 index 00000000..b53a4262 Binary files /dev/null and b/lib/ics/Cpp/Internet/SrvDemo1.dfm differ diff --git a/lib/ics/Cpp/Internet/SrvDemo1.h b/lib/ics/Cpp/Internet/SrvDemo1.h new file mode 100644 index 00000000..377962c8 --- /dev/null +++ b/lib/ics/Cpp/Internet/SrvDemo1.h @@ -0,0 +1,43 @@ +//--------------------------------------------------------------------------- +#ifndef SrvDemo1H +#define SrvDemo1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +#include +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +class TSrvForm : public TForm +{ +__published: // IDE-managed Components + TListBox *ClientListBox; + TPanel *Panel1; + TLabel *Label1; + TEdit *PortEdit; + TButton *RestartButton; + TWSocket *SrvSocket; + TTable *DataTable; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall RestartButtonClick(TObject *Sender); + void __fastcall SrvSocketSessionAvailable(TObject *Sender, WORD Error); +private: // User declarations + BOOL Initialized; + int ClientNumber; + void __fastcall StartServer(void); +protected: + void __fastcall WMUser(TMessage Message); +BEGIN_MESSAGE_MAP + MESSAGE_HANDLER(WM_USER, TMessage, WMUser) +END_MESSAGE_MAP(TForm) +public: // User declarations + __fastcall TSrvForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TSrvForm *SrvForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/SrvDemo2.cpp b/lib/ics/Cpp/Internet/SrvDemo2.cpp new file mode 100644 index 00000000..01b36e49 --- /dev/null +++ b/lib/ics/Cpp/Internet/SrvDemo2.cpp @@ -0,0 +1,130 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "SrvDemo2.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "WSocket" +#pragma resource "*.dfm" +TCliForm *CliForm; +//--------------------------------------------------------------------------- +__fastcall TCliForm::TCliForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TCliForm::FormShow(TObject *Sender) +{ + if (!Initialized) { + Initialized = TRUE; + DisplayMemo->Clear(); + SendEdit->Text = "Hello world !"; + ActiveControl = SendEdit; + } +} +//--------------------------------------------------------------------------- +void __fastcall TCliForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + PostMessage(((TForm *)Owner)->Handle, WM_USER, 0, (int)this); +} +//--------------------------------------------------------------------------- +void __fastcall TCliForm::ProcessCommand(AnsiString Cmd) +{ + AnsiString CommandVerb; + AnsiString CommandTail; + int I, J; + + DisplayMemo->Lines->Add(Cmd); + + // Skip leading spaces + I = 1; + while ((I <= Cmd.Length()) && ((Cmd[I] == ' ') || (Cmd[I] == '\t'))) + I++; + + // Find separator and separe CommandVerb and CommandTail + J = I; + while (TRUE) { + if (J >= Cmd.Length()) { + CommandTail = ""; + CommandVerb = Cmd; + break; + } + + if ((Cmd[J] == ' ') || (Cmd[I] == '\t')) { + CommandTail = Cmd.SubString(J, Cmd.Length() - J + 1); + CommandVerb = Cmd.SubString(I, J - I); + break; + } + J++; + } + CommandVerb = UpperCase(CommandVerb); + CommandTail = Trim(CommandTail); + + if (CommandVerb == "LASTNAME") { + DataTable->IndexName = "NOM"; + DataTable->SetKey(); + DataTable->FieldByName("NOM")->AsString = CommandTail; + } + else if (CommandVerb == "FIRSTNAME") { + DataTable->IndexName = "PRENOM"; + DataTable->SetKey(); + DataTable->FieldByName("PRENOM")->AsString = CommandTail; + } + else { + CliSocket->SendStr("Syntax error !\r\n"); + return; + } + + if (DataTable->GotoKey()) + CliSocket->SendStr( + "\"" + DataTable->FieldByName("NOM")->AsString + "\", " + + "\"" + DataTable->FieldByName("PRENOM")->AsString + "\", " + + "\"" + DataTable->FieldByName("ADRESSE")->AsString + "\", " + + "\"" + DataTable->FieldByName("CP")->AsString + "\", " + + "\"" + DataTable->FieldByName("LOCALITE")->AsString + "\"\r\n"); + else + CliSocket->SendStr("Not found.\r\n"); +} +//--------------------------------------------------------------------------- +void __fastcall TCliForm::CliSocketDataAvailable(TObject *Sender, + WORD Error) +{ + int Len; + + // We use line mode. So when we call Receive, we always receive a + // complete line, include end of line marker or nothing. + Len = CliSocket->Receive(&Buffer[0], sizeof(Buffer) - 1); + if (Len <= 0) + return; + + // Remove end of line marker + while ((Len > 0) && + ((Buffer[Len - 1] == '\r') || (Buffer[Len - 1] == '\n'))) + Len--; + + // Nul terminate the string + Buffer[Len] = 0; + // Display command in label + LineLabel->Caption = Buffer; + // Process command + ProcessCommand(Buffer); +} +//--------------------------------------------------------------------------- +void __fastcall TCliForm::CliSocketSessionClosed(TObject *Sender, + WORD Error) +{ + Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TCliForm::SendButtonClick(TObject *Sender) +{ + CliSocket->SendStr(SendEdit->Text + "\r\n"); + ActiveControl = SendEdit; +} +//--------------------------------------------------------------------------- +void __fastcall TCliForm::DisconnectButtonClick(TObject *Sender) +{ + Close(); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/SrvDemo2.dfm b/lib/ics/Cpp/Internet/SrvDemo2.dfm new file mode 100644 index 00000000..29bf5a64 Binary files /dev/null and b/lib/ics/Cpp/Internet/SrvDemo2.dfm differ diff --git a/lib/ics/Cpp/Internet/SrvDemo2.h b/lib/ics/Cpp/Internet/SrvDemo2.h new file mode 100644 index 00000000..6219dff5 --- /dev/null +++ b/lib/ics/Cpp/Internet/SrvDemo2.h @@ -0,0 +1,41 @@ +//--------------------------------------------------------------------------- +#ifndef SrvDemo2H +#define SrvDemo2H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +#include +#include +//--------------------------------------------------------------------------- +class TCliForm : public TForm +{ +__published: // IDE-managed Components + TMemo *DisplayMemo; + TPanel *Panel1; + TEdit *SendEdit; + TButton *SendButton; + TPanel *Panel2; + TLabel *LineLabel; + TButton *DisconnectButton; + TWSocket *CliSocket; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall CliSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall CliSocketSessionClosed(TObject *Sender, WORD Error); + void __fastcall SendButtonClick(TObject *Sender); + void __fastcall DisconnectButtonClick(TObject *Sender); +private: // User declarations + BOOL Initialized; + char Buffer[1024]; + void __fastcall ProcessCommand(AnsiString Cmd); +public: // User declarations + TTable *DataTable; + __fastcall TCliForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TCliForm *CliForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/TcpSrv1.cpp b/lib/ics/Cpp/Internet/TcpSrv1.cpp new file mode 100644 index 00000000..3c149fc9 --- /dev/null +++ b/lib/ics/Cpp/Internet/TcpSrv1.cpp @@ -0,0 +1,225 @@ +/*--------------------------------------------------------------------------- + +Author: Franois Piette +Creation: Sep 05, 1999 (From Delphi version dated aug 29, 1999) +Version: 1.00 +Description: Basic TCP server showing how to use TWSocketServer and + TWSocketClient components. +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. +History: + +---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included + #define s_addr S_addr +#endif +#include +#include +#pragma hdrstop + +#include "TcpSrv1.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "WSocket" +#pragma link "WSocketS" +#pragma resource "*.dfm" +#define SectionWindow "WindowTcpSrv" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +TTcpSrvForm *TcpSrvForm; +//--------------------------------------------------------------------------- +__fastcall TTcpSrvForm::TTcpSrvForm(TComponent* Owner) + : TForm(Owner) +{ + // Build Ini file name + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TTcpSrvForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + + if (!FInitialized) { + FInitialized = TRUE; + IniFile = new TIniFile(FIniFileName); + Top = IniFile->ReadInteger(SectionWindow, KeyTop, Top); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, Left); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + delete IniFile; + DisplayMemo->Clear(); + // Delay startup code until our UI is ready and visible + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + } +} +//--------------------------------------------------------------------------- +void __fastcall TTcpSrvForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + delete IniFile; +} +//--------------------------------------------------------------------------- +// Display a message in our display memo. Delete lines to be sure to not +// overflow the memo which may have a limited capacity. +void __fastcall TTcpSrvForm::Display(AnsiString Msg) +{ + int I; + + DisplayMemo->Lines->BeginUpdate(); + if (DisplayMemo->Lines->Count > 200) { + for (I = 1; I <= 50; I++) + DisplayMemo->Lines->Delete(0); + } + DisplayMemo->Lines->Add(Msg); + DisplayMemo->Lines->EndUpdate(); +} +//--------------------------------------------------------------------------- +// This is our custom message handler. We posted a WM_APPSTARTUP message +// from FormShow event handler. Now UI is ready and visible. +void __fastcall TTcpSrvForm::WMAppStartup(TMessage Message) +{ + WSocketServer1->Proto = "tcp"; // Use TCP protocol + WSocketServer1->Port = "telnet"; // Use telnet port + WSocketServer1->Addr = "0.0.0.0"; // Use any interface + WSocketServer1->ClientClass = __classid(TTcpSrvClient); // Use our component + WSocketServer1->Listen(); // Start litening + Display("Waiting for clients..."); +} +//--------------------------------------------------------------------------- +void __fastcall TTcpSrvForm::WSocketServer1ClientConnect(TObject *Sender, + TWSocketClient *Client, WORD Error) +{ + Display("Client connecting: " + ((TTcpSrvClient *)Client)->PeerAddr); + ((TTcpSrvClient *)Client)->LineMode = TRUE; + ((TTcpSrvClient *)Client)->LineEdit = TRUE; + ((TTcpSrvClient *)Client)->OnDataAvailable = ClientDataAvailable; + ((TTcpSrvClient *)Client)->OnBgException = ClientBgException; + ((TTcpSrvClient *)Client)->ConnectTime = Now(); +} +//--------------------------------------------------------------------------- +void __fastcall TTcpSrvForm::WSocketServer1ClientDisconnect(TObject *Sender, + TWSocketClient *Client, WORD Error) +{ + Display("Client disconnecting: " + ((TTcpSrvClient *)Client)->PeerAddr + " " + + "Duration: " + FormatDateTime("hh:nn:ss", + Now() - ((TTcpSrvClient *)Client)->ConnectTime)); +} +//--------------------------------------------------------------------------- +void __fastcall TTcpSrvForm::ClientDataAvailable(TObject *Sender, WORD Error) +{ + TTcpSrvClient *Client; + + Client = (TTcpSrvClient *)Sender; + + // We use line mode. We will receive complete lines + Client->RcvdLine = Client->ReceiveStr(); + // Remove trailing CR/LF + while ((Client->RcvdLine.Length() > 0) && + ((Client->RcvdLine[Client->RcvdLine.Length()] == '\r') || + (Client->RcvdLine[Client->RcvdLine.Length()] == '\n'))) { + Client->RcvdLine = Client->RcvdLine.SubString(1, Client->RcvdLine.Length() - 1); + } + Display("Received from " + Client->PeerAddr + ": '" + Client->RcvdLine + "'"); + ProcessData(Client); +} +//--------------------------------------------------------------------------- +void __fastcall TTcpSrvForm::ProcessData(TTcpSrvClient *Client) +{ + int I; + TTcpSrvClient *AClient; + + // We could replace all those CompareText with a table lookup + if (CompareText(Client->RcvdLine, "exit") == 0) + // We can't call Client.Close here because we will immediately + // reenter DataAvailable event handler with same line because + // a line is removed from buffer AFTER it has been processed. + // Using CloseDelayed will delay Close until we are out of + // current event handler. + Client->CloseDelayed(); + else if (CompareText(Client->RcvdLine, "time") == 0) + // Send server date and time to client + Client->SendStr(DateTimeToStr(Now()) + "\r\n"); + else if (CompareText(Client->RcvdLine, "who") == 0) { + // Send client list to client + Client->SendStr("There are " + IntToStr(WSocketServer1->ClientCount) + + " connected users:\r\n"); + for (I = WSocketServer1->ClientCount - 1; I >= 0; I--) { + AClient = (TTcpSrvClient *)(WSocketServer1->Client[I]); + Client->SendStr(AClient->PeerAddr + ":" + AClient->PeerPort + " " + + DateTimeToStr(AClient->ConnectTime) + "\r\n"); + } + } + else if (CompareText(Client->RcvdLine, "exception") == 0) + // This will trigger a background exception for client + PostMessage(Client->Handle, WM_TRIGGER_EXCEPTION, 0, 0); + else + Client->SendStr("Unknown command: '" + Client->RcvdLine + "'\r\n"); +} +//--------------------------------------------------------------------------- +// This event handler is called when listening (server) socket experienced +// a background exception. Should normally never occurs. +void __fastcall TTcpSrvForm::WSocketServer1BgException(TObject *Sender, + Exception *E, bool &CanClose) +{ + Display("Server exception occured: " + E->ClassName() + ": " + E->Message); + CanClose = FALSE; // Hoping that server will still work ! +} +//--------------------------------------------------------------------------- +// This event handler is called when a client socket experience a background +// exception. It is likely to occurs when client aborted connection and data +// has not been sent yet. +void __fastcall TTcpSrvForm::ClientBgException(TObject *Sender, + Exception *E, + bool &CanClose) +{ + Display("Client exception occured: " + E->ClassName() + ": " + E->Message); + CanClose = TRUE; // Goodbye client ! +} +//--------------------------------------------------------------------------- +__fastcall TTcpSrvClient::TTcpSrvClient(TComponent* Owner) + : TWSocketClient(Owner) +{ +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/TcpSrv1.dfm b/lib/ics/Cpp/Internet/TcpSrv1.dfm new file mode 100644 index 00000000..d3458183 Binary files /dev/null and b/lib/ics/Cpp/Internet/TcpSrv1.dfm differ diff --git a/lib/ics/Cpp/Internet/TcpSrv1.h b/lib/ics/Cpp/Internet/TcpSrv1.h new file mode 100644 index 00000000..a72b38d8 --- /dev/null +++ b/lib/ics/Cpp/Internet/TcpSrv1.h @@ -0,0 +1,58 @@ +//--------------------------------------------------------------------------- +#ifndef TcpSrv1H +#define TcpSrv1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +#include "WSocketS.hpp" +#include +#define WM_APPSTARTUP (WM_USER + 1) +//--------------------------------------------------------------------------- +// TTcpSrvClient is the class which will be instanciated by server component +// for each new client. N simultaneous clients means N TTcpSrvClient will be +// instanciated. Each being used to handle only a signle client. +// We can add any data that has to be private for each client, such as +// receive buffer or any other data needed for processing. +class TTcpSrvClient : public TWSocketClient +{ +public: + AnsiString RcvdLine; + TDateTime ConnectTime; + __fastcall TTcpSrvClient(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +class TTcpSrvForm : public TForm +{ +__published: // IDE-managed Components + TPanel *ToolPanel; + TMemo *DisplayMemo; + TWSocketServer *WSocketServer1;void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall WSocketServer1ClientConnect(TObject *Sender, + TWSocketClient *Client, WORD Error); + void __fastcall WSocketServer1ClientDisconnect(TObject *Sender, + TWSocketClient *Client, WORD Error); + void __fastcall WSocketServer1BgException(TObject *Sender, + Exception *E, bool &CanClose); +private: // User declarations + AnsiString FIniFileName; + BOOL FInitialized; + void __fastcall Display(AnsiString Msg); + void __fastcall ProcessData(TTcpSrvClient *Client); + void __fastcall ClientDataAvailable(TObject *Sender, WORD Error); + void __fastcall ClientBgException(TObject *Sender, + Exception *E, + bool &CanClose); +public: // User declarations + __fastcall TTcpSrvForm(TComponent* Owner); +protected: + void __fastcall WMAppStartup(TMessage Message); +BEGIN_MESSAGE_MAP + MESSAGE_HANDLER(WM_APPSTARTUP, TMessage, WMAppStartup) +END_MESSAGE_MAP(TForm) +}; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/WebServ1.cpp b/lib/ics/Cpp/Internet/WebServ1.cpp new file mode 100644 index 00000000..86f7fbcd --- /dev/null +++ b/lib/ics/Cpp/Internet/WebServ1.cpp @@ -0,0 +1,337 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Creation: April 23, 2000 +Description: WebSrv1 show how to use THttpServer component to implement + a web server. +Version: 1.01 (From Delphi version dated Oct 10, 1999) +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2000-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + +---------------------------------------------------------------------------*/ + +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included + #define s_addr S_addr +#endif +#include +#include +#pragma hdrstop + +#include "WebServ1.h" +#define CopyRight "WebServ (c) 1999-2001 F. Piette V1.01 " +// IniFile layout for persistent data +#define SectionWindow "WindowMain" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +#define SectionData "Data" +#define KeyDocDir "DocDir" +#define KeyDefaultDoc "DefaultDoc" +#define KeyPort "Port" +#define KeyDisplayHeader "DisplayHeader" + +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma link "WSocket" +#pragma link "HttpSrv" +#pragma resource "*.dfm" +TWebServForm *WebServForm; +//--------------------------------------------------------------------------- +__fastcall TWebServForm::TWebServForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +// We need to override parent class destructor because we have allocated +// memory for our data buffer. +__fastcall TMyHttpConnection::~TMyHttpConnection() +{ + if (FPostedDataBuffer != NULL) { + free(FPostedDataBuffer); + FPostedDataBuffer = NULL; + FPostedDataSize = 0; + } +} +//--------------------------------------------------------------------------- +void __fastcall TWebServForm::FormCreate(TObject *Sender) +{ + // Create IniFileName based on EXE file name + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TWebServForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + WSAData wsi; + + if (!FInitialized) { + FInitialized = TRUE; + IniFile = new TIniFile(FIniFileName); + Top = IniFile->ReadInteger(SectionWindow, KeyTop, Top); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, Left); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + DocDirEdit->Text = IniFile->ReadString(SectionData, KeyDocDir, + "c:\WwwRoot"); + DefaultDocEdit->Text = IniFile->ReadString(SectionData, KeyDefaultDoc, + "index.html"); + PortEdit->Text = IniFile->ReadString(SectionData, KeyPort, + "80"); + DisplayHeaderCheckBox->Checked = + IniFile->ReadInteger(SectionData, KeyDisplayHeader, 0); + delete IniFile; + DisplayMemo->Clear(); + // Initialize client count caption + ClientCountLabel->Caption = "0"; + // Display version info for program and use components + wsi = WinsockInfo(); + Display(CopyRight); + Display("Using:"); + Display(" Winsock:"); + Display(Format(" Version %d.%d", + ARRAYOFCONST((wsi.wHighVersion >> 8, + wsi.wHighVersion & 15)))); + Display(Format(" %s", ARRAYOFCONST((&wsi.szDescription[0])))); + Display(Format(" %s", ARRAYOFCONST((&wsi.szSystemStatus[0])))); + if (wsi.lpVendorInfo != NULL) + Display(Format(" %s", ARRAYOFCONST((wsi.lpVendorInfo)))); + // Automatically start server + StartButtonClick(this); + } +} +//--------------------------------------------------------------------------- +void __fastcall TWebServForm::FormClose(TObject *Sender, + TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + IniFile->WriteString(SectionData, KeyDocDir, HttpServer1->DocDir); + IniFile->WriteString(SectionData, KeyDefaultDoc, HttpServer1->DefaultDoc); + IniFile->WriteString(SectionData, KeyPort, HttpServer1->Port); + IniFile->WriteInteger(SectionData, KeyDisplayHeader, + DisplayHeaderCheckBox->Checked); + delete IniFile; +} +//--------------------------------------------------------------------------- +// Display a message in our display memo. Delete lines to be sure to not +// overflow the memo which may have a limited capacity. +void __fastcall TWebServForm::Display(AnsiString Msg) +{ + int I; + + DisplayMemo->Lines->BeginUpdate(); + if (DisplayMemo->Lines->Count > 200) { + for (I = 1; I <= 50; I++) + DisplayMemo->Lines->Delete(0); + } + DisplayMemo->Lines->Add(Msg); + DisplayMemo->Lines->EndUpdate(); + // Makes last line visible + SendMessage(DisplayMemo->Handle, EM_SCROLLCARET, 0, 0); +} +//--------------------------------------------------------------------------- +// This event handler is called when user clicks on start button. It is also +// called from FormShow event handler, at program startup. It starts server. +// We need to pass default document, document directory and client class +// to HTTP server component. Client class is very usefull because it +// instruct server component to instanciate our own client class instead of +// defualt client class. Using our own client class will enables you to add +// any data we need to handle our application. This data is private for each +// client. +// When server is started, we will get OnServerStarted event triggered. +void __fastcall TWebServForm::StartButtonClick(TObject *Sender) +{ + HttpServer1->DocDir = Trim(DocDirEdit->Text); + HttpServer1->DefaultDoc = Trim(DefaultDocEdit->Text); + HttpServer1->Port = Trim(PortEdit->Text); + HttpServer1->ClientClass = __classid(TMyHttpConnection); + HttpServer1->Start(); +} +//--------------------------------------------------------------------------- +// This event handler is triggered when user clicks on stop button. We just +// stop the server. We will get OnServerStopped event triggered. +void __fastcall TWebServForm::StopButtonClick(TObject *Sender) +{ + HttpServer1->Stop(); +} +//--------------------------------------------------------------------------- +// This event handler is triggered when user clicks on clear buttoN; We just +// clear the memo used for displaying activity. +void __fastcall TWebServForm::ClearButtonClick(TObject *Sender) +{ + DisplayMemo->Clear(); +} +//--------------------------------------------------------------------------- +// This event handler is triggered when HTTP server is started, that is when +// server socket has started listening. +void __fastcall TWebServForm::HttpServer1ServerStarted(TObject *Sender) +{ + DocDirEdit->Enabled = FALSE; + DefaultDocEdit->Enabled = FALSE; + PortEdit->Enabled = FALSE; + StartButton->Enabled = FALSE; + StopButton->Enabled = TRUE; + Display("Server is waiting for connections"); +} +//--------------------------------------------------------------------------- +// This event handler is triggered when server has been stopped, that is +// when server socket stop listening. +void __fastcall TWebServForm::HttpServer1ServerStopped(TObject *Sender) +{ + DocDirEdit->Enabled = TRUE; + DefaultDocEdit->Enabled = TRUE; + PortEdit->Enabled = TRUE; + StartButton->Enabled = TRUE; + StopButton->Enabled = FALSE; + Display("Server stopped"); +} +//--------------------------------------------------------------------------- +// This event handler is triggered when a new client has connected. +void __fastcall TWebServForm::HttpServer1ClientConnect( + TObject *Sender, // HTTP server component + TObject *Client, // Client connecting + WORD Error) //Error in connection +{ + ClientCountLabel->Caption = IntToStr(HttpServer1->ClientCount); +} +//--------------------------------------------------------------------------- +// This event handler is triggered when a client is disconnecting, just +// before client component is closed. +void __fastcall TWebServForm::HttpServer1ClientDisconnect( + TObject *Sender, // HTTP server component + TObject *Client, // Client connecting + WORD Error) //Error in connection +{ + ClientCountLabel->Caption = IntToStr(HttpServer1->ClientCount - 1); +} +//--------------------------------------------------------------------------- +// This event handler is triggered when HTTP server component receive a HEAD +// command from any client. +// We just count the request, display a message and let HTTP server +// component handle everything. +// We should trap every URI we handle internally... +void __fastcall TWebServForm::HttpServer1HeadDocument( + TObject *Sender, // HTTP server component + TObject *Client, // Client connection issuing command + THttpGetFlag &Flags) // Tells what HTTP server has to do next +{ + FCountRequests = FCountRequests + 1; + Display(IntToStr(FCountRequests) + + ": HEAD " + ((TMyHttpConnection *)Client)->Path); +} +//--------------------------------------------------------------------------- +// This event handler is triggered when HTTP server component receive a GET +// command from any client. +// We count the request, display a message and trap '/time.htm' path for +// special handling. +// There is no document time.htm on disk, we will create it on the fly. With +// a classic webserver we would have used a CGI or ISAPI/NSAPI to achieve +// the same goal. It is much easier here since we can use Delphi code +// directly to generate whatever we wants. Here for the demo we generate a +// page with server data and time displayed. +void __fastcall TWebServForm::HttpServer1GetDocument( + TObject *Sender, // HTTP server component + TObject *Client, // Client connection issuing command + THttpGetFlag &Flags) // Tells what HTTP server has to do nex +{ + // Count request and display a message + FCountRequests++; + Display(IntToStr(FCountRequests) + + ": GET " + ((TMyHttpConnection *)Client)->Path); + DisplayHeader((TMyHttpConnection *)Client); + + // Trap '/time.htm' path to dynamically generate an answer. + if (CompareText(((THttpConnection *)Client)->Path, "/time.htm") == 0) + CreateVirtualDocument_time_htm(Sender, Client, Flags); +} +//--------------------------------------------------------------------------- +// This procedure is use to generate /time.htm document +void __fastcall TWebServForm::CreateVirtualDocument_time_htm( + TObject *Sender, // HTTP server component + TObject *Client, // Client connection issuing command + THttpGetFlag &Flags) // Tells what HTTP server has to do nex +{ + AnsiString Body; + AnsiString Header; + TMemoryStream *Stream; + + // Let HTTP server component know we will send data to client + Flags = hgWillSendMySelf; + // Create a stream to hold data sent to client that is the answer + // made of a HTTP header and a body made of HTML code. + Stream = new TMemoryStream; + Body = "" + "" + "ICS WebServer Demo" + "\r\n" + "" + "

Time at server side:

\r\n" + "

" + DateTimeToStr(Now()) +"

\r\n" + "" + "\r\n"; + Header = ((TMyHttpConnection *)Client)->Version + " 200 OK\r\n" + "Content-Type: text/html\r\n" + "Content-Length: " + + IntToStr(Body.Length()) + "\r\n\r\n"; + Stream->Write(Header.data(), Header.Length()); + Stream->Write(Body.data(), Body.Length()); + // We need to seek to start of stream ! + Stream->Seek(0, 0); + // We ask server component to send the stream for us. + ((TMyHttpConnection *)Client)->DocStream = Stream; + ((TMyHttpConnection *)Client)->SendStream(); +} +//--------------------------------------------------------------------------- +void __fastcall TWebServForm::DisplayHeader(TMyHttpConnection *Client) +{ + int I; + + if (!DisplayHeaderCheckBox->Checked) + return; + for(I = 0; I < Client->RequestHeader->Count; I++) + Display("HDR" + IntToStr(I + 1) + ") " + + Client->RequestHeader->Strings[I]); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/WebServ1.dfm b/lib/ics/Cpp/Internet/WebServ1.dfm new file mode 100644 index 00000000..ceb772dc --- /dev/null +++ b/lib/ics/Cpp/Internet/WebServ1.dfm @@ -0,0 +1,155 @@ +object WebServForm: TWebServForm + Left = 412 + Top = 122 + Width = 544 + Height = 289 + Caption = 'WebServForm' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + OnClose = FormClose + OnCreate = FormCreate + OnShow = FormShow + PixelsPerInch = 96 + TextHeight = 13 + object ToolsPanel: TPanel + Left = 0 + Top = 0 + Width = 536 + Height = 57 + Align = alTop + TabOrder = 0 + object Label1: TLabel + Left = 36 + Top = 8 + Width = 33 + Height = 13 + Caption = 'DocDir' + end + object Label2: TLabel + Left = 16 + Top = 32 + Width = 54 + Height = 13 + Caption = 'DefaultDoc' + end + object Label3: TLabel + Left = 220 + Top = 8 + Width = 19 + Height = 13 + Caption = 'Port' + end + object ClientCountLabel: TLabel + Left = 244 + Top = 32 + Width = 80 + Height = 13 + Caption = 'ClientCountLabel' + end + object Label5: TLabel + Left = 208 + Top = 32 + Width = 31 + Height = 13 + Caption = 'Clients' + end + object DocDirEdit: TEdit + Left = 80 + Top = 4 + Width = 121 + Height = 21 + TabOrder = 0 + Text = 'DocDirEdit' + end + object DefaultDocEdit: TEdit + Left = 80 + Top = 28 + Width = 121 + Height = 21 + TabOrder = 1 + Text = 'DefaultDocEdit' + end + object StartButton: TButton + Left = 352 + Top = 4 + Width = 53 + Height = 21 + Caption = '&Start' + TabOrder = 2 + OnClick = StartButtonClick + end + object StopButton: TButton + Left = 352 + Top = 28 + Width = 53 + Height = 21 + Caption = 'St&op' + TabOrder = 3 + OnClick = StopButtonClick + end + object PortEdit: TEdit + Left = 244 + Top = 4 + Width = 53 + Height = 21 + TabOrder = 4 + Text = 'PortEdit' + end + object ClearButton: TButton + Left = 412 + Top = 4 + Width = 53 + Height = 21 + Caption = '&Clear' + TabOrder = 5 + OnClick = ClearButtonClick + end + object DisplayHeaderCheckBox: TCheckBox + Left = 416 + Top = 32 + Width = 97 + Height = 17 + Caption = 'Display Header' + TabOrder = 6 + end + end + object DisplayMemo: TMemo + Left = 0 + Top = 57 + Width = 536 + Height = 205 + Align = alClient + Font.Charset = ANSI_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'Courier New' + Font.Style = [] + Lines.Strings = ( + 'DisplayMemo') + ParentFont = False + ScrollBars = ssBoth + TabOrder = 1 + WordWrap = False + end + object HttpServer1: THttpServer + Port = '80' + Addr = '0.0.0.0' + DocDir = '\WebShare' + DefaultDoc = 'index.html' + LingerOnOff = wsLingerOn + LingerTimeout = 1 + OnServerStarted = HttpServer1ServerStarted + OnServerStopped = HttpServer1ServerStopped + OnClientConnect = HttpServer1ClientConnect + OnClientDisconnect = HttpServer1ClientDisconnect + OnGetDocument = HttpServer1GetDocument + OnHeadDocument = HttpServer1HeadDocument + Left = 96 + Top = 80 + end +end diff --git a/lib/ics/Cpp/Internet/WebServ1.h b/lib/ics/Cpp/Internet/WebServ1.h new file mode 100644 index 00000000..be5512a1 --- /dev/null +++ b/lib/ics/Cpp/Internet/WebServ1.h @@ -0,0 +1,78 @@ +//--------------------------------------------------------------------------- + +#ifndef WebServ1H +#define WebServ1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +#include "HttpSrv.hpp" +#include +//--------------------------------------------------------------------------- +// This component is used for client connection instead of default one. +// This enables to add any data we need to handle our application. +// As this data is located in client component, each connected client has +// his own private data. +class TMyHttpConnection : public THttpConnection +{ +protected: + char *FPostedDataBuffer; // Will hold dynamically allocated buffer + int FPostedDataSize; // Databuffer size + int FDataLen; // Keep track of received byte count. +public: + virtual __fastcall ~TMyHttpConnection(); +}; + +class TWebServForm : public TForm +{ +__published: // IDE-managed Components + TPanel *ToolsPanel; + TLabel *Label1; + TLabel *Label2; + TLabel *Label3; + TLabel *ClientCountLabel; + TLabel *Label5; + TEdit *DocDirEdit; + TEdit *DefaultDocEdit; + TButton *StartButton; + TButton *StopButton; + TEdit *PortEdit; + TButton *ClearButton; + TCheckBox *DisplayHeaderCheckBox; + TMemo *DisplayMemo; + THttpServer *HttpServer1; + void __fastcall FormCreate(TObject *Sender); + void __fastcall FormShow(TObject *Sender); + void __fastcall StartButtonClick(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall StopButtonClick(TObject *Sender); + void __fastcall ClearButtonClick(TObject *Sender); + void __fastcall HttpServer1ServerStarted(TObject *Sender); + void __fastcall HttpServer1ServerStopped(TObject *Sender); + void __fastcall HttpServer1ClientConnect(TObject *Sender, + TObject *Client, WORD Error); + void __fastcall HttpServer1ClientDisconnect(TObject *Sender, + TObject *Client, WORD Error); + void __fastcall HttpServer1HeadDocument(TObject *Sender, + TObject *Client, THttpGetFlag &Flags); + void __fastcall HttpServer1GetDocument(TObject *Sender, + TObject *Client, THttpGetFlag &Flags); +private: // User declarations + AnsiString FIniFileName; + BOOL FInitialized; + int FCountRequests; + void __fastcall Display(AnsiString Msg); + void __fastcall DisplayHeader(TMyHttpConnection *Client); + void __fastcall CreateVirtualDocument_time_htm( + TObject *Sender, + TObject *Client, + THttpGetFlag &Flags); +public: // User declarations + __fastcall TWebServForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TWebServForm *WebServForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/cli5.cpp b/lib/ics/Cpp/Internet/cli5.cpp new file mode 100644 index 00000000..9aaa5f25 --- /dev/null +++ b/lib/ics/Cpp/Internet/cli5.cpp @@ -0,0 +1,130 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Object: Simple client application demonstrating TWSocket object in action. +Creation: September 28, 1997 (from delphi version created 09/21/1996) +Version: 2.04 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Nov 11, 1997 V2.03 Added a button to display the list of IP addresses for the + local computer (you can have two IP addresses if you are connected + to a LAN and to your ISP). + Added a ReadLine button to show how to read a single line + synchronously. +Dec 06, 1998 V2.04 Don't use TWait component anymore. + +---------------------------------------------------------------------------*/ +#include +#pragma hdrstop + +#include "cli5.h" +//--------------------------------------------------------------------------- +#pragma link "WSocket" +#pragma resource "*.dfm" +TClientForm *ClientForm; +//--------------------------------------------------------------------------- +__fastcall TClientForm::TClientForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +// This event handler gets called when we connected the server +void __fastcall TClientForm::CliSocketSessionConnected(TObject *Sender, + WORD Error) +{ + InfoLabel->Caption = "Connected"; + DisconnectButton->Enabled = TRUE; + ConnectButton->Enabled = FALSE; +} +//--------------------------------------------------------------------------- +// This event handler gets called when the server's connection is broken +// Either by us or by the server. +void __fastcall TClientForm::CliSocketSessionClosed(TObject *Sender, WORD Error) +{ + DataLabel->Caption = ""; + InfoLabel->Caption = "Disconnected"; + DisconnectButton->Enabled = FALSE; + ConnectButton->Enabled = TRUE; +} +//--------------------------------------------------------------------------- +// The user has clicked on the connect button... +void __fastcall TClientForm::ConnectButtonClick(TObject *Sender) +{ + ReadLineButton->Enabled = TRUE; + CliSocket->Addr = "localhost"; // Server host name + CliSocket->Proto = "tcp"; // Protocol we wants to use + CliSocket->Port = "telnet"; // The port we wants to connect + CliSocket->Connect(); // Let's connect ! + // Connect is just a request, it returns immediately. We eventually gets + // gets connected later. At that time we will receive the event + // SessionConnected. If you need a timeout, you have to start a TTimer. +} +//--------------------------------------------------------------------------- +// The user has clicked the disconnect button... +void __fastcall TClientForm::DisconnectButtonClick(TObject *Sender) +{ + CliSocket->Close(); // This will close the connection + // When the connection will be effectively closed, we will receive the + // SessionClosed even. +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::CliSocketDataAvailable(TObject *Sender, WORD Error) +{ + char Buffer[256]; + int Count; + + Count = CliSocket->Receive(Buffer, sizeof(Buffer)); + Buffer[Count] = 0; // Null terminate received data + DataLabel->Caption = Buffer; +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::IPButtonClick(TObject *Sender) +{ + TStrings *IPList; + int I; + + IPList = LocalIPList(); + InfoLabel->Caption = ""; + for (I = 0; I < IPList->Count; I++) + InfoLabel->Caption = InfoLabel->Caption + " " + IPList->Strings[I]; +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::ReadLineButtonClick(TObject *Sender) +{ + String Buf; + + ReadLineButton->Enabled = FALSE; + CliSocket->ReadLine(30, Buf); + DataLabel->Caption = Buf; + ReadLineButton->Enabled = TRUE; +} +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/cli5.dfm b/lib/ics/Cpp/Internet/cli5.dfm new file mode 100644 index 00000000..123ad697 Binary files /dev/null and b/lib/ics/Cpp/Internet/cli5.dfm differ diff --git a/lib/ics/Cpp/Internet/cli5.h b/lib/ics/Cpp/Internet/cli5.h new file mode 100644 index 00000000..d65c1cc0 --- /dev/null +++ b/lib/ics/Cpp/Internet/cli5.h @@ -0,0 +1,35 @@ +//--------------------------------------------------------------------------- +#ifndef cli5H +#define cli5H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +class TClientForm : public TForm +{ +__published: // IDE-managed Components + TLabel *InfoLabel; + TLabel *DataLabel; + TButton *ConnectButton; + TButton *DisconnectButton; + TWSocket *CliSocket; + TButton *IPButton; + TButton *ReadLineButton; + void __fastcall CliSocketSessionConnected(TObject *Sender, WORD Error); + void __fastcall CliSocketSessionClosed(TObject *Sender, WORD Error); + void __fastcall ConnectButtonClick(TObject *Sender); + void __fastcall DisconnectButtonClick(TObject *Sender); + void __fastcall CliSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall IPButtonClick(TObject *Sender); + void __fastcall ReadLineButtonClick(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TClientForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TClientForm *ClientForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/finger1.cpp b/lib/ics/Cpp/Internet/finger1.cpp new file mode 100644 index 00000000..e123fb6d --- /dev/null +++ b/lib/ics/Cpp/Internet/finger1.cpp @@ -0,0 +1,159 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: Finger is a FINGER client + Install the components in FingCli.pas and wsocket.pas first. +Creation: December 19, 1997 +Version: 1.01 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 11, 1998 V1.01 Adapted for BCB3 + + ---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#pragma hdrstop + +#include "Finger1.h" +//--------------------------------------------------------------------------- +#pragma link "FingCli" +#pragma link "WSocket" +#pragma resource "*.dfm" +#define BufferSize 2048 +#define CR '\r' +#define LF '\n' + +TFingerDemoForm *FingerDemoForm; +//--------------------------------------------------------------------------- +__fastcall TFingerDemoForm::TFingerDemoForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +// Display a message in the memo field, breaking with CR +void __fastcall MemoAddLines(TMemo *Memo, AnsiString *Msg) +{ + int Start, Stop; + + if (Memo->Lines->Count == 0) + Memo->Lines->Add(""); + + Start = 1; + Stop = Msg->Pos(CR); + if (Stop == 0) + Stop = Msg->Length() + 1; + while (Start <= Msg->Length()) { + Memo->Lines->Strings[Memo->Lines->Count - 1] = + Memo->Lines->Strings[Memo->Lines->Count - 1] + + Msg->SubString(Start, Stop - Start); + if ((*Msg)[Stop] == CR) { + Memo->Lines->Add(""); + SendMessage(Memo->Handle, WM_KEYDOWN, VK_UP, 1); + } + Start = Stop + 1; + if (Start > Msg->Length()) + break; + while (((*Msg)[Start] == LF) || ((*Msg)[Start] == CR)) + Start++; + Stop = Start; + while (((*Msg)[Stop] != CR) && (Stop <= Msg->Length())) + Stop++; + } +} +//--------------------------------------------------------------------------- +void __fastcall MemoAddLines(TMemo *Memo, AnsiString Buf) +{ + MemoAddLines(Memo, &Buf); +} +//--------------------------------------------------------------------------- +void __fastcall MemoAddLines(TMemo *Memo, char *Msg) +{ + AnsiString Buf = Msg; + MemoAddLines(Memo, &Buf); +} +//--------------------------------------------------------------------------- +void __fastcall TFingerDemoForm::QueryButtonClick(TObject *Sender) +{ + DisplayMemo->Clear(); + QueryButton->Enabled = FALSE; + CancelButton->Enabled = TRUE; + FingerCli1->Query = QueryEdit->Text; + FingerCli1->StartQuery(); + MemoAddLines(DisplayMemo, "Query started.\r"); +} +//--------------------------------------------------------------------------- +void __fastcall TFingerDemoForm::FingerCli1SessionConnected(TObject *Sender, + WORD Error) +{ + if (Error == 0) + MemoAddLines(DisplayMemo, "Connected to host.\r"); +} +//--------------------------------------------------------------------------- +void __fastcall TFingerDemoForm::FingerCli1DataAvailable(TObject *Sender, + WORD Error) +{ + char Buffer[BufferSize]; + int Len; + + while (TRUE) { + Len = FingerCli1->Receive(Buffer, sizeof(Buffer) - 1); + if (Len <= 0) + break; + Buffer[Len] = 0; + MemoAddLines(DisplayMemo, Buffer); + } +} +//--------------------------------------------------------------------------- +void __fastcall TFingerDemoForm::FingerCli1QueryDone(TObject *Sender, + WORD Error) +{ + if (Error) { + if (Error == WSAECONNREFUSED) + MemoAddLines(DisplayMemo, "No finger service available.\r"); + else if (Error == WSAETIMEDOUT) + MemoAddLines(DisplayMemo, "Host unreachable.\r"); + else + MemoAddLines(DisplayMemo, "Error #" + IntToStr(Error) + "\r"); + } + MemoAddLines(DisplayMemo, "Done.\r"); + + QueryButton->Enabled = TRUE; + CancelButton->Enabled = FALSE; +} +//--------------------------------------------------------------------------- +void __fastcall TFingerDemoForm::CancelButtonClick(TObject *Sender) +{ + FingerCli1->Abort(); +} +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/finger1.dfm b/lib/ics/Cpp/Internet/finger1.dfm new file mode 100644 index 00000000..bad19045 Binary files /dev/null and b/lib/ics/Cpp/Internet/finger1.dfm differ diff --git a/lib/ics/Cpp/Internet/finger1.h b/lib/ics/Cpp/Internet/finger1.h new file mode 100644 index 00000000..a2e939c0 --- /dev/null +++ b/lib/ics/Cpp/Internet/finger1.h @@ -0,0 +1,35 @@ +//--------------------------------------------------------------------------- +#ifndef Finger1H +#define Finger1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include "FingCli.hpp" +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +class TFingerDemoForm : public TForm +{ +__published: // IDE-managed Components + TMemo *DisplayMemo; + TPanel *Panel1; + TEdit *QueryEdit; + TButton *QueryButton; + TButton *CancelButton; + TFingerCli *FingerCli1; + TWSocket *WSocket1; + void __fastcall QueryButtonClick(TObject *Sender); + void __fastcall FingerCli1SessionConnected(TObject *Sender, WORD Error); + void __fastcall FingerCli1DataAvailable(TObject *Sender, WORD Error); + void __fastcall FingerCli1QueryDone(TObject *Sender, WORD Error); + void __fastcall CancelButtonClick(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TFingerDemoForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TFingerDemoForm *FingerDemoForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/formpos.cpp b/lib/ics/Cpp/Internet/formpos.cpp new file mode 100644 index 00000000..9d3dcc1d --- /dev/null +++ b/lib/ics/Cpp/Internet/formpos.cpp @@ -0,0 +1,154 @@ +/*--------------------------------------------------------------------------- + +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +Updates +Apr 12, 1998 Adapted for BCB3 + +---------------------------------------------------------------------------*/ +#include +#include +#include +#include +#include +#pragma hdrstop + +#include "FormPos.h" +//--------------------------------------------------------------------------- +// Build a string like 'Left, Top, Height, Width, WindowState' +char * __fastcall WindowPosToStr(char *Result, TForm *Form) +{ + sprintf(Result, "%d, %d, %d, %d, %d", + Form->Left, Form->Top, + Form->Height, Form->Width, + Form->WindowState); + return(Result); +} +//--------------------------------------------------------------------------- +char *stpblk(char *p) +{ + while (isspace(*p)) + p++; + return(p); +} +//--------------------------------------------------------------------------- +char *SkipNumber(char *p) +{ + p = stpblk(p); + if ((*p == '+') || (*p == '-')) + p++; + while (isdigit(*p)) + p++; + return(stpblk(p)); +} +//--------------------------------------------------------------------------- +// Gets a string like '100, 200, 300, 500, 0', parse the values and +// affect them to Form.LEFT, Form.Top, Form.Heigt, Form.Width, +// Form.WindowState properties +void __fastcall StrToWindowPos(char *sBuffer, TForm *Form) +{ + Form->Left = atoi(sBuffer); + sBuffer = SkipNumber(sBuffer); + if (*sBuffer == ',') + sBuffer++; + + Form->Top = atoi(sBuffer); + sBuffer = SkipNumber(sBuffer); + if (*sBuffer == ',') + sBuffer++; + + Form->Height = atoi(sBuffer); + sBuffer = SkipNumber(sBuffer); + if (*sBuffer == ',') + sBuffer++; + + Form->Width = atoi(sBuffer); + sBuffer = SkipNumber(sBuffer); + if (*sBuffer == ',') + sBuffer++; + + Form->WindowState = (TWindowState)atoi(sBuffer); +} +//--------------------------------------------------------------------------- +void __fastcall LoadFormPos(TForm *Form, + const AnsiString IniFileName, + const AnsiString SectionName, + const AnsiString KeyName) +{ + TIniFile *IniFile; + AnsiString sWindowPositions; + + if (IniFileName.Length() == 0) + return; + + // Create inifile object => Open ini file + IniFile = new TIniFile(IniFileName); + + // Formatage par dfaut de la ligne de la section window + sWindowPositions.SetLength(256); + WindowPosToStr(sWindowPositions.c_str(), Form); + + // Get widow's position and size from ini file + sWindowPositions = IniFile->ReadString(SectionName, + KeyName, + sWindowPositions); + StrToWindowPos(sWindowPositions.c_str(), Form); + + // Destroy inifile object => close ini file + IniFile->Free(); +} +//--------------------------------------------------------------------------- +void __fastcall SaveFormPos(TForm *Form, + const AnsiString IniFileName, + const AnsiString SectionName, + const AnsiString KeyName) +{ + TIniFile *IniFile; + TWindowState WindowState; + char Buffer[256]; + + if (IniFileName.Length() == 0) + return; + + // Create inifile object => Open ini file + IniFile = new TIniFile(IniFileName); + + WindowState = Form->WindowState; + + // If window minimized or maximized, restore to normal state + if (Form->WindowState != wsNormal) + Form->WindowState = wsNormal; + + // Save the window's postion and size to the ini file + IniFile->WriteString(SectionName, + KeyName, + WindowPosToStr(Buffer, Form)); + + // Destroy inifile object => close ini file + IniFile->Free(); + + Form->WindowState = WindowState; +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/formpos.h b/lib/ics/Cpp/Internet/formpos.h new file mode 100644 index 00000000..f38b26b6 --- /dev/null +++ b/lib/ics/Cpp/Internet/formpos.h @@ -0,0 +1,14 @@ +//--------------------------------------------------------------------------- +#ifndef FormPosH +#define FormPosH +//--------------------------------------------------------------------------- +void __fastcall LoadFormPos(TForm *Form, + const AnsiString IniFilename, + const AnsiString SectionName, + const AnsiString KeyName); +void __fastcall SaveFormPos(TForm *Form, + const AnsiString IniFilename, + const AnsiString SectionName, + const AnsiString KeyName); +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/ftptst1.cpp b/lib/ics/Cpp/Internet/ftptst1.cpp new file mode 100644 index 00000000..13be26bf --- /dev/null +++ b/lib/ics/Cpp/Internet/ftptst1.cpp @@ -0,0 +1,643 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Creation: Aug 1997 (Delphi program) +Version: 2.23 +Object: Demo for TFtpClient object (RFC 959 implementation) + It is a graphical FTP client program + Compatible with Delphi 1, 2 and 3 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 13, 97 Added directory functions. Added button to show how to makes + several transferts in one session +Sep 27, 97 Change identifiers names to be more standard with other sources +Jan 10, 98 Saved edit boxes content to an IniFile, added FileSize, Quote + and RestartGet commands +Jan 25, 1998 Completely rewritten for new component version (Asynchronous) +Feb 02, 1998 V2.17 Added a checkbox to run the synchronous or asynchronous + version of the component methods. +Feb 15, 1998 V2.18 Removed useless wait unit from the use clause. + Added display of winsock information at startup. +Feb 21, 1998 V2.18 ported from Delphi to C++Builder +Feb 22, 1998 V2.19 Added Append and AppendFile commands +Mar 27, 1998 V2.20 Adapted for BCB version 3.0 + See the comments for FtpClient1Progress(). +Mar 06, 1999 V2.21 Minor changes +Aug 15, 1999 V2.22 Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). +Apr 02, 2000 V2.23 Removed "#define _WINSPOOL_" (SetPortA syndrome) + Adapted for BCB5. + + ---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#include +#pragma hdrstop +#include "FtpTst1.h" +#include "FtpTst2.h" + +#define FTPTstVersion 223 +#define SectionData "Data" +#define KeyHostName "HostName" +#define KeyUserName "UserName" +#define KeyPassWord "PassWord" +#define KeyHostDir "HostDir" +#define KeyPort "Port" +#define KeyHostFile "HostFile" +#define KeyLocalFile "LocalFile" +#define SectionWindow "Window" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +#define TEMP_FILE_NAME "FTPDIR.TXT" + +//--------------------------------------------------------------------------- +#pragma link "Ftpcli" +#pragma link "FtpCli" +#pragma link "WSocket" +#pragma resource "*.dfm" +TFtpReceiveForm *FtpReceiveForm; +//--------------------------------------------------------------------------- +__fastcall TFtpReceiveForm::TFtpReceiveForm(TComponent* Owner) + : TForm(Owner) +{ + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::FormCreate(TObject *Sender) +{ + DisplayMemo->Clear(); + InfoLabel->Caption = ""; + StateLabel->Caption = ""; +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + TWSAData Data; + + if (!FInitialized) { + FInitialized = TRUE; + IniFile = new TIniFile(FIniFileName); + HostNameEdit->Text = IniFile->ReadString(SectionData, KeyHostName, + "ftp->simtel->net"); + PortEdit->Text = IniFile->ReadString(SectionData, KeyPort, + "ftp"); + UserNameEdit->Text = IniFile->ReadString(SectionData, KeyUserName, + "anonymous"); + PassWordEdit->Text = IniFile->ReadString(SectionData, KeyPassWord, + "your->name@your->company->com"); + HostDirEdit->Text = IniFile->ReadString(SectionData, KeyHostDir, + "/pub/simtelnet"); + HostFileEdit->Text = IniFile->ReadString(SectionData, KeyHostFile, + "index->html"); + LocalFileEdit->Text = IniFile->ReadString(SectionData, KeyLocalFile, + "c:\temp\index->htm"); + + Top = IniFile->ReadInteger(SectionWindow, KeyTop, Top); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, Left); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + + delete IniFile; + + // Display winsock info + Data = WinsockInfo(); + DisplayMemo->Lines->Add("Winsock verion " + + IntToStr(LOBYTE(Data.wVersion)) + "." + + IntToStr(HIBYTE(Data.wVersion))); + DisplayMemo->Lines->Add(Data.szDescription); + DisplayMemo->Lines->Add(Data.szSystemStatus); + } +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::FormClose(TObject *Sender, + TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteString(SectionData, KeyHostName, HostNameEdit->Text); + IniFile->WriteString(SectionData, KeyPort, PortEdit->Text); + IniFile->WriteString(SectionData, KeyUserName, UserNameEdit->Text); + IniFile->WriteString(SectionData, KeyPassWord, PassWordEdit->Text); + IniFile->WriteString(SectionData, KeyHostDir, HostDirEdit->Text); + IniFile->WriteString(SectionData, KeyHostFile, HostFileEdit->Text); + IniFile->WriteString(SectionData, KeyLocalFile, LocalFileEdit->Text); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::Display( + TObject *Sender, + AnsiString &Msg) +{ + DisplayMemo->Lines->Add(Msg); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::ExitButtonClick(TObject *Sender) +{ + Close(); +} +//--------------------------------------------------------------------------- +// BCB V1 and 3 do not agreed upon the Count argument type. +// V1 would like to have long and bcb3 would like to have int ! +// In both case it is a 32 bit integer. You can safely ignore this error +// but do *NOT* remove the reference when the IDE ask for it ! +// You can of course change to code to macth your BCB version ! +void __fastcall TFtpReceiveForm::FtpClient1Progress(TObject *Sender, int Count, + bool &Abort) +{ + InfoLabel->Caption = IntToStr(Count); + InfoLabel->Repaint(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::DisplayFile(const System::AnsiString FileName) +{ + try { + DirectoryForm->DirListBox->Items->LoadFromFile(FileName); + } __except (TRUE) { + DirectoryForm->DirListBox->Clear(); + } + DirectoryForm->ShowModal(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::FtpClient1RequestDone(TObject *Sender, + TFtpRequest RqType, WORD Error) +{ + DisplayMemo->Lines->Add("Request " + IntToStr(RqType) + " Done."); + DisplayMemo->Lines->Add("StatusCode = " + IntToStr(FtpClient1->StatusCode)); + DisplayMemo->Lines->Add("LastResponse was : \"" + + FtpClient1->LastResponse + "\""); + if (Error == 0) + DisplayMemo->Lines->Add("No error"); + else + DisplayMemo->Lines->Add("Error = " + IntToStr(Error) + + " (" + FtpClient1->ErrorMessage + ")"); + + if (Error == 0) { + switch (RqType) { + case ftpDirAsync: + case ftpDirectoryAsync: + case ftpLsAsync: + case ftpListAsync: + DisplayFile(TEMP_FILE_NAME); + break; + case ftpSizeAsync: + DisplayMemo->Lines->Add("File size is " + + IntToStr(FtpClient1->SizeResult) + + " bytes" ); + break; + case ftpPwdAsync: + case ftpMkdAsync: + case ftpCDupAsync: + case ftpCwdAsync: + DisplayMemo->Lines->Add("Directory is \"" + + FtpClient1->DirResult + "\""); + break; + } + } +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::FtpClient1SessionConnected(TObject *Sender, + WORD Error) +{ + DisplayMemo->Lines->Add("Session Connected, error = " + IntToStr(Error)); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::FtpClient1SessionClosed(TObject *Sender, + WORD Error) +{ + DisplayMemo->Lines->Add("Session Closed, error = " + IntToStr(Error)); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::FtpClient1StateChange(TObject *Sender) +{ + StateLabel->Caption = IntToStr(FtpClient1->State); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::ExecuteCmd( + TSyncCmd SyncCmd, + TASyncCmd ASyncCmd) +{ + if (SyncCheckBox->Checked) { + if (SyncCmd()) + DisplayMemo->Lines->Add("Command Success"); + else + DisplayMemo->Lines->Add("Command Failure"); + } + else + ASyncCmd(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::OpenAsyncButtonClick(TObject *Sender) +{ + DisplayMemo->Clear(); + DisplayMemo->Lines->Add("Connect Async"); + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Open, FtpClient1->OpenAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::QuitAsyncButtonClick(TObject *Sender) +{ + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Quit, FtpClient1->QuitAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::CwdAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Cwd, FtpClient1->CwdAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::UserAsyncButtonClick(TObject *Sender) +{ + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->User, FtpClient1->UserAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::PassAsyncButtonClick(TObject *Sender) +{ + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Pass, FtpClient1->PassAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::ConnectAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Connect, FtpClient1->ConnectAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::GetAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = LocalFileEdit->Text; + ExecuteCmd(FtpClient1->Get, FtpClient1->GetAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::ReceiveAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = LocalFileEdit->Text; + FtpClient1->Binary = cbBinary->Checked; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Receive, FtpClient1->ReceiveAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::AbortAsyncButtonClick(TObject *Sender) +{ + ExecuteCmd(FtpClient1->Abort, FtpClient1->AbortAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::DirAsyncButtonClick(TObject *Sender) +{ + DeleteFile(TEMP_FILE_NAME); + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = TEMP_FILE_NAME; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Dir, FtpClient1->DirAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::DirectoryAsyncButtonClick(TObject *Sender) +{ + DeleteFile(TEMP_FILE_NAME); + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = TEMP_FILE_NAME; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Directory, FtpClient1->DirectoryAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::LsAsyncButtonClick(TObject *Sender) +{ + DeleteFile(TEMP_FILE_NAME); + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = TEMP_FILE_NAME; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Ls, FtpClient1->LsAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::ListAsyncButtonClick(TObject *Sender) +{ + DeleteFile(TEMP_FILE_NAME); + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = TEMP_FILE_NAME; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->List, FtpClient1->ListAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::SystAsyncButtonClick(TObject *Sender) +{ + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Syst, FtpClient1->SystAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::SystemAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->System, FtpClient1->SystemAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::FileSizeAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->FileSize, FtpClient1->FileSizeAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::SizeAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Size, FtpClient1->SizeAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::MkdAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Mkd, FtpClient1->MkdAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::MkdirAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Mkdir, FtpClient1->MkdirAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::RmdAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Rmd, FtpClient1->RmdAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::RmdirAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Rmdir, FtpClient1->RmdirAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::RenAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = LocalFileEdit->Text; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Ren, FtpClient1->RenAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::RenameAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = LocalFileEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Rename, FtpClient1->RenameAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::DeleAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Dele, FtpClient1->DeleAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::DeleteAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Delete, FtpClient1->DeleteAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::PwdAsyncButtonClick(TObject *Sender) +{ + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Pwd, FtpClient1->PwdAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::QuoteAsyncButtonClick(TObject *Sender) +{ + FtpClient1->LocalFileName = LocalFileEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Quote, FtpClient1->QuoteAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::DoQuoteAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->LocalFileName = LocalFileEdit->Text; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->DoQuote, FtpClient1->DoQuoteAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::PutAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = LocalFileEdit->Text; + FtpClient1->Binary = cbBinary->Checked; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Put, FtpClient1->PutAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::TransmitAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = LocalFileEdit->Text; + FtpClient1->Binary = cbBinary->Checked; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Transmit, FtpClient1->TransmitAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::TypeSetAsyncButtonClick(TObject *Sender) +{ + FtpClient1->Binary = cbBinary->Checked; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->TypeSet, FtpClient1->TypeSetAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::RestGetAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = LocalFileEdit->Text; + ExecuteCmd(FtpClient1->RestGet, FtpClient1->RestGetAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::RestartGetAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = LocalFileEdit->Text; + FtpClient1->Binary = cbBinary->Checked; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->RestartGet, FtpClient1->RestartGetAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::CDupAsyncButtonClick(TObject *Sender) +{ + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->CDup, FtpClient1->CDupAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::ClearButtonClick(TObject *Sender) +{ + DisplayMemo->Clear(); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::AppendAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = LocalFileEdit->Text; + FtpClient1->Binary = cbBinary->Checked; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->Append, FtpClient1->AppendAsync); +} +//--------------------------------------------------------------------------- +void __fastcall TFtpReceiveForm::AppendFileAsyncButtonClick(TObject *Sender) +{ + FtpClient1->HostName = HostNameEdit->Text; + FtpClient1->Port = PortEdit->Text; + FtpClient1->UserName = UserNameEdit->Text; + FtpClient1->PassWord = PassWordEdit->Text; + FtpClient1->HostDirName = HostDirEdit->Text; + FtpClient1->HostFileName = HostFileEdit->Text; + FtpClient1->LocalFileName = LocalFileEdit->Text; + FtpClient1->Binary = cbBinary->Checked; + FtpClient1->DisplayFileFlag = cbDisplay->Checked; + FtpClient1->OnDisplay = Display; + ExecuteCmd(FtpClient1->AppendFile, FtpClient1->AppendFileAsync); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/ftptst1.dfm b/lib/ics/Cpp/Internet/ftptst1.dfm new file mode 100644 index 00000000..8867d2a7 Binary files /dev/null and b/lib/ics/Cpp/Internet/ftptst1.dfm differ diff --git a/lib/ics/Cpp/Internet/ftptst1.h b/lib/ics/Cpp/Internet/ftptst1.h new file mode 100644 index 00000000..5b68ce53 --- /dev/null +++ b/lib/ics/Cpp/Internet/ftptst1.h @@ -0,0 +1,144 @@ +//--------------------------------------------------------------------------- +#ifndef FtpTst1H +#define FtpTst1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include "FtpCli.hpp" +#include "WSocket.hpp" + +typedef bool __fastcall (__closure *TSyncCmd)(); +typedef void __fastcall (__closure *TASyncCmd)(); + +//--------------------------------------------------------------------------- +class TFtpReceiveForm : public TForm +{ +__published: // IDE-managed Components + TMemo *DisplayMemo; + TPanel *Panel1; + TLabel *InfoLabel; + TLabel *StateLabel; + TButton *ExitButton; + TButton *OpenAsyncButton; + TButton *QuitAsyncButton; + TButton *CwdAsyncButton; + TButton *UserAsyncButton; + TButton *PassAsyncButton; + TButton *ConnectAsyncButton; + TButton *GetAsyncButton; + TButton *ReceiveAsyncButton; + TButton *AbortAsyncButton; + TButton *DirAsyncButton; + TButton *DirectoryAsyncButton; + TButton *LsAsyncButton; + TButton *ListAsyncButton; + TButton *SystAsyncButton; + TButton *SystemAsyncButton; + TButton *FileSizeAsyncButton; + TButton *SizeAsyncButton; + TButton *MkdAsyncButton; + TButton *MkdirAsyncButton; + TButton *RmdAsyncButton; + TButton *RmdirAsyncButton; + TButton *RenAsyncButton; + TButton *RenameAsyncButton; + TButton *DeleAsyncButton; + TButton *DeleteAsyncButton; + TButton *PwdAsyncButton; + TButton *QuoteAsyncButton; + TButton *DoQuoteAsyncButton; + TButton *PutAsyncButton; + TButton *TransmitAsyncButton; + TButton *TypeSetAsyncButton; + TButton *RestGetAsyncButton; + TButton *RestartGetAsyncButton; + TButton *CDupAsyncButton; + TButton *ClearButton; + TPanel *Panel2; + TLabel *Label1; + TLabel *Label3; + TLabel *Label4; + TLabel *Label5; + TLabel *Label2; + TLabel *Label6; + TEdit *HostNameEdit; + TEdit *HostFileEdit; + TEdit *UserNameEdit; + TEdit *PassWordEdit; + TCheckBox *cbDisplay; + TEdit *LocalFileEdit; + TCheckBox *cbBinary; + TEdit *HostDirEdit; + TEdit *PortEdit; + TCheckBox *SyncCheckBox; + TFtpClient *FtpClient1; + TButton *AppendFileAsyncButton; + TButton *AppendAsyncButton; + TWSocket *WSocket1; + void __fastcall FormCreate(TObject *Sender); + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + + void __fastcall ExitButtonClick(TObject *Sender); + // BCB1 wants to have count as long; BCB3 wants to have int. + // You can correct code accordingly, but don't let IDE remove reference !! + void __fastcall FtpClient1Progress(TObject *Sender, int Count, bool &Abort); + void __fastcall FtpClient1RequestDone(TObject *Sender, TFtpRequest RqType, + WORD Error); + void __fastcall FtpClient1SessionConnected(TObject *Sender, WORD Error); + void __fastcall FtpClient1SessionClosed(TObject *Sender, WORD Error); + void __fastcall FtpClient1StateChange(TObject *Sender); + void __fastcall OpenAsyncButtonClick(TObject *Sender); + void __fastcall QuitAsyncButtonClick(TObject *Sender); + void __fastcall CwdAsyncButtonClick(TObject *Sender); + void __fastcall UserAsyncButtonClick(TObject *Sender); + void __fastcall PassAsyncButtonClick(TObject *Sender); + void __fastcall ConnectAsyncButtonClick(TObject *Sender); + void __fastcall GetAsyncButtonClick(TObject *Sender); + void __fastcall ReceiveAsyncButtonClick(TObject *Sender); + void __fastcall AbortAsyncButtonClick(TObject *Sender); + void __fastcall DirAsyncButtonClick(TObject *Sender); + void __fastcall DirectoryAsyncButtonClick(TObject *Sender); + void __fastcall LsAsyncButtonClick(TObject *Sender); + void __fastcall ListAsyncButtonClick(TObject *Sender); + void __fastcall SystAsyncButtonClick(TObject *Sender); + void __fastcall SystemAsyncButtonClick(TObject *Sender); + void __fastcall FileSizeAsyncButtonClick(TObject *Sender); + void __fastcall SizeAsyncButtonClick(TObject *Sender); + void __fastcall MkdAsyncButtonClick(TObject *Sender); + void __fastcall MkdirAsyncButtonClick(TObject *Sender); + void __fastcall RmdAsyncButtonClick(TObject *Sender); + void __fastcall RmdirAsyncButtonClick(TObject *Sender); + void __fastcall RenAsyncButtonClick(TObject *Sender); + void __fastcall RenameAsyncButtonClick(TObject *Sender); + void __fastcall DeleAsyncButtonClick(TObject *Sender); + void __fastcall DeleteAsyncButtonClick(TObject *Sender); + void __fastcall PwdAsyncButtonClick(TObject *Sender); + void __fastcall QuoteAsyncButtonClick(TObject *Sender); + void __fastcall DoQuoteAsyncButtonClick(TObject *Sender); + void __fastcall PutAsyncButtonClick(TObject *Sender); + void __fastcall TransmitAsyncButtonClick(TObject *Sender); + void __fastcall TypeSetAsyncButtonClick(TObject *Sender); + void __fastcall RestGetAsyncButtonClick(TObject *Sender); + void __fastcall RestartGetAsyncButtonClick(TObject *Sender); + void __fastcall CDupAsyncButtonClick(TObject *Sender); + void __fastcall ClearButtonClick(TObject *Sender); + void __fastcall AppendAsyncButtonClick(TObject *Sender); + void __fastcall AppendFileAsyncButtonClick(TObject *Sender); +private: // User declarations + AnsiString FIniFileName; + BOOL FInitialized; + void __fastcall Display(TObject *Sender, AnsiString &Msg); + void __fastcall DisplayFile(const System::AnsiString FileName); + void __fastcall TFtpReceiveForm::ExecuteCmd( + TSyncCmd SyncCmd, TASyncCmd ASyncCmd); +public: // User declarations + __fastcall TFtpReceiveForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TFtpReceiveForm *FtpReceiveForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/ftptst2.cpp b/lib/ics/Cpp/Internet/ftptst2.cpp new file mode 100644 index 00000000..9f4e759f --- /dev/null +++ b/lib/ics/Cpp/Internet/ftptst2.cpp @@ -0,0 +1,14 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop + +#include "FtpTst2.h" +//--------------------------------------------------------------------------- +#pragma resource "*.dfm" +TDirectoryForm *DirectoryForm; +//--------------------------------------------------------------------------- +__fastcall TDirectoryForm::TDirectoryForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/ftptst2.dfm b/lib/ics/Cpp/Internet/ftptst2.dfm new file mode 100644 index 00000000..e35ad9b3 Binary files /dev/null and b/lib/ics/Cpp/Internet/ftptst2.dfm differ diff --git a/lib/ics/Cpp/Internet/ftptst2.h b/lib/ics/Cpp/Internet/ftptst2.h new file mode 100644 index 00000000..547c594e --- /dev/null +++ b/lib/ics/Cpp/Internet/ftptst2.h @@ -0,0 +1,21 @@ +//--------------------------------------------------------------------------- +#ifndef FtpTst2H +#define FtpTst2H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TDirectoryForm : public TForm +{ +__published: // IDE-managed Components + TListBox *DirListBox; +private: // User declarations +public: // User declarations + __fastcall TDirectoryForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TDirectoryForm *DirectoryForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/httppg1.cpp b/lib/ics/Cpp/Internet/httppg1.cpp new file mode 100644 index 00000000..51ba0dbf --- /dev/null +++ b/lib/ics/Cpp/Internet/httppg1.cpp @@ -0,0 +1,208 @@ +/*--------------------------------------------------------------------------- + + +Author: Franois PIETTE +Creation: December 4, 1997 +Version: 1.04 +Description: Sample program to demonstrate some of the THttpCli features. + (POST a message to a CGI) + (requested by Walter Daniel Leon Salas" ) + You can see what HttpPg does automatically using your browser + and surfing to http://www.unired.net.pe/mensatel.html HttpPg + does programmatically what you can do manually at this page using + your browser. +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 28, 1997 Added a TMemo to display the POST's result. +Jan 16, 1998 Added a Proxy edit box. Added ini file stuff. + Better error handling. Added abort button. +Apr 11, 1998 V1.02 Adapted for BCB3 +Jul 23, 1998 V1.03 Corrected a parenthesis error in Encode. + Thanks to Albert Wiersch for pointing this bug. +Aug 15, 1999 V1.04 Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). +Apr 02, 2000 V1.05 Adapted for BCB5 (removed "#define _WINSPOOL_" SetPortA syndrome) + + ---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#include +#pragma hdrstop + +#include "HttpPg1.h" +//--------------------------------------------------------------------------- +#pragma link "HttpProt" +#pragma resource "*.dfm" +#define HttpPgVersion 101 +#define SectionData "Data" +#define KeyUserID "UserID" +#define KeyUserName "UserName" +#define KeyEMail "EMail" +#define KeyMessage "Message" +#define KeyProxy "Proxy" +#define SectionWindow "Window" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +THttpTestForm *HttpTestForm; +//--------------------------------------------------------------------------- +__fastcall THttpTestForm::THttpTestForm(TComponent* Owner) + : TForm(Owner) +{ + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName.SetLength(FIniFileName.Length() - 3); + FIniFileName = FIniFileName + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::FormCreate(TObject *Sender) +{ + DisplayMemo->Clear(); +} +//--------------------------------------------------------------------------- +AnsiString __fastcall Encode(AnsiString msg) +{ + int I; + AnsiString Result; + char ch; + +// Result = new AnsiString; + Result = ""; + for (I = 1; I < msg.Length(); I++) { + ch = (msg)[I]; + if (ch == ' ') + Result = Result + "+"; + else if ((toupper(ch) < 'A') || (toupper(ch) > 'Z')) + Result = Result + "%" + IntToHex(ch, 2); + else + Result = Result + ch; + } + return(Result); +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::SendButtonClick(TObject *Sender) +{ + TMemoryStream *DataIn; + TMemoryStream *DataOut; + AnsiString Buf; + BOOL bSuccess; + + DisplayMemo->Clear(); + DataIn = new TMemoryStream; + DataOut = new TMemoryStream; + bSuccess = TRUE; + try { + Buf = "ID=" + UserIDEdit->Text + + "&REMITE=" + EMailEdit->Text + + "&MENSAJE=" + Encode(MessageEdit->Text); + DataOut->Write(&Buf[1], Buf.Length()); + DataOut->Seek(0, soFromBeginning); + + HttpCli1->SendStream = DataOut; + HttpCli1->RcvdStream = DataIn; + HttpCli1->Proxy = ProxyEdit->Text; + HttpCli1->ProxyPort = "80"; + HttpCli1->URL = "http://www.unired.net.pe/cgi-bin/a.out"; + + SendButton->Enabled = FALSE; + AbortButton->Enabled = TRUE; + try { + HttpCli1->Post(); + } + __except (TRUE) { + bSuccess = FALSE; + } + if (bSuccess) { + DataIn->Seek(0, 0); + DisplayMemo->Lines->LoadFromStream(DataIn); + } + SendButton->Enabled = TRUE; + AbortButton->Enabled = FALSE; + } + __except (TRUE) { + bSuccess = FALSE; + } + if (!bSuccess) + DisplayMemo->Lines->Add("Failed : " + HttpCli1->ReasonPhrase); + + delete DataOut; + delete DataIn; +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::AbortButtonClick(TObject *Sender) +{ + HttpCli1->Abort(); +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + + if (!FInitialized) { + FInitialized = TRUE; + IniFile = new TIniFile(FIniFileName); + UserIDEdit->Text = IniFile->ReadString(SectionData, KeyUserID, + "27313"); + EMailEdit->Text = IniFile->ReadString(SectionData, KeyEMail, + "francois.piette@pophost.eunet.be"); + ProxyEdit->Text = IniFile->ReadString(SectionData, KeyProxy, + ""); + MessageEdit->Text = IniFile->ReadString(SectionData, KeyMessage, + "Hello World ! (Message sent by HttpPg)."); + + Top = IniFile->ReadInteger(SectionWindow, KeyTop, Top); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, Left); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + + delete IniFile; + } +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteString(SectionData, KeyUserID, UserIDEdit->Text); + IniFile->WriteString(SectionData, KeyProxy, ProxyEdit->Text); + IniFile->WriteString(SectionData, KeyMessage, MessageEdit->Text); + IniFile->WriteString(SectionData, KeyEMail, EMailEdit->Text); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + delete IniFile; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/httppg1.dfm b/lib/ics/Cpp/Internet/httppg1.dfm new file mode 100644 index 00000000..cda9b801 Binary files /dev/null and b/lib/ics/Cpp/Internet/httppg1.dfm differ diff --git a/lib/ics/Cpp/Internet/httppg1.h b/lib/ics/Cpp/Internet/httppg1.h new file mode 100644 index 00000000..aa934ea9 --- /dev/null +++ b/lib/ics/Cpp/Internet/httppg1.h @@ -0,0 +1,42 @@ +//--------------------------------------------------------------------------- +#ifndef HttpPg1H +#define HttpPg1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include "HttpProt.hpp" +//--------------------------------------------------------------------------- +class THttpTestForm : public TForm +{ +__published: // IDE-managed Components + TMemo *DisplayMemo; + TPanel *Panel1; + TLabel *Label1; + TLabel *Label2; + TLabel *Label3; + TEdit *UserIDEdit; + TEdit *EMailEdit; + TEdit *MessageEdit; + TButton *SendButton; + THttpCli *HttpCli1; + TLabel *Label4; + TEdit *ProxyEdit; + TButton *AbortButton; + void __fastcall FormCreate(TObject *Sender); + void __fastcall SendButtonClick(TObject *Sender); + void __fastcall AbortButtonClick(TObject *Sender); + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); +private: // User declarations + BOOL FInitialized; + AnsiString FIniFileName; +public: // User declarations + __fastcall THttpTestForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern THttpTestForm *HttpTestForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/httptst1.cpp b/lib/ics/Cpp/Internet/httptst1.cpp new file mode 100644 index 00000000..23757209 --- /dev/null +++ b/lib/ics/Cpp/Internet/httptst1.cpp @@ -0,0 +1,273 @@ +/*--------------------------------------------------------------------------- + + +Author: Franois PIETTE +Creation: November 23, 1997 +Version: 1.04 +Description: Sample program to demonstrate some of the THttpCli features. +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Jan 16, 1998 V1.00 Adapted for reviced HTTP component. +Mar 31, 1998 V1.01 Adapted for BCB3 +Apr 13, 1998 V1.02 Call HttpCli1DocEnd when get failed to close the document + file in he case it is already opened. +Aug 15, 1999 V1.03 Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). +Apr 02, 2000 V1.04 Adapted for BCB5 + + ---------------------------------------------------------------------------*/ + +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#include +#pragma hdrstop + +#include "httptst1.h" +//--------------------------------------------------------------------------- +#pragma link "HttpProt" +#pragma resource "*.dfm" +#define HttpTstVersion 104 +THttpTestForm *HttpTestForm; +//--------------------------------------------------------------------------- +__fastcall THttpTestForm::THttpTestForm(TComponent* Owner) + : TForm(Owner) +{ + // Build Ini file name + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + + if (!Initialized) { + Initialized = TRUE; + IniFile = new TIniFile(FIniFileName); + URLEdit->Text = IniFile->ReadString("Data", "URL", ""); + ProxyHostEdit->Text = IniFile->ReadString("Data", "ProxyHost", ""); + ProxyPortEdit->Text = IniFile->ReadString("Data", "ProxyPort", "80"); + DataEdit->Text = IniFile->ReadString("Data", "Data", ""); + DateTimeEdit->Text = IniFile->ReadString("Data", "DateTime", ""); + delete IniFile; + } +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteString("Data", "URL", URLEdit->Text); + IniFile->WriteString("Data", "ProxyHost", ProxyHostEdit->Text); + IniFile->WriteString("Data", "ProxyPort", ProxyPortEdit->Text); + IniFile->WriteString("Data", "Data", DataEdit->Text); + IniFile->WriteString("Data", "DateTime", DateTimeEdit->Text); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::HeadButtonClick(TObject *Sender) +{ + int I; + + DisplayMemo->Clear(); + DocumentMemo->Clear(); + SetButtonState(FALSE); + + HttpCli1->URL = URLEdit->Text; + HttpCli1->Proxy = ProxyHostEdit->Text; + HttpCli1->ProxyPort = ProxyPortEdit->Text; + HttpCli1->RcvdStream = NULL; + if (DateTimeEdit->Text != "") + HttpCli1->ModifiedSince = StrToDateTime(DateTimeEdit->Text); + else + HttpCli1->ModifiedSince = 0; + + try { + HttpCli1->Head(); + } __except (TRUE) { + SetButtonState(TRUE); + DisplayMemo->Lines->Add("HEAD Failed !"); + DisplayMemo->Lines->Add("StatusCode = " + IntToStr(HttpCli1->StatusCode)); + DisplayMemo->Lines->Add("ReasonPhrase = " + HttpCli1->ReasonPhrase); + return; + } + + DisplayMemo->Lines->Add("StatusCode = " + IntToStr(HttpCli1->StatusCode)); + + for (I = 0; I < HttpCli1->RcvdHeader->Count; I++) + DisplayMemo->Lines->Add("hdr>" + HttpCli1->RcvdHeader->Strings[I]); + + SetButtonState(TRUE); +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::GetButtonClick(TObject *Sender) +{ + int I; + TStream *DataIn; + + DisplayMemo->Clear(); + DocumentMemo->Clear(); + SetButtonState(FALSE); + + HttpCli1->URL = URLEdit->Text; + HttpCli1->Proxy = ProxyHostEdit->Text; + HttpCli1->ProxyPort = ProxyPortEdit->Text; + HttpCli1->RcvdStream = NULL; + if (DateTimeEdit->Text != "") + HttpCli1->ModifiedSince = StrToDateTime(DateTimeEdit->Text); + else + HttpCli1->ModifiedSince = 0; + + try { + HttpCli1->Get(); + } __except (TRUE) { + SetButtonState(TRUE); + DisplayMemo->Lines->Add("GET Failed !"); + DisplayMemo->Lines->Add("StatusCode = " + IntToStr(HttpCli1->StatusCode)); + DisplayMemo->Lines->Add("ReasonPhrase = " + HttpCli1->ReasonPhrase); + HttpCli1DocEnd(NULL); + return; + } + + DisplayMemo->Lines->Add("StatusCode = " + IntToStr(HttpCli1->StatusCode)); + + for (I = 0; I < HttpCli1->RcvdHeader->Count; I++) + DisplayMemo->Lines->Add("hdr>" + HttpCli1->RcvdHeader->Strings[I]); + + DataIn = new TFileStream(HttpCli1->DocName, fmOpenRead); + DocumentMemo->Lines->LoadFromStream(DataIn); + delete DataIn; + + SetButtonState(TRUE); +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::PostButtonClick(TObject *Sender) +{ + TMemoryStream *DataOut; + TFileStream *DataIn; + AnsiString Buf; + int I; + + DisplayMemo->Clear(); + DocumentMemo->Clear(); + SetButtonState(FALSE); + + DataOut = new TMemoryStream; + Buf = DataEdit->Text; + DataOut->Write(&Buf[1], Buf.Length()); + DataOut->Seek(0, soFromBeginning); + + HttpCli1->SendStream = DataOut; + HttpCli1->Proxy = ProxyHostEdit->Text; + HttpCli1->ProxyPort = ProxyPortEdit->Text; + HttpCli1->RcvdStream = NULL; + HttpCli1->URL = URLEdit->Text; + try { + HttpCli1->Post(); + } __except (TRUE) { + SetButtonState(TRUE); + delete DataOut; + DisplayMemo->Lines->Add("POST Failed !"); + DisplayMemo->Lines->Add("StatusCode = " + IntToStr(HttpCli1->StatusCode)); + DisplayMemo->Lines->Add("ReasonPhrase = " + HttpCli1->ReasonPhrase); + return; + } + delete DataOut; + + DisplayMemo->Lines->Add("StatusCode = " + IntToStr(HttpCli1->StatusCode)); + + for (I = 0; I < HttpCli1->RcvdHeader->Count; I++) + DisplayMemo->Lines->Add("hdr>" + HttpCli1->RcvdHeader->Strings[I]); + + DataIn = new TFileStream(HttpCli1->DocName, fmOpenRead); + DocumentMemo->Lines->LoadFromStream(DataIn); + delete DataIn; + + SetButtonState(TRUE); +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::HttpCli1DocBegin(TObject *Sender) +{ + DisplayMemo->Lines->Add(HttpCli1->ContentType + " => " + HttpCli1->DocName); + DisplayMemo->Lines->Add("Document = " + HttpCli1->DocName); + HttpCli1->RcvdStream = new TFileStream(HttpCli1->DocName, fmCreate); +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::HttpCli1DocEnd(TObject *Sender) +{ + if (HttpCli1->RcvdStream) { + delete HttpCli1->RcvdStream; + HttpCli1->RcvdStream = NULL; + } +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::Check64ButtonClick(TObject *Sender) +{ + AnsiString Inp = "Aladdin:open sesame"; + AnsiString Res = "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="; + + if (EncodeLine(encBase64, &Inp[1], Inp.Length()) != Res) + DisplayMemo->Lines->Add("Base64 encoding do not work !"); + else + DisplayMemo->Lines->Add("Base64 encoding works OK !"); +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::SetButtonState(BOOL State) +{ + GetButton->Enabled = State; + PostButton->Enabled = State; + HeadButton->Enabled = State; + AbortButton->Enabled = !State; +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::HttpCli1RequestDone(TObject *Sender, + THttpRequest RqType, WORD Error) +{ + SetButtonState(TRUE); + DisplayMemo->Lines->Add("RequestDone Error = " + IntToStr(Error)); +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::AbortButtonClick(TObject *Sender) +{ + HttpCli1->Abort(); +} +//--------------------------------------------------------------------------- +void __fastcall THttpTestForm::HttpCli1Command(TObject *Sender, + AnsiString &S) +{ + DisplayMemo->Lines->Add("cmd> " + S); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/httptst1.dfm b/lib/ics/Cpp/Internet/httptst1.dfm new file mode 100644 index 00000000..680405ad Binary files /dev/null and b/lib/ics/Cpp/Internet/httptst1.dfm differ diff --git a/lib/ics/Cpp/Internet/httptst1.h b/lib/ics/Cpp/Internet/httptst1.h new file mode 100644 index 00000000..bf6d179d --- /dev/null +++ b/lib/ics/Cpp/Internet/httptst1.h @@ -0,0 +1,57 @@ +//--------------------------------------------------------------------------- +#ifndef httptst1H +#define httptst1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class THttpTestForm : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TLabel *Label1; + TLabel *Label2; + TLabel *Label3; + TLabel *Label4; + TLabel *Label5; + TLabel *Label6; + TButton *GetButton; + TEdit *URLEdit; + TEdit *ProxyHostEdit; + TEdit *ProxyPortEdit; + TButton *PostButton; + TButton *Check64Button; + TEdit *DataEdit; + TEdit *DateTimeEdit; + TButton *HeadButton; + TButton *AbortButton; + TMemo *DisplayMemo; + TMemo *DocumentMemo; + THttpCli *HttpCli1; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall HeadButtonClick(TObject *Sender); + void __fastcall GetButtonClick(TObject *Sender); + void __fastcall PostButtonClick(TObject *Sender); + void __fastcall HttpCli1DocBegin(TObject *Sender); + void __fastcall HttpCli1DocEnd(TObject *Sender); + void __fastcall Check64ButtonClick(TObject *Sender); + void __fastcall HttpCli1RequestDone(TObject *Sender, THttpRequest RqType, + WORD Error); + void __fastcall AbortButtonClick(TObject *Sender); + void __fastcall HttpCli1Command(TObject *Sender, AnsiString &S); +private: // User declarations + BOOL Initialized; + AnsiString FIniFileName; + void __fastcall SetButtonState(BOOL State); +public: // User declarations + __fastcall THttpTestForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern THttpTestForm *HttpTestForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/mtsrv1.cpp b/lib/ics/Cpp/Internet/mtsrv1.cpp new file mode 100644 index 00000000..201eee1b --- /dev/null +++ b/lib/ics/Cpp/Internet/mtsrv1.cpp @@ -0,0 +1,218 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: This little application shows how to use the TWSocket in a + multithreaded application. It is a very basic telnet werver. + Each time a client connect to the server, he receive an "hello" + message. Then every character sent is echoed back to the client. + There are two units is this application: one for the main + server code, and one for the client thread. + Each time a client connect to the server, a new TWSocket is + created and a new thread is launched to handle the client + work. When the client disconnect, the TWSocket and the thread + are destroyed. + To see this demo working on your computer, start the demo then + start several copies of the TELNET client program (the one which + comes with Windows 95 is perfect). Then using each telnet, connect + to 127.0.0.1. You'll see a new connection in the list box. You + must receive the "hello" message and see each character as you + type them. You can use the Disconnect button from the application + or from the telnet client to see what happends (the connection + should be closed). +Creation: September 25, 1997 (from Delphi version dated September 21, 1997) +Version: 1.01 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Nov 15, 1997 Corrected a bug in the disconnect method which crashed the server + when you tried to disconnect the second or later client. + +---------------------------------------------------------------------------*/ +#include +#pragma hdrstop + +#include "mtsrv1.h" +#include "mtsrv2.h" +//--------------------------------------------------------------------------- +#pragma link "WSocket" +#pragma resource "*.dfm" +TServerForm *ServerForm; +//--------------------------------------------------------------------------- +// Convert an hexdigit to an integer +int xdigit(char Ch) +{ + if ((Ch >= '0') && (Ch <= '9')) + return(Ch - '0'); + else + return((Ch & 15) + 9); +} +//--------------------------------------------------------------------------- +// Check if a character is a valid hex digit +int isxDigit(char Ch) +{ + return(((Ch >= '0') && (Ch <= '9')) || + ((Ch >= 'a') && (Ch <= 'z')) || + ((Ch >= 'A') && (Ch <= 'Z'))); +} +//--------------------------------------------------------------------------- +// Convert the ascii representation of a hex number to an integer +int htoi(char *Value) +{ + int i; + int Result; + + Result = 0; + i = 0; + while ((Value[i] != 0) && (Value[i] == ' ')) + i++; + while ((Value[i] != 0) && isxDigit(Value[i])) { + Result = Result * 16 + xdigit(Value[i]); + i++; + } + return(Result); +} +//--------------------------------------------------------------------------- +__fastcall TServerForm::TServerForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::ServerWSocketSessionAvailable(TObject *Sender, + WORD Error) +{ + TClientThread *ClientThread; + + // Create a new thread to handle client request + ClientThread = new TClientThread(ServerWSocket->Accept()); + + // Assign the thread's OnTerminate event + ClientThread->OnTerminate = ClientThreadTerminate; + + // Add the thread to the listbox which is our client list + ClientListBox->Items->Add(IntToHex(Integer(ClientThread), 8)); + + // Then start the client thread work + // because it was created in the blocked state + ClientThread->Resume(); +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::FormShow(TObject *Sender) +{ + static BOOL FirstTime = TRUE; + + if (FirstTime) { + FirstTime = FALSE; +#if (WSocketVersion < 202) +#error "Please update your wsocket.pas to version 2.02 or later. " +#error "Free download at http://www.rtfm.be/fpiette/indexuk.htm" +#error "EMail at francois.piette@pophost.eunet.be" +#endif + ServerWSocket->Proto = "tcp"; // We use a TCP connection + ServerWSocket->Port = "telnet"; // We wants to use telnet + ServerWSocket->Addr = "0.0.0.0"; // We accept any client + ServerWSocket->Listen(); // Start server accepting + } +} +//--------------------------------------------------------------------------- +// This event is generated when the user clicks on the 'Disconnect' button +// when he wants to disconnect the selected client in the listbox. +void __fastcall TServerForm::DisconnectButtonClick(TObject *Sender) +{ + TClientThread *ClientThread; + AnsiString Buf; + + // No selected item, nothing to do + if (ClientListBox->ItemIndex < 0) + return; + + // Extract the ClientThread pointer from the list box + Buf = ClientListBox->Items->Strings[ClientListBox->ItemIndex]; + ClientThread = (TClientThread *)htoi(Buf.c_str()); + + // Call ClientThread.Release which will stop the thread + // In consequence, the OnTerminate event will be generated + ClientThread->Release(); +} +//--------------------------------------------------------------------------- +// This event handler is called when one of the client thread terminate +// We will find this thread in our listbox, remove it and destroy the +// TWSocket object use by the corresponding client. +void __fastcall TServerForm::ClientThreadTerminate(TObject *Sender) +{ + TClientThread *ClientThread; + AnsiString Buf; + int Index; + + // A thread has been terminated, remove it from our list and destroy + // the ClientWSocket we passed to the thread. + Index = 0; + while (Index < ClientListBox->Items->Count) { + Buf = ClientListBox->Items->Strings[Index]; + ClientThread = (TClientThread *)htoi(Buf.c_str()); + if (ClientThread == (TClientThread *)Sender) { + // Remove the client from our listbox + ClientListBox->Items->Delete(Index); + break; + } + Index++; + } +} +//--------------------------------------------------------------------------- +// This procedure scan the listbox and halt every ClientThread +void __fastcall TServerForm::DisconnectAll() +{ + TClientThread *ClientThread; + AnsiString Buf; + + while (ClientListBox->Items->Count > 0) { + Buf = ClientListBox->Items[0].Text; + ClientThread = (TClientThread *)htoi(Buf.c_str()); + ClientThread->Release(); + Application->ProcessMessages(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::QuitButtonClick(TObject *Sender) +{ + Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::DisconnectAllButtonClick(TObject *Sender) +{ + DisconnectAll(); +} +//--------------------------------------------------------------------------- + +void __fastcall TServerForm::FormCloseQuery(TObject *Sender, bool &CanClose) +{ + DisconnectAll(); +} +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/mtsrv1.dfm b/lib/ics/Cpp/Internet/mtsrv1.dfm new file mode 100644 index 00000000..eb803269 Binary files /dev/null and b/lib/ics/Cpp/Internet/mtsrv1.dfm differ diff --git a/lib/ics/Cpp/Internet/mtsrv1.h b/lib/ics/Cpp/Internet/mtsrv1.h new file mode 100644 index 00000000..537ff3e5 --- /dev/null +++ b/lib/ics/Cpp/Internet/mtsrv1.h @@ -0,0 +1,34 @@ +//--------------------------------------------------------------------------- +#ifndef mtsrv1H +#define mtsrv1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +class TServerForm : public TForm +{ +__published: // IDE-managed Components + TButton *DisconnectButton; + TButton *DisconnectAllButton; + TButton *QuitButton; + TListBox *ClientListBox; + TWSocket *ServerWSocket; + void __fastcall QuitButtonClick(TObject *Sender); + void __fastcall ServerWSocketSessionAvailable(TObject *Sender, WORD Error); + void __fastcall FormShow(TObject *Sender); + void __fastcall DisconnectButtonClick(TObject *Sender); + void __fastcall DisconnectAllButtonClick(TObject *Sender); + void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose); +private: // User declarations + void __fastcall ClientThreadTerminate(TObject *Sender); + void __fastcall DisconnectAll(); +public: // User declarations + __fastcall TServerForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TServerForm *ServerForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/mtsrv2.cpp b/lib/ics/Cpp/Internet/mtsrv2.cpp new file mode 100644 index 00000000..805c041a --- /dev/null +++ b/lib/ics/Cpp/Internet/mtsrv2.cpp @@ -0,0 +1,160 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: This little application shows how to use the TWSocket in a + multithreaded application. It is a very basic telnet werver. + Each time a client connect to the server, he receive an "hello" + message. Then every character sent is echoed back to the client. + There are two units is this application: one for the main + server code, and one for the client thread. + Each time a client connect to the server, a new TWSocket is + created and a new thread is launched to handle the client + work. When the client disconnect, the TWSocket and the thread + are destroyed. + To see this demo working on your computer, start the demo then + start several copies of the TELNET client program (the one which + comes with Windows 95 is perfect). Then using each telnet, connect + to 127.0.0.1. You'll see a new connection in the list box. You + must receive the "hello" message and see each character as you + type them. You can use the Disconnect button from the application + or from the telnet client to see what happends (the connection + should be closed). +EMail: francois.piette@pophost.eunet.be.be http://www.rtfm.be/fpiette +Creation: September 25, 1997 (from Delphi version dated September 21, 1997) +Version: 1.00 +Support: EMail to the author +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + +---------------------------------------------------------------------------*/ +#include +#pragma hdrstop + +#include "mtsrv2.h" +//--------------------------------------------------------------------------- +// Important: Methods and properties of objects in VCL can only be +// used in a method called using Synchronize, for example: +// +// Synchronize(UpdateCaption); +// +// where UpdateCaption could look like: +// +// void __fastcall TClientThread::UpdateCaption() +// { +// Form1->Caption = "Updated in a thread"; +// } +//--------------------------------------------------------------------------- +// Create a new thread in the blocked state. This allow the user to register +// the client thread before it actually start working. +__fastcall TClientThread::TClientThread(int ClientHSocket) + : TThread(TRUE) +{ + FClientHSocket = ClientHSocket; + FreeOnTerminate = TRUE; +} +//--------------------------------------------------------------------------- +// Destroy the thread. Destroy the ClientWSocket if needed. +__fastcall TClientThread::~TClientThread() +{ + if (FClientSocket != NULL) { + FClientSocket->~TWSocket(); + FClientSocket = NULL; + } +} +//--------------------------------------------------------------------------- +// This method will be called by the main server thread to terminated a +// client thread. +void __fastcall TClientThread::Release() +{ + PostMessage(FClientSocket->Handle, WM_QUIT, 0, 0); +} +//--------------------------------------------------------------------------- +// This is the main thread routine. There is not much to do because TWSocket +// is event drive. So everythong to do is done inside an event handler, +// mostly the OnDataAvailable event handler which is triggered each time +// the client send something to the server. +void __fastcall TClientThread::Execute() +{ + // Create the client TWSocket. It is important to create it inside the + // Execute method because it *must* be created by the thread. Otherwise + // the messages sent by winsock would be processed in the main thread + // context, effectively disabling multi-threading. + FClientSocket = new TWSocket(NULL); + FClientSocket->HSocket = FClientHSocket; + FClientSocket->OnDataAvailable = ServerWSocketDataAvailable; + FClientSocket->OnSessionClosed = ServerWSocketSessionClosed; + + // Send the welcome message + FClientSocket->SendStr("Hello !\r\n >"); + + // Message loop to handle TWSocket messages + // The loop is exited when WM_QUIT message is received + FClientSocket->MessageLoop(); + + // Returning from the Execute function effectively terminate the thread +} +//--------------------------------------------------------------------------- +// This event handler is called when the client connection is closed. +void __fastcall TClientThread::ServerWSocketSessionClosed(TObject *Sender, WORD Error) +{ + PostMessage(FClientSocket->Handle, WM_QUIT, 0, 0); +} +//--------------------------------------------------------------------------- +// This event handler is called when the client has sent some data to the +// server. It is here that we must place the client requests execution +// probably by assembling data in lines, parsing those lines for commands +// and executing the commands. Here for simplicity, we just echo back the +// data sent by the user, without doing anything serious. +// To demonstrate that blocking a thread do not block the others, when a '*' +// is received, we go to Sleep for a few seconds, effectively blocking the +// the client. But as we are multi-threaded, this do not block any other +// client. +// Do not forget to call the Synchronize method if you need to update the +// user interface. Only the main thread can do it (VCL is not thread safe). +void __fastcall TClientThread::ServerWSocketDataAvailable(TObject *Sender, WORD Error) +{ + char Buffer[4096]; + int Count; + + // Receive as much data as possible + Count = FClientSocket->Receive(&Buffer, sizeof(Buffer)); + + // If data received, then process it + if (Count > 0) { + if (Buffer[0] == '*') { + // If the first character is '*' then go to sleep a while + FClientSocket->SendStr("Sleeping for 15 sec...\r\n"); + Sleep(15000); + FClientSocket->SendStr("Wake up !\r\n"); + } + else + // Just echo data back to client + FClientSocket->Send(&Buffer, Count); + } +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/mtsrv2.h b/lib/ics/Cpp/Internet/mtsrv2.h new file mode 100644 index 00000000..8f83cdd6 --- /dev/null +++ b/lib/ics/Cpp/Internet/mtsrv2.h @@ -0,0 +1,23 @@ +//--------------------------------------------------------------------------- +#ifndef mtsrv2H +#define mtsrv2H +//--------------------------------------------------------------------------- +#include +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +class TClientThread : public TThread +{ +private: + TWSocket *FClientSocket; + int FClientHSocket; + void __fastcall ServerWSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall ServerWSocketSessionClosed(TObject *Sender, WORD Error); +protected: + void __fastcall Execute(); +public: + __fastcall TClientThread(int ClientHSocket); + __fastcall ~TClientThread(); + void __fastcall Release(); +}; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/newsrdr1.cpp b/lib/ics/Cpp/Internet/newsrdr1.cpp new file mode 100644 index 00000000..a7318dbd --- /dev/null +++ b/lib/ics/Cpp/Internet/newsrdr1.cpp @@ -0,0 +1,511 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: This sample program show how to use TNntpCli to write a news + enabled application. +Creation: January 14, 1997 +Version: 1.02 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Feb 21, 1998 Ported form Delphi code +Apr 11, 1998 V1.01 Adapted to BCB3 +Aug 15, 1999 V1.02 Adapted for BCB4 + Added support for XHDR and MODE READER. + Corrected a bug that let Connect and Abort button + disabled when DNS lookup failed. + + ---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#include +#include +#pragma hdrstop + +#include "NewsRdr1.h" +//--------------------------------------------------------------------------- +#pragma link "NntpCli" +#pragma resource "*.dfm" +#define IniFileName "NEWSRDR.INI" +TNNTPForm *NNTPForm; +//--------------------------------------------------------------------------- +__fastcall TNNTPForm::TNNTPForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::FormShow(TObject *Sender) +{ + TIniFile *IniFile; + AnsiString EMail; + AnsiString UserName; + TRegistry *Reg; + AnsiString Key; + + if (FInitialized) + return; + + EMail = "your.name@yourcompany.domain"; + UserName = "Your Name"; + + // Get username and EMail from the Internet Explorer settings + // Should add code for Netscape Navigator... + Reg = new TRegistry; + Reg->RootKey = HKEY_CURRENT_USER; + Key = "\Software\Microsoft\Internet Mail and News\Mail"; + if (Reg->OpenKey(Key, FALSE)) { + EMail = Reg->ReadString("Sender EMail"); + UserName = Reg->ReadString("Sender Name"); + } + Reg->CloseKey(); + delete Reg; + + FInitialized = TRUE; + IniFile = new TIniFile(IniFileName); + Top = IniFile->ReadInteger("Window", "Top", Top); + Left = IniFile->ReadInteger("Window", "Left", Left); + Width = IniFile->ReadInteger("Window", "Width", Width); + Height = IniFile->ReadInteger("Window", "Height", Height); + ServerEdit->Text = IniFile->ReadString("Data", "Server", ""); + ArticleNumEdit->Text = IniFile->ReadString("Data", "ArticleNum", ""); + ArticleIDEdit->Text = IniFile->ReadString("Data", "ArticleID", ""); + FileEdit->Text = IniFile->ReadString("Data", "File", "nntprdr.txt"); + UserNameEdit->Text = IniFile->ReadString("Data", "UserName", ""); + PasswordEdit->Text = IniFile->ReadString("Data", "Password", ""); + UserEdit->Text = IniFile->ReadString("Data", "User", + "\"" + UserName + + "\" <" + EMail + ">"); + GroupEdit->Text = IniFile->ReadString("Data", "Group", + "borland->public->delphi->internet"); + delete IniFile; + DisplayMemo->Clear(); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::FormClose(TObject *Sender, TCloseAction &Action) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(IniFileName); + IniFile->WriteString("Data", "Server", ServerEdit->Text); + IniFile->WriteString("Data", "Group", GroupEdit->Text); + IniFile->WriteString("Data", "ArticleNum", ArticleNumEdit->Text); + IniFile->WriteString("Data", "ArticleID", ArticleIDEdit->Text); + IniFile->WriteString("Data", "File", FileEdit->Text); + IniFile->WriteString("Data", "User", UserEdit->Text); + IniFile->WriteString("Data", "UserName", UserNameEdit->Text); + IniFile->WriteString("Data", "Password", PasswordEdit->Text); + IniFile->WriteInteger("Window", "Top", Top); + IniFile->WriteInteger("Window", "Left", Left); + IniFile->WriteInteger("Window", "Width", Width); + IniFile->WriteInteger("Window", "Height", Height); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::Display(const AnsiString Msg) +{ + // Limit the memo to 100 lines + while (DisplayMemo->Lines->Count > 100) + DisplayMemo->Lines->Delete(1); + DisplayMemo->Lines->Add(Msg); +}; +//--------------------------------------------------------------------------- + +void __fastcall TNNTPForm::NntpCli1SessionConnected(TObject *Sender, WORD Error) +{ + AbortButton->Enabled = TRUE; + Display("Connected, StatusCode = " + IntToStr(NntpCli1->StatusCode)); + if (NntpCli1->PostingPermited) + Display("Posting permited"); + else + Display("Posting not permited"); + Display(NntpCli1->LastResponse); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::NntpCli1SessionClosed(TObject *Sender, WORD Error) +{ + AbortButton->Enabled = FALSE; + ConnectButton->Enabled = TRUE; + Display("Connection closed"); +} +//--------------------------------------------------------------------------- +// This event handler is called for each NNTP command when the command has +// been exected (correctly or not). +void __fastcall TNNTPForm::NntpCli1RequestDone(TObject *Sender, + TNntpRequest RqType, WORD Error) +{ + Display("Request done. LastResponse = " + NntpCli1->LastResponse); + + if (Error == 0) + Display("No error"); + else + Display("Error #" + IntToStr(Error)); + + switch (RqType) { + case nntpConnect: + if (Error != 0) { + AbortButton->Enabled = FALSE; + ConnectButton->Enabled = TRUE; + Display("Connect failed"); + } + break; + case nntpGroup: + Display("ArticleEstimated = " + IntToStr(NntpCli1->ArticleEstimated)); + Display("ArticleFirst = " + IntToStr(NntpCli1->ArticleFirst)); + Display("ArticleLast = " + IntToStr(NntpCli1->ArticleLast)); + ArticleNumEdit->Text = IntToStr(NntpCli1->ArticleFirst); + break; + case nntpPost: + case nntpQuit: + case nntpAbort: + case nntpHelp: + case nntpNewGroups: + case nntpNewNews: + case nntpXOver: + case nntpListOverViewFmt: + case nntpAuthenticate: + case nntpXHdr: + case nntpModeReader: + // Nothing to do + break; + case nntpDate: + Display("Server Date is " + DateTimeToStr(NntpCli1->ServerDate)); + break; + case nntpStatByNumber: + case nntpStatByID: + case nntpHeadByNumber: + case nntpHeadByID: + case nntpBodyByNumber: + case nntpBodyByID: + case nntpArticleByNumber: + case nntpArticleByID: + case nntpNext: + case nntpLast: + Display("ArticleNumber = " + IntToStr(NntpCli1->ArticleNumber)); + Display("ArticleID = <" + NntpCli1->ArticleID + ">"); + if (Error == 0) { + ArticleNumEdit->Text = IntToStr(NntpCli1->ArticleNumber); + ArticleIDEdit->Text = NntpCli1->ArticleID; + }; + break; + default: + Display("Unknown request type."); + } + + // If any stream where used, destroy it + if (FDataStream) { + delete FDataStream; + FDataStream = NULL; + } +} +//--------------------------------------------------------------------------- +// This event handler is called by TNntpCli when it has received data and +// don't know what to do with it. It should normally not occur ! +void __fastcall TNNTPForm::NntpCli1DataAvailable(TObject *Sender, WORD Error) +{ + Display("Data: " + NntpCli1->LastResponse); +} +//--------------------------------------------------------------------------- +// This event handler is called by TNntpCli component just before the +// component will begin receiving a message. It's a good place to open a +// file or start a progress bar. +void __fastcall TNNTPForm::NntpCli1MessageBegin(TObject *Sender) +{ + Display("Message begin"); +} +//--------------------------------------------------------------------------- +// This event handler is called by TNntpCli component for each line of an +// incomming message. Header line as well as body lines are comming here. +// It's a good place to write to a file or update screen or progress bar. +// It's also the place to intercept header lines. +void __fastcall TNNTPForm::NntpCli1MessageLine(TObject *Sender) +{ + AnsiString NewsGroupName; + int LastArticle; + int FirstArticle; + char PostingFlag; + + Display("Line: " + NntpCli1->LastResponse); + ParseListLine(NntpCli1->LastResponse, + NewsGroupName, + LastArticle, + FirstArticle, + PostingFlag); + // It is the place to do something with NewsGroupName, LastArticle, + // FirstArticle and PostingFlag +} +//--------------------------------------------------------------------------- +// This event handler is called by TNntpCli component when a message has +// been received completely. It's a good place to close a file, delete the +// progress bar and alert user. +void __fastcall TNNTPForm::NntpCli1MessageEnd(TObject *Sender) +{ + Display("Message end"); +} +//--------------------------------------------------------------------------- +// This function is called internally to create a TFileStream if any file +// name is specified in the FileEdit box. If the edit box is blank, nil is +// returned. The TFileStream will be supplyed to the comoponent for every +// command which can take a TStream to store data such as ArticleByNum. +// The stream is destroyed in the OnRequestDone event handler. +Classes::TStream* __fastcall TNNTPForm::GetStream(void) +{ + // Delete the previous stream if not already done + if (FDataStream) { + delete FDataStream; + FDataStream = NULL; + }; + + if (Trim(FileEdit->Text) == "") + FDataStream = NULL; + else { + // Try to open the file stream. Trap errors. + try { + FDataStream = new TFileStream(Trim(FileEdit->Text), fmCreate); + } __except(TRUE) { + // Display an error message in our TMemo + Display("Can't open " + FileEdit->Text); + FDataStream = NULL; + throw; // Show the exception box + } + } + return(FDataStream); +}; +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::ConnectButtonClick(TObject *Sender) +{ + DisplayMemo->Clear(); + ConnectButton->Enabled = FALSE; + NntpCli1->Host = ServerEdit->Text; + NntpCli1->Connect(); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::AbortButtonClick(TObject *Sender) +{ + NntpCli1->Abort(); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::QuitButtonClick(TObject *Sender) +{ + NntpCli1->Quit(); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::GroupButtonClick(TObject *Sender) +{ + NntpCli1->Group(GroupEdit->Text); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::NextButtonClick(TObject *Sender) +{ + NntpCli1->Next(); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::LastButtonClick(TObject *Sender) +{ + NntpCli1->Last(); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::ArticleByIDButtonClick(TObject *Sender) +{ + NntpCli1->ArticleByID(ArticleIDEdit->Text, GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::ArticleByNumberButtonClick(TObject *Sender) +{ + NntpCli1->ArticleByNumber(StrToInt(ArticleNumEdit->Text), GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::HeadByIDButtonClick(TObject *Sender) +{ + NntpCli1->HeadByID(ArticleIDEdit->Text, GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::HeadByNumberButtonClick(TObject *Sender) +{ + NntpCli1->HeadByNumber(StrToInt(ArticleNumEdit->Text), GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::BodyByIDButtonClick(TObject *Sender) +{ + NntpCli1->BodyByID(ArticleIDEdit->Text, GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::BodyByNumberButtonClick(TObject *Sender) +{ + NntpCli1->BodyByNumber(StrToInt(ArticleNumEdit->Text), GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::StatByIDButtonClick(TObject *Sender) +{ + NntpCli1->StatByID(ArticleIDEdit->Text); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::StatByNumberButtonClick(TObject *Sender) +{ + NntpCli1->StatByNumber(StrToInt(ArticleNumEdit->Text)); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::ListButtonClick(TObject *Sender) +{ + if (Application->MessageBox("This could take a VERY long time, proceed ? ", + "Warning", MB_YESNO) != ID_YES) + return; + NntpCli1->List(GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::NewGroupsButtonClick(TObject *Sender) +{ + NntpCli1->NewGroups(Now() - 10, FALSE, "", GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::NewNewsButtonClick(TObject *Sender) +{ + NntpCli1->NewNews(Now() - 1, FALSE, GroupEdit->Text, "", GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::HelpButtonClick(TObject *Sender) +{ + NntpCli1->Help(GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::LineToStream(AnsiString Buf) +{ + Display("Line: " + Buf); + Buf = Buf + "\r\n"; + FDataStream->WriteBuffer(Buf.c_str(), Buf.Length()); +}; +//--------------------------------------------------------------------------- +// Posting a message require to build the message, including his header. +// Here we use a TMemoryStream to create a message on the fly. Normally we +// should use a TFileStream to get the message from a file where it has +// been written by some user interface. +void __fastcall TNNTPForm::PostButtonClick(TObject *Sender) +{ + // Delete the stream if not already done + if (FDataStream) { + delete FDataStream; + FDataStream = NULL; + } + + // Create a new stream in memory + FDataStream = new TMemoryStream; + + // Write the message header + LineToStream("From: " + UserEdit->Text); + LineToStream("Newsgroups: " + GroupEdit->Text); + LineToStream("Subject: Internet components (winsock)"); + LineToStream("Organization: None"); + LineToStream("X-Newsreader: NNTP component " + "(http://www.rtfm.be/fpiette/indexuk.htm)"); + + // End of header is a blank line + LineToStream(""); + + // Write the message body + LineToStream(""); + LineToStream("The Internet Component Suite is a set of native"); + LineToStream("components for Borland Delphi (all versions,"); + LineToStream("including 16 bits) and Borland C++ Builder. The"); + LineToStream("major TCP/IP protocols are supported for building"); + LineToStream("client/server, intranet or Internet applications."); + LineToStream(""); + LineToStream("TCP, UDP, TELNET, FTP, SMTP, POP3, PING, FINGER, HTTP,"); + LineToStream("NNTP and more. Each component has samples writen"); + LineToStream("in Delphi and in C++ Builder. Several client/server"); + LineToStream("applications, including an event-driven and a"); + LineToStream("multi-threaded server, a complete FTP client and"); + LineToStream("TELNET client with ansi emulation are provided."); + LineToStream("Full source code provided for everything."); + LineToStream(""); + LineToStream("The Internet Component Suite is freeware, royalty"); + LineToStream("free and support is done using a mailing list."); + LineToStream("Visit our website and download now from"); + LineToStream("http://www.rtfm.be/fpiette/indexuk.htm"); + + // Set stream pointer to beginning of stream because TNntpCli will post + // from the current position + FDataStream->Seek(0, soFromBeginning); + + // Ask the component to post the stream. The posting occurs in the + // background ! We will receive the OnRequestDone event when done. + // It's in this event handler that the stream must be destroyed + NntpCli1->Post(FDataStream); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::XOverButtonClick(TObject *Sender) +{ + NntpCli1->XOver(ArticleNumEdit->Text, GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::OverViewFmtButtonClick(TObject *Sender) +{ + NntpCli1->ListOverViewFmt(GetStream()); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::DateButtonClick(TObject *Sender) +{ + NntpCli1->Date(); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::AuthenticateButtonClick(TObject *Sender) +{ + NntpCli1->UserName = UserNameEdit->Text; + NntpCli1->PassWord = PasswordEdit->Text; + NntpCli1->Authenticate(); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::ModeReaderButtonClick(TObject *Sender) +{ + NntpCli1->ModeReader(); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::XHdrButtonClick(TObject *Sender) +{ + NntpCli1->XHdr(GetStream(), "subject", ArticleNumEdit->Text); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::NntpCli1XHdrBegin(TObject *Sender) +{ + Display("XHdr begin"); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::NntpCli1XHdrEnd(TObject *Sender) +{ + Display("Xhdr End"); +} +//--------------------------------------------------------------------------- +void __fastcall TNNTPForm::NntpCli1XHdrLine(TObject *Sender) +{ + Display("XHdr: " + NntpCli1->LastResponse); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/newsrdr1.dfm b/lib/ics/Cpp/Internet/newsrdr1.dfm new file mode 100644 index 00000000..257b397f Binary files /dev/null and b/lib/ics/Cpp/Internet/newsrdr1.dfm differ diff --git a/lib/ics/Cpp/Internet/newsrdr1.h b/lib/ics/Cpp/Internet/newsrdr1.h new file mode 100644 index 00000000..e6173e4d --- /dev/null +++ b/lib/ics/Cpp/Internet/newsrdr1.h @@ -0,0 +1,109 @@ +//--------------------------------------------------------------------------- +#ifndef NewsRdr1H +#define NewsRdr1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include "NntpCli.hpp" +//--------------------------------------------------------------------------- +class TNNTPForm : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TLabel *Label1; + TLabel *Label2; + TLabel *Label3; + TLabel *Label4; + TLabel *Label5; + TEdit *ServerEdit; + TButton *ConnectButton; + TButton *AbortButton; + TButton *GroupButton; + TEdit *GroupEdit; + TEdit *ArticleNumEdit; + TButton *ArticleByNumberButton; + TButton *ArticleByIDButton; + TButton *NextButton; + TButton *LastButton; + TButton *HeadByNumberButton; + TButton *HeadByIDButton; + TButton *BodyByNumberButton; + TButton *BodyByIDButton; + TButton *StatByNumberButton; + TButton *StatByIDButton; + TButton *ListButton; + TEdit *ArticleIDEdit; + TButton *PostButton; + TButton *QuitButton; + TEdit *FileEdit; + TButton *NewGroupsButton; + TButton *NewNewsButton; + TButton *HelpButton; + TButton *XOverButton; + TButton *OverViewFmtButton; + TButton *DateButton; + TMemo *DisplayMemo; + TNntpCli *NntpCli1; + TLabel *Label6; + TEdit *UserEdit; + TLabel *Label7; + TEdit *UserNameEdit; + TLabel *Label8; + TEdit *PasswordEdit; + TButton *AuthenticateButton; + TButton *XHdrButton; + TButton *ModeReaderButton; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormClose(TObject *Sender, TCloseAction &Action); + void __fastcall NntpCli1SessionConnected(TObject *Sender, WORD Error); + void __fastcall NntpCli1SessionClosed(TObject *Sender, WORD Error); + void __fastcall NntpCli1RequestDone(TObject *Sender, TNntpRequest RqType, + WORD Error); + void __fastcall NntpCli1DataAvailable(TObject *Sender, WORD Error); + void __fastcall NntpCli1MessageBegin(TObject *Sender); + void __fastcall NntpCli1MessageLine(TObject *Sender); + void __fastcall NntpCli1MessageEnd(TObject *Sender); + void __fastcall ConnectButtonClick(TObject *Sender); + void __fastcall AbortButtonClick(TObject *Sender); + void __fastcall QuitButtonClick(TObject *Sender); + void __fastcall GroupButtonClick(TObject *Sender); + void __fastcall NextButtonClick(TObject *Sender); + void __fastcall LastButtonClick(TObject *Sender); + void __fastcall ArticleByIDButtonClick(TObject *Sender); + void __fastcall ArticleByNumberButtonClick(TObject *Sender); + void __fastcall HeadByIDButtonClick(TObject *Sender); + void __fastcall HeadByNumberButtonClick(TObject *Sender); + void __fastcall BodyByIDButtonClick(TObject *Sender); + void __fastcall BodyByNumberButtonClick(TObject *Sender); + void __fastcall StatByIDButtonClick(TObject *Sender); + void __fastcall StatByNumberButtonClick(TObject *Sender); + void __fastcall ListButtonClick(TObject *Sender); + void __fastcall NewGroupsButtonClick(TObject *Sender); + void __fastcall NewNewsButtonClick(TObject *Sender); + void __fastcall HelpButtonClick(TObject *Sender); + void __fastcall PostButtonClick(TObject *Sender); + void __fastcall XOverButtonClick(TObject *Sender); + void __fastcall OverViewFmtButtonClick(TObject *Sender); + void __fastcall DateButtonClick(TObject *Sender); + void __fastcall AuthenticateButtonClick(TObject *Sender); + void __fastcall ModeReaderButtonClick(TObject *Sender); + void __fastcall XHdrButtonClick(TObject *Sender); + void __fastcall NntpCli1XHdrBegin(TObject *Sender); + void __fastcall NntpCli1XHdrEnd(TObject *Sender); + void __fastcall NntpCli1XHdrLine(TObject *Sender); +private: // User declarations + BOOL FInitialized; + TStream *FDataStream; + void __fastcall Display(AnsiString Msg); + void __fastcall LineToStream(AnsiString Buf); + Classes::TStream* __fastcall GetStream(void); +public: // User declarations + __fastcall TNNTPForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TNNTPForm *NNTPForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/pingtst1.cpp b/lib/ics/Cpp/Internet/pingtst1.cpp new file mode 100644 index 00000000..8fa8bc79 --- /dev/null +++ b/lib/ics/Cpp/Internet/pingtst1.cpp @@ -0,0 +1,110 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: This demo show how to use the TPing object to ping any host. +Creation: November 30, 1997 +Version: 1.10 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 13, 1997 V1.01 Use the new OnEchoRequest and OnEchoReply events. +Apr 10, 1998 V1.02 Adapted for BCB3 +Dec 27, 1998 V1.10 New argument in TPing events. + + ---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#pragma hdrstop + +#include "PingTst1.h" +//--------------------------------------------------------------------------- +#pragma link "Ping" +#pragma resource "*.dfm" +TPingTstForm *PingTstForm; +//--------------------------------------------------------------------------- +__fastcall TPingTstForm::TPingTstForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TPingTstForm::PingButtonClick(TObject *Sender) +{ + DisplayMemo->Clear(); + DisplayMemo->Lines->Add("Resolving host '" + HostEdit->Text + "'"); + PingButton->Enabled = FALSE; + CancelButton->Enabled = TRUE; + Ping1->DnsLookup(HostEdit->Text); +} +//--------------------------------------------------------------------------- +void __fastcall TPingTstForm::Ping1DnsLookupDone(TObject *Sender, WORD Error) +{ + CancelButton->Enabled = FALSE; + PingButton->Enabled = TRUE; + + if (Error != 0) { + DisplayMemo->Lines->Add("Unknown Host '" + HostEdit->Text + "'"); + return; + } + + DisplayMemo->Lines->Add("Host '" + HostEdit->Text + "' is " + Ping1->DnsResult); + Ping1->Address = Ping1->DnsResult; + Ping1->Ping(); +} +//--------------------------------------------------------------------------- +void __fastcall TPingTstForm::Ping1Display(TObject *Sender, TObject *Icmp, AnsiString Msg) +{ + DisplayMemo->Lines->Add(Msg); +} +//--------------------------------------------------------------------------- +void __fastcall TPingTstForm::CancelButtonClick(TObject *Sender) +{ + Ping1->CancelDnsLookup(); +} +//--------------------------------------------------------------------------- +void __fastcall TPingTstForm::Ping1EchoRequest(TObject *Sender, TObject *Icmp) +{ + DisplayMemo->Lines->Add("Sending " + IntToStr(Ping1->Size) + " bytes to " + + Ping1->HostName + " (" + Ping1->HostIP + ")"); +} +//--------------------------------------------------------------------------- +void __fastcall TPingTstForm::Ping1EchoReply(TObject *Sender, TObject *Icmp, int Error) +{ + if (Error == 0) + DisplayMemo->Lines->Add("Cannot ping host (" + Ping1->HostIP + ") : " + + Ping1->ErrorString); + else + DisplayMemo->Lines->Add("Received " + IntToStr(Ping1->Reply.DataSize) + + " bytes from " + Ping1->HostIP + + " in " + IntToStr(Ping1->Reply.RTT) + " msecs"); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/pingtst1.dfm b/lib/ics/Cpp/Internet/pingtst1.dfm new file mode 100644 index 00000000..dee8c617 Binary files /dev/null and b/lib/ics/Cpp/Internet/pingtst1.dfm differ diff --git a/lib/ics/Cpp/Internet/pingtst1.h b/lib/ics/Cpp/Internet/pingtst1.h new file mode 100644 index 00000000..95b0b01b --- /dev/null +++ b/lib/ics/Cpp/Internet/pingtst1.h @@ -0,0 +1,33 @@ +//--------------------------------------------------------------------------- +#ifndef PingTst1H +#define PingTst1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "Ping.hpp" +//--------------------------------------------------------------------------- +class TPingTstForm : public TForm +{ +__published: // IDE-managed Components + TLabel *Label1; + TEdit *HostEdit; + TButton *PingButton; + TMemo *DisplayMemo; + TButton *CancelButton; + TPing *Ping1; + void __fastcall PingButtonClick(TObject *Sender); + void __fastcall Ping1DnsLookupDone(TObject *Sender, WORD Error); + void __fastcall Ping1Display(TObject *Sender, TObject *Icmp, AnsiString Msg); + void __fastcall CancelButtonClick(TObject *Sender); + void __fastcall Ping1EchoRequest(TObject *Sender, TObject *Icmp); + void __fastcall Ping1EchoReply(TObject *Sender, TObject *Icmp, int Error); +private: // User declarations +public: // User declarations + __fastcall TPingTstForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TPingTstForm *PingTstForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/poptst1.dfm b/lib/ics/Cpp/Internet/poptst1.dfm new file mode 100644 index 00000000..3dd29360 Binary files /dev/null and b/lib/ics/Cpp/Internet/poptst1.dfm differ diff --git a/lib/ics/Cpp/Internet/poptst1.h b/lib/ics/Cpp/Internet/poptst1.h new file mode 100644 index 00000000..ec592e7b --- /dev/null +++ b/lib/ics/Cpp/Internet/poptst1.h @@ -0,0 +1,76 @@ +//--------------------------------------------------------------------------- +#ifndef PopTst1H +#define PopTst1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "Wait.hpp" +#include "pop3cli.hpp" +//--------------------------------------------------------------------------- +class TPOP3ExcercizerForm : public TForm +{ +__published: // IDE-managed Components + TLabel *InfoLabel; + TLabel *Label1; + TLabel *Label2; + TLabel *Label3; + TLabel *Label4; + TLabel *Label5; + TButton *ConnectButton; + TWait *Wait1; + TMemo *DisplayMemo; + TButton *DisconnectButton; + TButton *UserButton; + TEdit *HostEdit; + TEdit *UserNameEdit; + TEdit *PassWordEdit; + TButton *PassButton; + TEdit *MsgNumEdit; + TButton *RetrButton; + TButton *StatButton; + TButton *ListAllButton; + TButton *ListButton; + TButton *DeleteButton; + TButton *NoopButton; + TButton *LastButton; + TButton *ResetButton; + TButton *TopButton; + TEdit *MsgLinesEdit; + TButton *RpopButton; + TPop3Client *Pop3Client; + void __fastcall FormCreate(TObject *Sender); + void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose); + void __fastcall Pop3ClientDisplay(TObject *Sender, AnsiString Msg); + void __fastcall ConnectButtonClick(TObject *Sender); + void __fastcall UserButtonClick(TObject *Sender); + void __fastcall PassButtonClick(TObject *Sender); + void __fastcall RetrButtonClick(TObject *Sender); + void __fastcall DisconnectButtonClick(TObject *Sender); + void __fastcall TopButtonClick(TObject *Sender); + void __fastcall RpopButtonClick(TObject *Sender); + void __fastcall StatButtonClick(TObject *Sender); + void __fastcall ListAllButtonClick(TObject *Sender); + void __fastcall ListButtonClick(TObject *Sender); + void __fastcall DeleteButtonClick(TObject *Sender); + void __fastcall NoopButtonClick(TObject *Sender); + void __fastcall LastButtonClick(TObject *Sender); + void __fastcall ResetButtonClick(TObject *Sender); + void __fastcall Pop3ClientMessageBegin(TObject *Sender); + void __fastcall Pop3ClientMessageEnd(TObject *Sender); + void __fastcall Pop3ClientMessageLine(TObject *Sender); + void __fastcall Pop3ClientListBegin(TObject *Sender); + void __fastcall Pop3ClientListEnd(TObject *Sender); + void __fastcall Pop3ClientListLine(TObject *Sender); +private: // User declarations + BOOL __fastcall TPOP3ExcercizerForm::DoTheJob( + TPop3Method MethodPtr, + AnsiString MethodName); +public: // User declarations + __fastcall TPOP3ExcercizerForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TPOP3ExcercizerForm *POP3ExcercizerForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/srv5.cpp b/lib/ics/Cpp/Internet/srv5.cpp new file mode 100644 index 00000000..0db7d3ef --- /dev/null +++ b/lib/ics/Cpp/Internet/srv5.cpp @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Object: Demo program to show how to use TWSocket object is a very + simple server program. This server just wait for a client to + connect, then send 'Hello'. When the user click on the + disconnect button, the client is disconnected. +Creation: September 27, 1997 (from Delphi version created sept 19, 1996) +Version: 2.02 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Mar 19, 1997 Use enhanced TWSocket object +Sep 06, 1997 Beautified +Apr 11, 1998 V2.02 Adapted for BCB3 + +---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#pragma hdrstop + +#include "srv5.h" +//--------------------------------------------------------------------------- +#pragma link "WSocket" +#pragma resource "*.dfm" +TServerForm *ServerForm; +//--------------------------------------------------------------------------- +__fastcall TServerForm::TServerForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::FormShow(TObject *Sender) +{ + static BOOL FirstTime = TRUE; + + if (FirstTime) { + FirstTime = FALSE; // Do it only once ! + SrvSocket->Addr = "0.0.0.0"; // Accept any client + SrvSocket->Listen(); // Start listening for client + InfoLabel->Caption = "Waiting for client"; + } +} +//--------------------------------------------------------------------------- +// This event handler is called once a client has connected the server. +void __fastcall TServerForm::SrvSocketSessionAvailable(TObject *Sender, + WORD Error) +{ + int NewHSocket; + TSockAddrIn PeerName; + AnsiString Peer; + + // We need to accept the client connection + NewHSocket = SrvSocket->Accept(); + + // And then associate this connection with our client socket + CliSocket->Dup(NewHSocket); + + // Wants to know who is connected to display on screen + CliSocket->GetPeerName(PeerName, sizeof(PeerName)); + + // User likes to see internet address in dot notation + Peer = inet_ntoa(PeerName.sin_addr); + InfoLabel->Caption = "Remote " + Peer + " connected"; + + // Send a welcome message to the client + CliSocket->SendStr("Hello\r\n"); + + // Enable the server user to disconect the client + DisconnectButton->Enabled = TRUE; +} +//--------------------------------------------------------------------------- +// This event handler is called once the client connection is broken. +// Either by the client or the server. +void __fastcall TServerForm::CliSocketSessionClosed(TObject *Sender, WORD Error) +{ + DisconnectButton->Enabled = FALSE; + InfoLabel->Caption = "Waiting for client"; // Inform the user +} +//--------------------------------------------------------------------------- +// This event handler is called once the user clicks on Ddisconnect +void __fastcall TServerForm::DisconnectButtonClick(TObject *Sender) +{ + CliSocket->Shutdown(2); // Shut the communication down + CliSocket->Close(); // Close the communication +} +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/srv5.dfm b/lib/ics/Cpp/Internet/srv5.dfm new file mode 100644 index 00000000..79463527 Binary files /dev/null and b/lib/ics/Cpp/Internet/srv5.dfm differ diff --git a/lib/ics/Cpp/Internet/srv5.h b/lib/ics/Cpp/Internet/srv5.h new file mode 100644 index 00000000..4e3dddab --- /dev/null +++ b/lib/ics/Cpp/Internet/srv5.h @@ -0,0 +1,29 @@ +//--------------------------------------------------------------------------- +#ifndef srv5H +#define srv5H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +class TServerForm : public TForm +{ +__published: // IDE-managed Components + TLabel *InfoLabel; + TButton *DisconnectButton; + TWSocket *SrvSocket; + TWSocket *CliSocket; + void __fastcall FormShow(TObject *Sender); + void __fastcall SrvSocketSessionAvailable(TObject *Sender, WORD Error); + void __fastcall CliSocketSessionClosed(TObject *Sender, WORD Error); + void __fastcall DisconnectButtonClick(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TServerForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TServerForm *ServerForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/tncli1.cpp b/lib/ics/Cpp/Internet/tncli1.cpp new file mode 100644 index 00000000..cc9ef9fa --- /dev/null +++ b/lib/ics/Cpp/Internet/tncli1.cpp @@ -0,0 +1,156 @@ +/*--------------------------------------------------------------------------- + +Program: TNCLIENT.PAS +Object: Delphi application which is a basic telnet program demonstrating + WSocket, TnCnx, TnEmulVT, EmulVT components. +Creation: July 22, 1997 (Delphi version) +Version: 2.05 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 05, 1997 Added display of windows socket version info. +Sep 23, 1997 Added local echo check box +Sep 24, 1997 V203. Added TnEmulVT1.RestoreOptions just before connecting + Added interactive support for telnet echo option. +Sep 25, 1997 V204. Port to C++Builder +Sep 27, 1997 Final port to C++Builder +Apr 11, 1998 V2.05 Adapted to BCB3 + +---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#pragma hdrstop + +#include "tnCli1.h" +//--------------------------------------------------------------------------- +#pragma link "WSocket" +#pragma link "Emulvt" +#pragma link "TnEmulvt" +#pragma link "EmulVT" +#pragma link "TnEmulVT" +#pragma resource "*.dfm" +TTelnetForm *TelnetForm; +//--------------------------------------------------------------------------- +__fastcall TTelnetForm::TTelnetForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::ConnectButtonClick(TObject *Sender) +{ + StatusLabel->Caption = "Connecting"; + Refresh(); + ConnectButton->Enabled = FALSE; + try { + TnEmulVT1->Disconnect(); + TnEmulVT1->Port = PortEdit->Text; + TnEmulVT1->HostName = HostNameEdit->Text; + // This can take quite a long time when hostname is unknown and + // if DNS feature is enabled (2 or 3 minutes !) + TnEmulVT1->Connect(); + } + __except (TRUE) { + StatusLabel->Caption = "Connection failed"; + ConnectButton->Enabled = TRUE; + } +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::DisconnectButtonClick(TObject *Sender) +{ + TnEmulVT1->Disconnect(); +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::TnEmulVT1SessionConnected(TObject *Sender) +{ + DisconnectButton->Enabled = TRUE; + StatusLabel->Caption = "Connected"; +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::TnEmulVT1SessionClosed(TObject *Sender) +{ + DisconnectButton->Enabled = FALSE; + ConnectButton->Enabled = TRUE; + StatusLabel->Caption = "Not connected"; +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::SendButtonClick(TObject *Sender) +{ + TnEmulVT1->SendStr("Hello world !\r\n"); + ActiveControl = TnEmulVT1; +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::RequestLocalEchoOffButtonClick(TObject *Sender) +{ + TnEmulVT1->RequestLocalEcho(FALSE); + ActiveControl = TnEmulVT1; +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::RequestLocalEchoOnButtonClick(TObject *Sender) +{ + TnEmulVT1->RequestLocalEcho(TRUE); + ActiveControl = TnEmulVT1; +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::LocalEchoCheckBoxClick(TObject *Sender) +{ + TnEmulVT1->LocalEcho = LocalEchoCheckBox->Checked; + ActiveControl = TnEmulVT1; +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::FormCreate(TObject *Sender) +{ + StatusLabel->Caption = "Not connected"; + TnEmulVT1->RestoreOptions(); +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::FormResize(TObject *Sender) +{ + TnEmulVT1->Width = ClientWidth; + TnEmulVT1->Height = ClientHeight - TnEmulVT1->Top; +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::FormShow(TObject *Sender) +{ + TWSAData WinsockData; + + WinsockData = WinsockInfo(); + StatusLabel->Caption = WinsockData.szDescription; +} +//--------------------------------------------------------------------------- +void __fastcall TTelnetForm::OptionsButtonClick(TObject *Sender) +{ + TnEmulVT1->HostName = HostNameEdit->Text; + TnEmulVT1->EditOptions(); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/tncli1.dfm b/lib/ics/Cpp/Internet/tncli1.dfm new file mode 100644 index 00000000..689e3c01 Binary files /dev/null and b/lib/ics/Cpp/Internet/tncli1.dfm differ diff --git a/lib/ics/Cpp/Internet/tncli1.h b/lib/ics/Cpp/Internet/tncli1.h new file mode 100644 index 00000000..386d8006 --- /dev/null +++ b/lib/ics/Cpp/Internet/tncli1.h @@ -0,0 +1,56 @@ +//--------------------------------------------------------------------------- +#ifndef tnCli1H +#define tnCli1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +#include "Emulvt.hpp" +#include "TnEmulvt.hpp" +#include "EmulVT.hpp" +#include "TnEmulVT.hpp" +//--------------------------------------------------------------------------- +class TTelnetForm : public TForm +{ +__published: // IDE-managed Components + TButton *ConnectButton; + TLabel *StatusLabel; + TButton *DisconnectButton; + TTnEmulVT *TnEmulVT1; + TLabel *Label1; + TLabel *Label2; + TEdit *HostNameEdit; + TEdit *PortEdit; + TButton *SendButton; + TCheckBox *LocalEchoCheckBox; + TButton *RequestLocalEchoOffButton; + TButton *RequestLocalEchoOnButton; + TButton *OptionsButton; + void __fastcall ConnectButtonClick(TObject *Sender); + + + void __fastcall DisconnectButtonClick(TObject *Sender); + + + void __fastcall TnEmulVT1SessionConnected(TObject *Sender); + void __fastcall TnEmulVT1SessionClosed(TObject *Sender); + + void __fastcall SendButtonClick(TObject *Sender); + void __fastcall RequestLocalEchoOffButtonClick(TObject *Sender); + void __fastcall RequestLocalEchoOnButtonClick(TObject *Sender); + void __fastcall LocalEchoCheckBoxClick(TObject *Sender); + void __fastcall FormCreate(TObject *Sender); + void __fastcall FormResize(TObject *Sender); + void __fastcall FormShow(TObject *Sender); + void __fastcall OptionsButtonClick(TObject *Sender); + +private: // User declarations +public: // User declarations + __fastcall TTelnetForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TTelnetForm *TelnetForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/tndemo1.cpp b/lib/ics/Cpp/Internet/tndemo1.cpp new file mode 100644 index 00000000..93cf2031 --- /dev/null +++ b/lib/ics/Cpp/Internet/tndemo1.cpp @@ -0,0 +1,159 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: How to use TnCnx (Telnet protocol) with a TMemo +Creation: December 14, 1997 +Version: 1.02 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 11, 1998 V1.01 Adapted for BCB3 +Jun 26, 1998 V1.02 Corrected offset in MemoAddLines. Thanks to Larry Jackson + who suggested code changes. + + + ---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#pragma hdrstop + +#include "TnDemo1.h" +//--------------------------------------------------------------------------- +#pragma link "TnCnx" +#pragma resource "*.dfm" +#define CR '\r' +#define LF '\n' +TTnDemoForm *TnDemoForm; +//--------------------------------------------------------------------------- +__fastcall TTnDemoForm::TTnDemoForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +// Display a message in the memo field, breaking with CR +void __fastcall MemoAddLines(TMemo *Memo, AnsiString *Msg) +{ + int Start, Stop; + + if (Memo->Lines->Count == 0) + Memo->Lines->Add(""); + + Start = 0; + Stop = Msg->Pos(CR); + if (Stop == 0) + Stop = Msg->Length(); + while (Start < Msg->Length()) { + Memo->Lines->Strings[Memo->Lines->Count - 1] = + Memo->Lines->Strings[Memo->Lines->Count - 1] + + Msg->SubString(Start, Stop - Start); + if ((*Msg)[Stop] == CR) { + Memo->Lines->Add(""); + SendMessage(Memo->Handle, WM_KEYDOWN, VK_UP, 1); + } + Start = Stop + 1; + if (Start > Msg->Length()) + break; + if ((*Msg)[Start] == LF) + Start++; + Stop = Start; + while ((Stop < Msg->Length()) && ((*Msg)[Stop] != CR)) + Stop++; + } +} +//--------------------------------------------------------------------------- +void __fastcall TTnDemoForm::ConnectButtonClick(TObject *Sender) +{ + TnCnx->Host = HostEdit->Text; + TnCnx->Port = PortEdit->Text; + TnCnx->TermType = "VT100"; + TnCnx->LocalEcho = FALSE; + TnCnx->Connect(); +} +//--------------------------------------------------------------------------- +void __fastcall TTnDemoForm::DisconnectButtonClick(TObject *Sender) +{ + TnCnx->Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TTnDemoForm::TnCnxSessionConnected(TTnCnx *Sender, WORD Error) +{ + DisplayMemo->Clear(); + InfoLabel->Caption = "Connected"; + DisplayMemo->Enabled = TRUE; + ConnectButton->Enabled = FALSE; + DisconnectButton->Enabled = TRUE; + ActiveControl = DisplayMemo; +} +//--------------------------------------------------------------------------- +void __fastcall TTnDemoForm::TnCnxSessionClosed(TTnCnx *Sender, WORD Error) +{ + InfoLabel->Caption = "Disconnected"; + DisplayMemo->Enabled = FALSE; + ConnectButton->Enabled = TRUE; + DisconnectButton->Enabled = FALSE; + ActiveControl = ConnectButton; +} +//--------------------------------------------------------------------------- +void __fastcall TTnDemoForm::TnCnxDataAvailableX(TTnCnx *Sender, PChar Buffer, + int Len) +{ + AnsiString Buf = Buffer; + MemoAddLines(DisplayMemo, &Buf); +} +//--------------------------------------------------------------------------- +void __fastcall TTnDemoForm::DisplayMemoKeyDown(TObject *Sender, WORD &Key, + TShiftState Shift) +{ + Key = 0; +} +//--------------------------------------------------------------------------- +void __fastcall TTnDemoForm::DisplayMemoKeyPress(TObject *Sender, char &Key) +{ + TnCnx->Send(&Key, 1); + if (Key == 13) { + Key = 10; + TnCnx->Send(&Key, 1); + } + Key = 0; +} +//--------------------------------------------------------------------------- + + +void __fastcall TTnDemoForm::TnCnxDataAvailable(TTnCnx *Sender, + Pointer Buffer, int Len) +{ + AnsiString Buf = (char *)Buffer; + MemoAddLines(DisplayMemo, &Buf); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/tndemo1.dfm b/lib/ics/Cpp/Internet/tndemo1.dfm new file mode 100644 index 00000000..2590b6d7 Binary files /dev/null and b/lib/ics/Cpp/Internet/tndemo1.dfm differ diff --git a/lib/ics/Cpp/Internet/tndemo1.h b/lib/ics/Cpp/Internet/tndemo1.h new file mode 100644 index 00000000..2306a1c5 --- /dev/null +++ b/lib/ics/Cpp/Internet/tndemo1.h @@ -0,0 +1,43 @@ +//--------------------------------------------------------------------------- +#ifndef TnDemo1H +#define TnDemo1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include "TnCnx.hpp" +//--------------------------------------------------------------------------- +class TTnDemoForm : public TForm +{ +__published: // IDE-managed Components + TMemo *DisplayMemo; + TPanel *Panel1; + TLabel *HostLabel; + TLabel *InfoLabel; + TLabel *PortLabel; + TEdit *HostEdit; + TButton *ConnectButton; + TButton *DisconnectButton; + TEdit *PortEdit; + TTnCnx *TnCnx; + void __fastcall ConnectButtonClick(TObject *Sender); + void __fastcall DisconnectButtonClick(TObject *Sender); + + void __fastcall TnCnxSessionConnected(TTnCnx *Sender, WORD Error); + void __fastcall TnCnxSessionClosed(TTnCnx *Sender, WORD Error); + void __fastcall TnCnxDataAvailableX(TTnCnx *Sender, PChar Buffer, int Len); + void __fastcall DisplayMemoKeyDown(TObject *Sender, WORD &Key, + TShiftState Shift); + void __fastcall DisplayMemoKeyPress(TObject *Sender, char &Key); + void __fastcall TnCnxDataAvailable(TTnCnx *Sender, Pointer Buffer, + int Len); +private: // User declarations +public: // User declarations + __fastcall TTnDemoForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TTnDemoForm *TnDemoForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/tnsrv1.cpp b/lib/ics/Cpp/Internet/tnsrv1.cpp new file mode 100644 index 00000000..cbf593b9 --- /dev/null +++ b/lib/ics/Cpp/Internet/tnsrv1.cpp @@ -0,0 +1,211 @@ +/*--------------------------------------------------------------------------- + +Copyright: Franois PIETTE +Creation: September 27, 1997 (from Delphi version created in april 1996) +Version: 1.01 +Description: TnSrv implement a (very basic) Telnet server (daemon) + Uses TWSocket to communicate with WinSock +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Mar 27, 1998 1.01 Adapted to C++Builder V3.0 + +---------------------------------------------------------------------------*/ +#include +#pragma hdrstop + +#include "tnsrv1.h" +//--------------------------------------------------------------------------- +#pragma link "WSocket" +#pragma resource "*.dfm" +TServerForm *ServerForm; +//--------------------------------------------------------------------------- +__fastcall TClient::TClient(TComponent* Owner) + : TObject() +{ + Application->CreateForm(__classid(TClientForm), &Form); +} +//--------------------------------------------------------------------------- +__fastcall TClient::~TClient() +{ + Form->Release(); +} +//--------------------------------------------------------------------------- +int __fastcall Pos(char Ch, char *Msg) +{ + char *p = Msg; + + while (*p && (*p != Ch)) + p++; + return((*p) ? (p - Msg) : 0); +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::Display(char *Msg) +{ + AnsiString *Temp; + + Temp = new AnsiString(Msg); + Display(Temp); + delete Temp; +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::Display(AnsiString Msg) +{ + Display(&Msg); +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::Display(AnsiString *Msg) +{ + int Start, Stop; + + if (Memo->Lines->Count == 0) + Memo->Lines->Add(""); + + Start = 1; + Stop = Msg->Pos("\r"); + if (Stop == 0) + Stop = Msg->Length() + 1; + while (Start <= Msg->Length()) { + Memo->Lines->Strings[Memo->Lines->Count - 1] = + Memo->Lines->Strings[Memo->Lines->Count - 1] + + Msg->SubString(Start, Stop - Start); + if ((Stop <= Msg->Length()) && ((*Msg)[Stop] == '\r')) { + Memo->Lines->Add(""); + SendMessage(Memo->Handle, WM_KEYDOWN, VK_UP, 1); + } + Start = Stop + 1; + if (Start > Msg->Length()) + break; + if ((*Msg)[Start] == '\n') + Start = Start + 1; + Stop = Start; + while ((Stop <= Msg->Length()) && ((*Msg)[Stop] != '\r')) + Stop++; + } +} +//--------------------------------------------------------------------------- +__fastcall TServerForm::TServerForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::FormCreate(TObject *Sender) +{ + Memo->Clear(); + Clients = new TList; + Display("Telnet Server Ready\r\n"); +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::FormActivate(TObject *Sender) +{ + static BOOL FirstTime = TRUE; + + if (FirstTime) { + FirstTime = FALSE; + SrvSocket->Listen(); + } +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::FormResize(TObject *Sender) +{ + Memo->Height = ClientHeight - QuitButton->Height - 20; + QuitButton->Left = ClientWidth - QuitButton->Width - 10; + AboutButton->Left = QuitButton->Left - AboutButton->Width - 10; + QuitButton->Top = ClientHeight - QuitButton->Height - 10; + AboutButton->Top = QuitButton->Top; +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::SrvSocketSessionAvailable(TObject *Sender, + WORD Error) +{ + int NewHSocket; + TSockAddrIn PeerName; + TClient *Client; + AnsiString Buffer; + + NewHSocket = SrvSocket->Accept(); + Client = new TClient(this); + Client->Form->Reference = Client; + Client->Form->AcceptForm = this; + Client->Form->Socket->Dup(NewHSocket); + Client->Form->Socket->GetPeerName(PeerName, sizeof(PeerName)); + Client->Peer = inet_ntoa(PeerName.sin_addr); + Buffer = "Remote " + Client->Peer + " connected\r\n"; + Display(Buffer); + Client->Form->Caption = Client->Peer; + Client->Form->Show(); + Clients->Add(Client); +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::WMDisconnect(TMessage Message) +{ + TClient *Client; + char *Why; + AnsiString Buffer; + + switch (Message.WParam) { + case DISCONNECT_SELF : Why = "has been disconnected"; break; + case DISCONNECT_REMOTE : Why = "has closed the connection"; break; + default : Why = "disconnected"; break; + } + + Client = (TClient *)(Message.LParam); + Buffer = "Remote " + Client->Peer + " " + Why + "\r\n"; + Display(Buffer); + Client->Form->Socket->Shutdown(2); + Client->Form->Socket->Close(); + Client->Form->Visible = FALSE; + Client->Form->Release(); + Clients->Remove(Client); +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::SrvSocketSessionClosed(TObject *Sender, WORD Error) +{ + Display("\r\n*** Remote has closed ***\r\n"); + if (SrvSocket->State == wsOpened) + SrvSocket->Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::QuitButtonClick(TObject *Sender) +{ + SrvSocket->Close(); + Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TServerForm::AboutButtonClick(TObject *Sender) +{ + Application->MessageBox( + "TnSRV V1.1 C++Builder 32 bit September 27, 1997\n\n" + "Free Software, Copyright Franois Piette\n\n" + "francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette\n", + "About TnSrv", MB_OK); +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Cpp/Internet/tnsrv1.dfm b/lib/ics/Cpp/Internet/tnsrv1.dfm new file mode 100644 index 00000000..eab16b4b Binary files /dev/null and b/lib/ics/Cpp/Internet/tnsrv1.dfm differ diff --git a/lib/ics/Cpp/Internet/tnsrv1.h b/lib/ics/Cpp/Internet/tnsrv1.h new file mode 100644 index 00000000..72189cc8 --- /dev/null +++ b/lib/ics/Cpp/Internet/tnsrv1.h @@ -0,0 +1,51 @@ +//--------------------------------------------------------------------------- +#ifndef tnsrv1H +#define tnsrv1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +#include "tnsrv2.h" +//--------------------------------------------------------------------------- +class TClient : public TObject +{ +public: + TClientForm *Form; + AnsiString Peer; + __fastcall TClient(TComponent *AOwner); + __fastcall ~TClient(); +}; +//--------------------------------------------------------------------------- +class TServerForm : public TForm +{ +__published: // IDE-managed Components + TMemo *Memo; + TWSocket *SrvSocket; + TButton *AboutButton; + TButton *QuitButton; + void __fastcall FormCreate(TObject *Sender); + void __fastcall FormActivate(TObject *Sender); + void __fastcall FormResize(TObject *Sender); + void __fastcall SrvSocketSessionAvailable(TObject *Sender, WORD Error); + void __fastcall SrvSocketSessionClosed(TObject *Sender, WORD Error); + void __fastcall QuitButtonClick(TObject *Sender); + void __fastcall AboutButtonClick(TObject *Sender); +private: // User declarations +public: // User declarations + TList *Clients; + void __fastcall Display(AnsiString *Msg); + void __fastcall Display(AnsiString Msg); + void __fastcall Display(char *Msg); + __fastcall TServerForm(TComponent* Owner); +protected: + void __fastcall WMDisconnect(TMessage Message); +BEGIN_MESSAGE_MAP + MESSAGE_HANDLER(WM_DISCONNECT, TMessage, WMDisconnect) +END_MESSAGE_MAP(TForm) +}; +//--------------------------------------------------------------------------- +extern TServerForm *ServerForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/tnsrv2.cpp b/lib/ics/Cpp/Internet/tnsrv2.cpp new file mode 100644 index 00000000..24cd142d --- /dev/null +++ b/lib/ics/Cpp/Internet/tnsrv2.cpp @@ -0,0 +1,237 @@ +/*--------------------------------------------------------------------------- + +Copyright: Franois PIETTE + francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette +Creation: September 27, 1997 (from Delphi version created in april 1996) +Description: TnSrv implement a (very basic) Telnet server (daemon) + Compatible with both Delphi 1 and Delphi 2 + Uses TWSocket to communicate with WinSock +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Mar 27, 1998 Adapted to C++Builder V3.0 + +---------------------------------------------------------------------------*/ +#include +#pragma hdrstop + +#include "tnsrv2.h" +//--------------------------------------------------------------------------- +#pragma link "WSocket" +#pragma resource "*.dfm" +TClientForm *ClientForm; +//--------------------------------------------------------------------------- +__fastcall TClientForm::TClientForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::FormCreate(TObject *Sender) +{ + Memo->Clear(); +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::Display(char *Msg) +{ + AnsiString *Temp; + + Temp = new AnsiString(Msg); + Display(Temp); + delete Temp; +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::Display(AnsiString *Msg) +{ + int Start, Stop; + + if (Memo->Lines->Count == 0) + Memo->Lines->Add(""); + + Start = 1; + Stop = Msg->Pos("\r"); + if (Stop == 0) + Stop = Msg->Length() + 1; + while (Start <= Msg->Length()) { + Memo->Lines->Strings[Memo->Lines->Count - 1] = + Memo->Lines->Strings[Memo->Lines->Count - 1] + + Msg->SubString(Start, Stop - Start); + if ((Stop <= Msg->Length()) && ((*Msg)[Stop] == '\r')) { + Memo->Lines->Add(""); + SendMessage(Memo->Handle, WM_KEYDOWN, VK_UP, 1); + } + Start = Stop + 1; + if (Start > Msg->Length()) + break; + if ((*Msg)[Start] == '\n') + Start = Start + 1; + Stop = Start; + while ((Stop <= Msg->Length()) && ((*Msg)[Stop] != '\r')) + Stop++; + } +} +//--------------------------------------------------------------------------- +// This is the command line interpreter. Should extend the code to support +// every command needed... +void __fastcall TClientForm::CommandInterpreter() +{ + // Process Command + Socket->SendStr("\r\nExecuting command '" + FCommand + "'...\r\n"); + + FCommand = FCommand.UpperCase(); + if (FCommand == "EXIT") + DisconnectButtonClick(this); + else if (FCommand == "HELP") + Socket->SendStr("List of commands:\r\n" + " Exit logoff from server\r\n" + " Help show this help screen\r\n"); + else + Socket->SendStr("Unknown command, ignoring"); + + Socket->SendStr("\r\n--> "); + FCommand = ""; +} +//--------------------------------------------------------------------------- +// Process each charcter received to do minimal line editing +void __fastcall TClientForm::ProcessChar(char Ch) +{ + if (Ch == '\b') { + if (FCommand.Length() > 0) { + FCommand.SetLength(FCommand.Length() - 1); + Socket->SendStr("\b \b"); + } + else + Socket->SendStr('\a'); + return; + } + else if ((Ch == '\n') && FRcvdCR) { + // Ignore LF just after CR (CR/LF is normal end of line) + FRcvdCR = FALSE; + return; + } + else if (Ch == '\r') { + FRcvdCR = TRUE; + CommandInterpreter(); + return; + } + else if (Ch == '\n') { + CommandInterpreter(); + return; + } + + // Ordinary character, put in buffer in some place left + FCommand = FCommand + Ch; + + // Echo to client + Socket->Send(&Ch, 1); +} +//--------------------------------------------------------------------------- +// Event handler for datavailable. Called each time some data is received +void __fastcall TClientForm::SocketDataAvailable(TObject *Sender, WORD Error) +{ + int Len; + char Buffer[256]; + TWSocket *Socket; + int I; + AnsiString Msg; + + Socket = (TWSocket *)Sender; + Len = Socket->Receive(Buffer, sizeof(Buffer)); + if (Len == 0) + // Remote has closed + Display("\r\n**** Remote has closed ****\r\n"); + else if (Len < 0) { + // An error has occured + if (Socket->LastError != WSAEWOULDBLOCK) { + Msg = "\r\n**** ERROR: " + IntToStr(Socket->LastError) + + " ****\r\n"; + Display(&Msg); + } + } + else { + Buffer[Len] = 0; + Display(Buffer); + for (I = 0; Buffer[I]; I++) + ProcessChar(Buffer[I]); + } +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::SocketSessionClosed(TObject *Sender, WORD Error) +{ + Display("\r\n**** Remote has closed ****\r\n"); + PostMessage(AcceptForm->Handle, WM_DISCONNECT, + DISCONNECT_REMOTE, + (LPARAM)Reference); +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::FormDestroy(TObject *Sender) +{ + Socket->Shutdown(2); + Socket->Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::DisconnectButtonClick(TObject *Sender) +{ + // Post a message to server form asking to disconnect the client + PostMessage(AcceptForm->Handle, WM_DISCONNECT, + DISCONNECT_SELF, + (LPARAM)Reference); +} +//--------------------------------------------------------------------------- + +void __fastcall TClientForm::FormShow(TObject *Sender) +{ + char *Buf = "Hello from TnSrv !\r\n--> "; + Socket->Send(Buf, strlen(Buf)); +} +//--------------------------------------------------------------------------- +void __fastcall TClientForm::SendButtonClick(TObject *Sender) +{ + AnsiString Buf; + + Buf = DataEdit->Text + "\r\n"; + Socket->Send(Buf.c_str(), Buf.Length()); + DataEdit->Text = ""; + ActiveControl = DataEdit; +} +//--------------------------------------------------------------------------- +// Adjust the position for each control in the form as the user resize it +void __fastcall TClientForm::FormResize(TObject *Sender) +{ + Memo->Height = ClientHeight - DisconnectButton->Height - + DataEdit->Height - 30; + DisconnectButton->Left = ClientWidth - DisconnectButton->Width - 10; + SendButton->Left = DisconnectButton->Left - SendButton->Width - 10; + DisconnectButton->Top = ClientHeight - DisconnectButton->Height - 10; + SendButton->Top = DisconnectButton->Top; + DataEdit->Top = DisconnectButton->Top - DataEdit->Height - 10; + DataEdit->Width = ClientWidth - 2 * DataEdit->Left; +} +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/tnsrv2.dfm b/lib/ics/Cpp/Internet/tnsrv2.dfm new file mode 100644 index 00000000..f44b3fa3 Binary files /dev/null and b/lib/ics/Cpp/Internet/tnsrv2.dfm differ diff --git a/lib/ics/Cpp/Internet/tnsrv2.h b/lib/ics/Cpp/Internet/tnsrv2.h new file mode 100644 index 00000000..f89fd124 --- /dev/null +++ b/lib/ics/Cpp/Internet/tnsrv2.h @@ -0,0 +1,46 @@ +//--------------------------------------------------------------------------- +#ifndef tnsrv2H +#define tnsrv2H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" + +#define WM_DISCONNECT (WM_USER + 2) +#define DISCONNECT_SELF 1 // Client form ask to disconnect +#define DISCONNECT_REMOTE 2 // Client user (remote) has disconnected +//--------------------------------------------------------------------------- +class TClientForm : public TForm +{ +__published: // IDE-managed Components + TWSocket *Socket; + TMemo *Memo; + TEdit *DataEdit; + TButton *SendButton; + TButton *DisconnectButton; + void __fastcall FormCreate(TObject *Sender); + void __fastcall DisconnectButtonClick(TObject *Sender); + void __fastcall SocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall SocketSessionClosed(TObject *Sender, WORD Error); + void __fastcall FormDestroy(TObject *Sender); + void __fastcall FormShow(TObject *Sender); + void __fastcall SendButtonClick(TObject *Sender); + void __fastcall FormResize(TObject *Sender); +private: // User declarations + AnsiString FCommand; + BOOL FRcvdCR; + void __fastcall CommandInterpreter(); + void __fastcall ProcessChar(char Ch); +public: // User declarations + TForm *AcceptForm; + void *Reference; + void __fastcall Display(char *Msg); + void __fastcall Display(AnsiString *Msg); + __fastcall TClientForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TClientForm *ClientForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/twschat1.cpp b/lib/ics/Cpp/Internet/twschat1.cpp new file mode 100644 index 00000000..65eea638 --- /dev/null +++ b/lib/ics/Cpp/Internet/twschat1.cpp @@ -0,0 +1,269 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: TWSChat shows how to use TWSocket to build a chat program +Creation: November 26, 1997 +Version: 1.03 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Jan 10, 1998 V1.02 Corrected CliWSocketDataAvailable +Apr 12, 1998 V1.03 Adapted for BCB3 + + ---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#pragma hdrstop + +#define ChatPort "2200" +#define TWSChatVersion 102 + +#include "twschat1.h" +//--------------------------------------------------------------------------- +#pragma link "WSocket" +#pragma resource "*.dfm" +TTWSChatForm *TWSChatForm; +//--------------------------------------------------------------------------- +__fastcall TTWSChatForm::TTWSChatForm(TComponent* Owner) + : TForm(Owner) +{ +} + +//--------------------------------------------------------------------------- +void __fastcall TTWSChatForm::StartServer() +{ + // Try to be a server + SrvWSocket->Port = ChatPort; + SrvWSocket->Proto = "tcp"; + SrvWSocket->Addr = "0.0.0.0"; + try { + SrvWSocket->Listen(); + RunningRadioButton->Checked = TRUE; + StoppedRadioButton->Checked = FALSE; + } catch (const ESocketException &E) { + // The socket is probably already in use + RunningRadioButton->Checked = FALSE; + StoppedRadioButton->Checked = TRUE; + if (strncmp(E.Message.c_str(), "Error 10048", 11) == 0) + DisplayMemo->Lines->Add("TWSChat already running as server"); + else + throw; + } +} +//--------------------------------------------------------------------------- +void __fastcall TTWSChatForm::FormShow(TObject *Sender) +{ + if (!Initialized) { + Initialized = TRUE; + StartServer(); + } +} +//--------------------------------------------------------------------------- +// The user has clicked on the 'connect' Button-> We will not connect here, +// but start the DNSLookup. We will receive a event when it is complete. +// The connection will be made at that later time. +void __fastcall TTWSChatForm::ConnectButtonClick(TObject *Sender) +{ + ConnectButton->Enabled = FALSE; + DisconnectButton->Enabled = TRUE; + CliWSocket->DnsLookup(ServerEdit->Text); +} +//--------------------------------------------------------------------------- +// This event handler is triggered when the DNS lookup process is finished +// successfully or not. If DNS lookud failed, display a message. +// If DNS lookup successfull, ask TWSocket to connect the server. +void __fastcall TTWSChatForm::CliWSocketDnsLookupDone(TObject *Sender, + WORD Error) +{ + if (Error != 0) { + // DNS Lookup has failed + DisplayMemo->Lines->Add("Server name unknown"); + ConnectButton->Enabled = TRUE; + DisconnectButton->Enabled = FALSE; + return; + } + + // DNS lookup successfull. Try to see if we are the server and we are + // trying to connect to ourself. Check loopback address, should also + // check the local IP address (returned by LocalIPList)... + if ((SrvWSocket->State == wsListening) && + (CliWSocket->DnsResult == "127.0.0.1")) { + DisplayMemo->Lines->Add("Your are trying to connect to yourself !"); + ConnectButton->Enabled = TRUE; + DisconnectButton->Enabled = FALSE; + return; + } + + // Transfert the IP address from DNSLookup to the TWSocket for connection + // We could use the hostname for the Addr property, TWSocket will do the + // DNS lookup for us, but it will block, maybe for a long time if DNS if + // down. + CliWSocket->Addr = CliWSocket->DnsResult; + CliWSocket->Port = ChatPort; + CliWSocket->Proto = "tcp"; + + // The connect method is asynchronous. You get the control back quickly + // The OnSessionConnected event will be eventually generated when the + // connection is established. + CliWSocket->Connect(); +} +//--------------------------------------------------------------------------- +// This event handler is triggered when the connection is established with +// the server. Enable the send button and the message edit box. +void __fastcall TTWSChatForm::CliWSocketSessionConnected(TObject *Sender, + WORD Error) +{ + if (Error == WSAECONNREFUSED) + DisplayMemo->Lines->Add("No server available"); + else if (Error != 0) + DisplayMemo->Lines->Add("Can't connect, error #" + IntToStr(Error)); + else { + DisplayMemo->Lines->Add("Connected"); + SendButton->Enabled = TRUE; + MessageEdit->Enabled = TRUE; + } +} +//--------------------------------------------------------------------------- +// This event is triggered when the client connection is closed, either +// by the client himself or by the local user pushing the disconnect button +void __fastcall TTWSChatForm::CliWSocketSessionClosed(TObject *Sender, + WORD Error) +{ + DisconnectButton->Enabled = FALSE; + ConnectButton->Enabled = TRUE; + if (SendButton->Enabled) { + SendButton->Enabled = FALSE; + MessageEdit->Enabled = FALSE; + DisplayMemo->Lines->Add("Disconnected"); + } +} +//--------------------------------------------------------------------------- +// This event is triggered when data has been received from the client. +// A little bit of work here because the data can comes fragmented or in big +// chunks with several client lines. So we assemble the data received in a +// buffer and check the buffer for complete lines (there can be no complete +// line, exactly one complete line, several complete lines and may be an +// incomplete line at the end. +void __fastcall TTWSChatForm::CliWSocketDataAvailable(TObject *Sender, + WORD Error) +{ + int Len; + int I; + + // Receive the data that has arrived, put it after the data already here + Len = CliWSocket->Receive(&RcvBuf[RcvLen], sizeof(RcvBuf) - RcvLen - 1); + if (Len <= 0) + return; + // Update our counter + RcvLen = RcvLen + Len; + // Place a null byte at the end of the buffer + RcvBuf[RcvLen] = 0; + + // Scan the buffer to process each complete line + while (TRUE) { + // find the terminating line feed + I = strchr(RcvBuf, 10) - RcvBuf; + if (I < 0) + break; // not found, incomplete line, break loop + // Replace the line feed by a nul char, truncating the line + RcvBuf[I] = 0; + // Display the truncated line + DisplayMemo->Lines->Add("Remote> " + StrPas(RcvBuf)); + // Restore the line feed } + RcvBuf[I] = 10; + // Was it the last line in the buffer ? + if (I >= (RcvLen - 1)) { + RcvLen = 0; + break; + } + // Not the last line, move the next one in front of buffer + memmove(RcvBuf, &RcvBuf[I + 1], RcvLen - I); + RcvLen = RcvLen - I; + } +} +//--------------------------------------------------------------------------- +// This event is triggered when we - as a server - have received a client +// connection request. We must accept the connection. Two cases: we are +// already busy with another client, or this is the first client connecting. +void __fastcall TTWSChatForm::SrvWSocketSessionAvailable(TObject *Sender, + WORD Error) +{ + if (CliWSocket->State == wsConnected) { + // We are already busy with a client. Use the TmpWSocket to send a + // busy message to the second client. Display a message to notify + // the user that someone is trying to contact him. + TmpWSocket->HSocket = SrvWSocket->Accept(); + DisplayMemo->Lines->Add("System> " + TmpWSocket->GetPeerAddr() + + " is trying to call you"); + TmpWSocket->SendStr("Busy ! Try later...\r\n" ); + TmpWSocket->Close(); + return; + } + + // This is our first client trying to connect, we accept + CliWSocket->HSocket = SrvWSocket->Accept(); + ConnectButton->Enabled = FALSE; + DisconnectButton->Enabled = TRUE; + SendButton->Enabled = TRUE; + MessageEdit->Enabled = TRUE; + DisplayMemo->Lines->Add("Connected with " + CliWSocket->GetPeerAddr()); +} +//--------------------------------------------------------------------------- +// The user clicked on the disconnect Button-> +void __fastcall TTWSChatForm::DisconnectButtonClick(TObject *Sender) +{ + CliWSocket->Close(); +} +//--------------------------------------------------------------------------- +// The user has clicked on the send Button-> Just send the data in the edit +// box and a CRLF pair to make a complete line. +void __fastcall TTWSChatForm::SendButtonClick(TObject *Sender) +{ + CliWSocket->SendStr(MessageEdit->Text + "\r\n"); + DisplayMemo->Lines->Add(" Local> " + MessageEdit->Text); +} +//--------------------------------------------------------------------------- +void __fastcall TTWSChatForm::StoppedRadioButtonClick(TObject *Sender) +{ + SrvWSocket->Close(); + RunningRadioButton->Checked = FALSE; + StoppedRadioButton->Checked = TRUE; +} +//--------------------------------------------------------------------------- +void __fastcall TTWSChatForm::RunningRadioButtonClick(TObject *Sender) +{ + if (SrvWSocket->State != wsListening) + StartServer(); +} +//--------------------------------------------------------------------------- + diff --git a/lib/ics/Cpp/Internet/twschat1.dfm b/lib/ics/Cpp/Internet/twschat1.dfm new file mode 100644 index 00000000..a6abff1f Binary files /dev/null and b/lib/ics/Cpp/Internet/twschat1.dfm differ diff --git a/lib/ics/Cpp/Internet/twschat1.h b/lib/ics/Cpp/Internet/twschat1.h new file mode 100644 index 00000000..1c1bb28d --- /dev/null +++ b/lib/ics/Cpp/Internet/twschat1.h @@ -0,0 +1,51 @@ +//--------------------------------------------------------------------------- +#ifndef twschat1H +#define twschat1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +class TTWSChatForm : public TForm +{ +__published: // IDE-managed Components + TPanel *Panel1; + TLabel *Label1; + TEdit *ServerEdit; + TButton *ConnectButton; + TButton *DisconnectButton; + TRadioButton *RunningRadioButton; + TRadioButton *StoppedRadioButton; + TPanel *Panel2; + TEdit *MessageEdit; + TButton *SendButton; + TMemo *DisplayMemo; + TWSocket *SrvWSocket; + TWSocket *CliWSocket; + TWSocket *TmpWSocket; + void __fastcall ConnectButtonClick(TObject *Sender); + void __fastcall CliWSocketDnsLookupDone(TObject *Sender, WORD Error); + void __fastcall CliWSocketSessionConnected(TObject *Sender, WORD Error); + void __fastcall CliWSocketSessionClosed(TObject *Sender, WORD Error); + void __fastcall CliWSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall SrvWSocketSessionAvailable(TObject *Sender, WORD Error); + void __fastcall DisconnectButtonClick(TObject *Sender); + void __fastcall SendButtonClick(TObject *Sender); + void __fastcall StoppedRadioButtonClick(TObject *Sender); + void __fastcall RunningRadioButtonClick(TObject *Sender); + void __fastcall FormShow(TObject *Sender); +private: // User declarations + char RcvBuf[1024]; + int RcvLen; + BOOL Initialized; + void __fastcall StartServer(); +public: // User declarations + __fastcall TTWSChatForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TTWSChatForm *TWSChatForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/udplstn1.cpp b/lib/ics/Cpp/Internet/udplstn1.cpp new file mode 100644 index 00000000..68c3fb1c --- /dev/null +++ b/lib/ics/Cpp/Internet/udplstn1.cpp @@ -0,0 +1,188 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Creation: Septmeber 28, 1997 (from Delphi version created april 4, 1997) +Version: 2.03 +Object: Demo program to show how to use TWSocket object to listen + UDP messages from the network. Use UDPSend or any other + program to send UDP messages. +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Apr 12, 1998 V2.02 Adapted for BCB3 +Aug 15, 1999 V2.03 Removed FormPos dependency. + Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). + +---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included + #define s_addr S_addr +#endif +#include +#include +#include +#pragma hdrstop + +#include "udplstn1.h" +#define SectionWindow "Window" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +#define SectionData "Data" +#define KeyPort "Port" +#define KeyServer "Server" +//--------------------------------------------------------------------------- +#pragma link "WSocket" +#pragma resource "*.dfm" +TMainForm *MainForm; +//--------------------------------------------------------------------------- +__fastcall TMainForm::TMainForm(TComponent* Owner) + : TForm(Owner) +{ + // Build Ini file name + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::FormShow(TObject *Sender) +{ + static BOOL FirstTime = TRUE; + TIniFile *IniFile; + + if (FirstTime) { + FirstTime = FALSE; + IniFile = new TIniFile(FIniFileName); + Top = IniFile->ReadInteger(SectionWindow, KeyTop, Top); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, Left); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + PortEdit->Text = IniFile->ReadString(SectionData, KeyPort, "600"); + ServerEdit->Text = IniFile->ReadString(SectionData, KeyServer, "0.0.0.0"); + delete IniFile; + DataAvailableLabel->Caption = ""; + InfoLabel->Caption = "Click on Start button"; + StartButton->Enabled = TRUE; + StopButton->Enabled = FALSE; + } +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::FormCloseQuery(TObject *Sender, bool &CanClose) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + IniFile->WriteString(SectionData, KeyPort, PortEdit->Text); + IniFile->WriteString(SectionData, KeyServer, ServerEdit->Text); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::StartButtonClick(TObject *Sender) +{ + FServerAddr = WSocketResolveHost(ServerEdit->Text); + if (FServerAddr.s_addr == htonl(INADDR_LOOPBACK)) { + // Replace loopback address by real localhost IP addr + FServerAddr = WSocketResolveHost(LocalHostName()); + } + WSocket->Proto = "udp"; + WSocket->Addr = "0.0.0.0"; + WSocket->Port = PortEdit->Text; + WSocket->Listen(); + PortEdit->Enabled = FALSE; + ServerEdit->Enabled = FALSE; + AnyServerCheckBox->Enabled = FALSE; +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::StopButtonClick(TObject *Sender) +{ + StartButton->Enabled = TRUE; + StopButton->Enabled = FALSE; + PortEdit->Enabled = TRUE; + ServerEdit->Enabled = TRUE; + AnyServerCheckBox->Enabled = TRUE; + WSocket->Close(); +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::WSocketSessionConnected(TObject *Sender, WORD Error) +{ + StartButton->Enabled = FALSE; + StopButton->Enabled = TRUE; + InfoLabel->Caption = "Connected"; +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::WSocketSessionClosed(TObject *Sender, WORD Error) +{ + StartButton->Enabled = TRUE; + StopButton->Enabled = FALSE; + PortEdit->Enabled = TRUE; + ServerEdit->Enabled = TRUE; + AnyServerCheckBox->Enabled = TRUE; + InfoLabel->Caption = "Disconnected"; + DataAvailableLabel->Caption = ""; +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::WSocketDataAvailable(TObject *Sender, WORD Error) +{ + char Buffer[1024]; + int Len; + TSockAddrIn Src; + int SrcLen; + + SrcLen = sizeof(Src); + Len = WSocket->ReceiveFrom(Buffer, sizeof(Buffer), Src, SrcLen); + if (Len >= 0) { + if ((FServerAddr.s_addr == INADDR_ANY) || + (FServerAddr.s_addr == Src.sin_addr.s_addr)) { + Buffer[Len] = 0; + DataAvailableLabel->Caption = + IntToStr(atoi(DataAvailableLabel->Caption.c_str()) + 1) + + ": " + Buffer; + } + } +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::AnyServerCheckBoxClick(TObject *Sender) +{ + if (AnyServerCheckBox->Checked) + ServerEdit->Text = "0.0.0.0"; +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::ServerEditChange(TObject *Sender) +{ + AnyServerCheckBox->Checked = (strcmp(Trim(ServerEdit->Text).c_str(), + "0.0.0.0") == 0); +} +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/udplstn1.dfm b/lib/ics/Cpp/Internet/udplstn1.dfm new file mode 100644 index 00000000..ae2aacdd Binary files /dev/null and b/lib/ics/Cpp/Internet/udplstn1.dfm differ diff --git a/lib/ics/Cpp/Internet/udplstn1.h b/lib/ics/Cpp/Internet/udplstn1.h new file mode 100644 index 00000000..d676bb03 --- /dev/null +++ b/lib/ics/Cpp/Internet/udplstn1.h @@ -0,0 +1,44 @@ +//--------------------------------------------------------------------------- +#ifndef udplstn1H +#define udplstn1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +class TMainForm : public TForm +{ +__published: // IDE-managed Components + TLabel *DataAvailableLabel; + TLabel *InfoLabel; + TLabel *Label1; + TLabel *Label2; + TButton *StartButton; + TButton *StopButton; + TEdit *PortEdit; + TEdit *ServerEdit; + TCheckBox *AnyServerCheckBox; + TWSocket *WSocket; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose); + void __fastcall StartButtonClick(TObject *Sender); + void __fastcall StopButtonClick(TObject *Sender); + void __fastcall WSocketSessionConnected(TObject *Sender, WORD Error); + void __fastcall WSocketSessionClosed(TObject *Sender, WORD Error); + void __fastcall WSocketDataAvailable(TObject *Sender, WORD Error); + void __fastcall AnyServerCheckBoxClick(TObject *Sender); + void __fastcall ServerEditChange(TObject *Sender); +private: // User declarations + AnsiString FIniFileName; + AnsiString FSectionName; + AnsiString FKeyName; + TInAddr FServerAddr; +public: // User declarations + __fastcall TMainForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TMainForm *MainForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Cpp/Internet/udpsend1.cpp b/lib/ics/Cpp/Internet/udpsend1.cpp new file mode 100644 index 00000000..0469e9c4 --- /dev/null +++ b/lib/ics/Cpp/Internet/udpsend1.cpp @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------- + +Author: Franois PIETTE +Description: Demo program to show how to use TWSocket object to broadcast + UDP messages on the network. Use UDPLstn to listen to those + UDP messages, or other UDP messages. +Creation: April 4, 1997 +Version: 2.03 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 06, 1997 Version 2.01 +Apr 12, 1998 V2.02 Adapted for BCB3 +Aug 15, 1999 V2.03 Removed FormPos dependency. + Adapted for BCB4 (Moved FIniFileName initialization from + FormCreate to form constructor). + +---------------------------------------------------------------------------*/ +#if __BORLANDC__ == 0x520 // BCB1 is BC5.20 BCB3 is BC5.30 + #define _WINSOCKAPI_ // Prevent winsock.h from being included +#endif +#include +#include +#pragma hdrstop + +#include "udpsend1.h" +#define SectionWindow "Window" +#define KeyTop "Top" +#define KeyLeft "Left" +#define KeyWidth "Width" +#define KeyHeight "Height" +#define SectionData "Data" +#define KeyPort "Port" +#define KeyMessage "Message" +//--------------------------------------------------------------------------- +#pragma link "WSocket" +#pragma resource "*.dfm" +TMainForm *MainForm; +//--------------------------------------------------------------------------- +__fastcall TMainForm::TMainForm(TComponent* Owner) + : TForm(Owner) +{ + // Build Ini file name + FIniFileName = LowerCase(ExtractFileName(Application->ExeName)); + FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini"; +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::FormShow(TObject *Sender) +{ + static BOOL FirstTime = TRUE; + TIniFile *IniFile; + + if (FirstTime) { + FirstTime = FALSE; + IniFile = new TIniFile(FIniFileName); + Top = IniFile->ReadInteger(SectionWindow, KeyTop, Top); + Left = IniFile->ReadInteger(SectionWindow, KeyLeft, Left); + Width = IniFile->ReadInteger(SectionWindow, KeyWidth, Width); + Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height); + PortEdit->Text = IniFile->ReadString(SectionData, KeyPort, "600"); + MessageEdit->Text = IniFile->ReadString(SectionData, KeyMessage, ""); + delete IniFile; + } +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::FormCloseQuery(TObject *Sender, bool &CanClose) +{ + TIniFile *IniFile; + + IniFile = new TIniFile(FIniFileName); + IniFile->WriteInteger(SectionWindow, KeyTop, Top); + IniFile->WriteInteger(SectionWindow, KeyLeft, Left); + IniFile->WriteInteger(SectionWindow, KeyWidth, Width); + IniFile->WriteInteger(SectionWindow, KeyHeight, Height); + IniFile->WriteString(SectionData, KeyPort, PortEdit->Text); + IniFile->WriteString(SectionData, KeyMessage, MessageEdit->Text); + delete IniFile; +} +//--------------------------------------------------------------------------- +void __fastcall TMainForm::SendButtonClick(TObject *Sender) +{ + WSocket->Proto = "udp"; + WSocket->Addr = "255.255.255.255"; + WSocket->Port = PortEdit->Text; + WSocket->Connect(); + WSocket->SendStr(MessageEdit->Text); + WSocket->Close(); +} +//--------------------------------------------------------------------------- \ No newline at end of file diff --git a/lib/ics/Cpp/Internet/udpsend1.dfm b/lib/ics/Cpp/Internet/udpsend1.dfm new file mode 100644 index 00000000..c019ef53 Binary files /dev/null and b/lib/ics/Cpp/Internet/udpsend1.dfm differ diff --git a/lib/ics/Cpp/Internet/udpsend1.h b/lib/ics/Cpp/Internet/udpsend1.h new file mode 100644 index 00000000..8e064316 --- /dev/null +++ b/lib/ics/Cpp/Internet/udpsend1.h @@ -0,0 +1,32 @@ +//--------------------------------------------------------------------------- +#ifndef udpsend1H +#define udpsend1H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include "WSocket.hpp" +//--------------------------------------------------------------------------- +class TMainForm : public TForm +{ +__published: // IDE-managed Components + TLabel *Label1; + TButton *SendButton; + TEdit *MessageEdit; + TEdit *PortEdit; + TWSocket *WSocket; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose); + void __fastcall SendButtonClick(TObject *Sender); +private: // User declarations + AnsiString FIniFileName; + AnsiString FSectionName; + AnsiString FKeyName; +public: // User declarations + __fastcall TMainForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern TMainForm *MainForm; +//--------------------------------------------------------------------------- +#endif diff --git a/lib/ics/Delphi/Internet/Cli7.dfm b/lib/ics/Delphi/Internet/Cli7.dfm new file mode 100644 index 00000000..4454b106 Binary files /dev/null and b/lib/ics/Delphi/Internet/Cli7.dfm differ diff --git a/lib/ics/Delphi/Internet/Cli7.pas b/lib/ics/Delphi/Internet/Cli7.pas new file mode 100644 index 00000000..f58fdcb9 --- /dev/null +++ b/lib/ics/Delphi/Internet/Cli7.pas @@ -0,0 +1,263 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: Simple client application demonstrating TWSocket object in action. +Creation: November 28, 1998 +Version: 1.01 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Mar 07, 1999 V1.01 Adapted for Delphi 1 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Cli7; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, IniFiles, WSocket; + +const + EndOfLine = #13#10; + +type + TCli7Form = class(TForm) + Panel1: TPanel; + PortEdit: TEdit; + Label6: TLabel; + HostNameEdit: TEdit; + Label1: TLabel; + DisplayMemo: TMemo; + ConnectButton: TButton; + LineOnButton: TButton; + LineOffButton: TButton; + DisconnectButton: TButton; + ReadLineButton: TButton; + WSocket1: TWSocket; + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure LineOnButtonClick(Sender: TObject); + procedure LineOffButtonClick(Sender: TObject); + procedure ConnectButtonClick(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure ReadLineButtonClick(Sender: TObject); + procedure WSocket1SessionConnected(Sender: TObject; Error: Word); + procedure WSocket1SessionClosed(Sender: TObject; Error: Word); + procedure WSocket1DataAvailable(Sender: TObject; Error: Word); + private + FIniFileName : String; + FInitialized : Boolean; + procedure Display(Msg : String); + end; + +var + Cli7Form: TCli7Form; + +implementation + +{$R *.DFM} +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyHostName = 'HostName'; + KeyPort = 'Port'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + HostNameEdit.Text := IniFile.ReadString(SectionData, KeyHostName, + 'localhost'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, + 'telnet'); + + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, (Screen.Width - Width) div 2); + + IniFile.Free; + DisplayMemo.Clear; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyHostName, HostNameEdit.Text); + IniFile.WriteString(SectionData, KeyPort, PortEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.Display(Msg : String); +begin + if DisplayMemo.Lines.Count > 200 then { Prevent TMemo overflow } + DisplayMemo.Clear; + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.LineOnButtonClick(Sender: TObject); +begin + WSocket1.LineMode := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.LineOffButtonClick(Sender: TObject); +begin + WSocket1.LineMode := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.ConnectButtonClick(Sender: TObject); +begin + WSocket1.Proto := 'tcp'; + WSocket1.Port := PortEdit.Text; + WSocket1.Addr := HostnameEdit.Text; + WSocket1.LineMode := TRUE; + WSocket1.LineEnd := EndOfLine; + WSocket1.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.DisconnectButtonClick(Sender: TObject); +begin + WSocket1.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.WSocket1SessionConnected(Sender: TObject; + Error: Word); +begin + if Error <> 0 then + Display('Connection failed, error #' + IntToStr(Error)) + else + Display('Session Connected.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.WSocket1SessionClosed(Sender: TObject; + Error: Word); +begin + Display('Session Closed.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RemoveEndOfLine(const Line : String) : String; +const + EOL : String = EndOfLine; { To make Delphi 1 happy } +begin + + if (Length(Line) >= Length(EndOfLine)) and + (StrLComp(@Line[1 + Length(Line) - Length(EndOfLine)], + @EOL[1], + Length(EndOfLine)) = 0) then + Result := Copy(Line, 1, Length(Line) - Length(EndOfLine)) + else + Result := Line; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.WSocket1DataAvailable(Sender: TObject; + Error: Word); +var + Buf : array [0..127] of char; + Len : Integer; +begin + Len := TCustomLineWSocket(Sender).Receive(@Buf, Sizeof(Buf) - 1); + if Len <= 0 then + Exit; + Buf[Len] := #0; + if not WSocket1.LineMode then + { Normal mode, data is just a buffer with all caracters } + Display('DataAvailable (' + IntToStr(Len) +' bytes): ''' + + StrPas(@Buf) + '''') + else begin + { Line mode, buffer contains exactly one line, terminated by the } + { LineEnd string, unless our buffer is too small in which case } + { the line is truncated. We'll get the end of line on the next } + { call to Receive. } + Display('Line: ''' + RemoveEndOfLine(StrPas(@Buf)) + ''''); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCli7Form.ReadLineButtonClick(Sender: TObject); +var + Buffer : String; +begin + Display('Waiting for a line... (Timeout = 10Sec)'); + WSocket1.ReadLine(10000, Buffer); + Display('Received line: ''' + RemoveEndOfLine(Buffer) + ''''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/CliDemo1.dfm b/lib/ics/Delphi/Internet/CliDemo1.dfm new file mode 100644 index 00000000..c47b29ad Binary files /dev/null and b/lib/ics/Delphi/Internet/CliDemo1.dfm differ diff --git a/lib/ics/Delphi/Internet/CliDemo1.pas b/lib/ics/Delphi/Internet/CliDemo1.pas new file mode 100644 index 00000000..3fe49dc5 --- /dev/null +++ b/lib/ics/Delphi/Internet/CliDemo1.pas @@ -0,0 +1,257 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstration for Client program using TWSocket. +Creation: 8 december 1997 +Version: 1.04 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 09, 1997 V1.01 Made it compatible with Delphi 1 +Jul 09, 1998 V1.02 Adapted for Delphi 4 +Dec 05, 1998 V1.03 Don't use TWait component +Dec 15, 2001 V1.04 Use LineMode + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit CliDemo1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, IniFiles, ExtCtrls, + { Don't forget to add your vc32 directory to Delphi library path } + WSocket; + +const + IniFileName = 'CliDemo.ini'; + +type + TClientForm = class(TForm) + CliSocket: TWSocket; + DisplayMemo: TMemo; + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + SendEdit: TEdit; + SendButton: TButton; + DisconnectButton: TButton; + PortEdit: TEdit; + ServerEdit: TEdit; + procedure DisconnectButtonClick(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure CliSocketDataAvailable(Sender: TObject; Error: Word); + procedure CliSocketSessionConnected(Sender: TObject; Error: Word); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormShow(Sender: TObject); + procedure Timer1Timer(Sender: TObject); + private + Buffer : array [0..1023] of char; + ConnectError : Word; + Initialized : Boolean; + procedure Display(Msg : String); + procedure ProcessCommand(Cmd : String); + end; + +var + ClientForm: TClientForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.DisconnectButtonClick(Sender: TObject); +begin + CliSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.SendButtonClick(Sender: TObject); +begin + if CliSocket.State <> wsConnected then begin + CliSocket.Proto := 'tcp'; + CliSocket.Port := PortEdit.Text; + CliSocket.Addr := ServerEdit.Text; + CliSocket.LineMode := TRUE; + CliSocket.LineEnd := #13#10; + CliSocket.Connect; + { Connect is asynchronous (non-blocking). We will wait while the } + { session is connecting or application terminated. } + while CliSocket.State in [wsConnecting] do begin + Application.ProcessMessages; + if Application.Terminated then + Exit; + end; + end; + { Be sure we are connected before sending anything } + if CliSocket.State = wsConnected then + CliSocket.SendStr(SendEdit.Text + #13 + #10); + ActiveControl := SendEdit; + SendEdit.SelectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.ProcessCommand(Cmd : String); +begin + { Here you should write your command interpreter. } + { For simplicity, we just display received command ! } + { First remove EndOfLine marker } + if (Length(Cmd) >= Length(CliSocket.LineEnd)) and + (Copy(Cmd, Length(Cmd) - Length(CliSocket.LineEnd) + 1, + Length(CliSocket.LineEnd)) = CliSocket.LineEnd) then + Cmd := Copy(Cmd, 1, Length(Cmd) - Length(CliSocket.LineEnd)); + { Then display in memo } + Display(Cmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; +begin + { We use line mode, we will receive a complete line } + Len := CliSocket.Receive(@Buffer, SizeOf(Buffer) - 1); + if Len <= 0 then + Exit; + + Buffer[Len] := #0; { Nul terminate } + ProcessCommand(StrPas(Buffer)); { Pass as string } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketSessionConnected( + Sender : TObject; + Error : Word); +begin + ConnectError := Error; + if Error <> 0 then + Display('Can''t connect, error #' + IntToStr(Error)) + else + DisconnectButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + DisconnectButton.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteInteger('Window', 'Top', Top); + IniFile.WriteInteger('Window', 'Left', Left); + IniFile.WriteInteger('Window', 'Width', Width); + IniFile.WriteInteger('Window', 'Height', Height); + IniFile.WriteString('Data', 'Server', ServerEdit.Text); + IniFile.WriteString('Data', 'Port', PortEdit.Text); + IniFile.WriteString('Data', 'Command', SendEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if Initialized then + Exit; + Initialized := TRUE; + IniFile := TIniFile.Create(IniFileName); + + Top := IniFile.ReadInteger('Window', 'Top', Top); + Left := IniFile.ReadInteger('Window', 'Left', Left); + Width := IniFile.ReadInteger('Window', 'Width', Width); + Height := IniFile.ReadInteger('Window', 'Height', Height); + + PortEdit.Text := IniFile.ReadString('Data', 'Port', 'telnet'); + ServerEdit.Text := IniFile.ReadString('Data', 'Server', 'localhost'); + SendEdit.Text := IniFile.ReadString('Data', 'Command', 'LASTNAME CAESAR'); + + IniFile.Free; + + DisplayMemo.Clear; + ActiveControl := SendEdit; + SendEdit.SelectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in our display memo. Delete lines to be sure to not } +{ overflow the memo which may have a limited capacity. } +procedure TClientForm.Display(Msg : String); +var + I : Integer; +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + for I := 1 to 50 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; +{$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); +{$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.Timer1Timer(Sender: TObject); +begin + if CliSocket.State = wsConnecting then + Exit; + + if CliSocket.State <> wsConnected then + SendButtonClick(nil) + else + DisconnectButtonClick(nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/Client7.dpr b/lib/ics/Delphi/Internet/Client7.dpr new file mode 100644 index 00000000..4ba287bd --- /dev/null +++ b/lib/ics/Delphi/Internet/Client7.dpr @@ -0,0 +1,12 @@ +program Client7; + +uses + Forms, + Cli7 in 'Cli7.pas' {Cli7Form}; + +{$R *.RES} + +begin + Application.CreateForm(TCli7Form, Cli7Form); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/ConFtp.dpr b/lib/ics/Delphi/Internet/ConFtp.dpr new file mode 100644 index 00000000..b2135081 --- /dev/null +++ b/lib/ics/Delphi/Internet/ConFtp.dpr @@ -0,0 +1,226 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: This demo shows how to use TFtpCli component within a console + mode application. It connect to ftp.microsoft.com and download + readme.txt from /softlib directory. The local file is ConFtp.txt. +Creation: Dec 24, 2001 +Version: 1.00 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +program ConFtp; + +{$IFDEF VER80} + Bomb('Sorry, Delphi 1 does not support console mode programs'); +{$ENDIF} +{$APPTYPE CONSOLE} +{$IFNDEF NOFORMS} + Bomb('Please add NOFORMS to your project defines'); +{$ENDIF} + +uses + Windows, Classes, SysUtils, Messages, FtpCli; + +const + ConFtpVersion = 100; + CopyRight = ' ConFtp (c) 2002 by Francois PIETTE. V1.00'; + +type + { We use TConApplication class (actually a component) to encapsulate all } + { the work to be done. This is easier because TFtpCli is event driven } + { and need methods (that is procedure of object) to handle events. } + TConApplication = class(TComponent) + protected + FFtpCli : TFtpClient; + FResult : Integer; + procedure FtpRequestDone(Sender : TObject; + RqType : TFtpRequest; + ErrorCode : Word); + procedure FtpDisplay(Sender : TObject; + var Msg : String); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Execute; + end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TConApplication.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FFtpCli := TFtpClient.Create(Self); + FResult := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TConApplication.Destroy; +begin + if Assigned(FFtpCli) then begin + FFtpCli.Destroy; + FFtpCli := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TConApplication.Execute; +begin + { Prepare connection to Ftp server } + FFtpCli.HostName := 'ftp.microsoft.com'; + FFtpCli.Port := 'ftp'; + FFtpCli.HostDirName := '/softlib'; + FFtpCli.HostFileName := 'readme.txt'; + FFtpCli.LocalFileName := 'ConFtp.txt'; + FFtpCli.Binary := TRUE; + FFtpCli.UserName := 'anonymous'; + FFtpCli.Password := 'your.name@your.domain.com'; + FFtpCli.OnDisplay := FtpDisplay; + FFtpCli.OnRequestDone := FtpRequestDone; + + { Delete existing file } + DeleteFile(FFtpCli.LocalFileName); + + { Start FTP transfert by connecting to the server } + WriteLn('Connecting to ', FFtpCli.HostName, '/', FFtpCli.Port); + FFtpCli.OpenAsync; + + { We need a message loop in order for windows message processing to work. } + { There is a message loop built into each TWSocket, so we use the one in } + { TFtpCli control socket. } + { MessageLoop will exit only when WM_QUIT message is posted. We do that } + { form the OnRequestDone event handler when the component has finished. } + FFtpCli.ControlSocket.MessageLoop; + WriteLn('Going back to the OS'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TConApplication.FtpDisplay(Sender: TObject; var Msg: String); +begin + WriteLn(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TConApplication.FtpRequestDone( + Sender : TObject; + RqType : TFtpRequest; + ErrorCode : Word); +var + EndFlag : Boolean; +begin + EndFlag := FALSE; + + { Check status } + if ErrorCode <> 0 then begin + WriteLn('Failed, error #' + IntToStr(ErrorCode)); + FFtpCli.Abort; + EndFlag := TRUE; + end + else begin + case RqType of + ftpOpenAsync : + begin + FFtpCli.UserAsync; + end; + ftpUserAsync : + begin + FFtpCli.PassAsync; + end; + ftpPassAsync : + begin + FFtpCli.CwdAsync; + end; + ftpCwdAsync : + begin + FFtpCli.TypeSetAsync; + end; + ftpTypeSetAsync: + begin + FFtpCli.GetAsync; + end; + ftpGetAsync : + begin + FResult := FFtpCli.StatusCode; + FFtpCli.QuitAsync; + end; + ftpQuitAsync : + begin + EndFlag := TRUE; + end; + else + begin + WriteLn('Unknown FtpRequest ' + IntToStr(Ord(RqType))); + EndFlag := TRUE; + end; + end; + end; + + { If something wrong or end of job, then go back to the OS } + if EndFlag then begin + if FResult = 226 then + WriteLn('Transfert succesful. File is ', FFtpCli.LocalFileName) + else + WriteLn('Transfert failed !'); + { Prompt the user } + WriteLn('Hit ENTER key to return quit program...'); + ReadLn; + { Break message loop we called from the execute method } + PostMessage(FFtpCli.ControlSocket.Handle, WM_QUIT, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +var + ConApp : TConApplication; +begin + WriteLn(CopyRight); + WriteLn; + ConApp := TConApplication.Create(nil); + try + ConApp.Execute; + finally + ConApp.Destroy; + end; +end. + diff --git a/lib/ics/Delphi/Internet/ConHttp.dpr b/lib/ics/Delphi/Internet/ConHttp.dpr new file mode 100644 index 00000000..4d55b59e --- /dev/null +++ b/lib/ics/Delphi/Internet/ConHttp.dpr @@ -0,0 +1,171 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: This demo shows how to use THttpCli component within a console + mode application. It Connect to www.borland.com and display + received (default) document on screen. +Creation: Apr 20, 2002 +Version: 1.00 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +program ConHttp; + +{$IFDEF VER80} + Bomb('Sorry, Delphi 1 does not support console mode programs'); +{$ENDIF} +{$APPTYPE CONSOLE} +{$IFNDEF NOFORMS} + Bomb('Please add NOFORMS to your project defines'); +{$ENDIF} + +uses + Windows, SysUtils, Classes, Messages, HttpProt; + +const + ConHttpVersion = 100; + CopyRight = ' ConHttp (c) 2002 by Francois PIETTE. V1.00'; + +type + { We use TConApplication class (actually a component) to encapsulate all } + { the work to be done. This is easier because THttpCli is event driven } + { and need methods (that is procedure of object) to handle events. } + TConApplication = class(TComponent) + protected + FHttpCli : THttpCli; + procedure HttpRequestDone(Sender : TObject; + RqType : THttpRequest; + ErrorCode : Word); + procedure HttpDocData(Sender : TObject; + Buffer : Pointer; + Len : Integer); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Execute; + end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TConApplication.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FHttpCli := THttpCli.Create(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TConApplication.Destroy; +begin + if Assigned(FHttpCli) then begin + FHttpCli.Destroy; + FHttpCli := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TConApplication.Execute; +var + Url : String; +begin + Url := 'http://www.borland.com'; + WriteLn('Querying ' + Url); + FHttpCli.URL := Url; + FHttpCli.OnRequestDone := HttpRequestDone; + FHttpCli.OnDocData := HttpDocData; + FHttpCli.GetASync; + { We need a message loop in order for windows message processing to work. } + { There is a message loop built into each TWSocket, so we use the one in } + { THttpCli control socket. } + { MessageLoop will exit only when WM_QUIT message is posted. We do that } + { form the OnRequestDone event handler when the component has finished. } + FHttpCli.CtrlSocket.MessageLoop; + WriteLn('Going back to the OS'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called each time THttpCli receive document data. } +procedure TConApplication.HttpDocData( + Sender : TObject; + Buffer : Pointer; + Len : Integer); +begin + while Len > 0 do begin { While we have bytes... } + Write(PChar(Buffer)^); { Write to standard output } + Buffer := PChar(Buffer) + 1; { Skip to next byte } + Len := Len - 1; { Count down the byte } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when THttpCli has finihed his work. } +procedure TConApplication.HttpRequestDone( + Sender : TObject; + RqType : THttpRequest; + ErrorCode : Word); +begin + { Check status } + if ErrorCode <> 0 then + WriteLn('Failed, error #' + IntToStr(ErrorCode)) + else + WriteLn('Done.'); + { Prompt the user } + WriteLn('Hit ENTER key to return quit program...'); + ReadLn; + { Break message loop we called from the execute method } + PostMessage(FHttpCli.CtrlSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +var + ConApp : TConApplication; +begin + WriteLn(CopyRight); + WriteLn; + ConApp := TConApplication.Create(nil); + try + ConApp.Execute; + finally + ConApp.Destroy; + end; +end. diff --git a/lib/ics/Delphi/Internet/ConSmtp.dpr b/lib/ics/Delphi/Internet/ConSmtp.dpr new file mode 100644 index 00000000..b91b7d20 --- /dev/null +++ b/lib/ics/Delphi/Internet/ConSmtp.dpr @@ -0,0 +1,291 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: This demo shows how to use TSmtpCli component within a console + mode application. It connect to your ISP server and mail a simple + message. See the "const" section below to change the SMTP setting + according to your situation. The mail message is also sent to + me (CCi). +Creation: Dec 24, 2001 +Version: 1.01 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Nov 11, 2002 V1.01 Changed MsgLine argument of SmtpGetData from PChar to + pointer to reflect component change. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +program ConSmtp; + +{$IFDEF VER80} + Bomb('Sorry, Delphi 1 does not support console mode programs'); +{$ENDIF} +{$APPTYPE CONSOLE} +{$IFNDEF NOFORMS} + Bomb('Please add NOFORMS to your project defines'); +{$ENDIF} + +uses + Windows, Classes, SysUtils, Messages, SmtpProt; + +const + ConSmtpVersion = 101; + CopyRight = ' ConSmtp (c) 2002 by Francois PIETTE. V1.01'; + +{ You *MUST* change the settings below so that your ISP mail server is } +{ addressed. If you don't change those settings, you'll use my ISP SMTP } +{ server which doesn't allow relaying. So you'll be rejected ! } +const + { This is your ISP SMPT server hostname } + YourSmtpServer = 'relay.skynet.be'; + { This is your sign on. Usually just your first and last names } + WhoYouAre = 'Firstname LastName'; + { And here your own email address } + YourEmailAddress = 'user.name@domain.name'; + { And finally the destination email address } + DestinationEmail = 'francois.piette@pophost.eunet.be'; + +type + { We use TConApplication class (actually a component) to encapsulate all } + { the work to be done. This is easier because TSmtpCli is event driven } + { and need methods (that is procedure of object) to handle events. } + TConApplication = class(TComponent) + protected + FSmtpCli : TSmtpCli; + FMessageBody : TStringList; + procedure SmtpRequestDone(Sender : TObject; + RqType : TSmtpRequest; + ErrorCode : Word); + procedure SmtpGetData(Sender : TObject; + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); + procedure SmtpResponse(Sender : TObject; + Msg : String); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Execute; + end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TConApplication.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FSmtpCli := TSmtpCli.Create(Self); + FMessageBody := TStringList.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TConApplication.Destroy; +begin + if Assigned(FSmtpCli) then begin + FSmtpCli.Destroy; + FSmtpCli := nil; + end; + if Assigned(FMessageBody) then begin + FMessageBody.Destroy; + FMessageBody := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TConApplication.Execute; +begin + { Prepare connection to SMTP server } + FSmtpCli.Host := YourSmtpServer; + FSmtpCli.Port := 'smtp'; + FSmtpCli.SignOn := WhoYouAre; + { Prepare message addressing (two recipients, one is CCi) } + FSmtpCli.FromName := YourEmailAddress; + FSmtpCli.RcptName.Clear; + FSmtpCli.RcptName.Add(DestinationEmail); + FSmtpCli.RcptName.Add('francois.piette@overbyte.be'); { This is CCi } + FSmtpCli.HdrSubject := 'ICS console mode SMTP demo is working'; + FSmtpCli.HdrTo := FSmtpCli.RcptName.Strings[0]; + FSmtpCli.HdrFrom := FSmtpCli.FromName; + + { Construct the message body } + FMessageBody.Clear; + FMessageBody.Add('Hello !'); + FMessageBody.Add(''); + FMessageBody.Add('This message has been sent by ConSmtp demo.'); + FMessageBody.Add(''); + FMessageBody.Add('--'); + FMessageBody.Add(FSmtpCli.SignOn); + FMessageBody.Add(FSmtpCli.FromName); + + { Prepare component event handlers } + FSmtpCli.OnRequestDone := SmtpRequestDone; + FSmtpCli.OnResponse := SmtpResponse; + FSmtpCli.OnGetData := SmtpGetData; + + WriteLn('> CONNECT ' + FSmtpCli.Host + '/' + FSmtpCli.Port); + FSmtpCli.Connect; + + { We need a message loop in order for windows message processing to work. } + { There is a message loop built into each TWSocket, so we use the one in } + { TSmtpCli control socket. } + { MessageLoop will exit only when WM_QUIT message is posted. We do that } + { form the OnRequestDone event handler when the component has finished. } + FSmtpCli.CtrlSocket.MessageLoop; + WriteLn('Going back to the OS'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TSmtpCli to get the next line of message } +{ body. It is called repeatedly to get all lines, until "More" argument } +{ is set to false. As we stored the message in a TStringList, we just have } +{ to read from it. Easy. We could also easily read from a file. } +procedure TConApplication.SmtpGetData( + Sender : TObject; + LineNum : Integer; { The line number, start from 0 } + MsgLine : Pointer; { Where to store each line (pointer to buffer) } + MaxLen : Integer; { SizeOf line buffer within smtp component } + var More : Boolean); { Return value to signal end of message body } +begin + if LineNum > FMessageBody.count then + More := FALSE + else + StrPLCopy(MsgLine, FMessageBody.Strings[LineNum - 1], MaxLen - 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called each time the smtp component receive an } +{ message from smtp server. } +procedure TConApplication.SmtpResponse(Sender: TObject; Msg: String); +begin + WriteLn('< ' + Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called each time smtp component has done a request } +{ We use it to start the next request because sending a smtp message } +{ require a few operations: connecting to server, sending helo message, } +{ sending originator, sending recipients, sending message body and finally } +{ disconnecting from server. There are of course optional request such as } +{ authentication. } +procedure TConApplication.SmtpRequestDone( + Sender : TObject; + RqType : TSmtpRequest; + ErrorCode : Word); +var + EndFlag : Boolean; +begin + EndFlag := FALSE; + case RqType of + smtpConnect: + begin + WriteLn('> HELO'); + if ErrorCode = 0 then + FSmtpCli.Helo; + end; + smtpHelo: + begin + WriteLn('> MAILFROM'); + if ErrorCode = 0 then + FSmtpCli.MailFrom; + end; + smtpMailFrom: + begin + WriteLn('> RCPTTO'); + if ErrorCode = 0 then + FSmtpCli.RcptTo; + end; + smtpRcptTo: + begin + WriteLn('> DATA'); + if ErrorCode = 0 then + FSmtpCli.Data; + end; + smtpData: + begin + WriteLn('> QUIT'); + if ErrorCode = 0 then + FSmtpCli.Quit; + end; + smtpQuit: + begin + WriteLn('Quit done'); + EndFlag := TRUE; + end; + else + begin + WriteLn('Unknown SmtpRequest ' + IntToStr(Ord(RqType))); + EndFlag := TRUE; + end; + end; + + { Check status } + if ErrorCode <> 0 then begin + WriteLn('Failed, error #' + IntToStr(ErrorCode)); + EndFlag := TRUE; + end; + + { If something wrong or end of job, then go back to the OS } + if EndFlag then begin + { Prompt the user } + WriteLn('Hit ENTER key to return quit program...'); + ReadLn; + { Break message loop we called from the execute method } + PostMessage(FSmtpCli.CtrlSocket.Handle, WM_QUIT, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +var + ConApp : TConApplication; +begin + WriteLn(CopyRight); + WriteLn; + ConApp := TConApplication.Create(nil); + try + ConApp.Execute; + finally + ConApp.Destroy; + end; +end. + diff --git a/lib/ics/Delphi/Internet/ConSrv1.dpr b/lib/ics/Delphi/Internet/ConSrv1.dpr new file mode 100644 index 00000000..4e4710ba --- /dev/null +++ b/lib/ics/Delphi/Internet/ConSrv1.dpr @@ -0,0 +1,354 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demo for a full blown multi-user server using TWSocket and + console mode. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: Feb 17, 1999 +Version: 1.01 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Sep 29, 1999 V1.01 Adapted for Delphi 5 + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +program ConSrv1; +{$IFDEF VER80} + Bomb('Sorry but Delphi 1 doesn''t support console mode program'); +{$ENDIF} +{$APPTYPE CONSOLE} +{$IFNDEF NOFORMS} + Bomb('This demo must be compiled with symbol NOFORMS defined.' + + 'Go to Delphi/Menu/Project/Options and in "Directories/Conditionals"' + + 'tab, add NOFORMS to the "define" edit box.'); +{$ENDIF} + +uses + Windows, + SysUtils, + Messages, + Classes, + WSocket, + WinSock, + ConSrv1S in 'ConSrv1S.pas', + ConSrv1C in 'ConSrv1C.pas'; + +const + Version = 101; + +type + TKeyboardThread = class (TThread) + public + procedure Execute; override; + end; + +// Declare all standard functions and procedures +function InitAplication : Boolean; forward; +procedure RunAplication; forward; +procedure CleanupAplication; forward; +procedure CleanupData; forward; +function CtrlHandlerRoutine(CtrlType : DWORD) : DWORD; stdcall; forward; +function MyWindowProc(ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; forward; +function CreateEvent(var MsgRec : TMsg) : Integer; forward; +procedure ClientDisconnectedEvent(var MsgRec : TMsg); forward; + +// Declare some global variables +var + SrvObject : TServerObject; + Terminated : Boolean; + hWndMain : HWND; + KbdThread : TKeyboardThread; + MyWindowClass : TWndClass = (style : 0; + lpfnWndProc : @MyWindowProc; + cbClsExtra : 0; + cbWndExtra : 0; + hInstance : 0; + hIcon : 0; + hCursor : 0; + hbrBackground : 0; + lpszMenuName : nil; + lpszClassName : 'MyWindowClass'); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Console mode applications do not receive keyboard messages as GUI apps. } +{ We use a thread to wait for keyboard activity and generate keyboard } +{ messages as in a GUI application. } +procedure TKeyboardThread.Execute; +var + hConsole : THandle; + Status : DWORD; + InputBuffer : TInputRecord; + KeyEvent : TKeyEventRecord; + Count : DWORD; +begin + hConsole := GetStdHandle(STD_INPUT_HANDLE); + while not Terminated do begin + Status := WaitForSingleObject(hConsole, 1000); + if Status = WAIT_OBJECT_0 then begin + if ReadConsoleInput(hConsole, InputBuffer, 1, Count) then begin + if InputBuffer.EventType = KEY_EVENT then begin +{$IFDEF VER90} { Delphi 2 } + KeyEvent := InputBuffer.KeyEvent; +{$ELSE} +{$IFDEF VER93} { Bcb 1 } + KeyEvent := InputBuffer.KeyEvent; +{$ELSE} +{$IFDEF VER100} { Delphi 3 } + KeyEvent := InputBuffer.KeyEvent; +{$ELSE} +{$IFDEF VER110} { Bcb 3 } + KeyEvent := InputBuffer.KeyEvent; +{$ELSE} +{$ENDIF} +{ Starting from Delphi 4 and Bcb4, they changed definition } + KeyEvent := InputBuffer.Event.KeyEvent; +{$ENDIF} +{$ENDIF} +{$ENDIF} + if KeyEvent.bKeyDown then begin + PostMessage(hWndMain, WM_KEYDOWN, + KeyEvent.wVirtualKeyCode, + KeyEvent.wRepeatCount + + (KeyEvent.wVirtualScanCode shl 16)); + end + else begin + PostMessage(hWndMain, WM_KEYUP, + KeyEvent.wVirtualKeyCode, + KeyEvent.wRepeatCount + + (KeyEvent.wVirtualScanCode shl 16)); + end; + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is a callback routine called by windows when some events occurs. } +{ We trap those events to close our application. } +function CtrlHandlerRoutine(CtrlType : DWORD) : DWORD; stdcall; +begin + case CtrlType of + CTRL_C_EVENT, // User hit CTRL-C + CTRL_BREAK_EVENT, // User hit CTRL-BREAK + CTRL_LOGOFF_EVENT, // User log off his session + CTRL_CLOSE_EVENT, // Close signal + CTRL_SHUTDOWN_EVENT : // Window shutdown signal + begin + Result := 1; + PostMessage(hWndMain, WM_QUIT, 0, 0); + end; + else + Result := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure ClientDisconnectedEvent(var MsgRec : TMsg); +var + Client : TClientObject; +begin + Client := TClientObject(MsgRec.lParam); + if Assigned(SrvObject) and Assigned(Client) then + SrvObject.DisconnectedClient(Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function CreateEvent(var MsgRec : TMsg) : Integer; +begin + try + SetConsoleTitle(PChar('ConSrv V' + Format('%d.%2d', + [Version div 100,Version mod 100]))); + WriteLn('Hit CTRL-C to return to system.'); + SrvObject := TServerObject.Create; + SrvObject.CtrlWindow := MsgRec.hwnd; + KbdThread := TKeyboardThread.Create(FALSE); + Result := 0; // Success + except + on E:Exception do begin + WriteLn('CreateEvent failed.'); + WriteLn('Exception ' + E.ClassName + ': ' + E.Message); + Result := -1; // Failure + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DisplayHelp; +begin + WriteLn('F1 Display this help text'); + WriteLn('F2 Display user list'); + WriteLn('CTRL-C Quit program'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure KeyDownEvent(MsgRec : TMsg); +var + Key : Integer; +begin + Key := MsgRec.wParam; + case Key of + VK_SHIFT, + VK_CONTROL, + VK_MENU: { Ignore }; + VK_F1: + DisplayHelp; + VK_F2: + SrvObject.DisplayClientList; + else + MessageBeep(MB_OK); + WriteLn('Unknown keyboard command. Type F1 to get help.'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function MyWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + MsgRec : TMsg; +begin + Result := 0; // This means we handled the message + try + MsgRec.hwnd := ahWnd; + MsgRec.message := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + + case auMsg of + WM_CLIENT_DISCONNECTED: + ClientDisconnectedEvent(MsgRec); + WM_CREATE: + Result := CreateEvent(MsgRec); + WM_CLOSE: + begin + WriteLn('Closing'); + DestroyWindow(ahWnd); + end; + WM_DESTROY: + begin + WriteLn('Destroying'); + CleanupData; + end; + WM_KEYDOWN: KeyDownEvent(MsgRec); +{ WM_KEYUP: writeln('WM_KEYUP'); } +{ WM_CHAR: writeln('WM_CHAR'); } + else + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + end; + except + on E:Exception do + WriteLn('Exception ' + E.ClassName + ': ' + E.Message); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function InitAplication : Boolean; +begin + Result := FALSE; + if Windows.RegisterClass(MyWindowClass) = 0 then + Exit; + hWndMain := CreateWindowEx(WS_EX_TOOLWINDOW, + MyWindowClass.lpszClassName, + '', { Window name } + WS_POPUP, { Window Style } + 0, 0, { X, Y } + 0, 0, { Width, Height } + 0, { hWndParent } + 0, { hMenu } + HInstance, { hInstance } + nil); { CreateParam } + if hWndMain = 0 then + Exit; + SetConsoleCtrlHandler(@CtrlHandlerRoutine, TRUE); + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure CleanupData; +begin + if Assigned(SrvObject) then begin + SrvObject.Destroy; + SrvObject := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure CleanupAplication; +begin + CleanupData; + if hWndMain <> 0 then begin + DestroyWindow(hWndMain); + hWndMain := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure RunAplication; +var + MsgRec : TMsg; +begin + { If GetMessage retrieves the WM_QUIT, the return value is FALSE and } + { the message loop is broken. } + while GetMessage(MsgRec, 0, 0, 0) do begin + TranslateMessage(MsgRec); + DispatchMessage(MsgRec) + end; + Terminated := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +begin + InitAplication; + try + RunAplication; + finally + CleanupAplication; + end; +end. diff --git a/lib/ics/Delphi/Internet/ConSrv1C.pas b/lib/ics/Delphi/Internet/ConSrv1C.pas new file mode 100644 index 00000000..fc7db4f0 --- /dev/null +++ b/lib/ics/Delphi/Internet/ConSrv1C.pas @@ -0,0 +1,181 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Client handling +Creation: Feb 17, 1999 +Version: 1.00 + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit ConSrv1C; + +interface + +uses + Windows, SysUtils, Messages, Classes, WSocket, WinSock; + +const + WM_CLIENT_DISCONNECTED = WM_USER + 1; + CmdPrompt = #13#10 + '--> '; + +type + // TClientObject handle a single client communication + TClientObject = class (TObject) + protected + FCliWSocket : TWSocket; + FCtrlWindow : HWND; + FCommand : array [0..2047] of char; + FCmdLen : Integer; + FPeerName : String; + procedure DataAvailableHandler(Sender : TObject; Error : Word); + procedure SessionClosedHandler(Sender : TObject; Error : Word); + procedure CommandInterpreter; + procedure TELNET_Interpreter(CommandVerb : String; + CommandTail : String); + public + constructor Create; virtual; + destructor Destroy; override; + procedure StartClient(ASocket : TSocket); + property CtrlWindow : HWND read FCtrlWindow + write FCtrlWindow; + property PeerName : String read FPeerName; + end; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TClientObject.Create; +begin + inherited Create; + FCliWSocket := TWSocket.Create(nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TClientObject.Destroy; +begin + if Assigned(FCliWSocket) then begin + FCliWSocket.Destroy; + FCliWSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientObject.StartClient(ASocket : TSocket); +begin + FCliWSocket.LineMode := TRUE; + FCliWSocket.LineEnd := #13#10; + FCliWSocket.LineEcho := TRUE; + FCliWSocket.LineEdit := TRUE; + FCliWSocket.OnDataAvailable := DataAvailableHandler; + FCliWSocket.OnSessionClosed := SessionClosedHandler; + FCliWSocket.HSocket := ASocket; + FPeerName := FCliWSocket.GetPeerAddr; + FCliWSocket.SendStr('Welcome to ConSrv' + CmdPrompt); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientObject.SessionClosedHandler(Sender : TObject; Error : Word); +begin + PostMessage(FCtrlWindow, WM_CLIENT_DISCONNECTED, 0, LParam(Self)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +// This handler is called each time we received a complete line from +// connected client (remember we use line mode) +procedure TClientObject.DataAvailableHandler(Sender : TObject; Error : Word); +begin + // Get data from socket component. We should receive a complete line. + FCmdLen := FCliWSocket.Receive(@FCommand, SizeOf(FCommand) - 1); + if FCmdLen <= 0 then + Exit; // No data available + if FCliWSocket.State <> wsConnected then + Exit; // Ignore any data received while closing + + // Remove trailling CR/LF, if any (could be missing if our buffer + // was too small) + while (FCmdLen > 0) and (FCommand[FCmdLen - 1] in [#13, #10]) do + Dec(FCmdLen); + FCommand[FCmdLen] := #0; + + // Interpret received command + CommandInterpreter; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the command line interpreter. Should extend the code to support } +{ every command needed... } +procedure TClientObject.CommandInterpreter; +var + CommandVerb : String; + CommandTail : String; + I, J : Integer; +begin + { Skip leading spaces } + I := 0; + while (I < FCmdLen) and (FCommand[I] in [' ', #9]) do + Inc(I); + + { Find separator and separe CommandVerb and CommandTail } + J := I; + while TRUE do begin + if (J >= FCmdLen) then begin + SetLength(CommandVerb, FCmdLen - I); + Move(FCommand[I], CommandVerb[1], Length(CommandVerb)); + CommandTail := ''; + break; + end; + + if FCommand[J] in [' ', #9, '/'] then begin + SetLength(CommandVerb, J - I); + Move(FCommand[I], CommandVerb[1], Length(CommandVerb)); + SetLength(CommandTail, FCmdLen - J); + Move(FCommand[J], CommandTail[1], Length(CommandTail)); + break; + end; + Inc(J); + end; + CommandVerb := UpperCase(CommandVerb); + + // We could chack which port we are servicing and call appropriate + // interpeter (telnet, smtp, pop3, nntp or any line oriented protocol) + TELNET_Interpreter(CommandVerb, CommandTail); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Not a real TELNET command interpreter, just enough to see how it could } +{ be implemented. } +procedure TClientObject.TELNET_Interpreter( + CommandVerb : String; + CommandTail : String); +begin + if Length(CommandVerb) > 0 then begin + FCliWSocket.SendStr(#13#10 + 'Executing command ''' + + CommandVerb + '''...' + #13#10); + + if CommandVerb = 'EXIT' then begin + PostMessage(FCtrlWindow, WM_CLIENT_DISCONNECTED, 0, LParam(Self)); +// FCliWSocket.Close; + Exit; + end + else if CommandVerb = 'HELP' then + FCliWSocket.SendStr('List of commands:' + #13#10 + + ' Exit logoff from server' + #13#10 + + ' Help show this help screen' + #13#10) + else + FCliWSocket.SendStr('Unknown command, ignoring'); + end; + + FCliWSocket.SendStr(CmdPrompt); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/ConSrv1S.pas b/lib/ics/Delphi/Internet/ConSrv1S.pas new file mode 100644 index 00000000..efe51cbf --- /dev/null +++ b/lib/ics/Delphi/Internet/ConSrv1S.pas @@ -0,0 +1,145 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Server handling +Creation: Feb 17, 1999 +Version: 1.00 + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit ConSrv1S; + +interface + +uses + Windows, SysUtils, Messages, Classes, WSocket, WinSock, ConSrv1C; + +type + // TServerObject handle all clients sessions + TServerObject = class (TObject) + protected + FSrvWSocket : TWSocket; + FCliList : TList; + FCtrlWindow : HWND; + procedure SessionAvailableHandler(Sender : TObject; Error : Word); + public + constructor Create; virtual; + destructor Destroy; override; + procedure StartServer; + procedure DisconnectedClient(Client : TClientObject); + procedure DisplayClientList; + property CtrlWindow : HWND read FCtrlWindow + write FCtrlWindow; + property SrvWSocket : TWSocket read FSrvWSocket; + end; + + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TServerObject.Create; +begin + inherited Create; + FCliList := TList.Create; + FSrvWSocket := TWSocket.Create(nil); + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TServerObject.Destroy; +begin + if Assigned(FSrvWSocket) then begin + FSrvWSocket.Destroy; + FSrvWSocket := nil; + end; + if Assigned(FCliList) then begin + FCliList.Destroy; + FCliList := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerObject.StartServer; +begin + FSrvWSocket.Proto := 'tcp'; + FSrvWSocket.Port := 'telnet'; + FSrvWSocket.Addr := '0.0.0.0'; + FSrvWSocket.OnSessionAvailable := SessionAvailableHandler; + FSrvWSocket.Listen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerObject.SessionAvailableHandler(Sender : TObject; Error : Word); +var + Client : TClientObject; + ASocket : TSocket; + SAddr : TSockAddrIn; + SAddrLen : integer; +begin + Write('Client connected: '); + + // Create a new object to handle client session + Client := TClientObject.Create; + + // Add to our client list + FCliList.Add(Client); + + // Accept the connection + ASocket := FSrvWSocket.Accept; + + // Determine who has connected before really starting the session + SAddrLen := SizeOf(SAddr); + WSocket_getpeername(ASocket, SAddr, SAddrLen); + WriteLn(WSocket_inet_ntoa(SAddr.sin_addr)); + WriteLn('There are: ', FCliList.Count, ' connected clients.'); + + // Startup the client connection (send banner) + Client.CtrlWindow := FCtrlWindow; + Client.StartClient(ASocket); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is called to disconnect a client and remove it from our } +{ client list. } +procedure TServerObject.DisconnectedClient(Client : TClientObject); +var + Index : Integer; +begin + + // Search client in our list + Index := FCliList.IndexOf(Client); + if Index < 0 then + Exit; // Not found already disconnected + + FCliList.Delete(Index); + WriteLn('Client ', Client.PeerName, ' disconnected'); + WriteLn('Remains: ', FCliList.Count, ' connected clients.'); + + // Then destroy client (this will abort the session if still active) + Client.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerObject.DisplayClientList; +var + I : Integer; + Client : TClientObject; +begin + WriteLn('There are ', FCliList.Count, ' connected client.'); + for I := 1 to FCliList.Count do begin + Client := FCliList.Items[I - 1]; + WriteLn(I:3, ': ', Client.PeerName); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/Del40Sam.bpg b/lib/ics/Delphi/Internet/Del40Sam.bpg new file mode 100644 index 00000000..0b33090d --- /dev/null +++ b/lib/ics/Delphi/Internet/Del40Sam.bpg @@ -0,0 +1,175 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = IcsDel40.bpl ThrdSrv.exe client5.exe Client7.exe concli1.exe \ + concli2.exe clidemo.exe ConFtp.exe ConHttp.exe ConSrv1.exe dnslook.exe \ + finger.exe ftpServ.exe ftpthrd.exe ftptst.exe httpasp.exe httpasy.exe \ + httpChk.exe Httpdmo.exe httpget.exe httppg.exe httpthrd.exe httptst.exe \ + MailRcv.exe MailSnd.exe md5test.exe MimeDemo.exe MimeTst.exe mtsrv.exe \ + MyYahoo.exe newsrdr.exe NsLookup.exe pingtst.exe Pop3Mime.exe Recv.exe \ + Sender.exe server5.exe srvdemo.exe SocksTst.exe DllTst1.exe TcpSrv.exe \ + tnclient.exe tndemo.exe tnsrv.exe twschat.exe udplstn.exe udpsend.exe \ + WebServ.exe IcsDll1.dll ConSmtp.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +ftptst.exe: ftptst.dpr + $(DCC) + +ftpServ.exe: ftpServ.dpr + $(DCC) + +IcsDel40.bpl: ..\VC32\IcsDel40.dpk + $(DCC) + +httptst.exe: httptst.dpr + $(DCC) + +httpthrd.exe: httpthrd.dpr + $(DCC) + +httpasp.exe: httpasp.dpr + $(DCC) + +httpasy.exe: httpasy.dpr + $(DCC) + +Httpdmo.exe: Httpdmo.dpr + $(DCC) + +httpget.exe: httpget.dpr + $(DCC) + +httppg.exe: httppg.dpr + $(DCC) + +md5test.exe: md5test.dpr + $(DCC) + +finger.exe: finger.dpr + $(DCC) + +client5.exe: client5.dpr + $(DCC) + +tnsrv.exe: tnsrv.dpr + $(DCC) + +concli1.exe: concli1.dpr + $(DCC) + +concli2.exe: concli2.dpr + $(DCC) + +dnslook.exe: dnslook.dpr + $(DCC) + +MimeDemo.exe: MimeDemo.dpr + $(DCC) + +MimeTst.exe: MimeTst.dpr + $(DCC) + +mtsrv.exe: mtsrv.dpr + $(DCC) + +newsrdr.exe: newsrdr.dpr + $(DCC) + +pingtst.exe: pingtst.dpr + $(DCC) + +Pop3Mime.exe: Pop3Mime.dpr + $(DCC) + +server5.exe: server5.dpr + $(DCC) + +tnclient.exe: tnclient.dpr + $(DCC) + +tndemo.exe: tndemo.dpr + $(DCC) + +twschat.exe: twschat.dpr + $(DCC) + +MailRcv.exe: MailRcv.dpr + $(DCC) + +MailSnd.exe: MailSnd.dpr + $(DCC) + +Sender.exe: Sender.dpr + $(DCC) + +Recv.exe: Recv.dpr + $(DCC) + +SocksTst.exe: SocksTst.dpr + $(DCC) + +Client7.exe: Client7.dpr + $(DCC) + +udpsend.exe: udpsend.dpr + $(DCC) + +udplstn.exe: udplstn.dpr + $(DCC) + +ftpthrd.exe: ftpthrd.dpr + $(DCC) + +srvdemo.exe: srvdemo.dpr + $(DCC) + +NsLookup.exe: NsLookup.dpr + $(DCC) + +ConSrv1.exe: ConSrv1.dpr + $(DCC) + +MyYahoo.exe: MyYahoo.dpr + $(DCC) + +TcpSrv.exe: TcpSrv.dpr + $(DCC) + +httpChk.exe: httpChk.dpr + $(DCC) + +WebServ.exe: WebServ.dpr + $(DCC) + +IcsDll1.dll: IcsDll1.dpr + $(DCC) + +DllTst1.exe: DllTst1.dpr + $(DCC) + +ThrdSrv.exe: ThrdSrv.dpr + $(DCC) + +clidemo.exe: clidemo.dpr + $(DCC) + +ConFtp.exe: ConFtp.dpr + $(DCC) + +ConHttp.exe: ConHttp.dpr + $(DCC) + +ConSmtp.exe: ConSmtp.dpr + $(DCC) + + diff --git a/lib/ics/Delphi/Internet/Del50Sam.bpg b/lib/ics/Delphi/Internet/Del50Sam.bpg new file mode 100644 index 00000000..f89c96d1 --- /dev/null +++ b/lib/ics/Delphi/Internet/Del50Sam.bpg @@ -0,0 +1,184 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = IcsDel50.bpl CliDemo.exe Client5.exe Client7.exe ConCli1.exe \ + ConCli2.exe ConSrv1.exe dnslook.exe Finger.exe FtpServ.exe FtpThrd.exe \ + FtpTst.exe Httpasp.exe Httpasy.exe HttpChk.exe HttpDmo.exe HttpGet.exe \ + HttpPg.exe HttpThrd.exe HttpTst.exe MailRcv.exe MailSnd.exe MD5Test.exe \ + MimeDemo.exe MimeTst.exe MtSrv.exe NewsRdr.exe NsLookup.exe PingTst.exe \ + Pop3Mime.exe Recv.exe Sender.exe Server5.exe SrvDemo.exe SocksTst.exe \ + TcpSrv.exe ThrdSrv.exe TnClient.exe TnDemo.exe TnSrv.exe TWSChat.exe UdpLstn.exe \ + UdpSend.exe DynCli.exe WebServ.exe DllTst1.exe IcsDll1.dll SrvTcp.exe \ + SvcTcp.exe IcsIsapi.dll ConHttp.exe ConSmtp.exe ConFtp.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +FtpTst.exe: FtpTst.dpr + $(DCC) + +FtpServ.exe: FtpServ.dpr + $(DCC) + +HttpTst.exe: HttpTst.dpr + $(DCC) + +HttpThrd.exe: HttpThrd.dpr + $(DCC) + +Httpasp.exe: Httpasp.dpr + $(DCC) + +Httpasy.exe: Httpasy.dpr + $(DCC) + +HttpDmo.exe: HttpDmo.dpr + $(DCC) + +HttpGet.exe: HttpGet.dpr + $(DCC) + +HttpPg.exe: HttpPg.dpr + $(DCC) + +MD5Test.exe: MD5Test.dpr + $(DCC) + +Finger.exe: Finger.dpr + $(DCC) + +CliDemo.exe: CliDemo.dpr + $(DCC) + +Client5.exe: Client5.dpr + $(DCC) + +TnSrv.exe: TnSrv.dpr + $(DCC) + +ConCli1.exe: ConCli1.dpr + $(DCC) + +ConCli2.exe: ConCli2.dpr + $(DCC) + +dnslook.exe: dnslook.dpr + $(DCC) + +MimeDemo.exe: MimeDemo.dpr + $(DCC) + +MimeTst.exe: MimeTst.dpr + $(DCC) + +MtSrv.exe: MtSrv.dpr + $(DCC) + +NewsRdr.exe: NewsRdr.dpr + $(DCC) + +PingTst.exe: PingTst.dpr + $(DCC) + +Pop3Mime.exe: Pop3Mime.dpr + $(DCC) + +Server5.exe: Server5.dpr + $(DCC) + +TnClient.exe: TnClient.dpr + $(DCC) + +TnDemo.exe: TnDemo.dpr + $(DCC) + +TWSChat.exe: TWSChat.dpr + $(DCC) + +MailRcv.exe: MailRcv.dpr + $(DCC) + +MailSnd.exe: MailSnd.dpr + $(DCC) + +Sender.exe: Sender.dpr + $(DCC) + +Recv.exe: Recv.dpr + $(DCC) + +SocksTst.exe: SocksTst.dpr + $(DCC) + +Client7.exe: Client7.dpr + $(DCC) + +UdpSend.exe: UdpSend.dpr + $(DCC) + +UdpLstn.exe: UdpLstn.dpr + $(DCC) + +FtpThrd.exe: FtpThrd.dpr + $(DCC) + +SrvDemo.exe: SrvDemo.dpr + $(DCC) + +NsLookup.exe: NsLookup.dpr + $(DCC) + +ConSrv1.exe: ConSrv1.dpr + $(DCC) + +TcpSrv.exe: TcpSrv.dpr + $(DCC) + +HttpChk.exe: HttpChk.dpr + $(DCC) + +IcsDel50.bpl: ..\VC32\IcsDel50.dpk + $(DCC) + +DynCli.exe: DynCli.dpr + $(DCC) + +WebServ.exe: WebServ.dpr + $(DCC) + +DllTst1.exe: DllTst1.dpr + $(DCC) + +IcsDll1.dll: IcsDll1.dpr + $(DCC) + +SrvTcp.exe: SrvTcp.dpr + $(DCC) + +SvcTcp.exe: SvcTcp.dpr + $(DCC) + +IcsIsapi.dll: IcsIsapi.dpr + $(DCC) + +ThrdSrv.exe: ThrdSrv.dpr + $(DCC) + +ConHttp.exe: ConHttp.dpr + $(DCC) + +ConSmtp.exe: ConSmtp.dpr + $(DCC) + +ConFtp.exe: ConFtp.dpr + $(DCC) + + diff --git a/lib/ics/Delphi/Internet/Del60Sam.bpg b/lib/ics/Delphi/Internet/Del60Sam.bpg new file mode 100644 index 00000000..085ad7ba --- /dev/null +++ b/lib/ics/Delphi/Internet/Del60Sam.bpg @@ -0,0 +1,184 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = IcsDel60.bpl CliDemo.exe Client5.exe Client7.exe ConCli1.exe \ + ConCli2.exe ConSrv1.exe DllTst1.exe Dnslook.exe DynCli.exe Finger.exe \ + FtpServ.exe FtpThrd.exe FtpTst.exe HttpAsp.exe HttpAsy.exe HttpChk.exe \ + HttpDmo.exe HttpGet.exe HttpPg.exe HttpThrd.exe HttpTst.exe IcsDll1.dll \ + IcsIsapi.dll MailRcv.exe MailSnd.exe MD5Test.exe MimeDemo.exe MimeTst.exe \ + MtSrv.exe NewsRdr.exe NsLookup.exe PingTst.exe Pop3Mime.exe Recv.exe Sender.exe \ + Server5.exe SocksTst.exe SrvTcp.exe SrvDemo.exe SvcTcp.exe TcpSrv.exe \ + ThrdSrv.exe TnClient.exe TnDemo.exe TnSrv.exe TWSChat.exe UdpLstn.exe \ + UdpSend.exe WebServ.exe ConSmtp.exe ConHttp.exe ConFtp.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +FtpTst.exe: FtpTst.dpr + $(DCC) + +FtpServ.exe: FtpServ.dpr + $(DCC) + +HttpTst.exe: HttpTst.dpr + $(DCC) + +HttpThrd.exe: HttpThrd.dpr + $(DCC) + +HttpAsp.exe: HttpAsp.dpr + $(DCC) + +HttpAsy.exe: HttpAsy.dpr + $(DCC) + +HttpDmo.exe: HttpDmo.dpr + $(DCC) + +HttpGet.exe: HttpGet.dpr + $(DCC) + +HttpPg.exe: HttpPg.dpr + $(DCC) + +MD5Test.exe: MD5Test.dpr + $(DCC) + +Finger.exe: Finger.dpr + $(DCC) + +CliDemo.exe: CliDemo.dpr + $(DCC) + +Client5.exe: Client5.dpr + $(DCC) + +TnSrv.exe: TnSrv.dpr + $(DCC) + +ConCli1.exe: ConCli1.dpr + $(DCC) + +ConCli2.exe: ConCli2.dpr + $(DCC) + +Dnslook.exe: Dnslook.dpr + $(DCC) + +MimeDemo.exe: MimeDemo.dpr + $(DCC) + +MimeTst.exe: MimeTst.dpr + $(DCC) + +MtSrv.exe: MtSrv.dpr + $(DCC) + +NewsRdr.exe: NewsRdr.dpr + $(DCC) + +PingTst.exe: PingTst.dpr + $(DCC) + +Pop3Mime.exe: Pop3Mime.dpr + $(DCC) + +Server5.exe: Server5.dpr + $(DCC) + +TnClient.exe: TnClient.dpr + $(DCC) + +TnDemo.exe: TnDemo.dpr + $(DCC) + +TWSChat.exe: TWSChat.dpr + $(DCC) + +MailRcv.exe: MailRcv.dpr + $(DCC) + +MailSnd.exe: MailSnd.dpr + $(DCC) + +Sender.exe: Sender.dpr + $(DCC) + +Recv.exe: Recv.dpr + $(DCC) + +SocksTst.exe: SocksTst.dpr + $(DCC) + +Client7.exe: Client7.dpr + $(DCC) + +UdpSend.exe: UdpSend.dpr + $(DCC) + +UdpLstn.exe: UdpLstn.dpr + $(DCC) + +FtpThrd.exe: FtpThrd.dpr + $(DCC) + +SrvDemo.exe: SrvDemo.dpr + $(DCC) + +NsLookup.exe: NsLookup.dpr + $(DCC) + +ConSrv1.exe: ConSrv1.dpr + $(DCC) + +TcpSrv.exe: TcpSrv.dpr + $(DCC) + +HttpChk.exe: HttpChk.dpr + $(DCC) + +IcsDel60.bpl: ..\VC32\IcsDel60.dpk + $(DCC) + +DynCli.exe: DynCli.dpr + $(DCC) + +WebServ.exe: WebServ.dpr + $(DCC) + +DllTst1.exe: DllTst1.dpr + $(DCC) + +IcsDll1.dll: IcsDll1.dpr + $(DCC) + +SrvTcp.exe: SrvTcp.dpr + $(DCC) + +SvcTcp.exe: SvcTcp.dpr + $(DCC) + +IcsIsapi.dll: IcsIsapi.dpr + $(DCC) + +ThrdSrv.exe: ThrdSrv.dpr + $(DCC) + +ConSmtp.exe: ConSmtp.dpr + $(DCC) + +ConHttp.exe: ConHttp.dpr + $(DCC) + +ConFtp.exe: ConFtp.dpr + $(DCC) + + diff --git a/lib/ics/Delphi/Internet/Del70Sam.bpg b/lib/ics/Delphi/Internet/Del70Sam.bpg new file mode 100644 index 00000000..65a3876e --- /dev/null +++ b/lib/ics/Delphi/Internet/Del70Sam.bpg @@ -0,0 +1,184 @@ +#------------------------------------------------------------------------------ +VERSION = BWS.01 +#------------------------------------------------------------------------------ +!ifndef ROOT +ROOT = $(MAKEDIR)\.. +!endif +#------------------------------------------------------------------------------ +MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$** +DCC = $(ROOT)\bin\dcc32.exe $** +BRCC = $(ROOT)\bin\brcc32.exe $** +#------------------------------------------------------------------------------ +PROJECTS = IcsDel70.bpl CliDemo.exe Client5.exe Client7.exe ConCli1.exe \ + ConCli2.exe ConFtp.exe ConSmtp.exe ConHttp.exe ConSrv1.exe DllTst1.exe \ + Dnslook.exe DynCli.exe Finger.exe FtpServ.exe FtpThrd.exe FtpTst.exe \ + HttpAsp.exe HttpAsy.exe HttpChk.exe HttpDmo.exe HttpGet.exe HttpPg.exe \ + HttpThrd.exe HttpTst.exe IcsDll1.dll IcsIsapi.dll MailRcv.exe MailSnd.exe \ + MD5Test.exe MimeDemo.exe MimeTst.exe MtSrv.exe NewsRdr.exe NsLookup.exe \ + PingTst.exe Pop3Mime.exe Recv.exe Sender.exe Server5.exe SocksTst.exe \ + SrvTcp.exe SrvDemo.exe SvcTcp.exe TcpSrv.exe ThrdSrv.exe TnClient.exe \ + TnDemo.exe TnSrv.exe TWSChat.exe UdpLstn.exe UdpSend.exe WebServ.exe +#------------------------------------------------------------------------------ +default: $(PROJECTS) +#------------------------------------------------------------------------------ + +FtpTst.exe: FtpTst.dpr + $(DCC) + +FtpServ.exe: FtpServ.dpr + $(DCC) + +HttpTst.exe: HttpTst.dpr + $(DCC) + +HttpThrd.exe: HttpThrd.dpr + $(DCC) + +HttpAsp.exe: HttpAsp.dpr + $(DCC) + +HttpAsy.exe: HttpAsy.dpr + $(DCC) + +HttpDmo.exe: HttpDmo.dpr + $(DCC) + +HttpGet.exe: HttpGet.dpr + $(DCC) + +HttpPg.exe: HttpPg.dpr + $(DCC) + +MD5Test.exe: MD5Test.dpr + $(DCC) + +Finger.exe: Finger.dpr + $(DCC) + +CliDemo.exe: CliDemo.dpr + $(DCC) + +Client5.exe: Client5.dpr + $(DCC) + +TnSrv.exe: TnSrv.dpr + $(DCC) + +ConCli1.exe: ConCli1.dpr + $(DCC) + +ConCli2.exe: ConCli2.dpr + $(DCC) + +Dnslook.exe: Dnslook.dpr + $(DCC) + +MimeDemo.exe: MimeDemo.dpr + $(DCC) + +MimeTst.exe: MimeTst.dpr + $(DCC) + +MtSrv.exe: MtSrv.dpr + $(DCC) + +NewsRdr.exe: NewsRdr.dpr + $(DCC) + +PingTst.exe: PingTst.dpr + $(DCC) + +Pop3Mime.exe: Pop3Mime.dpr + $(DCC) + +Server5.exe: Server5.dpr + $(DCC) + +TnClient.exe: TnClient.dpr + $(DCC) + +TnDemo.exe: TnDemo.dpr + $(DCC) + +TWSChat.exe: TWSChat.dpr + $(DCC) + +MailRcv.exe: MailRcv.dpr + $(DCC) + +MailSnd.exe: MailSnd.dpr + $(DCC) + +Sender.exe: Sender.dpr + $(DCC) + +Recv.exe: Recv.dpr + $(DCC) + +SocksTst.exe: SocksTst.dpr + $(DCC) + +Client7.exe: Client7.dpr + $(DCC) + +UdpSend.exe: UdpSend.dpr + $(DCC) + +UdpLstn.exe: UdpLstn.dpr + $(DCC) + +FtpThrd.exe: FtpThrd.dpr + $(DCC) + +SrvDemo.exe: SrvDemo.dpr + $(DCC) + +NsLookup.exe: NsLookup.dpr + $(DCC) + +ConSrv1.exe: ConSrv1.dpr + $(DCC) + +TcpSrv.exe: TcpSrv.dpr + $(DCC) + +HttpChk.exe: HttpChk.dpr + $(DCC) + +IcsDel70.bpl: ..\vc32\IcsDel70.dpk + $(DCC) + +DynCli.exe: DynCli.dpr + $(DCC) + +WebServ.exe: WebServ.dpr + $(DCC) + +DllTst1.exe: DllTst1.dpr + $(DCC) + +IcsDll1.dll: IcsDll1.dpr + $(DCC) + +SrvTcp.exe: SrvTcp.dpr + $(DCC) + +SvcTcp.exe: SvcTcp.dpr + $(DCC) + +IcsIsapi.dll: IcsIsapi.dpr + $(DCC) + +ThrdSrv.exe: ThrdSrv.dpr + $(DCC) + +ConSmtp.exe: ConSmtp.dpr + $(DCC) + +ConHttp.exe: ConHttp.dpr + $(DCC) + +ConFtp.exe: ConFtp.dpr + $(DCC) + + diff --git a/lib/ics/Delphi/Internet/DllTst1.dpr b/lib/ics/Delphi/Internet/DllTst1.dpr new file mode 100644 index 00000000..d450f7bb --- /dev/null +++ b/lib/ics/Delphi/Internet/DllTst1.dpr @@ -0,0 +1,13 @@ +program DllTst1; + +uses + Forms, + DllTst_1 in 'DllTst_1.pas' {DllTestForm}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TDllTestForm, DllTestForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/DllTst_1.dfm b/lib/ics/Delphi/Internet/DllTst_1.dfm new file mode 100644 index 00000000..3814c354 Binary files /dev/null and b/lib/ics/Delphi/Internet/DllTst_1.dfm differ diff --git a/lib/ics/Delphi/Internet/DllTst_1.pas b/lib/ics/Delphi/Internet/DllTst_1.pas new file mode 100644 index 00000000..03a208c8 --- /dev/null +++ b/lib/ics/Delphi/Internet/DllTst_1.pas @@ -0,0 +1,210 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: April 02, 2000 +Description: This is a demonstration program for IcsDll1.dll. It will + dynamically load the DLL, get IcsDllDemo entry point and call + it. Then display result from DLL. +Version: 1.00 +EMail: francois.piette@pophost.eunet.be francois.piette@swing.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit DllTst_1; + +{$IFDEF VER80} +'Sorry, this is a demo program calling a 32 bit DLL.' +'Upgrade to latest Delphi version to use it.' +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + IniFiles, StdCtrls, ExtCtrls, Buttons; + +type + TIcsDllDemo = function (HostName : PChar; + Port : PChar; + Buffer : PChar; + BufSize : PInteger): Integer; stdcall; + + TDllTestForm = class(TForm) + ToolsPanel: TPanel; + DisplayMemo: TMemo; + HostnameEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + PortEdit: TEdit; + CallDllButton: TButton; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure CallDllButtonClick(Sender: TObject); + procedure FormDestroy(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + public + procedure Display(Msg : String); + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + DllTestForm : TDllTestForm; + DllHandle : THandle; + IcsDllDemo : TIcsDllDemo; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.FormDestroy(Sender: TObject); +begin + if DllHandle <> 0 then begin + FreeLibrary(DllHandle); + DllHandle := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + IniFile.Destroy; + DisplayMemo.Clear; + + DllHandle := LoadLibrary('IcsDLL1.dll'); + if DllHandle = 0 then begin + Application.MessageBox('ICSDLL1.DLL not found', 'Error', MB_OK); + Application.Terminate; + Exit; + end; + + IcsDllDemo := GetProcAddress(DllHandle, 'IcsDllDemo'); + if @IcsDllDemo = nil then begin + Application.MessageBox('IcsDllDemo not found (ICSDLL1.DLL)', + 'Error', MB_OK); + Application.Terminate; + Exit; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.Display(Msg : String); +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + while DisplayMemo.Lines.Count > 200 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDllTestForm.CallDllButtonClick(Sender: TObject); +var + Buffer : String; + BufSize : Integer; + Status : Integer; +begin + Display('Calling DLL...'); + BufSize := 100; + SetLength(Buffer, BufSize); + Status := IcsDllDemo(PChar(HostnameEdit.Text), + PChar(PortEdit.Text), + @Buffer[1], @BufSize); + SetLength(Buffer, BufSize); + if Status <> 0 then + Display('Error #' + IntToStr(Status)); + Display(Buffer); + Display('Done with DLL'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/DnsLook1.dfm b/lib/ics/Delphi/Internet/DnsLook1.dfm new file mode 100644 index 00000000..ab250fa8 Binary files /dev/null and b/lib/ics/Delphi/Internet/DnsLook1.dfm differ diff --git a/lib/ics/Delphi/Internet/DnsLook1.pas b/lib/ics/Delphi/Internet/DnsLook1.pas new file mode 100644 index 00000000..fb0db92a --- /dev/null +++ b/lib/ics/Delphi/Internet/DnsLook1.pas @@ -0,0 +1,165 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstrate how to use TWSocket to asynchroneously resolve a + host name to an IP address. +Creation: October 29, 1997 +Version: 1.05 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Oct 30, 1997 V1.01 Made the code compatible with Delphi 1. +Oct 31, 1997 V1.02 Added a cancel button +jan 31, 1998 V1.03 Added a scroll bar. Display addresses count +Aug 03, 1998 V1.04 Added reverse DNS lookup +Mar 13, 1999 V1.05 Added a button to get local ip list + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit DnsLook1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WinSock, WSocket, StdCtrls; + +const + DNSLookVersion = 105; + +type + TDnsLookupForm = class(TForm) + WSocket1: TWSocket; + HostEdit: TEdit; + Label1: TLabel; + IPLabel: TLabel; + LookupButton: TButton; + CancelButton: TButton; + IPListMemo: TMemo; + ReverseLookupButton: TButton; + LocalIPButton: TButton; + procedure FormCreate(Sender: TObject); + procedure LookupButtonClick(Sender: TObject); + procedure WSocket1DnsLookupDone(Sender: TObject; Error: Word); + procedure CancelButtonClick(Sender: TObject); + procedure ReverseLookupButtonClick(Sender: TObject); + procedure LocalIPButtonClick(Sender: TObject); + end; + +var + DnsLookupForm: TDnsLookupForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.FormCreate(Sender: TObject); +begin + IPLabel.Caption := ''; + LookupButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; + HostEdit.Text := LocalHostName; + IPListMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.LookupButtonClick(Sender: TObject); +begin + LookupButton.Enabled := FALSE; { Prevent recursive call } + ReverseLookupButton.Enabled := FALSE; + CancelButton.Enabled := TRUE; { Enable canceling } + HostEdit.SelectAll; { handy for the user } + ActiveControl := HostEdit; { he likes to have the cursor there } + IPLabel.Caption := 'Waiting for DNS...'; + IPListMemo.Clear; + WSocket1.DnsLookup(HostEdit.Text); { Start DnsLookup } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.ReverseLookupButtonClick(Sender: TObject); +begin + LookupButton.Enabled := FALSE; { Prevent recursive call } + ReverseLookupButton.Enabled := FALSE; + CancelButton.Enabled := TRUE; { Enable canceling } + HostEdit.SelectAll; { handy for the user } + ActiveControl := HostEdit; { he likes to have the cursor there } + IPLabel.Caption := 'Waiting for DNS...'; + IPListMemo.Clear; + WSocket1.ReverseDnsLookup(HostEdit.Text); { Start DnsLookup } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.WSocket1DnsLookupDone(Sender: TObject; + Error: Word); +begin + if Error = 0 then begin + IPLabel.Caption := WSocket1.DnsResult + + ' (' + IntToStr(WSocket1.DnsResultList.Count) + + ' addresses)'; + IPListMemo.Lines := WSocket1.DnsResultList; + end + else + IPLabel.Caption := 'NOT FOUND, ERROR #' + IntToStr(Error); + LookupButton.Enabled := TRUE; + ReverseLookupButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.CancelButtonClick(Sender: TObject); +begin + IPLabel.Caption := ''; + LookupButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; + ActiveControl := HostEdit; + WSocket1.CancelDnsLookup; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.LocalIPButtonClick(Sender: TObject); +begin + IPListMemo.Lines := LocalIPList; + if LocalIPList.Count > 0 then + HostEdit.Text := LocalIPList.Strings[0]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/DynCli.dpr b/lib/ics/Delphi/Internet/DynCli.dpr new file mode 100644 index 00000000..0264d090 --- /dev/null +++ b/lib/ics/Delphi/Internet/DynCli.dpr @@ -0,0 +1,12 @@ +program DynCli; + +uses + Forms, + DynCli1 in 'DynCli1.pas' {DynCliForm}; + +{$R *.RES} + +begin + Application.CreateForm(TDynCliForm, DynCliForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/DynCli1.dfm b/lib/ics/Delphi/Internet/DynCli1.dfm new file mode 100644 index 00000000..c9945af3 Binary files /dev/null and b/lib/ics/Delphi/Internet/DynCli1.dfm differ diff --git a/lib/ics/Delphi/Internet/DynCli1.pas b/lib/ics/Delphi/Internet/DynCli1.pas new file mode 100644 index 00000000..e0584bb4 --- /dev/null +++ b/lib/ics/Delphi/Internet/DynCli1.pas @@ -0,0 +1,167 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Sample program to show how to dynamically create a TWSocket. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + francois.piette@swing.be + http://www.rtfm.be/fpiette +Creation: October 02, 1999 +Version: 1.01 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1999-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit DynCli1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, WSocket; + +type + TDynCliForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + Label1: TLabel; + HostnameEdit: TEdit; + PortEdit: TEdit; + Label2: TLabel; + ConnectButton: TButton; + DisconnectButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + private + FWSocket : TWSocket; + FRcvBuf : String; + procedure FWSocketSessionConnected(Sender: TObject; Error: Word); + procedure FWSocketSessionClosed(Sender: TObject; Error: Word); + procedure FWSocketDataAvailable(Sender: TObject; Error: Word); + public + { Dclarations publiques } + end; + +var + DynCliForm: TDynCliForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: String; NewLength: Integer); +begin + S[0] := Chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDynCliForm.ConnectButtonClick(Sender: TObject); +begin + if Assigned(FWSocket) then + FWSocket.Release; { This will close connection as needed } + { Create a new TWSocket and initialize all needed properties and events } + FWSocket := TWSocket.Create(Self); + FWSocket.Proto := 'tcp'; + FWSocket.Port := PortEdit.Text; + FWSocket.Addr := HostnameEdit.Text; + FWSocket.LineMode := TRUE; + FWSocket.LineEnd := #13#10; + FWSocket.OnSessionConnected := FWSocketSessionConnected; + FWSocket.OnSessionClosed := FWSocketSessionClosed; + FWSocket.OnDataAvailable := FWSocketDataAvailable; + try + FWSocket.Connect; + except + { Connect may fail because of invalid parameters and will trigger } + { an exception. } + on E:Exception do begin + DisplayMemo.Lines.Add('Unabled to connect: ' + + E.ClassName + ': ' + E.Message); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDynCliForm.DisconnectButtonClick(Sender: TObject); +begin + if Assigned(FWSocket) then + FWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDynCliForm.FWSocketSessionConnected(Sender: TObject; Error: Word); +begin + if Error <> 0 then + DisplayMemo.Lines.Add('Can''t connect. Error #' + IntToStr(Error)) + else + DisplayMemo.Lines.Add('Session connected.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDynCliForm.FWSocketSessionClosed(Sender: TObject; Error: Word); +begin + DisplayMemo.Lines.Add('Session closed.'); + { Destroy the socket. We can't use Destroy here because we are in } + { an event handler. We need to use Release which will delay destruction } + { until we are out of the event handler. } + FWSocket.Release; + FWSocket := nil; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDynCliForm.FWSocketDataAvailable(Sender: TObject; Error: Word); +begin + { Remember: we use line mode. We will always receive complete lines } + with Sender as TWSocket do + FRcvBuf := ReceiveStr; + { Remove trailing CR/LF, if any } + if (Length(FRcvBuf) > 1) and + (FRcvBuf[Length(FRcvBuf)] = #10) and + (FRcvBuf[Length(FRcvBuf) - 1] = #13) then + SetLength(FRcvBuf, Length(FRcvBuf) - 2); + { Display received line } + DisplayMemo.Lines.Add(FRcvBuf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/FTPTST2.dfm b/lib/ics/Delphi/Internet/FTPTST2.dfm new file mode 100644 index 00000000..13389721 Binary files /dev/null and b/lib/ics/Delphi/Internet/FTPTST2.dfm differ diff --git a/lib/ics/Delphi/Internet/FtpServ1.dfm b/lib/ics/Delphi/Internet/FtpServ1.dfm new file mode 100644 index 00000000..17c59ffe Binary files /dev/null and b/lib/ics/Delphi/Internet/FtpServ1.dfm differ diff --git a/lib/ics/Delphi/Internet/FtpServ1.pas b/lib/ics/Delphi/Internet/FtpServ1.pas new file mode 100644 index 00000000..0f081a27 --- /dev/null +++ b/lib/ics/Delphi/Internet/FtpServ1.pas @@ -0,0 +1,842 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This is a demo program showing how to use the TFtpServer + component to build a FTP server. + Waring: As this demo is writtent, full access is given to all + users to all files accessible by the computer running the demo. + In production program, you should add code to implement + security issues. +Creation: April 21, 1998 +Version: 1.06 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Apr 29, 1998 V0.90 Released for beta testing. +Apr 30, 1998 V0.91 Added an example of virtual file (see the code for + FtpServer1RetrSessionConnected. +May 01, 1998 V0.92 Adapted for Delphi 1.0 +May 03, 1998 V0.93 Adapted for Delphi 2.0 and C++Builder +May 04, 1998 V0.94 Added tools menu. +Jul 09, 1998 V1.00 Adapted for Delphi 4, removed beta status. +Jul 21, 1998 V1.01 Show how to refuse a client in OnClientConnected +Oct 25, 2000 V1.02 Added "List Clients" menu item and coding. +Jun 18, 2001 V1.03 Display version informations +Jul 30, 2001 V1.04 Add Trim function for Delphi 1 +Feb 26, 2002 V1.05 Add DisconectAll in main menu +Jun 07, 2002 V1.06 Added a processing thread (not for Delphi 1) for Get + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpServ1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, FtpSrv, FtpSrvC, WSocket, StdCtrls, ExtCtrls, Menus, + Winsock; + +const + FtpServVersion = 106; + CopyRight : String = ' FtpServer (c) 1998-2002 F. Piette V1.06 '; + WM_APPSTARTUP = WM_USER + 1; + +type + TLogMsg = class(TComponent) + public + procedure Text(Prefix : Char; Msg : String); + end; + +{$IFNDEF VER80} { Not for Delphi 1, sorry } + TGetProcessingThread = class; { Forward declaration } + { We use our own client class to hold our thread } + TMyClient = class(TFtpCtrlSocket) + private + FWorkerThread : TGetProcessingThread; + end; + + TGetProcessingThread = class(TThread) + protected + Server : TFtpServer; + Client : TMyClient; + public + procedure Execute; override; + end; +{$ENDIF} + + TFtpServerForm = class(TForm) + FtpServer1: TFtpServer; + InfoMemo: TMemo; + Panel1: TPanel; + StartMinimizedCheckBox: TCheckBox; + MainMenu1: TMainMenu; + File1: TMenuItem; + MnuStartServer: TMenuItem; + MnuStopServer: TMenuItem; + MnuQuit: TMenuItem; + N1: TMenuItem; + About1: TMenuItem; + GreenImage: TImage; + ClientCountLabel: TLabel; + RedImage: TImage; + Tools1: TMenuItem; + Cleardisplay1: TMenuItem; + MnuListClients: TMenuItem; + N2: TMenuItem; + DisconnectAllMnu: TMenuItem; + procedure FormCreate(Sender: TObject); + procedure FtpServer1ClientConnect(Sender: TObject; + Client: TFtpCtrlSocket; Error: Word); + procedure FtpServer1ClientDisconnect(Sender: TObject; + Client: TFtpCtrlSocket; Error: Word); + procedure FtpServer1Start(Sender: TObject); + procedure FtpServer1Stop(Sender: TObject); + procedure FtpServer1ClientCommand(Sender: TObject; + Client: TFtpCtrlSocket; var Keyword, Params, Answer: TFtpString); + procedure FtpServer1StorSessionConnected(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); + procedure FtpServer1StorSessionClosed(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); + procedure FtpServer1RetrDataSent(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); + procedure FtpServer1RetrSessionConnected(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); + procedure FtpServer1RetrSessionClosed(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FtpServer1AnswerToClient(Sender: TObject; + Client: TFtpCtrlSocket; var Answer: TFtpString); + procedure FtpServer1Authenticate(Sender: TObject; + Client: TFtpCtrlSocket; UserName, Password: TFtpString; + var Authenticated: Boolean); + procedure FtpServer1ChangeDirectory(Sender: TObject; + Client: TFtpCtrlSocket; Directory: TFtpString; var Allowed: Boolean); + procedure MnuQuitClick(Sender: TObject); + procedure MnuStopServerClick(Sender: TObject); + procedure MnuStartServerClick(Sender: TObject); + procedure ImagesDblClick(Sender: TObject); + procedure FtpServer1BuildDirectory(Sender: TObject; + Client: TFtpCtrlSocket; var Directory: TFtpString; Detailed: Boolean); + procedure FtpServer1AlterDirectory(Sender: TObject; + Client: TFtpCtrlSocket; var Directory: TFtpString; Detailed: Boolean); + procedure Cleardisplay1Click(Sender: TObject); + procedure MnuListClientsClick(Sender: TObject); + procedure DisconnectAllMnuClick(Sender: TObject); + procedure FtpServer1GetProcessing(Sender: TObject; + Client: TFtpCtrlSocket; var DelayedSend : Boolean); + private + FInitialized : Boolean; + FIniFileName : String; + FPort : String; + FXTop : Integer; + FXLeft : Integer; + FXWidth : Integer; + FXHeight : Integer; + procedure WMAppStartup(var msg: TMessage); message WM_APPSTARTUP; + procedure LoadConfig; + procedure SaveConfig; + procedure StartServer; + procedure StopServer; + procedure UpdateClientCount; +{$IFNDEF VER80} + procedure WorkerThreadTerminated(Sender : TObject); +{$ENDIF} + end; + +var + FtpServerForm: TFtpServerForm; + Log : TLogMsg; + +implementation + +{$R *.DFM} + +const + MainTitle = 'FTP Server - http://www.overbyte.be'; + + { Ini file layout } + SectionData = 'Data'; + KeyPort = 'Port'; + + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + KeyMinim = 'RunMinimized'; + + STATUS_GREEN = 0; + STATUS_YELLOW = 1; + STATUS_RED = 2; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TLogMsg.Text(Prefix : Char; Msg : String); +begin +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] in [' ', #9]) do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + Minim : Integer; +begin + if not FInitialized then begin + FInitialized := TRUE; + Caption := 'Starting ' + MainTitle; + Left := -Width; + + IniFile := TIniFile.Create(FIniFileName); + FXTop := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + FXLeft := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + FXWidth := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + FXHeight := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Minim := IniFile.ReadInteger(SectionWindow, KeyMinim, 0); + + IniFile.Free; + + LoadConfig; + SaveConfig; { Create the inifile keys if they don't exists } + + { Be sure to always have the window visible } + { with a reasonable width and height } + if FXLeft < 0 then + FXLeft := 0; + if FXTop < 0 then + FXTop := 0; + if FXWidth < 310 then + FXWidth := 310; + if FXHeight <= 250 then + FXHeight := 250; + if (FXLeft + FXWidth) > Screen.Width then + FXLeft := Screen.Width - FXWidth; + if (FXTop + FXHeight) > Screen.Height then + FXTop := Screen.Height - FXHeight; + + StartMinimizedCheckBox.Checked := (Minim <> 0); + + { We use a custom message to initialize things once the form } + { is visible } + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; + Minim : Integer; +begin + try + StopServer; + Minim := ord(StartMinimizedCheckBox.Checked); + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteInteger(SectionWindow, KeyMinim, Minim); + IniFile.WriteString(SectionData, KeyPort, FPort); + IniFile.Free; + except + { Ignore any exception when we are closing } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.LoadConfig; +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + FPort := IniFile.ReadString(SectionData, KeyPort, 'ftp'); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.SaveConfig; +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyPort, FPort); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This message handler is triggered by the FormShow event. We comes here } +{ only when the form is visible on screen. } +procedure TFtpServerForm.WMAppStartup(var msg: TMessage); +var + PrvWnd : HWND; + Buf : String; +begin + if StartMinimizedCheckBox.Checked then + Application.Minimize; + Top := FXTop; + Left := FXLeft; + Width := FXWidth; + Height := FXHeight; + + { Prevent the server from running twice } + Buf := ClassName + #0; + PrvWnd := FindWindow(@Buf[1], MainTitle); + if PrvWnd <> 0 then begin + Log.Text('E', 'Server already running. Shutdown.'); + Close; + Exit; + end; + Caption := MainTitle; + Update; { It's nice to have the form completely displayed } + + StartServer; + UpdateClientCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF VER80 } +{ To debug event driven programs, it is often handy to just use writeln to } +{ write debug messages to the console. To get a console, just ask the } +{ linker to build a console mode application. Then you'll get the default } +{ console. The function below will make it the size you like... } +procedure BigConsole(nCols, nLines : Integer); +var + sc : TCoord; + N : DWord; +begin + if not IsConsole then + Exit; + sc.x := nCols; + sc.y := nLines; + SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), sc); + SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), + BACKGROUND_BLUE or BACKGROUND_GREEN or + BACKGROUND_RED or BACKGROUND_INTENSITY); + sc.x := 0; + sc.y := 0; + FillConsoleOutputAttribute(GetStdHandle(STD_OUTPUT_HANDLE), + BACKGROUND_BLUE or BACKGROUND_GREEN or + BACKGROUND_RED or BACKGROUND_INTENSITY, + nCols * nLines, sc, N); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FormCreate(Sender: TObject); +begin + { Build Ini file name } + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + { Create the Log object } + Log := TLogMsg.Create(Self); + +{$IFNDEF VER80} +{ BigConsole(80, 100); } +{$ENDIF} + InfoMemo.Clear; + GreenImage.Visible := FALSE; + RedImage.Visible := TRUE; + RedImage.Top := GreenImage.Top; + RedImage.Left := GreenImage.Left; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.StartServer; +var + wsi : TWSADATA; +begin + GreenImage.Visible := FALSE; + RedImage.Visible := TRUE; + Update; + + { Display version info for program and use components } + wsi := WinsockInfo; + InfoMemo.Lines.Add(Trim(CopyRight)); + InfoMemo.Lines.Add('Using:'); + InfoMemo.Lines.Add(' ' + WSocket.CopyRight); + InfoMemo.Lines.Add(' ' + FtpSrv.CopyRight); + InfoMemo.Lines.Add(' Winsock:'); + InfoMemo.Lines.Add(' Version ' + + Format('%d.%d', [WinsockInfo.wHighVersion shr 8, + WinsockInfo.wHighVersion and 15])); + InfoMemo.Lines.Add(' ' + StrPas(@wsi.szDescription)); + InfoMemo.Lines.Add(' ' + StrPas(@wsi.szSystemStatus)); +{$IFNDEF VER100} + { A bug in Delphi 3 makes lpVendorInfo invalid } + if wsi.lpVendorInfo <> nil then + InfoMemo.Lines.Add(' ' + StrPas(wsi.lpVendorInfo)); +{$ENDIF} +{$IFNDEF VER80} + { If not running 16 bits, we use our own client class } + FtpServer1.ClientClass := TMyClient; +{$ENDIF} + FtpServer1.Start; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.StopServer; +begin + FtpServer1.Stop; + FtpServer1.DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.MnuQuitClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.MnuStopServerClick(Sender: TObject); +begin + StopServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.MnuStartServerClick(Sender: TObject); +begin + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.ImagesDblClick(Sender: TObject); +begin + if FtpServer1.Active then + StopServer + else + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.UpdateClientCount; +begin + if FtpServer1.ClientCount = 0 then + ClientCountLabel.Caption := 'No user' + else + ClientCountLabel.Caption := IntToStr(FtpServer1.ClientCount) + ' users'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1ClientConnect(Sender: TObject; + Client: TFtpCtrlSocket; Error: Word); +begin + { The next test shows how to refuse a client } + if Client.GetPeerAddr = '193.121.12.25' then begin + Client.SendStr('421 Connection not allowed.' + #13#10); + Client.Close; + Exit; + end; + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + ' connected'); + UpdateClientCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1ClientDisconnect(Sender: TObject; + Client: TFtpCtrlSocket; Error: Word); +begin + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + ' disconnected'); + UpdateClientCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1Start(Sender: TObject); +begin + GreenImage.Visible := TRUE; + RedImage.Visible := FALSE; + InfoMemo.Lines.Add('! Server started'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1Stop(Sender: TObject); +begin + GreenImage.Visible := FALSE; + RedImage.Visible := TRUE; + InfoMemo.Lines.Add('! Server stopped'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1StorSessionConnected(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); +begin + if Error <> 0 then + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' Data session failed to open. Error #' + + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1StorSessionClosed(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); +begin + if Error <> 0 then + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' Data session closed. Error #' + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1RetrDataSent(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); +begin + if Error <> 0 then + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' Data sent. Error #' + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the data session for a get file has } +{ been opened. This is a good place build a file or a stream if the data } +{ requested is not already stored in a file on the file system. } +{ This feature is very powerfull and enable the FTP protocol to be used to } +{ retrieve any kind of data. It this sample, we just check for C:\VIRTUAL } +{ directory. If this directory is curent, then a TMemoryStream is created } +{ on the fly with some data. If another directory is selected, the FTP } +{ server works as any other: just send the requested file, if it exist ! } +{ This event handler is also a place where you can abort the file transfer. } +{ Simply trigger an exception and transfer will not take place. } +{ Note that if you just wants to prohibe access to some directory or file, } +{ the best place to code that is in the OnValidateGet or OnValidatePut } +{ event handlers. } +procedure TFtpServerForm.FtpServer1RetrSessionConnected(Sender: TObject; + Client : TFtpCtrlSocket; + Data : TWSocket; + Error : Word); +var + Buf : String; +begin + if Error <> 0 then + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' Data session connected. Error #' + IntToStr(Error)) + else if Copy(UpperCase(Client.FilePath), 1, 19) = 'C:\VIRTUAL\FORBIDEN' then + raise Exception.Create('Access prohibed !') + else if Copy(UpperCase(Client.FilePath), 1, 11) = 'C:\VIRTUAL\' then begin + InfoMemo.Lines.Add('! VIRTUAL FILE'); + Client.UserData := 1; { Remember we created a stream } + if Assigned(Client.DataStream) then + Client.DataStream.Destroy; { Prevent memory leaks } + Client.DataStream := TMemoryStream.Create; + Buf := 'This is a file created on the fly by the FTP server' + #13#10 + + 'It could result of a query to a database or anything else.' + #13#10 + + 'The request was: ''' + Client.FilePath + '''' + #13#10; + Client.DataStream.Write(Buf[1], Length(Buf)); + Client.DataStream.Seek(0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1RetrSessionClosed(Sender: TObject; + Client: TFtpCtrlSocket; Data: TWSocket; Error: Word); +begin + if Error <> 0 then + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' Data session closed. Error #' + IntToStr(Error)); + if Client.UserData = 1 then begin + { We created a stream for a virtual file or dir. Delete the TStream } + if Assigned(Client.DataStream) then begin + { There is no reason why we should not come here, but who knows ? } + Client.DataStream.Destroy; + Client.DataStream := nil; + end; + Client.UserData := 0; { Reset the flag } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the FTP component needs to build a } +{ directory listing. You can just return without doing anything then the } +{ component will build the directory for you, based on the actual disk } +{ content. But you can also build your own directory listing with anything } +{ you like in it. Just create a stream with the required content. The } +{ example below construct a virtual directory when the user is on the } +{ C:\VIRTUAL subdirectory (use elsewhere in this sample program). } +procedure TFtpServerForm.FtpServer1BuildDirectory( + Sender : TObject; + Client : TFtpCtrlSocket; + var Directory : TFtpString; + Detailed : Boolean); +var + Buf : String; +begin + if UpperCase(Client.Directory) <> 'C:\VIRTUAL\' then + Exit; + InfoMemo.Lines.Add('! VIRTUAL DIR'); + Client.UserData := 1; { Remember we created a stream } + if Assigned(Client.DataStream) then + Client.DataStream.Destroy; { Prevent memory leaks } + Client.DataStream := TMemoryStream.Create; + if Detailed then + { We need to format directory lines according to the Unix standard } + Buf := + '-rwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 FORBIDEN' + #13#10 + + '-rwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 TEST' + #13#10 + + 'drwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 SOME DIR' + #13#10 + else + Buf := 'FORBIDEN' + #13#10 + + 'TEST' + #13#10; + Client.DataStream.Write(Buf[1], Length(Buf)); + Client.DataStream.Seek(0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by the FTP component once it has built the } +{ directory listing. We can use this handler to alter the listing, adding } +{ or removing some info. This sample add the 'virtual' directory. } +procedure TFtpServerForm.FtpServer1AlterDirectory( + Sender : TObject; + Client : TFtpCtrlSocket; + var Directory : TFtpString; + Detailed : Boolean); +var + Buf : String; +begin + if UpperCase(Client.Directory) <> 'C:\' then + Exit; + { Add our 'virtual' directory to the list } + if Detailed then begin + { We need to format directory lines according to the Unix standard } + Buf := + 'drwxrwxrwx 1 ftp ftp 0 Apr 30 19:00 VIRTUAL' + #13#10; + Client.DataStream.Write(Buf[1], Length(Buf)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1ClientCommand(Sender: TObject; + Client: TFtpCtrlSocket; var Keyword, Params, Answer: TFtpString); +begin + InfoMemo.Lines.Add('< ' + Client.GetPeerAddr + ' ' + + Keyword + ' ' + Params); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1AnswerToClient(Sender: TObject; + Client: TFtpCtrlSocket; var Answer: TFtpString); +begin + InfoMemo.Lines.Add('> ' + Client.GetPeerAddr + ' ' + Answer) +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1Authenticate(Sender: TObject; + Client: TFtpCtrlSocket; UserName, Password: TFtpString; + var Authenticated: Boolean); +begin + { You should place here the code needed to authenticate the user. } + { For example a text file with all permitted username/password. } + { If the user can't be authenticated, just set Authenticated to } + { false before returning. } + { It is also the right place to setup Client.HomeDir } + { If you need to store info about the client for later processing } + { you can use Client.UserData to store a pointer to an object or } + { a record with the needed info. } + InfoMemo.Lines.Add('! ' + Client.GetPeerAddr + + ' User ''' + UserName + ''' is authenticated'); + if Password = 'bad' then + Authenticated := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.FtpServer1ChangeDirectory(Sender: TObject; + Client: TFtpCtrlSocket; Directory: TFtpString; var Allowed: Boolean); +begin +{$IFDEF NEVER} + { It the right place to check if a user has access to a given directory } + { The example below disable C:\ access to non root user. } + if (UpperCase(Client.UserName) <> 'ROOT') and + (UpperCase(Client.Directory) = 'C:\') then + Allowed := FALSE; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.Cleardisplay1Click(Sender: TObject); +begin + InfoMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.MnuListClientsClick(Sender: TObject); +var + I : Integer; +begin + if FtpServer1.ClientCount <= 0 then begin + InfoMemo.Lines.Add('No client'); + Exit; + end; + + for I := 0 to FtpServer1.ClientCount - 1 do begin + InfoMemo.Lines.Add('Client ' + IntToStr(I + 1) + ': ' + + FtpServer1.Client[I].GetPeerAddr + '/' + + FtpServer1.Client[I].GetPeerPort); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.DisconnectAllMnuClick(Sender: TObject); +begin + FtpServer1.DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} { Sorry, Delphi 1 doesn't support multi-threading } +procedure TFtpServerForm.FtpServer1GetProcessing( + Sender : TObject; + Client : TFtpCtrlSocket; + var DelayedSend : Boolean); +begin + { Nothing to do here... } +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF VER80} { 32 bits support multi-threading } +procedure TFtpServerForm.FtpServer1GetProcessing( + Sender : TObject; + Client : TFtpCtrlSocket; + var DelayedSend : Boolean); +var + MyServer : TFtpServer; + MyClient : TMyClient; +begin + MyServer := Sender as TFtpServer; + MyClient := Client as TMyClient; + { If client request a *.ZZZ file, then start a thread to do some } + { processing (here the thread just sleep 10 sec to show other clients } + { are not blocked. } + if UpperCase(ExtractFileExt(MyClient.FileName)) = '.ZZZ' then begin + MyClient.FWorkerThread := TGetProcessingThread.Create(TRUE); + MyClient.FWorkerThread.Server := MyServer; + MyClient.FWorkerThread.Client := MyClient; + MyClient.FWorkerThread.FreeOnTerminate := TRUE; + MyClient.FWorkerThread.OnTerminate := WorkerThreadTerminated; + MyClient.FWorkerThread.Resume; + { Ask server component to not start sending immediately } + { We will ask to start sending from WorkerThreadTerminated event } + DelayedSend := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServerForm.WorkerThreadTerminated(Sender : TObject); +var + MyThread : TGetProcessingThread; +begin + MyThread := Sender as TGetProcessingThread; + MyThread.Server.DoStartSendData(MyThread.Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetProcessingThread.Execute; +begin + Sleep(10000); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + diff --git a/lib/ics/Delphi/Internet/FtpThrd1.dfm b/lib/ics/Delphi/Internet/FtpThrd1.dfm new file mode 100644 index 00000000..278ad694 Binary files /dev/null and b/lib/ics/Delphi/Internet/FtpThrd1.dfm differ diff --git a/lib/ics/Delphi/Internet/FtpThrd1.pas b/lib/ics/Delphi/Internet/FtpThrd1.pas new file mode 100644 index 00000000..eafc23a4 --- /dev/null +++ b/lib/ics/Delphi/Internet/FtpThrd1.pas @@ -0,0 +1,168 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE + Used code from Frank Neuhaus . +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Creation: December 22, 1998 +Version: 1.00 +Object: Demo for threaded TFtpCli use (not the best way to use the + component, but some like to use threads). +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +Updates: + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpThrd1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + ExtCtrls, StdCtrls; + +type + TThrdFtpForm = class(TForm) + ListBox1: TListBox; + Panel1: TPanel; + StartButton: TButton; + SaveButton: TButton; + procedure StartButtonClick(Sender: TObject); + procedure SaveButtonClick(Sender: TObject); + end; + + TTransferThread = class(TThread) + private + FMsg : String; + public + constructor CreateThread; + procedure AddToListBox; + procedure Display(Msg: String); + procedure CliDisplay(Sender: TObject; var Msg: String); + procedure Execute ; override; + end; + +var + ThrdFtpForm: TThrdFtpForm; + +implementation +{$R *.DFM} + +uses + FtpCli; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TThrdFtpForm.StartButtonClick(Sender: TObject); +begin + TTransferThread.CreateThread; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TThrdFtpForm.SaveButtonClick(Sender: TObject); +begin + ListBox1.Items.SaveToFile('FtpThrd.Log'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTransferThread.CreateThread; +begin + FreeOnTerminate := TRUE; + inherited Create(FALSE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTransferThread.Execute; +var + FtpClient1 : TFtpClient; +begin + FtpClient1 := TFtpClient.Create(nil); + FtpClient1.OnDisplay := CliDisplay; + FtpClient1.OnProgress := nil; + FtpClient1.OnRequestDone := nil; + FtpClient1.OnSessionConnected := nil; + FtpClient1.OnSessionClosed := nil; + FtpClient1.OnStateChange := nil; + FtpClient1.Multithreaded := TRUE; + FtpClient1.Timeout := 60; // default is 15 + + FtpClient1.HostName := 'localhost'; + FtpClient1.Port := 'ftp'; + FtpClient1.UserName := 'fpiette'; + FtpClient1.Password := 'fp'; + FtpClient1.DisplayFileFlag := TRUE; + FtpClient1.LocalFileName := 'c:\temp\data1.txt'; + FtpClient1.HostDirName := 'c:\temp'; + FtpClient1.HostFileName := 'tofile.txt'; + + if not FtpClient1.Connect then begin + Display('Connect failed'); + FtpClient1.Abort; + Exit; + end; + if not FtpClient1.Put then begin + Display('Put failed'); + FtpClient1.Abort; + Exit; + end; + if not FtpClient1.Quit then begin + Display('Quit failed'); + FtpClient1.Abort; + Exit; + end; + Display('Finished ok.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTransferThread.CliDisplay(Sender: TObject; var Msg: String); +begin + Display(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTransferThread.Display(Msg : String); +begin + FMsg := Msg; + Synchronize(AddToListBox); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTransferThread.AddToListBox; +begin + ThrdFtpForm.ListBox1.Items.Add(FMsg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/Ftptst2.pas b/lib/ics/Delphi/Internet/Ftptst2.pas new file mode 100644 index 00000000..2a390e63 --- /dev/null +++ b/lib/ics/Delphi/Internet/Ftptst2.pas @@ -0,0 +1,25 @@ +unit FtpTst2; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls; + +type + TDirectoryForm = class(TForm) + DirListBox: TListBox; + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + DirectoryForm: TDirectoryForm; + +implementation + +{$R *.DFM} + +end. diff --git a/lib/ics/Delphi/Internet/HLembke/NsLook1.dfm b/lib/ics/Delphi/Internet/HLembke/NsLook1.dfm new file mode 100644 index 00000000..2570bd4a Binary files /dev/null and b/lib/ics/Delphi/Internet/HLembke/NsLook1.dfm differ diff --git a/lib/ics/Delphi/Internet/HLembke/NsLook1.pas b/lib/ics/Delphi/Internet/HLembke/NsLook1.pas new file mode 100644 index 00000000..94187537 --- /dev/null +++ b/lib/ics/Delphi/Internet/HLembke/NsLook1.pas @@ -0,0 +1,322 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: NsLookup +Description: Demo for DnsQuery ICS component. +Author: Franois Piette +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: January 29, 1999 +Version: 1.02 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Feb 27, 1999 V1.01 Added PTR lookup (reverse DNS lookup) +Mar 07, 1999 V1.02 Adapted for Delphi 1 + +Aug 11, 2002 V1.99 Modified for new TDnsQuery-Oject + all changed lines have been commented with a //!!KAP!! + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit NsLook1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, WinSock, DnsQuery, StdCtrls, ExtCtrls, Buttons; + +type + TNsLookupForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + DnsEdit: TEdit; + NameEdit: TEdit; + MXLookupButton: TButton; + DnsQuery1: TDnsQuery; + ClearDisplayBitBtn: TBitBtn; + ALookupButton: TButton; + PTRLookupButton: TButton; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure MXLookupButtonClick(Sender: TObject); + procedure DnsQuery1RequestDone(Sender: TObject; Error: Word); + procedure ClearDisplayBitBtnClick(Sender: TObject); + procedure ALookupButtonClick(Sender: TObject); + procedure PTRLookupButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FRequestID : Integer; + procedure Display(Msg : String); + procedure DumpDnsResponse; + public + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + NsLookupForm: TNsLookupForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyName = 'Name'; + KeyDns = 'Dns'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + NameEdit.Text := IniFile.ReadString(SectionData, KeyName, 'inprise.com'); + DnsEdit.Text := IniFile.ReadString(SectionData, KeyDns, '193.121.171.135'); + DisplayMemo.Clear; + IniFile.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyName, NameEdit.Text); + IniFile.WriteString(SectionData, KeyDns, DnsEdit.Text); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.Display(Msg : String); +begin + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Lines.Delete(0); + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.DumpDnsResponse; +var + P : PChar; + I : Integer; + Len : Integer; + Buf : String; +begin + Display('Response dump (' + IntToStr(DnsQuery1.Response.len) + ' bytes):'); //!!KAP!! + P := DnsQuery1.ResponseBuf; + Len := DnsQuery1.Response.Len; //!!KAP!! + Buf := ''; + I := 0; + while I < Len do begin + if P^ in [' '..'~'] then + Buf := Buf + P^ + else + Buf := Buf + '<' + IntToStr(Ord(P^)) + '>'; + Inc(I); + Inc(P); + if (I mod 16) = 0 then begin + Display(' ' + Buf); + Buf := ''; + end; + end; + if Length(Buf) > 0 then + Display(' ' + Buf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.DnsQuery1RequestDone(Sender: TObject; Error: Word); +var + I : Integer; + nIndex : Integer; +begin + if Error <> 0 then begin + Display('Error #' + IntToStr(Error)); + Exit; + end; + // !!KAP!! start of changes + //!!KAP!! added lots of '.'... + Display('ID : ' + IntToStr(DnsQuery1.Response.ID)); + Display('ResponseCode : ' + IntToStr(DnsQuery1.Response.rCode)); //!!KAP!! added ..r + Display('OpCode : ' + IntToStr(DnsQuery1.Response.OpCode)); + Display('Authoritative : ' + IntToStr(Ord(DnsQuery1.Response.AuthoritativeAnswer))); //!!KAP!! added ..Answer + Display('Truncation : ' + IntToStr(Ord(DnsQuery1.Response.Truncation))); + Display('RecursionAvailable : ' + IntToStr(Ord(DnsQuery1.Response.RecursionAvailable))); + Display('QDCount : ' + IntToStr(DnsQuery1.Response.QDCount)); + Display('ANCount : ' + IntToStr(DnsQuery1.Response.ANCount)); + Display('NSCount : ' + IntToStr(DnsQuery1.Response.NSCount)); + Display('ARCount : ' + IntToStr(DnsQuery1.Response.ARCount)); + Display('ResponseLen : ' + IntToStr(DnsQuery1.Response.Len)); + Display('QuestionName : ' + DnsQuery1.Question.QuestionName); //!!KAP!! added Question... + Display('QuestionType : ' + IntToStr(DnsQuery1.Question.QuestionType)); //!!KAP!! added Question... + Display('QuestionClass : ' + IntToStr(DnsQuery1.Question.QuestionClass)); //!!KAP!! added Question... + + + // !!KAP!! new style of access + // Attention: some records only exists, if the appropriated request has been done + // display the Name Server items + Display(''); + for i:=0 to DnsQuery1.ResponseCount[DnsQueryNS]-1 do begin + Display(' Nameserver: '+DnsQuery1.ResponseItem[DnsQueryNS,i].nsdname); + end; + Display(''); + // or the MX records + for i:=0 to DnsQuery1.ResponseCount[DnsQueryMX]-1 do begin + Display(' MailExchange: '+DnsQuery1.ResponseItem[DnsQueryMX,i].mx.exchange); + end; + Display(''); + + // !!KAP!! but possible to loop throu all items + for i:=0 to dnsquery1.ResponseCount[0]-1 do begin + Display('Item for: '+dnsquery1.ResponseItem[0,i].name); + case dnsquery1.ResponseItem[0,i].rrtype of + DnsQueryA : Display(' DnsQueryA: ' + dnsquery1.ResponseItem[0,i].ipnummer); + DnsQueryMD, + DnsQueryMB, + DnsQueryMF : Display(' Answer: ' + dnsquery1.ResponseItem[0,i].madname); + DnsQueryCNAME : Display(' Cname: ' + dnsquery1.ResponseItem[0,i].cname); + DnsQueryMG : Display(' MGMName: ' + dnsquery1.ResponseItem[0,i].mgmname); + DnsQueryMR : Display(' NewName: ' + dnsquery1.ResponseItem[0,i].newname); + DnsQueryPTR : Display(' PTRName: ' + dnsquery1.ResponseItem[0,i].ptrname); + DnsQueryAAAA : Display(' AAAA (ipv6): ' + dnsquery1.ResponseItem[0,i].ip6nummer); + DnsQueryMINFO : Display(' MInfo r: ' + dnsquery1.ResponseItem[0,i].minfo.rmailbx+ + ' MInfo re: ' + dnsquery1.ResponseItem[0,i].minfo.remailbx); + DnsQueryTXT : Display(' TXT: ' + dnsquery1.ResponseItem[0,i].txt); + DnsQueryHINFO : Display(' HInfo: CPU=' + inttostr(dnsquery1.ResponseItem[0,i].hinfo.cpu)+ + ' OS=' + inttostr(dnsquery1.ResponseItem[0,i].hinfo.os)); + DnsQueryNS : Display(' Nameserver: ' + dnsquery1.ResponseItem[0,i].nsdname); + DnsQueryMX : Display(' MailExchange: ' + dnsquery1.ResponseItem[0,i].mx.exchange+ + ' '+ + inttostr(dnsquery1.ResponseItem[0,i].mx.preference)); + end; + end; + Display(''); + // !!KAP!! end of changes + +(* !!KAP!! This type of access is not longer possible + for I := 0 to DnsQuery1.ResponseANCount - 1 do begin + Display('Answer #' + IntToStr(I + 1)); + Display(' AnswerName : ' + DnsQuery1.AnswerName[I]); + Display(' AnswerType : ' + IntToStr(DnsQuery1.AnswerType[I])); + Display(' AnswerClass : ' + IntToStr(DnsQuery1.AnswerClass[I])); + Display(' AnswerTTL : ' + IntToStr(DnsQuery1.AnswerTTL[I])); + nIndex := DnsQuery1.AnswerTag[I]; + if nIndex >= 0 then begin + case DnsQuery1.AnswerType[I] of + DnsQueryMX: + begin + Display(' MXPreference : ' + IntToStr(DnsQuery1.MXPreference[nIndex])); + Display(' MXExchange : ' + DnsQuery1.MXExchange[nIndex]); + end; + DnsQueryA: + begin + Display(' Address : ' + StrPas(inet_ntoa(DnsQuery1.Address[nIndex]))); + end; + DnsQueryPTR: + begin + Display(' Hostname : ' + DnsQuery1.Hostname[nIndex]); + end; + end; + end; + end; +*) + { Dump complete response } + DumpDnsResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.ClearDisplayBitBtnClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.MXLookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.MXLookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.ALookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.ALookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.PTRLookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.PTRLookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/HLembke/NsLookup.dpr b/lib/ics/Delphi/Internet/HLembke/NsLookup.dpr new file mode 100644 index 00000000..914dbc80 --- /dev/null +++ b/lib/ics/Delphi/Internet/HLembke/NsLookup.dpr @@ -0,0 +1,12 @@ +program NsLookup; + +uses + Forms, + NsLook1 in 'NsLook1.pas' {NsLookupForm}; + +{$R *.RES} + +begin + Application.CreateForm(TNsLookupForm, NsLookupForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/HLembke/ReadMe.txt b/lib/ics/Delphi/Internet/HLembke/ReadMe.txt new file mode 100644 index 00000000..254b0198 --- /dev/null +++ b/lib/ics/Delphi/Internet/HLembke/ReadMe.txt @@ -0,0 +1,9 @@ +This HLembke directory contains a revised DnsLookup component +by Holger Lembke and corresponding NsLookup +project. + +This revised DnsLookup component will replace ICS original DnsQuery +component in the future. + +francois.piette@overbyte.be + diff --git a/lib/ics/Delphi/Internet/HLembke/dnsquery.pas b/lib/ics/Delphi/Internet/HLembke/dnsquery.pas new file mode 100644 index 00000000..d747bfc2 --- /dev/null +++ b/lib/ics/Delphi/Internet/HLembke/dnsquery.pas @@ -0,0 +1,1050 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Component to query DNS records. + Implement a subset of RFC 1035 (A and MX records). +Creation: January 29, 1999 +Version: 1.03 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Feb 14, 1999 V0.02 Indirectly call winsock functions using wsocket because + wsocket provide runtime dynamic link instead of loadtime link. + This allows a program to use DnsQuery if it discover that winsock + is installed and still run if winsock is not installed. +Feb 24, 1999 V1.00 Added code for reverse lookup (PTR record). +Mar 07, 1999 V1.01 Adapted for Delphi 1 +Aug 20, 1999 V1.02 Revise compile time option. Adapted for BCB4 +Jul 27, 2001 V1.03 Holger Lembke implemented a few new + queries or propreties (QueryAny, LongLatToDMS, Loc2Geo, Loc) + and related data types. +----------------------------- +Jul 27, 2002 V1.80 Holger Lembke has rewritten major parts + after error corrections, I suggest a jump to 2.01 + + changed almost everything. goal was + - to have a more comprehensive componente + - ease to implemente future DNS extentions/missing records + (future in meaning of this component. not really the dns system.) + + Users from 1.03 and before should be able to adapt code quickly. + - all the response... and question... things moved into a record, so + just add a point after response + - all array-properties are gone. + instead, you have to use a loop to run throu the desired types + + for i:=0 to dnsquery.ResponseCount[DnsQueryNS]-1 do + with dnsquery.ResponseItem[DnsQueryNS,i] do begin + writeln(nsdname); + end; + + Look up in TRRRecord, which record parts are defined for a + specific item. + + To add new records, follow this guidelines: + 1.) define the DNSQuery-Constant + 2.) Define the needed record + only one rule: no dynamic memory allocation + 3.) add it into the case structure in TRRRecord + 4.) add a 'decoder' into GetResponseItem + +Aug 30, 2002 V1.81 fixed a minor error in SubLOCgeo Holger Lembke + +----------------------------- + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit DnsQuery; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$R-} { Disable range checking } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Winsock, WSocket; + +const + DnsQueryVersion = 102; + CopyRight : String = ' TDnsQuery (c) 1999-2000 F. Piette V1.02 '; + + { DNS Classes } + DnsClassIN = 1; { The internet } + DnsClassCS = 2; { The CSNET class (obsolete, used only for examples)} + DnsClassCH = 3; { The CHAOS class } + DnsClassHS = 4; { Hesiod name service } + DnsClassALL = 255; { Any class } + + { Type of query/response a DNS can handle } + DnsQueryA = 1; { A HostAddress } + DnsQueryNS = 2; { NS Authoritative name server } + DnsQueryMD = 3; { MD MailDestination, obsolete, use Mail Exchange } + DnsQueryMF = 4; { MF MailForwarder, obsolete, use Mail Exchange } + DnsQueryCNAME = 5; { CNAME CanonicalName } + DnsQuerySOA = 6; { SOA Start of a Zone of Authority } + DnsQueryMB = 7; { MB MailBox, experimental } + DnsQueryMG = 8; { MG MailGroup, experimental } + DnsQueryMR = 9; { MR MailRename, experimental } + DnsQueryNULL = 10; { NULL Experimental } + DnsQueryWKS = 11; { WKS Well Known Service Description } + DnsQueryPTR = 12; { PTR Domain Name Pointer } + DnsQueryHINFO = 13; { HINFO Host Information } + DnsQueryMINFO = 14; { MINFO Mailbox information } + DnsQueryMX = 15; { MX Mail Exchange } + DnsQueryTXT = 16; { TXT Text Strings } + { !!KAP!! } + DnsQueryRP = 17; // RFC 1183 + DnsQueryAFSDB = 18; // RFC 1183 + DnsQueryX25 = 19; // RFC 1183 + DnsQueryISDN = 20; // RFC 1183 + DnsQueryRT = 21; // RFC 1183 + DnsQueryNSAP = 22; // RFC 1706 + DnsQueryNSAPPTR = 23; + DnsQuerySIG = 24; { see RFC-2065 } + DnsQueryKEY = 25; { see RFC-2065 } + DnsQueryPX = 26; // rfc 1327? + DnsQueryGPOS = 27; { GPOS has the following format: + GPOS } + DnsQueryAAAA = 28; { see IP6 Address } + DnsQueryLOC = 29; (* see RFC-1876 http://rfc.net/rfc1876.html + LOC ( d1 [m1 [s1]] {"N"|"S"} d2 [m2 [s2]] + {"E"|"W"} alt["m"] [siz["m"] [hp["m"] + [vp["m"]]]] ) + *) + DnsQueryNXT = 30; { see RFC-2065 } + + DnsQuerySRV = 33; { see RFC-2052 } + DnsQueryNAPTR = 35; { see RFC-2168 } + DnsQueryKX = 36; + + { Some additional type only allowed in queries } + DnsQueryAXFR = 252; { Transfer for an entire zone } + DnsQueryMAILB = 253; { Mailbox related records (MB, MG or MR) } + DnsQueryMAILA = 254; { MailAgent, obsolete, use MX instead } + DnsQueryALL = 255; { Request ALL records } + + { Opcode field in query flags } + DnsOpCodeQUERY = 0; + DnsOpCodeIQUERY = 1; + DnsOpCodeSTATUS = 2; + +type + TDnsRequestDoneEvent = procedure (Sender : TObject; Error : WORD) of Object; + + TDnsRequestHeader = packed record + ID : WORD; + flags : word; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD; + end; + PDnsRequestHeader = ^TDnsRequestHeader; + + // rfc 1035 p.10 + tname = string[255]; + ttxtstring = string[255]; + tadress = cardinal; //32bit + + // rfc 1035 p.26 + TDnsRequestAnswerHeader = record // + len : integer; + ID : WORD; + qr : boolean; + opcode : byte; + AuthoritativeAnswer : boolean; + Truncation : boolean; + RecursionDesired : boolean; + RecursionAvailable : boolean; + z : byte; + rcode : byte; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD; + end; + + // rfc 1035 p.19 + TSoaRecord = record + mname : tname; + rname : tname; + serial : Cardinal; + refresh : Cardinal; + retry : Cardinal; + expire : Cardinal; + minimum : Cardinal; + end; + + // rfc 1876 + TLOCInfo = packed record { need to be 16 bytes } + version : byte; + size : byte; + horizpre : byte; + vertpre : byte; + latitude : longint; + longitude : longint; + altitude : longint; + end; + PLOCInfo = ^TLOCInfo; + + // RFC 1886 p.2 + TAAAA = array[0..3] of Cardinal; // 128 bit + + { Decoded TLOCInfo } + TLogGeo = record + version : byte; + longsize : integer; + latsize : integer; + horizpre : integer; + vertpre : integer; + { Latitude, degree, minutes, seconds, milliseconds } + lad, lam, las, lams : integer; + lahem : char; + { same for Longitude } + lod, lom, los, loms : integer; + lohem : char; + altitude : integer; + end; + + // Question Data rfc1035 p.28 + TQuestion = record + QuestionType : word; + QuestionClass : word; + QuestionName : tname; + end; + + // rfc 1035 p.14 + THinfo = packed record + cpu : word; + os : word; + end; + + // rfc 1035 p.16 + TMinfo = packed record + rmailbx : tname; + remailbx : tname; + end; + + // rfc 1035 p.17 + TMX = record + preference : word; + exchange : tname; + end; + + // rfc 1035 p.10 + TRRInternal = packed record + rrtype : word; // r due to token conflict + rrclass : word; // same + rrttl : cardinal; // same + rdlength : word; + end; + pRRInternal = ^TRRInternal; + + // Result-Record + TRRRecord = packed record + valid : boolean; + + // internal for caching + lastid : integer; + lastindex : integer; + + // RR record start rfc 1035 p.29 + name : tname; + rrtype : word; // r due to token conflict + rrclass : word; // same + rrttl : cardinal; // same + rdlength : word; + + case integer of // depending on rrtype, one of these structures is filled + // more or less following rfc 1035 p.15 + DnsQueryMD, + DnsQueryMB, + DnsQueryMF : (madname : tname); + DnsQueryCNAME : (cname : tname); + DnsQueryHINFO : (hinfo : thinfo); + DnsQueryMG : (mgmname : tname); + DnsQueryMINFO : (minfo : tminfo); + DnsQueryMR : (newname : tname); + DnsQueryNS : (nsdname : tname); + DnsQueryPTR : (ptrname : tname); + DnsQuerySOA : (soa : TSoaRecord); + DnsQueryTXT : (txt : ttxtstring); + DnsQueryMX : (mx : TMX); + DnsQueryA : (adress : tadress; + ipnummer : tname); // interpreted + DnsQueryAAAA : (aaaa : TAAAA; + ip6nummer : tname); // interpreted + DnsQueryLOC : (loc : TLOCInfo; + locdecode : TLogGeo); // interpreted + end; + + // for a quicker access + tdatacacheitem = record + rrtype : word; + rrpos : pchar; + end; + tdatacache = record + count : integer; + items : array of tdatacacheitem; + end; + + TDnsQuery = class(TComponent) + private + { Dclarations prives } + frrcache : TRRRecord; + fdatacache : tdatacache; + fDnsRequestAnswer : TDnsRequestAnswerHeader; + fquestion : TQuestion; + + function NewExtractName(var p : pchar):string; + function GetRepsonsecount(nid : integer):integer; + function GetResponseItem(nid : integer; nindex : integer):TRRRecord; + + protected + FWSocket : TWSocket; + FPort : String; + FAddr : String; + FIDCount : WORD; + FQueryBuf : array [0..511] of char; + FQueryLen : Integer; + + FResponseBuf : array [0..511*8] of char; // 4k genug? irgendwie wre mir dynamisch ja lieber... + FResponseLen : Integer; + + FOnRequestDone : TDnsRequestDoneEvent; + + { !!KAP!! } + fQueryPending : boolean; + + procedure BuildRequestHeader(Dst : PDnsRequestHeader; + ID : WORD; + OPCode : BYTE; + Recursion : Boolean; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD); virtual; + function BuildQuestionSection(Dst : PChar; + const QName : String; + QType : WORD; + QClass : WORD) : Integer; virtual; + procedure WSocketDataAvailable(Sender: TObject; Error: WORD); virtual; + procedure TriggerRequestDone(Error: WORD); virtual; + function GetResponseBuf : PChar; + procedure SendQuery; + + { !!KAP!! 2002-02-15} + procedure DNSSocketSessionClosed(Sender: TObject; Error: Word); + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure Notification(AComponent: TComponent; operation: TOperation); override; + function MXLookup(Domain : String) : Integer; + function ALookup(Host : String) : Integer; + function PTRLookup(IP : String) : Integer; + { !!KAP!! } + function QueryAny(Host : String; QNumber : Integer) : Integer; + // Query this to see if dns-request is pending + property QueryPending : Boolean read fQueryPending; + + { !!KAP!! 2002-02-15} + procedure AbortPending; + + { !!KAP!! 2002-07-27} + property Response : TDnsRequestAnswerHeader read fDnsRequestAnswer; + property ResponseBuf : PChar read GetResponseBuf; + // 0 : all items, otherwise the queryitems + property ResponseCount[nid : integer]:integer read GetRepsonsecount; + property ResponseItem[nid : integer; nindex : integer]: TRRRecord read GetResponseItem; + + // simpler + property Question : TQuestion read fQuestion; + published + property Port : String read FPort write FPort; + property Addr : String read FAddr write FAddr; + property OnRequestDone : TDnsRequestDoneEvent read FOnRequestDone + write FOnRequestDone; + end; + + +function ReverseIP(const IP : String) : String; +function LongLatToDMS(longlat : longint; hemis : String) : String; { !!KAP!! } +function Loc2Geo(loc : TLOCInfo) : TLogGeo; { !!KAP!! } +function LocAltToAlt(Localt : LongInt) : LongInt; { !!KAP!! } +procedure Register; + +// should compile. +Const RRRecordsize = sizeof(TRRRecord); + +implementation + +type + PWORD = ^WORD; + PDWORD = ^DWORD; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function ReverseIP(const IP : String) : String; +var + I, J : Integer; +begin + Result := ''; + if Length(IP) = 0 then + Exit; + J := Length(IP); + I := J; + while I >= 0 do begin + if (I = 0) or (IP[I] = '.') then begin + Result := Result + '.' + Copy(IP, I + 1, J - I); + J := I - 1; + end; + Dec(I); + end; + if Result[1] = '.' then + Delete(Result, 1, 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TDnsQuery]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TDnsQuery.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWSocket := TWSocket.Create(nil); + FPort := '53'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TDnsQuery.Destroy; +begin + // erase cache + if (fdatacache.count>0) then begin + freemem(fdatacache.items,sizeof(fdatacache.items[0])*fdatacache.count); + fdatacache.count:=0 + end; + + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.Notification(AComponent: TComponent; operation: TOperation); +begin + inherited Notification(AComponent, operation); + if operation = opRemove then begin + if AComponent = FWSocket then + FWSocket := nil; + end; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetResponseBuf : PChar; +begin + Result := @FResponseBuf; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.MXLookup(Domain : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Domain, DnsQueryMX, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.ALookup(Host : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Host, DnsQueryA, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ !!KAP!! } +function TDnsQuery.QueryAny(Host : String; qnumber : integer) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Host, qnumber, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.PTRLookup(IP : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], + ReverseIP(IP) + '.in-addr.arpa', + DnsQueryPTR, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.SendQuery; +begin +// !!KAP!! + fQueryPending:=true; + + // erase cache + if (fdatacache.count>0) then begin + freemem(fdatacache.items,sizeof(fdatacache.items[0])*fdatacache.count); + fdatacache.count:=0 + end; + + FResponseLen := -1; + FWSocket.OnDataAvailable := nil; + FWSocket.Abort; + FWSocket.OnDataAvailable := WSocketDataAvailable; + FWSocket.Proto := 'udp'; + FWSocket.Port := FPort; + FWSocket.Addr := FAddr; + FWSocket.Connect; + FWSocket.Send(@FQueryBuf, FQueryLen); + FWSocket.OnSessionClosed :=DNSSocketSessionClosed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.BuildQuestionSection( + Dst : PChar; + const QName : String; + QType : WORD; + QClass : WORD) : Integer; +var + I : Integer; + p : PChar; + Ptr : PChar; +begin + Ptr := Dst; + if Ptr = nil then begin + Result := 0; + Exit; + end; + I := 1; + while I <= Length(QName) do begin + p := Ptr; + Inc(Ptr); + while (I <= Length(QName)) and (QName[I] <> '.') do begin + Ptr^ := QName[I]; + Inc(Ptr); + Inc(I); + end; + p^ := Chr(Ptr - p - 1); + Inc(I); + end; + Ptr^ := #0; + Inc(Ptr); + PWORD(Ptr)^ := htons(QType); + Inc(Ptr, 2); + PWORD(Ptr)^ := htons(QClass); + Inc(Ptr, 2); + Result := Ptr - Dst; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.BuildRequestHeader( + Dst : PDnsRequestHeader; + ID : WORD; + OPCode : BYTE; + Recursion : Boolean; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD); +begin + if Dst = nil then + Exit; + Dst^.ID := htons(ID); + Dst^.Flags := htons((OpCode shl 11) + (Ord(Recursion) shl 8)); + Dst^.QDCount := htons(QDCount); + Dst^.ANCount := htons(ANCount); + Dst^.NSCount := htons(NSCount); + Dst^.ARCount := htons(ARCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.TriggerRequestDone(Error: WORD); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, Error); + + //!!KAP!! + fQueryPending:=false; +end; + +{ !!KAP!! 2002-02-15} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.AbortPending; +begin + fQueryPending:=false; +end; + +(************************************************************************************************) +(************************************************************************************************) +function TDnsQuery.NewExtractName(var p : pchar):string; +var N : Integer; + I : Integer; + pc : pchar; +begin + result:=''; + + if (P^=#0) then + Inc(P) + else + repeat + { Get name part length } + N:=Ord(P^); + if (N and $C0)=$C0 then begin + { Message compression } + N := ((N and $3F) shl 8) + Ord(P[1]); + pc:=fResponseBuf; + inc(pc,n); + result:=result+NewExtractName(pc); + // Weiter + Inc(P,2); + n:=0; + end else begin + Inc(P); + if (N<>0) then begin + { Copy name part } + i:=length(result); + setlength(result,i+n); + move(p^,result[i+1],n); + inc(p,n); + if (P^<>#0) then + result:=result+'.'; + end; + end; + until (n=0); +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.WSocketDataAvailable(Sender: TObject; Error: WORD); +Var Flags : Integer; + Ans : PDnsRequestHeader; + i : integer; + REndPtr, + RDataPtr, + P : PChar; +begin + frrcache.lastid:=-1; + FResponseLen:=FWSocket.Receive(@FResponseBuf,SizeOf(FResponseBuf)); + + if (Error<>0) then begin + TriggerRequestDone(Error); + FResponseLen:=0; + exit; + end; + + { Check for minimum response length } + if FResponseLen< SizeOf(TDnsRequestHeader) then begin + TriggerRequestDone(10); + Exit; + end; + + Ans:=PDnsRequestHeader(@FResponseBuf); + + // --- + Flags:=WSocket_ntohs(Ans^.Flags); + { Check if we got a response } + if (Flags and $8000) = 0 then begin + TriggerRequestDone(11); + Exit; + end; + + { Decode response header } + fDnsRequestAnswer.len := FResponseLen; + fDnsRequestAnswer.ID := WSocket_ntohs(Ans^.ID); + fDnsRequestAnswer.qr := (Flags and $8000) = $8000; + fDnsRequestAnswer.opcode := (Flags shr 11) and $000F; + fDnsRequestAnswer.AuthoritativeAnswer := (Flags and $0400) = $0400; + fDnsRequestAnswer.Truncation := (Flags and $0200) = $0200; + fDnsRequestAnswer.RecursionDesired := (Flags and $0100) = $0100; + fDnsRequestAnswer.RecursionAvailable := (Flags and $0080) = $0080; + fDnsRequestAnswer.z := (Flags shr 4) and $0007; + fDnsRequestAnswer.rcode := (Flags and $000F); + fDnsRequestAnswer.QDCount := WSocket_ntohs(Ans^.QDCount); + fDnsRequestAnswer.ANCount := WSocket_ntohs(Ans^.ANCount); + fDnsRequestAnswer.NSCount := WSocket_ntohs(Ans^.NSCount); + fDnsRequestAnswer.ARCount := WSocket_ntohs(Ans^.ARCount); + + P:=@ResponseBuf[SizeOf(TDnsRequestHeader)]; + { Should never be greater than 1 because we sent only one question } + + fQuestion.QuestionName:=NewExtractName(p); + fQuestion.QuestionType:=WSocket_ntohs(PDWORD(p)^); inc(p,sizeof(word)); + fQuestion.QuestionClass:=WSocket_ntohs(PDWORD(p)^); inc(p,sizeof(word)); + + REndPtr:=FResponseBuf; + inc(rendptr,FResponseLen); + + // the following is not very smart due two loops.... + // get number or RRDatas + i:=0; + RDataPtr:=p; + while (integer(REndPtr)>integer(RDataPtr)) do begin + NewExtractName(RDataPtr); + i:=i+1; + inc(RDataPtr,sizeof(TRRInternal)+WSocket_ntohs(pRRInternal(rdataptr)^.rdlength)); + end; + fdatacache.count:=i; + getmem(fdatacache.items,sizeof(fdatacache.items[0])*fdatacache.count); + + // Fetch RRDatas + i:=0; + RDataPtr:=p; + while (integer(REndPtr)>integer(RDataPtr)) do begin + fdatacache.items[i].rrpos:=rdataptr; + NewExtractName(RDataPtr); + fdatacache.items[i].rrtype:=WSocket_ntohs(pRRInternal(rdataptr)^.rrtype); + i:=i+1; + inc(RDataPtr,sizeof(TRRInternal)+WSocket_ntohs(pRRInternal(rdataptr)^.rdlength)); + end; + + TriggerRequestDone(0); +end; + +{ !!KAP!! 2002-02-15} +procedure TDnsQuery.DNSSocketSessionClosed(Sender: TObject; Error: Word); +begin + // das geht garnicht, da dann wsocketdataavailable zu spt aufgerufen wird + //fQueryPending:=false; +end; + +(************************************************************************************************) +(************************************************************************************************) +// 0 : all items, otherwise the queryitems +function TDnsQuery.GetRepsonsecount(nid : integer):integer; +var i : integer; +begin + if (nid=0) then + result:=fdatacache.count + else begin + result:=0; + for i:=0 to fdatacache.count-1 do + if (fdatacache.items[i].rrtype=nid) then + inc(result); + end; +end; + +(************************************************************************************************) +(************************************************************************************************) +// 0 : all items, otherwise the queryitems +function TDnsQuery.GetResponseItem(nid : integer; nindex : integer):TRRRecord; + +var i, + index : integer; + pp : pchar; +begin + // nada + fillchar(result,sizeof(result),0); + result.valid:=false; + + // Cache hit + if (frrcache.lastid=nid) and (frrcache.lastindex=nindex) then begin + result:=frrcache; + exit; + end; + + // store for caching. + result.lastid:=nid; + result.lastindex:=nindex; + + // Search the entry + pp:=nil; + index:=-1; + for i:=0 to fdatacache.count-1 do + if (pp=nil) and ( (nid=0) or (fdatacache.items[i].rrtype=nid) ) then begin + if (nindex=0) then begin + index:=i; + pp:=fdatacache.items[i].rrpos; + end else + nindex:=nindex-1; + end; + + // not found. Better raise exception? + if (pp=nil) then exit; + + // headers + result.name:=NewExtractName(pp); + result.rrtype:=WSocket_ntohs(pRRInternal(pp)^.rrtype); + result.rrclass:=WSocket_ntohs(pRRInternal(pp)^.rrclass); + result.rrttl:=WSocket_ntohl(pRRInternal(pp)^.rrttl); + result.rdlength:=WSocket_ntohs(pRRInternal(pp)^.rdlength); + + // end + inc(pp,sizeof(TRRInternal)); + + // Build the record + case fdatacache.items[index].rrtype of + DnsQueryMD, + DnsQueryMB, + DnsQueryMF : result.madname:=NewExtractName(pp); + DnsQueryMG : result.mgmname:=NewExtractName(pp); + DnsQueryCNAME : result.cname:=NewExtractName(pp); + DnsQueryMR : result.newname:=NewExtractName(pp); + DnsQueryNS : result.nsdname:=NewExtractName(pp); + DnsQueryPTR : result.ptrname:=NewExtractName(pp); + DnsQueryTXT : result.txt:=NewExtractName(pp); + DnsQueryA : begin + result.adress:=PDWORD(pp)^; + result.ipnummer:=WSocket_inet_ntoa(tinaddr(result.adress)); + end; + DnsQueryMX : begin + result.mx.preference:=WSocket_ntohs(PDWORD(pp)^); + inc(pp,2); + result.mx.exchange:=NewExtractName(pp); + end; + DnsQueryHINFO : move(pp^,result.hinfo,sizeof(thinfo)); + DnsQueryMINFO : begin + result.minfo.rmailbx:=NewExtractName(pp); + result.minfo.remailbx:=NewExtractName(pp); + end; + DnsQueryAAAA : begin + move(pp^,result.aaaa,sizeof(TAAAA)); + result.ip6nummer:=format('%p:%p',[ pointer(result.aaaa[0]),pointer(result.aaaa[2]) ]); + end; + DnsQuerySOA : begin + result.soa.mname:=NewExtractName(pp); + result.soa.rname:=NewExtractName(pp); + result.soa.serial:=WSocket_ntohl(pcardinal(pp)^); inc(pp,sizeof(cardinal)); + result.soa.refresh:=WSocket_ntohl(pcardinal(pp)^); inc(pp,sizeof(cardinal)); + result.soa.retry:=WSocket_ntohl(pcardinal(pp)^); inc(pp,sizeof(cardinal)); + result.soa.expire:=WSocket_ntohl(pcardinal(pp)^); inc(pp,sizeof(cardinal)); + result.soa.minimum:=WSocket_ntohl(pcardinal(pp)^); inc(pp,sizeof(cardinal)); + end; + DnsQueryLOC : begin + move(pp^,result.loc,sizeof(TLOCInfo)); + result.locdecode:=Loc2Geo(result.loc); + end; + end; + + // merken + frrcache:=result; + + result.valid:=true; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ + <0><1><129><128><0><1><0><1><0><4><0><5><7>inp + rise<3>com<0><0><15><0><1><192><12><0> + <15><0><1><0><1>QV<0><10><0><10><5>drui + d<192><12><192><12><0><2><0><1><0><1>Qc<0><6><3> + ns1<192><12><192><12><0><2><0><1><0><1>Qc<0> + <20><3>NS1<10>SPRINTLINK + <3>NET<0><192><12><0><2><0><1><0><1>Qc<0> + <6><3>NS2<192>U<192><12><0><2><0><1><0><1>Q + c<0><6><3>NS3<192>U<192>+<0><1><0><1><0> + <1>QV<0><4><143><186><11>F<192>?<0><1><0><1><0> + <1>Qc<0><4><207>iS<30><192>Q<0><1><0><1><0> + <2><144>i<0><4><204>u<214><10><192>q<0><1><0><1><0> + <2><144>i<0><4><199><2><252><10><192><131><0><1><0><1><0> + <2><142><182><0><4><204>a<212><10> +} +{ + <0><3><129><128><0><1><0><1><0><2><0><3><4>rtf + m<2>be<0><0><15><0><1><192><12><0><15><0><1><0> + <1>.b<0><9><0><10><4>mail<192><12><192><12> + <0><2><0><1><0><1>.b<0><11><2>ns<3>dn + s<2>be<0><192><12><0><2><0><1><0><1>.b<0> + <5><2>ns<192><12><192>'<0><1><0><1><0><1>.b + <0><4><195><0>d<253><192>:<0><1><0><1><0><1>QY + <0><4><134>:J!<192>Q<0><1><0><1><0><1>.b + <0><4><195><0>d<253> +} +{ + <0><7><133><128><0><1><0><1><0><2><0><2><3>www + <4>rtfm<2>be<0><0><1><0><1><192><12><0> + <1><0><1><0><1>Q<128><0><4><195><0>d<253><4>rt + fm<2>be<0><0><2><0><1><0><1>Q<128><0><5> + <2>ns<192>-<192>-<0><2><0><1><0><1>Q<128><0> + <9><2>ns<3>dns<192>2<192>@<0><1><0><1> + <0><1>Q<128><0><4><195><0>d<253><192>Q<0><1><0><1> + <0><0><26><132><0><4><134>:J! +} +(* +<0><1><129><128><0><1><0><1><0><5><0><5><9>fu-berlin +<2>de<0><0> + +<29><0><1><192><12><0><29><0><1><0><0>, + +<0><16><0><21><22><19><139>Av<167><130><218>L<242> +<0><152><156>\<192><12><0><2><0><1><0><0><12><176> +<0>"<4>arbi<10>informatik<13>uni-oldenburg<2>de<0> +<192><12><0><2><0><1><0><0><12><176><0><12><5>deneb<3> +dfn<192>d<192><12><0><2><0><1><0><0><12><176><0><6><3> +ns3<192><12><192><12><0><2><0><1><0><0><12><176><0><6> +<3>ns2<192><12><192><12><0><2><0><1><0><0><12><176><0> +<6><3>ns1<192><12><192>F<0><1><0><1><0><0>t<169><0><4> +<134>j<1><7><192>t<0><1><0><1><0><0>9<209><0><4><192>L +<176><9><192><140><0><1><0><1><0><0>T<19><0><4><130> +<133><1>9<192><158><0><1><0><1><0><0><28><206><0><4> +<160>-<10><12><192><176><0><1><0><1><0><0>1<198><0> +<4><160>-<8><8> +*) + +{ !!KAP!! } +{raw translation of some perl-source LOC.pm from package Net::DNS::RR::LOC; + +fu-berlin.de LOC 52 27 19.591 N 13 17 40.978 E 15.00m 1000.00m 10000.00m 10.00m +} +const conv_sec = 1000.0; + conv_min = 60.0 * conv_sec; + conv_deg = 60.0 * conv_min; + zh31 = 1 shl 31; + +procedure SubLOCgeo(longlat : integer; + hemis : String; + var ldeg, lmin, lsec, lmsec : Extended; + var hemic : char); +var + Labs : Extended; +begin + LongLat := WSocket_ntohl(LongLat); + // !!KAP!! 2002-08-31 + if (LongLat<0) + then Labs := Abs(1.0 * LongLat - zh31) + else Labs := Abs(1.0 * LongLat + zh31); + //Labs := Abs(1.0 * LongLat - zh31); + Ldeg := Trunc(labs / conv_deg); + Labs := Labs - ldeg * conv_deg; + Lmin := Trunc(labs / conv_min); + Labs := Labs - lmin * conv_min; + Lsec := Trunc(labs / conv_sec); + Labs := Labs - lsec * conv_sec; + Lmsec := Labs; + Hemic := Copy(Hemis, 1 + ord(LongLat <= zh31), 1)[1]; { yeah. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LongLatToDMS(longlat : longint; hemis : string):string; +Var ldeg, lmin, lsec, lmsec : extended; + hemi : char; +begin + SubLOCgeo(longlat,hemis,ldeg,lmin,lsec,lmsec,hemi); + result := Format('%d %02d %02d.%02.2d', + [round(ldeg), round(lmin), round(lsec), + round(lmsec)]) + ' ' + hemi; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ in cm!! } +function LocAltToAlt(Localt : LongInt) : LongInt; +begin + Result := Round((WSocket_ntohl(localt) - 100000.0 * 100.0) / 100.0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ !!KAP!! } +function Loc2Geo(loc : TLOCInfo):TLogGeo; + { dolle umwandlung } + procedure du(longlat : Integer; + hemis : String; + var ideg, imin, isec, imsec : Integer; + var hemic : Char); + var + ldeg, lmin, lsec, lmsec : extended; + begin + SubLOCgeo(longlat, hemis, ldeg, lmin, lsec, lmsec, hemic); + ideg := Round(ldeg); + imin := Round(lmin); + isec := Round(lsec); + imsec := Round(lmsec); + end; + +begin + Result.version := Loc.version; + Result.longsize := Round(Exp(Ln(10)*(loc.size and $f))); + Result.latsize := Round(Exp(Ln(10)*(loc.size shr 4))); + + Result.horizpre := Loc.horizpre; + Result.vertpre := Loc.vertpre; + + du(loc.latitude, 'NS', result.lad, result.lam, + result.las, result.lams, result.lahem); + du(loc.longitude, 'EW', result.lod, result.lom, + result.los, result.loms, result.lohem); + + Result.altitude := LocAltToAlt(loc.altitude); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/HttpAsp1.dfm b/lib/ics/Delphi/Internet/HttpAsp1.dfm new file mode 100644 index 00000000..9a1bcf56 Binary files /dev/null and b/lib/ics/Delphi/Internet/HttpAsp1.dfm differ diff --git a/lib/ics/Delphi/Internet/HttpAsp1.pas b/lib/ics/Delphi/Internet/HttpAsp1.pas new file mode 100644 index 00000000..5ea17bbb --- /dev/null +++ b/lib/ics/Delphi/Internet/HttpAsp1.pas @@ -0,0 +1,164 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Creation: December 30, 1997 +Version: 1.00 +Description: Sample program to demonstrate some of the THttpCli features. + (POST a message to a CGI) + (requested by "Coen" ) +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpAsp1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, WSocket, HttpProt, ExtCtrls; + +const + HttpPgVersion = 101; + +type + THttpTestForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + SupplierIDEdit: TEdit; + PinEdit: TEdit; + SendButton: TButton; + HttpCli1: THttpCli; + procedure FormCreate(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + HttpTestForm: THttpTestForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.FormCreate(Sender: TObject); +begin + PinEdit.Text := ''; + SupplierIDEdit.Text := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.SendButtonClick(Sender: TObject); +var + DataIn : TMemoryStream; + DataOut : TMemoryStream; + Buf : String; +begin + DisplayMemo.Clear; + DataIn := TMemoryStream.Create; + DataOut := TMemoryStream.Create; + try + Buf := 'suplno=' + Trim(SupplierIDEdit.Text) + + '&PIN=' + Trim(PinEdit.Text) + + '&LOGIN=Login'; + DataOut.Write(Buf[1], Length(Buf)); + DataOut.Seek(0, soFromBeginning); + + httpcli1.SendStream := DataOut; + httpcli1.RcvdStream := DataIn; + httpcli1.Proxy := 'intsrv02'; + httpcli1.ProxyPort := '80'; + HttpCli1.Cookie := 'ASPSESSIONID=OUYRWOSPOFGGPSSF'; + HttpCli1.URL := 'http://www.transmed.co.za/webserv/menu.asp'; + + SendButton.Enabled := FALSE; + try + httpcli1.Post; + finally + SendButton.Enabled := TRUE; + DataIn.Seek(0, 0); + DisplayMemo.Lines.LoadFromStream(DataIn); + end; + finally + DataOut.Free; + DataIn.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/HttpAsy1.dfm b/lib/ics/Delphi/Internet/HttpAsy1.dfm new file mode 100644 index 00000000..152d221c Binary files /dev/null and b/lib/ics/Delphi/Internet/HttpAsy1.dfm differ diff --git a/lib/ics/Delphi/Internet/HttpAsy1.pas b/lib/ics/Delphi/Internet/HttpAsy1.pas new file mode 100644 index 00000000..52fbcfa3 --- /dev/null +++ b/lib/ics/Delphi/Internet/HttpAsy1.pas @@ -0,0 +1,492 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: January 31, 1998 +Version: 1.01 +Description: This program shows how to use the THttpCli component to execute + a list of request sequentialy or simultaneously. + Simultaneous request are possible without using threads because + the THttpCli component is fully event-driven and asynchronous. + Data is not stroed. See the HttpTst sample program for an + example of data store. We keep this sample as simple as possible. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Feb 01, 1998 V1.01 Adedpted to be compatible with Delphi 1 + Save window position and size to ini file. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpAsy1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, HttpProt, IniFiles; + +type + THttpAsyForm = class(TForm) + URLListBox: TListBox; + Panel1: TPanel; + Label1: TLabel; + URLEdit: TEdit; + AddButton: TButton; + Panel2: TPanel; + ExecButton: TButton; + RemoveButton: TButton; + DisplayMemo: TMemo; + HttpCli1: THttpCli; + ReplaceButton: TButton; + ClearDisplayButton: TButton; + HeaderCheckBox: TCheckBox; + DataCheckBox: TCheckBox; + SimultCheckBox: TCheckBox; + AbortButton: TButton; + procedure AddButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure RemoveButtonClick(Sender: TObject); + procedure ExecButtonClick(Sender: TObject); + procedure HttpCli1RequestDone(Sender: TObject; RqType: THttpRequest; + Error: Word); + procedure URLListBoxClick(Sender: TObject); + procedure ReplaceButtonClick(Sender: TObject); + procedure ClearDisplayButtonClick(Sender: TObject); + procedure HttpCli1HeaderData(Sender: TObject); + procedure HttpCli1DocData(Sender: TObject; Buffer: Pointer; + Len: Integer); + procedure AbortButtonClick(Sender: TObject); + private + { Dclarations prives } + FInitialized : Boolean; + FIniFileName : String; + FCurrentItem : Integer; + FHttpCliList : TList; { For simultaneous requests } + FFlagAbort : Boolean; + procedure StartNext; { For sequential requests } + procedure ExecSimultaneous; + procedure ExecSequential; + procedure HttpCliItemRequestDone(Sender: TObject; { For simult. requests } + RqType: THttpRequest; Error: Word); + end; + +var + HttpAsyForm: THttpAsyForm; + +implementation + +{$R *.DFM} + +const + SectionData = 'Data'; + KeyURL = 'URLEdit'; + KeyCount = 'Count'; + KeyList = 'List'; + KeySimult = 'Simultaneous'; + KeyHeader = 'DisplayHeader'; + KeyData = 'DisplayData'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.FormCreate(Sender: TObject); +begin + DisplayMemo.Clear; + FCurrentItem := -1; + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FHttpCliList := TList.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + Count : Integer; + I : Integer; + URL : String; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + URLEdit.Text := IniFile.ReadString(SectionData, KeyURL, ''); + HeaderCheckBox.Checked := (IniFile.ReadInteger(SectionData, KeyHeader, 0) <> 0); + DataCheckBox.Checked := (IniFile.ReadInteger(SectionData, KeyData, 0) <> 0); + SimultCheckBox.Checked := (IniFile.ReadInteger(SectionData, KeySimult, 0) <> 0); + Count := IniFile.ReadInteger(SectionData, KeyCount, 0); + for I := 1 to Count do begin + URL := IniFile.ReadString(SectionData, KeyList + IntToStr(I), ''); + if URL <> '' then + URLListBox.Items.Add(URL); + end; + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; + I : Integer; + Count : Integer; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyURL, URLEdit.Text); + IniFile.WriteInteger(SectionData, KeyHeader, Ord(HeaderCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyData, Ord(DataCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeySimult, Ord(SimultCheckBox.Checked)); + Count := URLListBox.Items.Count; + IniFile.WriteInteger(SectionData, KeyCount, Count); + for I := 1 to Count do + IniFile.WriteString(SectionData, KeyList + IntToStr(I), + URLListBox.Items[I - 1]); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Add an URL to the URL list box } +procedure THttpAsyForm.AddButtonClick(Sender: TObject); +begin + if Trim(URLEdit.Text) <> '' then + URLListBox.Items.Add(URLEdit.Text); + ActiveControl := URLEdit; + URLEdit.SelectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Remove the selected URL from hte URL listbox } +procedure THttpAsyForm.RemoveButtonClick(Sender: TObject); +var + Item : Integer; +begin + Item := URLListBox.ItemIndex; + if Item >= 0 then + URLListBox.Items.Delete(Item); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Execute button click handler. Start sequential or simultaneous execution } +procedure THttpAsyForm.ExecButtonClick(Sender: TObject); +begin + ExecButton.Enabled := FALSE; + FFLagAbort := FALSE; + if SimultCheckBox.Checked then + ExecSimultaneous + else + ExecSequential; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Start simultaneous execution by creating as much THttpCli components as } +{ there are URL in the list box. (We could alternatively limit the number } +{ of THttpCli components and use them sequentially. It would be a } +{ combination of the sequential and simultaneous implementations.) } +{ A TList is used to keep track of all the component created. This is only } +{ needed to abort each one if requested by the user. } +{ The Tag property is used to store the item number, just for display. } +procedure THttpAsyForm.ExecSimultaneous; +var + Count : Integer; + Item : Integer; + AHttpCli : THttpCli; +begin + { Check if the list if empty } + if FHttpCliList.Count > 0 then begin + MessageBeep(MB_OK); + Exit; + end; + + { Get the URL count } + Count := URLListBox.Items.Count; + if Count <= 0 then + Exit; { Nothing to do ! } + + { Create a new HTTP component for each URL, } + { add it to the list and start the request } + for Item := 1 to Count do begin + AHttpCli := THttpCli.Create(Self); + FHttpCliList.Add(AHttpCli); + AHttpCli.Tag := Item; + AHttpCli.URL := URLListBox.items[Item - 1]; + AHttpCli.OnRequestDone := HttpCliItemRequestDone; + AHttpCli.OnHeaderData := HttpCli1HeaderData; + AHttpCli.OnDocData := HttpCli1DocData; + DisplayMemo.Lines.Add('Start item ' + IntToStr(Item) + ': ' + + AHttpCli.Url); + AHttpCli.GetAsync; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This OnRequestDone handler is used for the simultaneous request model. } +{ It search the THttpCli component in the list and remove it. } +procedure THttpAsyForm.HttpCliItemRequestDone( + Sender : TObject; + RqType : THttpRequest; + Error : Word); +var + Item : Integer; + AHttpCli : THttpCli; + Count : Integer; +begin + AHttpCli := Sender as THttpCli; + Item := AHttpCli.Tag; + DisplayMemo.Lines.Add( + 'Finished Item ' + IntToStr(Item) + + ' StatusCode = ' + IntToStr(AHttpCli.StatusCode) + + ' ' + AHttpCli.URL + + ' Error = ' + IntToStr(Error)); + DisplayMemo.Lines.Add(''); + + { Remove the item form the list } + Count := FHttpCliList.Count; + for Item := 1 to Count do begin + if AHttpCli = FHttpCliList.Items[Item - 1] then begin + FHttpCliList.Delete(Item - 1); + break; + end; + end; + + { Free the item } + AHttpCli.Free; + + { Check if the list is empty. If yes, we have all requests finished. } + if FHttpCliList.Count <= 0 then begin + ExecButton.Enabled := TRUE; + DisplayMemo.Lines.Add('All Finished'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.ExecSequential; +begin + if FCurrentItem >= 0 then begin + MessageBeep(MB_OK); + Exit; + end; + FCurrentItem := 0; + StartNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Start the next request (this could also be the first). } +procedure THttpAsyForm.StartNext; +begin + if FFlagAbort then begin + DisplayMemo.Lines.Add('Abort requested'); + FCurrentItem := -1; + ExecButton.Enabled := TRUE; + Exit; + end; + + Inc(FCurrentItem); + if FCurrentItem > URLListBox.Items.Count then begin + DisplayMemo.Lines.Add('All Finished'); + FCurrentItem := -1; + ExecButton.Enabled := TRUE; + Exit; + end; + HttpCli1.Url := URLListBox.Items[FCurrentItem - 1]; + HttpCli1.Tag := FCurrentItem; + DisplayMemo.Lines.Add('Start item ' + IntToStr(FCurrentItem) + ': ' + + HttpCli1.Url); + HttpCli1.GetASync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This OnRequestDone event handler is called during the sequential model. } +{ Just start the next request. } +procedure THttpAsyForm.HttpCli1RequestDone(Sender: TObject; + RqType: THttpRequest; Error: Word); +begin + DisplayMemo.Lines.Add('Finished item ' + IntToStr(FCurrentItem) + + ' StatusCode = ' + IntToStr(HttpCli1.StatusCode) + + ' Error = ' + IntToStr(Error)); + DisplayMemo.Lines.Add(''); + StartNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.URLListBoxClick(Sender: TObject); +begin + UrlEdit.Text := UrlListBox.Items[URLListBox.ItemIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.ReplaceButtonClick(Sender: TObject); +var + Item : Integer; +begin + Item := URLListBox.ItemIndex; + if Item < 0 then + Exit; + URLListBox.Items.Delete(Item); + URLListBox.Items.Insert(Item, UrlEdit.Text); + URLListBox.ItemIndex := Item; + ActiveControl := URLEdit; + URLEdit.SelectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpAsyForm.ClearDisplayButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This OnHeaderData event handler is used in both sequential and } +{ simultaneous requests models. } +procedure THttpAsyForm.HttpCli1HeaderData(Sender: TObject); +var + AHttpCli : THttpCli; +begin + if not HeaderCheckBox.Checked then + Exit; + AHttpCli := Sender as THttpCli; + DisplayMemo.Lines.Add('Item ' + IntToStr(AHttpCli.Tag) + ': ' + + AHttpCli.LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This OnDocData event handler is used in both sequential and } +{ simultaneous requests models. } +procedure THttpAsyForm.HttpCli1DocData(Sender: TObject; Buffer: Pointer; + Len: Integer); +var + AHttpCli : THttpCli; +begin + if not DataCheckBox.Checked then + Exit; + + AHttpCli := Sender as THttpCli; + { Display a message stating that data is available } + DisplayMemo.Lines.Add('Item ' + IntToStr(AHttpCli.Tag) + ' Data'); + + { We could display the data, but it use a huge space in the display } + { DisplayMemo.Lines.Add(StrPas(Buffer)); } + + { We could also store the data somewhere (with the help of OnDocBegin } + { and OnDocEnd events. Or using the RcvdStream property. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Abort all the running request. } +{ In the simultaneous model, we use the list to abort all. } +{ We just need to call abort. We will get the OnRequestDone event with an } +{ error code stating that the request has been aborted. } +procedure THttpAsyForm.AbortButtonClick(Sender: TObject); +var + Count : Integer; + Item : Integer; + AHttpCli : THttpCli; +begin + FFLagAbort := TRUE; + if SimultCheckBox.Checked then begin + Count := FHttpCliList.Count; + for Item := 1 to Count do begin + AHttpCli := THttpCli(FHttpCliList.Items[Item - 1]); + AHttpCli.Abort; + end; + end + else + HttpCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/HttpChk1.dfm b/lib/ics/Delphi/Internet/HttpChk1.dfm new file mode 100644 index 00000000..9eaa6a1f Binary files /dev/null and b/lib/ics/Delphi/Internet/HttpChk1.dfm differ diff --git a/lib/ics/Delphi/Internet/HttpChk1.pas b/lib/ics/Delphi/Internet/HttpChk1.pas new file mode 100644 index 00000000..ac495581 --- /dev/null +++ b/lib/ics/Delphi/Internet/HttpChk1.pas @@ -0,0 +1,147 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: September 4, 1999 +Version: 1.01 +Description: Use HTTP component to check for valid URL. + See IsAddressValid function below. Of course you can remove + display if all you need is a boolean status. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpChk1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, HttpProt; + +type + TCheckUrlForm = class(TForm) + Label1: TLabel; + URLEdit: TEdit; + CheckButton: TButton; + ResultLabel: TLabel; + HttpCli1: THttpCli; + Memo1: TMemo; + procedure CheckButtonClick(Sender: TObject); + procedure HttpCli1RequestDone(Sender: TObject; RqType: THttpRequest; + Error: Word); + procedure HttpCli1HeaderData(Sender: TObject); + private + FDoneFlag : Boolean; + FDoneError : Word; + public + { Public declarations } + function IsAddressValid(URL : String) : Boolean; + end; + +var + CheckUrlForm: TCheckUrlForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCheckUrlForm.CheckButtonClick(Sender: TObject); +begin + Memo1.Clear; + if IsAddressValid(UrlEdit.Text) then + ResultLabel.Caption := 'Valid' + else + ResultLabel.Caption := 'Invalid'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check if an URL is valid. Use HTTP HEAD command to speed up thing. (It } +{ doesn't retrieve document, just webserver answer header). } +{ Syntax of an URL: protocol://[user[:password]@]server[:port]/path } +function TCheckUrlForm.IsAddressValid(URL : String) : Boolean; +var + Timeout : longInt; +begin + try + FDoneFlag := FALSE; + FDoneError := 0; + HttpCli1.URL := URL; + HttpCli1.HeadAsync; + Timeout := GetTickCount + 30000; { 30" timeout } + while not FDoneFlag do begin +{$IFNDEF VER80} + Sleep(0); +{$ENDIF} + Application.ProcessMessages; + if Timeout < Longint(GetTickCount) then begin + HttpCli1.Abort; + Result := FALSE; + Exit; + end; + end; + Result := (HttpCli1.StatusCode = 200); + { You can suppress next line if you don't want display } + Memo1.lines.Add('StatusCode = ' + IntToStr(HttpCli1.StatusCode)); + except + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCheckUrlForm.HttpCli1RequestDone(Sender: TObject; + RqType: THttpRequest; Error: Word); +begin + FDoneFlag := TRUE; + FDoneError := Error; + { You may suppress following two lines if you don't want any display } + if Error <> 0 then + Memo1.Lines.Add('Error #' + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ You can remove this event handler if you don't want to see messages. } +procedure TCheckUrlForm.HttpCli1HeaderData(Sender: TObject); +begin + Memo1.Lines.Add(HttpCli1.LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/HttpDmo1.dfm b/lib/ics/Delphi/Internet/HttpDmo1.dfm new file mode 100644 index 00000000..6cf4bba7 Binary files /dev/null and b/lib/ics/Delphi/Internet/HttpDmo1.dfm differ diff --git a/lib/ics/Delphi/Internet/HttpDmo1.pas b/lib/ics/Delphi/Internet/HttpDmo1.pas new file mode 100644 index 00000000..edb0c48c --- /dev/null +++ b/lib/ics/Delphi/Internet/HttpDmo1.pas @@ -0,0 +1,139 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Creation: December 5, 1997 +Version: 1.02 +Description: Sample program to demonstrate some of the THttpCli features. +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jan 16, 1998 V1.01 Added a proxy edit box. +Aug 18, 2001 V1.02 Shay Horovitz corrected a small bug + in LoadMemoFromMemoryStream. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpDmo1; + +interface + +uses + WinProcs, WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, HttpProt, ExtCtrls; + +type + THttpToMemoForm = class(TForm) + Panel1: TPanel; + Label1: TLabel; + URLEdit: TEdit; + GoButton: TButton; + HttpCli1: THttpCli; + DisplayMemo: TMemo; + Label2: TLabel; + ProxyEdit: TEdit; + procedure GoButtonClick(Sender: TObject); + procedure Panel1Resize(Sender: TObject); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + HttpToMemoForm: THttpToMemoForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure LoadMemoFromMemoryStream(Memo : TMemo; Stream : TMemoryStream); +var + p, q, r : PChar; +begin + p := Stream.Memory; + q := p + Stream.Size;// -1; fixed by Shay Horovitz + r := p; + while (p <> nil) and (p < q) do begin + while (p < q) and (p^ <> #13) and (p^ <> #10) do + Inc(p); + Memo.Lines.Add(Copy(StrPas(r), 1, p - r)); + if (p[0] = #13) and (p[1] = #10) then + Inc(p, 2) + else + Inc(p); + r := p; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpToMemoForm.GoButtonClick(Sender: TObject); +var + Data : TMemoryStream; +begin + DisplayMemo.Clear; + + GoButton.Enabled := FALSE; + Data := TMemoryStream.Create; + try + httpcli1.URL := URLEdit.Text; + httpcli1.Proxy := ProxyEdit.Text; + httpcli1.ProxyPort := '80'; + httpcli1.RcvdStream := Data; + httpcli1.Get; + LoadMemoFromMemoryStream(DisplayMemo, Data); + finally + Data.Free; + GoButton.Enabled := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpToMemoForm.Panel1Resize(Sender: TObject); +begin + GoButton.Left := Panel1.Width - GoButton.Width - 8; + URLEdit.Width := Panel1.Width - URLEdit.Left - GoButton.Width - 16; + ProxyEdit.Width := URLEdit.Width; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/HttpGet1.dfm b/lib/ics/Delphi/Internet/HttpGet1.dfm new file mode 100644 index 00000000..ab30172c Binary files /dev/null and b/lib/ics/Delphi/Internet/HttpGet1.dfm differ diff --git a/lib/ics/Delphi/Internet/HttpGet1.pas b/lib/ics/Delphi/Internet/HttpGet1.pas new file mode 100644 index 00000000..c631a569 --- /dev/null +++ b/lib/ics/Delphi/Internet/HttpGet1.pas @@ -0,0 +1,208 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: January 17, 1998 +Version: 1.00 +Description: This sample program show how to get a document from a webserver + s store it to a file. Also display some progress info. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpGet1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, HttpProt, StdCtrls, IniFiles; + +type + THttpGetForm = class(TForm) + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + URLEdit: TEdit; + ProxyHostEdit: TEdit; + ProxyPortEdit: TEdit; + FileNameEdit: TEdit; + Label5: TLabel; + GetButton: TButton; + AbortButton: TButton; + InfoLabel: TLabel; + HttpCli1: THttpCli; + procedure GetButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure HttpCli1DocData(Sender: TObject; Buffer: Pointer; + Len: Integer); + procedure HttpCli1HeaderData(Sender: TObject); + procedure AbortButtonClick(Sender: TObject); + private + { Dclarations prives } + FInitialized : Boolean; + FIniFileName : String; + public + { Dclarations publiques } + end; + +var + HttpGetForm: THttpGetForm; + +implementation + +{$R *.DFM} +const + SectionData = 'Data'; + KeyURL = 'URL'; + KeyProxyHost = 'ProxyHost'; + KeyProxyPort = 'ProxyPort'; + KeyFileName = 'FileName'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + InfoLabel.Caption := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + URLEdit.Text := IniFile.ReadString(SectionData, KeyURL, + 'http://www.rtfm.be/fpiette/images/overbyte.gif'); + ProxyHostEdit.Text := IniFile.ReadString(SectionData, KeyProxyHost, + ''); + ProxyPortEdit.Text := IniFile.ReadString(SectionData, KeyProxyPort, + '80'); + FileNameEdit.Text := IniFile.ReadString(SectionData, KeyFileName, + 'test.tmp'); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyURL, URLEdit.Text); + IniFile.WriteString(SectionData, KeyProxyHost, ProxyHostEdit.Text); + IniFile.WriteString(SectionData, KeyProxyPort, ProxyPortEdit.Text); + IniFile.WriteString(SectionData, KeyFileName, FileNameEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.GetButtonClick(Sender: TObject); +begin + HttpCli1.URL := URLEdit.Text; + HttpCli1.Proxy := ProxyHostEdit.Text; + HttpCli1.ProxyPort := ProxyPortEdit.Text; + HttpCli1.RcvdStream := TFileStream.Create(FileNameEdit.Text, fmCreate); + GetButton.Enabled := FALSE; + AbortButton.Enabled := TRUE; + InfoLabel.Caption := 'Loading'; + try + try + HttpCli1.Get; + InfoLabel.Caption := 'Received ' + + IntToStr(HttpCli1.RcvdStream.Size) + ' bytes'; + except + on E: EHttpException do begin + InfoLabel.Caption := 'Failed : ' + + IntToStr(HttpCli1.StatusCode) + ' ' + + HttpCli1.ReasonPhrase;; + end + else + raise; + end; + finally + GetButton.Enabled := TRUE; + AbortButton.Enabled := FALSE; + HttpCli1.RcvdStream.Destroy; + HttpCli1.RcvdStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.HttpCli1DocData(Sender: TObject; Buffer: Pointer; + Len: Integer); +begin + InfoLabel.Caption := IntToStr(HttpCli1.RcvdCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.HttpCli1HeaderData(Sender: TObject); +begin + InfoLabel.Caption := InfoLabel.Caption + '.'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpGetForm.AbortButtonClick(Sender: TObject); +begin + HttpCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/HttpPg1.dfm b/lib/ics/Delphi/Internet/HttpPg1.dfm new file mode 100644 index 00000000..19116fc0 Binary files /dev/null and b/lib/ics/Delphi/Internet/HttpPg1.dfm differ diff --git a/lib/ics/Delphi/Internet/HttpPg1.pas b/lib/ics/Delphi/Internet/HttpPg1.pas new file mode 100644 index 00000000..739e4bbe --- /dev/null +++ b/lib/ics/Delphi/Internet/HttpPg1.pas @@ -0,0 +1,246 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Creation: December 4, 1997 +Version: 1.03 +Description: Sample program to demonstrate some of the THttpCli features. + (POST a message to a CGI) + (requested by Walter Daniel Leon Salas" ) + You can see what HttpPg does automatically using your browser + and surfing to http://www.unired.net.pe/mensatel.html HttpPg + does programmatically what you can do manually at this page using + your browser. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 28, 1997 Added a TMemo to display the POST's result. +Jan 16, 1998 Added a Proxy edit box. Added ini file stuff. + Better error handling. Added abort button. +Feb 10, 1999 Corrected Encode function (a test was done the wrong way). + Thanks to Howie Hamlin for finding that one. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpPg1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, WSocket, HttpProt, ExtCtrls, IniFiles; + +const + HttpPgVersion = 101; + +type + THttpTestForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + UserIDEdit: TEdit; + EMailEdit: TEdit; + MessageEdit: TEdit; + SendButton: TButton; + HttpCli1: THttpCli; + ProxyEdit: TEdit; + Label4: TLabel; + AbortButton: TButton; + procedure SendButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure AbortButtonClick(Sender: TObject); + private + { Dclarations prives } + FIniFileName : String; + FInitialized : Boolean; + public + { Dclarations publiques } + end; + +var + HttpTestForm: THttpTestForm; + +implementation + +{$R *.DFM} +const + SectionData = 'Data'; + KeyUserID = 'UserID'; + KeyUserName = 'UserName'; + KeyEMail = 'EMail'; + KeyMessage = 'Message'; + KeyProxy = 'Proxy'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.FormCreate(Sender: TObject); +begin + DisplayMemo.Clear; + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Restore the form position and size, restore the datas for edit boxes. } +procedure THttpTestForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + UserIDEdit.Text := IniFile.ReadString(SectionData, KeyUserID, + '27313'); + EMailEdit.Text := IniFile.ReadString(SectionData, KeyEMail, + 'francois.piette@pophost.eunet.be'); + ProxyEdit.Text := IniFile.ReadString(SectionData, KeyProxy, + ''); + MessageEdit.Text := IniFile.ReadString(SectionData, KeyMessage, + 'Hello World ! (Message sent by HttpPg).'); + + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Save the form position and size, save the datas for edit boxes. } +procedure THttpTestForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyUserID, UserIDEdit.Text); + IniFile.WriteString(SectionData, KeyProxy, ProxyEdit.Text); + IniFile.WriteString(SectionData, KeyMessage, MessageEdit.Text); + IniFile.WriteString(SectionData, KeyEMail, EMailEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Encode the data to be sent to the CGI } +function Encode(const msg : String) : String; +var + I : Integer; +begin + Result := ''; + for I := 1 to Length(msg) do begin + if msg[I] = ' ' then + Result := Result + '+' + else if msg[I] in ['a'..'z', 'A'..'Z', '0'..'9'] then + Result := Result + msg[I] + else + Result := Result + '%' + IntToHex(ord(msg[I]), 2); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Do the job ! } +procedure THttpTestForm.SendButtonClick(Sender: TObject); +var + DataIn : TMemoryStream; + DataOut : TMemoryStream; + Buf : String; +begin + DisplayMemo.Clear; + DataIn := TMemoryStream.Create; { For the response } + DataOut := TMemoryStream.Create; { For the data to be sent } + try + { Build the data to be sent to the CGI. } + Buf := 'ID=' + Encode(UserIDEdit.Text) + + '&REMITE=' + Encode(EMailEdit.Text) + + '&MENSAJE=' + Encode(MessageEdit.Text); + { Write the data to the stream which will be used to send } + DataOut.Write(Buf[1], Length(Buf)); + { Position the stream at the beginning or nothing will be sent } + DataOut.Seek(0, soFromBeginning); + + { Setup the HTTP component to transmit } + httpcli1.SendStream := DataOut; + httpcli1.RcvdStream := DataIn; + httpcli1.Proxy := ProxyEdit.Text; + httpcli1.ProxyPort := '80'; + HttpCli1.URL := 'http://www.unired.net.pe/cgi-bin/a.out'; + + SendButton.Enabled := FALSE; + AbortButton.Enabled := TRUE; + try + try + httpcli1.Post; + { Data sent, copy the webserver response to the DisplayMemo } + DataIn.Seek(0, 0); + DisplayMemo.Lines.LoadFromStream(DataIn); + except + { An error occured ! } + DisplayMemo.Lines.Add('Failed : ' + HttpCli1.ReasonPhrase); + raise + end; + finally + SendButton.Enabled := TRUE; + AbortButton.Enabled := FALSE; + end; + finally + DataOut.Free; + DataIn.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.AbortButtonClick(Sender: TObject); +begin + HttpCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/HttpThr1.dfm b/lib/ics/Delphi/Internet/HttpThr1.dfm new file mode 100644 index 00000000..f9f885d4 Binary files /dev/null and b/lib/ics/Delphi/Internet/HttpThr1.dfm differ diff --git a/lib/ics/Delphi/Internet/HttpThr1.pas b/lib/ics/Delphi/Internet/HttpThr1.pas new file mode 100644 index 00000000..025d7db9 --- /dev/null +++ b/lib/ics/Delphi/Internet/HttpThr1.pas @@ -0,0 +1,269 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE (From a work done by Ed Hochman ) +Creation: Jan 13, 1998 +Version: 1.00 +Description: HttpThrd is a demo program showing how to use THttpCli component + in a multi-threaded program. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpThr1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + HttpProt, StdCtrls, IniFiles; + + +type + TThreadState = (tsInexistant, tsReady, tsInUse); + + THttpThreadForm = class(TForm) + URLEdit: TEdit; + ResultsMemo: TMemo; + DoItButton: TButton; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label6: TLabel; + Thread0Label: TLabel; + Thread1Label: TLabel; + Thread2Label: TLabel; + Thread3Label: TLabel; + Thread4Label: TLabel; + Thread5Label: TLabel; + ProgressListBox: TListBox; + Label14: TLabel; + ProxyEdit: TEdit; + Label15: TLabel; + procedure DoItButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + private + FInitialized : Boolean; + FIniFileName : String; + procedure CreateThread(Sender: TObject); + procedure SetThreadState(Which : Integer; State: TThreadState); + public + procedure ProcessResults(ThreadNumber: Integer; Success : Boolean); + end; + +const + SectionData = 'Data'; + KeyURL = 'URL'; + KeyProxy = 'Proxy'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + +var + HttpThreadForm: THttpThreadForm; + +implementation + +{$R *.DFM} + +uses + HttpThr2; // The thread class is defined there +const + MaxThreads = 6; // If you change this, change labels on the form +var + // The array with all our threads components + ThreadsObjects : array [0..MaxThreads - 1] of THTTPThread; + // The array with all thread states + ThreadsState : array [0..MaxThreads - 1] of TThreadState; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.FormCreate(Sender: TObject); +var + i: Integer; +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + for i := Low(ThreadsObjects) to High(ThreadsObjects) do + SetThreadState(i, tsInexistant); //Not created. + ResultsMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + URLEdit.Text := IniFile.ReadString(SectionData, KeyURL, + 'http://www.rtfm.be/fpiette'); + ProxyEdit.Text := IniFile.ReadString(SectionData, KeyProxy, ''); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyURL, URLEdit.Text); + IniFile.WriteString(SectionData, KeyProxy, proxyEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.DoItButtonClick(Sender: TObject); +var + i: Integer; +begin + for i := Low(ThreadsObjects) to High(ThreadsObjects) do begin + if ThreadsState[i] = tsInexistant then //Thread has not been created yet + CreateThread(Self); + + if ThreadsState[i] = tsReady then begin //Thread is ready for use + with ThreadsObjects[i] do begin + FURL := UrlEdit.Text; + FProxy := ProxyEdit.Text; + SetThreadState(i, tsInUse); // In use + Resume; //get the page + Exit; //For now, only start one thread for each click of DoIt + end; + end; + end; + MessageBeep(MB_OK); + ShowMessage('No more threads available'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.CreateThread(Sender: TObject); +var + i: Integer; +begin + for i := Low(ThreadsObjects) to High(ThreadsObjects) do begin + if ThreadsObjects[i] = nil then begin + ThreadsObjects[i] := THTTPThread.Create(True); + ThreadsObjects[i].Setup(i); //Create the HTTP object + SetThreadState(i, tsReady); + Exit; //Found and activated an unused thread + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpThreadForm.SetThreadState(Which : Integer; State: TThreadState); +begin + ThreadsState[Which] := State; + case which of + 0: Thread0Label.Caption := IntToStr(Ord(State)); + 1: Thread1Label.Caption := IntToStr(Ord(State)); + 2: Thread2Label.Caption := IntToStr(Ord(State)); + 3: Thread3Label.Caption := IntToStr(Ord(State)); + 4: Thread4Label.Caption := IntToStr(Ord(State)); + 5: Thread5Label.Caption := IntToStr(Ord(State)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure LoadMemoFromMemoryStream(Memo : TMemo; Stream : TMemoryStream); +var + p, q, r : PChar; +begin + p := Stream.Memory; + q := p + Stream.Size - 1; + r := p; + while (p <> nil) and (p < q) do begin + while (p < q) and (p^<> #13) do + Inc(p); + Memo.Lines.Add(Copy(StrPas(r), 1, p - r)); + if (p[0] = #13) and (p[1] = #10) then + Inc(p, 2) + else + Inc(p); + r := p; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +// To be called by each thread as it completes (using Synchronize !) +procedure THttpThreadForm.ProcessResults + (ThreadNumber: Integer; Success : Boolean); +var + Stream : TMemoryStream; +begin + ThreadsObjects[ThreadNumber].Suspend; + if Success then begin + ResultsMemo.Lines.Add('* * * * * * THREAD ' + + IntToStr(ThreadNumber) + ' * * * * * *'); + Stream := ThreadsObjects[ThreadNumber].FHttpCli.RcvdStream + as TMemoryStream; + LoadMemoFromMemoryStream(ResultsMemo, Stream); + ResultsMemo.Lines.Add(''); + end + else begin + // There was an error getting data. + ResultsMemo.Lines.Add('Nothing returned by thread: ' + + IntToStr(ThreadNumber)); + end; + ResultsMemo.Lines.Add('* * * * * * * * * * * * * * * * * * * *'); + SetThreadState(ThreadNumber, tsReady); + //Waiting for something to do (get next url here) +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/HttpThr2.pas b/lib/ics/Delphi/Internet/HttpThr2.pas new file mode 100644 index 00000000..ff2992fd --- /dev/null +++ b/lib/ics/Delphi/Internet/HttpThr2.pas @@ -0,0 +1,161 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE (From a work done by Ed Hochman ) +Creation: Jan 13, 1998 +Version: 1.00 +Description: HttpThrd is a demo program showing how to use THttpCli component + in a multi-threaded program. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpThr2; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + HttpProt; + +type + THTTPThread = class(TThread) + private + FProgress : String; + procedure UpdateStatus; + procedure ShowProgress; + procedure Progress(Msg : String); + procedure DocBegin(Sender : TObject); + procedure DocData(Sender : TObject; Buffer : Pointer; Len : Integer); + procedure DocEnd(Sender : TObject); + published + procedure Setup(i: Integer); + procedure Execute; override; + public + FURL : String; + FProxy : String; + FThreadNumber : Integer; + FHttpCli : THTTPCli; + Success : Boolean; + end; + +implementation + +uses + HttpThr1; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.Setup(i: Integer); +begin + FThreadNumber := i; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.UpdateStatus; +begin + HttpThreadForm.ProcessResults(FThreadNumber, Success); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.ShowProgress; +begin + HttpThreadForm.ProgressListBox.Items.Add(FProgress); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.Progress(Msg : String); +begin + FProgress := Msg; + SynChronize(ShowProgress); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.Execute; +begin + FHttpCli := THTTPCli.Create(Nil); + FHttpCli.MultiThreaded := TRUE; + FHttpCli.RcvdStream := TMemoryStream.Create; + FHttpCli.OnDocBegin := DocBegin; + FHttpCli.OnDocEnd := DocEnd; + FHttpCli.OnDocData := DocData; + while not Terminated do begin + Progress(IntToStr(FThreadNumber) + ' Start get'); + with FHttpCli do begin + URL := FURL; + Proxy := FProxy; + (RcvdStream as TMemoryStream).Clear; + try + Get; // Get page from internet + Success := TRUE; + except + Success := FALSE; + end; + end; + + if not Terminated then + Synchronize(UpdateStatus); + end; + + if FHttpCli.RcvdStream <> nil then + FHttpCli.RcvdStream.Free; + + FHttpCli.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.DocBegin(Sender : TObject); +begin + Progress(IntToStr(FThreadNumber) + ' Doc begin'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.DocData(Sender : TObject; Buffer : Pointer; Len : Integer); +begin + Progress(IntToStr(FThreadNumber) + ' Doc data'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPThread.DocEnd(Sender : TObject); +begin + Progress(IntToStr(FThreadNumber) + ' Doc end'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/Httpdmo.dpr b/lib/ics/Delphi/Internet/Httpdmo.dpr new file mode 100644 index 00000000..5d930194 --- /dev/null +++ b/lib/ics/Delphi/Internet/Httpdmo.dpr @@ -0,0 +1,12 @@ +program HttpDmo; + +uses + Forms, + HttpDmo1 in 'HttpDmo1.pas' {HttpToMemoForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpToMemoForm, HttpToMemoForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/Ics.ico b/lib/ics/Delphi/Internet/Ics.ico new file mode 100644 index 00000000..e5f5024b Binary files /dev/null and b/lib/ics/Delphi/Internet/Ics.ico differ diff --git a/lib/ics/Delphi/Internet/IcsDll1.dpr b/lib/ics/Delphi/Internet/IcsDll1.dpr new file mode 100644 index 00000000..f0e2901c --- /dev/null +++ b/lib/ics/Delphi/Internet/IcsDll1.dpr @@ -0,0 +1,286 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: April 03, 2000 +Description: This is a demo showing how to use a TWSocket component in a DLL. + This demo must be used with ICS TcpSrv demo program as a server. + The DLL is a client which connect to the server and send "time" + command, then wait for the reply and return it in the buffer + passed to the DLL. + There is only one function exported from the DLL: IcsDllDemo. + It takes four arguments: a pointer to the hostname to connect to, + a pointer to the port, a pointer to a buffer and a pointer for + buffer size. On entry buffer size must be initialised with the + size of the actual buffer. On exit, it is filled with the + actual reply size. The function's return value is the error code + such as 10061 when the server is not running. +Version: 1.02 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1996-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Apr 29, 2000 V1.01 Use WSocketForceLoadWinsock. +Apr 27, 2002 V1.02 Use WSocketUnregisterClass + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +library IcsDll1; + +{$DEFINE NOFORMS} // This will avoid forms unit and reduce DLL size +// You should add NOFORMS in the project options to be sure to have all units +// compiled with this option. + +uses + Windows, Messages, SysUtils, Classes, WSocket; + +const + WSocketVersion = 102; + CopyRight : String = ' TWSocket (c) 2000-2002 Francois Piette V1.02 '; + +function IcsDllDemo(HostName : PChar; + Port : PChar; + Buffer : PChar; + BufSize : PInteger): Integer; stdcall; forward; +procedure StrToBuffer(Buffer : PChar; BufSize : PInteger; Msg : String); forward; + +exports + IcsDllDemo; + +type + // We use a workerthread to do the job. + // This will allows the DLL to be called by several processes simultaneously + TClientThread = class(TThread) + private + FClientSocket : TWSocket; + FBannerReceived : Boolean; + FErrorCode : PInteger; + FBuffer : PChar; + FBufSize : PInteger; + FHostName : PChar; + FPort : PChar; + procedure ClientWSocketDataAvailable(Sender: TObject; Error: Word); + procedure ClientWSocketSessionConnected(Sender: TObject; Error: Word); + procedure ClientWSocketSessionClosed(Sender: TObject; Error: Word); + protected + procedure Execute; override; + public + constructor Create; + destructor Destroy; override; + + property ClientWSocket : TWSocket read FClientSocket write FClientSocket; + property Buffer : PChar read FBuffer write FBuffer; + property BufSize : PInteger read FBufSize write FBufSize; + property ErrorCode : PInteger read FErrorCode write FErrorCode; + property HostName : PChar read FHostName write FHostName; + property Port : PChar read FPort write FPort; + end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Create a new thread in the blocked state. This allow the user to register } +{ the client thread before it actually start working. } +constructor TClientThread.Create; +begin + FreeOnTerminate := TRUE; + inherited Create(TRUE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Destroy the thread. Destroy the ClientWSocket if needed. } +destructor TClientThread.Destroy; +begin + if Assigned(FClientSocket) then begin + FClientSocket.Destroy; + FClientSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the main thread routine. There is not much to do because TWSocket } +{ is event driven. So everythong to do is done inside an event handler, } +{ mostly the OnDataAvailable event handler which is triggered each time } +{ something is received. } +procedure TClientThread.Execute; +begin + try + { Create the client TWSocket. It is important to create it inside the } + { Execute method because it *must* be created by the thread. } + { Otherwise the messages sent by winsock would be processed in the } + { main thread context, effectively disabling multi-threading. } + FClientSocket := TWSocket.Create(nil); + FClientSocket.OnDataAvailable := ClientWSocketDataAvailable; + FClientSocket.OnSessionConnected := ClientWSocketSessionConnected; + FClientSocket.OnSessionClosed := ClientWSocketSessionClosed; + FClientSocket.LineMode := TRUE; + FClientSocket.Addr := FHostName; + FClientSocket.Port := FPort; + FClientSocket.Proto := 'tcp'; + FClientSocket.Connect; + + { Message loop to handle TWSocket messages } + { The loop is exited when WM_QUIT message is received } + FClientSocket.MessageLoop; + except + on E:Exception do begin + FErrorCode^ := -3; + StrToBuffer(Buffer, BufSize, E.ClassName + ':' + E.Message); + end; + end; + + { Returning from the Execute function effectively terminate the thread } + ReturnValue := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client connection is established. } +procedure TClientThread.ClientWSocketSessionConnected( + Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + FErrorCode^ := Error; + StrToBuffer(Buffer, BufSize, 'Connect failed'); + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); + Exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client connection is closed. } +procedure TClientThread.ClientWSocketSessionClosed( + Sender: TObject; Error: Word); +begin + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when data has been received from server. } +{ Since this sample program use line mode, we comes here only when a } +{ complete line has been received. } +procedure TClientThread.ClientWSocketDataAvailable( + Sender: TObject; + Error: Word); +var + RcvBuffer : String; +begin + // Received the line + RcvBuffer := FClientSocket.ReceiveStr; + // Check if we already received the banner (message sent by server + // as soon as we are connected. + if not FBannerReceived then begin + // We are just receiving the banner. Flag as received + FBannerReceived := TRUE; + // Then send the command to the server + FClientSocket.SendStr('time' + #13 + #10); + end + else begin + // We already received then banner. So this must be the answer + // to our command. Copy to the buffer, without trailling CR/LF + // and without overflowing the given buffer + if Length(RcvBuffer) < BufSize^ then + BufSize^ := Length(RcvBuffer) - 2; // Remove CR/LF + if BufSize^ > 0 then + Move(RcvBuffer[1], Buffer^, BufSize^); + // Then just close the communication + FClientSocket.CloseDelayed; + FErrorCode^ := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Copy a string to a buffer with overflow check. } +procedure StrToBuffer(Buffer : PChar; BufSize : PInteger; Msg : String); +begin + if Length(Msg) < BufSize^ then + BufSize^ := Length(Msg); + if BufSize^ > 0 then + Move(Msg[1], Buffer^, BufSize^); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function IcsDllDemo( + HostName : PChar; + Port : PChar; + Buffer : PChar; + BufSize : PInteger): integer; stdcall; +var + WorkerThread : TClientThread; +begin + try + Result := -1; + // Create a new thread. It is created in sleeping state + WorkerThread := TClientThread.Create; + // Then pass all parameters + WorkerThread.Buffer := Buffer; + WorkerThread.BufSize := BufSize; + WorkerThread.ErrorCode := @Result; + WorkerThread.HostName := HostName; + WorkerThread.Port := Port; + // Then let thread start his work + WorkerThread.Resume; + // And wait until it finishes + WaitForSingleObject(WorkerThread.Handle, INFINITE); + except + on E:Exception do begin + Result := -2; + StrToBuffer(Buffer, BufSize, E.ClassName + ': ' + E.Message); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DLLHandler(Reason: Integer); +begin + if Reason = DLL_PROCESS_DETACH then begin +// MessageBox(0, PChar('Reason = ' + IntToStr(Reason)), 'DLLHandler', MB_OK); + WSocketCancelForceLoadWinsock; + WSocketUnregisterClass; // 27/04/2002 + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +begin +// MessageBox(0, PChar('DLL Init ' + IntToStr(WSocketGCount)), 'DLL', MB_OK); + WSocketForceLoadWinsock; + DLLProc := @DLLHandler; +end. diff --git a/lib/ics/Delphi/Internet/IcsIsap1.dfm b/lib/ics/Delphi/Internet/IcsIsap1.dfm new file mode 100644 index 00000000..50bc95fd Binary files /dev/null and b/lib/ics/Delphi/Internet/IcsIsap1.dfm differ diff --git a/lib/ics/Delphi/Internet/IcsIsap1.pas b/lib/ics/Delphi/Internet/IcsIsap1.pas new file mode 100644 index 00000000..207d000d --- /dev/null +++ b/lib/ics/Delphi/Internet/IcsIsap1.pas @@ -0,0 +1,184 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: ISAPI dll showing how to use ICS component to build extension + to a webserver (note that ICS has a HTTP Server component which + could be used to build a web application without a webserver). + This ISAPI DLL is very basic. When invoked, it will open a FTP + connection to the localhost with user/password root/root and + retrieve the home directory list and return it as an answer + to the client browser. + To use this demo, you have to setup your webserver so that it is + able to execute this ISAPI dll and so that there is a FTP server + running on localhost and accepting user root with password root. + The ICS sample FTP server is OK as well as Microsoft FTP server + provided you configure it correctly. + FTP parameters are hardcoded in DoTheJob procedure. In a real + program, you probably would get them from the requesting URL. + This sample program has been tested with Delphi 5 and IIS5 running + on Windows 2000. Should work as well with other configurations... +Creation: July 22, 2000 +Version: 1.00 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + See http://www.rtfm.be/fpiette/supportuk.htm for subscription. +Legal issues: Copyright (C) 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit IcsIsap1; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } + +interface + +uses + Windows, Messages, SysUtils, Classes, HTTPApp, FtpCli; + +const + IcsIsapi1Version = 100; + CopyRight : String = ' IcsIsapi (c) 2000 F. Piette V1.00 '; + WM_START_MESSAGE = WM_USER + 1; + +type + TIcsIsapiWebModule = class(TWebModule) + procedure WebModule1FtpWebActionItemAction( + Sender : TObject; + Request : TWebRequest; + Response : TWebResponse; + var Handled : Boolean); + end; + +var + IcsIsapiWebModule: TIcsIsapiWebModule; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DoTheJob(FtpCli1 : TFtpClient); +var + Buf : String; +begin + try + // Setup FTP parameters + FtpCli1.HostName := 'localhost'; + FtpCli1.Port := 'ftp'; + FtpCli1.UserName := 'root'; + FtpCli1.Password := 'root'; + FtpCli1.HostFileName := ''; + FtpCli1.HostDirName := ''; + try + FtpCli1.Directory; // This is a synchronous function ! + // Add some data to the directory list + Buf := #13#10 + 'Generated by IcsIsapi' + + #13#10 + 'Visit http://www.overbyte.be'; + FtpCli1.LocalStream.Write(Buf[1], Length(Buf)); + except + on E:Exception do begin + Buf := 'FTP Failed: ' + E.ClassName + ' ' + E.Message + #13#10; + FtpCli1.LocalStream.Position := 0; + FtpCli1.LocalStream.Write(Buf[1], Length(Buf)); + end; + end; + finally + // Posting WM_QUIT will make GetMessage return FALSE and message pump + // loop will terminate. + PostMessage(0, WM_QUIT, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsIsapiWebModule.WebModule1FtpWebActionItemAction( + Sender : TObject; + Request : TWebRequest; + Response : TWebResponse; + var Handled : Boolean); +var + FtpCli1 : TFtpClient; + MsgRec : TMsg; +begin + // Dynamically create an ICS FTP client component. + // We can't use a static component because ISAPI are multithreaded + FtpCli1 := TFtpClient.Create(nil); + try + // We use a stream for data, it is much easier and faster than a file + FtpCli1.LocalStream := TMemoryStream.Create; + try + // This ISAPI is event driven (because ICS uses events) + // So we have to start processing using a custom message + // We pass the reference to FtpCli1 so that handler can do the job + // We can't use a global variable because ISAPI is multithreaded + Postmessage(0, WM_START_MESSAGE, 0, Integer(FtpCli1)); + + // ICS Components need a working message pump because they are event + // driven whithout message pump, nothing will happend at component + // level. A message pump is simply a loop calling Windows API + // GetMessage TranslateMessage and DisptachMessage + // If GetMessage retrieves the WM_QUIT, the return value is FALSE + // and the message loop is broken. } + while GetMessage(MsgRec, 0, 0, 0) do begin + // Our custom message is a thread message (hwnd is nul) + if (MsgRec.hwnd = 0) and (MsgRec.message = WM_START_MESSAGE) then + DoTheJob(TFtpClient(MsgRec.lParam)) + else begin + // Normal processing of any other message + TranslateMessage(MsgRec); + DispatchMessage(MsgRec) + end; + end; + // We comes here after everything is done with FTP + // DoTheJob has posted WM_QUIT message + // We used the stream as an answer for http request + FtpCli1.LocalStream.Position := 0; + // Our answer is just plain text data + Response.ContentType := 'text/plain'; + Response.ContentStream := FtpCli1.LocalStream; + // Send to client browser + Response.SendResponse; + finally + FtpCli1.LocalStream.Free; + end; + finally + FtpCli1.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/IcsIsapi.dpr b/lib/ics/Delphi/Internet/IcsIsapi.dpr new file mode 100644 index 00000000..749de447 --- /dev/null +++ b/lib/ics/Delphi/Internet/IcsIsapi.dpr @@ -0,0 +1,19 @@ +library IcsIsapi; + +uses + WebBroker, + ISAPIApp, + IcsIsap1 in 'IcsIsap1.pas' {IcsIsapiWebModule: TWebModule}; + +{$R *.RES} + +exports + GetExtensionVersion, + HttpExtensionProc, + TerminateExtension; + +begin + Application.Initialize; + Application.CreateForm(TIcsIsapiWebModule, IcsIsapiWebModule); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/MailRcv.dpr b/lib/ics/Delphi/Internet/MailRcv.dpr new file mode 100644 index 00000000..5af0a5c1 --- /dev/null +++ b/lib/ics/Delphi/Internet/MailRcv.dpr @@ -0,0 +1,14 @@ +program MailRcv; + +uses + Forms, + MailRcv1 in 'MailRcv1.pas' {POP3ExcercizerForm}, + MailRcv2 in 'MailRcv2.pas' {MessageForm}; + +{$R *.RES} + +begin + Application.CreateForm(TPOP3ExcercizerForm, POP3ExcercizerForm); + Application.CreateForm(TMessageForm, MessageForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/MailRcv1.dfm b/lib/ics/Delphi/Internet/MailRcv1.dfm new file mode 100644 index 00000000..1bb2a8ad Binary files /dev/null and b/lib/ics/Delphi/Internet/MailRcv1.dfm differ diff --git a/lib/ics/Delphi/Internet/MailRcv1.pas b/lib/ics/Delphi/Internet/MailRcv1.pas new file mode 100644 index 00000000..268d5d9b --- /dev/null +++ b/lib/ics/Delphi/Internet/MailRcv1.pas @@ -0,0 +1,667 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: Show how to use TPop3Cli (POP3 protocol, RFC-1225) +Creation: 03 october 1997 +Version: 1.03 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Nov 12, 1997 V1.01 Added a GetAll button to get all messages waiting in the + POP3 server, copying them to a file using the UIDL to build + the file name (sorry, wont work with D1 because of long file + name). The message is *NOT* deleted from the POP3 server. +Jan 10, 1998 V1.02 Added port selection +Jul 05, 2002 V1.03 Added header display in separate UI gadget + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MailRcv1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, ExtCtrls, StdCtrls, IniFiles, Pop3Prot; + +const + MailRcvVersion = 103; + CopyRight : String = ' MailRcv demo (c) 1997-2002 F. Piette V1.03 '; + +type + TPOP3ExcercizerForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + InfoLabel: TLabel; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + ConnectButton: TButton; + QuittButton: TButton; + UserButton: TButton; + HostEdit: TEdit; + UserNameEdit: TEdit; + PassWordEdit: TEdit; + PassButton: TButton; + MsgNumEdit: TEdit; + RetrButton: TButton; + StatButton: TButton; + ListAllButton: TButton; + ListButton: TButton; + DeleteButton: TButton; + NoopButton: TButton; + LastButton: TButton; + ResetButton: TButton; + TopButton: TButton; + MsgLinesEdit: TEdit; + RpopButton: TButton; + UidlButton: TButton; + ApopButton: TButton; + NextButton: TButton; + GetAllButton: TButton; + PortEdit: TEdit; + Label6: TLabel; + Pop3Client: TPop3Cli; + OpenButton: TButton; + AbortButton: TButton; + Label7: TLabel; + SubjectEdit: TEdit; + Label8: TLabel; + FromEdit: TEdit; + Label9: TLabel; + ToEdit: TEdit; + procedure ConnectButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure QuittButtonClick(Sender: TObject); + procedure UserButtonClick(Sender: TObject); + procedure PassButtonClick(Sender: TObject); + procedure Pop3ClientMessageBegin(Sender: TObject); + procedure Pop3ClientMessageEnd(Sender: TObject); + procedure Pop3ClientMessageLine(Sender: TObject); + procedure RetrButtonClick(Sender: TObject); + procedure StatButtonClick(Sender: TObject); + procedure ListAllButtonClick(Sender: TObject); + procedure ListButtonClick(Sender: TObject); + procedure Pop3ClientListBegin(Sender: TObject); + procedure Pop3ClientListEnd(Sender: TObject); + procedure Pop3ClientListLine(Sender: TObject); + procedure DeleteButtonClick(Sender: TObject); + procedure NoopButtonClick(Sender: TObject); + procedure LastButtonClick(Sender: TObject); + procedure ResetButtonClick(Sender: TObject); + procedure TopButtonClick(Sender: TObject); + procedure RpopButtonClick(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure Pop3ClientDisplay(Sender: TObject; Msg: String); + procedure UidlButtonClick(Sender: TObject); + procedure Pop3ClientUidlBegin(Sender: TObject); + procedure Pop3ClientUidlEnd(Sender: TObject); + procedure Pop3ClientUidlLine(Sender: TObject); + procedure ApopButtonClick(Sender: TObject); + procedure NextButtonClick(Sender: TObject); + procedure GetAllButtonClick(Sender: TObject); + procedure Pop3ClientRequestDone(Sender: TObject; RqType: TPop3Request; + Error: Word); + procedure OpenButtonClick(Sender: TObject); + procedure AbortButtonClick(Sender: TObject); + procedure Pop3ClientHeaderEnd(Sender: TObject); + private + FFile : TextFile; + FFileName : String; + FFileOpened : Boolean; + FGetAllState : Integer; + FMsgPath : String; + procedure Exec(MethodPtr : TPop3NextProc; + MethodName : String); + procedure MessageBegin(Sender: TObject); + procedure MessageLine(Sender: TObject); + procedure GetAllMessageLine(Sender: TObject); + procedure GetAllRequestDone(Sender: TObject; + RqType: TPop3Request; Error: Word); + procedure NextMessageRequestDone(Sender: TObject; + RqType: TPop3Request; Error: Word); + public + { Dclarations publiques } + end; + +var + POP3ExcercizerForm: TPOP3ExcercizerForm; + +implementation + +{$R *.DFM} + +uses + MailRcv2; + +const + IniFileName = 'MAILRCV.INI'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Restore some data from the INI file } +procedure TPOP3ExcercizerForm.FormCreate(Sender: TObject); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + HostEdit.Text := IniFile.ReadString('Data', 'Host', ''); + PortEdit.Text := IniFile.ReadString('Data', 'Port', ''); + UserNameEdit.Text := IniFile.ReadString('Data', 'UserName', ''); + PassWordEdit.Text := IniFile.ReadString('Data', 'Password', ''); + IniFile.Free; + InfoLabel.Caption := ''; + SubjectEdit.Text := ''; + FromEdit.Text := ''; + ToEdit.Text := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Save data to INI file } +procedure TPOP3ExcercizerForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteString('Data', 'Host', HostEdit.Text); + IniFile.WriteString('Data', 'Port', PortEdit.Text); + IniFile.WriteString('Data', 'UserName', UserNameEdit.Text); + IniFile.WriteString('Data', 'Password', PassWordEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the TPop3Client object wants to display } +{ some information such as connection progress or errors. } +procedure TPOP3ExcercizerForm.Pop3ClientDisplay(Sender: TObject; + Msg: String); +begin + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All the TPop3Client method are of the same type. To simplify this demo } +{ application, Exec transfert the parameters form the various EditBoxes } +{ to the Pop3Client instance and then call the appropriate method, showing } +{ the result in the InfoLabel.Caption. } +procedure TPOP3ExcercizerForm.Exec( + MethodPtr : TPop3NextProc; + MethodName : String); +begin + SubjectEdit.Text := ''; + FromEdit.Text := ''; + ToEdit.Text := ''; + + Pop3Client.Host := HostEdit.Text; + Pop3Client.Port := PortEdit.Text; + Pop3Client.UserName := UserNameEdit.Text; + Pop3Client.PassWord := PassWordEdit.Text; + Pop3Client.MsgNum := StrToInt(MsgNumEdit.Text); + Pop3Client.MsgLines := StrToInt(MsgLinesEdit.Text); + { We need to reassign event handlers because we may have changed them } + { doing GetAllMessages for example } + Pop3Client.OnRequestDone := Pop3ClientRequestDone; + Pop3Client.OnMessageBegin := Pop3ClientMessageBegin; + Pop3Client.OnMessageEnd := Pop3ClientMessageEnd; + Pop3Client.OnMessageLine := Pop3ClientMessageLine; + InfoLabel.Caption := MethodName + ' started'; + try + MethodPtr; + InfoLabel.Caption := MethodName + ' ok'; + except + on E:Exception do begin + InfoLabel.Caption := MethodName + ' failed (' + E.Message + ')'; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ConnectButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Connect, 'Connect'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.OpenButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Open, 'Open'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.UserButtonClick(Sender: TObject); +begin + Exec(Pop3Client.User, 'User'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.PassButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Pass, 'Pass'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.QuittButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Quit, 'Quit'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.AbortButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Abort, 'Abort'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.RetrButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Retr, 'Retr'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.StatButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Stat, 'Stat'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ListAllButtonClick(Sender: TObject); +begin + MsgNumEdit.Text := '0'; + Exec(Pop3Client.List, 'List All'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ListButtonClick(Sender: TObject); +begin + Exec(Pop3Client.List, 'List'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.DeleteButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Dele, 'Delete'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NoopButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Noop, 'Noop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.LastButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Last, 'Last'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ResetButtonClick(Sender: TObject); +begin + Exec(Pop3Client.RSet, 'Rset'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.TopButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Top, 'Top'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.RpopButtonClick(Sender: TObject); +begin + Exec(Pop3Client.RPop, 'Rpop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.UidlButtonClick(Sender: TObject); +begin + Exec(Pop3Client.Uidl, 'Uidl'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ApopButtonClick(Sender: TObject); +begin + Exec(Pop3Client.APop, 'Apop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client is about to receive a } +{ message. The MsgNum property gives the message number. } +{ This event handler could be used to open the file used to store the msg. } +{ The file handle could be stored in the TPop3Client.Tag property to be } +{ easily retrieved by the OnMessageLine and OnMessageEnd event handlers. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Message ' + + IntToStr((Sender as TPop3Cli).MsgNum) + + ' begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client has detected the end of a } +{ message, even if there is an error or exception, this event gets called. } +{ This event handler could be used to close the file used to store the msg. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Message ' + + IntToStr((Sender as TPop3Cli).MsgNum) + + ' end ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each message line that TPop3Client is } +{ receiveing. This could be used to write the message lines to a file. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageLine(Sender: TObject); +begin + DisplayMemo.Lines.Add((Sender as TPop3Cli).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client is about to receive a } +{ list line. The MsgNum property gives the message number. } +procedure TPOP3ExcercizerForm.Pop3ClientListBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** List begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client has received the last list } +{ line. } +procedure TPOP3ExcercizerForm.Pop3ClientListEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** List End ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each list line received by TPop3Client. } +procedure TPOP3ExcercizerForm.Pop3ClientListLine(Sender: TObject); +var + Buffer : String; +begin + Buffer := 'MsgNum = ' + IntToStr((Sender as TPop3Cli).MsgNum) + ' ' + + 'MsgSize = ' + IntToStr((Sender as TPop3Cli).MsgSize) + ' ' + + 'Line = ''' + (Sender as TPop3Cli).LastResponse + ''''; + DisplayMemo.Lines.Add(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Uidl begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Uidl end ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlLine(Sender: TObject); +var + Buffer : String; +begin + Buffer := 'MsgNum = ' + IntToStr((Sender as TPop3Cli).MsgNum) + ' ' + + 'MsgUidl = ' + (Sender as TPop3Cli).MsgUidl + ''''; + DisplayMemo.Lines.Add(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.MessageBegin(Sender: TObject); +begin + MessageForm.Caption := 'Message ' + + IntToStr((Sender as TPop3Cli).MsgNum); + MessageForm.Show; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.MessageLine(Sender: TObject); +begin + MessageForm.DisplayMemo.Lines.Add((Sender as TPop3Cli).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NextButtonClick(Sender: TObject); +begin + MessageForm.DisplayMemo.Clear; + MessageForm.Caption := 'Message'; + Pop3Client.OnMessageBegin := MessageBegin; + Pop3Client.OnMessageEnd := nil; + Pop3Client.OnMessageLine := MessageLine; + Pop3Client.OnRequestDone := NextMessageRequestDone; + Pop3Client.MsgNum := StrToInt(MsgNumEdit.Text); + Pop3Client.Retr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NextMessageRequestDone( + Sender: TObject; + RqType: TPop3Request; Error: Word); +begin + if Error <> 0 then + Exit; + + MsgNumEdit.Text := IntToStr(StrToInt(MsgNumEdit.Text) + 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.GetAllMessageLine(Sender: TObject); +begin + Writeln(FFile, (Sender as TPop3Cli).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The procedure here after will start an event chain that will eventually } +{ download all messages for the POP3 server. We cannot simply loop because } +{ the POP3 compomnet is asynchronous: it will not wait for operation done } +{ before returning. We must "chain" operations one after the other using } +{ the OnRequestDone event handler. We use the variable FGetAllState to keep } +{ track of where we are. } +{ To get all messages, we must first call Stat to know how many messages } +{ are on the server, then for each message we call Uidl to get a unique } +{ identifier for each message to build a file name and know if we already } +{ have a message, then we retrieve the message, then we increment the } +{ message number and continue until the number of messages is reached. } +{ We should start a TTimer to handle timeout... } +procedure TPOP3ExcercizerForm.GetAllButtonClick(Sender: TObject); +var + IniFile : TIniFile; +begin + { Get path from INI file } + IniFile := TIniFile.Create(IniFileName); + FMsgPath := IniFile.ReadString('Data', 'MsgPath', + ExtractFilePath(Application.ExeName)); + IniFile.Free; + + { Be sure to have an ending backslash } + if (Length(FMsgPath) > 0) and (FMsgPath[Length(FMsgPath)] <> '\') then + FMsgPath := FMsgPath + '\'; + + FGetAllState := 0; + FFileOpened := FALSE; + Pop3Client.OnRequestDone := GetAllRequestDone; + Pop3Client.OnMessageBegin := nil; + Pop3Client.OnMessageEnd := nil; + Pop3Client.OnMessageLine := GetAllMessageLine; + Pop3Client.Stat; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when a request related to GetAll is done. } +{ We check for errors and our state variable FGetAllState which tells us } +{ where we are (stat, uidl or retr which are the 4 commands we use. } +{ Note that we also could use Dele to remove the messages from the server. } +procedure TPOP3ExcercizerForm.GetAllRequestDone( + Sender: TObject; + RqType: TPop3Request; Error: Word); +begin + if Error <> 0 then begin + if FFileOpened then begin + FFileOpened := FALSE; + CloseFile(FFile); + end; + DisplayMemo.Lines.Add('Error ' + Pop3Client.ErrorMessage); + Exit; + end; + + try + case FGetAllState of + 0: begin { Comes from the Stat command } + if Pop3Client.MsgCount < 1 then begin + DisplayMemo.Lines.Add('No message to download.'); + Exit; + end; + Pop3Client.MsgNum := 1; { Start with first message } + FGetAllState := 1; + Pop3Client.Uidl; + end; + 1: begin { Comes from the Uidl command } + FFileName := FMsgPath + 'Msg ' + Pop3Client.MsgUidl + '.txt'; + if FileExists(FFileName) then begin + DisplayMemo.Lines.Add('Message ' + IntToStr(Pop3Client.MsgNum) + ' already here'); + if Pop3Client.MsgNum >= Pop3Client.MsgCount then begin + DisplayMemo.Lines.Add('Finished'); + Exit; + end; + Pop3Client.MsgNum := Pop3Client.MsgNum + 1; + FGetAllState := 1; + Pop3Client.Uidl; + end + else begin + DisplayMemo.Lines.Add('Message ' + IntToStr(Pop3Client.MsgNum)); + AssignFile(FFile, FFileName); + Rewrite(FFile); + FFileOpened := TRUE; + FGetAllState := 2; + Pop3Client.Retr; + end; + end; + 2: begin { Comes from the Retr command } + FFileOpened := FALSE; + CloseFile(FFile); + if Pop3Client.MsgNum >= Pop3Client.MsgCount then begin + DisplayMemo.Lines.Add('Finished'); + Exit; + end; + Pop3Client.MsgNum := Pop3Client.MsgNum + 1; + FGetAllState := 1; + Pop3Client.Uidl; + end; + else + DisplayMemo.Lines.Add('Invalid state'); + Exit; + end; + except + on E:Exception do begin + if FFileOpened then begin + FFileOpened := FALSE; + CloseFile(FFile); + end; + DisplayMemo.Lines.Add('Error: ' + E.Message); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientRequestDone(Sender: TObject; + RqType: TPop3Request; Error: Word); +begin + DisplayMemo.Lines.Add('Request Done Rq=' + IntToStr(Integer(RqType)) + + ' Error=' + IntToStr(Error)); + + if RqType = pop3Stat then begin + InfoLabel.Caption := 'Stat ok, ' + + IntToStr(Pop3Client.MsgCount) + ' messages ' + + IntToStr(Pop3Client.MsgSize) + ' bytes' + end + else if RqType = pop3List then begin + InfoLabel.Caption := 'List ok, ' + + IntToStr(Pop3Client.MsgNum) + ' message ' + + IntToStr(Pop3Client.MsgSize) + ' bytes' + end + else if RqType = pop3Last then begin + InfoLabel.Caption := 'Last = ' + IntToStr(Pop3Client.MsgNum); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientHeaderEnd(Sender: TObject); +begin + SubjectEdit.Text := Pop3Client.HeaderSubject; + FromEdit.Text := Pop3Client.HeaderFrom; + ToEdit.Text := Pop3Client.HeaderTo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/MailRcv2.dfm b/lib/ics/Delphi/Internet/MailRcv2.dfm new file mode 100644 index 00000000..db072fbf Binary files /dev/null and b/lib/ics/Delphi/Internet/MailRcv2.dfm differ diff --git a/lib/ics/Delphi/Internet/MailRcv2.pas b/lib/ics/Delphi/Internet/MailRcv2.pas new file mode 100644 index 00000000..6ec378a1 --- /dev/null +++ b/lib/ics/Delphi/Internet/MailRcv2.pas @@ -0,0 +1,33 @@ +{ +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + +} +unit MailRcv2; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls; + +type + TMessageForm = class(TForm) + DisplayMemo: TMemo; + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + MessageForm: TMessageForm; + +implementation + +{$R *.DFM} + +end. diff --git a/lib/ics/Delphi/Internet/MailRob.dpr b/lib/ics/Delphi/Internet/MailRob.dpr new file mode 100644 index 00000000..905fdcc0 --- /dev/null +++ b/lib/ics/Delphi/Internet/MailRob.dpr @@ -0,0 +1,12 @@ +program MailRob; + +uses + Forms, + MailRob1 in 'MailRob1.pas' {MailRobForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMailRobForm, MailRobForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/MailRob1.dfm b/lib/ics/Delphi/Internet/MailRob1.dfm new file mode 100644 index 00000000..e69b65b2 Binary files /dev/null and b/lib/ics/Delphi/Internet/MailRob1.dfm differ diff --git a/lib/ics/Delphi/Internet/MailRob1.pas b/lib/ics/Delphi/Internet/MailRob1.pas new file mode 100644 index 00000000..170c56c5 --- /dev/null +++ b/lib/ics/Delphi/Internet/MailRob1.pas @@ -0,0 +1,692 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: RobotMail is a demo program for the SMTP and MBX component from + the ICS package. It's a kind of spam machine... +Creation: May 21, 1998 +Version: 1.10 (Tested with Delphi 3 and 4) +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Aug 03, 1998 V1.10 Adapted with new TSmtpCli component + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MailRob1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, MbxFile, StdCtrls, ExtCtrls, SmtpProt, DB, DBTables; + +const + RobotMailVersion = 110; + +type + TMailRobForm = class(TForm) + MbxHandler: TMbxHandler; + DisplayMemo: TMemo; + TopPanel: TPanel; + GetFromMbxButton: TButton; + EMailMemo: TMemo; + MiddlePanel: TPanel; + Label1: TLabel; + HostEdit: TEdit; + PortEdit: TEdit; + FromEdit: TEdit; + Label2: TLabel; + Subject: TLabel; + SubjectEdit: TEdit; + SignOnEdit: TEdit; + Label4: TLabel; + SmtpClient: TSyncSmtpCli; + MbxFileEdit: TEdit; + SendButton: TButton; + SaveToListButton: TButton; + LstFileEdit: TEdit; + LoadFromListButton: TButton; + InfoLabel: TLabel; + Label3: TLabel; + MsgFileEdit: TEdit; + MsgFileLoadButton: TButton; + SaveMsgFileButton: TButton; + OpenDialog1: TOpenDialog; + procedure GetFromMbxButtonClick(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure SmtpClientGetData(Sender: TObject; LineNum: Integer; + MsgLine: PChar; MaxLen: Integer; var More: Boolean); + procedure SaveToListButtonClick(Sender: TObject); + procedure LoadFromListButtonClick(Sender: TObject); + procedure SmtpClientCommand(Sender: TObject; Msg: String); + procedure SmtpClientResponse(Sender: TObject; Msg: String); + procedure MsgFileLoadButtonClick(Sender: TObject); + procedure SaveMsgFileButtonClick(Sender: TObject); + procedure MbxFileEditDblClick(Sender: TObject); + procedure MsgFileEditDblClick(Sender: TObject); + procedure LstFileEditDblClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FTxtFileName : String; + FMsgLines : TStrings; + FNames : TList; + FLogFileName : String; + FLog : TStream; + FRunning : Boolean; + procedure ProcessMsg; + function SearchHeader(Key : String) : Integer; + procedure ClearNames; + procedure CommitLog; + procedure CloseLog; + procedure Log(const Msg : String); + procedure LoadEMailMessage(FileName : String); + procedure SaveEMailMessage(FileName : String); + public + { Dclarations publiques } + end; + +var + MailRobForm: TMailRobForm; + +implementation + +{$R *.DFM} +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyServer = 'MailServer'; + KeyPort = 'SmtpPort'; + KeyFrom = 'From'; + KeySignOn = 'SignOn'; + KeyMbxFile = 'MbxFile'; + KeyLstFile = 'LstFile'; + KeyMsgFile = 'MsgFile'; + + CrLf : array [0..1] of char = (#13, #10); + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.FormCreate(Sender: TObject); +begin + FMsgLines := TStringList.Create; + FNames := TList.Create; + FIniFileName := LowerCase(Application.ExeName); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FTxtFileName := LowerCase(Application.ExeName); + FTxtFileName := Copy(FTxtFileName, 1, Length(FTxtFileName) - 3) + 'txt'; + FLogFileName := LowerCase(Application.ExeName); + FLogFileName := Copy(FLogFileName, 1, Length(FLogFileName) - 3) + 'log'; + CommitLog; + Log('---- Start ----'); + InfoLabel.Caption := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + DisplayMemo.Clear; + + IniFile := TIniFile.Create(FIniFileName); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + HostEdit.Text := IniFile.ReadString(SectionData, KeyServer, 'mail.server.provider'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, 'smtp'); + FromEdit.Text := IniFile.ReadString(SectionData, KeyFrom, 'your.email@your.provider'); + SignOnEdit.Text := IniFile.ReadString(SectionData, KeySignOn, 'Your full name'); + MbxFileEdit.Text := IniFile.ReadString(SectionData, KeyMbxFile, ''); + LstFileEdit.Text := IniFile.ReadString(SectionData, KeyLstFile, 'c:\temp\emails.txt'); + MsgFileEdit.Text := IniFile.ReadString(SectionData, KeyMsgFile, 'c:\temp\emailmsg.txt'); + IniFile.Free; + LoadEMailMessage(FTxtFileName); + end; + CloseLog; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + Log('Stop'); + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteSTring(SectionData, KeyServer, HostEdit.Text); + IniFile.WriteSTring(SectionData, KeyPort, PortEdit.Text); + IniFile.WriteSTring(SectionData, KeyFrom, FromEdit.Text); + IniFile.WriteSTring(SectionData, KeySignOn, SignOnEdit.Text); + IniFile.WriteSTring(SectionData, KeyMbxFile, MbxFileEdit.Text); + IniFile.WriteSTring(SectionData, KeyLstFile, LstFileEdit.Text); + IniFile.WriteSTring(SectionData, KeyMsgFile, MsgFileEdit.Text); + IniFile.Free; + SaveEMailMessage(FTxtFileName); + MbxHandler.Active := FALSE; + FMsgLines.Destroy; + ClearNames; + FNames.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.LoadEMailMessage(FileName : String); +begin + EMailMemo.Clear; + SubjectEdit.Text := ''; + try + EMailMemo.Lines.LoadFromFile(FileName); + if EMailMemo.Lines.Count > 0 then begin + SubjectEdit.Text := EMailMemo.Lines[0]; + EMailMemo.Lines.Delete(0); + end; + except + on E:Exception do Log('LoadEMailMessage failed: ' + E.Message); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SaveEMailMessage(FileName : String); +begin + EMailMemo.Lines.Insert(0, SubjectEdit.Text); + EMailMemo.Lines.SaveToFile(FileName); + EMailMemo.Lines.Delete(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.CommitLog; +begin + if Assigned(FLog) then + FLog.Destroy; + try + FLog := TFileStream.Create(FLogFileName, fmOpenReadWrite or fmShareDenyNone); + except + on E:EFOpenError do begin + try + FLog := TFileStream.Create(FLogFileName, fmCreate); + FLog.Destroy; + FLog := TFileStream.Create(FLogFileName, fmOpenReadWrite or fmShareDenyNone); + except + DisplayMemo.Lines.Add('Can''t create log file ' + FLogFileName); + FLog := nil; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.CloseLog; +begin + if Assigned(FLog) then begin + FLog.Destroy; + FLog := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.Log(const Msg : String); +var + Buf : String; +begin + if not Assigned(FLog) then begin + CommitLog; + if not Assigned(FLog) then + Exit; + end; + Buf := FormatDateTime('yyyy/mm/dd hh:nn:ss ', Now); + FLog.Seek(0, soFromEnd); + FLog.WriteBuffer(Buf[1], Length(Buf)); + FLog.WriteBuffer(Msg[1], Length(Msg)); + FLog.WriteBuffer(CrLf, 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.GetFromMbxButtonClick(Sender: TObject); +begin + if MbxFileEdit.Text = '' then begin + Application.MessageBox('Please enter the file name in the edit box !', + 'Warning', MB_OK); + Exit; + end; + + GetFromMbxButton.Enabled := FALSE; + try + MbxHandler.FileName := MbxFileEdit.Text; + MbxHandler.Active := TRUE; + ProcessMsg; + finally + GetFromMbxButton.Enabled := TRUE; + MbxHandler.Active := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TMailRobForm.SearchHeader(Key : String) : Integer; +var + Line : String; + I, J : Integer; +begin + Key := UpperCase(Key); + Result := -1; + I := 0; + while I < FMsgLines.Count do begin + Line := FMsgLines.Strings[I]; + if Length(Line) = 0 then { End of header } + Break; + J := Pos(':', Line); + if (J > 0) and (UpperCase(Copy(Line, 1, J - 1)) = Key) then begin + Result := I; + Break; + end; + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.ClearNames; +begin + while FNames.Count > 0 do begin + FreeMem(FNames.Items[0], StrLen(PChar(FNames.Items[0])) + 1); + FNames.Delete(0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function StringCompare(Item1, Item2: Pointer): Integer; +begin + Result := StrComp(PChar(Item1), PChar(Item2)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.ProcessMsg; +var + Line : String; + I : Integer; + EMail : String; + p : PChar; + MsgCount : Integer; + OkCount : Integer; +begin + DisplayMemo.Lines.Add('Clear list'); + ClearNames; + + DisplayMemo.Lines.Add('Reading EMail'); + MsgCount := 0; + OkCount := 0; + while not MbxHandler.Eof do begin + Inc(MsgCount); + FMsgLines.LoadFromStream(MbxHandler.MsgStream); + I := SearchHeader('SUBJECT'); + if I < 0 then + DisplayMemo.Lines.Add('Subject not found') + else begin + Line := FMsgLines.Strings[I]; + + if Copy(Line, 10, 9) = 'SUBSCRIBE' then begin + I := Length(Line); + while (I > 0) and (Line[I] <> ' ') do + Dec(I); + EMail := Copy(Line, I + 1, 255); + GetMem(p, Length(EMail) + 1); + Move(EMail[1], p^, Length(EMail)); + FNames.Add(p); + Inc(OkCount); + end; + end; + MbxHandler.Next; + InfoLabel.Caption := Format('%d/%d/%d', [MsgCount, OkCount, MbxHandler.MsgCount]); + Application.ProcessMessages; + end; + +{$IFNDEF VER80} { Delphi 1 does'nt support sorting TList items } + DisplayMemo.Lines.Add('Sort list'); + FNames.Sort(StringCompare); +{$ENDIF} + + DisplayMemo.Lines.Add('Remove duplicates'); + Line := ''; + p := @Line[1]; + I := 0; + while I < FNames.Count do begin + if StringCompare(p, FNames.Items[I]) = 0 then begin + FreeMem(FNames.Items[I], StrLen(PChar(FNames.Items[I])) + 1); + FNames.Delete(I); + end + else begin + p := FNames.Items[I]; + Inc(I); + end; + end; + + DisplayMemo.Lines.Add('Display list'); + for I := 0 to FNames.Count - 1 do + DisplayMemo.Lines.Add(StrPas(PChar(FNames.Items[I]))); + + DisplayMemo.Lines.Add('Total : ' + IntToStr(FNames.Count)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SendButtonClick(Sender: TObject); +var + EMail : String; + I : Integer; + OkCount : Integer; + BadCount : Integer; + Success : Boolean; +begin + if FRunning then begin + FRunning := FALSE; + Exit; + end; + FRunning := TRUE; + DisplayMemo.Lines.Add('Sending EMails'); + if FNames.Count <= 0 then begin + Application.MessageBox('List is empty', 'Warning', MB_OK); + Exit; + end; + + OkCount := 0; + BadCount := 0; + try + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + Success := SmtpClient.OpenSync; + if not Success then + Exit; + I := 0; + while (not Application.Terminated) and (I < FNames.Count) do begin + if not FRunning then begin + Log('Canceled'); + CommitLog; + DisplayMemo.Lines.Add('Canceled'); + Exit; + end; + EMail := StrPas(PChar(FNames.Items[I])); + DisplayMemo.Lines.Add('Sending to ' + EMail); + Log('Sending to ' + EMail); + Success := FALSE; + try + SmtpClient.RcptName.Clear; + SmtpClient.RcptName.Add(EMail); + SmtpClient.HdrFrom := FromEdit.Text; + SmtpClient.HdrTo := EMail; + SmtpClient.HdrSubject := SubjectEdit.Text; + SmtpClient.FromName := FromEdit.Text; + SmtpClient.EmailFiles := nil; + Success := SmtpClient.MailSync; + except + on E:Exception do Log(E.Message); + end; + if Success then + Inc(OkCount) + else begin + Inc(BadCount); + Log('Can''t send to ' + EMail); + DisplayMemo.Lines.Add('Can''t send to ' + EMail); + { We failed, so disconnect before continuing } + try + SmtpClient.Quit; + except + on E:Exception do Log(E.Message); + end; + try + SmtpClient.Abort; + except + end; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + Success := SmtpClient.OpenSync; + if not Success then + Exit; + end; + CommitLog; + Inc(I); + InfoLabel.Caption := Format('%d/%d/%d', [OkCount, BadCount, FNames.Count]); + end; + finally + try + SmtpClient.Quit; + except + on E:Exception do Log(E.Message); + end; + DisplayMemo.Lines.Add(IntToStr(OkCount) + ' emails sent succesfully'); + DisplayMemo.Lines.Add(IntToStr(BadCount) + ' failed'); + Log(IntToStr(OkCount) + ' emails sent succesfully'); + Log(IntToStr(BadCount) + ' failed'); + CloseLog; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SmtpClientGetData(Sender: TObject; LineNum: Integer; + MsgLine: PChar; MaxLen: Integer; var More: Boolean); +var + Len : Integer; +begin + if LineNum > EMailMemo.Lines.count then + More := FALSE + else begin + Len := Length(EMailMemo.Lines[LineNum - 1]); + { Truncate the line if too long (should wrap to next line) } + if Len >= MaxLen then + StrPCopy(MsgLine, Copy(EMailMemo.Lines[LineNum - 1], 1, MaxLen - 1)) + else + StrPCopy(MsgLine, EMailMemo.Lines[LineNum - 1]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SaveToListButtonClick(Sender: TObject); +var + Stream : TStream; + I : Integer; +begin + DisplayMemo.Lines.Add('Saving to file'); + if FNames.Count <= 0 then begin + Application.MessageBox('List is empty', 'Warning', MB_OK); + Exit; + end; + + Stream := TFileStream.Create(LstFileEdit.Text, fmCreate); + try + for I := 0 to FNames.Count - 1 do begin + Stream.WriteBuffer(PChar(FNames.Items[I])^, StrLen(PChar(FNames.Items[I]))); + Stream.WriteBuffer(CrLf, 2); + end; + DisplayMemo.Lines.Add(IntToStr(FNames.Count) + ' EMails saved'); + finally + Stream.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.LoadFromListButtonClick(Sender: TObject); +var + Stream : TMemoryStream; + I, J : Integer; + p, q : PChar; + Table : TTable; + Field : TField; +begin + DisplayMemo.Lines.Add('Loading from file'); + ClearNames; + if UpperCase(ExtractFileExt(LstFileEdit.Text)) = '.DBF' then begin + Table := TTable.Create(Self); + try + Table.DatabaseName := ExtractFilePath(LstFileEdit.Text); + Table.TableName := ExtractFileName(LstFileEdit.Text); + Table.Open; + Field := Table.FieldByName('EMail'); + while not Table.Eof do begin + GetMem(q, Length(Field.AsString) + 1); + StrPCopy(q, Field.AsString); + FNames.Add(q); + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(StrPas(q)); + Table.Next; + end; + finally + Table.Destroy; + end; + end + else begin + Stream := TMemoryStream.Create; + Stream.LoadFromFile(LstFileEdit.Text); + p := Stream.Memory; + I := 0; + while I < Stream.Size do begin + J := I; + while (I < Stream.Size) and (p[i] <> #13) do + Inc(I); + if p[I] = #13 then + Dec(I); + GetMem(q, I - J + 2); + Move(p[J], q^, I - J + 1); + q[I - J + 1] := #0; + FNames.Add(q); + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(StrPas(q)); + I := I + 3; + end; + Stream.Destroy; + end; + DisplayMemo.Lines.Add(IntToStr(FNames.Count) + ' EMails loaded'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SmtpClientCommand(Sender: TObject; Msg: String); +begin + { Memo boxes are not unlimited...} + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(' ' + Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SmtpClientResponse(Sender: TObject; Msg: String); +begin + { Memo boxes are not unlimited...} + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(' ' + Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.MsgFileLoadButtonClick(Sender: TObject); +begin + LoadEMailMessage(MsgFileEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.SaveMsgFileButtonClick(Sender: TObject); +begin + SaveEMailMessage(MsgFileEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.MbxFileEditDblClick(Sender: TObject); +begin + OpenDialog1.DefaultExt := '.mbx'; + OpenDialog1.Filter := 'Mail files (*.mbx)|*.MBX|All files (*.*)|*.*'; + OpenDialog1.Options := [ofFileMustExist]; + OpenDialog1.Title := 'MailRob - Open MBX file'; + OpenDialog1.InitialDir := ExtractFilePath(MbxFileEdit.Text); + if OpenDialog1.Execute then + MbxFileEdit.Text := OpenDialog1.FileName; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.MsgFileEditDblClick(Sender: TObject); +begin + OpenDialog1.DefaultExt := '.txt'; + OpenDialog1.Filter := 'Message files (*.txt)|*.TXT|All files (*.*)|*.*'; + OpenDialog1.Options := [ofFileMustExist]; + OpenDialog1.Title := 'MailRob - Open message file'; + OpenDialog1.InitialDir := ExtractFilePath(MsgFileEdit.Text); + if OpenDialog1.Execute then + MsgFileEdit.Text := OpenDialog1.FileName; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMailRobForm.LstFileEditDblClick(Sender: TObject); +begin + OpenDialog1.DefaultExt := '.txt'; + OpenDialog1.Filter := 'AMail list files (*.txt)|*.TXT|All files (*.*)|*.*'; + OpenDialog1.Options := [ofFileMustExist]; + OpenDialog1.Title := 'MailRob - Open email list file'; + OpenDialog1.InitialDir := ExtractFilePath(LstFileEdit.Text); + if OpenDialog1.Execute then + LstFileEdit.Text := OpenDialog1.FileName; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/MailSnd.dpr b/lib/ics/Delphi/Internet/MailSnd.dpr new file mode 100644 index 00000000..375b0e20 --- /dev/null +++ b/lib/ics/Delphi/Internet/MailSnd.dpr @@ -0,0 +1,12 @@ +program MailSnd; + +uses + Forms, + MailSnd1 in 'MailSnd1.pas' {SmtpTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(TSmtpTestForm, SmtpTestForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/MailSnd1.dfm b/lib/ics/Delphi/Internet/MailSnd1.dfm new file mode 100644 index 00000000..8b204351 Binary files /dev/null and b/lib/ics/Delphi/Internet/MailSnd1.dfm differ diff --git a/lib/ics/Delphi/Internet/MailSnd1.pas b/lib/ics/Delphi/Internet/MailSnd1.pas new file mode 100644 index 00000000..ac5494ee --- /dev/null +++ b/lib/ics/Delphi/Internet/MailSnd1.pas @@ -0,0 +1,588 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: How to use TSmtpCli component +Creation: 09 october 1997 +Version: 2.03 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Oct 26, 1997 V1.00 Released +Jan 10, 1998 V1.01 Added a Port property +Feb 15, 1998 V1.02 Added file attachement support +Mar 06, 1998 V1.03 Check for DisplayMemo overflow (100 lines allowed) +Aug 03, 1998 V2.00 Revised for new asynchronous SMTP component version +Jul 26, 2001 V2.01 Added authentification +Sep 07, 2002 V2.02 Added Cc and Bcc fields. + Added AllInOne demo to show how to "chain" several operations + using OnRequest done, avoiding any wait loop. This is how event + driven operation has to be done. +Sep 15, 2002 V2.02 Corrected typo error in BuildRcptList where CcEdi was used + where ToEdit should. + Thanks to konstantinos.Kokkorogiannis@diala.greenpeace.org + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MailSnd1; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, SmtpProt, StdCtrls, ExtCtrls, IniFiles; + +const + SmtpTestVersion = 2.03; + CopyRight : String = ' MailSnd (c) 1997-2002 F. Piette V2.03 '; + +type + TSmtpTestForm = class(TForm) + MsgMemo: TMemo; + DisplayMemo: TMemo; + ToolsPanel: TPanel; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Subject: TLabel; + Label4: TLabel; + HostEdit: TEdit; + FromEdit: TEdit; + ToEdit: TEdit; + SubjectEdit: TEdit; + SignOnEdit: TEdit; + PortEdit: TEdit; + Label5: TLabel; + AttachPanel: TPanel; + Label6: TLabel; + FileAttachMemo: TMemo; + InfoPanel: TPanel; + Label7: TLabel; + ClearDisplayButton: TButton; + ConnectButton: TButton; + HeloButton: TButton; + MailFromButton: TButton; + RcptToButton: TButton; + DataButton: TButton; + AbortButton: TButton; + QuitButton: TButton; + MailButton: TButton; + OpenButton: TButton; + Label8: TLabel; + SmtpClient: TSmtpCli; + Label9: TLabel; + Label10: TLabel; + UsernameEdit: TEdit; + PasswordEdit: TEdit; + AuthComboBox: TComboBox; + Label11: TLabel; + EhloButton: TButton; + AuthButton: TButton; + Label12: TLabel; + CcEdit: TEdit; + Label13: TLabel; + BccEdit: TEdit; + AllInOneButton: TButton; + procedure FormCreate(Sender: TObject); + procedure ClearDisplayButtonClick(Sender: TObject); + procedure ConnectButtonClick(Sender: TObject); + procedure SmtpClientRequestDone(Sender: TObject; RqType: TSmtpRequest; + Error: Word); + procedure HeloButtonClick(Sender: TObject); + procedure MailFromButtonClick(Sender: TObject); + procedure RcptToButtonClick(Sender: TObject); + procedure DataButtonClick(Sender: TObject); + procedure AbortButtonClick(Sender: TObject); + procedure QuitButtonClick(Sender: TObject); + procedure MailButtonClick(Sender: TObject); + procedure OpenButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure EhloButtonClick(Sender: TObject); + procedure AuthButtonClick(Sender: TObject); + procedure AllInOneButtonClick(Sender: TObject); + procedure SmtpClientDisplay(Sender: TObject; Msg: String); + procedure SmtpClientGetData(Sender: TObject; LineNum: Integer; + MsgLine: Pointer; MaxLen: Integer; var More: Boolean); + procedure SmtpClientHeaderLine(Sender: TObject; Msg: Pointer; + Size: Integer); + private + FIniFileName : String; + FInitialized : Boolean; + FAllInOneFlag : Boolean; + procedure Display(const Msg : String); + procedure BuildRcptList; + procedure ExceptionHandler(Sender: TObject; E: Exception); + end; + +var + SmtpTestForm: TSmtpTestForm; + +implementation + +{$R *.DFM} +const + SectionData = 'Data'; + KeyHost = 'HostName'; + KeyPort = 'Port'; + KeyFrom = 'From'; + KeyTo = 'To'; + KeyCc = 'Cc'; + KeyBcc = 'Bcc'; + KeySubject = 'Subject'; + KeySignOn = 'SignOn'; + KeyUser = 'UserName'; + KeyPass = 'Password'; + KeyAuth = 'Authentification'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in display memo box, making sure we don't overflow it. } +procedure TSmtpTestForm.Display(const Msg : String); +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + { We preserve only 200 lines } + while DisplayMemo.Lines.Count > 200 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + { Makes last line visible } + {$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.FormCreate(Sender: TObject); +begin + Application.OnException := ExceptionHandler; + DisplayMemo.Clear; + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + HostEdit.Text := IniFile.ReadString(SectionData, KeyHost, + 'localhost'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, + 'smtp'); + FromEdit.Text := IniFile.ReadString(SectionData, KeyFrom, + 'first.last@company.com'); + ToEdit.Text := IniFile.ReadString(SectionData, KeyTo, + 'john.doe@acme;tartempion@brol.fr'); + CcEdit.Text := IniFile.ReadString(SectionData, KeyCc, + ''); + BccEdit.Text := IniFile.ReadString(SectionData, KeyBcc, + 'francois.piette@swing.be'); + SubjectEdit.Text := IniFile.ReadString(SectionData, KeySubject, + 'This is the message subject'); + SignOnEdit.Text := IniFile.ReadString(SectionData, KeySignOn, + 'your name'); + UsernameEdit.Text := IniFile.ReadString(SectionData, KeyUser, + 'account name'); + PasswordEdit.Text := IniFile.ReadString(SectionData, KeyPass, + 'account password'); + AuthComboBox.ItemIndex := IniFile.ReadInteger(SectionData, KeyAuth, + 0); + + Top := IniFile.ReadInteger(SectionWindow, KeyTop, (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, (Screen.Width - Width) div 2); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyHost, HostEdit.Text); + IniFile.WriteString(SectionData, KeyPort, PortEdit.Text); + IniFile.WriteString(SectionData, KeyFrom, FromEdit.Text); + IniFile.WriteString(SectionData, KeyTo, ToEdit.Text); + IniFile.WriteString(SectionData, KeyCc, CcEdit.Text); + IniFile.WriteString(SectionData, KeyBcc, BccEdit.Text); + IniFile.WriteString(SectionData, KeySubject, SubjectEdit.Text); + IniFile.WriteString(SectionData, KeySignOn, SignOnEdit.Text); + IniFile.WriteString(SectionData, KeyUser, UsernameEdit.Text); + IniFile.WriteString(SectionData, KeyPass, PasswordEdit.Text); + IniFile.WriteInteger(SectionData, KeyAuth, AuthComboBox.ItemIndex); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.BuildRcptList; +var + Buf : String; + I : Integer; +begin + SmtpClient.RcptName.Clear; + // Recipient list is the sum of To, Cc and Bcc fields + Buf := ''; + if Length(Trim(ToEdit.Text)) > 0 then + Buf := Trim(ToEdit.Text); + if Length(Trim(CcEdit.Text)) > 0 then + Buf := Buf + ';' + Trim(CcEdit.Text); + if Length(Trim(BccEdit.Text)) > 0 then + Buf := Buf + ';' + Trim(BccEdit.Text); + if (Length(Buf) > 0) and (Buf[1] = ';') then + Buf := Trim(Copy(Buf, 2, Length(Buf))); + while TRUE do begin + I := Pos(';', Buf); + if I <= 0 then begin + SmtpClient.RcptName.Add(Trim(Buf)); + break; + end + else begin + SmtpClient.RcptName.Add(Trim(Copy(Buf, 1, I - 1))); + Delete(Buf, 1, I); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.SmtpClientDisplay(Sender: TObject; Msg: String); +begin + Display(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.SmtpClientGetData( + Sender : TObject; + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More: Boolean); +var + Len : Integer; +begin + if LineNum > MsgMemo.Lines.count then + More := FALSE + else begin + Len := Length(MsgMemo.Lines[LineNum - 1]); + { Truncate the line if too long (should wrap to next line) } + if Len >= MaxLen then + StrPCopy(MsgLine, Copy(MsgMemo.Lines[LineNum - 1], 1, MaxLen - 1)) + else + StrPCopy(MsgLine, MsgMemo.Lines[LineNum - 1]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.SmtpClientHeaderLine( + Sender : TObject; + Msg : Pointer; + Size : Integer); +begin + { This demonstrate how to add a line to the message header } + { Just detect one of the header lines and add text at the end of this } + { line. Use #13#10 to form a new line } + { Here we check for the From: header line and add a Comments: line } + if StrLIComp(Msg, 'From:', 5) = 0 then + StrCat(Msg, #13#10 + 'Comments: This is a test'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.ClearDisplayButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.ExceptionHandler(Sender: TObject; E: Exception); +begin + Application.ShowException(E); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Connect to the mail server } +procedure TSmtpTestForm.ConnectButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + SmtpClient.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Send HELO command with our local identification } +procedure TSmtpTestForm.HeloButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.Helo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.EhloButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.EHlo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.AuthButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.Username := UsernameEdit.Text; + SmtpClient.Password := PasswordEdit.Text; + SmtpClient.AuthType := TSmtpAuthType(AuthComboBox.ItemIndex); + SmtpClient.Auth; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Open is Connect and Helo methods combined } +procedure TSmtpTestForm.OpenButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.Open; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Send originator } +procedure TSmtpTestForm.MailFromButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.FromName := FromEdit.Text; + SmtpClient.MailFrom; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Send recipients } +procedure TSmtpTestForm.RcptToButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + BuildRcptList; + SmtpClient.RcptTo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Send text and attached files to mail server } +procedure TSmtpTestForm.DataButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + BuildRcptList; + SmtpClient.HdrFrom := FromEdit.Text; + SmtpClient.HdrTo := ToEdit.Text; + SmtpClient.HdrCc := CcEdit.Text; + SmtpClient.HdrSubject := SubjectEdit.Text; + SmtpClient.EmailFiles := FileAttachMemo.Lines; + SmtpClient.Data; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MailFrom, RcptTo and Data methods combined } +procedure TSmtpTestForm.MailButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + BuildRcptList; + SmtpClient.HdrFrom := FromEdit.Text; + SmtpClient.HdrTo := ToEdit.Text; + SmtpClient.HdrTo := CcEdit.Text; + SmtpClient.HdrSubject := SubjectEdit.Text; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.FromName := FromEdit.Text; + SmtpClient.EmailFiles := FileAttachMemo.Lines; + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + SmtpClient.Mail; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.QuitButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.Quit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.AbortButtonClick(Sender: TObject); +begin + FAllInOneFlag := FALSE; + SmtpClient.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.SmtpClientRequestDone( + Sender : TObject; + RqType : TSmtpRequest; + Error : Word); +begin + { For every operation, we display the status } + Display('RequestDone Rq=' + IntToStr(Ord(RqType)) + + ' Error='+ IntToStr(Error)); + { Check if the user has asked for "All-In-One" demo } + if not FAllInOneFlag then + Exit; { No, nothing more to do here } + { We are in "All-In-One" demo, start next operation } + { But first check if previous one was OK } + if Error <> 0 then begin + FAllInOneFlag := FALSE; { Terminate All-In-One demo } + Display('Error, stoped All-In-One demo'); + Exit; + end; + case RqType of + smtpConnect: SmtpClient.Helo; + smtpHelo: SmtpClient.MailFrom; + smtpMailFrom: SmtpClient.RcptTo; + smtpRcptTo: SmtpClient.Data; + smtpData: SmtpClient.Quit; + smtpQuit: Display('All-In-One done !'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.AllInOneButtonClick(Sender: TObject); +begin + if SmtpClient.Connected then begin + MessageBeep(MB_OK); + Display('All-In-One demo start in non connected state.'); + Display('Please quit or abort the connection first.'); + Exit; + end; + + FAllInOneFlag := TRUE; + + { Initialize all SMTP component properties from our GUI } + SmtpClient.Host := HostEdit.Text; + SmtpClient.Port := PortEdit.Text; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.FromName := FromEdit.Text; + SmtpClient.HdrFrom := FromEdit.Text; + SmtpClient.HdrTo := ToEdit.Text; + SmtpClient.HdrCc := CcEdit.Text; + SmtpClient.HdrSubject := SubjectEdit.Text; + SmtpClient.EmailFiles := FileAttachMemo.Lines; + { Recipient list is computed from To, Cc and Bcc fields } + { We use a little function to do that. } + BuildRcptList; + { Start first operation to do to send an email } + { Next operations are started from OnRequestDone event } + SmtpClient.Connect +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/MbxSub.dpr b/lib/ics/Delphi/Internet/MbxSub.dpr new file mode 100644 index 00000000..dd36edbd --- /dev/null +++ b/lib/ics/Delphi/Internet/MbxSub.dpr @@ -0,0 +1,13 @@ +program MbxSub; + +uses + Forms, + MbxSub1 in 'MbxSub1.pas' {AppBaseForm}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TAppBaseForm, AppBaseForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/MbxSub1.dfm b/lib/ics/Delphi/Internet/MbxSub1.dfm new file mode 100644 index 00000000..728658d4 Binary files /dev/null and b/lib/ics/Delphi/Internet/MbxSub1.dfm differ diff --git a/lib/ics/Delphi/Internet/MbxSub1.pas b/lib/ics/Delphi/Internet/MbxSub1.pas new file mode 100644 index 00000000..98dc43af --- /dev/null +++ b/lib/ics/Delphi/Internet/MbxSub1.pas @@ -0,0 +1,621 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: Mar 20, 1999 +Description: This program is used to scan an MBX file (Outlook Express) and + search for subscription messages to one of F. Piette mailing + lists. It extract EMail address from the subsject and add it + to a DBF file if not already there. DBF file is automatically + created if not found in same directory as exe file. You can + select MBX file using an entry in INI file. + I use this program to find new subscribers and send a message + to them asking for subscription postcard. + This program will not work with Delphi 1 because it uses + 32 bits features such as splitter bar and long strings. +Version: 1.00 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Unsupported code. +Legal issues: Copyright (C) 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MbxSub1; + +{$IFDEF VER80} + Bomb('Sorry, this program uses 32 bits features.'); +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + IniFiles, StdCtrls, ExtCtrls, MbxFile, Db, DBTables, Bde, Grids, DBGrids, + DBCtrls, ComCtrls; + +const + WM_APPSTARTUP = WM_USER + 1; + +type + TAppBaseForm = class(TForm) + ToolsPanel: TPanel; + MbxHandler1: TMbxHandler; + ScanButton: TButton; + EMailTable: TTable; + PageControl1: TPageControl; + ScanTabSheet: TTabSheet; + DisplayMemo: TMemo; + EMailMemo: TMemo; + Splitter1: TSplitter; + ViewTabSheet: TTabSheet; + Panel1: TPanel; + EMailDBNavigator: TDBNavigator; + EMailDBGrid: TDBGrid; + EMailDataSource: TDataSource; + FindEdit: TEdit; + SortByDateRadioButton: TRadioButton; + SortByEmailRadioButton: TRadioButton; + OpenDialog1: TOpenDialog; + BrowseButton: TButton; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure ScanButtonClick(Sender: TObject); + procedure PageControl1Change(Sender: TObject); + procedure FindEditChange(Sender: TObject); + procedure SortByDateRadioButtonClick(Sender: TObject); + procedure SortByEmailRadioButtonClick(Sender: TObject); + procedure BrowseButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FDatabaseName : String; + FTableName : String; + function Extract(Item : String) : String; + procedure CreateDataTable; + procedure PackTable(aTable : TTable); + procedure WMAppStartup(var msg: TMessage); message WM_APPSTARTUP; + procedure SelectIndex; + public + procedure Display(Msg : String); + property IniFileName : String read FIniFileName write FIniFileName; + end; + +function RenameToNumberedFile(From : String) : String; +function GetToken(pDelim : PCHar; Src : PChar; var Dst : String): PChar; + +var + AppBaseForm: TAppBaseForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Window'; // Must be unique for each window + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyMbxFile = 'MbxFile'; + KeySplitter = 'Splitter'; + TempFileName = 'MbxSub.tmp'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FDatabaseName := LowerCase(ExtractFilePath(Application.ExeName)); + FTableName := 'subscribe.dbf'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + DisplayMemo.Width := IniFile.ReadInteger(SectionData, KeySplitter, Width div 2); + MbxHandler1.FileName := IniFile.ReadString(SectionData, KeyMbxFile, + 'c:\Windows\Application Data\Microsoft\Outlook Express\Mail\Dossier24.mbx'); + IniFile.WriteString(SectionData, KeyMbxFile, MbxHandler1.FileName); + IniFile.Destroy; + DisplayMemo.Clear; + EMailMemo.Clear; + FindEdit.Clear; + SortByEmailRadioButton.Checked := TRUE; + PageControl1.ActivePage := ScanTabSheet; + Caption := 'MbxSub - ' + ExtractFileName(MbxHandler1.FileName); + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteInteger(SectionData, KeySplitter, DisplayMemo.Width); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.WMAppStartup(var msg: TMessage); +var + I : Integer; +begin + Update; + EMailTable.DatabaseName := FDatabaseName; + EMailTable.TableName := FTableName; + try + EMailTable.Open; + except + on E:EDBEngineError do begin + if E.Errors[0].ErrorCode = DBIERR_NOSUCHTABLE then begin + Display('Missing datafile. Creating a new file.'); + CreateDataTable; + EMailTable.Open; + end + else if E.Errors[0].ErrorCode = DBIERR_NOSUCHINDEX then begin + Display('Missing index file. Creating new index file.'); + DeleteFile(FDatabaseName + TempFileName); + RenameFile(FDatabaseName + FTableName, FDatabaseName + TempFileName); + CreateDataTable; + DeleteFile(FDatabaseName + FTableName); + RenameFile(FDatabaseName + TempFileName, FDatabaseName + FTableName); + PackTable(EMailTable); + EMailTable.Open; + end + else if (E.Errors[0].Category = ERRCAT_DATACORRUPT) and + (E.ErrorCount > 1) and + (UpperCase(ExtractFileExt(E.Errors[1].Message)) = '.MDX') then begin + Display('Corrupt index file. Rebuilding index file.'); + DeleteFile(FDatabaseName + TempFileName); + RenameFile(FDatabaseName + FTableName, FDatabaseName + TempFileName); + CreateDataTable; + DeleteFile(FDatabaseName + FTableName); + RenameFile(FDatabaseName + TempFileName, FDatabaseName + FTableName); + PackTable(EMailTable); + EMailTable.Open; + end + else if E.Errors[0].ErrorCode = DBIERR_HEADERCORRUPT then begin + Display('Corrupt data file.'); + Display('Save corrupted file to: ''' + + RenameToNumberedFile(FDatabaseName + + FTableName) + + ''''); + Display('Creating new data file.'); + CreateDataTable; + EMailTable.Open; + end + else begin + Display(E.ClassName + ': ' + E.Message); + for I := 0 to E.ErrorCount - 1 do + Display(IntToStr(E.Errors[I].ErrorCode) + '/' + + IntToStr(E.Errors[I].Category) + + ': ' + E.Errors[I].Message); + end; + end; + end; + EMailTable.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.Display(Msg : String); +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + while DisplayMemo.Lines.Count > 200 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +//Fri, 19 Mar 1999 18:50:07 +0100 +function ExtractDate(S : String) : TDateTime; +var + P : PChar; + Token : String; + Year, Month, Day : Word; +begin + P := PChar(S); + if P = nil then begin + Result := 0; + Exit; + end; + // Get day of week + P := GetToken(' ', P, Token); + Token := LowerCase(Copy(Trim(Token), 1, 3)); + if not ((Token = 'mon') or (Token = 'tue') or + (Token = 'wed') or (Token = 'thu') or + (Token = 'fri') or (Token = 'sat') or (Token = 'sun')) then + raise Exception.Create('Invalid day name: ' + S); + + // get day + P := GetToken(' ', P, Token); + Day := StrToInt(Trim(Token)); + + // get month + P := GetToken(' ', P, Token); + Token := LowerCase(Trim(Token)); + if Token = 'jan' then + Month := 1 + else if Token = 'feb' then + Month := 2 + else if Token = 'mar' then + Month := 3 + else if Token = 'apr' then + Month := 4 + else if Token = 'may' then + Month := 5 + else if Token = 'jun' then + Month := 6 + else if Token = 'jul' then + Month := 7 + else if Token = 'aug' then + Month := 8 + else if Token = 'sep' then + Month := 9 + else if Token = 'oct' then + Month := 10 + else if Token = 'nov' then + Month := 11 + else if Token = 'dec' then + Month := 12 + else + raise Exception.Create('Invalid month name: ' + S); + + // get year + GetToken(' ', P, Token); + Year := StrToInt(Trim(Token)); + + Result := EncodeDate(Year, Month, Day); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.ScanButtonClick(Sender: TObject); +var + Subject : String; + Token : String; + List : String; + EMail : String; + P : PChar; + MsgDate : String; + MsgCount : Integer; + NewCount : Integer; + FieldEMail : TField; + FieldSubDate : TField; +// FieldUnsDate : TField; +// FieldName : TField; +begin + Display('Scanning ' + MbxHandler1.FileName); + PageControl1.ActivePage := ScanTabSheet; + MsgCount := 0; + NewCount := 0; + EMailTable.Active := TRUE; + EMailTable.IndexName := 'EMAIL'; + FieldEMail := EMailTable.FieldByName('EMail'); + FieldSubDate := EMailTable.FieldByName('SubDate'); +// FieldName := EMailTable.FieldByName('Name'); +// FieldUnsDate := EMailTable.FieldByName('UnsDate'); + + MbxHandler1.Active := TRUE; + MbxHandler1.First; + while not MbxHandler1.Eof do begin + Inc(MsgCount); + Subject := Extract('Subject'); +// Display(Subject); + P := PChar(Subject); + P := GetToken(' ', P, Token); + Token := LowerCase(Trim(Token)); + if Token = 'subscribe' then begin + P := GetToken(' ', P, List); + List := LowerCase(Trim(List)); + if (List = 'twsocket') or + (List = 'twsocket-announce') or + (List = 'midware') then begin + GetToken(' ', P, EMail); + EMail := LowerCase(Trim(EMail)); +if Copy(Email, 1, 5) = 'napol' then + MessageBeep(MB_OK); + EMailTable.SetKey; + FieldEMail.AsString := EMail; + EMailTable.GotoNearest; + if FieldEMail.AsString <> EMail then begin + // Do not exists yet, will create + Inc(NewCount); + MsgDate := Extract('Date'); + Display(List + ' ' + EMail); + EMailMemo.Lines.Add(EMail + ';'); + EMailTable.Append; + FieldEMail.AsString := EMail; + FieldSubDate.AsString := FormatDateTime('YYYYMMDD', ExtractDate(MsgDate)); + EMailTable.Post; + end; + end; + end; + MbxHandler1.Next; + end; + MbxHandler1.Active := FALSE; + EMailTable.Active := FALSE; + Display('Done ' + IntToStr(MsgCount) + '/' + IntToStr(NewCount)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TAppBaseForm.Extract(Item : String) : String; +var + P, Q, R : PChar; +begin + Result := ''; + P := MbxHandler1.MsgStream.Memory; + Q := StrPos(P, PChar(#13#10 + Item + ': ')); + if Q <> nil then begin + R := StrPos(Q + 2, #13#10); + if R > Q then begin + SetLength(Result, R - Q - 2 - Length(Item) - 2); + if Length(Result) > 0 then + Move(Q[2 + Length(Item) + 2], Result[1], Length(Result)); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.PackTable(aTable : TTable); +var + Status : Integer; +begin + aTable.Active := FALSE; + aTable.Exclusive := TRUE; + aTable.Active := TRUE; + + Status := DbiPackTable(aTable.DataBase.Handle, + aTable.Handle, + nil, nil, TRUE); + + if Status <> DBIERR_NONE then + DbiError(Status); + aTable.Active := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.CreateDataTable; +var + Table : TTable; +begin + Table := TTable.Create(nil); + try + Table.TableType := ttDBase; + Table.DatabaseName := FDatabaseName; + Table.TableName := FTableName; + with Table.FieldDefs do begin + Clear; + + Add('SubDate', ftString, 8, FALSE); + Add('UnsDate', ftString, 8, FALSE); + Add('EMail', ftString, 64, FALSE); + Add('Name', ftString, 64, FALSE); + end; + + // A bug in D3 prevent us from defining the indexes before calling + // CreateTable. We will just add the indexes after creation. + Table.CreateTable; + Table.AddIndex('EMail', 'EMAIL+SUBDATE', [ixExpression]); + Table.AddIndex('SubDate', 'SUBDATE', []); + + finally + Table.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +// Replace any existing file extension, or add an extension is none exists. +// The extension is a 3 digits number, with leading zeros, build to make +// it unique. Numbering start at 001 and increment until an unused number +// is found. If 1000 is reached, then an exception will be triggered. +function RenameToNumberedFile(From : String) : String; +var + FPath : String; + FDir : String; + FName : String; + FExt : String; + FBaseName : String; + FileHandle : DWORD; + Count : Integer; +begin + FExt := ExtractFileExt(From); + FName := Copy(From, 1, Length(From) - Length(FExt)); + FName := ExtractFileName(FName); + FDir := ExtractFilePath(From); + if FDir[Length(FDir)] <> '\' then + FDir := FDir + '\'; + + Count := 1; + while TRUE do begin + FBaseName := FName + '.' + Format('%3.3d', [Count]); + FPath := FDir + FBaseName; + FileHandle := CreateFile(PChar(FPath), + GENERIC_READ or GENERIC_WRITE, + 0, // ShareMode + nil, // SecurityAttributes + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + 0); // TemplateFile + if FileHandle = INVALID_HANDLE_VALUE then begin + RenameFile(From, FPath); + Result := FPath; + Exit; + end; + // File exists, close it and continue + Windows.CloseHandle(FileHandle); + + // Be sure to not loop forever here ! + Inc(Count); + if Count >= 1000 then + raise Exception.Create('RenameToNumberedFile failed'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetToken(pDelim : PChar; Src : PChar; var Dst : String): PChar; +var + FldSep : Char; + RecSep : Char; +begin + Dst := ''; + if Src = nil then begin + Result := nil; + Exit; + end; + + FldSep := pDelim[0]; + RecSep := pDelim[1]; + Result := Src; + + while (Result^ <> FldSep) and (Result^ <> RecSep) do begin + Dst := Dst + Result^; + Inc(Result); + end; + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.PageControl1Change(Sender: TObject); +begin + if PageControl1.ActivePage = ViewTabSheet then begin + EMailTable.Active := TRUE; + SelectIndex; + end + else + EMailTable.Active := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.SelectIndex; +begin + if SortByEmailRadioButton.Checked then + EMailTable.IndexName := 'EMAIL' + else + EMailTable.IndexName := 'SUBDATE'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.FindEditChange(Sender: TObject); +var + FldName : String; +begin + if not EMailTable.Active then + Exit; + SelectIndex; + if SortByEmailRadioButton.Checked then + FldName := 'EMAIL' + else + FldName := 'SUBDATE'; + EMailTable.SetKey; + EMailTable.FieldByName(FldName).AsString := LowerCase(Trim(FindEdit.Text)); + EMailTable.GotoNearest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.SortByDateRadioButtonClick(Sender: TObject); +begin + SelectIndex; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.SortByEmailRadioButtonClick(Sender: TObject); +begin + SelectIndex; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TAppBaseForm.BrowseButtonClick(Sender: TObject); +var + IniFile : TIniFile; +begin + OpenDialog1.DefaultExt := 'mbx'; + OpenDialog1.InitialDir := ExtractFilePath(MbxHandler1.FileName); + OpenDialog1.FileName := ExtractFileName(MbxHandler1.FileName); + OpenDialog1.Filter := 'Mailbox files (*.mbx)|*.mbx|All files (*.*)|*.*'; + if not OpenDialog1.Execute then + Exit; + MbxHandler1.Close; + MbxHandler1.FileName := OpenDialog1.FileName; + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyMbxFile, MbxHandler1.FileName); + IniFile.Free; + Caption := 'MbxSub - ' + ExtractFileName(MbxHandler1.FileName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/MimeDemo.dpr b/lib/ics/Delphi/Internet/MimeDemo.dpr new file mode 100644 index 00000000..94a5d757 --- /dev/null +++ b/lib/ics/Delphi/Internet/MimeDemo.dpr @@ -0,0 +1,12 @@ +program MimeDemo; + +uses + Forms, + MimeDmo1 in 'MIMEDMO1.PAS' {MimeDecodeForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMimeDecodeForm, MimeDecodeForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/MimeDmo1.dfm b/lib/ics/Delphi/Internet/MimeDmo1.dfm new file mode 100644 index 00000000..9dd9765f Binary files /dev/null and b/lib/ics/Delphi/Internet/MimeDmo1.dfm differ diff --git a/lib/ics/Delphi/Internet/MimeDmo1.pas b/lib/ics/Delphi/Internet/MimeDmo1.pas new file mode 100644 index 00000000..52b766e8 --- /dev/null +++ b/lib/ics/Delphi/Internet/MimeDmo1.pas @@ -0,0 +1,352 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: This program is a demo for TMimeDecode component. + TMimeDecode is a component whose job is to decode MIME encoded + EMail messages (file attach). You can use it for example to + decode messages received with a POP3 component. + MIME is described in RFC-1521. headers are described if RFC-822. +Creation: March 08, 1998 +Version: 1.05 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +Updates: +Sep 13, 1998 V1.01 Added part and header end numbering +Feb 16/02/99 V1.02 In OnPartLine event handler, assemble line of text for + display. +May 04, 2002 V1.03 Adapted InLineDecodeLine event to new Len argument. + Added file store for UUEncoded files. +Nov 01, 2002 V1.04 Changed PChar arguments to Pointer to work around Delphi 7 + bug with PAnsiChar<->PChar (change has be done in component). + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MimeDmo1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, IniFiles, MimeDec; + +type + TMimeDecodeForm = class(TForm) + Panel1: TPanel; + FileEdit: TEdit; + DecodeButton: TButton; + Memo1: TMemo; + MimeDecode1: TMimeDecode; + Label1: TLabel; + ClearButton: TButton; + procedure DecodeButtonClick(Sender: TObject); + procedure MimeDecode1PartBegin(Sender: TObject); + procedure MimeDecode1PartEnd(Sender: TObject); + procedure MimeDecode1PartHeaderLine(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure ClearButtonClick(Sender: TObject); + procedure MimeDecode1HeaderLine(Sender: TObject); + procedure MimeDecode1PartLine(Sender: TObject; Data: Pointer; + DataLen: Integer); + procedure MimeDecode1HeaderBegin(Sender: TObject); + procedure MimeDecode1HeaderEnd(Sender: TObject); + procedure MimeDecode1PartHeaderBegin(Sender: TObject); + procedure MimeDecode1PartHeaderEnd(Sender: TObject); + procedure MimeDecode1InlineDecodeBegin(Sender: TObject; + Filename: String); + procedure MimeDecode1InlineDecodeEnd(Sender: TObject; + Filename: String); + procedure MimeDecode1InlineDecodeLine(Sender: TObject; + Line: Pointer; Len : Integer); + private + FInitialized : Boolean; + FIniFileName : String; + FLineBuf : array [0..255] of char; + FCharCnt : Integer; + FFileStream : TFileStream; + FFileName : String; + procedure Display(Msg: String); + end; + +var + MimeDecodeForm: TMimeDecodeForm; + +implementation + +{$R *.DFM} +const + SectionData = 'Data'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + KeyFile = 'FileName'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + Memo1.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + FileEdit.Text := IniFile.ReadString(SectionData, KeyFile, ''); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyFile, FileEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.DecodeButtonClick(Sender: TObject); +begin + Memo1.Clear; + Update; + MimeDecode1.DecodeFile(FileEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.Display(Msg: String); +begin + { TMemo cannot hold too much data. Limit to 400 lines } + if Memo1.Lines.count > 400 then + Memo1.Clear; + Memo1.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartBegin(Sender: TObject); +begin + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' BEGIN ----------'); + FCharCnt := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartEnd(Sender: TObject); +begin + if FCharCnt > 0 then begin + Display(StrPas(FLineBuf)); + FCharCnt := 0; + end; + + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' END ----------'); + { Close file, if any } + if Assigned(FFileStream) then begin + FFileStream.Destroy; + FFileStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Decoded data arrives here. This routine suppose that we have text data } +{ organized in lines. } +procedure TMimeDecodeForm.MimeDecode1PartLine( + Sender : TObject; + Data : Pointer; + DataLen : Integer); +var + I : Integer; +begin + { Copy data to LineBuf until CR/LF } + I := 0; + while (I < DataLen) do begin + if PChar(Data)[I] = #13 then { Just ignre CR } + Inc(I) + else if PChar(Data)[I] = #10 then begin { LF is end of line } + FLineBuf[FCharCnt] := #0; + Display(StrPas(FLineBuf)); + FCharCnt := 0; + Inc(I); + end + else begin + FLineBuf[FCharCnt] := PChar(Data)[I]; + Inc(FCharCnt); + Inc(I); + end; + if FCharCnt >= (High(FLineBuf) - 1) then begin + { Buffer overflow, display data accumulated so far } + FLineBuf[High(FLineBuf) - 1] := #0; + Display(StrPas(FLineBuf)); + FCharCnt := 0; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderLine(Sender: TObject); +begin + Display('Part header: ' + StrPas(MimeDecode1.CurrentData)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.ClearButtonClick(Sender: TObject); +begin + Memo1.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderLine(Sender: TObject); +begin + Display('Msg header: ' + StrPas(MimeDecode1.CurrentData)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderBegin(Sender: TObject); +begin + Display('--------- HEADER BEGIN ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderEnd(Sender: TObject); +begin + Display('--------- HEADER END ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderBegin(Sender: TObject); +begin + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' HEADER BEGIN ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderEnd(Sender: TObject); +begin + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' HEADER END ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1InlineDecodeBegin( + Sender : TObject; + FileName : String); +begin + Display('--------- INLINE begin. Filename is ''' + FileName + ''''); + Display(''); + FFileName := FileNAme; + if Assigned(FFileStream) then + FFileStream.Destroy; { Close previous file, if any } + FFileStream := TFileStream.Create('MimeFile_' + FFileName, fmCreate); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1InlineDecodeEnd( + Sender : TObject; + Filename : String); +begin + Display('--------- INLINE end'); + { Close file, if any } + if Assigned(FFileStream) then begin + FFileStream.Destroy; + FFileStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1InlineDecodeLine( + Sender : TObject; + Line : Pointer; + Len : Integer); +var + LastLine : String; + DataLine : String; +begin + if (Line = nil) or (Len <= 0) then + Exit; + { If any file assigned, then write data to it } + if Assigned(FFileStream) then + FFileStream.Write(Line^, Len); + + SetLength(DataLine, Len); + Move(Line^, DataLine[1], Len); + if Memo1.Lines.Count < 1 then + Memo1.Lines.Add(DataLine) + else begin + LastLine := Memo1.Lines.Strings[Memo1.Lines.Count - 2]; + Memo1.Lines.Delete(Memo1.Lines.Count - 1); + Memo1.Lines.Delete(Memo1.Lines.Count - 1); + LastLine := LastLine + DataLine; + Memo1.Lines.Add(LastLine); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/MimeTst.dpr b/lib/ics/Delphi/Internet/MimeTst.dpr new file mode 100644 index 00000000..a4bb0b85 --- /dev/null +++ b/lib/ics/Delphi/Internet/MimeTst.dpr @@ -0,0 +1,12 @@ +program MimeTst; + +uses + Forms, + MimeTst1 in 'MimeTst1.pas' {MimeTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMimeTestForm, MimeTestForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/MimeTst1.dfm b/lib/ics/Delphi/Internet/MimeTst1.dfm new file mode 100644 index 00000000..da15472b Binary files /dev/null and b/lib/ics/Delphi/Internet/MimeTst1.dfm differ diff --git a/lib/ics/Delphi/Internet/MimeTst1.pas b/lib/ics/Delphi/Internet/MimeTst1.pas new file mode 100644 index 00000000..d2aa7cea --- /dev/null +++ b/lib/ics/Delphi/Internet/MimeTst1.pas @@ -0,0 +1,232 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE + Using code donated by Brad Choate +Object: Demo for MIME support (files attach) in sending files. + This demo use TSyncSmtpCli for simplicity. High performnace + programs should use the async SMTP component TSmtpCli. +Creation: February 14th, 1998 +Version: 1.13 +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 12, 1998 V1.10 Revised to use the new TSyncSmtpCli component. +Mar 06, 1999 V1.11 Replaced LastDelimiter by FindLastDelim for D2 compatibility + Added Trim functions for Delphi 1. Used GetText/SetText for + TStrings because of Delphi 1. +Aug 21, 1999 V1.12 Disposed memory got with GetText. +Nov 01, 2002 V1.13 Changed arguments in events handlers from PChar to Pointer + to reflect this change in the component. + Added a call to HeloSync before MailSync because some servers + really wants this before accepting email. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MimeTst1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, SmtpProt, StdCtrls, ExtCtrls; + +type + TMimeTestForm = class(TForm) + FSmtp: TSyncSmtpCli; + MsgMemo: TMemo; + DisplayMemo: TMemo; + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + FromEdit: TEdit; + ToEdit: TEdit; + Label3: TLabel; + SubjectEdit: TEdit; + SendMailButton: TButton; + HostEdit: TEdit; + Label4: TLabel; + Panel2: TPanel; + FileListMemo: TMemo; + Label5: TLabel; + Label6: TLabel; + Panel3: TPanel; + Label7: TLabel; + procedure SendMailButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FSmtpDisplay(Sender: TObject; Msg: String); + procedure FSmtpGetData(Sender: TObject; LineNum: Integer; + MsgLine: Pointer; MaxLen: Integer; var More: Boolean); + end; + +var + MimeTestForm: TMimeTestForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeTestForm.FormCreate(Sender: TObject); +begin + FileListMemo.Clear; + FileListMemo.Lines.Add('c:\temp\test.txt'); + FileListMemo.Lines.Add('c:\temp\brol.txt'); + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function FindLastDelim(Delim : Char; const S : String) : Integer; +begin + Result := Length(S); + while (Result > 0) and (S[Result] <> Delim) do + Dec(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ General-purpose routine that reformats the text portion } +{ of our message to a particular margin. } +procedure Reformat(stl: TStrings; iMargin: integer); +var + sOverage, sUnderage: string; + i, iBreak: integer; +begin + i := 0; + while i < stl.Count do begin + if Length(stl[i]) > iMargin then begin + iBreak := FindLastDelim(' ', Copy(stl[i], 1, iMargin)); + if iBreak > 0 then begin + sOverage := Trim(Copy(stl[i], iBreak, Length(stl[i]))); + sUnderage := Copy(stl[i], 1, iBreak - 1); + if Trim(sUnderage) <> '' then begin + stl[i] := sUnderage; + stl.Insert(i + 1, sOverage); + end; + end; + end; + Inc(i); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeTestForm.SendMailButtonClick(Sender: TObject); +var + TextPtr : PChar; +begin + TextPtr := FileListMemo.Lines.GetText; + FSmtp.EmailFiles.SetText(TextPtr); + StrDispose(TextPtr); + FSmtp.RcptName.Clear; + FSmtp.RcptName.Add(ToEdit.text); + FSmtp.HdrSubject := SubjectEdit.text; + FSmtp.FromName := FromEdit.Text; + FSmtp.HdrFrom := FromEdit.Text; + FSmtp.HdrTo := ToEdit.Text; + FSmtp.Host := HostEdit.Text; + FSmtp.Port := 'smtp'; + FSmtp.ConnectSync; + FSmtp.HeloSync; + FSmtp.MailSync; + FSmtp.QuitSync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeTestForm.FSmtpDisplay(Sender: TObject; Msg: String); +begin + if DisplayMemo.Lines.count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeTestForm.FSmtpGetData(Sender: TObject; LineNum: Integer; + MsgLine: Pointer; MaxLen: Integer; var More: Boolean); +var + Len : Integer; +begin + if LineNum > MsgMemo.Lines.count then + More := FALSE + else begin + Len := Length(MsgMemo.Lines[LineNum - 1]); + { Truncate the line if too long (should wrap to next line) } + if Len >= MaxLen then + StrPCopy(MsgLine, Copy(MsgMemo.Lines[LineNum - 1], 1, MaxLen - 1)) + else + StrPCopy(MsgLine, MsgMemo.Lines[LineNum - 1]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/NewsRdr1.dfm b/lib/ics/Delphi/Internet/NewsRdr1.dfm new file mode 100644 index 00000000..9e91f054 Binary files /dev/null and b/lib/ics/Delphi/Internet/NewsRdr1.dfm differ diff --git a/lib/ics/Delphi/Internet/NewsRdr1.pas b/lib/ics/Delphi/Internet/NewsRdr1.pas new file mode 100644 index 00000000..fe13113e --- /dev/null +++ b/lib/ics/Delphi/Internet/NewsRdr1.pas @@ -0,0 +1,732 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This sample program show how to use TNntpCli to write a news + enabled application. +Creation: December 24, 1997 +Version: 0.94 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Dec 29, 1997 V0.91 Adapted to be compatible with Delphi 1 +Jan 04, 1998 V0.92 Added LIST OVERVIEW.FMT, XOVER and DATE +Jan 31, 1998 V0.93 Added the UserEditBox (used for Post command) + Added code to get UserName and EMail from IE settings +Aug 14, 1999 V0.94 Added support for XHDR and MODE READER. + Corrected a bug that let Connect and Abort button + disabled when DNS lookup failed. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit NewsRdr1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, NntpCli, StdCtrls, ExtCtrls, IniFiles; + +type + TNNTPForm = class(TForm) + NntpCli1: TNntpCli; + Panel1: TPanel; + ServerEdit: TEdit; + ConnectButton: TButton; + Label1: TLabel; + DisplayMemo: TMemo; + AbortButton: TButton; + GroupButton: TButton; + GroupEdit: TEdit; + ArticleNumEdit: TEdit; + ArticleByNumberButton: TButton; + ArticleByIDButton: TButton; + NextButton: TButton; + LastButton: TButton; + HeadByNumberButton: TButton; + HeadByIDButton: TButton; + BodyByNumberButton: TButton; + BodyByIDButton: TButton; + StatByNumberButton: TButton; + StatByIDButton: TButton; + ListButton: TButton; + ArticleIDEdit: TEdit; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + PostButton: TButton; + QuitButton: TButton; + FileEdit: TEdit; + Label5: TLabel; + NewGroupsButton: TButton; + NewNewsButton: TButton; + HelpButton: TButton; + XOverButton: TButton; + OverViewFmtButton: TButton; + DateButton: TButton; + UserEdit: TEdit; + Label6: TLabel; + Label7: TLabel; + UserNameEdit: TEdit; + Label8: TLabel; + PasswordEdit: TEdit; + AuthenticateButton: TButton; + ModeReaderButton: TButton; + XHdrButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure NntpCli1SessionConnected(Sender: TObject; Error: Word); + procedure NntpCli1SessionClosed(Sender: TObject; Error: Word); + procedure AbortButtonClick(Sender: TObject); + procedure GroupButtonClick(Sender: TObject); + procedure NntpCli1RequestDone(Sender: TObject; RqType: TNntpRequest; Error: Word); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure ArticleByNumberButtonClick(Sender: TObject); + procedure NntpCli1DataAvailable(Sender: TObject; Error: Word); + procedure NntpCli1MessageLine(Sender: TObject); + procedure NntpCli1MessageBegin(Sender: TObject); + procedure NntpCli1MessageEnd(Sender: TObject); + procedure ArticleByIDButtonClick(Sender: TObject); + procedure NextButtonClick(Sender: TObject); + procedure LastButtonClick(Sender: TObject); + procedure HeadByIDButtonClick(Sender: TObject); + procedure HeadByNumberButtonClick(Sender: TObject); + procedure BodyByIDButtonClick(Sender: TObject); + procedure BodyByNumberButtonClick(Sender: TObject); + procedure StatByIDButtonClick(Sender: TObject); + procedure StatByNumberButtonClick(Sender: TObject); + procedure ListButtonClick(Sender: TObject); + procedure PostButtonClick(Sender: TObject); + procedure QuitButtonClick(Sender: TObject); + procedure NewGroupsButtonClick(Sender: TObject); + procedure NewNewsButtonClick(Sender: TObject); + procedure HelpButtonClick(Sender: TObject); + procedure XOverButtonClick(Sender: TObject); + procedure OverViewFmtButtonClick(Sender: TObject); + procedure DateButtonClick(Sender: TObject); + procedure AuthenticateButtonClick(Sender: TObject); + procedure ModeReaderButtonClick(Sender: TObject); + procedure XHdrButtonClick(Sender: TObject); + procedure NntpCli1XHdrBegin(Sender: TObject); + procedure NntpCli1XHdrEnd(Sender: TObject); + procedure NntpCli1XHdrLine(Sender: TObject); + private + FInitialized : Boolean; + FDataStream : TStream; + function GetStream : TStream; + procedure Display(Msg : String); + procedure LineToStream(Buf : String); + end; + +var + NNTPForm: TNNTPForm; + +implementation + +{$R *.DFM} + +{$IFNDEF VER80} +uses + Registry; +{$ENDIF} + + +const + IniFileName = 'NEWSRDR.INI'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + EMail : String; + UserName : String; +{$IFNDEF VER80} + Reg : TRegistry; + Key : String; +{$ENDIF} +begin + if FInitialized then + Exit; + FInitialized := TRUE; + + EMail := 'your.name@yourcompany.domain'; + UserName := 'Your Name'; + +{$IFNDEF VER80} + { Get username and EMail from the Internet Explorer settings } + { Should add code for Netscape Navigator... } + Reg := TRegistry.Create; + Reg.RootKey := HKEY_CURRENT_USER; + Key := '\Software\Microsoft\Internet Mail and News\Mail'; + if Reg.OpenKey(Key, FALSE) then begin + EMail := Reg.ReadString('Sender EMail'); + UserName := Reg.ReadString('Sender Name'); + end; + Reg.CloseKey; + Reg.Free; +{$ENDIF} + + IniFile := TIniFile.Create(IniFileName); + Top := IniFile.ReadInteger('Window', 'Top', Top); + Left := IniFile.ReadInteger('Window', 'Left', Left); + Width := IniFile.ReadInteger('Window', 'Width', Width); + Height := IniFile.ReadInteger('Window', 'Height', Height); + ServerEdit.Text := IniFile.ReadString('Data', 'Server', ''); + ArticleNumEdit.Text := IniFile.ReadString('Data', 'ArticleNum', ''); + ArticleIDEdit.Text := IniFile.ReadString('Data', 'ArticleID', ''); + FileEdit.Text := IniFile.ReadString('Data', 'File', 'nntprdr.txt'); + UserNameEdit.Text := IniFile.ReadString('Data', 'UserName', ''); + PasswordEdit.Text := IniFile.ReadString('Data', 'Password', ''); + UserEdit.Text := IniFile.ReadString('Data', 'User', + '"' + UserName + '" <' + EMail + '>'); + GroupEdit.Text := IniFile.ReadString('Data', 'Group', + 'borland.public.delphi.thirdparty-tools'); + IniFile.Free; + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteString('Data', 'Server', ServerEdit.Text); + IniFile.WriteString('Data', 'Group', GroupEdit.Text); + IniFile.WriteString('Data', 'ArticleNum', ArticleNumEdit.Text); + IniFile.WriteString('Data', 'ArticleID', ArticleIDEdit.Text); + IniFile.WriteString('Data', 'File', FileEdit.Text); + IniFile.WriteString('Data', 'User', UserEdit.Text); + IniFile.WriteString('Data', 'UserName', UserNameEdit.Text); + IniFile.WriteString('Data', 'Password', PasswordEdit.Text); + IniFile.WriteInteger('Window', 'Top', Top); + IniFile.WriteInteger('Window', 'Left', Left); + IniFile.WriteInteger('Window', 'Width', Width); + IniFile.WriteInteger('Window', 'Height', Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.Display(Msg : String); +begin + { Limit the memo to 100 lines } + while DisplayMemo.Lines.Count > 100 do + DisplayMemo.Lines.Delete(1); + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NntpCli1SessionConnected(Sender: TObject; Error: Word); +begin + AbortButton.Enabled := TRUE; + Display('Connected, StatusCode = ' + IntToStr(NntpCli1.StatusCode)); + if NntpCli1.PostingPermited then + Display('Posting permited') + else + Display('Posting not permited'); + Display(NntpCli1.LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NntpCli1SessionClosed(Sender: TObject; Error: Word); +begin + AbortButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + Display('Connection closed'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each NNTP command when the command has } +{ been exected (correctly or not). } +procedure TNNTPForm.NntpCli1RequestDone( + Sender: TObject; + RqType: TNntpRequest; + Error: Word); +begin + Display('Request done. LastResponse = ' + + NntpCli1.LastResponse); + + if Error = 0 then + Display('No error') + else + Display('Error #' + IntToStr(Error)); + + case RqType of + nntpConnect: + begin + if Error <> 0 then begin + AbortButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + Display('Connect failed'); + end; + end; + nntpGroup: + begin + Display('ArticleEstimated = ' + IntToStr(NntpCli1.ArticleEstimated)); + Display('ArticleFirst = ' + IntToStr(NntpCli1.ArticleFirst)); + Display('ArticleLast = ' + IntToStr(NntpCli1.ArticleLast)); + ArticleNumEdit.Text := IntToStr(NntpCli1.ArticleFirst); + end; + nntpPost, nntpQuit, nntpAbort, nntpHelp, nntpNewGroups, nntpNewNews, + nntpXOver, nntpListOverViewFmt, nntpAuthenticate, nntpModeReader, + nntpXHdr: + begin + { Nothing to do } + end; + nntpDate: + begin + Display('Server Date is ' + DateTimeToStr(NntpCli1.ServerDate)); + end; + nntpStatByNumber, nntpStatByID, + nntpHeadByNumber, nntpHeadByID, + nntpBodyByNumber, nntpBodyByID, + nntpArticleByNumber, nntpArticleByID, + nntpNext, nntpLast: + begin + Display('ArticleNumber = ' + + IntToStr(NntpCli1.ArticleNumber)); + Display('ArticleID = ' + + '<' + NntpCli1.ArticleID + '>'); + if Error = 0 then begin + ArticleNumEdit.Text := IntToStr(NntpCli1.ArticleNumber); + ArticleIDEdit.Text := NntpCli1.ArticleID; + end; + end; + else + Display('Unknown request type.'); + end; + + { If any stream where used, destroy it } + if Assigned(FDataStream) then begin + FDataStream.Free; + FDataStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TNntpCli when it has received data and } +{ don't know what to do with it. It should normally not occur ! } +procedure TNNTPForm.NntpCli1DataAvailable(Sender: TObject; Error: Word); +begin + Display('Data: ' + NntpCli1.LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TNntpCli component just before the } +{ component will begin receiving a message. It's a good place to open a } +{ file or start a progress bar. } +procedure TNNTPForm.NntpCli1MessageBegin(Sender: TObject); +begin + Display('Message begin'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TNntpCli component for each line of an } +{ incomming message. Header line as well as body lines are comming here. } +{ It's a good place to write to a file or update screen or progress bar. } +{ It's also the place to intercept header lines. } +procedure TNNTPForm.NntpCli1MessageLine(Sender: TObject); +var + NewsGroupName : String; + LastArticle : Integer; + FirstArticle : Integer; + PostingFlag : Char; +begin + Display('Line: ' + NntpCli1.LastResponse); + ParseListLine(NntpCli1.LastResponse, + NewsGroupName, + LastArticle, + FirstArticle, + PostingFlag); + { It the place to do something with NewsGroupName, LastArticle, } + { FirstArticle and PostingFlag } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TNntpCli component when a message has } +{ been received completely. It's a good place to close a file, delete the } +{ progress bar and alert user. } +procedure TNNTPForm.NntpCli1MessageEnd(Sender: TObject); +begin + Display('Message End'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This function is called internally to create a TFileStream if any file } +{ name is specified in the FileEdit box. If the edit box is blank, nil is } +{ returned. The TFileStream will be supplyed to the comoponent for every } +{ command which can take a TStream to store data such as ArticleByNum. } +{ The stream is destroyed in the OnRequestDone event handler. } +function TNNTPForm.GetStream : TStream; +begin + { Delete the previous stream if not already done } + if Assigned(FDataStream) then begin + FDataStream.Free; + FDataStream := nil; + end; + + if Trim(FileEdit.Text) = '' then + FDataStream := nil + else begin + { Try to open the file stream. Trap errors. } + try + FDataStream := TFileStream.Create(Trim(FileEdit.Text), fmCreate); + except + on E:Exception do begin + { Display an error message in our TMemo } + Display(E.Message); + FDataStream := nil; + raise; { Show the exception box } + end; + end; + end; + Result := FDataStream; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.ConnectButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + ConnectButton.Enabled := FALSE; + NntpCli1.Host := ServerEdit.Text; + NntpCli1.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.AbortButtonClick(Sender: TObject); +begin + NntpCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.QuitButtonClick(Sender: TObject); +begin + NntpCli1.Quit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.GroupButtonClick(Sender: TObject); +begin + NntpCli1.Group(GroupEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NextButtonClick(Sender: TObject); +begin + NntpCli1.Next; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.LastButtonClick(Sender: TObject); +begin + NntpCli1.Last; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.ArticleByIDButtonClick(Sender: TObject); +begin + NntpCli1.ArticleByID(ArticleIDEdit.Text, GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.ArticleByNumberButtonClick(Sender: TObject); +begin + NntpCli1.ArticleByNumber(StrToInt(ArticleNumEdit.Text), GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.HeadByIDButtonClick(Sender: TObject); +begin + NntpCli1.HeadByID(ArticleIDEdit.Text, GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.HeadByNumberButtonClick(Sender: TObject); +begin + NntpCli1.HeadByNumber(StrToInt(ArticleNumEdit.Text), GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.BodyByIDButtonClick(Sender: TObject); +begin + NntpCli1.BodyByID(ArticleIDEdit.Text, GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.BodyByNumberButtonClick(Sender: TObject); +begin + NntpCli1.BodyByNumber(StrToInt(ArticleNumEdit.Text), GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.StatByIDButtonClick(Sender: TObject); +begin + NntpCli1.StatByID(ArticleIDEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.StatByNumberButtonClick(Sender: TObject); +begin + NntpCli1.StatByNumber(StrToInt(ArticleNumEdit.Text)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.ListButtonClick(Sender: TObject); +begin + if Application.MessageBox('This could take a VERY long time, proceed ? ', + 'Warning', MB_YESNO) <> ID_YES then + Exit; + NntpCli1.List(GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NewGroupsButtonClick(Sender: TObject); +begin + NntpCli1.NewGroups(Now - 10, FALSE, '', GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NewNewsButtonClick(Sender: TObject); +begin + NntpCli1.NewNews(Now - 1, FALSE, GroupEdit.Text, '', GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.HelpButtonClick(Sender: TObject); +begin + NntpCli1.Help(GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpForm.LineToStream(Buf : String); +begin + Display('Line: ' + Buf); + Buf := Buf + #13#10; + FDataStream.WriteBuffer(Buf[1], Length(Buf)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Posting a message require to build the message, including his header. } +{ Here we use a TMemoryStream to create a message on the fly. Normally we } +{ should use a TFileStream to get the message from a file where it has } +{ been written by some user interface. } +procedure TNNTPForm.PostButtonClick(Sender: TObject); +begin + { Delete the stream if not already done } + if Assigned(FDataStream) then begin + FDataStream.Free; + FDataStream := nil; + end; + + { Create a new stream in memory } + FDataStream := TMemoryStream.Create; + + { Write the message header } + LineToStream('From: ' + UserEdit.Text); + LineToStream('Newsgroups: ' + GroupEdit.Text); + LineToStream('Subject: Internet Components Suite (ICS)'); + LineToStream('Organization: None'); + LineToStream('X-Newsreader: NNTP component ' + + '(http://www.overbyte.be)'); + + { End of header is a blank line } + LineToStream(''); + + { Write the message body } + LineToStream(''); + LineToStream('The Internet Component Suite is a set of native'); + LineToStream('components for Borland Delphi (all versions,'); + LineToStream('including 16 bits) and Borland C++ Builder. The'); + LineToStream('major TCP/IP protocols are supported for building'); + LineToStream('client/server, intranet or Internet applications.'); + LineToStream(''); + LineToStream('TCP, UDP, TELNET, FTP, SMTP, POP3, PING, FINGER, HTTP,'); + LineToStream('NNTP and more. Each component has samples writen'); + LineToStream('in Delphi and in C++ Builder. Several client/server'); + LineToStream('applications, including an event-driven and a'); + LineToStream('multi-threaded server, a complete FTP client and'); + LineToStream('TELNET client with ansi emulation are provided.'); + LineToStream('Full source code provided for everything.'); + LineToStream(''); + LineToStream('The Internet Component Suite is freeware, royalty'); + LineToStream('free and support is done using a mailing list.'); + LineToStream('Visit our website and download now from'); + LineToStream('http://www.overbyte.be'); + + { Set stream pointer to beginning of stream because TNntpCli will post } + { from the current position } + FDataStream.Seek(0, soFromBeginning ); + + { Ask the component to post the stream. The posting occurs in the } + { background ! We will receive the OnRequestDone event when done. } + { It's in this event handler that the stream must be destroyed } + NntpCli1.Post(FDataStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.XOverButtonClick(Sender: TObject); +begin + NntpCli1.XOver(ArticleNumEdit.Text, GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.OverViewFmtButtonClick(Sender: TObject); +begin + NntpCli1.ListOverViewFmt(GetStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.DateButtonClick(Sender: TObject); +begin + NntpCli1.Date; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.AuthenticateButtonClick(Sender: TObject); +begin + NntpCli1.UserName := UserNameEdit.Text; + NntpCli1.Password := PasswordEdit.Text; + NntpCli1.Authenticate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.ModeReaderButtonClick(Sender: TObject); +begin + NntpCli1.ModeReader; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.XHdrButtonClick(Sender: TObject); +begin + NntpCli1.XHdr(GetStream, 'subject', ArticleNumEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NntpCli1XHdrBegin(Sender: TObject); +begin + Display('XHdr begin'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NntpCli1XHdrEnd(Sender: TObject); +begin + Display('Xhdr End'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNNTPForm.NntpCli1XHdrLine(Sender: TObject); +begin + Display('XHdr: ' + NntpCli1.LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/NsLook1.dfm b/lib/ics/Delphi/Internet/NsLook1.dfm new file mode 100644 index 00000000..7cb9b3d9 Binary files /dev/null and b/lib/ics/Delphi/Internet/NsLook1.dfm differ diff --git a/lib/ics/Delphi/Internet/NsLook1.pas b/lib/ics/Delphi/Internet/NsLook1.pas new file mode 100644 index 00000000..abbca4f2 --- /dev/null +++ b/lib/ics/Delphi/Internet/NsLook1.pas @@ -0,0 +1,273 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: NsLookup +Description: Demo for DnsQuery ICS component. +Author: Franois Piette +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: January 29, 1999 +Version: 1.02 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Feb 27, 1999 V1.01 Added PTR lookup (reverse DNS lookup) +Mar 07, 1999 V1.02 Adapted for Delphi 1 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit NsLook1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, WinSock, DnsQuery, StdCtrls, ExtCtrls, Buttons; + +type + TNsLookupForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + DnsEdit: TEdit; + NameEdit: TEdit; + MXLookupButton: TButton; + DnsQuery1: TDnsQuery; + ClearDisplayBitBtn: TBitBtn; + ALookupButton: TButton; + PTRLookupButton: TButton; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure MXLookupButtonClick(Sender: TObject); + procedure DnsQuery1RequestDone(Sender: TObject; Error: Word); + procedure ClearDisplayBitBtnClick(Sender: TObject); + procedure ALookupButtonClick(Sender: TObject); + procedure PTRLookupButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FRequestID : Integer; + procedure Display(Msg : String); + procedure DumpDnsResponse; + public + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + NsLookupForm: TNsLookupForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyName = 'Name'; + KeyDns = 'Dns'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + NameEdit.Text := IniFile.ReadString(SectionData, KeyName, 'inprise.com'); + DnsEdit.Text := IniFile.ReadString(SectionData, KeyDns, '193.121.171.135'); + DisplayMemo.Clear; + IniFile.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyName, NameEdit.Text); + IniFile.WriteString(SectionData, KeyDns, DnsEdit.Text); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.Display(Msg : String); +begin + if DisplayMemo.Lines.Count > 200 then + DisplayMemo.Lines.Delete(0); + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.DumpDnsResponse; +var + P : PChar; + I : Integer; + Len : Integer; + Buf : String; +begin + Display('Response dump (' + IntToStr(DnsQuery1.ResponseLen) + ' bytes):'); + P := DnsQuery1.ResponseBuf; + Len := DnsQuery1.ResponseLen; + Buf := ''; + I := 0; + while I < Len do begin + if P^ in [' '..'~'] then + Buf := Buf + P^ + else + Buf := Buf + '<' + IntToStr(Ord(P^)) + '>'; + Inc(I); + Inc(P); + if (I mod 16) = 0 then begin + Display(' ' + Buf); + Buf := ''; + end; + end; + if Length(Buf) > 0 then + Display(' ' + Buf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.DnsQuery1RequestDone(Sender: TObject; Error: Word); +var + I : Integer; + nIndex : Integer; +begin + if Error <> 0 then begin + Display('Error #' + IntToStr(Error)); + Exit; + end; + Display('ID : ' + IntToStr(DnsQuery1.ResponseID)); + Display('ResponseCode : ' + IntToStr(DnsQuery1.ResponseCode)); + Display('OpCode : ' + IntToStr(DnsQuery1.ResponseOpCode)); + Display('Authoritative : ' + IntToStr(Ord(DnsQuery1.ResponseAuthoritative))); + Display('Truncation : ' + IntToStr(Ord(DnsQuery1.ResponseTruncation))); + Display('RecursionAvailable : ' + IntToStr(Ord(DnsQuery1.ResponseRecursionAvailable))); + Display('QDCount : ' + IntToStr(DnsQuery1.ResponseQDCount)); + Display('ANCount : ' + IntToStr(DnsQuery1.ResponseANCount)); + Display('NSCount : ' + IntToStr(DnsQuery1.ResponseNSCount)); + Display('ARCount : ' + IntToStr(DnsQuery1.ResponseARCount)); + Display('ResponseLen : ' + IntToStr(DnsQuery1.ResponseLen)); + Display('QuestionName : ' + DnsQuery1.QuestionName); + Display('QuestionType : ' + IntToStr(DnsQuery1.QuestionType)); + Display('QuestionClass : ' + IntToStr(DnsQuery1.QuestionClass)); + + for I := 0 to DnsQuery1.ResponseANCount - 1 do begin + Display('Answer #' + IntToStr(I + 1)); + Display(' AnswerName : ' + DnsQuery1.AnswerName[I]); + Display(' AnswerType : ' + IntToStr(DnsQuery1.AnswerType[I])); + Display(' AnswerClass : ' + IntToStr(DnsQuery1.AnswerClass[I])); + Display(' AnswerTTL : ' + IntToStr(DnsQuery1.AnswerTTL[I])); + nIndex := DnsQuery1.AnswerTag[I]; + if nIndex >= 0 then begin + case DnsQuery1.AnswerType[I] of + DnsQueryMX: + begin + Display(' MXPreference : ' + IntToStr(DnsQuery1.MXPreference[nIndex])); + Display(' MXExchange : ' + DnsQuery1.MXExchange[nIndex]); + end; + DnsQueryA: + begin + Display(' Address : ' + StrPas(inet_ntoa(DnsQuery1.Address[nIndex]))); + end; + DnsQueryPTR: + begin + Display(' Hostname : ' + DnsQuery1.Hostname[nIndex]); + end; + end; + end; + end; + { Dump complete response } + DumpDnsResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.ClearDisplayBitBtnClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.MXLookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.MXLookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.ALookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.ALookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNsLookupForm.PTRLookupButtonClick(Sender: TObject); +begin + DnsQuery1.Addr := DnsEdit.Text; + FRequestID := DnsQuery1.PTRLookup(NameEdit.Text); + Display('Request ID : ' + IntToStr(FRequestID)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/NsLookup.dpr b/lib/ics/Delphi/Internet/NsLookup.dpr new file mode 100644 index 00000000..914dbc80 --- /dev/null +++ b/lib/ics/Delphi/Internet/NsLookup.dpr @@ -0,0 +1,12 @@ +program NsLookup; + +uses + Forms, + NsLook1 in 'NsLook1.pas' {NsLookupForm}; + +{$R *.RES} + +begin + Application.CreateForm(TNsLookupForm, NsLookupForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/POP3MIM1.dfm b/lib/ics/Delphi/Internet/POP3MIM1.dfm new file mode 100644 index 00000000..59ba349e Binary files /dev/null and b/lib/ics/Delphi/Internet/POP3MIM1.dfm differ diff --git a/lib/ics/Delphi/Internet/PingTst1.dfm b/lib/ics/Delphi/Internet/PingTst1.dfm new file mode 100644 index 00000000..d784109e Binary files /dev/null and b/lib/ics/Delphi/Internet/PingTst1.dfm differ diff --git a/lib/ics/Delphi/Internet/PingTst1.pas b/lib/ics/Delphi/Internet/PingTst1.pas new file mode 100644 index 00000000..c1da3261 --- /dev/null +++ b/lib/ics/Delphi/Internet/PingTst1.pas @@ -0,0 +1,154 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This demo show how to use the TPing object to ping any host. +Creation: November 30, 1997 +Version: 1.03 +EMail: francois.piette@overbyte.be http://www.overbyte.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + + +Updates: +Dec 13, 1997 V1.01 Use the new OnEchoRequest and OnEchoReply events. +Dec 26, 1998 V1.02 Changed event handler for new TPing version (1.10) +Nov 10, 2002 V1.03 Added Reply.Status in display when failed + Changed argument name from Error to Status in EchoReply + event (same change has in component). + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit PingTst1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Ping, StdCtrls; + +type + TPingTstForm = class(TForm) + Ping1: TPing; + Label1: TLabel; + HostEdit: TEdit; + PingButton: TButton; + DisplayMemo: TMemo; + CancelButton: TButton; + procedure PingButtonClick(Sender: TObject); + procedure Ping1Display(Sender: TObject; Icmp: TObject; Msg: String); + procedure Ping1DnsLookupDone(Sender: TObject; Error: Word); + procedure CancelButtonClick(Sender: TObject); + procedure Ping1EchoRequest(Sender: TObject; Icmp: TObject); + procedure Ping1EchoReply(Sender: TObject; Icmp: TObject; Status: Integer); + end; + +var + PingTstForm: TPingTstForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.PingButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + DisplayMemo.Lines.Add('Resolving host ''' + HostEdit.Text + ''''); + PingButton.Enabled := FALSE; + CancelButton.Enabled := TRUE; + Ping1.DnsLookup(HostEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1DnsLookupDone(Sender: TObject; Error: Word); +begin + CancelButton.Enabled := FALSE; + PingButton.Enabled := TRUE; + + if Error <> 0 then begin + DisplayMemo.Lines.Add('Unknown Host ''' + HostEdit.Text + ''''); + Exit; + end; + + DisplayMemo.Lines.Add('Host ''' + HostEdit.Text + ''' is ' + Ping1.DnsResult); + Ping1.Address := Ping1.DnsResult; + Ping1.Ping; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1Display(Sender: TObject; Icmp: TObject; Msg: String); +begin + DisplayMemo.Lines.Add(Msg); +end; + + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.CancelButtonClick(Sender: TObject); +begin + Ping1.CancelDnsLookup; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1EchoRequest(Sender: TObject; Icmp: TObject); +begin + DisplayMemo.Lines.Add('Sending ' + IntToStr(Ping1.Size) + ' bytes to ' + + Ping1.HostName + ' (' + Ping1.HostIP + ')'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1EchoReply( + Sender : TObject; + Icmp : TObject; + Status : Integer); +begin + if Status <> 0 then + { Success } + DisplayMemo.Lines.Add('Received ' + IntToStr(Ping1.Reply.DataSize) + + ' bytes from ' + Ping1.HostIP + + ' in ' + IntToStr(Ping1.Reply.RTT) + ' msecs') + else + { Failure } + DisplayMemo.Lines.Add('Cannot ping host (' + Ping1.HostIP + ') : ' + + Ping1.ErrorString + + '. Status = ' + IntToStr(Ping1.Reply.Status)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/Pop3Mim1.pas b/lib/ics/Delphi/Internet/Pop3Mim1.pas new file mode 100644 index 00000000..4bdec5c9 --- /dev/null +++ b/lib/ics/Delphi/Internet/Pop3Mim1.pas @@ -0,0 +1,283 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: This program is a demo for TMimeDecode component. + TMimeDecode is a component whose job is to decode MIME encoded + EMail messages (file attach). You can use it for example to + decode messages received with a POP3 component. + MIME is described in RFC-1521. headers are described if RFC-822. +Creation: March 08, 1998 +Version: 1.01 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +Updates: +Apr 22, 1998 V1.01 Added an option box to save the parts in files. The files + are writen in the current directory with a name like Part0.dat, + Part1.dat and so on. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Pop3Mim1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, IniFiles, MimeDec; + +type + TMimeDecodeForm = class(TForm) + Panel1: TPanel; + FileEdit: TEdit; + DecodeButton: TButton; + Memo1: TMemo; + MimeDecode1: TMimeDecode; + Label1: TLabel; + ClearButton: TButton; + SaveToFileCheckBox: TCheckBox; + procedure DecodeButtonClick(Sender: TObject); + procedure MimeDecode1PartBegin(Sender: TObject); + procedure MimeDecode1PartEnd(Sender: TObject); + procedure MimeDecode1PartHeaderLine(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure ClearButtonClick(Sender: TObject); + procedure MimeDecode1HeaderLine(Sender: TObject); + procedure MimeDecode1PartLine(Sender: TObject; Data: PChar; + DataLen: Integer); + procedure MimeDecode1HeaderBegin(Sender: TObject); + procedure MimeDecode1HeaderEnd(Sender: TObject); + procedure MimeDecode1PartHeaderBegin(Sender: TObject); + procedure MimeDecode1PartHeaderEnd(Sender: TObject); + private + FInitialized : Boolean; + FIniFileName : String; + FDstStream : TStream; + procedure Display(Msg: String); + end; + +var + MimeDecodeForm: TMimeDecodeForm; + +implementation + +{$R *.DFM} +const + SectionData = 'Data'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + KeyFile = 'FileName'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + Memo1.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, Top); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, Left); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + FileEdit.Text := IniFile.ReadString(SectionData, KeyFile, ''); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyFile, FileEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.DecodeButtonClick(Sender: TObject); +begin + Memo1.Clear; + MimeDecode1.DecodeFile(Trim(FileEdit.Text)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.Display(Msg: String); +begin + { TMemo cannot hold too much data. Limit to 200 lines } + if Memo1.Lines.count > 200 then + Memo1.Clear; + Memo1.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartBegin(Sender: TObject); +begin + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' BEGIN ----------'); + if SaveToFileCheckBox.Checked then + FDstStream := TFileStream.Create('Part' + IntToStr(MimeDecode1.PartNumber) + '.dat', fmCreate ); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartEnd(Sender: TObject); +begin + Display('--------- PART END ----------'); + if FDstStream <> nil then begin + FDstStream.Destroy; + FDstStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartLine(Sender: TObject; Data: PChar; + DataLen: Integer); +begin + Display(StrPas(Data)); + if (FDstStream <> nil) and (DataLen > 0) then + FDstStream.WriteBuffer(Data^, DataLen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderLine(Sender: TObject); +begin + Display('Part header: ' + StrPas(MimeDecode1.CurrentData)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.ClearButtonClick(Sender: TObject); +begin + Memo1.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderLine(Sender: TObject); +begin + Display('Msg header: ' + StrPas(MimeDecode1.CurrentData)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderBegin(Sender: TObject); +begin + Display('--------- HEADER BEGIN ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1HeaderEnd(Sender: TObject); +begin + Display('--------- HEADER END ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderBegin(Sender: TObject); +begin + Display('--------- PART ' + + IntToStr(MimeDecode1.PartNumber) + + ' HEADER BEGIN ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecodeForm.MimeDecode1PartHeaderEnd(Sender: TObject); +begin + Display('--------- PART HEADER END ----------'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/Pop3Mime.dpr b/lib/ics/Delphi/Internet/Pop3Mime.dpr new file mode 100644 index 00000000..dcba48ff --- /dev/null +++ b/lib/ics/Delphi/Internet/Pop3Mime.dpr @@ -0,0 +1,12 @@ +program Pop3Mime; + +uses + Forms, + Pop3Mim1 in 'POP3MIM1.PAS' {MimeDecodeForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMimeDecodeForm, MimeDecodeForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/PopTst1.dfm b/lib/ics/Delphi/Internet/PopTst1.dfm new file mode 100644 index 00000000..d5a15187 Binary files /dev/null and b/lib/ics/Delphi/Internet/PopTst1.dfm differ diff --git a/lib/ics/Delphi/Internet/PopTst1.pas b/lib/ics/Delphi/Internet/PopTst1.pas new file mode 100644 index 00000000..b7dad1af --- /dev/null +++ b/lib/ics/Delphi/Internet/PopTst1.pas @@ -0,0 +1,558 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +-------------------------------------------------------------------+ + | THIS IS AN OUTDATED APPLICATION USING AN OUTDATED COMPONENT. | + | NEW COMPONENT IS IN POP3PROT.PAS FILE. NEW DEMO IS MAILRCV.DPR. | + +-------------------------------------------------------------------+ + +Author: Franois PIETTE +Object: Show how to use TPop3Cli (POP3 protocol, RFC-1225) +Creation: 03 october 1997 +Version: 1.02 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Nov 12, 1997 V1.01 Added a GetAll button to get all messages waiting in the + POP3 server, copying them to a file using the UIDL to build + the file name (sorry, wont work with D1 because of long file + name). The message is *NOT* deleted from the POP3 server. +Jan 10, 1998 V1.02 Added port selection + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit PopTst1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, pop3cli, StdCtrls, Wait, IniFiles, ExtCtrls; + +const + PopTstVersion = 102; + +type + TPOP3ExcercizerForm = class(TForm) + Pop3Client: TPop3Client; + DisplayMemo: TMemo; + Panel1: TPanel; + InfoLabel: TLabel; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + ConnectButton: TButton; + Wait1: TWait; + DisconnectButton: TButton; + UserButton: TButton; + HostEdit: TEdit; + UserNameEdit: TEdit; + PassWordEdit: TEdit; + PassButton: TButton; + MsgNumEdit: TEdit; + RetrButton: TButton; + StatButton: TButton; + ListAllButton: TButton; + ListButton: TButton; + DeleteButton: TButton; + NoopButton: TButton; + LastButton: TButton; + ResetButton: TButton; + TopButton: TButton; + MsgLinesEdit: TEdit; + RpopButton: TButton; + UidlButton: TButton; + ApopButton: TButton; + NextButton: TButton; + GetAllButton: TButton; + PortEdit: TEdit; + Label6: TLabel; + procedure ConnectButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure UserButtonClick(Sender: TObject); + procedure PassButtonClick(Sender: TObject); + procedure Pop3ClientMessageBegin(Sender: TObject); + procedure Pop3ClientMessageEnd(Sender: TObject); + procedure Pop3ClientMessageLine(Sender: TObject); + procedure RetrButtonClick(Sender: TObject); + procedure StatButtonClick(Sender: TObject); + procedure ListAllButtonClick(Sender: TObject); + procedure ListButtonClick(Sender: TObject); + procedure Pop3ClientListBegin(Sender: TObject); + procedure Pop3ClientListEnd(Sender: TObject); + procedure Pop3ClientListLine(Sender: TObject); + procedure DeleteButtonClick(Sender: TObject); + procedure NoopButtonClick(Sender: TObject); + procedure LastButtonClick(Sender: TObject); + procedure ResetButtonClick(Sender: TObject); + procedure TopButtonClick(Sender: TObject); + procedure RpopButtonClick(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure Pop3ClientDisplay(Sender: TObject; Msg: String); + procedure UidlButtonClick(Sender: TObject); + procedure Pop3ClientUidlBegin(Sender: TObject); + procedure Pop3ClientUidlEnd(Sender: TObject); + procedure Pop3ClientUidlLine(Sender: TObject); + procedure ApopButtonClick(Sender: TObject); + procedure NextButtonClick(Sender: TObject); + procedure GetAllButtonClick(Sender: TObject); + private + FFile : TextFile; + FFileName : String; + function DoTheJob(MethodPtr : TPop3Method; MethodName : String) : Boolean; + procedure MessageBegin(Sender: TObject); + procedure MessageLine(Sender: TObject); + procedure GetAllMessageLine(Sender: TObject); + public + { Dclarations publiques } + end; + +var + POP3ExcercizerForm: TPOP3ExcercizerForm; + +implementation + +{$R *.DFM} + +uses + PopTst2; + +const + IniFileName = 'POPTST.INI'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Restore some data from the INI file } +procedure TPOP3ExcercizerForm.FormCreate(Sender: TObject); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + HostEdit.Text := IniFile.ReadString('Data', 'Host', ''); + PortEdit.Text := IniFile.ReadString('Data', 'Port', ''); + UserNameEdit.Text := IniFile.ReadString('Data', 'UserName', ''); + PassWordEdit.Text := IniFile.ReadString('Data', 'Password', ''); + IniFile.Free; + InfoLabel.Caption := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Save data to INI file } +procedure TPOP3ExcercizerForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteString('Data', 'Host', HostEdit.Text); + IniFile.WriteString('Data', 'Port', PortEdit.Text); + IniFile.WriteString('Data', 'UserName', UserNameEdit.Text); + IniFile.WriteString('Data', 'Password', PassWordEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the TPop3Client object wants to display } +{ some information such as connection progress or errors. } +procedure TPOP3ExcercizerForm.Pop3ClientDisplay(Sender: TObject; + Msg: String); +begin + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All the TPop3Client method are of the same type. To simplify this demo } +{ application, DoTheJob transfert the parameters form the various EditBoxes } +{ to the Pop3Client instance and then call the appropriate method, showing } +{ the result in the InfoLabel.Caption. } +function TPOP3ExcercizerForm.DoTheJob( + MethodPtr : TPop3Method; + MethodName : String) : Boolean; +begin + Pop3Client.Host := HostEdit.Text; + Pop3Client.Port := PortEdit.Text; + Pop3Client.UserName := UserNameEdit.Text; + Pop3Client.PassWord := PassWordEdit.Text; + Pop3Client.MsgNum := StrToInt(MsgNumEdit.Text); + Pop3Client.MsgLines := StrToInt(MsgLinesEdit.Text); + InfoLabel.Caption := MethodName + ' started'; + Result := MethodPtr; + if Result then + InfoLabel.Caption := MethodName + ' ok' + else + InfoLabel.Caption := MethodName + ' failed'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ConnectButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Connect, 'Connect'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.DisconnectButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Quit, 'Quit'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.UserButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.User, 'User'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.PassButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Pass, 'Pass'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.RetrButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Retr, 'Retr'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.StatButtonClick(Sender: TObject); +begin + if DoTheJob(Pop3Client.Stat, 'Stat') then + InfoLabel.Caption := 'Stat ok, ' + + IntToStr(Pop3Client.MsgCount) + ' messages ' + + IntToStr(Pop3Client.MsgSize) + ' bytes' +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ListAllButtonClick(Sender: TObject); +begin + MsgNumEdit.Text := '0'; + DoTheJob(Pop3Client.List, 'List All'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ListButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.List, 'List'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.DeleteButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Dele, 'Delete'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NoopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Noop, 'Noop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.LastButtonClick(Sender: TObject); +begin + if DoTheJob(Pop3Client.Last, 'Last') then + InfoLabel.caption := 'Last = ' + IntToStr(Pop3Client.MsgNum); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ResetButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Rset, 'Rset'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.TopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Top, 'Top'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.RpopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Rpop, 'Rpop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.UidlButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Uidl, 'Uidl'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ApopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Apop, 'Apop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client is about to receive a } +{ message. The MsgNum property gives the message number. } +{ This event handler could be used to open the file used to store the msg. } +{ The file handle could be stored in the TPop3Client.Tag property to be } +{ easily retrieved by the OnMessageLine and OnMessageEnd event handlers. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Message ' + + IntToStr((Sender as TPop3Client).MsgNum) + + ' begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client has detected the end of a } +{ message, even if there is an error or exception, this event gets called. } +{ This event handler could be used to close the file used to store the msg. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Message ' + + IntToStr((Sender as TPop3Client).MsgNum) + + ' end ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each message line that TPop3Client is } +{ receiveing. This could be used to write the message lines to a file. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageLine(Sender: TObject); +begin + DisplayMemo.Lines.Add((Sender as TPop3Client).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client is about to receive a } +{ list line. The MsgNum property gives the message number. } +procedure TPOP3ExcercizerForm.Pop3ClientListBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** List begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client has received the last list } +{ line. } +procedure TPOP3ExcercizerForm.Pop3ClientListEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** List End ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each list line received by TPop3Client. } +procedure TPOP3ExcercizerForm.Pop3ClientListLine(Sender: TObject); +var + Buffer : String; +begin + Buffer := 'MsgNum = ' + IntToStr((Sender as TPop3Client).MsgNum) + ' ' + + 'MsgSize = ' + IntToStr((Sender as TPop3Client).MsgSize) + ' ' + + 'Line = ''' + (Sender as TPop3Client).LastResponse + ''''; + DisplayMemo.Lines.Add(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Uidl begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Uidl end ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlLine(Sender: TObject); +var + Buffer : String; +begin + Buffer := 'MsgNum = ' + IntToStr((Sender as TPop3Client).MsgNum) + ' ' + + 'MsgUidl = ' + (Sender as TPop3Client).MsgUidl + ''''; + DisplayMemo.Lines.Add(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.MessageBegin(Sender: TObject); +begin + MessageForm.Caption := 'Message ' + + IntToStr((Sender as TPop3Client).MsgNum); + MessageForm.Show; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.MessageLine(Sender: TObject); +begin + MessageForm.DisplayMemo.Lines.Add((Sender as TPop3Client).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NextButtonClick(Sender: TObject); +var + OldBegin : TNotifyEvent; + OldEnd : TNotifyEvent; + OldLine : TNotifyEvent; +begin + OldBegin := Pop3Client.OnMessageBegin; + OldEnd := Pop3Client.OnMessageEnd; + OldLine := Pop3Client.OnMessageLine; + + Pop3Client.OnMessageBegin := MessageBegin; + Pop3Client.OnMessageEnd := nil; + Pop3Client.OnMessageLine := MessageLine; + + MessageForm.DisplayMemo.Clear; + MessageForm.Caption := 'Message'; + + DoTheJob(Pop3Client.Retr, 'Retr'); + + if (Length(Pop3Client.LastResponse) > 0) and + (Pop3Client.LastResponse[1] = '-') then + MessageForm.DisplayMemo.Lines.Add(Pop3Client.LastResponse) + else + MsgNumEdit.Text := IntToStr(StrToInt(MsgNumEdit.Text) + 1); + + MessageForm.DisplayMemo.SelStart := 0; + MessageForm.DisplayMemo.SelLength := 0; + + Pop3Client.OnMessageBegin := OldBegin; + Pop3Client.OnMessageEnd := OldEnd; + Pop3Client.OnMessageLine := OldLine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.GetAllMessageLine(Sender: TObject); +begin + Writeln(FFile, (Sender as TPop3Client).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.GetAllButtonClick(Sender: TObject); +var + MsgCnt : Integer; + MsgNum : Integer; + Uidl : String; + OldBegin : TNotifyEvent; + OldEnd : TNotifyEvent; + OldLine : TNotifyEvent; + IniFile : TIniFile; + Path : String; +begin + if not DoTheJob(Pop3Client.Stat, 'Stat') then + Exit; + + InfoLabel.Caption := 'Stat ok, ' + + IntToStr(Pop3Client.MsgCount) + ' messages ' + + IntToStr(Pop3Client.MsgSize) + ' bytes'; + if Pop3Client.MsgCount < 1 then + Exit; + + { Get path from INI file } + IniFile := TIniFile.Create(IniFileName); + Path := IniFile.ReadString('Data', 'MsgPath', + ExtractFilePath(Application.ExeName)); + IniFile.Free; + + { Be sure to have an ending backslash } + if (Length(Path) > 0) and (Path[Length(Path)] <> '\') then + Path := Path + '\'; + + OldBegin := Pop3Client.OnMessageBegin; + OldEnd := Pop3Client.OnMessageEnd; + OldLine := Pop3Client.OnMessageLine; + Pop3Client.OnMessageBegin := nil; + Pop3Client.OnMessageEnd := nil; + Pop3Client.OnMessageLine := GetAllMessageLine; + + try + MsgCnt := Pop3Client.MsgCount; + for MsgNum := 1 to MsgCnt do begin + Pop3Client.MsgNum := MsgNum; + if not Pop3Client.Uidl then + continue; + Uidl := Pop3Client.MsgUidl; + FFileName := Path + 'Msg ' + Uidl + '.txt'; + if FileExists(FFileName) then begin + DisplayMemo.Lines.Add('Message ' + IntToStr(MsgNum) + ' already here'); + continue; + end; + + DisplayMemo.Lines.Add('Message ' + IntToStr(Pop3Client.MsgNum)); + AssignFile(FFile, FFileName); + Rewrite(FFile); + try + Pop3Client.Retr; + finally + CloseFile(FFile); + end; + end; + DoTheJob(Pop3Client.Quit, 'Quit'); + finally + Pop3Client.OnMessageBegin := OldBegin; + Pop3Client.OnMessageEnd := OldEnd; + Pop3Client.OnMessageLine := OldLine; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/Recv.dpr b/lib/ics/Delphi/Internet/Recv.dpr new file mode 100644 index 00000000..1f6c0d41 --- /dev/null +++ b/lib/ics/Delphi/Internet/Recv.dpr @@ -0,0 +1,12 @@ +program Recv; + +uses + Forms, + Recv1 in 'Recv1.pas' {RecvForm}; + +{$R *.RES} + +begin + Application.CreateForm(TRecvForm, RecvForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/Recv1.dfm b/lib/ics/Delphi/Internet/Recv1.dfm new file mode 100644 index 00000000..5b79e5e5 Binary files /dev/null and b/lib/ics/Delphi/Internet/Recv1.dfm differ diff --git a/lib/ics/Delphi/Internet/Recv1.pas b/lib/ics/Delphi/Internet/Recv1.pas new file mode 100644 index 00000000..a7de2983 --- /dev/null +++ b/lib/ics/Delphi/Internet/Recv1.pas @@ -0,0 +1,302 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Simple server program which just listen for clients and display + all incomming data. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: Sep 29, 1998 +Version: 1.03 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Oct 28, 1998 V1.01 Added Linger and Banner checkboxes. +Dec 30, 1998 V1.02 Remove trailing CR/LF on data receive. +Mar 07, 1999 V1.03 Adapted for Delphi 1 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Recv1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, StdCtrls, ExtCtrls, IniFiles; + +const + WM_DESTROY_SOCKET = WM_USER + 1; + +type + TRecvForm = class(TForm) + Panel1: TPanel; + DisplayMemo: TMemo; + Label1: TLabel; + PortEdit: TEdit; + ActionButton: TButton; + WSocket1: TWSocket; + CloseAllButton: TButton; + Label2: TLabel; + LingerCheckBox: TCheckBox; + BannerCheckBox: TCheckBox; + LineModeOnButton: TButton; + LineOffButton: TButton; + procedure ActionButtonClick(Sender: TObject); + procedure PortEditChange(Sender: TObject); + procedure WSocket1SessionAvailable(Sender: TObject; Error: Word); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure CloseAllButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure LineModeOnButtonClick(Sender: TObject); + procedure LineOffButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FClients : TList; + procedure ClientDataAvailable(Sender : TObject; Error : Word); + procedure ClientSessionClosed(Sender: TObject; Error: Word); + procedure Display(Msg : String); + procedure WMDestroySocket(var msg: TMessage); message WM_DESTROY_SOCKET; + end; + +var + RecvForm: TRecvForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'RecvForm'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyPort = 'Port'; + KeyLinger = 'Linger'; + KeyBanner = 'SendBanner'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FClients := TList.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.FormDestroy(Sender: TObject); +begin + if Assigned(FClients) then begin + FClients.Destroy; + FClients := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, 'telnet'); + LingerCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyLinger, 0)); + BannerCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyBanner, 1)); + Label2.Caption := ''; + IniFile.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyPort, PortEdit.text); + IniFile.WriteInteger(SectionData, KeyLinger, Ord(LingerCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyBanner, Ord(BannerCheckBox.Checked)); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.Display(Msg : String); +begin + if DisplayMemo.Lines.Count > 200 then { Prevent TMemo overflow } + DisplayMemo.Clear; + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.ActionButtonClick(Sender: TObject); +begin + if ActionButton.Caption = '&Start' then begin + WSocket1.Addr := '0.0.0.0'; + WSocket1.Port := PortEdit.Text; + WSocket1.Proto := 'tcp'; + WSocket1.Listen; + ActionButton.Caption := '&Stop'; + Display('Listening for clients'); + end + else begin + WSocket1.Close; + ActionButton.Caption := '&Start'; + Display('Not listening for clients'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.PortEditChange(Sender: TObject); +begin + WSocket1.Close; + ActionButton.Caption := '&Start'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.WSocket1SessionAvailable(Sender: TObject; Error: Word); +var + NewClient : TWSocket; +begin + Display('Client connected'); + Label2.Caption := ''; + NewClient := TWSocket.Create(nil); + FClients.Add(NewClient); + NewClient.LineMode := TRUE; + NewClient.OnDataAvailable := ClientDataAvailable; + NewClient.OnSessionClosed := ClientSessionClosed; + NewClient.HSocket := WSocket1.Accept; + if LingerCheckBox.Checked then + NewClient.LingerOnOff := wsLingerOn + else + NewClient.LingerOnOff := wsLingerOff; + NewClient.LingerTimeout := 300; + NewClient.SetLingerOption; + if BannerCheckBox.Checked then + NewClient.SendStr('Hello !' + #13#10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.ClientDataAvailable(Sender : TObject; Error : Word); +var + Buf : array [0..127] of char; + Len : Integer; +begin + Len := TWSocket(Sender).Receive(@Buf, Sizeof(Buf) - 1); + if Len <= 0 then + Exit; + { Remove any trailing CR/LF} + while (Len > 0) and (Buf[Len - 1] in [#13, #10]) do + Dec(Len); + { Nul terminate the data } + Buf[Len] := #0; + Display('DataAvailable: ''' + StrPas(@Buf) + ''''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.ClientSessionClosed(Sender: TObject; Error: Word); +var + Cli : TWSocket; + Itm : Integer; +begin + Cli := Sender as TWSocket; + Display('Client diconnected'); + + Itm := FClients.IndexOf(Cli); + if Itm >= 0 then + FClients.Delete(Itm); + { We can't destroy a TWSocket from a SessionClosed event handler. } + { So we post a message to delay destruction until we are out of the } + { message handler. } + PostMessage(Handle, WM_DESTROY_SOCKET, 0, LongInt(Cli)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.WMDestroySocket(var msg: TMessage); +begin + TWSocket(msg.LParam).Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.CloseAllButtonClick(Sender: TObject); +begin + Display('Disconnecting clients'); + while FClients.Count > 0 do + TWSocket(FClients.Items[0]).Close; + Display('All clients disconnected'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.LineModeOnButtonClick(Sender: TObject); +var + I : Integer; +begin + for I := 0 to FClients.Count - 1 do + TWSocket(FClients.Items[0]).LineMode := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TRecvForm.LineOffButtonClick(Sender: TObject); +var + I : Integer; +begin + for I := 0 to FClients.Count - 1 do + TWSocket(FClients.Items[0]).LineMode := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/Sender.dpr b/lib/ics/Delphi/Internet/Sender.dpr new file mode 100644 index 00000000..39db7cbc --- /dev/null +++ b/lib/ics/Delphi/Internet/Sender.dpr @@ -0,0 +1,12 @@ +program Sender; + +uses + Forms, + Sender1 in 'Sender1.pas' {SenderForm}; + +{$R *.RES} + +begin + Application.CreateForm(TSenderForm, SenderForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/Sender1.dfm b/lib/ics/Delphi/Internet/Sender1.dfm new file mode 100644 index 00000000..72bb582d Binary files /dev/null and b/lib/ics/Delphi/Internet/Sender1.dfm differ diff --git a/lib/ics/Delphi/Internet/Sender1.pas b/lib/ics/Delphi/Internet/Sender1.pas new file mode 100644 index 00000000..6a46f6ee --- /dev/null +++ b/lib/ics/Delphi/Internet/Sender1.pas @@ -0,0 +1,628 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Simple client program which just send data to a server and display + all incomming data. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: Oct 01, 1998 +Version: 1.03 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: +Oct 28, 1998 V1.02 Trapped Connect exceptions. + Added AutoStartButton and associated logic. + Added LingerCheckBox and associated logic. +Mar 07, 1999 V1.03 Adapted for Delphi 1 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Sender1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, ExtCtrls, StdCtrls, IniFiles, WSocket; + +const + WM_AUTO_START = WM_USER + 1; + WM_CLOSE_REQUEST = WM_USER + 2; + +type +{$IFDEF VER80} + LParam = LongInt; +{$ENDIF} + TSenderForm = class(TForm) + Panel1: TPanel; + Label1: TLabel; + ServerEdit: TEdit; + Label2: TLabel; + PortEdit: TEdit; + Label3: TLabel; + DataEdit: TEdit; + Label4: TLabel; + RepeatEdit: TEdit; + ContCheckBox: TCheckBox; + ActionButton: TButton; + DisplayMemo: TMemo; + Label5: TLabel; + LengthEdit: TEdit; + WSocket1: TWSocket; + DisplayDataCheckBox: TCheckBox; + UseDataSentCheckBox: TCheckBox; + PauseButton: TButton; + CountLabel: TLabel; + AutoStartButton: TButton; + LingerCheckBox: TCheckBox; + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure ContCheckBoxClick(Sender: TObject); + procedure WSocket1DnsLookupDone(Sender: TObject; Error: Word); + procedure WSocket1SessionConnected(Sender: TObject; Error: Word); + procedure ActionButtonClick(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure WSocket1DataAvailable(Sender: TObject; Error: Word); + procedure WSocket1SessionClosed(Sender: TObject; Error: Word); + procedure DisplayDataCheckBoxClick(Sender: TObject); + procedure UseDataSentCheckBoxClick(Sender: TObject); + procedure PauseButtonClick(Sender: TObject); + procedure AutoStartButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FDataBuf : PChar; + FDataBufSize : Integer; + FCount : Integer; + FFinalCount : Integer; + FSending : Boolean; + FDisplayData : Boolean; + FUseDataSent : Boolean; + FFinished : Boolean; + FPaused : Boolean; + FAutoStart : Integer; + procedure Display(Msg : String); + procedure DoSend; + procedure WSocket1DataSent(Sender: TObject; Error: Word); + procedure WSocket1NoDataSent(Sender: TObject; Error: Word); + procedure WMAutoStart(var msg: TMessage); message WM_AUTO_START; + procedure WMCloseRequest(var msg: TMessage); message WM_CLOSE_REQUEST; + public + { Dclarations publiques } + end; + +var + SenderForm: TSenderForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'RecvForm'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyPort = 'Port'; + KeyServer = 'Server'; + KeyData = 'Data'; + KeyRepeat = 'RepeatCount'; + KeyContinuous = 'ContinuousSend'; + KeyLength = 'DataLength'; + KeyUseDataSent = 'UseDataSent'; + KeyDisplay = 'Display'; + KeyLinger = 'Linger'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, 'telnet'); + ServerEdit.Text := IniFile.ReadString(SectionData, KeyServer, 'localhost'); + DataEdit.Text := IniFile.ReadString(SectionData, KeyData, 'The quick brown fox jumps over the lazy dog'); + RepeatEdit.Text := IniFile.ReadString(SectionData, KeyRepeat, ''); + LengthEdit.Text := IniFile.ReadString(SectionData, KeyLength, '60'); + ContCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyContinuous, 0)); + LingerCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyLinger, 1)); + DisplayDataCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyDisplay, 0)); + UseDataSentCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeyUseDataSent, 1)); + IniFile.Destroy; + RepeatEdit.Enabled := not ContCheckBox.Checked; + CountLabel.Caption := ''; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyPort, PortEdit.text); + IniFile.WriteString(SectionData, KeyServer, ServerEdit.text); + IniFile.WriteString(SectionData, KeyData, DataEdit.text); + IniFile.WriteString(SectionData, KeyRepeat, RepeatEdit.text); + IniFile.WriteString(SectionData, KeyLength, LengthEdit.text); + IniFile.WriteInteger(SectionData, KeyContinuous, Ord(ContCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyLinger, Ord(LingerCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyUseDataSent, Ord(UseDataSentCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyDisplay, Ord(DisplayDataCheckBox.Checked)); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.FormDestroy(Sender: TObject); +begin + if FDataBuf <> nil then begin + Freemem(FDataBuf, FDataBufSize); + FDataBuf := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.ContCheckBoxClick(Sender: TObject); +begin + RepeatEdit.Enabled := not ContCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.Display(Msg : String); +begin + if DisplayMemo.lines.Count > 200 then + DisplayMemo.Clear; + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.ActionButtonClick(Sender: TObject); +var + Len : Integer; + N : Integer; + T : Integer; + Buf : String; +begin + { The ActionButton is used to start or stop data transmission } + if FSending then begin + { We are already sending, so user wants to stop } + { Display updated counter } + CountLabel.Caption := IntToStr(FCount); + + { Check if some data remains in TWSocket's internal buffer } + if (not WSocket1.AllSent) and + (Application.MessageBox('Data is still being sent' + #10 + + 'Close anyway ?', + 'Warning', MB_YESNO) <> IDYES) then + Exit; + + Display('Stop requested'); + if not WSocket1.AllSent then + Display('Not all data has been sent'); + + FAutoStart := 0; + { Close the socket. This will delete any data not already sent to } + { winsock. } + PostMessage(Handle, WM_CLOSE_REQUEST, 0, LParam(WSocket1)); + + Exit; + end; + + { The user wants to start data transmission } + CountLabel.Caption := ''; + PauseButton.Caption := '&Pause'; + PauseButton.Visible := TRUE; + ActionButton.Caption := '&Stop'; + FPaused := FALSE; + FSending := TRUE; + FFinished := FALSE; + FCount := 0; + + { Setup final count } + if ContCheckBox.Checked then + FFinalCount := 0 + else + FFinalCount := StrToInt(Trim(RepeatEdit.Text)); + + { Check which method use to send more data } + { Using OnDataSent event will prevent internal TWSocket buffer to be } + { enlarged without limit. } + FUseDataSent := UseDataSentCheckBox.Checked; + if FUseDataSent then + WSocket1.OnDataSent := WSocket1DataSent + else + WSocket1.OnDataSent := WSocket1NoDataSent; + + { Prepare data to be sent } + Buf := '0000 ' + DataEdit.Text; + Len := StrToInt(Trim(LengthEdit.Text)); + if Len <= 0 then + Len := Length(Buf); + if FDataBuf <> nil then + Freemem(FDataBuf, FDataBufSize); + FDataBufSize := Len + 3; + GetMem(FDataBuf, FDataBufSize); + if Len > 0 then begin + if Len < Length(Buf) then + Move(Buf[1], FDataBuf[0], Len) + else begin + T := 0; + while T < Len do begin + N := Length(Buf); + if (T + N) > Len then + N := Len - T; + if N > 0 then + Move(Buf[1], FDataBuf[T], N); + T := T + N; + end; + end; + end; + FDataBuf[Len] := #13; + FDataBuf[Len + 1] := #10; + FDataBuf[Len + 2] := #0; + + { Launch DNS lookup. When done, we'll try to connect. } + WSocket1.DnsLookup(Trim(ServerEdit.Text)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when DNS lookup is finished, even in case of failure. } +procedure TSenderForm.WSocket1DnsLookupDone(Sender: TObject; Error: Word); +begin + { If any error occured, we just display info and prepare to restart. } + if Error <> 0 then begin + MessageBeep(MB_OK); + Display('DNS failure. Error #' + IntToStr(Error)); + ActionButton.Caption := '&Start'; + PauseButton.Visible := FALSE; + Exit; + end; + + { Now we know the IP address. Try to connect. } + WSocket1.Addr := WSocket1.DnsResult; + WSocket1.Port := Trim(PortEdit.Text); + WSocket1.Proto := 'tcp'; + try + WSocket1.Connect; + except + on E:Exception do begin + MessageBeep(MB_OK); + Display('Connect failed: ' + E.Message); + ActionButton.Caption := '&Start'; + PauseButton.Visible := FALSE; + FAutoStart := 0; + Exit; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WSocket1SessionConnected(Sender: TObject; + Error: Word); +begin + if Error <> 0 then begin + MessageBeep(MB_OK); + Display('Can''t connect. Error #' + IntToStr(Error)); + ActionButton.Caption := '&Start'; + FAutoStart := 0; + Exit; + end; + Display('Connected'); + if LingerCheckBox.Checked then + WSocket1.LingerOnOff := wsLingerOn + else + WSocket1.LingerOnOff := wsLingerOff; + WSocket1.LingerTimeout := 300; + WSocket1.SetLingerOption; + DoSend; + if FUseDataSent then + Exit; + + { User requested to not use OnDataSent event. We will simply loop. } + { until all data has been sent. This will fill TWSocket internal buffer } + { very quickly while data is being sent in the background at network } + { speed. } + while (FFinalCount <= 0) or (FFinalCount > FCount) do begin + { We must break the loop if user temrinated the application, } + { or if connection is broke, or if user stopped. } + if (Application.Terminated) or + (WSocket1.State <> wsConnected) or + (not FSending) then + Exit; + { Otherwise, we can send data } + DoSend; + end; + CountLabel.Caption := IntToStr(FCount); + PauseButton.Visible := FALSE; + Display('All data is in TWSocket buffer and being sent in the background'); + FFinished := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.DoSend; +var + Buf : String; +begin + repeat + { Calling ProcessMessages let a chance to button and other events } + { to be handled. } + Application.ProcessMessages; + { We must stop if the user clicked the close button. } + if Application.Terminated then begin + Display('Application terminated'); + Exit; + end; + { We must stop if the user requested to stop send } + if not FSending then + Exit; + { We must stop if connection is broken } + if WSocket1.State <> wsConnected then + Exit; + {$IFNDEF VER80} + { We don't wants to use 100% CPU just looping. Sleep a little bit } + if FPaused then + Sleep(250); + {$ENDIF} + until FPaused = FALSE; + + { We need to check if we are still connected before sending } + if WSocket1.State <> wsConnected then + Exit; + + if (FFinalCount <= 0) or (FFinalCount > FCount) then begin + { Count the message sent } + Inc(FCount); + { Put the counter into the message, truvated to 4 digits } + Buf := IntToStr(FCount mod 10000) + ' '; + Move(Buf[1], FDataBuf[0], 4); + + { If required, display in memo box (slow down !) } + if FDisplayData then + Display('Sending ' + IntToStr(FCount)); + { Display the counter every 100 sends } + if (FCount mod 100) = 0 then + CountLabel.Caption := IntToStr(FCount); + + { Try to send data. Send may fail ! } + try + WSocket1.Send(FDataBuf, FDataBufSize - 1); + except + on E:Exception do begin + Display('Exception during TWSocket.Send: ' + E.Message); + FAutoStart := 0; + PostMessage(Handle, WM_CLOSE_REQUEST, 0, LParam(WSocket1)); + end; + end; + end + else begin + Display('Required data has been sent. Closing.'); + { We may have not read data send by server. But anyway, close the } + { session. } + PostMessage(Handle, WM_CLOSE_REQUEST, 0, LParam(WSocket1)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WSocket1DataSent(Sender: TObject; Error: Word); +begin + DoSend; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WSocket1NoDataSent(Sender: TObject; Error: Word); +begin + if FFinished then begin + if not WSocket1.AllSent then + Display('Not all sent'); + Display('Required data has been sent. Closing.'); + PostMessage(Handle, WM_CLOSE_REQUEST, 0, LParam(WSocket1)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WSocket1DataAvailable(Sender: TObject; Error: Word); +var + Buf : PChar; + Cli : TWSocket; + Len : Integer; + Cnt : Integer; +begin + Cli := Sender as TWSocket; + Cnt := Cli.RcvdCount; + if Cnt <= 0 then + Exit; +{$IFDEF VER80} + { Delphi 1 has 255 character limit of strings (StrPas below) } + if Cnt > 254 then + Cnt := 254; +{$ENDIF} + GetMem(Buf, Cnt + 1); + try + Len := Cli.Receive(Buf, Cnt); + if Len > 0 then begin + Buf[Cnt] := #0; + Display('Received: ' + StrPas(Buf)); + end; + finally + FreeMem(Buf, Cnt + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WSocket1SessionClosed(Sender: TObject; Error: Word); +begin + if Error = 0 then + Display('Socket closed, no error') + else begin + Display('Socket closed, Error #' + IntToStr(Error)); + FAutoStart := 0; + end; + FSending := FALSE; + ActionButton.Caption := '&Start'; + PauseButton.Visible := FALSE; + FPaused := FALSE; + if FAutoStart > 0 then begin + Inc(FAutoStart); + AutoStartButton.Caption := IntToStr(FAutoStart); + PostMessage(Handle, WM_AUTO_START, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.DisplayDataCheckBoxClick(Sender: TObject); +begin + FDisplayData := DisplayDataCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.UseDataSentCheckBoxClick(Sender: TObject); +begin + FUseDataSent := UseDataSentCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.PauseButtonClick(Sender: TObject); +begin + CountLabel.Caption := IntToStr(FCount); + FPaused := not FPaused; + if FPaused then + PauseButton.Caption := '&Resume' + else + PauseButton.Caption := '&Pause'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.AutoStartButtonClick(Sender: TObject); +begin + if FAutoStart <> 0 then begin + FAutoStart := 0; + Exit; + end; + + FAutoStart := 1; + AutoStartButton.Caption := IntToStr(FAutoStart); + PostMessage(Handle, WM_AUTO_START, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WMCloseRequest(var msg: TMessage); +var + WSocket : TWSocket; +begin + WSocket := TWSocket(msg.LParam); + WSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSenderForm.WMAutoStart(var msg: TMessage); +begin + ActionButtonClick(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/Socks1.dfm b/lib/ics/Delphi/Internet/Socks1.dfm new file mode 100644 index 00000000..8a58485e Binary files /dev/null and b/lib/ics/Delphi/Internet/Socks1.dfm differ diff --git a/lib/ics/Delphi/Internet/Socks1.pas b/lib/ics/Delphi/Internet/Socks1.pas new file mode 100644 index 00000000..7350bdb9 --- /dev/null +++ b/lib/ics/Delphi/Internet/Socks1.pas @@ -0,0 +1,344 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Show how to use TWSocket with SOCKS protocol to traverse + a firewall. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: November 21, 1998 +Version: 1.00 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +History: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Socks1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, WinSock, WSocket, StdCtrls, ExtCtrls; + +type + TSocksTestForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + ConnectButton: TButton; + DisconnectButton: TButton; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + TargetHostEdit: TEdit; + TargetPortEdit: TEdit; + SocksServerEdit: TEdit; + SocksPortEdit: TEdit; + WSocket1: TWSocket; + Label5: TLabel; + SocksUsercodeEdit: TEdit; + SocksPasswordEdit: TEdit; + Label6: TLabel; + SocksAuthCheckBox: TCheckBox; + ClearButton: TButton; + Socks4RadioButton: TRadioButton; + Socks5RadioButton: TRadioButton; + procedure ConnectButtonClick(Sender: TObject); + procedure WSocket1SessionConnected(Sender: TObject; Error: Word); + procedure WSocket1DataAvailable(Sender: TObject; Error: Word); + procedure WSocket1SocksError(Sender: TObject; Error: Integer; + Msg: String); + procedure DisconnectButtonClick(Sender: TObject); + procedure WSocket1SessionClosed(Sender: TObject; Error: Word); + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure WSocket1SocksAuthState(Sender: TObject; + AuthState: TSocksAuthState); + procedure WSocket1SocksConnected(Sender: TObject; Error: Word); + procedure DisplayMsg(Sender : TObject; var Msg : String); + procedure ClearButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FRcvBuf : array [0..2047] of char; + FRcvCnt : Integer; + public + { Dclarations publiques } + end; + +var + SocksTestForm: TSocksTestForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Windows'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyTargetHost = 'TargetHost'; + KeyTargetPort = 'TargetPort'; + KeySocksServer = 'SocksServer'; + KeySocksPort = 'SocksPort'; + KeySocksUsercode = 'SocksUsercode'; + KeySocksPassword = 'SocksPassword'; + KeySocksAuth = 'SocksAuthentification'; + KeySocks4 = 'Socks4'; + KeySocks5 = 'Socks5'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + DisplayMemo.Clear; + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + TargetHostEdit.Text := IniFile.ReadString(SectionData, KeyTargetHost, ''); + TargetPortEdit.Text := IniFile.ReadString(SectionData, KeyTargetPort, ''); + SocksServerEdit.Text := IniFile.ReadString(SectionData, KeySocksServer, ''); + SocksPortEdit.Text := IniFile.ReadString(SectionData, KeySocksPort, '1080'); + SocksUsercodeEdit.Text := IniFile.ReadString(SectionData, KeySocksUsercode, ''); + SocksPasswordEdit.Text := IniFile.ReadString(SectionData, KeySocksPassword, ''); + SocksAuthCheckBox.Checked := Boolean(IniFile.ReadInteger(SectionData, KeySocksAuth, 0)); + Socks4RadioButton.Checked := Boolean(IniFile.ReadInteger(SectionData, KeySocks4, 0)); + Socks5RadioButton.Checked := Boolean(IniFile.ReadInteger(SectionData, KeySocks5, 1)); + IniFile.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyTargetHost, Trim(TargetHostEdit.Text)); + IniFile.WriteString(SectionData, KeyTargetPort, Trim(TargetPortEdit.Text)); + IniFile.WriteString(SectionData, KeySocksServer, Trim(SocksServerEdit.Text)); + IniFile.WriteString(SectionData, KeySocksPort, Trim(SocksPortEdit.Text)); + IniFile.WriteString(SectionData, KeySocksUsercode, Trim(SocksUsercodeEdit.Text)); + IniFile.WriteString(SectionData, KeySocksPassword, Trim(SocksPasswordEdit.Text)); + IniFile.WriteInteger(SectionData, KeySocksAuth, Ord(SocksAuthCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeySocks5, Ord(Socks5RadioButton.Checked)); + IniFile.WriteInteger(SectionData, KeySocks4, Ord(Socks4RadioButton.Checked)); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.DisplayMsg(Sender : TObject; var Msg : String); +begin + DisplayMemo.lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.ConnectButtonClick(Sender: TObject); +const + AuthMethod : array [Boolean] of TSocksAuthentication = + (socksNoAuthentication, socksAuthenticateUsercode); +begin + if Socks5RadioButton.Checked then + WSocket1.SocksLevel := '5' + else if Socks4RadioButton.Checked and SocksAuthCheckBox.Checked then + WSocket1.SocksLevel := '4A' + else + WSocket1.SocksLevel := '4'; + DisplayMemo.Lines.Add('Connecting using Socks' + WSocket1.SocksLevel); + + WSocket1.SocksServer := Trim(SocksServerEdit.Text); + WSocket1.SocksPort := Trim(SocksPortEdit.Text); + WSocket1.SocksUsercode := Trim(SocksUsercodeEdit.Text); + WSocket1.SocksPassword := Trim(SocksPasswordEdit.Text); + WSocket1.SocksAuthentication := AuthMethod[SocksAuthCheckBox.Checked]; + WSocket1.Proto := 'tcp'; + WSocket1.Addr := Trim(TargetHostEdit.Text); + WSocket1.Port := Trim(TargetPortEdit.Text); + WSocket1.OnDisplay := DisplayMsg; + WSocket1.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.DisconnectButtonClick(Sender: TObject); +begin + WSocket1.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1SessionConnected(Sender: TObject; Error: Word); +begin + DisplayMemo.Lines.Add('Session connected to remote host.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1SocksConnected(Sender: TObject; Error: Word); +begin + DisplayMemo.Lines.Add('Session connected to socks server.'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1SocksAuthState(Sender: TObject; + AuthState: TSocksAuthState); +begin + case AuthState of + socksAuthStart: + DisplayMemo.Lines.Add('Socks authentification start.'); + socksAuthSuccess: + DisplayMemo.Lines.Add('Socks authentification success.'); + socksAuthFailure: + DisplayMemo.Lines.Add('Socks authentification failure.'); + socksAuthNotRequired: + DisplayMemo.Lines.Add('Socks authentification not required.'); + else + DisplayMemo.Lines.Add('Unknown socks authentification state.') + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1SessionClosed(Sender: TObject; Error: Word); +begin + DisplayMemo.Lines.Add('Session Closed'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1DataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I : Integer; + p : PChar; +begin + Len := TWSocket(Sender).Receive(@FRcvBuf[FRcvCnt], Sizeof(FRcvBuf) - FRcvCnt - 1); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; + FRcvBuf[FRcvCnt] := #0; + + while FRcvCnt > 0 do begin + p := StrScan(FRcvBuf, #10); + if p = nil then + Exit; + I := p - FRcvBuf; + + FRcvBuf[I] := #0; + if (I > 0) and (FRcvBuf[I - 1] = #13) then + FRcvBuf[I - 1] := #0; + + DisplayMemo.Lines.Add('Received: ''' + StrPas(FRcvBuf) + ''''); + Move(FRcvBuf[I + 1], FRcvBuf[0], FRcvCnt - I); + FRcvCnt := FRcvCnt - I - 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.WSocket1SocksError(Sender : TObject; Error : Integer; Msg : String); +begin + DisplayMemo.Lines.Add('Socks error #' + IntToStr(Error) + ' ' + Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSocksTestForm.ClearButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/SocksTst.dpr b/lib/ics/Delphi/Internet/SocksTst.dpr new file mode 100644 index 00000000..7a3077ea --- /dev/null +++ b/lib/ics/Delphi/Internet/SocksTst.dpr @@ -0,0 +1,12 @@ +program SocksTst; + +uses + Forms, + Socks1 in 'Socks1.pas' {SocksTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(TSocksTestForm, SocksTestForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/SrvDemo1.dfm b/lib/ics/Delphi/Internet/SrvDemo1.dfm new file mode 100644 index 00000000..70b977f9 Binary files /dev/null and b/lib/ics/Delphi/Internet/SrvDemo1.dfm differ diff --git a/lib/ics/Delphi/Internet/SrvDemo1.pas b/lib/ics/Delphi/Internet/SrvDemo1.pas new file mode 100644 index 00000000..c19cdd0c --- /dev/null +++ b/lib/ics/Delphi/Internet/SrvDemo1.pas @@ -0,0 +1,189 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstration for Server program using TWSocket. +Creation: 8 december 1997 +Version: 1.02 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 09, 1997 V1.01 Made it compatible with Delphi 1 +Dec 28, 1998 V1.02 Use line mode to make it simpler. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit SrvDemo1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, IniFiles, WSocket, SrvDemo2, Db, DBTables, + ExtCtrls; + +const + IniFileName = 'SrvDemo.ini'; + +type + TSrvForm = class(TForm) + SrvSocket: TWSocket; + ClientListBox: TListBox; + DataTable: TTable; + Panel1: TPanel; + Label1: TLabel; + PortEdit: TEdit; + PortButton: TButton; + procedure FormShow(Sender: TObject); + procedure SrvSocketSessionAvailable(Sender: TObject; Error: Word); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure PortButtonClick(Sender: TObject); + private + Initialized : Boolean; + ClientNumber : Integer; + procedure WMUser(var msg: TMessage); message WM_USER; + procedure StartServer; + end; + +var + SrvForm: TSrvForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + Buffer : String; +begin + if not Initialized then begin + Initialized := TRUE; + IniFile := TIniFile.Create(IniFileName); + Top := IniFile.ReadInteger('Window', 'Top', Top); + Left := IniFile.ReadInteger('Window', 'Left', Left); + Width := IniFile.ReadInteger('Window', 'Width', Width); + Height := IniFile.ReadInteger('Window', 'Height', Height); + PortEdit.Text := IniFile.ReadString('Data', 'Port', 'telnet'); + IniFile.Free; + + DataTable.DataBaseName := ExtractFilePath(Application.ExeName); + try + DataTable.Open; + except + Buffer := 'Unable to open ' + DataTable.DataBaseName + + DataTable.TableName + #0; + Application.MessageBox(@Buffer[1], 'Error', MB_OK); + Application.Terminate; + Exit; + end; + StartServer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteInteger('Window', 'Top', Top); + IniFile.WriteInteger('Window', 'Left', Left); + IniFile.WriteInteger('Window', 'Width', Width); + IniFile.WriteInteger('Window', 'Height', Height); + IniFile.WriteString('Data', 'Port', PortEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.PortButtonClick(Sender: TObject); +begin + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.StartServer; +begin + SrvSocket.Close; + SrvSocket.Addr := '0.0.0.0'; + SrvSocket.Port := PortEdit.Text; + SrvSocket.Proto := 'tcp'; + SrvSocket.Listen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.SrvSocketSessionAvailable(Sender: TObject; Error: Word); +var + Form : TCliForm; +begin + Inc(ClientNumber); + Form := TCliForm.Create(self); + { Add the form address as an identifier in our client list } + ClientListBox.Items.Add(IntToStr(LongInt(Form))); + { We request line mode, to receive only complete line. } + { TWSocket does all the job for us... } + Form.CliSocket.LineMode := TRUE; + Form.CliSocket.LineEnd := #13#10; + { Now accept the new client connection } + Form.CliSocket.HSocket := SrvSocket.Accept; + Form.DataTable := DataTable; + Form.Caption := 'Client ' + IntToStr(ClientNumber); + { Showing the form is not mandatory. In a real server, this can be } + { annoying to have a form displayed for each client. In some situation, } + { it may be handy to have a user interface for each connected client. } + Form.Show; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.WMUser(var msg: TMessage); +var + Form : TCliForm; + I : Integer; +begin + Form := TCliForm(Msg.lParam); + Form.Release; + for I := 0 to ClientListBox.Items.Count - 1 do begin + if ClientListBox.Items[I] = IntToStr(LongInt(Form)) then begin + ClientListBox.Items.Delete(I); + break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/SrvDemo2.dfm b/lib/ics/Delphi/Internet/SrvDemo2.dfm new file mode 100644 index 00000000..7d0b7c5c Binary files /dev/null and b/lib/ics/Delphi/Internet/SrvDemo2.dfm differ diff --git a/lib/ics/Delphi/Internet/SrvDemo2.pas b/lib/ics/Delphi/Internet/SrvDemo2.pas new file mode 100644 index 00000000..412fa87e --- /dev/null +++ b/lib/ics/Delphi/Internet/SrvDemo2.pas @@ -0,0 +1,256 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstration for Server program using TWSocket. +Creation: 8 december 1997 +Version: 1.03 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 28, 1998 V1.02 Use line mode. +Mar 07, 1999 V1.03 Adapted for Delphi 1 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit SrvDemo2; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, StdCtrls, Db, DBTables, ExtCtrls; + +type + TCliForm = class(TForm) + CliSocket: TWSocket; + DisplayMemo: TMemo; + Panel1: TPanel; + SendEdit: TEdit; + SendButton: TButton; + Panel2: TPanel; + LineLabel: TLabel; + DisconnectButton: TButton; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure CliSocketDataAvailable(Sender: TObject; Error: Word); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + procedure SendButtonClick(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + private + { Dclarations prives } + Initialized : Boolean; + Buffer : array [0..1023] of char; + procedure ProcessCommand(Cmd : String); + public + { Dclarations publiques } + DataTable : TTable; + end; + +var + CliForm: TCliForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.FormShow(Sender: TObject); +begin + if not Initialized then begin + Initialized := TRUE; + DisplayMemo.Clear; + SendEdit.Text := 'Hello world !'; + ActiveControl := SendEdit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.FormClose(Sender: TObject; var Action: TCloseAction); +begin + PostMessage(TForm(Owner).Handle, WM_USER, 0, LongInt(Self)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.ProcessCommand(Cmd : String); +var + CommandVerb : String; + CommandTail : String; + I, J : Integer; +begin + DisplayMemo.Lines.Add(Cmd); + + { Skip leading spaces } + I := 1; + while (I <= Length(Cmd)) and (Cmd[I] in [' ', #9]) do + Inc(I); + + { Find separator and separe CommandVerb and CommandTail } + J := I; + while TRUE do begin + if (J >= Length(Cmd)) then begin + CommandTail := ''; + CommandVerb := Cmd; + break; + end; + + if Cmd[J] in [' ', #9, '/'] then begin + CommandTail := Copy(Cmd, J, Length(Cmd) - J + 1); + CommandVerb := Copy(Cmd, I, J - I); + break; + end; + Inc(J); + end; + CommandVerb := UpperCase(CommandVerb); + CommandTail := Trim(CommandTail); + + if CommandVerb = 'LASTNAME' then begin + DataTable.IndexName := 'NOM'; + DataTable.SetKey; + DataTable.FieldByName('NOM').AsString := CommandTail; + end + else if CommandVerb = 'FIRSTNAME' then begin + DataTable.IndexName := 'PRENOM'; + DataTable.SetKey; + DataTable.FieldByName('PRENOM').AsString := CommandTail; + end + else begin + CliSocket.SendStr('Syntax error !' + #13 + #10); + Exit; + end; + + if DataTable.GotoKey then + CliSocket.SendStr( + '"' + DataTable.FieldByName('NOM').AsString + '", ' + + '"' + DataTable.FieldByName('PRENOM').AsString + '", ' + + '"' + DataTable.FieldByName('ADRESSE').AsString + '", ' + + '"' + DataTable.FieldByName('CP').AsString + '", ' + + '"' + DataTable.FieldByName('LOCALITE').AsString + '"' + + #13 + #10) + else + CliSocket.SendStr('Pas trouv' + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; +begin + { We use line mode. So when we call Receive, we always receive a } + { complete line, include end of line marker or nothing. } + Len := CliSocket.Receive(@Buffer[0], SizeOf(Buffer) - 1); + if Len <= 0 then + Exit; + + { Remove end of line marker } + while (Len > 0) and (Buffer[Len - 1] in [#13, #10]) do + Dec(Len); + + { Nul terminate the string } + Buffer[Len] := #0; + { Display command in label } + LineLabel.Caption := StrPas(Buffer); + { Process command } + ProcessCommand(StrPas(Buffer)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.SendButtonClick(Sender: TObject); +begin + CliSocket.SendStr(SendEdit.Text + #13 + #10); + ActiveControl := SendEdit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.DisconnectButtonClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/SrvTcp.dpr b/lib/ics/Delphi/Internet/SrvTcp.dpr new file mode 100644 index 00000000..8b48ae65 --- /dev/null +++ b/lib/ics/Delphi/Internet/SrvTcp.dpr @@ -0,0 +1,16 @@ +program SrvTcp; + +uses + Forms, + SrvTcp1 in 'SrvTcp1.pas' {GetGroupsForm}, + TcpCmd in 'TcpCmd.pas'; + +{$R *.RES} + +begin +{$IFNDEF VER80} + Application.Initialize; +{$ENDIF} + Application.CreateForm(TGetGroupsForm, GetGroupsForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/SrvTcp1.dfm b/lib/ics/Delphi/Internet/SrvTcp1.dfm new file mode 100644 index 00000000..02c4c2ea Binary files /dev/null and b/lib/ics/Delphi/Internet/SrvTcp1.dfm differ diff --git a/lib/ics/Delphi/Internet/SrvTcp1.pas b/lib/ics/Delphi/Internet/SrvTcp1.pas new file mode 100644 index 00000000..82062b8b --- /dev/null +++ b/lib/ics/Delphi/Internet/SrvTcp1.pas @@ -0,0 +1,194 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This code is part of SvcTcp sample program. SvcTcp program + shows how to use TWSocket from within a Windows NT/2000 service. + This code has been tested with Delphi 5, Windows NT4 and 2000. + All TWSocket code has been encapsulated in TTcpDaemon object. + This is done so that you can see how the same code can be used + inside a service or inside a normal exe program (this sample). +Creation: July 15, 2000 +Version: 1.00 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + See http://www.rtfm.be/fpiette/supportuk.htm for subscription. +Legal issues: Copyright (C) 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit SrvTcp1; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, StdCtrls, ExtCtrls, TcpCmd; + +const + SrvTcpVersion = 100; + CopyRight : String = ' SrvTcp (c) 2000 F. Piette V1.00 '; + WM_APPSTARTUP = WM_USER + 1; + +type + TGetGroupsForm = class(TForm) + ToolPanel: TPanel; + DisplayMemo: TMemo; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FTcpDaemon : TTcpDaemon; + procedure Display(Msg : String); + procedure WMAppStartup(var Msg: TMessage); message WM_APPSTARTUP; + public + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + GetGroupsForm: TGetGroupsForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyLastServer = 'LastServer'; + KeyLastUser = 'LastUser'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FTcpDaemon := TTcpDaemon.Create; + FTcpDaemon.Banner := 'ICS Tcp Server Ready'; + FTcpDaemon.OnDisplay := Display; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.FormDestroy(Sender: TObject); +begin + if Assigned(FTcpDaemon) then begin + FTcpDaemon.Destroy; + FTcpDaemon := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + IniFile.Destroy; + DisplayMemo.Clear; + { Delay startup code until our UI is ready and visible } + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.Display(Msg : String); +var + I : Integer; +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + for I := 1 to 50 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + {$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TGetGroupsForm.WMAppStartup(var Msg: TMessage); +begin + FTcpDaemon.Start; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/SvcTcp.dpr b/lib/ics/Delphi/Internet/SvcTcp.dpr new file mode 100644 index 00000000..300c0042 --- /dev/null +++ b/lib/ics/Delphi/Internet/SvcTcp.dpr @@ -0,0 +1,14 @@ +program SvcTcp; + +uses + SvcMgr, + SvcTcp1 in 'SvcTcp1.pas' {IcsTcpSvc: TService}, + TcpCmd in 'TcpCmd.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TIcsTcpSvc, IcsTcpSvc); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/SvcTcp1.dfm b/lib/ics/Delphi/Internet/SvcTcp1.dfm new file mode 100644 index 00000000..cd8be4fa Binary files /dev/null and b/lib/ics/Delphi/Internet/SvcTcp1.dfm differ diff --git a/lib/ics/Delphi/Internet/SvcTcp1.pas b/lib/ics/Delphi/Internet/SvcTcp1.pas new file mode 100644 index 00000000..61310992 --- /dev/null +++ b/lib/ics/Delphi/Internet/SvcTcp1.pas @@ -0,0 +1,171 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Shows how to use TWSocket from within a Windows NT/2000 service. + This code has been tested with Delphi 5, Windows NT4 and 2000. + All TWSocket code has been encapsulated in TTcpDaemon object. + This is done so that you can see how the same code can be used + inside a service or inside a normal exe program (see SrvTcp). + To install SvcTcp, you need Windows NT or Windows 2000. At + command prompt, enter: to uninstall it, just + enter the command . Once installed, you can + find SvcTcp service in the "services" applet. You can start and + stop it from that applet. You can also start and stop it from + the command line with the command . + To test for service operation, use command line telnet utility + and connect to port 2120, then enter the command help and hit + return key. If you wants to see what you type, turn telnet + local echo to on. +Creation: July 15, 2000 +Version: 1.00 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + See http://www.rtfm.be/fpiette/supportuk.htm for subscription. +Legal issues: Copyright (C) 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit SvcTcp1; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, SvcMgr, TcpCmd; + +const + SvcTcpVersion = 100; + CopyRight : String = ' SvcTcp (c) 2000 F. Piette V1.00 '; + +type + TIcsTcpSvc = class(TService) + procedure ServiceExecute(Sender: TService); + procedure ServiceStop(Sender: TService; var Stopped: Boolean); + procedure ServiceCreate(Sender: TObject); + procedure ServiceDestroy(Sender: TObject); + procedure ServiceStart(Sender: TService; var Started: Boolean); + private + FTcpDaemon : TTcpDaemon; + procedure Display(Msg: String); + public + function GetServiceController: TServiceController; override; + end; + +var + IcsTcpSvc: TIcsTcpSvc; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure ServiceController(CtrlCode: DWord); stdcall; +begin + IcsTcpSvc.Controller(CtrlCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TIcsTcpSvc.GetServiceController: TServiceController; +begin + Result := ServiceController; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.ServiceStart(Sender: TService; var Started: Boolean); +begin + try + FTcpDaemon.Start; + Started := TRUE; + except + Started := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.ServiceStop(Sender: TService; var Stopped: Boolean); +begin + FTcpDaemon.Stop; + Stopped := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.ServiceExecute(Sender: TService); +begin + while not Terminated do + ServiceThread.ProcessRequests(TRUE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.Display(Msg : String); +begin + // A service has no access to the GUI. + // Simply ignore any display :-( + // We could log messages to the EventViewer +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.ServiceCreate(Sender: TObject); +begin + FTcpDaemon := TTcpDaemon.Create; + FTcpDaemon.Banner := DisplayName + ' Ready'; + FTcpDaemon.OnDisplay := Display; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TIcsTcpSvc.ServiceDestroy(Sender: TObject); +begin + if Assigned(FTcpDaemon) then begin + FTcpDaemon.Destroy; + FTcpDaemon := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/TcpCmd.pas b/lib/ics/Delphi/Internet/TcpCmd.pas new file mode 100644 index 00000000..f0831ddc --- /dev/null +++ b/lib/ics/Delphi/Internet/TcpCmd.pas @@ -0,0 +1,366 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This code is part of SvcTcp and SrvTcp sample programs. In those + samples, all TWSocket code has been encapsulated in TTcpDaemon + object. This is done so that you can see how the same code can + be used inside a service or inside a normal exe program. +Creation: July 15, 2000 +Version: 1.00 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + See http://www.rtfm.be/fpiette/supportuk.htm for subscription. +Legal issues: Copyright (C) 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TcpCmd; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, WSocket, WSocketS; + +const + TcpCmdVersion = 100; + CopyRight : String = ' TcpCmd (c) 2000 F. Piette V1.00 '; + +type + { This class is used as a client class for TWSocketServer. Each time a } + { client connect to the server, TWSocketServer will instanciate a new } + { TTcpSrvClient to handle the client. } + TTcpSrvClient = class(TWSocketClient) + public + RcvdLine : String; + Param : array [0..10] of String; + ParamCount : Integer; + ConnectTime : TDateTime; + end; + + TDisplayProc = procedure (Msg : String) of object; + + { This class encapsulate all the work for a basic TCP server. It include } + { a basic command interpreter. } + TTcpDaemon = class(TObject) + private + WSocketServer1 : TWSocketServer; + FPort : String; + FAddr : String; + FOnDisplay : TDisplayProc; + procedure Display(Msg : String); + procedure WSocketServer1BgException(Sender: TObject; E: Exception; + var CanClose: Boolean); + procedure WSocketServer1ClientConnect(Sender: TObject; + Client: TWSocketClient; + Error: Word); + procedure WSocketServer1ClientDisconnect(Sender: TObject; + Client: TWSocketClient; + Error: Word); + procedure ClientDataAvailable(Sender: TObject; Error: Word); + procedure ProcessData(Client: TTcpSrvClient); + procedure ClientBgException(Sender: TObject; E: Exception; + var CanClose: Boolean); + function GetBanner: String; + procedure SetBanner(const Value: String); + public + constructor Create; virtual; + destructor Destroy; override; + procedure Start; + procedure Stop; + property OnDisplay : TDisplayProc read FOnDisplay write FOnDisplay; + { Make Banner property available to the outside. We could make other } + { TWSocket properties available. } + property Banner : String read GetBanner write SetBanner; + property Port : String read FPort write FPort; + property Addr : String read FAddr write FAddr; + end; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTcpDaemon.Create; +begin + inherited Create; + WSocketServer1 := TWSocketServer.Create(nil); + WSocketServer1.Banner := 'ICS Tcp Service Ready'; + FPort := '2120'; + FAddr := '0.0.0.0'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTcpDaemon.Destroy; +begin + if Assigned(WSocketServer1) then begin + WSocketServer1.Destroy; + WSocketServer1 := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.WSocketServer1BgException(Sender: TObject; + E: Exception; var CanClose: Boolean); +begin + Display('Server exception occured: ' + E.ClassName + ': ' + E.Message); + CanClose := FALSE; { Hoping that server will still work ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is called each time a new client connect. We can setup our } +{ client class to fit our needs (We use line mode and two events) } +procedure TTcpDaemon.WSocketServer1ClientConnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TTcpSrvClient do begin + Display('Client connecting: ' + PeerAddr); + LineMode := TRUE; + LineEdit := TRUE; + OnDataAvailable := ClientDataAvailable; + OnBgException := ClientBgException; + ConnectTime := Now; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is called each time a client disconnect. No many things to do } +{ here. Just display a message. } +procedure TTcpDaemon.WSocketServer1ClientDisconnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TTcpSrvClient do begin + Display('Client disconnecting: ' + PeerAddr + ' ' + + 'Duration: ' + FormatDateTime('hh:nn:ss', + Now - ConnectTime)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.ClientDataAvailable( + Sender : TObject; + Error : Word); +begin + with Sender as TTcpSrvClient do begin + { We use line mode. We will receive complete lines } + RcvdLine := ReceiveStr; + { Remove trailing CR/LF } + while (Length(RcvdLine) > 0) and + (RcvdLine[Length(RcvdLine)] in [#13, #10]) do + RcvdLine := Copy(RcvdLine, 1, Length(RcvdLine) - 1); + Display('Received from ' + GetPeerAddr + ': ''' + RcvdLine + ''''); + ProcessData(Sender as TTcpSrvClient); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Split a command line into an array of words. Use spaces or tabs as } +{ command delimiter. Commands words have to be delimited by doubles quotes } +{ if they include spaces or tabs. } +function ParseCommandLine( + const CmdLine : String; + var ParamsArray : array of string) : Integer; +var + Index : Integer; + I, J : Integer; +begin + I := 1; + Index := Low(ParamsArray); + while (Index <= High(ParamsArray)) and + (I <= Length(CmdLine)) do begin + { Skip spaces and tabs } + while (I <= Length(CmdLine)) and (CmdLine[I] in [' ', #9]) do + Inc(I); + if I > Length(CmdLine) then + break; + { Check if quoted parameters (can have embeded spaces) } + if CmdLine[I] = '"' then begin + Inc(I); + ParamsArray[Index] := ''; + while I <= Length(CmdLine) do begin + if CmdLine[I] = '"' then begin + if (I >= Length(CmdLine)) or (CmdLine[I + 1] <> '"') then begin + Inc(I); + break; + end; + ParamsArray[Index] := ParamsArray[Index] + '"'; + Inc(I, 2); + end + else begin + ParamsArray[Index] := ParamsArray[Index] + CmdLine[I]; + Inc(I); + end; + end; + end + else begin + J := I; + while (I <= Length(CmdLine)) and (not (CmdLine[I] in [' ', #9])) do + Inc(I); + if J = I then + break; + ParamsArray[Index] := Copy(CmdLine, J, I - J); + end; + Inc(Index); + end; + Result := Index - Low(ParamsArray); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Process a command line received from any client. If process takes time, } +{ you should use a thread to do the work and return immediately. } +procedure TTcpDaemon.ProcessData(Client : TTcpSrvClient); +var + I : Integer; + AClient : TTcpSrvClient; +begin + { Parse command line. } + Client.ParamCount := ParseCommandLine(Client.RcvdLine, Client.Param); + if Client.ParamCount <= 0 then + Exit; + + { We could replace all those CompareText with a table lookup } + if CompareText(Client.Param[0], 'exit') = 0 then + { We can't call Client.Close here because we will immediately } + { reenter DataAvailable event handler with same line because } + { a line is removed from buffer AFTER it has been processed. } + { Using CloseDelayed will delay Close until we are out of } + { current event handler. } + Client.CloseDelayed + else if CompareText(Client.Param[0], 'time') = 0 then + { Send server date and time to client } + Client.SendStr(DateTimeToStr(Now) + #13#10) + else if CompareText(Client.Param[0], 'who') = 0 then begin + { Send client list to client } + Client.SendStr('There are ' + IntToStr(WSocketServer1.ClientCount) + + ' connected users:' + #13#10); + for I := WSocketServer1.ClientCount - 1 downto 0 do begin + AClient := TTcpSrvClient(WSocketServer1.Client[I]); + Client.SendStr(AClient.PeerAddr + ':' + AClient.GetPeerPort + ' ' + + DateTimeToStr(AClient.ConnectTime) + #13#10); + end; + end + else if CompareText(Client.Param[0], 'help') = 0 then begin + Client.SendStr('Commands are:' + #13#10 + + ' exit Close current session' + #13#10 + + ' time Display server time and date' + #13#10 + + ' who Display connected clients' + #13#10 + + ' help Show this help text' + #13#10); + end + else begin + if Client.State = wsConnected then + Client.SendStr('Unknown command: ''' + + Client.Param[0] + '''' + #13#10 + + 'Type help if you need help...' +#13#10); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when a client socket experience a background } +{ exception. It is likely to occurs when client aborted connection and data } +{ has not been sent yet. } +procedure TTcpDaemon.ClientBgException( + Sender : TObject; + E : Exception; + var CanClose : Boolean); +begin + Display('Client exception occured: ' + E.ClassName + ': ' + E.Message); + CanClose := TRUE; { Goodbye client ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.Display(Msg: String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.Start; +begin + WSocketServer1.OnBgException := WSocketServer1BgException; + WSocketServer1.OnClientConnect := WSocketServer1ClientConnect; + WSocketServer1.OnClientDisconnect := WSocketServer1ClientDisconnect; + WSocketServer1.Proto := 'tcp'; + WSocketServer1.Port := FPort; + WSocketServer1.Addr := FAddr; + WSocketServer1.ClientClass := TTcpSrvClient; + WSocketServer1.Listen; + Display('Waiting for clients...'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.Stop; +begin + WSocketServer1.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTcpDaemon.GetBanner: String; +begin + Result := WSocketServer1.Banner; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpDaemon.SetBanner(const Value: String); +begin + WSocketServer1.Banner := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/TcpSrv.dpr b/lib/ics/Delphi/Internet/TcpSrv.dpr new file mode 100644 index 00000000..dee37a0b --- /dev/null +++ b/lib/ics/Delphi/Internet/TcpSrv.dpr @@ -0,0 +1,12 @@ +program TcpSrv; + +uses + Forms, + TcpSrv1 in 'TcpSrv1.pas' {TcpSrvForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTcpSrvForm, TcpSrvForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/TcpSrv1.dfm b/lib/ics/Delphi/Internet/TcpSrv1.dfm new file mode 100644 index 00000000..d81da256 Binary files /dev/null and b/lib/ics/Delphi/Internet/TcpSrv1.dfm differ diff --git a/lib/ics/Delphi/Internet/TcpSrv1.pas b/lib/ics/Delphi/Internet/TcpSrv1.pas new file mode 100644 index 00000000..1066303d --- /dev/null +++ b/lib/ics/Delphi/Internet/TcpSrv1.pas @@ -0,0 +1,350 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois Piette +Creation: Aug 29, 1999 +Version: 1.04 +Description: Basic TCP server showing how to use TWSocketServer and + TWSocketClient components. +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + francois.piette@swing.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1999-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. +History: +Sep 05, 1999 V1.01 Adapted for Delphi 1 +Oct 15, 2000 V1.02 Display remote and local socket binding when a client + connect. +Nov 11, 2000 V1.03 Implemented OnLineLimitExceeded event +Dec 15, 2001 V1.03 In command help changed #10#13 to the correct value #13#10. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TcpSrv1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, StdCtrls, ExtCtrls, WSocket, WSocketS; + +const + TcpSrvVersion = 104; + CopyRight = ' TcpSrv (c) 1999-2001 by Franois PIETTE. V1.04'; + WM_APPSTARTUP = WM_USER + 1; + +type + { TTcpSrvClient is the class which will be instanciated by server component } + { for each new client. N simultaneous clients means N TTcpSrvClient will be } + { instanciated. Each being used to handle only a single client. } + { We can add any data that has to be private for each client, such as } + { receive buffer or any other data needed for processing. } + TTcpSrvClient = class(TWSocketClient) + public + RcvdLine : String; + ConnectTime : TDateTime; + end; + + TTcpSrvForm = class(TForm) + ToolPanel: TPanel; + DisplayMemo: TMemo; + WSocketServer1: TWSocketServer; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure WSocketServer1ClientConnect(Sender: TObject; + Client: TWSocketClient; Error: Word); + procedure WSocketServer1ClientDisconnect(Sender: TObject; + Client: TWSocketClient; Error: Word); + procedure WSocketServer1BgException(Sender: TObject; E: Exception; + var CanClose: Boolean); + private + FIniFileName : String; + FInitialized : Boolean; + procedure Display(Msg : String); + procedure WMAppStartup(var Msg: TMessage); message WM_APPSTARTUP; + procedure ClientDataAvailable(Sender: TObject; Error: Word); + procedure ProcessData(Client : TTcpSrvClient); + procedure ClientBgException(Sender : TObject; + E : Exception; + var CanClose : Boolean); + procedure ClientLineLimitExceeded(Sender : TObject; + Cnt : LongInt; + var ClearData : Boolean); + public + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + TcpSrvForm: TTcpSrvForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'WindowTcpSrv'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormCreate(Sender: TObject); +begin + { Compute INI file name based on exe file name. Remove path to make it } + { go to windows directory. } + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + { Fetch persistent parameters from INI file } + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + IniFile.Destroy; + DisplayMemo.Clear; + { Delay startup code until our UI is ready and visible } + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + { Save persistent data to INI file } + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in our display memo. Delete lines to be sure to not } +{ overflow the memo which may have a limited capacity. } +procedure TTcpSrvForm.Display(Msg : String); +var + I : Integer; +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + for I := 1 to 50 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is our custom message handler. We posted a WM_APPSTARTUP message } +{ from FormShow event handler. Now UI is ready and visible. } +procedure TTcpSrvForm.WMAppStartup(var Msg: TMessage); +begin + Display(CopyRight); + Display(WSocket.Copyright); + Display(WSockets.CopyRight); + WSocketServer1.Proto := 'tcp'; { Use TCP protocol } + WSocketServer1.Port := 'telnet'; { Use telnet port } + WSocketServer1.Addr := '0.0.0.0'; { Use any interface } + WSocketServer1.ClientClass := TTcpSrvClient; { Use our component } + WSocketServer1.Listen; { Start litening } + Display('Waiting for clients...'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.WSocketServer1ClientConnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TTcpSrvClient do begin + Display('Client connected.' + + ' Remote: ' + PeerAddr + '/' + PeerPort + + ' Local: ' + GetXAddr + '/' + GetXPort); + Display('There is now ' + + IntToStr(TWSocketServer(Sender).ClientCount) + + ' clients connected.'); + LineMode := TRUE; + LineEdit := TRUE; + LineLimit := 80; { Do not accept long lines } + OnDataAvailable := ClientDataAvailable; + OnLineLimitExceeded := ClientLineLimitExceeded; + OnBgException := ClientBgException; + ConnectTime := Now; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.WSocketServer1ClientDisconnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TTcpSrvClient do begin + Display('Client disconnecting: ' + PeerAddr + ' ' + + 'Duration: ' + FormatDateTime('hh:nn:ss', + Now - ConnectTime)); + Display('There is now ' + + IntToStr(TWSocketServer(Sender).ClientCount - 1) + + ' clients connected.'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.ClientLineLimitExceeded( + Sender : TObject; + Cnt : LongInt; + var ClearData : Boolean); +begin + with Sender as TTcpSrvClient do begin + Display('Line limit exceeded from ' + GetPeerAddr + '. Closing.'); + ClearData := TRUE; + Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.ClientDataAvailable( + Sender : TObject; + Error : Word); +begin + with Sender as TTcpSrvClient do begin + { We use line mode. We will receive complete lines } + RcvdLine := ReceiveStr; + { Remove trailing CR/LF } + while (Length(RcvdLine) > 0) and + (RcvdLine[Length(RcvdLine)] in [#13, #10]) do + RcvdLine := Copy(RcvdLine, 1, Length(RcvdLine) - 1); + Display('Received from ' + GetPeerAddr + ': ''' + RcvdLine + ''''); + ProcessData(Sender as TTcpSrvClient); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.ProcessData(Client : TTcpSrvClient); +var + I : Integer; + AClient : TTcpSrvClient; +begin + { We could replace all those CompareText with a table lookup } + if CompareText(Client.RcvdLine, 'help') = 0 then + Client.SendStr('Commands are:' + #13#10 + + ' exit' + #13#10 + + ' who' + #13#10 + + ' time' + #13#10 + + ' exception' + #13#10) + else if CompareText(Client.RcvdLine, 'exit') = 0 then + { We can't call Client.Close here because we will immediately } + { reenter DataAvailable event handler with same line because } + { a line is removed from buffer AFTER it has been processed. } + { Using CloseDelayed will delay Close until we are out of } + { current event handler. } + Client.CloseDelayed + else if CompareText(Client.RcvdLine, 'time') = 0 then + { Send server date and time to client } + Client.SendStr(DateTimeToStr(Now) + #13#10) + else if CompareText(Client.RcvdLine, 'who') = 0 then begin + { Send client list to client } + Client.SendStr('There are ' + IntToStr(WSocketServer1.ClientCount) + + ' connected users:' + #13#10); + for I := WSocketServer1.ClientCount - 1 downto 0 do begin + AClient := TTcpSrvClient(WSocketServer1.Client[I]); + Client.SendStr(AClient.PeerAddr + ':' + AClient.GetPeerPort + ' ' + + DateTimeToStr(AClient.ConnectTime) + #13#10); + end; + end + else if CompareText(Client.RcvdLine, 'exception') = 0 then + { This will trigger a background exception for client } + PostMessage(Client.Handle, WM_TRIGGER_EXCEPTION, 0, 0) + else + if Client.State = wsConnected then + Client.SendStr('Unknown command: ''' + Client.RcvdLine + '''' + #13#10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when listening (server) socket experienced } +{ a background exception. Should normally never occurs. } +procedure TTcpSrvForm.WSocketServer1BgException( + Sender : TObject; + E : Exception; + var CanClose : Boolean); +begin + Display('Server exception occured: ' + E.ClassName + ': ' + E.Message); + CanClose := FALSE; { Hoping that server will still work ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when a client socket experience a background } +{ exception. It is likely to occurs when client aborted connection and data } +{ has not been sent yet. } +procedure TTcpSrvForm.ClientBgException( + Sender : TObject; + E : Exception; + var CanClose : Boolean); +begin + Display('Client exception occured: ' + E.ClassName + ': ' + E.Message); + CanClose := TRUE; { Goodbye client ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/ThrdSrv.dpr b/lib/ics/Delphi/Internet/ThrdSrv.dpr new file mode 100644 index 00000000..1b795032 --- /dev/null +++ b/lib/ics/Delphi/Internet/ThrdSrv.dpr @@ -0,0 +1,12 @@ +program ThrdSrv; + +uses + Forms, + ThrdSrv1 in 'ThrdSrv1.pas' {TcpSrvForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTcpSrvForm, TcpSrvForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/ThrdSrv1.dfm b/lib/ics/Delphi/Internet/ThrdSrv1.dfm new file mode 100644 index 00000000..d0f9040c Binary files /dev/null and b/lib/ics/Delphi/Internet/ThrdSrv1.dfm differ diff --git a/lib/ics/Delphi/Internet/ThrdSrv1.pas b/lib/ics/Delphi/Internet/ThrdSrv1.pas new file mode 100644 index 00000000..3c666efe --- /dev/null +++ b/lib/ics/Delphi/Internet/ThrdSrv1.pas @@ -0,0 +1,491 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois Piette +Creation: Sep 02, 2001 +Version: 1.01 +Description: Basic TCP server showing how to use TWSocketServer and + TWSocketClient components with threads. + This demo is mostly the same as TcpSrv demo but use a thread to + run client code. This is needed if client operation is lengthy + and blocking (such as a long database query) but otherwise will + consume more CPU cycles in task switching and makes thing much + more complexe because multithreading requires synchronization. +History: +Feb 24, 2002 V1.01 Wilfried Mestdagh added ThreadDetach + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit ThrdSrv1; + +interface + +{$IFDEF VER80} + 'This sample program use threads and hence is not compatible with Delphi 1'; +{$ENDIF} + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, StdCtrls, ExtCtrls, WSocket, WSocketS; + +const + ThrdSrvVersion = 101; + CopyRight = ' ThrdSrv (c) 2001-2002 by Franois PIETTE. V1.01'; + WM_APPSTARTUP = WM_USER + 1; + +type + TDisplayProc = procedure (const Msg : String) of object; + + { TClientThread is our worker thread class. Each time a client connect, a } + { new TClientThread is instanciated and client socket attached to it so } + { events are processed in the thread's context. } + { Remember that multithreading requires synchronization, specially when } + { updating GUI or accessing shared data. } + { TClientThread uses OnDisplay event to display data on the application } + { main form. Synchronization is automatically done. } + TClientThread = class(TThread) + private + FWSocket : TWSocket; { Reference to client socket } + FMsg : String; { Message to be displayed } + FOnDisplay : TDisplayProc; { Event variable } + FThreadAttached : Boolean; { TRUE once socket attached } + procedure DisplayMsg; { Synchronized procedure } + public + procedure Execute; override; { Main method } + procedure Display(const Msg : String); { Takes care of synchroniz. } + published + property WSocket : TWSocket read FWSocket + write FWSocket; + property ThreadAttached : Boolean read FThreadAttached + write FThreadAttached; + property OnDisplay : TDisplayProc read FOnDisplay + write FOnDisplay; + end; + + { TThrdSrvClient is the class which will be instanciated by server } + { component for each new client. N simultaneous clients means N } + { TThrdSrvClient will be instanciated. Each being used to handle only a } + { single client. } + { We can add any data that has to be private for each client, such as } + { receive buffer or any other data needed for processing. } + TThrdSrvClient = class(TWSocketClient) + public + ClientThread : TClientThread; + RcvdLine : String; + ConnectTime : TDateTime; + end; + + { Application main from } + TTcpSrvForm = class(TForm) + ToolPanel: TPanel; + DisplayMemo: TMemo; + WSocketServer1: TWSocketServer; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure WSocketServer1ClientConnect(Sender: TObject; + Client: TWSocketClient; Error: Word); + procedure WSocketServer1ClientDisconnect(Sender: TObject; + Client: TWSocketClient; Error: Word); + procedure WSocketServer1BgException(Sender: TObject; E: Exception; + var CanClose: Boolean); + procedure WSocketServer1ClientCreate(Sender: TObject; + Client: TWSocketClient); + private + FIniFileName : String; + FInitialized : Boolean; + procedure Display(const Msg : String); + procedure WMAppStartup(var Msg: TMessage); message WM_APPSTARTUP; + procedure ClientDataAvailable(Sender: TObject; Error: Word); + procedure ProcessData(Client : TThrdSrvClient); + procedure ClientBgException(Sender : TObject; + E : Exception; + var CanClose : Boolean); + procedure ClientLineLimitExceeded(Sender : TObject; + Cnt : LongInt; + var ClearData : Boolean); +{$IFDEF VER140} + { Delphi 6 changed the rules about synchronization... } + procedure WakeMainThread(Sender: TObject); +{$ENDIF} + public + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + TcpSrvForm: TTcpSrvForm; + +implementation + +{$R *.DFM} + +const + SectionWindow = 'WindowTcpSrv'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormCreate(Sender: TObject); +begin + { Compute INI file name based on exe file name. Remove path to make it } + { go to windows directory. } + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + +{$IFDEF VER140} + { With Delphi 6, we need to waken mainthread ourself ! } + Classes.WakeMainThread := Self.WakeMainThread; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + { Fetch persistent parameters from INI file } + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + IniFile.Destroy; + DisplayMemo.Clear; + { Delay startup code until our UI is ready and visible } + PostMessage(Handle, WM_APPSTARTUP, 0, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTcpSrvForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + { Save persistent data to INI file } + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in our display memo. Delete lines to be sure to not } +{ overflow the memo which may have a limited capacity. } +procedure TTcpSrvForm.Display(const Msg : String); +var + I : Integer; +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + for I := 1 to 50 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + {$IFNDEF VER80} + { Scroll to makes caret visible } + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is our custom message handler. We posted a WM_APPSTARTUP message } +{ from FormShow event handler. Now UI is ready and visible. } +procedure TTcpSrvForm.WMAppStartup(var Msg: TMessage); +begin + Display(Trim(CopyRight)); { This demo version } + Display(Trim(wsocket.Copyright)); { TWSocket version } + Display(Trim(wsockets.CopyRight)); { TWSocketServer version } + Display(''); + Display('MainThreadID : $' + IntToHex(GetCurrentThreadID, 8)); + WSocketServer1.Proto := 'tcp'; { Use TCP protocol } + WSocketServer1.Port := 'telnet'; { Use telnet port } + WSocketServer1.Addr := '0.0.0.0'; { Use any interface } + WSocketServer1.ClientClass := TThrdSrvClient; { Use our component } + WSocketServer1.Listen; { Start litening } + Display('Waiting for clients on port ''' + WSocketServer1.Port + '''...'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER140} +{ Delphi 6 requires a little help in order for TThread.Synchronize to work. } +{ We just post a do-nothing message to the form which will waken up the } +{ maine thread and execute waiting synchronized procedures. } +procedure TTcpSrvForm.WakeMainThread(Sender: TObject); +begin + PostMessage(Handle, WM_NULL, 0, 0); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Called in main thread context. } +procedure TTcpSrvForm.WSocketServer1ClientCreate( + Sender : TObject; + Client : TWSocketClient); +begin + with Client as TThrdSrvClient do begin + Client.ThreadDetach; + Client.MultiThreaded := TRUE; + ClientThread := TClientThread.Create(TRUE); + ClientThread.FreeOnTerminate := TRUE; + ClientThread.WSocket := Client; + ClientThread.OnDisplay := Display; + ClientThread.Suspended := FALSE; + { Wait until thread is started and has attached client socket to } + { his own context. } + while not ClientThread.ThreadAttached do + Sleep(0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is called each time a new client is connecting. } +{ Called in main thread context. } +procedure TTcpSrvForm.WSocketServer1ClientConnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TThrdSrvClient do begin + Display('Client connected.' + + ' Remote: ' + PeerAddr + '/' + PeerPort + + ' Local: ' + GetXAddr + '/' + GetXPort + + ' ThreadID : $' + IntToHex(ClientThread.ThreadID, 8)); + LineMode := TRUE; + LineEdit := TRUE; + LineLimit := 80; { Do not accept long lines } + OnDataAvailable := ClientDataAvailable; + OnLineLimitExceeded := ClientLineLimitExceeded; + OnBgException := ClientBgException; + ConnectTime := Now; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called each time a client disconnect. } +{ This procedure is called in main thread context. } +procedure TTcpSrvForm.WSocketServer1ClientDisconnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + with Client as TThrdSrvClient do begin + Display('Client disconnecting: ' + PeerAddr + ' ' + + 'Duration: ' + FormatDateTime('hh:nn:ss', + Now - ConnectTime) + + ' ThreadID : $' + IntToHex(GetCurrentThreadID, 8)); + + { Clear WSocket reference in worker thread } + { ClientThread.WSocket := nil; } + { Break message pump within worker thread } + PostThreadMessage(ClientThread.ThreadID, WM_QUIT, 0, 0); + { Allow up to 10 second for thread termination } + WaitForSingleObject(ClientThread.Handle, 10000); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is called in client thread context. So be aware about GUI } +{ update: you must use synchronize like ClientThread.Display does. } +procedure TTcpSrvForm.ClientLineLimitExceeded( + Sender : TObject; + Cnt : LongInt; + var ClearData : Boolean); +begin + with Sender as TThrdSrvClient do begin + ClientThread.Display('Line limit exceeded from ' + GetPeerAddr + '. Closing.'); + ClearData := TRUE; + Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Each time a client has datavailable triggers this event handler. } +{ We receive data (line mode) and execute "commands". } +{ This procedure is called in client thread context. So be aware about GUI } +{ update: you must use synchronize like ClientThread.Display does. } +procedure TTcpSrvForm.ClientDataAvailable( + Sender : TObject; + Error : Word); +begin + with Sender as TThrdSrvClient do begin + { We use line mode. We will receive complete lines } + RcvdLine := ReceiveStr; + { Remove trailing CR/LF } + while (Length(RcvdLine) > 0) and + (RcvdLine[Length(RcvdLine)] in [#13, #10]) do + RcvdLine := Copy(RcvdLine, 1, Length(RcvdLine) - 1); + ClientThread.Display('Received from ' + GetPeerAddr + ': ''' + + RcvdLine + ''' ' + + 'ThreadID: $' + IntToHex(GetCurrentThreadID, 8)); + ProcessData(Sender as TThrdSrvClient); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is called in client thread context. So be aware about GUI } +{ update: you must use synchronize. } +procedure TTcpSrvForm.ProcessData(Client : TThrdSrvClient); +var + I : Integer; + AClient : TThrdSrvClient; +begin + { We could replace all those CompareText with a table lookup } + if CompareText(Client.RcvdLine, 'help') = 0 then + Client.SendStr('Commands are:' + #10#13 + + ' exit' + #10#13 + + ' who' + #10#13 + + ' sleep' + #10#13 + + ' time' + #10#13 + + ' exception' + #10#13) + else if CompareText(Client.RcvdLine, 'exit') = 0 then + { We can't call Client.Close here because we will immediately } + { reenter DataAvailable event handler with same line because } + { a line is removed from buffer AFTER it has been processed. } + { Using CloseDelayed will delay Close until we are out of } + { current event handler. } + Client.CloseDelayed + else if CompareText(Client.RcvdLine, 'time') = 0 then + { Send server date and time to client } + Client.SendStr(DateTimeToStr(Now) + #13#10) + else if CompareText(Client.RcvdLine, 'who') = 0 then begin + { Send client list to client } + Client.SendStr('There are ' + IntToStr(WSocketServer1.ClientCount) + + ' connected users:' + #13#10); + for I := WSocketServer1.ClientCount - 1 downto 0 do begin + AClient := TThrdSrvClient(WSocketServer1.Client[I]); + Client.SendStr(AClient.PeerAddr + ':' + AClient.GetPeerPort + ' ' + + DateTimeToStr(AClient.ConnectTime) + #13#10); + end; + end + else if CompareText(Client.RcvdLine, 'Sleep') = 0 then begin + Client.SendStr('Now sleeping for 15"...' + #13#10); + Sleep(15000); + Client.SendStr('Wakeup !' + #13#10); + end + else if CompareText(Client.RcvdLine, 'exception') = 0 then + { This will trigger a background exception for client } + PostMessage(Client.Handle, WM_TRIGGER_EXCEPTION, 0, 0) + else + if Client.State = wsConnected then + Client.SendStr('Unknown command: ''' + Client.RcvdLine + '''' + #13#10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when listening (server) socket experienced } +{ a background exception. Should normally never occurs. } +{ This procedure is called in main thread context. } +procedure TTcpSrvForm.WSocketServer1BgException( + Sender : TObject; + E : Exception; + var CanClose : Boolean); +begin + Display('Server exception occured: ' + E.ClassName + ': ' + E.Message); + CanClose := FALSE; { Hoping that server will still work ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when a client socket experience a background } +{ exception. It is likely to occurs when client aborted connection and data } +{ has not been sent yet. } +{ Warning: This procedure is executed in worker thread context. } +procedure TTcpSrvForm.ClientBgException( + Sender : TObject; + E : Exception; + var CanClose : Boolean); +begin + with Sender as TThrdSrvClient do begin + ClientThread.Display('Client exception occured: ' + + E.ClassName + ': ' + E.Message); + end; + CanClose := TRUE; { Goodbye client ! } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* *} +{* TClientThread *} +{* *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is our client worker thread main procedure. It is thread's code. } +{ We have to attach client socket to this thread's context and then } +{ process messages so that TWSocket events works. } +procedure TClientThread.Execute; +begin + if not Assigned(WSocket) then + Exit; + + { Attach client socket to this thread } + WSocket.ThreadAttach; + { Signal main thread that we've attached socket to this thread } + ThreadAttached := TRUE; + { Now let main thread continue starting the connection. } + { This little avoid race condition. } + Sleep(0); + { Then process messages until WM_QUIT message is posted. } + { TWSocket is event-driven. So even when used within a thread, we } + { have to have a "message pump". Any message pump will do and there } + { is one built in TWSocket, so use it ! } + WSocket.MessageLoop; + { Be sure to have main thread waiting for termination before terminating} + Sleep(0); + { Detach the hidden window from within the thread } + WSocket.ThreadDetach; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is called from client thread and must display a message } +{ on the GUI (main application form). As we are in a thread, we can't } +{ simply call something that act on the GUI, we MUST use synchronize to ask } +{ main thread to update the GUI. } +procedure TClientThread.Display(const Msg: String); +begin + { Synchronized procedure have no parameter, we must use a variable } + FMsg := Msg; + { Then synchronize the procedure (which will use FMsg) } + Synchronize(DisplayMsg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Never call this procedure directly, always call Synchronize(DisplayMsg) } +procedure TClientThread.DisplayMsg; +begin + if Assigned(FOnDisplay) then + FOnDisplay(FMsg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/TnCli1.dfm b/lib/ics/Delphi/Internet/TnCli1.dfm new file mode 100644 index 00000000..48e4ee52 Binary files /dev/null and b/lib/ics/Delphi/Internet/TnCli1.dfm differ diff --git a/lib/ics/Delphi/Internet/TnCli1.pas b/lib/ics/Delphi/Internet/TnCli1.pas new file mode 100644 index 00000000..aa2aafac --- /dev/null +++ b/lib/ics/Delphi/Internet/TnCli1.pas @@ -0,0 +1,268 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: TNCLIENT.PAS +Object: Delphi application which is a basic telnet program demonstrating + WSocket, TnCnx, TnEmulVT, EmulVT components. +Author: Franois PIETTE +Creation: July 22, 1997 +Version: 2.05 +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 05, 1997 Added display of windows socket version info. +Sep 23, 1997 Added local echo check box +Sep 24, 1997 V2.03 Added TnEmulVT1.RestoreOptions just before connecting + Added interactive support for telnet echo option. +Sep 25, 1997 V2.04 Port to C++Builder +Dec 10, 1998 V2.05 Added IniFile to save config + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnCli1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, IniFiles, EmulVT, TnEmulVT, WSocket, Winsock; + +type + TTelnetForm = class(TForm) + TnEmulVT1: TTnEmulVT; + ConnectButton: TButton; + Label1: TLabel; + HostNameEdit: TEdit; + Label2: TLabel; + PortEdit: TEdit; + DisconnectButton: TButton; + StatusLabel: TLabel; + SendButton: TButton; + OptionsButton: TButton; + LocalEchoCheckBox: TCheckBox; + RequestLocalEchoOnButton: TButton; + RequestLocalEchoOffButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure TnEmulVT1SessionConnected(Sender: TObject); + procedure TnEmulVT1SessionClosed(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure OptionsButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure LocalEchoCheckBoxClick(Sender: TObject); + procedure TnEmulVT1LocalEcho(Sender: TObject); + procedure RequestLocalEchoOnButtonClick(Sender: TObject); + procedure RequestLocalEchoOffButtonClick(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + private + FIniFileName : String; + FInitialized : Boolean; + public + { Dclarations publiques } + end; + +var + TelnetForm: TTelnetForm; + +implementation + +{$R *.DFM} +const + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyHostName = 'HostName'; + KeyPort = 'Port'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.FormCreate(Sender: TObject); +begin + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + StatusLabel.Caption := 'Not connected'; + TnEmulVT1.RestoreOptions; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.FormShow(Sender: TObject); +var + WinsockData : TWSADATA; + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + HostNameEdit.Text := IniFile.ReadString(SectionData, KeyHostName, + 'localhost'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, + 'telnet'); + + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, (Screen.Width - Width) div 2); + + IniFile.Free; + TnEmulVT1.Clear; + { Set auto-wrap mode. Here is the place to do other settings. } + TnEmulVT1.WriteStr(#27'[?7h'); + WinsockData := WinsockInfo; + StatusLabel.Caption := StrPas(WinsockData.szDescription); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyHostName, HostNameEdit.Text); + IniFile.WriteString(SectionData, KeyPort, PortEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.ConnectButtonClick(Sender: TObject); +begin + StatusLabel.Caption := 'Connecting'; + Refresh; + ConnectButton.Enabled := FALSE; + try + TnEmulVT1.Disconnect; + TnEmulVT1.Port := PortEdit.Text; + TnEmulVT1.HostName := HostNameEdit.Text; + TnEmulVT1.RestoreOptions; + { This can take quite a long time when hostname is unknown and } + { if DNS feature is enabled (2 or 3 minutes !) } + TnEmulVT1.Connect; + except + ConnectButton.Enabled := TRUE; + raise; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.DisconnectButtonClick(Sender: TObject); +begin + TnEmulVT1.Disconnect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.TnEmulVT1SessionConnected(Sender: TObject); +begin + DisconnectButton.Enabled := TRUE; + StatusLabel.Caption := 'Connected'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.TnEmulVT1SessionClosed(Sender: TObject); +begin + DisconnectButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + StatusLabel.Caption := 'Not connected'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.FormResize(Sender: TObject); +begin + TnEmulVT1.Width := ClientWidth; + TnEmulVT1.Height := ClientHeight - TnEmulVT1.Top; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.SendButtonClick(Sender: TObject); +begin + TnEmulVT1.SendStr('Hello world !' + #13#10); + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.OptionsButtonClick(Sender: TObject); +begin + TnEmulVT1.HostName := HostNameEdit.Text; + TnEmulVT1.EditOptions; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.TnEmulVT1LocalEcho(Sender: TObject); +begin + if TnEmulVT1.GetLocalEcho then + StatusLabel.Caption := 'Remote will not echo' + else + StatusLabel.Caption := 'Remote will echo'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.LocalEchoCheckBoxClick(Sender: TObject); +begin + TnEmulVT1.LocalEcho := LocalEchoCheckBox.Checked; + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.RequestLocalEchoOnButtonClick(Sender: TObject); +begin + TnEmulVT1.RequestLocalEcho(TRUE); + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.RequestLocalEchoOffButtonClick(Sender: TObject); +begin + TnEmulVT1.RequestLocalEcho(FALSE); + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + + +end. + diff --git a/lib/ics/Delphi/Internet/UdpLstn1.dfm b/lib/ics/Delphi/Internet/UdpLstn1.dfm new file mode 100644 index 00000000..362aaa7d Binary files /dev/null and b/lib/ics/Delphi/Internet/UdpLstn1.dfm differ diff --git a/lib/ics/Delphi/Internet/UdpLstn1.pas b/lib/ics/Delphi/Internet/UdpLstn1.pas new file mode 100644 index 00000000..59fc2228 --- /dev/null +++ b/lib/ics/Delphi/Internet/UdpLstn1.pas @@ -0,0 +1,288 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Copyright: You can use this software freely, at your own risks +Creation: April 4, 1997 +Version: 2.03 +Object: Demo program to show how to use TWSocket object to listen + UDP messages from the network. Use UDPSend or any other + program to send UDP messages. +EMail: francois.piette@overbyte.be http://www.overbyte.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997, 2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Jul 23, 1997 Adapted for Delphi 1, 2 and 3 +Sep 06, 1997 Version 2.01 +Sep 27, 1997 Updated for TWSocket changes + Replace loopback address by real localhost IP addr +Dec 12, 1998 V2.02 Added icomming IP and port number display +Mar 07, 1999 V2.03 Corrected compatibility bug with Delphi 1 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit UdpLstn1; + +{$J+} + +interface + +uses + WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + FormPos, StdCtrls, WinSock, WSocket, IniFiles; + +type + TMainForm = class(TForm) + WSocket: TWSocket; + StartButton: TButton; + DataAvailableLabel: TLabel; + InfoLabel: TLabel; + StopButton: TButton; + PortEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + ServerEdit: TEdit; + AnyServerCheckBox: TCheckBox; + procedure StartButtonClick(Sender: TObject); + procedure WSocketDataAvailable(Sender: TObject; Error: Word); + procedure WSocketSessionConnected(Sender: TObject; Error: Word); + procedure StopButtonClick(Sender: TObject); + procedure WSocketSessionClosed(Sender: TObject; Error: Word); + procedure FormShow(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure AnyServerCheckBoxClick(Sender: TObject); + procedure ServerEditChange(Sender: TObject); + private + { Dclarations prives } + FIniFileName : String; + FSectionName : String; + FKeyName : String; + FServerAddr : TInAddr; + public + { Dclarations publiques } + end; + +var + MainForm: TMainForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then { Petite optimisation: pas d'espace } + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.StartButtonClick(Sender: TObject); +begin + FServerAddr := WSocketResolveHost(ServerEdit.Text); + if FServerAddr.S_addr = htonl(INADDR_LOOPBACK) then begin + { Replace loopback address by real localhost IP addr } + FServerAddr := WSocketResolveHost(LocalHostName); + end; + WSocket.Proto := 'udp'; + WSocket.Addr := '0.0.0.0'; + WSocket.Port := PortEdit.Text; + WSocket.Listen; + PortEdit.Enabled := FALSE; + ServerEdit.Enabled := FALSE; + AnyServerCheckBox.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] in ['0'..'9']) do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.WSocketDataAvailable(Sender: TObject; Error: Word); +var + Buffer : array [0..1023] of char; + Len : Integer; + Src : TSockAddrIn; + SrcLen : Integer; +begin + SrcLen := SizeOf(Src); + Len := WSocket.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen); + if Len >= 0 then begin + if (FServerAddr.S_addr = INADDR_ANY) or + (FServerAddr.S_addr = Src.Sin_addr.S_addr) then begin + Buffer[Len] := #0; + DataAvailableLabel.Caption := IntToStr(atoi(DataAvailableLabel.caption) + 1) + + ' ' + StrPas(inet_ntoa(Src.sin_addr)) + + ':' + IntToStr(ntohs(Src.sin_port)) + + '--> ' + StrPas(Buffer); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.WSocketSessionConnected(Sender: TObject; + Error: Word); +begin + StartButton.Enabled := FALSE; + StopButton.Enabled := TRUE; + InfoLabel.Caption := 'Connected'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.StopButtonClick(Sender: TObject); +begin + StartButton.Enabled := TRUE; + StopButton.Enabled := FALSE; + PortEdit.Enabled := TRUE; + ServerEdit.Enabled := TRUE; + AnyServerCheckBox.Enabled := TRUE; + WSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.WSocketSessionClosed(Sender: TObject; Error: Word); +begin + StartButton.Enabled := TRUE; + StopButton.Enabled := FALSE; + PortEdit.Enabled := TRUE; + ServerEdit.Enabled := TRUE; + AnyServerCheckBox.Enabled := TRUE; + InfoLabel.Caption := 'Disconnected'; + DataAvailableLabel.Caption := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +var + IniFile : TIniFile; +begin + if FirstTime then begin + FirstTime := FALSE; + FIniFileName := 'UdpLstn'; + FSectionName := 'Windows'; + FKeyName := 'MainForm'; + LoadFormPos(Self, FIniFilename, FSectionName, FKeyName); + DataAvailableLabel.Caption := ''; + InfoLabel.Caption := 'Click on Start button'; + StartButton.Enabled := TRUE; + StopButton.Enabled := FALSE; + IniFile := TIniFile.Create(FIniFileName); + PortEdit.Text := IniFile.ReadString('data', 'port', '600'); + ServerEdit.Text := IniFile.ReadString('data', 'server', '0.0.0.0'); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +var + IniFile : TIniFile; +begin + SaveFormPos(Self, FIniFilename, FSectionName, FKeyName); + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString('data', 'port', PortEdit.Text); + IniFile.WriteString('data', 'server', ServerEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.AnyServerCheckBoxClick(Sender: TObject); +begin + if AnyServerCheckBox.Checked then + ServerEdit.Text := '0.0.0.0'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.ServerEditChange(Sender: TObject); +begin + AnyServerCheckBox.Checked := (Trim(ServerEdit.Text) = '0.0.0.0'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/UdpSend1.dfm b/lib/ics/Delphi/Internet/UdpSend1.dfm new file mode 100644 index 00000000..5c7d050d Binary files /dev/null and b/lib/ics/Delphi/Internet/UdpSend1.dfm differ diff --git a/lib/ics/Delphi/Internet/UdpSend1.pas b/lib/ics/Delphi/Internet/UdpSend1.pas new file mode 100644 index 00000000..a1a62203 --- /dev/null +++ b/lib/ics/Delphi/Internet/UdpSend1.pas @@ -0,0 +1,150 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Copyright: You can use this software freely, at your own risks +Creation: April 4, 1997 +Version: 2.02 +Object: Demo program to show how to use TWSocket object to broadcast + UDP messages on the network. Use UDPLstn to listen to those + UDP messages, or other UDP messages. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 06, 1997 Version 2.01 +Dec 12, 1998 V2.02 Added LocalPort editbox + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit UdpSend1; + +{$J+} + +interface + +uses + WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + FormPos, StdCtrls, WSocket, IniFiles; + +type + TMainForm = class(TForm) + WSocket: TWSocket; + SendButton: TButton; + MessageEdit: TEdit; + PortEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + LocalPortEdit: TEdit; + AnyPortCheckBox: TCheckBox; + procedure FormShow(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure SendButtonClick(Sender: TObject); + procedure AnyPortCheckBoxClick(Sender: TObject); + procedure LocalPortEditChange(Sender: TObject); + private + FIniFileName : String; + FSectionName : String; + FKeyName : String; + end; + +var + MainForm: TMainForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +var + IniFile : TIniFile; +begin + if FirstTime then begin + FirstTime := FALSE; + FIniFileName := 'UdpSend'; + FSectionName := 'Windows'; + FKeyName := 'MainForm'; + LoadFormPos(Self, FIniFilename, FSectionName, FKeyName); + IniFile := TIniFile.Create(FIniFileName); + PortEdit.Text := IniFile.ReadString('data', 'Port', '600'); + LocalPortEdit.Text := IniFile.ReadString('data', 'LocalPort', '0'); + MessageEdit.Text := IniFile.ReadString('data', 'Message', ''); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +var + IniFile : TIniFile; +begin + SaveFormPos(Self, FIniFilename, FSectionName, FKeyName); + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString('data', 'Port', PortEdit.Text); + IniFile.WriteString('data', 'LocalPort', LocalPortEdit.Text); + IniFile.WriteString('data', 'Message', MessageEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.SendButtonClick(Sender: TObject); +begin + WSocket.Proto := 'udp'; + WSocket.Addr := '255.255.255.255'; + WSocket.Port := PortEdit.Text; + WSocket.LocalPort := LocalPortEdit.Text; + WSocket.Connect; + WSocket.SendStr(MessageEdit.Text); + WSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.AnyPortCheckBoxClick(Sender: TObject); +begin + if AnyPortCheckBox.Checked then + LocalPortEdit.Text := '0'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.LocalPortEditChange(Sender: TObject); +begin + AnyPortCheckBox.Checked := (LocalPortEdit.Text = '0'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/WebServ.dpr b/lib/ics/Delphi/Internet/WebServ.dpr new file mode 100644 index 00000000..d939950d --- /dev/null +++ b/lib/ics/Delphi/Internet/WebServ.dpr @@ -0,0 +1,12 @@ +program WebServ; + +uses + Forms, + WebServ1 in 'WebServ1.pas' {WebServForm}; + +{$R *.RES} + +begin + Application.CreateForm(TWebServForm, WebServForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/WebServ1.dfm b/lib/ics/Delphi/Internet/WebServ1.dfm new file mode 100644 index 00000000..2512f9b5 Binary files /dev/null and b/lib/ics/Delphi/Internet/WebServ1.dfm differ diff --git a/lib/ics/Delphi/Internet/WebServ1.pas b/lib/ics/Delphi/Internet/WebServ1.pas new file mode 100644 index 00000000..cae9b79e --- /dev/null +++ b/lib/ics/Delphi/Internet/WebServ1.pas @@ -0,0 +1,755 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: Oct 10, 1999 +Description: WebSrv1 show how to use THttpServer component to implement + a web server. WARNING: The code below is for demonstration + only. You need to add code to fit your needs about security. + The code below allows to get all files on the computer running + the demo. Add code in OnGetDocument, OnHeadDocument and + OnPostDocument to check for authorized access to files. +Version: 1.01 +EMail: francois.piette@overbyte.be http://www.overbyte.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +May 21, 2000 V1.01 Worked around a bug with Delphi 3 and lpVendorInfo +Oct 07, 2001 V1.02 Added Logfile feature + Added display if time and IP Addr for GET command. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WebServ1; +{$I+} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, IniFiles, StdCtrls, ExtCtrls, WinSock, WSocket, WSocketS, HttpSrv; + +const + CopyRight : String = 'WebServ (c) 1999-2001 F. Piette V1.02 '; + +type + { This component is used for client connection instead of default one. } + { This enables to add any data we need to handle our application. } + { As this data is located in client component, each connected client has } + { his own private data. } + TMyHttpConnection = class(THttpConnection) + protected + FPostedDataBuffer : PChar; { Will hold dynamically allocated buffer } + FPostedDataSize : Integer; { Databuffer size } + FDataLen : Integer; { Keep track of received byte count. } + public + destructor Destroy; override; + end; + + { This is the main form for our application. Any data here is global for } + { all clients. Put provate data in TMyHttpConnection class (see above). } + TWebServForm = class(TForm) + ToolsPanel: TPanel; + DisplayMemo: TMemo; + HttpServer1: THttpServer; + Label1: TLabel; + DocDirEdit: TEdit; + Label2: TLabel; + DefaultDocEdit: TEdit; + StartButton: TButton; + StopButton: TButton; + Label3: TLabel; + PortEdit: TEdit; + ClientCountLabel: TLabel; + Label5: TLabel; + ClearButton: TButton; + DisplayHeaderCheckBox: TCheckBox; + WriteLogFileCheckBox: TCheckBox; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure HttpServer1GetDocument(Sender, Client: TObject; + var Flags: THttpGetFlag); + procedure StartButtonClick(Sender: TObject); + procedure StopButtonClick(Sender: TObject); + procedure HttpServer1ClientConnect(Sender: TObject; + Client: TObject; Error: Word); + procedure HttpServer1ClientDisconnect(Sender: TObject; + Client: TObject; Error: Word); + procedure HttpServer1ServerStarted(Sender: TObject); + procedure HttpServer1ServerStopped(Sender: TObject); + procedure HttpServer1HeadDocument(Sender, Client: TObject; + var Flags: THttpGetFlag); + procedure HttpServer1PostedData(Sender: TObject; + Client: TObject; Error: Word); + procedure HttpServer1PostDocument(Sender, Client: TObject; + var Flags: THttpGetFlag); + procedure ClearButtonClick(Sender: TObject); + procedure WriteLogFileCheckBoxClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FCountRequests : Integer; + FLogFile : TextFile; + FLogFileName : String; + FLogFileOpened : Boolean; + procedure CreateVirtualDocument_time_htm(Sender : TObject; + Client : TObject; + var Flags : THttpGetFlag); + procedure DisplayHeader(Client : TMyHttpConnection); + procedure ProcessPostedData_CgiFrm1(Client : TMyHttpConnection); + procedure CloseLogFile; + procedure OpenLogFile; + public + procedure Display(Msg : String); + property IniFileName : String read FIniFileName write FIniFileName; + end; + +var + WebServForm: TWebServForm; + +implementation + +{$R *.DFM} + +const + { IniFile layout for persistent data } + SectionWindow = 'WindowMain'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyDocDir = 'DocDir'; + KeyDefaultDoc = 'DefaultDoc'; + KeyPort = 'Port'; + KeyDisplayHeader = 'DisplayHeader'; + KeyLogToFile = 'LogToFile'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.FormCreate(Sender: TObject); +begin + { Create IniFileName based on EXE file name; } + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; + FLogFileName := Application.ExeName; + FLogFileName := Copy(FLogFileName, 1, Length(FLogFileName) - 3) + '.log' +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + wsi : TWSADATA; +begin + if not FInitialized then begin + FInitialized := TRUE; + + { Restore persistent data from INI file } + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + DocDirEdit.Text := IniFile.ReadString(SectionData, KeyDocDir, + 'c:\WwwRoot'); + DefaultDocEdit.Text := IniFile.ReadString(SectionData, KeyDefaultDoc, + 'index.html'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, + '80'); + DisplayHeaderCheckBox.Checked := + Boolean(IniFile.ReadInteger(SectionData, KeyDisplayHeader, 0)); + WriteLogFileCheckBox.Checked := + Boolean(IniFile.ReadInteger(SectionData, KeyLogToFile, 0)); + IniFile.Destroy; + { Start log file } + if WriteLogFileCheckBox.Checked then begin + OpenLogFile; + WriteLogFileCheckBox.Checked := FLogFileOpened; + end; + { Initialize client count caption } + ClientCountLabel.Caption := '0'; + { Display version info for program and used components } + wsi := WinsockInfo; + DisplayMemo.Clear; + Display(CopyRight); + Display('Using:'); + Display(' ' + WSocket.CopyRight); + Display(' ' + WSocketS.CopyRight); + Display(' ' + HttpSrv.CopyRight); + Display(' Winsock:'); + Display(' Version ' + + Format('%d.%d', [WinsockInfo.wHighVersion shr 8, + WinsockInfo.wHighVersion and 15])); + Display(' ' + StrPas(@wsi.szDescription)); + Display(' ' + StrPas(@wsi.szSystemStatus)); +{$IFNDEF VER100} + { A bug in Delphi 3 makes lpVendorInfo invalid } + if wsi.lpVendorInfo <> nil then + Display(' ' + StrPas(wsi.lpVendorInfo)); +{$ENDIF} + { Automatically start server } + StartButtonClick(Self); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + { Save persistent data to INI file } + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyDocDir, HttpServer1.DocDir); + IniFile.WriteString(SectionData, KeyDefaultDoc, HttpServer1.DefaultDoc); + IniFile.WriteString(SectionData, KeyPort, HttpServer1.Port); + IniFile.WriteInteger(SectionData, KeyDisplayHeader, + ord(DisplayHeaderCheckBox.Checked)); + IniFile.WriteInteger(SectionData, KeyLogToFile, + ord(WriteLogFileCheckBox.Checked)); + IniFile.Destroy; + CloseLogFile; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in display memo box, making sure we don't overflow it. } +procedure TWebServForm.Display(Msg : String); +begin + DisplayMemo.Lines.BeginUpdate; + try + { We preserve only 200 lines } + while DisplayMemo.Lines.Count > 200 do + DisplayMemo.Lines.Delete(0); + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + { Makes last line visible } + {$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; + if FLogFileOpened then begin + try + WriteLn(FLogFile, Msg); + except + on E:Exception do begin + DisplayMemo.Lines.Add('*** Exception' + + E.CLassName + ': ' + E.Message + + ' writing to log file ***'); + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when user clicks on start button. It is also } +{ called from FormShow event handler, at program startup. It starts server. } +{ We need to pass default document, document directory and client class } +{ to HTTP server component. Client class is very usefull because it } +{ instruct server component to instanciate our own client class instead of } +{ defualt client class. Using our own client class will enables you to add } +{ any data we need to handle our application. This data is private for each } +{ client. } +{ When server is started, we will get OnServerStarted event triggered. } +procedure TWebServForm.StartButtonClick(Sender: TObject); +begin + HttpServer1.DocDir := Trim(DocDirEdit.Text); + HttpServer1.DefaultDoc := Trim(DefaultDocEdit.Text); + HttpServer1.Port := Trim(PortEdit.Text); + HttpServer1.ClientClass := TMyHttpConnection; + HttpServer1.Start; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when user clicks on stop button. We just } +{ stop the server. We will get OnServerStopped event triggered. } +procedure TWebServForm.StopButtonClick(Sender: TObject); +begin + HttpServer1.Stop; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when user clicks on clear buttoN; We just } +{ clear the memo used for displaying activity. } +procedure TWebServForm.ClearButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when HTTP server is started, that is when } +{ server socket has started listening. } +procedure TWebServForm.HttpServer1ServerStarted(Sender: TObject); +begin + DocDirEdit.Enabled := FALSE; + DefaultDocEdit.Enabled := FALSE; + PortEdit.Enabled := FALSE; + StartButton.Enabled := FALSE; + StopButton.Enabled := TRUE; + Display('Server is waiting for connections'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when server has been stopped, that is } +{ when server socket stop listening. } +procedure TWebServForm.HttpServer1ServerStopped(Sender: TObject); +begin + DocDirEdit.Enabled := TRUE; + DefaultDocEdit.Enabled := TRUE; + PortEdit.Enabled := TRUE; + StartButton.Enabled := TRUE; + StopButton.Enabled := FALSE; + Display('Server stopped'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when a new client has connected. } +procedure TWebServForm.HttpServer1ClientConnect( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connecting } + Error : Word); { Error in connection } +begin + ClientCountLabel.Caption := IntToStr(HttpServer1.ClientCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when a client is disconnecting, just } +{ before client component is closed. } +procedure TWebServForm.HttpServer1ClientDisconnect( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connecting } + Error : Word); { Error in disconnection } +begin + ClientCountLabel.Caption := IntToStr(HttpServer1.ClientCount - 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when HTTP server component receive a HEAD } +{ command from any client. } +{ We just count the request, display a message and let HTTP server } +{ component handle everything. } +{ We should trap every URI we handle internally... } +procedure TWebServForm.HttpServer1HeadDocument( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connection issuing command } + var Flags : THttpGetFlag); { Tells what HTTP server has to do next } +begin + Inc(FCountRequests); + Display(IntToStr(FCountRequests) + + ': HEAD ' + TMyHttpConnection(Client).Path); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when HTTP server component receive a GET } +{ command from any client. } +{ We count the request, display a message and trap '/time.htm' path for } +{ special handling. } +{ There is no document time.htm on disk, we will create it on the fly. With } +{ a classic webserver we would have used a CGI or ISAPI/NSAPI to achieve } +{ the same goal. It is much easier here since we can use Delphi code } +{ directly to generate whatever we wants. Here for the demo we generate a } +{ page with server data and time displayed. } +procedure TWebServForm.HttpServer1GetDocument( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connection issuing command } + var Flags : THttpGetFlag); { Tells what HTTP server has to do next } +begin + { Count request and display a message } + Inc(FCountRequests); + Display('[' + FormatDateTime('HH:NN:SS', Now) + ' ' + + TWSocket(Client).GetPeerAddr + '] ' + IntToStr(FCountRequests) + + ': GET ' + TMyHttpConnection(Client).Path); + DisplayHeader(TMyHttpConnection(Client)); + + { Trap '/time.htm' path to dynamically generate an answer. } + if CompareText(THttpConnection(Client).Path, '/time.htm') = 0 then + CreateVirtualDocument_time_htm(Sender, Client, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is use to generate /time.htm document } +procedure TWebServForm.CreateVirtualDocument_time_htm( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connection issuing command } + var Flags : THttpGetFlag); { Tells what HTTP server has to do next } +var + Body : String; + Header : String; + Stream : TMemoryStream; +begin + { Let HTTP server component know we will send data to client } + Flags := hgWillSendMySelf; + { Create a stream to hold data sent to client that is the answer } + { made of a HTTP header and a body made of HTML code. } + Stream := TMemoryStream.Create; + Body := '' + + '' + + 'ICS WebServer Demo' + + '' + #13#10 + + '' + + '

Time at server side:

' + #13#10 + + '

' + DateTimeToStr(Now) +'

' + #13#10 + + '' + + '' + #13#10; + Header := TMyHttpConnection(Client).Version + ' 200 OK' + #13#10 + + 'Content-Type: text/html' + #13#10 + + 'Content-Length: ' + + IntToStr(Length(Body)) + #13#10 + + #13#10; + Stream.Write(Header[1], Length(Header)); + Stream.Write(Body[1], Length(Body)); + { We need to seek to start of stream ! } + Stream.Seek(0, 0); + { We ask server component to send the stream for us. } + TMyHttpConnection(Client).DocStream := Stream; + TMyHttpConnection(Client).SendStream; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when HTTP server component receive a POST } +{ command from any client. } +{ We count the request, display a message and trap posted data. } +{ To check for posted data, you may construct the following HTML document: } +{ } +{ } +{ Test Form 1 } +{ } +{ } +{

Enter your first and last name

} +{
} +{ } +{ } +{ } +{ } +{ } +{ } +{ } +{ } +{ } +{
First name
Last name
} +{

} +{
} +{ } +{ } +procedure TWebServForm.HttpServer1PostDocument( + Sender : TObject; { HTTP server component } + Client : TObject; { Client connection issuing command } + var Flags : THttpGetFlag); { Tells what HTTP server has to do next } +var + Remote : TMyHttpConnection; +begin + { It's easyer to do the cast one time. Could use with clause... } + Remote := TMyHttpConnection(Client); + + { Count request and display a message } + Inc(FCountRequests); + Display(IntToStr(FCountRequests) + ': POST ' + Remote.Path); + DisplayHeader(Remote); + + { Check for request past. We only accept data for '/cgi-bin/cgifrm1.exe' } + if CompareText(Remote.Path, '/cgi-bin/cgifrm1.exe') = 0 then begin + { Tell HTTP server that we will accept posted data } + { OnPostedData event will be triggered when data comes in } + Flags := hgAcceptData; + { We wants to receive any data type. So we turn line mode off on } + { client connection. } + Remote.LineMode := FALSE; + { We need a buffer to hold posted data. We allocate as much as the } + { size of posted data plus one byte for terminating nul char. } + { We should check for ContentLength = 0 and handle that case... } +{$IFDEF VER80} + if Remote.FPostedDataSize = 0 then begin + Remote.FPostedDataSize := Remote.RequestContentLength + 1; + GetMem(Remote.FPostedDataBuffer, Remote.FPostedDataSize); + end + else begin + ReallocMem(Remote.FPostedDataBuffer, Remote.FPostedDataSize, Remote.RequestContentLength + 1); + Remote.FPostedDataSize := Remote.RequestContentLength + 1; + end; +{$ELSE} + ReallocMem(Remote.FPostedDataBuffer, Remote.RequestContentLength + 1); +{$ENDIF} + { Clear received length } + Remote.FDataLen := 0; + end + else + Flags := hg404; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered for each data packet posted by client } +{ when we told HTTP server component that we will accept posted data. } +{ We have to receive ALL data which is sent by remote client, even if there } +{ is more than what ContentLength tells us ! } +{ If ContentLength = 0, then we should receive data until connection is } +{ closed... } +procedure TWebServForm.HttpServer1PostedData( + Sender : TObject; { HTTP server component } + Client : TObject; { Client posting data } + Error : Word); { Error in data receiving } +var + Len : Integer; + Remains : Integer; + Junk : array [0..255] of char; + Remote : TMyHttpConnection; +begin + { It's easyer to do the cast one time. Could use with clause... } + Remote := TMyHttpConnection(Client); + + { How much data do we have to receive ? } + Remains := Remote.RequestContentLength - Remote.FDataLen; + if Remains <= 0 then begin + { We got all our data. Junk anything else ! } + Len := Remote.Receive(@Junk, SizeOf(Junk) - 1); + if Len >= 0 then + Junk[Len] := #0; + Exit; + end; + { Receive as much data as we need to receive. But warning: we may } + { receive much less data. Data will be split into several packets we } + { have to assemble in our buffer. } + Len := Remote.Receive(Remote.FPostedDataBuffer + Remote.FDataLen, Remains); + { Sometimes, winsock doesn't wants to givve any data... } + if Len <= 0 then + Exit; + + { Add received length to our count } + Inc(Remote.FDataLen, Len); + { Add a nul terminating byte (handy to handle data as a string) } + Remote.FPostedDataBuffer[Remote.FDataLen] := #0; + { Display receive data so far } + Display('Data: ''' + StrPas(Remote.FPostedDataBuffer) + ''''); + + { When we received the whole thing, we can process it } + if Remote.FDataLen = Remote.RequestContentLength then begin + if CompareText(Remote.Path, '/cgi-bin/cgifrm1.exe') = 0 then + ProcessPostedData_CgiFrm1(Remote) + else + Remote.Answer404; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will process posted data for CgiFrm1.exe } +procedure TWebServForm.ProcessPostedData_CgiFrm1(Client : TMyHttpConnection); +var + Stream : TStream; + FileName : String; + Body : String; + Header : String; + FirstName : String; + LastName : String; + HostName : String; + Buf : String; +begin + { Extract fields from posted data. } + ExtractURLEncodedValue(Client.FPostedDataBuffer, 'FirstName', FirstName); + ExtractURLEncodedValue(Client.FPostedDataBuffer, 'LastName', LastName); + { Get client IP address. We could to ReverseDnsLookup to get hostname } + HostName := Client.PeerAddr; + { Build the record to write to data file } + Buf := FormatDateTime('YYYYMMDD HHNNSS ', Now) + + FirstName + '.' + LastName + '@' + HostName + #13#10; + + { Save data to a text file } + FileName := ExtractFilePath(Application.ExeName) + 'CgiFrm1.txt'; + if FileExists(FileName) then + Stream := TFileStream.Create(FileName, fmOpenWrite) + else + Stream := TFileStream.Create(FileName, fmCreate); + Stream.Seek(0, soFromEnd); + Stream.Write(Buf[1], Length(Buf)); + Stream.Destroy; + + { Now create output stream to send back to remote client } + Stream := TMemoryStream.Create; + Body := '' + + '' + + 'ICS WebServer Demo' + + '' + #13#10 + + '' + + '

Your data has been recorded:

' + #13#10 + + '

' + FirstName + '.' + LastName + '@' + HostName +'

' + + '' + + '' + #13#10; + Header := Client.Version + ' 200 OK' + #13#10 + + 'Content-Type: text/html' + #13#10 + + 'Content-Length: ' + + IntToStr(Length(Body)) + #13#10 + + #13#10; + Stream.Write(Header[1], Length(Header)); + Stream.Write(Body[1], Length(Body)); + Stream.Seek(0, 0); + { Ask HTTP server component to send data stream for us } + Client.DocStream := Stream; + Client.SendStream; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.DisplayHeader(Client : TMyHttpConnection); +var + I : Integer; +begin + if not DisplayHeaderCheckBox.Checked then + Exit; + for I := 0 to Client.RequestHeader.Count - 1 do + Display('HDR' + IntToStr(I + 1) + ') ' + + Client.RequestHeader.Strings[I]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We need to override parent class destructor because we have allocated } +{ memory for our data buffer. } +destructor TMyHttpConnection.Destroy; +begin + if Assigned(FPostedDataBuffer) then begin + FreeMem(FPostedDataBuffer, FPostedDataSize); + FPostedDataBuffer := nil; + FPostedDataSize := 0; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.OpenLogFile; +begin + if FLogFileOpened then + Exit; + try + AssignFile(FLogFile, FLogFileName); + if FileExists(FLogFileName) then + Append(FLogFile) + else + Rewrite(FLogFile); + WriteLn(FLogFile, '[' + FormatDateTime('HH:NN:SS YYYY/MM/DD', Now) + + ' Log file opened.]'); + FLogFileOpened := TRUE; + except + FLogFileOpened := FALSE; + Display('*** Unable to open log file ***'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.CloseLogFile; +begin + if not FLogFileOpened then + Exit; + FLogFileOpened := FALSE; + WriteLn(FLogFile, '[' + FormatDateTime('HH:NN:SS YYYY/MM/DD', Now) + + ' Log file Closed.]'); + CloseFile(FLogFile); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWebServForm.WriteLogFileCheckBoxClick(Sender: TObject); +begin + if WriteLogFileCheckBox.Checked then + OpenLogFile + else + CloseLogFile; + WriteLogFileCheckBox.Checked := FLogFileOpened; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/cli5.dfm b/lib/ics/Delphi/Internet/cli5.dfm new file mode 100644 index 00000000..28939d5e Binary files /dev/null and b/lib/ics/Delphi/Internet/cli5.dfm differ diff --git a/lib/ics/Delphi/Internet/cli5.pas b/lib/ics/Delphi/Internet/cli5.pas new file mode 100644 index 00000000..b2bef581 --- /dev/null +++ b/lib/ics/Delphi/Internet/cli5.pas @@ -0,0 +1,193 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: Simple client application demonstrating TWSocket object in action. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Creation: September 21, 1996 +Version: 2.06 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 06, 1997 Beautified +Nov 09, 1997 Added a button to display the list of IP addresses for the + local computer (you can have two IP addresses if you are connected + to a LAN and to your ISP). +Nov 11, 1997 V2.03 Added a ReadLine button to show how to read a single line + synchronously. +Nov 18, 1997 V2.04 Show how to use ReceiveStr +Dec 05, 1998 V2.05 Don't use TWait component anymore +Aug 20, 1999 V2.06 Introduced FError to disply connection errors correctly. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Cli5; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, + Forms, Dialogs, Winsock, WSocket, StdCtrls; + +const + Client5Version = 206; + +type + TClientForm = class(TForm) + ConnectButton: TButton; + CliSocket: TWSocket; + InfoLabel: TLabel; + DisconnectButton: TButton; + DataLabel: TLabel; + IPButton: TButton; + ReadLineButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure CliSocketDataAvailable(Sender: TObject; Error: Word); + procedure CliSocketSessionConnected(Sender: TObject; Error: Word); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + procedure IPButtonClick(Sender: TObject); + procedure ReadLineButtonClick(Sender: TObject); + public + FError : Word; + end; + +var + ClientForm: TClientForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler gets called when we connected the server *} +procedure TClientForm.CliSocketSessionConnected(Sender: TObject; Error: Word); +begin + FError := Error; { Remember error code for SessionClosed event } + if Error <> 0 then + InfoLabel.Caption := 'Connection failed, error #' + IntToStr(Error) + else + InfoLabel.Caption := 'Connected'; + DisconnectButton.Enabled := TRUE; + ConnectButton.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler gets called when the server's connection is broken *} +{* Either by us or by the server. *} +procedure TClientForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + DataLabel.Caption := ''; + if FError = 0 then begin + { FError = 0 means we connected succesfully } + if Error <> 0 then + InfoLabel.Caption := 'Disconnected. Error #' + IntToStr(Error) + else + InfoLabel.Caption := 'Disconnected'; + end; + DisconnectButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* The user has clicked on the connect button... *} +procedure TClientForm.ConnectButtonClick(Sender: TObject); +begin + CliSocket.Addr := 'localhost'; { Server host name } + CliSocket.Proto := 'tcp'; { Protocol we wants to use } + CliSocket.Port := 'telnet'; { The port we wants to connect } + CliSocket.Connect; { Let's connect ! } + { Connect is just a request, it returns immediately. We eventually gets } + { gets connected later. At that time we will receive the event } + { SessionConnected. If you need a timeout, you have to start a TTimer. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* The user has clicked the disconnect button... *} +procedure TClientForm.DisconnectButtonClick(Sender: TObject); +begin + CliSocket.Close; { This will close the connection } + { When the connection will be effectively closed, we will receive the } + { SessionClosed even. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +begin + DataLabel.Caption := CliSocket.ReceiveStr; +end; + +{$IFDEF NEVER} +{ The same procedure using Receive: a little bit more complicated but } +{ more efficient because data is less copied from here to there. } +procedure TClientForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +var + Buffer : String[200]; + Count : Integer; +begin + Count := CliSocket.Receive(@Buffer[1], High(Buffer)); + Buffer[0] := chr(Count); + DataLabel.Caption := Buffer; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.IPButtonClick(Sender: TObject); +var + IPList : TStrings; + I : Integer; +begin + IPList := WSocket.LocalIPList; + InfoLabel.Caption := ''; + for I := 0 to IPList.Count - 1 do + InfoLabel.Caption := InfoLabel.Caption + ' ' + IPList.Strings[I]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.ReadLineButtonClick(Sender: TObject); +var + Buf : String; +begin + ReadLineButton.Enabled := FALSE; + try + CliSocket.ReadLine(30, Buf); + DataLabel.Caption := 'Line: ''' + Buf + ''''; + finally + ReadLineButton.Enabled := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/clidemo.dpr b/lib/ics/Delphi/Internet/clidemo.dpr new file mode 100644 index 00000000..88529f53 --- /dev/null +++ b/lib/ics/Delphi/Internet/clidemo.dpr @@ -0,0 +1,12 @@ +program CliDemo; + +uses + Forms, + CliDemo1 in 'CliDemo1.pas' {ClientForm}; + +{$R *.RES} + +begin + Application.CreateForm(TClientForm, ClientForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/client5.dpr b/lib/ics/Delphi/Internet/client5.dpr new file mode 100644 index 00000000..dc4bab20 --- /dev/null +++ b/lib/ics/Delphi/Internet/client5.dpr @@ -0,0 +1,12 @@ +program client5; + +uses + Forms, + Cli5 in 'Cli5.pas' {ClientForm}; + +{$R *.RES} + +begin + Application.CreateForm(TClientForm, ClientForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/clients.DBF b/lib/ics/Delphi/Internet/clients.DBF new file mode 100644 index 00000000..4f1066e9 Binary files /dev/null and b/lib/ics/Delphi/Internet/clients.DBF differ diff --git a/lib/ics/Delphi/Internet/clients.MDX b/lib/ics/Delphi/Internet/clients.MDX new file mode 100644 index 00000000..c30a4652 Binary files /dev/null and b/lib/ics/Delphi/Internet/clients.MDX differ diff --git a/lib/ics/Delphi/Internet/concli1.dpr b/lib/ics/Delphi/Internet/concli1.dpr new file mode 100644 index 00000000..50693237 --- /dev/null +++ b/lib/ics/Delphi/Internet/concli1.dpr @@ -0,0 +1,78 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: ConCli shows how to use TWSocket in a console mode application + (for Delphi 2, Delphi 3 or Delphi 4). +Creation: Nov 20, 1997 +Version: 1.01 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 05, 1998 V1.01 Don't use TWait control anymore + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} + Bomb('Sorry, Delphi 1 does not support console mode programs'); +{$ENDIF} +{$APPTYPE CONSOLE} +program ConCli1; + +uses + Forms, WSocket; + +var + WSocket1 : TWSocket; + Buffer : String; +begin + WSocket1 := TWsocket.Create(nil); + WSocket1.Proto := 'tcp'; + WSocket1.Addr := 'localhost'; + WSocket1.Port := 'telnet'; + WSocket1.Connect; + { Connect is asynchronous (non-blocking). We will wait while the } + { session is connecting or application terminated. } + while WSocket1.State in [wsConnecting] do begin + Application.ProcessMessages; + if Application.Terminated then + break; + end; + if WSocket1.State = wsConnected then begin + WSocket1.ReadLine(15, Buffer); + Writeln('Server banner is: ' + Buffer); + WSocket1.Close; + end + else + Writeln('Connection failed'); + WSocket1.Destroy; + + Writeln('Hit enter...'); + Readln; +end. diff --git a/lib/ics/Delphi/Internet/concli2.dpr b/lib/ics/Delphi/Internet/concli2.dpr new file mode 100644 index 00000000..a837eea0 --- /dev/null +++ b/lib/ics/Delphi/Internet/concli2.dpr @@ -0,0 +1,164 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: ConCli2 shows how to use TWSocket in a console mode application. + ConCli2 use a thread to make the socket run in the program + background while the foreground is busy with the user interface + (for simplicity here we just wait for the user to hit the + enter key). +Creation: Nov 20, 1997 +Version: 1.01 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 05, 1998 V1.01 Don't use TWait object anymore. + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} + Bomb('Sorry, Delphi 1 does not support console mode programs'); +{$ENDIF} +{$APPTYPE CONSOLE} +program ConCli2; + +uses + Windows, Classes, WSocket; + +const + ServerHostName = 'localhost'; + ServerPort = 'telnet'; + +type + TWSocketThread = class(TThread) + protected + FWSocket : TWsocket; + FRcvBuf : array [0..1023] of char; + procedure Execute; override; + procedure FWSocketDataAvailable(Sender : TObject; Error : Word); + procedure FWSocketSessionConnected(Sender : TObject; Error : Word); + procedure FWSocketSessionClosed(Sender : TObject; Error : Word); + public + constructor Create; virtual; + end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TWSocketThread.Create; +begin + inherited Create(TRUE); + FreeOnTerminate := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWSocketThread.Execute; +begin + // Let's the user know what we are doing + Writeln('Connecting to server ''', ServerHostName, + ''' on port ''', ServerPort, ''''); + + // Create the TWSocket we will use to communicate with the server + FWSocket := TWsocket.Create(nil); + + // Assign the event handler for the TWSocket events we care of + FWSocket.OnDataAvailable := FWSocketDataAvailable; + FWSocket.OnSessionClosed := FWSocketSessionClosed; + FWSocket.OnSessionConnected := FWSocketSessionConnected; + + // Connect to the server + FWSocket.Addr := ServerHostName; + FWSocket.Port := ServerPort; + FWSocket.Proto := 'tcp'; + FWSocket.Connect; + + // Let the TWSocket component makes his work + FWSocket.MessageLoop; + + // We are done, destroy the objects we created + FWSocket.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by the TWSocket when some data has been } +{ received by the lower level. } +procedure TWSocketThread.FWSocketDataAvailable(Sender : TObject; Error : Word); +var + Len : Integer; +begin + // Get the received data + Len := FWSocket.Receive(@FRcvBuf[0], SizeOf(FRcvBuf) - 1); + if Len <= 0 then + Exit; + + // Add a terminating nul byte to allow display using standard I/O + FRcvBuf[Len] := #0; + Write(FRcvBuf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TWSocket when the connection is } +{ established with the remote host } +procedure TWSocketThread.FWSocketSessionConnected(Sender : TObject; Error : Word); +begin + Writeln('Connected'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TWSocket when the connection is broken } +procedure TWSocketThread.FWSocketSessionClosed(Sender : TObject; Error : Word); +begin + Writeln('Server has diconnected'); + FWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the main program. } +var + WSocketThread : TWSocketThread; +begin + Writeln('Hit enter to stop the program'); + Writeln; + // Create the socket working thread (suspended) + WSocketThread := TWSocketThread.Create; + + // Start the thread + WSocketThread.Resume; + + // The main thread continue here. Process user request here. + Readln; + + // We are done, quit the program + Writeln('Ok.'); +end. + diff --git a/lib/ics/Delphi/Internet/dnslook.dpr b/lib/ics/Delphi/Internet/dnslook.dpr new file mode 100644 index 00000000..c7d8897c --- /dev/null +++ b/lib/ics/Delphi/Internet/dnslook.dpr @@ -0,0 +1,12 @@ +program DnsLook; + +uses + Forms, + DnsLook1 in 'DnsLook1.pas' {DnsLookupForm}; + +{$R *.RES} + +begin + Application.CreateForm(TDnsLookupForm, DnsLookupForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/finger.dpr b/lib/ics/Delphi/Internet/finger.dpr new file mode 100644 index 00000000..6b93e8b1 --- /dev/null +++ b/lib/ics/Delphi/Internet/finger.dpr @@ -0,0 +1,12 @@ +program Finger; + +uses + Forms, + Finger1 in 'Finger1.pas' {FingerDemoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TFingerDemoForm, FingerDemoForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/finger1.dfm b/lib/ics/Delphi/Internet/finger1.dfm new file mode 100644 index 00000000..f01e27d6 Binary files /dev/null and b/lib/ics/Delphi/Internet/finger1.dfm differ diff --git a/lib/ics/Delphi/Internet/finger1.pas b/lib/ics/Delphi/Internet/finger1.pas new file mode 100644 index 00000000..2e9df46c --- /dev/null +++ b/lib/ics/Delphi/Internet/finger1.pas @@ -0,0 +1,216 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Finger is a FINGER client + Install the components in FingCli.pas and WSocket.pas first. +Creation: December 18, 1997 +Version: 1.02 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Apr 11, 1999 V1.01 Added command line option +Aug 18, 2001 V1.02 Changed website url + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Finger1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, FingCli, WinSock, WSocket; + +const + FingerVersion = 102; + CopyRight : String = ' Finger (c) 1997-2001 F. Piette V1.02 '; + WM_APPSTARTUP = WM_USER + 1; + +type + TFingerDemoForm = class(TForm) + FingerCli1: TFingerCli; + DisplayMemo: TMemo; + Panel1: TPanel; + QueryEdit: TEdit; + QueryButton: TButton; + CancelButton: TButton; + procedure QueryButtonClick(Sender: TObject); + procedure FingerCli1DataAvailable(Sender: TObject; Error: Word); + procedure FingerCli1QueryDone(Sender: TObject; Error: Word); + procedure FingerCli1SessionConnected(Sender: TObject; Error: Word); + procedure CancelButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + private + procedure WMAppStartup(var msg: TMessage); message WM_APPSTARTUP; + end; + +var + FingerDemoForm: TFingerDemoForm; + +const +{$IFDEF VER80} + BufferSize = 255; { Delphi 1 is limited to 255 bytes } +{$ELSE} + BufferSize = 2048; +{$ENDIF} + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.FormShow(Sender: TObject); +begin + { We use a custom message to initialize things once the form } + { is visible } + PostMessage(Handle, WM_APPSTARTUP, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.WMAppStartup(var msg: TMessage); +begin + Update; { Let the window be visible completely } + if ParamCount > 0 then begin + QueryEdit.Text := ParamStr(1); + QueryButtonClick(Self); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Display a message in the memo field, breaking with CR *} +procedure MemoAddLines(Memo : TMemo; Msg : String); +const + CR = #13; + LF = #10; +var + Start, Stop : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add(''); + + Start := 1; + Stop := Pos(CR, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := + Memo.Lines.Strings[Memo.Lines.Count - 1] + + Copy(Msg, Start, Stop - Start); + if Msg[Stop] = CR then begin + Memo.Lines.Add(''); + SendMessage(Memo.Handle, WM_KEYDOWN, VK_UP, 1); + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + while Msg[Start] in [CR, LF] do + Start := Start + 1; + Stop := Start; + while (Msg[Stop] <> CR) and (Stop <= Length(Msg)) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.QueryButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + QueryButton.Enabled := FALSE; + CancelButton.Enabled := TRUE; + FingerCli1.Query := QueryEdit.Text; + FingerCli1.StartQuery; + MemoAddLines(DisplayMemo, 'Query started.' + #13); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.FingerCli1SessionConnected(Sender: TObject; Error: Word); +begin + if Error = 0 then + MemoAddLines(DisplayMemo, 'Connected to host.' + #13); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.FingerCli1DataAvailable(Sender: TObject; Error: Word); +var + Buffer : array [0..BufferSize - 1] of char; + Len : Integer; +begin + while TRUE do begin + Len := FingerCli1.Receive(@Buffer, SizeOf(Buffer) - 1); + if Len <= 0 then + break; + Buffer[Len] := #0; + MemoAddLines(DisplayMemo, StrPas(Buffer)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.FingerCli1QueryDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + if Error = WSAECONNREFUSED then + MemoAddLines(DisplayMemo, 'No finger service available.' + #13) + else if Error = WSAETIMEDOUT then + MemoAddLines(DisplayMemo, 'Host unreachable.' + #13) + else + MemoAddLines(DisplayMemo, 'Error #' + IntToStr(Error) + #13); + end; + MemoAddLines(DisplayMemo, 'Done.' + #13); + + QueryButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; + { If we started from command line, then close application } + if ParamCount > 0 then + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.CancelButtonClick(Sender: TObject); +begin + FingerCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/ftpServ.dpr b/lib/ics/Delphi/Internet/ftpServ.dpr new file mode 100644 index 00000000..3825f854 --- /dev/null +++ b/lib/ics/Delphi/Internet/ftpServ.dpr @@ -0,0 +1,12 @@ +program FtpServ; + +uses + Forms, + FtpServ1 in 'FtpServ1.pas' {FtpServerForm}; + +{$R *.RES} + +begin + Application.CreateForm(TFtpServerForm, FtpServerForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/ftpcli.ico b/lib/ics/Delphi/Internet/ftpcli.ico new file mode 100644 index 00000000..f0257c80 Binary files /dev/null and b/lib/ics/Delphi/Internet/ftpcli.ico differ diff --git a/lib/ics/Delphi/Internet/ftpthrd.dpr b/lib/ics/Delphi/Internet/ftpthrd.dpr new file mode 100644 index 00000000..f896099d --- /dev/null +++ b/lib/ics/Delphi/Internet/ftpthrd.dpr @@ -0,0 +1,13 @@ +program ftpthrd; + +uses + Forms, + FtpThrd1 in 'FtpThrd1.pas' {ThrdFtpForm}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TThrdFtpForm, ThrdFtpForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/ftptst.dpr b/lib/ics/Delphi/Internet/ftptst.dpr new file mode 100644 index 00000000..d61df502 --- /dev/null +++ b/lib/ics/Delphi/Internet/ftptst.dpr @@ -0,0 +1,14 @@ +program Ftptst; + +uses + Forms, + FtpTst1 in 'FtpTst1.pas' {FtpReceiveForm}, + Ftptst2 in 'Ftptst2.pas' {DirectoryForm}; + +{$R *.RES} + +begin + Application.CreateForm(TFtpReceiveForm, FtpReceiveForm); + Application.CreateForm(TDirectoryForm, DirectoryForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/ftptst1.dfm b/lib/ics/Delphi/Internet/ftptst1.dfm new file mode 100644 index 00000000..29219a64 Binary files /dev/null and b/lib/ics/Delphi/Internet/ftptst1.dfm differ diff --git a/lib/ics/Delphi/Internet/ftptst1.pas b/lib/ics/Delphi/Internet/ftptst1.pas new file mode 100644 index 00000000..1bcc4f65 --- /dev/null +++ b/lib/ics/Delphi/Internet/ftptst1.pas @@ -0,0 +1,1203 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: Aug 1997 +Version: 2.25 +Object: Demo for TFtpClient object (RFC 959 implementation) + It is a graphical FTP client program + Compatible with Delphi 1, 2, 3, 4 and 5 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Sep 13, 97 Added directory functions. Added button to show how to makes + several transferts in one session +Sep 27, 97 Change identifiers names to be more standard with other sources +Jan 10, 98 Saved edit boxes content to an IniFile, added FileSize, Quote + and RestartGet commands +Jan 25, 1998 Completely rewritten for new component version (Asynchronous) +Feb 02, 1998 V2.17 Added a checkbox to run the synchronous or asynchronous + version of the component methods. +Feb 15, 1998 V2.18 Removed useless wait unit from the use clause. + Added display of winsock information at startup. +Feb 22, 1998 V2.19 Added Append and AppendFile commands +Aug 21, 1998 V2.20 Added a comment in OnProgress event handler to warn user + about CPU usage. +Dec 22, 1998 V2.21 Replaced DisplayFlag by DysplayFileFlag. +Oct 19, 1999 V2.22 Correctly display Winsock version +Nov 24, 1999 V2.23 Added Restart Put and NoAutoResumeAt. +Jan 28, 2000 V2.24 Added code to OnProgress event handler to update screen + only once per second. This solve problem on fast LAN. +Jul 21, 2000 V2.25 Added two button to show TSream usage instead of files. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpTst1; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, FtpCli, StdCtrls, IniFiles, ExtCtrls, WinSock, WSocket; + +const + FTPTstVersion = 225; + +type + TSyncCmd = function : Boolean of object; + TAsyncCmd = procedure of object; + + TFtpReceiveForm = class(TForm) + DisplayMemo: TMemo; + FtpClient1: TFtpClient; + Panel1: TPanel; + ExitButton: TButton; + OpenAsyncButton: TButton; + QuitAsyncButton: TButton; + CwdAsyncButton: TButton; + UserAsyncButton: TButton; + PassAsyncButton: TButton; + ConnectAsyncButton: TButton; + GetAsyncButton: TButton; + ReceiveAsyncButton: TButton; + AbortAsyncButton: TButton; + DirAsyncButton: TButton; + DirectoryAsyncButton: TButton; + LsAsyncButton: TButton; + ListAsyncButton: TButton; + SystAsyncButton: TButton; + SystemAsyncButton: TButton; + FileSizeAsyncButton: TButton; + SizeAsyncButton: TButton; + MkdAsyncButton: TButton; + MkdirAsyncButton: TButton; + RmdAsyncButton: TButton; + RmdirAsyncButton: TButton; + RenAsyncButton: TButton; + RenameAsyncButton: TButton; + DeleAsyncButton: TButton; + DeleteAsyncButton: TButton; + PwdAsyncButton: TButton; + QuoteAsyncButton: TButton; + DoQuoteAsyncButton: TButton; + PutAsyncButton: TButton; + TransmitAsyncButton: TButton; + TypeSetAsyncButton: TButton; + RestGetAsyncButton: TButton; + RestartGetAsyncButton: TButton; + CDupAsyncButton: TButton; + Panel2: TPanel; + Label1: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label2: TLabel; + Label6: TLabel; + HostNameEdit: TEdit; + HostFileEdit: TEdit; + UserNameEdit: TEdit; + PassWordEdit: TEdit; + cbDisplay: TCheckBox; + LocalFileEdit: TEdit; + cbBinary: TCheckBox; + HostDirEdit: TEdit; + PortEdit: TEdit; + InfoLabel: TLabel; + StateLabel: TLabel; + ClearButton: TButton; + SyncCheckBox: TCheckBox; + AppendFileAsyncButton: TButton; + AppendAsyncButton: TButton; + PassiveCheckBox: TCheckBox; + Button1: TButton; + RestPutAsyncButton: TButton; + RestartPutAsyncButton: TButton; + ResumeAtEdit: TEdit; + Label7: TLabel; + NoAutoResumeAtCheckBox: TCheckBox; + TransmitUsingStreamButton: TButton; + ReceiveUsingStreamButton: TButton; + StressPutButton: TButton; + AbortXferAsyncButton: TButton; + procedure ExitButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure DisplayHandler(Sender: TObject; var Msg : String); + procedure FtpClient1Progress(Sender: TObject; Count: Longint; + var Abort: Boolean); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure OpenAsyncButtonClick(Sender: TObject); + procedure FtpClient1RequestDone(Sender: TObject; RqType: TFtpRequest; + Error: Word); + procedure FtpClient1SessionConnected(Sender: TObject; Error: Word); + procedure FtpClient1SessionClosed(Sender: TObject; Error: Word); + procedure QuitAsyncButtonClick(Sender: TObject); + procedure CwdAsyncButtonClick(Sender: TObject); + procedure UserAsyncButtonClick(Sender: TObject); + procedure PassAsyncButtonClick(Sender: TObject); + procedure ConnectAsyncButtonClick(Sender: TObject); + procedure FtpClient1StateChange(Sender: TObject); + procedure GetAsyncButtonClick(Sender: TObject); + procedure ReceiveAsyncButtonClick(Sender: TObject); + procedure AbortAsyncButtonClick(Sender: TObject); + procedure DirAsyncButtonClick(Sender: TObject); + procedure DirectoryAsyncButtonClick(Sender: TObject); + procedure LsAsyncButtonClick(Sender: TObject); + procedure ListAsyncButtonClick(Sender: TObject); + procedure SystAsyncButtonClick(Sender: TObject); + procedure SystemAsyncButtonClick(Sender: TObject); + procedure FileSizeAsyncButtonClick(Sender: TObject); + procedure SizeAsyncButtonClick(Sender: TObject); + procedure MkdAsyncButtonClick(Sender: TObject); + procedure MkdirAsyncButtonClick(Sender: TObject); + procedure RmdAsyncButtonClick(Sender: TObject); + procedure RmdirAsyncButtonClick(Sender: TObject); + procedure RenAsyncButtonClick(Sender: TObject); + procedure RenameAsyncButtonClick(Sender: TObject); + procedure DeleAsyncButtonClick(Sender: TObject); + procedure DeleteAsyncButtonClick(Sender: TObject); + procedure PwdAsyncButtonClick(Sender: TObject); + procedure QuoteAsyncButtonClick(Sender: TObject); + procedure DoQuoteAsyncButtonClick(Sender: TObject); + procedure PutAsyncButtonClick(Sender: TObject); + procedure TransmitAsyncButtonClick(Sender: TObject); + procedure TypeSetAsyncButtonClick(Sender: TObject); + procedure RestGetAsyncButtonClick(Sender: TObject); + procedure RestartGetAsyncButtonClick(Sender: TObject); + procedure CDupAsyncButtonClick(Sender: TObject); + procedure ClearButtonClick(Sender: TObject); + procedure AppendAsyncButtonClick(Sender: TObject); + procedure AppendFileAsyncButtonClick(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure RestPutAsyncButtonClick(Sender: TObject); + procedure RestartPutAsyncButtonClick(Sender: TObject); + procedure TransmitUsingStreamButtonClick(Sender: TObject); + procedure ReceiveUsingStreamButtonClick(Sender: TObject); + procedure StressPutButtonClick(Sender: TObject); + procedure AbortXferAsyncButtonClick(Sender: TObject); + private + FIniFileName : String; + FInitialized : Boolean; + FLastProgress : DWORD; + FProgressCount : LongInt; + FRunning : Boolean; + procedure DisplayFile(FileName : String); + procedure ExecuteCmd(SyncCmd : TSyncCmd; ASyncCmd : TAsyncCmd); + function SendFile : Boolean; + procedure Display(Msg: String); + end; + +const + TEMP_FILE_NAME = 'FTPDIR.TXT'; + +var + FtpReceiveForm: TFtpReceiveForm; + +implementation + +uses + FtpTst2; + +{$R *.DFM} +const + SectionData = 'Data'; + KeyHostName = 'HostName'; + KeyUserName = 'UserName'; + KeyPassWord = 'PassWord'; + KeyHostDir = 'HostDir'; + KeyPort = 'Port'; + KeyHostFile = 'HostFile'; + KeyLocalFile = 'LocalFile'; + KeyResumeAt = 'ResumeAt'; + SectionWindow = 'Window'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF VER80 } +{ To debug event driven programs, it is often handy to just use writeln to } +{ write debug messages to the console. To get a console, just ask the } +{ linker to build a console mode application. Then you'll get the default } +{ console. The function below will make it the size you like... } +procedure BigConsole(nCols, nLines : Integer); +var + sc : TCoord; + N : DWord; +begin + if not IsConsole then + Exit; + sc.x := nCols; + sc.y := nLines; + SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), sc); + SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), + BACKGROUND_BLUE or BACKGROUND_GREEN or + BACKGROUND_RED or BACKGROUND_INTENSITY); + sc.x := 0; + sc.y := 0; + FillConsoleOutputAttribute(GetStdHandle(STD_OUTPUT_HANDLE), + BACKGROUND_BLUE or BACKGROUND_GREEN or + BACKGROUND_RED or BACKGROUND_INTENSITY, + nCols * nLines, sc, N); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FormCreate(Sender: TObject); +begin +{$IFNDEF VER80} + BigConsole(80, 100); +{$ENDIF} + DisplayMemo.Clear; + InfoLabel.Caption := ''; + StateLabel.Caption := ''; + FIniFileName := LowerCase(ExtractFileName(Application.ExeName)); + FIniFileName := Copy(FIniFileName, 1, Length(FIniFileName) - 3) + 'ini'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + Data : TWSAData; +begin + if not FInitialized then begin + FInitialized := TRUE; + IniFile := TIniFile.Create(FIniFileName); + HostNameEdit.Text := IniFile.ReadString(SectionData, KeyHostName, + 'ftp.simtel.net'); + PortEdit.Text := IniFile.ReadString(SectionData, KeyPort, + 'ftp'); + UserNameEdit.Text := IniFile.ReadString(SectionData, KeyUserName, + 'anonymous'); + PassWordEdit.Text := IniFile.ReadString(SectionData, KeyPassWord, + 'your.name@your.company.com'); + HostDirEdit.Text := IniFile.ReadString(SectionData, KeyHostDir, + '/pub/simtelnet'); + HostFileEdit.Text := IniFile.ReadString(SectionData, KeyHostFile, + 'index.html'); + LocalFileEdit.Text := IniFile.ReadString(SectionData, KeyLocalFile, + 'c:\temp\index.htm'); + ResumeAtEdit.Text := IniFile.ReadString(SectionData, KeyResumeAt, + '0'); + + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, (Screen.Width - Width) div 2); + + IniFile.Free; + + { Display winsock info } + Data := WinsockInfo; + Display('Winsock version ' + + IntToStr(LOBYTE(Data.wHighVersion)) + '.' + + IntToStr(HIBYTE(Data.wHighVersion))); + Display(StrPas(Data.szDescription)); + Display(StrPas(Data.szSystemStatus)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString(SectionData, KeyHostName, HostNameEdit.Text); + IniFile.WriteString(SectionData, KeyPort, PortEdit.Text); + IniFile.WriteString(SectionData, KeyUserName, UserNameEdit.Text); + IniFile.WriteString(SectionData, KeyPassWord, PassWordEdit.Text); + IniFile.WriteString(SectionData, KeyHostDir, HostDirEdit.Text); + IniFile.WriteString(SectionData, KeyHostFile, HostFileEdit.Text); + IniFile.WriteString(SectionData, KeyLocalFile, LocalFileEdit.Text); + IniFile.WriteString(SectionData, KeyResumeAt, ResumeAtEdit.Text); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function DeleteFile(const FileName: string): Boolean; +var + F : File of char; +begin + Result := TRUE; + try + AssignFile(F, FileName); + Erase(F); + except + Result := FALSE; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.Display(Msg : String); +var + I : Integer; +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + for I := 1 to 50 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + {$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DisplayHandler(Sender : TObject; var Msg : String); +begin + Display(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ExitButtonClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FtpClient1Progress(Sender: TObject; + Count: Longint; var Abort: Boolean); +begin + FProgressCount := Count; + { Be sure to update screen only once every second } + if FLastProgress < GetTickCount then begin + FLastProgress := GetTickCount + 1000; + InfoLabel.Caption := IntToStr(FProgressCount); + InfoLabel.Repaint; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DisplayFile(FileName : String); +begin + try + DirectoryForm.DirListBox.Items.LoadFromFile(FileName); + except + DirectoryForm.DirListBox.Clear; + end; + DirectoryForm.ShowModal; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FtpClient1RequestDone(Sender: TObject; + RqType: TFtpRequest; Error: Word); +begin + Display('Request ' + IntToStr(Ord(RqType)) + ' Done.'); + Display('StatusCode = ' + IntToStr(FtpClient1.StatusCode)); + Display('LastResponse was : ''' + FtpClient1.LastResponse + ''''); + if Error = 0 then + Display('No error') + else + Display('Error = ' + IntToStr(Error) + + ' (' + FtpClient1.ErrorMessage + ')'); + + { Display last progress value } + InfoLabel.Caption := IntToStr(FProgressCount); + + if Error = 0 then begin + case RqType of + ftpDirAsync, ftpDirectoryAsync, + ftpLsAsync, ftpListAsync : DisplayFile(TEMP_FILE_NAME); + ftpSizeAsync : Display( + 'File size is ' + + IntToStr(FtpClient1.SizeResult) + + ' bytes' ); + ftpPwdAsync, ftpMkdAsync, + ftpCDupAsync, ftpCwdAsync : Display( + 'Directory is "' + + FtpClient1.DirResult + '"'); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FtpClient1SessionConnected(Sender: TObject; + Error: Word); +begin + Display('Session Connected, error = ' + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FtpClient1SessionClosed(Sender: TObject; + Error: Word); +begin + Display('Session Closed, error = ' + IntToStr(Error)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FtpClient1StateChange(Sender: TObject); +begin + StateLabel.Caption := IntToStr(Ord(FtpClient1.State)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ExecuteCmd(SyncCmd : TSyncCmd; ASyncCmd : TAsyncCmd); +begin + Display('Executing Requested Command'); + { Initialize progress stuff } + FLastProgress := 0; + FProgressCount := 0; + + if SyncCheckBox.Checked then begin + if SyncCmd then + Display('Command Success') + else + Display('Command Failure'); + end + else + ASyncCmd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.OpenAsyncButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + Display('Connect Async'); + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Open, FtpClient1.OpenAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.QuitAsyncButtonClick(Sender: TObject); +begin + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Quit, FtpClient1.QuitAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.CwdAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Cwd, FtpClient1.CwdAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.UserAsyncButtonClick(Sender: TObject); +begin + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.User, FtpClient1.UserAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.PassAsyncButtonClick(Sender: TObject); +begin + FtpClient1.Password := PasswordEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Pass, FtpClient1.PassAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ConnectAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.Password := PasswordEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Connect, FtpClient1.ConnectAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.GetAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Passive := PassiveCheckBox.Checked; + ExecuteCmd(FtpClient1.Get, FtpClient1.GetAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ReceiveAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Receive, FtpClient1.ReceiveAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.AbortAsyncButtonClick(Sender: TObject); +begin + ExecuteCmd(FtpClient1.Abort, FtpClient1.AbortAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DirAsyncButtonClick(Sender: TObject); +begin + DeleteFile(TEMP_FILE_NAME); + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := TEMP_FILE_NAME; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Dir, FtpClient1.DirAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DirectoryAsyncButtonClick(Sender: TObject); +begin + DeleteFile(TEMP_FILE_NAME); + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := TEMP_FILE_NAME; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Directory, FtpClient1.DirectoryAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.LsAsyncButtonClick(Sender: TObject); +begin + DeleteFile(TEMP_FILE_NAME); + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := TEMP_FILE_NAME; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Ls, FtpClient1.LsAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ListAsyncButtonClick(Sender: TObject); +begin + DeleteFile(TEMP_FILE_NAME); + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := TEMP_FILE_NAME; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.List, FtpClient1.ListAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.SystAsyncButtonClick(Sender: TObject); +begin + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Syst, FtpClient1.SystAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.SystemAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.System, FtpClient1.SystemAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FileSizeAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.FileSize, FtpClient1.FileSizeAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.SizeAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Size, FtpClient1.SizeAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.MkdAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Mkd, FtpClient1.MkdAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.MkdirAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.MkDir, FtpClient1.MkdirAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RmdAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Rmd, FtpClient1.RmdAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RmdirAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.RmDir, FtpClient1.RmDirAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RenAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Ren, FtpClient1.RenAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RenameAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Rename, FtpClient1.RenameAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DeleAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Dele, FtpClient1.DeleAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DeleteAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Delete, FtpClient1.DeleteAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.PwdAsyncButtonClick(Sender: TObject); +begin + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Pwd, FtpClient1.PwdAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.QuoteAsyncButtonClick(Sender: TObject); +begin + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Quote, FtpClient1.QuoteAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DoQuoteAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.DoQuote, FtpClient1.DoQuoteAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.PutAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Put, FtpClient1.PutAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.TransmitAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Transmit, FtpClient1.TransmitAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.TypeSetAsyncButtonClick(Sender: TObject); +begin + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.TypeSet, FtpClient1.TypeSetAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RestGetAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Options := []; + if NoAutoResumeAtCheckBox.Checked then + FtpClient1.Options := FtpClient1.Options + [ftpNoAutoResumeAt]; + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + ExecuteCmd(FtpClient1.RestGet, FtpClient1.RestGetAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RestartGetAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Options := []; + if NoAutoResumeAtCheckBox.Checked then + FtpClient1.Options := FtpClient1.Options + [ftpNoAutoResumeAt]; + FtpClient1.OnDisplay := DisplayHandler; + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + ExecuteCmd(FtpClient1.RestartGet, FtpClient1.RestartGetAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.CDupAsyncButtonClick(Sender: TObject); +begin + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.CDup, FtpClient1.CDupAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ClearButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.AppendAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Append, FtpClient1.AppendAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.AppendFileAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.AppendFile, FtpClient1.AppendFileAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +procedure TFtpReceiveForm.Button1Click(Sender: TObject); +var + Count : Integer; +begin + SyncCheckBox.Checked := TRUE; + if not FtpClient1.Connected then begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.Password := PasswordEdit.Text; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Connect, FtpClient1.ConnectAsync); + if Copy(FtpClient1.LastResponse, 1, 3) <> '230' then + Exit; + end; + Count := 0; + repeat + DisplayMemo.Clear; + Inc(Count); + Display('Count=' + IntToStr(Count)); + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.Put, FtpClient1.PutAsync); + until Copy(FtpClient1.LastResponse, 1, 3) <> '226'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RestPutAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + ExecuteCmd(FtpClient1.RestPut, FtpClient1.RestPutAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RestartPutAsyncButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.OnDisplay := DisplayHandler; + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + ExecuteCmd(FtpClient1.RestartPut, FtpClient1.RestartPutAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.TransmitUsingStreamButtonClick(Sender: TObject); +var + MyStream : TStream; +begin + MyStream := TFileStream.Create(LocalFileEdit.Text, fmOpenRead); + try + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalStream := MyStream; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + if ResumeAtEdit.Text > '' then + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + FtpClient1.Transmit; + finally + FtpClient1.LocalStream := nil; + MyStream.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ReceiveUsingStreamButtonClick(Sender: TObject); +var + MyStream : TStream; +begin + MyStream := TFileStream.Create(LocalFileEdit.Text, fmCreate); + try + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalStream := MyStream; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + if ResumeAtEdit.Text > '' then + FtpClient1.ResumeAt := StrToInt(ResumeAtEdit.Text); + FtpClient1.Receive; + finally + FtpClient1.LocalStream := nil; + MyStream.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetFileSize(const FileName: string): LongInt; +var + SearchRec: TSearchRec; +begin + if FindFirst(ExpandFileName(FileName), faAnyFile, SearchRec) = 0 then begin + Result := SearchRec.Size; + SysUtils.FindClose(SearchRec); + end + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpReceiveForm.SendFile : Boolean; +var + LocalSize : LongInt; +begin + try + FtpClient1.Abort; { Whatever occured, abort ! } + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.Port := PortEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.Password := PassWordEdit.Text; + FtpClient1.Passive := PassiveCheckBox.Checked; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.Timeout := 30; + FtpClient1.ShareMode := ftpShareDenyNone; + if not FtpClient1.Connect then + raise Exception.Create('FtpClient1.Connect failed: ' + FtpClient1.ErrorMessage); + if FtpClient1.HostDirName <> '' then begin + if not FtpClient1.Cwd then + raise Exception.Create('FtpClient1.Cwd failed: ' + FtpClient1.ErrorMessage); + end; + if not FtpClient1.TypeSet then + raise Exception.Create('FtpClient1.TypeSet failed: ' + FtpClient1.ErrorMessage); + if not FtpClient1.Put then + raise Exception.Create('FtpClient1.Put failed: ' + FtpClient1.ErrorMessage); + if FtpClient1.StatusCode <> 226 then + raise Exception.Create('FtpClient1.Put failed: ' + FtpClient1.LastResponse); + if not FtpClient1.Size then + raise Exception.Create('FtpClient1.Size failed: ' + FtpClient1.ErrorMessage); + LocalSize := GetFileSize(FtpClient1.LocalFileName); + Result := (FtpClient1.SizeResult = LocalSize); + if not Result then + Display('Incorrect file size on server (S=' + + IntToStr(FtpClient1.SizeResult) + ' L=' + + IntToStr(LocalSize) + ')'); + if not FtpClient1.Quit then + raise Exception.Create('FtpClient1.Quit failed: ' + FtpClient1.ErrorMessage); + except + on E:Exception do begin + Display('Exception ' + E.ClassName + ': ' + E.Message); + Result := FALSE; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.StressPutButtonClick(Sender: TObject); +var + Count : Integer; +begin + if FRunning then begin + FRunning := FALSE; + Display('Stress Put interrupted.'); + StressPutButton.Caption := 'Stress Put'; + Exit; + end; + FRunning := TRUE; + try + Display('Stress Put started.'); + StressPutButton.Caption := 'STOP'; + Count := 0; + while FRunning and (not Application.Terminated) do begin + Inc(Count); + Display('STRESS COUNT = ' + IntToStr(Count)); + if not SendFile then + break; + Application.ProcessMessages; + end; + finally + FRunning := FALSE; + Display('Stress Put finished.'); + StressPutButton.Caption := 'Stress Put'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.AbortXferAsyncButtonClick(Sender: TObject); +begin + FtpClient1.DisplayFileFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := DisplayHandler; + ExecuteCmd(FtpClient1.AbortXfer, FtpClient1.AbortXferAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/httpChk.dpr b/lib/ics/Delphi/Internet/httpChk.dpr new file mode 100644 index 00000000..4fb14696 --- /dev/null +++ b/lib/ics/Delphi/Internet/httpChk.dpr @@ -0,0 +1,12 @@ +program httpChk; + +uses + Forms, + HttpChk1 in 'HttpChk1.pas' {CheckUrlForm}; + +{$R *.RES} + +begin + Application.CreateForm(TCheckUrlForm, CheckUrlForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/httpasp.dpr b/lib/ics/Delphi/Internet/httpasp.dpr new file mode 100644 index 00000000..887cb644 --- /dev/null +++ b/lib/ics/Delphi/Internet/httpasp.dpr @@ -0,0 +1,12 @@ +program HttpAsp; + +uses + Forms, + HttpAsp1 in 'HttpAsp1.pas' {HttpTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpTestForm, HttpTestForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/httpasy.dpr b/lib/ics/Delphi/Internet/httpasy.dpr new file mode 100644 index 00000000..f3c55b6b --- /dev/null +++ b/lib/ics/Delphi/Internet/httpasy.dpr @@ -0,0 +1,12 @@ +program HttpAsy; + +uses + Forms, + HttpAsy1 in 'HttpAsy1.pas' {HttpAsyForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpAsyForm, HttpAsyForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/httpget.dpr b/lib/ics/Delphi/Internet/httpget.dpr new file mode 100644 index 00000000..2b9f79b9 --- /dev/null +++ b/lib/ics/Delphi/Internet/httpget.dpr @@ -0,0 +1,12 @@ +program HttpGet; + +uses + Forms, + HttpGet1 in 'HttpGet1.pas' {HttpGetForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpGetForm, HttpGetForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/httppg.dpr b/lib/ics/Delphi/Internet/httppg.dpr new file mode 100644 index 00000000..53ee81b1 --- /dev/null +++ b/lib/ics/Delphi/Internet/httppg.dpr @@ -0,0 +1,12 @@ +program HttpPg; + +uses + Forms, + HttpPg1 in 'HttpPg1.pas' {HttpTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpTestForm, HttpTestForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/httpthrd.dpr b/lib/ics/Delphi/Internet/httpthrd.dpr new file mode 100644 index 00000000..fbcef1b6 --- /dev/null +++ b/lib/ics/Delphi/Internet/httpthrd.dpr @@ -0,0 +1,14 @@ +program HttpThrd; + +uses + Forms, + HttpThr1 in 'HttpThr1.pas' {HttpThreadForm}, + HttpThr2 in 'HttpThr2.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(THttpThreadForm, HttpThreadForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/httptst.dpr b/lib/ics/Delphi/Internet/httptst.dpr new file mode 100644 index 00000000..b30d5856 --- /dev/null +++ b/lib/ics/Delphi/Internet/httptst.dpr @@ -0,0 +1,12 @@ +program HttpTst; + +uses + Forms, + httptst1 in 'httptst1.pas' {HttpTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpTestForm, HttpTestForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/httptst1.dfm b/lib/ics/Delphi/Internet/httptst1.dfm new file mode 100644 index 00000000..cb4da753 Binary files /dev/null and b/lib/ics/Delphi/Internet/httptst1.dfm differ diff --git a/lib/ics/Delphi/Internet/httptst1.pas b/lib/ics/Delphi/Internet/httptst1.pas new file mode 100644 index 00000000..33a12746 --- /dev/null +++ b/lib/ics/Delphi/Internet/httptst1.pas @@ -0,0 +1,541 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: November 23, 1997 +Version: 1.05 +Description: Sample program to demonstrate some of the THttpCli features. +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jan 16, 1998 V1.00 Adapted for reviced HTTP component. +Apr 13, 1998 V1.01 Call HttpCli1DocEnd when to request failed, to close the + document file in the case it is already opened. +Jul 09, 1998 V1.02 Adapted for Delphi 4 +Sep 15, 1998 V1.03 Added some code to check for file creation errors (those + errors mostly comes from document names not suitable as file + names). + Added code to save form size and position and to resize it + correctly. +Sep 25, 1999 V1.04 Added display proxy setting +Aug 18, 2001 V1.05 Checked for document name before trying to display. + Wrapped document file access to a try/finally. + Checked ContentType to change document name extension according + to some content type. + Added display of copyright notice and version informations. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpTst1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, HttpProt, WinSock, WSocket, StdCtrls, ExtCtrls, IniFiles; + +const + HttpTstVersion = 105; + CopyRight : String = 'HttpTst (c) 1999-2002 F. Piette V1.05 '; + +type + THttpTestForm = class(TForm) + Panel1: TPanel; + GetButton: TButton; + HttpCli1: THttpCli; + URLEdit: TEdit; + DisplayMemo: TMemo; + Label1: TLabel; + Label2: TLabel; + ProxyHostEdit: TEdit; + ProxyPortEdit: TEdit; + PostButton: TButton; + Check64Button: TButton; + DataEdit: TEdit; + Label3: TLabel; + DateTimeEdit: TEdit; + DocumentMemo: TMemo; + Label4: TLabel; + HeadButton: TButton; + AbortButton: TButton; + Label5: TLabel; + Label6: TLabel; + ParseButton: TButton; + procedure GetButtonClick(Sender: TObject); + procedure HttpCli1Command(Sender: TObject; var s: String); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormShow(Sender: TObject); + procedure HttpCli1DocBegin(Sender: TObject); + procedure HttpCli1DocEnd(Sender: TObject); + procedure PostButtonClick(Sender: TObject); + procedure Check64ButtonClick(Sender: TObject); + procedure HeadButtonClick(Sender: TObject); + procedure HttpCli1RequestDone(Sender: TObject; RqType: THttpRequest; + Error: Word); + procedure AbortButtonClick(Sender: TObject); + procedure Panel1Resize(Sender: TObject); + procedure ParseButtonClick(Sender: TObject); + procedure HttpCli1HeaderData(Sender: TObject); + procedure HttpCli1Cookie(Sender: TObject; const Data: String; + var Accept: Boolean); + procedure HttpCli1LocationChange(Sender: TObject); + private + { Dclarations prives } + Initialized : Boolean; + DocFileName : String; + procedure SetButtonState(State : Boolean); + procedure Display(const Msg : String); + public + { Dclarations publiques } + end; + +var + HttpTestForm: THttpTestForm; + +implementation + +{$R *.DFM} + +const + IniFileName = 'httptest'; + SectionWindow = 'WindowMain'; + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + SectionData = 'Data'; + KeyUrl = 'URL'; + KeyProxyHost = 'ProxyHost'; + KeyProxyPort = 'ProxyPort'; + KeyData = 'Data'; + KeyDateTime = 'DateTime'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + wsi : TWSADATA; +begin + if not Initialized then begin + Initialized := TRUE; + IniFile := TIniFile.Create(IniFileName); + Width := IniFile.ReadInteger(SectionWindow, KeyWidth, Width); + Height := IniFile.ReadInteger(SectionWindow, KeyHeight, Height); + Top := IniFile.ReadInteger(SectionWindow, KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionWindow, KeyLeft, + (Screen.Width - Width) div 2); + URLEdit.Text := IniFile.ReadString(SectionData, KeyURL, ''); + ProxyHostEdit.Text := IniFile.ReadString(SectionData, KeyProxyHost, ''); + ProxyPortEdit.Text := IniFile.ReadString(SectionData, KeyProxyPort, '80'); + DataEdit.Text := IniFile.ReadString(SectionData, KeyData, ''); + DateTimeEdit.Text := IniFile.ReadString(SectionData, KeyDateTime, ''); + IniFile.Free; + { Display version info for program and used components } + wsi := WinsockInfo; + DisplayMemo.Clear; + Display(CopyRight); + Display('Using:'); + Display(' ' + WSocket.CopyRight); + Display(' ' + HttpProt.CopyRight); + Display(' Winsock:'); + Display(' Version ' + + Format('%d.%d', [WinsockInfo.wHighVersion shr 8, + WinsockInfo.wHighVersion and 15])); + Display(' ' + StrPas(@wsi.szDescription)); + Display(' ' + StrPas(@wsi.szSystemStatus)); +{$IFNDEF VER100} + { A bug in Delphi 3 makes lpVendorInfo invalid } + if wsi.lpVendorInfo <> nil then + Display(' ' + StrPas(wsi.lpVendorInfo)); +{$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteInteger(SectionWindow, KeyTop, Top); + IniFile.WriteInteger(SectionWindow, KeyLeft, Left); + IniFile.WriteInteger(SectionWindow, KeyWidth, Width); + IniFile.WriteInteger(SectionWindow, KeyHeight, Height); + IniFile.WriteString(SectionData, KeyURL, URLEdit.Text); + IniFile.WriteString(SectionData, KeyProxyHost, ProxyHostEdit.Text); + IniFile.WriteString(SectionData, KeyProxyPort, ProxyPortEdit.Text); + IniFile.WriteString(SectionData, KeyData, DataEdit.Text); + IniFile.WriteString(SectionData, KeyDateTime, DateTimeEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Display a message in display memo box, making sure we don't overflow it. } +procedure THttpTestForm.Display(const Msg : String); +begin + DisplayMemo.Lines.BeginUpdate; + try + if DisplayMemo.Lines.Count > 200 then begin + { We preserve only 200 lines } + while DisplayMemo.Lines.Count > 200 do + DisplayMemo.Lines.Delete(0); + end; + DisplayMemo.Lines.Add(Msg); + finally + DisplayMemo.Lines.EndUpdate; + { Makes last line visible } + {$IFNDEF VER80} + SendMessage(DisplayMemo.Handle, EM_SCROLLCARET, 0, 0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HeadButtonClick(Sender: TObject); +var + I : Integer; +begin + DisplayMemo.Clear; + DocumentMemo.Clear; + SetButtonState(FALSE); + + try + httpcli1.URL := URLEdit.Text; + httpcli1.Proxy := ProxyHostEdit.Text; + httpcli1.ProxyPort := ProxyPortEdit.Text; + httpcli1.RcvdStream := nil; + if DateTimeEdit.Text <> '' then + httpcli1.ModifiedSince := StrToDateTime(DateTimeEdit.Text) + else + httpcli1.ModifiedSince := 0; + + if httpcli1.Proxy <> '' then + Display('Using proxy ''' + httpcli1.Proxy + ':' + + httpcli1.ProxyPort + '''') + else + Display('Not using proxy'); + + try + httpcli1.Head; + except + Display('HEAD Failed !'); + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + Display('ReasonPhrase = ' + httpcli1.ReasonPhrase); + Exit; + end; + + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + + for I := 0 to httpcli1.RcvdHeader.Count - 1 do + Display('hdr>' + httpcli1.RcvdHeader.Strings[I]); + finally + SetButtonState(TRUE); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.GetButtonClick(Sender: TObject); +var + I : Integer; + DataIn : TStream; +begin + DisplayMemo.Clear; + DocumentMemo.Clear; + SetButtonState(FALSE); + + try + httpcli1.URL := URLEdit.Text; + httpcli1.Proxy := ProxyHostEdit.Text; + httpcli1.ProxyPort := ProxyPortEdit.Text; + httpcli1.AcceptLanguage := 'en, fr'; + httpcli1.RcvdStream := nil; + if DateTimeEdit.Text <> '' then + httpcli1.ModifiedSince := StrToDateTime(DateTimeEdit.Text) + else + httpcli1.ModifiedSince := 0; + + if httpcli1.Proxy <> '' then + Display('Using proxy ''' + httpcli1.Proxy + ':' + + httpcli1.ProxyPort + '''') + else + Display('Not using proxy'); + + try + httpcli1.Get; + except + Display('GET Failed !'); + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + Display('ReasonPhrase = ' + httpcli1.ReasonPhrase); + HttpCli1DocEnd(nil); { This will close the file } + Exit; + end; + + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + + for I := 0 to httpcli1.RcvdHeader.Count - 1 do + Display('hdr>' + httpcli1.RcvdHeader.Strings[I]); + + if Length(DocFileName) = 0 then begin + DocumentMemo.Lines.Add('*** NO DOCUMENT FILE NAME ***'); + end + else begin + DataIn := TFileStream.Create(DocFileName, fmOpenRead); + try + if Copy(httpcli1.ContentType, 1, 5) = 'text/' then + DocumentMemo.Lines.LoadFromStream(DataIn) + else begin + DocumentMemo.Lines.Add('Content type is ' + + httpcli1.ContentType); + DocumentMemo.Lines.Add('Document stored in ''' + + DocFileName + + ''' Size=' + IntToStr(DataIn.Size)); + end; + finally + DataIn.Free; + end; + end; + finally + SetButtonState(TRUE); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.PostButtonClick(Sender: TObject); +var + DataOut : TMemoryStream; + DataIn : TFileStream; + Buf : String; + I : Integer; +begin + DisplayMemo.Clear; + DocumentMemo.Clear; + SetButtonState(FALSE); + + try + DataOut := TMemoryStream.Create; + Buf := DataEdit.Text; + if Length(Buf) > 0 then { Check if some data to post } + DataOut.Write(Buf[1], Length(Buf)); + DataOut.Seek(0, soFromBeginning); + + httpcli1.SendStream := DataOut; + httpcli1.Proxy := ProxyHostEdit.Text; + httpcli1.ProxyPort := ProxyPortEdit.Text; + httpcli1.RcvdStream := nil; + httpcli1.URL := URLEdit.Text; + + if httpcli1.Proxy <> '' then + Display('Using proxy ''' + httpcli1.Proxy + ':' + + httpcli1.ProxyPort + '''') + else + Display('Not using proxy'); + + try + httpcli1.Post; + except + DataOut.Free; + Display('POST Failed !'); + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + Display('ReasonPhrase = ' + httpcli1.ReasonPhrase); + Exit; + end; + DataOut.Free; + + Display('StatusCode = ' + IntToStr(httpcli1.StatusCode)); + + for I := 0 to httpcli1.RcvdHeader.Count - 1 do + Display('hdr>' + httpcli1.RcvdHeader.Strings[I]); + + DataIn := TFileStream.Create(httpcli1.DocName, fmOpenRead); + try + DocumentMemo.Lines.LoadFromStream(DataIn); + finally + DataIn.Free; + end; + finally + SetButtonState(TRUE); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ WARNING: With DELPHI1, change "s: String" to "s: OpenString" } +procedure THttpTestForm.HttpCli1Command(Sender: TObject; var s: String); +begin + Display('cmd> ' + s); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1DocBegin(Sender: TObject); +begin + Display(HttpCli1.ContentType + ' => ' + httpcli1.DocName); + Display('Document = ' + httpcli1.DocName); + + DocFileName := httpcli1.DocName; + + if httpcli1.ContentType = 'image/gif' then + ReplaceExt(DocFileName, 'gif') + else if httpcli1.ContentType = 'image/jpeg' then + ReplaceExt(DocFileName, 'jpg') + else if httpcli1.ContentType = 'image/bmp' then + ReplaceExt(DocFileName, 'bmp'); + + if DocFileName = '' then + DocFileName := 'HttpTst.htm'; + try + httpcli1.RcvdStream := TFileStream.Create(DocFileName, fmCreate); + except + on E:Exception do begin + Display('Error opening file: ' + E.Message); + DocFileName := 'HttpTst.htm'; + Display('Using default file name: ' + DocFileName); + httpcli1.RcvdStream := TFileStream.Create(DocFileName, fmCreate); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1DocEnd(Sender: TObject); +begin + if httpcli1.RcvdStream <> nil then begin + httpcli1.RcvdStream.Free; + httpcli1.RcvdStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.Check64ButtonClick(Sender: TObject); +const + Inp : String = 'Aladdin:open sesame'; + Res : String = 'QWxhZGRpbjpvcGVuIHNlc2FtZQ=='; +begin + if EncodeLine(encBase64, @Inp[1], Length(Inp)) <> Res then + Display('Base64 encoding do not work !') + else + Display('Base64 encoding works OK !'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.SetButtonState(State : Boolean); +begin + GetButton.Enabled := State; + PostButton.Enabled := State; + HeadButton.Enabled := State; + AbortButton.Enabled := not State; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1RequestDone(Sender: TObject; + RqType: THttpRequest; Error: Word); +begin + SetButtonState(TRUE); + if Error <> 0 then + Display('RequestDone Error = ' + IntToStr(Error)) + else + Display('RequestDone, no error'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.AbortButtonClick(Sender: TObject); +begin + HttpCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.Panel1Resize(Sender: TObject); +begin + GetButton.Left := Panel1.Width - GetButton.Width - 8; + PostButton.Left := GetButton.Left; + HeadButton.Left := GetButton.Left; + AbortButton.Left := GetButton.Left; + URLEdit.Width := GetButton.Left - URLEdit.Left - 8; + DataEdit.Width := URLEdit.Width; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.ParseButtonClick(Sender: TObject); +var + Proto, User, Pass, Host, Port, Path : String; +begin + ParseURL(URLEdit.Text, Proto, User, Pass, Host, Port, Path); + Display('URL = ''' + URLEdit.Text + ''''); + Display('Proto = ''' + Proto + ''''); + Display('Host = ''' + Host + ''''); + Display('Path = ''' + Path + ''''); + Display('Port = ''' + Port + ''''); + Display('User = ''' + User + ''''); + Display('Pass = ''' + Pass + ''''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1HeaderData(Sender: TObject); +begin +{ Display('Header: "' + HttpCli1.LastResponse + '"'); } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1Cookie(Sender: TObject; const Data: String; + var Accept: Boolean); +begin + Display('Cookie: "' + Data + '"'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1LocationChange(Sender: TObject); +begin + Display('Location changed to "' + HttpCli1.Location + '"'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/md5test.dpr b/lib/ics/Delphi/Internet/md5test.dpr new file mode 100644 index 00000000..33970051 --- /dev/null +++ b/lib/ics/Delphi/Internet/md5test.dpr @@ -0,0 +1,12 @@ +program md5test; + +uses + Forms, + md5test1 in 'md5test1.pas' {MD5TestForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMD5TestForm, MD5TestForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/md5test1.dfm b/lib/ics/Delphi/Internet/md5test1.dfm new file mode 100644 index 00000000..992de182 Binary files /dev/null and b/lib/ics/Delphi/Internet/md5test1.dfm differ diff --git a/lib/ics/Delphi/Internet/md5test1.pas b/lib/ics/Delphi/Internet/md5test1.pas new file mode 100644 index 00000000..4eacb22a --- /dev/null +++ b/lib/ics/Delphi/Internet/md5test1.pas @@ -0,0 +1,81 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE. Based on work given by Louis S. Berman from + BrainTree Ltd, lsb@braintree.com +Description: MD5 is an implmentation for the MD5 Message-Digest Algorithm + as described in RFC-1321 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Creation: October 1997 +Version: 1.01 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 12, 1998 V1.01 Beautified source + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MD5Test1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, MD5, StdCtrls; + +type + TMD5TestForm = class(TForm) + DataEdit: TEdit; + MD5Button: TButton; + MD5ResultLabel: TLabel; + procedure MD5ButtonClick(Sender: TObject); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + MD5TestForm: TMD5TestForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMD5TestForm.MD5ButtonClick(Sender: TObject); +var + Buffer : String; +begin + Buffer := DataEdit.Text + #0; + MD5ResultLabel.Caption := GetMD5(@Buffer[1], Length(Buffer) - 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Internet/mtsrv.dpr b/lib/ics/Delphi/Internet/mtsrv.dpr new file mode 100644 index 00000000..e0900c4b --- /dev/null +++ b/lib/ics/Delphi/Internet/mtsrv.dpr @@ -0,0 +1,14 @@ +program mtsrv; + +uses + Forms, + mtsrv1 in 'mtsrv1.pas' {ServerForm}, + mtsrv2 in 'mtsrv2.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TServerForm, ServerForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/mtsrv.ico b/lib/ics/Delphi/Internet/mtsrv.ico new file mode 100644 index 00000000..c6ead6c6 Binary files /dev/null and b/lib/ics/Delphi/Internet/mtsrv.ico differ diff --git a/lib/ics/Delphi/Internet/mtsrv.res b/lib/ics/Delphi/Internet/mtsrv.res new file mode 100644 index 00000000..59352340 Binary files /dev/null and b/lib/ics/Delphi/Internet/mtsrv.res differ diff --git a/lib/ics/Delphi/Internet/mtsrv1.dfm b/lib/ics/Delphi/Internet/mtsrv1.dfm new file mode 100644 index 00000000..661680b4 Binary files /dev/null and b/lib/ics/Delphi/Internet/mtsrv1.dfm differ diff --git a/lib/ics/Delphi/Internet/mtsrv1.pas b/lib/ics/Delphi/Internet/mtsrv1.pas new file mode 100644 index 00000000..43571ce2 --- /dev/null +++ b/lib/ics/Delphi/Internet/mtsrv1.pas @@ -0,0 +1,273 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This little application shows how to use the TWSocket in a + multithreaded application. It is a very basic telnet server. + Each time a client connect to the server, he receive an "hello" + message. Then every character sent is echoed back to the client. + There are two units is this application: one for the main + server code, and one for the client thread. + Each time a client connect to the server, a new TWSocket is + created and a new thread is launched to handle the client + work. When the client disconnect, the TWSocket and the thread + are destroyed. + To see this demo working on your computer, start the demo then + start several copies of the TELNET client program (the one which + comes with Windows 95 is perfect). Then using each telnet, connect + to 127.0.0.1. You'll see a new connection in the list box. You + must receive the "hello" message and see each character as you + type them. You can use the Disconnect button from the application + or from the telnet client to see what happends (the connection + should be closed). +Note: I made this multithreaded application because so many people + asked for a multithreaded sample program. Most people think they + must go multithread in order to simultaneously server several + clients. This is completely WRONG, specially with TWSocket which + is a ASYNCHONOUS (non-blocking) component. You can serve as many + simultaneous clients as you like without using threads ! See how + TnSrv or ConSrv demo program does it without using threads. + Multithreaded programs are actually SLOWER and much more difficult + to develop than event driven, asynchonous programs such as TnSrv + and ConSrv demos. You need thread only if your server must do + some blocking and lengthy tasks, such as querying a database. But + threads are only needed for processing, not for telecommunication + using TWSocket. TWSocket does send and receive in the background, + even with no thread. +Creation: September 21, 1997 +Version: 1.02 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Nov 18, 1997 V1.01 Corrected isxdigit (By Paul Taylor ) +Apr 26, 1998 V1.02 MultiThreaded property correctly setup to TRUE. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MtSrv1; + +interface + +{$IFDEF VER80} + 'This sample program use threads and hence is not compatible with Delphi 1'; +{$ENDIF} +{$J+} + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + WSocket, MtSrv2, StdCtrls; + +type + TServerForm = class(TForm) + ServerWSocket: TWSocket; + DisconnectButton: TButton; + QuitButton: TButton; + ClientListBox: TListBox; + DisconnectAllButton: TButton; + procedure ServerWSocketSessionAvailable(Sender: TObject; Error: Word); + procedure FormShow(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure QuitButtonClick(Sender: TObject); + procedure DisconnectAllButtonClick(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + private + procedure ClientThreadTerminate(Sender: TObject); + procedure DisconnectAll; + end; + +var + ServerForm: TServerForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check if a character is a valid hex digit } +function isxdigit(Ch : char) : Boolean; +begin + Result := (ch in ['0'..'9']) or (ch in ['a'..'f']) or (ch in ['A'..'F']); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Convert an hexdigit to an integer } +function xdigit(Ch : char) : Integer; +begin + if ch in ['0'..'9'] then + Result := ord(Ch) - ord('0') + else + Result := (ord(Ch) and 15) + 9; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Convert the ascii representation of a hex number to an integer } +function htoi(value : PChar) : Integer; +var + i : Integer; +begin + Result := 0; + i := 0; + while (Value[i] <> #0) and (Value[i] = ' ') do + i := i + 1; + while (Value[i] <> #0) and (isxDigit(Value[i])) do begin + Result := Result * 16 + xdigit(Value[i]); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is generated when a client is connecting } +procedure TServerForm.ServerWSocketSessionAvailable(Sender: TObject; + Error: Word); +var + ClientThread : TClientThread; +begin + { Create a new thread to handle client request } + ClientThread := TClientThread.Create(ServerWSocket.Accept); + + { Assign the thread's OnTerminate event } + ClientThread.OnTerminate := ClientThreadTerminate; + + { Add the thread to the listbox which is our client list } + ClientListBox.Items.Add(IntToHex(Integer(ClientThread), 8)); + + { Then start the client thread work } + { because it was created in the blocked state } + ClientThread.Resume; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +begin + if FirstTime then begin + FirstTime := FALSE; + ServerWSocket.Proto := 'tcp'; { We use a TCP connection } + ServerWSocket.Port := 'telnet'; { We wants to use telnet } + ServerWSocket.Addr := '0.0.0.0'; { We accept any client } + ServerWSocket.Listen; { Start server accepting } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is generated when the user clicks on the 'Disconnect' button } +{ when he wants to disconnect the selected client in the listbox. } +procedure TServerForm.DisconnectButtonClick(Sender: TObject); +var + ClientThread : TClientThread; + Buf : String; +begin + { No selected item, nothing to do } + if ClientListBox.ItemIndex < 0 then + Exit; + + { Extract the ClientThread pointer from the list box } + Buf := ClientListBox.Items[ClientListBox.ItemIndex]; + ClientThread := TClientThread(htoi(PChar(Buf))); + + { Call ClientThread.Release which will stop the thread } + { In consequence, the OnTerminate event will be generated } + ClientThread.Release; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when one of the client thread terminate } +{ We will find this thread in our listbox, remove it and destroy the } +{ TWSocket object use by the corresponding client. } +procedure TServerForm.ClientThreadTerminate(Sender: TObject); +var + ClientThread : TClientThread; + Buf : String; + Index : Integer; +begin + { A thread has been terminated, remove it from our list and destroy } + { the ClientWSocket we passed to the thread. } + for Index := 0 to ClientListBox.Items.Count - 1 do begin + Buf := ClientListBox.Items[Index]; + ClientThread := TClientThread(htoi(PChar(Buf))); + if ClientThread = TClientThread(Sender) then begin + { Remove the client from our listbox } + ClientListBox.Items.Delete(Index); + Break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure scan the listbox and halt every ClientThread } +procedure TServerForm.DisconnectAll; +var + ClientThread : TClientThread; + Buf : String; +begin + while ClientListBox.Items.Count > 0 do begin + Buf := ClientListBox.Items[0]; + ClientThread := TClientThread(htoi(PChar(Buf))); + ClientThread.Release; + Application.ProcessMessages; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.QuitButtonClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.DisconnectAllButtonClick(Sender: TObject); +begin + DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); +begin + DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/mtsrv2.pas b/lib/ics/Delphi/Internet/mtsrv2.pas new file mode 100644 index 00000000..2fc3ab4b --- /dev/null +++ b/lib/ics/Delphi/Internet/mtsrv2.pas @@ -0,0 +1,191 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This little application shows how to use the TWSocket in a + multithreaded application. It is a very basic telnet werver. + Each time a client connect to the server, he receive an "hello" + message. Then every character sent is echoed back to the client. + There are two units is this application: one for the main + server code, and one for the client thread. + Each time a client connect to the server, a new TWSocket is + created and a new thread is launched to handle the client + work. When the client disconnect, the TWSocket and the thread + are destroyed. + To see this demo working on your computer, start the demo then + start several copies of the TELNET client program (the one which + comes with Windows 95 is perfect). Then using each telnet, connect + to 127.0.0.1. You'll see a new connection in the list box. You + must receive the "hello" message and see each character as you + type them. You can use the Disconnect button from the application + or from the telnet client to see what happends (the connection + should be closed). +Creation: September 21, 1997 +Version: 1.02 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MtSrv2; + +interface + +uses + Windows, Messages, Classes, WinSock, WSocket; + +type + TClientThread = class(TThread) + private + FClientSocket : TWSocket; + FClientHSocket : TSocket; + procedure ServerWSocketDataAvailable(Sender: TObject; Error: Word); + procedure ServerWSocketSessionClosed(Sender: TObject; Error: Word); + protected + procedure Execute; override; + public + constructor Create(ClientHSocket : TSocket); + destructor Destroy; override; + procedure Release; + + property ClientWSocket : TWSocket read FClientSocket write FClientSocket; + end; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Create a new thread in the blocked state. This allow the user to register } +{ the client thread before it actually start working. } +constructor TClientThread.Create(ClientHSocket : TSocket); +begin + FClientHSocket := ClientHSocket; + FreeOnTerminate := TRUE; + inherited Create(TRUE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Destroy the thread. Destroy the ClientWSocket if needed. } +destructor TClientThread.Destroy; +begin + if Assigned(FClientSocket) then begin + FClientSocket.Destroy; + FClientSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This method will be called by the main server thread to terminated a } +{ client thread. } +procedure TClientThread.Release; +begin + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the main thread routine. There is not much to do because TWSocket } +{ is event driven. So everythong to do is done inside an event handler, } +{ mostly the OnDataAvailable event handler which is triggered each time } +{ the client send something to the server. } +procedure TClientThread.Execute; +begin + { Create the client TWSocket. It is important to create it inside the } + { Execute method because it *must* be created by the thread. Otherwise } + { the messages sent by winsock would be processed in the main thread } + { context, effectively disabling multi-threading. } + FClientSocket := TWSocket.Create(nil); + FClientSocket.HSocket := FClientHSocket; + FClientSocket.OnDataAvailable := ServerWSocketDataAvailable; + FClientSocket.OnSessionClosed := ServerWSocketSessionClosed; + + { Send the welcome message } + FClientSocket.SendStr('Hello !' + #10 + #13 + '> '); + + { Message loop to handle TWSocket messages } + { The loop is exited when WM_QUIT message is received } + FClientSocket.MessageLoop; + + { Returning from the Execute function effectively terminate the thread } + ReturnValue := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client connection is closed. } +procedure TClientThread.ServerWSocketSessionClosed( + Sender: TObject; Error: Word); +begin + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client has sent some data to the } +{ server. It is here that we must place the client requests execution } +{ probably by assembling data in lines, parsing those lines for commands } +{ and executing the commands. Here for simplicity, we just echo back the } +{ data sent by the user, without doing anything serious. } +{ To demonstrate that blocking a thread do not block the others, when a '*' } +{ is received, we go to Sleep for a few seconds, effectively blocking the } +{ the client. But as we are multi-threaded, this do not block any other } +{ client. } +{ Do not forget to call the Synchronize method if you need to update the } +{ user interface. Only the main thread can do it (VCL is not thread safe). } +procedure TClientThread.ServerWSocketDataAvailable( + Sender: TObject; + Error: Word); +var + Buffer : array [0..4095] of char; + Count : Integer; +begin + { Receive as much data as possible } + Count := FClientSocket.Receive(@Buffer, SizeOf(Buffer)); + + { If data received, then process it } + if Count > 0 then begin + if Buffer[0] = '*' then begin + { If the first character is '*' then go to sleep a while } + FClientSocket.SendStr('Sleeping for 15 sec...' + #10 + #13); + Sleep(15000); + FClientSocket.SendStr('Wake up !' + #10 + #13); + end + else + { Just echo data back to client } + FClientSocket.Send(@Buffer, Count); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/newsrdr.dpr b/lib/ics/Delphi/Internet/newsrdr.dpr new file mode 100644 index 00000000..90a3d24f --- /dev/null +++ b/lib/ics/Delphi/Internet/newsrdr.dpr @@ -0,0 +1,12 @@ +program NewsRdr; + +uses + Forms, + NewsRdr1 in 'NewsRdr1.pas' {NNTPForm}; + +{$R *.RES} + +begin + Application.CreateForm(TNNTPForm, NNTPForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/pingtst.dpr b/lib/ics/Delphi/Internet/pingtst.dpr new file mode 100644 index 00000000..fe956a09 --- /dev/null +++ b/lib/ics/Delphi/Internet/pingtst.dpr @@ -0,0 +1,13 @@ +program PingTst; + +uses + Forms, + PingTst1 in 'PingTst1.pas' {PingTstForm}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TPingTstForm, PingTstForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/poptst.dpr b/lib/ics/Delphi/Internet/poptst.dpr new file mode 100644 index 00000000..c3199e73 --- /dev/null +++ b/lib/ics/Delphi/Internet/poptst.dpr @@ -0,0 +1,14 @@ +program PopTst; + +uses + Forms, + PopTst1 in 'PopTst1.pas' {POP3ExcercizerForm}, + PopTst2 in 'PopTst2.pas' {MessageForm}; + +{$R *.RES} + +begin + Application.CreateForm(TPOP3ExcercizerForm, POP3ExcercizerForm); + Application.CreateForm(TMessageForm, MessageForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/poptst2.dfm b/lib/ics/Delphi/Internet/poptst2.dfm new file mode 100644 index 00000000..b2ece7d5 Binary files /dev/null and b/lib/ics/Delphi/Internet/poptst2.dfm differ diff --git a/lib/ics/Delphi/Internet/poptst2.pas b/lib/ics/Delphi/Internet/poptst2.pas new file mode 100644 index 00000000..ac6c5990 --- /dev/null +++ b/lib/ics/Delphi/Internet/poptst2.pas @@ -0,0 +1,33 @@ +{ +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + +} +unit PopTst2; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls; + +type + TMessageForm = class(TForm) + DisplayMemo: TMemo; + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + MessageForm: TMessageForm; + +implementation + +{$R *.DFM} + +end. diff --git a/lib/ics/Delphi/Internet/server5.dpr b/lib/ics/Delphi/Internet/server5.dpr new file mode 100644 index 00000000..bcc9eba2 --- /dev/null +++ b/lib/ics/Delphi/Internet/server5.dpr @@ -0,0 +1,12 @@ +program server5; + +uses + Forms, + Srv5 in 'Srv5.pas' {ServerForm}; + +{$R *.RES} + +begin + Application.CreateForm(TServerForm, ServerForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/srv5.dfm b/lib/ics/Delphi/Internet/srv5.dfm new file mode 100644 index 00000000..155ad594 Binary files /dev/null and b/lib/ics/Delphi/Internet/srv5.dfm differ diff --git a/lib/ics/Delphi/Internet/srv5.pas b/lib/ics/Delphi/Internet/srv5.pas new file mode 100644 index 00000000..53080d83 --- /dev/null +++ b/lib/ics/Delphi/Internet/srv5.pas @@ -0,0 +1,142 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: Demo program to show how to use TWSocket object is a very + simple server program. This server just wait for a client to + connect, then send 'Hello'. When the user click on the + disconnect button, the client is disconnected. +Creation: September 19, 1996 +Version: 2.02 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Mar 19, 1997 Use enhanced TWSocket object +Sep 06, 1997 Beautified +Aug 20, 1999 V2.02 Changed comment to correctly talk about interface use. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Srv5; + +{$J+} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, + Controls, Forms, Dialogs, WSocket, Winsock, StdCtrls; + +type + TServerForm = class(TForm) + SrvSocket: TWSocket; + InfoLabel: TLabel; + CliSocket: TWSocket; + DisconnectButton: TButton; + procedure SrvSocketSessionAvailable(Sender: TObject; Error: Word); + procedure FormShow(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + end; + +var + ServerForm: TServerForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +begin + if FirstTime then begin + FirstTime := FALSE; { Do it only once ! } + SrvSocket.Addr := '0.0.0.0'; { Use any interface } + SrvSocket.Listen; { Start listening for client } + InfoLabel.Caption := 'Waiting for client'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler is called once a client has connected the server. *} +procedure TServerForm.SrvSocketSessionAvailable(Sender: TObject; Error: Word); +var + NewHSocket : TSocket; + PeerName : TSockAddrIn; + Peer : String; +begin + { We need to accept the client connection } + NewHSocket := SrvSocket.Accept; + + { And then associate this connection with our client socket } + CliSocket.Dup(NewHSocket); + + { Wants to know who is connected to display on screen } + CliSocket.GetPeerName(PeerName, Sizeof(PeerName)); + + { User likes to see internet address in dot notation } + Peer := IntToStr(ord(PeerName.sin_addr.S_un_b.s_b1)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b2)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b3)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b4)); + InfoLabel.Caption := 'Remote ' + Peer + ' connected'; + + { Send a welcome message to the client } + CliSocket.SendStr('Hello' + #13 + #10); + + { Enable the server user to disconect the client } + DisconnectButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler is called once the user clicks on Ddisconnect *} +procedure TServerForm.DisconnectButtonClick(Sender: TObject); +begin + CliSocket.ShutDown(2); { Shut the communication down } + CliSocket.Close; { Close the communication } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler is called once the client connection is broken. *} +{* Either by the client or the server. *} +procedure TServerForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + DisconnectButton.Enabled := FALSE; + InfoLabel.Caption := 'Waiting for client';{ Inform the user } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/srvdemo.dpr b/lib/ics/Delphi/Internet/srvdemo.dpr new file mode 100644 index 00000000..3406c31f --- /dev/null +++ b/lib/ics/Delphi/Internet/srvdemo.dpr @@ -0,0 +1,13 @@ +program SrvDemo; + +uses + Forms, + SrvDemo1 in 'SrvDemo1.pas' {SrvForm}, + SrvDemo2 in 'SrvDemo2.pas' {CliForm}; + +{$R *.RES} + +begin + Application.CreateForm(TSrvForm, SrvForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/tnclient.dpr b/lib/ics/Delphi/Internet/tnclient.dpr new file mode 100644 index 00000000..301be2d9 --- /dev/null +++ b/lib/ics/Delphi/Internet/tnclient.dpr @@ -0,0 +1,12 @@ +program TnClient; + +uses + Forms, + TnCli1 in 'TnCli1.pas' {TelnetForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTelnetForm, TelnetForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/tnclient.ico b/lib/ics/Delphi/Internet/tnclient.ico new file mode 100644 index 00000000..00e85d67 Binary files /dev/null and b/lib/ics/Delphi/Internet/tnclient.ico differ diff --git a/lib/ics/Delphi/Internet/tndemo.dpr b/lib/ics/Delphi/Internet/tndemo.dpr new file mode 100644 index 00000000..b136dca2 --- /dev/null +++ b/lib/ics/Delphi/Internet/tndemo.dpr @@ -0,0 +1,12 @@ +program tndemo; + +uses + Forms, + TnDemo1 in 'TnDemo1.pas' {TnDemoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTnDemoForm, TnDemoForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/tndemo1.dfm b/lib/ics/Delphi/Internet/tndemo1.dfm new file mode 100644 index 00000000..cd7dfa71 Binary files /dev/null and b/lib/ics/Delphi/Internet/tndemo1.dfm differ diff --git a/lib/ics/Delphi/Internet/tndemo1.pas b/lib/ics/Delphi/Internet/tndemo1.pas new file mode 100644 index 00000000..0ac2e09f --- /dev/null +++ b/lib/ics/Delphi/Internet/tndemo1.pas @@ -0,0 +1,207 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: How to use TnCnx (Telnet protocol) with a TMemo +Creation: December 11, 1997 +Version: 1.01 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Oct 23, 2002 V1.01 Changed Buffer arg in OnDataAvailable to untyped var instead + of PChar. More portable. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnDemo1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, TnCnx, WSocket, ExtCtrls; + +type + TTnDemoForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + TnCnx: TTnCnx; + HostLabel: TLabel; + HostEdit: TEdit; + ConnectButton: TButton; + InfoLabel: TLabel; + DisconnectButton: TButton; + PortLabel: TLabel; + PortEdit: TEdit; + Label1: TLabel; + DataEdit: TEdit; + SendButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure TnCnxDataAvailable(Sender: TTnCnx; Buffer : Pointer; + Len: Integer); + procedure TnCnxSessionConnected(Sender: TTnCnx; Error: Word); + procedure DisplayMemoKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure DisplayMemoKeyPress(Sender: TObject; var Key: Char); + procedure TnCnxSessionClosed(Sender: TTnCnx; Error: Word); + procedure DisconnectButtonClick(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + end; + +var + TnDemoForm: TTnDemoForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Display a message in the memo field, breaking with CR *} +procedure MemoAddLines(Memo : TMemo; Msg : String); +const + CR = #13; + LF = #10; +var + Start, Stop : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add(''); + + Start := 1; + Stop := Pos(CR, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := + Memo.Lines.Strings[Memo.Lines.Count - 1] + + Copy(Msg, Start, Stop - Start); + if Msg[Stop] = CR then begin + Memo.Lines.Add(''); + SendMessage(Memo.Handle, WM_KEYDOWN, VK_UP, 1); + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + if Msg[Start] = LF then + Start := Start + 1; + Stop := Start; + while (Msg[Stop] <> CR) and (Stop <= Length(Msg)) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.ConnectButtonClick(Sender: TObject); +begin + TnCnx.Host := HostEdit.Text; + TnCnx.Port := PortEdit.Text; + TnCnx.TermType := 'VT100'; + TnCnx.LocalEcho := FALSE; + TnCnx.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.DisconnectButtonClick(Sender: TObject); +begin + TnCnx.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.TnCnxSessionConnected(Sender: TTnCnx; Error: Word); +begin + if Error <> 0 then begin + DisplayMemo.Lines.Add('Unable to connect. Error #' + IntToStr(Error)); + Exit; + end; + + DisplayMemo.Clear; + InfoLabel.Caption := 'Connected'; + DisplayMemo.Enabled := TRUE; + ConnectButton.Enabled := FALSE; + DisconnectButton.Enabled := TRUE; + ActiveControl := DisplayMemo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.TnCnxSessionClosed(Sender: TTnCnx; Error: Word); +begin + InfoLabel.Caption := 'Disconnected'; + DisplayMemo.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + DisconnectButton.Enabled := FALSE; + ActiveControl := ConnectButton; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.TnCnxDataAvailable( + Sender: TTnCnx; Buffer : Pointer; Len: Integer); +begin + MemoAddLines(DisplayMemo, StrPas(Buffer)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.DisplayMemoKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + Key := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.DisplayMemoKeyPress(Sender: TObject; var Key: Char); +begin + TnCnx.Send(@Key, 1); + if Key = #13 then begin + { Send a LF after CR key } + Key := #10; + TnCnx.Send(@Key, 1); + end; + Key := #0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.SendButtonClick(Sender: TObject); +begin + if TnCnx.State = wsConnected then + TnCnx.SendStr(DataEdit.Text + #13#10) + else + DisplayMemo.Lines.Add('*** NOT CONNECTED ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/tnsrv.dpr b/lib/ics/Delphi/Internet/tnsrv.dpr new file mode 100644 index 00000000..21811a59 --- /dev/null +++ b/lib/ics/Delphi/Internet/tnsrv.dpr @@ -0,0 +1,13 @@ +program Tnsrv; + +uses + Forms, + TnSrv1 in 'TnSrv1.pas' {ServerForm}, + TnSrv2 in 'TnSrv2.pas' {ClientForm}; + +{$R *.RES} + +begin + Application.CreateForm(TServerForm, ServerForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/tnsrv.ico b/lib/ics/Delphi/Internet/tnsrv.ico new file mode 100644 index 00000000..d6951f9a Binary files /dev/null and b/lib/ics/Delphi/Internet/tnsrv.ico differ diff --git a/lib/ics/Delphi/Internet/tnsrv1.dfm b/lib/ics/Delphi/Internet/tnsrv1.dfm new file mode 100644 index 00000000..f20bc1bb Binary files /dev/null and b/lib/ics/Delphi/Internet/tnsrv1.dfm differ diff --git a/lib/ics/Delphi/Internet/tnsrv1.pas b/lib/ics/Delphi/Internet/tnsrv1.pas new file mode 100644 index 00000000..5a5a45b1 --- /dev/null +++ b/lib/ics/Delphi/Internet/tnsrv1.pas @@ -0,0 +1,325 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Copyright: Franois PIETTE +Creation: April 1996 +Version: 1.26 +Description: TnSrv implement a (very basic) Telnet server (daemon) + Compatible with both Delphi 1 and Delphi 2 + Uses TWSocket to communicate with WinSock +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 18, 1996 Added resize event and about box +Mar 19, 1997 V1.10 Use enhanced TWSocket object +Jul 22, 1997 V1.20 Adapted to Delphi 3 +Sep 27, 1997 Adapted for TWSocket converted to support C++Builder +Oct 03, 1997 V1.22 Added a $DEFINE POP3 to simulate a POP3 server + Added an editbox to select the server port +Oct 09, 1997 Added a $DEFINE SMTP to simulate a SMTP server +Oct 11, 1997 V1.23 Added PortNum to client to tell him what he has to serve +Jul 30, 1998 V1.24 Added some code to the dummy SMTP server +Aug 20, 1999 V1.25 Added some comments, added Restartserver procedure. +Sep 26, 2000 V1.26 Replaced TEdit by TMemo for data to be sent to allow + multi-line sending (see TnSrv2 source). + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnSrv1; + +{$J+} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, WSocket, WinSock, StdCtrls, TnSrv2; + +const + TnSrvVersion = 126; + +type + { TClient class is used to handle client connections. A TClient is } + { instanciated for each client which connect. } + { TnSrv keep track of all connected clients using Clients variable in } + { TServerForm (see below). } + { TClient class will dynamically create a TClientForm from his } + { constructor. Since TClientForm include a TWSocket, a new TWSocket } + { is also created dynamically and automaticcaly when the form is } + { created. } + TClient = class(TObject) + Form : TClientForm; + Peer : String; + constructor Create(AOwner : TComponent); + destructor Destroy; override; + end; + + TServerForm = class(TForm) + Memo: TMemo; + QuitButton: TButton; + AboutButton: TButton; + SrvSocket: TWSocket; + PortLabel: TLabel; + PortEdit: TEdit; + ChangePortButton: TButton; + procedure FormCreate(Sender: TObject); + procedure Display(Msg : String); + procedure QuitButtonClick(Sender: TObject); + procedure FormActivate(Sender: TObject); + procedure AboutButtonClick(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure SrvSocketSessionAvailable(Sender: TObject; Error: Word); + procedure SrvSocketSessionClosed(Sender: TObject; Error: Word); + procedure ChangePortButtonClick(Sender: TObject); + protected + procedure WMDisconnect(var msg: TMessage); message WM_DISCONNECT; + procedure RestartServer; + public + Clients : TList; { List of all TClient object (one per connection) } + end; + +var + ServerForm: TServerForm; + +implementation + +{$R *.DFM} +{DEFINE Debug} { Add or remove dollar sign before Debug to } + { generate code for debug message output } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DebugString(Msg : String); +const + Cnt : Integer = 0; +{$IFDEF Debug} +var + Buf : String[20]; +{$ENDIF} +begin +{$IFDEF Debug} + Cnt := Cnt + 1; + Buf := IntToHex(Cnt, 4) + ' ' + #0; + OutputDebugString(@Buf[1]); +{$IFDEF WIN32} + OutputDebugString(PChar(Msg)); +{$ELSE} + if Length(Msg) < High(Msg) then + Msg[Length(Msg) + 1] := #0; + + OutputDebugString(@Msg[1]); +{$ENDIF} +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TClient.Create(AOwner : TComponent); +begin + Application.CreateForm(TClientForm, Form); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TClient.Destroy; +begin + Form.Release; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormCreate(Sender: TObject); +begin + Memo.Clear; + Clients := TList.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormActivate(Sender: TObject); +const + FirstTime : Boolean = TRUE; +begin + if FirstTime then begin + FirstTime := FALSE; + RestartServer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.RestartServer; +begin + with SrvSocket do begin + Close; + Addr := '0.0.0.0'; { Use any interface for listening } + Proto := 'tcp'; + Port := PortEdit.Text; + Listen; + end; + Memo.Clear; + Display(PortEdit.Text + ' Server Ready' + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.Display(Msg : String); +var + Start, Stop : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add(''); + + Start := 1; + Stop := Pos(#13, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := Memo.Lines.Strings[Memo.Lines.Count - 1] + Copy(Msg, Start, Stop - Start); + if Msg[Stop] = #13 then begin + Memo.Lines.Add(''); + SendMessage(Memo.Handle, WM_KEYDOWN, VK_UP, 1); + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + if Msg[Start] = #10 then + Start := Start + 1; + Stop := Start; + while (Stop <= Length(Msg)) and (Msg[Stop] <> #13) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.SrvSocketSessionAvailable(Sender: TObject; Error : word); +var + NewHSocket : TSocket; + PeerName : TSockAddrIn; + Client : TClient; +begin + NewHSocket := SrvSocket.Accept; + Client := TClient.Create(Self); + Client.Form.Reference := Client; + Client.Form.PortNum := SrvSocket.PortNum; + Client.Form.AcceptForm := Self; + Client.Form.Socket.Dup(NewHSocket); + Client.Form.Socket.GetPeerName(PeerName, Sizeof(PeerName)); + Client.Peer := StrPas(inet_ntoa(PeerName.Sin_addr)); + Display('Remote ' + Client.Peer + ' connected' + #13 + #10); + Client.Form.Caption := Client.Peer; + Client.Form.Show; + Clients.Add(Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.WMDisconnect(var msg: TMessage); +var + Client : TClient; + Why : String; +begin + case msg.wParam of + DISCONNECT_SELF : Why := 'has been disconnected'; + DISCONNECT_REMOTE : Why := 'has closed the connection'; + else Why := 'disconnected'; + end; + + Client := TCLient(msg.lParam); + Display('Remote ' + Client.Peer + ' ' + Why + #13 + #10); + Client.Form.Socket.Shutdown(2); + Client.Form.Socket.Close; + Client.Form.Visible := FALSE; + Client.Form.Release; + Clients.Remove(Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.SrvSocketSessionClosed(Sender: TObject; Error : word); +begin + Display(#13 + #10 + '*** Remote has closed ***' + #13 + #10); + if SrvSocket.State = wsOpened then + SrvSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.QuitButtonClick(Sender: TObject); +begin + SrvSocket.Close; + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.AboutButtonClick(Sender: TObject); +var + Buf : String; +begin + Buf := 'TnSRV V' + + IntToStr(TnSrvVersion div 100) + '.' + + IntToStr(TnSrvVersion mod 100) + ' ' + +{$IFDEF WIN32} + '32 bit' + +{$ELSE} + '16 bit' + +{$ENDIF} + ' Created march 19, 1997' + #10 + #10 + + 'Free Software, Copyright Franois Piette' + #10 + #10 + + 'francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette' + #0; + Application.MessageBox(@Buf[1], 'About TnSrv', MB_OK); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Adjust the position for each control in the form as the user resize it *} +procedure TServerForm.FormResize(Sender: TObject); +begin + Memo.Height := ClientHeight - QuitButton.Height - 20; + QuitButton.Left := ClientWidth - QuitButton.Width - 10; + AboutButton.Left := QuitButton.Left - AboutButton.Width - 10; + QuitButton.Top := ClientHeight - QuitButton.Height - 10; + AboutButton.Top := QuitButton.Top; + ChangePortButton.Top := QuitButton.Top; + PortEdit.Top := QuitButton.Top; + PortLabel.Top := QuitButton.Top + 4; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.ChangePortButtonClick(Sender: TObject); +begin + RestartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/tnsrv2.dfm b/lib/ics/Delphi/Internet/tnsrv2.dfm new file mode 100644 index 00000000..5bd553a8 Binary files /dev/null and b/lib/ics/Delphi/Internet/tnsrv2.dfm differ diff --git a/lib/ics/Delphi/Internet/tnsrv2.pas b/lib/ics/Delphi/Internet/tnsrv2.pas new file mode 100644 index 00000000..9ba59a85 --- /dev/null +++ b/lib/ics/Delphi/Internet/tnsrv2.pas @@ -0,0 +1,544 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TnSrv implement a (very basic) Telnet server (daemon) + Compatible with both Delphi 1 and Delphi 2 + Uses TWSocket to communicate with WinSock +Creation: April 1996 +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +Updates: +Sep 18, 1996 Accept CR/LF or LF only as line terminator + Implement Help and Exit commands as demo +Mar 19, 1997 Use enhanced TWSocket object +Oct 03, 1997 V1.22 Added a $DEFINE POP3 to simulate a POP3 server +Oct 09, 1997 Added a $DEFINE SMTP to simulate a SMTP server +Oct 11, 1997 Added PortNum to specify which port we serve + Added pseudo POP3 and SMTP interpreters (nothing really happens + except transmission of pseudo correct answers. I use this + feature to debug SMTP and POP3 components). +Jul 30, 1998 V1.24 Added some code to the dummy SMTP server +Sep 26, 2000 V1.26 Replaced TEdit by TMemo for data to be sent to allow + multi-line sending. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnSrv2; + + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, WSocket, Winsock, ExtCtrls; + +const + SMTP_PORT = 25; + POP3_PORT = 110; + + { The message WM_DISCONNECT is used by the client form to tell the server } + { form that the client has disconnected or should be disconnected. } + WM_DISCONNECT = WM_USER + 2; + DISCONNECT_SELF = 1; { Client form ask to disconnect } + DISCONNECT_REMOTE = 2; { Client user (remote) has disconnected } + +type + { A new TClientForm will be instanciated for each new client connection. } + { Instanciation is done from TClient constructor. } + TClientForm = class(TForm) + Memo: TMemo; + Socket: TWSocket; + Panel1: TPanel; + Button1: TButton; + SendButton: TButton; + DisconnectButton: TButton; + DataMemo: TMemo; + procedure FormCreate(Sender: TObject); + procedure Display(Msg : String); + procedure FormDestroy(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure SocketDataAvailable(Sender: TObject; Error: Word); + procedure SocketSessionClosed(Sender: TObject; Error: Word); + procedure Button1Click(Sender: TObject); + private + FCommand : String; + FRcvdCR : Boolean; + FDataFlag : Boolean; + procedure ProcessChar(Ch : Char); + procedure CommandInterpreter; + procedure SMTP_Interpreter(CommandVerb : String; CommandTail : String); + procedure POP3_Interpreter(CommandVerb : String; CommandTail : String); + procedure TELNET_Interpreter(CommandVerb : String; CommandTail : String); + public + AcceptForm : TForm; + Reference : Pointer; + PortNum : Integer; + end; + +var + ClientForm: TClientForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +procedure SetLength(var Str : String; Len : Integer); +begin + Str[0] := chr(Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] >= '0') and (Value[i] <= '9')do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormCreate(Sender: TObject); +begin + Memo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure display text in a memo control. } +{ I should add code to remove lines when there are too much of them... } +procedure TClientForm.Display(Msg : String); +var + Start, Stop : Integer; + SelStart : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add('') + else if Memo.Lines.Count > 200 then + Memo.Clear; + + Start := 1; + Stop := Pos(#13, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := Memo.Lines.Strings[Memo.Lines.Count - 1] + Copy(Msg, Start, Stop - Start); + if (Stop <= Length(Msg)) and (Msg[Stop] = #13) then begin + SelStart := Memo.SelStart; + Memo.Lines.Add(''); + Memo.SelStart := SelStart + 2; + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + if Msg[Start] = #10 then + Start := Start + 1; + Stop := Start; + while (Stop <= Length(Msg)) and (Msg[Stop] <> #13) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Not a real SMTP command interpreter, just enough for me to test my SMTP } +{ component. } +procedure TClientForm.SMTP_Interpreter( + CommandVerb : String; + CommandTail : String); +var + Response : String; +begin + if FDataFlag then begin + { We should add storage here of course... } + { SMTP data ends with a line having being a single dot } + if FCommand = '.' then begin + Response := '250 Data received ok'; + Socket.SendStr(Response + #13 + #10); + FDataFlag := FALSE; + end; + end + else begin + FDataFlag := FALSE; + if CommandVerb = 'MAIL' then + Response := '250 Ok' + else if CommandVerb = 'RCPT' then + Response := '250 Ok' + else if CommandVerb = 'DATA' then begin + Response := '354 Send data now'; + FDataFlag := TRUE; + end + else if CommandVerb = 'HELO' then + Response := '250 Ok' + else if CommandVerb = 'QUIT' then + Response := '221 Goodbye' + else + Response := '500 syntax error'; + + Socket.SendStr(Response + #13 + #10); + if CommandVerb = 'QUIT' then + Socket.Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Not a real POP3 command interpreter, just enough for me to test my POP3 } +{ component. } +procedure TClientForm.POP3_Interpreter( + CommandVerb : String; + CommandTail : String); +var + Response : String; +begin + if CommandVerb = 'USER' then + Response := '+OK' + else if CommandVerb = 'PASS' then + Response := '+OK' + else if CommandVerb = 'RETR' then begin + Socket.SendStr('+OK' + #13 + #10); + Socket.SendStr('This is the message body.' + #13 + #10); + Socket.SendStr('This is the last message line.' + #13 + #10); + Response := '.' + end + else if CommandVerb = 'LIST' then begin + if Trim(CommandTail) = '' then begin + Socket.SendStr('+OK 2 messages (320 octets)' + #13 + #10); + Socket.SendStr('1 120' + #13 + #10); + Socket.SendStr('2 200' + #13 + #10); + Response := '.' + end + else + Response := '+OK ' + CommandTail + ' 200' + end + else if CommandVerb = 'STAT' then + Response := '+OK 10 12345' + else if CommandVerb = 'QUIT' then + Response := '+OK' + else if CommandVerb = 'TOP' then begin + if atoi(CommandTail) <= 0 then + Response := '-ERR Message doesn''t exists' + else begin + Socket.SendStr('+OK' + #13 + #10); + Socket.SendStr('This is the message body.' + #13 + #10); + Socket.SendStr('This is the last message line.' + #13 + #10); + Response := '.' + end; + end + else if CommandVerb = 'RPOP' then + Response := '+OK' + else if CommandVerb = 'APOP' then + Response := '+OK' + else if CommandVerb = 'DELE' then + Response := '+OK' + else if CommandVerb = 'LAST' then + Response := '+OK 1' + else if CommandVerb = 'NOOP' then + Response := '+OK' + else if CommandVerb = 'UIDL' then + Response := '+OK ' + Trim(CommandTail) + ' Msg' + Trim(CommandTail) + else if CommandVerb = 'RSET' then + Response := '+OK' + else + Response := '-ERR'; + + Socket.SendStr(Response + #13 + #10); + if CommandVerb = 'QUIT' then + Socket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Not a real TELNET command interpreter, just enough to see how it could } +{ be implemented. } +procedure TClientForm.TELNET_Interpreter( + CommandVerb : String; + CommandTail : String); +begin + Socket.SendStr(#13 + #10 + 'Executing command ''' + CommandVerb + '''...' + + #13 + #10); + + if CommandVerb = 'EXIT' then + DisconnectButtonClick(Self) + else if CommandVerb = 'HELP' then + Socket.SendStr('List of commands:' + #13 + #10 + + ' Exit logoff from server' + #13 + #10 + + ' Help show this help screen' + #13 + #10) + else + Socket.SendStr('Unknown command, ignoring'); + + Socket.SendStr(#13 + #10 + '--> '); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the command line interpreter. Should extend the code to support } +{ every command needed... } +procedure TClientForm.CommandInterpreter; +var + CommandVerb : String; + CommandTail : String; + I, J : Integer; +begin + CommandVerb := FCommand; + + { Skip leading spaces } + I := 1; + while (I <= Length(CommandVerb)) and (CommandVerb[I] in [' ', #9]) do + Inc(I); + + { Find separator and separe CommandVerb and CommandTail } + J := I; + while TRUE do begin + if (J >= Length(CommandVerb)) then begin + CommandTail := ''; + break; + end; + + if CommandVerb[J] in [' ', #9, '/'] then begin + CommandTail := Copy(CommandVerb, J, Length(CommandVerb) - J + 1); + CommandVerb := Copy(CommandVerb, I, J - I); + break; + end; + Inc(J); + end; + CommandVerb := UpperCase(CommandVerb); + + if PortNum = SMTP_PORT then + SMTP_Interpreter(CommandVerb, CommandTail) + else if PortNum = POP3_PORT then + POP3_Interpreter(CommandVerb, CommandTail) + else + TELNET_Interpreter(CommandVerb, CommandTail); + + FCommand := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Process each charcter received to do minimal line editing } +procedure TClientForm.ProcessChar(Ch : Char); +begin + if Ch = #8 then begin + if Length(FCommand) > 0 then begin + SetLength(FCommand, Length(FCommand) - 1); + Socket.SendStr(#8 + ' ' + #8); + end + else + Socket.SendStr(#7); + Exit; + end + else if (Ch = #10) and FRcvdCR then begin + { Ignore LF just after CR (CR/LF is normal end of line) } + FRcvdCR := FALSE; + Exit; + end + else if Ch = #13 then begin + FRcvdCR := TRUE; + CommandInterpreter; + Exit; + end + else if Ch = #10 then begin + CommandInterpreter; + Exit; + end; + + { Ordinary character, put in buffer in some place left } +{$IFNDEF WIN32} + if Length(FCommand) = High(FCommand) then + Ch := #7 + else +{$ENDIF} + FCommand := FCommand + Ch; + + if (PortNum <> POP3_PORT) and (PortNum <> SMTP_PORT) then begin + { Echo to client } + Socket.Send(@Ch, 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Event handler for datavailable. Called each time some data is received *} +procedure TClientForm.SocketDataAvailable(Sender: TObject; Error : word); +var + Len : Integer; + Buffer : String[255]; + Socket : TWSocket; + I : Integer; +begin + Socket := Sender as TWSocket; + Len := Socket.Receive(@Buffer[1], High(Buffer)); + if Len = 0 then begin + { Remote has closed } + Display(#13 + #10 + '**** Remote has closed ****' + #13 + #10); + end + else if Len < 0 then begin + { An error has occured } + if Socket.LastError <> WSAEWOULDBLOCK then + Display(#13 + #10 + '**** ERROR: ' + IntToStr(Socket.LastError) + + ' ****' + #13 + #10); + end + else begin + Buffer[0] := chr(Len); + Display(Buffer); + for I := 1 to Len do + ProcessChar(Buffer[I]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Event handler called when the remote has closed the connection *} +procedure TClientForm.SocketSessionClosed(Sender: TObject; Error : word); +begin + Display(#13 + #10 + '**** Remote has closed ****' + #13 + #10); + PostMessage(AcceptForm.Handle, WM_DISCONNECT, + DISCONNECT_REMOTE, + LongInt(Reference)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormDestroy(Sender: TObject); +begin + Socket.Shutdown(2); + Socket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.DisconnectButtonClick(Sender: TObject); +begin + { Post a message to server form asking to disconnect the client } + PostMessage(AcceptForm.Handle, WM_DISCONNECT, + DISCONNECT_SELF, + LongInt(Reference)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormShow(Sender: TObject); +var + Buf : String; +begin + DataMemo.Text := ''; + ActiveControl := DataMemo; + + if PortNum = POP3_PORT then + Buf := '+OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>' + #13 + #10 + else if PortNum = SMTP_PORT then begin + Buf := '220-SMTP Simulator ready' + #13 + #10; + Socket.Send(@Buf[1], Length(Buf)); + Buf := '220 ESMTP spoken here' + #13 + #10; + end + else + Buf := 'Hello from TnSrv !' + #13 + #10 + '--> '; + + Socket.Send(@Buf[1], Length(Buf)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.SendButtonClick(Sender: TObject); +var + Buf : String; +begin + Buf := DataMemo.Text + #13 + #10; + Socket.Send(@Buf[1], Length(Buf)); + DataMemo.Text := ''; + ActiveControl := DataMemo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Adjust the position for each control in the form as the user resize it *} +procedure TClientForm.FormResize(Sender: TObject); +begin +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.Button1Click(Sender: TObject); +begin + Socket.SendStr('Hello !'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/twschat.dpr b/lib/ics/Delphi/Internet/twschat.dpr new file mode 100644 index 00000000..fb4b6088 --- /dev/null +++ b/lib/ics/Delphi/Internet/twschat.dpr @@ -0,0 +1,12 @@ +program twschat; + +uses + Forms, + TWSChat1 in 'TWSChat1.pas' {TWSChatForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTWSChatForm, TWSChatForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/twschat1.dfm b/lib/ics/Delphi/Internet/twschat1.dfm new file mode 100644 index 00000000..73dd6f92 Binary files /dev/null and b/lib/ics/Delphi/Internet/twschat1.dfm differ diff --git a/lib/ics/Delphi/Internet/twschat1.pas b/lib/ics/Delphi/Internet/twschat1.pas new file mode 100644 index 00000000..e9818d3a --- /dev/null +++ b/lib/ics/Delphi/Internet/twschat1.pas @@ -0,0 +1,332 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TWSChat shows how to use TWSocket to build a chat program +Creation: November 26, 1997 +Version: 1.03 +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Jan 04, 1998 V1.01 Corrected a bug in the CliWSocketDataAvailable which did'nt + append data to the receive buffer. +Jan 10, 1998 V1.02 Corrected yet another bug in CliWSocketDataAvailable which + did'nt take into account that variable I is zero based. +Mar 15, 1998 V1.03 Yet another bug in OnDataAvailable event. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TWSChat1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, WinSock, WSocket; + +const + TWSChatVersion = 103; + ChatPort = '2200'; { Any port would do the job... } + +type + TTWSChatForm = class(TForm) + Panel1: TPanel; + Panel2: TPanel; + DisplayMemo: TMemo; + SrvWSocket: TWSocket; + ServerEdit: TEdit; + Label1: TLabel; + ConnectButton: TButton; + CliWSocket: TWSocket; + DisconnectButton: TButton; + MessageEdit: TEdit; + SendButton: TButton; + TmpWSocket: TWSocket; + RunningRadioButton: TRadioButton; + StoppedRadioButton: TRadioButton; + procedure FormShow(Sender: TObject); + procedure ConnectButtonClick(Sender: TObject); + procedure CliWSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure CliWSocketSessionConnected(Sender: TObject; Error: Word); + procedure DisconnectButtonClick(Sender: TObject); + procedure SrvWSocketSessionAvailable(Sender: TObject; Error: Word); + procedure CliWSocketSessionClosed(Sender: TObject; Error: Word); + procedure CliWSocketDataAvailable(Sender: TObject; Error: Word); + procedure SendButtonClick(Sender: TObject); + procedure StoppedRadioButtonClick(Sender: TObject); + procedure RunningRadioButtonClick(Sender: TObject); + private + { Dclarations prives } + Initialized : Boolean; + RcvBuf : array [0..1023] of char; + RcvLen : integer; + procedure StartServer; + public + { Dclarations publiques } + end; + +var + TWSChatForm: TTWSChatForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.StartServer; +begin + { Try to be a server } + SrvWSocket.Port := ChatPort; + SrvWSocket.Proto := 'tcp'; + SrvWSocket.Addr := '0.0.0.0'; + try + SrvWSocket.Listen; + RunningRadioButton.Checked := TRUE; + StoppedRadioButton.Checked := FALSE; + except + on E:ESocketException do begin + { The socket is probably already in use } + RunningRadioButton.Checked := FALSE; + StoppedRadioButton.Checked := TRUE; + if Copy(E.Message, 1, 11) = 'Error 10048' then + DisplayMemo.Lines.Add('TWSChat already running as server') + else + raise; + end + else + raise; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.FormShow(Sender: TObject); +begin + if not Initialized then begin + Initialized := TRUE; + StartServer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The user has clicked on the 'connect' button. We will not connect here, } +{ but start the DNSLookup. We will receive a event when it is complete. } +{ The connection will be made at that later time. } +procedure TTWSChatForm.ConnectButtonClick(Sender: TObject); +begin + ConnectButton.Enabled := FALSE; + DisconnectButton.Enabled := TRUE; + CliWSocket.DnsLookup(ServerEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when the DNS lookup process is finished } +{ successfully or not. If DNS lookud failed, display a message. } +{ If DNS lookup successfull, ask TWSocket to connect the server. } +procedure TTWSChatForm.CliWSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + { DNS Lookup has failed } + DisplayMemo.Lines.Add('Server name unknown'); + ConnectButton.Enabled := TRUE; + DisconnectButton.Enabled := FALSE; + Exit; + end; + + { DNS lookup successfull. Try to see if we are the server and we are } + { trying to connect to ourself. Check loopback address, should also } + { check the local IP address (returned by LocalIPList)... } + if (SrvWSocket.State = wsListening) and + (CliWSocket.DnsResult = '127.0.0.1') then begin + DisplayMemo.Lines.Add('Your are trying to connect to yourself !'); + ConnectButton.Enabled := TRUE; + DisconnectButton.Enabled := FALSE; + Exit; + end; + + { Transfert the IP address from DNSLookup to the TWSocket for connection } + { We could use the hostname for the Addr property, TWSocket will do the } + { DNS lookup for us, but it will block, maybe for a long time if DNS if } + { down. } + CliWSocket.Addr := CliWSocket.DnsResult; + CliWSocket.Port := ChatPort; + CliWSocket.Proto := 'tcp'; + + { The connect method is asynchronous. You get the control back quickly } + { The OnSessionConnected event will be eventually generated when the } + { connection is established. } + CliWSocket.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when the connection is established with } +{ the server. Enable the send button and the message edit box. } +procedure TTWSChatForm.CliWSocketSessionConnected(Sender: TObject; Error: Word); +begin + if Error = WSAECONNREFUSED then + DisplayMemo.Lines.Add('No server available') + else if Error <> 0 then + DisplayMemo.Lines.Add('Can''t connect, error #' + IntToStr(Error)) + else begin + DisplayMemo.Lines.Add('Connected'); + SendButton.Enabled := TRUE; + MessageEdit.Enabled := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is triggered when the client connection is closed, either } +{ by the client himself or by the local user pushing the disconnect button } +procedure TTWSChatForm.CliWSocketSessionClosed(Sender: TObject; Error: Word); +begin + DisconnectButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + if SendButton.Enabled then begin + SendButton.Enabled := FALSE; + MessageEdit.Enabled := FALSE; + DisplayMemo.Lines.Add('Disconnected'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is triggered when data has been received from the client. } +{ A little bit of work here because the data can comes fragmented or in big } +{ chunks with several client lines. So we assemble the data received in a } +{ buffer and check the buffer for complete lines (there can be no complete } +{ line, exactly one complete line, several complete lines and may be an } +{ incomplete line at the end. } +procedure TTWSChatForm.CliWSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I : Integer; +begin + { Receive the data that has arrived, put it after the data already here } + Len := CliWSocket.Receive(@RcvBuf[RcvLen], SizeOf(RcvBuf) - RcvLen - 1); + if Len <= 0 then + Exit; + { Update our conter } + RcvLen := RcvLen + Len; + { Place a null byte at the end of the buffer } + RcvBuf[RcvLen] := #0; + + { Scan the buffer to process each complete line } + while TRUE do begin + { find the terminating line feed } + I := StrScan(@RcvBuf, #10) - RcvBuf; + if I < 0 then + break; { not found, incomplete line, break loop } + { Replace the line feed by a nul char, truncating the line } + RcvBuf[I] := #0; + { Display the truncated line } + DisplayMemo.Lines.Add('Remote> ' + StrPas(RcvBuf)); + { Restore the line feed } + RcvBuf[I] := #10; + { Was it the last line in the buffer ? } + if I >= (RcvLen - 1) then begin + RcvLen := 0; + break; + end; + { Not the last line, move the next one in front of buffer } + Move(RcvBuf[I + 1], RcvBuf, RcvLen - I); + RcvLen := RcvLen - I - 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is triggered when we - as a server - have received a client } +{ connection request. We must accept the connection. Two cases: we are } +{ already busy with another client, or this is the first client connecting. } +procedure TTWSChatForm.SrvWSocketSessionAvailable(Sender: TObject; Error: Word); +begin + if CliWSocket.State = wsConnected then begin + { We are already busy with a client. Use the TmpWSocket to send a } + { busy message to the second client. Display a message to notify } + { the user that someone is trying to contact him. } + TmpWSocket.HSocket := SrvWSocket.Accept; + DisplayMemo.Lines.Add('System> ' + TmpWSocket.GetPeerAddr + + ' is trying to call you'); + TmpWSocket.SendStr('Busy ! Try later...' + #13#10); + TmpWSocket.Close; + Exit; + end; + + { This is our first client trying to connect, we accept } + CliWSocket.HSocket := SrvWSocket.Accept; + ConnectButton.Enabled := FALSE; + DisconnectButton.Enabled := TRUE; + SendButton.Enabled := TRUE; + MessageEdit.Enabled := TRUE; + DisplayMemo.Lines.Add('Connected with ' + CliWSocket.GetPeerAddr); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The user clicked on the disconnect button. } +procedure TTWSChatForm.DisconnectButtonClick(Sender: TObject); +begin + CliWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The user has clicked on the send button. Just send the data in the edit } +{ box and a CRLF pair to make a complete line. } +procedure TTWSChatForm.SendButtonClick(Sender: TObject); +begin + CliWSocket.SendStr(MessageEdit.Text + #13#10); + DisplayMemo.Lines.Add(' Local> ' + MessageEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.StoppedRadioButtonClick(Sender: TObject); +begin + SrvWSocket.Close; + RunningRadioButton.Checked := FALSE; + StoppedRadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.RunningRadioButtonClick(Sender: TObject); +begin + if SrvWSocket.State <> wsListening then + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Internet/udplstn.dpr b/lib/ics/Delphi/Internet/udplstn.dpr new file mode 100644 index 00000000..455e3c7c --- /dev/null +++ b/lib/ics/Delphi/Internet/udplstn.dpr @@ -0,0 +1,12 @@ +program UdpLstn; + +uses + Forms, + UdpLstn1 in 'UdpLstn1.pas' {MainAutoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMainForm, MainForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Internet/udpsend.dpr b/lib/ics/Delphi/Internet/udpsend.dpr new file mode 100644 index 00000000..547266b2 --- /dev/null +++ b/lib/ics/Delphi/Internet/udpsend.dpr @@ -0,0 +1,12 @@ +program UdpSend; + +uses + Forms, + UdpSend1 in 'UdpSend1.pas' {MainAutoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMainForm, MainForm); + Application.Run; +end. diff --git a/lib/ics/Delphi/Vc/DnsQuery.dcr b/lib/ics/Delphi/Vc/DnsQuery.dcr new file mode 100644 index 00000000..56425e70 Binary files /dev/null and b/lib/ics/Delphi/Vc/DnsQuery.dcr differ diff --git a/lib/ics/Delphi/Vc/FtpSrv.dcr b/lib/ics/Delphi/Vc/FtpSrv.dcr new file mode 100644 index 00000000..8e636858 Binary files /dev/null and b/lib/ics/Delphi/Vc/FtpSrv.dcr differ diff --git a/lib/ics/Delphi/Vc/Pop3Prot.dcr b/lib/ics/Delphi/Vc/Pop3Prot.dcr new file mode 100644 index 00000000..4b41c014 Binary files /dev/null and b/lib/ics/Delphi/Vc/Pop3Prot.dcr differ diff --git a/lib/ics/Delphi/Vc/SmtpProt.dcr b/lib/ics/Delphi/Vc/SmtpProt.dcr new file mode 100644 index 00000000..14fc34ac Binary files /dev/null and b/lib/ics/Delphi/Vc/SmtpProt.dcr differ diff --git a/lib/ics/Delphi/Vc/TNSCRIPT.DCR b/lib/ics/Delphi/Vc/TNSCRIPT.DCR new file mode 100644 index 00000000..3f4d6b81 Binary files /dev/null and b/lib/ics/Delphi/Vc/TNSCRIPT.DCR differ diff --git a/lib/ics/Delphi/Vc/WINSOCK.PAS b/lib/ics/Delphi/Vc/WINSOCK.PAS new file mode 100644 index 00000000..fe5c28a9 --- /dev/null +++ b/lib/ics/Delphi/Vc/WINSOCK.PAS @@ -0,0 +1,634 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE, C.H.R. Citadelle +EMail: francois.piette@pophost.eunet.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: July 18, 1996 +Object: Windows 16bit API Interface Unit for Delphi 1.x and + compatible with Borland Delphi 2.x Winsock +Support: Please ask your question in the following newsgroup: + news://forums.borland.com/borland.public.delphi.vcl.components.using +Legal issues: Copyright (C) 1996, 1997, 1998 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 21, 1997 Added $IFDEF to warn Delphi 2 or 3 user that something is wrong + if they use this file. +Dec 13, 1997 Changed winsocket form 'WINSOCK.DLL' to 'WINSOCK' because Win 3.x + like thos have it without extension (don't ask me why !) + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Winsock; + +interface + +{$IFNDEF VER80} + 'This file is for use with Delphi 1 only. Use the Borland provided file' + 'with any other Delphi Version. If you use this file with Delphi 2 or 3' + 'this is probably because your library path is wrong or you have not' + 'restored the directory structure when unzipping the file (you must use' + 'pkunzip option -d to restore the files).' +{$ENDIF} + + +uses WinTypes, WinProcs; + +const + winsocket = 'WINSOCK'; + { If your application can't find winsock.dll on startup, please try to } + { change the preceding line to "winsocket = 'winsock.dll';" } + { Also, try upper or lower case letters. Win 3.x is very capricious ! } + + { Misc constants } + FD_SETSIZE = 64; + + { + Commands for ioctlsocket(), taken from the BSD file fcntl.h. + + Ioctl's have the command encoded in the lower word, + and the size of any in or out parameters in the upper + word. The high 2 bits of the upper word are used + to encode the in/out status of the parameter; for now + we restrict parameters to at most 128 bytes. + 0x20000000 distinguishes new & old ioctl's + } + IOCPARM_MASK = $7f; { parameters must be < 128 bytes } + IOC_VOID = $20000000; { no parameters } + IOC_OUT = $40000000; { copy out parameters } + IOC_IN = $80000000; { copy in parameters } + IOC_INOUT = (IOC_IN + IOC_OUT); + + FIONREAD = $4004667F; { get # bytes to read } + FIONBIO = $8004667E; { set/clear non-blocking i/o } + FIOASYNC = $8004667D; { set/clear async i/o } + + { Socket I/O Controls } + SIOCSHIWAT = $80047300; { set high watermark } + SIOCGHIWAT = $40047301; { set low watermark } + SIOCSLOWAT = $80047302; { set low watermark } + SIOCGLOWAT = $40047303; { get low watermark } + SIOCATMARK = $40047307; { at oob mark? } + + INADDR_ANY = $00000000; + INADDR_LOOPBACK = $7f000001; + INADDR_BROADCAST = $ffffffff; + INADDR_NONE = $ffffffff; + + WSADESCRIPTION_LEN = 256; + WSASYS_STATUS_LEN = 128; + + { Protocols } + IPPROTO_IP = 0; { dummy for IP } + IPPROTO_ICMP = 1; { control message protocol } + IPPROTO_GGP = 2; { gateway^2 (deprecated) } + IPPROTO_TCP = 6; { tcp } + IPPROTO_PUP = 12; { pup } + IPPROTO_UDP = 17; { user datagram protocol } + IPPROTO_IDP = 22; { xns idp } + IPPROTO_ND = 77; { UNOFFICIAL net disk proto } + IPPROTO_RAW = 255; { raw IP packet } + IPPROTO_MAX = 256; + + { Port/socket numbers: network standard functions } + IPPORT_ANY = 0; + IPPORT_ECHO = 7; + IPPORT_DISCARD = 9; + IPPORT_SYSTAT = 11; + IPPORT_DAYTIME = 13; + IPPORT_NETSTAT = 15; + IPPORT_FTP = 21; + IPPORT_TELNET = 23; + IPPORT_SMTP = 25; + IPPORT_TIMESERVER = 37; + IPPORT_NAMESERVER = 42; + IPPORT_WHOIS = 43; + IPPORT_MTP = 57; + + { Port/socket numbers: host specific functions } + IPPORT_TFTP = 69; + IPPORT_RJE = 77; + IPPORT_FINGER = 79; + IPPORT_TTYLINK = 87; + IPPORT_SUPDUP = 95; + + { UNIX TCP sockets } + IPPORT_EXECSERVER = 512; + IPPORT_LOGINSERVER = 513; + IPPORT_CMDSERVER = 514; + IPPORT_EFSSERVER = 520; + + { UNIX UDP sockets } + IPPORT_BIFFUDP = 512; + IPPORT_WHOSERVER = 513; + IPPORT_ROUTESERVER = 520; + + { Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root) } + IPPORT_RESERVED = 1024; + + { Link numbers } + IMPLINK_IP = 155; + IMPLINK_LOWEXPER = 156; + IMPLINK_HIGHEXPER = 158; + + INVALID_SOCKET = $ffff; + SOCKET_ERROR = (-1); + + { Types } + SOCK_STREAM = 1; { stream socket } + SOCK_DGRAM = 2; { datagram socket } + SOCK_RAW = 3; { raw-protocol interface } + SOCK_RDM = 4; { reliably-delivered message } + SOCK_SEQPACKET = 5; { sequenced packet stream } + + { Option flags per-socket } + SO_DEBUG = $0001; { turn on debugging info recording } + SO_ACCEPTCONN = $0002; { socket has had listen() } + SO_REUSEADDR = $0004; { allow local address reuse } + SO_KEEPALIVE = $0008; { keep connections alive } + SO_DONTROUTE = $0010; { just use interface addresses } + SO_BROADCAST = $0020; { permit sending of broadcast msgs } + SO_USELOOPBACK = $0040; { bypass hardware when possible } + SO_LINGER = $0080; { linger on close if data present } + SO_OOBINLINE = $0100; { leave received OOB data in line } + SO_DONTLINGER = (not SO_LINGER); + + { Additional options } + SO_SNDBUF = $1001; { send buffer size } + SO_RCVBUF = $1002; { receive buffer size } + SO_SNDLOWAT = $1003; { send low-water mark } + SO_RCVLOWAT = $1004; { receive low-water mark } + SO_SNDTIMEO = $1005; { send timeout } + SO_RCVTIMEO = $1006; { receive timeout } + SO_ERROR = $1007; { get error status and clear } + SO_TYPE = $1008; { get socket type } + + + { TCP options } + TCP_NODELAY = $0001; + + { Address families } + AF_UNSPEC = 0; { unspecified } + AF_UNIX = 1; { local to host (pipes, portals) } + AF_INET = 2; { internetwork: UDP, TCP, etc. } + AF_IMPLINK = 3; { arpanet imp addresses } + AF_PUP = 4; { pup protocols: e.g. BSP } + AF_CHAOS = 5; { mit CHAOS protocols } + AF_NS = 6; { XEROX NS protocols } + AF_ISO = 7; { ISO protocols } + AF_OSI = AF_ISO; { OSI is ISO } + AF_ECMA = 8; { european computer manufacturers } + AF_DATAKIT = 9; { datakit protocols } + AF_CCITT = 10; { CCITT protocols, X.25 etc } + AF_SNA = 11; { IBM SNA } + AF_DECnet = 12; { DECnet } + AF_DLI = 13; { Direct data link interface } + AF_LAT = 14; { LAT } + AF_HYLINK = 15; { NSC Hyperchannel } + AF_APPLETALK = 16; { AppleTalk } + AF_NETBIOS = 17; { NetBios-style addresses } + AF_MAX = 18; + + { Protocol families, same as address families for now } + PF_UNSPEC = AF_UNSPEC; + PF_UNIX = AF_UNIX; + PF_INET = AF_INET; + PF_IMPLINK = AF_IMPLINK; + PF_PUP = AF_PUP; + PF_CHAOS = AF_CHAOS; + PF_NS = AF_NS; + PF_ISO = AF_ISO; + PF_OSI = AF_OSI; + PF_ECMA = AF_ECMA; + PF_DATAKIT = AF_DATAKIT; + PF_CCITT = AF_CCITT; + PF_SNA = AF_SNA; + PF_DECnet = AF_DECnet; + PF_DLI = AF_DLI; + PF_LAT = AF_LAT; + PF_HYLINK = AF_HYLINK; + PF_APPLETALK = AF_APPLETALK; + PF_MAX = AF_MAX; + + { Level number for (get/set)sockopt() to apply to socket itself } + SOL_SOCKET = -1; { options for socket level } + + { Maximum queue length specifiable by listen } + SOMAXCONN = 5; + + MSG_OOB = 1; { process out-of-band data } + MSG_PEEK = 2; { peek at incoming message } + MSG_DONTROUTE = 4; { send without using routing tables } + + MSG_MAXIOVLEN = 16; + + { Define constant based on rfc883, used by gethostbyxxxx() calls } + MAXGETHOSTSTRUCT = 1024; + + { Define flags to be used with the WSAAsyncSelect() call } + FD_READ = 1; + FD_WRITE = 2; + FD_OOB = 4; + FD_ACCEPT = 8; + FD_CONNECT = 16; + FD_CLOSE = 32; + + { All Windows Sockets error constants are biased by WSABASEERR fromthe normal } + WSABASEERR = 10000; + + { Windows Sockets definitions of regular Microsoft C error constants } + WSAEINTR = (WSABASEERR+4); + WSAEBADF = (WSABASEERR+9); + WSAEACCES = (WSABASEERR+13); + WSAEFAULT = (WSABASEERR+14); + WSAEINVAL = (WSABASEERR+22); + WSAEMFILE = (WSABASEERR+24); + + { Windows Sockets definitions of regular Berkeley error constants } + WSAEWOULDBLOCK = (WSABASEERR+35); + WSAEINPROGRESS = (WSABASEERR+36); + WSAEALREADY = (WSABASEERR+37); + WSAENOTSOCK = (WSABASEERR+38); + WSAEDESTADDRREQ = (WSABASEERR+39); + WSAEMSGSIZE = (WSABASEERR+40); + WSAEPROTOTYPE = (WSABASEERR+41); + WSAENOPROTOOPT = (WSABASEERR+42); + WSAEPROTONOSUPPORT = (WSABASEERR+43); + WSAESOCKTNOSUPPORT = (WSABASEERR+44); + WSAEOPNOTSUPP = (WSABASEERR+45); + WSAEPFNOSUPPORT = (WSABASEERR+46); + WSAEAFNOSUPPORT = (WSABASEERR+47); + WSAEADDRINUSE = (WSABASEERR+48); + WSAEADDRNOTAVAIL = (WSABASEERR+49); + WSAENETDOWN = (WSABASEERR+50); + WSAENETUNREACH = (WSABASEERR+51); + WSAENETRESET = (WSABASEERR+52); + WSAECONNABORTED = (WSABASEERR+53); + WSAECONNRESET = (WSABASEERR+54); + WSAENOBUFS = (WSABASEERR+55); + WSAEISCONN = (WSABASEERR+56); + WSAENOTCONN = (WSABASEERR+57); + WSAESHUTDOWN = (WSABASEERR+58); + WSAETOOMANYREFS = (WSABASEERR+59); + WSAETIMEDOUT = (WSABASEERR+60); + WSAECONNREFUSED = (WSABASEERR+61); + WSAELOOP = (WSABASEERR+62); + WSAENAMETOOLONG = (WSABASEERR+63); + WSAEHOSTDOWN = (WSABASEERR+64); + WSAEHOSTUNREACH = (WSABASEERR+65); + WSAENOTEMPTY = (WSABASEERR+66); + WSAEPROCLIM = (WSABASEERR+67); + WSAEUSERS = (WSABASEERR+68); + WSAEDQUOT = (WSABASEERR+69); + WSAESTALE = (WSABASEERR+70); + WSAEREMOTE = (WSABASEERR+71); + + { Extended Windows Sockets error constant definitions } + WSASYSNOTREADY = (WSABASEERR+91); + WSAVERNOTSUPPORTED = (WSABASEERR+92); + WSANOTINITIALISED = (WSABASEERR+93); + + { Authoritative Answer: Host not found } + WSAHOST_NOT_FOUND = (WSABASEERR+1001); + HOST_NOT_FOUND = WSAHOST_NOT_FOUND; + +{ Non-Authoritative: Host not found, or SERVERFAIL } + WSATRY_AGAIN = (WSABASEERR+1002); + TRY_AGAIN = WSATRY_AGAIN; + +{ Non recoverable errors, FORMERR, REFUSED, NOTIMP } + WSANO_RECOVERY = (WSABASEERR+1003); + NO_RECOVERY = WSANO_RECOVERY; + +{ Valid name, no data record of requested type } + WSANO_DATA = (WSABASEERR+1004); + NO_DATA = WSANO_DATA; + +{ no address, look for MX record } + WSANO_ADDRESS = WSANO_DATA; + NO_ADDRESS = WSANO_ADDRESS; + +{ Windows Sockets errors redefined as regular Berkeley error constants } + EWOULDBLOCK = WSAEWOULDBLOCK; + EINPROGRESS = WSAEINPROGRESS; + EALREADY = WSAEALREADY; + ENOTSOCK = WSAENOTSOCK; + EDESTADDRREQ = WSAEDESTADDRREQ; + EMSGSIZE = WSAEMSGSIZE; + EPROTOTYPE = WSAEPROTOTYPE; + ENOPROTOOPT = WSAENOPROTOOPT; + EPROTONOSUPPORT = WSAEPROTONOSUPPORT; + ESOCKTNOSUPPORT = WSAESOCKTNOSUPPORT; + EOPNOTSUPP = WSAEOPNOTSUPP; + EPFNOSUPPORT = WSAEPFNOSUPPORT; + EAFNOSUPPORT = WSAEAFNOSUPPORT; + EADDRINUSE = WSAEADDRINUSE; + EADDRNOTAVAIL = WSAEADDRNOTAVAIL; + ENETDOWN = WSAENETDOWN; + ENETUNREACH = WSAENETUNREACH; + ENETRESET = WSAENETRESET; + ECONNABORTED = WSAECONNABORTED; + ECONNRESET = WSAECONNRESET; + ENOBUFS = WSAENOBUFS; + EISCONN = WSAEISCONN; + ENOTCONN = WSAENOTCONN; + ESHUTDOWN = WSAESHUTDOWN; + ETOOMANYREFS = WSAETOOMANYREFS; + ETIMEDOUT = WSAETIMEDOUT; + ECONNREFUSED = WSAECONNREFUSED; + ELOOP = WSAELOOP; + ENAMETOOLONG = WSAENAMETOOLONG; + EHOSTDOWN = WSAEHOSTDOWN; + EHOSTUNREACH = WSAEHOSTUNREACH; + ENOTEMPTY = WSAENOTEMPTY; + EPROCLIM = WSAEPROCLIM; + EUSERS = WSAEUSERS; + EDQUOT = WSAEDQUOT; + ESTALE = WSAESTALE; + EREMOTE = WSAEREMOTE; + +type + { Basic system type definitions, taken from the BSD file sys/types.h. } + u_char = byte; + u_short = word; + u_int = word; + u_long = longint; + short = word; + + { low level handle wich refer to sockets } + TSocket = u_int; + + { Select uses arrays of SOCKETs. } + TFDSet = packed record + fd_count : u_short; + fd_array : array [0..(FD_SETSIZE - 1)] of TSocket; + end; + PFDSet = ^TFDSet; + + { Structure used in select() call, taken from the BSD file sys/time.h. } + TTimeVal = packed record + tv_sec : longint; + tv_usec : longint; + end; + PTimeVal = ^TTimeVal; + + { Structures returned by network data base library, taken from the + BSD file netdb.h. All addresses are supplied in host order, and + returned in network order (suitable for use in system calls). } + + HostEnt = record + h_name : PChar; { official name of host } + h_aliases : ^PChar; { alias list } + h_addrtype : short; { host address type } + h_length : short; { length of address } + h_addr_list : ^PChar; { list of addresses } + end; + PHostEnt = ^HostEnt; + + NetEnt = record + n_name : PChar; { official name of net } + n_aliases : ^PChar; { alias list } + n_addrtype : short; { net address type } + n_net : u_long; { network # } + end; + PNetEnt = ^NetEnt; + + ServEnt = record + s_name : PChar; { official service name } + s_aliases : ^PChar; { alias list } + s_port : integer; { port # } + s_proto : PChar; { protocol to use } + end; + PServEnt = ^ServEnt; + + Protoent = record + p_name : PChar; { official protocol name } + p_aliases : ^PChar; { alias list } + p_proto : integer; { protocol # } + end; + Pprotoent = ^protoent; + + { Internet address (old style... should be updated) } + SunB = packed record + s_b1, s_b2, s_b3, s_b4: u_char; + end; + + SunW = packed record + s_w1, s_w2: u_short; + end; + + TInAddr = packed record + case integer of + 0: (S_un_b: SunB); + 1: (S_un_w: SunW); + 2: (S_addr: u_long); + end; + PInAddr = ^TInAddr; + + { Socket address, internet style. } + TSockAddrIn = packed record + case integer of + 0: (sin_family : u_short; + sin_port : u_short; + sin_addr : TInAddr; + sin_zero : array[0..7] of char); + 1: (sa_family: u_short; + sa_data: array [0..13] of char); + end; + PSockAddrIn = ^TSockAddrIn; + TSockAddr = TSockAddrIn; + + PWSADATA = ^TWSADATA; + TWSADATA = packed record + wVersion : word; + wHighVersion : word; + szDescription : array [0..WSADESCRIPTION_LEN] of char; + szSystemStatus : array [0..WSASYS_STATUS_LEN] of char; + iMaxSockets : u_short; + iMaxUdpDg : u_short; + lpVendorInfo : PChar; + end; + + { Structure used by kernel to pass protocol information in raw sockets. } + TSockProto = packed record + sp_family : u_short; + sp_protocol : u_short; + end; + + { Structure used for manipulating linger option. } + TLinger = packed record + l_onoff : u_short; + l_linger : u_short; + end; + +{ Socket function prototypes } + +function accept(s: TSocket; var addr: TSockAddr; var addrlen: Integer): TSocket; +function bind(s: TSocket; var addr: TSockAddr; namelen: Integer): Integer; +function closesocket(s: TSocket): Integer; +function connect(s: TSocket; var name: TSockAddr; namelen: Integer): Integer; +function ioctlsocket(s: TSocket; cmd: Longint; var arg: u_long): Integer; +function getpeername(s: TSocket; var name: TSockAddr; var namelen: Integer): Integer; +function getsockname(s: TSocket; var name: TSockAddr; var namelen: Integer): Integer; +function getsockopt(s: TSocket; level, optname: Integer; optval: PChar; var optlen: Integer): Integer; +function htonl(hostlong: u_long): u_long; +function htons(hostshort: u_short): u_short; +function inet_addr(cp: PChar): u_long; +function inet_ntoa(inaddr: TInAddr): PChar; +function listen(s: TSocket; backlog: Integer): Integer; +function ntohl(netlong: u_long): u_long; +function ntohs(netshort: u_short): u_short; +function recv(s: TSocket; var Buf; len, flags: Integer): Integer; +function recvfrom(s: TSocket; var Buf; len, flags: Integer; + var from: TSockAddr; var fromlen: Integer): Integer; +function select(nfds: Integer; readfds, writefds, exceptfds: PFDSet; + timeout: PTimeVal): Longint; +function send(s: TSocket; var Buf; len, flags: Integer): Integer; +function sendto(s: TSocket; var Buf; len, flags: Integer; var addrto: TSockAddr; + tolen: Integer): Integer; +function setsockopt(s: TSocket; level, optname: Integer; optval: PChar; + optlen: Integer): Integer; +function shutdown(s: TSocket; how: Integer): Integer; +function socket(af, struct, protocol: Integer): TSocket; +function gethostbyaddr(addr: Pointer; len, struct: Integer): PHostEnt; +function gethostbyname(name: PChar): PHostEnt; +function gethostname(name: PChar; len: Integer): Integer; +function getservbyport(port: Integer; proto: PChar): PServEnt; +function getservbyname(name, proto: PChar): PServEnt; +function getprotobynumber(proto: Integer): PProtoEnt; +function getprotobyname(name: PChar): PProtoEnt; +function WSAStartup(wVersionRequired: word; var WSData: TWSAData): Integer; +function WSACleanup: Integer; +procedure WSASetLastError(iError: Integer); +function WSAGetLastError: Integer; +function WSAIsBlocking: BOOL; +function WSAUnhookBlockingHook: Integer; +function WSASetBlockingHook(lpBlockFunc: TFarProc): TFarProc; +function WSACancelBlockingCall: Integer; +function WSAAsyncGetServByName(HWindow: HWND; wMsg: u_int; + name, proto, buf: PChar; buflen: Integer): THandle; +function WSAAsyncGetServByPort( HWindow: HWND; wMsg, port: u_int; + proto, buf: PChar; buflen: Integer): THandle; +function WSAAsyncGetProtoByName(HWindow: HWND; wMsg: u_int; + name, buf: PChar; buflen: Integer): THandle; +function WSAAsyncGetProtoByNumber(HWindow: HWND; wMsg: u_int; number: Integer; + buf: PChar; buflen: Integer): THandle; +function WSAAsyncGetHostByName(HWindow: HWND; wMsg: u_int; + name, buf: PChar; buflen: Integer): THandle; +function WSAAsyncGetHostByAddr(HWindow: HWND; wMsg: u_int; addr: PChar; + len, struct: Integer; buf: PChar; buflen: Integer): THandle; +function WSACancelAsyncRequest(hAsyncTaskHandle: THandle): Integer; +function WSAAsyncSelect(s: TSocket; HWindow: HWND; wMsg: u_int; lEvent: Longint): Integer; +function WSARecvEx(s: TSocket; var buf; len: Integer; var flags: Integer): Integer; +function WSAMakeSyncReply(Buflen, Error: Word): Longint; +function WSAMakeSelectReply(Event, Error: Word): Longint; +function WSAGetAsyncBuflen(Param: Longint): Word; +function WSAGetAsyncError(Param: Longint): Word; +function WSAGetSelectEvent(Param: Longint): Word; +function WSAGetSelectError(Param: Longint): Word; + + +implementation + +function WSAMakeSyncReply; +begin + WSAMakeSyncReply:= MakeLong(Buflen, Error); +end; + +function WSAMakeSelectReply; +begin + WSAMakeSelectReply:= MakeLong(Event, Error); +end; + +function WSAGetAsyncBuflen; +begin + WSAGetAsyncBuflen:= LOWORD(Param); +end; + +function WSAGetAsyncError; +begin + WSAGetAsyncError:= HIWORD(Param); +end; + +function WSAGetSelectEvent; +begin + WSAGetSelectEvent:= LOWORD(Param); +end; + +function WSAGetSelectError; +begin + WSAGetSelectError:= HIWORD(Param); +end; + +function accept; external winsocket name 'accept'; +function bind; external winsocket name 'bind'; +function closesocket; external winsocket name 'closesocket'; +function connect; external winsocket name 'connect'; +function getpeername; external winsocket name 'getpeername'; +function getsockname; external winsocket name 'getsockname'; +function getsockopt; external winsocket name 'getsockopt'; +function htonl; external winsocket name 'htonl'; +function htons; external winsocket name 'htons'; +function inet_addr; external winsocket name 'inet_addr'; +function inet_ntoa; external winsocket name 'inet_ntoa'; +function ioctlsocket; external winsocket name 'ioctlsocket'; +function listen; external winsocket name 'listen'; +function ntohl; external winsocket name 'ntohl'; +function ntohs; external winsocket name 'ntohs'; +function recv; external winsocket name 'recv'; +function recvfrom; external winsocket name 'recvfrom'; +function select; external winsocket name 'select'; +function send; external winsocket name 'send'; +function sendto; external winsocket name 'sendto'; +function setsockopt; external winsocket name 'setsockopt'; +function shutdown; external winsocket name 'shutdown'; +function socket; external winsocket name 'socket'; + +function gethostbyaddr; external winsocket name 'gethostbyaddr'; +function gethostbyname; external winsocket name 'gethostbyname'; +function getprotobyname; external winsocket name 'getprotobyname'; +function getprotobynumber; external winsocket name 'getprotobynumber'; +function getservbyname; external winsocket name 'getservbyname'; +function getservbyport; external winsocket name 'getservbyport'; +function gethostname; external winsocket name 'gethostname'; + +function WSAAsyncSelect; external winsocket name 'WSAAsyncSelect'; +function WSARecvEx; external winsocket name 'WSARecvEx'; +function WSAAsyncGetHostByAddr; external winsocket name 'WSAAsyncGetHostByAddr'; +function WSAAsyncGetHostByName; external winsocket name 'WSAAsyncGetHostByName'; +function WSAAsyncGetProtoByNumber; external winsocket name 'WSAAsyncGetProtoByNumber'; +function WSAAsyncGetprotoByName; external winsocket name 'WSAAsyncGetprotoByName'; +function WSAAsyncGetServByPort; external winsocket name 'WSAAsyncGetServByPort'; +function WSAAsyncGetServByName; external winsocket name 'WSAAsyncGetServByName'; +function WSACancelAsyncRequest; external winsocket name 'WSACancelAsyncRequest'; +function WSASetBlockingHook; external winsocket name 'WSASetBlockingHook'; +function WSAUnhookBlockingHook; external winsocket name 'WSAUnhookBlockingHook'; +function WSAGetLastError; external winsocket name 'WSAGetLastError'; +procedure WSASetLastError; external winsocket name 'WSASetLastError'; +function WSACancelBlockingCall; external winsocket name 'WSACancelBlockingCall'; +function WSAIsBlocking; external winsocket name 'WSAIsBlocking'; +function WSAStartup; external winsocket name 'WSAStartup'; +function WSACleanup; external winsocket name 'WSACleanup'; + +end. + diff --git a/lib/ics/Delphi/Vc/emulvt.dcr b/lib/ics/Delphi/Vc/emulvt.dcr new file mode 100644 index 00000000..b6f27127 Binary files /dev/null and b/lib/ics/Delphi/Vc/emulvt.dcr differ diff --git a/lib/ics/Delphi/Vc/fingcli.dcr b/lib/ics/Delphi/Vc/fingcli.dcr new file mode 100644 index 00000000..8844962c Binary files /dev/null and b/lib/ics/Delphi/Vc/fingcli.dcr differ diff --git a/lib/ics/Delphi/Vc/ftpcli.dcr b/lib/ics/Delphi/Vc/ftpcli.dcr new file mode 100644 index 00000000..09979fd4 Binary files /dev/null and b/lib/ics/Delphi/Vc/ftpcli.dcr differ diff --git a/lib/ics/Delphi/Vc/httpprot.dcr b/lib/ics/Delphi/Vc/httpprot.dcr new file mode 100644 index 00000000..60d9005c Binary files /dev/null and b/lib/ics/Delphi/Vc/httpprot.dcr differ diff --git a/lib/ics/Delphi/Vc/httpsrv.dcr b/lib/ics/Delphi/Vc/httpsrv.dcr new file mode 100644 index 00000000..1018b99f Binary files /dev/null and b/lib/ics/Delphi/Vc/httpsrv.dcr differ diff --git a/lib/ics/Delphi/Vc/mbxfile.dcr b/lib/ics/Delphi/Vc/mbxfile.dcr new file mode 100644 index 00000000..98b63deb Binary files /dev/null and b/lib/ics/Delphi/Vc/mbxfile.dcr differ diff --git a/lib/ics/Delphi/Vc/mimedec.dcr b/lib/ics/Delphi/Vc/mimedec.dcr new file mode 100644 index 00000000..27cfe51e Binary files /dev/null and b/lib/ics/Delphi/Vc/mimedec.dcr differ diff --git a/lib/ics/Delphi/Vc/nntpcli.dcr b/lib/ics/Delphi/Vc/nntpcli.dcr new file mode 100644 index 00000000..5e5113b0 Binary files /dev/null and b/lib/ics/Delphi/Vc/nntpcli.dcr differ diff --git a/lib/ics/Delphi/Vc/tncnx.dcr b/lib/ics/Delphi/Vc/tncnx.dcr new file mode 100644 index 00000000..897c60e7 Binary files /dev/null and b/lib/ics/Delphi/Vc/tncnx.dcr differ diff --git a/lib/ics/Delphi/Vc/tnemulvt.dcr b/lib/ics/Delphi/Vc/tnemulvt.dcr new file mode 100644 index 00000000..6a5efeb6 Binary files /dev/null and b/lib/ics/Delphi/Vc/tnemulvt.dcr differ diff --git a/lib/ics/Delphi/Vc/wait.dcr b/lib/ics/Delphi/Vc/wait.dcr new file mode 100644 index 00000000..ea366f9b Binary files /dev/null and b/lib/ics/Delphi/Vc/wait.dcr differ diff --git a/lib/ics/Delphi/Vc/wsocket.dcr b/lib/ics/Delphi/Vc/wsocket.dcr new file mode 100644 index 00000000..a536b4e9 Binary files /dev/null and b/lib/ics/Delphi/Vc/wsocket.dcr differ diff --git a/lib/ics/Delphi/Vc/wsockets.dcr b/lib/ics/Delphi/Vc/wsockets.dcr new file mode 100644 index 00000000..ee027a85 Binary files /dev/null and b/lib/ics/Delphi/Vc/wsockets.dcr differ diff --git a/lib/ics/Delphi/Vc32/DnsQuery.dcr b/lib/ics/Delphi/Vc32/DnsQuery.dcr new file mode 100644 index 00000000..04b26c73 Binary files /dev/null and b/lib/ics/Delphi/Vc32/DnsQuery.dcr differ diff --git a/lib/ics/Delphi/Vc32/DnsQuery.dcu b/lib/ics/Delphi/Vc32/DnsQuery.dcu new file mode 100644 index 00000000..41f75573 Binary files /dev/null and b/lib/ics/Delphi/Vc32/DnsQuery.dcu differ diff --git a/lib/ics/Delphi/Vc32/DnsQuery.pas b/lib/ics/Delphi/Vc32/DnsQuery.pas new file mode 100644 index 00000000..8afdd967 --- /dev/null +++ b/lib/ics/Delphi/Vc32/DnsQuery.pas @@ -0,0 +1,1046 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Component to query DNS records. + Implement a subset of RFC 1035 (A and MX records). +Creation: January 29, 1999 +Version: 1.03 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Feb 14, 1999 V0.02 Indirectly call winsock functions using wsocket because + wsocket provide runtime dynamic link instead of loadtime link. + This allows a program to use DnsQuery if it discover that winsock + is installed and still run if winsock is not installed. +Feb 24, 1999 V1.00 Added code for reverse lookup (PTR record). +Mar 07, 1999 V1.01 Adapted for Delphi 1 +Aug 20, 1999 V1.02 Revise compile time option. Adapted for BCB4 +Jul 27, 2001 V1.03 Holger Lembke implemented a few new + queries or propreties (QueryAny, LongLatToDMS, Loc2Geo, Loc) + and related data types. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit DnsQuery; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$R-} { Disable range checking } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Winsock, WSocket; + +const + DnsQueryVersion = 102; + CopyRight : String = ' TDnsQuery (c) 1999-2000 F. Piette V1.02 '; + + { Maximum answers (responses) count } + MAX_ANCOUNT = 50; + { Maximum number of MX records taken into account in responses } + MAX_MX_RECORDS = 50; + MAX_A_RECORDS = 50; + MAX_PTR_RECORDS = 10; + + { DNS Classes } + DnsClassIN = 1; { The internet } + DnsClassCS = 2; { The CSNET class (obsolete, used only for examples)} + DnsClassCH = 3; { The CHAOS class } + DnsClassHS = 4; { Hesiod name service } + DnsClassALL = 255; { Any class } + + { Type of query/response a DNS can handle } + DnsQueryA = 1; { A HostAddress } + DnsQueryNS = 2; { NS Authoritative name server } + DnsQueryMD = 3; { MD MailDestination, obsolete, use Mail Exchange } + DnsQueryMF = 4; { MF MailForwarder, obsolete, use Mail Exchange } + DnsQueryCNAME = 5; { CNAME CanonicalName } + DnsQuerySOA = 6; { SOA Start of a Zone of Authority } + DnsQueryMB = 7; { MB MailBox, experimental } + DnsQueryMG = 8; { MG MailGroup, experimental } + DnsQueryMR = 9; { MR MailRename, experimental } + DnsQueryNULL = 10; { NULL Experimental } + DnsQueryWKS = 11; { WKS Well Known Service Description } + DnsQueryPTR = 12; { PTR Domain Name Pointer } + DnsQueryHINFO = 13; { HINFO Host Information } + DnsQueryMINFO = 14; { MINFO Mailbox information } + DnsQueryMX = 15; { MX Mail Exchange } + DnsQueryTXT = 16; { TXT Text Strings } + { !!KAP!! } + DnsQueryRP = 17; + DnsQueryAFSDB = 18; + DnsQueryX25 = 19; + DnsQueryISDN = 20; + DnsQueryRT = 21; + DnsQueryNSAP = 22; + DnsQueryNSAPPTR = 23; + DnsQuerySIG = 24; { see RFC-2065 } + DnsQueryKEY = 25; { see RFC-2065 } + DnsQueryPX = 26; + DnsQueryGPOS = 27; { GPOS has the following format: + GPOS } + DnsQueryAAAA = 28; { see IP6 Address } + DnsQueryLOC = 29; (* see RFC-1876 http://rfc.net/rfc1876.html + LOC ( d1 [m1 [s1]] {"N"|"S"} d2 [m2 [s2]] + {"E"|"W"} alt["m"] [siz["m"] [hp["m"] + [vp["m"]]]] ) + *) + DnsQueryNXT = 30; { see RFC-2065 } + + DnsQuerySRV = 33; { see RFC-2052 } + DnsQueryNAPTR = 35; { see RFC-2168 } + DnsQueryKX = 36; + + { Some additional type only allowed in queries } + DnsQueryAXFR = 252; { Transfer for an entire zone } + DnsQueryMAILB = 253; { Mailbox related records (MB, MG or MR) } + DnsQueryMAILA = 254; { MailAgent, obsolete, use MX instead } + DnsQueryALL = 255; { Request ALL records } + + { Opcode field in query flags } + DnsOpCodeQUERY = 0; + DnsOpCodeIQUERY = 1; + DnsOpCodeSTATUS = 2; + +type + TDnsAnswerNameArray = packed array [0..MAX_ANCOUNT - 1] of String; + TDnsAnswerTypeArray = packed array [0..MAX_ANCOUNT - 1] of Integer; + TDnsAnswerClassArray = packed array [0..MAX_ANCOUNT - 1] of Integer; + TDnsAnswerTTLArray = packed array [0..MAX_ANCOUNT - 1] of LongInt; + TDnsAnswerTagArray = packed array [0..MAX_ANCOUNT - 1] of Integer; + TDnsMXPreferenceArray = packed array [0..MAX_MX_RECORDS - 1] of Integer; + TDnsMXExchangeArray = packed array [0..MAX_MX_RECORDS - 1] of String; + TDnsAddressArray = packed array [0..MAX_A_RECORDS - 1] of TInAddr; + TDnsHostnameArray = packed array [0..MAX_PTR_RECORDS - 1] of String; + + TDnsRequestDoneEvent = procedure (Sender : TObject; Error : WORD) of Object; + TDnsRequestHeader = packed record + ID : WORD; + Flags : WORD; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD; + end; + PDnsRequestHeader = ^TDnsRequestHeader; + + TLOCInfo = packed record { need to be 16 bytes } + version : byte; + size : byte; + horizpre : byte; + vertpre : byte; + latitude : longint; + longitude : longint; + altitude : longint; + end; + PLOCInfo = ^TLOCInfo; + + { Decoded TLOCInfo } + TLogGeo = record + version : byte; + longsize : integer; + latsize : integer; + horizpre : integer; + vertpre : integer; + { Latitude, degree, minutes, seconds, milliseconds } + lad, lam, las, lams : integer; + lahem : char; + { same for Longitude } + lod, lom, los, loms : integer; + lohem : char; + altitude : integer; + end; + + TDnsQuery = class(TComponent) + private + { Dclarations prives } + protected + FWSocket : TWSocket; + FPort : String; + FAddr : String; + FIDCount : WORD; + FQueryBuf : array [0..511] of char; + FQueryLen : Integer; + FResponseBuf : array [0..511] of char; + FResponseLen : Integer; + FResponseID : Integer; + FResponseCode : Integer; + FResponseOpCode : Integer; + FResponseAuthoritative : Boolean; + FResponseTruncation : Boolean; + FResponseRecursionAvailable : Boolean; + FResponseQDCount : Integer; + FResponseANCount : Integer; + FResponseNSCount : Integer; + FResponseARCount : Integer; + FQuestionType : Integer; + FQuestionClass : Integer; + FQuestionName : String; + FAnswerNameArray : TDnsAnswerNameArray; + FAnswerTypeArray : TDnsAnswerTypeArray; + FAnswerClassArray : TDnsAnswerClassArray; + FAnswerTTLArray : TDnsAnswerTTLArray; + FAnswerTagArray : TDnsAnswerTagArray; + FMXRecordCount : Integer; + FMXPreferenceArray : TDnsMXPreferenceArray; { For MX request } + FMXExchangeArray : TDnsMXExchangeArray; { For MX request } + FARecordCount : Integer; + FAddressArray : TDnsAddressArray; { For A request } + FPTRRecordCount : Integer; + FHostnameArray : TDnsHostnameArray; { For PTR request } + FOnRequestDone : TDnsRequestDoneEvent; + + { !!KAP!! } + fLOCInfo : TLOCInfo; + + function GetMXPreference(nIndex : Integer) : Integer; + function GetMXExchange(nIndex : Integer) : String; + function GetAnswerName(nIndex : Integer) : String; + function GetAnswerType(nIndex : Integer) : Integer; + function GetAnswerClass(nIndex : Integer) : Integer; + function GetAnswerTTL(nIndex : Integer) : LongInt; + function GetAnswerTag(nIndex : Integer) : Integer; + function GetAddress(nIndex : Integer) : TInAddr; + function GetHostname(nIndex : Integer) : String; + procedure BuildRequestHeader(Dst : PDnsRequestHeader; + ID : WORD; + OPCode : BYTE; + Recursion : Boolean; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD); virtual; + function BuildQuestionSection(Dst : PChar; + const QName : String; + QType : WORD; + QClass : WORD) : Integer; virtual; + procedure WSocketDataAvailable(Sender: TObject; Error: WORD); virtual; + procedure TriggerRequestDone(Error: WORD); virtual; + function GetResponseBuf : PChar; + procedure SendQuery; + function ExtractName(Base : PChar; + From : PChar; + var Name : String) : PChar; + function DecodeQuestion(Base : PChar; + From : PChar; + var Name : String; + var QType : Integer; + var QClass : Integer) : PChar; + function DecodeAnswer(Base : PChar; + From : PChar; + var Name : String; + var QType : Integer; + var QClass : Integer; + var TTL : LongInt; + var RDataPtr : Pointer; + var RDataLen : Integer) : PChar; + function DecodeMXData(Base : PChar; + From : PChar; + var Preference : Integer; + var Exchange : String) : PChar; + function DecodeAData(Base : PChar; + From : PChar; + var Address : TInAddr) : PChar; + function DecodePTRData(Base : PChar; + From : PChar; + var Hostname : String) : PChar; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure Notification(AComponent: TComponent; operation: TOperation); override; + function MXLookup(Domain : String) : Integer; + function ALookup(Host : String) : Integer; + function PTRLookup(IP : String) : Integer; + { !!KAP!! } + function QueryAny(Host : String; QNumber : Integer) : Integer; + + property ResponseID : Integer read FResponseID; + property ResponseCode : Integer read FResponseCode; + property ResponseOpCode : Integer read FResponseOpCode; + property ResponseAuthoritative : Boolean read FResponseAuthoritative; + property ResponseTruncation : Boolean read FResponseTruncation; + property ResponseRecursionAvailable : Boolean read FResponseRecursionAvailable; + property ResponseQDCount : Integer read FResponseQDCount; + property ResponseANCount : Integer read FResponseANCount; + property ResponseNSCount : Integer read FResponseNSCount; + property ResponseARCount : Integer read FResponseARCount; + property ResponseBuf : PChar read GetResponseBuf; + property ResponseLen : Integer read FResponseLen; + property QuestionType : Integer read FQuestionType; + property QuestionClass : Integer read FQuestionClass; + property QuestionName : String read FQuestionName; + property AnswerName[nIndex : Integer] : String read GetAnswerName; + property AnswerType[nIndex : Integer] : Integer read GetAnswerType; + property AnswerClass[nIndex : Integer] : Integer read GetAnswerClass; + property AnswerTTL[nIndex : Integer] : LongInt read GetAnswerTTL; + property AnswerTag[nIndex : Integer] : Integer read GetAnswerTag; + property MXPreference[nIndex : Integer] : Integer read GetMXPreference; + property MXExchange[nIndex : Integer] : String read GetMXExchange; + property Address[nIndex : Integer] : TInAddr read GetAddress; + property Hostname[nIndex : Integer] : String read GetHostname; + + { !!KAP!! } + property Loc : TLOCInfo read fLOCInfo; + published + property Port : String read FPort write FPort; + property Addr : String read FAddr write FAddr; + property OnRequestDone : TDnsRequestDoneEvent read FOnRequestDone + write FOnRequestDone; + end; + + +function ReverseIP(const IP : String) : String; +function LongLatToDMS(longlat : longint; hemis : String) : String; { !!KAP!! } +function Loc2Geo(loc : TLOCInfo) : TLogGeo; { !!KAP!! } +procedure Register; + +implementation + +type + PWORD = ^WORD; + PDWORD = ^DWORD; + + + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function ReverseIP(const IP : String) : String; +var + I, J : Integer; +begin + Result := ''; + if Length(IP) = 0 then + Exit; + J := Length(IP); + I := J; + while I >= 0 do begin + if (I = 0) or (IP[I] = '.') then begin + Result := Result + '.' + Copy(IP, I + 1, J - I); + J := I - 1; + end; + Dec(I); + end; + if Result[1] = '.' then + Delete(Result, 1, 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TDnsQuery]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TDnsQuery.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWSocket := TWSocket.Create(nil); + FPort := '53'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TDnsQuery.Destroy; +begin + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.Notification(AComponent: TComponent; operation: TOperation); +begin + inherited Notification(AComponent, operation); + if operation = opRemove then begin + if AComponent = FWSocket then + FWSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetMXPreference(nIndex : Integer) : Integer; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FMXPreferenceArray)) or + (nIndex > High(FMXPreferenceArray)) then + Result := 0 + else + Result := FMXPreferenceArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetMXExchange(nIndex : Integer) : String; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FMXExchangeArray)) or + (nIndex > High(FMXExchangeArray)) then + Result := '' + else + Result := FMXExchangeArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAnswerName(nIndex : Integer) : String; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAnswerNameArray)) or + (nIndex > High(FAnswerNameArray)) then + Result := '' + else + Result := FAnswerNameArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAnswerType(nIndex : Integer) : Integer; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAnswerTypeArray)) or + (nIndex > High(FAnswerTypeArray)) then + Result := 0 + else + Result := FAnswerTypeArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAnswerClass(nIndex : Integer) : Integer; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAnswerClassArray)) or + (nIndex > High(FAnswerClassArray)) then + Result := 0 + else + Result := FAnswerClassArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAnswerTTL(nIndex : Integer) : LongInt; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAnswerTTLArray)) or + (nIndex > High(FAnswerTTLArray)) then + Result := 0 + else + Result := FAnswerTTLArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAnswerTag(nIndex : Integer) : Integer; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAnswerTagArray)) or + (nIndex > High(FAnswerTagArray)) then + Result := 0 + else + Result := FAnswerTagArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetAddress(nIndex : Integer) : TInAddr; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FAddressArray)) or + (nIndex > High(FAddressArray)) then + Result.S_addr := 0 + else + Result := FAddressArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetHostname(nIndex : Integer) : String; +begin + { Silently ignore index out of bounds error } + if (nIndex < Low(FHostnameArray)) or + (nIndex > High(FHostnameArray)) then + Result := '' + else + Result := FHostnameArray[nIndex]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.GetResponseBuf : PChar; +begin + Result := @FResponseBuf; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.MXLookup(Domain : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Domain, DnsQueryMX, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.ALookup(Host : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Host, DnsQueryA, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ !!KAP!! } +function TDnsQuery.QueryAny(Host : String; QNumber : integer) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], Host, QNumber, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.PTRLookup(IP : String) : Integer; +begin + Inc(FIDCount); + BuildRequestHeader(PDnsRequestHeader(@FQueryBuf), FIDCount, DnsOpCodeQuery, TRUE, 1, 0, 0, 0); + FQueryLen := BuildQuestionSection(@FQueryBuf[SizeOf(TDnsRequestHeader)], + ReverseIP(IP) + '.in-addr.arpa', + DnsQueryPTR, DnsClassIN); + FQueryLen := FQueryLen + SizeOf(TDnsRequestHeader); + Result := FIDCount; + SendQuery; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.SendQuery; +begin + FResponseLen := -1; + FWSocket.OnDataAvailable := nil; + FWSocket.Abort; + FWSocket.OnDataAvailable := WSocketDataAvailable; + FWSocket.Proto := 'udp'; + FWSocket.Port := FPort; + FWSocket.Addr := FAddr; + FWSocket.Connect; + FWSocket.Send(@FQueryBuf, FQueryLen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.BuildQuestionSection( + Dst : PChar; + const QName : String; + QType : WORD; + QClass : WORD) : Integer; +var + I : Integer; + p : PChar; + Ptr : PChar; +begin + Ptr := Dst; + if Ptr = nil then begin + Result := 0; + Exit; + end; + I := 1; + while I <= Length(QName) do begin + p := Ptr; + Inc(Ptr); + while (I <= Length(QName)) and (QName[I] <> '.') do begin + Ptr^ := QName[I]; + Inc(Ptr); + Inc(I); + end; + p^ := Chr(Ptr - p - 1); + Inc(I); + end; + Ptr^ := #0; + Inc(Ptr); + PWORD(Ptr)^ := htons(QType); + Inc(Ptr, 2); + PWORD(Ptr)^ := htons(QClass); + Inc(Ptr, 2); + Result := Ptr - Dst; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.BuildRequestHeader( + Dst : PDnsRequestHeader; + ID : WORD; + OPCode : BYTE; + Recursion : Boolean; + QDCount : WORD; + ANCount : WORD; + NSCount : WORD; + ARCount : WORD); +begin + if Dst = nil then + Exit; + Dst^.ID := htons(ID); + Dst^.Flags := htons((OpCode shl 11) + (Ord(Recursion) shl 8)); + Dst^.QDCount := htons(QDCount); + Dst^.ANCount := htons(ANCount); + Dst^.NSCount := htons(NSCount); + Dst^.ARCount := htons(ARCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.TriggerRequestDone(Error: WORD); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsQuery.WSocketDataAvailable(Sender: TObject; Error: WORD); +var + Len : Integer; + Ans : PDnsRequestHeader; + Flags : Integer; + P : PChar; + RDataPtr : Pointer; + RDataLen : Integer; + I : Integer; +begin + Ans := PDnsRequestHeader(@FResponseBuf); + Len := FWSocket.Receive(Ans, SizeOf(FResponseBuf)); + if Error <> 0 then begin + TriggerRequestDone(Error); + Exit; + end; + { Check for minimum response length } + if Len < SizeOf(TDnsRequestHeader) then + Exit; + Flags := WSocket_ntohs(Ans^.Flags); + { Check if we got a response } + if (Flags and $8000) = 0 then + Exit; + FResponseLen := Len; + { Decode response header } + FResponseID := WSocket_ntohs(Ans^.ID); + FResponseCode := Flags and $000F; + FResponseOpCode := (Flags shr 11) and $000F; + FResponseAuthoritative := (Flags and $0400) = $0400; + FResponseTruncation := (Flags and $0200) = $0200; + FResponseRecursionAvailable := (Flags and $0080) = $0080; + FResponseQDCount := WSocket_ntohs(Ans^.QDCount); + FResponseANCount := WSocket_ntohs(Ans^.ANCount); + FResponseNSCount := WSocket_ntohs(Ans^.NSCount); + FResponseARCount := WSocket_ntohs(Ans^.ARCount); + + P := @ResponseBuf[SizeOf(TDnsRequestHeader)]; + if FResponseQDCount = 0 then begin + { I don't think we could receive 0 questions } + FQuestionName := ''; + FQuestionType := 0; + FQuestionClass := 0; + end + else begin + { Should never be greater than 1 because we sent only one question } + P := DecodeQuestion(@FResponseBuf, P, + FQuestionName, FQuestionType, FQuestionClass); + end; + if FResponseANCount = 0 then begin + RDataPtr := nil; + RDataLen := 0; + FMXRecordCount := 0; + FARecordCount := 0; + FPTRRecordCount := 0; + end + else begin + FMXRecordCount := 0; + FARecordCount := 0; + FPTRRecordCount := 0; + for I := 0 to FResponseANCount - 1 do begin + P := DecodeAnswer(@FResponseBuf, P, + FAnswerNameArray[I], FAnswerTypeArray[I], + FAnswerClassArray[I], FAnswerTTLArray[I], + RDataPtr, RDataLen); + FAnswerTagArray[I] := -1; + case FAnswerTypeArray[I] of + DnsQueryMX: + begin + if FMXRecordCount <= High(FMXPreferenceArray) then begin + FAnswerTagArray[I] := FMXRecordCount; + DecodeMXData(@FResponseBuf, RDataPtr, + FMXPreferenceArray[FMXRecordCount], + FMXExchangeArray[FMXRecordCount]); + Inc(FMXRecordCount); + end; + end; + DnsQueryA: + begin + if FARecordCount <= High(FAddressArray) then begin + FAnswerTagArray[I] := FARecordCount; + DecodeAData(@FResponseBuf, RDataPtr, + FAddressArray[FARecordCount]); + Inc(FARecordCount); + end; + end; + DnsQueryPTR: + begin + if FPTRRecordCount <= High(FHostnameArray) then begin + FAnswerTagArray[I] := FPTRRecordCount; + DecodePTRData(@FResponseBuf, RDataPtr, + FHostnameArray[FPTRRecordCount]); + Inc(FPTRRecordCount); + end; + end; + { !!KAP!! } + DnsQueryLOC: + begin + { for security reasons, if recompiled with future versions of delphi } + if (RDataLen = 16) and (rdatalen = sizeof(fLOCInfo)) then + Move(rdataptr^, fLOCInfo, 16) + else + FillChar(fLOCInfo, SizeOf(fLOCInfo), 0); + end; + end; + end; + end; + TriggerRequestDone(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.ExtractName( + Base : PChar; + From : PChar; + var Name : String) : PChar; +var + N : Integer; + I : Integer; + P : PChar; + NameEnd : String; +begin + P := From; + if P^ = #0 then begin + Name := ''; + Inc(P); + end + else begin + Name := ''; + while TRUE do begin + { Get name part length } + N := Ord(P^); + if (N and $C0) = $C0 then begin + { Message compression } + N := ((N and $3F) shl 8) + Ord(P[1]); + if Length(Name) = 0 then + Self.ExtractName(Base, Base + N, Name) + else begin + Self.ExtractName(Base, Base + N, NameEnd); + Name := Name + NameEnd; + end; + Inc(P, 2); + break; + end; + Inc(P); + if N = 0 then + break; + { Copy name part } + for I := 1 to N do begin + Name := Name + P^; + Inc(P); + end; + if P^ <> #0 then + Name := Name + '.'; + end; + end; + Result := P; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.DecodeQuestion( + Base : PChar; + From : PChar; + var Name : String; + var QType : Integer; + var QClass : Integer) : PChar; +var + P : PChar; +begin + P := ExtractName(Base, From, Name); + QType := WSocket_ntohs(PWORD(P)^); + Inc(P, 2); + QClass := WSocket_ntohs(PWORD(P)^); + Inc(P, 2); + Result := P; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.DecodeAnswer( + Base : PChar; + From : PChar; + var Name : String; + var QType : Integer; + var QClass : Integer; + var TTL : LongInt; + var RDataPtr : Pointer; + var RDataLen : Integer) : PChar; +var + P : PChar; +begin + P := ExtractName(Base, From, Name); + QType := WSocket_ntohs(PWORD(P)^); + Inc(P, 2); + QClass := WSocket_ntohs(PWORD(P)^); + Inc(P, 2); + TTL := WSocket_ntohl(PDWORD(P)^); + Inc(P, 4); + RDataLen := WSocket_ntohs(PWORD(P)^); + Inc(P, 2); + RDataPtr := P; + Result := P + RDataLen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.DecodeMXData( + Base : PChar; + From : PChar; + var Preference : Integer; + var Exchange : String) : PChar; +begin + Result := From; + Preference := WSocket_ntohs(PWORD(Result)^); + Inc(Result, 2); + Result := ExtractName(Base, Result, Exchange); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.DecodePTRData( + Base : PChar; + From : PChar; + var Hostname : String) : PChar; +begin + Result := ExtractName(Base, From, Hostname); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TDnsQuery.DecodeAData( + Base : PChar; + From : PChar; + var Address : TInAddr) : PChar; +begin + Result := From; + Address.S_addr := PDWORD(Result)^; + Inc(Result, 4); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ + <0><1><129><128><0><1><0><1><0><4><0><5><7>inp + rise<3>com<0><0><15><0><1><192><12><0> + <15><0><1><0><1>QV<0><10><0><10><5>drui + d<192><12><192><12><0><2><0><1><0><1>Qc<0><6><3> + ns1<192><12><192><12><0><2><0><1><0><1>Qc<0> + <20><3>NS1<10>SPRINTLINK + <3>NET<0><192><12><0><2><0><1><0><1>Qc<0> + <6><3>NS2<192>U<192><12><0><2><0><1><0><1>Q + c<0><6><3>NS3<192>U<192>+<0><1><0><1><0> + <1>QV<0><4><143><186><11>F<192>?<0><1><0><1><0> + <1>Qc<0><4><207>iS<30><192>Q<0><1><0><1><0> + <2><144>i<0><4><204>u<214><10><192>q<0><1><0><1><0> + <2><144>i<0><4><199><2><252><10><192><131><0><1><0><1><0> + <2><142><182><0><4><204>a<212><10> +} +{ + <0><3><129><128><0><1><0><1><0><2><0><3><4>rtf + m<2>be<0><0><15><0><1><192><12><0><15><0><1><0> + <1>.b<0><9><0><10><4>mail<192><12><192><12> + <0><2><0><1><0><1>.b<0><11><2>ns<3>dn + s<2>be<0><192><12><0><2><0><1><0><1>.b<0> + <5><2>ns<192><12><192>'<0><1><0><1><0><1>.b + <0><4><195><0>d<253><192>:<0><1><0><1><0><1>QY + <0><4><134>:J!<192>Q<0><1><0><1><0><1>.b + <0><4><195><0>d<253> +} +{ + <0><7><133><128><0><1><0><1><0><2><0><2><3>www + <4>rtfm<2>be<0><0><1><0><1><192><12><0> + <1><0><1><0><1>Q<128><0><4><195><0>d<253><4>rt + fm<2>be<0><0><2><0><1><0><1>Q<128><0><5> + <2>ns<192>-<192>-<0><2><0><1><0><1>Q<128><0> + <9><2>ns<3>dns<192>2<192>@<0><1><0><1> + <0><1>Q<128><0><4><195><0>d<253><192>Q<0><1><0><1> + <0><0><26><132><0><4><134>:J! +} +(* +<0><1><129><128><0><1><0><1><0><5><0><5><9>fu-berlin +<2>de<0><0> + +<29><0><1><192><12><0><29><0><1><0><0>, + +<0><16><0><21><22><19><139>Av<167><130><218>L<242> +<0><152><156>\<192><12><0><2><0><1><0><0><12><176> +<0>"<4>arbi<10>informatik<13>uni-oldenburg<2>de<0> +<192><12><0><2><0><1><0><0><12><176><0><12><5>deneb<3> +dfn<192>d<192><12><0><2><0><1><0><0><12><176><0><6><3> +ns3<192><12><192><12><0><2><0><1><0><0><12><176><0><6> +<3>ns2<192><12><192><12><0><2><0><1><0><0><12><176><0> +<6><3>ns1<192><12><192>F<0><1><0><1><0><0>t<169><0><4> +<134>j<1><7><192>t<0><1><0><1><0><0>9<209><0><4><192>L +<176><9><192><140><0><1><0><1><0><0>T<19><0><4><130> +<133><1>9<192><158><0><1><0><1><0><0><28><206><0><4> +<160>-<10><12><192><176><0><1><0><1><0><0>1<198><0> +<4><160>-<8><8> +*) + +{ !!KAP!! } +{raw translation of some perl-source LOC.pm from package Net::DNS::RR::LOC; + +fu-berlin.de LOC 52 27 19.591 N 13 17 40.978 E 15.00m 1000.00m 10000.00m 10.00m +} +const conv_sec = 1000.0; + conv_min = 60.0 * conv_sec; + conv_deg = 60.0 * conv_min; + zh31 = 1 shl 31; + +procedure SubLOCgeo(longlat : longint; + hemis : String; + var ldeg, lmin, lsec, lmsec : Extended; + var hemic : char); +var + Labs : Extended; +begin + LongLat := WSocket_ntohl(LongLat); + Labs := Abs(1.0 * LongLat - zh31); + Ldeg := Trunc(labs / conv_deg); + Labs := Labs - ldeg * conv_deg; + Lmin := Trunc(labs / conv_min); + Labs := Labs - lmin * conv_min; + Lsec := Trunc(labs / conv_sec); + Labs := Labs - lsec * conv_sec; + Lmsec := Labs; + Hemic := Copy(Hemis, 1 + ord(LongLat <= zh31), 1)[1]; { yeah. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LongLatToDMS(longlat : longint; hemis : string):string; +Var ldeg, lmin, lsec, lmsec : extended; + hemi : char; +begin + SubLOCgeo(longlat,hemis,ldeg,lmin,lsec,lmsec,hemi); + result := Format('%d %02d %02d.%03d', + [round(ldeg), round(lmin), round(lsec), + round(lmsec)]) + ' ' + hemi; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ in cm!! } +function LocAltToAlt(Localt : LongInt) : LongInt; +begin + Result := Round((WSocket_ntohl(localt) - 100000.0 * 100.0) / 100.0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ !!KAP!! } +function Loc2Geo(loc : TLOCInfo):TLogGeo; + { dolle umwandlung } + procedure du(longlat : Integer; + hemis : String; + var ideg, imin, isec, imsec : Integer; + var hemic : Char); + var + ldeg, lmin, lsec, lmsec : extended; + begin + SubLOCgeo(longlat, hemis, ldeg, lmin, lsec, lmsec, hemic); + ideg := Round(ldeg); + imin := Round(lmin); + isec := Round(lsec); + imsec := Round(lmsec); + end; + +begin + Result.version := Loc.version; + Result.longsize := Round(Exp(Ln(10)*(loc.size and $f))); + Result.latsize := Round(Exp(Ln(10)*(loc.size shr 4))); + + Result.horizpre := Loc.horizpre; + Result.vertpre := Loc.vertpre; + + du(loc.latitude, 'NS', result.lad, result.lam, + result.las, result.lams, result.lahem); + du(loc.longitude, 'EW', result.lod, result.lom, + result.los, result.loms, result.lohem); + + Result.altitude := LocAltToAlt(loc.altitude); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Vc32/FingCli.dcu b/lib/ics/Delphi/Vc32/FingCli.dcu new file mode 100644 index 00000000..f3818c27 Binary files /dev/null and b/lib/ics/Delphi/Vc32/FingCli.dcu differ diff --git a/lib/ics/Delphi/Vc32/FingCli.pas b/lib/ics/Delphi/Vc32/FingCli.pas new file mode 100644 index 00000000..30d440c9 --- /dev/null +++ b/lib/ics/Delphi/Vc32/FingCli.pas @@ -0,0 +1,230 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TFingerCli is a FINGER protocol client using TWSocket + Conform to RFC-1288 (supercede RFCs 1196, 1194 and 742) +Creation: December 18, 1997 +Version: 1.01 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Aug 20, 1999 V1.01 Added compile time options. Revised for BCB4. +Aug 18, 2001 V1.02 Angus Robertson removed + @domain from the request. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FingCli; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, WinProcs, SysUtils, Messages, Classes, Graphics, Controls, + WSocket; + +const + FingCliVersion = 102; + CopyRight : String = ' FingCli (c) 1997-2001 F. Piette V1.02 '; + +type + TFingerCli = class(TComponent) + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure StartQuery; + function Receive(Buffer : Pointer; Len : Integer) : Integer; + procedure Abort; + protected + FWSocket : TWSocket; + FQuery : String; + FQueryDoneFlag : Boolean; + FOnSessionConnected : TSessionConnected; + FOnDataAvailable : TDataAvailable; + FOnQueryDone : TSessionClosed; + procedure WSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure WSocketSessionConnected(Sender: TObject; Error: Word); + procedure WSocketDataAvailable(Sender: TObject; Error: Word); + procedure WSocketSessionClosed(Sender: TObject; Error: Word); + procedure TriggerQueryDone(Error: Word); + published + property Query : String read FQuery + write FQuery; + property OnSessionConnected : TSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnDataAvailable : TDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnQueryDone : TSessionClosed read FOnQueryDone + write FOnQueryDone; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TFingerCli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TFingerCli.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWSocket := TWSocket.Create(Self); + FWSocket.OnSessionConnected := WSocketSessionConnected; + FWSocket.OnDataAvailable := WSocketDataAvailable; + FWSocket.OnSessionClosed := WSocketSessionClosed; + FWSocket.OnDnsLookupDone := WSocketDnsLookupDone; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TFingerCli.Destroy; +begin + if Assigned(FWSocket) then + FWSocket.Destroy; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.StartQuery; +var + I : Integer; + Host : String; +begin + I := Pos('@', FQuery); + if I <= 0 then + raise Exception.CreateFmt('TFingerCli, Invalid Query: %s', [FQuery]); + Host := Copy(FQuery, I + 1, Length(FQuery)); + if Length(Host) <= 0 then + raise Exception.CreateFmt('TFingerCli, Invalid Host in query: %s', [FQuery]); + FQueryDoneFlag := FALSE; + FWSocket.DnsLookup(Host); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.Abort; +begin + FWSocket.CancelDnsLookup; + FWSocket.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFingerCli.Receive(Buffer : Pointer; Len : Integer) : Integer; +begin + Result := FWSocket.Receive(Buffer, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then + TriggerQueryDone(Error) + else begin + FWSocket.Addr := FWSocket.DnsResult; + FWSocket.Proto := 'tcp'; + FWSocket.Port := 'finger'; + FWSocket.Connect; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketSessionConnected(Sender: TObject; Error: Word); +var + I: integer ; +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); + + if Error <> 0 then begin + TriggerQueryDone(Error); + FWSocket.Close + end + else + begin + I := Pos('@', FQuery); { angus } + FWSocket.SendStr(copy (FQuery, 1, pred (I)) + #13 + #10); + end ; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketDataAvailable(Sender: TObject; Error: Word); +begin + if Assigned(FOnDataAvailable) then + FOnDataAvailable(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.TriggerQueryDone(Error: Word); +begin + if (FQueryDoneFlag = FALSE) and Assigned(FOnQueryDone) then + FOnQueryDone(Self, Error); + FQueryDoneFlag := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketSessionClosed(Sender: TObject; Error: Word); +begin + TriggerQueryDone(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/FtpCli.dcu b/lib/ics/Delphi/Vc32/FtpCli.dcu new file mode 100644 index 00000000..2fe45beb Binary files /dev/null and b/lib/ics/Delphi/Vc32/FtpCli.dcu differ diff --git a/lib/ics/Delphi/Vc32/FtpCli.pas b/lib/ics/Delphi/Vc32/FtpCli.pas new file mode 100644 index 00000000..71ae7ecf --- /dev/null +++ b/lib/ics/Delphi/Vc32/FtpCli.pas @@ -0,0 +1,3806 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: May 1996 +Version: 2.86 +Object: TFtpClient is a FTP client (RFC 959 implementation) +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1996-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Quick Reference: + +Properties: + HostName - FTP server host name or IP address + UserName - User name for authentication on FTP server + PassWord - Passwor needed for user, can be blank + HostDirName - Directory as knwon of FTP server + HostFileName - File name as known on FTP server + LocalFileName - Local file name (complete path) + Binary - Select binary or ascii file transfert (Need to call TypeSet + or TypeSetAsync to send it to FTP server). + (There are other less used properties, see code below) + +Methods: + Open - Open the connection with the FTP server + User - Send username + Pass - Send password + Connect - Open the connection, send username and password + Quit - Disconnect gracefully from FTP server + Abort - Disconnect (close connection) immediately + AbortXfer - Abort file transfer without disconnecting. + Warning: LocalFilename property is lost after this command. + Pwd - Get current working directory + Cwd - Change Working Directory + CDup - Change to parent directory + TypeSet - Set type for file transfert (see Binary property) + TypeBinary - Set to binary type transfert and call TypeSet + TypeAscii - Set to ascii type transfert and call TypeSet + + Put - Upload a file + Transmit - Connect, Cwd, Upload a file & Quit + + Append - Upload a file, appending to existing + AppendFile - Connect, Cwd, Append a file & Quit + + Get - Download a file + Receive - Connect, Cwd, Download a file & Quit + + RestGet - Download a file, restarting from current local file size + RestartGet - Connect, Cwd, Restart downloading a file & Quit + + RestPut - Upload a file, restarting from ResumeAt property value + RestartPut - Connect, Cwd, Restart uploading a file & Quit + + Dir - Download a directory listing to a file + Directory - Connect, Cwd, Download a directory listing to a file & Quit + + Ls - Download a file name listing to a file + List - Connect, Cwd, Download a file name listing to a file & Quit + + Mkd - Create a directory on the server + Mkdir - Connect, Cwd, Create a directory on the server & Quit + + Ren - Rename a file or directory on the server + Rename - Connect, Cwd, Rename a file or directory on the server & Quit + + Dele - Delete a file on the server + Delete - Connect, Cwd, Delete a file on the server & Quit + + Rmd - Remove a directoy from the server + Rmdir - Connect, Cwd, Remove a directoy from the server & Quit + + Syst - Get system information from the server + System - Connect, Cwd, Get system information from the server & Quit + + Size - Get file size + FileSize - Connect, Cwd, get file size & Quit + + Quote - Send literal command (use LocalFileName as command to send) + DoQuote - Connect, Cwd, send literal command & Quit + + (There are two set of methods: Async and Sync. The Async are the prefered + ones to build robust applications. Their name end with Async like GetAsync) + (There are other less used methods, see code below) + +How to use a Proxy or Firewall ? + First of all, not all proxies or firewalls are the same. So have a look at + product documentation. However, most products support a transparent proxy + which doesn't require any special programming: + 1) Instead of connection to a remote FTP server, you connect to the proxy + 2) User name is replaced by user name, followed by '@' sign then followed + by target remote FTP server host name. + 3) Password is usual remote FTP server password. + 4) Most require using Passive mode. + Example: You want to connect to ftp.borland.com, using anonymous connection, + company firewall/proxy is running on host named proxyserver. + FtpCli1.HostName := 'proxyserver'; + FtpCli1.UserName := 'anonymous@ftp.borland.com'; + FtpCli1.Password := 'your.email@company'; + FtpCli1.Passive := TRUE; + +History: +Nov 04, 1996 Better error handling + Property for timeout, default to 15 sec +Dec 03, 1996 Adapted display functionnality for Delphi 2 +Dec 27, 1996 Added transmit functions + Changed all procedure to function returning boolean status +Aug 13, 1997 Added multiline response support + Added support for strange Microsoft PWS FTP behaviour +Sep 10, 1997 Added support for Dir and Ls commands + Corrected bugs to enable correct use of separate commands +Oct 16, 1997 V2.07 Adapted for changes in TWSocket object + Added FtpCliVersion constant +Nov 25, 1997 V2.08 Accept 250 as well as 226 for succesfull file transfert + Suggested by fdragon@world-net.net +Nov 26, 1997 V2.09 don't display error message in the receive event when + the socket is no more connected. +Nov 29, 1997 V2.10 added Mkd and Mkdir functions to create a directory. + As suggested by Christian Rsner +Dec 04, 1997 V2.11 Added Ren, Dele, Rmd functions + As suggested by Frank Riemann + Changed Mkd and Mkdir functions to take HostFileName to + specify the directory name. This is more consistent with the + rest of the component usage. +Dec 29, 1997 V2.12 Added a TrimLeft function for Delphi 1 +Dec 30, 1997 V2.13 Added Syst and System commands as suggested by + Fire Dragon + Added the LastResponse property + Corrected a message ("Daniel Fazekas" ) +Jan 10, 1998 V2.14 Accept response 150 and 125 for Get Submitted by Fire + Dragon . + Added a quick reference for most used properties and methods. + Made TFtpCli a TComponent descendant. + Added the Size, FileSize, Quote, DoQuote, RestartGet method. + Made ControlSocket a readonly property (allow easy DNSLookup). + Added a Port property. +Jan 25, 1998 V2.15 + Completely revised to make it asynchronous. + This means that a new set of functions is born. They all have + a name ending with Async. For example GetAsync. Asynchronous + means that when you call the function, it returns almost + immediately. The operation is done in the background. + The asynchronous operation allows to make several request + simultaneously WITHOUT using threads. Just use two or more + TFtpClient and call each GetAsync (or other) method as those + method returns almost instantly, all the request will be done + in the background, generating the OnRequestDone when finished. + Added a State property + This allows to check for component work in the background. + You can call methods only when State = ftpReady (except the + Abort method which can be called at any time) + The Asynchronous methods are the prefered ones. + + Added Pwd command + Returns the current working directory on the server. + + Added CDup command + Change to parrent directory on FTP server. + + Added DirResult property + Parse the LastResponse property to return the directory. + Do no always work when the server returns multi-line responses. + (updated by Pwd, Cwd, CDup and Mkd commands). + + Changed function IsConnected to Connected, a read-only property. + It's more object oriented. + + Replaced file I/O by stream I/O. + It's the first step to allow Stream I/O outside of the component. + + New sample application (Delphi only now, CPP later). + Every command has now a button to excercize it + (async version only) + + The synchronous commands (old commands) are implemented by + calling the asynchronous version and waiting. + + Multi-threaded property + Tells the component how to wait for command completion. + + Removed the TWait component use. + No need to have a TWait component. +Jan 31, 1998 V2.16 Accept response 150 and 125 for Put. +Feb 01, 1998 V2.17 Added intermediate message for OnRequestDone event +Feb 02, 1998 V2.18 Corrected a bug: all sync function returned always FALSE. + Added User and Pass synchronous functions. + Made PutAsync return ftpPutAsync in the OnrequestDone event. +Feb 04, 1998 V2.19 Added an OnCommand event to give a chance to the user to + modify the commands to make some custom commands. Also added the + OnResponse event to allow custom commands to get the response + and alter it as necessary. +Feb 15, 1998 V2.20 Added a FindClose after the FindFirst in GetFileSize routine + as pointed by "Daniel Fazekas" +Feb 21, 1998 V2.21 Enabled progress updated on put +Feb 22, 1998 V2.22 Accept result code 250 after Put command + Implemented Append and AppendFile commands +Mar 07, 1998 V2.23 Made RequestType a R/O property +Mar 15, 1998 V2.24 Reordered PORT/REST/RETR + Added a port command + The ByteCount passed to OnProgress now take into account the + restart byte offset. + Renamed Display to TriggerDisplay and made it virtual + Used TriggerDisplay everywhere. + Modified the Timeout mechanism to reset the timeout each + time the OnProgress event is called. + Abort command call CancelDnsLookup approprietedly +Mar 27, 1998 V2.25 Adapted for C++Builder 3 +Avr 01, 1998 V2.26 Made a valid LastResponse and ErrorMessage when DNS lookup + failed. Added some compiler options. +Apr 10, 1998 V2.27 Added some ftpFctCwd in some highlevel functions. + Suggested by Ray Andrews . +Apr 13, 1998 V2.28 Save error code when the data connection is closed to use + it later to return the status for file transfert. + Implemented passive mode, with help from Yaron Golan + . A new property Passive enable this mode. + Put do not work [yet] is passive mode. +Apr 14, 1998 V2.29 Made passive mode PUT work. + Added ShareMode property (see TFileStream.Create on-line help) + Made ResumeAt property. +Apr 15, 1998 V2.30 Added the OnReadyToTransmit event. + Correctly handled error when local file not found. + Checked if socket connected in SendCommand +Apr 22, 1998 V2.31 Corrected CDupAsync procedure (thanks to Eric + Engler englere@swcp.com) +Apr 26, 1998 V2.32 Added TypeBinary and TypeAscii just to help a little bit. +May 01, 1998 V2.33 Added check for continuation lines in NextxPutAsync +May 05, 1998 V2.34 Added some more delay in WMFtpCloseData. +May 13, 1998 V2.35 In passive mode STOR or APPE, changed the sequence: now + wait for connection established before sending the STOR or APPE + command to FTP server. +May 19, 1998 V2.36 TransfertStats made virtual. +Jun 25, 1998 V2.37 Revised code for 'connection reset by peer' syndrome +Jul 09, 1998 V2.38 Adpted for Delphi 4 +Jul 23, 1998 V2.39 Made ResumeAt property R/W + Added code from Yaron Golan to fix PASV + REST + and to add OnDisplayFile code to view a file on the fly. +Aug 04, 1998 V2.40 Frank Neuhaus found a problem in Put command + for some FTP server. See V240 in the comments. +Aug 12, 1998 V2.41 Added 200 to the valid CWD responses. +Aug 18, 1998 V2.42 Added code to accept continuation lines not beginning by + a number and a dash. Thanks to Al Cantu + for pointing this problem. +Sep 16, 1998 V2.43 Made Synchronize and WaitUntilReady virtual function in + protected section. +Oct 01, 1998 V2.44 Checked for errors in TriggerRequestDone. +Nov 09, 1998 V2.45 Reverted V2.40 changes ! Thanks to Grant Walker + for his help in testing. + Made block size equal to 1514 to minimize packet fragmentation + on ethernet. +Nov 22, 1998 V2.46 changed GetTickCount cast from Integer to LongInt because + of overflows with Delphi 1. Suggested by Terry Byrne + +Dec 22, 1998 V2.47 Corrected DisplayFile which forgot the last character. + Thanks to max@zab1.chita.ru for the bug report. + Handled exceptions while trying to connect data session. + Replaced DisplayFlag by DysplayFileFlag. +Feb 14, 1999 V2.48 Indirectly call winsock functions using wsocket because + wsocket provide runtime dynamic link instead of loadtime link. + This allows a program to use FTP if it discover that winsock is + installed and still run if winsock is not installed. +Mar 13, 1999 V2.49 Added FPutSessionOpened flag and combine it with + FStorAnswerRcvd flag to synchronize start of data sending. + Thanks to Frank Neuhaus for his clear analysis. +Mar 20, 1999 V2.50 Added Options property +Mar 23, 1999 V2.51 Corrected a bug introcuded in last version which truncated + the first character of the second line of a multiline answer on + some servers. +May 04, 1999 V2.52 Corrected an access violation in DataSocketGetDataAvailable. + Thanks to Steve Plegge for pointing that bug. +May 21, 1999 V2.53 Added FRequestResult to ControlSocketDnsLookupDone. Thanks + to Wu'hao for finding this bug. +Jul 17, 1999 V2.54 Added OnError event and DisplayFileMode property. Thanks to + Pieter Snyman for his work. + Accepted answer 200 for successful rename. + Leho Kraav found that some FTP server return + this code. + Cleared FByteCount from PortAsync as suggested by Simon Hoerup + to help some progress indicator implementation. +Aug 04, 1999 V2.55 Corrected a bug with Delphi 1 where a buffer overflow may + occurs when receiving commands longer than 254 bytes. + Thanks to Craig Johnson for finding it. + Also casted FTimeOut to LongInt for computation to prevent + overflow with Delphi 1 for long timeout. +Aug 12, 1999 V2.56 HandleError was not correctly handling error message ! + thank to Kim Mlgrd Nielsen +Aug 20, 1999 V2.57 Revised conditional compilation, adapted for BCB4, set + compile options same as TWSocket. + Added DnsResult property as suggested by Heedong Lim + . This property is accessible from + OnStateChange when state is ftpWaitingBanner. + Added checks for FLocalStream being destroyed. +Sep 5, 1999 V2.58 Heedong Lim found a missing + assignation to FRequestResult in ControlSocketSessionConnected. +Sep 11, 1999 V2.59 Added OnBgException. Thanks to William Sorensen + for suggesting it. +Oct 30, 1999 V2.60 Changed TargetPort and DataPort from integer to WORD so + that Delphi 1 is able to handle port greater than 32K. Bug and + and fix by Duncan Gold . +Nov 22, 1999 V2.61 Allow continuation lines in all responses. +Nov 24, 1999 V2.62 RestPut command by Alexander Burlakov + Added RestartPut. Added ftpNoAutoResumeAt option. +Dec 26, 1999 V2.63 Corrected a bug in DoPutAppendAsync. +Jan 24, 1999 V2.64 Added LongInt cast to all GetTickCount. +Apr 01, 2000 V2.65 Removed any set of integer. + Thanks to Grant Black , + Davie and + Stephen Williams for their work on + this subject. +Apr 09, 2000 V2.66 Proxy / Socks / Local streams support added. + Pieter Snyman added proxy and socks support. + Eric added stream support (assign LocalStream + property to switch to stream mode and LocalFileName to switch to + normal file mode). +Jun 10, 2000 V2.67 Added NOFORMS conditional compile to be able to build a + program (console mode, dll or other) without using the forms unit + (because forms unit makes programs much bigger). See NOFORMS + related comments in wsocket.pas source file for correct use. + See also OnMessagePump event and Terminated property. +Jul 15, 2000 V2.68 Added ProxyPort property. Handled non standard port when + connecting thru proxy. +Jul 21, 2000 V2.69 Implemented check for ABOR, STAT and QUIT commands so that + it doesn't check if previous command is done. + By Davie . + Tomas Lannestedt found a bug when using + streams. Now it correctly handled stream clearing. +Sep 17, 2000 V2.70 Eugene Mayevski moved Controls use + out of NOFORMS way. +Nov 11, 2000 V2.71 Cleared FErrorMessage in ExecAsync. Thanks to Jake Traynham + for finding this bug. +Nov 30, 2000 V2.72 Added a Sleep in DataSocketPutDataSent, and use CloseDelayed + this will prevent some trucated file transfers. +Feb 17, 2001 V2.73 Better WaitUntilReady: check also ftpInternalReady. + By Davie . +Jun 16, 2001 V2.74 Added conditional compile for Delphi 6 +Jun 18, 2001 V2.75 Use AllocateHWnd and DeallocateHWnd from wsocket. +Jul 26, 2001 V2.76 Accept range 150-159 for status code after RETR command. + Peter Calum found some FTP server returning + unusual status code (and not conforming to RFC !). I don't like to + work arround other's bugs, but in this case this shouldn't hurt + anything. +Jul 28, 2001 V2.77 Cleared FNextRequest in HighLevelAsync and TriggerRequestDone + as suggested by Davie . + Added AbortXfer and AbortXferAsync to abort a running transfert + without breaking connection. +Sep 09, 2001 V2.78 Beat Boegli added LocalAddr property + for multihomed hosts. +Sep 13, 2001 V2.79 Bug fix by Beat Boegli related to + his previous changes. Now works with passive mode put. +Nov 02, 2001 V2.80 Added DisplayLastResponse in ControlSocketDataAvailable to + give continuation lines to OnDisplay event. + Accept 250 answer as well as 257 for MKD command as suggested by + Simon Horup . +Feb 12, 2002 V2.82 "Soltann" added code to extract IP + from passive mode reply so that transfer from another server is + possible (See TargetIP in code). +Apr 06, 2002 V2.83 Added code 257 to allowed code list for CDUpAsync as + suggest by . + Fixed a problem in ControlSocketSessionClosed where error code was + not checked. Bug found by . +Apr 20, 2002 V2.84 Removed useless units from uses clause. +Jun 28, 2002 V2.85 Removed check for ftpFctPut and FPassive in + TriggerRequestDone which cause trouble with passive mode and sync + operation. Thanks to "Gunnar" . +Oct 26, 2002 V2.85 Use wsoNoReceiveLoop option with data session. + Set OnSessionAvalable hanlder before calling listen as suggested + by Gunnar . +Nov 11, 2002 V2.86 Changed FtpCliDeallocateHWnd argument from HWND to Cardinal + becasue BCB doesn't like HWND when deriving acomponent from + TFtpCli (BCB bug ?). + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpCli; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER130} { C++ Builder V5.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER140} { C++ Builder V6.0 } + {$ObjExportAll On} +{$ENDIF} +{_DEFINE TRACE} + + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, +{$IFNDEF NOFORMS} + Forms, Controls, +{$ENDIF} + WSocket; + +const + FtpCliVersion = 286; + CopyRight : String = ' TFtpCli (c) 1996-2002 F. Piette V2.86 '; + +const + BLOCK_SIZE = 1460; { 1514 - TCP header size } + WM_FTP_REQUEST_DONE = WM_USER + 1; + WM_FTP_SENDDATA = WM_USER + 2; +{$IFDEF VER80} + { Delphi 1 has a 255 characters string limitation } + FTP_RCV_BUF_SIZE = 255; +{$ELSE} + FTP_RCV_BUF_SIZE = 4096; +{$ENDIF} + +type + TFtpOption = (ftpAcceptLF, ftpNoAutoResumeAt); + TFtpOptions = set of TFtpOption; + TFtpState = (ftpNotConnected, ftpReady, ftpInternalReady, + ftpDnsLookup, ftpConnected, ftpAbort, + ftpInternalAbort, ftpWaitingBanner, ftpWaitingResponse, + ftpPasvReady); + TFtpRequest = (ftpNone, ftpOpenAsync, ftpUserAsync, + ftpPassAsync, ftpCwdAsync, ftpConnectAsync, + ftpReceiveAsync, ftpDirAsync, ftpLsAsync, + ftpPortAsync, ftpGetAsync, ftpDirectoryAsync, + ftpListAsync, ftpSystemAsync, ftpSystAsync, + ftpQuitAsync, ftpAbortXferAsync, + ftpSizeAsync, ftpPutAsync, ftpAppendAsync, + ftpFileSizeAsync, ftpRqAbort, ftpMkdAsync, + ftpRmdAsync, ftpRenameAsync, ftpDeleAsync, + ftpRenAsync, ftpRenToAsync, ftpRenFromAsync, + ftpDeleteAsync, ftpMkdirAsync, ftpRmdirAsync, + ftpPwdAsync, ftpQuoteAsync, ftpCDupAsync, + ftpDoQuoteAsync, ftpTransmitAsync, ftpTypeSetAsync, + ftpRestAsync, ftpRestGetAsync, ftpRestartGetAsync, + ftpRestPutAsync, ftpRestartPutAsync); + TFtpFct = (ftpFctNone, ftpFctOpen, ftpFctUser, + ftpFctPass, ftpFctCwd, ftpFctSize, + ftpFctMkd, ftpFctRmd, ftpFctRenFrom, + ftpFctRenTo, ftpFctGet, ftpFctDir, + ftpFctQuit, ftpFctSyst, ftpFctDele, + ftpFctPwd, ftpFctQuote, ftpFctPut, + ftpFctTypeSet, ftpFctRest, ftpFctCDup, + ftpFctLs, ftpFctAppend, ftpFctPort, + ftpFctAbortXfer); + TFtpFctSet = set of TFtpFct; + TFtpShareMode = (ftpShareCompat, ftpShareExclusive, + ftpShareDenyWrite, ftpShareDenyRead, + ftpShareDenyNone); + TFtpDisplayFileMode = (ftpLineByLine, ftpBinary); + TFtpConnectionType = (ftpDirect, ftpProxy, ftpSocks4, ftpSocks4A, ftpSocks5); + TFtpDisplay = procedure(Sender : TObject; + var Msg : String) of object; + TFtpProgress = procedure(Sender : TObject; + Count : LongInt; + var Abort : Boolean) of object; + TFtpCommand = procedure(Sender : TObject; + var Cmd : String) of object; + TFtpRequestDone = procedure(Sender : TObject; + RqType : TFtpRequest; + Error : Word) of object; + TFtpReadyToTransmit = procedure(Sender : TObject; + var bCancel : Boolean) of object; + TFtpNextProc = procedure of object; + + FtpException = class(Exception); + + TCustomFtpCli = class(TComponent) + protected + FWindowHandle : HWND; + FHostName : String; + FPort : String; + FLocalAddr : String; {bb} + FUserName : String; + FPassWord : String; + FLocalFileName : String; + FHostFileName : String; + FHostDirName : String; + FDnsResult : String; + FType : Char; + FShareMode : Word; + FDisplayFileMode : TFtpDisplayFileMode; + FConnectionType : TFTPConnectionType; + FProxyServer : String; + FProxyPort : String; + FAppendFlag : Boolean; + FDisplayFileFlag : Boolean; + FControlSocket : TWSocket; + FDataSocket : TWSocket; + FStartTime : LongInt; + FStopTime : LongInt; + FState : TFtpState; + FStatusCode : LongInt; + FRequestResult : Integer; + FFctSet : TFtpFctSet; + FFctPrv : TFtpFct; + FHighLevelResult : Integer; + FHighLevelFlag : Boolean; + FRestartFlag : Boolean; + FOptions : TFtpOptions; + FOnDisplay : TFtpDisplay; + FOnDisplayFile : TFtpDisplay; + FOnError : TFtpDisplay; + FOnCommand : TFtpCommand; + FOnResponse : TNotifyEvent; + FOnSessionConnected : TSessionConnected; + FOnSessionClosed : TSessionClosed; + FOnStateChange : TNotifyEvent; + FOnRequestDone : TFtpRequestDone; + FOnProgress : TFtpProgress; + FOnReadyToTransmit : TFtpReadyToTransmit; + FOnBgException : TBgExceptionEvent; + FLocalStream : TStream; + FRequestType : TFtpRequest; + FRequestDoneFlag : Boolean; + FReceiveBuffer : array [0..FTP_RCV_BUF_SIZE - 1] of char; + FReceiveLen : Integer; + FLastResponse : String; + FLastResponseSave : String; { To save FLastResponse when quitting } + FPasvResponse : String; { To fix REST + PASV transfers } + FStatusCodeSave : LongInt; { To save FStatusCode when quitting } + FErrorMessage : String; + FError : Word; { To save Error when data connection closed } + FGetCommand : String; + FConnected : Boolean; + FSendBuffer : array [0..BLOCK_SIZE - 1] of char; + FByteCount : LongInt; + FSizeResult : LongInt; + FDirResult : String; + FResumeAt : LongInt; + FNext : TFtpNextProc; + FWhenConnected : TFtpNextProc; + FDoneAsync : TFtpNextProc; + FOkResponses : array [0..15] of Integer; + FNextRequest : TFtpNextProc; + FServerSaidDone : Boolean; + FFileReceived : Boolean; + FFileSent : Boolean; + FPassive : Boolean; + FEofFlag : Boolean; + FStorAnswerRcvd : Boolean; + FPutSessionOpened : Boolean; + FStreamFlag : Boolean; + procedure SetErrorMessage; + procedure DataSocketGetDataAvailable(Sender: TObject; Error : word); + procedure DataSocketGetSessionConnected(Sender: TObject; Error : word); + procedure DataSocketPutSessionConnected(Sender: TObject; Error : word); + procedure DataSocketGetSessionAvailable(Sender: TObject; Error : word); + procedure DataSocketGetSessionClosed(Sender: TObject; Error : word); + procedure DataSocketPutDataAvailable(Sender: TObject; Error : word); + procedure DataSocketPutDataSent(Sender: TObject; Error : word); + procedure DataSocketPutSessionAvailable(Sender: TObject; Error : word); + procedure DataSocketPutSessionClosed(Sender: TObject; Error : word); + procedure SendCommand(Cmd : String); virtual; + procedure TriggerDisplay(Msg : String); virtual; + procedure TriggerReadyToTransmit(var bCancel : Boolean); virtual; + procedure TriggerDisplayFile(Msg : String); virtual; + procedure TriggerError(Msg: string); virtual; + procedure DisplayLastResponse; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + function Progress : Boolean; virtual; + procedure ControlSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure ControlSocketSessionConnected(Sender: TObject; Error: Word); + procedure ControlSocketDataAvailable(Sender: TObject; Error: Word); + procedure ControlSocketSessionClosed(Sender: TObject; Error: Word); + procedure TriggerRequestDone(Error: Word); + procedure TriggerStateChange; + procedure StateChange(NewState : TFtpState); + procedure PortAsync; virtual; + procedure DoneQuitAsync; + procedure ExecAsync(RqType : TFtpRequest; + Cmd : String; + OkResponses : array of Word; + DoneAsync : TFtpNextProc); + procedure NextExecAsync; + procedure DoGetAsync(RqType : TFtpRequest); + procedure Next1GetAsync; + procedure Next2GetAsync; + procedure Next3GetAsync; + procedure Next1PutAsync; + procedure Next2PutAsync; + procedure Next3PutAsync; + procedure DoHighLevelAsync; + procedure DoPutAppendAsync; + procedure HighLevelAsync(RqType : TFtpRequest; Fcts : TFtpFctSet); + procedure HandleError(const Msg : String); + function CheckReady : Boolean; + procedure TransfertStats; virtual; + procedure ExtractMoreResults; + procedure SetBinary(Value: Boolean); + function GetBinary: Boolean; + function GetConnected: Boolean; + procedure SetShareMode(newValue: TFtpShareMode); + function GetShareMode: TFtpShareMode; + procedure SetDisplayFileMode(NewValue: TFtpDisplayFileMode); + function GetDisplayFileMode: TFtpDisplayFileMode; + procedure SetConnectionType(NewValue: TFtpConnectionType); + function GetConnectionType: TFtpConnectionType; + procedure SetSocksPassword(NewValue: string); + function GetSocksPassword: string; + procedure SetSocksPort(NewValue: string); + function GetSocksPort: string; + procedure SetSocksServer(NewValue: string); + function GetSocksServer: string; + procedure SetSocksUserCode(NewValue: string); + function GetSocksUserCode: string; + procedure SetPassive(NewValue: Boolean); + procedure WndProc(var MsgRec: TMessage); virtual; + function FtpCliAllocateHWnd(Method: TWndMethod): HWND; virtual; + procedure FtpCliDeallocateHWnd(WHandle: Cardinal); virtual; + procedure HandleBackGroundException(E: Exception); virtual; + procedure WMFtpRequestDone(var msg: TMessage); + message WM_FTP_REQUEST_DONE; + procedure WMFtpSendData(var msg: TMessage); + message WM_FTP_SENDDATA; + procedure DestroyLocalStream; + procedure SetLocalStream (Stream:TStream); + procedure SetLocalFileName (FileName:String); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + + procedure OpenAsync; virtual; + procedure UserAsync; virtual; + procedure PassAsync; virtual; + procedure ConnectAsync; virtual; + procedure QuitAsync; virtual; + procedure AbortAsync; virtual; + procedure GetAsync; virtual; + procedure ExecGetAsync; virtual; + procedure ReceiveAsync; virtual; + procedure PutAsync; virtual; + procedure ExecPutAsync; virtual; + procedure TransmitAsync; virtual; + procedure AppendAsync; virtual; + procedure ExecAppendAsync; virtual; + procedure AppendFileAsync; virtual; + procedure ExecDirAsync; virtual; + procedure DirAsync; virtual; + procedure ExecLsAsync; virtual; + procedure LsAsync; virtual; + procedure TypeSetAsync; virtual; + procedure TypeBinaryAsync; virtual; + procedure TypeAsciiAsync; virtual; + procedure PwdAsync; virtual; + procedure CwdAsync; virtual; + procedure CDupAsync; virtual; + procedure DirectoryAsync; virtual; + procedure ListAsync; virtual; + procedure SystAsync; virtual; + procedure SystemAsync; virtual; + procedure SizeAsync; virtual; + procedure FileSizeAsync; virtual; + procedure MkdAsync; virtual; + procedure MkdirAsync; virtual; + procedure RmdAsync; virtual; + procedure RmdirAsync; virtual; + procedure DeleAsync; virtual; + procedure DeleteAsync; virtual; + procedure RenFromAsync; virtual; + procedure RenToAsync; virtual; + procedure RenAsync; virtual; + procedure RenameAsync; virtual; + procedure QuoteAsync; virtual; + procedure DoQuoteAsync; virtual; + procedure AbortXferAsync; virtual; + procedure RestAsync; virtual; + procedure RestGetAsync; virtual; + procedure RestartGetAsync; virtual; + procedure RestPutAsync; virtual; + procedure RestartPutAsync; virtual; + + property Handle : HWND read FWindowHandle; + property LastResponse : String read FLastResponse; + property ErrorMessage : String read FErrorMessage; + property DnsResult : String read FDnsResult; + property SizeResult : LongInt read FSizeResult; + property DirResult : String read FDirResult; + property ControlSocket : TWSocket read FControlSocket; + property DataSocket : TWSocket read FDataSocket; + property Connected : Boolean read GetConnected; + property StatusCode : LongInt read FStatusCode; + property ByteCount : LongInt read FByteCount; + property State : TFtpState read FState; + property RequestType : TFtpRequest read FRequestType; + property Options : TFtpOptions read FOptions + write FOptions; + property LocalStream : TStream read FLocalStream + write SetLocalStream; + property ResumeAt : LongInt read FResumeAt + write FResumeAt; + property HostName : String read FHostName + write FHostName; + property Port : String read FPort + write FPort; + property LocalAddr : String read FLocalAddr + write FLocalAddr; {bb} + property UserName : String read FUserName + write FUserName; + property PassWord : String read FPassWord + write FPassWord; + property HostDirName : String read FHostDirName + write FHostDirName; + property HostFileName : String read FHostFileName + write FHostFileName; + property LocalFileName : String read FLocalFileName + write SetLocalFileName; + property DisplayFileFlag : Boolean read FDisplayFileFlag + write FDisplayFileFlag; + property Binary : Boolean read GetBinary + write SetBinary; + property Passive : Boolean read FPassive + write SetPassive; + property ShareMode : TFtpShareMode read GetShareMode + write SetShareMode; + property DisplayFileMode : TFtpDisplayFileMode read GetDisplayFileMode + write SetDisplayFileMode; + property ConnectionType : TFtpConnectionType read GetConnectionType + write SetConnectionType; + property ProxyServer : string read FProxyServer + write FProxyServer; + property ProxyPort : string read FProxyPort + write FProxyPort; + property SocksPassword : string read GetSocksPassword + write SetSocksPassword; + property SocksPort : string read GetSocksPort + write SetSocksPort; + property SocksServer : string read GetSocksServer + write SetSocksServer; + property SocksUserCode : string read GetSocksUserCode + write SetSocksUserCode; + property OnDisplay : TFtpDisplay read FOnDisplay + write FOnDisplay; + property OnDisplayFile : TFtpDisplay read FOnDisplayFile + write FOnDisplayFile; + property OnError : TFTPDisplay read FOnError + write FOnError; + property OnCommand : TFtpCommand read FOnCommand + write FOnCommand; + property OnResponse : TNotifyEvent read FOnResponse + write FOnResponse; + property OnProgress : TFtpProgress read FOnProgress + write FOnProgress; + property OnSessionConnected : TSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnRequestDone : TFtpRequestDone read FOnRequestDone + write FOnRequestDone; + property OnStateChange : TNotifyEvent read FOnStateChange + write FOnStateChange; + property OnReadyToTransmit : TFtpReadyToTransmit read FOnReadyToTransmit + write FOnReadyToTransmit; + property OnBgException : TBgExceptionEvent read FOnBgException + write FOnBgException; + end; + + TFtpClient = class(TCustomFtpCli) + protected + FTimeout : Integer; { Given in seconds } + FTimeStop : LongInt; { Milli-seconds } + FMultiThreaded : Boolean; + FTerminated : Boolean; + FOnMessagePump : TNotifyEvent; + function Progress : Boolean; override; + function Synchronize(Proc : TFtpNextProc) : Boolean; virtual; + function WaitUntilReady : Boolean; virtual; + public + constructor Create(AOwner: TComponent); override; + procedure MessagePump; + function Open : Boolean; + function User : Boolean; + function Pass : Boolean; + function Connect : Boolean; + function Cwd : Boolean; + function Pwd : Boolean; + function CDup : Boolean; + function TypeSet : Boolean; + function TypeBinary : Boolean; + function TypeAscii : Boolean; + function Get : Boolean; + function Put : Boolean; + function RestPut : Boolean; + function RestartPut : Boolean; + function Quit : Boolean; + function Abort : Boolean; + function Receive : Boolean; + function Transmit : Boolean; + function Append : Boolean; + function AppendFile : Boolean; + function Dir : Boolean; + function Directory : Boolean; + function Ls : Boolean; + function List : Boolean; + function Mkd : Boolean; + function Mkdir : Boolean; + function Ren : Boolean; + function Rename : Boolean; + function Dele : Boolean; + function Delete : Boolean; + function Rmd : Boolean; + function Rmdir : Boolean; + function Syst : Boolean; + function System : Boolean; + function Size : Boolean; + function FileSize : Boolean; + function Quote : Boolean; + function DoQuote : Boolean; + function AbortXfer : Boolean; + function RestGet : Boolean; + function RestartGet : Boolean; +{$IFDEF NOFORMS} + property Terminated : Boolean read FTerminated + write FTerminated; + property OnMessagePump : TNotifyEvent read FOnMessagePump + write FOnMessagePump; +{$ENDIF} + published + property Timeout : Integer read FTimeout write FTimeout; + property MultiThreaded : Boolean read FMultiThreaded write FMultiThreaded; + property HostName; + property Port; + property LocalAddr; {bb} + property UserName; + property PassWord; + property HostDirName; + property HostFileName; + property LocalFileName; + property DisplayFileFlag; + property Binary; + property ErrorMessage; + property ShareMode; + property Options; + property ConnectionType; + property ProxyServer; + property SocksPassword; + property SocksPort; + property SocksServer; + property SocksUserCode; + property OnDisplay; + property OnDisplayFile; + property OnCommand; + property OnResponse; + property OnProgress; + property OnSessionConnected; + property OnSessionClosed; + property OnRequestDone; + property OnStateChange; + property OnReadyToTransmit; + property OnBgException; + end; + +procedure Register; + +implementation + +uses WinSock; + +{$IFNDEF WIN32} +const + HFILE_ERROR = $FFFF; +{$ENDIF} + +{$B-} { Do not evaluate boolean expressions more than necessary } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TFtpClient]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +procedure SetLength(var Str : String; Len : Integer); +begin + Str[0] := chr(Len); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetFileSize(const FileName: string): LongInt; +var + SearchRec: TSearchRec; +begin + if FindFirst(ExpandFileName(FileName), faAnyFile, SearchRec) = 0 then begin + Result := SearchRec.Size; + SysUtils.FindClose(SearchRec); + end + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Step over blank spaces } +function StpBlk(Data : PChar) : PChar; +begin + Result := Data; + if Result <> nil then begin + while (Result^ <> #0) and (Result^ in [' ', #9, #13, #10]) do + Inc(Result); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetInteger(Data : PChar; var Number : LongInt) : PChar; +var + bSign : Boolean; +begin + Number := 0; + Result := StpBlk(Data); + + if (Result = nil) then + Exit; + + { Remember the sign } + if Result^ in ['-', '+'] then begin + bSign := (Result^ = '-'); + Inc(Result); + end + else + bSign := FALSE; + + { Convert any number } + while (Result^ <> #0) and (Result^ in ['0'..'9']) do begin + Number := Number * 10 + ord(Result^) - ord('0'); + Inc(Result); + end; + + { Correct for sign } + if bSign then + Number := -Number; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetQuotedString(Data : PChar; var Dst : String) : PChar; +begin + Dst := ''; + Result := StpBlk(Data); + + if (Result = nil) then + Exit; + + if Result^ <> '"' then + Exit; + Inc(Result); + + while Result^ <> #0 do begin + if Result^ <> '"' then + Dst := Dst + Result^ + else begin + Inc(Result); + if Result^ <> '"' then + Break; + Dst := Dst + Result^; + end; + Inc(Result); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* * * *} +{* * TCustomFtpCli * *} +{* * * *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NOFORMS} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function FtpCliWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TObject; + MsgRec : TMessage; +begin + { At window creation asked windows to store a pointer to our object } + Obj := TObject(GetWindowLong(ahWnd, 0)); + + { If the pointer doesn't represent a TCustomFtpCli, just call the default procedure} + if not (Obj is TCustomFtpCli) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass parameter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + { May be a try/except around next line is needed. Not sure ! } + TCustomFtpCli(Obj).WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.FtpCliAllocateHWnd(Method: TWndMethod) : HWND; +begin +{$IFDEF NOFORMS} + Result := XSocketAllocateHWnd(Self); + SetWindowLong(Result, GWL_WNDPROC, LongInt(@FtpCliWindowProc)); +{$ELSE} + { If you have AllocateHWnd undifined, then your last project was } + { compiled with NOFORMS defined. Just recompile everything for } + { the new project. This will recompile wsocket.pas according to } + { this project settings. } + Result := WSocket.AllocateHWnd(Method); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.FtpCliDeallocateHWnd(WHandle : Cardinal); +begin +{$IFDEF NOFORMS} + XSocketDeallocateHWnd(WHandle); +{$ELSE} + WSocket.DeallocateHWnd(WHandle); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomFtpCli.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + FWindowHandle := FtpCliAllocateHWnd(WndProc); + FOnDisplay := nil; + FOnDisplayFile := nil; + FType := 'I'; + FPort := 'ftp'; + FProxyPort := 'ftp'; + FState := ftpReady; + FShareMode := fmShareExclusive; + FConnectionType:= ftpDirect; + FProxyServer := ''; { Should Socks properties be set to '' as well? } + FOptions := [ftpAcceptLF]; + FLocalAddr := '0.0.0.0'; {bb} + FControlSocket := TWSocket.Create(Self); + FControlSocket.OnSessionConnected := ControlSocketSessionConnected; + FControlSocket.OnDataAvailable := ControlSocketDataAvailable; + FControlSocket.OnSessionClosed := ControlSocketSessionClosed; + FControlSocket.OnDnsLookupDone := ControlSocketDnsLookupDone; + FDataSocket := TWSocket.Create(Self); + FStreamFlag := False; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomFtpCli.Destroy; +begin + FtpCliDeallocateHWnd(FWindowHandle); + { Be sure to have LocalStream closed } +{ FStreamFlag := FALSE; } + DestroyLocalStream; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.WndProc(var MsgRec: TMessage); +begin + try + with MsgRec do begin + case Msg of + WM_FTP_REQUEST_DONE : WMFtpRequestDone(MsgRec); + WM_FTP_SENDDATA : WMFtpSendData(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; + except + on E:Exception do + HandleBackGroundException(E); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All exceptions *MUST* be handled. If an exception is not handled, the } +{ application will be shut down ! } +procedure TCustomFtpCli.HandleBackGroundException(E: Exception); +var + CanAbort : Boolean; +begin + CanAbort := TRUE; + { First call the error event handler, if any } + if Assigned(FOnBgException) then begin + try + FOnBgException(Self, E, CanAbort); + except + end; + end; + { Then abort the component } + if CanAbort then begin + try + Abort; + except + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.WMFtpRequestDone(var msg: TMessage); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, FRequestType, Msg.LParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then begin + if AComponent = FControlSocket then + FControlSocket := nil + else if AComponent = FDataSocket then + FDataSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetErrorMessage; +begin + if FErrorMessage = '' then + FErrorMessage := FLastResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DestroyLocalStream; +begin + if Assigned(FLocalStream) and (FStreamFlag = FALSE) then begin + FLocalStream.Destroy; + FLocalStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetLocalFileName(FileName: String); +begin + FLocalFileName := FileName; + if FileName <> '' then + FStreamFlag := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetLocalStream(Stream: TStream); +begin + FLocalStream := Stream; + FStreamFlag := (Stream <> nil); + if FStreamFlag then + FLocalFileName := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerDisplay(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerDisplayFile(Msg : String); +begin + if Assigned(FOnDisplayFile) then + FOnDisplayFile(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerError(Msg : String); +begin + if Assigned(FOnError) then + FOnError(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DisplayLastResponse; +begin + TriggerDisplay('< ' + FLastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.StateChange(NewState : TFtpState); +begin + if FState <> NewState then begin + FState := NewState; + TriggerStateChange; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetBinary : Boolean; +begin + Result := (FType = 'I'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetBinary(Value : Boolean); +begin + if Value then + FType := 'I' + else + FType := 'A'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.Progress : Boolean; +var + Abort : Boolean; +begin + Abort := FALSE; + if Assigned(FOnProgress) then + FOnProgress(Self, FByteCount + FResumeAt, Abort); + + if Abort then begin + TriggerDisplay('! Abort requested'); + FDataSocket.Close; + end; + + Result := not Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SendCommand(Cmd : String); +begin + if Assigned(FOnCommand) then + FOnCommand(Self, Cmd); + TriggerDisplay('> ' + Cmd); + if FControlSocket.State = wsConnected then + FControlSocket.SendStr(Cmd + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.HandleError(const Msg : String); +begin + if Assigned(FOnError) then + TriggerError(Msg) + else + raise FtpException.Create(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Return TRUE if component is ready for next operation. } +{* Trigger an error or return FALSE if not ready } +function TCustomFtpCli.CheckReady : Boolean; +begin + Result := (FState in [ftpReady, ftpInternalReady]); + if not Result then + HandleError('FTP component not ready'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.OpenAsync; +begin + if not CheckReady then + Exit; + if FConnected then begin + HandleError('FTP component already connected'); + Exit; + end; + + if not FHighLevelFlag then + FRequestType := ftpOpenAsync; + + FRequestDoneFlag := FALSE; + FReceiveLen := 0; + FRequestResult := 0; + FDnsResult := ''; + StateChange(ftpDnsLookup); + case FConnectionType of + ftpDirect, ftpSocks4, ftpSocks4A, ftpSocks5: FControlSocket.DnsLookup(FHostName); + ftpProxy: FControlSocket.DnsLookup(FProxyServer); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecAsync( + RqType : TFtpRequest; + Cmd : String; { Command to execute } + OkResponses : array of Word; { List of responses like '200 221 342' } + DoneAsync : TFtpNextProc); { What to do when done } +var + I : Integer; +begin + if not((Cmd = 'ABOR') or (Cmd = 'STAT') or (Cmd = 'QUIT')) then begin + if not CheckReady then + Exit; + + if not FConnected then begin + HandleError('FTP component not connected'); + Exit; + end; + end; + + if not FHighLevelFlag then + FRequestType := RqType; + + for I := 0 to High(OkResponses) do + FOkResponses[I] := OkResponses[I]; + FOkResponses[High(OkResponses) + 1] := 0; + + FRequestDoneFlag := FALSE; + FNext := NextExecAsync; + FDoneAsync := DoneAsync; + FErrormessage := ''; + StateChange(ftpWaitingResponse); + SendCommand(Cmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExtractMoreResults; +var + NumericCode : LongInt; + p : PChar; +begin + if FRequestResult = 0 then begin + if FFctPrv in [ftpFctSize] then begin + p := GetInteger(@FLastResponse[1], NumericCode); + GetInteger(p, FSizeResult); + end; + if FFctPrv in [ftpFctCDup, ftpFctPwd, ftpFctMkd, ftpFctCwd] then begin + p := GetInteger(@FLastResponse[1], NumericCode); + GetQuotedString(p, FDirResult); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.NextExecAsync; +var + I : Integer; + p : PChar; +begin + DisplayLastResponse; + if not (FLastResponse[1] in ['0'..'9']) then + Exit; { Continuation line, nothing to do } + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Exit; { Continuation line, nothing to do } + + if FOkResponses[0] = 0 then begin + { The list of ok responses is empty } + if FStatusCode >= 500 then begin + { Not a good response } + FRequestResult := FStatusCode; + SetErrorMessage; + end + else + FRequestResult := 0; + end + else begin + { We have a list of ok response codes } + for I := 0 to High(FOkResponses) do begin + if FOkResponses[I] = 0 then begin + { No good response found } + FRequestResult := FStatusCode; + SetErrorMessage; + break; + end; + if FOkResponses[I] = FStatusCode then begin + { Good response found } + FRequestResult := 0; + Break; + end; + end; + end; + + if FPassive and (FStatusCode = 227) then begin + StateChange(ftpPasvReady); { 19.09.2002 } + FPasvResponse := FLastResponse; + end; + + ExtractMoreResults; + + if Assigned(FDoneAsync) then + FDoneAsync + else + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.QuitAsync; +begin + DestroyLocalStream; + FFctPrv := ftpFctQuit; + ExecAsync(ftpQuitAsync, 'QUIT', [221], DoneQuitAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DoneQuitAsync; +begin + FControlSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.CwdAsync; +begin + if Length(FHostDirName) <= 0 then begin + HandleError('HostDirName emtpy'); + Exit; + end; + + FFctPrv := ftpFctCwd; + ExecAsync(ftpCwdAsync, 'CWD '+ FHostDirName, [200, 250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.UserAsync; +var + CmdBuf : String; +begin + if Length(FUserName) <= 0 then begin + HandleError('UserName emtpy'); + Exit; + end; + FFctPrv := ftpFctUser; + if FConnectionType = ftpProxy then begin + if (CompareText(FPort, 'ftp') = 0) or + (CompareText(FPort, '21') = 0) then + CmdBuf := 'USER ' + FUserName + '@' + FHostName + else + CmdBuf := 'USER ' + FUserName + '@' + FHostName + ':' + FPort; + end + else + CmdBuf := 'USER ' + FUserName; + ExecAsync(ftpUserAsync, CmdBuf, [331, 230], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.PassAsync; +begin + if Length(FPassword) <= 0 then begin + HandleError('Password emtpy'); + Exit; + end; + FFctPrv := ftpFctPass; + ExecAsync(ftpPassAsync, 'PASS '+ FPassword, [230], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SystAsync; +begin + FFctPrv := ftpFctSyst; + ExecAsync(ftpSystAsync, 'SYST', [215], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RestAsync; +begin + FFctPrv := ftpFctRest; + { When restarting a download, we always start from current local file } + { size. When restarting a upload, we restart from ResumeAt property } + { value. This property could be initialized using Size command. } + if (not (FRequestType in [ftpRestartPutAsync, ftpRestPutAsync])) and + (not (ftpNoAutoResumeAt in FOptions)) then + FResumeAt := GetFileSize(FLocalFileName); + if FResumeAt > 0 then + ExecAsync(ftpRestAsync, 'REST ' + IntToStr(FResumeAt), [0], nil) + else begin + FRequestDoneFlag := FALSE; + FNext := NextExecAsync; + FDoneAsync := nil; + TriggerRequestDone(0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SizeAsync; +begin + FSizeResult := 0; + FFctPrv := ftpFctSize; + ExecAsync(ftpSizeAsync, 'SIZE ' + FHostFileName, [213], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TypeSetAsync; +begin + FFctPrv := ftpFctTypeSet; + ExecAsync(ftpTypeSetAsync, 'TYPE ' + FType, [200], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TypeBinaryAsync; +begin + Binary := TRUE; + TypeSetAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TypeAsciiAsync; +begin + Binary := FALSE; + TypeSetAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.MkdAsync; +begin + FFctPrv := ftpFctMkd; + ExecAsync(ftpMkdAsync, 'MKD ' + FHostFileName, [250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RmdAsync; +begin + FFctPrv := ftpFctRmd; + ExecAsync(ftpRmdAsync, 'RMD ' + FHostFileName, [250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DeleAsync; +begin + FFctPrv := ftpFctDele; + ExecAsync(ftpDeleAsync, 'DELE ' + FHostFileName, [250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.AbortXferAsync; +begin + FFctPrv := ftpFctAbortXfer; + ExecAsync(ftpAbortXferAsync, 'ABOR', [0], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.QuoteAsync; +begin + FFctPrv := ftpFctQuote; + ExecAsync(ftpQuoteAsync, FLocalFileName, [0], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.PwdAsync; +begin + FFctPrv := ftpFctPwd; + ExecAsync(ftpPwdAsync, 'PWD', [250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.CDupAsync; +begin + FFctPrv := ftpFctCDup; + ExecAsync(ftpCDupAsync, 'CDUP', [250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RenFromAsync; +begin + FFctPrv := ftpFctRenFrom; + ExecAsync(ftpRenFromAsync, 'RNFR ' + FHostFileName, [350], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RenToAsync; +begin + FFctPrv := ftpFctRenTo; + ExecAsync(ftpRenToAsync, 'RNTO ' + FLocalFileName, [200, 250, 257], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.AbortAsync; +var + bFlag : Boolean; +begin +{$IFDEF TRACE} TriggerDisplay('! Aborting'); {$ENDIF} + bFlag := (FState = ftpDnsLookup); + StateChange(ftpAbort); + DestroyLocalStream; + if bFlag then + FControlSocket.CancelDnsLookup; + if FControlSocket.State <> wsClosed then + FControlSocket.Close; + if FDataSocket.State <> wsClosed then + FDataSocket.Close; + DestroyLocalStream; + FConnected := FALSE; + StateChange(ftpReady); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DoHighLevelAsync; +begin +{$IFDEF TRACE} TriggerDisplay('! HighLevelAsync ' + IntToStr(FRequestResult)); {$ENDIF} + if FState = ftpAbort then begin + {$IFDEF TRACE} TriggerDisplay('! Abort detected'); {$ENDIF} + FFctSet := []; + FHighLevelResult := 426; + FErrorMessage := '426 Operation aborted.'; + end; + + FNextRequest := DoHighLevelAsync; + + if FRequestResult <> 0 then begin + { Previous command had errors } + FHighLevelResult := FRequestResult; + if (FFctPrv = ftpFctQuit) or (not (ftpFctQuit in FFctSet)) then + FFctSet := [] + else + FFctSet := [ftpFctQuit]; + end; + + ExtractMoreResults; + + if ftpFctOpen in FFctSet then begin + FFctPrv := ftpFctOpen; + FFctSet := FFctSet - [FFctPrv]; + OpenAsync; + Exit; + end; + + if ftpFctUser in FFctSet then begin + FFctPrv := ftpFctUser; + FFctSet := FFctSet - [FFctPrv]; + UserAsync; + Exit; + end; + + if ftpFctPass in FFctSet then begin + FFctSet := FFctSet - [ftpFctPass]; + if (FFctPrv <> ftpFctUser) or + ((FfctPrv = ftpFctUser) and (FStatusCode = 331)) then begin + FFctPrv := ftpFctPass; + PassAsync; + Exit; + end; + end; + + if ftpFctCwd in FFctSet then begin + FFctSet := FFctSet - [ftpFctCwd]; + if Length(FHostDirName) > 0 then begin + FFctPrv := ftpFctCwd; + CwdAsync; + Exit; + end; + end; + + if ftpFctCDup in FFctSet then begin + FFctPrv := ftpFctCDup; + FFctSet := FFctSet - [FFctPrv]; + CDupAsync; + Exit; + end; + + if ftpFctTypeSet in FFctSet then begin + FFctPrv := ftpFctTypeSet; + FFctSet := FFctSet - [FFctPrv]; + TypeSetAsync; + Exit; + end; + + if ftpFctPort in FFctSet then begin + FFctPrv := ftpFctPort; + FFctSet := FFctSet - [FFctPrv]; + PortAsync; + Exit; + end; + + if ftpFctRest in FFctSet then begin + FFctPrv := ftpFctRest; + FFctSet := FFctSet - [FFctPrv]; + RestAsync; + Exit; + end; + + if ftpFctGet in FFctSet then begin + if (FFctPrv <> ftpFctRest) or + (FResumeAt < 0) or + ((FFctPrv = ftpFctRest) and (FStatusCode <> 350)) then + FResumeAt := 0; + + FFctPrv := ftpFctGet; + FFctSet := FFctSet - [FFctPrv]; + ExecGetAsync; + Exit; + end; + + if ftpFctPut in FFctSet then begin + FFctPrv := ftpFctPut; + FFctSet := FFctSet - [FFctPrv]; + ExecPutAsync; + Exit; + end; + + if ftpFctAppend in FFctSet then begin + FFctPrv := ftpFctAppend; + FFctSet := FFctSet - [FFctPrv]; + ExecAppendAsync; + Exit; + end; + + if ftpFctDir in FFctSet then begin + FFctPrv := ftpFctDir; + FFctSet := FFctSet - [FFctPrv]; + ExecDirAsync; + Exit; + end; + + if ftpFctLs in FFctSet then begin + FFctPrv := ftpFctLs; + FFctSet := FFctSet - [FFctPrv]; + ExecLsAsync; + Exit; + end; + + if ftpFctSyst in FFctSet then begin + FFctPrv := ftpFctSyst; + FFctSet := FFctSet - [FFctPrv]; + SystAsync; + Exit; + end; + + if ftpFctMkd in FFctSet then begin + FFctPrv := ftpFctMkd; + FFctSet := FFctSet - [FFctPrv]; + MkdAsync; + Exit; + end; + + if ftpFctRmd in FFctSet then begin + FFctPrv := ftpFctRmd; + FFctSet := FFctSet - [FFctPrv]; + RmdAsync; + Exit; + end; + + if ftpFctRenFrom in FFctSet then begin + FFctPrv := ftpFctRenFrom; + FFctSet := FFctSet - [FFctPrv]; + RenFromAsync; + Exit; + end; + + if ftpFctRenTo in FFctSet then begin + FFctPrv := ftpFctRenTo; + FFctSet := FFctSet - [FFctPrv]; + RenToAsync; + Exit; + end; + + if ftpFctSize in FFctSet then begin + FFctPrv := ftpFctSize; + FFctSet := FFctSet - [FFctPrv]; + SizeAsync; + Exit; + end; + + if ftpFctDele in FFctSet then begin + FFctPrv := ftpFctDele; + FFctSet := FFctSet - [FFctPrv]; + DeleAsync; + Exit; + end; + + if ftpFctPwd in FFctSet then begin + FFctPrv := ftpFctPwd; + FFctSet := FFctSet - [FFctPrv]; + PwdAsync; + Exit; + end; + + if ftpFctAbortXfer in FFctSet then begin + FFctPrv := ftpFctAbortXfer; + FFctSet := FFctSet - [FFctPrv]; + AbortXferAsync; + Exit; + end; + + if ftpFctQuote in FFctSet then begin + FFctPrv := ftpFctQuote; + FFctSet := FFctSet - [FFctPrv]; + QuoteAsync; + Exit; + end; + + if ftpFctQuit in FFctSet then begin + FFctPrv := ftpFctQuit; + FFctSet := FFctSet - [FFctPrv]; + FLastResponseSave := FLastResponse; + FStatusCodeSave := FStatusCode; + QuitAsync; + Exit; + end; + + {$IFDEF TRACE} TriggerDisplay('! HighLevelAsync done'); {$ENDIF} + FFctSet := []; + FNextRequest := nil; + FRequestDoneFlag := FALSE; + TriggerRequestDone(FHighLevelResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.HighLevelAsync(RqType : TFtpRequest; Fcts : TFtpFctSet); +begin + if FConnected and (ftpFctOpen in Fcts) then begin + HandleError('FTP component already connected'); + Exit; + end; + if not CheckReady then + Exit; + FLastResponseSave := FLastResponse; + FStatusCodeSave := -1; + FRequestType := RqType; + FRequestResult := 0; + FFctSet := Fcts; + FFctPrv := ftpFctNone; + FHighLevelResult := 0; + FHighLevelFlag := TRUE; + FLastResponse := ''; + FErrorMessage := ''; + FRestartFlag := FALSE; + FNextRequest := nil; + DoHighLevelAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ConnectAsync; +begin + HighLevelAsync(ftpConnectAsync, [ftpFctOpen, ftpFctUser, ftpFctPass]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ReceiveAsync; +begin + HighLevelAsync(ftpReceiveAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctTypeSet, ftpFctPort, ftpFctGet, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.PutAsync; +begin + HighLevelAsync(ftpPutAsync, + [ftpFctPort, ftpFctPut]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ By A.Burlakov: new procedure for resuming uploads } +{ Uses REST + STOR commands instead APPEND } +procedure TCustomFtpCli.RestPutAsync; +begin + HighLevelAsync(ftpRestPutAsync, + [ftpFctRest, ftpFctPort, ftpFctPut]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RestartPutAsync; +begin + HighLevelAsync(ftpRestartPutAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, ftpFctCwd, + ftpFctTypeSet, ftpFctRest, ftpFctPort, ftpFctPut, + ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TransmitAsync; +begin + HighLevelAsync(ftpTransmitAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctTypeSet, ftpFctPort, + ftpFctPut, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.AppendAsync; +begin + HighLevelAsync(ftpAppendAsync, + [ftpFctPort, ftpFctAppend]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.AppendFileAsync; +begin + HighLevelAsync(ftpTransmitAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctTypeSet, ftpFctPort, + ftpFctAppend, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DirAsync; +begin + HighLevelAsync(ftpDirAsync, + [ftpFctPort, ftpFctDir]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DirectoryAsync; +begin + HighLevelAsync(ftpDirectoryAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctPort, ftpFctDir, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.LsAsync; +begin + HighLevelAsync(ftpLsAsync, + [ftpFctPort, ftpFctLs]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ListAsync; +begin + HighLevelAsync(ftpListAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctPort, ftpFctLs, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SystemAsync; +begin + HighLevelAsync(ftpSystemAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctSyst, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RestartGetAsync; +begin + HighLevelAsync(ftpRestartGetAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, ftpFctCwd, + ftpFctTypeSet, ftpFctRest, ftpFctPort, ftpFctGet, + ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RestGetAsync; +begin + HighLevelAsync(ftpRestGetAsync, + [ftpFctRest, ftpFctPort, ftpFctGet]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.GetAsync; +begin + HighLevelAsync(ftpGetAsync, + [ftpFctPort, ftpFctGet]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.MkdirAsync; +begin + HighLevelAsync(ftpMkdirAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctMkd, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RmdirAsync; +begin + HighLevelAsync(ftpRmdirAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctRmd, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DeleteAsync; +begin + HighLevelAsync(ftpDeleteAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctDele, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DoQuoteAsync; +begin + HighLevelAsync(ftpDoQuoteAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctQuote, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RenameAsync; +begin + HighLevelAsync(ftpRenameAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, ftpFctCwd, + ftpFctRenFrom, ftpFctRenTo, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.RenAsync; +begin + HighLevelAsync(ftpRenAsync, [ftpFctRenFrom, ftpFctRenTo]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.FileSizeAsync; +begin + HighLevelAsync(ftpSizeAsync, + [ftpFctOpen, ftpFctUser, ftpFctPass, + ftpFctCwd, ftpFctSize, ftpFctQuit]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketGetDataAvailable(Sender: TObject; Error : word); +var + Len : Integer; + Buffer : array [1..4096] of Char; { Should use a dynamic buffer instead... } + aSocket : TWSocket; + I, J : Integer; + Line : String; +begin + if not Progress then + Exit; + + aSocket := Sender as TWSocket; + + Len := aSocket.Receive(@Buffer[1], High(Buffer)); +{TriggerDisplay('! Data received ' + IntToStr(Len));} + if Len = 0 then + { Remote has closed, ignore } + else if Len < 0 then begin + { An error has occured } + if (aSocket.State = wsConnected) and + (aSocket.LastError <> WSAEWOULDBLOCK) then begin + TriggerDisplay('! Data: Receive error ' + IntToStr(aSocket.LastError)); + aSocket.Shutdown(2); + Exit; + end; + end + else begin + { Update our statistics } + FByteCount := FByteCount + Len; + + if FLocalStream <> nil then begin + try + FLocalStream.WriteBuffer(Buffer, Len); + except + TriggerDisplay('! Error writing local file'); + aSocket.Shutdown(2); + Exit; + end; + end; + + { If requested to display the received data, do it line by line } + if FDisplayFileFlag then begin + case FDisplayFileMode of + ftpBinary: + begin + {$IFDEF VER80} + { 16 bit has max 255 characters per string } + if Len > 255 then + SetLength(Line, 255) + else + {$ENDIF} + SetLength(Line, Len); + Move(Buffer[1], Line[1], Length(Line)); + TriggerDisplayFile(Line); + end; + ftpLineByLine: + if Len > 0 then begin + i := 1; + while (i <= Len) do begin + j := 1; + while (i <= Len) and (Buffer[i] <> #10) and (Buffer[i] <> #13) do begin + i := i + 1; + j := j + 1; + end; + {$IFDEF VER80} + if (j - 1) > 255 then + SetLength(Line, 255) + else + {$ENDIF} + SetLength(Line, j - 1); + if Length(Line) > 0 then + Move(Buffer[i - j + 1], Line[1], Length(Line)); + TriggerDisplayFile(Line); + while (i <= Len) and ((Buffer[i] = #10) or (Buffer[i] = #13)) do + i := i + 1; + end; + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketGetSessionConnected( + Sender: TObject; + Error : word); +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session opened (Get)'); {$ENDIF} + + { Use the socket for the data transmission } + FDataSocket.OnSessionClosed := DataSocketGetSessionClosed; + FDataSocket.OnDataAvailable := DataSocketGetDataAvailable; + FDataSocket.OnDataSent := nil; + + { Record the starting time } + FStartTime := LongInt(GetTickCount); + + if Error <> 0 then begin + FLastResponse := 'Unable to establish data connection, error #' + + IntToStr(Error); + FStatusCode := 550; + SetErrorMessage; + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Used for passive mode } +procedure TCustomFtpCli.DataSocketPutSessionConnected( + Sender: TObject; + Error : word); +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session opened (Put)'); {$ENDIF} + + { Use the socket for the data transmission } + FDataSocket.OnSessionClosed := DataSocketPutSessionClosed; + FDataSocket.OnDataAvailable := nil; + FDataSocket.OnDataSent := nil; + + { Record we opened data session } + FPutSessionOpened := TRUE; + + { Record the starting time } + FStartTime := LongInt(GetTickCount); + + if Error <> 0 then begin + FLastResponse := 'Unable to establish data connection, error #' + + IntToStr(Error); + FStatusCode := 550; + SetErrorMessage; + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + + StateChange(ftpWaitingResponse); + FNext := Next1PutAsync; + + if FAppendFlag then + SendCommand('APPE ' + FHostFileName) + else + SendCommand('STOR ' + FHostFileName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketGetSessionAvailable(Sender: TObject; Error : word); +var + aSocket : TSocket; +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session requested'); {$ENDIF} + { Accept the incomming connection initiated by the FTP server for data } + aSocket := FDataSocket.Accept; + + { Close the listening socket, we don't need it anymore } + FDataSocket.Close; + + { Reuse the socket for the data transmission } + FDataSocket.OnSessionClosed := DataSocketGetSessionClosed; + FDataSocket.OnDataAvailable := DataSocketGetDataAvailable; + FDataSocket.OnDataSent := nil; + FDataSocket.HSocket := aSocket; + FDataSocket.ComponentOptions := [wsoNoReceiveLoop]; { 26/10/02 } + + { Record the starting time } + FStartTime := LongInt(GetTickCount); + {$IFDEF TRACE} TriggerDisplay('! Data Session opened'); {$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketGetSessionClosed( + Sender: TObject; + Error : word); +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session closed'); {$ENDIF} + + DestroyLocalStream; + FFileReceived := TRUE; + FError := Error; + Next3GetAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketPutSessionAvailable(Sender: TObject; Error : word); +var + aSocket : TSocket; + SndBufSize : Integer; + OptLen : Integer; +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session requested'); {$ENDIF} + { Accept the incomming connection initiated by the FTP server for data } + aSocket := FDataSocket.Accept; + + { Close the listening socket, we don't need it anymore } + FDataSocket.Close; + + { Reuse the socket for the data transmission } + FDataSocket.OnSessionClosed := DataSocketPutSessionClosed; + FDataSocket.OnDataAvailable := DataSocketPutDataAvailable; + FDataSocket.OnDataSent := DataSocketPutDataSent; +{ FDataSocket.OnDisplay := FOnDisplay; } { Debugging only } + FDataSocket.HSocket := aSocket; + FDataSocket.ComponentOptions := [wsoNoReceiveLoop]; { 26/10/02 } + + OptLen := SizeOf(SndBufSize); + if WSocket_getsockopt(FDataSocket.HSocket, SOL_SOCKET, + SO_SNDBUF, + @SndBufSize, OptLen) = SOCKET_ERROR then begin + HandleError('winsock.getsockopt(SO_SNDBUF) failed'); + Exit; + end; + + { Be sure to gracefully close the socket } + FDataSocket.LingerOnOff := wsLingerOff; + FDataSocket.LingerTimeout := 10; + FDataSocket.SetLingerOption; +{ FStorAnswerRcvd := TRUE; } { V240 INSERTED line } + FPutSessionOpened := TRUE; + if FStorAnswerRcvd and (FStartTime = 0) then + PostMessage(Handle, WM_FTP_SENDDATA, 0, 0); + + {$IFDEF TRACE} TriggerDisplay('! Data Session opened'); {$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.WMFtpSendData(var msg: TMessage); +begin + { Record the starting time } + FStartTime := LongInt(GetTickCount); + + { Send first data block } + DataSocketPutDataSent(FDataSocket, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketPutDataSent(Sender: TObject; Error : word); +var + Count : Integer; +begin + if (FLocalStream = nil) or (not Progress) then + Exit; + if FLocalStream = nil then + Exit; { Could be set to nil by Progress function } + + if Error <> 0 then begin + TriggerDisplay('! Error #' + IntToStr(Error) + ' sending data'); + FDataSocket.Close; + Exit; + end; + + if FEofFlag or (not FStorAnswerRcvd) or (not FPutSessionOpened) then + Exit; + + try + Count := FLocalStream.Read(FSendBuffer, BLOCK_SIZE); + if Count > 0 then begin + FByteCount := FByteCount + Count; + FDataSocket.Send(@FSendBuffer, Count); + end + else begin { EOF } + {$IFNDEF VER80} + { For an unknown reason, winsock need time to send last data } + { buffer. Without this delay, we may end with a partial file } + { transfer. See comments in DoPutAppendAsync function. } + { Normally using Linger option would handle this case. But } + { many winsock implementations will end with a 10055 error } + { after a lot of consecutive file transfers. } + Sleep(100); + {$ENDIF} + FDataSocket.CloseDelayed; + FEofFlag := TRUE; + end; + except + TriggerDisplay('! Error reading file'); + FDataSocket.Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketPutSessionClosed(Sender: TObject; Error : word); +begin + {$IFDEF TRACE} TriggerDisplay('! Data Session closed'); {$ENDIF} + { close the local file } + DestroyLocalStream; + FFileSent := TRUE; + FError := Error; + Next3PutAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DataSocketPutDataAvailable(Sender: TObject; Error : word); +var + Buffer : array [1..2048] of Char; + aSocket : TWSocket; +begin + { We don't wants to receive data here because we are sending, not } + { receiving. But in order to not crash if we receive somthing, just } + { get it and do nothing with it ! } + aSocket := Sender as TWSocket; + aSocket.Receive(@Buffer[1], High(Buffer)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TransfertStats; +var + Buffer : String; + BytesSec : LongInt; +begin + FStopTime := LongInt(GetTickCount); + Buffer := IntToSTr(FByteCount) + ' bytes received/sent in ' + + IntToStr((FStopTime - FStartTime) div 1000) + ' seconds'; + + if FStopTime <> FStartTime then begin + if FByteCount > 32767 then + BytesSec := 1000 * (FByteCount div (FStopTime - FStartTime)) + else + BytesSec := (1000 * FByteCount) div (FStopTime - FStartTime); + Buffer := Buffer + ' (' + IntToStr(BytesSec) + ' Bytes/sec)'; + end; + TriggerDisplay('! ' + Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecGetAsync; +begin + DoGetAsync(ftpGetAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecDirAsync; +begin + DoGetAsync(ftpDirAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecLsAsync; +begin + DoGetAsync(ftpLsAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetShareMode(newValue : TFtpShareMode); +begin +{$IFNDEF VER80}{$WARNINGS OFF}{$ENDIF} + case newValue of + ftpShareCompat : FShareMode := fmShareCompat; + ftpShareExclusive : FShareMode := fmShareExclusive; + ftpShareDenyWrite : FShareMode := fmShareDenyWrite; + ftpShareDenyRead : FShareMode := fmShareDenyRead; + ftpShareDenyNone : FShareMode := fmShareDenyNone; + else + FShareMode := fmShareExclusive; + end; +{$IFNDEF VER80}{$WARNINGS ON}{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetShareMode : TFtpShareMode; +begin +{$IFNDEF VER80}{$WARNINGS OFF}{$ENDIF} + case FShareMode of + fmShareCompat : Result := ftpShareCompat; + fmShareExclusive : Result := ftpShareExclusive; + fmShareDenyWrite : Result := ftpShareDenyWrite; + fmShareDenyRead : Result := ftpShareDenyRead; + fmShareDenyNone : Result := ftpShareDenyNone; + else + Result := ftpShareExclusive; + end; +{$IFNDEF VER80}{$WARNINGS ON}{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetDisplayFileMode(NewValue : TFtpDisplayFileMode); +begin + case NewValue of + ftpLineByLine, ftpBinary : FDisplayFileMode := NewValue; + else + FDisplayFileMode := ftpLineByLine; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetDisplayFileMode : TFtpDisplayFileMode; +begin + case FDisplayFileMode of + ftpLineByLine: Result := ftpLineByLine; + ftpBinary: Result := ftpBinary; + else + Result := ftpLineByLine; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetConnectionType(NewValue: TFtpConnectionType); +begin + { Must be disconnected to change the connection type } + if FConnected then begin + HandleError('FTP component connected'); + Exit; + end; + { Change connection type } + case NewValue of + ftpDirect: begin + FConnectionType := NewValue; + FControlSocket.SocksAuthentication := socksNoAuthentication; + FDataSocket.SocksAuthentication := socksNoAuthentication; + end; + ftpProxy: begin + FConnectionType := NewValue; + FPassive := True; + FControlSocket.SocksAuthentication := socksNoAuthentication; + FDataSocket.SocksAuthentication := socksNoAuthentication; + end; + ftpSocks4: begin + FConnectionType := NewValue; + FPassive := True; + with FControlSocket do begin + SocksLevel := '4'; + SocksAuthentication := socksAuthenticateUsercode; + end; + with FDataSocket do begin + SocksLevel := '4'; + SocksAuthentication := socksAuthenticateUsercode; + end; + end; + ftpSocks4A: begin + FConnectionType := NewValue; + FPassive := True; + with FControlSocket do begin + SocksLevel := '4A'; + SocksAuthentication := socksAuthenticateUsercode; + end; + with FDataSocket do begin + SocksLevel := '4A'; + SocksAuthentication := socksAuthenticateUsercode; + end; + end; + ftpSocks5: begin + FConnectionType := NewValue; + FPassive := True; + with FControlSocket do begin + SocksLevel := '5'; + SocksAuthentication := socksAuthenticateUsercode; + end; + with FDataSocket do begin + SocksLevel := '5'; + SocksAuthentication := socksAuthenticateUsercode; + end; + end; + else + FConnectionType := ftpDirect; + FControlSocket.SocksAuthentication := socksNoAuthentication; + FDataSocket.SocksAuthentication := socksNoAuthentication; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetConnectionType: TFtpConnectionType; +begin + case FConnectionType of + ftpDirect: Result := ftpDirect; + ftpProxy: Result := ftpProxy; + ftpSocks4: Result := ftpSocks4; + ftpSocks4A: Result := ftpSocks4A; + ftpSocks5: Result := ftpSocks5; + else + Result := ftpDirect; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetSocksPassword(NewValue: string); +begin + FControlSocket.SocksPassword := NewValue; + FDataSocket.SocksPassword := NewValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetSocksPassword: string; +begin + Result := FControlSocket.SocksPassword; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetSocksPort(NewValue: string); +begin + FControlSocket.SocksPort := NewValue; + FDataSocket.SocksPort := NewValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetSocksPort: string; +begin + Result := FControlSocket.SocksPort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetSocksServer(NewValue: string); +begin + FControlSocket.SocksServer := NewValue; + FDataSocket.SocksServer := NewValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetSocksServer: string; +begin + Result := FControlSocket.SocksServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetSocksUserCode(NewValue: string); +begin + FControlSocket.SocksUserCode := NewValue; + FDataSocket.SocksUserCode := NewValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetSocksUserCode: string; +begin + Result := FControlSocket.SocksUserCode; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.SetPassive(NewValue: Boolean); +begin + { Passive state must not be changed if Proxy or Socks connection type is selected } + case FConnectionType of + ftpDirect: FPassive := NewValue; + ftpProxy, ftpSocks4, ftpSocks4A, ftpSocks5: FPassive := True; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Receive a file or a directory list of a file list } +procedure TCustomFtpCli.DoGetAsync(RqType : TFtpRequest); +{$IFDEF VER80} +const + FILE_END = 2; +{$ENDIF} +var + Temp : String; + I : Integer; + TargetPort : WORD; { 10/30/99 } + TargetIP : String; +begin + if not FConnected then begin + HandleError(FGetCommand + ': not connected'); + Exit; + end; + + { If no filename was assigned, check if maybe we wanna view it, } + { meaning - FDisplayFileFlag } + if (Length(FLocalFileName) <= 0) and + not (FDisplayFileFlag or FStreamFlag) then begin + HandleError('LocalFileName empty'); + Exit; + end; + + if not FHighLevelFlag then + FRequestType := RqType; + + case RqType of + ftpGetAsync: FGetCommand := 'RETR'; + ftpDirAsync: FGetCommand := 'LIST'; + ftpLsAsync: FGetCommand := 'NLST'; + end; + + FServerSaidDone := FALSE; + FFileReceived := FALSE; + FRequestDoneFlag := FALSE; + FByteCount := 0; + FError := 0; + + FDataSocket.OnSessionAvailable := DataSocketGetSessionAvailable; + +{$IFDEF VER80} + { With Delphi 1 you need to nul terminate each string } + FLocalFileName[Length(FLocalFileName) + 1] := chr(0); +{$ENDIF} + + { open the destination file } + { Don't open a file if we're on FDisplayFileFlag } + if not FDisplayFileFlag then + try + DestroyLocalStream; + if FResumeAt <= 0 then begin + if not Assigned(FLocalStream) and not FStreamFlag then begin + FLocalStream := TFileStream.Create(FLocalFileName, fmCreate); + if FShareMode <> 0 then begin + { Not default mode, need to close and reopen file with } + { the given mode } + FLocalStream.Destroy; + FLocalStream := TFileStream.Create(FLocalFileName, + fmOpenWrite + FShareMode); + end; + end; + end + else begin + if not Assigned(FLocalStream) and not FStreamFlag then + FLocalStream := TFileStream.Create(FLocalFileName, + fmOpenWrite + FShareMode); + FLocalStream.Seek(FResumeAt, soFromBeginning) + end; + except + FLastResponse := 'Unable to open local file ' + FLocalFileName; + FStatusCode := 550; + SetErrorMessage; + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + exit; + end; + + if FPassive then begin + Temp := FPasvResponse; + Delete(Temp, 1, Pos('(', Temp)); + + TargetIP := ''; + for I := 1 to 4 do begin + TargetIP := TargetIP + Copy(Temp, 1, Pos(',',Temp) - 1) + '.'; + Delete(Temp, 1, Pos(',', Temp)); + end; + TargetIP := Copy(TargetIP, 1, Length(TargetIP) - 1); + + TargetPort := StrToInt(Copy(Temp, 1, Pos(',', Temp) - 1)) * 256; + Delete(Temp, 1, Pos(',', Temp)); + TargetPort := TargetPort + StrToInt(Copy(Temp, 1, Pos(')', Temp) - 1)); + + FDataSocket.Port := IntToStr(TargetPort); + FDataSocket.Addr := TargetIP; {ControlSocket.Addr;} + FDataSocket.LocalAddr := FLocalAddr; {bb} + FDataSocket.OnSessionConnected := DataSocketGetSessionConnected; + FDataSocket.LingerOnOff := wsLingerOff; + FDataSocket.LingerTimeout := 0; + FDataSocket.ComponentOptions := [wsoNoReceiveLoop]; { 26/10/02 } + try + FDataSocket.Connect; + except + on E:Exception do begin + FLastResponse := '550 ' + E.ClassName + ': ' + E.Message; + FStatusCode := 550; + SetErrorMessage; + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + exit; + end; + end; + end; + + StateChange(ftpWaitingResponse); + FNext := Next1GetAsync; + if Length(FHostFileName) > 0 then + SendCommand(FGetCommand + ' ' + FHostFileName) + else + SendCommand(FGetCommand); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when receiving the response for the RETR command we sent } +procedure TCustomFtpCli.Next1GetAsync; +begin + DisplayLastResponse; + GetInteger(@FLastResponse[1], FStatusCode); + if not (((FStatusCode div 10) = 15) or { Accept range 150-159 } + (FStatusCode = 125)) then begin { Accept code 125 } + SetErrorMessage; + FNext := nil; + FDataSocket.Close; + DestroyLocalStream; + { Reset the starting position } + FResumeAt := 0; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + FNext := Next2GetAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when the FTP server has sent the file we asked to GET } +procedure TCustomFtpCli.Next2GetAsync; +begin + DisplayLastResponse; + GetInteger(@FLastResponse[1], FStatusCode); + if not ((FStatusCode = 125) or (FStatusCode = 226) or + (FStatusCode = 250)) then begin + SetErrorMessage; + DestroyLocalStream; + FDataSocket.Close; + TriggerDisplay('! RETR/LIST/NLST Failed'); + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + FServerSaidDone := TRUE; + Next3GetAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here either if the file has been received of the FTP server has } +{ his response. } +procedure TCustomFtpCli.Next3GetAsync; +begin + {$IFDEF TRACE} TriggerDisplay('! Next3GetAsync'); {$ENDIF} + if (not FServerSaidDone) or (not FFileReceived) then + Exit; + + { Display statistics } + TransfertStats; + + { Reset the starting position } + FResumeAt := 0; + FRequestResult := FError; + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecPutAsync; +begin + FAppendFlag := FALSE; + FRequestType := ftpPutAsync; + DoPutAppendAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ExecAppendAsync; +begin + FAppendFlag := TRUE; + FRequestType := ftpAppendAsync; + DoPutAppendAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.DoPutAppendAsync; +{$IFDEF VER80} +const + FILE_END = 2; +{$ENDIF} +var + Temp : String; + I : Integer; + TargetPort : WORD; { 10/30/99 } + TargetIP : String; + bCancel : Boolean; +begin + if not FConnected then begin + HandleError('STOR/APPE: not connected'); + Exit; + end; + + if (not FStreamFlag) and (Length(FLocalFileName) <= 0) then begin + HandleError('LocalFileName empty'); + Exit; + end; + + FServerSaidDone := FALSE; + FFileSent := FALSE; + FRequestDoneFlag := FALSE; + FPutSessionOpened := FALSE; + FStorAnswerRcvd := FALSE; + FStartTime := 0; + FByteCount := 0; + FError := 0; + + bCancel := FALSE; + TriggerReadyToTransmit(bCancel); + if bCancel then begin + FErrorMessage := '426 Transmit cancelled by application'; + FStatusCode := 426; + TriggerDisplay('! ' + FErrorMessage); + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + + FDataSocket.OnSessionAvailable := DataSocketPutSessionAvailable; +{$IFDEF VER80} + { With Delphi 1 you need to nul terminate each string } + FLocalFileName[Length(FLocalFileName) + 1] := chr(0); +{$ENDIF} + + { open the local source file } + try + { Be sure to have previous instance closed } + DestroyLocalStream; + if not Assigned(FLocalStream) and not FStreamFlag then + FLocalStream := TFileStream.Create(FLocalFileName, + fmOpenRead + FShareMode); + FEofFlag := FALSE; + if FResumeAt > 0 then + FLocalStream.Seek(FResumeAt, soFromBeginning); + except + FErrorMessage := '426 Unable to open local file ' + FLocalFileName; + FStatusCode := 426; + TriggerDisplay('! ' + FErrorMessage); + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + + if FPassive then begin + Temp := FPasvResponse; { 26/12/99 } + Delete(Temp, 1, Pos('(', Temp)); + TargetIP := ''; + for I := 1 to 4 do begin + TargetIP := TargetIP + Copy(Temp, 1, Pos(',',Temp) - 1) + '.'; + Delete(Temp, 1, Pos(',', Temp)); + end; + TargetIP := Copy(TargetIP, 1, Length(TargetIP) - 1); + + TargetPort := StrToInt(Copy(Temp, 1, Pos(',', Temp) - 1)) * 256; + Delete(Temp, 1, Pos(',', Temp)); + TargetPort := TargetPort + StrToInt(Copy(Temp, 1, Pos(')', Temp) - 1)); + + FDataSocket.Port := IntToStr(TargetPort); + FDataSocket.Addr := TargetIP; {ControlSocket.Addr;} + FDataSocket.LocalAddr := FLocalAddr; {bb} + FDataSocket.OnSessionConnected := DataSocketPutSessionConnected; + { Normally we should use LingerOn with a timeout. But doing so will } + { often result in error 10055 triggered after a lot of consecutive } + { file transfers. There is code in DataSocketPutDataSent to make } + { sure last packet is sent completely. } + FDataSocket.LingerOnOff := wsLingerOff; + FDataSocket.LingerTimeout := 0; + FDataSocket.ComponentOptions := [wsoNoReceiveLoop]; { 26/10/02 } + try + FDataSocket.Connect; + except + on E:Exception do begin + FLastResponse := '426 ' + E.ClassName + ': ' + E.Message; + FStatusCode := 426; + SetErrorMessage; + FDataSocket.Close; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + end; + Exit; + end; + + StateChange(ftpWaitingResponse); + FNext := Next1PutAsync; + + if FAppendFlag then + SendCommand('APPE ' + FHostFileName) + else + SendCommand('STOR ' + FHostFileName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when receiving the response for the STOR command we sent } +procedure TCustomFtpCli.Next1PutAsync; +var + p : PChar; +begin + DisplayLastResponse; + if not (FLastResponse[1] in ['0'..'9']) then + Exit; { Continuation line, nothing to do } + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Exit; { Continuation line, nothing to do } + + if not ((FStatusCode = 150) or (FStatusCode = 125)) then begin + SetErrorMessage; + FNext := nil; + FDataSocket.Close; + DestroyLocalStream; + { Reset the starting position } + FResumeAt := 0; + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + + if FPassive then begin + { Send the first data block } + {$IFDEF TRACE} TriggerDisplay('! Send first block'); {$ENDIF} + FStorAnswerRcvd := TRUE; + FDataSocket.OnDataSent := DataSocketPutDataSent; + DataSocketPutDataSent(FDataSocket, 0); + end + else begin + { V240 FStorAnswerRcvd := TRUE; } + FStorAnswerRcvd := TRUE; + if FPutSessionOpened and (FStartTime = 0) then + PostMessage(Handle, WM_FTP_SENDDATA, 0, 0); + end; + + + FNext := Next2PutAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when the FTP server has received the file we sent (STOR) } +procedure TCustomFtpCli.Next2PutAsync; +var + p : PChar; +begin + DisplayLastResponse; + if not (FLastResponse[1] in ['0'..'9']) then + Exit; { Continuation line, nothing to do } + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Exit; { Continuation line, nothing to do } + if not ((FStatusCode = 226) or (FStatusCode = 250)) then begin + SetErrorMessage; + DestroyLocalStream; + FDataSocket.Close; + TriggerDisplay('! STOR Failed'); + FRequestResult := FStatusCode; + TriggerRequestDone(FRequestResult); + Exit; + end; + FServerSaidDone := TRUE; + Next3PutAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We comes here when the file has been sent or when the FTP server tell us } +{ he recived the file. } +procedure TCustomFtpCli.Next3PutAsync; +begin + {$IFDEF TRACE} TriggerDisplay('! Next3PutAsync'); {$ENDIF} + if (not FServerSaidDone) or (not FFileSent) then + Exit; + + { Display statistics } + TransfertStats; + + { Reset the starting position } + FResumeAt := 0; + FRequestResult := FError; + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.PortAsync; +var + Msg : String; + saddr : TSockAddrIn; + saddrlen : Integer; + DataPort : DWORD; { 10/30/99 } + IPAddr : TInAddr; +begin + { Makes the data socket listening for data connection } + FDataSocket.Proto := 'tcp'; + FDataSocket.Addr := '0.0.0.0'; { INADDR_ANY } + FDataSocket.Port := '0'; { IPPORT_ANY } + FDataSocket.OnSessionAvailable := nil; + FDataSocket.OnSessionClosed := nil; + FDataSocket.OnDataAvailable := nil; + + if FPassive then + DataPort := 0 { Not needed, makes compiler happy } + else begin + if (ftpFctGet in FFctSet) or (ftpFctDir in FFctSet) then {G.B. 2002/07/12} + FDataSocket.OnSessionAvailable := DataSocketGetSessionAvailable + else if ftpFctPut in FFctSet then + FDataSocket.OnSessionAvailable := DataSocketPutSessionAvailable; + FDataSocket.LingerOnOff := wsLingerOn; + FDataSocket.LingerTimeout := 10; + FDataSocket.Listen; + + { Get the port number as assigned by Windows } + saddrLen := SizeOf(saddr); + FDataSocket.GetSockName(saddr, saddrLen); + DataPort := WSocket_ntohs(saddr.sin_port); + end; + + { Get our IP address from our control socket } + saddrlen := SizeOf(saddr); + FControlSocket.GetSockName(saddr, saddrlen); + IPAddr := saddr.sin_addr; + + { Strange behaviour of PWS (FrontPage 97 Web Server for W95) } + { which do not like effective address when localhost is used } + if FPassive then + Msg := 'PASV' + else begin + if FControlSocket.sin.sin_addr.s_addr = WSocket_htonl($7F000001) then + Msg := Format('PORT 127,0,0,1,%d,%d', + [HiByte(DataPort), + LoByte(DataPort)]) + else + Msg := Format('PORT %d,%d,%d,%d,%d,%d', + [ord(IPAddr.S_un_b.s_b1), + ord(IPAddr.S_un_b.s_b2), + ord(IPAddr.S_un_b.s_b3), + ord(IPAddr.S_un_b.s_b4), + HiByte(DataPort), + LoByte(DataPort)]); + end; + + FByteCount := 0; + FFctPrv := ftpFctPort; + ExecAsync(ftpPortAsync, Msg, [200, 227], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ControlSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + FLastResponse := '500 ' + WSocketErrorDesc(Error) + + ' (Winsock error #' + IntToStr(Error) + ')'; + FStatusCode := 500; + FRequestResult := FStatusCode; { 21/05/99 } + SetErrorMessage; + TriggerRequestDone(Error); + end + else begin + FDnsResult := FControlSocket.DnsResult; + FControlSocket.Addr := FDnsResult; + FControlSocket.LocalAddr := FLocalAddr; {bb} + FControlSocket.Proto := 'tcp'; + if (FConnectionType = ftpProxy) and (FProxyPort <> '') then + FControlSocket.Port := FProxyPort + else + FControlSocket.Port := FPort; +{ FControlSocket.OnDisplay := FOnDisplay; } { Debugging only } + StateChange(ftpWaitingBanner); + try + FControlSocket.Connect; + except + on E:Exception do begin + FLastResponse := '500 ' + E.ClassName + ': ' + E.Message; + FStatusCode := 500; + FRequestResult := FStatusCode; { 21/05/99 } + SetErrorMessage; + TriggerRequestDone(FStatusCode); + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ControlSocketSessionConnected(Sender: TObject; Error: Word); +begin + { Do not trigger the client SessionConnected from here. We must wait } + { to have received the server banner. } + if Error <> 0 then begin + FLastResponse := '500 ' + WSocketErrorDesc(Error) + + ' (Winsock error #' + IntToStr(Error) + ')'; + FStatusCode := 500; + FRequestResult := FStatusCode; { Heedong Lim, 05/14/1999 } + SetErrorMessage; { Heedong Lim, 05/14/1999 } + FNextRequest := nil; + TriggerRequestDone(Error); + FControlSocket.Close; + StateChange(ftpReady); + end + else + FConnected := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ControlSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I, J : Integer; + p : PChar; +begin + Len := FControlSocket.Receive(@FReceiveBuffer[FReceiveLen], + sizeof(FReceiveBuffer) - FReceiveLen - 1); + + if FRequestType = ftpRqAbort then + Exit; + + if Len = 0 then begin + FControlSocket.Close; + Exit; + end; + if Len < 0 then + Exit; + + FReceiveBuffer[FReceiveLen + Len] := #0; + FReceiveLen := FReceiveLen + Len; + + while FReceiveLen > 0 do begin + if ftpAcceptLF in FOptions then begin + I := Pos(#10, FReceiveBuffer); + J := I; + end + else begin + I := Pos(#13#10, FReceiveBuffer); + J := I + 1; + end; + if I <= 0 then + break; + if I > FReceiveLen then + break; + + FLastResponse := Copy(FReceiveBuffer, 1, I - 1); + { Remove trailing control chars } + while (Length(FLastResponse) > 0) and + (FLastResponse[Length(FLastResponse)] in [#10, #13]) do + SetLength(FLastResponse, Length(FLastResponse) - 1); + + if Assigned(FOnResponse) then + FOnresponse(Self); + +{$IFDEF DUMP} + FDumpBuf := '>|'; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.WriteBuffer(FLastResponse[1], Length(FLastResponse)); + FDumpBuf := '|' + #13#10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} +{$IFDEF VER80} + { Add a nul byte at the end of string for Delphi 1 } + FLastResponse[Length(FLastResponse) + 1] := #0; +{$ENDIF} + FReceiveLen := FReceiveLen - J; + if FReceiveLen > 0 then + Move(FReceiveBuffer[J], FReceiveBuffer[0], FReceiveLen + 1) + else if FReceiveLen < 0 then + FReceiveLen := 0; + + if FState = ftpWaitingBanner then begin + DisplayLastResponse; + if not (FLastResponse[1] in ['0'..'9']) then + Continue; { Continuation line, ignore } + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Continue; { Continuation line, ignore } + if FStatusCode <> 220 then begin + SetErrorMessage; + FRequestResult := FStatusCode; + FControlSocket.Close; + Exit; + end; + + StateChange(ftpConnected); + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); + + if Assigned(FWhenConnected) then + FWhenConnected + else begin + TriggerRequestDone(0); + end; + end + else if FState = ftpWaitingResponse then begin + if not (FLastResponse[1] in ['0'..'9']) then begin { 22/11/99 } + DisplayLastResponse; { 02/11/01 } + Continue; { Continuation line, ignore } + end; + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then begin + DisplayLastResponse; { 02/11/01 } + Continue; { Continuation line, ignore } + end; + if Assigned(FNext) then + FNext + else + HandleError('Program error: FNext is nil'); + end + else { Unexpected data received } + DisplayLastResponse; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.ControlSocketSessionClosed(Sender: TObject; Error: Word); +begin + if FConnected then begin + FConnected := FALSE; + if FState <> ftpAbort then + StateChange(ftpNotConnected); + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); + end; + if FState <> ftpAbort then + StateChange(ftpInternalReady); + if not (FRequestType in [ftpRqAbort]) then begin + if Error <> 0 then begin + FLastResponse := '500 Control connection closed. ' + + WSocketErrorDesc(Error) + + ' (Winsock error #' + IntToStr(Error) + ')'; + FStatusCode := 500; + FRequestResult := FStatusCode; { 06 apr 2002 } + SetErrorMessage; + end; + TriggerRequestDone(FRequestResult); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerStateChange; +begin + if Assigned(FOnStateChange) then + FOnStateChange(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerRequestDone(Error: Word); +begin + if not FRequestDoneFlag then begin + FRequestDoneFlag := TRUE; + if (Error = 0) and Assigned(FNextRequest) then begin + if (FState <> ftpAbort) + and (FState <> ftpPasvReady) { 19.09.2002 } + { and 28/06/2002 + not ((ftpFctPut in FFctSet) and (FPassive = true))} then + StateChange(ftpInternalReady); + FNextRequest; + end + else begin + StateChange(ftpReady); + if FDataSocket.State <> wsClosed then + FDataSocket.Close; + { Restore the lastresponse saved before quit command } + if FHighLevelFlag and (FStatusCodeSave >= 0) then begin + FLastResponse := FLastResponseSave; + FStatusCode := FStatusCodeSave; + end; + FHighLevelFlag := FALSE; + FNextRequest := nil; + PostMessage(Handle, WM_FTP_REQUEST_DONE, 0, Error); + { if Assigned(FOnRequestDone) then + FOnRequestDone(Self, FRequestType, Error); } + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomFtpCli.TriggerReadyToTransmit(var bCancel : Boolean); +begin + if Assigned(FOnReadyToTransmit) then + FOnReadyToTransmit(Self, bCancel); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomFtpCli.GetConnected : Boolean; +begin + Result := FControlSocket.State <> wsClosed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* * * *} +{* * TFtpClient * *} +{* * * *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TFtpClient.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FTimeout := 15; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Open : Boolean; +begin + Result := Synchronize(OpenAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.User : Boolean; +begin + Result := Synchronize(UserAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Pass : Boolean; +begin + Result := Synchronize(PassAsync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Connect : Boolean; +begin + Result := Synchronize(ConnectASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Cwd : Boolean; +begin + Result := Synchronize(CwdASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Pwd : Boolean; +begin + Result := Synchronize(PwdASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.CDup : Boolean; +begin + Result := Synchronize(CDupASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.TypeSet : Boolean; +begin + Result := Synchronize(TypeSetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.TypeBinary : Boolean; +begin + Binary := TRUE; + Result := Synchronize(TypeSetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.TypeAscii : Boolean; +begin + Binary := FALSE; + Result := Synchronize(TypeSetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Get : Boolean; +begin + Result := Synchronize(GetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Put : Boolean; +begin + Result := Synchronize(PutASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ By A.Burlakov: new function for resuming uploads } +{ Uses REST + STOR commands instead APPEND } +function TFtpClient.RestPut : Boolean; +begin + Result := Synchronize(RestPutASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.RestartPut : Boolean; +begin + Result := Synchronize(RestartPutASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Append : Boolean; +begin + Result := Synchronize(AppendASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Quit : Boolean; +begin + Result := Synchronize(QuitASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Abort : Boolean; +begin + Result := Synchronize(AbortASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Receive : Boolean; +begin + Result := Synchronize(ReceiveASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Transmit : Boolean; +begin + Result := Synchronize(TransmitASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.AppendFile : Boolean; +begin + Result := Synchronize(AppendFileASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Dir : Boolean; +begin + Result := Synchronize(DirASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Directory : Boolean; +begin + Result := Synchronize(DirectoryASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Ls : Boolean; +begin + Result := Synchronize(LsASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.List : Boolean; +begin + Result := Synchronize(ListASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Mkd : Boolean; +begin + Result := Synchronize(MkdASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Mkdir : Boolean; +begin + Result := Synchronize(MkdirASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Ren : Boolean; +begin + Result := Synchronize(RenASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Rename : Boolean; +begin + Result := Synchronize(RenameASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Dele : Boolean; +begin + Result := Synchronize(DeleASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Delete : Boolean; +begin + Result := Synchronize(DeleteASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Rmd : Boolean; +begin + Result := Synchronize(RmdASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Rmdir : Boolean; +begin + Result := Synchronize(RmdirASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Syst : Boolean; +begin + Result := Synchronize(SystASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.System : Boolean; +begin + Result := Synchronize(SystemASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Size : Boolean; +begin + Result := Synchronize(SizeASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.FileSize : Boolean; +begin + Result := Synchronize(FileSizeASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.AbortXfer: Boolean; +begin + Result := Synchronize(AbortXferASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Quote : Boolean; +begin + Result := Synchronize(QuoteASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.DoQuote : Boolean; +begin + Result := Synchronize(DoQuoteASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.RestGet : Boolean; +begin + Result := Synchronize(RestGetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.RestartGet : Boolean; +begin + Result := Synchronize(RestartGetASync); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Progress : Boolean; +begin + Result := inherited Progress; + { Evaluate the timeout period again } + if FTimeout > 0 then + FTimeStop := LongInt(GetTickCount) + LongInt(FTimeout) * 1000; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.MessagePump; +begin +{$IFDEF VER80} + Application.ProcessMessages; +{$ELSE} + if FMultiThreaded then + FControlSocket.ProcessMessages + else +{$IFDEF NOFORMS} + { The Forms unit (TApplication object) has not been included. } + { We used either an external message pump or our internal message pump. } + { External message pump has to set Terminated property to TRUE when the } + { application is terminated. } + if Assigned(FOnMessagePump) then + FOnMessagePump(Self) + else + FControlSocket.ProcessMessages; +{$ELSE} + Application.ProcessMessages; +{$ENDIF} +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.WaitUntilReady : Boolean; +begin + Result := TRUE; { Assume success } + FTimeStop := LongInt(GetTickCount) + LongInt(FTimeout) * 1000; + while TRUE do begin + if FState in [ftpReady, ftpInternalReady] then begin + { Back to ready state, the command is finished } + Result := (FRequestResult = 0); + break; + end; + + if {$IFNDEF NOFORMS} Application.Terminated or + {$ELSE} Terminated or + {$ENDIF} + ((FTimeout > 0) and (LongInt(GetTickCount) > FTimeStop)) then begin + { Timeout occured } + AbortAsync; + FErrorMessage := '426 Timeout'; + FStatusCode := 426; + Result := FALSE; { Command failed } + break; + end; + MessagePump; + { Do not use 100% CPU, but slow down transfert on high speed LAN } + {$IFNDEF VER80} + Sleep(0); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Synchronize(Proc : TFtpNextProc) : Boolean; +begin + try + Proc; + Result := WaitUntilReady; + except + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + diff --git a/lib/ics/Delphi/Vc32/FtpSrv.dcu b/lib/ics/Delphi/Vc32/FtpSrv.dcu new file mode 100644 index 00000000..181d0087 Binary files /dev/null and b/lib/ics/Delphi/Vc32/FtpSrv.dcu differ diff --git a/lib/ics/Delphi/Vc32/FtpSrv.pas b/lib/ics/Delphi/Vc32/FtpSrv.pas new file mode 100644 index 00000000..b050b24b --- /dev/null +++ b/lib/ics/Delphi/Vc32/FtpSrv.pas @@ -0,0 +1,3360 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TFtpServer class encapsulate the FTP protocol (server side) + See RFC-959 for a complete protocol description. +Creation: April 21, 1998 +Version: 1.24 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Apr 29, 1998 V0.90 released for beta testing. +May 01, 1998 V0.92 Adapted for Delphi 1.0 +May 03, 1998 V0.93 Adapted for Delphi 2.0 and C++Builder +May 04, 1998 V0.94 Use '/' or '\' as path delimiter. Expose only '/' to the + outside. Stripped any telnet options (IE send two !). Handled + absolute path. Implemented SIZE and REST commands. + Added support for UNC (not finished !) +May 06, 1998 V0.95 Corrected spurious 226 message on PASV mode STOR. + Made GetInteger retunrs a LongInt. + Use a LongInt for N in CommandPORT (needed for 16 bits) + Added slash substitution in BuildFilePath command. +Jul 09, 1998 V1.00 Adapted for Delphi 4, removed beta status. +Jul 21, 1998 V1.01 Added OnValidateDele event + Changed function to get file size (do not open the file) +Feb 14, 1999 V1.02 Replaced straight winsock call by indirect calls thru + wsocket (this provide runtime link to winsock DLL). +Mar 06, 1999 V1.03 Added code from Plegge, Steve to add + APPE, XMKD, KRMD and STRU commands support. +Jul 24, 1999 V1.04 Replaced msgStorDisabled value from '500 Cannot STOR.' to + '501 Permission Denied' because CuteFTP doesn't like error 500. + Suggested by Cedric Veilleux . +Aug 20, 1999 V1.05 Added compile time options. Revised for BCB4. + Added Addr property to select interface in multihomed computers. +Oct 02, 1999 V1.06 Added OnValidateRnFr and OnValidateRnTo events. + Initialized Allowed variable to TRUE before triggerValidateDele. +Nov 24, 1999 V1.07 Added MTDM support. Thanks to Bruce Christensen + for his code. +Jan 24, 2000 V1.08 Patch IE5 bug in file names. Thanks to +Jun 08, 2000 V1.09 Added 'A N' type for type command for AIX systems. +Oct 25, 2000 V1.10 Exposed list of clients thru Client[] property. +Oct 29, 2000 V1.11 Added IsClient() method. + Implemented OnValidateRmd event. +Nov 01, 2000 V1.12 Implemented proposals from Carl@Smotricz.com: + (1) support for MODE command, but only the default do-nothing + option S. (2) binding the data socket to the local host address + and port 20 ('ftp-data'). (3) detection of failure to open the + data connection for STOR or RETR. + Added option wsoNoReceiveLoop to sockets. See comments in TWSocket + about this option. Help in very fast LAN. +Nov 11, 2000 V1.13 Checked for DOS attack. Close connection when buffer + overflow occured. Thanks to Lester for finding + this security hole. +Jun 18, 2001 V1.14 Fixed file left open when storing and client broken data + connection. Thanks to Davie +Jul 27, 2001 V1.15 I fixed a race condition between WMFtpSrvClientClosed and + WMFtpSrvCloseData found by Matthew Comb who + worked with Davie . Now WMFtpSrvCloseData + receive Client in LParam and check if client is still in client + list. + Fixed a but with resumed put. Thanks Yvan Turkan iturcan@gamo.sk ! + Added a procedure to disconnect a single client. + Changed all Exception by FtpServerException. + Changed all "Error" by "AError" to avoid conflict with global var. + Added Client.ID property to uniquely indentify the client. Pass + this ID along with all posted messages and verify if the correct + client still exists when message is processed. +Jul 30, 2001 V1.16 Added same check as above for WMFtpSrvCloseData. +Sep 09, 2001 V1.17 Eric Pascual added Store Unique (STOU) + command. +Feb 26, 2002 V1.18 Fastream Technologies (http://www.fastream.com) found a bug + in Disconnect and DisconnectAll which prevented data connection + to be closed and client component to be destroyed. +Jul 06, 2002 V1.19 Fastream Technologies (http://www.fastream.com) fixed + CommandXPWD and CommandPWD to make the path in answer as + "/c:/windows" instead of "c:/windows" which is more compatible + with the UNIX standard that most clients expect. +Sep 16, 2002 V1.20 Added OnValidateSize event. + Allowed "REST 0" as a valid command. +Sep 17, 2002 V1.21 Sven Schmidts added partional FEAT + command, must extended, because I doesn't know what commands are + special-featured. +Oct 26, 2002 V1.22 Introduced OnBuildFilePath to allow component use to change + the file path on the fly. + Thanks to Serge Chelli who proposed + this change. +Nov 01, 2002 V1.23 When client request passive mode, select a port from a + range of ports instead of letting the OS choose one. This ease the + use of a FTP server behind a firewall. Passive mode transferts + will use port in the specified range. + Also implemented fixed IP for passive mode. + Thanks to Ian Tuck for code base. +Nov 06, 2002 V1.24 Added definition for PBoolean which is missing in some + older Delphi version and in BCB. +Nov 11, 2002 V1.25 Revised for Delphi 1 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpSrv; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER130} { C++ Builder V5.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER140} { C++ Builder V6.0 } + {$ObjExportAll On} +{$ENDIF} + +{$DEFINE BIND_FTP_DATA} + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, Winsock, WSocket, FtpSrvC, FtpSrvT; + +const + FtpServerVersion = 125; + CopyRight : String = ' TFtpServer (c) 1998-2002 F. Piette V1.25 '; + WM_FTPSRV_CLOSE_REQUEST = WM_USER + 1; + WM_FTPSRV_CLIENT_CLOSED = WM_USER + 2; + WM_FTPSRV_ABORT_TRANSFER = WM_USER + 3; + WM_FTPSRV_CLOSE_DATA = WM_USER + 4; + WM_FTPSRV_START_SEND = WM_USER + 5; + +type + PBoolean = ^Boolean; + FtpServerException = class(Exception); +{ Various Delphi and C++Builder version handle string parameter passed as var } +{ differently. To get application code compatible across all versions, we } +{ need to define our own string type. We use the larger we can with the given } +{ compiler version. btw: the 255 limit is not a problem because it applies to } +{ the command lines sent to the server and 255 should be enough except if } +{ you use incredibly long file names. } +{$IFDEF VER100} { Delphi 3 } + TFtpString = String; +{$ELSE} { All others } + TFtpString = String[255]; +{$ENDIF} +{$IFDEF VER80} + WPARAM = WORD; + LPARAM = DWORD; +{$ENDIF} + TFtpCtrlSocketClass = class of TFtpCtrlSocket; + TFtpSrvAuthenticateEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + UserName : TFtpString; + Password : TFtpString; + var Authenticated : Boolean) of object; + TFtpSrvChangeDirectoryEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + Directory : TFtpString; + var Allowed : Boolean) of object; + TFtpSrvBuildDirectoryEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var Directory : TFtpString; + Detailed : Boolean) of object; + TFtpSrvClientConnectEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + AError : Word) of object; + TFtpSrvDataSessionConnectedEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word) of object; + TFtpSrvClientCommandEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString) of object; + TFtpSrvAnswerToClientEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var Answer : TFtpString) of object; + TFtpSrvValidateXferEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean) of object; + TFtpSrvBuildFilePathEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + const Directory : String; + const FileName : String; + var NewFileName : String) of object; + TFtpSrvDataAvailableEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + Data : TWSocket; + Buf : PChar; + Len : LongInt; + AError : Word) of object; + TFtpSrvRetrDataSentEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word) of object; + TFtpSrvGetUniqueFileNameEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var FileName : TFtpString) of object; + TFtpSrvGetProcessingEvent = procedure (Sender : TObject; + Client : TFtpCtrlSocket; + var DelayedSend : Boolean) of object; + TFtpSrvCommandProc = procedure (Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString) of object; + TFtpSrvCommandTableItem = record + KeyWord : String; + Proc : TFtpSrvCommandProc; + end; + TFtpServer = class(TComponent) + protected + FAddr : String; + FPort : String; + FBanner : String; + FServSocket : TWSocket; + FWindowHandle : HWND; + FClientClass : TFtpCtrlSocketClass; + FClientList : TList; + FClientNum : LongInt; + FMaxClients : LongInt; + FCmdTable : array [0..32] of TFtpSrvCommandTableItem; + FLastCmd : Integer; + FUserData : LongInt; { Reserved for component user } + FPasvPortRangeStart : Integer; + FPasvPortRangeSize : Integer; + FPasvPortTable : PBoolean; + FPasvPortTableSize : Integer; + FPasvIpAddr : String; + FOnStart : TNotifyEvent; + FOnStop : TNotifyEvent; + FOnAuthenticate : TFtpSrvAuthenticateEvent; + FOnClientConnect : TFtpSrvClientConnectEvent; + FOnClientDisconnect : TFtpSrvClientConnectEvent; + FOnClientCommand : TFtpSrvClientCommandEvent; + FOnAnswerToClient : TFtpSrvAnswerToClientEvent; + FOnChangeDirectory : TFtpSrvChangeDirectoryEvent; + FOnMakeDirectory : TFtpSrvChangeDirectoryEvent; + FOnBuildDirectory : TFtpSrvBuildDirectoryEvent; + FOnAlterDirectory : TFtpSrvBuildDirectoryEvent; + FOnValidatePut : TFtpSrvValidateXferEvent; + FOnValidateSize : TFtpSrvValidateXferEvent; + FOnValidateDele : TFtpSrvValidateXferEvent; + FOnValidateRmd : TFtpSrvValidateXferEvent; + FOnValidateRnFr : TFtpSrvValidateXferEvent; + FOnValidateRnTo : TFtpSrvValidateXferEvent; + FOnStorSessionConnected : TFtpSrvDataSessionConnectedEvent; + FOnStorSessionClosed : TFtpSrvDataSessionConnectedEvent; + FOnStorDataAvailable : TFtpSrvDataAvailableEvent; + FOnValidateGet : TFtpSrvValidateXferEvent; + FOnRetrSessionConnected : TFtpSrvDataSessionConnectedEvent; + FOnRetrSessionClosed : TFtpSrvDataSessionConnectedEvent; + FOnRetrDataSent : TFtpSrvRetrDataSentEvent; + FOnGetUniqueFileName : TFtpSrvGetUniqueFileNameEvent ; + FOnGetProcessing : TFtpSrvGetProcessingEvent; + FOnBuildFilePath : TFtpSrvBuildFilePathEvent; { serge le 5/10/2002 } + procedure Notification(AComponent: TComponent; operation: TOperation); override; + procedure ServSocketSessionAvailable(Sender : TObject; AError : Word); + procedure ServSocketStateChange(Sender : TObject; OldState, NewState : TSocketState); + procedure ClientSessionClosed(Sender : TObject; AError : Word); + procedure ClientDataSent(Sender : TObject; AError : Word); + procedure ClientCommand(Sender : TObject; CmdBuf : PChar; CmdLen : Integer); + procedure ClientPassiveSessionAvailable(Sender : TObject; AError : Word); + procedure ClientStorSessionConnected(Sender : TObject; AError : Word); + procedure ClientStorSessionClosed(Sender : TObject; AError : Word); + procedure ClientStorDataAvailable(Sender: TObject; AError : word); + procedure ClientRetrSessionConnected(Sender : TObject; AError : Word); + procedure ClientRetrSessionClosed(Sender : TObject; AError : Word); + procedure ClientRetrDataSent(Sender : TObject; AError : Word); + procedure SendAnswer(Client : TFtpCtrlSocket; Answer : TFtpString); + procedure SendNextDataChunk(Client : TFtpCtrlSocket; Data : TWSocket); + procedure StartSendData(Client : TFtpCtrlSocket); + procedure BuildDirectory(Client : TFtpCtrlSocket; var Params : TFtpString; Stream : TStream; Detailed : Boolean); + procedure TriggerServerStart; virtual; + procedure TriggerServerStop; virtual; + procedure TriggerAuthenticate(Client : TFtpCtrlSocket; + UserName : String; + PassWord : String; + var Authenticated : Boolean); virtual; + procedure TriggerChangeDirectory(Client : TFtpCtrlSocket; + Directory : String; + var Allowed : Boolean); virtual; + procedure TriggerMakeDirectory(Client : TFtpCtrlSocket; + Directory : String; + var Allowed : Boolean); virtual; + procedure TriggerBuildDirectory(Client : TFtpCtrlSocket; + var Params : TFtpString; + Detailed : Boolean); + procedure TriggerAlterDirectory(Client : TFtpCtrlSocket; + var Params : TFtpString; + Detailed : Boolean); + procedure TriggerSendAnswer(Client : TFtpCtrlSocket; + var Answer : TFtpString); virtual; + procedure TriggerClientConnect(Client : TFtpCtrlSocket; AError : Word); virtual; + procedure TriggerClientDisconnect(Client : TFtpCtrlSocket; AError : Word); virtual; + procedure TriggerClientCommand(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure TriggerStorSessionConnected(Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); virtual; + procedure TriggerStorSessionClosed(Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); virtual; + procedure TriggerValidatePut(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerValidateSize(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerValidateDele(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerValidateRmd(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerValidateRnFr(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerValidateRnTo(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerRetrSessionConnected(Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); virtual; + procedure TriggerRetrSessionClosed(Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); virtual; + procedure TriggerValidateGet(Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); virtual; + procedure TriggerStorDataAvailable(Client : TFtpCtrlSocket; + Data : TWSocket; + Buf : PChar; + Len : LongInt; + AError : Word); virtual; + procedure TriggerRetrDataSent(Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); virtual; + procedure TriggerGetUniqueFileName(Client : TFtpCtrlSocket; + var FileName : TFtpString); virtual; + procedure TriggerBuildFilePath(Client : TFtpCtrlSocket; + const Directory : String; + const FileName : String; + var NewFileName : String); virtual; + function BuildFilePath(Client : TFtpCtrlSocket; + Directory : String; + FileName : String) : String; + function GetClientCount : Integer; virtual; + function GetClient(nIndex : Integer) : TFtpCtrlSocket; virtual; +{ !!!!!!!!!!!!!!!! NGB: Added next two lines } + procedure FreeCurrentPasvPort(DataSocket : TFtpCtrlSocket); + function GetNextAvailablePasvPort : String; +{ !!!!!!!!!!!!!!!! NGB: Added last two lines } + function GetActive : Boolean; + procedure SetActive(newValue : Boolean); + procedure SetPasvPortRangeSize(const NewValue: Integer); + procedure SetPasvPortRangeStart(const NewValue: Integer); + procedure AddCommand(const Keyword : String; + const Proc : TFtpSrvCommandProc); virtual; + procedure WMFtpSrvCloseRequest(var msg: TMessage); + message WM_FTPSRV_CLOSE_REQUEST; + procedure WMFtpSrvClientClosed(var msg: TMessage); + message WM_FTPSRV_CLIENT_CLOSED; + procedure WMFtpSrvAbortTransfer(var msg: TMessage); + message WM_FTPSRV_ABORT_TRANSFER; + procedure WMFtpSrvCloseData(var msg: TMessage); + message WM_FTPSRV_CLOSE_DATA; + procedure WMFtpSrvStartSend(var msg: TMessage); + message WM_FTPSRV_START_SEND; + procedure CommandDirectory(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString; + Detailed : Boolean); + procedure CommandUSER(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandPASS(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandQUIT(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandNOOP(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandLIST(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandNLST(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandDELE(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandSIZE(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandREST(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandRNFR(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandRNTO(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandPORT(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandSTOR(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandRETR(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandTYPE(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandCWD (Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandChangeDir(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandMKD (Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandRMD (Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandCDUP(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandXPWD(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandPWD (Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandSYST(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandABOR(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandPASV(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandAPPE(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandSTRU(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandMDTM(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandMODE(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandOverflow(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandSTOU(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + procedure CommandFEAT(Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); virtual; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Start; + procedure Stop; + procedure Disconnect(Client : TFtpCtrlSocket); + procedure DisconnectAll; + procedure DoStartSendData(Client: TFtpCtrlSocket); virtual; + procedure WndProc(var MsgRec: TMessage); + { Check if a given object is one of our clients } + function IsClient(SomeThing : TObject) : Boolean; + property ServSocket : TWSocket read FServSocket; + property Handle : HWND read FWindowHandle; + property ClientCount : Integer read GetClientCount; + property Active : Boolean read GetActive + write SetActive; + property ClientClass : TFtpCtrlSocketClass + read FClientClass + write FClientClass; + { Client[] give direct access to anyone of our clients } + property Client[nIndex : Integer] : TFtpCtrlSocket + read GetClient; + published + property Addr : String read FAddr + write FAddr; + property Port : String read FPort + write FPort; + property Banner : String read FBanner + write FBanner; + property UserData : LongInt read FUserData + write FUserData; + property MaxClients : LongInt read FMaxClients + write FMaxClients; + property PasvIpAddr : String read FPasvIpAddr + write FPasvIpAddr; + property PasvPortRangeStart : Integer read FPasvPortRangeStart + write SetPasvPortRangeStart; + property PasvPortRangeSize : Integer read FPasvPortRangeSize + write SetPasvPortRangeSize; + property OnStart : TNotifyEvent + read FOnStart + write FOnStart; + property OnStop : TNotifyEvent + read FOnStop + write FOnStop; + property OnAuthenticate : TFtpSrvAuthenticateEvent + read FOnAuthenticate + write FOnAuthenticate; + property OnClientDisconnect : TFtpSrvClientConnectEvent + read FOnClientDisconnect + write FOnClientDisconnect; + property OnClientConnect : TFtpSrvClientConnectEvent + read FOnClientConnect + write FOnClientConnect; + property OnClientCommand : TFtpSrvClientCommandEvent + read FOnClientCommand + write FOnClientCommand; + property OnAnswerToClient : TFtpSrvAnswerToClientEvent + read FOnAnswerToClient + write FOnAnswerToClient; + property OnChangeDirectory : TFtpSrvChangeDirectoryEvent + read FOnChangeDirectory + write FOnChangeDirectory; + property OnMakeDirectory : TFtpSrvChangeDirectoryEvent + read FOnMakeDirectory + write FOnMakeDirectory; + property OnBuildDirectory : TFtpSrvBuildDirectoryEvent + read FOnBuildDirectory + write FOnBuildDirectory; + property OnAlterDirectory : TFtpSrvBuildDirectoryEvent + read FOnAlterDirectory + write FOnAlterDirectory; + property OnStorSessionConnected : TFtpSrvDataSessionConnectedEvent + read FOnStorSessionConnected + write FOnStorSessionConnected; + property OnRetrSessionConnected : TFtpSrvDataSessionConnectedEvent + read FOnRetrSessionConnected + write FOnRetrSessionConnected; + property OnStorSessionClosed : TFtpSrvDataSessionConnectedEvent + read FOnStorSessionClosed + write FOnStorSessionClosed; + property OnRetrSessionClosed : TFtpSrvDataSessionConnectedEvent + read FOnRetrSessionClosed + write FOnRetrSessionClosed; + property OnRetrDataSent : TFtpSrvRetrDataSentEvent + read FOnRetrDataSent + write FOnRetrDataSent; + property OnValidatePut : TFtpSrvValidateXferEvent + read FOnValidatePut + write FOnValidatePut; + property OnValidateSize : TFtpSrvValidateXferEvent + read FOnValidateSize + write FOnValidateSize; + property OnValidateDele : TFtpSrvValidateXferEvent + read FOnValidateDele + write FOnValidateDele; + property OnValidateRmd : TFtpSrvValidateXferEvent + read FOnValidateRmd + write FOnValidateRmd; + property OnValidateRnFr : TFtpSrvValidateXferEvent + read FOnValidateRnFr + write FOnValidateRnFr; + property OnValidateRnTo : TFtpSrvValidateXferEvent + read FOnValidateRnTo + write FOnValidateRnTo; + property OnValidateGet : TFtpSrvValidateXferEvent + read FOnValidateGet + write FOnValidateGet; + property OnStorDataAvailable : TFtpSrvDataAvailableEvent + read FOnStorDataAvailable + write FOnStorDataAvailable; + property OnGetUniqueFileName : TFtpSrvGetUniqueFileNameEvent + read FOnGetUniqueFileName + write FOnGetUniqueFileName ; + property OnGetProcessing : TFtpSrvGetProcessingEvent + read FOnGetProcessing + write FOnGetProcessing; + property OnBuildFilePath : TFtpSrvBuildFilePathEvent + read FOnBuildFilePath + write FOnBuildFilePath; + end; + +procedure Register; + +implementation + +const + msgDftBanner = '220 ICS FTP Server ready.'; + msgTooMuchClients = '421 Too many users connected.'; + msgCmdUnknown = '500 ''%s'': command not understood.'; + msgLoginFailed = '530 Login incorrect.'; + msgNotLogged = '530 Please login with USER and PASS.'; + msgNoUser = '503 Login with USER first.'; + msgLogged = '230 User %s logged in.'; + msgPassRequired = '331 Password required for %s.'; + msgCWDSuccess = '250 CWD command successful. "%s" is current directory.'; + msgCWDFailed = '501 CWD failed. %s'; + msgPWDSuccess = '257 "%s" is current directory.'; + msgQuit = '221 Goodbye.'; + msgPortSuccess = '200 Port command successful.'; + msgPortFailed = '501 Invalid PORT command.'; + msgStorDisabled = '501 Permission Denied'; {'500 Cannot STOR.';} + msgStorSuccess = '150 Opening data connection for %s.'; + msgStorFailed = '501 Cannot STOR. %s'; + msgStorAborted = '426 Connection closed; %s.'; + msgStorOk = '226 File received ok'; + msgStorError = '426 Connection closed; transfer aborted. Error #%d'; + msgRetrDisabled = '500 Cannot RETR.'; + msgRetrSuccess = '150 Opening data connection for %s.'; + msgRetrFailed = '501 Cannot RETR. %s'; + msgRetrAborted = '426 Connection closed; %s.'; + msgRetrOk = '226 File sent ok'; + msgRetrError = '426 Connection closed; transfer aborted. Error #%d'; + msgSystem = '215 UNIX Type: L8 Internet Component Suite'; + msgDirOpen = '150 Opening data connection for directory list.'; + msgDirFailed = '451 Failed: %s.'; + msgTypeOk = '200 Type set to %s.'; + msgTypeFailed = '500 ''TYPE %s'': command not understood.'; + msgDeleNotExists = '550 ''%s'': no such file or directory.'; + msgDeleOk = '250 File ''%s'' deleted.'; + msgDeleFailed = '450 File ''%s'' can''t be deleted.'; + msgDeleSyntax = '501 Syntax error in parameter.'; + msgDeleDisabled = '550 Cannot delete.'; + msgRnfrNotExists = '550 ''%s'': no such file or directory.'; + msgRnfrSyntax = '501 Syntax error is parameter.'; + msgRnfrOk = '350 File exists, ready for destination name.'; + msgRnFrDisabled = '500 Cannot RNFR.'; + msgRntoNotExists = '550 ''%s'': no such file or directory.'; + msgRntoAlready = '553 ''%s'': file already exists.'; + msgRntoOk = '250 File ''%s'' renamed to ''%s''.'; + msgRntoFailed = '450 File ''%s'' can''t be renamed.'; + msgRntoSyntax = '501 Syntax error in parameter.'; + msgRnToDisabled = '500 Cannot RNTO.'; + msgMkdOk = '257 ''%s'': directory created.'; + msgMkdAlready = '550 ''%s'': file or directory already exists.'; + msgMkdFailed = '550 ''%s'': can''t create directory.'; + msgMkdSyntax = '501 Syntax error in parameter.'; + msgRmdOk = '250 ''%s'': directory removed.'; + msgRmdNotExists = '550 ''%s'': no such directory.'; + msgRmdFailed = '550 ''%s'': can''t remove directory.'; + msgRmdDisabled = '500 Cannot remove directory.'; + msgRmdSyntax = '501 Syntax error in parameter.'; + msgNoopOk = '200 Ok. Parameter was ''%s''.'; + msgAborOk = '225 ABOR command successful.'; + msgPasvLocal = '227 Entering Passive Mode (127,0,0,1,%d,%d).'; + msgPasvRemote = '227 Entering Passive Mode (%d,%d,%d,%d,%d,%d).'; + msgPasvExcept = '500 PASV exception: ''%s''.'; + msgSizeOk = '213 %d'; + msgSizeDisabled = '501 Permission Denied'; + msgSizeFailed = '550 Command failed: %s.'; + msgSizeSyntax = '501 Syntax error in parameter.'; + msgRestOk = '350 REST supported. Ready to resume at byte offset %d.'; + msgRestZero = '501 Required byte offset parameter bad or missing.'; + msgRestFailed = '501 Syntax error in parameter: %s.'; + msgAppeFailed = '550 APPE failed.'; + msgAppeSuccess = '150 Opening data connection for %s (append).'; + msgAppeDisabled = '500 Cannot APPE.'; + msgAppeAborted = '426 Connection closed; %s.'; + msgAppeOk = '226 File received ok'; + msgAppeError = '426 Connection closed; transfer aborted. Error #%d'; + msgAppeReady = '150 APPE supported. Ready to append file "%s" at offset %d.'; + msgStruOk = '200 Ok. STRU parameter ''%s'' ignored.'; + msgMdtmOk = '213 %s'; + msgMdtmFailed = '550 %s'; + msgMdtmSyntax = '501 Syntax error in MDTM parameter.'; + msgMdtmNotExists = '550 ''%s'': no such file or directory.'; + msgModeOK = '200 MODE Ok'; + msgModeSyntax = '501 Missing argument for MODE'; + msgModeNotS = '502 MODE other than S not supported'; + msgOverflow = '500 Command too long'; + msgStouOk = '250 ''%s'': file created.' ; + msgStouSuccess = msgStorSuccess; + msgStouFailed = '501 Cannot STOU. %s'; + msgStouAborted = msgStorAborted; + msgStouError = msgStorError; + msgFeatFollows = '211-Extensions supported:'; + msgFeatFollowDone = '211 END'; + msgFeatFailed = '211 No-Features'; + + +function SlashesToBackSlashes(const S : String) : String; forward; +function BackSlashesToSlashes(const S : String) : String; forward; +{ function BuildFilePath(const Directory : String; serge le 5/10/2002 + FileName : String) : String; forward; } + +var + ThisYear, ThisMonth, ThisDay : Word; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TFtpServer]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetFileSize(FileName : String) : LongInt; +var + SR : TSearchRec; +begin +{$IFNDEF VER80}{$WARNINGS OFF}{$ENDIF} + if FindFirst(FileName, faReadOnly or faHidden or + faSysFile or faArchive, SR) = 0 then + Result := SR.Size + else + Result := -1; + FindClose(SR); +{$IFNDEF VER80}{$WARNINGS ON}{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TFtpServer.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWindowHandle := WSocket.AllocateHWnd(WndProc); + FServSocket := TWSocket.Create(Self); + FServSocket.Name := 'ServerWSocket'; + FClientList := TList.Create; + FPort := 'ftp'; + FAddr := '0.0.0.0'; + FBanner := msgDftBanner; + FClientClass := TFtpCtrlSocket; +{ !!!!!!!!!!! NGB: Added next five lines } + FPasvIpAddr := ''; + FPasvPortRangeStart := 0; + FPasvPortRangeSize := 0; + FPasvPortTable := nil; + FPasvPortTableSize := 0; +{ !!!!!!!!!!! NGB: Added previous five lines } + AddCommand('PORT', CommandPORT); + AddCommand('STOR', CommandSTOR); + AddCommand('RETR', CommandRETR); + AddCommand('CWD', CommandCWD); + AddCommand('XPWD', CommandXPWD); + AddCommand('PWD', CommandPWD); + AddCommand('USER', CommandUSER); + AddCommand('PASS', CommandPASS); + AddCommand('LIST', CommandLIST); + AddCommand('NLST', CommandNLST); + AddCommand('TYPE', CommandTYPE); + AddCommand('SYST', CommandSYST); + AddCommand('QUIT', CommandQUIT); + AddCommand('DELE', CommandDELE); + AddCommand('SIZE', CommandSIZE); + AddCommand('REST', CommandREST); + AddCommand('RNFR', CommandRNFR); + AddCommand('RNTO', CommandRNTO); + AddCommand('MKD', CommandMKD); + AddCommand('RMD', CommandRMD); + AddCommand('ABOR', CommandABOR); + AddCommand('PASV', CommandPASV); + AddCommand('NOOP', CommandNOOP); + AddCommand('CDUP', CommandCDUP); + AddCommand('APPE', CommandAPPE); + AddCommand('STRU', CommandSTRU); + AddCommand('XMKD', CommandMKD); + AddCommand('XRMD', CommandRMD); + AddCommand('MDTM', CommandMDTM); + AddCommand('MODE', CommandMODE); + AddCommand('OVER', CommandOverflow); + AddCommand('STOU', CommandSTOU); + AddCommand('FEAT', CommandFEAT); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TFtpServer.Destroy; +begin + if Assigned(FServSocket) then begin + FServSocket.Destroy; + FServSocket := nil; + end; + if Assigned(FClientList) then begin + FClientList.Destroy; + FClientList := nil; + end; + if Assigned(FPasvPortTable) then begin + FreeMem(FPasvPortTable, FPasvPortTableSize); + FPasvPortTable := nil; + FPasvPortTableSize := 0; + end; + WSocket.DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + case Msg of + WM_FTPSRV_CLOSE_REQUEST : WMFtpSrvCloseRequest(MsgRec); + WM_FTPSRV_CLIENT_CLOSED : WMFtpSrvClientClosed(MsgRec); + WM_FTPSRV_ABORT_TRANSFER : WMFtpSrvAbortTransfer(MsgRec); + WM_FTPSRV_CLOSE_DATA : WMFtpSrvCloseData(MsgRec); + WM_FTPSRV_START_SEND : WMFtpSrvStartSend(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WMFtpSrvCloseRequest(var msg: TMessage); +var + Client : TFtpCtrlSocket; + I : Integer; +begin + Client := TFtpCtrlSocket(msg.LParam); + I := FClientList.IndexOf(Client); + if I >= 0 then begin + { Check if client.ID is still the same as when message where posted } + if WPARAM(TFtpCtrlSocket(FClientList.Items[I]).ID) = Msg.WParam then begin + if Client.AllSent then + Client.Close + else + Client.CloseRequest := TRUE; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.Notification(AComponent: TComponent; operation: TOperation); +begin + inherited Notification(AComponent, operation); + if operation = opRemove then begin + if AComponent = FServSocket then + FServSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.AddCommand( + const Keyword : String; + const Proc : TFtpSrvCommandProc); +begin + if FLastCmd > High(FCmdTable) then + raise FtpServerException.Create('Too many command'); + FCmdTable[FLastCmd].KeyWord := KeyWord; + FCmdTable[FLastCmd].Proc := Proc; + Inc(FLastCmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.Start; +begin + if FServSocket.State = wsListening then + Exit; { Server is already running } + FServSocket.Port := Port; + FServSocket.Proto := 'tcp'; + FServSocket.Addr := FAddr; + FServSocket.OnSessionAvailable := ServSocketSessionAvailable; + FServSocket.OnChangeState := ServSocketStateChange; + FServSocket.ComponentOptions := [wsoNoReceiveLoop]; + FServSocket.Listen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.Stop; +begin + FServSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.DisconnectAll; +var + Client : TFtpCtrlSocket; + Msg : TMessage; +begin + while FClientList.Count > 0 do begin + Client := TFtpCtrlSocket(FClientList.Items[0]); + FillChar(Msg, SizeOf(Msg), 0); + Msg.LParam := Integer(Client); + Msg.WParam := Client.ID; + WMFtpSrvClientClosed(Msg); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.Disconnect(Client : TFtpCtrlSocket); +var + I : Integer; + Msg : TMessage; +begin + I := FClientList.IndexOf(Client); + if I < 0 then + raise FtpServerException.Create('Disconnect: Not one of our clients'); + + FillChar(Msg, SizeOf(Msg), 0); + Msg.LParam := Integer(Client); + Msg.WParam := Client.ID; + WMFtpSrvClientClosed(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpServer.GetActive : Boolean; +begin + Result := (FServSocket.State = wsListening); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.SetActive(newValue : Boolean); +begin + if newValue then + Start + else + Stop; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ServSocketStateChange(Sender : TObject; OldState, NewState : TSocketState); +begin + if csDestroying in ComponentState then + Exit; + if NewState = wsListening then + TriggerServerStart + else if NewState = wsClosed then + TriggerServerStop; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ServSocketSessionAvailable(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; +begin + if AError <> 0 then + raise FtpServerException.Create('Session available error #' + IntToStr(AError)); + Inc(FClientNum); + Client := FClientClass.Create(Self); + FClientList.Add(Client); + Client.Name := 'ClientWSocket' + IntToStr(FClientNum); + Client.DataSocket.Name := 'DataWSocket' + IntToStr(FClientNum); + Client.ID := FClientNum; + Client.Banner := FBanner; + Client.HSocket := ServSocket.Accept; + Client.OnCommand := ClientCommand; + Client.OnSessionClosed := ClientSessionClosed; + Client.OnDataSent := ClientDataSent; + TriggerClientConnect(Client, AError); + { The event handler may have destroyed the client ! } + if FClientList.IndexOf(Client) < 0 then + Exit; + { The event handler may have closed the connection } + if Client.State <> wsConnected then + Exit; + { Ok, the client is still there, process with the connection } + if (FMaxClients > 0) and (FMaxClients < ClientCount) then begin + { Sorry, toomuch clients } + Client.Banner := msgTooMuchClients; + Client.StartConnection; + Client.Close; + end + else + Client.StartConnection; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.SendAnswer(Client : TFtpCtrlSocket; Answer : TFtpString); +begin + try + TriggerSendAnswer(Client, Answer); + Client.SendAnswer(Answer); + except + { Just ignore any exception here } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientCommand( + Sender : TObject; + CmdBuf : PChar; + CmdLen : Integer); +const + TELNET_IAC = #255; + TELNET_IP = #244; + TELNET_DATA_MARK = #242; +var + Client : TFtpCtrlSocket; + Answer : TFtpString; + Params : TFtpString; + KeyWord : TFtpString; + I, J : Integer; +begin + Client := Sender as TFtpCtrlSocket; + Answer := ''; + + { Copy the command received, removing any telnet option } + try + Params := ''; + I := 0; + while I < CmdLen do begin + if CmdBuf[I] <> TELNET_IAC then begin + Params := Params + CmdBuf[I]; + Inc(I); + end + else begin + Inc(I); + if CmdBuf[I] = TELNET_IAC then + Params := Params + CmdBuf[I]; + Inc(I); + end; + end; + + { Extract keyword, ignoring leading spaces and tabs } + I := 1; + while (I <= Length(Params)) and (Params[I] in [' ', #9]) do + Inc(I); + J := I; + while (J <= Length(Params)) and (Params[J] in ['A'..'Z', 'a'..'z', '0'..'9']) do + Inc(J); + KeyWord := UpperCase(Copy(Params, I, J - I)); + + { Extract parameters, ignoring leading spaces and tabs } + while (J <= Length(Params)) and (Params[J] in [' ', #9]) do + Inc(J); + Params := Copy(Params, J, Length(Params)); + + { Pass the command to the component user to let him a chance to } + { handle it. If it does, he must return the answer. } + TriggerClientCommand(Client, Keyword, Params, Answer); + if Answer <> '' then begin + { Event handler has processed the client command, send the answer } + SendAnswer(Client, Answer); + Exit; + end; + + { The command has not been processed, we'll process it } + if Keyword = '' then begin + { Empty keyword (should never occurs) } + SendAnswer(Client, Format(msgCmdUnknown, [Params])); + Exit; + end; + + { We need to process the client command, search our command table } + I := 0; + while I <= High(FCmdTable) do begin + if FCmdTable[I].KeyWord = KeyWord then begin + FCmdTable[I].Proc(Client, KeyWord, Params, Answer); + SendAnswer(Client, Answer); + Exit; + end; + Inc(I); + end; + SendAnswer(Client, Format(msgCmdUnknown, [KeyWord])); + except + on E:Exception do begin + SendAnswer(Client, '501 ' + E.Message); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientDataSent(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; +begin + Client := Sender as TFtpCtrlSocket; + if Client.CloseRequest then begin + Client.CloseRequest := FALSE; + PostMessage(FWindowHandle, WM_FTPSRV_CLOSE_REQUEST, + WPARAM(Client.ID), LPARAM(Client)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientSessionClosed(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; +begin + Client := Sender as TFtpCtrlSocket; + PostMessage(FWindowHandle, WM_FTPSRV_CLIENT_CLOSED, + WPARAM(Client.ID), LPARAM(Client)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WMFtpSrvClientClosed(var msg: TMessage); +var + Client : TFtpCtrlSocket; + I : Integer; + SesClosed : TSessionClosed; +begin + Client := TFtpCtrlSocket(Msg.LParam); + { Check if client still in our client list } + I := FClientList.IndexOf(Client); + if I >= 0 then begin + { Check if client.ID is still the same as when message where posted } + if WPARAM(TFtpCtrlSocket(FClientList.Items[I]).ID) = Msg.WParam then begin + try + SesClosed := Client.DataSocket.OnSessionClosed; + if Client.DataSessionActive and Assigned(SesClosed) then + Client.DataSocket.OnSessionClosed(Client.DataSocket, WSAENOTCONN); + FClientList.Remove(Client); + TriggerClientDisconnect(Client, 0); + finally + Client.Destroy; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WMFtpSrvAbortTransfer(var msg: TMessage); +var + Client : TFtpCtrlSocket; + Data : TWSocket; + I : Integer; +begin + Client := TFtpCtrlSocket(Msg.LParam); + { Check if client still in our client list } + I := FClientList.IndexOf(Client); + if I >= 0 then begin + { Check if client.ID is still the same as when message where posted } + if WPARAM(TFtpCtrlSocket(FClientList.Items[I]).ID) = Msg.WParam then begin + Data := Client.DataSocket; + Data.ShutDown(2); + Data.Close; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WMFtpSrvCloseData(var msg: TMessage); +var + Client : TFtpCtrlSocket; + Data : TWSocket; + I : Integer; +{ !!!!!!!!!!! NGB: next line changed } + {PortNumber : String;} +{ !!!!!!!!!!! NGB: previous line changed } +begin + Client := TFtpCtrlSocket(Msg.LParam); + { Check if client still in our client list } + I := FClientList.IndexOf(Client); + if I >= 0 then begin + { Check if client.ID is still the same as when message where posted } + if WPARAM(TFtpCtrlSocket(FClientList.Items[I]).ID) = Msg.WParam then begin + Data := Client.DataSocket; +{ !!!!!!!!!!! NGB: Free Up Current Port - next 5 lines changed } + if Assigned(Data) then begin + if Client.PassiveConnected and (FPasvPortRangeSize > 0) then + FreeCurrentPasvPort(Client); + Data.Close; + end; +{ !!!!!!!!!!! NGB: previous 5 lines changed } + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpServer.GetClient(nIndex : Integer) : TFtpCtrlSocket; +begin + if not Assigned(FClientList) then begin + Result := nil; + Exit; + end; + if (nIndex < 0) or (nIndex >= FClientList.Count) then begin + Result := nil; + Exit; + end; + Result := TFtpCtrlSocket(FClientList.Items[nIndex]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check if a given object is one of our clients } +function TFtpServer.IsClient(SomeThing : TObject) : Boolean; +begin + if not Assigned(FClientList) then + Result := FALSE + else + Result := (FClientList.IndexOf(Pointer(SomeThing)) >= 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpServer.GetClientCount : Integer; +begin + if Assigned(FClientList) then + Result := FClientList.Count + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerServerStart; +begin + if Assigned(FOnStart) then + FOnStart(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerServerStop; +begin + if Assigned(FOnStop) then + FOnStop(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerAuthenticate( + Client : TFtpCtrlSocket; + UserName : String; + PassWord : String; + var Authenticated : Boolean); +begin + if Assigned(FOnAuthenticate) then + FOnAuthenticate(Self, Client, UserName, Password, Authenticated); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerChangeDirectory( + Client : TFtpCtrlSocket; + Directory : String; + var Allowed : Boolean); +begin + if Assigned(FOnChangeDirectory) then + FOnChangeDirectory(Self, Client, Directory, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerMakeDirectory( + Client : TFtpCtrlSocket; + Directory : String; + var Allowed : Boolean); +begin + if Assigned(FOnMakeDirectory) then + FOnMakeDirectory(Self, Client, Directory, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerBuildDirectory( + Client : TFtpCtrlSocket; + var Params : TFtpString; + Detailed : Boolean); +begin + if Assigned(FOnBuildDirectory) then + FOnBuildDirectory(Self, Client, Params, Detailed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerAlterDirectory( + Client : TFtpCtrlSocket; + var Params : TFtpString; + Detailed : Boolean); +begin + if Assigned(FOnAlterDirectory) then + FOnAlterDirectory(Self, Client, Params, Detailed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerSendAnswer( + Client : TFtpCtrlSocket; + var Answer : TFtpString); +begin + if Assigned(FOnAnswerToClient) then + FOnAnswerToClient(Self, Client, Answer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerClientDisconnect(Client : TFtpCtrlSocket; AError : Word); +begin + if Assigned(FOnClientDisconnect) then + FOnClientDisconnect(Self, Client, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerClientConnect(Client : TFtpCtrlSocket; AError : Word); +begin + if Assigned(FOnClientConnect) then + FOnClientConnect(Self, Client, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerStorSessionConnected( + Client : TFtpCtrlSocket; Data : TWSocket; AError : Word); +begin + if Assigned(FOnStorSessionConnected) then + FOnStorSessionConnected(Self, Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerRetrSessionConnected( + Client : TFtpCtrlSocket; Data : TWSocket; AError : Word); +begin + if Assigned(FOnRetrSessionConnected) then + FOnRetrSessionConnected(Self, Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerStorSessionClosed( + Client : TFtpCtrlSocket; Data : TWSocket; AError : Word); +begin + if Assigned(FOnStorSessionClosed) then + FOnStorSessionClosed(Self, Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerRetrSessionClosed( + Client : TFtpCtrlSocket; Data : TWSocket; AError : Word); +begin + if Assigned(FOnRetrSessionClosed) then + FOnRetrSessionClosed(Self, Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerClientCommand( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Assigned(FOnClientCommand) then + FOnClientCommand(Self, Client, KeyWord, Params, Answer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidatePut( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidatePut) then + FOnValidatePut(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateSize( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateSize) then + FOnValidateSize(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateDele( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateDele) then + FOnValidateDele(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateRmd( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateRmd) then + FOnValidateRmd(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateRnFr( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateRnFr) then + FOnValidateRnFr(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateRnTo( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateRnTo) then + FOnValidateRnTo(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerValidateGet( + Client : TFtpCtrlSocket; + var FilePath : TFtpString; + var Allowed : Boolean); +begin + if Assigned(FOnValidateGet) then + FOnValidateGet(Self, Client, FilePath, Allowed); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerStorDataAvailable( + Client : TFtpCtrlSocket; + Data : TWSocket; + Buf : PChar; + Len : LongInt; + AError : Word); +begin + if Assigned(FOnStorDataAvailable) then + FOnStorDataAvailable(Self, Client, Data, Buf, Len, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerRetrDataSent( + Client : TFtpCtrlSocket; + Data : TWSocket; + AError : Word); +begin + if Assigned(FOnRetrDataSent) then + FOnRetrDataSent(Self, Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerGetUniqueFileName( + Client : TFtpCtrlSocket; + var FileName : TFtpString); +begin + if Assigned (FOnGetUniqueFileName) then + FOnGetUniqueFileName (Self, Client, FileName) ; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandUSER( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + Client.CurCmdType := ftpcUSER; + Client.UserName := Trim(Params); + Client.FtpState := ftpcWaitingPassword; + Answer := Format(msgPassRequired, [Client.UserName]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandPASS( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Authenticated : Boolean; +begin + if Client.FtpState <> ftpcWaitingPassword then + Answer := msgNoUser + else begin + Client.CurCmdType := ftpcPASS; + Client.PassWord := Trim(Params); + Authenticated := TRUE; + TriggerAuthenticate(Client, Client.UserName, Client.PassWord, Authenticated); + if Authenticated then begin + Client.FtpState := ftpcReady; + Client.Directory := Client.HomeDir; + Answer := Format(msgLogged, [Client.UserName]) + end + else begin + Client.FtpState := ftpcWaitingUserCode; + Answer := msgLoginFailed; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandCDUP( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + Client.CurCmdType := ftpcCDUP; + Params := '..'; + CommandChangeDir(Client, Keyword, Params, Answer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandCWD( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + Client.CurCmdType := ftpcCWD; + CommandChangeDir(Client, Keyword, Params, Answer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function SlashesToBackSlashes(const S : String) : String; +var + I : Integer; +begin + Result := S; + for I := 1 to Length(Result) do begin + if Result [I] = '/' then + Result[I] := '\'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function BackSlashesToSlashes(const S : String) : String; +var + I : Integer; +begin + Result := S; + for I := 1 to Length(Result) do begin + if Result [I] = '\' then + Result[I] := '/'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandChangeDir( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Allowed : Boolean; + OldDir : String; +begin + OldDir := Client.Directory; + try + Params := SlashesToBackSlashes(Params); + Client.Directory := Trim(Params); + Allowed := TRUE; + TriggerChangeDirectory(Client, Client.Directory, Allowed); + if Allowed then + Answer := Format(msgCWDSuccess, + [BackSlashesToSlashes(Client.Directory)]) + else begin + Client.Directory := OldDir; + Answer := Format(msgCWDFailed, ['No permission']); + end; + except + on E:Exception do begin + Client.Directory := OldDir; + Answer := Format(msgCWDFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandXPWD( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcXPWD; + Answer := Format(msgPWDSuccess, + ['/' + BackSlashesToSlashes(Client.Directory)]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandPWD( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcPWD; + Answer := Format(msgPWDSuccess, + ['/' + BackSlashesToSlashes(Client.Directory)]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandQUIT( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + Client.CurCmdType := ftpcQUIT; + Answer := msgQuit; + PostMessage(FWindowHandle, WM_FTPSRV_CLOSE_REQUEST, + WPARAM(Client.ID), LPARAM(Client)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetInteger(var I : Integer; const Src : String) : LongInt; +begin + { Skip leading white spaces } + while (I <= Length(Src)) and (Src[I] in [' ' , #9]) do + Inc(I); + Result := 0; + while (I <= Length(Src)) and (Src[I] in ['0'..'9']) do begin + Result := Result * 10 + Ord(Src[I]) - Ord('0'); + Inc(I); + end; + { Skip trailing white spaces } + while (I <= Length(Src)) and (Src[I] in [' ' , #9]) do + Inc(I); + { Check if end of string of comma. If not, error, returns -1 } + if I <= Length(Src) then begin + if Src[I] = ',' then + Inc(I) { skip comma } + else + raise FtpServerException.Create('GetInteger: unexpected char'); { error, must be comma } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandPORT( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + I : Integer; + N : LongInt; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcPORT; + I := 1; + Client.DataAddr := IntToStr(GetInteger(I, Params)); + Client.DataAddr := Client.DataAddr + '.' + IntToStr(GetInteger(I, Params)); + Client.DataAddr := Client.DataAddr + '.' + IntToStr(GetInteger(I, Params)); + Client.DataAddr := Client.DataAddr + '.' + IntToStr(GetInteger(I, Params)); + N := GetInteger(I, Params); + N := (N shl 8) + GetInteger(I, Params); + Client.DataPort := IntToStr(N); + Answer := msgPortSuccess; + except + Answer := msgPortFailed; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandSTOR( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Allowed : Boolean; + FilePath : TFtpString; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcSTOR; + Client.FileName := SlashesToBackSlashes(Params); + Client.HasOpenedFile := FALSE; + Client.AbortingTransfer := FALSE; + Client.TransferError := 'Transfer Ok'; + Allowed := TRUE; + FilePath := BuildFilePath(Client, Client.Directory, Client.FileName); + TriggerValidatePut(Client, FilePath, Allowed); + if not Allowed then begin + Answer := msgStorDisabled; + Exit; + end; + Client.FilePath := FilePath; + if Client.PassiveMode then begin + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + if Client.PassiveConnected then + Client.DataSocket.OnSessionConnected(Client.DataSocket, 0) + else + Client.PassiveStart := TRUE; + end + else begin + Client.DataSocket.Proto := 'tcp'; + Client.DataSocket.Addr := Client.DataAddr; + Client.DataSocket.Port := Client.DataPort; + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + Client.DataSocket.LingerOnOff := wsLingerOff; + Client.DataSocket.LingerTimeout := 0; +{$IFDEF BIND_FTP_DATA} + Client.DataSocket.LocalAddr := Client.GetXAddr; + Client.DataSocket.LocalPort := 'ftp-data'; {20} +{$ENDIF} + Client.DataSocket.ComponentOptions := [wsoNoReceiveLoop]; + Client.DataSocket.Connect; + end; + Answer := Format(msgStorSuccess, [Params]); + except + on E:Exception do begin + Answer := Format(msgStorFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientStorSessionConnected(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + Client.DataSessionActive := TRUE; + Client.PassiveMode := FALSE; + TriggerStorSessionConnected(Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientStorSessionClosed(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); +{ !!!!!!!! NGB: Free Up Current Port - next 2 lines added } + if Client.PassiveConnected and (FPasvPortRangeSize > 0) then + FreeCurrentPasvPort(Client); +{ !!!!!!!! NGB: previous 2 lines added } + + Client.DataSessionActive := FALSE; + Client.PassiveStart := FALSE; + Client.PassiveConnected := FALSE; + Client.RestartPos := 0; + { Reset data port to standard value } + Client.DataPort := 'ftp-data'; + + { If we had opened a data stream ourself, then close it } + if Client.HasOpenedFile then begin + if Assigned(Client.DataStream) then + Client.DataStream.Destroy; + Client.DataStream := nil; + Client.HasOpenedFile := FALSE; + end; + + TriggerStorSessionClosed(Client, Data, AError); + + case Client.CurCmdType of + ftpcSTOR : + begin + if Client.AbortingTransfer then + SendAnswer(Client, Format(msgStorAborted, [Client.TransferError])) + else if AError = 0 then + SendAnswer(Client, msgStorOk) + else + SendAnswer(Client, Format(msgStorError, [AError])); + end; + ftpcAPPE : + begin + if Client.AbortingTransfer then + SendAnswer(Client, Format(msgAppeAborted, [Client.TransferError])) + else if AError = 0 then + SendAnswer(Client, msgAppeOk) + else + SendAnswer(Client, Format(msgAppeError, [AError])); + end; + ftpcSTOU : + begin + if Client.AbortingTransfer then + SendAnswer(Client, Format(msgStouAborted, [Client.TransferError])) + else if AError = 0 then + SendAnswer(Client, Format (msgStouOk, [Client.FileName])) + else + SendAnswer(Client, Format(msgStouError, [AError])); + end; + else { Should never comes here } + raise Exception.Create('Program error in ClientStorSessionClosed'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientStorDataAvailable(Sender: TObject; AError : word); +var + Len : Integer; + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + Len := Data.Receive(Client.RcvBuf, Client.RcvSize); + if Len <= 0 then + Exit; + + if Client.AbortingTransfer then + Exit; + + try + { Trigger the user event for the received data } + TriggerStorDataAvailable(Client, Data, Client.RcvBuf, Len, AError); + + { We need to open a datastream if not already done and a FilePath } + { exists (the component user can have nullified the FilePath } + if (not Client.HasOpenedFile) and + (Length(Client.FilePath) > 0) and + (not Assigned(Client.DataStream)) then begin + { Use different file modes for APPE vs STOR } + if (Client.CurCmdType = ftpcAPPE) and + (GetFileSize(Client.FilePath) > -1) then + Client.DataStream := TFileStream.Create(Client.FilePath, + fmOpenReadWrite or fmShareDenyWrite) + else if Client.RestartPos > 0 then { iturcan@gamo.sk } + Client.DataStream := TFileStream.Create(Client.FilePath, + fmOpenWrite or fmShareDenyWrite) + else + Client.DataStream := TFileStream.Create(Client.FilePath, + fmCreate); + Client.DataStream.Seek(Client.RestartPos, soFrombeginning); + Client.HasOpenedFile := TRUE; + end; + + { If we have a DataStream, then we need to write the data } + if Assigned(Client.DataStream) then + Client.DataStream.WriteBuffer(Client.RcvBuf^, Len); + except + { An exception occured, so we abort the transfer } + on E:Exception do begin + Client.TransferError := E.Message; + Client.AbortingTransfer := TRUE; + PostMessage(FWindowHandle, WM_FTPSRV_ABORT_TRANSFER, + WPARAM(Client.ID), LPARAM(Client)); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.TriggerBuildFilePath( + Client : TFtpCtrlSocket; + const Directory : String; + const FileName : String; + var NewFileName : String); +begin + if Assigned(FOnBuildFilePath) then + FOnBuildFilePath(Self, Client, Directory, FileName, NewFileName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ serge le 5/10/2002 } +function TFtpServer.BuildFilePath( + Client : TFtpCtrlSocket; + Directory : String; + FileName : String) : String; +var + Drive : String; + Path : String; +begin + FileName := SlashesToBackSlashes(FileName); + PatchIE5(FileName); + + { Gives the application a chance to do the work for us } + Result := ''; + TriggerBuildFilePath(Client, Directory, FileName, Result); + if Length(Result) > 0 then + Exit; { Work is done at the app level, done } + + if IsUNC(FileName) then + Result := FileName + else if IsUNC(Directory) then begin + if (Length(FileName) > 0) and (FileName[1] = '\') then + Result := ExtractFileDrive(Directory) + FileName + else + Result := Directory + FileName; + end + else begin + if (Length(FileName) > 1) and (FileName[2] = ':') then begin + Drive := UpperCase(Copy(FileName, 1, 2)); + Path := Copy(FileName, 3, Length(FileName)); + end + else begin + Drive := Copy(Directory, 1, 2); + Path := FileName; + end; + + if (Length(Path) > 0) and (Path[1] = '\') then + Result := Drive + Path + else begin + if Drive <> Copy(Directory, 1, 2) then + raise FtpServerException.Create('No current dir for ''' + Drive + ''''); + Result := Directory + Path; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandRETR( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Allowed : Boolean; + FilePath : TFtpString; + DelayedSend : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcRETR; + Client.HasOpenedFile := FALSE; + Client.FileName := SlashesToBackSlashes(Params); + Allowed := TRUE; + FilePath := BuildFilePath(Client, Client.Directory, Client.FileName); + TriggerValidateGet(Client, FilePath, Allowed); + if not Allowed then begin + Answer := msgRetrDisabled; + Exit; + end; + Client.FilePath := FilePath; + Answer := Format(msgRetrSuccess, [Params]); + DelayedSend := FALSE; + if Assigned(FOnGetProcessing) then + FOnGetProcessing(Self, Client, DelayedSend); + if not DelayedSend then + DoStartSendData(Client); + except + on E:Exception do begin + Answer := Format(msgRetrFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.DoStartSendData(Client : TFtpCtrlSocket); +begin + PostMessage(FWindowHandle, WM_FTPSRV_START_SEND, 0, + LongInt(Client)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.WMFtpSrvStartSend(var msg: TMessage); +var + Client : TFtpCtrlSocket; +begin + Client := TObject(Msg.LParam) as TFtpCtrlSocket; + StartSendData(Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientPassiveSessionAvailable(Sender : TObject; AError : Word); +var + HSocket : TSocket; + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + HSocket := Data.Accept; + Data.OnSessionClosed := nil; + Data.Close; { We don't need to listen any more } + + if Client.CurCmdType in [ftpcSTOR, ftpcAPPE] then begin + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + end + else if Client.CurCmdType in [ftpcRETR, ftpcLIST, ftpcNLST] then begin + Client.DataSocket.OnSessionConnected := ClientRetrSessionConnected; + Client.DataSocket.OnSessionClosed := ClientRetrSessionClosed; + Client.DataSocket.OnDataAvailable := nil; + Client.DataSocket.OnDataSent := ClientRetrDataSent; + end + else begin + Client.DataSocket.OnSessionConnected := nil; + Client.DataSocket.OnSessionClosed := nil; + Client.DataSocket.OnDataAvailable := nil; + Client.DataSocket.OnDataSent := nil; + end; + Client.DataSocket.LingerOnOff := wsLingerOff; + Client.DataSocket.LingerTimeout := 0; + Client.DataSocket.HSocket := HSocket; + Client.PassiveConnected := TRUE; + if Client.PassiveStart then + Client.DataSocket.OnSessionConnected(Client.DataSocket, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.StartSendData(Client : TFtpCtrlSocket); +begin + Client.AbortingTransfer := FALSE; + Client.DataSent := FALSE; + Client.TransferError := 'Transfer Ok'; + if Client.PassiveMode then begin + Client.DataSocket.OnSessionConnected := ClientRetrSessionConnected; + Client.DataSocket.OnSessionClosed := ClientRetrSessionClosed; + Client.DataSocket.OnDataAvailable := nil; + Client.DataSocket.OnDataSent := ClientRetrDataSent; + if Client.PassiveConnected then + Client.DataSocket.OnSessionConnected(Client.DataSocket, 0) + else + Client.PassiveStart := TRUE; + end + else begin + Client.DataSocket.Close; + Client.DataSocket.Proto := 'tcp'; + Client.DataSocket.Addr := Client.DataAddr; + Client.DataSocket.Port := Client.DataPort; + Client.DataSocket.OnSessionConnected := ClientRetrSessionConnected; + Client.DataSocket.OnSessionClosed := ClientRetrSessionClosed; + Client.DataSocket.OnDataAvailable := nil; + Client.DataSocket.OnDataSent := ClientRetrDataSent; + Client.DataSocket.LingerOnOff := wsLingerOff; + Client.DataSocket.LingerTimeout := 0; +{$IFDEF BIND_FTP_DATA} + Client.DataSocket.LocalAddr := Client.GetXAddr; + Client.DataSocket.LocalPort := 'ftp-data'; {20} +{$ENDIF} + Client.DataSocket.ComponentOptions := [wsoNoReceiveLoop]; + Client.DataSocket.Connect; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientRetrSessionConnected(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + Client.DataSessionActive := (AError = 0); + Client.PassiveMode := FALSE; + + try + TriggerRetrSessionConnected(Client, Data, AError); + if AError <> 0 then + raise FtpServerException.Create('Client data socket connection error: ' + + IntToStr(AError)); + + { We need to open a datastream if not already done and a FilePath } + { exists the component user can have nullified the FilePath or } + { created his own data stream (virtual file feature) } + if (not Client.HasOpenedFile) and + (Length(Client.FilePath) > 0) and + (not Assigned(Client.DataStream)) then begin + Client.DataStream := TFileStream.Create(Client.FilePath, + fmOpenRead + fmShareDenyNone); + Client.DataStream.Seek(Client.RestartPos, soFrombeginning); + Client.HasOpenedFile := TRUE; + end; + except + on E:Exception do begin + Client.AbortingTransfer := TRUE; + Client.TransferError := E.Message; + PostMessage(FWindowHandle, WM_FTPSRV_ABORT_TRANSFER, + WPARAM(Client.ID), LPARAM(Client)); + Exit; + end; + end; + + SendNextDataChunk(Client, Data); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientRetrSessionClosed(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + Client.DataSessionActive := FALSE; + Client.PassiveStart := FALSE; + Client.PassiveConnected := FALSE; + Client.RestartPos := 0; + { Reset data port to standard value } + Client.DataPort := 'ftp-data'; + + { If we had opened a data stream ourself, then close it } + if Client.HasOpenedFile then begin + if Assigned(Client.DataStream) then begin + Client.DataStream.Destroy; + end; + Client.DataStream := nil; + Client.HasOpenedFile := FALSE; + end; + + if Client.AbortingTransfer then + SendAnswer(Client, Format(msgRetrFailed, [Client.TransferError])) + else if AError <> 0 then + SendAnswer(Client, Format(msgRetrFailed, ['Error #' + IntToStr(AError)])) + else + SendAnswer(Client, msgRetrOk); + + TriggerRetrSessionClosed(Client, Data, AError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.SendNextDataChunk( + Client : TFtpCtrlSocket; + Data : TWSocket); +var + Count : LongInt; +begin + try + if Assigned(Client.DataStream) then + Count := Client.DataStream.Read(Client.RcvBuf^, Client.RcvSize) + else + Count := 0; + + if Count > 0 then begin + Client.ByteCount := Client.ByteCount + Count; + Data.Send(Client.RcvBuf, Count); + end + else begin { EOF } + if not Client.DataSent then begin + Client.DataSent := TRUE; +{ PostMessage(Handle, WM_FTPSRV_CLOSE_DATA, 0, LongInt(Data)); } + PostMessage(Handle, WM_FTPSRV_CLOSE_DATA, + WPARAM(Client.ID), LPARAM(Client)); + end; + end; + except + { An exception occured, so we abort the transfer } + on E:Exception do begin + Client.TransferError := E.Message; + Client.AbortingTransfer := TRUE; + PostMessage(FWindowHandle, WM_FTPSRV_ABORT_TRANSFER, + WPARAM(Client.ID), LPARAM(Client)); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.ClientRetrDataSent(Sender : TObject; AError : Word); +var + Client : TFtpCtrlSocket; + Data : TWSocket; +begin + Data := TWSocket(Sender); + Client := TFtpCtrlSocket(Data.Owner); + + if Client.AbortingTransfer then + Exit; + + try + { Trigger the user event for the received data } + TriggerRetrDataSent(Client, Data, AError); + if AError <> 0 then + raise FtpServerException.Create('Send: error #' + IntToStr(AError)); + SendNextDataChunk(Client, Data); + except + { An exception occured, so we abort the transfer } + on E:Exception do begin + Client.TransferError := E.Message; + Client.AbortingTransfer := TRUE; + SendAnswer(Client, Format(msgRetrAborted, [Client.TransferError])); + PostMessage(FWindowHandle, WM_FTPSRV_ABORT_TRANSFER, + WPARAM(Client.ID), LPARAM(Client)); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandSYST( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcSYST; + Answer := msgSystem; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandDirectory( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString; + Detailed : Boolean); +begin + if Assigned(Client.DataStream) then begin + Client.DataStream.Destroy; + Client.DataStream := nil; + end; + + try + Params := SlashesToBackSlashes(Params); + TriggerBuildDirectory(Client, Params, Detailed); + if not Assigned(Client.DataStream) then begin + Client.DataStream := TMemoryStream.Create; + Client.HasOpenedFile := TRUE; + BuildDirectory(Client, Params, Client.DataStream, Detailed); + TriggerAlterDirectory(Client, Params, Detailed); + Client.DataStream.Seek(0, 0); + end; + Client.FilePath := ''; + Answer := msgDirOpen; + StartSendData(Client); + except + on E:Exception do begin + Answer := Format(msgDirFailed, [E.Message]) + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandLIST( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcLIST; + CommandDirectory(Client, KeyWord, Params, Answer, TRUE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandNLST( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcNLST; + CommandDirectory(Client, KeyWord, Params, Answer, FALSE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function FormatUnixDirEntry(F : TSearchRec) : String; +var + Attr : String; + Ext : String; + Day, Month, Year : Integer; + Hour, Min : Integer; +const + StrMonth : array [1..12] of String = + ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', + 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); +begin +{$IFNDEF VER80}{$WARNINGS OFF}{$ENDIF} + if ((F.Attr and faVolumeID) <> 0) or + ((F.Attr and faHidden) <> 0) then begin + { Ignore hidden files and volume ID entries } + Result := ''; + Exit; + end; + + Attr := '-rw-rw-rw-'; + if (F.Attr and faDirectory) <> 0 then + Attr[1] := 'd'; + + if (F.Attr and faReadOnly) <> 0 then begin + Attr[3] := '-'; + Attr[6] := '-'; + Attr[9] := '-'; + end; +{$IFNDEF VER80}{$WARNINGS ON}{$ENDIF} + + Ext := UpperCase(ExtractFileExt(F.Name)); + if (Ext = '.EXE') or (Ext = '.COM') or (Ext = '.BAT') then begin + Attr[4] := 'x'; + Attr[7] := 'x'; + Attr[10] := 'x'; + end; + + Day := (HIWORD(F.Time) and $1F); + Month := ((HIWORD(F.Time) shr 5) and $0F); + Year := ((HIWORD(F.Time) shr 9) and $3F) + 1980; +{ Sec := ((F.Time and $1F) shl 1); } + Min := ((F.Time shr 5) and $3F); + Hour := ((F.Time shr 11) and $1F); + + Result := Attr + ' 1 ftp ftp ' + Format('%11d ', [F.Size]); + + Result := Result + Format('%s %2.2d ', [StrMonth[Month], Day]); + if Year = ThisYear then + Result := Result + Format('%2.2d:%2.2d ', [Hour, Min]) + else + Result := Result + Format('%5d ', [Year]); + + Result := Result + F.Name + #13#10; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.BuildDirectory( + Client : TFtpCtrlSocket; + var Params : TFtpString; + Stream : TStream; + Detailed : Boolean); +var + F : TSearchRec; + Path : String; + Status : Integer; + Buf : String; +begin + DecodeDate(Now, ThisYear, ThisMonth, ThisDay); + + if Params = '' then + Path := Client.Directory + '*.*' + else + Path := BuildFilePath(Client, Client.Directory, Params); + + if Path[Length(Path)] = '\' then + Path := Path + '*.*'; + + Status := FindFirst(Path, faAnyFile, F); + while Status = 0 do begin + if Detailed then + Buf := FormatUnixDirEntry(F) + else + Buf := F.Name + #13#10; + if Length(Buf) > 0 then + Stream.Write(Buf[1], Length(Buf)); + Status := FindNext(F); + end; + FindClose(F); + + if Stream.Size = 0 then begin + Buf := Path + ' not found' + #13#10; + Stream.Write(Buf[1], Length(Buf)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandTYPE( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Buf : String; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcTYPE; + Buf := UpperCase(Trim(Params)); + if (Buf = 'A') or (Buf = 'A N') or (Buf = 'I') then begin + Answer := Format(msgTypeOk, [Params]); + Client.BinaryMode := (Buf = 'I'); + end + else + Answer := Format(msgTypeFailed, [Params]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandDELE( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileName : TFtpString; + Allowed : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcDELE; + FileName := BuildFilePath(Client, Client.Directory, Params); + Allowed := TRUE; + TriggerValidateDele(Client, FileName, Allowed); + if not Allowed then begin + Answer := msgDeleDisabled; + Exit; + end; + if Params = '' then + Answer := Format(msgDeleSyntax, [Params]) + else if FileExists(FileName) then begin + if DeleteFile(FileName) then + Answer := Format(msgDeleOk, [FileName]) + else + Answer := Format(msgDeleFailed, [FileName]); + end + else + Answer := Format(msgDeleNotExists, [FileName]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandSIZE( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FilePath : TFtpString; + Allowed : Boolean; + Size : LongInt; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcSIZE; + Allowed := TRUE; + FilePath := BuildFilePath(Client, Client.Directory, Params); + TriggerValidateSize(Client, FilePath, Allowed); + if not Allowed then begin + Answer := msgSizeDisabled; + Exit; + end; + + if Params = '' then + Answer := Format(msgSizeSyntax, [Params]) + else begin + try + Size := GetFileSize(FilePath); + if Size >= 0 then + Answer := Format(msgSizeOk, [Size]) + else + Answer := Format(msgSizeFailed, ['File not found']) + except + on E:Exception do begin + Answer := Format(msgSizeFailed, [E.Message]) + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandREST( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcREST; + try + Client.RestartPos := StrToInt(Params); + if Client.RestartPos < 0 then begin { 20020916 } + Answer := msgRestZero; + Client.RestartPos := 0; + end + else + Answer := Format(msgRestOk, [Client.RestartPos]); + except + on E:Exception do begin + Answer := Format(msgRestFailed, [E.Message]); + Client.RestartPos := 0; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandRNFR( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileName : TFtpString; + Allowed : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcRNFR; + FileName := BuildFilePath(Client, Client.Directory, Params); + Allowed := TRUE; + TriggerValidateRnFr(Client, FileName, Allowed); + if not Allowed then begin + Answer := msgRnFrDisabled; + Exit; + end; + if Params = '' then + Answer := Format(msgRnfrSyntax, [Params]) + else if FileExists(FileName) then begin + Client.FromFileName := FileName; + Answer := Format(msgRnfrOk, [FileName]) + end + else + Answer := Format(msgRnfrNotExists, [FileName]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandRNTO( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileName : TFtpString; + Allowed : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcRNTO; + FileName := BuildFilePath(Client, Client.Directory, Params); + Allowed := TRUE; + TriggerValidateRnTo(Client, FileName, Allowed); + if not Allowed then begin + Answer := msgRnToDisabled; + Exit; + end; + if Params = '' then + Answer := Format(msgRntoSyntax, [Params]) + else if FileExists(FileName) then + Answer := Format(msgRntoAlready, [FileName]) + else if not FileExists(Client.FromFileName) then + Answer := Format(msgRntoNotExists, [Client.FromFileName]) + else begin + Client.ToFileName := FileName; + if RenameFile(Client.FromFileName, Client.ToFileName) then + Answer := Format(msgRntoOk, [Client.FromFileName, Client.ToFileName]) + else + Answer := Format(msgRntoFailed, [Client.FromFileName]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandNOOP( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + Client.CurCmdType := ftpcNOOP; + Answer := Format(MsgNoopOk, [Params]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandMKD( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileName : String; + Allowed : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcMKD; + FileName := BuildFilePath(Client, Client.Directory, Params); + Allowed := TRUE; + TriggerMakeDirectory(Client, FileName, Allowed); + if not Allowed then + Answer := Format(msgMkdFailed, [FileName]) + else if Params = '' then + Answer := Format(msgMkdSyntax, [Params]) + else if FileExists(FileName) then + Answer := Format(msgMkdAlready, [FileName]) + else begin + {$I-} + MkDir(FileName); + if IOResult = 0 then + Answer := Format(msgMkdOk, [FileName]) + else + Answer := Format(msgMkdFailed, [FileName]); + {$I+} + end; + except + on E:Exception do begin + Answer := Format(msgMkdFailed, [E.Message]) + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandAPPE( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Allowed : Boolean; + FilePath : TFtpString; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcAPPE; + Client.FileName := SlashesToBackSlashes(Params); + Client.HasOpenedFile := FALSE; + Client.AbortingTransfer := FALSE; + Client.TransferError := 'Transfer Ok'; + Allowed := TRUE; + FilePath := BuildFilePath(Client, Client.Directory, Client.FileName); + TriggerValidatePut(Client, FilePath, Allowed); + if not Allowed then begin + Answer := msgAppeDisabled; + Exit; + end; + Client.FilePath := FilePath; + if Client.PassiveMode then begin + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + if Client.PassiveConnected then + Client.DataSocket.OnSessionConnected(Client.DataSocket, 0) + else + Client.PassiveStart := TRUE; + end + else begin + Client.DataSocket.Proto := 'tcp'; + Client.DataSocket.Addr := Client.DataAddr; + Client.DataSocket.Port := Client.DataPort; + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + Client.DataSocket.LingerOnOff := wsLingerOff; + Client.DataSocket.LingerTimeout := 0; + Client.DataSocket.ComponentOptions := [wsoNoReceiveLoop]; + Client.DataSocket.Connect; + end; + Client.RestartPos := GetFileSize(Client.FilePath); + if Client.RestartPos < 0 then + Client.RestartPos := 0; + Answer := Format(msgAppeReady, [Params,Client.RestartPos]); + except + on E:Exception do begin + Answer := Format(msgAppeFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandSTRU( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + Client.CurCmdType := ftpcSTRU; + Answer := Format(MsgStruOk, [Params]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function DirExists(Dir : String) : Boolean; +var + F : TSearchRec; +begin + Result := (FindFirst(Dir, faDirectory, F) = 0); + FindClose(F); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandRMD( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileName : TFtpString; + Allowed : Boolean; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + Client.CurCmdType := ftpcRMD; + FileName := BuildFilePath(Client, Client.Directory, Params); + Allowed := TRUE; + TriggerValidateRmd(Client, FileName, Allowed); + if not Allowed then begin + Answer := msgRmdDisabled; + Exit; + end; + if Params = '' then + Answer := Format(msgMkdSyntax, [Params]) + else if not DirExists(FileName) then + Answer := Format(msgRmdNotExists, [FileName]) + else begin + {$I-} + RmDir(FileName); + if IOResult = 0 then + Answer := Format(msgRmdOk, [FileName]) + else + Answer := Format(msgRmdFailed, [FileName]); + {$I+} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandABOR( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.DataSocket.State = wsConnected then begin + Client.TransferError := 'ABORT requested by client'; + Client.AbortingTransfer := TRUE; + Client.DataSocket.Close; + end; + Answer := msgAborOk; +end; + +{ !!!!!!!!! NGB : Added entire next function } +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpServer.GetNextAvailablePasvPort : String; +var + I : Integer; + NewPort : Integer; + TablePtr : PBoolean; +begin + if (FPasvPortRangeSize = 0) or (FPasvPortRangeStart = 0) then + Result := '0' + else begin + Result := ''; + TablePtr := FPasvPortTable; + I := 0; + while I < FPasvPortRangeSize do begin + if TablePtr^ = FALSE then begin + TablePtr^ := TRUE; + NewPort := FPasvPortRangeStart + I; + Result := IntToStr(NewPort); + break; + end; + Inc(I); + Inc(TablePtr); + end; + end; +end; +{ !!!!!!!!! NGB : Added previous function } + +{ !!!!!!!!! NGB : Added entire next function } +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.FreeCurrentPasvPort(DataSocket : TFtpCtrlSocket); +var + CurrentPort : Integer; + ErrorCode : Integer; +begin + Val(DataSocket.DataSocket.GetXPort, CurrentPort, ErrorCode); + if (CurrentPort >= FPasvPortRangeStart) and + (CurrentPort <= (FPasvPortRangeStart + FPasvPortRangeSize)) then + PBoolean(PChar(FPasvPortTable) + + SizeOf(Boolean) * (CurrentPort - FPasvPortRangeStart))^ := FALSE; +end; +{ !!!!!!!!! NGB : Added previous function } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandPASV( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + saddr : TSockAddrIn; + saddrlen : Integer; + DataPort : Integer; + IPAddr : TInAddr; + PASVAddr : TInAddr; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + { Get our IP address from our control socket } + saddrlen := SizeOf(saddr); + Client.GetSockName(saddr, saddrlen); + IPAddr := saddr.sin_addr; + + Client.DataSocket.Close; + Client.DataSocket.Addr := '0.0.0.0'; { Any addr } + +{ !!!!!!!!! NGB: Need to get next available port - next 3 lines modified } + Client.DataSocket.Port := GetNextAvailablePasvPort; { '0'; Any port } + if Client.DataSocket.Port = '' then + raise Exception.Create('No available PASV Ports'); +{ !!!!!!!!! NGB: previous 3 lines modified } + + Client.DataSocket.Proto := 'tcp'; + Client.DataSocket.OnSessionAvailable := ClientPassiveSessionAvailable; + Client.DataSocket.OnSessionConnected := nil; + Client.DataSocket.OnSessionClosed := nil; + Client.DataSocket.OnDataAvailable := nil; + Client.DataSocket.ComponentOptions := [wsoNoReceiveLoop]; + Client.DataSocket.Listen; +{ if Client.DataSocket.Listen <> 0 then + raise Exception.Create('Listen failed'); 18/11/98 } + + { Get the port assigned by winsock } + saddrlen := SizeOf(saddr); + Client.DataSocket.GetSockName(saddr, saddrlen); + DataPort := WSocket_ntohs(saddr.sin_port); + + if Client.sin.sin_addr.s_addr = WSocket_htonl($7F000001) then + Answer := Format(msgPasvLocal, + [HiByte(DataPort), + LoByte(DataPort)]) +{!!! NGB: Changed the following 24 lines } + else begin + if FPasvIpAddr = '' then + Answer := Format(msgPasvRemote, + [ord(IPAddr.S_un_b.s_b1), + ord(IPAddr.S_un_b.s_b2), + ord(IPAddr.S_un_b.s_b3), + ord(IPAddr.S_un_b.s_b4), + HiByte(DataPort), + LoByte(DataPort)]) + else begin + PASVAddr.S_addr := WSocket_inet_addr(@FPasvIpAddr[1]); + if PASVAddr.S_addr = u_long(INADDR_NONE) then + raise Exception.Create('Invalid PASV IP Address') + else + Answer := Format(msgPasvRemote, + [ord(PASVAddr.S_un_b.s_b1), + ord(PASVAddr.S_un_b.s_b2), + ord(PASVAddr.S_un_b.s_b3), + ord(PASVAddr.S_un_b.s_b4), + HiByte(DataPort), + LoByte(DataPort)]); + end; + end; +{!!! NGB: Changed the previous bunch of lines } + + Client.PassiveMode := TRUE; + Client.PassiveStart := FALSE; + Client.PassiveConnected := FALSE; + except + on E:Exception do begin + Answer := Format(msgPasvExcept, [E.Message]); + try + Client.DataSocket.Close; + except + { Ignore any exception here } + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandMDTM( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + FileTime : String; + FileName : String; +begin + Client.CurCmdType := ftpcMDTM; + FileName := BuildFilePath(Client, Client.Directory , Params); + if Params = '' then + Answer := msgMdtmSyntax + else if not FileExists(FileName) then + Answer := Format(msgMdtmNotExists, [FileName]) + else begin + try + FileTime := FileUtcStr(FileName); + if Length(FileTime) <> 0 then + Answer := Format(msgMdtmOk, [FileTime]) + else + Answer := Format(msgMdtmFailed, + ['UTC File time retrieval failed']) + except + on E:Exception do + Answer := Format(msgSizeFailed , [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandMode( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + if (Params = '') then begin + Answer := msgModeSyntax; + Exit; + end; + if (Params <> 'S') and (Params <> 's') then begin + Answer := msgModeNotS; + Exit; + end; + Answer := msgModeOK; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandOverflow( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + Buf : array [0..1023] of char; +begin + { Disable receiving } + Client.Shutdown(0); + { Flush receive buffer } + while (Client.Receive(@Buf, SizeOf(buf)) > 0) do ; + { Answer to client } + Answer := msgOverflow; + { Will close connection } + PostMessage(FWindowHandle, WM_FTPSRV_CLOSE_REQUEST, + WPARAM(Client.ID), LPARAM(Client)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ [ep] STOU command support } +{ This code is more or less the same as CommandSTOR, with the addition of } +{ GetUniqueFileName event triggering to let the user a chance to provide a } +{ file name. } +procedure TFtpServer.CommandSTOU( + Client: TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +var + UniqueName : TFtpString; + buffer : array [0..255] of char ; + Allowed : Boolean; + FilePath : TFtpString; +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcSTOU; + + { fire the GetUniqueFileName event to get the file name to be used to } + { store data } + UniqueName := ''; + TriggerGetUniqueFileName (Client, UniqueName); + + { no file name has been provided, or provided one already exists } + { => create one } + if (UniqueName = '') or + (FileExists (BuildFilePath(Client, Client.Directory, UniqueName))) then begin +{$IFDEF VER80} + GetTempFileName(Client.Directory[1], 'FTP', 0, Buffer); +{$ELSE} + GetTempFileName (PChar(Client.Directory), 'FTP', 0, buffer) ; +{$ENDIF} + UniqueName := StrPas (Buffer); + { remove the .tmp extensions generated by GetTempFileName } + UniqueName := ChangeFileExt (UniqueName, ''); + end ; + + Client.FileName := SlashesToBackSlashes(Client.FileName); + Client.HasOpenedFile := FALSE; + Client.AbortingTransfer := FALSE; + Client.TransferError := 'Transfer Ok'; + Allowed := TRUE; + FilePath := BuildFilePath(Client, Client.Directory, Client.FileName); + TriggerValidatePut(Client, FilePath, Allowed); + if not Allowed then begin + Answer := msgStorDisabled; + Exit; + end; + Client.FilePath := FilePath; + if Client.PassiveMode then begin + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + if Client.PassiveConnected then + Client.DataSocket.OnSessionConnected(Client.DataSocket, 0) + else + Client.PassiveStart := TRUE; + end + else begin + Client.DataSocket.Proto := 'tcp'; + Client.DataSocket.Addr := Client.DataAddr; + Client.DataSocket.Port := Client.DataPort; + Client.DataSocket.OnSessionConnected := ClientStorSessionConnected; + Client.DataSocket.OnSessionClosed := ClientStorSessionClosed; + Client.DataSocket.OnDataAvailable := ClientStorDataAvailable; + Client.DataSocket.OnDataSent := nil; + Client.DataSocket.LingerOnOff := wsLingerOff; + Client.DataSocket.LingerTimeout := 0; +{$IFDEF BIND_FTP_DATA} + Client.DataSocket.LocalAddr := Client.GetXAddr; + Client.DataSocket.LocalPort := 'ftp-data'; {20} +{$ENDIF} + Client.DataSocket.ComponentOptions := [wsoNoReceiveLoop]; + Client.DataSocket.Connect; + end; + Answer := Format(msgStouSuccess, [UniqueName]); + except + on E:Exception do begin + Answer := Format(msgStouFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.CommandFEAT( + Client : TFtpCtrlSocket; + var Keyword : TFtpString; + var Params : TFtpString; + var Answer : TFtpString); +begin + if Client.FtpState <> ftpcReady then begin + Answer := msgNotLogged; + Exit; + end; + + try + Client.CurCmdType := ftpcFEAT; + Answer := msgFeatFollows + #13#10 + + ' SIZE'+ #13#10 + + ' MDTM'+ #13#10 + + msgFeatFollowDone; + except + on E:Exception do begin + Answer := Format(msgFeatFailed, [E.Message]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.SetPasvPortRangeSize(const NewValue: Integer); +var + OldValue : Integer; + TablePtr : PBoolean; + I : Integer; +begin + if (NewValue < 0) or (NewValue > 65535) then + raise ERangeError.CreateFmt('Invalid PasvPortRangeSize %d.', [NewValue]); + if FPasvPortRangeSize = NewValue then + Exit; + OldValue := FPasvPortRangeSize; + + { If we reduce the range, we must be sure to not affect any port in use } + if NewValue < OldValue then begin + { Check if any port is used before changing } + TablePtr := PBoolean(PChar(FPasvPortTable) + SizeOf(Boolean) * NewValue); + I := NewValue; + while I < OldValue do begin + if TablePtr^ then + raise Exception.Create('Unable to change PasvPortRangeSize ' + + 'when port is in use.'); + Inc(I); + Inc(TablePtr); + end; + end; + +{$IFDEF VER80} + ReallocMem(FPasvPortTable, FPasvPortTableSize, NewValue); +{$ELSE} + ReallocMem(FPasvPortTable, NewValue); +{$ENDIF} + FPasvPortTableSize := NewValue; + FPasvPortRangeSize := NewValue; + if OldValue >= NewValue then + Exit; + + TablePtr := PBoolean(PChar(FPasvPortTable) + SizeOf(Boolean) * OldValue); + while OldValue < NewValue do begin + TablePtr^ := FALSE; + Inc(TablePtr); + Inc(OldValue); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpServer.SetPasvPortRangeStart(const NewValue: Integer); +var + TablePtr : PBoolean; + I : Integer; +begin + if (NewValue < 0) or (NewValue > 65535) then + raise ERangeError.CreateFmt('Invalid PasvPortRangeStart %d.', [NewValue]); + if FPasvPortRangeStart = NewValue then + Exit; + { Check if any port is used before changing } + TablePtr := FPasvPortTable; + I := 0; + while I < FPasvPortRangeSize do begin + if TablePtr^ then + raise Exception.Create('Unable to change PasvPortRangeStart ' + + 'when port is in use.'); + Inc(I); + Inc(TablePtr); + end; + + { Now we can change PasvPortRangeStart } + FPasvPortRangeStart := NewValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/FtpSrvC.dcu b/lib/ics/Delphi/Vc32/FtpSrvC.dcu new file mode 100644 index 00000000..1e6a1c12 Binary files /dev/null and b/lib/ics/Delphi/Vc32/FtpSrvC.dcu differ diff --git a/lib/ics/Delphi/Vc32/FtpSrvC.pas b/lib/ics/Delphi/Vc32/FtpSrvC.pas new file mode 100644 index 00000000..2698c12c --- /dev/null +++ b/lib/ics/Delphi/Vc32/FtpSrvC.pas @@ -0,0 +1,579 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TFtpCtrlSocket component. It handle the client connection for + the TFtpServer component. +Creation: April 21, 1998 +Version: 1.09 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Apr 29, 1998 V0.90 released for beta testing. +May 03, 1998 V0.93 Adapted for Delphi 2.0 and C++Builder +May 04, 1998 V0.94 Added support for UNC (not finished !) +Jul 09, 1998 V1.00 Adapted for Delphi 4, removed beta status. +Jul 21, 1998 V1.01 Publised TrumpetCompatibility property. +Aug 06, 1998 V1.02 Verified that FRcvCnt was 0 in SetRcvSize. Suggested + by Nick MacDonald +Mar 06, 1999 V1.03 Added code from Plegge, Steve to add + APPE and STRU support. +Aug 20, 1999 V1.04 Revised compile time options. Adapted for BCB4. +Nov 24, 1999 V1.05 Added MTDM support. Thanks to Bruce Christensen + for his code. +Jan 24, 2000 V1.06 Patch IE5 bug in file names. Thanks to +Nov 11, 2000 V1.07 Checked for DOS attack. Close connection when buffer + overflow occured. Thanks to Lester for finding + this security hole. +Jul 28, 2001 V1.08 Added ID property to uniquely indentify the client. +Sep 09, 2001 V1.09 Eric Pascual changed TFtpCmdType type + to make it a Byte so that new values can be added by + sub-components which add new commands. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpSrvC; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, WinProcs, Messages, Classes, SysUtils, Winsock, WSocket; + +const + FtpCtrlSocketVersion = 109; + CopyRight : String = ' TFtpCtrlSocket (c) 1998-2001 F. Piette V1.09 '; + DefaultRcvSize = 2048; + +type + EFtpCtrlSocketException = class(Exception); + TFtpCtrlState = (ftpcInvalid, ftpcWaitingUserCode, ftpcWaitingPassword, + ftpcReady, ftpcWaitingAnswer); + + { TFtpCmdType is now defined as a byte and enumerated items as constants, } + { so that new values can be added by sub-components who add new commands } + TFtpCmdType = Byte; + +const + ftpcPORT = 0; + ftpcSTOR = 1; + ftpcRETR = 2; + ftpcCWD = 3; + ftpcXPWD = 4; + ftpcPWD = 5; + ftpcUSER = 6; + ftpcPASS = 7; + ftpcLIST = 8; + ftpcRMD = 9; + ftpcTYPE = 10; + ftpcSYST = 11; + ftpcQUIT = 12; + ftpcDELE = 13; + ftpcRNFR = 14; + ftpcMKD = 15; + ftpcRNTO = 16; + ftpcNOOP = 17; + ftpcNLST = 18; + ftpcABOR = 19; + ftpcCDUP = 20; + ftpcSIZE = 21; + ftpcREST = 22; + ftpcAPPE = 23; + ftpcSTRU = 24; {jsp - Added APPE and STRU types } + ftpcMDTM = 25; {bkc - Added MDTM type } + ftpcSTOU = 26; {ep - Added STOU type } + ftpcFEAT = 27; {SSV - Added FEAT type } + +type + TFtpOption = (ftpcUNC); + TFtpOptions = set of TFtpOption; + TDisplayEvent = procedure (Sender : TObject; Msg : String) of object; + TCommandEvent = procedure (Sender : TObject; CmdBuf : PChar; CmdLen : Integer) of object; + + TFtpCtrlSocket = class(TCustomWSocket) + protected + FDataSocket : TWSocket; + FRcvBuf : PChar; + FRcvCnt : Integer; + FRcvSize : Integer; + FBusy : Boolean; + FConnectedSince : TDateTime; + FLastCommand : TDateTime; + FCommandCount : LongInt; + FBanner : String; + FUserName : String; + FPassWord : String; + FCloseRequest : Boolean; + FHomeDir : String; + FDirectory : String; + FFtpState : TFtpCtrlState; + FAbortingTransfer : Boolean; + FUserData : LongInt; { Reserved for component user } + FPeerAddr : String; + FID : LongInt; + FOnDisplay : TDisplayEvent; + FOnCommand : TCommandEvent; + procedure TriggerSessionConnected(Error : Word); override; + function TriggerDataAvailable(Error : Word) : boolean; override; + procedure TriggerCommand(CmdBuf : PChar; CmdLen : Integer); virtual; + procedure SetRcvSize(newValue : Integer); + public + BinaryMode : Boolean; + DataAddr : String; + DataPort : String; + FileName : String; + FilePath : String; + DataSessionActive : Boolean; + DataStream : TStream; + HasOpenedFile : Boolean; + TransferError : String; + ByteCount : LongInt; + DataSent : Boolean; + CurCmdType : TFtpCmdType; + RestartPos : LongInt; + FromFileName : String; + ToFileName : String; + PassiveMode : Boolean; + PassiveStart : Boolean; + PassiveConnected : Boolean; + Options : TFtpOptions; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Dup(newHSocket : TSocket); override; + procedure StartConnection; virtual; + procedure SendAnswer(Answer : String); + procedure SetDirectory(newValue : String); + procedure SetAbortingTransfer(newValue : Boolean); + function GetPeerAddr: string; override; + property DataSocket : TWSocket read FDataSocket; + property ConnectedSince : TDateTime read FConnectedSince; + property LastCommand : TDateTime read FLastCommand; + property CommandCount : LongInt read FCommandCount; + property RcvBuf : PChar read FRcvBuf; + property RcvdCount; + property CloseRequest : Boolean read FCloseRequest + write FCloseRequest; + property Directory : String read FDirectory + write SetDirectory; + property HomeDir : String read FHomeDir + write FHomeDir; + property AbortingTransfer : Boolean read FAbortingTransfer + write SetAbortingTransfer; + property ID : LongInt read FID + write FID; + published + property FtpState : TFtpCtrlState read FFtpState + write FFtpState; + property Banner : String read FBanner + write FBanner; + property RcvSize : integer read FRcvSize + write SetRcvSize; + property Busy : Boolean read FBusy + write FBusy; + property UserName : String read FUserName + write FUserName; + property PassWord : String read FPassWord + write FPassWord; + property UserData : LongInt read FUserData + write FUserData; + property OnDisplay : TDisplayEvent read FOnDisplay + write FOnDisplay; + property OnCommand : TCommandEvent read FOnCommand + write FOnCommand; + property OnSessionClosed; + property OnDataSent; + property HSocket; + property AllSent; + property State; +{$IFDEF VER80} + property TrumpetCompability; +{$ENDIF} + end; + +function IsUNC(S : String) : Boolean; +procedure PatchIE5(var S : String); +{$IFDEF VER80} +function ExtractFileDir(const FileName: String): String; +function ExtractFileDrive(const FileName: String): String; +{$ENDIF} + +implementation + +const + DefaultBanner = '220-ICS FTP Server ready'; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ ExtractFileDir extracts the drive and directory parts of the given } +{ filename. The resulting string is a directory name suitable for passing } +{ to SetCurrentDir, CreateDir, etc. The resulting string is empty if } +{ FileName contains no drive and directory parts. } +function ExtractFileDir(const FileName: String): String; +var + I: Integer; +begin + I := Length(FileName); + while (I > 0) and (not (FileName[I] in ['\', ':'])) do + Dec(I); + if (I > 1) and (FileName[I] = '\') and + (not (FileName[I - 1] in ['\', ':'])) then + Dec(I); + Result := Copy(FileName, 1, I); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ ExtractFileDrive extracts the drive part of the given filename. For } +{ filenames with drive letters, the resulting string is ':'. } +{ For filenames with a UNC path, the resulting string is in the form } +{ '\\\'. If the given path contains neither } +{ style of filename, the result is an empty string. } +function ExtractFileDrive(const FileName: String): String; +var + I : Integer; +begin + if Length(FileName) <= 1 then + Result := '' + else begin + if FileName[2] = ':' then + Result := Copy(FileName, 1, 2) + else if (FileName[2] = '\') and (FileName[1] = '\') then begin + { UNC file name } + I := 3; + while (I <= Length(FileName)) and (FileName[I] <> '\') do + Inc(I); + Inc(I); + while (I <= Length(FileName)) and (FileName[I] <> '\') do + Inc(I); + Result := Copy(FileName, 1, I - 1); + end + else + Result := ''; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TFtpCtrlSocket.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FDataSocket := TWSocket.Create(Self); + FDataSocket.Name := 'DataWSocket'; + FBanner := DefaultBanner; + FFtpState := ftpcInvalid; + FHomeDir := 'C:\TEMP\'; + FDirectory := FHomeDir; + SetRcvSize(DefaultRcvSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TFtpCtrlSocket.Destroy; +begin + FRcvCnt := 0; { Clear received data } + SetRcvSize(0); { Free the buffer } + if Assigned(FDataSocket) then begin + FDataSocket.Destroy; + FDataSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.SetRcvSize(newValue : Integer); +begin + if FRcvCnt <> 0 then + raise EFtpCtrlSocketException.Create('Data in buffer, can''t change size'); + + if FRcvSize < 0 then + FRcvSize := 0; + + if FRcvSize = newValue then + Exit; { No change, nothing to do } + + { Free previously allocated buffer } + if FRcvBuf <> nil then begin + FreeMem(FRcvBuf, FRcvSize); + FRcvBuf := nil; + end; + + { Allocate new buffer } + FRcvSize := newValue; + + { If size is nul, then do not allocated the buffer } + if newValue > 0 then + GetMem(FRcvBuf, FRcvSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.StartConnection; +begin + FConnectedSince := Now; + FLastCommand := 0; + FCommandCount := 0; + FFtpState := ftpcWaitingUserCode; + SendStr(FBanner + #13#10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpCtrlSocket.GetPeerAddr: String; +begin + Result := FPeerAddr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.Dup(newHSocket : TSocket); +begin + inherited Dup(newHSocket); + FPeerAddr := inherited GetPeerAddr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.TriggerSessionConnected(Error : Word); +begin + FPeerAddr := inherited GetPeerAddr; + inherited TriggerSessionConnected(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.TriggerCommand(CmdBuf : PChar; CmdLen : Integer); +begin + if Assigned(FOnCommand) then + FOnCommand(Self, CmdBuf, CmdLen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpCtrlSocket.TriggerDataAvailable(Error : Word) : Boolean; +var + Len : Integer; + I : Integer; +begin + Result := TRUE; { We read data } + + Len := Receive(@FRcvBuf[FRcvCnt], FRcvSize - FRcvCnt - 1); + if Len <= 0 then + Exit; + + FRcvCnt := FRcvCnt + Len; + FRcvBuf[FRcvCnt] := #0; + + while TRUE do begin + I := 0; + while (I < FRcvCnt) and (FRcvBuf[I] <> #10) do + Inc(I); + if I >= FRcvCnt then begin + { Check line overflow. } + if FRcvCnt >= (FRcvSize - 1) then begin + StrPCopy(FRcvBuf, 'OVER' + #13#10); + FRcvCnt := StrLen(FRcvBuf); + I := FRcvCnt - 1; + end + else + Exit; + end; + FRcvBuf[I] := #0; + FLastCommand := Now; + Inc(FCommandCount); + if (I > 1) and (FRcvBuf[I - 1] = #13) then begin + FRcvBuf[I - 1] := #0; + TriggerCommand(FRcvBuf, I - 1); + FRcvBuf[I - 1] := #13; + end + else + TriggerCommand(FRcvBuf, I); + + FRcvBuf[I] := #10; + if I >= (FRcvCnt - 1) then begin + FRcvCnt := 0; + FRcvBuf[0] := #0; + break; + end; + Move(FRcvBuf[I + 1], FRcvBuf^, FRcvCnt - I); + FRcvCnt := FRcvCnt - I - 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.SendAnswer(Answer : String); +begin + SendStr(Answer + #13#10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function IsUNC(S : String) : Boolean; +begin + Result := (Length(S) >= 2) and (S[2] = '\') and (S[1] = '\'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure PatchIE5(var S : String); +begin + { \c:\Temp\ -> c:\Temp\ IE5 like this invalid syntax !} + if (Length(S) >= 3) and (S[3] = ':') and (S[1] = '\') then + Delete(S, 1, 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.SetDirectory(newValue : String); +var + newDrive : String; + newPath : String; + I : Integer; +begin + if FDirectory = newValue then + Exit; + + PatchIE5(newValue); + newDrive := ExtractFileDrive(newValue); + if IsUNC(newDrive) then begin + if not (ftpcUNC in Options) then + raise Exception.Create('Cannot accept UNC path'); + FDirectory := newValue; + { Always terminate with a backslash } + if (Length(FDirectory) > 0) and (FDirectory[Length(FDirectory)] <> '\') then + FDirectory := FDirectory + '\'; + Exit; + end; + + if Length(newDrive) = 0 then begin + newDrive := ExtractFileDrive(FDirectory); + newPath := newValue; + end + else + newPath := Copy(newValue, 3, Length(newValue)); + + if Pos(':', newPath) <> 0 then + raise Exception.Create('Invalid directory name syntax'); + + if newPath = '..' then begin + if IsUNC(FDirectory) then begin + I := Length(FDirectory) - 1; + while (I > 0) and (FDirectory[I] <> '\') do + Dec(I); + if I > Length(newDrive) then + SetLength(FDirectory, I); + Exit; + end + else begin + newPath := Copy(FDirectory, 3, Length(FDirectory)); + I := Length(newPath) - 1; + while (I > 0) and (newPath[I] <> '\') do + Dec(I); + SetLength(newPath, I); + end; + end; + + if (Length(newPath) > 0) and (newPath[1] <> '\') then begin + { Relative path } + if IsUNC(FDirectory) then begin + FDirectory := FDirectory + newPath; + { Always terminate with a backslash } + if (Length(FDirectory) > 0) and (FDirectory[Length(FDirectory)] <> '\') then + FDirectory := FDirectory + '\'; + Exit; + end + else begin + if UpperCase(newDrive[1]) <> UpperCase(FDirectory[1]) then + raise Exception.Create('Cannot accept path not relative to current directory'); + if Pos('.\', newPath) <> 0 then + raise Exception.Create('Cannot accept relative path using dot notation'); + if newPath = '.' then + newPath := Copy(FDirectory, 3, Length(FDirectory)) + else + newPath := Copy(FDirectory, 3, Length(FDirectory)) + newPath; + end; + end + else begin + if Pos('.\', newPath) <> 0 then + raise Exception.Create('Cannot accept relative path using dot notation'); + end; + + if Length(newPath) = 0 then begin + if UpperCase(newDrive[1]) <> UpperCase(FDirectory[1]) then + newPath := '\' + else + newPath := Copy(FDirectory, 3, Length(FDirectory)); + end; + + { Always terminate with a backslash } + if (Length(newPath) > 0) and (newPath[Length(newPath)] <> '\') then + newPath := newPath + '\'; + + FDirectory := newDrive + newPath; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpCtrlSocket.SetAbortingTransfer(newValue : Boolean); +begin + FAbortingTransfer := newValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + diff --git a/lib/ics/Delphi/Vc32/FtpSrvT.dcu b/lib/ics/Delphi/Vc32/FtpSrvT.dcu new file mode 100644 index 00000000..38256089 Binary files /dev/null and b/lib/ics/Delphi/Vc32/FtpSrvT.dcu differ diff --git a/lib/ics/Delphi/Vc32/FtpSrvT.pas b/lib/ics/Delphi/Vc32/FtpSrvT.pas new file mode 100644 index 00000000..43a2378e --- /dev/null +++ b/lib/ics/Delphi/Vc32/FtpSrvT.pas @@ -0,0 +1,178 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Time functions. +EMail: francois.piette@pophost.eunet.be francois.piette@swing.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Creation: Nov 24, 1999 from Bruce Christensen + code used with his permission. Thanks. +Version: 1.02 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1999-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Apr 02, 2000 V1.01 Added definition for TIME_ZONE_ID_STANDARD for BCB1 and BCB3 +May 20, 2000 V1.01 Added definition for TIME_ZONE_ID_STANDARD for Delphi 3 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FtpSrvT; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +const + FtpSrvT_Unit = 102; + CopyRight : String = ' FtpSrvT (c) 1999-2000 F. Piette V1.02 '; + +function FileUtcStr(cFileName : String) : String; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +implementation +uses + WinTypes, WinProcs, SysUtils; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function PadIntZero(nWord : Word; + nWidth : Byte): String; +var + cResult : String; +begin + cResult := IntToStr(nWord); + while Length(cResult) < nWidth do + cResult := '0' + cResult; + + Result := cResult; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TimeDateStr(dDateTime : TDateTime) : String; +var + nYear, nMonth, nDay, nHours, nMinutes, nSeconds, nMilliSecs : Word; +begin + DecodeDate(dDateTime, nYear, nMonth, nDay); + DecodeTime(dDateTime, nHours, nMinutes, nSeconds, nMilliSecs); + + Result := PadIntZero(nYear, 4) + + PadIntZero(nMonth, 2) + + PadIntZero(nDay, 2) + + PadIntZero(nHours, 2) + + PadIntZero(nMinutes, 2) + + PadIntZero(nSeconds, 2) + '.' + + PadIntZero(nMilliSecs, 3); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetLocalBiasUTC : LongInt; +{$IFDEF VER80} +{ Delphi 1 doesn't support GetTimeZoneInformation } +begin + Result := 0; +end; +{$ELSE} +var + tzInfo : TTimeZoneInformation; +{$IFDEF VER93} {BCB1} +const + TIME_ZONE_ID_STANDARD = 1; + TIME_ZONE_ID_DAYLIGHT = 2; +{$ENDIF} +{$IFDEF VER110} {BCB3} +const + TIME_ZONE_ID_STANDARD = 1; + TIME_ZONE_ID_DAYLIGHT = 2; +{$ENDIF} +{$IFDEF VER90} {D2} +const + TIME_ZONE_ID_STANDARD = 1; + TIME_ZONE_ID_DAYLIGHT = 2; +{$ENDIF} +{$IFDEF VER100} {D3} +const + TIME_ZONE_ID_STANDARD = 1; + TIME_ZONE_ID_DAYLIGHT = 2; +{$ENDIF} +begin + case GetTimeZoneInformation(tzInfo) of + TIME_ZONE_ID_STANDARD: Result := tzInfo.Bias + tzInfo.StandardBias; + TIME_ZONE_ID_DAYLIGHT: Result := tzInfo.Bias + tzInfo.DaylightBias; + else + Result := tzInfo.Bias; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function DateTimeToUTC(dtDT : TDateTime) : TDateTime; +begin + Result := dtDT + GetLocalBiasUTC / (60.0 * 24.0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetFileAge(cFile : String) : Integer; +begin + if cFile[Length(cFile)] in ['\', '/'] then + cFile := cFile + '.'; + Result := FileAge(cFile); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function FileUtcStr(cFileName : String) : String; +begin + Result := TimeDateStr( + DateTimeToUTC( + FileDateToDateTime(GetFileAge(cFileName)))); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/HttpProt.dcu b/lib/ics/Delphi/Vc32/HttpProt.dcu new file mode 100644 index 00000000..977c82ac Binary files /dev/null and b/lib/ics/Delphi/Vc32/HttpProt.dcu differ diff --git a/lib/ics/Delphi/Vc32/HttpProt.pas b/lib/ics/Delphi/Vc32/HttpProt.pas new file mode 100644 index 00000000..d8d8a55c --- /dev/null +++ b/lib/ics/Delphi/Vc32/HttpProt.pas @@ -0,0 +1,2331 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Creation: November 23, 1997 +Version: 1.47 +Description: THttpCli is an implementation for the HTTP protocol + RFC 1945 (V1.0), and some of RFC 2068 (V1.1) +Credit: This component was based on a freeware from by Andreas + Hoerstemeier and used with his permission. + andy@hoerstemeier.de http://www.hoerstemeier.com/index.htm +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Quick Reference: +HTTP component can retrieve documents or files using HTTP protocol; that is +connect to a HTTP server also known as a webserver. It can also trigger a +CGI/ISAPI/NSAPI script and post data using either GET or POST method. +Syntax of an URL: protocol://[user[:password]@]server[:port]/path +Path can include data: question mark followed by URL encoded data. +HTTP component is either asynchonous (non-blocking) or synchonous (blocking). +Highest performance is when using asynchonous operation. This is the +recommended way to use HTTP component. +To request several URL simultaneously, use asynchronous operation and as much +HTTP components as you wants to request URLs. All requests will be executed +simultaneously without using multi-threading and without blocking your app. +Methods: + GetASync Asynchronous, non-blocking Get + Retrieve document or file specified by URL, without blocking. + OnRequestDone event trigered when finished. Use HTTP GET + method (data contained in URL) + PostASync Asynchronous, non-blocking Post + Retrieve document or file specified by URL, without blocking. + OnRequestDone event trigered when finished. Use HTTP POST + method (data contained in request stream) + HeadASync Asynchronous, non-blocking Head + Retrieve document or file header specified by URL, without + blocking. OnRequestDone event trigered when finished. Use HTTP + HEAD method. + Get Synchronous, blocking Get. Same as GetAsync, but blocks until + finished. + Post Synchronous, blocking Post. Same as PostAsync, but blocks until + finished. + Head Synchronous, blocking Head. Same as HeadAsync, but blocks until + finished. + Abort Immediately close communication. + +Updates: +11/29/97 RcvdStream and SendStream properties moved to public section +11/30/97 Document name bug corrected +12/02/97 Removed bug occuring with terminating slash in docname +12/03/97 Added properties RcvdCount and SentCount to easily add a progress + bar feature (On receive, the ContentLength is initialized with the + value from the header. Update the progress bar in the OnDocData event, + or the OnSendData event). + Added the OnSendBegin, OnSendData and OnSendEnd events. +12/07/97 Corrected Head function to work as expected. Thanks to + R. Barry Jones . +30/12/97 V0.97 Added a Cookie property to send cookies +11/01/98 V0.98 Added WSocket read-only property which enable to access the + socket component used internally. For example to close it to abort + a connection. +13/01/98 V0.99 Added MultiThreaaded property to tell the component that it is + working in a thread and should take care of it. +15/01/98 V1.00 Completely revised internal working to make it work properly + with winsock 2. The TimeOut property is gone. + Changed OnAnswerLine event to OnHeaderData to be more consistent. + Replaced AnswserLine property by readonly LastResponse property. + Added OnRequestDone event. Added GetAsync, PostAsync, HeadAsync + asynchronous, non-blocking methods. Added Abort procedure. +16/01/98 V1.01 Corrected a bug which let some data be lost when receiving + (thanks to Fulvio J. Castelli ) + Added test for HTTP/1.1 response in header. +31/01/98 V1.02 Added an intermediate message posting for the OnRequestDone + event. Thanks to Ed Hochman for his help. + Added an intermediate PostMessage to set the component to ready state. +04/02/98 V1.03 Added some code to better handle DocName (truncating at the + first question mark). +05/02/98 V1.04 Deferred login after a relocation, using WM_HTTP_LOGIN message. + Added workarounf to support faulty webservers which sent only a single + LF in header lines. Submitted by Alwin Hoogerdijk +15/03/98 V1.05 Enlarge buffers from 2048 to 8192 bytes (not for D1) +01/04/98 V1.06 Adapted for BCB V3 +13/04/98 V1.07 Made RcvdHeader property readonly and cleared the content at the + start of a request. + Protected Abort method from calling when component is ready. + Ignore any exception triggered by CancelDnsLookup in Abort method. +14/04/98 V1.08 Corrected a relocation bug occuring with relative path +26/04/98 V1.09 Added OnLocationChange event +30/04/98 V1.10 Added ProxyUsername and ProxyPassword. Suggested by + Myers, Mike . +26/05/98 V1.11 Corrected relocation problem when used with ASP webpages +09/07/98 V1.12 Adapted for Delphi 4 + Checked argument length in SendCommand +19/09/98 V1.13 Added support for HTML document without header + Added OnSessionConnected event, httpConnected state and + httpDnsLookupDone state. + Corrected a problem with automatic relocation. The relocation + message was included in data, resulting in wrong document data. + Added two new events: OnRequestHeaderBegin and OnRequestHeaderEnd. + They replace the OnHeaderBegin and OnHeaderEnd events that where + called for both request header (to web server) and response + header (from web server) +22/11/98 V1.14 Added a Location property than gives the new location in + case of page relocation. Suggested by Jon Robertson +21/12/98 V1.15 Set ContentLength equal to -1 at start of command. +31/01/99 V1.16 Added HostName property +01/02/99 V1.17 Port was lost in DoRequestAsync when using a proxy. + Thanks to David Wright for his help. + Report Dns lookup error and session connect error in OnrequestDOne + event handler as suggested by Jack Olivera . +14/03/99 V1.18 Added OnCookie event. +16/03/99 V1.19 Added Accept property. + Added a default value to Agent property. + Changed OnCookie event signature (not fully implemented yet !). +07/05/99 V1.20 Added code to support Content Ranges by Jon Robertson + . +24/07/99 V1.21 Yet another change in relocation code. +Aug 20, 1999 V1.22 Changed conditional compilation so that default is same + as latest compiler (currently Delphi 4, Bcb 4). Should be ok for + Delphi 5. Added Sleep(0) in sync wait loop to reduce CPU usage. + Added DnsResult property as suggested by Heedong Lim + . This property is accessible from + OnStateChange when state is httpDnsLookupDone. + Triggered OnDocData after writing to the stream. +Sep 25, 1999 V1.23 Yet another change in relocation code when using proxy + Francois Demers found that some webserver + do not insert a space after colon in header line. Corrected + code to handle it correctly. + Cleared ContentType before issuing request. +Oct 02, 1999 V1.24 added AcceptRanges property. Thanks to Werner Lehmann + +Oct 30, 1999 V1.25 change parameter in OnCommand event from const to var to + allow changing header line, including deleting or adding before + or after a given line sent by the component. +Nov 26, 1999 V1.26 Yet another relocation fix ! +Jun 23, 2000 V1.27 Fixed a bug in ParseURL where hostname is followed by a '?' + (that is no path but a query). +Jul 22, 2000 V1.28 Handle exception during DnsLookup from the login procedure. + Suggested by Robert Penz +Sep 17, 2000 V1.29 Eugene Mayevski added support for + NOFORMS. +Jun 18, 2001 V1.30 Use AllocateHWnd and DeallocateHWnd from wsocket. + Renamed property WSocket to CtrlSocket (this require code change + in user application too). +Jul 25, 2001 V1.31 Danny Heijl found that ISA proxy adds + an extra space to the Content-length header so we need a trim + to extract numeric value. + Ran Margalit found some server sending + empty document (Content-Length = 0) which crashed the component. + Added a check for that case when header is finished. + Andrew N.Silich" found we need to handle + handle relative path using "../" and "./" when relocating. Thanks + for his code which was a good starting point. +Jul 28, 2001 V1.32 Sahat Bun suggested to change POST to + GET when a relocation occurs. + Created InternalClear procedure as suggested by Frank Plagge + . + When relocation, clear FRcvdHeader. If port not specified, then + use port 80. By Alexander O.Kazachkin +Jul 30, 2001 V1.33 Corected a few glitches with Delphi 1 +Aug 18, 2001 V1.34 Corrected a bug in relocation logic: when server send only a + header, with no document at all, relocation was not occuring and + OnHeaderEnd event was not triggered. + Corrected a bug in document name when a CGI was invoked (a '?' + found in the URL). Now, ignore everything after '?' which is CGI + parameter. +Sep 09, 2001 V1.35 Beat Boegli added LocalAddr property + for multihomed hosts. +Sep 29, 2001 V1.36 Alexander Alexishin corrected + ParseUrl to handle the case where http:// is not at start of url: + 'first.domain.com/cgi-bin/serv?url=http://second.domain.com' + Yet another relocation code change. +Oct 28, 2001 V1.37 Corrected SocketSessionClosed which called + LocationSessionClosed when it was not needed. +Nov 10, 2001 V1.38 Fixed a bug where component was trying to connect to proxy + using default port instead on specified port after a relocation. + Corrected a bug when relocating to a relative path. Current path + was not taken into account ! +Mar 06, 2002 V1.39 Fixed a bug in relocation when content-length was 0: no + relocation occured ! (Just check for relocation before checking + content length empty). +Mar 12, 2002 V1.40 Added UrlEncode and UrlDecode utility functions. +Mar 30, 2002 V1.41 Export a few utility functions: IsDigit, IsXDigit, XDigit, + htoin and htoi2. +Apr 14, 2002 V1.42 Paolo S. Asioli found a bug in + relocation code where new user/pass are specified. + On relocation, change DocName according to the relocation. + When DocName has no extension and ContentType is text/html the + add extension .htm (could be expanded do other content type) +Apr 20, 2002 V1.43 Added Socks code from Eugene Mayevski +Apr 21, 2002 V1.44 In LocationSessionClosed, clear status variables from + previous operation. +Sep 06, 2002 V1.45 Made a few more methods virtual. +Sep 10, 2002 V1.46 Added AcceptLanguage property. +Sep 11, 2002 V1.47 Wilfried Mestdagh added + OnBeforeHeaderSend event to help add/remove/change header lines. + He also corrected SocketSessionClosed to report error code. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpProt; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinProcs, WinTypes, Messages, SysUtils, Classes, + {$IFNDEF NOFORMS} + Forms, Controls, + {$ENDIF} + WSocket; + +const + HttpCliVersion = 147; + CopyRight : String = ' THttpCli (c) 1997-2002 F. Piette V1.47 '; + DefaultProxyPort = '80'; +{$IFDEF VER80} + { Delphi 1 has a 255 characters string limitation } + HTTP_RCV_BUF_SIZE = 255; + HTTP_SND_BUF_SIZE = 8193; +{$ELSE} + HTTP_RCV_BUF_SIZE = 8193; + HTTP_SND_BUF_SIZE = 8193; +{$ENDIF} + WM_HTTP_REQUEST_DONE = WM_USER + 1; + WM_HTTP_SET_READY = WM_USER + 2; + WM_HTTP_LOGIN = WM_USER + 3; + httperrNoError = 0; + httperrBusy = 1; + httperrNoData = 2; + httperrAborted = 3; + httperrOverflow = 4; + +type + EHttpException = class(Exception) + ErrorCode : Word; + constructor Create(const Msg : String; ErrCode : Word); + end; + + THttpEncoding = (encUUEncode, encBase64, encMime); + THttpRequest = (httpAbort, httpGET, httpPOST, httpHEAD); + THttpState = (httpReady, httpNotConnected, httpConnected, + httpDnsLookup, httpDnsLookupDone, + httpWaitingHeader, httpWaitingBody, httpAborting); + + TOnCommand = procedure (Sender : TObject; + var S: String) of object; + TDocDataEvent = procedure (Sender : TObject; + Buffer : Pointer; + Len : Integer) of object; + TCookieRcvdEvent = procedure (Sender : TObject; + const Data : String; + var Accept : Boolean) of object; + THttpRequestDone = procedure (Sender : TObject; + RqType : THttpRequest; + Error : Word) of object; + TBeforeHeaderSendEvent = procedure (Sender : TObject; + const Method : String; + Headers : TStrings) of object; + + THttpCli = class(TComponent) + protected + FCtrlSocket : TWSocket; + FWindowHandle : HWND; + FMultiThreaded : Boolean; + FState : THttpState; + FLocalAddr : string; {bb} + FHostName : String; + FTargetHost : String; + FPort : String; + FProxy : String; + FProxyPort : String; + FUsername : String; + FPassword : String; + FProxyUsername : String; + FProxyPassword : String; + FLocation : String; + FConnected : Boolean; + FDnsResult : String; + FSendBuffer : array [0..HTTP_SND_BUF_SIZE - 1] of char; + FRequestType : THttpRequest; + FReceiveBuffer : array [0..HTTP_RCV_BUF_SIZE - 1] of char; + FReceiveLen : Integer; + FLastResponse : String; + FHeaderLineCount : Integer; + FBodyLineCount : Integer; + FAllowedToSend : Boolean; + FURL : String; + FPath : String; + FDocName : String; + FSender : String; + FReference : String; + FAgent : String; + FAccept : String; + FAcceptLanguage : String; + FModifiedSince : TDateTime; { Warning ! Use GMT date/Time } + FNoCache : Boolean; + FStatusCode : Integer; + FReasonPhrase : String; + FContentLength : LongInt; + FContentType : String; + FDoAuthor : TStringList; + FContentPost : String; + FContentRangeBegin : String; {JMR!! Added this line!!!} + FContentRangeEnd : String; {JMR!! Added this line!!!} + FAcceptRanges : String; + FCookie : String; + FLocationFlag : Boolean; + FHeaderEndFlag : Boolean; + FRcvdHeader : TStrings; + FRcvdStream : TStream; { If assigned, will recv the answer } + FRcvdCount : LongInt; { Number of rcvd bytes for the body } + FSentCount : LongInt; + FSendStream : TStream; { Contains the data to send } + FReqStream : TMemoryStream; + FRequestDoneError : Integer; + FNext : procedure of object; + FOnStateChange : TNotifyEvent; + FOnSessionConnected : TNotifyEvent; + FOnRequestHeaderBegin : TNotifyEvent; + FOnRequestHeaderEnd : TNotifyEvent; + FOnHeaderBegin : TNotifyEvent; + FOnHeaderEnd : TNotifyEvent; + FOnHeaderData : TNotifyEvent; + FOnDocBegin : TNotifyEvent; + FOnDocEnd : TNotifyEvent; + FOnDocData : TDocDataEvent; + FOnSendBegin : TNotifyEvent; + FOnSendEnd : TNotifyEvent; + FOnSendData : TDocDataEvent; + FOnTrace : TNotifyEvent; + FOnCommand : TOnCommand; + FOnCookie : TCookieRcvdEvent; + FOnDataAvailable : TDataAvailable; + FOnRequestDone : THttpRequestDone; + FOnLocationChange : TNotifyEvent; + { Added by Eugene Mayevski } + FOnSocksConnected : TSessionConnected; + FOnSocksAuthState : TSocksAuthStateEvent; + FOnSocksError : TSocksErrorEvent; + FOnSocketError : TNotifyEvent; + FOnBeforeHeaderSend : TBeforeHeaderSendEvent; { Wilfried 9 sep 02} + procedure DoSocksConnected(Sender: TObject; Error: word); + procedure DoSocksAuthState(Sender : TObject; AuthState : TSocksAuthState); + procedure DoSocksError(Sender : TObject; Error : Integer; Msg : String); + procedure SocketErrorTransfer(Sender : TObject); + procedure SetSocksServer(value : String); + procedure SetSocksLevel(value : String); + procedure SetSocksPort(value : String); + procedure SetSocksUsercode(value : String); + procedure SetSocksPassword(value : String); + procedure SetSocksAuthentication(value : TSocksAuthentication); + function GetSocksServer : String; + function GetSocksLevel : String; + function GetSocksPort : String; + function GetSocksUsercode : String; + function GetSocksPassword : String; + function GetSocksAuthentication : TSocksAuthentication; + { Mayevski additions end } + procedure SendRequest(const method,Version: String); + procedure GetHeaderLineNext; virtual; + procedure GetBodyLineNext; virtual; + procedure SendCommand(const Cmd : String); virtual; + procedure Login; virtual; + procedure Logout; virtual; + procedure InternalClear; virtual; + procedure SocketDNSLookupDone(Sender: TObject; Error: Word); virtual; + procedure SocketSessionClosed(Sender: TObject; Error: Word); virtual; + procedure SocketSessionConnected(Sender : TObject; Error : Word); virtual; + procedure SocketDataSent(Sender : TObject; Error : Word); virtual; + procedure SocketDataAvailable(Sender: TObject; Error: Word); virtual; + procedure LocationSessionClosed(Sender: TObject; Error: Word); virtual; + procedure DoRequestAsync(Rq : THttpRequest); virtual; + procedure DoRequestSync(Rq : THttpRequest); virtual; + procedure SetMultiThreaded(newValue : Boolean); virtual; + procedure StateChange(NewState : THttpState); virtual; + procedure TriggerStateChange; virtual; + procedure TriggerCookie(const Data : String; + var bAccept : Boolean); virtual; + procedure TriggerSessionConnected; virtual; + procedure TriggerBeforeHeaderSend(const Method : String; + Headers : TStrings); virtual; + procedure TriggerRequestHeaderBegin; virtual; + procedure TriggerRequestHeaderEnd; virtual; + procedure TriggerHeaderBegin; virtual; + procedure TriggerHeaderEnd; virtual; + procedure TriggerDocBegin; virtual; + procedure TriggerDocData(Data : Pointer; Len : Integer); virtual; + procedure TriggerDocEnd; virtual; + procedure TriggerSendBegin; virtual; + procedure TriggerSendData(Data : Pointer; Len : Integer); virtual; + procedure TriggerSendEnd; virtual; + procedure TriggerRequestDone; virtual; + procedure WndProc(var MsgRec: TMessage); virtual; + procedure SetReady; virtual; + procedure AdjustDocName; virtual; + function HTTPCliAllocateHWnd(Method: TWndMethod): HWND; virtual; + procedure HTTPCliDeallocateHWnd(WHandle: HWND); virtual; + procedure WMHttpRequestDone(var msg: TMessage); + message WM_HTTP_REQUEST_DONE; + procedure WMHttpSetReady(var msg: TMessage); + message WM_HTTP_SET_READY; + procedure WMHttpLogin(var msg: TMessage); + message WM_HTTP_LOGIN; + public + constructor Create(Aowner:TComponent); override; + destructor Destroy; override; + procedure Get; { Synchronous blocking Get } + procedure Post; { Synchronous blocking Post } + procedure Head; { Synchronous blocking Head } + procedure GetASync; { Asynchronous, non-blocking Get } + procedure PostASync; { Asynchronous, non-blocking Post } + procedure HeadASync; { Asynchronous, non-blocking Head } + procedure Abort; + + property CtrlSocket : TWSocket read FCtrlSocket; + property Handle : HWND read FWindowHandle; + property State : THttpState read FState; + property LastResponse : String read FLastResponse; + property ContentLength : LongInt read FContentLength; + property ContentType : String read FContentType; + property RcvdCount : LongInt read FRcvdCount; + property SentCount : LongInt read FSentCount; + property StatusCode : Integer read FStatusCode; + property ReasonPhrase : String read FReasonPhrase; + property DnsResult : String read FDnsResult; + property AuthorizationRequest : TStringList read FDoAuthor; + property DocName : String read FDocName; + property Location : String read FLocation + write FLocation; + property RcvdStream : TStream read FRcvdStream + write FRcvdStream; + property SendStream : TStream read FSendStream + write FSendStream; + property RcvdHeader : TStrings read FRcvdHeader; + property Hostname : String read FHostname; + published + property URL : String read FURL + write FURL; + property LocalAddr : String read FLocalAddr {bb} + write FLocalAddr; {bb} + property Proxy : String read FProxy + write FProxy; + property ProxyPort : String read FProxyPort + write FProxyPort; + property Sender : String read FSender + write FSender; + property Agent : String read FAgent + write FAgent; + property Accept : String read FAccept + write FAccept; + property AcceptLanguage : String read FAcceptLanguage + write FAcceptLanguage; + property Reference : String read FReference + write FReference; + property Username : String read FUsername + write FUsername; + property Password : String read FPassword + write FPassword; + property ProxyUsername : String read FProxyUsername + write FProxyUsername; + property ProxyPassword : String read FProxyPassword + write FProxyPassword; + property NoCache : Boolean read FNoCache + write FNoCache; + property ModifiedSince : TDateTime read FModifiedSince + write FModifiedSince; + property Cookie : String read FCookie + write FCookie; + property ContentTypePost : String read FContentPost + write FContentPost; + property ContentRangeBegin: String read FContentRangeBegin {JMR!! Added this line!!!} + write FContentRangeBegin; {JMR!! Added this line!!!} + property ContentRangeEnd : String read FContentRangeEnd {JMR!! Added this line!!!} + write FContentRangeEnd; {JMR!! Added this line!!!} + property AcceptRanges : String read FAcceptRanges; + property MultiThreaded : Boolean read FMultiThreaded + write SetMultiThreaded; + property OnTrace : TNotifyEvent read FOnTrace + write FOnTrace; + property OnSessionConnected : TNotifyEvent read FOnSessionConnected + write FOnSessionConnected; + property OnHeaderData : TNotifyEvent read FOnHeaderData + write FOnHeaderData; + property OnCommand : TOnCommand read FOnCommand + write FOnCommand; + property OnHeaderBegin : TNotifyEvent read FOnHeaderBegin + write FOnHeaderBegin; + property OnHeaderEnd : TNotifyEvent read FOnHeaderEnd + write FOnHeaderEnd; + property OnRequestHeaderBegin : TNotifyEvent read FOnRequestHeaderBegin + write FOnRequestHeaderBegin; + property OnRequestHeaderEnd : TNotifyEvent read FOnRequestHeaderEnd + write FOnRequestHeaderEnd; + property OnDocBegin : TNotifyEvent read FOnDocBegin + write FOnDocBegin; + property OnDocData : TDocDataEvent read FOnDocData + write FOnDocData; + property OnDocEnd : TNotifyEvent read FOnDocEnd + write FOnDocEnd; + property OnSendBegin : TNotifyEvent read FOnSendBegin + write FOnSendBegin; + property OnSendData : TDocDataEvent read FOnSendData + write FOnSendData; + property OnSendEnd : TNotifyEvent read FOnSendEnd + write FOnSendEnd; + property OnStateChange : TNotifyEvent read FOnStateChange + write FOnStateChange; + property OnRequestDone : THttpRequestDone read FOnRequestDone + write FOnRequestDone; + property OnLocationChange : TNotifyEvent read FOnLocationChange + write FOnLocationChange; + property OnCookie : TCookieRcvdEvent read FOnCookie + write FOnCookie; + property SocksServer : String read GetSocksServer + write SetSocksServer; + property SocksLevel : String read GetSocksLevel + write SetSocksLevel; + property SocksPort : String read GetSocksPort + write SetSocksPort; + property SocksUsercode : String read GetSocksUsercode + write SetSocksUsercode; + property SocksPassword : String read GetSocksPassword + write SetSocksPassword; + property SocksAuthentication : TSocksAuthentication read GetSocksAuthentication + write SetSocksAuthentication; + property OnSocksConnected : TSessionConnected read FOnSocksConnected + write FOnSocksConnected; + property OnSocksAuthState : TSocksAuthStateEvent read FOnSocksAuthState + write FOnSocksAuthState; + property OnSocksError : TSocksErrorEvent read FOnSocksError + write FOnSocksError; + property OnSocketError : TNotifyEvent read FOnSocketError + write FOnSocketError; + property OnBeforeHeaderSend : TBeforeHeaderSendEvent read FOnBeforeHeaderSend + write FOnBeforeHeaderSend; + end; + +procedure Register; +{ Syntax of an URL: protocol://[user[:password]@]server[:port]/path } +procedure ParseURL(const URL : String; + var Proto, User, Pass, Host, Port, Path : String); +function Posn(const s, t : String; count : Integer) : Integer; +procedure ReplaceExt(var FName : String; const newExt : String); +function EncodeLine(Encoding : THttpEncoding; + SrcData : PChar; Size : Integer):String; +function EncodeStr(Encoding : THttpEncoding; const Value : String) : String; +function RFC1123_Date(aDate : TDateTime) : String; +function UrlEncode(S : String) : String; +function UrlDecode(S : String) : String; +function IsDigit(Ch : Char) : Boolean; +function IsXDigit(Ch : char) : Boolean; +function XDigit(Ch : char) : Integer; +function htoin(value : PChar; len : Integer) : Integer; +function htoi2(value : PChar) : Integer; + + +implementation + +const + bin2uue : String = '`!"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'; + bin2b64 : String = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + uue2bin : String = ' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ '; + b642bin : String = '~~~~~~~~~~~^~~~_TUVWXYZ[\]~~~|~~~ !"#$%&''()*+,-./0123456789~~~~~~:;<=>?@ABCDEFGHIJKLMNOPQRS'; + linesize = 45; +type + TCharSet = set of Char; +const + UriProtocolSchemeAllowedChars : TCharSet = ['a'..'z','0'..'9','+','-','.']; + +function GetBaseUrl(const Url : String) : String; forward; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [THttpCli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] in [' ', #9]) do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor EHttpException.Create(const Msg : String; ErrCode : Word); +begin + Inherited Create(Msg); + ErrorCode := ErrCode; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ We cannot use Delphi own function because the date must be specified in } +{ english and Delphi use the current language. } +function RFC1123_Date(aDate : TDateTime) : String; +const + StrWeekDay : String = 'MonTueWedThuFriSatSun'; + StrMonth : String = 'JanFebMarAprMayJunJulAugSepOctNovDec'; +var + Year, Month, Day : Word; + Hour, Min, Sec, MSec : Word; + DayOfWeek : Word; +begin + DecodeDate(aDate, Year, Month, Day); + DecodeTime(aDate, Hour, Min, Sec, MSec); + DayOfWeek := ((Trunc(aDate) - 2) mod 7); + Result := Copy(StrWeekDay, 1 + DayOfWeek * 3, 3) + ', ' + + Format('%2.2d %s %4.4d %2.2d:%2.2d:%2.2d', + [Day, Copy(StrMonth, 1 + 3 * (Month - 1), 3), + Year, Hour, Min, Sec]); +end; + +{$IFDEF NOFORMS} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function HTTPCliWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TObject; + MsgRec : TMessage; +begin + { At window creation asked windows to store a pointer to our object } + Obj := TObject(GetWindowLong(ahWnd, 0)); + + { If the pointer doesn't represent a TCustomFtpCli, just call the default procedure} + if not (Obj is THTTPCli) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass parameter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + { May be a try/except around next line is needed. Not sure ! } + THTTPCli(Obj).WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.HTTPCliAllocateHWnd(Method: TWndMethod) : HWND; +begin +{$IFDEF NOFORMS} + Result := XSocketAllocateHWnd(Self); + SetWindowLong(Result, GWL_WNDPROC, LongInt(@HTTPCliWindowProc)); +{$ELSE} + Result := WSocket.AllocateHWnd(Method); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.HTTPCliDeallocateHWnd(WHandle : HWND); +begin +{$IFDEF NOFORMS} + XSocketDeallocateHWnd(WHandle); +{$ELSE} + WSocket.DeallocateHWnd(WHandle); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor THttpCli.Create(Aowner:TComponent); +begin + inherited create(AOwner); + FWindowHandle := HTTPCliAllocateHWnd(WndProc); + FCtrlSocket := TWSocket.Create(Self); + FProxyPort := DefaultProxyPort; + FContentPost := 'application/x-www-form-urlencoded'; + FAccept := 'image/gif, image/x-xbitmap, ' + + 'image/jpeg, image/pjpeg, */*'; + FAgent := 'Mozilla/3.0 (compatible)'; + FDoAuthor := TStringlist.Create; + FCtrlSocket.OnSessionClosed := SocketSessionClosed; + FCtrlSocket.OnDataAvailable := SocketDataAvailable; + FCtrlSocket.OnSessionConnected := SocketSessionConnected; + FCtrlSocket.OnDataSent := SocketDataSent; + FCtrlSocket.OnDnsLookupDone := SocketDNSLookupDone; + { Added by Eugene Mayevski } + FCtrlSocket.OnSocksError := DoSocksError; + FCtrlSocket.OnSocksConnected := DoSocksConnected; + FCtrlSocket.OnError := SocketErrorTransfer; + { Mayevski additions end } + FRcvdHeader := TStringList.Create; + FReqStream := TMemoryStream.Create; + FState := httpReady; + FLocalAddr := '0.0.0.0'; {bb} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor THttpCli.Destroy; +begin + FDoAuthor.Free; + FCtrlSocket.Free; + FRcvdHeader.Free; + FReqStream.Free; + HTTPCliDeAllocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + case Msg of + WM_HTTP_REQUEST_DONE : WMHttpRequestDone(MsgRec); + WM_HTTP_SET_READY : WMHttpSetReady(MsgRec); + WM_HTTP_LOGIN : WMHttpLogin(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPCli.DoSocksConnected(Sender: TObject; Error: word); +begin + if Assigned(FOnSocksConnected) then FOnSocksConnected(Sender, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPCli.SocketErrorTransfer(Sender : TObject); +begin + if (assigned(FOnSocketError)) then + FOnSocketError(Self); { Substitute Self for subcomponent's Sender. } +end; { SocketErrorTransfer } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPCli.DoSocksAuthState(Sender : TObject; AuthState : TSocksAuthState); +begin + if Assigned(FOnSocksAuthState) then FOnSocksAuthState(Sender, AuthState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THTTPCli.DoSocksError(Sender : TObject; Error : Integer; Msg : String); +begin + if Assigned(FOnSocksError) then FOnSocksError(Sender, Error, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetMultiThreaded(newValue : Boolean); +begin + FMultiThreaded := newValue; + FCtrlSocket.MultiThreaded := newValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetReady; +begin + PostMessage(Handle, WM_HTTP_SET_READY, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.StateChange(NewState : THttpState); +begin + if FState <> NewState then begin + FState := NewState; + TriggerStateChange; + if NewState = httpReady then + TriggerRequestDone; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerStateChange; +begin + if Assigned(FOnStateChange) then + FOnStateChange(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerCookie(const Data : String; var bAccept : Boolean); +begin + if Assigned(FOnCookie) then + FOnCookie(Self, Data, bAccept); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerSessionConnected; +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerDocBegin; +begin + if Assigned(FOnDocBegin) then + FOnDocBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerDocEnd; +begin + if Assigned(FOnDocEnd) then + FOnDocEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerDocData(Data : Pointer; Len : Integer); +begin + if Assigned(FOnDocData) then + FOnDocData(Self, Data, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerSendBegin; +begin + if Assigned(FOnSendBegin) then + FOnSendBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerSendEnd; +begin + if Assigned(FOnSendEnd) then + FOnSendEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerSendData(Data : Pointer; Len : Integer); +begin + if Assigned(FOnSendData) then + FOnSendData(Self, Data, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerHeaderBegin; +begin + FHeaderEndFlag := TRUE; + if Assigned(FOnHeaderBegin) then + FOnHeaderBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerHeaderEnd; +begin + FHeaderEndFlag := FALSE; + if Assigned(FOnHeaderEnd) then + FOnHeaderEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerBeforeHeaderSend( + const Method : String; + Headers : TStrings); +begin + if Assigned(FOnBeforeHeaderSend) then + FOnBeforeHeaderSend(Self, Method, Headers); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerRequestHeaderBegin; +begin + if Assigned(FOnRequestHeaderBegin) then + FOnRequestHeaderBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerRequestHeaderEnd; +begin + if Assigned(FOnRequestHeaderEnd) then + FOnRequestHeaderEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerRequestDone; +begin + PostMessage(Handle, WM_HTTP_REQUEST_DONE, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.WMHttpRequestDone(var msg: TMessage); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, FRequestType, FRequestDoneError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.WMHttpSetReady(var msg: TMessage); +begin + StateChange(httpReady); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure ReplaceExt(var FName : String; const newExt : String); +var + I : Integer; +begin + I := Posn('.', FName, -1); + if I <= 0 then + FName := FName + '.' + newExt + else + FName := Copy(FName, 1, I) + newExt; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.Abort; +var + bFlag : Boolean; +begin + if FState = httpReady then begin + if FCtrlSocket.State <> wsClosed then + FCtrlSocket.Close; { This should never occurs ! } + Exit; + end; + + bFlag := (FState = httpDnsLookup); + StateChange(httpAborting); + + if bFlag then begin + try + FCtrlSocket.CancelDnsLookup; + except + { Ignore any exception } + end; + end; + + FStatusCode := 404; + FReasonPhrase := 'Connection aborted on request'; + FRequestDoneError := httperrAborted; + + if bFlag then + SocketSessionClosed(Self, 0) + else + FCtrlSocket.Close; + StateChange(httpReady); { 13/02/99 } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.Login; +begin + FDnsResult := ''; + StateChange(httpDnsLookup); + FCtrlSocket.LocalAddr := FLocalAddr; {bb} + try + FCtrlSocket.DnsLookup(FHostName); + except + on E: Exception do begin + FStatusCode := 404; + FReasonPhrase := E.Message; + FConnected := FALSE; + StateChange(httpReady); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SocketDNSLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + if FState = httpAborting then + Exit; + FRequestDoneError := Error; + FStatusCode := 404; + FReasonPhrase := 'can''t resolve hostname to IP address'; + SocketSessionClosed(Sender, Error); + end + else begin + FDnsResult := FCtrlSocket.DnsResult; + StateChange(httpDnsLookupDone); { 19/09/98 } + FCtrlSocket.Addr := FDnsResult; + FCtrlSocket.LocalAddr := FLocalAddr; {bb} + FCtrlSocket.Port := FPort; + FCtrlSocket.Proto := 'tcp'; + try + FCtrlSocket.Connect; + except + FRequestDoneError := FCtrlSocket.LastError; + FStatusCode := 404; + FReasonPhrase := 'can''t connect: ' + + WSocketErrorDesc(FCtrlSocket.LastError) + + ' (Error #' + IntToStr(FCtrlSocket.LastError) + ')'; + FCtrlSocket.Close; + SocketSessionClosed(Sender, FCtrlSocket.LastError); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SocketSessionConnected(Sender : TObject; Error : Word); +begin + if Error <> 0 then begin + FRequestDoneError := Error; + FStatusCode := 404; + FReasonPhrase := WSocketErrorDesc(Error) + + ' (Error #' + IntToStr(Error) + ')'; + SocketSessionClosed(Sender, Error); + Exit; + end; + + FConnected := TRUE; + StateChange(httpConnected); + TriggerSessionConnected; + + FNext := GetHeaderLineNext; + StateChange(httpWaitingHeader); + + try + case FRequestType of + httpPOST: + begin + SendRequest('POST', '1.0'); + TriggerSendBegin; + FAllowedToSend := TRUE; + SocketDataSent(FCtrlSocket, 0); + end; + httpHEAD: + begin + SendRequest('HEAD', '1.0'); + end; + httpGET: + begin + SendRequest('GET', '1.0'); + end; + end; + except + Logout; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.Logout; +begin + FCtrlSocket.Close; + FConnected := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SendCommand(const Cmd : String); +const + CRLF : String[2] = #13#10; +var + Buf : String; +begin + Buf := Cmd; + if Assigned(FOnCommand) then + FOnCommand(Self, Buf); + if Length(Buf) > 0 then + FReqStream.Write(Buf[1], Length(Buf)); + FReqStream.Write(CRLF[1], 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SendRequest(const Method, Version: String); +var + Headers : TStrings; + N : Integer; +begin + Headers := TStringList.Create; + try + FReqStream.Clear; + TriggerRequestHeaderBegin; + Headers.Add(method + ' ' + FPath + ' HTTP/' + Version); + if FSender <> '' then + Headers.Add('From: ' + FSender); + if FAccept <> '' then + Headers.Add('Accept: ' + FAccept); + if FReference <> '' then + Headers.Add('Referer: ' + FReference); + if FAcceptLanguage <> '' then + Headers.Add('Accept-Language: ' + FAcceptLanguage); + if (method = 'POST') and (FContentPost <> '') then + Headers.Add('Content-Type: ' + FContentPost); + if FAgent <> '' then + Headers.Add('User-Agent: ' + FAgent); + Headers.Add('Host: ' + FTargetHost); + if FNoCache then + Headers.Add('Pragma: no-cache'); + if method = 'POST' then + Headers.Add('Content-Length: ' + IntToStr(SendStream.Size)); + if FModifiedSince <> 0 then + Headers.Add('If-Modified-Since: ' + + RFC1123_Date(FModifiedSince) + ' GMT'); + if FUsername <> '' then + Headers.Add('Authorization: Basic ' + + EncodeStr(encBase64, FUsername + ':' + FPassword)); + if (FProxy <> '') and (FProxyUsername <> '') then + Headers.Add('Proxy-Authorization: Basic ' + + EncodeStr(encBase64, FProxyUsername + ':' + FProxyPassword)); + if FCookie <> '' then + Headers.Add('Cookie: ' + FCookie); + if (FContentRangeBegin <> '') or (FContentRangeEnd <> '') then begin {JMR!! Added this line!!!} + Headers.Add('Range: bytes=' + FContentRangeBegin + '-' + FContentRangeEnd); {JMR!! Added this line!!!} + FContentRangeBegin := ''; {JMR!! Added this line!!!} + FContentRangeEnd := ''; {JMR!! Added this line!!!} + end; {JMR!! Added this line!!!} + FAcceptRanges := ''; + +{SendCommand('UA-pixels: 1024x768'); } +{SendCommand('UA-color: color8'); } +{SendCommand('UA-OS: Windows 95'); } +{SendCommand('UA-CPU: x86'); } +{SendCommand('User-Agent: Mozilla/3.0 (compatible)');} {; MSIE 3.01; Update a; Windows 95)');} +{SendCommand('Proxy-Connection: Keep-Alive'); } + + TriggerBeforeHeaderSend(Method, Headers); + for N := 0 to Headers.Count - 1 do + SendCommand(Headers[N]); + + TriggerRequestHeaderEnd; + SendCommand(''); + FCtrlSocket.Send(FReqStream.Memory, FReqStream.Size); + FReqStream.Clear; + finally + Headers.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.GetBodyLineNext; +var + Len : Integer; + Data : Pointer; +const + CRLF : String[2] = #13#10; +begin + if FBodyLineCount = 0 then + TriggerDocBegin; + Inc(FBodyLineCount); + + Len := Length(FLastResponse); + if Len > 0 then + Data := @FLastResponse[1] + else + Data := @Len; + FRcvdCount := FRcvdCount + Len; + + if Assigned(FRcvdStream) then + FRcvdStream.WriteBuffer(Data^, Len); + TriggerDocData(Data, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.GetHeaderLineNext; +var + proto : String; + user : String; + pass : String; + port : String; + Host : String; + Path : String; + Field : String; + Data : String; + nSep : Integer; + tmpInt : LongInt; + bAccept : Boolean; + DocExt : String; +begin + if FHeaderLineCount = 0 then + TriggerHeaderBegin; + Inc(FHeaderLineCount); + + { Some server send HTML document without header ! I don't know if it is } + { legal, but it exists (AltaVista Discovery does that). } + if UpperCase(Copy(FLastResponse, 1, 6)) = '' then begin { 15/09/98 } + if FContentType = '' then + FContentType := 'text/html'; + StateChange(httpWaitingBody); + FNext := GetBodyLineNext; + TriggerHeaderEnd; + GetBodyLineNext; + Exit; + end; + + if FLastResponse = '' then begin + if FLocationFlag then begin + TriggerHeaderEnd; + FReceiveLen := 0; + FHeaderLineCount := 0; + FBodyLineCount := 0; + FCtrlSocket.OnSessionClosed := LocationSessionClosed; + FCtrlSocket.Close; + Exit; + end; + { FContentLength = -1 when server doesn't send a value } + if FContentLength = 0 then begin + TriggerHeaderEnd; + SetReady; + Exit; + end; + DocExt := lowercase(ExtractFileExt(FDocName)); + if (DocExt = '.exe') or (DocExt = '') then begin + if FContentType = 'text/html' then + ReplaceExt(FDocName, 'htm'); + end; + + StateChange(httpWaitingBody); + FNext := GetBodyLineNext; + TriggerHeaderEnd; + if FReceiveLen > 0 then begin + SetLength(FLastResponse, FReceiveLen); + Move(FReceiveBuffer, FLastResponse[1], FReceiveLen); + GetBodyLineNext; + FReceiveLen := 0; + end; + if FStatusCode >= 400 then { 01/11/01 } + FCtrlSocket.Close; + Exit; + end; + + FRcvdHeader.Add(FLastResponse); + + nSep := pos(':', FLastResponse); + if (Copy(FLastResponse, 1, 8) = 'HTTP/1.0') or + (Copy(FLastResponse, 1, 8) = 'HTTP/1.1') then begin + FStatusCode := StrToInt(Copy(FLastResponse, 10, 3)); + FReasonPhrase := Copy(FLastResponse, 14, Length(FLastResponse)); + end + else if nSep > 0 then begin + Field := LowerCase(Copy(FLastResponse, 1, nSep - 1)); + { Skip spaces } + Inc(nSep); + while (nSep < Length(FLastResponse)) and + (FLastResponse[nSep] = ' ') do + Inc(nSep); + Data := Copy(FLastResponse, nSep, Length(FLastResponse)); + if Field = 'location' then begin { Change the URL ! } + { URL with relocations: } + { http://www.webcom.com/~wol2wol/ } + { http://www.purescience.com/delphi/ } + { http://www.maintron.com/ } + { http://www.infoseek.com/AddURL/addurl } + { http://www.micronpc.com/ } + { http://www.amazon.com/ } + { http://count.paycounter.com/?fn=0&si=44860&bt=msie&bv=5& } + { co=32&js=1.4&sr=1024x768&re=http://www.thesite.com/you.html } + FLocationFlag := TRUE; + if Proxy <> '' then begin + { We are using a proxy } + if Data[1] = '/' then begin + { Absolute location } + ParseURL(FPath, proto, user, pass, Host, port, Path); + if Proto = '' then + Proto := 'http'; + FLocation := Proto + '://' + Host + Data; + FPath := FLocation; + + if (user <> '') and (pass <> '') then begin + { save user and password given in location @@@} + FUsername := user; + FPassword := pass; + end; + end + else if Copy(Data, 1, 7) <> 'http://' then begin + { Relative location } + FPath := GetBaseUrl(FPath) + Data; + if Proto = '' then + Proto := 'http'; + FLocation := Proto + '://' + FHostName + '/' + FPath; + end + else begin + ParseURL(Data, proto, user, pass, Host, port, Path); + if port <> '' then + FPort := port + else + FPort := '80'; + + if (user <> '') and (pass <> '') then begin + { save user and password given in location @@@} + FUsername := user; + FPassword := pass; + end; + + if (Proto <> '') and (Host <> '') then begin + { We have a full relocation URL } + FTargetHost := Host; + FLocation := Proto + '://' + Host + Path; + FPath := FLocation; + end + else begin + if Proto = '' then + Proto := 'http'; + if FPath = '' then + FLocation := Proto + '://' + FTargetHost + '/' + Host + else if Host = '' then + FLocation := Proto + '://' + FTargetHost + FPath + else + FTargetHost := Host; + end; + end; + end + { We are not using a proxy } + else begin + if Data[1] = '/' then begin + { Absolute location } + FPath := Data; + if Proto = '' then + Proto := 'http'; + FLocation := Proto + '://' + FHostName + FPath; + end + else if Copy(Data, 1, 7) <> 'http://' then begin + { Relative location } + FPath := GetBaseUrl(FPath) + Data; + if Proto = '' then + Proto := 'http'; + FLocation := Proto + '://' + FHostName + '/' + FPath; + end + else begin + ParseURL(Data, proto, user, pass, FHostName, port, FPath); + if port <> '' then + FPort := port + else + FPort := '80'; + + if (user <> '') and (pass <> '') then begin + { save user and password given in location @@@} + FUsername := user; + FPassword := pass; + end; + + if (Proto <> '') and (FHostName <> '') then begin + { We have a full relocation URL } + FTargetHost := FHostName; + if FPath = '' then begin + FPath := '/'; + FLocation := Proto + '://' + FHostName; + end + else + FLocation := Proto + '://' + FHostName + FPath; + end + else begin + if Proto = '' then + Proto := 'http'; + if FPath = '' then begin + FLocation := Proto + '://' + FTargetHost + '/' + FHostName; + FHostName := FTargetHost; + FPath := FLocation; { 26/11/99 } + end + else if FHostName = '' then begin + FLocation := Proto + '://' + FTargetHost + FPath; + FHostName := FTargetHost; + end + else + FTargetHost := FHostName; + end; + end; + end; + end + else if Field = 'content-length' then + FContentLength := StrToInt(Trim(Data)) + else if Field = 'content-range' then begin {JMR!! Added this line!!!} + tmpInt := Pos('-', Data) + 1; {JMR!! Added this line!!!} + FContentRangeBegin := Copy(Data, 7, tmpInt-8); {JMR!! Added this line!!!} + FContentRangeEnd := Copy(Data, tmpInt, Pos('/', Data) - tmpInt); {JMR!! Added this line!!!} + end {JMR!! Added this line!!!} + else if Field = 'accept-ranges' then + FAcceptRanges := Data + else if Field = 'content-type' then + FContentType := LowerCase(Data) + else if Field = 'www-authenticate' then + FDoAuthor.add(Data) + else if Field = 'set-cookie' then begin + bAccept := TRUE; + TriggerCookie(Data, bAccept); + end + { else if Field = 'date' then } + { else if Field = 'mime-version' then } + { else if Field = 'pragma' then } + { else if Field = 'allow' then } + { else if Field = 'server' then } + { else if Field = 'content-encoding' then } + { else if Field = 'expires' then } + { else if Field = 'last-modified' then } + end + else { Ignore all other responses } + ; + + if Assigned(FOnHeaderData) then + FOnHeaderData(Self); + +{ if FStatusCode >= 400 then Moved above 01/11/01 } +{ FCtrlSocket.Close; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.InternalClear; +begin + FRcvdHeader.Clear; + FRequestDoneError := 0; + FDocName := ''; + FStatusCode := 0; + FRcvdCount := 0; + FSentCount := 0; + FHeaderLineCount := 0; + FBodyLineCount := 0; + FContentLength := -1; + FContentType := ''; { 25/09/1999 } + FAllowedToSend := FALSE; + FLocation := FURL; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.DoRequestAsync(Rq : THttpRequest); +var + Proto, User, Pass, Host, Port, Path: String; +begin + if FState <> httpReady then + raise EHttpException.Create('HTTP component is busy', httperrBusy); + + if (Rq = httpPOST) and (not Assigned(FSendStream)) then + raise EHttpException.Create('HTTP component has nothing to post', + httperrNoData); + + { Now clear all internal state variables } + FCtrlSocket.OnSessionClosed := SocketSessionClosed; + StateChange(httpNotConnected); + FRequestType := Rq; + InternalClear; + + { parse url and proxy to FHostName, FPath and FPort } + if FProxy <> '' then begin + ParseURL(FURL, Proto, User, Pass, Host, Port, Path); + FTargetHost := Host; + FPath := FURL; + FDocName := Path; + if User <> '' then + FUserName := User; + if Pass <> '' then + FPassword := Pass; + { We need to remove usercode/Password from the URL given to the proxy } + { but preserve the port } + if Port <> '' then + Port := ':' + Port; + if Proto = '' then + FPath := 'http://'+ Host + Port + Path + else + FPath := Proto + '://' + Host + Port + Path; + ParseURL(FProxy, Proto, User, Pass, Host, Port, Path); + if Port = '' then + Port := ProxyPort; + end + else begin + ParseURL(FURL, Proto, User, Pass, Host, Port, FPath); + FTargetHost := Host; + FDocName := FPath; + if User <> '' then + FUserName := User; + if Pass <> '' then + FPassword := Pass; + if Port = '' then + Port := '80'; + end; + if Proto = '' then + Proto := 'http'; + if FPath = '' then + FPath := '/'; + + AdjustDocName; + + FHostName := host; + FPort := Port; + + { Ask to connect. When connected, we go at SocketSeesionConnected. } + Login; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.AdjustDocName; +var + I : Integer; +begin + I := Pos('?', FDocName); + if I > 0 then + FDocName := Copy(FDocName, 1, I - 1); + + if (FDocName = '') or (FDocName[Length(FDocName)] = '/') then + FDocName := 'document.htm' + else begin + if FDocName[Length(FDocName)] = '/' then + SetLength(FDocName, Length(FDocName) - 1); + FDocName := Copy(FDocName, Posn('/', FDocName, -1) + 1, 255); + I := Pos('?', FDocName); + if I > 0 then + FDocName := Copy(FDocName, 1, I - 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.DoRequestSync(Rq : THttpRequest); +begin + DoRequestAsync(Rq); + +{$IFDEF VER80} + { Delphi 1 has no support for multi-threading } + while FState <> httpReady do + Application.ProcessMessages; +{$ELSE} + if FMultiThreaded then begin + while FState <> httpReady do begin + FCtrlSocket.ProcessMessages; + Sleep(0); + end; + end + else begin + while FState <> httpReady do begin +{$IFNDEF NOFORMS} + Application.ProcessMessages; +{$ELSE} + FCtrlSocket.ProcessMessages; +{$ENDIF} + Sleep(0); + end; + end; +{$ENDIF} + + if FStatusCode >= 400 then + raise EHttpException.Create(FReasonPhrase, FStatusCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.LocationSessionClosed(Sender: TObject; Error: Word); +var + Proto, User, Pass, Host, Port, Path: String; + RealLocation : String; + I : Integer; +begin + { Remove any bookmark from the URL } + I := Pos('#', FLocation); + if I > 0 then + RealLocation := Copy(FLocation, 1, I - 1) + else + RealLocation := FLocation; + + { Parse the URL } + ParseURL(RealLocation, Proto, User, Pass, Host, Port, Path); + FDocName := Path; + AdjustDocName; + FConnected := FALSE; + FLocationFlag := FALSE; + { When relocation occurs doing a POST, new relocated page has to be GET } + if FRequestType = httpPOST then + FRequestType := httpGET; + { Restore normal session closed event } + FCtrlSocket.OnSessionClosed := SocketSessionClosed; + { Trigger the location changed event } + if Assigned(FOnLocationChange) then + FOnLocationChange(Self); + { Clear header from previous operation } + FRcvdHeader.Clear; + { Clear status variables from previous operation } + FHeaderLineCount := 0; + FBodyLineCount := 0; + FContentLength := -1; + FContentType := ''; + FStatusCode := 0; + { Adjust for proxy use (Fixed: Nov 10, 2001) } + if FProxy <> '' then + FPort := ProxyPort; + { Restart at login procedure } + PostMessage(FWindowHandle, WM_HTTP_LOGIN, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.WMHttpLogin(var msg: TMessage); +begin + Login; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SocketSessionClosed(Sender: TObject; Error: Word); +begin + if Error <> 0 then { WM 15 sep 2002 } + FRequestDoneError := Error; { WM 15 sep 2002 } + FConnected := FALSE; + if FHeaderEndFlag then begin + { TriggerHeaderEnd has not been called yet } + TriggerHeaderEnd; + if FLocationFlag then { 28/10/01 } + LocationSessionClosed(Self, 0); + Exit; + end; + if FBodyLineCount > 0 then + TriggerDocEnd; + SetReady; {StateChange(httpReady);} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I : Integer; +begin + I := sizeof(FReceiveBuffer) - FReceiveLen - 1; + if I <= 0 then + raise EHttpException.Create('HTTP line too long', httperrOverflow); + + Len := FCtrlSocket.Receive(@FReceiveBuffer[FReceiveLen], I); + + if FRequestType = httpAbort then + Exit; + + if Len <= 0 then + Exit; + + FReceiveBuffer[FReceiveLen + Len] := #0; + FReceiveLen := FReceiveLen + Len; + + if FState = httpWaitingBody then begin + if FReceiveLen > 0 then begin + SetLength(FLastResponse, FReceiveLen); + Move(FReceiveBuffer, FLastResponse[1], FReceiveLen); + if Assigned(FNext) then + FNext + else + SetReady; {StateChange(httpReady);} + end; + FReceiveLen := 0; + Exit; + end; + + while FReceiveLen > 0 do begin + I := Pos(#10, FReceiveBuffer); + if I <= 0 then + break; + if I > FReceiveLen then + break; + + if (I > 1) and (FReceiveBuffer[I-2] = #13) then + FLastResponse := Copy(FReceiveBuffer, 1, I - 2) + else + FLastResponse := Copy(FReceiveBuffer, 1, I - 1); + +{$IFDEF DUMP} + FDumpBuf := '>|'; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.WriteBuffer(FLastResponse[1], Length(FLastResponse)); + FDumpBuf := '|' + #13#10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} +{$IFDEF VER80} + { Add a nul byte at the end of string for Delphi 1 } + FLastResponse[Length(FLastResponse) + 1] := #0; +{$ENDIF} + FReceiveLen := FReceiveLen - I; + if FReceiveLen > 0 then + Move(FReceiveBuffer[I], FReceiveBuffer[0], FReceiveLen + 1); + + if FState in [httpWaitingHeader, httpWaitingBody] then begin + if Assigned(FNext) then + FNext + else + SetReady; {StateChange(httpReady);} + end + else begin + if Assigned(FOnDataAvailable) then + FOnDataAvailable(Self, Error); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SocketDataSent(Sender : TObject; Error : Word); +var + Len : Integer; +begin + if not FAllowedToSend then + Exit; + + Len := FSendStream.Read(FSendBuffer, sizeof(FSendBuffer)); + if Len <= 0 then begin + FAllowedToSend := FALSE; + TriggerSendEnd; + Exit; + end; + + if Len > 0 then begin + FSentCount := FSentCount + Len; + TriggerSendData(@FSendBuffer, Len); + FCtrlSocket.Send(@FSendBuffer, Len); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the Get process and wait until terminated (blocking) } +procedure THttpCli.Get; +begin + DoRequestSync(httpGet); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the Head process and wait until terminated (blocking) } +procedure THttpCli.Head; +begin + DoRequestSync(httpHEAD); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the Post process and wait until terminated (blocking) } +procedure THttpCli.Post; +begin + DoRequestSync(httpPOST); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the get process and returns immediately (non blocking) } +procedure THttpCli.GetAsync; +begin + DoRequestASync(httpGet); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the head process and returns immediately (non blocking) } +procedure THttpCli.HeadAsync; +begin + DoRequestASync(httpHEAD); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This will start the post process and returns immediately (non blocking) } +procedure THttpCli.PostAsync; +begin + DoRequestASync(httpPOST); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetBaseUrl(const Url : String) : String; +var + I : Integer; +begin + I := 1; + while (I <= Length(Url)) and (Url[I] <> '?') do + Inc(I); + Dec(I); + while (I > 0) and (not (Url[I] in ['/', ':'])) do + Dec(I); + Result := Copy(Url, 1, I); +end; + + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Added by Eugene Mayevski } +procedure THttpCli.SetSocksServer(value : String); +begin + FCtrlSocket.SocksServer := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetSocksLevel(value : String); +begin + FCtrlSocket.SocksLevel := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetSocksPort(value : String); +begin + FCtrlSocket.SocksPort := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetSocksUsercode(value : String); +begin + FCtrlSocket.SocksUsercode := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetSocksPassword(value : String); +begin + FCtrlSocket.SocksPassword := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SetSocksAuthentication(value : TSocksAuthentication); +begin + FCtrlSocket.SocksAuthentication := value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksServer : String; +begin + result := FCtrlSocket.SocksServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksLevel : String; +begin + result := FCtrlSocket.SocksLevel; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksPort : String; +begin + result := FCtrlSocket.SocksPort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksUsercode : String; +begin + result := FCtrlSocket.SocksUsercode; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksPassword : String; +begin + result := FCtrlSocket.SocksPassword; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpCli.GetSocksAuthentication : TSocksAuthentication; +begin + result := FCtrlSocket.SocksAuthentication; +end; +{ Mayevski additions end } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Syntax of an URL: protocol://[user[:password]@]server[:port]/path } +procedure ParseURL( + const url : String; + var Proto, User, Pass, Host, Port, Path : String); +var + p, q, i : Integer; + s : String; + CurPath : String; +begin + CurPath := Path; + proto := ''; + User := ''; + Pass := ''; + Host := ''; + Port := ''; + Path := ''; + + if Length(url) < 1 then + Exit; + + { Handle path beginning with "./" or "../". } + { This code handle only simple cases ! } + { Handle path relative to current document directory } + if (Copy(url, 1, 2) = './') then begin + p := Posn('/', CurPath, -1); + if p > Length(CurPath) then + p := 0; + if p = 0 then + CurPath := '/' + else + CurPath := Copy(CurPath, 1, p); + Path := CurPath + Copy(url, 3, Length(url)); + Exit; + end + { Handle path relative to current document parent directory } + else if (Copy(url, 1, 3) = '../') then begin + p := Posn('/', CurPath, -1); + if p > Length(CurPath) then + p := 0; + if p = 0 then + CurPath := '/' + else + CurPath := Copy(CurPath, 1, p); + + s := Copy(url, 4, Length(url)); + { We could have several levels } + while TRUE do begin + CurPath := Copy(CurPath, 1, p-1); + p := Posn('/', CurPath, -1); + if p > Length(CurPath) then + p := 0; + if p = 0 then + CurPath := '/' + else + CurPath := Copy(CurPath, 1, p); + if (Copy(s, 1, 3) <> '../') then + break; + s := Copy(s, 4, Length(s)); + end; + + Path := CurPath + Copy(s, 1, Length(s)); + Exit; + end; + + p := pos('://', url); + q := p; + if p <> 0 then begin + S := Copy(url, 1, p - 1); + for i := 1 to Length(S) do begin + if not (S[i] in UriProtocolSchemeAllowedChars) then begin + q := i; + Break; + end; + end; + if q < p then begin + p := 0; + proto := 'http'; + end; + end; + if p = 0 then begin + if (url[1] = '/') then begin + { Relative path without protocol specified } + proto := 'http'; + p := 1; + if (Length(url) > 1) and (url[2] <> '/') then begin + { Relative path } + Path := Copy(url, 1, Length(url)); + Exit; + end; + end + else if lowercase(Copy(url, 1, 5)) = 'http:' then begin + proto := 'http'; + p := 6; + if (Length(url) > 6) and (url[7] <> '/') then begin + { Relative path } + Path := Copy(url, 6, Length(url)); + Exit; + end; + end + else if lowercase(Copy(url, 1, 7)) = 'mailto:' then begin + proto := 'mailto'; + p := pos(':', url); + end; + end + else begin + proto := Copy(url, 1, p - 1); + inc(p, 2); + end; + s := Copy(url, p + 1, Length(url)); + + p := pos('/', s); + q := pos('?', s); + if (q > 0) and ((q < p) or (p = 0)) then + p := q; + if p = 0 then + p := Length(s) + 1; + Path := Copy(s, p, Length(s)); + s := Copy(s, 1, p-1); + + p := Posn(':', s, -1); + if p > Length(s) then + p := 0; + q := Posn('@', s, -1); + if q > Length(s) then + q := 0; + if (p = 0) and (q = 0) then begin { no user, password or port } + Host := s; + Exit; + end + else if q < p then begin { a port given } + Port := Copy(s, p + 1, Length(s)); + Host := Copy(s, q + 1, p - q - 1); + if q = 0 then + Exit; { no user, password } + s := Copy(s, 1, q - 1); + end + else begin + Host := Copy(s, q + 1, Length(s)); + s := Copy(s, 1, q - 1); + end; + p := pos(':', s); + if p = 0 then + User := s + else begin + User := Copy(s, 1, p - 1); + Pass := Copy(s, p + 1, Length(s)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function EncodeStr(Encoding : THttpEncoding; const Value : String) : String; +begin + Result := EncodeLine(Encoding, @Value[1], Length(Value)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function EncodeLine( + Encoding : THttpEncoding; + SrcData : PChar; + Size : Integer) : String; +var + Offset : Integer; + Pos1 : Integer; + Pos2 : Integer; + I : Integer; +begin + SetLength(Result, Size * 4 div 3 + 4); + FillChar(Result[1], Size * 4 div 3 + 2, #0); + + if Encoding = encUUEncode then begin + Result[1] := Char(((Size - 1) and $3f) + $21); + Size := ((Size + 2) div 3) * 3; + end; + Offset := 2; + Pos1 := 0; + Pos2 := 0; + case Encoding of + encUUEncode: Pos2 := 2; + encBase64, encMime: Pos2 := 1; + end; + Result[Pos2] := #0; + + while Pos1 < Size do begin + if Offset > 0 then begin + Result[Pos2] := Char(ord(Result[Pos2]) or + ((ord(SrcData[Pos1]) and + ($3f shl Offset)) shr Offset)); + Offset := Offset - 6; + Inc(Pos2); + Result[Pos2] := #0; + end + else if Offset < 0 then begin + Offset := Abs(Offset); + Result[Pos2] := Char(ord(Result[Pos2]) or + ((ord(SrcData[Pos1]) and + ($3f shr Offset)) shl Offset)); + Offset := 8 - Offset; + Inc(Pos1); + end + else begin + Result[Pos2] := Char(ord(Result[Pos2]) or + ((ord(SrcData[Pos1]) and $3f))); + Inc(Pos2); + Inc(Pos1); + Result[Pos2] := #0; + Offset := 2; + end; + end; + + case Encoding of + encUUEncode: + begin + if Offset = 2 then + Dec(Pos2); + for i := 2 to Pos2 do + Result[i] := bin2uue[ord(Result[i])+1]; + end; + encBase64, encMime: + begin + if Offset = 2 then + Dec(Pos2); + for i := 1 to Pos2 do + Result[i] := bin2b64[ord(Result[i])+1]; + while (Pos2 and 3) <> 0 do begin + Inc(Pos2); + Result[Pos2] := '='; + end; + end; + end; + SetLength(Result, Pos2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Find the count'th occurence of the s string in the t string. } +{ If count < 0 then look from the back } +function Posn(const s , t : String; Count : Integer) : Integer; +var + i, h, Last : Integer; + u : String; +begin + u := t; + if Count > 0 then begin + Result := Length(t); + for i := 1 to Count do begin + h := Pos(s, u); + if h > 0 then + u := Copy(u, h + 1, Length(u)) + else begin + u := ''; + Inc(Result); + end; + end; + Result := Result - Length(u); + end + else if Count < 0 then begin + Last := 0; + for i := Length(t) downto 1 do begin + u := Copy(t, i, Length(t)); + h := Pos(s, u); + if (h <> 0) and ((h + i) <> Last) then begin + Last := h + i - 1; + Inc(count); + if Count = 0 then + break; + end; + end; + if Count = 0 then + Result := Last + else + Result := 0; + end + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function IsDigit(Ch : Char) : Boolean; +begin + Result := (ch in ['0'..'9']); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function IsXDigit(Ch : char) : Boolean; +begin + Result := (ch in ['0'..'9']) or (ch in ['a'..'f']) or (ch in ['A'..'F']); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function XDigit(Ch : char) : Integer; +begin + if ch in ['0'..'9'] then + Result := ord(Ch) - ord('0') + else + Result := (ord(Ch) and 15) + 9; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function htoin(value : PChar; len : Integer) : Integer; +var + i : Integer; +begin + Result := 0; + i := 0; + while (i < len) and (Value[i] = ' ') do + i := i + 1; + while (i < len) and (isxDigit(Value[i])) do begin + Result := Result * 16 + xdigit(Value[i]); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function htoi2(value : PChar) : Integer; +begin + Result := htoin(value, 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function UrlEncode(S : String) : String; +var + I : Integer; +begin + Result := ''; + for I := 1 to Length(S) do begin + if S[I] in ['0'..'9', 'A'..'Z', 'a'..'z'] then + Result := Result + S[I] + else + Result := Result + '%' + IntToHex(Ord(S[I]), 2); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function UrlDecode(S : String) : String; +var + I : Integer; + Ch : Char; +begin + Result := ''; + I := 1; + while (I <= Length(S)) and (S[I] <> '&') do begin + Ch := S[I]; + if Ch = '%' then begin + Ch := chr(htoi2(@S[I + 1])); + Inc(I, 2); + end + else if Ch = '+' then + Ch := ' '; + Result := Result + Ch; + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/HttpSrv.dcr b/lib/ics/Delphi/Vc32/HttpSrv.dcr new file mode 100644 index 00000000..3064c368 Binary files /dev/null and b/lib/ics/Delphi/Vc32/HttpSrv.dcr differ diff --git a/lib/ics/Delphi/Vc32/HttpSrv.dcu b/lib/ics/Delphi/Vc32/HttpSrv.dcu new file mode 100644 index 00000000..ac5fe738 Binary files /dev/null and b/lib/ics/Delphi/Vc32/HttpSrv.dcu differ diff --git a/lib/ics/Delphi/Vc32/HttpSrv.pas b/lib/ics/Delphi/Vc32/HttpSrv.pas new file mode 100644 index 00000000..472a5b96 --- /dev/null +++ b/lib/ics/Delphi/Vc32/HttpSrv.pas @@ -0,0 +1,1347 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: THttpServer implement the HTTP server protocol, that is a + web server kernel. +Creation: Oct 10, 1999 +Version: 1.06 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Nov 12, 1999 Beta 3 Added Linger properties +Apr 23, 2000 Beta 4 Added Delphi 1 compatibility + Made everything public in THttpConnection because BCB has problems + when deriving a component from Delphi and protected functions. +Oct 29, 2000 Beta 5 Added Client[] property and IsClient() method. +Nov 11, 2000 Beta 6 Added code from Sven to set + Last-Modified header line. Need some more changes ! +Nov 12, 2000 Beta 7 Finished Last-Modified implementation. + Corrected TriggerServerStopped. +Jun 18, 2001 V1.01 Check if still connected before sending any data. +Jul 31, 2001 V1.02 Handle URL encoded document file (for example when there is + a space in the file name). Bug reported by Stian Grnland + . + Better handling of non existant documents or documents with invalid + file name. +Jan 13, 2002 V1.03 Changed SetPort() to SetPortValue() to avoid a conflict with + BCB6 which has a macro to replace SetPort with SetPortA ! +Apr 15, 2002 V1.04 In SendDocument, avoid calling Send(nil, 0) when a document + has to be sent. Bug and fix by Adam Laforge . +Jul 06, 2002 V1.05 Thomas Smyth fixed + ExtractURLEncodedValue which had problem with names beginning with + same sequence of chars. +Oct 12, 2002 V1.06 Added THttpConnection.PostedDataReceived to be called from + OnPostedData event handler when application has received all data + from client. + Added read/only property SrcVersion with component source version + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpSrv; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, WSocketS; + +const + THttpServerVersion = 106; + CopyRight : String = ' THttpServer (c) 1999-2002 F. Piette V1.06 '; + WM_HTTP_DONE = WM_USER + 40; + +type + THttpConnection = class; + THttpConnectionClass = class of THttpConnection; + THttpGetFlag = (hgSendDoc, hgSendStream, hgWillSendMySelf, hg404, hgAcceptData); + THttpSendType = (httpSendHead, httpSendDoc); + THttpGetEvent = procedure (Sender : TObject; + Client : TObject; + var Flags : THttpGetFlag) of object; + THttpGetConnEvent = procedure (Sender : TObject; + var Flags : THttpGetFlag) of object; + THttpConnectEvent = procedure (Sender : TObject; + Client : TObject; + Error : Word) of object; + THttpPostedDataEvent = procedure (Sender : TObject; + Client : TObject; + Error : Word) of object; + THttpConnectionState = (hcRequest, hcHeader, hcPostedData); + + { THttpConnection is used to handle client connections } + THttpConnection = class(TWSocketClient) + public + FRcvdLine : String; + FMethod : String; + FVersion : String; + FPath : String; + FParams : String; + FRequestHeader : TStringList; + FState : THttpConnectionState; + FDocDir : String; + FDefaultDoc : String; + FDocument : String; + FDocStream : TStream; + FDocBuf : PChar; + FLastModified : TDateTime; + FAnswerContentType : String; + FRequestContentLength : Integer; + FRequestContentType : String; + FRequestAccept : String; + FRequestReferer : String; + FRequestAcceptLanguage : String; + FRequestAcceptEncoding : String; + FRequestUserAgent : String; + FRequestHost : String; + FRequestConnection : String; + FAcceptPostedData : Boolean; + FOnGetDocument : THttpGetConnEvent; + FOnHeadDocument : THttpGetConnEvent; + FOnPostDocument : THttpGetConnEvent; + FOnPostedData : TDataAvailable; + procedure ConnectionDataAvailable(Sender: TObject; Error : Word); + procedure ConnectionDataSent(Sender : TObject; Error : WORD); + procedure ParseRequest; + procedure ProcessRequest; + procedure ProcessGet; + procedure ProcessHead; + procedure ProcessPost; + procedure SendDocument(SendType : THttpSendType); + procedure SendStream; + procedure Answer404; + procedure WndProc(var MsgRec: TMessage); override; + procedure WMHttpDone(var msg: TMessage); message WM_HTTP_DONE; + procedure TriggerGetDocument(var Flags : THttpGetFlag); virtual; + procedure TriggerHeadDocument(var Flags : THttpGetFlag); virtual; + procedure TriggerPostDocument(var Flags : THttpGetFlag); virtual; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure PostedDataReceived; virtual; + { Method contains GET/POST/HEAD as requested by client } + property Method : String read FMethod; + { Version contains HTTP version from client request } + property Version : String read FVersion; + { The whole header as received from client } + property RequestHeader : TStringList + read FRequestHeader; + { Stream used to send reply to client } + property DocStream : TStream + read FDocStream + write FDocStream; + { All RequestXXX are header fields from request header } + property RequestContentLength : Integer + read FRequestContentLength; + property RequestContentType : String read FRequestContentType; + property RequestAccept : String read FRequestAccept; + property RequestReferer : String read FRequestReferer; + property RequestAcceptLanguage : String read FRequestAcceptLanguage; + property RequestAcceptEncoding : String read FRequestAcceptEncoding; + property RequestUserAgent : String read FRequestUserAgent; + property RequestHost : String read FRequestHost; + property RequestConnection : String read FRequestConnection; + published + { Where all documents are stored. Default to c:\wwwroot } + property DocDir : String read FDocDir + write FDocDir; + { Default document name. Default to index.html } + property DefaultDoc : String read FDefaultDoc + write FDefaultDoc; + { Complete document path and file name on local file system } + property Document : String read FDocument + write FDocument; + { Document path as requested by client } + property Path : String read FPath + write FPath; + { Parameters in request (Question mark is separator) } + property Params : String read FParams + write FParams; + { Triggered when client sent GET request } + property OnGetDocument : THttpGetConnEvent read FOnGetDocument + write FOnGetDocument; + { Triggered when client sent HEAD request } + property OnHeadDocument : THttpGetConnEvent read FOnHeadDocument + write FOnHeadDocument; + { Triggered when client sent POST request } + property OnPostDocument : THttpGetConnEvent read FOnPostDocument + write FOnPostDocument; + { Triggered when client sent POST request and data is available } + property OnPostedData : TDataAvailable read FOnPostedData + write FOnPostedData; + end; + + { This is the HTTP server component handling all HTTP connection } + { service. Most of the work is delegated to a TWSocketServer } + THttpServer = class(TComponent) + protected + { FWSocketServer will handle all client management work } + FWSocketServer : TWSocketServer; + FPort : String; + FAddr : String; + FClientClass : THttpConnectionClass; + FDocDir : String; + FDefaultDoc : String; + FLingerOnOff : TSocketLingerOnOff; + FLingerTimeout : Integer; { In seconds, 0 = disabled } + FOnServerStarted : TNotifyEvent; + FOnServerStopped : TNotifyEvent; + FOnClientConnect : THttpConnectEvent; + FOnClientDisconnect : THttpConnectEvent; + FOnGetDocument : THttpGetEvent; + FOnHeadDocument : THttpGetEvent; + FOnPostDocument : THttpGetEvent; + FOnPostedData : THttpPostedDataEvent; + procedure Notification(AComponent: TComponent; operation: TOperation); override; + procedure WSocketServerClientConnect(Sender : TObject; + Client : TWSocketClient; + Error : Word); + procedure WSocketServerClientCreate(Sender : TObject; + Client : TWSocketClient); + procedure WSocketServerClientDisconnect(Sender : TObject; + Client : TWSocketClient; + Error : Word); + procedure WSocketServerSessionClosed(Sender : TObject; + Error : Word); + procedure WSocketServerChangeState(Sender : TObject; + OldState, NewState : TSocketState); + procedure TriggerServerStarted; virtual; + procedure TriggerServerStopped; virtual; + procedure TriggerClientConnect(Client : TObject; Error : Word); virtual; + procedure TriggerClientDisconnect(Client : TObject; Error : Word); virtual; + procedure TriggerGetDocument(Sender : TObject; + var Flags : THttpGetFlag); virtual; + procedure TriggerHeadDocument(Sender : TObject; + var Flags : THttpGetFlag); virtual; + procedure TriggerPostDocument(Sender : TObject; + var Flags : THttpGetFlag); virtual; + procedure TriggerPostedData(Sender : TObject; + Error : WORD); virtual; + procedure SetPortValue(newValue : String); + procedure SetAddr(newValue : String); + function GetClientCount : Integer; + function GetClient(nIndex : Integer) : THttpConnection; + function GetSrcVersion: String; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Start; virtual; + procedure Stop; virtual; + { Check if a given object is one of our clients } + function IsClient(SomeThing : TObject) : Boolean; + { Runtime readonly property which gives number of connected clients } + property ClientCount : Integer read GetClientCount; + { Client[] give direct access to anyone of our clients } + property Client[nIndex : Integer] : THttpConnection + read GetClient; + { Runtime property which tell the component class which has to be } + { instanciated to handle client connection } + property ClientClass : THttpConnectionClass + read FClientClass + write FClientClass; + published + { Component source version } + property SrcVersion : String read GetSrcVersion; + { We will listen to that port. Default to 80 for http service } + property Port : String read FPort + write SetPortValue; + { We will use that interface to listen. 0.0.0.0 means all } + { available interfaces } + property Addr : String read FAddr + write SetAddr; + { Where all documents are stored. Default to c:\wwwroot } + property DocDir : String read FDocDir + write FDocDir; + { Default document name. Default to index.html } + property DefaultDoc : String read FDefaultDoc + write FDefaultDoc; + property LingerOnOff : TSocketLingerOnOff + read FLingerOnOff + write FLingerOnOff; + property LingerTimeout : Integer read FLingerTimeout + write FLingerTimeout; + { OnServerStrated is triggered when server has started listening } + property OnServerStarted : TNotifyEvent + read FOnServerStarted + write FOnServerStarted; + { OnServerStopped is triggered when server has stopped listening } + property OnServerStopped : TNotifyEvent + read FOnServerStopped + write FOnServerStopped; + { OnClientConnect is triggered when a client has connected } + property OnClientConnect : THttpConnectEvent + read FOnClientConnect + write FOnClientConnect; + { OnClientDisconnect is triggered when a client is about to } + { disconnect. } + property OnClientDisconnect : THttpConnectEvent + read FOnClientDisconnect + write FOnClientDisconnect; + { OnGetDocument is triggered when a client sent GET request } + { You can either do nothing and let server handle all work, or } + { you can build a document on the fly or refuse access. } + property OnGetDocument : THttpGetEvent + read FOnGetDocument + write FOnGetDocument; + { OnGetDocument is triggered when a client sent HEAD request } + { You can either do nothing and let server handle all work, or } + { you can build a document header on the fly or refuse access. } + property OnHeadDocument : THttpGetEvent + read FOnHeadDocument + write FOnHeadDocument; + { OnGetDocument is triggered when a client sent POST request } + { You have to tell if you accept data or not. If you accept, } + { you'll get OnPostedData event with incomming data. } + property OnPostDocument : THttpGetEvent + read FOnPostDocument + write FOnPostDocument; + { On PostedData is triggered when client post data and you } + { accepted it from OnPostDocument event. } + { When you've got all data, you have to build a reply to be } + { sent to client. } + property OnPostedData : THttpPostedDataEvent + read FOnPostedData + write FOnPostedData; + end; + +{ Retrieve a single value by name out of an URL encoded data stream. } +function ExtractURLEncodedValue( + Msg : PChar; { URL Encoded stream } + Name : String; { Variable name to look for } + var Value : String): Boolean; { Where to put variable value } +{ Decode an URLEncoded string } +function UrlDecode(const Url : String) : String; +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [THttpServer]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor THttpServer.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWSocketServer := TWSocketServer.Create(Self); + FClientClass := THttpConnection; + FAddr := '0.0.0.0'; + FPort := '80'; + FDefaultDoc := 'index.html'; + FDocDir := 'c:\wwwroot'; + FLingerOnOff := wsLingerNoSet; + FLingerTimeout := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor THttpServer.Destroy; +begin + if Assigned(FWSocketServer) then begin + FWSocketServer.Destroy; + FWSocketServer := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Called by destructor when child component is created or destroyed. } +procedure THttpServer.Notification( + AComponent : TComponent; + Operation : TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then begin + if AComponent = FWSocketServer then + FWSocketServer := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Start the server. That is make FWSocketServer listening to the port. } +procedure THttpServer.Start; +begin + { Create a new FWSocketServer if needed } + if not Assigned(FWSocketServer) then + FWSocketServer := TWSocketServer.Create(Self); + { If already listening, then do nothing } + if FWSocketServer.State = wsListening then + Exit; + { Pass al parameters to FWSocketServer and make it listen } + FWSocketServer.ClientClass := FClientClass; + FWSocketServer.OnClientCreate := WSocketServerClientCreate; + FWSocketServer.OnClientConnect := WSocketServerClientConnect; + FWSocketServer.OnClientDisconnect := WSocketServerClientDisconnect; + FWSocketServer.OnSessionClosed := WSocketServerSessionClosed; + FWSocketServer.OnChangeState := WSocketServerChangeState; + FWSocketServer.Banner := ''; + FWSocketServer.Proto := 'tcp'; + FWSocketServer.Port := FPort; + FWSocketServer.Addr := FAddr; + FWSocketServer.Listen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.Stop; +var + I : Integer; +begin + if not Assigned(FWSocketServer) then + Exit; + FWSocketServer.Close; + { Disconnect all clients } + for I := FWSocketServer.ClientCount - 1 downto 0 do begin + try + FWSocketServer.Client[I].Abort; + except + { Ignore any exception here } + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.SetPortValue(newValue : String); +begin + if newValue = FPort then + Exit; + FPort := newValue; + { If server is already listening, then stop it and restart it with } + { new port. Do not disconnect already connected clients. } + if Assigned(FWSocketServer) and + (FWSocketServer.State = wsListening) then begin + FWSocketServer.Close; + Start; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.SetAddr(newValue : String); +begin + if newValue = FAddr then + Exit; + FAddr := newValue; + { If server is already listening, then stop it and restart it with } + { new Addr. Do not disconnect already connected clients. } + if Assigned(FWSocketServer) and + (FWSocketServer.State = wsListening) then begin + FWSocketServer.Close; + Start; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Get function for ClientCount property. Just return value from } +{ FWSocketServer. } +function THttpServer.GetClientCount; +begin + if not Assigned(FWSocketServer) then + Result := 0 + else + Result := FWSocketServer.ClientCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Get function for Client[] property. Just return value from } +{ FWSocketServer. } +function THttpServer.GetClient(nIndex : Integer) : THttpConnection; +begin + if not Assigned(FWSocketServer) then + Result := nil + else + Result := THttpConnection(FWSocketServer.Client[nIndex]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check is an object is one of our clients. Just return value from } +{ FWSocketServer. } +function THttpServer.IsClient(SomeThing : TObject) : Boolean; +begin + if not Assigned(FWSocketServer) then + Result := FALSE + else + Result := FWSocketServer.IsClient(SomeThing); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when state of server socket has changed. } +{ We use it to trigger our OnServerStarted event. } +procedure THttpServer.WSocketServerChangeState( + Sender : TObject; + OldState, NewState : TSocketState); +begin + if newState = wsListening then + TriggerServerStarted; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.WSocketServerSessionClosed( + Sender : TObject; + Error : Word); +begin + TriggerServerStopped; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ A new client component has been created } +procedure THttpServer.WSocketServerClientCreate( + Sender : TObject; + Client : TWSocketClient); +begin + Client.LingerOnOff := FLingerOnOff; + Client.LingerTimeout := FLingerTimeout; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ A new client just connected. Setup things to handle his requests. } +{ HTTP header is line oriented so we turn line mode on. We use LF as end of } +{ line character altough HTTP uses CR/LF pair as end of line, because many } +{ Unix client do not respect standards and use single LF... } +{ HTTP is not interactive, so we turn line editing to false (faster). } +procedure THttpServer.WSocketServerClientConnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + THttpConnection(Client).LineMode := TRUE; + THttpConnection(Client).LineEdit := FALSE; + THttpConnection(Client).LineEnd := #10; + THttpConnection(Client).DocDir := Self.DocDir; + THttpConnection(Client).DefaultDoc := Self.DefaultDoc; + THttpConnection(Client).OnGetDocument := TriggerGetDocument; + THttpConnection(Client).OnHeadDocument := TriggerHeadDocument; + THttpConnection(Client).OnPostDocument := TriggerPostDocument; + THttpConnection(Client).OnPostedData := TriggerPostedData; + TriggerClientConnect(Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ A client is about to disconnect. } +procedure THttpServer.WSocketServerClientDisconnect( + Sender : TObject; + Client : TWSocketClient; + Error : Word); +begin + TriggerClientDisconnect(Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerServerStarted; +begin + if Assigned(FOnServerStarted) then + FOnServerStarted(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerServerStopped; +begin + if Assigned(FOnServerStopped) then + FOnServerStopped(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerClientConnect( + Client : TObject; + Error : Word); +begin + if Assigned(FOnClientConnect) then + FOnClientConnect(Self, Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerClientDisconnect( + Client : TObject; + Error : Word); +begin + if Assigned(FOnClientDisconnect) then + FOnClientDisconnect(Self, Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerGetDocument( + Sender : TObject; + var Flags : THttpGetFlag); +begin + if Assigned(FOnGetDocument) then + FOnGetDocument(Self, Sender, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerHeadDocument( + Sender : TObject; + var Flags : THttpGetFlag); +begin + if Assigned(FOnHeadDocument) then + FOnHeadDocument(Self, Sender, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerPostedData(Sender : TObject; + Error : WORD); +begin + if Assigned(FOnPostedData) then + FOnPostedData(Self, Sender, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpServer.TriggerPostDocument( + Sender : TObject; + var Flags : THttpGetFlag); +begin + if Assigned(FOnPostDocument) then + FOnPostDocument(Self, Sender, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor THttpConnection.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + LineMode := TRUE; + LineEdit := FALSE; + LineEnd := #10; + FRequestHeader := TStringList.Create; + FState := hcRequest; + OnDataAvailable := ConnectionDataAvailable; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor THttpConnection.Destroy; +begin + if Assigned(FRequestHeader) then begin + FRequestHeader.Destroy; + FRequestHeader := nil; + end; + if Assigned(FDocStream) then begin + FDocStream.Destroy; + FDocStream := nil; + end; + if Assigned(FDocBuf) then begin + FreeMem(FDocBuf, BufSize); + FDocBuf := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + { We *MUST* handle all exception to avoid application shutdown } + try + if Msg = WM_HTTP_DONE then + WMHttpDone(MsgRec) + else + inherited WndProc(MsgRec); + except + on E:Exception do + HandleBackGroundException(E); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.WMHttpDone(var msg: TMessage); +begin + FState := hcRequest; + if CompareText(FRequestConnection, 'Keep-Alive') <> 0 then + CloseDelayed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure is called each time data is available from a client. } +{ We use FState variable to keep track of the where we are in the http } +{ protocol: request command, header line or posted data. } +procedure THttpConnection.ConnectionDataAvailable(Sender: TObject; Error : Word); +var + Len : Integer; + I : Integer; +begin + { If we are in data state, then the application has to receive data } + if FState = hcPostedData then begin + if FAcceptPostedData and Assigned(FOnPostedData) then + FOnPostedData(Self, Error) + else + { No one is willing data, received it and throw it away } + FRcvdLine := ReceiveStr; + Exit; + end; + { We use line mode. We will receive complete lines } + FRcvdLine := ReceiveStr; + { Remove trailing CR/LF } + Len := Length(FRcvdLine); + if (Len > 0) and (FRcvdLine[Len] = #10) then begin + Dec(Len); + if (Len > 0) and (FRcvdLine[Len] = #13) then + Dec(Len); + SetLength(FRcvdLine, Len); + end; + if FState = hcRequest then begin + { We just start a new request. Initialize all header variables } + FRequestContentType := ''; + FRequestContentLength := 0; + FRequestContentType := ''; + FRequestAccept := ''; + FRequestReferer := ''; + FRequestAcceptLanguage := ''; + FRequestAcceptEncoding := ''; + FRequestUserAgent := ''; + FRequestHost := ''; + FRequestConnection := ''; + { The line we just received is HTTP command, parse it } + ParseRequest; + { Next lines will be header lines } + FState := hcHeader; + Exit; + end; + { We can comes here only in hcHeader state } + if FRcvdLine = '' then begin + { Last header line is an empty line. Then we enter data state } + FState := hcPostedData; + { We will process request before receiving data because application } + { has to setup things to be able to receive posted data } + ProcessRequest; + Exit; + end; + { We comes here for normal header line. Extract some interesting variables } + I := Pos(':', FRcvdLine); + if I > 0 then begin + try + repeat + Inc(I); + until (I > Length(FRcvdLine)) or (FRcvdLine[I] <> ' '); + if StrLIComp(@FRcvdLine[1], 'content-type:', 13) = 0 then + FRequestContentType := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'content-length:', 15) = 0 then + FRequestContentLength := StrToInt(Copy(FRcvdLine, I, Length(FRcvdLine))) + else if StrLIComp(@FRcvdLine[1], 'Accept:', 7) = 0 then + FRequestAccept:= Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'Referer:', 8) = 0 then + FRequestReferer := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'Accept-Language:', 16) = 0 then + FRequestAcceptLanguage := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'Accept-Encoding:', 16) = 0 then + FRequestAcceptEncoding := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'User-Agent:', 11) = 0 then + FRequestUserAgent := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'Host:', 5) = 0 then + FRequestHost := Copy(FRcvdLine, I, Length(FRcvdLine)) + else if StrLIComp(@FRcvdLine[1], 'Connection:', 11) = 0 then + FRequestConnection := Copy(FRcvdLine, I, Length(FRcvdLine)); + except + { Ignore any exception in parsing header line } + end; + end; + FRequestHeader.Add(FRcvdLine); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Request is in FRcvdLine property. } +{ Split it into FMethod, FPath, FVersion and parameters. } +procedure THttpConnection.ParseRequest; +var + I, J : Integer; +begin + I := 1; + while (I <= Length(FRcvdLine)) and (FRcvdLine[I] <> ' ') do + Inc(I); + FMethod := UpperCase(Copy(FRcvdLine, 1, I - 1)); + Inc(I); + while (I <= Length(FRcvdLine)) and (FRcvdLine[I] = ' ') do + Inc(I); + J := I; + while (I <= Length(FRcvdLine)) and (FRcvdLine[I] <> ' ') do + Inc(I); + FPath := Copy(FRcvdLine, J, I - J); + { Find parameters } + J := Pos('?', FPath); + if J <= 0 then + FParams := '' + else begin + FParams := Copy(FPath, J + 1, Length(FPath)); + FPath := Copy(FPath, 1, J - 1); + end; + Inc(I); + while (I <= Length(FRcvdLine)) and (FRcvdLine[I] = ' ') do + Inc(I); + J := I; + while (I <= Length(FRcvdLine)) and (FRcvdLine[I] <> ' ') do + Inc(I); + FVersion := Trim(UpperCase(Copy(FRcvdLine, J, I - J))); + if FVersion = '' then + FVersion := 'HTTP/1.0'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.Answer404; +var + Body : String; +begin + Body := '404 Not Found' + + '

404 Not Found

The requested URL ' + FPath + + ' was not found on this server.

' + #13#10; + PutStringInSendBuffer(FVersion + ' 404 Not Found' + #13#10 + + 'Content-Type: text/html' + #13#10 + + 'Content-Length: ' + IntToStr(Length(Body)) + #13#10 + + #13#10); + SendStr(Body); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ As its name implies... } +procedure THttpConnection.ProcessRequest; +var + I : Integer; +begin + if FPath[1] = '/' then + FDocument := FDocDir + FPath + else + FDocument := FDocDir + '\' + FPath; + { Check for default document } + if FDocument[Length(FDocument)] = '/' then + FDocument := FDocument + FDefaultDoc; + { Change slashes to backslashes } + for I := 1 to Length(FDocument) do begin + if FDocument[I] = '/' then + FDocument[I] := '\'; + end; + + FDocument := URLDecode(FDocument); + + if FMethod = 'GET' then + ProcessGet + else if FMethod = 'POST' then + ProcessPost + else if FMethod = 'HEAD' then + ProcessHead + else begin + Answer404; + CloseDelayed; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.TriggerGetDocument(var Flags : THttpGetFlag); +begin + if Assigned(FOnGetDocument) then + FOnGetDocument(Self, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.TriggerHeadDocument(var Flags : THttpGetFlag); +begin + if Assigned(FOnHeadDocument) then + FOnHeadDocument(Self, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.TriggerPostDocument(var Flags : THttpGetFlag); +begin + if Assigned(FOnPostDocument) then + FOnPostDocument(Self, Flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.ProcessPost; +var + Flags : THttpGetFlag; +begin + Flags := hg404; + TriggerPostDocument(Flags); + if Flags = hg404 then begin + Answer404; + CloseDelayed; + Exit; + end + else if Flags = hgAcceptData then + FAcceptPostedData := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This method has to be called by main code when all posted data has been } +{ received. } +procedure THttpConnection.PostedDataReceived; +begin + LineMode := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.ProcessHead; +var + Flags : THttpGetFlag; +begin + Flags := hgSendDoc; + TriggerHeadDocument(Flags); + case Flags of + hg404: + begin + Answer404; + CloseDelayed; + end; + hgSendDoc: + begin + if FileExists(FDocument) then + SendDocument(httpSendHead) + else begin + Answer404; + CloseDelayed; + end; + end; + hgSendStream: + SendStream; + hgWillSendMySelf: + { Nothing to do }; + else + CloseDelayed; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.ProcessGet; +var + Flags : THttpGetFlag; + TempStream : TFileStream; + OK : Boolean; +begin + Flags := hgSendDoc; + TriggerGetDocument(Flags); + case Flags of + hg404: + begin + Answer404; + CloseDelayed; + end; + hgSendDoc: + begin + OK := FALSE; + try + if not FileExists(FDocument) then begin + { File not found } + Answer404; + CloseDelayed; + end + else begin + TempStream := TFileStream.Create(FDocument, fmOpenRead + fmShareDenyWrite); + TempStream.Destroy; + OK := TRUE; + end; + except + Answer404; + CloseDelayed; + end; + if OK then + SendDocument(httpSendDoc) + end; + hgSendStream: + SendStream; + hgWillSendMySelf: + { Nothing to do }; + else + CloseDelayed; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function DocumentToContentType(FileName : String) : String; +var + Ext : String; +begin + { We probably should the registry to find MIME type for known file types } + Ext := LowerCase(ExtractFileExt(FileName)); + if Length(Ext) > 1 then + Ext := Copy(Ext, 2, Length(Ext)); + if (Ext = 'htm') or (Ext = 'html') then + Result := 'text/html' + else if Ext = 'gif' then + Result := 'image/gif' + else if Ext = 'bmp' then + Result := 'image/bmp' + else if (Ext = 'jpg') or (Ext = 'jpeg') then + Result := 'image/jpeg' + else if Ext = 'txt' then + Result := 'text/plain' + else + Result := 'application/binary'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RFC1123_Date(aDate : TDateTime) : String; +const + StrWeekDay : String = 'MonTueWedThuFriSatSun'; + StrMonth : String = 'JanFebMarAprMayJunJulAugSepOctNovDec'; +var + Year, Month, Day : Word; + Hour, Min, Sec, MSec : Word; + DayOfWeek : Word; +begin + DecodeDate(aDate, Year, Month, Day); + DecodeTime(aDate, Hour, Min, Sec, MSec); + DayOfWeek := ((Trunc(aDate) - 2) mod 7); + Result := Copy(StrWeekDay, 1 + DayOfWeek * 3, 3) + ', ' + + Format('%2.2d %s %4.4d %2.2d:%2.2d:%2.2d', + [Day, Copy(StrMonth, 1 + 3 * (Month - 1), 3), + Year, Hour, Min, Sec]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Return document file date from document filename. } +{ Return 0 if file not found. } +function FileDate(FileName : String) : TDateTime; +var + SearchRec : TSearchRec; + Status : Integer; +begin + Status := FindFirst(FileName, faAnyFile, SearchRec); + try + if Status <> 0 then + Result := 0 + else + Result := FileDateToDateTime(SearchRec.Time); + finally + FindClose(SearchRec); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ SendDocument will send FDocument file to remote client, build header and } +{ sending data (if required) } +procedure THttpConnection.SendDocument(SendType : THttpSendType); +var + DocSize : Integer; +begin + FLastModified := FileDate(FDocument); + FAnswerContentType := DocumentToContentType(FDocument); + + if Assigned(FDocStream) then begin + FDocStream.Destroy; + FDocStream := nil; + end; + FDocStream := TFileStream.Create(FDocument, fmOpenRead + fmShareDenyWrite); + DocSize := FDocStream.Size; + { Seek to end of document because HEAD will not send actual document } + if SendType = httpSendHead then + FDocStream.Seek(0, soFromEnd); + OnDataSent := ConnectionDataSent; + { Send Header } + PutStringInSendBuffer( + FVersion + ' 200 OK' + #13#10 + + 'Content-Type: ' + FAnswerContentType + #13#10 + + 'Content-Length: ' + IntToStr(DocSize) + #13#10); + if FLastModified <> 0 then + PutStringInSendBuffer( + 'Last-Modified: ' + RFC1123_Date(FLastModified) + 'GMT' + #13#10); + PutStringInSendBuffer(#13#10); + { Send(nil, 0); Removed 15/04/02 } + if SendType = httpSendDoc then + SendStream + else + Send(nil, 0); { Added 15/04/02 } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpConnection.SendStream; +begin + if not Assigned(FDocStream) then begin + CloseDelayed; + Exit; + end; + if not Assigned(FDocBuf) then + GetMem(FDocBuf, BufSize); + OnDataSent := ConnectionDataSent; + ConnectionDataSent(Self, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All data in TWSocket has been sent. Read next lock from stream and send. } +{ When end of stream is reached, closed communication. } +procedure THttpConnection.ConnectionDataSent(Sender : TObject; Error : WORD); +var + Count : Integer; +begin + if not Assigned(FDocStream) then begin + { End of file has been reached } + Exit; + end; + Count := FDocStream.Read(FDocBuf^, BufSize); + if Count <= 0 then begin + { End of file found } + FDocStream.Destroy; + FDocStream := nil; + ShutDown(1); +{$IFNDEF VER80} + Sleep(0); +{$ENDIF} + PostMessage(Handle, WM_HTTP_DONE, 0, 0); + Exit; + end; + if State = wsConnected then { Be sure to be still connected... } + Send(FDocBuf, Count); { before actually send any data. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function xdigit(Ch : char) : Integer; +begin + if ch in ['0'..'9'] then + Result := ord(Ch) - ord('0') + else + Result := (ord(Ch) and 15) + 9; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function isxdigit(Ch : char) : Boolean; +begin + Result := (ch in ['0'..'9']) or (ch in ['a'..'z']) or (ch in ['A'..'Z']); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function htoin(value : PChar; len : Integer) : Integer; +var + i : Integer; +begin + Result := 0; + i := 0; + while (i < len) and (Value[i] = ' ') do + i := i + 1; + while (i < len) and (isxDigit(Value[i])) do begin + Result := Result * 16 + xdigit(Value[i]); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function htoi2(value : PChar) : Integer; +begin + Result := htoin(value, 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Retrieve a single value by name out of an URL encoded data stream } +{ In the stream, every space is replaced by a '+'. The '%' character is } +{ an escape character. The next two are 2 digits hexadecimal codes ascii } +{ code value. The stream is constitued by name=value couples separated } +{ by a single '&' character. The special characters are coded by the '%' } +{ followed by hex-ascii character code. } +function ExtractURLEncodedValue( + Msg : PChar; { URL Encoded stream } + Name : String; { Variable name to look for } + var Value : String) { Where to put variable value } + : Boolean; { Found or not found that's the question } +var + NameLen : Integer; + FoundLen : Integer; {tps} + Ch : Char; + P, Q : PChar; +begin + Result := FALSE; + Value := ''; + if Msg = nil then { Empty source } + Exit; + + NameLen := Length(Name); + + P := Msg; + while P^ <> #0 do begin + Q := P; + while (P^ <> #0) and (P^ <> '=') do + Inc(P); + FoundLen := P - Q; {tps} + if P^ = '=' then + Inc(P); + if (StrLIComp(Q, @Name[1], NameLen) = 0) and + (NameLen = FoundLen) then begin {tps} + while (P^ <> #0) and (P^ <> '&') do begin + Ch := P^; + if Ch = '%' then begin + Ch := chr(htoi2(P + 1)); + Inc(P, 2); + end + else if Ch = '+' then + Ch := ' '; + Value := Value + Ch; + Inc(P); + end; + Result := TRUE; + break; + end; + while (P^ <> #0) and (P^ <> '&') do + Inc(P); + if P^ = '&' then + Inc(P); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function UrlDecode(const Url : String) : String; +var + I, J, K, L : Integer; +begin + Result := Url; + L := Length(Result); + I := 1; + K := 1; + while TRUE do begin + J := I; + while (J <= Length(Result)) and (Result[J] <> '%') do begin + if J <> K then + Result[K] := Result[J]; + Inc(J); + Inc(K); + end; + if J > Length(Result) then + break; { End of string } + if J > (Length(Result) - 2) then begin + while J <= Length(Result) do begin + Result[K] := Result[J]; + Inc(J); + Inc(K); + end; + break; + end; + Result[K] := Char(htoi2(@Result[J + 1])); + Inc(K); + I := J + 3; + Dec(L, 2); + end; + SetLength(Result, L); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function THttpServer.GetSrcVersion: String; +begin + Result := Format('%d.%02.2d', [THttpServerVersion div 100, + THttpServerVersion mod 100]); + +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Vc32/IcsBcb30.bpk b/lib/ics/Delphi/Vc32/IcsBcb30.bpk new file mode 100644 index 00000000..e0d53d8f --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsBcb30.bpk @@ -0,0 +1,186 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.03 +# --------------------------------------------------------------------------- +PROJECT = IcsBcb30.bpl +OBJFILES = WSocket.obj WSockets.obj httpprot.obj ftpcli.obj wait.obj tnscript.obj \ + fingcli.obj nntpcli.obj ping.obj tncnx.obj tnemulvt.obj emulvt.obj FtpSrv.obj \ + SmtpProt.obj wsockbuf.obj Pop3Prot.obj MimeDec.obj DnsQuery.obj IcsBcb30.obj +RESFILES = IcsBcb30.res WSocket.dcr WSockets.dcr httpprot.dcr ftpcli.dcr wait.dcr \ + tnscript.dcr fingcli.dcr nntpcli.dcr ping.dcr tncnx.dcr tnemulvt.dcr emulvt.dcr \ + FtpSrv.dcr SmtpProt.dcr Pop3Prot.dcr MimeDec.dcr DnsQuery.dcr +DEFFILE = +RESDEPEN = $(RESFILES) +LIBFILES = +LIBRARIES = VCLX35.lib VCLDB35.lib +SPARELIBS = VCL35.lib VCLDB35.lib VCLX35.lib +PACKAGES = VCL35.bpi +# --------------------------------------------------------------------------- +PATHCPP = .; +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +# --------------------------------------------------------------------------- +CFLAG1 = -Od -Hc -w -Ve -r- -k -y -v -vi- -c -b- -w-par -w-inl -Vx +CFLAG2 = -D_RTLDLL;USEPACKAGES \ + -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl \ + -H=$(BCB)\lib\vcl35.csm +CFLAG3 = -Tkh30000 +PFLAGS = -D_RTLDLL;USEPACKAGES \ + -U..\vc32;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$Y \ + -$W -$O- -v -JPHN -M +RFLAGS = -D_RTLDLL;USEPACKAGES \ + -i..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i.. /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /d_RTLDLL /dUSEPACKAGES /mx /w2 /zd +LFLAGS = -L..\vc32;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -D"ICS components by F. Piette" -aa -Tpp -x -Gn -Gl -Gi -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0pkg32.obj $(PACKAGES) sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=1 +MinorVer=0 +Release=0 +Build=3 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=ICS Components for BCB3 +FileVersion=1.0.0.3 +InternalName=IcsBcb30 +LegalCopyright=(c) 97'-'98 by F. Piette +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=1 +Item0=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=2 +Item0=..\vc32;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Delphi/Vc32/IcsBcb30.cpp b/lib/ics/Delphi/Vc32/IcsBcb30.cpp new file mode 100644 index 00000000..26a9d12d --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsBcb30.cpp @@ -0,0 +1,50 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("IcsBcb30.res"); +USEUNIT("WSocket.pas"); +USERES("WSocket.dcr"); +USEUNIT("WSockets.pas"); +USERES("WSockets.dcr"); +USEUNIT("httpprot.pas"); +USERES("httpprot.dcr"); +USEUNIT("ftpcli.pas"); +USERES("ftpcli.dcr"); +USEUNIT("wait.pas"); +USERES("wait.dcr"); +USEUNIT("tnscript.pas"); +USERES("tnscript.dcr"); +USEUNIT("fingcli.pas"); +USERES("fingcli.dcr"); +USEUNIT("nntpcli.pas"); +USERES("nntpcli.dcr"); +USEUNIT("ping.pas"); +USERES("ping.dcr"); +USEUNIT("tncnx.pas"); +USERES("tncnx.dcr"); +USEUNIT("tnemulvt.pas"); +USERES("tnemulvt.dcr"); +USEUNIT("emulvt.pas"); +USERES("emulvt.dcr"); +USEUNIT("FtpSrv.pas"); +USERES("FtpSrv.dcr"); +USEUNIT("SmtpProt.pas"); +USERES("SmtpProt.dcr"); +USEPACKAGE("VCL35.bpi"); +USEUNIT("wsockbuf.pas"); +USEUNIT("Pop3Prot.pas"); +USERES("Pop3Prot.dcr"); +USEUNIT("MimeDec.pas"); +USERES("MimeDec.dcr"); +USEUNIT("DnsQuery.pas"); +USERES("DnsQuery.dcr"); +//--------------------------------------------------------------------------- +#pragma package(smart_init) +//--------------------------------------------------------------------------- +// Package source. +//--------------------------------------------------------------------------- +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Delphi/Vc32/IcsBcb30.res b/lib/ics/Delphi/Vc32/IcsBcb30.res new file mode 100644 index 00000000..80f0f431 Binary files /dev/null and b/lib/ics/Delphi/Vc32/IcsBcb30.res differ diff --git a/lib/ics/Delphi/Vc32/IcsBcb50.bpk b/lib/ics/Delphi/Vc32/IcsBcb50.bpk new file mode 100644 index 00000000..4454494c --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsBcb50.bpk @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=0 +Build=16 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=ICS Components for BCB5 +FileVersion=2.0.0.16 +InternalName=IcsBcb50 +LegalCopyright=(c) 1997-2000 by François PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=2.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[HistoryLists\hlIncludePath] +Count=4 +Item0=..\..\internet;..;D:\delphi\vc32\;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..\..\Delphi;D:\delphi\vc32\;$(BCB)\include;$(BCB)\include\vcl +Item2=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item3=..\..\internet;..\..\DELPHI;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=7 +Item0=$(BCB)\Projects\Lib;..\..\internet;..;D:\delphi\vc32\;$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\Source\ToolsAPI +Item1=$(BCB)\Projects\Lib;..\..\internet;..;D:\delphi\vc32\;$(BCB)\lib\obj;$(BCB)\lib +Item2=$(BCB)\Projects\Lib;..\..\internet;..\..\Delphi;D:\delphi\vc32\;$(BCB)\lib\obj;$(BCB)\lib +Item3=$(BCB)\Projects\Lib;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item4=$(BCB)\Projects\Lib;..\..\internet;..\..\DELPHI;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item5=..\vc32;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item6=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Language] +ActiveLang= +ProjectLang= +RootDir= + + \ No newline at end of file diff --git a/lib/ics/Delphi/Vc32/IcsBcb50.cpp b/lib/ics/Delphi/Vc32/IcsBcb50.cpp new file mode 100644 index 00000000..da11507b --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsBcb50.cpp @@ -0,0 +1,53 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("IcsBcb50.res"); +USEUNIT("WSocket.pas"); +USERES("WSocket.dcr"); +USEUNIT("Httpprot.pas"); +USERES("Httpprot.dcr"); +USEUNIT("Ftpcli.pas"); +USERES("Ftpcli.dcr"); +USEUNIT("Wait.pas"); +USERES("Wait.dcr"); +USEUNIT("TnScript.pas"); +USERES("TnScript.dcr"); +USEUNIT("Fingcli.pas"); +USERES("Fingcli.dcr"); +USEUNIT("Nntpcli.pas"); +USERES("Nntpcli.dcr"); +USEUNIT("Ping.pas"); +USERES("Ping.dcr"); +USEUNIT("TnCnx.pas"); +USERES("TnCnx.dcr"); +USEUNIT("TnEmulVT.pas"); +USERES("TnEmulVT.dcr"); +USEUNIT("EmulVT.pas"); +USERES("EmulVT.dcr"); +USEUNIT("FtpSrv.pas"); +USERES("FtpSrv.dcr"); +USEUNIT("SmtpProt.pas"); +USERES("SmtpProt.dcr"); +USEUNIT("WSockBuf.pas"); +USEUNIT("Pop3Prot.pas"); +USERES("Pop3Prot.dcr"); +USEUNIT("MimeDec.pas"); +USERES("MimeDec.dcr"); +USEUNIT("DnsQuery.pas"); +USERES("DnsQuery.dcr"); +USEUNIT("WSocketS.pas"); +USERES("WSocketS.dcr"); +USEUNIT("HttpSrv.pas"); +USERES("HttpSrv.dcr"); +USEPACKAGE("vcl50.bpi"); +USEUNIT("WSocketE.pas"); +//--------------------------------------------------------------------------- +#pragma package(smart_init) +//--------------------------------------------------------------------------- +// Package source. +//--------------------------------------------------------------------------- +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Delphi/Vc32/IcsBcb50.res b/lib/ics/Delphi/Vc32/IcsBcb50.res new file mode 100644 index 00000000..21465a1d Binary files /dev/null and b/lib/ics/Delphi/Vc32/IcsBcb50.res differ diff --git a/lib/ics/Delphi/Vc32/IcsBcb60.bpk b/lib/ics/Delphi/Vc32/IcsBcb60.bpk new file mode 100644 index 00000000..f183aefb --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsBcb60.bpk @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=1 +Release=0 +Build=11 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=ICS Components for BCB6 +FileVersion=2.1.0.11 +InternalName=IcsBcb60 +LegalCopyright=(c) 1997-2002 by Francois PIETTE +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=1.0.0.0 +Comments=http://www.overbyte.be + +[Excluded Packages] +d:\program files\borland\cbuilder6\Projects\Bpl\PXPPkg.bpl=PXPPkg +D:\PROGRAM FILES\BORLAND\CBUILDER6\BIN\DCLSTD60.BPL=Borland Standard Components +d:\program files\borland\cbuilder6\Bin\idefilters60.bpl=IDE Filter for CPP32 +d:\program files\borland\cbuilder6\Bin\dcl31w60.bpl=Delphi 1.0 Compatibility Components +d:\program files\borland\cbuilder6\Bin\dclado60.bpl=Borland ADO DB Components +D:\PROGRAM FILES\BORLAND\CBUILDER6\BIN\DCLDB60.BPL=Borland Database Components +d:\program files\borland\cbuilder6\Bin\dclbde60.bpl=Borland BDE DB Components +D:\PROGRAM FILES\BORLAND\CBUILDER6\BIN\DBX60.BPL=Borland SQL Explorer UI Package +d:\program files\borland\cbuilder6\Bin\DCLIB60.bpl=InterBase Data Access Components +d:\program files\borland\cbuilder6\Bin\dclcds60.bpl=Borland Base Cached ClientDataset Component +D:\PROGRAM FILES\BORLAND\CBUILDER6\BIN\DCLMID60.BPL=Borland MyBase DataAccess Components +d:\program files\borland\cbuilder6\Bin\dclbdecds60.bpl=Borland Local BDE ClientDataset Components +d:\program files\borland\cbuilder6\Bin\dclqrt60.bpl=QuickReport Components +d:\program files\borland\cbuilder6\Bin\dcltee60.bpl=TeeChart Components +d:\program files\borland\cbuilder6\Bin\dcldss60.bpl=Borland Decision Cube Components +d:\program files\borland\cbuilder6\Bin\dcltqr60.bpl=TeeChart for QuickReport Components +d:\program files\borland\cbuilder6\Bin\dclclxdb60.bpl=Borland CLX Database Components +D:\PROGRAM FILES\BORLAND\CBUILDER6\BIN\DCLCLXSTD60.BPL=Borland CLX Standard Components +d:\program files\borland\cbuilder6\Bin\dclmcn60.bpl=Borland DataSnap Connection Components +d:\program files\borland\cbuilder6\Bin\dclsmpedit60.bpl=Borland Editor Script Enhancements +d:\program files\borland\cbuilder6\Bin\applet60.bpl=Borland Control Panel Applet Package +d:\program files\borland\cbuilder6\Bin\dclemacsedit60.bpl=Borland Editor Emacs Enhancements +d:\program files\borland\cbuilder6\Bin\dclact60.bpl=Borland ActionBar Components +d:\program files\borland\cbuilder6\Bin\dclmlwiz60.bpl=Borland Markup Language Wizards +d:\program files\borland\cbuilder6\Bin\dclbcbsmp60.bpl=Borland Sample Controls Design Time Package +d:\program files\borland\cbuilder6\Bin\dclnet60.bpl=Borland Internet Components +d:\program files\borland\cbuilder6\Bin\DBWEBXPRT.BPL=Borland Web Wizard Package +d:\program files\borland\cbuilder6\Bin\DCLNMF60.bpl=NetMasters Fastnet Tools +d:\program files\borland\cbuilder6\Bin\dclwbm60.bpl=Borland InternetExpress Components +d:\program files\borland\cbuilder6\Bin\dclwebsnap60.bpl=Borland WebSnap Components +d:\program files\borland\cbuilder6\Bin\dclsoap60.bpl=Borland SOAP Components +d:\program files\borland\cbuilder6\Bin\dclocx60.bpl=Borland Sample Imported ActiveX Controls +d:\program files\borland\cbuilder6\Bin\dclite60.bpl=Borland Integrated Translation Environment +d:\program files\borland\cbuilder6\Bin\dcldbx60.bpl=Borland dbExpress Components +d:\program files\borland\cbuilder6\Bin\dcldbxcds60.bpl=Borland Local DBX ClientDataset Components +d:\program files\borland\cbuilder6\Bin\dclindy60.bpl=Internet Direct (Indy) for D6 Property and Component Editors +d:\program files\borland\cbuilder6\Bin\bcb2kaxserver60.bpl=Borland C++Builder COM Server Components Sample Package +d:\program files\borland\cbuilder6\Bin\bcbie60.bpl=Borland C++Builder Internet Explorer 5 Components Package +d:\program files\borland\cbuilder6\Projects\Bpl\MwBcb60.bpl=MwBcb60 + +[HistoryLists\hlIncludePath] +Count=1 +Item0=D:\FPiette\Delphi\VC32;D:\FPiette\cpp;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=4 +Item0=$(BCB)\Projects\Lib;D:\FPiette\Delphi\VC32;d:\program files\borland\cbuilder6\lib\debug;$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\Source\ToolsAPI +Item1=D:\FPiette\Delphi\VC32;d:\program files\borland\cbuilder6\lib\debug;$(BCB)\lib\obj;$(BCB)\lib;$(BCB)\Source\ToolsAPI +Item2=D:\FPiette\Delphi\VC32;d:\program files\borland\cbuilder6\lib\debug;$(BCB)\lib\obj;$(BCB)\lib +Item3=D:\FPiette\Delphi\VC32;d:\program files\borland\cbuilder6\lib\debug;D:\FPiette\cpp;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_DEBUG + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +Launcher= +UseLauncher=0 +DebugCWD= +HostApplication= +RemoteHost= +RemotePath= +RemoteLauncher= +RemoteCWD= +RemoteDebug=0 + +[Compiler] +ShowInfoMsgs=0 +LinkDebugVcl=0 +LinkCGLIB=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +[Linker] +LibPrefix= +LibSuffix= +LibVersion= + + \ No newline at end of file diff --git a/lib/ics/Delphi/Vc32/IcsBcb60.cpp b/lib/ics/Delphi/Vc32/IcsBcb60.cpp new file mode 100644 index 00000000..30689a63 --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsBcb60.cpp @@ -0,0 +1,19 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +USEFORMNS("TnOptFrm.pas", Tnoptfrm, OptForm); +//--------------------------------------------------------------------------- +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- + \ No newline at end of file diff --git a/lib/ics/Delphi/Vc32/IcsBcb60.res b/lib/ics/Delphi/Vc32/IcsBcb60.res new file mode 100644 index 00000000..09b4dd96 Binary files /dev/null and b/lib/ics/Delphi/Vc32/IcsBcb60.res differ diff --git a/lib/ics/Delphi/Vc32/IcsDel30.dpk b/lib/ics/Delphi/Vc32/IcsDel30.dpk new file mode 100644 index 00000000..2d2edbab --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsDel30.dpk @@ -0,0 +1,79 @@ +package IcsDel30; + +{$R *.RES} +{$R 'wsocket.dcr'} +{$R 'wsockets.dcr'} +{$R 'wait.dcr'} +{$R 'fingcli.dcr'} +{$R 'FtpCli.dcr'} +{$R 'HttpProt.dcr'} +{$R 'MimeDec.dcr'} +{$R 'NntpCli.dcr'} +{$R 'ping.dcr'} +{$R 'tncnx.dcr'} +{$R 'tnemulvt.dcr'} +{$R 'tnscript.dcr'} +{$R 'emulvt.dcr'} +{$R 'ftpsrv.dcr'} +{$R 'MbxFile.dcr'} +{$R 'SmtpProt.dcr'} +{$R 'Pop3prot.dcr'} +{$R 'dnsquery.dcr'} +{$R 'Httpsrv.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS ON} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'Internet Component Suite (by F. Piette)'} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + wsocket, + wsockete, + wsockbuf, + wait, + wsockets, + fingcli, + formpos, + FtpCli, + HttpProt, + icmp, + md5, + MimeDec, + NntpCli, + ping, + tncnx, + tnemulvt, + tnoptfrm, + tnscript, + emulvt, + ftpsrv, + ftpsrvc, + MbxFile, + SmtpProt, + dnsquery, + Pop3prot, + Httpsrv, + FtpSrvT; + +end. diff --git a/lib/ics/Delphi/Vc32/IcsDel40.dpk b/lib/ics/Delphi/Vc32/IcsDel40.dpk new file mode 100644 index 00000000..2f291734 --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsDel40.dpk @@ -0,0 +1,79 @@ +package IcsDel40; + +{$R *.RES} +{$R 'WSocket.dcr'} +{$R 'fingcli.dcr'} +{$R 'FtpCli.dcr'} +{$R 'FtpSrv.dcr'} +{$R 'HttpProt.dcr'} +{$R 'MimeDec.dcr'} +{$R 'NntpCli.dcr'} +{$R 'ping.dcr'} +{$R 'pop3prot.dcr'} +{$R 'TnCnx.dcr'} +{$R 'tnemulvt.dcr'} +{$R 'tnscript.dcr'} +{$R 'emulvt.dcr'} +{$R 'SmtpProt.dcr'} +{$R 'MbxFile.dcr'} +{$R 'wait.dcr'} +{$R 'DnsQuery.dcr'} +{$R 'WSocketS.dcr'} +{$R 'HttpSrv.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'ICS components (Freeware from F. Piette) Delphi 4'} +{$IMPLICITBUILD OFF} + +requires + vcl40; + +contains + WSockBuf in 'WSockBuf.pas', + WSocket in 'WSocket.pas', + WSocketE in 'WSocketE.pas', + FingCli in 'fingcli.pas', + Formpos in 'formpos.pas', + FtpCli in 'FtpCli.pas', + FtpSrv in 'FtpSrv.pas', + FtpSrvC in 'FtpSrvC.pas', + HttpProt in 'HttpProt.pas', + icmp in 'icmp.pas', + MD5 in 'MD5.pas', + MimeDec in 'MimeDec.pas', + NntpCli in 'NntpCli.pas', + Ping in 'ping.pas', + TnCnx in 'TnCnx.pas', + TnEmulVT in 'TnEmulVT.pas', + Tnoptfrm in 'tnoptfrm.pas' {OptForm}, + TnScript in 'TnScript.pas', + Emulvt in 'emulvt.pas', + SmtpProt in 'SmtpProt.pas', + MbxFile in 'MbxFile.pas', + Pop3Prot in 'Pop3Prot.pas', + Wait in 'wait.pas', + DnsQuery in 'DnsQuery.pas', + WSocketS in 'WSocketS.pas', + HttpSrv in 'HttpSrv.pas', + FtpSrvT in 'FtpSrvT.pas'; + +end. diff --git a/lib/ics/Delphi/Vc32/IcsDel40.res b/lib/ics/Delphi/Vc32/IcsDel40.res new file mode 100644 index 00000000..16221e3b Binary files /dev/null and b/lib/ics/Delphi/Vc32/IcsDel40.res differ diff --git a/lib/ics/Delphi/Vc32/IcsDel50.dpk b/lib/ics/Delphi/Vc32/IcsDel50.dpk new file mode 100644 index 00000000..06b589b8 --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsDel50.dpk @@ -0,0 +1,79 @@ +package IcsDel50; + +{$R *.RES} +{$R 'WSocket.dcr'} +{$R 'FingCli.dcr'} +{$R 'FtpCli.dcr'} +{$R 'FtpSrv.dcr'} +{$R 'HttpProt.dcr'} +{$R 'MimeDec.dcr'} +{$R 'NntpCli.dcr'} +{$R 'Ping.dcr'} +{$R 'Pop3Prot.dcr'} +{$R 'TnCnx.dcr'} +{$R 'TnEmulVT.dcr'} +{$R 'TnScript.dcr'} +{$R 'EmulVT.dcr'} +{$R 'SmtpProt.dcr'} +{$R 'MbxFile.dcr'} +{$R 'Wait.dcr'} +{$R 'DnsQuery.dcr'} +{$R 'WSocketS.dcr'} +{$R 'HttpSrv.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'ICS components (Freeware from F. Piette)'} +{$IMPLICITBUILD ON} + +requires + vcl50; + +contains + WSockBuf in 'WSockBuf.pas', + WSocket in 'WSocket.pas', + FingCli in 'FingCli.pas', + FormPos in 'FormPos.pas', + FtpCli in 'FtpCli.pas', + FtpSrv in 'FtpSrv.pas', + FtpSrvC in 'FtpSrvC.pas', + HttpProt in 'HttpProt.pas', + Icmp in 'Icmp.pas', + MD5 in 'MD5.pas', + MimeDec in 'MimeDec.pas', + NntpCli in 'NntpCli.pas', + Ping in 'Ping.pas', + TnCnx in 'TnCnx.pas', + TnEmulVT in 'TnEmulVT.pas', + TnOptFrm in 'TnOptFrm.pas' {OptForm}, + TnScript in 'TnScript.pas', + Emulvt in 'EmulVT.pas', + SmtpProt in 'SmtpProt.pas', + MbxFile in 'MbxFile.pas', + Pop3Prot in 'Pop3Prot.pas', + Wait in 'Wait.pas', + DnsQuery in 'DnsQuery.pas', + WSocketS in 'WSocketS.pas', + HttpSrv in 'HttpSrv.pas', + FtpSrvT in 'FtpSrvT.pas', + WSocketE in 'WSocketE.pas'; + +end. diff --git a/lib/ics/Delphi/Vc32/IcsDel50.res b/lib/ics/Delphi/Vc32/IcsDel50.res new file mode 100644 index 00000000..e644ad10 Binary files /dev/null and b/lib/ics/Delphi/Vc32/IcsDel50.res differ diff --git a/lib/ics/Delphi/Vc32/IcsDel60.dcu b/lib/ics/Delphi/Vc32/IcsDel60.dcu new file mode 100644 index 00000000..3a959569 Binary files /dev/null and b/lib/ics/Delphi/Vc32/IcsDel60.dcu differ diff --git a/lib/ics/Delphi/Vc32/IcsDel60.dof b/lib/ics/Delphi/Vc32/IcsDel60.dof new file mode 100644 index 00000000..cdc0eaa3 --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsDel60.dof @@ -0,0 +1,108 @@ +[FileVersion] +Version=6.0 + +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=0 +P=1 +Q=1 +R=1 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription=Internet Component Suite (ICS) for Delphi 6 + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages= +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= + +[Language] +ActiveLang= +ProjectLang=$0000080C +RootDir= + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=3 +MinorVer=0 +Release=0 +Build=4 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte - http://www.overbyte.be +FileDescription=Internet Component Suite +FileVersion=3.0.0.4 +InternalName=IcsDel60 +LegalCopyright=http://www.overbyte.be +LegalTrademarks=(c) 1996-2002 by Franois Piette +OriginalFilename=IcsDel60 +ProductName=ICS +ProductVersion=3.0.0.0 +Comments=email:francois.piette@overbyte.be + +[Excluded Packages] +d:\program files\borland\delphi6\Bin\dclmcn60.bpl=Borland DataSnap Connection Components +d:\program files\borland\delphi6\Bin\dclwbm60.bpl=Borland InternetExpress Components +d:\program files\borland\delphi6\Bin\dclwebsnap60.bpl=Borland WebSnap Components + +[HistoryLists\hlConditionals] +Count=2 +Item0=NOFORMS +Item1=NOFORMSA + +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; diff --git a/lib/ics/Delphi/Vc32/IcsDel60.dpk b/lib/ics/Delphi/Vc32/IcsDel60.dpk new file mode 100644 index 00000000..ffd3a3a7 --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsDel60.dpk @@ -0,0 +1,81 @@ +package IcsDel60; + +{$R *.res} +{$R 'WSocket.dcr'} +{$R 'FingCli.dcr'} +{$R 'FtpCli.dcr'} +{$R 'FtpSrv.dcr'} +{$R 'HttpProt.dcr'} +{$R 'MimeDec.dcr'} +{$R 'NntpCli.dcr'} +{$R 'Ping.dcr'} +{$R 'Pop3Prot.dcr'} +{$R 'TnCnx.dcr'} +{$R 'TnEmulVT.dcr'} +{$R 'TnScript.dcr'} +{$R 'EmulVT.dcr'} +{$R 'SmtpProt.dcr'} +{$R 'MbxFile.dcr'} +{$R 'Wait.dcr'} +{$R 'DnsQuery.dcr'} +{$R 'WSocketS.dcr'} +{$R 'HttpSrv.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'Internet Component Suite (ICS) for Delphi 6'} +{$IMPLICITBUILD ON} + +requires + vcl, + rtl, + designide; + +contains + WSockBuf in 'WSockBuf.pas', + WSocket in 'WSocket.pas', + FingCli in 'FingCli.pas', + FormPos in 'FormPos.pas', + FtpCli in 'FtpCli.pas', + FtpSrv in 'FtpSrv.pas', + FtpSrvC in 'FtpSrvC.pas', + HttpProt in 'HttpProt.pas', + Icmp in 'Icmp.pas', + MD5 in 'MD5.pas', + MimeDec in 'MimeDec.pas', + NntpCli in 'NntpCli.pas', + Ping in 'Ping.pas', + TnCnx in 'TnCnx.pas', + TnEmulVT in 'TnEmulVT.pas', + TnOptFrm in 'TnOptFrm.pas' {OptForm}, + TnScript in 'TnScript.pas', + EmulVT in 'EmulVT.pas', + SmtpProt in 'SmtpProt.pas', + MbxFile in 'MbxFile.pas', + Pop3Prot in 'Pop3Prot.pas', + Wait in 'Wait.pas', + DnsQuery in 'DnsQuery.pas', + WSocketS in 'WSocketS.pas', + HttpSrv in 'HttpSrv.pas', + FtpSrvT in 'FtpSrvT.pas', + WSocketE in 'WSocketE.pas'; + +end. diff --git a/lib/ics/Delphi/Vc32/IcsDel60.res b/lib/ics/Delphi/Vc32/IcsDel60.res new file mode 100644 index 00000000..46e849aa Binary files /dev/null and b/lib/ics/Delphi/Vc32/IcsDel60.res differ diff --git a/lib/ics/Delphi/Vc32/IcsDel70.dof b/lib/ics/Delphi/Vc32/IcsDel70.dof new file mode 100644 index 00000000..bb1eb6a5 --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsDel70.dof @@ -0,0 +1,152 @@ +[FileVersion] +Version=7.0 + +[Compiler] +A=8 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=0 +P=1 +Q=1 +R=1 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=1 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +NamespacePrefix= +SymbolDeprecated=0 +SymbolLibrary=1 +SymbolPlatform=0 +UnitLibrary=1 +UnitPlatform=1 +UnitDeprecated=1 +HResultCompat=1 +HidingMember=1 +HiddenVirtual=1 +Garbage=1 +BoundsError=1 +ZeroNilCompat=1 +StringConstTruncated=1 +ForLoopVarVarPar=1 +TypedConstVarPar=1 +AsgToTypedConst=1 +CaseLabelRange=1 +ForVariable=1 +ConstructingAbstract=1 +ComparisonFalse=1 +ComparisonTrue=1 +ComparingSignedUnsigned=1 +CombiningSignedUnsigned=1 +UnsupportedConstruct=1 +FileOpen=1 +FileOpenUnitSrc=1 +BadGlobalSymbol=1 +DuplicateConstructorDestructor=1 +InvalidDirective=1 +PackageNoLink=1 +PackageThreadVar=1 +ImplicitImport=1 +HPPEMITIgnored=1 +NoRetVal=1 +UseBeforeDef=1 +ForLoopVarUndef=1 +UnitNameMismatch=1 +NoCFGFileFound=1 +MessageDirective=1 +ImplicitVariants=1 +UnicodeToLocale=1 +LocaleToUnicode=1 +ImagebaseMultiple=1 +SuspiciousTypecast=1 +PrivatePropAccessor=1 +UnsafeType=0 +UnsafeCode=0 +UnsafeCast=0 + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription=Internet Component Suite (ICS) for Delphi 7 + +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages= +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= + +[Language] +ActiveLang= +ProjectLang= +RootDir= + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=3 +MinorVer=0 +Release=0 +Build=96 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte - http://www.overbyte.be +FileDescription=Internet Component Suite +FileVersion=3.0.0.96 +InternalName=IcsDel70 +LegalCopyright=http://www.overbyte.be +LegalTrademarks=(c) 1996-2002 by Franois Piette +OriginalFilename=IcsDel70 +ProductName=ICS +ProductVersion=3.0.0.0 +Comments=email:francois.piette@overbyte.be + +[HistoryLists\hlConditionals] +Count=2 +Item0=NOFORMS +Item1=NOFORMSA + +[HistoryLists\hlUnitAliases] +Count=1 +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; diff --git a/lib/ics/Delphi/Vc32/IcsDel70.dpk b/lib/ics/Delphi/Vc32/IcsDel70.dpk new file mode 100644 index 00000000..c13069da --- /dev/null +++ b/lib/ics/Delphi/Vc32/IcsDel70.dpk @@ -0,0 +1,81 @@ +package IcsDel70; + +{$R *.res} +{$R 'WSocket.dcr'} +{$R 'FingCli.dcr'} +{$R 'FtpCli.dcr'} +{$R 'FtpSrv.dcr'} +{$R 'HttpProt.dcr'} +{$R 'MimeDec.dcr'} +{$R 'NntpCli.dcr'} +{$R 'Ping.dcr'} +{$R 'Pop3Prot.dcr'} +{$R 'TnCnx.dcr'} +{$R 'TnEmulVT.dcr'} +{$R 'TnScript.dcr'} +{$R 'EmulVT.dcr'} +{$R 'SmtpProt.dcr'} +{$R 'MbxFile.dcr'} +{$R 'Wait.dcr'} +{$R 'DnsQuery.dcr'} +{$R 'WSocketS.dcr'} +{$R 'HttpSrv.dcr'} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS ON} +{$RANGECHECKS ON} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DESCRIPTION 'Internet Component Suite (ICS) for Delphi 7'} +{$IMPLICITBUILD ON} + +requires + vcl, + rtl, + designide; + +contains + WSockBuf in 'WSockBuf.pas', + WSocket in 'wsocket.pas', + FingCli in 'FingCli.pas', + FormPos in 'FormPos.pas', + FtpCli in 'FtpCli.pas', + FtpSrv in 'FtpSrv.pas', + FtpSrvC in 'FtpSrvC.pas', + HttpProt in 'HttpProt.pas', + Icmp in 'Icmp.pas', + MD5 in 'MD5.pas', + MimeDec in 'MimeDec.pas', + NntpCli in 'NntpCli.pas', + Ping in 'Ping.pas', + TnCnx in 'TnCnx.pas', + TnEmulVT in 'TnEmulVT.pas', + TnOptFrm in 'TnOptFrm.pas' {OptForm}, + TnScript in 'TnScript.pas', + EmulVT in 'EmulVT.pas', + SmtpProt in 'SmtpProt.pas', + MbxFile in 'MbxFile.pas', + Pop3Prot in 'Pop3Prot.pas', + Wait in 'Wait.pas', + DnsQuery in 'DnsQuery.pas', + WSocketS in 'WSocketS.pas', + HttpSrv in 'HttpSrv.pas', + FtpSrvT in 'FtpSrvT.pas', + WSocketE in 'WSocketE.pas'; + +end. diff --git a/lib/ics/Delphi/Vc32/IcsDel70.res b/lib/ics/Delphi/Vc32/IcsDel70.res new file mode 100644 index 00000000..b561f81a Binary files /dev/null and b/lib/ics/Delphi/Vc32/IcsDel70.res differ diff --git a/lib/ics/Delphi/Vc32/Icsbcb40.bpk b/lib/ics/Delphi/Vc32/Icsbcb40.bpk new file mode 100644 index 00000000..ce54f2fb --- /dev/null +++ b/lib/ics/Delphi/Vc32/Icsbcb40.bpk @@ -0,0 +1,221 @@ +# --------------------------------------------------------------------------- +!if !$d(BCB) +BCB = $(MAKEDIR)\.. +!endif + +# --------------------------------------------------------------------------- +# IDE SECTION +# --------------------------------------------------------------------------- +# The following section of the project makefile is managed by the BCB IDE. +# It is recommended to use the IDE to change any of the values in this +# section. +# --------------------------------------------------------------------------- + +VERSION = BCB.04.04 +# --------------------------------------------------------------------------- +PROJECT = Icsbcb40.bpl +OBJFILES = WSocket.obj httpprot.obj ftpcli.obj wait.obj tnscript.obj fingcli.obj \ + nntpcli.obj ping.obj tncnx.obj tnemulvt.obj emulvt.obj FtpSrv.obj SmtpProt.obj \ + wsockbuf.obj Pop3Prot.obj MimeDec.obj DnsQuery.obj WSocketE.obj WSocketS.obj \ + HttpSrv.obj Icsbcb40.obj +RESFILES = Icsbcb40.res WSocket.dcr httpprot.dcr ftpcli.dcr wait.dcr tnscript.dcr \ + fingcli.dcr nntpcli.dcr ping.dcr tncnx.dcr tnemulvt.dcr emulvt.dcr FtpSrv.dcr \ + SmtpProt.dcr Pop3Prot.dcr MimeDec.dcr DnsQuery.dcr WSocketS.dcr HttpSrv.dcr +DEFFILE = +RESDEPEN = $(RESFILES) +LIBFILES = +IDLGENFILES = +IDLFILES = +LIBRARIES = vcljpg40.lib vcldbx40.lib vclmid40.lib vclx40.lib vcldb40.lib +SPARELIBS = vcl40.lib vcldb40.lib vclx40.lib vclmid40.lib vcldbx40.lib vcljpg40.lib +PACKAGES = vcl40.bpi bcbsmp40.bpi +# --------------------------------------------------------------------------- +PATHCPP = .; +PATHASM = .; +PATHPAS = .; +PATHRC = .; +DEBUGLIBPATH = $(BCB)\lib\debug +RELEASELIBPATH = $(BCB)\lib\release +SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES +USERDEFINES = +# --------------------------------------------------------------------------- +CFLAG1 = -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -Od \ + -Hc -H=$(BCB)\lib\vcl40.csm -w -Ve -Tkh30000 -r- -a8 -k -y -v -vi- \ + -D$(SYSDEFINES);$(USERDEFINES) -c -b- -w-par -w-inl -Vx -tWM +CFLAG2 = +CFLAG3 = +IDLCFLAGS = -I..\..\internet -I.. -I..\..\..\delphi\vc32 -I$(BCB)\include \ + -I$(BCB)\include\vcl -src_suffixcpp +PFLAGS = -U$(BCB)\Projects\Lib;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -I..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl -$YD \ + -$W -$O- -v -M -JPHNE +RFLAGS = -i..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +AFLAGS = /i..\..\internet /i..\..\DELPHI /i..\..\..\delphi\vc32 /i$(BCB)\include \ + /i$(BCB)\include\vcl /mx /w2 /zd /d_RTLDLL /dUSEPACKAGES +LFLAGS = -L$(BCB)\Projects\Lib;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib;$(RELEASELIBPATH) \ + -D"ICS components by F. Piette" -aa -Tpp -x -Gn -Gl -Gi -v +IFLAGS = +# --------------------------------------------------------------------------- +ALLOBJ = c0pkg32.obj Memmgr.Lib $(PACKAGES) sysinit.obj $(OBJFILES) +ALLRES = $(RESFILES) +ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib +# --------------------------------------------------------------------------- +!ifdef IDEOPTIONS + +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=1 +MajorVer=2 +MinorVer=0 +Release=0 +Build=6 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=2060 +CodePage=1252 + +[Version Info Keys] +CompanyName=OverByte (F. Piette) +FileDescription=ICS Components for BCB4 +FileVersion=2.0.0.6 +InternalName=IcsBcb40 +LegalCopyright=(c) 97'-'99 by F. Piette +LegalTrademarks= +OriginalFilename= +ProductName=ICS +ProductVersion=2.0.0.0 +Comments=http://www.rtfm.be/fpiette/indexuk.htm + +[Excluded Packages] +$(BCB)\Bin\dcl31w40.bpl=Delphi 1.0 Compatibility Components +$(BCB)\Bin\bcbsmp40.bpl=Borland C++ Sample Components +$(BCB)\Bin\dclint40.bpl=Borland Resource DLL Wizard +C:\WINDOWS\SYSTEM\\ibsmp40.bpl=Borland C++ InterBase Alerter Component +$(BCB)\Bin\rcexpert.bpl=Borland Resource Expert +$(BCB)\Bin\dcldb40.bpl=Borland Database Components +$(BCB)\Bin\dclqrt40.bpl=QuickReport Components +$(BCB)\Bin\mfcowlwizard.bpl=MFC/OWL Wizard +$(BCB)\Bin\dcltee40.bpl=Borland TeeChart Components +$(BCB)\Bin\dcldss40.bpl=Borland Decision Cube Components + +[HistoryLists\hlIncludePath] +Count=2 +Item0=..\..\internet;..\..\DELPHI;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl +Item1=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\include;$(BCB)\include\vcl + +[HistoryLists\hlLibraryPath] +Count=3 +Item0=$(BCB)\Projects\Lib;..\..\internet;..\..\DELPHI;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item1=..\vc32;..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib +Item2=..\..\internet;..;..\..\..\delphi\vc32;$(BCB)\lib\obj;$(BCB)\lib + +[HistoryLists\hlDebugSourcePath] +Count=1 +Item0=$(BCB)\source\vcl + +[HistoryLists\hlConditionals] +Count=1 +Item0=_RTLDLL;USEPACKAGES + +[Debugging] +DebugSourceDirs=$(BCB)\source\vcl + +[Parameters] +RunParams= +HostApplication= +RemoteHost= +RemotePath= +RemoteDebug=0 + +[Compiler] +InMemoryExe=0 +ShowInfoMsgs=0 + +[CORBA] +AddServerUnit=1 +AddClientUnit=1 +PrecompiledHeaders=1 + +!endif + +# --------------------------------------------------------------------------- +# MAKE SECTION +# --------------------------------------------------------------------------- +# This section of the project file is not used by the BCB IDE. It is for +# the benefit of building from the command-line using the MAKE utility. +# --------------------------------------------------------------------------- + +.autodepend +# --------------------------------------------------------------------------- +!if !$d(BCC32) +BCC32 = bcc32 +!endif + +!if !$d(DCC32) +DCC32 = dcc32 +!endif + +!if !$d(TASM32) +TASM32 = tasm32 +!endif + +!if !$d(LINKER) +LINKER = ilink32 +!endif + +!if !$d(BRCC32) +BRCC32 = brcc32 +!endif + +!if !$d(IDL2CPP) +IDL2CPP = idl2cpp +!endif +# --------------------------------------------------------------------------- +!if $d(PATHCPP) +.PATH.CPP = $(PATHCPP) +.PATH.C = $(PATHCPP) +!endif + +!if $d(PATHPAS) +.PATH.PAS = $(PATHPAS) +!endif + +!if $d(PATHASM) +.PATH.ASM = $(PATHASM) +!endif + +!if $d(PATHRC) +.PATH.RC = $(PATHRC) +!endif +# --------------------------------------------------------------------------- +$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE) + $(BCB)\BIN\$(LINKER) @&&! + $(LFLAGS) + + $(ALLOBJ), + + $(PROJECT),, + + $(ALLLIB), + + $(DEFFILE), + + $(ALLRES) +! +# --------------------------------------------------------------------------- +.pas.hpp: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.pas.obj: + $(BCB)\BIN\$(DCC32) $(PFLAGS) {$< } + +.cpp.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.c.obj: + $(BCB)\BIN\$(BCC32) $(CFLAG1) $(CFLAG2) $(CFLAG3) -n$(@D) {$< } + +.asm.obj: + $(BCB)\BIN\$(TASM32) $(AFLAGS) $<, $@ + +.rc.res: + $(BCB)\BIN\$(BRCC32) $(RFLAGS) -fo$@ $< +# --------------------------------------------------------------------------- diff --git a/lib/ics/Delphi/Vc32/Icsbcb40.cpp b/lib/ics/Delphi/Vc32/Icsbcb40.cpp new file mode 100644 index 00000000..4cc8fdcb --- /dev/null +++ b/lib/ics/Delphi/Vc32/Icsbcb40.cpp @@ -0,0 +1,53 @@ +//--------------------------------------------------------------------------- +#include +#pragma hdrstop +USERES("Icsbcb40.res"); +USEUNIT("WSocket.pas"); +USERES("WSocket.dcr"); +USEUNIT("httpprot.pas"); +USERES("httpprot.dcr"); +USEUNIT("ftpcli.pas"); +USERES("ftpcli.dcr"); +USEUNIT("wait.pas"); +USERES("wait.dcr"); +USEUNIT("tnscript.pas"); +USERES("tnscript.dcr"); +USEUNIT("fingcli.pas"); +USERES("fingcli.dcr"); +USEUNIT("nntpcli.pas"); +USERES("nntpcli.dcr"); +USEUNIT("ping.pas"); +USERES("ping.dcr"); +USEUNIT("tncnx.pas"); +USERES("tncnx.dcr"); +USEUNIT("tnemulvt.pas"); +USERES("tnemulvt.dcr"); +USEUNIT("emulvt.pas"); +USERES("emulvt.dcr"); +USEUNIT("FtpSrv.pas"); +USERES("FtpSrv.dcr"); +USEUNIT("SmtpProt.pas"); +USERES("SmtpProt.dcr"); +USEUNIT("wsockbuf.pas"); +USEUNIT("Pop3Prot.pas"); +USERES("Pop3Prot.dcr"); +USEUNIT("MimeDec.pas"); +USERES("MimeDec.dcr"); +USEUNIT("DnsQuery.pas"); +USERES("DnsQuery.dcr"); +USEPACKAGE("vcl40.bpi"); +USEPACKAGE("bcbsmp40.bpi"); +USEUNIT("WSocketS.pas"); +USERES("WSocketS.dcr"); +USEUNIT("HttpSrv.pas"); +USERES("HttpSrv.dcr"); +//--------------------------------------------------------------------------- +#pragma package(smart_init) +//--------------------------------------------------------------------------- +// Package source. +//--------------------------------------------------------------------------- +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/lib/ics/Delphi/Vc32/Icsbcb40.res b/lib/ics/Delphi/Vc32/Icsbcb40.res new file mode 100644 index 00000000..8af8373b Binary files /dev/null and b/lib/ics/Delphi/Vc32/Icsbcb40.res differ diff --git a/lib/ics/Delphi/Vc32/Icsdel30.res b/lib/ics/Delphi/Vc32/Icsdel30.res new file mode 100644 index 00000000..36f26e23 Binary files /dev/null and b/lib/ics/Delphi/Vc32/Icsdel30.res differ diff --git a/lib/ics/Delphi/Vc32/MD5.dcu b/lib/ics/Delphi/Vc32/MD5.dcu new file mode 100644 index 00000000..a40fa9e8 Binary files /dev/null and b/lib/ics/Delphi/Vc32/MD5.dcu differ diff --git a/lib/ics/Delphi/Vc32/MD5.pas b/lib/ics/Delphi/Vc32/MD5.pas new file mode 100644 index 00000000..03f826c3 --- /dev/null +++ b/lib/ics/Delphi/Vc32/MD5.pas @@ -0,0 +1,362 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE. Based on work given by Louis S. Berman from + BrainTree Ltd, lsb@braintree.com +Description: MD5 is an implmentation for the MD5 Message-Digest Algorithm + as described in RFC-1321 +Creation: October 11, 1997 +Version: 1.03 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Oct 26, 1997 Changed MD5Final form function to procedure to be compatible + with C++Builder. +Jul 09, 1998 V1.01 Adapted for Delphi 4 +Aug 06, 1998 V1.02 Added R- Q- directive +Jun 05, 1999 V1.03 Wolfgang Klein found a bug in MD5Update. + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MD5; + +interface + +uses + SysUtils; + +const + MD5Version = 102; + CopyRight : String = ' MD5 Message-Digest (c) 97-98 F. Piette V1.02 '; + +{$Q-} +{$R-} + +type + TMD5Context = record + State: array[0..3] of LongInt; + Count: array[0..1] of LongInt; + case Integer of + 0: (BufChar: array[0..63] of Byte); + 1: (BufLong: array[0..15] of LongInt); + end; + TMD5Digest = array[0..15] of Char; + +procedure MD5Init(var MD5Context: TMD5Context); +procedure MD5Update(var MD5Context: TMD5Context; + const Data; + Len: Integer); +procedure MD5Transform(var Buf: array of LongInt; + const Data: array of LongInt); +procedure MD5UpdateBuffer(var MD5Context: TMD5Context; + Buffer: Pointer; + BufSize: Integer); +procedure MD5Final(var Digest: TMD5Digest; var MD5Context: TMD5Context); + +function GetMD5(Buffer: Pointer; BufSize: Integer): string; +function StrMD5(Buffer : String): string; + +implementation + +const + MaxBufSize = 16384; + +type + PMD5Buffer = ^TMD5Buffer; + TMD5Buffer = array[0..(MaxBufSize - 1)] of Char; + + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 initialization. Begins an MD5 operation, writing a new context. } +procedure MD5Init(var MD5Context: TMD5Context); +begin + FillChar(MD5Context, SizeOf(TMD5Context), #0); + with MD5Context do begin + { Load magic initialization constants. } + State[0] := LongInt($67452301); + State[1] := LongInt($EFCDAB89); + State[2] := LongInt($98BADCFE); + State[3] := LongInt($10325476); + end +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 block update operation. Continues an MD5 message-digest operation, } +{ processing another message block, and updating the context. } +procedure MD5Update( + var MD5Context: TMD5Context; { Context } + const Data; { Input block } + Len: Integer); { Length of input block } +type + TByteArray = array[0..0] of Byte; +var + Index: Word; + T: LongInt; +begin + with MD5Context do begin + T := Count[0]; + Inc(Count[0], LongInt(Len) shl 3); + if Count[0] < T then + Inc(Count[1]); + Inc(Count[1], Len shr 29); + T := (T shr 3) and $3F; + Index := 0; + if T <> 0 then begin + Index := T; + T := 64 - T; + if Len < T then begin + Move(Data, BufChar[Index], Len); + Exit; + end; + Move(Data, BufChar[Index], T); + MD5Transform(State, BufLong); + Dec(Len, T); + Index := T; { Wolfgang Klein, 05/06/99 } + end; + while Len >= 64 do begin + Move(TByteArray(Data)[Index], BufChar, 64); + MD5Transform(State, BufLong); + Inc(Index, 64); + Dec(Len, 64); + end; + Move(TByteArray(Data)[Index], BufChar, Len); + end +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 finalization. Ends an MD5 message-digest operation, writing the message } +{ digest and zeroizing the context. } +procedure MD5Final(var Digest: TMD5Digest; var MD5Context: TMD5Context); +var + Cnt : Word; + P : Byte; +begin + with MD5Context do begin + Cnt := (Count[0] shr 3) and $3F; + P := Cnt; + BufChar[P] := $80; + Inc(P); + Cnt := 64 - 1 - Cnt; + if Cnt < 8 then begin + FillChar(BufChar[P], Cnt, #0); + MD5Transform(State, BufLong); + FillChar(BufChar, 56, #0); + end + else + FillChar(BufChar[P], Cnt - 8, #0); + BufLong[14] := Count[0]; + BufLong[15] := Count[1]; + MD5Transform(State, BufLong); + Move(State, Digest, 16) + end; + FillChar(MD5Context, SizeOf(TMD5Context), #0) +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 basic transformation. Transforms state based on block. } +procedure MD5Transform( + var Buf: array of LongInt; + const Data: array of LongInt); +var + A, B, C, D: LongInt; + + procedure Round1(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (Z xor (X and (Y xor Z))) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; + + procedure Round2(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (Y xor (Z and (X xor Y))) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; + + procedure Round3(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (X xor Y xor Z) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; + + procedure Round4(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (Y xor (X or not Z)) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; +begin + A := Buf[0]; + B := Buf[1]; + C := Buf[2]; + D := Buf[3]; + + Round1(A, B, C, D, Data[ 0] + LongInt($d76aa478), 7); + Round1(D, A, B, C, Data[ 1] + LongInt($e8c7b756), 12); + Round1(C, D, A, B, Data[ 2] + LongInt($242070db), 17); + Round1(B, C, D, A, Data[ 3] + LongInt($c1bdceee), 22); + Round1(A, B, C, D, Data[ 4] + LongInt($f57c0faf), 7); + Round1(D, A, B, C, Data[ 5] + LongInt($4787c62a), 12); + Round1(C, D, A, B, Data[ 6] + LongInt($a8304613), 17); + Round1(B, C, D, A, Data[ 7] + LongInt($fd469501), 22); + Round1(A, B, C, D, Data[ 8] + LongInt($698098d8), 7); + Round1(D, A, B, C, Data[ 9] + LongInt($8b44f7af), 12); + Round1(C, D, A, B, Data[10] + LongInt($ffff5bb1), 17); + Round1(B, C, D, A, Data[11] + LongInt($895cd7be), 22); + Round1(A, B, C, D, Data[12] + LongInt($6b901122), 7); + Round1(D, A, B, C, Data[13] + LongInt($fd987193), 12); + Round1(C, D, A, B, Data[14] + LongInt($a679438e), 17); + Round1(B, C, D, A, Data[15] + LongInt($49b40821), 22); + + Round2(A, B, C, D, Data[ 1] + LongInt($f61e2562), 5); + Round2(D, A, B, C, Data[ 6] + LongInt($c040b340), 9); + Round2(C, D, A, B, Data[11] + LongInt($265e5a51), 14); + Round2(B, C, D, A, Data[ 0] + LongInt($e9b6c7aa), 20); + Round2(A, B, C, D, Data[ 5] + LongInt($d62f105d), 5); + Round2(D, A, B, C, Data[10] + LongInt($02441453), 9); + Round2(C, D, A, B, Data[15] + LongInt($d8a1e681), 14); + Round2(B, C, D, A, Data[ 4] + LongInt($e7d3fbc8), 20); + Round2(A, B, C, D, Data[ 9] + LongInt($21e1cde6), 5); + Round2(D, A, B, C, Data[14] + LongInt($c33707d6), 9); + Round2(C, D, A, B, Data[ 3] + LongInt($f4d50d87), 14); + Round2(B, C, D, A, Data[ 8] + LongInt($455a14ed), 20); + Round2(A, B, C, D, Data[13] + LongInt($a9e3e905), 5); + Round2(D, A, B, C, Data[ 2] + LongInt($fcefa3f8), 9); + Round2(C, D, A, B, Data[ 7] + LongInt($676f02d9), 14); + Round2(B, C, D, A, Data[12] + LongInt($8d2a4c8a), 20); + + Round3(A, B, C, D, Data[ 5] + LongInt($fffa3942), 4); + Round3(D, A, B, C, Data[ 8] + LongInt($8771f681), 11); + Round3(C, D, A, B, Data[11] + LongInt($6d9d6122), 16); + Round3(B, C, D, A, Data[14] + LongInt($fde5380c), 23); + Round3(A, B, C, D, Data[ 1] + LongInt($a4beea44), 4); + Round3(D, A, B, C, Data[ 4] + LongInt($4bdecfa9), 11); + Round3(C, D, A, B, Data[ 7] + LongInt($f6bb4b60), 16); + Round3(B, C, D, A, Data[10] + LongInt($bebfbc70), 23); + Round3(A, B, C, D, Data[13] + LongInt($289b7ec6), 4); + Round3(D, A, B, C, Data[ 0] + LongInt($eaa127fa), 11); + Round3(C, D, A, B, Data[ 3] + LongInt($d4ef3085), 16); + Round3(B, C, D, A, Data[ 6] + LongInt($04881d05), 23); + Round3(A, B, C, D, Data[ 9] + LongInt($d9d4d039), 4); + Round3(D, A, B, C, Data[12] + LongInt($e6db99e5), 11); + Round3(C, D, A, B, Data[15] + LongInt($1fa27cf8), 16); + Round3(B, C, D, A, Data[ 2] + LongInt($c4ac5665), 23); + + Round4(A, B, C, D, Data[ 0] + LongInt($f4292244), 6); + Round4(D, A, B, C, Data[ 7] + LongInt($432aff97), 10); + Round4(C, D, A, B, Data[14] + LongInt($ab9423a7), 15); + Round4(B, C, D, A, Data[ 5] + LongInt($fc93a039), 21); + Round4(A, B, C, D, Data[12] + LongInt($655b59c3), 6); + Round4(D, A, B, C, Data[ 3] + LongInt($8f0ccc92), 10); + Round4(C, D, A, B, Data[10] + LongInt($ffeff47d), 15); + Round4(B, C, D, A, Data[ 1] + LongInt($85845dd1), 21); + Round4(A, B, C, D, Data[ 8] + LongInt($6fa87e4f), 6); + Round4(D, A, B, C, Data[15] + LongInt($fe2ce6e0), 10); + Round4(C, D, A, B, Data[ 6] + LongInt($a3014314), 15); + Round4(B, C, D, A, Data[13] + LongInt($4e0811a1), 21); + Round4(A, B, C, D, Data[ 4] + LongInt($f7537e82), 6); + Round4(D, A, B, C, Data[11] + LongInt($bd3af235), 10); + Round4(C, D, A, B, Data[ 2] + LongInt($2ad7d2bb), 15); + Round4(B, C, D, A, Data[ 9] + LongInt($eb86d391), 21); + + Inc(Buf[0], A); + Inc(Buf[1], B); + Inc(Buf[2], C); + Inc(Buf[3], D); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure MD5UpdateBuffer( + var MD5Context: TMD5Context; + Buffer: Pointer; + BufSize: Integer); +var + BufTmp : PMD5Buffer; + BufPtr : PChar; + Bytes : Word; +begin + New(BufTmp); + BufPtr := Buffer; + try + repeat + if BufSize > MaxBufSize then + Bytes := MaxBufSize + else + Bytes := BufSize; + Move(BufPtr^, BufTmp^, Bytes); + Inc(BufPtr, Bytes); + Dec(BufSize, Bytes); + if Bytes > 0 then + MD5Update(MD5Context, BufTmp^, Bytes); + until Bytes < MaxBufSize; + finally + Dispose(BufTmp); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetMD5(Buffer: Pointer; BufSize: Integer): string; +var + I : Integer; + MD5Digest : TMD5Digest; + MD5Context : TMD5Context; +begin + for I := 0 to 15 do + Byte(MD5Digest[I]) := I + 1; + MD5Init(MD5Context); + MD5UpdateBuffer(MD5Context, Buffer, BufSize); + MD5Final(MD5Digest, MD5Context); + Result := ''; + for I := 0 to 15 do + Result := Result + IntToHex(Byte(MD5Digest[I]), 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function StrMD5(Buffer : String): string; +begin + Result := GetMD5(@Buffer[1], Length(Buffer)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/MbxFile.dcr b/lib/ics/Delphi/Vc32/MbxFile.dcr new file mode 100644 index 00000000..f4f484fe Binary files /dev/null and b/lib/ics/Delphi/Vc32/MbxFile.dcr differ diff --git a/lib/ics/Delphi/Vc32/MbxFile.dcu b/lib/ics/Delphi/Vc32/MbxFile.dcu new file mode 100644 index 00000000..0173bacf Binary files /dev/null and b/lib/ics/Delphi/Vc32/MbxFile.dcu differ diff --git a/lib/ics/Delphi/Vc32/MbxFile.pas b/lib/ics/Delphi/Vc32/MbxFile.pas new file mode 100644 index 00000000..8ff14f44 --- /dev/null +++ b/lib/ics/Delphi/Vc32/MbxFile.pas @@ -0,0 +1,355 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TMbxFile handle the MBX file format (read only) + The MBX file format is used by Microsoft Internet Mail. +Warning: This component is based on my interpretation of the MBX file + format. I did'nt find any info about it. So there may be errors ! + Currently, no provision is made for deleted messages. + If you find a problem, please EMail me a description and attach + the MBX file in error. +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Creation: November 16, 1997 +Version: 1.00 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MbxFile; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, ExtCtrls; + +const + MbxFileVersion = 100; + MSG_SIGNATURE = $7F007F00; + +type + TMbxHeader = packed record + Signature : array [0..3] of char; + Reserved1 : Word; + Reserved2 : Word; + MsgCount : LongInt; + Reserved3 : LongInt; { A MsgCount copy ? } + EndPointer : LongInt; + Reserved4 : array [0..15] of LongInt; + end; + + TMsgHeader = packed record + Signature : LongInt; { $7F007F00 } + MsgNum : LongInt; + MsgSize : LongInt; + Reserved1 : LongInt; + end; + + TCustomMbxHandler = class(TComponent) + protected + FFileHdr : TMbxHeader; + FFileName : String; + FFileStream : TFileStream; + FMsgHeader : TMsgHeader; + FMsgStream : TMemoryStream; + FMsgStreamSize : Integer; + FCurPos : LongInt; + procedure InternalPrior; + procedure ReadNextMessage; + procedure SetActive(newValue : Boolean); + function GetActive : Boolean; + function GetMsgCount : Integer; + function GetMsgNum : Integer; + function GetEof : Boolean; + function GetBof : Boolean; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Open; + procedure Close; + procedure First; + procedure Next; + procedure Prior; + procedure Last; + property FileName : String read FFileName write FFileName; + property Active : Boolean read GetActive write SetActive; + property MsgCount : Integer read GetMsgCount; + property MsgNum : Integer read GetMsgNum; + property MsgStream : TMemoryStream read FMsgStream; + property Eof : Boolean read GetEof; + property Bof : Boolean read GetBof; + end; + + TMbxHandler = class(TCustomMbxHandler) + published + property FileName : String read FFileName write FFileName; + property Active : Boolean read GetActive write SetActive; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TMbxHandler]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomMbxHandler.Create(AOwner : TComponent); +begin + Inherited Create(AOwner); + FMsgStreamSize := 4096; + FMsgStream := TMemoryStream.Create; + FMsgStream.SetSize(FMsgStreamSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomMbxHandler.Destroy; +begin + Close; + FMsgStream.Free; + FMsgStreamSize := 0; + Inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.Open; +begin + Close; + FFileStream := TFileStream.Create(FFileName, fmOpenRead + fmShareDenyNone); + FFileStream.Read(FFileHdr, SizeOf(FFileHdr)); + if FFileHdr.Signature <> 'JMF6' then begin + Close; + raise Exception.Create('Not an EMail file'); + end; + + if MsgCount <= 0 then + Exit; + ReadNextMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.Close; +begin + if Assigned(FFileStream) then begin + FFileStream.Free; + FFileStream := nil; + end;; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.First; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + if MsgCount <= 0 then + Exit; + FFileStream.Position := SizeOf(TMbxHeader); + ReadNextMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.Last; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + if MsgCount <= 0 then + Exit; + FCurPos := FFileStream.Seek(0, soFromEnd); + InternalPrior; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.Next; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + + if Eof then + raise Exception.Create('No more message'); + + ReadNextMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.Prior; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + + if Bof then + raise Exception.Create('No more message'); + InternalPrior; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.ReadNextMessage; +begin + FCurPos := FFileStream.Position; + FFileStream.Read(FMsgHeader, SizeOf(FMsgHeader)); + if FMsgHeader.Signature <> MSG_SIGNATURE then begin + Close; + raise Exception.Create('Invalid signature in message header'); + end; + if FMsgStreamSize <= FMsgHeader.MsgSize then begin + FMsgStreamSize := (((FMsgHeader.MsgSize + 1) div 4096) + 1) * 4096; + FMsgStream.SetSize(FMsgStreamSize); + end; + FMsgStream.Seek(0, soFromBeginning); + FFileStream.Read(FMsgStream.Memory^, FMsgHeader.MsgSize - 16); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.SetActive(newValue : Boolean); +begin + if newValue = Assigned(FFileStream) then + Exit; + if newValue then + Open + else + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomMbxHandler.GetActive : Boolean; +begin + Result := Assigned(FFileStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomMbxHandler.GetMsgCount : Integer; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + Result := FFileHdr.MsgCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomMbxHandler.GetMsgNum : Integer; +begin + if not Assigned(FFileStream) then + raise Exception.Create('Message file not opened'); + Result := FMsgHeader.MsgNum; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomMbxHandler.GetEof : Boolean; +begin + Result := (not Assigned(FFileStream)) or + (MsgCount <= 0) or (MsgNum >= MsgCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomMbxHandler.GetBof : Boolean; +begin + Result := (not Assigned(FFileStream)) or + (MsgCount <= 0) or (MsgNum <= 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomMbxHandler.InternalPrior; +var + NewPos : LongInt; + Buf : PChar; + p : PChar; + More : Boolean; + Sign : LongInt; + Cnt : Integer; +begin + Buf := FMsgStream.Memory; + + Cnt := 4096; + NewPos := FCurPos - Cnt; + More := TRUE; + while More do begin + if NewPos < SizeOf(TMbxHeader) then begin + Cnt := Cnt - SizeOf(TMbxHeader) + NewPos; + NewPos := SizeOf(TMbxHeader); + end; + FFileStream.Position := NewPos; + FFileStream.Read(Buf^, Cnt); + p := Buf + Cnt - 1; + while (p > Buf) do begin + while (p >= Buf) and (p^ <> #$7F) do + Dec(p); + if p^ = #$7F then begin + FFileStream.Position := NewPos + p - Buf - 3; + FFileStream.Read(Sign, SizeOf(Sign)); + if Sign = MSG_SIGNATURE then begin + NewPos := NewPos + p - Buf - 3; + More := FALSE; + Break; + end; + end; + Dec(p); + end; + + if not More then + Break; + + if NewPos <= SizeOf(TMbxHeader) then + break; + + Cnt := 4096; + NewPos := NewPos - Cnt; + end; + FFileStream.Position := NewPos; + ReadNextMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/NntpCli.dcu b/lib/ics/Delphi/Vc32/NntpCli.dcu new file mode 100644 index 00000000..486d3fc3 Binary files /dev/null and b/lib/ics/Delphi/Vc32/NntpCli.dcu differ diff --git a/lib/ics/Delphi/Vc32/NntpCli.pas b/lib/ics/Delphi/Vc32/NntpCli.pas new file mode 100644 index 00000000..c5cc3c14 --- /dev/null +++ b/lib/ics/Delphi/Vc32/NntpCli.pas @@ -0,0 +1,1414 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TNntpCli is a client for the NNTP protocol (RFC-977) +Creation: December 19, 1997 +Version: 1.12 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Dec 30, 1997 V0.91 Bug: StatusCode was not updated for Connect + Added PostingPermited property and ParseListLine procedure as + suggested by J. Peter Mugaas +Dec 31, 1997 V0.92 Added XOVER, LIST OVERVIEW.FMT and DATE commands +Jan 10, 1998 V0.93 Added OnStateChange event as suggested by J. Peter Mugaas + +Jan 13, 1998 V0.94 Added readonly property State +Feb 02, 1998 V0.95 Corrected a message in the Quit method. + Added the NntpCliVersion constant. +Feb 03, 1998 V0.96 Added Authenticate method, UserName and PassWord properties. +Apr 13, 1998 V1.00 Added an intermediate message for OnRequestDone event + Created the Handle property and related WndProc stuff +Apr 21, 1998 V1.01 Corrected buffer overflow in the OnDataAvailable event. + Thanks to Tim Skinner tim@palacecs.demon.co.uk who found that bug. +Sep 29, 1998 V1.02 Checked length of FLastResponse before writing it to stream. + Thanks to Michael Bartos for the hint. +Feb 01, 1999 V1.03 Added nntpConnect to solve connection problem after an + abort. Thanks to Eric Fortier . +Feb 27, 1999 V1.04 Made Connect, Abort and Quit method virtual so that they + can be overriden in descending components. + Checked line length in ParseListLine. +Mar 31, 1999 V1.05 Made all methods virtual. +Aug 14, 1999 V1.06 Implemented MODE READER and XHDR +Aug 20, 1999 V1.07 Revised conditional compilation, adapted for BCB4, set + compile options same as TWSocket. +Jun 18, 2001 V1.08 Use AllocateHWnd and DeallocateHWnd from wsocket. + Renamed property WSocket to CtrlSocket (this require code change + in user application too). +Sep 28, 2002 V1.09 Arnaud SUBTIL changed + WSocketDataAvailable so that it doesn't fail when a line is + longer than the receive buffer. +Oct 26, 2002 V1.10 Fixed double dot problem in GetArticleLineNext. + Thanks to Steve Blinch who found it. + Use TWSocket LineMode to avoid line length limit. + Introduced LineLimit to allow user to limit max line (accepting + unlimited lines can result in a Denial Of Service security hole. +Nov 02, 2002 V1.11 Added OnSendData event, OnRcvdData event, SendCount property + and RcvdCount property to easy progress bar update. +Nov 11, 2002 V1.12 Revised for Delphi 1 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit NntpCli; + +{.DEFINE DUMP} + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$Q-} { Disqble overflow checking } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER130} { C++ Builder V5.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER140} { C++ Builder V6.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, WinProcs, SysUtils, Messages, Classes, Forms, WinSock, WSocket; + +const + NntpCliVersion = 1.12; + CopyRight : String = ' TNntpCli (c) 1997-2002 F. Piette V1.12 '; +{$IFDEF VER80} + { Delphi 1 has a 255 characters string limitation } + NNTP_SND_BUF_SIZE = 255; +{$ELSE} + NNTP_SND_BUF_SIZE = 4096; +{$ENDIF} + WM_NNTP_REQUEST_DONE = WM_USER + 1; + +type + TNntpDisplay = procedure(Sender: TObject; Msg : PChar; Len : Integer) of object; + TNntpState = (nntpNotConnected, nntpDnsLookup, nntpWaitingBanner, + nntpReady, nntpWaitingResponse); + TNntpRequest = (nntpGroup, nntpList, nntpConnect, + nntpPost, nntpHelp, + nntpNewGroups, nntpNewNews, + nntpArticleByNumber, nntpArticleByID, + nntpBodyByID, nntpBodyByNumber, + nntpHeadByID, nntpHeadByNumber, + nntpStatByID, nntpStatByNumber, + nntpNext, nntpLast, + nntpQuit, nntpAbort, + nntpXOver, nntpListOverViewFmt, + nntpDate, nntpAuthenticate, + nntpModeReader, nntpXHdr); + TRequestDone = procedure(Sender: TObject; RqType: TNntpRequest; Error: Word) of object; + + NntpException = class(Exception); + + TNntpCli = class(TComponent) + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Connect; virtual; + procedure Abort; virtual; + procedure Quit; virtual; + procedure Group(NewsGroupName : String); virtual; + procedure ArticleByNumber(Number : Integer; DestStream : TStream); virtual; + procedure ArticleByID(ID : String; DestStream : TStream); virtual; + procedure HeadByNumber(Number : Integer; DestStream : TStream); virtual; + procedure HeadByID(ID : String; DestStream : TStream); virtual; + procedure BodyByNumber(Number : Integer; DestStream : TStream); virtual; + procedure BodyByID(ID : String; DestStream : TStream); virtual; + procedure StatByNumber(Number : Integer); virtual; + procedure StatByID(ID : String); virtual; + procedure Next; virtual; + procedure Last; virtual; { It is really Prior, but RFC-977 call it Last !} + procedure List(DestStream : TStream); virtual; + procedure Post(FromStream : TStream); virtual; + procedure Help(DestStream : TStream); virtual; + procedure Authenticate; virtual; + procedure XOver(Articles : String; DestStream : TStream); virtual; + procedure ListOverViewFmt(DestStream : TStream); virtual; + procedure Date; virtual; + procedure ModeReader; virtual; + procedure XHdr(DestStream : TStream; + Header : String; + Range : String); virtual; + procedure NewGroups(When : TDateTime; + GMTFLag : Boolean; + Distributions : String; + DestStream : TStream); virtual; + procedure NewNews(When : TDateTime; + GMTFLag : Boolean; + NewsGroupName : String; + Distributions : String; + DestStream : TStream); virtual; + protected + FWindowHandle : HWND; +{$IFDEF DUMP} + FDumpStream : TFileStream; + FDumpBuf : String; +{$ENDIF} + FHost : String; + FState : TNntpState; + FWSocket : TWSocket; + FRequest : String; + FRequestType : TNntpRequest; + FRequestDoneFlag : Boolean; + FSentFlag : Boolean; + FStatusCode : Integer; + FSendCount : Integer; { Count sent bytes } + FRcvdCount : Integer; { Count received bytes } + FSendBuffer : array [0..NNTP_SND_BUF_SIZE - 1] of char; + FLastResponse : String; + FLastCmdResponse : String; + FErrorMessage : String; + FArticleEstimated : Integer; + FArticleFirst : Integer; + FArticleLast : Integer; + FArticleNumber : Integer; + FArticleID : String; + FServerDate : TDateTime; + FDataStream : TStream; + FUserName : String; + FPassWord : String; + FLineLimit : Integer; + FNext : procedure of object; + FPostingPermited : Boolean; + FOnSessionConnected : TSessionConnected; + FOnSessionClosed : TSessionClosed; + FOnDataAvailable : TDataAvailable; + FOnRequestDone : TRequestDone; + FOnDisplay : TNntpDisplay; + FOnMessageBegin : TNotifyEvent; + FOnMessageEnd : TNotifyEvent; + FOnMessageLine : TNotifyEvent; + FOnXHdrBegin : TNotifyEvent; + FOnXHdrEnd : TNotifyEvent; + FOnXHdrLine : TNotifyEvent; + FOnStateChange : TNotifyEvent; + FOnSendData : TNotifyEvent; + FOnRcvdData : TNotifyEvent; + procedure SetLineLimit(NewValue : Integer); + procedure WndProc(var MsgRec: TMessage); + procedure WMNntpRequestDone(var msg: TMessage); message WM_NNTP_REQUEST_DONE; + procedure WSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure WSocketSessionConnected(Sender: TObject; Error: Word); + procedure WSocketDataAvailable(Sender: TObject; Error: Word); + procedure WSocketSessionClosed(Sender: TObject; Error: Word); + procedure WSocketDataSent(Sender: TObject; Error: Word); + procedure TriggerRequestDone(Error: Word); virtual; + procedure TriggerStateChange; virtual; + procedure StateChange(NewState : TNntpState); virtual; + procedure SendRequest; virtual; + procedure GroupNext; virtual; + procedure QuitNext; virtual; + procedure XHdrLineNext; virtual; + procedure GetArticleNext; virtual; + procedure GetArticleLineNext; virtual; + procedure GetArticleByNumber(RqType: TNntpRequest; Number : Integer; DestStream : TStream); virtual; + procedure GetArticleByID(RqType: TNntpRequest; ID : String; DestStream : TStream); virtual; + procedure GetArticle(RqType: TNntpRequest; ID : String; DestStream : TStream); virtual; + procedure PostNext; virtual; + procedure PostDone; virtual; + procedure PostBlock; virtual; + procedure PostSendNext; virtual; + procedure DateNext; virtual; + procedure ModeReaderNext; virtual; + procedure XHdrNext; virtual; + procedure AuthenticateNext1; virtual; + procedure AuthenticateNext2; virtual; + procedure TriggerSendData; virtual; + procedure TriggerRcvdData; virtual; + property Handle : HWND read FWindowHandle; + property SendCount : Integer read FSendCount + write FSendCount; + property RcvdCount : Integer read FRcvdCount + write FRcvdCount; + published + property CtrlSocket : TWSocket read FWSocket; + property State : TNntpState read FState; + property Host : String read FHost + write FHost; + property ErrorMessage : String read FErrorMessage; + property LastResponse : String read FLastResponse; + property StatusCode : Integer read FStatusCode; + property PostingPermited : Boolean read FPostingPermited; + property ArticleEstimated : Integer read FArticleEstimated; + property ArticleFirst : Integer read FArticleFirst; + property ArticleLast : Integer read FArticleLast; + property ArticleNumber : Integer read FArticleNumber; + property ArticleID : String read FArticleID; + property ServerDate : TDateTime read FServerDate; + property UserName : String read FUserName + write FUserName; + property PassWord : String read FPassWord + write FPassWord; + property LineLimit : Integer read FLineLimit + write SetLineLimit; + property OnSessionConnected : TSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnDataAvailable : TDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnRequestDone : TRequestDone read FOnRequestDone + write FOnRequestDone; + property OnDisplay : TNntpDisplay read FOnDisplay + write FOnDisplay; + property OnMessageBegin : TNotifyEvent read FOnMessageBegin + write FOnMessageBegin; + property OnMessageEnd : TNotifyEvent read FOnMessageEnd + write FOnMessageEnd; + property OnMessageLine : TNotifyEvent read FOnMessageLine + write FOnMessageLine; + property OnXHdrBegin : TNotifyEvent read FOnXHdrBegin + write FOnXHdrBegin; + property OnXHdrEnd : TNotifyEvent read FOnXHdrEnd + write FOnXHdrEnd; + property OnXHdrLine : TNotifyEvent read FOnXHdrLine + write FOnXHdrLine; + property OnStateChange : TNotifyEvent read FOnStateChange + write FOnStateChange; + { Event intended for progress bar update (send) } + property OnSendData : TNotifyEvent read FOnSendData + write FOnSendData; + { Event intended for progress bar update (receive) } + property OnRcvdData : TNotifyEvent read FOnRcvdData + write FOnRcvdData; + end; + +procedure ParseListLine(const Line : String; + var NewsGroupName : String; + var LastArticle : Integer; + var FirstArticle : Integer; + var PostingFlag : Char); +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Step over blank spaces } +function StpBlk(Data : PChar) : PChar; +begin + Result := Data; + if Result <> nil then begin + while (Result^ <> #0) and (Result^ in [' ', #9, #13, #10]) do + Inc(Result); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetInteger(Data : PChar; var Number : Integer) : PChar; +var + bSign : Boolean; +begin + Number := 0; + Result := StpBlk(Data); + + if (Result = nil) then + Exit; + + { Remember the sign } + if Result^ in ['-', '+'] then begin + bSign := (Result^ = '-'); + Inc(Result); + end + else + bSign := FALSE; + + { Convert any number } + while (Result^ <> #0) and (Result^ in ['0'..'9']) do begin + Number := Number * 10 + ord(Result^) - ord('0'); + Inc(Result); + end; + + { Correct for sign } + if bSign then + Number := -Number; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetMessageID(Data : PChar; var ID : String) : PChar; +begin + ID := ''; + Result := StpBlk(Data); + if Data = nil then + Exit; + + while not (Result^ in [#0, '<']) do + Inc(Result); + if Result^ = '<' then begin + while Result^ <> #0 do begin + Inc(Result); + if Result^ = '>' then + break; + ID := ID + Result^; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetNewsGroupName(Data : PChar; var GroupName : String) : PChar; +begin + GroupName := ''; + Result := StpBlk(Data); + if Data = nil then + Exit; + + { Copy until first white space } + while (Result^ <> #0) and (not (Result^ in [' ', #9])) do begin + GroupName := GroupName + Result^; + Inc(Result); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetChar(Data : PChar; var Ch : Char) : PChar; +begin + Ch := #0; + Result := StpBlk(Data); + if Data = nil then + Exit; + + Ch := Result^; + if Ch <> #0 then + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(Data : String) : Integer; +begin +{$IFDEF VER80} + { Nul terminate string for Delphi 1 } + Data[Length(Data) + 1] := #0; +{$ENDIF} + GetInteger(@Data[1], Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TNntpCli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TNntpCli.Create(AOwner: TComponent); +begin + inherited Create(AOwner); +{$IFDEF DUMP} + FDumpStream := TFileStream.Create('c:\temp\nntpcli.log', fmCreate); + FDumpBuf := '---- START -----' + #13 + #10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} + FWindowHandle := WSocket.AllocateHWnd(WndProc); + FState := nntpNotConnected; + FArticleNumber := -1; + FArticleID := ''; + FArticleFirst := -1; + FArticleLast := -1; + FArticleEstimated := -1; + FStatusCode := 503; { program fault } +{$IFDEF VER80} + FLineLimit := 255; +{$ELSE} + FLineLimit := 65536; +{$ENDIF} + FWSocket := TWSocket.Create(Self); + FWSocket.LineMode := TRUE; + FWSocket.LineEnd := #13#10; + FWSocket.LineLimit := FLineLimit; + FWSocket.ComponentOptions := FWSocket.ComponentOptions + [wsoNoReceiveLoop]; + FWSocket.OnSessionConnected := WSocketSessionConnected; + FWSocket.OnDataAvailable := WSocketDataAvailable; + FWSocket.OnSessionClosed := WSocketSessionClosed; + FWSocket.OnDnsLookupDone := WSocketDnsLookupDone; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TNntpCli.Destroy; +begin +{$IFDEF DUMP} + if Assigned(FDumpStream) then begin + FDumpBuf := '---- STOP -----' + #13 + #10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.Destroy; + end; +{$ENDIF} + if Assigned(FWSocket) then + FWSocket.Destroy; + WSocket.DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.SetLineLimit(NewValue: Integer); +begin + if FLineLimit <> NewValue then begin + FLineLimit := NewValue; + FWSocket.LineLimit := FLineLimit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + case Msg of + WM_NNTP_REQUEST_DONE : WMNntpRequestDone(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WMNntpRequestDone(var msg: TMessage); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, TNntpRequest(Msg.WParam), Msg.LParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.StateChange(NewState : TNntpState); +begin + if FState <> NewState then begin + FState := NewState; + TriggerStateChange; + end; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.SendRequest; +begin + FLastCmdResponse := ''; +{$IFDEF DUMP} + FDumpBuf := '<|'; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.WriteBuffer(FRequest[1], Length(FRequest)); + FDumpBuf := '|' + #13#10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} + FWSocket.SendStr(FRequest + #13 + #10); + FSendCount := (FSendCount + Length(FRequest) + 2) and $7FFFFFF; + TriggerSendData; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Connect; +begin + if FState <> nntpNotConnected then + raise NntpException.Create('Already connected'); + + FRequestType := nntpConnect; + FRequestDoneFlag := FALSE; + FRequest := ''; + FArticleNumber := -1; + FArticleID := ''; + FArticleFirst := -1; + FArticleLast := -1; + FArticleEstimated := -1; + StateChange(nntpDnsLookup); + FWSocket.DnsLookup(FHost); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Group(NewsGroupName : String); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for GROUP'); + + FRequestDoneFlag := FALSE; + FRequestType := nntpGroup; + FRequest := 'GROUP ' + Trim(NewsGroupName); + FNext := GroupNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GroupNext; +var + Data : PChar; + Error : Integer; +begin + Data := GetInteger(@FLastResponse[1], FStatusCode); + Data := GetInteger(Data, FArticleEstimated); + Data := GetInteger(Data, FArticleFirst); + GetInteger(Data, FArticleLast); + if FStatusCode = 211 then + Error := 0 + else + Error := FStatusCode; + TriggerRequestDone(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.ArticleByNumber(Number : Integer; DestStream : TStream); +begin + GetArticleByNumber(nntpArticleByNumber, Number, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.ArticleByID(ID : String; DestStream : TStream); +begin + GetArticleByID(nntpArticleByID, ID, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.BodyByNumber(Number : Integer; DestStream : TStream); +begin + GetArticleByNumber(nntpBodyByNumber, Number, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.BodyByID(ID : String; DestStream : TStream); +begin + GetArticleByID(nntpBodyByID, ID, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.HeadByNumber(Number : Integer; DestStream : TStream); +begin + GetArticleByNumber(nntpHeadByNumber, Number, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.HeadByID(ID : String; DestStream : TStream); +begin + GetArticleByID(nntpHeadByID, ID, DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.StatByNumber(Number : Integer); +begin + GetArticleByNumber(nntpStatByNumber, Number, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.StatByID(ID : String); +begin + GetArticleByID(nntpStatByID, ID, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GetArticleByID( + RqType : TNntpRequest; + ID : String; + DestStream : TStream); +begin + GetArticle(RqType, ' <' + ID + '>', DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GetArticleByNumber( + RqType : TNntpRequest; + Number : Integer; + DestStream : TStream); +begin + if Number > 0 then + GetArticle(RqType, ' ' + IntToStr(Number), DestStream) + else + GetArticle(RqType, '', DestStream); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GetArticle( + RqType : TNntpRequest; + ID : String; + DestStream : TStream); +var + Cmd : String; +begin + case RqType of + nntpArticleByID, nntpArticleByNumber: + Cmd := 'ARTICLE'; + nntpBodyByID, nntpBodyByNumber: + Cmd := 'BODY'; + nntpHeadByID, nntpHeadByNumber: + Cmd := 'HEAD'; + nntpStatByID, nntpStatByNumber: + Cmd := 'STAT'; + else + raise NntpException.Create('Internal error: Invalid Request Type'); + end; + + if FState <> nntpReady then + raise NntpException.Create('Not ready for ' + Cmd); + FDataStream := DestStream; + FRequestType := RqType; + FRequestDoneFlag := FALSE; + FArticleNumber := -1; + FArticleID := ''; + FRequest := Cmd + ID; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GetArticleNext; +var + Data : PChar; +begin + Data := GetInteger(@FLastResponse[1], FStatusCode); + if not (FStatusCode in [100, 215, 220, 221, + 222, 223, 224, 231]) then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + + Data := GetInteger(Data, FArticleNumber); + GetMessageID(Data, FArticleID); + + if FStatusCode in [223] then + TriggerRequestDone(0) + else begin + FNext := GetArticleLineNext; + FLastCmdResponse := FLastResponse;; + StateChange(nntpWaitingResponse); + + if Assigned(FOnMessageBegin) then + FOnMessageBegin(Self); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.GetArticleLineNext; +const + CrLf : String[2] = #13#10; +begin + if FLastResponse = '.' then begin + if FLastCmdResponse <> '' then begin + FLastResponse := FLastCmdResponse; + FLastCmdResponse := ''; + end; + if Assigned(FOnMessageEnd) then + FOnMessageEnd(Self); + TriggerRequestDone(0); + end + else begin + if (Length(FLastResponse) > 1) and { 26/10/02 } + (FLastResponse[1] ='.') and (FLastResponse[2] ='.') then + Delete(FLastResponse, 1, 1); + if Assigned(FDataStream) then begin + if Length(FLastResponse) > 0 then + FDataStream.Write(FLastResponse[1], Length(FLastResponse)); + FDataStream.Write(CrLf[1], Length(CrLf)); + end; + if Assigned(FOnMessageLine) then + FOnMessageLine(Self); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Next; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for NEXT'); + FRequestDoneFlag := FALSE; + FRequestType := nntpNext; + FArticleNumber := -1; + FArticleID := ''; + FRequest := 'NEXT'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Last; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for LAST'); + FRequestDoneFlag := FALSE; + FRequestType := nntpLast; + FArticleNumber := -1; + FArticleID := ''; + FRequest := 'LAST'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.List(DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for LIST'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpList; + FRequest := 'LIST'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Help(DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for HELP'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpHelp; + FRequest := 'HELP'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Quit; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for QUIT'); + FRequestDoneFlag := FALSE; + FRequestType := nntpQuit; + FRequest := 'QUIT'; + FNext := QuitNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.QuitNext; +begin + GetInteger(@FLastResponse[1], FStatusCode); + TriggerRequestDone(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Abort; +begin + FRequestType := nntpAbort; + FWSocket.Close; + FLastResponse := '205 Closing connection - goodbye'; + FStatusCode := 205; + FRequestDoneFlag := FALSE; + TriggerRequestDone(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Post(FromStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for POST'); + FDataStream := FromStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpPost; + FRequest := 'POST'; + FSentFlag := FALSE; + FNext := PostNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.PostNext; +begin + GetInteger(@FLastResponse[1], FStatusCode); + if FStatusCode <> 340 then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + FNext := PostSendNext; + FWSocket.OnDataSent := WSocketDataSent; + PostBlock; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.PostBlock; +var + Len : Integer; +begin + Len := FDataStream.Read(FSendBuffer, SizeOf(FSendBuffer)); + if Len <= 0 then begin + if FSentFlag then + Exit; + FSentFlag := TRUE; + StrCopy(@FSendBuffer, #13#10 + '.' + #13#10); + Len := 5; + end; + FWSocket.Send(@FSendBuffer, Len); + Inc(FSendCount, Len); + TriggerSendData; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.PostSendNext; +begin + FWSocket.OnDataSent := nil; + GetInteger(@FLastResponse[1], FStatusCode); + if FStatusCode = 240 then + TriggerRequestDone(0) + else + TriggerRequestDone(FStatusCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.PostDone; +begin + FLastResponse := '441 posting failed'; + PostSendNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.NewGroups( + When : TDateTime; + GMTFLag : Boolean; + Distributions : String; + DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for NEWGROUPS'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpNewGroups; + if When = 0 then + When := Now; + FRequest := 'NEWGROUPS ' + FormatDateTime('yymmdd hhnnss', When); + if GMTFlag then + FRequest := FRequest + ' GMT'; + if Length(Distributions) > 0 then + FRequest := FRequest + ' <' + Distributions + '>'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.NewNews( + When : TDateTime; + GMTFLag : Boolean; + NewsGroupName : String; + Distributions : String; + DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for NEWNEWS'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpNewNews; + if When = 0 then + When := Now; + if NewsGroupName = '' then + NewsGroupName := '*'; + FRequest := 'NEWNEWS ' + NewsGroupName + ' ' + + FormatDateTime('yymmdd hhnnss', When); + if GMTFlag then + FRequest := FRequest + ' GMT'; + if Length(Distributions) > 0 then + FRequest := FRequest + ' <' + Distributions + '>'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Articles can be: a) a single (positive) article number } +{ b) an article number followed by a dash } +{ c) two article numbers separated by a dash } +procedure TNntpCli.XOver( + Articles : String; + DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for XOVER'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpXOver; + FRequest := 'XOVER ' + Articles; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.ListOverViewFmt(DestStream : TStream); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for LIST OVERVIEW.FMT'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpListOverViewFmt; + FRequest := 'LIST OVERVIEW.FMT'; + FNext := GetArticleNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.DateNext; +var + Data : PChar; + Buf : String; + Year, Month, Day, Hour, Min, Sec : Word; +begin + Data := StpBlk(GetInteger(@FLastResponse[1], FStatusCode)); + if FStatusCode <> 111 then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + Buf := Trim(StrPas(Data)); + if Length(Buf) = 14 then begin + Year := atoi(Copy(Buf, 1, 4)); + Month := atoi(Copy(Buf, 5, 2)); + Day := atoi(Copy(Buf, 7, 2)); + Hour := atoi(Copy(Buf, 9, 2)); + Min := atoi(Copy(Buf, 11, 2)); + Sec := atoi(Copy(Buf, 13, 2)); + FServerDate := EncodeDate(Year, Month, Day) + + EncodeTime(Hour, Min, Sec, 0); + end; + TriggerRequestDone(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Date; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for DATE'); + FServerDate := 0; + FDataStream := nil; + FRequestDoneFlag := FALSE; + FRequestType := nntpDate; + FRequest := 'DATE'; + FNext := DateNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.ModeReaderNext; +begin + GetInteger(@FLastResponse[1], FStatusCode); + if FStatusCode in [200, 201] then + TriggerRequestDone(0) + else + TriggerRequestDone(FStatusCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.ModeReader; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for ModeReader'); + FServerDate := 0; + FDataStream := nil; + FRequestDoneFlag := FALSE; + FRequestType := nntpModeReader; + FRequest := 'MODE READER'; + FNext := ModeReaderNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.XHdrLineNext; +const + CrLf : String[2] = #13#10; +begin + if FLastResponse = '.' then begin + if FLastCmdResponse <> '' then begin + FLastResponse := FLastCmdResponse; + FLastCmdResponse := ''; + end; + if Assigned(FOnXHdrEnd) then + FOnXHdrEnd(Self); + TriggerRequestDone(0); + end + else begin + if Assigned(FDataStream) then begin + if Length(FLastResponse) > 0 then + FDataStream.Write(FLastResponse[1], Length(FLastResponse)); + FDataStream.Write(CrLf[1], Length(CrLf)); + end; + if Assigned(FOnXHdrLine) then + FOnXHdrLine(Self); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.XHdrNext; +begin + GetInteger(@FLastResponse[1], FStatusCode); + if FStatusCode <> 221 then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + + FNext := XHdrLineNext; + FLastCmdResponse := FLastResponse;; + StateChange(nntpWaitingResponse); + + if Assigned(FOnXHdrBegin) then + FOnXHdrBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Header is a header line such as "subject". } +{ Range is either: } +{ an article number } +{ an article number followed by a dash to indicate all following } +{ an article number followed by a dash followed by another article number } +{ Range can be replaced by a message id. } +{ If range is empty current article is used. } +procedure TNntpCli.XHdr(DestStream : TStream; Header : String; Range : String); +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for XHDR'); + FDataStream := DestStream; + FRequestDoneFlag := FALSE; + FRequestType := nntpXHdr; + FRequest := 'XHDR ' + Header; + if Length(Range) > 0 then + Frequest := FRequest + ' ' + Range; + FNext := XHdrNext; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.AuthenticateNext1; +begin + StpBlk(GetInteger(@FLastResponse[1], FStatusCode)); + if FStatusCode <> 381 then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + FRequestDoneFlag := FALSE; + FRequest := 'AUTHINFO PASS ' + FPassWord; + FNext := AuthenticateNext2; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.AuthenticateNext2; +begin + StpBlk(GetInteger(@FLastResponse[1], FStatusCode)); + if FStatusCode <> 281 then begin + TriggerRequestDone(FStatusCode); + Exit; + end; + TriggerRequestDone(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.Authenticate; +begin + if FState <> nntpReady then + raise NntpException.Create('Not ready for DATE'); + FRequestDoneFlag := FALSE; + FRequestType := nntpAuthenticate; + FRequest := 'AUTHINFO USER ' + FUserName; + FNext := AuthenticateNext1; + StateChange(nntpWaitingResponse); + SendRequest; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure ParseListLine( + const Line : String; + var NewsGroupName : String; + var LastArticle : Integer; + var FirstArticle : Integer; + var PostingFlag : Char); +var + Data : PChar; +begin + if Length(Line) = 0 then + Exit; + Data := GetNewsGroupName(@Line[1], NewsGroupName); + Data := GetInteger(Data, LastArticle); + Data := GetInteger(Data, FirstArticle); + GetChar(Data, PostingFlag); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WSocketDataSent(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + PostDone; + Exit; + end; + PostBlock; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then + TriggerRequestDone(Error) + else begin + FWSocket.Addr := FWSocket.DnsResult; + FWSocket.Proto := 'tcp'; + FWSocket.Port := 'nntp'; + StateChange(nntpWaitingBanner); + FWSocket.Connect; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WSocketSessionConnected(Sender: TObject; Error: Word); +begin + { Do not trigger the client SessionConnected from here. We must wait } + { to have received the server banner. } + if Error <> 0 then begin + TriggerRequestDone(Error); + FWSocket.Close + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; +begin + Len := FWSocket.RcvdCount; + if Len < 0 then + Exit; + + if Len = 0 then begin + FWSocket.Close; + Exit; + end; + + { We use line mode, we will receive complete lines } + FLastResponse := FWSocket.ReceiveStr; + FRcvdCount := (FRcvdCount + Length(FLastResponse)) and $7FFFFFF; + TriggerRcvdData; + + { Remove ending CR/LF, if any } + if (Length(FLastResponse) >= 1) and + (FLastResponse[Length(FLastResponse)] = #10) then + SetLength(FLastResponse, Length(FLastResponse) - 1); + if (Length(FLastResponse) >= 1) and + (FLastResponse[Length(FLastResponse)] = #13) then + SetLength(FLastResponse, Length(FLastResponse) - 1); + + if FRequestType = nntpAbort then + Exit; + + if Assigned(FOnDisplay) then + FOnDisplay(Self, @FLastResponse[1], Length(FLastResponse)); + +{$IFDEF VER80} + { Add a nul byte at the end of string for Delphi 1 } + FLastResponse[Length(FLastResponse) + 1] := #0; +{$ENDIF} + if FState = nntpWaitingBanner then begin + StateChange(nntpReady); + GetInteger(@FLastResponse[1], FStatusCode); + FPostingPermited := (FStatusCode = 200); + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); + end + else if FState = nntpWaitingResponse then begin + if Assigned(FNext) then + FNext + else + StateChange(nntpReady); + end + else begin + if Assigned(FOnDataAvailable) then + FOnDataAvailable(Self, Error); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.WSocketSessionClosed(Sender: TObject; Error: Word); +begin + if not (FRequestType in [nntpAbort]) then + TriggerRequestDone(Error); + if Assigned(FOnSessionClosed) then + OnSessionClosed(Self, Error); + StateChange(nntpNotConnected); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.TriggerStateChange; +begin + if Assigned(FOnStateChange) then + FOnStateChange(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.TriggerRequestDone(Error: Word); +begin + if FRequestDoneFlag = FALSE then + PostMessage(Handle, WM_NNTP_REQUEST_DONE, WORD(FRequestType), Error); + FRequestDoneFlag := TRUE; + FNext := nil; + if FWSocket.State = wsConnected then + StateChange(nntpReady) + else + StateChange(nntpNotConnected); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.TriggerSendData; +begin + if Assigned(FOnSendData) then + FOnSendData(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TNntpCli.TriggerRcvdData; +begin + if Assigned(FOnRcvdData) then + FOnRcvdData(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/POP3CLI.DCR b/lib/ics/Delphi/Vc32/POP3CLI.DCR new file mode 100644 index 00000000..81cf1d0c Binary files /dev/null and b/lib/ics/Delphi/Vc32/POP3CLI.DCR differ diff --git a/lib/ics/Delphi/Vc32/Pop3Prot.dcr b/lib/ics/Delphi/Vc32/Pop3Prot.dcr new file mode 100644 index 00000000..28494179 Binary files /dev/null and b/lib/ics/Delphi/Vc32/Pop3Prot.dcr differ diff --git a/lib/ics/Delphi/Vc32/Pop3Prot.dcu b/lib/ics/Delphi/Vc32/Pop3Prot.dcu new file mode 100644 index 00000000..f754a6e6 Binary files /dev/null and b/lib/ics/Delphi/Vc32/Pop3Prot.dcu differ diff --git a/lib/ics/Delphi/Vc32/Pop3Prot.pas b/lib/ics/Delphi/Vc32/Pop3Prot.pas new file mode 100644 index 00000000..51813b11 --- /dev/null +++ b/lib/ics/Delphi/Vc32/Pop3Prot.pas @@ -0,0 +1,1776 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: TPop3Cli class implements the POP3 protocol + (RFC-1225, RFC-1939) +Creation: 03 october 1997 +Version: 2.15 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Sept 09, 1997 Modified TOP to be able to request 0 lines (bug reported by + damien@jetman.demon.co.uk) +Oct 10, 1997 V1.10. Published ProtocolState property, made TOP command + complies with RFC-1939 as suggested by damien@jetman.demon.co.uk + Implemented the UIDL command. +Oct 11, 1997 V1.11 Implemented the APOP command, but not tested because no + server available to test it. + Made internal error message look like POP3 error messages (-ERR) +Oct 28, 1997 V1.12 Modified TWSocket to handle line buffer overflow and + TPop3Client to handle that in GetMultiLine. +Jan 10, 1998 V1.13 Made FWSocket accessible with a read only property. This + eases DNSLookup without a supplementary TWSocket. + Added a Port property. +Apr 01, 1998 V1.14 Adapted for BCB V3 +May 05, 1998 V1.15 Changed GetMultiLine to correctly handle double dots at + line start. +Jun 01, 1998 V1.16 Ben Robinson found that Last did'nt + update MsgNum and MsgSize. +Aug 05, 1998 V2.00 New asynchronous version. +Sep 19, 1998 V2.01 Corrected WSocketDataAvailable to count for the added + nul byte at the end of buffer. +Nov 28, 1998 V2.02 Corrected exception triggered using highlevel function + when connection or DNS lookup failed (for example using Open). +Dec 03, 1998 V2.03 Added SetErrorMessage in WSocketSessionConnected. +Dec 22, 1998 V2.04 Handle exception when connecting (will be triggered when + an invalid port has been given). +Feb 27, 1999 V2.05 Adde State property. +Mar 07, 1999 V2.06 Made public property Connected. +Aug 20, 1999 V2.07 Revised conditional compilation, adapted for BCB4, set + compile options same as TWSocket. +Dec 26, 1999 V2.08 Makes OnRequestDone properly called after a QUIT command. + Special thanks to roger.morton@dial.pipex.com for his work + about that problem. +Jul 22, 2000 V2.09 Checked for buffer overflow in WSocketDataAvailable + as suggested by Jeroen Stolting +Nov 11, 2000 V2.10 Made ClearErrorMessage public. Cleared ErrorMessage when + connecting. Thanks to Jeroen Nijk for pointing + to problem. +Nov 25, 2000 V2.11 Converted MD5 digest to lower case before sending to the + server. Thanks to Poessler Thomas who + found the problem and fix. +Jul 30, 2001 V2.12 Jake Traynham found a problem in + end of line logic in WSocketDataAvailable when random CR are + inside a message line. Changed logic to take only CRLF pair as + end of line. +Aug 18, 2001 V2.13 Angus Robertson found a problem when + using the RetrSync and TopSync methods that it's not possible to + retrieve a body that takes longer than the timeout in + WaitUntilReady. Timeout has to be reevaluated in TriggerResponse. +Sep 09, 2001 V2.14 Beat Boegli added LocalAddr property + for multihomed hosts. +Jul 06, 2002 V2.15 Added header decoding for RETR command. Added corresponding + properties such as HeaderFrom, HeaderTo, HeaderSubject,... + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Pop3Prot; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, WinProcs, SysUtils, Messages, Classes, Graphics, Controls, + Forms, Dialogs, Menus, WSocket, WinSock, MD5; + +const + Pop3CliVersion = 215; + CopyRight : String = ' POP3 component (c) 1997-2002 F. Piette V2.15 '; +{$IFDEF VER80} + { Delphi 1 has a 255 characters string limitation } + POP3_RCV_BUF_SIZE = 255; +{$ELSE} + POP3_RCV_BUF_SIZE = 4096; +{$ENDIF} + WM_POP3_REQUEST_DONE = WM_USER + 1; + +type + Pop3Exception = class(Exception); + TPop3Display = procedure(Sender: TObject; Msg : String) of object; + TPop3ProtocolState = (pop3Disconnected, pop3WaitingUser, + pop3WaitingPass, pop3Transaction); + TPop3State = (pop3Ready, pop3DnsLookup, pop3Connecting, + pop3Connected, pop3InternalReady, + pop3WaitingBanner, pop3WaitingResponse, pop3Abort); + TPop3Request = (pop3Connect, pop3User, pop3Pass, pop3RPop, pop3Quit, + pop3Stat, pop3List, pop3Retr, pop3Top, pop3Dele, + pop3Noop, pop3Last, pop3RSet, pop3Uidl, pop3APop, + pop3Open, pop3Custom); + TPop3Fct = (pop3FctNone, pop3FctConnect, pop3FctUser, pop3FctPass, + pop3FctRPop, pop3FctQuit, pop3FctAPop, pop3FctStat, + pop3FctList, pop3FctUidl, pop3FctRetr, pop3FctTop, + pop3FctDele, pop3FctNoop, pop3FctRSet, pop3FctLast); + TPop3FctSet = set of TPop3Fct; + TPop3NextProc = procedure of object; + TPop3RequestDone = procedure(Sender : TObject; + RqType : TPop3Request; + Error : Word) of object; + TPop3Method = function : boolean of object; + TCustomPop3Cli = class(TComponent) + private + FWSocket : TWSocket; + FWindowHandle : HWND; + FState : TPop3State; + FNextProtocolState : TPop3ProtocolState; + FProtocolState : TPop3ProtocolState; + FConnected : Boolean; + FRequestType : TPop3Request; + FRequestDoneFlag : Boolean; + FReceiveLen : Integer; + FRequestResult : Integer; + FStatusCode : Integer; + FReceiveBuffer : array [0..POP3_RCV_BUF_SIZE - 1] of char; + FNext : TPop3NextProc; + FWhenConnected : TPop3NextProc; + FFctSet : TPop3FctSet; + FFctPrv : TPop3Fct; + FHighLevelResult : Integer; + FHighLevelFlag : Boolean; + FNextRequest : TPop3NextProc; + FLastResponseSave : String; + FStatusCodeSave : Integer; + FRestartFlag : Boolean; + FDoneAsync : TPop3NextProc; + FMultiLineLine : TNotifyEvent; + FMultiLineEnd : TNotifyEvent; + FMultiLineProcess : TNotifyEvent; + FHost : String; + FLocalAddr : String; {bb} + FPort : String; + FUserName : String; + FPassWord : String; + FLastResponse : String; + FErrorMessage : String; + FTimeStamp : String; + FMsgCount : Integer; + FMsgSize : Integer; + FMsgNum : Integer; + FMsgUidl : String; + FMsgLines : Integer; + FTag : LongInt; + FWaitingOnQuit : Boolean; + FHeaderPart : Boolean; + FHeaderKeyword : String; + FHeaderData : String; + FHeaderFrom : String; + FHeaderTo : String; + FHeaderSubject : String; + FHeaderReplyTo : String; + FHeaderMessageId : String; + FHeaderDate : String; + FHeaderReturnPath : String; + + FOnDisplay : TPop3Display; + FOnMessageBegin : TNotifyEvent; + FOnMessageEnd : TNotifyEvent; + FOnMessageLine : TNotifyEvent; + FOnListBegin : TNotifyEvent; + FOnListEnd : TNotifyEvent; + FOnListLine : TNotifyEvent; + FOnUidlBegin : TNotifyEvent; + FOnUidlEnd : TNotifyEvent; + FOnUidlLine : TNotifyEvent; + FOnStateChange : TNotifyEvent; + FOnRequestDone : TPop3RequestDone; + FOnResponse : TPop3Display; + FOnSessionConnected : TSessionConnected; + FOnSessionClosed : TSessionClosed; + FOnHeaderEnd : TNotifyEvent; + protected + procedure ExecAsync(RqType : TPop3Request; + Cmd : String; + NextState : TPop3ProtocolState; + DoneAsync : TPop3NextProc); + procedure NextExecAsync; + procedure StartTransaction(OpCode : String; + Params : String; + RqType : TPop3Request; + NextState : TPop3ProtocolState; + DoneTrans : TPop3NextProc); + procedure StartMultiLine(aOnBegin : TNotifyEvent; + aOnLine : TNotifyEvent; + aOnEnd : TNotifyEvent; + aProcess : TNotifyEvent); + procedure GetALine; + procedure StatDone; + procedure ListAllDone; + procedure ListSingleDone; + procedure UidlAllDone; + procedure UidlSingleDone; + procedure RetrDone; + procedure LastDone; + procedure WndProc(var MsgRec: TMessage); virtual; + procedure WMPop3RequestDone(var msg: TMessage); + message WM_POP3_REQUEST_DONE; + procedure WSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure WSocketSessionConnected(Sender: TObject; Error: Word); + procedure WSocketDataAvailable(Sender: TObject; Error: Word); + procedure WSocketSessionClosed(Sender : TObject; Error : WORD); + procedure DisplayLastResponse; + procedure TriggerDisplay(Msg : String); + procedure TriggerSessionConnected(Error : Word); virtual; + procedure TriggerSessionClosed(Error : Word); + procedure TriggerResponse(Msg : String); virtual; + procedure TriggerStateChange; virtual; + procedure TriggerRequestDone(Error: Word); virtual; + function OkResponse : Boolean; + procedure StateChange(NewState : TPop3State); + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure SetErrorMessage; + procedure Display(Msg : String); + procedure SendCommand(Cmd : String); + function ExtractNumbers(var N1 : Integer; var N2 : Integer) : Boolean; + function ExtractUidl(var N1 : Integer; var N2 : String) : Boolean; + procedure ProcessUidl(Sender : TObject); + procedure ProcessList(Sender : TObject); + procedure CheckReady; + procedure DoHighLevelAsync; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure Connect; virtual; + procedure Open; virtual; + procedure User; virtual; + procedure Pass; virtual; + procedure RPop; virtual; + procedure APop; virtual; + procedure Quit; virtual; + procedure Stat; virtual; + procedure List; virtual; + procedure Retr; virtual; + procedure Top; virtual; + procedure Dele; virtual; + procedure Noop; virtual; + procedure Last; virtual; + procedure RSet; virtual; + procedure Uidl; virtual; + procedure Abort; virtual; + procedure ClearErrorMessage; + procedure HighLevelAsync(RqType : TPop3Request; Fcts : TPop3FctSet); + + property CtrlSocket : TWSocket read FWSocket; + property Host : String read FHost + write FHost; + property LocalAddr : String read FLocalAddr {bb} + write FLocalAddr; {bb} + property Port : String read FPort + write FPort; + property UserName : String read FUserName + write FUserName; + property PassWord : String read FPassWord + write FPassWord; + property ErrorMessage : String read FErrorMessage; + property LastResponse : String read FLastResponse; + property State : TPop3State read FState; + property Connected : Boolean read FConnected; + property ProtocolState : TPop3ProtocolState read FProtocolState; + {:Updated by the Stat method with the number of + messages in the maildrop } + property MsgCount : Integer read FMsgCount; + {:Updated by the Stat method with the total size + in byte for the messages in the maildrop } + property MsgSize : Integer read FMsgSize; + {:This is the number of lines to display in the TOP command + Set to zero if you wants the default value } + property MsgLines : Integer read FMsgLines + write FMsgLines; + {:This is the message number which must be returned by the Retr + method. It is also updated by the Last method } + property MsgNum : Integer read FMsgNum + write FMsgNum; + property MsgUidl : String read FMsgUidl; + {:The following properties are decoded by RETR command } + property HeaderKeyword : String read FHeaderKeyword; + property HeaderData : String read FHeaderData; + property HeaderFrom : String read FHeaderFrom; + property HeaderTo : String read FHeaderTo; + property HeaderSubject : String read FHeaderSubject; + property HeaderReplyTo : String read FHeaderReplyTo; + property HeaderMessageId : String read FHeaderMessageId; + property HeaderDate : String read FHeaderDate; + property HeaderReturnPath : String read FHeaderReturnPath; + {:General purpose property, not used by component } + property Tag : LongInt read FTag + write FTag; + property Handle : HWND read FWindowHandle; + + property OnDisplay : TPop3Display read FOnDisplay + write FOnDisplay; + property OnMessageBegin : TNotifyEvent read FOnMessageBegin + write FOnMessageBegin; + property OnMessageEnd : TNotifyEvent read FOnMessageEnd + write FOnMessageEnd; + property OnMessageLine : TNotifyEvent read FOnMessageLine + write FOnMessageLine; + property OnListBegin : TNotifyEvent read FOnListBegin + write FOnListBegin; + property OnListEnd : TNotifyEvent read FOnListEnd + write FOnListEnd; + property OnListLine : TNotifyEvent read FOnListLine + write FOnListLine; + property OnUidlBegin : TNotifyEvent read FOnUidlBegin + write FOnUidlBegin; + property OnUidlEnd : TNotifyEvent read FOnUidlEnd + write FOnUidlEnd; + property OnUidlLine : TNotifyEvent read FOnUidlLine + write FOnUidlLine; + property OnHeaderEnd : TNotifyEvent read FOnHeaderEnd + write FOnHeaderEnd; + property OnStateChange : TNotifyEvent read FOnStateChange + write FOnStateChange; + property OnRequestDone : TPop3RequestDone read FOnRequestDone + write FOnRequestDone; + property OnResponse: TPop3Display read FOnResponse + write FOnResponse; + property OnSessionConnected : TSessionConnected + read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TSessionClosed + read FOnSessionClosed + write FOnSessionClosed; + end; + + TPop3Cli = class(TCustomPop3Cli) + published + property Host; + property LocalAddr; {bb} + property Port; + property UserName; + property PassWord; + property ErrorMessage; + property LastResponse; + property ProtocolState; + property MsgCount; + property MsgSize; + property MsgLines; + property MsgNum; + property MsgUidl; + property Tag; + property OnDisplay; + property OnMessageBegin; + property OnMessageEnd; + property OnMessageLine; + property OnListBegin; + property OnListEnd; + property OnListLine; + property OnUidlBegin; + property OnUidlEnd; + property OnUidlLine; + property OnHeaderEnd; + property OnStateChange; + property OnRequestDone; + property OnResponse; + property OnSessionConnected; + property OnSessionClosed; + end; + + { TSyncPop3Cli add synchronous functions. You should avoid using this } + { component because synchronous function, apart from being easy, result } + { in lower performance programs. } + TSyncPop3Cli = class(TPop3Cli) + protected + FTimeout : Integer; { Given in seconds } + FTimeStop : LongInt; { Milli-seconds } + FMultiThreaded : Boolean; + function WaitUntilReady : Boolean; virtual; + function Synchronize(Proc : TPop3NextProc) : Boolean; + procedure TriggerResponse(Msg : String); override; { Angus } + public + constructor Create(AOwner : TComponent); override; + function ConnectSync : Boolean; virtual; + function OpenSync : Boolean; virtual; + function UserSync : Boolean; virtual; + function PassSync : Boolean; virtual; + function RPopSync : Boolean; virtual; + function APopSync : Boolean; virtual; + function QuitSync : Boolean; virtual; + function StatSync : Boolean; virtual; + function ListSync : Boolean; virtual; + function RetrSync : Boolean; virtual; + function TopSync : Boolean; virtual; + function DeleSync : Boolean; virtual; + function NoopSync : Boolean; virtual; + function LastSync : Boolean; virtual; + function RSetSync : Boolean; virtual; + function UidlSync : Boolean; virtual; + function AbortSync : Boolean; virtual; + published + property Timeout : Integer read FTimeout + write FTimeout; + property MultiThreaded : Boolean read FMultiThreaded + write FMultiThreaded; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RTrim(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LTrim(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then { Petite optimisation: pas d'espace } + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := LTrim(Rtrim(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function stpblk(PValue : PChar) : PChar; +begin + Result := PValue; + while Result^ in [' ', #9, #10, #13] do + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(PValue : PChar) : Integer; +begin + Result := 0; + PValue := stpblk(PValue); + while PValue^ in ['0'..'9'] do begin + Result := Result * 10 + ord(PValue^) - ord('0'); + Inc(PValue); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomPop3Cli.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWindowHandle := WSocket.AllocateHWnd(WndProc); + FWSocket := TWSocket.Create(nil); + FWSocket.OnSessionClosed := WSocketSessionClosed; + FProtocolState := pop3Disconnected; + FState := pop3Ready; + FLocalAddr := '0.0.0.0'; {bb} + FPort := 'pop3'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomPop3Cli.Destroy; +begin + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + WSocket.DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + case Msg of + WM_POP3_REQUEST_DONE : WMPop3RequestDone(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WMPop3RequestDone(var msg: TMessage); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, FRequestType, Msg.LParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then begin + if AComponent = FWSocket then + FWSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + FLastResponse := '-ERR ' + WSocketErrorDesc(Error) + + ' (Winsock error #' + IntToStr(Error) + ')'; + FStatusCode := 500; + FRequestResult := Error; { V2.02 } + SetErrorMessage; + TriggerRequestDone(Error); + end + else begin + FWSocket.Addr := FWSocket.DnsResult; + FWSocket.Proto := 'tcp'; + FWSocket.Port := FPort; + FWSocket.LocalAddr := FLocalAddr; {bb} + FWSocket.OnSessionConnected := WSocketSessionConnected; + FWSocket.OnDataAvailable := WSocketDataAvailable; + StateChange(pop3Connecting); + try + FWSocket.Connect; + except + on E:Exception do begin + FLastResponse := '-ERR ' + E.ClassName + ': ' + E.Message; + FStatusCode := 500; + FRequestResult := FStatusCode; + SetErrorMessage; + TriggerRequestDone(FStatusCode); + end; + end + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WSocketSessionConnected(Sender: TObject; Error: Word); +begin + { Do not trigger the client SessionConnected from here. We must wait } + { to have received the server banner. } + if Error <> 0 then begin + FLastResponse := '-ERR ' + WSocketErrorDesc(Error) + + ' (Winsock error #' + IntToStr(Error) + ')'; + FStatusCode := 500; + FConnected := FALSE; + FRequestResult := Error; { V2.02 } + SetErrorMessage; { V2.03 } + TriggerRequestDone(Error); + FWSocket.Close; + StateChange(pop3Ready); + end + else begin + FConnected := TRUE; + StateChange(pop3WaitingBanner); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WSocketSessionClosed(Sender : TObject; Error : WORD); +begin + FConnected := FALSE; + TriggerSessionClosed(Error); + TriggerRequestDone(WSAEINTR); + FProtocolState := pop3Disconnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.WSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I, J : Integer; + Remaining : Integer; +begin + { Compute remaining space in our buffer. Preserve 3 bytes for CR/LF } + { and nul terminating byte. } + Remaining := SizeOf(FReceiveBuffer) - FReceiveLen - 3; + if Remaining <= 0 then begin + { Received message has a line longer than our buffer. This is not } + { acceptable ! We will add a CR/LF to enable processing, but this } + { will ALTER received message and could cause strange results. } + { May be it is better to raise an exception ? } + FReceiveBuffer[SizeOf(FReceiveBuffer) - 3] := #13; + FReceiveBuffer[SizeOf(FReceiveBuffer) - 2] := #10; + Len := 2; + end + else begin + Len := FWSocket.Receive(@FReceiveBuffer[FReceiveLen], Remaining); + if Len <= 0 then + Exit; + end; + + FReceiveBuffer[FReceiveLen + Len] := #0; + FReceiveLen := FReceiveLen + Len; + + while FReceiveLen > 0 do begin + { Search CRLF pair. We can't use Pos because it stops at first #0 } + I := 1; + while (I < FReceiveLen) and + (not((FReceiveBuffer[I - 1] = #13) and (FReceiveBuffer[I] = #10))) + do + Inc(I); + if I >= FReceiveLen then + break; { CRLF not found } + + { Found a CRLF. Extract data from buffer } + FLastResponse := Copy(FReceiveBuffer, 1, I - 1); + TriggerResponse(FLastResponse); + +{$IFDEF DUMP} + FDumpBuf := '>|'; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.WriteBuffer(FLastResponse[1], Length(FLastResponse)); + FDumpBuf := '|' + #13#10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} +{$IFDEF VER80} + { Add a nul byte at the end of string for Delphi 1 } + FLastResponse[Length(FLastResponse) + 1] := #0; +{$ENDIF} + FReceiveLen := FReceiveLen - I - 1; + if FReceiveLen > 0 then + Move(FReceiveBuffer[I + 1], FReceiveBuffer[0], FReceiveLen + 1); + + if FState = pop3WaitingBanner then begin + DisplayLastResponse; + if not OkResponse then begin + SetErrorMessage; + FRequestResult := FStatusCode; + FWSocket.Close; + Exit; + end; + I := Pos('<', FLastResponse); + J := Pos('>', Copy(FLastResponse, I, Length(FLastREsponse))); + if (I > 0) and (J > 0) then + FTimeStamp := Copy(FLastResponse, I, J); + + FProtocolState := pop3WaitingUser; + StateChange(pop3Connected); + TriggerSessionConnected(Error); + + if Assigned(FWhenConnected) then + FWhenConnected + else begin + TriggerRequestDone(0); + end; + end + else if FState = pop3WaitingResponse then begin + if Assigned(FNext) then + FNext + else + raise Pop3Exception.Create('Program error: FNext is nil'); + end + else begin + { Unexpected data received } + DisplayLastResponse; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerResponse(Msg : String); +begin + if Assigned(FOnResponse) then + FOnResponse(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerStateChange; +begin + if Assigned(FOnStateChange) then + FOnStateChange(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerRequestDone(Error: Word); +begin + { Special processing for Quit (Roger Morton 24-12-99) } + if FRequestType = pop3Quit then begin + if FWaitingOnQuit then + { When the second RqDone arrives (from WSocketSessionClosed), } + { treat it as a normal event by setting a zero Error code } + Error := 0 + else begin + { When the first RqDone arrives, set the FWaitingOnQuit flag so } + { we're ready to handle a second RqDone. } + { Take no other action (in particular, we don't advise the user } + { that the first RqDone has happened) } + FWaitingOnQuit := True; + Exit; + end; + { Fall down here for all normal RqDone, and after the second RqDone } + { following a Quit } + FWaitingOnQuit := False; + end; + + if not FRequestDoneFlag then begin + FRequestDoneFlag := TRUE; + if Assigned(FNextRequest) then begin + if FState <> pop3Abort then + StateChange(pop3InternalReady); + FNextRequest; + end + else begin + StateChange(pop3Ready); + { Restore the lastresponse saved before quit command } + if FHighLevelFlag and (FStatusCodeSave >= 0) then begin + FLastResponse := FLastResponseSave; + FStatusCode := FStatusCodeSave; + end; + FHighLevelFlag := FALSE; + PostMessage(Handle, WM_POP3_REQUEST_DONE, 0, Error); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerDisplay(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerSessionConnected(Error : Word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.TriggerSessionClosed(Error : Word); +begin + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.DoHighLevelAsync; +begin +{$IFDEF TRACE} TriggerDisplay('! HighLevelAsync ' + IntToStr(FRequestResult)); {$ENDIF} + if FState = pop3Abort then begin + {$IFDEF TRACE} TriggerDisplay('! Abort detected'); {$ENDIF} + FFctSet := []; + FHighLevelResult := 426; + FErrorMessage := '426 Operation aborted.'; + end; + + FNextRequest := DoHighLevelAsync; + + if FRequestResult <> 0 then begin + { Previous command had errors } + FHighLevelResult := FRequestResult; + if (FFctPrv = pop3FctQuit) or (not (pop3FctQuit in FFctSet)) then + FFctSet := [] + else + FFctSet := [pop3FctQuit]; + end; + + if pop3FctConnect in FFctSet then begin + FFctPrv := pop3FctConnect; + FFctSet := FFctSet - [FFctPrv]; + Connect; + Exit; + end; + + if pop3FctUser in FFctSet then begin + FFctPrv := pop3FctUser; + FFctSet := FFctSet - [FFctPrv]; + User; + Exit; + end; + + if pop3FctPass in FFctSet then begin + FFctPrv := pop3FctPass; + FFctSet := FFctSet - [FFctPrv]; + Pass; + Exit; + end; + + if pop3FctRPop in FFctSet then begin + FFctPrv := pop3FctRPop; + FFctSet := FFctSet - [FFctPrv]; + RPop; + Exit; + end; + + if pop3FctDele in FFctSet then begin + FFctPrv := pop3FctDele; + FFctSet := FFctSet - [FFctPrv]; + Dele; + Exit; + end; + + if pop3FctNoop in FFctSet then begin + FFctPrv := pop3FctNoop; + FFctSet := FFctSet - [FFctPrv]; + Noop; + Exit; + end; + + if pop3FctList in FFctSet then begin + FFctPrv := pop3FctList; + FFctSet := FFctSet - [FFctPrv]; + List; + Exit; + end; + + if pop3FctRSet in FFctSet then begin + FFctPrv := pop3FctRSet; + FFctSet := FFctSet - [FFctPrv]; + RSet; + Exit; + end; + + if pop3FctAPop in FFctSet then begin + FFctPrv := pop3FctAPop; + FFctSet := FFctSet - [FFctPrv]; + APop; + Exit; + end; + + if pop3FctRetr in FFctSet then begin + FFctPrv := pop3FctRetr; + FFctSet := FFctSet - [FFctPrv]; + Retr; + Exit; + end; + + if pop3FctTop in FFctSet then begin + FFctPrv := pop3FctTop; + FFctSet := FFctSet - [FFctPrv]; + Top; + Exit; + end; + + if pop3FctStat in FFctSet then begin + FFctPrv := pop3FctStat; + FFctSet := FFctSet - [FFctPrv]; + Stat; + Exit; + end; + + if pop3FctUidl in FFctSet then begin + FFctPrv := pop3FctUidl; + FFctSet := FFctSet - [FFctPrv]; + Uidl; + Exit; + end; + + if pop3FctLast in FFctSet then begin + FFctPrv := pop3FctLast; + FFctSet := FFctSet - [FFctPrv]; + Last; + Exit; + end; + + if pop3FctQuit in FFctSet then begin + FFctPrv := pop3FctQuit; + FFctSet := FFctSet - [FFctPrv]; + Quit; + Exit; + end; + + {$IFDEF TRACE} TriggerDisplay('! HighLevelAsync done'); {$ENDIF} + FFctSet := []; + FNextRequest := nil; + FRequestDoneFlag := FALSE; + TriggerRequestDone(FHighLevelResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.HighLevelAsync( + RqType : Tpop3Request; Fcts : Tpop3FctSet); +begin + if FConnected and (pop3FctConnect in Fcts) then + raise pop3Exception.Create('pop3 component already connected'); + CheckReady; + FLastResponseSave := FLastResponse; + FStatusCodeSave := -1; + FRequestType := RqType; + FRequestResult := 0; + FFctSet := Fcts; + FFctPrv := pop3FctNone; + FHighLevelResult := 0; + FHighLevelFlag := TRUE; + FLastResponse := ''; + FRestartFlag := FALSE; + ClearErrorMessage; + DoHighLevelAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ProcessUidl(Sender : TObject); +begin + ExtractUidl(FMsgNum, FMsgUidl); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ProcessList(Sender : TObject); +begin + ExtractNumbers(FMsgNum, FMsgSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomPop3Cli.ExtractUidl(var N1 : Integer; var N2 : String) : Boolean; +var + p : PChar; +begin + Result := FALSE; + N1 := 0; + N2 := ''; + +{$IFDEF VER80} + { Delphi 1 do not automatically nul terminate strings } + FLastResponse := FLastResponse + #0; +{$ENDIF} + + { Search for first digit in response } + p := @FLastResponse[1]; + while (p^ <> #0) and (not (p^ in ['0'..'9'])) do + Inc(p); + if p^ = #0 then { Invalid response, need a number } + Exit; + + { Convert first number } + N1 := atoi(p); + + { Search end of number } + while (p^ <> #0) and (p^ in ['0'..'9']) do + Inc(p); + + { Search Uidl } + while (p^ = ' ') do + Inc(p); + + { Copy UIDL } + while (p^ <> #0) and (p^ in [#33..#126]) do begin + N2 := N2 + p^; + Inc(p); + end; + + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomPop3Cli.ExtractNumbers(var N1 : Integer; var N2 : Integer) : Boolean; +var + p : PChar; +begin + Result := FALSE; + +{$IFDEF VER80} + { Delphi 1 do not automatically nul terminate strings } + FLastResponse := FLastResponse + #0; +{$ENDIF} + + { Search for first digit in response } + p := @FLastResponse[1]; + while (p^ <> #0) and (not (p^ in ['0'..'9'])) do + Inc(p); + if p^ = #0 then begin + { Invalid response, need a number } + N1 := 0; + N2 := 0; + Exit; + end; + + { Convert first number } + N1 := atoi(p); + + { Search end of number } + while (p^ <> #0) and (p^ in ['0'..'9']) do + Inc(p); + + { Search next number } + p := stpblk(p); + + if p^ = #0 then begin + { Invalid response, need a number } + N1 := 0; + N2 := 0; + Exit; + end; + + N2 := atoi(p); + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.SendCommand(Cmd : String); +begin + Display('> ' + Cmd); + Application.ProcessMessages; + FWSocket.SendStr(Cmd + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomPop3Cli.OkResponse : Boolean; +begin + Result := ((Length(FLastResponse) > 0) and (FLastResponse[1] = '+')); + if Result then + FStatusCode := 0 + else + FStatusCode := 500; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Display(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ClearErrorMessage; +begin + FErrorMessage := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.SetErrorMessage; +begin + if FErrorMessage = '' then + FErrorMessage := FLastResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.CheckReady; +begin + if not (FState in [pop3Ready, pop3InternalReady]) then + raise pop3Exception.Create('POP3 component not ready'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.StateChange(NewState : TPop3State); +begin + if FState <> NewState then begin + FState := NewState; + TriggerStateChange; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.DisplayLastResponse; +begin + TriggerDisplay('< ' + FLastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ExecAsync( + RqType : TPop3Request; + Cmd : String; { Command to execute } + NextState : TPop3ProtocolState; { Next protocol state in case of success } + DoneAsync : TPop3NextProc); { What to do when done } +begin + CheckReady; + + if not FConnected then + raise Pop3Exception.Create('POP3 component not connected'); + + if not FHighLevelFlag then + FRequestType := RqType; + + FRequestDoneFlag := FALSE; + FNext := NextExecAsync; + FNextProtocolState := NextState; + FDoneAsync := DoneAsync; + StateChange(pop3WaitingResponse); + SendCommand(Cmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.NextExecAsync; +begin + DisplayLastResponse; + + if not OkResponse then begin + FRequestResult := FStatusCode; + SetErrorMessage; + TriggerRequestDone(FRequestResult); + Exit; + end; + + FRequestResult := 0; + FProtocolState := FNextProtocolState; + + if Assigned(FDoneAsync) then + FDoneAsync + else + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.User; +begin + if FProtocolState > pop3WaitingUser then begin + FErrorMessage := '-ERR USER command invalid now'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + FFctPrv := pop3FctUser; + ExecAsync(pop3User, 'USER ' + Trim(FUserName), pop3WaitingPass, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Connect; +begin + CheckReady; + if FConnected then + raise Pop3Exception.Create('POP3 component already connected'); + + if not FHighLevelFlag then + FRequestType := pop3Connect; + + FRequestDoneFlag := FALSE; + FReceiveLen := 0; + FRequestResult := 0; + StateChange(pop3DnsLookup); + ClearErrorMessage; + FWSocket.OnDataSent := nil; + FWSocket.OnDnsLookupDone := WSocketDnsLookupDone; + FWSocket.DnsLookup(FHost); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Abort; +begin + StateChange(pop3Abort); + FWSocket.CancelDnsLookup; + FWSocket.Abort; + StateChange(pop3Ready); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Pass; +begin + if FProtocolState > pop3WaitingPass then begin + FErrorMessage := '-ERR PASS command invalid now'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + FFctPrv := pop3FctPass; + ExecAsync(pop3Pass, 'PASS ' + Trim(FPassWord), pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.RPop; +begin + if FProtocolState > pop3WaitingPass then begin + FErrorMessage := '-ERR RPOP command invalid now'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + FFctPrv := pop3FctRPop; + ExecAsync(pop3RPop, 'RPOP ' + Trim(FPassWord), pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.APop; +begin + if FProtocolState <> pop3WaitingUser then begin + FErrorMessage := '-ERR APOP command invalid now'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + if FTimeStamp = '' then begin + FErrorMessage := '-ERR Server do not support APOP (no timestamp)'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + FFctPrv := pop3FctAPop; + ExecAsync(pop3APop, 'APOP ' + Trim(FUserName) + ' ' + + LowerCase(StrMD5(FTimeStamp + FPassWord)), + pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Quit; +begin + CheckReady; + FFctPrv := pop3FctQuit; + if not FConnected then begin + { We are not connected, it's ok... } + FRequestType := pop3Quit; + FRequestDoneFlag := FALSE; + TriggerRequestDone(0); + Exit; + end; + ExecAsync(pop3Quit, 'QUIT', pop3Disconnected, nil); { Should I force a FWSocket.Close } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Stat; +begin + FFctPrv := pop3FctStat; + StartTransaction('STAT', '', pop3Stat, pop3Transaction, StatDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.StatDone; +begin + ExtractNumbers(FMsgCount, FMsgSize); + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.List; +begin + FFctPrv := pop3FctList; + if FMsgNum <= 0 then + { Scan LIST command (all messages) } + StartTransaction('LIST', '', pop3List, pop3Transaction, ListAllDone) + else + { Single message LIST command } + StartTransaction('LIST', IntToStr(FMsgNum), pop3List, + pop3Transaction, ListSingleDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Uidl; +begin + FFctPrv := pop3FctUidl; + if FMsgNum <= 0 then + { UIDL command (all messages) } + StartTransaction('UIDL', '', pop3Uidl, pop3Transaction, UidlAllDone) + else + { Single message UIDL command } + StartTransaction('UIDL', IntToStr(FMsgNum), pop3Uidl, + pop3Transaction, UidlSingleDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.UidlAllDone; +begin + StartMultiLine(FOnUidlBegin, FOnUidlLine, FOnUidlEnd, ProcessUidl); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.UidlSingleDone; +begin + ExtractUidl(FMsgNum, FMsgUidl); + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ListSingleDone; +begin + ExtractNumbers(FMsgNum, FMsgSize); + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.ListAllDone; +begin + StartMultiLine(FOnListBegin, FOnListLine, FOnListEnd, ProcessList); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Retr; +begin + FFctPrv := pop3FctRetr; + StartTransaction('RETR', IntToStr(FMsgNum), + pop3Retr, pop3Transaction, RetrDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Top; +begin + if FMsgLines < 0 then + raise Pop3Exception.Create('Invalid MsgLines for TOP command'); + FFctPrv := pop3FctTop; + StartTransaction('TOP', IntToStr(FMsgNum) + ' ' + IntToStr(FMsgLines), + pop3Top, pop3Transaction, RetrDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.RetrDone; +begin + StartMultiLine(FOnMessageBegin, FOnMessageLine, FOnMessageEnd, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Dele; +begin + FFctPrv := pop3FctDele; + StartTransaction('DELE', IntToStr(FMsgNum), + pop3Dele, pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Noop; +begin + FFctPrv := pop3FctNoop; + StartTransaction('NOOP', '', pop3Noop, pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.RSet; +begin + FFctPrv := pop3FctRSet; + StartTransaction('RSET', '', pop3RSet, pop3Transaction, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Last; +begin + FFctPrv := pop3FctLast; + StartTransaction('LAST', '', pop3Last, pop3Transaction, LastDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.LastDone; +begin + ExtractNumbers(FMsgNum, FMsgSize); + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.Open; +begin + HighLevelAsync(pop3Open, [pop3FctConnect, pop3FctUser, pop3FctPass]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.StartTransaction( + OpCode : String; + Params : String; + RqType : TPop3Request; + NextState : TPop3ProtocolState; { Next protocol state in case of success} + DoneTrans : TPop3NextProc); { What to do when done } +var + Cmd : String; +begin + if FProtocolState <> pop3Transaction then begin + FErrorMessage := '-ERR ' + OpCode + ' command invalid now'; + Display(FErrorMessage); + raise Pop3Exception.Create(FErrorMessage); + end; + + FHeaderPart := TRUE; + FHeaderKeyword := ''; + FHeaderData := ''; + FHeaderFrom := ''; + FHeaderTo := ''; + FHeaderSubject := ''; + FHeaderReplyTo := ''; + FHeaderReturnPath := ''; + FHeaderMessageId := ''; + FHeaderDate := ''; + + Cmd := OpCode; + if Params <> '' then + Cmd := Cmd + ' ' + Params; + ExecAsync(RqType, Cmd, NextState, DoneTrans); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.StartMultiLine( + aOnBegin : TNotifyEvent; + aOnLine : TNotifyEvent; + aOnEnd : TNotifyEvent; + aProcess : TNotifyEvent); +begin + FMultiLineLine := aOnLine; + FMultiLineEnd := aOnEnd; + FMultiLineProcess := aProcess; + + { Let the application know that the message is beginning } + if Assigned(aOnBegin) then + aOnBegin(Self); + + FNext := GetALine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomPop3Cli.GetALine; +var + I : Integer; +begin + { Check if we are still connected } + if not FConnected then begin + FErrorMessage := '-ERR Disconneced unexpectedly'; + FRequestResult := 500; + Display(FErrorMessage); + TriggerRequestDone(FRequestResult); + Exit; + end; + + { Check if end of message } + if FLastResponse = '.' then begin + { Let the application know that the message is finished } + if Assigned(FMultiLineEnd) then + FMultiLineEnd(Self); + FLastResponse := ''; + FNext := nil; + TriggerRequestDone(0); + Exit; + end; + + { Check if message contains end-of-message mark } + if (Length(FLastResponse) >= 2) and + (FLastResponse[1] = '.') and (FLastResponse[2] = '.') then + { Remove byte-stuff } + FLastResponse := Copy(FLastResponse, 2, Length(FLastResponse)); + + { Check if end of header } + if FHeaderPart then begin + if FLastResponse = '' then begin + { Last header line } + FHeaderPart := FALSE; + if Assigned(FOnHeaderEnd) then + FOnHeaderEnd(Self); + end + else if FLastResponse[1] = #9 then + { Continuation line } + { Ignore } + else begin + I := Pos(':', FLastResponse); + if I > 0 then begin + FHeaderKeyword := LowerCase(Trim(Copy(FLastResponse, 1, I - 1))); + FHeaderData := Copy(FLastResponse, I + 1, 10000); + if FHeaderKeyword = 'from' then + FHeaderFrom := FHeaderData + else if FHeaderKeyword = 'to' then + FHeaderTo := FHeaderData + else if FHeaderKeyword = 'subject' then + FHeaderSubject := FHeaderData + else if FHeaderKeyword = 'date' then + FHeaderDate := FHeaderData + else if FHeaderKeyword = 'message-id' then + FHeaderMessageId := FHeaderData + else if FHeaderKeyword = 'replyto' then + FHeaderReplyTo := FHeaderData + else if FHeaderKeyword = 'return-path' then + FHeaderReturnPath := FHeaderData; + end; + end; + end; + + { Additional process } + if Assigned(FMultiLineProcess) then + FMultiLineProcess(Self); + + { Let the application process the message line } + if Assigned(FMultiLineLine) then + FMultiLineLine(Self); + + { To process next line } + FNext := GetALine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TSyncPop3Cli.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FTimeout := 15; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSyncPop3Cli.TriggerResponse(Msg : String); { angus } +begin + inherited TriggerResponse(Msg); + { Evaluate the timeout period again } + if FTimeout > 0 then + FTimeStop := Integer(GetTickCount) + FTimeout * 1000; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.WaitUntilReady : Boolean; +begin + Result := TRUE; { Suppose success } + FTimeStop := Integer(GetTickCount) + FTimeout * 1000; + while TRUE do begin + if FState = pop3Ready then begin + { Back to ready state, the command is finiched } + Result := (FRequestResult = 0); + break; + end; + + if Application.Terminated or + ((FTimeout > 0) and (Integer(GetTickCount) > FTimeStop)) then begin + { Application is terminated or timeout occured } + inherited Abort; + FErrorMessage := '426 Timeout'; + FStatusCode := 426; + Result := FALSE; { Command failed } + break; + end; +{$IFNDEF VER80} + if FMultiThreaded then + FWSocket.ProcessMessages + else +{$ENDIF} + Application.ProcessMessages; +{$IFNDEF VER80} + { Do not use 100% CPU, but slow down transfert on high speed LAN } + Sleep(0); +{$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.Synchronize(Proc : TPop3NextProc) : Boolean; +begin + try + Proc; + Result := WaitUntilReady; + except + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.ConnectSync : Boolean; +begin + Result := Synchronize(Connect); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.OpenSync : Boolean; +begin + Result := Synchronize(Open); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.UserSync : Boolean; +begin + Result := Synchronize(User); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.PassSync : Boolean; +begin + Result := Synchronize(Pass); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.RetrSync : Boolean; +begin + Result := Synchronize(Retr); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.DeleSync : Boolean; +begin + Result := Synchronize(Dele); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.UidlSync : Boolean; +begin + Result := Synchronize(Uidl); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.LastSync : Boolean; +begin + Result := Synchronize(Last); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.RPopSync : Boolean; +begin + Result := Synchronize(RPop); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.TopSync : Boolean; +begin + Result := Synchronize(Top); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.ListSync : Boolean; +begin + Result := Synchronize(List); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.StatSync : Boolean; +begin + Result := Synchronize(Stat); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.QuitSync : Boolean; +begin + Result := Synchronize(Quit); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.APopSync : Boolean; +begin + Result := Synchronize(APop); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.AbortSync : Boolean; +begin + Result := Synchronize(Abort); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.RSetSync : Boolean; +begin + Result := Synchronize(RSet); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncPop3Cli.NoopSync : Boolean; +begin + Result := Synchronize(Noop); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TPop3Cli, TSyncPop3Cli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/Pop3cli.pas b/lib/ics/Delphi/Vc32/Pop3cli.pas new file mode 100644 index 00000000..e52e9692 --- /dev/null +++ b/lib/ics/Delphi/Vc32/Pop3cli.pas @@ -0,0 +1,904 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +-----------------------------------------------------------------------+ + | THIS IS AN OUTDATED COMPONENT. FOR NEW APPLICATIONS, USE POP3PROT.PAS | + | SOURCE. THE NEW POP3 COMPONENT IS ASYNCHONOUS AND MUCH FASTER. | + | YOU NEED TO CHANGE YOUR APPLICATION BECAUSE NEW COMPONENT HAS NOT | + | EXACTLY THE SAME INTERFACE. COMPONENT CLASS NAME HAS BEEN CHANGED | + | SO THAT YOU CAN INSTALL BOTH WHILE YOU ARE UPDATING YOUR APPLICATIONS.| + | THERE IS ALSO A NEW DEMO: MAILRCV.DPR. | + +-----------------------------------------------------------------------+ + | IF YOU REALLY NEED THIS OLD COMPONENT, YOU ALSO NEED AN OLD TWSOCKET! | + +-----------------------------------------------------------------------+ + +Author: Franois PIETTE +Object: TPop3Client class implements the POP3 protocol + (RFC-1225, RFC-1939) +EMail: francois.piette@pophost.eunet.be francois.piette@ping.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +WebSite: http://www.rtfm.be/fpiette +Creation: 03 october 1997 +Version: 1.16 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Sept 09, 1997 Modified TOP to be able to request 0 lines (bug reported by + damien@jetman.demon.co.uk) +Oct 10, 1997 V1.10. Published ProtocolState property, made TOP command + complies with RFC-1939 as suggested by damien@jetman.demon.co.uk + Implemented the UIDL command. +Oct 11, 1997 V1.11 Implemented the APOP command, but not tested because no + server available to test it. + Made internal error message look like POP3 error messages (-ERR) +Oct 28, 1997 V1.12 Modified TWSocket to handle line buffer overflow and + TPop3Client to handle that in GetMultiLine. +Jan 10, 1998 V1.13 Made FWSocket accessible with a read only property. This + eases DNSLookup without a supplementary TWSocket. + Added a Port property. +Apr 01, 1998 V1.14 Adapted for BCB V3 +May 05, 1998 V1.15 Changed GetMultiLine to correctly handle double dots at + line start. +Jun 01, 1998 V1.16 Ben Robinson found that Last did'nt + update MsgNum and MsgSize. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit pop3cli; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$IFNDEF VER80} { Not for Delphi 1 } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, + WinProcs, + SysUtils, + Messages, + Classes, + Graphics, + Controls, + Forms, + Dialogs, + Menus, + WSocket, + Wait, + MD5; + +const + Pop3CliVersion = 116; + +type + TPop3Display = procedure(Sender: TObject; Msg : String) of object; + TPop3State = (pop3Disconnected, pop3WaitingUser, pop3WaitingPass, pop3Transaction, pop3Update); + TPop3Method = function : boolean of object; + TPop3Client = class(TComponent) + private + FWSocket : TWSocket; + FHost : String; + FPort : String; + FUserName : String; + FPassWord : String; + FProtocolState : TPop3State; + FLastResponse : String; + FErrorMessage : String; + FTimeStamp : String; + FWait : TWait; + FTimeout : Integer; + FTimeOutFlag : Boolean; + FLineTooLong : Boolean; + FMsgCount : Integer; + FMsgSize : Integer; + FMsgNum : Integer; + FMsgUidl : String; + FMsgLines : Integer; + FTag : LongInt; + + FOnDisplay : TPop3Display; + FOnMessageBegin : TNotifyEvent; + FOnMessageEnd : TNotifyEvent; + FOnMessageLine : TNotifyEvent; + FOnListBegin : TNotifyEvent; + FOnListEnd : TNotifyEvent; + FOnListLine : TNotifyEvent; + FOnUidlBegin : TNotifyEvent; + FOnUidlEnd : TNotifyEvent; + FOnUidlLine : TNotifyEvent; + protected + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure ClearErrorMessage; + procedure SetErrorMessage; + procedure Display(Msg : String); + procedure SetWait(Value : TWait); + function GetResponse : Boolean; + procedure SendCommand(Cmd : String); + procedure WaitTimeOut(Sender : TObject); + procedure SessionClosed(Sender : TObject; Error : WORD); + procedure LineTooLong(Sender : TObject); + function ExtractNumbers(var N1 : Integer; var N2 : Integer) : Boolean; + function ExtractUidl(var N1 : Integer; var N2 : String) : Boolean; + procedure ProcessUidl(Sender : TObject); + procedure ProcessList(Sender : TObject); + function GetMultiLine(aOnBegin : TNotifyEvent; + aOnLine : TNotifyEvent; + aOnEnd : TNotifyEvent; + aProcess : TNotifyEvent) : Boolean; + function StartTransaction(OpCode, Params : String) : Boolean; + function PassRpop(OpCode : String) : Boolean; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + function Connect : Boolean; + function User : Boolean; + function Pass : Boolean; + function Quit : Boolean; + function Stat : Boolean; + function List : Boolean; + function Retr : Boolean; + function Dele : Boolean; + function Noop : Boolean; + function Last : Boolean; + function Rset : Boolean; + function Top : Boolean; + function Rpop : Boolean; + function Uidl : Boolean; + function Apop : Boolean; + property WSocket : TWSocket read FWSocket; + published + property Host : String read FHost + write FHost; + property Port : String read FPort + write FPort; + property UserName : String read FUserName + write FUserName; + property PassWord : String read FPassWord + write FPassWord; + property Wait : TWait read FWait + write SetWait; + property TimeOut : Integer read FTimeout + write FTimeout; + property ErrorMessage : String read FErrorMessage; + property LastResponse : String read FLastResponse; + property ProtocolState : TPop3State read FProtocolState; + {:Updated by the Stat method with the number of + messages in the maildrop } + property MsgCount : Integer read FMsgCount; + {:Updated by the Stat method with the total size + in byte for the messages in the maildrop } + property MsgSize : Integer read FMsgSize; + {:This is the number of lines to display in the TOP command + Set to zero if you wants the default value } + property MsgLines : Integer read FMsgLines + write FMsgLines; + {:This is the message number which must be returned by the Retr + method. It is also updated by the Last method } + property MsgNum : Integer read FMsgNum + write FMsgNum; + property MsgUidl : String read FMsgUidl; + property Tag : LongInt read FTag + write FTag; + + property OnDisplay : TPop3Display read FOnDisplay + write FOnDisplay; + property OnMessageBegin : TNotifyEvent read FOnMessageBegin + write FOnMessageBegin; + property OnMessageEnd : TNotifyEvent read FOnMessageEnd + write FOnMessageEnd; + property OnMessageLine : TNotifyEvent read FOnMessageLine + write FOnMessageLine; + property OnListBegin : TNotifyEvent read FOnListBegin + write FOnListBegin; + property OnListEnd : TNotifyEvent read FOnListEnd + write FOnListEnd; + property OnListLine : TNotifyEvent read FOnListLine + write FOnListLine; + property OnUidlBegin : TNotifyEvent read FOnUidlBegin + write FOnUidlBegin; + property OnUidlEnd : TNotifyEvent read FOnUidlEnd + write FOnUidlEnd; + property OnUidlLine : TNotifyEvent read FOnUidlLine + write FOnUidlLine; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RTrim(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LTrim(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then { Petite optimisation: pas d'espace } + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := LTrim(Rtrim(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function stpblk(PValue : PChar) : PChar; +begin + Result := PValue; + while Result^ in [' ', #9, #10, #13] do + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(PValue : PChar) : Integer; +begin + Result := 0; + PValue := stpblk(PValue); + while PValue^ in ['0'..'9'] do begin + Result := Result * 10 + ord(PValue^) - ord('0'); + Inc(PValue); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TPop3Client.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWSocket := TWSocket.Create(nil); + FWSocket.OnSessionClosed := SessionClosed; + FWSocket.OnLineTooLong := LineTooLong; + FTimeout := 15; + FProtocolState := pop3Disconnected; + FPort := 'pop3'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TPop3Client.Destroy; +begin + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Connect : Boolean; +var + I, J : Integer; +begin + Result := FALSE; + FTimeStamp := ''; + + if FWait = nil then begin + FErrorMessage := '-ERR No wait object'; + Display(FErrorMessage); + Exit; + end; + + FWait.OnTimeout := WaitTimeout; + FTimeOutFlag := FALSE; + + if FProtocolState > pop3Disconnected then begin + { Already connected, it's ok } + Result := TRUE; + Exit; + end; + + ClearErrorMessage; + + if Length(FHost) = 0 then begin + FErrorMessage := '-ERR No host specified'; + Display(FErrorMessage); + Exit; + end; + + try + FWSocket.Proto := 'tcp'; + FWSocket.Port := FPort; + FWSocket.Addr := FHost; + FWSocket.OnDataAvailable := nil; + + FWSocket.Connect; + except + on E:ESocketException do begin + FErrorMessage := '-ERR ' + E.Message; + Exit; + end; + end; + + if not FWSocket.Wait(FTimeout, wsConnected) then begin + FErrorMessage := '-ERR Can''t connect to host ''' + FHost + ''''; + Display(FErrorMessage); + FWSocket.Close; + Exit; + end; + Display('Connected with POP3 server'); + + if not GetResponse then begin + SetErrorMessage; + FWSocket.Close; + Exit; + end; + + I := Pos('<', FLastResponse); + J := Pos('>', Copy(FLastResponse, I, Length(FLastREsponse))); + if (I > 0) and (J > 0) then + FTimeStamp := Copy(FLastResponse, I, J); + + FProtocolState := pop3WaitingUser; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Quit : Boolean; +begin + if FProtocolState = pop3Disconnected then begin + { Not connected, it's ok } + Result := TRUE; + Exit; + end; + + try + SendCommand('QUIT'); + Result := GetResponse; + except + Result := FALSE; + end; + + FProtocolState := pop3Disconnected; + FWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.User : Boolean; +begin + Result := FALSE; + if FProtocolState > pop3WaitingUser then begin + FErrorMessage := '-ERR USER command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if (FProtocolState = pop3Disconnected) and (not Connect) then + Exit; + + SendCommand('USER ' + Trim(FUserName)); + if not GetResponse then + Exit; + Result := TRUE; + FProtocolState := pop3WaitingPass; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Apop : Boolean; +begin + Result := FALSE; + if FProtocolState > pop3WaitingUser then begin + FErrorMessage := '-ERR APOP command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if (FProtocolState = pop3Disconnected) and (not Connect) then + Exit; + + if FTimeStamp = '' then begin + FErrorMessage := '-ERR Server do not support APOP (no timestamp)'; + Display(FErrorMessage); + Exit; + end; + + SendCommand('APOP ' + Trim(FUserName)+ ' ' + + StrMD5(FTimeStamp + FPassWord)); + if not GetResponse then + Exit; + Result := TRUE; + FProtocolState := pop3WaitingPass; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Pass : Boolean; +begin + Result := PassRpop('PASS'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Rpop : Boolean; +begin + Result := PassRpop('RPOP'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.PassRpop(OpCode : String) : Boolean; +begin + Result := FALSE; + if FProtocolState > pop3WaitingPass then begin + FErrorMessage := '-ERR ' + OpCode + ' command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if (FProtocolState < pop3WaitingPass) and (not User) then + Exit; + + SendCommand(OpCode + ' ' + Trim(FPassWord)); + if not GetResponse then + Exit; + Result := TRUE; + FProtocolState := pop3Transaction; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Retr : Boolean; +begin + Result := StartTransaction('RETR', IntToStr(FMsgNum)); + if not Result then + Exit; + Result := GetMultiLine(FOnMessageBegin, FOnMessageLine, FOnMessageEnd, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Stat : Boolean; +begin + FMsgCount := 0; + FMsgSize := 0; + + Result := StartTransaction('STAT', ''); + if not Result then + Exit; + + Result := ExtractNumbers(FMsgCount, FMsgSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.ProcessUidl(Sender : TObject); +begin + ExtractUidl(FMsgNum, FMsgUidl); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.ProcessList(Sender : TObject); +begin + ExtractNumbers(FMsgNum, FMsgSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.List : Boolean; +begin + if FMsgNum <= 0 then begin + { Scan LIST command (all messages) } + Result := StartTransaction('LIST', ''); + if not Result then + Exit; + Result := GetMultiLine(FOnListBegin, FOnListLine, + FOnListEnd, ProcessList); + end + else begin + { Single message LIST command } + Result := StartTransaction('LIST', IntToStr(FMsgNum)); + if not Result then + Exit; + Result := ExtractNumbers(FMsgNum, FMsgSize); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Uidl : Boolean; +begin + if FMsgNum <= 0 then begin + { UIDL command (all messages) } + Result := StartTransaction('UIDL', ''); + if not Result then + Exit; + Result := GetMultiLine(FOnUidlBegin, FOnUidlLine, + FOnUidlEnd, ProcessUidl); + end + else begin + { Single message UIDL command } + Result := StartTransaction('UIDL', IntToStr(FMsgNum)); + if not Result then + Exit; + Result := ExtractUidl(FMsgNum, FMsgUidl); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Dele : Boolean; +begin + Result := StartTransaction('DELE', IntToStr(FMsgNum)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Noop : Boolean; +begin + Result := StartTransaction('NOOP', ''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Last : Boolean; +begin + Result := StartTransaction('LAST', ''); + if Result then + Result := ExtractNumbers(FMsgNum, FMsgSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Rset : Boolean; +begin + Result := StartTransaction('RSET', ''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Top : Boolean; +begin + if FMsgLines < 0 then + Result := FALSE + else + Result := StartTransaction('TOP' , IntToStr(FMsgNum) + ' ' + + IntToStr(FMsgLines)); + if not Result then + Exit; + Result := GetMultiLine(FOnMessageBegin, FOnMessageLine, FOnMessageEnd, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.StartTransaction(OpCode, Params : String) : Boolean; +begin + Result := FALSE; + + if (FProtocolState < pop3Transaction) and (not Pass) then + Exit; + + if FProtocolState <> pop3Transaction then begin + FErrorMessage := '-ERR ' + OpCode + ' command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if Params <> '' then + SendCommand(OpCode + ' ' + Params) + else + SendCommand(OpCode); + + Result := GetResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.GetMultiLine( + aOnBegin : TNotifyEvent; + aOnLine : TNotifyEvent; + aOnEnd : TNotifyEvent; + aProcess : TNotifyEvent) : Boolean; +var + bFlag : Boolean; +begin + { Let the application know that the message is beginning } + if Assigned(aOnBegin) then + aOnBegin(Self); + + bFlag := FALSE; + try + while TRUE do begin + { Read a message line } + FLineTooLong := FALSE; + if FWSocket.State = wsConnected then + FWSocket.ReadLine(FTimeout, FLastResponse); + + { Check if we are still connected } + if FWSocket.State <> wsConnected then begin + FErrorMessage := '-ERR Disconneced unexpectedly'; + Display(FErrorMessage); + break; + end; + + { Check if we timed out } + if FTimeOutFlag then begin + FErrorMessage := '-ERR Receive Timeout'; + Display(FErrorMessage); + break; + end; + + { Check if end of message } + if (not bFlag) and (FLastResponse = '.') then begin + FLastResponse := ''; + break; + end; + + { Check if message contains end-of-message mark } + if (Length(FLastResponse) >= 2) and + (FLastResponse[1] = '.') and (FLastResponse[2] = '.') then + { Remove byte-stuff } + FLastResponse := Copy(FLastResponse, 2, Length(FLastResponse)); + + { Additional process } + if Assigned(aProcess) then + aProcess(Self); + + { Let the application process the message line } + if Assigned(aOnLine) then + aOnLine(Self); + + bFlag := FLineTooLong; + + { Let other application breaze } + Application.ProcessMessages; + end; + finally + { Let the application know that the message is finished } + if Assigned(aOnEnd) then + aOnEnd(Self); + end; + + Result := not FTimeOutFlag; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.ExtractUidl(var N1 : Integer; var N2 : String) : Boolean; +var + p : PChar; +begin + Result := FALSE; + N1 := 0; + N2 := ''; + +{$IFDEF VER80} + { Delphi 1 do not automatically nul terminate strings } + FLastResponse := FLastResponse + #0; +{$ENDIF} + + { Search for first digit in response } + p := @FLastResponse[1]; + while (p^ <> #0) and (not (p^ in ['0'..'9'])) do + Inc(p); + if p^ = #0 then { Invalid response, need a number } + Exit; + + { Convert first number } + N1 := atoi(p); + + { Search end of number } + while (p^ <> #0) and (p^ in ['0'..'9']) do + Inc(p); + + { Search Uidl } + while (p^ = ' ') do + Inc(p); + + { Copy UIDL } + while (p^ <> #0) and (p^ in [#33..#126]) do begin + N2 := N2 + p^; + Inc(p); + end; + + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.ExtractNumbers(var N1 : Integer; var N2 : Integer) : Boolean; +var + p : PChar; +begin + Result := FALSE; + +{$IFDEF VER80} + { Delphi 1 do not automatically nul terminate strings } + FLastResponse := FLastResponse + #0; +{$ENDIF} + + { Search for first digit in response } + p := @FLastResponse[1]; + while (p^ <> #0) and (not (p^ in ['0'..'9'])) do + Inc(p); + if p^ = #0 then begin + { Invalid response, need a number } + N1 := 0; + N2 := 0; + Exit; + end; + + { Convert first number } + N1 := atoi(p); + + { Search end of number } + while (p^ <> #0) and (p^ in ['0'..'9']) do + Inc(p); + + { Search next number } + p := stpblk(p); + + if p^ = #0 then begin + { Invalid response, need a number } + N1 := 0; + N2 := 0; + Exit; + end; + + N2 := atoi(p); + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.WaitTimeOut(Sender : TObject); +begin + FTimeOutFlag := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.LineTooLong(Sender : TObject); +begin + FLineTooLong := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SessionClosed(Sender : TObject; Error : WORD); +begin + if Assigned(FWait) then + FWait.Stop; + FProtocolState := pop3Disconnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SendCommand(Cmd : String); +begin + Display('> ' + Cmd); + Application.ProcessMessages; + FWSocket.SendStr(Cmd + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.GetResponse : Boolean; +begin + FWSocket.ReadLine(FTimeout, FLastResponse); + Display('< ' + FLastResponse); + Result := ((Length(FLastResponse) > 0) and (FLastResponse[1] = '+')); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SetWait(Value : TWait); +begin + FWait := Value; + FWSocket.WaitCtrl := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then begin + if AComponent = FWait then + FWait := nil + else if AComponent = FWSocket then + FWSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.Display(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.ClearErrorMessage; +begin + FErrorMessage := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SetErrorMessage; +begin + if FErrorMessage = '' then + FErrorMessage := FLastResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TPop3Client]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/SmtpProt.dcr b/lib/ics/Delphi/Vc32/SmtpProt.dcr new file mode 100644 index 00000000..a94ff29f Binary files /dev/null and b/lib/ics/Delphi/Vc32/SmtpProt.dcr differ diff --git a/lib/ics/Delphi/Vc32/SmtpProt.dcu b/lib/ics/Delphi/Vc32/SmtpProt.dcu new file mode 100644 index 00000000..06d65f9c Binary files /dev/null and b/lib/ics/Delphi/Vc32/SmtpProt.dcu differ diff --git a/lib/ics/Delphi/Vc32/SmtpProt.pas b/lib/ics/Delphi/Vc32/SmtpProt.pas new file mode 100644 index 00000000..56e28501 --- /dev/null +++ b/lib/ics/Delphi/Vc32/SmtpProt.pas @@ -0,0 +1,2427 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: TSmtpCli class implements the SMTP protocol (RFC-821) + Support file attachement using MIME format (RFC-1521) + Support authentification (RFC-2104) +Creation: 09 october 1997 +Version: 2.32 +EMail: http://www.overbyte.be http://www.rtfm.be/fpiette + francois.piette@overbyte.be francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Oct 25, 1997 Added the OnHeaderLine event to allow modification/deletion of + header lines. +Oct 26, 1997 V1.00 Released + Changed the OnGetData event arguments to have code compatible + between 16 and 32 bit versions (replaced string with PChar). +Jan 10, 1998 V1.01 Added a Port property +Feb 14, 1998 V1.02 Added an intermeditae TCustomSmtpClient in order to + support MIME in the TSmtpCli. I implemented MIME with the + help of code donated by Brad Choate + Mime is used for file attachement. + Added a SetRcptName to copy values from a string list in place + of copying the string list reference. +Feb 15, 1998 V1.03 Added a CharSet property, defaulting to iso-8859-1 +Mar 02, 1998 V1.04 Corrected result for QUIT command. + Marcus Schmutz +Mar 06, 1998 V1.05 Use OnDataSent event to prenvent over-buffering +Mar 15, 1998 V1.06 Implemented the Date header line +Apr 01, 1998 V1.07 Adapted for BCB V3 +Apr 10, 1998 V1.08 Corrected DayNames: sunday is day 1, saturday is day 7. + Changed UUEncode procedures to virtual methods to ease component + inheritance. +Apr 26, 1998 V1.09 Ignore any empty file name (a very common error !) + Check if file exists and raise an exception if not. + Made Rfc822DateTime public. + Added Rset method from Victor Garcia Aprea + Added Abort procedure to close the socket and abort any operation + Made the underlaying TWSocket accessible using a property. +Apr 28, 1998 V1.10 Reset FTimeOutFlag in the mail procedure. +May 05, 1998 V1.11 Handled correctly lines beginning with a dot. +May 21, 1998 V1.12 Check for nil argument in SetEMailFiles + Added OnCommand and OnResponse events. + Added SendDataLine procedure (same as SendCommand, but do not + trigger OnCommand event) used for header and message lines. +Jul 29, 1998 V2.00 Asynchronous functions and new TSyncSmtpCli component + to be a placer holder for synchronous version. + Renamed source file from SmtpCli to SmtpProt. +Aug 06, 1998 V2.01 Made HighLevelAsync public and added smtpCustom to be used + for custom calls to HighLevelAsync. +Sep 22, 1998 V2.02 Removed useless Wait unit from the uses clause. +Oct 04, 1998 V2.03 Checked for Error in TriggerRequestDone. +Oct 11, 1998 V2.04 Removed -1 in DataNext. Thanks to Dennis V. Turov + for finding this bug. +Nov 22, 1998 V2.05 Implemented VRFY command with code proposed by + DZ-Jay but use HdrTo property as name to verify. +Nov 29, 1998 V2.06 Added SetErrorMessage in WSocketSessionConnected when an + error occured. Thanks to DZ-Jay. + Changed FMimeBoundary format to use numbered month instead of + month names. Thanks to Dmitry Kislov who + found that some foreign charsets are invalid in mime boundaries. +Dec 22, 1998 V2.07 Handle exception when connecting (will be triggered when + an invalid port has been given). + Force readonly when reading attached files. + Added ContentType property as suggested by Henri Fournier + +Feb 13, 1999 V2.08 Published the state property and OnSessionConnected, + OnSessionClosed events. +Feb 27, 1999 V2.09 Added Connected property. + Added code from Larry Pesyna to handle time + zone bias. + Added OnAttachContentType event. Thanks to Vladimir M. + Zakharychev for his suggestion. + Added ReplyTo and ReturnPath properties. Thanks to Eric Bullen + for his code. +Mar 06, 1999 V2.10 Conditional compile to remove timezone code unsupported by + Delphi 1. +Mar 09, 1999 V2.11 Made state property [really] published. +Mar 27, 1999 V2.12 Published OnProcessHeader + Changed sign for time zone bias (thanks to Larry Pesyna). +May 10, 1999 V2.13 'daylight' functionality for timezonebias function. + Thanks to Bernhard Goebel + Do not set FRequestType in Connect when called from HighLevel + function. Thanks to Eugene V. Krapivin . +May 18, 1999 V2.14 Added Sender field. If ommited, the sender is becomes + HdrFrom. Jon Glazer +Jul 30, 1999 V2.15 Added MailMessage property by Thomas Kvamme + . MailMessage property can be used with + OnGetData event. If both are used, MailMessages lines appears + before lines got by OnGetData. +Oct 02, 1999 V2.16 Added OnAttachHeader event as suggested by Vladimir M. + Zakharychev + Accept friendly EMail addresses. Thanks to Thierry De Leeuw + for his code. +Nov 01, 1999 V2.17 Made all fields protected to easy component inheritance. +Oct 15, 2000 V2.18 Check for too long lines in TriggerGetData. + Thanks to Steve Williams +Jun 18, 2001 V2.19 Use AllocateHWnd and DeallocateHWnd from wsocket. + Renamed property WSocket to CtrlSocket (this require code change + in user application too). +Jul 26, 2001 V2.20 Angus Robertson found a problem when + using the MailSync method that it's not possible to send a body + that takes longer than the timeout in WaitUntilReady. Timeout has + to be reevaluated in TriggerGetData. + Jake Traynham added authentification and + EHLO code. Well done job. +Aug 18, 2001 V2.21 Angus V2.21 added OwnHeaders property flag which allows + mail relaying where the body includes all headers and none are + added by the component +Sep 09, 2001 V2.22 Beat Boegli added LocalAddr property + for multihomed hosts. +Dec 24, 2001 V2.23 Added support for NOFORMS (console mode without Forms unit). + Added X-Mailer header line. +Jan 09, 2001 V2.24 Corrected WSocketDnsLookupDone where FRequestResult was not + properly set with errorcode. Corrected DoHighLevelAsync to set + RequestResult to 426 when aborting. Found by "SJF" . +Mar 17, 2002 V2.25 Check for FRequestType = smtpQuit in NextExecAsync to avoid + calling OnRequestDone before remote server has closed connection. + And in WSocketSessionClosed, check if last command was smtpQuit + to select proper error code for OnRequestDone event. + Lot of peoples helped find this one (Alphabetical order): + David Colliver + DZ-Jay + Max Terentiev + Roger Morton + Wilfried Mestdagh +Apr 01, 2002 V2.26 TriggerRequestDone with correct winsock error in + WSocketDnsLookupDone. Thanks to DZ [dz@caribe.net] and + Roger Morton [roger@chez-morton.com] for fixing this bug. +Apr 20, 2002 V2.27 Enhance NOFORMS mode. +Apr 24, 2002 V2.28 Return real error code in case of error in + WSocketDnsLookupDone. Thanks to DZ-Jay . +Sep 07, 2002 V2.29 Added HdrCc property to send mail to CC. +Oct 26, 2002 V2.30 Revised Rfc822DateTime function. +Nov 01, 2002 V2.31 Changed arguments for event from PChar to Pointer to avoid + Delphi 7 bug with PCHar <-> AnsiChar. This will require small + changes in your application: change PChar to Pointer in your + event handler and probably add a PChar cast when using the args. +Nov 11, 2002 V2.32 Revised for Delphi 1 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit SmtpProt; + +interface + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER130} { C++ Builder V5.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER140} { C++ Builder V6.0 } + {$ObjExportAll On} +{$ENDIF} + +uses + WinTypes, WinProcs, SysUtils, Messages, Classes, +{$IFNDEF NOFORMS} + Forms, Controls, +{$ENDIF} + WSocket, WinSock, MD5; + +const + SmtpCliVersion = 232; + CopyRight : String = ' SMTP component (c) 1997-2002 Francois Piette V2.32 '; +{$IFDEF VER80} + { Delphi 1 has a 255 characters string limitation } + SMTP_RCV_BUF_SIZE = 255; +{$ELSE} + SMTP_RCV_BUF_SIZE = 4096; +{$ENDIF} + WM_SMTP_REQUEST_DONE = WM_USER + 1; + +type + SmtpException = class(Exception); + TSmtpState = (smtpReady, smtpDnsLookup, + smtpConnecting, smtpConnected, + smtpInternalReady, smtpWaitingBanner, + smtpWaitingResponse, smtpAbort); + TSmtpRequest = (smtpConnect, smtpHelo, smtpMailFrom, + smtpVrfy, smtpRcptTo, smtpData, + smtpQuit, smtpRset, smtpOpen, + smtpMail, smtpEhlo, smtpAuth, + smtpCustom); + TSmtpFct = (smtpFctNone, smtpFctHelo, smtpFctConnect, + smtpFctMailFrom, smtpFctRcptTo, smtpFctData, + smtpFctVrfy, smtpFctQuit, smtpFctRset, + smtpFctEhlo, smtpFctAuth); + TSmtpFctSet = set of TSmtpFct; + TSmtpContentType = (smtpHTML, smtpPlainText); + TSmtpAuthType = (smtpAuthNone, smtpAuthPlain, smtpAuthLogin, + smtpAuthCramMD5); + + TSmtpDisplay = procedure(Sender : TObject; + Msg : String) of object; + TSmtpHeaderLineEvent = procedure(Sender : TObject; + Msg : Pointer; + Size : Integer) of object; + TSmtpProcessHeaderEvent = procedure(Sender : TObject; + HdrLines : TStrings) of object; + TSmtpGetDataEvent = procedure(Sender : TObject; + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More: Boolean) of object; + TSmtpRequestDone = procedure(Sender : TObject; + RqType : TSmtpRequest; + ErrorCode : Word) of object; + TSmtpAttachmentContentType = procedure(Sender : TObject; + FileNumber : Integer; + var FileName : String; + var ContentType : String) of object; + TSmtpAttachHeader = procedure(Sender : TObject; + FileNumber : Integer; + FileName : String; + HdrLines : TStrings) of object; + TSmtpNextProc = procedure of object; + + { Base component, implementing the transport, without MIME support } + TCustomSmtpClient = class(TComponent) + protected + FWSocket : TWSocket; { Underlaying socket } + FHost : String; { SMTP server hostname or IP } + FLocalAddr : String; {bb} { Local Address for mulithome } + FPort : String; { Should be 'smtp' } + FSignOn : String; { Used for the 'HELO' command } + FUsername : String; { Used with the 'AUTH' command } + FPassword : String; { Used with the 'AUTH' command } + FAuthType : TSmtpAuthType;{ Used with the 'AUTH' command } + FFromName : String; { Sender's EMail } + FRcptName : TStrings; { Recepients EMails list } + FMailMessage : TStrings; + FHdrFrom : String; + FHdrTo : String; + FHdrCc : String; + FHdrReplyTo : String; + FHdrReturnPath : String; + FHdrSubject : String; + FHdrSender : String; { Mail Sender's Email } + FState : TSmtpState; + FCharSet : String; + FContentType : TSmtpContentType; + FContentTypeStr : String; + FLastResponse : String; + FErrorMessage : String; + FTag : LongInt; + FConnected : Boolean; + FESmtpSupported : Boolean; + FRequestType : TSmtpRequest; + FRequestDoneFlag : Boolean; + FReceiveLen : Integer; + FRequestResult : Integer; + FStatusCode : Integer; + FReceiveBuffer : array [0..SMTP_RCV_BUF_SIZE - 1] of char; + FNext : TSmtpNextProc; + FWhenConnected : TSmtpNextProc; + FFctSet : TSmtpFctSet; + FFctPrv : TSmtpFct; + FHighLevelResult : Integer; + FHighLevelFlag : Boolean; + FNextRequest : TSmtpNextProc; + FLastResponseSave : String; + FStatusCodeSave : Integer; + FRestartFlag : Boolean; + FOkResponses : array [0..15] of Integer; + FDoneAsync : TSmtpNextProc; + FWindowHandle : HWND; + FItemCount : LongInt; + FHdrLines : TStrings; + FLineNum : Integer; + FMoreLines : Boolean; + FOwnHeaders : Boolean ; { Angus V2.21 } + FOnDisplay : TSmtpDisplay; + FOnCommand : TSmtpDisplay; + FOnResponse : TSmtpDisplay; + FOnGetData : TSmtpGetDataEvent; + FOnHeaderLine : TSmtpHeaderLineEvent; + FOnProcessHeader : TSmtpProcessHeaderEvent; + FOnRequestDone : TSmtpRequestDone; + FOnStateChange : TNotifyEvent; + FOnSessionConnected : TSessionConnected; + FOnSessionClosed : TSessionClosed; + function SmtpClientAllocateHWnd(Method: TWndMethod): HWND; + procedure SmtpClientDeallocateHWnd(WHandle: HWND); + procedure TriggerDisplay(Msg : String); virtual; + procedure TriggerCommand(Msg : String); virtual; + procedure TriggerResponse(Msg : String); virtual; + procedure TriggerRequestDone(ErrorCode : Word); virtual; + procedure TriggerStateChange; virtual; + procedure TriggerGetData(LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); virtual; + procedure TriggerHeaderLine(Line : Pointer; Size : Integer); virtual; + procedure TriggerProcessHeader(HdrLines : TStrings); virtual; + procedure TriggerSessionConnected(ErrorCode : Word); virtual; + procedure TriggerSessionClosed(ErrorCode : Word); virtual; + procedure ClearErrorMessage; + procedure SetErrorMessage; + procedure StateChange(NewState : TSmtpState); + procedure SendCommand(Cmd : String); virtual; + procedure SetRcptName(newValue : TStrings); + procedure SetMailMessage(newValue : TStrings); + procedure InitUUEncode(var hFile: File; sFile: string); virtual; + procedure DoUUEncode(var hFile: File; var sLine: string; var More: boolean); virtual; + procedure EndUUEncode(var hFile: File); virtual; + procedure CheckReady; + procedure WSocketDnsLookupDone(Sender: TObject; ErrorCode: Word); + procedure WSocketSessionConnected(Sender: TObject; ErrorCode: Word); + procedure WSocketDataAvailable(Sender: TObject; ErrorCode: Word); + procedure WSocketDataSent(Sender : TObject; ErrorCode : Word); + procedure WSocketSessionClosed(Sender : TObject; ErrorCode : WORD); + procedure DisplayLastResponse; + procedure DoHighLevelAsync; + procedure ExecAsync(RqType : TSmtpRequest; + Cmd : String; + OkResponses : array of Word; + DoneAsync : TSmtpNextProc); + procedure NextExecAsync; + procedure EhloNext; + procedure AuthNextLogin; + procedure AuthNextLoginNext; + procedure AuthNextCramMD5; + procedure RcptToNext; + procedure RcptToDone; + procedure DataNext; + procedure WndProc(var MsgRec: TMessage); virtual; + procedure WMSmtpRequestDone(var msg: TMessage); + message WM_SMTP_REQUEST_DONE; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure Connect; virtual; { Connect to the mail server } + procedure Helo; virtual; { Send the HELO command } + procedure Ehlo; virtual; { Send the EHLO command } + procedure Auth; virtual; { Send the AUTH command } + procedure Vrfy; virtual; { Send the VRFY command } + procedure MailFrom; virtual; { Send the MAILFROM command } + procedure RcptTo; virtual; { Send RECPTTO command } + procedure Data; virtual; { Send DATA command } + procedure Quit; virtual; { Send QUITE command, close } + procedure Rset; virtual; { Send RSET command } + procedure Abort; virtual; { Abort opertaion, close } + procedure Open; virtual; { Connect, Helo/Ehlo, Auth } + procedure Mail; virtual; { MailFrom, RcptTo, Data } + + property CtrlSocket : TWSocket read FWSocket; + property Handle : HWND read FWindowHandle; + property Connected : Boolean read FConnected; + procedure HighLevelAsync(RqType : TSmtpRequest; Fcts : TSmtpFctSet); + procedure SetContentType(newValue : TSmtpContentType); + protected + property Host : String read FHost + write FHost; + property LocalAddr : String read FLocalAddr {bb} + write FLocalAddr; {bb} + property Port : String read FPort + write FPort; + property SignOn : String read FSignOn + write FSignOn; + property Username : String read FUsername + write FUsername; + property Password : String read FPassword + write FPassword; + property AuthType : TSmtpAuthType read FAuthType + write FAuthType; + property FromName : String read FFromName + write FFromName; + property RcptName : TStrings read FRcptName + write SetRcptName; + property MailMessage : TStrings read FMailMessage + write SetMailMessage; + property HdrFrom : String read FHdrFrom + write FHdrFrom; + property HdrTo : String read FHdrTo + write FHdrTo; + property HdrCc : String read FHdrCc + write FHdrCc; + property HdrReplyTo : String read FHdrReplyTo + write FHdrReplyTo; + property HdrReturnPath : String read FHdrReturnPath + write FHdrReturnPath; + property HdrSubject : String read FHdrSubject + write FHdrSubject; + property HdrSender: String read FHdrSender + write FHdrSender; + property CharSet : String read FCharSet + write FCharSet; + property ContentType : TSmtpContentType read FContentType + write SetContentType; + property ErrorMessage : String read FErrorMessage; + property LastResponse : String read FLastResponse; + property State : TSmtpState read FState; + property Tag : LongInt read FTag + write FTag; + property OwnHeaders : Boolean read FOwnHeaders + { Angus V2.21 } write FOwnHeaders; + property OnDisplay : TSmtpDisplay read FOnDisplay + write FOnDisplay; + property OnCommand: TSmtpDisplay read FOnCommand + write FOnCommand; + property OnResponse: TSmtpDisplay read FOnResponse + write FOnResponse; + property OnGetData : TSmtpGetDataEvent read FOnGetData + write FOnGetData; + property OnHeaderLine : TSmtpHeaderLineEvent read FOnHeaderLine + write FOnHeaderLine; + property OnProcessHeader : TSmtpProcessHeaderEvent + read FOnProcessHeader + write FOnProcessHeader; + property OnRequestDone : TSmtpRequestDone read FOnRequestDone + write FOnRequestDone; + property OnStateChange : TNotifyEvent read FOnStateChange + write FOnStateChange; + property OnSessionConnected : TSessionConnected + read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TSessionClosed + read FOnSessionClosed + write FOnSessionClosed; + end; + + { Descending component adding MIME (file attach) support } + TSmtpCli = class(TCustomSmtpClient) + protected + FEmailBody : TStrings; { Message body text } + FEmailFiles : TStrings; { File names for attachment } + FCurrentFile : Integer; { Current file being sent } + FMimeBoundary : String; { Message parts boundary } + FFile : File; + FFileStarted : Boolean; + FBodyFlag : Boolean; + FBodyLine : Integer; + FOnAttachContentType : TSmtpAttachmentContentType; + FOnAttachHeader : TSmtpAttachHeader; + procedure TriggerAttachContentType(FileNumber : Integer; + var FileName : String; + var ContentType : String); virtual; + procedure TriggerAttachHeader(FileNumber : Integer; + FileName : String; + HdrLines : TStrings); virtual; + procedure TriggerGetData(LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); override; + procedure TriggerHeaderLine(Line : Pointer; Size : Integer); override; + procedure SetEMailFiles(newValue : TStrings); + procedure PrepareEMail; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure Data; override; + published + property Host; + property LocalAddr; {bb} + property Port; + property SignOn; + property Username; + property Password; + property AuthType; + property FromName; + property RcptName; + property MailMessage; + property HdrFrom; + property HdrTo; + property HdrCc; + property HdrReplyTo; + property HdrReturnPath; + property HdrSubject; + property HdrSender; + property State; + property CharSet; + property ContentType; + property ErrorMessage; + property LastResponse; + property Tag; + property OwnHeaders ; { Angus V2.21 } + property OnDisplay; + property OnCommand; + property OnResponse; + property OnGetData; + property OnHeaderLine; + property OnProcessHeader; + property OnRequestDone; + property OnSessionConnected; + property OnSessionClosed; + property EmailFiles : TStrings read FEmailFiles + write SetEmailFiles; + property OnAttachContentType : TSmtpAttachmentContentType + read FOnAttachContentType + write FOnAttachContentType; + property OnAttachHeader : TSmtpAttachHeader read FOnAttachHeader + write FOnAttachHeader; + end; + + { TSyncSmtpCli add synchronous functions. You should avoid using this } + { component because synchronous function, apart from being easy, result } + { in lower performance programs. } + TSyncSmtpCli = class(TSmtpCli) + protected + FTimeout : Integer; { Given in seconds } + FTimeStop : LongInt; { Milli-seconds } + FMultiThreaded : Boolean; + function WaitUntilReady : Boolean; virtual; + function Synchronize(Proc : TSmtpNextProc) : Boolean; + procedure TriggerGetData(LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); override; + public + constructor Create(AOwner : TComponent); override; + function ConnectSync : Boolean; virtual; + function HeloSync : Boolean; virtual; + function EhloSync : Boolean; virtual; + function AuthSync : Boolean; virtual; + function VrfySync : Boolean; virtual; + function MailFromSync : Boolean; virtual; + function RcptToSync : Boolean; virtual; + function DataSync : Boolean; virtual; + function QuitSync : Boolean; virtual; + function RsetSync : Boolean; virtual; + function AbortSync : Boolean; virtual; + function OpenSync : Boolean; virtual; + function MailSync : Boolean; virtual; + published + property Timeout : Integer read FTimeout + write FTimeout; + property MultiThreaded : Boolean read FMultiThreaded + write FMultiThreaded; + end; + +{ Function to convert a TDateTime to an RFC822 timestamp string } +function Rfc822DateTime(t : TDateTime) : String; + +procedure Register; + +implementation + +{$B-} { Partial boolean evaluation } + +type + TLookup = array [0..64] of Char; + TLookup2 = array[0..127] of Byte; + +const + Base64Out: TLookup = + ( + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '=' + ); + Base64In: TLookup2 = + ( + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 255, 255, 255, 64, 255, 255, 255, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 255, 255, 255, 255, 255 + ); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RTrim(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LTrim(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then { Petite optimisation: pas d'espace } + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := LTrim(Rtrim(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function stpblk(PValue : PChar) : PChar; +begin + Result := PValue; + while Result^ in [' ', #9, #10, #13] do + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Base64Encode(Input : String) : String; +var + Final : String; + Count : Integer; + Len : Integer; +begin + Final := ''; + Count := 1; + Len := Length(Input); + while Count <= Len do begin + Final := Final + Base64Out[(Byte(Input[Count]) and $FC) shr 2]; + if (Count + 1) <= Len then begin + Final := Final + Base64Out[((Byte(Input[Count]) and $03) shl 4) + + ((Byte(Input[Count+1]) and $F0) shr 4)]; + if (Count+2) <= Len then begin + Final := Final + Base64Out[((Byte(Input[Count+1]) and $0F) shl 2) + + ((Byte(Input[Count+2]) and $C0) shr 6)]; + Final := Final + Base64Out[(Byte(Input[Count+2]) and $3F)]; + end + else begin + Final := Final + Base64Out[(Byte(Input[Count+1]) and $0F) shl 2]; + Final := Final + '='; + end + end + else begin + Final := Final + Base64Out[(Byte(Input[Count]) and $03) shl 4]; + Final := Final + '=='; + end; + Count := Count + 3; + end; + Result := Final; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Base64Decode(Input : String) : String; +var + Final : String; + Count : Integer; + Len : Integer; + DataIn0 : Byte; + DataIn1 : Byte; + DataIn2 : Byte; + DataIn3 : Byte; +begin + Final := ''; + Count := 1; + Len := Length(Input); + while Count <= Len do begin + DataIn0 := Base64In[Byte(Input[Count])]; + DataIn1 := Base64In[Byte(Input[Count+1])]; + DataIn2 := Base64In[Byte(Input[Count+2])]; + DataIn3 := Base64In[Byte(Input[Count+3])]; + + Final := Final + Char(((DataIn0 and $3F) shl 2) + + ((DataIn1 and $30) shr 4)); + if DataIn2 <> $40 then begin + Final := Final + Char(((DataIn1 and $0F) shl 4) + + ((DataIn2 and $3C) shr 2)); + if DataIn3 <> $40 then + Final := Final + Char(((DataIn2 and $03) shl 6) + + (DataIn3 and $3F)); + end; + Count := Count + 4; + end; + Result := Final; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$I+} { Activate I/O check (EInOutError exception generated) } + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.InitUUEncode(var hFile: File; sFile: string); +var + OldFileMode : Byte; +begin + AssignFile(hFile, sFile); + OldFileMode := FileMode; + FileMode := 0; { Force readonly } + try + Reset(hFile, 1); + finally + FileMode := OldFileMode; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.DoUUEncode(var hFile: File; var sLine: string; var More: boolean); +var + Count : integer; + DataIn : array [0..2] of byte; + DataOut : array [0..80] of byte; + ByteCount : integer; + i : integer; +begin + Count := 0; +{$I-} + while not Eof(hFile) do begin +{$I+} + BlockRead(hFile, DataIn, 3, ByteCount); + DataOut[Count] := (DataIn[0] and $FC) shr 2; + DataOut[Count + 1] := (DataIn[0] and $03) shl 4; + if ByteCount > 1 then begin + DataOut[Count + 1] := DataOut[Count + 1] + + (DataIn[1] and $F0) shr 4; + DataOut[Count + 2] := (DataIn[1] and $0F) shl 2; + if ByteCount > 2 then begin + DataOut[Count + 2] := DataOut[Count + 2] + + (DataIn[2] and $C0) shr 6; + DataOut[Count + 3] := (DataIn[2] and $3F); + end + else begin + DataOut[Count + 3] := $40; + end; + end + else begin + DataOut[Count + 2] := $40; + DataOut[Count + 3] := $40; + end; + + for i := 0 to 3 do + DataOut[Count + i] := Byte(Base64Out[DataOut[Count + i]]); + + Count := Count + 4; + + if Count > 59 then + break; + end; + + DataOut[Count] := $0; + sLine := StrPas(@DataOut[0]); + +{$I-} + More := not Eof(hFile); +{$I+} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.EndUUEncode(var hFile: File); +begin + CloseFile(hFile); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NOFORMS} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function SmtpClientWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TObject; + MsgRec : TMessage; +begin + { At window creation asked windows to store a pointer to our object } + Obj := TObject(GetWindowLong(ahWnd, 0)); + + { If the pointer doesn't represent a TCustomSmtpClient, just call the default procedure} + if not (Obj is TCustomSmtpClient) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass parameter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + { May be a try/except around next line is needed. Not sure ! } + TCustomSmtpClient(Obj).WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSmtpClient.SmtpClientAllocateHWnd(Method: TWndMethod) : HWND; +begin +{$IFDEF NOFORMS} + Result := XSocketAllocateHWnd(Self); + SetWindowLong(Result, GWL_WNDPROC, LongInt(@SmtpClientWindowProc)); +{$ELSE} + Result := WSocket.AllocateHWnd(Method); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SmtpClientDeallocateHWnd(WHandle : HWND); +begin +{$IFDEF NOFORMS} + XSocketDeallocateHWnd(WHandle); +{$ELSE} + WSocket.DeallocateHWnd(WHandle); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomSmtpClient.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWindowHandle := SmtpClientAllocateHWnd(WndProc); + FWSocket := TWSocket.Create(nil); + FWSocket.OnSessionClosed := WSocketSessionClosed; + FState := smtpReady; + FRcptName := TStringList.Create; + FMailMessage := TStringList.Create; + FPort := 'smtp'; + FCharSet := 'iso-8859-1'; + FAuthType := smtpAuthNone; + FLocalAddr := '0.0.0.0'; {bb} + SetContentType(smtpPlainText); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomSmtpClient.Destroy; +begin + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + if Assigned(FHdrLines) then begin + FHdrLines.Destroy; + FHdrLines := nil; + end; + + FMailMessage.Destroy; + FRcptName.Destroy; + + SmtpClientDeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + case Msg of + WM_SMTP_REQUEST_DONE : WMSmtpRequestDone(MsgRec); + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WMSmtpRequestDone(var msg: TMessage); +begin + if Assigned(FOnRequestDone) then + FOnRequestDone(Self, FRequestType, Msg.LParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetInteger(Data : PChar; var Number : Integer) : PChar; +var + bSign : Boolean; +begin + Number := 0; + Result := StpBlk(Data); + + if (Result = nil) then + Exit; + + { Remember the sign } + if Result^ in ['-', '+'] then begin + bSign := (Result^ = '-'); + Inc(Result); + end + else + bSign := FALSE; + + { Convert any number } + while (Result^ <> #0) and (Result^ in ['0'..'9']) do begin + Number := Number * 10 + ord(Result^) - ord('0'); + Inc(Result); + end; + + { Correct for sign } + if bSign then + Number := -Number; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.CheckReady; +begin + if not (FState in [smtpReady, smtpInternalReady]) then + raise SmtpException.Create('SMTP component not ready'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerStateChange; +begin + if Assigned(FOnStateChange) then + FOnStateChange(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerSessionConnected(ErrorCode : Word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, ErrorCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerSessionClosed(ErrorCode : Word); +begin + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, ErrorCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerRequestDone(ErrorCode: Word); +begin + if not FRequestDoneFlag then begin + FRequestDoneFlag := TRUE; + +{ --Jake Traynham, 06/12/01 Bug - removed "(ErrorCode = 0) and" because we } +{ want DoHighLevelAsync to handle any errors } +{ we get while doing a High Level function: } +{ *bug* if (ErrorCode = 0) and Assigned(FNextRequest) then begin } + if Assigned(FNextRequest) then begin + if FState <> smtpAbort then + StateChange(smtpInternalReady); + FNextRequest; + end + else begin + StateChange(smtpReady); + { Restore the lastresponse saved before quit command } + if FHighLevelFlag and (FStatusCodeSave >= 0) then begin + FLastResponse := FLastResponseSave; + FStatusCode := FStatusCodeSave; + end; + FHighLevelFlag := FALSE; + PostMessage(Handle, WM_SMTP_REQUEST_DONE, 0, ErrorCode); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.StateChange(NewState : TSmtpState); +begin + if FState <> NewState then begin + FState := NewState; + TriggerStateChange; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerDisplay(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.DisplayLastResponse; +begin + TriggerDisplay('< ' + FLastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WSocketDataAvailable(Sender: TObject; ErrorCode: Word); +var + Len : Integer; + I : Integer; + p : PChar; +begin + Len := FWSocket.Receive(@FReceiveBuffer[FReceiveLen], + sizeof(FReceiveBuffer) - FReceiveLen); + + if Len <= 0 then + Exit; + + FReceiveBuffer[FReceiveLen + Len] := #0; + FReceiveLen := FReceiveLen + Len; + + while FReceiveLen > 0 do begin + I := Pos(#13#10, FReceiveBuffer); + if I <= 0 then + break; + if I > FReceiveLen then + break; + + FLastResponse := Copy(FReceiveBuffer, 1, I - 1); + TriggerResponse(FLastResponse); + +{$IFDEF DUMP} + FDumpBuf := '>|'; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); + FDumpStream.WriteBuffer(FLastResponse[1], Length(FLastResponse)); + FDumpBuf := '|' + #13#10; + FDumpStream.WriteBuffer(FDumpBuf[1], Length(FDumpBuf)); +{$ENDIF} +{$IFDEF VER80} + { Add a nul byte at the end of string for Delphi 1 } + FLastResponse[Length(FLastResponse) + 1] := #0; +{$ENDIF} + FReceiveLen := FReceiveLen - I - 1; + if FReceiveLen > 0 then + Move(FReceiveBuffer[I + 1], FReceiveBuffer[0], FReceiveLen + 1); + + if FState = smtpWaitingBanner then begin + DisplayLastResponse; + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Continue; { Continuation line, ignore } + if FStatusCode <> 220 then begin + SetErrorMessage; + FRequestResult := FStatusCode; + FWSocket.Close; + Exit; + end; + + StateChange(smtpConnected); + TriggerSessionConnected(ErrorCode); + + if Assigned(FWhenConnected) then + FWhenConnected + else begin + TriggerRequestDone(0); + end; + end + else if FState = smtpWaitingResponse then begin + if Assigned(FNext) then + FNext + else + raise SmtpException.Create('Program error: FNext is nil'); + end + else begin + { Unexpected data received } + DisplayLastResponse; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WSocketSessionConnected(Sender: TObject; ErrorCode: Word); +begin + { Do not trigger the client SessionConnected from here. We must wait } + { to have received the server banner. } + if ErrorCode <> 0 then begin + FLastResponse := '500 ' + WSocketErrorDesc(ErrorCode) + + ' (Winsock error #' + IntToStr(ErrorCode) + ')'; + FStatusCode := 500; + FConnected := FALSE; +{ --Jake Traynham, 06/12/01 Bug - Need to set FRequestResult so High } +{ Level Open will exit out. (See also } +{ TriggerRequestDone bug.) } + FRequestResult:= 500; + SetErrorMessage; + TriggerRequestDone(ErrorCode); + FWSocket.Close; + StateChange(smtpReady); + end + else begin + FConnected := TRUE; + StateChange(smtpWaitingBanner); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WSocketDnsLookupDone( + Sender : TObject; + ErrorCode : Word); +begin + if ErrorCode <> 0 then begin + FLastResponse := '500 ' + WSocketErrorDesc(ErrorCode) + + ' (Winsock error #' + IntToStr(ErrorCode) + ')'; + FStatusCode := 500; + SetErrorMessage; + FRequestResult := ErrorCode; + TriggerRequestDone(ErrorCode); + end + else begin + FWSocket.Addr := FWSocket.DnsResult; + FWSocket.LocalAddr := FLocalAddr; {bb} + FWSocket.Proto := 'tcp'; + FWSocket.Port := FPort; + FWSocket.OnSessionConnected := WSocketSessionConnected; + FWSocket.OnDataAvailable := WSocketDataAvailable; + StateChange(smtpConnecting); + try + FWSocket.Connect; + except + on E:Exception do begin + FLastResponse := '500 ' + E.ClassName + ': ' + E.Message; + FStatusCode := 500; + FRequestResult := FStatusCode; + SetErrorMessage; + { TriggerRequestDone(FStatusCode); } + TriggerRequestDone(FWSocket.LastError); { Apr 01, 2002 } + end; + end + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SendCommand(Cmd : String); +begin + TriggerCommand(Cmd); + TriggerDisplay('> ' + Cmd); + if FWSocket.State = wsConnected then + FWSocket.SendStr(Cmd + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.ExecAsync( + RqType : TSmtpRequest; + Cmd : String; { Command to execute } + OkResponses : array of Word; { List of responses like '200 221 342' } + DoneAsync : TSmtpNextProc); { What to do when done } +var + I : Integer; +begin + CheckReady; + + if not FConnected then + raise SmtpException.Create('SMTP component not connected'); + + if not FHighLevelFlag then + FRequestType := RqType; + + for I := 0 to High(OkResponses) do + FOkResponses[I] := OkResponses[I]; + FOkResponses[High(OkResponses) + 1] := 0; + + FRequestDoneFlag := FALSE; + FNext := NextExecAsync; + FDoneAsync := DoneAsync; + StateChange(smtpWaitingResponse); + SendCommand(Cmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.NextExecAsync; +var + I : Integer; + p : PChar; +begin + DisplayLastResponse; + p := GetInteger(@FLastResponse[1], FStatusCode); + if p^ = '-' then + Exit; { Continuation line, nothing to do } + + if FOkResponses[0] = 0 then begin + { The list of ok responses is empty } + if FStatusCode >= 500 then begin + { Not a good response } + FRequestResult := FStatusCode; + SetErrorMessage; + end + else + FRequestResult := 0; + end + else begin + { We have a list of ok response codes } + for I := 0 to High(FOkResponses) do begin + if FOkResponses[I] = 0 then begin + { No good response found } + FRequestResult := FStatusCode; + SetErrorMessage; + break; + end; + if FOkResponses[I] = FStatusCode then begin + { Good response found } + FRequestResult := 0; + Break; + end; + end; + end; + + if Assigned(FDoneAsync) then + FDoneAsync + else if (FRequestType <> smtpQuit) or (FConnected = FALSE) then + TriggerRequestDone(FRequestResult) + else begin + { We have to wait until remote host close connection before } + { calling TriggerRequestDone. See WSocketSessionClosed. } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Helo; +begin + FFctPrv := smtpFctHelo; + if FSignOn = '' then + ExecAsync(smtpHelo, 'HELO ' + LocalHostName, [250], nil) + else + ExecAsync(smtpHelo, 'HELO ' + FSignOn, [250], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Ehlo; +begin + FFctPrv := smtpFctEhlo; + if FSignOn = '' then + ExecAsync(smtpEhlo, 'EHLO ' + LocalHostName, [250], EhloNext) + else + ExecAsync(smtpEhlo, 'EHLO ' + FSignOn, [250], EhloNext); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.EhloNext; +begin + { It's possible that some really old mail servers will disconnect you } + { if you use the 'EHLO' command. If we've been disconnected, then do } + { nothing. RequestDone event handler is called from socket } + { SessionClose event. } + if not FConnected + then Exit; + + if (FRequestResult = 0) + then FESmtpSupported := TRUE; + + TriggerRequestDone(FRequestResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Auth; +var + AuthPlain : String; +begin + { If ESMTP is not supported, or if we didn't start with EHLO, then we } + { can't use the AUTH command. } + if (not FESmtpSupported) + then begin + FLastResponse := '500 ESMTP not supported.'; + SetErrorMessage; + TriggerRequestDone(500); + Exit; + end; + + FFctPrv := smtpFctAuth; + case FAuthType of + smtpAuthNone : + begin + { shouldn't happen } + FLastResponse := '500 No Authorization Type Selected.'; + SetErrorMessage; + TriggerRequestDone(500); + Exit; + end; + smtpAuthPlain : + begin + AuthPlain := FUsername; + AuthPlain := AuthPlain + #0; + if (FFromName <> '') {FromName should be set before calling Auth} + then + AuthPlain := AuthPlain + FFromname + else + AuthPlain := AuthPlain + FUsername; + AuthPlain := AuthPlain + #0; + AuthPlain := AuthPlain + FPassword; + AuthPlain := Base64Encode(AuthPlain); + ExecAsync(smtpAuth, 'AUTH PLAIN ' + AuthPlain, [235], nil); + end; + smtpAuthLogin : + begin + ExecAsync(smtpAuth, 'AUTH LOGIN', [334], AuthNextLogin); + end; + smtpAuthCramMD5 : + begin + ExecAsync(smtpAuth, 'AUTH CRAM-MD5', [334], AuthNextCramMD5); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.AuthNextLogin; +begin + { If there was an error, tell the user and exit. } + if (FRequestResult <> 0) + then begin + TriggerRequestDone(FRequestResult); + Exit; + end; + + FState := smtpInternalReady; + ExecAsync(smtpAuth, Base64Encode(FUsername), [334], AuthNextLoginNext); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.AuthNextLoginNext; +begin + { If there was an error, tell the user and exit. } + if (FRequestResult <> 0) + then begin + TriggerRequestDone(FRequestResult); + Exit; + end; + + FState := smtpInternalReady; + ExecAsync(smtpAuth, Base64Encode(FPassword), [235], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.AuthNextCramMD5; +var + Challenge : String; + Response : String; + HexDigits : String; + MD5Digest : TMD5Digest; + MD5Context : TMD5Context; + Count : Integer; + IPAD : Array[0..63] of Byte; + OPAD : Array[0..63] of Byte; +begin + { If there was an error, tell the user and exit. } + if (FRequestResult <> 0) + then begin + TriggerRequestDone(FRequestResult); + Exit; + end; + + { Server should be returning something like } + { 334 PDEyMzc5MTU3NTAtNjMwNTcxMzRAZm9vLmJhci5jb20+ } + { If it does not, then exit. } + if (Length(FLastResponse) < 5) + then begin + FLastResponse := '500 Malformed MD5 Challege: ' + FLastResponse; + SetErrorMessage; + TriggerRequestDone(500); + Exit; + end; + + Challenge := Copy(FLastResponse, 5, Length(FLastResponse) - 4); + + Challenge := Base64Decode(Challenge); + + {See RFC2104 } + for Count := 0 to 63 do + begin + if ((Count+1) <= Length(FPassword)) + then begin + IPAD[Count] := Byte(FPassword[Count+1]) xor $36; + OPAD[Count] := Byte(FPassword[Count+1]) xor $5C; + end + else begin + IPAD[Count] := 0 xor $36; + OPAD[Count] := 0 xor $5C; + end; + end; + + MD5Init(MD5Context); + MD5Update(MD5Context, IPAD, 64); + MD5UpdateBuffer(MD5Context, @Challenge[1], Length(Challenge)); + MD5Final(MD5Digest, MD5Context); + + MD5Init(MD5Context); + MD5Update(MD5Context, OPAD, 64); + MD5Update(MD5Context, MD5Digest, 16); + MD5Final(MD5Digest, MD5Context); + + HexDigits := '0123456789abcdef'; + Response := FUsername; + Response := Response + ' '; + for Count := 0 to 15 do + begin + Response := Response + HexDigits[((Byte(MD5Digest[Count]) and $F0) shr 4)+1]; + Response := Response + HexDigits[(Byte(MD5Digest[Count]) and $0F)+1]; + end; + + FState := smtpInternalReady; + ExecAsync(smtpAuth, Base64Encode(Response), [235], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Vrfy; +begin + FFctPrv := smtpFctVrfy; + ExecAsync(smtpVrfy, 'VRFY ' + FHdrTo, [250], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.MailFrom; +begin + FFctPrv := smtpFctMailFrom; + if (Pos('<', FFromName) <> 0) and (Pos('>', FFromName) <> 0) then + ExecAsync(smtpMailFrom, 'MAIL FROM:' + Trim(FFromName), [250], nil) + else + ExecAsync(smtpMailFrom, + 'MAIL FROM:<' + Trim(FFromName) + '>', [250], nil) +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Rset; +begin + FFctPrv := smtpFctRset; + ExecAsync(smtpRset, 'RSET', [250], nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.RcptTo; +begin + if FRcptName.Count <= 0 then + raise SmtpException.Create('RcptName list is empty'); + + FItemCount := -1; + RcptToNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.RcptToNext; +var + WhenDone : TSmtpNextProc; +begin + Inc(FItemCount); + if FItemCount >= (FRcptName.Count - 1) then + WhenDone := nil + else + WhenDone := RcptToDone; + FFctPrv := smtpFctRcptTo; + if (Pos('<', FRcptName.Strings[FItemCount]) <> 0) and + (Pos('>', FRcptName.Strings[FItemCount]) <> 0) then + ExecAsync(smtpRcptTo, + 'RCPT TO:' + Trim(FRcptName.Strings[FItemCount]), + [250, 251], WhenDone) + else + ExecAsync(smtpRcptTo, + 'RCPT TO:<' + Trim(FRcptName.Strings[FItemCount])+ '>', + [250, 251], WhenDone); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.RcptToDone; +begin + FState := smtpInternalReady; + RcptToNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SetContentType(newValue : TSmtpContentType); +begin + if FContentType = newValue then + Exit; + FContentType := newValue; + if FContentType = smtpPlainText then + FContentTypeStr := 'text/plain' + else + FContentTypeStr := 'text/html'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Data; +begin + FLineNum := 0; + FMoreLines := TRUE; + FItemCount := -1; + if not Assigned(FHdrLines) then + FHdrLines := TStringList.Create + else + FHdrLines.Clear; + if not FOwnHeaders then begin + { Angus V2.21 - the body must contain all the headers } + if Length(Trim(FHdrReplyTo)) > 0 then + FHdrLines.Add('Reply-To: ' + FHdrReplyTo); + if Length(Trim(FHdrReturnPath)) > 0 then + FHdrLines.Add('Return-Path: ' + FHdrReturnPath); + if Length(FHdrFrom) > 0 then + FHdrLines.Add('From: ' + FHdrFrom); + if Length(FHdrTo) > 0 then + FHdrLines.Add('To: ' + FHdrTo); + if Length(FHdrCc) > 0 then + FHdrLines.Add('Cc: ' + FHdrCc); + FHdrLines.Add('Subject: ' + FHdrSubject); + if Length(Trim(FHdrSender)) > 0 then + FHdrLines.Add('Sender: ' + FHdrSender) + else if Length(Trim(FHdrFrom)) > 0 then + FHdrLines.Add('Sender: ' + FHdrFrom); + FHdrLines.Add('Mime-Version: 1.0'); + FHdrLines.Add('Content-Type: ' + FContentTypeStr + '; charset="' + FCharSet + '"'); + FHdrLines.Add('Date: ' + Rfc822DateTime(Now)); + FHdrLines.Add('X-Mailer: ICS SMTP Component V' + + IntToStr(SmtpCliVersion div 100) + '.' + + IntToStr(SmtpCliVersion mod 100)); + TriggerProcessHeader(FHdrLines); + { An empty line mark the header's end } + FHdrLines.Add(''); + end + else + FItemCount := 0; + FFctPrv := smtpFctData; + ExecAsync(smtpData, 'DATA', [354], DataNext); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.DataNext; +var + MsgLine : array [0..1023] of char; +begin + { If we have been disconnected, then do nothing. } + { RequestDone event handler is called from socket SessionClose event. } + if not FConnected then begin + FWSocket.OnDataSent := nil; + Exit; + end; + + Inc(FItemCount); + if FItemCount < FHdrLines.Count then begin + { There are still header lines to send } + StrPCopy(@MsgLine, FHdrLines.Strings[FItemCount]); + TriggerHeaderLine(@MsgLine, SizeOf(MsgLine)); + TriggerDisplay('> ' + StrPas(MsgLine)); + FWSocket.OnDataSent := WSocketDataSent; + FWSocket.PutDataInSendBuffer(@MsgLine, strlen(MsgLine)); + FWSocket.SendStr(#13+#10); + end + else begin + { Now we need to send data lines } + if FMoreLines then begin + try + Inc(FLineNum); + TriggerGetData(FLineNum, @MsgLine, High(MsgLine), FMoreLines); + except + FMoreLines := FALSE; + end; + end; + + if FMoreLines then begin + if MsgLine[0] = '.' then + Move(MsgLine[0], MsgLine[1], StrLen(MsgLine) + 1); + TriggerDisplay('> ' + StrPas(MsgLine)); + FWSocket.OnDataSent := WSocketDataSent; + FWSocket.PutDataInSendBuffer(@MsgLine, StrLen(MsgLine)); + FWSocket.SendStr(#13 + #10); + end + else begin + { Send the last message line } + FWSocket.OnDataSent := nil; + ExecAsync(smtpData, '.', [250], nil); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WSocketDataSent(Sender : TObject; ErrorCode : Word); +begin + FState := smtpInternalReady; + DataNext; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Abort; +begin + StateChange(smtpAbort); + FWSocket.CancelDnsLookup; + FWSocket.Abort; + StateChange(smtpReady); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Connect; +begin + CheckReady; + if FConnected then + raise SmtpException.Create('SMTP component already connected'); + + if not FHighLevelFlag then + FRequestType := smtpConnect; { 10/05/99 } + FRequestDoneFlag := FALSE; + FReceiveLen := 0; + FRequestResult := 0; + FESmtpSupported := FALSE; + StateChange(smtpDnsLookup); + FWSocket.OnDataSent := nil; + FWSocket.OnDnsLookupDone := WSocketDnsLookupDone; + FWSocket.DnsLookup(FHost); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Quit; +begin + CheckReady; + FFctPrv := smtpFctQuit; + if not FConnected then begin + { We are not connected, it's ok... } + FRequestType := smtpQuit; + FRequestDoneFlag := FALSE; + TriggerRequestDone(0); + Exit; + end; + ExecAsync(smtpQuit, 'QUIT', [221], nil); { Should I force a FWSocket.Close } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.DoHighLevelAsync; +begin +{$IFDEF TRACE} TriggerDisplay('! HighLevelAsync ' + IntToStr(FRequestResult)); {$ENDIF} + if FState = smtpAbort then begin + {$IFDEF TRACE} TriggerDisplay('! Abort detected'); {$ENDIF} + FFctSet := []; + FHighLevelResult := 426; + FRequestResult := 426; { SJF } + FErrorMessage := '426 Operation aborted.'; + end; + + FNextRequest := DoHighLevelAsync; + + if FRequestResult <> 0 then begin + { Previous command had errors } + { EHLO wasn't supported, so just log in with HELO } + if FFctPrv = smtpFctEhlo then + FFctSet := [smtpFctHelo] + else begin + FHighLevelResult := FRequestResult; + if (FFctPrv = smtpFctQuit) or (not (smtpFctQuit in FFctSet)) then + FFctSet := [] + else + FFctSet := [smtpFctQuit]; + end; + end; + + if smtpFctConnect in FFctSet then begin + FFctPrv := smtpFctConnect; + FFctSet := FFctSet - [FFctPrv]; + Connect; + Exit; + end; + + if smtpFctHelo in FFctSet then begin + FFctPrv := smtpFctHelo; + FFctSet := FFctSet - [FFctPrv]; + Helo; + Exit; + end; + + if smtpFctEhlo in FFctSet then begin + FFctPrv := smtpFctEhlo; + FFctSet := FFctSet - [FFctPrv]; + Ehlo; + Exit; + end; + + if smtpFctAuth in FFctSet then begin + FFctPrv := smtpFctAuth; + FFctSet := FFctSet - [FFctPrv]; + Auth; + Exit; + end; + + if smtpFctVrfy in FFctSet then begin + FFctPrv := smtpFctVrfy; + FFctSet := FFctSet - [FFctPrv]; + Vrfy; + Exit; + end; + + if smtpFctMailFrom in FFctSet then begin + FFctPrv := smtpFctMailFrom; + FFctSet := FFctSet - [FFctPrv]; + MailFrom; + Exit; + end; + + if smtpFctRcptTo in FFctSet then begin + FFctPrv := smtpFctRcptTo; + FFctSet := FFctSet - [FFctPrv]; + RcptTo; + Exit; + end; + + if smtpFctData in FFctSet then begin + FFctPrv := smtpFctData; + FFctSet := FFctSet - [FFctPrv]; + Data; + Exit; + end; + + if smtpFctQuit in FFctSet then begin + FFctPrv := smtpFctQuit; + FFctSet := FFctSet - [FFctPrv]; + Quit; + Exit; + end; + + {$IFDEF TRACE} TriggerDisplay('! HighLevelAsync done'); {$ENDIF} + FFctSet := []; + FNextRequest := nil; + FRequestDoneFlag := FALSE; + TriggerRequestDone(FHighLevelResult); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.HighLevelAsync( + RqType : TSmtpRequest; Fcts : TSmtpFctSet); +begin + if FConnected and (smtpFctConnect in Fcts) then + raise SmtpException.Create('SMTP component already connected'); + CheckReady; + FLastResponseSave := FLastResponse; + FStatusCodeSave := -1; + FRequestType := RqType; + FRequestResult := 0; + FFctSet := Fcts; + FFctPrv := smtpFctNone; + FHighLevelResult := 0; + FHighLevelFlag := TRUE; + FLastResponse := ''; + FErrorMessage := ''; + FRestartFlag := FALSE; + DoHighLevelAsync; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Open; +begin + if FAuthType <> smtpAuthNone then + HighLevelAsync(smtpOpen, [smtpFctConnect, smtpFctEhlo, smtpFctAuth]) + else + HighLevelAsync(smtpOpen, [smtpFctConnect, smtpFctHelo]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.Mail; +begin + HighLevelAsync(smtpMail, [smtpFctMailFrom, smtpFctRcptTo, smtpFctData]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.WSocketSessionClosed(Sender : TObject; ErrorCode : WORD); +begin + FConnected := FALSE; + TriggerSessionClosed(ErrorCode); + if FRequestType = smtpQuit then + TriggerRequestDone(0) { We where just waiting for close } + else + TriggerRequestDone(WSAEINTR); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerHeaderLine(Line : Pointer; Size : Integer); +begin + if Assigned(FOnHeaderLine) then + FOnHeaderLine(Self, Line, Size); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerGetData( + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); +begin + if not Assigned(FOnGetData) then + More := FALSE + else + FOnGetData(Self, LineNum, MsgLine, MaxLen, More); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SetRcptName(newValue : TStrings); +var + I : Integer; +begin + FRcptName.Clear; + for I := 0 to newValue.Count - 1 do + FRcptName.Add(newValue.Strings[I]); +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SetMailMessage(newValue : TStrings); +var + I : Integer; +begin + FMailMessage.Clear; + for I := 0 to newValue.Count - 1 do + FMailMessage.Add(newValue.Strings[I]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +{ Delphi 1 lack this function. The time will be wrong ! } +function TimeZoneBias : TDateTime; +begin + Result := 0; +end; +{$ELSE} +function TimeZoneBias : TDateTime; +const + Time_Zone_ID_DayLight = 2; +var + TZI : tTimeZoneInformation; + TZIResult : Integer; + aBias : Integer; // En minutes +begin + TZIResult := GetTimeZoneInformation(TZI); + if TZIResult = -1 then + Result := 0 + else begin + if TZIResult = Time_Zone_ID_DayLight then + aBias := TZI.Bias + TZI.DayLightBias + else + aBias := TZI.Bias + TZI.StandardBias; + Result := EncodeTime(Abs(aBias) div 60, Abs(aBias) mod 60, 0, 0); + if aBias < 0 then + Result := -Result; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Rfc822DateTime(t : TDateTime) : String; +var + Year, Month, Day : WORD; + Hour, Min, Sec, MSec : WORD; + Gmt : TDateTime; +const + Days : array [1..7] of string = + ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); + Months : array [1..12] of string = + ('Jan', 'Feb', 'Mar', 'Apr', + 'May', 'Jun', 'Jul', 'Aug', + 'Sep', 'Oct', 'Nov', 'Dec'); +begin + Gmt := T + TimeZoneBias; + DecodeDate(Gmt, Year, Month, Day); + DecodeTime(Gmt, Hour, Min, Sec, MSec); + { Format is 'ddd, d mmm yyyy hh:mm:ss GMT' with english names } + Result := Format('%s, %d %s %4d %02.2d:%02.2d:%02.2d GMT', + [Days[DayOfWeek(Gmt)], + Day, Months[Month], Year, + Hour, Min, Sec]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} +function TimeZoneBias : String; +{$IFDEF VER80} { Delphi 1 doesn't support timezone API } +begin + Result := '-0000'; +end; +{$ELSE} +const + Time_Zone_ID_DayLight = 2; +var + TZI : tTimeZoneInformation; + TZIResult : Integer; + aBias : Integer; +begin + TZIResult := GetTimeZoneInformation(TZI); + if TZIResult = -1 then + Result := '-0000' + else begin + if TZIResult = Time_Zone_ID_DayLight then { 10/05/99 } + aBias := TZI.Bias + TZI.DayLightBias + else + aBias := TZI.Bias + TZI.StandardBias; + Result := Format('-%.2d%.2d', [Abs(aBias) div 60, Abs(aBias) mod 60]); + if aBias < 0 then + Result[1] := '+'; + end; +end; +{$ENDIF} +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} +function Rfc822DateTime(t : TDateTime) : String; +var + I : Integer; + SaveShortDayNames : array[1..7] of string; + SaveShortMonthNames : array[1..12] of string; +const + MyShortDayNames: array[1..7] of string = + ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'); + MyShortMonthNames: array[1..12] of string = + ('Jan', 'Feb', 'Mar', 'Apr', + 'May', 'Jun', 'Jul', 'Aug', + 'Sep', 'Oct', 'Nov', 'Dec'); +begin + if ShortDayNames[1] = MyShortDayNames[1] then + Result := FormatDateTime('ddd, d mmm yyyy hh:mm:ss', t) + + ' ' + TimeZoneBias + else begin + { We used a localized Delphi version, the day and month names are no } + { more english names ! We need to save and replace them } + for I := Low(ShortDayNames) to High(ShortDayNames) do begin + SaveShortDayNames[I] := ShortDayNames[I]; + ShortDayNames[I] := MyShortDayNames[I]; + end; + + for I := Low(ShortMonthNames) to High(ShortMonthNames) do begin + SaveShortMonthNames[I] := ShortMonthNames[I]; + ShortMonthNames[I] := MyShortMonthNames[I]; + end; + + Result := FormatDateTime('ddd, d mmm yyyy hh:mm:ss', t) + + ' ' + TimeZoneBias; + + for I := Low(ShortDayNames) to High(ShortDayNames) do + ShortDayNames[I] := SaveShortDayNames[I]; + for I := Low(ShortMonthNames) to High(ShortMonthNames) do + ShortMonthNames[I] := SaveShortMonthNames[I]; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerProcessHeader(HdrLines : TStrings); +begin + if Assigned(FOnProcessHeader) then + FOnProcessHeader(Self, HdrLines); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerCommand(Msg : String); +begin + if Assigned(FOnCommand) then + FOnCommand(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.TriggerResponse(Msg : String); +begin + if Assigned(FOnResponse) then + FOnResponse(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.ClearErrorMessage; +begin + FErrorMessage := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSmtpClient.SetErrorMessage; +begin + if FErrorMessage = '' then + FErrorMessage := FLastResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TSmtpCli.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FEmailBody := TStringList.Create; + FEmailFiles := TStringList.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TSmtpCli.Destroy; +begin + if Assigned(FEmailBody) then begin + FEMailBody.Destroy; + FEMailBody := nil; + end; + if Assigned(FEmailFiles) then begin + FEmailFiles.Destroy; + FEmailFiles := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.TriggerAttachContentType( + FileNumber : Integer; + var FileName : String; + var ContentType : String); +begin + if Assigned(FOnAttachContentType) then + FOnAttachContentType(Self, FileNumber, FileName, ContentType); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.TriggerAttachHeader( + FileNumber : Integer; + FileName : String; + HdrLines : TStrings); +begin + if Assigned(FOnAttachHeader) then + FOnAttachHeader(Self, FileNumber, FileName, HdrLines); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.TriggerGetData( + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); +var + sLine : String; + FileName : String; + sFileName : String; + sContentType : String; +begin + if FEmailBody.Count > 0 then begin + if MaxLen > 1023 then + MaxLen := 1023; { RFC say 1024 char max, including nul char } + StrPLCopy(MsgLine, FEmailBody[0], MaxLen); + FEmailBody.Delete(0); + More := TRUE; + Exit; + end; + + if FBodyFlag then begin + Inc(FBodyLine); + inherited TriggerGetData(FBodyLine, MsgLine, MaxLen, More); + if More then + Exit; + FBodyFlag := FALSE; + end; + + if not FFileStarted then begin + if (not Assigned(FEMailFiles)) or + (FEmailFiles.Count <= FCurrentFile) then begin + { No file to send } + More := FALSE; + Exit; + end; + + StrPCopy(MsgLine, ''); + FileName := FEmailFiles[FCurrentFile]; + InitUUEncode(FFile, FileName); + sFileName := ExtractFileName(FileName); + sContentType := 'application/octet-stream'; + TriggerAttachContentType(FCurrentFile, sFileName, sContentType); + FEmailBody.Add('--' + FMimeBoundary); + FEmailBody.Add('Content-Type: ' + sContentType + ';'); + FEmailBody.Add(#9'name="' + sFileName + '"'); + FEmailBody.Add('Content-Transfer-Encoding: base64'); + FEmailBody.Add('Content-Disposition: attachment;'); + FEmailBody.Add(#9'filename="' + ExtractFileName(FileName) + '"'); + TriggerAttachHeader(FCurrentFile, sFileName, FEmailBody); + FEmailBody.Add(''); + FFileStarted := TRUE; + More := TRUE; + Exit; + end; + + DoUUEncode(FFile, sLine, More); + StrPCopy(MsgLine, sLine); + if not More then begin { we hit the end of file. } + EndUUEncode(FFile); + FFileStarted := FALSE; + Inc(FCurrentFile); + if (FEmailFiles.Count <= FCurrentFile) then begin + FEmailBody.Add(''); + FEmailBody.Add('--' + FMimeBoundary + '--'); + end; + More := TRUE; + Exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.TriggerHeaderLine(Line : Pointer; Size : Integer); +begin + { if we have a MIME type message, then replace the content-type } + { header with the proper MIME content-type. } + if FMimeBoundary <> '' then begin + if StrLIComp('CONTENT-TYPE:', Line, 13) = 0 then + StrPCopy(Line, 'Content-Type: multipart/mixed;'#13#10#9'boundary="' + + FMimeBoundary + '"'); + end; + inherited TriggerHeaderLine(Line, Size); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.SetEMailFiles(newValue : TStrings); +var + I : Integer; + FilePath : String; +begin + FEMailFiles.Clear; + if not Assigned(newValue) then + Exit; + for I := 0 to newValue.Count - 1 do begin + FilePath := Trim(newValue.Strings[I]); + { Ignore any empty file name (a very common error !) } + if FilePath > '' then begin + { Check if file exists and raise an exception if not } + if FileExists(FilePath) then + FEMailFiles.Add(FilePath) + else + raise SmtpException.Create('File not found ''' + FilePath + ''''); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.Data; +begin + PrepareEMail; + inherited Data; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpCli.PrepareEMail; +var i : integer; +begin + FBodyFlag := TRUE; + FCurrentFile := 0; + FBodyLine := 0; + FFileStarted := FALSE; + + FEmailBody.Clear; + if Assigned(FEMailFiles) and (FEmailFiles.Count > FCurrentFile) then begin + FMimeBoundary := '= Multipart Boundary ' + + FormatDateTime('mmddyyhhnn', Now); + + FEmailBody.Add('This is a multipart MIME message.'); + FEmailBody.Add(''); + FEmailBody.Add('--' + FMimeBoundary); + FEmailBody.Add('Content-Type: ' + FContentTypeStr + '; charset="' + FCharSet + '"'); + FEmailBody.Add('Content-Transfer-Encoding: 7bit'); + FEmailBody.Add(''); + end + else + FMimeBoundary := ''; + + for i := 0 to FMailMessage.Count - 1 do + FEmailBody.Add(FMailMessage.Strings[I]); + +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TSyncSmtpCli.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FTimeout := 15; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.WaitUntilReady : Boolean; +begin + Result := TRUE; { Suppose success } + FTimeStop := Integer(GetTickCount) + FTimeout * 1000; + while TRUE do begin + if FState = smtpReady then begin + { Back to ready state, the command is finiched } + Result := (FRequestResult = 0); + break; + end; + + if {$IFNDEF NOFORMS} Application.Terminated or {$ENDIF} + ((FTimeout > 0) and (Integer(GetTickCount) > FTimeStop)) then begin + { Application is terminated or timeout occured } + inherited Abort; + FErrorMessage := '426 Timeout'; + FStatusCode := 426; + Result := FALSE; { Command failed } + break; + end; +{$IFNDEF VER80} + if FMultiThreaded then + FWSocket.ProcessMessages + else +{$ENDIF} +{$IFNDEF NOFORMS} + Application.ProcessMessages; +{$ELSE} + FWSocket.ProcessMessages; +{$ENDIF} +{$IFNDEF VER80} + { Do not use 100% CPU, but slow down transfert on high speed LAN } + Sleep(0); +{$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.Synchronize(Proc : TSmtpNextProc) : Boolean; +begin + try + Proc; + Result := WaitUntilReady; + except + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.ConnectSync : Boolean; +begin + Result := Synchronize(Connect); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.HeloSync : Boolean; +begin + Result := Synchronize(Helo); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.EhloSync : Boolean; +begin + Result := Synchronize(Ehlo); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.AuthSync : Boolean; +begin + Result := Synchronize(Auth); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.VrfySync : Boolean; +begin + Result := Synchronize(Vrfy); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.OpenSync : Boolean; +begin + Result := Synchronize(Open); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.MailFromSync : Boolean; +begin + Result := Synchronize(MailFrom); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.RcptToSync : Boolean; +begin + Result := Synchronize(RcptTo); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.DataSync : Boolean; +begin + Result := Synchronize(Data); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.MailSync : Boolean; +begin + Result := Synchronize(Mail); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.QuitSync : Boolean; +begin + Result := Synchronize(Quit); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.RsetSync : Boolean; +begin + Result := Synchronize(RSet); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSyncSmtpCli.AbortSync : Boolean; +begin + Result := Synchronize(Abort); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSyncSmtpCli.TriggerGetData( + LineNum : Integer; + MsgLine : Pointer; + MaxLen : Integer; + var More : Boolean); +begin + inherited TriggerGetData(LineNum, MsgLine, MaxLen, More); + { Evaluate the timeout period again } + if FTimeout > 0 then + FTimeStop := Integer(GetTickCount) + FTimeout * 1000; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TSmtpCli, TSyncSmtpCli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/TNCNX.HLP b/lib/ics/Delphi/Vc32/TNCNX.HLP new file mode 100644 index 00000000..b93785dc Binary files /dev/null and b/lib/ics/Delphi/Vc32/TNCNX.HLP differ diff --git a/lib/ics/Delphi/Vc32/TnCnx.dcu b/lib/ics/Delphi/Vc32/TnCnx.dcu new file mode 100644 index 00000000..b5145a90 Binary files /dev/null and b/lib/ics/Delphi/Vc32/TnCnx.dcu differ diff --git a/lib/ics/Delphi/Vc32/TnCnx.pas b/lib/ics/Delphi/Vc32/TnCnx.pas new file mode 100644 index 00000000..76d1b1c2 --- /dev/null +++ b/lib/ics/Delphi/Vc32/TnCnx.pas @@ -0,0 +1,714 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: TNCNX.PAS +Object: Delphi component which implement the TCP/IP telnet protocol + including some options negociations. + RFC854, RFC885, RFC779, RFC1091 +Author: Franois PIETTE +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Creation: April, 1996 +Version: 2.09 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jul 22, 1997 Adapted to Delphi 3 +Sep 5, 1997 Added version information, removed old code, added OnTermType + Renamed some indentifier to be more standard. +Sep 24, 1997 V2.03 Added procedures to negociate options +May 12, 1998 V2.04 Changed NegociateOption to properly handle unwanted + option as Jan Tomasek suggested. +Aug 10, 1998 V2.05 Cleared strSubOption after NegociateSubOption as Jan + Tomasek suggested. +Aug 15, 1999 V2.06 Moved Notification procedure to public section for + BCB4 compatibility +Aug 20, 1999 V2.07 Added compile time options. Revised for BCB4. +Jun 18, 2001 V2.08 Use AllocateHWnd and DeallocateHWnd from wsocket. +Oct 23, 2002 V2.09 Changed Buffer arg in OnDataAvailable to Pointer instead + of PChar to avoid Delphi 7 messing everything with AnsiChar. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnCnx; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Controls, Forms, + WSocket, Winsock; + +const + TnCnxVersion = 209; + CopyRight : String = ' TTnCnx (c) 1996-2002 F. Piette V2.09 '; + + { Telnet command characters } + TNCH_EOR = #239; { $EF End Of Record (preceded by IAC) } + TNCH_SE = #240; { $F0 End of subnegociation parameters } + TNCH_NOP = #241; { $F1 No operation } + TNCH_DATA_MARK = #242; { $F2 Data stream portion of a Synch } + TNCH_BREAK = #243; { $F3 NVT charcater break } + TNCH_IP = #244; { $F4 Interrupt process } + TNCH_AO = #245; { $F5 Abort output } + TNCH_AYT = #246; { $F6 Are you there } + TNCH_EC = #247; { $F7 Erase character } + TNCH_EL = #248; { $F8 Erase line } + TNCH_GA = #249; { $F9 Go ahead } + TNCH_SB = #250; { $FA Subnegociation } + TNCH_WILL = #251; { $FB Will } + TNCH_WONT = #252; { $FC Wont } + TNCH_DO = #253; { $FD Do } + TNCH_DONT = #254; { $FE Dont } + TNCH_IAC = #255; { $FF IAC } + + { Telnet options } + TN_TRANSMIT_BINARY = #0; { $00 } + TN_ECHO = #1; { $01 } + TN_RECONNECTION = #2; { $02 } + TN_SUPPRESS_GA = #3; { $03 } + TN_MSG_SZ_NEGOC = #4; { $04 } + TN_STATUS = #5; { $05 } + TN_TIMING_MARK = #6; { $06 } + TN_NOPTIONS = #6; { $06 } + TN_DET = #20; { $14 } + TN_SEND_LOC = #23; { $17 } + TN_TERMTYPE = #24; { $18 } + TN_EOR = #25; { $19 } + TN_NAWS = #31; { $1F } + TN_TERMSPEED = #32; { $20 } + TN_TFC = #33; { $21 } + TN_XDISPLOC = #35; { $23 } + TN_EXOPL = #255; { $FF } + + TN_TTYPE_SEND = #1; + TN_TTYPE_IS = #0; + +type + TTnCnx = class; + + TTnSessionConnected = procedure (Sender: TTnCnx; Error : word) of object; + TTnSessionClosed = procedure (Sender: TTnCnx; Error : word) of object; + TTnDataAvailable = procedure (Sender: TTnCnx; Buffer : Pointer; Len : Integer) of object; + TTnDisplay = procedure (Sender: TTnCnx; Str : String) of object; + + TTnCnx= class(TComponent) + public + Socket : TWSocket; + private + FPort : String; + FHost : String; + FLocation : String; + FTermType : String; + RemoteBinMode : Boolean; + LocalBinMode : Boolean; + FLocalEcho : Boolean; + Spga : Boolean; + FTType : Boolean; + FBuffer : array [0..2048] of char; + FBufferCnt : Integer; + FWindowHandle : HWND; + FOnSessionConnected : TTnSessionConnected; + FOnSessionClosed : TTnSessionClosed; + FOnDataAvailable : TTnDataAvailable; + FOnDisplay : TTnDisplay; + FOnEOR : TNotifyEvent; + FOnSendLoc : TNotifyEvent; + FOnTermType : TNotifyEvent; + FOnLocalEcho : TNotifyEvent; + procedure WndProc(var MsgRec: TMessage); + procedure SocketSessionConnected(Sender: TObject; Error : word); + procedure SocketSessionClosed(Sender: TObject; Error : word); + procedure SocketDataAvailable(Sender: TObject; Error : word); + procedure Display(Str : String); + procedure AddChar(Ch : Char); + procedure ReceiveChar(Ch : Char); + procedure Answer(chAns : Char; chOption : Char); + procedure NegociateSubOption(strSubOption : String); + procedure NegociateOption(chAction : Char; chOption : Char); + procedure FlushBuffer; + function GetState : TSocketState; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function Send(Data : Pointer; Len : Integer) : integer; + function SendStr(Data : String) : integer; + procedure Connect; + function IsConnected : Boolean; + procedure WillOption(chOption : Char); + procedure WontOption(chOption : Char); + procedure DontOption(chOption : Char); + procedure DoOption(chOption : Char); + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure Close; + procedure Pause; + procedure Resume; + property State : TSocketState read GetState; + property Handle : HWND read FWindowHandle; + published + property Port : String read FPort + write FPort; + property Host : String read FHost + write FHost; + property Location : String read FLocation + write FLocation; + property TermType : String read FTermType + write FTermType; + property LocalEcho : Boolean read FLocalEcho + write FLocalEcho; + property OnSessionConnected : TTnSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TTnSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnDataAvailable : TTnDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnDisplay : TTnDisplay read FOnDisplay + write FOnDisplay; + property OnEndOfRecord : TNotifyEvent read FOnEOR + write FOnEOR; + property OnSendLoc : TNotifyEvent read FOnSendLoc + write FOnSendLoc; + property OnTermType : TNotifyEvent read FOnTermType + write FOnTermType; + property OnLocalEcho : TNotifyEvent read FOnLocalEcho + write FOnLocalEcho; + end; + +procedure Register; + +implementation + +{$DEFINE Debug} { Add or remove minus sign before dollar sign to } + { generate code for debug message output } + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TTnCnx]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DebugString(Msg : String); +const + Cnt : Integer = 0; +var + Buf : String[20]; +begin +{$IFDEF Debug} + Cnt := Cnt + 1; + Buf := IntToHex(Cnt, 4) + ' ' + #0; + OutputDebugString(@Buf[1]); + +{$IFNDEF WIN32} + if Length(Msg) < High(Msg) then + Msg[Length(Msg) + 1] := #0; +{$ENDIF} + + OutputDebugString(@Msg[1]); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WndProc(var MsgRec: TMessage); +begin + with MsgRec do + Result := DefWindowProc(Handle, Msg, wParam, lParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTnCnx.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWindowHandle := WSocket.AllocateHWnd(WndProc); + FLocation := 'TNCNX'; + FTermType := 'VT100'; + FPort := '23'; + Socket := TWSocket.Create(Self); + Socket.OnSessionConnected := SocketSessionConnected; + Socket.OnDataAvailable := SocketDataAvailable; + Socket.OnSessionClosed := SocketSessionClosed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTnCnx.Destroy; +begin + if Assigned(Socket) then begin + Socket.Free; + Socket := nil; + end; + WSocket.DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if (AComponent = Socket) and (Operation = opRemove) then + Socket := nil; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Pause; +begin + if not Assigned(Socket) then + Exit; + Socket.Pause; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Resume; +begin + if not Assigned(Socket) then + Exit; + Socket.Resume; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Connect; +begin + if not Assigned(Socket) then + Exit; + + if Socket.State <> wsClosed then + Socket.Close; + + Socket.Proto := 'tcp'; + Socket.Port := FPort; + Socket.Addr := FHost; + Socket.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.IsConnected : Boolean; +begin + Result := Socket.State = wsConnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Close; +begin + if Assigned(Socket) then + Socket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Display(Str : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Str); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.GetState : TSocketState; +begin + if Assigned(Socket) then + Result := Socket.State + else + Result := wsInvalidState; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketSessionConnected(Sender: TObject; Error : word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketSessionClosed(Sender: TObject; Error : word); +begin + if Socket.State <> wsClosed then + Socket.Close; + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketDataAvailable(Sender: TObject; Error : word); +var + Len, I : Integer; + Buffer : array [1..2048] of char; + Socket : TWSocket; +begin + Socket := Sender as TWSocket; + Len := Socket.Receive(@Buffer[1], High(Buffer)); + if Len = 0 then begin + { Remote has closed } + Display(#13 + #10 + '**** Remote has closed ****' + #13 + #10); + end + else if Len < 0 then begin + { An error has occured } + if Socket.LastError <> WSAEWOULDBLOCK then + Display(#13 + #10 + '**** ERROR: ' + IntToStr(Socket.LastError) + + ' ****' + #13 + #10); + end + else begin + for I := 1 to Len do + ReceiveChar(Buffer[I]); + FlushBuffer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.Send(Data : Pointer; Len : Integer) : integer; +begin + if Assigned(Socket) then + Result := Socket.Send(Data, Len) + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.SendStr(Data : String) : integer; +begin + Result := Send(@Data[1], Length(Data)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Answer(chAns : Char; chOption : Char); +var + Buf : String[3]; +begin +{ DebugString('Answer ' + IntToHex(ord(chAns), 2) + ' ' + IntToHex(ord(ChOption), 2) + #13 + #10); } + Buf := TNCH_IAC + chAns + chOption; + Socket.Send(@Buf[1], Length(Buf)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WillOption(chOption : Char); +begin + Answer(TNCH_WILL, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WontOption(chOption : Char); +begin + Answer(TNCH_WONT, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.DontOption(chOption : Char); +begin + Answer(TNCH_DONT, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.DoOption(chOption : Char); +begin + Answer(TNCH_DO, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.NegociateSubOption(strSubOption : String); +var + Buf : String; +begin +{ DebugString('SubNegociation ' + + IntToHex(ord(strSubOption[1]), 2) + ' ' + + IntToHex(ord(strSubOption[2]), 2) + #13 + #10); } + + case strSubOption[1] of + TN_TERMTYPE: + begin + if strSubOption[2] = TN_TTYPE_SEND then begin +{ DebugString('Send TermType' + #13 + #10); } + if Assigned(FOnTermType) then + FOnTermType(Self); + Buf := TNCH_IAC + TNCH_SB + TN_TERMTYPE + TN_TTYPE_IS + FTermType + TNCH_IAC + TNCH_SE; + Socket.Send(@Buf[1], Length(Buf)); + end; + end; + else +{ DebugString('Unknown suboption' + #13 + #10); } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.NegociateOption(chAction : Char; chOption : Char); +var + Buf : String; +begin +{ DebugString('Negociation ' + IntToHex(ord(chAction), 2) + ' ' + + IntToHex(ord(ChOption), 2) + #13 + #10); } + + case chOption of + TN_TRANSMIT_BINARY: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + RemoteBinMode := TRUE; + LocalBinMode := TRUE; + end + else if chAction = TNCH_WONT then begin + if RemoteBinMode then begin + RemoteBinMode := FALSE; + LocalBinMode := FALSE; + end; + end; + end; + TN_ECHO: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + FLocalEcho := FALSE; + end + else if chAction = TNCH_WONT then begin + FLocalEcho := TRUE; + end; + if Assigned(FOnLocalEcho) then + FOnLocalEcho(self); + end; + TN_SUPPRESS_GA: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + spga := TRUE; + end; + end; + TN_TERMTYPE: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + FTType := TRUE; + end; + end; + TN_SEND_LOC: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + if Assigned(FOnSendLoc) then + FOnSendLoc(Self); + Buf := TNCH_IAC + TNCH_SB + TN_SEND_LOC + FLocation + TNCH_IAC + TNCH_SE; + Socket.Send(@Buf[1], Length(Buf)); + end; + end; + TN_EOR: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + FTType := TRUE; + end; + end; + else +{ Answer(TNCH_WONT, chOption); } + { Jan Tomasek } + if chAction = TNCH_WILL then + Answer(TNCH_DONT, chOption) + else + Answer(TNCH_WONT, chOption); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.FlushBuffer; +var + Buffer : PChar; + Count : Integer; +begin + try + if FBufferCnt > 0 then begin + if Assigned(FOnDataAvailable) then begin + { We need to make a copy for the data because we can reenter } + { during the event processing } + Count := FBufferCnt; { How much we received } + try + GetMem(Buffer, Count + 1); { Alloc memory for the copy } + except + Buffer := nil; + end; + if Buffer <> nil then begin + try + Move(FBuffer, Buffer^, Count); { Actual copy } + Buffer[Count] := #0; { Add a nul byte } + FBufferCnt := 0; { Reset receivecounter } + FOnDataAvailable(Self, Buffer, Count); { Call event handler } + finally + FreeMem(Buffer, Count + 1); { Release the buffer } + end; + end; + end + else begin + FBufferCnt := 0 + end; + end; + except + raise; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.AddChar(Ch : Char); +begin + FBuffer[FBufferCnt] := Ch; + Inc(FBufferCnt); + if FBufferCnt >= SizeOf(FBuffer) then + FlushBuffer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.ReceiveChar(Ch : Char); +const + bIAC : Boolean = FALSE; + chVerb : Char = #0; + strSubOption : String = ''; + bSubNegoc : Boolean = FALSE; +begin + if chVerb <> #0 then begin + NegociateOption(chVerb, Ch); + chVerb := #0; + strSubOption := ''; + Exit; + end; + + if bSubNegoc then begin + if Ch = TNCH_SE then begin + bSubNegoc := FALSE; + NegociateSubOption(strSubOption); + strSubOption := ''; + end + else + strSubOption := strSubOption + Ch; + Exit; + end; + + if bIAC then begin + case Ch of + TNCH_IAC: begin + AddChar(Ch); + bIAC := FALSE; + end; + TNCH_DO, TNCH_WILL, TNCH_DONT, TNCH_WONT: + begin + bIAC := FALSE; + chVerb := Ch; + end; + TNCH_EOR: + begin + DebugString('TNCH_EOR' + #13 + #10); + bIAC := FALSE; + if Assigned(FOnEOR) then + FOnEOR(Self); + end; + TNCH_SB: + begin +{ DebugString('Subnegociation' + #13 + #10); } + bSubNegoc := TRUE; + bIAC := FALSE; + end; + else + DebugString('Unknown ' + IntToHex(ord(Ch), 2) + ' ''' + Ch + '''' + #13 + #10); + bIAC := FALSE; + end; + + Exit; + end; + + case Ch of + TNCH_EL: + begin + DebugString('TNCH_EL' + #13 + #10); + AddChar(Ch); + end; + TNCH_EC: + begin + DebugString('TNCH_EC' + #13 + #10); + AddChar(Ch); + end; + TNCH_AYT: + begin + DebugString('TNCH_AYT' + #13 + #10); + AddChar(Ch); + end; + TNCH_IP: + begin + DebugString('TNCH_IP' + #13 + #10); + AddChar(Ch); + end; + TNCH_AO: + begin + DebugString('TNCH_AO' + #13 + #10); + AddChar(Ch); + end; + TNCH_IAC: + begin + bIAC := TRUE + end; + else + AddChar(Ch); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/TnEmulVT.dcu b/lib/ics/Delphi/Vc32/TnEmulVT.dcu new file mode 100644 index 00000000..73e35c2d Binary files /dev/null and b/lib/ics/Delphi/Vc32/TnEmulVT.dcu differ diff --git a/lib/ics/Delphi/Vc32/TnEmulVT.pas b/lib/ics/Delphi/Vc32/TnEmulVT.pas new file mode 100644 index 00000000..094d9d77 --- /dev/null +++ b/lib/ics/Delphi/Vc32/TnEmulVT.pas @@ -0,0 +1,825 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: TNEMULVT.PAS +Description: Delphi component combining both TnCnx and EmulVT components. + Hence it does ANSI emulation using TCP/IP telnet protocol. +Author: Franois PIETTE +Creation: May, 1996 +Version: 2.13 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1996-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jul 22, 1997 Revised Connect method to be callable from FormCreate event + Adapted to Delphi 3 +Sep 05, 1997 TnCnx made public, Minor change to method visibility + Added OnTermType and OnDataAvailable events. +Sep 23, 1997 V202. Added local echo support (incomplete because we should ask + the remote host not to echo characters. Will implement later) + Added TnEmultVTVersion +Sep 24, 1997 V2.03 Complete local echo support. +Sep 25, 1997 V2.04 Port to C++Builder +Feb 19, 1998 V2.05 Replaced private section by protected. + Added TriggerDataAvailable virtual function. +Dec 21, 1998 V2.06 Added fixes from Steve Endicott. +Mar 01, 1999 V2.07 Added conditional compile for BCB4. Thanks to James + Legg . +Mar 14, 1999 V2.08 Added OnKeyDown event to allow key trapping. + Ignore any exception when sending fct keys. +Aug 15, 1999 V2.09 Move KeyPress procedure to public section for BCB4 compat. +Aug 20, 1999 V2.10 Added compile time options. Revised for BCB4. +Sep 25, 1999 V2.11 Corrected GetSelTextBuf so that lines are returned in + corrected order (they where returned in reverse order). + Thanks to Laurent Navarro for finding + this bug and fixing it. +Jan 12, 2002 V2.12 Replaced TnCnx public member by TnConn property to avoid + conflit with unit named TnCnx. This will require change in your + own code if you used this property. Added a notification procedure + to remove FTnCnx if component is externally destroyed. Added code + to check if we still have the component with us. +Oct 23, 2002 V2.13 Changed Buffer arg in OnDataAvailable to Pointer instead + of PChar to avoid Delphi 7 messing everything with AnsiChar. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnEmulVT; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER140} + {$IFDEF BCB} + {$DEFINE BCB_FLAG} + {$ENDIF} +{$ENDIF} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, EmulVT, TnCnx, IniFiles, TnOptFrm, WSocket; + +const + TnEmultVTVersion = 213; + CopyRight : String = ' TTnEmulVT (c) 1996-2002 F. Piette V2.13 '; + +type + TTnEmulVTDataAvailable = procedure (Sender : TObject; + Buffer : Pointer; + var Len : Integer) of object; + TTnEmulVT = class(TEmulVT) + protected + FTnCnx : TTnCnx; + FError : Word; + FIniFilename : String; + FSectionName : String; + FKeyName : String; + FHostName : String; + FPort : String; + FTag : LongInt; + FUpperLock : Boolean; + FLocalEcho : Boolean; + FOnSessionClosed : TNotifyEvent; + FOnSessionConnected : TNotifyEvent; + FOnNamesClick : TNotifyEvent; + FOnSendLoc : TNotifyEvent; + FOnTermType : TNotifyEvent; + FOnLocalEcho : TNotifyEvent; + FOnDataAvailable : TTnEmulVTDataAvailable; + FMouseDown : Boolean; + FMouseCaptured : Boolean; + FMouseTop : Integer; + FMouseLeft : Integer; + FFocusDrawn : Boolean; + FFocusRect : TRect; + procedure TriggerDataAvailable(Buffer : Pointer; Len: Integer); virtual; + procedure TnCnxDataAvailable(Sender: TTnCnx; Buffer : Pointer; Len : Integer); + procedure TnCnxSessionClosed(Sender: TTnCnx; Erc: Word); + procedure TnCnxSessionConnected(Sender: TTnCnx; Erc: Word); + procedure TnCnxSendLoc(Sender: TObject); + procedure TnCnxTermType(Sender: TObject); + procedure TnCnxLocalEcho(Sender: TObject); + procedure Display(Msg : String); + procedure DoKeyBuffer(Buffer : PChar; Len : Integer); override; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); override; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); override; +{$IFNDEF BCB_FLAG} + procedure Notification(AComponent : TComponent; + Operation : TOperation); override; +{$ENDIF} + procedure SetOnEndOfRecord(Value : TNotifyEvent); + function GetOnEndOfRecord : TNotifyEvent; + procedure SetLocation(Value : String); + function GetLocation : String; + procedure SetHostName(newValue : String); + public + procedure RequestLocalEcho(newValue : Boolean); + function GetLocalEcho : Boolean; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Connect; + procedure Disconnect; + procedure EditOptions; + procedure RestoreOptions; + function IsConnected : Boolean; + function Send(Data : Pointer; Len : Integer) : Integer; + function SendStr(Data : String) : Integer; + function GetSelTextBuf(Buffer: PChar; BufSize: Integer): Integer; + procedure KeyPress(var Key: Char); override; + property TnConn : TTnCnx read FTnCnx; + published + property IniFilename : String read FIniFileName write FIniFileName; + property SectionName : String read FSectionName write FSectionName; + property KeyName : String read FKeyName write FKeyName; + property Error : Word read FError write FError; + property HostName : String read FHostName write SetHostName; + property Port : String read FPort write FPort; + property Tag : LongInt read FTag write FTag; + property Location : String read GetLocation write SetLocation; + property UpperLock : Boolean read FUpperLock write FUpperLock; + property LocalEcho : Boolean read FLocalEcho write FLocalEcho; + + property OnKeyDown; + property OnSessionClosed : TNotifyEvent read FOnSessionClosed + write FOnSessionClosed; + property OnSessionConnected : TNotifyEvent read FOnSessionConnected + write FOnSessionConnected; + property OnEndOfRecord : TNotifyEvent read GetOnEndOfRecord + write SetOnEndOfRecord; + property OnNamesClick : TNotifyEvent read FOnNamesClick + write FOnNamesClick; + property OnSendLoc : TNotifyEvent read FOnSendLoc + write FOnSendLoc; + property OnTermType : TNotifyEvent read FOnTermType + write FOnTermType; + property OnLocalEcho : TNotifyEvent read FOnLocalEcho + write FOnLocalEcho; + property OnDataAvailable : TTnEmulVTDataAvailable read FOnDataAvailable + write FOnDataAvailable; + end; + +procedure Register; + +implementation + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TTnEmulVT]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure FontToIni(Font : TFont; IniFile : TIniFile; Section : String); +var + nBuf : Integer; +begin + IniFile.WriteString(Section, 'FontName', Font.Name); + IniFile.WriteInteger(Section, 'FontSize', Font.Size); + IniFile.WriteInteger(Section, 'FontPitch', ord(Font.Pitch)); + nBuf := 0; + if fsBold in Font.Style then + nBuf := nBuf or 1; + if fsItalic in Font.Style then + nBuf := nBuf or 2; + if fsUnderline in Font.Style then + nBuf := nBuf or 4; + if fsStrikeOut in Font.Style then + nBuf := nBuf or 8; + IniFile.WriteInteger(Section, 'FontStyle', nBuf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure IniToFont(Font : TFont; IniFile : TIniFile; Section : String); +var + FontName : String; + nBuf : Integer; +begin + FontName := IniFile.ReadString(Section, 'FontName', '*'); + if FontName <> '*' then begin + Font.Name := FontName; + Font.Size := IniFile.ReadInteger(Section, 'FontSize', 9); + Font.Pitch := TFontPitch(IniFile.ReadInteger(Section, 'FontPitch', 12)); + nBuf := IniFile.ReadInteger(Section, 'FontStyle', 0); + Font.Style := []; + if (nBuf and 1) <> 0 then + Font.Style := Font.Style + [fsBold]; + if (nBuf and 2) <> 0 then + Font.Style := Font.Style + [fsItalic]; + if (nBuf and 4) <> 0 then + Font.Style := Font.Style + [fsUnderline]; + if (nBuf and 8) <> 0 then + Font.Style := Font.Style + [fsStrikeOut]; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTnEmulVT.Create(AOwner: TComponent); +var + Rect : TRect; +begin + inherited Create(AOwner); + + if TnCnxVersion < 203 then + raise Exception.Create('TTnEmulVT need TTnCnx version 2.03 or higher ' + + 'Please download last release from ' + + 'http://www.overbyte.be'); + + FTnCnx := TTnCnx.Create(Self); + FTnCnx.OnDataAvailable := TnCnxDataAvailable; + FTnCnx.OnSessionClosed := TnCnxSessionClosed; + FTnCnx.OnSessionConnected := TnCnxSessionConnected; + FTnCnx.OnSendLoc := TnCnxSendLoc; + FTnCnx.OnTermType := TnCnxTermType; + FTnCnx.OnLocalEcho := TnCnxLocalEcho; + + FIniFileName := 'TNEMULVT.INI'; + FSectionName := 'Windows'; + FKeyName := 'TnEmulVT'; + FPort := 'telnet'; + Rect.Top := -1; + SelectRect := Rect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTnEmulVT.Destroy; +begin + if Assigned(FTnCnx) then begin + FTnCnx.Free; + FTnCnx := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF BCB_FLAG} +procedure TTnEmulVT.Notification( + AComponent : TComponent; + Operation : TOperation); +begin + inherited Notification(AComponent, operation); + if Operation = opRemove then begin + if AComponent = FTnCnx then + FTnCnx:= nil; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.SetHostName(newValue : String); +begin + FHostName := newValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.GetLocalEcho : Boolean; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.LocalEcho + else + Result := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.RequestLocalEcho(newValue : Boolean); +begin + if Assigned(FTnCnx) then begin + if newValue then + FTnCnx.DontOption(TN_ECHO) + else + FTnCnx.DoOption(TN_ECHO); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.SetLocation(Value : String); +begin + if Assigned(FTnCnx) then + FTnCnx.Location := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.GetLocation : String; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.Location; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.Display(Msg : String); +begin + WriteStr(Msg); + Repaint; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.SetOnEndOfRecord(Value : TNotifyEvent); +begin + if Assigned(FTnCnx) then + FTnCnx.OnEndOfRecord := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.GetOnEndOfRecord : TNotifyEvent; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.OnEndOfRecord; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxSendLoc(Sender: TObject); +begin + if Assigned(FOnSendLoc) then + FOnSendLoc(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxTermType(Sender: TObject); +begin + if Assigned(FOnTermType) then + FOnTermType(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxLocalEcho(Sender: TObject); +begin + if Assigned(FOnLocalEcho) then + FOnLocalEcho(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TriggerDataAvailable(Buffer : Pointer; Len: Integer); +begin + if Assigned(FOnDataAvailable) then + FOnDataAvailable(Self, Buffer, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxDataAvailable(Sender: TTnCnx; Buffer : Pointer; + Len: Integer); +var + I : Integer; +begin + TriggerDataAvailable(Buffer, Len); + + if Len <= 0 then + Exit; + + for I := 0 to Len - 1 do begin + try + WriteChar((PChar(Buffer) + I)^); + except + Break; + end; + end; + UpdateScreen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxSessionClosed(Sender: TTnCnx; Erc: Word); +begin + Display(#13 + #10 + '*** Server has closed ***' + #13 + #10); + MessageBeep(MB_ICONASTERISK); + FError := Erc; + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxSessionConnected(Sender: TTnCnx; Erc: Word); +begin + if Erc = 0 then begin + Display('Connected' + #13 + #10); + end + else begin + Display('Connection failed: ' + +{$IFDEF DELPHI} + FTnCnx.Socket.SocketErrorDesc(Error) + +{$ELSE} + WSocketErrorDesc(Error) + +{$ENDIF} + #13 + #10); + MessageBeep(MB_ICONASTERISK); + end; + FError := Erc; + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.RestoreOptions; +var + IniFile : TIniFile; + xFont : TFont; +begin + if Length(FHostname) <= 0 then + Exit; + + IniFile := TIniFile.Create(IniFilename); + xFont := TFont.Create; + IniToFont(xFont, IniFile, HostName); + Font := xFont; + xFont.Free; + + LineHeight := IniFile.ReadInteger(HostName, 'LineHeight', 12); + Rows := IniFile.ReadInteger(HostName, 'Rows', 25); + Cols := IniFile.ReadInteger(HostName, 'Cols', 80); + FKeys := IniFile.ReadInteger(HostName, 'FKeys', 0); + AutoCr := IniFile.ReadInteger(HostName, 'AutoCR', 0) <> 0; + AutoLF := IniFile.ReadInteger(HostName, 'AutoLF', 0) <> 0; + LocalEcho := IniFile.ReadInteger(HostName, 'LocalEcho', 0) <> 0; + MonoChrome := IniFile.ReadInteger(HostName, 'MonoChrome', 0) <> 0; + UpperLock := IniFile.ReadInteger(HostName, 'UpperLock', 0) <> 0; + Xlat := IniFile.ReadInteger(HostName, 'Xlat', 0) <> 0; + GraphicDraw := IniFile.ReadInteger(HostName, 'GraphicDraw', 0) <> 0; + CharZoom := StrToFloat(IniFile.ReadString(HostName, 'CharZoom', '1')); + LineZoom := StrToFloat(IniFile.ReadString(HostName, 'LineZoom', '1')); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.Connect; +var +{$IFDEF VER80} { Delphi 1 } + Form : TForm; +{$ELSE} +{$IFDEF VER90} { Delphi 2 } + Form : TForm; +{$ELSE} +{$IFDEF VER93} { Bcb 1 } + Form : TForm; +{$ELSE} { Delphi 3/4, Bcb 3/4 } + Form : TCustomForm; +{$ENDIF} +{$ENDIF} +{$ENDIF} +begin + if Length(FHostname) <= 0 then + Exit; + + Clear; + if not Assigned(FTnCnx) then + Exit; + FTnCnx.Port := FPort; + FTnCnx.Host := FHostName; + FTnCnx.Connect; + Display('Connecting to ''' + HostName + '''' + #13 + #10); + Form := GetParentForm(Self); + Form.ActiveControl := Self; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.Disconnect; +begin + if Assigned(FTnCnx) then + FTnCnx.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.Send(Data : Pointer; Len : Integer) : Integer; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.Send(Data, Len) + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.SendStr(Data : String) : Integer; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.SendStr(Data) + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.IsConnected : Boolean; +begin + if Assigned(FTnCnx) then + Result := FTnCnx.IsConnected + else + Result := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.EditOptions; +var + IniFile : TIniFile; +begin + if Length(FHostname) <= 0 then + Exit; + + if OptForm = nil then + OptForm := TOptForm.Create(Self); + + OptForm.IniFileName := FIniFileName; + OptForm.OnNamesClick := FOnNamesClick; + + RestoreOptions; + OptForm.AFont.Assign(Font); + OptForm.LineHeight := LineHeight; + OptForm.AutoCR := AutoCr; + OptForm.AutoLF := AutoLF; + OptForm.LocalEcho := LocalEcho; + OptForm.MonoChrome := MonoChrome; + OptForm.UpperLock := UpperLock; + OptForm.Xlat := Xlat; + OptForm.GraphicDraw := GraphicDraw; + OptForm.Rows := Rows; + OptForm.Cols := Cols; + OptForm.HostName := FHostName; + OptForm.FKeys := FKeys; + OptForm.CharZoom := CharZoom; + OptForm.LineZoom := LineZoom; + if OptForm.ShowModal = IDOK then begin + Font := OptForm.AFont; + LineHeight := OptForm.LineHeight; + AutoCR := OptForm.AutoCr; + AutoLF := OptForm.AutoLF; + LocalEcho := OptForm.LocalEcho; + MonoChrome := OptForm.MonoChrome; + UpperLock := OptForm.UpperLock; + Xlat := OptForm.Xlat; + GraphicDraw := OptForm.GraphicDraw; + Rows := OptForm.Rows; + Cols := OptForm.Cols; + FKeys := OptForm.FKeys; + LineZoom := OptForm.LineZoom; + CharZoom := OptForm.CharZoom; + IniFile := TIniFile.Create(FIniFilename); + FontToIni(OptForm.AFont, IniFile, FHostName); + IniFile.WriteInteger(FHostName, 'LineHeight', LineHeight); + IniFile.WriteInteger(FHostName, 'Rows', Rows); + IniFile.WriteInteger(FHostName, 'Cols', Cols); + IniFile.WriteInteger(FHostName, 'AutoCR', ord(AutoCR)); + IniFile.WriteInteger(FHostName, 'AutoLF', ord(AutoLF)); + IniFile.WriteInteger(FHostName, 'LocalEcho', ord(LocalEcho)); + IniFile.WriteInteger(FHostName, 'MonoChrome', ord(MonoChrome)); + IniFile.WriteInteger(FHostName, 'UpperLock', ord(UpperLock)); + IniFile.WriteInteger(FHostName, 'Xlat', ord(Xlat)); + IniFile.WriteInteger(FHostName, 'GraphicDraw', ord(GraphicDraw)); + IniFile.WriteInteger(FHostName, 'FKeys', FKeys); + IniFile.WriteString(FHostName, 'LineZoom', Format('%5.3f', [LineZoom])); + IniFile.WriteString(FHostName, 'CharZoom', Format('%5.3f', [CharZoom])); + IniFile.Free; + Repaint; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.KeyPress(var Key: Char); +begin + inherited KeyPress(Key); + if FUpperLock and (Key in ['a'..'z']) then + Key := chr(ord(Key) and $DF); + if Key <> #0 then begin + try + if FLocalEcho then + WriteChar(Key); + if Assigned(FTnCnx) then + FTnCnx.Send(@Key, 1); + except + { Ignore any exception ! } + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.DoKeyBuffer(Buffer : PChar; Len : Integer); +begin + try + if FLocalEcho then + WriteBuffer(Buffer, Len); + if Assigned(FTnCnx) then + FTnCnx.Send(Buffer, Len); + except + { Ignore exception ! } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure DrawFocusRectangle(Wnd: HWnd; Rect: TRect); +var + DC : HDC; +begin + DC := GetDC(Wnd); + DrawFocusRect(DC, Rect); + ReleaseDC(Wnd, DC); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); +begin + inherited MouseDown(Button, Shift, X, Y); + FMouseDown := TRUE; + if FFocusDrawn then begin + DrawFocusRectangle(Handle, FFocusRect); + FFocusDrawn := FALSE; + end; + if SelectRect.Top <> -1 then begin + FFocusRect.Top := -1; + SelectRect := FFocusRect; + Repaint; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.MouseMove(Shift: TShiftState; X, Y: Integer); +var + Rect : TRect; + Point : TPoint; +begin + inherited MouseMove(Shift, X, Y); + if not FMouseDown then + Exit; + + if not FMouseCaptured then begin + SetCapture(Handle); + FMouseCaptured := TRUE; + FMouseTop := SnapPixelToRow(Y); + FMouseLeft := SnapPixelToCol(X); + + Point.X := 0; + Point.Y := 0; + Rect.TopLeft := ClientToScreen(Point); + Point.X := Width - 16; + Point.Y := Height; + Rect.BottomRight := ClientToScreen(Point); + ClipCursor(@Rect); + end + else if (FMouseTop <> Y) or (FMouseLeft <> X) then begin + if FFocusDrawn then + DrawFocusRectangle(Handle, FFocusRect); + Rect.Top := FMouseTop; + Rect.Left := FMouseLeft; + Rect.Bottom := SnapPixelToRow(Y) + LineHeight + 4; + Rect.Right := SnapPixelToCol(X) + CharWidth; + DrawFocusRectangle(Handle, Rect); + FFocusRect := Rect; + FFocusDrawn := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.MouseUp(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); +begin + inherited MouseUp(Button, Shift, X, Y); + FMouseDown := FALSE; + if FMouseCaptured then begin + ReleaseCapture; + FMouseCaptured := FALSE; + ClipCursor(nil); + end; + if FFocusDrawn then begin + DrawFocusRectangle(Handle, FFocusRect); + FFocusDrawn := FALSE; + if (FFocusRect.Right - FFocusRect.Left) < CharWidth then + FFocusRect.Top := -1; + if (FFocusRect.Bottom - FFocusRect.Top) < LineHeight then + FFocusRect.Top := -1; + SelectRect := FFocusRect; + Repaint; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +function TTnEmulVT.GetSelTextBuf(Buffer: PChar; BufSize: Integer): Integer; +var + StartRow : Integer; + StopRow : Integer; + StartCol : Integer; + StopCol : Integer; + nRow : Integer; + nCol : Integer; + Line : TLine; + nCnt : Integer; +begin + nCnt := 0; + if (SelectRect.Top = -1) or (BufSize < 1) then begin + if BufSize > 0 then + Buffer[0] := #0; + Result := nCnt; + Exit; + end; + + StartRow := PixelToRow(SelectRect.Top); + StopRow := PixelToRow(SelectRect.Bottom) - 1; + StartCol := PixelToCol(SelectRect.Left); + StopCol := PixelToCol(SelectRect.Right) - 1; + + for nRow := StartRow to StopRow do begin + if BufSize < 2 then + Break; + Line := Screen.FLines^[Rows - 1 - nRow]; + for nCol := StartCol to StopCol do begin + Buffer[0] := Line.Txt[nCol]; + Inc(Buffer); + Dec(BufSize); + Inc(nCnt); + if BufSize < 2 then + Break; + end; + if nRow < StopRow then begin + if BufSize < 4 then + Break; + Buffer[0] := #13; + Buffer[1] := #10; + Inc(Buffer); + Inc(Buffer); + Dec(BufSize); + Dec(BufSize); + Inc(nCnt); + Inc(nCnt); + end; + end; + + Buffer[0] := #0; + Result := nCnt; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} + + +end. + diff --git a/lib/ics/Delphi/Vc32/TnOptFrm.dcu b/lib/ics/Delphi/Vc32/TnOptFrm.dcu new file mode 100644 index 00000000..e08fb25b Binary files /dev/null and b/lib/ics/Delphi/Vc32/TnOptFrm.dcu differ diff --git a/lib/ics/Delphi/Vc32/TnOptFrm.dfm b/lib/ics/Delphi/Vc32/TnOptFrm.dfm new file mode 100644 index 00000000..d665a0aa Binary files /dev/null and b/lib/ics/Delphi/Vc32/TnOptFrm.dfm differ diff --git a/lib/ics/Delphi/Vc32/TnOptFrm.pas b/lib/ics/Delphi/Vc32/TnOptFrm.pas new file mode 100644 index 00000000..cdf8b3f9 --- /dev/null +++ b/lib/ics/Delphi/Vc32/TnOptFrm.pas @@ -0,0 +1,564 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: User interface for TnEmulVT component options +Creation: May, 1996 +Author: Franois PIETTE +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Mar 18, 1999 Removed FormPos dependency + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnOptFrm; + +interface + +uses + WinTypes, WinProcs, SysUtils, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, IniFiles, Buttons; + +type + TOptForm = class(TForm) + Label1: TLabel; + Label2: TLabel; + AutoCRCheckBox: TCheckBox; + AutoLFCheckBox: TCheckBox; + LocalEchoCheckBox: TCheckBox; + MonoChromeCheckBox: TCheckBox; + RowsEdit: TEdit; + ColsEdit: TEdit; + OkButton: TButton; + CancelButton: TButton; + LaboButton: TButton; + RDVButton: TButton; + USUSButton: TButton; + XlatCheckBox: TCheckBox; + FontDialog1: TFontDialog; + FontButton: TButton; + LineHeightEdit: TEdit; + Label3: TLabel; + NamesButton: TButton; + UpperLockCheckBox: TCheckBox; + A11Button: TButton; + GroupBox1: TGroupBox; + FKeys1RadioButton: TRadioButton; + FKeys2RadioButton: TRadioButton; + FKeys3RadioButton: TRadioButton; + Label4: TLabel; + Label5: TLabel; + LineZoomEdit: TEdit; + CharZoomEdit: TEdit; + GraphicDrawCheckBox: TCheckBox; + procedure OkButtonClick(Sender: TObject); + procedure CancelButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure LaboButtonClick(Sender: TObject); + procedure RDVButtonClick(Sender: TObject); + procedure USUSButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FontButtonClick(Sender: TObject); + procedure NamesButtonClick(Sender: TObject); + procedure A11ButtonClick(Sender: TObject); + private + { Private declarations } + public + FIniFilename : String; + FInitialized : Boolean; + FSectionName : String; + FKeyName : String; + FHostName : String; + FFont : TFont; + FOnNamesClick : TNotifyEvent; + function GetLocalEcho : Boolean; + function GetAutoCr : Boolean; + function GetAutoLF : Boolean; + function GetAltKeys : Boolean; + function GetMonoChrome : Boolean; + function GetUpperLock : Boolean; + function GetXlat : Boolean; + function GetGraphicDraw : Boolean; + function GetRows : Integer; + function GetCols : integer; + function GetLineHeight : Integer; + function GetLineZoom : Single; + function GetCharZoom : Single; + function GetFKeys : Integer; + procedure SetLocalEcho(Value : Boolean); + procedure SetAutoCr(Value : Boolean); + procedure SetAutoLF(Value : Boolean); + procedure SetAltKeys(Value : Boolean); + procedure SetMonoChrome(Value : Boolean); + procedure SetUpperLock(Value : Boolean); + procedure SetXlat(Value : Boolean); + procedure SetGraphicDraw(Value : Boolean); + procedure SetRows(Value : Integer); + procedure SetCols(Value : Integer); + procedure SetHostName(Value : String); + procedure SetLineHeight(Value : Integer); + procedure SetLineZoom(Value : Single); + procedure SetCharZoom(Value : Single); + procedure SetFKeys(Value : Integer); + + property IniFilename : String read FIniFileName write FIniFileName; + property SectionName : String read FSectionName write FSectionName; + property KeyName : String read FKeyName write FKeyName; + property HostName : String read FHostName write SetHostName; + property LocalEcho : Boolean read GetLocalEcho write SetLocalEcho; + property AutoCR : Boolean read GetAutoCr write SetAutoCR; + property AutoLF : Boolean read GetAutoLF write SetAutoLF; + property AltKeys : Boolean read GetAltKeys write SetAltKeys; + property FKeys : Integer read GetFKeys write SetFkeys; + property MonoChrome : Boolean read GetMonoChrome write SetMonoChrome; + property UpperLock : Boolean read GetUpperLock write SetUpperLock; + property Xlat : Boolean read GetXlat write SetXlat; + property GraphicDraw : Boolean read GetGraphicDraw write SetGraphicDraw; + property Rows : Integer read GetRows write SetRows; + property Cols : Integer read GetCols write SetCols; + property AFont : TFont read FFont write FFont; + property LineHeight : Integer read GetLineHeight write SetLineHeight; + property LineZoom : Single read GetLineZoom write SetLineZoom; + property CharZoom : Single read GetCharZoom write SetCharZoom; + + property OnNamesClick : TNotifyEvent read FOnNamesClick write FOnNamesClick; + end; + +var + OptForm: TOptForm; + +implementation + +{$R *.DFM} + +const + KeyTop = 'Top'; + KeyLeft = 'Left'; + KeyWidth = 'Width'; + KeyHeight = 'Height'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] in ['0'..'9']) do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetFKeys(Value : Integer); +begin + case Value of + 0 : FKeys1RadioButton.Checked := TRUE; + 1 : FKeys2RadioButton.Checked := TRUE; + 2 : FKeys3RadioButton.Checked := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetFKeys : Integer; +begin + if FKeys1RadioButton.Checked then + Result := 0 + else if FKeys2RadioButton.Checked then + Result := 1 + else + Result := 2; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetHostName(Value : String); +begin + FHostName := Value; + Caption := 'Options for ' + HostName; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetLocalEcho : Boolean; +begin + Result := LocalEchoCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetAutoCr : Boolean; +begin + Result := AutoCrCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetAutoLF : Boolean; +begin + Result := AutoLFCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetXlat : Boolean; +begin + Result := XlatCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetGraphicDraw : Boolean; +begin + Result := GraphicDrawCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetAltKeys : Boolean; +begin + Result := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetMonoChrome : Boolean; +begin + Result := MonoChromeCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetUpperLock : Boolean; +begin + Result := UpperLockCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetLocalEcho(Value : Boolean); +begin + LocalEchoCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetAutoCr(Value : Boolean); +begin + AutoCRCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetAutoLF(Value : Boolean); +begin + AutoLFCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetXlat(Value : Boolean); +begin + XlatCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetGraphicDraw(Value : Boolean); +begin + GraphicDrawCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetAltKeys(Value : Boolean); +begin +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetMonoChrome(Value : Boolean); +begin + MonoChromeCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetUpperLock(Value : Boolean); +begin + UpperLockCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetRows : Integer; +begin + Result := atoi(RowsEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetCols : integer; +begin + Result := atoi(ColsEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetLineZoom : Single; +begin + try + Result := StrToFloat(LineZoomEdit.Text); + except + Result := 1.0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetCharZoom : Single; +begin + try + Result := StrToFloat(CharZoomEdit.Text); + except + Result := 1.0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetLineHeight : integer; +var + DC : HDC; + Metrics : TTextMetric; + hObject : THandle; +begin + Result := atoi(LineHeightEdit.Text); + if Result = 0 then begin + DC := GetDC(0); + hObject := SelectObject(DC, FFont.Handle); + GetTextMetrics(DC, Metrics); + SelectObject(DC, hOBject); + ReleaseDC(0, DC); + + Result := Metrics.tmHeight; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetRows(Value : Integer); +begin + RowsEdit.Text := IntToStr(Value); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetCols(Value : Integer); +begin + ColsEdit.Text := IntToStr(Value); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetLineHeight(Value : Integer); +begin + LineHeightEdit.Text := IntToStr(Value); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetLineZoom(Value : Single); +begin + LineZoomEdit.Text := Format('%5.3f', [Value]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetCharZoom(Value : Single); +begin + CharZoomEdit.Text := Format('%5.3f', [Value]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.OkButtonClick(Sender: TObject); +begin + ModalResult := IDOK; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.CancelButtonClick(Sender: TObject); +begin + ModalResult := IDCANCEL; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not FInitialized then begin + FInitialized := TRUE; + + IniFile := TIniFile.Create(FIniFileName); + Width := IniFile.ReadInteger(SectionName, KeyName + KeyWidth, + Width); + Height := IniFile.ReadInteger(SectionName, KeyName + KeyHeight, + Height); + Top := IniFile.ReadInteger(SectionName, KeyName + KeyTop, + (Screen.Height - Height) div 2); + Left := IniFile.ReadInteger(SectionName, KeyName + KeyLeft, + (Screen.Width - Width) div 2); + IniFile.Destroy; + end; + NamesButton.Visible := Assigned(FOnNamesClick); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteInteger(SectionName, KeyName + KeyTop, Top); + IniFile.WriteInteger(SectionName, KeyName + KeyLeft, Left); + IniFile.WriteInteger(SectionName, KeyName + KeyWidth, Width); + IniFile.WriteInteger(SectionName, KeyName + KeyHeight, Height); + IniFile.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.A11ButtonClick(Sender: TObject); +begin + Rows := 25; + Cols := 80; + AutoCr := FALSE; + AutoLF := FALSE; + AltKeys := TRUE; + LocalEcho := FALSE; + MonoChrome := TRUE; + UpperLock := TRUE; + Xlat := FALSE; + FKeys3RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.LaboButtonClick(Sender: TObject); +begin + Rows := 24; + Cols := 80; + AutoCr := TRUE; + AutoLF := FALSE; + AltKeys := TRUE; + LocalEcho := FALSE; + MonoChrome := TRUE; + UpperLock := FALSE; + Xlat := FALSE; + FKeys2RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.RDVButtonClick(Sender: TObject); +begin + Rows := 25; + Cols := 80; + AutoCr := FALSE; + AutoLF := FALSE; + AltKeys := FALSE; + LocalEcho := FALSE; + MonoChrome := FALSE; + UpperLock := FALSE; + Xlat := TRUE; + FKeys1RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.USUSButtonClick(Sender: TObject); +begin + Rows := 25; + Cols := 80; + AutoCr := FALSE; + AutoLF := FALSE; + AltKeys := FALSE; + LocalEcho := FALSE; + MonoChrome := FALSE; + UpperLock := FALSE; + Xlat := TRUE; + FKeys2RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FormCreate(Sender: TObject); +begin + FFont := TFont.Create; + SectionName := 'Windows'; + KeyName := 'Options'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FontButtonClick(Sender: TObject); +begin + FontDialog1.Font := FFont; + if FontDialog1.Execute then + FFont := FontDialog1.Font; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.NamesButtonClick(Sender: TObject); +begin + if Assigned(FOnNamesClick) then + FOnNamesClick(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/UUEncode.pas b/lib/ics/Delphi/Vc32/UUEncode.pas new file mode 100644 index 00000000..30e07f1d --- /dev/null +++ b/lib/ics/Delphi/Vc32/UUEncode.pas @@ -0,0 +1,142 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE + Using code donated by Brad Choate +Object: UUEncode support routine +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be +WebSite: http://www.rtfm.be/fpiette +Creation: February 14th, 1998 +Version: 1.00 +Support: Use twsocket@rtfm.be mailing list. See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit UUEncode; + +interface + +uses + SysUtils; + +const + UUEncodeVersion = 100; + CopyRight : String = ' UUEncodeVersion Unit (c) 1998 F. Piette V1.00 '; + + +procedure InitUUEncode(var hFile: File; sFile: string); +procedure DoUUEncode(var hFile: File; var sLine: string; var More: boolean); +procedure EndUUEncode(var hFile: File); + +implementation + +type + TLookup = array [0..64] of Char; + +const + Base64Out: TLookup = + ( + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', + 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', '=' + ); + +{$I+} // Activate I/O check (EInOutError exception generated) + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure InitUUEncode(var hFile: File; sFile: string); +begin + AssignFile(hFile, sFile); + Reset(hFile, 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DoUUEncode(var hFile: File; var sLine: string; var More: boolean); +var + Count : integer; + DataIn : array [0..2] of byte; + DataOut : array [0..80] of byte; + ByteCount : integer; + i : integer; +begin + Count := 0; +{$I-} + while not Eof(hFile) do begin +{$I+} + BlockRead(hFile, DataIn, 3, ByteCount); + DataOut[Count] := (DataIn[0] and $FC) shr 2; + DataOut[Count + 1] := (DataIn[0] and $03) shl 4; + if ByteCount > 1 then begin + DataOut[Count + 1] := DataOut[Count + 1] + + (DataIn[1] and $F0) shr 4; + DataOut[Count + 2] := (DataIn[1] and $0F) shl 2; + if ByteCount > 2 then begin + DataOut[Count + 2] := DataOut[Count + 2] + + (DataIn[2] and $C0) shr 6; + DataOut[Count + 3] := (DataIn[2] and $3F); + end + else begin + DataOut[Count + 3] := $40; + end; + end + else begin + DataOut[Count + 2] := $40; + DataOut[Count + 3] := $40; + end; + + for i := 0 to 3 do + DataOut[Count + i] := Byte(Base64Out[DataOut[Count + i]]); + + Count := Count + 4; + + if Count > 59 then + break; + end; + + DataOut[Count] := $0; + sLine := StrPas(@DataOut[0]); + +{$I-} + More := not Eof(hFile); +{$I+} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure EndUUEncode(var hFile: File); +begin + CloseFile(hFile); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/WSOCKET.GID b/lib/ics/Delphi/Vc32/WSOCKET.GID new file mode 100644 index 00000000..869eea80 Binary files /dev/null and b/lib/ics/Delphi/Vc32/WSOCKET.GID differ diff --git a/lib/ics/Delphi/Vc32/WSOCKET.HLP b/lib/ics/Delphi/Vc32/WSOCKET.HLP new file mode 100644 index 00000000..9c3f3d49 Binary files /dev/null and b/lib/ics/Delphi/Vc32/WSOCKET.HLP differ diff --git a/lib/ics/Delphi/Vc32/WSocket.dcu b/lib/ics/Delphi/Vc32/WSocket.dcu new file mode 100644 index 00000000..e0417c85 Binary files /dev/null and b/lib/ics/Delphi/Vc32/WSocket.dcu differ diff --git a/lib/ics/Delphi/Vc32/WSocket.pas b/lib/ics/Delphi/Vc32/WSocket.pas new file mode 100644 index 00000000..a0cbd2b1 --- /dev/null +++ b/lib/ics/Delphi/Vc32/WSocket.pas @@ -0,0 +1,5674 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TWSocket class encapsulate the Windows Socket paradigm +Creation: April 1996 +Version: 4.48 +EMail: francois.piette@overbyte.be http://www.overbyte.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1996-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Jul 18, 1996 Move all low level socket to winsock to be Delphi 2.x compatible +Sep 18, 1996 Use structured exception for handling errors +Sep 19, 1996 Check csDestroying before invoking event handler +Nov 04, 1996 Better error handling +Jan 31, 1997 Changed property assignation for Addr, Port and Proto + Added notification handler +Feb 14, 1997 Corrected bug in property assignation for Addr, Port and Proto +Mar 26, 1997 Make UDP protocol work correctly + Enable UDP broadcasting by using addr 255.255.255.255 +Apr 1, 1997 Added class function when independent of any open socket + Moved InitData as global + Added ReceivedFrom function + Added ResolveHost function +Jul 22, 1997 Adapted to Delphi 3 which has a modified winsock.accept +Aug 13, 1997 'sin' member made public +Aug 24, 1997 Create the only help + Makes writing HSocket the same as calling Dup. +Sep 5, 1997 Version 2.01, added WinsockInfo function +Sep 21, 1997 Version 2.02, make it really thread safe + created global WSocketVersion +Sep 25, 1997 Version 2.04, port to C++Builder +Sep 27, 1997 Version 2.05. All class methods converted to global + procedure or function because C++Builder do not like + class method very much. + Old class method New global function + ---------------- ------------------- + WinsockInfo WinsockInfo + SocketErrorDesc WSocketErrorDesc + GetHostByAddr WSocketGetHostByAddr + GetHostByName WSocketGetHostByName + ResolveHost WSocketResolveHost + HostName LocalHostName +Oct 02, 1997 V2.06 Added a check in destructor to avoid calling WSACleanup at + design time which crashes the excellent Eagle Software CDK. +Oct 16, 1997 V2.07 Added PortNum property with numeric value for Port. + Added RcvdCount property to return the number of + characters received in the buffer but not read yet. Do not + confuse with ReadCount which returns the number of chars + already received. + Added a check for FWait assignation in front of ReadLine + Prefixed each TSocketState value by 'ws' to avoid name conflict. + Moved FHSocket member to private section because the property + HSocket does the right job. + Added a check for state closed when changing Port, Proto and Addr. +Oct 22, 1997 V2.08 Added Flush method (asked by john@nexnix.co.uk) and + FlushTimeout property (default to 60 seconds). +Oct 22, 1997 V2.09 Added SendFlags property to enable sending in or out of + band data (normal or urgent, see RFC-1122) +Oct 28, 1997 V2.10 Added an OnLineTooLong event and code to handle the case + where ReadLine has been called and the buffer overflowed (line + long) +Oct 29, 1997 V2.11 Added DnsLookup functionnality (DnsLookup method, DnsResult + property and DnsLookupDone event). + Calling the connect method with a hostname work well except that + it could block for a long period (ie: 2 minutes) if DNS do not + respond. Calling the connect method with a numeric IP address will + never block. So you can call DnsLookup to start hostname + resolution in the background, after some time you evenutually + receive the OnDnsLookupDone event. The copy the DnsResult property + to the Addr property and call connect. +Oct 30, 1997 V2.12 added a check in DnsLookup to handel numeric IP which do + not require any lookup. The numeric IP is treated immediately + and immediately trigger the DnsLookupDone event. + I modified the code to be compatible with Delphi 1. +Oct 31, 1997 V2.13 added CancelDnsLookup procedure. +Nov 09, 1997 V2.14 add LocalIPList function to get the list of local IP + addresses (you have two IP addresses when connected to a LAN + and an ISP). +Nov 11, 1997 V2.15 Made TCustomWSocket with virtual functions. This will + allow to easily descend a new component from TCustomWSocket. + Make ReadLine stop when the connection is broken. +Nov 12, 1997 V2.16 Corrected bug (Justin Yunke ) + in LocalIPList: phe should be checked for nil. +Nov 18, 1997 Added ReceiveStr function (Suggested by FLDKNHA@danisco.com) +Nov 30, 1997 V2.18 Added a call to OnDnsLookupDone when canceling. +Dec 04, 1997 V2.19 Added LocalPort property and SessionConnected event + for UDP socket. + V2.20 Modified MessageLoop and ProcessMessages to process not + only the socket messages, but all messages (necessary if the + thread has several TWSocket for example). +Dec 09, 1997 V2.21 Corrected a minor bug in ReceiveStr. Detected by + david@e.co.za (David Butler). +Dec 10, 1997 V2.22 Corrected a minor bug in Send which now correctly + returns the number of bytes sent. Detected by + james.huggins@blockbuster.com +Dec 16, 1997 V2.23 Corrected a bug which prevented the receiving of datagram + from a UDP socket. + Thank to Mark Melvin (melvin@misrg.ml.org) for pointing it. +Dec 20, 1997 V2.24 Added the PeekData function as suggested by Matt Rose + mcrose@avproinc.com +Dec 26, 1997 V2.25 Added the Text property as suggested by Daniel P. Stasinski + . Made GetXPort work even when listening as + suggested by is81024@cis.nctu.edu.tw. +Jan 10, 1998 V2.26 Check for null hostname in DNSLookup + Added DnsResultList with all IP addresses returned form DNS +Jan 13, 1998 V2.27 a Added MultiThreaaded property to tell the component that + it is working in a thread and should take care of it (call + internal ProcessMessages in place of Application.ProcessMessages, + and do not use the WaitCtrl object). +Jan 15, 1998 V2.28 WMAsyncSelect revisited to work properly with NT winsock 2. +Feb 10, 1998 V2.29 Added an OnError event. If not assigned, then the component + raise an exception when the error occurs. +Feb 14, 1998 V2.30 Published Text property +Feb 16, 1998 V2.31 Added virtual methods to trigger events + Renamed all event handler variable to begin with FOn +Feb 26, 1998 V2.32 Added procedure PutDataInSendBuffer and PutStringInSendBuffer + Using PutDataInSendBuffer you can place data in the send buffer + without actualy trying to send it. This allows to place several + (probably small) data chunk before the component attempt to send + it. This prevent small packet to be sent. You can call + Send(nil, 0) to force the component to begin to send data. + If the buffer was not empty, PutDataInSendBuffer will just queue + data to the buffer. This data will be sent in sequence. +Mar 02, 1998 V2.33 Changed the error check with WSAstartup as pointed out by + Donald Strenczewilk (dstrenz@servtech.com) +Mar 06, 1998 V2.34 Added a runtime property to change the buffer size. +Mar 27, 1998 V2.35 Adapted for C++Builder 3 +Apr 08, 1998 V2.36 Made SetDefaultValue virtual +Apr 13, 1998 V2.37 Reset FDnsLookupHandle to 0 after a failed call to + WSACancelAsyncRequest +Apr 22, 1998 V2.38 Published AllSent property to let outside know if our + buffer has some data unsent. +Apr 28, 1998 V2.39 Added LingerOnOff and LingerTimeout. Default values are + wsLingerOn and timeout = 0 to behave by default as before. + This value is setup just before Connect. Call SetLingerOption to + set the linger option on the fly (the connection must be + established to set the option). See winsock.closesocket on line + help (winsock.hlp or win32.hlp) for a dsicussion of this option + usage. +May 06, 1998 V2.40 Added a workaround for Trumpet winsock inet_addr bug. + Thanks to Andrej Cuckov for his code. +May 18, 1998 V2.41 Jan Tomasek found that Trumpet + Winsock (Win 3.11) has some bugs and suggested a workaround in + TryToSend procedure. This workaround makes TWSocket blocking in + some cases. A new property enables the workaround. See code. +Jun 01, 1998 V2.42 In finalization section, check for not assigned IPList. +Jun 15, 1998 V2.43 Added code to finalization section to unload winsock if + still loaded at that point (this happend if no socket where + created but WinsockInfo called). Suggested by Daniel Fazekas + +Jun 27, 1998 V2.44 Added checks for valid arguments in SetPort, SetProto + and SetAddr. Deferred address resolution until Connect or Listen. +Jul 08, 1998 V2.45 Adadpted for Delphi 4 +Jul 20, 1998 V2.46 Added SetWindowLong(FWindowHandle, 0, 0) in the destructor + and a check for TWSocket class in XSocketWindowProc. + Added virtual method RealSend. +Jul 23, 1998 V2.47 Added a TriggerSessionClosed from TryToSend in case of + send error. This was called before, but with a nul error argument. + Now it correctly gives the error number. + Added a trashcan to receive data if no OnDataAvailable event + handler is installed. Just receive the data and throw it away. + Added reverse dns lookup asynchronous code (IP -> HostName). + Thanks to Daniel Fazekas for his code. +Jul 30, 1998 V2.48 Changed local variable "error" by FLastError in SocketError + to make it available from the OnError handler. Thanks to + dana@medical-info.com for finding this bug. + In Abort procedure, deleted all buffered data because it was send + the next time the socket is opened ! + Added CancelDnsLookup in Abort procedure. +Aug 28, 1998 V2.49 Made InternalClose and ReceiveStr virtual +Sep 01, 1998 V2.50 Ignore CancelDnsLookup exception during destroy +Sep 29, 1998 V2.51 In InternalClose, protect AssignDefaultValue with + try/except because SessionClosed event handler may have destroyed + the component. +Oct 11, 1998 V2.52 Changed Shutdown(2) to Shutdown(1) in Internal Close to + prevent data lost on send. You may have to call Shutdown(2) in + your own code before calling Close to have the same behaviour as + before. + Changed argument type for ASyncReceive and passed 0 from FD_CLOSE + message handler. +Oct 28, 1998 V2.53 Made WSocketLoadWinsock and WSocketUnloadWinsock public. +Nov 11, 1998 V2.54 Added OnDisplay event for debugging purpose +Nov 16, 1998 V2.55 Ignore WSANOTINITIALIZED error calling CloseSocket. This + occurs when using TWSocket from a DLL and the finalization + section is called before destroying TWSocket components (this is + a program logic error). + Made some properties and methods protected instead of private. + Made some methods virtual. + Added an Error argument to InternalClose. + Added DoRecv virtual function. + Added WSocketResolvePort + Added WSocketResolveProto + Deferred port and protocol resolution until really needed + Transformed Listen to procedure (in case of failure Listen + always calls SocketError which triggers an exception or the + OnError event). +Nov 22, 1998 V3.00 Skipped from V2.55 to V3.00. Socks support is major update! + Added SOCKS5 (RFC-1928) support for TCP connection and + simple usercode passwword authentication. + Consider the socks code as beta ! + New properties: SocksServer, SocksPort, SocksUsercode, + SocksPassword, FSocksAuthentication. New events: OnSocksError, + OnSocksConnected, OnSocksAuthState. + I used WinGate 2.1d to test my code. Unfortunately WinGate do + not correctly handle user authentication, so the code here is + just untested... +Dec 05, 1998 V3.10 Removed ReadLine feature using TWait component. + Added new TCustomLineWSocket and TCustomSyncWSocket. + Those modifications implies that the ReadLine functionnality is + slightly changed. Notably, the end of line marker is now + configurable and remains in the received line unless a timeout + occurs or the buffer is too small. +Dec 10, 1998 V3.11 Added missing code to resolve port in the Listen method. +Dec 12, 1998 V3.12 Added write method for LocalPort property. Thanks to + Jan Tomasek for his code. + Added background exception handling. + Fixed a bug in TCustomLineWSocket.TriggerDataAvailable which was + not calling the inherited function when it actually should. + Added a check on multithreaded in WaitForClose to call the + correct ProcessMessages procedure. + Added SOCKS4 support (only tcp connect is supported). +Dec 28, 1998 V3.13 Changed WSocketResolveHost to check for invalid numeric + IP addresses whitout trying to use them as hostnames. +Dec 30, 1998 V3.14 Changed SetPort to SetRemotePort to solve the SetPort + syndrome with BCB. Also chnaged GetPort to be consistant. +Jan 12, 1999 V3.15 Introduced DoRecvFrom virtual function. This correct a bug + introduced in V3.14 related to UDP and RecvFrom. +Jan 23, 1999 V3.16 Changed FRcvdFlag computation in DoRecv and DoRecvFrom + because it caused problems with HTTP component and large blocks. + Removed modification by Jan Tomasek in TriggerDataAvailable +Jan 30, 1999 V3.17 Added WSocketResolveIp function. + Checked for tcp protocol before setting linger off in abort. + Moved a lot of variables from private to protected sections. + Removed check for Assigned(FOnDataSent) in WMASyncSelect. +Feb 03, 1999 V3.18 Removed useless units in the uses clause. +Feb 14, 1999 V4.00 Jump to next major version number because lots of + fundamental changes have been done. See below. + + Use runtime dynamic link with winsock. All winsock functions + used by TWSocket are linked at runtime instead of loadtime. This + allows programs to run without winsock installed, provided program + doesn't try to use TWSocket or winsock function without first + checking for winsock installation. + Removed WSocketLoadWinsock and all use to DllStarted because it + is no longer necessary because winsock is automatically loaded + and initialized with the first call to a winsock function. + + Added MessagePump to centralize call to the message pump. + It is a virtual procedure so that you can override it to + cutomize your message pump. Also changed slightly ProcessMessages + to closely match what is done in the forms unit. + + Removed old stuff related to WaitCtrl (was already excluded from + compilation using a conditional directive). + + Added NOFORMS conditional compilation to exclude the Forms unit + from wsocket. This will reduce exe or dll size by 100 to 150KB. + To use this feature, you have to add NOFORMS in your project + options in the "defines" edit box in the "directory/conditional" + tab. Then you must add a message pump to your application and + call it from TWSocket.OnMessagePump event handler. TWSocket really + need a message pump in order to receive messages from winsock. + Depending on how your application is built, you can use either + TWSocket.MessageLoop or TWSocket.ProcessMessages to quickly build + a working message pump. Or you may build your own custom message + pump taylored to your needs. Your message pump must set + TWSocket.Terminated property to TRUE when your application + terminates or you may experience long delays when closing your + application. + You may use NOFORMS setting even if you use the forms unit (GUI + application). Simply call Application.ProcessMessages in the + OnMessagePump event handler. + OnMessagePump event is not visible in the object inspector. You + must assign it at run-time before using the component and after + having created it (in a GUI application you can do that in the + FormCreate event, in a console application, you can do it right + after TWSocket.Create call). +Feb 17, 1999 V4.01 Added LineEcho and LineEdit features. +Feb 27, 1999 V4.02 Added TCustomLineWSocket.GetRcvdCount to make RcvdCount + property and ReceiveStr work in line mode. +Mar 01, 1999 V4.03 Added conditional compile for BCB4. Thanks to James + Legg . +Mar 14, 1999 V4.04 Corrected a bug: wsocket hangup when there was no + OnDataAvailable handler and line mode was on. +Apr 21, 1999 V4.05 Added H+ (long strings) and X+ (extended syntax) + compilation options +May 07, 1999 V4.06 Added WSAECONNABORTED to valid error codes in TryToSend. +Jul 21, 1999 V4.07 Added GetPeerPort method, PeerPort and PeerAddr propertied + as suggested by J. Punter . +Aug 20, 1999 V4.05 Changed conditional compilation so that default is same + as latest compiler (currently Delphi 4, Bcb 4). Should be ok for + Delphi 5. + Added LocalAddr property as suggested by Rod Pickering + . LocalAddr default to '0.0.0.0' and is + intended to be used by a client when connecting to a server, to + select a local interface for multihomed computer. Note that to + select an interface for a server, use Addr property before + listening. + LocalAddr has to be an IP address in dotted form. Valid values are + '0.0.0.0' for any interface, '127.0.0.1' for localhost or any + value returned by LocalIPList. + Replaced loadtime import for ntohs and getpeername by runtime + load. + Revised check for dotted numeric IP address in WSocketResolveHost + to allow correct handling of hostnames beginning by a digit. + Added OnSendData event. Triggered each time data has been sent + to winsock. Do not confuse with OnDataSent which is triggered + when TWSocket internal buffer is emptyed. This event has been + suggested by Paul Gertzen" to + easyly implement progress bar. + Corrected WSocketGetHostByAddr to make it dynamically link to + winsock. +Sep 5, 1999 V4.09 Added CloseDelayed method. + Make sure that TriggerSessionClosed is called from WMASyncSelect + and InternalClose, even if there is no OnSessionClosed event + handler assigned. This is required to make derived components + work correctly. + Created message WM_TRIGGER_EXCEPTION to help checking background + exception handling (OnBgException event). + Corrected bug for Delphi 1 and ReallocMem. +Oct 02, 1999 V4.10 Added Release method. +Oct 16, 1999 V4.11 Corrected a bug in TCustomLineWSocket.DoRecv: need to move + data in front of buffer instead of changing buffer pointer which + will crash the whole thing at free time. +Oct 23, 1999 V4.12 Made WSocketIsDottedIP a public function +Nov 12, 1999 V4.13 removed 3 calls to TriggerSocksAuthState because it was + called twice. By A. Burlakov . +Jan 24, 1999 V4.14 Call Receive instead of DoRecv from ReceiveStr to be sure + to set LastError correctly. Thanks to Farkas Balazs + + Suppressed FDllName and used winsocket constant directly. I had + troubles with some DLL code and string handling at program + termination. +Apr 09, 2000 V4.15 Added error number when resolving proto and port +Apr 29, 2000 V4.16 Added WSocketForceLoadWinsock and + WSocketCancelForceLoadWinsock. Thanks to Steve Williams. + Created variable FSelectEvent to store current async event mask. + Added ComponentOptions property with currently only one options + wsoNoReceiveLoop which disable a receive loop in AsyncReceive. + This loop breaking was suggested by Davie + to lower resource usage with really fast LAN and large transfers. + By default, this option is disabled so there is no change needed + in current code. +May 20, 2000 V4.17 Made TSocket = u_int (same def as in winsock.pas) + Moved bind after setting options. + Thanks to Primoz Gabrijelcic +Jul 15, 2000 V4.18 Alon Gingold changed + TCustomSocksWSocket calls to inherited triggers of + TriggerSessionConnected and TriggerDataAvailable. + Now, it calls the trigger directly. This solves the problem + of descendent classes with overriden triggers, not being + called when a REAL connection was established, and when real + data starts coming in. Special care MUST be taken in such + overridden triggers to ONLY call the inherited trigger AND + IMMEDIATELY EXIT when FSocksState <> socksData to avoid loopback +Jul 22, 2000 V4.19 John Goodwin found a failure in the + logic for DnsLookup. He also implemented a workaround. + See DnsLookup comments for explanation. +Aug 09, 2000 V4.20 Alon Gingold found a bug in + SOCKS4 implementation where a nul byte was incorrectly added + (it should be added only with SOCKS4A version, not straith + SOCKS4). +Sep 17, 2000 V4.21 Eugene Mayevski added TWndMethod for + NOFORMS applications in other components. +Oct 15, 2000 V4.22 Added method GetXAddr which returns local IP address to + which a socket has been bound. There was already a GetXPort. + Thanks to Wilfried Mestdagh + and Steve Williams . +Nov 08, 2000 V4.23 Moved FSelectEvent from private to protected section. +Nov 11, 2000 V4.24 Added LineLimit property and OnLineLimitExceeded event. + When using line mode, line length is checked as each data block is + comming. If the length is greater than the limit, then the event + is triggered. You have the opportunity to close the socket or + change the limit to a higher value. Thus you can prevent a hacker + from locking your system by sending unlimited line which otherwise + would eat up all system resources. + Changed line handling variables to LongInt + Checked all length involved in StrPCopy calls. +Nov 26, 2000 V4.25 Do not trust GetRcvdCount. Always call Receive to check for + incomming data (sometime NT4 will hang if we don't do that). +Jan 24, 2001 V4.26 Blaine R Southam fixed out of bound + error in TCustomLineWSocket.TriggerDataAvailable +Feb 17, 2001 V4.27 Davie fixed a bug causing byte lost + when closing (related to wsoNoReceiveLoop option). +May 04, 2001 V4.28 Fixed W2K bug (winsock message ordering) +Jun 18, 2001 V4.29 Added AllocateHWnd and DeallocateHWnd from Forms unit to + avoid warning from Delphi 6 in all other components. +Jul 08, 2001 V4.30 Fixed small bug related to NOFOMRS and V4.29 +Jul 26, 2001 V4.31 Checked csDesigning in GetRcvdCount so that Delphi 6 does'nt + crash when object inspector wants to display RcvdCount value. + Added multicast capability and UDP ReuseAddr. Thanks to Mark + G. Lewis for his code. + Added TriggerSessionClosed to SocketError as suggested by Wilfried + Mestdagh +Jul 28, 2001 V4.32 New option wsoTcpNoDelay implemented. Code by Arnaldo Braun + +Jul 30, 2001 V4.33 Corrected at few glitches with Delphi 1 +Sep 08, 2001 V4.34 Added ThreadAttach and related functions +Nov 27, 2001 V4.35 Added type definition for in_addr and Delphi 2 (Yes there are + still some peoples who wants to use it. Don't ask me why !). +Dec 02, 2001 V4.36 david.brock2@btinternet.com found a bug in SOCKS4 where + error check incorrectly checked "FRcvBuf[1] = #$90" instead of + "FRcvBuf[1] <> #90". He also found a bug when receiving domain name + where length of name was incorrectly copyed to the buffer. +Dec 23, 2001 V4.37 Removed bWrite, nMoreCnt, bMoreFlag and nMoreMax which where + not more really used. Thanks to Al Kirk for + showing that. +Feb 24, 2002 V4.38 Wilfried Mestdagh added ThreadDetach + and a property editor for LineEnd. XSocketDeallocateHWnd made a + function. + I created a new unit WSocketE.pas to put Wilfried's property + editor so that it works correctly with Delphi 6. +Apr 24, 2002 V4.39 Removed OnLineTooLong event which was not used anywhere. + Use OnLineLimitExceeded event if you used this event. + Thanks to Alex Kook for finding this one. +Apr 27, 2002 V4.40 Added procedure WSocketUnregisterClass to be able to + unregister hidden window. This is necessary when TWSocket is + used within a DLL which is unloaded and reloaded by applications, + specially when running with Windows-XP. Thanks to Jean-Michel Aliu + who provided a test case. +Jun 02, 2002 V4.41 allow SOCK_RAW in Connect method for any protocol which is + not TCP or UDP. Thanks to Holger Lembke . +Jun 04, 2002 V4.42 Do not call Listen for SOCK_RAW. + Thanks to Holger Lembke . +Jun 08, 2002 V4.43 Add a dummy Register procedure for BCB1. + Thanks to Marc-Alexander Prowe . +Jul 07, 2002 V4.44 Added code in Connect method to check if socket still opened + after OnChangeState event. If not, trigger an error WSAINVAL. +Sep 16, 2002 V4.45 Exposed RcvdPtr and RcvdCnt readonly properties. +Sep 17, 2002 V4.46 Used InterlockedIncrement/InterlockedDecrement to Inc/Dec + socket count safely when TWSocket is used within a thread. This + was proposed by Matthew Meadows +Sep 28, 2002 V4.47 Changed DnsLookup so that a hostname is checked for dotted + IP addresse and resolve it numerically. Thanks to Bogdan Calin + who found this bug. Alos loaded the result + list with the address to be consistant with real lookup result. +Nov 17, 2002 V4.48 Roland Klabunde found a bug in + multicast code: listening on a specific interface was ignored. + He fixed Listen and Connect. + + +About multithreading and event-driven: + TWSocket is a pure asynchronous component. It is non-blocking and + event-driven. It means that when you request an operation such as connect, + the component start the operation your requested and give control back + immediately while performing the operation in the background automatically. + When the operation is done, an event is triggered (such as + OnSessionConnected if you called Connect). + + This asynchronous non-blocking behaviour is very high performance but a + little bit difficult to start with. For example, you can't call Connect and + immediately call SendStr the line below. If you try, you'll have an + exception triggered saying you are not connected. Calling connect will start + connection process but will return long before connection is established. + Calling SendStr at the next line will not work because the socket is not + connected yet. To make it works the right way, you have to put your SendStr + in the OnSessionConnected event. + + The asynchronous operation allows you to do several TCP/IP I/O + simultaneously. Just use as many component as you need. Each one will + operate independently of the other without blocking each other ! So you + basically don't need multi-threading with TWSocket, unless YOUR processing + is lengthy and blocking. + + If you have to use multithreading, you have two possibilities: + 1) Create your TWSocket from your thread's Execute method + 2) Attach a TWSocket to a given thread using ThreadAttach. + In both cases, you must set MultiThreaded property to TRUE. + If you don't use one of those methods, you'll end up with a false + multithreaded program: all events will be processed by the main tread ! + For both methods to work, you MUST have a message loop withing your thread. + Delphi create a message loop automatically for the main thread (it's in + the Forms unit), but does NOT create one in a thread ! For your convenience, + TWSocket has his own MessageLoop procedure. You can use it from your thread. + + Sample program MtSrv uses first method while ThrdSrv uses second method. + Sample program TcpSrv is much the same as ThrdSrv but doesn't use any + thread. You'll see that it is able to server a lot of simultaneous clients + as well and it is much simpler. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WSocket; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{ VER80 => Delphi 1 } +{ VER90 => Delphi 2 } +{ VER93 => Bcb 1 } +{ VER100 => Delphi 3 } +{ VER110 => Bcb 3 } +{ VER120 => Delphi 4 } +{ VER125 => Bcb 4 } +{ VER130 => Delphi 5 } +{ VER135 => Bcb 5 } +{ VER140 => Delphi 6 } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, Messages, Classes, SysUtils, +{$IFNDEF NOFORMS} { See comments in history at 14/02/99 } + Forms, +{$ENDIF} + WSockBuf, WinSock; + +const + WSocketVersion = 447; + CopyRight : String = ' TWSocket (c) 1996-2002 Francois Piette V4.47 '; + WM_ASYNCSELECT = WM_USER + 1; + WM_ASYNCGETHOSTBYNAME = WM_USER + 2; + WM_ASYNCGETHOSTBYADDR = WM_USER + 3; + WM_CLOSE_DELAYED = WM_USER + 4; + WM_WSOCKET_RELEASE = WM_USER + 5; + WM_TRIGGER_EXCEPTION = WM_USER + 6; + WM_TRIGGER_DATA_AVAILABLE = WM_USER + 20; + WSA_WSOCKET_TIMEOUT = 12001; +{$IFDEF WIN32} + winsocket = 'wsock32.dll'; { 32 bits TCP/IP system DLL } +{$ELSE} + winsocket = 'winsock.dll'; { 16 bits TCP/IP system DLL } +{$ENDIF} + +type + + TWndMethod = procedure(var Message: TMessage) of object; + ESocketException = class(Exception); + TBgExceptionEvent = procedure (Sender : TObject; + E : Exception; + var CanClose : Boolean) of object; + + TSocketState = (wsInvalidState, + wsOpened, wsBound, + wsConnecting, wsConnected, + wsAccepting, wsListening, + wsClosed); + TSocketSendFlags = (wsSendNormal, wsSendUrgent); + TSocketLingerOnOff = (wsLingerOff, wsLingerOn, wsLingerNoSet); + TSockAddr = Winsock.TSockAddr; + + TDataAvailable = procedure (Sender: TObject; Error: word) of object; + TDataSent = procedure (Sender: TObject; Error: word) of object; + TSendData = procedure (Sender: TObject; BytesSent: Integer) of object; + TSessionClosed = procedure (Sender: TObject; Error: word) of object; + TSessionAvailable = procedure (Sender: TObject; Error: word) of object; + TSessionConnected = procedure (Sender: TObject; Error: word) of object; + TDnsLookupDone = procedure (Sender: TObject; Error: Word) of object; + TChangeState = procedure (Sender: TObject; + OldState, NewState : TSocketState) of object; + TDebugDisplay = procedure (Sender: TObject; var Msg : String) of object; + TWSocketSyncNextProc = procedure of object; + TWSocketOption = (wsoNoReceiveLoop, wsoTcpNoDelay); + TWSocketOptions = set of TWSocketOption; +{ TSocket type is defined for Delphi 1/2/3 but not for all others } +{$IFNDEF VER80} { Delphi 1 } +{$IFNDEF VER90} { Delphi 2 } +{$IFNDEF VER100} { Delphi 3 } + TSocket = u_int; +{$ENDIF} +{$ENDIF} +{$ENDIF} + + TCustomWSocket = class(TComponent) + private + FDnsResult : String; + FDnsResultList : TStrings; + FASocket : TSocket; { Accepted socket } + FBufList : TList; + FBufSize : Integer; + FSendFlags : Integer; + FLastError : Integer; + FWindowHandle : HWND; + FDnsLookupBuffer : array [0..MAXGETHOSTSTRUCT] of char; + FDnsLookupHandle : THandle; + FDnsLookupCheckMsg : Boolean; + FDnsLookupTempMsg : TMessage; + {$IFDEF VER80} + FTrumpetCompability : Boolean; + {$ENDIF} + protected + FHSocket : TSocket; + FAddrStr : String; + FAddrResolved : Boolean; + FAddrFormat : Integer; + FAddrAssigned : Boolean; + FProto : integer; + FProtoAssigned : Boolean; + FProtoResolved : Boolean; + FLocalPortResolved : Boolean; + FProtoStr : String; + FPortStr : String; + FPortAssigned : Boolean; + FPortResolved : Boolean; + FPortNum : Integer; + FLocalPortStr : String; + FLocalPortNum : Integer; + FLocalAddr : String; { IP address for local interface to use } + FType : integer; + FLingerOnOff : TSocketLingerOnOff; + FLingerTimeout : Integer; { In seconds, 0 = disabled } + ReadLineCount : Integer; + {bWrite : Boolean;23/12/01} + {nMoreCnt : Integer;23/12/01} + {bMoreFlag : Boolean; 23/12/01} + {nMoreMax : Integer;23/12/01} + bAllSent : Boolean; + FReadCount : LongInt; + FPaused : Boolean; + FCloseInvoked : Boolean; + FFlushTimeout : Integer; + FMultiThreaded : Boolean; + FMultiCast : Boolean; + FMultiCastAddrStr : String; + FMultiCastIpTTL : Integer; + FReuseAddr : Boolean; + FComponentOptions : TWSocketOptions; + FState : TSocketState; + FRcvdFlag : Boolean; + FTerminated : Boolean; + FSelectEvent : LongInt; + FOnSessionAvailable : TSessionAvailable; + FOnSessionConnected : TSessionConnected; + FOnSessionClosed : TSessionClosed; + FOnChangeState : TChangeState; + FOnDataAvailable : TDataAvailable; + FOnDataSent : TDataSent; + FOnSendData : TSendData; + { FOnLineTooLong : TNotifyEvent; } + FOnDnsLookupDone : TDnsLookupDone; + FOnError : TNotifyEvent; + FOnBgException : TBgExceptionEvent; + FOnDisplay : TDebugDisplay; + FOnMessagePump : TNotifyEvent; + FThreadId : THandle; + procedure WndProc(var MsgRec: TMessage); virtual; + procedure AllocateSocketHWnd; virtual; + procedure DeallocateSocketHWnd; virtual; + procedure SocketError(sockfunc: string); + procedure WMASyncSelect(var msg: TMessage); message WM_ASYNCSELECT; + procedure WMAsyncGetHostByName(var msg: TMessage); message WM_ASYNCGETHOSTBYNAME; + procedure WMAsyncGetHostByAddr(var msg: TMessage); message WM_ASYNCGETHOSTBYADDR; + procedure WMCloseDelayed(var msg: TMessage); message WM_CLOSE_DELAYED; + procedure WMRelease(var msg: TMessage); message WM_WSOCKET_RELEASE; + procedure ChangeState(NewState : TSocketState); + procedure TryToSend; + procedure ASyncReceive(Error : Word; MySocketOptions : TWSocketOptions); + procedure AssignDefaultValue; virtual; + procedure InternalClose(bShut : Boolean; Error : Word); virtual; + procedure Notification(AComponent: TComponent; operation: TOperation); override; + procedure SetSendFlags(newValue : TSocketSendFlags); + function GetSendFlags : TSocketSendFlags; + procedure SetAddr(InAddr : String); + function GetAddr : String; + procedure SetRemotePort(sPort : String); virtual; + function GetRemotePort : String; + procedure SetLocalAddr(sLocalAddr : String); + procedure SetLocalPort(sLocalPort : String); + procedure SetProto(sProto : String); virtual; + function GetProto : String; + function GetRcvdCount : LongInt; virtual; + procedure BindSocket; virtual; + procedure SendText(Str : String); + function RealSend(Data : Pointer; Len : Integer) : Integer; virtual; + procedure RaiseExceptionFmt(const Fmt : String; args : array of const); virtual; + procedure RaiseException(const Msg : String); virtual; + procedure HandleBackGroundException(E: Exception); virtual; + procedure TriggerDisplay(Msg : String); + procedure TriggerSendData(BytesSent : Integer); + function TriggerDataAvailable(Error : Word) : Boolean; virtual; + procedure TriggerSessionAvailable(Error : Word); virtual; + procedure TriggerSessionConnected(Error : Word); virtual; + procedure TriggerSessionClosed(Error : Word); virtual; + procedure TriggerDataSent(Error : Word); virtual; + procedure TriggerChangeState(OldState, NewState : TSocketState); virtual; + procedure TriggerDNSLookupDone(Error : Word); virtual; + procedure TriggerError; virtual; + function DoRecv(var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; virtual; + function DoRecvFrom(FHSocket : TSocket; + var Buffer; + BufferSize : Integer; + Flags : Integer; + var From : TSockAddr; + var FromLen : Integer) : Integer; virtual; + public + sin : TSockAddrIn; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Connect; virtual; + procedure Close; virtual; + procedure CloseDelayed; virtual; + procedure Release; virtual; + procedure Abort; virtual; + procedure Flush; virtual; + procedure WaitForClose; virtual; + procedure Listen; virtual; + function Accept: TSocket; virtual; + function Receive(Buffer : Pointer; BufferSize: integer) : integer; virtual; + function ReceiveStr : string; virtual; + function ReceiveFrom(Buffer : Pointer; + BufferSize : Integer; + var From : TSockAddr; + var FromLen : Integer) : integer; virtual; + function PeekData(Buffer : Pointer; BufferSize: integer) : integer; + function Send(Data : Pointer; Len : Integer) : integer; virtual; + function SendTo(Dest : TSockAddr; + DestLen : Integer; + Data : Pointer; + Len : Integer) : integer; virtual; + function SendStr(Str : String) : Integer; virtual; + procedure DnsLookup(HostName : String); virtual; + procedure ReverseDnsLookup(HostAddr: String); virtual; + procedure CancelDnsLookup; virtual; + function GetPeerAddr: string; virtual; + function GetPeerPort: string; virtual; + function GetPeerName(var Name : TSockAddrIn; NameLen : Integer) : integer; virtual; + function GetXPort: string; virtual; + function GetXAddr: string; virtual; + function TimerIsSet(var tvp : TTimeVal) : Boolean; virtual; + procedure TimerClear(var tvp : TTimeVal); virtual; + function TimerCmp(var tvp : TTimeVal; var uvp : TTimeVal; IsEqual : Boolean) : Boolean; virtual; + function GetSockName(var saddr : TSockAddrIn; var saddrlen : Integer) : integer; virtual; + procedure SetLingerOption; + procedure Dup(NewHSocket : TSocket); virtual; + procedure Shutdown(How : Integer); virtual; + procedure Pause; virtual; + procedure Resume; virtual; + procedure PutDataInSendBuffer(Data : Pointer; Len : Integer); + procedure PutStringInSendBuffer(Str : String); + procedure DeleteBufferedData; + procedure MessagePump; virtual; +{$IFNDEF VER80} + procedure ThreadAttach; + procedure ThreadDetach; + procedure MessageLoop; + function ProcessMessage : Boolean; + procedure ProcessMessages; +{$ENDIF} +{$IFDEF NOFORMS} + property Terminated : Boolean read FTerminated + write FTerminated; + property OnMessagePump : TNotifyEvent read FOnMessagePump + write FOnMessagePump; +{$ENDIF} + protected + property PortNum : Integer read FPortNum; + property Handle : HWND read FWindowHandle; + property HSocket : TSocket read FHSocket + write Dup; + + property Addr : string read GetAddr + write SetAddr; + property Port : string read GetRemotePort + write SetRemotePort; + property LocalPort : String read FLocalPortStr + write SetLocalPort; + property LocalAddr : String read FLocalAddr + write SetLocalAddr; + property Proto : String read GetProto + write SetProto; + property MultiThreaded : Boolean read FMultiThreaded + write FMultiThreaded; + property MultiCast : Boolean read FMultiCast + write FMultiCast; + property MultiCastAddrStr: String read FMultiCastAddrStr + write FMultiCastAddrStr; + property MultiCastIpTTL : Integer read FMultiCastIpTTL + write FMultiCastIpTTL; + property ReuseAddr : Boolean read FReuseAddr + write FReuseAddr; + property PeerAddr : String read GetPeerAddr; + property PeerPort : String read GetPeerPort; + property DnsResult : String read FDnsResult; + property DnsResultList : TStrings read FDnsResultList; + property State : TSocketState read FState; + property AllSent : Boolean read bAllSent; + property ReadCount : LongInt read FReadCount; + property RcvdCount : LongInt read GetRcvdCount; + property LastError : Integer read FLastError; + property ComponentOptions : TWSocketOptions read FComponentOptions + write FComponentOptions; + property BufSize : Integer read FBufSize + write FBufSize; + property OnDataAvailable : TDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnDataSent : TDataSent read FOnDataSent + write FOnDataSent; + property OnSendData : TSendData read FOnSendData + write FOnSendData; + property OnSessionClosed : TSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnSessionAvailable : TSessionAvailable read FOnSessionAvailable + write FOnSessionAvailable; + property OnSessionConnected : TSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnChangeState : TChangeState read FOnChangeState + write FOnChangeState; + { property OnLineTooLong : TNotifyEvent read FOnLineTooLong + write FOnLineTooLong; } + property OnDnsLookupDone : TDnsLookupDone read FOnDnsLookupDone + write FOnDnsLookupDone; + property OnError : TNotifyEvent read FOnError + write FOnError; + property OnBgException : TBgExceptionEvent read FOnBgException + write FOnBgException; + + property FlushTimeout : Integer read FFlushTimeOut + write FFlushTimeout; + property SendFlags : TSocketSendFlags read GetSendFlags + write SetSendFlags; + property Text: String read ReceiveStr + write SendText; + property LingerOnOff : TSocketLingerOnOff read FLingerOnOff + write FLingerOnOff; + property LingerTimeout : Integer read FLingerTimeout + write FLingerTimeout; +{$IFDEF VER80} + property TrumpetCompability : Boolean read FTrumpetCompability + write FTrumpetCompability; +{$ENDIF} + property OnDisplay : TDebugDisplay read FOnDisplay + write FOnDisplay; + end; + + TSocksState = (socksData, socksNegociateMethods, socksAuthenticate, socksConnect); + TSocksAuthentication = (socksNoAuthentication, socksAuthenticateUsercode); + TSocksAuthState = (socksAuthStart, socksAuthSuccess, socksAuthFailure, socksAuthNotRequired); + TSocksAuthStateEvent = procedure(Sender : TObject; AuthState : TSocksAuthState) of object; + TSocksErrorEvent = procedure(Sender : TObject; Error : Integer; Msg : String) of Object; + + TCustomSocksWSocket = class(TCustomWSocket) + protected + FSocksState : TSocksState; + FSocksServer : String; + FSocksLevel : String; + FSocksPort : String; + FSocksPortAssigned : Boolean; + FSocksServerAssigned : Boolean; + FSocksUsercode : String; + FSocksPassword : String; + FSocksAuthentication : TSocksAuthentication; + FSocksAuthNumber : char; + FBoundAddr : String; + FBoundPort : String; + FRcvBuf : array [0..127] of char; + FRcvCnt : Integer; + FSocksRcvdCnt : Integer; + FSocksRcvdPtr : PChar; + FOnSocksError : TSocksErrorEvent; + FOnSocksConnected : TSessionConnected; + FOnSocksAuthState : TSocksAuthStateEvent; + procedure AssignDefaultValue; override; + procedure TriggerSessionConnected(Error : Word); override; + procedure TriggerSocksConnected(Error : Word); virtual; + procedure TriggerSessionClosed(Error : Word); override; + function TriggerDataAvailable(Error : Word) : Boolean; override; + procedure SetSocksPort(sPort : String); virtual; + procedure SetSocksServer(sServer : String); virtual; + procedure TriggerSocksError(Error : Integer; Msg : String); virtual; + procedure TriggerSocksAuthState(AuthState : TSocksAuthState); + function GetRcvdCount : LongInt; override; + procedure SetSocksLevel(newValue : String); + function DoRecv(var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; override; + procedure SocksDoConnect; + procedure SocksDoAuthenticate; + procedure DataAvailableError(ErrCode : Integer; Msg : String); + public + procedure Connect; override; + procedure Listen; override; + protected + property SocksServer : String read FSocksServer + write SetSocksServer; + property SocksLevel : String read FSocksLevel + write SetSocksLevel; + property SocksPort : String read FSocksPort + write SetSocksPort; + property SocksUsercode : String read FSocksUsercode + write FSocksUsercode; + property SocksPassword : String read FSocksPassword + write FSocksPassword; + property SocksAuthentication : TSocksAuthentication + read FSocksAuthentication + write FSocksAuthentication; + property OnSocksError : TSocksErrorEvent read FOnSocksError + write FOnSocksError; + property OnSocksConnected : TSessionConnected read FOnSocksConnected + write FOnSocksConnected; + property OnSocksAuthState : TSocksAuthStateEvent + read FOnSocksAuthState + write FOnSocksAuthState; + end; + + TLineLimitEvent = procedure (Sender : TObject; + RcvdLength : LongInt; + var ClearData : Boolean) of object; + TCustomLineWSocket = class (TCustomSocksWSocket) + protected + FRcvdPtr : PChar; + FRcvBufSize : LongInt; + FRcvdCnt : LongInt; + FLineEnd : String; + FLineMode : Boolean; + FLineLength : Integer; { When a line is available } + FLineLimit : LongInt; { Max line length we accept } + FLineReceivedFlag : Boolean; + FLineClearData : Boolean; + FLineEcho : Boolean; { Echo received data } + FLineEdit : Boolean; { Edit received data } + FTimeout : LongInt; { Given in milliseconds } + FTimeStop : LongInt; { Milliseconds } + FOnLineLimitExceeded : TLineLimitEvent; + procedure WndProc(var MsgRec: TMessage); override; + procedure WMTriggerDataAvailable(var msg: TMessage); message WM_TRIGGER_DATA_AVAILABLE; + function TriggerDataAvailable(Error : Word) : Boolean; override; + procedure TriggerSessionClosed(Error : Word); override; + procedure TriggerLineLimitExceeded(Cnt: Integer; + var ClearData : Boolean); virtual; + procedure SetLineMode(newValue : Boolean); virtual; + procedure EditLine(var Len : Integer); virtual; + function GetRcvdCount : LongInt; override; + function DoRecv(var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + property LineLength : Integer read FLineLength; + property RcvdPtr : PChar read FRcvdPtr; + property RcvdCnt : LongInt read FRcvdCnt; + published + property LineMode : Boolean read FLineMode + write SetLineMode; + property LineLimit : LongInt read FLineLimit + write FLineLimit; + property LineEnd : String read FLineEnd + write FLineEnd; + property LineEcho : Boolean read FLineEcho + write FLineEcho; + property LineEdit : Boolean read FLineEdit + write FLineEdit; + property OnLineLimitExceeded : TLineLimitEvent + read FOnLineLimitExceeded + write FOnLineLimitExceeded; + end; + + TCustomSyncWSocket = class(TCustomLineWSocket) + protected + FLinePointer : ^String; + function Synchronize(Proc : TWSocketSyncNextProc; var DoneFlag : Boolean) : Integer; virtual; + function WaitUntilReady(var DoneFlag : Boolean) : Integer; virtual; + procedure InternalDataAvailable(Sender: TObject; Error: Word); + public + procedure ReadLine(Timeout : integer; var Buffer : String); + end; + + TWSocket = class(TCustomSyncWSocket) + public + property PortNum; + property Handle; + property HSocket; + property BufSize; + property Text; + property AllSent; + {$IFDEF VER80} + property TrumpetCompability; + {$ENDIF} + property OnDisplay; + published + property Addr; + property Port; + property Proto; + property LocalAddr; + property LocalPort; + property PeerPort; + property PeerAddr; + property DnsResult; + property DnsResultList; + property State; + property ReadCount; + property RcvdCount; + property LastError; + property MultiThreaded; + property MultiCast; + property MultiCastAddrStr; + property MultiCastIpTTL; + property ReuseAddr; + property ComponentOptions; + property OnDataAvailable; + property OnDataSent; + property OnSendData; + property OnSessionClosed; + property OnSessionAvailable; + property OnSessionConnected; + property OnSocksConnected; + property OnChangeState; + { property OnLineTooLong; } + property OnDnsLookupDone; + property OnError; + property OnBgException; + property FlushTimeout; + property SendFlags; + property LingerOnOff; + property LingerTimeout; + property SocksLevel; + property SocksServer; + property SocksPort; + property SocksUsercode; + property SocksPassword; + property SocksAuthentication; + property OnSocksError; + property OnSocksAuthState; + end; + + TSocksWSocket = class(TWSocket) + end; + + +function WinsockInfo : TWSADATA; +function WSocketErrorDesc(error: integer) : string; +function WSocketGetHostByAddr(Addr : String) : PHostEnt; +function WSocketGetHostByName(Name : String) : PHostEnt; +function LocalHostName : String; +function LocalIPList : TStrings; +function WSocketResolveIp(IpAddr : String) : String; +function WSocketResolveHost(InAddr : String) : TInAddr; +function WSocketResolvePort(Port : String; Proto : String) : Word; +function WSocketResolveProto(sProto : String) : integer; +procedure WSocketForceLoadWinsock; +procedure WSocketCancelForceLoadWinsock; +procedure WSocketUnloadWinsock; +function WSocketIsDottedIP(const S : String) : Boolean; +{ function WSocketLoadWinsock : Boolean; 14/02/99 } +{$IFNDEF VER80} +procedure WSocketUnregisterClass; +{$ENDIF} + +type +{$IFDEF VER80} + DWORD = LongInt; + TWSAStartup = function (wVersionRequired: word; + var WSData: TWSAData): Integer; + TWSACleanup = function : Integer; + TWSASetLastError = procedure (iError: Integer); + TWSAGetLastError = function : Integer; + TWSACancelAsyncRequest = function (hAsyncTaskHandle: THandle): Integer; + TWSAAsyncGetHostByName = function (HWindow: HWND; + wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; + TWSAAsyncGetHostByAddr = function (HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; + TWSAAsyncSelect = function (s: TSocket; + HWindow: HWND; + wMsg: u_int; + lEvent: Longint): Integer; + TGetServByName = function (name, proto: PChar): PServEnt; + TGetProtoByName = function (name: PChar): PProtoEnt; + TGetHostByName = function (name: PChar): PHostEnt; + TGetHostByAddr = function (addr: Pointer; len, Struct: Integer): PHostEnt; + TGetHostName = function (name: PChar; len: Integer): Integer; + TOpenSocket = function (af, Struct, protocol: Integer): TSocket; + TShutdown = function (s: TSocket; how: Integer): Integer; + TSetSockOpt = function (s: TSocket; level, optname: Integer; + optval: PChar; + optlen: Integer): Integer; + TGetSockOpt = function (s: TSocket; level, optname: Integer; optval: PChar; var optlen: Integer): Integer; + TSendTo = function (s: TSocket; var Buf; + len, flags: Integer; + var addrto: TSockAddr; + tolen: Integer): Integer; + TSend = function (s: TSocket; var Buf; + len, flags: Integer): Integer; + TRecv = function (s: TSocket; + var Buf; + len, flags: Integer): Integer; + TRecvFrom = function (s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; + Tntohs = function (netshort: u_short): u_short; + Tntohl = function (netlong: u_long): u_long; + TListen = function (s: TSocket; backlog: Integer): Integer; + TIoctlSocket = function (s: TSocket; cmd: DWORD; + var arg: u_long): Integer; + TInet_ntoa = function (inaddr: TInAddr): PChar; + TInet_addr = function (cp: PChar): u_long; + Thtons = function (hostshort: u_short): u_short; + Thtonl = function (hostlong: u_long): u_long; + TGetSockName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; + TGetPeerName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; + TConnect = function (s: TSocket; var name: TSockAddr; + namelen: Integer): Integer; + TCloseSocket = function (s: TSocket): Integer; + TBind = function (s: TSocket; var addr: TSockAddr; + namelen: Integer): Integer; + TAccept = function (s: TSocket; var addr: TSockAddr; + var addrlen: Integer): TSocket; +{$ELSE} + TWSAStartup = function (wVersionRequired: word; + var WSData: TWSAData): Integer; stdcall; + TWSACleanup = function : Integer; stdcall; + TWSASetLastError = procedure (iError: Integer); stdcall; + TWSAGetLastError = function : Integer; stdcall; + TWSACancelAsyncRequest = function (hAsyncTaskHandle: THandle): Integer; stdcall; + TWSAAsyncGetHostByName = function (HWindow: HWND; + wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; stdcall; + TWSAAsyncGetHostByAddr = function (HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; stdcall; + TWSAAsyncSelect = function (s: TSocket; + HWindow: HWND; + wMsg: u_int; + lEvent: Longint): Integer; stdcall; + TGetServByName = function (name, proto: PChar): PServEnt; stdcall; + TGetProtoByName = function (name: PChar): PProtoEnt; stdcall; + TGetHostByName = function (name: PChar): PHostEnt; stdcall; + TGetHostByAddr = function (addr: Pointer; len, Struct: Integer): PHostEnt; stdcall; + TGetHostName = function (name: PChar; len: Integer): Integer; stdcall; + TOpenSocket = function (af, Struct, protocol: Integer): TSocket; stdcall; + TShutdown = function (s: TSocket; how: Integer): Integer; stdcall; + TSetSockOpt = function (s: TSocket; level, optname: Integer; + optval: PChar; + optlen: Integer): Integer; stdcall; + TGetSockOpt = function (s: TSocket; level, optname: Integer; + optval: PChar; + var optlen: Integer): Integer; stdcall; + TSendTo = function (s: TSocket; var Buf; + len, flags: Integer; + var addrto: TSockAddr; + tolen: Integer): Integer; stdcall; + TSend = function (s: TSocket; var Buf; + len, flags: Integer): Integer; stdcall; + TRecv = function (s: TSocket; + var Buf; + len, flags: Integer): Integer; stdcall; + TRecvFrom = function (s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; stdcall; + Tntohs = function (netshort: u_short): u_short; stdcall; + Tntohl = function (netlong: u_long): u_long; stdcall; + TListen = function (s: TSocket; + backlog: Integer): Integer; stdcall; + TIoctlSocket = function (s: TSocket; cmd: DWORD; + var arg: u_long): Integer; stdcall; + TInet_ntoa = function (inaddr: TInAddr): PChar; stdcall; + TInet_addr = function (cp: PChar): u_long; stdcall; + Thtons = function (hostshort: u_short): u_short; stdcall; + Thtonl = function (hostlong: u_long): u_long; stdcall; + TGetSockName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; stdcall; + TGetPeerName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; stdcall; + TConnect = function (s: TSocket; var name: TSockAddr; + namelen: Integer): Integer; stdcall; + TCloseSocket = function (s: TSocket): Integer; stdcall; + TBind = function (s: TSocket; var addr: TSockAddr; + namelen: Integer): Integer; stdcall; +{$IFDEF VER90} { Delphi 2 has a special definition} + TAccept = function (s: TSocket; var addr: TSockAddr; + var addrlen: Integer): TSocket; stdcall; +{$ELSE} + TAccept = function (s: TSocket; addr: PSockAddr; + addrlen: PInteger): TSocket; stdcall; +{$ENDIF} +{$ENDIF} + +var + FWSAStartup : TWSAStartup; + FWSACleanup : TWSACleanup; + FWSASetLastError : TWSASetLastError; + FWSAGetLastError : TWSAGetLastError; + FWSACancelAsyncRequest : TWSACancelAsyncRequest; + FWSAAsyncGetHostByName : TWSAAsyncGetHostByName; + FWSAAsyncGetHostByAddr : TWSAAsyncGetHostByAddr; + FWSAAsyncSelect : TWSAAsyncSelect; + FGetServByName : TGetServByName; + FGetProtoByName : TGetProtoByName; + FGetHostByName : TGetHostByName; + FGetHostByAddr : TGetHostByAddr; + FGetHostName : TGetHostName; + FOpenSocket : TOpenSocket; + FShutdown : TShutdown; + FSetSockOpt : TSetSockOpt; + FGetSockOpt : TGetSockOpt; + FSendTo : TSendTo; + FSend : TSend; + FRecv : TRecv; + FRecvFrom : TRecvFrom; + Fntohs : Tntohs; + Fntohl : Tntohl; + FListen : TListen; + FIoctlSocket : TIoctlSocket; + FInet_ntoa : TInet_ntoa; + FInet_addr : TInet_addr; + Fhtons : Thtons; + Fhtonl : Thtonl; + FGetSockName : TGetSockName; + FGetPeerName : TGetPeerName; + FConnect : TConnect; + FCloseSocket : TCloseSocket; + FBind : TBind; + FAccept : TAccept; + +function WSocketGetProc(const ProcName : String) : Pointer; +function WSocket_WSAStartup(wVersionRequired: word; + var WSData: TWSAData): Integer; +function WSocket_WSACleanup : Integer; +procedure WSocket_WSASetLastError(iError: Integer); +function WSocket_WSAGetLastError: Integer; +function WSocket_WSACancelAsyncRequest(hAsyncTaskHandle: THandle): Integer; +function WSocket_WSAAsyncGetHostByName(HWindow: HWND; wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; +function WSocket_WSAAsyncGetHostByAddr(HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; +function WSocket_WSAAsyncSelect(s: TSocket; HWindow: HWND; wMsg: u_int; lEvent: Longint): Integer; +function WSocket_recv(s: TSocket; + var Buf; len, flags: Integer): Integer; +function WSocket_recvfrom(s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; +function WSocket_getservbyname(name, proto: PChar): PServEnt; +function WSocket_getprotobyname(name: PChar): PProtoEnt; +function WSocket_gethostbyname(name: PChar): PHostEnt; +function WSocket_gethostbyaddr(addr: Pointer; len, Struct: Integer): PHostEnt; +function WSocket_gethostname(name: PChar; len: Integer): Integer; +function WSocket_socket(af, Struct, protocol: Integer): TSocket; +function WSocket_shutdown(s: TSocket; how: Integer): Integer; +function WSocket_setsockopt(s: TSocket; level, optname: Integer; optval: PChar; + optlen: Integer): Integer; +function WSocket_getsockopt(s: TSocket; level, optname: Integer; optval: PChar; + var optlen: Integer): Integer; +function WSocket_sendto(s: TSocket; var Buf; len, flags: Integer; + var addrto: TSockAddr; + tolen: Integer): Integer; +function WSocket_send(s: TSocket; var Buf; len, flags: Integer): Integer; +function WSocket_ntohs(netshort: u_short): u_short; +function WSocket_ntohl(netlong: u_long): u_long; +function WSocket_listen(s: TSocket; backlog: Integer): Integer; +function WSocket_ioctlsocket(s: TSocket; cmd: DWORD; var arg: u_long): Integer; +function WSocket_inet_ntoa(inaddr: TInAddr): PChar; +function WSocket_inet_addr(cp: PChar): u_long; +function WSocket_htons(hostshort: u_short): u_short; +function WSocket_htonl(hostlong: u_long): u_long; +function WSocket_getsockname(s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; +function WSocket_getpeername(s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; +function WSocket_connect(s: TSocket; var name: TSockAddr; + namelen: Integer): Integer; +function WSocket_closesocket(s: TSocket): Integer; +function WSocket_bind(s: TSocket; var addr: TSockAddr; namelen: Integer): Integer; +{$IFDEF VER80} +function WSocket_accept(s: TSocket; var addr: TSockAddr; var addrlen: Integer): TSocket; +{$ELSE} +{$IFDEF VER90} +function WSocket_accept(s: TSocket; var addr: TSockAddr; var addrlen: Integer): TSocket; +{$ELSE} +function WSocket_accept(s: TSocket; addr: PSockAddr; addrlen: PInteger): TSocket; +{$ENDIF} +{$ENDIF} +{$IFNDEF VER80} +function XSocketAllocateHWnd(Obj : TObject): HWND; +function XSocketDeallocateHWnd(Wnd: HWND): boolean; +{$ENDIF} +{ AllocateHWnd and DeallocateHWnd are functions from Forms unit. We just } +{ provide a warper here to avoid Delphi 6 warning everywhere. } +{$IFNDEF NOFORMS} +function AllocateHWnd(Method: TWndMethod): HWND; +procedure DeallocateHWnd(Wnd: HWND); +{$ENDIF} + +const + WSocketGCount : integer = 0; + WSocketGForced : boolean = FALSE; + +{$IFDEF VER80} +{ Delphi 1 doesn't like missing register procedure in a unit } +procedure Register; +{$ENDIF} +{$IFDEF VER93} +{ BCB 1 doesn't like missing register procedure in a unit } +procedure Register; +{$ENDIF} + +implementation + +const +{ WSocketGCount : integer = 0; } +{ DllStarted : Boolean = FALSE; 14/02/99} + FDllHandle : THandle = 0; +{ FDllName : String = winsocket; } + socksNoError = 20000; + socksProtocolError = 20001; + socksVersionError = 20002; + socksAuthMethodError = 20003; + socksGeneralFailure = 20004; + socksConnectionNotAllowed = 20005; + socksNetworkUnreachable = 20006; + socksHostUnreachable = 20007; + socksConnectionRefused = 20008; + socksTtlExpired = 20009; + socksUnknownCommand = 20010; + socksUnknownAddressType = 20011; + socksUnassignedError = 20012; + socksInternalError = 20013; + socksDataReceiveError = 20014; + socksAuthenticationFailed = 20015; + socksRejectedOrFailed = 20016; + socksHostResolutionFailed = 20017; + +{$IFDEF VER80} + IP_DEFAULT_MULTICAST_TTL = 1; + IP_MULTICAST_TTL = 3; + IP_ADD_MEMBERSHIP = 5; +type + in_addr = TInAddr; +{$ENDIF} +{$IFDEF VER90} +type + in_addr = TInAddr; +{$ENDIF} +{$IFDEF VER93} +type + in_addr = TInAddr; +{$ENDIF} +{$IFDEF VER100} +type + in_addr = TInAddr; +{$ENDIF} + +var + GInitData : TWSADATA; + IPList : TStrings; + +{const + Moulin : array [0..3] of Char = ('|', '/', '-', '\'); + MoulinCnt : Integer = 0; } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +{ Delphi 1 miss the SetLength procedure. So we rewrite it. } +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Delphi 1 doesn't like missing register procedure in a unit so we provide } +{ an empty procedure } +procedure Register; +begin +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER93} +{ BCB 1 doesn't like missing register procedure in a unit so we provide } +{ an empty procedure } +procedure Register; +begin +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] >= '0') and (Value[i] <= '9')do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function IsDigit(Ch : Char) : Boolean; +begin + Result := (ch >= '0') and (ch <= '9'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check for a valid numeric dotted IP address such as 192.161.65.25 } +{ Accept leading and trailing spaces. } +function WSocketIsDottedIP(const S : String) : Boolean; +var + I : Integer; + DotCount : Integer; + NumVal : Integer; +begin + Result := FALSE; + DotCount := 0; + NumVal := 0; + I := 1; + { Skip leading spaces } + while (S[I] = ' ') and (I <= Length(S)) do + Inc(I); + { Can't begin with a dot } + if (I <= Length(S)) and (S[I] = '.') then + Exit; + { Scan full string } + while I <= Length(S) do begin + if S[I] = '.' then begin + Inc(DotCount); + if (DotCount > 3) or (NumVal > 255) then + Exit; + NumVal := 0; + { A dot must be followed by a digit } + if (I >= Length(S)) or (not (S[I + 1] in ['0'..'9'])) then + Exit; + end + else if S[I] in ['0'..'9'] then + NumVal := NumVal * 10 + Ord(S[I]) - Ord('0') + else begin + { Not a digit nor a dot. Accept spaces until end of string } + while (S[I] = ' ') and (I <= Length(S)) do + Inc(I); + if I <= Length(S) then + Exit; { Not a space, do not accept } + break; { Only spaces, accept } + end; + Inc(I); + end; + { We must have exactly 3 dots } + if (DotCount <> 3) or (NumVal > 255) then + Exit; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] in [' ', #9]) do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.RaiseException(const Msg : String); +begin + if Assigned(FOnError) then + TriggerError + else + raise ESocketException.Create(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.RaiseExceptionFmt(const Fmt : String; args : array of const); +begin + if Assigned(FOnError) then + TriggerError + else + raise ESocketException.CreateFmt(Fmt, args); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} { 14/02/99 } +function LoadWinsock(FileName : PChar) : Boolean; +var + LastError : LongInt; +begin + if not DllStarted then begin + LastError := WSocket_WSAStartup($101, GInitData); + if LastError <> 0 then begin + raise ESocketException.CreateFmt('%s: WSAStartup error #%d', + [FileName, LastError]); + end; + DllStarted := TRUE; + end; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketLoadWinsock : Boolean; +begin + Result := LoadWinsock(winsocket); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Winsock is dynamically loaded and unloaded when needed. In some cases } +{ you may find winsock being loaded and unloaded very often in your app } +{ This happend for example when you dynamically create a TWSocket and } +{ destroy a TWSocket when there is no "permanant" TWSocket (that is a } +{ TWSocket dropped on a persitant form). It is the very inefficiant. } +{ Calling WSocketForceLoadWinsock will increament the reference count so } +{ that winsock will not be unloaded when the last TWSocket is destroyed. } +procedure WSocketForceLoadWinsock; +begin + if not WSocketGForced then begin + WSocketGForced := TRUE; + {$IFDEF VER80} + Inc(WSocketGCount); + {$ELSE} + InterlockedIncrement (WSocketGCount); + {$ENDIF} + WSocketGetProc(''); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Cancel the operation done with WSocketForceLoadWinsock. } +procedure WSocketCancelForceLoadWinsock; +begin + if WSocketGForced then begin + WSocketGForced := FALSE; + {$IFDEF VER80} + Dec(WSocketGCount); + {$ELSE} + InterlockedDecrement (WSocketGCount); + {$ENDIF} + if WSocketGCount <= 0 then + WSocketUnloadWinsock; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure WSocketUnloadWinsock; +begin +{$IFDEF NEVER} { 14/02/99 } + if DllStarted then begin + DllStarted := FALSE; + WSocket_WSACleanup; + end; +{$ENDIF} + if FDllHandle <> 0 then begin + WSocket_WSACleanup; + FreeLibrary(FDllHandle); + FDllHandle := 0; + FWSAStartup := nil; + FWSACleanup := nil; + FWSASetLastError := nil; + FWSAGetLastError := nil; + FWSACancelAsyncRequest := nil; + FWSAAsyncGetHostByName := nil; + FWSAAsyncGetHostByAddr := nil; + FWSAAsyncSelect := nil; + FGetServByName := nil; + FGetProtoByName := nil; + FGetHostByName := nil; + FGetHostByAddr := nil; + FGetHostName := nil; + FOpenSocket := nil; + FShutdown := nil; + FSetSockOpt := nil; + FGetSockOpt := nil; + FSendTo := nil; + FSend := nil; + FRecv := nil; + FRecvFrom := nil; + Fntohs := nil; + Fntohl := nil; + FListen := nil; + FIoctlSocket := nil; + FInet_ntoa := nil; + FInet_addr := nil; + Fhtons := nil; + Fhtonl := nil; + FGetSockName := nil; + FGetPeerName := nil; + FConnect := nil; + FCloseSocket := nil; + FBind := nil; + FAccept := nil; + end; + WSocketGCount := 0; + WSocketGForced := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketGetProc(const ProcName : String) : Pointer; +{$IFDEF VER80} +var + Error : THandle; + Buf : String; + LastError : LongInt; +begin + if FDllHandle = 0 then begin + { Delphi 1 strings are not nul terminated } + Buf := winsocket + #0; + FDllHandle := LoadLibrary(@Buf[1]); + if FDllHandle < HINSTANCE_ERROR then begin + Error := FDllHandle; + FDllHandle := 0; + raise ESocketException.Create('Unable to load ' + winsocket + + ' Error #' + IntToStr(Error)); + end; + LastError := WSocket_WSAStartup($101, GInitData); + if LastError <> 0 then begin + raise ESocketException.CreateFmt('%s: WSAStartup error #%d', + [winsocket, LastError]); + end; + end; + if Length(ProcName) = 0 then + Result := nil + else begin + { Delphi 1 strings are not nul terminated } + Buf := ProcName + #0; + Result := GetProcAddress(FDllHandle, @Buf[1]); + if Result = nil then + raise ESocketException.Create('Procedure ' + ProcName + + ' not found in ' + winsocket); + end; +end; +{$ELSE} +var + LastError : LongInt; +begin + if FDllHandle = 0 then begin + FDllHandle := LoadLibrary(@winsocket[1]); + if FDllHandle = 0 then + raise ESocketException.Create('Unable to load ' + winsocket + + ' Error #' + IntToStr(GetLastError)); + LastError := WSocket_WSAStartup($101, GInitData); + if LastError <> 0 then begin + raise ESocketException.CreateFmt('%s: WSAStartup error #%d', + [winsocket, LastError]); + end; + end; + if Length(ProcName) = 0 then + Result := nil + else begin + Result := GetProcAddress(FDllHandle, @ProcName[1]); + if Result = nil then + raise ESocketException.Create('Procedure ' + ProcName + + ' not found in ' + winsocket + + ' Error #' + IntToStr(GetLastError)); + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAStartup( + wVersionRequired: word; + var WSData: TWSAData): Integer; +begin + if @FWSAStartup = nil then + @FWSAStartup := WSocketGetProc('WSAStartup'); + Result := FWSAStartup(wVersionRequired, WSData); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSACleanup : Integer; +begin + if @FWSACleanup = nil then + @FWSACleanup := WSocketGetProc('WSACleanup'); + Result := FWSACleanup; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure WSocket_WSASetLastError(iError: Integer); +begin + if @FWSASetLastError = nil then + @FWSASetLastError := WSocketGetProc('WSASetLastError'); + FWSASetLastError(iError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAGetLastError: Integer; +begin + if @FWSAGetLastError = nil then + @FWSAGetLastError := WSocketGetProc('WSAGetLastError'); + Result := FWSAGetLastError; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSACancelAsyncRequest(hAsyncTaskHandle: THandle): Integer; +begin + if @FWSACancelAsyncRequest = nil then + @FWSACancelAsyncRequest := WSocketGetProc('WSACancelAsyncRequest'); + Result := FWSACancelAsyncRequest(hAsyncTaskHandle); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAAsyncGetHostByName( + HWindow: HWND; wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; +begin + if @FWSAAsyncGetHostByName = nil then + @FWSAAsyncGetHostByName := WSocketGetProc('WSAAsyncGetHostByName'); + Result := FWSAAsyncGetHostByName(HWindow, wMsg, name, buf, buflen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAAsyncGetHostByAddr( + HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; +begin + if @FWSAAsyncGetHostByAddr = nil then + @FWSAAsyncGetHostByAddr := WSocketGetProc('WSAAsyncGetHostByAddr'); + Result := FWSAAsyncGetHostByAddr(HWindow, wMsg, addr, len, struct, buf, buflen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAAsyncSelect( + s: TSocket; + HWindow: HWND; + wMsg: u_int; + lEvent: Longint): Integer; +begin + if @FWSAAsyncSelect = nil then + @FWSAAsyncSelect := WSocketGetProc('WSAAsyncSelect'); + Result := FWSAAsyncSelect(s, HWindow, wMsg, lEvent); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getservbyname(name, proto: PChar): PServEnt; +begin + if @Fgetservbyname = nil then + @Fgetservbyname := WSocketGetProc('getservbyname'); + Result := Fgetservbyname(name, proto); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getprotobyname(name: PChar): PProtoEnt; +begin + if @Fgetprotobyname = nil then + @Fgetprotobyname := WSocketGetProc('getprotobyname'); + Result := Fgetprotobyname(name); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_gethostbyname(name: PChar): PHostEnt; +begin + if @Fgethostbyname = nil then + @Fgethostbyname := WSocketGetProc('gethostbyname'); + Result := Fgethostbyname(name); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_gethostbyaddr(addr: Pointer; len, Struct: Integer): PHostEnt; +begin + if @Fgethostbyaddr = nil then + @Fgethostbyaddr := WSocketGetProc('gethostbyaddr'); + Result := Fgethostbyaddr(addr, len, Struct); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_gethostname(name: PChar; len: Integer): Integer; +begin + if @Fgethostname = nil then + @Fgethostname := WSocketGetProc('gethostname'); + Result := Fgethostname(name, len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_socket(af, Struct, protocol: Integer): TSocket; +begin + if @FOpenSocket= nil then + @FOpenSocket := WSocketGetProc('socket'); + Result := FOpenSocket(af, Struct, protocol); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_shutdown(s: TSocket; how: Integer): Integer; +begin + if @FShutdown = nil then + @FShutdown := WSocketGetProc('shutdown'); + Result := FShutdown(s, how); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_setsockopt(s: TSocket; level, optname: Integer; optval: PChar; + optlen: Integer): Integer; +begin + if @FSetSockOpt = nil then + @FSetSockOpt := WSocketGetProc('setsockopt'); + Result := FSetSockOpt(s, level, optname, optval, optlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getsockopt( + s: TSocket; level, optname: Integer; + optval: PChar; var optlen: Integer): Integer; +begin + if @FGetSockOpt = nil then + @FGetSockOpt := WSocketGetProc('getsockopt'); + Result := FGetSockOpt(s, level, optname, optval, optlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_sendto( + s : TSocket; + var Buf; + len, flags : Integer; + var addrto : TSockAddr; + tolen : Integer): Integer; +begin + if @FSendTo = nil then + @FSendTo := WSocketGetProc('sendto'); + Result := FSendTo(s, Buf, len, flags, addrto, tolen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_send(s: TSocket; var Buf; len, flags: Integer): Integer; +begin + if @FSend = nil then + @FSend := WSocketGetProc('send'); + Result := FSend(s, Buf, len, flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_ntohs(netshort: u_short): u_short; +begin + if @Fntohs = nil then + @Fntohs := WSocketGetProc('ntohs'); + Result := Fntohs(netshort); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_ntohl(netlong: u_long): u_long; +begin + if @Fntohl = nil then + @Fntohl := WSocketGetProc('ntohl'); + Result := Fntohl(netlong); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_listen(s: TSocket; backlog: Integer): Integer; +begin + if @FListen = nil then + @FListen := WSocketGetProc('listen'); + Result := FListen(s, backlog); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_ioctlsocket(s: TSocket; cmd: DWORD; var arg: u_long): Integer; +begin + if @FIoctlSocket = nil then + @FIoctlSocket := WSocketGetProc('ioctlsocket'); + Result := FIoctlSocket(s, cmd, arg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_inet_ntoa(inaddr: TInAddr): PChar; +begin + if @FInet_ntoa = nil then + @FInet_ntoa := WSocketGetProc('inet_ntoa'); + Result := FInet_ntoa(inaddr); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_inet_addr(cp: PChar): u_long; +begin + if @FInet_addr = nil then + @FInet_addr := WSocketGetProc('inet_addr'); + Result := FInet_addr(cp); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_htons(hostshort: u_short): u_short; +begin + if @Fhtons = nil then + @Fhtons := WSocketGetProc('htons'); + Result := Fhtons(hostshort); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_htonl(hostlong: u_long): u_long; +begin + if @Fhtonl = nil then + @Fhtonl := WSocketGetProc('htonl'); + Result := Fhtonl(hostlong); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getsockname( + s : TSocket; + var name : TSockAddr; + var namelen : Integer): Integer; +begin + if @FGetSockName = nil then + @FGetSockName := WSocketGetProc('getsockname'); + Result := FGetSockName(s, name, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getpeername( + s : TSocket; + var name : TSockAddr; + var namelen : Integer): Integer; +begin + if @FGetPeerName = nil then + @FGetPeerName := WSocketGetProc('getpeername'); + Result := FGetPeerName(s, name, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_connect( + s : TSocket; + var name : TSockAddr; + namelen : Integer): Integer; +begin + if @FConnect= nil then + @FConnect := WSocketGetProc('connect'); + Result := FConnect(s, name, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_closesocket(s: TSocket): Integer; +begin + if @FCloseSocket = nil then + @FCloseSocket := WSocketGetProc('closesocket'); + Result := FCloseSocket(s); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_bind( + s: TSocket; + var addr: TSockAddr; + namelen: Integer): Integer; +begin + if @FBind = nil then + @FBind := WSocketGetProc('bind'); + Result := FBind(s, addr, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_accept( + s: TSocket; +{$IFDEF VER80} { Delphi 1 } + var addr: TSockAddr; + var addrlen: Integer): TSocket; +{$ELSE} +{$IFDEF VER90} { Delphi 2 } + var addr: TSockAddr; + var addrlen: Integer): TSocket; +{$ELSE}{ Delphi 3/4/5, Bcb 1/3/4 } + addr: PSockAddr; + addrlen: PInteger): TSocket; +{$ENDIF} +{$ENDIF} +begin + if @FAccept = nil then + @FAccept := WSocketGetProc('accept'); + Result := FAccept(s, addr, addrlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_recv(s: TSocket; var Buf; len, flags: Integer): Integer; +begin + if @FRecv= nil then + @FRecv := WSocketGetProc('recv'); + Result := FRecv(s, Buf, len, flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_recvfrom( + s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; +begin + if @FRecvFrom = nil then + @FRecvFrom := WSocketGetProc('recvfrom'); + Result := FRecvFrom(s, Buf, len, flags, from, fromlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WinsockInfo : TWSADATA; +begin +{ LoadWinsock(winsocket); 14/02/99 } + { Load winsock and initialize it as needed } + WSocketGetProc(''); + Result := GInitData; + + { If no socket created, then unload winsock immediately } + if WSocketGCount <= 0 then + WSocketUnloadWinsock; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Notification(AComponent: TComponent; operation: TOperation); +begin + inherited Notification(AComponent, operation); + if operation = opRemove then begin + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.AssignDefaultValue; +begin + FillChar(sin, 0, Sizeof(sin)); + sin.sin_family := AF_INET; + FAddrFormat := PF_INET; + + FPortAssigned := FALSE; + FAddrAssigned := FALSE; + FAddrResolved := FALSE; + FPortResolved := FALSE; + FProtoResolved := FALSE; + FLocalPortResolved := FALSE; + + FProtoAssigned := TRUE; + FProto := IPPROTO_TCP; + FProtoStr := 'tcp'; + FType := SOCK_STREAM; + FLocalPortStr := '0'; + FLocalAddr := '0.0.0.0'; + + FLingerOnOff := wsLingerOn; + FLingerTimeout := 0; + FHSocket := INVALID_SOCKET; + FSelectEvent := 0; + FState := wsClosed; + bAllSent := TRUE; + FPaused := FALSE; + FReadCount := 0; + FCloseInvoked := FALSE; + FFlushTimeout := 60; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All exceptions *MUST* be handled. If an exception is not handled, the } +{ application will be shut down ! } +procedure TCustomWSocket.HandleBackGroundException(E: Exception); +var + CanAbort : Boolean; +begin + CanAbort := TRUE; + { First call the error event handler, if any } + if Assigned(FOnBgException) then begin + try + FOnBgException(Self, E, CanAbort); + except + end; + end; + { Then abort the socket } + if CanAbort then begin + try + Abort; + except + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure handle all messages for TWSocket. All exceptions must be } +{ handled or the application will be shutted down ! } +{ If WndProc is overriden in descendent components, then the same exception } +{ handling *MUST* be setup because descendent component code is executed } +{ before the base class code. } +procedure TCustomWSocket.WndProc(var MsgRec: TMessage); +begin + try + with MsgRec do begin + if Msg = WM_ASYNCSELECT then + WMASyncSelect(MsgRec) + else if Msg = WM_ASYNCGETHOSTBYNAME then + WMAsyncGetHostByName(MsgRec) + else if Msg = WM_ASYNCGETHOSTBYADDR then + WMAsyncGetHostByAddr(MsgRec) + else if Msg = WM_CLOSE_DELAYED then + WMCloseDelayed(MsgRec) + else if Msg = WM_WSOCKET_RELEASE then + WMRelease(MsgRec) + else if Msg = WM_TRIGGER_EXCEPTION then + { This is useful to check for background exceptions } + { In your application, use following code to test your handler } + { PostMessage(WSocket1.Handle, WM_TRIGGER_EXCEPTION, 0, 0); } + raise ESocketException.Create('Test exception in WSocket') + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + except + on E:Exception do + HandleBackGroundException(E); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF VER80} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function XSocketWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TObject; + MsgRec : TMessage; +begin + { At window creation asked windows to store a pointer to our object } + Obj := TObject(GetWindowLong(ahWnd, 0)); + + { If the pointer doesn't represent a TWSocket, just call the default procedure} + if not (Obj is TCustomWSocket) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass parameter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + { May be a try/except around next line is needed. Not sure ! } + TWSocket(Obj).WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.MessagePump; +begin +{$IFDEF NOFORMS} + { The Forms unit (TApplication object) has not been included. } + { We used either an external message pump or our internal message pump. } + { External message pump has to set Terminated property to TRUE when the } + { application is terminated. } + if Assigned(FOnMessagePump) then + FOnMessagePump(Self) + else + Self.ProcessMessages; +{$ELSE} +{$IFNDEF VER80} + { Delphi 1 doesn't support multithreading } + if FMultiThreaded then + Self.ProcessMessages + else +{$ENDIF} + Application.ProcessMessages; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This function is very similar to TApplication.ProcessMessage } +{ You can also use it if your application has no TApplication object (Forms } +{ unit not referenced at all). } +{$IFNDEF VER80} +function TCustomWSocket.ProcessMessage : Boolean; +var + Msg : TMsg; +begin + Result := FALSE; + if PeekMessage(Msg, 0, 0, 0, PM_REMOVE) then begin + Result := TRUE; + if Msg.Message = WM_QUIT then + FTerminated := TRUE + else begin + TranslateMessage(Msg); + DispatchMessage(Msg); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Loop thru message processing until all messages are processed. } +{ This function is very similar to TApplication.ProcessMessage } +{ This is intended for multithreaded application using TWSocket. } +{ You can also use it if your application has no TApplication object (Forms } +{ unit not referenced at all). } +procedure TCustomWSocket.ProcessMessages; +begin + while Self.ProcessMessage do { loop }; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Loop thru message processing until the WM_QUIT message is received } +{ This is intended for multithreaded application using TWSocket. } +{ MessageLoop is different from ProcessMessages because it actually block } +{ if no message is available. The loop is broken when WM_QUIT is retrieved. } +procedure TCustomWSocket.MessageLoop; +var + MsgRec : TMsg; +begin + { If GetMessage retrieves the WM_QUIT, the return value is FALSE and } + { the message loop is broken. } + while GetMessage(MsgRec, 0, 0, 0) do begin + TranslateMessage(MsgRec); + DispatchMessage(MsgRec) + end; + FTerminated := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This global variable is used to store the windows class characteristic } +{ and is needed to register the window class used by TWSocket } +var + XSocketWindowClass: TWndClass = ( + style : 0; + lpfnWndProc : @XSocketWindowProc; + cbClsExtra : 0; + cbWndExtra : SizeOf(Pointer); + hInstance : 0; + hIcon : 0; + hCursor : 0; + hbrBackground : 0; + lpszMenuName : nil; + lpszClassName : 'XSocketWindowClass'); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Unregister the window class use by the component. This is necessary to do } +{ so from a DLL when the DLL is unloaded (that is when DllEntryPoint is } +{ called with dwReason equal to DLL_PROCESS_DETACH. } +procedure WSocketUnregisterClass; +begin + Winprocs.UnregisterClass(XSocketWindowClass.lpszClassName, HInstance); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Allocate a window handle. This means registering a window class the first } +{ time we are called, and creating a new window each time we are called. } +function XSocketAllocateHWnd(Obj : TObject): HWND; +var + TempClass : TWndClass; + ClassRegistered : Boolean; +begin + { Check if the window class is already registered } + XSocketWindowClass.hInstance := HInstance; + ClassRegistered := GetClassInfo(HInstance, + XSocketWindowClass.lpszClassName, + TempClass); + if not ClassRegistered then begin + { Not yet registered, do it right now } + Result := WinProcs.RegisterClass(XSocketWindowClass); + if Result = 0 then + Exit; + end; + + { Now create a new window } + Result := CreateWindowEx(WS_EX_TOOLWINDOW, + XSocketWindowClass.lpszClassName, + '', { Window name } + WS_POPUP, { Window Style } + 0, 0, { X, Y } + 0, 0, { Width, Height } + 0, { hWndParent } + 0, { hMenu } + HInstance, { hInstance } + nil); { CreateParam } + + { if successfull, the ask windows to store the object reference } + { into the reserved byte (see RegisterClass) } + if (Result <> 0) and Assigned(Obj) then + SetWindowLong(Result, 0, Integer(Obj)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Free the window handle } +function XSocketDeallocateHWnd(Wnd: HWND): boolean; +begin + Result := DestroyWindow(Wnd); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.AllocateSocketHWnd; +begin +{$IFDEF VER80} + { Delphi 16 bits has no thread, we can use the VCL } + FWindowHandle := AllocateHWnd(WndProc); +{$ELSE} + { Delphi 32 bits has threads and VCL is not thread safe. } + { We need to do our own way to be thread safe. } + FWindowHandle := XSocketAllocateHWnd(Self); + FThreadId := GetCurrentThreadId; +{$ENDIF} + if FWindowHandle = 0 then + RaiseException('Cannot create a hidden window for TWSocket'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.DeallocateSocketHWnd; +begin +{$IFDEF VER80} + DeallocateHWnd(FWindowHandle); +{$ELSE} + { Wilfried added check for existing window } + if FWindowHandle = 0 then + Exit; + + { Remove the object reference from the window } + SetWindowLong(FWindowHandle, 0, 0); + { Wilfried } + { if Destructor call's here and it is wrong thread it will not harm } + { so no need to check Thread Id here, it is done in the ThreadDetach } + { method XSocketDeallocateHWnd(FWindowHandle); } + if XSocketDeallocateHWnd(FWindowHandle) then + FWindowHandle := 0; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF VER80} +procedure TCustomWSocket.ThreadAttach; +begin + if FWindowHandle <> 0 then + RaiseException('Cannot attach when not detached'); + + AllocateSocketHwnd; + if FHSocket <> INVALID_SOCKET then + WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, FSelectEvent); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.ThreadDetach; +begin + if GetCurrentThreadID <> FThreadID then + RaiseException('Cannot detach from other thread'); + + if FHSocket <> INVALID_SOCKET then + WSocket_WSAASyncSelect(FHSocket, Handle, 0, 0); + DeallocateSocketHWnd; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF NOFORMS} +function AllocateHWnd(Method: TWndMethod): HWND; +begin + Result := Forms.AllocateHWnd(Method); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DeallocateHWnd(Wnd: HWND); +begin + Forms.DeallocateHWnd(Wnd); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomWSocket.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + AllocateSocketHWnd; + FBufList := TList.Create; + FBufSize := 1460; {1514;} { Default buffer size } + FDnsResultList := TStringList.Create; + FMultiCastIpTTL := IP_DEFAULT_MULTICAST_TTL; + + AssignDefaultValue; + {$IFDEF VER80} + Inc(WSocketGCount); + {$ELSE} + InterlockedIncrement (WSocketGCount); + {$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomWSocket.Destroy; +begin + try + CancelDnsLookup; { Cancel any pending dns lookup } + except + { Ignore any exception here } + end; + + if FState <> wsClosed then { Close the socket if not yet closed } + Close; + + {$IFDEF VER80} + Dec(WSocketGCount); + {$ELSE} + InterlockedDecrement (WSocketGCount); + {$ENDIF} + if WSocketGCount <= 0 then begin + WSocketUnloadWinsock; + WSocketGCount := 0; + end; + + DeleteBufferedData; + if Assigned(FBufList) then begin + FBufList.Free; + FBufList := nil; + end; + if Assigned(FDnsResultList) then begin + FDnsResultList.Free; + FDnsResultList := nil; + end; + + DeallocateSocketHWnd; + +{$IFNDEF VER80} + if WSocketGCount <= 0 then + WSocketUnregisterClass; +{$ENDIF} + + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Dup(NewHSocket : TSocket); +var + iStatus : Integer; +begin + if (NewHSocket = 0) or (NewHSocket = INVALID_SOCKET) then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('Dup'); + Exit; + end; + + if FState <> wsClosed then begin + iStatus := WSocket_closesocket(FHSocket); + FHSocket := INVALID_SOCKET; + if iStatus <> 0 then begin + SocketError('Dup (closesocket)'); + Exit; + end; + + ChangeState(wsClosed); + end; + FHsocket := NewHSocket; + SetLingerOption; + + FSelectEvent := FD_READ or FD_WRITE or FD_CLOSE or FD_CONNECT; + iStatus := WSocket_WSAASyncSelect(FHSocket, Handle, + WM_ASYNCSELECT, FSelectEvent); + if iStatus <> 0 then begin + SocketError('WSAAsyncSelect'); + Exit; + end; + + ChangeState(wsConnected); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Get the number of char received and waiting to be read } +function TCustomWSocket.GetRcvdCount : LongInt; +begin + if csDesigning in ComponentState then begin + Result := -1; + Exit; + end; + if WSocket_ioctlsocket(FHSocket, FIONREAD, Result) = SOCKET_ERROR then begin + Result := -1; + SocketError('ioctlSocket'); + Exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.ChangeState(NewState : TSocketState); +var + OldState : TSocketState; +begin + OldState := FState; + FState := NewState; + + TriggerChangeState(OldState, NewState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ DoRecv is a simple wrapper around winsock recv function to make it } +{ a virtual function. } +function TCustomWSocket.DoRecv( + var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; +begin +{ MoulinCnt := (MoulinCnt + 1) and 3; } +{ Write('R', Moulin[MoulinCnt], #13); } + Result := WSocket_recv(FHSocket, Buffer, BufferSize, Flags); +{ FRcvdFlag := (Result > 0);} + { If we received the requested size, we may need to receive more } + FRcvdFlag := (Result >= BufferSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The socket is non-blocking, so this routine will only receive as much } +{ data as it is available. } +function TCustomWSocket.Receive(Buffer : Pointer; BufferSize: integer) : integer; +begin + Result := DoRecv(Buffer^, BufferSize, 0); + if Result < 0 then + FLastError := WSocket_WSAGetLastError + else + { Here we should check for overflows ! It is well possible to } + { receive more than 2GB during a single session. } + { Or we could use an Int64 variable... } + FReadCount := FReadCount + Result; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Receive as much data as possible into a string } +{ You should avoid this function and use Receive. Using string will be } +{ much slower because data will be copied several times. } +{ ReceiveStr will *NOT* wait for a line to be received. It just read } +{ already received characters and return them as a string. } +function TCustomWSocket.ReceiveStr : string; +var + lCount : LongInt; +begin + lCount := GetRcvdCount; + + if LCount < 0 then begin { GetRcvdCount returned an error } + SetLength(Result, 0); + Exit; + end; + + if lCount = 0 then { GetRcvdCount say nothing, will try anyway } + LCount := 255; { some reasonable arbitrary value } + +{$IFDEF VER80} + { Delphi 1 strings are limited } + if lCount > High(Result) then + lCount := High(Result); +{$ENDIF} + + SetLength(Result, lCount); + lCount := Receive(@Result[1], lCount); + if lCount > 0 then + SetLength(Result, lCount) + else + SetLength(Result, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.DoRecvFrom( + FHSocket : TSocket; + var Buffer; + BufferSize : Integer; + Flags : Integer; + var From : TSockAddr; + var FromLen : Integer) : Integer; +begin + Result := WSocket_recvfrom(FHSocket, Buffer, BufferSize, + Flags, From, FromLen); +{ FRcvdFlag := (Result > 0); } + FRcvdFlag := (Result >= BufferSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.ReceiveFrom( + Buffer : Pointer; + BufferSize : Integer; + var From : TSockAddr; + var FromLen : Integer) : integer; +begin + Result := DoRecvFrom(FHSocket, Buffer^, BufferSize, 0, From, FromLen); + if Result < 0 then + FLastError := WSocket_WSAGetLastError + else + FReadCount := FReadCount + Result; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.PeekData(Buffer : Pointer; BufferSize: integer) : integer; +begin + Result := DoRecv(Buffer^, BufferSize, MSG_PEEK); + if Result < 0 then + FLastError := WSocket_WSAGetLastError; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ +function SearchChar(Data : PChar; Len : Integer; Ch : Char) : PChar; +begin + while Len > 0 do begin + Len := Len - 1; + if Data^ = Ch then begin + Result := Data; + exit; + end; + Data := Data + 1; + end; + Result := nil; +end; +} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.SendTo( + Dest : TSockAddr; + DestLen : Integer; + Data : Pointer; + Len : Integer) : integer; +begin + Result := WSocket_SendTo(FHSocket, Data^, Len, FSendFlags, + TSockAddr(Dest), DestLen); + if Result > 0 then + TriggerSendData(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.RealSend(Data : Pointer; Len : Integer) : Integer; +begin +{ MoulinCnt := (MoulinCnt + 1) and 3; } +{ Write('S', Moulin[MoulinCnt], #13); } + if FType = SOCK_DGRAM then + Result := WSocket_SendTo(FHSocket, Data^, Len, FSendFlags, + TSockAddr(sin), SizeOf(sin)) + else + Result := WSocket_Send(FHSocket, Data^, Len, FSendFlags); + if Result > 0 then + TriggerSendData(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TryToSend; +var + oBuffer : TBuffer; + Len : Integer; + Count : Integer; + Data : Pointer; + LastError : Integer; + { p : PChar;23/12/01} + bMore : Boolean; +begin + if (FHSocket = INVALID_SOCKET) or { No more socket } + (FBufList.Count = 0) { Nothing to send } + {or (bMoreFlag and (nMoreCnt >= nMoreMax))23/12/01} { Waiting more signal } + then + exit; + + bMore := TRUE; + while bMore do begin + oBuffer := FBufList.First; + Data := oBuffer.Peek(Len); + if Len <= 0 then begin + { Buffer is empty } + if FBufList.Count <= 1 then begin + { Every thing has been sent } + bAllSent := TRUE; + bMore := FALSE; + end + else begin + oBuffer.Free; + FBufList.Delete(0); + FBufList.Pack; + end; + end + else begin +{ if bMoreFlag then begin + p := SearchChar(Data, Len, #10); + if Assigned(p) then begin + len := p - PChar(Data) + 1; + nMoreCnt := nMoreCnt + 1; + if nMoreCnt >= nMoreMax then + bMore := FALSE; + end; + end; +23/12/01} + Count := RealSend(Data, Len); + + if Count = 0 then + bMore := FALSE { Closed by remote } + else if count = SOCKET_ERROR then begin + LastError := WSocket_WSAGetLastError; + if (LastError = WSAECONNRESET) or (LastError = WSAENOTSOCK) or + (LastError = WSAENOTCONN) or (LastError = WSAEINVAL) or + (LastError = WSAECONNABORTED) { 07/05/99 } + then begin + FCloseInvoked := TRUE; { 23/07/98 } + Close; + TriggerSessionClosed(LastError); { 23/07/98 } + end + else if LastError <> WSAEWOULDBLOCK then begin + SocketError('TryToSend failed'); + Exit; + end; + bMore := FALSE; + end + else begin + oBuffer.Remove(Count); + if Count < Len then begin + { Could not write as much as we wanted. Stop sending } +{$IFDEF VER80} + { A bug in some Trumpet Winsock implementation break the } + { background sending. Jan Tomasek } + if not TrumpetCompability then begin + {bWrite := FALSE;23/12/01} + bMore := FALSE; + end; +{$ELSE} + {bWrite := FALSE;23/12/01} + bMore := FALSE; +{$ENDIF} + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.PutStringInSendBuffer(Str : String); +begin + PutDataInSendBuffer(@Str[1], Length(Str)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.PutDataInSendBuffer(Data : Pointer; Len : Integer); +var + oBuffer : TBuffer; + cWritten : Integer; + bMore : Boolean; +begin + if Len <= 0 then + exit; + + if FBufList.Count = 0 then begin + oBuffer := TBuffer.Create(FBufSize); + FBufList.Add(oBuffer); + end + else + oBuffer := FBufList.Last; + + bMore := TRUE; + while bMore do begin + cWritten := oBuffer.Write(Data, Len); + if cWritten >= Len then + bMore := FALSE + else begin + Len := Len - cWritten; + Data := PChar(Data) + cWritten; + if Len < 0 then + bMore := FALSE + else begin + oBuffer := TBuffer.Create(FBufSize); + FBufList.Add(oBuffer); + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Return -1 if error, else return number of byte written } +function TCustomWSocket.Send(Data : Pointer; Len : Integer) : integer; +begin + if FState <> wsConnected then begin + WSocket_WSASetLastError(WSAENOTCONN); + SocketError('Send'); + Result := -1; + Exit; + end; + + bAllSent := FALSE; + if Len <= 0 then + Result := 0 + else begin + Result := Len; + PutDataInSendBuffer(Data, Len); + end; + + if bAllSent then + Exit; + + TryToSend; + + if bAllSent then begin + { We post a message to fire the FD_WRITE message wich in turn will } + { fire the OnDataSent event. We cannot fire the event ourself } + { because the event handler will eventually call send again. } + { Sending the message prevent recursive call and stack overflow. } + { The PostMessage function posts (places) a message in a window's } + { message queue and then returns without waiting for the } + { corresponding window to process the message. The message will be } + { seen and routed by Delphi a litle later, when we will be out of } + { the send function. } + PostMessage(Handle, + WM_ASYNCSELECT, + FHSocket, + MakeLong(FD_WRITE, 0)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Return -1 if error, else return number of byte written } +function TCustomWSocket.SendStr(Str : String) : integer; +begin + if Length(Str) > 0 then + Result := Send(@Str[1], Length(Str)) + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SendText(Str : String); +begin + SendStr(Str); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.ASyncReceive( + Error : Word; + MySocketOptions : TWSocketOptions); +var + bMore : Boolean; + lCount : LongInt; + TrashCan : array [0..1023] of char; +begin + bMore := TRUE; + while bMore do begin + FLastError := 0; + + try + if not TriggerDataAvailable(Error) then begin + { Nothing wants to receive, we will receive and throw away 23/07/98 } + if DoRecv(TrashCan, SizeOf(TrashCan), 0) = SOCKET_ERROR then begin + FLastError := WSocket_WSAGetLastError; + if FLastError = WSAEWOULDBLOCK then begin + FLastError := 0; + break; + end; + end; + end; + + { DLR Honor the socket options being passed as parameters } + if wsoNoReceiveLoop in MySocketOptions then + break; + + if FLastError <> 0 then + bMore := FALSE + {* Check if we have something new arrived, if yes, process it *} + else if WSocket_ioctlsocket(FHSocket, FIONREAD, + lCount) = SOCKET_ERROR then begin + FLastError := WSocket_WSAGetLastError; + bMore := FALSE; + end + else if lCount = 0 then + bMore := FALSE; + except + bMore := FALSE; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMASyncSelect(var msg: TMessage); +var + Check : Word; +begin +{TriggerDisplay('AsyncSelect ' + IntToStr(msg.wParam) + ', ' + IntToStr(msg.lParamLo));} + { Verify that the socket handle is ours handle } + + if msg.wParam <> FHSocket then + Exit; + + if FPaused then + exit; + +{$IFDEF NO_W2K_FIX} + Check := msg.lParamLo and FD_CONNECT; + if Check <> 0 then begin + ChangeState(wsConnected); + TriggerSessionConnected(msg.lParamHi); + if (msg.lParamHi <> 0) and (FState <> wsClosed) then + Close; + end; + + Check := msg.lParamLo and FD_READ; + if Check <> 0 then begin + ASyncReceive(msg.lParamHi, FComponentOptions); + end; +{$ELSE} +Check := msg.lParamLo and FD_CONNECT; + if Check <> 0 then begin + if FState <> wsConnected then begin + ChangeState(wsConnected); + TriggerSessionConnected(msg.lParamHi); + if (msg.lParamHi <> 0) and (FState <> wsClosed) then + Close; + end; + end; + + Check := msg.lParamLo and FD_READ; + if Check <> 0 then begin + if FState <> wsConnected then begin + ChangeState(wsConnected); + TriggerSessionConnected(msg.lParamHi); + end; + ASyncReceive(msg.lParamHi, FComponentOptions); + end; +{$ENDIF} + + Check := msg.lParamLo and FD_WRITE; + if Check <> 0 then begin + TryToSend; +{ If you wants to test background exception, uncomment the next 2 lines. } +{ if bAllSent then } +{ raise Exception.Create('Test TWSocket exception'); } + if bAllSent then + TriggerDataSent(msg.lParamHi); + end; + + Check := msg.lParamLo and FD_ACCEPT; + if Check <> 0 then begin + TriggerSessionAvailable(msg.lParamHi); + end; + + Check := msg.lParamLo and FD_CLOSE; + if Check <> 0 then begin + { In some strange situations I found that we receive a FD_CLOSE } + { during the connection phase, breaking the connection early ! } + { This occurs for example after a failed FTP transfert } + if FState <> wsConnecting then begin + { Check if we have something arrived, if yes, process it } + { DLR, since we are closing MAKE SURE WE LOOP in the recieve } + { function to get ALL remainging data } + ASyncReceive(0, FComponentOptions - [wsoNoReceiveLoop]); + + if not FCloseInvoked then begin + FCloseInvoked := TRUE; + TriggerSessionClosed(msg.lParamHi); + end; + + if FState <> wsClosed then + Close; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure GetIPList(phe : PHostEnt; ToList : TStrings); +type + TaPInAddr = array [0..255] of PInAddr; + PaPInAddr = ^TaPInAddr; +var + pptr : PaPInAddr; + I : Integer; +begin + pptr := PaPInAddr(Phe^.h_addr_list); + + I := 0; + while pptr^[I] <> nil do begin + ToList.Add(StrPas(WSocket_inet_ntoa(pptr^[I]^))); + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMAsyncGetHostByName(var msg: TMessage); +var + Phe : Phostent; + Error : Word; +begin + if FDnsLookupHandle = 0 then begin + { We are still executing WSAAsyncGetHostByName and FDnsLookupHandle } + { has not been assigned yet ! We should proceed later. } + FDnsLookupTempMsg := msg; + FDnsLookupCheckMsg := TRUE; + Exit; + end + else if msg.wParam <> LongInt(FDnsLookupHandle) then + Exit; + + FDnsLookupHandle := 0; + Error := Msg.LParamHi; + if Error = 0 then begin + Phe := PHostent(@FDnsLookupBuffer); + if phe <> nil then begin + GetIpList(Phe, FDnsResultList); + FDnsResult := FDnsResultList.Strings[0]; + end; + end; + TriggerDnsLookupDone(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMAsyncGetHostByAddr(var msg: TMessage); +var + Phe : Phostent; + Error : Word; +begin + if msg.wParam <> LongInt(FDnsLookupHandle) then + Exit; + FDnsLookupHandle := 0; + Error := Msg.LParamHi; + if Error = 0 then begin + Phe := PHostent(@FDnsLookupBuffer); + if phe <> nil then begin + SetLength(FDnsResult, StrLen(Phe^.h_name)); + StrCopy(@FDnsResult[1], Phe^.h_name); + FDnsResultList.Clear; + FDnsResultList.Add(FDnsResult); + end; + end; + TriggerDnsLookupDone(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetProto(sProto : String); +begin + if FProtoAssigned and (sProto = FProtoStr) then + Exit; + + if FState <> wsClosed then begin + RaiseException('Cannot change Proto if not closed'); + Exit; + end; + + FProtoStr := Trim(sProto); + if Length(FProtoStr) = 0 then begin + FProtoAssigned := FALSE; + Exit; + end; + + FProtoResolved := FALSE; + FProtoAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetProto : String; +begin + Result := FProtoStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetRemotePort(sPort : String); +begin + if FPortAssigned and (FPortStr = sPort) then + Exit; + + if FState <> wsClosed then begin + RaiseException('Cannot change Port if not closed'); + Exit; + end; + + FPortStr := Trim(sPort); + if Length(FPortStr) = 0 then begin + FPortAssigned := FALSE; + Exit; + end; + + FPortResolved := FALSE; + FPortAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetRemotePort : String; +begin + Result := FPortStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetLocalPort(sLocalPort : String); +begin + if FState <> wsClosed then begin + RaiseException('Cannot change LocalPort if not closed'); + Exit; + end; + + FLocalPortStr := sLocalPort; + FLocalPortResolved := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetLocalAddr(sLocalAddr : String); +{var + IPAddr : TInAddr;} +begin + if FState <> wsClosed then begin + RaiseException('Cannot change LocalAddr if not closed'); + Exit; + end; + + if Length(sLocalAddr) = 0 then + sLocalAddr := '0.0.0.0'; +{$IFDEF NEVER} +{$IFDEF VER80} + sLocalAddr := sLocalAddr + #0; +{$ENDIF} + IPAddr.S_addr := WSocket_inet_addr(@sLocalAddr[1]); + if IPAddr.S_addr = u_long(INADDR_NONE) then + RaiseException('SetLocalAddr(): Invalid IP address'); + FLocalAddr := StrPas(WSocket_inet_ntoa(IPAddr)); +{$ELSE} + FLocalAddr := sLocalAddr; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetXPort: string; +var + saddr : TSockAddrIn; + saddrlen : integer; + port : integer; +begin + Result := 'error'; + if FState in [wsConnected, wsBound, wsListening] then begin + saddrlen := sizeof(saddr); + if WSocket_GetSockName(FHSocket, TSockAddr(saddr), saddrlen) = 0 then begin + port := WSocket_ntohs(saddr.sin_port); + Result := Format('%d',[port]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetXAddr: string; +var + saddr : TSockAddrIn; + saddrlen : integer; +begin + Result := 'error'; + if FState in [wsConnected, wsBound, wsListening] then begin + saddrlen := sizeof(saddr); + if WSocket_GetSockName(FHSocket, TSockAddr(saddr), saddrlen) = 0 then + Result := StrPas(WSocket_inet_ntoa(saddr.sin_addr)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetAddr(InAddr : String); +begin + if FAddrAssigned and (FAddrStr = InAddr) then + Exit; + + if FState <> wsClosed then begin + RaiseException('Cannot change Addr if not closed'); + Exit; + end; + + FAddrStr := Trim(InAddr); + if Length(FAddrStr) = 0 then begin + FAddrAssigned := FALSE; + Exit; + end; + + FAddrResolved := FALSE; + FAddrAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketResolveHost(InAddr : String) : TInAddr; +var + szData : array [0..256] of char; + Phe : Phostent; + IPAddr : u_long; +begin + if (Length(InAddr) = 0) or (Length(InAddr) >= SizeOf(szData)) then + raise ESocketException.Create('WSocketResolveHost: ''' + InAddr + ''' Invalid Hostname.'); + + StrPCopy(szData, Trim(InAddr)); { Length already checked above } + if WSocketIsDottedIP(InAddr) then begin + { Address is a dotted numeric address like 192.161.124.32 } + IPAddr := WSocket_inet_addr(szData); +{$IFDEF VER80} + { With Trumpet Winsock 2B and 30D (win 3.11), inet_addr returns faulty } + { results for 0.0.0.0 } + if (IPAddr = INADDR_NONE) and (StrComp(szData, '0.0.0.0') = 0) then begin + Result.s_addr := 0; + Exit; + end; +{$ENDIF} + if IPAddr = u_long(INADDR_NONE) then begin + if StrComp(szData, '255.255.255.255') = 0 then begin + Result.s_addr := u_long(INADDR_BROADCAST); + Exit; + end; + raise ESocketException.Create('WSocketResolveHost: ''' + InAddr + ''' Invalid IP address.'); + end; + Result.s_addr := IPAddr; + Exit; + end; + + { Address is a hostname } + Phe := WSocket_GetHostByName(szData); + if Phe = nil then + raise ESocketException.CreateFmt( + 'WSocketResolveHost: Cannot convert host address ''%s'', Error #%d', + [InAddr, WSocket_WSAGetLastError]); + Result.s_addr := PInAddr(Phe^.h_addr_list^)^.s_addr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Convert port name or number to number in host order (ftp -> 21) } +function WSocketResolvePort(Port : String; Proto : String) : Word; +var + szPort : array [0..31] of char; + szProto : array [0..31] of char; + Pse : Pservent; +begin + if (Length(Port) = 0) or (Length(Port) >= SizeOf(szPort)) then + raise ESocketException.Create('WSocketResolvePort: Invalid Port.'); + + if (Length(Proto) = 0) or (Length(Proto) >= SizeOf(szProto)) then + raise ESocketException.Create('WSocketResolvePort: Invalid Proto.'); + + if IsDigit(Port[1]) then + Result := atoi(Port) + else begin + StrPCopy(szPort, Trim(Port)); { Length already checked above } + StrPCopy(szProto, Trim(Proto)); { Length already checked above } +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + if szProto[0] = #0 then + Pse := WSocket_GetServByName(szPort, nil) + else + Pse := WSocket_GetServByName(szPort, szProto); + if Pse = nil then + raise ESocketException.CreateFmt( + 'WSocketResolvePort: Cannot convert port ''%s'', Error #%d', + [Port, WSocket_WSAGetLastError]); + Result := WSocket_ntohs(Pse^.s_port); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketResolveProto(sProto : String) : integer; +var + szProto : array [0..31] of char; + Ppe : Pprotoent; +begin + if (Length(sProto) = 0) or (Length(sProto) >= SizeOf(szProto)) then + raise ESocketException.Create('WSocketResolveProto: Invalid Protocol.'); + + sProto := Trim(sProto); + if IsDigit(sProto[1]) then + Result := atoi(sProto) + else begin + StrPCopy(szProto, sProto); { Length already checked above } +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + ppe := WSocket_getprotobyname(szProto); + if Ppe = nil then + raise ESocketException.CreateFmt( + 'WSocketResolveProto: Cannot convert protocol ''%s'', Error #%d', + [sProto, WSocket_WSAGetLastError]); + Result := ppe^.p_proto; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetAddr : String; +begin + Result := FAddrStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetSockName(var saddr : TSockAddrIn; var saddrlen : Integer) : integer; +begin + Result := WSocket_GetSockName(FHSocket, TSockAddr(saddr), saddrlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetPeerAddr: string; +var + saddr : TSockAddrIn; + saddrlen : integer; + szAddr : PChar; +begin + Result := 'error'; + if FState = wsConnected then begin + saddrlen := sizeof(saddr); + if WSocket_GetPeerName(FHSocket, TSockAddr(saddr), saddrlen) = 0 then begin + szAddr := WSocket_inet_ntoa(saddr.sin_addr); + Result := StrPas(szAddr); + end + else begin + SocketError('GetPeerName'); + Exit; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetPeerPort: string; +var + saddr : TSockAddrIn; + saddrlen : integer; +begin + Result := 'error'; + if FState = wsConnected then begin + saddrlen := sizeof(saddr); + if WSocket_GetPeerName(FHSocket, TSockAddr(saddr), saddrlen) = 0 then + Result := IntToStr(WSocket_ntohs(saddr.sin_port)) + else begin + SocketError('GetPeerPort'); + Exit; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetPeerName(var Name : TSockAddrIn; NameLen : Integer) : integer; +begin + if FState = wsConnected then + Result := WSocket_GetPeerName(FHSocket, TSockAddr(Name), NameLen) + else + Result := SOCKET_ERROR; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.CancelDnsLookup; +begin + if FDnsLookupHandle = 0 then + Exit; + if WSocket_WSACancelAsyncRequest(FDnsLookupHandle) <> 0 then begin + FDnsLookupHandle := 0; + SocketError('WSACancelAsyncRequest'); + Exit; + end; + FDnsLookupHandle := 0; + + if not (csDestroying in ComponentState) then + TriggerDnsLookupDone(WSAEINTR); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.DnsLookup(HostName : String); +var + IPAddr : TInAddr; +begin + if HostName = '' then begin + RaiseException('DNS lookup: invalid host name.'); + TriggerDnsLookupDone(WSAEINVAL); + Exit; + end; + + { Cancel any pending lookup } + if FDnsLookupHandle <> 0 then begin + WSocket_WSACancelAsyncRequest(FDnsLookupHandle); + FDnsLookupHandle := 0; + end; + + FDnsResult := ''; + FDnsResultList.Clear; + +{$IFDEF VER80} + { Delphi 1 do not automatically add a terminating nul char } + HostName := HostName + #0; +{$ENDIF} + if WSocketIsDottedIP(Hostname) then begin { 28/09/2002 } + IPAddr.S_addr := WSocket_inet_addr(@HostName[1]); + if IPAddr.S_addr <> u_long(INADDR_NONE) then begin + FDnsResultList.Add(FDnsResult); { 28/09/2002 } + FDnsResult := StrPas(WSocket_inet_ntoa(IPAddr)); + TriggerDnsLookupDone(0); + Exit; + end; + end; + + if FWindowHandle = 0 then + RaiseException('DnsLookup: Window not assigned'); + + { John Goodwin found a case where winsock dispatch WM_ASYNCGETHOSTBYNAME } + { message before returning from WSAAsyncGetHostByName call. Because of } + { that, FDnsLookupHandle is not yet assigned when execution comes in } + { WMAsyncGetHostByName. John use a flag to check this situation. } + FDnsLookupCheckMsg := FALSE; + FDnsLookupHandle := WSocket_WSAAsyncGetHostByName( + FWindowHandle, + WM_ASYNCGETHOSTBYNAME, + @HostName[1], + @FDnsLookupBuffer, + SizeOf(FDnsLookupBuffer)); + if FDnsLookupHandle = 0 then begin + RaiseExceptionFmt( + '%s: can''t start DNS lookup, error #%d', + [HostName, WSocket_WSAGetLastError]); + Exit; + end; + if FDnsLookupCheckMsg then begin + FDnsLookupCheckMsg := FALSE; + WMAsyncGetHostByName(FDnsLookupTempMsg); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.ReverseDnsLookup(HostAddr: String); +var + szAddr : array [0..256] of Char; + lAddr : u_long; +begin + if (Length(HostAddr) = 0) or (Length(HostAddr) >= SizeOf(szAddr)) then begin + RaiseException('ReverseDnsLookup: Invalid host name.'); + TriggerDnsLookupDone(WSAEINVAL); + Exit; + end; + { Cancel any pending lookup } + if FDnsLookupHandle <> 0 then + WSocket_WSACancelAsyncRequest(FDnsLookupHandle); + + FDnsResult := ''; + FDnsResultList.Clear; + + StrPCopy(szAddr, HostAddr); { Length already checked above } + lAddr := WSocket_inet_addr(szAddr); + + if FWindowHandle = 0 then + RaiseException('ReverseDnsLookup: Window not assigned'); + + FDnsLookupHandle := WSocket_WSAAsyncGetHostByAddr( + FWindowHandle, + WM_ASYNCGETHOSTBYADDR, + PChar(@lAddr), 4, PF_INET, + @FDnsLookupBuffer, + SizeOf(FDnsLookupBuffer)); + if FDnsLookupHandle = 0 then + RaiseExceptionFmt('%s: can''t start DNS lookup, error #%d', + [HostAddr, WSocket_WSAGetLastError]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.BindSocket; +var + SockName : TSockAddr; + SockNamelen : Integer; + LocalSockName : TSockAddrIn; +begin + FillChar(LocalSockName, Sizeof(LocalSockName), 0); + SockNamelen := sizeof(LocalSockName); + LocalSockName.sin_family := AF_INET; + LocalSockName.sin_port := WSocket_htons(FLocalPortNum); + LocalSockName.sin_addr.s_addr := WSocketResolveHost(FLocalAddr).s_addr; + + if WSocket_bind(HSocket, LocalSockName, SockNamelen) <> 0 then begin + RaiseExceptionFmt('winsock.bind failed, error #%d', [WSocket_WSAGetLastError]); + Exit; + end; + SockNamelen := sizeof(SockName); + if WSocket_getsockname(FHSocket, SockName, SockNamelen) <> 0 then begin + RaiseExceptionFmt('winsock.getsockname failed, error #%d', + [WSocket_WSAGetLastError]); + Exit; + end; + FLocalPortNum := WSocket_ntohs(SockName.sin_port); + FLocalPortStr := IntToStr(FLocalPortNum); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetLingerOption; +var + iStatus : integer; + li : TLinger; +begin + if FLingerOnOff = wsLingerNoSet then + Exit; { Option set is disabled, ignore } + + if FHSocket = INVALID_SOCKET then begin + RaiseException('Cannot set linger option at this time'); + Exit; + end; + + li.l_onoff := Ord(FLingerOnOff); { 0/1 = disable/enable linger } + li.l_linger := FLingerTimeout; { timeout in seconds } + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, + SO_LINGER, @li, SizeOf(li)); + + if iStatus <> 0 then begin + SocketError('setsockopt(SO_LINGER)'); + Exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Connect; +var + iStatus : integer; + optval : integer; + lAddr : TInAddr; +begin + if (FHSocket <> INVALID_SOCKET) and (FState <> wsClosed) then begin + RaiseException('Connect: Socket already in use'); + Exit; + end; + + if not FPortAssigned then begin + RaiseException('Connect: No Port Specified'); + Exit; + end; + + if not FAddrAssigned then begin + RaiseException('Connect: No IP Address Specified'); + Exit; + end; + + if not FProtoAssigned then begin + RaiseException('Connect: No Protocol Specified'); + Exit; + end; + + try + if not FProtoResolved then begin + { The next line will trigger an exception in case of failure } + FProto := WSocketResolveProto(FProtoStr); + case FProto of + IPPROTO_UDP: FType := SOCK_DGRAM; + IPPROTO_TCP: FType := SOCK_STREAM; + else + FType := SOCK_RAW; + end; + FProtoResolved := TRUE; + end; + + if not FPortResolved then begin + { The next line will trigger an exception in case of failure } + FPortNum := WSocketResolvePort(FPortStr, GetProto); + sin.sin_port := WSocket_htons(FPortNum); + FPortResolved := TRUE; + end; + + if not FLocalPortResolved then begin + { The next line will trigger an exception in case of failure } + FLocalPortNum := WSocketResolvePort(FLocalPortStr, GetProto); + FLocalPortResolved := TRUE; + end; + + if not FAddrResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_addr.s_addr := WSocketResolveHost(FAddrStr).s_addr; + FAddrResolved := TRUE; + end; + except + on E:Exception do begin + RaiseException('connect: ' + E.Message); + Exit; + end; + end; + + { Remove any data from the internal output buffer } + { (should already be empty !) } + DeleteBufferedData; + + FHSocket := WSocket_socket(FAddrFormat, FType, FProto); + if FHSocket = INVALID_SOCKET then begin + SocketError('Connect (socket)'); + Exit; + end; + ChangeState(wsOpened); + + if FState <> wsOpened then begin { 07/07/02 } + { Socket has been closed in the OnChangeState event ! } + WSocket_WSASetLastError(WSAEINVAL); + SocketError('Connect (Invalid operation in OnChangeState)'); + Exit; + end; + + if FType = SOCK_DGRAM then begin + BindSocket; + if FMultiCast then begin + if FMultiCastIpTTL <> IP_DEFAULT_MULTICAST_TTL then begin + optval := FMultiCastIpTTL; { set time-to-live for multicast } + iStatus := SetSockOpt(FHSocket, IPPROTO_IP, IP_MULTICAST_TTL, + @optval, SizeOf(optval)); + if iStatus <> 0 then begin + SocketError('setsockopt(IP_MULTICAST_TTL)'); + Exit; + end; + end; + if FLocalAddr <> '0.0.0.0' then begin { RK } + laddr.s_addr := WSocketResolveHost(FLocalAddr).s_addr; + iStatus := SetSockOpt(FHSocket, IPPROTO_IP, + IP_MULTICAST_IF, + PChar(@laddr), SizeOf(laddr)); + if iStatus <> 0 then begin + SocketError('setsockopt(IP_MULTICAST_IF)'); + Exit; + end; + end; { /RK } + end; + + if sin.sin_addr.S_addr = u_long(INADDR_BROADCAST) then begin + OptVal := 1; + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, SO_BROADCAST, + PChar(@OptVal), SizeOf(OptVal)); + if iStatus <> 0 then begin + SocketError('setsockopt(SO_BROADCAST)'); + Exit; + end; + end; + end + else begin + { Socket type is SOCK_STREAM } + optval := -1; + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, + SO_REUSEADDR, @optval, SizeOf(optval)); + + if iStatus <> 0 then begin + SocketError('setsockopt(SO_REUSEADDR)'); + Exit; + end; + + if wsoTcpNoDelay in FComponentOptions then begin + optval := -1; { true, 0=false } + iStatus := WSocket_setsockopt(FHsocket, IPPROTO_TCP, + TCP_NODELAY, @optval, SizeOf(optval)); + if iStatus <> 0 then begin + SocketError('setsockopt(IPPROTO_TCP, TCP_NODELAY)'); + Exit; + end; + end; + + SetLingerOption; + + optval := -1; + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, + SO_KEEPALIVE, @optval, SizeOf(optval)); + + if iStatus <> 0 then begin + SocketError('setsockopt(SO_KEEPALIVE)'); + Exit; + end; + + if (FLocalPortNum <> 0) or (FLocalAddr <> '0.0.0.0') then + BindSocket; + end; + + FSelectEvent := FD_READ or FD_WRITE or FD_CLOSE or + FD_ACCEPT or FD_CONNECT; + iStatus := WSocket_WSAASyncSelect(FHSocket, Handle, + WM_ASYNCSELECT, FSelectEvent); + if iStatus <> 0 then begin + SocketError('WSAAsyncSelect'); + Exit; + end; + + if FType = SOCK_DGRAM then begin + ChangeState(wsConnected); + TriggerSessionConnected(0); + end + else begin + iStatus := WSocket_connect(FHSocket, TSockAddr(sin), sizeof(sin)); + if iStatus = 0 then + ChangeState(wsConnecting) + else begin + iStatus := WSocket_WSAGetLastError; + if iStatus = WSAEWOULDBLOCK then + ChangeState(wsConnecting) + else begin + FLastError := WSocket_WSAGetLastError; + SocketError('Connect'); + Exit; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Listen; +type + ip_mreq = record + imr_multiaddr : in_addr; + imr_interface : in_addr; + end; +var + iStatus : integer; + optval : integer; + mreq : ip_mreq; + szAddr : array[0..256] of char; +begin + if not FPortAssigned then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('listen: port not assigned'); + Exit; + end; + + if not FProtoAssigned then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('listen: protocol not assigned'); + Exit; + end; + + if not FAddrAssigned then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('listen: address not assigned'); + Exit; + end; + + try + if not FProtoResolved then begin + { The next line will trigger an exception in case of failure } + FProto := WSocketResolveProto(FProtoStr); + if FProto = IPPROTO_UDP then + FType := SOCK_DGRAM + else + FType := SOCK_STREAM; + FProtoResolved := TRUE; + end; + + if not FPortResolved then begin + { The next line will trigger an exception in case of failure } + FPortNum := WSocketResolvePort(FPortStr, GetProto); + sin.sin_port := WSocket_htons(FPortNum); + FPortResolved := TRUE; + end; + + if not FAddrResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_addr.s_addr := WSocketResolveHost(FAddrStr).s_addr; + FAddrResolved := TRUE; + end; + except + on E:Exception do begin + RaiseException('listen: ' + E.Message); + Exit; + end; + end; + + { Remove any data from the internal output buffer } + { (should already be empty !) } + DeleteBufferedData; + + FHSocket := WSocket_socket(FAddrFormat, FType, FProto); + + if FHSocket = INVALID_SOCKET then begin + SocketError('socket'); + exit; + end; + + if FType = SOCK_DGRAM then begin + if FReuseAddr then begin + { Enable multiple tasks to listen on duplicate address and port } + optval := -1; + iStatus := SetSockOpt(FHSocket, SOL_SOCKET, SO_REUSEADDR, @optval, SizeOf(optval)); + + if iStatus <> 0 then begin + SocketError('setsockopt(SO_REUSEADDR)'); + Exit; + end; + end; + end; + + iStatus := WSocket_bind(FHSocket, TSockAddr(sin), sizeof(sin)); + if iStatus = 0 then + ChangeState(wsBound) + else begin + SocketError('Bind'); + Close; + Exit; + end; + + if FType = SOCK_DGRAM then begin + if FMultiCast then begin + { Use setsockopt() to join a multicast group } + { mreq.imr_multiaddr.s_addr := Inet_addr('225.0.0.37');} + { mreq.imr_multiaddr.s_addr := sin.sin_addr.s_addr;} + { mreq.imr_multiaddr.s_addr := Inet_addr(FAddrStr);} + StrPCopy(szAddr, FMultiCastAddrStr); + mreq.imr_multiaddr.s_addr := Inet_addr(szAddr); + { mreq.imr_interface.s_addr := htonl(INADDR_ANY);} { RK} + mreq.imr_interface.s_addr := WSocketResolveHost(FAddrStr).s_addr; + iStatus := SetSockOpt(FHSocket, IPPROTO_IP, + IP_ADD_MEMBERSHIP, @mreq, SizeOf(mreq)); + + if iStatus <> 0 then begin + SocketError('setsockopt(IP MULTICAST)'); + Exit; + end; + end; + end; + + case FType of + SOCK_RAW, + SOCK_DGRAM : + begin + ChangeState(wsListening); + ChangeState(wsConnected); + TriggerSessionConnected(0); + end; + SOCK_STREAM : + begin + iStatus := WSocket_listen(FHSocket, 5); + if iStatus = 0 then + ChangeState(wsListening) + else begin + SocketError('Listen'); + Exit; + end; + end; + else + SocketError('Listen: unexpected protocol.'); + Exit; + end; + + + FSelectEvent := FD_READ or FD_WRITE or + FD_ACCEPT or FD_CLOSE; + iStatus := WSocket_WSAASyncSelect(FHSocket, Handle, + WM_ASYNCSELECT, FSelectEvent); + if iStatus <> 0 then begin + SocketError('WSAASyncSelect'); + exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.Accept: TSocket; +var + len : integer; +begin + if FState <> wsListening then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('not a listening socket'); + Result := INVALID_SOCKET; + Exit; + end; + + len := sizeof(sin); +{$IFDEF VER80} { Delphi 1 } + FASocket := WSocket_accept(FHSocket, TSockAddr(sin), len); +{$ELSE} +{$IFDEF VER90} { Delphi 2} + FASocket := WSocket_accept(FHSocket, TSockAddr(sin), len); +{$ELSE} + { Delphi 3/4, Bcb 1/3/4 use pointers instead of var parameters } + FASocket := WSocket_accept(FHSocket, @sin, @len); +{$ENDIF} +{$ENDIF} + + if FASocket = INVALID_SOCKET then begin + SocketError('Accept'); + Result := INVALID_SOCKET; + Exit; + end + else + Result := FASocket; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Pause; +begin + FPaused := TRUE; + WSocket_WSAASyncSelect(FHSocket, Handle, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Resume; +begin + FPaused := FALSE; + WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, FSelectEvent); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Shutdown(How : Integer); +begin + if FHSocket <> INVALID_SOCKET then + WSocket_shutdown(FHSocket, How); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.DeleteBufferedData; +var + nItem : Integer; +begin + { Delete all data buffer } + for nItem := 0 to FBufList.Count - 1 do + TBuffer(FBufList.Items[nItem]).Free; + FBufList.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Abort; +begin + CancelDnsLookup; + DeleteBufferedData; + { Be sure to close as fast as possible (abortive close) } + if (State = wsConnected) and (FProto = IPPROTO_TCP) then begin + LingerOnOff := wsLingerOff; + SetLingerOption; + end; + InternalClose(FALSE, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Close; +begin + InternalClose(TRUE, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.CloseDelayed; +begin + PostMessage(Handle, WM_CLOSE_DELAYED, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Release; +begin + PostMessage(Handle, WM_WSOCKET_RELEASE, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMCloseDelayed(var msg: TMessage); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMRelease(var msg: TMessage); +begin + Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Flush; +begin + while (FHSocket <> INVALID_SOCKET) and { No more socket } + (not bAllSent) do begin { Nothing to send } + { Break; } + TryToSend; + MessagePump; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.InternalClose(bShut : Boolean; Error : Word); +var + iStatus : integer; +{ Buffer : array [0..127] of Char; } +begin + if FHSocket = INVALID_SOCKET then begin + if FState <> wsClosed then begin + ChangeState(wsClosed); + AssignDefaultValue; + end; + exit; + end; + + if FState = wsClosed then + Exit; + +{ 11/10/98 called shutdown(1) instead of shutdonw(2). This disable only } +{ reception. Disabling data send produced data lost is some cases. For } +{ example when a client open the connection, send some data fast then close } +{ the connection immediately, even using the linger option. } + if bShut then + ShutDown(1); + + if FHSocket <> INVALID_SOCKET then begin + repeat + { Close the socket } + iStatus := WSocket_closesocket(FHSocket); + if iStatus <> 0 then begin + FLastError := WSocket_WSAGetLastError; + if FLastError <> WSAEWOULDBLOCK then begin + FHSocket := INVALID_SOCKET; + { Ignore the error occuring when winsock DLL not } + { initialized (occurs when using TWSocket from a DLL) } + if FLastError = WSANOTINITIALISED then + break; + SocketError('Disconnect (closesocket)'); + Exit; + end; + MessagePump; + end; + until iStatus = 0; + FHSocket := INVALID_SOCKET; + end; + + ChangeState(wsClosed); + if (not (csDestroying in ComponentState)) and + (not FCloseInvoked) {and Assigned(FOnSessionClosed)} then begin + FCloseInvoked := TRUE; + TriggerSessionClosed(Error); + end; + { 29/09/98 Protect AssignDefaultValue because SessionClosed event handler } + { may have destroyed the component. } + try + AssignDefaultValue; + except + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WaitForClose; +var + lCount : LongInt; + Status : Integer; + Ch : Char; +begin + while (FHSocket <> INVALID_SOCKET) and (FState <> wsClosed) do begin + MessagePump; + + if WSocket_ioctlsocket(FHSocket, FIONREAD, lCount) = SOCKET_ERROR then + break; + if lCount > 0 then + TriggerDataAvailable(0); + + Status := DoRecv(Ch, 0, 0); + if Status <= 0 then begin + FLastError := WSocket_WSAGetLastError; + if FLastError <> WSAEWOULDBLOCK then + break; + end; + MessagePump; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketGetHostByAddr(Addr : String) : PHostEnt; +var + szAddr : array[0..256] of char; + lAddr : u_long; +begin + if (Length(Addr) = 0) or (Length(Addr) >= SizeOf(szAddr)) then + raise ESocketException.Create('WSocketGetHostByAddr: Invalid address.'); + + StrPCopy(szAddr, Addr); { Length already checked above } + lAddr := WSocket_inet_addr(szAddr); + Result := WSocket_gethostbyaddr(PChar(@lAddr), 4, PF_INET); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketResolveIp(IpAddr : String) : String; +var + Phe : PHostEnt; +begin + phe := WSocketGetHostByAddr(IpAddr); + if Phe = nil then + Result := '' + else begin + SetLength(Result, StrLen(Phe^.h_name)); + StrCopy(@Result[1], Phe^.h_name); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketGetHostByName(Name : String) : PHostEnt; +var + szName : array[0..256] of char; +begin + if (Length(Name) = 0) or (Length(Name) >= SizeOf(szName)) then + raise ESocketException.Create('WSocketGetHostByName: Invalid Hostname.'); + + StrPCopy(szName, Name); + Result := WSocket_gethostbyname(szName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LocalIPList : TStrings; +var + phe : PHostEnt; +begin + IPList.Clear; + Result := IPList; + + phe := WSocketGetHostByName(LocalHostName); + if phe <> nil then + GetIpList(Phe, IPList); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LocalHostName : String; +var + Buffer : array [0..63] of char; +begin +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + if WSocket_gethostname(Buffer, SizeOf(Buffer)) <> 0 then + raise ESocketException.Create('Winsock.GetHostName failed'); + Result := StrPas(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.TimerIsSet(var tvp : TTimeVal) : Boolean; +begin + Result := (tvp.tv_sec <> 0) or (tvp.tv_usec <> 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.TimerCmp(var tvp : TTimeVal; var uvp : TTimeVal; IsEqual : Boolean) : Boolean; +begin + Result := (tvp.tv_sec = uvp.tv_sec) and (tvp.tv_usec = uvp.tv_usec); + if not IsEqual then + Result := not Result; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TimerClear(var tvp : TTimeVal); +begin + tvp.tv_sec := 0; + tvp.tv_usec := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetSendFlags(newValue : TSocketSendFlags); +begin + case newValue of + wsSendNormal: FSendFlags := 0; + wsSendUrgent: FSendFlags := MSG_OOB; + else + RaiseException('Invalid SendFlags'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetSendFlags : TSocketSendFlags; +begin + case FSendFlags of + 0 : Result := wsSendNormal; + MSG_OOB : Result := wsSendUrgent; + else + RaiseException('Invalid internal SendFlags'); + Result := wsSendNormal; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerDisplay(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerSendData(BytesSent : Integer); +begin + if Assigned(FOnSendData) then + FOnSendData(Self, BytesSent); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerSessionAvailable(Error : Word); +begin + if Assigned(FOnSessionAvailable) then + FOnSessionAvailable(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerSessionConnected(Error : Word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerSessionClosed(Error : Word); +begin + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.TriggerDataAvailable(Error : Word) : Boolean; +begin + Result := Assigned(FOnDataAvailable); + if not Result then + Exit; +{$IFDEF TOMASEK} { 23/01/99 } + { Do not allow FD_READ messages, this will prevent reentering the } + { OnDataAvailable event handler. } + FSelectEvent := FD_WRITE or FD_CLOSE or FD_CONNECT; + WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, FSelectEvent); + try + FRcvdFlag := TRUE; + while Result and FRcvdFlag do begin + { Trigger user code. This will normally call DoRecv which will } + { update FRcvdFlag. } + { If user code is wrong, we'll loop forever ! } + FOnDataAvailable(Self, Error); + Result := Assigned(FOnDataAvailable); + end; + finally + { Allow all events now } + FSelectEvent := FD_READ or FD_WRITE or FD_CLOSE or FD_CONNECT; + WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, FSelectEvent); + end; +{$ELSE} { 23/01/99 } + FOnDataAvailable(Self, Error); { 23/01/99 } +{$ENDIF} { 23/01/99 } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerDataSent(Error : Word); +begin + if Assigned(FOnDataSent) then + FOnDataSent(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerError; +begin + if Assigned(FOnError) then + FOnError(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerDNSLookupDone(Error : Word); +begin + if Assigned(FOnDNSLookupDone) then + FOnDNSLookupDone(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerChangeState(OldState, NewState : TSocketState); +begin + if Assigned(FOnChangeState) then + FOnChangeState(Self, OldState, NewState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SocketError(sockfunc: string); +var + Error : integer; + Line : string; +begin + Error := WSocket_WSAGetLastError; + Line := 'Error '+ IntToStr(Error) + ' in function ' + sockfunc + + #13#10 + WSocketErrorDesc(Error); + + if (Error = WSAECONNRESET) or + (Error = WSAENOTCONN) then begin + WSocket_closesocket(FHSocket); + FHSocket := INVALID_SOCKET; + if FState <> wsClosed then + TriggerSessionClosed(Error); + ChangeState(wsClosed); + end; + + FLastError := Error; + RaiseException(Line); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketErrorDesc(error: integer) : string; +begin + case error of + 0: + WSocketErrorDesc := 'No Error'; + WSAEINTR: + WSocketErrorDesc := 'Interrupted system call'; + WSAEBADF: + WSocketErrorDesc := 'Bad file number'; + WSAEACCES: + WSocketErrorDesc := 'Permission denied'; + WSAEFAULT: + WSocketErrorDesc := 'Bad address'; + WSAEINVAL: + WSocketErrorDesc := 'Invalid argument'; + WSAEMFILE: + WSocketErrorDesc := 'Too many open files'; + WSAEWOULDBLOCK: + WSocketErrorDesc := 'Operation would block'; + WSAEINPROGRESS: + WSocketErrorDesc := 'Operation now in progress'; + WSAEALREADY: + WSocketErrorDesc := 'Operation already in progress'; + WSAENOTSOCK: + WSocketErrorDesc := 'Socket operation on non-socket'; + WSAEDESTADDRREQ: + WSocketErrorDesc := 'Destination address required'; + WSAEMSGSIZE: + WSocketErrorDesc := 'Message too long'; + WSAEPROTOTYPE: + WSocketErrorDesc := 'Protocol wrong type for socket'; + WSAENOPROTOOPT: + WSocketErrorDesc := 'Protocol not available'; + WSAEPROTONOSUPPORT: + WSocketErrorDesc := 'Protocol not supported'; + WSAESOCKTNOSUPPORT: + WSocketErrorDesc := 'Socket type not supported'; + WSAEOPNOTSUPP: + WSocketErrorDesc := 'Operation not supported on socket'; + WSAEPFNOSUPPORT: + WSocketErrorDesc := 'Protocol family not supported'; + WSAEAFNOSUPPORT: + WSocketErrorDesc := 'Address family not supported by protocol family'; + WSAEADDRINUSE: + WSocketErrorDesc := 'Address already in use'; + WSAEADDRNOTAVAIL: + WSocketErrorDesc := 'Address not available'; + WSAENETDOWN: + WSocketErrorDesc := 'Network is down'; + WSAENETUNREACH: + WSocketErrorDesc := 'Network is unreachable'; + WSAENETRESET: + WSocketErrorDesc := 'Network dropped connection on reset'; + WSAECONNABORTED: + WSocketErrorDesc := 'Connection aborted'; + WSAECONNRESET: + WSocketErrorDesc := 'Connection reset by peer'; + WSAENOBUFS: + WSocketErrorDesc := 'No buffer space available'; + WSAEISCONN: + WSocketErrorDesc := 'Socket is already connected'; + WSAENOTCONN: + WSocketErrorDesc := 'Socket is not connected'; + WSAESHUTDOWN: + WSocketErrorDesc := 'Can''t send after socket shutdown'; + WSAETOOMANYREFS: + WSocketErrorDesc := 'Too many references: can''t splice'; + WSAETIMEDOUT: + WSocketErrorDesc := 'Connection timed out'; + WSAECONNREFUSED: + WSocketErrorDesc := 'Connection refused'; + WSAELOOP: + WSocketErrorDesc := 'Too many levels of symbolic links'; + WSAENAMETOOLONG: + WSocketErrorDesc := 'File name too long'; + WSAEHOSTDOWN: + WSocketErrorDesc := 'Host is down'; + WSAEHOSTUNREACH: + WSocketErrorDesc := 'No route to host'; + WSAENOTEMPTY: + WSocketErrorDesc := 'Directory not empty'; + WSAEPROCLIM: + WSocketErrorDesc := 'Too many processes'; + WSAEUSERS: + WSocketErrorDesc := 'Too many users'; + WSAEDQUOT: + WSocketErrorDesc := 'Disc quota exceeded'; + WSAESTALE: + WSocketErrorDesc := 'Stale NFS file handle'; + WSAEREMOTE: + WSocketErrorDesc := 'Too many levels of remote in path'; + WSASYSNOTREADY: + WSocketErrorDesc := 'Network sub-system is unusable'; + WSAVERNOTSUPPORTED: + WSocketErrorDesc := 'WinSock DLL cannot support this application'; + WSANOTINITIALISED: + WSocketErrorDesc := 'WinSock not initialized'; + WSAHOST_NOT_FOUND: + WSocketErrorDesc := 'Host not found'; + WSATRY_AGAIN: + WSocketErrorDesc := 'Non-authoritative host not found'; + WSANO_RECOVERY: + WSocketErrorDesc := 'Non-recoverable error'; + WSANO_DATA: + WSocketErrorDesc := 'No Data'; + else + WSocketErrorDesc := 'Not a WinSock error'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + X X X X X X X X X X X X X X + X X X X X X X X X X X + X X X X X X X X + X X X X X X X X X X X + X X X X X X X X + X X X X X X X X X X X X + X X X X X X X X X X X X + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.AssignDefaultValue; +begin + inherited AssignDefaultValue; + FSocksState := socksData; + FSocksServer := ''; + FSocksPort := ''; + FSocksLevel := '5'; + FSocksRcvdCnt := 0; + FSocksPortAssigned := FALSE; + FSocksServerAssigned := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SetSocksLevel(newValue : String); +begin + if State <> wsClosed then begin + RaiseException('Can''t change socks level if not closed'); + Exit; + end; + if (newValue <> '4') and (newValue <> '5') and + (newValue <> '4A') and (newValue <> '4a') then begin + RaiseException('Invalid socks level. Must be 4, 4A or 5.'); + Exit; + end; + FSocksLevel := UpperCase(newValue); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SetSocksPort(sPort : String); +begin + if State <> wsClosed then begin + RaiseException('Can''t change socks port if not closed'); + Exit; + end; + FSocksPort := Trim(sPort); + if Length(FSocksPort) = 0 then begin + FSocksPortAssigned := FALSE; + Exit; + end; + FSocksPortAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SetSocksServer(sServer : String); +begin + if State <> wsClosed then begin + RaiseException('Can''t change socks server if not closed'); + Exit; + end; + FSocksServer := Trim(sServer); + if Length(FSocksServer) = 0 then begin + FSocksServerAssigned := FALSE; + Exit; + end; + FSocksServerAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.Listen; +begin + { Check if we really wants to use socks server } + if not FSocksServerAssigned then begin + { No socks server assigned, Listen as usual } + inherited Listen; + Exit; + end; + RaiseException('Listening is not supported thru socks server'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.Connect; +begin + { Check if we really wants to use socks server } + if not FSocksServerAssigned then begin + { No socks server assigned, connect as usual } + inherited Connect; + Exit; + end; + + if LowerCase(FProtoStr) <> 'tcp' then begin + RaiseException('tcp is the only protocol supported thru socks server'); + Exit; + end; + + try + if not FPortResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_port := WSocket_htons(WSocketResolvePort(FSocksPort, FProtoStr)); + FPortResolved := TRUE; + end; + + if not FAddrResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_addr.s_addr := WSocketResolveHost(FSocksServer).s_addr; + FAddrResolved := TRUE; + end; + { The next line will trigger an exception in case of failure } + FPortNum := WSocketResolvePort(FPortStr, FProtoStr); + except + on E:Exception do begin + RaiseException('connect: ' + E.Message); + Exit; + end; + end; + + FSocksState := socksNegociateMethods; + FRcvCnt := 0; + inherited Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{function BufToStr(Buf : PChar; Cnt : Integer) : String; +begin + Result := ''; + while Cnt > 0 do begin + if Buf^ in [#32..#126] then + Result := Result + Buf^ + else + Result := Result + '#' + Format('%2.2d', [ord(Buf^)]); + Inc(Buf); + Dec(Cnt); + end; +end;} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSessionConnected(Error : Word); +var + Buf : array [0..2] of char; +begin + if FSocksState = socksNegociateMethods then begin + TriggerSocksConnected(Error); + if Error <> 0 then begin + inherited TriggerSessionConnected(Error); + Exit; + end; + if FSocksLevel[1] = '4' then + SocksDoConnect + else begin + if FSocksAuthentication = socksNoAuthentication then + FSocksAuthNumber := #$00 { No authentification } + else + FSocksAuthNumber := #$02; { Usercode/Password } + + Buf[0] := #$05; { Version number } + Buf[1] := #$01; { Number of methods } + Buf[2] := FSocksAuthNumber; { Method identifier } +{TriggerDisplay('Send = ''' + BufToStr(Buf, 3) + '''');} + Send(@Buf, 3); + end; + end + else + inherited TriggerSessionConnected(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSessionClosed(Error : Word); +begin + if FSocksState = socksAuthenticate then + TriggerSocksAuthState(socksAuthFailure); + inherited TriggerSessionClosed(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSocksConnected(Error : Word); +begin + if Assigned(FOnSocksConnected) then + FOnSocksConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSocksError(Error : Integer; Msg : String); +begin + if Assigned(FOnSocksError) then + FOnSocksError(Self, Error, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSocksAuthState(AuthState : TSocksAuthState); +begin + if Assigned(FOnSocksAuthState) then + FOnSocksAuthState(Self, AuthState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SocksDoAuthenticate; +var + Buf : array [0..127] of char; + I : Integer; +begin + FSocksState := socksAuthenticate; + TriggerSocksAuthState(socksAuthStart); + Buf[0] := #$01; {06/03/99} { Socks version } + I := 1; + Buf[I] := chr(Length(FSocksUsercode)); + Move(FSocksUsercode[1], Buf[I + 1], Length(FSocksUsercode)); + I := I + 1 + Length(FSocksUsercode); + Buf[I] := chr(Length(FSocksPassword)); + Move(FSocksPassword[1], Buf[I + 1], Length(FSocksPassword)); + I := I + 1 + Length(FSocksPassword); + try +{TriggerDisplay('Send = ''' + BufToStr(Buf, I) + '''');} + Send(@Buf, I); + except + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SocksDoConnect; +type + pu_long = ^u_long; +var + Buf : array [0..127] of char; + I : Integer; + ErrCode : Integer; +begin + FSocksState := socksConnect; + if FSocksLevel[1] = '4' then begin + Buf[0] := #4; + Buf[1] := #1; + PWORD(@Buf[2])^ := WSocket_ntohs(FPortNum); + if FSocksLevel = '4A' then + pu_long(@Buf[4])^ := WSocket_inet_addr('0.0.0.1') + else begin + try + pu_long(@Buf[4])^ := WSocketResolveHost(FAddrStr).s_addr; + except + on E:Exception do begin + ErrCode := socksHostResolutionFailed; + TriggerSocksError(ErrCode, E.ClassName + ' ' + E.Message); + InternalClose(TRUE, ErrCode); + Exit; + end; + end; + end; + I := 8; + if Length(FSocksUsercode) > 0 then begin + { I'm not sure it has to be like that ! Should I also use the } + { password or not ? } + Move(FSocksUsercode[1], Buf[I], Length(FSocksUsercode)); + I := I + Length(FSocksUsercode); + end; + Buf[I] := #0; + Inc(I); + if FSocksLevel = '4A' then begin + Move(FAddrStr[1], Buf[I], Length(FAddrStr)); + I := I + Length(FAddrStr); + Buf[I] := #0; { Alon Gingold } + Inc(I); { Alon Gingold } + end; + { Buf[I] := #0; Alon Gingold } + { Inc(I); Alon Gingold } + end + else begin + Buf[0] := #$05; { Socks version } + Buf[1] := #$01; { Connect command } + Buf[2] := #$00; { Reserved, must be $00 } + Buf[3] := #$03; { Address type is domain name } + Buf[4] := chr(Length(FAddrStr)); + { Should check buffer overflow } + Move(FAddrStr[1], Buf[5], Length(FAddrStr)); + I := 5 + Length(FAddrStr); + PWord(@Buf[I])^ := WSocket_htons(FPortNum); + I := I + 2; + end; + + try +{TriggerDisplay('Send = ''' + BufToStr(Buf, I + 2) + '''');} + Send(@Buf, I); + except + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.DataAvailableError( + ErrCode : Integer; + Msg : String); +begin +{ TriggerSocksError(ErrCode, Msg); } +{ inherited TriggerSessionConnected(ErrCode); } +{ InternalClose(TRUE, ErrCode); } + TriggerSocksError(ErrCode, Msg); + FSocksState := socksData; + {**ALON** Added, so TriggerSessionConnected will only call inherited} + {inherited} TriggerSessionConnected(ErrCode); + {**ALON** removed 'inherited' now calls top level} + InternalClose(TRUE, ErrCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSocksWSocket.TriggerDataAvailable(Error : Word) : Boolean; +var + Len : Integer; + I : Integer; + ErrCode : Word; + ErrMsg : String; + InAddr : TInAddr; + AnsLen : Integer; +begin + if FSocksState = socksData then begin + Result := inherited TriggerDataAvailable(Error); + Exit; + end; + + if Error <> 0 then begin + DataAvailableError(Error, 'data receive error'); + Result := FALSE; + Exit; + end; + + if FSocksState = socksNegociateMethods then begin + Result := TRUE; + Len := Receive(@FRcvBuf[FRcvCnt], Sizeof(FRcvBuf) - FRcvCnt - 1); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; +{TriggerDisplay('socksNegociateMethods FrcvBuf = ''' + BufToStr(FRcvBuf, FRcvCnt) + '''');} + if FSocksLevel[1] = '4' then begin + { We should never comes here } + DataAvailableError(socksProtocolError, 'TWSocket logic error'); + Exit; + end + else begin { SOCKS5 } + { We are waiting only two bytes } + if FRcvCnt < 2 then + Exit; +{ if FRcvCnt <> 2 then begin 06/03/99} +{ DataAvailableError(socksProtocolError, 'too much data availaible');} +{ Exit; } +{ end; } + FRcvCnt := 0; { Clear receive counter } + if FRcvBuf[0] <> #$05 then begin + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + if FRcvBuf[1] = #$00 then begin + { No authentication required } + if FSocksAuthNumber <> #$00 then + { We asked for authentification, so complains... } + TriggerSocksAuthState(socksAuthNotRequired); + end + else if FRcvBuf[1] = #$02 then begin + { Usercode/Password authentication required } + SocksDoAuthenticate; + Exit; + end + else begin + DataAvailableError(socksAuthMethodError, 'authentification method not acceptable'); + Exit; + end; + SocksDoConnect; + end; + end + else if FSocksState = socksConnect then begin + Result := TRUE; +{TriggerDisplay('socksConnect FrcvBuf = ''' + BufToStr(FRcvBuf, FRcvCnt) + '''');} + if FSocksLevel[1] = '4' then begin + { We wants at most 8 characters } + Len := Receive(@FRcvBuf[FRcvCnt], 8 - FRcvCnt); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; + { We are waiting for 8 bytes } + if FRcvCnt < 8 then + Exit; + FRcvCnt := 0; { Clear receive counter } + if FRcvBuf[0] <> #0 then begin + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + if FRcvBuf[1] <> #90 then begin { david.brock } + case FRcvBuf[1] of + #91: ErrCode := socksRejectedOrFailed; + #92: ErrCode := socksConnectionRefused; + #93: ErrCode := socksAuthenticationFailed; + else + ErrCode := socksUnassignedError; + end; + case ErrCode of + socksRejectedOrFailed : + ErrMsg := 'request rejected or failed'; + socksConnectionRefused : + ErrMsg := 'connection refused'; + socksAuthenticationFailed : + ErrMsg := 'authentification failed'; + else + ErrMsg := 'unassigned error #' + IntToStr(Ord(FRcvBuf[1])); + end; + DataAvailableError(ErrCode, ErrMsg); + Exit; + end; + FSocksState := socksData; +{ inherited TriggerSessionConnected(0); } +{ Result := inherited TriggerDataAvailable(0); } + {inherited} TriggerSessionConnected(0); + {**ALON** removed 'inherited' now calls top level} + Result := {inherited} TriggerDataAvailable(0); + {**ALON** removed 'inherited' now calls top level} + end + else begin { SOCKS5 } + Len := Receive(@FRcvBuf[FRcvCnt], Sizeof(FRcvBuf) - FRcvCnt - 1); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; + if FRcvCnt >= 1 then begin + { First byte is version, we expect version 5 } + if FRcvBuf[0] <> #$05 then begin + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + end; + if FRcvCnt >= 2 then begin + if FRcvBuf[1] <> #$00 then begin + case FRcvBuf[1] of + #1: ErrCode := socksGeneralFailure; + #2: ErrCode := socksConnectionNotAllowed; + #3: ErrCode := socksNetworkUnreachable; + #4: ErrCode := socksHostUnreachable; + #5: ErrCode := socksConnectionRefused; + #6: ErrCode := socksTtlExpired; + #7: ErrCode := socksUnknownCommand; + #8: ErrCode := socksUnknownAddressType; + else + ErrCode := socksUnassignedError; + end; + case ErrCode of + socksGeneralFailure : + ErrMsg := 'general SOCKS server failure'; + socksConnectionNotAllowed : + ErrMsg := 'connection not allowed by ruleset'; + socksNetworkUnreachable : + ErrMsg := 'network unreachable'; + socksHostUnreachable : + ErrMsg := 'host unreachable'; + socksConnectionRefused : + ErrMsg := 'connection refused'; + socksTtlExpired : + ErrMsg := 'time to live expired'; + socksUnknownCommand : + ErrMsg := 'command not supported'; + socksUnknownAddressType : + ErrMsg := 'address type not supported'; + else + ErrMsg := 'unassigned error #' + IntToStr(Ord(FRcvBuf[1])); + end; + DataAvailableError(ErrCode, ErrMsg); + Exit; + end; + end; + if FRcvCnt < 5 then + Exit; + + { We have enough data to learn the answer length } + if FRcvBuf[3] = #$01 then + AnsLen := 10 { IP V4 address } + else if FRcvBuf[3] = #$03 then + AnsLen := 7 + Ord(FRcvBuf[4]) { Domain name } + else + AnsLen := 5; { Other unsupported } + + if FRcvCnt < AnsLen then + Exit; + + if FRcvBuf[3] = #$01 then begin + { IP V4 address } + Move(FRcvBuf[4], InAddr, 4); + FBoundAddr := StrPas(WSocket_inet_ntoa(InAddr)); + I := 4 + 4; + end + else if FRcvBuf[3] = #$03 then begin + { Domain name } + SetLength(FBoundAddr, Ord(FRcvBuf[4])); + Move(FRcvBuf[5], FBoundAddr[1], Length(FBoundAddr)); { david.brock } + I := 4 + Ord(FRcvBuf[4]) + 1; + end + else begin + { Unsupported address type } + DataAvailableError(socksUnknownAddressType, 'address type not supported'); + Exit; + end; + + FBoundPort := format('%d', [WSocket_ntohs(PWord(@FRcvBuf[I])^)]); + I := I + 2; + FSocksState := socksData; +{ inherited TriggerSessionConnected(0); } + {inherited} TriggerSessionConnected(0); + {**ALON** removed 'inherited' now calls top level} + FSocksRcvdCnt := FRcvCnt - I; + if FSocksRcvdCnt < 0 then + FSocksRcvdCnt := 0 + else + FSocksRcvdPtr := @FRcvBuf[I]; +{ Result := inherited TriggerDataAvailable(0);} + Result := {inherited} TriggerDataAvailable(0); + {**ALON** removed 'inherited' now calls top level} + end; + end + else if FSocksState = socksAuthenticate then begin + Result := TRUE; + Len := Receive(@FRcvBuf[FRcvCnt], Sizeof(FRcvBuf) - FRcvCnt - 1); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; +{TriggerDisplay('socksAuthenticate FrcvBuf = ''' + BufToStr(FRcvBuf, FRcvCnt) + '''');} + if FRcvCnt >= 1 then begin + { First byte is version, we expect version 5 } + if FRcvBuf[0] <> #$01 then begin { 06/03/99 } +{ TriggerSocksAuthState(socksAuthFailure); Burlakov 12/11/99 } + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + end; + if FRcvCnt = 2 then begin + { Second byte is status } + if FRcvBuf[1] <> #$00 then begin +{ TriggerSocksAuthState(socksAuthFailure); Burlakov 12/11/99 } + DataAvailableError(socksAuthenticationFailed, 'socks authentication failed'); + Exit; + end; + end + else if FRcvCnt > 2 then begin +{ TriggerSocksAuthState(socksAuthFailure); Burlakov 12/11/99 } + DataAvailableError(socksProtocolError, 'too much data availaible'); + Exit; + end; + FRcvCnt := 0; { 06/03/99 } + TriggerSocksAuthState(socksAuthSuccess); + SocksDoConnect; + end + else begin + { We should never comes here ! } + DataAvailableError(socksInternalError, 'internal error'); + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSocksWSocket.GetRcvdCount : LongInt; +begin + if FSocksRcvdCnt <= 0 then + Result := inherited GetRcvdCount + else + Result := FSocksRcvdCnt; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSocksWSocket.DoRecv( + var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; +begin + if FSocksRcvdCnt <= 0 then begin + Result := inherited DoRecv(Buffer, BufferSize, Flags); + Exit; + end; + { We already have received data into our internal buffer } + if FSocksRcvdCnt <= BufferSize then begin + { User buffer is greater than received data, copy all and clear } + Move(FSocksRcvdPtr^, Buffer, FSocksRcvdCnt); + Result := FSocksRcvdCnt; + FSocksRcvdCnt := 0; + Exit; + end; + { User buffer is smaller, copy as much as possible } + Move(FSocksRcvdPtr^, Buffer, BufferSize); + Result := BufferSize; + FSocksRcvdPtr := FSocksRcvdPtr + BufferSize; + FSocksRcvdCnt := FSocksRcvdCnt - BufferSize; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + X X X X X X X X + X X X X X X + X X X X X X + X X X X X X X X + X X X X X + X X X X X + X X X X X X X X X X X + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomLineWSocket.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FLineEnd := #13#10; + FLineMode := FALSE; + FLineLimit := 65536; { Arbitrary line limit } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomLineWSocket.Destroy; +begin + if FRcvdPtr <> nil then begin + FreeMem(FRcvdPtr, FRcvBufSize); + FRcvdPtr := nil; + FRcvBufSize := 0; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + if Msg = WM_TRIGGER_DATA_AVAILABLE then begin + { We *MUST* handle all exception to avoid application shutdown } + try + WMTriggerDataAvailable(MsgRec) + except + on E:Exception do + HandleBackGroundException(E); + end; + end + else + inherited WndProc(MsgRec); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.WMTriggerDataAvailable(var msg: TMessage); +begin + while FRcvdCnt > 0 do + TriggerDataAvailable(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.SetLineMode(newValue : Boolean); +begin + if FLineMode = newValue then + Exit; + FLineMode := newValue; + if (FRcvdCnt > 0) or (FLineLength > 0) then + PostMessage(Handle, WM_TRIGGER_DATA_AVAILABLE, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomLineWSocket.GetRcvdCount : LongInt; +begin + if not FLineMode then + Result := inherited GetRcvdCount + else + Result := FLineLength; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomLineWSocket.DoRecv( + var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; +begin + if FLineMode and (FLineLength > 0) then begin + { We are in line mode an a line is received } + if FLineLength <= BufferSize then begin + { User buffer is greater than received data, copy all and clear } + Move(FRcvdPtr^, Buffer, FLineLength); + Result := FLineLength; + FLineLength := 0; + Exit; + end; + { User buffer is smaller, copy as much as possible } + Move(FRcvdPtr^, Buffer, BufferSize); + Result := BufferSize; + { Move the end of line to beginning of buffer to be read the next time } + Move(FRcvdPtr[BufferSize], FRcvdPtr^, FLineLength - BufferSize); + FLineLength := FLineLength - BufferSize; + Exit; + end; + + if FLineMode or (FRcvdCnt <= 0) then begin + { There is nothing in our internal buffer } + Result := inherited DoRecv(Buffer, BufferSize, Flags); + Exit; + end; + + { We already have received data into our internal buffer } + if FRcvdCnt <= BufferSize then begin + { User buffer is greater than received data, copy all and clear } + Move(FRcvdPtr^, Buffer, FRcvdCnt); + Result := FRcvdCnt; + FRcvdCnt := 0; + Exit; + end; + { User buffer is smaller, copy as much as possible } + Move(FRcvdPtr^, Buffer, BufferSize); + Result := BufferSize; + { Then move remaining data to front og buffer 16/10/99 } + Move(FRcvdPtr[BufferSize], FRcvdPtr^, FRcvdCnt - BufferSize + 1); + FRcvdCnt := FRcvdCnt - BufferSize; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Edit received data. Handle TAB and BACKSPACE characters. } +{ A data packet has been received into FRcvPtr buffer, starting from } +{ FRcvdCnt offset. Packet size if passed as the Len argument. } +procedure TCustomLineWSocket.EditLine(var Len : Integer); +var + Buf : PChar; + BufSize : LongInt; + I : LongInt; + J : LongInt; + Edited : Boolean; + NewCnt : LongInt; + NewSize : LongInt; +const + BackString : String = #8 + ' ' + #8; +begin + BufSize := 0; + try + Edited := FALSE; + I := FRcvdCnt; + J := FRcvdCnt; + NewCnt := FRcvdCnt; + { Loop to process all received char } + while I < (FRcvdCnt + Len) do begin + if FRcvdPtr[I] = #8 then begin { BACKSPACE character } + if FLineEcho and (J > 0) then + SendStr(BackString); + if not Edited then begin + { Not edited yet, so we allocate a buffer to store } + { edited data and we remember we edited data. } + Edited := TRUE; + { Computer buffer size as a multiple of 256 bytes } + BufSize := ((FRcvdCnt + Len + 256) shr 8) shl 8; + GetMem(Buf, BufSize); + { Copy data already processed } + Move(FRcvdPtr^, Buf^, I); + end; + if J > 0 then begin + Dec(J); + if J < NewCnt then + NewCnt := J; + end; + Inc(I); + end + else if FRcvdPtr[I] = #9 then begin { TAB character } + if not Edited then begin + { Not edited yet, so we allocate a buffer to store } + { edited data and we remember we edited data. } + Edited := TRUE; + { Computer buffer size as a multiple of 256 bytes } + BufSize := ((FRcvdCnt + Len + 256) shr 8) shl 8; + GetMem(Buf, BufSize); + { Copy data already processed } + Move(FRcvdPtr^, Buf^, I); + end; + repeat + if FLineEcho then + SendStr(' '); + Buf[J] := ' '; + Inc(J); + until (J and 7) = 0; + Inc(I); + end + else begin + if FLineEcho then + Send(@FRcvdPtr[I], 1); + if Edited then begin + if J >= BufSize then begin + { Need to allocate more buffer space } + NewSize := BufSize + 256; + {$IFDEF VER80} + Buf := ReallocMem(Buf, BufSize, NewSize); + {$ELSE} + ReallocMem(Buf, NewSize); + {$ENDIF} + BufSize := NewSize; + end; + Buf[J] := FRcvdPtr[I]; + end; + Inc(I); + Inc(J); + end; + end; + if Edited then begin + if J >= FRcvBufSize then begin + { Current buffer is too small, allocate larger } + NewSize := J + 1; + {$IFDEF VER80} + FRcvdPtr := ReallocMem(FRcvdPtr, FRcvBufSize, NewSize); + {$ELSE} + ReallocMem(FRcvdPtr, NewSize); + {$ENDIF} + FRcvBufSize := NewSize; + end; + { Move edited data back to original buffer } + Move(Buf^, FRcvdPtr^, J); + FRcvdPtr[J] := #0; + FRcvdCnt := NewCnt; + Len := J - FRcvdCnt; + end; + finally + if BufSize > 0 then + FreeMem(Buf, BufSize); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.TriggerLineLimitExceeded( + Cnt : Integer; + var ClearData : Boolean); +begin + if Assigned(FOnLineLimitExceeded) then + FOnLineLimitExceeded(Self, Cnt, ClearData); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomLineWSocket.TriggerDataAvailable(Error : Word) : Boolean; +var + Cnt : Integer; + Len : Integer; + NewSize : LongInt; + SearchFrom : LongInt; + I : LongInt; + Found : Boolean; +begin +{ if (not FLineMode) or (Length(FLineEnd) = 0) then begin } + if (not FLineMode) or (Length(FLineEnd) = 0) or (FSocksState <> socksData) + {**ALON** added check so, if data is received while still handshaking } + { with the socks server, we ask the TCustomSocksWSocket to handle it } + then begin + { We are not in line mode } + Result := inherited TriggerDataAvailable(Error); + Exit; + end; + + { We are in line mode. We receive data ourself } + + Result := TRUE; + Cnt := inherited GetRcvdCount; + { if Cnt <= 0 then } + { Exit; } + if Cnt < 0 then + Exit; + if Cnt = 0 then + Cnt := 255; + + if (FRcvdCnt + Cnt + 1) > FRcvBufSize then begin + { Current buffer is too small, allocate larger } + NewSize := FRcvdCnt + Cnt + 1; + {$IFDEF VER80} + FRcvdPtr := ReallocMem(FRcvdPtr, FRcvBufSize, NewSize); + {$ELSE} + ReallocMem(FRcvdPtr, NewSize); + {$ENDIF} + FRcvBufSize := NewSize; + end; + + Len := Receive(FRcvdPtr + FRcvdCnt, Cnt); + if Len <= 0 then + Exit; + FRcvdPtr[FRcvdCnt + Len] := #0; + if FLineEdit then + EditLine(Len) + else if FLineEcho then + Send(FRcvdPtr + FRcvdCnt, Len); + SearchFrom := FRcvdCnt - Length(FLineEnd); + if SearchFrom < 0 then + SearchFrom := 0; + FRcvdCnt := FRcvdCnt + Len; + while FLineMode do begin + Found := FALSE; + I := SearchFrom; + while I < (FRcvdCnt - Length(FLineEnd) + 1) do begin + if FRcvdPtr[I] = FLineEnd[1] then begin + Found := (StrLComp(@FRcvdPtr[I], @FLineEnd[1], Length(FLineEnd)) = 0); + if Found then + break; { Found the end of line marker } + end; + Inc(I); + end; + if not Found then begin + if ((FLineLimit > 0) and (FRcvdCnt > FLineLimit)) then begin + FLineClearData := TRUE; + TriggerLineLimitExceeded(FRcvdCnt, FLineClearData); + if FLineClearData then begin + FLineLength := 0; + FRcvdCnt := 0; + FLineClearData := FALSE; + end; + end; + break; + end; + FLineLength := I + Length(FLineEnd); + FLineReceivedFlag := TRUE; + { We received a complete line. We need to signal it to application } + { The application may not have a large buffer so we may need } + { several events to read the entire line. In the meanwhile, the } + { application may turn line mode off. } + while FLineMode and (FLineLength > 0) do begin + if not inherited TriggerDataAvailable(0) then + { There is no handler installed } + FLineLength := 0; + end; + { Move remaining data in front of buffer } + if FLineLength > 0 then begin + { Line mode was turned off in the middle of a line read. } + { We preserve unread line and other received data. } + Move(FRcvdPtr[I], FRcvdPtr[FLineLength], + FRcvdCnt - I); + FRcvdCnt := FRcvdCnt - I + FLineLength; + end + else begin + Move(FRcvdPtr[I + Length(FLineEnd)], FRcvdPtr[0], + FRcvdCnt - I - Length(FLineEnd)); + FRcvdCnt := FRcvdCnt - I - Length(FLineEnd); + end; + if FRcvdCnt >= 0 then + FRcvdPtr[FRcvdCnt] := #0; + SearchFrom := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.TriggerSessionClosed(Error : Word); +begin + FLineReceivedFlag := TRUE; + if FRcvdPtr <> nil then begin + if FLineMode and (FRcvdCnt > 0) and (not FLineClearData) then begin + FLineLength := FRcvdCnt; + while FLineMode and (FLineLength > 0) do + inherited TriggerDataAvailable(0); + end; + FreeMem(FRcvdPtr, FRcvBufSize); + FRcvdPtr := nil; + FRcvBufSize := 0; + FRcvdCnt := 0; + end; + inherited TriggerSessionClosed(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + X X X X X X X X X + X X X X X X X X X + X X X X X X X + X X X X X X X + X X X X X + X X X X X X X X + X X X X X X X X X + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSyncWSocket.InternalDataAvailable( + Sender : TObject; + Error : Word); +var + Len : Integer; +begin + SetLength(FLinePointer^, FLineLength); + Len := Receive(@FLinePointer^[1], FLineLength); + if Len <= 0 then + FLinePointer^ := '' + else + SetLength(FLinePointer^, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSyncWSocket.WaitUntilReady(var DoneFlag : Boolean) : Integer; +begin + Result := 0; { Suppose success } + FTimeStop := Integer(GetTickCount) + FTimeout; + while TRUE do begin + if DoneFlag then begin + Result := 0; + break; + end; + + if ((FTimeout > 0) and (Integer(GetTickCount) > FTimeStop)) or +{$IFNDEF NOFORMS} + Application.Terminated or +{$ENDIF} + FTerminated then begin + { Application is terminated or timeout occured } + Result := WSA_WSOCKET_TIMEOUT; + break; + end; + MessagePump; +{$IFNDEF VER80} + { Do not use 100% CPU, but slow down transfert on high speed LAN } + Sleep(0); +{$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSyncWSocket.Synchronize( + Proc : TWSocketSyncNextProc; + var DoneFlag : Boolean) : Integer; +begin + DoneFlag := FALSE; + if Assigned(Proc) then + Proc; + Result := WaitUntilReady(DoneFlag); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSyncWSocket.ReadLine( + Timeout : Integer; { seconds if positive, milli-seconds if negative } + var Buffer : String); +var + OldDataAvailable : TDataAvailable; + OldLineMode : Boolean; + Status : Integer; +begin + Buffer := ''; + if FState <> wsConnected then begin + RaiseException('ReadLine failed: not connected'); + Exit; + end; + + { Positive timeout means seconds. Negative means milli-seconds } + { Null means 60 seconds. } + if TimeOut = 0 then + FTimeOut := 60000 + else if TimeOut > 0 then + FTimeOut := Timeout * 1000 + else + FTimeOut := -Timeout; + + FLineReceivedFlag := FALSE; + FLinePointer := @Buffer; + { Save existing OnDataAvailable handler and install our own } + OldDataAvailable := FOnDataAvailable; + FOnDataAvailable := InternalDataAvailable; + { Save existing line mode and turn it on } + OldLineMode := FLineMode; + FLineMode := TRUE; + try + Status := Synchronize(nil, FLineReceivedFlag); + if Status = WSA_WSOCKET_TIMEOUT then begin + { Sender didn't send line end within allowed time. Get all } + { data available so far. } + if FRcvdCnt > 0 then begin + SetLength(Buffer, FRcvdCnt); + Move(FRcvdPtr^, Buffer[1], FRcvdCnt); + FRcvdCnt := 0; + end; + end; + { Should I raise an exception to tell the application that } + { some error occured ? } + finally + FOnDataAvailable := OldDataAvailable; + FLineMode := OldLineMode; + end; +end; + + +{$IFDEF VER80} +begin + IPList := TStringList.Create; + { + Delphi 1 has no finalization. When your application terminates, you + should add a call to WSocketUnloadWinsock to unload winsock from memory. + It is done automatically for you when the last TWSocket component is + destroyed but if you do any winsock call after that, you must call + WSocketUnloadWinsock yourself. It is safe to call WSocketUnloadWinsock + even if it has already been done. + } +{$ELSE} +initialization + IPList := TStringList.Create; + +finalization + if Assigned(IPList) then begin + IPList.Destroy; + IPList := nil; + end; + WSocketUnloadWinsock; + +{$ENDIF} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/WSocketE.pas b/lib/ics/Delphi/Vc32/WSocketE.pas new file mode 100644 index 00000000..9e69b50b --- /dev/null +++ b/lib/ics/Delphi/Vc32/WSocketE.pas @@ -0,0 +1,172 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TWSocket class encapsulate the Windows Socket paradigm +Creation: Feb 24, 2002 +Version: 1.00 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Feb 24, 2002 V1.00 Wilfried Mestdagh created a + property editor for LineEnd property. I moved his code ti this + new unit so that it is compatible with Delphi 6. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WSocketE; + +interface + +uses + WinTypes, WinProcs, Classes, +{$IFNDEF VER80} { Delphi 1 } +{$IFNDEF VER90} { Delphi 2 } +{$IFNDEF VER100} { Delphi 3 } +{$IFNDEF VER120} { Delphi 4 } +{$IFNDEF VER130} { Delphi 5 } +{$IFNDEF VER140} { Delphi 6 and Bcb 6} +{$IFNDEF VER93} { Bcb 1 } +{$IFNDEF VER110} { Bcb 3 } +{$IFNDEF VER125} { Bcb 4 } +{$IFNDEF VER135} { Bcb 5 } +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} + +{$IFDEF VER140} + { Delphi 6: Add $(DELPHI)\Source\ToolsAPI to your library path } + { and add designide.dcp to ICS package. } + DesignIntf, DesignEditors, +{$ELSE} +{$IFDEF VER150} + { Delphi 7: Add $(DELPHI)\Source\ToolsAPI to your library path } + { and add designide.dcp to ICS package. } + DesignIntf, DesignEditors, +{$ELSE} + DsgnIntf, +{$ENDIF} +{$ENDIF} + SysUtils; + +type + TWSocketLineEndProperty = class(TStringProperty) + public + function GetLineEnd(const Value: String): String; + function SetLineEnd(const Value: String): String; + function GetValue: String; override; + procedure SetValue(const Value: String); override; + end; + +procedure Register; + +implementation + +uses + WSocket; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TWSocket]); + RegisterPropertyEditor(TypeInfo(string), TWSocket, 'LineEnd', + TWSocketLineEndProperty); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ LineEnd Property Editor } +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TWSocketLineEndProperty.SetLineEnd(const Value: String): String; +var + Offset : Integer; + C : Char; +begin + if Pos('#', Value) = 0 then + raise Exception.Create('Invalid value'); + + Offset := 1; + Result := ''; + repeat + if Value[Offset] <> '#' then + break; + + Inc(Offset); + C := #0; + while (Offset <= Length(Value)) and + (Value[Offset] in ['0'..'9']) do begin + C := Char(Ord(C) * 10 + Ord(Value[Offset]) - Ord('0')); + Inc(Offset); + end; + + Result := Result + C; + until Offset > Length(Value); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TWSocketLineEndProperty.GetLineEnd(const Value: String): String; +var + N: integer; +begin + Result := ''; + for N := 1 to Length(Value) do + Result := Result + '#' + IntToStr(Ord(Value[N])); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TWSocketLineEndProperty.GetValue: String; +begin + Result := GetLineEnd(inherited GetValue); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWSocketLineEndProperty.SetValue(const Value: String); +begin + inherited SetValue(SetLineEnd(Value)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. diff --git a/lib/ics/Delphi/Vc32/WSocketS.dcr b/lib/ics/Delphi/Vc32/WSocketS.dcr new file mode 100644 index 00000000..645f59f0 Binary files /dev/null and b/lib/ics/Delphi/Vc32/WSocketS.dcr differ diff --git a/lib/ics/Delphi/Vc32/WSocketS.dcu b/lib/ics/Delphi/Vc32/WSocketS.dcu new file mode 100644 index 00000000..d9d5ab4a Binary files /dev/null and b/lib/ics/Delphi/Vc32/WSocketS.dcu differ diff --git a/lib/ics/Delphi/Vc32/WSocketS.pas b/lib/ics/Delphi/Vc32/WSocketS.pas new file mode 100644 index 00000000..b07adabf --- /dev/null +++ b/lib/ics/Delphi/Vc32/WSocketS.pas @@ -0,0 +1,456 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: A TWSocket that has server functions: it listen to connections + an create other TWSocket to handle connection for each client. +Creation: Aug 29, 1999 +Version: 1.07 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1999-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Quick reference guide: +TWSocketServer will normally be used to listen on a given tcp port. When a +client connect, it will instanciate a new TWSocketClient component to handle +communication with client. Normally you will derive your own component from +TWSocketClient to add private data and methods to handle it. You tell +TWSocketServer which component it has to instanciate using ClientClass +property. You have to initialize instances from OnClientConnect event handler. +TWSocketServer maintain a list of connected clients. You can access it using +Client[] indexed property and ClientCount property. + +History: +Sep 05, 1999 V1.01 Adpted for Delphi 1 +Oct 09, 1999 V1.02 Added intermediate class TCustomWSocket +Nov 12, 1999 V1.03 Added OnClientCreate event just after client component has + been created. +Apr 02, 2000 V1.04 Added FSessionClosedFlag to avoid double SessionClosed + event triggering +Apr 13, 2002 V1.05 When sending banner to client, add LineEnd instead of CR/LF + as suggested by David Aguirre Grazio +Sep 13, 2002 V1.06 Check if Assigned(Server) in TriggerSessionClosed. + Reported by Matthew Meadows +Sep 16, 2002 V1.07 Fixed a Delphi 1 issue in TriggerSessionClosed where + property was used in place of field variable. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WSocketS; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, Winsock; + +const + WSocketServerVersion = 107; + CopyRight : String = ' TWSocketServer (c) 1999-2002 F. Piette V1.07 '; + WM_CLIENT_CLOSED = WM_USER + 30; + DefaultBanner = 'Welcome to TcpSrv'; + +type + TCustomWSocketServer = class; + TWSocketClient = class; + TWSocketClientClass = class of TWSocketClient; + + TWSocketClientCreateEvent = procedure (Sender : TObject; + Client : TWSocketClient) of object; + + TWSocketClientConnectEvent = procedure (Sender : TObject; + Client : TWSocketClient; + Error : Word) of object; + + { TWSocketClient is used to handle all client connections. } + { Altough you may use it directly, you'll probably wants to use your } + { own derived component to add data and methods suited to your } + { application. } + { If you use a derived component, then assign it's class to } + { TWSocketServer ClientClass property. } + TWSocketClient = class(TWSocket) + protected + FBanner : String; + FServer : TCustomWSocketServer; + FPeerAddr : String; + FPeerPort : String; + FSessionClosedFlag : Boolean; + public + procedure StartConnection; virtual; + procedure TriggerSessionClosed(Error : Word); override; + procedure Dup(newHSocket : TSocket); override; + function GetPeerAddr: String; override; + function GetPeerPort: String; override; + property Server : TCustomWSocketServer read FServer + write FServer; + published + property Banner : String read FBanner + write FBanner; + end; + + { TWSocketServer is made for listening for tcp client connections. } + { For each connection, it instanciate a new TWSocketClient (or derived) } + { to handle connection. Use ClientClass to specify your derived. } + TCustomWSocketServer = class(TWSocket) + protected + FBanner : String; + FBannerToBusy : String; + FClientClass : TWSocketClientClass; + FClientList : TList; + FClientNum : LongInt; + FMaxClients : LongInt; + FOnClientCreate : TWSocketClientCreateEvent; + FOnClientConnect : TWSocketClientConnectEvent; + FOnClientDisconnect : TWSocketClientConnectEvent; + procedure WndProc(var MsgRec: TMessage); override; + procedure Notification(AComponent: TComponent; operation: TOperation); override; + procedure TriggerSessionAvailable(Error : Word); override; + procedure TriggerClientCreate(Client : TWSocketClient); virtual; + procedure TriggerClientConnect(Client : TWSocketClient; Error : Word); virtual; + procedure TriggerClientDisconnect(Client : TWSocketClient; Error : Word); virtual; + function GetClientCount : Integer; virtual; + function GetClient(nIndex : Integer) : TWSocketClient; virtual; + procedure WMClientClosed(var msg: TMessage); + message WM_CLIENT_CLOSED; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + { Check if a given object is one of our clients } + function IsClient(SomeThing : TObject) : Boolean; + protected + { TWSocketClient derived class to instanciate for each client } + property ClientClass : TWSocketClientClass + read FClientClass + write FClientClass; + { How many active clients we currently have } + property ClientCount : Integer read GetClientCount; + { Client[] give direct access to anyone of our clients } + property Client[nIndex : Integer] : TWSocketClient + read GetClient; + published + { Banner sent to client as welcome message. Can be empty. } + property Banner : String read FBanner + write FBanner; + property BannerToBusy : String read FBannerToBusy + write FBannerToBusy; + property MaxClients : LongInt read FMaxClients + write FMaxClients; + { Triggered when a client disconnect } + property OnClientDisconnect : TWSocketClientConnectEvent + read FOnClientDisconnect + write FOnClientDisconnect; + { Triggerred when a new client is connecting } + property OnClientConnect : TWSocketClientConnectEvent + read FOnClientConnect + write FOnClientConnect; + { Triggerred when a new client component has been created } + property OnClientCreate : TWSocketClientCreateEvent + read FOnClientCreate + write FOnClientCreate; + end; + + TWSocketServer = class(TCustomWSocketServer) + public + property ClientClass; + property ClientCount; + property Client; + published + property Banner; + property BannerToBusy; + property MaxClients; + property OnClientDisconnect; + property OnClientConnect; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TWSocketServer]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomWSocketServer.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FClientList := TList.Create; + FClientClass := TWSocketClient; + FBanner := DefaultBanner; + FBannerToBusy := 'Sorry, too many clients'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomWSocketServer.Destroy; +var + I : Integer; +begin + if Assigned(FClientList) then begin + { We need to destroy all clients } + for I := FClientList.Count - 1 downto 0 do begin + try + TWSocketClient(FClientList.Items[I]).Destroy; + except + { Ignore any exception here } + end; + end; + { Then we can destroy client list } + FClientList.Free; + FClientList := nil; + end; + { And finally destroy ourself } + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Message handler } +procedure TCustomWSocketServer.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + if Msg = WM_CLIENT_CLOSED then begin + { We *MUST* handle all exception to avoid application shutdown } + try + WMClientClosed(MsgRec) + except + on E:Exception do + HandleBackGroundException(E); + end; + end + else + inherited WndProc(MsgRec); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Called by destructor when child component (a clients) is create or } +{ destroyed. } +procedure TCustomWSocketServer.Notification( + AComponent : TComponent; + Operation : TOperation); +begin + inherited Notification(AComponent, Operation); + if Assigned(FClientList) and (AComponent is TWSocketClient) then begin + if Operation = opInsert then + { A new client has been created, add it to our list } + FClientList.Add(AComponent) + else if Operation = opRemove then + { If one of our client has been destroyed, remove it from our list } + FClientList.Remove(AComponent); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Called when a session is available, that is when a client is connecting } +procedure TCustomWSocketServer.TriggerSessionAvailable(Error : Word); +var + Client : TWSocketClient; +begin + { Call parent event handler } + inherited TriggerSessionAvailable(Error); + { In case of error, do nothing } + if Error <> 0 then + Exit; + + Inc(FClientNum); + Client := FClientClass.Create(Self); + TriggerClientCreate(Client); + Client.Name := Name + 'Client' + IntToStr(FClientNum); + Client.Banner := FBanner; + Client.Server := Self; + Client.HSocket := Accept; + TriggerClientConnect(Client, Error); + { The event handler may have destroyed the client ! } + if FClientList.IndexOf(Client) < 0 then + Exit; + { The event handler may have closed the connection } + if Client.State <> wsConnected then + Exit; + { Ok, the client is still there, process with the connection } + if (FMaxClients > 0) and (FMaxClients < ClientCount) then begin + { Sorry, toomuch clients } + Client.Banner := FBannerToBusy; + Client.StartConnection; + Client.Close; + end + else + Client.StartConnection; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocketServer.TriggerClientConnect( + Client : TWSocketClient; Error : Word); +begin + if Assigned(FOnClientConnect) then + FOnClientConnect(Self, Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocketServer.TriggerClientCreate(Client : TWSocketClient); +begin + if Assigned(FOnClientCreate) then + FOnClientCreate(Self, Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocketServer.TriggerClientDisconnect( + Client : TWSocketClient; Error : Word); +begin + if Assigned(FOnClientDisconnect) then + FOnClientDisconnect(Self, Client, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ get number of connect clients } +function TCustomWSocketServer.GetClientCount : Integer; +begin + if Assigned(FClientList) then + Result := FClientList.Count + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Acces method to return a client by index. } +{ Return nil if index is out of range. } +function TCustomWSocketServer.GetClient(nIndex : Integer) : TWSocketClient; +begin + if not Assigned(FClientList) then begin + Result := nil; + Exit; + end; + if (nIndex < 0) or (nIndex >= FClientList.Count) then begin + Result := nil; + Exit; + end; + Result := TWSocketClient(FClientList.Items[nIndex]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Client has closed. Remove it from client list and destroy component. } +procedure TCustomWSocketServer.WMClientClosed(var msg: TMessage); +var + Client : TWSocketClient; +begin + Client := TWSocketClient(Msg.LParam); + try + TriggerClientDisconnect(Client, Error); + finally + { Calling Destroy will automatically remove client from list because } + { we installed a notification handler. } + Client.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check if a given object is one of our clients. } +function TCustomWSocketServer.IsClient(SomeThing : TObject) : Boolean; +begin + if not Assigned(FClientList) then + Result := FALSE + else + Result := (FClientList.IndexOf(Pointer(SomeThing)) >= 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* *} +{* TWSocketClient *} +{* *} +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWSocketClient.StartConnection; +begin + if Length(FBanner) > 0 then + SendStr(FBanner + FLineEnd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Triggered when socket is closed. Need to inform server socket to update } +{ client list and trigger client disconnect event. } +procedure TWSocketClient.TriggerSessionClosed(Error : Word); +begin + if not FSessionClosedFlag then begin + FSessionClosedFlag := TRUE; + if Assigned(FServer) then + PostMessage(Server.Handle, WM_CLIENT_CLOSED, 0, LongInt(Self)); + inherited TriggerSessionClosed(Error); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This override base class GetPeerAddr. It return cached value. } +function TWSocketClient.GetPeerAddr: String; +begin + Result := FPeerAddr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This override base class GetPeerPort. It return cached value. } +function TWSocketClient.GetPeerPort: String; +begin + Result := FPeerPort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Override base class. Dup is called when a client is assigned to a } +{ TWSocket. Assigning HSocket property will call Dup. } +procedure TWSocketClient.Dup(newHSocket : TSocket); +begin + inherited Dup(newHSocket); + { Cache PeerAddr value } + FPeerAddr := inherited GetPeerAddr; + FPeerPort := inherited GetPeerPort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/emulvt.dcr b/lib/ics/Delphi/Vc32/emulvt.dcr new file mode 100644 index 00000000..ffa22ae4 Binary files /dev/null and b/lib/ics/Delphi/Vc32/emulvt.dcr differ diff --git a/lib/ics/Delphi/Vc32/emulvt.dcu b/lib/ics/Delphi/Vc32/emulvt.dcu new file mode 100644 index 00000000..a12781a8 Binary files /dev/null and b/lib/ics/Delphi/Vc32/emulvt.dcu differ diff --git a/lib/ics/Delphi/Vc32/emulvt.pas b/lib/ics/Delphi/Vc32/emulvt.pas new file mode 100644 index 00000000..a0cf732c --- /dev/null +++ b/lib/ics/Delphi/Vc32/emulvt.pas @@ -0,0 +1,4006 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: EMULVT.PAS +Description: Delphi component which does Ansi terminal emulation + Not every escape sequence is implemented, but a large subset. +Author: Franois PIETTE +Creation: May, 1996 +Version: 2.19 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1997-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jul 22, 1997 Some optimization + Adapted to Delphi 3 +Sep 05, 1997 Version 2.01 +Dec 16, 1997 V2.02 Corrected a bug int the paint routine which caused GDI + resource leak when color was used. +Feb 24, 1998 V2.03 Added AddFKey function +Jul 15, 1998 V2.04 Adapted to Delphi 4 (moved DoKeyBuffer to protected section) +Dec 04, 1998 V2.05 Added 'single char paint' and 'char zoom' features. +Dec 09, 1998 V2.10 Added graphic char drawing using graphic primitives + Added (with permission) scroll back code developed by Steve + Endicott +Dec 21, 1998 V2.11 Corrected some screen update problems related to scrollback. + Added fixes from Steve Endicott. + Beautified code. +Mar 14, 1999 V2.12 Added OnKeyDown event. + Corrected a missing band at right of screen when painting. +Aug 15, 1999 V2.13 Moved KeyPress procedure to public section for BCB4 compat. +Aug 20, 1999 V2.14 Added compile time options. Revised for BCB4. +Nov 12, 1999 V2.15 Corrected display attribute error in delete line. + Checked for range in SetLines/GetLine +Aug 09, 2000 V2.16 Wilfried Mestdagh" and + Steve Endicott corrected a + bug related to scroll back buffer. See WM + SE 09/08/00 + tags in code. +Jul 28, 2001 V2.17 Made FCharPos and FLinePos member variables instead of + global to avoid conflict when sevaral components are used + simultaneously. Suggested by Jeroen Cranendonk + +Jan 03, 2002 V2.19 Don't adjust scroll bar if not visible + Make properties with TopMargin, LeftMargin, RightMargin, + BottomMargin. +Jan 10, 2002 V2.19 Fixed SetLineHeight to fill FLinePos up to last item. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit EmulVT; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +{$DEFINE SINGLE_CHAR_PAINT} +{$DEFINE CHAR_ZOOM} + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, ClipBrd; + +const + EmulVTVersion = 219; + CopyRight : String = ' TEmulVT (c) 1996-2002 F. Piette V2.19 '; + MAX_ROW = 50; + MAX_COL = 160; + NumPaletteEntries = 16; + +type + TBackColors = (vtsBlack, vtsRed, vtsGreen, vtsYellow, + vtsBlue, vtsMagenta, vtsCyan, vtsWhite); + + TScreenOption = (vtoBackColor, vtoCopyBackOnClear); + TScreenOptions = set of TScreenOption; + TXlatTable = array [0..255] of char; + PXlatTable = ^TXlatTable; + TFuncKeyValue = String[50]; + PFuncKeyValue = ^TFuncKeyValue; + TFuncKey = record + ScanCode : Char; + Shift : TShiftState; + Ext : Boolean; + Value : TFuncKeyValue; + end; + TFuncKeysTable = array [0..63] of TFuncKey; + PFuncKeysTable = ^TFuncKeysTable; + TKeyBufferEvent = procedure (Sender : TObject; Buffer : PChar; Len : Integer) of object; + TKeyDownEvent = procedure (Sender : TObject; + var VirtKey : Integer; + var Shift : TShiftState; + var ShiftLock : Boolean; + var ScanCode : Char; + var Ext : Boolean) of object; + + +type + { TLine is an object used to hold one line of text on screen } + TLine = class(TObject) + public + Txt : array [0..MAX_COL] of Char; + Att : array [0..MAX_COL] of Byte; + constructor Create; + procedure Clear(Attr : Byte); + end; + TLineArray = array [0..16382] of TLine; + PLineArray = ^TLineArray; + + { TScreen is an object to hold an entire screen of line and handle } + { Ansi escape sequences to update this virtual screen } + TScreen = class(TObject) + public + FLines : PLineArray; + FRow : Integer; + FCol : Integer; + FRowSaved : Integer; + FColSaved : Integer; + FScrollRowTop : Integer; + FScrollRowBottom : Integer; + FAttribute : Byte; + FForceHighBit : Boolean; + FReverseVideo : Boolean; + FUnderLine : Boolean; + FRowCount : Integer; + FColCount : Integer; + FBackRowCount : Integer; + FBackEndRow : Integer; + FBackColor : TBackColors; + FOptions : TScreenOptions; + FEscBuffer : String[80]; + FEscFlag : Boolean; + Focused : Boolean; + FAutoLF : Boolean; + FAutoCR : Boolean; + FAutoWrap : Boolean; + FCursorOff : Boolean; + FCKeyMode : Boolean; + FNoXlat : Boolean; + FNoXlatInitial : Boolean; + FCntLiteral : Integer; + FCarbonMode : Boolean; + FXlatInputTable : PXlatTable; + FXlatOutputTable : PXlatTable; + FCharSetG0 : Char; + FCharSetG1 : Char; + FCharSetG2 : Char; + FCharSetG3 : Char; + FAllInvalid : Boolean; + FInvRect : TRect; + FOnCursorVisible : TNotifyEvent; + constructor Create; + destructor Destroy; override; + procedure AdjustFLines(NewCount : Integer); + procedure CopyScreenToBack; + procedure SetRowCount(NewCount : Integer); + procedure SetBackRowCount(NewCount : Integer); + procedure InvRect(nRow, nCol : Integer); + procedure InvClear; + procedure SetLines(I : Integer; Value : TLine); + function GetLines(I : Integer) : TLine; + procedure WriteChar(Ch : Char); + procedure WriteStr(Str : String); + function ReadStr : String; + procedure GotoXY(X, Y : Integer); + procedure WriteLiteralChar(Ch : Char); + procedure ProcessEscape(EscCmd : Char); + procedure SetAttr(Att : Char); + procedure CursorRight; + procedure CursorLeft; + procedure CursorDown; + procedure CursorUp; + procedure CarriageReturn; + procedure ScrollUp; + procedure ScrollDown; + procedure ClearScreen; + procedure BackSpace; + procedure Eol; + procedure Eop; + procedure ProcessESC_D; { Index } + procedure ProcessESC_M; { Reverse index } + procedure ProcessESC_E; { Next line } + procedure ProcessCSI_u; { Restore Cursor } + procedure ProcessCSI_I; { Select IBM char set } + procedure ProcessCSI_J; { Clear the screen } + procedure ProcessCSI_K; { Erase to End of Line } + procedure ProcessCSI_L; { Insert Line } + procedure ProcessCSI_M; { Delete Line } + procedure ProcessCSI_m_lc; { Select Attributes } + procedure ProcessCSI_n_lc; { Cursor position report } + procedure ProcessCSI_at; { Insert character } + procedure ProcessCSI_r_lc; { Scrolling margins } + procedure ProcessCSI_s_lc; { Save cursor location } + procedure ProcessCSI_u_lc; { Restore cursor location } + procedure ProcessCSI_7; { Save cursor location } + procedure ProcessCSI_8; { Restore cursor location } + procedure ProcessCSI_H; { Set Cursor Position } + procedure ProcessCSI_h_lc; { Terminal mode set } + procedure ProcessCSI_l_lc; { Terminal mode reset } + procedure ProcessCSI_A; { Cursor Up } + procedure ProcessCSI_B; { Cursor Down } + procedure ProcessCSI_C; { Cursor Right } + procedure ProcessCSI_D; { Cursor Left } + procedure ProcessCSI_P; { Delete Character } + procedure ProcessCSI_S; { Scroll up } + procedure ProcessCSI_T; { Scroll down } + procedure process_charset_G0(EscCmd : Char);{ G0 character set } + procedure process_charset_G1(EscCmd : Char);{ G1 character set } + procedure process_charset_G2(EscCmd : Char);{ G2 character set } + procedure process_charset_G3(EscCmd : Char);{ G3 character set } + procedure UnimplementedEscape(EscCmd : Char); + procedure InvalidEscape(EscCmd : Char); + function GetEscapeParam(From : Integer; var Value : Integer) : Integer; + property OnCursorVisible : TNotifyEvent read FonCursorVisible + write FOnCursorVisible; + property Lines[I : Integer] : TLine read GetLines write SetLines; + end; + + { TCustomEmulVT is an visual component wich does the actual display } + { of a TScreen object wich is the virtual screen } + { No property is published. See TEmulVT class } + TCustomEmulVT = class(TCustomControl) + private + FCharPos : array [0..MAX_COL + 1] of integer; + FLinePos : array [0..MAX_ROW + 1] of integer; + FFileHandle : TextFile; + FCursorVisible : Boolean; + FCaretShown : Boolean; + FCaretCreated : Boolean; + FLineHeight : Integer; + FLineZoom : Single; + FCharWidth : Integer; + FCharZoom : Single; + FGraphicDraw : Boolean; + FInternalLeading : Integer; + FBorderStyle : TBorderStyle; + FBorderWidth : Integer; + FAutoRepaint : Boolean; + FFont : TFont; + FVScrollBar : TScrollBar; + FTopLine : Integer; + FLocalEcho : Boolean; + FOnKeyBuffer : TKeyBufferEvent; + FOnKeyDown : TKeyDownEvent; + FFKeys : Integer; + FMonoChrome : Boolean; + FLog : Boolean; + FAppOnMessage : TMessageEvent; + FFlagCirconflexe : Boolean; + FFlagTrema : Boolean; + FSelectRect : TRect; + FTopMargin : Integer; + FLeftMargin : Integer; + FRightMargin : Integer; + FBottomMargin : Integer; + FPal : HPalette; + FPaletteEntries : array[0..NumPaletteEntries - 1] of TPaletteEntry; + FMarginColor : Integer; + procedure WMPaint(var Message: TWMPaint); message WM_PAINT; + procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; + procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; + procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; + procedure WMPaletteChanged(var Message : TMessage); message WM_PALETTECHANGED; + procedure VScrollBarScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); + procedure SetCaret; + procedure AdjustScrollBar; + function ProcessFKeys(ScanCode: Char; Shift: TShiftState; Ext: Boolean) : Boolean; + function FindFKeys(ScanCode: Char; Shift: TShiftState; + Ext: Boolean) : PFuncKeyValue; + procedure CursorVisibleEvent(Sender : TObject); + procedure SetFont(Value : TFont); + procedure SetAutoLF(Value : Boolean); + procedure SetAutoCR(Value : Boolean); + procedure SetXlat(Value : Boolean); + procedure SetLog(Value : Boolean); + procedure SetRows(Value : Integer); + procedure SetCols(Value : Integer); + procedure SetBackRows(Value : Integer); + procedure SetTopLine(Value : Integer); + procedure SetBackColor(Value : TBackColors); + procedure SetOptions(Value : TScreenOptions); + procedure SetLineHeight(Value : Integer); + function GetAutoLF : Boolean; + function GetAutoCR : Boolean; + function GetXlat : Boolean; + function GetRows : Integer; + function GetCols : Integer; + function GetBackRows : Integer; + function GetBackColor : TBackColors; + function GetOptions : TScreenOptions; + procedure SetMarginColor(const Value: Integer); + procedure SetLeftMargin(const Value: Integer); + procedure SetBottomMargin(const Value: Integer); + procedure SetRightMargin(const Value: Integer); + procedure SetTopMargin(const Value: Integer); + protected + FScreen : TScreen; + procedure AppMessageHandler(var Msg: TMsg; var Handled: Boolean); + procedure DoKeyBuffer(Buffer : PChar; Len : Integer); virtual; + procedure PaintGraphicChar(DC : HDC; + X, Y : Integer; + rc : PRect; + ch : Char); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure ShowCursor; + procedure SetCursor(Row, Col : Integer); + procedure WriteChar(Ch : Char); + procedure WriteStr(Str : String); + procedure WriteBuffer(Buffer : Pointer; Len : Integer); + function ReadStr : String; + procedure CopyHostScreen; + procedure Clear; + procedure UpdateScreen; + function SnapPixelToRow(Y : Integer) : Integer; + function SnapPixelToCol(X : Integer) : Integer; + function PixelToRow(Y : Integer) : Integer; + function PixelToCol(X : Integer) : Integer; + procedure MouseToCell(X, Y: Integer; var ACol, ARow: Longint); + procedure SetLineZoom(newValue : Single); + procedure SetCharWidth(newValue : Integer); + procedure SetCharZoom(newValue : Single); + procedure KeyPress(var Key: Char); override; + property LineZoom : Single read FLineZoom write SetLineZoom; + property CharWidth : Integer read FCharWidth write SetCharWidth; + property CharZoom : Single read FCharZoom write SetCharZoom; + property GraphicDraw : Boolean read FGraphicDraw write FGraphicDraw; + property TopLine : Integer read FTopLine write SetTopLine; + property VScrollBar : TScrollBar read FVScrollBar; + property TopMargin : Integer read FTopMargin write SetTopMargin; + property LeftMargin : Integer read FLeftMargin write SetLeftMargin; + property RightMargin : Integer read FRightMargin write SetRightMargin; + property BottomMargin : Integer read FBottomMargin write SetBottomMargin; + property MarginColor : Integer read FMarginColor write SetMarginColor; + private + procedure PaintOneLine(DC: HDC; Y, Y1 : Integer; const Line : TLine; + nColFrom : Integer; nColTo : Integer; Blank : Boolean); + procedure SetupFont; + property Text : String read ReadStr write WriteStr; + property OnMouseMove; + property OnMouseDown; + property OnMouseUp; + property OnClick; + property OnKeyPress; + property OnKeyBuffer : TKeyBufferEvent read FOnKeyBuffer write FOnKeyBuffer; + property OnKeyDown : TKeyDownEvent read FOnKeyDown write FOnKeyDown; + property Ctl3D; + property Align; + property TabStop; + property TabOrder; + property BorderStyle: TBorderStyle read FBorderStyle write FBorderStyle; + property AutoRepaint : Boolean read FAutoRepaint write FAutoRepaint; + property Font : TFont read FFont write SetFont; + property LocalEcho : Boolean read FLocalEcho write FLocalEcho; + property AutoLF : Boolean read GetAutoLF write SetAutoLF; + property AutoCR : Boolean read GetAutoCR write SetAutoCR; + property Xlat : Boolean read GetXlat write SetXlat; + property MonoChrome : Boolean read FMonoChrome write FMonoChrome; + property Log : Boolean read FLog write SetLog; + property Rows : Integer read GetRows write SetRows; + property Cols : Integer read GetCols write SetCols; + property LineHeight : Integer read FLineHeight write SetLineHeight; + property FKeys : Integer read FFKeys write FFKeys; + property SelectRect : TRect read FSelectRect write FSelectRect; + property BackRows : Integer read GetBackRows write SetBackRows; + property BackColor : TBackColors read GetBackColor write SetBackColor; + property Options : TScreenOptions read GetOptions write SetOptions; + end; + + { Same as TCustomEmulVT, but with published properties } + TEmulVT = class(TCustomEmulVT) + public + property Screen : TScreen read FScreen; + property SelectRect; + property Text; + published + property OnMouseMove; + property OnMouseDown; + property OnMouseUp; + property OnClick; + property OnKeyPress; + property OnKeyDown; + property OnKeyBuffer; + property Ctl3D; + property Align; + property BorderStyle; + property AutoRepaint; + property Font; + property LocalEcho; + property AutoLF; + property AutoCR; + property Xlat; + property MonoChrome; + property Log; + property Rows; + property Cols; + property BackRows; + property BackColor; + property Options; + property LineHeight; + property CharWidth; + property TabStop; + property TabOrder; + property FKeys; + property TopMargin; + property LeftMargin; + property RightMargin; + property BottomMargin; + property MarginColor; + end; + +const + F_BLACK = $00; + F_BLUE = $01; + F_GREEN = $02; + F_CYAN = $03; + F_RED = $04; + F_MAGENTA = $05; + F_BROWN = $06; + F_WHITE = $07; + + B_BLACK = $00; + B_BLUE = $01; + B_GREEN = $02; + B_CYAN = $03; + B_RED = $04; + B_MAGENTA = $05; + B_BROWN = $06; + B_WHITE = $07; + + F_INTENSE = $08; + B_BLINK = $80; + + { Function keys (SCO Console) } + FKeys1 : TFuncKeysTable = ( + (ScanCode: #$48; Shift: []; Ext: TRUE ; Value: #$1B + '[A'), { UP } + (ScanCode: #$50; Shift: []; Ext: TRUE ; Value: #$1B + '[B'), { DOWN } + (ScanCode: #$4D; Shift: []; Ext: TRUE ; Value: #$1B + '[C'), { RIGHT } + (ScanCode: #$4B; Shift: []; Ext: TRUE ; Value: #$1B + '[D'), { LEFT } + (ScanCode: #$49; Shift: []; Ext: TRUE ; Value: #$1B + '[I'), { PREV } + (ScanCode: #$51; Shift: []; Ext: TRUE ; Value: #$1B + '[G'), { NEXT } + (ScanCode: #$47; Shift: []; Ext: TRUE ; Value: #$1B + '[H'), { HOME } + (ScanCode: #$4F; Shift: []; Ext: TRUE ; Value: #$1B + '[F'), { END } + (ScanCode: #$52; Shift: []; Ext: TRUE ; Value: #$1B + '[L'), { INS } + (ScanCode: #$0F; Shift: []; Ext: FALSE; Value: #$1B + '[Z'), { RTAB } + (ScanCode: #$53; Shift: []; Ext: TRUE ; Value: #$7F ), { DEL } + (ScanCode: #$3B; Shift: []; Ext: FALSE; Value: #$1B + '[M'), { F1 } + (ScanCode: #$3C; Shift: []; Ext: FALSE; Value: #$1B + '[N'), + (ScanCode: #$3D; Shift: []; Ext: FALSE; Value: #$1B + '[O'), + (ScanCode: #$3E; Shift: []; Ext: FALSE; Value: #$1B + '[P'), + (ScanCode: #$3F; Shift: []; Ext: FALSE; Value: #$1B + '[Q'), + (ScanCode: #$40; Shift: []; Ext: FALSE; Value: #$1B + '[R'), + (ScanCode: #$41; Shift: []; Ext: FALSE; Value: #$1B + '[S'), + (ScanCode: #$42; Shift: []; Ext: FALSE; Value: #$1B + '[T'), + (ScanCode: #$43; Shift: []; Ext: FALSE; Value: #$1B + '[U'), + (ScanCode: #$44; Shift: []; Ext: FALSE; Value: #$1B + '[V'), { F10 } + (ScanCode: #$85; Shift: []; Ext: FALSE; Value: #$1B + '[W'), { F11 } + (ScanCode: #$86; Shift: []; Ext: FALSE; Value: #$1B + '[X'), { F12 } + (ScanCode: #$3B; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[V'),{ SF1 should be 'Y' } + (ScanCode: #$3C; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[Z'), + (ScanCode: #$3D; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[a'), + (ScanCode: #$3E; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[b'), + (ScanCode: #$3F; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[c'), + (ScanCode: #$40; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[d'), + (ScanCode: #$41; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[e'), + (ScanCode: #$42; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[f'), + (ScanCode: #$43; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[g'), + (ScanCode: #$44; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[h'), + (ScanCode: #$85; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[i'), + (ScanCode: #$86; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[j'),{ SF10 } + (ScanCode: #$3B; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[k'), { CF1 } + (ScanCode: #$3C; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[l'), + (ScanCode: #$3D; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[m'), + (ScanCode: #$3E; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[n'), + (ScanCode: #$3F; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[o'), + (ScanCode: #$40; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[p'), + (ScanCode: #$41; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[q'), + (ScanCode: #$42; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[r'), + (ScanCode: #$43; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[s'), + (ScanCode: #$44; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[t'), + (ScanCode: #$85; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[u'), + (ScanCode: #$86; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[v'), { CF12 } + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ) + ); + +{ Alternate function keys (ordinary VT keys) } + FKeys2 : TFuncKeysTable = ( + (ScanCode: #$48; Shift: []; Ext: TRUE ; Value: #$1B + '[A'), { UP } + (ScanCode: #$50; Shift: []; Ext: TRUE ; Value: #$1B + '[B'), { DOWN } + (ScanCode: #$4D; Shift: []; Ext: TRUE ; Value: #$1B + '[C'), { RIGHT } + (ScanCode: #$4B; Shift: []; Ext: TRUE ; Value: #$1B + '[D'), { LEFT } + (ScanCode: #$49; Shift: []; Ext: TRUE ; Value: #$1B + '[5~'), { PREV } + (ScanCode: #$51; Shift: []; Ext: TRUE ; Value: #$1B + '[6~'), { NEXT } + (ScanCode: #$52; Shift: []; Ext: TRUE ; Value: #$1B + '[2~'), { INSERT } + (ScanCode: #$53; Shift: []; Ext: TRUE ; Value: #$7F ), { DELETE } + (ScanCode: #$3B; Shift: []; Ext: FALSE; Value: #$1B + 'OP'), { F1->PF1 } + (ScanCode: #$3C; Shift: []; Ext: FALSE; Value: #$1B + 'OQ'), { F2->PF2 } + (ScanCode: #$3D; Shift: []; Ext: FALSE; Value: #$1B + 'OR'), { F3->PF3 } + (ScanCode: #$3E; Shift: []; Ext: FALSE; Value: #$1B + 'OS'), { F4->PF4 } + (ScanCode: #$57; Shift: []; Ext: FALSE; Value: #$1B + '[28~'), { F11->Aide } + (ScanCode: #$58; Shift: []; Ext: FALSE; Value: #$1B + '[29~'), { F12->Excuter } + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ) + ); + +{ A-Series Telnet function keys (ordinary VT100 keys + specials) } + FKeys3 : TFuncKeysTable = ( + (ScanCode: #$48; Shift: []; Ext: TRUE ; Value: #$1B + '[A'), { UP } + (ScanCode: #$50; Shift: []; Ext: TRUE ; Value: #$1B + '[B'), { DOWN } + (ScanCode: #$4D; Shift: []; Ext: TRUE ; Value: #$1B + '[C'), { RIGHT } + (ScanCode: #$4B; Shift: []; Ext: TRUE ; Value: #$1B + '[D'), { LEFT } + (ScanCode: #$49; Shift: []; Ext: TRUE ; Value: #$1B + '-'), { PREV } + (ScanCode: #$51; Shift: []; Ext: TRUE ; Value: #$1B + '+'), { NEXT } + (ScanCode: #$47; Shift: []; Ext: TRUE ; Value: #$1B + 'H'), { HOME } + (ScanCode: #$47; Shift: [ssCtrl]; Ext: TRUE ; Value: #$1B + 'C'),{ HOME } + (ScanCode: #$4F; Shift: []; Ext: TRUE ; Value: #$1B + 'R'), { END } + (ScanCode: #$52; Shift: []; Ext: TRUE ; Value: #$1B + 'I'), { INSERT } + (ScanCode: #$53; Shift: []; Ext: TRUE ; Value: #$7F ), { DELETE } + (ScanCode: #$3B; Shift: []; Ext: FALSE; Value: #$1B + 'OP'), { F1->PF1 } + (ScanCode: #$3C; Shift: []; Ext: FALSE; Value: #$1B + 'OQ'), { F2->PF2 } + (ScanCode: #$3D; Shift: []; Ext: FALSE; Value: #$1B + 'OR'), { F3->PF3 } + (ScanCode: #$3E; Shift: []; Ext: FALSE; Value: #$1B + 'OS'), { F4->PF4 } + (ScanCode: #$43; Shift: []; Ext: FALSE; Value: #$1B + 'OP'), { F9 } + (ScanCode: #$44; Shift: []; Ext: FALSE; Value: ''), { F10 } + (ScanCode: #$57; Shift: []; Ext: FALSE; Value: #$1B + 'OQ'), { F11 } + (ScanCode: #$58; Shift: []; Ext: FALSE; Value: #$1B + 'OS'), { F12 } + (ScanCode: #$0F; Shift: []; Ext: FALSE; Value: #$1B + 'Z'), { RTAB } + (ScanCode: #$40; Shift: []; Ext: FALSE; Value: #$1B + 'K'), { F6 } + (ScanCode: #$53; Shift: [ssCtrl]; Ext: TRUE ; Value: #$1B + 'D'), { CDEL } + (ScanCode: #$52; Shift: [ssCtrl]; Ext: TRUE ; Value: #$1B + 'L'), { CINS } + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ) + ); + + { Ethernet to screen } + ibm_iso8859_1_G0 : TXlatTable = ( + #$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, { 00 - 07 } + #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, { 08 - 0F } + #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, { 10 - 17 } + #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, { 18 - 1F } + #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, { 20 - 27 } + #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, { 28 - 2F } + #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, { 30 - 37 } + #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, { 38 - 3F } + #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, { 40 - 47 } + #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, { 48 - 4F } + #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, { 50 - 57 } + #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, { 58 - 5F } + #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, { 60 - 67 } + #$68, #$69, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, { 68 - 6F } + #$70, #$71, #$72, #$73, #$74, #$75, #$76, #$77, { 70 - 77 } + #$78, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, { 78 - 7F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 80 - 87 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 88 - 8F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 90 - 97 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 98 - 9F } + #$B1, #$AD, #$9B, #$9C, #$0F, #$9D, #$B3, #$15, { A0 - A7 } + #$20, #$43, #$A6, #$AE, #$AA, #$C4, #$52, #$C4, { A8 - AF } + #$F8, #$F1, #$FD, #$20, #$27, #$E6, #$14, #$FA, { B0 - B7 } + #$2C, #$20, #$A7, #$AF, #$AC, #$AB, #$20, #$A8, { B8 - BF } + #$41, #$41, #$41, #$41, #$8E, #$8F, #$92, #$80, { C0 - C7 } + #$45, #$45, #$45, #$45, #$45, #$49, #$49, #$49, { C8 - CF } + #$44, #$A5, #$4F, #$4F, #$4F, #$4F, #$4F, #$78, { D0 - D7 } + #$ED, #$55, #$55, #$55, #$55, #$59, #$70, #$E1, { D8 - DF } + #$85, #$A0, #$83, #$61, #$84, #$86, #$91, #$87, { E0 - E7 } + #$8A, #$82, #$88, #$89, #$8D, #$A1, #$8C, #$49, { E8 - EF } + #$64, #$A4, #$95, #$A2, #$93, #$6F, #$94, #$F6, { F0 - F7 } + #$ED, #$97, #$A3, #$96, #$9A, #$79, #$70, #$98); { F8 - FF } + +{ Ethernet to screen } + ibm_iso8859_1_G1 : TXlatTable = ( + #$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, { 00 - 07 } + #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, { 08 - 0F } + #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, { 10 - 17 } + #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, { 18 - 1F } + #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, { 20 - 27 } + #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, { 28 - 2F } + #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, { 30 - 37 } + #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, { 38 - 3F } + #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, { 40 - 47 } + #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, { 48 - 4F } + #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, { 50 - 57 } + #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, { 58 - 5F } + #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, { 60 - 67 } + #$68, #$69, #$D9, #$BF, #$DA, #$C0, #$C5, #$6F, { 68 - 6F } + #$70, #$C4, #$72, #$73, #$C3, #$B4, #$C1, #$C2, { 70 - 77 } + #$B3, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, { 78 - 7F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 80 - 87 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 88 - 8F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 90 - 97 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 98 - 9F } + #$B1, #$AD, #$9B, #$9C, #$0F, #$9D, #$B3, #$15, { A0 - A7 } + #$20, #$43, #$A6, #$AE, #$AA, #$C4, #$52, #$C4, { A8 - AF } + #$F8, #$F1, #$FD, #$20, #$27, #$E6, #$14, #$FA, { B0 - B7 } + #$2C, #$20, #$A7, #$AF, #$AC, #$AB, #$20, #$A8, { B8 - BF } + #$41, #$41, #$41, #$41, #$8E, #$8F, #$92, #$80, { C0 - C7 } + #$45, #$45, #$45, #$45, #$45, #$49, #$49, #$49, { C8 - CF } + #$44, #$A5, #$4F, #$4F, #$4F, #$4F, #$4F, #$78, { D0 - D7 } + #$ED, #$55, #$55, #$55, #$55, #$59, #$70, #$E1, { D8 - DF } + #$85, #$A0, #$83, #$61, #$84, #$86, #$91, #$87, { E0 - E7 } + #$8A, #$82, #$88, #$89, #$8D, #$A1, #$8C, #$49, { E8 - EF } + #$64, #$A4, #$95, #$A2, #$93, #$6F, #$94, #$F6, { F0 - F7 } + #$ED, #$97, #$A3, #$96, #$9A, #$79, #$70, #$98); { F8 - FF } + +{ Keyboard to Ethernet } + Output : TXlatTable = ( + #$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, { 00 - 07 } + #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, { 08 - 0F } + #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, { 10 - 17 } + #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, { 18 - 1F } + #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, { 20 - 27 } + #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, { 28 - 2F } + #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, { 30 - 37 } + #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, { 38 - 3F } + #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, { 40 - 47 } + #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, { 48 - 4F } + #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, { 50 - 57 } + #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, { 58 - 5F } + #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, { 60 - 67 } + #$68, #$69, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, { 68 - 6F } + #$70, #$71, #$72, #$73, #$74, #$75, #$76, #$77, { 70 - 77 } + #$78, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, { 78 - 7F } + #$C7, #$FC, #$E9, #$E2, #$E4, #$E0, #$E5, #$E7, { 80 - 87 } + #$EA, #$EB, #$E8, #$EF, #$EE, #$EC, #$C4, #$C5, { 88 - 8F } + #$C9, #$E6, #$C6, #$F4, #$F6, #$F2, #$FB, #$F9, { 90 - 97 } + #$FF, #$F6, #$FC, #$A2, #$A3, #$A5, #$DE, #$20, { 98 - 9F } + #$E1, #$ED, #$F3, #$FA, #$F1, #$D1, #$AA, #$BA, { A0 - A7 } + #$BF, #$20, #$AC, #$BD, #$BC, #$A1, #$AB, #$BB, { A8 - AF } + #$A0, #$A0, #$A0, #$A6, #$A6, #$A6, #$A6, #$AD, { B0 - B7 } + #$2B, #$A6, #$A6, #$2B, #$2B, #$2B, #$2B, #$2B, { B8 - BF } + #$2B, #$AD, #$AD, #$AD, #$A6, #$AD, #$2B, #$A6, { C0 - C7 } + #$2B, #$2B, #$AD, #$AD, #$A6, #$AD, #$2B, #$AD, { C8 - CF } + #$AD, #$AD, #$AD, #$2B, #$2B, #$2B, #$2B, #$2B, { D0 - D7 } + #$2B, #$2B, #$2B, #$A0, #$A0, #$A0, #$A0, #$A0, { D8 - DF } + #$20, #$20, #$20, #$AD, #$20, #$20, #$B5, #$20, { E0 - E7 } + #$20, #$20, #$20, #$20, #$20, #$F8, #$20, #$20, { E8 - EF } + #$A0, #$B1, #$20, #$20, #$20, #$20, #$F7, #$20, { F0 - F7 } + #$B0, #$B0, #$B0, #$20, #$20, #$B2, #$A0, #$20); { F8 - FF } + +procedure Register; +procedure FKeysToFile(var FKeys : TFuncKeysTable; FName : String); +procedure FileToFKeys(var FKeys : TFuncKeysTable; FName : String); +function AddFKey(var FKeys : TFuncKeysTable; + ScanCode : Char; + Shift : TShiftState; + Ext : Boolean; + Value : TFuncKeyValue) : Boolean; + + + +implementation +{$DEFINE Debug} { Add or remove minus sign before dollar sign to } + { generate code for debug message output } + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TEmulVT]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function ShiftStateToString(var State : TShiftState) : String; +begin + Result := ''; + if ssShift in State then + Result := Result + 'ssShift '; + if ssAlt in State then + Result := Result + 'ssAlt '; + if ssCtrl in State then + Result := Result + 'ssCtrl '; + if ssLeft in State then + Result := Result + 'ssLeft '; + if ssRight in State then + Result := Result + 'ssRight '; + if ssMiddle in State then + Result := Result + 'ssMiddle '; + if ssDouble in State then + Result := Result + 'ssDouble '; + if Result = '' then + Result := 'ssNormal'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function StringToShiftState(var S : String) : TShiftState; +begin + Result := []; + if Pos('ssShift', S) <> 0 then + Result := Result + [ssShift]; + if Pos('ssAlt', S) <> 0 then + Result := Result + [ssAlt]; + if Pos('ssCtrl', S) <> 0 then + Result := Result + [ssCtrl]; + if Pos('ssLeft', S) <> 0 then + Result := Result + [ssLeft]; + if Pos('ssRight', S) <> 0 then + Result := Result + [ssRight]; + if Pos('ssMiddle', S) <> 0 then + Result := Result + [ssMiddle]; + if Pos('ssDouble', S) <> 0 then + Result := Result + [ssDouble]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function xdigit(Ch : char) : integer; +begin + if ch in ['0'..'9'] then + Result := Ord(ch) - ord('0') + else if ch in ['A'..'Z'] then + Result := Ord(ch) - Ord('A') + 10 + else if ch in ['a'..'z'] then + Result := Ord(ch) - Ord('a') + 10 + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function xdigit2(S : PChar) : integer; +begin + Result := 16 * xdigit(S[0]) + xdigit(S[1]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function FuncKeyValueToString(var S : TFuncKeyValue) : String; +var + I : Integer; +begin + Result := ''; + for I := 1 to Length(S) do begin + if (Ord(S[I]) < 32) or (Ord(S[I]) >= 127) or + (S[I] = '''') or (S[I] = '\') then + Result := Result + '\x' + IntToHex(Ord(S[I]), 2) + else + Result := Result + S[I]; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function StringToFuncKeyValue(var S : String) : TFuncKeyValue; +var + I : Integer; +begin + Result := ''; + I := 1; + while I <= Length(S) do begin + if (S[I] = '\') and + ((I + 3) <= Length(S)) and + (S[I + 1] = 'x') then begin + Result := Result + chr(xdigit2(@S[I + 2])); + I := I + 3; + end + else + Result := Result + S[I]; + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function AddFKey(var FKeys : TFuncKeysTable; + ScanCode : Char; + Shift : TShiftState; + Ext : Boolean; + Value : TFuncKeyValue) : Boolean; +var + I : Integer; +begin + { Search for existing key definition to replace it } + for I := Low(FKeys) to High(FKeys) do begin + if (FKeys[I].ScanCode = ScanCode) and + (FKeys[I].Shift = Shift) and + (FKeys[I].Ext = Ext) then begin + FKeys[I].Value := Value; + Result := TRUE; { Success} + Exit; + end; + end; + + { Key not existing, add in an empty space } + for I := Low(FKeys) to High(FKeys) do begin + if FKeys[I].ScanCode = #0 then begin + FKeys[I].ScanCode := ScanCode; + FKeys[I].Shift := Shift; + FKeys[I].Ext := Ext; + FKeys[I].Value := Value; + Result := TRUE; { Success} + Exit; + end; + end; + + { Failure, no more space available } + Result := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure FKeysToFile(var FKeys : TFuncKeysTable; FName : String); +var + I : Integer; + F : TextFile; +begin + AssignFile(F, FName); + Rewrite(F); + for I := Low(FKeys) to High(FKeys) do begin + with FKeys[I] do begin + if ScanCode <> chr(0) then + WriteLn(F, IntToHex(Ord(ScanCode), 2), ', ', + ShiftStateToString(Shift), ', ', + Ext, ', ''', + FuncKeyValueToString(Value), ''''); + end; + end; + CloseFile(F); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetToken(var S : String; var I : Integer; Delim : Char) : String; +begin + Result := ''; + while (I <= Length(S)) and (S[I] = ' ') do + Inc(I); + while (I <= Length(S)) and (S[I] <> Delim) do begin + Result := Result + S[I]; + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure FileToFKeys(var FKeys : TFuncKeysTable; FName : String); +var + I, J : Integer; + F : TextFile; + S, T : String; + sc : Integer; +begin + AssignFile(F, FName); + {$I-} + Reset(F); + if IOResult <> 0 then begin + { File do not exist, create default one } + FKeysToFile(FKeys, FName); + Exit; + end; + + for I := Low(FKeys) to High(FKeys) do begin + with FKeys[I] do begin + ScanCode := chr(0); + Shift := []; + Ext := FALSE; + Value := ''; + if not Eof(F) then begin + { 71, ssNormal, TRUE, '\x1B[H' } + ReadLn(F, S); + J := 1; + T := GetToken(S, J, ','); + if (Length(T) > 0) and (T[1] <> ';') then begin + sc := xdigit2(@T[1]); + if sc <> 0 then begin + ScanCode := chr(sc); + Inc(J); + T := GetToken(S, J, ','); + Shift := StringToShiftState(T); + Inc(J); + T := GetToken(S, J, ','); + Ext := UpperCase(T) = 'TRUE'; + Inc(J); + T := GetToken(S, J, ''''); + Inc(J); + T := GetToken(S, J, ''''); + Value := StringToFuncKeyValue(T); + end; + end; + end; + end; + end; + CloseFile(F); +{$I+} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DebugString(Msg : String); +const + Cnt : Integer = 0; +var + Buf : String[20]; +begin +{$IFDEF Debug} + Cnt := Cnt + 1; + Buf := IntToHex(Cnt, 4) + ' ' + #0; + OutputDebugString(@Buf[1]); + +{$IFNDEF WIN32} + if Length(Msg) < High(Msg) then + Msg[Length(Msg) + 1] := #0; +{$ENDIF} + + OutputDebugString(@Msg[1]); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TLine.Create; +begin + inherited Create; + FillChar(Txt, SizeOf(Txt), ' '); + FillChar(Att, SizeOf(Att), Chr(F_WHITE)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TLine.Clear(Attr : Byte); +begin + FillChar(Txt, SizeOF(Txt), ' '); + FillChar(Att, SizeOf(Att), Attr); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TScreen.Create; +begin + inherited Create; + FRowCount := 0; + FBackRowCount := 0; + FBackEndRow := 0; + FBackColor := vtsWhite; + FOptions := [vtoBackColor]; + SetRowCount(25); + FColCount := 80; + FRowSaved := -1; + FColSaved := -1; + FScrollRowTop := 0; + {FScrollRowBottom := FRowCount - 1; // WM + SE 09/08/00 } + FAttribute := F_WHITE; + InvClear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TScreen.Destroy; +var + nRow : Integer; +begin + for nRow := 0 to FRowCount + FBackRowCount - 1 do + FLines^[nRow].Free; + FreeMem (FLines, (FRowCount + FBackRowCount) * SizeOf(TObject)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.AdjustFLines(NewCount : Integer); +var + NewLines : PLineArray; + CurrCount : Integer; + nRow : Integer; +begin + CurrCount := FRowCount + FBackRowCount; + if (NewCount <> CurrCount) and (NewCount > 0) then begin + GetMem(NewLines, NewCount * SizeOf(TObject)); + if NewCount > CurrCount then begin + if CurrCount <> 0 then + Move(FLines^, NewLines^, CurrCount * SizeOf(TObject)); + for nRow := CurrCount to NewCount - 1 do + NewLines^[nRow] := TLine.Create; + if CurrCount <> 0 then + FreeMem(FLines, CurrCount * SizeOf(TObject)); + end + else begin + Move (FLines^, NewLines^, NewCount * SizeOf(TObject)); + for nRow := NewCount to CurrCount - 1 do + FLines^[nRow].Free; + FreeMem(FLines, CurrCount * SizeOf(TObject)); + end; + FLines := NewLines; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.SetRowCount(NewCount : Integer); +begin + if NewCount <> FRowCount then begin + AdjustFLines(NewCount + FBackRowCount); + FRowCount := NewCount; + FScrollRowBottom := FRowCount - 1; { WM + SE 09/08/00 } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.SetBackRowCount(NewCount : Integer); +begin + if NewCount <> FBackRowCount then begin + AdjustFLines(FRowCount + NewCount); + FBackRowCount := NewCount; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CopyScreenToBack; +{ Copies the current host screen into the scrollback buffer. } +var + Temp : TLine; + Row : Integer; + Pass : Integer; + nCol : Integer; +begin + if FBackRowCount >= FRowCount then begin + Dec (FBackEndRow, FRowCount); + if (0 - FBackEndRow) >= FBackRowCount then + FBackEndRow := 1 - FBackRowCount; + { We have to make FRowCount lines available at the head of the + scrollback buffer. These will come from the end of the scrollback + buffer. We'll make FRowCount passes through the scrollback buffer + moving the available lines up to the top and the existing lines + down a page at a time. + Net result is that we only move each line once. } + For Pass := 0 To FRowCount - 1 Do begin + Row := FBackEndRow + Pass; + Temp := Lines[Row]; + Inc (Row, FRowCount); + While Row < 0 Do begin + Lines[Row - FRowCount] := Lines[Row]; + Inc (Row, FRowCount); + end; + Lines[Row - FRowCount] := Temp; + end; + + { Now, copy the host screen lines to the ones we made available. } + For Row := 0 To FRowCount - 1 Do begin + Move (Lines[Row].Txt, Lines[Row - FRowCount].Txt, FColCount); + Move (Lines[Row].Att, Lines[Row - FRowCount].Att, FColCount); + if vtoBackColor in FOptions then begin + with Lines[Row - FRowCount] do begin + for nCol := 0 to FColCount - 1 do begin + Att[nCol] := Att[nCol] And $8F Or (Ord (FBackColor) shl 4); + end; + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ScrollUp; +var + Temp : TLine; + Row : Integer; + nCol : Integer; +begin + if FBackRowCount > 0 then begin + if (0 - FBackEndRow) < (FBackRowCount - 1) then + Dec (FBackEndRow); + Temp := Lines[FBackEndRow]; + For Row := FBackEndRow + 1 To -1 Do begin + Lines[Row - 1] := Lines[Row]; + end; + Lines[-1] := Lines[FScrollRowTop]; + if vtoBackColor in FOptions then begin + with Lines[-1] do begin + for nCol := 0 to FColCount - 1 do begin + Att[nCol] := Att[nCol] And $8F Or (Ord (FBackColor) shl 4); + end; + end; + end; + + end + else + Temp := Lines[FScrollRowTop]; + + for Row := FScrollRowTop + 1 to FScrollRowBottom do + Lines[Row - 1] := Lines[Row]; + Lines[FScrollRowBottom] := Temp; + Temp.Clear(F_WHITE {FAttribute}); + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ScrollDown; +var + Temp : TLine; + Row : Integer; +begin + Temp := Lines[FScrollRowBottom]; + for Row := FScrollRowBottom DownTo FScrollRowTop + 1 do + Lines[Row] := Lines[Row - 1]; + Lines[FScrollRowTop] := Temp; + Temp.Clear(F_WHITE {FAttribute}); + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorDown; +begin + Inc(FRow); + if FRow > FScrollRowBottom then begin + FRow := FScrollRowBottom; + ScrollUp; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorUp; +begin + Dec(FRow); + if FRow < 0 then begin + Inc(FRow); + ScrollDown; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorRight; +begin + Inc(FCol); + if FCol >= FColCount then begin + FCol := 0; + CursorDown; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorLeft; +begin + Dec(FCol); + if FCol < 0 then begin + FCol := FColCount - 1; + CursorUp; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CarriageReturn; +begin + FCol := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TScreen.GetEscapeParam(From : Integer; var Value : Integer) : Integer; +begin + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] = ' ') do + From := From + 1; + + Value := 0; + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] in ['0'..'9']) do begin + Value := Value * 10 + Ord(FEscBuffer[From]) - Ord('0'); + From := From + 1; + end; + + Result := From; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.UnimplementedEscape(EscCmd : Char); +{var + Buf : String;} +begin + DebugString('Unimplemented Escape Sequence: ' + FEscBuffer + EscCmd + #13 + #10); +{ Buf := FEscBuffer + EscCmd + #0; + MessageBox(0, @Buf[1], 'Unimplemented Escape Sequence', MB_OK); } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.InvalidEscape(EscCmd : Char); +{var + Buf : String;} +begin + DebugString('Invalid Escape Sequence: ' + FEscBuffer + EscCmd + #13 + #10); +{ Buf := FEscBuffer + EscCmd + #0; + MessageBox(0, @Buf[1], 'Invalid Escape Sequence', MB_OK); } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessESC_D; { Index } +begin + UnimplementedEscape('D'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Move cursor Up, scroll down if necessary } +procedure TScreen.ProcessESC_M; { Reverse index } +begin + Dec(FRow); + if FRow < FScrollRowTop then begin + FRow := FScrollRowTop; + ScrollDown; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessESC_E; { Next line } +begin + UnimplementedEscape('E'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_u; { Restore Cursor } +begin + UnimplementedEscape('u'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ IBM character set operation (not part of the ANSI standard) } +{ [0I => Set IBM character set } +{ [1;nnnI => Literal mode for nnn next characters } +{ [2;onoffI => Switch carbon mode on (1) or off (0) } +{ [3;ch;cl;sh;slI => Receive carbon mode keyboard code } +{ [4I => Select ANSI character set } +procedure TScreen.ProcessCSI_I; +var + From, mode, nnn : Integer; + ch, cl, sh, sl : Integer; +begin + From := GetEscapeParam(2, Mode); + + case Mode of + 0: begin { Select IBM character set } + FNoXlat := TRUE; + end; + 1: begin { Set literal mode for next N characters } + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, FCntLiteral) + else + FCntLiteral := 1; + end; + 2: begin { Switch carbon mode on or off } + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, nnn) + else + nnn := 0; + FCarbonMode := (nnn <> 0); + end; + 3: begin { Receive carbon mode key code } + ch := 0; cl := 0; sh := 0; sl := 0; + if FEscBuffer[From] = ';' then begin + From := GetEscapeParam(From + 1, cl); + if FEscBuffer[From] = ';' then begin + From := GetEscapeParam(From + 1, ch); + if FEscBuffer[From] = ';' then begin + From := GetEscapeParam(From + 1, sl); + if FEscBuffer[From] = ';' then begin + GetEscapeParam(From + 1, sh); + end; + end; + end; + end; + DebugString('Special key ' + + IntToHex(ch, 2) + IntToHex(cl, 2) + ' ' + + IntToHex(sh, 2) + IntToHex(sl, 2)); + end; + 4: begin { Select ANSI character set } + FNoXlat := FALSE; + end; + else + UnimplementedEscape('I'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.BackSpace; +begin + if FCol > 0 then + Dec(FCol); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ClearScreen; +var + Row : Integer; +begin + for Row := 0 to FRowCount - 1 do + Lines[Row].Clear(FAttribute); + FRow := 0; + FCol := 0; + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.InvClear; +begin + with FInvRect do begin + Top := 9999; + Left := 9999; + Right := -1; + Bottom := -1; + end; + FAllInvalid := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.InvRect(nRow, nCol : Integer); +begin + if not FAllInvalid then begin + if FInvRect.Top > nRow then + FInvRect.Top := nRow; + if FInvRect.Bottom < nRow then + FInvRect.Bottom := nRow; + if FInvRect.Left > nCol then + FInvRect.Left := nCol; + if FInvRect.Right < nCol then + FInvRect.Right := nCol; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The FLines array is inverted with the last host line at position 0 and + the first host line as position FRowCount - 1. } +procedure Tscreen.SetLines(I : Integer; Value : TLine); +begin + if I >= FRowCount then + FLines^[0] := Value + else + FLines^[FRowCount - 1 - I] := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TScreen.GetLines(I : Integer) : TLine; +begin + if I >= FRowCount then + Result := FLines^[0] + else + Result := FLines^[FRowCount - 1 - I]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.Eol; +begin + with Lines[FRow] do begin + FillChar(Txt[FCol], FColCount - FCol, ' '); + FillChar(Att[FCol], (FColCount - FCol) * SizeOf(Att[FCol]), FAttribute); + end; + InvRect(Frow, FCol); + InvRect(Frow, FColCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.Eop; +var + NRow : Integer; +begin + Eol; + for NRow := FRow + 1 to FRowCount - 1 do + Lines[NRow].Clear(FAttribute); + if FRow = 0 then + FAllInvalid := TRUE + else begin + InvRect(FRow, 0); + InvRect(FRowCount, FColCount); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_J; { Clear the screen } +var + Mode : Integer; + Row : Integer; +begin + GetEscapeParam(2, Mode); + case Mode of + 0: begin { Cursor to end of screen } + FAttribute := F_WHITE; + Eop; + end; + 1: begin { Start of screen to cursor } + for Row := 0 to FRow do + Lines[Row].Clear(FAttribute); + InvRect(0, 0); + InvRect(FRow, FColCount); + end; + 2: begin { Entire screen } + if vtoCopyBackOnClear in FOptions then CopyScreenToBack; + ClearScreen; + end; + else + InvalidEscape('J'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_K; { Erase to End of Line } +begin + Eol; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_L; { Insert Line } +var + nLine : Integer; + nRow : Integer; + Temp : TLine; +begin + FCol := 0; + GetEscapeParam(2, nLine); + if nLine = 0 then + nLine := 1; + + if (FRow + nLine) > FScrollRowBottom then begin + for nRow := FRow to FScrollRowBottom do + Lines[nRow].Clear(FAttribute); + Exit; + end; + + for nRow := FScrollRowBottom downto FRow + nLine do begin + Temp := Lines[nRow]; + Lines[nRow] := Lines[nRow - nLine]; + Lines[nRow - nLine] := Temp; + end; + + for nRow := FRow to FRow + nLine - 1 do + Lines[nRow].Clear(FAttribute); + + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_M; { Delete Line } +var + nLine : Integer; + nRow : Integer; + Temp : TLine; +begin + FAllInvalid := TRUE; + FCol := 0; + GetEscapeParam(2, nLine); + if nLine = 0 then + nLine := 1; + + if (FRow + nLine) > FScrollRowBottom then begin + for nRow := FRow to FScrollRowBottom do + Lines[nRow].Clear(FAttribute); + Exit; + end; + + for nRow := FRow to FRow + nLine - 1 do + Lines[nRow].Clear(F_WHITE {FAttribute}); { 12/11/99 } + for nRow := FRow to FScrollRowBottom - nLine do begin + Temp := Lines[nRow]; + Lines[nRow] := Lines[nRow + nLine]; + Lines[nRow + nLine] := Temp; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_m_lc; { Select Attributes } +var + From, n : Integer; +begin + if FEscBuffer[1] <> '[' then + Exit; + + if Length(FEscBuffer) < 2 then begin + FAttribute := F_WHITE; + FReverseVideo := FALSE; + Exit; + end; + + From := 2; + while From <= Length(FEscBuffer) do begin + if FEscBuffer[From] in [' ', '[', ';'] then + Inc(From) + else begin + From := GetEscapeParam(From, n); + case n of + 0: begin { All attributes off } + FAttribute := F_WHITE; + FReverseVideo := FALSE; + FUnderLine := FALSE; + end; + 1: begin { High intensity } + FAttribute := FAttribute or F_INTENSE; + end; + 4: begin { Underline } + FUnderLine := TRUE; + end; + 5: begin { Blinking } + FAttribute := FAttribute or B_BLINK; + end; + 7: begin { Reverse video } + FReverseVideo := TRUE; + end; + 8: begin { Secret } + FAttribute := 0; + end; + 10: begin { Don't force high bit } + FForceHighBit := FALSE; + end; + 12: begin { Force high bit on } + FForceHighBit := TRUE; + end; + 22: begin { Normal intensity } + FAttribute := FAttribute and (not F_INTENSE); + end; + 27: begin { Normal characters } + FAttribute := F_WHITE; + FReverseVideo := FALSE; + end; + 30, 31, 32, 33, 34, 35, 36, 37: + begin { Foreground color } + FAttribute := (n mod 10) or (FAttribute and $F8); + end; + 40, 41, 42, 43, 44, 45, 46, 47: + begin { Background color } + FAttribute := ((n mod 10) shl 4) or (FAttribute and $8F); + end; + else + InvalidEscape('m'); + end; + end; + end; + if FReverseVideo then begin + FAttribute := ((FAttribute and 7) shl 4) or + ((FAttribute shr 4) and 7) or + (FAttribute and $88); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_n_lc; { Cursor position report } +begin + UnimplementedEscape('n'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_at; { Insert character } +var + nChar : Integer; + nCnt : Integer; + nCol : Integer; + Line : TLine; +begin + GetEscapeParam(2, nChar); + if nChar = 0 then + nChar := 1; + + nCnt := FColCount - FCol - nChar; + if nCnt <= 0 then begin + Eol; + Exit; + end; + + Line := Lines[FRow]; + for nCol := FColCount - 1 downto FCol + nChar do begin + Line.Txt[nCol] := Line.Txt[nCol - nChar]; + Line.Att[nCol] := Line.Att[nCol - nChar]; + InvRect(Frow, nCol); + end; + + for nCol := FCol to FCol + nChar - 1 do begin + Line.Txt[nCol] := ' '; + Line.Att[nCol] := FAttribute; + InvRect(Frow, nCol); + end; + +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_r_lc; { Scrolling margins } +var + From, Top, Bottom : Integer; +begin + From := GetEscapeParam(2, Top); + if Top = 0 then begin { Default = full screen } + FScrollRowTop := 0; + FScrollRowBottom := FRowCount - 1; + end + else begin + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] = ' ') do + From := From + 1; + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, Bottom) + else + Bottom := 1; + + FScrollRowTop := Top - 1; + FScrollRowBottom := Bottom - 1; + + if (FScrollRowBottom <= FScrollRowTop) or + (FScrollRowTop < 0) or + (FScrollRowBottom >= FRowCount) then begin + FScrollRowTop := 0; + FScrollRowBottom := FRowCount - 1; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_s_lc; { Save cursor location } +begin + ProcessCSI_7; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_u_lc; { Restore cursor location } +begin + ProcessCSI_8; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_7; { Save cursor location } +begin + FRowSaved := FRow; + FColSaved := FCol; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_8; { Restore cursor location } +begin + if FRowSaved = -1 then + GotoXY(0, 0) + else + GotoXY(FColSaved, FRowSaved); + FRowSaved := -1; + FColSaved := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_H; { Set Cursor Position } +var + From, Row, Col : Integer; +begin + From := GetEscapeParam(2, Row); + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] = ' ') do + From := From + 1; + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, Col) + else + Col := 1; + + GotoXY(Col - 1, Row - 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_h_lc; { Terminal mode set } +var + Priv : Boolean; + Mode : Integer; +begin + if FEscBuffer[1] <> '[' then begin + UnimplementedEscape('h'); + Exit; + end; + + Priv := (FEscBuffer[2] = '?'); + if not Priv then begin + UnimplementedEscape('h'); + Exit; + end; + + GetEscapeParam(3, Mode); + case Mode of + 1 : { ANSI cursor keys } + FCKeyMode := TRUE; + 4 : { Smooth scroll OFF } + { Ignore }; + 7: { Auto-wrap OFF } + FAutoWrap := TRUE; + 25: { Cursor visible } + begin + FCursorOff := FALSE; + if Assigned(FOnCursorVisible) then + FOnCursorVisible(Self); + end; + else + UnimplementedEscape('h'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_l_lc; { Terminal mode reset } +var + Priv : Boolean; + Mode : Integer; +begin + if FEscBuffer[1] <> '[' then begin + UnimplementedEscape('l'); + Exit; + end; + + Priv := (FEscBuffer[2] = '?'); + if not Priv then begin + UnimplementedEscape('l'); + Exit; + end; + + GetEscapeParam(3, Mode); + case Mode of + 1 : { ANSI cursor keys } + FCKeyMode := FALSE; + 4 : { Smooth scroll OFF } + { Ignore }; + 7: { Auto-wrap OFF } + FAutoWrap := FALSE; + 25: { Cursor invisible } + begin + FCursorOff := TRUE; + if Assigned(FOnCursorVisible) then + FOnCursorVisible(Self); + end; + else + UnimplementedEscape('l'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_A; { Cursor Up } +var + Row : Integer; +begin + GetEscapeParam(2, Row); + if Row <= 0 then + Row := 1; + FRow := FRow - Row; + if FRow < 0 then + FRow := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_B; { Cursor Down } +var + Row : Integer; +begin + GetEscapeParam(2, Row); + if Row <= 0 then + Row := 1; + FRow := FRow + Row; + if FRow >= FRowCount then + FRow := FRowCount - 1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_C; { Cursor Right } +var + Col : Integer; +begin + GetEscapeParam(2, Col); + if Col <= 0 then + Col := 1; + FCol := FCol + Col; + if FCol >= FColCount then begin + if FAutoWrap then begin + FCol := FCol - FColCount; + Inc(FRow); + if FRow >= FRowCount then + FRow := FRowCount - 1; + end + else + FCol := FColCount - 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_D; { Cursor Left } +var + Col : Integer; +begin + GetEscapeParam(2, Col); + if Col <= 0 then + Col := 1; + FCol := FCol - Col; + if FCol < 0 then + FCol := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_P; { Delete Character } +var + Count : Integer; + nCol : Integer; +begin + GetEscapeParam(2, Count); + if Count <= 0 then + Count := 1; + with Lines[FRow] do begin + for nCol := Fcol to FColCount - Count - 1 do begin + Txt[nCol] := Txt[nCol + Count]; + Att[nCol] := Att[nCol + Count]; + end; + for nCol := FcolCount - Count - 1 to FColCount - 1 do begin + Txt[nCol] := ' '; + Att[nCol] := F_WHITE; + end; + end; + InvRect(Frow, FCol); + InvRect(Frow, FColCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_S; { Scroll up } +begin + ScrollUp; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_T; { Scroll down } +begin + UnimplementedEscape('T'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G0(EscCmd : Char); { G0 character set } +begin + case EscCmd of + '0': begin + FCharSetG0 := EscCmd; + FXlatInputTable := @ibm_iso8859_1_G1; + FXlatOutputTable := @ibm_iso8859_1_G1; + FNoXlat := FNoXlatInitial; +{ FNoXlat := FALSE;} + end; + 'B': begin + FCharSetG0 := EscCmd; + FXlatInputTable := @ibm_iso8859_1_G0; + FXlatOutputTable := @ibm_iso8859_1_G0; + FNoXlat := FNoXlatInitial; + end; + else + InvalidEscape(EscCmd); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G1(EscCmd : Char); { G1 character set } +begin + FCharSetG1 := EscCmd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G2(EscCmd : Char); { G2 character set } +begin + FCharSetG2 := EscCmd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G3(EscCmd : Char); { G2 character set } +begin + FCharSetG3 := EscCmd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessEscape(EscCmd : Char); +begin + if Length(FEscBuffer) = 0 then begin + case EscCmd of + 'D': ProcessESC_D; { Index } + 'M': ProcessESC_M; { Reverse index } + 'E': ProcessESC_E; { Next line } + 'H': ; { Tabulation set } + '7': ProcessCSI_7; { Save cursor } + '8': ProcessCSI_8; { Restore Cursor } + '=': ; { VT52 } { Enter Alternate keypad } + '>': ; { VT52 } { Exit Alternate keypad } + '<': ; { VT52 } { Enter ANSI mode } + else + InvalidEscape(EscCmd); + WriteLiteralChar(EscCmd); + end; + + Exit; + end; + + case FEscBuffer[1] of + ' ': begin + case EscCmd of + 'F': ; + else + InvalidEscape(EscCmd); + end; + end; + '[': begin + case EscCmd of + 'I': ProcessCSI_I; { Select IBM char set } + { Extension F. Piette !! } + 'J': ProcessCSI_J; { Clear the screen } + 'K': ProcessCSI_K; { Erase to End of Line } + 'L': ProcessCSI_L; { Insert Line } + 'M': ProcessCSI_M; { Delete Line } + 'm': ProcessCSI_m_lc; { Select Attributes } + 'n': ProcessCSI_n_lc; { Cursor position report } + '@': ProcessCSI_at; { Insert character } + 'r': ProcessCSI_r_lc; { Set Top and Bottom marg } + 's': ProcessCSI_s_lc; { Save cursor location } + 'u': ProcessCSI_u_lc; { Restore cursor location } + 'H': ProcessCSI_H; { Set Cursor Position } + 'f': ProcessCSI_H; { Set Cursor Position } + 'g': ; { Tabulation Clear } + 'h': ProcessCSI_h_lc; { Terminal mode set } + 'l': ProcessCSI_l_lc; { Terminal mode reset } + 'A': ProcessCSI_A; { Cursor Up } + 'B': ProcessCSI_B; { Cursor Down } + 'C': ProcessCSI_C; { Cursor Right } + 'D': ProcessCSI_D; { Cursor Left } + 'P': ProcessCSI_P; { Delete Character } + 'S': ProcessCSI_S; { Scroll up } + 'T': ProcessCSI_T; { Scroll down } + '>': ; { } + else + InvalidEscape(EscCmd); + end; + end; + '(': process_charset_G0(EscCmd); { G0 character set } + ')': process_charset_G1(EscCmd); { G1 character set } + '*': process_charset_G2(EscCmd); { G2 character set } + '+': process_charset_G3(EscCmd); { G3 character set } + else + InvalidEscape(EscCmd); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.WriteLiteralChar(Ch : Char); +var + Line : TLine; +begin + if FCol >= FColCount then begin + if FAutoWrap then begin + FCol := 0; + Inc(FRow); + if FRow >= FRowCount then begin + Dec(FRow); + ScrollUp; + end; + end; + end; + + if FForceHighBit then + Ch := Chr(ord(ch) or $80); + + Line := Lines[FRow]; + Line.Txt[FCol] := Ch; + Line.Att[FCol] := FAttribute; + InvRect(Frow, FCol); + + if FCol < High(Line.Txt) then + Inc(FCol); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.SetAttr(Att : Char); +begin + { Not implemented } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Write a single character at current cursor location. } +{ Update cursor position. } +procedure TScreen.WriteChar(Ch : Char); +var + bProcess : Boolean; +begin + if FCntLiteral > 0 then begin + if (FCntLiteral and 1) <> 0 then + WriteLiteralChar(Ch) + else + SetAttr(Ch); + Dec(FCntLiteral); + Exit; + end; + + if FNoXlat then + Ch := FXlatInputTable^[ord(Ch)]; + + if FEscFLag then begin + bProcess := FALSE; + if (Length(FEscBuffer) = 0) and + (Ch in ['D', 'M', 'E', 'H', '7', '8', '=', '>', '<']) then + bProcess := TRUE + else if (Length(FEscBuffer) = 1) and + (FEscBuffer[1] in ['(', ')', '*', '+']) then + bProcess := TRUE + else if (Ch in ['0'..'9', ';', '?', ' ']) or + ((Length(FEscBuffer) = 0) and + (ch in ['[', '(', ')', '*', '+'])) then begin + FEscBuffer := FEscBuffer + Ch; + if Length(FEscBuffer) >= High(FEscBuffer) then begin + MessageBeep(MB_ICONASTERISK); + FEscBuffer := ''; + FEscFlag := FALSE; + end; + end + else + bProcess := TRUE; + + if bProcess then begin + ProcessEscape(Ch); + FEscBuffer := ''; + FEscFlag := FALSE; + end; + + Exit; + end; + + case Ch of + #0: ; + #7: MessageBeep(MB_ICONASTERISK); + #8: BackSpace; + #9: begin + repeat + Inc(FCol); + until (FCol Mod 8) = 0; + end; + #10: begin + CursorDown; + if FAutoCR then + CarriageReturn; + end; + #13: begin + CarriageReturn; + if FAutoLF then + CursorDown; + end; + #14: begin + FXlatInputTable := @ibm_iso8859_1_G1; + FXlatOutputTable := @ibm_iso8859_1_G1; + end; + #15: begin + FXlatInputTable := @ibm_iso8859_1_G0; + FXlatOutputTable := @ibm_iso8859_1_G0; + end; + #27: begin + FEscBuffer := ''; + FEscFlag := TRUE; + end; + else + WriteLiteralChar(Ch); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Write characters at current cursor location. Update cursor position. } +procedure TScreen.WriteStr(Str : String); +var + I : Integer; +begin + for I := 1 to Length(Str) do + WriteChar(Str[I]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Read characters from the cursor to end of line } +function TScreen.ReadStr : String; +var + Line : TLine; + Len : Integer; +begin + Line := Lines[FRow]; + Len := FColCount - FCol; + if Len <= 0 then + Result := '' + else begin + SetLength(Result, Len); + Move(Line.Txt[FCol], Result[1], Len); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.GotoXY(X, Y : Integer); +begin + if X < 0 then + FCol := 0 + else if X >= FColCount then + FCol := FColCount - 1 + else + FCol := X; + + if Y < 0 then + FRow := 0 + else if Y >= FRowCount then + FRow := FRowCount - 1 + else + FRow := Y; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCaret; +begin +{$IFDEF CHAR_ZOOM} + SetCaretPos(FCharPos[FScreen.FCol] + FLeftMargin + 2, + FLinePos[FScreen.FRow - FTopLine] + FTopMargin + 3); +{$ELSE} + SetCaretPos(FScreen.FCol * FCharWidth + FLeftMargin, + (FScreen.FRow - FTopLine) * FLineHeight + FTopMargin); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Adjusts the scrollbar properties to match the number of host and scrollback + lines that we can scroll through. } +procedure TCustomEmulVT.AdjustScrollBar; +var + VisibleLines : Integer; +begin + if not FVScrollBar.Visible then + Exit; + FVScrollBar.Min := FScreen.FBackEndRow; +{$IFDEF CHAR_ZOOM} + VisibleLines := Trunc((Height - FTopMargin - FBottomMargin) / (LineHeight * FLineZoom)); +{$ELSE} + VisibleLines := (Height - FTopMargin - FBottomMargin) Div LineHeight; +{$ENDIF} + if VisibleLines > FScreen.FRowCount then + VisibleLines := FScreen.FRowCount; + FVScrollBar.Max := FScreen.FRowCount - VisibleLines; + FVScrollBar.Position := FTopLine; + FVScrollBar.SmallChange := 1; + FVScrollBar.LargeChange := VisibleLines; + FVScrollBar.Enabled := FVScrollBar.Max > FVScrollBar.Min; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.Clear; +begin + FScreen.ClearScreen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCursor(Row, Col : Integer); +begin + FScreen.GotoXY(Col - 1, Row - 1); +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WriteChar(Ch : Char); +begin + if FCaretCreated and FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + if FLog then + Write(FFileHandle, Ch); + FScreen.WriteChar(ch); + if FAutoRepaint then + UpdateScreen; +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WriteStr(Str : String); +var + I : Integer; +begin + if FCaretCreated and FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + for I := 1 to Length(Str) do begin + if FLog then + Write(FFileHandle, Str[I]); + FScreen.WriteChar(Str[I]); + end; + if FAutoRepaint then + UpdateScreen; +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WriteBuffer(Buffer : Pointer; Len : Integer); +var + I : Integer; +begin + if FCaretCreated and FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + for I := 0 to Len - 1 do begin + if FLog then + Write(FFileHandle, PChar(Buffer)[I]); + FScreen.WriteChar(PChar(Buffer)[I]); + end; + if FAutoRepaint then + UpdateScreen; +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.ReadStr : String; +begin + Result := FScreen.ReadStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.CopyHostScreen; +begin + FScreen.CopyScreenToBack; + AdjustScrollBar; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomEmulVT.Create(AOwner: TComponent); +type + TMyLogPalette = record + palVersion: Word; + palNumEntries: Word; + palPalEntry: array[0..NumPaletteEntries - 1] of TPaletteEntry; + end; + TPLogPalette = ^TLogPalette; +var + plgpl : ^TMyLogPalette; + I : Integer; +begin + inherited Create(AOwner); + ControlStyle := ControlStyle + [csOpaque]; + + New(plgpl); + plgpl^.palNumEntries := High(plgpl^.palPalEntry) + 1; + plgpl^.palVersion := $300; + + FTopMargin := 4; + FLeftMargin := 6; + FRightMargin := 6; + FBottomMargin := 4; + + FPaletteEntries[0].peRed := 0; { Black } + FPaletteEntries[0].peGreen := 0; + FPaletteEntries[0].peBlue := 0; + FPaletteEntries[1].peRed := 168; { Red } + FPaletteEntries[1].peGreen := 0; + FPaletteEntries[1].peBlue := 0; + FPaletteEntries[2].peRed := 0; { Green } + FPaletteEntries[2].peGreen := 168; + FPaletteEntries[2].peBlue := 0; + FPaletteEntries[3].peRed := 168; { Yellow } + FPaletteEntries[3].peGreen := 168; + FPaletteEntries[3].peBlue := 0; + FPaletteEntries[4].peRed := 0; { Dark Blue } + FPaletteEntries[4].peGreen := 0; + FPaletteEntries[4].peBlue := 168; + FPaletteEntries[5].peRed := 168; { Magenta } + FPaletteEntries[5].peGreen := 0; + FPaletteEntries[5].peBlue := 168; + FPaletteEntries[6].peRed := 0; { Cyan } + FPaletteEntries[6].peGreen := 112; + FPaletteEntries[6].peBlue := 216; + FPaletteEntries[7].peRed := 200; { White } + FPaletteEntries[7].peGreen := 200; + FPaletteEntries[7].peBlue := 200; + FPaletteEntries[8].peRed := 84; { Grey } + FPaletteEntries[8].peGreen := 84; + FPaletteEntries[8].peBlue := 84; + FPaletteEntries[9].peRed := 255; { Red Highlight } + FPaletteEntries[9].peGreen := 84; + FPaletteEntries[9].peBlue := 212; + FPaletteEntries[10].peRed := 84; { Green Highlight } + FPaletteEntries[10].peGreen := 255; + FPaletteEntries[10].peBlue := 84; + FPaletteEntries[11].peRed := 255; { Yellow Highlight } + FPaletteEntries[11].peGreen := 255; + FPaletteEntries[11].peBlue := 84; + FPaletteEntries[12].peRed := 84; { Blue Highlight } + FPaletteEntries[12].peGreen := 84; + FPaletteEntries[12].peBlue := 255; + FPaletteEntries[13].peRed := 255; { Magenta Highlight } + FPaletteEntries[13].peGreen := 84; + FPaletteEntries[13].peBlue := 255; + FPaletteEntries[14].peRed := 84; { Cyan highlight } + FPaletteEntries[14].peGreen := 255; + FPaletteEntries[14].peBlue := 255; + FPaletteEntries[15].peRed := 255; { White Highlight } + FPaletteEntries[15].peGreen := 255; + FPaletteEntries[15].peBlue := 255; + + for I := 0 to High(plgpl^.palPalEntry) do begin + plgpl^.PalPalEntry[I].peRed := FPaletteEntries[I].peRed; + plgpl^.PalPalEntry[I].peGreen := FPaletteEntries[I].peGreen; + plgpl^.PalPalEntry[I].peBlue := FPaletteEntries[I].peBlue; + plgpl^.PalPalEntry[I].peFlags := PC_NOCOLLAPSE; + end; + + FPal := CreatePalette(TPLogPalette(plgpl)^); + Dispose(plgpl); + + FScreen := TScreen.Create; + FVScrollBar := TScrollBar.Create(Self); + FFont := TFont.Create; + FFont.Name := 'Terminal'; + FFont.Size := 12; + FFont.Style := []; + FCharZoom := 1.0; + FLineZoom := 1.0; + SetupFont; + + FScreen.FXlatInputTable := @ibm_iso8859_1_G0; + FScreen.FXlatOutputTable := @ibm_iso8859_1_G0; + FScreen.OnCursorVisible := CursorVisibleEvent; + + FCursorVisible := TRUE; + Width := 250; + Height := 100; + FBorderStyle := bsSingle; + FBorderWidth := 1; + FAutoRepaint := TRUE; + FFkeys := 1; + FGraphicDraw := FALSE; + + with FVScrollBar do begin + Parent := Self; + Kind := sbVertical; + Width := 16; + Visible := TRUE; + Align := alRight; + OnScroll := VScrollBarScroll; + end; + AdjustScrollBar; + + with FScreen do begin + GotoXY(0, 0); + WriteStr('EmulVT'); + GotoXY(0, 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetRows(Value : Integer); +begin + with FScreen do begin + if FRowCount <> Value then begin + SetRowCount(Value); + AdjustScrollBar; + ClearScreen; + Repaint; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetRows : Integer; +begin + Result := FScreen.FRowCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCols(Value : Integer); +begin + with FScreen do begin + if FColCount <> Value then begin + FColCount := Value; + ClearScreen; + Repaint; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetCols : Integer; +begin + Result := FScreen.FColCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.CursorVisibleEvent(Sender : TObject); +begin + if FScreen.FCursorOff then begin + if FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + end + else begin + if FScreen.Focused and not FCaretShown then begin + ShowCaret(Handle); + FCaretShown := TRUE; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetAutoLF(Value : Boolean); +begin + FScreen.FAutoLF := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetAutoCR(Value : Boolean); +begin + FScreen.FAutoCR := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetLog(Value : Boolean); +begin + if FLog = Value then + Exit; + + FLog := Value; + + if FLog then begin +{$I-} + AssignFile(FFileHandle, 'EMULVT.LOG'); + Append(FFileHandle); + if IOResult <> 0 then + Rewrite(FFileHandle); + Write(FFileHandle, ''); +{$I+} + end + else begin + Write(FFileHandle, ''); + CloseFile(FFileHandle); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetXlat(Value : Boolean); +begin + FScreen.FNoXlat := not Value; + FScreen.FNoXlatInitial := not Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetXlat : Boolean; +begin + Result := not FScreen.FNoXlatInitial; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetAutoLF : Boolean; +begin + Result := FScreen.FAutoLF; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetAutoCR : Boolean; +begin + Result := FScreen.FAutoCR; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomEmulVT.Destroy; +begin + if FLog then + Log := FALSE; + + FFont.Free; + FVScrollBar.Free; + FScreen.Free; + DeleteObject(FPal); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetBackRows(Value : Integer); +begin + with FScreen do begin + if FBackRowCount <> Value then begin + SetBackRowCount(Value); + AdjustScrollBar; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetTopLine(Value : Integer); +begin + if Value < FVScrollBar.Min then + Value := FVScrollBar.Min; + if Value > FVScrollBar.Max then + Value := FVScrollBar.Max; + FTopLine := Value; + FVScrollBar.Position := FTopLine; + Repaint; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetBackRows : Integer; +begin + Result := FScreen.FBackRowCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetBackColor(Value : TBackColors); +begin + FScreen.FBackColor := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetBackColor : TBackColors; +begin + Result := FScreen.FBackColor; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetMarginColor(const Value: Integer); +begin + FMarginColor := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetLeftMargin(const Value: Integer); +begin + FLeftMargin := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetBottomMargin(const Value: Integer); +begin + FBottomMargin := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetRightMargin(const Value: Integer); +begin + FRightMargin := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetTopMargin(const Value: Integer); +begin + FTopMargin := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetOptions(Value : TScreenOptions); +begin + FScreen.FOptions := Value; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetOptions : TScreenOptions; +begin + Result := FScreen.FOptions; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetupFont; +var + DC : HDC; + Metrics : TTextMetric; + hObject : THandle; +begin + DC := GetDC(0); + hObject := SelectObject(DC, FFont.Handle); + GetTextMetrics(DC, Metrics); + SelectObject(DC, hOBject); + ReleaseDC(0, DC); + + SetCharWidth(Metrics.tmMaxCharWidth); + SetLineHeight(Metrics.tmHeight); + FInternalLeading := Metrics.tmInternalLeading; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCharWidth(newValue : Integer); +var + nCol : Integer; +begin + FCharWidth := newValue; + for nCol := Low(FCharPos) to High(FCharPos) do + FCharPos[nCol] := Trunc(FCharWidth * nCol * FCharZoom); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCharZoom(newValue : Single); +begin + FCharZoom := newValue; + SetCharWidth(FCharWidth); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetLineHeight(Value : Integer); +var + nRow : Integer; +begin + FLineHeight := Value; + for nRow := 0 to High(FLinePos) do { Jan 10, 2002 } + FLinePos[nRow] := Trunc(FLineHeight * nRow * FLineZoom); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetLineZoom(newValue : Single); +begin + FLineZoom := newValue; + SetLineHeight(FLineHeight); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetFont(Value : TFont); +begin + FFont.Assign(Value); +{$IFNDEF SINGLE_CHAR_PAINT} + FFont.Pitch := fpFixed; +{$ENDIF} + SetupFont; + SetCaret; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMLButtonDown(var Message: TWMLButtonDown); +begin + inherited; + SetFocus; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.VScrollBarScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); +begin + FTopLine := ScrollPos; + Repaint; + SetFocus; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.DoKeyBuffer(Buffer : PChar; Len : Integer); +var + J : Integer; + ch : Char; +begin + if Assigned(FOnKeyBuffer) then + FOnKeyBuffer(Self, Buffer, Len) + else begin + for J := 0 to Len - 1 do begin + ch := Buffer[J]; + KeyPress(ch); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.FindFKeys(ScanCode: Char; Shift: TShiftState; + Ext: Boolean) : PFuncKeyValue; +var + I : Integer; + pFKeys : PFuncKeysTable; +begin + Result := nil; + case FKeys of + 0 : pFKeys := @FKeys1; + 1 : pFKeys := @FKeys2; + 2 : pFKeys := @FKeys3; + else + pFKeys := @FKeys2; + end; + + for I := Low(pFKeys^) to High(pFKeys^) do begin + if (pFKeys^[I].ScanCode <> #0) and (pFKeys^[I].ScanCode = ScanCode) and + (pFKeys^[I].Shift = Shift) and + (pFKeys^[I].Ext = Ext) then begin + Result := @pFKeys^[I].Value; + Break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.ProcessFKeys(ScanCode: Char; Shift: TShiftState; + Ext: Boolean) : Boolean; +var + I : Integer; + pFKeys : PFuncKeysTable; +begin + Result := FALSE; + case FKeys of + 0 : pFKeys := @FKeys1; + 1 : pFKeys := @FKeys2; + 2 : pFKeys := @FKeys3; + else + pFKeys := @FKeys2; + end; + + for I := Low(pFKeys^) to High(pFKeys^) do begin + if (pFKeys^[I].ScanCode <> #0) and (pFKeys^[I].ScanCode = ScanCode) and + (pFKeys^[I].Shift = Shift) and + (pFKeys^[I].Ext = Ext) then begin + Result := TRUE; + DoKeyBuffer(@pFKeys^[I].Value[1], Length(pFKeys^[I].Value)); + Break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.AppMessageHandler(var Msg: TMsg; var Handled: Boolean); +const + v1 : String = 'aeiou'; + v2 : String = ''; + v3 : String = ''; + SpyFlag : Boolean = FALSE; +var + Shift : TShiftState; + ShiftLock : Boolean; + VirtKey : Integer; + Key : Char; + I : Integer; + ScanCode : Char; + Ext : Boolean; + SpyBuffer : String; + FnBuffer : String; + pFV : PFuncKeyValue; +begin + if (Msg.hWnd = Handle) and (Msg.Message = WM_KEYDOWN) then begin + VirtKey := Msg.wParam; + Key := chr(Msg.wParam and $FF); +{ DebugString('AppMessageHandler KEYDOWN ' + IntToHex(Msg.wParam, 4) + #13 + #10); } + Shift := KeyDataToShiftState(Msg.lParam); + ShiftLock := ((GetKeyState(VK_CAPITAL) and 1) > 0); + ScanCode := Chr(LOBYTE(HIWORD(Msg.lParam))); + Ext := ((Msg.lParam and $1000000) <> 0); + + if Assigned(FOnKeyDown) then begin + FOnKeyDown(Self, VirtKey, Shift, ShiftLock, ScanCode, Ext); + if VirtKey = 0 then begin + Handled := TRUE; + Exit; + end; + end; + + if (Msg.wParam <> VK_SHIFT) and + (Msg.wParam <> VK_CONTROL) and + (Msg.wParam <> VK_MENU) then begin + if (ScanCode = '7') and + (Shift = [ssAlt, ssCtrl]) and (Ext = FALSE) then begin + { This is CTRL-ALT-* (on num pad) } + SpyFlag := TRUE; + Handled := TRUE; + Exit; + end; + + if SpyFlag then begin + SpyFlag := FALSE; + pFV := FindFKeys(ScanCode, Shift, Ext); + SpyBuffer := IntToHex(Ord(ScanCode), 2) + ', ' + + ShiftStateToString(Shift) + ', '; + + if Ext then + SpyBuffer := SpyBuffer + 'TRUE' + else + SpyBuffer := SpyBuffer + 'FALSE'; + + if pFV <> nil then + SpyBuffer := SpyBuffer + ', ''' + + FuncKeyValueToString(pFV^) + ''''; + + SpyBuffer := SpyBuffer + #0; + ClipBoard.SetTextBuf(@SpyBuffer[1]); + + FnBuffer := 'Key definition from tnchrk' + + IntToStr(FKeys) + '.cfg' + #0; + Application.MessageBox(@SpyBuffer[1], @FnBuffer[1], MB_OK); + Handled := TRUE; + Exit; + end; + + if ProcessFKeys(ScanCode, Shift, Ext) then begin + Handled := TRUE; + Exit; + end; + end; + + case Msg.wParam of + VK_SHIFT, VK_CONTROL, VK_MENU: ; + + VK_NEXT, VK_PRIOR, VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT, VK_HOME, VK_END: + begin + if ProcessFKeys(ScanCode, Shift, TRUE) then begin + Handled := TRUE; + Exit; + end; + end; + VK_TAB, VK_RETURN, VK_ESCAPE, VK_BACK: + begin + Handled := TRUE; + end; + + $DD: + begin + if not (ssAlt in Shift) then begin + Key := #0; + Handled := TRUE; + if (ssShift in Shift) then + FFlagTrema := TRUE + else + FFlagCirconflexe := TRUE; + end; + end; + + ord('A')..ord('Z') : + begin + if (ssCtrl in Shift) then + Key := chr(Word(Key) and $1F) + else if not ShiftLock and not (ssShift in Shift) then + Key := chr(Word(Key) or $20); + if (FFlagCirconflexe) then begin + for I := Length(v1) downto 1 do begin + if Key = v1[I] then begin + Key := v2[I]; + Break; + end; + end; + FFlagCirconflexe := FALSE; + end; + if (FFlagTrema) then begin + for I := Length(v1) downto 1 do begin + if Key = v1[I] then begin + Key := v3[I]; + Break; + end; + end; + FFlagTrema := FALSE; + end; + Handled := TRUE; + end; + end; + +{ DebugString('Char = ' + IntToHex(Integer(Key), 2) + #13 + #10); } + if Handled and (Key <> #0) then + KeyPress(Key); + end; + + if not Handled and Assigned(FAppOnMessage) then + FAppOnMessage(Msg, Handled); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.KeyPress(var Key: Char); +begin + if not FScreen.FNoXlat then + Key := FScreen.FXlatOutputTable^[ord(Key)]; + + inherited KeyPress(Key); + if FLocalEcho then begin + WriteChar(Key); + if not FAutoRepaint then + UpdateScreen; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMSetFocus(var Message: TWMSetFocus); +begin +{ inherited; } + FScreen.Focused := TRUE; +{ SetupFont; } + + if not FCursorVisible then + Exit; + + CreateCaret(Handle, 0, 2, FLineHeight); + FCaretCreated := TRUE; + SetCaret; + if not FScreen.FCursorOff then begin + ShowCaret(Handle); + FCaretShown := TRUE; + end; + + FAppOnMessage := Application.OnMessage; + Application.OnMessage := AppMessageHandler; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMKillFocus(var Message: TWMKillFocus); +begin +{ inherited; } + FScreen.Focused := FALSE; + + if not FCursorVisible then + Exit; + + if FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + if FCaretCreated then begin + DestroyCaret; + FCaretCreated := FALSE; + end; + + Application.OnMessage := FAppOnMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.MouseToCell(X, Y: Integer; var ACol, ARow: Longint); +begin +{$IFDEF CHAR_ZOOM} + aRow := FScreen.FRowCount - 1; + while (Y - FTopMargin) <= FLinePos[aRow] do + Dec(aRow); +{$ELSE} + aRow := (Y - FTopMargin) div FLineHeight; +{$ENDIF} + if aRow < 0 then + aRow := 0 + else if aRow >= FScreen.FRowCount then + aRow := FScreen.FRowCount - 1; + +{$IFDEF CHAR_ZOOM} + aCol := FScreen.FColCount - 1; + while (X - FLeftMargin) <= FCharPos[aCol] do + Dec(aCol); +{$ELSE} + aCol := (X - FLeftMargin) div FCharWidth; +{$ENDIF} + if aCol < 0 then + aCol := 0 + else if aCol >= FScreen.FColCount then + aCol := FScreen.FColCount - 1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.ShowCursor; +begin + SetCaret; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMPaletteChanged(var Message : TMessage); +{var + HandleDC : HDC;} +begin +{ if Message.wParam <> Handle then begin + HandleDC := GetDC(Handle); + SelectPalette(HandleDC, FPal, FALSE); + if RealizePalette(HandleDC) <> 0 then begin + InvalidateRect(Handle, nil, TRUE); + MessageBeep(0); + end; + ReleaseDC(Handle, HandleDC); + end; +} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.UpdateScreen; +var + rc : TRect; +begin + if FScreen.FAllInvalid then + InvalidateRect(Handle, nil, FALSE) + else begin +{$Q-} + with FScreen.FInvRect do begin +{$IFDEF CHAR_ZOOM} + if Left = 9999 then begin + rc.Top := 0; + rc.Bottom := 0; + rc.Left := 0; + rc.Right := 0; + end + else begin + rc.Top := FTopMargin + FLinePos[Top - FTopLine] + FInternalLeading; + rc.Bottom := FTopMargin + FLinePos[Bottom + 1 - FTopLine] + FInternalLeading; + rc.Left := FLeftMargin + FCharPos[Left]; + rc.Right := FLeftMargin + FCharPos[Right + 1]; + end; +{$ELSE} + rc.Top := FTopMargin + FLineHeight * (Top - FTopLine) + FInternalLeading; + rc.Bottom := FTopMargin + FLineHeight * (Bottom + 1 - FTopLine) + FInternalLeading; + rc.Left := FLeftMargin + FCharWidth * Left; + rc.Right := FLeftMargin + FCharWidth * (Right + 1); +{$ENDIF} + end; + InvalidateRect(Handle, @rc, FALSE); +{$Q+} + end; + + { Invalidate the region where the caret is. I should'nt do that, but } + { if I do'nt, the caret remains where it is ! Bug ? } +{$IFDEF CHAR_ZOOM} + rc.Top := FLinePos[FScreen.FRow - FTopLine] + FTopMargin; + rc.Bottom := FLinePos[FScreen.FRow - FTopLine + 1] + FTopMargin; + rc.Left := FLeftMargin + FCharPos[FScreen.FCol]; + rc.Right := FLeftMargin + FCharPos[FScreen.FCol + 1]; +{$ELSE} + rc.Top := FTopMargin + FLineHeight * (FScreen.FRow - FTopLine); + rc.Bottom := rc.Top + FLineHeight; + rc.Left := FLeftMargin + FCharWidth * FScreen.FCol; + rc.Right := rc.Left + FCharWidth; +{$ENDIF} + InvalidateRect(Handle, @rc, FALSE); + + FScreen.InvClear; + + if FCaretCreated then begin + ShowCaret(Handle); + FCaretShown := TRUE; + end; + SetCaret; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.SnapPixelToRow(Y : Integer) : Integer; +var + nRow : Integer; +begin + nRow := PixelToRow(Y); +{$IFDEF CHAR_ZOOM} + Result := FTopMargin + FLinePos[nRow]; +{$ELSE} + Result := FTopMargin + nRow * FLineHeight; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.SnapPixelToCol(X : Integer) : Integer; +var + nCol : Integer; +begin + nCol := PixelToCol(X); +{$IFDEF CHAR_ZOOM} + Result := FLeftMargin + FCharPos[nCol]; +{$ELSE} + Result := FLeftMargin + nCol * FCharWidth; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.PixelToRow(Y : Integer) : Integer; +var + nRow : Integer; +begin +{$IFDEF CHAR_ZOOM} + nRow := FScreen.FRowCount - 1; + while (nRow > 0) and ((Y - FTopMargin) < FLinePos[nRow]) do + Dec(nRow); +{$ELSE} + nRow := (Y - FTopMargin) div FLineHeight; +{$ENDIF} + if nRow < 0 then + nRow := 0; + Result := nRow; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.PixelToCol(X : Integer) : Integer; +var + nCol : Integer; +begin +{$IFDEF CHAR_ZOOM} + nCol := FScreen.FColCount - 1; + while (X - FLeftMargin) < FCharPos[nCol] do + Dec(nCol); +{$ELSE} + nCol := (X - FLeftMargin) div FCharWidth; +{$ENDIF} + if nCol < 0 then + nCol := 0; + Result := nCol; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure will paint graphic char from the OEM charset (lines, } +{ corners, T and other like) using GDI functions. This will result in } +{ autosized characters, necessary for example to draw a frame when zoom } +{ affect character and line spacing. } +procedure TCustomEmulVT.PaintGraphicChar( + DC : HDC; + X, Y : Integer; + rc : PRect; + ch : Char); +const + OneSpace : Char = ' '; +var + X1, X2, X3 : Integer; + Y1, Y2, Y3 : Integer; + Co : TColor; +begin + ExtTextOut(DC, + X, Y, + ETO_OPAQUE or ETO_CLIPPED, rc, + @OneSpace, 1, nil); + X1 := X; + X3 := rc^.Right; + X2 := (X1 + X3) div 2; + Y1 := rc^.Top; + Y3 := rc^.Bottom; + Y2 := (Y1 + Y3) div 2; + case Ch of + #$C4: begin { Horizontal single line } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + end; + #$B3: begin { Vertical single line } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + end; + #$DA: begin { Upper Left Single Corner } + Canvas.MoveTo(X3, Y2); + Canvas.LineTo(X2, Y2); + Canvas.LineTo(X2, Y3); + end; + #$C0: begin { Bottom Left Single Corner } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y2); + Canvas.LineTo(X3, Y2); + end; + #$C1: begin { Reverse T } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y2); + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + end; + #$C2: begin { T } + Canvas.MoveTo(X2, Y3); + Canvas.LineTo(X2, Y2); + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + end; + #$C3: begin { Left T } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + Canvas.MoveTo(X2, Y2); + Canvas.LineTo(X3, Y2); + end; + #$B4: begin { Right T } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + Canvas.MoveTo(X2, Y2); + Canvas.LineTo(X1 - 1, Y2); + end; + #$BF: begin { Top Right Single Corner } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X2, Y2); + Canvas.LineTo(X2, Y3); + end; + #$D9: begin { Bottom Right Single Corner } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X2, Y2); + Canvas.LineTo(X2, Y1 - 1); + end; + #$D6: begin { Upper Left Single/Double Corner } + Canvas.MoveTo(X3, Y2); + Canvas.LineTo(X2 - 1, Y2); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y2); + Canvas.LineTo(X2 + 1, Y3); + end; + #$D3: begin { Bottom Left Single/Double Corner } + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y2); + Canvas.LineTo(X3, Y2); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2); + end; + #$B7: begin { Top Right Single/Double Corner } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X2 + 1, Y2); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y2); + Canvas.LineTo(X2 - 1, Y3); + end; + #$BD: begin { Bottom Right Single/Double Corner } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2); + Canvas.LineTo(X1 - 1, Y2); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y2); + end; + #$D5: begin { Upper Left Double/Single Corner } + Canvas.MoveTo(X3, Y2 - 1); + Canvas.LineTo(X2, Y2 - 1); + Canvas.LineTo(X2, Y3); + Canvas.MoveTo(X3, Y2 + 1); + Canvas.LineTo(X2, Y2 + 1); + end; + #$D4: begin { Bottom Left Double/Single Corner } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X2, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + end; + #$B8: begin { Top Right Double/Single Corner } + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2, Y2 - 1); + Canvas.LineTo(X2, Y3); + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2, Y2 + 1); + end; + #$BE: begin { Bottom Right Double/Single Corner } + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y2 + 1); + Canvas.LineTo(X1 - 1, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2, Y2 - 1); + end; + #$CD: begin { Horizontal Double line } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + end; + #$BA: begin { Vertical Double line } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y3); + end; + #$D1: begin { T Top Horizontal Double line } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X2, Y2 + 1); + Canvas.LineTo(X2, Y3); + end; + #$CF: begin { T Bottom Horizontal Double line } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X2, Y2 - 1); + Canvas.LineTo(X2, Y1); + end; + #$C6: begin { T Left Horizontal Double line } + Canvas.MoveTo(X2, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X2, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + end; + #$B5: begin { T Right Horizontal Double line } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2, Y2 - 1); + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + end; + #$C9: begin { Upper Left Double Corner } + Canvas.MoveTo(X3, Y2 - 1); + Canvas.LineTo(X2 - 1, Y2 - 1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X3, Y2 + 1); + Canvas.LineTo(X2 + 1, Y2 + 1); + Canvas.LineTo(X2 + 1, Y3); + end; + #$C8: begin { Bottom Left Double Corner } + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + end; + #$BB: begin { Top Right Double Corner } + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2 + 1, Y2 - 1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y3); + end; + #$BC: begin { Bottom Right Double Corner } + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y2 - 1); + Canvas.LineTo(X1 - 1, Y2 - 1); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2 + 1); + Canvas.LineTo(X1 - 1, Y2 + 1); + end; + #$CC: begin { Double left T } + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X3, Y2 + 1); + Canvas.LineTo(X2 + 1, Y2 + 1); + Canvas.LineTo(X2 + 1, Y3); + end; + #$B9: begin { Double Right T } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y2 - 1); + Canvas.LineTo(X1 - 1, Y2 - 1); + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y3); + end; + #$C7: begin { Double T Single Left } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y2); + Canvas.LineTo(X3, Y2); + end; + #$B6: begin { Double T Single Right } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 - 1, Y2); + Canvas.LineTo(X1 - 1, Y2); + end; + #$D2: begin { Single T Double Top } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + Canvas.MoveTo(X2 - 1, Y2); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y2); + Canvas.LineTo(X2 + 1, Y3); + end; + #$D0: begin { Single T Double Bottom } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + Canvas.MoveTo(X2 - 1, Y2); + Canvas.LineTo(X2 - 1, Y1); + Canvas.MoveTo(X2 + 1, Y2); + Canvas.LineTo(X2 + 1, Y1); + end; + #$DB: begin { Full Block } + Canvas.Rectangle(X1, Y1, X3, Y3); + end; + #$DC: begin { Half Bottom Block } + Canvas.Rectangle(X1, Y2, X3, Y3); + end; + #$DD: begin { Half Left Block } + Canvas.Rectangle(X1, Y1, X2, Y3); + end; + #$DE: begin { Half Right Block } + Canvas.Rectangle(X2, Y1, X3, Y3); + end; + #$DF: begin { Half Top Block } + Canvas.Rectangle(X1, Y1, X2, Y2); + end; + #$C5: begin { Single Cross } + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + end; + #$CE: begin { Double Cross } + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2 - 1, Y2 - 1); + Canvas.LineTo(X2 - 1, Y1); + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X2 + 1, Y3); + Canvas.LineTo(X2 + 1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + end; + #$D8: begin { Cross Double Horizontal Single vertical } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X2, Y1); + Canvas.LineTo(X2, Y3); + end; + #$D7: begin { Cross Single Horizontal Double Vertical } + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y3); + Canvas.MoveTo(X2 - 1, Y1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X1, Y2); + Canvas.LineTo(X3, Y2); + end; + #$CA: begin { Double T bottom } + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X2 - 1, Y2 - 1); + Canvas.LineTo(X2 - 1, Y1); + Canvas.MoveTo(X2 + 1, Y1); + Canvas.LineTo(X2 + 1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + end; + #$CB: begin { Double T } + Canvas.MoveTo(X1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y2 + 1); + Canvas.LineTo(X2 - 1, Y3); + Canvas.MoveTo(X2 + 1, Y3); + Canvas.LineTo(X2 + 1, Y2 + 1); + Canvas.LineTo(X3, Y2 + 1); + Canvas.MoveTo(X1, Y2 - 1); + Canvas.LineTo(X3, Y2 - 1); + end; + #$B0: begin + Co := Canvas.Pen.Color; + for Y := Y1 to Y3 do begin + X := X1 + (Y mod 3); + while X < X3 do begin + Canvas.Pixels[X, Y] := Co; + X := X + 3; + end; + end; + end; + #$B1: begin + Co := Canvas.Pen.Color; + for Y := Y1 to Y3 do begin + X := X1 + (Y and 1); + while X < X3 do begin + Canvas.Pixels[X, Y] := Co; + X := X + 2; + end; + end; + end; + #$B2: begin + Co := Canvas.Pen.Color; + for Y := Y1 to Y3 do begin + X := X1 + (Y mod 3); + while X < X3 do begin + Canvas.Pixels[X, Y] := Co; + Inc(X); + if X < X3 then + Canvas.Pixels[X, Y] := Co; + Inc(X); + Inc(X); + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.PaintOneLine( + DC : HDC; + Y, Y1 : Integer; + const Line : TLine; + nColFrom : Integer; + nColTo : Integer; + Blank : Boolean); +var + rc : TRect; + nCnt : Integer; + nAtt : Byte; + X : Integer; + nChr : Integer; + Ch : Char; +const + BlankLine : array [0..MAX_COL] of char = ''; +begin + nAtt := Line.Att[nColFrom]; + +{ if nAtt = $0B then + X := 0; } +{ + SetBkColor(DC, PALETTEINDEX(nAtt div $0F)); + SetTextColor(DC, PALETTEINDEX(nAtt and $0F)); +} + if not FMonoChrome then begin + with FPaletteEntries[(nAtt shr 4) and $0F] do + SetBkColor(DC, PALETTERGB(peRed, peGreen, peBlue)); + with FPaletteEntries[nAtt and $0F] do begin + SetTextColor(DC, PALETTERGB(peRed, peGreen, peBlue)); + Canvas.Pen.Color := PALETTERGB(peRed, peGreen, peBlue); + Canvas.Brush.Color := PALETTERGB(peRed, peGreen, peBlue); + end; + end + else begin + if (nAtt div $0F) <> 0 then + SetBkColor(DC, RGB(127, 127, 127)) + else + SetBkColor(DC, RGB(255, 255, 255)); + + if (nAtt and $0F) <> 0 then + SetTextColor(DC, RGB(0, 0, 0)) + else + SetTextColor(DC, RGB(255, 255, 255)); + end; + + nCnt := nColTo - nColFrom; + nChr := 0; +{$IFDEF SINGLE_CHAR_PAINT} + while nChr < nCnt do begin +{$IFDEF CHAR_ZOOM} + X := FLeftMargin + FCharPos[nColFrom + nChr]; + rc.Top := Y + FInternalLeading; + rc.Bottom := Y1 + FInternalLeading; + rc.Left := X; + rc.Right := FLeftMargin + FCharPos[nColFrom + nChr + 1]; +{$ELSE} + X := FLeftMargin + (nColFrom + nChr) * FCharWidth; + rc.Top := Y + FInternalLeading; + rc.Bottom := Y1 + FInternalLeading; + rc.Left := X; + rc.Right := rc.Left + FCharWidth; +{$ENDIF} + if (nColFrom + nChr) = 0 then + rc.Left := rc.Left - FLeftMargin; + if (nColFrom + nChr) >= FScreen.FColCount then + rc.Right := rc.Right + FRightMargin; + if Blank then + Ch := ' ' + else + Ch := Line.Txt[nColFrom + nChr]; + if FGraphicDraw and + (FScreen.FXlatOutputTable = @ibm_iso8859_1_G0) and + (Ch >= #$B0) and (Ch <= #$DF) and + (Ch in [#$B3, #$C4, #$DA, #$C0, #$C1, #$C2, #$C3, #$B4, #$BF, #$D9, + #$DB, #$DC, #$DD, #$DE, #$DF, + #$BA, #$CD, #$C9, #$C8, #$BB, #$BC, + #$CC, #$B9, #$C7, #$B6, #$D2, #$D0, + #$D5, #$D4, #$B8, #$BE, + #$C6, #$D1, #$B5, #$CF, + #$D6, #$B7, #$D3, #$BD, + #$C5, #$CE, #$D8, #$D7, #$CA, #$CB, + #$B0, #$B1, #$B2]) then + PaintGraphicChar(DC, X, Y, @rc, Ch) + else + ExtTextOut(DC, X, Y, ETO_OPAQUE or ETO_CLIPPED, @rc, @Ch, 1, nil); + Inc(nChr); + end; +{$ELSE} +{$IFDEF CHAR_ZOOM} + X := LeftMargin + FCharPos[nColFrom]; + rc.Top := Y + FInternalLeading; + rc.Bottom := Y1 + FInternalLeading; + rc.Left := X; + rc.Right := LeftMargin + FCharPos[nColFrom + nCnt]; +{$ELSE} + X := LeftMargin + nColFrom * FCharWidth; + rc.Top := Y + FInternalLeading; + rc.Bottom := Y1 + FInternalLeading; + rc.Left := X; + rc.Right := rc.Left + nCnt * FCharWidth; +{$ENDIF} + if nColFrom = 0 then + rc.Left := rc.Left - LeftMargin; + if nColTo >= FScreen.FColCount then + rc.Right := rc.Right + RightMargin; + if Blank then + ExtTextOut(DC, + X, Y, + ETO_OPAQUE or ETO_CLIPPED, @rc, + @BlankLine[0], nCnt, nil) + else + ExtTextOut(DC, + X, Y, + ETO_OPAQUE or ETO_CLIPPED, @rc, + @Line.Txt[nColFrom], nCnt, nil); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMPaint(var Message: TWMPaint); +var + DC : HDC; + PS : TPaintStruct; + Y, Y1 : Integer; + rc : TRect; + OldPen : THandle; + OldBrush : THandle; + OldFont : THandle; + rcPaint : TRect; + DrawRct : TRect; + nRow : Integer; + nCol : Integer; + nColFrom : Integer; + Line : TLine; + BackBrush : HBrush; + BackIndex : Integer; +begin + { This may be a bit of overkill but we have to keep the scrollbar tracking + with the number of lines visible on the screen. The calling program can + change the Height of the screen and we don't have a good way to know that. + This routine will get called whenever the screen gets updated so it is a + good time to update the scrollbar. } + AdjustScrollBar; + + if not GetUpdateRect(WindowHandle, rc, FALSE) then + Exit; + + BackBrush := 0; + OldBrush := 0; + + DC := Message.DC; + if DC = 0 then + DC := BeginPaint(WindowHandle, PS); + try + if not FMonoChrome then begin + SelectPalette(DC, FPal, FALSE); + RealizePalette(DC); + if FMarginColor = -1 then + BackIndex := FScreen.FAttribute div $0F + else + BackIndex := FMarginColor mod NumPaletteEntries; + with FPaletteEntries[BackIndex] do + BackBrush := CreateSolidBrush(PALETTERGB(peRed, peGreen, peBlue)); + OldBrush := SelectObject(DC, BackBrush); + end; + + WinProcs.GetClientRect(WindowHandle, DrawRct); + rcPaint := PS.rcPaint; + rc.Left := 2; + rc.Right := DrawRct.Right - 2; + nRow := PixelToRow(rcPaint.top); + nRow := nRow - 1; + if nRow < 0 then + nRow := 0; + +{$IFDEF CHAR_ZOOM} + Y := FTopMargin + FLinePos[nRow]; + Y1 := FTopMargin + FLinePos[nRow + 1]; +{$ELSE} + Y := FTopMargin + nRow * FLineHeight; + Y1 := Y + FLineHeight; +{$ENDIF} + + if rcPaint.Top <= FTopMargin then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, rcPaint.left, rcPaint.Top, + rcPaint.Right + 1, + FTopMargin + FInternalLeading + 1); + SelectObject(DC, OldPen); + end; + + if (nRow = 0) and (FInternalLeading > 0) then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, rcPaint.left, rcPaint.Top, + rcPaint.Right + 1, + Y + FInternalLeading + 1); + SelectObject(DC, OldPen); + end; + + OldFont := SelectObject(DC, FFont.Handle); + nRow := nRow + FTopLine; + while nRow < FScreen.FRowCount do begin + rc.Top := Y; + rc.Bottom := Y + FLineHeight; + if rc.Bottom > (DrawRct.Bottom - FBottomMargin) then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, rc.Left - 2, rc.Top, rc.Right + 1, + DrawRct.Bottom - 1); + SelectObject(DC, OldPen); + Break; + end; + Line := FScreen.Lines[nRow]; + + nCol := 0; + nColFrom := 0; + while nCol < FScreen.FColCount do begin + while (nCol < FScreen.FColCount) and + (Line.Att[nCol] = Line.Att[nColFrom]) do + Inc(nCol); + + PaintOneLine(DC, Y, Y1, Line, nColFrom, nCol, FALSE); + nColFrom := nCol; + end; + + nRow := nRow + 1; +{$IFDEF CHAR_ZOOM} + Y := FTopMargin + FLinePos[nRow - FTopLine]; + Y1 := FTopMargin + FLinePos[nRow + 1 - FTopLine]; +{$ELSE} + Y := Y + FLineHeight; + Y1 := Y + FLineHeight; +{$ENDIF} + if Y > rcPaint.Bottom then + Break; + end; + + { Fill region between last text line and bottom of the window } + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + if (FScreen.FRowCount - FTopLine) <= MAX_ROW then begin { WM + SE 09/08/00 } + WinProcs.Rectangle(DC, rc.Left - 2, + FTopMargin + FLinePos[FScreen.FRowCount - FTopLine]{ + 1}, + rc.Right + 3, DrawRct.Bottom + 1); +{ + Line := FScreen.Lines[FScreen.FRowCount - 1]; + nCol := 0; + nColFrom := 0; + while nCol < FScreen.FColCount do begin + while (nCol < FScreen.FColCount) and + (Line.Att[nCol] = Line.Att[nColFrom]) do + Inc(nCol); + + PaintOneLine(DC, Y, Y1, Line, nColFrom, nCol, TRUE); + nColFrom := nCol; + end; +} + end; + SelectObject(DC, OldPen); + +{$IFDEF CHAR_ZOOM} + if (FLeftMargin + FCharPos[FScreen.FColCount]) < rc.Right then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, FLeftMargin + FCharPos[FScreen.FColCount], + FTopMargin, { 09/03/99 } + rcPaint.Right + 1, DrawRct.Bottom + 1); + SelectObject(DC, OldPen); + end; +{$ELSE} + if (FLeftMargin + FScreen.FColCount * FCharWidth) < rc.Right then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, FLeftMargin + FScreen.FColCount * FCharWidth, + FTopMargin, rc.Right + 1, DrawRct.Bottom - 1); + SelectObject(DC, OldPen); + end; +{$ENDIF} + + if FSelectRect.Top <> -1 then begin + SelectObject(DC, GetStockObject(NULL_BRUSH)); + SelectObject(DC, GetStockObject(BLACK_PEN)); + WinProcs.Rectangle(DC, FSelectRect.Left, + FSelectRect.Top, + FSelectRect.Right + 1, + FSelectRect.Bottom - 1); + SelectObject(DC, GetStockObject(WHITE_PEN)); + WinProcs.Rectangle(DC, FSelectRect.Left - 1, + FSelectRect.Top - 1, + FSelectRect.Right + 2, + FSelectRect.Bottom); + end; + + SelectObject(DC, OldFont); + if OldBrush <> 0 then + SelectObject(DC, OldBrush); + if BackBrush <> 0 then + DeleteObject(BackBrush); + finally + if Message.DC = 0 then + EndPaint(WindowHandle, PS); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/fingcli.dcr b/lib/ics/Delphi/Vc32/fingcli.dcr new file mode 100644 index 00000000..05ee5530 Binary files /dev/null and b/lib/ics/Delphi/Vc32/fingcli.dcr differ diff --git a/lib/ics/Delphi/Vc32/formpos.dcu b/lib/ics/Delphi/Vc32/formpos.dcu new file mode 100644 index 00000000..1a223956 Binary files /dev/null and b/lib/ics/Delphi/Vc32/formpos.dcu differ diff --git a/lib/ics/Delphi/Vc32/formpos.pas b/lib/ics/Delphi/Vc32/formpos.pas new file mode 100644 index 00000000..91544e92 --- /dev/null +++ b/lib/ics/Delphi/Vc32/formpos.pas @@ -0,0 +1,167 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FormPos; + +interface + +uses + Forms, IniFiles, SysUtils, Dialogs, WinTypes, WinProcs; + +Procedure LoadFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName: string); +Procedure SaveFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName: string); + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Gnre un chane du genre 'Left, Top, Height, Width, WindowState' *} +{* en vue de la placer dans un section d'un fichier INI *} +function WindowPosToStr(Form : TForm; iWindowState : integer) : string; +begin + Result := IntToStr(Form.Left) + ', ' + + IntToStr(Form.Top) + ', ' + + IntToStr(Form.Height) + ', ' + + IntToStr(Form.Width) + ', ' + + IntToStr(iWindowState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Recoit un string sous forme '100, 200, 300, 500, 0' et affecte *} +{* respectivement ces valeurs a Form.LEFT, Form.Top, Form.Heigt, *} +{* Form.Width, Form.WindowState *} +procedure StrToWindowPos(sBuffer : string; Form : TForm); +var + ilen, i, k : integer; + sDst : string; +begin + ilen := length(sBuffer); + k := 0; + sDst := ''; + + {i = indice ds sBuffer; j = Indice ds sDst; k = nbre d'occurences trouvs } + for i := 1 to ilen + 1 do begin + if (i > ilen) or (sBuffer[i] = ',') then begin + k := k + 1; + case k of + 1: Form.Left := StrToInt(sDst); + 2: Form.Top := StrToInt(sDst); + 3: Form.Height := StrToInt(sDst); + 4: Form.Width := StrToInt(sDst); + 5: Form.WindowState := TWindowState(StrToInt(sDst)); + else + break; + end; + sDst := ''; + end + else + sDst := sDst + sBuffer[i]; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure LoadFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName : string); +var + IniFile: TIniFile; + sWindowPositions : string; +begin + if Length(IniFileName) = 0 then + Exit; + + { Create inifile object => Open ini file } + IniFile := TIniFile.Create(IniFilename); + + {Formatage par dfaut de la ligne de la section window} + sWindowPositions := WindowPosToStr(Form, ord(Form.WindowState)); + + { Get widow's position and size from ini file } + sWindowPositions := IniFile.ReadString(SectionName, + KeyName, + sWindowPositions); + StrToWindowPos(sWindowPositions, Form); + + + { Destroy inifile object => close ini file } + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure SaveFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName : string); +var + IniFile : TIniFile; + iWindowState : integer; +begin + if Length(IniFileName) = 0 then + Exit; + + { Create inifile object => Open ini file } + IniFile := TIniFile.Create(IniFilename); + + iWindowState := ord(Form.WindowState); + + { If window minimized or maximized, restore to normal state } + if Form.WindowState <> wsNormal then + Form.WindowState := wsNormal; + + { Save the window's postion and size to the ini file } + IniFile.WriteString(SectionName, + KeyName, + WindowPosToStr(Form, iWindowState)); + + { Destroy inifile object => close ini file } + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/ftpcli.dcr b/lib/ics/Delphi/Vc32/ftpcli.dcr new file mode 100644 index 00000000..e577474f Binary files /dev/null and b/lib/ics/Delphi/Vc32/ftpcli.dcr differ diff --git a/lib/ics/Delphi/Vc32/ftpsrv.dcr b/lib/ics/Delphi/Vc32/ftpsrv.dcr new file mode 100644 index 00000000..ad818441 Binary files /dev/null and b/lib/ics/Delphi/Vc32/ftpsrv.dcr differ diff --git a/lib/ics/Delphi/Vc32/httpprot.dcr b/lib/ics/Delphi/Vc32/httpprot.dcr new file mode 100644 index 00000000..31887652 Binary files /dev/null and b/lib/ics/Delphi/Vc32/httpprot.dcr differ diff --git a/lib/ics/Delphi/Vc32/icmp.dcu b/lib/ics/Delphi/Vc32/icmp.dcu new file mode 100644 index 00000000..925a373b Binary files /dev/null and b/lib/ics/Delphi/Vc32/icmp.dcu differ diff --git a/lib/ics/Delphi/Vc32/icmp.pas b/lib/ics/Delphi/Vc32/icmp.pas new file mode 100644 index 00000000..b01646ae --- /dev/null +++ b/lib/ics/Delphi/Vc32/icmp.pas @@ -0,0 +1,449 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This unit encapsulate the ICMP.DLL into an object of type TICMP. + Using this object, you can easily ping any host on your network. + Works only in 32 bits mode (no Delphi 1) under NT or 95. + TICMP is perfect for a console mode program, but if you build a + GUI program, you could use the TPing object wich is a true VCL + encapsulating the TICMP object. Then you can use object inspector + to change properties or event handler. This is much simpler to + use for a GUI program. +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Creation: January 6, 1997 +Version: 1.04 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Dec 13, 1997 V1.01 Added OnEchoRequest and OnEchoReply events and removed the + corresponding OnDisplay event. This require to modify existing + programs. +Mar 15, 1998 V1.02 Deplaced address resolution just before use +Sep 24, 1998 V1.93 Changed TIPAddr and others to LongInt to avoid range error + problems with Delphi 4 +Jan 24, 1999 V1.11 Surfaced Flags property to allow fragmentation check + (Flags = IP_FLAG_DF to enable fragmentation check) + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Icmp; + +interface + +{$IFDEF VER80} +// This source file is *NOT* compatible with Delphi 1 because it uses +// Win 32 features. +{$ENDIF} + +uses + Windows, SysUtils, Classes, WinSock; + +const + IcmpVersion = 102; + IcmpDLL = 'icmp.dll'; + + // IP status codes returned to transports and user IOCTLs. + IP_SUCCESS = 0; + IP_STATUS_BASE = 11000; + IP_BUF_TOO_SMALL = (IP_STATUS_BASE + 1); + IP_DEST_NET_UNREACHABLE = (IP_STATUS_BASE + 2); + IP_DEST_HOST_UNREACHABLE = (IP_STATUS_BASE + 3); + IP_DEST_PROT_UNREACHABLE = (IP_STATUS_BASE + 4); + IP_DEST_PORT_UNREACHABLE = (IP_STATUS_BASE + 5); + IP_NO_RESOURCES = (IP_STATUS_BASE + 6); + IP_BAD_OPTION = (IP_STATUS_BASE + 7); + IP_HW_ERROR = (IP_STATUS_BASE + 8); + IP_PACKET_TOO_BIG = (IP_STATUS_BASE + 9); + IP_REQ_TIMED_OUT = (IP_STATUS_BASE + 10); + IP_BAD_REQ = (IP_STATUS_BASE + 11); + IP_BAD_ROUTE = (IP_STATUS_BASE + 12); + IP_TTL_EXPIRED_TRANSIT = (IP_STATUS_BASE + 13); + IP_TTL_EXPIRED_REASSEM = (IP_STATUS_BASE + 14); + IP_PARAM_PROBLEM = (IP_STATUS_BASE + 15); + IP_SOURCE_QUENCH = (IP_STATUS_BASE + 16); + IP_OPTION_TOO_BIG = (IP_STATUS_BASE + 17); + IP_BAD_DESTINATION = (IP_STATUS_BASE + 18); + + // status codes passed up on status indications. + IP_ADDR_DELETED = (IP_STATUS_BASE + 19); + IP_SPEC_MTU_CHANGE = (IP_STATUS_BASE + 20); + IP_MTU_CHANGE = (IP_STATUS_BASE + 21); + + IP_GENERAL_FAILURE = (IP_STATUS_BASE + 50); + + MAX_IP_STATUS = IP_GENERAL_FAILURE; + + IP_PENDING = (IP_STATUS_BASE + 255); + + // IP header flags + IP_FLAG_DF = $02; // Don't fragment this packet. + + // IP Option Types + IP_OPT_EOL = $00; // End of list option + IP_OPT_NOP = $01; // No operation + IP_OPT_SECURITY = $82; // Security option. + IP_OPT_LSRR = $83; // Loose source route. + IP_OPT_SSRR = $89; // Strict source route. + IP_OPT_RR = $07; // Record route. + IP_OPT_TS = $44; // Timestamp. + IP_OPT_SID = $88; // Stream ID (obsolete) + MAX_OPT_SIZE = $40; + +type + // IP types + TIPAddr = LongInt; // An IP address. + TIPMask = LongInt; // An IP subnet mask. + TIPStatus = LongInt; // Status code returned from IP APIs. + + PIPOptionInformation = ^TIPOptionInformation; + TIPOptionInformation = packed record + TTL: Byte; // Time To Live (used for traceroute) + TOS: Byte; // Type Of Service (usually 0) + Flags: Byte; // IP header flags (usually 0) + OptionsSize: Byte; // Size of options data (usually 0, max 40) + OptionsData: PChar; // Options data buffer + end; + + PIcmpEchoReply = ^TIcmpEchoReply; + TIcmpEchoReply = packed record + Address: TIPAddr; // Replying address + Status: DWord; // IP status value + RTT: DWord; // Round Trip Time in milliseconds + DataSize: Word; // Reply data size + Reserved: Word; // Reserved + Data: Pointer; // Pointer to reply data buffer + Options: TIPOptionInformation; // Reply options + end; + + // IcmpCreateFile: + // Opens a handle on which ICMP Echo Requests can be issued. + // Arguments: + // None. + // Return Value: + // An open file handle or INVALID_HANDLE_VALUE. Extended error information + // is available by calling GetLastError(). + TIcmpCreateFile = function: THandle; stdcall; + + // IcmpCloseHandle: + // Closes a handle opened by ICMPOpenFile. + // Arguments: + // IcmpHandle - The handle to close. + // Return Value: + // TRUE if the handle was closed successfully, otherwise FALSE. Extended + // error information is available by calling GetLastError(). + TIcmpCloseHandle = function(IcmpHandle: THandle): Boolean; stdcall; + + // IcmpSendEcho: + // Sends an ICMP Echo request and returns one or more replies. The + // call returns when the timeout has expired or the reply buffer + // is filled. + // Arguments: + // IcmpHandle - An open handle returned by ICMPCreateFile. + // DestinationAddress - The destination of the echo request. + // RequestData - A buffer containing the data to send in the + // request. + // RequestSize - The number of bytes in the request data buffer. + // RequestOptions - Pointer to the IP header options for the request. + // May be NULL. + // ReplyBuffer - A buffer to hold any replies to the request. + // On return, the buffer will contain an array of + // ICMP_ECHO_REPLY structures followed by options + // and data. The buffer should be large enough to + // hold at least one ICMP_ECHO_REPLY structure + // and 8 bytes of data - this is the size of + // an ICMP error message. + // ReplySize - The size in bytes of the reply buffer. + // Timeout - The time in milliseconds to wait for replies. + // Return Value: + // Returns the number of replies received and stored in ReplyBuffer. If + // the return value is zero, extended error information is available + // via GetLastError(). + TIcmpSendEcho = function(IcmpHandle: THandle; + DestinationAddress: TIPAddr; + RequestData: Pointer; + RequestSize: Word; + RequestOptions: PIPOptionInformation; + ReplyBuffer: Pointer; + ReplySize: DWord; + Timeout: DWord + ): DWord; stdcall; + + // Event handler type declaration for TICMP.OnDisplay event. + TICMPDisplay = procedure(Sender: TObject; Msg : String) of object; + TICMPReply = procedure(Sender: TObject; Error : Integer) of object; + + // The object wich encapsulate the ICMP.DLL + TICMP = class(TObject) + private + hICMPdll : HModule; // Handle for ICMP.DLL + IcmpCreateFile : TIcmpCreateFile; + IcmpCloseHandle : TIcmpCloseHandle; + IcmpSendEcho : TIcmpSendEcho; + hICMP : THandle; // Handle for the ICMP Calls + FReply : TIcmpEchoReply; // ICMP Echo reply buffer + FAddress : String; // Address given + FHostName : String; // Dotted IP of host (output) + FHostIP : String; // Name of host (Output) + FIPAddress : TIPAddr; // Address of host to contact + FSize : Integer; // Packet size (default to 56) + FTimeOut : Integer; // Timeout (default to 4000mS) + FTTL : Integer; // Time To Live (for send) + FFlags : Integer; // Options flags + FOnDisplay : TICMPDisplay; // Event handler to display + FOnEchoRequest : TNotifyEvent; + FOnEchoReply : TICMPReply; + FLastError : DWORD; // After sending ICMP packet + FAddrResolved : Boolean; + procedure ResolveAddr; + public + constructor Create; virtual; + destructor Destroy; override; + function Ping : Integer; + procedure SetAddress(Value : String); + function GetErrorString : String; + + property Address : String read FAddress write SetAddress; + property Size : Integer read FSize write FSize; + property Timeout : Integer read FTimeout write FTimeout; + property Reply : TIcmpEchoReply read FReply; + property TTL : Integer read FTTL write FTTL; + Property Flags : Integer read FFlags write FFlags; + property ErrorCode : DWORD read FLastError; + property ErrorString : String read GetErrorString; + property HostName : String read FHostName; + property HostIP : String read FHostIP; + property OnDisplay : TICMPDisplay read FOnDisplay write FOnDisplay; + property OnEchoRequest : TNotifyEvent read FOnEchoRequest + write FOnEchoRequest; + property OnEchoReply : TICMPReply read FOnEchoReply + write FOnEchoReply; + end; + + TICMPException = class(Exception); + +implementation + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TICMP.Create; +var + WSAData: TWSAData; +begin + hICMP := INVALID_HANDLE_VALUE; + FSize := 56; + FTTL := 64; + FTimeOut := 4000; + + // initialise winsock + if WSAStartup($101, WSAData) <> 0 then + raise TICMPException.Create('Error initialising Winsock'); + + // register the icmp.dll stuff + hICMPdll := LoadLibrary(icmpDLL); + if hICMPdll = 0 then + raise TICMPException.Create('Unable to register ' + icmpDLL); + + @ICMPCreateFile := GetProcAddress(hICMPdll, 'IcmpCreateFile'); + @IcmpCloseHandle := GetProcAddress(hICMPdll, 'IcmpCloseHandle'); + @IcmpSendEcho := GetProcAddress(hICMPdll, 'IcmpSendEcho'); + + if (@ICMPCreateFile = Nil) or + (@IcmpCloseHandle = Nil) or + (@IcmpSendEcho = Nil) then + raise TICMPException.Create('Error loading dll functions'); + + hICMP := IcmpCreateFile; + if hICMP = INVALID_HANDLE_VALUE then + raise TICMPException.Create('Unable to get ping handle'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TICMP.Destroy; +begin + if hICMP <> INVALID_HANDLE_VALUE then + IcmpCloseHandle(hICMP); + if hICMPdll <> 0 then + FreeLibrary(hICMPdll); + WSACleanup; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function MinInteger(X, Y: Integer): Integer; +begin + if X >= Y then + Result := Y + else + Result := X; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TICMP.ResolveAddr; +var + Phe : PHostEnt; // HostEntry buffer for name lookup +begin + // Convert host address to IP address + FIPAddress := inet_addr(PChar(FAddress)); + if FIPAddress <> LongInt(INADDR_NONE) then + // Was a numeric dotted address let it in this format + FHostName := FAddress + else begin + // Not a numeric dotted address, try to resolve by name + Phe := GetHostByName(PChar(FAddress)); + if Phe = nil then begin + FLastError := GetLastError; + if Assigned(FOnDisplay) then + FOnDisplay(Self, 'Unable to resolve ' + FAddress); + Exit; + end; + + FIPAddress := longint(plongint(Phe^.h_addr_list^)^); + FHostName := Phe^.h_name; + end; + + FHostIP := StrPas(inet_ntoa(TInAddr(FIPAddress))); + FAddrResolved := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TICMP.SetAddress(Value : String); +begin + // Only change if needed (could take a long time) + if FAddress = Value then + Exit; + FAddress := Value; + FAddrResolved := FALSE; +// ResolveAddr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TICMP.GetErrorString : String; +begin + case FLastError of + IP_SUCCESS: Result := 'No error'; + IP_BUF_TOO_SMALL: Result := 'Buffer too small'; + IP_DEST_NET_UNREACHABLE: Result := 'Destination network unreachable'; + IP_DEST_HOST_UNREACHABLE: Result := 'Destination host unreachable'; + IP_DEST_PROT_UNREACHABLE: Result := 'Destination protocol unreachable'; + IP_DEST_PORT_UNREACHABLE: Result := 'Destination port unreachable'; + IP_NO_RESOURCES: Result := 'No resources'; + IP_BAD_OPTION: Result := 'Bad option'; + IP_HW_ERROR: Result := 'Hardware error'; + IP_PACKET_TOO_BIG: Result := 'Packet too big'; + IP_REQ_TIMED_OUT: Result := 'Request timed out'; + IP_BAD_REQ: Result := 'Bad request'; + IP_BAD_ROUTE: Result := 'Bad route'; + IP_TTL_EXPIRED_TRANSIT: Result := 'TTL expired in transit'; + IP_TTL_EXPIRED_REASSEM: Result := 'TTL expired in reassembly'; + IP_PARAM_PROBLEM: Result := 'Parameter problem'; + IP_SOURCE_QUENCH: Result := 'Source quench'; + IP_OPTION_TOO_BIG: Result := 'Option too big'; + IP_BAD_DESTINATION: Result := 'Bad Destination'; + IP_ADDR_DELETED: Result := 'Address deleted'; + IP_SPEC_MTU_CHANGE: Result := 'Spec MTU change'; + IP_MTU_CHANGE: Result := 'MTU change'; + IP_GENERAL_FAILURE: Result := 'General failure'; + IP_PENDING: Result := 'Pending'; + else + Result := 'ICMP error #' + IntToStr(FLastError); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TICMP.Ping : Integer; +var + BufferSize: Integer; + pReqData, pData: Pointer; + pIPE: PIcmpEchoReply; // ICMP Echo reply buffer + IPOpt: TIPOptionInformation; // IP Options for packet to send + Msg: String; +begin + Result := 0; + FLastError := 0; + + if not FAddrResolved then + ResolveAddr; + + if FIPAddress = LongInt(INADDR_NONE) then begin + FLastError := IP_BAD_DESTINATION; + if Assigned(FOnDisplay) then + FOnDisplay(Self, 'Invalid host address'); + Exit; + end; + + // Allocate space for data buffer space + BufferSize := SizeOf(TICMPEchoReply) + FSize; + GetMem(pReqData, FSize); + GetMem(pData, FSize); + GetMem(pIPE, BufferSize); + + try + // Fill data buffer with some data bytes + FillChar(pReqData^, FSize, $20); + Msg := 'Pinging from Delphi code written by F. Piette'; + Move(Msg[1], pReqData^, MinInteger(FSize, Length(Msg))); + + pIPE^.Data := pData; + FillChar(pIPE^, SizeOf(pIPE^), 0); + + if Assigned(FOnEchoRequest) then + FOnEchoRequest(Self); + + FillChar(IPOpt, SizeOf(IPOpt), 0); + IPOpt.TTL := FTTL; + IPOpt.Flags := FFlags; + Result := IcmpSendEcho(hICMP, FIPAddress, pReqData, FSize, + @IPOpt, pIPE, BufferSize, FTimeOut); + FLastError := GetLastError; + FReply := pIPE^; + + if Assigned(FOnEchoReply) then + FOnEchoReply(Self, Result); + finally + // Free those buffers + FreeMem(pIPE); + FreeMem(pData); + FreeMem(pReqData); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/mimedec.dcr b/lib/ics/Delphi/Vc32/mimedec.dcr new file mode 100644 index 00000000..529680d8 Binary files /dev/null and b/lib/ics/Delphi/Vc32/mimedec.dcr differ diff --git a/lib/ics/Delphi/Vc32/mimedec.dcu b/lib/ics/Delphi/Vc32/mimedec.dcu new file mode 100644 index 00000000..ac7ac061 Binary files /dev/null and b/lib/ics/Delphi/Vc32/mimedec.dcu differ diff --git a/lib/ics/Delphi/Vc32/mimedec.pas b/lib/ics/Delphi/Vc32/mimedec.pas new file mode 100644 index 00000000..cc501bdd --- /dev/null +++ b/lib/ics/Delphi/Vc32/mimedec.pas @@ -0,0 +1,1576 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: TMimeDecode is a component whose job is to decode MIME encoded + EMail messages (file attach). You can use it for example to + decode messages received with a POP3 or NNTP component. + MIME is described in RFC-1521. Headers are described if RFC-822. +Creation: March 08, 1998 +Version: 1.25 +EMail: http://www.overbyte.be francois.piette@overbyte.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@elists.org + Follow "support" link at http://www.overbyte.be for subscription. +Legal issues: Copyright (C) 1998-2001 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +QUICK REFERENCE: +---------------- +TMimeDecode take a file or a stream as input and produce several event when +the message is parsed. each event can be used to display or to save to a file +the message parts. + +Two methods can be called to decode either a file or a stream: +procedure DecodeFile(FileName : String); +procedure DecodeStream(aStream : TStream); + +During the decode process, the component trigger several events. You have to +use those events to save data to a file or to display somehow on the +user interface. + +Events are organized by groups of three for message header, part header and +part data: +Message header events: OnHeaderBegin OnHeaderLine OnHeaderEnd +Part header events: OnPartHeaderBegin OnPartHeaderLine OnPartHeaderEnd +Part data events: OnPartDataBegin OnPartDataLine OnPartDataEnd + +The 'Begin' event is triggered once just before the first item will occur. +The 'Line' event is triggered for each item of the given type. +The 'End' event is triggered once after the last item. + +For a multi-part message, we have this sequence: +a) The message header +OnHeaderBegin, then many OnHeaderLine, one for each line in the header. Lines +can be continuated in the message. The event here is triggered with continuated +lines concatenated (so it can be quite large !). After the last header line +has been processed, the OnHeaderEnd is triggered once. +b) The non-significant message part which can be empty. This is part 0. We +get OnPartBegin once, then OnPartLine for each line and finally OnPartEnd once. +c) The first significant part header with his three events, just like the +message header: OnPartHeaderBegin, OnPartHeaderLine and OnPartHeaderEnd. +d) The first significant part data with his three events: OnPartBegin once, +OnPartLine for each line and OnPartEnd once at the end of the part. +It's possible to have an empty part. This gives the OnPartBegin and OnPartEnd +events and NO OnPartLine event. +e) We can have many other parts. The sequence is always the same. We restart +at point (b) here above for each part (header, then data). Note that there is +often en empty part at the end of a message. + +TMimeDecode decode encoded parts using 'base64' and 'quoted-printable' methods. +For those parts, the OnPartLine event will gives DECODED data. Other methods +are passed not decoded. You can use the property ContentTransferEncoding to +know which encoding method is used and add your own decoding mechanism. + +For each OnHeaderLine, OnPartHeaderLine and OnPartLine, you can find the +actual data at the address pointed by the property CurrentData (a PChar). +The reason for a PChar is that the data can be quite large. The data pointed +is a null terminated string. You can get the length using StrLen, or convert +to a string with StrPas. It is more efficient to process the data using a +pointer. Using strings tends to copy the data several times. +The OnPartLine event passes a PChar and a length to the handler. This actully +point to the internal buffer and overwrite the original data (base64 and +quote-printable method produce decoded data smaller tha encoded one). + +>From the message header, the component extract the following values: +>From The message author. Not necessary the real author... + Looks like "Francois Piette" +Dest The message destination (To field, but To is a reserved word) + Looks like "Francois Piette" +Subject The message subject. Free text. +Date The message date. + Look like: Mon, 16 Feb 1998 12:45:11 -0800 +ContentType 'multipart/mixed' or empty. +For details about those header fields and others, read RFC-822 + +For each part, we have the following properties updated (the header is parsed +on the fly): +PartNumber Starting from 0 for the non-significant part +PartLine Starting 1 for the first line of each part or header +PartContentType Such as 'text/plain' or 'application/x-zip-compressed' +PartCharset This is a complement for the PartContentType. +ApplicationType When PartContentType is 'application/something', we + get the 'something' extracted +PartName This is the value for 'name=something' in the + Content-Type header line. +PartEncoding Encoding method (Content-Transfer-Encoding). + Can be used to decode unsupported + methods (supported methods are 'base64' and + 'quoted-printable'. '7bit' and '8bit' does'nt + generally require processing. +PartDisposition Can be 'inline' or 'attachement' and is generally + followed by a 'filename=something' +PartFileName The specified filename in Content-Disposition header + line. Be aware that the file name is not necessary + suitable for windows ! Use it with caution... +For details about those header fields and others, read RFC-1521. + +To write part data to files, you can either implement your own writing in +the OnPartLine event handler, or use the DestStream property. If assigned, +this property will be used to write the data. If not assigned, it will be +ignore. + +To select a file name for each part, you can use the PartFileName property or +the 'PartName' property or a comnination of both. But be aware that those value +can be either missing or even invalid as a filename because the message was +generated with another opertaing system which has different filename +conventions. + +Updates: +Apr 13, 1998 V1.01 Corrected a bug in ProcessLineBase64 which decoded one + byte too much. Thanks to Rune Fredriksen . +Apr 15, 1998 V1.02 Corrected bug in ProcessHeaderLine which retreived only + the first word for each item. + Added the ReturnPath property. +Apr 24, 1998 V1.03 Removed the modification made in version 1.01 ! +Apr 26, 1998 V1.04 Corrected a bug in ReallocMem with Delphi 1 +Aug 27, 1998 V1.05 Corrected a bug in decoding which incorrectly merge + the first message line with the header when the line begon + by a space. Thanks to Mitch Cant for + finding the bug and correction. +Sep 13, 1998 V1.06 Correctly handled unterminated messages. + Correctly handled parts without header. +Dec 26, 1998 V1.07 Added features coded by Eric Fortier + (Embedded mime parts, UUDecode). +Dec 30, 1998 V1.08 Check for header end when a header line begin with a + space or tab character. (Normally a header end with a blank + line, we also accept invalid header line). +Feb 01, 1999 V1.09 Corrected a bug ProcessLineUUDecode where 'end' was not + checked. Thanks to Eric Fortier. +Feb 16, 1999 V1.10 Added UUEncoded embedded parts. Thanks to Eric Fortier. + Corrected a line termination problem in ProcessLineBase64. +Jul 21, 1999 V1.11 Added support for encoded message without multipart. + Added Encoding property with the encoding value. + Thanks to Marcelo S Massuda for pinting this + lack of feature. +Aug 20, 1999 V1.12 Added compile time options. Revised for BCB4. +Nov 25, 1999 V1.13 Changed continuation line character for quoted printable + encoding. By Ken Petersen . + Created GetTokenEx function to take care of comments in header + lines. This affect ProcessPartHeaderLine and ProcessHeaderLine. + Thanks to Boris Daljevic for his code. + Added CharSet property related to main part charset (see also + existing PartCharset property). Thanks to Boris Daljevic + for his code. +Jun 20, 2000 V1.14 Poessler Thomas corrected a bug in + ProcessLineQuotedPrintable. +Jul 02, 2000 V1.15 Added OnMessageEnd event +Jul 15, 2000 V1.16 Added code from Wolfgang Baron + to support content-description header line. + Changed GetToken and GetTokenEx so that a space before a delimiter + will not break token parsing. Outlook generate such invalid + formatting thanks for Arno van Rossum + for finding this bug. + Revised code to handle inline UUEncoded messages. +Jul 21, 2000 V1.17 Use GetValue instead of GetToken to solve problem with + boundaries of embbeded parts. + With help of Jan Bartak . + As suggested by Sebastien Gariepy , I + added PartContentID. +Oct 29, 2000 V1.18 Checked for missing content-type before calling + UUProcessLine. Without the check, a part with a line beginning + with 'begin 666' will be wrongly decoded. +Feb 17, 2001 V1.19 Top of the messages with a field multipart was incorrectly + processed.Property FCharset was not initialized in procedure + MessageBegin. Thanks to Bayanov +Jul 26, 2001 V1.20 Cleared FEncoding in MessageBegin. Thanks to Joel + lauvinerie who found this bug. + Poessler Thomas added new properties: + HeaderName, FileName, HeaderLines, Disposition, EndOfMime, + IsMultipart. +Jul 29, 2001 V1.21 Moved ProcessLineBase64 to public section. Made CurrentData + property read/write. This permit to use Base64 decoding from + outside of the component. + Corrected a glitche with Delphi 1 +May 04, 2002 V1.23 Added "Len" argument to OnInlineDecodeLine event. + Corrected UUDec so that nul is handled as space. Thanks to + arnaud_courrier@yahoo.fr who provided a test case. + Made UUOutDec a little bit faster. +May 10, 2002 V1.24 Accept 'begin 644' as well as 'begin 666' for UUEncoding + start. arnaud_courrier@yahoo.fr found that OE does that. +Nov 01, 2002 V1.25 Changed PChar arguments to Pointer to work around Delphi 7 + bug with PAnsiChar<->PChar. + This will require small changes in your application code: change + PChar args to Pointer and add a PChar cast when using the arg. + Changed Base64 decoding so that is doesn't crash even if input + data is malformed (corrupted message). + Changed UUEncoded detection procedure. Thanks to Arnaud + for providing his code. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MimeDec; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, SysUtils, Classes; + +const + MimeDecodeVersion = 125; + CopyRight : String = ' TMimeDecode (c) 1998-2002 Francois Piette V1.25 '; + +type + TMimeDecodePartLine = procedure (Sender : TObject; + Data : Pointer; + DataLen : Integer) of object; + + TInlineDecodeBegin = procedure (Sender: TObject; Filename: string) of object; + TInlineDecodeLine = procedure (Sender: TObject; Line: Pointer; Len : Integer) of object; + TInlineDecodeEnd = procedure (Sender: TObject; Filename: string) of object; + + TMimeDecode = class(TComponent) + private + FFrom : String; + FDest : String; + FSubject : String; + FDate : String; + FReturnPath : String; + FEncoding : String; + FCharSet : String; + FContentType : String; + FMimeVersion : String; + FHeaderName : String; + FDisposition : String; + FFileName : String; + FHeaderLines : TStrings; + FIsMultipart : Boolean; + FEndOfMime : Boolean; + FPartContentType : String; + FPartEncoding : String; + FPartNumber : Integer; + FPartHeaderBeginSignaled : Boolean; + FPartName : String; + FPartDisposition : String; + FPartContentID : String; + FPartFileName : String; + FPartCharset : String; + FApplicationType : String; + FPartOpened : Boolean; + FHeaderFlag : Boolean; + FLineNum : Integer; + FBuffer : PChar; + FBufferSize : Integer; + FCurrentData : PChar; + FBoundary : String; + FUUProcessFlag : Boolean; + FNext : procedure of object; + FDestStream : TStream; + FOnHeaderBegin : TNotifyEvent; + FOnHeaderLine : TNotifyEvent; + FOnHeaderEnd : TNotifyEvent; + FOnPartHeaderBegin : TNotifyEvent; + FOnPartHeaderLine : TNotifyEvent; + FOnPartHeaderEnd : TNotifyEvent; + FOnPartBegin : TNotifyEvent; + FOnPartLine : TMimeDecodePartLine; + FOnPartEnd : TNotifyEvent; + FOnMessageEnd : TNotifyEvent; + cUUFilename : String; { ##ERIC } + FEmbeddedBoundary : TStringList; { ##ERIC } + cIsEmbedded : Boolean; { ##ERIC } + FOnInlineDecodeBegin : TInlineDecodeBegin; + FOnInlineDecodeLine : TInlineDecodeLine; + FOnInlineDecodeEnd : TInlineDecodeEnd; + procedure TriggerHeaderBegin; virtual; + procedure TriggerHeaderLine; virtual; + procedure TriggerHeaderEnd; virtual; + procedure TriggerPartHeaderBegin; virtual; + procedure TriggerPartHeaderLine; virtual; + procedure TriggerPartHeaderEnd; virtual; + procedure TriggerPartBegin; virtual; + procedure TriggerPartLine(Data : Pointer; DataLen : Integer); virtual; + procedure TriggerPartEnd; virtual; + procedure TriggerMessageEnd; virtual; + + procedure ProcessLineUUDecode; + function UUProcessLine(FCurrentData: PChar): boolean; + procedure ProcessLineQuotedPrintable; + procedure ProcessHeaderLine; + procedure ProcessPartHeaderLine; + procedure ProcessPartLine; + procedure ProcessWaitBoundary; + procedure ProcessMessageLine; + procedure PreparePart; + procedure PrepareNextPart; + procedure ProcessDecodedLine(Line : Pointer; Len : Integer); + procedure InternalDecodeStream(aStream : TStream); + procedure MessageBegin; + procedure MessageEnd; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + + procedure DecodeFile(FileName : String); + procedure DecodeStream(aStream : TStream); + procedure ProcessLineBase64; + property From : String read FFrom; + property Dest : String read FDest; + property Subject : String read FSubject; + property Date : String read FDate; + property ReturnPath : String read FReturnPath; + property ContentType : String read FContentType; + property Encoding : String read FEncoding; + property Charset : String read FCharset; + property MimeVersion : String read FMimeVersion; + property HeaderName : String read FHeaderName; + property Disposition : String read FDisposition; + property FileName : String read FFileName; + property HeaderLines : TStrings read FHeaderLines; + property IsMultipart : Boolean read FIsMultipart; + property EndOfMime : Boolean read FEndOfMime; + property PartContentType : String read FPartContentType; + property PartEncoding : String read FPartEncoding; + property PartName : String read FPartName; + property PartDisposition : String read FPartDisposition; + property PartContentID : String read FPartContentID; + property PartFileName : String read FPartFileName; + property PartCharset : String read FPartCharset; + property ApplicationType : String read FApplicationType; + property PartNumber : Integer read FPartNumber; + property CurrentData : PChar read FCurrentData + write FCurrentData; + property DestStream : TStream read FDestStream + write FDestStream; + published + property OnHeaderBegin : TNotifyEvent read FOnHeaderBegin + write FOnHeaderBegin; + property OnHeaderLine : TNotifyEvent read FOnHeaderLine + write FOnHeaderLine; + property OnHeaderEnd : TNotifyEvent read FOnHeaderEnd + write FOnHeaderEnd; + property OnPartHeaderBegin : TNotifyEvent read FOnPartHeaderBegin + write FOnPartHeaderBegin; + property OnPartHeaderLine : TNotifyEvent read FOnPartHeaderLine + write FOnPartHeaderLine; + property OnPartHeaderEnd : TNotifyEvent read FOnPartHeaderEnd + write FOnPartHeaderEnd; + property OnPartBegin : TNotifyEvent read FOnPartBegin + write FOnPartBegin; + property OnPartLine : TMimeDecodePartLine read FOnPartLine + write FOnPartLine; + property OnPartEnd : TNotifyEvent read FOnPartEnd + write FOnPartEnd; + property OnMessageEnd : TNotifyEvent read FOnMessageEnd + write FOnMessageEnd; + property OnInlineDecodeBegin : TInlineDecodeBegin + read FOnInlineDecodeBegin + write FOnInlineDecodeBegin; + property OnInlineDecodeLine : TInlineDecodeLine + read FOnInlineDecodeLine + write FOnInlineDecodeLine; + property OnInlineDecodeEnd : TInlineDecodeEnd + read FOnInlineDecodeEnd + write FOnInlineDecodeEnd; + end; + +procedure Register; + +implementation + +type + TLookup = array [0..127] of Byte; + +const + Base64In: TLookup = ( + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 62, 255, 255, 255, 63, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 255, 255, 255, 64, 255, 255, 255, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 255, 255, 255, 255, 255, 255, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 255, 255, 255, 255, 255 + ); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TMimeDecode]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] in [' ', #9]) do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function HexConv(Ch : Char) : Integer; +begin + if Ch in ['0'..'9'] then + Result := Ord(Ch) - Ord('0') + else + Result := (Ord(Ch) and 15) + 9; +end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TMimeDecode.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FHeaderLines := TStringList.Create; + FIsMultipart := FALSE; + FEndOfMime := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TMimeDecode.Destroy; +begin + if Assigned(FHeaderLines) then begin + FHeaderLines.Destroy; + FHeaderLines := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerHeaderBegin; +begin + if Assigned(FOnHeaderBegin) then + FOnHeaderBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerHeaderLine; +begin + if Assigned(FOnHeaderLine) then + FOnHeaderLine(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerHeaderEnd; +begin + if Assigned(FOnHeaderEnd) then + FOnHeaderEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartHeaderBegin; +begin + if Assigned(FOnPartHeaderBegin) then + FOnPartHeaderBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartHeaderLine; +begin + if Assigned(FOnPartHeaderLine) then + FOnPartHeaderLine(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartHeaderEnd; +begin + if Assigned(FOnPartHeaderEnd) then + FOnPartHeaderEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartBegin; +begin + if Assigned(FOnPartBegin) then + FOnPartBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartLine(Data : Pointer; DataLen : Integer); +begin + if Assigned(FOnPartLine) then + FOnPartLine(Self, Data, DataLen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerPartEnd; +begin + if Assigned(FOnPartEnd) then + FOnPartEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.TriggerMessageEnd; +begin + if Assigned(FOnMessageEnd) then + FOnMessageEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessDecodedLine(Line : Pointer; Len : Integer); +begin + if Len > 0 then begin + if (FPartContentType = '') { Not sure it is always OK ! } + { As such we can't have a MIME part which } + { is uu-encoded. } + and uuprocessline(line) then + Exit; + end; + TriggerPartLine(Line, Len); + + { Write decoded characters to the destination stream } + if Assigned(FDestStream) and (Len > 0) then + FDestStream.WriteBuffer(Line^, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This works if charset="iso-8859-1" ! } +procedure TMimeDecode.ProcessLineQuotedPrintable; +var + SourceIndex : Integer; + DecodedIndex : Integer; + Ch : Char; + Code : Integer; + OldCh : Char; {tap} +begin + SourceIndex := 0; + DecodedIndex := 0; + OldCh := #0;{tap} +{ if (FCurrentData <> nil) and (FCurrentData^ <> #0) then begin --empty line means \r\n} + if (FCurrentData <> nil) then begin + while TRUE do begin + Ch := FCurrentData[SourceIndex]; + if Ch = #0 then begin + { Nov 25, 1999: Ken Petersen told me to insert CRLF } + FCurrentData[DecodedIndex] := #13; + Inc(DecodedIndex); + FCurrentData[DecodedIndex] := #10; + Inc(DecodedIndex); + break; + end; + if Ch <> '=' then begin + FCurrentData[DecodedIndex] := Ch; + Inc(SourceIndex); + Inc(DecodedIndex); + end + else begin + Inc(SourceIndex); + Ch := FCurrentData[SourceIndex]; + if Ch <> #0 then begin + Code := HexConv(Ch); + Inc(SourceIndex); + Ch := FCurrentData[SourceIndex]; + if Ch <> #0 then begin + Code := (Code shl 4) + HexConv(Ch); + Inc(SourceIndex); + end; + FCurrentData[DecodedIndex] := Chr(Code); + Inc(DecodedIndex); + end + else begin {tap: "=\0" means line continuation} + break; {tap} + end; + end; + end; + {tap: if there is no quoted-string-mapping then the first char of the next msgline will be overwritten} + OldCh := FCurrentData[DecodedIndex]; {tap} + FCurrentData[DecodedIndex] := #0; + end; + + ProcessDecodedLine(FCurrentData, DecodedIndex); + if (OldCh <> #0) then {tap} + FCurrentData[DecodedIndex] := OldCh; {tap} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessLineBase64; +var + SourceIndex : Integer; + DataIn0 : Byte; + DataIn1 : Byte; + DataIn2 : Byte; + DataIn3 : Byte; + DecodedIndex : Integer; + Len : Integer; +begin + SourceIndex := 0; + DecodedIndex := 0; + Len := StrLen(FCurrentData); + + { Remove spaces at the end of line } + while (Len > 0) and (FCurrentData[Len - 1] in [#9, ' ']) do + Dec(Len); + + { Skip white spaces at the start of line } + while (SourceIndex < Len) and (FCurrentData[SourceIndex] in [#9, ' ']) do + Inc(SourceIndex); + + { Decode until end of line. Replace coded chars by decoded ones } + { Protect agains malformed messages. Normally we have a length which } + { is multiple of four. But this may be corrupted ! } + while SourceIndex < Len do begin + { "And $7F" will clear 8th bit and avoid range error. If found in } + { a message, it is probably a corrupted message ! } + DataIn0 := Base64In[Byte(FCurrentData[SourceIndex]) and $7F]; + Inc(SourceIndex); + if SourceIndex >= Len then begin + DataIn1 := $40; + DataIn2 := $40; + DataIn3 := $40; + end + else begin + DataIn1 := Base64In[Byte(FCurrentData[SourceIndex]) and $7F]; + Inc(SourceIndex); + if SourceIndex >= Len then begin + DataIn2 := $40; + DataIn3 := $40; + end + else begin + DataIn2 := Base64In[Byte(FCurrentData[SourceIndex]) and $7F]; + Inc(SourceIndex); + if SourceIndex >= Len then + DataIn3 := $40 + else begin + DataIn3 := Base64In[Byte(FCurrentData[SourceIndex]) and $7F]; + Inc(SourceIndex); + end; + end; + end; + + FCurrentData[DecodedIndex] := Char((DataIn0 and $3F) shl 2 + (DataIn1 and $30) shr 4); + if DataIn2 <> $40 then begin + FCurrentData[DecodedIndex + 1] := Char((DataIn1 and $0F) shl 4 + (DataIn2 and $3C) shr 2); + if DataIn3 <> $40 then begin + FCurrentData[DecodedIndex + 2] := Char((DataIn2 and $03) shl 6 + (DataIn3 and $3F)); + Inc(DecodedIndex, 3); + end + else + Inc(DecodedIndex, 2); + end + else + Inc(DecodedIndex, 1); + end; + + { Nul terminate decoded line } + FCurrentData[DecodedIndex] := #0; { 16/02/99 } + ProcessDecodedLine(FCurrentData, DecodedIndex); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function UUDec(Sym : Char): Byte; +begin + if Sym = #0 then + Result := 0 + else + Result := (Ord(Sym) - Ord(' ')) and $3F; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure UUOutDec(buf: PChar; n: Integer; var out1 : String); +begin + case n of + 0: ; + 1: out1 := out1 + Char((UUDec(buf[0]) SHL 2) + (UUDec(buf[1]) SHR 4)); + 2: out1 := out1 + Char((UUDec(buf[0]) SHL 2) + (UUDec(buf[1]) SHR 4)) + + Char((UUDec(buf[1]) SHL 4) + (UUDec(buf[2]) SHR 2)); + else out1 := out1 + Char((UUDec(buf[0]) SHL 2) + (UUDec(buf[1]) SHR 4)) + + Char((UUDec(buf[1]) SHL 4) + (UUDec(buf[2]) SHR 2)) + + Char((UUDec(buf[2]) SHL 6) + (UUDec(buf[3]))); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} +procedure UUOutDec(buf: PChar; n: Integer; var out1 : String); +var + c1, c2, c3: Char; +begin + c1 := Chr((word(UUDec(buf[0])) SHL 2) or (word(UUDec(buf[1])) SHR 4)); + c2 := Chr((word(UUDec(buf[1])) SHL 4) or (word(UUDec(buf[2])) SHR 2)); + c3 := Chr((word(UUDec(buf[2])) SHL 6) or (word(UUDec(buf[3])))); + if n >= 1 then + out1 := out1 + c1; + if n >= 2 then + out1 := out1 + c2; + if n >= 3 then + out1 := out1 + c3; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessLineUUDecode; { ##ERIC } +var + count, Size : Integer; + s : String; + out1 : String; + bp : PChar; + pos1 : Integer; +begin + if FCurrentData^ = #0 then + exit; + s := StrPas(FCurrentData); + + if LowerCase(copy(s, 1, 6)) = 'begin ' then begin + out1:=lowercase(s); + if (Pos('--', out1) > 0) and (Pos('cut here', out1) > 0) then + Exit; + pos1 := Pos(' ', s); + s := Copy(s, pos1 + 1, 255); + pos1 := Pos(' ', s); + s := Copy(s, pos1 + 1, 255); + cUUFilename := s; + exit; + end + else if LowerCase(Copy(s, 1, 3)) = 'end' then begin + out1 := LowerCase(s); + if (Pos('--', out1) > 0) and (Pos('cut here', out1) > 0) then + Exit; + cUUFilename := ''; + exit; + end; + + { if no filename defined yet, exit } + if cUUFilename = '' then + exit; + + { decode the line } + count := UUDec(s[1]); + Size := Count; + if count > 0 then begin + bp := @s[2]; + repeat + UUOutDec(bp, count, out1); + count := count - 3; + bp := bp + 4; + until count <= 0; + end; + + { we're done. copy and leave } + Move(Out1[1], FCurrentData[0], Size); + ProcessDecodedLine(FCurrentData, Size); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function UUSectionBegin( + const Line : String; + var FileName : String) : Boolean; +var + I : Integer; +begin + { A UUEncoded section begins by a line having the syntax: } + { "begin nnn filename" with xxx being a number (unix file permission) } + { We accept xxx with at least 2 digits. Filename is optional. } + Result := FALSE; + FileName := ''; + if CompareText(Copy(Line, 1, 6), 'begin ') = 0 then begin + I := 7; + while I <= Length(Line) do begin + if Line[I] = ' ' then begin + Result := (I > 8); + if Result then + FileName := Copy(Line, I + 1, Length(Line)); + break + end; + if not (Line[I] in ['0'..'9']) then + break; + Inc(I) + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TMimeDecode.UUProcessLine(FCurrentData: PChar): Boolean; +var + s : String; + out1 : String; + count : Integer; + bp : PChar; +begin + Result := TRUE; + S := Trim(StrPas(FCurrentData)); + if S = '' then begin + Result := FALSE; + Exit; + end; + + if (not FUUProcessFlag) and + UUSectionBegin(S, cUUFilename) then begin + out1 := LowerCase(S); + if (Pos('--', out1) > 0) and (Pos('cut here', out1) > 0) then + Exit; + FUUProcessFlag := TRUE; + if Assigned(FOnInlineDecodeBegin) then + FOnInlineDecodeBegin(Self, cUUFilename); + Exit; + end; + + if not FUUProcessFlag then begin + Result := FALSE; + Exit; + end; + + if CompareText(Copy(S, 1, 3), 'end') = 0 then begin + out1 := LowerCase(S); + if (Pos('--', out1) > 0) and (Pos('cut here', out1) > 0) then + Exit; + FUUProcessFlag := FALSE; + if Assigned(FOnInlineDecodeEnd) then + { I also use the filename here in case the client prefer to save } + { data to a stream and save to a file when the decoding is complete } + FOnInlineDecodeEnd(self, cUUfilename); + cUUFilename := ''; + Exit; + end; + + if Assigned(FOnInlineDecodeLine) then begin + { decode the line } + Count := UUDec(S[1]); + if (Count > 0) and (Length(S) > 1) then begin + bp := @S[2]; + repeat + UUOutDec(bp, Count, out1); + Count := Count - 3; + bp := bp + 4; + until Count <= 0; + end; + {$IFDEF VER80} + if Length(Out1) = 0 then + FOnInlineDecodeLine(Self, nil, 0) + else + FOnInlineDecodeLine(Self, @Out1[1], Length(Out1)); + {$ELSE} + FOnInlineDecodeLine(Self, PChar(Out1), Length(Out1)); + {$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function stpblk(PValue : PChar) : PChar; +begin + Result := PValue; + while Result^ in [' ', #9, #10, #13] do + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetValue(Src : PChar; var Dst : String; var Delim : Char) : PChar; +begin + Result := StpBlk(Src); + Dst := ''; + Delim := Result^; + if Delim = '"' then begin + Inc(Result); + while TRUE do begin + Delim := Result^; + if Delim = #0 then + break; + if Delim = '"' then begin + Inc(Result); + Delim := Result^; + break; + end; + Dst := Dst + Delim; + Inc(Result); + end; + end + else begin + while TRUE do begin + Delim := Result^; + if Delim in [':', ' ', ';', '=', #9, #0] then + break; + Dst := Dst + LowerCase(Result^); + Inc(Result); + end; + end; + if Delim in [' ', #9] then begin + Result := stpblk(Result); + if Result^ in [':', ';', '=', #9] then + Inc(Result); + end + else if Delim <> #0 then + Inc(Result); + Result := stpblk(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetToken(Src : PChar; var Dst : String; var Delim : Char) : PChar; +begin + Result := StpBlk(Src); + Dst := ''; + while TRUE do begin + Delim := Result^; + if Delim in [':', ' ', ';', '=', #9, #0] then + break; + Dst := Dst + LowerCase(Result^); + Inc(Result); + end; + if Delim in [' ', #9] then begin + Result := stpblk(Result); + if Result^ in [':', ';', '=', #9] then + Inc(Result); + end + else if Delim <> #0 then + Inc(Result); + Result := stpblk(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Same as GetToken, but take be aware of comments } +function GetTokenEx(Src : PChar; var Dst : String; var Delim : Char) : PChar; +var + Comment: Integer; +begin + Result := StpBlk(Src); + Dst := ''; + Comment := 0; + while TRUE do begin + Delim := Result^; + if Delim = #0 then + break; + if Delim = '(' then begin + Inc(comment); { Comments can be nested } + Inc(Result); + Continue; + end + else if Delim = ')' then begin + Dec(Comment); + Inc(Result); + Continue; + end + else if (Comment = 0) and (Delim in [':', ' ', ';', '=', #9]) then + break; + Dst := Dst + LowerCase(Result^); + Inc(Result); + end; + if Delim in [' ', #9] then begin + Result := stpblk(Result); + if Result^ in [':', ';', '=', #9] then + Inc(Result); + end + else if Delim <> #0 then + Inc(Result); + Result := StpBlk(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetQuoted(Src : PChar; var Dst : String) : PChar; +var + Quote : Char; +begin + Result := StpBlk(Src); + Dst := ''; + Quote := Result^; + if Quote <> #34 then begin { ##ERIC } + Dst := StrPas(Src); { ##ERIC } + Exit; { ##ERIC } + end; { ##ERIC } + + Inc(Result); + while (Result^ <> #0) and (Result^ <> Quote) do begin + Dst := Dst + Result^; + Inc(Result); + end; + Result := stpblk(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.PreparePart; +begin + FPartOpened := FALSE; + TriggerPartEnd; + PrepareNextPart; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessWaitBoundary; { ##ERIC } +var + t : Integer; + s : String; +begin + s := LowerCase(StrPas(FCurrentData)); + if s = FBoundary then begin + PreparePart; + Exit; + end + else begin + { are we in the embedded boundaries ? } + for t := 0 to FEmbeddedBoundary.Count - 1 do begin + if FEmbeddedBoundary[t] = s then begin + cIsEmbedded := true; + PreparePart; + Exit; + end; + end; + + { if not in primary boundary or embedded boundaries, then process it.} + ProcessDecodedLine(FCurrentData, StrLen(FCurrentData)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessMessageLine; +begin + Inc(FLineNum); + if FLineNum = 1 then + TriggerPartBegin; + if FEncoding = 'base64' then + ProcessLineBase64 + else if FEncoding = 'quoted-printable' then + ProcessLineQuotedPrintable + else if FEncoding = 'x-uuencode' then + ProcessLineUUDecode { ##ERIC } + else begin {tap} + ProcessDecodedLine(FCurrentData, StrLen(FCurrentData)); + ProcessDecodedLine(PChar(#13#10), 2); {tap: add \r\n to other encodings} + end; {tap} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.PrepareNextPart; +begin + FPartEncoding := ''; + FPartContentType := ''; + FPartDisposition := ''; + FPartContentID := ''; + FPartName := ''; + FPartFileName := ''; + FHeaderFlag := TRUE; { We begin by a header } + FLineNum := 0; + FUUProcessFlag := FALSE; + FPartHeaderBeginSignaled := FALSE; + FNext := ProcessPartHeaderLine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessPartLine; { ##ERIC } +var + Len : Integer; + t : Integer; + s : String; { ##ERIC } +begin + { Check if end of part (boundary line found) } + if (FCurrentData <> nil) and (FCurrentData^ <> #0) then begin + s := LowerCase(StrPas(FCurrentData)); + if (s = FBoundary) then begin + PreparePart; + exit; + end + else if (s = (FBoundary + '--')) then begin + FEndOfMime := TRUE; + PreparePart; + exit; + end + else begin + for t := 0 to FEmbeddedBoundary.Count - 1 do begin + if (s = FEmbeddedBoundary[t]) or + (s = (FEmbeddedBoundary[t] + '--')) then begin + { we now have to wait for the next part } + PreparePart; + exit; + end + end; + end; + end; + + if not FPartOpened then begin + FPartOpened := TRUE; + TriggerPartBegin; + end; + + if FPartEncoding = 'base64' then + ProcessLineBase64 + else if FPartEncoding = 'quoted-printable' then + ProcessLineQuotedPrintable + else if FPartEncoding = 'x-uuencode' then { ##ERIC } + ProcessLineUUDecode { ##ERIC } + else begin + if FCurrentData = nil then + Len := 0 + else + Len := StrLen(FCurrentData); + ProcessDecodedLine(FCurrentData, Len); + ProcessDecodedLine(PChar(#13#10), 2); {tap: add \r\n to other encodings} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessPartHeaderLine; +var + p : PChar; + Delim : Char; + Token : String; + KeyWord : String; + Value : String; +{ Value1 : String; } +begin + if (FCurrentData = nil) or (FCurrentData^ = #0) then begin + { End of part header } + if not FPartHeaderBeginSignaled then begin + Inc(FPartNumber); + TriggerPartHeaderBegin; + end; + TriggerPartHeaderEnd; + FHeaderFlag := FALSE; { Remember we are no more in a header } + FLineNum := 0; + FUUProcessFlag := FALSE; + FNext := ProcessPartLine; + Exit; + end; + + Inc(FLineNum); + if FLineNum = 1 then begin + Inc(FPartNumber); + FPartHeaderBeginSignaled := TRUE; + TriggerPartHeaderBegin; +{ FEmbeddedBoundary.clear; } + end; + + { A header line can't begin with a space nor tab char. If we got that } + { then we consider the header as begin finished and process line } + if FHeaderFlag and (FCurrentData[0] in [' ', #9]) then begin + TriggerPartHeaderEnd; + FHeaderFlag := FALSE; + FLineNum := 0; + FUUProcessFlag := FALSE; + FNext := ProcessPartLine; + ProcessPartLine; + Exit; + end; + + p := GetToken(FCurrentData, KeyWord, Delim); + if KeyWord = 'content-type' then begin + p := GetTokenEx(p, FPartContentType, Delim); + while Delim = ';' do begin + p := GetToken(p, Token, Delim); + if Delim = '=' then begin + p := GetValue(p, Value, Delim); + if Token = 'name' then + FPartName := Value + else if Token = 'charset' then + FPartCharset := Value + else if Token = 'boundary' then begin + { we have an embedded boundary } + FEmbeddedBoundary.Add('--' + LowerCase(Value)); +{ Value := Value + #0; }{ NUL terminate string for Delphi 1 } +{ GetQuoted(@Value[1], Value1);} { ##ERIC } +{ FEmbeddedBoundary.Add('--' + LowerCase(Value1));} { ##ERIC } + end; { ##ERIC } + end; + end; + end + else if KeyWord = 'content-transfer-encoding' then begin + GetTokenEx(p, FPartEncoding, Delim); + end + else if KeyWord = 'content-id' then begin + FPartContentID := StrPas(p); + if (Length(FPartContentID) >= 2) and + (FPartContentID[1] = '<') and + (FPartContentID[Length(FPartContentID)] = '>') then + FPartContentID := Copy(FPartContentID, 2, Length(FPartContentID) - 2); + end + else if KeyWord = 'content-disposition' then begin + p := GetTokenEx(p, FPartDisposition, Delim); + while Delim = ';' do begin + p := GetToken(p, Token, Delim); + if Delim = '=' then begin + p := GetQuoted(p, Value); + if Token = 'filename' then + FPartFileName := Value; + end; + end; + end + else if (KeyWord = 'content-description') and (FPartFileName = '') then begin + Delim:= ';'; + while Delim = ';' do begin + p := GetToken(p, Token, Delim); + if Delim = '=' then begin + p := GetQuoted(p, Value); + if Token = 'filename' then + FPartFileName := Value; + end; + end; + end; + + TriggerPartHeaderLine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.ProcessHeaderLine; +var + p : PChar; + pVal : PChar; + Delim : Char; + Token : String; + Value : String; +begin + if (FCurrentData = nil) or (FCurrentData^ = #0) then begin + FHeaderFlag := FALSE; { We are no more in a header } + TriggerHeaderEnd; + FLineNum := 0; + FUUProcessFlag := FALSE; + if FBoundary = '' then begin + FNext := ProcessMessageLine; + end + else begin + TriggerPartBegin; + FNext := ProcessWaitBoundary; + end; + Exit; + end; + + Inc(FLineNum); + if FLineNum = 1 then + TriggerHeaderBegin; + + p := GetToken(FCurrentData, Token, Delim); + pVal := StpBlk(p); + if Delim = ':' then begin + p := GetTokenEx(p, Value, Delim); + if Token = 'from' then + FFrom := StrPas(pVal) + else if Token = 'to' then + FDest := StrPas(pVal) + else if Token = 'subject' then + FSubject := StrPas(pVal) + else if Token = 'return-path' then begin + FReturnPath := StrPas(pVal); + if (Length(FReturnPath) >= 2) and + (FReturnPath[1] = '<') and + (FReturnPath[Length(FReturnPath)] = '>') then + FReturnPath := Copy(FReturnPath, 2, Length(FReturnPath) - 2); + end + else if Token = 'date' then + FDate := StrPas(pVal) + else if Token = 'mime-version' then + FMimeVersion := StrPas(pVal) + else if Token = 'content-type' then begin + FContentType := Value; + while Delim = ';' do begin + p := GetToken(p, Token, Delim); + if Delim = '=' then begin + p := GetValue(p, Value, Delim); + if Token = 'name' then + FHeaderName := Value + else if Token = 'charset' then + FCharset := Value + else if Token = 'boundary' then begin + FBoundary := '--' + LowerCase(Value); + FIsMultipart := TRUE; + end; { ##ERIC } + end; + end; + end + else if Token = 'content-transfer-encoding' then + FEncoding := Value + else if Token = 'content-disposition' then begin + FDisposition := Value; + while Delim = ';' do begin + p := GetToken(p, Token, Delim); + if Delim = '=' then begin + p := GetValue(p, Value, Delim); +{ p := GetQuoted(p, Value);} + if Token = 'filename' then + FFileName := Value; + end + end + end + end; + FHeaderLines.Add(StrPas(FCurrentData)); + TriggerHeaderLine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.MessageEnd; +begin + if (FBoundary = '') or FPartOpened then + TriggerPartEnd; + TriggerMessageEnd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.MessageBegin; +begin + FApplicationType := ''; + FBoundary := ''; + FCharset := ''; + FContentType := ''; + FCurrentData := nil; + FDate := ''; + FDest := ''; + FDisposition := ''; + FEncoding := ''; + FEndOfMime := FALSE; + FFileName := ''; + FFrom := ''; + FHeaderFlag := TRUE; + FHeaderName := ''; + FIsMultiPart := FALSE; + FLineNum := 0; + FMimeVersion := ''; + FNext := ProcessHeaderLine; + FPartContentType := ''; + FPartCharset := ''; + FPartContentID := ''; + FPartDisposition := ''; + FPartEncoding := ''; + FPartFileName := ''; + FPartHeaderBeginSignaled := FALSE; + FPartName := ''; + FPartNumber := 0; + FPartOpened := FALSE; + FReturnPath := ''; + FSubject := ''; + FUUProcessFlag := FALSE; + FHeaderLines.Clear; + FEmbeddedBoundary.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.DecodeFile(FileName : String); +var + aStream : TStream; +begin + aStream := TFileStream.Create(FileName, fmOpenRead); + try + DecodeStream(aStream); + finally + aStream.Destroy; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMimeDecode.DecodeStream(aStream : TStream); +begin + FBufferSize := 2048; { Start with a reasonable FBuffer } + GetMem(FBuffer, FBufferSize); + try + cUUFilename := ''; { ##ERIC } + FEmbeddedBoundary := TStringList.Create; { ##ERIC } + try + InternalDecodeStream(aStream); + finally + FEmbeddedBoundary.Free; { ##ERIC } + end; + finally + FreeMem(FBuffer, FBufferSize); + FBuffer := nil; + FBufferSize := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This routine use an intelligent buffer management, trying to move data } +{ the less possible times. The buffer is enlarged as necessary to contains } +{ the largest line we encounter. } +procedure TMimeDecode.InternalDecodeStream(aStream : TStream); +var + RdCnt : LongInt; + nUsed : Integer; + nStart : Integer; + nLast : Integer; + nSearch : Integer; + I, J : Integer; +begin + nUsed := 0; + nStart := 0; + MessageBegin; + while TRUE do begin + nSearch := nStart + nUsed; + RdCnt := aStream.Read(FBuffer[nSearch], + FBufferSize - nUsed - nStart - + 2); { for next char and #0 } + if RdCnt <= 0 then begin + break; + end; + + nUsed := nUsed + RdCnt; + nLast := nStart + nUsed; + + { Nul terminate the FBuffer } + FBuffer[nLast] := #0; + + { Search for terminating line feed } + while TRUE do begin + I := nSearch; + while (I < nLast) and (FBuffer[I] <> #10) do + Inc(I); + if I >= nLast then begin + { We did'nt find any LF in the FBuffer, need to read more ! } + if nStart > (3 * (FBufferSize div 4)) then begin + { Reuse start of FBuffer because 3/4 buffer is unused } + Move(FBuffer[nStart], FBuffer[0], nUsed + 1); + nStart := 0; + end + else begin + { Makes FBuffer larger } + {$IFDEF VER80} + FBuffer := ReallocMem(FBuffer, FBufferSize, FBufferSize + 32); + {$ELSE} + ReallocMem(FBuffer, FBufferSize + 32); + {$ENDIF} + FBufferSize := FBufferSize + 32; + end; + break; + end; + + { We found a line feed, process FBuffer up to this point } + { Remove any preceding CR } + if (I > nStart) and (FBuffer[I - 1] = #13) then + j := I - 1 + else + J := I; + + { We found a LF, if we are processing a header, we must } + { have the next character to see if the line is continuated } + if FHeaderFlag then begin + if I >= (nLast - 1) then begin + { We don't have the next character in our FBuffer, } + { we need to read more data } + { Read a single byte at the end of the FBuffer } + { We have room because we preserved it previously } + RdCnt := aStream.Read(FBuffer[I + 1], 1); + if RdCnt > 0 then begin + { We have read the next char } + Inc(nLast); + Inc(nUsed); + FBuffer[I + 2] := #0; + end; + end; + + if I < nLast then begin + if (not (FBuffer[nStart] in [#10, #13])) and { 27/08/98 } + (FBuffer[I + 1] in [' ', #9]) then begin + { We have a continuation line, replace CR/LF by spaces } + FBuffer[I] := ' '; + FBuffer[J] := ' '; + FBuffer[I + 1] := ' '; + nSearch := I; + { and search new end of line } + continue; + end; + end; + end; + + FBuffer[J] := #0; + FCurrentData := FBuffer + nStart; + + FNext; + FBuffer[J] := #10; {tap: ERROR ? #13} + nStart := I + 1; + nUsed := nLast - nStart; + nSearch := nStart; + end; + end; + { Process the last line } + if nUsed > 0 then begin + FCurrentData := FBuffer + nStart; + FNext; + end; + + MessageEnd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/nntpcli.dcr b/lib/ics/Delphi/Vc32/nntpcli.dcr new file mode 100644 index 00000000..55e4deda Binary files /dev/null and b/lib/ics/Delphi/Vc32/nntpcli.dcr differ diff --git a/lib/ics/Delphi/Vc32/ping.dcr b/lib/ics/Delphi/Vc32/ping.dcr new file mode 100644 index 00000000..7bc5671f Binary files /dev/null and b/lib/ics/Delphi/Vc32/ping.dcr differ diff --git a/lib/ics/Delphi/Vc32/ping.dcu b/lib/ics/Delphi/Vc32/ping.dcu new file mode 100644 index 00000000..f4988178 Binary files /dev/null and b/lib/ics/Delphi/Vc32/ping.dcu differ diff --git a/lib/ics/Delphi/Vc32/ping.pas b/lib/ics/Delphi/Vc32/ping.pas new file mode 100644 index 00000000..ca8c9ccb --- /dev/null +++ b/lib/ics/Delphi/Vc32/ping.pas @@ -0,0 +1,603 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This unit encapsulate the ICMP.DLL into a VCL of type TPing. + Using this object, you can easily ping any host on your network. + Works only in 32 bits mode (no Delphi 1) under NT or 95. + If you wants to build a console mode program, use the TICMP + object. You'll have a much smaller program. +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Creation: January 6, 1997 +Version: 1.11 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 - 2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Nov 30, 1997 V1.00 Added DNSLookup capability (taken from TWSocket) +Dec 13, 1997 V1.01 Added OnEchoRequest and OnEchoReply events and removed the + corresponding OnDisplay event. This require to modify existing + programs. +May 05, 1998 V1.02 Changed lpszClassName from 'XSocketWindowClass' to + 'ICSPingWindowClass' to avoid class name conflict with TWSocket. + Thanks to Bill Parke who found the + problem. +Dec 26, 1998 V1.10 Changed all events to make sender reference TPing object + and added an argument 'Icmp' which point to the underlaying TIcmp + object (this was the sender in previous version). This require + modification of existing code. +Jan 24, 1999 V1.11 Surfaced Flags property to allow fragmentation check + (Flags = $02 to enable fragmentation check) +Nov 10, 2002 V1.12 Changed argument name from Error to Status in OnEchoReply + to better reflect his use. 0 means OK ! + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Ping; + +{$IFDEF VER80} +// This source file is *NOT* compatible with Delphi 1 because it uses +// Win 32 features. +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, Winsock, Icmp; + +const + PingVersion = 111; + CopyRight : String = ' TPing (c) 1997-2000 F. Piette V1.11 '; + WM_ASYNCGETHOSTBYNAME = WM_USER + 2; + +type + TDnsLookupDone = procedure (Sender: TObject; Error: Word) of object; + TPingDisplay = procedure(Sender: TObject; Icmp: TObject; Msg : String) of object; + TPingReply = procedure(Sender: TObject; Icmp: TObject; Status : Integer) of object; + TPingRequest = procedure(Sender: TObject; Icmp: TObject) of object; + TPing = class(TComponent) + private + FIcmp : TICMP; + FWindowHandle : HWND; + FDnsLookupBuffer : array [0..MAXGETHOSTSTRUCT] of char; + FDnsLookupHandle : THandle; + FDnsResult : String; + FOnDnsLookupDone : TDnsLookupDone; + FOnEchoRequest : TPingRequest; + FOnEchoReply : TPingReply; + FOnDisplay : TPingDisplay; + protected + procedure WndProc(var MsgRec: TMessage); + procedure WMAsyncGetHostByName(var msg: TMessage); message WM_ASYNCGETHOSTBYNAME; + procedure SetAddress(Value : String); + function GetAddress : String; + procedure SetSize(Value : Integer); + function GetSize : Integer; + procedure SetTimeout(Value : Integer); + function GetTimeout : Integer; + function GetReply : TIcmpEchoReply; + function GetErrorCode : Integer; + function GetErrorString : String; + function GetHostName : String; + function GetHostIP : String; + procedure SetTTL(Value : Integer); + function GetTTL : Integer; + procedure Setflags(Value : Integer); + function Getflags : Integer; +// procedure SetOnDisplay(Value : TICMPDisplay); +// function GetOnDisplay : TICMPDisplay; +// procedure SetOnEchoRequest(Value : TNotifyEvent); +// function GetOnEchoRequest : TNotifyEvent; +// procedure SetOnEchoReply(Value : TICMPReply); +// function GetOnEchoReply : TICMPReply; + procedure IcmpEchoReply(Sender: TObject; Error : Integer); + procedure IcmpEchoRequest(Sender: TObject); + procedure IcmpDisplay(Sender: TObject; Msg: String); + public + constructor Create(Owner : TComponent); override; + destructor Destroy; override; + function Ping : Integer; + procedure DnsLookup(HostName : String); virtual; + procedure CancelDnsLookup; + + property Reply : TIcmpEchoReply read GetReply; + property ErrorCode : Integer read GetErrorCode; + property ErrorString : String read GetErrorString; + property HostName : String read GetHostName; + property HostIP : String read GetHostIP; + property Handle : HWND read FWindowHandle; + property DnsResult : String read FDnsResult; + published + property Address : String read GetAddress + write SetAddress; + property Size : Integer read GetSize + write SetSize; + property Timeout : Integer read GetTimeout + write SetTimeout; + property TTL : Integer read GetTTL + write SetTTL; + property Flags : Integer read Getflags + write SetFlags; + property OnDisplay : TPingDisplay read FOnDisplay + write FOnDisplay; + property OnEchoRequest : TPingRequest read FOnEchoRequest + write FOnEchoRequest; + property OnEchoReply : TPingReply read FOnEchoReply + write FOnEchoReply; + property OnDnsLookupDone : TDnsLookupDone + read FOnDnsLookupDone + write FOnDnsLookupDone; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('fpiette', [TPing]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function XSocketWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TPing; + MsgRec : TMessage; +begin + { At window creation ask windows to store a pointer to our object } + Obj := TPing(GetWindowLong(ahWnd, 0)); + + { If the pointer is not assigned, just call the default procedure } + if not Assigned(Obj) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass paramter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + Obj.WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This global variable is used to store the windows class characteristic } +{ and is needed to register the window class used by TWSocket } +var + XSocketWindowClass: TWndClass = ( + style : 0; + lpfnWndProc : @XSocketWindowProc; + cbClsExtra : 0; + cbWndExtra : SizeOf(Pointer); + hInstance : 0; + hIcon : 0; + hCursor : 0; + hbrBackground : 0; + lpszMenuName : nil; + lpszClassName : 'ICSPingWindowClass'); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Allocate a window handle. This means registering a window class the first } +{ time we are called, and creating a new window each time we are called. } +function XSocketAllocateHWnd(Obj : TObject): HWND; +var + TempClass : TWndClass; + ClassRegistered : Boolean; +begin + { Check if the window class is already registered } + XSocketWindowClass.hInstance := HInstance; + ClassRegistered := GetClassInfo(HInstance, + XSocketWindowClass.lpszClassName, + TempClass); + if not ClassRegistered then begin + { Not yet registered, do it right now } + Result := Windows.RegisterClass(XSocketWindowClass); + if Result = 0 then + Exit; + end; + + { Now create a new window } + Result := CreateWindowEx(WS_EX_TOOLWINDOW, + XSocketWindowClass.lpszClassName, + '', { Window name } + WS_POPUP, { Window Style } + 0, 0, { X, Y } + 0, 0, { Width, Height } + 0, { hWndParent } + 0, { hMenu } + HInstance, { hInstance } + nil); { CreateParam } + + { if successfull, the ask windows to store the object reference } + { into the reserved byte (see RegisterClass) } + if (Result <> 0) and Assigned(Obj) then + SetWindowLong(Result, 0, Integer(Obj)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Free the window handle } +procedure XSocketDeallocateHWnd(Wnd: HWND); +begin + DestroyWindow(Wnd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + if Msg = WM_ASYNCGETHOSTBYNAME then + WMAsyncGetHostByName(MsgRec) + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.WMAsyncGetHostByName(var msg: TMessage); +var + Phe : Phostent; + IPAddr : TInAddr; + Error : Word; +begin + if msg.wParam <> LongInt(FDnsLookupHandle) then + Exit; + FDnsLookupHandle := 0; + Error := Msg.LParamHi; + if Error = 0 then begin + Phe := PHostent(@FDnsLookupBuffer); + IPAddr := PInAddr(Phe^.h_addr_list^)^; + FDnsResult := StrPas(inet_ntoa(IPAddr)); + end; + if Assigned(FOnDnsLookupDone) then + FOnDnsLookupDone(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TPing.Create(Owner : TComponent); +begin + Inherited Create(Owner); + FIcmp := TICMP.Create; + FIcmp.OnDisplay := IcmpDisplay; + FIcmp.OnEchoRequest := IcmpEchoRequest; + FIcmp.OnEchoReply := IcmpEchoReply; + { Delphi 32 bits has threads and VCL is not thread safe. } + { We need to do our own way to be thread safe. } + FWindowHandle := XSocketAllocateHWnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TPing.Destroy; +begin + CancelDnsLookup; { Cancel any pending dns lookup } + XSocketDeallocateHWnd(FWindowHandle); + if Assigned(FIcmp) then begin + FIcmp.Destroy; + FIcmp := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.IcmpDisplay(Sender: TObject; Msg: String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Sender, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.IcmpEchoReply(Sender: TObject; Error : Integer); +begin + if Assigned(FOnEchoReply) then + FOnEchoReply(Self, Sender, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.IcmpEchoRequest(Sender: TObject); +begin + if Assigned(FOnEchoRequest) then + FOnEchoRequest(Self, Sender); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.Ping : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.Ping + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.CancelDnsLookup; +begin + if FDnsLookupHandle = 0 then + Exit; + if WSACancelAsyncRequest(FDnsLookupHandle) <> 0 then + raise Exception.CreateFmt('WSACancelAsyncRequest failed, error #%d', + [WSAGetLastError]); + FDnsLookupHandle := 0; + if Assigned(FOnDnsLookupDone) then + FOnDnsLookupDone(Self, WSAEINTR); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.DnsLookup(HostName : String); +var + IPAddr : TInAddr; +begin + { Cancel any pending lookup } + if FDnsLookupHandle <> 0 then + WSACancelAsyncRequest(FDnsLookupHandle); + + FDnsResult := ''; + + IPAddr.S_addr := Inet_addr(@HostName[1]); + if IPAddr.S_addr <> u_long(INADDR_NONE) then begin + FDnsResult := StrPas(inet_ntoa(IPAddr)); + if Assigned(FOnDnsLookupDone) then + FOnDnsLookupDone(Self, 0); + Exit; + end; + + FDnsLookupHandle := WSAAsyncGetHostByName(FWindowHandle, + WM_ASYNCGETHOSTBYNAME, + @HostName[1], + @FDnsLookupBuffer, + SizeOf(FDnsLookupBuffer)); + if FDnsLookupHandle = 0 then + raise Exception.CreateFmt( + '%s: can''t start DNS lookup, error #%d', + [HostName, WSAGetLastError]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetAddress(Value : String); +begin + if Assigned(FIcmp) then + FIcmp.Address := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetAddress : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.Address + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetSize(Value : Integer); +begin + if Assigned(FIcmp) then + FIcmp.Size := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetSize : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.Size + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetTimeout(Value : Integer); +begin + if Assigned(FIcmp) then + FIcmp.Timeout := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetTimeout : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.Timeout + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetTTL(Value : Integer); +begin + if Assigned(FIcmp) then + FIcmp.TTL := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetTTL : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.TTL + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetFlags(Value : Integer); +begin + if Assigned(FIcmp) then + FIcmp.Flags := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetFlags : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.flags + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetReply : TIcmpEchoReply; +begin + if Assigned(FIcmp) then + Result := FIcmp.Reply + else + FillChar(Result, SizeOf(Result), 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetErrorCode : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.ErrorCode + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetErrorString : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.ErrorString + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetHostName : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.HostName + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetHostIP : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.HostIP + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{procedure TPing.SetOnDisplay(Value : TICMPDisplay); +begin + if Assigned(FIcmp) then + FIcmp.OnDisplay := Value; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{function TPing.GetOnDisplay : TICMPDisplay; +begin + if Assigned(FIcmp) then + Result := FIcmp.OnDisplay + else + Result := nil; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{procedure TPing.SetOnEchoRequest(Value : TNotifyEvent); +begin + if Assigned(FIcmp) then + FIcmp.OnEchoRequest := Value; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{function TPing.GetOnEchoRequest : TNotifyEvent; +begin + if Assigned(FIcmp) then + Result := FIcmp.OnEchoRequest + else + Result := nil; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{procedure TPing.SetOnEchoReply(Value : TICMPReply); +begin + if Assigned(FIcmp) then + FIcmp.OnEchoReply := Value; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{function TPing.GetOnEchoReply : TICMPReply; +begin + if Assigned(FIcmp) then + Result := FIcmp.OnEchoReply + else + Result := nil; +end; +} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/tncnx.dcr b/lib/ics/Delphi/Vc32/tncnx.dcr new file mode 100644 index 00000000..3e5cfb48 Binary files /dev/null and b/lib/ics/Delphi/Vc32/tncnx.dcr differ diff --git a/lib/ics/Delphi/Vc32/tnemulvt.dcr b/lib/ics/Delphi/Vc32/tnemulvt.dcr new file mode 100644 index 00000000..f171a436 Binary files /dev/null and b/lib/ics/Delphi/Vc32/tnemulvt.dcr differ diff --git a/lib/ics/Delphi/Vc32/tnscript.dcr b/lib/ics/Delphi/Vc32/tnscript.dcr new file mode 100644 index 00000000..30caff81 Binary files /dev/null and b/lib/ics/Delphi/Vc32/tnscript.dcr differ diff --git a/lib/ics/Delphi/Vc32/tnscript.dcu b/lib/ics/Delphi/Vc32/tnscript.dcu new file mode 100644 index 00000000..5ef819d5 Binary files /dev/null and b/lib/ics/Delphi/Vc32/tnscript.dcu differ diff --git a/lib/ics/Delphi/Vc32/tnscript.pas b/lib/ics/Delphi/Vc32/tnscript.pas new file mode 100644 index 00000000..3232c612 --- /dev/null +++ b/lib/ics/Delphi/Vc32/tnscript.pas @@ -0,0 +1,570 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TTnScript component add scripting capabilities to TTnEmulVT +Creation: February 24th, 1998 +Version: 1.03 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1998-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Quick Reference: + +TTnScript is a descendent from TTnEmulVT. It does exactly what TTnEmulVT does +(Ansi terminal emulation) and add some scripting capabilities. +TTnScript follows the received data and search in the data stream for +given strings. When found, an event handler is called. + +Strings to search are specified by calling AddEvent. Each string is identified +by an ID (an integer number) which must be unique. + +You can remove a string using RemoveEvent, passing the ID you gave when +inserting the string in the list. You can remove all the strings with +RemoveAllEvents. + +Each string to search for is associated with another string which will be sent +by the component when the search string is found. This can be used for example +when you search for a login prompt ('login') to send the username when this +prompt is found. Same for password. + +Each string to search for is also associated with an event handler which will +be triggered when the string is found, right after having sent the string to +send. This specific event can be used to customize what has to be done when +the string is found (for example update the user interface or query the user +for some value to send). + +Finally, each string to search is associated with a set of flags which tells +the component some special actions such as ignoring character case when +comparing text, or make the string persistant (normaly when a string has been +found, it is removed from the list). + +Strings are searched in the order they are added to the list. So it can be +very different if you add 'login' and 'password' to search for than if you +add 'login' only and then when 'login' is found, add 'password'. + +To scan the data stream, the component use a circular buffer whose dimension +is 80 characters by default. You can change that by assigning InputBufferSize. +The buffer size should be at least twice the size of the longest string to +search. If you use an oversized buffer, you have a performance penalty because +the buffer is searched as each data packet comes into the stream. + +An automatic login procedure could looks like this: + TnScript1.AddEvent(1, 'login', 'root' + #13#10, [efIgnoreCase], nil); + TnScript1.AddEvent(2, 'password', 'boss' + #13#10, [efIgnoreCase], nil); + TnScript1.Connect; + +The nil argument could be replaced by a procedure (event handler) to make some +computing when the string to search for is found. Here is an example: + + TnScript1.AddEvent(2, 'prompt', '', [efIgnoreCase], PromptEvent); + +procedure TForm1.PromptEvent(Sender : TObject; ID : Integer); +begin + .... Your code goes here. You can do everithing .... + Label1.Caption := 'Logged !'; + TnScript1.SendStr('ls -l' + #13 + #10); Like sending some data +end; + +Updates: +Mar 14, 1999 V1.01 efIgnoreCase was ignored ! +May 13, 1999 V1.02 Made all methods virtual. +Aug 20, 1999 V1.03 Added compile time options. Revised for BCB4. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnScript; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$X+} { Enable extended syntax } +{$IFNDEF VER80} { Not for Delphi 1 } + {$H+} { Use long strings } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} +{$IFDEF VER125} { C++ Builder V4.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +{.DEFINE DUMP} + +uses + Wintypes, WinProcs, Classes, SysUtils, TnEmulVT; + +const + TnScriptVersion = 1.03; + CopyRight : String = ' TTnScript (c) 1998-2002 F. Piette V1.03 '; + +type + TnScriptException = class(Exception); + TEventHandler = procedure (Sender : TObject; ID : Integer) of object; + TEventFlag = (efIgnoreCase, { Ignore case in comparaisons } + efPersistent); {Do not delete event when found } + TEventFlags = set of TEventFlag; + TDisplayEvent = procedure (Sender : TObject; Msg : String) of object; + TStringMatch = procedure (Sender : TObject; ID : Integer) of object; + + TEventDescriptor = record + ID : Integer; + Search : String; + ToSend : String; + Flags : TEventFlags; + Handler : TEventHandler; + end; + PEventDescriptor = ^TEventDescriptor; + + TTnScript = class(TTnEmulVT) + protected + FEventList : TList; + FInputBuffer : PChar; + FInputBufferSize : Integer; + FInputBufferCount : Integer; + FInputBufferStart : Integer; + FOnDisplay : TDisplayEvent; + FOnStringMatch : TStringMatch; + function SearchEvent(ID : Integer) : Integer; virtual; + procedure TriggerDataAvailable(Buffer : Pointer; Len: Integer); override; + function FindEventString(S : String; Flags : TEventFlags) : Integer; virtual; + procedure ScanEvents; virtual; + procedure ProcessInputData(Buffer: PChar; Len: Integer); virtual; + procedure TriggerDisplay(Msg : String); virtual; + procedure TriggerStringMatch(ID : Integer); virtual; + procedure NextOne(var N : Integer); virtual; + procedure SetInputBufferSize(newSize : Integer); virtual; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + procedure AddEvent(ID : Integer; + Search : String; + ToSend : String; + Flags : TEventFlags; + Handler : TEventHandler); virtual; + procedure RemoveEvent(ID : Integer); virtual; + procedure RemoveAllEvents; virtual; + published + property InputBufferSize : Integer read FInputBufferSize + write SetInputBufferSize; + property OnDisplay : TDisplayEvent read FOnDisplay + write FOnDisplay; + property OnStringMatch : TStringMatch read FOnStringMatch + write FOnStringMatch; + + end; + +procedure Register; + +implementation + +{$IFDEF DUMP} +const + CtrlCode : array [0..31] of String = ('NUL', 'SOH', 'STX', 'ETX', + 'EOT', 'ENQ', 'ACK', 'BEL', + 'BS', 'HT', 'LF', 'VT', + 'FF', 'CR', 'SO', 'SI', + 'DLE', 'DC1', 'DC2', 'DC3', + 'DC4', 'NAK', 'SYN', 'ETB', + 'CAN', 'EM', 'SUB', 'ESC', + 'FS', 'GS', 'RS', 'US'); +{$ENDIF} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TTnScript]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTnScript.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FEventList := TList.Create; + SetInputBufferSize(80); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTnScript.Destroy; +begin + if Assigned(FEventList) then begin + FEventList.Free; + FEventList := nil; + end; + if FInputBuffer <> nil then begin + FreeMem(FInputBuffer, FInputBufferSize); + FInputBuffer := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Set the input buffer size. This will clear any data already in the buffer } +procedure TTnScript.SetInputBufferSize(newSize : Integer); +begin + { Round the size to the nearest upper 16 bytes limit } + newSize := ((newSize shr 4) + 1) shl 4; + + { If no change, do nothing } + if FInputBufferSize = newSize then + Exit; + + { If buffer already allocated, free it } + if FInputBuffer <> nil then begin + FreeMem(FInputBuffer, FInputBufferSize); + FInputBuffer := nil; + end; + + { Allocate a new buffer of the given size } + FInputBufferSize := newSize; + GetMem(FInputBuffer, FInputBufferSize); + + { Clear the markers } + FInputBufferStart := 0; + FInputBufferCount := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.TriggerDisplay(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.TriggerStringMatch(ID : Integer); +begin + if Assigned(FOnStringMatch) then + FOnStringMatch(Self, ID); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnScript.SearchEvent(ID : Integer) : Integer; +begin + if Assigned(FEventList) then begin + for Result := 0 to FEventList.Count - 1 do begin + if PEventDescriptor(FEventList.Items[Result])^.ID = ID then + Exit; + end; + end; + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Add an event (a string to search for) to the list } +procedure TTnScript.AddEvent( + ID : Integer; + Search : String; + ToSend : String; + Flags : TEventFlags; + Handler : TEventHandler); +var + NewEvent : PEventDescriptor; +begin + if not Assigned(FEventList) then + raise TnScriptException.Create('AddEvent: No Event List'); + + if SearchEvent(ID) <> -1 then + raise TnScriptException.Create('AddEvent: ID ' + IntToStr(ID) + + ' already exist'); + if Length(Search) <= 0 then + raise TnScriptException.Create('AddEvent: String to search empty'); + + New(NewEvent); + FEventList.Add(NewEvent); + NewEvent^.ID := ID; + NewEvent^.ToSend := ToSend; + NewEvent^.Flags := Flags; + NewEvent^.Handler := Handler; + if efIgnoreCase in Flags then + NewEvent^.Search := UpperCase(Search) + else + NewEvent^.Search := Search; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Remove an event from the list, given his ID } +procedure TTnScript.RemoveEvent(ID : Integer); +var + Item : Integer; + PEvent : PEventDescriptor; +begin + if not Assigned(FEventList) then + raise TnScriptException.Create('AddEvent: No Event List'); + + Item := SearchEvent(ID); + if Item < 0 then + raise TnScriptException.Create('RemoveEvent: ID ' + IntToStr(ID) + + ' does''nt exist'); + PEvent := FEventList.Items[Item]; + + { Replace the ID to check later that we do not reuse the freed event } + PEvent^.ID := -1; + + { Free the memory and remove the pointer from list } + Dispose(PEvent); + FEventList.Delete(Item); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.RemoveAllEvents; +var + PEvent : PEventDescriptor; +begin + if not Assigned(FEventList) then + raise TnScriptException.Create('AddEvent: No Event List'); + + while FEventList.Count > 0 do begin + PEvent := FEventList.Items[0]; + PEvent^.ID := -1; + Dispose(PEvent); + FEventList.Delete(0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF DUMP} +procedure WriteCh(Ch : Char); +begin + if ord(Ch) < 32 then + write('<', CtrlCode[Ord(Ch)], '>') + else + write(Ch); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure WriteBuf(Buffer : PChar; Len : Integer); +var + I : Integer; +begin + for I := 0 to Len - 1 do + WriteCh(Buffer[I]); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Advance char index in the circular buffer } +procedure TTnScript.NextOne(var N : Integer); +begin + Inc(N); + if N >= FInputBufferSize then + N := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Search for a string in the circular buffer. } +{ Returns the number of chars between the buffer start and the end of the } +{ event found, or -1 if not found. } +function TTnScript.FindEventString(S : String; Flags : TEventFlags) : Integer; +var + N, M, I, J, K : Integer; + Ch : Char; +begin + Result := -1; + I := FInputBufferStart; + N := 0; + while N < FInputBufferCount do begin + if efIgnoreCase in Flags then + Ch := UpperCase(FInputBuffer[I])[1] + else + Ch := FInputBuffer[I]; + + if Ch = S[1] then begin + { Same first letter, check up to end of S } + J := I; + K := 2; + M := N; + while TRUE do begin + NextOne(J); + + Inc(M); + if M >= FInputBufferCount then + break; + + if K >= Length(S) then begin + { Found ! } + Result := M + 1; + Exit; + end; + if efIgnoreCase in Flags then + Ch := UpperCase(FInputBuffer[J])[1] + else + Ch := FInputBuffer[J]; + if Ch <> S[K] then + break; { Compare failed } + Inc(K); + end; + end; + + NextOne(I); + Inc(N); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.ScanEvents; +var + Item : Integer; + PEvent : PEventDescriptor; + I : Integer; + ID : Integer; + Handler : TEventHandler; +begin +{$IFDEF DUMP} + Write('ScanEvents Start=', FInputBufferStart, + ' Count=', FInputBufferCount, + ' '''); + I := FInputBufferStart; + for J := 1 to FInputBufferCount do begin + WriteCh(FInputBuffer[I]); + NextOne(I); + end; + WriteLn(''''); +{$ENDIF} + + for Item := 0 to FEventList.Count - 1 do begin + PEvent := PEventDescriptor(FEventList.Items[Item]); + I := FindEventString(PEvent^.Search, PEvent^.Flags); + if I <> -1 then begin +{$IFDEF DUMP} + WriteLn('Found event ''', PEvent^.Search, ''''); +{$ENDIF} + TriggerDisplay('Event ''' + PEvent^.Search + ''''); + FInputBufferCount := FInputBufferCount - I; + FInputBufferStart := FInputBufferStart + I; + if FInputBufferStart >= FInputBufferSize then + FInputBufferStart := FInputBufferStart - FInputBufferSize; + ID := PEvent^.ID; + Handler := PEvent^.Handler; + if Length(PEvent^.ToSend) > 0 then + SendStr(PEvent^.ToSend); + { Call the global event handler OnStringMatch } + TriggerStringMatch(ID); + { Call the specific event handler } + if Assigned(Handler) then + Handler(Self, ID); + { It's possible that the event has been removed ! } + { Make sure it is always there before using it } + try + if PEvent^.ID = ID then begin + if not (efPersistent in PEvent^.FLags) then + RemoveEvent(ID); + end; + except + { Ignore any exception } + end; + Exit; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.ProcessInputData(Buffer: PChar; Len: Integer); +const + Recurse : Integer = 0; +var + I, J : Integer; +begin + if not Assigned(FInputBuffer) then + Exit; + + Inc(Recurse); { For debugging purpose } + + if Len > (FInputBufferSize div 2) then begin + { Input buffer too small, process recursively two halfs } + ProcessInputData(Buffer, Len div 2); + ProcessInputData(Buffer + (Len div 2), Len - (Len div 2)); + Dec(Recurse); + Exit; + end; + +{$IFDEF DUMP} + WriteLn; + Write(Calls, ' ', Recurse, ' ', FInputBufferStart, ' ', + FInputBufferCount, ') Len=', Len, ' Buffer='''); + WriteBuf(Buffer, Len); + WriteLn(''''); +{$ENDIF} + + { Where is the end of the circular buffer, that's the question ! } + I := FInputBufferStart + FInputBufferCount; + if I >= FInputBufferSize then + I := I - FInputBufferSize; + + { Add data to the end of the circular buffer, overwriting any previously } + { stored data (remember, we don't ever receive more than 1/2 buffer size } + J := 0; + while J < Len do begin + FInputBuffer[I] := Buffer[J]; + Inc(J); + NextOne(I); + if FInputBufferCount = FInputBufferSize then + NextOne(FInputBufferStart) + else + Inc(FInputBufferCount); + end; + { Scan for events } + ScanEvents; + + Dec(Recurse); { For debugging purpose } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnScript.TriggerDataAvailable(Buffer : Pointer; Len: Integer); +begin + if FEventList.Count > 0 then + ProcessInputData(PChar(Buffer), Len); + + inherited TriggerDataAvailable(Buffer, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/wait.dcr b/lib/ics/Delphi/Vc32/wait.dcr new file mode 100644 index 00000000..83ac26ea Binary files /dev/null and b/lib/ics/Delphi/Vc32/wait.dcr differ diff --git a/lib/ics/Delphi/Vc32/wait.dcu b/lib/ics/Delphi/Vc32/wait.dcu new file mode 100644 index 00000000..1a4238a0 Binary files /dev/null and b/lib/ics/Delphi/Vc32/wait.dcu differ diff --git a/lib/ics/Delphi/Vc32/wait.pas b/lib/ics/Delphi/Vc32/wait.pas new file mode 100644 index 00000000..002d0613 --- /dev/null +++ b/lib/ics/Delphi/Vc32/wait.pas @@ -0,0 +1,336 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: WAIT.PAS +Object: Delphi component which enable a component or application to + wait for some event, optionnaly displaying a progress bar. +Author: Franois PIETTE +Creation: April, 1996 +Version: 2.13 +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jul 22, 1997 Adapted to Delphi 3 +Oct 22, 1997 V2.00 Added WaitVersion constant and Running property +Nov 11, 1997 V2.10 Made a TCustomWait base component with virtual functions. + This will easy the making of descendend components. + Renamed OnWaitEvent -> OnWait + OnTimeOutEvent -> OnTimeout + Added events: + OnWaitStart When the component starts his job. + OnWaiting When the component is waiting. + OnWaitStop When the component stops his job. +Mar 27, 1998 V2.11 Adapted for C++Builder 3 +Apr 20, 1998 V2.12 Removed the second 'r' from 'courrier' +Jul 08, 1998 V2.13 Adadpted for Delphi 4 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Wait; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$IFNDEF VER80} { Not for Delphi 1 } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, ExtCtrls; + +const + WaitVersion = 212; + +type + TWaitEvent = procedure(Sender: TObject; Count : integer) of object; + + TCustomWait = class(TCustomControl) + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + private + FPen : TPen; + FFont : TFont; + FBrush : TBrush; + FCaption : String; + FTimer : TTimer; + FOnWait : TWaitEvent; + FOnWaiting : TNotifyEvent; + FOnWaitStart : TNotifyEvent; + FOnWaitStop : TNotifyEvent; + FOnTimeout : TNotifyEvent; + FModalResult : TModalResult; + FStartVal : Integer; + protected + procedure Paint; override; + procedure TimerEvent(Sender: TObject); + procedure AppMessage(var Msg: TMsg; var Handled: Boolean); + function GetRunning : Boolean; + procedure SetInterval(Value : Word); + function GetInterval : Word; + public + procedure Start; virtual; + procedure Stop; virtual; + procedure StartModal; virtual; + procedure Restart; virtual; + protected + property Caption : String read FCaption write FCaption; + property ModalResult : TModalResult read FModalResult write FModalResult; + property Interval : Word read GetInterval write SetInterval; + property Running : Boolean read GetRunning; + property OnWait : TWaitEvent read FOnWait write FOnWait; + property OnTimeout : TNotifyEvent read FOnTimeout write FOnTimeout; + property OnWaiting : TNotifyEvent read FOnWaiting write FOnWaiting; + property OnWaitStart : TNotifyEvent read FOnWaitStart write FOnWaitStart; + property OnWaitStop : TNotifyEvent read FOnWaitStop write FOnWaitStop; + end; + + TWait = class(TCustomWait) + published + property Caption; + property ModalResult; + property Interval; + property OnWait; + property OnWaiting; + property OnWaitStart; + property OnWaitStop; + property OnTimeout; + property Running; + property Visible; + end; + +procedure Register; + +implementation + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TWait]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] >= '0') and (Value[i] <= '9')do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomWait.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + IsControl := TRUE; + Width := 192; + Height := 32; + Caption := '60'; + FStartVal := 60; + FOnWait := nil; + FBrush := TBrush.Create; + FPen := TPen.Create; + FFont := TFont.Create; + FFont.Size := 8; + FFont.Name := 'Courier'; + FFont.Pitch := fpFixed; + FTimer := TTimer.Create(Self); + FTimer.Enabled := FALSE; + FTimer.OnTimer := TimerEvent; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomWait.Destroy; +begin + FPen.Free; + FFont.Free; + FBrush.Free; + FTimer.Free; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.SetInterval(Value : Word); +begin + FTimer.Interval := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWait.GetInterval : Word; +begin + Result := FTimer.Interval; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Start; +begin + FStartVal := atoi(Caption); + if FStartVal = 0 then begin + FStartVal := 15; + Caption := IntToStr(FStartVal); + end; + FTimer.Enabled := TRUE; + if Assigned(FOnWaitStart) then + FOnWaitStart(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Restart; +begin + Caption := IntToStr(FStartVal); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Stop; +begin + FModalResult := mrOk; + FTimer.Enabled := FALSE; + Caption := IntToStr(FStartVal); + if Assigned(FOnWaitStop) then + FOnWaitStop(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.TimerEvent(Sender: TObject); +var + Count : Integer; +begin + Count := atoi(FCaption) - 1; + + if Assigned(FOnWait) then + FOnWait(Self, Count); + + if Count <= 0 then begin + FTimer.Enabled := FALSE; + FCaption := 'Timeout'; + FModalResult := mrCancel; + Caption := IntToStr(FStartVal); + if Assigned(FOnTimeout) then + FOnTimeout(Self); + end + else begin + FCaption := IntToStr(count); + end; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.AppMessage(var Msg: TMsg; var Handled: Boolean); +begin + if (Msg.Message = WM_LBUTTONDOWN) or +{ (Msg.Message = WM_LBUTTONUP) or } + (Msg.Message = WM_RBUTTONDOWN) or +{ (Msg.Message = WM_RBUTTONUP) or } + (Msg.Message = WM_LBUTTONDBLCLK) or + (Msg.Message = WM_RBUTTONDBLCLK) or + (Msg.Message = WM_KEYDOWN) or +{ (Msg.Message = WM_KEYUP) or } + (Msg.Message = WM_SYSKEYDOWN) {or + (Msg.Message = WM_SYSKEYUP) } + then begin + MessageBeep(MB_OK); + Handled := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWait.GetRunning : Boolean; +begin + Result := FTimer.Enabled; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.StartModal; +var + OldOnMessage : TMessageEvent; +begin + OldOnMessage := Application.OnMessage; + Application.OnMessage := AppMessage; + FModalResult := mrNone; + Start; + while Running do begin + if Assigned(FOnWaiting) then + FOnWaiting(Self); + Application.ProcessMessages; + end; + Application.OnMessage := OldOnMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Paint; +var + Len : Integer; +begin + Len := (atoi(Caption) * (Width - 7)) div FStartVal; + + Canvas.Pen := FPen; + Canvas.Font := FFont; + Canvas.Brush := FBrush; + Canvas.Brush.Color := clWhite; + Canvas.Rectangle(0, 0, Width - 1, Height - 1); + Canvas.Brush.Color := clHighlight; + Canvas.Rectangle(3, 3, 3 + Len, Height - 4); + Canvas.TextOut(4, Height div 2 - 8, FCaption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + + diff --git a/lib/ics/Delphi/Vc32/wsockbuf.dcu b/lib/ics/Delphi/Vc32/wsockbuf.dcu new file mode 100644 index 00000000..e0d41af4 Binary files /dev/null and b/lib/ics/Delphi/Vc32/wsockbuf.dcu differ diff --git a/lib/ics/Delphi/Vc32/wsockbuf.pas b/lib/ics/Delphi/Vc32/wsockbuf.pas new file mode 100644 index 00000000..016f279c --- /dev/null +++ b/lib/ics/Delphi/Vc32/wsockbuf.pas @@ -0,0 +1,225 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TBuffer is an object wich buffers data in a single dynamically + allocated memory block. It is a kind of FIFO wich manages + characters in bloc of various sizes. +EMail: http://users.swing.be/francois.piette francois.piette@swing.be + http://www.rtfm.be/fpiette francois.piette@rtfm.be + francois.piette@pophost.eunet.be +Creation: April 1996 +Version: 2.01 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997-2000 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Mar 06, 1998 V2.00 Added a property and a parameter for the create method + to select the buffer size. Using a 0 value will make the object + use the default 1514 bytes (the largest size for an ethernet + packet). +Jul 08, 1998 V2.01 Adadpted for Delphi 4 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WSockBuf; + +interface + +uses + SysUtils; + +const + WSockBufVersion = 201; + +type + TBuffer = class(TObject) + Buf : Pointer; + FBufSize : Integer; + WrCount : Integer; + RdCount : Integer; + public + constructor Create(nSize : Integer); virtual; + destructor Destroy; override; + function Write(Data : Pointer; Len : Integer) : Integer; + function Read(Data : Pointer; Len : Integer) : Integer; + function Peek(var Len : Integer) : Pointer; + function Remove(Len : Integer) : Integer; + procedure SetBufSize(newSize : Integer); + property BufSize : Integer read FBufSize write SetBufSize; + end; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TBuffer.Create(nSize : Integer); +begin + inherited Create; + WrCount := 0; + RdCount := 0; + BufSize := nSize; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TBuffer.Destroy; +begin + if Assigned(Buf) then + FreeMem(Buf, FBufSize); + + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TBuffer.SetBufSize(newSize : Integer); +var + newBuf : Pointer; +begin + if newSize <= 0 then + newSize := 1514; + + if newSize = FBufSize then + Exit; + + if WrCount = RdCount then begin + { Buffer is empty } + if Assigned(Buf) then + FreeMem(Buf, FBufSize); + FBufSize := newSize; + GetMem(Buf, FBufSize); + end + else begin + { Buffer contains data } + GetMem(newBuf, newSize); + Move(Buf^, newBuf^, WrCount); + if Assigned(Buf) then + FreeMem(Buf, FBufSize); + FBufSize := newSize; + Buf := newBuf; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Write(Data : Pointer; Len : Integer) : Integer; +var + Remaining : Integer; + Copied : Integer; +begin + Remaining := FBufSize - WrCount; + if Remaining <= 0 then + Result := 0 + else begin + if Len <= Remaining then + Copied := Len + else + Copied := Remaining; + Move(Data^, (PChar(Buf) + WrCount)^, Copied); + WrCount := WrCount + Copied; + Result := Copied; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Read(Data : Pointer; Len : Integer) : Integer; +var + Remaining : Integer; + Copied : Integer; +begin + Remaining := WrCount - RdCount; + if Remaining <= 0 then + Result := 0 + else begin + if Len <= Remaining then + Copied := Len + else + Copied := Remaining; + Move((PChar(Buf) + RdCount)^, Data^, Copied); + RdCount := RdCount + Copied; + + if RdCount = WrCount then begin + RdCount := 0; + WrCount := 0; + end; + + Result := Copied; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Peek(var Len : Integer) : Pointer; +var + Remaining : Integer; +begin + Remaining := WrCount - RdCount; + if Remaining <= 0 then begin + Len := 0; + Result := nil; + end + else begin + Len := Remaining; + Result := Pointer(PChar(Buf) + RdCount); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Remove(Len : Integer) : Integer; +var + Remaining : Integer; + Removed : Integer; +begin + Remaining := WrCount - RdCount; + if Remaining <= 0 then + Result := 0 + else begin + if Len < Remaining then + Removed := Len + else + Removed := Remaining; + RdCount := RdCount + Removed; + + if RdCount = WrCount then begin + RdCount := 0; + WrCount := 0; + end; + + Result := Removed; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/ics/Delphi/Vc32/wsocket.dcr b/lib/ics/Delphi/Vc32/wsocket.dcr new file mode 100644 index 00000000..2d3e5915 Binary files /dev/null and b/lib/ics/Delphi/Vc32/wsocket.dcr differ diff --git a/lib/ics/Delphi/Vc32/wsocket.ico b/lib/ics/Delphi/Vc32/wsocket.ico new file mode 100644 index 00000000..c39b7fc8 Binary files /dev/null and b/lib/ics/Delphi/Vc32/wsocket.ico differ diff --git a/lib/ics/Delphi1/IcsDel1.bat b/lib/ics/Delphi1/IcsDel1.bat new file mode 100644 index 00000000..a617dda0 --- /dev/null +++ b/lib/ics/Delphi1/IcsDel1.bat @@ -0,0 +1,129 @@ +@echo off +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * +REM * * +REM * ICS - Internet Component Suite * +REM * * +REM * Delphi 1 automated construction V1.00 * +REM * (c) 1997-2000 by Francois PIETTE * +REM * http://www.rtfm.be/fpiette/indexuk.htm * +REM * francois.piette@swing.be francois.piette@rtfm.be * +REM * * +REM * You must change PATH, DELPHI_PATH and ICS_PATH * +REM * below to fit your system. * +REM * * +REM * Remember to install all components in Delphi 1 ! * +REM * Remember to use Delphi 1 to open all forms and * +REM * ignore Font.CharSet and OldCreateOrder properties * +REM * * +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * + +SET DELPHI_PATH=C:\PROGRA~1\BORLAND\DELPHI1 +SET ICS_PATH=D:\FPIETTE + +PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;%DELPHI_PATH%\BIN + +echo /cw >dcc.cfg +echo /m >>dcc.cfg +echo /r%DELPHI_PATH%\LIB >>dcc.cfg +echo /u%DELPHI_PATH%\LIB >>dcc.cfg +echo /i%DELPHI_PATH%\LIB >>dcc.cfg +echo /E%ICS_PATH%\DELPHI1 >>dcc.cfg +echo /O%ICS_PATH%\DELPHI1 >>dcc.cfg +echo /I%ICS_PATH%\DELPHI\VC >>dcc.cfg +echo /I%ICS_PATH%\DELPHI\VC32 >>dcc.cfg +echo /I%ICS_PATH%\DELPHI\INTERNET >>dcc.cfg +echo /R%ICS_PATH%\DELPHI\VC >>dcc.cfg +echo /R%ICS_PATH%\DELPHI\VC32 >>dcc.cfg +echo /R%ICS_PATH%\DELPHI\INTERNET >>dcc.cfg +echo /U%ICS_PATH%\DELPHI\VC >>dcc.cfg +echo /U%ICS_PATH%\DELPHI\VC32 >>dcc.cfg +echo /U%ICS_PATH%\DELPHI\INTERNET >>dcc.cfg + +d: +cd %ICS_PATH%\delphi\internet +call ..\..\delphi1\dcc1 clidemo +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 client5 +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 client7 +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 dnslook +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 dynCli +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 finger +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 ftpserv +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 ftptst +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 httpasp +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 httpasy +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 httpchk +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 httpdmo +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 httpget +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 httppg +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 httptst +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 mailrcv +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 mailrob +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 mailsnd +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 md5test +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 mimedemo +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 mimetst +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 newsrdr +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 nslookup +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 pop3mime +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 recv +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 sender +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 server5 +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 sockstst +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 srvdemo +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 srvtcp +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 tcpsrv +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 tnclient +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 tndemo +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 tnsrv +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 twschat +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 udplstn +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 udpsend +if errorlevel 1 goto error +call ..\..\delphi1\dcc1 webserv +if errorlevel 1 goto error +goto done + +:error +@echo Compile error +goto done + +:done +@cd %ICS_PATH%\delphi1 + +:end diff --git a/lib/ics/Delphi1/dcc1.bat b/lib/ics/Delphi1/dcc1.bat new file mode 100644 index 00000000..a2c956f4 --- /dev/null +++ b/lib/ics/Delphi1/dcc1.bat @@ -0,0 +1,14 @@ +@echo off +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * +REM * * +REM * ICS - Internet Component Suite * +REM * * +REM * Delphi 1 automated construction V1.00 * +REM * (c) 1997-2000 by Francois PIETTE * +REM * http://www.rtfm.be/fpiette/indexuk.htm * +REM * francois.piette@swing.be francois.piette@rtfm.be * +REM * * +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * + +if not exist %1.res echo >%1.res +dcc -T%ICS_PATH%\DELPHI1 -T%DELPHI_PATH%\BIN -B %1.dpr diff --git a/lib/ics/Delphi2/Dcc2.bat b/lib/ics/Delphi2/Dcc2.bat new file mode 100644 index 00000000..442db420 --- /dev/null +++ b/lib/ics/Delphi2/Dcc2.bat @@ -0,0 +1,19 @@ +@echo off +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * +REM * * +REM * ICS - Internet Component Suite * +REM * * +REM * Delphi 2 automated construction V1.00 * +REM * (c) 1997-2000 by Francois PIETTE * +REM * http://www.rtfm.be/fpiette/indexuk.htm * +REM * francois.piette@swing.be francois.piette@rtfm.be * +REM * * +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * + +if exist %1.res goto compile +echo 1 ICON DISCARDABLE "ICS.ICO" >%1.rc +brcc32 %1.rc +del %1.rc + +:compile +dcc32 -H -W -B %2 %3 %4 %5 %6 %7 %8 %1.dpr diff --git a/lib/ics/Delphi2/Icsdel2.bat b/lib/ics/Delphi2/Icsdel2.bat new file mode 100644 index 00000000..3c0ae015 --- /dev/null +++ b/lib/ics/Delphi2/Icsdel2.bat @@ -0,0 +1,142 @@ +@echo off +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * +REM * * +REM * ICS - Internet Component Suite * +REM * * +REM * Delphi 1 automated construction V1.00 * +REM * (c) 1997-2000 by Francois PIETTE * +REM * http://www.rtfm.be/fpiette/indexuk.htm * +REM * francois.piette@swing.be francois.piette@rtfm.be * +REM * * +REM * You must change PATH, DELPHI_PATH and ICS_PATH * +REM * below to fit your system. * +REM * * +REM * Remember to install all components in Delphi 2 ! * +REM * Remember to use Delphi 2 to open all forms and * +REM * ignore Font.CharSet and OldCreateOrder properties * +REM * * +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * + +SET DELPHI_PATH=C:\PROGRA~1\BORLAND\DELPHI~1.0 +SET ICS_PATH=D:\FPIETTE + +PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;%DELPHI_PATH%\BIN + +echo -M >%ICS_PATH%\delphi\internet\dcc32.cfg +echo -R%DELPHI_PATH%\LIB >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -U%DELPHI_PATH%\LIB >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -I%DELPHI_PATH%\LIB >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -E%ICS_PATH%\DELPHI2 >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -I%ICS_PATH%\DELPHI\VC32 >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -I%ICS_PATH%\DELPHI\INTERNET >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -R%ICS_PATH%\DELPHI\VC32 >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -R%ICS_PATH%\DELPHI\INTERNET >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -U%ICS_PATH%\DELPHI\VC32 >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -U%ICS_PATH%\DELPHI\INTERNET >>%ICS_PATH%\delphi\internet\dcc32.cfg + +d: +cd %ICS_PATH%\delphi\internet +call ..\..\DELPHI2\dcc2 clidemo -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 client5 -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 client7 -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 concli1 -CC +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 concli2 -CC +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 consrv1 -CC -DNOFORMS +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 dlltst1 -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 dnslook -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 dynCli -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 finger -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 ftpthrd -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 ftpserv -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 ftptst -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 httpasp -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 httpasy -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 httpchk -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 httpdmo -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 httpget -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 httppg -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 httpthrd -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 httptst -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 icsdll1 +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 mailrcv -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 mailrob -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 mailsnd -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 md5test -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 mimedemo -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 mimetst -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 mtsrv -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 newsrdr -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 nslookup -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 pingtst -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 pop3mime -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 recv -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 sender -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 server5 -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 sockstst -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 srvdemo -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 srvtcp -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 tcpsrv -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 tnclient -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 tndemo -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 tnsrv -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 twschat -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 udplstn -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 udpsend -CG +if errorlevel 1 goto error +call ..\..\DELPHI2\dcc2 webserv -CG +if errorlevel 1 goto error +goto done + +:error +@echo Compile error +goto done + +:done +@cd %ICS_PATH%\DELPHI2 + +:end diff --git a/lib/ics/Delphi3/Dcc3.bat b/lib/ics/Delphi3/Dcc3.bat new file mode 100644 index 00000000..17f4f641 --- /dev/null +++ b/lib/ics/Delphi3/Dcc3.bat @@ -0,0 +1,19 @@ +@echo off +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * +REM * * +REM * ICS - Internet Component Suite * +REM * * +REM * Delphi 3 automated construction V1.00 * +REM * (c) 1997-2000 by Francois PIETTE * +REM * http://www.rtfm.be/fpiette/indexuk.htm * +REM * francois.piette@swing.be francois.piette@rtfm.be * +REM * * +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * + +if exist %1.res goto compile +echo 1 ICON DISCARDABLE "ICS.ICO" >%1.rc +brcc32 %1.rc +del %1.rc + +:compile +dcc32 -H -W -B %2 %3 %4 %5 %6 %7 %8 %1.dpr diff --git a/lib/ics/Delphi3/Icsdel3.bat b/lib/ics/Delphi3/Icsdel3.bat new file mode 100644 index 00000000..238aa0f0 --- /dev/null +++ b/lib/ics/Delphi3/Icsdel3.bat @@ -0,0 +1,142 @@ +@echo off +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * +REM * * +REM * ICS - Internet Component Suite * +REM * * +REM * Delphi 1 automated construction V1.00 * +REM * (c) 1997-2000 by Francois PIETTE * +REM * http://www.rtfm.be/fpiette/indexuk.htm * +REM * francois.piette@swing.be francois.piette@rtfm.be * +REM * * +REM * You must change PATH, DELPHI_PATH and ICS_PATH * +REM * below to fit your system. * +REM * * +REM * Remember to install all components in Delphi 3 ! * +REM * Remember to use Delphi 3 to open all forms and * +REM * ignore Font.CharSet and OldCreateOrder properties * +REM * * +REM * * * * * * * * * * * * * * * * * * * * * * * * * * * + +SET DELPHI_PATH=C:\PROGRA~1\BORLAND\DELPHI~1 +SET ICS_PATH=D:\FPIETTE + +PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;%DELPHI_PATH%\BIN + +echo -M >%ICS_PATH%\delphi\internet\dcc32.cfg +echo -R%DELPHI_PATH%\LIB >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -U%DELPHI_PATH%\LIB >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -I%DELPHI_PATH%\LIB >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -E%ICS_PATH%\DELPHI3 >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -I%ICS_PATH%\DELPHI\VC32 >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -I%ICS_PATH%\DELPHI\INTERNET >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -R%ICS_PATH%\DELPHI\VC32 >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -R%ICS_PATH%\DELPHI\INTERNET >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -U%ICS_PATH%\DELPHI\VC32 >>%ICS_PATH%\delphi\internet\dcc32.cfg +echo -U%ICS_PATH%\DELPHI\INTERNET >>%ICS_PATH%\delphi\internet\dcc32.cfg + +d: +cd %ICS_PATH%\delphi\internet +call ..\..\delphi3\dcc3 clidemo -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 client5 -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 client7 -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 concli1 -CC +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 concli2 -CC +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 consrv1 -CC -DNOFORMS +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 dlltst1 -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 dnslook -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 dynCli -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 finger -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 ftpthrd -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 ftpserv -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 ftptst -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 httpasp -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 httpasy -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 httpchk -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 httpdmo -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 httpget -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 httppg -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 httpthrd -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 httptst -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 icsdll1 +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 mailrcv -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 mailrob -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 mailsnd -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 md5test -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 mimedemo -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 mimetst -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 mtsrv -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 newsrdr -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 nslookup -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 pingtst -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 pop3mime -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 recv -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 sender -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 server5 -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 sockstst -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 srvdemo -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 srvtcp -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 tcpsrv -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 tnclient -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 tndemo -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 tnsrv -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 twschat -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 udplstn -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 udpsend -CG +if errorlevel 1 goto error +call ..\..\delphi3\dcc3 webserv -CG +if errorlevel 1 goto error +goto done + +:error +@echo Compile error +goto done + +:done +@cd %ICS_PATH%\DELPHI3 + +:end diff --git a/lib/ics/Ics.diz b/lib/ics/Ics.diz new file mode 100644 index 00000000..370b579a --- /dev/null +++ b/lib/ics/Ics.diz @@ -0,0 +1,26 @@ +ICS - Internet Component Suite +------------------------------ + +Download latest version from http://www.overbyte.be + +ICS is a component collection made to build +client/server and internet applications. + +It support all major TCP/IP protocols such as +TCP, UDP, SMTP, POP3, NNTP, HTTP, PING, TELNET, +FINGER and more. + +ICS is compatible with all Delphi +and C++Builder versions (16 and 32 bits). +ICS is multithread safe but as it is event +drive, it doesn't require multithreading in +order to be non-blocking ! + +The author can be contacted +at francois.piette@overbyte.be. Updates +can be found at http://www.overbyte.be. + +Unzip using the -d option to restore +directory tree. +Freeware with full source code. +Kylix version available. diff --git a/lib/ics/ics7spec.zip b/lib/ics/ics7spec.zip new file mode 100644 index 00000000..833fede6 Binary files /dev/null and b/lib/ics/ics7spec.zip differ diff --git a/lib/ics/ics_logo.gif b/lib/ics/ics_logo.gif new file mode 100644 index 00000000..f814e440 Binary files /dev/null and b/lib/ics/ics_logo.gif differ diff --git a/lib/ics/powered_by_ics.gif b/lib/ics/powered_by_ics.gif new file mode 100644 index 00000000..ef149aaa Binary files /dev/null and b/lib/ics/powered_by_ics.gif differ diff --git a/lib/ics/readme.txt b/lib/ics/readme.txt new file mode 100644 index 00000000..042b41d5 --- /dev/null +++ b/lib/ics/readme.txt @@ -0,0 +1,465 @@ +ICS - Internet Component Suite +============================== +(Aka FPIETTE's Components) + + +Revised: July 19, 2002 (Delphi 7 Update) +http://www.overbyte.be +http://www.rtfm.be/fpiette/indexuk.htm +http://users.swing.be/francois.piette/indexuk.htm + +Table of content: +----------------- + +- Legal issues +- Register +- Installation +- Sample applications +- Support +- Midware +- Known problems +- Special thanks + + +Legal issues: +------------- + Copyright (C) 1997-2002 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium + + + + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + + +Register +-------- + +ICS is freeware. If you use the components, you must register by sending a +picture postcard showing the area you lives in and some beautiful stamps for +my kids who are stamp collectors. Do not use an envelop, I collect USED +postcards sent to me. + +Address your card to: Francois PIETTE, rue de Grady 24, 4053 Embourg, Belgium. +Don't forget to mention your name, address and EMail. + + +Installation: +------------- + +The zip file has subdirectories in it. You must use the pkunzip -d option +to restore this directory tree or you will have problems because the files +will not be in their proper subdirectories. + +This is the subdirectory layout: + +.\ Info directory +.\delphi\internet Delphi sample applications (all Delphi versions) +.\cpp\internet C++Builder sample applications +.\cpp\internet\bcb1 C++Builder version 1 projects +.\cpp\internet\bcb3 C++Builder version 3 projects +.\cpp\internet\bcb4 C++Builder version 4 projects +.\cpp\internet\bcb5 C++Builder version 5 projects +.\cpp\internet\bcb6 C++Builder version 6 projects +.\delphi\vc Delphi 1.x files (winsock.pas 16 bits and *.dcr) +.\delphi\vc32 Delphi (1/2/3/4/5/6/7) and C++Builder (1/3/4/5/6) components +.\Delphi1 Automated build for Delphi 1. Not for beginners. +.\Delphi2 Automated build for Delphi 2. Not for beginners. +.\Delphi3 Automated build for Delphi 3. Not for beginners. +.\bcb1 Automated build for Bcb 1. Not for beginners. + +DELPHI 7: Directory VC32 contains IcsDel70.dpk which is a package source for +all components. Using Delphi, do a file/open, select *.dpk and browse to +the VC32 directory. Select IcsDel70.dpk and open it. Then click on the +Install button. You should see the FPiette tab on the component gallery. +Add VC32 directory path to your library path (Tools menu / Environment Options +/ Library / Library Path. Add VC32 path at the and of the existing path). + +Once the package is installed, you may open the sample projects. There is a +project group called Del70Sam.bpg which has all sample programs. Open it +with file/open, browse to the Internet directory, select and open Del70Sam.bpg. +Then Project/Build all projects. You'll get all sample programs compiled. +It is likely that for each project, Delphi complains about a missing .res +file. This is not a problem, Delphi will recreate it as needed. They have not +been included to save space in the zip file. + +Note 1: Delphi may run out of memory if you ask to compile all projects at +once. If you have not enough RAM, then compile each project individually. + +Note 2: Delphi 7 has new warnings which triggers a lot of messages for 100% OK +code. You can turn those warnings off in the project/ options / Compiler messages +and deselecting: "Deprecated symbol", "Platform symbol", "usafe type", "unsafe code", +"usafe typecast". Those are intended for .NET and Linux portability. You can +safely ignore them if you run windows. For you facility, I included ics7spec.zip +with project options files having disabled those messages. Unzip it in the same +directory as the whole ICS, restoring directory tree present in zip file. + + +DELPHI 6: Same installation as Delphi 7. Files are IcsDel60.dpk and Del60Sam.bpg. +(Note 2 doesn't apply to Delphi 6). + +DELPHI 5: Same installation as Delphi 6. Files are IcsDel50.dpk and Del50Sam.bpg. + +DELPHI 4: Same installation as Delphi 5. Files are IcsDel40.dpk and Del40Sam.bpg. + +DELPHI 3: Same installation as Delphi 5. Files are IcsDel30.dpk. Del30Sam.bpg +doesn't exists because project group was introduced with Delphi 4. Open each +project individually (*.dpr). + +DELPHI 2: Directory VC32 contains all components. You must add all those +components into your library. But warning: not all files are components. +Only those with a Register procedure are components. Other are just support +files and must not be installed as components. To install a component file, +do Component/Install, then click on the Add button, then click on the Browse +button and browse to the VC32 directory. Select a component file such as +wsocket.pas and click on OK. Do it again for all component files and +finally click OK button on the Install Component dialog window. Your +library will be rebuilt. You should see the tab FPiette added to your +component gallery. + +Once the components are all installed, you may open the sample projects +each one after the other and compile them. For each project, do file/open +and select the dpr file in the internet directory. Then Project/Build All. + + +DELPHI 1: The install procedure is the same as for Delphi 2. But you must +add the directory VC into the library path before VC32 directory which +will be added automatically when you add the first component source. +VC directory in the library path is needed because Delphi 1 doesn't have +built in winsock support. ICS contains winsock.pas in VC directory to +add winsock support. VC directory also contains 16 bits component resource +files (*.dcr) needed by Delphi 1. VC32 contains the 32 bits resource files. +If you use only Delphi 1, you can safely copy all files from VC to VC32 +directory, but not the contrary. + +Once the components are all installed, you may open the sample projects +each one after the other and compile them. For each project, do file/open +and select the dpr file in the internet directory. Then Project/Build All. + +BCB6: follow BCB4 instruction below. Package is IcsBcb60.bpk and samples +project group is Bcb60Sam.bpg. Directory is ...\internet\bcb6. + +BCB5: follow BCB4 instruction below. Package is IcsBcb50.bpk and samples +project group is Bcb50Sam.bpg. Directory is ...\internet\bcb5. + +BCB4: First you need to install all components. There is a package in +Delphi\VC32 directory, called IcsBcb40.bpk. You do File/Open project and +browse to IcsBcb40.bpk. Select and open it, then Project/Build IcsBcb40. +Once the package is compiled, you can install it into your component +palette: Component/Install Packages, click the Add button and select +Delphi\VC32\IcsBcb40.bpl (you just generated this file by compiling the +package). Click OK button. You must now see FPiette Tab on the component +gallery. + +Once the components are all installed, you may open the sample projects +each one after the other and compile them. For each project, do file/open +and select the dpr file in the internet directory. Then Project/Build All. +Projects are located in CPP/INTERNET/BCB4. There is also a project group +Bcb40Sam.bpg which contains all sample projects. +It is likely that for each project, Bcb complains about a missing .res +file. This is not a problem, Bcb will recreate it as needed. They have not +been included to save space in the zip file. + +Note: Packages are in the full ICS, in ICS.ZIP file. If you downloaded a +partial ICS, then you have to add each component by hand in the package +of your choice. + +BCB 3: First you need to install all components. There is a package in +Delphi\VC32 directory, called IcsBcb30.bpk. You do File/Open project and +browse to IcsBcb30.bpk. Select and open it, then Project/Build IcsBcb30. +Once the package is compiled, you can install it into your component +palette: Packages/Install Packages, click the Add button and select +Delphi\VC32\IcsBcb30.bpl (you just generated this file by compiling the +package). Click OK button. You must now see FPiette Tab on the component +gallery. + +Directory is CPP/INTERNET/BCB3. + +BCB1: First you need to install all components that are located in +Delphi/VC32. Components are all Object Pascal sources. You must select +*.pas when in the open dialog box (Menu/Component/Install/Add/Browse). +Components are files with a register procedure. Do not install files +with no register procedure (if you try, you'll get an error message). + +Once the components are all installed, you may open the sample projects +each one after the other and compile them. For each project, do file/open +and select the dpr file in the internet directory. Then Project/Build All. +Projects are located in CPP/INTERNET/BCB1. + + +NOTES: +- If you use Delphi 1, 2, 3, 4 or BCB 1, 3, 5 or 6, you may have an error +message complaining about Font.Charset, OldCreateOrder and other +properties. Those are new properties in newer Delphi or BCB versions. +You can safely ignore those errors because those properties are not +used by the components nor sample programs. You may encounter this +error at run time. To avoid it, you must open each form at design time +and ignore the error. Then recompile. If you don't ignore the error +at design time, you'll have it at runtime ! + +- If you have Delphi or BCB complaining about a file not found, add VC32 +directory to your library path. + +- If you are using BCB3, 4, 5 or 6, you may encounter an error at link time +such as "Unable to open file MWBCB30.LIB" (or other libs). This is a bug +in BCB. To solve it, close BCB and open the package or project file with +notepad or any text editor and remove any reference to the missing libraries. +Then start BCB again, reopen the project and rebuilt it. With BCB5/6 you can +edit project option file (right click in project manager). + +- Don't forget that the C++Builder components are located in .\delphi\vc32 +which is object pascal source code (not a problem for C++Builder, just +indicate that the *.pas files are displayed when installing). C++Builder +will create the *.hpp files. There are some on-line help files in the VC32 +directory. + +- The following is a list of the files that should be installed in order to +properly add all of the available components in this collection. Note that +you may not have all of these present: + +> WSocket.pas (Winsock component - TCP, UDP, DNS,...) +> WSocketS.pas (Winsock component for building servers) +> HttpProt.pas (HTTP client protocol - used by the web) +> HttpSrv.pas (HTTP server protocol - used to build webservers) +> FtpCli.pas (FTP client protocol - file transfert) +> FtpSrv.pas (FTP server protocol - file transfert) +> Ping.pas (ICMP echo protocol - ping a host) +> Pop3Prot.pas (POP3 client protocol - get mail from mail server) +> MimeDec.pas (MIME component - decode file attach, use with POP3) +> SmtpProt.pas (SMTP client protocol - send mail to server) +> NntpCli.pas (NNTP client protocol - send and receive newsgroups messages) +> TnCnx.pas (TELNET client protocol - terminal emulation protocol) +> TnScript.pas (TELNET client protocol - with automation) +> EmulVT.pas (ANSI terminal emulation in a control) +> TnEmulVT.pas (TELNET and ANSI terminal emulation combined) +> FingCli.pas (FINGER client protocol - Find informations about user) +> Wait.pas (A kind of progress bar - now obsolete, forget it for new code) +> DnsQuery (DNS lookup component - useful for getting MX records) + +As a rule, the components are the files which have a Register procedure. + + +Sample applications: +-------------------- + +TWSCHAT Chat program (both client and server in a single program) +SRV5/CLI5 Basic client/server GUI applications +DYNCLI Basic client creatin TWSocket dynamically +CONCLI Basic client/server console applications +CONSRV Basic server application in console mode +TCPSRV Basic server without client forms, event-driven +SRVTCP Basic server without client forms, event-driven +SVCTCP Same as SRVTCP but as an NT/W2K service +TNSRV Basic server with client forms, event-driven +MTSRV Basic server, multi-threaded +FTPCLI Graphical FTP client +FTPSERV General purpose FTP server +TNCLIENT Telnet client using a TnEmulVT +TNDEMO Telnet client using a TMemo +UDPDEMO UDP send/receive +MIMEDEMO Example of EMail decoding (file attach) +MIMETST Example of EMail sending with attached files +MAILSND Example of EMail sending, including file attach +MAILRCV Internet EMail access using POP3 protocol +HTTPTST Example of THttpCli component (GET) +HTTPGET Example of THttpCli component (GET into a file) +HTTPPG Example of THttpCli component (POST) +HTTPASP Example of THttpCli component with cookie (POST) +HTTPASY Example of THttpCli component with multiple requests (GET) +HTTPTHRD Example of THttpCli component (multi-threaded GET) +FINGER Example of TFingerCli component +NEWSRDR Example of TNntpCli component (Send/receive newsgroups) +SRVDEMO Example of server using a TTable +CLIDEMO Example of client for SRVDEMO +WEBSERV A basic webserver +ICSDLL Example of ICS component within a DLL +ICSISAPI Example of ICS component within an ISAPI + +Note: Follow "UserMade" link on ICS website to find more sample programs. + +As explained in the component installation, you may encounter an error loading +a sample application or running it. This may be because the last time I +loaded the form, I was using another Delphi or BCB version which has new properties. +You can safely ignore those properties. They are not used in the samples. +(The properties are CharSet, OldCreateOrder and others). You can also encounter +error about duplicate resources. You can ignore them safely. If you have +those errors, open each form in the IDE, ignore the error then recompile. +If you don't open the form in the IDE, you'll get the errors at runtime +and your program will abort. + +If you use C++Builder 1, you may encounter problems because Borland has +two winsock include files: one .h and one .hpp. TWSocket needs the +winsock.hpp file and it is automatically included. However, sometimes +the winsock.h file is included indirectly and you will get numerous error +messages from the compiler. Just add a #define _WINSOCKAPI_ before +your existing #include directives. This will prevent winsock.h from being +included. This is no a bug, it is a feature :-) Another annoying feature +is the SetPortA syndrome. Add a #define _WINSPOOL_ before any #include +directive to work around. If you have some file not found error at +compile time, be sure to verify the project options to change any directory +following your own configuration (include files and library path). +Do NOT use those #include if you use C++Builder 3: Borland has corrected +their mistake. + +When installing a new version, always recompile everything ! +Close everything before recompiling the library or packages. +When installing a new version, be sure to unzip it in the same directory +tree as the old one. + +The provided delphi\vc\winsock.pas is for use with Delphi 1 only. +Use Borland's file with Delphi 2/3/4/5/6 and C++Builder 1/3/4/5/6. + +C++Builder 1/3/4/5/6 projects are not compatibles. BCB can provide conversions. +I made separate projects in CPP\INTERNET\BCB1, CPP\INTERNET\BCB3, +CPP\INTERNET\BCB4, CPP\INTERNET\BCB5 and CPP\INTERNET\BCB6 directories. +If you install this ICS version above a very old one, be sure to delete +every *.mak and corresponding *.cpp files form the internet directory +(not all *.cpp files, only those which has a corresponding *.mak file !). + +It is possible to use several Delphi or BCB versions at the same time, but +before switching from one to the other, you MUST delete all DCU, OBJ, ILS, +ILF, TDS, ILC and ILD files.For BCB, you sometimes need to delete HPP files +as well. They will be recreated when you reinstall ICS components. + + +Support: +-------- +There is a mailing list to discuss F. Piette's components and applications. +To subscribe surf to http://elists.org/mailman/listinfo/twsocket. +Do not use an aliased EMail address, use your real EMail address, the one +you'll use to post messages. + +Once you have been registered with the mailing list processor, you can +send messages to twsocket@elists.org. Every subscriber will receive a copy of +your message. I will respond, but anybody is welcome to respond to each +other's messages. So every body can share his expertize. There are many other +useful mailing lists at http://www.elists.org ! + +Before asking a question, browse the message archive you can download from +the support page on the website (click the "support" button from main page). + +If you found a bug, please make a short program which reproduce the problem +attach it to a message addressed to me. If I can reproduce the problem, I +can find a fix ! Do not send exe file but just source code and instructions. +Always use the latest version (beta if any) before reporting any bug. + +You are also encouraged to use the support mailing list to ask for +enhancements. You are welcome to post your own code. + +The support mailing list has an heavy traffic: 20 to 40 messages each day. If +it is too much for you, you can select "digest" mode in which mailing list +processor will mail you only one big message per day. To select digest mode +goto http://elists.org/mailman/listinfo/twsocket. + +You can also subscribe to another mailing list called twsocket-announce which +will receive only very few messages when major bug fixes or updates are done. +The subscription process is the same as for the other mailing list. +See above procedure. + + +MidWare +------- +If you wants to build client/server applications using TCP/IP protocol, you +can do it easily with ICS. But you can do it much more easily using another +freeware product from Franois Piette: MidWare. Available from the same web +site http://www.overbyte.be. + + +Known problems: +-------------- + +Old Delphi and C++Builder have limitation on path length. If you installed +many components in many differents subdirectories, you'll get strange errors. +Just make the path shorter and use less different directories. You cannot have +a path greater than 255 characters (this problem is solved starting from +Delphi 3.02 or later). + +Using Delphi 3 Pro, there could a problem after inserting all the component +into your user package. Delphi 3 gives an access violation error in DCC.DLL. +This does not occur if you use Delphi C/S (That's what I do). Ben Ark +(BenArk@email.msn.com) has found the following procedure to overcome +this [Delphi] bug: + +---- copy of a message posted in twsocket@rtfm.be mailing list ---- + +Just thought I'd correct that previous message with some more detailed +steps... + +1) Remove the EmulVT and TnEmulVT units from your User Package. +2) Create a new project/application. +3) Put all of these new files in a directory seperate from your components. +4) MOVE, do not copy, your Emulvt.pas source file into this new directory. +5) You need to add Emulvt.pas to the new project. +6) Build the project. +7) This should generate an Emultvt.dcu in the directory where the project + is. +8) Copy ONLY the DCU file into your component directory +9) Add EmulVT.dcu to your User Package. +10) Make sure the EmulVT.pas file IS NOT on your search path. +11) Now you can safely readd TnEmulVT.pas to your User Package and build + it. + +If you have any problems with these steps, let me know. + +-Ben + +---- End of message ---- + +Thank you Ben ! + +Eric Daniels also found the same problem with Delphi 3 +standard. Here what's he tell me in a message: + +---- copy of a message posted in twsocket@rtfm.be mailing list ---- + +This error does happen under Delphi 3 Standard which I use... I traced it +down and found out to trigger this error all one needs to do is goto: +package options / compiler / debugging section and look for local symbols +if this is not checked I will get this error. After playing around with my +compiler options I unchecked local symbols and rebuilt the package and +Access Violation in dcc.dll read of address occurred... If anyone has this +happen while using the ics components that is how I managed to fix it. Also +I got error about unable to find *.dcr files if you edit your package source +and specify the full path to each dcr file you will find all goes well. + +---- End of message ---- + + +Special thanks +-------------- + +to Bob Dolan (bobd@overware.com) who corrected my bad english. +(Ok, I introduced new errors since I updated this file... For those +who cares, I normally speak french.) + + +francois.piette@overbyte.be +francois.piette@rtfm.be +francois.piette@swing.be +http://www.overbyte.be +http://www.rtfm.be/fpiette/indexuk.htm +http://users.swing.be/francois.piette/indexuk.htm diff --git a/lib/ics/zipics.bat b/lib/ics/zipics.bat new file mode 100644 index 00000000..82ea8609 --- /dev/null +++ b/lib/ics/zipics.bat @@ -0,0 +1,8 @@ +if exist ics.zip del ics.zip +if exist ics7spec.zip del ics7spec.zip +wzzip -P ics7spec.zip @zipics7.lst +wzzip -P ics.zip @zipicsd.lst +wzzip -P ics.zip @zipicsb.lst +del ics7spec.zip +ren ics.zip ics.zip +pause diff --git a/lib/ics/zipics7.lst b/lib/ics/zipics7.lst new file mode 100644 index 00000000..7535aeed --- /dev/null +++ b/lib/ics/zipics7.lst @@ -0,0 +1,100 @@ +Delphi\Internet\CliDemo.dof +delphi\Internet\CliDemo.res +Delphi\Internet\Client5.dof +delphi\Internet\Client5.res +Delphi\Internet\Client7.dof +delphi\Internet\Client7.res +Delphi\Internet\ConCli1.dof +Delphi\Internet\ConCli2.dof +Delphi\Internet\Conftp.dof +Delphi\Internet\Conhttp.dof +Delphi\Internet\Consmtp.dof +Delphi\Internet\ConSrv1.dof +Delphi\Internet\DllTst1.dof +delphi\Internet\DllTst1.res +Delphi\Internet\DnsLook.dof +delphi\Internet\Dnslook.res +Delphi\Internet\DynCli.dof +delphi\Internet\DynCli.res +Delphi\Internet\Finger.dof +delphi\Internet\Finger.res +Delphi\Internet\FtpServ.dof +delphi\Internet\FtpServ.res +Delphi\Internet\FtpThrd.dof +delphi\Internet\FtpThrd.res +Delphi\Internet\FtpTst.dof +delphi\Internet\FtpTst.res +Delphi\Internet\HttpAsp.dof +delphi\Internet\HttpAsp.res +Delphi\Internet\HttpAsy.dof +delphi\Internet\HttpAsy.res +Delphi\Internet\HttpChk.dof +delphi\Internet\HttpChk.res +Delphi\Internet\HttpDmo.dof +delphi\Internet\HttpDmo.res +Delphi\Internet\HttpGet.dof +delphi\Internet\HttpGet.res +Delphi\Internet\HttpPg.dof +delphi\Internet\HttpPg.res +Delphi\Internet\HttpThrd.dof +delphi\Internet\HttpThrd.res +Delphi\Internet\HttpTst.dof +delphi\Internet\HttpTst.res +Delphi\Internet\IcsDll1.dof +Delphi\Internet\IcsIsapi.dof +delphi\Internet\IcsIsapi.res +Delphi\Internet\MailRcv.dof +delphi\Internet\MailRcv.res +Delphi\Internet\MailRob.dof +Delphi\Internet\MailSnd.dof +delphi\Internet\MailSnd.res +Delphi\Internet\MbxSub.dof +Delphi\Internet\MD5Test.dof +delphi\Internet\MD5Test.res +Delphi\Internet\MimeDemo.dof +delphi\Internet\MimeDemo.res +Delphi\Internet\MimeTst.dof +delphi\Internet\MimeTst.res +Delphi\Internet\MtSrv.dof +delphi\Internet\MtSrv.res +Delphi\Internet\NewsRdr.dof +delphi\Internet\NewsRdr.res +Delphi\Internet\NsLookup.dof +delphi\Internet\NsLookup.res +Delphi\Internet\PingTst.dof +delphi\Internet\PingTst.res +Delphi\Internet\Pop3Mime.dof +delphi\Internet\Pop3Mime.res +Delphi\Internet\PopTst.dof +Delphi\Internet\Recv.dof +delphi\Internet\Recv.res +Delphi\Internet\Sender.dof +delphi\Internet\Sender.res +Delphi\Internet\Server5.dof +delphi\Internet\Server5.res +Delphi\Internet\SocksTst.dof +delphi\Internet\SocksTst.res +Delphi\Internet\SrvDemo.dof +delphi\Internet\SrvDemo.res +Delphi\Internet\SrvTcp.dof +delphi\Internet\SrvTcp.res +Delphi\Internet\SvcTcp.dof +delphi\Internet\SvcTcp.res +Delphi\Internet\TcpSrv.dof +delphi\Internet\TcpSrv.res +delphi\Internet\ThrdSrv.res +Delphi\Internet\TnClient.dof +delphi\Internet\TnClient.res +Delphi\Internet\TnDemo.dof +delphi\Internet\TnDemo.res +Delphi\Internet\TnSrv.dof +delphi\Internet\TnSrv.res +Delphi\Internet\TWSChat.dof +delphi\Internet\TWSChat.res +Delphi\Internet\UdpLstn.dof +delphi\Internet\UdpLstn.res +Delphi\Internet\UdpSend.dof +delphi\Internet\UdpSend.res +Delphi\Internet\WebServ.dof +delphi\Internet\WebServ.res +delphi\Vc32\IcsDel70.res diff --git a/lib/ics/zipicsb.lst b/lib/ics/zipicsb.lst new file mode 100644 index 00000000..7bd91007 --- /dev/null +++ b/lib/ics/zipicsb.lst @@ -0,0 +1,437 @@ +Cpp\Internet\Bcb3\Bcb30Sam.bpg +Cpp\Internet\Bcb4\Bcb40Sam.bpg +Cpp\Internet\Bcb5\Bcb50Sam.bpg +Cpp\Internet\Bcb6\Bcb60Sam.bpg +Cpp\Internet\SrvDemo1.cpp +Cpp\Internet\SrvDemo1.dfm +Cpp\Internet\SrvDemo1.h +Cpp\Internet\SrvDemo2.cpp +Cpp\Internet\SrvDemo2.dfm +Cpp\Internet\SrvDemo2.h +Cpp\Internet\Bcb1\SrvDemo.cpp +Cpp\Internet\Bcb1\SrvDemo.mak +Cpp\Internet\Bcb1\SrvDemo.res +Cpp\Internet\Bcb3\SrvDemo.cpp +Cpp\Internet\Bcb3\SrvDemo.bpr +Cpp\Internet\Bcb4\SrvDemo.cpp +Cpp\Internet\Bcb4\SrvDemo.bpr +Cpp\Internet\Bcb5\SrvDemo.cpp +Cpp\Internet\Bcb5\SrvDemo.bpr +Cpp\Internet\Bcb6\SrvDemo.cpp +Cpp\Internet\Bcb6\SrvDemo.bpr +Cpp\Internet\CliDemo1.cpp +Cpp\Internet\CliDemo1.dfm +Cpp\Internet\CliDemo1.h +Cpp\Internet\Bcb1\CliDemo.cpp +Cpp\Internet\Bcb1\CliDemo.mak +Cpp\Internet\Bcb1\CliDemo.res +Cpp\Internet\Bcb3\CliDemo.cpp +Cpp\Internet\Bcb3\CliDemo.bpr +Cpp\Internet\Bcb4\CliDemo.cpp +Cpp\Internet\Bcb4\CliDemo.bpr +Cpp\Internet\Bcb5\CliDemo.cpp +Cpp\Internet\Bcb5\CliDemo.bpr +Cpp\Internet\Bcb6\CliDemo.cpp +Cpp\Internet\Bcb6\CliDemo.bpr +Cpp\Internet\Bcb1\Clients.dbf +Cpp\Internet\Bcb1\Clients.mdx +Cpp\Internet\Bcb3\Clients.dbf +Cpp\Internet\Bcb3\Clients.mdx +Cpp\Internet\Bcb4\Clients.dbf +Cpp\Internet\Bcb4\Clients.mdx +Cpp\Internet\Bcb5\Clients.dbf +Cpp\Internet\Bcb5\Clients.mdx +Cpp\Internet\Bcb6\Clients.dbf +Cpp\Internet\Bcb6\Clients.mdx +Cpp\Internet\TcpSrv1.cpp +Cpp\Internet\TcpSrv1.dfm +Cpp\Internet\TcpSrv1.h +Cpp\Internet\Bcb1\TcpSrv.cpp +Cpp\Internet\Bcb1\TcpSrv.mak +Cpp\Internet\Bcb1\TcpSrv.res +Cpp\Internet\Bcb3\TcpSrv.cpp +Cpp\Internet\Bcb3\TcpSrv.bpr +Cpp\Internet\Bcb4\TcpSrv.cpp +Cpp\Internet\Bcb4\TcpSrv.bpr +Cpp\Internet\Bcb5\TcpSrv.cpp +Cpp\Internet\Bcb5\TcpSrv.bpr +Cpp\Internet\Bcb6\TcpSrv.cpp +Cpp\Internet\Bcb6\TcpSrv.bpr +Cpp\Internet\Cli5.cpp +Cpp\Internet\Cli5.dfm +Cpp\Internet\Cli5.h +Cpp\Internet\Bcb1\Client5.cpp +Cpp\Internet\Bcb1\Client5.mak +Cpp\Internet\Bcb1\Client5.res +Cpp\Internet\Bcb3\Client5.cpp +Cpp\Internet\Bcb3\Client5.bpr +Cpp\Internet\Bcb4\Client5.cpp +Cpp\Internet\Bcb4\Client5.bpr +Cpp\Internet\Bcb5\Client5.cpp +Cpp\Internet\Bcb5\Client5.bpr +Cpp\Internet\Bcb6\Client5.cpp +Cpp\Internet\Bcb6\Client5.bpr +Cpp\Internet\Cli7.cpp +Cpp\Internet\Cli7.dfm +Cpp\Internet\Cli7.h +Cpp\Internet\Bcb1\Client7.cpp +Cpp\Internet\Bcb1\Client7.mak +Cpp\Internet\Bcb1\Client7.res +Cpp\Internet\Bcb3\Client7.cpp +Cpp\Internet\Bcb3\Client7.bpr +Cpp\Internet\Bcb4\Client7.cpp +Cpp\Internet\Bcb4\Client7.bpr +Cpp\Internet\Bcb5\Client7.cpp +Cpp\Internet\Bcb5\Client7.bpr +Cpp\Internet\Bcb6\Client7.cpp +Cpp\Internet\Bcb6\Client7.bpr +Cpp\Internet\Bcb1\ConCli1.mak +Cpp\Internet\Bcb1\ConCli1.cpp +Cpp\Internet\Bcb3\ConCli1.bpr +Cpp\Internet\Bcb3\ConCli1.cpp +Cpp\Internet\Bcb4\ConCli1.bpr +Cpp\Internet\Bcb4\ConCli1.cpp +Cpp\Internet\Bcb5\ConCli1.bpr +Cpp\Internet\Bcb5\ConCli1.cpp +Cpp\Internet\Bcb6\ConCli1.bpr +Cpp\Internet\Bcb6\ConCli1.cpp +Cpp\Internet\Bcb1\ConCli2.mak +Cpp\Internet\Bcb1\ConCli2.cpp +Cpp\Internet\Bcb3\ConCli2.bpr +Cpp\Internet\Bcb3\ConCli2.cpp +Cpp\Internet\Bcb4\ConCli2.bpr +Cpp\Internet\Bcb4\ConCli2.cpp +Cpp\Internet\Bcb5\ConCli2.bpr +Cpp\Internet\Bcb5\ConCli2.cpp +Cpp\Internet\Bcb6\ConCli2.bpr +Cpp\Internet\Bcb6\ConCli2.cpp +Cpp\Internet\Bcb1\Finger.mak +Cpp\Internet\Bcb1\Finger.cpp +Cpp\Internet\Bcb1\Finger.res +Cpp\Internet\Bcb3\Finger.bpr +Cpp\Internet\Bcb3\Finger.cpp +Cpp\Internet\Bcb4\Finger.bpr +Cpp\Internet\Bcb4\Finger.cpp +Cpp\Internet\Bcb5\Finger.bpr +Cpp\Internet\Bcb5\Finger.cpp +Cpp\Internet\Bcb6\Finger.bpr +Cpp\Internet\Bcb6\Finger.cpp +Cpp\Internet\Finger1.cpp +Cpp\Internet\Finger1.dfm +Cpp\Internet\Finger1.h +Cpp\Internet\FormPos.cpp +Cpp\Internet\FormPos.h +Cpp\Internet\Bcb1\FtpTst.cpp +Cpp\Internet\Bcb1\FtpTst.mak +Cpp\Internet\Bcb1\FtpTst.res +Cpp\Internet\Bcb3\FtpTst.cpp +Cpp\Internet\Bcb3\FtpTst.bpr +Cpp\Internet\Bcb4\FtpTst.cpp +Cpp\Internet\Bcb4\FtpTst.bpr +Cpp\Internet\Bcb5\FtpTst.cpp +Cpp\Internet\Bcb5\FtpTst.bpr +Cpp\Internet\Bcb6\FtpTst.cpp +Cpp\Internet\Bcb6\FtpTst.bpr +Cpp\Internet\FtpTst1.cpp +Cpp\Internet\FtpTst1.dfm +Cpp\Internet\FtpTst1.h +Cpp\Internet\FtpTst2.cpp +Cpp\Internet\FtpTst2.dfm +Cpp\Internet\FtpTst2.h +Cpp\Internet\FtpSrv1.cpp +Cpp\Internet\FtpSrv1.dfm +Cpp\Internet\FtpSrv1.h +Cpp\Internet\Bcb1\FtpServ.cpp +Cpp\Internet\Bcb1\FtpServ.mak +Cpp\Internet\Bcb1\FtpServ.res +Cpp\Internet\Bcb3\FtpServ.cpp +Cpp\Internet\Bcb3\FtpServ.bpr +Cpp\Internet\Bcb4\FtpServ.cpp +Cpp\Internet\Bcb4\FtpServ.bpr +Cpp\Internet\Bcb5\FtpServ.cpp +Cpp\Internet\Bcb5\FtpServ.bpr +Cpp\Internet\Bcb5\IcsDll1.bpf +Cpp\Internet\Bcb5\IcsDll1.bpr +Cpp\Internet\Bcb5\IcsDll1.cpp +Cpp\Internet\Bcb6\FtpServ.cpp +Cpp\Internet\Bcb6\FtpServ.bpr +Cpp\Internet\Bcb6\IcsDll1.bpf +Cpp\Internet\Bcb6\IcsDll1.bpr +Cpp\Internet\Bcb6\IcsDll1.cpp +Cpp\Internet\DllTst1.cpp +Cpp\Internet\DllTst1.dfm +Cpp\Internet\DllTst1.h +Cpp\Internet\Bcb5\DllTst1.bpr +Cpp\Internet\Bcb5\DllTst1.cpp +Cpp\Internet\Bcb6\DllTst1.bpr +Cpp\Internet\Bcb6\DllTst1.cpp +Cpp\Internet\Bcb3\NsLookup.bpr +Cpp\Internet\Bcb3\NsLookup.cpp +Cpp\Internet\Bcb4\NsLookup.bpr +Cpp\Internet\Bcb4\NsLookup.cpp +Cpp\Internet\Bcb5\NsLookup.bpr +Cpp\Internet\Bcb5\NsLookup.cpp +Cpp\Internet\Bcb6\NsLookup.bpr +Cpp\Internet\Bcb6\NsLookup.cpp +Cpp\Internet\NsLook1.cpp +Cpp\Internet\NsLook1.dfm +Cpp\Internet\NsLook1.h +Cpp\Internet\Bcb1\HttpTst.cpp +Cpp\Internet\Bcb1\HttpTst.mak +Cpp\Internet\Bcb1\HttpTst.res +Cpp\Internet\Bcb3\HttpTst.cpp +Cpp\Internet\Bcb3\HttpTst.bpr +Cpp\Internet\Bcb4\HttpTst.cpp +Cpp\Internet\Bcb4\HttpTst.bpr +Cpp\Internet\Bcb5\HttpTst.cpp +Cpp\Internet\Bcb5\HttpTst.bpr +Cpp\Internet\Bcb6\HttpTst.cpp +Cpp\Internet\Bcb6\HttpTst.bpr +Cpp\Internet\HttpTst1.dfm +Cpp\Internet\HttpTst1.cpp +Cpp\Internet\HttpTst1.h +Cpp\Internet\Bcb1\HttpPg.mak +Cpp\Internet\Bcb1\HttpPg.cpp +Cpp\Internet\Bcb1\HttpPg.res +Cpp\Internet\Bcb3\HttpPg.bpr +Cpp\Internet\Bcb3\HttpPg.cpp +Cpp\Internet\Bcb4\HttpPg.bpr +Cpp\Internet\Bcb4\HttpPg.cpp +Cpp\Internet\Bcb5\HttpPg.bpr +Cpp\Internet\Bcb5\HttpPg.cpp +Cpp\Internet\Bcb6\HttpPg.bpr +Cpp\Internet\Bcb6\HttpPg.cpp +Cpp\Internet\HttpPg1.dfm +Cpp\Internet\HttpPg1.cpp +Cpp\Internet\HttpPg1.h +Cpp\Internet\Bcb1\MtSrv.cpp +Cpp\Internet\Bcb1\MtSrv.mak +Cpp\Internet\Bcb1\MtSrv.res +Cpp\Internet\Bcb3\MtSrv.cpp +Cpp\Internet\Bcb3\MtSrv.bpr +Cpp\Internet\Bcb4\MtSrv.cpp +Cpp\Internet\Bcb4\MtSrv.bpr +Cpp\Internet\Bcb5\MtSrv.cpp +Cpp\Internet\Bcb5\MtSrv.bpr +Cpp\Internet\Bcb6\MtSrv.cpp +Cpp\Internet\Bcb6\MtSrv.bpr +Cpp\Internet\MtSrv1.cpp +Cpp\Internet\MtSrv1.dfm +Cpp\Internet\MtSrv1.h +Cpp\Internet\MtSrv2.cpp +Cpp\Internet\MtSrv2.h +Cpp\Internet\Bcb1\NewsRdr.mak +Cpp\Internet\Bcb1\NewsRdr.cpp +Cpp\Internet\Bcb1\NewsRdr.res +Cpp\Internet\Bcb3\NewsRdr.bpr +Cpp\Internet\Bcb3\NewsRdr.cpp +Cpp\Internet\Bcb4\NewsRdr.bpr +Cpp\Internet\Bcb4\NewsRdr.cpp +Cpp\Internet\Bcb5\NewsRdr.bpr +Cpp\Internet\Bcb5\NewsRdr.cpp +Cpp\Internet\Bcb6\NewsRdr.bpr +Cpp\Internet\Bcb6\NewsRdr.cpp +Cpp\Internet\NewsRdr1.cpp +Cpp\Internet\NewsRdr1.h +Cpp\Internet\NewsRdr1.dfm +Cpp\Internet\Bcb1\PingTst.mak +Cpp\Internet\Bcb1\PingTst.cpp +Cpp\Internet\Bcb1\PingTst.res +Cpp\Internet\Bcb3\PingTst.bpr +Cpp\Internet\Bcb3\PingTst.cpp +Cpp\Internet\Bcb4\PingTst.bpr +Cpp\Internet\Bcb4\PingTst.cpp +Cpp\Internet\Bcb5\PingTst.bpr +Cpp\Internet\Bcb5\PingTst.cpp +Cpp\Internet\Bcb6\PingTst.bpr +Cpp\Internet\Bcb6\PingTst.cpp +Cpp\Internet\PingTst1.dfm +Cpp\Internet\PingTst1.cpp +Cpp\Internet\PingTst1.h +Cpp\Internet\Bcb1\PopTst.cpp +Cpp\Internet\Bcb1\PopTst.mak +Cpp\Internet\Bcb3\PopTst.cpp +Cpp\Internet\Bcb3\PopTst.bpr +Cpp\Internet\Bcb4\PopTst.cpp +Cpp\Internet\Bcb4\PopTst.bpr +Cpp\Internet\PopTst1.cpp +Cpp\Internet\PopTst1.dfm +Cpp\Internet\PopTst1.h +Cpp\Internet\Srv5.cpp +Cpp\Internet\Srv5.dfm +Cpp\Internet\Srv5.h +Cpp\Internet\Bcb1\Server5.cpp +Cpp\Internet\Bcb1\Server5.mak +Cpp\Internet\Bcb1\Server5.res +Cpp\Internet\Bcb3\Server5.cpp +Cpp\Internet\Bcb3\Server5.bpr +Cpp\Internet\Bcb4\Server5.cpp +Cpp\Internet\Bcb4\Server5.bpr +Cpp\Internet\Bcb5\Server5.cpp +Cpp\Internet\Bcb5\Server5.bpr +Cpp\Internet\Bcb6\Server5.cpp +Cpp\Internet\Bcb6\Server5.bpr +Cpp\Internet\Sender1.cpp +Cpp\Internet\Sender1.dfm +Cpp\Internet\Sender1.h +Cpp\Internet\Bcb1\Sender.cpp +Cpp\Internet\Bcb1\Sender.mak +Cpp\Internet\Bcb1\Sender.res +Cpp\Internet\Bcb3\Sender.cpp +Cpp\Internet\Bcb3\Sender.bpr +Cpp\Internet\Bcb4\Sender.cpp +Cpp\Internet\Bcb4\Sender.bpr +Cpp\Internet\Bcb5\Sender.cpp +Cpp\Internet\Bcb5\Sender.bpr +Cpp\Internet\Bcb6\Sender.cpp +Cpp\Internet\Bcb6\Sender.bpr +Cpp\Internet\Recv1.cpp +Cpp\Internet\Recv1.dfm +Cpp\Internet\Recv1.h +Cpp\Internet\Bcb1\Recv.cpp +Cpp\Internet\Bcb1\Recv.mak +Cpp\Internet\Bcb1\Recv.res +Cpp\Internet\Bcb3\Recv.cpp +Cpp\Internet\Bcb3\Recv.bpr +Cpp\Internet\Bcb4\Recv.cpp +Cpp\Internet\Bcb4\Recv.bpr +Cpp\Internet\Bcb5\Recv.cpp +Cpp\Internet\Bcb5\Recv.bpr +Cpp\Internet\Bcb6\Recv.cpp +Cpp\Internet\Bcb6\Recv.bpr +Cpp\Internet\Bcb3\MailRcv.cpp +Cpp\Internet\Bcb3\MailRcv.bpr +Cpp\Internet\Bcb4\MailRcv.cpp +Cpp\Internet\Bcb4\MailRcv.bpr +Cpp\Internet\Bcb5\MailRcv.cpp +Cpp\Internet\Bcb5\MailRcv.bpr +Cpp\Internet\Bcb6\MailRcv.cpp +Cpp\Internet\Bcb6\MailRcv.bpr +Cpp\Internet\MailRcv1.cpp +Cpp\Internet\MailRcv1.dfm +Cpp\Internet\MailRcv1.h +Cpp\Internet\MailRcv2.cpp +Cpp\Internet\MailRcv2.dfm +Cpp\Internet\MailRcv2.h +Cpp\Internet\Bcb1\MailSnd.cpp +Cpp\Internet\Bcb1\MailSnd.mak +Cpp\Internet\Bcb1\MailSnd.res +Cpp\Internet\Bcb3\MailSnd.cpp +Cpp\Internet\Bcb3\MailSnd.bpr +Cpp\Internet\Bcb4\MailSnd.cpp +Cpp\Internet\Bcb4\MailSnd.bpr +Cpp\Internet\Bcb5\MailSnd.cpp +Cpp\Internet\Bcb5\MailSnd.bpr +Cpp\Internet\Bcb6\MailSnd.cpp +Cpp\Internet\Bcb6\MailSnd.bpr +Cpp\Internet\MailSnd1.cpp +Cpp\Internet\MailSnd1.dfm +Cpp\Internet\MailSnd1.h +Cpp\Internet\TnCli1.cpp +Cpp\Internet\TnCli1.dfm +Cpp\Internet\TnCli1.h +Cpp\Internet\Bcb1\TnClient.cpp +Cpp\Internet\Bcb1\TnClient.mak +Cpp\Internet\Bcb1\TnClient.res +Cpp\Internet\Bcb3\TnClient.cpp +Cpp\Internet\Bcb3\TnClient.bpr +Cpp\Internet\Bcb4\TnClient.cpp +Cpp\Internet\Bcb4\TnClient.bpr +Cpp\Internet\Bcb5\TnClient.cpp +Cpp\Internet\Bcb5\TnClient.bpr +Cpp\Internet\Bcb6\TnClient.cpp +Cpp\Internet\Bcb6\TnClient.bpr +Cpp\Internet\Bcb1\TnDemo.mak +Cpp\Internet\Bcb1\TnDemo.cpp +Cpp\Internet\Bcb1\TnDemo.res +Cpp\Internet\Bcb3\TnDemo.bpr +Cpp\Internet\Bcb3\TnDemo.cpp +Cpp\Internet\Bcb4\TnDemo.bpr +Cpp\Internet\Bcb4\TnDemo.cpp +Cpp\Internet\Bcb5\TnDemo.bpr +Cpp\Internet\Bcb5\TnDemo.cpp +Cpp\Internet\Bcb6\TnDemo.bpr +Cpp\Internet\Bcb6\TnDemo.cpp +Cpp\Internet\TnDemo1.cpp +Cpp\Internet\TnDemo1.dfm +Cpp\Internet\TnDemo1.h +Cpp\Internet\Bcb1\TnSrv.cpp +Cpp\Internet\Bcb1\TnSrv.mak +Cpp\Internet\Bcb1\TnSrv.res +Cpp\Internet\Bcb3\TnSrv.cpp +Cpp\Internet\Bcb3\TnSrv.bpr +Cpp\Internet\Bcb4\TnSrv.cpp +Cpp\Internet\Bcb4\TnSrv.bpr +Cpp\Internet\Bcb5\TnSrv.cpp +Cpp\Internet\Bcb5\TnSrv.bpr +Cpp\Internet\Bcb6\TnSrv.cpp +Cpp\Internet\Bcb6\TnSrv.bpr +Cpp\Internet\TnSrv1.cpp +Cpp\Internet\TnSrv1.dfm +Cpp\Internet\TnSrv1.h +Cpp\Internet\TnSrv2.cpp +Cpp\Internet\TnSrv2.dfm +Cpp\Internet\TnSrv2.h +Cpp\Internet\Bcb1\TWSChat.mak +Cpp\Internet\Bcb1\TWSChat.cpp +Cpp\Internet\Bcb1\TWSChat.res +Cpp\Internet\Bcb3\TWSChat.bpr +Cpp\Internet\Bcb3\TWSChat.cpp +Cpp\Internet\Bcb4\TWSChat.bpr +Cpp\Internet\Bcb4\TWSChat.cpp +Cpp\Internet\Bcb5\TWSChat.bpr +Cpp\Internet\Bcb5\TWSChat.cpp +Cpp\Internet\Bcb6\TWSChat.bpr +Cpp\Internet\Bcb6\TWSChat.cpp +Cpp\Internet\TWSChat1.dfm +Cpp\Internet\TWSChat1.cpp +Cpp\Internet\TWSChat1.h +Cpp\Internet\Bcb1\UdpLstn.cpp +Cpp\Internet\Bcb1\UdpLstn.mak +Cpp\Internet\Bcb1\UdpLstn.res +Cpp\Internet\Bcb3\UdpLstn.cpp +Cpp\Internet\Bcb3\UdpLstn.bpr +Cpp\Internet\Bcb4\UdpLstn.cpp +Cpp\Internet\Bcb4\UdpLstn.bpr +Cpp\Internet\Bcb5\UdpLstn.cpp +Cpp\Internet\Bcb5\UdpLstn.bpr +Cpp\Internet\Bcb6\UdpLstn.cpp +Cpp\Internet\Bcb6\UdpLstn.bpr +Cpp\Internet\UdpLstn1.cpp +Cpp\Internet\UdpLstn1.dfm +Cpp\Internet\UdpLstn1.h +Cpp\Internet\Bcb1\UdpSend.cpp +Cpp\Internet\Bcb1\UdpSend.mak +Cpp\Internet\Bcb1\UdpSend.res +Cpp\Internet\Bcb3\UdpSend.cpp +Cpp\Internet\Bcb3\UdpSend.bpr +Cpp\Internet\Bcb4\UdpSend.cpp +Cpp\Internet\Bcb4\UdpSend.bpr +Cpp\Internet\Bcb5\UdpSend.cpp +Cpp\Internet\Bcb5\UdpSend.bpr +Cpp\Internet\Bcb6\UdpSend.cpp +Cpp\Internet\Bcb6\UdpSend.bpr +Cpp\Internet\UdpSend1.cpp +Cpp\Internet\UdpSend1.dfm +Cpp\Internet\UdpSend1.h +Cpp\Internet\Bcb1\SocksTst.cpp +Cpp\Internet\Bcb1\SocksTst.mak +Cpp\Internet\Bcb1\SocksTst.res +Cpp\Internet\Bcb3\SocksTst.cpp +Cpp\Internet\Bcb3\SocksTst.bpr +Cpp\Internet\Bcb4\SocksTst.cpp +Cpp\Internet\Bcb4\SocksTst.bpr +Cpp\Internet\Bcb5\SocksTst.cpp +Cpp\Internet\Bcb5\SocksTst.bpr +Cpp\Internet\Bcb5\WebServ.bpr +Cpp\Internet\Bcb5\WebServ.cpp +Cpp\Internet\Bcb6\SocksTst.cpp +Cpp\Internet\Bcb6\SocksTst.bpr +Cpp\Internet\Bcb6\WebServ.bpr +Cpp\Internet\Bcb6\WebServ.cpp +Cpp\Internet\WebServ1.dfm +Cpp\Internet\WebServ1.cpp +Cpp\Internet\WebServ1.h +Cpp\Internet\Socks1.cpp +Cpp\Internet\Socks1.dfm +Cpp\Internet\Socks1.h diff --git a/lib/ics/zipicsd.lst b/lib/ics/zipicsd.lst new file mode 100644 index 00000000..c15d9dd8 --- /dev/null +++ b/lib/ics/zipicsd.lst @@ -0,0 +1,299 @@ +ReadMe.txt +Ics.diz +ics_logo.gif +powered_by_ics.gif +ics7spec.zip +InstallIcs.bat +zipicsb.lst +zipicsd.lst +zipics7.lst +zipics.bat +Delphi\Internet\Del40Sam.bpg +Delphi\Internet\Del50Sam.bpg +Delphi\Internet\Del60Sam.bpg +Delphi\Internet\Del70Sam.bpg +Delphi\Internet\DynCli1.dfm +Delphi\Internet\DynCli1.pas +Delphi\Internet\DynCli.dpr +Delphi\Internet\Cli5.dfm +Delphi\Internet\Cli5.pas +Delphi\Internet\CliDemo.dpr +Delphi\Internet\CliDemo1.pas +Delphi\Internet\CliDemo1.dfm +Delphi\Internet\Client5.dpr +Delphi\Internet\Cli7.dfm +Delphi\Internet\Cli7.pas +Delphi\Internet\Client7.dpr +Delphi\Internet\Clients.dbf +Delphi\Internet\Clients.mdx +Delphi\Internet\ConCli1.dpr +Delphi\Internet\ConCli2.dpr +Delphi\Internet\ConFtp.dpr +Delphi\Internet\ConHttp.dpr +Delphi\Internet\ConSmtp.dpr +Delphi\Internet\ConSrv1.dpr +Delphi\Internet\ConSrv1C.pas +Delphi\Internet\ConSrv1S.pas +Delphi\Internet\DllTst1.dpr +Delphi\Internet\DllTst_1.dfm +Delphi\Internet\DllTst_1.pas +Delphi\Internet\DnsLook.dpr +Delphi\Internet\DnsLook1.dfm +Delphi\Internet\DnsLook1.pas +Delphi\Internet\Finger.dpr +Delphi\Internet\Finger1.dfm +Delphi\Internet\Finger1.pas +Delphi\Internet\FtpCli.ico +Delphi\Internet\FtpThrd.dpr +Delphi\Internet\FtpThrd1.dfm +Delphi\Internet\FtpThrd1.pas +Delphi\Internet\FtpTst.dpr +Delphi\Internet\FtpTst1.dfm +Delphi\Internet\FtpTst1.pas +Delphi\Internet\FtpTst2.dfm +Delphi\Internet\FtpTst2.pas +Delphi\Internet\FtpServ.dpr +Delphi\Internet\FtpServ1.dfm +Delphi\Internet\FtpServ1.pas +Delphi\Internet\WebServ.dpr +Delphi\Internet\WebServ1.pas +Delphi\Internet\WebServ1.dfm +Delphi\Internet\HttpChk.dpr +Delphi\Internet\HttpChk1.pas +Delphi\Internet\HttpChk1.dfm +Delphi\Internet\HttpDmo.dpr +Delphi\Internet\HttpDmo1.pas +Delphi\Internet\HttpDmo1.dfm +Delphi\Internet\HttpGet.dpr +Delphi\Internet\HttpGet1.dfm +Delphi\Internet\HttpGet1.pas +Delphi\Internet\HttpThrd.dpr +Delphi\Internet\HttpThr1.dfm +Delphi\Internet\HttpThr1.pas +Delphi\Internet\HttpThr2.pas +Delphi\Internet\HttpTst.dpr +Delphi\Internet\HttpTst1.dfm +Delphi\Internet\HttpTst1.pas +Delphi\Internet\HttpPg.dpr +Delphi\Internet\HttpPg1.dfm +Delphi\Internet\HttpPg1.pas +Delphi\Internet\HttpAsp.dpr +Delphi\Internet\HttpAsp1.dfm +Delphi\Internet\HttpAsp1.pas +Delphi\Internet\HttpAsy.dpr +Delphi\Internet\HttpAsy1.dfm +Delphi\Internet\HttpAsy1.pas +Delphi\Internet\IcsDll1.dpr +Delphi\Internet\IcsIsapi.dpr +Delphi\Internet\IcsIsap1.pas +Delphi\Internet\IcsIsap1.dfm +Delphi\Internet\MailRob.dpr +Delphi\Internet\MailRob1.pas +Delphi\Internet\MailRob1.dfm +Delphi\Internet\MbxSub.dpr +Delphi\Internet\MbxSub1.dfm +Delphi\Internet\MbxSub1.pas +Delphi\Internet\MD5Test1.pas +Delphi\Internet\MD5Test1.dfm +Delphi\Internet\MD5Test.dpr +Delphi\Internet\MimeDemo.dpr +Delphi\Internet\MimeDmo1.dfm +Delphi\Internet\MimeDmo1.pas +Delphi\Internet\MimeTst.dpr +Delphi\Internet\MimeTst1.pas +Delphi\Internet\MimeTst1.dfm +Delphi\Internet\MtSrv.dpr +Delphi\Internet\MtSrv.ico +Delphi\Internet\MtSrv.res +Delphi\Internet\MtSrv1.dfm +Delphi\Internet\MtSrv1.pas +Delphi\Internet\MtSrv2.pas +Delphi\Internet\NewsRdr.dpr +Delphi\Internet\NewsRdr1.pas +Delphi\Internet\NewsRdr1.dfm +Delphi\Internet\NsLook1.dfm +Delphi\Internet\NsLook1.pas +Delphi\Internet\NsLookup.dpr +Delphi\Internet\PingTst.dpr +Delphi\Internet\PingTst1.dfm +Delphi\Internet\PingTst1.pas +Delphi\Internet\Pop3Mime.dpr +Delphi\Internet\Pop3Mim1.dfm +Delphi\Internet\Pop3Mim1.pas +Delphi\Internet\PopTst.dpr +Delphi\Internet\PopTst1.dfm +Delphi\Internet\PopTst1.pas +Delphi\Internet\PopTst2.dfm +Delphi\Internet\PopTst2.pas +Delphi\Internet\Server5.dpr +Delphi\Internet\SocksTst.dpr +Delphi\Internet\Socks1.pas +Delphi\Internet\Socks1.dfm +Delphi\Internet\MailSnd.dpr +Delphi\Internet\MailSnd1.dfm +Delphi\Internet\MailSnd1.pas +Delphi\Internet\MailRcv.dpr +Delphi\Internet\MailRcv1.dfm +Delphi\Internet\MailRcv1.pas +Delphi\Internet\MailRcv2.dfm +Delphi\Internet\MailRcv2.pas +Delphi\Internet\Recv.dpr +Delphi\Internet\Recv1.pas +Delphi\Internet\Recv1.dfm +Delphi\Internet\Sender.dpr +Delphi\Internet\Sender1.pas +Delphi\Internet\Sender1.dfm +Delphi\Internet\Srv5.dfm +Delphi\Internet\Srv5.pas +Delphi\Internet\SrvDemo.dpr +Delphi\Internet\SrvDemo1.pas +Delphi\Internet\SrvDemo1.dfm +Delphi\Internet\SrvDemo2.pas +Delphi\Internet\SrvDemo2.dfm +Delphi\Internet\SrvTcp.dpr +Delphi\Internet\SrvTcp1.pas +Delphi\Internet\SrvTcp1.dfm +Delphi\Internet\SvcTcp.dpr +Delphi\Internet\SvcTcp1.pas +Delphi\Internet\SvcTcp1.dfm +Delphi\Internet\TcpCmd.pas +Delphi\Internet\TcpSrv.dpr +Delphi\Internet\TcpSrv1.pas +Delphi\Internet\TcpSrv1.dfm +Delphi\Internet\ThrdSrv.dpr +Delphi\Internet\ThrdSrv1.dfm +Delphi\Internet\ThrdSrv1.pas +Delphi\Internet\TnCli1.dfm +Delphi\Internet\TnCli1.pas +Delphi\Internet\TnClient.dpr +Delphi\Internet\TnClient.ico +Delphi\Internet\TnDemo1.dfm +Delphi\Internet\TnDemo1.pas +Delphi\Internet\TnDemo.dpr +Delphi\Internet\TnSrv.dpr +Delphi\Internet\TnSrv.ico +Delphi\Internet\TnSrv1.dfm +Delphi\Internet\TnSrv1.pas +Delphi\Internet\TnSrv2.dfm +Delphi\Internet\TnSrv2.pas +Delphi\Internet\TWSChat.dpr +Delphi\Internet\TWSChat1.dfm +Delphi\Internet\TWSChat1.pas +Delphi\Internet\UdpLstn.dpr +Delphi\Internet\UdpLstn1.dfm +Delphi\Internet\UdpLstn1.pas +Delphi\Internet\UdpSend.dpr +Delphi\Internet\UdpSend1.dfm +Delphi\Internet\UdpSend1.pas +Delphi\Vc32\EmulVT.dcr +Delphi\Vc32\EmulVT.pas +Delphi\Vc32\FingCli.pas +Delphi\Vc32\FingCli.dcr +Delphi\Vc32\FormPos.pas +Delphi\Vc32\FormPos.pas +Delphi\Vc32\FtpCli.dcr +Delphi\Vc32\FtpCli.pas +Delphi\Vc32\FtpSrv.dcr +Delphi\Vc32\FtpSrv.pas +Delphi\Vc32\FtpSrvc.pas +Delphi\Vc32\FtpSrvt.pas +Delphi\Vc32\HttpProt.pas +Delphi\Vc32\HttpProt.dcr +Delphi\Vc32\HttpSrv.pas +Delphi\Vc32\HttpSrv.dcr +Delphi\Vc32\Icmp.pas +Delphi\Vc32\Mbxfile.pas +Delphi\Vc32\Mbxfile.dcr +Delphi\Vc32\MD5.pas +Delphi\Vc32\MimeDec.pas +Delphi\Vc32\MimeDec.dcr +Delphi\Vc32\NntpCli.pas +Delphi\Vc32\NntpCli.dcr +Delphi\Vc32\DnsQuery.pas +Delphi\Vc32\DnsQuery.dcr +Delphi\Vc32\Ping.pas +Delphi\Vc32\Ping.dcr +Delphi\Vc32\Pop3Prot.dcr +Delphi\Vc32\Pop3Prot.pas +Delphi\Vc32\Pop3Cli.dcr +Delphi\Vc32\Pop3Cli.pas +Delphi\Vc32\SmtpProt.dcr +Delphi\Vc32\SmtpProt.pas +Delphi\Vc32\TnCnx.dcr +Delphi\Vc32\TnCnx.hlp +Delphi\Vc32\TnCnx.pas +Delphi\Vc32\TnEmulVT.dcr +Delphi\Vc32\TnEmulVT.pas +Delphi\Vc32\TnOptFrm.dfm +Delphi\Vc32\TnOptFrm.pas +Delphi\Vc32\TnScript.pas +Delphi\Vc32\TnScript.dcr +Delphi\Vc32\UuEncode.pas +Delphi\Vc32\Wait.dcr +Delphi\Vc32\Wait.pas +Delphi\Vc32\WSockBuf.pas +Delphi\Vc32\WSocket.dcr +Delphi\Vc32\WSocket.hlp +Delphi\Vc32\WSocket.ico +Delphi\Vc32\WSocket.pas +Delphi\Vc32\WSocketE.pas +Delphi\Vc32\WSocketS.pas +Delphi\Vc32\WSocketS.dcr +Delphi\Vc32\IcsDel30.dpk +Delphi\Vc32\IcsDel30.res +Delphi\Vc32\IcsDel40.dpk +Delphi\Vc32\IcsDel40.res +Delphi\Vc32\IcsDel50.dpk +Delphi\Vc32\IcsDel50.res +Delphi\Vc32\IcsDel60.dpk +Delphi\Vc32\IcsDel60.res +Delphi\Vc32\IcsDel60.dof +Delphi\Vc32\IcsDel70.dpk +Delphi\Vc32\IcsDel70.res +Delphi\Vc32\IcsDel70.dof +Delphi\Vc32\IcsBcb30.cpp +Delphi\Vc32\IcsBcb30.bpk +Delphi\Vc32\IcsBcb30.res +Delphi\Vc32\IcsBcb40.cpp +Delphi\Vc32\IcsBcb40.bpk +Delphi\Vc32\IcsBcb40.res +Delphi\Vc32\IcsBcb50.cpp +Delphi\Vc32\IcsBcb50.bpk +Delphi\Vc32\IcsBcb50.res +Delphi\Vc32\IcsBcb60.cpp +Delphi\Vc32\IcsBcb60.bpk +Delphi\Vc32\IcsBcb60.res +Delphi\Vc\WinSock.pas +Delphi\Vc\EmulVT.dcr +Delphi\Vc\FingCli.dcr +Delphi\Vc\FtpCli.dcr +Delphi\Vc\FtpSrv.dcr +Delphi\Vc\HttpProt.dcr +Delphi\Vc\HttpSrv.dcr +Delphi\Vc\MbxFile.dcr +Delphi\Vc\MimeDec.dcr +Delphi\Vc\NntpCli.dcr +Delphi\Vc\Pop3Prot.dcr +Delphi\Vc\SmtpProt.dcr +Delphi\Vc\TnCnx.dcr +Delphi\Vc\TnEmulVT.dcr +Delphi\Vc\TnScript.dcr +Delphi\Vc\Wait.dcr +Delphi\Vc\WSocket.dcr +Delphi\Vc\WSocketS.dcr +Delphi\Vc\DnsQuery.dcr +Delphi\Internet\Ics.ico +Delphi1\IcsDel1.bat +Delphi1\Dcc1.bat +Delphi2\IcsDel2.bat +Delphi2\Dcc2.bat +Delphi3\IcsDel3.bat +Delphi3\Dcc3.bat +Bcb1\DelBcb1.mak +Bcb1\IcsBcb1.mak +Bcb1\IcsBcb1.bat +Delphi\Internet\HLembke\DnsQuery.pas +Delphi\Internet\HLembke\NsLook1.dfm +Delphi\Internet\HLembke\NsLook1.pas +Delphi\Internet\HLembke\NsLookup.dpr +Delphi\Internet\HLembke\ReadMe.txt diff --git a/lib/ini_mw/Ini.dcu b/lib/ini_mw/Ini.dcu new file mode 100644 index 00000000..f1e4e8d2 Binary files /dev/null and b/lib/ini_mw/Ini.dcu differ diff --git a/lib/ini_mw/Ini.pas b/lib/ini_mw/Ini.pas new file mode 100644 index 00000000..461282de --- /dev/null +++ b/lib/ini_mw/Ini.pas @@ -0,0 +1,251 @@ +{ + One more of this crazy profile-units :-) + + This unit uses a local ini-File. (the ini has the same path and name + like the exe) Supports all necessary data-types (e.g. string and PChar too), + and creates a new entry with the default value, if the requested entry + is not present or damaged. + Installable as component. + + It's Freeware by Matthias Weingart, 7 Aug 95 + Comments are welcome: matthias@penthouse.boerde.de +} +unit Ini; + +interface + +uses + SysUtils, WinProcs, Classes, WinTypes, Messages, Graphics, Controls, Forms; + +type + TIni = class(TComponent) + private + szFileName: array[0..255] of char; + public + constructor Create(AOwner: TComponent); override; + function FileName: string; + procedure SetStr(const Section, Entry: PChar; Value: PChar); + function GetStr(const Section, Entry: PChar; Default, Value: PChar; SizeValue: Word): PChar; + procedure SetString(const Section, Entry: PChar; Value: string); + function GetString(const Section, Entry: PChar; Default: string): string; + procedure SetInteger(const Section, Entry: PChar; Value: LongInt); + function GetInteger(const Section, Entry: PChar; Default: LongInt): LongInt; + procedure SetBoolean(const Section, Entry: PChar; Value: boolean); + function GetBoolean(const Section, Entry: PChar; Default: boolean): boolean; + procedure SetFloat(const Section, Entry: PChar; Value: Extended); + function GetFloat(const Section, Entry: PChar; Default: Extended): Extended; + published + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('Add', [TIni]); +end; + +function StrToBool(strVal: string; var ret: boolean): boolean; +begin { returns false on invalid entry} + if (UpperCase(strVal) = 'TRUE') or (UpperCase(strVal) = 'YES') or (UpperCase(strVal) = 'ON') or (strVal = '1') then + begin + ret := True; + Result:= True; + end + else + if (UpperCase(strVal) = 'FALSE') or (UpperCase(strVal) = 'NO') or (UpperCase(strVal) = 'OFF') or (strVal = '0') then + begin + ret := False; + Result:= True; + end + else + Result := False; +end; + +function BoolToStr(bVal: boolean): string; +begin + if bVal then + Result := 'True' + else + Result := 'False'; +end; + +constructor TIni.Create(AOwner: TComponent); +var + Path: PChar; +begin + inherited Create(AOwner); + Path:=StrAlloc( 256 ); + try + StrPCopy( szFileName, ChangeFileExt(Application.ExeName, '.INI') ); + finally + StrDispose(Path); + end; +end; + +function TIni.FileName: string; +begin + FileName := StrPas(szFileName); +end; + +procedure TIni.SetStr(const Section, Entry: PChar; Value: PChar); +begin + WritePrivateProfileString(Section, Entry, Value, szFileName); +end; + +function TIni.GetStr(const Section, Entry: PChar; Default, Value: PChar; SizeValue: Word): PChar; +var + iTemp: PChar; +begin + iTemp := StrAlloc(256); + try + if 0=GetPrivateProfileString(Section, Entry, '', iTemp, 256, szFileName) then + begin { on emtpy String write default } + WritePrivateProfileString(Section, Entry, Default, szFileName); + StrCopy( iTemp, Default); + end; + StrLCopy( Value, iTemp, SizeValue ); + finally + StrDispose(iTemp); + Result := Value; + end; +end; + +procedure TIni.SetString(const Section, Entry: PChar; Value: string); +var + iValue: PChar; +begin + iValue := StrAlloc(256); + try + StrPCopy(iValue, Value); + SetStr(Section, Entry, iValue); + finally + StrDispose(iValue); + end; +end; + +function TIni.GetString(const Section, Entry: PChar; Default: string): string; +var + iValue, iDefault: PChar; +begin + iValue := StrAlloc(256); + iDefault := StrAlloc(256); + try + StrPCopy(iDefault, Default); + GetStr(Section, Entry, iDefault, iValue, 256); + GetString := StrPas( iValue ); + finally + StrDispose(iDefault); + StrDispose(iValue); + end; +end; + +procedure TIni.SetInteger(const Section, Entry: PChar; Value: LongInt); +var + iValue: PChar; +begin + iValue := StrAlloc(256); + try + StrPCopy(iValue, IntToStr(Value) ); + SetStr(Section, Entry, iValue); + finally + StrDispose(iValue); + end; +end; + +function TIni.GetInteger(const Section, Entry: PChar; Default: LongInt): LongInt; +var + iValue, iDefault: PChar; +begin + iValue := StrAlloc(256); + iDefault := StrAlloc(256); + try + StrPCopy(iDefault, IntToStr(Default) ); + GetStr(Section, Entry, iDefault, iValue, 256); + try + GetInteger := StrToInt( StrPas(iValue) ); + except + on EConvertError do begin + GetInteger := Default; + SetStr(Section, Entry, iDefault); { correct bad entry } + end; + end; + finally + StrDispose(iDefault); + StrDispose(iValue); + end; +end; + +procedure TIni.SetBoolean(const Section, Entry: PChar; Value: boolean); +var + iValue: PChar; +begin + iValue := StrAlloc(256); + try + StrPCopy(iValue, BoolToStr(Value) ); + SetStr(Section, Entry, iValue); + finally + StrDispose(iValue); + end; +end; + +function TIni.GetBoolean(const Section, Entry: PChar; Default: boolean): boolean; +var + iValue, iDefault: PChar; + b: boolean; +begin + iValue := StrAlloc(256); + iDefault := StrAlloc(256); + try + StrPCopy(iDefault, BoolToStr(Default) ); + GetStr(Section, Entry, iDefault, iValue, 256); + if StrToBool( StrPas(iValue), b ) then + GetBoolean := b + else begin + GetBoolean := Default; + SetStr(Section, Entry, iDefault); { correct bad entry } + end; + finally + StrDispose(iDefault); + StrDispose(iValue); + end; +end; + +procedure TIni.SetFloat(const Section, Entry: PChar; Value: Extended); +var + iValue: PChar; +begin + iValue := StrAlloc(256); + try + StrPCopy(iValue, FloatToStr(Value) ); + SetStr(Section, Entry, iValue); + finally + StrDispose(iValue); + end; +end; + +function TIni.GetFloat(const Section, Entry: PChar; Default: Extended): Extended; +var + iValue, iDefault: PChar; + Value: Extended; +begin + iValue := StrAlloc(256); + iDefault := StrAlloc(256); + try + StrPCopy(iDefault, FloatToStr(Default) ); + GetStr(Section, Entry, iDefault, iValue, 256); + if TextToFloat( iValue, Value, fvExtended ) then + GetFloat := Value + else begin + GetFloat := Default; + SetStr(Section, Entry, iDefault); { correct bad entry } + end; + finally + StrDispose(iDefault); + StrDispose(iValue); + end; +end; + +end. + diff --git a/lib/ini_mw/Ini.~pa b/lib/ini_mw/Ini.~pa new file mode 100644 index 00000000..461282de --- /dev/null +++ b/lib/ini_mw/Ini.~pa @@ -0,0 +1,251 @@ +{ + One more of this crazy profile-units :-) + + This unit uses a local ini-File. (the ini has the same path and name + like the exe) Supports all necessary data-types (e.g. string and PChar too), + and creates a new entry with the default value, if the requested entry + is not present or damaged. + Installable as component. + + It's Freeware by Matthias Weingart, 7 Aug 95 + Comments are welcome: matthias@penthouse.boerde.de +} +unit Ini; + +interface + +uses + SysUtils, WinProcs, Classes, WinTypes, Messages, Graphics, Controls, Forms; + +type + TIni = class(TComponent) + private + szFileName: array[0..255] of char; + public + constructor Create(AOwner: TComponent); override; + function FileName: string; + procedure SetStr(const Section, Entry: PChar; Value: PChar); + function GetStr(const Section, Entry: PChar; Default, Value: PChar; SizeValue: Word): PChar; + procedure SetString(const Section, Entry: PChar; Value: string); + function GetString(const Section, Entry: PChar; Default: string): string; + procedure SetInteger(const Section, Entry: PChar; Value: LongInt); + function GetInteger(const Section, Entry: PChar; Default: LongInt): LongInt; + procedure SetBoolean(const Section, Entry: PChar; Value: boolean); + function GetBoolean(const Section, Entry: PChar; Default: boolean): boolean; + procedure SetFloat(const Section, Entry: PChar; Value: Extended); + function GetFloat(const Section, Entry: PChar; Default: Extended): Extended; + published + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('Add', [TIni]); +end; + +function StrToBool(strVal: string; var ret: boolean): boolean; +begin { returns false on invalid entry} + if (UpperCase(strVal) = 'TRUE') or (UpperCase(strVal) = 'YES') or (UpperCase(strVal) = 'ON') or (strVal = '1') then + begin + ret := True; + Result:= True; + end + else + if (UpperCase(strVal) = 'FALSE') or (UpperCase(strVal) = 'NO') or (UpperCase(strVal) = 'OFF') or (strVal = '0') then + begin + ret := False; + Result:= True; + end + else + Result := False; +end; + +function BoolToStr(bVal: boolean): string; +begin + if bVal then + Result := 'True' + else + Result := 'False'; +end; + +constructor TIni.Create(AOwner: TComponent); +var + Path: PChar; +begin + inherited Create(AOwner); + Path:=StrAlloc( 256 ); + try + StrPCopy( szFileName, ChangeFileExt(Application.ExeName, '.INI') ); + finally + StrDispose(Path); + end; +end; + +function TIni.FileName: string; +begin + FileName := StrPas(szFileName); +end; + +procedure TIni.SetStr(const Section, Entry: PChar; Value: PChar); +begin + WritePrivateProfileString(Section, Entry, Value, szFileName); +end; + +function TIni.GetStr(const Section, Entry: PChar; Default, Value: PChar; SizeValue: Word): PChar; +var + iTemp: PChar; +begin + iTemp := StrAlloc(256); + try + if 0=GetPrivateProfileString(Section, Entry, '', iTemp, 256, szFileName) then + begin { on emtpy String write default } + WritePrivateProfileString(Section, Entry, Default, szFileName); + StrCopy( iTemp, Default); + end; + StrLCopy( Value, iTemp, SizeValue ); + finally + StrDispose(iTemp); + Result := Value; + end; +end; + +procedure TIni.SetString(const Section, Entry: PChar; Value: string); +var + iValue: PChar; +begin + iValue := StrAlloc(256); + try + StrPCopy(iValue, Value); + SetStr(Section, Entry, iValue); + finally + StrDispose(iValue); + end; +end; + +function TIni.GetString(const Section, Entry: PChar; Default: string): string; +var + iValue, iDefault: PChar; +begin + iValue := StrAlloc(256); + iDefault := StrAlloc(256); + try + StrPCopy(iDefault, Default); + GetStr(Section, Entry, iDefault, iValue, 256); + GetString := StrPas( iValue ); + finally + StrDispose(iDefault); + StrDispose(iValue); + end; +end; + +procedure TIni.SetInteger(const Section, Entry: PChar; Value: LongInt); +var + iValue: PChar; +begin + iValue := StrAlloc(256); + try + StrPCopy(iValue, IntToStr(Value) ); + SetStr(Section, Entry, iValue); + finally + StrDispose(iValue); + end; +end; + +function TIni.GetInteger(const Section, Entry: PChar; Default: LongInt): LongInt; +var + iValue, iDefault: PChar; +begin + iValue := StrAlloc(256); + iDefault := StrAlloc(256); + try + StrPCopy(iDefault, IntToStr(Default) ); + GetStr(Section, Entry, iDefault, iValue, 256); + try + GetInteger := StrToInt( StrPas(iValue) ); + except + on EConvertError do begin + GetInteger := Default; + SetStr(Section, Entry, iDefault); { correct bad entry } + end; + end; + finally + StrDispose(iDefault); + StrDispose(iValue); + end; +end; + +procedure TIni.SetBoolean(const Section, Entry: PChar; Value: boolean); +var + iValue: PChar; +begin + iValue := StrAlloc(256); + try + StrPCopy(iValue, BoolToStr(Value) ); + SetStr(Section, Entry, iValue); + finally + StrDispose(iValue); + end; +end; + +function TIni.GetBoolean(const Section, Entry: PChar; Default: boolean): boolean; +var + iValue, iDefault: PChar; + b: boolean; +begin + iValue := StrAlloc(256); + iDefault := StrAlloc(256); + try + StrPCopy(iDefault, BoolToStr(Default) ); + GetStr(Section, Entry, iDefault, iValue, 256); + if StrToBool( StrPas(iValue), b ) then + GetBoolean := b + else begin + GetBoolean := Default; + SetStr(Section, Entry, iDefault); { correct bad entry } + end; + finally + StrDispose(iDefault); + StrDispose(iValue); + end; +end; + +procedure TIni.SetFloat(const Section, Entry: PChar; Value: Extended); +var + iValue: PChar; +begin + iValue := StrAlloc(256); + try + StrPCopy(iValue, FloatToStr(Value) ); + SetStr(Section, Entry, iValue); + finally + StrDispose(iValue); + end; +end; + +function TIni.GetFloat(const Section, Entry: PChar; Default: Extended): Extended; +var + iValue, iDefault: PChar; + Value: Extended; +begin + iValue := StrAlloc(256); + iDefault := StrAlloc(256); + try + StrPCopy(iDefault, FloatToStr(Default) ); + GetStr(Section, Entry, iDefault, iValue, 256); + if TextToFloat( iValue, Value, fvExtended ) then + GetFloat := Value + else begin + GetFloat := Default; + SetStr(Section, Entry, iDefault); { correct bad entry } + end; + finally + StrDispose(iDefault); + StrDispose(iValue); + end; +end; + +end. + diff --git a/lib/midicom3/CIRCBUF.PAS b/lib/midicom3/CIRCBUF.PAS new file mode 100644 index 00000000..e84fc2c4 --- /dev/null +++ b/lib/midicom3/CIRCBUF.PAS @@ -0,0 +1,192 @@ +{ $Header: /MidiComp/CIRCBUF.PAS 2 10/06/97 7:33 Davec $ } + +{ Written by David Churcher , + released to the public domain. } + + +{ A First-In First-Out circular buffer. + Port of circbuf.c from Microsoft's Windows MIDI monitor example. + I did do a version of this as an object (see Rev 1.1) but it was getting too + complicated and I couldn't see any real benefits to it so I dumped it + for an ordinary memory buffer with pointers. + + This unit is a bit C-like, everything is done with pointers and extensive + use is made of the undocumented feature of the Inc() function that + increments pointers by the size of the object pointed to. + All of this could probably be done using Pascal array notation with + range-checking turned off, but I'm not sure it's worth it. +} + +Unit Circbuf; + +interface + +Uses Wintypes, WinProcs, MMSystem; + +type + {$IFNDEF WIN32} + { API types not defined in Delphi 1 } + DWORD = Longint; + HGLOBAL = THandle; + UINT = Word; + TFNTimeCallBack = procedure(uTimerID, uMessage: UINT; dwUser, dw1, dw2: DWORD); + {$ENDIF} + + { MIDI input event } + TMidiBufferItem = record + timestamp: DWORD; { Timestamp in milliseconds after midiInStart } + data: DWORD; { MIDI message received } + sysex: PMidiHdr; { Pointer to sysex MIDIHDR, nil if not sysex } + end; + PMidiBufferItem = ^TMidiBufferItem; + + { MIDI input buffer } + TCircularBuffer = record + RecordHandle: HGLOBAL; { Windows memory handle for this record } + BufferHandle: HGLOBAL; { Windows memory handle for the buffer } + pStart: PMidiBufferItem; { ptr to start of buffer } + pEnd: PMidiBufferItem; { ptr to end of buffer } + pNextPut: PMidiBufferItem; { next location to fill } + pNextGet: PMidiBufferItem; { next location to empty } + Error: Word; { error code from MMSYSTEM functions } + Capacity: Word; { buffer size (in TMidiBufferItems) } + EventCount: Word; { Number of events in buffer } + end; + + PCircularBuffer = ^TCircularBuffer; + +function GlobalSharedLockedAlloc( Capacity: Word; var hMem: HGLOBAL ): Pointer; +procedure GlobalSharedLockedFree( hMem: HGLOBAL; ptr: Pointer ); + +function CircbufAlloc( Capacity: Word ): PCircularBuffer; +procedure CircbufFree( PBuffer: PCircularBuffer ); +function CircbufRemoveEvent( PBuffer: PCircularBuffer ): Boolean; +function CircbufReadEvent( PBuffer: PCircularBuffer; PEvent: PMidiBufferItem ): Boolean; +{ Note: The PutEvent function is in the DLL } + +implementation + +{ Allocates in global shared memory, returns pointer and handle } +function GlobalSharedLockedAlloc( Capacity: Word; var hMem: HGLOBAL ): Pointer; +var + ptr: Pointer; +begin + { Allocate the buffer memory } + hMem := GlobalAlloc(GMEM_SHARE Or GMEM_MOVEABLE Or GMEM_ZEROINIT, Capacity ); + + if (hMem = 0) then + ptr := Nil + else + begin + ptr := GlobalLock(hMem); + if (ptr = Nil) then + GlobalFree(hMem); + end; + +{$IFNDEF WIN32} + if (ptr <> Nil) then + GlobalPageLock(HIWORD(DWORD(ptr))); +{$ENDIF} + GlobalSharedLockedAlloc := Ptr; +end; + +procedure GlobalSharedLockedFree( hMem: HGLOBAL; ptr: Pointer ); +begin +{$IFNDEF WIN32} + if (ptr <> Nil) then + GlobalPageUnlock(HIWORD(DWORD(ptr))); +{$ENDIF} + if (hMem <> 0) then + begin + GlobalUnlock(hMem); + GlobalFree(hMem); + end; +end; + +function CircbufAlloc( Capacity: Word ): PCircularBuffer; +var + NewCircularBuffer: PCircularBuffer; + NewMIDIBuffer: PMidiBufferItem; + hMem: HGLOBAL; +begin + { TODO: Validate circbuf size, <64K } + NewCircularBuffer := + GlobalSharedLockedAlloc( Sizeof(TCircularBuffer), hMem ); + if (NewCircularBuffer <> Nil) then + begin + NewCircularBuffer^.RecordHandle := hMem; + NewMIDIBuffer := + GlobalSharedLockedAlloc( Capacity * Sizeof(TMidiBufferItem), hMem ); + if (NewMIDIBuffer = Nil) then + begin + { TODO: Exception here? } + GlobalSharedLockedFree( NewCircularBuffer^.RecordHandle, + NewCircularBuffer ); + NewCircularBuffer := Nil; + end + else + begin + NewCircularBuffer^.pStart := NewMidiBuffer; + { Point to item at end of buffer } + NewCircularBuffer^.pEnd := NewMidiBuffer; + Inc(NewCircularBuffer^.pEnd, Capacity); + { Start off the get and put pointers in the same position. These + will get out of sync as the interrupts start rolling in } + NewCircularBuffer^.pNextPut := NewMidiBuffer; + NewCircularBuffer^.pNextGet := NewMidiBuffer; + NewCircularBuffer^.Error := 0; + NewCircularBuffer^.Capacity := Capacity; + NewCircularBuffer^.EventCount := 0; + end; + end; + CircbufAlloc := NewCircularBuffer; +end; + +procedure CircbufFree( pBuffer: PCircularBuffer ); +begin + if (pBuffer <> Nil) then + begin + GlobalSharedLockedFree(pBuffer^.BufferHandle, pBuffer^.pStart); + GlobalSharedLockedFree(pBuffer^.RecordHandle, pBuffer); + end; +end; + +{ Reads first event in queue without removing it. + Returns true if successful, False if no events in queue } +function CircbufReadEvent( PBuffer: PCircularBuffer; PEvent: PMidiBufferItem ): Boolean; +var + PCurrentEvent: PMidiBufferItem; +begin + if (PBuffer^.EventCount <= 0) then + CircbufReadEvent := False + else + begin + PCurrentEvent := PBuffer^.PNextget; + + { Copy the object from the "tail" of the buffer to the caller's object } + PEvent^.Timestamp := PCurrentEvent^.Timestamp; + PEvent^.Data := PCurrentEvent^.Data; + PEvent^.Sysex := PCurrentEvent^.Sysex; + CircbufReadEvent := True; + end; +end; + +{ Remove current event from the queue } +function CircbufRemoveEvent(PBuffer: PCircularBuffer): Boolean; +begin + if (PBuffer^.EventCount > 0) then + begin + Dec( Pbuffer^.EventCount); + + { Advance the buffer pointer, with wrap } + Inc( Pbuffer^.PNextGet ); + If (PBuffer^.PNextGet = PBuffer^.PEnd) then + PBuffer^.PNextGet := PBuffer^.PStart; + + CircbufRemoveEvent := True; + end + else + CircbufRemoveEvent := False; +end; + +end. diff --git a/lib/midicom3/DELPHMCB.PAS b/lib/midicom3/DELPHMCB.PAS new file mode 100644 index 00000000..23ce0e1a --- /dev/null +++ b/lib/midicom3/DELPHMCB.PAS @@ -0,0 +1,140 @@ +{ $Header: /MidiComp/DELPHMCB.PAS 2 10/06/97 7:33 Davec $ } + +{MIDI callback for Delphi, was DLL for Delphi 1} + +unit Delphmcb; + +{ These segment options required for the MIDI callback functions } +{$C PRELOAD FIXED PERMANENT} + +interface + +uses WinProcs, WinTypes, MMsystem, Circbuf, MidiDefs, MidiCons; + +{$IFDEF WIN32} +procedure midiHandler( + hMidiIn: HMidiIn; + wMsg: UINT; + dwInstance: DWORD; + dwParam1: DWORD; + dwParam2: DWORD); stdcall export; +function CircbufPutEvent(PBuffer: PCircularBuffer; PTheEvent: PMidiBufferItem): Boolean; stdcall; export; +{$ELSE} +procedure midiHandler( + hMidiIn: HMidiIn; + wMsg: Word; + dwInstance: DWORD; + dwParam1: DWORD; + dwParam2: DWORD); export; +function CircbufPutEvent(PBuffer: PCircularBuffer; PTheEvent: PMidiBufferItem): Boolean; export; +{$ENDIF} + +implementation + +{ Add an event to the circular input buffer. } +function CircbufPutEvent(PBuffer: PCircularBuffer; PTheEvent: PMidiBufferItem): Boolean; +begin + If (PBuffer^.EventCount < PBuffer^.Capacity) Then + begin + Inc(Pbuffer^.EventCount); + + { Todo: better way of copying this record } + with PBuffer^.PNextput^ do + begin + Timestamp := PTheEvent^.Timestamp; + Data := PTheEvent^.Data; + Sysex := PTheEvent^.Sysex; + end; + + { Move to next put location, with wrap } + Inc(Pbuffer^.PNextPut); + If (PBuffer^.PNextPut = PBuffer^.PEnd) then + PBuffer^.PNextPut := PBuffer^.PStart; + + CircbufPutEvent := True; + end + else + CircbufPutEvent := False; +end; + +{ This is the callback function specified when the MIDI device was opened + by midiInOpen. It's called at interrupt time when MIDI input is seen + by the MIDI device driver(s). See the docs for midiInOpen for restrictions + on the Windows functions that can be called in this interrupt. } +procedure midiHandler( + hMidiIn: HMidiIn; + wMsg: UINT; + dwInstance: DWORD; + dwParam1: DWORD; + dwParam2: DWORD); + +var + thisEvent: TMidiBufferItem; + thisCtlInfo: PMidiCtlInfo; + thisBuffer: PCircularBuffer; + +Begin + case wMsg of + + mim_Open: {nothing}; + + mim_Error: {TODO: handle (message to trigger exception?) }; + + mim_Data, mim_Longdata, mim_Longerror: + { Note: mim_Longerror included because there's a bug in the Maui + input driver that sends MIM_LONGERROR for subsequent buffers when + the input buffer is smaller than the sysex block being received } + + begin + { TODO: Make filtered messages customisable, I'm sure someone wants to + do something with MTC! } + if (dwParam1 <> MIDI_ACTIVESENSING) and + (dwParam1 <> MIDI_TIMINGCLOCK) then + begin + + { The device driver passes us the instance data pointer we + specified for midiInOpen. Use this to get the buffer address + and window handle for the MIDI control } + thisCtlInfo := PMidiCtlInfo(dwInstance); + thisBuffer := thisCtlInfo^.PBuffer; + + { Screen out short messages if we've been asked to } + if ((wMsg <> mim_Data) or (thisCtlInfo^.SysexOnly = False)) + and (thisCtlInfo <> Nil) and (thisBuffer <> Nil) then + begin + with thisEvent do + begin + timestamp := dwParam2; + if (wMsg = mim_Longdata) or + (wMsg = mim_Longerror) then + begin + data := 0; + sysex := PMidiHdr(dwParam1); + end + else + begin + data := dwParam1; + sysex := Nil; + end; + end; + if CircbufPutEvent( thisBuffer, @thisEvent ) then + { Send a message to the control to say input's arrived } + PostMessage(thisCtlInfo^.hWindow, mim_Data, 0, 0) + else + { Buffer overflow } + PostMessage(thisCtlInfo^.hWindow, mim_Overflow, 0, 0); + end; + end; + end; + + mom_Done: { Sysex output complete, dwParam1 is pointer to MIDIHDR } + begin + { Notify the control that its sysex output is finished. + The control should call midiOutUnprepareHeader before freeing the buffer } + PostMessage(PMidiCtlInfo(dwInstance)^.hWindow, mom_Done, 0, dwParam1); + end; + + end; { Case } +end; + +end. diff --git a/lib/midicom3/MIDICOMP.DPK b/lib/midicom3/MIDICOMP.DPK new file mode 100644 index 00000000..aecdf772 --- /dev/null +++ b/lib/midicom3/MIDICOMP.DPK @@ -0,0 +1,38 @@ +package midicomp; + +{$R *.RES} +{$R 'Midiin.dcr'} +{$R 'MidiOut.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESCRIPTION 'MIDI Components'} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + Midiin, + MidiOut; + +end. diff --git a/lib/midicom3/MIDICOMP.DPL b/lib/midicom3/MIDICOMP.DPL new file mode 100644 index 00000000..8cad90bd Binary files /dev/null and b/lib/midicom3/MIDICOMP.DPL differ diff --git a/lib/midicom3/MIDICONS.PAS b/lib/midicom3/MIDICONS.PAS new file mode 100644 index 00000000..71e4511b --- /dev/null +++ b/lib/midicom3/MIDICONS.PAS @@ -0,0 +1,42 @@ +{ $Header: /MidiComp/MIDICONS.PAS 2 10/06/97 7:33 Davec $ } + +{ Written by David Churcher , + released to the public domain. } + + +{ MIDI Constants } +unit Midicons; + +interface + +uses Messages; + +const + MIDI_ALLNOTESOFF = $7B; + MIDI_NOTEON = $90; + MIDI_NOTEOFF = $80; + MIDI_KEYAFTERTOUCH = $a0; + MIDI_CONTROLCHANGE = $b0; + MIDI_PROGRAMCHANGE = $c0; + MIDI_CHANAFTERTOUCH = $d0; + MIDI_PITCHBEND = $e0; + MIDI_SYSTEMMESSAGE = $f0; + MIDI_BEGINSYSEX = $f0; + MIDI_MTCQUARTERFRAME = $f1; + MIDI_SONGPOSPTR = $f2; + MIDI_SONGSELECT = $f3; + MIDI_ENDSYSEX = $F7; + MIDI_TIMINGCLOCK = $F8; + MIDI_START = $FA; + MIDI_CONTINUE = $FB; + MIDI_STOP = $FC; + MIDI_ACTIVESENSING = $FE; + MIDI_SYSTEMRESET = $FF; + + MIM_OVERFLOW = WM_USER; { Input buffer overflow } + MOM_PLAYBACK_DONE = WM_USER+1; { Timed playback complete } + + +implementation + +end. diff --git a/lib/midicom3/MIDIDEFS.PAS b/lib/midicom3/MIDIDEFS.PAS new file mode 100644 index 00000000..4024c547 --- /dev/null +++ b/lib/midicom3/MIDIDEFS.PAS @@ -0,0 +1,47 @@ +{ $Header: /MidiComp/MIDIDEFS.PAS 2 10/06/97 7:33 Davec $ } + +{ Written by David Churcher , + released to the public domain. } + + +{ Common definitions used by DELPHMID.DPR and the MIDI components. + This must be a separate unit to prevent large chunks of the VCL being + linked into the DLL. } +unit Mididefs; + +interface + +uses WinProcs, WinTypes, MMsystem, Circbuf; + +type + + {-------------------------------------------------------------------} + { This is the information about the control that must be accessed by + the MIDI input callback function in the DLL at interrupt time } + PMidiCtlInfo = ^TMidiCtlInfo; + TMidiCtlInfo = record + hMem: THandle; { Memory handle for this record } + PBuffer: PCircularBuffer; { Pointer to the MIDI input data buffer } + hWindow: HWnd; { Control's window handle } + SysexOnly: Boolean; { Only process System Exclusive input } + end; + + { Information for the output timer callback function, also required at + interrupt time. } + PMidiOutTimerInfo = ^TMidiOutTimerInfo; + TMidiOutTimerInfo = record + hMem: THandle; { Memory handle for this record } + PBuffer: PCircularBuffer; { Pointer to MIDI output data buffer } + hWindow: HWnd; { Control's window handle } + TimeToNextEvent: DWORD; { Delay to next event after timer set } + MIDIHandle: HMidiOut; { MIDI handle to send output to + (copy of component's FMidiHandle property) } + PeriodMin: Word; { Multimedia timer minimum period supported } + PeriodMax: Word; { Multimedia timer maximum period supported } + TimerId: Word; { Multimedia timer ID of current event } + end; + +implementation + + +end. diff --git a/lib/midicom3/MIDIIN.DCR b/lib/midicom3/MIDIIN.DCR new file mode 100644 index 00000000..5d802695 Binary files /dev/null and b/lib/midicom3/MIDIIN.DCR differ diff --git a/lib/midicom3/MIDIIN.PAS b/lib/midicom3/MIDIIN.PAS new file mode 100644 index 00000000..87aa4e59 --- /dev/null +++ b/lib/midicom3/MIDIIN.PAS @@ -0,0 +1,689 @@ +{ $Header: /MidiComp/Midiin.pas 2 10/06/97 7:33 Davec $ } + +{ Written by David Churcher , + released to the public domain. } + +unit MidiIn; + +{ + Properties: + DeviceID: Windows numeric device ID for the MIDI input device. + Between 0 and NumDevs-1. + Read-only while device is open, exception when changed while open + + MIDIHandle: The input handle to the MIDI device. + 0 when device is not open + Read-only, runtime-only + + MessageCount: Number of input messages waiting in input buffer + + Capacity: Number of messages input buffer can hold + Defaults to 1024 + Limited to (64K/event size) + Read-only when device is open (exception when changed while open) + + SysexBufferSize: Size in bytes of each sysex buffer + Defaults to 10K + Minimum 0K (no buffers), Maximum 64K-1 + + SysexBufferCount: Number of sysex buffers + Defaults to 16 + Minimum 0 (no buffers), Maximum (avail mem/SysexBufferSize) + Check where these buffers are allocated? + + SysexOnly: True to ignore all non-sysex input events. May be changed while + device is open. Handy for patch editors where you have lots of short MIDI + events on the wire which you are always going to ignore anyway. + + DriverVersion: Version number of MIDI device driver. High-order byte is + major version, low-order byte is minor version. + + ProductName: Name of product (e.g. 'MPU 401 In') + + MID and PID: Manufacturer ID and Product ID, see + "Manufacturer and Product IDs" in MMSYSTEM.HLP for list of possible values. + + Methods: + GetMidiEvent: Read Midi event at the head of the FIFO input buffer. + Returns a TMyMidiEvent object containing MIDI message data, timestamp, + and sysex data if applicable. + This method automatically removes the event from the input buffer. + It makes a copy of the received sysex buffer and puts the buffer back + on the input device. + The TMyMidiEvent object must be freed by calling MyMidiEvent.Free. + + Open: Opens device. Note no input will appear until you call the Start + method. + + Close: Closes device. Any pending system exclusive output will be cancelled. + + Start: Starts receiving MIDI input. + + Stop: Stops receiving MIDI input. + + Events: + OnMidiInput: Called when MIDI input data arrives. Use the GetMidiEvent to + get the MIDI input data. + + OnOverflow: Called if the MIDI input buffer overflows. The caller must + clear the buffer before any more MIDI input can be received. + + Notes: + Buffering: Uses a circular buffer, separate pointers for next location + to fill and next location to empty because a MIDI input interrupt may + be adding data to the buffer while the buffer is being read. Buffer + pointers wrap around from end to start of buffer automatically. If + buffer overflows then the OnBufferOverflow event is triggered and no + further input will be received until the buffer is emptied by calls + to GetMidiEvent. + + Sysex buffers: There are (SysexBufferCount) buffers on the input device. + When sysex events arrive these buffers are removed from the input device and + added to the circular buffer by the interrupt handler in the DLL. When the sysex events + are removed from the circular buffer by the GetMidiEvent method the buffers are + put back on the input. If all the buffers are used up there will be no + more sysex input until at least one sysex event is removed from the input buffer. + In other words if you're expecting lots of sysex input you need to set the + SysexBufferCount property high enough so that you won't run out of + input buffers before you get a chance to read them with GetMidiEvent. + + If the synth sends a block of sysex that's longer than SysexBufferSize it + will be received as separate events. + TODO: Component derived from this one that handles >64K sysex blocks cleanly + and can stream them to disk. + + Midi Time Code (MTC) and Active Sensing: The DLL is currently hardcoded + to filter these short events out, so that we don't spend all our time + processing them. + TODO: implement a filter property to select the events that will be filtered + out. +} + +interface + +uses + Classes, SysUtils, WinTypes, Messages, WinProcs, MMSystem, MidiDefs, MidiType, + MidiCons, Circbuf, Delphmcb; + +type + MidiInputState = (misOpen, misClosed, misCreating, misDestroying); + EMidiInputError = class(Exception); + + {-------------------------------------------------------------------} + TMidiInput = class(TComponent) + private + Handle: THandle; { Window handle used for callback notification } + FDeviceID: Word; { MIDI device ID } + FMIDIHandle: HMIDIIn; { Handle to input device } + FState: MidiInputState; { Current device state } + + FError: Word; + FSysexOnly: Boolean; + + { Stuff from MIDIINCAPS } + FDriverVersion: Version; + FProductName: string; + FMID: Word; { Manufacturer ID } + FPID: Word; { Product ID } + + { Queue } + FCapacity: Word; { Buffer capacity } + PBuffer: PCircularBuffer; { Low-level MIDI input buffer created by Open method } + FNumdevs: Word; { Number of input devices on system } + + { Events } + FOnMIDIInput: TNotifyEvent; { MIDI Input arrived } + FOnOverflow: TNotifyEvent; { Input buffer overflow } + { TODO: Some sort of error handling event for MIM_ERROR } + + { Sysex } + FSysexBufferSize: Word; + FSysexBufferCount: Word; + MidiHdrs: Tlist; + + PCtlInfo: PMidiCtlInfo; { Pointer to control info for DLL } + + protected + procedure Prepareheaders; + procedure UnprepareHeaders; + procedure AddBuffers; + procedure SetDeviceID(DeviceID: Word); + procedure SetProductName( NewProductName: String ); + function GetEventCount: Word; + procedure SetSysexBufferSize(BufferSize: Word); + procedure SetSysexBufferCount(BufferCount: Word); + procedure SetSysexOnly(bSysexOnly: Boolean); + function MidiInErrorString( WError: Word ): String; + + public + constructor Create(AOwner:TComponent); override; + destructor Destroy; override; + + property MIDIHandle: HMIDIIn read FMIDIHandle; + + property DriverVersion: Version read FDriverVersion; + property MID: Word read FMID; { Manufacturer ID } + property PID: Word read FPID; { Product ID } + + property Numdevs: Word read FNumdevs; + + property MessageCount: Word read GetEventCount; + { TODO: property to select which incoming messages get filtered out } + + procedure Open; + procedure Close; + procedure Start; + procedure Stop; + { Get first message in input queue } + function GetMidiEvent: TMyMidiEvent; + procedure MidiInput(var Message: TMessage); + + { Some functions to decode and classify incoming messages would be good } + + published + + { TODO: Property editor with dropdown list of product names } + property ProductName: String read FProductName write SetProductName; + + property DeviceID: Word read FDeviceID write SetDeviceID default 0; + property Capacity: Word read FCapacity write FCapacity default 1024; + property Error: Word read FError; + property SysexBufferSize: Word + read FSysexBufferSize + write SetSysexBufferSize + default 10000; + property SysexBufferCount: Word + read FSysexBufferCount + write SetSysexBufferCount + default 16; + property SysexOnly: Boolean + read FSysexOnly + write SetSysexOnly + default False; + + { Events } + property OnMidiInput: TNotifyEvent read FOnMidiInput write FOnMidiInput; + property OnOverflow: TNotifyEvent read FOnOverflow write FOnOverflow; + +end; + +procedure Register; + +{====================================================================} +implementation + +Uses Graphics, Controls, Forms, Dialogs; + +(* Not used in Delphi 3 +{ This is the callback procedure in the external DLL. + It's used when midiInOpen is called by the Open method. + There are special requirements and restrictions for this callback + procedure (see midiInOpen in MMSYSTEM.HLP) so it's impractical to + make it an object method } +{$IFDEF WIN32} +function midiHandler( + hMidiIn: HMidiIn; + wMsg: UINT; + dwInstance: DWORD; + dwParam1: DWORD; + dwParam2: DWORD): Boolean; stdcall; external 'DELMID32.DLL'; +{$ELSE} +procedure midiHandler( + hMidiIn: HMidiIn; + wMsg: Word; + dwInstance: DWORD; + dwParam1: DWORD; + dwParam2: DWORD); far; external 'DELPHMID'; +{$ENDIF} +*) +{-------------------------------------------------------------------} +constructor TMidiInput.Create(AOwner:TComponent); +begin + inherited Create(AOwner); + FState := misCreating; + + FSysexOnly := False; + FNumDevs := midiInGetNumDevs; + MidiHdrs := Nil; + + { Set defaults } + SetDeviceID(0); + FCapacity := 1024; + FSysexBufferSize := 4096; + FSysexBufferCount := 16; + + { Create the window for callback notification } + if not (csDesigning in ComponentState) then + begin + Handle := AllocateHwnd(MidiInput); + end; + + FState := misClosed; + +end; + +{-------------------------------------------------------------------} +{ Close the device if it's open } +destructor TMidiInput.Destroy; +begin + if (FMidiHandle <> 0) then + begin + Close; + FMidiHandle := 0; + end; + + if (PCtlInfo <> Nil) then + GlobalSharedLockedFree( PCtlinfo^.hMem, PCtlInfo ); + + DeallocateHwnd(Handle); + inherited Destroy; +end; + +{-------------------------------------------------------------------} +{ Convert the numeric return code from an MMSYSTEM function to a string + using midiInGetErrorText. TODO: These errors aren't very helpful + (e.g. "an invalid parameter was passed to a system function") so + sort out some proper error strings. } +function TMidiInput.MidiInErrorString( WError: Word ): String; +var + errorDesc: PChar; +begin + errorDesc := Nil; + try + errorDesc := StrAlloc(MAXERRORLENGTH); + if midiInGetErrorText(WError, errorDesc, MAXERRORLENGTH) = 0 then + result := StrPas(errorDesc) + else + result := 'Specified error number is out of range'; + finally + if errorDesc <> Nil then StrDispose(errorDesc); + end; +end; + +{-------------------------------------------------------------------} +{ Set the sysex buffer size, fail if device is already open } +procedure TMidiInput.SetSysexBufferSize(BufferSize: Word); +begin + if FState = misOpen then + raise EMidiInputError.Create('Change to SysexBufferSize while device was open') + else + { TODO: Validate the sysex buffer size. Is this necessary for WIN32? } + FSysexBufferSize := BufferSize; +end; + +{-------------------------------------------------------------------} +{ Set the sysex buffer count, fail if device is already open } +procedure TMidiInput.SetSysexBuffercount(Buffercount: Word); +begin + if FState = misOpen then + raise EMidiInputError.Create('Change to SysexBuffercount while device was open') + else + { TODO: Validate the sysex buffer count } + FSysexBuffercount := Buffercount; +end; + +{-------------------------------------------------------------------} +{ Set the Sysex Only flag to eliminate unwanted short MIDI input messages } +procedure TMidiInput.SetSysexOnly(bSysexOnly: Boolean); +begin + FSysexOnly := bSysexOnly; + { Update the interrupt handler's copy of this property } + if PCtlInfo <> Nil then + PCtlInfo^.SysexOnly := bSysexOnly; +end; + +{-------------------------------------------------------------------} +{ Set the Device ID to select a new MIDI input device + Note: If no MIDI devices are installed, throws an 'Invalid Device ID' exception } +procedure TMidiInput.SetDeviceID(DeviceID: Word); +var + MidiInCaps: TMidiInCaps; +begin + if FState = misOpen then + raise EMidiInputError.Create('Change to DeviceID while device was open') + else + if (DeviceID >= midiInGetNumDevs) then + raise EMidiInputError.Create('Invalid device ID') + else + begin + FDeviceID := DeviceID; + + { Set the name and other MIDIINCAPS properties to match the ID } + FError := + midiInGetDevCaps(DeviceID, @MidiInCaps, sizeof(TMidiInCaps)); + if Ferror <> MMSYSERR_NOERROR then + raise EMidiInputError.Create(MidiInErrorString(FError)); + + FProductName := StrPas(MidiInCaps.szPname); + FDriverVersion := MidiInCaps.vDriverVersion; + FMID := MidiInCaps.wMID; + FPID := MidiInCaps.wPID; + + end; +end; + +{-------------------------------------------------------------------} +{ Set the product name and put the matching input device number in FDeviceID. + This is handy if you want to save a configured input/output device + by device name instead of device number, because device numbers may + change if users add or remove MIDI devices. + Exception if input device with matching name not found, + or if input device is open } +procedure TMidiInput.SetProductName( NewProductName: String ); +var + MidiInCaps: TMidiInCaps; + testDeviceID: Word; + testProductName: String; +begin + if FState = misOpen then + raise EMidiInputError.Create('Change to ProductName while device was open') + else + { Don't set the name if the component is reading properties because + the saved Productname will be from the machine the application was compiled + on, which may not be the same for the corresponding DeviceID on the user's + machine. The FProductname property will still be set by SetDeviceID } + if not (csLoading in ComponentState) then + begin + begin + for testDeviceID := 0 To (midiInGetNumDevs-1) do + begin + FError := + midiInGetDevCaps(testDeviceID, @MidiInCaps, sizeof(TMidiInCaps)); + if Ferror <> MMSYSERR_NOERROR then + raise EMidiInputError.Create(MidiInErrorString(FError)); + testProductName := StrPas(MidiInCaps.szPname); + if testProductName = NewProductName then + begin + FProductName := NewProductName; + Break; + end; + end; + if FProductName <> NewProductName then + raise EMidiInputError.Create('MIDI Input Device ' + + NewProductName + ' not installed ') + else + SetDeviceID(testDeviceID); + end; + end; +end; + + +{-------------------------------------------------------------------} +{ Get the sysex buffers ready } +procedure TMidiInput.PrepareHeaders; +var + ctr: Word; + MyMidiHdr: TMyMidiHdr; +begin + if (FSysexBufferCount > 0) And (FSysexBufferSize > 0) + And (FMidiHandle <> 0) then + begin + Midihdrs := TList.Create; + for ctr := 1 to FSysexBufferCount do + begin + { Initialize the header and allocate buffer memory } + MyMidiHdr := TMyMidiHdr.Create(FSysexBufferSize); + + { Store the address of the MyMidiHdr object in the contained MIDIHDR + structure so we can get back to the object when a pointer to the + MIDIHDR is received. + E.g. see TMidiOutput.Output method } + MyMidiHdr.hdrPointer^.dwUser := DWORD(MyMidiHdr); + + { Get MMSYSTEM's blessing for this header } + FError := midiInPrepareHeader(FMidiHandle,MyMidiHdr.hdrPointer, + sizeof(TMIDIHDR)); + if Ferror <> MMSYSERR_NOERROR then + raise EMidiInputError.Create(MidiInErrorString(FError)); + + { Save it in our list } + MidiHdrs.Add(MyMidiHdr); + end; + end; + +end; + +{-------------------------------------------------------------------} +{ Clean up from PrepareHeaders } +procedure TMidiInput.UnprepareHeaders; +var + ctr: Word; +begin + if (MidiHdrs<> Nil) then { will be Nil if 0 sysex buffers } + begin + for ctr := 0 To MidiHdrs.Count-1 do + begin + FError := midiInUnprepareHeader( FMidiHandle, + TMyMidiHdr(MidiHdrs.Items[ctr]).hdrPointer, + sizeof(TMIDIHDR)); + if Ferror <> MMSYSERR_NOERROR then + raise EMidiInputError.Create(MidiInErrorString(FError)); + TMyMidiHdr(MidiHdrs.Items[ctr]).Free; + end; + MidiHdrs.Free; + MidiHdrs := Nil; + end; +end; + +{-------------------------------------------------------------------} +{ Add sysex buffers, if required, to input device } +procedure TMidiInput.AddBuffers; +var + ctr: Word; +begin + if MidiHdrs <> Nil then { will be Nil if 0 sysex buffers } + begin + if MidiHdrs.Count > 0 Then + begin + for ctr := 0 To MidiHdrs.Count-1 do + begin + FError := midiInAddBuffer(FMidiHandle, + TMyMidiHdr(MidiHdrs.Items[ctr]).hdrPointer, + sizeof(TMIDIHDR)); + If FError <> MMSYSERR_NOERROR then + raise EMidiInputError.Create(MidiInErrorString(FError)); + end; + end; + end; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.Open; +var + hMem: THandle; +begin + try + { Create the buffer for the MIDI input messages } + If (PBuffer = Nil) then + PBuffer := CircBufAlloc( FCapacity ); + + { Create the control info for the DLL } + if (PCtlInfo = Nil) then + begin + PCtlInfo := GlobalSharedLockedAlloc( Sizeof(TMidiCtlInfo), hMem ); + PctlInfo^.hMem := hMem; + end; + PctlInfo^.pBuffer := PBuffer; + Pctlinfo^.hWindow := Handle; { Control's window handle } + PCtlInfo^.SysexOnly := FSysexOnly; + FError := midiInOpen(@FMidiHandle, FDeviceId, + DWORD(@midiHandler), + DWORD(PCtlInfo), + CALLBACK_FUNCTION); + + If (FError <> MMSYSERR_NOERROR) then + { TODO: use CreateFmtHelp to add MIDI device name/ID to message } + raise EMidiInputError.Create(MidiInErrorString(FError)); + + { Get sysex buffers ready } + PrepareHeaders; + + { Add them to the input } + AddBuffers; + + FState := misOpen; + + except + if PBuffer <> Nil then + begin + CircBufFree(PBuffer); + PBuffer := Nil; + end; + + if PCtlInfo <> Nil then + begin + GlobalSharedLockedFree(PCtlInfo^.hMem, PCtlInfo); + PCtlInfo := Nil; + end; + + end; + +end; + +{-------------------------------------------------------------------} +function TMidiInput.GetMidiEvent: TMyMidiEvent; +var + thisItem: TMidiBufferItem; +begin + if (FState = misOpen) and + CircBufReadEvent(PBuffer, @thisItem) then + begin + Result := TMyMidiEvent.Create; + with thisItem Do + begin + Result.Time := Timestamp; + if (Sysex = Nil) then + begin + { Short message } + Result.MidiMessage := LoByte(LoWord(Data)); + Result.Data1 := HiByte(LoWord(Data)); + Result.Data2 := LoByte(HiWord(Data)); + Result.Sysex := Nil; + Result.SysexLength := 0; + end + else + { Long Sysex message } + begin + Result.MidiMessage := MIDI_BEGINSYSEX; + Result.Data1 := 0; + Result.Data2 := 0; + Result.SysexLength := Sysex^.dwBytesRecorded; + if Sysex^.dwBytesRecorded <> 0 then + begin + { Put a copy of the sysex buffer in the object } + GetMem(Result.Sysex, Sysex^.dwBytesRecorded); + StrMove(Result.Sysex, Sysex^.lpData, Sysex^.dwBytesRecorded); + end; + + { Put the header back on the input buffer } + FError := midiInPrepareHeader(FMidiHandle,Sysex, + sizeof(TMIDIHDR)); + If Ferror = 0 then + FError := midiInAddBuffer(FMidiHandle, + Sysex, sizeof(TMIDIHDR)); + if Ferror <> MMSYSERR_NOERROR then + raise EMidiInputError.Create(MidiInErrorString(FError)); + end; + end; + CircbufRemoveEvent(PBuffer); + end + else + { Device isn't open, return a nil event } + Result := Nil; +end; + +{-------------------------------------------------------------------} +function TMidiInput.GetEventCount: Word; +begin + if FState = misOpen then + Result := PBuffer^.EventCount + else + Result := 0; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.Close; +begin + if FState = misOpen then + begin + FState := misClosed; + + { MidiInReset cancels any pending output. + Note that midiInReset causes an MIM_LONGDATA callback for each sysex + buffer on the input, so the callback function and Midi input buffer + should still be viable at this stage. + All the resulting MIM_LONGDATA callbacks will be completed by the time + MidiInReset returns, though. } + FError := MidiInReset(FMidiHandle); + if Ferror <> MMSYSERR_NOERROR then + raise EMidiInputError.Create(MidiInErrorString(FError)); + + { Remove sysex buffers from input device and free them } + UnPrepareHeaders; + + { Close the device (finally!) } + FError := MidiInClose(FMidiHandle); + if Ferror <> MMSYSERR_NOERROR then + raise EMidiInputError.Create(MidiInErrorString(FError)); + + FMidiHandle := 0; + + If (PBuffer <> Nil) then + begin + CircBufFree( PBuffer ); + PBuffer := Nil; + end; + end; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.Start; +begin + if FState = misOpen then + begin + FError := MidiInStart(FMidiHandle); + if Ferror <> MMSYSERR_NOERROR then + raise EMidiInputError.Create(MidiInErrorString(FError)); + end; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.Stop; +begin + if FState = misOpen then + begin + FError := MidiInStop(FMidiHandle); + if Ferror <> MMSYSERR_NOERROR then + raise EMidiInputError.Create(MidiInErrorString(FError)); + end; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.MidiInput( var Message: TMessage ); +{ Triggered by incoming message from DLL. + Note DLL has already put the message in the queue } +begin + case Message.Msg of + mim_data: + { Trigger the user's MIDI input event, if they've specified one and + we're not in the process of closing the device. The check for + GetEventCount > 0 prevents unnecessary event calls where the user has + already cleared all the events from the input buffer using a GetMidiEvent + loop in the OnMidiInput event handler } + if Assigned(FOnMIDIInput) and (FState = misOpen) + and (GetEventCount > 0) then + FOnMIDIInput(Self); + + mim_Overflow: { input circular buffer overflow } + if Assigned(FOnOverflow) and (FState = misOpen) then + FOnOverflow(Self); + end; +end; + +{-------------------------------------------------------------------} +procedure Register; +begin + RegisterComponents('Samples', [TMIDIInput]); +end; + +end. diff --git a/lib/midicom3/MIDIMON.DPR b/lib/midicom3/MIDIMON.DPR new file mode 100644 index 00000000..b038ccb9 --- /dev/null +++ b/lib/midicom3/MIDIMON.DPR @@ -0,0 +1,18 @@ +{ $Header: G:/delphi/midi/vcs/midimon.dpr 1.2 30 Apr 1996 19:05:38 DAVEC $ } + +{ Written by David Churcher , + released to the public domain. } + +program Midimon; + +uses + Forms, + Midimonp in 'MIDIMONP.PAS' {Form1}, + Monprocs in 'MONPROCS.PAS'; + +{$R *.RES} + +begin + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/midicom3/MIDIMON.RES b/lib/midicom3/MIDIMON.RES new file mode 100644 index 00000000..78fd1996 Binary files /dev/null and b/lib/midicom3/MIDIMON.RES differ diff --git a/lib/midicom3/MIDIMONP.DFM b/lib/midicom3/MIDIMONP.DFM new file mode 100644 index 00000000..b8d071ba Binary files /dev/null and b/lib/midicom3/MIDIMONP.DFM differ diff --git a/lib/midicom3/MIDIMONP.PAS b/lib/midicom3/MIDIMONP.PAS new file mode 100644 index 00000000..c420fe7c --- /dev/null +++ b/lib/midicom3/MIDIMONP.PAS @@ -0,0 +1,184 @@ +{ $Header: /MidiComp/MIDIMONP.PAS 2 10/06/97 7:33 Davec $ } + +{ This demo shows how MidiInput and MidiOutput components can be used + interactively at design time on a form. + The monitor has one TMidiInput control whose device ID is set interactively + at runtime using a combo box. + Anything received on the input device, including sysex data, is displayed by + the monitor and echoed to the selected output device. } + +unit Midimonp; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, MMSystem, StdCtrls, MIDIIn, MidiOut, ExtCtrls, + Menus, monprocs, MidiType; + +type + TForm1 = class(TForm) + MIDIInput1: TMIDIInput; + lstLog: TListBox; + pnlColumnHeading: TPanel; + MidiOutput1: TMidiOutput; + MainMenu1: TMainMenu; + File1: TMenuItem; + mnuExit: TMenuItem; + Label1: TLabel; + cmbInput: TComboBox; + cmbOutput: TComboBox; + Bevel1: TBevel; + procedure MIDIInput1MidiInput(Sender: TObject); + procedure LogMessage(ThisEvent:TMyMidiEvent); + procedure FormCreate(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure mnuExitClick(Sender: TObject); + procedure cmbInputChange(Sender: TObject); + procedure OpenDevs; + procedure CloseDevs; + private + logItemMax: Integer; + public + { Public declarations } + end; + +var + Form1: TForm1; + inh: HMidiIn; + +implementation + +{$R *.DFM} + + +procedure TForm1.LogMessage(ThisEvent:TMyMidiEvent); +{ Logging MIDI messages with a Windows list box is rather slow and ugly, + but it makes the example very simple. If you need a faster and less + flickery log you could port the rest of Microsoft's MIDIMON.C example. } +begin + if logItemMax > 0 then + begin + With lstLog.Items do + begin + if Count >= logItemMax then + Delete(0); + Add(MonitorMessageText(ThisEvent)); + end; + end; +end; + +procedure TForm1.MIDIInput1MidiInput(Sender: TObject); +var + thisEvent: TMyMidiEvent; +begin + with (Sender As TMidiInput) do + begin + while (MessageCount > 0) do + begin + + { Get the event as an object } + thisEvent := GetMidiEvent; + + { Log it } + LogMessage(thisEvent); + + { Echo to the output device } + MidiOutput1.PutMidiEvent(thisEvent); + + { Event was dynamically created by GetMyMidiEvent so must + free it here } + thisEvent.Free; + + end; + end; +end; + +procedure TForm1.OpenDevs; +begin + { Use selected devices } + MidiInput1.ProductName := cmbInput.Text; + MidiOutput1.ProductName := cmbOutput.Text; + { Open devices } + MidiInput1.Open; + MidiInput1.Start; + MidiOutput1.Open; +end; + +procedure TForm1.CloseDevs; +begin + MidiInput1.Close; + MidiOutput1.Close; +end; + + +procedure TForm1.FormCreate(Sender: TObject); +var + thisDevice: Word; +begin + Cursor := crHourglass; + + { Load the lists of installed MIDI devices } + cmbInput.Clear; + for thisDevice := 0 To MidiInput1.NumDevs - 1 do + begin + MidiInput1.DeviceID := thisDevice; + cmbInput.Items.Add(MidiInput1.ProductName); + end; + cmbInput.ItemIndex := 0; + cmbOutput.Clear; + for thisDevice := 0 To MidiOutput1.NumDevs - 1 do + begin + MidiOutput1.DeviceID := thisDevice; + cmbOutput.Items.Add(MidiOutput1.ProductName); + end; + cmbOutput.ItemIndex := 0; + OpenDevs; + + Cursor := crDefault; +end; + +procedure TForm1.FormResize(Sender: TObject); +const + logMargin = 8; +begin + { Set maximum items that can be stored in the list box without scrolling } + if lstLog.ItemHeight > 0 then + begin + logItemMax := (lstLog.Height div lstLog.ItemHeight)-1; + { If there are currently more items than the max, remove them + otherwise the list will have scrollbars when resized } + with lstLog.Items do + begin + while (Count >= logItemMax) and (Count > 0) do + Delete(0); + end; + end + else + logItemMax := 0; +end; + +procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); +begin + { This is not strictly necessary since the objects close themselves + when the form containing them is destroyed } + CloseDevs; +end; + +procedure TForm1.mnuExitClick(Sender: TObject); +begin + Application.Terminate; +end; + + +procedure TForm1.cmbInputChange(Sender: TObject); +begin + { Close and reopen devices with changed device selection } + Cursor := crHourglass; + CloseDevs; + OpenDevs; + Cursor := crDefault; +end; + +end. diff --git a/lib/midicom3/MIDIOUT.DCR b/lib/midicom3/MIDIOUT.DCR new file mode 100644 index 00000000..d111c9be Binary files /dev/null and b/lib/midicom3/MIDIOUT.DCR differ diff --git a/lib/midicom3/MIDIOUT.PAS b/lib/midicom3/MIDIOUT.PAS new file mode 100644 index 00000000..ecf804c8 --- /dev/null +++ b/lib/midicom3/MIDIOUT.PAS @@ -0,0 +1,586 @@ +{ $Header: /MidiComp/MidiOut.pas 2 10/06/97 7:33 Davec $ } + +{ Written by David Churcher , + released to the public domain. } + +{ Thanks very much to Fred Kohler for the Technology code. } + +unit MidiOut; + +{ + MIDI Output component. + + Properties: + DeviceID: Windows numeric device ID for the MIDI output device. + Between 0 and (midioutGetNumDevs-1), or MIDI_MAPPER (-1). + Special value MIDI_MAPPER specifies output to the Windows MIDI mapper + Read-only while device is open, exception if changed while open + + MIDIHandle: The output handle to the MIDI device. + 0 when device is not open + Read-only, runtime-only + + ProductName: Name of the output device product that corresponds to the + DeviceID property (e.g. 'MPU 401 out'). + You can write to this while the device is closed to select a particular + output device by name (the DeviceID property will change to match). + Exception if this property is changed while the device is open. + + Numdevs: Number of MIDI output devices installed on the system. This + is the value returned by midiOutGetNumDevs. It's included for + completeness. + + Technology: Type of technology used by the MIDI device. You can set this + property to one of the values listed for OutportTech (below) and the component + will find an appropriate MIDI device. For example: + MidiOutput.Technology := opt_FMSynth; + will set MidiInput.DeviceID to the MIDI device ID of the FM synth, if one + is installed. If no such device is available an exception is raised, + see MidiOutput.SetTechnology. + + See the MIDIOUTCAPS entry in MMSYSTEM.HLP for descriptions of the + following properties: + DriverVersion + Voices + Notes + ChannelMask + Support + + Error: The error code for the last MMSYSTEM error. See the MMSYSERR_ + entries in MMSYSTEM.INT for possible values. + + Methods: + Open: Open MIDI device specified by DeviceID property for output + + Close: Close device + + PutMidiEvent(Event:TMyMidiEvent): Output a note or sysex message to the + device. This method takes a TMyMidiEvent object and transmits it. + Notes: + 1. If the object contains a sysex event the OnMidiOutput event will + be triggered when the sysex transmission is complete. + 2. You can queue up multiple blocks of system exclusive data for + transmission by chucking them at this method; they will be + transmitted as quickly as the device can manage. + 3. This method will not free the TMyMidiEvent object, the caller + must do that. Any sysex data in the TMyMidiEvent is copied before + transmission so you can free the TMyMidiEvent immediately after + calling PutMidiEvent, even if output has not yet finished. + + PutShort(MidiMessage: Byte; Data1: Byte; Data2: Byte): Output a short + MIDI message. Handy when you can't be bothered to build a TMyMidiEvent. + If the message you're sending doesn't use Data1 or Data2, set them to 0. + + PutLong(TheSysex: Pointer; msgLength: Word): Output sysex data. + SysexPointer: Pointer to sysex data to send + msgLength: Length of sysex data. + This is handy when you don't have a TMyMidiEvent. + + SetVolume(Left: Word, Right: Word): Set the volume of the + left and right channels on the output device (only on internal devices?). + 0xFFFF is maximum volume. If the device doesn't support separate + left/right volume control, the value of the Left parameter will be used. + Check the Support property to see whether the device supports volume + control. See also other notes on volume control under midiOutSetVolume() + in MMSYSTEM.HLP. + + Events: + OnMidiOutput: Procedure called when output of a system exclusive block + is completed. + + Notes: + I haven't implemented any methods for midiOutCachePatches and + midiOutCacheDrumpatches, mainly 'cause I don't have any way of testing + them. Does anyone really use these? +} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Controls, Forms, + MMSystem, Circbuf, MidiType, MidiDefs, Delphmcb; + +type + midioutputState = (mosOpen, mosClosed); + EmidioutputError = class(Exception); + + { These are the equivalent of constants prefixed with mod_ + as defined in MMSystem. See SetTechnology } + OutPortTech = ( + opt_None, { none } + opt_MidiPort, { output port } + opt_Synth, { generic internal synth } + opt_SQSynth, { square wave internal synth } + opt_FMSynth, { FM internal synth } + opt_Mapper); { MIDI mapper } + TechNameMap = array[OutPortTech] of string[18]; + + +const + TechName : TechNameMap = ( + 'None','MIDI Port','Generic Synth','Square Wave Synth', + 'FM Synth','MIDI Mapper'); + +{-------------------------------------------------------------------} +type + TMidiOutput = class(TComponent) + protected + Handle: THandle; { Window handle used for callback notification } + FDeviceID: Integer; { MIDI device ID } + FMIDIHandle: Hmidiout; { Handle to output device } + FState: midioutputState; { Current device state } + PCtlInfo: PMidiCtlInfo; { Pointer to control info for DLL } + + PBuffer: PCircularBuffer; { Output queue for PutTimedEvent, set by Open } + + FError: Word; { Last MMSYSTEM error } + + { Stuff from midioutCAPS } + FDriverVersion: Version; { Driver version from midioutGetDevCaps } + FProductName: string; { product name } + FTechnology: OutPortTech; { Type of MIDI output device } + FVoices: Word; { Number of voices (internal synth) } + FNotes: Word; { Number of notes (internal synth) } + FChannelMask: Word; { Bit set for each MIDI channels that the + device responds to (internal synth) } + FSupport: DWORD; { Technology supported (volume control, + patch caching etc. } + FNumdevs: Word; { Number of MIDI output devices on system } + + + FOnMIDIOutput: TNotifyEvent; { Sysex output finished } + + procedure MidiOutput(var Message: TMessage); + procedure SetDeviceID(DeviceID: Integer); + procedure SetProductName( NewProductName: String ); + procedure SetTechnology( NewTechnology : OutPortTech ); + function midioutErrorString( WError: Word ): String; + + public + { Properties } + property MIDIHandle: Hmidiout read FMIDIHandle; + property DriverVersion: Version { Driver version from midioutGetDevCaps } + read FDriverVersion; + property Technology: OutPortTech { Type of MIDI output device } + read FTechnology + write SetTechnology + default opt_Synth; + property Voices: Word { Number of voices (internal synth) } + read FVoices; + property Notes: Word { Number of notes (internal synth) } + read FNotes; + property ChannelMask: Word { Bit set for each MIDI channels that the } + read FChannelMask; { device responds to (internal synth) } + property Support: DWORD { Technology supported (volume control, } + read FSupport; { patch caching etc. } + property Error: Word read FError; + property Numdevs: Word read FNumdevs; + + { Methods } + function Open: Boolean; virtual; + function Close: Boolean; virtual; + procedure PutMidiEvent( theEvent: TMyMidiEvent); virtual; + procedure PutShort(MidiMessage: Byte; Data1: Byte; Data2: Byte); virtual; + procedure PutLong(TheSysex: Pointer; msgLength: Word); virtual; + procedure SetVolume( Left: Word; Right:Word ); + constructor Create(AOwner:TComponent); override; + destructor Destroy; override; + + { Some functions to decode and classify incoming messages would be nice } + + published + { TODO: Property editor with dropdown list of product names } + property ProductName: String read FProductName write SetProductName; + + property DeviceID: Integer read FDeviceID write SetDeviceID default 0; + { TODO: midiOutGetVolume? Or two properties for Left and Right volume? + Is it worth it?? + midiOutMessage?? Does anyone use this? } + + { Events } + property Onmidioutput: TNotifyEvent + read FOnmidioutput + write FOnmidioutput; +end; + +procedure Register; + +{-------------------------------------------------------------------} +implementation + +(* Not used in Delphi 3 + +{ This is the callback procedure in the external DLL. + It's used when midioutOpen is called by the Open method. + There are special requirements and restrictions for this callback + procedure (see midioutOpen in MMSYSTEM.HLP) so it's impractical to + make it an object method } +{$IFDEF WIN32} +function midiHandler( + hMidiIn: HMidiIn; + wMsg: UINT; + dwInstance: DWORD; + dwParam1: DWORD; + dwParam2: DWORD): Boolean; stdcall; external 'DELMID32.DLL'; +{$ELSE} +function midiHandler( + hMidiIn: HMidiIn; + wMsg: Word; + dwInstance: DWORD; + dwParam1: DWORD; + dwParam2: DWORD): Boolean; far; external 'DELPHMID.DLL'; +{$ENDIF} +*) + +{-------------------------------------------------------------------} +constructor Tmidioutput.Create(AOwner:TComponent); +begin + inherited Create(AOwner); + FState := mosClosed; + FNumdevs := midiOutGetNumDevs; + + { Create the window for callback notification } + if not (csDesigning in ComponentState) then + begin + Handle := AllocateHwnd(MidiOutput); + end; + +end; + +{-------------------------------------------------------------------} +destructor Tmidioutput.Destroy; +begin + if FState = mosOpen then + Close; + if (PCtlInfo <> Nil) then + GlobalSharedLockedFree( PCtlinfo^.hMem, PCtlInfo ); + DeallocateHwnd(Handle); + inherited Destroy; +end; + +{-------------------------------------------------------------------} +{ Convert the numeric return code from an MMSYSTEM function to a string + using midioutGetErrorText. TODO: These errors aren't very helpful + (e.g. "an invalid parameter was passed to a system function") so + some proper error strings would be nice. } + + +function Tmidioutput.midioutErrorString( WError: Word ): String; +var + errorDesc: PChar; +begin + errorDesc := Nil; + try + errorDesc := StrAlloc(MAXERRORLENGTH); + if midioutGetErrorText(WError, errorDesc, MAXERRORLENGTH) = 0 then + result := StrPas(errorDesc) + else + result := 'Specified error number is out of range'; + finally + If errorDesc <> Nil Then StrDispose(errorDesc); + end; +end; + +{-------------------------------------------------------------------} +{ Set the output device ID and change the other properties to match } +procedure Tmidioutput.SetDeviceID(DeviceID: Integer); +var + midioutCaps: TmidioutCaps; +begin + if FState = mosOpen then + raise EmidioutputError.Create('Change to DeviceID while device was open') + else + if (DeviceID >= midioutGetNumDevs) And (DeviceID <> MIDI_MAPPER) then + raise EmidioutputError.Create('Invalid device ID') + else + begin + FDeviceID := DeviceID; + + { Set the name and other midioutCAPS properties to match the ID } + FError := + midioutGetDevCaps(DeviceID, @midioutCaps, sizeof(TmidioutCaps)); + if Ferror > 0 then + raise EmidioutputError.Create(midioutErrorString(FError)); + + with midiOutCaps do + begin + FProductName := StrPas(szPname); + FDriverVersion := vDriverVersion; + FTechnology := OutPortTech(wTechnology); + FVoices := wVoices; + FNotes := wNotes; + FChannelMask := wChannelMask; + FSupport := dwSupport; + end; + + end; +end; + +{-------------------------------------------------------------------} +{ Set the product name property and put the matching output device number + in FDeviceID. + This is handy if you want to save a configured output/output device + by device name instead of device number, because device numbers may + change if users install or remove MIDI devices. + Exception if output device with matching name not found, + or if output device is open } +procedure Tmidioutput.SetProductName( NewProductName: String ); +var + midioutCaps: TmidioutCaps; + testDeviceID: Integer; + testProductName: String; +begin + if FState = mosOpen then + raise EmidioutputError.Create('Change to ProductName while device was open') + else + { Don't set the name if the component is reading properties because + the saved Productname will be from the machine the application was compiled + on, which may not be the same for the corresponding DeviceID on the user's + machine. The FProductname property will still be set by SetDeviceID } + if not (csLoading in ComponentState) then + begin + { Loop uses -1 to test for MIDI_MAPPER as well } + for testDeviceID := -1 To (midioutGetNumDevs-1) do + begin + FError := + midioutGetDevCaps(testDeviceID, @midioutCaps, sizeof(TmidioutCaps)); + if Ferror > 0 then + raise EmidioutputError.Create(midioutErrorString(FError)); + testProductName := StrPas(midioutCaps.szPname); + if testProductName = NewProductName then + begin + FProductName := NewProductName; + Break; + end; + end; + if FProductName <> NewProductName then + raise EmidioutputError.Create('MIDI output Device ' + + NewProductName + ' not installed') + else + SetDeviceID(testDeviceID); + end; +end; + +{-------------------------------------------------------------------} +{ Set the output technology property and put the matching output device + number in FDeviceID. + This is handy, for example, if you want to be able to switch between a + sound card and a MIDI port } +procedure TMidiOutput.SetTechnology( NewTechnology: OutPortTech ); +var + midiOutCaps: TMidiOutCaps; + testDeviceID: Integer; + testTechnology: OutPortTech; +begin + if FState = mosOpen then + raise EMidiOutputError.Create( + 'Change to Product Technology while device was open') + else + begin + { Loop uses -1 to test for MIDI_MAPPER as well } + for testDeviceID := -1 To (midiOutGetNumDevs-1) do + begin + FError := + midiOutGetDevCaps(testDeviceID, + @midiOutCaps, sizeof(TMidiOutCaps)); + if Ferror > 0 then + raise EMidiOutputError.Create(MidiOutErrorString(FError)); + testTechnology := OutPortTech(midiOutCaps.wTechnology); + if testTechnology = NewTechnology then + begin + FTechnology := NewTechnology; + Break; + end; + end; + if FTechnology <> NewTechnology then + raise EMidiOutputError.Create('MIDI output technology ' + + TechName[NewTechnology] + ' not installed') + else + SetDeviceID(testDeviceID); + end; +end; + +{-------------------------------------------------------------------} +function Tmidioutput.Open: Boolean; +var + hMem: THandle; +begin + Result := False; + try + { Create the control info for the DLL } + if (PCtlInfo = Nil) then + begin + PCtlInfo := GlobalSharedLockedAlloc( Sizeof(TMidiCtlInfo), hMem ); + PctlInfo^.hMem := hMem; + end; + + Pctlinfo^.hWindow := Handle; { Control's window handle } + + FError := midioutOpen(@FMidiHandle, FDeviceId, + DWORD(@midiHandler), + DWORD(PCtlInfo), + CALLBACK_FUNCTION); +{ FError := midioutOpen(@FMidiHandle, FDeviceId, + Handle, + DWORD(PCtlInfo), + CALLBACK_WINDOW); } + If (FError <> 0) then + { TODO: use CreateFmtHelp to add MIDI device name/ID to message } + raise EmidioutputError.Create(midioutErrorString(FError)) + else + begin + Result := True; + FState := mosOpen; + end; + + except + if PCtlInfo <> Nil then + begin + GlobalSharedLockedFree(PCtlInfo^.hMem, PCtlInfo); + PCtlInfo := Nil; + end; + end; + +end; + +{-------------------------------------------------------------------} +procedure TMidiOutput.PutShort(MidiMessage: Byte; Data1: Byte; Data2: Byte); +var + thisMsg: DWORD; +begin + thisMsg := DWORD(MidiMessage) Or + (DWORD(Data1) shl 8) Or + (DWORD(Data2) shl 16); + + FError := midiOutShortMsg(FMidiHandle, thisMsg); + if Ferror > 0 then + raise EmidioutputError.Create(midioutErrorString(FError)); +end; + +{-------------------------------------------------------------------} +procedure TMidiOutput.PutLong(TheSysex: Pointer; msgLength: Word); +{ Notes: This works asynchronously; you send your sysex output by +calling this function, which returns immediately. When the MIDI device +driver has finished sending the data the MidiOutPut function in this +component is called, which will in turn call the OnMidiOutput method +if the component user has defined one. } +{ TODO: Combine common functions with PutTimedLong into subroutine } + +var + MyMidiHdr: TMyMidiHdr; +begin + { Initialize the header and allocate buffer memory } + MyMidiHdr := TMyMidiHdr.Create(msgLength); + + { Copy the data over to the MidiHdr buffer + We can't just use the caller's PChar because the buffer memory + has to be global, shareable, and locked. } + StrMove(MyMidiHdr.SysexPointer, TheSysex, msgLength); + + { Store the MyMidiHdr address in the header so we can find it again quickly + (see the MidiOutput proc) } + MyMidiHdr.hdrPointer^.dwUser := DWORD(MyMidiHdr); + + { Get MMSYSTEM's blessing for this header } + FError := midiOutPrepareHeader(FMidiHandle,MyMidiHdr.hdrPointer, + sizeof(TMIDIHDR)); + if Ferror > 0 then + raise EMidiOutputError.Create(MidiOutErrorString(FError)); + + { Send it } + FError := midiOutLongMsg(FMidiHandle, MyMidiHdr.hdrPointer, + sizeof(TMIDIHDR)); + if Ferror > 0 then + raise EMidiOutputError.Create(MidiOutErrorString(FError)); + +end; + +{-------------------------------------------------------------------} +procedure Tmidioutput.PutMidiEvent(theEvent:TMyMidiEvent); +begin + if FState <> mosOpen then + raise EMidiOutputError.Create('MIDI Output device not open'); + + with theEvent do + begin + if Sysex = Nil then + begin + PutShort(MidiMessage, Data1, Data2) + end + else + PutLong(Sysex, SysexLength); + end; +end; + +{-------------------------------------------------------------------} +function Tmidioutput.Close: Boolean; +begin + Result := False; + if FState = mosOpen then + begin + + { Note this sends a lot of fast control change messages which some synths can't handle. + TODO: Make this optional. } +{ FError := midioutReset(FMidiHandle); + if Ferror <> 0 then + raise EMidiOutputError.Create(MidiOutErrorString(FError)); } + + FError := midioutClose(FMidiHandle); + if Ferror <> 0 then + raise EMidiOutputError.Create(MidiOutErrorString(FError)) + else + Result := True; + end; + + FMidiHandle := 0; + FState := mosClosed; + +end; + +{-------------------------------------------------------------------} +procedure TMidiOutput.SetVolume( Left: Word; Right:Word ); +var + dwVolume: DWORD; +begin + dwVolume := (DWORD(Left) shl 16) Or Right; + FError := midiOutSetVolume(DeviceID, dwVolume); + if Ferror <> 0 then + raise EMidiOutputError.Create(MidiOutErrorString(FError)); +end; + +{-------------------------------------------------------------------} +procedure Tmidioutput.midioutput( var Message: TMessage ); +{ Triggered when sysex output from PutLong is complete } +var + MyMidiHdr: TMyMidiHdr; + thisHdr: PMidiHdr; +begin + if Message.Msg = Mom_Done then + begin + { Find the MIDIHDR we used for the output. Message.lParam is its address } + thisHdr := PMidiHdr(Message.lParam); + + { Remove it from the output device } + midiOutUnprepareHeader(FMidiHandle, thisHdr, sizeof(TMIDIHDR)); + + { Get the address of the MyMidiHdr object containing this MIDIHDR structure. + We stored this address in the PutLong procedure } + MyMidiHdr := TMyMidiHdr(thisHdr^.dwUser); + + { Header and copy of sysex data no longer required since output is complete } + MyMidiHdr.Free; + + { Call the user's event handler if any } + if Assigned(FOnmidioutput) then + FOnmidioutput(Self); + end; + { TODO: Case for MOM_PLAYBACK_DONE } +end; + +{-------------------------------------------------------------------} +procedure Register; +begin + RegisterComponents('Samples', [Tmidioutput]); +end; + +end. diff --git a/lib/midicom3/MIDITYPE.PAS b/lib/midicom3/MIDITYPE.PAS new file mode 100644 index 00000000..0aa9cec3 --- /dev/null +++ b/lib/midicom3/MIDITYPE.PAS @@ -0,0 +1,79 @@ +{ $Header: /MidiComp/MIDITYPE.PAS 2 10/06/97 7:33 Davec $ } + +{ Written by David Churcher , + released to the public domain. } + + +unit Miditype; + +interface + +uses Classes, Wintypes, Messages, MMSystem, MidiDefs, Circbuf; + +type + {-------------------------------------------------------------------} + { A MIDI input/output event } + TMyMidiEvent = class(TPersistent) + public + MidiMessage: Byte; { MIDI message status byte } + Data1: Byte; { MIDI message data 1 byte } + Data2: Byte; { MIDI message data 2 byte } + Time: DWORD; { Time in ms since midiInOpen } + SysexLength: Word; { Length of sysex data (0 if none) } + Sysex: PChar; { Pointer to sysex data buffer } + destructor Destroy; override; { Frees sysex data buffer if nec. } + end; + PMyMidiEvent = ^TMyMidiEvent; + + {-------------------------------------------------------------------} + { Encapsulates the MIDIHDR with its memory handle and sysex buffer } + PMyMidiHdr = ^TMyMidiHdr; + TMyMidiHdr = class(TObject) + public + hdrHandle: THandle; + hdrPointer: PMIDIHDR; + sysexHandle: THandle; + sysexPointer: Pointer; + constructor Create(BufferSize: Word); + destructor Destroy; override; + end; + +implementation + +{-------------------------------------------------------------------} +{ Free any sysex buffer associated with the event } +destructor TMyMidiEvent.Destroy; +begin + if (Sysex <> Nil) then + Freemem(Sysex, SysexLength); + + inherited Destroy; +end; + +{-------------------------------------------------------------------} +{ Allocate memory for the sysex header and buffer } +constructor TMyMidiHdr.Create(BufferSize:Word); +begin + inherited Create; + + if BufferSize > 0 then + begin + hdrPointer := GlobalSharedLockedAlloc(sizeof(TMIDIHDR), hdrHandle); + sysexPointer := GlobalSharedLockedAlloc(BufferSize, sysexHandle); + + hdrPointer^.lpData := sysexPointer; + hdrPointer^.dwBufferLength := BufferSize; + end; +end; + +{-------------------------------------------------------------------} +destructor TMyMidiHdr.Destroy; +begin + GlobalSharedLockedFree( hdrHandle, hdrPointer ); + GlobalSharedLockedFree( sysexHandle, sysexPointer ); + inherited Destroy; +end; + + + +end. diff --git a/lib/midicom3/MONPROCS.PAS b/lib/midicom3/MONPROCS.PAS new file mode 100644 index 00000000..e469ead9 --- /dev/null +++ b/lib/midicom3/MONPROCS.PAS @@ -0,0 +1,148 @@ +{ $Header: /MidiComp/MONPROCS.PAS 2 10/06/97 7:33 Davec $ } + +{ Written by David Churcher , + released to the public domain. } + + +unit Monprocs; + +interface + +uses Sysutils, MidiType, Midicons; + +type + TEventNames = array[1..8] of string[24]; + TSysMsgNames = array[1..16] of string[24]; +const + EventNames: TEventNames = ( + 'Note Off', + 'Note On', + 'Key Aftertouch', + 'Control Change', + 'Program Change', + 'Channel Aftertouch', + 'Pitch Bend', + 'System Message' ); + SysMsgNames: TSysMsgNames = ( + 'System Exclusive', + 'MTC Quarter Frame', + 'Song Position Pointer', + 'Song Select', + 'Undefined', + 'Undefined', + 'Tune Request', + 'System Exclusive End', + 'Timing Clock', + 'Undefined', + 'Start', + 'Continue', + 'Stop', + 'Undefined', + 'Active Sensing', + 'System Reset'); + + format3 = '%4.4x%4.4x %2.2x %2.2x %2.2x %s'; + format2 = '%4.4x%4.4x %2.2x %2.2x %s'; + format1 = '%4.4x%4.4x %2.2x %s'; + + function BinaryToHexList( bin: PChar; binSize: Word ): String; + function MonitorMessageText( ThisEvent: TMyMidiEvent ): String; + +implementation + +function BinaryToHexList( bin: PChar; binSize: Word ): String; +var + ctr: Word; + thisChar: Char; +begin + if binSize > 200 then + binSize := 200; + + Result := ''; + for ctr := 0 to binSize-1 do + begin + thisChar := bin^; + Result := Result + Format('%2.2x ', [Integer(thisChar)]); + Inc(bin); + end; +end; + +{ Converts MIDI event to text description. Straight out of Microsoft MIDIMON example } +function MonitorMessageText( ThisEvent: TMyMidiEvent ): String; +var + bStatus: Byte; + EventDesc: String; + TimeLow: Word; + TimeHigh: Word; +begin + bStatus := ThisEvent.MidiMessage And $f0; + TimeHigh := Word(ThisEvent.Time Div 65536); + TimeLow := Word(ThisEvent.Time MOD 65536); + + EventDesc := 'Unrecognized MIDI Event'; + + case bStatus of + + { 3-byte events } + MIDI_NOTEOFF, + MIDI_NOTEON, + MIDI_KEYAFTERTOUCH, + MIDI_CONTROLCHANGE, + MIDI_PITCHBEND: + begin + { Note on with velocity of 0 is a Note Off } +{ if (bStatus = MIDI_NOTEON) And (ThisEvent.Data2 = 0) then + bStatus := MIDI_NOTEOFF; } + EventDesc := Format(format3, + [TimeHigh, TimeLow, + ThisEvent.MidiMessage, + ThisEvent.Data1, + ThisEvent.Data2, + EventNames[ ((ThisEvent.MidiMessage-$80) Div 16) + 1 ]]); + end; + { 2-byte events } + MIDI_PROGRAMCHANGE, + MIDI_CHANAFTERTOUCH: + begin + EventDesc := Format(format2,[TimeHigh, TimeLow, + ThisEvent.MidiMessage, + ThisEvent.Data1, + EventNames[ ((ThisEvent.MidiMessage-$80) Div 16) + 1 ]]); + end; + + { System events $f0-$ff } + MIDI_BEGINSYSEX: + begin + case ThisEvent.MidiMessage of + MIDI_BEGINSYSEX: + EventDesc := Format('Sysex (%d): ', [ThisEvent.SysexLength]) + + BinaryToHexList(ThisEvent.Sysex, ThisEvent.SysexLength); + + {2-byte system events} + MIDI_MTCQUARTERFRAME, + MIDI_SONGSELECT: + EventDesc := Format(format1,[TimeHigh, TimeLow, + ThisEvent.MidiMessage, + ThisEvent.Data1, + SysMsgNames[ (ThisEvent.MidiMessage And $f) +1 ]]); + + {3-byte system events} + MIDI_SONGPOSPTR: + EventDesc := Format(format3,[TimeHigh, TimeLow, + ThisEvent.MidiMessage, + ThisEvent.Data1, + ThisEvent.Data2, + SysMsgNames[ (ThisEvent.MidiMessage And $f) +1 ]]); + + {1-byte system events} + else + EventDesc := Format(format1,[TimeHigh, TimeLow, + ThisEvent.MidiMessage, + SysMsgNames[ (ThisEvent.MidiMessage And $f) +1 ]]); + end; + end; + end; + Result := EventDesc; +end; + +end. diff --git a/lib/midicom3/MULTIMNP.DFM b/lib/midicom3/MULTIMNP.DFM new file mode 100644 index 00000000..8d89a0d5 Binary files /dev/null and b/lib/midicom3/MULTIMNP.DFM differ diff --git a/lib/midicom3/MULTIMNP.PAS b/lib/midicom3/MULTIMNP.PAS new file mode 100644 index 00000000..503fe57a --- /dev/null +++ b/lib/midicom3/MULTIMNP.PAS @@ -0,0 +1,142 @@ +{ $Header: /MidiComp/MULTIMNP.PAS 2 10/06/97 7:33 Davec $ } + +{ This demo shows how MIDI input devices can be created at runtime. + It creates one MidiInput component for each physical MIDI input device + on the system, and uses a common input handler procedure to display + the input data, including the name of the input device. } + +unit Multimnp; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, MMSystem, StdCtrls, MIDIIn, MidiOut, MidiType, ExtCtrls, + Menus, Monprocs; + +type + TForm1 = class(TForm) + lstLog: TListBox; + pnlColumnHeading: TPanel; + MainMenu1: TMainMenu; + File1: TMenuItem; + mnuExit: TMenuItem; + procedure MIDIInput1MidiInput(Sender: TObject); + procedure LogMessage(devName: String; ThisEvent:TMyMidiEvent); + procedure FormCreate(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure mnuExitClick(Sender: TObject); + private + logItemMax: Integer; + MidiInControls: TList; + public + { Public declarations } + end; + +var + Form1: TForm1; + inh: HMidiIn; + +implementation + +{$R *.DFM} + + +procedure TForm1.LogMessage(devName: String; ThisEvent: TMyMidiEvent); +{ Logging MIDI messages with a Windows list box is rather slow and ugly, + but it makes the example very simple. If you need a faster and less + flickery log you could port the rest of Microsoft's MIDIMON.C example. } +begin + if logItemMax > 0 then + begin + With lstLog.Items do + begin + if Count >= logItemMax then + Delete(0); + Add(Copy(devName,1,7) + ' ' + MonitorMessageText(ThisEvent)); + end; + end; +end; + +procedure TForm1.MIDIInput1MidiInput(Sender: TObject); +var + thisEvent: TMyMidiEvent; +begin + with (Sender As TMidiInput) do + begin + while (MessageCount > 0) do + begin + + { Get the event as an object } + thisEvent := GetMidiEvent; + + { Log it, using the name of the current device } + LogMessage(Copy(ProductName,1,7), thisEvent); + + { Event was dynamically created by GetMidiEvent so must + free it here } + thisEvent.Free; + + end; + end; +end; + +procedure TForm1.FormCreate(Sender: TObject); +var + testDeviceID: Word; + thisControl: TMidiInput; +begin + { Create and open one MIDI input control for each installed MIDI input device } + midiInControls := TList.Create; + if midiInGetNumDevs > 0 then + for testDeviceID := 0 To (midiInGetNumDevs-1) do + begin + thisControl := TMidiInput.Create(Self); + thisControl.DeviceID := testDeviceID; + thisControl.OnMidiInput := Form1.MIDIInput1MidiInput; + thisControl.Open; + thisControl.Start; + MidiInControls.Add(thisControl); + end; +end; + +procedure TForm1.FormResize(Sender: TObject); +const + logMargin = 8; +begin + { Set maximum items that can be stored in the list box without scrolling } + if lstLog.ItemHeight > 0 then + begin + logItemMax := (lstLog.Height div lstLog.ItemHeight)-1; + { If there are currently more items than the max, remove them + otherwise the list will have scrollbars when resized } + with lstLog.Items do + begin + while (Count >= logItemMax) and (Count > 0) do + Delete(0); + end; + end + else + logItemMax := 0; +end; + +procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); +var + controlCtr: Integer; +begin + { This is not strictly necessary since the objects close themselves + when the form containing them is destroyed } + with MidiInControls do + if Count > 0 then + for controlCtr := 0 to Count-1 do + TMidiInput(Items[controlCtr]).Free; +end; + +procedure TForm1.mnuExitClick(Sender: TObject); +begin + Application.Terminate; +end; + + +end. diff --git a/lib/midicom3/MULTIMON.DPR b/lib/midicom3/MULTIMON.DPR new file mode 100644 index 00000000..3d0af672 --- /dev/null +++ b/lib/midicom3/MULTIMON.DPR @@ -0,0 +1,25 @@ +{ $Header: G:/delphi/midi/vcs/multimon.dpr 1.1 30 Apr 1996 19:05:38 DAVEC $ } + +{ Written by David Churcher , + released to the public domain. } + +program Multimon; + +uses + Forms, + Multimnp in 'MULTIMNP.PAS' {Form1}, + MIDIIn in 'MIDIIN.PAS', + Circbuf in 'CIRCBUF.PAS', + midiout in 'MIDIOUT.PAS', + Midicons in 'midicons.pas', + Miditype in 'Miditype.pas', + Monprocs in 'Monprocs.pas', + Mididefs in 'mididefs.pas', + Delphmcb in 'Delphmcb.pas'; + +{$R *.RES} + +begin + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/midicom3/MULTIMON.RES b/lib/midicom3/MULTIMON.RES new file mode 100644 index 00000000..6b066340 Binary files /dev/null and b/lib/midicom3/MULTIMON.RES differ diff --git a/lib/midicom3/README.TXT b/lib/midicom3/README.TXT new file mode 100644 index 00000000..c201b5a8 --- /dev/null +++ b/lib/midicom3/README.TXT @@ -0,0 +1,198 @@ + Delphi MIDI I/O Components Version 3.0 9 June 1997 + -------------------------- --------------------------- + + These components handle low-level MIDI input and output using the +Windows multimedia MIDI functions. They encapsulate all the nasty +low-level stuff into some intermediate-level components. They support +both short MIDI messages (e.g. note on/off, program change) and long +MIDI messages (e.g. system exclusive, sample dumps). + + The components work under Delphi 3. If you need to use Delphi 1 or 2 +you should get the previous version 2.0b. They've been tested in Windows +95 and NT 4. + + To install the components, install the package MIDICOMP.DPL. +This should give you MIDI input and output components on the Samples tab. + + There's no formal documentation, but there are lists of properties, +methods, and events in the headers of MIDIIN.PAS and MIDIOUT.PAS. +There's also a couple of example projects: MIDIMON.DPR is a simple +monitor that demonstrates using components created at design time, and +MULTIMON.DPR demonstrates using multiple input and output components +created at runtime. + + These components are in the public domain so feel free to produce +any type of program based on them. + + If you need to know more about MIDI see the links at the bottom of +my MIDI page http://www.davec.op.nu + + +Changes for Delphi 3: +--------------------- + +1. The requirement for a separate DLL for the MIDI callback procedure has +been removed. The callback is now in a fixed segment of the main +EXE. + +2. Minor tweaks to compile without warnings under Delphi 3. + + I haven't really been developing these components very much as the +project I wrote them for never came about, so there are no changes +to functionality at all. + + +Frequently Asked Questions +-------------------------- + +I've had a lot of email about these components. Thanks to everyone +who sent kind words, code, and bug reports. Here are answers to the +questions that cropped up most often: + + Q: How do you load MIDI files and play them using these components? + + A: These components don't do that, and the operating system only + provides support for playing MIDI files from disk. You need to + write your own code to load MIDI files. There are lots of C++ + examples around on the net, so get cracking! + + ------------- + Q: I don't want to do anything fancy, I just want to output some MIDI notes, + how do I do that? + + A: These components were mainly built for doing System Exclusive input and + output so if you don't want to use sysex, you don't really need these + components to do that, although they make managing the device handles + slightly easier. + + To output notes without the MidiOut component: + ---------------------------------------------- + 1. Open the device using an integer device ID to specify which + device. In the example below devID is an integer from 0 to the no. of + MIDI devices installed-1. You can get the number of installed devices + from midiOutGetNumDevs and the names of the devices using + midiOutGetDevCaps. + + You can also use MIDI_MAPPER for the device ID, which directs output to + the MIDI device configured in the Control Panel MIDI applet. + + var + devHandle: HMIDIIN; + midiRes: MMRESULT; + begin + { Callbacks not necessary for output } + devHandle := midiOutOpen( @devHandle, devID, 0, 0, CALLBACK_NULL ); + + 2. Build up a 32-bit MIDI message value using the MIDI codes defined + in the MIDI spec (see above for reference). + + For example: + + theMsg := DWORD(MidiMessage) Or + (DWORD(MidiData1) shl 8) Or + (DWORD(MidiData2) shl 16); + + + 3. Output the message using midiOutShortMsg with the handle from + midiOutOpen. + + midiRes := midiOutShortMsg( devHandle, theMsg ); + + 4. Call midiOutClose() when you've finished. + + + To output notes using the MidiOutput component: + ----------------------------------------------- + + 1. Drop the component on a form. + + 2. Set the component's DeviceID or DeviceName properties to set + the output device, either manually or with code. + Use the MidiMapper ID (-1) to output to the Windows MIDI Mapper. + + 3. Call MidiOutput.Open. + + 4. Call Midioutput.PutShort(MidiMessage, Data1, Data2). + + 5. Call MidiOutput.Close when you've finished. + + ------------- + Q: How do I construct and send system exclusive (Sysex) data? + + A: It's easiest to work with the data in strings. You can build +literal strings like this: + + sMidi := #$F0#$47#00#$28#$48#00#00#00#$0F#01#00#$0F#03#$F7; + +Use Chr() to add variables to the sequence, e.g. + sSysex := #$f0 + Chr(channel) + Chr(address) + ... + #$f7; + + A common mistake people make is to try to send ASCII hex data like this: + + sMidi := 'F001000313F7'; { Wrong! } + + There are two ways of getting a pointer to the string to pass to +TMidiOutput.Putlong: + + i) In Delphi 2&3, cast the string to a pointer, e.g. + + MidiOutput1.PutLong(Pointer(sMidi), Length(sMidi)); + + ii) In Delphi 1, use @sMidi[1] to skip past the length byte at the +start of the string, e.g. + + MidiOutput1.PutLong(@sMidi[1], Length(sMidi)); + + Do not use any of the zero-terminated string functions Str*() on sysex data +as sysex sequences often contain zeros and will be truncated. The exception +is the StrMove() function which doesn't stop for binary zeros. + + ------------- + Q: How do I receive MIDI timing data? + + A: This is filtered out by default in the callback function in DELPHMCB.PAS. +Enable it by removing the check for MIDI_TIMINGCLOCK in the midiHandler function. + + Contacting me + ------------- + + Contact me by email at dchurcher@cix.co.uk, but please remember that you +got the components for free and I don't get paid for support. + + Updated versions of this component may appear on my MIDI software web +page: + + http://www.davec.op.nu + + + + Revision history + ----------- + +v3.0 +---- +1. Upgraded to Delphi 3 + +2. Removed requirement for DLL. + + +v2.0b +----- +1. Added 16-bit DCR files in 16bitres.zip + +2. Removed "uses midioutTimerHandler" from delphmid.dpr + + +v2.0 +---- +1. Fixed exception on load if the installed MIDI devices were different +from the development machine. + +2. Now throws an "Invalid device ID" exception on Create if no MIDI +devices installed on machine. + +3. Fixed GPF when SysexBufferCount = 0 + + + David Churcher + June 1997 diff --git a/lib/midicomp/circbuf.pas b/lib/midicomp/circbuf.pas new file mode 100644 index 00000000..1e32f345 --- /dev/null +++ b/lib/midicomp/circbuf.pas @@ -0,0 +1,182 @@ +{ $Header: F:/delphi/midi/vcs/circbuf.pas 1.8 02 Jul 1995 00:51:04 DAVEC $ } + +{ A First-In First-Out circular buffer. + Port of circbuf.c from Microsoft's Windows MIDI monitor example. + I did do a version of this as an object (see Rev 1.1) but it was getting too + complicated and I couldn't see any real benefits to it so I dumped it + for an ordinary memory buffer with pointers. + + The main problem is that the object has to be allocated in global shared + memory and the PutEvent method has to be accessed from a DLL at interrupt + time. Since you can't debug DLLs in Delphi this could be a nightmare to + get working. Maybe later! + + This unit is a bit C-like, everything is done with pointers and extensive + use is made of the undocumented feature of the Inc() function that + increments pointers by the size of the object pointed to. + All of this could probably be done using Pascal array notation with + range-checking turned off, but I'm not sure it's worth it. +} + +Unit Circbuf; + +interface + +Uses Wintypes, WinProcs, MMSystem; + +type + { MIDI input event } + TMidiInputBufferItem = record + timestamp: Longint; { Timestamp in milliseconds after midiInStart } + data: Longint; { MIDI message received } + sysex: PMidiHdr; { Pointer to sysex MIDIHDR, nil if not sysex } + end; + PMidiInputBufferItem = ^TMidiInputBufferItem; + + { MIDI input buffer } + TCircularBuffer = record + RecordHandle: THANDLE; { Windows memory handle for this record } + BufferHandle: THANDLE; { Windows memory handle for the buffer } + pStart: PMidiInputBufferItem; { ptr to start of buffer } + pEnd: PMidiInputBufferItem; { ptr to end of buffer } + pNextPut: PMidiInputBufferItem; { next location to fill } + pNextGet: PMidiInputBufferItem; { next location to empty } + Error: Word; { error code from MMSYSTEM functions } + Capacity: Word; { buffer size (in TMidiInputBufferItems) } + EventCount: Word; { Number of events in buffer } + end; + + PCircularBuffer = ^TCircularBuffer; + +function GlobalSharedLockedAlloc( Capacity: Word; var hMem: THANDLE ): Pointer; +procedure GlobalSharedLockedFree( hMem: THANDLE; ptr: Pointer ); + +function CircbufAlloc( Capacity: Word ): PCircularBuffer; +procedure CircbufFree( PBuffer: PCircularBuffer ); +function CircbufRemoveEvent( PBuffer: PCircularBuffer ): Boolean; +function CircbufReadEvent( PBuffer: PCircularBuffer; PEvent: PMidiInputBufferItem ): Boolean; +{ Note: The PutEvent function is in the DLL } + +implementation + +{ Allocates in global shared memory, returns pointer and handle } +function GlobalSharedLockedAlloc( Capacity: Word; var hMem: THANDLE ): Pointer; +var + ptr: Pointer; +begin + { Allocate the buffer memory } + hMem := GlobalAlloc(GMEM_SHARE Or GMEM_MOVEABLE Or GMEM_ZEROINIT, Capacity ); + + if (hMem = 0) then + ptr := Nil + else + begin + ptr := GlobalLock(hMem); + if (ptr = Nil) then + GlobalFree(hMem); + end; + + if (ptr <> Nil) then + GlobalPageLock(HIWORD(Longint(ptr))); + + GlobalSharedLockedAlloc := Ptr; +end; + +procedure GlobalSharedLockedFree( hMem: THANDLE; ptr: Pointer ); +begin + if (ptr <> Nil) then + GlobalPageUnlock(HIWORD(Longint(ptr))); + if (hMem <> 0) then + begin + GlobalUnlock(hMem); + GlobalFree(hMem); + end; +end; + +function CircbufAlloc( Capacity: Word ): PCircularBuffer; +var + NewCircularBuffer: PCircularBuffer; + NewMIDIBuffer: PMidiInputBufferItem; + hMem: THANDLE; +begin + { TODO: Validate circbuf size, <64K } + NewCircularBuffer := + GlobalSharedLockedAlloc( Sizeof(TCircularBuffer), hMem ); + if (NewCircularBuffer <> Nil) then + begin + NewCircularBuffer^.RecordHandle := hMem; + NewMIDIBuffer := + GlobalSharedLockedAlloc( Capacity * Sizeof(TMidiInputBufferItem), hMem ); + if (NewMIDIBuffer = Nil) then + begin + { TODO: Exception here? } + GlobalSharedLockedFree( NewCircularBuffer^.RecordHandle, + NewCircularBuffer ); + NewCircularBuffer := Nil; + end + else + begin + NewCircularBuffer^.pStart := NewMidiBuffer; + { Point to item at end of buffer } + NewCircularBuffer^.pEnd := NewMidiBuffer; + Inc(NewCircularBuffer^.pEnd, Capacity); + { Start off the get and put pointers in the same position. These + will get out of sync as the interrupts start rolling in } + NewCircularBuffer^.pNextPut := NewMidiBuffer; + NewCircularBuffer^.pNextGet := NewMidiBuffer; + NewCircularBuffer^.Error := 0; + NewCircularBuffer^.Capacity := Capacity; + NewCircularBuffer^.EventCount := 0; + end; + end; + CircbufAlloc := NewCircularBuffer; +end; + +procedure CircbufFree( pBuffer: PCircularBuffer ); +begin + if (pBuffer <> Nil) then + begin + GlobalSharedLockedFree(pBuffer^.BufferHandle, pBuffer^.pStart); + GlobalSharedLockedFree(pBuffer^.RecordHandle, pBuffer); + end; +end; + +{ Reads first event in queue without removing it. + Returns true if successful, False if no events in queue } +function CircbufReadEvent( PBuffer: PCircularBuffer; PEvent: PMidiInputBufferItem ): Boolean; +var + PCurrentEvent: PMidiInputBufferItem; +begin + if (PBuffer^.EventCount <= 0) then + CircbufReadEvent := False + else + begin + PCurrentEvent := PBuffer^.PNextget; + + { Copy the object from the "tail" of the buffer to the caller's object } + PEvent^.Timestamp := PCurrentEvent^.Timestamp; + PEvent^.Data := PCurrentEvent^.Data; + PEvent^.Sysex := PCurrentEvent^.Sysex; + CircbufReadEvent := True; + end; +end; + +{ Remove current event from the queue } +function CircbufRemoveEvent(PBuffer: PCircularBuffer): Boolean; +begin + if (PBuffer^.EventCount > 0) then + begin + Dec( Pbuffer^.EventCount); + + { Advance the buffer pointer, with wrap } + Inc( Pbuffer^.PNextGet ); + If (PBuffer^.PNextGet = PBuffer^.PEnd) then + PBuffer^.PNextGet := PBuffer^.PStart; + + CircbufRemoveEvent := True; + end + else + CircbufRemoveEvent := False; +end; + +end. diff --git a/lib/midicomp/delphmcb.dfm b/lib/midicomp/delphmcb.dfm new file mode 100644 index 00000000..76096ba3 Binary files /dev/null and b/lib/midicomp/delphmcb.dfm differ diff --git a/lib/midicomp/delphmcb.pas b/lib/midicomp/delphmcb.pas new file mode 100644 index 00000000..8071fa1c --- /dev/null +++ b/lib/midicomp/delphmcb.pas @@ -0,0 +1,131 @@ +{ $Header: F:/delphi/midi/vcs/delphmcb.pas 1.11 04 Jul 1995 09:21:18 DAVEC $ } + +{MIDI callback DLL for Delphi} +{ TODO: Why is Delphi linking in the whole VCL into the DLL? } + +unit Delphmcb; + +{$C PRELOAD FIXED PERMANENT} + +interface + +uses WinProcs, WinTypes, MMsystem, Circbuf, MidiIn; + + +procedure midiHandler( + hMidiIn: HMidiIn; + wMsg: Word; + dwInstance: Longint; + dwParam1: Longint; + dwParam2: Longint); export; + +implementation + +{ Add an event to the circular input buffer. } +function CircbufPutEvent(PBuffer: PCircularBuffer; PTheEvent: PMidiInputBufferItem): Boolean; +begin + If (PBuffer^.EventCount < PBuffer^.Capacity) Then + begin + Inc(Pbuffer^.EventCount); + + { Todo: better way of copying this record } + with PBuffer^.PNextput^ do + begin + Timestamp := PTheEvent^.Timestamp; + Data := PTheEvent^.Data; + Sysex := PTheEvent^.Sysex; + end; + + { Move to next put location, with wrap } + Inc(Pbuffer^.PNextPut); + If (PBuffer^.PNextPut = PBuffer^.PEnd) then + PBuffer^.PNextPut := PBuffer^.PStart; + + CircbufPutEvent := True; + end + else + CircbufPutEvent := False; +end; + +{ This is the callback function specified when the MIDI device was opened + by midiInOpen. It's called at interrupt time when MIDI input is seen + by the MIDI device driver(s). See the docs for midiInOpen for restrictions + on the Windows functions that can be called in this interrupt. } +procedure midiHandler( + hMidiIn: HMidiIn; + wMsg: Word; + dwInstance: Longint; + dwParam1: Longint; + dwParam2: Longint); + +var + thisEvent: TMidiInputBufferItem; + thisCtlInfo: PMidiCtlInfo; + thisBuffer: PCircularBuffer; + +Begin + + case wMsg of + + mim_Open: {nothing}; + + mim_Error: {TODO: handle (message to trigger exception?) }; + + mim_Data, mim_Longdata, mim_Longerror: + { Note: mim_Longerror included because there's a bug in the Maui + input driver that sends MIM_LONGERROR for subsequent buffers when + the input buffer is smaller than the sysex block being received } + + begin + { TODO: Make filtered messages customisable, I'm sure someone wants to + do something with MTC! } + if (dwParam1 <> MIDI_ACTIVESENSING) and + (dwParam1 <> MIDI_TIMINGCLOCK) then + begin + + { The device driver passes us the instance data pointer we + specified for midiInOpen. Use this to get the buffer address + and window handle for the MIDI control } + thisCtlInfo := PMidiCtlInfo(dwInstance); + thisBuffer := thisCtlInfo^.PBuffer; + + { Screen out short messages if we've been asked to } + if ((wMsg <> mim_Data) or (thisCtlInfo^.SysexOnly = False)) + and (thisCtlInfo <> Nil) and (thisBuffer <> Nil) then + begin + with thisEvent do + begin + timestamp := dwParam2; + if (wMsg = mim_Longdata) or + (wMsg = mim_Longerror) then + begin + data := 0; + sysex := PMidiHdr(dwParam1); + end + else + begin + data := dwParam1; + sysex := Nil; + end; + end; + if CircbufPutEvent( thisBuffer, @thisEvent ) then + { Send a message to the control to say input's arrived } + PostMessage(thisCtlInfo^.hWindow, mim_Data, 0, 0) + else + { Buffer overflow } + PostMessage(thisCtlInfo^.hWindow, mim_Overflow, 0, 0); + end; + end; + end; + + mom_Done: { Sysex output complete, dwParam1 is pointer to MIDIHDR } + begin + { Notify the control that its sysex output is finished. + The control should call midiOutUnprepareHeader before freeing the buffer } + PostMessage(PMidiCtlInfo(dwInstance)^.hWindow, mom_Done, 0, dwParam1); + end; + + end; { Case } +end; + +end. diff --git a/lib/midicomp/delphmid.dpr b/lib/midicomp/delphmid.dpr new file mode 100644 index 00000000..0aa58623 --- /dev/null +++ b/lib/midicomp/delphmid.dpr @@ -0,0 +1,9 @@ +library delphmid; + +uses Delphmcb in 'DELPHMCB.PAS'; + +exports + midiHandler; + +begin +end. diff --git a/lib/midicomp/delphmid.opt b/lib/midicomp/delphmid.opt new file mode 100644 index 00000000..12ece3b4 --- /dev/null +++ b/lib/midicomp/delphmid.opt @@ -0,0 +1,34 @@ +[Compiler] +A=1 +B=0 +D=0 +F=0 +I=0 +K=1 +L=0 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=1 +V=1 +W=0 +X=1 +Y=0 + +[Linker] +MapFile=0 +LinkBuffer=0 +DebugInfo=0 +OptimizeExe=0 +StackSize=16384 +HeapSize=8192 + +[Directories] +OutputDir= +SearchPath= +Conditionals= + +[Parameters] +RunParams= diff --git a/lib/midicomp/delphmid.res b/lib/midicomp/delphmid.res new file mode 100644 index 00000000..eb311fa1 Binary files /dev/null and b/lib/midicomp/delphmid.res differ diff --git a/lib/midicomp/midiin.pas b/lib/midicomp/midiin.pas new file mode 100644 index 00000000..321fa9e4 --- /dev/null +++ b/lib/midicomp/midiin.pas @@ -0,0 +1,744 @@ +{ $Header: F:/delphi/midi/vcs/midiin.pas 1.12 03 Jul 1995 01:51:04 DAVEC $ } + +unit MidiIn; + +{ + Properties: + DeviceID: Windows numeric device ID for the MIDI input device. + Between 0 and NumDevs-1. + Read-only while device is open, exception when changed while open + + MIDIHandle: The input handle to the MIDI device. + 0 when device is not open + Read-only, runtime-only + + MessageCount: Number of input messages waiting in input buffer + + Capacity: Number of messages input buffer can hold + Defaults to 1024 + Limited to (64K/event size) + Read-only when device is open (exception when changed while open) + + SysexBufferSize: Size in bytes of each sysex buffer + Defaults to 10K + Minimum 0K (no buffers), Maximum 64K-1 + + SysexBufferCount: Number of sysex buffers + Defaults to 16 + Minimum 0 (no buffers), Maximum (avail mem/SysexBufferSize) + Check where these buffers are allocated? + + SysexOnly: True to ignore all non-sysex input events. May be changed while + device is open. Handy for patch editors where you have lots of short MIDI + events on the wire which you are always going to ignore anyway. + + DriverVersion: Version number of MIDI device driver. High-order byte is + major version, low-order byte is minor version. + + ProductName: Name of product (e.g. 'MPU 401 In') + + MID and PID: Manufacturer ID and Product ID, see + "Manufacturer and Product IDs" in MMSYSTEM.HLP for list of possible values. + + Methods: + GetMidiEvent: Read Midi event at the head of the FIFO input buffer. + Returns a TMidiEvent object containing MIDI message data, timestamp, + and sysex data if applicable. + This method automatically removes the event from the input buffer. + It makes a copy of the received sysex buffer and puts the buffer back + on the input device. + The TMidiEvent object must be freed by calling MidiEvent.Free. + + Open: Opens device. Note no input will appear until you call the Start + method. + + Close: Closes device. Any pending system exclusive output will be cancelled. + + Start: Starts receiving MIDI input. + + Stop: Stops receiving MIDI input. + + Events: + OnMidiInput: Called when MIDI input data arrives. Use the GetMidiEvent to + get the MIDI input data. + + OnOverflow: Called if the MIDI input buffer overflows. The caller must + clear the buffer before any more MIDI input can be received. + + Notes: + Buffering: Uses a circular buffer, separate pointers for next location + to fill and next location to empty because a MIDI input interrupt may + be adding data to the buffer while the buffer is being read. Buffer + pointers wrap around from end to start of buffer automatically. If + buffer overflows then the OnBufferOverflow event is triggered and no + further input will be received until the buffer is emptied by calls + to GetMidiEvent. + + Sysex buffers: There are (SysexBufferCount) buffers on the input device. + When sysex events arrive these buffers are removed from the input device and + added to the circular buffer by the interrupt handler in the DLL. When the sysex events + are removed from the circular buffer by the GetMidiEvent method the buffers are + put back on the input. If all the buffers are used up there will be no + more sysex input until at least one sysex event is removed from the input buffer. + In other words if you're expecting lots of sysex input you need to set the + SysexBufferCount property high enough so that you won't run out of + input buffers before you get a chance to read them with GetMidiEvent. + + If the synth sends a block of sysex that's longer than SysexBufferSize it + will be received as separate events. + TODO: Component derived from this one that handles >64K sysex blocks cleanly + and can stream them to disk. + + Midi Time Code (MTC) and Active Sensing: The DLL is currently hardcoded + to filter these short events out, so that we don't spend all our time + processing them. + TODO: implement a filter property to select the events that will be filtered + out. +} + +interface + +uses + SysUtils, WinTypes, Messages, Classes, WinProcs, Graphics, Controls, + Forms, Dialogs, MMSystem, Circbuf; + +const + MIDI_ALLNOTESOFF = $7B; + MIDI_NOTEON = $90; + MIDI_NOTEOFF = $80; + MIDI_KEYAFTERTOUCH = $a0; + MIDI_CONTROLCHANGE = $b0; + MIDI_PROGRAMCHANGE = $c0; + MIDI_CHANAFTERTOUCH = $d0; + MIDI_PITCHBEND = $e0; + MIDI_SYSTEMMESSAGE = $f0; + MIDI_BEGINSYSEX = $f0; + MIDI_MTCQUARTERFRAME = $f1; + MIDI_SONGPOSPTR = $f2; + MIDI_SONGSELECT = $f3; + MIDI_ENDSYSEX = $F7; + MIDI_TIMINGCLOCK = $F8; + MIDI_START = $FA; + MIDI_CONTINUE = $FB; + MIDI_STOP = $FC; + MIDI_ACTIVESENSING = $FE; + MIDI_SYSTEMRESET = $FF; + + MIM_OVERFLOW = WM_USER; { Input buffer overflow } +type + MidiInputState = (misOpen, misClosed); + EMidiInputError = class(Exception); + + {-------------------------------------------------------------------} + { A MIDI input/output event } + TMidiEvent = class(TPersistent) + public + MidiMessage: Byte; { MIDI message status byte } + Data1: Byte; { MIDI message data 1 byte } + Data2: Byte; { MIDI message data 2 byte } + Time: Longint; { Time in ms since midiInOpen } + SysexLength: Word; { Length of sysex data (0 if none) } + Sysex: PChar; { Pointer to sysex data buffer } + + destructor Destroy; override; { Frees sysex data buffer if nec. } + end; + PMidiEvent = ^TMidiEvent; + + {-------------------------------------------------------------------} + { This is the information about the control that must be accessed by + the DLL at interrupt time } + PMidiCtlInfo = ^TMidiCtlInfo; + TMidiCtlInfo = record + hMem: THandle; { Memory handle for this record } + PBuffer: PCircularBuffer; { Pointer to the MIDI data buffer } + hWindow: HWnd; { Control's window handle } + SysexOnly: Boolean; { Only process System Exclusive input } + end; + + {-------------------------------------------------------------------} + { Encapsulates the MIDIHDR with its memory handle } + PMyMidiHdr = ^TMyMidiHdr; + TMyMidiHdr = class(TObject) + public + hdrHandle: THandle; + hdrPointer: PMIDIHDR; + sysexHandle: THandle; + sysexPointer: Pointer; + constructor Create(BufferSize: Word); + destructor Destroy; override; + end; + + {-------------------------------------------------------------------} + TMidiInput = class(TComponent) + private + Handle: THandle; { Window handle used for callback notification } + FDeviceID: Word; { MIDI device ID } + FMIDIHandle: HMIDIIn; { Handle to input device } + FState: MidiInputState; { Current device state } + + FError: Word; + FSysexOnly: Boolean; + + { Stuff from MIDIINCAPS } + FDriverVersion: Version; + FProductName: string; + FMID: Word; { Manufacturer ID } + FPID: Word; { Product ID } + + { Queue } + FCapacity: Word; { Buffer capacity } + PBuffer: PCircularBuffer; { Buffer created by Open method } + FNumdevs: Word; { Number of input devices on system } + + { Events } + FOnMIDIInput: TNotifyEvent; { MIDI Input arrived } + FOnOverflow: TNotifyEvent; { Input buffer overflow } + { TODO: Some sort of error handling event for MIM_ERROR } + + { Sysex } + FSysexBufferSize: Word; + FSysexBufferCount: Word; + MidiHdrs: Tlist; + + PCtlInfo: PMidiCtlInfo; { Pointer to control info for DLL } + + protected + procedure Prepareheaders; + procedure UnprepareHeaders; + procedure AddBuffers; + procedure SetDeviceID(DeviceID: Word); + procedure SetProductName( NewProductName: String ); + function GetEventCount: Word; + procedure SetSysexBufferSize(BufferSize: Word); + procedure SetSysexBufferCount(BufferCount: Word); + procedure SetSysexOnly(bSysexOnly: Boolean); + function MidiInErrorString( WError: Word ): String; + + public + constructor Create(AOwner:TComponent); override; + destructor Destroy; override; + + property MIDIHandle: HMIDIIn read FMIDIHandle; + + property DriverVersion: Version read FDriverVersion; + property MID: Word read FMID; { Manufacturer ID } + property PID: Word read FPID; { Product ID } + + property Numdevs: Word read FNumdevs; + + property MessageCount: Word read GetEventCount; + { TODO: property to select which incoming messages get filtered out } + + procedure Open; + procedure Close; + procedure Start; + procedure Stop; + { Get first message in input queue } + function GetMidiEvent: TMidiEvent; + procedure MidiInput(var Message: TMessage); + + { Some functions to decode and classify incoming messages would be good } + + published + + { TODO: Property editor with dropdown list of product names } + property ProductName: String read FProductName write SetProductName; + + property DeviceID: Word read FDeviceID write SetDeviceID default 0; + property Capacity: Word read FCapacity write FCapacity default 1024; + property Error: Word read FError; + property SysexBufferSize: Word + read FSysexBufferSize + write SetSysexBufferSize + default 10000; + property SysexBufferCount: Word + read FSysexBufferCount + write SetSysexBufferCount + default 16; + property SysexOnly: Boolean + read FSysexOnly + write SetSysexOnly + default False; + + { Events } + property OnMidiInput: TNotifyEvent read FOnMidiInput write FOnMidiInput; + property OnOverflow: TNotifyEvent read FOnOverflow write FOnOverflow; + +end; + +procedure Register; + +implementation + +{ This is the callback procedure in the external DLL. + It's used when midiInOpen is called by the Open method. + There are special requirements and restrictions for this callback + procedure (see midiInOpen in MMSYSTEM.HLP) so it's impractical to + make it an object method } +function midiHandler( + hMidiIn: HMidiIn; + wMsg: Word; + dwInstance: Longint; + dwParam1: Longint; + dwParam2: Longint): Boolean; far; external 'DELPHMID'; + +{-------------------------------------------------------------------} +{ Free any sysex buffer associated with the event } +destructor TMidiEvent.Destroy; +begin + if (Sysex <> Nil) then + Freemem(Sysex, SysexLength); + + inherited Destroy; +end; + +{-------------------------------------------------------------------} +{ Allocate memory for the sysex header and buffer } +constructor TMyMidiHdr.Create(BufferSize:Word); +begin + inherited Create; + + if BufferSize > 0 then + begin + hdrPointer := GlobalSharedLockedAlloc(sizeof(TMIDIHDR), hdrHandle); + sysexPointer := GlobalSharedLockedAlloc(BufferSize, sysexHandle); + + hdrPointer^.lpData := sysexPointer; + hdrPointer^.dwBufferLength := BufferSize; + end; +end; + +{-------------------------------------------------------------------} +destructor TMyMidiHdr.Destroy; +begin + GlobalSharedLockedFree( hdrHandle, hdrPointer ); + GlobalSharedLockedFree( sysexHandle, sysexPointer ); + inherited Destroy; +end; + +{-------------------------------------------------------------------} +constructor TMidiInput.Create(AOwner:TComponent); +begin + inherited Create(AOwner); + FState := misClosed; + FSysexOnly := False; + FNumDevs := midiInGetNumDevs; + + { Set defaults } + SetDeviceID(0); { TODO: Exception if no MIDI devices installed? } + FCapacity := 1024; + FSysexBufferSize := 10000; + FSysexBufferCount := 16; + + { Create the window for callback notification } + if not (csDesigning in ComponentState) then + begin + Handle := AllocateHwnd(MidiInput); + end; + +end; + +{-------------------------------------------------------------------} +{ Close the device if it's open } +destructor TMidiInput.Destroy; +begin + if (FMidiHandle <> 0) then + begin + Close; + FMidiHandle := 0; + end; + + if (PCtlInfo <> Nil) then + GlobalSharedLockedFree( PCtlinfo^.hMem, PCtlInfo ); + + DeallocateHwnd(Handle); + inherited Destroy; +end; + +{-------------------------------------------------------------------} +{ Convert the numeric return code from an MMSYSTEM function to a string + using midiInGetErrorText. TODO: These errors aren't very helpful + (e.g. "an invalid parameter was passed to a system function") so + sort out some proper error strings. } +function TMidiInput.MidiInErrorString( WError: Word ): String; +var + errorDesc: PChar; +begin + try + errorDesc := StrAlloc(MAXERRORLENGTH); + if midiInGetErrorText(WError, errorDesc, MAXERRORLENGTH) = 0 then + result := StrPas(errorDesc) + else + result := 'Specified error number is out of range'; + finally + StrDispose(errorDesc); + end; +end; + +{-------------------------------------------------------------------} +{ Set the sysex buffer size, fail if device is already open } +procedure TMidiInput.SetSysexBufferSize(BufferSize: Word); +begin + if FState = misOpen then + raise EMidiInputError.Create('Change to SysexBufferSize while device was open') + else + { TODO: Validate the sysex buffer size } + FSysexBufferSize := BufferSize; +end; + +{-------------------------------------------------------------------} +{ Set the sysex buffer count, fail if device is already open } +procedure TMidiInput.SetSysexBuffercount(Buffercount: Word); +begin + if FState = misOpen then + raise EMidiInputError.Create('Change to SysexBuffercount while device was open') + else + { TODO: Validate the sysex buffer count } + FSysexBuffercount := Buffercount; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.SetSysexOnly(bSysexOnly: Boolean); +begin + FSysexOnly := bSysexOnly; + { Update the interrupt handler's copy of this property } + if PCtlInfo <> Nil then + PCtlInfo^.SysexOnly := bSysexOnly; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.SetDeviceID(DeviceID: Word); +var + MidiInCaps: TMidiInCaps; +begin + if FState = misOpen then + raise EMidiInputError.Create('Change to DeviceID while device was open') + else + if (DeviceID > midiInGetNumDevs) then + raise EMidiInputError.Create('Invalid device ID') + else + begin + FDeviceID := DeviceID; + + { Set the name and other MIDIINCAPS properties to match the ID } + FError := + midiInGetDevCaps(DeviceID, @MidiInCaps, sizeof(TMidiInCaps)); + if Ferror > 0 then + raise EMidiInputError.Create(MidiInErrorString(FError)); + + FProductName := StrPas(MidiInCaps.szPname); + FDriverVersion := MidiInCaps.vDriverVersion; + FMID := MidiInCaps.wMID; + FPID := MidiInCaps.wPID; + + end; +end; + +{-------------------------------------------------------------------} +{ Set the product name and put the matching input device number in FDeviceID. + This is handy if you want to save a configured input/output device + by device name instead of device number, because device numbers may + change if users add or remove MIDI devices. + Exception if input device with matching name not found, + or if input device is open } +procedure TMidiInput.SetProductName( NewProductName: String ); +var + MidiInCaps: TMidiInCaps; + testDeviceID: Word; + testProductName: String; +begin + if FState = misOpen then + raise EMidiInputError.Create('Change to ProductName while device was open') + else + begin + for testDeviceID := 0 To (midiInGetNumDevs-1) do + begin + FError := + midiInGetDevCaps(testDeviceID, @MidiInCaps, sizeof(TMidiInCaps)); + if Ferror > 0 then + raise EMidiInputError.Create(MidiInErrorString(FError)); + testProductName := StrPas(MidiInCaps.szPname); + if testProductName = NewProductName then + begin + FProductName := NewProductName; + Break; + end; + end; + if FProductName <> NewProductName then + raise EMidiInputError.Create('MIDI Input Device ' + + NewProductName + ' not installed') + else + SetDeviceID(testDeviceID); + end; +end; + + +{-------------------------------------------------------------------} +{ Get the sysex buffers ready } +procedure TMidiInput.PrepareHeaders; +var + ctr: Word; + MyMidiHdr: TMyMidiHdr; + Debugstr: string[100]; +begin + if (FSysexBufferCount > 0) And (FSysexBufferSize > 0) + And (FMidiHandle > 0) then + begin + Midihdrs := TList.Create; + for ctr := 1 to FSysexBufferCount do + begin + { Initialize the header and allocate buffer memory } + MyMidiHdr := TMyMidiHdr.Create(FSysexBufferSize); + + { Store the MidiHdr address in the header so we can find it again quickly } + MyMidiHdr.hdrPointer^.dwUser := Longint(MyMidiHdr); + + { Get MMSYSTEM's blessing for this header } + FError := midiInPrepareHeader(FMidiHandle,MyMidiHdr.hdrPointer, + sizeof(TMIDIHDR)); + if Ferror > 0 then + raise EMidiInputError.Create(MidiInErrorString(FError)); + + { Save it in our list } + MidiHdrs.Add(MyMidiHdr); + end; + end; + +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.UnprepareHeaders; +var + ctr: Word; +begin + if (MidiHdrs.Count > 0) and (FMidiHandle > 0) then + begin + for ctr := 0 To MidiHdrs.Count-1 do + begin + FError := midiInUnprepareHeader( FMidiHandle, + TMyMidiHdr(MidiHdrs.Items[ctr]).hdrPointer, + sizeof(TMIDIHDR)); + if Ferror > 0 then + raise EMidiInputError.Create(MidiInErrorString(FError)); + TMyMidiHdr(MidiHdrs.Items[ctr]).Free; + end; + end; + MidiHdrs.Free; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.AddBuffers; +var + ctr: Word; +begin + if MidiHdrs.Count > 0 Then + begin + for ctr := 0 To MidiHdrs.Count-1 do + begin + FError := midiInAddBuffer(FMidiHandle, + TMyMidiHdr(MidiHdrs.Items[ctr]).hdrPointer, + sizeof(TMIDIHDR)); + If FError > 0 then + raise EMidiInputError.Create(MidiInErrorString(FError)); + end; + end; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.Open; +var + hMem: THandle; +begin + try + { Create the input buffer } + If (PBuffer = Nil) then + PBuffer := CircBufAlloc( FCapacity ); + + { Create the control info for the DLL } + if (PCtlInfo = Nil) then + begin + PCtlInfo := GlobalSharedLockedAlloc( Sizeof(TCtlInfo), hMem ); + PctlInfo^.hMem := hMem; + end; + PctlInfo^.pBuffer := PBuffer; + Pctlinfo^.hWindow := Handle; { Control's window handle } + PCtlInfo^.SysexOnly := FSysexOnly; + FError := midiInOpen(@FMidiHandle, FDeviceId, + Longint(@midiHandler), + Longint(PCtlInfo), + CALLBACK_FUNCTION); + If (FError <> 0) then + { TODO: use CreateFmtHelp to add MIDI device name/ID to message } + raise EMidiInputError.Create(MidiInErrorString(FError)); + + { Add sysex buffers } + PrepareHeaders; + + { Add them to the input } + AddBuffers; + + FState := misOpen; + + except + if PBuffer <> Nil then + begin + CircBufFree(PBuffer); + PBuffer := Nil; + end; + + if PCtlInfo <> Nil then + begin + GlobalSharedLockedFree(PCtlInfo^.hMem, PCtlInfo); + PCtlInfo := Nil; + end; + + end; + +end; + +{-------------------------------------------------------------------} +function TMidiInput.GetMidiEvent: TMidiEvent; +var + thisItem: TMidiInputBufferItem; +begin + if (FState = misOpen) and + CircBufReadEvent(PBuffer, @thisItem) then + begin + Result := TMidiEvent.Create; + with thisItem Do + begin + Result.Time := Timestamp; + if (Sysex = Nil) then + begin + { Short message } + Result.MidiMessage := LoByte(LoWord(Data)); + Result.Data1 := HiByte(LoWord(Data)); + Result.Data2 := LoByte(HiWord(Data)); + Result.Sysex := Nil; + Result.SysexLength := 0; + end + else + begin + Result.MidiMessage := MIDI_BEGINSYSEX; + Result.Data1 := 0; + Result.Data2 := 0; + Result.SysexLength := Sysex^.dwBytesRecorded; + if Sysex^.dwBytesRecorded > 0 then + begin + { Put a copy of the sysex buffer in the object } + GetMem(Result.Sysex, Sysex^.dwBytesRecorded); + StrMove(Result.Sysex, Sysex^.lpData, Sysex^.dwBytesRecorded); + end; + + { Put the header back on the input buffer } + FError := midiInPrepareHeader(FMidiHandle,Sysex, + sizeof(TMIDIHDR)); + If Ferror = 0 then + FError := midiInAddBuffer(FMidiHandle, + Sysex, sizeof(TMIDIHDR)); + if Ferror > 0 then + raise EMidiInputError.Create(MidiInErrorString(FError)); + end; + end; + CircbufRemoveEvent(PBuffer); + end + else + { Device isn't open, return a nil event } + Result := Nil; +end; + +{-------------------------------------------------------------------} +function TMidiInput.GetEventCount: Word; +begin + if FState = misOpen then + Result := PBuffer^.EventCount + else + Result := 0; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.Close; +begin + if FState = misOpen then + begin + FState := misClosed; + + { MidiInReset cancels any pending output. + Note that midiInReset causes an MIM_LONGDATA callback for each sysex + buffer on the input, so the callback function and Midi input buffer + should still be viable at this stage. + All the resulting MIM_LONGDATA callbacks will be completed by the time + MidiInReset returns, though. } + FError := MidiInReset(FMidiHandle); + if Ferror > 0 then + raise EMidiInputError.Create(MidiInErrorString(FError)); + + { Remove sysex buffers from input device and free them } + UnPrepareHeaders; + + { Close the device (finally!) } + FError := MidiInClose(FMidiHandle); + if Ferror > 0 then + raise EMidiInputError.Create(MidiInErrorString(FError)); + + FMidiHandle := 0; + + If (PBuffer <> Nil) then + begin + CircBufFree( PBuffer ); + PBuffer := Nil; + end; + end; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.Start; +begin + if FState = misOpen then + begin + { TODO: Exception } + FError := MidiInStart(FMidiHandle); + if Ferror > 0 then + raise EMidiInputError.Create(MidiInErrorString(FError)); + end; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.Stop; +begin + if FState = misOpen then + begin + FError := MidiInStop(FMidiHandle); + if Ferror > 0 then + raise EMidiInputError.Create(MidiInErrorString(FError)); + end; +end; + +{-------------------------------------------------------------------} +procedure TMidiInput.MidiInput( var Message: TMessage ); +{ Triggered by incoming message from DLL. + Note DLL has already put the message in the queue } +begin + case Message.Msg of + mim_data: + { Trigger the user's MIDI input event, if they've specified one and + we're not in the process of closing the device. The check for + GetEventCount > 0 prevents unnecessary event calls where the user has + already cleared all the events from the input buffer using a GetMidiEvent + loop in the OnMidiInput event handler } + if Assigned(FOnMIDIInput) and (FState = misOpen) + and (GetEventCount > 0) then + FOnMIDIInput(Self); + mim_Overflow: + if Assigned(FOnOverflow) and (FState = misOpen) then + FOnOverflow(Self); + end; +end; + +{-------------------------------------------------------------------} +procedure Register; +begin + RegisterComponents('Samples', [TMIDIInput]); +end; + +end. diff --git a/lib/midicomp/midiin.res b/lib/midicomp/midiin.res new file mode 100644 index 00000000..dee28482 Binary files /dev/null and b/lib/midicomp/midiin.res differ diff --git a/lib/midicomp/midimon.dpr b/lib/midicomp/midimon.dpr new file mode 100644 index 00000000..608b08fc --- /dev/null +++ b/lib/midicomp/midimon.dpr @@ -0,0 +1,16 @@ +program Midimon; + +uses + Forms, + Midimonp in 'MIDIMONP.PAS' {Form1}, + MIDIIn in 'MIDIIN.PAS', + Circbuf in 'CIRCBUF.PAS', + midiout in 'MIDIOUT.PAS', + Monprocs in 'MONPROCS.PAS'; + +{$R *.RES} + +begin + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/midicomp/midimon.opt b/lib/midicomp/midimon.opt new file mode 100644 index 00000000..62a11231 --- /dev/null +++ b/lib/midicomp/midimon.opt @@ -0,0 +1,34 @@ +[Compiler] +A=1 +B=0 +D=1 +F=0 +I=1 +K=1 +L=1 +P=1 +Q=0 +R=0 +S=1 +T=0 +U=1 +V=1 +W=0 +X=1 +Y=1 + +[Linker] +MapFile=0 +LinkBuffer=0 +DebugInfo=1 +OptimizeExe=0 +StackSize=16384 +HeapSize=8192 + +[Directories] +OutputDir= +SearchPath= +Conditionals= + +[Parameters] +RunParams= diff --git a/lib/midicomp/midimon.res b/lib/midicomp/midimon.res new file mode 100644 index 00000000..eb311fa1 Binary files /dev/null and b/lib/midicomp/midimon.res differ diff --git a/lib/midicomp/midimonp.dfm b/lib/midicomp/midimonp.dfm new file mode 100644 index 00000000..e4e8594c Binary files /dev/null and b/lib/midicomp/midimonp.dfm differ diff --git a/lib/midicomp/midimonp.pas b/lib/midicomp/midimonp.pas new file mode 100644 index 00000000..05555a70 --- /dev/null +++ b/lib/midicomp/midimonp.pas @@ -0,0 +1,180 @@ +{ $Header: F:/delphi/midi/vcs/midimonp.pas 1.10 03 Jul 1995 01:51:04 DAVEC $ } + +{ This demo shows how MidiInput and MidiOutput components can be used + interactively at design time on a form. + The monitor has one TMidiInput control, whose device ID is set interactively + at runtime using a combo box. + Anything received on the input device, including sysex data, is displayed by + the monitor and echoed to the selected output device. } + +unit Midimonp; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, MMSystem, Delphmcb, StdCtrls, MIDIIn, MidiOut, ExtCtrls, + Menus, monprocs; + +type + TForm1 = class(TForm) + MIDIInput1: TMIDIInput; + lstLog: TListBox; + pnlColumnHeading: TPanel; + MidiOutput1: TMidiOutput; + MainMenu1: TMainMenu; + File1: TMenuItem; + mnuExit: TMenuItem; + Label1: TLabel; + cmbInput: TComboBox; + cmbOutput: TComboBox; + Bevel1: TBevel; + procedure MIDIInput1MidiInput(Sender: TObject); + procedure LogMessage(ThisEvent:TMidiEvent); + procedure FormCreate(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure mnuExitClick(Sender: TObject); + procedure cmbInputChange(Sender: TObject); + procedure OpenDevs; + procedure CloseDevs; + private + logItemMax: Integer; + public + { Public declarations } + end; + +var + Form1: TForm1; + inh: HMidiIn; + +implementation + +{$R *.DFM} + + +procedure TForm1.LogMessage(ThisEvent:TMidiEvent); +{ Logging MIDI messages with a Windows list box is rather slow and ugly, + but it makes the example very simple. If you need a faster and less + flickery log you could port the rest of Microsoft's MIDIMON.C example. } +begin + if logItemMax > 0 then + begin + With lstLog.Items do + begin + if Count >= logItemMax then + Delete(0); + Add(MonitorMessageText(ThisEvent)); + end; + end; +end; + +procedure TForm1.MIDIInput1MidiInput(Sender: TObject); +var + thisEvent: TMidiEvent; +begin + with (Sender As TMidiInput) do + begin + while (MessageCount > 0) do + begin + + { Get the event as an object } + thisEvent := GetMidiEvent; + + { Log it } + LogMessage(thisEvent); + + { Echo to the output device } + MidiOutput1.PutMidiEvent(thisEvent); + + { Event was dynamically created by GetMidiEvent so must + free it here } + thisEvent.Free; + + end; + end; +end; + +procedure TForm1.OpenDevs; +begin + { Use selected devices } + MidiInput1.ProductName := cmbInput.Text; + MidiOutput1.ProductName := cmbOutput.Text; + { Open devices } + MidiInput1.Open; + MidiInput1.Start; + MidiOutput1.Open; +end; + +procedure TForm1.CloseDevs; +begin + MidiInput1.Close; + MidiOutput1.Close; +end; + + +procedure TForm1.FormCreate(Sender: TObject); +var + thisDevice: Word; +begin + { Load the lists of installed MIDI devices } + cmbInput.Clear; + for thisDevice := 0 To MidiInput1.NumDevs - 1 do + begin + MidiInput1.DeviceID := thisDevice; + cmbInput.Items.Add(MidiInput1.ProductName); + end; + cmbInput.ItemIndex := 0; + cmbOutput.Clear; + for thisDevice := 0 To MidiOutput1.NumDevs - 1 do + begin + MidiOutput1.DeviceID := thisDevice; + cmbOutput.Items.Add(MidiOutput1.ProductName); + end; + cmbOutput.ItemIndex := 0; + OpenDevs; +end; + +procedure TForm1.FormResize(Sender: TObject); +var + logTop: Integer; +const + logMargin = 8; +begin + { Set maximum items that can be stored in the list box without scrolling } + if lstLog.ItemHeight > 0 then + begin + logItemMax := (lstLog.Height div lstLog.ItemHeight)-1; + { If there are currently more items than the max, remove them + otherwise the list will have scrollbars when resized } + with lstLog.Items do + begin + while (Count >= logItemMax) and (Count > 0) do + Delete(0); + end; + end + else + logItemMax := 0; +end; + +procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); +begin + { This is not strictly necessary since the objects close themselves + when the form containing them is destroyed } + CloseDevs; +end; + +procedure TForm1.mnuExitClick(Sender: TObject); +begin + Application.Terminate; +end; + + +procedure TForm1.cmbInputChange(Sender: TObject); +begin + { Close and reopen devices with changed device selection } + CloseDevs; + OpenDevs; +end; + +end. diff --git a/lib/midicomp/midiout.pas b/lib/midicomp/midiout.pas new file mode 100644 index 00000000..7091111f --- /dev/null +++ b/lib/midicomp/midiout.pas @@ -0,0 +1,486 @@ +{ $Header: F:/delphi/midi/vcs/midiout.pas 1.5 03 Jul 1995 01:51:06 DAVEC $ } + +unit MidiOut; + +{ + MIDI Output component. + + Properties: + DeviceID: Windows numeric device ID for the MIDI output device. + Between 0 and (midioutGetNumDevs-1), or MIDI_MAPPER (-1). + Special value MIDI_MAPPER specifies output to the Windows MIDI mapper + Read-only while device is open, exception if changed while open + + MIDIHandle: The output handle to the MIDI device. + 0 when device is not open + Read-only, runtime-only + + ProductName: Name of the output device product that corresponds to the + DeviceID property (e.g. 'MPU 401 out'). + You can write to this while the device is closed to select a particular + output device by name (the DeviceID property will change to match). + Exception if this property is changed while the device is open. + + Numdevs: Number of MIDI output devices installed on the system. This + is the value returned by midiOutGetNumDevs. It's included for + completeness. + + See the MIDIOUTCAPS entry in MMSYSTEM.HLP for descriptions of the + following properties: + DriverVersion + Technology + Voices + Notes + ChannelMask + Support + + Error: The error code for the last MMSYSTEM error. See the MMSYSERR_ + entries in MMSYSTEM.INT for possible values. + + Methods: + Open: Open MIDI device specified by DeviceID property for output + + Close: Close device + + PutMidiEvent(Event:TMidiEvent): Output a note or sysex message to the + device. This method takes a TMidiEvent object and transmits it. + Notes: + 1. If the object contains a sysex event the OnMidiOutput event will + be triggered when the sysex transmission is complete. + 2. You can queue up multiple blocks of system exclusive data for + transmission by chucking them at this method; they will be + transmitted as quickly as the device can manage. + 3. This method will not free the TMidiEvent object, the caller + must do that. Any sysex data in the TMidiEvent is copied before + transmission so you can free the TMidiEvent immediately after + calling PutMidiEvent, even if output has not yet finished. + + PutShort(MidiMessage: Byte; Data1: Byte; Data2: Byte): Output a short + MIDI message. Handy when you can't be bothered to build a TMidiEvent. + If the message you're sending doesn't use Data1 or Data2, set them to 0. + + PutLong(SysexPointer: Pointer; msgLength: Word): Output sysex data. + SysexPointer: Pointer to sysex data to send + msgLength: Length of sysex data. + This is handy when you don't have a TMidiEvent. + + SetVolume(Left: Word, Right: Word): Set the volume of the + left and right channels on the output device (only on internal devices?). + 0xFFFF is maximum volume. If the device doesn't support separate + left/right volume control, the value of the Left parameter will be used. + Check the Support property to see whether the device supports volume + control. See also other notes on volume control under midiOutSetVolume() + in MMSYSTEM.HLP. + + Events: + OnMidiOutput: Procedure called when output of a system exclusive block + is completed. + + Notes: + I haven't implemented any methods for midiOutCachePatches and + midiOutCacheDrumpatches, mainly 'cause I don't have any way of testing + them. Does anyone really use these? +} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, MMSystem, Circbuf, Midiin; + +type + midioutputState = (mosOpen, mosClosed); + EmidioutputError = class(Exception); + + {-------------------------------------------------------------------} + { Derived from TWinControl because we need a window handle to receive + messages from the interrupt handler in the DLL } + TMidiOutput = class(TComponent) + private + Handle: THandle; { Window handle used for callback notification } + FDeviceID: Integer; { MIDI device ID } + FMIDIHandle: Hmidiout; { Handle to output device } + FState: midioutputState; { Current device state } + PCtlInfo: PMidiCtlInfo; { Pointer to control info for DLL } + + FError: Word; { Last MMSYSTEM error } + + { Stuff from midioutCAPS } + FDriverVersion: Version; { Driver version from midioutGetDevCaps } + FProductName: string; { product name } + FTechnology: Word; { Type of MIDI output device } + FVoices: Word; { Number of voices (internal synth) } + FNotes: Word; { Number of notes (internal synth) } + FChannelMask: Word; { Bit set for each MIDI channels that the + device responds to (internal synth) } + FSupport: Longint; { Technology supported (volume control, + patch caching etc. } + FNumdevs: Word; { Number of MIDI output devices on system } + + + FOnMIDIOutput: TNotifyEvent; { Sysex output finished } + + protected + procedure MidiOutput(var Message: TMessage); + procedure SetDeviceID(DeviceID: Integer); + procedure SetProductName( NewProductName: String ); + function midioutErrorString( WError: Word ): String; + + public + { Properties } + property MIDIHandle: Hmidiout read FMIDIHandle; + property DriverVersion: Version { Driver version from midioutGetDevCaps } + read FDriverVersion; + property Technology: Word { Type of MIDI output device } + read FTechnology; + property Voices: Word { Number of voices (internal synth) } + read FVoices; + property Notes: Word { Number of notes (internal synth) } + read FNotes; + property ChannelMask: Word { Bit set for each MIDI channels that the } + read FChannelMask; { device responds to (internal synth) } + property Support: Longint { Technology supported (volume control, } + read FSupport; { patch caching etc. } + property Error: Word read FError; + property Numdevs: Word read FNumdevs; + + { Methods } + function Open: Boolean; + function Close: Boolean; + procedure PutMidiEvent( theEvent: TMidiEvent); + procedure PutShort(MidiMessage: Byte; Data1: Byte; Data2: Byte); + procedure PutLong(SysexPointer: Pointer; msgLength: Word); + + procedure SetVolume( Left: Word; Right:Word ); + constructor Create(AOwner:TComponent); override; + destructor Destroy; override; + + { Some functions to decode and classify incoming messages would be nice } + + published + { TODO: Property editor with dropdown list of product names } + property ProductName: String read FProductName write SetProductName; + + property DeviceID: Integer read FDeviceID write SetDeviceID default 0; + { TODO: midiOutGetVolume? Or two properties for Left and Right volume? + Is it worth it?? + midiOutMessage?? Does anyone use this? } + + { Events } + property Onmidioutput: TNotifyEvent + read FOnmidioutput + write FOnmidioutput; +end; + +procedure Register; + +{-------------------------------------------------------------------} +implementation + +{ This is the callback procedure in the external DLL. + It's used when midioutOpen is called by the Open method. + There are special requirements and restrictions for this callback + procedure (see midioutOpen in MMSYSTEM.HLP) so it's impractical to + make it an object method } +function midiHandler( + hmidiout: Hmidiout; + wMsg: Word; + dwInstance: Longint; + dwParam1: Longint; + dwParam2: Longint): Boolean; far; external 'DELPHMID'; + + +{-------------------------------------------------------------------} +constructor Tmidioutput.Create(AOwner:TComponent); +begin + inherited Create(AOwner); + FState := mosClosed; + FNumdevs := midiOutGetNumDevs; + + { Set defaults } + SetDeviceID(0); { TODO: Exception if no MIDI devices installed? } + + { Create the window for callback notification } + if not (csDesigning in ComponentState) then + begin + Handle := AllocateHwnd(MidiOutput); + end; + +end; + +{-------------------------------------------------------------------} +destructor Tmidioutput.Destroy; +begin + if FState = mosOpen then + Close; + if (PCtlInfo <> Nil) then + GlobalSharedLockedFree( PCtlinfo^.hMem, PCtlInfo ); + DeallocateHwnd(Handle); + inherited Destroy; +end; + +{-------------------------------------------------------------------} +{ Convert the numeric return code from an MMSYSTEM function to a string + using midioutGetErrorText. TODO: These errors aren't very helpful + (e.g. "an invalid parameter was passed to a system function") so + some proper error strings would be nice. } +function Tmidioutput.midioutErrorString( WError: Word ): String; +var + errorDesc: PChar; +begin + try + errorDesc := StrAlloc(MAXERRORLENGTH); + if midioutGetErrorText(WError, errorDesc, MAXERRORLENGTH) = 0 then + result := StrPas(errorDesc) + else + result := 'Specified error number is out of range'; + finally + StrDispose(errorDesc); + end; +end; + +{-------------------------------------------------------------------} +{ Set the output device ID and change the other properties to match } +procedure Tmidioutput.SetDeviceID(DeviceID: Integer); +var + midioutCaps: TmidioutCaps; +begin + if FState = mosOpen then + raise EmidioutputError.Create('Change to DeviceID while device was open') + else + if (DeviceID >= midioutGetNumDevs) And (DeviceID <> MIDI_MAPPER) then + raise EmidioutputError.Create('Invalid device ID') + else + begin + FDeviceID := DeviceID; + + { Set the name and other midioutCAPS properties to match the ID } + FError := + midioutGetDevCaps(DeviceID, @midioutCaps, sizeof(TmidioutCaps)); + if Ferror > 0 then + raise EmidioutputError.Create(midioutErrorString(FError)); + + with midiOutCaps do + begin + FProductName := StrPas(szPname); + FDriverVersion := vDriverVersion; + FTechnology := wTechnology; + FVoices := wVoices; + FNotes := wNotes; + FChannelMask := wChannelMask; + FSupport := dwSupport; + end; + + end; +end; + +{-------------------------------------------------------------------} +{ Set the product name property and put the matching output device number + in FDeviceID. + This is handy if you want to save a configured output/output device + by device name instead of device number, because device numbers may + change if users install or remove MIDI devices. + Exception if output device with matching name not found, + or if output device is open } +procedure Tmidioutput.SetProductName( NewProductName: String ); +var + midioutCaps: TmidioutCaps; + testDeviceID: Integer; + testProductName: String; +begin + if FState = mosOpen then + raise EmidioutputError.Create('Change to ProductName while device was open') + else + begin + { Loop uses -1 to test for MIDI_MAPPER as well } + for testDeviceID := -1 To (midioutGetNumDevs-1) do + begin + FError := + midioutGetDevCaps(testDeviceID, @midioutCaps, sizeof(TmidioutCaps)); + if Ferror > 0 then + raise EmidioutputError.Create(midioutErrorString(FError)); + testProductName := StrPas(midioutCaps.szPname); + if testProductName = NewProductName then + begin + FProductName := NewProductName; + Break; + end; + end; + if FProductName <> NewProductName then + raise EmidioutputError.Create('MIDI output Device ' + + NewProductName + ' not installed') + else + SetDeviceID(testDeviceID); + end; +end; + + +{-------------------------------------------------------------------} +function Tmidioutput.Open: Boolean; +var + hMem: THandle; +begin + try + { Create the control info for the DLL } + if (PCtlInfo = Nil) then + begin + PCtlInfo := GlobalSharedLockedAlloc( Sizeof(TCtlInfo), hMem ); + PctlInfo^.hMem := hMem; + end; + + PctlInfo^.pBuffer := Nil; { Not used for output } + Pctlinfo^.hWindow := Handle; { Control's window handle } + FError := midioutOpen(@FMidiHandle, FDeviceId, + Longint(@midiHandler), + Longint(PCtlInfo), + CALLBACK_FUNCTION); + If (FError <> 0) then + { TODO: use CreateFmtHelp to add MIDI device name/ID to message } + raise EmidioutputError.Create(midioutErrorString(FError)); + + FState := mosOpen; + + except + if PCtlInfo <> Nil then + begin + GlobalSharedLockedFree(PCtlInfo^.hMem, PCtlInfo); + PCtlInfo := Nil; + end; + end; + +end; + +{-------------------------------------------------------------------} +procedure TMidiOutput.PutShort(MidiMessage: Byte; Data1: Byte; Data2: Byte); +var + thisMsg: Longint; +begin + thisMsg := Longint(MidiMessage) Or + (Longint(Data1) shl 8) Or + (Longint(Data2) shl 16); + + FError := midiOutShortMsg(FMidiHandle, thisMsg); + if Ferror > 0 then + raise EmidioutputError.Create(midioutErrorString(FError)); +end; + +{-------------------------------------------------------------------} +procedure TMidiOutput.PutLong(SysexPointer: Pointer; msgLength: Word); +{ Notes: This works asynchronously; you send your sysex output by +calling this function, which returns immediately. When the MIDI device +driver has finished sending the data the MidiOutPut function in this +component is called, which will in turn call the OnMidiOutput method +if the component user has defined one. } + +var + MyMidiHdr: TMyMidiHdr; +begin + { Initialize the header and allocate buffer memory } + MyMidiHdr := TMyMidiHdr.Create(msgLength); + + { Copy the data over to the MidiHdr buffer + We can't just use the caller's PChar because the buffer memory + has to be global, shareable, and locked. } + StrMove(MyMidiHdr.SysexPointer, SysexPointer, msgLength); + + { Store the MyMidiHdr address in the header so we can find it again quickly } + MyMidiHdr.hdrPointer^.dwUser := Longint(MyMidiHdr); + + { Get MMSYSTEM's blessing for this header } + FError := midiOutPrepareHeader(FMidiHandle,MyMidiHdr.hdrPointer, + sizeof(TMIDIHDR)); + if Ferror > 0 then + raise EMidiOutputError.Create(MidiOutErrorString(FError)); + + { Send it } + FError := midiOutLongMsg(FMidiHandle, MyMidiHdr.hdrPointer, + sizeof(TMIDIHDR)); + if Ferror > 0 then + raise EMidiOutputError.Create(MidiOutErrorString(FError)); + +end; + +{-------------------------------------------------------------------} +procedure Tmidioutput.PutMidiEvent(theEvent:TMidiEvent); +var + thisMsg: Longint; +begin + if FState <> mosOpen then + raise EMidiOutputError.Create('MIDI Output device not open'); + + with theEvent do + begin + if Sysex = Nil then + begin + PutShort(MidiMessage, Data1, Data2) + end + else + PutLong(Sysex, SysexLength); + end; +end; + +{-------------------------------------------------------------------} +function Tmidioutput.Close: Boolean; +begin + if FState = mosOpen then + begin + FError := midioutReset(FMidiHandle); + if Ferror <> 0 then + raise EMidiOutputError.Create(MidiOutErrorString(FError)); + + FError := midioutClose(FMidiHandle); + if Ferror <> 0 then + raise EMidiOutputError.Create(MidiOutErrorString(FError)); + end; + + FMidiHandle := 0; + FState := mosClosed; + +end; + +{-------------------------------------------------------------------} +procedure TMidiOutput.SetVolume( Left: Word; Right:Word ); +var + dwVolume: Longint; +begin + dwVolume := (Longint(Left) shl 16) Or Right; + FError := midiOutSetVolume(DeviceID, dwVolume); + if Ferror <> 0 then + raise EMidiOutputError.Create(MidiOutErrorString(FError)); +end; + +{-------------------------------------------------------------------} +procedure Tmidioutput.midioutput( var Message: TMessage ); +{ Triggered when sysex output from PutLong is complete } +var + MyMidiHdr: TMyMidiHdr; + thisHdr: PMidiHdr; +begin + if Message.Msg = Mom_Done then + begin + { Find the MIDIHDR we used for the output. Message.lParam is its address } + thisHdr := PMidiHdr(Message.lParam); + + { Remove it from the output device } + midiOutUnprepareHeader(FMidiHandle, thisHdr, sizeof(TMIDIHDR)); + + { Get the address of the MyMidiHdr containing this MIDIHDR. + We stored this address in the PutLong procedure } + MyMidiHdr := TMyMidiHdr(thisHdr^.dwUser); + + { Header and copy of sysex data no longer required since output is complete } + MyMidiHdr.Free; + + { Call the user's event handler if any } + if Assigned(FOnmidioutput) then + FOnmidioutput(Self); + end; +end; + +{-------------------------------------------------------------------} +procedure Register; +begin + RegisterComponents('Samples', [Tmidioutput]); +end; + +end. diff --git a/lib/midicomp/monprocs.pas b/lib/midicomp/monprocs.pas new file mode 100644 index 00000000..2011e522 --- /dev/null +++ b/lib/midicomp/monprocs.pas @@ -0,0 +1,144 @@ +{ $Header: F:/delphi/midi/vcs/monprocs.pas 1.1 03 Jul 1995 01:51:06 DAVEC $ } + +unit Monprocs; + +interface + +uses Sysutils, MidiIn; + +type + TEventNames = array[1..8] of string[24]; + TSysMsgNames = array[1..16] of string[24]; +const + EventNames: TEventNames = ( + 'Note Off', + 'Note On', + 'Key Aftertouch', + 'Control Change', + 'Program Change', + 'Channel Aftertouch', + 'Pitch Bend', + 'System Message' ); + SysMsgNames: TSysMsgNames = ( + 'System Exclusive', + 'MTC Quarter Frame', + 'Song Position Pointer', + 'Song Select', + 'Undefined', + 'Undefined', + 'Tune Request', + 'System Exclusive End', + 'Timing Clock', + 'Undefined', + 'Start', + 'Continue', + 'Stop', + 'Undefined', + 'Active Sensing', + 'System Reset'); + + format3 = '%4.4x%4.4x %2.2x %2.2x %2.2x %s'; + format2 = '%4.4x%4.4x %2.2x %2.2x %s'; + format1 = '%4.4x%4.4x %2.2x %s'; + + function BinaryToHexList( bin: PChar; binSize: Word ): String; + function MonitorMessageText( ThisEvent: TMidiEvent ): String; + +implementation + +function BinaryToHexList( bin: PChar; binSize: Word ): String; +var + ctr: Word; + thisChar: Char; +begin + if binSize > 200 then + binSize := 200; + + Result := ''; + for ctr := 0 to binSize-1 do + begin + thisChar := bin^; + Result := Result + Format('%2.2x ', [Integer(thisChar)]); + Inc(bin); + end; +end; + +{ Converts MIDI event to text description. Straight out of Microsoft MIDIMON example } +function MonitorMessageText( ThisEvent: TMidiEvent ): String; +var + bStatus: Byte; + EventDesc: String; + TimeLow: Word; + TimeHigh: Word; +begin + bStatus := ThisEvent.MidiMessage And $f0; + TimeHigh := Word(ThisEvent.Time Div 65536); + TimeLow := Word(ThisEvent.Time MOD 65536); + + EventDesc := 'Unrecognized MIDI Event'; + + case bStatus of + + { 3-byte events } + MIDI_NOTEOFF, + MIDI_NOTEON, + MIDI_KEYAFTERTOUCH, + MIDI_CONTROLCHANGE, + MIDI_PITCHBEND: + begin + { Note on with velocity of 0 is a Note Off } + if (bStatus = MIDI_NOTEON) And (ThisEvent.Data2 = 0) then + bStatus := MIDI_NOTEOFF; + EventDesc := Format(format3, + [TimeHigh, TimeLow, + ThisEvent.MidiMessage, + ThisEvent.Data1, + ThisEvent.Data2, + EventNames[ ((ThisEvent.MidiMessage-$80) Div 16) + 1 ]]); + end; + { 2-byte events } + MIDI_PROGRAMCHANGE, + MIDI_CHANAFTERTOUCH: + begin + EventDesc := Format(format2,[TimeHigh, TimeLow, + ThisEvent.MidiMessage, + ThisEvent.Data1, + EventNames[ ((ThisEvent.MidiMessage-$80) Div 16) + 1 ]]); + end; + + { System events $f0-$ff } + MIDI_BEGINSYSEX: + begin + case ThisEvent.MidiMessage of + MIDI_BEGINSYSEX: + EventDesc := Format('Sysex (%d): ', [ThisEvent.SysexLength]) + + BinaryToHexList(ThisEvent.Sysex, ThisEvent.SysexLength); + + {2-byte system events} + MIDI_MTCQUARTERFRAME, + MIDI_SONGSELECT: + EventDesc := Format(format1,[TimeHigh, TimeLow, + ThisEvent.MidiMessage, + ThisEvent.Data1, + SysMsgNames[ (ThisEvent.MidiMessage And $f) +1 ]]); + + {3-byte system events} + MIDI_SONGPOSPTR: + EventDesc := Format(format3,[TimeHigh, TimeLow, + ThisEvent.MidiMessage, + ThisEvent.Data1, + ThisEvent.Data2, + SysMsgNames[ (ThisEvent.MidiMessage And $f) +1 ]]); + + {1-byte system events} + else + EventDesc := Format(format1,[TimeHigh, TimeLow, + ThisEvent.MidiMessage, + SysMsgNames[ (ThisEvent.MidiMessage And $f) +1 ]]); + end; + end; + end; + Result := EventDesc; +end; + +end. diff --git a/lib/midicomp/multimnp.dfm b/lib/midicomp/multimnp.dfm new file mode 100644 index 00000000..6496a905 Binary files /dev/null and b/lib/midicomp/multimnp.dfm differ diff --git a/lib/midicomp/multimnp.pas b/lib/midicomp/multimnp.pas new file mode 100644 index 00000000..51b82a7e --- /dev/null +++ b/lib/midicomp/multimnp.pas @@ -0,0 +1,144 @@ +{ $Header: F:/delphi/midi/vcs/multimnp.pas 1.2 02 Jul 1995 00:51:04 DAVEC $ } + +{ This demo shows how MIDI input devices can be created at runtime. + It creates one MidiInput component for each physical MIDI input device + on the system, and uses a common input handler procedure to display + the input data, including the name of the input device. } + +unit Multimnp; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, MMSystem, StdCtrls, MIDIIn, MidiOut, ExtCtrls, + Menus, Monprocs; + +type + TForm1 = class(TForm) + lstLog: TListBox; + pnlColumnHeading: TPanel; + MainMenu1: TMainMenu; + File1: TMenuItem; + mnuExit: TMenuItem; + procedure MIDIInput1MidiInput(Sender: TObject); + procedure LogMessage(devName: String; ThisEvent:TMidiEvent); + procedure FormCreate(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure mnuExitClick(Sender: TObject); + private + logItemMax: Integer; + MidiInControls: TList; + public + { Public declarations } + end; + +var + Form1: TForm1; + inh: HMidiIn; + +implementation + +{$R *.DFM} + + +procedure TForm1.LogMessage(devName: String; ThisEvent: TMidiEvent); +{ Logging MIDI messages with a Windows list box is rather slow and ugly, + but it makes the example very simple. If you need a faster and less + flickery log you could port the rest of Microsoft's MIDIMON.C example. } +begin + if logItemMax > 0 then + begin + With lstLog.Items do + begin + if Count >= logItemMax then + Delete(0); + Add(Copy(devName,1,7) + ' ' + MonitorMessageText(ThisEvent)); + end; + end; +end; + +procedure TForm1.MIDIInput1MidiInput(Sender: TObject); +var + thisEvent: TMidiEvent; +begin + with (Sender As TMidiInput) do + begin + while (MessageCount > 0) do + begin + + { Get the event as an object } + thisEvent := GetMidiEvent; + + { Log it, using the name of the current device } + LogMessage(Copy(ProductName,1,7), thisEvent); + + { Event was dynamically created by GetMidiEvent so must + free it here } + thisEvent.Free; + + end; + end; +end; + +procedure TForm1.FormCreate(Sender: TObject); +var + testDeviceID: Word; + thisControl: TMidiInput; +begin + { Create and open one MIDI input control for each installed MIDI input device } + midiInControls := TList.Create; + if midiInGetNumDevs > 0 then + for testDeviceID := 0 To (midiInGetNumDevs-1) do + begin + thisControl := TMidiInput.Create(Self); + thisControl.DeviceID := testDeviceID; + thisControl.OnMidiInput := Form1.MIDIInput1MidiInput; + thisControl.Open; + thisControl.Start; + MidiInControls.Add(thisControl); + end; +end; + +procedure TForm1.FormResize(Sender: TObject); +var + logTop: Integer; +const + logMargin = 8; +begin + { Set maximum items that can be stored in the list box without scrolling } + if lstLog.ItemHeight > 0 then + begin + logItemMax := (lstLog.Height div lstLog.ItemHeight)-1; + { If there are currently more items than the max, remove them + otherwise the list will have scrollbars when resized } + with lstLog.Items do + begin + while (Count >= logItemMax) and (Count > 0) do + Delete(0); + end; + end + else + logItemMax := 0; +end; + +procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); +var + controlCtr: Integer; +begin + { This is not strictly necessary since the objects close themselves + when the form containing them is destroyed } + with MidiInControls do + if Count > 0 then + for controlCtr := 0 to Count-1 do + TMidiInput(Items[controlCtr]).Free; +end; + +procedure TForm1.mnuExitClick(Sender: TObject); +begin + Application.Terminate; +end; + + +end. diff --git a/lib/midicomp/multimon.dpr b/lib/midicomp/multimon.dpr new file mode 100644 index 00000000..8ab4a9bc --- /dev/null +++ b/lib/midicomp/multimon.dpr @@ -0,0 +1,15 @@ +program Multimon; + +uses + Forms, + Multimnp in 'MULTIMNP.PAS' {Form1}, + MIDIIn in 'MIDIIN.PAS', + Circbuf in 'CIRCBUF.PAS', + midiout in 'MIDIOUT.PAS'; + +{$R *.RES} + +begin + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/midicomp/multimon.opt b/lib/midicomp/multimon.opt new file mode 100644 index 00000000..62a11231 --- /dev/null +++ b/lib/midicomp/multimon.opt @@ -0,0 +1,34 @@ +[Compiler] +A=1 +B=0 +D=1 +F=0 +I=1 +K=1 +L=1 +P=1 +Q=0 +R=0 +S=1 +T=0 +U=1 +V=1 +W=0 +X=1 +Y=1 + +[Linker] +MapFile=0 +LinkBuffer=0 +DebugInfo=1 +OptimizeExe=0 +StackSize=16384 +HeapSize=8192 + +[Directories] +OutputDir= +SearchPath= +Conditionals= + +[Parameters] +RunParams= diff --git a/lib/midicomp/multimon.res b/lib/midicomp/multimon.res new file mode 100644 index 00000000..eb311fa1 Binary files /dev/null and b/lib/midicomp/multimon.res differ diff --git a/lib/midicomp/readme.txt b/lib/midicomp/readme.txt new file mode 100644 index 00000000..d987b9a4 --- /dev/null +++ b/lib/midicomp/readme.txt @@ -0,0 +1,42 @@ + Delphi MIDI I/O Components Version 1.0 4 July 1995 + -------------------------- ------------------------ + + These components handle low-level MIDI input and output using the +Windows multimedia MIDI functions. They encapsulate all the nasty +low-level stuff into some intermediate-level components. They support +both short MIDI messages (e.g. note on/off, program change) and long +MIDI messages (e.g. system exclusive, sample dumps). + + To install the components: + + 1. Use Delphi's Options|Install Components to install MIDIIN.PAS and + MIDIOUT.PAS. This should give you MIDI input and output components + on the Samples tab. + + 2. Load the project DELPHMID and select Compile|Build All to build + DELPHMID.DLL. + + 3. Load the project MIDIMON and try running it. + + There's no formal documentation, but there are lists of properties, +methods, and events in the headers of MIDIIN.PAS and MIDIOUT.PAS. +There's also a couple of example projects: MIDIMON.PAS is a simple +monitor that demonstrates using components created at design time, +and MULTIMON.PAS demonstrates using multiple input and output components +created at runtime. + + If you need to know more about MIDI messages you can get a nice package +of MIDI documentation by sending an email message to +listserv@auvm.american.edu with GET MIDISPEC PACKAGE in the message +body. + + These components are in the public domain so feel free to produce +any type of program based on them. + + The components were thrown together fairly quickly and still have a few +rough edges. As they're my first Delphi components I'd appreciate any +feedback and suggestions for improvement. Of course there may be a few +bugs, so if you find any please let me know. My email address is +dchurcher@cix.compulink.co.uk. + + diff --git a/lib/nfigrid/GridWizard.dcu b/lib/nfigrid/GridWizard.dcu new file mode 100644 index 00000000..d1cdecd7 Binary files /dev/null and b/lib/nfigrid/GridWizard.dcu differ diff --git a/lib/nfigrid/GridWizard.dfm b/lib/nfigrid/GridWizard.dfm new file mode 100644 index 00000000..b5f73ea2 Binary files /dev/null and b/lib/nfigrid/GridWizard.dfm differ diff --git a/lib/nfigrid/NFIGrid.dcu b/lib/nfigrid/NFIGrid.dcu new file mode 100644 index 00000000..185ab061 Binary files /dev/null and b/lib/nfigrid/NFIGrid.dcu differ diff --git a/lib/nfigrid/Sample.zip b/lib/nfigrid/Sample.zip new file mode 100644 index 00000000..9eafb83a Binary files /dev/null and b/lib/nfigrid/Sample.zip differ diff --git a/lib/nfigrid/Sample/NFITest.dof b/lib/nfigrid/Sample/NFITest.dof new file mode 100644 index 00000000..8d673923 --- /dev/null +++ b/lib/nfigrid/Sample/NFITest.dof @@ -0,0 +1,45 @@ +[Compiler] +A=1 +B=0 +C=0 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=0 +Z=1 +ShowHints=0 +ShowWarnings=0 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= +[Directories] +OutputDir= +SearchPath= +Conditionals= +[Parameters] +RunParams= diff --git a/lib/nfigrid/Sample/NFITest.dpr b/lib/nfigrid/Sample/NFITest.dpr new file mode 100644 index 00000000..d136aaa8 --- /dev/null +++ b/lib/nfigrid/Sample/NFITest.dpr @@ -0,0 +1,13 @@ +program NFITest; + +uses + Forms, + NFIunit1 in 'NFIunit1.pas' {Form1}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/nfigrid/Sample/NFITest.res b/lib/nfigrid/Sample/NFITest.res new file mode 100644 index 00000000..69f7f345 Binary files /dev/null and b/lib/nfigrid/Sample/NFITest.res differ diff --git a/lib/nfigrid/Sample/NFIunit1.dcu b/lib/nfigrid/Sample/NFIunit1.dcu new file mode 100644 index 00000000..25151db7 Binary files /dev/null and b/lib/nfigrid/Sample/NFIunit1.dcu differ diff --git a/lib/nfigrid/Sample/NFIunit1.dfm b/lib/nfigrid/Sample/NFIunit1.dfm new file mode 100644 index 00000000..222cae2a Binary files /dev/null and b/lib/nfigrid/Sample/NFIunit1.dfm differ diff --git a/lib/nfigrid/Sample/NFIunit1.pas b/lib/nfigrid/Sample/NFIunit1.pas new file mode 100644 index 00000000..fd3a9cb9 --- /dev/null +++ b/lib/nfigrid/Sample/NFIunit1.pas @@ -0,0 +1,113 @@ +// Simple Control useage sample by James Tallent +unit NFIunit1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + NFIGrid, StdCtrls; + +type + TForm1 = class(TForm) + NFIGrid1: TNFIGrid; + Button1: TButton; + Button2: TButton; + Button3: TButton; + Button4: TButton; + Button5: TButton; + Button6: TButton; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure Button4Click(Sender: TObject); + procedure NFIGrid1ButtonClick(Sender: TNFIGridItem; Button: TButton); + procedure Button5Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure Button6Click(Sender: TObject); + procedure NFIGrid1ComboBoxChange(Sender: TNFIGridItem; + ComboBox: TComboBox); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +//---------------------------------------- +procedure TForm1.Button1Click(Sender: TObject); + var Item1:TNFIGridItem; +begin + Item1 := NFIGrid1.items.itemforcell[1,1]; + if item1.checkbox.checked = true then item1.checkbox.checked := false else + if item1.checkbox.checked = false then item1.checkbox.checked := true; +end; +//------------------------------------------ +procedure TForm1.Button2Click(Sender: TObject); + var Item1:TNFIGridItem; +begin + Item1 := NFIGrid1.items.itemforcell[0,2]; + item1.checkbox.text := 'Caption 2'; +end; +//----------------------------------------- +procedure TForm1.Button3Click(Sender: TObject); + var Item1:TNFIGridItem; + var j:word; +begin + NFIGrid1.rowcount := NFIGrid1.rowcount + 1; + j := NFIGrid1.rowcount-1; + NFIGrid1.items.Add(0, j, grtCheckBox); + Item1 := NFIGrid1.items.itemforcell[0,j]; + item1.checkbox.checked := true; + item1.checkbox.text := 'Caption '+inttostr(j); + +end; +//------------------------------------- +procedure TForm1.Button4Click(Sender: TObject); + var Item1:TNFIGridItem; +begin + Item1 := NFIGrid1.items.itemforcell[1,3]; + item1.combobox.itemindex := 1; +end; +//----------------------------------- +procedure TForm1.NFIGrid1ButtonClick(Sender: TNFIGridItem; + Button: TButton); +begin + MessageDlg('You Clicked the NFI Button in Col: '+inttostr(NFIGrid1.col)+' Row: '+inttostr(NFIGrid1.row), mtInformation,[mbOk], 0); + +end; +//------------------------------------- +procedure TForm1.Button5Click(Sender: TObject); + var Item1:TNFIGridItem; +begin + Item1 := NFIGrid1.items.itemforcell[1,6]; + Item1.text := 'Hello World'; +end; +//------------------------------------ +procedure TForm1.FormCreate(Sender: TObject); + var Item1:TNFIGridItem; +begin + Item1 := NFIGrid1.items.itemforcell[1,3]; + item1.combobox.itemindex := 0; + + Item1 := NFIGrid1.items.itemforcell[0,2]; + item1.combobox.itemindex := 2; +end; +//------------------------------------ +procedure TForm1.Button6Click(Sender: TObject); +begin + close; +end; + +procedure TForm1.NFIGrid1ComboBoxChange(Sender: TNFIGridItem; + ComboBox: TComboBox); +begin + MessageDlg('You Clicked the NFI Button in Col: '+inttostr(NFIGrid1.col)+' Row: '+inttostr(NFIGrid1.row), mtInformation,[mbOk], 0); +end; + +end. diff --git a/lib/nfigrid/Sample/NFIunit1.~df b/lib/nfigrid/Sample/NFIunit1.~df new file mode 100644 index 00000000..9642c176 Binary files /dev/null and b/lib/nfigrid/Sample/NFIunit1.~df differ diff --git a/lib/nfigrid/Sample/NFIunit1.~pa b/lib/nfigrid/Sample/NFIunit1.~pa new file mode 100644 index 00000000..ec545a7a --- /dev/null +++ b/lib/nfigrid/Sample/NFIunit1.~pa @@ -0,0 +1,105 @@ +// Simple Control useage sample by James Tallent +unit NFIunit1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + NFIGrid, StdCtrls; + +type + TForm1 = class(TForm) + NFIGrid1: TNFIGrid; + Button1: TButton; + Button2: TButton; + Button3: TButton; + Button4: TButton; + Button5: TButton; + Button6: TButton; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure Button4Click(Sender: TObject); + procedure NFIGrid1ButtonClick(Sender: TNFIGridItem; Button: TButton); + procedure Button5Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure Button6Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +//---------------------------------------- +procedure TForm1.Button1Click(Sender: TObject); + var Item1:TNFIGridItem; +begin + Item1 := NFIGrid1.items.itemforcell[1,1]; + if item1.checkbox.checked = true then item1.checkbox.checked := false else + if item1.checkbox.checked = false then item1.checkbox.checked := true; +end; +//------------------------------------------ +procedure TForm1.Button2Click(Sender: TObject); + var Item1:TNFIGridItem; +begin + Item1 := NFIGrid1.items.itemforcell[0,2]; + item1.checkbox.text := 'Caption 2'; +end; +//----------------------------------------- +procedure TForm1.Button3Click(Sender: TObject); + var Item1:TNFIGridItem; + var j:word; +begin + NFIGrid1.rowcount := NFIGrid1.rowcount + 1; + j := NFIGrid1.rowcount-1; + NFIGrid1.items.Add(0, j, grtCheckBox); + Item1 := NFIGrid1.items.itemforcell[0,j]; + item1.checkbox.checked := true; + item1.checkbox.text := 'Caption '+inttostr(j); + +end; +//------------------------------------- +procedure TForm1.Button4Click(Sender: TObject); + var Item1:TNFIGridItem; +begin + Item1 := NFIGrid1.items.itemforcell[1,3]; + item1.combobox.itemindex := 1; +end; +//----------------------------------- +procedure TForm1.NFIGrid1ButtonClick(Sender: TNFIGridItem; + Button: TButton); +begin + MessageDlg('You Clicked the NFI Button in Col: '+inttostr(NFIGrid1.col)+' Row: '+inttostr(NFIGrid1.row), mtInformation,[mbOk], 0); + +end; +//------------------------------------- +procedure TForm1.Button5Click(Sender: TObject); + var Item1:TNFIGridItem; +begin + Item1 := NFIGrid1.items.itemforcell[1,6]; + Item1.text := 'Hello World'; +end; +//------------------------------------ +procedure TForm1.FormCreate(Sender: TObject); + var Item1:TNFIGridItem; +begin + Item1 := NFIGrid1.items.itemforcell[1,3]; + item1.combobox.itemindex := 0; + + Item1 := NFIGrid1.items.itemforcell[0,2]; + item1.combobox.itemindex := 2; +end; +//------------------------------------ +procedure TForm1.Button6Click(Sender: TObject); +begin + close; +end; + +end. diff --git a/lib/nfigrid/nfigrid.upl b/lib/nfigrid/nfigrid.upl new file mode 100644 index 00000000..a8a20b50 --- /dev/null +++ b/lib/nfigrid/nfigrid.upl @@ -0,0 +1,31 @@ +[DSP upload] +FileName=nfigrid.zip +Replace File=nfigrid.zip +Version=2 +FileURL= +DirectFileURL= +Description=Enhanced grid featuring check boxes, bitmaps, combo boxes, individual cell fonts and colors and more. +Delphi 1.0=N +Delphi 2.0=N +Delphi 3.0=Y +C++Builder 1.0=N +File Status=Shareware +Full Source=not included +Group=Component/Code +Category=Improved Components +Platform=Windows 95 +Note= +Additional info= +[DSP Support] +DSP Support=N +[Versions available] +Delphi 1.0= +Delphi 2.0=nfigrid.zip +Delphi 3.0= +C++Builder 1.0= +[Uploader] +Author name=Ashley Godfrey +Author E-mail=nfi@post1.com +Author URL= +AuthorSpecialization= +count=0 diff --git a/lib/nkprn/NkPrinters.dcu b/lib/nkprn/NkPrinters.dcu new file mode 100644 index 00000000..19827037 Binary files /dev/null and b/lib/nkprn/NkPrinters.dcu differ diff --git a/lib/nkprn/NkPrinters.pas b/lib/nkprn/NkPrinters.pas new file mode 100644 index 00000000..79e23744 --- /dev/null +++ b/lib/nkprn/NkPrinters.pas @@ -0,0 +1,2113 @@ +///////////////////////////////////////////////// +// +// NkPrinters.pas +// +// Coded By T.Nakamura +// +// Ver. 0.1 1998.3.30 +// Ver. 0.11 1998.3.31 +// (1) BinNames 2Ԗڈȍ~̃rȂoOC +// (2) [N1C +// (3) PaperExtent Property ̏([U`TCY) 0.1mm Pʂ +// ȂĂ܂ĂoOCBPixel PʂƂB +// Ver. 0.12 1998.3.31 +// (1) DevMode \̂̕ύX DocumentProperties čs悤ɕύX +// Ver. 0.2 1998.4.2 +// (1) v^̃p[^•ςƑ̃p[^Zbg +// ܂ƂڂoOCB +// (2) Copies, MaxCopies, Collate property lj +// (3) MaxPaperExtebt, MinPaperExtent Property lj +// (4) v^̒lj폜ɑΉBOnSystemChanged Cxglj +// +// Ver. 0.21 1998.4.4 +// (1) Port ύXĂ IndexȂ悤ɂB +// ̂߃\[X啝CII Port ύX@\̏B +// (2) Demo ̏CBCopies/Collate @\ĂȂB +// (3) O̒`ׂ Exception ƓɂȂĂ̂ŁAp +// Ȃ悤ɏC(^^B +// +// Ver. 0.3 1998.4.5 +// (1) Color, Duplex, Scale, ColorBitCount ljB +// (2) Portnames. Port lj +// Ver. 0.31 1998.4.7 +// (1) MaxPaperExtent/MinPaperExtent property ̍폜 +// (2) delphi-cw 99 œ 炲񍐂̗L Collate +// oOC(Orientation 擾^ݒ肵Ă(^^;) +// (3) delphi-cw 99 œ 炲񍐂̗L MD-1300 ł̕s +// ɑΉB^r̍XVrƎ֌W Propety +// ANZX邽тɍs悤ɏCB +// +// Ver. 0.32 1998.4.9 +// (1) Ver 0.31 (3) ̑ΏŃfvOٗlɒxȂ邱ƔB +// Arꗗ̎擾 DocumentProperties xƂB +// TNkPrintDialog, TNkPrinterSetupDialog 𓱓邱ƂɌ߂B +// +// Ver. 0.4 1998.4.18 +// (1) ip Property lj +// Quality, Qualities NumQuality Property +// (2) HasPaperSizeNumber, HasBinNumber \bhlj +// (3) BinNumber Property ̒lj +// (4) PaperSize Property PaperSizeNumber Property ɉ +// (5) NumPaperSizes, NumBins Property lj +// (6) PaperNumbers, BinNumbers Property lj +// Ver 0.41 1998.4.19 +// (1) PaperExtent Property Ń[U`TCYݒ肷Ƃ Scale +// lĂȂ_CB +// (2) MMPageExtent(0.1mm Pʂ̈”\̈̑傫) Property lj +// (3) { T|[gĂȂꍇ Scale ̓ǂݏoł 100% +// Ԃ悤ɕύXB +// +// Ver 0.42 1998.4.27 +// (1) MMPaperExtent Property V݁B[U`TCY 0.1 mm Pʂ +// ݒł悤ɂB +// (2) NkPrinter IC or DC \킷 Handle Property lj +// (3) \킷APrinting Property lj +// Ver 0.43 1998.4.29 +// (1) Port lj^폜ɑΉ +// (2) |[gꗗɓ|[goĂ̂ɑΏ(ΏǗÖ@) +// Ver 0.44 1998.6.1 [X +// (1) wv쐬B +// (2) Property ̌^኱C +// Ver 0.45 1998.6.6 +// (1)v^TCYArAiAő啔 +// DeviceCapabilitites Œ񋟂ȂꍇL邱ƂɑΉB +// Ver 0.46 1998.6.8 +// (1) wvCB +// Ver 0.5 1998.9.13 +// (1) ApplySettings/DiscardModification \bh Modified vpeBljB +// v^ݒ̕ύX_CNgɃv^ɐݒ肹AApplySettings +// \bhňꊇݒ肷邱ƂɂB +// (2) MMPaperExtent/PaperExtent ǂݎpɕύXB[U`TCY +// 擾^ύXp UserPaperExtent V݁B + + +unit NkPrinters; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WinSpool; + +type + ENkPrinter = class(Exception); + ENKPrinterRangeError = class(ENkPrinter); // v^[ݒp[^ + // ͈̓G[O + ENKPrinterPaperSizeError = class(ENkPrinter); // T|[gĂȂTCY + ENkPrinterBinError = class(ENkPrinter); // T|[gĂȂr + ENkPrinterNoPrinter = class(ENkPrinter); // v^[ + ENkPrinterNotSupported = class(ENkPrinter); // T|[gĂȂ@\ + // gƂ + ENkPrinterNoInfo = class(ENkPrinter); // 񂪒񋟂ĂȂ + ENkPrinterIllegalIndex = class(ENkPrinter); // PrinterIndex Bꂽ + ENkPrinterNoUserPaperExtent = class(ENkPrinter);// [U`TCY擾s // v^wĂB + + // v^̃T|[gĂ@\ + TNkPrintCap = (nkPcOrientation, // ̕ + nkPcPaperSize, // ̃TCY + nkPcPaperlength, // ̒i[U`TCYj + nkPcPaperWidth, // ̕i[U`TCYj + nkPcScale, // XP[O + nkPcCopies, // + nkPcDefaultSource, // r + nkPcPrintQuality, // i + nkPcColor, // J[ + nkPcDuplex, // ʈ + nkPcYResolution, // Y 𑜓x + nkPcTTOption, // True Type Option + nkPcCollate, // + nkPcFormName, // tH[ + nkPcLogPixels, // _C` + nkPcMediaType, // fBA^Cv + nkPcDitherType // fBU^Cv + ); + + TNkPrintCaps = set of TNkPrintCap; // T|[g@\̏W + + TNkPaperOrientation = (nkOrPortrait, // ̕F c + nkOrLandScape // ̕F + ); + TNkDuplex = (nkDupSimplex, // Ж + nkDupHorizontal, // + nkDupVertical // + ); + + TNkAvailInfo = (nkAvPaperSize, // TCYL + nkAvBin, // rL + nkAvQuality, // iL + nkAvMaxCopies); // ő啔L + + TNkAvailInfos = set of TNkAvailInfo; // L̏W + + + // EnumPrinters Ŏoi[NXB + TNkAllPrintersInfo = class + private + pPrintersInfo: Pointer; // Printer_Info_2 ̔zւ̃|C^B + nPrinters: DWORD; // v^̐iBꂽv^܂ށj + + function GetName(Index: Integer): string; // v^̎o + function GetAttributes(Index: Integer): DWORD; // ̎o + public + constructor Create; // Sv^̏擾 + destructor Destroy; override; + + // Sv^̔r + function Compare(Another: TNkAllPrintersInfo): Boolean; + // v^iBꂽv^܂ށj + property Count: DWORD read nPrinters; + //v^ + property Name[Index: Integer]: string read GetName; + //v^̑ + property Attributes[Index: Integer]: DWORD read GetAttributes; + end; + + // GetInfo, SetInfo, Release Info ̃p[^̌^ + TNkPrinterInfo = record + Device, Driver, Port: array[0..511] of Char; + hDevMode: THandle; + pDevMode: PDEVICEMODE; + end; + + TNkPrinter = class + private + AllInfo: TNkAllPrintersInfo; // Sv^ + pPaperNumbers: Pointer; // T|[g鎆TCYԍ̔zێ + FPaperNames: TStrings; // T|[g鎆TCY̔z + + pBinNumbers: Pointer; // T|[grԍ̔z + FBinNames: TStringList; // T|[gr̔zB + + pResolutions: Pointer; // T|[g𑜓x̔z + FNumResolutions: Integer; // T|[g𑜓x̐ + + FPrinterNames: TStringList; // v^[̔z + FPortNames: TStringList; // |[g̔z + FMaxCopies: Integer; // ő啔 + + FIndex: Integer; // Printer.PrinterIndex ̒lZ[u + // Printer.PrinterIndex ύXꂽ + // o邽߂ɗpB + + FOnSystemChanged: TNotifyEvent; // VXeύX̃CxgB + // v^̍폜ljߑ̂ɎgB + + FAvailInfos: TNkAvailInfos; // p”\ȏW + + + FModified: Boolean; // v^ݒ肪ύXꂽtOB + pSettings: PDEVICEMODE; // v^ݒ(DevMode)̃Rs[Bɐݒ + // ۑB + PortName: string; // v^ݒ̃|[gB + + + + // WM_WININICHANGE MptbN + function AppHook(var Msg: TMessage): Boolean; + + procedure CheckNoPrinter; // v^L邩`FbNBΗO + // B + + // w肳ꂽv^̋@\T|[gĂ邩`FbNB + procedure CheckSupport(Value: TNkPrintCap; str: string); + + + function GetInfo: TNkPrinterInfo; // v^̎擾 + procedure SetInfo(PrnInfo: TNkPrinterInfo); // v^̍XV + // v^[̉ + procedure ReleaseInfo(PrnInfo: TNkPrinterInfo); + + procedure GetSettings; // v^ݒ̎擾 + + + ////////////// + // TNkPrinter ̏XV + procedure GetPaperSizes; // TCY̎擾 + procedure GetBins; // r̎擾 + procedure GetResolutions; // 𑜓x̎擾 + procedure GetMaxCopiesInfo; // ő啔̎擾 + procedure Update; // v^̊e̍XV + + + + + //////////////////// + // ֌W property ANZX\bh + // + + // PaperSizeNumber Property ̃ANZX\bh + function GetPaperSizeNumber: Integer; + procedure SetPaperSizeNumber(Value: Integer); + + // PaperSizeNames Property ̃ANZX\bh + function GetPaperSizeNames: TStrings; + + // PaperSizeIndex Property ̃ANZX\bh + function GetPaperSizeIndex: Integer; + procedure SetPaperSizeIndex(Value: Integer); + + // NumPaperSizes propety ̃ANZX\bh + function GetNumPaperSizes: Integer; + + // paperSizeNumbers Property ̃ANZX\bh + function GetPaperSizeNumbers(Index: Integer): Integer; + + // PageExtent property ̃ANZX\bh + function GetPageExtent: TSize; + + // MMPageExtent property ̃ANZX\bh + function GetMMPageExtent: TSize; + + // DPI Proeprty ̃ANZX\bh + function GetDPI: TSize; + + // PaperExtent Property ̃ANZX\bh + function GetPaperExtent: TSize; + + // MMPaperExtent Property ̃ANZX\bh + function GetMMPaperExtent: TSize; + + // UserPaperExtent Property ̃ANZX\bh + function GetUserPaperExtent: TSize; + procedure SetUserPaperExtent(Value: TSize); + + + // Offset Property ̃ANZX\bh + function GetOffset: TSize; + + + + //////////////////// + // Bin ֌W property ANZX\bh + // + + // Bin Property ̃ANZX\bh + function GetBinNumber: Integer; + procedure SetBinNumber(Value: Integer); + + // BinNames Property ̃ANZX\bh + function GetBinNames: TStrings; + + // BinIndex Property ̃ANZX\bh + function GetBinIndex: Integer; + procedure SetBinIndex(Value: Integer); + + // NumBins property ̃ANZX\bh + function GetNumBins: Integer; + + // BinNumbers property ̃ANZX\bh + function GetBinNumbers(Index: Integer): Integer; + + + //////////////////// + // i֌W property ̃ANZX\bh + // + + // Quality PropertyANZX\bhG + function GetQuality: TSize; + procedure SetQuality(Value: TSize); + + // Qualities Property ̃ANZX\bh + function GetQualities(Index: Integer): TSize; + + // NumQualities Property ̃ANZX\bh + function GetNumQualities: Integer; + + + + + //////////////////// + // |[g֌W property ̃ANZX\bh + // + + // PortNames Property ANZX\bh + function GetPortNames: TStrings; + + // Port Property ANZX\bh + function GetPort: string; + procedure SetPort(Value: string); + + + + + //////////////////// + // ̑ Property ̃ANZX\bh + // + // PrintCaps Property ̃ANZX\bh + function GetPrintCaps: TNkPrintCaps; + + // Orientation Property ̃ANZX\bh + function GetOrientation: TNkPaperOrientation; + procedure SetOrientation(Value: TNkPaperOrientation); + + // PrinterNames Property ̃ANZX\bh + function GetPrinterNames: TStrings; + + // MaxCopies Property ̃ANZX\bh + function GetMaxCopies: WORD; + + // Copies property ̃ANZX\bh + function GetCopies: WORD; + procedure SetCopies(Value: WORD); + + // Collate property ̃ANZX\bh + function GetCollate: Boolean; + procedure SetCollate(Value: Boolean); + + // Color property ̃ANZX\bh + function GetColor: Boolean; + procedure SetColor(Value: Boolean); + + // Duplex property ̃ANZX\bh + function GetDuplex: TNkDuplex; + procedure SetDuplex(Value: TNkDuplex); + + // Scale property ̃ANZX\bh + function GetScale: WORD; + procedure SetScale(Value: WORD); + + // ColorBitCount Property ANZX\bh + function GetColorBitCount: Integer; + + // Index Property ̃ANZX\bh + function GetIndex: Integer; + procedure SetIndex(Value: Integer); + + // Canvas Property ̃ANZX\bh + function GetCanvas: TCanvas; + + // Handle Property ̃ANZX\bh + function GetHandle: HDC; + + // Printing Property ̃ANZX\bh + function GetPrinting: Boolean; + + function GetAvailInfos: TNkAvailInfos; + + public + // RXgN^ fXgN^ + constructor Create; + destructor Destroy; override; + + + + + //////////////////// + // J \bh + // + + // ֌W̃\bh + procedure BeginDoc(Title: string); // Jn + procedure Abort; // ~ + procedure Newpage; // Vy[W + procedure EndDoc; // I + + + // TCYԍT|[gĂ邩`FbN郁\bh + function HasPaperSizeNumber(SizeNumber: Integer): Boolean; + + // rԍT|[gĂ邩`FbN郁\bh + function HasBinNumber(BinNumber: Integer): Boolean; + + // Iȃv^̍XV + procedure ForceUpdate; + + // v^ݒv^ɔf + procedure ApplySettings; + + // v^ݒ̕ύX̂Ă + procedure DiscardModification; + + + //////////////////// + // J vpeB + // + + // Canvas Property: NkPrinter Canvas + property Canvas: TCanvas read GetCanvas; + + // v^IC or DC; + property Handle: HDC read GetHandle; + + // tO + property Printing: Boolean read GetPrinting; + + // Cꂽݒ肪L邱ƂBv^̐ݒC True ɂȂ + // ApplySettings ĂŐݒv^ɑ False ɂȂB + + property Modified: Boolean read FModified; + + //////////// + // ֌W Porperty + // + + // PaperSizeNumber Property: TCY̔ԍB݂̎TCY̎QƁ^ݒ + // pBႦ A4 Zbgɂ DMPAPER_A4 + // ZbgB + property PaperSizeNumber: Integer read GetPaperSizeNumber + write SetPaperSizeNumber; + + // PaperSizeNames Property:TCY̔zBǂݍݐp + property PaperSizeNames: TStrings read GetPaperSizeNames; + + // PaperSizeIndex Property:TCỸCfbNXBTCY + // QƁ^ݒɗpBPaperSize Property Ƃ + // قȂATCY PaperSizeNames z + // CfbNXŎw肷 + property PaperSizeIndex: Integer read GetPaperSizeIndex + write SetPaperSizeIndex; + + // NumPaperSizes Property: TCY̐ + property NumPaperSizes: Integer read GetNumPaperSizes; + + // PaperSizeNumbers Property: TCYԍ̔zBǂݍݐp + property PaperSizeNumbers[Index: Integer]: Integer read GetpaperSizeNumbers; + + // ֘A Property + // PageExtent: ”\̈̑傫iPixel) + // MMPageExtent: ”\̈̑傫i0.1mm P) + // DPI: 𑜓x(Dot Per Inch) + // PaperExtent: ̑傫(Pixel) + // MMPaperExtent: ̑傫(0.1mm P) + // Offset: ̍[”\̈̍[܂ł̋(Pixel) + property PageExtent: TSize read GetPageExtent; + property MMPageExtent: TSize read GetMMPageExtent; + property DPI: TSize read GetDPI; + property PaperExtent: TSize read GetPaperExtent; + property MMPaperExtent: TSize read GetMMPaperExtent; + property UserPaperExtent: TSize read getUserPaperExtent + write SetUserPaperExtent; + property Offset: TSize read GetOffset; + + + + + //////////// + // r֌W Porperty + // + + // BinNumber Property: rԍ̎擾^ݒ + property BinNumber: Integer read GetBinNumber write SetBinNumber; + + // BinNames Property:r̔zBǂݍݐp + property BinNames: TStrings read GetBinNames; + + // BinIndex Property: r̃CfbNXBr + // QƁ^ݒɗpBr BinNames z + // CfbNXŎw肷 + property BinIndex: Integer read GetBinIndex + write SetBinIndex; + + // NumBins Property: r̐ + property NumBins: Integer read GetNumBins; + + // BinNumbers Property: rԍ̔zBǂݍݐp + property BinNumbers[Index: Integer]: Integer read GetBinNumbers; + + + + //////////// + // i֌W Porperty + // + + // Quality Property i + property Quality: TSize read GetQuality + write SetQuality; + + // NumQualites Property ii𑜓xj̐ + property NumQualities: Integer read GetNumQualities; + + // Qualities z Property ii𑜓xj̔z + property Qualities[Index: Integer]: TSize read GetQualities; + + + + + //////////// + // v^֌W Porperty + // + + // Index Property: ݑIĂv^̃CfbNXB + // CfbNXl PrinterNames z̃CfbNX + // ƓB-1 ƃftHgv^I + // łBPrinterNames źuBꂽvv^ + // ܂܂Ȃ߁APrinter.PrinterIndex Ƃ͒l + // قȂ̂ŒӁI + property Index: Integer read GetIndex + write SetIndex; + + // PrintCaps Property: ݑIĂv^̋@\ + property PrintCaps: TNkPrintCaps read GetPrintCaps; + + // PrinterNames Property: CXg[Ă邷ׂẴv^ + // zBuBꂽvv^͊܂܂ȂB + // ǂݏop + property PrinterNames: TStrings read GetPrinterNames; + + // PortNames Property: |[gꗗ + property PortNames: TStrings read GetPortNames; + + // Port Property |[g + property Port: string read GetPort write SetPort; + + + + + + + //////////// + // ̑ Porperty + // + + // Orientation Property: ̕QƁ^w肷B + property Orientation: TNkPaperOrientation read GetOrientation + write SetOrientation; + + // MaxCopies Property ő啔 + property MaxCopies: WORD read GetMaxCopies; + + // Copies Property + property Copies: WORD read GetCopies write SetCopies; + + // Collate Property + property Collate: Boolean read GetCollate write SetCollate; + + // Color Property J[^̎w + property Color: Boolean read GetColor write SetColor; + + // Duplex Property ʈ + property Duplex: TNkDuplex read GetDuplex write SetDuplex; + + // Scale Property { + property Scale: WORD read GetScale write SetScale; + + // ColorBitCount Property Frbg + property ColorBitCount: Integer read GetColorBitCount; + + // v^֘A̗LtO + property AvailInfos: TNkAvailInfos read GetAvailInfos; + + + ////////////////////// + // JCxg + // + + + // VXeύXCxgBv^̒lj폜ɋNB + property OnSystemChanged: TNotifyEvent read FOnSystemChanged + write FOnSystemChanged; + end; + + // NkPrinter p_CAO + TNkPrintDialog = class(TPrintDialog) + public + function Execute: Boolean; override; + end; + + // NkPrinter pݒ_CAO + TNkPrinterSetupDialog = class(TPrinterSetupDialog) + public + function Execute: Boolean; override; + end; + +procedure Register; + + +var + NkPrinter: TNkPrinter; + +implementation + +uses Printers; + +const PrintCapValues: array[0..16] of LongInt = + (DM_ORIENTATION, DM_PAPERSIZE, DM_PAPERLENGTH, DM_PAPERWIDTH, + DM_SCALE, DM_COPIES, DM_DEFAULTSOURCE, DM_PRINTQUALITY, + DM_COLOR, DM_DUPLEX, DM_YRESOLUTION, DM_TTOPTION, DM_COLLATE, + DM_FORMNAME, DM_LOGPIXELS, DM_MEDIATYPE, DM_DITHERTYPE); + +const OrientationValues: array[0..1] of LongInt = + (DMORIENT_PORTRAIT, DMORIENT_LANDSCAPE); + +const DuplexValues: array[0..2] of LongInt = + (DMDUP_SIMPLEX, DMDUP_HORIZONTAL, DMDUP_VERTICAL); + +type + TWORDArray = array[0..10000] of WORD; + PWORDArray = ^TWORDArray; + TNameArray = array[0..10000] of array[0..63] of Char; + PNameArray = ^TNameArray; + TBinNameArray = array[0..10000] of array[0..23] of Char; + PBinNameArray = ^TBinNameArray; + TPrinterInfo2Array = array[0..10000] of TPrinterInfo2; + PPrinterInfo2Array = ^TPrinterInfo2Array; + TPortInfo1Array = array[0..10000] of TPortInfo1; + PPortInfo1Array = ^TPortInfo1Array; + TSizeArray = array[0..10000] of TSize; + PSizeArray = ^TSizeArray; + + +// Sv^̍쐬 +constructor TNkAllPrintersInfo.Create; +var Flags: Integer; + InfoBytes: DWORD; +begin + nPrinters := 0; + + if Win32Platform = VER_PLATFORM_WIN32_NT + then Flags := PRINTER_ENUM_CONNECTIONS or PRINTER_ENUM_LOCAL + else Flags := PRINTER_ENUM_LOCAL; + + InfoBytes := 0; + // obt@𓾂 + EnumPrinters(Flags, nil, 2, nil, 0, InfoBytes, nPrinters); + if InfoBytes = 0 then Exit; + GetMem(pPrintersInfo, InfoBytes); + + // v^(Level = 2)擾 + Win32Check(EnumPrinters(Flags, nil, 2, pPrintersInfo, + InfoBytes, InfoBytes, nPrinters)); +end; + +// Sv^̔j +destructor TNkAllPrintersInfo.Destroy; +begin + if pPrintersInfo <> Nil then FreeMem(pPrintersInfo); +end; + +// Sv^񂩂v^oB +function TNkAllPrintersInfo.GetName(Index: Integer): string; +begin + Result := PPrinterInfo2Array(pPrintersInfo)^[Index].pPrinterName; +end; + +// Sv^񂩂v^̑oB +function TNkAllPrintersInfo.GetAttributes(Index: Integer): DWORD; +begin + Result := PPrinterInfo2Array(pPrintersInfo)^[Index].Attributes; +end; + +// Sv^̔rB +function TNkAllPrintersInfo.Compare(Another: TNkAllPrintersInfo): Boolean; +var i: Integer; + pInfo1, pInfo2: PPrinterInfo2; +begin + Result := False; + + // ʖځI + if nPrinters <> Another.nPrinters then Exit; + + // 񖳂Ȃv + if nPrinters = 0 then begin Result := True; Exit; end; + + pInfo1 := pPrintersInfo; pInfo2 := Another.pPrintersInfo; + + // v^A|[gAhCoÂ݂r (^^ + for i := 0 to nPrinters-1 do begin + if AnsiStrComp(pInfo1^.pPrinterName, pInfo2^.pPrinterName) <> 0 then Exit; + if AnsiStrComp(pInfo1^.pPortName, pInfo2^.pPortName) <> 0 then Exit; + if AnsiStrComp(pInfo1^.pDriverName, pInfo2^.pDriverName) <> 0 then Exit; + if pInfo1^.Attributes <> pInfo2^.Attributes then Exit; + Inc(pInfo1); Inc(pInfo2); + end; + Result := True; +end; + + +//////////////////// +// Note: +// +// RXgN^ł Printer ɃANZXȂƂɒӁII +// RXgN^ Printer ɃANZXƃv^[ꍇ +// AvP[VオȂȂB + +constructor TNkPrinter.Create; +begin + FIndex := -1; // Update ̌Ăяoɔ -1 ɃZbg + // Sv^ + AllInfo := TNkAllPrintersInfo.Create; + pPaperNumbers := Nil; // TCYpobt@|C^NA + pBinNumbers := Nil; // rpobt@|C^NA + pResolutions := Nil; // 𑜓xpobt@|C^NA + + FModified := False; // v^ݒύXtOItB + pSettings := Nil; // v^ݒێp|C^NA + + // TCYzAv^zNA + FPaperNames := TStringList.Create; + FBinNames := TStringList.Create; + FPrinterNames := TStringList.Create; + FPortNames := TStringList.Create; + + // AvP[VEBhEɗ WM_WININICHANGE MptbNݒu + Application.HookMainWindow(AppHook); +end; + +destructor TNkPrinter.Destroy; +begin + // AvP[VEBhEɗ WM_WININICHANGE MptbN͂ + Application.UnHookMainWindow(AppHook); + // e탊\[X + if pPaperNumbers <> Nil then FreeMem(pPaperNumbers); + if pBinNumbers <> Nil then FreeMem(pBinNumbers); + if pResolutions <> Nil then FreeMem(pResolutions); + if AllInfo <> Nil then AllInfo.Free; + if FPaperNames <> Nil then FPaperNames.Free; + if FBinNames <> Nil then FBinNames.Free; + if FPrinterNames <> Nil then FPrinterNames.Free; + if FPortNames <> Nil then FPortNames.Free; + DiscardModification; + inherited Destroy; +end; + + +// v^̒lj폜uȂv̏ +function TNkPrinter.AppHook(var Msg: TMessage): Boolean; +var OldPrinter: TPrinter; + NewInfo: TNkAllPrintersInfo; + SavedPortNames: TStringList; + DummyList: TStrings; + i: Integer; +begin + Result := False; + if Msg.Msg = WM_WININICHANGE then begin + + //////////////////// + // + // Note: + // + // TPrinter ̓v^̒lj폜ɑΉĂȂ̂ + // ̃v^Xgj邽߂ɂ + // TPrinter ̂̂ĵłȒPB + // TPrinter FreePrinters Private Ȃ̂ + // ĂяoȂB + // + + NewInfo := TNkAllPrintersInfo.Create; + if not AllInfo.Compare(NewInfo) then begin + // Sv^ɕωLȂ TPrinter jII + OldPrinter := Printers.SetPrinter(Nil); + OldPrinter.Free; + AllInfo.Free; + // Sv^XV + AllInfo := NewInfo; + FIndex := -1; // CfbNX𖳌 + + // v^ݒj + DiscardModification; + + if Assigned(FOnSystemChanged) then FOnSystemChanged(Self); + Exit; + end + else NewInfo.Free; // XVsv + + //////////// + // + // Port ̒lj폜L SystemChanged Event N + // + SavedPortNames := TStringList.Create; + try + SavedPortNames.Assign(FPortNames); + DummyList := PortNames; + if DummyList.Count <> SavedPortNames.Count then begin + if Assigned(FOnSystemChanged) then FOnSystemChanged(Self); + end + else if DummyList.Count > 0 then begin + for i := 0 to DummyList.Count-1 do + if DummyList[i] <> SavedPortnames[i] then begin + if Assigned(FOnSystemChanged) then FOnSystemChanged(Self); + Break; + end; + end; + finally + SavedPortNames.Free; + end; + end; +end; + +// TNkPrinter Canvas 擾BPrinter.Canvas g +function TNkPrinter.GetCanvas: TCanvas; +begin Result := Printer.Canvas; end; + +// v^ IC or DC ̎擾 +function TNkPrinter.GetHandle: HDC; +begin Result := Printer.Handle; end; + +// tO +function TNkPrinter.GetPrinting: Boolean; +begin result := Printer.Printing; end; + +// Jn +procedure TNkPrinter.BeginDoc(Title: string); +begin + Printer.Title := Title; + Printer.BeginDoc; +end; + +// ~ +procedure TNkPrinter.Abort; +begin + Printer.Abort; +end; + +// Vy[W +procedure TNkPrinter.NewPage; +begin + Printer.NewPage; +end; + +// I +procedure TNkPrinter.EndDoc; +begin + Printer.EndDoc; +end; + + +// v^[L邩`FbN +// uBꂽvv^ȂꍇO +procedure TNkPrinter.CheckNoPrinter; +var i: Integer; +begin + if AllInfo.Count > 0 then + for i := 0 to AllInfo.Count-1 do + if (AllInfo.Attributes[i] and PRINTER_ATTRIBUTE_HIDDEN) = 0 then + Exit; + + FIndex := -1; // v^̔IԂɖ߂ + raise ENkPrinterNoPrinter.Create( + 'TNkPrinter.CheckNoPrinter: No Printer'); +end; + +// v^w肳ꂽ@\T|[gĂ邩`FbN +procedure TNkPrinter.CheckSupport(Value: TNkPrintCap; str: string); +begin + if not (Value in PrintCaps) then + raise ENkPrinterNotSupported.Create(str); +END; + + +// Printer.GetPrinter Ńv^[̏擾 +// DevMode \̂ GlobalLock ŃANZX”\ɂ܂B +function TNkPrinter.GetInfo: TNkPrinterInfo; +begin + with Result do begin + Printer.GetPrinter(Device, Driver, Port, hDevMode); + if hDevMode = 0 then begin + Printer.PrinterIndex := Printer.PrinterIndex; + Printer.GetPrinter(Device, Driver, Port, hDevMode); + end; + pDevMode := GlobalLock(hDevMode); + end; +end; + +// Printer.SetPrinter Ńv^[̏XV +// ꉞ DocumentProperties ԂɓāAv^hCo +// f𗧂ĂĂύX +procedure TNkPrinter.SetInfo(PrnInfo: TNkPrinterInfo); +var hPrinterHandle: Thandle; +begin + with PrnInfo do begin + try + Assert(OpenPrinter(Device, hPrinterHandle, nil)); + try + Assert(DocumentProperties(0, hPrinterHandle, Device, pDevMode^, + pDevMode^, DM_COPY or DM_MODIFY) >= 0); + finally + ClosePrinter(hPrinterHandle); + end; + finally + GlobalUnlock(hDevMode); + Printer.SetPrinter(Device, Driver, Port, hDevMode); + end; + end; +end; + +// DevMode \̂ GlobalUnlock 邾 +// Devnode \̂ύXȂꍇɗpB +procedure TNkPrinter.ReleaseInfo(PrnInfo: TNkPrinterInfo); +begin + GlobalUnlock(PrnInfo.hDevMode); +end; + +// ݂̃v^ݒ擾 pSettings ɃZbg +procedure TNkPrinter.GetSettings; +var PrnInfo: TNkPrinterInfo; + Size: Integer; +begin + if pSettings <> Nil then FreeMem(pSettings); + PrnInfo := GetInfo; + try + Size := GlobalSize(PrnInfo.hDevMode); + Assert(Size > 0); + GetMem(pSettings, Size); + System.Move(PrnInfo.pDevMode^, pSettings^, Size); + PortName := PrnInfo.Port; + finally + ReleaseInfo(PrnInfo); + end; +end; + + +// TCY̏XVB +// CheckNoPrinter, CheckSupport ͌Ăԑōs +procedure TNkPrinter.GetPaperSizes; +var PrnInfo: TNkPrinterInfo; + pPaperNames: PNameArray; + nPaperSizes: Integer; + i: Integer; +begin + // Â̂Ă + if pPaperNumbers <> Nil then begin + FreeMem(pPaperNumbers); + pPaperNumbers := Nil; + end; + FPaperNames.Clear; // TCYj + + PrnInfo := GetInfo; + try + with PrnInfo do begin + // TCY𓾂ăobt@m + nPaperSizes := DeviceCapabilities(Device, Port, DC_PAPERS, + Nil, pDevMode); + + // TCY񂪂ȂȂA񖳂ɂB + if (nPaperSizes = -1) or (nPaperSizes = 0) then Exit; + + // AvailInfos Property ɎTCY񂪗L邱ƂZbg + FAvailInfos := FAvailInfos + [nkAvPaperSize]; + + GetMem(pPaperNumbers, SizeOf(WORD) * nPaperSizes); + Getmem(pPaperNames, 64 * nPaperSizes); + try + // TCY̔ԍzƎz𓾂B + DeviceCapabilities(Device, Port, DC_PAPERS, + PCHAR(pPaperNumbers), pDevmode); + DeviceCapabilities(Device, Port, DC_PAPERNAMES, + PCHAR(pPaperNames), pDevmode); + if nPaperSizes > 0 then + for i := 0 to nPaperSizes-1 do + FPaperNames.Add(pPaperNames^[i]); + finally + FreeMem(pPaperNames); // ẑĂB + end; + end; + finally + ReleaseInfo(PrnInfo); + end; +end; + +// rXVB +// CheckNoPrinter, CheckSupport ͌Ăԑōs +procedure TNkPrinter.GetBins; +var PrnInfo: TNkPrinterInfo; + pBinNames: PBinNameArray; + nBins: Integer; + i: Integer; +begin + // Â̂Ă + if pBinNumbers <> Nil then begin + FreeMem(pBinNumbers); + pBinNumbers := Nil; + end; + FBinNames.Clear; + + PrnInfo := GetInfo; + try + with PrnInfo do begin + // r𓾂ăobt@m + nBins := DeviceCapabilities(Device, Port, DC_BINS, + Nil, pDevMode); + + // r񂪖ȂA񖳂ƂB + if (nBins = -1) or (nBins = 0) then Exit; + + // AvailInfos Property Ƀr񂪗L邱ƂZbg + FAvailInfos := FAvailInfos + [nkAvBin]; + + GetMem(pBinNumbers, SizeOf(WORD) * nBins); + Getmem(pBinNames, 64 * nBins); + try + // r̔ԍzƎz𓾂B + DeviceCapabilities(Device, Port, DC_BINS, + PCHAR(pBinNumbers), pDevmode); + DeviceCapabilities(Device, Port, DC_BINNAMES, + PCHAR(pBinNames), pDevmode); + if nBins > 0 then + for i := 0 to nBins-1 do + FBinNames.Add(pBinNames^[i]); + + finally + FreeMem(pBinNames); // rẑĂB + end; + end; + finally + ReleaseInfo(PrnInfo); + end; +end; + +// 𑜓xXVB +// CheckNoPrinter, CheckSupport ͌Ăԑōs +procedure TNkPrinter.GetResolutions; +var PrnInfo: TNkPrinterInfo; +begin + // Â̂Ă + if pResolutions <> Nil then begin + FreeMem(pResolutions); + pResolutions := Nil; + end; + + PrnInfo := GetInfo; + try + with PrnInfo do begin + // 𑜓x𓾂ăobt@m + FNumResolutions := DeviceCapabilities(Device, Port, DC_ENUMRESOLUTIONS, + Nil, pDevMode); + + // i񖳂ȂAƂB + + if FNumResolutions <= 0 then begin + FNumResolutions := 0; Exit; + end; + + // AvailInfos Property Ɉi񂪗L邱ƂZbg + FAvailInfos := FAvailInfos + [nkAvQuality]; + + GetMem(pResolutions, SizeOf(TSize) * FNumResolutions); + + // 𑜓xz𓾂B + Assert(DeviceCapabilities(Device, Port, DC_ENUMRESOLUTIONS, + PCHAR(pResolutions), pDevMode) <> -1); + end; + finally + ReleaseInfo(PrnInfo); + end; +end; + +// ő啔XVB +// CheckNoPrinter, CheckSupport ͌Ăԑōs +procedure TNkPrinter.GetMaxCopiesInfo; +var PrnInfo: TNkPrinterInfo; + ret: Integer; +begin + PrnInfo := GetInfo; + try + Ret := DeviceCapabilities(PrnInfo.Device, PrnInfo.Port, DC_COPIES, + Nil, PrnInfo.pDevMode); + if ret <= 0 then Exit; + + // AvailInfos Property ɍő啔񂪗L邱ƂZbg + FAvailInfos := FAvailInfos + [nkAvMaxCopies]; + FMaxCopies := ret; + finally + ReleaseInfo(PrnInfo); + end; +end; + + + +// e̍XV +procedure TNkPrinter.Update; +var Caps: TNkPrintCaps; +begin + // Printer.PrinterIndex ςĂȂȂ牽ȂB + if FIndex = Printer.PrinterIndex then Exit; + + FIndex := Printer.PrinterIndex; + + Caps := PrintCaps; + + FAvailInfos := []; // AvailInfos vpeBNABݒ + // GetPaperSizes, GetBins, GetResolutions, + // GetMaxCopiesInfo sB + + // TCY̎擾 + //if nkPcPaperSize in Caps then + GetPaperSizes; + + // r擾 + //if nkPcDefaultSource in Caps then + GetBins; + + // i擾 + //if nkPcPrintQuality in caps then + GetResolutions; + + // ő啔擾 + //if nkPcCopies in caps then + GetMaxCopiesInfo; +end; + +// IɊev^XV +procedure TNkPrinter.ForceUpdate; +begin + DiscardModification; + FIndex := -1; + Update; +end; + + +// Index Property ̎擾 +// Printer.PrinterIndex Index ɕϊB +function TNkPrinter.GetIndex: Integer; +var i, PIndex: Integer; + PrnInfo: TNkPrinterInfo; + PrinterFound: Boolean; +begin + CheckNoPrinter; + Result := Printer.PrinterIndex; + + if Result = -1 then Exit; + + // ݑIĂv^[uBꂽvv^[Ȃϊs\ + + ////////////////////// + // + // Note: + // + // TPrinter ̓|[gύXƐVȃGg TPrinter ɍ̂ + // PrinterIndex v^[ȏɂȂ邱ƂB + // ȉ̃R[h͂̓_lĂB + + // PrinterIndex Bꂽv^ȂG[ + if Result < AllInfo.Count then + if (AllInfo.Attributes[Result] and PRINTER_ATTRIBUTE_HIDDEN) <> 0 then + raise ENkPrinterIllegalIndex.Create( + 'TNkPrinter.GetIndex: Printers.PrinterIndex is Illegal'); + + // uBꂽvv^[CfbNXɕϊ + + + // PrinterIndex 𒼐ڌ̂ł͂ȂAv^[ŃCfbNX߂B + PrnInfo := GetInfo; + try + PrinterFound := False; + for i := 0 to AllInfo.Count-1 do + if AllInfo.Name[i] = StrPas(PrnInfo.Device) then begin + PrinterFound := True; + Result := i; + Break; + end; + + Assert(PrinterFound); + finally + ReleaseInfo(PrnInfo); + end; + + PIndex := Result; + + // uBꂽvv^̐l炷B + if PIndex > 0 then + for i := 0 to PIndex-1 do + if (AllInfo.Attributes[i] and PRINTER_ATTRIBUTE_HIDDEN) <> 0 then + Dec(Result); +end; + +// Index Property ̐ݒ +// Printer.PrinterIndex Index ϊĐݒ +procedure TNkPrinter.SetIndex(Value: Integer); +var Device, Driver, Port: array[0..511] of Char; + hDevMode: THandle; + i, IndexForPrinter, IndexForNkPrinter: Integer; +begin + CheckNoPrinter; + + // Value < -1 ͗L蓾Ȃ + if Value < -1 then + raise ENkPrinterRangeError.Create( + 'TNkPrinter.SetIndex: Index is out of Range'); + + if Value = Index then Exit; // CfbNXlȂ牽ȂB + + if Value > -1 then begin + IndexForPrinter := -1; + IndexForNkPrinter := 0; + for i := 0 to AllInfo.Count-1 do begin + if (AllInfo.Attributes[i] and PRINTER_ATTRIBUTE_HIDDEN) <> 0 then + Continue + else + if IndexForNkPrinter = Value then begin + IndexForPrinter := i; + Break; + end + else + Inc(IndexForNkPrinter); + end; + if IndexForPrinter = -1 then + raise ENkPrinterRangeError.Create( + 'TNkPrinter.SetIndex: Index is out of Range'); + end + else // Value = -1 -> ftHgv^[ɐݒ + IndexForPrinter := -1; + + with Printer do begin + PrinterIndex := IndexForPrinter; + // PrinterIndex ̃oO΍ + GetPrinter(Driver, Device, Port, hDevMode); + SetPrinter(Driver, Device, Port, 0); + // ŐV擾 + FIndex := -1; + Update; + end; + + // v^ݒ̔j + DiscardModification; +end; + + +// ݐݒ肳Ă鎆TCYԍ擾 +function TNkPrinter.GetPaperSizeNumber: Integer; +begin + CheckNoPrinter; + CheckSupport(nkPcPaperSize, + 'TNkPrinter.GetPaperSizeNumber: PaperSize is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + Result := pSettings^.dmPaperSize; +end; + + +// TCYԍݒ +procedure TNkPrinter.SetPaperSizeNumber(Value:Integer); +begin + CheckNoPrinter; + CheckSupport(nkPcPaperSize, + 'TNkPrinter.SetPaperSizeNumber: PaperSize is not Supported'); + Update; + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if pSettings^.dmPaperSize <> Value then begin + pSettings^.dmPaperSize := Value; + FModified := True; + end; +end; + +// ԍv^ɃT|[gĂ邩ǂ`FbN +function TNkPrinter.HasPaperSizeNumber(SizeNumber: Integer): Boolean; +var i: Integer; + FindSize: Boolean; +begin + CheckNoPrinter; + CheckSupport(nkPcPaperSize, + 'TNkPrinter.HasPaperNumber: PaperSize is not Supported'); + Update; + + if not (nkAvPaperSize in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.HasPapserSizeNumber: No PaperSize Info Available'); + + FindSize := False; + if PaperSizeNames.Count > 0 then + for i := 0 to PaperSizeNames.Count-1 do + if SizeNumber = PWORDArray(pPaperNumbers)^[i] then begin + FindSize := True; + Break; + end; + Result := FindSize; +end; + +// TCY̐̎擾 +function TNkPrinter.GetNumPaperSizes: Integer; +begin + CheckNoPrinter; + CheckSupport(nkPcPaperSize, + 'TNkPrinter.GetNumPaperSize: PaperSize is not Supported'); + + Update; + + if not (nkAvPaperSize in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.GetNumPaperSizes: No Papersize Info Available'); + + + Result := FPaperNames.Count; +end; + +//TCYCfbNX玆TCYԍ擾 +function TNkPrinter.GetPaperSizeNumbers(Index: Integer): Integer; +begin + CheckNoPrinter; + CheckSupport(nkPcPaperSize, + 'TNkPrinter.GetPaperSizeNumber: PaperSize is not Supported'); + Update; + + if not (nkAvPaperSize in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.GetNumPaperSizeNumbers: No Papersize Info Available'); + + + if (Index < 0) or (Index >= NumPaperSizes) then + raise ENkPrinterRangeError.Create( + 'TNkPrinter.GetPaperNumbers: Index is our of range'); + + Result := PWordArray(pPaperNumbers)^[Index]; +end; + +// TCYz擾 +function TNkPrinter.GetPaperSizeNames: TStrings; +begin + CheckNoPrinter; + CheckSupport(nkPcPaperSize, + 'TNkPrinter.GetPaperSizeNames: PaperSize is not Supported'); + + Update; + + if not (nkAvPaperSize in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.GetPaperSizeNames: No Papersize Info Available'); + + + Result := FPaperNames; +end; + +// ݑIĂ鎆TCỸCfbNX擾 +function TNkPrinter.GetPaperSizeIndex: Integer; +var i: Integer; + PaperNumber: Integer; +begin + CheckNoPrinter; + CheckSupport(nkPcpaperSize, + 'TNkPrinter.GetPaperSizeIndex: PaperSize is not Supported'); + + PaperNumber := GetPaperSizeNumber; // TCYԍ擾 + Update; + + if not (nkAvPaperSize in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.GetPaperSizeIndex: No Papersize Info Available'); + + + // TCYԍz񂩂玆TCYCfbNX݂‚ + Result := -1; + if FPaperNames.Count > 0 then + for i := 0 to FPaperNames.Count-1 do + if PWordArray(pPaperNumbers)^[i] = PaperNumber then begin + Result := i; + Break; + end; + + if Result = -1 then + raise ENKPrinterPaperSizeError.Create( + 'TNkPrinter.GetPaperSizeIndex: Cannot Get Paper Index'); +end; + +// TCYCfbNXݒ +procedure TNkPrinter.SetPaperSizeIndex(Value: Integer); +begin + CheckNoPrinter; + CheckSupport(nkPcpaperSize, + 'TNkPrinter.SetPaperSizeIndex: PaperSize is not Supported'); + + Update; + + if not (nkAvPaperSize in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.SetPaperSizeIndex: No Papersize Info Available'); + + + if (Value < 0) or (Value >= FPaperNames.Count) then + raise ENkPrinterPaperSizeError.Create( + 'TNkPrinter:SetPaperSizeIndex: No such PaperSize Index'); + SetPaperSizeNumber(PWordArray(pPaperNumbers)^[Value]); +end; + + +// ݐݒ肳Ărԍ擾 +function TNkPrinter.GetBinNumber: Integer; +begin + CheckNoPrinter; + CheckSupport(nkPcDefaultSource, + 'TNkPrinter.GetBinNumber: Bin is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + Result := pSettings^.dmDefaultSource; +end; + + +// rԍݒ +procedure TNkPrinter.SetBinNumber(Value: Integer); +begin + CheckNoPrinter; + CheckSupport(nkPcDefaultSource, + 'TNkPrinter.SetBinNumber: Bin is not Supported'); + Update; + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if pSettings^.dmDefaultSource <> Value then begin + pSettings^.dmDefaultSource := Value; + FModified := True; + end; +end; + +// rԍT|[gĂ邩`FbN +function TNkPrinter.HasBinNumber(BinNumber: Integer): Boolean; +var i: Integer; + FindBin: Boolean; +begin + CheckNoPrinter; + CheckSupport(nkPcDefaultSource, + 'TNkPrinter.SetBin: Bin is not Supported'); + Update; + + if not (nkAvBin in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.HasBinNumber: No Bin Info Available'); + + FindBin := False; + if BinNames.Count > 0 then + for i := 0 to BinNames.Count-1 do + if BinNumber = PWORDArray(pBinNumbers)^[i] then begin + FindBin := True; + Break; + end; + Result := FindBin; +end; + + + +// r̐̎擾 +function TNkPrinter.GetNumBins: Integer; +begin + CheckNoPrinter; + CheckSupport(nkPcDefaultSource, + 'TNkPrinter.GetNumBins: Bin is not Supported'); + + Update; + + if not (nkAvBin in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.GetNumBins: No Bin Info Available'); + + Result := FBinNames.Count; +end; + +// rz擾 +function TNkPrinter.GetBinNames: TStrings; +begin + CheckNoPrinter; + CheckSupport(nkPcDefaultSource, + 'TNkPrinter.GetBinNames: Bin is not Supported'); + + Update; + + if not (nkAvBin in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.GetBinNames: No Bin Info Available'); + + + Result := FBinNames; +end; + +// ݑIĂr̃CfbNX擾 +function TNkPrinter.GetBinIndex: Integer; +var i: Integer; + BinNumber: Integer; +begin + CheckNoPrinter; + CheckSupport(nkPcDefaultSource, + 'TNkPrinter.GetBinIndex: Bin is not Supported'); + + BinNumber := GetBinNumber; // rԍ擾 + Update; + + if not (nkAvBin in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.GetBinIndex: No Bin Info Available'); + + + Result := -1; + // rԍz񂩂r̃CfbNX݂‚ + if FBinNames.Count > 0 then + for i := 0 to FBinNames.Count-1 do + if PWordArray(pBinNumbers)^[i] = BinNumber then + Result := i; + + if Result = -1 then + raise ENkPrinterBinError.Create( + 'TNkPrinter.GetBinIndex: Cannot Get Bin Index'); +end; + +// rCfbNXݒ +procedure TNkPrinter.SetBinIndex(Value: Integer); +begin + CheckNoPrinter; + CheckSupport(nkPcDefaultSource, + 'TNkPrinter.SetBinIndex: Bin is not Supported'); + + Update; + + if not (nkAvBin in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.SetBinIndex: No Bin Info Available'); + + + if (Value < 0) or (Value >= FBinNames.Count) then + raise ENkPrinterBinError.Create( + 'TNkPrinter:SetBinIndex: No such Bin Index'); + SetBinNumber(PWordArray(pBinNumbers)^[Value]); +end; + +//rCfbNXrԍ擾 +function TNkPrinter.GetBinNumbers(Index: Integer): Integer; +begin + CheckNoPrinter; + CheckSupport(nkPcDefaultSource, + 'TNkPrinter.GetBunNumbers: Bin is not Supported'); + Update; + + if not (nkAvBin in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.GetBinNumbers: No Bin Info Available'); + + if (Index < 0) or (Index >= NumBins) then + raise ENkPrinterRangeError.Create( + 'TNkPrinter.GetBunNumbers: Index is our of range'); + + Result := PWordArray(pBinNumbers)^[Index]; +end; + + + +// v^[̃T|[g@\̎擾 +function TNkPrinter.GetPrintCaps; +var Cap: TNkPrintcap; +begin + CheckNoPrinter; + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + Result := []; + for Cap := Low(TNkPrintCap) to High(TNkPrintCap) do + if (pSettings^.dmFields and PrintCapValues[ord(Cap)]) <> 0 then + Include(Result, Cap); +end; + +// ̎̕擾 +function TNkPrinter.GetOrientation: TNkPaperOrientation; +begin + CheckNoPrinter; + CheckSupport(nkPcOrientation, + 'TNkPrinter.GetOrientation: Orientation is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if pSettings^.dmOrientation = DMORIENT_PORTRAIT then Result := nkOrPortrait + else result := nkOrLandScape; +end; + +// ̐̕ݒ +procedure TNkPrinter.SetOrientation(Value: TNkPaperOrientation); +begin + CheckNoPrinter; + CheckSupport(nkPcOrientation, + 'TNkPrinter.SetOrientation: Orientation is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if pSettings^.dmOrientation <> OrientationValues[Ord(Value)] then begin + pSettings^.dmOrientation := OrientationValues[Ord(Value)]; + FModified := True; + end; +end; + +// v^[z̎擾 +function TNkPrinter.GetPrinterNames: TStrings; +var i: Integer; +begin + CheckNoPrinter; + FPrinterNames.Clear; Result := FPrinterNames; + + // uBꂽvv^[v^[o + if AllInfo.Count > 0 then + for i := 0 to AllInfo.Count-1 do + if (AllInfo.Attributes[i] and PRINTER_ATTRIBUTE_HIDDEN) = 0 then + FPrinterNames.Add(AllInfo.Name[i]); +end; + +// ”\̈̎擾 +function TNkPrinter.GetPageExtent: TSize; +begin + CheckNoPrinter; + Result.cx := GetDeviceCaps(Printer.Handle, HORZRES); + Result.cy := GetDeviceCaps(Printer.Handle, VERTRES); +end; + +// ”\̈̎擾(mm P) +function TNkPrinter.GetMMPageExtent: TSize; +begin + CheckNoPrinter; + Result.cx := GetDeviceCaps(Printer.Handle, HORZSIZE) * 10; + Result.cy := GetDeviceCaps(Printer.Handle, VERTSIZE) * 10; +end; + +// DPI̎擾 +function TNkPrinter.GetDPI: TSize; +begin + CheckNoPrinter; + Result.cx := GetDeviceCaps(Printer.Handle, LOGPIXELSX); + Result.cy := GetDeviceCaps(Printer.Handle, LOGPIXELSY); +end; + +// TCY̎擾 +function TNkPrinter.GetPaperExtent: TSize; +begin + CheckNoPrinter; + Result.cx := GetDeviceCaps(Printer.Handle, PHYSICALWIDTH); + Result.cy := GetDeviceCaps(Printer.Handle, PHYSICALHEIGHT); +end; + + + +// TCY̎擾(0.1mm P) +function TNkPrinter.GetMMPaperExtent: TSize; +var Res: TSize; + sc: Integer; +begin + CheckNoPrinter; + Res := DPI; + sc := Scale; + Result.cx := GetDeviceCaps(Printer.Handle, PHYSICALWIDTH) * 254 * sc div + Res.cx div 100; + Result.cy := GetDeviceCaps(Printer.Handle, PHYSICALHEIGHT) * 254 * sc div + Res.cy div 100; +end; + +function TNkPrinter.GetUserPaperExtent: TSize; +begin + CheckNoPrinter; + // v^ݒ薢쐬Ȃ 쐬B + + if (nkPcPaperSize in PrintCaps) and + (nkPcPaperLength in PrintCaps) and + (nkPcPaperWidth in PrintCaps) and + (PaperSizeNumber = DMPAPER_USER) then begin + + if pSettings = Nil then GetSettings; + + Result.cx := pSettings^.dmPaperWidth; + Result.cy := pSettings^.dmPaperLength; + end + else + Raise ENkPrinterNoUserPaperExtent.Create( + 'TNkPrinter.GetUserpaperExtent: Cannot Get User paper Extent'); +end; + +procedure TNkPrinter.SetUserPaperExtent(Value: TSize); +begin + CheckNoPrinter; + + // [U`TCYT|[gĂ邩`FbN + CheckSupport(nkPcPaperSize, + 'TNkPrinter.SetpaperExtent: PaperSize is not Supported'); + + //////////// + // + // Note: nkPcPaperLength, nkPcPaperWidth `FbN̂ + // ~߂ɂBԍ DMPAPER_USER ̎߂ + // ON ɂȂv^L邩BꐫI + + + Update; + + // [U`TCYZbg + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + FModified := True; + with pSettings^ do begin + dmPaperSize := DMPAPER_USER; + dmPaperWidth := Value.cx; + dmpaperLength := Value.cy; + dmFields := dmFields or DM_PAPERLENGTH or DM_PAPERWIDTH; + end; +end; + + +// ̍[”\̈̍[܂ł̋(Pixel) +function TNkPrinter.GetOffset: TSize; +begin + CheckNoPrinter; + Result.cx := GetDeviceCaps(Printer.Handle, PHYSICALOFFSETX); + Result.cy := GetDeviceCaps(Printer.Handle, PHYSICALOFFSETY); +end; + + +// ő啔 +function TNkPrinter.GetMaxCopies: WORD; +begin + CheckNoPrinter; + CheckSupport(nkPcCopies, + 'TNkPrinter.GetMaxCopies: Copies is not Supported'); + Update; + if not (nkAvMaxCopies in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.GetMaxCopies: No MaxCopies Info Available'); + Result := FMaxCopies; +end; + +// ̎擾 +function TNkPrinter.GetCopies: WORD; +begin + CheckNoPrinter; + CheckSupport(nkPcCopies, 'TNkPrinter.GetCopies: Copies not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + Result := pSettings^.dmCopies; +end; + +// ̃Zbg +procedure TNkPrinter.SetCopies(Value: WORD); +begin + CheckNoPrinter; + CheckSupport(nkPcCopies, 'TNkPrinter.SetCopies: Copies not Supported'); + if (Value < 1) then + raise ENkPrinterRangeError.Create( + 'TNkPrinter.SetCopies: Too Small Copies'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if pSettings^.dmCopies <> Value then begin + pSettings^.dmCopies := Value; + FModified := True; + end; +end; + +// ̎擾 +function TNkPrinter.GetCollate: Boolean; +begin + CheckNoPrinter; + CheckSupport(nkPcCollate, + 'TNkPrinter.GetCollate: Collate is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if pSettings^.dmCollate = DMCOLLATE_TRUE then Result := True + else result := False; +end; + +// ̐ݒ +procedure TNkPrinter.SetCollate(Value: Boolean); +begin + CheckNoPrinter; + CheckSupport(nkPcCollate, + 'TNkPrinter.SetCollate: Collate is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if (Value = True) and (pSettings^.dmCollate = DMCOLLATE_FALSE) or + (Value = False) and (pSettings^.dmCollate = DMCOLLATE_TRUE) then begin + if Value then pSettings^.dmCollate := DMCOLLATE_TRUE + else pSettings^.dmCollate := DMCOLLATE_FALSE; + FModified := True; + end; +end; + +// J[̎擾 +function TNkPrinter.GetColor: Boolean; +begin + CheckNoPrinter; + CheckSupport(nkPcColor, + 'TNkPrinter.GetColor: Color is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if pSettings^.dmColor = DMCOLOR_COLOR then Result := True + else result := False; +end; + +// J[̐ݒ +procedure TNkPrinter.SetColor(Value: Boolean); +begin + CheckNoPrinter; + CheckSupport(nkPcColor, + 'TNkPrinter.SetColor: Color is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if (Value = True) and (pSettings^.dmColor = DMCOLOR_MONOCHROME) or + (Value = False) and (pSettings^.dmColor = DMCOLOR_Color) then begin + if Value then pSettings^.dmColor := DMCOLOR_COLOR + else pSettings^.dmColor := DMCOLOR_MONOCHROME; + FModified := True; + end; +end; + +// ʂ̎擾 +function TNkPrinter.GetDuplex: TNkDuplex; +begin + CheckNoPrinter; + CheckSupport(nkPcDuplex, + 'TNkPrinter.GetDuplex: Duplex is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if pSettings^.dmDuplex = DMDUP_SIMPLEX then + Result := nkDupSimplex + else if pSettings^.dmDuplex = DMDUP_HORIZONTAL then + Result := nkDupHorizontal + else Result := nkDupVertical; +end; + +// ʂ̐ݒ +procedure TNkPrinter.SetDuplex(Value: TNkDuplex); +begin + CheckNoPrinter; + CheckSupport(nkPcDuplex, + 'TNkPrinter.SetDuplex: Duplex is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if pSettings^.dmDuplex <> DuplexValues[Ord(Value)] then begin + pSettings^.dmDuplex := DuplexValues[Ord(Value)]; + FModified := True; + end; +end; + +// {̎擾 +function TNkPrinter.GetScale: WORD; +begin + CheckNoPrinter; + if nkPcScale in PrintCaps then begin + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + Result := pSettings^.dmScale; + end + else Result := 100; +end; + +// {̐ݒ +procedure TNkPrinter.SetScale(Value: WORD); +begin + CheckNoPrinter; + CheckSupport(nkPcScale, + 'TNkPrinter.SetScale: Scale is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + if pSettings^.dmScale <> Value then begin + pSettings^.dmScale := Value; + FModified := True; + end; +end; + +// J[rbg̎擾 +function TNkPrinter.GetColorBitCount: Integer; +begin + CheckNoPrinter; + Result := GetDeviceCaps(Printer.Handle, BITSPIXEL) * + GetDeviceCaps(Printer.Handle, PLANES); +end; + +// |[gz̎擾 +function TNkPrinter.GetPortNames: TStrings; +var InfoBytes, nPorts: DWORD; + pPortsInfo: PPortInfo1Array; + i: Integer; +begin + // CheckNoPrinter; + + FPortNames.Clear; + Result := FPortNames; + InfoBytes := 0; + // obt@𓾂 + EnumPorts(Nil, 1, nil, 0, InfoBytes, nPorts); + if InfoBytes = 0 then Exit; + GetMem(pPortsInfo, InfoBytes); + try + + // |[g(Level = 1)擾 + Win32Check(EnumPorts(Nil, 1, pPortsInfo, + InfoBytes, InfoBytes, nPorts)); + if nPorts > 0 then + for i := 0 to nPorts-1 do + if FPortnames.IndexOf(pPortsInfo^[i].pName) = -1 then + FPortNames.Add(pPortsInfo^[i].pName); + finally + FreeMem(pPortsInfo); + end; + // Result := FPortNames; +end; + +// |[g̎擾 +function TNkPrinter.GetPort: string; +begin + CheckNoPrinter; + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + Result := PortName; +end; + +// |[g̃Zbg +procedure TNkPrinter.SetPort(Value: string); +begin + CheckNoPrinter; + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + if PortName <> Value then begin + PortName := Value; + FModified := True; + end; +end; + +// i̎擾 +function TNkPrinter.GetQuality: TSize; +begin + CheckNoPrinter; + CheckSupport(nkPcPrintQuality, + 'TNkPrinter.GetQuality: PrintQuality is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + Result.cx := pSettings^.dmPrintQuality; + + if (Result.cx > 0) and + ((pSettings^.dmFields and DM_YRESOLUTION) <> 0) then + Result.cy := pSettings^.dmYResolution + else + Result.cy := 0; +end; + +// ĩZbg +procedure TNkPrinter.SetQuality(Value: TSize); +begin + CheckNoPrinter; + CheckSupport(nkPcPrintQuality, + 'TNkPrinter.SetQuality: PrintQuality is not Supported'); + + // v^ݒ薢쐬Ȃ 쐬B + if pSettings = Nil then GetSettings; + + FModified := True; + pSettings^.dmPrintQuality := Value.cx; + if Value.cx > 0 then begin + pSettings^.dmYResolution := Value.cy; + pSettings^.dmFields := pSettings^.dmFields or DM_YRESOLUTION; + end + else begin + pSettings^.dmYResolution := 0; + pSettings^.dmFields := pSettings^.dmFields and not DM_YRESOLUTION; + end; +end; + +// ii𑜓xj̐̎擾 +function TNkPrinter.GetNumQualities: Integer; +begin + CheckNoPrinter; + CheckSupport(nkPcPrintQuality, + 'TNkPrinter.GetNumQualities: PrintQuality is not Supported'); + Update; + + if not (nkAvQuality in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.GetNumQualities: No Quality Info Available'); + + Result := FNumResolutions; +end; + +// iz̎擾 +function TNkPrinter.GetQualities(Index: Integer): TSize; +begin + CheckNoPrinter; + CheckSupport(nkPcPrintQuality, + 'TNkPrinter.GetQualities: PrintQuality is not Supported'); + Update; + + if not (nkAvQuality in FAvailInfos) then + raise ENkPrinterNoInfo.Create( + 'TNkPrinter.GetQualities: No Quality Info Available'); + + + if (Index < 0) or (Index >= NumQualities) then + raise ENkPrinterRangeError.Create( + 'TNkPrinter.GetQualities: Index is our of range'); + + Result := PSizeArray(pResolutions)^[Index]; +end; + +function TNkPrinter.GetAvailInfos: TNkAvailInfos; +begin + Update; + Result := FAvailInfos; +end; + +procedure TNkPrinter.ApplySettings; +var PrnInfo: TNkPrinterInfo; + Size: Integer; +begin + if not Modified then Exit; + + Assert(pSettings <> Nil, + 'TNkPrinter.ApplySettings; No Setteing Info'); + + PrnInfo := GetInfo; + try + // v^ݒ TPrinter DocumentProperties ăRs[B + Size := GlobalSize(PrnInfo.hDevMode); + Assert(Size > 0, + 'TNkPrinter.ApplySettings; Devmode Size Should be greater than 0'); + System.Move(pSettings^, PrnInfo.pDevMode^, Size); + StrCopy(PrnInfo.Port, PCHAR(PortName)); + // Rs[Đݒ肪ȂȂ̂ŁA̕ύXɔĎ̂ĂB + DiscardModification; + // e蒼悤 FIndex 𖳌ɂB + FIndex := -1; + finally + SetInfo(PrnInfo); + end; +end; + + +procedure TNkPrinter.DiscardModification; +begin + if pSettings <> Nil then FreeMem(pSettings); + pSettings := Nil; + FModified := False; +end; + + +function TNkPrintDialog.Execute: Boolean; +begin + Result := inherited Execute; + if Result then NkPrinter.ForceUpdate; +end; + +function TNkPrinterSetupDialog.Execute: Boolean; +begin + Result := inherited Execute; + if Result then NkPrinter.ForceUpdate; +end; + + +procedure Register; +begin + RegisterComponents('NkPrinter', [TNkPrintDialog, TNkPrinterSetupDialog]); +end; + +initialization + NkPrinter := TNkPrinter.Create; + +finalization + NkPrinter.Free; +end. + diff --git a/lib/nkprn/NkPrn.GID b/lib/nkprn/NkPrn.GID new file mode 100644 index 00000000..ecf55b8f Binary files /dev/null and b/lib/nkprn/NkPrn.GID differ diff --git a/lib/nkprn/demo/Demo.dpr b/lib/nkprn/demo/Demo.dpr new file mode 100644 index 00000000..5c08e1da --- /dev/null +++ b/lib/nkprn/demo/Demo.dpr @@ -0,0 +1,17 @@ +program Demo; + +uses + Forms, + DemoForm1 in 'DemoForm1.pas' {MainfForm}, + DemoForm2 in 'DemoForm2.pas' {PaperSizeForm}, + DemoForm3 in 'DemoForm3.pas' {PrintQualityForm}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TMainfForm, MainfForm); + Application.CreateForm(TPaperSizeForm, PaperSizeForm); + Application.CreateForm(TPrintQualityForm, PrintQualityForm); + Application.Run; +end. diff --git a/lib/nkprn/demo/Demo.res b/lib/nkprn/demo/Demo.res new file mode 100644 index 00000000..0befc6ca Binary files /dev/null and b/lib/nkprn/demo/Demo.res differ diff --git a/lib/nkprn/demo/DemoForm1.dcu b/lib/nkprn/demo/DemoForm1.dcu new file mode 100644 index 00000000..73076eb3 Binary files /dev/null and b/lib/nkprn/demo/DemoForm1.dcu differ diff --git a/lib/nkprn/demo/DemoForm1.dfm b/lib/nkprn/demo/DemoForm1.dfm new file mode 100644 index 00000000..bd3e9840 Binary files /dev/null and b/lib/nkprn/demo/DemoForm1.dfm differ diff --git a/lib/nkprn/demo/DemoForm1.pas b/lib/nkprn/demo/DemoForm1.pas new file mode 100644 index 00000000..36498aff --- /dev/null +++ b/lib/nkprn/demo/DemoForm1.pas @@ -0,0 +1,547 @@ +unit DemoForm1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls, checklst, ComCtrls, Menus, NkPrinters; + +type + TMainfForm = class(TForm) + ComboBox1: TComboBox; + Memo1: TMemo; + ComboBox2: TComboBox; + RadioGroup1: TRadioGroup; + btnSetUp: TButton; + ComboBox3: TComboBox; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + btnUserDefined: TButton; + btnPrint: TButton; + CheckListBox1: TCheckListBox; + Label4: TLabel; + Label5: TLabel; + Label6: TLabel; + lblMaxCopies: TLabel; + udCopies: TUpDown; + edtCopies: TEdit; + chkCollate: TCheckBox; + chkColor: TCheckBox; + grpDuplex: TRadioGroup; + Label7: TLabel; + edtScale: TEdit; + udScale: TUpDown; + Label8: TLabel; + MainMenu1: TMainMenu; + File1: TMenuItem; + Exit1: TMenuItem; + Update1: TMenuItem; + cbPorts: TComboBox; + NkPrintDialog1: TNkPrintDialog; + Label9: TLabel; + btnPrintQuality: TButton; + btnApply: TButton; + procedure FormCreate(Sender: TObject); + procedure ComboBox1Change(Sender: TObject); + procedure ComboBox2Change(Sender: TObject); + procedure RadioGroup1Click(Sender: TObject); + procedure btnSetUpClick(Sender: TObject); + procedure ComboBox3Change(Sender: TObject); + procedure btnUserDefinedClick(Sender: TObject); + procedure btnPrintClick(Sender: TObject); + procedure udCopiesClick(Sender: TObject; Button: TUDBtnType); + procedure chkCollateClick(Sender: TObject); + procedure chkColorClick(Sender: TObject); + procedure grpDuplexClick(Sender: TObject); + procedure udScaleClick(Sender: TObject; Button: TUDBtnType); + procedure Exit1Click(Sender: TObject); + procedure Update1Click(Sender: TObject); + procedure cbPortsChange(Sender: TObject); + procedure btnPrintQualityClick(Sender: TObject); + procedure btnApplyClick(Sender: TObject); + private + { Private 錾 } + public + { Public 錾 } + Updating: Boolean; + AllowCopiesChange: Boolean; + procedure UpdatePrinterInfo; + procedure Hook(Sender: TObject); + end; + +var + MainfForm: TMainfForm; + +implementation + +{$R *.DFM} +uses Printers, DemoForm2, DemoForm3; + +procedure TMainfForm.UpdatePrinterInfo; +var Size: TSize; + Caps: TNkPrintcaps; + i: Integer; + s: string; +begin + if Updating then Exit; + Updating := True; + try + ComboBox1.Enabled := True; + try + ComboBox1.Items := NkPrinter.PrinterNames; + ComboBox1.ItemIndex := NkPrinter.Index; + except + on ENkPrinter do begin + ComboBox1.Enabled := False; + ComboBox2.Enabled := False; + ComboBox3.Enabled := False; + cbPorts.Enabled := False; + RadioGroup1.Enabled := False; + lblMaxCopies.Enabled := False; + Exit; + end; + end; + + ComboBox2.Enabled := False; + if nkPcPaperSize in NkPrinter.PrintCaps then begin + ComboBox2.Enabled := True; + try + ComboBox2.Items := NkPrinter.PaperSizeNames; + ComboBox2.ItemIndex := NkPrinter.PaperSizeIndex; + except + On ENkPrinter do ComboBox2.ItemIndex := -1; + end; + end; + + + ComboBox3.Enabled := False; + if nkPcDefaultSource in NkPrinter.Printcaps then begin + ComboBox3.Enabled := True; + try + ComboBox3.Items := NkPrinter.BinNames; + ComboBox3.ItemIndex := NkPrinter.BinIndex; + except + on ENkPrinter do ComboBox3.ItemIndex := -1; + end; + end; + + cbPorts.Enabled := True; + try + cbPorts.Items := NkPrinter.PortNames; + cbPorts.Text := NkPrinter.Port; + except + on ENkPrinter do ComboBox3.Enabled := False; + end; + + + RadioGroup1.Enabled := False; + if nkPcOrientation in NkPrinter.PrintCaps then begin + RadioGroup1.Enabled := True; + try + if NkPrinter.Orientation = nkOrPortrait then + RadioGroup1.ItemIndex := 0 + else + RadioGroup1.ItemIndex := 1; + except + On ENkPrinter do RadioGroup1.Enabled := False; + end; + end; + + btnUserDefined.Enabled := False; + if (nkPcPaperSize in NkPrinter.PrintCaps) and + (NkPrinter.PaperSizeNumber = DMPAPER_USER) and + (not NkPrinter.Modified) then + btnUserDefined.Enabled := True; + + btnPrintQuality.Enabled := False; + if nkPcPrintQuality in NkPrinter.Printcaps then + btnPrintQuality.Enabled := True; + + + Memo1.Lines.Clear; + + if not NkPrinter.Modified then begin + Memo1.Lines.BeginUpdate; + try + try + if nkPcPaperSize in NkPrinter.PrintCaps then + Memo1.Lines.Add(NkPrinter.PaperSizeNames[NkPrinter.PaperSizeIndex]); + except on ENkPrinter do; + end; + + try + Size := NkPrinter.PageExtent; + Memo1.Lines.Add('PageExtent = (' + IntToStr(Size.cx) + ',' + + IntToStr(Size.cy) + ')'); + except on ENkPrinter do ShowMessage('PageExtent Error'); + end; + + try + Size := NkPrinter.MMPageExtent; + Memo1.Lines.Add('MMPageExtent= (' + IntToStr(Size.cx) + ',' + + IntToStr(Size.cy) + ')'); + except on ENkPrinter do ShowMessage('PageExtent Error'); + end; + + + try + Size := NkPrinter.PaperExtent; + Memo1.Lines.Add('PaperExtent = (' + IntToStr(Size.cx) + ',' + + IntToStr(Size.cy) + ')'); + except on ENkPrinter do; + end; + try + Size := NkPrinter.MMPaperExtent; + Memo1.Lines.Add('MMPaperExtent= (' + IntToStr(Size.cx) + ',' + + IntToStr(Size.cy) + ')'); + except on ENkPrinter do; + end; + try + Size := NkPrinter.DPI; + Memo1.Lines.Add('DPI = (' + IntToStr(Size.cx) + ',' + + IntToStr(Size.cy) + ')'); + except on ENkPrinter do; + end; + try + Size := NkPrinter.Offset; + Memo1.Lines.Add('Offset = (' + IntToStr(Size.cx) + ',' + + IntToStr(Size.cy) + ')'); + except on ENkPrinter do; + end; + try + Memo1.Lines.Add('ColorBitCount =' + IntToStr(NkPrinter.ColorBitCount)); + except on ENkPrinter do; + end; + try + Size := NkPrinter.Quality; + Memo1.Lines.Add('PrintQuality =(' + IntToStr(Size.cx) + ',' + + IntToStr(Size.cy) + ')'); + except on ENkPrinter do; + end; + + try + s := 'Info= '; + if nkAvPaperSize in NkPrinter.AvailInfos then s := s + ' '; + if nkAvBin in NkPrinter.AvailInfos then s := s + 'r '; + if nkAvQuality in NkPrinter.AvailInfos then s := s + 'i '; + if nkAvMaxCopies in NkPrinter.AvailInfos then s := s + 'ő喇 '; + + Memo1.Lines.Add(s); + except on ENkPrinter do; + end; + finally + Memo1.Lines.EndUpdate; + end; + end; + + for i := 0 to 16 do CheckListBox1.Checked[i] := False; + Caps := NkPrinter.PrintCaps; + if nkPcOrientation in Caps then + CheckListBox1.Checked[0] := True; + if nkPcpaperSize in Caps then + CheckListBox1.Checked[1] := True; + if nkPcPaperlength in Caps then + CheckListBox1.Checked[2] := True; + if nkPcpaperWidth in Caps then + CheckListBox1.Checked[3] := True; + if nkPcScale in Caps then + CheckListBox1.Checked[4] := True; + if nkPcCopies in Caps then + CheckListBox1.Checked[5] := True; + if nkPcDefaultSource in Caps then + CheckListBox1.Checked[6] := True; + if nkPcPrintQuality in Caps then + CheckListBox1.Checked[7] := True; + if nkPcColor in Caps then + CheckListBox1.Checked[8] := True; + if nkPcDuplex in Caps then + CheckListBox1.Checked[9] := True; + if nkPcYResolution in Caps then + CheckListBox1.Checked[10] := True; + if nkPcTTOption in Caps then + CheckListBox1.Checked[11] := True; + if nkPcCollate in Caps then + CheckListBox1.Checked[12] := True; + if nkPcFormName in Caps then + CheckListBox1.Checked[13] := True; + if nkPcLogPixels in Caps then + CheckListBox1.Checked[14] := True; + if nkPcMediaType in Caps then + CheckListBox1.Checked[15] := True; + if nkPcDitherType in Caps then + CheckListBox1.Checked[16] := True; + + try + lblMaxCopies.Enabled := True; + lblMaxCopies.Caption := IntToStr(NkPrinter.MaxCopies); + except + on ENkPrinter do lblMaxCopies.Enabled := False; + end; + + try + edtCopies.Enabled := True; + udCopies.Enabled := True; + udCopies.Position := NkPrinter.Copies; + udCopies.Max := NkPrinter.MaxCopies; + except + on ENkPrinter do begin + edtCopies.Enabled := False; + udCopies.Enabled := False; + end; + end; + + try + chkCollate.Enabled := True; + chkCollate.Checked := NkPrinter.Collate; + except + on ENkPrinter do chkCollate.Enabled := False; + end; + + try + chkColor.Enabled := True; + chkColor.Checked := NkPrinter.Color; + except + on ENkPrinter do chkColor.Enabled := False; + end; + + try + grpDuplex.Enabled := True; + grpDuplex.ItemIndex := Ord(NkPrinter.Duplex); + except + on ENkPrinter do grpDuplex.Enabled := False; + end; + + try + if nkPcScale in NkPrinter.Printcaps then begin + edtScale.Enabled := True; + udScale.Enabled := True; + udScale.Position := NkPrinter.Scale; + end + else begin + edtScale.Enabled := False; + udScale.Enabled := False; + end; + except + on ENkPrinter do begin + edtScale.Enabled := False; + udScale.Enabled := False; + end; + end; + + if NkPrinter.Modified then btnApply.Enabled := True + else btnApply.Enabled := False; + + finally + Updating := False; + end; +end; + + +procedure TMainfForm.FormCreate(Sender: TObject); +begin + NkPrinter.OnSystemChanged := Hook; + UpdatePrinterInfo; +end; + +procedure TMainfForm.Hook(Sender: TObject); +begin + ShowMessage('ЂƂƃv^폜^ljꂽII'); + UpdatePrinterInfo; +end; + + +procedure TMainfForm.ComboBox1Change(Sender: TObject); +begin + if Updating then Exit; + NkPrinter.Index := ComboBox1.ItemIndex; + UpdatePrinterInfo; +end; + +procedure TMainfForm.ComboBox2Change(Sender: TObject); +begin + if Updating then Exit; + NkPrinter.PaperSizeIndex := ComboBox2.ItemIndex; + UpdatePrinterInfo; +end; + +procedure TMainfForm.RadioGroup1Click(Sender: TObject); +begin + if Updating then Exit; + if RadioGroup1.ItemIndex = 0 then + NkPrinter.Orientation := nkOrPortrait + else + NkPrinter.orientation := nkOrLandScape; + UpdatePrinterInfo; +end; + +procedure TMainfForm.btnSetUpClick(Sender: TObject); +begin + NkPrintDialog1.Execute; + UpdatePrinterInfo; +end; + +procedure TMainfForm.ComboBox3Change(Sender: TObject); +begin + if Updating then Exit; + NkPrinter.BinIndex := ComboBox3.ItemIndex; + UpdatePrinterInfo; +end; + +procedure TMainfForm.btnUserDefinedClick(Sender: TObject); +var Size: TSize; +begin + PaperSizeForm.grpUnitClick(Self); + if PaperSizeForm.ShowModal = mrOK then begin + Size.cx := StrToInt(PaperSizeForm.EditWidth.Text); + Size.cy := StrToInt(PaperSizeForm.EditLength.Text); + NkPrinter.UserPaperExtent := Size; + UpdatePrinterInfo; + end; +end; + +procedure TMainfForm.btnPrintClick(Sender: TObject); +var + Info: PBitmapInfo; + InfoSize: DWORD; + Image: Pointer; + ImageSize: DWORD; + bm: TBitmap; + Size: TSize; +begin + Size := NkPrinter.PageExtent; + NkPrinter.BeginDoc('Demo'); + try + bm := TBitmap.Create; + try + bm.LoadFromFile(ExtractFilePath(Application.ExeName) + 'shun06.bmp'); + GetDIBSizes(bm.Handle, InfoSize, ImageSize); + Info := AllocMem(InfoSize); + try + Image := AllocMem(ImageSize); + try + GetDIB(bm.Handle, bm.Palette, Info^, Image^); + with Info^.bmiHeader do + if (biHeight / biWidth) < (Size.cy / Size.cx) then + StretchDIBits(NkPrinter.Canvas.Handle, + 0, 0, Size.cx, Size.cx * biHeight div biWidth, + 0, 0, biWidth, biHeight, + Image, Info^, DIB_RGB_COLORS, SRCCOPY) + else + StretchDIBits(NkPrinter.Canvas.Handle, + 0, 0, Size.cy * biWidth div biHeight, Size.cy, + 0, 0, biWidth, biHeight, + Image, Info^, DIB_RGB_COLORS, SRCCOPY); + finally + FreeMem(Image); + end; + finally + FreeMem(Info); + end; + finally + bm.Free; + end; + NkPrinter.Canvas.Font.Size := 40; + NkPrinter.Canvas.Font.Color := clBlack; + NkPrinter.Canvas.Brush.Color := clWhite; + NkPrinter.Canvas.TextOut(10, 10, 'q̏rł'); + except + NkPrinter.Abort; + raise; + end; + NkPrinter.EndDoc; +end; + +procedure TMainfForm.udCopiesClick(Sender: TObject; Button: TUDBtnType); +begin + if Updating then Exit; + NkPrinter.Copies := udCopies.Position; + PostMessage(Self.Handle, WM_COMMAND, Update1.Command, 0); +end; + +procedure TMainfForm.chkCollateClick(Sender: TObject); +begin + if Updating then Exit; + NkPrinter.Collate := chkCollate.Checked; + UpdatePrinterInfo; +end; + +procedure TMainfForm.chkColorClick(Sender: TObject); +begin + if Updating then Exit; + NkPrinter.Color := chkColor.Checked; + UpdatePrinterInfo; +end; + +procedure TMainfForm.grpDuplexClick(Sender: TObject); +begin + if Updating then Exit; + case grpDuplex.ItemIndex of + 0: NkPrinter.Duplex := nkDupSimplex; + 1: NkPrinter.Duplex := nkDupHorizontal; + 2: NkPrinter.Duplex := nkDupVertical; + end; + UpdatePrinterInfo; +end; + +procedure TMainfForm.udScaleClick(Sender: TObject; Button: TUDBtnType); +begin + if Updating then Exit; + NkPrinter.Scale := udScale.Position; + PostMessage(Self.Handle, WM_COMMAND, Update1.Command, 0); +end; + +procedure TMainfForm.Exit1Click(Sender: TObject); +begin + Close; +end; + +procedure TMainfForm.Update1Click(Sender: TObject); +begin + UpdatePrinterInfo; +end; + +procedure TMainfForm.cbPortsChange(Sender: TObject); +begin + if Updating then Exit; + NkPrinter.Port := cbPorts.Text; + PostMessage(Self.Handle, WM_COMMAND, Update1.Command, 0); +end; + +procedure TMainfForm.btnPrintQualityClick(Sender: TObject); +var Size: TSize; + i: Integer; + Quality: TSize; +begin + Size := NkPrinter.Quality; + with PrintQualityForm do begin + rgQuality.ItemIndex := -1; + lbQualities.Clear; + + if nkAvQuality in NkPrinter.AvailInfos then + for i := 0 to NkPrinter.NumQualities-1 do begin + Quality := NkPrinter.Qualities[i]; + lbQualities.Items.Add( + '(' + IntToStr(Quality.cx) + ',' + IntToStr(Quality.cy) + ')'); + end; + lblXRes.Caption := IntToStr(Size.cx); + lblYRes.Caption := IntToStr(Size.cy); + + if PrintQualityForm.ShowModal = mrOK then + try + Size.cx := StrToInt(lblXRes.Caption); + Size.cy := StrToInt(lblYRes.Caption); + NkPrinter.Quality := Size; + finally + UpdatePrinterInfo; + end; + end; +end; + +procedure TMainfForm.btnApplyClick(Sender: TObject); +begin + NkPrinter.ApplySettings; + UpdatePrinterInfo; +end; + +end. diff --git a/lib/nkprn/demo/DemoForm2.dcu b/lib/nkprn/demo/DemoForm2.dcu new file mode 100644 index 00000000..94399350 Binary files /dev/null and b/lib/nkprn/demo/DemoForm2.dcu differ diff --git a/lib/nkprn/demo/DemoForm2.dfm b/lib/nkprn/demo/DemoForm2.dfm new file mode 100644 index 00000000..2aa749f8 Binary files /dev/null and b/lib/nkprn/demo/DemoForm2.dfm differ diff --git a/lib/nkprn/demo/DemoForm2.pas b/lib/nkprn/demo/DemoForm2.pas new file mode 100644 index 00000000..7418699d --- /dev/null +++ b/lib/nkprn/demo/DemoForm2.pas @@ -0,0 +1,40 @@ +unit DemoForm2; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls; + +type + TPaperSizeForm = class(TForm) + EditWidth: TEdit; + EditLength: TEdit; + Button1: TButton; + Label1: TLabel; + Label2: TLabel; + Button2: TButton; + procedure grpUnitClick(Sender: TObject); + private + { Private 錾 } + public + { Public 錾 } + end; + +var + PaperSizeForm: TPaperSizeForm; + +implementation + +{$R *.DFM} +uses NKPrinters; + +procedure TPaperSizeForm.grpUnitClick(Sender: TObject); +var Size: TSize; +begin + Size := NkPrinter.UserPaperExtent; + EditWidth.Text := IntToStr(Size.cx); + EditLength.Text := IntToStr(Size.cy); +end; + +end. diff --git a/lib/nkprn/demo/DemoForm3.dcu b/lib/nkprn/demo/DemoForm3.dcu new file mode 100644 index 00000000..72c897d6 Binary files /dev/null and b/lib/nkprn/demo/DemoForm3.dcu differ diff --git a/lib/nkprn/demo/DemoForm3.dfm b/lib/nkprn/demo/DemoForm3.dfm new file mode 100644 index 00000000..7633ddda Binary files /dev/null and b/lib/nkprn/demo/DemoForm3.dfm differ diff --git a/lib/nkprn/demo/DemoForm3.pas b/lib/nkprn/demo/DemoForm3.pas new file mode 100644 index 00000000..56d57d20 --- /dev/null +++ b/lib/nkprn/demo/DemoForm3.pas @@ -0,0 +1,65 @@ +unit DemoForm3; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls; + +type + TPrintQualityForm = class(TForm) + Label1: TLabel; + YResolution: TLabel; + Button1: TButton; + Button2: TButton; + rgQuality: TRadioGroup; + lblXRes: TLabel; + lblYRes: TLabel; + lbQualities: TListBox; + Label2: TLabel; + procedure rgQualityClick(Sender: TObject); + procedure lbQualitiesClick(Sender: TObject); + private + { Private 錾 } + Updating: Boolean; + public + { Public 錾 } + end; + +var + PrintQualityForm: TPrintQualityForm; + +implementation + +{$R *.DFM} +uses NkPrinters; + +procedure TPrintQualityForm.rgQualityClick(Sender: TObject); +begin + UpDating := True; + try + case rgQuality.ItemIndex of + 0: lblXRes.Caption := '-4'; + 1: lblXRes.Caption := '-3'; + 2: lblXRes.Caption := '-2'; + 3: lblXRes.Caption := '-1'; + end; + if rgQuality.ItemIndex in [0..3] then lblYRes.Caption := '0'; + finally + Updating := false; + end; +end; + +procedure TPrintQualityForm.lbQualitiesClick(Sender: TObject); +var Quality: TSize; +begin + with PrintQualityForm do + if lbQualities.ItemIndex >= 0 then begin + Quality := NkPrinter.Qualities[lbQualities.ItemIndex]; + lblXRes.Caption := IntToStr(Quality.cx); + lblYRes.Caption := IntToStr(Quality.cy); + rgQuality.ItemIndex := -1; + end; +end; + +end. diff --git a/lib/nkprn/demo/Shun06.bmp b/lib/nkprn/demo/Shun06.bmp new file mode 100644 index 00000000..b8b60b7d Binary files /dev/null and b/lib/nkprn/demo/Shun06.bmp differ diff --git a/lib/nkprn/mypack.dcp b/lib/nkprn/mypack.dcp new file mode 100644 index 00000000..638ac862 Binary files /dev/null and b/lib/nkprn/mypack.dcp differ diff --git a/lib/nkprn/mypack.dcu b/lib/nkprn/mypack.dcu new file mode 100644 index 00000000..6d0692cd Binary files /dev/null and b/lib/nkprn/mypack.dcu differ diff --git a/lib/nkprn/mypack.dpk b/lib/nkprn/mypack.dpk new file mode 100644 index 00000000..34660afd --- /dev/null +++ b/lib/nkprn/mypack.dpk @@ -0,0 +1,37 @@ +package mypack; + +{$R *.RES} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + NkPrinters, + Wsagraph, + Cologrid, + Oedit; + +end. diff --git a/lib/nkprn/mypack.dpl b/lib/nkprn/mypack.dpl new file mode 100644 index 00000000..7a77f6a1 Binary files /dev/null and b/lib/nkprn/mypack.dpl differ diff --git a/lib/nkprn/mypack.res b/lib/nkprn/mypack.res new file mode 100644 index 00000000..36f26e23 Binary files /dev/null and b/lib/nkprn/mypack.res differ diff --git a/lib/nkprn/mypack.~dp b/lib/nkprn/mypack.~dp new file mode 100644 index 00000000..5eb435d4 --- /dev/null +++ b/lib/nkprn/mypack.~dp @@ -0,0 +1,38 @@ +package mypack; + +{$R *.RES} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + NkPrinters, + Wsagraph, + Cologrid, + Oedit, + Vic_res; + +end. diff --git a/lib/nkprn/readme.txt b/lib/nkprn/readme.txt new file mode 100644 index 00000000..8e2df4a1 --- /dev/null +++ b/lib/nkprn/readme.txt @@ -0,0 +1,234 @@ +Readme.txt + +̎ NkPrinter ̃}jAłB + +1. Tv + +TNkPrinter Delphi TPrinter ̉ǔłłB +݈ȉ̂Ƃo܂B + + (1) v^[̈ꗗ̎擾 + (2) v^[̐؂ւ + (3) v^[̃T|[g@\̎擾 + (4) ֌W̏擾 + ̑傫A”\̈̑傫A]A𑜓x(dpi) + (5) TCŸꗗ̎擾 + (6) TCY̎擾/ݒ([U`TCY̐ݒ܂) + (7) r̈ꗗ̎擾 + (8) r̎擾^ݒ + (9) ̎擾^ݒ +(10) ̎擾^ݒ +(11) XP[O{̎擾^ݒ +(12) J[^mN̎擾^ݒ +(13) ʈw̎擾^ݒ +(14) ïꗗ̎擾 +(15) i̎擾Eݒ +(16) + +ǂčs\łB + +TNkPrinter Delphi 3.0J/3.1J/4.0J płB +C++Builder łg邩m܂񂪖łB + +2.쌠ɂ‚ + +Ƃ肠t[\tgłB + +{vO̕sɂ鑹Q̐ӔC͕܂B + +̃vO̒쌠 j ێ܂BAzz^ρ^p +SɎRłBBBS, NetNews, Mailing List, Software Archive ɓ]ڂ +RłB̐L܂BAꌾAĂƂꂵłB + +3. A + +ӌA]AzAoO|[g܂A +Delphi World ML(delphian_world@ml.yoyo-kikaku.org) ւĉB + +Delphi World ɎQĂȂ + +nakamuri@asahi.email.ne.jp + +܂łA肢܂B + +4. + +1998.3.30 0.1 +1998.3.31 0.11 + (1) BinNames 2Ԗڈȍ~̃rȂoOC + (2) [N1C + (3) PaperExtent Property ̏([U`TCY) 0.1mm Pʂ + ȂĂ܂ĂoOCBPixel PʂƂB +1998.3.31 0.12 + (1) DevMode \̂̕ύX DocumentProperties čs悤ɕύX +1998.4.2 0.2 + (1) v^̃p[^•ςƑ̃p[^Zbg + ܂ƂڂoOCB + (2) Copies, MaxCopies, Collate property lj + (3) MaxPaperExtebt, MinPaperExtent Property lj + (4) v^̒lj폜ɑΉBOnSystemChanged Cxglj +1998.4.4 0.21 + (1) Port ύXĂ IndexȂ悤ɂB + ̂߃\[X啝CII Port ύX@\̏B + (2) Demo ̏CBCopies/Collate @\ĂȂB + (3) O̒`ׂ Exception ƓɂȂĂ̂ŁAp + Ȃ悤ɏC(^^B +1998.4.5 0.3 + (1) Color, Duplex, Scale, ColorBitCount ljB + (2) Portnames. Port lj +1998.4.7 0.31 + (1) v^̃T|[gł邽 + MaxPaperExtent/MinPaperExtent property 폜 + (2) delphi-cw 99 œ 炲񍐂̗L Collate + oOC(Orientation 擾^ݒ肵Ă(^^;) + (3) delphi-cw 99 œ 炲񍐂̗L MD-1300 ł̕s + ɑΉB^r̍XVrƎ֌W Propety + ANZX邽тɍs悤ɏCB + +1998.4.9 0.32 + (1) Ver 0.31 (3) ̑ΏŃfvOٗlɒxȂ邱ƔB + Arꗗ̎擾 DocumentProperties xƂB + TNkPrintDialog, TNkPrinterSetupDialog 𓱓邱ƂɌ߂B + +1998.4.18 0.4 + (1) ip Property lj + Quality, Qualities NumQuality Property + (2) HasPaperSizeNumber, HasBinNumber \bhlj + (3) BinNumber Property ̒lj + (4) PaperSize Property PaperSizeNumber Property ɉ + (5) NumPaperSizes, NumBins Property lj + (6) PaperNumbers, BinNumbers Property lj + +1998.4.19 0.41 + (1) PaperExtent Property Ń[U`TCYݒ肷Ƃ Scale({) + lĂȂ_CB + (2) MMPageExtent(0.1mm Pʂ̈”\̈̑傫) Property lj + (3) { T|[gĂȂꍇ Scale ̓ǂݏoł 100% + Ԃ悤ɕύXB +1998.4.27 0.42 + (1) MMPaperExtent Property V݁B[U`TCY 0.1 mm Pʂ + ݒł悤ɂB + (2) NkPrinter IC or DC \킷 Handle Property lj + (3) \킷APrinting Property lj +1998.4.29 0.43 + (1) Port lj^폜ɑΉ + (2) |[gꗗɓ|[goĂ̂ɑΏ(ΏǗÖ@) +1998.6.1 0.44 + (1) wv쐬 + (2) ኱oOC +1998.6.6 0.45 + (1)v^TCYArAiAő啔 + DeviceCapabilitites Œ񋟂ȂꍇL邱ƂɑΉB +1998.6.8 0.46 + (1)wvC +1998.9.13 0.5 + ̖݊dlύXs܂II ܂II + (1) ApplySettings/DiscardModification \bh Modified vpeBljB + v^ݒ̕ύX_CNgɃv^ɐݒ肹AApplySettings + \bhňꊇݒ肷邱ƂɂB + (2) MMPaperExtent/PaperExtent ǂݎpɕύXB[U`TCY + 擾^ύXp UserPaperExtent V݁B + + + +5. CXg[@ + +5.1 NkPrinters jbg̃CXg[ + +NkPrinters.pas R|[lgƂăCXg[ĉB +ƁATNkPrintDialog, TNkPrinterSetupDialog CXg[܂B + +AANkPrinter ̓R|[lgł͂܂BO[oϐłB + +uses NkPrinters Ǝw肵ĂgB + +fvORpCOɕKCXg[ĉB + +5.2 NkPrn.hlp NkPrn.cnt ̃CXg[ + +Delphi CXg[tH_ Delphi 3\Help tH_ Delphi3.cnt +Ƃt@CL܂BҏW + +:Include +:Link + +tĉB + +F + + + +:Base delphi3.HLP>main + +;============== +:Title Delphi wv +; Index section +:Index VCL IuWFNgƃR|[lg̃t@X =vcl3.hlp +:Index Object Pascal KCh =obpascl3.hlp +:Index Quick Report 2.0 =quickrpt.hlp + +; Include section +;================ +:include delphi3.cfg +:include delphi3.toc +:include vcl3.cnt +:include obpascl3.cnt +:Include win32sdk.toc +:Include winhlp32.cnt +:Include d:\test\dp3\NkPrinter\help\NkPrn.cnt +:Link d:\test\dp3\NkPrinter\help\NkPrn.hlp + + +6. g + +NkPrinter ̎g̓wvĉBȒPȃ`[gA‚Ă܂B + +7. f + +demo.dpr ƂvOtĂ܂B +|Ă(^^ +oO|[g҂Ă܂B + +demo.dpr CXg[OɕK NkPrinters.pas CXg[Ă +B + +ӁFO𑽗pĂ̂ Delphi IDE ̒ŎsƂ + c[b‹IvV uݒv^O + uOfobKŊJṽ`FbNO悢ł傤B + +8. ݔĂB + +[gv^ĂꍇG[N悤łB +݌ۂmFłB + +9. ӎ + +NkPrinter ̍쐬ɓADelphian Wold ML Delphi-cw ML ̑̕X +x܂B̏؂Č\グ܂B + +NGNCK +Delphian World ł NG ̔ NkPrinter 쐬邫ƂȂ܂B +܂Adlɕtđ̂܂B + +cjnahq` +http://www.kobira.co.jp/sakura/d_print.htm Љ܂B +ڂĂR|[lg̎dl NkPrinter ̎QlɂĂ܂B + +͑_w +Excel VBA ł̃v^@\ɕtď񋟂Ă܂B + +Delphian World ML/Delphi-cw ML Ŏ`ĂX͉L̒ʂłB + +NGNCKAcjnahq`A _AcʐM@()A +吶A{GXp[AȂ̂񂳂Aق큗mss +͑_wALnehsdbAVpZp + + +F̂ŗlXȃv^ NkPrinter 邱Ƃo܂B +lł͒XoȂƎv܂B + +JԂɂȂ܂{ɂ肪Ƃ܂B + +܂ NkPrinter ͂胊[Xꂽ΂ōǂKvƎv܂A +ƂX肢܂(^^ + diff --git a/lib/sock/Base64/Test.dfm b/lib/sock/Base64/Test.dfm new file mode 100644 index 00000000..131af7ab Binary files /dev/null and b/lib/sock/Base64/Test.dfm differ diff --git a/lib/sock/Base64/Test.pas b/lib/sock/Base64/Test.pas new file mode 100644 index 00000000..0ca82daa --- /dev/null +++ b/lib/sock/Base64/Test.pas @@ -0,0 +1,42 @@ +unit Test; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls; + +type + TFrm_Test = class(TForm) + Memo1: TMemo; + Memo2: TMemo; + Button1: TButton; + Button2: TButton; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Frm_Test: TFrm_Test; + +implementation + +Uses Sock; + +{$R *.DFM} + +procedure TFrm_Test.Button1Click(Sender: TObject); +begin + Memo2.Text := Base64Encode(Memo1.Text); +end; + +procedure TFrm_Test.Button2Click(Sender: TObject); +begin + Memo1.Text := Base64Decode(Memo2.Text); +end; + +end. diff --git a/lib/sock/Base64/Test64.dpr b/lib/sock/Base64/Test64.dpr new file mode 100644 index 00000000..79edb4f4 --- /dev/null +++ b/lib/sock/Base64/Test64.dpr @@ -0,0 +1,13 @@ +program Test64; + +uses + Forms, + Test in 'Test.pas' {Frm_Test}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TFrm_Test, Frm_Test); + Application.Run; +end. diff --git a/lib/sock/Base64/Test64.res b/lib/sock/Base64/Test64.res new file mode 100644 index 00000000..8d706e28 Binary files /dev/null and b/lib/sock/Base64/Test64.res differ diff --git a/lib/sock/PROXY/IP.DFM b/lib/sock/PROXY/IP.DFM new file mode 100644 index 00000000..3d8fe75f Binary files /dev/null and b/lib/sock/PROXY/IP.DFM differ diff --git a/lib/sock/PROXY/IP.PAS b/lib/sock/PROXY/IP.PAS new file mode 100644 index 00000000..07869c41 --- /dev/null +++ b/lib/sock/PROXY/IP.PAS @@ -0,0 +1,25 @@ +unit ip; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls; + +type + TFrm_IP = class(TForm) + Memo1: TMemo; + private + { Private declarations } + public + { Public declarations } + end; + +var + Frm_IP: TFrm_IP; + +implementation + +{$R *.DFM} + +end. diff --git a/lib/sock/PROXY/PROXY.RES b/lib/sock/PROXY/PROXY.RES new file mode 100644 index 00000000..37a3aa5f Binary files /dev/null and b/lib/sock/PROXY/PROXY.RES differ diff --git a/lib/sock/PROXY/main.dfm b/lib/sock/PROXY/main.dfm new file mode 100644 index 00000000..57edca31 Binary files /dev/null and b/lib/sock/PROXY/main.dfm differ diff --git a/lib/sock/PROXY/main.pas b/lib/sock/PROXY/main.pas new file mode 100644 index 00000000..33dbb561 --- /dev/null +++ b/lib/sock/PROXY/main.pas @@ -0,0 +1,160 @@ +unit main; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, Sock, ExtCtrls; + +type + TFrm_Main = class(TForm) + Btn_Start: TButton; + Label1: TLabel; + Edit_Port: TEdit; + Sock: TSock; + Label2: TLabel; + Lbl_Threads: TLabel; + Label3: TLabel; + Lbl_HeapFree: TLabel; + Button1: TButton; + Timer1: TTimer; + procedure Btn_StartClick(Sender: TObject); + procedure SockAutoAccept(Sender: TObject; NewSock: TSock); + procedure FormCreate(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure Timer1Timer(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + Threadcount : Integer; + end; + +var + Frm_Main: TFrm_Main; + +implementation + +uses ip; + +{$R *.DFM} + +procedure TFrm_Main.Btn_StartClick(Sender: TObject); +begin + If Btn_Start.Caption = 'Start' Then + Begin + Sock.PortName := Edit_Port.Text; + Sock.StartListen; + Btn_Start.Caption :='Stop'; + End + Else + Begin + Sock.StopListen; + Btn_Start.Caption := 'Start'; + End; +end; + +procedure TFrm_Main.SockAutoAccept(Sender: TObject; NewSock: TSock); +Var Content : String; + Temp : String; + CSock : TSock; + NSock : TSock; + SL : String; + HN,PT : String; + Rm : String; + Pl : Integer; +begin + Inc(ThreadCount); + Lbl_Threads.Caption := IntToStr(ThreadCount); + CSock := TSock.Create(Self); + Nsock := TSock.Create(Self); + Try + Try + Content := ''; + SL := ''; + Rm := ''; + Repeat + Temp := NewSock.Text; + If Temp <> '' Then + Begin + // Incoming Data + Content := Content + Temp; + Temp := ''; + If (SL = '') And (Pos('HTTP/', Content) > 0) Then + Begin + SL := Copy(Content, 1, Pos('HTTP/', Content)+1); + Delete(Content, 1, Length(SL)); + // Parse SL To Connect To The Server + Rm := Copy(Sl, 1, Pos('http://', Sl)-1); + Delete(Sl, 1, Pos('http://', Sl)+6); // Don't Need http:// + PT := '80'; + Pl := Pos(':', Sl); + If (Pl > 0) And (Pl < Pos('/', Sl)) Then + Begin + // There's A Port Number + HN := Copy(Sl, 1, Pos(':', Sl)-1); + Delete(Sl, 1, Pos(':', Sl)); + PT := Copy(Sl, 1, Pos('/', Sl)-1); + Delete(Sl, 1, Pos('/', Sl)-1); + End + Else + Begin + HN := Copy(Sl, 1, Pos('/', Sl)-1); + Delete(Sl, 1, Pos('/', Sl)-1); + End; + Content := Rm + Sl+ Content; + CSock.HostName := HN; + CSock.PortName := PT; + CSock.Blocking := True; + CSock.Open; + End; + If (SL <> '') And (CSock.Connected) Then + Begin + CSock.Text := Content; + Content := ''; + End; + End; + If SL <> '' Then + Begin + Temp := CSock.Text; + If (Temp <> '') And (NewSock.Connected) Then + NewSock.Text := Temp; + Temp := ''; + End; + Until ((SL <> '') And (Not CSock.Connected)) Or (Not NewSock.Connected); + Except + On Exception Do Begin End; + End; + Finally + Content := ''; + UniqueString(Temp); + SL := ''; + HN := ''; + PT := ''; + Rm := ''; + NewSock.Free; + CSock.Free; + NSock.Free; + Dec(ThreadCount); + Lbl_Threads.Caption := IntToStr(ThreadCount); + EndThread(0); + End; +end; + +procedure TFrm_Main.FormCreate(Sender: TObject); +begin + Lbl_HeapFree.Caption := IntToStr(GetHeapStatus.TotalAllocated) + '/' + IntToStr(GetHeapStatus.TotalFree); +end; + +procedure TFrm_Main.Button1Click(Sender: TObject); +begin + Frm_IP.Memo1.Lines := IPCache; + Frm_IP.ShowModal; +end; + +procedure TFrm_Main.Timer1Timer(Sender: TObject); +begin + Lbl_HeapFree.Caption := IntToStr(GetHeapStatus.TotalAllocated) + '/' + IntToStr(GetHeapStatus.TotalFree); +end; + +end. diff --git a/lib/sock/PROXY/proxy.dpr b/lib/sock/PROXY/proxy.dpr new file mode 100644 index 00000000..94fb7512 --- /dev/null +++ b/lib/sock/PROXY/proxy.dpr @@ -0,0 +1,16 @@ +program Proxy; + +uses + Forms, + main in 'main.pas' {Frm_Main}, + ip in 'ip.pas' {Frm_IP}; + +{$R *.RES} + +begin + Application.Initialize; + Application.Title := 'Simple Proxy Server'; + Application.CreateForm(TFrm_Main, Frm_Main); + Application.CreateForm(TFrm_IP, Frm_IP); + Application.Run; +end. diff --git a/lib/sock/README.TXT b/lib/sock/README.TXT new file mode 100644 index 00000000..e07583e0 --- /dev/null +++ b/lib/sock/README.TXT @@ -0,0 +1,25 @@ +Sock.Pas +TSock Component +Version 1.0f +Written By Tom Bradford +(C) 1997 By Beach Dog Software, Inc. +(R) All Rights Reserved + +Documentation For TSock Can Be Found In Sock.htm. + +Sample Programs (All Found In Their Respective Sub-Directories): + + UDPTest - UDP Testing Program + SockTest - Generic Client Socket Tester + SrvTest - Echo Server + Proxy - HTTP Proxy Server + Base64 - Base-64 And URL Encoding & Decoding Tester + +Please Send All Bug Reports To + + bradford@beachdogsoftware.com + +For Current Versions And Info, Visit + + http://www.beachdogsoftware.com + diff --git a/lib/sock/SOCK.DCR b/lib/sock/SOCK.DCR new file mode 100644 index 00000000..63406b2a Binary files /dev/null and b/lib/sock/SOCK.DCR differ diff --git a/lib/sock/SOCK.HTM b/lib/sock/SOCK.HTM new file mode 100644 index 00000000..4f69c924 --- /dev/null +++ b/lib/sock/SOCK.HTM @@ -0,0 +1,868 @@ + + + + + + +TSock Documentation + + + + +

 

+ + + + + + +
Sock.pas
+ TSock Component Class
+ Version 1.0f FREEWARE
+ Written By Tom Bradford +
+ Copyright 1997 By Beach + Dog Software
+ All Rights Reserved +

Visit Our Web Site At http://www.beachdogsoftware.com For Updates

+
+ +
+ +

Contents +

+ +
+

Introduction +
+ Release Notes +
+ Features
+ Properties +
+ Events
+ Methods
+ Support + Routines
+ Examples

+
+ +
+ +

Introduction +

+ +
+

Welcome to the 1.0f release of TSock. + TSock is FREEWARE. Thousands of people are using the + component and there is no way in hell that I can handle + updates, registration and support. I will still update the + product and I will be happy to answer email questions + regarding it. If you still want to send me money in + appreciation, feel free to do so. You can find our address on + our home page.

+

As of version + 1.0e, the TSock package is now shipped with the component + source code! If you are + able to isolate and fix a bug in the component, please email + the changes to Beach Dog Software for incorporation into + future releases of the component. The point of TSock is to + make it easier for everyone who develops socket applications. + Please do not redistribute modified versions of the TSock + component.

+

Because it is FREEWARE, there is no + charge for using this component in your own applications. Be + aware that you use the component at your own risk. Beach Dog + Software and Tom Bradford are in no way responsible for + anything bad that might happen through the product's use. + When you do use it though, please give us credit for the + component, and maybe a hyperlink to our site. It would be + nice.

+
+ +

Table Of Contents +
+

+ +
+ +

1.0f Release +Notes

+ +
+
    +
  • I Added the BlockingTimeout property. BlockingTimeout will force TSock to wait for a specific + number of milliseconds while attempting to fill its + receive buffer. Receives will return when the buffer + is filled or when the blocking timeout has elapsed + with no data.
  • +
  • I Added the Stream property. Stream + returns a TStream compatible object for performing + Stream I/O on a TSock instance.
  • +
  • I Added the ReceiveCount method. ReceiveCount allows you to limit the size of the + receive buffer.
  • +
  • I entirely rewrote the threading + mechanism used by TSock for AutoAccept Blocking Servers. The older mechanism + relied on Win32 C-Style CreateThread coding, which + caused Delphi to leak resources and blow up upon + program termination. The new mechanism uses Delphi's + TThread objects to perform multi-threading, which is + a lot safer.
  • +
+
+ +

1.0e Release Notes

+ +
+
    +
  • I was finally able to isolate and + squash the TSock.Free bug. It was a really stupid + oversight on my part and I should be shot for it.
  • +
  • I have decided to release the + TSock source code to the general public. I think it + is better that others have access to the source code + to help debug and troubleshoot, as well as help us + add features to the component.
  • +
+
+ +

Release Notes Prior To 1.0e

+ +
+
    +
  • A bug was found in the reporting + of error status that would cause a false onConnect + event to be reported. This bug has been stomped.
  • +
  • A bug was found in the dynamic + creation of asynchronous sockets that caused I/O to + become non-responsive. This problem has been + remedied.
  • +
  • A bug was found in Datagram + Sockets that was not caught in our final QA. This + problem has been corrected.
  • +
  • A bug was found in ReceiveLine. ReceiveLine + short-circuited on Blocking + Sockets if the the socket closed and there was still + data in the input buffer. This has been remedied. In + order to fix the problem, I have added a property + called EndOfFile. EndOfFile + will return TRUE if the socket is no longer + connected and the input buffer is empty. You should + use EndOfFile if you are performing buffered input + using ReceiveLine.
  • +
  • TSock now caches IP addresses in + the IPCache global variable. A user shouldn't + have to interact with this variable directly. If you + need to clear the cache, call the IPCache.Clear method.
  • +
  • Connected is now determined in two places during + normal operation. With a non-blocking socket, Connected + is set to TRUE by + an FD_CONNECT message and set to FALSE by an + FD_CLOSE message. With a blocking socket, Connected is set to TRUE by the socket + being opened and set to FALSE by Receive returning 0 content when it performs a + WinSock recv.
  • +
  • TSock allows its Socket property to be assigned. When you + assign this property, the component will perform a + GetSockOpt to verify that SO_ACCEPTCONN (indicates + Listening) doesn't return TRUE. If it does + return TRUE, I throw an exception. The socket + can't verify that there isn't some other process + monitoring the socket, so it will not allow you to + assign a listening socket to it.
  • +
  • The Blocking property has been rewritten so that you + can set it even when a connection is present. If set + to TRUE, the asynchronous message hook is + disabled, and IOCtlSocket is used to turn blocking + on. If set to FALSE, the asynchronous message + hook is installed. Please note that the TSock events + act differently in Blocking and Non-Blocking mode... + In asynchronous mode, all events prompt the + implementer to perform some action. In blocking mode, + with the exception of OnAccept and OnAutoAccept, if an event is triggered at all, it is + usually to report some sort of status.
  • +
  • When dynamically creating a TSock + control, it is recommended that you perform an + InsertControl to insert the component into an + appropriate container. The control requires a Parent + to allocate a window handle. If Parent has + not been set, the control will use Screen.Forms[0] as + a Parent. Window handles are required to + perform asynchronous non-blocking socket calls.
  • +
+
+ +

Table Of Contents +
+

+ +
+ +

Features +

+ +
+
    +
  • Package caches resolved IP + Addresses for faster DNS lookups.
  • +
  • Supports both TCP and UDP + protocols.
  • +
  • Listening mode will automatically + accept incoming connections, create a new TSock + component for the connected socket, and spawn a new + thread of execution to handle concurrent blocking + server connections.
  • +
  • Support for blocking and + non-blocking socket communications.
  • +
  • Component can transfer blocks of + data up to 4 gigabytes in length.
  • +
  • MIME-standard Base-64 encoding and + decoding routines.
  • +
  • URL encoding and decoding + routines.
  • +
  • Robust state information messaging + system for diagnostics and status.
  • +
  • Support for multiple connections + utilizing multiple-threads.
  • +
+
+ +

Table Of Contents +
+

+ +
+ +

Properties +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Property + NameTypeScopeDescription
SocketTypeTSocketTypeDesignType + of socket. This value can either be stStream or + stDatagram. If Listen is set to TRUE, this property will + automatically be set to stStream because Datagram sockets + do not support listening mode. Likewise, if the socket + type is set to stDatagram, the Listen property will be set + to False (in design mode).
HostNameStringDesignHost + Name or IP Address. The Socket Component will + automatically distinguish a Host Name (ex: + www.cinteractive.com) from an IP Address (ex: 127.0.0.1).
PortNameStringDesignPort + Number or Service Name. Port Numbers are well known ports + such as 80 for HTTP or 7 for Echo. Service Names perform + a database lookup into the SERVICES file.
BlockingBooleanDesignBlocking + Socket I/O. TRUE causes a socket to block while + connecting, waiting for incoming data and writing to the + socket. FALSE causes an asynchronous window + message to be sent when a connection is made, data is + available to be read and written.
BlockingTimeoutIntegerDesignBlockingTimeout + will force TSock to wait for a specific number of + milliseconds while attempting to fill its receive buffer. + Receives will return when the buffer is + filled or when the blocking timeout has elapsed with no + data.
AutoAcceptBooleanDesignAuto-Accept + Incoming Connections. TRUE causes a Listening + socket (Listen = TRUE) to automatically accept an + incoming connection and call OnAutoAccept as a new thread. If no OnAutoAccept is defined, OnAccept is called. If No OnAccept is defined, the incoming + connection will linger.
ListenBooleanDesignListen + For Incoming Connections. If TRUE, creates a + thread that loops, listening for incoming sockets and + handling them based on the AutoAccept, OnAccept, and OnAutoAccept properties.
ConnectedBooleanRunTimeConnect + Socket Or Check Connection. If set to TRUE, the + component attempts to open a socket connection. If set to + FALSE, the component closes a current connection. + If the value returned is TRUE, the socket is + connected, otherwise, it is not.
EndOfFileBooleanRunTimeEndOfFile + will return TRUE if the socket is no longer + connected and the input buffer is empty. You should use + EndOfFile if you are performing buffered input using ReceiveLine.
SocketTSocketRunTimeReturns + Socket Value. Returns the value of a connected socket. + Returns INVALID_SOCKET (-1) if the socket isn't + currently connected. This property also allows the user + to set the value of the socket, but this is inadvisable.
StreamTStreamRunTimeReturns a + TStream compatible object to allow performing + Stream-based I/O on a TSock instance.
TextStringRunTimeSends + And Receives Text. If being assigned to, the value being + assigned will be sent to the socket. If being read from, + any incoming data from the socket will be returned.
LineBreakTLineBreakDesignSets the + method of scanning incoming data for possible line + breaks. This property is used in cooperation with the ReceiveLine method for reading an incoming + data stream 1 text line at a time. The possible values + for this property are lbCR, lbLF, lbCRLF and lbSmart. + lbSmart will make guesses as to the form of the incoming + data stream based upon content and break the lines + accordingly.
+ +

Table Of Contents +
+

+ +
+ +

Events +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Event NameEvent + Description
OnConnect +
+ (TObject)
Occurs + when a client socket connects to a remote host.
OnDisconnect +
+ (TObject)
Occurs + when a client socket disconnects from a remote host or + when the connection is unexpectedly terminated.
OnInfo +
+ (TObject, TSocketInfo, + String)
Occurs + when the component produces a state message. This event + sends a TSocketInfo parameter as well as a string with + information specific to the task that is being reported + on.
OnRead +
+ (TObject, Integer)
Occurs + when data is available to be read from the socket.
OnWrite +
+ (TObject)
Occurs + when the socket will allow data to be written.
OnAccept +
+ (TObject)
Occurs + when a socket is in queue to be accepted. This event can + be used in cooperation with the Accept method to perform multi-client + server operations.
OnAutoAccept +
+ (TObject, TSock)
Occurs + when AutoAccept is TRUE. Creates a new client socket + and invokes OnAutoAccept as a thread separate from the main + application. It is the implementer's responsibility to Free + the TSock component that is passed.
+ +

Table Of Contents +
+

+ +
+ +

Methods +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method + NameMethod + Description
Open + : BooleanOpens + a connection to the remote HostName using PortName. Returns TRUE if + successful. Returns FALSE if the connection could + not be established.
Close + : BooleanCloses + any existing remote connection.
Send(String) + : BooleanSends + a string to the remote connection. Returns TRUE if + successful.
Receive + : StringReturns + any incoming data from the socket. Will block while + waiting for data if Blocking is set to TRUE and + no data is available in the queue.
ReceiveCount(Integer) + : StringReceiveCount + allows you to limit the size of the receive buffer. + ReceiveCount doesn't necessarily force the size of the + returned string, but does ensure that BlockingTimeout will return when it is able to + fill to requested buffer size.
SendDatagram(String, + String) : BooleanSends + the text in the first String parameter as a Datagram to + the HostName address defined in the second String + parameter. Because UDP is by-definition unreliable, this + method always returns TRUE.
ReceiveDatagram(Var + String) : StringReturns + a string with the Datagram content received from any + address through the bound UDP PortName. ReceiveDatagram will set the String parameter to + the IP address of the Datagram's originator.
ReceiveLine + : StringReturns + the next input line from the input stream for a socket + with SocketType set to stStream. This method uses the LineBreak property to determine how to scan + the input stream. If the SocketType is set to stDatagram, this method returns + the next incoming Datagram in its entirety. Because the + entire Input Stream isn't returned by this method, the + socket may have already determined that the connection + has been closed. In this case, it is the user's + responsibility to check for incoming data even if the + socket is no longer connected.
Accept(TSock) + : BooleanAccepts + the next available incoming socket from the listening + loop. Accept return TRUE if successful. This + method also assigned the TSock parameter to a valid TSock + connection component. It is the implementer's + responsibility to Free this component when it is + no longer needed. Also, the new component is created with + no Event handlers, so the implementer is responsible for + assigning them if the socket is non-blocking. This event + will only be triggered if Listen is TRUE.
HostLookup(String) + : TInAddrLooks + up a remote host using the String parameter. The + parameter can either be an IP address (ex: + 111.111.111.111) or a domain name (ex: + www.cinteractive.com). The value that is returned is a + TInAddr structure that can be used when building a + TSockAddrIn for binding a socket to an address.
PortLookup(String) + : WordLooks + up a service port using the String parameter. The + parameter can either be a textual service name (ex: echo + or Finger) or a port number (ex: 80). The value that is + returned is a unsigned short in network byte order.
StartListen + : BooleanSets + the socket component into listening mode. The result is TRUE + if successful and FALSE otherwise. This method is + the same as setting Listen=TRUE and then checking the + value of Listen.
StopListen + : BooleanTurns + listening mode off.
+ +

Table Of Contents +
+

+ +
+ +

Support Routines

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Routine + NameRoutine + Description
WSDescription + : StringReturns + a vendor-defined string that describes the presently + running WinSock implementation. This information is + obtained while performing an initial WSAStartup + WinSock call.
WSASystemStatus + : StringReturns + a vendor-defined string containing system status.
SocketInfoText(TSocketInfo) + : StringGiven + the TSocketInfo parameter, returns a string that + describes the parameter. This function can be used in + conjunction with an OnInfo event.
ErrToStr(Integer) + : StringGiven + the Integer parameter, returns the WinSock defined string + associated with a particular error code. TSock uses this + support routine internally for translating asynchronous + errors to TSockException exceptions.
Base64Encode(String) + : StringConverts + the String parameter to a MIME-standard Base-64 encoded + block and returns the conversion as the String result.
Base64Decode(String) + : StringConverts + the String parameter from a MIME-standard Base-64 encoded + block and returns the conversion as the String result.
URLEncode(String) + : StringConverts the + String parameter to a URLEncoding scheme and returns the + conversion as the String result.
URLDecode(String) + : StringConverts the + String parameter from a URLEncoding scheme and returns + the conversion as the String result.
+ +

Table Of Contents +
+

+ +
+ +

Examples +

+ +
+

There are a few sample applications and + more on the way. These samples are by no means real + applications. They are flaky and buggy. They are meant only + to show you how to perform certain tasks using the component. +

+
    +
  • UDPTester is a Datagram + testing program that implements a simple chat system.
  • +
  • SockTest is a general + purpose socket testing client. It demonstrates the + non-blocking application of the TSock component. It + allows a user to open any port on any host, send any + data, and watch what comes back.
  • +
  • SrvTest is an + implementation of the Echo protocol. This protocol is + simple. Once the server answers, it spits back + whatever the client sends to it. This application + demonstrates how to write a multi-threaded blocking + server.
  • +
  • Test64 is a general-purpose + Base-64 and URL encoding and decoding tester.
  • +
  • Proxy is a simple HTTP + proxy server. It demonstrates how to write a + multi-threaded blocking server as well as how to + dynamically create TSock objects and connect them to + a remote port. The proxy server itself does not + perform content caching but it serves as a good + starting point for a custom implementation.
  • +
+
+ +

Table Of Contents +

+ + diff --git a/lib/sock/SOCK.JPG b/lib/sock/SOCK.JPG new file mode 100644 index 00000000..1c741fc8 Binary files /dev/null and b/lib/sock/SOCK.JPG differ diff --git a/lib/sock/SOCK.RES b/lib/sock/SOCK.RES new file mode 100644 index 00000000..978c14f9 Binary files /dev/null and b/lib/sock/SOCK.RES differ diff --git a/lib/sock/SOCKTEST/Main.dcu b/lib/sock/SOCKTEST/Main.dcu new file mode 100644 index 00000000..98195d0e Binary files /dev/null and b/lib/sock/SOCKTEST/Main.dcu differ diff --git a/lib/sock/SOCKTEST/Main.dfm b/lib/sock/SOCKTEST/Main.dfm new file mode 100644 index 00000000..d7695fab Binary files /dev/null and b/lib/sock/SOCKTEST/Main.dfm differ diff --git a/lib/sock/SOCKTEST/Main.pas b/lib/sock/SOCKTEST/Main.pas new file mode 100644 index 00000000..088e4293 --- /dev/null +++ b/lib/sock/SOCKTEST/Main.pas @@ -0,0 +1,120 @@ +unit Main; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Sock, StdCtrls, ExtCtrls, ToolWin, ComCtrls; + +type + TFrm_Main = class(TForm) + Memo_Output: TMemo; + Memo_Status: TMemo; + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + Btn_Open: TButton; + Chk_CR: TCheckBox; + Chk_LF: TCheckBox; + Btn_Send: TButton; + Btn_Close: TButton; + Edit_Host: TEdit; + Edit_Port: TEdit; + Chk_NULL: TCheckBox; + Edit_Input: TMemo; + Button1: TButton; + Sock1: TSock; + procedure Sock1Read(Sender: TObject; Count: Integer); + procedure Btn_OpenClick(Sender: TObject); + procedure Sock1Write(Sender: TObject); + procedure Sock1Connect(Sender: TObject); + procedure Btn_CloseClick(Sender: TObject); + procedure Btn_SendClick(Sender: TObject); + procedure Sock1Disconnect(Sender: TObject); + procedure Sock1Info(sender: TObject; SocketInfo: TSocketInfo; + Msg: string); + procedure FormCreate(Sender: TObject); + procedure Button1Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Frm_Main: TFrm_Main; + +implementation + +{$R *.DFM} + +procedure TFrm_Main.Sock1Read(Sender: TObject; Count: Integer); +Var Temp : String; + Cnt : LongInt; +begin + Repeat + SetLength(Temp, 32); // To Test + Cnt := Sock1.Stream.Read(Temp[1], 32); + Memo_Output.Text := Memo_Output.Text + Copy(Temp, 1, Cnt); + Until (Cnt<32); + //Memo_Output.Text := Memo_Output.Text + Sock1.Text; +end; + +procedure TFrm_Main.Btn_OpenClick(Sender: TObject); +begin + Sock1.HostName := Edit_Host.Text; + Sock1.PortName := Edit_Port.Text; + Sock1.Connected := True; +end; + +procedure TFrm_Main.Sock1Write(Sender: TObject); +begin + Memo_Status.Text := Memo_Status.Text + '[ONWRITE!]'#13#10; +end; + +procedure TFrm_Main.Sock1Connect(Sender: TObject); +begin + Memo_Status.Text := Memo_Status.Text + '[ONCONNECT!]'+#13+#10; +end; + +procedure TFrm_Main.Btn_CloseClick(Sender: TObject); +begin + Sock1.Connected := False; +end; + +procedure TFrm_Main.Btn_SendClick(Sender: TObject); +Var Temp : String; +begin + Temp := Edit_Input.Text; + If Chk_CR.Checked Then Temp := Temp + #13; + If Chk_LF.Checked Then Temp := Temp + #10; + If Chk_Null.Checked Then Temp := Temp + #0; + Sock1.Stream.Write(Temp[1], Length(Temp)); + Edit_Input.Text := ''; +end; + +procedure TFrm_Main.Sock1Disconnect(Sender: TObject); +begin + Memo_Status.Text := Memo_Status.Text + '[DISCONNECT!]'#13#10; +end; + +procedure TFrm_Main.Sock1Info(sender: TObject; SocketInfo: TSocketInfo; + Msg: string); +begin + Memo_Status.Text := Memo_Status.Text + '[' + Msg + ']' + #13 + #10; +end; + +procedure TFrm_Main.FormCreate(Sender: TObject); +begin + Memo_Status.Text := WSDescription + #13 + #10 + + WSSystemStatus + #13 + #10 + + 'Delphi Sock Component V1.0f' + #13 + #10 + + 'Written By Tom Bradford' + #13 + #10; +end; + +procedure TFrm_Main.Button1Click(Sender: TObject); +begin + Memo_Output.Clear; +end; + +end. diff --git a/lib/sock/SOCKTEST/SOCKTEST.RES b/lib/sock/SOCKTEST/SOCKTEST.RES new file mode 100644 index 00000000..2f0a951c Binary files /dev/null and b/lib/sock/SOCKTEST/SOCKTEST.RES differ diff --git a/lib/sock/SOCKTEST/SockTest.dpr b/lib/sock/SOCKTEST/SockTest.dpr new file mode 100644 index 00000000..bf5fd178 --- /dev/null +++ b/lib/sock/SOCKTEST/SockTest.dpr @@ -0,0 +1,15 @@ +program SockTest; + +uses + Forms, + Sock, + Main in 'Main.pas' {Frm_Main}; + +{$R *.RES} + +begin + Application.Initialize; + Application.Title := 'Socket Tester'; + Application.CreateForm(TFrm_Main, Frm_Main); + Application.Run; +end. diff --git a/lib/sock/SRVTEST/SRVTEST.RES b/lib/sock/SRVTEST/SRVTEST.RES new file mode 100644 index 00000000..8a58e978 Binary files /dev/null and b/lib/sock/SRVTEST/SRVTEST.RES differ diff --git a/lib/sock/SRVTEST/Srvtest.dpr b/lib/sock/SRVTEST/Srvtest.dpr new file mode 100644 index 00000000..585d1655 --- /dev/null +++ b/lib/sock/SRVTEST/Srvtest.dpr @@ -0,0 +1,14 @@ +program SrvTest; + +uses + Forms, + srvr in 'srvr.pas' {Frm_Srvr}; + +{$R *.RES} + +begin + Application.Initialize; + Application.Title := 'Echo Server Test'; + Application.CreateForm(TFrm_Srvr, Frm_Srvr); + Application.Run; +end. diff --git a/lib/sock/SRVTEST/srvr.dfm b/lib/sock/SRVTEST/srvr.dfm new file mode 100644 index 00000000..b2572b91 Binary files /dev/null and b/lib/sock/SRVTEST/srvr.dfm differ diff --git a/lib/sock/SRVTEST/srvr.pas b/lib/sock/SRVTEST/srvr.pas new file mode 100644 index 00000000..faadc2d2 --- /dev/null +++ b/lib/sock/SRVTEST/srvr.pas @@ -0,0 +1,81 @@ +unit srvr; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, Sock, Winsock; + +type + TFrm_Srvr = class(TForm) + Memo_Status: TMemo; + Edit_Port: TEdit; + Label1: TLabel; + Btn_Start: TButton; + Btn_Stop: TButton; + Sock1: TSock; + procedure Btn_StartClick(Sender: TObject); + procedure Btn_StopClick(Sender: TObject); + procedure Sock1AutoAccept(Sender: TObject; NewSock: TSock); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + FOutput : TextFile; + end; + +var + Frm_Srvr: TFrm_Srvr; + +implementation + +{$R *.DFM} + +procedure TFrm_Srvr.Btn_StartClick(Sender: TObject); +begin + Sock1.PortName := Edit_Port.Text; + Sock1.StartListen; + Btn_Start.Enabled := False; + Btn_Stop.Enabled := True; +end; + +procedure TFrm_Srvr.Btn_StopClick(Sender: TObject); +begin + Sock1.StopListen; + Btn_Start.Enabled := True; + Btn_Stop.Enabled := False; +end; + +procedure TFrm_Srvr.Sock1AutoAccept(Sender: TObject; NewSock: TSock); +Var Temp : String; +begin + Memo_Status.Text := Memo_Status.Text + 'Incoming...' + #13 + #10; + Memo_Status.Text := Memo_Status.Text + 'Port: ' + NewSock.PortName + #13 + #10; + Memo_Status.Text := Memo_Status.Text + 'Address: ' + NewSock.HostName + #13 + #10; + Repeat + Try + Temp := NewSock.Text; + Write(FOutput, Temp); + If (Temp <> '') Then NewSock.Text := Temp; + Memo_Status.Text := Memo_Status.Text + Temp; + Except + On E:ESockException Do Memo_Status.Text := Memo_Status.Text + #13 + #10 + E.Message + #13 + #10; + End; + Until Not NewSock.Connected; + Memo_Status.Text := Memo_Status.Text + '[End Connect]' + #13 + #10; +end; + +procedure TFrm_Srvr.FormCreate(Sender: TObject); +begin + AssignFile(FOutput, 'C:\SRVLOG.TXT'); + Rewrite(FOutput); +end; + +procedure TFrm_Srvr.FormDestroy(Sender: TObject); +begin + CloseFile(FOutput); +end; + +end. diff --git a/lib/sock/Sock.dcu b/lib/sock/Sock.dcu new file mode 100644 index 00000000..3328ceb5 Binary files /dev/null and b/lib/sock/Sock.dcu differ diff --git a/lib/sock/Sock.pas b/lib/sock/Sock.pas new file mode 100644 index 00000000..8c989629 --- /dev/null +++ b/lib/sock/Sock.pas @@ -0,0 +1,1319 @@ +Unit Sock; + +// ***************************************************************************** +// Sock.Pas (TSock) +// Windows Socket Component For Delphi 3.0 & C++Builder +// Version 1.0f +// Written By Tom Bradford +// (C) 1997 By Beach Dog Software, Inc. +// All Rights Reserved +// http://www.beachdogsoftware.com +// ***************************************************************************** + +Interface + +Uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + WinSock; + +Type TSocketInfo = (siLookUp, siConnect, siClose, siListen, siReceive, siSend, siAccept, siError); + TSocketType = (stStream, stDatagram); + TLineBreak = (lbCRLF, lbCR, lbLF, lbSmart); + +Const WM_SOCK = WM_USER + 75; // Hopefully, Your App Won't Use This Message + +Type TSock = Class; // Forward Declared For Event Types + + ESockException = Class(Exception); + TNotifyReadEvent = Procedure(Sender : TObject; Count : Integer) Of Object; + TNotifyAutoEvent = Procedure(Sender : TObject; NewSock : TSock) Of Object; + TNotifyInfoEvent = Procedure(sender : TObject; SocketInfo : TSocketInfo; Msg : String) Of Object; + + TSock = Class(TCustomControl) + Private + FSockAddrIn : TSockAddrIn; // Address Information Block + FRecvAddrIn : TSockAddrIn; // Address Information Block For RecvFrom + FLastChar : Char; // Last Character Read For Line-Input + + FPicture : TBitmap; // Holder For Design-Time Image + FBmp_TCP : TBitmap; // TCP Bitmap + FBmp_UDP : TBitmap; // UDP Bitmap + FBmp_Listen : TBitmap; // Listening Bitmap + + // Character Buffer (Most WINSOCK.DLLs Max At 32k) + FCharBuf : Array[1..32768] Of Char; + + FSocketType : TSocketType; // Socket Type (Stream Or Datagram) + FLineBreak : TLineBreak; // Line Break Style For Line Input + FHostName : String; // Host Name Or IP Address + FPortName : String; // Port Name Or Well-Known Number + FSocket : TSocket; // Socket Handle + FInBuffer : String; // Input Buffer + FOutBuffer : String; // Output Buffer For Non-Blocking + FListen : Boolean; // Socket Listens? + FBlocking : Boolean; // Do Blocking Calls? + FAutoAccept : Boolean; // Automatically Accept Incomings + FConnected : Boolean; // Are We Connected? + FBlockTime : Integer; // How Long To Wait For Blocking Operation + FStream : TStream; // Associated TSockStream Object + + FOnConnect : TNotifyEvent; + FOnDisconnect : TNotifyEvent; + FOnInfo : TNotifyInfoEvent; + FOnRead : TNotifyReadEvent; + FOnWrite : TNotifyEvent; + FOnAccept : TNotifyEvent; + FOnAutoAccept : TNotifyAutoEvent; + + // Property Set/Get Routines + Procedure SetHostName(Value : String); + Procedure SetPortName(Value : String); + Function GetText : String; + Procedure SetText(Value : String); + Procedure SetListen(Value : Boolean); + Procedure SetBlocking(Value : Boolean); + Procedure SetAutoAccept(Value : Boolean); + Procedure SetConnected(Value : Boolean); + Function GetConnected : Boolean; + Procedure SetSocket(Value : TSocket); + Procedure SetSocketType(Value : TSocketType); + Function GetRemoteHost : String; + Function GetEOF : Boolean; + + // Private Support Methods + Procedure DoInfo(SocketInfo : TSocketInfo; Msg : String); + Procedure SetBitmap; + Protected + // Event Handlers + Procedure WMSock(Var Message : TMessage); Message WM_SOCK; + Procedure WMPaint(Var Message : TWMPaint); Message WM_PAINT; + Procedure WMSize(Var Message : TWMSize); Message WM_SIZE; + + // Loaded Handles Starting Listening Mode After Streaming The Properties + Procedure Loaded; Override; + + // Protected Constructor Can Only Be Called By TSock Class + Constructor CreateWithSocket(AOwner : TComponent; NewSocket : TSocket); Virtual; + Destructor Destroy; Override; + + Public + Constructor Create(AOwner : TComponent); Override; + + Function Open : Boolean; + Function Close : Boolean; + Function Send(Value : String) : Boolean; + Function ReceiveCount(Count : Integer) : String; + Function Receive : String; + Function ReceiveLine : String; + Function SendDatagram(Value, HostName : String) : Boolean; + Function ReceiveDatagram(Var HostName : String) : String; + + // The Accept Method Will Create NewSock, But User Must Free + Function Accept(Var NewSock : TSock) : Boolean; + + // Public Support Methods + Function HostLookup(Value : String) : TInAddr; + Function PortLookup(Value : String) : U_Short; + + // StartListen And StopListen Are A Robust Form Of Setting Listen + Function StartListen : Boolean; + Function StopListen : Boolean; + + Property Text : String Read GetText Write SetText; + Property Connected : Boolean Read GetConnected Write SetConnected; // Used To Read FConnected + + Property EndOfFile : Boolean Read GetEOF; + Property Socket : TSocket Read FSocket Write SetSocket; + + Property Stream : TStream Read FStream; + + // RemoteHost Returns The Remote IP If SocketType=stStream + // And Will Return The Most Recent Incoming Datagram IP If + // SocketType=stDatagram + Property RemoteHost : String Read GetRemoteHost; + + Published + Property SocketType : TSocketType Read FSocketType Write SetSocketType; + Property HostName : String Read FHostName Write SetHostName; + Property PortName : String Read FPortName Write SetPortName; + Property Blocking : Boolean Read FBlocking Write SetBlocking; + Property AutoAccept : Boolean Read FAutoAccept Write SetAutoAccept; + Property Listen : Boolean Read FListen Write SetListen; + Property LineBreak : TLineBreak Read FLineBreak Write FLineBreak; + Property BlockingTimeout : Integer Read FBlockTime Write FBlockTime; + + Property OnConnect : TNotifyEvent Read FOnConnect Write FOnConnect; + Property OnDisconnect : TNotifyEvent Read FOnDisconnect Write FOnDisconnect; + Property OnInfo : TNotifyInfoEvent Read FOnInfo Write FOnInfo; + Property OnRead : TNotifyReadEvent Read FOnRead Write FOnRead; + Property OnWrite : TNotifyEvent Read FOnWrite Write FOnWrite; + Property OnAccept : TNotifyEvent Read FOnAccept Write FOnAccept; + Property OnAutoAccept : TNotifyAutoEvent Read FOnAutoAccept Write FOnAutoAccept; + End; + +// Global IP Caching Mechanism. Uses A String List That Stores The 32-Bit IP +// Address Of It's Associated Hostname In The Object Property Of The List. You +// Should Never Have To Manipulate This Object Directly, But It Is Made Public +// For The Purpose Of Calling The Clear Method To Empty It. +Var IPCache : TStringList; + +Function WSDescription : String; // Returns A Description Of The WinSock Driver +Function WSSystemStatus : String; // Returns System Status From The WinSock Driver +Function SocketInfoText(Value : TSocketInfo) : String; // Converts TSocketInfo Values To Text +Function ErrToStr(Value : Integer) : String; // Converts A WinSock Error To Text +Function Base64Encode(Value : String) : String; // Converts Passed Value To MIME Base64 +Function Base64Decode(Value : String) : String; // Converts Passed Value From MIME Base64 +Function URLEncode(Value : String) : String; // Converts String To A URLEncoded String +Function URLDecode(Value : String) : String; // Converts String From A URLEncoded String + +Procedure Register; + +Implementation + +{$R SOCK.RES} + +Const Base64Table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + ValidURLChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + SocketInfoMsg : Array[siLookUp..siError] Of String = ('Lookup','Connect','Close','Listen','Receive','Send','Accept','Error'); + +Type TSockStream = Class(TStream) + Private + Sock : TSock; + Public + function Read(Var Buffer; Count : Longint): Longint; Override; + function Write(Const Buffer; Count : Longint): Longint; Override; + function Seek(Offset : Longint; Origin : Word): Longint; Override; + + Constructor Create(Sock : TSock); Virtual; + End; + +Type TSockThread = Class(TThread) + Private + ParentSock : TSock; + ClientSock : TSock; + Public + Procedure Execute; Override; + Procedure RunThread(ParentSock, ClientSock : TSock); + End; + +// WinSock Initialization Data +Var WSAData : TWSAData; + +//*** TSockStream Methods ****************************************************** + +Constructor TSockStream.Create(Sock : TSock); +Begin + Self.Sock := Sock; +End; + +Function TSockStream.Read(Var Buffer; Count : Longint): Longint; +Var Temp : String; +Begin + Temp := Sock.ReceiveCount(Count); + Move(Temp[1], Buffer, Length(Temp)); + Result := Length(Temp); +End; + +Function TSockStream.Write(Const Buffer; Count : Longint): Longint; +Var Temp : String; +Begin + SetLength(Temp, Count); + Move(Buffer, Temp[1], Count); + Sock.Send(Temp); + Result := Count; +End; + +Function TSockStream.Seek(Offset : Longint; Origin : Word): Longint; +Begin + Result := 0; +End; + +//*** TSockThread Methods ****************************************************** + +Procedure TSockThread.Execute; +Begin + ParentSock.OnAutoAccept(ParentSock, ClientSock); + Self.Free; +End; + +Procedure TSockThread.RunThread(ParentSock, ClientSock : TSock); +Begin + Self.ParentSock := ParentSock; + Self.ClientSock := ClientSock; + Resume; +End; + +//*** Property Set/Get Procedures ********************************************** + +Procedure TSock.SetHostName(Value : String); +Begin + If (FSocketType = stStream) And FConnected Then + DoInfo(SiLookup, 'Setting HostName While Connected Has No Effect'); + FHostName := Value; + If (FSocketType = stDatagram) And FConnected Then + FSockAddrIn.SIn_Addr := HostLookup(Value); +End; + +Procedure TSock.SetPortName(Value : String); +Begin + If FConnected Then + DoInfo(SiLookup, 'Setting PortName While Connected Has No Effect'); + FPortName := Value; +End; + +Function TSock.GetText : String; +Begin + // Just Call The Receive Method + Result := Receive; +End; + +Procedure TSock.SetText(Value : String); +Begin + // Just Call The Send Method And Ignore The Boolean Result + Send(Value); +End; + +Procedure TSock.SetListen(Value : Boolean); +Var WasListen : Boolean; + Addr : TSockAddr; + Res : Integer; +Begin + If (csDesigning In ComponentState) Then + Begin + FListen := Value; + If Value and (FSocketType = stDatagram) Then + // Listening Sockets Must Be Stream Sockets + SetSocketType(stStream) + Else + SetBitmap; + Exit; + End + Else + If (csReading In ComponentState) Then + Begin + // If We Haven't Loaded Yet, Just Set The Value And Exit + FListen := Value; + Exit; + End; + WasListen := FListen; + If (FSocket <> INVALID_SOCKET) And (Not WasListen) Then + Begin + FListen := False; + Raise ESockException.Create('Listen - Socket Already In Use'); + End; + If (FSocketType = stDatagram) And Value Then + Begin + FListen := False; + Raise ESockException.Create('Listen - Cannot Listen On A Datagram Socket'); + End; + FListen := Value; + If FListen Then + Begin + If Not WasListen Then + Begin + // Have To Create A Socket Start Asynchronous Listening + FListen := True; + FSocket := WinSock.Socket(AF_INET, SOCK_STREAM, IPPROTO_IP); + FillChar(Addr, SizeOf(Addr), #0); + Addr.SIn_Family := AF_INET; + Addr.SIn_Port := PortLookup(FPortName); + Addr.SIn_Addr.S_Addr := HToNL(INADDR_ANY); + // SetBlocking Will Set The Asynchronous Mode + SetBlocking(FBlocking); + FListen := False; + Res := WinSock.Bind(FSocket, Addr, SizeOf(Addr)); + If Res <> 0 Then + Raise ESockException.Create('Listen - Error Binding Socket'); + Res := WinSock.Listen(FSocket, 5); + If Res <> 0 Then + Raise ESockException.Create('Listen - Error Starting Listen'); + FListen := True; + DoInfo(SiListen, 'Listening Started'); + End + Else + DoInfo(SiListen, 'Listening Already Running'); + End + Else + Begin + Close; + DoInfo(SiListen, 'Listening Stopped'); + End; +End; + +Procedure TSock.SetBlocking(Value : Boolean); +Var Il : U_Long; + Ev : U_Long; +Begin + If (Not (csDesigning In ComponentState)) And (csReading In ComponentState) Then + Begin + // If We Haven't Fully Loaded Yet, Just Set The Value And Exit + FBlocking := Value; + Exit; + End; + If FSocket = INVALID_SOCKET Then + FBlocking := Value + Else + Begin + Ev := 0; + FBlocking := Value; + If (Parent = Nil) Then + Begin + // If The Component Has No Parent (Dynamically Created) We Adopt It + Parent := Screen.Forms[0]; + HandleNeeded; + End; + If FBlocking And (Not FListen) Then + Begin + Il := 0; + // Turn Off Async Checking And Set Blocking On + WinSock.WSAAsyncSelect(FSocket, Handle, WM_SOCK, Ev); + WinSock.IOCtlSocket(FSocket, FIONBIO, Il); + End + Else + Begin + If FListen Then + // If We're Listening, We Only Care About Accept Messages + Ev := FD_ACCEPT + Else + Begin + Ev := FD_READ; // Datagram Sockets Only Care About Read Messages + If FSocketType = stStream Then + Ev := Ev Or FD_CLOSE Or FD_CONNECT Or FD_WRITE Or FD_READ; + End; + WinSock.WSAAsyncSelect(FSocket, Handle, WM_SOCK, Ev); + End; + End; +End; + +Procedure TSock.SetAutoAccept(Value : Boolean); +Begin + FAutoAccept := Value; +End; + +Procedure TSock.SetConnected(Value : Boolean); +Begin + If Value Then + Open + Else + Close; +End; + +Function TSock.GetConnected : Boolean; +Begin + If FSocket = INVALID_SOCKET Then + FConnected := False; + Result := FConnected; +End; + +Function TSock.GetEOF : Boolean; +Begin + Result := (FInBuffer = '') And (Not FConnected); +End; + +Procedure TSock.SetSocket(Value : TSocket); +Var Buf : Array[1..10] Of Char; + Len : Integer; + Res : Integer; +Begin + FSocket := Value; + If FSocket = INVALID_SOCKET Then + Begin + // If The Socket Is Unassigned Then Who Cares + FConnected := False; + FListen := False; + End + Else + Begin + // Otherwise, We Need To Check To See If It's Already Listening + Len := SizeOf(Buf); + Res := WinSock.GetSockOpt(FSocket, IPPROTO_TCP, SO_ACCEPTCONN, PChar(@Buf), Len); + If (Res = 0) And (Buf[1] <> #0) Then + Begin + FSocket := INVALID_SOCKET; + Raise ESockException.Create('Socket - Can''t Assign A Listening Socket'); + End + Else + FConnected := True; + End; +End; + +Procedure TSock.SetSocketType(Value : TSocketType); +Begin + If csDesigning In ComponentState Then + Begin + // At Design-Time, stDatagram And Listen Are Mutually Exclusive + If (Value = stDatagram) And FListen Then + SetListen(False); + FSocketType := Value; + SetBitmap; + End + Else + Begin + If FListen Then + Raise ESockException.Create('SocketType - Can''t Assign Socket Type While Listening'); + If FConnected Then + Raise ESockException.Create('SocketType - Can''t Assign Socket Type While Connected'); + FSocketType := Value; + End +End; + +Function TSock.GetRemoteHost : String; +Begin + // Convert FRecvAddrIn To A String IP Address + Result := INet_NToA(FRecvAddrIn.SIn_Addr); +End; + +Procedure TSock.DoInfo(SocketInfo : TSocketInfo; Msg : String); +Begin + If Assigned(FOnInfo) Then + FOnInfo(Self, SocketInfo, Msg); +End; + +Procedure TSock.SetBitmap; +Begin + // Determine The Design-Time Bitmap To Use + If FSocketType = stDatagram Then + FPicture := FBmp_UDP + Else + If FListen Then + FPicture := FBmp_Listen + Else + FPicture := FBmp_TCP; + Invalidate; +End; + +//*** Constructor/Destructor *************************************************** + +Constructor TSock.Create(AOwner : TComponent); +Begin + Inherited Create(AOwner); + If (csDesigning In ComponentState) Then + Begin + // Get Bitmaps For Design-Time Image + FBmp_TCP := TBitmap.Create; + FBmp_UDP := TBitmap.Create; + FBmp_Listen := TBitmap.Create; + FBmp_TCP.Handle := LoadBitmap(hInstance, 'TCP'); + FBmp_UDP.Handle := LoadBitmap(hInstance, 'UDP'); + FBmp_Listen.Handle := LoadBitmap(hInstance, 'LISTEN'); + FPicture := FBmp_TCP; + Width := FPicture.Width; + Height := FPicture.Height; + SetZOrder(True); + End + Else + Begin + Width := 0; + Height := 0; + SetZOrder(False); + Visible := False; + End; + FHostName := ''; + FPortName := ''; + FSocket := INVALID_SOCKET; + FLineBreak := lbSmart; + FLastChar := #0; + FInBuffer := ''; + FOutBuffer := ''; + FListen := False; + FBlocking := False; + FAutoAccept := False; + FConnected := False; + FStream := TSockStream.Create(Self); +End; + +// This Constructor Assumes NewSocket Is A Valid Socket Handle +Constructor TSock.CreateWithSocket(AOwner : TComponent; NewSocket : TSocket); +Begin + Create(AOwner); + FSocket := NewSocket; + SetBlocking(TSock(AOwner).Blocking); + FBlockTime := TSock(AOwner).BlockingTimeout; + FOnRead := TSock(AOwner).OnRead; + FOnWrite := TSock(AOwner).OnWrite; + FOnDisconnect := TSock(AOwner).OnDisconnect; + FOnInfo := TSock(AOwner).OnInfo; + FConnected := True; +End; + +Destructor TSock.Destroy; +Begin + If FListen Or FConnected Then + Close; + If (csDesigning In ComponentState) Then + Begin + FBmp_TCP.Free; + FBmp_UDP.Free; + FBmp_Listen.Free; + End; + Inherited Destroy; +End; + +Procedure TSock.Loaded; +Begin + If Not (csDesigning In ComponentState) Then + Begin + // If Component Has Been Loaded At Run-Time And Listen Then Start Listening + SetBlocking(FBlocking); + If FListen Then + Begin + FListen := False; + SetListen(True); + End; + End; +End; + +//*** Event Handling *********************************************************** + +Procedure TSock.WMSock(Var Message : TMessage); +Var Event : Word; + Error : Word; + Res : Integer; + AcSck : TSocket; + Addr : TSockAddrIn; + AddrL : Integer; + CSock : TSock; + Spawn : TSockThread; +Begin + Inherited; + // Message Handling For Non-Blocking Sockets + Event := WinSock.WSAGetSelectEvent(Message.LParam); + Error := WinSock.WSAGetSelectError(Message.LParam); + If Error > WSABASEERR Then + DoInfo(SiError, 'Error #'+IntToStr(Error)+' ('+ErrToStr(Error)+')') + Else + // Messages Mean Different Things Depending On Whether You're Listening Or Not + Case Event Of + FD_ACCEPT : Begin + // Incoming Socket + If FAutoAccept And Assigned(FOnAutoAccept) Then + Begin + // If AutoAccept Is Set To True And OnAutoAccept Is Set... + // Create A New Socket Based On The Accepted One And Begin + // AutoAccept As If It Were A Thread... The AutoAccept + // Routine Is Responsible For Destroying The New Socket + // Component. + AddrL := SizeOf(Addr); + FillChar(Addr, SizeOf(Addr), #0); + {$IFDEF VER100} + AcSck := WinSock.Accept(FSocket, @Addr, @AddrL); + {$ELSE} + AcSck := WinSock.Accept(FSocket, Addr, AddrL); + {$ENDIF} + FRecvAddrIn := Addr; + CSock := TSock.CreateWithSocket(Self, AcSck); + CSock.PortName := FPortName; + CSock.HostName := INet_NToA(Addr.SIn_Addr); + If FBlocking Then + Begin + Spawn := TSockThread.Create(True); + Spawn.RunThread(Self, CSock); + End + Else + FOnAutoAccept(Self, CSock); + End + Else + If Assigned(FOnAccept) Then + FOnAccept(Self); + End; + FD_CONNECT : Begin + FConnected := True; + DoInfo(SiConnect, 'Non-Blocking Socket Connected'); + If Assigned(FOnConnect) Then + FOnConnect(Self); + End; + FD_CLOSE : Begin + If Assigned(FOnDisconnect) Then + FOnDisconnect(Self); + Close; + End; + FD_READ : Begin + If FSocketType = stStream Then + Begin + Res := WinSock.Recv(FSocket, FCharBuf, SizeOf(FCharBuf), 0); + If Res > 0 Then + FInBuffer := FInBuffer + Copy(FCharBuf, 1, Res); + DoInfo(SiReceive, 'Non-Blocking Incoming Data'); + If Assigned(FOnRead) Then + FOnRead(Self, Length(FInBuffer)); + End + Else + If Assigned(FOnRead) Then + FOnRead(Self, Length(FInBuffer)); + End; + FD_WRITE : Begin + If FOutBuffer <> '' Then + Send(''); + DoInfo(SiSend, 'Non-Blocking Outgoing Data'); + If Assigned(FOnWrite) Then + FOnWrite(Self); + End; + End; + Message.Result := 0; +End; + +Procedure TSock.WMPaint(Var Message : TWMPaint); +Begin + Inherited; + If (csDesigning In ComponentState) Then + Canvas.Draw(0, 0, FPicture); + Message.Result := 0; +End; + +Procedure TSock.WMSize(Var Message : TWMSize); +Begin + Inherited; + If (csDesigning In ComponentState) Then + Begin + If Width <> FPicture.Width Then + Width := FPicture.Width; + If Height <> FPicture.Height Then + Height := FPicture.Height; + End; + Message.Result := 0; +End; + +//*** Support Methods ********************************************************** + +Function TSock.Open : Boolean; +Var Res : Integer; + ST : Integer; +Begin + If FSocket = INVALID_SOCKET Then + Begin + If FSocketType = stStream Then + ST := SOCK_STREAM + Else + ST := SOCK_DGRAM; + + // Create The Socket And Set Up The Remote Address And Port + FSocket := WinSock.Socket(AF_INET, ST, IPPROTO_IP); + + FSockAddrIn.SIn_Family := AF_INET; + FSockAddrIn.SIn_Port := PortLookup(FPortName); + If FSocketType = stDatagram Then + FSockAddrIn.SIn_Addr := HostLookup('') + Else + FSockAddrIn.SIn_Addr := HostLookup(FHostName); + + SetBlocking(FBlocking); + + If FSocketType = stStream Then + Begin + // Stream Sockets Require A Connect + Res := WinSock.Connect(FSocket, FSockAddrIn, SizeOf(TSockAddrIn)); + If FBlocking Then + Begin + If Res = 0 Then + Begin + FConnected := True; + DoInfo(SiConnect, 'Blocking Socket Connected'); + If Assigned(FOnConnect) Then + FOnConnect(Self); + End + Else + Begin + DoInfo(SiClose, 'Blocking Socket Can''t Connect'); + Close; + End; + End; + End + Else + Begin + // Datagram Sockets Require A Bind + Res := WinSock.Bind(FSocket, FSockAddrIn, SizeOf(TSockAddrIn)); + If Res = 0 Then + Begin + FConnected := True; + DoInfo(SiConnect, 'Datagram Socket Connected'); + If Assigned(FOnConnect) Then + FOnConnect(Self); + End; + End; + End; + Result := FConnected; +End; + +Function TSock.Close : Boolean; +Begin + Result := (WinSock.CloseSocket(FSocket) = 0); + FSocket := INVALID_SOCKET; + FConnected := False; + If Not FListen Then + DoInfo(SiClose, 'Socket Closed'); + FListen := False; +End; + +Function TSock.Send(Value : String) : Boolean; +Var Remain : Integer; +Begin + Result := True; + If FSocket = INVALID_SOCKET Then + Raise ESockException.Create('Send - Socket Not Connected'); + If FListen Then + Raise ESockException.Create('Send - Cannot Send On A Listener Socket'); + If FSocketType = stStream Then + Begin + FOutBuffer := FOutBuffer + Value; + If FOutBuffer = '' Then + Exit; + If FBlocking Then + Begin + Remain := Length(FOutBuffer); + // While Any Content Remains Or No Errors Have Happened, Then Loop + While Remain > 0 Do + Begin + Remain := WinSock.Send(FSocket, FOutBuffer[1], Length(FOutBuffer), 0); + If (Remain = SOCKET_ERROR) And (WinSock.WSAGetLastError <> WSAEINPROGRESS) Then + Begin + DoInfo(SiError, 'Socket Error On Send'); + Raise ESockException.Create('Send - Socket Error'); + End + Else + Begin + If Remain > 0 Then + Delete(FOutBuffer, 1, Remain); + Remain := Length(FOutBuffer); + DoInfo(SiSend, 'Blocking Outgoing Data'); + End; + End; + FOutBuffer := ''; + End + Else + Begin + // Do Not Loop For A Non-Blocking Socket + DoInfo(SiSend, 'Non-Blocking Outgoing Data'); + Remain := WinSock.Send(FSocket, FOutBuffer[1], Length(FOutBuffer), 0); + If Remain > 0 Then + Delete(FOutBuffer, 1, Remain); + End; + End + Else + SendDatagram(Value, FHostName); +End; + +Function TSock.Receive : String; +Begin + Result := ReceiveCount(-1); +End; + +Function TSock.ReceiveCount(Count : Integer) : String; +Var Res : Integer; + FDSet : PFDSet; + TV : PTimeVal; + Err : Integer; + HostN : String; + Cnt : Integer; +Begin + If (FSocket = INVALID_SOCKET) And (FInBuffer = '') Then + Raise ESockException.Create('Receive - Socket Not Connected'); + If FListen Then + Raise ESockException.Create('Receive - Cannot Receive On A Listener Socket'); + Cnt := Count; + If (Cnt = -1) Or (Cnt > SizeOf(FCharBuf)) Then + Cnt := SizeOf(FCharBuf); + If FSocketType = stStream Then + Begin + If FBlocking Then + Begin + FDSet := New(PFDSet); + FDSet^.FD_Count := 1; + FDSet^.FD_Array[0] := FSocket; + If FBlockTime >= 0 Then + Begin + TV := New(PTimeVal); + TV^.tv_sec := FBlockTime; + End + Else + TV := Nil; + // Used To Loop While We're Connected And Anything Is In The Input Queue + If FConnected And (WinSock.Select(FSocket, FDSet, Nil, Nil, TV) > 0) Then + Begin + DoInfo(SiReceive, 'Blocking Incoming Data'); + Res := WinSock.Recv(FSocket, FCharBuf, Cnt, 0); + If (Res = SOCKET_ERROR) Then + Begin + Err := WSAGetLastError; + Result := ''; + FInBuffer := ''; + Dispose(FDSet); + Dispose(TV); + DoInfo(SiError, 'Socket Error On Receive'); + Raise ESockException.Create('Receive - Socket Error '+ErrToStr(Err)); + End + Else + Begin + If Res > 0 Then + FInBuffer := FInBuffer + Copy(FCharBuf, 1, Res) + Else + If Res = 0 Then + Begin + DoInfo(siClose, 'Socket Disconnected On Receive'); + Close; + If Assigned(FOnDisconnect) Then + FOnDisconnect(Self); + End; + End; + End; + Result := FInBuffer; + FInBuffer := ''; + Dispose(FDSet); + Dispose(TV); + End + Else + Begin + If((Count<>-1) And (Length(FInBuffer)>Count)) Then + Begin + Result := Copy(FInBuffer, 1, Count); + Delete(FInBuffer, 1, Count); + End + Else + Begin + Result := FInBuffer; + FInBuffer := ''; + End; + End; + End + Else + Result := ReceiveDatagram(HostN); +End; + +Function TSock.ReceiveLine : String; +Var CPos, CLen : LongInt; + Temp : String; +Begin + CPos := 0; + Result := ''; + If FSocketType = stStream Then + Begin + If(FBlocking And FConnected) Then + Begin + Temp := FInBuffer; + Temp := Temp + Receive; + FInBuffer := Temp; + End; + If (FLastChar = #13) And (FLineBreak = lbSmart) And (FInBuffer[1] = #10) Then + Begin + Delete(FInBuffer, 1, 1); + FLastChar := #0; + End; + Case FLineBreak Of + lbCR : CPos := Pos(#13, FInBuffer); + lbLF : CPos := Pos(#10, FInBuffer); + lbCRLF : CPos := Pos(#13#10, FInBuffer); + lbSmart : Begin + CPos := Pos(#13, FInBuffer); + If Pos(#10, FInBuffer) < CPos Then + CPos := Pos(#10, FInBuffer); + If CPos > 0 Then + FLastChar := FInBuffer[CPos] + Else + FLastChar := #0; + End; + End; + If FLineBreak = lbCRLF Then + CLen := 2 + Else + CLen := 1; + If (CPos > 0) Or (Not FConnected) Then + Begin + If CPos > 0 Then + Begin + Result := Copy(FInBuffer, 1, CPos-1); + Delete(FInBuffer, 1, CPos+(CLen-1)); + End + Else + Begin + Result := FInBuffer; + FInBuffer := ''; + End; + End; + End + Else + Result := Receive; +End; + +Function TSock.SendDatagram(Value, HostName : String) : Boolean; +Begin + If FSocket = INVALID_SOCKET Then + Raise ESockException.Create('SendDatagram - Socket Not Connected'); + If FSocketType = stStream Then + Raise ESockException.Create('SendDatagram - Datagram Send Not Supported On Stream Sockets'); + Result := True; + SetHostName(HostName); + If Value = '' Then + Exit; + WinSock.SendTo(FSocket, Value[1], Length(Value), 0, FSockAddrIn, SizeOf(TSockAddrIn)); +End; + +Function TSock.ReceiveDatagram(Var HostName : String) : String; +Var Res : Integer; + FDSet : PFDSet; + TV : PTimeVal; + FLen : Integer; +Begin + If FSocket = INVALID_SOCKET Then + Raise ESockException.Create('ReceiveDatagram - Socket Not Connected'); + If FSocketType = stStream Then + Raise ESockException.Create('ReceiveDatagram - Datagram Receive Not Supported On Stream Sockets'); + FDSet := New(PFDSet); + FDSet^.FD_Count := 1; + FDSet^.FD_Array[0] := FSocket; + Result := ''; + HostName := ''; + If FBlockTime >= 0 Then + Begin + TV := New(PTimeVal); + TV^.tv_sec := FBlockTime; + End + Else + TV := Nil; + If WinSock.Select(FSocket, FDSet, Nil, Nil, TV) > 0 Then + Begin + Res := WinSock.RecvFrom(FSocket, FCharBuf, SizeOf(FCharBuf), 0, FRecvAddrIn, FLen); + If Res > 0 Then + Begin + Result := Copy(FCharBuf, 1, Res); + HostName := GetRemoteHost; + End + End; + Dispose(FDSet); + Dispose(TV); +End; + +Function TSock.Accept(Var NewSock : TSock) : Boolean; +Var AcSck : TSocket; + AddrL : Integer; + Addr : TSockAddrIn; +Begin + // Accept Creates A New Instance Of A TSock Component And Returns It To The + // User Application. The User Is Responsible For Freeing The Component. + If Not FListen Then + Raise ESockException.Create('Accept - Socket Not In Listening Mode'); + If FBlocking Then + DoInfo(SiAccept, 'Blocking Accept'); + AddrL := SizeOf(Addr); +{$IFDEF VER100} + AcSck := WinSock.Accept(FSocket, @Addr, @AddrL); +{$ELSE} + AcSck := WinSock.Accept(FSocket, Addr, AddrL); +{$ENDIF} + FRecvAddrIn := Addr; + If AcSck <> INVALID_SOCKET Then + Begin + NewSock := TSock.CreateWithSocket(Self, AcSck); + NewSock.PortName := FPortName; + NewSock.HostName := INet_NToA(Addr.SIn_Addr); + Result := True; + DoInfo(SiAccept, 'Created New TSock Structure'); + End + Else + Begin + Result := False; + DoInfo(SiAccept, 'Could Not Accept Connection'); + End; +End; + +Function TSock.HostLookup(Value : String) : TInAddr; +Type PLongInt = ^LongInt; +Var PHost : PHostEnt; + Res : Integer; +Begin + If Value = '' Then + Exit; + DoInfo(SiLookUp, 'Lookup Of Host '+Value); + FillChar(Result, SizeOf(TInAddr), #0); + If Pos(Value[1],'0123456789') > 0 Then + // If It's Dot-Notation, Just Convert It From An IP Address + Result := TInAddr(WinSock.Inet_Addr(PChar(Value))) + Else + Begin + Res := IPCache.IndexOf(Value); + If Res >= 0 Then + // It's Cached... Don't Bother Doing A Lookup + Result.S_Addr := U_Long(IPCache.Objects[Res]) + Else + Begin + // Isn't Cached, Have To Do A GetHostByName + If Value <> '' Then + Begin + PHost := WinSock.GetHostByName(PChar(Value)); + If PHost <> Nil Then + Begin + Result.S_Addr := LongInt(PLongInt(PHost^.H_Addr_List^)^); + IPCache.AddObject(Value, Pointer(Result.S_Addr)); + End + Else + Raise ESockException.Create('Host Lookup - Could Not Find Host Entry'); + End + Else + Result.S_Addr := HToNL(INADDR_ANY); + End; + End; +End; + +Function TSock.PortLookup(Value : String) : U_Short; +Var PEnt : PServEnt; + Prot : String; +Begin + DoInfo(SiLookUp, 'Lookup Of Port '+Value); + If Pos(Value[1],'0123456789') > 0 Then + // It's Numeric, Just Convert It To A Network Byte Order Integer + Result := HToNS(StrToInt(Value)) + Else + Begin + // Otherwise, Perform A GetServByName Based On The Protocol + If FSocketType = stStream Then + Prot := 'tcp' + Else + Prot := 'udp'; + PEnt := WinSock.GetServByName(PChar(Value), PChar(Prot)); + If PEnt <> Nil Then + Result := PEnt^.S_Port + Else + Raise ESockException.Create('Port Lookup - Could Not Find Service Entry'); + End; +End; + +Function TSock.StartListen : Boolean; +Begin + SetListen(True); + Result := FListen; +End; + +Function TSock.StopListen : Boolean; +Begin + Result := True; + SetListen(False); +End; + +//*** Additional General-Purpose Support Functions ***************************** + +Function WSDescription : String; +Begin + Result := StrPas(WSAData.szDescription); +End; + +Function WSSystemStatus : String; +Begin + Result := StrPas(WSAData.szSystemStatus); +End; + +Function SocketInfoText(Value : TSocketInfo) : String; +Begin + Result := SocketInfoMsg[Value]; +End; + +Function ErrToStr(Value : Integer) : String; +Begin + Result := 'UNKNOWN ERROR'; + Case Value Of + WSABASEERR+4 : Result := 'WSAEINTR'; + WSABASEERR+9 : Result := 'WSAEBADF'; + WSABASEERR+13 : Result := 'WSAEACCES'; + WSABASEERR+14 : Result := 'WSAEFAULT'; + WSABASEERR+22 : Result := 'WSAEINVAL'; + WSABASEERR+24 : Result := 'WSAEMFILE'; + WSABASEERR+35 : Result := 'WSAEWOULDBLOCK'; + WSABASEERR+36 : Result := 'WSAEINPROGRESS'; + WSABASEERR+37 : Result := 'WSAEALREADY'; + WSABASEERR+38 : Result := 'WSAENOTSOCK'; + WSABASEERR+39 : Result := 'WSAEDESTADDRREQ'; + WSABASEERR+40 : Result := 'WSAEMSGSIZE'; + WSABASEERR+41 : Result := 'WSAEPROTOTYPE'; + WSABASEERR+42 : Result := 'WSAENOPROTOOPT'; + WSABASEERR+43 : Result := 'WSAEPROTONOSUPPORT'; + WSABASEERR+44 : Result := 'WSAESOCKTNOSUPPORT'; + WSABASEERR+45 : Result := 'WSAEOPNOTSUPP'; + WSABASEERR+46 : Result := 'WSAEPFNOSUPPORT'; + WSABASEERR+47 : Result := 'WSAEAFNOSUPPORT'; + WSABASEERR+48 : Result := 'WSAEADDRINUSE'; + WSABASEERR+49 : Result := 'WSAEADDRNOTAVAIL'; + WSABASEERR+50 : Result := 'WSAENETDOWN'; + WSABASEERR+51 : Result := 'WSAENETUNREACH'; + WSABASEERR+52 : Result := 'WSAENETRESET'; + WSABASEERR+53 : Result := 'WSAECONNABORTED'; + WSABASEERR+54 : Result := 'WSAECONNRESET'; + WSABASEERR+55 : Result := 'WSAENOBUFS'; + WSABASEERR+56 : Result := 'WSAEISCONN'; + WSABASEERR+57 : Result := 'WSAENOTCONN'; + WSABASEERR+58 : Result := 'WSAESHUTDOWN'; + WSABASEERR+59 : Result := 'WSAETOOMANYREFS'; + WSABASEERR+60 : Result := 'WSAETIMEDOUT'; + WSABASEERR+61 : Result := 'WSAECONNREFUSED'; + WSABASEERR+62 : Result := 'WSAELOOP'; + WSABASEERR+63 : Result := 'WSAENAMETOOLONG'; + WSABASEERR+64 : Result := 'WSAEHOSTDOWN'; + WSABASEERR+65 : Result := 'WSAEHOSTUNREACH'; + WSABASEERR+66 : Result := 'WSAENOTEMPTY'; + WSABASEERR+67 : Result := 'WSAEPROCLIM'; + WSABASEERR+68 : Result := 'WSAEUSERS'; + WSABASEERR+69 : Result := 'WSAEDQUOT'; + WSABASEERR+70 : Result := 'WSAESTALE'; + WSABASEERR+71 : Result := 'WSAEREMOTE'; + WSABASEERR+91 : Result := 'WSASYSNOTREADY'; + WSABASEERR+92 : Result := 'WSAVERNOTSUPPORTED'; + WSABASEERR+93 : Result := 'WSANOTINITIALISED'; + WSABASEERR+101 : Result := 'WSAEDISCON'; + WSABASEERR+1001 : Result := 'WSAHOST_NOT_FOUND'; + WSABASEERR+1002 : Result := 'WSATRY_AGAIN'; + WSABASEERR+1003 : Result := 'WSANO_RECOVERY'; + WSABASEERR+1004 : Result := 'WSANO_DATA'; + End; +End; + +// Base-64 Encoding Is The Process Of Taking An Input Stream And Converting +// Every 3 Bytes Into 4 Bytes, Each Of Which Whose ASCII Value Fits Within +// A 64-Bit Range. Base-64 Is Often Used For Encoding Binary Streams For +// Attaching To Email, But Is Perfect For Converting Binary To A Character +// Set That Can Be Used For URL-Encoding. The Base-64 Character Set Does Not +// Include Characters That URLs Use For Delimiting Such As '=', '&', Carriage +// Returns, Etc... + +Function Base64Encode(Value : String) : String; +Var AIn : Array[1..3] Of Byte; + AOut : Array[1..4] Of Byte; + AWork : Array[1..3] Of Byte; + I : Integer; + O : LongInt; +Begin + Result := ''; + I := 1; + O := Length(Value); + Case Length(Value) Mod 3 Of + 1 : Value := Value + #0 + #0; + 2 : Value := Value + #0; + End; + While I < Length(Value) Do + Begin + AIn[1] := Byte(Value[I]); + AIn[2] := Byte(Value[I+1]); + AIn[3] := Byte(Value[I+2]); + + AOut[1] := Byte(AIn[1] Shr 2); + AWork[1] := Byte(AIn[1] Shl 4); + AWork[2] := Byte(AWork[1] And $30); + AWork[3] := Byte(AIn[2] Shr 4); + AOut[2] := Byte(AWork[2] Or AWork[3]); + AWork[1] := Byte(AIn[2] Shl 2); + AWork[2] := Byte(AWork[1] And $3C); + AWork[3] := Byte(AIn[3] Shr 6); + AOut[3] := Byte(AWork[2] Or AWork[3]); + AOut[4] := Byte(AIn[3] And $3F); + + Inc(I, 3); + Result := Result + Base64Table[AOut[1]+1] + Base64Table[AOut[2]+1] + Base64Table[AOut[3]+1] + Base64Table[AOut[4]+1]; + End; + If O Mod 3 > 0 Then + Result[Length(Result)] := '='; + If O Mod 3 = 1 Then + Result[Length(Result)-1] := '='; +End; + +Function Base64Decode(Value : String) : String; +Var AIn : Array[1..4] Of Byte; + AOut : Array[1..3] Of Byte; + AWork : Array[1..3] Of Byte; + I : Integer; + C : Integer; +Begin + Result := ''; + I := 1; + While I < Length(Value) Do + Begin + C := 3; + FillChar(AWork, SizeOf(AWork), #0); + FillChar(AOut, SizeOf(AWork), #0); + AIn[1] := Byte(Pos(Value[I],Base64Table)-1); + AIn[2] := Byte(Pos(Value[I+1],Base64Table)-1); + AIn[3] := Byte(Pos(Value[I+2],Base64Table)-1); + AIn[4] := Byte(Pos(Value[I+3],Base64Table)-1); + If Value[I+3]='=' Then + Begin + C := 2; + AIn[4] := 0; + If Value[I+2]='=' Then + Begin + C := 1; + AIn[3] := 0; + End; + End; + AWork[2] := Byte(AIn[1] Shl 2); + AWork[3] := Byte(AIn[2] Shr 4); + AOut[1] := Byte(AWork[2] Or AWork[3]); + AWork[2] := Byte(AIn[2] Shl 4); + AWork[3] := Byte(AIn[3] Shr 2); + AOut[2] := Byte(AWork[2] Or AWork[3]); + AWork[2] := Byte(AIn[3] Shl 6); + AOut[3] := Byte(AWork[2] Or AIn[4]); + Result := Result + Char(AOut[1]); + If C > 1 Then + Result := Result + Char(AOut[2]); + If C > 2 Then + Result := Result + Char(AOut[3]); + Inc(I, 4); + End; +End; + +Function URLEncode(Value : String) : String; +Var I : Integer; +Begin + Result := ''; + For I := 1 To Length(Value) Do + Begin + If Pos(UpperCase(Value[I]), ValidURLChars) > 0 Then + Result := Result + Value[I] + Else + Begin + If Value[I] = ' ' Then + Result := Result + '+' + Else + Begin + Result := Result + '%'; + Result := Result + IntToHex(Byte(Value[I]), 2); + End; + End; + End; +End; + +Function URLDecode(Value : String) : String; +Const HexChars = '0123456789ABCDEF'; +Var I : Integer; + Ch,H1,H2 : Char; +Begin + Result := ''; + I := 1; + While I <= Length(Value) Do + Begin + Ch := Value[I]; + Case Ch Of + '%' : Begin + H1 := Value[I+1]; + H2 := Value[I+2]; + Inc(I, 2); + Result := Result + Chr(((Pos(H1, HexChars) - 1) * 16) + (Pos(H2, HexChars) - 1)); + End; + '+' : Result := Result + ' '; + '&' : Result := Result + #13+#10; + Else Result := Result + Ch; + End; + Inc(I); + End; +End; + +//*** Registration And Initialization ****************************************** + +Procedure Register; +Begin + RegisterComponents('Beach Dog', [TSock]); +End; + +Initialization + // We're Looking To Use Version 1.1 Of WinSock Here + If WinSock.WSAStartup($0101, WSAData) <> 0 Then + Raise ESockException.Create('WSAStartup - Could Not Initialize WinSock'); + IPCache := TStringList.Create; + IPCache.Clear; +Finalization + IPCache.Free; + WinSock.WSACleanup; +End. diff --git a/lib/sock/UDPTest/UDPTester.dpr b/lib/sock/UDPTest/UDPTester.dpr new file mode 100644 index 00000000..64cf630d --- /dev/null +++ b/lib/sock/UDPTest/UDPTester.dpr @@ -0,0 +1,13 @@ +program UDPTester; + +uses + Forms, + Unit1 in 'Unit1.pas' {Form1}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/sock/UDPTest/UDPTester.res b/lib/sock/UDPTest/UDPTester.res new file mode 100644 index 00000000..8d706e28 Binary files /dev/null and b/lib/sock/UDPTest/UDPTester.res differ diff --git a/lib/sock/UDPTest/Unit1.dfm b/lib/sock/UDPTest/Unit1.dfm new file mode 100644 index 00000000..3bf41b33 Binary files /dev/null and b/lib/sock/UDPTest/Unit1.dfm differ diff --git a/lib/sock/UDPTest/Unit1.pas b/lib/sock/UDPTest/Unit1.pas new file mode 100644 index 00000000..e933a3d3 --- /dev/null +++ b/lib/sock/UDPTest/Unit1.pas @@ -0,0 +1,57 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, Sock; + +type + TForm1 = class(TForm) + Sock1: TSock; + Memo1: TMemo; + Memo2: TMemo; + Edit2: TEdit; + Label2: TLabel; + Label1: TLabel; + Lbl_From: TLabel; + procedure FormCreate(Sender: TObject); + procedure Memo1Change(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure Sock1Read(Sender: TObject; Count: Integer); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +procedure TForm1.FormCreate(Sender: TObject); +begin + Sock1.open; +end; + +procedure TForm1.Memo1Change(Sender: TObject); +begin + Sock1.SendDatagram(Memo1.Text, edit2.text); +end; + +procedure TForm1.Button1Click(Sender: TObject); +begin + sock1.hostname := edit2.text; +end; + +procedure TForm1.Sock1Read(Sender: TObject; Count: Integer); +Var Addr : String; +begin + Memo2.Text := Sock1.ReceiveDatagram(Addr); + Lbl_From.Caption := Addr; +end; + +end. diff --git a/lib/supergrid/RZTBAR32.RES b/lib/supergrid/RZTBAR32.RES new file mode 100644 index 00000000..0a52d2e7 Binary files /dev/null and b/lib/supergrid/RZTBAR32.RES differ diff --git a/lib/supergrid/RzCommon.dcu b/lib/supergrid/RzCommon.dcu new file mode 100644 index 00000000..0ba4dd24 Binary files /dev/null and b/lib/supergrid/RzCommon.dcu differ diff --git a/lib/supergrid/RzTrkBar.dcu b/lib/supergrid/RzTrkBar.dcu new file mode 100644 index 00000000..5773411c Binary files /dev/null and b/lib/supergrid/RzTrkBar.dcu differ diff --git a/lib/supergrid/SUPER.GID b/lib/supergrid/SUPER.GID new file mode 100644 index 00000000..ff184f34 Binary files /dev/null and b/lib/supergrid/SUPER.GID differ diff --git a/lib/supergrid/SUPER.KWF b/lib/supergrid/SUPER.KWF new file mode 100644 index 00000000..465b4c64 Binary files /dev/null and b/lib/supergrid/SUPER.KWF differ diff --git a/lib/supergrid/SUPER14.TXT b/lib/supergrid/SUPER14.TXT new file mode 100644 index 00000000..7174606c --- /dev/null +++ b/lib/supergrid/SUPER14.TXT @@ -0,0 +1,180 @@ +----------------------------------------------------------------- +TSuperGrid Version 1.4 - by Pablo Pissanetzky - pablo@neosoft.com +----------------------------------------------------------------- + +New for Version 1.4 +------------------- +* The property editor now has an entirely new look ( to make room for + more features ). +* Added separate vertical alignment for the headings and the contents. +* Headings can now have bevels. Just like TPanel, the user can control + the inner and outer bevels as well as the bevel and border widths. +* TSuperGrid can now hold three different types of checkboxes in its + cells along with text. There is a new property called Checked that + allows the user to read or set the state of each checkbox. There is + also an event, OnCheckBoxClick, that is triggered whenever the state + of a checkbox is changed by clicking on a cell. You can specify whether + the checkboxes will be intially checked at design time. No coding + required! +* Added a DeleteRow method ( Something TStringGrid should've had from the start ) +* Added an InsertRow method ( Something TStringGrid should've had from the start ) +* Added some version checking so that future versions of TSuperGrid will + always be compatible with the older ones. +* Graphics and checkboxes in the cells now assume the same vertical + alignment as the contents of the column, not just top-left. +* Added a SaveCells method that writes the contents of TSuperGrid to a comma + delimited file that can be read with the existing LoadCells method. + +************************************************************************ +IMPORTANT - Please read IMPORTANT - Please read + I M P O R T A N T + I M P O R T A N T + I M P O R T A N T +IMPORTANT - Please read IMPORTANT - Please read +************************************************************************ +IF YOU ARE A CURRENT USER OF TSUPERGRID AND ARE UPGRADING TO 1.4: + +Version 1.4 has new properties that did not exist in previous versions. +As such, to be able to use your existing projects that contain a TSuperGrid +Version 1.3 or older, you must do the following: + + 1) First, Close the current project and all open files. + 2) Install TSuperGrid Version 1.4 as described below. + 3) Open each project that contains a TSuperGrid Version 1.3. + !!Do not try to run the project!! + 4) Change something on each form that contains a TSuperGrid. You can + just move the TSuperGrid a couple of pixels. + 5) Save the project. + 6) You TSuperGrid(s) have now been converted to comply with Version 1.4. + + What happens is that Version 1.4 detects that it is reading + a Pre-1.4 DFM file and does not attempt to read the values of + new properties, it just sets them to their default. When you change and + save your project, the DFM file is written out as a Version 1.4 with all + the new properties and you can keep on trucking. This is the only way + to make a component like this one, backward compatible. It updates itself. + +IF YOU GET ERRORS SAYING THAT PROPERTIES DO NOT EXIST, I WARNED YOU! :) +************************************************************************ + +Features +-------- + +The TSuperGridT Component is an enhanced TStringGrid. It allows you to +change the way a string grid looks in a What-You-See-Is-What-You-Get +manner. With TSuperGrid, you can have a grid populated with data and +formatted at design time, without writing a single line of code. +You can also easily change any of its many properties at run time. + +It adds a single property to TStringGrid, called Columns. +The Columns property allows you to change virtually all aspects of +the string grid at design time with a Windows 95 style, user friendly +property editor as well as at run time. +With Columns you can do the following: + +* Give each column a multi line title. +* Align each column's title to the left, right or centered. +* Dynamically change the width of each column by typing a new + value or using a slider. +* Give each column title its own background color. +* Specify a different font for each column title, change the + style, size, and color of the font. +* Specify how to clip each cell. If the text does not fit in a + cell, TSuperGridT can either clip it, add an ellipsis, or + wrap the words for multiple lines of text in each cell. +* Align the contents of each row to the left, right or centered. +* Specify a background color for the contents of each row. +* Specify a font ( style, size and color ) for the contents + of each row. +* Dynamically change the height of any row by typing a new value + or using a slider. +* Give even and/or odd rows their own background color. +* Specify a comma-delimited file to populate the grid, + create and edit the file at design time. + You can specify whether to strip leading and trailing blanks + from each item in the file, and whether the grid should add + rows to accomodate all the lines in the data file. +* New for Version 1.2! You can load bitmaps, icons or windows meta + files into each cell of TSuperGrid at design time or run time. + +The property editor has an Apply button that allows you to see +all the changes you make instantly take effect on the grid. +If you specify a data file, the file will be loaded into the +grid when you press the Apply button. + +TSuperGrid also adds an event to TStringGrid that allows you +to override any color, or font choices that you made at design +time, and specify new values for each cell. + + +Installation +------------ +Note: If you have a previous version of TSuperGrid, it is recommended +that you delete all the old files and reinstall TSuperGrid 1.4 with the +new files. + +Unzip the file super14.zip. +This will create the following files: + 1) Super.HLP + 2) Super.KWF + 3) Super14.TXT + 4) SuperBug.TXT + 5) 16bit\RzCommon.DCU + 6) 16bit\RzTrkbar.DCU + 7) 16bit\RzTrkbar.RES + 8) 16bit\SuperCol.DCU + 9) 16bit\SuperDlg.DCU +10) 16bit\SuperDlg.DFM +11) 16bit\SuperGrd.DCU +12) 16bit\SuperReg.DCU +13) 16bit\SuperReg.DCR +14) 16bit\Super16.RES +15) 16bit\Colorpik.DCU +16) 32bit\RzCommon.DCU +17) 32bit\RzTrkbar.DCU +18) 32bit\RzTBar32.RES +19) 32bit\SuperCol.DCU +20) 32bit\SuperDlg.DCU +21) 32bit\SuperDlg.DFM +22) 32bit\SuperGrd.DCU +23) 32bit\Super32.DCU +24) 32bit\Super32.DCR +25) 32bit\Super32.RES +26) 32bit\Colorpik.DCU + +The following instructions refer to Delphi 1.0 menus, the procedure +is basicaly the same for Delphi 2.0 + + 1.Copy Super.HLP to a directory in your path, such as the + Windows directory, or the Delphi\Bin directory. + 2.Copy Super.KWF to the Delphi\Help directory. + 3.Run Helpinst.EXE, this program is located in the Delphi\Help + directory. + 4.Select File | Open to open Delphi.HDX, which is located in + your Delphi\Bin directory. + 5.Click on the green plus sign, to add the Super.KWF file. + 6.Once you added the file, select File | Save to compile and + save the Delphi.HDX file. + 7.Run Delphi and select Options | Install Components. + 8.Click on the Add button, and then Browse. + 9.Change the List Files Of Type box to show all *.DCU files. +10.Navigate to the directory where you unzipped the original + files and double click on the following file: + + For Delphi 1.0, select SuperReg.DCU + For Delphi 2.0, select Super32.DCU + +11.Back at the Install Components dialog, click on OK. +12.After Delphi is done building the component library and the + component palette is updated, you will see TSuperGrid as the + last component in the Additional page looking like a + TStringGrid, and bearing the 'Super' brand. +13.Congratulations! TSuperGrid is now installed. +14.To view the documentation, click on the TSuperGrid component + and press F1. + +Enjoy. + +----------------------------------------------------------------- +TSuperGrid Version 1.4 - by Pablo Pissanetzky - pablo@neosoft.com +----------------------------------------------------------------- diff --git a/lib/supergrid/SUPERBUG.TXT b/lib/supergrid/SUPERBUG.TXT new file mode 100644 index 00000000..a2dedc7b --- /dev/null +++ b/lib/supergrid/SUPERBUG.TXT @@ -0,0 +1,158 @@ +Bug fixes after release of Version 1.0 +-------------------------------------- + +-------------------------------------------------------------------------------- +Number : B-1 +Date : 2/18/96 +Affected file : Super.PAS +Description : OnDrawCell was not being called. +Fix : Changed the order of drawing operation so that: + If DefaultDrawing is True AND there is a column definition for + this cell, I draw the text according to the properties in the + TColumn object. If there is no column definition, I call the + inherited method to draw the text. In either case, the + OnDrawCell event is triggered after the text is drawn. Note + that if there is a column definition, when the OnDrawCell + event is called, the canvas attributes will be those set in the + TColumn object. + + If DefaultDrawing is False, no drawing is done, and the canvas + attributes are left alone. Note that in this case, + OnGetCellCanvasInfo is NOT triggered. + + OnGetCellCanvasInfo is called Only if DefaultDrawing is True. + It is triggered regardless of whether there is a column + definition for the current column. If there is a column + definition, the canvas attributes, when OnGetCellCanvasInfo is + triggered, will be those in the TColumn object, otherwise, they + will be the ones that TStringGrid set. +-------------------------------------------------------------------------------- +Number : B-2 +Date : 2/18/96 +Affected file : Super.PAS +Description : GPF when stripping leading and trailing spaces is set and the + value read in is two quotes ( "" ). +Fix : Added a check for the string length before stripping. I thought + that if you called Delete( Token , 1 , 0 ) it would not delete + any characters, but I was wrong, so I made the check myself. +-------------------------------------------------------------------------------- +Number : B-3 +Date : 2/18/96 +Affected file : Dialog.DFM +Description : When the folder button is clicked and the file name typed does + not exists, the dialog will prompt to create it AND notepad will + prompt to create it. +Fix : Removed the ofCreatePrompt option from the open dialog component. +-------------------------------------------------------------------------------- +Number : B-4 +Date : 2/20/96 +Affected file : Dialog.DFM +Description : Every time the user presses 'Apply', the combo box containig the + rows is reset to row zero regardless of which row was selected. +Fix : Reset the user's selection after re-populating the combo, if the + selected row still exists, otherwise set the the selection to + row zero. + +================================================================================ + +Enhancements after release of Version 1.0 +----------------------------------------- + +Number : E-1 +Date : 2/21/96 +Affected file : Dialog.PAS +Description : Added the capability to load bitmaps, icons, or windows meta + files from the delimited data file. To do so, place the file + name of the graphic enclosed in '{' and '}'. The graphic is + drawn at the top left corner of the cell, and the OnDrawCell + event gets passed the rectangle to the right of the graphic. + Graphic is not loaded and error not reported if the file given + in the data file does not exist. + +================================================================================ + +Bug Fixes after release of Version 1.2 +-------------------------------------- + +-------------------------------------------------------------------------------- +Number : B-5 +Date : 2/28/96 +Affected file : Super.PAS +Description : Wrong font colors with different combinations of goRangeSelect, + goRowSelect and goDrawFocusSelected. +Fix : Forced original colors depending on the options above. + +-------------------------------------------------------------------------------- +Number : B-6 +Date : 2/28/96 +Affected file : Super.PAS +Description : When deriving a component from TSuperGrid, the inherited DrawCell + method is not visible. +Fix : Made DrawCell protected, as it should be. + +-------------------------------------------------------------------------------- +Number : B-7 +Date : 2/28/96 +Affected file : Dialog.PAS +Description : When creating a new column definition, if the columns is fixed, + its background color is set to clBtnFace. +Fix : The background color is now set to the grid's FixedColor, whatever + it may be. + +-------------------------------------------------------------------------------- +Number : B-8 +Date : 2/28/96 +Affected file : Dialog.PAS +Description : Unexpected results when dragging column definitions. +Fix : When a column definition is dragged to a fixed column, its content + color is set to the grid's FixedColor. When dragging a column + definition from a fixed column to a scrolling column, its content + color is set to the grid's Color. + +-------------------------------------------------------------------------------- +Number : B-9 +Date : 2/28/96 +Affected file : Super.PAS +Description : When multiple fixed rows are used, only the top one is painted + with the title color, all others are painted with the column color. +Fix : Used title color for all fixed rows. + +-------------------------------------------------------------------------------- +Number : B-10 +Date : 3/16/95 +Affected file : All +Description : The file names conflicted with other component installations. +Fix : Renamed all the files as follows + + Super.PAS SuperGrd.PAS + Dialog.PAS SuperDlg.PAS + Dialog.DFM SuperDlg.DFM + Columns.PAS SuperCol.PAS + Install.PAS SuperReg.PAS + Install.DCR SuperReg.DCR + + +================================================================================ + +Bug Fixes after release of Version 1.3 +-------------------------------------- + +-------------------------------------------------------------------------------- +Number : B-11 +Date : 3/28/96 +Affected file : Super.PAS +Description : Leading spaces at the begging of a line were being trimmed + regardless of the grid's settings. +Fix : Change SeekEof to just plain EOF to detect end of file, it seems + that SeekEof actually skips characters in the file. + A side effect of the change is that empty lines will now be + correctly interpreted as empty rows! + Thanks to Stefan Hoffmeister for pointing this one out. + +================================================================================ + +Enhancements after release of Version 1.3 +----------------------------------------- + +Many! See the help file. + diff --git a/lib/supergrid/Super32.dcr b/lib/supergrid/Super32.dcr new file mode 100644 index 00000000..c62ace27 Binary files /dev/null and b/lib/supergrid/Super32.dcr differ diff --git a/lib/supergrid/Super32.dcu b/lib/supergrid/Super32.dcu new file mode 100644 index 00000000..2da16799 Binary files /dev/null and b/lib/supergrid/Super32.dcu differ diff --git a/lib/supergrid/Super32.res b/lib/supergrid/Super32.res new file mode 100644 index 00000000..7c7bfc8a Binary files /dev/null and b/lib/supergrid/Super32.res differ diff --git a/lib/supergrid/SuperCol.dcu b/lib/supergrid/SuperCol.dcu new file mode 100644 index 00000000..bbff300e Binary files /dev/null and b/lib/supergrid/SuperCol.dcu differ diff --git a/lib/supergrid/SuperDlg.dcu b/lib/supergrid/SuperDlg.dcu new file mode 100644 index 00000000..4729b2ac Binary files /dev/null and b/lib/supergrid/SuperDlg.dcu differ diff --git a/lib/supergrid/SuperDlg.dfm b/lib/supergrid/SuperDlg.dfm new file mode 100644 index 00000000..7d659014 Binary files /dev/null and b/lib/supergrid/SuperDlg.dfm differ diff --git a/lib/supergrid/SuperGrd.dcu b/lib/supergrid/SuperGrd.dcu new file mode 100644 index 00000000..cfd380e2 Binary files /dev/null and b/lib/supergrid/SuperGrd.dcu differ diff --git a/lib/supergrid/SuperGrid.dcp b/lib/supergrid/SuperGrid.dcp new file mode 100644 index 00000000..78048931 Binary files /dev/null and b/lib/supergrid/SuperGrid.dcp differ diff --git a/lib/supergrid/SuperGrid.dcu b/lib/supergrid/SuperGrid.dcu new file mode 100644 index 00000000..1f74f035 Binary files /dev/null and b/lib/supergrid/SuperGrid.dcu differ diff --git a/lib/supergrid/SuperGrid.dpl b/lib/supergrid/SuperGrid.dpl new file mode 100644 index 00000000..d9dd1020 Binary files /dev/null and b/lib/supergrid/SuperGrid.dpl differ diff --git a/lib/supergrid/SuperGrid.res b/lib/supergrid/SuperGrid.res new file mode 100644 index 00000000..36f26e23 Binary files /dev/null and b/lib/supergrid/SuperGrid.res differ diff --git a/lib/supergrid/colorpik.dcu b/lib/supergrid/colorpik.dcu new file mode 100644 index 00000000..b126b3eb Binary files /dev/null and b/lib/supergrid/colorpik.dcu differ diff --git a/lib/telnet/CLI5.DFM b/lib/telnet/CLI5.DFM new file mode 100644 index 00000000..29a69665 Binary files /dev/null and b/lib/telnet/CLI5.DFM differ diff --git a/lib/telnet/CLI5.PAS b/lib/telnet/CLI5.PAS new file mode 100644 index 00000000..f85a3319 --- /dev/null +++ b/lib/telnet/CLI5.PAS @@ -0,0 +1,191 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: Simple client application demonstrating TWSocket object in action. +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: September 21, 1996 +Version: 2.04 +Support: Please ask your question in the following newsgroup: + news://forums.borland.com/borland.public.delphi.vcl.components.using +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 06, 1997 Beautified +Nov 09, 1997 Added a button to display the list of IP addresses for the + local computer (you can have two IP addresses if you are connected + to a LAN and to your ISP). +Nov 11, 1997 V2.03 Added a ReadLine button to show how to read a single line + synchronously. +Nov 18, 1997 V2.04 Show how to use ReceiveStr + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit cli5; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, + Forms, Dialogs, Winsock, WSocket, StdCtrls, Wait; + +const + Client5Version = 204; + +type + TClientForm = class(TForm) + ConnectButton: TButton; + CliSocket: TWSocket; + InfoLabel: TLabel; + DisconnectButton: TButton; + DataLabel: TLabel; + IPButton: TButton; + ReadLineButton: TButton; + Wait1: TWait; + procedure ConnectButtonClick(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure CliSocketDataAvailable(Sender: TObject; Error: Word); + procedure CliSocketSessionConnected(Sender: TObject; Error: Word); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + procedure IPButtonClick(Sender: TObject); + procedure ReadLineButtonClick(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + end; + +var + ClientForm: TClientForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler gets called when we connected the server *} +procedure TClientForm.CliSocketSessionConnected(Sender: TObject; Error: Word); +begin + InfoLabel.Caption := 'Connected'; + DisconnectButton.Enabled := TRUE; + ConnectButton.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler gets called when the server's connection is broken *} +{* Either by us or by the server. *} +procedure TClientForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + DataLabel.Caption := ''; + InfoLabel.Caption := 'Disconnected'; + DisconnectButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* The user has clicked on the connect button... *} +procedure TClientForm.ConnectButtonClick(Sender: TObject); +begin + CliSocket.Addr := 'localhost'; { Server host name } + CliSocket.Proto := 'tcp'; { Protocol we wants to use } + CliSocket.Port := 'telnet'; { The port we wants to connect } + CliSocket.Connect; { Let's connect ! } + { Connect is just a request, it returns immediately. We eventually gets } + { gets connected later. At that time we will receive the event } + { SessionConnected. If you need a timeout, you have to start a TTimer. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* The user has clicked the disconnect button... *} +procedure TClientForm.DisconnectButtonClick(Sender: TObject); +begin + CliSocket.Close; { This will close the connection } + { When the connection will be effectively closed, we will receive the } + { SessionClosed even. } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +begin + DataLabel.Caption := CliSocket.ReceiveStr; +end; + +{$IFDEF NEVER} +{ The same procedure using Receive: a little bit more complicated but } +{ more efficient because data is less copied from here to there. } +procedure TClientForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +var + Buffer : String[200]; + Count : Integer; +begin + Count := CliSocket.Receive(@Buffer[1], High(Buffer)); + Buffer[0] := chr(Count); + DataLabel.Caption := Buffer; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.IPButtonClick(Sender: TObject); +var + IPList : TStrings; + I : Integer; +begin + IPList := WSocket.LocalIPList; + InfoLabel.Caption := ''; + for I := 0 to IPList.Count - 1 do + InfoLabel.Caption := InfoLabel.Caption + ' ' + IPList.Strings[I]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.ReadLineButtonClick(Sender: TObject); +var + Buf : String; +begin + ReadLineButton.Enabled := FALSE; + try + CliSocket.ReadLine(30, Buf); + DataLabel.Caption := Buf; + finally + ReadLineButton.Enabled := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +begin + Wait1.Stop; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/CLIDEMO.DPR b/lib/telnet/CLIDEMO.DPR new file mode 100644 index 00000000..88529f53 --- /dev/null +++ b/lib/telnet/CLIDEMO.DPR @@ -0,0 +1,12 @@ +program CliDemo; + +uses + Forms, + CliDemo1 in 'CliDemo1.pas' {ClientForm}; + +{$R *.RES} + +begin + Application.CreateForm(TClientForm, ClientForm); + Application.Run; +end. diff --git a/lib/telnet/CLIDEMO1.DFM b/lib/telnet/CLIDEMO1.DFM new file mode 100644 index 00000000..88d67f62 Binary files /dev/null and b/lib/telnet/CLIDEMO1.DFM differ diff --git a/lib/telnet/CLIDEMO1.PAS b/lib/telnet/CLIDEMO1.PAS new file mode 100644 index 00000000..b241e309 --- /dev/null +++ b/lib/telnet/CLIDEMO1.PAS @@ -0,0 +1,223 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstration for Client program using TWSocket. +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: 8 december 1997 +Version: 1.01 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 09, 1997 V1.01 Made it compatible with Delphi 1 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit CliDemo1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, IniFiles, WSocket, Wait, ExtCtrls; + +const + IniFileName = 'CliDemo.ini'; + +type + TClientForm = class(TForm) + CliSocket: TWSocket; + DisplayMemo: TMemo; + Panel1: TPanel; + LineLabel: TLabel; + Label1: TLabel; + Label2: TLabel; + SendEdit: TEdit; + SendButton: TButton; + DisconnectButton: TButton; + PortEdit: TEdit; + ServerEdit: TEdit; + Wait1: TWait; + procedure DisconnectButtonClick(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure CliSocketDataAvailable(Sender: TObject; Error: Word); + procedure CliSocketSessionConnected(Sender: TObject; Error: Word); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormShow(Sender: TObject); + private + { Dclarations prives } + Buffer : array [0..1023] of char; + Count : Integer; + ConnectError : Word; + Initialized : Boolean; + procedure ProcessCommand(Cmd : String); + public + { Dclarations publiques } + end; + +var + ClientForm: TClientForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.DisconnectButtonClick(Sender: TObject); +begin + CliSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.SendButtonClick(Sender: TObject); +begin + if CliSocket.State <> wsConnected then begin + CliSocket.Port := PortEdit.Text; + CliSocket.Addr := ServerEdit.Text; + CliSocket.Proto := 'tcp'; + CliSocket.Connect; + if not CliSocket.Wait(15, wsConnected) then + Exit; + if ConnectError <> 0 then + Exit; + end; + CliSocket.SendStr(SendEdit.Text + #13 + #10); + ActiveControl := SendEdit; + SendEdit.SelectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.ProcessCommand(Cmd : String); +begin + DisplayMemo.Lines.Add(Cmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I : Integer; +begin + Len := CliSocket.Receive(@Buffer[Count], SizeOf(Buffer) - Count - 1); + if Len <= 0 then + Exit; + + Count := Count + Len; + Buffer[Count] := #0; + LineLabel.Caption := StrPas(Buffer); + + while TRUE do begin + I := 0; + while (I < Count) and (Buffer[I] <> #10) do + Inc(I); + if I >= Count then + Exit; + ProcessCommand(Copy(StrPas(Buffer), 1, I)); + Count := 0; + LineLabel.Caption := ''; + if I >= StrLen(Buffer) then + break; + Move(Buffer[I + 1], Buffer, Strlen(Buffer) - I); + LineLabel.Caption := StrPas(Buffer); + Count := StrLen(Buffer); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketSessionConnected(Sender: TObject; + Error: Word); +begin + ConnectError := Error; + if Error <> 0 then + DisplayMemo.Lines.Add('Can''t connect, error #' + IntToStr(Error)) + else + DisconnectButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + DisconnectButton.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteInteger('Window', 'Top', Top); + IniFile.WriteInteger('Window', 'Left', Left); + IniFile.WriteInteger('Window', 'Width', Width); + IniFile.WriteInteger('Window', 'Height', Height); + IniFile.WriteString('Data', 'Server', ServerEdit.Text); + IniFile.WriteString('Data', 'Port', PortEdit.Text); + IniFile.WriteString('Data', 'Command', SendEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if Initialized then + Exit; + Initialized := TRUE; + IniFile := TIniFile.Create(IniFileName); + + Top := IniFile.ReadInteger('Window', 'Top', Top); + Left := IniFile.ReadInteger('Window', 'Left', Left); + Width := IniFile.ReadInteger('Window', 'Width', Width); + Height := IniFile.ReadInteger('Window', 'Height', Height); + + PortEdit.Text := IniFile.ReadString('Data', 'Port', 'telnet'); + ServerEdit.Text := IniFile.ReadString('Data', 'Server', 'localhost'); + SendEdit.Text := IniFile.ReadString('Data', 'Command', 'LASTNAME CAESAR'); + + IniFile.Free; + + DisplayMemo.Clear; + ActiveControl := SendEdit; + SendEdit.SelectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/CLIENT5.DPR b/lib/telnet/CLIENT5.DPR new file mode 100644 index 00000000..eb4e08a7 --- /dev/null +++ b/lib/telnet/CLIENT5.DPR @@ -0,0 +1,12 @@ +program client5; + +uses + Forms, + cli5 in 'CLI5.PAS' {ClientForm}; + +{$R *.RES} + +begin + Application.CreateForm(TClientForm, ClientForm); + Application.Run; +end. diff --git a/lib/telnet/CLIENTS.DBF b/lib/telnet/CLIENTS.DBF new file mode 100644 index 00000000..4f1066e9 Binary files /dev/null and b/lib/telnet/CLIENTS.DBF differ diff --git a/lib/telnet/CLIENTS.MDX b/lib/telnet/CLIENTS.MDX new file mode 100644 index 00000000..c30a4652 Binary files /dev/null and b/lib/telnet/CLIENTS.MDX differ diff --git a/lib/telnet/CONCLI1.DPR b/lib/telnet/CONCLI1.DPR new file mode 100644 index 00000000..870d91ea --- /dev/null +++ b/lib/telnet/CONCLI1.DPR @@ -0,0 +1,66 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: ConCli shows how to use TWSocket in a console mode application + (for Delphi 2 or Delphi 3 only). +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: Nov 20, 1997 +Version: 1.00 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$APPTYPE CONSOLE} +program ConCli1; + +uses + WSocket, + Wait; + +var + WSocket1 : TWsocket; + Wait1 : TWait; + Buffer : String; +begin + Wait1 := TWait.Create(nil); + WSocket1 := TWsocket.Create(nil); + WSocket1.Addr := 'localhost'; + WSocket1.Port := 'telnet'; + WSocket1.Proto := 'tcp'; + WSocket1.WaitCtrl := Wait1; + WSocket1.Connect; + WSocket1.ReadLine(15, Buffer); + Writeln('Server banner is: ' + Buffer); + WSocket1.Close; + WSocket1.Destroy; + Wait1.Destroy; + + Writeln('Hit enter...'); + Readln; +end. diff --git a/lib/telnet/CONCLI2.DPR b/lib/telnet/CONCLI2.DPR new file mode 100644 index 00000000..77b5a3f3 --- /dev/null +++ b/lib/telnet/CONCLI2.DPR @@ -0,0 +1,169 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: ConCli2 shows how to use TWSocket in a console mode application. + For Delphi 2 or Delphi 3 only. ConCli2 use a thread to make the + socket run in the program background while the foreground is + busy with the user interface (for simplicity here we just wait + for the user to hit the enter key). +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: Nov 20, 1997 +Version: 1.00 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$APPTYPE CONSOLE} +program ConCli2; + +uses + Windows, + Classes, + WSocket, + Wait; + +const + ServerHostName = 'localhost'; + ServerPort = 'telnet'; + +type + TWSocketThread = class(TThread) + protected + FWSocket : TWsocket; + FWait : TWait; + FRcvBuf : array [0..1023] of char; + procedure Execute; override; + procedure FWSocketDataAvailable(Sender : TObject; Error : Word); + procedure FWSocketSessionConnected(Sender : TObject; Error : Word); + procedure FWSocketSessionClosed(Sender : TObject; Error : Word); + public + constructor Create; virtual; + end; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TWSocketThread.Create; +begin + inherited Create(TRUE); + FreeOnTerminate := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TWSocketThread.Execute; +begin + // Let's the user know what we are doing + Writeln('Connecting to server ''', ServerHostName, + ''' on port ''', ServerPort, ''''); + + // Create the TWSocket we will use to commicate with the server + FWSocket := TWsocket.Create(nil); + + // Create the TWait object needed by TWSocket for some lengthy operations + FWait := TWait.Create(nil); + FWSocket.WaitCtrl := FWait; + + // Assign the event handler for the TWSocket events we care of + FWSocket.OnDataAvailable := FWSocketDataAvailable; + FWSocket.OnSessionClosed := FWSocketSessionClosed; + FWSocket.OnSessionConnected := FWSocketSessionConnected; + + // Connect to the server + FWSocket.Addr := ServerHostName; + FWSocket.Port := ServerPort; + FWSocket.Proto := 'tcp'; + FWSocket.Connect; + + // Let the TWSocket component makes his work + FWSocket.MessageLoop; + + // We are done, destroy the objects we created + FWSocket.Destroy; + FWait.Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by the TWSocket when some data has been } +{ received by the lower level. } +procedure TWSocketThread.FWSocketDataAvailable(Sender : TObject; Error : Word); +var + Len : Integer; +begin + // Get the received data + Len := FWSocket.Receive(@FRcvBuf[0], SizeOf(FRcvBuf) - 1); + if Len <= 0 then + Exit; + + // Add a terminating nul byte to allow display using standard I/O + FRcvBuf[Len] := #0; + Write(FRcvBuf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TWSocket when the connection is } +{ established with the remote host } +procedure TWSocketThread.FWSocketSessionConnected(Sender : TObject; Error : Word); +begin + Writeln('Connected'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called by TWSocket when the connection is broken } +procedure TWSocketThread.FWSocketSessionClosed(Sender : TObject; Error : Word); +begin + Writeln('Server has diconnected'); + FWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the main program. } +var + WSocketThread : TWSocketThread; +begin + Writeln('Hit enter to stop the program'); + Writeln; + // Create the socket working thread (suspended) + WSocketThread := TWSocketThread.Create; + + // Start the thread + WSocketThread.Resume; + + // The main thread continue here. Process user request here. + Readln; + + // We are done, quit the program + Writeln('Ok.'); +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/DNSLOOK.DPR b/lib/telnet/DNSLOOK.DPR new file mode 100644 index 00000000..c7d8897c --- /dev/null +++ b/lib/telnet/DNSLOOK.DPR @@ -0,0 +1,12 @@ +program DnsLook; + +uses + Forms, + DnsLook1 in 'DnsLook1.pas' {DnsLookupForm}; + +{$R *.RES} + +begin + Application.CreateForm(TDnsLookupForm, DnsLookupForm); + Application.Run; +end. diff --git a/lib/telnet/DNSLOOK1.DFM b/lib/telnet/DNSLOOK1.DFM new file mode 100644 index 00000000..c4012df3 Binary files /dev/null and b/lib/telnet/DNSLOOK1.DFM differ diff --git a/lib/telnet/DNSLOOK1.PAS b/lib/telnet/DNSLOOK1.PAS new file mode 100644 index 00000000..ae92236c --- /dev/null +++ b/lib/telnet/DNSLOOK1.PAS @@ -0,0 +1,121 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstrate how to use TWSocket to asynchroneously resolve a + host name to an IP address. +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: October 29, 1997 +Version: 1.02 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Oct 30, 1997 V1.01 Made the code compatible with Delphi 1. +Oct 31, 1997 V1.02 Added a cancel button + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit DnsLook1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WinSock, WSocket, StdCtrls; + +type + TDnsLookupForm = class(TForm) + WSocket1: TWSocket; + HostEdit: TEdit; + Label1: TLabel; + IPLabel: TLabel; + LookupButton: TButton; + CancelButton: TButton; + procedure FormCreate(Sender: TObject); + procedure LookupButtonClick(Sender: TObject); + procedure WSocket1DnsLookupDone(Sender: TObject; Error: Word); + procedure CancelButtonClick(Sender: TObject); + end; + +var + DnsLookupForm: TDnsLookupForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.FormCreate(Sender: TObject); +begin + IPLabel.Caption := ''; + LookupButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; + HostEdit.Text := LocalHostName; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.LookupButtonClick(Sender: TObject); +begin + LookupButton.Enabled := FALSE; { Prevent recursive call } + CancelButton.Enabled := TRUE; { Enable canceling } + HostEdit.SelectAll; { handy for the user } + ActiveControl := HostEdit; { he likes to have the cursor there } + IPLabel.Caption := 'Waiting for DNS...'; + WSocket1.DnsLookup(HostEdit.Text); { Start DnsLookup } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.WSocket1DnsLookupDone(Sender: TObject; + Error: Word); +begin + if Error = 0 then + IPLabel.Caption := WSocket1.DnsResult + else + IPLabel.Caption := 'NOT FOUND, ERROR #' + IntToStr(Error); + LookupButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TDnsLookupForm.CancelButtonClick(Sender: TObject); +begin + IPLabel.Caption := ''; + LookupButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; + ActiveControl := HostEdit; + WSocket1.CancelDnsLookup; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/EMULVT.DCR b/lib/telnet/EMULVT.DCR new file mode 100644 index 00000000..ffa22ae4 Binary files /dev/null and b/lib/telnet/EMULVT.DCR differ diff --git a/lib/telnet/EMULVT.PAS b/lib/telnet/EMULVT.PAS new file mode 100644 index 00000000..679b82dd --- /dev/null +++ b/lib/telnet/EMULVT.PAS @@ -0,0 +1,3168 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: EMULVT.PAS +Object: Delphi component which does Ansi terminal emulation + Not every escape sequence is implemented, but a large subset. +Author: Franois PIETTE +Email: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: May, 1996 +Version: 2.02 +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Jul 22, 1997 Some optimization + Adapted to Delphi 3 +Sep 05, 1997 Version 2.01 +Dec 16, 1997 V2.02 Corrected a bug int the paint routine which caused GDI + resource leak when color was used. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Emulvt; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, ClipBrd; + +const + EmulVTVersion = 202; + MAX_ROW = 50; + MAX_COL = 132; + TopMargin = 4; + LeftMargin = 6; + RightMargin = 6; + BottomMargin = 4; + NumPaletteEntries = 16; + +type + TXlatTable = array [0..255] of char; + PXlatTable = ^TXlatTable; + TFuncKeyValue = String[50]; + PFuncKeyValue = ^TFuncKeyValue; + TFuncKey = record + ScanCode : Char; + Shift : TShiftState; + Ext : Boolean; + Value : TFuncKeyValue; + end; + TFuncKeysTable = array [0..63] of TFuncKey; + PFuncKeysTable = ^TFuncKeysTable; + TKeyBufferEvent = procedure (Sender : TObject; Buffer : PChar; Len : Integer) of object; + +type + { TLine is an object used to hold one line of text on screen } + TLine = class(TObject) + public + Txt : array [0..MAX_COL] of Char; + Att : array [0..MAX_COL] of Byte; + constructor Create; + procedure Clear(Attr : Byte); + end; + + { TScreen is an object to hold an entire screen of line and handle } + { Ansi escape sequences to update this virtual screen } + TScreen = class(TObject) + public + FLines : array [0..MAX_ROW] of TLine; + FRow : Integer; + FCol : Integer; + FRowSaved : Integer; + FColSaved : Integer; + FScrollRowTop : Integer; + FScrollRowBottom : Integer; + FAttribute : Byte; + FForceHighBit : Boolean; + FReverseVideo : Boolean; + FUnderLine : Boolean; + FRowCount : Integer; + FColCount : Integer; + FEscBuffer : String[80]; + FEscFlag : Boolean; + Focused : Boolean; + FAutoLF : Boolean; + FAutoCR : Boolean; + FAutoWrap : Boolean; + FCursorOff : Boolean; + FCKeyMode : Boolean; + FNoXlat : Boolean; + FNoXlatInitial : Boolean; + FCntLiteral : Integer; + FCarbonMode : Boolean; + FXlatInputTable : PXlatTable; + FXlatOutputTable : PXlatTable; + FCharSetG0 : Char; + FCharSetG1 : Char; + FCharSetG2 : Char; + FCharSetG3 : Char; + FAllInvalid : Boolean; + FInvRect : TRect; + FOnCursorVisible : TNotifyEvent; + constructor Create; + destructor Destroy; override; + procedure InvRect(nRow, nCol : Integer); + procedure InvClear; + procedure WriteChar(Ch : Char); + procedure WriteStr(Str : String); + function ReadStr : String; + procedure GotoXY(X, Y : Integer); + procedure WriteLiteralChar(Ch : Char); + procedure ProcessEscape(EscCmd : Char); + procedure SetAttr(Att : Char); + procedure CursorRight; + procedure CursorLeft; + procedure CursorDown; + procedure CursorUp; + procedure CarriageReturn; + procedure ScrollUp; + procedure ScrollDown; + procedure ClearScreen; + procedure BackSpace; + procedure Eol; + procedure Eop; + procedure ProcessESC_D; { Index } + procedure ProcessESC_M; { Reverse index } + procedure ProcessESC_E; { Next line } + procedure ProcessCSI_u; { Restore Cursor } + procedure ProcessCSI_I; { Select IBM char set } + procedure ProcessCSI_J; { Clear the screen } + procedure ProcessCSI_K; { Erase to End of Line } + procedure ProcessCSI_L; { Insert Line } + procedure ProcessCSI_M; { Delete Line } + procedure ProcessCSI_m_lc; { Select Attributes } + procedure ProcessCSI_n_lc; { Cursor position report } + procedure ProcessCSI_at; { Insert character } + procedure ProcessCSI_r_lc; { Scrolling margins } + procedure ProcessCSI_s_lc; { Save cursor location } + procedure ProcessCSI_u_lc; { Restore cursor location } + procedure ProcessCSI_7; { Save cursor location } + procedure ProcessCSI_8; { Restore cursor location } + procedure ProcessCSI_H; { Set Cursor Position } + procedure ProcessCSI_h_lc; { Terminal mode set } + procedure ProcessCSI_l_lc; { Terminal mode reset } + procedure ProcessCSI_A; { Cursor Up } + procedure ProcessCSI_B; { Cursor Down } + procedure ProcessCSI_C; { Cursor Right } + procedure ProcessCSI_D; { Cursor Left } + procedure ProcessCSI_P; { Delete Character } + procedure ProcessCSI_S; { Scroll up } + procedure ProcessCSI_T; { Scroll down } + procedure process_charset_G0(EscCmd : Char);{ G0 character set } + procedure process_charset_G1(EscCmd : Char);{ G1 character set } + procedure process_charset_G2(EscCmd : Char);{ G2 character set } + procedure process_charset_G3(EscCmd : Char);{ G3 character set } + procedure UnimplementedEscape(EscCmd : Char); + procedure InvalidEscape(EscCmd : Char); + function GetEscapeParam(From : Integer; var Value : Integer) : Integer; + property OnCursorVisible : TNotifyEvent read FonCursorVisible + write FOnCursorVisible; + end; + + { TCustomEmulVT is an visual component wich does the actual display } + { of a TScreen object wich is the virtual screen } + { No property is published. See TEmulVT class } + TCustomEmulVT = class(TCustomControl) + private + FScreen : TScreen; + FFileHandle : TextFile; + FCursorVisible : Boolean; + FCaretShown : Boolean; + FCaretCreated : Boolean; + FLineHeight : Integer; + FCharWidth : Integer; + FInternalLeading : Integer; + FBorderStyle : TBorderStyle; + FBorderWidth : Integer; + FAutoRepaint : Boolean; + FFont : TFont; + FVScrollBar : TScrollBar; + FTopLine : Integer; + FLocalEcho : Boolean; + FOnKeyBuffer : TKeyBufferEvent; + FFKeys : Integer; + FMonoChrome : Boolean; + FLog : Boolean; + FAppOnMessage : TMessageEvent; + FFlagCirconflexe : Boolean; + FFlagTrema : Boolean; + FSelectRect : TRect; + FPal : HPalette; + FPaletteEntries : array[0..NumPaletteEntries - 1] of TPaletteEntry; + procedure WMPaint(var Message: TWMPaint); message WM_PAINT; + procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; + procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS; + procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN; + procedure WMPaletteChanged(var Message : TMessage); message WM_PALETTECHANGED; + procedure AppMessageHandler(var Msg: TMsg; var Handled: Boolean); + procedure VScrollBarScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); + procedure SetCaret; + procedure KeyPress(var Key: Char); override; + function ProcessFKeys(ScanCode: Char; Shift: TShiftState; Ext: Boolean) : Boolean; + function FindFKeys(ScanCode: Char; Shift: TShiftState; + Ext: Boolean) : PFuncKeyValue; + procedure CursorVisibleEvent(Sender : TObject); + procedure SetFont(Value : TFont); + procedure SetAutoLF(Value : Boolean); + procedure SetAutoCR(Value : Boolean); + procedure SetXlat(Value : Boolean); + procedure SetLog(Value : Boolean); + procedure SetRows(Value : Integer); + procedure SetCols(Value : Integer); + procedure SetLineHeight(Value : Integer); + function GetAutoLF : Boolean; + function GetAutoCR : Boolean; + function GetXlat : Boolean; + function GetRows : Integer; + function GetCols : Integer; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure DoKeyBuffer(Buffer : PChar; Len : Integer); virtual; + procedure ShowCursor; + procedure SetCursor(Row, Col : Integer); + procedure WriteChar(Ch : Char); + procedure WriteStr(Str : String); + procedure WriteBuffer(Buffer : Pointer; Len : Integer); + function ReadStr : String; + procedure Clear; + procedure UpdateScreen; + function SnapPixelToRow(Y : Integer) : Integer; + function SnapPixelToCol(X : Integer) : Integer; + function PixelToRow(Y : Integer) : Integer; + function PixelToCol(X : Integer) : Integer; + procedure MouseToCell(X, Y: Integer; var ACol, ARow: Longint); + private + procedure PaintOneLine(DC: HDC; Y : Integer; const Line : TLine; + nColFrom : Integer; nColTo : Integer); + procedure SetupFont; + property Text : String read ReadStr write WriteStr; + property OnMouseMove; + property OnMouseDown; + property OnMouseUp; + property OnClick; + property OnKeyPress; + property OnKeyBuffer : TKeyBufferEvent read FOnKeyBuffer write FOnKeyBuffer; + property Ctl3D; + property Align; + property TabStop; + property TabOrder; + property BorderStyle: TBorderStyle read FBorderStyle write FBorderStyle; + property AutoRepaint : Boolean read FAutoRepaint write FAutoRepaint; + property Font : TFont read FFont write SetFont; + property LocalEcho : Boolean read FLocalEcho write FLocalEcho; + property AutoLF : Boolean read GetAutoLF write SetAutoLF; + property AutoCR : Boolean read GetAutoCR write SetAutoCR; + property Xlat : Boolean read GetXlat write SetXlat; + property MonoChrome : Boolean read FMonoChrome write FMonoChrome; + property Log : Boolean read FLog write SetLog; + property Rows : Integer read GetRows write SetRows; + property Cols : Integer read GetCols write SetCols; + property LineHeight : Integer read FLineHeight write SetLineHeight; + property CharWidth : Integer read FCharWidth; + property FKeys : Integer read FFKeys write FFKeys; + property SelectRect : TRect read FSelectRect write FSelectRect; + end; + + { Same as TCustomEmulVT, but with published properties } + TEmulVT = class(TCustomEmulVT) + public + property Screen : TScreen read FScreen; + property SelectRect; + property Text; + published + property OnMouseMove; + property OnMouseDown; + property OnMouseUp; + property OnClick; + property OnKeyPress; + property OnKeyBuffer; + property Ctl3D; + property Align; + property BorderStyle; + property AutoRepaint; + property Font; + property LocalEcho; + property AutoLF; + property AutoCR; + property Xlat; + property MonoChrome; + property Log; + property Rows; + property Cols; + property LineHeight; + property CharWidth; + property TabStop; + property TabOrder; + property FKeys; + end; + +const + F_BLACK = $00; + F_BLUE = $01; + F_GREEN = $02; + F_CYAN = $03; + F_RED = $04; + F_MAGENTA = $05; + F_BROWN = $06; + F_WHITE = $07; + + B_BLACK = $00; + B_BLUE = $01; + B_GREEN = $02; + B_CYAN = $03; + B_RED = $04; + B_MAGENTA = $05; + B_BROWN = $06; + B_WHITE = $07; + + F_INTENSE = $08; + B_BLINK = $80; + + { Function keys (SCO Console) } + FKeys1 : TFuncKeysTable = ( + (ScanCode: #$48; Shift: []; Ext: TRUE ; Value: #$1B + '[A'), { UP } + (ScanCode: #$50; Shift: []; Ext: TRUE ; Value: #$1B + '[B'), { DOWN } + (ScanCode: #$4D; Shift: []; Ext: TRUE ; Value: #$1B + '[C'), { RIGHT } + (ScanCode: #$4B; Shift: []; Ext: TRUE ; Value: #$1B + '[D'), { LEFT } + (ScanCode: #$49; Shift: []; Ext: TRUE ; Value: #$1B + '[I'), { PREV } + (ScanCode: #$51; Shift: []; Ext: TRUE ; Value: #$1B + '[G'), { NEXT } + (ScanCode: #$47; Shift: []; Ext: TRUE ; Value: #$1B + '[H'), { HOME } + (ScanCode: #$4F; Shift: []; Ext: TRUE ; Value: #$1B + '[F'), { END } + (ScanCode: #$52; Shift: []; Ext: TRUE ; Value: #$1B + '[L'), { INS } + (ScanCode: #$0F; Shift: []; Ext: FALSE; Value: #$1B + '[Z'), { RTAB } + (ScanCode: #$53; Shift: []; Ext: TRUE ; Value: #$7F ), { DEL } + (ScanCode: #$3B; Shift: []; Ext: FALSE; Value: #$1B + '[M'), { F1 } + (ScanCode: #$3C; Shift: []; Ext: FALSE; Value: #$1B + '[N'), + (ScanCode: #$3D; Shift: []; Ext: FALSE; Value: #$1B + '[O'), + (ScanCode: #$3E; Shift: []; Ext: FALSE; Value: #$1B + '[P'), + (ScanCode: #$3F; Shift: []; Ext: FALSE; Value: #$1B + '[Q'), + (ScanCode: #$40; Shift: []; Ext: FALSE; Value: #$1B + '[R'), + (ScanCode: #$41; Shift: []; Ext: FALSE; Value: #$1B + '[S'), + (ScanCode: #$42; Shift: []; Ext: FALSE; Value: #$1B + '[T'), + (ScanCode: #$43; Shift: []; Ext: FALSE; Value: #$1B + '[U'), + (ScanCode: #$44; Shift: []; Ext: FALSE; Value: #$1B + '[V'), { F10 } + (ScanCode: #$85; Shift: []; Ext: FALSE; Value: #$1B + '[W'), { F11 } + (ScanCode: #$86; Shift: []; Ext: FALSE; Value: #$1B + '[X'), { F12 } + (ScanCode: #$3B; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[V'),{ SF1 should be 'Y' } + (ScanCode: #$3C; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[Z'), + (ScanCode: #$3D; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[a'), + (ScanCode: #$3E; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[b'), + (ScanCode: #$3F; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[c'), + (ScanCode: #$40; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[d'), + (ScanCode: #$41; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[e'), + (ScanCode: #$42; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[f'), + (ScanCode: #$43; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[g'), + (ScanCode: #$44; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[h'), + (ScanCode: #$85; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[i'), + (ScanCode: #$86; Shift: [ssShift]; Ext: FALSE; Value: #$1B + '[j'),{ SF10 } + (ScanCode: #$3B; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[k'), { CF1 } + (ScanCode: #$3C; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[l'), + (ScanCode: #$3D; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[m'), + (ScanCode: #$3E; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[n'), + (ScanCode: #$3F; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[o'), + (ScanCode: #$40; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[p'), + (ScanCode: #$41; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[q'), + (ScanCode: #$42; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[r'), + (ScanCode: #$43; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[s'), + (ScanCode: #$44; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[t'), + (ScanCode: #$85; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[u'), + (ScanCode: #$86; Shift: [ssCtrl]; Ext: FALSE; Value: #$1B + '[v'), { CF12 } + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ) + ); + +{ Alternate function keys (ordinary VT keys) } + FKeys2 : TFuncKeysTable = ( + (ScanCode: #$48; Shift: []; Ext: TRUE ; Value: #$1B + '[A'), { UP } + (ScanCode: #$50; Shift: []; Ext: TRUE ; Value: #$1B + '[B'), { DOWN } + (ScanCode: #$4D; Shift: []; Ext: TRUE ; Value: #$1B + '[C'), { RIGHT } + (ScanCode: #$4B; Shift: []; Ext: TRUE ; Value: #$1B + '[D'), { LEFT } + (ScanCode: #$49; Shift: []; Ext: TRUE ; Value: #$1B + '[5~'), { PREV } + (ScanCode: #$51; Shift: []; Ext: TRUE ; Value: #$1B + '[6~'), { NEXT } + (ScanCode: #$52; Shift: []; Ext: TRUE ; Value: #$1B + '[2~'), { INSERT } + (ScanCode: #$53; Shift: []; Ext: TRUE ; Value: #$7F ), { DELETE } + (ScanCode: #$3B; Shift: []; Ext: FALSE; Value: #$1B + 'OP'), { F1->PF1 } + (ScanCode: #$3C; Shift: []; Ext: FALSE; Value: #$1B + 'OQ'), { F2->PF2 } + (ScanCode: #$3D; Shift: []; Ext: FALSE; Value: #$1B + 'OR'), { F3->PF3 } + (ScanCode: #$3E; Shift: []; Ext: FALSE; Value: #$1B + 'OS'), { F4->PF4 } + (ScanCode: #$57; Shift: []; Ext: FALSE; Value: #$1B + '[28~'), { F11->Aide } + (ScanCode: #$58; Shift: []; Ext: FALSE; Value: #$1B + '[29~'), { F12->Excuter } + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ) + ); + +{ A-Series Telnet function keys (ordinary VT100 keys + specials) } + FKeys3 : TFuncKeysTable = ( + (ScanCode: #$48; Shift: []; Ext: TRUE ; Value: #$1B + '[A'), { UP } + (ScanCode: #$50; Shift: []; Ext: TRUE ; Value: #$1B + '[B'), { DOWN } + (ScanCode: #$4D; Shift: []; Ext: TRUE ; Value: #$1B + '[C'), { RIGHT } + (ScanCode: #$4B; Shift: []; Ext: TRUE ; Value: #$1B + '[D'), { LEFT } + (ScanCode: #$49; Shift: []; Ext: TRUE ; Value: #$1B + '-'), { PREV } + (ScanCode: #$51; Shift: []; Ext: TRUE ; Value: #$1B + '+'), { NEXT } + (ScanCode: #$47; Shift: []; Ext: TRUE ; Value: #$1B + 'H'), { HOME } + (ScanCode: #$47; Shift: [ssCtrl]; Ext: TRUE ; Value: #$1B + 'C'),{ HOME } + (ScanCode: #$4F; Shift: []; Ext: TRUE ; Value: #$1B + 'R'), { END } + (ScanCode: #$52; Shift: []; Ext: TRUE ; Value: #$1B + 'I'), { INSERT } + (ScanCode: #$53; Shift: []; Ext: TRUE ; Value: #$7F ), { DELETE } + (ScanCode: #$3B; Shift: []; Ext: FALSE; Value: #$1B + 'OP'), { F1->PF1 } + (ScanCode: #$3C; Shift: []; Ext: FALSE; Value: #$1B + 'OQ'), { F2->PF2 } + (ScanCode: #$3D; Shift: []; Ext: FALSE; Value: #$1B + 'OR'), { F3->PF3 } + (ScanCode: #$3E; Shift: []; Ext: FALSE; Value: #$1B + 'OS'), { F4->PF4 } + (ScanCode: #$43; Shift: []; Ext: FALSE; Value: #$1B + 'OP'), { F9 } + (ScanCode: #$44; Shift: []; Ext: FALSE; Value: ''), { F10 } + (ScanCode: #$57; Shift: []; Ext: FALSE; Value: #$1B + 'OQ'), { F11 } + (ScanCode: #$58; Shift: []; Ext: FALSE; Value: #$1B + 'OS'), { F12 } + (ScanCode: #$0F; Shift: []; Ext: FALSE; Value: #$1B + 'Z'), { RTAB } + (ScanCode: #$40; Shift: []; Ext: FALSE; Value: #$1B + 'K'), { F6 } + (ScanCode: #$53; Shift: [ssCtrl]; Ext: TRUE ; Value: #$1B + 'D'), { CDEL } + (ScanCode: #$52; Shift: [ssCtrl]; Ext: TRUE ; Value: #$1B + 'L'), { CINS } + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ), + (ScanCode: #$00; Shift: []; Ext: FALSE; Value: '' ) + ); + + { Ethernet to screen } + ibm_iso8859_1_G0 : TXlatTable = ( + #$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, { 00 - 07 } + #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, { 08 - 0F } + #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, { 10 - 17 } + #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, { 18 - 1F } + #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, { 20 - 27 } + #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, { 28 - 2F } + #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, { 30 - 37 } + #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, { 38 - 3F } + #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, { 40 - 47 } + #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, { 48 - 4F } + #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, { 50 - 57 } + #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, { 58 - 5F } + #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, { 60 - 67 } + #$68, #$69, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, { 68 - 6F } + #$70, #$71, #$72, #$73, #$74, #$75, #$76, #$77, { 70 - 77 } + #$78, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, { 78 - 7F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 80 - 87 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 88 - 8F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 90 - 97 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 98 - 9F } + #$B1, #$AD, #$9B, #$9C, #$0F, #$9D, #$B3, #$15, { A0 - A7 } + #$20, #$43, #$A6, #$AE, #$AA, #$C4, #$52, #$C4, { A8 - AF } + #$F8, #$F1, #$FD, #$20, #$27, #$E6, #$14, #$FA, { B0 - B7 } + #$2C, #$20, #$A7, #$AF, #$AC, #$AB, #$20, #$A8, { B8 - BF } + #$41, #$41, #$41, #$41, #$8E, #$8F, #$92, #$80, { C0 - C7 } + #$45, #$45, #$45, #$45, #$45, #$49, #$49, #$49, { C8 - CF } + #$44, #$A5, #$4F, #$4F, #$4F, #$4F, #$4F, #$78, { D0 - D7 } + #$ED, #$55, #$55, #$55, #$55, #$59, #$70, #$E1, { D8 - DF } + #$85, #$A0, #$83, #$61, #$84, #$86, #$91, #$87, { E0 - E7 } + #$8A, #$82, #$88, #$89, #$8D, #$A1, #$8C, #$49, { E8 - EF } + #$64, #$A4, #$95, #$A2, #$93, #$6F, #$94, #$F6, { F0 - F7 } + #$ED, #$97, #$A3, #$96, #$9A, #$79, #$70, #$98); { F8 - FF } + +{ Ethernet to screen } + ibm_iso8859_1_G1 : TXlatTable = ( + #$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, { 00 - 07 } + #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, { 08 - 0F } + #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, { 10 - 17 } + #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, { 18 - 1F } + #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, { 20 - 27 } + #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, { 28 - 2F } + #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, { 30 - 37 } + #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, { 38 - 3F } + #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, { 40 - 47 } + #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, { 48 - 4F } + #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, { 50 - 57 } + #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, { 58 - 5F } + #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, { 60 - 67 } + #$68, #$69, #$D9, #$BF, #$DA, #$C0, #$C5, #$6F, { 68 - 6F } + #$70, #$C4, #$72, #$73, #$C3, #$B4, #$C1, #$C2, { 70 - 77 } + #$B3, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, { 78 - 7F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 80 - 87 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 88 - 8F } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 90 - 97 } + #$20, #$20, #$20, #$20, #$20, #$20, #$20, #$20, { 98 - 9F } + #$B1, #$AD, #$9B, #$9C, #$0F, #$9D, #$B3, #$15, { A0 - A7 } + #$20, #$43, #$A6, #$AE, #$AA, #$C4, #$52, #$C4, { A8 - AF } + #$F8, #$F1, #$FD, #$20, #$27, #$E6, #$14, #$FA, { B0 - B7 } + #$2C, #$20, #$A7, #$AF, #$AC, #$AB, #$20, #$A8, { B8 - BF } + #$41, #$41, #$41, #$41, #$8E, #$8F, #$92, #$80, { C0 - C7 } + #$45, #$45, #$45, #$45, #$45, #$49, #$49, #$49, { C8 - CF } + #$44, #$A5, #$4F, #$4F, #$4F, #$4F, #$4F, #$78, { D0 - D7 } + #$ED, #$55, #$55, #$55, #$55, #$59, #$70, #$E1, { D8 - DF } + #$85, #$A0, #$83, #$61, #$84, #$86, #$91, #$87, { E0 - E7 } + #$8A, #$82, #$88, #$89, #$8D, #$A1, #$8C, #$49, { E8 - EF } + #$64, #$A4, #$95, #$A2, #$93, #$6F, #$94, #$F6, { F0 - F7 } + #$ED, #$97, #$A3, #$96, #$9A, #$79, #$70, #$98); { F8 - FF } + +{ Keyboard to Ethernet } + Output : TXlatTable = ( + #$00, #$01, #$02, #$03, #$04, #$05, #$06, #$07, { 00 - 07 } + #$08, #$09, #$0A, #$0B, #$0C, #$0D, #$0E, #$0F, { 08 - 0F } + #$10, #$11, #$12, #$13, #$14, #$15, #$16, #$17, { 10 - 17 } + #$18, #$19, #$1A, #$1B, #$1C, #$1D, #$1E, #$1F, { 18 - 1F } + #$20, #$21, #$22, #$23, #$24, #$25, #$26, #$27, { 20 - 27 } + #$28, #$29, #$2A, #$2B, #$2C, #$2D, #$2E, #$2F, { 28 - 2F } + #$30, #$31, #$32, #$33, #$34, #$35, #$36, #$37, { 30 - 37 } + #$38, #$39, #$3A, #$3B, #$3C, #$3D, #$3E, #$3F, { 38 - 3F } + #$40, #$41, #$42, #$43, #$44, #$45, #$46, #$47, { 40 - 47 } + #$48, #$49, #$4A, #$4B, #$4C, #$4D, #$4E, #$4F, { 48 - 4F } + #$50, #$51, #$52, #$53, #$54, #$55, #$56, #$57, { 50 - 57 } + #$58, #$59, #$5A, #$5B, #$5C, #$5D, #$5E, #$5F, { 58 - 5F } + #$60, #$61, #$62, #$63, #$64, #$65, #$66, #$67, { 60 - 67 } + #$68, #$69, #$6A, #$6B, #$6C, #$6D, #$6E, #$6F, { 68 - 6F } + #$70, #$71, #$72, #$73, #$74, #$75, #$76, #$77, { 70 - 77 } + #$78, #$79, #$7A, #$7B, #$7C, #$7D, #$7E, #$7F, { 78 - 7F } + #$C7, #$FC, #$E9, #$E2, #$E4, #$E0, #$E5, #$E7, { 80 - 87 } + #$EA, #$EB, #$E8, #$EF, #$EE, #$EC, #$C4, #$C5, { 88 - 8F } + #$C9, #$E6, #$C6, #$F4, #$F6, #$F2, #$FB, #$F9, { 90 - 97 } + #$FF, #$F6, #$FC, #$A2, #$A3, #$A5, #$DE, #$20, { 98 - 9F } + #$E1, #$ED, #$F3, #$FA, #$F1, #$D1, #$AA, #$BA, { A0 - A7 } + #$BF, #$20, #$AC, #$BD, #$BC, #$A1, #$AB, #$BB, { A8 - AF } + #$A0, #$A0, #$A0, #$A6, #$A6, #$A6, #$A6, #$AD, { B0 - B7 } + #$2B, #$A6, #$A6, #$2B, #$2B, #$2B, #$2B, #$2B, { B8 - BF } + #$2B, #$AD, #$AD, #$AD, #$A6, #$AD, #$2B, #$A6, { C0 - C7 } + #$2B, #$2B, #$AD, #$AD, #$A6, #$AD, #$2B, #$AD, { C8 - CF } + #$AD, #$AD, #$AD, #$2B, #$2B, #$2B, #$2B, #$2B, { D0 - D7 } + #$2B, #$2B, #$2B, #$A0, #$A0, #$A0, #$A0, #$A0, { D8 - DF } + #$20, #$20, #$20, #$AD, #$20, #$20, #$B5, #$20, { E0 - E7 } + #$20, #$20, #$20, #$20, #$20, #$F8, #$20, #$20, { E8 - EF } + #$A0, #$B1, #$20, #$20, #$20, #$20, #$F7, #$20, { F0 - F7 } + #$B0, #$B0, #$B0, #$20, #$20, #$B2, #$A0, #$20); { F8 - FF } + +procedure Register; +procedure FKeysToFile(var FKeys : TFuncKeysTable; FName : String); +procedure FileToFKeys(var FKeys : TFuncKeysTable; FName : String); + + +implementation +{$DEFINE Debug} { Add or remove minus sign before dollar sign to } + { generate code for debug message output } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TEmulVT]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function ShiftStateToString(var State : TShiftState) : String; +begin + Result := ''; + if ssShift in State then + Result := Result + 'ssShift '; + if ssAlt in State then + Result := Result + 'ssAlt '; + if ssCtrl in State then + Result := Result + 'ssCtrl '; + if ssLeft in State then + Result := Result + 'ssLeft '; + if ssRight in State then + Result := Result + 'ssRight '; + if ssMiddle in State then + Result := Result + 'ssMiddle '; + if ssDouble in State then + Result := Result + 'ssDouble '; + if Result = '' then + Result := 'ssNormal'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function StringToShiftState(var S : String) : TShiftState; +begin + Result := []; + if Pos('ssShift', S) <> 0 then + Result := Result + [ssShift]; + if Pos('ssAlt', S) <> 0 then + Result := Result + [ssAlt]; + if Pos('ssCtrl', S) <> 0 then + Result := Result + [ssCtrl]; + if Pos('ssLeft', S) <> 0 then + Result := Result + [ssLeft]; + if Pos('ssRight', S) <> 0 then + Result := Result + [ssRight]; + if Pos('ssMiddle', S) <> 0 then + Result := Result + [ssMiddle]; + if Pos('ssDouble', S) <> 0 then + Result := Result + [ssDouble]; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function xdigit(Ch : char) : integer; +begin + if ch in ['0'..'9'] then + Result := Ord(ch) - ord('0') + else if ch in ['A'..'Z'] then + Result := Ord(ch) - Ord('A') + 10 + else if ch in ['a'..'z'] then + Result := Ord(ch) - Ord('a') + 10 + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function xdigit2(S : PChar) : integer; +begin + Result := 16 * xdigit(S[0]) + xdigit(S[1]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function FuncKeyValueToString(var S : TFuncKeyValue) : String; +var + I : Integer; +begin + Result := ''; + for I := 1 to Length(S) do begin + if (Ord(S[I]) < 32) or (Ord(S[I]) >= 127) or + (S[I] = '''') or (S[I] = '\') then + Result := Result + '\x' + IntToHex(Ord(S[I]), 2) + else + Result := Result + S[I]; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function StringToFuncKeyValue(var S : String) : TFuncKeyValue; +var + I : Integer; +begin + Result := ''; + I := 1; + while I <= Length(S) do begin + if (S[I] = '\') and + ((I + 3) <= Length(S)) and + (S[I + 1] = 'x') then begin + Result := Result + chr(xdigit2(@S[I + 2])); + I := I + 3; + end + else + Result := Result + S[I]; + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure FKeysToFile(var FKeys : TFuncKeysTable; FName : String); +var + I : Integer; + F : TextFile; +begin + AssignFile(F, FName); + Rewrite(F); + for I := Low(FKeys) to High(FKeys) do begin + with FKeys[I] do begin + if ScanCode <> chr(0) then + WriteLn(F, IntToHex(Ord(ScanCode), 2), ', ', + ShiftStateToString(Shift), ', ', + Ext, ', ''', + FuncKeyValueToString(Value), ''''); + end; + end; + CloseFile(F); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetToken(var S : String; var I : Integer; Delim : Char) : String; +begin + Result := ''; + while (I <= Length(S)) and (S[I] = ' ') do + Inc(I); + while (I <= Length(S)) and (S[I] <> Delim) do begin + Result := Result + S[I]; + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure FileToFKeys(var FKeys : TFuncKeysTable; FName : String); +var + I, J : Integer; + F : TextFile; + S, T : String; + sc : Integer; +begin + AssignFile(F, FName); + {$I-} + Reset(F); + if IOResult <> 0 then begin + { File do not exist, create default one } + FKeysToFile(FKeys, FName); + Exit; + end; + + for I := Low(FKeys) to High(FKeys) do begin + with FKeys[I] do begin + ScanCode := chr(0); + Shift := []; + Ext := FALSE; + Value := ''; + if not Eof(F) then begin + { 71, ssNormal, TRUE, '\x1B[H' } + ReadLn(F, S); + J := 1; + T := GetToken(S, J, ','); + if (Length(T) > 0) and (T[1] <> ';') then begin + sc := xdigit2(@T[1]); + if sc <> 0 then begin + ScanCode := chr(sc); + Inc(J); + T := GetToken(S, J, ','); + Shift := StringToShiftState(T); + Inc(J); + T := GetToken(S, J, ','); + Ext := UpperCase(T) = 'TRUE'; + Inc(J); + T := GetToken(S, J, ''''); + Inc(J); + T := GetToken(S, J, ''''); + Value := StringToFuncKeyValue(T); + end; + end; + end; + end; + end; + CloseFile(F); +{$I+} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DebugString(Msg : String); +const + Cnt : Integer = 0; +var + Buf : String[20]; +begin +{$IFDEF Debug} + Cnt := Cnt + 1; + Buf := IntToHex(Cnt, 4) + ' ' + #0; + OutputDebugString(@Buf[1]); + +{$IFNDEF WIN32} + if Length(Msg) < High(Msg) then + Msg[Length(Msg) + 1] := #0; +{$ENDIF} + + OutputDebugString(@Msg[1]); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} +procedure myShowCaret(hndl : THandle); +begin + DebugString('ShowCaret' + #13 + #10); + ShowCaret(hndl); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} +procedure myHideCaret(hndl : THandle); +begin + DebugString('HideCaret' + #13 + #10); + HideCaret(hndl); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} +procedure DrawCtl3DBorder(Canvas : TCanvas; Bounds : TRect); +begin + with Bounds, Canvas do + begin + Pen.Color := clBtnShadow; + MoveTo(Left, Bottom - 1); + LineTo(Left, Top); + LineTo(Right, Top); + + Pen.Color := clBtnHighlight; + MoveTo(Right - 1, Top + 1); + LineTo(Right - 1, Bottom - 1); + LineTo(Left, Bottom - 1); + + Pen.Color := clBtnText; + MoveTo(Left + 1, Bottom - 2); + LineTo(Left + 1, Top + 1); + LineTo(Right - 1, Top + 1); + MoveTo(Right - 2, Top + 1); + LineTo(Right - 2, Bottom - 2); + LineTo(Left + 1, Bottom - 2); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure MoveTo(DC : HDC; x, y : Integer); +begin +{$IFDEF WIN32} + Winprocs.MoveToEx(DC, x, y, nil); +{$ELSE} + Winprocs.MoveTo(DC, x, y); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Ctl3DBorder(DC : HDC; Bounds : TRect); +var + OldPen : THandle; +begin + with Bounds do + begin + OldPen := SelectObject(DC, GetStockObject(BLACK_PEN)); + MoveTo(DC, Left, Bottom - 1); + WinProcs.LineTo(DC, Left, Top); + WinProcs.LineTo(DC, Right, Top); + + SelectObject(DC, GetStockObject(WHITE_PEN)); + MoveTo(DC, Right - 1, Top + 1); + WinProcs.LineTo(DC, Right - 1, Bottom - 1); + WinProcs.LineTo(DC, Left, Bottom - 1); + + SelectObject(DC, GetStockObject(BLACK_PEN)); + MoveTo(DC, Left + 1, Bottom - 2); + WinProcs.LineTo(DC, Left + 1, Top + 1); + WinProcs.LineTo(DC, Right - 1, Top + 1); + MoveTo(DC, Right - 2, Top + 1); + WinProcs.LineTo(DC, Right - 2, Bottom - 2); + WinProcs.LineTo(DC, Left + 1, Bottom - 2); + + SelectObject(DC, OldPen); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DrawBorder(Canvas : TCanvas; Bounds : TRect; + ULColor, LRColor : TColor); +begin + with Bounds, Canvas do + begin + Pen.Color := ULColor; + MoveTo(Left, Bottom - 1 ); + LineTo(Left, Top ); + LineTo(Right - 1, Top ); + + Pen.Color := LRColor; + LineTo(Right - 1, Bottom - 1 ); + LineTo(Left, Bottom - 1 ); + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TLine.Create; +begin + inherited Create; + FillChar(Txt, SizeOf(Txt), ' '); + FillChar(Att, SizeOf(Att), Chr(F_WHITE)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TLine.Clear(Attr : Byte); +begin + FillChar(Txt, SizeOF(Txt), ' '); + FillChar(Att, SizeOf(Att), Attr); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TScreen.Create; +var + nRow : Integer; +begin + inherited Create; + for nRow := 0 to MAX_ROW do + FLines[nRow] := TLine.Create; + FRowCount := 25; + FColCount := 80; + FRowSaved := -1; + FColSaved := -1; + FScrollRowTop := 0; + FScrollRowBottom := FRowCount - 1; + FAttribute := F_WHITE; + InvClear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TScreen.Destroy; +var + nRow : Integer; +begin + for nRow := 0 to MAX_ROW do + FLines[nRow].Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ScrollUp; +var + Temp : TLine; + Row : Integer; +begin + Temp := FLines[FScrollRowTop]; + for Row := FScrollRowTop + 1 to FScrollRowBottom do + FLines[Row - 1] := FLines[Row]; + FLines[FScrollRowBottom] := Temp; + Temp.Clear(F_WHITE {FAttribute}); + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ScrollDown; +var + Temp : TLine; + Row : Integer; +begin + Temp := FLines[FScrollRowBottom]; + for Row := FScrollRowBottom DownTo FScrollRowTop + 1 do + FLines[Row] := FLines[Row - 1]; + FLines[FScrollRowTop] := Temp; + Temp.Clear(F_WHITE {FAttribute}); + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorDown; +begin + Inc(FRow); + if FRow > FScrollRowBottom then begin + FRow := FScrollRowBottom; + ScrollUp; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorUp; +begin + Dec(FRow); + if FRow < 0 then begin + Inc(FRow); + ScrollDown; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorRight; +begin + Inc(FCol); + if FCol >= FColCount then begin + FCol := 0; + CursorDown; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CursorLeft; +begin + Dec(FCol); + if FCol < 0 then begin + FCol := FColCount - 1; + CursorUp; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.CarriageReturn; +begin + FCol := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TScreen.GetEscapeParam(From : Integer; var Value : Integer) : Integer; +begin + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] = ' ') do + From := From + 1; + + Value := 0; + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] in ['0'..'9']) do begin + Value := Value * 10 + Ord(FEscBuffer[From]) - Ord('0'); + From := From + 1; + end; + + Result := From; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.UnimplementedEscape(EscCmd : Char); +{var + Buf : String;} +begin + DebugString('Unimplemented Escape Sequence: ' + FEscBuffer + EscCmd + #13 + #10); +{ Buf := FEscBuffer + EscCmd + #0; + MessageBox(0, @Buf[1], 'Unimplemented Escape Sequence', MB_OK); } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.InvalidEscape(EscCmd : Char); +{var + Buf : String;} +begin + DebugString('Invalid Escape Sequence: ' + FEscBuffer + EscCmd + #13 + #10); +{ Buf := FEscBuffer + EscCmd + #0; + MessageBox(0, @Buf[1], 'Invalid Escape Sequence', MB_OK); } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessESC_D; { Index } +begin + UnimplementedEscape('D'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Move cursor Up, scroll down if necessary } +procedure TScreen.ProcessESC_M; { Reverse index } +begin + Dec(FRow); + if FRow < FScrollRowTop then begin + FRow := FScrollRowTop; + ScrollDown; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessESC_E; { Next line } +begin + UnimplementedEscape('E'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_u; { Restore Cursor } +begin + UnimplementedEscape('u'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ IBM character set operation (not part of the ANSI standard) } +{ [0I => Set IBM character set } +{ [1;nnnI => Literal mode for nnn next characters } +{ [2;onoffI => Switch carbon mode on (1) or off (0) } +{ [3;ch;cl;sh;slI => Receive carbon mode keyboard code } +{ [4I => Select ANSI character set } +procedure TScreen.ProcessCSI_I; +var + From, mode, nnn : Integer; + ch, cl, sh, sl : Integer; +begin + From := GetEscapeParam(2, Mode); + + case Mode of + 0: begin { Select IBM character set } + FNoXlat := TRUE; + end; + 1: begin { Set literal mode for next N characters } + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, FCntLiteral) + else + FCntLiteral := 1; + end; + 2: begin { Switch carbon mode on or off } + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, nnn) + else + nnn := 0; + FCarbonMode := (nnn <> 0); + end; + 3: begin { Receive carbon mode key code } + ch := 0; cl := 0; sh := 0; sl := 0; + if FEscBuffer[From] = ';' then begin + From := GetEscapeParam(From + 1, cl); + if FEscBuffer[From] = ';' then begin + From := GetEscapeParam(From + 1, ch); + if FEscBuffer[From] = ';' then begin + From := GetEscapeParam(From + 1, sl); + if FEscBuffer[From] = ';' then begin + GetEscapeParam(From + 1, sh); + end; + end; + end; + end; + DebugString('Special key ' + + IntToHex(ch, 2) + IntToHex(cl, 2) + ' ' + + IntToHex(sh, 2) + IntToHex(sl, 2)); + end; + 4: begin { Select ANSI character set } + FNoXlat := FALSE; + end; + else + UnimplementedEscape('I'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.BackSpace; +begin + if FCol > 0 then + Dec(FCol); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ClearScreen; +var + Row : Integer; +begin + for Row := 0 to FRowCount do + FLines[Row].Clear(FAttribute); + FRow := 0; + FCol := 0; + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.InvClear; +begin + with FInvRect do begin + Top := 9999; + Left := 9999; + Right := -1; + Bottom := -1; + end; + FAllInvalid := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.InvRect(nRow, nCol : Integer); +begin + if not FAllInvalid then begin + if FInvRect.Top > nRow then + FInvRect.Top := nRow; + if FInvRect.Bottom < nRow then + FInvRect.Bottom := nRow; + if FInvRect.Left > nCol then + FInvRect.Left := nCol; + if FInvRect.Right < nCol then + FInvRect.Right := nCol; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.Eol; +begin + with FLines[FRow] do begin + FillChar(Txt[FCol], FColCount - FCol, ' '); + FillChar(Att[FCol], (FColCount - FCol) * SizeOf(Att[FCol]), FAttribute); + end; + InvRect(Frow, FCol); + InvRect(Frow, FColCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.Eop; +var + Row : Integer; +begin + Eol; + for Row := FRow + 1 to FRowCount do + FLines[Row].Clear(FAttribute); + if FRow = 0 then + FAllInvalid := TRUE + else begin + InvRect(FRow, 0); + InvRect(FRowCount, FColCount); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_J; { Clear the screen } +var + Mode : Integer; + Row : Integer; +begin + GetEscapeParam(2, Mode); + case Mode of + 0: begin { Cursor to end of screen } + FAttribute := F_WHITE; + Eop; + end; + 1: begin { Start of screen to cursor } + for Row := 0 to FRow do + FLines[Row].Clear(FAttribute); + InvRect(0, 0); + InvRect(FRow, FColCount); + end; + 2: begin { Entire screen } + ClearScreen; + end; + else + InvalidEscape('J'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_K; { Erase to End of Line } +begin + Eol; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_L; { Insert Line } +var + nLine : Integer; + nRow : Integer; + Temp : TLine; +begin + FCol := 0; + GetEscapeParam(2, nLine); + if nLine = 0 then + nLine := 1; + + if (FRow + nLine) > FScrollRowBottom then begin + for nRow := FRow to FScrollRowBottom do + FLines[nRow].Clear(FAttribute); + Exit; + end; + + for nRow := FScrollRowBottom downto FRow + nLine do begin + Temp := FLines[nRow]; + FLines[nRow] := FLines[nRow - nLine]; + FLines[nRow - nLine] := Temp; + end; + + for nRow := FRow to FRow + nLine - 1 do + FLines[nRow].Clear(FAttribute); + + FAllInvalid := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_M; { Delete Line } +var + nLine : Integer; + nRow : Integer; + Temp : TLine; +begin + FAllInvalid := TRUE; + FCol := 0; + GetEscapeParam(2, nLine); + if nLine = 0 then + nLine := 1; + + if (FRow + nLine) > FScrollRowBottom then begin + for nRow := FRow to FScrollRowBottom do + FLines[nRow].Clear(FAttribute); + Exit; + end; + + for nRow := FRow to FRow + nLine - 1 do + FLines[nRow].Clear(FAttribute); + for nRow := FRow to FScrollRowBottom - nLine do begin + Temp := FLines[nRow]; + FLines[nRow] := FLines[nRow + nLine]; + FLines[nRow + nLine] := Temp; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_m_lc; { Select Attributes } +var + From, n : Integer; +begin + if FEscBuffer[1] <> '[' then + Exit; + + if Length(FEscBuffer) < 2 then begin + FAttribute := F_WHITE; + FReverseVideo := FALSE; + Exit; + end; + + From := 2; + while From <= Length(FEscBuffer) do begin + if FEscBuffer[From] in [' ', '[', ';'] then + Inc(From) + else begin + From := GetEscapeParam(From, n); + case n of + 0: begin { All attributes off } + FAttribute := F_WHITE; + FReverseVideo := FALSE; + FUnderLine := FALSE; + end; + 1: begin { High intensity } + FAttribute := FAttribute or F_INTENSE; + end; + 4: begin { Underline } + FUnderLine := TRUE; + end; + 5: begin { Blinking } + FAttribute := FAttribute or B_BLINK; + end; + 7: begin { Reverse video } + FReverseVideo := TRUE; + end; + 8: begin { Secret } + FAttribute := 0; + end; + 10: begin { Don't force high bit } + FForceHighBit := FALSE; + end; + 12: begin { Force high bit on } + FForceHighBit := TRUE; + end; + 22: begin { Normal intensity } + FAttribute := FAttribute and (not F_INTENSE); + end; + 27: begin { Normal characters } + FAttribute := F_WHITE; + FReverseVideo := FALSE; + end; + 30, 31, 32, 33, 34, 35, 36, 37: + begin { Foreground color } + FAttribute := (n mod 10) or (FAttribute and $F8); + end; + 40, 41, 42, 43, 44, 45, 46, 47: + begin { Background color } + FAttribute := ((n mod 10) shl 4) or (FAttribute and $8F); + end; + else + InvalidEscape('m'); + end; + end; + end; + if FReverseVideo then begin + FAttribute := ((FAttribute and 7) shl 4) or + ((FAttribute shr 4) and 7) or + (FAttribute and $88); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_n_lc; { Cursor position report } +begin + UnimplementedEscape('n'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_at; { Insert character } +var + nChar : Integer; + nCnt : Integer; + nCol : Integer; + Line : TLine; +begin + GetEscapeParam(2, nChar); + if nChar = 0 then + nChar := 1; + + nCnt := FColCount - FCol - nChar; + if nCnt <= 0 then begin + Eol; + Exit; + end; + + Line := FLines[FRow]; + for nCol := FColCount - 1 downto FCol + nChar do begin + Line.Txt[nCol] := Line.Txt[nCol - nChar]; + Line.Att[nCol] := Line.Att[nCol - nChar]; + InvRect(Frow, nCol); + end; + + for nCol := FCol to FCol + nChar - 1 do begin + Line.Txt[nCol] := ' '; + Line.Att[nCol] := FAttribute; + InvRect(Frow, nCol); + end; + +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_r_lc; { Scrolling margins } +var + From, Top, Bottom : Integer; +begin + From := GetEscapeParam(2, Top); + if Top = 0 then begin { Default = full screen } + FScrollRowTop := 0; + FScrollRowBottom := FRowCount - 1; + end + else begin + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] = ' ') do + From := From + 1; + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, Bottom) + else + Bottom := 1; + + FScrollRowTop := Top - 1; + FScrollRowBottom := Bottom - 1; + + if (FScrollRowBottom <= FScrollRowTop) or + (FScrollRowTop < 0) or + (FScrollRowBottom >= FRowCount) then begin + FScrollRowTop := 0; + FScrollRowBottom := FRowCount - 1; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_s_lc; { Save cursor location } +begin + ProcessCSI_7; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_u_lc; { Restore cursor location } +begin + ProcessCSI_8; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_7; { Save cursor location } +begin + FRowSaved := FRow; + FColSaved := FCol; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_8; { Restore cursor location } +begin + if FRowSaved = -1 then + GotoXY(0, 0) + else + GotoXY(FColSaved, FRowSaved); + FRowSaved := -1; + FColSaved := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_H; { Set Cursor Position } +var + From, Row, Col : Integer; +begin + From := GetEscapeParam(2, Row); + while (From <= Length(FEscBuffer)) and (FEscBuffer[From] = ' ') do + From := From + 1; + if FEscBuffer[From] = ';' then + GetEscapeParam(From + 1, Col) + else + Col := 1; + + GotoXY(Col - 1, Row - 1); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_h_lc; { Terminal mode set } +var + Priv : Boolean; + Mode : Integer; +begin + if FEscBuffer[1] <> '[' then begin + UnimplementedEscape('h'); + Exit; + end; + + Priv := (FEscBuffer[2] = '?'); + if not Priv then begin + UnimplementedEscape('h'); + Exit; + end; + + GetEscapeParam(3, Mode); + case Mode of + 1 : { ANSI cursor keys } + FCKeyMode := TRUE; + 4 : { Smooth scroll OFF } + { Ignore }; + 7: { Auto-wrap OFF } + FAutoWrap := TRUE; + 25: { Cursor visible } + begin + FCursorOff := FALSE; + if Assigned(FOnCursorVisible) then + FOnCursorVisible(Self); + end; + else + UnimplementedEscape('h'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_l_lc; { Terminal mode reset } +var + Priv : Boolean; + Mode : Integer; +begin + if FEscBuffer[1] <> '[' then begin + UnimplementedEscape('l'); + Exit; + end; + + Priv := (FEscBuffer[2] = '?'); + if not Priv then begin + UnimplementedEscape('l'); + Exit; + end; + + GetEscapeParam(3, Mode); + case Mode of + 1 : { ANSI cursor keys } + FCKeyMode := FALSE; + 4 : { Smooth scroll OFF } + { Ignore }; + 7: { Auto-wrap OFF } + FAutoWrap := FALSE; + 25: { Cursor invisible } + begin + FCursorOff := TRUE; + if Assigned(FOnCursorVisible) then + FOnCursorVisible(Self); + end; + else + UnimplementedEscape('l'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_A; { Cursor Up } +var + Row : Integer; +begin + GetEscapeParam(2, Row); + if Row <= 0 then + Row := 1; + FRow := FRow - Row; + if FRow < 0 then + FRow := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_B; { Cursor Down } +var + Row : Integer; +begin + GetEscapeParam(2, Row); + if Row <= 0 then + Row := 1; + FRow := FRow + Row; + if FRow >= FRowCount then + FRow := FRowCount - 1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_C; { Cursor Right } +var + Col : Integer; +begin + GetEscapeParam(2, Col); + if Col <= 0 then + Col := 1; + FCol := FCol + Col; + if FCol >= FColCount then begin + if FAutoWrap then begin + FCol := FCol - FColCount; + Inc(FRow); + if FRow >= FRowCount then + FRow := FRowCount - 1; + end + else + FCol := FColCount - 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_D; { Cursor Left } +var + Col : Integer; +begin + GetEscapeParam(2, Col); + if Col <= 0 then + Col := 1; + FCol := FCol - Col; + if FCol < 0 then + FCol := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_P; { Delete Character } +var + Count : Integer; + nCol : Integer; +begin + GetEscapeParam(2, Count); + if Count <= 0 then + Count := 1; + with FLines[FRow] do begin + for nCol := Fcol to FColCount - Count - 1 do begin + Txt[nCol] := Txt[nCol + Count]; + Att[nCol] := Att[nCol + Count]; + end; + for nCol := FcolCount - Count - 1 to FColCount - 1 do begin + Txt[nCol] := ' '; + Att[nCol] := F_WHITE; + end; + end; + InvRect(Frow, FCol); + InvRect(Frow, FColCount); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_S; { Scroll up } +begin + ScrollUp; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessCSI_T; { Scroll down } +begin + UnimplementedEscape('T'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G0(EscCmd : Char); { G0 character set } +begin + case EscCmd of + '0': begin + FCharSetG0 := EscCmd; + FXlatInputTable := @ibm_iso8859_1_G1; + FXlatOutputTable := @ibm_iso8859_1_G1; + FNoXlat := FNoXlatInitial; +{ FNoXlat := FALSE;} + end; + 'B': begin + FCharSetG0 := EscCmd; + FXlatInputTable := @ibm_iso8859_1_G0; + FXlatOutputTable := @ibm_iso8859_1_G0; + FNoXlat := FNoXlatInitial; + end; + else + InvalidEscape(EscCmd); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G1(EscCmd : Char); { G1 character set } +begin + FCharSetG1 := EscCmd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G2(EscCmd : Char); { G2 character set } +begin + FCharSetG2 := EscCmd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.process_charset_G3(EscCmd : Char); { G2 character set } +begin + FCharSetG3 := EscCmd; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.ProcessEscape(EscCmd : Char); +begin + if Length(FEscBuffer) = 0 then begin + case EscCmd of + 'D': ProcessESC_D; { Index } + 'M': ProcessESC_M; { Reverse index } + 'E': ProcessESC_E; { Next line } + 'H': ; { Tabulation set } + '7': ProcessCSI_7; { Save cursor } + '8': ProcessCSI_8; { Restore Cursor } + '=': ; { VT52 } { Enter Alternate keypad } + '>': ; { VT52 } { Exit Alternate keypad } + '<': ; { VT52 } { Enter ANSI mode } + else + InvalidEscape(EscCmd); + WriteLiteralChar(EscCmd); + end; + + Exit; + end; + + case FEscBuffer[1] of + ' ': begin + case EscCmd of + 'F': ; + else + InvalidEscape(EscCmd); + end; + end; + '[': begin + case EscCmd of + 'I': ProcessCSI_I; { Select IBM char set } + { Extension F. Piette !! } + 'J': ProcessCSI_J; { Clear the screen } + 'K': ProcessCSI_K; { Erase to End of Line } + 'L': ProcessCSI_L; { Insert Line } + 'M': ProcessCSI_M; { Delete Line } + 'm': ProcessCSI_m_lc; { Select Attributes } + 'n': ProcessCSI_n_lc; { Cursor position report } + '@': ProcessCSI_at; { Insert character } + 'r': ProcessCSI_r_lc; { Set Top and Bottom marg } + 's': ProcessCSI_s_lc; { Save cursor location } + 'u': ProcessCSI_u_lc; { Restore cursor location } + 'H': ProcessCSI_H; { Set Cursor Position } + 'f': ProcessCSI_H; { Set Cursor Position } + 'g': ; { Tabulation Clear } + 'h': ProcessCSI_h_lc; { Terminal mode set } + 'l': ProcessCSI_l_lc; { Terminal mode reset } + 'A': ProcessCSI_A; { Cursor Up } + 'B': ProcessCSI_B; { Cursor Down } + 'C': ProcessCSI_C; { Cursor Right } + 'D': ProcessCSI_D; { Cursor Left } + 'P': ProcessCSI_P; { Delete Character } + 'S': ProcessCSI_S; { Scroll up } + 'T': ProcessCSI_T; { Scroll down } + '>': ; { } + else + InvalidEscape(EscCmd); + end; + end; + '(': process_charset_G0(EscCmd); { G0 character set } + ')': process_charset_G1(EscCmd); { G1 character set } + '*': process_charset_G2(EscCmd); { G2 character set } + '+': process_charset_G3(EscCmd); { G3 character set } + else + InvalidEscape(EscCmd); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.WriteLiteralChar(Ch : Char); +var + Line : TLine; +begin + if FCol >= FColCount then begin + if FAutoWrap then begin + FCol := 0; + Inc(FRow); + if FRow >= FRowCount then begin + Dec(FRow); + ScrollUp; + end; + end; + end; + + if FForceHighBit then + Ch := Chr(ord(ch) or $80); + + Line := FLines[FRow]; + Line.Txt[FCol] := Ch; + Line.Att[FCol] := FAttribute; + InvRect(Frow, FCol); + + if FCol < High(Line.Txt) then + Inc(FCol); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.SetAttr(Att : Char); +begin + { Not implemented } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Write a single character at current cursor location. } +{ Update cursor position. } +procedure TScreen.WriteChar(Ch : Char); +var + bProcess : Boolean; +begin + if FCntLiteral > 0 then begin + if (FCntLiteral and 1) <> 0 then + WriteLiteralChar(Ch) + else + SetAttr(Ch); + Dec(FCntLiteral); + Exit; + end; + + if FNoXlat then + Ch := FXlatInputTable^[ord(Ch)]; + + if FEscFLag then begin + bProcess := FALSE; + if (Length(FEscBuffer) = 0) and + (Ch in ['D', 'M', 'E', 'H', '7', '8', '=', '>', '<']) then + bProcess := TRUE + else if (Length(FEscBuffer) = 1) and + (FEscBuffer[1] in ['(', ')', '*', '+']) then + bProcess := TRUE + else if (Ch in ['0'..'9', ';', '?', ' ']) or + ((Length(FEscBuffer) = 0) and + (ch in ['[', '(', ')', '*', '+'])) then begin + FEscBuffer := FEscBuffer + Ch; + if Length(FEscBuffer) >= High(FEscBuffer) then begin + MessageBeep(MB_ICONASTERISK); + FEscBuffer := ''; + FEscFlag := FALSE; + end; + end + else + bProcess := TRUE; + + if bProcess then begin + ProcessEscape(Ch); + FEscBuffer := ''; + FEscFlag := FALSE; + end; + + Exit; + end; + + case Ch of + #0: ; + #7: MessageBeep(MB_ICONASTERISK); + #8: BackSpace; + #9: begin + repeat + Inc(FCol); + until (FCol Mod 8) = 0; + end; + #10: begin + CursorDown; + if FAutoCR then + CarriageReturn; + end; + #13: begin + CarriageReturn; + if FAutoLF then + CursorDown; + end; + #14: begin + FXlatInputTable := @ibm_iso8859_1_G1; + FXlatOutputTable := @ibm_iso8859_1_G1; + end; + #15: begin + FXlatInputTable := @ibm_iso8859_1_G0; + FXlatOutputTable := @ibm_iso8859_1_G0; + end; + #27: begin + FEscBuffer := ''; + FEscFlag := TRUE; + end; + else + WriteLiteralChar(Ch); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Write characters at current cursor location. Update cursor position. } +procedure TScreen.WriteStr(Str : String); +var + I : Integer; +begin + for I := 1 to Length(Str) do + WriteChar(Str[I]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Read characters from the cursor to end of line } +function TScreen.ReadStr : String; +var + Line : TLine; + Len : Integer; +begin + Line := FLines[FRow]; + Len := FColCount - FCol; + if Len <= 0 then + Result := '' + else begin + SetLength(Result, Len); + Move(Line.Txt[FCol], Result[1], Len); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TScreen.GotoXY(X, Y : Integer); +begin + if X < 0 then + FCol := 0 + else if X >= FColCount then + FCol := FColCount - 1 + else + FCol := X; + + if Y < 0 then + FRow := 0 + else if Y >= FRowCount then + FRow := FRowCount - 1 + else + FRow := Y; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCaret; +begin + SetCaretPos(FScreen.FCol * FCharWidth + LeftMargin, + (FScreen.FRow - FTopLine) * FLineHeight + TopMargin); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.Clear; +begin + FScreen.ClearScreen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCursor(Row, Col : Integer); +begin + FScreen.GotoXY(Col - 1, Row - 1); +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WriteChar(Ch : Char); +begin + if FCaretCreated and FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + if FLog then + Write(FFileHandle, Ch); + FScreen.WriteChar(ch); + if FAutoRepaint then + UpdateScreen; +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WriteStr(Str : String); +var + I : Integer; +begin + if FCaretCreated and FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + for I := 1 to Length(Str) do begin + if FLog then + Write(FFileHandle, Str[I]); + FScreen.WriteChar(Str[I]); + end; + if FAutoRepaint then + UpdateScreen; +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WriteBuffer(Buffer : Pointer; Len : Integer); +var + I : Integer; +begin + if FCaretCreated and FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + for I := 0 to Len - 1 do begin + if FLog then + Write(FFileHandle, PChar(Buffer)[I]); + FScreen.WriteChar(PChar(Buffer)[I]); + end; + if FAutoRepaint then + UpdateScreen; +{ SetCaret; } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.ReadStr : String; +begin + Result := FScreen.ReadStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomEmulVT.Create(AOwner: TComponent); +type + TMyLogPalette = record + palVersion: Word; + palNumEntries: Word; + palPalEntry: array[0..NumPaletteEntries - 1] of TPaletteEntry; + end; + TPLogPalette = ^TLogPalette; +var + plgpl : ^TMyLogPalette; + I : Integer; +begin + inherited Create(AOwner); + ControlStyle := ControlStyle + [csOpaque]; + + New(plgpl); + plgpl^.palNumEntries := High(plgpl^.palPalEntry) + 1; + plgpl^.palVersion := $300; + + FPaletteEntries[0].peRed := 0; { Black } + FPaletteEntries[0].peGreen := 0; + FPaletteEntries[0].peBlue := 0; + FPaletteEntries[1].peRed := 168; { Red } + FPaletteEntries[1].peGreen := 0; + FPaletteEntries[1].peBlue := 0; + FPaletteEntries[2].peRed := 0; { Green } + FPaletteEntries[2].peGreen := 168; + FPaletteEntries[2].peBlue := 0; + FPaletteEntries[3].peRed := 168; { Yellow } + FPaletteEntries[3].peGreen := 168; + FPaletteEntries[3].peBlue := 0; + FPaletteEntries[4].peRed := 0; { Dark Blue } + FPaletteEntries[4].peGreen := 0; + FPaletteEntries[4].peBlue := 168; + FPaletteEntries[5].peRed := 168; { Magenta } + FPaletteEntries[5].peGreen := 0; + FPaletteEntries[5].peBlue := 168; + FPaletteEntries[6].peRed := 0; { Cyan } + FPaletteEntries[6].peGreen := 112; + FPaletteEntries[6].peBlue := 216; + FPaletteEntries[7].peRed := 200; { White } + FPaletteEntries[7].peGreen := 200; + FPaletteEntries[7].peBlue := 200; + FPaletteEntries[8].peRed := 84; { Grey } + FPaletteEntries[8].peGreen := 84; + FPaletteEntries[8].peBlue := 84; + FPaletteEntries[9].peRed := 84; { Red Highlight } + FPaletteEntries[9].peGreen := 84; + FPaletteEntries[9].peBlue := 212; + FPaletteEntries[10].peRed := 84; { Green Highlight } + FPaletteEntries[10].peGreen := 255; + FPaletteEntries[10].peBlue := 84; + FPaletteEntries[11].peRed := 255; { Yellow Highlight } + FPaletteEntries[11].peGreen := 255; + FPaletteEntries[11].peBlue := 84; + FPaletteEntries[12].peRed := 84; { Blue Highlight } + FPaletteEntries[12].peGreen := 84; + FPaletteEntries[12].peBlue := 255; + FPaletteEntries[13].peRed := 255; { Magenta Highlight } + FPaletteEntries[13].peGreen := 84; + FPaletteEntries[13].peBlue := 255; + FPaletteEntries[14].peRed := 84; { Cyan highlight } + FPaletteEntries[14].peGreen := 255; + FPaletteEntries[14].peBlue := 255; + FPaletteEntries[15].peRed := 255; { White Highlight } + FPaletteEntries[15].peGreen := 255; + FPaletteEntries[15].peBlue := 255; + + for I := 0 to High(plgpl^.palPalEntry) do begin + plgpl^.PalPalEntry[I].peRed := FPaletteEntries[I].peRed; + plgpl^.PalPalEntry[I].peGreen := FPaletteEntries[I].peGreen; + plgpl^.PalPalEntry[I].peBlue := FPaletteEntries[I].peBlue; + end; + + FPal := CreatePalette(TPLogPalette(plgpl)^); + Dispose(plgpl); + + FScreen := TScreen.Create; + FVScrollBar := TScrollBar.Create(Self); + FFont := TFont.Create; + FFont.Name := 'Terminal'; + FFont.Size := 12; + FFont.Style := []; + SetupFont; + + FScreen.FXlatInputTable := @ibm_iso8859_1_G0; + FScreen.FXlatOutputTable := @ibm_iso8859_1_G0; + FScreen.OnCursorVisible := CursorVisibleEvent; + + FCursorVisible := TRUE; + Width := 250; + Height := 100; + FBorderStyle := bsSingle; + FBorderWidth := 1; + FAutoRepaint := TRUE; + FFkeys := 1; + + with FVScrollBar do begin + Parent := Self; + Kind := sbVertical; + Width := 16; + Visible := TRUE; + Align := alRight; + OnScroll := VScrollBarScroll; + end; + + with FScreen do begin + GotoXY(0, 0); + WriteStr('EmulVT'); + GotoXY(0, 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetRows(Value : Integer); +begin + with FScreen do begin + if FRowCount <> Value then begin + FRowCount := Value; + ClearScreen; + Repaint; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetRows : Integer; +begin + Result := FScreen.FRowCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetLineHeight(Value : Integer); +begin + if Value <> FLineHeight then + FLineHeight := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetCols(Value : Integer); +begin + with FScreen do begin + if FColCount <> Value then begin + FColCount := Value; + ClearScreen; + Repaint; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetCols : Integer; +begin + Result := FScreen.FColCount; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.CursorVisibleEvent(Sender : TObject); +begin + if FScreen.FCursorOff then begin + if FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + end + else begin + if FScreen.Focused and not FCaretShown then begin + ShowCaret(Handle); + FCaretShown := TRUE; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetAutoLF(Value : Boolean); +begin + FScreen.FAutoLF := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetAutoCR(Value : Boolean); +begin + FScreen.FAutoCR := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetLog(Value : Boolean); +begin + if FLog = Value then + Exit; + + FLog := Value; + + if FLog then begin +{$I-} + AssignFile(FFileHandle, 'EMULVT.LOG'); + Append(FFileHandle); + if IOResult <> 0 then + Rewrite(FFileHandle); + Write(FFileHandle, ''); +{$I+} + end + else begin + Write(FFileHandle, ''); + CloseFile(FFileHandle); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetXlat(Value : Boolean); +begin + FScreen.FNoXlat := not Value; + FScreen.FNoXlatInitial := not Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetXlat : Boolean; +begin + Result := not FScreen.FNoXlatInitial; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetAutoLF : Boolean; +begin + Result := FScreen.FAutoLF; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.GetAutoCR : Boolean; +begin + Result := FScreen.FAutoCR; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomEmulVT.Destroy; +begin + if FLog then + Log := FALSE; + + FFont.Free; + FVScrollBar.Free; + FScreen.Free; + DeleteObject(FPal); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetupFont; +var + DC : HDC; + Metrics : TTextMetric; + hObject : THandle; +begin + DC := GetDC(0); + hObject := SelectObject(DC, FFont.Handle); + GetTextMetrics(DC, Metrics); + SelectObject(DC, hOBject); + ReleaseDC(0, DC); + + FCharWidth := Metrics.tmMaxCharWidth; + FLineHeight := Metrics.tmHeight; + FInternalLeading := Metrics.tmInternalLeading; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.SetFont(Value : TFont); +begin + FFont.Assign(Value); + FFont.Pitch := fpFixed; + SetupFont; + SetCaret; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMLButtonDown(var Message: TWMLButtonDown); +begin + inherited; + SetFocus; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.VScrollBarScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer); +begin + case ScrollCode of + scLineUp: dec(FTopLine); + scLineDown: inc(FTopLine); + end; + if FTopLine < 0 then + FTopLine := 0; + if FTopLine >= MAX_ROW then + FTopLine := Max_ROW - 1; + Repaint; + SetFocus; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.DoKeyBuffer(Buffer : PChar; Len : Integer); +var + J : Integer; + ch : Char; +begin + if Assigned(FOnKeyBuffer) then + FOnKeyBuffer(Self, Buffer, Len) + else begin + for J := 0 to Len - 1 do begin + ch := Buffer[J]; + KeyPress(ch); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.FindFKeys(ScanCode: Char; Shift: TShiftState; + Ext: Boolean) : PFuncKeyValue; +var + I : Integer; + pFKeys : PFuncKeysTable; +begin + Result := nil; + case FKeys of + 0 : pFKeys := @FKeys1; + 1 : pFKeys := @FKeys2; + 2 : pFKeys := @FKeys3; + else + pFKeys := @FKeys2; + end; + + for I := Low(pFKeys^) to High(pFKeys^) do begin + if (pFKeys^[I].ScanCode <> #0) and (pFKeys^[I].ScanCode = ScanCode) and + (pFKeys^[I].Shift = Shift) and + (pFKeys^[I].Ext = Ext) then begin + Result := @pFKeys^[I].Value; + Break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.ProcessFKeys(ScanCode: Char; Shift: TShiftState; + Ext: Boolean) : Boolean; +var + I : Integer; + pFKeys : PFuncKeysTable; +begin + Result := FALSE; + case FKeys of + 0 : pFKeys := @FKeys1; + 1 : pFKeys := @FKeys2; + 2 : pFKeys := @FKeys3; + else + pFKeys := @FKeys2; + end; + + for I := Low(pFKeys^) to High(pFKeys^) do begin + if (pFKeys^[I].ScanCode <> #0) and (pFKeys^[I].ScanCode = ScanCode) and + (pFKeys^[I].Shift = Shift) and + (pFKeys^[I].Ext = Ext) then begin + Result := TRUE; + DoKeyBuffer(@pFKeys^[I].Value[1], Length(pFKeys^[I].Value)); + Break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.AppMessageHandler(var Msg: TMsg; var Handled: Boolean); +const + v1 : String = 'aeiou'; + v2 : String = ''; + v3 : String = ''; + SpyFlag : Boolean = FALSE; +var + Shift : TShiftState; + ShiftLock : Boolean; + Key : Char; + I : Integer; + ScanCode : Char; + Ext : Boolean; + SpyBuffer : String; + FnBuffer : String; + pFV : PFuncKeyValue; +begin + if (Msg.hWnd = Handle) and (Msg.Message = WM_KEYDOWN) then begin + Key := chr(Msg.wParam and $FF); +{ DebugString('AppMessageHandler KEYDOWN ' + IntToHex(Msg.wParam, 4) + #13 + #10); } + Shift := KeyDataToShiftState(Msg.lParam); + ShiftLock := ((GetKeyState(VK_CAPITAL) and 1) > 0); + ScanCode := Chr(LOBYTE(HIWORD(Msg.lParam))); + Ext := ((Msg.lParam and $1000000) <> 0); + + if (Msg.wParam <> VK_SHIFT) and + (Msg.wParam <> VK_CONTROL) and + (Msg.wParam <> VK_MENU) then begin + if (ScanCode = '7') and + (Shift = [ssAlt, ssCtrl]) and (Ext = FALSE) then begin + SpyFlag := TRUE; + Handled := TRUE; + Exit; + end; + + if SpyFlag then begin + SpyFlag := FALSE; + pFV := FindFKeys(ScanCode, Shift, Ext); + SpyBuffer := IntToHex(Ord(ScanCode), 2) + ', ' + + ShiftStateToString(Shift) + ', '; + + if Ext then + SpyBuffer := SpyBuffer + 'TRUE' + else + SpyBuffer := SpyBuffer + 'FALSE'; + + if pFV <> nil then + SpyBuffer := SpyBuffer + ', ''' + + FuncKeyValueToString(pFV^) + ''''; + + SpyBuffer := SpyBuffer + #0; + ClipBoard.SetTextBuf(@SpyBuffer[1]); + + FnBuffer := 'Key definition from tnchrk' + + IntToStr(FKeys) + '.cfg' + #0; + Application.MessageBox(@SpyBuffer[1], @FnBuffer[1], MB_OK); + Handled := TRUE; + Exit; + end; + + if ProcessFKeys(ScanCode, Shift, Ext) then begin + Handled := TRUE; + Exit; + end; + end; + + case Msg.wParam of + VK_SHIFT, VK_CONTROL, VK_MENU: ; + + VK_NEXT, VK_PRIOR, VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT, VK_HOME, VK_END: + begin + if ProcessFKeys(ScanCode, Shift, TRUE) then begin + Handled := TRUE; + Exit; + end; + end; + VK_TAB, VK_RETURN, VK_ESCAPE, VK_BACK: + begin + Handled := TRUE; + end; + + $DD: + begin + if not (ssAlt in Shift) then begin + Key := #0; + Handled := TRUE; + if (ssShift in Shift) then + FFlagTrema := TRUE + else + FFlagCirconflexe := TRUE; + end; + end; + + ord('A')..ord('Z') : + begin + if (ssCtrl in Shift) then + Key := chr(Word(Key) and $1F) + else if not ShiftLock and not (ssShift in Shift) then + Key := chr(Word(Key) or $20); + if (FFlagCirconflexe) then begin + for I := Length(v1) downto 1 do begin + if Key = v1[I] then begin + Key := v2[I]; + Break; + end; + end; + FFlagCirconflexe := FALSE; + end; + if (FFlagTrema) then begin + for I := Length(v1) downto 1 do begin + if Key = v1[I] then begin + Key := v3[I]; + Break; + end; + end; + FFlagTrema := FALSE; + end; + Handled := TRUE; + end; + end; + +{ DebugString('Char = ' + IntToHex(Integer(Key), 2) + #13 + #10); } + if Handled and (Key <> #0) then + KeyPress(Key); + end; + + if not Handled and Assigned(FAppOnMessage) then + FAppOnMessage(Msg, Handled); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.KeyPress(var Key: Char); +begin + if not FScreen.FNoXlat then + Key := FScreen.FXlatOutputTable^[ord(Key)]; + + inherited KeyPress(Key); + if FLocalEcho then begin + WriteChar(Key); + if not FAutoRepaint then + UpdateScreen; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMSetFocus(var Message: TWMSetFocus); +begin +{ inherited; } + FScreen.Focused := TRUE; +{ SetupFont; } + + if not FCursorVisible then + Exit; + + CreateCaret(Handle, 0, 2, FLineHeight); + FCaretCreated := TRUE; + SetCaret; + if not FScreen.FCursorOff then begin + ShowCaret(Handle); + FCaretShown := TRUE; + end; + + FAppOnMessage := Application.OnMessage; + Application.OnMessage := AppMessageHandler; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMKillFocus(var Message: TWMKillFocus); +begin +{ inherited; } + FScreen.Focused := FALSE; + + if not FCursorVisible then + Exit; + + if FCaretShown then begin + HideCaret(Handle); + FCaretShown := FALSE; + end; + + if FCaretCreated then begin + DestroyCaret; + FCaretCreated := FALSE; + end; + + Application.OnMessage := FAppOnMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.MouseToCell(X, Y: Integer; var ACol, ARow: Longint); +begin + aRow := (Y - TopMargin) div FLineHeight; + if aRow < 0 then + aRow := 0 + else if aRow >= FScreen.FRowCount then + aRow := FScreen.FRowCount - 1; + + aCol := (X - LeftMargin) div FCharWidth; + if aCol < 0 then + aCol := 0 + else if aCol >= FScreen.FColCount then + aCol := FScreen.FColCount - 1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.ShowCursor; +begin + SetCaret; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMPaletteChanged(var Message : TMessage); +{var + HandleDC : HDC;} +begin +{ if Message.wParam <> Handle then begin + HandleDC := GetDC(Handle); + SelectPalette(HandleDC, FPal, FALSE); + if RealizePalette(HandleDC) <> 0 then begin + InvalidateRect(Handle, nil, TRUE); + MessageBeep(0); + end; + ReleaseDC(Handle, HandleDC); + end; +} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.UpdateScreen; +var + rc : TRect; +begin + if FScreen.FAllInvalid then + InvalidateRect(Handle, nil, FALSE) + else begin +{$Q-} + with FScreen.FInvRect do begin + rc.Top := TopMargin + FLineHeight * Top + FInternalLeading; + rc.Bottom := TopMargin + FLineHeight * (Bottom + 1) + FInternalLeading; + rc.Left := LeftMargin + FCharWidth * Left; + rc.Right := LeftMargin + FCharWidth * (Right + 1); + end; + InvalidateRect(Handle, @rc, FALSE); +{$Q+} + end; + + { Invalidate the region where the caret is. I should'nt do that, but } + { if I do'nt, the caret remains where it is ! Bug ? } + rc.Top := TopMargin + FLineHeight * FScreen.FRow; + rc.Bottom := rc.Top + FLineHeight; + rc.Left := LeftMargin + FCharWidth * FScreen.FCol; + rc.Right := rc.Left + FCharWidth; + InvalidateRect(Handle, @rc, FALSE); + + FScreen.InvClear; + + if FCaretCreated then begin + ShowCaret(Handle); + FCaretShown := TRUE; + end; + SetCaret; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.SnapPixelToRow(Y : Integer) : Integer; +begin + Result := TopMargin + PixelToRow(Y) * FLineHeight; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.SnapPixelToCol(X : Integer) : Integer; +begin + Result := LeftMargin + PixelToCol(X) * FCharWidth; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.PixelToRow(Y : Integer) : Integer; +var + nRow : Integer; +begin + nRow := (Y - TopMargin) div FLineHeight; + if nRow < 0 then + nRow := 0; + Result := nRow; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomEmulVT.PixelToCol(X : Integer) : Integer; +var + nCol : Integer; +begin + nCol := (X - LeftMargin) div FCharWidth; + if nCol < 0 then + nCol := 0; + Result := nCol; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} +procedure TCustomEmulVT.PaintLine(Y : Integer; const Line : TLine; + nColFrom : Integer; nColTo : Integer); +var + rc : TRect; + nCnt : Integer; + nAtt : Byte; + X : Integer; +begin + nAtt := Line.Att[nColFrom]; + + if nAtt = $0B then + X := 0; + + with FPaletteEntries[nAtt div $0F] do + Canvas.Brush.Color := TColor(RGB(peRed, peGreen, peBlue)) + $02000000; + with FPaletteEntries[nAtt and $0F] do + Canvas.Font.Color := TColor(RGB(peRed, peGreen, peBlue)) + $02000000; + + nCnt := nColTo - nColFrom; + X := LeftMargin + nColFrom * FCharWidth; + rc.Top := Y; + rc.Bottom := Y + FLineHeight; + rc.Left := X; + rc.Right := rc.Left + nCnt * FCharWidth; + if nColFrom = 0 then + rc.Left := rc.Left - LeftMargin; + if nColTo >= FScreen.FColCount then + rc.Right := rc.Right + RightMargin; + ExtTextOut(Canvas.Handle, + X, Y, + ETO_OPAQUE or ETO_CLIPPED, @rc, + @Line.Txt[nColFrom], nCnt, nil); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF never} +procedure TCustomEmulVT.Paint; +var + rcPaint : TRect; + rc : TRect; + nRow : Integer; + nCol : Integer; + nColFrom : Integer; + nCnt : Integer; + nAtt : Byte; + DrawRct : TRect; + Y : Integer; + Line : TLine; +begin +{ DebugString('Paint' + #13 + #10); } + + SelectPalette(Canvas.Handle, FPal, FALSE); + RealizePalette(Canvas.Handle); + + inherited Paint; + + Canvas.Font := FFont; + DrawRct := ClientRect; + DrawRct.Right := DrawRct.Right - FVScrollBar.Width; + with DrawRct, Canvas do begin + if FBorderStyle = bsSingle then begin + if Ctl3D then + DrawCtl3DBorder(Canvas, DrawRct) + else + DrawBorder(Canvas, DrawRct, clBlack, clBlack) + end; + end; + + rcPaint := Canvas.ClipRect; + rc.Left := 2; + rc.Right := DrawRct.Right - 2; + nRow := (rcPaint.Top - TopMargin) div FLineHeight; + + Y := TopMargin + nRow * FLineHeight; + Canvas.Pen.Style := psClear; + Canvas.Rectangle(rc.Left, 2, rc.Right + 1, Y + 1); + + nRow := nRow + FTopLine; + while nRow < MAX_ROW do begin + rc.Top := Y; + rc.Bottom := Y + FLineHeight; + if rc.Bottom > (DrawRct.Bottom - BottomMargin) then begin + Canvas.Pen.Style := psClear; + Canvas.Rectangle(rc.Left, rc.Top, rc.Right + 1, DrawRct.Bottom - 1); + Canvas.Pen.Style := psSolid; + Break; + end; + Line := FScreen.FLines[nRow]; + + nCol := 0; + nColFrom := 0; + while nCol < FScreen.FColCount do begin + while (nCol < FScreen.FColCount) and + (Line.Att[nCol] = Line.Att[nColFrom]) do + Inc(nCol); + + PaintLine(Y, Line, nColFrom, nCol); + nColFrom := nCol; + end; + + nRow := nRow + 1; + Y := Y + FLineHeight; + if Y > rcPaint.Bottom then + Break; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.PaintOneLine(DC: HDC; Y : Integer; const Line : TLine; + nColFrom : Integer; nColTo : Integer); +var + rc : TRect; + nCnt : Integer; + nAtt : Byte; + X : Integer; +begin + nAtt := Line.Att[nColFrom]; + +{ if nAtt = $0B then + X := 0; } +{ + SetBkColor(DC, PALETTEINDEX(nAtt div $0F)); + SetTextColor(DC, PALETTEINDEX(nAtt and $0F)); +} + if not FMonoChrome then begin + with FPaletteEntries[(nAtt shr 4) and $0F] do + SetBkColor(DC, PALETTERGB(peRed, peGreen, peBlue)); + with FPaletteEntries[nAtt and $0F] do + SetTextColor(DC, PALETTERGB(peRed, peGreen, peBlue)); + end + else begin + if (nAtt div $0F) <> 0 then + SetBkColor(DC, RGB(127, 127, 127)) + else + SetBkColor(DC, RGB(255, 255, 255)); + + if (nAtt and $0F) <> 0 then + SetTextColor(DC, RGB(0, 0, 0)) + else + SetTextColor(DC, RGB(255, 255, 255)); + end; + + nCnt := nColTo - nColFrom; + X := LeftMargin + nColFrom * FCharWidth; + rc.Top := Y + FInternalLeading; + rc.Bottom := Y + FLineHeight + FInternalLeading; + rc.Left := X; + rc.Right := rc.Left + nCnt * FCharWidth; + if nColFrom = 0 then + rc.Left := rc.Left - LeftMargin; + if nColTo >= FScreen.FColCount then + rc.Right := rc.Right + RightMargin; + ExtTextOut(DC, + X, Y, + ETO_OPAQUE or ETO_CLIPPED, @rc, + @Line.Txt[nColFrom], nCnt, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomEmulVT.WMPaint(var Message: TWMPaint); +var + DC : HDC; + PS : TPaintStruct; + Y : Integer; + rc : TRect; + OldPen : THandle; + OldBrush : THandle; + OldFont : THandle; + rcPaint : TRect; + DrawRct : TRect; + nRow : Integer; + nCol : Integer; + nColFrom : Integer; + Line : TLine; + BackBrush : HBrush; +begin + if not GetUpdateRect(WindowHandle, rc, FALSE) then + Exit; + + BackBrush := 0; + OldBrush := 0; + + DC := Message.DC; + if DC = 0 then + DC := BeginPaint(WindowHandle, PS); + try + if not FMonoChrome then begin + SelectPalette(DC, FPal, FALSE); + RealizePalette(DC); + with FPaletteEntries[FScreen.FAttribute div $0F] do + BackBrush := CreateSolidBrush(PALETTERGB(peRed, peGreen, peBlue)); + OldBrush := SelectObject(DC, BackBrush); + end; + + WinProcs.GetClientRect(WindowHandle, DrawRct); + rcPaint := PS.rcPaint; + rc.Left := 2; + rc.Right := DrawRct.Right - 2; + nRow := (rcPaint.Top - TopMargin) div FLineHeight; + + nRow := nRow - 1; + if nRow < 0 then + nRow := 0; + + Y := TopMargin + nRow * FLineHeight; + + if rcPaint.Top <= TopMargin then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, rcPaint.left, rcPaint.Top, + rcPaint.Right + 1, + TopMargin + FInternalLeading + 1); + SelectObject(DC, OldPen); + end; + + if (nRow = 0) and (FInternalLeading > 0) then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, rcPaint.left, rcPaint.Top, + rcPaint.Right + 1, + Y + FInternalLeading + 1); + SelectObject(DC, OldPen); + end; + + OldFont := SelectObject(DC, FFont.Handle); + nRow := nRow + FTopLine; + while nRow < MAX_ROW do begin + rc.Top := Y; + rc.Bottom := Y + FLineHeight; + if rc.Bottom > (DrawRct.Bottom - BottomMargin) then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, rc.Left - 2, rc.Top, rc.Right + 1, + DrawRct.Bottom - 1); + SelectObject(DC, OldPen); + Break; + end; + Line := FScreen.FLines[nRow]; + + nCol := 0; + nColFrom := 0; + while nCol < FScreen.FColCount do begin + while (nCol < FScreen.FColCount) and + (Line.Att[nCol] = Line.Att[nColFrom]) do + Inc(nCol); + + PaintOneLine(DC, Y, Line, nColFrom, nCol); + nColFrom := nCol; + end; + + nRow := nRow + 1; + Y := Y + FLineHeight; + if Y > rcPaint.Bottom then + Break; + end; + + if (LeftMargin + FScreen.FColCount * FCharWidth) < rc.Right then begin + OldPen := SelectObject(DC, GetStockObject(NULL_PEN)); + WinProcs.Rectangle(DC, LeftMargin + FScreen.FColCount * FCharWidth, + TopMargin, rc.Right + 1, DrawRct.Bottom - 1); + SelectObject(DC, OldPen); + end; + + if FSelectRect.Top <> -1 then begin + SelectObject(DC, GetStockObject(NULL_BRUSH)); + SelectObject(DC, GetStockObject(BLACK_PEN)); + WinProcs.Rectangle(DC, FSelectRect.Left, + FSelectRect.Top, + FSelectRect.Right + 1, + FSelectRect.Bottom - 1); + SelectObject(DC, GetStockObject(WHITE_PEN)); + WinProcs.Rectangle(DC, FSelectRect.Left - 1, + FSelectRect.Top - 1, + FSelectRect.Right + 2, + FSelectRect.Bottom); + end; + + SelectObject(DC, OldFont); + if OldBrush <> 0 then + SelectObject(DC, OldBrush); + if BackBrush <> 0 then + DeleteObject(BackBrush); + finally + if Message.DC = 0 then + EndPaint(WindowHandle, PS); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} diff --git a/lib/telnet/EmulVT.dcu b/lib/telnet/EmulVT.dcu new file mode 100644 index 00000000..f373fbde Binary files /dev/null and b/lib/telnet/EmulVT.dcu differ diff --git a/lib/telnet/FINGCLI.DCR b/lib/telnet/FINGCLI.DCR new file mode 100644 index 00000000..05ee5530 Binary files /dev/null and b/lib/telnet/FINGCLI.DCR differ diff --git a/lib/telnet/FINGCLI.PAS b/lib/telnet/FINGCLI.PAS new file mode 100644 index 00000000..044f5916 --- /dev/null +++ b/lib/telnet/FINGCLI.PAS @@ -0,0 +1,202 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TFingerCli is a FINGER protocol client using TWSocket + Conform to RFC-1288 (supercede RFCs 1196, 1194 and 742) +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: December 18, 1997 +Version: 1.00 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit FingCli; + +interface + +uses + WinTypes, WinProcs, SysUtils, Messages, Classes, Graphics, Controls, + WSocket; + +const + FingerCliVersion = 100; + +type + TFingerCli = class(TComponent) + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure StartQuery; + function Receive(Buffer : Pointer; Len : Integer) : Integer; + procedure Abort; + protected + FWSocket : TWSocket; + FQuery : String; + FQueryDoneFlag : Boolean; + FOnSessionConnected : TSessionConnected; + FOnDataAvailable : TDataAvailable; + FOnQueryDone : TSessionClosed; + procedure WSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure WSocketSessionConnected(Sender: TObject; Error: Word); + procedure WSocketDataAvailable(Sender: TObject; Error: Word); + procedure WSocketSessionClosed(Sender: TObject; Error: Word); + procedure TriggerQueryDone(Error: Word); + published + property Query : String read FQuery + write FQuery; + property OnSessionConnected : TSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnDataAvailable : TDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnQueryDone : TSessionClosed read FOnQueryDone + write FOnQueryDone; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TFingerCli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TFingerCli.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWSocket := TWSocket.Create(Self); + FWSocket.OnSessionConnected := WSocketSessionConnected; + FWSocket.OnDataAvailable := WSocketDataAvailable; + FWSocket.OnSessionClosed := WSocketSessionClosed; + FWSocket.OnDnsLookupDone := WSocketDnsLookupDone; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TFingerCli.Destroy; +begin + if Assigned(FWSocket) then + FWSocket.Destroy; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.StartQuery; +var + I : Integer; + Host : String; +begin + I := Pos('@', FQuery); + if I <= 0 then + raise Exception.CreateFmt('TFingerCli, Invalid Query: %s', [FQuery]); + Host := Copy(FQuery, I + 1, Length(FQuery)); + if Length(Host) <= 0 then + raise Exception.CreateFmt('TFingerCli, Invalid Host in query: %s', [FQuery]); + FQueryDoneFlag := FALSE; + FWSocket.DnsLookup(Host); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.Abort; +begin + FWSocket.CancelDnsLookup; + FWSocket.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFingerCli.Receive(Buffer : Pointer; Len : Integer) : Integer; +begin + Result := FWSocket.Receive(Buffer, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then + TriggerQueryDone(Error) + else begin + FWSocket.Addr := FWSocket.DnsResult; + FWSocket.Proto := 'tcp'; + FWSocket.Port := 'finger'; + FWSocket.Connect; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketSessionConnected(Sender: TObject; Error: Word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); + + if Error <> 0 then begin + TriggerQueryDone(Error); + FWSocket.Close + end + else + FWSocket.SendStr(FQuery + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketDataAvailable(Sender: TObject; Error: Word); +begin + if Assigned(FOnDataAvailable) then + FOnDataAvailable(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.TriggerQueryDone(Error: Word); +begin + if (FQueryDoneFlag = FALSE) and Assigned(FOnQueryDone) then + FOnQueryDone(Self, Error); + FQueryDoneFlag := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerCli.WSocketSessionClosed(Sender: TObject; Error: Word); +begin + TriggerQueryDone(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} diff --git a/lib/telnet/FINGER.DPR b/lib/telnet/FINGER.DPR new file mode 100644 index 00000000..c040bc1b --- /dev/null +++ b/lib/telnet/FINGER.DPR @@ -0,0 +1,12 @@ +program Finger; + +uses + Forms, + finger1 in 'FINGER1.PAS' {FingerDemoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TFingerDemoForm, FingerDemoForm); + Application.Run; +end. diff --git a/lib/telnet/FINGER1.DFM b/lib/telnet/FINGER1.DFM new file mode 100644 index 00000000..03bfc0db Binary files /dev/null and b/lib/telnet/FINGER1.DFM differ diff --git a/lib/telnet/FINGER1.PAS b/lib/telnet/FINGER1.PAS new file mode 100644 index 00000000..f8d7f052 --- /dev/null +++ b/lib/telnet/FINGER1.PAS @@ -0,0 +1,183 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Finger is a FINGER client + Install the components in FingCli.pas and wsocket.pas first. +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: December 18, 1997 +Version: 1.00 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit finger1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, FingCli, WinSock, WSocket; + +type + TFingerDemoForm = class(TForm) + FingerCli1: TFingerCli; + WSocket1: TWSocket; + DisplayMemo: TMemo; + Panel1: TPanel; + QueryEdit: TEdit; + QueryButton: TButton; + CancelButton: TButton; + procedure QueryButtonClick(Sender: TObject); + procedure FingerCli1DataAvailable(Sender: TObject; Error: Word); + procedure FingerCli1QueryDone(Sender: TObject; Error: Word); + procedure FingerCli1SessionConnected(Sender: TObject; Error: Word); + procedure CancelButtonClick(Sender: TObject); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + FingerDemoForm: TFingerDemoForm; + +const +{$IFDEF VER80} + BufferSize = 255; { Delphi 1 is limited to 255 bytes } +{$ELSE} + BufferSize = 2048; +{$ENDIF} + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Display a message in the memo field, breaking with CR *} +procedure MemoAddLines(Memo : TMemo; Msg : String); +const + CR = #13; + LF = #10; +var + Start, Stop : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add(''); + + Start := 1; + Stop := Pos(CR, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := + Memo.Lines.Strings[Memo.Lines.Count - 1] + + Copy(Msg, Start, Stop - Start); + if Msg[Stop] = CR then begin + Memo.Lines.Add(''); + SendMessage(Memo.Handle, WM_KEYDOWN, VK_UP, 1); + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + while Msg[Start] in [CR, LF] do + Start := Start + 1; + Stop := Start; + while (Msg[Stop] <> CR) and (Stop <= Length(Msg)) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.QueryButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + QueryButton.Enabled := FALSE; + CancelButton.Enabled := TRUE; + FingerCli1.Query := QueryEdit.Text; + FingerCli1.StartQuery; + MemoAddLines(DisplayMemo, 'Query started.' + #13); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.FingerCli1SessionConnected(Sender: TObject; Error: Word); +begin + if Error = 0 then + MemoAddLines(DisplayMemo, 'Connected to host.' + #13); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.FingerCli1DataAvailable(Sender: TObject; Error: Word); +var + Buffer : array [0..BufferSize - 1] of char; + Len : Integer; +begin + while TRUE do begin + Len := FingerCli1.Receive(@Buffer, SizeOf(Buffer) - 1); + if Len <= 0 then + break; + Buffer[Len] := #0; + MemoAddLines(DisplayMemo, StrPas(Buffer)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.FingerCli1QueryDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + if Error = WSAECONNREFUSED then + MemoAddLines(DisplayMemo, 'No finger service available.' + #13) + else if Error = WSAETIMEDOUT then + MemoAddLines(DisplayMemo, 'Host unreachable.' + #13) + else + MemoAddLines(DisplayMemo, 'Error #' + IntToStr(Error) + #13); + end; + MemoAddLines(DisplayMemo, 'Done.' + #13); + + QueryButton.Enabled := TRUE; + CancelButton.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFingerDemoForm.CancelButtonClick(Sender: TObject); +begin + FingerCli1.Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/FORMPOS.PAS b/lib/telnet/FORMPOS.PAS new file mode 100644 index 00000000..0177b004 --- /dev/null +++ b/lib/telnet/FORMPOS.PAS @@ -0,0 +1,159 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Formpos; + +interface + +uses + Forms, IniFiles, SysUtils, Dialogs, WinTypes, WinProcs; + +Procedure LoadFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName: string); +Procedure SaveFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName: string); + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Gnre un chane du genre 'Left, Top, Height, Width, WindowState' *} +{* en vue de la placer dans un section d'un fichier INI *} +function WindowPosToStr(Form : TForm; iWindowState : integer) : string; +begin + Result := IntToStr(Form.Left) + ', ' + + IntToStr(Form.Top) + ', ' + + IntToStr(Form.Height) + ', ' + + IntToStr(Form.Width) + ', ' + + IntToStr(iWindowState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Recoit un string sous forme '100, 200, 300, 500, 0' et affecte *} +{* respectivement ces valeurs a Form.LEFT, Form.Top, Form.Heigt, *} +{* Form.Width, Form.WindowState *} +procedure StrToWindowPos(sBuffer : string; Form : TForm); +var + ilen, i, k : integer; + sDst : string; +begin + ilen := length(sBuffer); + k := 0; + sDst := ''; + + {i = indice ds sBuffer; j = Indice ds sDst; k = nbre d'occurences trouvs } + for i := 1 to ilen + 1 do begin + if (i > ilen) or (sBuffer[i] = ',') then begin + k := k + 1; + case k of + 1: Form.Left := StrToInt(sDst); + 2: Form.Top := StrToInt(sDst); + 3: Form.Height := StrToInt(sDst); + 4: Form.Width := StrToInt(sDst); + 5: Form.WindowState := TWindowState(StrToInt(sDst)); + else + break; + end; + sDst := ''; + end + else + sDst := sDst + sBuffer[i]; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure LoadFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName : string); +var + IniFile: TIniFile; + sWindowPositions : string; +begin + if Length(IniFileName) = 0 then + Exit; + + { Create inifile object => Open ini file } + IniFile := TIniFile.Create(IniFilename); + + {Formatage par dfaut de la ligne de la section window} + sWindowPositions := WindowPosToStr(Form, ord(Form.WindowState)); + + { Get widow's position and size from ini file } + sWindowPositions := IniFile.ReadString(SectionName, + KeyName, + sWindowPositions); + StrToWindowPos(sWindowPositions, Form); + + + { Destroy inifile object => close ini file } + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure SaveFormPos(Form : TForm; + const IniFilename : string; + const SectionName : String; + const KeyName : string); +var + IniFile : TIniFile; + iWindowState : integer; +begin + if Length(IniFileName) = 0 then + Exit; + + { Create inifile object => Open ini file } + IniFile := TIniFile.Create(IniFilename); + + iWindowState := ord(Form.WindowState); + + { If window minimized or maximized, restore to normal state } + if Form.WindowState <> wsNormal then + Form.WindowState := wsNormal; + + { Save the window's postion and size to the ini file } + IniFile.WriteString(SectionName, + KeyName, + WindowPosToStr(Form, iWindowState)); + + { Destroy inifile object => close ini file } + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/FPiette2.dcp b/lib/telnet/FPiette2.dcp new file mode 100644 index 00000000..e74cdc76 Binary files /dev/null and b/lib/telnet/FPiette2.dcp differ diff --git a/lib/telnet/FPiette2.dcu b/lib/telnet/FPiette2.dcu new file mode 100644 index 00000000..9880336c Binary files /dev/null and b/lib/telnet/FPiette2.dcu differ diff --git a/lib/telnet/FPiette2.dpl b/lib/telnet/FPiette2.dpl new file mode 100644 index 00000000..cbc4bc74 Binary files /dev/null and b/lib/telnet/FPiette2.dpl differ diff --git a/lib/telnet/FTPCLI.DCR b/lib/telnet/FTPCLI.DCR new file mode 100644 index 00000000..4791c193 Binary files /dev/null and b/lib/telnet/FTPCLI.DCR differ diff --git a/lib/telnet/FTPCLI.PAS b/lib/telnet/FTPCLI.PAS new file mode 100644 index 00000000..9a3b1a63 --- /dev/null +++ b/lib/telnet/FTPCLI.PAS @@ -0,0 +1,1045 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Email: francois.piette@ping.be http://www.rtfm.be/fpiette + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: May 1996 +Version: 2.10 +Object: TFtpClient is a FTP client (RFC 959 implementation) +Support: Please ask your question in the following newsgroup: + news://forums.borland.com/borland.public.delphi.vcl.components.using +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Nov 04, 1996 Better error handling + Property for timeout, defualt to 15 sec +Dec 03, 1996 Adapted display functionnality for Delphi 2 +Dec 27, 1996 Added transmit functions + Changed all procedure to function returning boolean status +Aug 13, 1997 Added multiline response support + Added support for strange Microsoft PWS FTP behaviour +Sep 10, 1997 Added support for Dir and Ls commands + Corrected bugs to enable correct use of separate commands +Oct 16, 1997 V2.07 Adapted for changes in TWSocket object + Added FtpCliVersion constant +Nov 25, 1997 V2.08 Accept 250 as well as 226 for succesfull file transfert + Suggested by fdragon@world-net.net +Nov 26, 1997 V2.09 don't display error message in the receive event when + the socket is no more connected. +Nov 29, 1997 V2.10 added Mkd and Mkdir functions to create a directory. + As suggested by Christian Rsner +Dec 04, 1997 V2.11 Added Ren, Dele, Rmd functions + As suggested by Frank Riemann + Changed Mkd and Mkdir functions to take HostFileName to + specify the directory name. This is more consistent with the + rest of the component usage. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Ftpcli; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, WinSock, WSocket, Wait; + +const + FtpCliVersion = 210; + +const + BLOCK_SIZE = 1024; + +type + TFtpDisplay = procedure(Sender: TObject; var Msg : String) of object; + TFtpProgress = procedure(Sender: TObject; + Count : LongInt; var Abort : Boolean) of object; + TFtpOp = (FtpTransmit, FtpReceive); + TFtpMethod = function : Boolean of object; + + TFtpClient = class(TWinControl) + private + ControlSocket : TWSocket; + AcceptSocket : TWSocket; + StartTime : LongInt; + StopTime : LongInt; + FMode : TFtpOp; + FFtpDisplay : TFtpDisplay; + FFtpProgress : TFtpProgress; + FHostName : String; + FUserName : String; + FPassWord : String; + FLocalFileName : String; + FHostFileName : String; + FHostDirName : String; + FDisplayFlag : Boolean; + FType : Char; + FFileHandle : Integer; + FWait : TWait; + FTimeout : Integer; + FLastResponse : String; + FErrorMessage : String; + FConnected : Boolean; + FSendBuffer : array [0..BLOCK_SIZE - 1] of char; + FSendCount : LongInt; + procedure ClearErrorMessage; + procedure SetErrorMessage; + procedure FtpGetDataAvailable(Sender: TObject; Error : word); + procedure FtpGetSessionAvailable(Sender: TObject; Error : word); + procedure FtpPutSessionAvailable(Sender: TObject; Error : word); + procedure FtpSessionClosed(Sender: TObject; Error : word); + procedure FtpDataSent(Sender: TObject; Error : word); + function FtpGetFile(Cmd, HostFileName : String) : Boolean; + procedure SendCommand(Cmd : String); + procedure SendNextData; + function SendPort(Port : Integer) : Integer; + function FtpQuit : Boolean; + function GetResponse : Integer; + procedure Display(Msg : String); + procedure TWMPaint(var msg:TWMPaint); message WM_PAINT; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + function Progress : Boolean; + function FtpHighLevel(Method : TFtpMethod) : Boolean; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function Connect : Boolean; + function Cwd : Boolean; + function TypeSet : Boolean; + function Get : Boolean; + function Put : Boolean; + function Quit : Boolean; + function Receive : Boolean; + function Transmit : Boolean; + function Dir : Boolean; + function Directory : Boolean; + function Ls : Boolean; + function List : Boolean; + function Mkd : Boolean; + function Mkdir : Boolean; + function Ren : Boolean; + function Rename : Boolean; + function Dele : Boolean; + function Delete : Boolean; + function Rmd : Boolean; + function Rmdir : Boolean; + procedure SetBinary(Value : Boolean); + function GetBinary : Boolean; + procedure SetWait(Value : TWait); + procedure Abort; + function IsConnected : Boolean; + published + property OnDisplay : TFtpDisplay read FFtpDisplay write FFtpDisplay; + property OnProgress : TFtpProgress read FFtpProgress write FFtpProgress; + property HostName : String read FHostName write FHostName; + property UserName : String read FUserName write FUserName; + property PassWord : String read FPassWord write FPassWord; + property HostDirName : String read FHostDirName write FHostDirName; + property HostFileName : String read FHostFileName write FHostFileName; + property LocalFileName : String read FLocalFileName write FLocalFileName; + property DisplayFlag : Boolean read FDisplayFlag write FDisplayFlag; + property Binary : Boolean read GetBinary write SetBinary; + property Wait : TWait read FWait write SetWait; + property TimeOut : Integer read FTimeout write FTimeout; + property ErrorMessage : String read FErrorMessage; + end; + +procedure Register; + +implementation + +{$IFNDEF WIN32} +const + HFILE_ERROR = $FFFF; +{$ENDIF} + +{$B-} { Do not evaluate boolean expressions more than necessary } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TFtpClient]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] >= '0') and (Value[i] <= '9')do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TFtpClient.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + FTimeout := 15; + FFtpDisplay := nil; + FFileHandle := -1; + FType := 'I'; + Width := 32; + Height := 32; + ControlSocket := TWSocket.Create(Self); + AcceptSocket := TWSocket.Create(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TFtpClient.Destroy; +begin + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then begin + if AComponent = FWait then + FWait := nil + else if AComponent = ControlSocket then + ControlSocket := nil + else if AComponent = AcceptSocket then + AcceptSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.SetWait(Value : TWait); +begin + FWait := Value; + ControlSocket.WaitCtrl := Value; + AcceptSocket.WaitCtrl := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.TWMPaint(var msg: TWMPaint); +var + icon : HIcon; + dc : HDC; +begin + if csDesigning in ComponentState then begin + icon := LoadIcon(HInstance, MAKEINTRESOURCE('TFTPCLIENT')); + dc := GetDC(Handle); + Width := 32; + Height := 32; + DrawIcon(dc, 0, 0, icon); + ReleaseDC(Handle, dc); + FreeResource(icon); + end; + ValidateRect(Handle, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.ClearErrorMessage; +begin + FErrorMessage := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.SetErrorMessage; +begin + if FErrorMessage = '' then + FErrorMessage := FLastResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.Display(Msg : String); +begin + if Assigned(FFtpDisplay) then + FFtpDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.GetBinary : Boolean; +begin + Result := (FType = 'I'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.SetBinary(Value : Boolean); +begin + if Value then + FType := 'I' + else + FType := 'A'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.FtpGetSessionAvailable(Sender: TObject; Error : word); +var + NewHSocket : TSocket; +begin + NewHSocket := AcceptSocket.Accept; + StartTime := GetTickCount; + Display('Data: session opened'); + AcceptSocket.Dup(NewHSocket); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.FtpPutSessionAvailable(Sender: TObject; Error : word); +var + NewHSocket : TSocket; +begin + NewHSocket := AcceptSocket.Accept; + StartTime := GetTickCount; + Display('Data: session opened'); + AcceptSocket.Dup(NewHSocket); + FtpDataSent(AcceptSocket, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +procedure SetLength(var Str : String; Len : Integer); +begin + Str[0] := chr(Len); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Progress : Boolean; +var + Abort : Boolean; +begin + Abort := FALSE; + if Assigned(FFtpProgress) then begin + if FMode = FtpReceive then + FFtpProgress(Self, AcceptSocket.ReadCount, Abort) + else + FFtpProgress(Self, FSendCount, Abort); + end; + + if Abort then begin + Display('Abort requested'); + AcceptSocket.Close; + end; + + Result := not Abort; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.FtpGetDataAvailable(Sender: TObject; Error : word); +var + Len : Integer; + Buffer : array [1..2048] of Char; + Line : String; + i, j : Integer; +begin + if FMode <> FtpReceive then + Exit; + + if not Progress then + Exit; + + Len := AcceptSocket.Receive(@Buffer[1], High(Buffer)); + if Len = 0 then + { Remote has closed, ignore } + else if Len < 0 then begin + { An error has occured } + if (AcceptSocket.State = wsConnected) and + (AcceptSocket.LastError <> WSAEWOULDBLOCK) then + Display('Data: Receive error ' + IntToStr(AcceptSocket.LastError)); + end + else begin + if _lwrite(FFileHandle, @Buffer[1], Len) = -1 then begin +{$IFDEF WIN32} + Display('Error ' + IntToStr(GetLastError) + ' writing local file'); +{$ELSE} + Display('Error writing local file'); +{$ENDIF} + AcceptSocket.Shutdown(2); + exit; + end; + + if FDisplayFlag then begin + if (Len > 0) then begin + i := 1; + while (i < Len) do begin + j := 1; + while (i < Len) and (Buffer[i] <> #10) and (Buffer[i] <> #13) do begin + i := i + 1; + j := j + 1; + end; + SetLength(Line, j - 1); + Move(Buffer[i - j + 1], Line[1], j - 1); + Display('Data: ' + Line); + while (i < Len) and ((Buffer[i] = #10) or (Buffer[i] = #13)) do + i := i + 1; + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.FtpSessionClosed(Sender: TObject; Error : word); +var + Buffer : String; + Count : LongInt; + KBSec : LongInt; +begin + StopTime := GetTickCount; + if FMode = FtpReceive then + Count := AcceptSocket.ReadCount + else + Count := FSendCount; + + Progress; + + Buffer := 'Data: session closed, ' + + IntToSTr(Count) + ' bytes transfered, ' + + IntToStr((StopTime - StartTime) div 1000) + ' Seconds elapsed'; + if StopTime <> StartTime then begin + if Count > 32767 then + KBSec := 1000 * (Count div (StopTime - StartTime)) + else + KBSec := (1000 * Count) div (StopTime - StartTime); + Buffer := Buffer + ', ' + IntToStr(KBSec) + ' Bytes/Sec'; + end; + Display(Buffer); + AcceptSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.SendCommand(Cmd : String); +var + Buffer : String; +begin + Buffer := '> ' + Cmd; + SetLength(Buffer, Length(Buffer) - 2); + Display(Buffer); + Application.ProcessMessages; + ControlSocket.Send(@Cmd[1], Length(Cmd)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.GetResponse : Integer; +begin + repeat + ControlSocket.ReadLine(FTimeout, FLastResponse); + Display('< ' + FLastResponse); + until (Length(FLastResponse) < 4) or (FLastResponse[4] <> '-'); + Result := atoi(FLastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Send QUIT message to logoff from FTP server *} +function TFtpClient.FtpQuit : Boolean; +begin + FConnected := FALSE; + Result := TRUE; + if ControlSocket.State = wsClosed then + Display('Can''t QUIT: connection closed') + else begin + SendCommand('QUIT' + #13 + #10); + if GetResponse <> 221 then + Result := FALSE; + ControlSocket.Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.Abort; +begin + if ControlSocket.State <> wsClosed then + ControlSocket.Close; + if AcceptSocket.State <> wsClosed then + AcceptSocket.Close; + FConnected := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.IsConnected : Boolean; +begin + Result := ControlSocket.State <> wsClosed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Connect : Boolean; +var + Response : Integer; +begin + if FConnected then begin + Result := TRUE; + Exit; + end; + + Result := FALSE; + ClearErrorMessage; + + if FWait = nil then begin + FErrorMessage := 'No wait object'; + Display(FErrorMessage); + Exit; + end; + + try + ControlSocket.Proto := 'tcp'; + ControlSocket.Port := 'ftp'; + ControlSocket.Addr := FHostName; + ControlSocket.OnDataAvailable := nil; + + ControlSocket.Connect; + except + on E:ESocketException do begin + FErrorMessage := E.Message; + Exit; + end; + end; + + if not ControlSocket.Wait(FTimeout, wsConnected) then begin + FErrorMessage := 'Can''t connect to host ''' + FHostName + ''''; + Display(FErrorMessage); + ControlSocket.Close; + Exit; + end; + Display('Connected for FTP'); + + {* Wait for FTP server banner *} + Response := GetResponse; + + if Response <> 220 then begin + SetErrorMessage; + ControlSocket.Close; + Exit; + end; + + SendCommand('USER ' + FUserName + #13 + #10); + Response := GetResponse; + + if Response = 331 then begin + SendCommand('PASS ' + FPassWord + #13 + #10); + Response := GetResponse; + end; + + if Response <> 230 then begin + SetErrorMessage; + FtpQuit; + Exit; + end; + + FConnected := TRUE; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Cwd : Boolean; +var + Response : Integer; +begin + if Length(FHostDirName) > 0 then begin + SendCommand('CWD '+ FHostDirName + #13 + #10); + Response := GetResponse; + + if (Response <> 250) and (response <> 257) then begin + SetErrorMessage; + Result := FALSE; + Exit; + end; + end; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Mkd : Boolean; +var + Response : Integer; +begin + Result := FALSE; + if Length(FHostFileName) > 0 then begin + SendCommand('MKD '+ FHostFileName + #13 + #10); + Response := GetResponse; + + if (response <> 257) then begin + SetErrorMessage; + Exit; + end; + end; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Dele : Boolean; +var + Response: Integer; +begin + if Length(FHostFileName) > 0 then begin + SendCommand('DELE '+ FHostFileName + #13 + #10); + Response := GetResponse; + if (Response <> 250) and (response <> 257) then begin + SetErrorMessage; + Result := FALSE; + Exit; + end; + end; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Rmd : Boolean; +var + Response: Integer; +begin + if Length(FHostFileName) > 0 then begin + SendCommand('RMD '+ FHostFileName + #13 + #10); + Response := GetResponse; + if (Response <> 250) and (Response <> 257) then begin + SetErrorMessage; + Result := FALSE; + Exit; + end; + end; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Ren : Boolean; +var + Response: Integer; +begin + if Length(FHostFileName) > 0 then begin + SendCommand('RNFR '+ FHostFileName + #13 + #10); + Response := GetResponse; + + if (Response <> 350) then begin + SetErrorMessage; + Result := FALSE; + Exit; + end; + + SendCommand('RNTO '+ FLocalFileName + #13 + #10); + Response := GetResponse; + + if (Response <> 250) and (response <> 257) then begin + SetErrorMessage; + Result := FALSE; + Exit; + end; + end; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.TypeSet : Boolean; +var + Response : Integer; +begin + SendCommand('TYPE '+ FType + #13 + #10); + Response := GetResponse; + + if Response = 200 then + Result := TRUE + else begin + SetErrorMessage; + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.SendPort(Port : Integer) : Integer; +var + Msg : String; + saddr : TSockAddrIn; + saddrlen : Integer; + InAddr : TInAddr; +begin + saddrlen := SizeOf(saddr); + ControlSocket.GetSockName(saddr, saddrlen); + InAddr := saddr.sin_addr; + + { Strange behaviour of PWS (FrontPage 97 Web Server for W95) } + { which do not like effective address when localhost is used } + if ControlSocket.sin.sin_addr.s_addr = htonl($7F000001) then + Msg := Format('PORT 127,0,0,1,%d,%d', + [HiByte(port), + LoByte(port)]) + #13 + #10 + else + Msg := Format('PORT %d,%d,%d,%d,%d,%d', + [ord(InAddr.S_un_b.s_b1), + ord(InAddr.S_un_b.s_b2), + ord(InAddr.S_un_b.s_b3), + ord(InAddr.S_un_b.s_b4), + HiByte(port), + LoByte(port)]) + #13 + #10; + + SendCommand(Msg); + Result := GetResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Get : Boolean; +begin + Result := FtpGetFile('RETR', FHostFileName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.FtpGetFile(Cmd, HostFileName : String) : Boolean; +var + Response : Integer; + Port : Integer; + saddr : TSockAddrIn; + saddrlen : Integer; +begin + FMode := FtpReceive; + Result := FALSE; + + AcceptSocket.Proto := 'tcp'; + AcceptSocket.Addr := '0.0.0.0'; { INADDR_ANY } + AcceptSocket.Port := '0'; { IPPORT_ANY } + AcceptSocket.OnSessionAvailable := nil; + AcceptSocket.OnDataAvailable := nil; + AcceptSocket.OnSessionClosed := nil; + + AcceptSocket.Listen; + + AcceptSocket.OnSessionAvailable := FtpGetSessionAvailable; + AcceptSocket.OnDataAvailable := FtpGetDataAvailable; + AcceptSocket.OnSessionClosed := FtpSessionClosed; + + { nul terminate the local file name } + FLocalFileName[Length(FLocalFileName) + 1] := chr(0); + + { open the destination file } + FFileHandle := _lcreat(@FLocalFileName[1], 0); + if FFileHandle = -1 then begin + FErrorMessage := 'Unable to open local file'; +{$IFDEF WIN32} + FErrorMessage := FErrorMessage + ', error ' + + IntToStr(GetLastError); +{$ENDIF} + Display(FErrorMessage); + AcceptSocket.Close; + exit; + end; + + saddrLen := SizeOf(saddr); + AcceptSocket.GetSockName(saddr, saddrLen); + + Port := ntohs(saddr.sin_port); + Response := SendPort(Port); + + if Response <> 200 then begin + SetErrorMessage; + AcceptSocket.Close; + exit; + end; + + if Length(HostFileName) > 0 then + SendCommand(Cmd + ' ' + HostFileName + #13 + #10) + else + SendCommand(Cmd + #13 + #10); + + Response := GetResponse; + ControlSocket.Pause; + + if Response <> 150 then begin + SetErrorMessage; + ControlSocket.Resume; + AcceptSocket.Close; + end + else begin + Display('Receiving data into file ' + FLocalFileName); + while AcceptSocket.State <> wsClosed do + Application.ProcessMessages; + Display('Data received'); + + {* Waiting '226 File sent OK' or '550 Can't read file' *} + ControlSocket.Resume; + Response := GetResponse; + + if ((Response <> 226) and (Response <> 250)) then begin + SetErrorMessage; + _lclose(FFileHandle); + FFileHandle := -1; + ControlSocket.Close; + AcceptSocket.Close; + Display('Failed'); + Exit; + end; + Result := TRUE; + end; + + { close the local file } + _lclose(FFileHandle); + FFileHandle := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Put : Boolean; +var + Response : Integer; + Port : Integer; + saddr : TSockAddrIn; + saddrlen : Integer; +begin + FMode := FtpTransmit; + Result := FALSE; + FSendCount := 0; + + AcceptSocket.Proto := 'tcp'; + AcceptSocket.Addr := '0.0.0.0'; { INADDR_ANY } + AcceptSocket.Port := '0'; { IPPORT_ANY } + AcceptSocket.OnSessionAvailable := nil; + AcceptSocket.OnDataAvailable := nil; + AcceptSocket.OnSessionClosed := nil; + + AcceptSocket.Listen; + + AcceptSocket.OnSessionAvailable := FtpPutSessionAvailable; + AcceptSocket.OnSessionClosed := FtpSessionClosed; + AcceptSocket.OnDataSent := FtpDataSent; + + { nul terminate the local file name } + FLocalFileName[Length(FLocalFileName) + 1] := chr(0); + + { open the local source file } + FFileHandle := _lopen(@FLocalFileName[1], OF_READ); + if FFileHandle = -1 then begin + FErrorMessage := 'Unable to open local file'; +{$IFDEF WIN32} + FErrorMessage := FErrorMessage + ', error ' + + IntToStr(GetLastError); +{$ENDIF} + Display(FErrorMessage); + AcceptSocket.Close; + Exit; + end; + + saddrLen := SizeOf(saddr); + AcceptSocket.GetSockName(saddr, saddrLen); + Port := ntohs(saddr.sin_port); + Response := SendPort(Port); + + if Response <> 200 then begin + SetErrorMessage; + AcceptSocket.Close; + Exit; + end; + + SendCommand('STOR ' + FHostFileName + #13 + #10); + Response := GetResponse; + ControlSocket.Pause; + + if Response <> 150 then begin + SetErrorMessage; + ControlSocket.Resume; + AcceptSocket.Close; + end + else begin + Display('Sending data into file ' + FLocalFileName); + while AcceptSocket.State <> wsClosed do + Application.ProcessMessages; + Display('Data Sent'); + + { Waiting '226 File received OK' } + ControlSocket.Resume; + Response := GetResponse; + + if Response <> 226 then begin + SetErrorMessage; + ControlSocket.Close; + AcceptSocket.Close; + _lclose(FFileHandle); + FFileHandle := -1; + Display('Failed'); + Exit; + end; + Result := TRUE; + end; + + { close the local file } + _lclose(FFileHandle); + FFileHandle := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.SendNextData; +var + Count : Integer; +begin + if FMode <> FtpTransmit then + Exit; + + if not Progress then + Exit; + + Count := _lread(FFileHandle, @FSendBuffer, BLOCK_SIZE); + if Count > 0 then begin + FSendCount := FSendCount + Count; + AcceptSocket.Send(@FSendBuffer, Count); + end + else begin + if Count = HFILE_ERROR then + Display('Error reading file'); + AcceptSocket.Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpClient.FtpDataSent(Sender: TObject; Error : word); +begin + SendNextData; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Quit : Boolean; +begin + {* Send QUIT message to break the FTP session *} + Result := FtpQuit; + if AcceptSocket.State <> wsClosed then + AcceptSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Dir : Boolean; +begin + Result := FtpGetFile('LIST', FHostFileName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Ls : Boolean; +begin + Result := FtpGetFile('NLST', FHostFileName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.FtpHighLevel(Method : TFtpMethod) : Boolean; +const + ResultMsg : array [Boolean] of string = ('Failed', 'Done'); +begin + Result := Connect and Cwd and TypeSet and Method; + Quit; + Display(ResultMsg[Result]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Mkdir : Boolean; +begin + Result := FtpHighLevel(Mkd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Directory : Boolean; +begin + Result := FtpHighLevel(Dir); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.List : Boolean; +begin + Result := FtpHighLevel(Ls); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Receive : Boolean; +begin + Result := FtpHighLevel(Get); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Transmit : Boolean; +begin + Result := FtpHighLevel(Put); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Delete : Boolean; +begin + Result := FtpHighLevel(Dele); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Rmdir : Boolean; +begin + Result := FtpHighLevel(Rmd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TFtpClient.Rename : Boolean; +begin + Result := FtpHighLevel(Ren); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/FTPTST.DPR b/lib/telnet/FTPTST.DPR new file mode 100644 index 00000000..404c0837 --- /dev/null +++ b/lib/telnet/FTPTST.DPR @@ -0,0 +1,14 @@ +program Ftptst; + +uses + Forms, + Ftptst1 in 'FTPTST1.PAS' {FtpReceiveForm}, + Ftptst2 in 'Ftptst2.pas' {DirectoryForm}; + +{$R *.RES} + +begin + Application.CreateForm(TFtpReceiveForm, FtpReceiveForm); + Application.CreateForm(TDirectoryForm, DirectoryForm); + Application.Run; +end. diff --git a/lib/telnet/FTPTST1.DFM b/lib/telnet/FTPTST1.DFM new file mode 100644 index 00000000..d26a96a6 Binary files /dev/null and b/lib/telnet/FTPTST1.DFM differ diff --git a/lib/telnet/FTPTST1.PAS b/lib/telnet/FTPTST1.PAS new file mode 100644 index 00000000..6d02e32d --- /dev/null +++ b/lib/telnet/FTPTST1.PAS @@ -0,0 +1,386 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Email: francois.piette@ping.be http://www.rtfm.be/fpiette + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Copyright: You can use this software freely, at your own risks +Creation: Aug 1997 +Object: Demo for TFtpClient object (RFC 959 implementation) + It is a graphical FTP client program + Compatible with Delphi 1, 2 and 3 +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 13, 97 Added directory functions + Added button to show how to makes several transferts in one session +Sep 27, 97 Change identifiers names to be more standard with other sources + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Ftptst1; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, FtpCli, StdCtrls, Wait; + +type + TFtpReceiveForm = class(TForm) + QuitButton: TButton; + HostNameEdit: TEdit; + Label1: TLabel; + HostFileEdit: TEdit; + Label3: TLabel; + UserNameEdit: TEdit; + PassWordEdit: TEdit; + Label4: TLabel; + Label5: TLabel; + ReceiveButton: TButton; + DisplayMemo: TMemo; + cbDisplay: TCheckBox; + LocalFileEdit: TEdit; + Label2: TLabel; + cbBinary: TCheckBox; + HostDirEdit: TEdit; + Wait1: TWait; + FtpClient1: TFtpClient; + SendButton: TButton; + InfoLabel: TLabel; + DirectoryButton: TButton; + ListButton: TButton; + TestButton: TButton; + AbortButton: TButton; + MkdirButton: TButton; + RmdirButton: TButton; + DeleteButton: TButton; + RenameButton: TButton; + procedure QuitButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure ReceiveButtonClick(Sender: TObject); + procedure Display(Sender: TObject; var Msg : String); + procedure FormResize(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure FtpClient1Progress(Sender: TObject; Count: Longint; + var Abort: Boolean); + procedure DirectoryButtonClick(Sender: TObject); + procedure ListButtonClick(Sender: TObject); + procedure TestButtonClick(Sender: TObject); + procedure AbortButtonClick(Sender: TObject); + procedure MkdirButtonClick(Sender: TObject); + procedure RmdirButtonClick(Sender: TObject); + procedure DeleteButtonClick(Sender: TObject); + procedure RenameButtonClick(Sender: TObject); + private + public + end; + +const + TEMP_FILE_NAME = 'FTPDIR.TXT'; + +var + FtpReceiveForm: TFtpReceiveForm; + +implementation + +uses + FtpTst2; + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.QuitButtonClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FormCreate(Sender: TObject); +begin + DisplayMemo.Clear; + FtpClient1.Left := -32; + InfoLabel.Caption := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.Display(Sender : TObject; var Msg : String); +begin + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ReceiveButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + + ReceiveButton.Enabled := FALSE; + SendButton.Enabled := FALSE; + DisplayMemo.Lines.Add('Trying to connect'); + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := Display; + FtpClient1.Receive; + DisplayMemo.Lines.Add(FtpClient1.ErrorMessage); + SendButton.Enabled := TRUE; + ReceiveButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.SendButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + + SendButton.Enabled := FALSE; + ReceiveButton.Enabled := FALSE; + DisplayMemo.Lines.Add('Trying to connect'); + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.Binary := cbBinary.Checked; + FtpClient1.DisplayFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := Display; + FtpClient1.Transmit; + DisplayMemo.Lines.Add(FtpClient1.ErrorMessage); + SendButton.Enabled := TRUE; + ReceiveButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FormResize(Sender: TObject); +begin + DisplayMemo.Width := ClientWidth - (2 * QuitButton.Width) - 24; + DisplayMemo.Height := ClientHeight - DisplayMemo.Top - 6; + QuitButton.Left := DisplayMemo.Left + DisplayMemo.Width + 6; //ClientWidth - (2 * QuitButton.Width); + ReceiveButton.Left := QuitButton.Left; + SendButton.Left := QuitButton.Left; + DirectoryButton.left:= QuitButton.Left; + ListButton.Left := QuitButton.Left; + TestButton.Left := QuitButton.Left; + AbortButton.Left := QuitButton.Left; + MkdirButton.Left := QuitButton.Left; + InfoLabel.Left := QuitButton.Left; + Wait1.Left := QuitButton.Left; + Wait1.Width := QuitButton.Width; + QuitButton.Top := ClientHeight - QuitButton.Height - 6; + ReceiveButton.Top := QuitButton.Top - ReceiveButton.Height - 6; + SendButton.Top := ReceiveButton.Top - SendButton.Height - 6; + DirectoryButton.Top := SendButton.Top - DirectoryButton.Height - 6; + ListButton.Top := DirectoryButton.Top - ListButton.Height - 6; + TestButton.Top := ListButton.Top - TestButton.Height - 6; + AbortButton.Top := TestButton.Top - AbortButton.Height - 6; + MkdirButton.Top := AbortButton.Top - MkdirButton.Height - 6; + HostFileEdit.Width := ClientWidth - HostFileEdit.Left - 6; + LocalFileEdit.Width := ClientWidth - LocalFileEdit.Left - 6; + + RmdirButton.Left := QuitButton.Left + QuitButton.Width + 6; + RmdirButton.Top := MkdirButton.Top; + DeleteButton.Left := RmdirButton.Left; + DeleteButton.Top := AbortButton.Top; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.FtpClient1Progress(Sender: TObject; + Count: Longint; var Abort: Boolean); +begin + InfoLabel.Caption := IntToStr(Count); + InfoLabel.Repaint; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DirectoryButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + + ReceiveButton.Enabled := FALSE; + SendButton.Enabled := FALSE; + DisplayMemo.Lines.Add('Trying to connect'); + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := TEMP_FILE_NAME; + FtpClient1.Binary := FALSE; + FtpClient1.DisplayFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := Display; + FtpClient1.Directory; + DisplayMemo.Lines.Add(FtpClient1.ErrorMessage); + try + DirectoryForm.DirListBox.Items.LoadFromFile(TEMP_FILE_NAME); + except + DirectoryForm.DirListBox.Clear; + end; + DirectoryForm.ShowModal; + SendButton.Enabled := TRUE; + ReceiveButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.ListButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + + ReceiveButton.Enabled := FALSE; + SendButton.Enabled := FALSE; + DisplayMemo.Lines.Add('Trying to connect'); + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := TEMP_FILE_NAME; + FtpClient1.Binary := FALSE; + FtpClient1.DisplayFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := Display; + FtpClient1.List; + DisplayMemo.Lines.Add(FtpClient1.ErrorMessage); + DirectoryForm.DirListBox.Items.LoadFromFile(TEMP_FILE_NAME); + DirectoryForm.ShowModal; + SendButton.Enabled := TRUE; + ReceiveButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.TestButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.Binary := FALSE; + FtpClient1.DisplayFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := Display; + if not FtpClient1.Connect then + Exit; + if not FtpClient1.Cwd then + Exit; + + FtpClient1.HostFileName := 'UPLOAD.TXT'; + FtpClient1.LocalFileName := 'upload.txt'; + FtpClient1.Get; + + FtpClient1.HostFileName := 'CDROMS.TXT'; + FtpClient1.LocalFileName := 'cdroms.txt'; + FtpClient1.Get; + + FtpClient1.Quit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.AbortButtonClick(Sender: TObject); +begin + if not FtpClient1.IsConnected then + DisplayMemo.Lines.Add('Not connected !') + else begin + FtpClient1.Abort; + DisplayMemo.Lines.Add('***** Aborted by user request *****'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.MkdirButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := Display; + if not FtpClient1.Mkdir then + Exit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RmdirButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := Display; + if not FtpClient1.Rmdir then + Exit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.DeleteButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.DisplayFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := Display; + if not FtpClient1.Delete then + Exit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TFtpReceiveForm.RenameButtonClick(Sender: TObject); +begin + FtpClient1.HostName := HostNameEdit.Text; + FtpClient1.UserName := UserNameEdit.Text; + FtpClient1.PassWord := PassWordEdit.Text; + FtpClient1.HostDirName := HostDirEdit.Text; + FtpClient1.HostFileName := HostFileEdit.Text; + FtpClient1.LocalFileName := LocalFileEdit.Text; + FtpClient1.DisplayFlag := cbDisplay.Checked; + FtpClient1.OnDisplay := Display; + if not FtpClient1.Rename then + Exit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/FTPTST2.DFM b/lib/telnet/FTPTST2.DFM new file mode 100644 index 00000000..30271d9e Binary files /dev/null and b/lib/telnet/FTPTST2.DFM differ diff --git a/lib/telnet/FTPTST2.PAS b/lib/telnet/FTPTST2.PAS new file mode 100644 index 00000000..dc05939f --- /dev/null +++ b/lib/telnet/FTPTST2.PAS @@ -0,0 +1,25 @@ +unit Ftptst2; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls; + +type + TDirectoryForm = class(TForm) + DirListBox: TListBox; + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + DirectoryForm: TDirectoryForm; + +implementation + +{$R *.DFM} + +end. diff --git a/lib/telnet/FormPos.dcu b/lib/telnet/FormPos.dcu new file mode 100644 index 00000000..4f341499 Binary files /dev/null and b/lib/telnet/FormPos.dcu differ diff --git a/lib/telnet/HTTPPG.DPR b/lib/telnet/HTTPPG.DPR new file mode 100644 index 00000000..ac6959cf --- /dev/null +++ b/lib/telnet/HTTPPG.DPR @@ -0,0 +1,13 @@ +program HttpPg; + +uses + Forms, + HttpPg1 in 'HttpPg1.pas' {HttpTestForm}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(THttpTestForm, HttpTestForm); + Application.Run; +end. diff --git a/lib/telnet/HTTPPG1.DFM b/lib/telnet/HTTPPG1.DFM new file mode 100644 index 00000000..c01428ad Binary files /dev/null and b/lib/telnet/HTTPPG1.DFM differ diff --git a/lib/telnet/HTTPPG1.PAS b/lib/telnet/HTTPPG1.PAS new file mode 100644 index 00000000..31d34d2b --- /dev/null +++ b/lib/telnet/HTTPPG1.PAS @@ -0,0 +1,142 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Email: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: December 4, 1997 +Version: 1.00 +Description: Sample program to demonstrate some of the THttpCli features. + (POST a message to a CGI) + (requested by Walter Daniel Leon Salas" +) +Support: There is a mailing list for support. See web site for + subscription http://www.rtfm.be/fpiette/supportuk.htm +Legal issues: Copyright (C) 1997 by Franois PIETTE + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, +and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit HttpPg1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, WSocket, HttpProt; + +type + THttpTestForm = class(TForm) + UserIDEdit: TEdit; + EMailEdit: TEdit; + MessageEdit: TEdit; + SendButton: TButton; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + HttpCli1: THttpCli; + procedure FormCreate(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + HttpTestForm: THttpTestForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.FormCreate(Sender: TObject); +begin + UserIDEdit.Text := '27313'; + EMailEdit.Text := 'francois.piette@ping.be'; + MessageEdit.Text := 'Hello World !'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Encode(const msg : String) : String; +var + I : Integer; +begin + Result := ''; + for I := 1 to Length(msg) do begin + if msg[I] = ' ' then + Result := Result + '+' + else if msg[I] in ['a'..'z', 'A'..'Z'] then + Result := Result + '%' + IntToHex(ord(msg[I]), 2) + else + Result := Result + msg[I]; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.SendButtonClick(Sender: TObject); +var + DataIn : TMemoryStream; + DataOut : TMemoryStream; + Buf : String; +begin + DataIn := TMemoryStream.Create; + DataOut := TMemoryStream.Create; + try + Buf := 'ID=' + UserIDEdit.Text + + '&REMITE=' + EMailEdit.Text + + '&MENSAJE=' + Encode(MessageEdit.Text); + DataOut.Write(Buf[1], Length(Buf)); + DataOut.Seek(0, soFromBeginning); + + httpcli1.SendStream := DataOut; + httpcli1.RcvdStream := DataIn; + httpcli1.Proxy := ''; + httpcli1.ProxyPort := '80'; + HttpCli1.URL := 'http://www.unired.net.pe/cgi-bin/a.out'; + + SendButton.Enabled := FALSE; + try + httpcli1.Post; + finally + SendButton.Enabled := TRUE; + end; + finally + DataOut.Free; + DataIn.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} diff --git a/lib/telnet/HTTPPROT.DCR b/lib/telnet/HTTPPROT.DCR new file mode 100644 index 00000000..31887652 Binary files /dev/null and b/lib/telnet/HTTPPROT.DCR differ diff --git a/lib/telnet/HTTPPROT.PAS b/lib/telnet/HTTPPROT.PAS new file mode 100644 index 00000000..96436232 --- /dev/null +++ b/lib/telnet/HTTPPROT.PAS @@ -0,0 +1,893 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA + BETA BETA + BETA THIS IS BETA CODE. USE ONLY FOR TESTING BETA + BETA EVERYTHING CAN CHANGE IN THE REALEASE VERSION BETA + BETA BETA + BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA + +Author: Franois PIETTE +Email: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: November 23, 1997 +Version: 0.95 BETA +Description: THttpCli is an implementation for the HTTP protocol + RFC 1945 (V1.0), RFC 2068 (V1.1) +Support: There is a mailing list for support. See web site for + subscription http://www.rtfm.be/fpiette/supportuk.htm +Credit: This component is based on a freeware from by Andreas Hoerstemeier + and used with his permission. + andy@hoerstemeier.de http://www.westend.de/~hoerstemeier +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +11/29/97 RcvdStream and SendStream properties moved to public section +11/30/97 Document name bug corrected +12/02/97 Removed bug occuring with terminating slash in docname +12/03/97 Added properties RcvdCount and SentCount to easily add a progress + bar feature (On receive, the ContentLength is initialized with the + value from the header. Update the progress bar in the OnDocData event, + or the OnSendData event). + Added the OnSendBegin, OnSendData and OnSendEnd events. +12/07/97 Corrected Head function to work as expected. Thanks to + R. Barry Jones ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'; + bin2b64 : String = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + uue2bin : String = ' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ '; + b642bin : String = '~~~~~~~~~~~^~~~_TUVWXYZ[\]~~~|~~~ !"#$%&''()*+,-./0123456789~~~~~~:;<=>?@ABCDEFGHIJKLMNOPQRS'; + linesize = 45; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [THttpCli]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor EHttpException.Create(const Msg : String; ErrCode : Word); +begin + Inherited Create(Msg); + ErrorCode := ErrCode; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor THttpCli.Create(Aowner:TComponent); +begin + inherited create(AOwner); + FWait := TWait.Create(Self); + FWSocket := TWSocket.Create(Self); + FWSocket.WaitCtrl := FWait; + FTimeout := 15; + FProxyPort := DefaultProxyPort; + FContentPost := 'application/x-www-form-urlencoded'; + FDoAuthor := TStringlist.Create; + FWSocket.OnSessionClosed := SocketSessionClosed; + FRcvdHeader := TStringList.Create; + FReqStream := TMemoryStream.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor THttpCli.Destroy; +begin + FDoAuthor.Free; + FWSocket.Free; + FWait.Free; + FRcvdHeader.Free; + FReqStream.Free; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerDocBegin; +begin + if Assigned(FOnDocBegin) then + FOnDocBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerDocEnd; +begin + if Assigned(FOnDocEnd) then + FOnDocEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerDocData(Data : Pointer; Len : Integer); +begin + if Assigned(FOnDocData) then + FOnDocData(Self, Data, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerSendBegin; +begin + if Assigned(FOnSendBegin) then + FOnSendBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerSendEnd; +begin + if Assigned(FOnSendEnd) then + FOnSendEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerSendData(Data : Pointer; Len : Integer); +begin + if Assigned(FOnSendData) then + FOnSendData(Self, Data, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerHeaderBegin; +begin + if Assigned(FOnHeaderBegin) then + FOnHeaderBegin(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.TriggerHeaderEnd; +begin + if Assigned(FOnHeaderEnd) then + FOnHeaderEnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure ReplaceExt(var FName : String; const newExt : String); +var + I : Integer; +begin + I := Posn('.', FName, -1); + if I <= 0 then + FName := FName + '.' + newExt + else + FName := Copy(FName, 1, I) + newExt; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.Login; +begin + if FConnected then + Logout; + FWSocket.Addr := FHostName; + FWSocket.Port := FPort; + FWSocket.Proto := 'tcp'; + FWSocket.Connect; + FWSocket.Wait(FTimeout, wsConnected); + FConnected := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.Logout; +begin + FWSocket.Close; + FConnected := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SendCommand(const Cmd : String); +const + CRLF : String[2] = #13#10; +begin + if Assigned(FOnCommand) then + FOnCommand(Self, Cmd); + FReqStream.Write(Cmd[1], Length(Cmd)); + FReqStream.Write(CRLF[1], 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SendRequest(const Method, Version: String); +begin + FReqStream.Clear; + TriggerHeaderBegin; + SendCommand(method + ' ' + FPath + ' HTTP/' + Version); + if FSender <> '' then + SendCommand('From: ' + FSender); + if FReference <> '' then + SendCommand('Referer: ' + FReference); + if FAgent <> '' then + SendCommand('User-Agent: ' + FAgent); + if FNoCache then + SendCommand('Pragma: no-cache'); + if method = 'POST' then begin + SendCommand('Content-Length: ' + IntToStr(SendStream.Size)); + if FContentPost <> '' then + SendCommand('Content-Type: ' + FContentPost); + end; +{ SendCommand('Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*'); } +{ SendCommand('Accept-Language: fr,en'); } +{ SendCommand('UA-pixels: 1024x768'); } +{ SendCommand('UA-color: color8'); } + SendCommand('Host: ' + FTargetHost); + if FUsername <> '' then + SendCommand('Authorization: Basic ' + + EncodeStr(encBase64, FUsername + ':' + FPassword)); + + TriggerHeaderEnd; + SendCommand(''); + FWSocket.Send(FReqStream.Memory, FReqStream.Size); + FReqStream.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.GetAnswer; +var + proto : String; + user : String; + pass : String; + port : String; + Field : String; + Data : String; + nSep : Integer; + bFirst : Boolean; +begin + FDoAuthor.Clear; + FContentType := ''; + FContentLength := 0; + bFirst := TRUE; + FLocationFlag := FALSE; + FRcvdHeader.Clear; + while TRUE do begin + FWSocket.ReadLine(FTimeout, FAnswerLine); + + if FWSocket.State <> wsConnected then + break; + + if Assigned(FOnAnswerLine) then + FOnAnswerLine(Self); + + if Length(FAnswerLine) <= 0 then + break; { End of answer } + + if bFirst then begin + bFirst := FALSE; + TriggerHeaderBegin; + end; + + FRcvdHeader.Add(FAnswerLine); + + nSep := pos(':', FAnswerLine); + if Copy(FAnswerLine, 1, 8) = 'HTTP/1.0' then begin + FStatusCode := StrToInt(Copy(FAnswerLine, 10, 3)); + FReasonPhrase := Copy(FAnswerLine, 14, Length(FAnswerLine)); + if FStatusCode >= 400 then + break; { HTTP error returned } + end + else if nSep > 0 then begin + Field := LowerCase(Copy(FAnswerLine, 1, nSep - 1)); + Data := Copy(FAnswerLine, nSep + 2, Length(FAnswerLine)); + if Field = 'location' then begin { Change the URL ! } + FLocationFlag := TRUE; + if proxy <> '' then + FPath := Data { it goes via a proxy, so just change the uri } + else begin + ParseURL(Data, proto, user, pass, FHostName, port, FPath); + if port <> '' then + FPort := port; + end; + end + else if Field = 'content-length' then + FContentLength := StrToInt(Data) + else if Field = 'content-type' then + FContentType := Data + else if Field = 'www-authenticate' then + FDoAuthor.add(Data) + { else if Field = 'date' then } + { else if Field = 'mime-version' then } + { else if Field = 'pragma' then } + { else if Field = 'allow' then } + { else if Field = 'server' then } + { else if Field = 'content-encoding' then } + { else if Field = 'expires' then } + { else if Field = 'last-modified' then } + end + else { Ignore all other responses } + ; + end; + + if FStatusCode >= 400 then + raise EHttpException.Create(FReasonPhrase, FStatusCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.Get; +begin + DoRequest(httpGET); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.Head; +begin + DoRequest(httpHEAD); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.Post; +begin + DoRequest(httpPOST); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.DoRequest(rq : THttpRequest); +var + Document, Proto, User, Pass, Host, Port, Path: String; +begin + Document := ''; + FStatusCode := 0; + FRcvdCount := 0; + FSentCount := 0; + + { parse url and proxy to FHostName, FPath and FPort } + if FProxy <> '' then begin + ParseURL(FURL, Proto, User, Pass, Host, Port, Path); + FTargetHost := Host; + FPath := FURL; + Document := Path; + if User <> '' then + FUserName := User; + if Pass <> '' then + FPassword := Pass; + if Proto = '' then + FPath := 'http://'+FPath; + ParseURL(FProxy, Proto, User, Pass, Host, Port, Path); + if Port = '' then + Port := ProxyPort; + end + else begin + ParseURL(FURL, Proto, User, Pass, Host, Port, FPath); + FTargetHost := Host; + Document := FPath; + if User <> '' then + FUserName := User; + if Pass <> '' then + FPassword := Pass; + if Port = '' then + Port := '80'; + end; + if Proto = '' then + Proto := 'http'; + if FPath = '' then + FPath := '/'; + if (Document = '') or (Document = '/') then + Document := 'document.htm' + else begin + if Document[Length(Document)] = '/' then + SetLength(Document, Length(Document) - 1); + Document := Copy(Document, Posn('/', Document, -1) + 1, 255); + end; + + FHostName := host; + FPort := Port; + + Login; + try + while TRUE do begin + case Rq of + httpPOST: + begin + SendRequest('POST', '1.0'); + TriggerSendBegin; + try + SendData; + finally + TriggerSendEnd; + end; + end; + httpGET, + httpHEAD: + begin + SendRequest('GET', '1.0'); + end; + end; + GetAnswer; + if not FLocationFlag then + break; + Login; { This will Logout automatically } + end; + + if lowercase(ExtractFileExt(Document)) = '.exe' then begin + if FContentType = 'text/html' then + ReplaceExt(Document, 'htm'); + end; + FDocName := Document; + + if Rq in [httpGET, httpPOST] then begin + TriggerDocBegin; + try + ReceiveData; + finally + TriggerDocEnd; + end; + end; + finally + Logout; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SocketSessionClosed(Sender: TObject; Error: Word); +begin + FConnected := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.ReceiveDataDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; +begin + Len := FWSocket.Receive(@FBuffer, sizeof(FBuffer)); + if Len > 0 then begin + FRcvdCount := FRcvdCount + Len; + TriggerDocData(@FBuffer, Len); + if Assigned(FRcvdStream) then + FRcvdStream.WriteBuffer(FBuffer, Len); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.SendData; +var + Len : Integer; +begin + repeat + Len := FSendStream.Read(FBuffer, sizeof(FBuffer)); + if Len > 0 then begin + FSentCount := FSentCount + Len; + TriggerSendData(@FBuffer, Len); + FWSocket.Send(@FBuffer, Len); + end; + until Len <= 0; + FWSocket.Flush; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpCli.ReceiveData; +var + OldDataAvailable : TDataAvailable; +begin + OldDataAvailable := FWSocket.OnDataAvailable; + FWSocket.OnDataAvailable := ReceiveDataDataAvailable; + try + while FWSocket.State = wsConnected do + Application.ProcessMessages; + finally + FWSocket.OnDataAvailable := OldDataAvailable; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Syntax of an URL: protocol://[user[:password]@]server[:port]/path } +procedure ParseURL( + const url : String; + var Proto, User, Pass, Host, Port, Path : String); +var + p, q : Integer; + s : String; +begin + proto := ''; + User := ''; + Pass := ''; + Host := ''; + Port := ''; + Path := ''; + + p := pos('://',url); + if p = 0 then begin + if lowercase(Copy(url,1,7)) = 'mailto:' then begin + proto := 'mailto'; + p := pos(':', url); + end; + end + else begin + proto := Copy(url, 1, p - 1); + inc(p, 2); + end; + s := Copy(url, p + 1, Length(url)); + + p := pos('/', s); + if p = 0 then + p := Length(s) + 1; + Path := Copy(s, p, Length(s)); + s := Copy(s, 1, p-1); + + p := Posn(':', s, -1); + if p > Length(s) then + p := 0; + q := Posn('@', s, -1); + if q > Length(s) then + q := 0; + if (p = 0) and (q = 0) then begin { no user, password or port } + Host := s; + Exit; + end + else if q < p then begin { a port given } + Port := Copy(s, p + 1, Length(s)); + Host := Copy(s, q + 1, p - q - 1); + if q = 0 then + Exit; { no user, password } + s := Copy(s, 1, q - 1); + end + else begin + Host := Copy(s, q + 1, Length(s)); + s := Copy(s, 1, q - 1); + end; + p := pos(':', s); + if p = 0 then + User := s + else begin + User := Copy(s, 1, p - 1); + Pass := Copy(s, p + 1, Length(s)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function EncodeStr(Encoding : THttpEncoding; const Value : String) : String; +begin + Result := EncodeLine(Encoding, @Value[1], Length(Value)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function EncodeLine( + Encoding : THttpEncoding; + SrcData : PChar; + Size : Integer) : String; +var + Offset : Integer; + Pos1 : Integer; + Pos2 : Integer; + I : Integer; +begin + SetLength(Result, Size * 4 div 3 + 4); + FillChar(Result[1], Size * 4 div 3 + 2, #0); + + if Encoding = encUUEncode then begin + Result[1] := Char(((Size - 1) and $3f) + $21); + Size := ((Size + 2) div 3) * 3; + end; + Offset := 2; + Pos1 := 0; + Pos2 := 0; + case Encoding of + encUUEncode: Pos2 := 2; + encBase64, encMime: Pos2 := 1; + end; + Result[Pos2] := #0; + + while Pos1 < Size do begin + if Offset > 0 then begin + Result[Pos2] := Char(ord(Result[Pos2]) or + ((ord(SrcData[Pos1]) and + ($3f shl Offset)) shr Offset)); + Offset := Offset - 6; + Inc(Pos2); + Result[Pos2] := #0; + end + else if Offset < 0 then begin + Offset := Abs(Offset); + Result[Pos2] := Char(ord(Result[Pos2]) or + ((ord(SrcData[Pos1]) and + ($3f shr Offset)) shl Offset)); + Offset := 8 - Offset; + Inc(Pos1); + end + else begin + Result[Pos2] := Char(ord(Result[Pos2]) or + ((ord(SrcData[Pos1]) and $3f))); + Inc(Pos2); + Inc(Pos1); + Result[Pos2] := #0; + Offset := 2; + end; + end; + + case Encoding of + encUUEncode: + begin + if Offset = 2 then + Dec(Pos2); + for i := 2 to Pos2 do + Result[i] := bin2uue[ord(Result[i])+1]; + end; + encBase64, encMime: + begin + if Offset = 2 then + Dec(Pos2); + for i := 1 to Pos2 do + Result[i] := bin2b64[ord(Result[i])+1]; + while (Pos2 and 3) <> 0 do begin + Inc(Pos2); + Result[Pos2] := '='; + end; + end; + end; + SetLength(Result, Pos2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Find the count'th occurence of the s string in the t string. } +{ If count < 0 then look from the back } +function Posn(const s , t : String; Count : Integer) : Integer; +var + i, h, Last : Integer; + u : String; +begin + u := t; + if Count > 0 then begin + Result := Length(t); + for i := 1 to Count do begin + h := Pos(s, u); + if h > 0 then + u := Copy(u, h + 1, Length(u)) + else begin + u := ''; + Inc(Result); + end; + end; + Result := Result - Length(u); + end + else if Count < 0 then begin + Last := 0; + for i := Length(t) downto 1 do begin + u := Copy(t, i, Length(t)); + h := Pos(s, u); + if (h <> 0) and ((h + i) <> Last) then begin + Last := h + i - 1; + Inc(count); + if Count = 0 then + break; + end; + end; + if Count = 0 then + Result := Last + else + Result := 0; + end + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/HTTPTST.DPR b/lib/telnet/HTTPTST.DPR new file mode 100644 index 00000000..b30d5856 --- /dev/null +++ b/lib/telnet/HTTPTST.DPR @@ -0,0 +1,12 @@ +program HttpTst; + +uses + Forms, + httptst1 in 'httptst1.pas' {HttpTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(THttpTestForm, HttpTestForm); + Application.Run; +end. diff --git a/lib/telnet/HTTPTST1.DFM b/lib/telnet/HTTPTST1.DFM new file mode 100644 index 00000000..42317d56 Binary files /dev/null and b/lib/telnet/HTTPTST1.DFM differ diff --git a/lib/telnet/HTTPTST1.PAS b/lib/telnet/HTTPTST1.PAS new file mode 100644 index 00000000..52fc3907 --- /dev/null +++ b/lib/telnet/HTTPTST1.PAS @@ -0,0 +1,240 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA + BETA BETA + BETA THIS IS BETA CODE. USE ONLY FOR TESTING BETA + BETA EVERYTHING CAN CHANGE IN THE REALEASE VERSION BETA + BETA BETA + BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA + +Author: Franois PIETTE +Email: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: November 23, 1997 +Version: 0.91 BETA +Description: Sample program to demonstrate some of the THttpCli features. +Support: There is a mailing list for support. See web site for + subscription http://www.rtfm.be/fpiette/supportuk.htm +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA + BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA BETA + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit httptst1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, HttpProt, WSocket, StdCtrls, ExtCtrls, IniFiles; + +const + IniFileName = 'httptest'; + +type + THttpTestForm = class(TForm) + Panel1: TPanel; + GetButton: TButton; + HttpCli1: THttpCli; + URLEdit: TEdit; + DisplayMemo: TMemo; + Label1: TLabel; + Label2: TLabel; + ProxyHostEdit: TEdit; + ProxyPortEdit: TEdit; + PostButton: TButton; + Check64Button: TButton; + DataEdit: TEdit; + Label3: TLabel; + procedure GetButtonClick(Sender: TObject); + procedure HttpCli1AnswerLine(Sender: TObject); + procedure HttpCli1Command(Sender: TObject; const s: String); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormShow(Sender: TObject); + procedure HttpCli1DocBegin(Sender: TObject); + procedure HttpCli1DocEnd(Sender: TObject); + procedure PostButtonClick(Sender: TObject); + procedure Check64ButtonClick(Sender: TObject); + private + { Dclarations prives } + Initialized : Boolean; + public + { Dclarations publiques } + end; + +var + HttpTestForm: THttpTestForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; +begin + if not Initialized then begin + Initialized := TRUE; + IniFile := TIniFile.Create(IniFileName); + URLEdit.Text := IniFile.ReadString('Data', 'URL', ''); + ProxyHostEdit.Text := IniFile.ReadString('Data', 'ProxyHost', ''); + ProxyPortEdit.Text := IniFile.ReadString('Data', 'ProxyPort', '80'); + DataEdit.Text := IniFile.ReadString('Data', 'Data', ''); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.FormClose(Sender: TObject; + var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteString('Data', 'URL', URLEdit.Text); + IniFile.WriteString('Data', 'ProxyHost', ProxyHostEdit.Text); + IniFile.WriteString('Data', 'ProxyPort', ProxyPortEdit.Text); + IniFile.WriteString('Data', 'Data', DataEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.GetButtonClick(Sender: TObject); +var + I : Integer; +begin + DisplayMemo.Clear; + + httpcli1.URL := URLEdit.Text; + httpcli1.Proxy := ProxyHostEdit.Text; + httpcli1.ProxyPort := ProxyPortEdit.Text; + httpcli1.RcvdStream := nil; + httpcli1.Get; + + for I := 0 to httpcli1.RcvdHeader.Count - 1 do + DisplayMemo.Lines.Add('hdr>' + httpcli1.RcvdHeader.Strings[I]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.PostButtonClick(Sender: TObject); +var + Data : TMemoryStream; + Buf : String; +begin + DisplayMemo.Clear; + Data := TMemoryStream.Create; + Buf := DataEdit.Text; + Data.Write(Buf[1], Length(Buf)); + Data.Seek(0, soFromBeginning); + + httpcli1.SendStream := Data; + httpcli1.Proxy := ProxyHostEdit.Text; + httpcli1.ProxyPort := ProxyPortEdit.Text; + httpcli1.URL := URLEdit.Text; + httpcli1.Post; + + Data.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1AnswerLine(Sender: TObject); +begin + DisplayMemo.Lines.Add(HttpCli1.AnswerLine); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1Command(Sender: TObject; const s: String); +begin + DisplayMemo.Lines.Add('cmd> ' + s); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1DocBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add(HttpCli1.ContentType + ' => ' + httpcli1.DocName); + DisplayMemo.Lines.Add('Document = ' + httpcli1.DocName); + httpcli1.RcvdStream := TFileStream.Create(httpcli1.DocName, fmCreate); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.HttpCli1DocEnd(Sender: TObject); +begin + if httpcli1.RcvdStream <> nil then begin + httpcli1.RcvdStream.Free; + httpcli1.RcvdStream := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure THttpTestForm.Check64ButtonClick(Sender: TObject); +const + Inp : String = 'Aladdin:open sesame'; + Res : String = 'QWxhZGRpbjpvcGVuIHNlc2FtZQ=='; +begin + if EncodeLine(encBase64, @Inp[1], Length(Inp)) <> Res then + DisplayMemo.Lines.Add('Base64 encoding do not work !') + else + DisplayMemo.Lines.Add('Base64 encoding works OK !'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure LoadMemoFromMemoryStream(Memo : TMemo; Stream : TMemoryStream); +var + p, q, r : PChar; +begin + p := Stream.Memory; + q := p + Stream.Size - 1; + r := p; + while (p <> nil) and (p < q) do begin + while (p < q) and (p^<> #13) do + Inc(p); + Memo.Lines.Add(Copy(StrPas(r), 1, p - r)); + if (p[0] = #13) and (p[1] = #10) then + Inc(p, 2) + else + Inc(p); + r := p; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/ICMP.PAS b/lib/telnet/ICMP.PAS new file mode 100644 index 00000000..dfd97ade --- /dev/null +++ b/lib/telnet/ICMP.PAS @@ -0,0 +1,435 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This unit encapsulate the ICMP.DLL into an object of type TICMP. + Using this object, you can easily ping any host on your network. + Works only in 32 bits mode (no Delphi 1) under NT or 95. + TICMP is perfect for a console mode program, but if you build a + GUI program, you could use the TPing object wich is a true VCL + encapsulating the TICMP object. Then you can use object inspector + to change properties or event handler. This is much simpler to + use for a GUI program. +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: January 6, 1997 +Version: 1.01 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 13, 1997 V1.01 Added OnEchoRequest and OnEchoReply events and removed the + corresponding OnDisplay event. This require to modify existing + programs. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit icmp; + +interface + +{$IFDEF VER80} +// This source file is *NOT* compatible with Delphi 1 because it uses +// Win 32 features. +{$ENDIF} + +uses + Windows, SysUtils, Classes, WinSock; + +const + IcmpVersion = 101; + IcmpDLL = 'icmp.dll'; + + // IP status codes returned to transports and user IOCTLs. + IP_SUCCESS = 0; + IP_STATUS_BASE = 11000; + IP_BUF_TOO_SMALL = (IP_STATUS_BASE + 1); + IP_DEST_NET_UNREACHABLE = (IP_STATUS_BASE + 2); + IP_DEST_HOST_UNREACHABLE = (IP_STATUS_BASE + 3); + IP_DEST_PROT_UNREACHABLE = (IP_STATUS_BASE + 4); + IP_DEST_PORT_UNREACHABLE = (IP_STATUS_BASE + 5); + IP_NO_RESOURCES = (IP_STATUS_BASE + 6); + IP_BAD_OPTION = (IP_STATUS_BASE + 7); + IP_HW_ERROR = (IP_STATUS_BASE + 8); + IP_PACKET_TOO_BIG = (IP_STATUS_BASE + 9); + IP_REQ_TIMED_OUT = (IP_STATUS_BASE + 10); + IP_BAD_REQ = (IP_STATUS_BASE + 11); + IP_BAD_ROUTE = (IP_STATUS_BASE + 12); + IP_TTL_EXPIRED_TRANSIT = (IP_STATUS_BASE + 13); + IP_TTL_EXPIRED_REASSEM = (IP_STATUS_BASE + 14); + IP_PARAM_PROBLEM = (IP_STATUS_BASE + 15); + IP_SOURCE_QUENCH = (IP_STATUS_BASE + 16); + IP_OPTION_TOO_BIG = (IP_STATUS_BASE + 17); + IP_BAD_DESTINATION = (IP_STATUS_BASE + 18); + + // status codes passed up on status indications. + IP_ADDR_DELETED = (IP_STATUS_BASE + 19); + IP_SPEC_MTU_CHANGE = (IP_STATUS_BASE + 20); + IP_MTU_CHANGE = (IP_STATUS_BASE + 21); + + IP_GENERAL_FAILURE = (IP_STATUS_BASE + 50); + + MAX_IP_STATUS = IP_GENERAL_FAILURE; + + IP_PENDING = (IP_STATUS_BASE + 255); + + // IP header flags + IP_FLAG_DF = $02; // Don't fragment this packet. + + // IP Option Types + IP_OPT_EOL = $00; // End of list option + IP_OPT_NOP = $01; // No operation + IP_OPT_SECURITY = $82; // Security option. + IP_OPT_LSRR = $83; // Loose source route. + IP_OPT_SSRR = $89; // Strict source route. + IP_OPT_RR = $07; // Record route. + IP_OPT_TS = $44; // Timestamp. + IP_OPT_SID = $88; // Stream ID (obsolete) + MAX_OPT_SIZE = $40; + +type + // IP types + TIPAddr = DWORD; // An IP address. + TIPMask = DWORD; // An IP subnet mask. + TIPStatus = DWORD; // Status code returned from IP APIs. + + PIPOptionInformation = ^TIPOptionInformation; + TIPOptionInformation = packed record + TTL: Byte; // Time To Live (used for traceroute) + TOS: Byte; // Type Of Service (usually 0) + Flags: Byte; // IP header flags (usually 0) + OptionsSize: Byte; // Size of options data (usually 0, max 40) + OptionsData: PChar; // Options data buffer + end; + + PIcmpEchoReply = ^TIcmpEchoReply; + TIcmpEchoReply = packed record + Address: TIPAddr; // Replying address + Status: DWord; // IP status value + RTT: DWord; // Round Trip Time in milliseconds + DataSize: Word; // Reply data size + Reserved: Word; // Reserved + Data: Pointer; // Pointer to reply data buffer + Options: TIPOptionInformation; // Reply options + end; + + // IcmpCreateFile: + // Opens a handle on which ICMP Echo Requests can be issued. + // Arguments: + // None. + // Return Value: + // An open file handle or INVALID_HANDLE_VALUE. Extended error information + // is available by calling GetLastError(). + TIcmpCreateFile = function: THandle; stdcall; + + // IcmpCloseHandle: + // Closes a handle opened by ICMPOpenFile. + // Arguments: + // IcmpHandle - The handle to close. + // Return Value: + // TRUE if the handle was closed successfully, otherwise FALSE. Extended + // error information is available by calling GetLastError(). + TIcmpCloseHandle = function(IcmpHandle: THandle): Boolean; stdcall; + + // IcmpSendEcho: + // Sends an ICMP Echo request and returns one or more replies. The + // call returns when the timeout has expired or the reply buffer + // is filled. + // Arguments: + // IcmpHandle - An open handle returned by ICMPCreateFile. + // DestinationAddress - The destination of the echo request. + // RequestData - A buffer containing the data to send in the + // request. + // RequestSize - The number of bytes in the request data buffer. + // RequestOptions - Pointer to the IP header options for the request. + // May be NULL. + // ReplyBuffer - A buffer to hold any replies to the request. + // On return, the buffer will contain an array of + // ICMP_ECHO_REPLY structures followed by options + // and data. The buffer should be large enough to + // hold at least one ICMP_ECHO_REPLY structure + // and 8 bytes of data - this is the size of + // an ICMP error message. + // ReplySize - The size in bytes of the reply buffer. + // Timeout - The time in milliseconds to wait for replies. + // Return Value: + // Returns the number of replies received and stored in ReplyBuffer. If + // the return value is zero, extended error information is available + // via GetLastError(). + TIcmpSendEcho = function(IcmpHandle: THandle; + DestinationAddress: TIPAddr; + RequestData: Pointer; + RequestSize: Word; + RequestOptions: PIPOptionInformation; + ReplyBuffer: Pointer; + ReplySize: DWord; + Timeout: DWord + ): DWord; stdcall; + + // Event handler type declaration for TICMP.OnDisplay event. + TICMPDisplay = procedure(Sender: TObject; Msg : String) of object; + TICMPReply = procedure(Sender: TObject; Error : Integer) of object; + + // The object wich encapsulate the ICMP.DLL + TICMP = class(TObject) + private + hICMPdll: HModule; // Handle for ICMP.DLL + IcmpCreateFile : TIcmpCreateFile; + IcmpCloseHandle: TIcmpCloseHandle; + IcmpSendEcho: TIcmpSendEcho; + hICMP: THandle; // Handle for the ICMP Calls + FReply: TIcmpEchoReply; // ICMP Echo reply buffer + FAddress: String; // Address given + FHostName: String; // Dotted IP of host (output) + FHostIP: String; // Name of host (Output) + FIPAddress: TIPAddr; // Address of host to contact + FSize: Integer; // Packet size (default to 56) + FTimeOut: Integer; // Timeout (default to 4000mS) + FOnDisplay: TICMPDisplay; // Event handler to display + FOnEchoRequest: TNotifyEvent; + FOnEchoReply: TICMPReply; + FLastError: DWORD; // After sending ICMP packet + public + constructor Create; virtual; + destructor Destroy; override; + function Ping : Integer; + procedure SetAddress(Value : String); + function GetErrorString : String; + + property Address : String read FAddress write SetAddress; + property Size : Integer read FSize write FSize; + property Timeout : Integer read FTimeout write FTimeout; + property Reply : TIcmpEchoReply read FReply; + property ErrorCode : Integer read FLastError; + property ErrorString : String read GetErrorString; + property HostName : String read FHostName; + property HostIP : String read FHostIP; + property OnDisplay : TICMPDisplay read FOnDisplay write FOnDisplay; + property OnEchoRequest : TNotifyEvent read FOnEchoRequest + write FOnEchoRequest; + property OnEchoReply : TICMPReply read FOnEchoReply + write FOnEchoReply; + end; + + TICMPException = class(Exception); + +implementation + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TICMP.Create; +var + WSAData: TWSAData; +begin + hICMP := INVALID_HANDLE_VALUE; + FSize := 56; + FTimeOut := 4000; + + // initialise winsock + if WSAStartup($101, WSAData) <> 0 then + raise TICMPException.Create('Error initialising Winsock'); + + // register the icmp.dll stuff + hICMPdll := LoadLibrary(icmpDLL); + if hICMPdll = 0 then + raise TICMPException.Create('Unable to register ' + icmpDLL); + + @ICMPCreateFile := GetProcAddress(hICMPdll, 'IcmpCreateFile'); + @IcmpCloseHandle := GetProcAddress(hICMPdll, 'IcmpCloseHandle'); + @IcmpSendEcho := GetProcAddress(hICMPdll, 'IcmpSendEcho'); + + if (@ICMPCreateFile = Nil) or + (@IcmpCloseHandle = Nil) or + (@IcmpSendEcho = Nil) then + raise TICMPException.Create('Error loading dll functions'); + + hICMP := IcmpCreateFile; + if hICMP = INVALID_HANDLE_VALUE then + raise TICMPException.Create('Unable to get ping handle'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TICMP.Destroy; +begin + if hICMP <> INVALID_HANDLE_VALUE then + IcmpCloseHandle(hICMP); + if hICMPdll <> 0 then + FreeLibrary(hICMPdll); + WSACleanup; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function MinInteger(X, Y: Integer): Integer; +begin + if X >= Y then + Result := Y + else + Result := X; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TICMP.SetAddress(Value : String); +var + Phe : PHostEnt; // HostEntry buffer for name lookup +begin + // Only change if needed (could take a long time) + if FAddress = Value then + Exit; + + // Convert host address to IP address + FIPAddress := inet_addr(PChar(Value)); + if FIPAddress <> INADDR_NONE then + // Was a numeric dotted address let it in this format + FHostName := Value + else begin + // Not a numeric dotted address, try to resolve by name + Phe := GetHostByName(PChar(Value)); + if Phe = nil then begin + FLastError := GetLastError; + if Assigned(FOnDisplay) then + FOnDisplay(Self, 'Unable to resolve ' + Value); + Exit; + end; + + FIPAddress := longint(plongint(Phe^.h_addr_list^)^); + FHostName := Phe^.h_name; + end; + + FAddress := Value; + FHostIP := StrPas(inet_ntoa(TInAddr(FIPAddress))); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TICMP.GetErrorString : String; +begin + case FLastError of + IP_SUCCESS: Result := 'No error'; + IP_BUF_TOO_SMALL: Result := 'Buffer too small'; + IP_DEST_NET_UNREACHABLE: Result := 'Destination network unreachable'; + IP_DEST_HOST_UNREACHABLE: Result := 'Destination host unreachable'; + IP_DEST_PROT_UNREACHABLE: Result := 'Destination protocol unreachable'; + IP_DEST_PORT_UNREACHABLE: Result := 'Destination port unreachable'; + IP_NO_RESOURCES: Result := 'No resources'; + IP_BAD_OPTION: Result := 'Bad option'; + IP_HW_ERROR: Result := 'Hardware error'; + IP_PACKET_TOO_BIG: Result := 'Packet too big'; + IP_REQ_TIMED_OUT: Result := 'Request timed out'; + IP_BAD_REQ: Result := 'Bad request'; + IP_BAD_ROUTE: Result := 'Bad route'; + IP_TTL_EXPIRED_TRANSIT: Result := 'TTL expired in transit'; + IP_TTL_EXPIRED_REASSEM: Result := 'TTL expired in reassembly'; + IP_PARAM_PROBLEM: Result := 'Parameter problem'; + IP_SOURCE_QUENCH: Result := 'Source quench'; + IP_OPTION_TOO_BIG: Result := 'Option too big'; + IP_BAD_DESTINATION: Result := 'Bad Destination'; + IP_ADDR_DELETED: Result := 'Address deleted'; + IP_SPEC_MTU_CHANGE: Result := 'Spec MTU change'; + IP_MTU_CHANGE: Result := 'MTU change'; + IP_GENERAL_FAILURE: Result := 'General failure'; + IP_PENDING: Result := 'Pending'; + else + Result := 'ICMP error #' + IntToStr(FLastError); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TICMP.Ping : Integer; +var + BufferSize: Integer; + pReqData, pData: Pointer; + pIPE: PIcmpEchoReply; // ICMP Echo reply buffer + IPOpt: TIPOptionInformation; // IP Options for packet to send + Msg: String; +begin + Result := 0; + FLastError := 0; + + if FIPAddress = INADDR_NONE then begin + FLastError := IP_BAD_DESTINATION; + if Assigned(FOnDisplay) then + FOnDisplay(Self, 'Invalid host address'); + Exit; + end; + + // Allocate space for data buffer space + BufferSize := SizeOf(TICMPEchoReply) + FSize; + GetMem(pReqData, FSize); + GetMem(pData, FSize); + GetMem(pIPE, BufferSize); + + try + // Fill data buffer with some data bytes + FillChar(pReqData^, FSize, $20); + Msg := 'Pinging from Delphi code written by F. Piette'; + Move(Msg[1], pReqData^, MinInteger(FSize, Length(Msg))); + + pIPE^.Data := pData; + FillChar(pIPE^, SizeOf(pIPE^), 0); + + if Assigned(FOnEchoRequest) then + FOnEchoRequest(Self); + +// if Assigned(FOnDisplay) then +// FOnDisplay(Self, 'Sending ' + IntToStr(FSize) + ' bytes to ' + +// FHostName + ' (' + FHostIP + ')'); + + FillChar(IPOpt, SizeOf(IPOpt), 0); + IPOpt.TTL := 64; + Result := IcmpSendEcho(hICMP, FIPAddress, pReqData, FSize, + @IPOpt, pIPE, BufferSize, FTimeOut); + FLastError := GetLastError; + FReply := pIPE^; + if Assigned(FOnEchoReply) then + FOnEchoReply(Self, Result); + +// if Assigned(FOnDisplay) then begin +// if Result = 0 then begin +// FOnDisplay(Self, 'Cannot ping host (' + FHostIP + ') : ' + +// GetErrorString) +// end +// else +// FOnDisplay(Self, 'Received ' + IntToStr(pIPE^.DataSize) + +// ' bytes from ' + FHostIP + +// ' in ' + IntToStr(pIPE^.RTT) + ' msecs'); +// end; + finally + // Free those buffers + FreeMem(pIPE); + FreeMem(pData); + FreeMem(pReqData); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/MD5.PAS b/lib/telnet/MD5.PAS new file mode 100644 index 00000000..537b0dbc --- /dev/null +++ b/lib/telnet/MD5.PAS @@ -0,0 +1,351 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE. Based on work given by Louis S. Berman from + BrainTree Ltd, lsb@braintree.com +Description: MD5 is an implmentation for the MD5 Message-Digest Algorithm + as described in RFC-1321 +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: October 11, 1997 +Version: 1.00 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Oct 26, 1997 Changed MD5Final form function to procedure to be compatible + with C++Builder. + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit MD5; + +interface + +uses + SysUtils; + +const + MD5Version = 100; + +type + TMD5Context = record + State: array[0..3] of LongInt; + Count: array[0..1] of LongInt; + case Integer of + 0: (BufChar: array[0..63] of Byte); + 1: (BufLong: array[0..15] of LongInt); + end; + TMD5Digest = array[0..15] of Char; + +procedure MD5Init(var MD5Context: TMD5Context); +procedure MD5Update(var MD5Context: TMD5Context; + const Data; + Len: Integer); +procedure MD5Transform(var Buf: array of LongInt; + const Data: array of LongInt); +procedure MD5UpdateBuffer(var MD5Context: TMD5Context; + Buffer: Pointer; + BufSize: Integer); +procedure MD5Final(var Digest: TMD5Digest; var MD5Context: TMD5Context); + +function GetMD5(Buffer: Pointer; BufSize: Integer): string; +function StrMD5(Buffer : String): string; + +implementation + +const + MaxBufSize = 16384; + +type + PMD5Buffer = ^TMD5Buffer; + TMD5Buffer = array[0..(MaxBufSize - 1)] of Char; + + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 initialization. Begins an MD5 operation, writing a new context. } +procedure MD5Init(var MD5Context: TMD5Context); +begin + FillChar(MD5Context, SizeOf(TMD5Context), #0); + with MD5Context do begin + { Load magic initialization constants. } + State[0] := $67452301; + State[1] := $EFCDAB89; + State[2] := $98BADCFE; + State[3] := $10325476 + end +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 block update operation. Continues an MD5 message-digest operation, } +{ processing another message block, and updating the context. } +procedure MD5Update( + var MD5Context: TMD5Context; { Context } + const Data; { Input block } + Len: Integer); { Length of input block } +type + TByteArray = array[0..0] of Byte; +var + Index: Word; + T: LongInt; +begin + with MD5Context do begin + T := Count[0]; + Inc(Count[0], LongInt(Len) shl 3); + if Count[0] < T then + Inc(Count[1]); + Inc(Count[1], Len shr 29); + T := (T shr 3) and $3F; + Index := 0; + if T <> 0 then begin + Index := T; + T := 64 - T; + if Len < T then begin + Move(Data, BufChar[Index], Len); + Exit; + end; + Move(Data, BufChar[Index], T); + MD5Transform(State, BufLong); + Dec(Len, T); + end; + while Len >= 64 do begin + Move(TByteArray(Data)[Index], BufChar, 64); + MD5Transform(State, BufLong); + Inc(Index, 64); + Dec(Len, 64); + end; + Move(TByteArray(Data)[Index], BufChar, Len); + end +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 finalization. Ends an MD5 message-digest operation, writing the message } +{ digest and zeroizing the context. } +procedure MD5Final(var Digest: TMD5Digest; var MD5Context: TMD5Context); +var + Cnt : Word; + P : Byte; +begin + with MD5Context do begin + Cnt := (Count[0] shr 3) and $3F; + P := Cnt; + BufChar[P] := $80; + Inc(P); + Cnt := 64 - 1 - Cnt; + if Cnt < 8 then begin + FillChar(BufChar[P], Cnt, #0); + MD5Transform(State, BufLong); + FillChar(BufChar, 56, #0); + end + else + FillChar(BufChar[P], Cnt - 8, #0); + BufLong[14] := Count[0]; + BufLong[15] := Count[1]; + MD5Transform(State, BufLong); + Move(State, Digest, 16) + end; + FillChar(MD5Context, SizeOf(TMD5Context), #0) +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ MD5 basic transformation. Transforms state based on block. } +procedure MD5Transform( + var Buf: array of LongInt; + const Data: array of LongInt); +var + A, B, C, D: LongInt; + + procedure Round1(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (Z xor (X and (Y xor Z))) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; + + procedure Round2(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (Y xor (Z and (X xor Y))) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; + + procedure Round3(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (X xor Y xor Z) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; + + procedure Round4(var W: LongInt; X, Y, Z, Data: LongInt; S: Byte); + begin + Inc(W, (Y xor (X or not Z)) + Data); + W := (W shl S) or (W shr (32 - S)); + Inc(W, X) + end; +begin + A := Buf[0]; + B := Buf[1]; + C := Buf[2]; + D := Buf[3]; + + Round1(A, B, C, D, Data[ 0] + $d76aa478, 7); + Round1(D, A, B, C, Data[ 1] + $e8c7b756, 12); + Round1(C, D, A, B, Data[ 2] + $242070db, 17); + Round1(B, C, D, A, Data[ 3] + $c1bdceee, 22); + Round1(A, B, C, D, Data[ 4] + $f57c0faf, 7); + Round1(D, A, B, C, Data[ 5] + $4787c62a, 12); + Round1(C, D, A, B, Data[ 6] + $a8304613, 17); + Round1(B, C, D, A, Data[ 7] + $fd469501, 22); + Round1(A, B, C, D, Data[ 8] + $698098d8, 7); + Round1(D, A, B, C, Data[ 9] + $8b44f7af, 12); + Round1(C, D, A, B, Data[10] + $ffff5bb1, 17); + Round1(B, C, D, A, Data[11] + $895cd7be, 22); + Round1(A, B, C, D, Data[12] + $6b901122, 7); + Round1(D, A, B, C, Data[13] + $fd987193, 12); + Round1(C, D, A, B, Data[14] + $a679438e, 17); + Round1(B, C, D, A, Data[15] + $49b40821, 22); + + Round2(A, B, C, D, Data[ 1] + $f61e2562, 5); + Round2(D, A, B, C, Data[ 6] + $c040b340, 9); + Round2(C, D, A, B, Data[11] + $265e5a51, 14); + Round2(B, C, D, A, Data[ 0] + $e9b6c7aa, 20); + Round2(A, B, C, D, Data[ 5] + $d62f105d, 5); + Round2(D, A, B, C, Data[10] + $02441453, 9); + Round2(C, D, A, B, Data[15] + $d8a1e681, 14); + Round2(B, C, D, A, Data[ 4] + $e7d3fbc8, 20); + Round2(A, B, C, D, Data[ 9] + $21e1cde6, 5); + Round2(D, A, B, C, Data[14] + $c33707d6, 9); + Round2(C, D, A, B, Data[ 3] + $f4d50d87, 14); + Round2(B, C, D, A, Data[ 8] + $455a14ed, 20); + Round2(A, B, C, D, Data[13] + $a9e3e905, 5); + Round2(D, A, B, C, Data[ 2] + $fcefa3f8, 9); + Round2(C, D, A, B, Data[ 7] + $676f02d9, 14); + Round2(B, C, D, A, Data[12] + $8d2a4c8a, 20); + + Round3(A, B, C, D, Data[ 5] + $fffa3942, 4); + Round3(D, A, B, C, Data[ 8] + $8771f681, 11); + Round3(C, D, A, B, Data[11] + $6d9d6122, 16); + Round3(B, C, D, A, Data[14] + $fde5380c, 23); + Round3(A, B, C, D, Data[ 1] + $a4beea44, 4); + Round3(D, A, B, C, Data[ 4] + $4bdecfa9, 11); + Round3(C, D, A, B, Data[ 7] + $f6bb4b60, 16); + Round3(B, C, D, A, Data[10] + $bebfbc70, 23); + Round3(A, B, C, D, Data[13] + $289b7ec6, 4); + Round3(D, A, B, C, Data[ 0] + $eaa127fa, 11); + Round3(C, D, A, B, Data[ 3] + $d4ef3085, 16); + Round3(B, C, D, A, Data[ 6] + $04881d05, 23); + Round3(A, B, C, D, Data[ 9] + $d9d4d039, 4); + Round3(D, A, B, C, Data[12] + $e6db99e5, 11); + Round3(C, D, A, B, Data[15] + $1fa27cf8, 16); + Round3(B, C, D, A, Data[ 2] + $c4ac5665, 23); + + Round4(A, B, C, D, Data[ 0] + $f4292244, 6); + Round4(D, A, B, C, Data[ 7] + $432aff97, 10); + Round4(C, D, A, B, Data[14] + $ab9423a7, 15); + Round4(B, C, D, A, Data[ 5] + $fc93a039, 21); + Round4(A, B, C, D, Data[12] + $655b59c3, 6); + Round4(D, A, B, C, Data[ 3] + $8f0ccc92, 10); + Round4(C, D, A, B, Data[10] + $ffeff47d, 15); + Round4(B, C, D, A, Data[ 1] + $85845dd1, 21); + Round4(A, B, C, D, Data[ 8] + $6fa87e4f, 6); + Round4(D, A, B, C, Data[15] + $fe2ce6e0, 10); + Round4(C, D, A, B, Data[ 6] + $a3014314, 15); + Round4(B, C, D, A, Data[13] + $4e0811a1, 21); + Round4(A, B, C, D, Data[ 4] + $f7537e82, 6); + Round4(D, A, B, C, Data[11] + $bd3af235, 10); + Round4(C, D, A, B, Data[ 2] + $2ad7d2bb, 15); + Round4(B, C, D, A, Data[ 9] + $eb86d391, 21); + + Inc(Buf[0], A); + Inc(Buf[1], B); + Inc(Buf[2], C); + Inc(Buf[3], D); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure MD5UpdateBuffer( + var MD5Context: TMD5Context; + Buffer: Pointer; + BufSize: Integer); +var + BufTmp : PMD5Buffer; + BufPtr : PChar; + Bytes : Word; +begin + New(BufTmp); + BufPtr := Buffer; + try + repeat + if BufSize > MaxBufSize then + Bytes := MaxBufSize + else + Bytes := BufSize; + Move(BufPtr^, BufTmp^, Bytes); + Inc(BufPtr, Bytes); + Dec(BufSize, Bytes); + if Bytes > 0 then + MD5Update(MD5Context, BufTmp^, Bytes); + until Bytes < MaxBufSize; + finally + Dispose(BufTmp); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function GetMD5(Buffer: Pointer; BufSize: Integer): string; +var + I : Integer; + MD5Digest : TMD5Digest; + MD5Context : TMD5Context; +begin + for I := 0 to 15 do + Byte(MD5Digest[I]) := I + 1; + MD5Init(MD5Context); + MD5UpdateBuffer(MD5Context, Buffer, BufSize); + MD5Final(MD5Digest, MD5Context); + Result := ''; + for I := 0 to 15 do + Result := Result + IntToHex(Byte(MD5Digest[I]), 2); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function StrMD5(Buffer : String): string; +begin + Result := GetMD5(@Buffer[1], Length(Buffer)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/MTSRV.DPR b/lib/telnet/MTSRV.DPR new file mode 100644 index 00000000..e0900c4b --- /dev/null +++ b/lib/telnet/MTSRV.DPR @@ -0,0 +1,14 @@ +program mtsrv; + +uses + Forms, + mtsrv1 in 'mtsrv1.pas' {ServerForm}, + mtsrv2 in 'mtsrv2.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TServerForm, ServerForm); + Application.Run; +end. diff --git a/lib/telnet/MTSRV.RES b/lib/telnet/MTSRV.RES new file mode 100644 index 00000000..e99dfb03 Binary files /dev/null and b/lib/telnet/MTSRV.RES differ diff --git a/lib/telnet/MTSRV.dof b/lib/telnet/MTSRV.dof new file mode 100644 index 00000000..1aaf9b3c --- /dev/null +++ b/lib/telnet/MTSRV.dof @@ -0,0 +1,80 @@ +[Compiler] +A=1 +B=0 +C=1 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=0 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= + +[Directories] +OutputDir= +UnitOutputDir= +SearchPath= +Packages= +Conditionals= +DebugSourceDirs= +UsePackages=0 + +[Parameters] +RunParams= +HostApplication= + +[Version Info] +IncludeVerInfo=0 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1041 +CodePage=932 + +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= diff --git a/lib/telnet/MTSRV.~DP b/lib/telnet/MTSRV.~DP new file mode 100644 index 00000000..e0900c4b --- /dev/null +++ b/lib/telnet/MTSRV.~DP @@ -0,0 +1,14 @@ +program mtsrv; + +uses + Forms, + mtsrv1 in 'mtsrv1.pas' {ServerForm}, + mtsrv2 in 'mtsrv2.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TServerForm, ServerForm); + Application.Run; +end. diff --git a/lib/telnet/PING.DCR b/lib/telnet/PING.DCR new file mode 100644 index 00000000..7bc5671f Binary files /dev/null and b/lib/telnet/PING.DCR differ diff --git a/lib/telnet/PING.PAS b/lib/telnet/PING.PAS new file mode 100644 index 00000000..b41d7bcd --- /dev/null +++ b/lib/telnet/PING.PAS @@ -0,0 +1,501 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This unit encapsulate the ICMP.DLL into a VCL of type TPing. + Using this object, you can easily ping any host on your network. + Works only in 32 bits mode (no Delphi 1) under NT or 95. + If you wants to build a console mode program, use the TICMP + object. You'll have a much smaller program. +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: January 6, 1997 +Version: 1.01 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Nov 30, 1997 V1.00 Added DNSLookup capability (taken from TWSocket) +Dec 13, 1997 V1.01 Added OnEchoRequest and OnEchoReply events and removed the + corresponding OnDisplay event. This require to modify existing + programs. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Ping; + +{$IFDEF VER80} +// This source file is *NOT* compatible with Delphi 1 because it uses +// Win 32 features. +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, Winsock, Icmp; + +const + PingVersion = 101; + WM_ASYNCGETHOSTBYNAME = WM_USER + 2; + +type + TDnsLookupDone = procedure (Sender: TObject; Error: Word) of object; + TPing = class(TComponent) + private + FIcmp : TICMP; + FWindowHandle : HWND; + FDnsLookupBuffer : array [0..MAXGETHOSTSTRUCT] of char; + FDnsLookupHandle : THandle; + FDnsResult : String; + FOnDnsLookupDone : TDnsLookupDone; + protected + procedure WndProc(var MsgRec: TMessage); + procedure WMAsyncGetHostByName(var msg: TMessage); message WM_ASYNCGETHOSTBYNAME; + procedure SetAddress(Value : String); + function GetAddress : String; + procedure SetSize(Value : Integer); + function GetSize : Integer; + procedure SetTimeout(Value : Integer); + function GetTimeout : Integer; + function GetReply : TIcmpEchoReply; + function GetErrorCode : Integer; + function GetErrorString : String; + function GetHostName : String; + function GetHostIP : String; + procedure SetOnDisplay(Value : TICMPDisplay); + function GetOnDisplay : TICMPDisplay; + procedure SetOnEchoRequest(Value : TNotifyEvent); + function GetOnEchoRequest : TNotifyEvent; + procedure SetOnEchoReply(Value : TICMPReply); + function GetOnEchoReply : TICMPReply; + public + constructor Create(Owner : TComponent); override; + destructor Destroy; override; + function Ping : Integer; + procedure DnsLookup(HostName : String); virtual; + procedure CancelDnsLookup; + + property Reply : TIcmpEchoReply read GetReply; + property ErrorCode : Integer read GetErrorCode; + property ErrorString : String read GetErrorString; + property HostName : String read GetHostName; + property HostIP : String read GetHostIP; + property Handle : HWND read FWindowHandle; + property DnsResult : String read FDnsResult; + published + property Address : String read GetAddress + write SetAddress; + property Size : Integer read GetSize + write SetSize; + property Timeout : Integer read GetTimeout + write SetTimeout; + property OnDisplay : TICMPDisplay read GetOnDisplay + write SetOnDisplay; + property OnEchoRequest : TNotifyEvent read GetOnEchoRequest + write SetOnEchoRequest; + property OnEchoReply : TICMPReply read GetOnEchoReply + write SetOnEchoReply; + property OnDnsLookupDone : TDnsLookupDone + read FOnDnsLookupDone + write FOnDnsLookupDone; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('fpiette', [TPing]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function XSocketWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TPing; + MsgRec : TMessage; +begin + { At window creation ask windows to store a pointer to our object } + Obj := TPing(GetWindowLong(ahWnd, 0)); + + { If the pointer is not assigned, just call the default procedure } + if not Assigned(Obj) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass paramter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + Obj.WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This global variable is used to store the windows class characteristic } +{ and is needed to register the window class used by TWSocket } +var + XSocketWindowClass: TWndClass = ( + style : 0; + lpfnWndProc : @XSocketWindowProc; + cbClsExtra : 0; + cbWndExtra : SizeOf(Pointer); + hInstance : 0; + hIcon : 0; + hCursor : 0; + hbrBackground : 0; + lpszMenuName : nil; + lpszClassName : 'XSocketWindowClass'); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Allocate a window handle. This means registering a window class the first } +{ time we are called, and creating a new window each time we are called. } +function XSocketAllocateHWnd(Obj : TObject): HWND; +var + TempClass : TWndClass; + ClassRegistered : Boolean; +begin + { Check if the window class is already registered } + XSocketWindowClass.hInstance := HInstance; + ClassRegistered := GetClassInfo(HInstance, + XSocketWindowClass.lpszClassName, + TempClass); + if not ClassRegistered then begin + { Not yet registered, do it right now } + Result := Windows.RegisterClass(XSocketWindowClass); + if Result = 0 then + Exit; + end; + + { Now create a new window } + Result := CreateWindowEx(WS_EX_TOOLWINDOW, + XSocketWindowClass.lpszClassName, + '', { Window name } + WS_POPUP, { Window Style } + 0, 0, { X, Y } + 0, 0, { Width, Height } + 0, { hWndParent } + 0, { hMenu } + HInstance, { hInstance } + nil); { CreateParam } + + { if successfull, the ask windows to store the object reference } + { into the reserved byte (see RegisterClass) } + if (Result <> 0) and Assigned(Obj) then + SetWindowLong(Result, 0, Integer(Obj)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Free the window handle } +procedure XSocketDeallocateHWnd(Wnd: HWND); +begin + DestroyWindow(Wnd); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + if Msg = WM_ASYNCGETHOSTBYNAME then + WMAsyncGetHostByName(MsgRec) + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.WMAsyncGetHostByName(var msg: TMessage); +var + Phe : Phostent; + IPAddr : TInAddr; + Error : Word; +begin + if msg.wParam <> FDnsLookupHandle then + Exit; + FDnsLookupHandle := 0; + Error := Msg.LParamHi; + if Error = 0 then begin + Phe := PHostent(@FDnsLookupBuffer); + IPAddr := PInAddr(Phe^.h_addr_list^)^; + FDnsResult := StrPas(inet_ntoa(IPAddr)); + end; + if Assigned(FOnDnsLookupDone) then + FOnDnsLookupDone(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TPing.Create(Owner : TComponent); +begin + Inherited Create(Owner); + FIcmp := TICMP.Create; + { Delphi 32 bits has threads and VCL is not thread safe. } + { We need to do our own way to be thread safe. } + FWindowHandle := XSocketAllocateHWnd(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TPing.Destroy; +begin + CancelDnsLookup; { Cancel any pending dns lookup } + XSocketDeallocateHWnd(FWindowHandle); + FIcmp.Destroy; + Inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.Ping : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.Ping + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.CancelDnsLookup; +begin + if FDnsLookupHandle = 0 then + Exit; + if WSACancelAsyncRequest(FDnsLookupHandle) <> 0 then + raise Exception.CreateFmt('WSACancelAsyncRequest failed, error #%d', + [WSAGetLastError]); + FDnsLookupHandle := 0; + if Assigned(FOnDnsLookupDone) then + FOnDnsLookupDone(Self, WSAEINTR); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.DnsLookup(HostName : String); +var + IPAddr : TInAddr; +begin + { Cancel any pending lookup } + if FDnsLookupHandle <> 0 then + WSACancelAsyncRequest(FDnsLookupHandle); + + FDnsResult := ''; + + IPAddr.S_addr := Inet_addr(@HostName[1]); + if IPAddr.S_addr <> INADDR_NONE then begin + FDnsResult := StrPas(inet_ntoa(IPAddr)); + if Assigned(FOnDnsLookupDone) then + FOnDnsLookupDone(Self, 0); + Exit; + end; + + FDnsLookupHandle := WSAAsyncGetHostByName(FWindowHandle, + WM_ASYNCGETHOSTBYNAME, + @HostName[1], + @FDnsLookupBuffer, + SizeOf(FDnsLookupBuffer)); + if FDnsLookupHandle = 0 then + raise Exception.CreateFmt( + '%s: can''t start DNS lookup, error #%d', + [HostName, WSAGetLastError]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetAddress(Value : String); +begin + if Assigned(FIcmp) then + FIcmp.Address := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetAddress : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.Address + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetSize(Value : Integer); +begin + if Assigned(FIcmp) then + FIcmp.Size := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetSize : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.Size + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetTimeout(Value : Integer); +begin + if Assigned(FIcmp) then + FIcmp.Timeout := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetTimeout : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.Timeout + else + Result := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetReply : TIcmpEchoReply; +begin + if Assigned(FIcmp) then + Result := FIcmp.Reply + else + FillChar(Result, SizeOf(Result), 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetErrorCode : Integer; +begin + if Assigned(FIcmp) then + Result := FIcmp.ErrorCode + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetErrorString : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.ErrorString + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetHostName : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.HostName + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetHostIP : String; +begin + if Assigned(FIcmp) then + Result := FIcmp.HostIP + else + Result := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetOnDisplay(Value : TICMPDisplay); +begin + if Assigned(FIcmp) then + FIcmp.OnDisplay := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetOnDisplay : TICMPDisplay; +begin + if Assigned(FIcmp) then + Result := FIcmp.OnDisplay + else + Result := nil; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetOnEchoRequest(Value : TNotifyEvent); +begin + if Assigned(FIcmp) then + FIcmp.OnEchoRequest := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetOnEchoRequest : TNotifyEvent; +begin + if Assigned(FIcmp) then + Result := FIcmp.OnEchoRequest + else + Result := nil; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPing.SetOnEchoReply(Value : TICMPReply); +begin + if Assigned(FIcmp) then + FIcmp.OnEchoReply := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPing.GetOnEchoReply : TICMPReply; +begin + if Assigned(FIcmp) then + Result := FIcmp.OnEchoReply + else + Result := nil; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} diff --git a/lib/telnet/PINGTST.DPR b/lib/telnet/PINGTST.DPR new file mode 100644 index 00000000..520b4e7f --- /dev/null +++ b/lib/telnet/PINGTST.DPR @@ -0,0 +1,13 @@ +program PingTst; + +uses + Forms, + PingTst1 in 'PingTst1.pas' {Form1}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TPingTstForm, PingTstForm); + Application.Run; +end. diff --git a/lib/telnet/PINGTST1.DFM b/lib/telnet/PINGTST1.DFM new file mode 100644 index 00000000..128787d4 Binary files /dev/null and b/lib/telnet/PINGTST1.DFM differ diff --git a/lib/telnet/PINGTST1.PAS b/lib/telnet/PINGTST1.PAS new file mode 100644 index 00000000..75db9fa6 --- /dev/null +++ b/lib/telnet/PINGTST1.PAS @@ -0,0 +1,143 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This demo show how to use the TPing object to ping any host. +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: November 30, 1997 +Version: 1.01 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 13, 1997 V1.01 Use the new OnEchoRequest and OnEchoReply events. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit PingTst1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Ping, StdCtrls; + +type + TPingTstForm = class(TForm) + Ping1: TPing; + Label1: TLabel; + HostEdit: TEdit; + PingButton: TButton; + DisplayMemo: TMemo; + CancelButton: TButton; + procedure PingButtonClick(Sender: TObject); + procedure Ping1Display(Sender: TObject; Msg: String); + procedure Ping1DnsLookupDone(Sender: TObject; Error: Word); + procedure CancelButtonClick(Sender: TObject); + procedure Ping1EchoRequest(Sender: TObject); + procedure Ping1EchoReply(Sender: TObject; Error: Integer); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + PingTstForm: TPingTstForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.PingButtonClick(Sender: TObject); +begin + DisplayMemo.Clear; + DisplayMemo.Lines.Add('Resolving host ''' + HostEdit.Text + ''''); + PingButton.Enabled := FALSE; + CancelButton.Enabled := TRUE; + Ping1.DnsLookup(HostEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1DnsLookupDone(Sender: TObject; Error: Word); +begin + CancelButton.Enabled := FALSE; + PingButton.Enabled := TRUE; + + if Error <> 0 then begin + DisplayMemo.Lines.Add('Unknown Host ''' + HostEdit.Text + ''''); + Exit; + end; + + DisplayMemo.Lines.Add('Host ''' + HostEdit.Text + ''' is ' + Ping1.DnsResult); + Ping1.Address := Ping1.DnsResult; + Ping1.Ping; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1Display(Sender: TObject; Msg: String); +begin + DisplayMemo.Lines.Add(Msg); +end; + + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.CancelButtonClick(Sender: TObject); +begin + Ping1.CancelDnsLookup; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1EchoRequest(Sender: TObject); +begin + DisplayMemo.Lines.Add('Sending ' + IntToStr(Ping1.Size) + ' bytes to ' + + Ping1.HostName + ' (' + Ping1.HostIP + ')'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPingTstForm.Ping1EchoReply(Sender: TObject; Error: Integer); +begin + if Error = 0 then + DisplayMemo.Lines.Add('Cannot ping host (' + Ping1.HostIP + ') : ' + + Ping1.ErrorString) + else + DisplayMemo.Lines.Add('Received ' + IntToStr(Ping1.Reply.DataSize) + + ' bytes from ' + Ping1.HostIP + + ' in ' + IntToStr(Ping1.Reply.RTT) + ' msecs'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/POP3CLI.DCR b/lib/telnet/POP3CLI.DCR new file mode 100644 index 00000000..81cf1d0c Binary files /dev/null and b/lib/telnet/POP3CLI.DCR differ diff --git a/lib/telnet/POP3CLI.PAS b/lib/telnet/POP3CLI.PAS new file mode 100644 index 00000000..4b61fd63 --- /dev/null +++ b/lib/telnet/POP3CLI.PAS @@ -0,0 +1,866 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: TPop3Client class implements the POP3 protocol + (RFC-1225, RFC-1939) +EMail: francois.piette@ping.be + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +WebSite: http://www.rtfm.be/fpiette +Creation: 03 october 1997 +Version: 1.12 +Support: Use twsocket@rtfm.be mailing list. See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sept 09, 1997 Modified TOP to be able to request 0 lines (bug reported by + damien@jetman.demon.co.uk) +Oct 10, 1997 V1.10. Published ProtocolState property, made TOP command + complies with RFC-1939 as suggested by damien@jetman.demon.co.uk + Implemented the UIDL command. +Oct 11, 1997 V1.11 Implemented the APOP command, but not tested because no + server available to test it. + Made internal error message look like POP3 error messages (-ERR) +Oct 28, 1997 V1.12 Modified TWSocket to handle line buffer overflow and + TPop3Client to handle that in GetMultiLine. + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit pop3cli; + +interface + +{$B-} + +uses + WinTypes, + WinProcs, + SysUtils, + Messages, + Classes, + Graphics, + Controls, + Forms, + Dialogs, + Menus, + WSocket, + Wait, + MD5; + +const + Pop3CliVersion = 112; + +type + TPop3Display = procedure(Sender: TObject; Msg : String) of object; + TPop3State = (pop3Disconnected, pop3WaitingUser, pop3WaitingPass, pop3Transaction, pop3Update); + TPop3Method = function : boolean of object; + TPop3Client = class(TComponent) + private + FWSocket : TWSocket; + FHost : String; + FUserName : String; + FPassWord : String; + FProtocolState : TPop3State; + FLastResponse : String; + FErrorMessage : String; + FTimeStamp : String; + FWait : TWait; + FTimeout : Integer; + FTimeOutFlag : Boolean; + FLineTooLong : Boolean; + FMsgCount : Integer; + FMsgSize : Integer; + FMsgNum : Integer; + FMsgUidl : String; + FMsgLines : Integer; + FTag : LongInt; + + FOnDisplay : TPop3Display; + FOnMessageBegin : TNotifyEvent; + FOnMessageEnd : TNotifyEvent; + FOnMessageLine : TNotifyEvent; + FOnListBegin : TNotifyEvent; + FOnListEnd : TNotifyEvent; + FOnListLine : TNotifyEvent; + FOnUidlBegin : TNotifyEvent; + FOnUidlEnd : TNotifyEvent; + FOnUidlLine : TNotifyEvent; + protected + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure ClearErrorMessage; + procedure SetErrorMessage; + procedure Display(Msg : String); + procedure SetWait(Value : TWait); + function GetResponse : Boolean; + procedure SendCommand(Cmd : String); + procedure WaitTimeOut(Sender : TObject); + procedure SessionClosed(Sender : TObject; Error : WORD); + procedure LineTooLong(Sender : TObject); + function ExtractNumbers(var N1 : Integer; var N2 : Integer) : Boolean; + function ExtractUidl(var N1 : Integer; var N2 : String) : Boolean; + procedure ProcessUidl(Sender : TObject); + procedure ProcessList(Sender : TObject); + function GetMultiLine(aOnBegin : TNotifyEvent; + aOnLine : TNotifyEvent; + aOnEnd : TNotifyEvent; + aProcess : TNotifyEvent) : Boolean; + function StartTransaction(OpCode, Params : String) : Boolean; + function PassRpop(OpCode : String) : Boolean; + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + function Connect : Boolean; + function User : Boolean; + function Pass : Boolean; + function Quit : Boolean; + function Stat : Boolean; + function List : Boolean; + function Retr : Boolean; + function Dele : Boolean; + function Noop : Boolean; + function Last : Boolean; + function Rset : Boolean; + function Top : Boolean; + function Rpop : Boolean; + function Uidl : Boolean; + function Apop : Boolean; + published + property Host : String read FHost + write FHost; + property UserName : String read FUserName + write FUserName; + property PassWord : String read FPassWord + write FPassWord; + property Wait : TWait read FWait + write SetWait; + property TimeOut : Integer read FTimeout + write FTimeout; + property ErrorMessage : String read FErrorMessage; + property LastResponse : String read FLastResponse; + property ProtocolState : TPop3State read FProtocolState; + {:Updated by the Stat method with the number of + messages in the maildrop } + property MsgCount : Integer read FMsgCount; + {:Updated by the Stat method with the total size + in byte for the messages in the maildrop } + property MsgSize : Integer read FMsgSize; + {:This is the number of lines to display in the TOP command + Set to zero if you wants the default value } + property MsgLines : Integer read FMsgLines + write FMsgLines; + {:This is the message number which must be returned by the Retr + method. It is also updated by the Last method } + property MsgNum : Integer read FMsgNum + write FMsgNum; + property MsgUidl : String read FMsgUidl; + property Tag : LongInt read FTag + write FTag; + + property OnDisplay : TPop3Display read FOnDisplay + write FOnDisplay; + property OnMessageBegin : TNotifyEvent read FOnMessageBegin + write FOnMessageBegin; + property OnMessageEnd : TNotifyEvent read FOnMessageEnd + write FOnMessageEnd; + property OnMessageLine : TNotifyEvent read FOnMessageLine + write FOnMessageLine; + property OnListBegin : TNotifyEvent read FOnListBegin + write FOnListBegin; + property OnListEnd : TNotifyEvent read FOnListEnd + write FOnListEnd; + property OnListLine : TNotifyEvent read FOnListLine + write FOnListLine; + property OnUidlBegin : TNotifyEvent read FOnUidlBegin + write FOnUidlBegin; + property OnUidlEnd : TNotifyEvent read FOnUidlEnd + write FOnUidlEnd; + property OnUidlLine : TNotifyEvent read FOnUidlLine + write FOnUidlLine; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RTrim(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LTrim(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then { Petite optimisation: pas d'espace } + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := LTrim(Rtrim(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function stpblk(PValue : PChar) : PChar; +begin + Result := PValue; + while Result^ in [' ', #9, #10, #13] do + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(PValue : PChar) : Integer; +begin + Result := 0; + PValue := stpblk(PValue); + while PValue^ in ['0'..'9'] do begin + Result := Result * 10 + ord(PValue^) - ord('0'); + Inc(PValue); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TPop3Client.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWSocket := TWSocket.Create(nil); + FWSocket.OnSessionClosed := SessionClosed; + FWSocket.OnLineTooLong := LineTooLong; + FTimeout := 15; + FProtocolState := pop3Disconnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TPop3Client.Destroy; +begin + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Connect : Boolean; +var + I, J : Integer; +begin + Result := FALSE; + FTimeStamp := ''; + + if FWait = nil then begin + FErrorMessage := '-ERR No wait object'; + Display(FErrorMessage); + Exit; + end; + + FWait.OnTimeout := WaitTimeout; + FTimeOutFlag := FALSE; + + if FProtocolState > pop3Disconnected then begin + { Already connected, it's ok } + Result := TRUE; + Exit; + end; + + ClearErrorMessage; + + if Length(FHost) = 0 then begin + FErrorMessage := '-ERR No host specified'; + Display(FErrorMessage); + Exit; + end; + + try + FWSocket.Proto := 'tcp'; + FWSocket.Port := 'pop3'; + FWSocket.Addr := FHost; + FWSocket.OnDataAvailable := nil; + + FWSocket.Connect; + except + on E:ESocketException do begin + FErrorMessage := '-ERR ' + E.Message; + Exit; + end; + end; + + if not FWSocket.Wait(FTimeout, wsConnected) then begin + FErrorMessage := '-ERR Can''t connect to host ''' + FHost + ''''; + Display(FErrorMessage); + FWSocket.Close; + Exit; + end; + Display('Connected with POP3 server'); + + if not GetResponse then begin + SetErrorMessage; + FWSocket.Close; + Exit; + end; + + I := Pos('<', FLastResponse); + J := Pos('>', Copy(FLastResponse, I, Length(FLastREsponse))); + if (I > 0) and (J > 0) then + FTimeStamp := Copy(FLastResponse, I, J); + + FProtocolState := pop3WaitingUser; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Quit : Boolean; +begin + if FProtocolState = pop3Disconnected then begin + { Not connected, it's ok } + Result := TRUE; + Exit; + end; + + try + SendCommand('QUIT'); + Result := GetResponse; + except + Result := FALSE; + end; + + FProtocolState := pop3Disconnected; + FWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.User : Boolean; +begin + Result := FALSE; + if FProtocolState > pop3WaitingUser then begin + FErrorMessage := '-ERR USER command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if (FProtocolState = pop3Disconnected) and (not Connect) then + Exit; + + SendCommand('USER ' + Trim(FUserName)); + if not GetResponse then + Exit; + Result := TRUE; + FProtocolState := pop3WaitingPass; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Apop : Boolean; +begin + Result := FALSE; + if FProtocolState > pop3WaitingUser then begin + FErrorMessage := '-ERR APOP command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if (FProtocolState = pop3Disconnected) and (not Connect) then + Exit; + + if FTimeStamp = '' then begin + FErrorMessage := '-ERR Server do not support APOP (no timestamp)'; + Display(FErrorMessage); + Exit; + end; + + SendCommand('APOP ' + Trim(FUserName)+ ' ' + + StrMD5(FTimeStamp + FPassWord)); + if not GetResponse then + Exit; + Result := TRUE; + FProtocolState := pop3WaitingPass; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Pass : Boolean; +begin + Result := PassRpop('PASS'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Rpop : Boolean; +begin + Result := PassRpop('RPOP'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.PassRpop(OpCode : String) : Boolean; +begin + Result := FALSE; + if FProtocolState > pop3WaitingPass then begin + FErrorMessage := '-ERR ' + OpCode + ' command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if (FProtocolState < pop3WaitingPass) and (not User) then + Exit; + + SendCommand(OpCode + ' ' + Trim(FPassWord)); + if not GetResponse then + Exit; + Result := TRUE; + FProtocolState := pop3Transaction; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Retr : Boolean; +begin + Result := StartTransaction('RETR', IntToStr(FMsgNum)); + if not Result then + Exit; + Result := GetMultiLine(FOnMessageBegin, FOnMessageLine, FOnMessageEnd, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Stat : Boolean; +begin + FMsgCount := 0; + FMsgSize := 0; + + Result := StartTransaction('STAT', ''); + if not Result then + Exit; + + Result := ExtractNumbers(FMsgCount, FMsgSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.ProcessUidl(Sender : TObject); +begin + ExtractUidl(FMsgNum, FMsgUidl); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.ProcessList(Sender : TObject); +begin + ExtractNumbers(FMsgNum, FMsgSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.List : Boolean; +begin + if FMsgNum <= 0 then begin + { Scan LIST command (all messages) } + Result := StartTransaction('LIST', ''); + if not Result then + Exit; + Result := GetMultiLine(FOnListBegin, FOnListLine, + FOnListEnd, ProcessList); + end + else begin + { Single message LIST command } + Result := StartTransaction('LIST', IntToStr(FMsgNum)); + if not Result then + Exit; + Result := ExtractNumbers(FMsgNum, FMsgSize); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Uidl : Boolean; +begin + if FMsgNum <= 0 then begin + { UIDL command (all messages) } + Result := StartTransaction('UIDL', ''); + if not Result then + Exit; + Result := GetMultiLine(FOnUidlBegin, FOnUidlLine, + FOnUidlEnd, ProcessUidl); + end + else begin + { Single message UIDL command } + Result := StartTransaction('UIDL', IntToStr(FMsgNum)); + if not Result then + Exit; + Result := ExtractUidl(FMsgNum, FMsgUidl); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Dele : Boolean; +begin + Result := StartTransaction('DELE', IntToStr(FMsgNum)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Noop : Boolean; +begin + Result := StartTransaction('NOOP', ''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Last : Boolean; +begin + Result := StartTransaction('LAST', ''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Rset : Boolean; +begin + Result := StartTransaction('RSET', ''); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.Top : Boolean; +begin + if FMsgLines < 0 then + Result := FALSE + else + Result := StartTransaction('TOP' , IntToStr(FMsgNum) + ' ' + + IntToStr(FMsgLines)); + if not Result then + Exit; + Result := GetMultiLine(FOnMessageBegin, FOnMessageLine, FOnMessageEnd, nil); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.StartTransaction(OpCode, Params : String) : Boolean; +begin + Result := FALSE; + + if (FProtocolState < pop3Transaction) and (not Pass) then + Exit; + + if FProtocolState <> pop3Transaction then begin + FErrorMessage := '-ERR ' + OpCode + ' command invalid now'; + Display(FErrorMessage); + Exit; + end; + + if Params <> '' then + SendCommand(OpCode + ' ' + Params) + else + SendCommand(OpCode); + + Result := GetResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.GetMultiLine( + aOnBegin : TNotifyEvent; + aOnLine : TNotifyEvent; + aOnEnd : TNotifyEvent; + aProcess : TNotifyEvent) : Boolean; +var + bFlag : Boolean; +begin + { Let the application know that the message is beginning } + if Assigned(aOnBegin) then + aOnBegin(Self); + + bFlag := FALSE; + try + while TRUE do begin + { Read a message line } + FLineTooLong := FALSE; + if FWSocket.State = wsConnected then + FWSocket.ReadLine(FTimeout, FLastResponse); + + { Check if we are still connected } + if FWSocket.State <> wsConnected then begin + FErrorMessage := '-ERR Disconneced unexpectedly'; + Display(FErrorMessage); + break; + end; + + { Check if we timed out } + if FTimeOutFlag then begin + FErrorMessage := '-ERR Receive Timeout'; + Display(FErrorMessage); + break; + end; + + { Check if end of message } + if (not bFlag) and (FLastResponse = '.') then begin + FLastResponse := ''; + break; + end; + + { Check if message contains end-of-message mark } + if FLastResponse = '..' then + FLastResponse := '.'; { Remove byte-stuff } + + { Additional process } + if Assigned(aProcess) then + aProcess(Self); + + { Let the application process the message line } + if Assigned(aOnLine) then + aOnLine(Self); + + bFlag := FLineTooLong; + + { Let other application breaze } + Application.ProcessMessages; + end; + finally + { Let the application know that the message is finished } + if Assigned(aOnEnd) then + aOnEnd(Self); + end; + + Result := not FTimeOutFlag; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.ExtractUidl(var N1 : Integer; var N2 : String) : Boolean; +var + p : PChar; +begin + Result := FALSE; + N1 := 0; + N2 := ''; + +{$IFDEF VER80} + { Delphi 1 do not automatically nul terminate strings } + FLastResponse := FLastResponse + #0; +{$ENDIF} + + { Search for first digit in response } + p := @FLastResponse[1]; + while (p^ <> #0) and (not (p^ in ['0'..'9'])) do + Inc(p); + if p^ = #0 then { Invalid response, need a number } + Exit; + + { Convert first number } + N1 := atoi(p); + + { Search end of number } + while (p^ <> #0) and (p^ in ['0'..'9']) do + Inc(p); + + { Search Uidl } + while (p^ = ' ') do + Inc(p); + + { Copy UIDL } + while (p^ <> #0) and (p^ in [#33..#126]) do begin + N2 := N2 + p^; + Inc(p); + end; + + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.ExtractNumbers(var N1 : Integer; var N2 : Integer) : Boolean; +var + p : PChar; +begin + Result := FALSE; + +{$IFDEF VER80} + { Delphi 1 do not automatically nul terminate strings } + FLastResponse := FLastResponse + #0; +{$ENDIF} + + { Search for first digit in response } + p := @FLastResponse[1]; + while (p^ <> #0) and (not (p^ in ['0'..'9'])) do + Inc(p); + if p^ = #0 then begin + { Invalid response, need a number } + N1 := 0; + N2 := 0; + Exit; + end; + + { Convert first number } + N1 := atoi(p); + + { Search end of number } + while (p^ <> #0) and (p^ in ['0'..'9']) do + Inc(p); + + { Search next number } + p := stpblk(p); + + if p^ = #0 then begin + { Invalid response, need a number } + N1 := 0; + N2 := 0; + Exit; + end; + + N2 := atoi(p); + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.WaitTimeOut(Sender : TObject); +begin + FTimeOutFlag := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.LineTooLong(Sender : TObject); +begin + FLineTooLong := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SessionClosed(Sender : TObject; Error : WORD); +begin + if Assigned(FWait) then + FWait.Stop; + FProtocolState := pop3Disconnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SendCommand(Cmd : String); +begin + Display('> ' + Cmd); + Application.ProcessMessages; + FWSocket.SendStr(Cmd + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TPop3Client.GetResponse : Boolean; +begin + FWSocket.ReadLine(FTimeout, FLastResponse); + Display('< ' + FLastResponse); + Result := ((Length(FLastResponse) > 0) and (FLastResponse[1] = '+')); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SetWait(Value : TWait); +begin + FWait := Value; + FWSocket.WaitCtrl := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then begin + if AComponent = FWait then + FWait := nil + else if AComponent = FWSocket then + FWSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.Display(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.ClearErrorMessage; +begin + FErrorMessage := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPop3Client.SetErrorMessage; +begin + if FErrorMessage = '' then + FErrorMessage := FLastResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TPop3Client]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/POPTST.DPR b/lib/telnet/POPTST.DPR new file mode 100644 index 00000000..c3199e73 --- /dev/null +++ b/lib/telnet/POPTST.DPR @@ -0,0 +1,14 @@ +program PopTst; + +uses + Forms, + PopTst1 in 'PopTst1.pas' {POP3ExcercizerForm}, + PopTst2 in 'PopTst2.pas' {MessageForm}; + +{$R *.RES} + +begin + Application.CreateForm(TPOP3ExcercizerForm, POP3ExcercizerForm); + Application.CreateForm(TMessageForm, MessageForm); + Application.Run; +end. diff --git a/lib/telnet/POPTST1.DFM b/lib/telnet/POPTST1.DFM new file mode 100644 index 00000000..87cc97f2 Binary files /dev/null and b/lib/telnet/POPTST1.DFM differ diff --git a/lib/telnet/POPTST1.PAS b/lib/telnet/POPTST1.PAS new file mode 100644 index 00000000..0858e38a --- /dev/null +++ b/lib/telnet/POPTST1.PAS @@ -0,0 +1,544 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: Show how to use TPop3Cli (POP3 protocol, RFC-1225) +EMail: francois.piette@ping.be + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +WebSite: http://www.rtfm.be/fpiette +Creation: 03 october 1997 +Version: 1.01 +Support: Use twsocket@rtfm.be mailing list. See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Nov 12, 1997 V1.01 Added a GetAll button to get all messages waiting in the + POP3 server, copying them to a file using the UIDL to build + the file name (sorry, wont work with D1 because of long file + name). The message is *NOT* deleted from the POP3 server. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit PopTst1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, pop3cli, StdCtrls, Wait, IniFiles; + +const + PopTstVersion = 101; + +type + TPOP3ExcercizerForm = class(TForm) + Pop3Client: TPop3Client; + ConnectButton: TButton; + Wait1: TWait; + DisplayMemo: TMemo; + InfoLabel: TLabel; + DisconnectButton: TButton; + UserButton: TButton; + HostEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + UserNameEdit: TEdit; + Label3: TLabel; + PassWordEdit: TEdit; + PassButton: TButton; + Label4: TLabel; + MsgNumEdit: TEdit; + RetrButton: TButton; + StatButton: TButton; + ListAllButton: TButton; + ListButton: TButton; + DeleteButton: TButton; + NoopButton: TButton; + LastButton: TButton; + ResetButton: TButton; + TopButton: TButton; + Label5: TLabel; + MsgLinesEdit: TEdit; + RpopButton: TButton; + UidlButton: TButton; + ApopButton: TButton; + NextButton: TButton; + GetAllButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure UserButtonClick(Sender: TObject); + procedure PassButtonClick(Sender: TObject); + procedure Pop3ClientMessageBegin(Sender: TObject); + procedure Pop3ClientMessageEnd(Sender: TObject); + procedure Pop3ClientMessageLine(Sender: TObject); + procedure RetrButtonClick(Sender: TObject); + procedure StatButtonClick(Sender: TObject); + procedure ListAllButtonClick(Sender: TObject); + procedure ListButtonClick(Sender: TObject); + procedure Pop3ClientListBegin(Sender: TObject); + procedure Pop3ClientListEnd(Sender: TObject); + procedure Pop3ClientListLine(Sender: TObject); + procedure DeleteButtonClick(Sender: TObject); + procedure NoopButtonClick(Sender: TObject); + procedure LastButtonClick(Sender: TObject); + procedure ResetButtonClick(Sender: TObject); + procedure TopButtonClick(Sender: TObject); + procedure RpopButtonClick(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure Pop3ClientDisplay(Sender: TObject; Msg: String); + procedure UidlButtonClick(Sender: TObject); + procedure Pop3ClientUidlBegin(Sender: TObject); + procedure Pop3ClientUidlEnd(Sender: TObject); + procedure Pop3ClientUidlLine(Sender: TObject); + procedure ApopButtonClick(Sender: TObject); + procedure NextButtonClick(Sender: TObject); + procedure GetAllButtonClick(Sender: TObject); + private + FFile : TextFile; + FFileName : String; + function DoTheJob(MethodPtr : TPop3Method; MethodName : String) : Boolean; + procedure MessageBegin(Sender: TObject); + procedure MessageLine(Sender: TObject); + procedure GetAllMessageLine(Sender: TObject); + public + { Dclarations publiques } + end; + +var + POP3ExcercizerForm: TPOP3ExcercizerForm; + +implementation + +{$R *.DFM} + +uses + PopTst2; + +const + IniFileName = 'POPTST.INI'; + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Restore some data from the INI file } +procedure TPOP3ExcercizerForm.FormCreate(Sender: TObject); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + HostEdit.Text := IniFile.ReadString('Data', 'Host', ''); + UserNameEdit.Text := IniFile.ReadString('Data', 'UserName', ''); + PassWordEdit.Text := IniFile.ReadString('Data', 'Password', ''); + IniFile.Free; + InfoLabel.Caption := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Save data to INI file } +procedure TPOP3ExcercizerForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteString('Data', 'Host', HostEdit.Text); + IniFile.WriteString('Data', 'UserName', UserNameEdit.Text); + IniFile.WriteString('Data', 'Password', PassWordEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the TPop3Client object wants to display } +{ some information such as connection progress or errors. } +procedure TPOP3ExcercizerForm.Pop3ClientDisplay(Sender: TObject; + Msg: String); +begin + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All the TPop3Client method are of the same type. To simplify this demo } +{ application, DoTheJob transfert the parameters form the various EditBoxes } +{ to the Pop3Client instance and then call the appropriate method, showing } +{ the result in the InfoLabel.Caption. } +function TPOP3ExcercizerForm.DoTheJob( + MethodPtr : TPop3Method; + MethodName : String) : Boolean; +begin + Pop3Client.Host := HostEdit.Text; + Pop3Client.UserName := UserNameEdit.Text; + Pop3Client.PassWord := PassWordEdit.Text; + Pop3Client.MsgNum := StrToInt(MsgNumEdit.Text); + Pop3Client.MsgLines := StrToInt(MsgLinesEdit.Text); + InfoLabel.Caption := MethodName + ' started'; + Result := MethodPtr; + if Result then + InfoLabel.Caption := MethodName + ' ok' + else + InfoLabel.Caption := MethodName + ' failed'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ConnectButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Connect, 'Connect'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.DisconnectButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Quit, 'Quit'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.UserButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.User, 'User'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.PassButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Pass, 'Pass'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.RetrButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Retr, 'Retr'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.StatButtonClick(Sender: TObject); +begin + if DoTheJob(Pop3Client.Stat, 'Stat') then + InfoLabel.Caption := 'Stat ok, ' + + IntToStr(Pop3Client.MsgCount) + ' messages ' + + IntToStr(Pop3Client.MsgSize) + ' bytes' +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ListAllButtonClick(Sender: TObject); +begin + MsgNumEdit.Text := '0'; + DoTheJob(Pop3Client.List, 'List All'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ListButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.List, 'List'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.DeleteButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Dele, 'Delete'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NoopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Noop, 'Noop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.LastButtonClick(Sender: TObject); +begin + if DoTheJob(Pop3Client.Last, 'Last') then + InfoLabel.caption := 'Last = ' + IntToStr(Pop3Client.MsgNum); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ResetButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Rset, 'Rset'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.TopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Top, 'Top'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.RpopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Rpop, 'Rpop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.UidlButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Uidl, 'Uidl'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.ApopButtonClick(Sender: TObject); +begin + DoTheJob(Pop3Client.Apop, 'Apop'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client is about to receive a } +{ message. The MsgNum property gives the message number. } +{ This event handler could be used to open the file used to store the msg. } +{ The file handle could be stored in the TPop3Client.Tag property to be } +{ easily retrieved by the OnMessageLine and OnMessageEnd event handlers. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Message ' + + IntToStr((Sender as TPop3Client).MsgNum) + + ' begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client has detected the end of a } +{ message, even if there is an error or exception, this event gets called. } +{ This event handler could be used to close the file used to store the msg. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Message ' + + IntToStr((Sender as TPop3Client).MsgNum) + + ' end ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each message line that TPop3Client is } +{ receiveing. This could be used to write the message lines to a file. } +procedure TPOP3ExcercizerForm.Pop3ClientMessageLine(Sender: TObject); +begin + DisplayMemo.Lines.Add((Sender as TPop3Client).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client is about to receive a } +{ list line. The MsgNum property gives the message number. } +procedure TPOP3ExcercizerForm.Pop3ClientListBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** List begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when TPop3Client has received the last list } +{ line. } +procedure TPOP3ExcercizerForm.Pop3ClientListEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** List End ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called for each list line received by TPop3Client. } +procedure TPOP3ExcercizerForm.Pop3ClientListLine(Sender: TObject); +var + Buffer : String; +begin + Buffer := 'MsgNum = ' + IntToStr((Sender as TPop3Client).MsgNum) + ' ' + + 'MsgSize = ' + IntToStr((Sender as TPop3Client).MsgSize) + ' ' + + 'Line = ''' + (Sender as TPop3Client).LastResponse + ''''; + DisplayMemo.Lines.Add(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlBegin(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Uidl begin ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlEnd(Sender: TObject); +begin + DisplayMemo.Lines.Add('*** Uidl end ***'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.Pop3ClientUidlLine(Sender: TObject); +var + Buffer : String; +begin + Buffer := 'MsgNum = ' + IntToStr((Sender as TPop3Client).MsgNum) + ' ' + + 'MsgUidl = ' + (Sender as TPop3Client).MsgUidl + ''''; + DisplayMemo.Lines.Add(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.MessageBegin(Sender: TObject); +begin + MessageForm.Caption := 'Message ' + + IntToStr((Sender as TPop3Client).MsgNum); + MessageForm.Show; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.MessageLine(Sender: TObject); +begin + MessageForm.DisplayMemo.Lines.Add((Sender as TPop3Client).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.NextButtonClick(Sender: TObject); +var + OldBegin : TNotifyEvent; + OldEnd : TNotifyEvent; + OldLine : TNotifyEvent; +begin + OldBegin := Pop3Client.OnMessageBegin; + OldEnd := Pop3Client.OnMessageEnd; + OldLine := Pop3Client.OnMessageLine; + + Pop3Client.OnMessageBegin := MessageBegin; + Pop3Client.OnMessageEnd := nil; + Pop3Client.OnMessageLine := MessageLine; + + MessageForm.DisplayMemo.Clear; + MessageForm.Caption := 'Message'; + + DoTheJob(Pop3Client.Retr, 'Retr'); + + if (Length(Pop3Client.LastResponse) > 0) and + (Pop3Client.LastResponse[1] = '-') then + MessageForm.DisplayMemo.Lines.Add(Pop3Client.LastResponse) + else + MsgNumEdit.Text := IntToStr(StrToInt(MsgNumEdit.Text) + 1); + + MessageForm.DisplayMemo.SelStart := 0; + MessageForm.DisplayMemo.SelLength := 0; + + Pop3Client.OnMessageBegin := OldBegin; + Pop3Client.OnMessageEnd := OldEnd; + Pop3Client.OnMessageLine := OldLine; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.GetAllMessageLine(Sender: TObject); +begin + Writeln(FFile, (Sender as TPop3Client).LastResponse); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TPOP3ExcercizerForm.GetAllButtonClick(Sender: TObject); +var + MsgCnt : Integer; + MsgNum : Integer; + Uidl : String; + OldBegin : TNotifyEvent; + OldEnd : TNotifyEvent; + OldLine : TNotifyEvent; + IniFile : TIniFile; + Path : String; +begin + if not DoTheJob(Pop3Client.Stat, 'Stat') then + Exit; + + InfoLabel.Caption := 'Stat ok, ' + + IntToStr(Pop3Client.MsgCount) + ' messages ' + + IntToStr(Pop3Client.MsgSize) + ' bytes'; + if Pop3Client.MsgCount < 1 then + Exit; + + { Get path from INI file } + IniFile := TIniFile.Create(IniFileName); + Path := IniFile.ReadString('Data', 'MsgPath', + ExtractFilePath(Application.ExeName)); + IniFile.Free; + + { Be sure to have an ending backslash } + if (Length(Path) > 0) and (Path[Length(Path)] <> '\') then + Path := Path + '\'; + + OldBegin := Pop3Client.OnMessageBegin; + OldEnd := Pop3Client.OnMessageEnd; + OldLine := Pop3Client.OnMessageLine; + Pop3Client.OnMessageBegin := nil; + Pop3Client.OnMessageEnd := nil; + Pop3Client.OnMessageLine := GetAllMessageLine; + + try + MsgCnt := Pop3Client.MsgCount; + for MsgNum := 1 to MsgCnt do begin + Pop3Client.MsgNum := MsgNum; + if not Pop3Client.Uidl then + continue; + Uidl := Pop3Client.MsgUidl; + FFileName := Path + 'Msg ' + Uidl + '.txt'; + if FileExists(FFileName) then begin + DisplayMemo.Lines.Add('Message ' + IntToStr(MsgNum) + ' already here'); + continue; + end; + + DisplayMemo.Lines.Add('Message ' + IntToStr(Pop3Client.MsgNum)); + AssignFile(FFile, FFileName); + Rewrite(FFile); + try + Pop3Client.Retr; + finally + CloseFile(FFile); + end; + end; + DoTheJob(Pop3Client.Quit, 'Quit'); + finally + Pop3Client.OnMessageBegin := OldBegin; + Pop3Client.OnMessageEnd := OldEnd; + Pop3Client.OnMessageLine := OldLine; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/POPTST2.DFM b/lib/telnet/POPTST2.DFM new file mode 100644 index 00000000..b2ece7d5 Binary files /dev/null and b/lib/telnet/POPTST2.DFM differ diff --git a/lib/telnet/POPTST2.PAS b/lib/telnet/POPTST2.PAS new file mode 100644 index 00000000..7039e139 --- /dev/null +++ b/lib/telnet/POPTST2.PAS @@ -0,0 +1,25 @@ +unit PopTst2; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls; + +type + TMessageForm = class(TForm) + DisplayMemo: TMemo; + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + MessageForm: TMessageForm; + +implementation + +{$R *.DFM} + +end. diff --git a/lib/telnet/SERVER5.DPR b/lib/telnet/SERVER5.DPR new file mode 100644 index 00000000..1257e663 --- /dev/null +++ b/lib/telnet/SERVER5.DPR @@ -0,0 +1,12 @@ +program server5; + +uses + Forms, + srv5 in 'srv5.pas' {ServerForm}; + +{$R *.RES} + +begin + Application.CreateForm(TServerForm, ServerForm); + Application.Run; +end. diff --git a/lib/telnet/SMTPCLI.DCR b/lib/telnet/SMTPCLI.DCR new file mode 100644 index 00000000..79ab0a16 Binary files /dev/null and b/lib/telnet/SMTPCLI.DCR differ diff --git a/lib/telnet/SMTPCLI.PAS b/lib/telnet/SMTPCLI.PAS new file mode 100644 index 00000000..424e3824 --- /dev/null +++ b/lib/telnet/SMTPCLI.PAS @@ -0,0 +1,549 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: TSMTPClient class implements the SMTP protocol (RFC-821) +EMail: francois.piette@ping.be + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +WebSite: http://www.rtfm.be/fpiette +Creation: 09 october 1997 +Version: 1.00 +Support: Use twsocket@rtfm.be mailing list. See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Oct 25, 1997 Added the OnHeaderLine event to allow modification/deletion of + header lines. +Oct 26, 1997 V1.00 Released + Changed the OnGetData event arguments to have code compatible + between 16 and 32 bit versions (replaced string with PChar). + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit smtpcli; + +interface + +{$B-} + +uses + WinTypes, + WinProcs, + SysUtils, + Messages, + Classes, + Graphics, + Controls, + Forms, + Dialogs, + Menus, + WSocket, + Wait; + +const + SmtpCliVersion = 100; + +type + TSmtpDisplay = procedure(Sender: TObject; Msg : String) of object; + TSmtpHeaderLineEvent = procedure(Sender: TObject; Msg : PChar; Size : Integer) of object; + TSmtpGetDataEvent = procedure(Sender: TObject; + LineNum: Integer; + MsgLine: PChar; + MaxLen: Integer; + var More: Boolean) of object; + TSmtpState = (smtpDisconnected, smtpConnecting, smtpConnected); + TSmtpClient = class(TComponent) + private + FWSocket : TWSocket; + FHost : String; + FSignOn : String; + FFromName : String; + FRcptName : TStrings; + FHdrFrom : String; + FHdrTo : String; + FHdrSubject : String; + FState : TSmtpState; + FLastResponse : String; + FErrorMessage : String; + FWait : TWait; + FTimeout : Integer; + FTimeOutFlag : Boolean; + FTag : LongInt; + + FOnDisplay : TSmtpDisplay; + FOnGetData : TSmtpGetDataEvent; + FOnHeaderLine : TSmtpHeaderLineEvent; + protected + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure ClearErrorMessage; + procedure SetErrorMessage; + procedure Display(Msg : String); + procedure SetWait(Value : TWait); + function GetResponse : Integer; + function WaitResponse(ValidResponse : integer; CloseOnError : Boolean) : Boolean; + function WaitResponse2(ValidResponse1 : Integer; + ValidResponse2 : Integer; + CloseOnError : Boolean) : Boolean; + procedure SendCommand(Cmd : String); + procedure WaitTimeOut(Sender : TObject); + procedure SessionClosed(Sender : TObject; Error : WORD); + procedure SendHeaderLine(Line : PChar; Size : Integer); + public + constructor Create(AOwner : TComponent); override; + destructor Destroy; override; + function Connect : Boolean; + function Mail : Boolean; + function Quit : Boolean; + published + property Host : String read FHost + write FHost; + property SignOn : String read FSignOn + write FSignOn; + property FromName : String read FFromName + write FFromName; + property RcptName : TStrings read FRcptName + write FRcptName; + property HdrFrom : String read FHdrFrom + write FHdrFrom; + property HdrTo : String read FHdrTo + write FHdrTo; + property HdrSubject : String read FHdrSubject + write FHdrSubject; + property Wait : TWait read FWait + write SetWait; + property TimeOut : Integer read FTimeout + write FTimeout; + property ErrorMessage : String read FErrorMessage; + property LastResponse : String read FLastResponse; + property Tag : LongInt read FTag + write FTag; + + property OnDisplay : TSmtpDisplay read FOnDisplay + write FOnDisplay; + property OnGetData : TSmtpGetDataEvent read FOnGetData + write FOnGetData; + property OnHeaderLine : TSmtpHeaderLineEvent read FOnHeaderLine + write FOnHeaderLine; + end; + +procedure Register; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function RTrim(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LTrim(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then { Petite optimisation: pas d'espace } + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := LTrim(Rtrim(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function stpblk(PValue : PChar) : PChar; +begin + Result := PValue; + while Result^ in [' ', #9, #10, #13] do + Inc(Result); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(PValue : PChar) : Integer; +begin + Result := 0; + PValue := stpblk(PValue); + while PValue^ in ['0'..'9'] do begin + Result := Result * 10 + ord(PValue^) - ord('0'); + Inc(PValue); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TSmtpClient.Create(AOwner : TComponent); +begin + inherited Create(AOwner); + FWSocket := TWSocket.Create(nil); + FWSocket.OnSessionClosed := SessionClosed; + FTimeout := 15; + FState := smtpDisconnected; + FRcptName := TStringList.Create; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TSmtpClient.Destroy; +begin + if Assigned(FWSocket) then begin + FWSocket.Destroy; + FWSocket := nil; + end; + FRcptName.Destroy; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSmtpClient.Connect : Boolean; +begin + Result := FALSE; + if FWait = nil then begin + FErrorMessage := 'No wait object'; + Display(FErrorMessage); + Exit; + end; + + FWait.OnTimeout := WaitTimeout; + FTimeOutFlag := FALSE; + + if FState > smtpDisconnected then begin + { Already connected, it's ok } + Result := TRUE; + Exit; + end; + + ClearErrorMessage; + + if Length(FHost) = 0 then begin + FErrorMessage := 'No host specified'; + Display(FErrorMessage); + Exit; + end; + + try + FWSocket.Proto := 'tcp'; + FWSocket.Port := 'smtp'; + FWSocket.Addr := FHost; + FWSocket.OnDataAvailable := nil; + + FWSocket.Connect; + except + on E:ESocketException do begin + FErrorMessage := E.Message; + Exit; + end; + end; + + if not FWSocket.Wait(FTimeout, wsConnected) then begin + FErrorMessage := 'Can''t connect to host ''' + FHost + ''''; + Display(FErrorMessage); + FWSocket.Close; + Exit; + end; + Display('Connected with SMTP server'); + + FState := smtpConnecting; + if WaitResponse(220, TRUE) then + Exit; + + if FSignOn = '' then + SendCommand('HELO ' + LocalHostName) + else + SendCommand('HELO ' + FSignOn); + + if WaitResponse(250, TRUE) then + Exit; + + FState := smtpConnected; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpClient.SendHeaderLine(Line : PChar; Size : Integer); +begin + if Assigned(FOnHeaderLine) then + FOnHeaderLine(Self, Line, Size); + if Line[0] <> #0 then + SendCommand(StrPas(Line)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSmtpClient.Mail : Boolean; +var + I : Integer; + LineNum : Integer; + More : Boolean; + MsgLine : array [0..1023] of char; +begin + Result := FALSE; + if (FState = smtpDisconnected) and (not Connect) then + Exit; + + SendCommand('MAIL FROM:<' + Trim(FFromName) + '>'); + if WaitResponse(250, FALSE) then + Exit; + + for I := 0 to FRcptName.Count - 1 do begin + SendCommand('RCPT TO:<' + Trim(FRcptName.Strings[I]) + '>'); + if WaitResponse2(250, 251, FALSE) then + Exit; + end; + + SendCommand('DATA'); + if WaitResponse(354, FALSE) then + Exit; + + StrPCopy(MsgLine, 'From: ' + FHdrFrom); + SendHeaderLine(@MsgLine, SizeOf(MsgLine)); + StrPCopy(MsgLine, 'To: ' + FHdrTo); + SendHeaderLine(@MsgLine, SizeOf(MsgLine)); + StrPCopy(MsgLine, 'Subject: ' + FHdrSubject); + SendHeaderLine(@MsgLine, SizeOf(MsgLine)); + StrPCopy(MsgLine, 'Mime-Version: 1.0'); + SendHeaderLine(@MsgLine, SizeOf(MsgLine)); + StrPCopy(MsgLine, 'Content-Type: text/plain; charset="iso-8859-1"'); + SendHeaderLine(@MsgLine, SizeOf(MsgLine)); + SendCommand(''); + + More := TRUE; + LineNum := 1; + while More and (FState = smtpConnected) do begin + if not Assigned(FOnGetData) then + break; + try + FOnGetData(Self, LineNum, @MsgLine, High(MsgLine), More); + except + More := FALSE; + end; + if not More then + break; + if StrComp(MsgLine, '.') = 0 then + StrCopy(MsgLine, '..'); + SendCommand(StrPas(MsgLine)); + Inc(LineNum); + Application.ProcessMessages; + end; + SendCommand('.'); + if WaitResponse(250, FALSE) then + Exit; + + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSmtpClient.Quit : Boolean; +begin + if FState = smtpDisconnected then begin + { Not connected, it's ok } + Result := TRUE; + Exit; + end; + + try + SendCommand('QUIT'); + Result := (GetResponse <> 221); + except + Result := FALSE; + end; + + FState := smtpDisconnected; + FWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpClient.WaitTimeOut(Sender : TObject); +begin + FTimeOutFlag := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpClient.SessionClosed(Sender : TObject; Error : WORD); +begin + if Assigned(FWait) then + FWait.Stop; + FState := smtpDisconnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpClient.SendCommand(Cmd : String); +begin + if FState = smtpDisconnected then + Exit; + + Display('> ' + Cmd); + Application.ProcessMessages; + FWSocket.SendStr(Cmd + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TSmtpClient.GetResponse : integer; +begin + if FState = smtpDisconnected then begin + FLastResponse := '554 not connected'; + Display('< ' + FLastResponse); + end + else begin + repeat + FWSocket.ReadLine(FTimeout, FLastResponse); + if FTimeOutFlag then + FLastResponse := '554 receive timeout'; + Display('< ' + FLastResponse); + until (FTimeOutFlag) or + (Length(FLastResponse) < 4) or + (FLastResponse[4] <> '-'); + end; + + Result := atoi(@FLastResponse[1]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Wait for a response and check for validity. If response is not valid, } +{ return TRUE and optionnaly close the socket. } +function TSmtpClient.WaitResponse2( + ValidResponse1 : integer; + ValidResponse2 : integer; + CloseOnError : Boolean) : Boolean; +var + Response : Integer; +begin + Response := GetResponse; + Result := ((Response <> ValidResponse1) and + (Response <> ValidResponse2)); + if Result then begin + SetErrorMessage; + if CloseOnError then + FWSocket.Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Wait for a response and check for validity. If response is not valid, } +{ return TRUE and optionnaly close the socket. } +function TSmtpClient.WaitResponse( + ValidResponse : integer; + CloseOnError : Boolean) : Boolean; +begin + Result := (GetResponse <> ValidResponse); + if Result then begin + SetErrorMessage; + if CloseOnError then + FWSocket.Close; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpClient.SetWait(Value : TWait); +begin + FWait := Value; + FWSocket.WaitCtrl := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpClient.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if Operation = opRemove then begin + if AComponent = FWait then + FWait := nil + else if AComponent = FWSocket then + FWSocket := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpClient.Display(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpClient.ClearErrorMessage; +begin + FErrorMessage := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpClient.SetErrorMessage; +begin + if FErrorMessage = '' then + FErrorMessage := FLastResponse; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TSmtpClient]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/SMTPTST.DPR b/lib/telnet/SMTPTST.DPR new file mode 100644 index 00000000..08452bce --- /dev/null +++ b/lib/telnet/SMTPTST.DPR @@ -0,0 +1,12 @@ +program smtptst; + +uses + Forms, + smtptst1 in 'smtptst1.pas' {SmtpTestForm}; + +{$R *.RES} + +begin + Application.CreateForm(TSmtpTestForm, SmtpTestForm); + Application.Run; +end. diff --git a/lib/telnet/SMTPTST1.DFM b/lib/telnet/SMTPTST1.DFM new file mode 100644 index 00000000..1deabf02 Binary files /dev/null and b/lib/telnet/SMTPTST1.DFM differ diff --git a/lib/telnet/SMTPTST1.PAS b/lib/telnet/SMTPTST1.PAS new file mode 100644 index 00000000..e9383f4b --- /dev/null +++ b/lib/telnet/SMTPTST1.PAS @@ -0,0 +1,165 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +Author: Franois PIETTE +Object: How to use TSMTPClient +EMail: francois.piette@ping.be + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +WebSite: http://www.rtfm.be/fpiette +Creation: 09 october 1997 +Version: 1.00 +Support: Use twsocket@rtfm.be mailing list. See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Oct 26, 1997 V1.00 Released + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit smtptst1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, SmtpCli, StdCtrls, Wait; + +type + TSmtpTestForm = class(TForm) + SmtpClient: TSmtpClient; + Wait1: TWait; + MsgMemo: TMemo; + DisplayMemo: TMemo; + Label1: TLabel; + HostEdit: TEdit; + Label2: TLabel; + FromEdit: TEdit; + Label3: TLabel; + ToEdit: TEdit; + ConnectButton: TButton; + MailButton: TButton; + SubjectEdit: TEdit; + Subject: TLabel; + DisconnectButton: TButton; + SignOnEdit: TEdit; + procedure ConnectButtonClick(Sender: TObject); + procedure MailButtonClick(Sender: TObject); + procedure SmtpClientDisplay(Sender: TObject; Msg: String); + procedure DisconnectButtonClick(Sender: TObject); + procedure SmtpClientGetData(Sender: TObject; LineNum: Integer; + MsgLine: PChar; MaxLen: Integer; var More: Boolean); + procedure SmtpClientHeaderLine(Sender: TObject; Msg: PChar; + Size: Integer); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + SmtpTestForm: TSmtpTestForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.ConnectButtonClick(Sender: TObject); +begin + SmtpClient.Host := HostEdit.Text; + SmtpClient.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.MailButtonClick(Sender: TObject); +begin + SmtpClient.Host := HostEdit.Text; + SmtpClient.HdrFrom := FromEdit.Text; + SmtpClient.HdrTo := ToEdit.Text; + SmtpClient.HdrSubject := SubjectEdit.Text; + SmtpClient.SignOn := SignOnEdit.Text; + SmtpClient.FromName := FromEdit.Text; + SmtpClient.RcptName.Clear; + SmtpClient.RcptName.Add(ToEdit.Text); + SmtpClient.Mail; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.SmtpClientDisplay(Sender: TObject; Msg: String); +begin + DisplayMemo.Lines.Add(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.DisconnectButtonClick(Sender: TObject); +begin + SmtpClient.Quit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.SmtpClientGetData( + Sender : TObject; + LineNum : Integer; + MsgLine : PChar; + MaxLen : Integer; + var More: Boolean); +var + Len : Integer; +begin + if LineNum > MsgMemo.Lines.count then + More := FALSE + else begin + Len := Length(MsgMemo.Lines[LineNum - 1]); + { Truncate the line if too long (should wrap to next line) } + if Len >= MaxLen then + StrPCopy(MsgLine, Copy(MsgMemo.Lines[LineNum - 1], 1, MaxLen - 1)) + else + StrPCopy(MsgLine, MsgMemo.Lines[LineNum - 1]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSmtpTestForm.SmtpClientHeaderLine(Sender: TObject; Msg: PChar; + Size: Integer); +begin + { This demonstrate how to add a line to the message header } + { Just detect one of the header lines and add text at the end of this } + { line. Use #13#10 to form a new line } + { Here we check for the From: header line and add a Comments: line } + if StrLIComp(Msg, 'From:', 5) = 0 then + StrCat(Msg, #13#10 + 'Comments: This is a test'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} diff --git a/lib/telnet/SRV5.DFM b/lib/telnet/SRV5.DFM new file mode 100644 index 00000000..ceddc3bf Binary files /dev/null and b/lib/telnet/SRV5.DFM differ diff --git a/lib/telnet/SRV5.PAS b/lib/telnet/SRV5.PAS new file mode 100644 index 00000000..895196c4 --- /dev/null +++ b/lib/telnet/SRV5.PAS @@ -0,0 +1,141 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Object: Demo program to show how to use TWSocket object is a very + simple server program. This server just wait for a client to + connect, then send 'Hello'. When the user click on the + disconnect button, the client is disconnected. +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: September 19, 1996 +Version: 2.01 +Support: Please ask your question in the following newsgroup: + news://forums.borland.com/borland.public.delphi.vcl.components.using +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Mar 19, 1997 Use enhanced TWSocket object +Sep 06, 1997 Beautified + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit srv5; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, + Controls, Forms, Dialogs, Wsocket, Winsock, StdCtrls; + +type + TServerForm = class(TForm) + SrvSocket: TWSocket; + InfoLabel: TLabel; + CliSocket: TWSocket; + DisconnectButton: TButton; + procedure SrvSocketSessionAvailable(Sender: TObject; Error: Word); + procedure FormShow(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + end; + +var + ServerForm: TServerForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +begin + if FirstTime then begin + FirstTime := FALSE; { Do it only once ! } + SrvSocket.Addr := '0.0.0.0'; { Accept any client } + SrvSocket.Listen; { Start listening for client } + InfoLabel.Caption := 'Waiting for client'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler is called once a client has connected the server. *} +procedure TServerForm.SrvSocketSessionAvailable(Sender: TObject; Error: Word); +var + NewHSocket : TSocket; + PeerName : TSockAddrIn; + Peer : String; +begin + { We need to accept the client connection } + NewHSocket := SrvSocket.Accept; + + { And then associate this connection with our client socket } + CliSocket.Dup(NewHSocket); + + { Wants to know who is connected to display on screen } + CliSocket.GetPeerName(PeerName, Sizeof(PeerName)); + + { User likes to see internet address in dot notation } + Peer := IntToStr(ord(PeerName.sin_addr.S_un_b.s_b1)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b2)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b3)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b4)); + InfoLabel.Caption := 'Remote ' + Peer + ' connected'; + + { Send a welcome message to the client } + CliSocket.SendStr('Hello' + #13 + #10); + + { Enable the server user to disconect the client } + DisconnectButton.Enabled := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler is called once the user clicks on Ddisconnect *} +procedure TServerForm.DisconnectButtonClick(Sender: TObject); +begin + CliSocket.ShutDown(2); { Shut the communication down } + CliSocket.Close; { Close the communication } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* This event handler is called once the client connection is broken. *} +{* Either by the client or the server. *} +procedure TServerForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + DisconnectButton.Enabled := FALSE; + InfoLabel.Caption := 'Waiting for client';{ Inform the user } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} diff --git a/lib/telnet/SRVDEMO.DPR b/lib/telnet/SRVDEMO.DPR new file mode 100644 index 00000000..3406c31f --- /dev/null +++ b/lib/telnet/SRVDEMO.DPR @@ -0,0 +1,13 @@ +program SrvDemo; + +uses + Forms, + SrvDemo1 in 'SrvDemo1.pas' {SrvForm}, + SrvDemo2 in 'SrvDemo2.pas' {CliForm}; + +{$R *.RES} + +begin + Application.CreateForm(TSrvForm, SrvForm); + Application.Run; +end. diff --git a/lib/telnet/SRVDEMO1.DFM b/lib/telnet/SRVDEMO1.DFM new file mode 100644 index 00000000..ca5bbee1 Binary files /dev/null and b/lib/telnet/SRVDEMO1.DFM differ diff --git a/lib/telnet/SRVDEMO1.PAS b/lib/telnet/SRVDEMO1.PAS new file mode 100644 index 00000000..c32feaf1 --- /dev/null +++ b/lib/telnet/SRVDEMO1.PAS @@ -0,0 +1,182 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstration for Server program using TWSocket. +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: 8 december 1997 +Version: 1.01 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Dec 09, 1997 V1.01 Made it compatible with Delphi 1 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Srvdemo1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, IniFiles, WSocket, WinSock, SrvDemo2, Db, DBTables, + ExtCtrls; + +const + IniFileName = 'SrvDemo.ini'; + +type + TSrvForm = class(TForm) + SrvSocket: TWSocket; + ClientListBox: TListBox; + DataTable: TTable; + Panel1: TPanel; + Label1: TLabel; + PortEdit: TEdit; + PortButton: TButton; + procedure FormShow(Sender: TObject); + procedure SrvSocketSessionAvailable(Sender: TObject; Error: Word); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure PortButtonClick(Sender: TObject); + private + { Dclarations prives } + Initialized : Boolean; + ClientNumber : Integer; + procedure WMUser(var msg: TMessage); message WM_USER; + procedure StartServer; + public + { Dclarations publiques } + end; + +var + SrvForm: TSrvForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.FormShow(Sender: TObject); +var + IniFile : TIniFile; + Buffer : String; +begin + if not Initialized then begin + Initialized := TRUE; + IniFile := TIniFile.Create(IniFileName); + Top := IniFile.ReadInteger('Window', 'Top', Top); + Left := IniFile.ReadInteger('Window', 'Left', Left); + Width := IniFile.ReadInteger('Window', 'Width', Width); + Height := IniFile.ReadInteger('Window', 'Height', Height); + PortEdit.Text := IniFile.ReadString('Data', 'Port', 'telnet'); + IniFile.Free; + + DataTable.DataBaseName := ExtractFilePath(Application.ExeName); + try + DataTable.Open; + except + Buffer := 'Unable to open ' + DataTable.DataBaseName + + DataTable.TableName + #0; + Application.MessageBox(@Buffer[1], 'Error', MB_OK); + Application.Terminate; + Exit; + end; + StartServer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.FormClose(Sender: TObject; var Action: TCloseAction); +var + IniFile : TIniFile; +begin + IniFile := TIniFile.Create(IniFileName); + IniFile.WriteInteger('Window', 'Top', Top); + IniFile.WriteInteger('Window', 'Left', Left); + IniFile.WriteInteger('Window', 'Width', Width); + IniFile.WriteInteger('Window', 'Height', Height); + IniFile.WriteString('Data', 'Port', PortEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.PortButtonClick(Sender: TObject); +begin + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.StartServer; +begin + SrvSocket.Close; + SrvSocket.Addr := '0.0.0.0'; + SrvSocket.Port := PortEdit.Text; + SrvSocket.Proto := 'tcp'; + SrvSocket.Listen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.SrvSocketSessionAvailable(Sender: TObject; Error: Word); +var + Form : TCliForm; +begin + Inc(ClientNumber); + Form := TCliForm.Create(self); + ClientListBox.Items.Add(IntToStr(LongInt(Form))); + Form.CliSocket.HSocket := SrvSocket.Accept; + Form.DataTable := DataTable; + Form.Caption := 'Client ' + IntToStr(ClientNumber); + Form.Show; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TSrvForm.WMUser(var msg: TMessage); +var + Form : TCliForm; + I : Integer; +begin + Form := TCliForm(Msg.lParam); + Form.Release; + for I := 0 to ClientListBox.Items.Count - 1 do begin + if ClientListBox.Items[I] = IntToStr(LongInt(Form)) then begin + ClientListBox.Items.Delete(I); + break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/SRVDEMO2.DFM b/lib/telnet/SRVDEMO2.DFM new file mode 100644 index 00000000..1ffeba6f Binary files /dev/null and b/lib/telnet/SRVDEMO2.DFM differ diff --git a/lib/telnet/SRVDEMO2.PAS b/lib/telnet/SRVDEMO2.PAS new file mode 100644 index 00000000..cf8ba345 --- /dev/null +++ b/lib/telnet/SRVDEMO2.PAS @@ -0,0 +1,268 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: Demonstration for Server program using TWSocket. +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: 8 december 1997 +Version: 1.00 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit SrvDemo2; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, WSocket, StdCtrls, Db, DBTables, ExtCtrls; + +type + TCliForm = class(TForm) + CliSocket: TWSocket; + DisplayMemo: TMemo; + Panel1: TPanel; + SendEdit: TEdit; + SendButton: TButton; + Panel2: TPanel; + LineLabel: TLabel; + DisconnectButton: TButton; + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure CliSocketDataAvailable(Sender: TObject; Error: Word); + procedure CliSocketSessionClosed(Sender: TObject; Error: Word); + procedure SendButtonClick(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + private + { Dclarations prives } + Initialized : Boolean; + Buffer : array [0..1023] of char; + Count : Integer; + procedure ProcessCommand(Cmd : String); + public + { Dclarations publiques } + DataTable : TTable; + end; + +var + CliForm: TCliForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.FormShow(Sender: TObject); +begin + if not Initialized then begin + Initialized := TRUE; + DisplayMemo.Clear; + SendEdit.Text := 'Hello world !'; + ActiveControl := SendEdit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.FormClose(Sender: TObject; var Action: TCloseAction); +begin + PostMessage(TForm(Owner).Handle, WM_USER, 0, LongInt(Self)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.ProcessCommand(Cmd : String); +var + CommandVerb : String; + CommandTail : String; + I, J : Integer; +begin + { Remove trailing #13 } + if (Length(Cmd) > 0) and (Cmd[Length(Cmd)] = #13) then + SetLength(Cmd, Length(Cmd) - 1); + + DisplayMemo.Lines.Add(Cmd); + + { Skip leading spaces } + I := 1; + while (I <= Length(Cmd)) and (Cmd[I] in [' ', #9]) do + Inc(I); + + { Find separator and separe CommandVerb and CommandTail } + J := I; + while TRUE do begin + if (J >= Length(Cmd)) then begin + CommandTail := ''; + CommandVerb := Cmd; + break; + end; + + if Cmd[J] in [' ', #9, '/'] then begin + CommandTail := Copy(Cmd, J, Length(Cmd) - J + 1); + CommandVerb := Copy(Cmd, I, J - I); + break; + end; + Inc(J); + end; + CommandVerb := UpperCase(CommandVerb); + CommandTail := Trim(CommandTail); + + if CommandVerb = 'LASTNAME' then begin + DataTable.IndexName := 'NOM'; + DataTable.SetKey; + DataTable.FieldByName('NOM').AsString := CommandTail; + end + else if CommandVerb = 'FIRSTNAME' then begin + DataTable.IndexName := 'PRENOM'; + DataTable.SetKey; + DataTable.FieldByName('PRENOM').AsString := CommandTail; + end + else begin + CliSocket.SendStr('Syntax error !' + #13 + #10); + Exit; + end; + + if DataTable.GotoKey then + CliSocket.SendStr( + '"' + DataTable.FieldByName('NOM').AsString + '", ' + + '"' + DataTable.FieldByName('PRENOM').AsString + '", ' + + '"' + DataTable.FieldByName('ADRESSE').AsString + '", ' + + '"' + DataTable.FieldByName('CP').AsString + '", ' + + '"' + DataTable.FieldByName('LOCALITE').AsString + '"' + + #13 + #10) + else + CliSocket.SendStr('Pas trouv' + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.CliSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I : Integer; +begin + Len := CliSocket.Receive(@Buffer[Count], SizeOf(Buffer) - Count - 1); + if Len <= 0 then + Exit; + + Count := Count + Len; + Buffer[Count] := #0; + LineLabel.Caption := StrPas(Buffer); + + while TRUE do begin + I := 0; + while (I < Count) and (Buffer[I] <> #10) do + Inc(I); + if I >= Count then + Exit; + ProcessCommand(Copy(StrPas(Buffer), 1, I)); + Count := 0; + LineLabel.Caption := ''; + if I >= StrLen(Buffer) then + break; + Move(Buffer[I + 1], Buffer, Strlen(Buffer) - I); + LineLabel.Caption := StrPas(Buffer); + Count := StrLen(Buffer); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.CliSocketSessionClosed(Sender: TObject; Error: Word); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.SendButtonClick(Sender: TObject); +begin + CliSocket.SendStr(SendEdit.Text + #13 + #10); + ActiveControl := SendEdit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCliForm.DisconnectButtonClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/TNCLI1.DFM b/lib/telnet/TNCLI1.DFM new file mode 100644 index 00000000..ae38e890 Binary files /dev/null and b/lib/telnet/TNCLI1.DFM differ diff --git a/lib/telnet/TNCLI1.PAS b/lib/telnet/TNCLI1.PAS new file mode 100644 index 00000000..40fa474c --- /dev/null +++ b/lib/telnet/TNCLI1.PAS @@ -0,0 +1,220 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: TNCLIENT.PAS +Object: Delphi application which is a basic telnet program demonstrating + WSocket, TnCnx, TnEmulVT, EmulVT components. +Author: Franois PIETTE +Copyright: You can use this software freely, at your own risks + If you use my work, a little credit is appreciated. +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: July 22, 1997 +Version: 2.04 +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 05, 1997 Added display of windows socket version info. +Sep 23, 1997 Added local echo check box +Sep 24, 1997 V203. Added TnEmulVT1.RestoreOptions just before connecting + Added interactive support for telnet echo option. +Sep 25, 1997 V204. Port to C++Builder + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnCli1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, EmulVT, TnEmulVT, WSocket, Winsock; + +type + TTelnetForm = class(TForm) + TnEmulVT1: TTnEmulVT; + ConnectButton: TButton; + Label1: TLabel; + HostNameEdit: TEdit; + Label2: TLabel; + PortEdit: TEdit; + DisconnectButton: TButton; + StatusLabel: TLabel; + SendButton: TButton; + OptionsButton: TButton; + LocalEchoCheckBox: TCheckBox; + RequestLocalEchoOnButton: TButton; + RequestLocalEchoOffButton: TButton; + procedure ConnectButtonClick(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure TnEmulVT1SessionConnected(Sender: TObject); + procedure TnEmulVT1SessionClosed(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure OptionsButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure LocalEchoCheckBoxClick(Sender: TObject); + procedure TnEmulVT1LocalEcho(Sender: TObject); + procedure RequestLocalEchoOnButtonClick(Sender: TObject); + procedure RequestLocalEchoOffButtonClick(Sender: TObject); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + TelnetForm: TTelnetForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.ConnectButtonClick(Sender: TObject); +begin + StatusLabel.Caption := 'Connecting'; + Refresh; + ConnectButton.Enabled := FALSE; + try + TnEmulVT1.Disconnect; + TnEmulVT1.Port := PortEdit.Text; + TnEmulVT1.HostName := HostNameEdit.Text; + TnEmulVT1.RestoreOptions; + { This can take quite a long time when hostname is unknown and } + { if DNS feature is enabled (2 or 3 minutes !) } + TnEmulVT1.Connect; + except + ConnectButton.Enabled := TRUE; + raise; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.DisconnectButtonClick(Sender: TObject); +begin + TnEmulVT1.Disconnect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.TnEmulVT1SessionConnected(Sender: TObject); +begin + DisconnectButton.Enabled := TRUE; + StatusLabel.Caption := 'Connected'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.TnEmulVT1SessionClosed(Sender: TObject); +begin + DisconnectButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + StatusLabel.Caption := 'Not connected'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.FormCreate(Sender: TObject); +begin + StatusLabel.Caption := 'Not connected'; + TnEmulVT1.RestoreOptions; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.FormResize(Sender: TObject); +begin + TnEmulVT1.Width := ClientWidth; + TnEmulVT1.Height := ClientHeight - TnEmulVT1.Top; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.SendButtonClick(Sender: TObject); +begin + TnEmulVT1.SendStr('Hello world !' + #13#10); + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.OptionsButtonClick(Sender: TObject); +begin + TnEmulVT1.HostName := HostNameEdit.Text; + TnEmulVT1.EditOptions; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.FormShow(Sender: TObject); +var + WinsockData : TWSADATA; +begin + WinsockData := WinsockInfo; + StatusLabel.Caption := StrPas(WinsockData.szDescription); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.TnEmulVT1LocalEcho(Sender: TObject); +begin + if TnEmulVT1.GetLocalEcho then + StatusLabel.Caption := 'Remote will not echo' + else + StatusLabel.Caption := 'Remote will echo'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.LocalEchoCheckBoxClick(Sender: TObject); +begin + TnEmulVT1.LocalEcho := LocalEchoCheckBox.Checked; + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.RequestLocalEchoOnButtonClick(Sender: TObject); +begin + TnEmulVT1.RequestLocalEcho(TRUE); + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTelnetForm.RequestLocalEchoOffButtonClick(Sender: TObject); +begin + TnEmulVT1.RequestLocalEcho(FALSE); + ActiveControl := TnEmulVT1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/TNCLIENT.DPR b/lib/telnet/TNCLIENT.DPR new file mode 100644 index 00000000..301be2d9 --- /dev/null +++ b/lib/telnet/TNCLIENT.DPR @@ -0,0 +1,12 @@ +program TnClient; + +uses + Forms, + TnCli1 in 'TnCli1.pas' {TelnetForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTelnetForm, TelnetForm); + Application.Run; +end. diff --git a/lib/telnet/TNCNX.DCR b/lib/telnet/TNCNX.DCR new file mode 100644 index 00000000..3e5cfb48 Binary files /dev/null and b/lib/telnet/TNCNX.DCR differ diff --git a/lib/telnet/TNCNX.GID b/lib/telnet/TNCNX.GID new file mode 100644 index 00000000..470a57d6 Binary files /dev/null and b/lib/telnet/TNCNX.GID differ diff --git a/lib/telnet/TNDEMO.DPR b/lib/telnet/TNDEMO.DPR new file mode 100644 index 00000000..97dbac97 --- /dev/null +++ b/lib/telnet/TNDEMO.DPR @@ -0,0 +1,12 @@ +program tndemo; + +uses + Forms, + tndemo1 in 'tndemo1.pas' {TnDemoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTnDemoForm, TnDemoForm); + Application.Run; +end. diff --git a/lib/telnet/TNDEMO1.DFM b/lib/telnet/TNDEMO1.DFM new file mode 100644 index 00000000..691eeb32 Binary files /dev/null and b/lib/telnet/TNDEMO1.DFM differ diff --git a/lib/telnet/TNDEMO1.PAS b/lib/telnet/TNDEMO1.PAS new file mode 100644 index 00000000..12397aac --- /dev/null +++ b/lib/telnet/TNDEMO1.PAS @@ -0,0 +1,185 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: How to use TnCnx (Telnet protocol) with a TMemo +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: December 11, 1997 +Version: 1.00 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit tndemo1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, TnCnx, ExtCtrls; + +type + TTnDemoForm = class(TForm) + DisplayMemo: TMemo; + Panel1: TPanel; + TnCnx: TTnCnx; + HostLabel: TLabel; + HostEdit: TEdit; + ConnectButton: TButton; + InfoLabel: TLabel; + DisconnectButton: TButton; + PortLabel: TLabel; + PortEdit: TEdit; + procedure ConnectButtonClick(Sender: TObject); + procedure TnCnxDataAvailable(Sender: TTnCnx; Buffer: PChar; + Len: Integer); + procedure TnCnxSessionConnected(Sender: TTnCnx; Error: Word); + procedure DisplayMemoKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure DisplayMemoKeyPress(Sender: TObject; var Key: Char); + procedure TnCnxSessionClosed(Sender: TTnCnx; Error: Word); + procedure DisconnectButtonClick(Sender: TObject); + private + { Dclarations prives } + public + { Dclarations publiques } + end; + +var + TnDemoForm: TTnDemoForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Display a message in the memo field, breaking with CR *} +procedure MemoAddLines(Memo : TMemo; Msg : String); +const + CR = #13; + LF = #10; +var + Start, Stop : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add(''); + + Start := 1; + Stop := Pos(CR, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := + Memo.Lines.Strings[Memo.Lines.Count - 1] + + Copy(Msg, Start, Stop - Start); + if Msg[Stop] = CR then begin + Memo.Lines.Add(''); + SendMessage(Memo.Handle, WM_KEYDOWN, VK_UP, 1); + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + if Msg[Start] = LF then + Start := Start + 1; + Stop := Start; + while (Msg[Stop] <> CR) and (Stop <= Length(Msg)) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.ConnectButtonClick(Sender: TObject); +begin + TnCnx.Host := HostEdit.Text; + TnCnx.Port := PortEdit.Text; + TnCnx.TermType := 'VT100'; + TnCnx.LocalEcho := FALSE; + TnCnx.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.DisconnectButtonClick(Sender: TObject); +begin + TnCnx.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.TnCnxSessionConnected(Sender: TTnCnx; Error: Word); +begin + DisplayMemo.Clear; + InfoLabel.Caption := 'Connected'; + DisplayMemo.Enabled := TRUE; + ConnectButton.Enabled := FALSE; + DisconnectButton.Enabled := TRUE; + ActiveControl := DisplayMemo; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.TnCnxSessionClosed(Sender: TTnCnx; Error: Word); +begin + InfoLabel.Caption := 'Disconnected'; + DisplayMemo.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + DisconnectButton.Enabled := FALSE; + ActiveControl := ConnectButton; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.TnCnxDataAvailable(Sender: TTnCnx; Buffer: PChar; + Len: Integer); +begin + MemoAddLines(DisplayMemo, StrPas(Buffer)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.DisplayMemoKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + Key := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnDemoForm.DisplayMemoKeyPress(Sender: TObject; var Key: Char); +begin + TnCnx.Send(@Key, 1); + Key := #0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} diff --git a/lib/telnet/TNEMULVT.DCR b/lib/telnet/TNEMULVT.DCR new file mode 100644 index 00000000..f171a436 Binary files /dev/null and b/lib/telnet/TNEMULVT.DCR differ diff --git a/lib/telnet/TNEMULVT.PAS b/lib/telnet/TNEMULVT.PAS new file mode 100644 index 00000000..c46f6a7a --- /dev/null +++ b/lib/telnet/TNEMULVT.PAS @@ -0,0 +1,703 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: TNEMULVT.PAS +Object: Delphi component combining both TnCnx and EmulVT components. + Hence it does ANSI emulation using TCP/IP telnet protocol. +Author: Franois PIETTE +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Support: Please ask your question in the following newsgroup: + news://forums.borland.com/borland.public.delphi.vcl.components.using +Creation: May, 1996 +Version: 2.03 +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Jul 22, 1997 Revised Connect method to be callable from FormCreate event + Adapted to Delphi 3 +Sep 05, 1997 TnCnx made public, Minor change to method visibility + Added OnTermType and OnDataAvailable events. +Sep 23, 1997 V202. Added local echo support (incomplete because we should ask + the remote host not to echo characters. Will implement later) + Added TnEmultVTVersion +Sep 24, 1997 V203. Complete local echo support. +Sep 25, 1997 V204. Port to C++Builder + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnEmulvt; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, EmulVT, TnCnx, IniFiles, TnOptFrm, WSocket; + +const + TnEmultVTVersion = 204; + +type + TTnEmulVTDataAvailable = procedure (Sender : TObject; + Buffer : PChar; + var Len : Integer) of object; + TTnEmulVT = class(TEmulVT) + public + TnCnx : TTnCnx; + private + FError : Word; + FIniFilename : String; + FSectionName : String; + FKeyName : String; + FHostName : String; + FPort : String; + FTag : LongInt; + FUpperLock : Boolean; + FLocalEcho : Boolean; + FOnSessionClosed : TNotifyEvent; + FOnSessionConnected : TNotifyEvent; + FOnNamesClick : TNotifyEvent; + FOnSendLoc : TNotifyEvent; + FOnTermType : TNotifyEvent; + FOnLocalEcho : TNotifyEvent; + FOnDataAvailable : TTnEmulVTDataAvailable; + FMouseDown : Boolean; + FMouseCaptured : Boolean; + FMouseTop : Integer; + FMouseLeft : Integer; + FFocusDrawn : Boolean; + FFocusRect : TRect; + procedure TnCnxDataAvailable(Sender: TTnCnx; Buffer: PChar; Len : Integer); + procedure TnCnxSessionClosed(Sender: TTnCnx; Erc: Word); + procedure TnCnxSessionConnected(Sender: TTnCnx; Erc: Word); + procedure TnCnxSendLoc(Sender: TObject); + procedure TnCnxTermType(Sender: TObject); + procedure TnCnxLocalEcho(Sender: TObject); + procedure Display(Msg : String); + procedure KeyPress(var Key: Char); override; + procedure DoKeyBuffer(Buffer : PChar; Len : Integer); override; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); override; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); override; + procedure SetOnEndOfRecord(Value : TNotifyEvent); + function GetOnEndOfRecord : TNotifyEvent; + procedure SetLocation(Value : String); + function GetLocation : String; + procedure SetHostName(newValue : String); + public + procedure RequestLocalEcho(newValue : Boolean); + function GetLocalEcho : Boolean; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Connect; + procedure Disconnect; + procedure EditOptions; + procedure RestoreOptions; + function IsConnected : Boolean; + function Send(Data : Pointer; Len : Integer) : integer; + function SendStr(Data : String) : integer; + function GetSelTextBuf(Buffer: PChar; BufSize: Integer): Integer; + published + property IniFilename : String read FIniFileName write FIniFileName; + property SectionName : String read FSectionName write FSectionName; + property KeyName : String read FKeyName write FKeyName; + property Error : Word read FError write FError; + property HostName : String read FHostName write SetHostName; + property Port : String read FPort write FPort; + property Tag : LongInt read FTag write FTag; + property Location : String read GetLocation write SetLocation; + property UpperLock : Boolean read FUpperLock write FUpperLock; + property LocalEcho : Boolean read FLocalEcho write FLocalEcho; + + property OnSessionClosed : TNotifyEvent read FOnSessionClosed + write FOnSessionClosed; + property OnSessionConnected : TNotifyEvent read FOnSessionConnected + write FOnSessionConnected; + property OnEndOfRecord : TNotifyEvent read GetOnEndOfRecord + write SetOnEndOfRecord; + property OnNamesClick : TNotifyEvent read FOnNamesClick + write FOnNamesClick; + property OnSendLoc : TNotifyEvent read FOnSendLoc + write FOnSendLoc; + property OnTermType : TNotifyEvent read FOnTermType + write FOnTermType; + property OnLocalEcho : TNotifyEvent read FOnLocalEcho + write FOnLocalEcho; + property OnDataAvailable : TTnEmulVTDataAvailable read FOnDataAvailable + write FOnDataAvailable; + + end; + +procedure Register; + +implementation + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TTnEmulVT]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure FontToIni(Font : TFont; IniFile : TIniFile; Section : String); +var + nBuf : Integer; +begin + IniFile.WriteString(Section, 'FontName', Font.Name); + IniFile.WriteInteger(Section, 'FontSize', Font.Size); + IniFile.WriteInteger(Section, 'FontPitch', ord(Font.Pitch)); + nBuf := 0; + if fsBold in Font.Style then + nBuf := nBuf or 1; + if fsItalic in Font.Style then + nBuf := nBuf or 2; + if fsUnderline in Font.Style then + nBuf := nBuf or 4; + if fsStrikeOut in Font.Style then + nBuf := nBuf or 8; + IniFile.WriteInteger(Section, 'FontStyle', nBuf); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure IniToFont(Font : TFont; IniFile : TIniFile; Section : String); +var + FontName : String; + nBuf : Integer; +begin + FontName := IniFile.ReadString(Section, 'FontName', '*'); + if FontName <> '*' then begin + Font.Name := FontName; + Font.Size := IniFile.ReadInteger(Section, 'FontSize', 9); + Font.Pitch := TFontPitch(IniFile.ReadInteger(Section, 'FontPitch', 12)); + nBuf := IniFile.ReadInteger(Section, 'FontStyle', 0); + Font.Style := []; + if (nBuf and 1) <> 0 then + Font.Style := Font.Style + [fsBold]; + if (nBuf and 2) <> 0 then + Font.Style := Font.Style + [fsItalic]; + if (nBuf and 4) <> 0 then + Font.Style := Font.Style + [fsUnderline]; + if (nBuf and 8) <> 0 then + Font.Style := Font.Style + [fsStrikeOut]; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTnEmulVT.Create(AOwner: TComponent); +var + Rect : TRect; +begin + inherited Create(AOwner); + + if TnCnxVersion < 203 then + raise Exception.Create('TTnEmulVT need TTnCnx version 2.03 or higher ' + + 'Please download last release from ' + + 'http://www.rtfm.be/fpiette/indexuk.htm'); + + TnCnx := TTnCnx.Create(Self); + TnCnx.OnDataAvailable := TnCnxDataAvailable; + TnCnx.OnSessionClosed := TnCnxSessionClosed; + TnCnx.OnSessionConnected := TnCnxSessionConnected; + TnCnx.OnSendLoc := TnCnxSendLoc; + TnCnx.OnTermType := TnCnxTermType; + TnCnx.OnLocalEcho := TnCnxLocalEcho; + + FIniFileName := 'TNEMULVT.INI'; + FSectionName := 'Windows'; + FKeyName := 'TnEmulVT'; + FPort := 'telnet'; + Rect.Top := -1; + SelectRect := Rect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTnEmulVT.Destroy; +begin + TnCnx.Free; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.SetHostName(newValue : String); +begin + FHostName := newValue; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.GetLocalEcho : Boolean; +begin + Result := TnCnx.LocalEcho; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.RequestLocalEcho(newValue : Boolean); +begin + if newValue then + TnCnx.DontOption(TN_ECHO) + else + TnCnx.DoOption(TN_ECHO); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.SetLocation(Value : String); +begin + TnCnx.Location := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.GetLocation : String; +begin + Result := TnCnx.Location; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.Display(Msg : String); +begin + WriteStr(Msg); + Repaint; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.SetOnEndOfRecord(Value : TNotifyEvent); +begin + TnCnx.OnEndOfRecord := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.GetOnEndOfRecord : TNotifyEvent; +begin + Result := TnCnx.OnEndOfRecord; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxSendLoc(Sender: TObject); +begin + if Assigned(FOnSendLoc) then + FOnSendLoc(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxTermType(Sender: TObject); +begin + if Assigned(FOnTermType) then + FOnTermType(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxLocalEcho(Sender: TObject); +begin + if Assigned(FOnLocalEcho) then + FOnLocalEcho(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxDataAvailable(Sender: TTnCnx; Buffer: PChar; + Len: Integer); +var + I : Integer; +begin + if Assigned(FOnDataAvailable) then + FOnDataAvailable(Self, Buffer, Len); + + if Len <= 0 then + Exit; + + for I := 0 to Len - 1 do begin + try + WriteChar((Buffer + I)^); + except + Break; + end; + end; + UpdateScreen; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxSessionClosed(Sender: TTnCnx; Erc: Word); +begin + Display(#13 + #10 + '*** Server has closed ***' + #13 + #10); + MessageBeep(MB_ICONASTERISK); + FError := Erc; + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.TnCnxSessionConnected(Sender: TTnCnx; Erc: Word); +begin + if Erc = 0 then begin + Display('Connected' + #13 + #10); + end + else begin + Display('Connection failed: ' + +{$IFDEF DELPHI} + TnCnx.Socket.SocketErrorDesc(Error) + +{$ELSE} + WSocketErrorDesc(Error) + +{$ENDIF} + #13 + #10); + MessageBeep(MB_ICONASTERISK); + end; + FError := Erc; + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.RestoreOptions; +var + IniFile : TIniFile; + xFont : TFont; +begin + if Length(FHostname) <= 0 then + Exit; + + IniFile := TIniFile.Create(IniFilename); + xFont := TFont.Create; + IniToFont(xFont, IniFile, HostName); + Font := xFont; + xFont.Free; + + LineHeight := IniFile.ReadInteger(HostName, 'LineHeight', 12); + Rows := IniFile.ReadInteger(HostName, 'Rows', 25); + Cols := IniFile.ReadInteger(HostName, 'Cols', 80); + FKeys := IniFile.ReadInteger(HostName, 'FKeys', 0); + AutoCr := IniFile.ReadInteger(HostName, 'AutoCR', 0) <> 0; + AutoLF := IniFile.ReadInteger(HostName, 'AutoLF', 0) <> 0; + LocalEcho := IniFile.ReadInteger(HostName, 'LocalEcho', 0) <> 0; + MonoChrome := IniFile.ReadInteger(HostName, 'MonoChrome', 0) <> 0; + UpperLock := IniFile.ReadInteger(HostName, 'UpperLock', 0) <> 0; + Xlat := IniFile.ReadInteger(HostName, 'Xlat', 0) <> 0; + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.Connect; +var +{$IFDEF VER100} + Form : TCustomForm; +{$ELSE} + Form : TForm; +{$ENDIF} +begin + if Length(FHostname) <= 0 then + Exit; + + Clear; + TnCnx.Port := FPort; + TnCnx.Host := FHostName; + TnCnx.Connect; + Display('Connecting to ''' + HostName + '''' + #13 + #10); + Form := GetParentForm(Self); + Form.ActiveControl := Self; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.Disconnect; +begin + TnCnx.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.Send(Data : Pointer; Len : Integer) : integer; +begin + Result := TnCnx.Send(Data, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.SendStr(Data : String) : integer; +begin + Result := TnCnx.SendStr(Data); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnEmulVT.IsConnected : Boolean; +begin + Result := TnCnx.IsConnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.EditOptions; +var + IniFile : TIniFile; +begin + if Length(FHostname) <= 0 then + Exit; + + if OptForm = nil then + OptForm := TOptForm.Create(Self); + + OptForm.IniFileName := FIniFileName; + OptForm.OnNamesClick := FOnNamesClick; + + RestoreOptions; + OptForm.AFont.Assign(Font); + OptForm.LineHeight := LineHeight; + OptForm.AutoCR := AutoCr; + OptForm.AutoLF := AutoLF; + OptForm.LocalEcho := LocalEcho; + OptForm.MonoChrome := MonoChrome; + OptForm.UpperLock := UpperLock; + OptForm.Xlat := Xlat; + OptForm.Rows := Rows; + OptForm.Cols := Cols; + OptForm.HostName := FHostName; + OptForm.FKeys := FKeys; + if OptForm.ShowModal = IDOK then begin + Font := OptForm.AFont; + LineHeight := OptForm.LineHeight; + AutoCR := OptForm.AutoCr; + AutoLF := OptForm.AutoLF; + LocalEcho := OptForm.LocalEcho; + MonoChrome := OptForm.MonoChrome; + UpperLock := OptForm.UpperLock; + Xlat := OptForm.Xlat; + Rows := OptForm.Rows; + Cols := OptForm.Cols; + FKeys := OptForm.FKeys; + IniFile := TIniFile.Create(FIniFilename); + FontToIni(OptForm.AFont, IniFile, FHostName); + IniFile.WriteInteger(FHostName, 'LineHeight', LineHeight); + IniFile.WriteInteger(FHostName, 'Rows', Rows); + IniFile.WriteInteger(FHostName, 'Cols', Cols); + IniFile.WriteInteger(FHostName, 'AutoCR', ord(AutoCR)); + IniFile.WriteInteger(FHostName, 'AutoLF', ord(AutoLF)); + IniFile.WriteInteger(FHostName, 'LocalEcho', ord(LocalEcho)); + IniFile.WriteInteger(FHostName, 'MonoChrome', ord(MonoChrome)); + IniFile.WriteInteger(FHostName, 'UpperLock', ord(UpperLock)); + IniFile.WriteInteger(FHostName, 'Xlat', ord(Xlat)); + IniFile.WriteInteger(FHostName, 'FKeys', FKeys); + IniFile.Free; + Repaint; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.KeyPress(var Key: Char); +begin + inherited KeyPress(Key); + if FUpperLock and (Key in ['a'..'z']) then + Key := chr(ord(Key) and $DF); + if Key <> #0 then begin + try + if FLocalEcho then + WriteChar(Key); + TnCnx.Send(@Key, 1); + except + { Ignore any exception ! } + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.DoKeyBuffer(Buffer : PChar; Len : Integer); +begin + if FLocalEcho then + WriteBuffer(Buffer, Len); + TnCnx.Send(Buffer, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure DrawFocusRectangle(Wnd: HWnd; Rect: TRect); +var + DC : HDC; +begin + DC := GetDC(Wnd); + DrawFocusRect(DC, Rect); + ReleaseDC(Wnd, DC); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnEmulVT.MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); +begin + inherited MouseDown(Button, Shift, X, Y); + FMouseDown := TRUE; + if FFocusDrawn then begin + DrawFocusRectangle(Handle, FFocusRect); + FFocusDrawn := FALSE; + end; + if SelectRect.Top <> -1 then begin + FFocusRect.Top := -1; + SelectRect := FFocusRect; + Repaint; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.MouseMove(Shift: TShiftState; X, Y: Integer); +var + Rect : TRect; + Point : TPoint; +begin + inherited MouseMove(Shift, X, Y); + if not FMouseDown then + Exit; + + if not FMouseCaptured then begin + SetCapture(Handle); + FMouseCaptured := TRUE; + FMouseTop := SnapPixelToRow(Y); + FMouseLeft := SnapPixelToCol(X); + + Point.X := 0; + Point.Y := 0; + Rect.TopLeft := ClientToScreen(Point); + Point.X := Width - 16; + Point.Y := Height; + Rect.BottomRight := ClientToScreen(Point); + ClipCursor(@Rect); + end + else if (FMouseTop <> Y) or (FMouseLeft <> X) then begin + if FFocusDrawn then + DrawFocusRectangle(Handle, FFocusRect); + Rect.Top := FMouseTop; + Rect.Left := FMouseLeft; + Rect.Bottom := SnapPixelToRow(Y) + LineHeight + 4; + Rect.Right := SnapPixelToCol(X) + CharWidth; + DrawFocusRectangle(Handle, Rect); + FFocusRect := Rect; + FFocusDrawn := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +procedure TTnEmulVT.MouseUp(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); +begin + inherited MouseUp(Button, Shift, X, Y); + FMouseDown := FALSE; + if FMouseCaptured then begin + ReleaseCapture; + FMouseCaptured := FALSE; + ClipCursor(nil); + end; + if FFocusDrawn then begin + DrawFocusRectangle(Handle, FFocusRect); + FFocusDrawn := FALSE; + if (FFocusRect.Right - FFocusRect.Left) < CharWidth then + FFocusRect.Top := -1; + if (FFocusRect.Bottom - FFocusRect.Top) < LineHeight then + FFocusRect.Top := -1; + SelectRect := FFocusRect; + Repaint; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} +function TTnEmulVT.GetSelTextBuf(Buffer: PChar; BufSize: Integer): Integer; +var + StartRow : Integer; + StopRow : Integer; + StartCol : Integer; + StopCol : Integer; + nRow : Integer; + nCol : Integer; + Line : TLine; + nCnt : Integer; +begin + nCnt := 0; + if (SelectRect.Top = -1) or (BufSize < 1) then begin + if BufSize > 0 then + Buffer[0] := #0; + Result := nCnt; + Exit; + end; + + StartRow := PixelToRow(SelectRect.Top); + StopRow := PixelToRow(SelectRect.Bottom) - 1; + StartCol := PixelToCol(SelectRect.Left); + StopCol := PixelToCol(SelectRect.Right) - 1; + + for nRow := StartRow to StopRow do begin + if BufSize < 2 then + Break; + Line := Screen.FLines[nRow]; + for nCol := StartCol to StopCol do begin + Buffer[0] := Line.Txt[nCol]; + Inc(Buffer); + Dec(BufSize); + Inc(nCnt); + if BufSize < 2 then + Break; + end; + if nRow < StopRow then begin + if BufSize < 4 then + Break; + Buffer[0] := #13; + Buffer[1] := #10; + Inc(Buffer); + Inc(Buffer); + Dec(BufSize); + Dec(BufSize); + Inc(nCnt); + Inc(nCnt); + end; + end; + + Buffer[0] := #0; + Result := nCnt; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * ** * * * * * * * * * * * * * *} + + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} diff --git a/lib/telnet/TNOPTFRM.DFM b/lib/telnet/TNOPTFRM.DFM new file mode 100644 index 00000000..5ad89a96 Binary files /dev/null and b/lib/telnet/TNOPTFRM.DFM differ diff --git a/lib/telnet/TNOPTFRM.PAS b/lib/telnet/TNOPTFRM.PAS new file mode 100644 index 00000000..e8c8ac60 --- /dev/null +++ b/lib/telnet/TNOPTFRM.PAS @@ -0,0 +1,461 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Tnoptfrm; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, FormPos, IniFiles, Buttons; + +type + TOptForm = class(TForm) + Label1: TLabel; + Label2: TLabel; + AutoCRCheckBox: TCheckBox; + AutoLFCheckBox: TCheckBox; + LocalEchoCheckBox: TCheckBox; + MonoChromeCheckBox: TCheckBox; + RowsEdit: TEdit; + ColsEdit: TEdit; + OkButton: TButton; + CancelButton: TButton; + LaboButton: TButton; + RDVButton: TButton; + USUSButton: TButton; + XlatCheckBox: TCheckBox; + FontDialog1: TFontDialog; + FontButton: TButton; + LineHeightEdit: TEdit; + Label3: TLabel; + NamesButton: TButton; + UpperLockCheckBox: TCheckBox; + A11Button: TButton; + GroupBox1: TGroupBox; + FKeys1RadioButton: TRadioButton; + FKeys2RadioButton: TRadioButton; + FKeys3RadioButton: TRadioButton; + procedure OkButtonClick(Sender: TObject); + procedure CancelButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure LaboButtonClick(Sender: TObject); + procedure RDVButtonClick(Sender: TObject); + procedure USUSButtonClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FontButtonClick(Sender: TObject); + procedure NamesButtonClick(Sender: TObject); + procedure A11ButtonClick(Sender: TObject); + private + { Private declarations } + public + FIniFilename : String; + FSectionName : String; + FKeyName : String; + FHostName : String; + FFont : TFont; + FOnNamesClick : TNotifyEvent; + function GetLocalEcho : Boolean; + function GetAutoCr : Boolean; + function GetAutoLF : Boolean; + function GetAltKeys : Boolean; + function GetMonoChrome : Boolean; + function GetUpperLock : Boolean; + function GetXlat : Boolean; + function GetRows : Integer; + function GetCols : integer; + function GetLineHeight : Integer; + function GetFKeys : Integer; + procedure SetLocalEcho(Value : Boolean); + procedure SetAutoCr(Value : Boolean); + procedure SetAutoLF(Value : Boolean); + procedure SetAltKeys(Value : Boolean); + procedure SetMonoChrome(Value : Boolean); + procedure SetUpperLock(Value : Boolean); + procedure SetXlat(Value : Boolean); + procedure SetRows(Value : Integer); + procedure SetCols(Value : Integer); + procedure SetHostName(Value : String); + procedure SetLineHeight(Value : Integer); + procedure SetFKeys(Value : Integer); + + property IniFilename : String read FIniFileName write FIniFileName; + property SectionName : String read FSectionName write FSectionName; + property KeyName : String read FKeyName write FKeyName; + property HostName : String read FHostName write SetHostName; + property LocalEcho : Boolean read GetLocalEcho write SetLocalEcho; + property AutoCR : Boolean read GetAutoCr write SetAutoCR; + property AutoLF : Boolean read GetAutoLF write SetAutoLF; + property AltKeys : Boolean read GetAltKeys write SetAltKeys; + property FKeys : Integer read GetFKeys write SetFkeys; + property MonoChrome : Boolean read GetMonoChrome write SetMonoChrome; + property UpperLock : Boolean read GetUpperLock write SetUpperLock; + property Xlat : Boolean read GetXlat write SetXlat; + property Rows : Integer read GetRows write SetRows; + property Cols : Integer read GetCols write SetCols; + property AFont : TFont read FFont write FFont; + property LineHeight : Integer read GetLineHeight write SetLineHeight; + + property OnNamesClick : TNotifyEvent read FOnNamesClick write FOnNamesClick; + end; + +var + OptForm: TOptForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] in ['0'..'9']) do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetFKeys(Value : Integer); +begin + case Value of + 0 : FKeys1RadioButton.Checked := TRUE; + 1 : FKeys2RadioButton.Checked := TRUE; + 2 : FKeys3RadioButton.Checked := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetFKeys : Integer; +begin + if FKeys1RadioButton.Checked then + Result := 0 + else if FKeys2RadioButton.Checked then + Result := 1 + else + Result := 2; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetHostName(Value : String); +begin + FHostName := Value; + Caption := 'Options for ' + HostName; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetLocalEcho : Boolean; +begin + Result := LocalEchoCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetAutoCr : Boolean; +begin + Result := AutoCrCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetAutoLF : Boolean; +begin + Result := AutoLFCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetXlat : Boolean; +begin + Result := XlatCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetAltKeys : Boolean; +begin + Result := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetMonoChrome : Boolean; +begin + Result := MonoChromeCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetUpperLock : Boolean; +begin + Result := UpperLockCheckBox.Checked; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetLocalEcho(Value : Boolean); +begin + LocalEchoCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetAutoCr(Value : Boolean); +begin + AutoCRCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetAutoLF(Value : Boolean); +begin + AutoLFCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetXlat(Value : Boolean); +begin + XlatCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetAltKeys(Value : Boolean); +begin +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetMonoChrome(Value : Boolean); +begin + MonoChromeCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetUpperLock(Value : Boolean); +begin + UpperLockCheckBox.Checked := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetRows : Integer; +begin + Result := atoi(RowsEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetCols : integer; +begin + Result := atoi(ColsEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TOptForm.GetLineHeight : integer; +var + DC : HDC; + Metrics : TTextMetric; + hObject : THandle; +begin + Result := atoi(LineHeightEdit.Text); + if Result = 0 then begin + DC := GetDC(0); + hObject := SelectObject(DC, FFont.Handle); + GetTextMetrics(DC, Metrics); + SelectObject(DC, hOBject); + ReleaseDC(0, DC); + + Result := Metrics.tmHeight; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetRows(Value : Integer); +begin + RowsEdit.Text := IntToStr(Value); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetCols(Value : Integer); +begin + ColsEdit.Text := IntToStr(Value); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.SetLineHeight(Value : Integer); +begin + LineHeightEdit.Text := IntToStr(Value); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.OkButtonClick(Sender: TObject); +begin + ModalResult := IDOK; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.CancelButtonClick(Sender: TObject); +begin + ModalResult := IDCANCEL; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +begin + if FirstTime then begin + FirstTime := FALSE; + LoadFormPos(Self, IniFilename, SectionName, KeyName); + end; + NamesButton.Visible := Assigned(FOnNamesClick); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FormClose(Sender: TObject; var Action: TCloseAction); +begin + SaveFormPos(Self, IniFilename, SectionName, KeyName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.A11ButtonClick(Sender: TObject); +begin + Rows := 25; + Cols := 80; + AutoCr := FALSE; + AutoLF := FALSE; + AltKeys := TRUE; + LocalEcho := FALSE; + MonoChrome := TRUE; + UpperLock := TRUE; + Xlat := FALSE; + FKeys3RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.LaboButtonClick(Sender: TObject); +begin + Rows := 24; + Cols := 80; + AutoCr := TRUE; + AutoLF := FALSE; + AltKeys := TRUE; + LocalEcho := FALSE; + MonoChrome := TRUE; + UpperLock := FALSE; + Xlat := FALSE; + FKeys2RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.RDVButtonClick(Sender: TObject); +begin + Rows := 25; + Cols := 80; + AutoCr := FALSE; + AutoLF := FALSE; + AltKeys := FALSE; + LocalEcho := FALSE; + MonoChrome := FALSE; + UpperLock := FALSE; + Xlat := TRUE; + FKeys1RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.USUSButtonClick(Sender: TObject); +begin + Rows := 25; + Cols := 80; + AutoCr := FALSE; + AutoLF := FALSE; + AltKeys := FALSE; + LocalEcho := FALSE; + MonoChrome := FALSE; + UpperLock := FALSE; + Xlat := TRUE; + FKeys2RadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FormCreate(Sender: TObject); +begin + FFont := TFont.Create; + SectionName := 'Windows'; + KeyName := 'Options'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.FontButtonClick(Sender: TObject); +begin + FontDialog1.Font := FFont; + if FontDialog1.Execute then + FFont := FontDialog1.Font; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TOptForm.NamesButtonClick(Sender: TObject); +begin + if Assigned(FOnNamesClick) then + FOnNamesClick(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} diff --git a/lib/telnet/TNSRV.DPR b/lib/telnet/TNSRV.DPR new file mode 100644 index 00000000..5d887c44 --- /dev/null +++ b/lib/telnet/TNSRV.DPR @@ -0,0 +1,13 @@ +program Tnsrv; + +uses + Forms, + Tnsrv1 in 'TNSRV1.PAS' {ServerForm}, + Tnsrv2 in 'TNSRV2.PAS' {ClientForm}; + +{$R *.RES} + +begin + Application.CreateForm(TServerForm, ServerForm); + Application.Run; +end. diff --git a/lib/telnet/TNSRV1.DFM b/lib/telnet/TNSRV1.DFM new file mode 100644 index 00000000..5009d9f9 Binary files /dev/null and b/lib/telnet/TNSRV1.DFM differ diff --git a/lib/telnet/TNSRV1.PAS b/lib/telnet/TNSRV1.PAS new file mode 100644 index 00000000..f3c4100b --- /dev/null +++ b/lib/telnet/TNSRV1.PAS @@ -0,0 +1,309 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Copyright: Franois PIETTE + francois.piette@ping.be http://www.rtfm.be/fpiette + 2:293/2202@fidonet.org BBS: +32-4-365.13.95 +Creation: April 1996 +Version: 1.23 +Description: TnSrv implement a (very basic) Telnet server (daemon) + Compatible with both Delphi 1 and Delphi 2 + Uses TWSocket to communicate with WinSock +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 18, 1996 Added resize event and about box +Mar 19, 1997 V1.10 Use enhanced TWSocket object +Jul 22, 1997 V1.20 Adapted to Delphi 3 +Sep 27, 1997 Adapted for TWSocket converted to support C++Builder +Oct 03, 1997 V1.22 Added a $DEFINE POP3 to simulate a POP3 server + Added an editbox to select the server port +Oct 09, 1997 Added a $DEFINE SMTP to simulate a SMTP server +Oct 11, 1997 V1.23 Added PortNum to client to tell him what he has to serve + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Tnsrv1; + + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, WSocket, WinSock, StdCtrls, Tnsrv2; + +const + TnSrvVersion = 123; + +type + TClient = class(TObject) + Form : TClientForm; + Peer : String; + constructor Create(AOwner : TComponent); + destructor Destroy; override; + end; + + TServerForm = class(TForm) + Memo: TMemo; + QuitButton: TButton; + AboutButton: TButton; + SrvSocket: TWSocket; + PortLabel: TLabel; + PortEdit: TEdit; + ChangePortButton: TButton; + procedure FormCreate(Sender: TObject); + procedure Display(Msg : String); + procedure QuitButtonClick(Sender: TObject); + procedure FormActivate(Sender: TObject); + procedure AboutButtonClick(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure SrvSocketSessionAvailable(Sender: TObject; Error: Word); + procedure SrvSocketSessionClosed(Sender: TObject; Error: Word); + procedure ChangePortButtonClick(Sender: TObject); + protected + procedure WMDisconnect(var msg: TMessage); message WM_DISCONNECT; + private + { Private declarations } + public + Clients : TList; + end; + +var + ServerForm: TServerForm; + +implementation + +{$R *.DFM} +{DEFINE Debug} { Add or remove dollar sign before Debug to } + { generate code for debug message output } + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DebugString(Msg : String); +const + Cnt : Integer = 0; +{$IFDEF Debug} +var + Buf : String[20]; +{$ENDIF} +begin +{$IFDEF Debug} + Cnt := Cnt + 1; + Buf := IntToHex(Cnt, 4) + ' ' + #0; + OutputDebugString(@Buf[1]); +{$IFDEF WIN32} + OutputDebugString(PChar(Msg)); +{$ELSE} + if Length(Msg) < High(Msg) then + Msg[Length(Msg) + 1] := #0; + + OutputDebugString(@Msg[1]); +{$ENDIF} +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TClient.Create(AOwner : TComponent); +begin + Application.CreateForm(TClientForm, Form); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TClient.Destroy; +begin + Form.Release; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormCreate(Sender: TObject); +begin + Memo.Clear; + Clients := TList.Create; + Display(PortEdit.Text + ' Server Ready' + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormActivate(Sender: TObject); +const + FirstTime : Boolean = TRUE; +begin + if FirstTime then begin + FirstTime := FALSE; + SrvSocket.Listen; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.Display(Msg : String); +var + Start, Stop : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add(''); + + Start := 1; + Stop := Pos(#13, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := Memo.Lines.Strings[Memo.Lines.Count - 1] + Copy(Msg, Start, Stop - Start); + if Msg[Stop] = #13 then begin + Memo.Lines.Add(''); + SendMessage(Memo.Handle, WM_KEYDOWN, VK_UP, 1); + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + if Msg[Start] = #10 then + Start := Start + 1; + Stop := Start; + while (Msg[Stop] <> #13) and (Stop <= Length(Msg)) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.SrvSocketSessionAvailable(Sender: TObject; Error : word); +var + NewHSocket : TSocket; + PeerName : TSockAddrIn; + Client : TClient; +begin + NewHSocket := SrvSocket.Accept; + Client := TClient.Create(Self); + Client.Form.Reference := Client; + Client.Form.PortNum := SrvSocket.PortNum; + Client.Form.AcceptForm := Self; + Client.Form.Socket.Dup(NewHSocket); + Client.Form.Socket.GetPeerName(PeerName, Sizeof(PeerName)); + Client.Peer := IntToStr(ord(PeerName.sin_addr.S_un_b.s_b1)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b2)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b3)) + '.' + + IntToStr(ord(PeerName.sin_addr.S_un_b.s_b4)); + Display('Remote ' + Client.Peer + ' connected' + #13 + #10); + Client.Form.Caption := Client.Peer; + Client.Form.Show; + Clients.Add(Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.WMDisconnect(var msg: TMessage); +var + Client : TClient; + Why : String; +begin + case msg.wParam of + DISCONNECT_SELF : Why := 'has been disconnected'; + DISCONNECT_REMOTE : Why := 'has closed the connection'; + else Why := 'disconnected'; + end; + + Client := TCLient(msg.lParam); + Display('Remote ' + Client.Peer + ' ' + Why + #13 + #10); + Client.Form.Socket.Shutdown(2); + Client.Form.Socket.Close; + Client.Form.Visible := FALSE; + Client.Form.Release; + Clients.Remove(Client); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.SrvSocketSessionClosed(Sender: TObject; Error : word); +begin + Display(#13 + #10 + '*** Remote has closed ***' + #13 + #10); + if SrvSocket.State = wsOpened then + SrvSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.QuitButtonClick(Sender: TObject); +begin + SrvSocket.Close; + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.AboutButtonClick(Sender: TObject); +begin + Application.MessageBox( + 'TnSRV V1.1 ' + +{$IFDEF WIN32} + '32 bit' + +{$ELSE} + '16 bit' + +{$ENDIF} + ' March 19, 1997' + #10 + #10 + + 'Free Software, Copyright Franois Piette' + #10 + #10 + + 'francois.piette@ping.be http://www.rtfm.be/fpiette' + #10 + + '2:293/2202@fidonet.org BBS: +32-4-365.13.95' + #10, + 'About TnSrv', MB_OK); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Adjust the position for each control in the form as the user resize it *} +procedure TServerForm.FormResize(Sender: TObject); +begin + Memo.Height := ClientHeight - QuitButton.Height - 20; + QuitButton.Left := ClientWidth - QuitButton.Width - 10; + AboutButton.Left := QuitButton.Left - AboutButton.Width - 10; + QuitButton.Top := ClientHeight - QuitButton.Height - 10; + AboutButton.Top := QuitButton.Top; + ChangePortButton.Top := QuitButton.Top; + PortEdit.Top := QuitButton.Top; + PortLabel.Top := QuitButton.Top + 4; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.ChangePortButtonClick(Sender: TObject); +begin + with SrvSocket do begin + Close; + Addr := '0.0.0.0'; + Proto := 'tcp'; + Port := PortEdit.Text; + Listen; + end; + Memo.Clear; + Display(PortEdit.Text + ' Server Ready' + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/TNSRV2.DFM b/lib/telnet/TNSRV2.DFM new file mode 100644 index 00000000..e1200c4f Binary files /dev/null and b/lib/telnet/TNSRV2.DFM differ diff --git a/lib/telnet/TNSRV2.PAS b/lib/telnet/TNSRV2.PAS new file mode 100644 index 00000000..82fb8d6b --- /dev/null +++ b/lib/telnet/TNSRV2.PAS @@ -0,0 +1,503 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TnSrv implement a (very basic) Telnet server (daemon) + Compatible with both Delphi 1 and Delphi 2 + Uses TWSocket to communicate with WinSock +Email: francois.piette@ping.be + 2:293/2202@fidonet.org BBS: +32-4-365.13.95 +Creation: April 1996 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +Updates: +Sep 18, 1996 Accept CR/LF or LF only as line terminator + Implement Help and Exit commands as demo +Mar 19, 1997 Use enhanced TWsocket object +Oct 03, 1997 V1.22 Added a $DEFINE POP3 to simulate a POP3 server +Oct 09, 1997 Added a $DEFINE SMTP to simulate a SMTP server +Oct 11, 1997 Added PortNum to specify which port we serve + Added pseudo POP3 and SMTP interpreters (nothing really happens + except transmission of pseudo correct answers. I use this + feature to debug SMTP and POP3 components). + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Tnsrv2; + + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, WSocket, Winsock; + +const + SMTP_PORT = 25; + POP3_PORT = 110; + + { The message WM_DISCONNECT is used by the client form to tell the server } + { form that the client has disconnected or should be disconnected. } + WM_DISCONNECT = WM_USER + 2; + DISCONNECT_SELF = 1; { Client form ask to disconnect } + DISCONNECT_REMOTE = 2; { Client user (remote) has disconnected } + +type + TClientForm = class(TForm) + Memo: TMemo; + DisconnectButton: TButton; + DataEdit: TEdit; + SendButton: TButton; + Socket: TWSocket; + Button1: TButton; + procedure FormCreate(Sender: TObject); + procedure Display(Msg : String); + procedure FormDestroy(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure SocketDataAvailable(Sender: TObject; Error: Word); + procedure SocketSessionClosed(Sender: TObject; Error: Word); + procedure Button1Click(Sender: TObject); + private + FCommand : String; + FRcvdCR : Boolean; + procedure ProcessChar(Ch : Char); + procedure CommandInterpreter; + procedure SMTP_Interpreter(CommandVerb : String; CommandTail : String); + procedure POP3_Interpreter(CommandVerb : String; CommandTail : String); + procedure TELNET_Interpreter(CommandVerb : String; CommandTail : String); + public + AcceptForm : TForm; + Reference : Pointer; + PortNum : Integer; + end; + +var + ClientForm: TClientForm; + +implementation + +{$R *.DFM} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +procedure SetLength(var Str : String; Len : Integer); +begin + Str[0] := chr(Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormCreate(Sender: TObject); +begin + Memo.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure display text in a memo control. } +{ I should add code to remove lines when there are too much of them... } +procedure TClientForm.Display(Msg : String); +var + Start, Stop : Integer; + SelStart : Integer; +begin + if Memo.Lines.Count = 0 then + Memo.Lines.Add(''); + + Start := 1; + Stop := Pos(#13, Msg); + if Stop = 0 then + Stop := Length(Msg) + 1; + while Start <= Length(Msg) do begin + Memo.Lines.Strings[Memo.Lines.Count - 1] := Memo.Lines.Strings[Memo.Lines.Count - 1] + Copy(Msg, Start, Stop - Start); + if Msg[Stop] = #13 then begin + SelStart := Memo.SelStart; + Memo.Lines.Add(''); + Memo.SelStart := SelStart + 2; + end; + Start := Stop + 1; + if Start > Length(Msg) then + Break; + if Msg[Start] = #10 then + Start := Start + 1; + Stop := Start; + while (Msg[Stop] <> #13) and (Stop <= Length(Msg)) do + Stop := Stop + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Not a real SMTP command interpreter, just enough for me to test my SMTP } +{ component. } +procedure TClientForm.SMTP_Interpreter( + CommandVerb : String; + CommandTail : String); +var + Response : String; +begin + if CommandVerb = 'MAIL' then + Response := '250 Ok' + else if CommandVerb = 'RCPT' then + Response := '250 Ok' + else if CommandVerb = 'DATA' then + Response := '354 Send data now' + else if CommandVerb = 'HELO' then + Response := '250 Ok' + else if CommandVerb = 'QUIT' then + Response := '221 Goodbye' + else + Response := '500 syntax error'; + + Socket.SendStr(Response + #13 + #10); + if CommandVerb = 'QUIT' then + Socket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Not a real POP3 command interpreter, just enough for me to test my POP3 } +{ component. } +procedure TClientForm.POP3_Interpreter( + CommandVerb : String; + CommandTail : String); +var + Response : String; +begin + if CommandVerb = 'USER' then + Response := '+OK' + else if CommandVerb = 'PASS' then + Response := '+OK' + else if CommandVerb = 'RETR' then begin + Socket.SendStr('+OK' + #13 + #10); + Socket.SendStr('This is the message body.' + #13 + #10); + Socket.SendStr('This is the last message line.' + #13 + #10); + Response := '.' + end + else if CommandVerb = 'LIST' then begin + if Trim(CommandTail) = '' then begin + Socket.SendStr('+OK 2 messages (320 octets)' + #13 + #10); + Socket.SendStr('1 120' + #13 + #10); + Socket.SendStr('2 200' + #13 + #10); + Response := '.' + end + else + Response := '+OK ' + CommandTail + ' 200' + end + else if CommandVerb = 'STAT' then + Response := '+OK 10 12345' + else if CommandVerb = 'QUIT' then + Response := '+OK' + else if CommandVerb = 'TOP' then begin + Socket.SendStr('+OK' + #13 + #10); + Socket.SendStr('This is the message body.' + #13 + #10); + Socket.SendStr('This is the last message line.' + #13 + #10); + Response := '.' + end + else if CommandVerb = 'RPOP' then + Response := '+OK' + else if CommandVerb = 'APOP' then + Response := '+OK' + else if CommandVerb = 'DELE' then + Response := '+OK' + else if CommandVerb = 'LAST' then + Response := '+OK 1' + else if CommandVerb = 'NOOP' then + Response := '+OK' + else if CommandVerb = 'RSET' then + Response := '+OK' + else + Response := '-ERR'; + + Socket.SendStr(Response + #13 + #10); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Not a real TELNET command interpreter, just enough to see how it could } +{ be implemented. } +procedure TClientForm.TELNET_Interpreter( + CommandVerb : String; + CommandTail : String); +begin + Socket.SendStr(#13 + #10 + 'Executing command ''' + CommandVerb + '''...' + + #13 + #10); + + if CommandVerb = 'EXIT' then + DisconnectButtonClick(Self) + else if CommandVerb = 'HELP' then + Socket.SendStr('List of commands:' + #13 + #10 + + ' Exit logoff from server' + #13 + #10 + + ' Help show this help screen' + #13 + #10) + else + Socket.SendStr('Unknown command, ignoring'); + + Socket.SendStr(#13 + #10 + '--> '); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the command line interpreter. Should extend the code to support } +{ every command needed... } +procedure TClientForm.CommandInterpreter; +var + CommandVerb : String; + CommandTail : String; + I, J : Integer; +begin + CommandVerb := FCommand; + + { Skip leading spaces } + I := 1; + while (I <= Length(CommandVerb)) and (CommandVerb[I] in [' ', #9]) do + Inc(I); + + { Find separator and separe CommandVerb and CommandTail } + J := I; + while TRUE do begin + if (J >= Length(CommandVerb)) then begin + CommandTail := ''; + break; + end; + + if CommandVerb[J] in [' ', #9, '/'] then begin + CommandTail := Copy(CommandVerb, J, Length(CommandVerb) - J + 1); + CommandVerb := Copy(CommandVerb, I, J - I); + break; + end; + Inc(J); + end; + CommandVerb := UpperCase(CommandVerb); + + if PortNum = SMTP_PORT then + SMTP_Interpreter(CommandVerb, CommandTail) + else if PortNum = POP3_PORT then + POP3_Interpreter(CommandVerb, CommandTail) + else + TELNET_Interpreter(CommandVerb, CommandTail); + + FCommand := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Process each charcter received to do minimal line editing } +procedure TClientForm.ProcessChar(Ch : Char); +begin + if Ch = #8 then begin + if Length(FCommand) > 0 then begin + SetLength(FCommand, Length(FCommand) - 1); + Socket.SendStr(#8 + ' ' + #8); + end + else + Socket.SendStr(#7); + Exit; + end + else if (Ch = #10) and FRcvdCR then begin + { Ignore LF just after CR (CR/LF is normal end of line) } + FRcvdCR := FALSE; + Exit; + end + else if Ch = #13 then begin + FRcvdCR := TRUE; + CommandInterpreter; + Exit; + end + else if Ch = #10 then begin + CommandInterpreter; + Exit; + end; + + { Ordinary character, put in buffer in some place left } +{$IFNDEF WIN32} + if Length(FCommand) = High(FCommand) then + Ch := #7 + else +{$ENDIF} + FCommand := FCommand + Ch; + + if (PortNum <> POP3_PORT) and (PortNum <> SMTP_PORT) then begin + { Echo to client } + Socket.Send(@Ch, 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Event handler for datavailable. Called each time some data is received *} +procedure TClientForm.SocketDataAvailable(Sender: TObject; Error : word); +var + Len : Integer; + Buffer : String[255]; + Socket : TWSocket; + I : Integer; +begin + Socket := Sender as TWSocket; + Len := Socket.Receive(@Buffer[1], High(Buffer)); + if Len = 0 then begin + { Remote has closed } + Display(#13 + #10 + '**** Remote has closed ****' + #13 + #10); + end + else if Len < 0 then begin + { An error has occured } + if Socket.LastError <> WSAEWOULDBLOCK then + Display(#13 + #10 + '**** ERROR: ' + IntToStr(Socket.LastError) + + ' ****' + #13 + #10); + end + else begin + Buffer[0] := chr(Len); + Display(Buffer); + for I := 1 to Len do + ProcessChar(Buffer[I]); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{* Event handler called when the remote has closed the connection *} +procedure TClientForm.SocketSessionClosed(Sender: TObject; Error : word); +begin + Display(#13 + #10 + '**** Remote has closed ****' + #13 + #10); + PostMessage(AcceptForm.Handle, WM_DISCONNECT, + DISCONNECT_REMOTE, + LongInt(Reference)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormDestroy(Sender: TObject); +begin + Socket.Shutdown(2); + Socket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.DisconnectButtonClick(Sender: TObject); +begin + { Post a message to server form asking to disconnect the client } + PostMessage(AcceptForm.Handle, WM_DISCONNECT, + DISCONNECT_SELF, + LongInt(Reference)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.FormShow(Sender: TObject); +var + Buf : String; +begin + if PortNum = POP3_PORT then + Buf := '+OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>' + #13 + #10 + else if PortNum = SMTP_PORT then begin + Buf := '220-SMTP Simulator ready' + #13 + #10; + Socket.Send(@Buf[1], Length(Buf)); + Buf := '220 ESMTP spoken here' + #13 + #10; + end + else + Buf := 'Hello from TnSrv !' + #13 + #10 + '--> '; + + Socket.Send(@Buf[1], Length(Buf)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.SendButtonClick(Sender: TObject); +var + Buf : String; +begin + Buf := DataEdit.Text + #13 + #10; + Socket.Send(@Buf[1], Length(Buf)); + DataEdit.Text := ''; + ActiveControl := DataEdit; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Adjust the position for each control in the form as the user resize it *} +procedure TClientForm.FormResize(Sender: TObject); +begin + Memo.Height := ClientHeight - DisconnectButton.Height - + DataEdit.Height - 30; + DisconnectButton.Left := ClientWidth - DisconnectButton.Width - 10; + SendButton.Left := DisconnectButton.Left - SendButton.Width - 10; + DisconnectButton.Top := ClientHeight - DisconnectButton.Height - 10; + SendButton.Top := DisconnectButton.Top; + DataEdit.Top := DisconnectButton.Top - DataEdit.Height - 10; + DataEdit.Width := ClientWidth - 2 * DataEdit.Left; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TClientForm.Button1Click(Sender: TObject); +begin + Socket.SendStr('Hello !'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/TWSCHAT.DPR b/lib/telnet/TWSCHAT.DPR new file mode 100644 index 00000000..67053824 --- /dev/null +++ b/lib/telnet/TWSCHAT.DPR @@ -0,0 +1,12 @@ +program twschat; + +uses + Forms, + twschat1 in 'twschat1.pas' {TWSChatForm}; + +{$R *.RES} + +begin + Application.CreateForm(TTWSChatForm, TWSChatForm); + Application.Run; +end. diff --git a/lib/telnet/TWSCHAT1.DFM b/lib/telnet/TWSCHAT1.DFM new file mode 100644 index 00000000..7b643eee Binary files /dev/null and b/lib/telnet/TWSCHAT1.DFM differ diff --git a/lib/telnet/TWSCHAT1.PAS b/lib/telnet/TWSCHAT1.PAS new file mode 100644 index 00000000..02d04cd7 --- /dev/null +++ b/lib/telnet/TWSCHAT1.PAS @@ -0,0 +1,327 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TWSChat shows how to use TWSocket to build a chat program +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@rtfm.be +Creation: November 26, 1997 +Version: 1.00 +WebSite: http://www.rtfm.be/fpiette/indexuk.htm +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit twschat1; + +interface + +uses + WinTypes, WinProcs, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, WinSock, WSocket; + +const + ChatPort = '2200'; { Any port would do the job... } + +type + TTWSChatForm = class(TForm) + Panel1: TPanel; + Panel2: TPanel; + DisplayMemo: TMemo; + SrvWSocket: TWSocket; + ServerEdit: TEdit; + Label1: TLabel; + ConnectButton: TButton; + CliWSocket: TWSocket; + DisconnectButton: TButton; + MessageEdit: TEdit; + SendButton: TButton; + TmpWSocket: TWSocket; + RunningRadioButton: TRadioButton; + StoppedRadioButton: TRadioButton; + procedure FormShow(Sender: TObject); + procedure ConnectButtonClick(Sender: TObject); + procedure CliWSocketDnsLookupDone(Sender: TObject; Error: Word); + procedure CliWSocketSessionConnected(Sender: TObject; Error: Word); + procedure DisconnectButtonClick(Sender: TObject); + procedure SrvWSocketSessionAvailable(Sender: TObject; Error: Word); + procedure CliWSocketSessionClosed(Sender: TObject; Error: Word); + procedure CliWSocketDataAvailable(Sender: TObject; Error: Word); + procedure SendButtonClick(Sender: TObject); + procedure StoppedRadioButtonClick(Sender: TObject); + procedure RunningRadioButtonClick(Sender: TObject); + private + { Dclarations prives } + Initialized : Boolean; + RcvBuf : array [0..1023] of char; + RcvLen : integer; + procedure StartServer; + public + { Dclarations publiques } + end; + +var + TWSChatForm: TTWSChatForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.StartServer; +begin + { Try to be a server } + SrvWSocket.Port := ChatPort; + SrvWSocket.Proto := 'tcp'; + SrvWSocket.Addr := '0.0.0.0'; + try + SrvWSocket.Listen; + RunningRadioButton.Checked := TRUE; + StoppedRadioButton.Checked := FALSE; + except + on E:ESocketException do begin + { The socket is probably already in use } + RunningRadioButton.Checked := FALSE; + StoppedRadioButton.Checked := TRUE; + if Copy(E.Message, 1, 11) = 'Error 10048' then + DisplayMemo.Lines.Add('TWSChat already running as server') + else + raise; + end + else + raise; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.FormShow(Sender: TObject); +begin + if not Initialized then begin + Initialized := TRUE; + StartServer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The user has clicked on the 'connect' button. We will not connect here, } +{ but start the DNSLookup. We will receive a event when it is complete. } +{ The connection will be made at that later time. } +procedure TTWSChatForm.ConnectButtonClick(Sender: TObject); +begin + ConnectButton.Enabled := FALSE; + DisconnectButton.Enabled := TRUE; + CliWSocket.DnsLookup(ServerEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when the DNS lookup process is finished } +{ successfully or not. If DNS lookud failed, display a message. } +{ If DNS lookup successfull, ask TWSocket to connect the server. } +procedure TTWSChatForm.CliWSocketDnsLookupDone(Sender: TObject; Error: Word); +begin + if Error <> 0 then begin + { DNS Lookup has failed } + DisplayMemo.Lines.Add('Server name unknown'); + ConnectButton.Enabled := TRUE; + DisconnectButton.Enabled := FALSE; + Exit; + end; + + { DNS lookup successfull. Try to see if we are the server and we are } + { trying to connect to ourself. Check loopback address, should also } + { check the local IP address (returned by LocalIPList)... } + if (SrvWSocket.State = wsListening) and + (CliWSocket.DnsResult = '127.0.0.1') then begin + DisplayMemo.Lines.Add('Your are trying to connect to yourself !'); + ConnectButton.Enabled := TRUE; + DisconnectButton.Enabled := FALSE; + Exit; + end; + + { Transfert the IP address from DNSLookup to the TWSocket for connection } + { We could use the hostname for the Addr property, TWSocket will do the } + { DNS lookup for us, but it will block, maybe for a long time if DNS if } + { down. } + CliWSocket.Addr := CliWSocket.DnsResult; + CliWSocket.Port := ChatPort; + CliWSocket.Proto := 'tcp'; + + { The connect method is asynchronous. You get the control back quickly } + { The OnSessionConnected event will be eventually generated when the } + { connection is established. } + CliWSocket.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is triggered when the connection is established with } +{ the server. Enable the send button and the message edit box. } +procedure TTWSChatForm.CliWSocketSessionConnected(Sender: TObject; Error: Word); +begin + if Error = WSAECONNREFUSED then + DisplayMemo.Lines.Add('No server available') + else if Error <> 0 then + DisplayMemo.Lines.Add('Can''t connect, error #' + IntToStr(Error)) + else begin + DisplayMemo.Lines.Add('Connected'); + SendButton.Enabled := TRUE; + MessageEdit.Enabled := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is triggered when the client connection is closed, either } +{ by the client himself or by the local user pushing the disconnect button } +procedure TTWSChatForm.CliWSocketSessionClosed(Sender: TObject; Error: Word); +begin + DisconnectButton.Enabled := FALSE; + ConnectButton.Enabled := TRUE; + if SendButton.Enabled then begin + SendButton.Enabled := FALSE; + MessageEdit.Enabled := FALSE; + DisplayMemo.Lines.Add('Disconnected'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is triggered when data has been received from the client. } +{ A little bit of work here because the data can comes fragmented or in big } +{ chunks with several client lines. So we assemble the data received in a } +{ buffer and check the buffer for complete lines (there can be no complete } +{ line, exactly one complete line, several complete lines and may be an } +{ incomplete line at the end. } +procedure TTWSChatForm.CliWSocketDataAvailable(Sender: TObject; Error: Word); +var + Len : Integer; + I : Integer; +begin + { Receive the data that has arrived, put it after the data already here } + Len := CliWSocket.Receive(@RcvBuf, SizeOf(RcvBuf) - RcvLen - 1); + if Len <= 0 then + Exit; + { Update our conter } + RcvLen := RcvLen + Len; + { Place a null byte at the end of the buffer } + RcvBuf[RcvLen] := #0; + + { Scan the buffer to process each complete line } + while TRUE do begin + { find the terminating line feed } + I := StrScan(@RcvBuf, #10) - RcvBuf; + if I < 0 then + break; { not found, incomplete line, break loop } + { Replace the line feed by a nul char, truncating the line } + RcvBuf[I] := #0; + { Display the truncated line } + DisplayMemo.Lines.Add('Remote> ' + StrPas(RcvBuf)); + { Restore the line feed } + RcvBuf[I] := #10; + { Was it the last line in the buffer ? } + if I >= RcvLen then begin + RcvLen := 0; + break; + end; + { Not the last line, move the next one in front of buffer } + Move(RcvBuf[I + 1], RcvBuf, RcvLen - I); + RcvLen := RcvLen - I; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is triggered when we - as a server - have received a client } +{ connection request. We must accept the connection. Two cases: we are } +{ already busy with another client, or this is the first client connecting. } +procedure TTWSChatForm.SrvWSocketSessionAvailable(Sender: TObject; Error: Word); +begin + if CliWSocket.State = wsConnected then begin + { We are already busy with a client. Use the TmpWSocket to send a } + { busy message to the second client. Display a message to notify } + { the user that someone is trying to contact him. } + TmpWSocket.HSocket := SrvWSocket.Accept; + DisplayMemo.Lines.Add('System> ' + TmpWSocket.GetPeerAddr + + ' is trying to call you'); + TmpWSocket.SendStr('Busy ! Try later...' + #13#10); + TmpWSocket.Close; + Exit; + end; + + { This is our first client trying to connect, we accept } + CliWSocket.HSocket := SrvWSocket.Accept; + ConnectButton.Enabled := FALSE; + DisconnectButton.Enabled := TRUE; + SendButton.Enabled := TRUE; + MessageEdit.Enabled := TRUE; + DisplayMemo.Lines.Add('Connected with ' + CliWSocket.GetPeerAddr); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The user clicked on the disconnect button. } +procedure TTWSChatForm.DisconnectButtonClick(Sender: TObject); +begin + CliWSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The user has clicked on the send button. Just send the data in the edit } +{ box and a CRLF pair to make a complete line. } +procedure TTWSChatForm.SendButtonClick(Sender: TObject); +begin + CliWSocket.SendStr(MessageEdit.Text + #13#10); + DisplayMemo.Lines.Add(' Local> ' + MessageEdit.Text); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.StoppedRadioButtonClick(Sender: TObject); +begin + SrvWSocket.Close; + RunningRadioButton.Checked := FALSE; + StoppedRadioButton.Checked := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTWSChatForm.RunningRadioButtonClick(Sender: TObject); +begin + if SrvWSocket.State <> wsListening then + StartServer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/TnCnx.pas b/lib/telnet/TnCnx.pas new file mode 100644 index 00000000..35b12c45 --- /dev/null +++ b/lib/telnet/TnCnx.pas @@ -0,0 +1,680 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: TNCNX.PAS +Object: Delphi component which implement the TCP/IP telnet protocol + including some options negociations. + RFC854, RFC885, RFC779, RFC1091 +Author: Franois PIETTE +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Support: Please ask your question in the following newsgroup: + news://forums.borland.com/borland.public.delphi.vcl.components.using +Creation: April, 1996 +Version: 2.03 +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Jul 22, 1997 Adapted to Delphi 3 +Sep 5, 1997 Added version information, removed old code, added OnTermType + Renamed some indentifier to be more standard. +Sep 24, 1997 V203. Added procedures to negociate options + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnCnx; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Controls, Forms, + WSockets; + +const + TnCnxVersion = 203; + + { Telnet command characters } + TNCH_EOR = #239; { $EF End Of Record (preceded by IAC) } + TNCH_SE = #240; { $F0 End of subnegociation parameters } + TNCH_NOP = #241; { $F1 No operation } + TNCH_DATA_MARK = #242; { $F2 Data stream portion of a Synch } + TNCH_BREAK = #243; { $F3 NVT charcater break } + TNCH_IP = #244; { $F4 Interrupt process } + TNCH_AO = #245; { $F5 Abort output } + TNCH_AYT = #246; { $F6 Are you there } + TNCH_EC = #247; { $F7 Erase character } + TNCH_EL = #248; { $F8 Erase line } + TNCH_GA = #249; { $F9 Go ahead } + TNCH_SB = #250; { $FA Subnegociation } + TNCH_WILL = #251; { $FB Will } + TNCH_WONT = #252; { $FC Wont } + TNCH_DO = #253; { $FD Do } + TNCH_DONT = #254; { $FE Dont } + TNCH_IAC = #255; { $FF IAC } + + { Telnet options } + TN_TRANSMIT_BINARY = #0; { $00 } + TN_ECHO = #1; { $01 } + TN_RECONNECTION = #2; { $02 } + TN_SUPPRESS_GA = #3; { $03 } + TN_MSG_SZ_NEGOC = #4; { $04 } + TN_STATUS = #5; { $05 } + TN_TIMING_MARK = #6; { $06 } + TN_NOPTIONS = #6; { $06 } + TN_DET = #20; { $14 } + TN_SEND_LOC = #23; { $17 } + TN_TERMTYPE = #24; { $18 } + TN_EOR = #25; { $19 } + TN_NAWS = #31; { $1F } + TN_TERMSPEED = #32; { $20 } + TN_TFC = #33; { $21 } + TN_XDISPLOC = #35; { $23 } + TN_EXOPL = #255; { $FF } + + TN_TTYPE_SEND = #1; + TN_TTYPE_IS = #0; + +type + TTnCnx = class; + + TTnSessionConnected = procedure (Sender: TTnCnx; Error : word) of object; + TTnSessionClosed = procedure (Sender: TTnCnx; Error : word) of object; + TTnDataAvailable = procedure (Sender: TTnCnx; Buffer : PChar; Len : Integer) of object; + TTnDisplay = procedure (Sender: TTnCnx; Str : String) of object; + + TTnCnx= class(TComponent) + public + Socket : TWSocket; + private + FPort : String; + FHost : String; + FLocation : String; + FTermType : String; + RemoteBinMode : Boolean; + LocalBinMode : Boolean; + FLocalEcho : Boolean; + Spga : Boolean; + FTType : Boolean; + FBuffer : array [0..2048] of char; + FBufferCnt : Integer; + FWindowHandle : HWND; + FOnSessionConnected : TTnSessionConnected; + FOnSessionClosed : TTnSessionClosed; + FOnDataAvailable : TTnDataAvailable; + FOnDisplay : TTnDisplay; + FOnEOR : TNotifyEvent; + FOnSendLoc : TNotifyEvent; + FOnTermType : TNotifyEvent; + FOnLocalEcho : TNotifyEvent; + procedure WndProc(var MsgRec: TMessage); + procedure SocketSessionConnected(Sender: TObject; Error : word); + procedure SocketSessionClosed(Sender: TObject; Error : word); + procedure SocketDataAvailable(Sender: TObject; Error : word); + procedure Display(Str : String); + procedure AddChar(Ch : Char); + procedure ReceiveChar(Ch : Char); + procedure Answer(chAns : Char; chOption : Char); + procedure NegociateSubOption(strSubOption : String); + procedure NegociateOption(chAction : Char; chOption : Char); + procedure FlushBuffer; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + function GetState : TSocketState; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function Send(Data : Pointer; Len : Integer) : integer; + function SendStr(Data : String) : integer; + procedure Connect; + function IsConnected : Boolean; + procedure WillOption(chOption : Char); + procedure WontOption(chOption : Char); + procedure DontOption(chOption : Char); + procedure DoOption(chOption : Char); + procedure Close; + procedure Pause; + procedure Resume; + property State : TSocketState read GetState; + property Handle : HWND read FWindowHandle; + published + property Port : String read FPort + write FPort; + property Host : String read FHost + write FHost; + property Location : String read FLocation + write FLocation; + property TermType : String read FTermType + write FTermType; + property LocalEcho : Boolean read FLocalEcho + write FLocalEcho; + property OnSessionConnected : TTnSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TTnSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnDataAvailable : TTnDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnDisplay : TTnDisplay read FOnDisplay + write FOnDisplay; + property OnEndOfRecord : TNotifyEvent read FOnEOR + write FOnEOR; + property OnSendLoc : TNotifyEvent read FOnSendLoc + write FOnSendLoc; + property OnTermType : TNotifyEvent read FOnTermType + write FOnTermType; + property OnLocalEcho : TNotifyEvent read FOnLocalEcho + write FOnLocalEcho; + end; + +procedure Register; + +implementation + +{$DEFINE Debug} { Add or remove minus sign before dollar sign to } + { generate code for debug message output } + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TTnCnx]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DebugString(Msg : String); +const + Cnt : Integer = 0; +var + Buf : String[20]; +begin +{$IFDEF Debug} + Cnt := Cnt + 1; + Buf := IntToHex(Cnt, 4) + ' ' + #0; + OutputDebugString(@Buf[1]); + +{$IFNDEF WIN32} + if Length(Msg) < High(Msg) then + Msg[Length(Msg) + 1] := #0; +{$ENDIF} + + OutputDebugString(@Msg[1]); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WndProc(var MsgRec: TMessage); +begin + with MsgRec do + Result := DefWindowProc(Handle, Msg, wParam, lParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTnCnx.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWindowHandle := AllocateHWnd(WndProc); + FLocation := 'TNCNX'; + FTermType := 'VT100'; + FPort := '23'; + Socket := TWSocket.Create(Self); + Socket.OnSessionConnected := SocketSessionConnected; + Socket.OnDataAvailable := SocketDataAvailable; + Socket.OnSessionClosed := SocketSessionClosed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTnCnx.Destroy; +begin + if Assigned(Socket) then begin + Socket.Free; + Socket := nil; + end; + DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if (AComponent = Socket) and (Operation = opRemove) then + Socket := nil; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Pause; +begin + if not Assigned(Socket) then + Exit; + Socket.Pause; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Resume; +begin + if not Assigned(Socket) then + Exit; + Socket.Resume; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Connect; +begin + if not Assigned(Socket) then + Exit; + + if Socket.State <> wsClosed then + Socket.Close; + + Socket.Proto := 'tcp'; + Socket.Port := FPort; + Socket.Addr := FHost; + Socket.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.IsConnected : Boolean; +begin + Result := Socket.State = wsConnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Close; +begin + if Assigned(Socket) then + Socket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Display(Str : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Str); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.GetState : TSocketState; +begin + if Assigned(Socket) then + Result := Socket.State + else + Result := wsInvalidState; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketSessionConnected(Sender: TObject; Error : word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketSessionClosed(Sender: TObject; Error : word); +begin + if Socket.State <> wsClosed then + Socket.Close; + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketDataAvailable(Sender: TObject; Error : word); +var + Len, I : Integer; + Buffer : array [1..2048] of char; + Socket : TWSocket; +begin + Socket := Sender as TWSocket; + Len := Socket.Receive(@Buffer[1], High(Buffer)); + if Len = 0 then begin + { Remote has closed } + Display(#13 + #10 + '**** Remote has closed ****' + #13 + #10); + end + else if Len < 0 then begin + { An error has occured } + if Socket.LastError <> WSAEWOULDBLOCK then + Display(#13 + #10 + '**** ERROR: ' + IntToStr(Socket.LastError) + + ' ****' + #13 + #10); + end + else begin + for I := 1 to Len do + ReceiveChar(Buffer[I]); + FlushBuffer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.Send(Data : Pointer; Len : Integer) : integer; +begin + if Assigned(Socket) then + Result := Socket.Send(Data, Len) + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.SendStr(Data : String) : integer; +begin + Result := Send(@Data[1], Length(Data)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Answer(chAns : Char; chOption : Char); +var + Buf : String[3]; +begin +{ DebugString('Answer ' + IntToHex(ord(chAns), 2) + ' ' + IntToHex(ord(ChOption), 2) + #13 + #10); } + Buf := TNCH_IAC + chAns + chOption; + Socket.Send(@Buf[1], Length(Buf)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WillOption(chOption : Char); +begin + Answer(TNCH_WILL, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WontOption(chOption : Char); +begin + Answer(TNCH_WONT, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.DontOption(chOption : Char); +begin + Answer(TNCH_DONT, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.DoOption(chOption : Char); +begin + Answer(TNCH_DO, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.NegociateSubOption(strSubOption : String); +var + Buf : String; +begin +{ DebugString('SubNegociation ' + + IntToHex(ord(strSubOption[1]), 2) + ' ' + + IntToHex(ord(strSubOption[2]), 2) + #13 + #10); } + + case strSubOption[1] of + TN_TERMTYPE: + begin + if strSubOption[2] = TN_TTYPE_SEND then begin +{ DebugString('Send TermType' + #13 + #10); } + if Assigned(FOnTermType) then + FOnTermType(Self); + Buf := TNCH_IAC + TNCH_SB + TN_TERMTYPE + TN_TTYPE_IS + FTermType + TNCH_IAC + TNCH_SE; + Socket.Send(@Buf[1], Length(Buf)); + end; + end; + else +{ DebugString('Unknown suboption' + #13 + #10); } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.NegociateOption(chAction : Char; chOption : Char); +var + Buf : String; +begin +{ DebugString('Negociation ' + IntToHex(ord(chAction), 2) + ' ' + + IntToHex(ord(ChOption), 2) + #13 + #10); } + + case chOption of + TN_TRANSMIT_BINARY: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + RemoteBinMode := TRUE; + LocalBinMode := TRUE; + end + else if chAction = TNCH_WONT then begin + if RemoteBinMode then begin + RemoteBinMode := FALSE; + LocalBinMode := FALSE; + end; + end; + end; + TN_ECHO: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + FLocalEcho := FALSE; + end + else if chAction = TNCH_WONT then begin + FLocalEcho := TRUE; + end; + if Assigned(FOnLocalEcho) then + FOnLocalEcho(self); + end; + TN_SUPPRESS_GA: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + spga := TRUE; + end; + end; + TN_TERMTYPE: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + FTType := TRUE; + end; + end; + TN_SEND_LOC: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + if Assigned(FOnSendLoc) then + FOnSendLoc(Self); + Buf := TNCH_IAC + TNCH_SB + TN_SEND_LOC + FLocation + TNCH_IAC + TNCH_SE; + Socket.Send(@Buf[1], Length(Buf)); + end; + end; + TN_EOR: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + FTType := TRUE; + end; + end; + else + Answer(TNCH_WONT, chOption); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.FlushBuffer; +var + Buffer : PChar; + Count : Integer; +begin + try + if FBufferCnt > 0 then begin + if Assigned(FOnDataAvailable) then begin + { We need to make a copy for the data because we can reenter } + { during the event processing } + Count := FBufferCnt; { How much we received } + try + GetMem(Buffer, Count + 1); { Alloc memory for the copy } + except + Buffer := nil; + end; + if Buffer <> nil then begin + try + Move(FBuffer, Buffer^, Count); { Actual copy } + Buffer[Count] := #0; { Add a nul byte } + FBufferCnt := 0; { Reset receivecounter } + FOnDataAvailable(Self, Buffer, Count); { Call event handler } + finally + FreeMem(Buffer, Count + 1); { Release the buffer } + end; + end; + end + else begin + FBufferCnt := 0 + end; + end; + except + raise; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.AddChar(Ch : Char); +begin + FBuffer[FBufferCnt] := Ch; + Inc(FBufferCnt); + if FBufferCnt >= SizeOf(FBuffer) then + FlushBuffer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.ReceiveChar(Ch : Char); +const + bIAC : Boolean = FALSE; + chVerb : Char = #0; + strSubOption : String = ''; + bSubNegoc : Boolean = FALSE; +begin + if chVerb <> #0 then begin + NegociateOption(chVerb, Ch); + chVerb := #0; + strSubOption := ''; + Exit; + end; + + if bSubNegoc then begin + if Ch = TNCH_SE then begin + bSubNegoc := FALSE; + NegociateSubOption(strSubOption); + end + else + strSubOption := strSubOption + Ch; + Exit; + end; + + if bIAC then begin + case Ch of + TNCH_IAC: begin + AddChar(Ch); + bIAC := FALSE; + end; + TNCH_DO, TNCH_WILL, TNCH_DONT, TNCH_WONT: + begin + bIAC := FALSE; + chVerb := Ch; + end; + TNCH_EOR: + begin + DebugString('TNCH_EOR' + #13 + #10); + bIAC := FALSE; + if Assigned(FOnEOR) then + FOnEOR(Self); + end; + TNCH_SB: + begin +{ DebugString('Subnegociation' + #13 + #10); } + bSubNegoc := TRUE; + bIAC := FALSE; + end; + else + DebugString('Unknown ' + IntToHex(ord(Ch), 2) + ' ''' + Ch + '''' + #13 + #10); + bIAC := FALSE; + end; + + Exit; + end; + + case Ch of + TNCH_EL: + begin + DebugString('TNCH_EL' + #13 + #10); + AddChar(Ch); + end; + TNCH_EC: + begin + DebugString('TNCH_EC' + #13 + #10); + AddChar(Ch); + end; + TNCH_AYT: + begin + DebugString('TNCH_AYT' + #13 + #10); + AddChar(Ch); + end; + TNCH_IP: + begin + DebugString('TNCH_IP' + #13 + #10); + AddChar(Ch); + end; + TNCH_AO: + begin + DebugString('TNCH_AO' + #13 + #10); + AddChar(Ch); + end; + TNCH_IAC: + begin + bIAC := TRUE + end; + else + AddChar(Ch); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/TnCnx.~pa b/lib/telnet/TnCnx.~pa new file mode 100644 index 00000000..36c57d82 --- /dev/null +++ b/lib/telnet/TnCnx.~pa @@ -0,0 +1,685 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: TNCNX.PAS +Object: Delphi component which implement the TCP/IP telnet protocol + including some options negociations. + RFC854, RFC885, RFC779, RFC1091 +Author: Franois PIETTE +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Support: Please ask your question in the following newsgroup: + news://forums.borland.com/borland.public.delphi.vcl.components.using +Creation: April, 1996 +Version: 2.03 +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Jul 22, 1997 Adapted to Delphi 3 +Sep 5, 1997 Added version information, removed old code, added OnTermType + Renamed some indentifier to be more standard. +Sep 24, 1997 V203. Added procedures to negociate options + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit TnCnx; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Controls, Forms, + WSocket, Winsock; + +const + TnCnxVersion = 203; + + { Telnet command characters } + TNCH_EOR = #239; { $EF End Of Record (preceded by IAC) } + TNCH_SE = #240; { $F0 End of subnegociation parameters } + TNCH_NOP = #241; { $F1 No operation } + TNCH_DATA_MARK = #242; { $F2 Data stream portion of a Synch } + TNCH_BREAK = #243; { $F3 NVT charcater break } + TNCH_IP = #244; { $F4 Interrupt process } + TNCH_AO = #245; { $F5 Abort output } + TNCH_AYT = #246; { $F6 Are you there } + TNCH_EC = #247; { $F7 Erase character } + TNCH_EL = #248; { $F8 Erase line } + TNCH_GA = #249; { $F9 Go ahead } + TNCH_SB = #250; { $FA Subnegociation } + TNCH_WILL = #251; { $FB Will } + TNCH_WONT = #252; { $FC Wont } + TNCH_DO = #253; { $FD Do } + TNCH_DONT = #254; { $FE Dont } + TNCH_IAC = #255; { $FF IAC } + + { Telnet options } + TN_TRANSMIT_BINARY = #0; { $00 } + TN_ECHO = #1; { $01 } + TN_RECONNECTION = #2; { $02 } + TN_SUPPRESS_GA = #3; { $03 } + TN_MSG_SZ_NEGOC = #4; { $04 } + TN_STATUS = #5; { $05 } + TN_TIMING_MARK = #6; { $06 } + TN_NOPTIONS = #6; { $06 } + TN_DET = #20; { $14 } + TN_SEND_LOC = #23; { $17 } + TN_TERMTYPE = #24; { $18 } + TN_EOR = #25; { $19 } + TN_NAWS = #31; { $1F } + TN_TERMSPEED = #32; { $20 } + TN_TFC = #33; { $21 } + TN_XDISPLOC = #35; { $23 } + TN_EXOPL = #255; { $FF } + + TN_TTYPE_SEND = #1; + TN_TTYPE_IS = #0; + +type + TTnCnx = class; + + TTnSessionConnected = procedure (Sender: TTnCnx; Error : word) of object; + TTnSessionClosed = procedure (Sender: TTnCnx; Error : word) of object; + TTnDataAvailable = procedure (Sender: TTnCnx; Buffer : PChar; Len : Integer) of object; + TTnDisplay = procedure (Sender: TTnCnx; Str : String) of object; + + TTnCnx= class(TComponent) + public + Socket : TWSocket; + private + FPort : String; + FHost : String; + FLocation : String; + FTermType : String; + RemoteBinMode : Boolean; + LocalBinMode : Boolean; + FLocalEcho : Boolean; + Spga : Boolean; + FTType : Boolean; + FBuffer : array [0..2048] of char; //yohei + FBufferCnt : Integer; + FWindowHandle : HWND; + FOnSessionConnected : TTnSessionConnected; + FOnSessionClosed : TTnSessionClosed; + FOnDataAvailable : TTnDataAvailable; + FOnDisplay : TTnDisplay; + FOnEOR : TNotifyEvent; + FOnSendLoc : TNotifyEvent; + FOnTermType : TNotifyEvent; + FOnLocalEcho : TNotifyEvent; + procedure WndProc(var MsgRec: TMessage); + procedure SocketSessionConnected(Sender: TObject; Error : word); + procedure SocketSessionClosed(Sender: TObject; Error : word); + procedure SocketDataAvailable(Sender: TObject; Error : word); + procedure Display(Str : String); + procedure AddChar(Ch : Char); + procedure ReceiveChar(Ch : Char); + procedure Answer(chAns : Char; chOption : Char); + procedure NegociateSubOption(strSubOption : String); + procedure NegociateOption(chAction : Char; chOption : Char); + procedure FlushBuffer; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + function GetState : TSocketState; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function Send(Data : Pointer; Len : Integer) : integer; + function SendStr(Data : String) : integer; + procedure Connect; + function IsConnected : Boolean; + procedure WillOption(chOption : Char); + procedure WontOption(chOption : Char); + procedure DontOption(chOption : Char); + procedure DoOption(chOption : Char); + procedure Close; + procedure Pause; + procedure Resume; + property State : TSocketState read GetState; + property Handle : HWND read FWindowHandle; + published + property Port : String read FPort + write FPort; + property Host : String read FHost + write FHost; + property Location : String read FLocation + write FLocation; + property TermType : String read FTermType + write FTermType; + property LocalEcho : Boolean read FLocalEcho + write FLocalEcho; + property OnSessionConnected : TTnSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TTnSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnDataAvailable : TTnDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnDisplay : TTnDisplay read FOnDisplay + write FOnDisplay; + property OnEndOfRecord : TNotifyEvent read FOnEOR + write FOnEOR; + property OnSendLoc : TNotifyEvent read FOnSendLoc + write FOnSendLoc; + property OnTermType : TNotifyEvent read FOnTermType + write FOnTermType; + property OnLocalEcho : TNotifyEvent read FOnLocalEcho + write FOnLocalEcho; + end; + +procedure Register; + +implementation + +{$DEFINE Debug} { Add or remove minus sign before dollar sign to } + { generate code for debug message output } + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TTnCnx]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DebugString(Msg : String); +const + Cnt : Integer = 0; +var + Buf : String[20]; +begin +{$IFDEF Debug} + Cnt := Cnt + 1; + Buf := IntToHex(Cnt, 4) + ' ' + #0; + OutputDebugString(@Buf[1]); + +{$IFNDEF WIN32} + if Length(Msg) < High(Msg) then + Msg[Length(Msg) + 1] := #0; +{$ENDIF} + + OutputDebugString(@Msg[1]); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WndProc(var MsgRec: TMessage); +begin + with MsgRec do + Result := DefWindowProc(Handle, Msg, wParam, lParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTnCnx.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWindowHandle := AllocateHWnd(WndProc); + FLocation := 'TNCNX'; + FTermType := 'VT100'; + FPort := '23'; + Socket := TWSocket.Create(Self); + Socket.OnSessionConnected := SocketSessionConnected; + Socket.OnDataAvailable := SocketDataAvailable; + Socket.OnSessionClosed := SocketSessionClosed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTnCnx.Destroy; +begin + if Assigned(Socket) then begin + Socket.Free; + Socket := nil; + end; + DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if (AComponent = Socket) and (Operation = opRemove) then + Socket := nil; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Pause; +begin + if not Assigned(Socket) then + Exit; + Socket.Pause; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Resume; +begin + if not Assigned(Socket) then + Exit; + Socket.Resume; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Connect; +begin + if not Assigned(Socket) then + Exit; + + if Socket.State <> wsClosed then + Socket.Close; + + Socket.Proto := 'tcp'; + Socket.Port := FPort; + Socket.Addr := FHost; + Socket.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.IsConnected : Boolean; +begin + Result := Socket.State = wsConnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Close; +begin + if Assigned(Socket) then + Socket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Display(Str : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Str); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.GetState : TSocketState; +begin + if Assigned(Socket) then + Result := Socket.State + else + Result := wsInvalidState; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketSessionConnected(Sender: TObject; Error : word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketSessionClosed(Sender: TObject; Error : word); +begin + if Socket.State <> wsClosed then + Socket.Close; + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketDataAvailable(Sender: TObject; Error : word); +var + Len, I : Integer; + Buffer : array [1..2000] of char; + Socket : TWSocket; +begin + Socket := Sender as TWSocket; + Len := Socket.Receive(@Buffer[1], SizeOf(Buffer)-1); + if Len = 0 then begin + { Remote has closed } + Display(#13 + #10 + '**** Remote has closed ****' + #13 + #10); + end + else if Len < 0 then begin + { An error has occured } + if Socket.LastError <> WSAEWOULDBLOCK then + Display(#13 + #10 + '**** ERROR: ' + IntToStr(Socket.LastError) + + ' ****' + #13 + #10); + end + else begin + Buffer[Len+1]=#0 + FOnDataAvailable(Self, @Buffer[1], Len); { Call event handler } + + { repeat until FBufferCnt = 0; + for I := 1 to Len do + //ReceiveChar(Buffer[I]); + AddChar(Buffer[I]); + FlushBuffer; } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.Send(Data : Pointer; Len : Integer) : integer; +begin + if Assigned(Socket) then + Result := Socket.Send(Data, Len) + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.SendStr(Data : String) : integer; +begin + Result := Send(@Data[1], Length(Data)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Answer(chAns : Char; chOption : Char); +var + Buf : String[3]; +begin +{ DebugString('Answer ' + IntToHex(ord(chAns), 2) + ' ' + IntToHex(ord(ChOption), 2) + #13 + #10); } + Buf := TNCH_IAC + chAns + chOption; + Socket.Send(@Buf[1], Length(Buf)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WillOption(chOption : Char); +begin + Answer(TNCH_WILL, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WontOption(chOption : Char); +begin + Answer(TNCH_WONT, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.DontOption(chOption : Char); +begin + Answer(TNCH_DONT, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.DoOption(chOption : Char); +begin + Answer(TNCH_DO, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.NegociateSubOption(strSubOption : String); +var + Buf : String; +begin +{ DebugString('SubNegociation ' + + IntToHex(ord(strSubOption[1]), 2) + ' ' + + IntToHex(ord(strSubOption[2]), 2) + #13 + #10); } + + case strSubOption[1] of + TN_TERMTYPE: + begin + if strSubOption[2] = TN_TTYPE_SEND then begin +{ DebugString('Send TermType' + #13 + #10); } + if Assigned(FOnTermType) then + FOnTermType(Self); + Buf := TNCH_IAC + TNCH_SB + TN_TERMTYPE + TN_TTYPE_IS + FTermType + TNCH_IAC + TNCH_SE; + Socket.Send(@Buf[1], Length(Buf)); + end; + end; + else +{ DebugString('Unknown suboption' + #13 + #10); } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.NegociateOption(chAction : Char; chOption : Char); +var + Buf : String; +begin +{ DebugString('Negociation ' + IntToHex(ord(chAction), 2) + ' ' + + IntToHex(ord(ChOption), 2) + #13 + #10); } + + case chOption of + TN_TRANSMIT_BINARY: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + RemoteBinMode := TRUE; + LocalBinMode := TRUE; + end + else if chAction = TNCH_WONT then begin + if RemoteBinMode then begin + RemoteBinMode := FALSE; + LocalBinMode := FALSE; + end; + end; + end; + TN_ECHO: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + FLocalEcho := FALSE; + end + else if chAction = TNCH_WONT then begin + FLocalEcho := TRUE; + end; + if Assigned(FOnLocalEcho) then + FOnLocalEcho(self); + end; + TN_SUPPRESS_GA: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + spga := TRUE; + end; + end; + TN_TERMTYPE: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + FTType := TRUE; + end; + end; + TN_SEND_LOC: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + if Assigned(FOnSendLoc) then + FOnSendLoc(Self); + Buf := TNCH_IAC + TNCH_SB + TN_SEND_LOC + FLocation + TNCH_IAC + TNCH_SE; + Socket.Send(@Buf[1], Length(Buf)); + end; + end; + TN_EOR: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + FTType := TRUE; + end; + end; + else + Answer(TNCH_WONT, chOption); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.FlushBuffer; +var + Buffer : PChar; + Count : Integer; +begin + try + if FBufferCnt > 0 then begin + if Assigned(FOnDataAvailable) then begin + { We need to make a copy for the data because we can reenter } + { during the event processing } + Count := FBufferCnt; { How much we received } + try + GetMem(Buffer, Count + 1); { Alloc memory for the copy } + except + Buffer := nil; + end; + if Buffer <> nil then begin + try + Move(FBuffer, Buffer^, Count); { Actual copy } + Buffer[Count] := #0; { Add a nul byte } + FBufferCnt := 0; { Reset receivecounter } + FOnDataAvailable(Self, Buffer, Count); { Call event handler } + finally + FreeMem(Buffer, Count + 1); { Release the buffer } + end; + end; + end + else begin + FBufferCnt := 0 + end; + end; + except + raise; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.AddChar(Ch : Char); +begin + FBuffer[FBufferCnt] := Ch; + Inc(FBufferCnt); + if FBufferCnt >= SizeOf(FBuffer) then + FlushBuffer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.ReceiveChar(Ch : Char); +const + bIAC : Boolean = FALSE; + chVerb : Char = #0; + strSubOption : String = ''; + bSubNegoc : Boolean = FALSE; +begin + if chVerb <> #0 then begin + NegociateOption(chVerb, Ch); + chVerb := #0; + strSubOption := ''; + Exit; + end; + + if bSubNegoc then begin + if Ch = TNCH_SE then begin + bSubNegoc := FALSE; + NegociateSubOption(strSubOption); + end + else + strSubOption := strSubOption + Ch; + Exit; + end; + + if bIAC then begin + case Ch of + TNCH_IAC: begin + AddChar(Ch); + bIAC := FALSE; + end; + TNCH_DO, TNCH_WILL, TNCH_DONT, TNCH_WONT: + begin + bIAC := FALSE; + chVerb := Ch; + end; + TNCH_EOR: + begin + DebugString('TNCH_EOR' + #13 + #10); + bIAC := FALSE; + if Assigned(FOnEOR) then + FOnEOR(Self); + end; + TNCH_SB: + begin +{ DebugString('Subnegociation' + #13 + #10); } + bSubNegoc := TRUE; + bIAC := FALSE; + end; + else + DebugString('Unknown ' + IntToHex(ord(Ch), 2) + ' ''' + Ch + '''' + #13 + #10); + bIAC := FALSE; + end; + + Exit; + end; + + case Ch of + TNCH_EL: + begin + DebugString('TNCH_EL' + #13 + #10); + AddChar(Ch); + end; + TNCH_EC: + begin + DebugString('TNCH_EC' + #13 + #10); + AddChar(Ch); + end; + TNCH_AYT: + begin + DebugString('TNCH_AYT' + #13 + #10); + AddChar(Ch); + end; + TNCH_IP: + begin + DebugString('TNCH_IP' + #13 + #10); + AddChar(Ch); + end; + TNCH_AO: + begin + DebugString('TNCH_AO' + #13 + #10); + AddChar(Ch); + end; + TNCH_IAC: + begin + bIAC := TRUE + end; + else + AddChar(Ch); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/TnOptFrm.dcu b/lib/telnet/TnOptFrm.dcu new file mode 100644 index 00000000..205d2ba2 Binary files /dev/null and b/lib/telnet/TnOptFrm.dcu differ diff --git a/lib/telnet/Tncnx.dcu b/lib/telnet/Tncnx.dcu new file mode 100644 index 00000000..c93e69b9 Binary files /dev/null and b/lib/telnet/Tncnx.dcu differ diff --git a/lib/telnet/UDPLSTN.DPR b/lib/telnet/UDPLSTN.DPR new file mode 100644 index 00000000..455e3c7c --- /dev/null +++ b/lib/telnet/UDPLSTN.DPR @@ -0,0 +1,12 @@ +program UdpLstn; + +uses + Forms, + UdpLstn1 in 'UdpLstn1.pas' {MainAutoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMainForm, MainForm); + Application.Run; +end. diff --git a/lib/telnet/UDPLSTN1.DFM b/lib/telnet/UDPLSTN1.DFM new file mode 100644 index 00000000..3560f3c4 Binary files /dev/null and b/lib/telnet/UDPLSTN1.DFM differ diff --git a/lib/telnet/UDPLSTN1.PAS b/lib/telnet/UDPLSTN1.PAS new file mode 100644 index 00000000..2b365523 --- /dev/null +++ b/lib/telnet/UDPLSTN1.PAS @@ -0,0 +1,281 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Email: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + BBS: +32-4-365.13.95 +Copyright: You can use this software freely, at your own risks +Creation: April 4, 1997 +Version: 2.01 +Object: Demo program to show how to use TWSocket object to listen + UDP messages from the network. Use UDPSend or any other + program to send UDP messages. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +July 23, 1997 Adapted for Delphi 1, 2 and 3 +Sept 06, 1997 Version 2.01 +Sept 27, 1997 Updated for TWSocket changes + Replace loopback address by real localhost IP addr + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit UdpLstn1; + +interface + +uses + WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + FormPos, StdCtrls, WinSock, Wsocket, IniFiles; + +type + TMainForm = class(TForm) + WSocket: TWSocket; + StartButton: TButton; + DataAvailableLabel: TLabel; + InfoLabel: TLabel; + StopButton: TButton; + PortEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + ServerEdit: TEdit; + AnyServerCheckBox: TCheckBox; + procedure StartButtonClick(Sender: TObject); + procedure WSocketDataAvailable(Sender: TObject; Error: Word); + procedure WSocketSessionConnected(Sender: TObject; Error: Word); + procedure StopButtonClick(Sender: TObject); + procedure WSocketSessionClosed(Sender: TObject; Error: Word); + procedure FormShow(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure AnyServerCheckBoxClick(Sender: TObject); + procedure ServerEditChange(Sender: TObject); + private + { Dclarations prives } + FIniFileName : String; + FSectionName : String; + FKeyName : String; + FServerAddr : TInAddr; + public + { Dclarations publiques } + end; + +var + MainForm: TMainForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then { Petite optimisation: pas d'espace } + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF WIN32} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.StartButtonClick(Sender: TObject); +begin + FServerAddr := WSocketResolveHost(ServerEdit.Text); + if FServerAddr.S_addr = htonl(INADDR_LOOPBACK) then begin + { Replace loopback address by real localhost IP addr } + FServerAddr := WSocketResolveHost(LocalHostName); + end; + WSocket.Proto := 'udp'; + WSocket.Addr := '0.0.0.0'; + WSocket.Port := PortEdit.Text; + WSocket.Listen; + PortEdit.Enabled := FALSE; + ServerEdit.Enabled := FALSE; + AnyServerCheckBox.Enabled := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] in ['0'..'9']) do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.WSocketDataAvailable(Sender: TObject; Error: Word); +var + Buffer : array [0..1023] of char; + Len : Integer; + Src : TSockAddrIn; + SrcLen : Integer; +begin + SrcLen := SizeOf(Src); + Len := WSocket.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen); + if Len >= 0 then begin + if (FServerAddr.S_addr = INADDR_ANY) or + (FServerAddr.S_addr = Src.Sin_addr.S_addr) then begin + Buffer[Len] := #0; + DataAvailableLabel.Caption := IntToStr(atoi(DataAvailableLabel.caption) + 1) + + ': ' + StrPas(Buffer); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.WSocketSessionConnected(Sender: TObject; + Error: Word); +begin + StartButton.Enabled := FALSE; + StopButton.Enabled := TRUE; + InfoLabel.Caption := 'Connected'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.StopButtonClick(Sender: TObject); +begin + StartButton.Enabled := TRUE; + StopButton.Enabled := FALSE; + PortEdit.Enabled := TRUE; + ServerEdit.Enabled := TRUE; + AnyServerCheckBox.Enabled := TRUE; + WSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.WSocketSessionClosed(Sender: TObject; Error: Word); +begin + StartButton.Enabled := TRUE; + StopButton.Enabled := FALSE; + PortEdit.Enabled := TRUE; + ServerEdit.Enabled := TRUE; + AnyServerCheckBox.Enabled := TRUE; + InfoLabel.Caption := 'Disconnected'; + DataAvailableLabel.Caption := ''; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +var + IniFile : TIniFile; +begin + if FirstTime then begin + FirstTime := FALSE; + FIniFileName := 'UdpLstn'; + FSectionName := 'Windows'; + FKeyName := 'MainForm'; + LoadFormPos(Self, FIniFilename, FSectionName, FKeyName); + DataAvailableLabel.Caption := ''; + InfoLabel.Caption := 'Click on Start button'; + StartButton.Enabled := TRUE; + StopButton.Enabled := FALSE; + IniFile := TIniFile.Create(FIniFileName); + PortEdit.Text := IniFile.ReadString('data', 'port', '600'); + ServerEdit.Text := IniFile.ReadString('data', 'server', '0.0.0.0'); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +var + IniFile : TIniFile; +begin + SaveFormPos(Self, FIniFilename, FSectionName, FKeyName); + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString('data', 'port', PortEdit.Text); + IniFile.WriteString('data', 'server', ServerEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.AnyServerCheckBoxClick(Sender: TObject); +begin + if AnyServerCheckBox.Checked then + ServerEdit.Text := '0.0.0.0'; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.ServerEditChange(Sender: TObject); +begin + AnyServerCheckBox.Checked := (Trim(ServerEdit.Text) = '0.0.0.0'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/UDPSEND.DPR b/lib/telnet/UDPSEND.DPR new file mode 100644 index 00000000..547266b2 --- /dev/null +++ b/lib/telnet/UDPSEND.DPR @@ -0,0 +1,12 @@ +program UdpSend; + +uses + Forms, + UdpSend1 in 'UdpSend1.pas' {MainAutoForm}; + +{$R *.RES} + +begin + Application.CreateForm(TMainForm, MainForm); + Application.Run; +end. diff --git a/lib/telnet/UDPSEND1.DFM b/lib/telnet/UDPSEND1.DFM new file mode 100644 index 00000000..25386057 Binary files /dev/null and b/lib/telnet/UDPSEND1.DFM differ diff --git a/lib/telnet/UDPSEND1.PAS b/lib/telnet/UDPSEND1.PAS new file mode 100644 index 00000000..1e4efdb4 --- /dev/null +++ b/lib/telnet/UDPSEND1.PAS @@ -0,0 +1,124 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Email: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + BBS: +32-4-365.13.95 +Copyright: You can use this software freely, at your own risks +Creation: April 4, 1997 +Version: 2.01 +Object: Demo program to show how to use TWSocket object to broadcast + UDP messages on the network. Use UDPLstn to listen to those + UDP messages, or other UDP messages. +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Sep 06, 1997 Version 2.01 + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit UdpSend1; + +interface + +uses + WinTypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + FormPos, StdCtrls, Wsocket, IniFiles; + +type + TMainForm = class(TForm) + WSocket: TWSocket; + SendButton: TButton; + MessageEdit: TEdit; + PortEdit: TEdit; + Label1: TLabel; + procedure FormShow(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure SendButtonClick(Sender: TObject); + private + FIniFileName : String; + FSectionName : String; + FKeyName : String; + end; + +var + MainForm: TMainForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +var + IniFile : TIniFile; +begin + if FirstTime then begin + FirstTime := FALSE; + FIniFileName := 'UdpSend'; + FSectionName := 'Windows'; + FKeyName := 'MainForm'; + LoadFormPos(Self, FIniFilename, FSectionName, FKeyName); + IniFile := TIniFile.Create(FIniFileName); + PortEdit.Text := IniFile.ReadString('data', 'port', '600'); + MessageEdit.Text := IniFile.ReadString('data', 'message', ''); + IniFile.Free; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +var + IniFile : TIniFile; +begin + SaveFormPos(Self, FIniFilename, FSectionName, FKeyName); + IniFile := TIniFile.Create(FIniFileName); + IniFile.WriteString('data', 'port', PortEdit.Text); + IniFile.WriteString('data', 'message', MessageEdit.Text); + IniFile.Free; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TMainForm.SendButtonClick(Sender: TObject); +begin + WSocket.Proto := 'udp'; + WSocket.Addr := '255.255.255.255'; + WSocket.Port := PortEdit.Text; + WSocket.Connect; + WSocket.SendStr(MessageEdit.Text); + WSocket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/WAIT.DCR b/lib/telnet/WAIT.DCR new file mode 100644 index 00000000..83ac26ea Binary files /dev/null and b/lib/telnet/WAIT.DCR differ diff --git a/lib/telnet/WAIT.PAS b/lib/telnet/WAIT.PAS new file mode 100644 index 00000000..43cc03ec --- /dev/null +++ b/lib/telnet/WAIT.PAS @@ -0,0 +1,335 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: WAIT.PAS +Object: Delphi component which enable a component or application to + wait for some event, optionnaly displaying a progress bar. +Author: Franois PIETTE +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Creation: April, 1996 +Version: 2.13 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Jul 22, 1997 Adapted to Delphi 3 +Oct 22, 1997 V2.00 Added WaitVersion constant and Running property +Nov 11, 1997 V2.10 Made a TCustomWait base component with virtual functions. + This will easy the making of descendend components. + Renamed OnWaitEvent -> OnWait + OnTimeOutEvent -> OnTimeout + Added events: + OnWaitStart When the component starts his job. + OnWaiting When the component is waiting. + OnWaitStop When the component stops his job. +Mar 27, 1998 V2.11 Adapted for C++Builder 3 +Apr 20, 1998 V2.12 Removed the second 'r' from 'courrier' +Jul 08, 1998 V2.13 Adadpted for Delphi 4 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit Wait; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$IFNDEF VER80} { Not for Delphi 1 } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, ExtCtrls; + +const + WaitVersion = 212; + +type + TWaitEvent = procedure(Sender: TObject; Count : integer) of object; + + TCustomWait = class(TCustomControl) + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + private + FPen : TPen; + FFont : TFont; + FBrush : TBrush; + FCaption : String; + FTimer : TTimer; + FOnWait : TWaitEvent; + FOnWaiting : TNotifyEvent; + FOnWaitStart : TNotifyEvent; + FOnWaitStop : TNotifyEvent; + FOnTimeout : TNotifyEvent; + FModalResult : TModalResult; + FStartVal : Integer; + protected + procedure Paint; override; + procedure TimerEvent(Sender: TObject); + procedure AppMessage(var Msg: TMsg; var Handled: Boolean); + function GetRunning : Boolean; + procedure SetInterval(Value : Word); + function GetInterval : Word; + public + procedure Start; virtual; + procedure Stop; virtual; + procedure StartModal; virtual; + procedure Restart; virtual; + protected + property Caption : String read FCaption write FCaption; + property ModalResult : TModalResult read FModalResult write FModalResult; + property Interval : Word read GetInterval write SetInterval; + property Running : Boolean read GetRunning; + property OnWait : TWaitEvent read FOnWait write FOnWait; + property OnTimeout : TNotifyEvent read FOnTimeout write FOnTimeout; + property OnWaiting : TNotifyEvent read FOnWaiting write FOnWaiting; + property OnWaitStart : TNotifyEvent read FOnWaitStart write FOnWaitStart; + property OnWaitStop : TNotifyEvent read FOnWaitStop write FOnWaitStop; + end; + + TWait = class(TCustomWait) + published + property Caption; + property ModalResult; + property Interval; + property OnWait; + property OnWaiting; + property OnWaitStart; + property OnWaitStop; + property OnTimeout; + property Running; + property Visible; + end; + +procedure Register; + +implementation + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TWait]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] >= '0') and (Value[i] <= '9')do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomWait.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + IsControl := TRUE; + Width := 192; + Height := 32; + Caption := '60'; + FStartVal := 60; + FOnWait := nil; + FBrush := TBrush.Create; + FPen := TPen.Create; + FFont := TFont.Create; + FFont.Size := 8; + FFont.Name := 'Courier'; + FFont.Pitch := fpFixed; + FTimer := TTimer.Create(Self); + FTimer.Enabled := FALSE; + FTimer.OnTimer := TimerEvent; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomWait.Destroy; +begin + FPen.Free; + FFont.Free; + FBrush.Free; + FTimer.Free; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.SetInterval(Value : Word); +begin + FTimer.Interval := Value; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWait.GetInterval : Word; +begin + Result := FTimer.Interval; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Start; +begin + FStartVal := atoi(Caption); + if FStartVal = 0 then begin + FStartVal := 15; + Caption := IntToStr(FStartVal); + end; + FTimer.Enabled := TRUE; + if Assigned(FOnWaitStart) then + FOnWaitStart(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Restart; +begin + Caption := IntToStr(FStartVal); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Stop; +begin + FModalResult := mrOk; + FTimer.Enabled := FALSE; + Caption := IntToStr(FStartVal); + if Assigned(FOnWaitStop) then + FOnWaitStop(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.TimerEvent(Sender: TObject); +var + Count : Integer; +begin + Count := atoi(FCaption) - 1; + + if Assigned(FOnWait) then + FOnWait(Self, Count); + + if Count <= 0 then begin + FTimer.Enabled := FALSE; + FCaption := 'Timeout'; + FModalResult := mrCancel; + Caption := IntToStr(FStartVal); + if Assigned(FOnTimeout) then + FOnTimeout(Self); + end + else begin + FCaption := IntToStr(count); + end; + Invalidate; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.AppMessage(var Msg: TMsg; var Handled: Boolean); +begin + if (Msg.Message = WM_LBUTTONDOWN) or +{ (Msg.Message = WM_LBUTTONUP) or } + (Msg.Message = WM_RBUTTONDOWN) or +{ (Msg.Message = WM_RBUTTONUP) or } + (Msg.Message = WM_LBUTTONDBLCLK) or + (Msg.Message = WM_RBUTTONDBLCLK) or + (Msg.Message = WM_KEYDOWN) or +{ (Msg.Message = WM_KEYUP) or } + (Msg.Message = WM_SYSKEYDOWN) {or + (Msg.Message = WM_SYSKEYUP) } + then begin + MessageBeep(MB_OK); + Handled := TRUE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWait.GetRunning : Boolean; +begin + Result := FTimer.Enabled; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.StartModal; +var + OldOnMessage : TMessageEvent; +begin + OldOnMessage := Application.OnMessage; + Application.OnMessage := AppMessage; + FModalResult := mrNone; + Start; + while Running do begin + if Assigned(FOnWaiting) then + FOnWaiting(Self); + Application.ProcessMessages; + end; + Application.OnMessage := OldOnMessage; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWait.Paint; +var + Len : Integer; +begin + Len := (atoi(Caption) * (Width - 7)) div FStartVal; + + Canvas.Pen := FPen; + Canvas.Font := FFont; + Canvas.Brush := FBrush; + Canvas.Brush.Color := clWhite; + Canvas.Rectangle(0, 0, Width - 1, Height - 1); + Canvas.Brush.Color := clHighlight; + Canvas.Rectangle(3, 3, 3 + Len, Height - 4); + Canvas.TextOut(4, Height div 2 - 8, FCaption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + + diff --git a/lib/telnet/WSOCKBUF.PAS b/lib/telnet/WSOCKBUF.PAS new file mode 100644 index 00000000..115d599d --- /dev/null +++ b/lib/telnet/WSOCKBUF.PAS @@ -0,0 +1,224 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TBuffer is an object wich buffers data in a single dynamically + allocated memory block. It is a kind of FIFO wich manages + characters in bloc of various sizes. +EMail: francois.piette@pophost.eunet.be + francois.piette@rtfm.be http://www.rtfm.be/fpiette +Creation: April 1996 +Version: 2.01 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1997, 1998 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +Updates: +Mar 06, 1998 V2.00 Added a property and a parameter for the create method + to select the buffer size. Using a 0 value will make the object + use the default 1514 bytes (the largest size for an ethernet + packet). +Jul 08, 1998 V2.01 Adadpted for Delphi 4 + + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WSockbuf; + +interface + +uses + SysUtils; + +const + WSockBufVersion = 201; + +type + TBuffer = class(TObject) + Buf : Pointer; + FBufSize : Integer; + WrCount : Integer; + RdCount : Integer; + public + constructor Create(nSize : Integer); virtual; + destructor Destroy; override; + function Write(Data : Pointer; Len : Integer) : Integer; + function Read(Data : Pointer; Len : Integer) : Integer; + function Peek(var Len : Integer) : Pointer; + function Remove(Len : Integer) : Integer; + procedure SetBufSize(newSize : Integer); + property BufSize : Integer read FBufSize write SetBufSize; + end; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TBuffer.Create(nSize : Integer); +begin + inherited Create; + WrCount := 0; + RdCount := 0; + BufSize := nSize; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TBuffer.Destroy; +begin + if Assigned(Buf) then + FreeMem(Buf, FBufSize); + + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TBuffer.SetBufSize(newSize : Integer); +var + newBuf : Pointer; +begin + if newSize <= 0 then + newSize := 1514; + + if newSize = FBufSize then + Exit; + + if WrCount = RdCount then begin + { Buffer is empty } + if Assigned(Buf) then + FreeMem(Buf, FBufSize); + FBufSize := newSize; + GetMem(Buf, FBufSize); + end + else begin + { Buffer contains data } + GetMem(newBuf, newSize); + Move(Buf^, newBuf^, WrCount); + if Assigned(Buf) then + FreeMem(Buf, FBufSize); + FBufSize := newSize; + Buf := newBuf; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Write(Data : Pointer; Len : Integer) : Integer; +var + Remaining : Integer; + Copied : Integer; +begin + Remaining := FBufSize - WrCount; + if Remaining <= 0 then + Result := 0 + else begin + if Len <= Remaining then + Copied := Len + else + Copied := Remaining; + Move(Data^, (PChar(Buf) + WrCount)^, Copied); + WrCount := WrCount + Copied; + Result := Copied; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Read(Data : Pointer; Len : Integer) : Integer; +var + Remaining : Integer; + Copied : Integer; +begin + Remaining := WrCount - RdCount; + if Remaining <= 0 then + Result := 0 + else begin + if Len <= Remaining then + Copied := Len + else + Copied := Remaining; + Move((PChar(Buf) + RdCount)^, Data^, Copied); + RdCount := RdCount + Copied; + + if RdCount = WrCount then begin + RdCount := 0; + WrCount := 0; + end; + + Result := Copied; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Peek(var Len : Integer) : Pointer; +var + Remaining : Integer; +begin + Remaining := WrCount - RdCount; + if Remaining <= 0 then begin + Len := 0; + Result := nil; + end + else begin + Len := Remaining; + Result := PChar(Buf) + RdCount; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TBuffer.Remove(Len : Integer) : Integer; +var + Remaining : Integer; + Removed : Integer; +begin + Remaining := WrCount - RdCount; + if Remaining <= 0 then + Result := 0 + else begin + if Len < Remaining then + Removed := Len + else + Removed := Remaining; + RdCount := RdCount + Removed; + + if RdCount = WrCount then begin + RdCount := 0; + WrCount := 0; + end; + + Result := Removed; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/telnet/WSOCKET.DCR b/lib/telnet/WSOCKET.DCR new file mode 100644 index 00000000..2d3e5915 Binary files /dev/null and b/lib/telnet/WSOCKET.DCR differ diff --git a/lib/telnet/WSOCKET.GID b/lib/telnet/WSOCKET.GID new file mode 100644 index 00000000..a2c6d63c Binary files /dev/null and b/lib/telnet/WSOCKET.GID differ diff --git a/lib/telnet/WSOCKET.PAS b/lib/telnet/WSOCKET.PAS new file mode 100644 index 00000000..5c2b29ca --- /dev/null +++ b/lib/telnet/WSOCKET.PAS @@ -0,0 +1,4799 @@ +{*_* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: TWSocket class encapsulate the Windows Socket paradigm +EMail: francois.piette@pophost.eunet.be francois.piette@rtfm.be + http://www.rtfm.be/fpiette +Creation: April 1996 +Version: 4.04 +Support: Use the mailing list twsocket@rtfm.be See website for details. +Legal issues: Copyright (C) 1996, 1997, 1998, 1999 by Franois PIETTE + Rue de Grady 24, 4053 Embourg, Belgium. Fax: +32-4-365.74.56 + + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + + 4. You must register this software by sending a picture postcard + to the author. Use a nice stamp and mention your name, street + address, EMail address and any comment you like to say. + +History: +Jul 18, 1996 Move all low level socket to winsock to be Delphi 2.x compatible +Sep 18, 1996 Use structured exception for handling errors +Sep 19, 1996 Check csDestroying before invoking event handler +Nov 04, 1996 Better error handling +Jan 31, 1997 Changed property assignation for Addr, Port and Proto + Added notification handler +Feb 14, 1997 Corrected bug in property assignation for Addr, Port and Proto +Mar 26, 1997 Make UDP protocol work correctly + Enable UDP broadcasting by using addr 255.255.255.255 +Apr 1, 1997 Added class function when independent of any open socket + Moved InitData as global + Added ReceivedFrom function + Added ResolveHost function +Jul 22, 1997 Adapted to Delphi 3 which has a modified winsock.accept +Aug 13, 1997 'sin' member made public +Aug 24, 1997 Create the only help + Makes writing HSocket the same as calling Dup. +Sep 5, 1997 Version 2.01, added WinsockInfo function +Sep 21, 1997 Version 2.02, make it really thread safe + created global WSocketVersion +Sep 25, 1997 Version 2.04, port to C++Builder +Sep 27, 1997 Version 2.05. All class methods converted to global + procedure or function because C++Builder do not like + class method very much. + Old class method New global function + ---------------- ------------------- + WinsockInfo WinsockInfo + SocketErrorDesc WSocketErrorDesc + GetHostByAddr WSocketGetHostByAddr + GetHostByName WSocketGetHostByName + ResolveHost WSocketResolveHost + HostName LocalHostName +Oct 02, 1997 V2.06 Added a check in destructor to avoid calling WSACleanup at + design time which crashes the excellent Eagle Software CDK. +Oct 16, 1997 V2.07 Added PortNum property with numeric value for Port. + Added RcvdCount property to return the number of + characters received in the buffer but not read yet. Do not + confuse with ReadCount which returns the number of chars + already received. + Added a check for FWait assignation in front of ReadLine + Prefixed each TSocketState value by 'ws' to avoid name conflict. + Moved FHSocket member to private section because the property + HSocket does the right job. + Added a check for state closed when changing Port, Proto and Addr. +Oct 22, 1997 V2.08 Added Flush method (asked by john@nexnix.co.uk) and + FlushTimeout property (default to 60 seconds). +Oct 22, 1997 V2.09 Added SendFlags property to enable sending in or out of + band data (normal or urgent, see RFC-1122) +Oct 28, 1997 V2.10 Added an OnLineTooLong event and code to handle the case + where ReadLine has been called and the buffer overflowed (line + long) +Oct 29, 1997 V2.11 Added DnsLookup functionnality (DnsLookup method, DnsResult + property and DnsLookupDone event). + Calling the connect method with a hostname work well except that + it could block for a long period (ie: 2 minutes) if DNS do not + respond. Calling the connect method with a numeric IP address will + never block. So you can call DnsLookup to start hostname + resolution in the background, after some time you evenutually + receive the OnDnsLookupDone event. The copy the DnsResult property + to the Addr property and call connect. +Oct 30, 1997 V2.12 added a check in DnsLookup to handel numeric IP which do + not require any lookup. The numeric IP is treated immediately + and immediately trigger the DnsLookupDone event. + I modified the code to be compatible with Delphi 1. +Oct 31, 1997 V2.13 added CancelDnsLookup procedure. +Nov 09, 1997 V2.14 add LocalIPList function to get the list of local IP + addresses (you have two IP addresses when connected to a LAN + and an ISP). +Nov 11, 1997 V2.15 Made TCustomWSocket with virtual functions. This will + allow to easily descend a new component from TCustomWSocket. + Make ReadLine stop when the connection is broken. +Nov 12, 1997 V2.16 Corrected bug (Justin Yunke ) + in LocalIPList: phe should be checked for nil. +Nov 18, 1997 Added ReceiveStr function (Suggested by FLDKNHA@danisco.com) +Nov 30, 1997 V2.18 Added a call to OnDnsLookupDone when canceling. +Dec 04, 1997 V2.19 Added LocalPort property and SessionConnected event + for UDP socket. + V2.20 Modified MessageLoop and ProcessMessages to process not + only the socket messages, but all messages (necessary if the + thread has several TWSocket for example). +Dec 09, 1997 V2.21 Corrected a minor bug in ReceiveStr. Detected by + david@e.co.za (David Butler). +Dec 10, 1997 V2.22 Corrected a minor bug in Send which now correctly + returns the number of bytes sent. Detected by + james.huggins@blockbuster.com +Dec 16, 1997 V2.23 Corrected a bug which prevented the receiving of datagram + from a UDP socket. + Thank to Mark Melvin (melvin@misrg.ml.org) for pointing it. +Dec 20, 1997 V2.24 Added the PeekData function as suggested by Matt Rose + mcrose@avproinc.com +Dec 26, 1997 V2.25 Added the Text property as suggested by Daniel P. Stasinski + . Made GetXPort work even when listening as + suggested by is81024@cis.nctu.edu.tw. +Jan 10, 1998 V2.26 Check for null hostname in DNSLookup + Added DnsResultList with all IP addresses returned form DNS +Jan 13, 1998 V2.27 a Added MultiThreaaded property to tell the component that + it is working in a thread and should take care of it (call + internal ProcessMessages in place of Application.ProcessMessages, + and do not use the WaitCtrl object). +Jan 15, 1998 V2.28 WMAsyncSelect revisited to work properly with NT winsock 2. +Feb 10, 1998 V2.29 Added an OnError event. If not assigned, then the component + raise an exception when the error occurs. +Feb 14, 1998 V2.30 Published Text property +Feb 16, 1998 V2.31 Added virtual methods to trigger events + Renamed all event handler variable to begin with FOn +Feb 26, 1998 V2.32 Added procedure PutDataInSendBuffer and PutStringInSendBuffer + Using PutDataInSendBuffer you can place data in the send buffer + without actualy trying to send it. This allows to place several + (probably small) data chunk before the component attempt to send + it. This prevent small packet to be sent. You can call + Send(nil, 0) to force the component to begin to send data. + If the buffer was not empty, PutDataInSendBuffer will just queue + data to the buffer. This data will be sent in sequence. +Mar 02, 1998 V2.33 Changed the error check with WSAstartup as pointed out by + Donald Strenczewilk (dstrenz@servtech.com) +Mar 06, 1998 V2.34 Added a runtime property to change the buffer size. +Mar 27, 1998 V2.35 Adapted for C++Builder 3 +Apr 08, 1998 V2.36 Made SetDefaultValue virtual +Apr 13, 1998 V2.37 Reset FDnsLookupHandle to 0 after a failed call to + WSACancelAsyncRequest +Apr 22, 1998 V2.38 Published AllSent property to let outside know if our + buffer has some data unsent. +Apr 28, 1998 V2.39 Added LingerOnOff and LingerTimeout. Default values are + wsLingerOn and timeout = 0 to behave by default as before. + This value is setup just before Connect. Call SetLingerOption to + set the linger option on the fly (the connection must be + established to set the option). See winsock.closesocket on line + help (winsock.hlp or win32.hlp) for a dsicussion of this option + usage. +May 06, 1998 V2.40 Added a workaround for Trumpet winsock inet_addr bug. + Thanks to Andrej Cuckov for his code. +May 18, 1998 V2.41 Jan Tomasek found that Trumpet + Winsock (Win 3.11) has some bugs and suggested a workaround in + TryToSend procedure. This workaround makes TWSocket blocking in + some cases. A new property enables the workaround. See code. +Jun 01, 1998 V2.42 In finalization section, check for not assigned IPList. +Jun 15, 1998 V2.43 Added code to finalization section to unload winsock if + still loaded at that point (this happend if no socket where + created but WinsockInfo called). Suggested by Daniel Fazekas + +Jun 27, 1998 V2.44 Added checks for valid arguments in SetPort, SetProto + and SetAddr. Deferred address resolution until Connect or Listen. +Jul 08, 1998 V2.45 Adadpted for Delphi 4 +Jul 20, 1998 V2.46 Added SetWindowLong(FWindowHandle, 0, 0) in the destructor + and a check for TWSocket class in XSocketWindowProc. + Added virtual method RealSend. +Jul 23, 1998 V2.47 Added a TriggerSessionClosed from TryToSend in case of + send error. This was called before, but with a nul error argument. + Now it correctly gives the error number. + Added a trashcan to receive data if no OnDataAvailable event + handler is installed. Just receive the data and throw it away. + Added reverse dns lookup asynchronous code (IP -> HostName). + Thanks to Daniel Fazekas for his code. +Jul 30, 1998 V2.48 Changed local variable "error" by FLastError in SocketError + to make it available from the OnError handler. Thanks to + dana@medical-info.com for finding this bug. + In Abort procedure, deleted all buffered data because it was send + the next time the socket is opened ! + Added CancelDnsLookup in Abort procedure. +Aug 28, 1998 V2.49 Made InternalClose and ReceiveStr virtual +Sep 01, 1998 V2.50 Ignore CancelDnsLookup exception during destroy +Sep 29, 1998 V2.51 In InternalClose, protect AssignDefaultValue with + try/except because SessionClosed event handler may have destroyed + the component. +Oct 11, 1998 V2.52 Changed Shutdown(2) to Shutdown(1) in Internal Close to + prevent data lost on send. You may have to call Shutdown(2) in + your own code before calling Close to have the same behaviour as + before. + Changed argument type for ASyncReceive and passed 0 from FD_CLOSE + message handler. +Oct 28, 1998 V2.53 Made WSocketLoadWinsock and WSocketUnloadWinsock public. +Nov 11, 1998 V2.54 Added OnDisplay event for debugging purpose +Nov 16, 1998 V2.55 Ignore WSANOTINITIALIZED error calling CloseSocket. This + occurs when using TWSocket from a DLL and the finalization + section is called before destroying TWSocket components (this is + a program logic error). + Made some properties and methods protected instead of private. + Made some methods virtual. + Added an Error argument to InternalClose. + Added DoRecv virtual function. + Added WSocketResolvePort + Added WSocketResolveProto + Deferred port and protocol resolution until really needed + Transformed Listen to procedure (in case of failure Listen + always calls SocketError which triggers an exception or the + OnError event). +Nov 22, 1998 V3.00 Skipped from V2.55 to V3.00. Socks support is major update! + Added SOCKS5 support for TCP connection and simple usercode + paswword authentication. Consider the socks code as beta ! + New properties: SocksServer, SocksPort, SocksUsercode, + SocksPassword, FSocksAuthentication. New events: OnSocksError, + OnSocksConnected, OnSocksAuthState. + I used WinGate 2.1d to test my code. Unfortunately WinGate do + not correctly handle user authentication, so the code here is + just untested... +Dec 05, 1998 V3.10 Removed ReadLine feature using TWait component. + Added new TCustomLineWSocket and TCustomSyncWSocket. + Those modifications implies that the ReadLine functionnality is + slightly changed. Notably, the end of line marker is now + configurable and remains in the received line unless a timeout + occurs or the buffer is too small. +Dec 10, 1998 V3.11 Added missing code to resolve port in the Listen method. +Dec 12, 1998 V3.12 Added write method for LocalPort property. Thanks to + Jan Tomasek for his code. + Added background exception handling. + Fixed a bug in TCustomLineWSocket.TriggerDataAvailable which was + not calling the inherited function when it actually should. + Added a check on multithreaded in WaitForClose to call the + correct ProcessMessages procedure. + Added SOCKS4 support (only tcp connect is supported). +Dec 28, 1998 V3.13 Changed WSocketResolveHost to check for invalid numeric + IP addresses whitout trying to use them as hostnames. +Dec 30, 1998 V3.14 Changed SetPort to SetRemotePort to solve the SetPort + syndrome with BCB. Also chnaged GetPort to be consistant. +Jan 12, 1999 V3.15 Introduced DoRecvFrom virtual function. This correct a bug + introduced in V3.14 related to UDP and RecvFrom. +Jan 23, 1999 V3.16 Changed FRcvdFlag computation in DoRecv and DoRecvFrom + because it caused problems with HTTP component and large blocks. + Removed modification by Jan Tomasek in TriggerDataAvailable +Jan 30, 1999 V3.17 Added WSocketResolveIp function. + Checked for tcp protocol before setting linger off in abort. + Moved a lot of variables from private to protected sections. + Removed check for Assigned(FOnDataSent) in WMASyncSelect. +Feb 03, 1999 V3.18 Removed useless units in the uses clause. +Feb 14, 1999 V4.00 Jump to next major version number because lots of + fundamental changes have been done. See below. + + Use runtime dynamic link with winsock. All winsock functions + used by TWSocket are linked at runtime instead of loadtime. This + allows programs to run without winsock installed, provided program + doesn't try to use TWSocket or winsock function without first + checking for winsock installation. + Removed WSocketLoadWinsock and all use to DllStarted because it + is no longer necessary because winsock is automatically loaded + and initialized with the first call to a winsock function. + + Added MessagePump to centralize call to the message pump. + It is a virtual procedure so that you can override it to + cutomize your message pump. Also changed slightly ProcessMessages + to closely match what is done in the forms unit. + + Removed old stuff related to WaitCtrl (was already excluded from + compilation using a conditional directive). + + Added NOFORMS conditional compilation to exclude the Forms unit + from wsocket. This will reduce exe or dll size by 100 to 150KB. + To use this feature, you have to add NOFORMS in your project + options in the "defines" edit box in the "directory/conditional" + tab. Then you must add a message pump to your application and + call it from TWSocket.OnMessagePump event handler. TWSocket really + need a message pump in order to receive messages from winsock. + Depending on how your application is built, you can use either + TWSocket.MessageLoop or TWSocket.ProcessMessages to quickly build + a working message pump. Or you may build your own custom message + pump taylored to your needs. Your message pump must set + TWSocket.Terminated property to TRUE when your application + terminates or you may experience long delays when closing your + application. + You may use NOFORMS setting even if you use the forms unit (GUI + application). Simply call Application.ProcessMessages in the + OnMessagePump event handler. + OnMessagePump event is not visible in the object inspector. You + must assign it at run-time before using the component and after + having created it (in a GUI application you can do that in the + FormCreate event, in a console application, you can do it right + after TWSocket.Create call). +Feb 17, 1999 V4.01 Added LineEcho and LineEdit features. +Feb 27, 1999 V4.02 Added TCustomLineWSocket.GetRcvdCount to make RcvdCount + property and ReceiveStr work in line mode. +Mar 01, 1999 V4.03 Added conditional compile for BCB4. Thanks to James + Legg . +Mar 14, 1999 V4.04 Corrected a bug: wsocket hangup when there was no + OnDataAvailable handler and line mode was on. + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit WSocket; + +{$B-} { Enable partial boolean evaluation } +{$T-} { Untyped pointers } +{$IFNDEF VER80} { Not for Delphi 1 } + {$J+} { Allow typed constant to be modified } +{$ENDIF} +{$IFDEF VER110} { C++ Builder V3.0 } + {$ObjExportAll On} +{$ENDIF} + +interface + +uses + WinTypes, WinProcs, Messages, Classes, SysUtils, +{$IFNDEF NOFORMS} { See comments in history at 14/02/99 } + Forms, +{$ENDIF} + WSockBuf, WinSock; + +const + WSocketVersion = 403; + CopyRight : String = ' TWSocket (c) 96-99 F. Piette V4.03 '; + WM_ASYNCSELECT = WM_USER + 1; + WM_ASYNCGETHOSTBYNAME = WM_USER + 2; + WM_ASYNCGETHOSTBYADDR = WM_USER + 3; + WM_TRIGGER_DATA_AVAILABLE = WM_USER + 20; + WSA_WSOCKET_TIMEOUT = 12001; +{$IFDEF WIN32} + winsocket = 'wsock32.dll'; { 32 bits TCP/IP system DLL } +{$ELSE} + winsocket = 'winsock.dll'; { 16 bits TCP/IP system DLL } +{$ENDIF} + +type + ESocketException = class(Exception); + TBgExceptionEvent = procedure (Sender : TObject; + E : Exception; + var CanClose : Boolean) of object; + + TSocketState = (wsInvalidState, + wsOpened, wsBound, + wsConnecting, wsConnected, + wsAccepting, wsListening, + wsClosed); + TSocketSendFlags = (wsSendNormal, wsSendUrgent); + TSocketLingerOnOff = (wsLingerOff, wsLingerOn, wsLingerNoSet); + + TDataAvailable = procedure (Sender: TObject; Error: word) of object; + TDataSent = procedure (Sender: TObject; Error: word) of object; + TSessionClosed = procedure (Sender: TObject; Error: word) of object; + TSessionAvailable = procedure (Sender: TObject; Error: word) of object; + TSessionConnected = procedure (Sender: TObject; Error: word) of object; + TDnsLookupDone = procedure (Sender: TObject; Error: Word) of object; + TChangeState = procedure (Sender: TObject; + OldState, NewState : TSocketState) of object; + TDebugDisplay = procedure (Sender: TObject; var Msg : String) of object; + TWSocketSyncNextProc = procedure of object; +{$IFDEF VER110} { C++Builder V3 } + TSocket = integer; +{$ENDIF} + + TCustomWSocket = class(TComponent) + private + FDnsResult : String; + FDnsResultList : TStrings; + FASocket : TSocket; { Accepted socket } + FBufList : TList; + FBufSize : Integer; + FSendFlags : Integer; + FLastError : Integer; + FWindowHandle : HWND; + FDnsLookupBuffer : array [0..MAXGETHOSTSTRUCT] of char; + FDnsLookupHandle : THandle; + {$IFDEF VER80} + FTrumpetCompability : Boolean; + {$ENDIF} + protected + FHSocket : TSocket; + FAddrStr : String; + FAddrResolved : Boolean; + FAddrFormat : Integer; + FAddrAssigned : Boolean; + FProto : integer; + FProtoAssigned : Boolean; + FProtoResolved : Boolean; + FLocalPortResolved : Boolean; + FProtoStr : String; + FPortStr : String; + FPortAssigned : Boolean; + FPortResolved : Boolean; + FPortNum : Integer; + FLocalPortStr : String; + FLocalPortNum : Integer; + FType : integer; + FLingerOnOff : TSocketLingerOnOff; + FLingerTimeout : Integer; { In seconds, 0 = disabled } + ReadLineCount : Integer; + bWrite : Boolean; + nMoreCnt : Integer; + bMoreFlag : Boolean; + nMoreMax : Integer; + bAllSent : Boolean; + FReadCount : LongInt; + FPaused : Boolean; + FCloseInvoked : Boolean; + FFlushTimeout : Integer; + FMultiThreaded : Boolean; + FState : TSocketState; + FRcvdFlag : Boolean; + FTerminated : Boolean; + FOnSessionAvailable : TSessionAvailable; + FOnSessionConnected : TSessionConnected; + FOnSessionClosed : TSessionClosed; + FOnChangeState : TChangeState; + FOnDataAvailable : TDataAvailable; + FOnDataSent : TDataSent; + FOnLineTooLong : TNotifyEvent; + FOnDnsLookupDone : TDnsLookupDone; + FOnError : TNotifyEvent; + FOnBgException : TBgExceptionEvent; + FOnDisplay : TDebugDisplay; + FOnMessagePump : TNotifyEvent; + procedure WndProc(var MsgRec: TMessage); virtual; + procedure SocketError(sockfunc: string); + procedure WMASyncSelect(var msg: TMessage); message WM_ASYNCSELECT; + procedure WMAsyncGetHostByName(var msg: TMessage); message WM_ASYNCGETHOSTBYNAME; + procedure WMAsyncGetHostByAddr(var msg: TMessage); message WM_ASYNCGETHOSTBYADDR; + procedure ChangeState(NewState : TSocketState); + procedure TryToSend; + procedure ASyncReceive(Error : Word); + procedure AssignDefaultValue; virtual; + procedure InternalClose(bShut : Boolean; Error : Word); virtual; + procedure Notification(AComponent: TComponent; operation: TOperation); override; + procedure SetSendFlags(newValue : TSocketSendFlags); + function GetSendFlags : TSocketSendFlags; + procedure SetAddr(InAddr : String); + function GetAddr : String; + procedure SetRemotePort(sPort : String); virtual; + function GetRemotePort : String; + procedure SetLocalPort(sLocalPort : String); + procedure SetProto(sProto : String); virtual; + function GetProto : String; + function GetRcvdCount : LongInt; virtual; + procedure BindSocket; virtual; + procedure SendText(Str : String); + function RealSend(Data : Pointer; Len : Integer) : Integer; virtual; + procedure RaiseExceptionFmt(const Fmt : String; args : array of const); virtual; + procedure RaiseException(const Msg : String); virtual; + procedure HandleBackGroundException(E: Exception); virtual; + procedure TriggerDisplay(Msg : String); + function TriggerDataAvailable(Error : Word) : Boolean; virtual; + procedure TriggerSessionAvailable(Error : Word); virtual; + procedure TriggerSessionConnected(Error : Word); virtual; + procedure TriggerSessionClosed(Error : Word); virtual; + procedure TriggerDataSent(Error : Word); virtual; + procedure TriggerChangeState(OldState, NewState : TSocketState); virtual; + procedure TriggerDNSLookupDone(Error : Word); virtual; + procedure TriggerError; virtual; + function DoRecv(var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; virtual; + function DoRecvFrom(FHSocket : TSocket; + var Buffer; + BufferSize : Integer; + Flags : Integer; + var From : TSockAddr; + var FromLen : Integer) : Integer; virtual; + public + sin : TSockAddrIn; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Connect; virtual; + procedure Close; virtual; + procedure Abort; virtual; + procedure Flush; virtual; + procedure WaitForClose; virtual; + procedure Listen; virtual; + function Accept: TSocket; virtual; + function Receive(Buffer : Pointer; BufferSize: integer) : integer; virtual; + function ReceiveStr : string; virtual; + function ReceiveFrom(Buffer : Pointer; + BufferSize : Integer; + var From : TSockAddr; + var FromLen : Integer) : integer; virtual; + function PeekData(Buffer : Pointer; BufferSize: integer) : integer; + function Send(Data : Pointer; Len : Integer) : integer; virtual; + function SendTo(Dest : TSockAddr; + DestLen : Integer; + Data : Pointer; + Len : Integer) : integer; virtual; + function SendStr(Str : String) : Integer; virtual; + procedure DnsLookup(HostName : String); virtual; + procedure ReverseDnsLookup(HostAddr: String); virtual; + procedure CancelDnsLookup; virtual; + function GetPeerAddr: string; virtual; + function GetPeerName(var Name : TSockAddrIn; NameLen : Integer) : integer; virtual; + function GetXPort: string; virtual; + function TimerIsSet(var tvp : TTimeVal) : Boolean; virtual; + procedure TimerClear(var tvp : TTimeVal); virtual; + function TimerCmp(var tvp : TTimeVal; var uvp : TTimeVal; IsEqual : Boolean) : Boolean; virtual; + function GetSockName(var saddr : TSockAddrIn; var saddrlen : Integer) : integer; virtual; + procedure SetLingerOption; + procedure Dup(NewHSocket : TSocket); virtual; + procedure Shutdown(How : Integer); virtual; + procedure Pause; virtual; + procedure Resume; virtual; + procedure PutDataInSendBuffer(Data : Pointer; Len : Integer); + procedure PutStringInSendBuffer(Str : String); + procedure DeleteBufferedData; + procedure MessagePump; virtual; +{$IFNDEF VER80} + procedure MessageLoop; + function ProcessMessage : Boolean; + procedure ProcessMessages; +{$ENDIF} +{$IFDEF NOFORMS} + property Terminated : Boolean read FTerminated + write FTerminated; + property OnMessagePump : TNotifyEvent read FOnMessagePump + write FOnMessagePump; +{$ENDIF} + protected + property PortNum : Integer read FPortNum; + property Handle : HWND read FWindowHandle; + property HSocket : TSocket read FHSocket + write Dup; + + property Addr : string read GetAddr + write SetAddr; + property Port : string read GetRemotePort + write SetRemotePort; + property LocalPort : string read FLocalPortStr + write SetLocalPort; + property Proto : String read GetProto + write SetProto; + property MultiThreaded : Boolean read FMultiThreaded + write FMultiThreaded; + property DnsResult : String read FDnsResult; + property DnsResultList : TStrings read FDnsResultList; + property State : TSocketState read FState; + property AllSent : Boolean read bAllSent; + property ReadCount : LongInt read FReadCount; + property RcvdCount : LongInt read GetRcvdCount; + property LastError : Integer read FLastError; + property BufSize : Integer read FBufSize + write FBufSize; + property OnDataAvailable : TDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnDataSent : TDataSent read FOnDataSent + write FOnDataSent; + property OnSessionClosed : TSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnSessionAvailable : TSessionAvailable read FOnSessionAvailable + write FOnSessionAvailable; + property OnSessionConnected : TSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnChangeState : TChangeState read FOnChangeState + write FOnChangeState; + property OnLineTooLong : TNotifyEvent read FOnLineTooLong + write FOnLineTooLong; + property OnDnsLookupDone : TDnsLookupDone read FOnDnsLookupDone + write FOnDnsLookupDone; + property OnError : TNotifyEvent read FOnError + write FOnError; + property OnBgException : TBgExceptionEvent read FOnBgException + write FOnBgException; + + property FlushTimeout : Integer read FFlushTimeOut + write FFlushTimeout; + property SendFlags : TSocketSendFlags read GetSendFlags + write SetSendFlags; + property Text: String read ReceiveStr + write SendText; + property LingerOnOff : TSocketLingerOnOff read FLingerOnOff + write FLingerOnOff; + property LingerTimeout : Integer read FLingerTimeout + write FLingerTimeout; +{$IFDEF VER80} + property TrumpetCompability : Boolean read FTrumpetCompability + write FTrumpetCompability; +{$ENDIF} + property OnDisplay : TDebugDisplay read FOnDisplay + write FOnDisplay; + end; + + TSocksState = (socksData, socksNegociateMethods, socksAuthenticate, socksConnect); + TSocksAuthentication = (socksNoAuthentication, socksAuthenticateUsercode); + TSocksAuthState = (socksAuthStart, socksAuthSuccess, socksAuthFailure, socksAuthNotRequired); + TSocksAuthStateEvent = procedure(Sender : TObject; AuthState : TSocksAuthState) of object; + TSocksErrorEvent = procedure(Sender : TObject; Error : Integer; Msg : String) of Object; + + TCustomSocksWSocket = class(TCustomWSocket) + protected + FSocksState : TSocksState; + FSocksServer : String; + FSocksLevel : String; + FSocksPort : String; + FSocksPortAssigned : Boolean; + FSocksServerAssigned : Boolean; + FSocksUsercode : String; + FSocksPassword : String; + FSocksAuthentication : TSocksAuthentication; + FSocksAuthNumber : char; + FBoundAddr : String; + FBoundPort : String; + FRcvBuf : array [0..127] of char; + FRcvCnt : Integer; + FRcvdCnt : Integer; + FRcvdPtr : PChar; + FOnSocksError : TSocksErrorEvent; + FOnSocksConnected : TSessionConnected; + FOnSocksAuthState : TSocksAuthStateEvent; + procedure AssignDefaultValue; override; + procedure TriggerSessionConnected(Error : Word); override; + procedure TriggerSocksConnected(Error : Word); virtual; + procedure TriggerSessionClosed(Error : Word); override; + function TriggerDataAvailable(Error : Word) : Boolean; override; + procedure SetSocksPort(sPort : String); virtual; + procedure SetSocksServer(sServer : String); virtual; + procedure TriggerSocksError(Error : Integer; Msg : String); virtual; + procedure TriggerSocksAuthState(AuthState : TSocksAuthState); + function GetRcvdCount : LongInt; override; + procedure SetSocksLevel(newValue : String); + function DoRecv(var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; override; + procedure SocksDoConnect; + procedure SocksDoAuthenticate; + procedure DataAvailableError(ErrCode : Integer; Msg : String); + public + procedure Connect; override; + procedure Listen; override; + protected + property SocksServer : String read FSocksServer + write SetSocksServer; + property SocksLevel : String read FSocksLevel + write SetSocksLevel; + property SocksPort : String read FSocksPort + write SetSocksPort; + property SocksUsercode : String read FSocksUsercode + write FSocksUsercode; + property SocksPassword : String read FSocksPassword + write FSocksPassword; + property SocksAuthentication : TSocksAuthentication + read FSocksAuthentication + write FSocksAuthentication; + property OnSocksError : TSocksErrorEvent read FOnSocksError + write FOnSocksError; + property OnSocksConnected : TSessionConnected read FOnSocksConnected + write FOnSocksConnected; + property OnSocksAuthState : TSocksAuthStateEvent + read FOnSocksAuthState + write FOnSocksAuthState; + end; + + TCustomLineWSocket = class (TCustomSocksWSocket) + protected + FRcvdPtr : PChar; + FRcvBufSize : Integer; + FRcvdCnt : Integer; + FLineEnd : String; + FLineMode : Boolean; + FLineLength : Integer; { When a line is available } + FLineReceivedFlag : Boolean; + FLineEcho : Boolean; { Echo received data } + FLineEdit : Boolean; { Edit received data } + FTimeout : LongInt; { Given in milliseconds } + FTimeStop : LongInt; { Milliseconds } + procedure WndProc(var MsgRec: TMessage); override; + procedure WMTriggerDataAvailable(var msg: TMessage); message WM_TRIGGER_DATA_AVAILABLE; + function TriggerDataAvailable(Error : Word) : Boolean; override; + procedure TriggerSessionClosed(Error : Word); override; + procedure SetLineMode(newValue : Boolean); virtual; + procedure EditLine(var Len : Integer); virtual; + function GetRcvdCount : LongInt; override; + function DoRecv(var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + property LineLength : Integer read FLineLength; + published + property LineMode : Boolean read FLineMode + write SetLineMode; + property LineEnd : String read FLineEnd + write FLineEnd; + property LineEcho : Boolean read FLineEcho + write FLineEcho; + property LineEdit : Boolean read FLineEdit + write FLineEdit; + end; + + TCustomSyncWSocket = class(TCustomLineWSocket) + protected + FLinePointer : ^String; + function Synchronize(Proc : TWSocketSyncNextProc; var DoneFlag : Boolean) : Integer; virtual; + function WaitUntilReady(var DoneFlag : Boolean) : Integer; virtual; + procedure InternalDataAvailable(Sender: TObject; Error: Word); + public + procedure ReadLine(Timeout : integer; var Buffer : String); + end; + + TWSocket = class(TCustomSyncWSocket) + public + property PortNum; + property Handle; + property HSocket; + property BufSize; + property Text; + property AllSent; + {$IFDEF VER80} + property TrumpetCompability; + {$ENDIF} + property OnDisplay; + published + property Addr; + property Port; + property Proto; + property LocalPort; + property DnsResult; + property DnsResultList; + property State; + property ReadCount; + property RcvdCount; + property LastError; + property MultiThreaded; + property OnDataAvailable; + property OnDataSent; + property OnSessionClosed; + property OnSessionAvailable; + property OnSessionConnected; + property OnSocksConnected; + property OnChangeState; + property OnLineTooLong; + property OnDnsLookupDone; + property OnError; + property OnBgException; + property FlushTimeout; + property SendFlags; + property LingerOnOff; + property LingerTimeout; + property SocksLevel; + property SocksServer; + property SocksPort; + property SocksUsercode; + property SocksPassword; + property SocksAuthentication; + property OnSocksError; + property OnSocksAuthState; + end; + + TSocksWSocket = class(TWSocket) + end; + +procedure Register; + +function WinsockInfo : TWSADATA; +function WSocketErrorDesc(error: integer) : string; +function WSocketGetHostByAddr(Addr : String) : PHostEnt; +function WSocketGetHostByName(Name : String) : PHostEnt; +function LocalHostName : String; +function LocalIPList : TStrings; +function WSocketResolveIp(IpAddr : String) : String; +function WSocketResolveHost(InAddr : String) : TInAddr; +function WSocketResolvePort(Port : String; Proto : String) : Word; +function WSocketResolveProto(sProto : String) : integer; +procedure WSocketUnloadWinsock; +{ function WSocketLoadWinsock : Boolean; 14/02/99 } + +type +{$IFDEF VER80} + DWORD = LongInt; + TWSAStartup = function (wVersionRequired: word; + var WSData: TWSAData): Integer; + TWSACleanup = function : Integer; + TWSASetLastError = procedure (iError: Integer); + TWSAGetLastError = function : Integer; + TWSACancelAsyncRequest = function (hAsyncTaskHandle: THandle): Integer; + TWSAAsyncGetHostByName = function (HWindow: HWND; + wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; + TWSAAsyncGetHostByAddr = function (HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; + TWSAAsyncSelect = function (s: TSocket; + HWindow: HWND; + wMsg: u_int; + lEvent: Longint): Integer; + TGetServByName = function (name, proto: PChar): PServEnt; + TGetProtoByName = function (name: PChar): PProtoEnt; + TGetHostByName = function (name: PChar): PHostEnt; + TGetHostName = function (name: PChar; len: Integer): Integer; + TOpenSocket = function (af, Struct, protocol: Integer): TSocket; + TShutdown = function (s: TSocket; how: Integer): Integer; + TSetSockOpt = function (s: TSocket; level, optname: Integer; + optval: PChar; + optlen: Integer): Integer; + TGetSockOpt = function (s: TSocket; level, optname: Integer; optval: PChar; var optlen: Integer): Integer; + TSendTo = function (s: TSocket; var Buf; + len, flags: Integer; + var addrto: TSockAddr; + tolen: Integer): Integer; + TSend = function (s: TSocket; var Buf; + len, flags: Integer): Integer; + TRecv = function (s: TSocket; + var Buf; + len, flags: Integer): Integer; + TRecvFrom = function (s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; + Tntohs = function (netshort: u_short): u_short; + Tntohl = function (netlong: u_long): u_long; + TListen = function (s: TSocket; backlog: Integer): Integer; + TIoctlSocket = function (s: TSocket; cmd: DWORD; + var arg: u_long): Integer; + TInet_ntoa = function (inaddr: TInAddr): PChar; + TInet_addr = function (cp: PChar): u_long; + Thtons = function (hostshort: u_short): u_short; + Thtonl = function (hostlong: u_long): u_long; + TGetSockName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; + TGetPeerName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; + TConnect = function (s: TSocket; var name: TSockAddr; + namelen: Integer): Integer; + TCloseSocket = function (s: TSocket): Integer; + TBind = function (s: TSocket; var addr: TSockAddr; + namelen: Integer): Integer; + TAccept = function (s: TSocket; var addr: TSockAddr; + var addrlen: Integer): TSocket; +{$ELSE} + TWSAStartup = function (wVersionRequired: word; + var WSData: TWSAData): Integer; stdcall; + TWSACleanup = function : Integer; stdcall; + TWSASetLastError = procedure (iError: Integer); stdcall; + TWSAGetLastError = function : Integer; stdcall; + TWSACancelAsyncRequest = function (hAsyncTaskHandle: THandle): Integer; stdcall; + TWSAAsyncGetHostByName = function (HWindow: HWND; + wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; stdcall; + TWSAAsyncGetHostByAddr = function (HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; stdcall; + TWSAAsyncSelect = function (s: TSocket; + HWindow: HWND; + wMsg: u_int; + lEvent: Longint): Integer; stdcall; + TGetServByName = function (name, proto: PChar): PServEnt; stdcall; + TGetProtoByName = function (name: PChar): PProtoEnt; stdcall; + TGetHostByName = function (name: PChar): PHostEnt; stdcall; + TGetHostName = function (name: PChar; len: Integer): Integer; stdcall; + TOpenSocket = function (af, Struct, protocol: Integer): TSocket; stdcall; + TShutdown = function (s: TSocket; how: Integer): Integer; stdcall; + TSetSockOpt = function (s: TSocket; level, optname: Integer; + optval: PChar; + optlen: Integer): Integer; stdcall; + TGetSockOpt = function (s: TSocket; level, optname: Integer; + optval: PChar; + var optlen: Integer): Integer; stdcall; + TSendTo = function (s: TSocket; var Buf; + len, flags: Integer; + var addrto: TSockAddr; + tolen: Integer): Integer; stdcall; + TSend = function (s: TSocket; var Buf; + len, flags: Integer): Integer; stdcall; + TRecv = function (s: TSocket; + var Buf; + len, flags: Integer): Integer; stdcall; + TRecvFrom = function (s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; stdcall; + Tntohs = function (netshort: u_short): u_short; stdcall; + Tntohl = function (netlong: u_long): u_long; stdcall; + TListen = function (s: TSocket; + backlog: Integer): Integer; stdcall; + TIoctlSocket = function (s: TSocket; cmd: DWORD; + var arg: u_long): Integer; stdcall; + TInet_ntoa = function (inaddr: TInAddr): PChar; stdcall; + TInet_addr = function (cp: PChar): u_long; stdcall; + Thtons = function (hostshort: u_short): u_short; stdcall; + Thtonl = function (hostlong: u_long): u_long; stdcall; + TGetSockName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; stdcall; + TGetPeerName = function (s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; stdcall; + TConnect = function (s: TSocket; var name: TSockAddr; + namelen: Integer): Integer; stdcall; + TCloseSocket = function (s: TSocket): Integer; stdcall; + TBind = function (s: TSocket; var addr: TSockAddr; + namelen: Integer): Integer; stdcall; +{$IFDEF VER90} { Delphi 2 has a special definition} + TAccept = function (s: TSocket; var addr: TSockAddr; + var addrlen: Integer): TSocket; stdcall; +{$ELSE} + TAccept = function (s: TSocket; addr: PSockAddr; + addrlen: PInteger): TSocket; stdcall; +{$ENDIF} +{$ENDIF} + +var + FWSAStartup : TWSAStartup; + FWSACleanup : TWSACleanup; + FWSASetLastError : TWSASetLastError; + FWSAGetLastError : TWSAGetLastError; + FWSACancelAsyncRequest : TWSACancelAsyncRequest; + FWSAAsyncGetHostByName : TWSAAsyncGetHostByName; + FWSAAsyncGetHostByAddr : TWSAAsyncGetHostByAddr; + FWSAAsyncSelect : TWSAAsyncSelect; + FGetServByName : TGetServByName; + FGetProtoByName : TGetProtoByName; + FGetHostByName : TGetHostByName; + FGetHostName : TGetHostName; + FOpenSocket : TOpenSocket; + FShutdown : TShutdown; + FSetSockOpt : TSetSockOpt; + FGetSockOpt : TGetSockOpt; + FSendTo : TSendTo; + FSend : TSend; + FRecv : TRecv; + FRecvFrom : TRecvFrom; + Fntohs : Tntohs; + Fntohl : Tntohl; + FListen : TListen; + FIoctlSocket : TIoctlSocket; + FInet_ntoa : TInet_ntoa; + FInet_addr : TInet_addr; + Fhtons : Thtons; + Fhtonl : Thtonl; + FGetSockName : TGetSockName; + FGetPeerName : TGetPeerName; + FConnect : TConnect; + FCloseSocket : TCloseSocket; + FBind : TBind; + FAccept : TAccept; + +function WSocketGetProc(const ProcName : String) : Pointer; +function WSocket_WSAStartup(wVersionRequired: word; + var WSData: TWSAData): Integer; +function WSocket_WSACleanup : Integer; +procedure WSocket_WSASetLastError(iError: Integer); +function WSocket_WSAGetLastError: Integer; +function WSocket_WSACancelAsyncRequest(hAsyncTaskHandle: THandle): Integer; +function WSocket_WSAAsyncGetHostByName(HWindow: HWND; wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; +function WSocket_WSAAsyncGetHostByAddr(HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; +function WSocket_WSAAsyncSelect(s: TSocket; HWindow: HWND; wMsg: u_int; lEvent: Longint): Integer; +function WSocket_recv(s: TSocket; + var Buf; len, flags: Integer): Integer; +function WSocket_recvfrom(s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; +function WSocket_getservbyname(name, proto: PChar): PServEnt; +function WSocket_getprotobyname(name: PChar): PProtoEnt; +function WSocket_gethostbyname(name: PChar): PHostEnt; +function WSocket_gethostname(name: PChar; len: Integer): Integer; +function WSocket_socket(af, Struct, protocol: Integer): TSocket; +function WSocket_shutdown(s: TSocket; how: Integer): Integer; +function WSocket_setsockopt(s: TSocket; level, optname: Integer; optval: PChar; + optlen: Integer): Integer; +function WSocket_getsockopt(s: TSocket; level, optname: Integer; optval: PChar; + var optlen: Integer): Integer; +function WSocket_sendto(s: TSocket; var Buf; len, flags: Integer; + var addrto: TSockAddr; + tolen: Integer): Integer; +function WSocket_send(s: TSocket; var Buf; len, flags: Integer): Integer; +function WSocket_ntohs(netshort: u_short): u_short; +function WSocket_ntohl(netlong: u_long): u_long; +function WSocket_listen(s: TSocket; backlog: Integer): Integer; +function WSocket_ioctlsocket(s: TSocket; cmd: DWORD; var arg: u_long): Integer; +function WSocket_inet_ntoa(inaddr: TInAddr): PChar; +function WSocket_inet_addr(cp: PChar): u_long; +function WSocket_htons(hostshort: u_short): u_short; +function WSocket_htonl(hostlong: u_long): u_long; +function WSocket_getsockname(s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; +function WSocket_getpeername(s: TSocket; var name: TSockAddr; + var namelen: Integer): Integer; +function WSocket_connect(s: TSocket; var name: TSockAddr; + namelen: Integer): Integer; +function WSocket_closesocket(s: TSocket): Integer; +function WSocket_bind(s: TSocket; var addr: TSockAddr; namelen: Integer): Integer; +{$IFDEF VER80} +function WSocket_accept(s: TSocket; var addr: TSockAddr; var addrlen: Integer): TSocket; +{$ELSE} +{$IFDEF VER90} +function WSocket_accept(s: TSocket; var addr: TSockAddr; var addrlen: Integer): TSocket; +{$ELSE} +function WSocket_accept(s: TSocket; addr: PSockAddr; addrlen: PInteger): TSocket; +{$ENDIF} +{$ENDIF} + +implementation + +const + GSocketCount : integer = 0; +{ DllStarted : Boolean = FALSE; 14/02/99} + FDllHandle : THandle = 0; + FDllName : String = winsocket; + socksNoError = 20000; + socksProtocolError = 20001; + socksVersionError = 20002; + socksAuthMethodError = 20003; + socksGeneralFailure = 20004; + socksConnectionNotAllowed = 20005; + socksNetworkUnreachable = 20006; + socksHostUnreachable = 20007; + socksConnectionRefused = 20008; + socksTtlExpired = 20009; + socksUnknownCommand = 20010; + socksUnknownAddressType = 20011; + socksUnassignedError = 20012; + socksInternalError = 20013; + socksDataReceiveError = 20014; + socksAuthenticationFailed = 20015; + socksRejectedOrFailed = 20016; + socksHostResolutionFailed = 20017; + +var + GInitData : TWSADATA; + IPList : TStrings; + +procedure Register; +begin + RegisterComponents('FPiette', [TWSocket]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +procedure SetLength(var S: string; NewLength: Integer); +begin + S[0] := chr(NewLength); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function atoi(value : string) : Integer; +var + i : Integer; +begin + Result := 0; + i := 1; + while (i <= Length(Value)) and (Value[i] = ' ') do + i := i + 1; + while (i <= Length(Value)) and (Value[i] >= '0') and (Value[i] <= '9')do begin + Result := Result * 10 + ord(Value[i]) - ord('0'); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function IsDigit(Ch : Char) : Boolean; +begin + Result := (ch >= '0') and (ch <= '9'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +function TrimRight(Str : String) : String; +var + i : Integer; +begin + i := Length(Str); + while (i > 0) and (Str[i] = ' ') do + i := i - 1; + Result := Copy(Str, 1, i); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TrimLeft(Str : String) : String; +var + i : Integer; +begin + if Str[1] <> ' ' then + Result := Str + else begin + i := 1; + while (i <= Length(Str)) and (Str[i] = ' ') do + i := i + 1; + Result := Copy(Str, i, Length(Str) - i + 1); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function Trim(Str : String) : String; +begin + Result := TrimLeft(TrimRight(Str)); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.RaiseException(const Msg : String); +begin + if Assigned(FOnError) then + TriggerError + else + raise ESocketException.Create(Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.RaiseExceptionFmt(const Fmt : String; args : array of const); +begin + if Assigned(FOnError) then + TriggerError + else + raise ESocketException.CreateFmt(Fmt, args); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF NEVER} { 14/02/99 } +function LoadWinsock(FileName : PChar) : Boolean; +var + LastError : LongInt; +begin + if not DllStarted then begin + LastError := WSocket_WSAStartup($101, GInitData); + if LastError <> 0 then begin + raise ESocketException.CreateFmt('%s: WSAStartup error #%d', + [FileName, LastError]); + end; + DllStarted := TRUE; + end; + Result := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketLoadWinsock : Boolean; +begin + Result := LoadWinsock(winsocket); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure WSocketUnloadWinsock; +begin +{$IFDEF NEVER} { 14/02/99 } + if DllStarted then begin + DllStarted := FALSE; + WSocket_WSACleanup; + end; +{$ENDIF} + if FDllHandle <> 0 then begin + WSocket_WSACleanup; + FreeLibrary(FDllHandle); + FDllHandle := 0; + FWSAStartup := nil; + FWSACleanup := nil; + FWSASetLastError := nil; + FWSAGetLastError := nil; + FWSACancelAsyncRequest := nil; + FWSAAsyncGetHostByName := nil; + FWSAAsyncGetHostByAddr := nil; + FWSAAsyncSelect := nil; + FGetServByName := nil; + FGetProtoByName := nil; + FGetHostByName := nil; + FGetHostName := nil; + FOpenSocket := nil; + FShutdown := nil; + FSetSockOpt := nil; + FGetSockOpt := nil; + FSendTo := nil; + FSend := nil; + FRecv := nil; + FRecvFrom := nil; + Fntohs := nil; + Fntohl := nil; + FListen := nil; + FIoctlSocket := nil; + FInet_ntoa := nil; + FInet_addr := nil; + Fhtons := nil; + Fhtonl := nil; + FGetSockName := nil; + FGetPeerName := nil; + FConnect := nil; + FCloseSocket := nil; + FBind := nil; + FAccept := nil; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketGetProc(const ProcName : String) : Pointer; +{$IFDEF VER80} +var + Error : THandle; + Buf : String; + LastError : LongInt; +begin + if FDllHandle = 0 then begin + { Delphi 1 strings are not nul terminated } + Buf := FDllName + #0; + FDllHandle := LoadLibrary(@Buf[1]); + if FDllHandle < HINSTANCE_ERROR then begin + Error := FDllHandle; + FDllHandle := 0; + raise ESocketException.Create('Unable to load ' + FDllName + + ' Error #' + IntToStr(Error)); + end; + LastError := WSocket_WSAStartup($101, GInitData); + if LastError <> 0 then begin + raise ESocketException.CreateFmt('%s: WSAStartup error #%d', + [FDllName, LastError]); + end; + end; + if Length(ProcName) = 0 then + Result := nil + else begin + { Delphi 1 strings are not nul terminated } + Buf := ProcName + #0; + Result := GetProcAddress(FDllHandle, @Buf[1]); + if Result = nil then + raise ESocketException.Create('Procedure ' + ProcName + + ' not found in ' + FDllName); + end; +end; +{$ELSE} +var + LastError : LongInt; +begin + if FDllHandle = 0 then begin + FDllHandle := LoadLibrary(@FDllName[1]); + if FDllHandle = 0 then + raise ESocketException.Create('Unable to load ' + FDllName + + ' Error #' + IntToStr(GetLastError)); + LastError := WSocket_WSAStartup($101, GInitData); + if LastError <> 0 then begin + raise ESocketException.CreateFmt('%s: WSAStartup error #%d', + [FDllName, LastError]); + end; + end; + if Length(ProcName) = 0 then + Result := nil + else begin + Result := GetProcAddress(FDllHandle, @ProcName[1]); + if Result = nil then + raise ESocketException.Create('Procedure ' + ProcName + + ' not found in ' + winsocket + + ' Error #' + IntToStr(GetLastError)); + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAStartup( + wVersionRequired: word; + var WSData: TWSAData): Integer; +begin + if @FWSAStartup = nil then + @FWSAStartup := WSocketGetProc('WSAStartup'); + Result := FWSAStartup(wVersionRequired, WSData); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSACleanup : Integer; +begin + if @FWSACleanup = nil then + @FWSACleanup := WSocketGetProc('WSACleanup'); + Result := FWSACleanup; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure WSocket_WSASetLastError(iError: Integer); +begin + if @FWSASetLastError = nil then + @FWSASetLastError := WSocketGetProc('WSASetLastError'); + FWSASetLastError(iError); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAGetLastError: Integer; +begin + if @FWSAGetLastError = nil then + @FWSAGetLastError := WSocketGetProc('WSAGetLastError'); + Result := FWSAGetLastError; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSACancelAsyncRequest(hAsyncTaskHandle: THandle): Integer; +begin + if @FWSACancelAsyncRequest = nil then + @FWSACancelAsyncRequest := WSocketGetProc('WSACancelAsyncRequest'); + Result := FWSACancelAsyncRequest(hAsyncTaskHandle); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAAsyncGetHostByName( + HWindow: HWND; wMsg: u_int; + name, buf: PChar; + buflen: Integer): THandle; +begin + if @FWSAAsyncGetHostByName = nil then + @FWSAAsyncGetHostByName := WSocketGetProc('WSAAsyncGetHostByName'); + Result := FWSAAsyncGetHostByName(HWindow, wMsg, name, buf, buflen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAAsyncGetHostByAddr( + HWindow: HWND; + wMsg: u_int; addr: PChar; + len, Struct: Integer; + buf: PChar; + buflen: Integer): THandle; +begin + if @FWSAAsyncGetHostByAddr = nil then + @FWSAAsyncGetHostByAddr := WSocketGetProc('WSAAsyncGetHostByAddr'); + Result := FWSAAsyncGetHostByAddr(HWindow, wMsg, addr, len, struct, buf, buflen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_WSAAsyncSelect( + s: TSocket; + HWindow: HWND; + wMsg: u_int; + lEvent: Longint): Integer; +begin + if @FWSAAsyncSelect = nil then + @FWSAAsyncSelect := WSocketGetProc('WSAAsyncSelect'); + Result := FWSAAsyncSelect(s, HWindow, wMsg, lEvent); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getservbyname(name, proto: PChar): PServEnt; +begin + if @Fgetservbyname = nil then + @Fgetservbyname := WSocketGetProc('getservbyname'); + Result := Fgetservbyname(name, proto); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getprotobyname(name: PChar): PProtoEnt; +begin + if @Fgetprotobyname = nil then + @Fgetprotobyname := WSocketGetProc('getprotobyname'); + Result := Fgetprotobyname(name); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_gethostbyname(name: PChar): PHostEnt; +begin + if @Fgethostbyname = nil then + @Fgethostbyname := WSocketGetProc('gethostbyname'); + Result := Fgethostbyname(name); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_gethostname(name: PChar; len: Integer): Integer; +begin + if @Fgethostname = nil then + @Fgethostname := WSocketGetProc('gethostname'); + Result := Fgethostname(name, len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_socket(af, Struct, protocol: Integer): TSocket; +begin + if @FOpenSocket= nil then + @FOpenSocket := WSocketGetProc('socket'); + Result := FOpenSocket(af, Struct, protocol); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_shutdown(s: TSocket; how: Integer): Integer; +begin + if @FShutdown = nil then + @FShutdown := WSocketGetProc('shutdown'); + Result := FShutdown(s, how); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_setsockopt(s: TSocket; level, optname: Integer; optval: PChar; + optlen: Integer): Integer; +begin + if @FSetSockOpt = nil then + @FSetSockOpt := WSocketGetProc('setsockopt'); + Result := FSetSockOpt(s, level, optname, optval, optlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getsockopt( + s: TSocket; level, optname: Integer; + optval: PChar; var optlen: Integer): Integer; +begin + if @FGetSockOpt = nil then + @FGetSockOpt := WSocketGetProc('getsockopt'); + Result := FGetSockOpt(s, level, optname, optval, optlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_sendto( + s: TSocket; + var Buf; + len, flags: Integer; + var addrto: TSockAddr; + tolen: Integer): Integer; +begin + if @FSendTo = nil then + @FSendTo := WSocketGetProc('sendto'); + Result := FSendTo(s, Buf, len, flags, addrto, tolen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_send(s: TSocket; var Buf; len, flags: Integer): Integer; +begin + if @FSend = nil then + @FSend := WSocketGetProc('send'); + Result := FSend(s, Buf, len, flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_ntohs(netshort: u_short): u_short; +begin + if @Fntohs = nil then + @Fntohs := WSocketGetProc('ntohs'); + Result := Fntohs(netshort); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_ntohl(netlong: u_long): u_long; +begin + if @Fntohl = nil then + @Fntohl := WSocketGetProc('ntohl'); + Result := Fntohl(netlong); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_listen(s: TSocket; backlog: Integer): Integer; +begin + if @FListen = nil then + @FListen := WSocketGetProc('listen'); + Result := FListen(s, backlog); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_ioctlsocket(s: TSocket; cmd: DWORD; var arg: u_long): Integer; +begin + if @FIoctlSocket = nil then + @FIoctlSocket := WSocketGetProc('ioctlsocket'); + Result := FIoctlSocket(s, cmd, arg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_inet_ntoa(inaddr: TInAddr): PChar; +begin + if @FInet_ntoa = nil then + @FInet_ntoa := WSocketGetProc('inet_ntoa'); + Result := FInet_ntoa(inaddr); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_inet_addr(cp: PChar): u_long; +begin + if @FInet_addr = nil then + @FInet_addr := WSocketGetProc('inet_addr'); + Result := FInet_addr(cp); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_htons(hostshort: u_short): u_short; +begin + if @Fhtons = nil then + @Fhtons := WSocketGetProc('htons'); + Result := Fhtons(hostshort); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_htonl(hostlong: u_long): u_long; +begin + if @Fhtonl = nil then + @Fhtonl := WSocketGetProc('htonl'); + Result := Fhtonl(hostlong); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getsockname( + s: TSocket; + var name: TSockAddr; + var namelen: Integer): Integer; +begin + if @FGetSockName = nil then + @FGetSockName := WSocketGetProc('getsockname'); + Result := FGetSockName(s, name, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_getpeername( + s: TSocket; + var name: TSockAddr; + var namelen: Integer): Integer; +begin + if @FGetPeerName = nil then + @FGetPeerName := WSocketGetProc('getpeername'); + Result := FGetPeerName(s, name, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_connect( + s: TSocket; + var name: TSockAddr; + namelen: Integer): Integer; +begin + if @FConnect= nil then + @FConnect := WSocketGetProc('connect'); + Result := FConnect(s, name, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_closesocket(s: TSocket): Integer; +begin + if @FCloseSocket = nil then + @FCloseSocket := WSocketGetProc('closesocket'); + Result := FCloseSocket(s); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_bind( + s: TSocket; + var addr: TSockAddr; + namelen: Integer): Integer; +begin + if @FBind = nil then + @FBind := WSocketGetProc('bind'); + Result := FBind(s, addr, namelen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_accept( + s: TSocket; +{$IFDEF VER80} { Delphi 1 } + var addr: TSockAddr; + var addrlen: Integer): TSocket; +{$ELSE} +{$IFDEF VER90} { Delphi 2 } + var addr: TSockAddr; + var addrlen: Integer): TSocket; +{$ELSE}{ Delphi 3/4 } + addr: PSockAddr; + addrlen: PInteger): TSocket; +{$ENDIF} +{$ENDIF} +begin + if @FAccept = nil then + @FAccept := WSocketGetProc('accept'); + Result := FAccept(s, addr, addrlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_recv(s: TSocket; var Buf; len, flags: Integer): Integer; +begin + if @FRecv= nil then + @FRecv := WSocketGetProc('recv'); + Result := FRecv(s, Buf, len, flags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocket_recvfrom( + s: TSocket; + var Buf; len, flags: Integer; + var from: TSockAddr; + var fromlen: Integer): Integer; +begin + if @FRecvFrom = nil then + @FRecvFrom := WSocketGetProc('recvfrom'); + Result := FRecvFrom(s, Buf, len, flags, from, fromlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WinsockInfo : TWSADATA; +begin +{ LoadWinsock(winsocket); 14/02/99 } + { Load winsock and initialize it as needed } + WSocketGetProc(''); + Result := GInitData; + + { If no socket created, then unload winsock immediately } + if GSocketCount <= 0 then + WSocketUnloadWinsock; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Notification(AComponent: TComponent; operation: TOperation); +begin + inherited Notification(AComponent, operation); + if operation = opRemove then begin + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.AssignDefaultValue; +begin + FillChar(sin, 0, Sizeof(sin)); + sin.sin_family := AF_INET; + FAddrFormat := PF_INET; + + FPortAssigned := FALSE; + FAddrAssigned := FALSE; + FAddrResolved := FALSE; + FPortResolved := FALSE; + FProtoResolved := FALSE; + FLocalPortResolved := FALSE; + + FProtoAssigned := TRUE; + FProto := IPPROTO_TCP; + FProtoStr := 'tcp'; + FType := SOCK_STREAM; + FLocalPortStr := '0'; + + FLingerOnOff := wsLingerOn; + FLingerTimeout := 0; + FHSocket := INVALID_SOCKET; + FState := wsClosed; + bMoreFlag := FALSE; + nMoreCnt := 0; + nMoreMax := 24; + bWrite := FALSE; + bAllSent := TRUE; + FPaused := FALSE; + FReadCount := 0; + FCloseInvoked := FALSE; + FFlushTimeout := 60; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ All exceptions *MUST* be handled. If an exception is not handled, the } +{ application will be shut down ! } +procedure TCustomWSocket.HandleBackGroundException(E: Exception); +var + CanAbort : Boolean; +begin + CanAbort := TRUE; + { First call the error event handler, if any } + if Assigned(FOnBgException) then begin + try + FOnBgException(Self, E, CanAbort); + except + end; + end; + { Then abort the socket } + if CanAbort then begin + try + Abort; + except + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure handle all messages for TWSocket. All exceptions must be } +{ handled or the application will be shutted down ! } +{ If WndProc is overriden in descendent components, then the same exception } +{ handling *MUST* be setup because descendent component code is executed } +{ before the base class code. } +procedure TCustomWSocket.WndProc(var MsgRec: TMessage); +begin + try + with MsgRec do begin + if Msg = WM_ASYNCSELECT then + WMASyncSelect(MsgRec) + else if Msg = WM_ASYNCGETHOSTBYNAME then + WMAsyncGetHostByName(MsgRec) + else if Msg = WM_ASYNCGETHOSTBYADDR then + WMAsyncGetHostByAddr(MsgRec) + else + Result := DefWindowProc(Handle, Msg, wParam, lParam); + end; + except + on E:Exception do + HandleBackGroundException(E); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFNDEF VER80} +{ This function is a callback function. It means that it is called by } +{ windows. This is the very low level message handler procedure setup to } +{ handle the message sent by windows (winsock) to handle messages. } +function XSocketWindowProc( + ahWnd : HWND; + auMsg : Integer; + awParam : WPARAM; + alParam : LPARAM): Integer; stdcall; +var + Obj : TObject; + MsgRec : TMessage; +begin + { At window creation asked windows to store a pointer to our object } + Obj := TObject(GetWindowLong(ahWnd, 0)); + + { If the pointer doesn't represent a TWSocket, just call the default procedure} + if not (Obj is TCustomWSocket) then + Result := DefWindowProc(ahWnd, auMsg, awParam, alParam) + else begin + { Delphi use a TMessage type to pass parameter to his own kind of } + { windows procedure. So we are doing the same... } + MsgRec.Msg := auMsg; + MsgRec.wParam := awParam; + MsgRec.lParam := alParam; + { May be a try/except around next line is needed. Not sure ! } + TWSocket(Obj).WndProc(MsgRec); + Result := MsgRec.Result; + end; +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.MessagePump; +begin +{$IFDEF NOFORMS} + { The Forms unit (TApplication object) has not been included. } + { We used either an external message pump or our internal message pump. } + { External message pump has to set Terminated property to TRUE when the } + { application is terminated. } + if Assigned(FOnMessagePump) then + FOnMessagePump(Self) + else + Self.ProcessMessages; +{$ELSE} +{$IFNDEF VER80} + { Delphi 1 doesn't support multithreading } + if FMultiThreaded then + Self.ProcessMessages + else +{$ENDIF} + Application.ProcessMessages; +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This function is very similar to TApplication.ProcessMessage } +{ You can also use it if your application has no TApplication object (Forms } +{ unit not referenced at all). } +{$IFNDEF VER80} +function TCustomWSocket.ProcessMessage : Boolean; +var + Msg : TMsg; +begin + Result := FALSE; + if PeekMessage(Msg, 0, 0, 0, PM_REMOVE) then begin + Result := TRUE; + if Msg.Message = WM_QUIT then + FTerminated := TRUE + else begin + TranslateMessage(Msg); + DispatchMessage(Msg); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Loop thru message processing until all messages are processed. } +{ This function is very similar to TApplication.ProcessMessage } +{ This is intended for multithreaded application using TWSocket. } +{ You can also use it if your application has no TApplication object (Forms } +{ unit not referenced at all). } +procedure TCustomWSocket.ProcessMessages; +begin + while Self.ProcessMessage do { loop }; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Loop thru message processing until the WM_QUIT message is received } +{ This is intended for multithreaded application using TWSocket. } +{ MessageLoop is different from ProcessMessages because it actually block } +{ if no message is available. The loop is broken when WM_QUIT is retrieved. } +procedure TCustomWSocket.MessageLoop; +var + MsgRec : TMsg; +begin + { If GetMessage retrieves the WM_QUIT, the return value is FALSE and } + { the message loop is broken. } + while GetMessage(MsgRec, 0, 0, 0) do begin + TranslateMessage(MsgRec); + DispatchMessage(MsgRec) + end; + FTerminated := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This global variable is used to store the windows class characteristic } +{ and is needed to register the window class used by TWSocket } +var + XSocketWindowClass: TWndClass = ( + style : 0; + lpfnWndProc : @XSocketWindowProc; + cbClsExtra : 0; + cbWndExtra : SizeOf(Pointer); + hInstance : 0; + hIcon : 0; + hCursor : 0; + hbrBackground : 0; + lpszMenuName : nil; + lpszClassName : 'XSocketWindowClass'); + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Allocate a window handle. This means registering a window class the first } +{ time we are called, and creating a new window each time we are called. } +function XSocketAllocateHWnd(Obj : TObject): HWND; +var + TempClass : TWndClass; + ClassRegistered : Boolean; +begin + { Check if the window class is already registered } + XSocketWindowClass.hInstance := HInstance; + ClassRegistered := GetClassInfo(HInstance, + XSocketWindowClass.lpszClassName, + TempClass); + if not ClassRegistered then begin + { Not yet registered, do it right now } + Result := WinProcs.RegisterClass(XSocketWindowClass); + if Result = 0 then + Exit; + end; + + { Now create a new window } + Result := CreateWindowEx(WS_EX_TOOLWINDOW, + XSocketWindowClass.lpszClassName, + '', { Window name } + WS_POPUP, { Window Style } + 0, 0, { X, Y } + 0, 0, { Width, Height } + 0, { hWndParent } + 0, { hMenu } + HInstance, { hInstance } + nil); { CreateParam } + + { if successfull, the ask windows to store the object reference } + { into the reserved byte (see RegisterClass) } + if (Result <> 0) and Assigned(Obj) then + SetWindowLong(Result, 0, Integer(Obj)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Free the window handle } +procedure XSocketDeallocateHWnd(Wnd: HWND); +begin + DestroyWindow(Wnd); +end; +{$ENDIF} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomWSocket.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + +{$IFDEF VER80} + { Delphi 16 bits has no thread, we can use the VCL } + FWindowHandle := AllocateHWnd(WndProc); +{$ELSE} + { Delphi 32 bits has threads and VCL is not thread safe. } + { We need to do our own way to be thread safe. } + FWindowHandle := XSocketAllocateHWnd(Self); +{$ENDIF} + + FBufList := TList.Create; + FBufSize := 1514; { Default buffer size } + FDnsResultList := TStringList.Create; + + AssignDefaultValue; + GSocketCount := GSocketCount + 1; +{ LoadWinsock(WINSOCKET);} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomWSocket.Destroy; +begin + try + CancelDnsLookup; { Cancel any pending dns lookup } + except + { Ignore any exception here } + end; + + if FState <> wsClosed then { Close the socket if not yet closed } + Close; + + GSocketCount := GSocketCount - 1; + if {**(not (csDesigning in ComponentState)) and **} +{ (DllStarted) and 14/02/99 } + (GSocketCount <= 0) then begin + WSocketUnloadWinsock; + GSocketCount := 0; + end; + + DeleteBufferedData; + FBufList.Free; + FDnsResultList.Free; + + { Remove the object reference from the window } + SetWindowLong(FWindowHandle, 0, 0); +{$IFDEF VER80} + DeallocateHWnd(FWindowHandle); +{$ELSE} + XSocketDeallocateHWnd(FWindowHandle); +{$ENDIF} + + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Dup(NewHSocket : TSocket); +var + iStatus : Integer; +begin + if (NewHSocket = 0) or (NewHSocket = INVALID_SOCKET) then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('Dup'); + Exit; + end; + + if FState <> wsClosed then begin + iStatus := WSocket_closesocket(FHSocket); + FHSocket := INVALID_SOCKET; + if iStatus <> 0 then begin + SocketError('Dup (closesocket)'); + Exit; + end; + + ChangeState(wsClosed); + end; + FHsocket := NewHSocket; + SetLingerOption; + + iStatus := WSocket_WSAASyncSelect( + FHSocket, Handle, WM_ASYNCSELECT, + FD_READ or FD_WRITE or FD_CLOSE or FD_CONNECT); + if iStatus <> 0 then begin + SocketError('WSAAsyncSelect'); + Exit; + end; + + ChangeState(wsConnected); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Get the number of char received and waiting to be read } +function TCustomWSocket.GetRcvdCount : LongInt; +begin + if WSocket_ioctlsocket(FHSocket, FIONREAD, Result) = SOCKET_ERROR then begin + Result := -1; + SocketError('ioctlSocket'); + Exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.ChangeState(NewState : TSocketState); +var + OldState : TSocketState; +begin + OldState := FState; + FState := NewState; + + TriggerChangeState(OldState, NewState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ DoRecv is a simple wrapper around winsock recv function to make it } +{ a virtual function. } +function TCustomWSocket.DoRecv( + var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; +begin + Result := WSocket_recv(FHSocket, Buffer, BufferSize, Flags); +{ FRcvdFlag := (Result > 0);} + { If we received the requested size, we may need to receive more } + FRcvdFlag := (Result >= BufferSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ The socket is non-blocking, so this routine will only receive as much } +{ data as it is available. } +function TCustomWSocket.Receive(Buffer : Pointer; BufferSize: integer) : integer; +begin + Result := DoRecv(Buffer^, BufferSize, 0); + if Result < 0 then + FLastError := WSocket_WSAGetLastError + else + FReadCount := FReadCount + Result; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Receive as much data as possible into a string } +{ You should avoid this function and use Receive. Using string will be } +{ much slower because data will be copied several times. } +{ ReceiveStr will *NOT* wait for a line to be received. It just read } +{ already received characters and return them as a string. } +function TCustomWSocket.ReceiveStr : string; +var + lCount : LongInt; +begin + SetLength(Result, 0); + lCount := GetRcvdCount; +{$IFDEF VER80} + { Delphi 1 strings are limited } + if lCount > High(Result) then + lCount := High(Result); +{$ENDIF} + if lCount > 0 then begin + SetLength(Result, lCount); + lCount := DoRecv(Result[1], lCount, 0); + if lCount > 0 then + SetLength(Result, lCount) + else + SetLength(Result, 0); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.DoRecvFrom( + FHSocket : TSocket; + var Buffer; + BufferSize : Integer; + Flags : Integer; + var From : TSockAddr; + var FromLen : Integer) : Integer; +begin + Result := WSocket_recvfrom(FHSocket, Buffer, BufferSize, + Flags, From, FromLen); +{ FRcvdFlag := (Result > 0); } + FRcvdFlag := (Result >= BufferSize); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.ReceiveFrom( + Buffer : Pointer; + BufferSize : Integer; + var From : TSockAddr; + var FromLen : Integer) : integer; +begin + Result := DoRecvFrom(FHSocket, Buffer^, BufferSize, 0, From, FromLen); + if Result < 0 then + FLastError := WSocket_WSAGetLastError + else + FReadCount := FReadCount + Result; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.PeekData(Buffer : Pointer; BufferSize: integer) : integer; +begin + Result := DoRecv(Buffer^, BufferSize, MSG_PEEK); + if Result < 0 then + FLastError := WSocket_WSAGetLastError; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function SearchChar(Data : PChar; Len : Integer; Ch : Char) : PChar; +begin + while Len > 0 do begin + Len := Len - 1; + if Data^ = Ch then begin + Result := Data; + exit; + end; + Data := Data + 1; + end; + Result := nil; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.SendTo( + Dest : TSockAddr; + DestLen : Integer; + Data : Pointer; + Len : Integer) : integer; +begin + Result := WSocket_SendTo(FHSocket, Data^, Len, FSendFlags, + TSockAddr(Dest), DestLen) +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.RealSend(Data : Pointer; Len : Integer) : Integer; +begin + if FType = SOCK_DGRAM then + Result := WSocket_SendTo(FHSocket, Data^, Len, FSendFlags, + TSockAddr(sin), SizeOf(sin)) + else + Result := WSocket_Send(FHSocket, Data^, Len, FSendFlags); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TryToSend; +var + oBuffer : TBuffer; + Len : Integer; + Count : Integer; + Data : Pointer; + LastError : Integer; + p : PChar; + bMore : Boolean; +begin + if (FHSocket = INVALID_SOCKET) or { No more socket } + (FBufList.Count = 0) or { Nothing to send } + (bMoreFlag and (nMoreCnt >= nMoreMax)) then { Waiting more signal } + exit; + + bMore := TRUE; + while bMore do begin + oBuffer := FBufList.First; + Data := oBuffer.Peek(Len); + if Len <= 0 then begin + { Buffer is empty } + if FBufList.Count <= 1 then begin + { Every thing has been sent } + bAllSent := TRUE; + bMore := FALSE; + end + else begin + oBuffer.Free; + FBufList.Delete(0); + FBufList.Pack; + end; + end + else begin + if bMoreFlag then begin + p := SearchChar(Data, Len, #10); + if Assigned(p) then begin + len := p - PChar(Data) + 1; + nMoreCnt := nMoreCnt + 1; + if nMoreCnt >= nMoreMax then + bMore := FALSE; + end; + end; + + Count := RealSend(Data, Len); + + if Count = 0 then + bMore := FALSE { Closed by remote } + else if count = SOCKET_ERROR then begin + LastError := WSocket_WSAGetLastError; + if (LastError = WSAECONNRESET) or (LastError = WSAENOTSOCK) or + (LastError = WSAENOTCONN) or (LastError = WSAEINVAL) + then begin + FCloseInvoked := TRUE; { 23/07/98 } + Close; + TriggerSessionClosed(LastError); { 23/07/98 } + end + else if LastError <> WSAEWOULDBLOCK then begin + SocketError('TryToSend failed'); + Exit; + end; + bMore := FALSE; + end + else begin + oBuffer.Remove(Count); + if Count < Len then begin + { Could not write as much as we wanted. Stop sending } +{$IFDEF VER80} + { A bug in some Trumpet Winsock implementation break the } + { background sending. Jan Tomasek } + if not TrumpetCompability then begin + bWrite := FALSE; + bMore := FALSE; + end; +{$ELSE} + bWrite := FALSE; + bMore := FALSE; +{$ENDIF} + end; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.PutStringInSendBuffer(Str : String); +begin + PutDataInSendBuffer(@Str[1], Length(Str)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.PutDataInSendBuffer(Data : Pointer; Len : Integer); +var + oBuffer : TBuffer; + cWritten : Integer; + bMore : Boolean; +begin + if Len <= 0 then + exit; + + if FBufList.Count = 0 then begin + oBuffer := TBuffer.Create(FBufSize); + FBufList.Add(oBuffer); + end + else + oBuffer := FBufList.Last; + + bMore := TRUE; + while bMore do begin + cWritten := oBuffer.Write(Data, Len); + if cWritten >= Len then + bMore := FALSE + else begin + Len := Len - cWritten; + Data := PChar(Data) + cWritten; + if Len < 0 then + bMore := FALSE + else begin + oBuffer := TBuffer.Create(FBufSize); + FBufList.Add(oBuffer); + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Return -1 if error, else return number of byte written } +function TCustomWSocket.Send(Data : Pointer; Len : Integer) : integer; +begin + if FState <> wsConnected then begin + WSocket_WSASetLastError(WSAENOTCONN); + SocketError('Send'); + Result := -1; + Exit; + end; + + bAllSent := FALSE; + if Len <= 0 then + Result := 0 + else begin + Result := Len; + PutDataInSendBuffer(Data, Len); + end; + + if bAllSent then + Exit; + + TryToSend; + + if bAllSent then begin + { We post a message to fire the FD_WRITE message wich in turn will } + { fire the OnDataSent event. We cannot fire the event ourself } + { because the event handler will eventually call send again. } + { Sending the message prevent recursive call and stack overflow. } + { The PostMessage function posts (places) a message in a window's } + { message queue and then returns without waiting for the } + { corresponding window to process the message. The message will be } + { seen and routed by Delphi a litle later, when we will be out of } + { the send function. } + PostMessage(Handle, + WM_ASYNCSELECT, + FHSocket, + MakeLong(FD_WRITE, 0)); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Return -1 if error, else return number of byte written } +function TCustomWSocket.SendStr(Str : String) : integer; +begin + Result := Send(@Str[1], Length(Str)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SendText(Str : String); +begin + SendStr(Str); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.ASyncReceive(Error : Word); +var + bMore : Boolean; + lCount : LongInt; + TrashCan : array [0..1023] of char; +begin + bMore := TRUE; + while bMore do begin + FLastError := 0; + + try + if not TriggerDataAvailable(Error) then begin + { Nothing wants to receive, we will receive and throw away 23/07/98 } + if DoRecv(TrashCan, SizeOf(TrashCan), 0) = SOCKET_ERROR then begin + FLastError := WSocket_WSAGetLastError; + if FLastError = WSAEWOULDBLOCK then begin + FLastError := 0; + break; + end; + end; + end; + + if FLastError <> 0 then + bMore := FALSE + {* Check if we have something new arrived, if yes, process it *} + else if WSocket_ioctlsocket(FHSocket, FIONREAD, + lCount) = SOCKET_ERROR then begin + FLastError := WSocket_WSAGetLastError; + bMore := FALSE; + end + else if lCount = 0 then + bMore := FALSE; + except + bMore := FALSE; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMASyncSelect(var msg: TMessage); +var + Check : Word; +begin +{TriggerDisplay('AsyncSelect ' + IntToStr(msg.wParam) + ', ' + IntToStr(msg.lParamLo));} + { Verify that the socket handle is ours handle } + if msg.wParam <> FHSocket then + Exit; + + if FPaused then + exit; + + Check := msg.lParamLo and FD_CONNECT; + if Check <> 0 then begin + ChangeState(wsConnected); + TriggerSessionConnected(msg.lParamHi); + if (msg.lParamHi <> 0) and (FState <> wsClosed) then + Close; + end; + + Check := msg.lParamLo and FD_READ; + if Check <> 0 then begin + ASyncReceive(msg.lParamHi); + end; + + Check := msg.lParamLo and FD_WRITE; + if Check <> 0 then begin + TryToSend; +{ If you wants to test background exception, uncomment the next 2 lines. } +{ if bAllSent then } +{ raise Exception.Create('Test TWSocket exception'); } + if bAllSent then + TriggerDataSent(msg.lParamHi); + end; + + Check := msg.lParamLo and FD_ACCEPT; + if Check <> 0 then begin + TriggerSessionAvailable(msg.lParamHi); + end; + + Check := msg.lParamLo and FD_CLOSE; + if Check <> 0 then begin + {* In some strange situations I found that we receive a FD_CLOSE *} + {* during the connection phase, breaking the connection early ! *} + {* This occurs for example after a failed FTP transfert *} + if FState <> wsConnecting then begin + {* Check if we have something arrived, if yes, process it *} + ASyncReceive(0); + + if Assigned(FOnSessionClosed) and (not FCloseInvoked) then begin + FCloseInvoked := TRUE; + TriggerSessionClosed(msg.lParamHi); + end; + if FState <> wsClosed then + Close; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure GetIPList(phe : PHostEnt; ToList : TStrings); +type + TaPInAddr = array [0..255] of PInAddr; + PaPInAddr = ^TaPInAddr; +var + pptr : PaPInAddr; + I : Integer; +begin + pptr := PaPInAddr(Phe^.h_addr_list); + + I := 0; + while pptr^[I] <> nil do begin + ToList.Add(StrPas(WSocket_inet_ntoa(pptr^[I]^))); + Inc(I); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMAsyncGetHostByName(var msg: TMessage); +var + Phe : Phostent; + Error : Word; +begin + if msg.wParam <> LongInt(FDnsLookupHandle) then + Exit; + FDnsLookupHandle := 0; + Error := Msg.LParamHi; + if Error = 0 then begin + Phe := PHostent(@FDnsLookupBuffer); + if phe <> nil then begin + GetIpList(Phe, FDnsResultList); + FDnsResult := FDnsResultList.Strings[0]; + end; + end; + TriggerDnsLookupDone(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WMAsyncGetHostByAddr(var msg: TMessage); +var + Phe : Phostent; + Error : Word; +begin + if msg.wParam <> LongInt(FDnsLookupHandle) then + Exit; + FDnsLookupHandle := 0; + Error := Msg.LParamHi; + if Error = 0 then begin + Phe := PHostent(@FDnsLookupBuffer); + if phe <> nil then begin + SetLength(FDnsResult, StrLen(Phe^.h_name)); + StrCopy(@FDnsResult[1], Phe^.h_name); + FDnsResultList.Clear; + FDnsResultList.Add(FDnsResult); + end; + end; + TriggerDnsLookupDone(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetProto(sProto : String); +begin + if FProtoAssigned and (sProto = FProtoStr) then + Exit; + + if FState <> wsClosed then begin + RaiseException('Cannot change Proto if not closed'); + Exit; + end; + + FProtoStr := Trim(sProto); + if Length(FProtoStr) = 0 then begin + FProtoAssigned := FALSE; + Exit; + end; + + FProtoResolved := FALSE; + FProtoAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetProto : String; +begin + Result := FProtoStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetRemotePort(sPort : String); +begin + if FPortAssigned and (FPortStr = sPort) then + Exit; + + if FState <> wsClosed then begin + RaiseException('Cannot change Port if not closed'); + Exit; + end; + + FPortStr := Trim(sPort); + if Length(FPortStr) = 0 then begin + FPortAssigned := FALSE; + Exit; + end; + + FPortResolved := FALSE; + FPortAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetRemotePort : String; +begin + Result := FPortStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetLocalPort(sLocalPort : String); +begin + if FState <> wsClosed then begin + RaiseException('Cannot change LocalPort if not closed'); + Exit; + end; + + FLocalPortStr := sLocalPort; + FLocalPortResolved := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetXPort: string; +var + saddr : TSockAddrIn; + saddrlen : integer; + port : integer; +begin + Result := 'error'; + if FState in [wsConnected, wsBound, wsListening] then begin + saddrlen := sizeof(saddr); + if WSocket_GetSockName(FHSocket, TSockAddr(saddr), saddrlen) = 0 then begin + port := WSocket_ntohs(saddr.sin_port); + Result := Format('%d',[port]); + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetAddr(InAddr : String); +begin + if FAddrAssigned and (FAddrStr = InAddr) then + Exit; + + if FState <> wsClosed then begin + RaiseException('Cannot change Addr if not closed'); + Exit; + end; + + FAddrStr := Trim(InAddr); + if Length(FAddrStr) = 0 then begin + FAddrAssigned := FALSE; + Exit; + end; + + FAddrResolved := FALSE; + FAddrAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketResolveHost(InAddr : String) : TInAddr; +var + szData : array [0..256] of char; + Phe : Phostent; + IPAddr : u_long; +begin + if (Length(InAddr) = 0) or (Length(InAddr) >= SizeOf(szData)) then + raise ESocketException.Create('WSocketResolveHost: ''' + InAddr + ''' Invalid Hostname.'); + + StrPCopy(szData, Trim(InAddr)); +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + if IsDigit(szData[0]) then begin + { Address is a dotted numeric address like 192.161.124.32 } + IPAddr := WSocket_inet_addr(szData); +{$IFDEF VER80} + { With Trumpet Winsock 2B and 30D (win 3.11), inet_addr returns faulty } + { results for 0.0.0.0 } + if (IPAddr = INADDR_NONE) and (StrComp(szData, '0.0.0.0') = 0) then begin + Result.s_addr := 0; + Exit; + end; +{$ENDIF} + if IPAddr = u_long(INADDR_NONE) then begin + if StrComp(szData, '255.255.255.255') = 0 then begin + Result.s_addr := u_long(INADDR_BROADCAST); + Exit; + end; + raise ESocketException.Create('WSocketResolveHost: ''' + InAddr + ''' Invalid IP address.'); + end; + Result.s_addr := IPAddr; + Exit; + end; + + { Address is a hostname } + Phe := WSocket_GetHostByName(szData); + if Phe = nil then + raise ESocketException.CreateFmt( + 'WSocketResolveHost: Cannot convert host address ''%s''', + [InAddr]); + Result.s_addr := PInAddr(Phe^.h_addr_list^)^.s_addr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Convert port name or number to number in host order (ftp -> 21) } +function WSocketResolvePort(Port : String; Proto : String) : Word; +var + szPort : array [0..31] of char; + szProto : array [0..31] of char; + Pse : Pservent; +begin + if (Length(Port) = 0) or (Length(Port) >= SizeOf(szPort)) then + raise ESocketException.Create('WSocketResolvePort: Invalid Port.'); + + if IsDigit(Port[1]) then + Result := atoi(Port) + else begin + StrPCopy(szPort, Trim(Port)); + StrPCopy(szProto, Trim(Proto)); +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + if szProto[0] = #0 then + Pse := WSocket_GetServByName(szPort, nil) + else + Pse := WSocket_GetServByName(szPort, szProto); + if Pse = nil then + raise ESocketException.CreateFmt( + 'WSocketResolvePort: Cannot convert port ''%s''', + [Port]); + Result := WSocket_ntohs(Pse^.s_port); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketResolveProto(sProto : String) : integer; +var + szProto : array [0..31] of char; + Ppe : Pprotoent; +begin + if (Length(sProto) = 0) or (Length(sProto) >= SizeOf(szProto)) then + raise ESocketException.Create('WSocketResolveProto: Invalid Protocol.'); + + sProto := Trim(sProto); + if IsDigit(sProto[1]) then + Result := atoi(sProto) + else begin + StrPCopy(szProto, sProto); +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + ppe := WSocket_getprotobyname(szProto); + if Ppe = nil then + raise ESocketException.CreateFmt( + 'WSocketResolveProto: Cannot convert protocol ''%s''', + [sProto]); + Result := ppe^.p_proto; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetAddr : String; +begin + Result := FAddrStr; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetSockName(var saddr : TSockAddrIn; var saddrlen : Integer) : integer; +begin + Result := WSocket_GetSockName(FHSocket, TSockAddr(saddr), saddrlen); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetPeerAddr: string; +var + saddr : TSockAddrIn; + saddrlen : integer; + szAddr : PChar; +begin + Result := 'error'; + if FState = wsConnected then begin + saddrlen := sizeof(saddr); + if WSocket_GetPeerName(FHSocket, TSockAddr(saddr), saddrlen) = 0 then begin + szAddr := WSocket_inet_ntoa(saddr.sin_addr); + Result := StrPas(szAddr); + end + else begin + SocketError('GetPeerName'); + Exit; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetPeerName(var Name : TSockAddrIn; NameLen : Integer) : integer; +begin + if FState = wsConnected then + Result := WSocket_GetPeerName(FHSocket, TSockAddr(Name), NameLen) + else + Result := SOCKET_ERROR; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.CancelDnsLookup; +begin + if FDnsLookupHandle = 0 then + Exit; + if WSocket_WSACancelAsyncRequest(FDnsLookupHandle) <> 0 then begin + FDnsLookupHandle := 0; + SocketError('WSACancelAsyncRequest'); + Exit; + end; + FDnsLookupHandle := 0; + + if not (csDestroying in ComponentState) then + TriggerDnsLookupDone(WSAEINTR); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.DnsLookup(HostName : String); +var + IPAddr : TInAddr; +begin + if HostName = '' then begin + RaiseException('DNS lookup: invalid host name.'); + TriggerDnsLookupDone(WSAEINVAL); + Exit; + end; + + { Cancel any pending lookup } + if FDnsLookupHandle <> 0 then + WSocket_WSACancelAsyncRequest(FDnsLookupHandle); + + FDnsResult := ''; + FDnsResultList.Clear; + +{$IFDEF VER80} + { Delphi 1 do not automatically add a terminating nul char } + HostName := HostName + #0; +{$ENDIF} + IPAddr.S_addr := WSocket_inet_addr(@HostName[1]); + if IPAddr.S_addr <> u_long(INADDR_NONE) then begin + FDnsResult := StrPas(WSocket_inet_ntoa(IPAddr)); + TriggerDnsLookupDone(0); + Exit; + end; + + FDnsLookupHandle := WSocket_WSAAsyncGetHostByName( + FWindowHandle, + WM_ASYNCGETHOSTBYNAME, + @HostName[1], + @FDnsLookupBuffer, + SizeOf(FDnsLookupBuffer)); + if FDnsLookupHandle = 0 then begin + RaiseExceptionFmt( + '%s: can''t start DNS lookup, error #%d', + [HostName, WSocket_WSAGetLastError]); + Exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.ReverseDnsLookup(HostAddr: String); +var + szAddr : array [0..256] of Char; + lAddr : u_long; +begin + if HostAddr = '' then begin + RaiseException('DNS lookup: invalid host name.'); + TriggerDnsLookupDone(WSAEINVAL); + Exit; + end; + { Cancel any pending lookup } + if FDnsLookupHandle <> 0 then + WSocket_WSACancelAsyncRequest(FDnsLookupHandle); + + FDnsResult := ''; + FDnsResultList.Clear; + + StrPCopy(szAddr, HostAddr); + lAddr := WSocket_inet_addr(szAddr); + + FDnsLookupHandle := WSocket_WSAAsyncGetHostByAddr( + FWindowHandle, + WM_ASYNCGETHOSTBYADDR, + PChar(@lAddr), 4, PF_INET, + @FDnsLookupBuffer, + SizeOf(FDnsLookupBuffer)); + if FDnsLookupHandle = 0 then + RaiseExceptionFmt('%s: can''t start DNS lookup, error #%d', + [HostAddr, WSocket_WSAGetLastError]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.BindSocket; +var + SockName : TSockAddr; + SockNamelen : Integer; + LocalSockName : TSockAddrIn; +begin + FillChar(LocalSockName, Sizeof(LocalSockName), 0); + SockNamelen := sizeof(LocalSockName); + LocalSockName.sin_family := AF_INET; + LocalSockName.sin_port := WSocket_htons(FLocalPortNum); + LocalSockName.sin_addr.s_addr := INADDR_ANY; + + if WSocket_bind(HSocket, LocalSockName, SockNamelen) <> 0 then begin + RaiseExceptionFmt('winsock.bind failed, error #%d', [WSocket_WSAGetLastError]); + Exit; + end; + SockNamelen := sizeof(SockName); + if WSocket_getsockname(FHSocket, SockName, SockNamelen) <> 0 then begin + RaiseExceptionFmt('winsock.getsockname failed, error #%d', + [WSocket_WSAGetLastError]); + Exit; + end; +{ FLocalPort := ntohs(SockName.sin_port); } + FLocalPortNum := WSocket_ntohs(SockName.sin_port); + FLocalPortStr := IntToStr(FLocalPortNum); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetLingerOption; +var + iStatus : integer; + li : TLinger; +begin + if FLingerOnOff = wsLingerNoSet then + Exit; { Option set is disabled, ignore } + + if FHSocket = INVALID_SOCKET then begin + RaiseException('Cannot set linger option at this time'); + Exit; + end; + + li.l_onoff := Ord(FLingerOnOff); { 0/1 = disable/enable linger } + li.l_linger := FLingerTimeout; { timeout in seconds } + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, + SO_LINGER, @li, SizeOf(li)); + + if iStatus <> 0 then begin + SocketError('setsockopt(SO_LINGER)'); + Exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Connect; +var + iStatus : integer; + optval : integer; +begin + if (FHSocket <> INVALID_SOCKET) and (FState <> wsClosed) then begin + RaiseException('Connect: Socket already in use'); + Exit; + end; + + if not FPortAssigned then begin + RaiseException('Connect: No Port Specified'); + Exit; + end; + + if not FAddrAssigned then begin + RaiseException('Connect: No IP Address Specified'); + Exit; + end; + + if not FProtoAssigned then begin + RaiseException('Connect: No Protocol Specified'); + Exit; + end; + + try + if not FProtoResolved then begin + { The next line will trigger an exception in case of failure } + FProto := WSocketResolveProto(FProtoStr); + if FProto = IPPROTO_UDP then + FType := SOCK_DGRAM + else + FType := SOCK_STREAM; + FProtoResolved := TRUE; + end; + + if not FPortResolved then begin + { The next line will trigger an exception in case of failure } + FPortNum := WSocketResolvePort(FPortStr, GetProto); + sin.sin_port := WSocket_htons(FPortNum); + FPortResolved := TRUE; + end; + + if not FLocalPortResolved then begin + { The next line will trigger an exception in case of failure } + FLocalPortNum := WSocketResolvePort(FLocalPortStr, GetProto); + FLocalPortResolved := TRUE; + end; + + if not FAddrResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_addr.s_addr := WSocketResolveHost(FAddrStr).s_addr; + FAddrResolved := TRUE; + end; + except + on E:Exception do begin + RaiseException('connect: ' + E.Message); + Exit; + end; + end; + + { Remove any data from the internal output buffer } + { (should already be empty !) } + DeleteBufferedData; + + FHSocket := WSocket_socket(FAddrFormat, FType, FProto); + if FHSocket = INVALID_SOCKET then begin + SocketError('Connect (socket)'); + Exit; + end; + ChangeState(wsOpened); + + if FType = SOCK_DGRAM then begin + BindSocket; + if sin.sin_addr.S_addr = u_long(INADDR_BROADCAST) then begin + OptVal := 1; + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, SO_BROADCAST, + PChar(@OptVal), SizeOf(OptVal)); + if iStatus <> 0 then begin + SocketError('setsockopt(SO_BROADCAST)'); + Exit; + end; + end; + end + else begin + { Socket type is SOCK_STREAM } + if FLocalPortNum <> 0 then + BindSocket; + + SetLingerOption; + + optval := -1; + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, + SO_KEEPALIVE, @optval, SizeOf(optval)); + + if iStatus <> 0 then begin + SocketError('setsockopt(SO_KEEPALIVE)'); + Exit; + end; + + optval := -1; + iStatus := WSocket_setsockopt(FHSocket, SOL_SOCKET, + SO_REUSEADDR, @optval, SizeOf(optval)); + + if iStatus <> 0 then begin + SocketError('setsockopt(SO_REUSEADDR)'); + Exit; + end; + end; + + iStatus := WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, + FD_READ or FD_WRITE or FD_CLOSE or + FD_ACCEPT or FD_CONNECT); + if iStatus <> 0 then begin + SocketError('WSAAsyncSelect'); + Exit; + end; + + if FType = SOCK_DGRAM then begin + ChangeState(wsConnected); + TriggerSessionConnected(0); + end + else begin + iStatus := WSocket_connect(FHSocket, TSockAddr(sin), sizeof(sin)); + if iStatus = 0 then + ChangeState(wsConnecting) + else begin + iStatus := WSocket_WSAGetLastError; + if iStatus = WSAEWOULDBLOCK then + ChangeState(wsConnecting) + else begin + FLastError := WSocket_WSAGetLastError; + SocketError('Connect'); + Exit; + end; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Listen; +var + iStatus : integer; +begin + if not FPortAssigned then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('listen: port not assigned'); + Exit; + end; + + if not FProtoAssigned then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('listen: protocol not assigned'); + Exit; + end; + + if not FAddrAssigned then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('listen: address not assigned'); + Exit; + end; + + try + if not FProtoResolved then begin + { The next line will trigger an exception in case of failure } + FProto := WSocketResolveProto(FProtoStr); + if FProto = IPPROTO_UDP then + FType := SOCK_DGRAM + else + FType := SOCK_STREAM; + FProtoResolved := TRUE; + end; + + if not FPortResolved then begin + { The next line will trigger an exception in case of failure } + FPortNum := WSocketResolvePort(FPortStr, GetProto); + sin.sin_port := WSocket_htons(FPortNum); + FPortResolved := TRUE; + end; + + if not FAddrResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_addr.s_addr := WSocketResolveHost(FAddrStr).s_addr; + FAddrResolved := TRUE; + end; + except + on E:Exception do begin + RaiseException('listen: ' + E.Message); + Exit; + end; + end; + + { Remove any data from the internal output buffer } + { (should already be empty !) } + DeleteBufferedData; + + FHSocket := WSocket_socket(FAddrFormat, FType, FProto); + + if FHSocket = INVALID_SOCKET then begin + SocketError('socket'); + exit; + end; + + iStatus := WSocket_bind(FHSocket, TSockAddr(sin), sizeof(sin)); + if iStatus = 0 then + ChangeState(wsBound) + else begin + SocketError('Bind'); + Close; + exit; + end; + + if FType = SOCK_DGRAM then begin + ChangeState(wsListening); + ChangeState(wsConnected); + TriggerSessionConnected(0); + end + else if FType = SOCK_STREAM then begin + iStatus := WSocket_listen(FHSocket, 5); + if iStatus = 0 then + ChangeState(wsListening) + else begin + SocketError('Listen'); + Exit; + end; + end; + + iStatus := WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, + FD_READ or FD_WRITE or + FD_ACCEPT or FD_CLOSE); + if iStatus <> 0 then begin + SocketError('WSAASyncSelect'); + exit; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.Accept: TSocket; +var + len : integer; +begin + if FState <> wsListening then begin + WSocket_WSASetLastError(WSAEINVAL); + SocketError('not a listening socket'); + Result := INVALID_SOCKET; + Exit; + end; + + len := sizeof(sin); +{$IFDEF VER100} + { Delphi 3 has changed var parameters to pointers } + FASocket := WSocket_accept(FHSocket, @sin, @len); +{$ELSE} +{$IFDEF VER93} + { C++Builder 1 has changed var parameters to pointers } + FASocket := WSocket_accept(FHSocket, @sin, @len); +{$ELSE} +{$IFDEF VER110} + { C++Builder 3 has changed var parameters to pointers } + FASocket := WSocket_accept(FHSocket, @sin, @len); +{$ELSE} +{$IFDEF VER120} + { Delphi 4 has changed var parameters to pointers } + FASocket := WSocket_accept(FHSocket, @sin, @len); +{$ELSE} +{$IFDEF VER125} + { C++Builder 4 has changed var parameters to pointers } + FASocket := WSocket_accept(FHSocket, @sin, @len); +{$ELSE} + FASocket := WSocket_accept(FHSocket, TSockAddr(sin), len); +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} +{$ENDIF} + if FASocket = INVALID_SOCKET then begin + SocketError('Accept'); + Result := INVALID_SOCKET; + Exit; + end + else + Result := FASocket; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Pause; +begin + FPaused := TRUE; + WSocket_WSAASyncSelect(FHSocket, Handle, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Resume; +begin + FPaused := FALSE; + WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, + FD_READ or FD_WRITE or FD_CLOSE or FD_CONNECT); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Shutdown(How : Integer); +begin + if FHSocket <> INVALID_SOCKET then + WSocket_shutdown(FHSocket, How); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.DeleteBufferedData; +var + nItem : Integer; +begin + { Delete all data buffer } + for nItem := 0 to FBufList.Count - 1 do + TBuffer(FBufList.Items[nItem]).Free; + FBufList.Clear; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Abort; +begin + CancelDnsLookup; + DeleteBufferedData; + { Be sure to close as fast as possible (abortive close) } + if (State = wsConnected) and (FProto = IPPROTO_TCP) then begin + LingerOnOff := wsLingerOff; + SetLingerOption; + end; + InternalClose(FALSE, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Close; +begin + InternalClose(TRUE, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.Flush; +begin + while (FHSocket <> INVALID_SOCKET) and { No more socket } + (not bAllSent) do begin { Nothing to send } + { Break; } + TryToSend; + MessagePump; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.InternalClose(bShut : Boolean; Error : Word); +var + iStatus : integer; +{ Buffer : array [0..127] of Char; } +begin + if FHSocket = INVALID_SOCKET then begin + if FState <> wsClosed then begin + ChangeState(wsClosed); + AssignDefaultValue; + end; + exit; + end; + + if FState = wsClosed then + Exit; + +{ 11/10/98 called shutdown(1) instead of shutdonw(2). This disable only } +{ reception. Disabling data send produced data lost is some cases. For } +{ example when a client open the connection, send some data fast then close } +{ the connection immediately, even using the linger option. } + if bShut then + ShutDown(1); + + if FHSocket <> INVALID_SOCKET then begin + repeat + { Close the socket } + iStatus := WSocket_closesocket(FHSocket); + FHSocket := INVALID_SOCKET; + if iStatus <> 0 then begin + FLastError := WSocket_WSAGetLastError; + if FLastError <> WSAEWOULDBLOCK then begin + { Ignore the error occuring when winsock DLL not } + { initialized (occurs when using TWSocket from a DLL) } + if FLastError = WSANOTINITIALISED then + break; + SocketError('Disconnect (closesocket)'); + Exit; + end; + MessagePump; + end; + until iStatus = 0; + end; + + ChangeState(wsClosed); + if (not (csDestroying in ComponentState)) and + (not FCloseInvoked) and Assigned(FOnSessionClosed) then begin + FCloseInvoked := TRUE; + TriggerSessionClosed(Error); + end; + { 29/09/98 Protect AssignDefaultValue because SessionClosed event handler } + { may have destroyed the component. } + try + AssignDefaultValue; + except + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.WaitForClose; +var + lCount : LongInt; + Status : Integer; + Ch : Char; +begin + while (FHSocket <> INVALID_SOCKET) and (FState <> wsClosed) do begin + MessagePump; + + if WSocket_ioctlsocket(FHSocket, FIONREAD, lCount) = SOCKET_ERROR then + break; + if lCount > 0 then + TriggerDataAvailable(0); + + Status := DoRecv(Ch, 0, 0); + if Status <= 0 then begin + FLastError := WSocket_WSAGetLastError; + if FLastError <> WSAEWOULDBLOCK then + break; + end; + MessagePump; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketGetHostByAddr(Addr : String) : PHostEnt; +var + szAddr : array[0..256] of char; + lAddr : u_long; +begin +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + StrPCopy(szAddr, Addr); + lAddr := WSocket_inet_addr(szAddr); + Result := winsock.gethostbyaddr(PChar(@lAddr), 4, PF_INET); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketResolveIp(IpAddr : String) : String; +var + Phe : PHostEnt; +begin + phe := WSocketGetHostByAddr(IpAddr); + if Phe = nil then + Result := '' + else begin + SetLength(Result, StrLen(Phe^.h_name)); + StrCopy(@Result[1], Phe^.h_name); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketGetHostByName(Name : String) : PHostEnt; +var + szName : array[0..256] of char; +begin +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + StrPCopy(szName, Name); + Result := WSocket_gethostbyname(szName); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LocalIPList : TStrings; +var + phe : PHostEnt; +begin + IPList.Clear; + Result := IPList; + + phe := WSocketGetHostByName(LocalHostName); + if phe <> nil then + GetIpList(Phe, IPList); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function LocalHostName : String; +var + Buffer : array [0..63] of char; +begin +{ if not DllStarted then + LoadWinsock(WINSOCKET); 14/02/99 } + if WSocket_gethostname(Buffer, SizeOf(Buffer)) <> 0 then + raise ESocketException.Create('Winsock.GetHostName failed'); + Result := StrPas(Buffer); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.TimerIsSet(var tvp : TTimeVal) : Boolean; +begin + Result := (tvp.tv_sec <> 0) or (tvp.tv_usec <> 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.TimerCmp(var tvp : TTimeVal; var uvp : TTimeVal; IsEqual : Boolean) : Boolean; +begin + Result := (tvp.tv_sec = uvp.tv_sec) and (tvp.tv_usec = uvp.tv_usec); + if not IsEqual then + Result := not Result; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TimerClear(var tvp : TTimeVal); +begin + tvp.tv_sec := 0; + tvp.tv_usec := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SetSendFlags(newValue : TSocketSendFlags); +begin + case newValue of + wsSendNormal: FSendFlags := 0; + wsSendUrgent: FSendFlags := MSG_OOB; + else + RaiseException('Invalid SendFlags'); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.GetSendFlags : TSocketSendFlags; +begin + case FSendFlags of + 0 : Result := wsSendNormal; + MSG_OOB : Result := wsSendUrgent; + else + RaiseException('Invalid internal SendFlags'); + Result := wsSendNormal; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerDisplay(Msg : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerSessionAvailable(Error : Word); +begin + if Assigned(FOnSessionAvailable) then + FOnSessionAvailable(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerSessionConnected(Error : Word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerSessionClosed(Error : Word); +begin + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomWSocket.TriggerDataAvailable(Error : Word) : Boolean; +begin + Result := Assigned(FOnDataAvailable); + if not Result then + Exit; +{$IFDEF TOMASEK} { 23/01/99 } + { Do not allow FD_READ messages, this will prevent reentering the } + { OnDataAvailable event handler. } + WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, + FD_WRITE or FD_CLOSE or FD_CONNECT); + try + FRcvdFlag := TRUE; + while Result and FRcvdFlag do begin + { Trigger user code. This will normally call DoRecv which will } + { update FRcvdFlag. } + { If user code is wrong, we'll loop forever ! } + FOnDataAvailable(Self, Error); + Result := Assigned(FOnDataAvailable); + end; + finally + { Allow all events now } + WSocket_WSAASyncSelect(FHSocket, Handle, WM_ASYNCSELECT, + FD_READ or FD_WRITE or FD_CLOSE or FD_CONNECT); + end; +{$ELSE} { 23/01/99 } + FOnDataAvailable(Self, Error); { 23/01/99 } +{$ENDIF} { 23/01/99 } +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerDataSent(Error : Word); +begin + if Assigned(FOnDataSent) then + FOnDataSent(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerError; +begin + if Assigned(FOnError) then + FOnError(Self); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerDNSLookupDone(Error : Word); +begin + if Assigned(FOnDNSLookupDone) then + FOnDNSLookupDone(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.TriggerChangeState(OldState, NewState : TSocketState); +begin + if Assigned(FOnChangeState) then + FOnChangeState(Self, OldState, NewState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomWSocket.SocketError(sockfunc: string); +var + Error : integer; + Line : string; +begin + Error := WSocket_WSAGetLastError; + Line := 'Error '+ IntToStr(Error) + ' in function ' + sockfunc + + #13#10 + WSocketErrorDesc(Error); + + if (Error = WSAECONNRESET) or + (Error = WSAENOTCONN) then begin + WSocket_closesocket(FHSocket); + FHSocket := INVALID_SOCKET; + ChangeState(wsClosed); + end; + + FLastError := Error; + RaiseException(Line); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function WSocketErrorDesc(error: integer) : string; +begin + case error of + 0: + WSocketErrorDesc := 'No Error'; + WSAEINTR: + WSocketErrorDesc := 'Interrupted system call'; + WSAEBADF: + WSocketErrorDesc := 'Bad file number'; + WSAEACCES: + WSocketErrorDesc := 'Permission denied'; + WSAEFAULT: + WSocketErrorDesc := 'Bad address'; + WSAEINVAL: + WSocketErrorDesc := 'Invalid argument'; + WSAEMFILE: + WSocketErrorDesc := 'Too many open files'; + WSAEWOULDBLOCK: + WSocketErrorDesc := 'Operation would block'; + WSAEINPROGRESS: + WSocketErrorDesc := 'Operation now in progress'; + WSAEALREADY: + WSocketErrorDesc := 'Operation already in progress'; + WSAENOTSOCK: + WSocketErrorDesc := 'Socket operation on non-socket'; + WSAEDESTADDRREQ: + WSocketErrorDesc := 'Destination address required'; + WSAEMSGSIZE: + WSocketErrorDesc := 'Message too long'; + WSAEPROTOTYPE: + WSocketErrorDesc := 'Protocol wrong type for socket'; + WSAENOPROTOOPT: + WSocketErrorDesc := 'Protocol not available'; + WSAEPROTONOSUPPORT: + WSocketErrorDesc := 'Protocol not supported'; + WSAESOCKTNOSUPPORT: + WSocketErrorDesc := 'Socket type not supported'; + WSAEOPNOTSUPP: + WSocketErrorDesc := 'Operation not supported on socket'; + WSAEPFNOSUPPORT: + WSocketErrorDesc := 'Protocol family not supported'; + WSAEAFNOSUPPORT: + WSocketErrorDesc := 'Address family not supported by protocol family'; + WSAEADDRINUSE: + WSocketErrorDesc := 'Address already in use'; + WSAEADDRNOTAVAIL: + WSocketErrorDesc := 'Address not available'; + WSAENETDOWN: + WSocketErrorDesc := 'Network is down'; + WSAENETUNREACH: + WSocketErrorDesc := 'Network is unreachable'; + WSAENETRESET: + WSocketErrorDesc := 'Network dropped connection on reset'; + WSAECONNABORTED: + WSocketErrorDesc := 'Connection aborted'; + WSAECONNRESET: + WSocketErrorDesc := 'Connection reset by peer'; + WSAENOBUFS: + WSocketErrorDesc := 'No buffer space available'; + WSAEISCONN: + WSocketErrorDesc := 'Socket is already connected'; + WSAENOTCONN: + WSocketErrorDesc := 'Socket is not connected'; + WSAESHUTDOWN: + WSocketErrorDesc := 'Can''t send after socket shutdown'; + WSAETOOMANYREFS: + WSocketErrorDesc := 'Too many references: can''t splice'; + WSAETIMEDOUT: + WSocketErrorDesc := 'Connection timed out'; + WSAECONNREFUSED: + WSocketErrorDesc := 'Connection refused'; + WSAELOOP: + WSocketErrorDesc := 'Too many levels of symbolic links'; + WSAENAMETOOLONG: + WSocketErrorDesc := 'File name too long'; + WSAEHOSTDOWN: + WSocketErrorDesc := 'Host is down'; + WSAEHOSTUNREACH: + WSocketErrorDesc := 'No route to host'; + WSAENOTEMPTY: + WSocketErrorDesc := 'Directory not empty'; + WSAEPROCLIM: + WSocketErrorDesc := 'Too many processes'; + WSAEUSERS: + WSocketErrorDesc := 'Too many users'; + WSAEDQUOT: + WSocketErrorDesc := 'Disc quota exceeded'; + WSAESTALE: + WSocketErrorDesc := 'Stale NFS file handle'; + WSAEREMOTE: + WSocketErrorDesc := 'Too many levels of remote in path'; + WSASYSNOTREADY: + WSocketErrorDesc := 'Network sub-system is unusable'; + WSAVERNOTSUPPORTED: + WSocketErrorDesc := 'WinSock DLL cannot support this application'; + WSANOTINITIALISED: + WSocketErrorDesc := 'WinSock not initialized'; + WSAHOST_NOT_FOUND: + WSocketErrorDesc := 'Host not found'; + WSATRY_AGAIN: + WSocketErrorDesc := 'Non-authoritative host not found'; + WSANO_RECOVERY: + WSocketErrorDesc := 'Non-recoverable error'; + WSANO_DATA: + WSocketErrorDesc := 'No Data'; + else + WSocketErrorDesc := 'Not a WinSock error'; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + X X X X X X X X X X X X X X + X X X X X X X X X X X + X X X X X X X X + X X X X X X X X X X X + X X X X X X X X + X X X X X X X X X X X X + X X X X X X X X X X X X + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.AssignDefaultValue; +begin + inherited AssignDefaultValue; + FSocksState := socksData; + FSocksServer := ''; + FSocksPort := ''; + FSocksLevel := '5'; + FRcvdCnt := 0; + FSocksPortAssigned := FALSE; + FSocksServerAssigned := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SetSocksLevel(newValue : String); +begin + if State <> wsClosed then begin + RaiseException('Can''t change socks level if not closed'); + Exit; + end; + if (newValue <> '4') and (newValue <> '5') and + (newValue <> '4A') and (newValue <> '4a') then begin + RaiseException('Invalid socks level. Must be 4, 4A or 5.'); + Exit; + end; + FSocksLevel := UpperCase(newValue); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SetSocksPort(sPort : String); +begin + if State <> wsClosed then begin + RaiseException('Can''t change socks port if not closed'); + Exit; + end; + FSocksPort := Trim(sPort); + if Length(FSocksPort) = 0 then begin + FSocksPortAssigned := FALSE; + Exit; + end; + FSocksPortAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SetSocksServer(sServer : String); +begin + if State <> wsClosed then begin + RaiseException('Can''t change socks server if not closed'); + Exit; + end; + FSocksServer := Trim(sServer); + if Length(FSocksServer) = 0 then begin + FSocksServerAssigned := FALSE; + Exit; + end; + FSocksServerAssigned := TRUE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.Listen; +begin + { Check if we really wants to use socks server } + if not FSocksServerAssigned then begin + { No socks server assigned, Listen as usual } + inherited Listen; + Exit; + end; + RaiseException('listening is not supported thru socks server'); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.Connect; +begin + { Check if we really wants to use socks server } + if not FSocksServerAssigned then begin + { No socks server assigned, connect as usual } + inherited Connect; + Exit; + end; + + if LowerCase(FProtoStr) <> 'tcp' then begin + RaiseException('tcp is the only protocol supported thru socks server'); + Exit; + end; + + try + if not FPortResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_port := WSocket_htons(WSocketResolvePort(FSocksPort, FProtoStr)); + FPortResolved := TRUE; + end; + + if not FAddrResolved then begin + { The next line will trigger an exception in case of failure } + sin.sin_addr.s_addr := WSocketResolveHost(FSocksServer).s_addr; + FAddrResolved := TRUE; + end; + { The next line will trigger an exception in case of failure } + FPortNum := WSocketResolvePort(FPortStr, FProtoStr); + except + on E:Exception do begin + RaiseException('connect: ' + E.Message); + Exit; + end; + end; + + FSocksState := socksNegociateMethods; + FRcvCnt := 0; + inherited Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{function BufToStr(Buf : PChar; Cnt : Integer) : String; +begin + Result := ''; + while Cnt > 0 do begin + if Buf^ in [#32..#126] then + Result := Result + Buf^ + else + Result := Result + '#' + Format('%2.2d', [ord(Buf^)]); + Inc(Buf); + Dec(Cnt); + end; +end;} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSessionConnected(Error : Word); +var + Buf : array [0..2] of char; +begin + if FSocksState = socksNegociateMethods then begin + TriggerSocksConnected(Error); + if Error <> 0 then begin + inherited TriggerSessionConnected(Error); + Exit; + end; + if FSocksLevel[1] = '4' then + SocksDoConnect + else begin + if FSocksAuthentication = socksNoAuthentication then + FSocksAuthNumber := #$00 { No authentification } + else + FSocksAuthNumber := #$02; { Usercode/Password } + + Buf[0] := #$05; { Version number } + Buf[1] := #$01; { Number of methods } + Buf[2] := FSocksAuthNumber; { Method identifier } +{TriggerDisplay('Send = ''' + BufToStr(Buf, 3) + '''');} + Send(@Buf, 3); + end; + end + else + inherited TriggerSessionConnected(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSessionClosed(Error : Word); +begin + if FSocksState = socksAuthenticate then + TriggerSocksAuthState(socksAuthFailure); + inherited TriggerSessionClosed(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSocksConnected(Error : Word); +begin + if Assigned(FOnSocksConnected) then + FOnSocksConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSocksError(Error : Integer; Msg : String); +begin + if Assigned(FOnSocksError) then + FOnSocksError(Self, Error, Msg); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.TriggerSocksAuthState(AuthState : TSocksAuthState); +begin + if Assigned(FOnSocksAuthState) then + FOnSocksAuthState(Self, AuthState); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SocksDoAuthenticate; +var + Buf : array [0..127] of char; + I : Integer; +begin + FSocksState := socksAuthenticate; + TriggerSocksAuthState(socksAuthStart); + Buf[0] := #$01; {06/03/99} { Socks version } + I := 1; + Buf[I] := chr(Length(FSocksUsercode)); + Move(FSocksUsercode[1], Buf[I + 1], Length(FSocksUsercode)); + I := I + 1 + Length(FSocksUsercode); + Buf[I] := chr(Length(FSocksPassword)); + Move(FSocksPassword[1], Buf[I + 1], Length(FSocksPassword)); + I := I + 1 + Length(FSocksPassword); + try +{TriggerDisplay('Send = ''' + BufToStr(Buf, I) + '''');} + Send(@Buf, I); + except + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.SocksDoConnect; +type + pu_long = ^u_long; +var + Buf : array [0..127] of char; + I : Integer; + ErrCode : Integer; +begin + FSocksState := socksConnect; + if FSocksLevel[1] = '4' then begin + Buf[0] := #4; + Buf[1] := #1; + PWORD(@Buf[2])^ := WSocket_ntohs(FPortNum); + if FSocksLevel = '4A' then + pu_long(@Buf[4])^ := WSocket_inet_addr('0.0.0.1') + else begin + try + pu_long(@Buf[4])^ := WSocketResolveHost(FAddrStr).s_addr; + except + on E:Exception do begin + ErrCode := socksHostResolutionFailed; + TriggerSocksError(ErrCode, E.ClassName + ' ' + E.Message); + InternalClose(TRUE, ErrCode); + Exit; + end; + end; + end; + I := 8; + if Length(FSocksUsercode) > 0 then begin + { I'm not sure it has to be like that ! Should I also use the } + { password or not ? } + Move(FSocksUsercode[1], Buf[I], Length(FSocksUsercode)); + I := I + Length(FSocksUsercode); + end; + Buf[I] := #0; + Inc(I); + if FSocksLevel = '4A' then begin + Move(FAddrStr[1], Buf[I], Length(FAddrStr)); + I := I + Length(FAddrStr); + end; + Buf[I] := #0; + Inc(I); + end + else begin + Buf[0] := #$05; { Socks version } + Buf[1] := #$01; { Connect command } + Buf[2] := #$00; { Reserved, must be $00 } + Buf[3] := #$03; { Address type is domain name } + Buf[4] := chr(Length(FAddrStr)); + { Should check buffer overflow } + Move(FAddrStr[1], Buf[5], Length(FAddrStr)); + I := 5 + Length(FAddrStr); + PWord(@Buf[I])^ := WSocket_htons(FPortNum); + I := I + 2; + end; + + try +{TriggerDisplay('Send = ''' + BufToStr(Buf, I + 2) + '''');} + Send(@Buf, I); + except + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSocksWSocket.DataAvailableError( + ErrCode : Integer; + Msg : String); +begin + TriggerSocksError(ErrCode, Msg); + inherited TriggerSessionConnected(ErrCode); + InternalClose(TRUE, ErrCode); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSocksWSocket.TriggerDataAvailable(Error : Word) : Boolean; +var + Len : Integer; + I : Integer; + ErrCode : Word; + ErrMsg : String; + InAddr : TInAddr; + AnsLen : Integer; +begin + if FSocksState = socksData then begin + Result := inherited TriggerDataAvailable(Error); + Exit; + end; + + if Error <> 0 then begin + DataAvailableError(Error, 'data receive error'); + Result := FALSE; + Exit; + end; + + if FSocksState = socksNegociateMethods then begin + Result := TRUE; + Len := Receive(@FRcvBuf[FRcvCnt], Sizeof(FRcvBuf) - FRcvCnt - 1); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; +{TriggerDisplay('socksNegociateMethods FrcvBuf = ''' + BufToStr(FRcvBuf, FRcvCnt) + '''');} + if FSocksLevel[1] = '4' then begin + { We should never comes here } + DataAvailableError(socksProtocolError, 'TWSocket logic error'); + Exit; + end + else begin { SOCKS5 } + { We are waiting only two bytes } + if FRcvCnt < 2 then + Exit; +{ if FRcvCnt <> 2 then begin 06/03/99} +{ DataAvailableError(socksProtocolError, 'too much data availaible');} +{ Exit; } +{ end; } + FRcvCnt := 0; { Clear receive counter } + if FRcvBuf[0] <> #$05 then begin + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + if FRcvBuf[1] = #$00 then begin + { No authentication required } + if FSocksAuthNumber <> #$00 then + { We asked for authentification, so complains... } + TriggerSocksAuthState(socksAuthNotRequired); + end + else if FRcvBuf[1] = #$02 then begin + { Usercode/Password authentication required } + SocksDoAuthenticate; + Exit; + end + else begin + DataAvailableError(socksAuthMethodError, 'authentification method not acceptable'); + Exit; + end; + SocksDoConnect; + end; + end + else if FSocksState = socksConnect then begin + Result := TRUE; +{TriggerDisplay('socksConnect FrcvBuf = ''' + BufToStr(FRcvBuf, FRcvCnt) + '''');} + if FSocksLevel[1] = '4' then begin + { We wants at most 8 characters } + Len := Receive(@FRcvBuf[FRcvCnt], 8 - FRcvCnt); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; + { We are waiting for 8 bytes } + if FRcvCnt < 8 then + Exit; + FRcvCnt := 0; { Clear receive counter } + if FRcvBuf[0] <> #0 then begin + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + if FRcvBuf[1] = #$90 then begin + case FRcvBuf[1] of + #$91: ErrCode := socksRejectedOrFailed; + #$92: ErrCode := socksConnectionRefused; + #$93: ErrCode := socksAuthenticationFailed; + else + ErrCode := socksUnassignedError; + end; + case ErrCode of + socksRejectedOrFailed : + ErrMsg := 'request rejected or failed'; + socksConnectionRefused : + ErrMsg := 'connection refused'; + socksAuthenticationFailed : + ErrMsg := 'authentification failed'; + else + ErrMsg := 'unassigned error #' + IntToStr(Ord(FRcvBuf[1])); + end; + DataAvailableError(ErrCode, ErrMsg); + Exit; + end; + FSocksState := socksData; + inherited TriggerSessionConnected(0); + Result := inherited TriggerDataAvailable(0); + end + else begin { SOCKS5 } + Len := Receive(@FRcvBuf[FRcvCnt], Sizeof(FRcvBuf) - FRcvCnt - 1); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; + if FRcvCnt >= 1 then begin + { First byte is version, we expect version 5 } + if FRcvBuf[0] <> #$05 then begin + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + end; + if FRcvCnt >= 2 then begin + if FRcvBuf[1] <> #$00 then begin + case FRcvBuf[1] of + #1: ErrCode := socksGeneralFailure; + #2: ErrCode := socksConnectionNotAllowed; + #3: ErrCode := socksNetworkUnreachable; + #4: ErrCode := socksHostUnreachable; + #5: ErrCode := socksConnectionRefused; + #6: ErrCode := socksTtlExpired; + #7: ErrCode := socksUnknownCommand; + #8: ErrCode := socksUnknownAddressType; + else + ErrCode := socksUnassignedError; + end; + case ErrCode of + socksGeneralFailure : + ErrMsg := 'general SOCKS server failure'; + socksConnectionNotAllowed : + ErrMsg := 'connection not allowed by ruleset'; + socksNetworkUnreachable : + ErrMsg := 'network unreachable'; + socksHostUnreachable : + ErrMsg := 'host unreachable'; + socksConnectionRefused : + ErrMsg := 'connection refused'; + socksTtlExpired : + ErrMsg := 'time to live expired'; + socksUnknownCommand : + ErrMsg := 'command not supported'; + socksUnknownAddressType : + ErrMsg := 'address type not supported'; + else + ErrMsg := 'unassigned error #' + IntToStr(Ord(FRcvBuf[1])); + end; + DataAvailableError(ErrCode, ErrMsg); + Exit; + end; + end; + if FRcvCnt < 5 then + Exit; + + { We have enough data to learn the answer length } + if FRcvBuf[3] = #$01 then + AnsLen := 10 { IP V4 address } + else if FRcvBuf[3] = #$03 then + AnsLen := 7 + Ord(FRcvBuf[4]) { Domain name } + else + AnsLen := 5; { Other unsupported } + + if FRcvCnt < AnsLen then + Exit; + + if FRcvBuf[3] = #$01 then begin + { IP V4 address } + Move(FRcvBuf[4], InAddr, 4); + FBoundAddr := StrPas(WSocket_inet_ntoa(InAddr)); + I := 4 + 4; + end + else if FRcvBuf[3] = #$03 then begin + { Domain name } + SetLength(FBoundAddr, Ord(FRcvBuf[4])); + Move(FRcvBuf[4], FBoundAddr[1], Length(FBoundAddr)); + I := 4 + Ord(FRcvBuf[4]) + 1; + end + else begin + { Unsupported address type } + DataAvailableError(socksUnknownAddressType, 'address type not supported'); + Exit; + end; + + FBoundPort := format('%d', [WSocket_ntohs(PWord(@FRcvBuf[I])^)]); + I := I + 2; + FSocksState := socksData; + inherited TriggerSessionConnected(0); + FRcvdCnt := FRcvCnt - I; + if FRcvdCnt < 0 then + FRcvdCnt := 0 + else + FRcvdPtr := @FRcvBuf[I]; + Result := inherited TriggerDataAvailable(0); + end; + end + else if FSocksState = socksAuthenticate then begin + Result := TRUE; + Len := Receive(@FRcvBuf[FRcvCnt], Sizeof(FRcvBuf) - FRcvCnt - 1); + if Len < 0 then + Exit; + FRcvCnt := FRcvCnt + Len; +{TriggerDisplay('socksAuthenticate FrcvBuf = ''' + BufToStr(FRcvBuf, FRcvCnt) + '''');} + if FRcvCnt >= 1 then begin + { First byte is version, we expect version 5 } + if FRcvBuf[0] <> #$01 then begin { 06/03/99 } + TriggerSocksAuthState(socksAuthFailure); + DataAvailableError(socksVersionError, 'socks version error'); + Exit; + end; + end; + if FRcvCnt = 2 then begin + { Second byte is status } + if FRcvBuf[1] <> #$00 then begin + TriggerSocksAuthState(socksAuthFailure); + DataAvailableError(socksAuthenticationFailed, 'socks authentication failed'); + Exit; + end; + end + else if FRcvCnt > 2 then begin + TriggerSocksAuthState(socksAuthFailure); + DataAvailableError(socksProtocolError, 'too much data availaible'); + Exit; + end; + FRcvCnt := 0; { 06/03/99 } + TriggerSocksAuthState(socksAuthSuccess); + SocksDoConnect; + end + else begin + { We should never comes here ! } + DataAvailableError(socksInternalError, 'internal error'); + Result := FALSE; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSocksWSocket.GetRcvdCount : LongInt; +begin + if FRcvdCnt <= 0 then + Result := inherited GetRcvdCount + else + Result := FRcvdCnt; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSocksWSocket.DoRecv( + var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; +begin + if FRcvdCnt <= 0 then begin + Result := inherited DoRecv(Buffer, BufferSize, Flags); + Exit; + end; + { We already have received data into our internal buffer } + if FRcvdCnt <= BufferSize then begin + { User buffer is greater than received data, copy all and clear } + Move(FRcvdPtr^, Buffer, FRcvdCnt); + Result := FRcvdCnt; + FRcvdCnt := 0; + Exit; + end; + { User buffer is smaller, copy as much as possible } + Move(FRcvdPtr^, Buffer, BufferSize); + Result := BufferSize; + FRcvdPtr := FRcvdPtr + BufferSize; + FRcvdCnt := FRcvdCnt - BufferSize; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + X X X X X X X X + X X X X X X + X X X X X X + X X X X X X X X + X X X X X + X X X X X + X X X X X X X X X X X + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TCustomLineWSocket.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FLineEnd := #13#10; + FLineMode := FALSE; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TCustomLineWSocket.Destroy; +begin + if FRcvdPtr <> nil then begin + FreeMem(FRcvdPtr, FRcvBufSize); + FRcvdPtr := nil; + FRcvBufSize := 0; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.WndProc(var MsgRec: TMessage); +begin + with MsgRec do begin + if Msg = WM_TRIGGER_DATA_AVAILABLE then begin + { We *MUST* handle all exception to avoid application shutdown } + try + WMTriggerDataAvailable(MsgRec) + except + on E:Exception do + HandleBackGroundException(E); + end; + end + else + inherited WndProc(MsgRec); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.WMTriggerDataAvailable(var msg: TMessage); +begin + while FRcvdCnt > 0 do + TriggerDataAvailable(0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.SetLineMode(newValue : Boolean); +begin + if FLineMode = newValue then + Exit; + FLineMode := newValue; + if (FRcvdCnt > 0) or (FLineLength > 0) then + PostMessage(Handle, WM_TRIGGER_DATA_AVAILABLE, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomLineWSocket.GetRcvdCount : LongInt; +begin + if not FLineMode then + Result := inherited GetRcvdCount + else + Result := FLineLength; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomLineWSocket.DoRecv( + var Buffer; + BufferSize : Integer; + Flags : Integer) : Integer; +begin + if FLineMode and (FLineLength > 0) then begin + { We are in line mode an a line is received } + if FLineLength <= BufferSize then begin + { User buffer is greater than received data, copy all and clear } + Move(FRcvdPtr^, Buffer, FLineLength); + Result := FLineLength; + FLineLength := 0; + Exit; + end; + { User buffer is smaller, copy as much as possible } + Move(FRcvdPtr^, Buffer, BufferSize); + Result := BufferSize; + { Move the end of line to beginning of buffer to be read the next time } + Move(FRcvdPtr[BufferSize], FRcvdPtr^, FLineLength - BufferSize); + FLineLength := FLineLength - BufferSize; + Exit; + end; + + if FLineMode or (FRcvdCnt <= 0) then begin + { There is nothing in our internal buffer } + Result := inherited DoRecv(Buffer, BufferSize, Flags); + Exit; + end; + + { We already have received data into our internal buffer } + if FRcvdCnt <= BufferSize then begin + { User buffer is greater than received data, copy all and clear } + Move(FRcvdPtr^, Buffer, FRcvdCnt); + Result := FRcvdCnt; + FRcvdCnt := 0; + Exit; + end; + { User buffer is smaller, copy as much as possible } + Move(FRcvdPtr^, Buffer, BufferSize); + Result := BufferSize; + FRcvdPtr := FRcvdPtr + BufferSize; + FRcvdCnt := FRcvdCnt - BufferSize; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Edit received data. Handle TAB and BACKSPACE characters. } +{ A data packet has been received into FRcvPtr buffer, starting from } +{ FRcvdCnt offset. Packet size if passed as the Len argument. } +procedure TCustomLineWSocket.EditLine(var Len : Integer); +var + Buf : PChar; + BufSize : Integer; + I : Integer; + J : Integer; + Edited : Boolean; + NewCnt : Integer; + NewSize : Integer; +const + BackString : String = #8 + ' ' + #8; +begin + BufSize := 0; + try + Edited := FALSE; + I := FRcvdCnt; + J := FRcvdCnt; + NewCnt := FRcvdCnt; + { Loop to process all received char } + while I < (FRcvdCnt + Len) do begin + if FRcvdPtr[I] = #8 then begin { BACKSPACE character } + if FLineEcho and (J > 0) then + SendStr(BackString); + if not Edited then begin + { Not edited yet, so we allocate a buffer to store } + { edited data and we remember we edited data. } + Edited := TRUE; + { Computer buffer size as a multiple of 256 bytes } + BufSize := ((FRcvdCnt + Len + 256) shr 8) shl 8; + GetMem(Buf, BufSize); + { Copy data already processed } + Move(FRcvdPtr^, Buf^, I); + end; + if J > 0 then begin + Dec(J); + if J < NewCnt then + NewCnt := J; + end; + Inc(I); + end + else if FRcvdPtr[I] = #9 then begin { TAB character } + if not Edited then begin + { Not edited yet, so we allocate a buffer to store } + { edited data and we remember we edited data. } + Edited := TRUE; + { Computer buffer size as a multiple of 256 bytes } + BufSize := ((FRcvdCnt + Len + 256) shr 8) shl 8; + GetMem(Buf, BufSize); + { Copy data already processed } + Move(FRcvdPtr^, Buf^, I); + end; + repeat + if FLineEcho then + SendStr(' '); + Buf[J] := ' '; + Inc(J); + until (J and 7) = 0; + Inc(I); + end + else begin + if FLineEcho then + Send(@FRcvdPtr[I], 1); + if Edited then begin + if J >= BufSize then begin + { Need to allocate more buffer space } + NewSize := BufSize + 256; + {$IFDEF VER80} + ReallocMem(Buf, BufSize, NewSize); + {$ELSE} + ReallocMem(Buf, NewSize); + {$ENDIF} + BufSize := NewSize; + end; + Buf[J] := FRcvdPtr[I]; + end; + Inc(I); + Inc(J); + end; + end; + if Edited then begin + if J >= FRcvBufSize then begin + { Current buffer is too small, allocate larger } + NewSize := J + 1; + {$IFDEF VER80} + ReallocMem(FRcvdPtr, FRcvBufSize, NewSize); + {$ELSE} + ReallocMem(FRcvdPtr, NewSize); + {$ENDIF} + FRcvBufSize := NewSize; + end; + { Move edited data back to original buffer } + Move(Buf^, FRcvdPtr^, J); + FRcvdPtr[J] := #0; + FRcvdCnt := NewCnt; + Len := J - FRcvdCnt; + end; + finally + if BufSize > 0 then + FreeMem(Buf, BufSize); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomLineWSocket.TriggerDataAvailable(Error : Word) : Boolean; +var + Cnt : Integer; + Len : Integer; + NewSize : Integer; + SearchFrom : Integer; + I : Integer; + Found : Boolean; +begin + if (not FLineMode) or (Length(FLineEnd) = 0) then begin + { We are not in line mode } + Result := inherited TriggerDataAvailable(Error); + Exit; + end; + + { We are in line mode. We receive data ourself } + + Result := TRUE; + Cnt := inherited GetRcvdCount; + if Cnt <= 0 then + Exit; + if (FRcvdCnt + Cnt + 1) > FRcvBufSize then begin + { Current buffer is too small, allocate larger } + NewSize := FRcvdCnt + Cnt + 1; + {$IFDEF VER80} + ReallocMem(FRcvdPtr, FRcvBufSize, NewSize); + {$ELSE} + ReallocMem(FRcvdPtr, NewSize); + {$ENDIF} + FRcvBufSize := NewSize; + end; + + Len := Receive(FRcvdPtr + FRcvdCnt, Cnt); + if Len <= 0 then + Exit; + FRcvdPtr[FRcvdCnt + Len] := #0; + if FLineEdit then + EditLine(Len) + else if FLineEcho then + Send(FRcvdPtr + FRcvdCnt, Len); + SearchFrom := FRcvdCnt - Length(FLineEnd); + if SearchFrom < 0 then + SearchFrom := 0; + FRcvdCnt := FRcvdCnt + Len; + while FLineMode do begin + Found := FALSE; + I := SearchFrom; + while I < (FRcvdCnt - Length(FLineEnd) + 1) do begin + if FRcvdPtr[I] = FLineEnd[1] then begin + Found := (StrLComp(@FRcvdPtr[I], @FLineEnd[1], Length(FLineEnd)) = 0); + if Found then + break; { Found the end of line marker } + end; + Inc(I); + end; + if not Found then + break; + FLineLength := I + Length(FLineEnd); + FLineReceivedFlag := TRUE; + { We received a complete line. We need to signal it to application } + { The application may not have a large buffer so we may need } + { several events to read the entire line. In the meanwhile, the } + { application may turn line mode off. } + while FLineMode and (FLineLength > 0) do begin + if not inherited TriggerDataAvailable(0) then + { There is no handler installed } + FLineLength := 0; + end; + { Move remaining data in front of buffer } + if FLineLength > 0 then begin + { Line mode was turned off in the middle of a line read. } + { We preserve unread line and other received data. } + Move(FRcvdPtr[I], FRcvdPtr[FLineLength], + FRcvdCnt - I); + FRcvdCnt := FRcvdCnt - I + FLineLength; + end + else begin + Move(FRcvdPtr[I + Length(FLineEnd)], FRcvdPtr[0], + FRcvdCnt - I - Length(FLineEnd)); + FRcvdCnt := FRcvdCnt - I - Length(FLineEnd); + end; + FRcvdPtr[FRcvdCnt] := #0; + SearchFrom := 0; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomLineWSocket.TriggerSessionClosed(Error : Word); +begin + FLineReceivedFlag := TRUE; + if FRcvdPtr <> nil then begin + if FLineMode and (FRcvdCnt > 0) then begin + FLineLength := FRcvdCnt; + while FLineMode and (FLineLength > 0) do + inherited TriggerDataAvailable(0); + end; + + FreeMem(FRcvdPtr, FRcvBufSize); + FRcvdPtr := nil; + FRcvBufSize := 0; + FRcvdCnt := 0; + end; + inherited TriggerSessionClosed(Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + X X X X X X X X X + X X X X X X X X X + X X X X X X X + X X X X X X X + X X X X X + X X X X X X X X + X X X X X X X X X + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSyncWSocket.InternalDataAvailable( + Sender : TObject; + Error : Word); +var + Len : Integer; +begin + SetLength(FLinePointer^, FLineLength); + Len := Receive(@FLinePointer^[1], FLineLength); + if Len <= 0 then + FLinePointer^ := '' + else + SetLength(FLinePointer^, Len); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSyncWSocket.WaitUntilReady(var DoneFlag : Boolean) : Integer; +begin + Result := 0; { Suppose success } + FTimeStop := Integer(GetTickCount) + FTimeout; + while TRUE do begin + if DoneFlag then begin + Result := 0; + break; + end; + + if ((FTimeout > 0) and (Integer(GetTickCount) > FTimeStop)) or +{$IFNDEF NOFORMS} + Application.Terminated or +{$ENDIF} + FTerminated then begin + { Application is terminated or timeout occured } + Result := WSA_WSOCKET_TIMEOUT; + break; + end; + MessagePump; +{$IFNDEF VER80} + { Do not use 100% CPU, but slow down transfert on high speed LAN } + Sleep(0); +{$ENDIF} + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TCustomSyncWSocket.Synchronize( + Proc : TWSocketSyncNextProc; + var DoneFlag : Boolean) : Integer; +begin + DoneFlag := FALSE; + if Assigned(Proc) then + Proc; + Result := WaitUntilReady(DoneFlag); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TCustomSyncWSocket.ReadLine( + Timeout : Integer; { seconds if positive, milli-seconds if negative } + var Buffer : String); +var + OldDataAvailable : TDataAvailable; + OldLineMode : Boolean; + Status : Integer; +begin + Buffer := ''; + if FState <> wsConnected then begin + RaiseException('ReadLine failed: not connected'); + Exit; + end; + + { Positive timeout means seconds. Negative means milli-seconds } + { Null means 60 seconds. } + if TimeOut = 0 then + FTimeOut := 60000 + else if TimeOut > 0 then + FTimeOut := Timeout * 1000 + else + FTimeOut := -Timeout; + + FLineReceivedFlag := FALSE; + FLinePointer := @Buffer; + { Save existing OnDataAvailable handler and install our own } + OldDataAvailable := FOnDataAvailable; + FOnDataAvailable := InternalDataAvailable; + { Save existing line mode and turn it on } + OldLineMode := FLineMode; + FLineMode := TRUE; + try + Status := Synchronize(nil, FLineReceivedFlag); + if Status = WSA_WSOCKET_TIMEOUT then begin + { Sender didn't send line end within allowed time. Get all } + { data available so far. } + if FRcvdCnt > 0 then begin + SetLength(Buffer, FRcvdCnt); + Move(FRcvdPtr^, Buffer[1], FRcvdCnt); + FRcvdCnt := 0; + end; + end; + { Should I raise an exception to tell the application that } + { some error occured ? } + finally + FOnDataAvailable := OldDataAvailable; + FLineMode := OldLineMode; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{$IFDEF VER80} +begin + IPList := TStringList.Create; + { + Delphi 1 has no finalization. When your application terminates, you + should add a call to WSocketUnloadWinsock to unload winsock from memory. + It is done automatically for you when the last TWSocket component is + destroyed but if you do any winsock call after that, you must call + WSocketUnloadWinsock yourself. It is safe to call WSocketUnloadWinsock + even if it has already been done. + } +{$ELSE} +initialization + IPList := TStringList.Create; + +finalization + if Assigned(IPList) then begin + IPList.Destroy; + IPList := nil; + end; + WSocketUnloadWinsock; + +{$ENDIF} + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + diff --git a/lib/telnet/WSockBuf.dcu b/lib/telnet/WSockBuf.dcu new file mode 100644 index 00000000..7f58638d Binary files /dev/null and b/lib/telnet/WSockBuf.dcu differ diff --git a/lib/telnet/Wait.dcu b/lib/telnet/Wait.dcu new file mode 100644 index 00000000..0a919093 Binary files /dev/null and b/lib/telnet/Wait.dcu differ diff --git a/lib/telnet/Wsocket.dcu b/lib/telnet/Wsocket.dcu new file mode 100644 index 00000000..e92b9069 Binary files /dev/null and b/lib/telnet/Wsocket.dcu differ diff --git a/lib/telnet/mtsrv1.dfm b/lib/telnet/mtsrv1.dfm new file mode 100644 index 00000000..867a080e Binary files /dev/null and b/lib/telnet/mtsrv1.dfm differ diff --git a/lib/telnet/mtsrv1.pas b/lib/telnet/mtsrv1.pas new file mode 100644 index 00000000..ec2c3880 --- /dev/null +++ b/lib/telnet/mtsrv1.pas @@ -0,0 +1,291 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This little application shows how to use the TWSocket in a + multithreaded application. It is a very basic telnet werver. + Each time a client connect to the server, he receive an "hello" + message. Then every character sent is echoed back to the client. + There are two units is this application: one for the main + server code, and one for the client thread. + Each time a client connect to the server, a new TWSocket is + created and a new thread is launched to handle the client + work. When the client disconnect, the TWSocket and the thread + are destroyed. + To see this demo working on your computer, start the demo then + start several copies of the TELNET client program (the one which + comes with Windows 95 is perfect). Then using each telnet, connect + to 127.0.0.1. You'll see a new connection in the list box. You + must receive the "hello" message and see each character as you + type them. You can use the Disconnect button from the application + or from the telnet client to see what happends (the connection + should be closed). +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: September 21, 1997 +Version: 1.01 +Support: EMail to the author +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Nov 18, 1997 Corrected isxdigit (By Paul Taylor ) + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit mtsrv1; + +interface + +{$IFDEF VER80} + 'This sample program use threads and hence is not compatible with Delphi 1'; +{$ENDIF} + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + WSocket, MTSrv2, StdCtrls; + +type + TServerForm = class(TForm) + ServerWSocket: TWSocket; + DisconnectButton: TButton; + QuitButton: TButton; + ClientListBox: TListBox; + DisconnectAllButton: TButton; + Button1: TButton; + procedure ServerWSocketSessionAvailable(Sender: TObject; Error: Word); + procedure FormShow(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure QuitButtonClick(Sender: TObject); + procedure DisconnectAllButtonClick(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure Button1Click(Sender: TObject); + private + procedure ClientThreadTerminate(Sender: TObject); + procedure DisconnectAll; + public + procedure SendAll(str : string); + end; + +var + ServerForm: TServerForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check if a character is a valid hex digit } +function isxdigit(Ch : char) : Boolean; +begin + Result := (ch in ['0'..'9']) or (ch in ['a'..'f']) or (ch in ['A'..'F']); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Convert an hexdigit to an integer } +function xdigit(Ch : char) : Integer; +begin + if ch in ['0'..'9'] then + Result := ord(Ch) - ord('0') + else + Result := (ord(Ch) and 15) + 9; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Convert the ascii representation of a hex number to an integer } +function htoi(value : PChar) : Integer; +var + i : Integer; +begin + Result := 0; + i := 0; + while (Value[i] <> #0) and (Value[i] = ' ') do + i := i + 1; + while (Value[i] <> #0) and (isxDigit(Value[i])) do begin + Result := Result * 16 + xdigit(Value[i]); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is generated when a client is connecting } +procedure TServerForm.ServerWSocketSessionAvailable(Sender: TObject; + Error: Word); +var + ClientThread : TClientThread; +begin + { Create a new thread to handle client request } + ClientThread := TClientThread.Create(ServerWSocket.Accept); + + { Assign the thread's OnTerminate event } + ClientThread.OnTerminate := ClientThreadTerminate; + + { Add the thread to the listbox which is our client list } + ClientListBox.Items.Add(IntToHex(Integer(ClientThread), 8)); + + { Then start the client thread work } + { because it was created in the blocked state } + ClientThread.Resume; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +begin + if FirstTime then begin + FirstTime := FALSE; + if WSocket.WSocketVersion < 202 then + raise Exception.Create( + 'Please update your wsocket.pas to version 2.02 or later. ' + + 'Free download at http://www.rtfm.be/fpiette'); + + ServerWSocket.Proto := 'tcp'; { We use a TCP connection } + ServerWSocket.Port := 'telnet'; { We wants to use telnet } + ServerWSocket.Addr := '0.0.0.0'; { We accept any client } + ServerWSocket.Listen; { Start server accepting } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is generated when the user clicks on the 'Disconnect' button } +{ when he wants to disconnect the selected client in the listbox. } +procedure TServerForm.DisconnectButtonClick(Sender: TObject); +var + ClientThread : TClientThread; + Buf : String; +begin + { No selected item, nothing to do } + if ClientListBox.ItemIndex < 0 then + Exit; + + { Extract the ClientThread pointer from the list box } + Buf := ClientListBox.Items[ClientListBox.ItemIndex]; + ClientThread := TClientThread(htoi(PChar(Buf))); + + { Call ClientThread.Release which will stop the thread } + { In consequence, the OnTerminate event will be generated } + ClientThread.Release; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when one of the client thread terminate } +{ We will find this thread in our listbox, remove it and destroy the } +{ TWSocket object use by the corresponding client. } +procedure TServerForm.ClientThreadTerminate(Sender: TObject); +var + ClientThread : TClientThread; + Buf : String; + Index : Integer; +begin + { A thread has been terminated, remove it from our list and destroy } + { the ClientWSocket we passed to the thread. } + for Index := 0 to ClientListBox.Items.Count - 1 do begin + Buf := ClientListBox.Items[Index]; + ClientThread := TClientThread(htoi(PChar(Buf))); + if ClientThread = TClientThread(Sender) then begin + { Remove the client from our listbox } + ClientListBox.Items.Delete(Index); + Break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure scan the listbox and halt every ClientThread } +procedure TServerForm.DisconnectAll; +var + ClientThread : TClientThread; + Buf : String; +begin + while ClientListBox.Items.Count > 0 do begin + Buf := ClientListBox.Items[0]; + ClientThread := TClientThread(htoi(PChar(Buf))); + ClientThread.Release; + Application.ProcessMessages; + end; +end; + +procedure TServerForm.SendAll(str : string); +var + ClientThread : TClientThread; + Buf : String; +begin + for i := 0 to ClientListBox.ITems.Count - 1 do begin + Buf := ClientListBox.Items[i]; + ClientThread := TClientThread(htoi(PChar(Buf))); + ClientThread.ClientWSocket.SendStr(str); + //Application.ProcessMessages; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.QuitButtonClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.DisconnectAllButtonClick(Sender: TObject); +begin + DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); +begin + DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +procedure TServerForm.Button1Click(Sender: TObject); +var i : integer; + str : string; +begin + + str := ''; + for i := 1 to 75 do + str := str + '.'; + for i := 1 to 75 do + begin + str[i] := '*'; + SendAll(str + #13); + end; +end; + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/mtsrv1.~df b/lib/telnet/mtsrv1.~df new file mode 100644 index 00000000..3ca87c20 Binary files /dev/null and b/lib/telnet/mtsrv1.~df differ diff --git a/lib/telnet/mtsrv1.~pa b/lib/telnet/mtsrv1.~pa new file mode 100644 index 00000000..635b5ecd --- /dev/null +++ b/lib/telnet/mtsrv1.~pa @@ -0,0 +1,259 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This little application shows how to use the TWSocket in a + multithreaded application. It is a very basic telnet werver. + Each time a client connect to the server, he receive an "hello" + message. Then every character sent is echoed back to the client. + There are two units is this application: one for the main + server code, and one for the client thread. + Each time a client connect to the server, a new TWSocket is + created and a new thread is launched to handle the client + work. When the client disconnect, the TWSocket and the thread + are destroyed. + To see this demo working on your computer, start the demo then + start several copies of the TELNET client program (the one which + comes with Windows 95 is perfect). Then using each telnet, connect + to 127.0.0.1. You'll see a new connection in the list box. You + must receive the "hello" message and see each character as you + type them. You can use the Disconnect button from the application + or from the telnet client to see what happends (the connection + should be closed). +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: September 21, 1997 +Version: 1.01 +Support: EMail to the author +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Nov 18, 1997 Corrected isxdigit (By Paul Taylor ) + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit mtsrv1; + +interface + +{$IFDEF VER80} + 'This sample program use threads and hence is not compatible with Delphi 1'; +{$ENDIF} + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + WSocket, MTSrv2, StdCtrls; + +type + TServerForm = class(TForm) + ServerWSocket: TWSocket; + DisconnectButton: TButton; + QuitButton: TButton; + ClientListBox: TListBox; + DisconnectAllButton: TButton; + procedure ServerWSocketSessionAvailable(Sender: TObject; Error: Word); + procedure FormShow(Sender: TObject); + procedure DisconnectButtonClick(Sender: TObject); + procedure QuitButtonClick(Sender: TObject); + procedure DisconnectAllButtonClick(Sender: TObject); + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + private + procedure ClientThreadTerminate(Sender: TObject); + procedure DisconnectAll; + end; + +var + ServerForm: TServerForm; + +implementation + +{$R *.DFM} + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Check if a character is a valid hex digit } +function isxdigit(Ch : char) : Boolean; +begin + Result := (ch in ['0'..'9']) or (ch in ['a'..'f']) or (ch in ['A'..'F']); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Convert an hexdigit to an integer } +function xdigit(Ch : char) : Integer; +begin + if ch in ['0'..'9'] then + Result := ord(Ch) - ord('0') + else + Result := (ord(Ch) and 15) + 9; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Convert the ascii representation of a hex number to an integer } +function htoi(value : PChar) : Integer; +var + i : Integer; +begin + Result := 0; + i := 0; + while (Value[i] <> #0) and (Value[i] = ' ') do + i := i + 1; + while (Value[i] <> #0) and (isxDigit(Value[i])) do begin + Result := Result * 16 + xdigit(Value[i]); + i := i + 1; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is generated when a client is connecting } +procedure TServerForm.ServerWSocketSessionAvailable(Sender: TObject; + Error: Word); +var + ClientThread : TClientThread; +begin + { Create a new thread to handle client request } + ClientThread := TClientThread.Create(ServerWSocket.Accept); + + { Assign the thread's OnTerminate event } + ClientThread.OnTerminate := ClientThreadTerminate; + + { Add the thread to the listbox which is our client list } + ClientListBox.Items.Add(IntToHex(Integer(ClientThread), 8)); + + { Then start the client thread work } + { because it was created in the blocked state } + ClientThread.Resume; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormShow(Sender: TObject); +const + FirstTime : Boolean = TRUE; +begin + if FirstTime then begin + FirstTime := FALSE; + if WSocket.WSocketVersion < 202 then + raise Exception.Create( + 'Please update your wsocket.pas to version 2.02 or later. ' + + 'Free download at http://www.rtfm.be/fpiette'); + + ServerWSocket.Proto := 'tcp'; { We use a TCP connection } + ServerWSocket.Port := 'telnet'; { We wants to use telnet } + ServerWSocket.Addr := '0.0.0.0'; { We accept any client } + ServerWSocket.Listen; { Start server accepting } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event is generated when the user clicks on the 'Disconnect' button } +{ when he wants to disconnect the selected client in the listbox. } +procedure TServerForm.DisconnectButtonClick(Sender: TObject); +var + ClientThread : TClientThread; + Buf : String; +begin + { No selected item, nothing to do } + if ClientListBox.ItemIndex < 0 then + Exit; + + { Extract the ClientThread pointer from the list box } + Buf := ClientListBox.Items[ClientListBox.ItemIndex]; + ClientThread := TClientThread(htoi(PChar(Buf))); + + { Call ClientThread.Release which will stop the thread } + { In consequence, the OnTerminate event will be generated } + ClientThread.Release; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when one of the client thread terminate } +{ We will find this thread in our listbox, remove it and destroy the } +{ TWSocket object use by the corresponding client. } +procedure TServerForm.ClientThreadTerminate(Sender: TObject); +var + ClientThread : TClientThread; + Buf : String; + Index : Integer; +begin + { A thread has been terminated, remove it from our list and destroy } + { the ClientWSocket we passed to the thread. } + for Index := 0 to ClientListBox.Items.Count - 1 do begin + Buf := ClientListBox.Items[Index]; + ClientThread := TClientThread(htoi(PChar(Buf))); + if ClientThread = TClientThread(Sender) then begin + { Remove the client from our listbox } + ClientListBox.Items.Delete(Index); + Break; + end; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This procedure scan the listbox and halt every ClientThread } +procedure TServerForm.DisconnectAll; +var + ClientThread : TClientThread; + Buf : String; +begin + while ClientListBox.Items.Count > 0 do begin + Buf := ClientListBox.Items[0]; + ClientThread := TClientThread(htoi(PChar(Buf))); + ClientThread.Release; + Application.ProcessMessages; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.QuitButtonClick(Sender: TObject); +begin + Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.DisconnectAllButtonClick(Sender: TObject); +begin + DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TServerForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean); +begin + DisconnectAll; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/mtsrv2.pas b/lib/telnet/mtsrv2.pas new file mode 100644 index 00000000..0dbe48cf --- /dev/null +++ b/lib/telnet/mtsrv2.pas @@ -0,0 +1,192 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This little application shows how to use the TWSocket in a + multithreaded application. It is a very basic telnet werver. + Each time a client connect to the server, he receive an "hello" + message. Then every character sent is echoed back to the client. + There are two units is this application: one for the main + server code, and one for the client thread. + Each time a client connect to the server, a new TWSocket is + created and a new thread is launched to handle the client + work. When the client disconnect, the TWSocket and the thread + are destroyed. + To see this demo working on your computer, start the demo then + start several copies of the TELNET client program (the one which + comes with Windows 95 is perfect). Then using each telnet, connect + to 127.0.0.1. You'll see a new connection in the list box. You + must receive the "hello" message and see each character as you + type them. You can use the Disconnect button from the application + or from the telnet client to see what happends (the connection + should be closed). +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: September 21, 1997 +Version: 1.00 +Support: EMail to the author +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit mtsrv2; + +interface + +uses + Windows, Messages, Classes, {winsock,} wsocket; + +type + TClientThread = class(TThread) + private + FClientSocket : TWSocket; + FClientHSocket : TSocket; + procedure ServerWSocketDataAvailable(Sender: TObject; Error: Word); + procedure ServerWSocketSessionClosed(Sender: TObject; Error: Word); + protected + procedure Execute; override; + public + constructor Create(ClientHSocket : TSocket); + destructor Destroy; override; + procedure Release; + + property ClientWSocket : TWSocket read FClientSocket write FClientSocket; + end; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Create a new thread in the blocked state. This allow the user to register } +{ the client thread before it actually start working. } +constructor TClientThread.Create(ClientHSocket : TSocket); +begin + FClientHSocket := ClientHSocket; + FreeOnTerminate := TRUE; + inherited Create(TRUE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Destroy the thread. Destroy the ClientWSocket if needed. } +destructor TClientThread.Destroy; +begin + if Assigned(FClientSocket) then begin + FClientSocket.Destroy; + FClientSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This method will be called by the main server thread to terminated a } +{ client thread. } +procedure TClientThread.Release; +begin + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the main thread routine. There is not much to do because TWSocket } +{ is event drive. So everythong to do is done inside an event handler, } +{ mostly the OnDataAvailable event handler which is triggered each time } +{ the client send something to the server. } +procedure TClientThread.Execute; +begin + { Create the client TWSocket. It is important to create it inside the } + { Execute method because it *must* be created by the thread. Otherwise } + { the messages sent by winsock would be processed in the main thread } + { context, effectively disabling multi-threading. } + FClientSocket := TWSocket.Create(nil); + FClientSocket.HSocket := FClientHSocket; + FClientSocket.OnDataAvailable := ServerWSocketDataAvailable; + FClientSocket.OnSessionClosed := ServerWSocketSessionClosed; + + { Send the welcome message } + FClientSocket.SendStr('Hello !' + #10 + #13 + '> '); + + { Message loop to handle TWSocket messages } + { The loop is exited when WM_QUIT message is received } + FClientSocket.MessageLoop; + + { Returning from the Execute function effectively terminate the thread } + ReturnValue := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client connection is closed. } +procedure TClientThread.ServerWSocketSessionClosed( + Sender: TObject; Error: Word); +begin + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client has sent some data to the } +{ server. It is here that we must place the client requests execution } +{ probably by assembling data in lines, parsing those lines for commands } +{ and executing the commands. Here for simplicity, we just echo back the } +{ data sent by the user, without doing anything serious. } +{ To demonstrate that blocking a thread do not block the others, when a '*' } +{ is received, we go to Sleep for a few seconds, effectively blocking the } +{ the client. But as we are multi-threaded, this do not block any other } +{ client. } +{ Do not forget to call the Synchronize method if you need to update the } +{ user interface. Only the main thread can do it (VCL is not thread safe). } +procedure TClientThread.ServerWSocketDataAvailable( + Sender: TObject; + Error: Word); +var + Buffer : array [0..4095] of char; + Count : Integer; +begin + { Receive as much data as possible } + Count := FClientSocket.Receive(@Buffer, SizeOf(Buffer)); + + { If data received, then process it } + if Count > 0 then begin + if Buffer[0] = '*' then begin + { If the first character is '*' then go to sleep a while } + FClientSocket.SendStr('Sleeping for 15 sec...' + #10 + #13); + Sleep(15000); + FClientSocket.SendStr('Wake up !' + #10 + #13); + end + else + { Just echo data back to client } + FClientSocket.Send(@Buffer, Count); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/mtsrv2.~pa b/lib/telnet/mtsrv2.~pa new file mode 100644 index 00000000..2fdbcb79 --- /dev/null +++ b/lib/telnet/mtsrv2.~pa @@ -0,0 +1,192 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Author: Franois PIETTE +Description: This little application shows how to use the TWSocket in a + multithreaded application. It is a very basic telnet werver. + Each time a client connect to the server, he receive an "hello" + message. Then every character sent is echoed back to the client. + There are two units is this application: one for the main + server code, and one for the client thread. + Each time a client connect to the server, a new TWSocket is + created and a new thread is launched to handle the client + work. When the client disconnect, the TWSocket and the thread + are destroyed. + To see this demo working on your computer, start the demo then + start several copies of the TELNET client program (the one which + comes with Windows 95 is perfect). Then using each telnet, connect + to 127.0.0.1. You'll see a new connection in the list box. You + must receive the "hello" message and see each character as you + type them. You can use the Disconnect button from the application + or from the telnet client to see what happends (the connection + should be closed). +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Creation: September 21, 1997 +Version: 1.00 +Support: EMail to the author +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit mtsrv2; + +interface + +uses + Windows, Messages, Classes, winsock, wsocket; + +type + TClientThread = class(TThread) + private + FClientSocket : TWSocket; + FClientHSocket : TSocket; + procedure ServerWSocketDataAvailable(Sender: TObject; Error: Word); + procedure ServerWSocketSessionClosed(Sender: TObject; Error: Word); + protected + procedure Execute; override; + public + constructor Create(ClientHSocket : TSocket); + destructor Destroy; override; + procedure Release; + + property ClientWSocket : TWSocket read FClientSocket write FClientSocket; + end; + +implementation + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Create a new thread in the blocked state. This allow the user to register } +{ the client thread before it actually start working. } +constructor TClientThread.Create(ClientHSocket : TSocket); +begin + FClientHSocket := ClientHSocket; + FreeOnTerminate := TRUE; + inherited Create(TRUE); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ Destroy the thread. Destroy the ClientWSocket if needed. } +destructor TClientThread.Destroy; +begin + if Assigned(FClientSocket) then begin + FClientSocket.Destroy; + FClientSocket := nil; + end; + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This method will be called by the main server thread to terminated a } +{ client thread. } +procedure TClientThread.Release; +begin + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This is the main thread routine. There is not much to do because TWSocket } +{ is event drive. So everythong to do is done inside an event handler, } +{ mostly the OnDataAvailable event handler which is triggered each time } +{ the client send something to the server. } +procedure TClientThread.Execute; +begin + { Create the client TWSocket. It is important to create it inside the } + { Execute method because it *must* be created by the thread. Otherwise } + { the messages sent by winsock would be processed in the main thread } + { context, effectively disabling multi-threading. } + FClientSocket := TWSocket.Create(nil); + FClientSocket.HSocket := FClientHSocket; + FClientSocket.OnDataAvailable := ServerWSocketDataAvailable; + FClientSocket.OnSessionClosed := ServerWSocketSessionClosed; + + { Send the welcome message } + FClientSocket.SendStr('Hello !' + #10 + #13 + '> '); + + { Message loop to handle TWSocket messages } + { The loop is exited when WM_QUIT message is received } + FClientSocket.MessageLoop; + + { Returning from the Execute function effectively terminate the thread } + ReturnValue := 0; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client connection is closed. } +procedure TClientThread.ServerWSocketSessionClosed( + Sender: TObject; Error: Word); +begin + PostMessage(FClientSocket.Handle, WM_QUIT, 0, 0); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +{ This event handler is called when the client has sent some data to the } +{ server. It is here that we must place the client requests execution } +{ probably by assembling data in lines, parsing those lines for commands } +{ and executing the commands. Here for simplicity, we just echo back the } +{ data sent by the user, without doing anything serious. } +{ To demonstrate that blocking a thread do not block the others, when a '*' } +{ is received, we go to Sleep for a few seconds, effectively blocking the } +{ the client. But as we are multi-threaded, this do not block any other } +{ client. } +{ Do not forget to call the Synchronize method if you need to update the } +{ user interface. Only the main thread can do it (VCL is not thread safe). } +procedure TClientThread.ServerWSocketDataAvailable( + Sender: TObject; + Error: Word); +var + Buffer : array [0..4095] of char; + Count : Integer; +begin + { Receive as much data as possible } + Count := FClientSocket.Receive(@Buffer, SizeOf(Buffer)); + + { If data received, then process it } + if Count > 0 then begin + if Buffer[0] = '*' then begin + { If the first character is '*' then go to sleep a while } + FClientSocket.SendStr('Sleeping for 15 sec...' + #10 + #13); + Sleep(15000); + FClientSocket.SendStr('Wake up !' + #10 + #13); + end + else + { Just echo data back to client } + FClientSocket.Send(@Buffer, Count); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/tncnx2.pas b/lib/telnet/tncnx2.pas new file mode 100644 index 00000000..ece3afc0 --- /dev/null +++ b/lib/telnet/tncnx2.pas @@ -0,0 +1,680 @@ +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + +Program: TNCNX.PAS +Object: Delphi component which implement the TCP/IP telnet protocol + including some options negociations. + RFC854, RFC885, RFC779, RFC1091 +Author: Franois PIETTE +EMail: francois.piette@ping.be http://www.rtfm.be/fpiette + francois.piette@f2202.n293.z2.fidonet.org + 2:293/2202@fidonet.org, BBS +32-4-3651395 +Support: Please ask your question in the following newsgroup: + news://forums.borland.com/borland.public.delphi.vcl.components.using +Creation: April, 1996 +Version: 2.03 +Legal issues: Copyright (C) 1997 by Franois PIETTE + + This software is provided 'as-is', without any express or + implied warranty. In no event will the author be held liable + for any damages arising from the use of this software. + + Permission is granted to anyone to use this software for any + purpose, including commercial applications, and to alter it + and redistribute it freely, subject to the following + restrictions: + + 1. The origin of this software must not be misrepresented, + you must not claim that you wrote the original software. + If you use this software in a product, an acknowledgment + in the product documentation would be appreciated but is + not required. + + 2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. + +Updates: +Jul 22, 1997 Adapted to Delphi 3 +Sep 5, 1997 Added version information, removed old code, added OnTermType + Renamed some indentifier to be more standard. +Sep 24, 1997 V203. Added procedures to negociate options + + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +unit tncnx2; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Controls, Forms, + WSocket, Winsock; + +const + TnCnxVersion = 203; + + { Telnet command characters } + TNCH_EOR = #239; { $EF End Of Record (preceded by IAC) } + TNCH_SE = #240; { $F0 End of subnegociation parameters } + TNCH_NOP = #241; { $F1 No operation } + TNCH_DATA_MARK = #242; { $F2 Data stream portion of a Synch } + TNCH_BREAK = #243; { $F3 NVT charcater break } + TNCH_IP = #244; { $F4 Interrupt process } + TNCH_AO = #245; { $F5 Abort output } + TNCH_AYT = #246; { $F6 Are you there } + TNCH_EC = #247; { $F7 Erase character } + TNCH_EL = #248; { $F8 Erase line } + TNCH_GA = #249; { $F9 Go ahead } + TNCH_SB = #250; { $FA Subnegociation } + TNCH_WILL = #251; { $FB Will } + TNCH_WONT = #252; { $FC Wont } + TNCH_DO = #253; { $FD Do } + TNCH_DONT = #254; { $FE Dont } + TNCH_IAC = #255; { $FF IAC } + + { Telnet options } + TN_TRANSMIT_BINARY = #0; { $00 } + TN_ECHO = #1; { $01 } + TN_RECONNECTION = #2; { $02 } + TN_SUPPRESS_GA = #3; { $03 } + TN_MSG_SZ_NEGOC = #4; { $04 } + TN_STATUS = #5; { $05 } + TN_TIMING_MARK = #6; { $06 } + TN_NOPTIONS = #6; { $06 } + TN_DET = #20; { $14 } + TN_SEND_LOC = #23; { $17 } + TN_TERMTYPE = #24; { $18 } + TN_EOR = #25; { $19 } + TN_NAWS = #31; { $1F } + TN_TERMSPEED = #32; { $20 } + TN_TFC = #33; { $21 } + TN_XDISPLOC = #35; { $23 } + TN_EXOPL = #255; { $FF } + + TN_TTYPE_SEND = #1; + TN_TTYPE_IS = #0; + +type + TTnCnx = class; + + TTnSessionConnected = procedure (Sender: TTnCnx; Error : word) of object; + TTnSessionClosed = procedure (Sender: TTnCnx; Error : word) of object; + TTnDataAvailable = procedure (Sender: TTnCnx; Buffer : PChar; Len : Integer) of object; + TTnDisplay = procedure (Sender: TTnCnx; Str : String) of object; + + TTnCnx= class(TComponent) + public + Socket : TWSocket; + private + FPort : String; + FHost : String; + FLocation : String; + FTermType : String; + RemoteBinMode : Boolean; + LocalBinMode : Boolean; + FLocalEcho : Boolean; + Spga : Boolean; + FTType : Boolean; + FBuffer : array [0..2048] of char; //yohei + FBufferCnt : Integer; + FWindowHandle : HWND; + FOnSessionConnected : TTnSessionConnected; + FOnSessionClosed : TTnSessionClosed; + FOnDataAvailable : TTnDataAvailable; + FOnDisplay : TTnDisplay; + FOnEOR : TNotifyEvent; + FOnSendLoc : TNotifyEvent; + FOnTermType : TNotifyEvent; + FOnLocalEcho : TNotifyEvent; + procedure WndProc(var MsgRec: TMessage); + procedure SocketSessionConnected(Sender: TObject; Error : word); + procedure SocketSessionClosed(Sender: TObject; Error : word); + procedure SocketDataAvailable(Sender: TObject; Error : word); + procedure Display(Str : String); + procedure AddChar(Ch : Char); + procedure ReceiveChar(Ch : Char); + procedure Answer(chAns : Char; chOption : Char); + procedure NegociateSubOption(strSubOption : String); + procedure NegociateOption(chAction : Char; chOption : Char); + procedure FlushBuffer; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + function GetState : TSocketState; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function Send(Data : Pointer; Len : Integer) : integer; + function SendStr(Data : String) : integer; + procedure Connect; + function IsConnected : Boolean; + procedure WillOption(chOption : Char); + procedure WontOption(chOption : Char); + procedure DontOption(chOption : Char); + procedure DoOption(chOption : Char); + procedure Close; + procedure Pause; + procedure Resume; + property State : TSocketState read GetState; + property Handle : HWND read FWindowHandle; + published + property Port : String read FPort + write FPort; + property Host : String read FHost + write FHost; + property Location : String read FLocation + write FLocation; + property TermType : String read FTermType + write FTermType; + property LocalEcho : Boolean read FLocalEcho + write FLocalEcho; + property OnSessionConnected : TTnSessionConnected read FOnSessionConnected + write FOnSessionConnected; + property OnSessionClosed : TTnSessionClosed read FOnSessionClosed + write FOnSessionClosed; + property OnDataAvailable : TTnDataAvailable read FOnDataAvailable + write FOnDataAvailable; + property OnDisplay : TTnDisplay read FOnDisplay + write FOnDisplay; + property OnEndOfRecord : TNotifyEvent read FOnEOR + write FOnEOR; + property OnSendLoc : TNotifyEvent read FOnSendLoc + write FOnSendLoc; + property OnTermType : TNotifyEvent read FOnTermType + write FOnTermType; + property OnLocalEcho : TNotifyEvent read FOnLocalEcho + write FOnLocalEcho; + end; + +procedure Register; + +implementation + +{$DEFINE Debug} { Add or remove minus sign before dollar sign to } + { generate code for debug message output } + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure Register; +begin + RegisterComponents('FPiette', [TTnCnx]); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure DebugString(Msg : String); +const + Cnt : Integer = 0; +var + Buf : String[20]; +begin +{$IFDEF Debug} + Cnt := Cnt + 1; + Buf := IntToHex(Cnt, 4) + ' ' + #0; + OutputDebugString(@Buf[1]); + +{$IFNDEF WIN32} + if Length(Msg) < High(Msg) then + Msg[Length(Msg) + 1] := #0; +{$ENDIF} + + OutputDebugString(@Msg[1]); +{$ENDIF} +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WndProc(var MsgRec: TMessage); +begin + with MsgRec do + Result := DefWindowProc(Handle, Msg, wParam, lParam); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +constructor TTnCnx.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FWindowHandle := AllocateHWnd(WndProc); + FLocation := 'TNCNX'; + FTermType := 'VT100'; + FPort := '23'; + Socket := TWSocket.Create(Self); + Socket.OnSessionConnected := SocketSessionConnected; + Socket.OnDataAvailable := SocketDataAvailable; + Socket.OnSessionClosed := SocketSessionClosed; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +destructor TTnCnx.Destroy; +begin + if Assigned(Socket) then begin + Socket.Free; + Socket := nil; + end; + DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if (AComponent = Socket) and (Operation = opRemove) then + Socket := nil; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Pause; +begin + if not Assigned(Socket) then + Exit; + Socket.Pause; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Resume; +begin + if not Assigned(Socket) then + Exit; + Socket.Resume; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Connect; +begin + if not Assigned(Socket) then + Exit; + + if Socket.State <> wsClosed then + Socket.Close; + + Socket.Proto := 'tcp'; + Socket.Port := FPort; + Socket.Addr := FHost; + Socket.Connect; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.IsConnected : Boolean; +begin + Result := Socket.State = wsConnected; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Close; +begin + if Assigned(Socket) then + Socket.Close; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Display(Str : String); +begin + if Assigned(FOnDisplay) then + FOnDisplay(Self, Str); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.GetState : TSocketState; +begin + if Assigned(Socket) then + Result := Socket.State + else + Result := wsInvalidState; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketSessionConnected(Sender: TObject; Error : word); +begin + if Assigned(FOnSessionConnected) then + FOnSessionConnected(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketSessionClosed(Sender: TObject; Error : word); +begin + if Socket.State <> wsClosed then + Socket.Close; + if Assigned(FOnSessionClosed) then + FOnSessionClosed(Self, Error); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.SocketDataAvailable(Sender: TObject; Error : word); +var + Len, I : Integer; + Buffer : array [1..2048] of char; + Socket : TWSocket; +begin + Socket := Sender as TWSocket; + Len := Socket.Receive(@Buffer[1], High(Buffer)); + if Len = 0 then begin + { Remote has closed } + Display(#13 + #10 + '**** Remote has closed ****' + #13 + #10); + end + else if Len < 0 then begin + { An error has occured } + if Socket.LastError <> WSAEWOULDBLOCK then + Display(#13 + #10 + '**** ERROR: ' + IntToStr(Socket.LastError) + + ' ****' + #13 + #10); + end + else begin + for I := 1 to Len do + ReceiveChar(Buffer[I]); + FlushBuffer; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.Send(Data : Pointer; Len : Integer) : integer; +begin + if Assigned(Socket) then + Result := Socket.Send(Data, Len) + else + Result := -1; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +function TTnCnx.SendStr(Data : String) : integer; +begin + Result := Send(@Data[1], Length(Data)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.Answer(chAns : Char; chOption : Char); +var + Buf : String[3]; +begin +{ DebugString('Answer ' + IntToHex(ord(chAns), 2) + ' ' + IntToHex(ord(ChOption), 2) + #13 + #10); } + Buf := TNCH_IAC + chAns + chOption; + Socket.Send(@Buf[1], Length(Buf)); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WillOption(chOption : Char); +begin + Answer(TNCH_WILL, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.WontOption(chOption : Char); +begin + Answer(TNCH_WONT, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.DontOption(chOption : Char); +begin + Answer(TNCH_DONT, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.DoOption(chOption : Char); +begin + Answer(TNCH_DO, chOption); +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.NegociateSubOption(strSubOption : String); +var + Buf : String; +begin +{ DebugString('SubNegociation ' + + IntToHex(ord(strSubOption[1]), 2) + ' ' + + IntToHex(ord(strSubOption[2]), 2) + #13 + #10); } + + case strSubOption[1] of + TN_TERMTYPE: + begin + if strSubOption[2] = TN_TTYPE_SEND then begin +{ DebugString('Send TermType' + #13 + #10); } + if Assigned(FOnTermType) then + FOnTermType(Self); + Buf := TNCH_IAC + TNCH_SB + TN_TERMTYPE + TN_TTYPE_IS + FTermType + TNCH_IAC + TNCH_SE; + Socket.Send(@Buf[1], Length(Buf)); + end; + end; + else +{ DebugString('Unknown suboption' + #13 + #10); } + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.NegociateOption(chAction : Char; chOption : Char); +var + Buf : String; +begin +{ DebugString('Negociation ' + IntToHex(ord(chAction), 2) + ' ' + + IntToHex(ord(ChOption), 2) + #13 + #10); } + + case chOption of + TN_TRANSMIT_BINARY: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + RemoteBinMode := TRUE; + LocalBinMode := TRUE; + end + else if chAction = TNCH_WONT then begin + if RemoteBinMode then begin + RemoteBinMode := FALSE; + LocalBinMode := FALSE; + end; + end; + end; + TN_ECHO: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + FLocalEcho := FALSE; + end + else if chAction = TNCH_WONT then begin + FLocalEcho := TRUE; + end; + if Assigned(FOnLocalEcho) then + FOnLocalEcho(self); + end; + TN_SUPPRESS_GA: + begin + if chAction = TNCH_WILL then begin + Answer(TNCH_DO, chOption); + spga := TRUE; + end; + end; + TN_TERMTYPE: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + FTType := TRUE; + end; + end; + TN_SEND_LOC: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + if Assigned(FOnSendLoc) then + FOnSendLoc(Self); + Buf := TNCH_IAC + TNCH_SB + TN_SEND_LOC + FLocation + TNCH_IAC + TNCH_SE; + Socket.Send(@Buf[1], Length(Buf)); + end; + end; + TN_EOR: + begin + if chAction = TNCH_DO then begin + Answer(TNCH_WILL, chOption); + FTType := TRUE; + end; + end; + else + Answer(TNCH_WONT, chOption); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.FlushBuffer; +var + Buffer : PChar; + Count : Integer; +begin + try + if FBufferCnt > 0 then begin + if Assigned(FOnDataAvailable) then begin + { We need to make a copy for the data because we can reenter } + { during the event processing } + Count := FBufferCnt; { How much we received } + try + GetMem(Buffer, Count + 1); { Alloc memory for the copy } + except + Buffer := nil; + end; + if Buffer <> nil then begin + try + Move(FBuffer, Buffer^, Count); { Actual copy } + Buffer[Count] := #0; { Add a nul byte } + FBufferCnt := 0; { Reset receivecounter } + FOnDataAvailable(Self, Buffer, Count); { Call event handler } + finally + FreeMem(Buffer, Count + 1); { Release the buffer } + end; + end; + end + else begin + FBufferCnt := 0 + end; + end; + except + raise; + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.AddChar(Ch : Char); +begin + FBuffer[FBufferCnt] := Ch; + Inc(FBufferCnt); + if FBufferCnt >= SizeOf(FBuffer) then + FlushBuffer; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} +procedure TTnCnx.ReceiveChar(Ch : Char); +const + bIAC : Boolean = FALSE; + chVerb : Char = #0; + strSubOption : String = ''; + bSubNegoc : Boolean = FALSE; +begin + if chVerb <> #0 then begin + NegociateOption(chVerb, Ch); + chVerb := #0; + strSubOption := ''; + Exit; + end; + + if bSubNegoc then begin + if Ch = TNCH_SE then begin + bSubNegoc := FALSE; + NegociateSubOption(strSubOption); + end + else + strSubOption := strSubOption + Ch; + Exit; + end; + + if bIAC then begin + case Ch of + TNCH_IAC: begin + AddChar(Ch); + bIAC := FALSE; + end; + TNCH_DO, TNCH_WILL, TNCH_DONT, TNCH_WONT: + begin + bIAC := FALSE; + chVerb := Ch; + end; + TNCH_EOR: + begin + DebugString('TNCH_EOR' + #13 + #10); + bIAC := FALSE; + if Assigned(FOnEOR) then + FOnEOR(Self); + end; + TNCH_SB: + begin +{ DebugString('Subnegociation' + #13 + #10); } + bSubNegoc := TRUE; + bIAC := FALSE; + end; + else + DebugString('Unknown ' + IntToHex(ord(Ch), 2) + ' ''' + Ch + '''' + #13 + #10); + bIAC := FALSE; + end; + + Exit; + end; + + case Ch of + TNCH_EL: + begin + DebugString('TNCH_EL' + #13 + #10); + AddChar(Ch); + end; + TNCH_EC: + begin + DebugString('TNCH_EC' + #13 + #10); + AddChar(Ch); + end; + TNCH_AYT: + begin + DebugString('TNCH_AYT' + #13 + #10); + AddChar(Ch); + end; + TNCH_IP: + begin + DebugString('TNCH_IP' + #13 + #10); + AddChar(Ch); + end; + TNCH_AO: + begin + DebugString('TNCH_AO' + #13 + #10); + AddChar(Ch); + end; + TNCH_IAC: + begin + bIAC := TRUE + end; + else + AddChar(Ch); + end; +end; + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + +end. + + +{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} + diff --git a/lib/telnet/winsock.dcp b/lib/telnet/winsock.dcp new file mode 100644 index 00000000..2b551ac5 Binary files /dev/null and b/lib/telnet/winsock.dcp differ diff --git a/lib/telnet/winsock.dcu b/lib/telnet/winsock.dcu new file mode 100644 index 00000000..07e79c2f Binary files /dev/null and b/lib/telnet/winsock.dcu differ diff --git a/lib/telnet/winsock.dpk b/lib/telnet/winsock.dpk new file mode 100644 index 00000000..ad155fcb --- /dev/null +++ b/lib/telnet/winsock.dpk @@ -0,0 +1,37 @@ +package winsock; + +{$R *.RES} +{$R 'Wsocket.dcr'} +{$R 'Tncnx.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + Wsocket, + Tncnx; + +end. diff --git a/lib/telnet/winsock.dpl b/lib/telnet/winsock.dpl new file mode 100644 index 00000000..855aaff5 Binary files /dev/null and b/lib/telnet/winsock.dpl differ diff --git a/lib/telnet/winsock.res b/lib/telnet/winsock.res new file mode 100644 index 00000000..36f26e23 Binary files /dev/null and b/lib/telnet/winsock.res differ diff --git a/lib/timer32/HIRESTIM.DCR b/lib/timer32/HIRESTIM.DCR new file mode 100644 index 00000000..6ac69f36 Binary files /dev/null and b/lib/timer32/HIRESTIM.DCR differ diff --git a/lib/timer32/HIRESTIM.PAS b/lib/timer32/HIRESTIM.PAS new file mode 100644 index 00000000..42864b2f --- /dev/null +++ b/lib/timer32/HIRESTIM.PAS @@ -0,0 +1,154 @@ +unit HiResTim; + +interface + +uses + Windows, MMSystem, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs; + +type + + THiResTimer = class; + EHiResTimer = class( Exception ); + + TTimerThread = class( TThread ) + private + protected + public + hr: THiResTimer; + procedure Execute; override; + end; + + THiResTimer = class( TComponent ) + private + nID: UINT; + FEnabled: boolean; + FInterval: UINT; + FResolution: UINT; + FOnTimer: TNotifyEvent; + hTimerEvent: THandle; + bPaused: boolean; + timerThread: TTimerThread; + procedure CreateTimer; + protected + procedure SetEnabled( b: boolean ); + public + constructor Create( AOwner: TComponent ); override; + destructor Destroy; override; + procedure Pause; + procedure Resume; + published + property Enabled: boolean read FEnabled write SetEnabled default FALSE; + property Interval: UINT read FInterval write FInterval default 100; + property Resolution: UINT read FResolution write FResolution default 100; + property OnTimer: TNotifyEvent read FOnTimer write FOnTimer; + end; + +procedure Register; + +implementation + +procedure TimerCallback( uTimerID, uMessage: UINT; dwUser, dw1, dw2: DWORD ); stdcall; +var + hr: THiResTimer; +begin + hr := THiResTimer( dwUser ); + if hr <> nil then + if not hr.bPaused then + SetEvent( hr.hTimerEvent ); +end; + +procedure TTimerThread.Execute; +begin + while not Terminated and ( hr <> nil ) do + begin + WaitForSingleObject( hr.hTimerEvent, INFINITE ); + if Assigned( hr.FOnTimer ) then + hr.FOnTimer( hr ); + end; +end; + +constructor THiResTimer.Create( AOwner: TComponent ); +var + dwDummy: DWORD; +begin + inherited Create( AOwner ); + FEnabled := FALSE; + FInterval := 100; + FResolution := 100; + bPaused := FALSE; + hTimerEvent := CreateEvent( nil, FALSE, FALSE, nil ); +end; + +destructor THiResTimer.Destroy; +begin + Enabled := FALSE; + CloseHandle( hTimerEvent ); + inherited Destroy; +end; + +procedure THiResTimer.SetEnabled( b: boolean ); +begin + + if b and ( csDesigning in ComponentState ) then + begin + ShowMessage( 'Set to True in Form''s OnShow event' ); + Exit; + end; + + if b <> FEnabled then + begin + if b then + begin + if not ( csDesigning in ComponentState ) then + begin + timerThread := TTimerThread.Create( TRUE ); + timerThread.hr := self; + timerThread.FreeOnTerminate := TRUE; + timerThread.Resume; + CreateTimer; + end; + end + else + begin + if not ( csDesigning in ComponentState ) then + begin + timeKillEvent( nID ); + TerminateThread( timerThread.Handle, 0 ); + timerThread.Free; + end; + end; + FEnabled := b; + end; +end; + +procedure THiResTimer.CreateTimer; +var + lpTimerProc: TFNTimeCallBack; +begin + lpTimerProc := @TimerCallback; + nID := timeSetEvent( FInterval, FResolution, lpTimerProc, DWORD( self ), TIME_PERIODIC ); + if nID = 0 then + begin + FEnabled := FALSE; + raise EHiResTimer.Create( 'Unable to create a timer' ); + end; +end; + +procedure THiResTimer.Pause; +begin + if Enabled then + timerThread.Suspend; +end; + +procedure THiResTimer.Resume; +begin + if Enabled then + timerThread.Resume; +end; + +procedure Register; +begin + RegisterComponents( 'Samples', [THiResTimer] ); +end; + +end. diff --git a/lib/timer32/Hirestim.dcu b/lib/timer32/Hirestim.dcu new file mode 100644 index 00000000..a6e73bde Binary files /dev/null and b/lib/timer32/Hirestim.dcu differ diff --git a/lib/tsrich/TRECODE.DCR b/lib/tsrich/TRECODE.DCR new file mode 100644 index 00000000..7d738a84 Binary files /dev/null and b/lib/tsrich/TRECODE.DCR differ diff --git a/lib/tsrich/TRECODE.PAS b/lib/tsrich/TRECODE.PAS new file mode 100644 index 00000000..d94d6367 --- /dev/null +++ b/lib/tsrich/TRECODE.PAS @@ -0,0 +1,203 @@ +unit TRECode; + +{Description: RichEdit component with added events, methods and properties} +{Author: Richard Shotbolt (100327,2305@compuserve.com)} +{Date: 23 Jan 1996} + +interface + +uses + WinProcs, Messages, Classes, ComCtrls, RichEdit; + +type + TNotifyEvent = procedure(Sender:TObject) of object; +{ ************************************************************************* } + TSRichEdit = class(TRichEdit) + private + FOnVScroll: TNotifyEvent; + FOnHScroll: TNotifyEvent; + FCurrentLine: integer; + FCurrentPosition: integer; + FTopLine: integer; + FLinesVisible: integer; + procedure DoOnHScroll (var Msg: TWMHScroll); message WM_HSCROLL; + procedure DoOnVScroll (var Msg: TWMVScroll); message WM_VSCROLL; + function GetCurrentLine: integer; + function GetCurrentPosition: integer; + function GetTopLine: integer; + procedure SetCurrentLine(Value: integer); + procedure SetCurrentPosition(Value: integer); + procedure SetTopLine(Value: integer); + function GetLinesVisible: integer; + function GetMaxLinesVisible: integer; + protected + public + constructor Create(AOwner:TComponent); override; + destructor Destroy; override; + {properties} + property CurrentLine: integer read GetCurrentLine write SetCurrentLine; + property CurrentPosition: integer read GetCurrentPosition write SetCurrentPosition; + property Topline: integer read GetTopLine write SetTopLine; + property LinesVisible: integer read GetLinesVisible; + property MaxLinesVisible: integer read GetMaxLinesVisible; + {methods} + published + property OnVScroll: TNotifyEvent read FOnVScroll write FOnVScroll; + property OnHScroll: TNotifyEvent read FOnHScroll write FOnHScroll; + end; + +procedure Register; + +implementation +{---------- TSRichEdit ----------} + +{ ************************************************************************* } +constructor TSRichEdit.Create(AOwner:TComponent); +begin +inherited Create(AOwner); +end; + +{ ************************************************************************* } +procedure TSRichEdit.DoOnHScroll (var Msg: TWMHScroll); +{New event handler - HScroll} + +begin +inherited; +if assigned (FOnHScroll) then + FOnHScroll(Self); +end; + +{ ************************************************************************* } +procedure TSRichEdit.DoOnVScroll (var Msg: TWMVScroll); +{New event handler - VScroll} +begin +inherited; +if assigned (FOnVScroll) then + FOnVScroll(Self); +end; + +{ ************************************************************************* } +function TSRichEdit.GetCurrentLine: integer; +{Get line number containing caret} +begin +result := SendMessage(Handle, EM_LINEFROMCHAR, SelStart, 0); +end; + +{ ************************************************************************* } +function TSRichEdit.GetCurrentPosition: integer; +{Get character position of caret within line} +begin +result := SelStart - SendMessage(Handle, EM_LINEINDEX, + (SendMessage(Handle, EM_LINEFROMCHAR, SelStart, 0)), 0); +end; + +{ ************************************************************************* } +function TSRichEdit.GetTopLine: integer; +{Get number of topmost visible line} +begin +result := SendMessage(Handle, EM_GETFIRSTVISIBLELINE, 0, 0); +end; + +{ ************************************************************************* } +function TSRichEdit.GetMaxLinesVisible: integer; +{Returns number of lines that can be shown in the current font} +var + hndl: HDC; + tm: TTextMetric; +begin +if Visible then + begin + hndl := GetDC(Handle); + SelectObject(hndl, Font.Handle); + GetTextMetrics(hndl, tm); + ReleaseDC(Handle, hndl); + result := ClientHeight div tm.tmHeight; + end +else + result := -1; +end; + +{ ************************************************************************* } +function TSRichEdit.GetLinesVisible: integer; +{Return actual number of lines visible} +var + c: integer; + n: integer; +begin +if Visible then + begin + n := GetMaxLinesVisible; + {truncate value to actual number of lines visible if necessary} + c := Lines.Count - SendMessage(Handle, EM_GETFIRSTVISIBLELINE, 0, 0); + if c < n then + result := c + else + result := n; + end +else + result := 0; +end; + +{ ************************************************************************* } +procedure TSRichEdit.SetCurrentLine(Value: integer); +{Put caret on start of selected line} +var + cl: integer; +begin +cl := Value; +{Restrict range to available lines} +if cl < 0 then + cl := 0; +if cl > Lines.Count - 1 then + cl := Lines.Count - 1; +SelLength := 0; +SelStart := SendMessage(Handle, EM_LINEINDEX, cl, 0); +end; + +{ ************************************************************************* } +procedure TSRichEdit.SetCurrentPosition(Value: integer); +var + cl: integer; + cp: integer; +begin +{Value must be within range} +cl := GetCurrentLine; +cp := Value; +if cp < 0 then + cp := 0; +if (cp > Length(Lines[cl])) then + cp := Length(Lines[cl]); +{Put caret in selected position} +SelLength := 0; +SelStart := SendMessage(Handle, EM_LINEINDEX, cl, 0) + cp; +end; + +{ ************************************************************************* } +procedure TSRichEdit.SetTopLine(Value: integer); +{Put selected line at top of memo} +var + tl: integer; +begin +tl := Value; +if tl < 0 then + tl := 0; +if tl > Lines.Count - 1 then + tl := Lines.Count - 1; +SendMessage(Handle, EM_LINESCROLL, 0, + tl - SendMessage(Handle, EM_GETFIRSTVISIBLELINE, 0, 0)); +end; + +{ ************************************************************************* } +destructor TSRichEdit.Destroy; +begin +inherited Destroy; +end; + +{ ************************************************************************* } +procedure Register; +begin +RegisterComponents('Samples',[TSRichEdit]); +end; + +end. + diff --git a/lib/tsrich/TRECODE.RES b/lib/tsrich/TRECODE.RES new file mode 100644 index 00000000..4760cbe6 Binary files /dev/null and b/lib/tsrich/TRECODE.RES differ diff --git a/lib/tsrich/TRECODE.TXT b/lib/tsrich/TRECODE.TXT new file mode 100644 index 00000000..0de65e72 --- /dev/null +++ b/lib/tsrich/TRECODE.TXT @@ -0,0 +1,97 @@ +Component: TSRichEdit +Description: RichEdit control with added events and properties +Author: Richard Shotbolt +Email: 100327,2305@compuserve.com +Date: 26 Mar 1996 + +TSRichEdit is a descendent of TRichEdit which lets you get and set +the caret position and top line index, and respond to VScroll and +HScroll events without resorting to API calls. + +<< Using TSRichEdit >> + +TSMemo has all the properties, methods and events of a normal +TRichEdit, with the following additions: + +<< New Properties >> + +--------------------------------------------------------------------- +CurrentLine - integer, read/write. + +When read, returns the line number (first line = 0) containing the +caret. + +When written, the caret is placed at the start of the specified line. +If greater than the last line, the caret goes to the start of the +last line. You can deliberately set a large value to get to the last +line of the control. + +--------------------------------------------------------------------- +CurrentPosition - integer, read/write. + +When read, returns the character position (before first char = 0) of +the caret within the line containing the caret. + +When written, puts the caret at the specified character position +on the current line (0 = before first character). Tabs (if used) +are treated as single characters. If the specified position is beyond +the end of the line, the caret goes to the end of the line. You can +deliberately set a large value to get to the end of each line. + +--------------------------------------------------------------------- +TopLine - integer, read/write. + +When read, returns the line number (first line = 0) of the top +line currently displayed. + +When written, the control scrolls so that the specified line appears +at the top. + +--------------------------------------------------------------------- +LinesVisible - integer, read only + +When read, returns the number of lines that are currently visible. +This value is based on the current settings of the Font property, and +will only be a guide if the control contains different font sizes or +styles. + +--------------------------------------------------------------------- +MaxLinesVisible - integer, read only + +When read, returns the maximum number of lines that can be +displayed in the memo before it scrolls, based on the current +settings of the Font property. + +In conjunction with the TopLine property, you can use this for +example to center the selected line on the screen. + +e.g. MySRichEdit.TopLine := MyLine - (MySRichEdit.MaxLinesVisible div 2); + +--------------------------------------------------------------------- + +<< New Events >> + +You can use the scroll events below to synchronize two controls. + +--------------------------------------------------------------------- +OnHScroll - generated when you click on the control's horizontal +scroll bar and again when the mouse is released. + +--------------------------------------------------------------------- +OnVScroll - generated when you click on the control's vertical +scroll bar and again when the mouse is released. + +--------------------------------------------------------------------- + + +<< Installation >> + +Backup your 'cmplib32.dcl' file as a precaution. +Select 'Component', 'Install'. +Select 'Add', 'Browse'. +Select the directory containing the TRECode files. +Select 'TRECODE' and click OK on each box that appears. +The TSRichEdit control will be added to the 'Samples' section of your +component toolbar. +If anything goes wrong, restore your backed-up cmplib32.dcl and try +again after correcting any obvious problems. diff --git a/lib/tsrich/Trecode.dcu b/lib/tsrich/Trecode.dcu new file mode 100644 index 00000000..8e1801a9 Binary files /dev/null and b/lib/tsrich/Trecode.dcu differ diff --git a/lib/tvicres/DELPHI3/MAIN.DFM b/lib/tvicres/DELPHI3/MAIN.DFM new file mode 100644 index 00000000..ca927af3 Binary files /dev/null and b/lib/tvicres/DELPHI3/MAIN.DFM differ diff --git a/lib/tvicres/DELPHI3/MAIN.PAS b/lib/tvicres/DELPHI3/MAIN.PAS new file mode 100644 index 00000000..b62c3271 --- /dev/null +++ b/lib/tvicres/DELPHI3/MAIN.PAS @@ -0,0 +1,216 @@ +unit Main; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Grids, StdCtrls, Buttons, Vic_Res, ComCtrls, Tabnotbk, ExtCtrls; + +type + TForm1 = class(TForm) + GPort: TStringGrid; + GMem: TStringGrid; + GIRQ: TStringGrid; + GDMA: TStringGrid; + BitBtn1: TBitBtn; + L_Port: TLabel; + L_Mem: TLabel; + L_IRQ: TLabel; + L_DMA: TLabel; + Panel1: TPanel; + Label8: TLabel; + Label10: TLabel; + Label11: TLabel; + Label4: TLabel; + Label5: TLabel; + Label2: TLabel; + Panel2: TPanel; + Label3: TLabel; + Label6: TLabel; + B_Class: TButton; + C_Hardw: TComboBox; + Button1: TButton; + B_DevDesc: TButton; + Label9: TLabel; + C_DevDesc: TComboBox; + B_GetAllClasses: TButton; + C_Class: TComboBox; + Label12: TLabel; + L_Devices: TLabel; + procedure FormCreate(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure B_ClassClick(Sender: TObject); + procedure B_HKEY(Sender: TObject); + procedure B_DevDescClick(Sender: TObject); + procedure B_GetAllClassesClick(Sender: TObject); + procedure B_ClearGridsClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +var VicRes : TVicRes; + +procedure ShowGrids; +var i : Byte; + w : Word; + dw: DWORD; +begin + + with Form1,VicRes do + begin + + L_Devices.Caption := 'Devices: '+IntToStr(VicRes.Devices); + + C_Hardw.Clear; + C_DevDesc.Clear; + for i:=1 to Devices do + begin + C_Hardw.Items.Add(HardwareKey[i]); + C_DevDesc.Items.Add(DeviceDescriptor[i]); + end; + C_Hardw.ItemIndex := 0; + C_DevDesc.ItemIndex := 0; + end; + + with Form1,GPort,VicRes do + begin + Cells[0,0] := ' N'; Cells[1,0] := ' Base'; Cells[2,0] := ' End'; + L_Port.Caption := 'Port I/O areas: '+IntToStr(PortCounter); + for i:= 1 to 8 do + begin + Cells[0,i] := ' '+IntToStr(i); + w := PortBase[i]; + if w = $FFFF then + begin + Cells[1,i] := ''; + Cells[2,i] := ''; + end + else begin + Cells[1,i] := IntToHex(w,4); + Cells[2,i] := IntToHex(PortEnd[i],4); + end; + + end; + end; + with Form1,GMem,VicRes do + begin + Cells[0,0] := ' N'; Cells[1,0] := ' Base'; Cells[2,0] := ' End'; + L_Mem.Caption := 'Memory areas: '+IntToStr(MemCounter); + for i:= 1 to 8 do + begin + Cells[0,i] := ' '+IntToStr(i); + dw := MemBase[i]; + if dw=$FFFFFFFF then + begin + Cells[1,i] := ''; + Cells[2,i] := ''; + end + else begin + Cells[1,i] := IntToHex(dw,8); + Cells[2,i] := IntToHex(MemEnd[i],8); + end; + end; + end; + with Form1,GIRQ,VicRes do + begin + L_IRQ.Caption := 'IRQs: '+IntToStr(IRQCounter); + Cells[0,0] := ' N'; Cells[1,0] := ' IRQ'; + for i:= 1 to 8 do + begin + w := IRQNumber[i]; + Cells[0,i] := ' '+IntToStr(i); + if w = $FFFF then Cells[1,i] := '' + else Cells[1,i] := IntToStr(w); + end; + end; + with Form1,GDMA,VicRes do + begin + Cells[0,0] := ' N'; Cells[1,0] := 'Chan'; + L_DMA.Caption := 'DMAs: '+IntToStr(DMACounter); + for i:= 1 to 8 do + begin + w := DMAChannel[i]; + Cells[0,i] := ' '+IntToStr(i); + if w = $FFFF then Cells[1,i] := '' + else Cells[1,i] := IntToStr(DMAChannel[i]); + end; + end; + +end; + + +procedure TForm1.FormCreate(Sender: TObject); +begin + VicRes := TVicRes.Create; + ShowGrids; + if (GetVersion() and $80000000)<>0 then + Label2.caption := 'Windows 95/98' + else + Label2.caption := 'Windows NT'; + C_Class.Clear; + C_Class.Items.Add('Keyboard'); + C_Class.ItemIndex:=0; +end; + +procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); +begin + VicRes.Free; +end; + +procedure TForm1.B_ClassClick(Sender: TObject); +begin + VicRes.SearchByClassName(C_Class.Text); + ShowGrids; + If VicRes.Devices>1 then + ShowMessage('More than one Device ('+IntToStr(VicRes.Devices)+ + ') have founded for this Class Name!'); + +end; + +procedure TForm1.B_HKEY(Sender: TObject); +begin + VicRes.SearchByHardwareKey(C_Hardw.Items[C_Hardw.ItemIndex]); + ShowGrids; + If VicRes.Devices>1 then + ShowMessage('More than one Device ('+IntToStr(VicRes.Devices)+ + ') have founded for this HardwareKey!'); + +end; + +procedure TForm1.B_DevDescClick(Sender: TObject); +begin + VicRes.SearchByDeviceDescriptor(C_DevDesc.Items[C_DevDesc.ItemIndex]); + ShowGrids; + If VicRes.Devices>1 then + ShowMessage('More than one Device ('+IntToStr(VicRes.Devices)+ + ') have founded for this Device Descriptor!'); +end; + +procedure TForm1.B_GetAllClassesClick(Sender: TObject); +begin + VicRes.GetAllClasses(C_Class.Items); + C_Class.ItemIndex:=0; +end; + +procedure TForm1.B_ClearGridsClick(Sender: TObject); +var i : byte; +begin + for i:= 1 to 8 do + begin + GPort.Cells[1,i] := ''; GPort.Cells[2,i] := ''; + GDMA.Cells[1,i] := ''; GDMA.Cells[2,i] := ''; + GMem.Cells[1,i] := ''; GMem.Cells[2,i] := ''; + GIRQ.Cells[1,i] := ''; GIRQ.Cells[2,i] := ''; + end; +end; + +end. diff --git a/lib/tvicres/DELPHI3/Main.dcu b/lib/tvicres/DELPHI3/Main.dcu new file mode 100644 index 00000000..142f88a1 Binary files /dev/null and b/lib/tvicres/DELPHI3/Main.dcu differ diff --git a/lib/tvicres/DELPHI3/TEST_RES.DPR b/lib/tvicres/DELPHI3/TEST_RES.DPR new file mode 100644 index 00000000..13880c46 --- /dev/null +++ b/lib/tvicres/DELPHI3/TEST_RES.DPR @@ -0,0 +1,14 @@ +program test_res; + +uses + Forms, + Main in 'Main.pas' {Form1}, + Vic_Res in 'Vic_Res.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/tvicres/DELPHI3/VIC_RES.DCU b/lib/tvicres/DELPHI3/VIC_RES.DCU new file mode 100644 index 00000000..259a54e4 Binary files /dev/null and b/lib/tvicres/DELPHI3/VIC_RES.DCU differ diff --git a/lib/tvicres/DELPHI4/MAIN.DFM b/lib/tvicres/DELPHI4/MAIN.DFM new file mode 100644 index 00000000..ca927af3 Binary files /dev/null and b/lib/tvicres/DELPHI4/MAIN.DFM differ diff --git a/lib/tvicres/DELPHI4/MAIN.PAS b/lib/tvicres/DELPHI4/MAIN.PAS new file mode 100644 index 00000000..b62c3271 --- /dev/null +++ b/lib/tvicres/DELPHI4/MAIN.PAS @@ -0,0 +1,216 @@ +unit Main; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Grids, StdCtrls, Buttons, Vic_Res, ComCtrls, Tabnotbk, ExtCtrls; + +type + TForm1 = class(TForm) + GPort: TStringGrid; + GMem: TStringGrid; + GIRQ: TStringGrid; + GDMA: TStringGrid; + BitBtn1: TBitBtn; + L_Port: TLabel; + L_Mem: TLabel; + L_IRQ: TLabel; + L_DMA: TLabel; + Panel1: TPanel; + Label8: TLabel; + Label10: TLabel; + Label11: TLabel; + Label4: TLabel; + Label5: TLabel; + Label2: TLabel; + Panel2: TPanel; + Label3: TLabel; + Label6: TLabel; + B_Class: TButton; + C_Hardw: TComboBox; + Button1: TButton; + B_DevDesc: TButton; + Label9: TLabel; + C_DevDesc: TComboBox; + B_GetAllClasses: TButton; + C_Class: TComboBox; + Label12: TLabel; + L_Devices: TLabel; + procedure FormCreate(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure B_ClassClick(Sender: TObject); + procedure B_HKEY(Sender: TObject); + procedure B_DevDescClick(Sender: TObject); + procedure B_GetAllClassesClick(Sender: TObject); + procedure B_ClearGridsClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +var VicRes : TVicRes; + +procedure ShowGrids; +var i : Byte; + w : Word; + dw: DWORD; +begin + + with Form1,VicRes do + begin + + L_Devices.Caption := 'Devices: '+IntToStr(VicRes.Devices); + + C_Hardw.Clear; + C_DevDesc.Clear; + for i:=1 to Devices do + begin + C_Hardw.Items.Add(HardwareKey[i]); + C_DevDesc.Items.Add(DeviceDescriptor[i]); + end; + C_Hardw.ItemIndex := 0; + C_DevDesc.ItemIndex := 0; + end; + + with Form1,GPort,VicRes do + begin + Cells[0,0] := ' N'; Cells[1,0] := ' Base'; Cells[2,0] := ' End'; + L_Port.Caption := 'Port I/O areas: '+IntToStr(PortCounter); + for i:= 1 to 8 do + begin + Cells[0,i] := ' '+IntToStr(i); + w := PortBase[i]; + if w = $FFFF then + begin + Cells[1,i] := ''; + Cells[2,i] := ''; + end + else begin + Cells[1,i] := IntToHex(w,4); + Cells[2,i] := IntToHex(PortEnd[i],4); + end; + + end; + end; + with Form1,GMem,VicRes do + begin + Cells[0,0] := ' N'; Cells[1,0] := ' Base'; Cells[2,0] := ' End'; + L_Mem.Caption := 'Memory areas: '+IntToStr(MemCounter); + for i:= 1 to 8 do + begin + Cells[0,i] := ' '+IntToStr(i); + dw := MemBase[i]; + if dw=$FFFFFFFF then + begin + Cells[1,i] := ''; + Cells[2,i] := ''; + end + else begin + Cells[1,i] := IntToHex(dw,8); + Cells[2,i] := IntToHex(MemEnd[i],8); + end; + end; + end; + with Form1,GIRQ,VicRes do + begin + L_IRQ.Caption := 'IRQs: '+IntToStr(IRQCounter); + Cells[0,0] := ' N'; Cells[1,0] := ' IRQ'; + for i:= 1 to 8 do + begin + w := IRQNumber[i]; + Cells[0,i] := ' '+IntToStr(i); + if w = $FFFF then Cells[1,i] := '' + else Cells[1,i] := IntToStr(w); + end; + end; + with Form1,GDMA,VicRes do + begin + Cells[0,0] := ' N'; Cells[1,0] := 'Chan'; + L_DMA.Caption := 'DMAs: '+IntToStr(DMACounter); + for i:= 1 to 8 do + begin + w := DMAChannel[i]; + Cells[0,i] := ' '+IntToStr(i); + if w = $FFFF then Cells[1,i] := '' + else Cells[1,i] := IntToStr(DMAChannel[i]); + end; + end; + +end; + + +procedure TForm1.FormCreate(Sender: TObject); +begin + VicRes := TVicRes.Create; + ShowGrids; + if (GetVersion() and $80000000)<>0 then + Label2.caption := 'Windows 95/98' + else + Label2.caption := 'Windows NT'; + C_Class.Clear; + C_Class.Items.Add('Keyboard'); + C_Class.ItemIndex:=0; +end; + +procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); +begin + VicRes.Free; +end; + +procedure TForm1.B_ClassClick(Sender: TObject); +begin + VicRes.SearchByClassName(C_Class.Text); + ShowGrids; + If VicRes.Devices>1 then + ShowMessage('More than one Device ('+IntToStr(VicRes.Devices)+ + ') have founded for this Class Name!'); + +end; + +procedure TForm1.B_HKEY(Sender: TObject); +begin + VicRes.SearchByHardwareKey(C_Hardw.Items[C_Hardw.ItemIndex]); + ShowGrids; + If VicRes.Devices>1 then + ShowMessage('More than one Device ('+IntToStr(VicRes.Devices)+ + ') have founded for this HardwareKey!'); + +end; + +procedure TForm1.B_DevDescClick(Sender: TObject); +begin + VicRes.SearchByDeviceDescriptor(C_DevDesc.Items[C_DevDesc.ItemIndex]); + ShowGrids; + If VicRes.Devices>1 then + ShowMessage('More than one Device ('+IntToStr(VicRes.Devices)+ + ') have founded for this Device Descriptor!'); +end; + +procedure TForm1.B_GetAllClassesClick(Sender: TObject); +begin + VicRes.GetAllClasses(C_Class.Items); + C_Class.ItemIndex:=0; +end; + +procedure TForm1.B_ClearGridsClick(Sender: TObject); +var i : byte; +begin + for i:= 1 to 8 do + begin + GPort.Cells[1,i] := ''; GPort.Cells[2,i] := ''; + GDMA.Cells[1,i] := ''; GDMA.Cells[2,i] := ''; + GMem.Cells[1,i] := ''; GMem.Cells[2,i] := ''; + GIRQ.Cells[1,i] := ''; GIRQ.Cells[2,i] := ''; + end; +end; + +end. diff --git a/lib/tvicres/DELPHI4/TEST_RES.DPR b/lib/tvicres/DELPHI4/TEST_RES.DPR new file mode 100644 index 00000000..13880c46 --- /dev/null +++ b/lib/tvicres/DELPHI4/TEST_RES.DPR @@ -0,0 +1,14 @@ +program test_res; + +uses + Forms, + Main in 'Main.pas' {Form1}, + Vic_Res in 'Vic_Res.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/tvicres/DELPHI4/VIC_RES.DCU b/lib/tvicres/DELPHI4/VIC_RES.DCU new file mode 100644 index 00000000..916d7ff8 Binary files /dev/null and b/lib/tvicres/DELPHI4/VIC_RES.DCU differ diff --git a/lib/tvicres/FILE_ID.DIZ b/lib/tvicres/FILE_ID.DIZ new file mode 100644 index 00000000..7e3ca26c --- /dev/null +++ b/lib/tvicres/FILE_ID.DIZ @@ -0,0 +1,12 @@ +TVicRes 1.0 + +VCL component for Delphi 2.x/3.x/4.x/ and C++Builder 1.0/3.0 + +Allows you see all hardware resource (Ports, Memory, IRQs, DMA) +used by some device in Windows 95/98/NT + +Nov, 1998. +Author : Victor Ishikeev +e-mail : ivi@iufanet.ru + tools@entechtaiwan.com +http://www.entechtaiwan.com/tools.htm diff --git a/lib/tvicres/LICENSE.TXT b/lib/tvicres/LICENSE.TXT new file mode 100644 index 00000000..149c17d0 --- /dev/null +++ b/lib/tvicres/LICENSE.TXT @@ -0,0 +1,70 @@ + TVicRes version 1.0 + + Copyright (C) 1998 Victor Ishikeev + e-mail: ivi@ufanet.ru, tools@entechtaiwan.com + http://www.entechatiwan.com/tools.htm + + All Rights Reserved + + LICENSE.TXT + =========== + + License Agreement + ================= + +You should carefully read the following terms and conditions before using this +software. Your use of this software indicates your acceptance of this license +agreement and warranty. + + +Shareware +========= + +You may use a Shareware Copy of this Software for an evaluation period of up +to 30 days, in order to determine whether the Software meets your needs +before purchasing it. Once the evaluation period ends, you agree to either +purchase a Registered Copy of the Software, or to stop using it and remove it +from your computer system. If you have ordered a Registered Copy +of the Software, you may continue to use your Shareware Copy until your +Registered Copy arrives. + +You must not (a) defeat, or try to defeat, messages in the Software which +encourage users to register; (b) modify or prepare derivative works of the +Software; (c) or reverse engineer, decompile or disassemble the Software. + + +Distribution +============ + +You are hereby granted the right + +- to make as many copies of this software and its documentation as you wish; +- give exact copies (including all files) of the original version to anyone; +- and distribute the software and documentation in its unmodified form via + electronic means. + +There is no charge for any of the above. + +You are specifically prohibited from charging, or requesting donations, for +any such copies (a small handling fee is acceptable). You are further +prohibited from distributing the software and/or documentation with other +products (commercial or otherwise) without prior written permission. + +Legal Disclaimer +================ + +THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE +SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + +IN NO EVENT WILL THE AUTHOR OR ANY OTHER PARTY WHO MAY HAVE DISTRIBUTED THE +SOFTWARE AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR +DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH +HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + diff --git a/lib/tvicres/ORDER.TXT b/lib/tvicres/ORDER.TXT new file mode 100644 index 00000000..b7acea95 --- /dev/null +++ b/lib/tvicres/ORDER.TXT @@ -0,0 +1,25 @@ + +TVicRes 1.0 can be ordered online over the Internet using +VISA, Mastercard or American Express credit card +at the following site: + +http://www.entechtaiwan.com/tools.htm + +Also you can download "register.zip" file then "register.exe" in this file +and choose a way for the off-line payment. + +You can order the royalty free TVicRes for $15US (include sources). + +Thank you for your order. + +Victor Ishikeev, +--------------- +Nov, 1998 + +p.o.box 329, +Ufa, 450005 +Russian Federation + +e-mail: ivi@ufanet.ru + tools@entechtaiwan.com +http://www.enytechtaiwan.com/tools.htm \ No newline at end of file diff --git a/lib/tvicres/README.TXT b/lib/tvicres/README.TXT new file mode 100644 index 00000000..de977ff8 --- /dev/null +++ b/lib/tvicres/README.TXT @@ -0,0 +1,204 @@ + TVicRes version 1.0 + + Copyright (C) 1998 Victor Ishikeev + e-mail: ivi@ufanet.ru, tools@entechtaiwan.com + http://www.entechatiwan.com/tools.htm + + README + ====== + +CONTENTS +======== + +1. OVERVIEW +2. REGISTRATION +3. INSTALLATION +4. PROPERTIES AND METHODS +5. CONTACT INFORMATION + + +1. OVERVIEW +=========== + +TVicRes are 32-bit Delphi class allowing you to get info about the hardware +resources (port i/o areas, physical memory areas, IRQs, DMA channels) used by +any hardware device installed to the system. + +TVicRes includes transparent support for Windows 95/98 and Windows NT 3.5 or +higher, include Windows NT 5.0 beta. + +Evaluation copies of the TVicRes consist of the following directories: + + \DELPHI2\ - vic_res.dcu for Delphi 2 + \DELPHI3\ - vic_res.dcu for Delphi 3 + \DELPHI4\ - vic_res.dcu for Delphi 4 + \SAMPLE\ - compiled and not compiled test example for Delphi2/3/4 + +2. REGISTRATION +=============== + + TVicRes 1.0 is shareware ($15). You must read and accept the terms +detailed in the license.txt file before you can use this software. An +order form is provided in the file order.txt for the purpose of registering +this software. + +------ NOTE. All updates - for free! -------- + + Registered users will receive "vic_res.pas" file - Delphi source +code for this component(can be used with C++Builder 1.0/3.0 also). + +TVicRes is maintained at the following internet address: + + http://www.entechtaiwan.com/tools.htm + e-mail: tools@entechtaiwan.com + ivi@ufanet.ru + +where you can find the latest release and links to support and on-line +ordering sites. + +3. INSTALLATION +=============== + +TVicRes are just a class, not component, thus it do not require any special +installation. Just copy vic_res.dcu for Delphi 2,3 or 4 to your working +directory and include "Vic_Res" to the "Uses" statement. +For the first testing you can try a test example shipped with this archive. + +4. PROPERTIES AND METHODS +========================= + +constructor Create; +------------------- +Allows to create a new TVicRes object at run-time. +For example: NewRes := TVicRes.Create; + +procedure GetAllClasses (ClassList: TStrings); +------------------------------------------------ + +Returns a "Class" names for the all devices installed on your PC. +You can use these values in the SearchByClassName() method. + +function SearchByClassName(Class_Name:String) : BOOL; +------------------------------------------------------- + +Allows to find all hardware resources used by devices with the given Class_Name. +Returns TRUE if these devices have founded in the system registry. +Note! Check out the "Devices" property after searching. It is possible that more +than one device with this Class_Name are founded! +Returns a HardwareKey and DeviceDesc fields values also. + + +function SearchByHardwareKey(HWKey:String) : BOOL; +----------------------------------------------------- + +Allows to find all hardware resources used by devices with the given +HardwareKey (HardwareId in Windows NT). Returns TRUE if these devices have founded +in the system registry. +Returns a class name and DeviceDesc fields values also. + + +function SearchByDeviceDescriptor(DeviceDesc:String): BOOL; +-------------------------------------------------------------- + +Allows to find all hardware resources used by devices with the given +DeviceDesc. Returns TRUE if these devices have founded in the system registry. +Returns a HardwareKey and DeviceDesc fields values also. + +property DeviceClassName : String; read only; +------------------------------------------------ + +Returns the current class name. + +property Devices : Word; read only; +-------------------------------------- + +Shows how many devices was founded after the searching. + +property HardwareKey[Index:Word] : String; read only; +-------------------------------------------------------- + +Returns a HardwareKey value for the selected device. +Value of Index should be inside 1..Devices. + + +property DeviceDescriptor[Index:Word] : String; read only; +------------------------------------------------------------- + +Returns a DeviceDescriptor value for the selected device. +Value of Index should be inside 1..Devices. + +property IRQCounter : Word; read only; +----------------------------------------- + +Shows how many IRQs are used by device(s). + +property IRQNumber[Index:Word] : Word; read only; +----------------------------------------------------- + +Returns an IRQ number. +Value of Index should be inside 1..IRQCounter. + + +property DMACounter : Word; read only; +------------------------------------------ + +Shows how many DMA channels are used by device(s). + +property DMAChannel[Index:Word] : Word; read only; +------------------------------------------------------ + +Returns a number of DMA channel. +Value of Index should be inside 1..DMACounter. + + + +property PortCounter : Word read fPortCounter; +----------------------------------------- + +Shows how many Port I/O areas are used by device(s). + +property PortBase[Index:Word] : Word; read only; +--------------------------------------------------- + +Returns a first port address of the port I/O area. +Value of Index should be inside 1..PortCounter. + +property PortEnd[Index:Word] : Word; read only; +-------------------------------------------------- + +Returns a last port address of the port I/O area. +Value of Index should be inside 1..PortCounter. + +property MemCounter : Word; read only; +------------------------------------------ + +Shows how many physical memory areas are used by device(s). + +property MemBase[Index:Word] : DWORD; read only; +--------------------------------------------------- + +Returns a first address of the physical memory area. +Value of Index should be inside 1..MemCounter. + + +property MemEnd[Index:Word] : DWORD read GetMemEnd; +--------------------------------------------------- + +Returns a last address of the physical memory area. +Value of Index should be inside 1..MemCounter. + + + +5. CONTACT INFORMATION +====================== + + Comments, questions and suggestions regarding TVicRes can be directed +by e-mail to ivi@ufanet.ru or tools@entechtaiwan.com. + + +With best wishes, +Victor Ishikeev +Oct 1998 + +e-mail: ivi@ufanet.ru, tools@entechtaiwan.com +http://www.entechatiwan.com/tools.htm \ No newline at end of file diff --git a/lib/tvicres/VENDOR.TXT b/lib/tvicres/VENDOR.TXT new file mode 100644 index 00000000..bfc6d144 --- /dev/null +++ b/lib/tvicres/VENDOR.TXT @@ -0,0 +1,62 @@ + TVicRes version 1.0 + + Copyright (C) 1998 Victor Ishikeev + e-mail: ivi@ufanet.ru, tools@entechtaiwan.com + http://www.entechatiwan.com/tools.htm + + All Rights Reserved + + VENDOR.TXT + ========== + +This file provides information for Shareware Distributors and Disk Vendors +who wish to distribute the TVicRes 1.0 class, including an extract from +the license agreement and suggested program descriptions and keywords. + + + Distribution + ================== + +The complete license agreement is contained in the file LICENSE.TXT. + +The following two paragraphs are extracts from the license agreement +regarding the distribution of the TVicRes: + +You are hereby licensed to make as many copies of this software and its +documentation as you wish; give exact copies (including all files) of the +original version to anyone; and distribute the software and documentation in +its unmodified form via electronic means. There is no charge for any of the +above. + +You are specifically prohibited from charging, or requesting donations, for +any such copies (a small handling fee is acceptable). You are further +prohibited from distributing the software and/or documentation with other +products (commercial or otherwise) without prior written permission. + + + Suggested One Line Program Description: + +1. Delphi 2.x, Delphi 3.x, Delphi 4.x, C++Builder 1.x and C++Builder 3.x class. + +Allows see all hardware resources (ports, memory, IRQs, DMA) assigned to the +any device in system. + Suggested Keywords: + +Windows 95 Windows 98 Delphi C++ Builder Component I/O Ports Hardware Physical +Memory Interrupt IRQ DMA + + + Suggested Description + +TVicRes is a programming tool (class) for Win32 applications that allows see all +hardware resources (ports, memory, IRQs, DMA) assigned to the any device in system. + +This release (1.0) of TVicRes is a shareware ($15US). + + Other Information + +Requirements: Windows 95, Windows 98. + +Author: Victor Ishikeev +e-mail: ivi@ufanet.ru, tools@entechtaiwan.com +http://www.entechatiwan.com/tools.htm diff --git a/lib/vsscm32/MISC.PAS b/lib/vsscm32/MISC.PAS new file mode 100644 index 00000000..9acbcbd1 --- /dev/null +++ b/lib/vsscm32/MISC.PAS @@ -0,0 +1,112 @@ +unit Misc; + +interface + +uses + Windows, SysUtils; + +function FormatLastError( dwLastError: DWORD; + szOutputBuffer: PChar; dwSizeofOutputBuffer: DWORD ): PChar; + +const + MAXOUTPUTSTRINGLENGTH = 4096; + +implementation + +function MAKELANGID( usPrimaryLanguage, usSubLanguage: Byte ): WORD; +begin + Result := ((usSubLanguage shl 10) + usPrimaryLanguage); +end; + +// +// FUNCTION: FormatLastError(DWORD, LPSTR, DWORD) +// +// PURPOSE: Pretty print a system error to a string. +// +// PARAMETERS: +// dwLastError - Actual error code to decipher. +// szOutputBuffer - String buffer to pretty print to. +// dwSizeofOutputBuffer - Size of String buffer. +// +// RETURN VALUE: +// Returns the buffer printed to. +// +// COMMENTS: +// If szOutputBuffer isn't big enough to hold the whole string, +// then the string gets truncated to fit the buffer. +// +// If szOutputBuffer == NULL, then dwSizeofOutputBuffer +// is ignored, a buffer 'big enough' is LocalAlloc()d and +// a pointer to it is returned. However, its *very* important +// that this pointer be LocalFree()d by the calling application. +// +// +function FormatLastError( dwLastError: DWORD; + szOutputBuffer: PChar; dwSizeofOutputBuffer: DWORD ): PChar; +var + dwRetFM, + dwFlags: DWORD; + dwGetLastError: DWORD; + szFormatMessageError: LPSTR; +begin + dwFlags := FORMAT_MESSAGE_FROM_SYSTEM; + + // Should we allocate a buffer? + if szOutputBuffer = nil then + begin + // Actually, we make FormatMessage allocate the buffer, if needed. + dwFlags := dwFlags + FORMAT_MESSAGE_ALLOCATE_BUFFER; + + // minimum size FormatMessage should allocate. + dwSizeofOutputBuffer := 1; + end; + + // Make FormatMessage pretty print the system error. + dwRetFM := FormatMessage( + dwFlags, nil, dwLastError, + MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), + PAnsiChar(@szOutputBuffer), dwSizeofOutputBuffer, + nil); + + // FormatMessage failed to print the error. + if dwRetFM = 0 then + begin + dwGetLastError := GetLastError; + + // If we asked FormatMessage to allocate a buffer, then it + // might have allocated one. Lets be safe and LocalFree it. + if (dwFlags and FORMAT_MESSAGE_ALLOCATE_BUFFER) <> 0 then + begin + LocalFree(HLOCAL(szOutputBuffer)); + + szOutputBuffer := PChar(LocalAlloc( LPTR, MAXOUTPUTSTRINGLENGTH )); +{ dwSizeofOutputBuffer := MAXOUTPUTSTRINGLENGTH;} + + if szOutputBuffer = nil then + begin + OutputDebugString( 'Out of memory trying to FormatLastError' ); + result := nil; + Exit; + end; + end; + + szFormatMessageError := PChar(IntToStr(dwGetLastError));{ + FormatLastError( dwGetLastError, nil, 0 );} + + if szFormatMessageError = nil then + begin + Result := nil; + Exit; + end; + + wsprintf(szOutputBuffer, + PChar('FormatMessage failed on error '+IntToStr(dwLastError)+' for the following reason: '+ + szFormatMessageError) ); + + LocalFree( HLOCAL(szFormatMessageError) ); + end; + + Result := szOutputBuffer; +end; + +end. diff --git a/lib/vsscm32/Misc.dcu b/lib/vsscm32/Misc.dcu new file mode 100644 index 00000000..619446c9 Binary files /dev/null and b/lib/vsscm32/Misc.dcu differ diff --git a/lib/vsscm32/Readme.txt b/lib/vsscm32/Readme.txt new file mode 100644 index 00000000..dea5bfad --- /dev/null +++ b/lib/vsscm32/Readme.txt @@ -0,0 +1,78 @@ +This commponent was based on the COMM32 component written +by David Wann of Stamina Software. + +As good as Davids Wann's Component is, I felt in need a few Enharncments. + +I have added a DataBits Property, which is imperative to most Comm's +applications. +An Application I have written needs DataBits, so there was my +insperation to add it. + +To this I have added drop down lists for the Comm Port, and Baud Rate +and of course to the new Databits Property. + + + What files do I install ? + ************************* + +Copy the VSSCOMM32.PAS & VSSCOMM32.RES to your Component directory. + + + + How to use this component ? + *************************** + +There is a quick wee demo I put togeither called VSSCMDEMO. +Open the VSSCMDEMO.DPR, and then edit the properties in the componet +to suite your modem. +then Compile it. + + OK, But how do I use the Component in My Own App. ? + *************************************************** + +you need to open the Comm Port first. + +USE :- the "StartComm" function to open the port + +Next write something to it :- + +USE :- the "WriteCommData" function to write to the port. + + i.e. VSSCOMM321.WriteCommData (StringToWrite,LenghtofStringToWrite); + +StringToWrite = the string of data you want to write to the comm Port. + +lengthofStringToWrite = the length of (StringToWrite); + + or more easily as an example :- + + Procedure WriteMyDataToComm (blah, blah, blah); + var + senddata: String; + begin + senddata := 'This is a Test' + VSSCOMM321.WriteCommData (Pchar(Senddata),length(senddata)); + end; + +Now Close the Comm Port :- + +USE :- The "StopComm" function to close the port. + + +And thats it, that easy. + + +If you have any questions or find any bugs, please let me know, or if you +make any other enhancments please send me a copy of your component. + +As with David Wann's COMM32, this is freeware. + + +cheers, Jeremy Coulter + Visual Software Solutions, 1996 + vss@mac.co.nz + http://www.voyager.co.nz/~jcoulter/index.htm + + + +p.s. I applogize for any spelling mistakes, not my forte. \ No newline at end of file diff --git a/lib/vsscm32/VSSComm32.dcr b/lib/vsscm32/VSSComm32.dcr new file mode 100644 index 00000000..916ed819 Binary files /dev/null and b/lib/vsscm32/VSSComm32.dcr differ diff --git a/lib/vsscm32/VSSComm32.dcu b/lib/vsscm32/VSSComm32.dcu new file mode 100644 index 00000000..ffbcba29 Binary files /dev/null and b/lib/vsscm32/VSSComm32.dcu differ diff --git a/lib/vsscm32/VSSComm32.pas b/lib/vsscm32/VSSComm32.pas new file mode 100644 index 00000000..111fba75 --- /dev/null +++ b/lib/vsscm32/VSSComm32.pas @@ -0,0 +1,1599 @@ +unit VSSComm32; +{** This Communications Component is based on David Wann's COMM32 component. + I have added a DataBits property, which Davids lacked, and as one of my + apps need Databits, I set out to add Databits to Davids base componet. + This is a bit of a feat for me, as I have only written one component before + this, and even that is still under construction. + I have also made the component abit more user freindly, by adding dropdown + lists of comm ports and Baudrates, as well as to the new Databits. + As with David Wann's Comm32 component, this is freeware. + + I hope you find this Component useful, as much as I do. + + Cheers, Jeremy Coulter + Visual Software Soultions + vss@mac.co.nz + http://www.voyager.co.nz/~jcoulter/index.htm + + thanks to :- + David Wann + Stamina Software + 28/02/96 + davidwann@hunterlink.net.au **} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Misc; + +const + // messages from read/write threads + PWM_GOTCOMMDATA = WM_USER + 1; + PWM_REQUESTHANGUP = WM_USER + 2; + +type + ECommsError = class( Exception ); + + TCommPort = (Com1, Com2, Com3, Com4); + TParity = (None,Odd,Even,Mark,Space); + TStopBits = (_1, _1_5, _2); + TDataBits = (_4,_5,_6,_7,_8); + TBaudRate = (____110, ____300, ____600, ___1200, ___2400, ___4800, ___9600, __14400, + __19200, __38400, __56000, _128000, _256000); + TReadThread = class( TThread ) + protected + procedure Execute; override; + public + hCommFile: THandle; + hCloseEvent: THandle; + hVSSComm32Window: THandle; + function SetupCommEvent( lpOverlappedCommEvent: POverlapped; + var lpfdwEvtMask: DWORD ): Boolean; + function SetupReadEvent( lpOverlappedRead: POverlapped; + lpszInputBuffer: LPSTR; dwSizeofBuffer: DWORD; + var lpnNumberOfBytesRead: DWORD ): Boolean; + function HandleCommEvent( lpOverlappedCommEvent: POverlapped; + var lpfdwEvtMask: DWORD; fRetrieveEvent: Boolean ): Boolean; + function HandleReadEvent( lpOverlappedRead: POverlapped; + lpszInputBuffer: LPSTR; dwSizeofBuffer: DWORD; + var lpnNumberOfBytesRead: DWORD ): Boolean; + function HandleReadData( lpszInputBuffer: LPCSTR; dwSizeofBuffer: DWORD ): Boolean; + function ReceiveData( lpNewString: LPSTR; dwSizeofNewString: DWORD ): BOOL; + procedure PostHangupCall; + end; + + TWriteThread = class( TThread ) + protected + procedure Execute; override; + function HandleWriteData( lpOverlappedWrite: POverlapped; + pDataToWrite: PChar; dwNumberOfBytesToWrite: DWORD): Boolean; + public + hCommFile: THandle; + hCloseEvent: THandle; + hVSSComm32Window: THandle; + function WriteComm( pDataToWrite: LPCSTR; dwSizeofDataToWrite: DWORD ): Boolean; + procedure PostHangupCall; + end; + + TReceiveDataEvent = procedure( Buffer: Pointer; BufferLength: Word ) of object; + + TVSSComm32 = class( TComponent ) + private + { Private declarations } + ReadThread: TReadThread; + WriteThread: TWriteThread; + FCommsLogFileName, + FCommPort: TCommport; + hCommFile: THandle; + hCloseEvent: THandle; + FOnReceiveData: TReceiveDataEvent; + FOnRequestHangup: TNotifyEvent; + FHWnd: THandle; + FBaudRate: TBaudrate; + FParity: TParity; + FStopBits: TStopBits; + FDataBits: TDatabits; + + procedure SetCommsLogFileName( LogFileName: string ); + function GetReceiveDataEvent: TReceiveDataEvent; + procedure SetReceiveDataEvent( AReceiveDataEvent: TReceiveDataEvent ); + function GetRequestHangupEvent: TNotifyEvent; + procedure SetRequestHangupEvent( ARequestHangupEvent: TNotifyEvent ); + procedure CommWndProc( var msg: TMessage ); + protected + { Protected declarations } + procedure CloseReadThread; + procedure CloseWriteThread; + procedure ReceiveData( Buffer: PChar; BufferLength: Word ); + procedure RequestHangup; + public + { Public declarations } + constructor Create( AOwner: TComponent ); override; + destructor Destroy; override; + function StartComm: Boolean; + procedure StopComm; + function WriteCommData( pDataToWrite: PChar; dwSizeofDataToWrite: Word ): Boolean; + published + { Published declarations } + property CommPort: Tcommport read FCommPort write FCommPort; + property BaudRate: TBaudRate read FBaudRate write FBaudRate; + property Parity: TParity read FParity write FParity; + Property DataBits: TDatabits read FDatabits write FDatabits; + property StopBits: TStopBits read FStopBits write FStopBits; + {property CommPort: string read FCommPort write FCommPort;} + { property CommsLogFileName: string read FCommsLogFileName write SetCommsLogFileName;} + property OnReceiveData: TReceiveDataEvent + read GetReceiveDataEvent write SetReceiveDataEvent; + property OnRequestHangup: TNotifyEvent + read GetRequestHangupEvent write SetRequestHangupEvent; + end; + +const +// This is the message posted to the WriteThread +// When we have something to write. + PWM_COMMWRITE = WM_USER+1; + +// Default size of the Input Buffer used by this code. + INPUTBUFFERSIZE = 2048; + +var + CommsLogFile: Text; // means you can only debug 1 component at a time + + +procedure LogDebugInfo( outstr: PChar ); +procedure LogDebugLastError( dwLastError: DWORD; szPrefix: LPSTR ); +procedure Register; + +implementation +{$R VSSComm32.res} +var + CommsLogName: string; // used as a check if file is assigned + +(******************************************************************************) +// TVSSComm32 PUBLIC METHODS +(******************************************************************************) + +constructor TVSSComm32.Create( AOwner: TComponent ); +begin + inherited Create( AOwner ); + FCommPort := COM1; + {FCommsLogFileName := '';} + CommsLogName := ''; + ReadThread := nil; + WriteThread := nil; + hCommFile := 0; + if not (csDesigning in ComponentState) then + FHWnd := AllocateHWnd(CommWndProc); +end; + +destructor TVSSComm32.Destroy; +begin + if not (csDesigning in ComponentState) then + begin + DeallocateHWnd(FHwnd); + end; + inherited Destroy; +end; + +// +// FUNCTION: StartComm +// +// PURPOSE: Starts communications over the comm port. +// +// PARAMETERS: +// hNewCommFile - This is the COMM File handle to communicate with. +// This handle is obtained from TAPI. +// +// RETURN VALUE: +// TRUE if able to setup the communications. +// +// COMMENTS: +// +// StartComm makes sure there isn't communication in progress already, +// creates a Comm file, and creates the read and write threads. It +// also configures the hNewCommFile for the appropriate COMM settings. +// +// If StartComm fails for any reason, it's up to the calling application +// to close the Comm file handle. +// +// + +function TVSSComm32.StartComm: Boolean; +var + commtimeouts: TCommTimeouts; + dcb: Tdcb; + commprop: TCommProp; + fdwEvtMask: DWORD; + hNewCommFile: THandle; + dbits: TDatabits; + brate: TBaudrate; + cmprt: TCommPort; + setfcommport: string; +begin + // Are we already doing comm? + if (hCommFile <> 0) then + raise ECommsError.Create( 'Already have a comm file open' ); + + {if CommsLogFileName <> '' then + begin + AssignFile( CommsLogFile, fCommsLogFileName ); + Rewrite( CommsLogFile ); + end;} + {** set comm port **} + cmprt:=FCommport; + case cmprt of + com1: setfcommport:='COM1'; + com2: setfcommport:='COM2'; + com3: setfcommport:='COM3'; + com4: setfcommport:='COM4'; + end; + + hNewCommFile := CreateFile( + PChar(setfCommPort), + GENERIC_READ+GENERIC_WRITE, + 0, {not shared} + nil, {no security ??} + OPEN_EXISTING, + {FILE_ATTRIBUTE_NORMAL+}FILE_FLAG_OVERLAPPED, + 0 {template} ); + if hNewCommFile = INVALID_HANDLE_VALUE then + raise ECommsError.Create( 'Error opening com port' ); + + // Is this a valid comm handle? + if GetFileType( hNewCommFile ) <> FILE_TYPE_CHAR then + raise ECommsError.Create( 'File handle is not a comm handle. ' ); + + // Its ok to continue. + + hCommFile := hNewCommFile; + + // Setting and querying the comm port configurations. + + // Configure the comm settings. + // NOTE: Most Comm settings can be set through TAPI, but this means that + // the CommFile will have to be passed to this component. + + GetCommState( hNewCommFile, dcb ); + GetCommProperties( hNewCommFile, commprop ); + GetCommMask( hCommFile, fdwEvtMask ); + GetCommTimeouts( hCommFile, commtimeouts ); + + // The CommTimeout numbers will very likely change if you are + // coding to meet some kind of specification where + // you need to reply within a certain amount of time after + // recieving the last byte. However, If 1/4th of a second + // goes by between recieving two characters, its a good + // indication that the transmitting end has finished, even + // assuming a 1200 baud modem. + + commtimeouts.ReadIntervalTimeout := 250; + commtimeouts.ReadTotalTimeoutMultiplier := 0; + commtimeouts.ReadTotalTimeoutConstant := 0; + commtimeouts.WriteTotalTimeoutMultiplier := 0; + commtimeouts.WriteTotalTimeoutConstant := 0; + + SetCommTimeouts( hCommFile, commtimeouts ); + + // fAbortOnError is the only DCB dependancy in TapiComm. + // Can't guarentee that the SP will set this to what we expect. + {dcb.fAbortOnError := False; NOT VALID} + dbits:=FDatabits; + brate:= FBaudrate; + {** Set Baud Rate **} + case brate of + ____110: DCB.BaudRate := CBR_110; + ____300: DCB.BaudRate := CBR_300; + ____600: DCB.BaudRate := CBR_600; + ___1200: DCB.BaudRate := CBR_1200; + ___2400: DCB.BaudRate := CBR_2400; + ___4800: DCB.BaudRate := CBR_4800; + ___9600: DCB.BaudRate := CBR_9600; + __14400: DCB.BaudRate := CBR_14400; + __19200: DCB.BaudRate := CBR_19200; + __38400: DCB.BaudRate := CBR_38400; + __56000: DCB.BaudRate := CBR_56000; + _128000: DCB.BaudRate := CBR_128000; + _256000: DCB.BaudRate := CBR_256000; + end; + {** set partiy **} + dcb.Parity := Ord(FParity); + + {** set databits **} + case dbits of + _4: DCB.ByteSize := 4; + _5: DCB.ByteSize := 5; + _6: DCB.ByteSize := 6; + _7: DCB.ByteSize := 7; + _8: DCB.ByteSize := 8; + end; + {** set stopbits**} + dcb.StopBits := Ord(FStopBits); + + SetCommState( hNewCommFile, dcb ); + + // Create the event that will signal the threads to close. + hCloseEvent := CreateEvent( nil, True, False, nil ); + + if hCloseEvent = 0 then + begin + LogDebugLastError( GetLastError, 'Unable to CreateEvent: ' ); + hCommFile := 0; + Result := False; + Exit + end; + + // Create the Read thread. + try + ReadThread := TReadThread.Create( True {suspended} ); + except + LogDebugLastError( GetLastError, 'Unable to create Read thread' ); + raise ECommsError.Create( 'Unable to create Read thread' ); + end; + ReadThread.hCommFile := hCommFile; + ReadThread.hCloseEvent := hCloseEvent; + ReadThread.hVSSComm32Window := FHWnd; + ReadThread.Resume; + + // Comm threads should have a higher base priority than the UI thread. + // If they don't, then any temporary priority boost the UI thread gains + // could cause the COMM threads to loose data. + ReadThread.Priority := tpHighest; + + // Create the Write thread. + try + WriteThread := TWriteThread.Create( True {suspended} ); + except + LogDebugLastError( GetLastError, 'Unable to create Write thread' ); + raise ECommsError.Create( 'Unable to create Write thread' ); + end; + WriteThread.hCommFile := hCommFile; + WriteThread.hCloseEvent := hCloseEvent; + WriteThread.hVSSComm32Window := FHWnd; + WriteThread.Resume; + + WriteThread.Priority := tpHigher; + + // Everything was created ok. Ready to go! + Result := True; +end; {TVSSComm32.StartComm} + +// +// FUNCTION: StopComm +// +// PURPOSE: Stop and end all communication threads. +// +// PARAMETERS: +// none +// +// RETURN VALUE: +// none +// +// COMMENTS: +// +// Tries to gracefully signal all communication threads to +// close, but terminates them if it has to. +// +// +procedure TVSSComm32.StopComm; +begin + // No need to continue if we're not communicating. + if hCommFile = 0 then + Exit; + + LogDebugInfo( 'Stopping the Comm' ); + + // Close the threads. + CloseReadThread; + CloseWriteThread; + + // Not needed anymore. + CloseHandle( hCloseEvent ); + + // Now close the comm port handle. + CloseHandle( hCommFile ); + hCommFile := 0; + {if fCommsLogFileName <> '' then + CloseFile( CommsLogFile ); } +end; {TVSSComm32.StopComm} + +// +// FUNCTION: WriteCommData(PChar, Word) +// +// PURPOSE: Send a String to the Write Thread to be written to the Comm. +// +// PARAMETERS: +// pszStringToWrite - String to Write to Comm port. +// nSizeofStringToWrite - length of pszStringToWrite. +// +// RETURN VALUE: +// Returns TRUE if the PostMessage is successful. +// Returns FALSE if PostMessage fails or Write thread doesn't exist. +// +// COMMENTS: +// +// This is a wrapper function so that other modules don't care that +// Comm writing is done via PostMessage to a Write thread. Note that +// using PostMessage speeds up response to the UI (very little delay to +// 'write' a string) and provides a natural buffer if the comm is slow +// (ie: the messages just pile up in the message queue). +// +// Note that it is assumed that pszStringToWrite is allocated with +// LocalAlloc, and that if WriteCommData succeeds, its the job of the +// Write thread to LocalFree it. If WriteCommData fails, then its +// the job of the calling function to free the string. +// +// +function TVSSComm32.WriteCommData( pDataToWrite: PChar; dwSizeofDataToWrite: Word ): Boolean; +var + Buffer: Pointer; +begin + if WriteThread <> nil then + begin + Buffer := Pointer(LocalAlloc( LPTR, dwSizeofDataToWrite+1 )); + Move( pDataToWrite^, Buffer^, dwSizeofDataToWrite ); + if PostThreadMessage( WriteThread.ThreadID, PWM_COMMWRITE, + WPARAM(dwSizeofDataToWrite), LPARAM(Buffer) ) then + begin + Result := true; + Exit; + end + else + LogDebugInfo( 'Failed to Post to Write thread. ' ); + end + else + LogDebugInfo( 'Write thread not created' ); + + Result := False; +end; {TVSSComm32.WriteCommData} + +(******************************************************************************) +// TVSSComm32 PROTECTED METHODS +(******************************************************************************) + +// +// FUNCTION: CloseReadThread +// +// PURPOSE: Close the Read Thread. +// +// PARAMETERS: +// none +// +// RETURN VALUE: +// none +// +// COMMENTS: +// +// Closes the Read thread by signaling the CloseEvent. +// Purges any outstanding reads on the comm port. +// +// Note that terminating a thread leaks memory. +// Besides the normal leak incurred, there is an event object +// that doesn't get closed. This isn't worth worrying about +// since it shouldn't happen anyway. +// +// +procedure TVSSComm32.CloseReadThread; +begin + // If it exists... + if ReadThread <> nil then + begin + LogDebugInfo( 'Closing Read Thread '); + + // Signal the event to close the worker threads. + SetEvent( hCloseEvent ); + + // Purge all outstanding reads + PurgeComm( hCommFile, PURGE_RXABORT + PURGE_RXCLEAR ); + + // Wait 10 seconds for it to exit. Shouldn't happen. + if (WaitForSingleObject(ReadThread.Handle, 10000) = WAIT_TIMEOUT) then + begin + LogDebugInfo( 'Read thread not exiting. Terminating it.' ); + ReadThread.Terminate; + end; + ReadThread.Free; + ReadThread := nil; + end; +end; {TVSSComm32.CloseReadThread} + + +// +// FUNCTION: CloseWriteThread +// +// PURPOSE: Closes the Write Thread. +// +// PARAMETERS: +// none +// +// RETURN VALUE: +// none +// +// COMMENTS: +// +// Closes the write thread by signaling the CloseEvent. +// Purges any outstanding writes on the comm port. +// +// Note that terminating a thread leaks memory. +// Besides the normal leak incurred, there is an event object +// that doesn't get closed. This isn't worth worrying about +// since it shouldn't happen anyway. +// +// +procedure TVSSComm32.CloseWriteThread; +begin + // If it exists... + if WriteThread <> nil then + begin + LogDebugInfo( 'Closing Write Thread' ); + + // Signal the event to close the worker threads. + SetEvent(hCloseEvent); + + // Purge all outstanding writes. + PurgeComm(hCommFile, PURGE_TXABORT + PURGE_TXCLEAR); + + // Wait 10 seconds for it to exit. Shouldn't happen. + if WaitForSingleObject( WriteThread.Handle, 10000 ) = WAIT_TIMEOUT then + begin + LogDebugInfo( 'Write thread not exiting. Terminating it.' ); + WriteThread.Terminate; + end; + WriteThread.Free; + WriteThread := nil; + end; +end; {TVSSComm32.CloseWriteThread} + +procedure TVSSComm32.ReceiveData( Buffer: PChar; BufferLength: Word ); +begin + if Assigned(FOnReceiveData) then + FOnReceiveData( Buffer, BufferLength ); +end; + +procedure TVSSComm32.RequestHangup; +begin + if Assigned(FOnRequestHangup) then + FOnRequestHangup( Self ); +end; + +(******************************************************************************) +// TVSSComm32 PRIVATE METHODS +(******************************************************************************) + +procedure TVSSComm32.SetCommsLogFileName( LogFileName: string ); +begin + CommsLogName := LogFileName; +{ FCommsLogFileName := LogFileName;} +end; + +procedure TVSSComm32.CommWndProc( var msg: TMessage ); +begin + case msg.msg of + PWM_GOTCOMMDATA: + begin + ReceiveData( PChar(msg.LParam), msg.WParam ); + LocalFree( msg.LParam ); + end; + PWM_REQUESTHANGUP: + RequestHangup; + end; +end; + +function TVSSComm32.GetReceiveDataEvent: TReceiveDataEvent; +begin + Result := FOnReceiveData; +end; + +procedure TVSSComm32.SetReceiveDataEvent( AReceiveDataEvent: TReceiveDataEvent ); +begin + FOnReceiveData := AReceiveDataEvent; +end; + +function TVSSComm32.GetRequestHangupEvent: TNotifyEvent; +begin + Result := FOnRequestHangup; +end; + +procedure TVSSComm32.SetRequestHangupEvent( ARequestHangupEvent: TNotifyEvent ); +begin + FOnRequestHangup := ARequestHangupEvent; +end; + + +(******************************************************************************) +// READ THREAD +(******************************************************************************) + +// +// PROCEDURE: TReadThread.Execute +// +// PURPOSE: This is the starting point for the Read Thread. +// +// PARAMETERS: +// None. +// +// RETURN VALUE: +// None. +// +// COMMENTS: +// +// The Read Thread uses overlapped ReadFile and sends any data +// read from the comm port to the VSSComm32Window. This is +// eventually done through a PostMessage so that the Read Thread +// is never away from the comm port very long. This also provides +// natural desynchronization between the Read thread and the UI. +// +// If the CloseEvent object is signaled, the Read Thread exits. +// +// Separating the Read and Write threads is natural for a application +// where there is no need for synchronization between +// reading and writing. However, if there is such a need (for example, +// most file transfer algorithms synchronize the reading and writing), +// then it would make a lot more sense to have a single thread to handle +// both reading and writing. +// +// +procedure TReadThread.Execute; +var + szInputBuffer: array[0..INPUTBUFFERSIZE-1] of Char; + nNumberOfBytesRead: DWORD; + + HandlesToWaitFor: array[0..2] of THandle; + dwHandleSignaled: DWORD; + + fdwEvtMask: DWORD; + + // Needed for overlapped I/O (ReadFile) + overlappedRead: TOverlapped; + + // Needed for overlapped Comm Event handling. + overlappedCommEvent: TOverlapped; +label + EndReadThread; +begin + + FillChar( overlappedRead, Sizeof(overlappedRead), 0 ); + FillChar( overlappedCommEvent, Sizeof(overlappedCommEvent), 0 ); + + // Lets put an event in the Read overlapped structure. + overlappedRead.hEvent := CreateEvent( nil, True, True, nil); + if overlappedRead.hEvent = 0 then + begin + LogDebugLastError( GetLastError, 'Unable to CreateEvent: ' ); + PostHangupCall; + goto EndReadThread; + end; + + // And an event for the CommEvent overlapped structure. + overlappedCommEvent.hEvent := CreateEvent( nil, True, True, nil); + if overlappedCommEvent.hEvent = 0 then + begin + LogDebugLastError( GetLastError, 'Unable to CreateEvent: ' ); + PostHangupCall(); + goto EndReadThread; + end; + + // We will be waiting on these objects. + HandlesToWaitFor[0] := hCloseEvent; + HandlesToWaitFor[1] := overlappedCommEvent.hEvent; + HandlesToWaitFor[2] := overlappedRead.hEvent; + + + // Setup CommEvent handling. + + // Set the comm mask so we receive error signals. + if not SetCommMask(hCommFile, EV_ERR) then + begin + LogDebugLastError( GetLastError, 'Unable to SetCommMask: ' ); + PostHangupCall; + goto EndReadThread; + end; + + // Start waiting for CommEvents (Errors) + if not SetupCommEvent( @overlappedCommEvent, fdwEvtMask ) then + begin + LogDebugLastError( GetLastError, 'Unable to SetupCommEvent1: ' ); + PostHangupCall; + goto EndReadThread; + end; + + // Start waiting for Read events. + if not SetupReadEvent( @overlappedRead, + szInputBuffer, INPUTBUFFERSIZE, + nNumberOfBytesRead ) then + begin + LogDebugLastError( GetLastError, 'Unable to SetupReadEvent: ' ); + PostHangupCall; + goto EndReadThread; + end; + + // Keep looping until we break out. + while True do + begin + // Wait until some event occurs (data to read; error; stopping). + dwHandleSignaled := + WaitForMultipleObjects(3, @HandlesToWaitFor, + False, INFINITE); + + // Which event occured? + case dwHandleSignaled of + WAIT_OBJECT_0: // Signal to end the thread. + begin + // Time to exit. + OutputDebugString( 'Time to Exit' ); + goto EndReadThread; + end; + + WAIT_OBJECT_0 + 1: // CommEvent signaled. + begin + // Handle the CommEvent. + if not HandleCommEvent( @overlappedCommEvent, fdwEvtMask, TRUE ) then + begin + PostHangupCall; + LogDebugLastError( GetLastError, 'Unable HandleCommEvent: ' ); + goto EndReadThread; + end; + + // Start waiting for the next CommEvent. + if not SetupCommEvent( @overlappedCommEvent, fdwEvtMask ) then + begin + PostHangupCall; + LogDebugLastError( GetLastError, 'Unable to SetupCommEvent2: ' ); + goto EndReadThread; + end; + {break;??} + end; + + WAIT_OBJECT_0 + 2: // Read Event signaled. + begin + // Get the new data! + if not HandleReadEvent( @overlappedRead, + szInputBuffer, INPUTBUFFERSIZE, + nNumberOfBytesRead ) then + begin + PostHangupCall; + LogDebugLastError( GetLastError, 'Unable to HandleReadEvent: ' ); + goto EndReadThread; + end; + + // Wait for more new data. + if not SetupReadEvent( @overlappedRead, + szInputBuffer, INPUTBUFFERSIZE, + nNumberOfBytesRead ) then + begin + PostHangupCall; + goto EndReadThread; + end; + {break;} + end; + + WAIT_FAILED: // Wait failed. Shouldn't happen. + begin + LogDebugLastError( GetLastError, 'Read WAIT_FAILED: ' ); + PostHangupCall; + goto EndReadThread; + end; + + else // This case should never occur. + begin + LogDebugInfo( PChar('Unexpected Wait return value '+ + IntToStr(dwHandleSignaled)) ); + PostHangupCall; + goto EndReadThread; + end; + end; {case dwHandleSignaled} + end; {while True} + + // Time to clean up Read Thread. + EndReadThread: + + LogDebugInfo( 'Read thread shutting down' ); + PurgeComm( hCommFile, PURGE_RXABORT + PURGE_RXCLEAR ); + CloseHandle( overlappedRead.hEvent ); + CloseHandle( overlappedCommEvent.hEvent ); +end; {TReadThread.Execute} + +// +// FUNCTION: SetupReadEvent(LPOVERLAPPED, LPSTR, DWORD, LPDWORD) +// +// PURPOSE: Sets up an overlapped ReadFile +// +// PARAMETERS: +// lpOverlappedRead - address of overlapped structure to use. +// lpszInputBuffer - Buffer to place incoming bytes. +// dwSizeofBuffer - size of lpszInputBuffer. +// lpnNumberOfBytesRead - address of DWORD to place the number of read bytes. +// +// RETURN VALUE: +// TRUE if able to successfully setup the ReadFile. FALSE if there +// was a failure setting up or if the CloseEvent object was signaled. +// +// COMMENTS: +// +// This function is a helper function for the Read Thread. This +// function sets up the overlapped ReadFile so that it can later +// be waited on (or more appropriatly, so the event in the overlapped +// structure can be waited upon). If there is data waiting, it is +// handled and the next ReadFile is initiated. +// Another possible reason for returning FALSE is if the comm port +// is closed by the service provider. +// +// +// +function TReadThread.SetupReadEvent( lpOverlappedRead: POverlapped; + lpszInputBuffer: LPSTR; dwSizeofBuffer: DWORD; + var lpnNumberOfBytesRead: DWORD ): Boolean; +var + dwLastError: DWORD; +label + StartSetupReadEvent; +begin + +StartSetupReadEvent: + + Result := False; + // Make sure the CloseEvent hasn't been signaled yet. + // Check is needed because this function is potentially recursive. + if WAIT_TIMEOUT <> WaitForSingleObject(hCloseEvent,0) then + Exit; + + // Start the overlapped ReadFile. + if ReadFile( hCommFile, + lpszInputBuffer^, dwSizeofBuffer, + lpnNumberOfBytesRead, lpOverlappedRead ) then + begin + // This would only happen if there was data waiting to be read. + + LogDebugInfo( 'Data waiting for ReadFile: '); + + // Handle the data. + if not HandleReadData( lpszInputBuffer, lpnNumberOfBytesRead ) then + Exit; + + // Start waiting for more data. + goto StartSetupReadEvent; + end; + + // ReadFile failed. Expected because of overlapped I/O. + dwLastError := GetLastError; + + + // LastError was ERROR_IO_PENDING, as expected. + if dwLastError = ERROR_IO_PENDING then + begin + LogDebugInfo( 'Waiting for data from comm connection.' ); + Result := True; + Exit; + end; + + // Its possible for this error to occur if the + // service provider has closed the port. Time to end. + if dwLastError = ERROR_INVALID_HANDLE then + begin + LogDebugInfo( 'ERROR_INVALID_HANDLE, '+ + 'Likely that the Service Provider has closed the port.' ); + Exit; + end; + + // Unexpected error. No idea what could cause this to happen. + LogDebugLastError( dwLastError, 'Unexpected ReadFile error: ' ); + + PostHangupCall; +end; {TReadThread.SetupReadEvent} + +// +// FUNCTION: HandleReadData(LPCSTR, DWORD) +// +// PURPOSE: Deals with data after its been read from the comm file. +// +// PARAMETERS: +// lpszInputBuffer - Buffer to place incoming bytes. +// dwSizeofBuffer - size of lpszInputBuffer. +// +// RETURN VALUE: +// TRUE if able to successfully handle the data. +// FALSE if unable to allocate memory or handle the data. +// +// COMMENTS: +// +// This function is yet another helper function for the Read Thread. +// It LocalAlloc()s a buffer, copies the new data to this buffer and +// calls PostWriteToDisplayCtl to let the EditCtls module deal with +// the data. Its assumed that PostWriteToDisplayCtl posts the message +// rather than dealing with it right away so that the Read Thread +// is free to get right back to waiting for data. Its also assumed +// that the EditCtls module is responsible for LocalFree()ing the +// pointer that is passed on. +// +// +function TReadThread.HandleReadData( lpszInputBuffer: LPCSTR; dwSizeofBuffer: DWORD ): Boolean; +var + lpszPostedBytes: LPSTR; + tempstr: string; +begin + Result := False; + // If we got data and didn't just time out empty... + if dwSizeofBuffer <> 0 then + begin + tempstr := lpszInputBuffer; + + // Do something with the bytes read. + LogDebugInfo( 'Got something from Comm port!!!' ); + + lpszPostedBytes := PChar( LocalAlloc( LPTR, dwSizeofBuffer+1 ) ); + + if lpszPostedBytes = nil{NULL} then + begin + LogDebugLastError( GetLastError, 'LocalAlloc: ' ); + Exit; + end; + + Move( lpszInputBuffer^, lpszPostedBytes^, dwSizeofBuffer ); + lpszPostedBytes[dwSizeofBuffer] := #0; + + Result := ReceiveData( lpszPostedBytes, dwSizeofBuffer ); + end; +end; {TReadThread.HandleReadData} + +// +// FUNCTION: HandleReadEvent(LPOVERLAPPED, LPSTR, DWORD, LPDWORD) +// +// PURPOSE: Retrieves and handles data when there is data ready. +// +// PARAMETERS: +// lpOverlappedRead - address of overlapped structure to use. +// lpszInputBuffer - Buffer to place incoming bytes. +// dwSizeofBuffer - size of lpszInputBuffer. +// lpnNumberOfBytesRead - address of DWORD to place the number of read bytes. +// +// RETURN VALUE: +// TRUE if able to successfully retrieve and handle the available data. +// FALSE if unable to retrieve or handle the data. +// +// COMMENTS: +// +// This function is another helper function for the Read Thread. This +// is the function that is called when there is data available after +// an overlapped ReadFile has been setup. It retrieves the data and +// handles it. +// +// +function TReadThread.HandleReadEvent( lpOverlappedRead: POverlapped; + lpszInputBuffer: LPSTR; dwSizeofBuffer: DWORD; + var lpnNumberOfBytesRead: DWORD ): Boolean; +var + dwLastError: DWORD; +begin + Result := False; + if GetOverlappedResult( hCommFile, + lpOverlappedRead^, lpnNumberOfBytesRead, False ) then + begin + Result := HandleReadData( lpszInputBuffer, lpnNumberOfBytesRead ); + Exit; + end; + + // Error in GetOverlappedResult; handle it. + + dwLastError := GetLastError; + + // Its possible for this error to occur if the + // service provider has closed the port. Time to end. + if dwLastError = ERROR_INVALID_HANDLE then + begin + LogDebugInfo( 'ERROR_INVALID_HANDLE, '+ + 'Likely that the Service Provider has closed the port.' ); + Exit; + end; + + LogDebugLastError( dwLastError, + 'Unexpected GetOverlappedResult Read Error: ' ); + + PostHangupCall; +end; {TReadThread.HandleReadEvent} + +// +// FUNCTION: SetupCommEvent(LPOVERLAPPED, LPDWORD) +// +// PURPOSE: Sets up the overlapped WaitCommEvent call. +// +// PARAMETERS: +// lpOverlappedCommEvent - Pointer to the overlapped structure to use. +// lpfdwEvtMask - Pointer to DWORD to received Event data. +// +// RETURN VALUE: +// TRUE if able to successfully setup the WaitCommEvent. +// FALSE if unable to setup WaitCommEvent, unable to handle +// an existing outstanding event or if the CloseEvent has been signaled. +// +// COMMENTS: +// +// This function is a helper function for the Read Thread that sets up +// the WaitCommEvent so we can deal with comm events (like Comm errors) +// if they occur. +// +// +function TReadThread.SetupCommEvent( lpOverlappedCommEvent: POverlapped; + var lpfdwEvtMask: DWORD ): Boolean; +var + dwLastError: DWORD; +label + StartSetupCommEvent; +begin + + Result := False; +StartSetupCommEvent: + + // Make sure the CloseEvent hasn't been signaled yet. + // Check is needed because this function is potentially recursive. + if WAIT_TIMEOUT <> WaitForSingleObject( hCloseEvent,0 ) then + Exit; + + // Start waiting for Comm Errors. + if WaitCommEvent( hCommFile, lpfdwEvtMask, lpOverlappedCommEvent ) then + begin + // This could happen if there was an error waiting on the + // comm port. Lets try and handle it. + + LogDebugInfo( 'Event (Error) waiting before WaitCommEvent.' ); + + if not HandleCommEvent( nil, lpfdwEvtMask, False ) then + {??? GetOverlappedResult does not handle "NIL" as defined by Borland} + Exit; + + // What could cause infinite recursion at this point? + goto StartSetupCommEvent; + end; + + // We expect ERROR_IO_PENDING returned from WaitCommEvent + // because we are waiting with an overlapped structure. + + dwLastError := GetLastError; + + // LastError was ERROR_IO_PENDING, as expected. + if dwLastError = ERROR_IO_PENDING then + begin + LogDebugInfo( 'Waiting for a CommEvent (Error) to occur.' ); + Result := True; + Exit + end; + + // Its possible for this error to occur if the + // service provider has closed the port. Time to end. + if dwLastError = ERROR_INVALID_HANDLE then + begin + LogDebugInfo( 'ERROR_INVALID_HANDLE, '+ + 'Likely that the Service Provider has closed the port.' ); + Exit; + end; + + // Unexpected error. No idea what could cause this to happen. + LogDebugLastError( dwLastError, 'Unexpected WaitCommEvent error: ' ); +end; {TReadThread.SetupCommEvent} + +// +// FUNCTION: HandleCommEvent(LPOVERLAPPED, LPDWORD, BOOL) +// +// PURPOSE: Handle an outstanding Comm Event. +// +// PARAMETERS: +// lpOverlappedCommEvent - Pointer to the overlapped structure to use. +// lpfdwEvtMask - Pointer to DWORD to received Event data. +// fRetrieveEvent - Flag to signal if the event needs to be +// retrieved, or has already been retrieved. +// +// RETURN VALUE: +// TRUE if able to handle a Comm Event. +// FALSE if unable to setup WaitCommEvent, unable to handle +// an existing outstanding event or if the CloseEvent has been signaled. +// +// COMMENTS: +// +// This function is a helper function for the Read Thread that (if +// fRetrieveEvent == TRUE) retrieves an outstanding CommEvent and +// deals with it. The only event that should occur is an EV_ERR event, +// signalling that there has been an error on the comm port. +// +// Normally, comm errors would not be put into the normal data stream +// as this sample is demonstrating. Putting it in a status bar would +// be more appropriate for a real application. +// +// +function TReadThread.HandleCommEvent( lpOverlappedCommEvent: POverlapped; + var lpfdwEvtMask: DWORD; fRetrieveEvent: Boolean ): Boolean; +var + dwDummy: DWORD; + lpszOutput: LPSTR; + szError: array[0..127] of Char; + dwErrors, + nOutput, + dwLastError: DWORD; +begin + Result := False; + + szError[0] := #0; + + lpszOutput := PChar(LocalAlloc( LPTR, 256 )); + if lpszOutput = nil{NULL} then + begin + LogDebugLastError( GetLastError, 'LocalAlloc: ' ); + Exit; + end; + + // If this fails, it could be because the file was closed (and I/O is + // finished) or because the overlapped I/O is still in progress. In + // either case (or any others) its a bug and return FALSE. + if fRetrieveEvent then + if not GetOverlappedResult( hCommFile, + lpOverlappedCommEvent^, dwDummy, False ) then + begin + dwLastError := GetLastError; + + // Its possible for this error to occur if the + // service provider has closed the port. Time to end. + if dwLastError = ERROR_INVALID_HANDLE then + begin + LogDebugInfo( 'ERROR_INVALID_HANDLE, '+ + 'Likely that the Service Provider has closed the port.' ); + Exit; + end; + + LogDebugLastError( dwLastError, + 'Unexpected GetOverlappedResult for WaitCommEvent: ' ); + Exit; + end; + + // Was the event an error? + if (lpfdwEvtMask and EV_ERR) <> 0 then + begin + // Which error was it? + if not ClearCommError( hCommFile, dwErrors, nil ) then + begin + dwLastError := GetLastError; + + // Its possible for this error to occur if the + // service provider has closed the port. Time to end. + if dwLastError = ERROR_INVALID_HANDLE then + begin + LogDebugInfo( 'ERROR_INVALID_HANDLE, '+ + 'Likely that the Service Provider has closed the port.' ); + Exit; + end; + + LogDebugLastError( GetLastError,'ClearCommError: ' ); + Exit; + end; + + // Its possible that multiple errors occured and were handled + // in the last ClearCommError. Because all errors were signaled + // individually, but cleared all at once, pending comm events + // can yield EV_ERR while dwErrors equals 0. Ignore this event. + if dwErrors = 0 then + strcat( szError, 'NULL Error' ); + + if (dwErrors and CE_FRAME) <> 0 then + begin + if szError[0] <> #0 then + strcat( szError, ' and ' ); + + strcat( szError,'CE_FRAME' ); + end; + + if (dwErrors and CE_OVERRUN) <> 0 then + begin + if szError[0] <> #0 then + strcat(szError, ' and ' ); + + strcat( szError, 'CE_OVERRUN' ); + end; + + if (dwErrors and CE_RXPARITY) <> 0 then + begin + if szError[0] <> #0 then + strcat( szError, ' and ' ); + + strcat( szError, 'CE_RXPARITY' ); + end; + + if (dwErrors and not (CE_FRAME + CE_OVERRUN + CE_RXPARITY)) <> 0 then + begin + if szError[0] <> #0 then + strcat( szError, ' and ' ); + + strcat( szError, 'EV_ERR Unknown EvtMask' ); + end; + + nOutput := wsprintf(lpszOutput, + PChar('Comm Event: '+szError+', EvtMask = '+IntToStr(dwErrors)) ); + + ReceiveData( lpszOutput, nOutput ); + Result := True; + Exit + end; + + // Should not have gotten here. Only interested in ERR conditions. + + LogDebugInfo( PChar('Unexpected comm event '+IntToStr(lpfdwEvtMask)) ); +end; {TReadThread.HandleCommEvent} + +function TReadThread.ReceiveData( lpNewString: LPSTR; dwSizeofNewString: DWORD ): BOOL; +begin + Result := PostMessage( hVSSComm32Window, PWM_GOTCOMMDATA, + WPARAM(dwSizeofNewString), LPARAM(lpNewString) ); +end; + +procedure TReadThread.PostHangupCall; +begin + PostMessage( hVSSComm32Window, PWM_REQUESTHANGUP, 0, 0 ); +end; + +(******************************************************************************) +// WRITE THREAD +(******************************************************************************) + +// +// PROCEDURE: TWriteThread.Execute +// +// PURPOSE: The starting point for the Write thread. +// +// PARAMETERS: +// lpvParam - unused. +// +// RETURN VALUE: +// DWORD - unused. +// +// COMMENTS: +// +// The Write thread uses a PeekMessage loop to wait for a string to write, +// and when it gets one, it writes it to the Comm port. If the CloseEvent +// object is signaled, then it exits. The use of messages to tell the +// Write thread what to write provides a natural desynchronization between +// the UI and the Write thread. +// +// +procedure TWriteThread.Execute; +var + msg: TMsg; + dwHandleSignaled: DWORD; + overlappedWrite: TOverLapped; +label + EndWriteThread; +begin + + // Needed for overlapped I/O. + FillChar( overlappedWrite, SizeOf(overlappedWrite), 0 ); {0, 0, 0, 0, NULL} + + overlappedWrite.hEvent := CreateEvent( nil, True, True, nil ); + if overlappedWrite.hEvent = 0 then + begin + LogDebugLastError( GetLastError, 'Unable to CreateEvent: ' ); + PostHangupCall; + goto EndWriteThread; + end; + + // This is the main loop. Loop until we break out. + while True do + begin + if not PeekMessage( msg, 0, 0, 0, PM_REMOVE ) then + begin + // If there are no messages pending, wait for a message or + // the CloseEvent. + dwHandleSignaled := + MsgWaitForMultipleObjects(1, hCloseEvent, False, + INFINITE, QS_ALLINPUT); + + case dwHandleSignaled of + WAIT_OBJECT_0: // CloseEvent signaled! + begin + // Time to exit. + goto EndWriteThread; + end; + + WAIT_OBJECT_0 + 1: // New message was received. + begin + // Get the message that woke us up by looping again. + continue; + end; + + WAIT_FAILED: // Wait failed. Shouldn't happen. + begin + LogDebugLastError( GetLastError, 'Write WAIT_FAILED: ' ); + PostHangupCall; + goto EndWriteThread; + end; + + else // This case should never occur. + begin + LogDebugInfo( PChar('Unexpected Wait return value ' + +IntToStr(dwHandleSignaled)) ); + PostHangupCall; + goto EndWriteThread; + end; + end; + end; + + // Make sure the CloseEvent isn't signaled while retrieving messages. + if WAIT_TIMEOUT <> WaitForSingleObject(hCloseEvent,0) then + goto EndWriteThread; + + // Process the message. + + // This could happen if a dialog is created on this thread. + // This doesn't occur in this sample, but might if modified. + if msg.hwnd <> 0{NULL} then + begin + TranslateMessage(msg); + DispatchMessage(msg); + + continue; + end; + + // Handle the message. + case msg.message of + PWM_COMMWRITE: // New string to write to Comm port. + begin + LogDebugInfo( 'Writing to comm port' ); + + // Write the string to the comm port. HandleWriteData + // does not return until the whole string has been written, + // an error occurs or until the CloseEvent is signaled. + if not HandleWriteData( @overlappedWrite, + PChar(msg.lParam), DWORD(msg.wParam) ) then + begin + // If it failed, either we got a signal to end or there + // really was a failure. + + LocalFree( HLOCAL(msg.lParam) ); + goto EndWriteThread; + end; + + // Data was sent in a LocalAlloc()d buffer. Must free it. + LocalFree( HLOCAL(msg.lParam) ); + end; + + // What other messages could the thread get? + else + begin + LogDebugInfo( PChar('Unexpected message posted to Write thread: '+ + IntToStr(msg.message)) ); + {break;} + end; + end; {case} + end; {main loop} + + // Thats the end. Now clean up. + EndWriteThread: + + LogDebugInfo( 'Write thread shutting down' ); + + PurgeComm(hCommFile, PURGE_TXABORT + PURGE_TXCLEAR); + + CloseHandle(overlappedWrite.hEvent); +end; {TWriteThread.Execute} + + +// +// FUNCTION: HandleWriteData(LPOVERLAPPED, LPCSTR, DWORD) +// +// PURPOSE: Writes a given string to the comm file handle. +// +// PARAMETERS: +// lpOverlappedWrite - Overlapped structure to use in WriteFile +// pDataToWrite - String to write. +// dwNumberOfBytesToWrite - Length of String to write. +// +// RETURN VALUE: +// TRUE if all bytes were written. False if there was a failure to +// write the whole string. +// +// COMMENTS: +// +// This function is a helper function for the Write Thread. It +// is this call that actually writes a string to the comm file. +// Note that this call blocks and waits for the Write to complete +// or for the CloseEvent object to signal that the thread should end. +// Another possible reason for returning FALSE is if the comm port +// is closed by the service provider. +// +// +function TWriteThread.HandleWriteData( lpOverlappedWrite: POverlapped; + pDataToWrite: PChar; dwNumberOfBytesToWrite: DWORD): Boolean; +var + dwLastError, + + dwNumberOfBytesWritten, + dwWhereToStartWriting, + + dwHandleSignaled: DWORD; + HandlesToWaitFor: array[0..1] of THandle; +begin + dwNumberOfBytesWritten := 0; + dwWhereToStartWriting := 0; // Start at the beginning. + + HandlesToWaitFor[0] := hCloseEvent; + HandlesToWaitFor[1] := lpOverlappedWrite^.hEvent; + + // Keep looping until all characters have been written. + repeat + // Start the overlapped I/O. + if not WriteFile(hCommFile, + pDataToWrite[ dwWhereToStartWriting ], + dwNumberOfBytesToWrite, dwNumberOfBytesWritten, + lpOverlappedWrite) then + begin + // WriteFile failed. Expected; lets handle it. + dwLastError := GetLastError; + + // Its possible for this error to occur if the + // service provider has closed the port. Time to end. + if (dwLastError = ERROR_INVALID_HANDLE) then + begin + LogDebugInfo( 'ERROR_INVALID_HANDLE, '+ + 'Likely that the Service Provider has closed the port.' ); + Result := False; + Exit; + end; + + // Unexpected error. No idea what. + if dwLastError <> ERROR_IO_PENDING then + begin + LogDebugLastError( dwLastError, 'Error to writing to CommFile' ); + + LogDebugInfo( 'Closing TAPI' ); + PostHangupCall; + Result := False; + Exit; + end; + + // This is the expected ERROR_IO_PENDING case. + + + // Wait for either overlapped I/O completion, + // or for the CloseEvent to get signaled. + dwHandleSignaled := + WaitForMultipleObjects(2, @HandlesToWaitFor, + False, INFINITE); + + case dwHandleSignaled of + WAIT_OBJECT_0: // CloseEvent signaled! + begin + // Time to exit. + Result := False; + Exit; + end; + + WAIT_OBJECT_0 + 1: // Wait finished. + begin + // Time to get the results of the WriteFile + end; + + WAIT_FAILED: // Wait failed. Shouldn't happen. + begin + LogDebugLastError( GetLastError, 'Write WAIT_FAILED: ' ); + PostHangupCall; + Result := False; + Exit + end; + + else // This case should never occur. + begin + LogDebugInfo( PChar('Unexpected Wait return value '+ + IntToStr(dwHandleSignaled)) ); + PostHangupCall; + Result := False; + Exit + end; + end; {case} + + if not GetOverlappedResult(hCommFile, + lpOverlappedWrite^, + dwNumberOfBytesWritten, TRUE) then + begin + dwLastError := GetLastError(); + + // Its possible for this error to occur if the + // service provider has closed the port. + if dwLastError = ERROR_INVALID_HANDLE then + begin + LogDebugInfo('ERROR_INVALID_HANDLE, '+ + 'Likely that the Service Provider has closed the port.'); + Result := False; + Exit; + end; + + // No idea what could cause another error. + LogDebugLastError( dwLastError, 'Error writing to CommFile while waiting'); + LogDebugInfo('Closing TAPI'); + PostHangupCall; + Result := False; + Exit; + end; + end; {WriteFile failure} + + // Some data was written. Make sure it all got written. + + Dec( dwNumberOfBytesToWrite, dwNumberOfBytesWritten ); + Inc( dwWhereToStartWriting, dwNumberOfBytesWritten ); + until (dwNumberOfBytesToWrite <= 0); // Write the whole thing! + + // Wrote the whole string. + Result := True; +end; {TWriteThread.HandleWriteData} + +function TWriteThread.WriteComm( pDataToWrite: LPCSTR; dwSizeofDataToWrite: DWORD ): Boolean; +begin + Result := PostThreadMessage( ThreadID, PWM_COMMWRITE, + WParam(dwSizeofDataToWrite), LParam(pDataToWrite) ); +end; + +procedure TWriteThread.PostHangupCall; +begin + PostMessage( hVSSComm32Window, PWM_REQUESTHANGUP, 0, 0 ); +end; + +(******************************************************************************) +// DEBUG ROUTINES +(******************************************************************************) + +// +// FUNCTION: LogDebugLastError(..) +// +// PURPOSE: Pretty print a line error to the debugging output. +// +// PARAMETERS: +// dwLastError - Actual error code to decipher. +// pszPrefix - String to prepend to the printed message. +// +// RETURN VALUE: +// none +// +// COMMENTS: +// +// Note that there is an internal string length limit of +// MAXOUTPUTSTRINGLENGTH. If this length is exceeded, +// the behavior will be the same as wsprintf, although +// it will be undetectable. *KEEP szPrefix SHORT!* +// +// +procedure LogDebugLastError( dwLastError: DWORD; szPrefix: LPSTR ); +var + szLastError: LPSTR; + szOutputLastError: array[0..MAXOUTPUTSTRINGLENGTH-1] of Char; +begin + if szPrefix = nil then + szPrefix := ''; + + { // Pretty print the error. + szLastError := szFormatLastError(dwLastError, nil, 0); + } + // The only reason FormatLastError should fail is "Out of memory". + if szLastError = nil then + begin + wsprintf( szOutputLastError, PChar(szPrefix+'Out of memory') ); + + LogDebugInfo( szOutputLastError ); + + Exit; + end; + + wsprintf( szOutputLastError, + PChar(szPrefix+'GetLastError returned: "'+szLastError+'"') ); + + // Pointer returned from FormatLineError *must* be freed! + LocalFree( HLOCAL(szLastError) ); + + // Print it! + LogDebugInfo( szOutputLastError ); +end; {LogDebugLastError} + +procedure LogDebugInfo( outstr: PChar ); +begin + if CommsLogName <> '' then + Writeln( CommsLogFile, outstr ); +end; {LogDebugInfo} + +procedure Register; +begin + RegisterComponents('VSS', [TVSSComm32]); +end; + +end. diff --git a/lib/vsscm32/vsscmdemo.dof b/lib/vsscm32/vsscmdemo.dof new file mode 100644 index 00000000..6e4db4c4 --- /dev/null +++ b/lib/vsscm32/vsscmdemo.dof @@ -0,0 +1,48 @@ +[Compiler] +A=1 +B=0 +C=0 +D=1 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=1 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=0 +Z=1 +ShowHints=0 +ShowWarnings=0 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; + +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= + +[Directories] +OutputDir= +SearchPath= +Conditionals= + +[Parameters] +RunParams= diff --git a/lib/vsscm32/vsscmdemo.dpr b/lib/vsscm32/vsscmdemo.dpr new file mode 100644 index 00000000..b7d84b08 --- /dev/null +++ b/lib/vsscm32/vsscmdemo.dpr @@ -0,0 +1,13 @@ +program vsscmdemo; + +uses + Forms, + vsscomdemo in 'vsscomdemo.pas' {Form1}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/lib/vsscm32/vsscmdemo.res b/lib/vsscm32/vsscmdemo.res new file mode 100644 index 00000000..aed18118 Binary files /dev/null and b/lib/vsscm32/vsscmdemo.res differ diff --git a/lib/vsscm32/vsscomdemo.dcu b/lib/vsscm32/vsscomdemo.dcu new file mode 100644 index 00000000..c6b750ec Binary files /dev/null and b/lib/vsscm32/vsscomdemo.dcu differ diff --git a/lib/vsscm32/vsscomdemo.dfm b/lib/vsscm32/vsscomdemo.dfm new file mode 100644 index 00000000..c964844f Binary files /dev/null and b/lib/vsscm32/vsscomdemo.dfm differ diff --git a/lib/vsscm32/vsscomdemo.pas b/lib/vsscm32/vsscomdemo.pas new file mode 100644 index 00000000..7cbab261 --- /dev/null +++ b/lib/vsscm32/vsscomdemo.pas @@ -0,0 +1,66 @@ +unit vsscomdemo; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, VSSComm32, ComCtrls; + +type + TForm1 = class(TForm) + Button1: TButton; + Button2: TButton; + Button3: TButton; + Memo1: TMemo; + VSSComm321: TVSSComm32; + StatusBar1: TStatusBar; + procedure Button1Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure VSSComm321ReceiveData(Buffer: Pointer; BufferLength: Word); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +procedure TForm1.Button1Click(Sender: TObject); +begin +VSSComm321.startcomm; +StatusBar1.Panels.Items[0].Text :='Comm Open'; +end; + +procedure TForm1.Button3Click(Sender: TObject); +begin +VSSComm321.stopcomm; +StatusBar1.Panels.Items[0].Text :='Comm Closed'; +StatusBar1.Panels.Items[1].Text :=''; +memo1.lines.clear; +end; + +procedure TForm1.Button2Click(Sender: TObject); +var + sendstring: String; +begin +sendstring:='This is a test to see if the data is returned from the Comm Port'; + +VSSComm321.writecommdata(pchar(sendstring),length(sendstring)); +StatusBar1.Panels.Items[1].Text :='Sending Data'; +end; + +procedure TForm1.VSSComm321ReceiveData(Buffer: Pointer; + BufferLength: Word); +begin +StatusBar1.Panels.Items[1].Text :='Receiving Data'; +memo1.lines.add(strpas(buffer)); +StatusBar1.Panels.Items[1].Text :='Received Data'; +end; + +end. diff --git a/lib/vsscm32/vsscomm32.res b/lib/vsscm32/vsscomm32.res new file mode 100644 index 00000000..04ca1934 Binary files /dev/null and b/lib/vsscm32/vsscomm32.res differ diff --git a/lib/wsagraph/EXAMPLE.TXT b/lib/wsagraph/EXAMPLE.TXT new file mode 100644 index 00000000..e1627654 --- /dev/null +++ b/lib/wsagraph/EXAMPLE.TXT @@ -0,0 +1,42 @@ +Procedures: +----------- +ClearGraph; - Clears all the data in the graph; + +eg. ClearGraph; +<-------------------------------------------------------------> +AddData(Xposition, Value, XLabel); - adds the 'Value' + at position 'XPosition', + labeling it 'XLabel' +eg. AddData(1,23,'Jan'); + +<-------------------------------------------------------------> +PlotGraph; - Plots & displays the graph. + +eg. PlotGraph; +<-------------------------------------------------------------> +Installation procedures: +------------------------ + +0. To install: + Goto "component|install, Add, Browse, 'wsagraph.pas', open" +1. Slap a button on the blank form when starting Delphi 2.0. +2. Slap a TwsaGraph component onto the form + (located in samples after installation). +3. Paste the following code in the onClick event of your button. +4. run the program, click on the button over and over to test. + +procedure TForm1.Button1Click(Sender: TObject); +var i : Integer; +begin + wsaGraph1.ClearGraph; + wsaGraph1.Width := 350; + wsaGraph1.Height := 250; + wsaGraph1.Top := 0; + wsaGraph1.Left := 0; + For i := 1 To 5 Do + wsaGraph1.AddData(i,Random(200),IntToStr(i)+'.'); + wsaGraph1.Backgroundcolor := clYellow; + wsaGraph1.PlotGraph; +end; + + diff --git a/lib/wsagraph/Wsagraph.dcu b/lib/wsagraph/Wsagraph.dcu new file mode 100644 index 00000000..c5aa7717 Binary files /dev/null and b/lib/wsagraph/Wsagraph.dcu differ diff --git a/lib/wsagraph/Wsagraph.pas b/lib/wsagraph/Wsagraph.pas new file mode 100644 index 00000000..42779d5a --- /dev/null +++ b/lib/wsagraph/Wsagraph.pas @@ -0,0 +1,387 @@ +(****************************************************) +(* By : P. Gertzen *) +(* --------------- *) +(* If you'd like any modifications to this *) +(* simple little component or any help with MS ISS *) +(* Backend Dll's or Internet Client/Server Apps then*) +(* contact me at pgertzen@websa.com. *) +(* *) +(* Check out our Delphi coded Internet server *) +(* technology at: *) +(* LiveAudit.com, FindProduct.com, Livesite.co.za *) +(* *) +(* Check this component at work at LiveAudit.com *) +(****************************************************) + +unit wsaGraph; + +interface + +Uses Classes,ExtCtrls, StdCtrls,SysUtils, Graphics; + +Type + TDataObject = Class(TObject) + Private + FValue : Real; + FLabel : String; + Public + Constructor Create(Value : Real; PosLabel : String); + End; + + TGauge = Class(TImage) + Private + FPercentage : Real; + FGaugeColor : Integer; + FBarColor : Integer; + Public + Procedure SetGauge(Percentage : Real); + Published + Property BarColor : Integer Read FBarColor Write FBarColor; + Property GaugeColor : Integer Read FGaugecolor Write FGaugeColor; + End; + + TwsaGraph = Class(TImage) + Private + FHeader : String; + FHeaderFontName : String; + FYAxisFontName : String; + FXAxisFontName : String; + FFooter : String; + FYHeader: String; + FXHeader: String; + FShowHorizLines : Boolean; + FShowVertLines : Boolean; + FDataList : TStringList; + FDataObject : TDataObject; + FHeaderFontSize : Integer; + FXFontSize : Integer; + FXFontColor : Integer; + FYFontSize : Integer; + FYFontColor : Integer; + FHeaderFontColor : Integer; + FLeftMargin, + FRightMargin, + FTopMargin, + FBottomMargin : Integer; + FFooterFontName : String; + FFooterFontSize : Integer; + FFooterFontColor : Integer; + FLeftFontName : String; + FLeftFontSize : Integer; + FLeftFontColor : Integer; + FLeftLabel : String; + FIncValue : Real; + FXFontName : String; + FTicks : Integer; + FMaxValue : Real; + FGraphColor : Integer; + FBackgroundColor : Integer; + Procedure CalcPeriods; + Public + Constructor Create(AOwner : TComponent); override; + Destructor Destroy; override; + Procedure AddData(X : Integer;Value : Real; PosLabel : String); + Procedure PlotGraph; + Procedure ClearGraph; + Published + Property BackgroundColor : Integer Read FBackgroundColor Write FBackgroundColor; + Property HeaderFontName : String Read FHeaderFontName Write FHeaderFontName; + Property HeaderFontSize : Integer Read FHeaderFontSize Write FHeaderFontSize; + Property HeaderFontColor : Integer Read FHeaderFontColor Write FHeaderFontColor; + Property FooterFontName : String Read FFooterFontName Write FFooterFontName; + Property FooterFontSize : Integer Read FFooterFontSize Write FFooterFontSize; + Property FooterFontColor : Integer Read FFooterFontColor Write FFooterFontColor; + Property LeftFontName : String Read FLeftFontName Write FLeftFontName; + Property LeftFontSize : Integer Read FLeftFontSize Write FLeftFontSize; + Property LeftFontColor : Integer Read FLeftFontColor Write FLeftFontColor; + Property XFontName : String Read FXFontName write FXFontName; + Property XFontSize : Integer Read FXFontSize Write FXFontSize; + Property YFontSize : Integer Read FYFontSize Write FYFontSize; + Property XFontColor : Integer Read FXFontColor Write FXFontColor; + Property YFontColor : Integer Read FYFontColor Write FYFontColor; + Property YAxisFontName : String Read FYAxisFontName Write FYAxisFontName; + Property XAxisFontName : String Read FXAxisFontName Write FXAxisFontName; + Property Header : String Read FHeader Write FHeader; + Property LeftLabel : String Read FLeftLabel Write FLeftLabel; + Property Footer : String Read FFooter Write FFooter; + Property YHeader: String Read FYHeader Write FYHeader; + Property XHeader: String Read FXHeader Write FXHeader; + Property ShowHorizLines : Boolean Read FShowHorizLines Write FShowHorizLines; + Property ShowVertLines : Boolean Read FShowVertLines Write FShowVertLines; + Property GraphColor : Integer Read FGraphcolor Write FGraphColor; + End; + +Procedure Register; + +implementation + +Uses Math; + +Procedure TGauge.SetGauge(Percentage : Real); +Var XPos,YPos : Integer; +Begin + Canvas.Brush.Color := GaugeColor; + + //Canvas.Rectangle(0,0,Width,Height); + Canvas.FillRect(Rect(0,0,Width,Height)); + + Canvas.Brush.Color := BarColor; + Canvas.Rectangle(0,0,Round((Percentage/100)*Width),Height); + Canvas.Brush.Color := clBlack; + Canvas.Font.Color := clWhite; + Canvas.Font.Size := Height Div 2; + XPos := (Width Div 2) - + (Canvas.TextWidth(FloatToStr(Percentage)+ '%') Div 2); + YPos := (Height Div 2) - + (Canvas.TextHeight(FloatToStr(Percentage)+ '%') Div 2); + Canvas.TextOut(XPos,YPos,FloatToStr(Percentage)+ '%'); +End; + +Constructor TDataObject.Create(Value : Real; PosLabel : String); +Begin + FValue := Value; + FLabel := PosLabel; +End; + +Procedure TwsaGraph.AddData(X : Integer; Value : Real; PosLabel : String); +Var Idx : Integer; +Begin + Idx := FDataList.IndexOf(FloatToStr(X)); + If Idx <> - 1 Then + Begin + TDataObject(FDataList.Objects[Idx]).FValue := Value; + TDataObject(FDataList.Objects[Idx]).FLabel := PosLabel; + End + Else + FDataList.AddObject(FloatToStr(X),TDataObject.Create(Value,PosLabel)); + If Value > FMaxValue Then + FMaxValue := Value; +End; + +Procedure TwsaGraph.CalcPeriods; +Var PowerVal : Integer; +Begin + If FMaxValue > 0 Then + PowerVal := Round(Power(10,Floor(Log10(FMaxValue))-1)) + Else + PowerVal := 0; + If (PowerVal = 0) Then + Begin + FIncValue := 1; + FTicks := 10; + End + Else + If (FMaxValue <= 15 * PowerVal) Then + Begin + FIncValue := 1 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 15; + End + Else + If (FMaxValue <= 20 * PowerVal) Then + Begin + FIncValue := 2 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 10; + End + Else + If (FMaxValue <= 30 * PowerVal) Then + Begin + FIncValue := 3 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 10; + End + Else + If (FMaxValue <= 40 * PowerVal) Then + Begin + FIncValue := 5 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 8; + End + Else + If (FMaxValue <= 50 * PowerVal) Then + Begin + FIncValue := 5 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 10; + End + Else + If (FMaxValue <= 60 * PowerVal) Then + Begin + FIncValue := 5 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 12; + End + Else + If (FMaxValue <= 75 * PowerVal) Then + Begin + FIncValue := 5 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 15; + End + Else + If (FMaxValue <= 80 * PowerVal) Then + Begin + FIncValue := 5 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 16; + End + Else + If (FMaxValue <= 100 * PowerVal) Then + Begin + FIncValue := 10 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 10; + End; + +End; + +Constructor TwsaGraph.Create(AOwner : TComponent); +Begin + Inherited Create(AOwner); + HeaderFontName := 'MS Sans Serif'; + YAxisFontName := 'MS Sans Serif'; + XAxisFontName := 'MS Sans Serif'; + LeftFontName := 'MS Sans Serif'; + HeaderFontSize := 15; + FooterFontSize := 15; + LeftLabel := ''; + Header := ''; + Footer := ''; + YHeader := ''; + XHeader := ''; + FLeftMargin := 10; + FRightMargin := 10; + FTopMargin := 10; + FBottomMargin := 20; + FMaxValue := 0; + ShowVertLines := False; + FDataList := TStringList.Create; + BackgroundColor := clWhite; + Width := 150; + Height := 100; + FooterFontColor := clBlue; + HeaderFontColor := clBlue; + ShowHorizLines := True; + XFontSize := 7; + GraphColor := clGreen; +End; + +Destructor TwsaGraph.Destroy; +Var i : Integer; +Begin + Inherited Destroy; + For i := 0 To FDataList.Count - 1 Do + TDataObject(FDataList.Objects[i]).Destroy; + FDataList.Destroy; +End; + +Procedure TwsaGraph.ClearGraph; +Var i : Integer; +Begin + For i := 0 To FDataList.Count - 1 Do + TDataObject(FDataList.Objects[i]).Destroy; + FDataList.Clear; + FLeftMargin := 10; + FRightMargin := 10; + FTopMargin := 10; + FBottomMargin := 20; + FMaxValue := 0; +End; + +Procedure TwsaGraph.PlotGraph; +Var BarWidth, + BarHeight : Integer; + i : Integer; + TickWidth : Real; + CurrPos : Integer; + GraphBottomPos, GraphLeftPos : Integer; + DataValue : Real; + DataLabel : String; + GraphHeight : Integer; + GraphWidth : Integer; + HighGraphVal : Integer; +Begin + Canvas.Brush.Color := BackgroundColor; + //Canvas.Rectangle(0,0,Width,Height); + Canvas.FillRect(Rect(0,0,Width,Height)); + //Header + Canvas.Font.Name := HeaderfontName; + Canvas.Font.Size := HeaderFontSize; + Canvas.Font.Color := HeaderFontColor; + If Header <> '' Then + FTopMargin := FTopMargin + Canvas.TextHeight(Header) + 10; + Canvas.TextOut((Width Div 2) - (Canvas.TextWidth(Header) div 2),10,Header); + //Footer + Canvas.Font.Name := FooterFontName; + Canvas.Font.Size := FooterFontSize; + Canvas.Font.Color := FooterFontColor; + If Footer <> '' Then + FBottomMargin := FBottomMargin + Canvas.TextHeight(Footer); + Canvas.TextOut((Width Div 2) - (Canvas.TextWidth(Footer) div 2),Height-Canvas.TextHeight(Footer),Footer); + //Left Label + Canvas.Font.Name := LeftFontName; + Canvas.Font.Size := LeftFontSize; + Canvas.Font.Color := LeftFontColor; + If LeftLabel <> '' Then + FLeftMargin := FLeftMargin + Canvas.TextWidth(LeftLabel) + FLeftMargin; + Canvas.TextOut(10,Height Div 2,LeftLabel); + CalcPeriods; + HighGraphVal := Round(FTicks * FIncValue); + TickWidth := (Height-FTopMargin - FBottomMargin) / FTicks; + Canvas.Font.Color := YFontColor; + Canvas.Font.Size := YFontSize; + Canvas.Font.Name := YAxisFontName; + FLeftMargin := FLeftMargin + Canvas.TextWidth(FloatToStr(FMaxValue)); + Canvas.Pen.Color := clBlack; + + // Canvas.Pen.Width := 1; + + Canvas.MoveTo(FLeftMargin,Height-FBottomMargin); + Canvas.LineTo(FLeftMargin,FTopMargin); + Canvas.MoveTo(FLeftMargin,Height-FBottomMargin); + Canvas.LineTo(Width-FRightMargin,Height-FBottomMargin); + GraphBottomPos := Height-FBottomMargin; + GraphLeftPos := FLeftMargin; + CurrPos:= GraphBottomPos; + BarWidth := (Width-FRightMargin-FLeftMargin) Div FDataList.Count; + For i := 1 To FTicks Do + Begin + Currpos := Round(GraphBottomPos - (TickWidth * i)); + Canvas.Font.Color := YFontColor; + Canvas.Font.Size := YFontSize; + Canvas.TextOut(GraphLeftPos - Canvas.TextWidth(IntToStr(i*Round(FIncValue))) - 2, + CurrPos-(Canvas.TextHeight(IntToStr(i*Round(FIncValue))) Div 2), + IntToStr(i*Round(FIncValue))); + Canvas.MoveTo(FLeftMargin-2,CurrPos); + Canvas.LineTo(FLeftMargin+2,CurrPos); + If ShowHorizLines Then + Begin + Canvas.Pen.Style := psDot; + Canvas.Pen.Color := clGray; + Canvas.LineTo(Width-FRightMargin,CurrPos); + Canvas.Pen.Color := clBlack; + Canvas.Pen.Style := psSolid; + End; + End; + Canvas.TextOut(GraphLeftPos-Canvas.TextWidth('0')-2, + GraphBottomPos-(Canvas.TextHeight('0') DIV 2),'0'); + CurrPos := GraphLeftPos; + GraphHeight := Height-FBottomMargin-FTopMargin; + GraphWidth := Width - FRightMargin - FLeftMargin; + For i := 0 To FDataList.Count - 1 Do + Begin + DataValue := TDataObject(FDataList.Objects[i]).FValue; + DataLabel := TDataObject(FDataList.Objects[i]).FLabel; + BarHeight := Floor((DataValue / HighGraphVal) * GraphHeight); + Canvas.Brush.Color := GraphColor; +{ Canvas.Rectangle(CurrPos,GraphBottomPos - BarHeight, + CurrPos + BarWidth,GraphBottomPos);} + Canvas.FillRect(Rect(CurrPos+1,GraphBottomPos - BarHeight+1, + CurrPos + BarWidth -1,GraphBottomPos)); + Canvas.Brush.Color := BackGroundColor; + Canvas.Font.Color := XFontColor; + Canvas.Font.Name := XFontName; + Canvas.Font.Size := XFontSize; + Canvas.TextOut((BarWidth Div 2)-(Canvas.TextWidth(DataLabel) Div 2)+CurrPos, + GraphBottomPos + 1,DataLabel); + CurrPos := CurrPos + BarWidth; + End; +End; + +procedure Register; +begin + RegisterComponents('Samples', [TwsaGraph]); +end; +end. diff --git a/lib/wsagraph/Wsagraph.~pa b/lib/wsagraph/Wsagraph.~pa new file mode 100644 index 00000000..42779d5a --- /dev/null +++ b/lib/wsagraph/Wsagraph.~pa @@ -0,0 +1,387 @@ +(****************************************************) +(* By : P. Gertzen *) +(* --------------- *) +(* If you'd like any modifications to this *) +(* simple little component or any help with MS ISS *) +(* Backend Dll's or Internet Client/Server Apps then*) +(* contact me at pgertzen@websa.com. *) +(* *) +(* Check out our Delphi coded Internet server *) +(* technology at: *) +(* LiveAudit.com, FindProduct.com, Livesite.co.za *) +(* *) +(* Check this component at work at LiveAudit.com *) +(****************************************************) + +unit wsaGraph; + +interface + +Uses Classes,ExtCtrls, StdCtrls,SysUtils, Graphics; + +Type + TDataObject = Class(TObject) + Private + FValue : Real; + FLabel : String; + Public + Constructor Create(Value : Real; PosLabel : String); + End; + + TGauge = Class(TImage) + Private + FPercentage : Real; + FGaugeColor : Integer; + FBarColor : Integer; + Public + Procedure SetGauge(Percentage : Real); + Published + Property BarColor : Integer Read FBarColor Write FBarColor; + Property GaugeColor : Integer Read FGaugecolor Write FGaugeColor; + End; + + TwsaGraph = Class(TImage) + Private + FHeader : String; + FHeaderFontName : String; + FYAxisFontName : String; + FXAxisFontName : String; + FFooter : String; + FYHeader: String; + FXHeader: String; + FShowHorizLines : Boolean; + FShowVertLines : Boolean; + FDataList : TStringList; + FDataObject : TDataObject; + FHeaderFontSize : Integer; + FXFontSize : Integer; + FXFontColor : Integer; + FYFontSize : Integer; + FYFontColor : Integer; + FHeaderFontColor : Integer; + FLeftMargin, + FRightMargin, + FTopMargin, + FBottomMargin : Integer; + FFooterFontName : String; + FFooterFontSize : Integer; + FFooterFontColor : Integer; + FLeftFontName : String; + FLeftFontSize : Integer; + FLeftFontColor : Integer; + FLeftLabel : String; + FIncValue : Real; + FXFontName : String; + FTicks : Integer; + FMaxValue : Real; + FGraphColor : Integer; + FBackgroundColor : Integer; + Procedure CalcPeriods; + Public + Constructor Create(AOwner : TComponent); override; + Destructor Destroy; override; + Procedure AddData(X : Integer;Value : Real; PosLabel : String); + Procedure PlotGraph; + Procedure ClearGraph; + Published + Property BackgroundColor : Integer Read FBackgroundColor Write FBackgroundColor; + Property HeaderFontName : String Read FHeaderFontName Write FHeaderFontName; + Property HeaderFontSize : Integer Read FHeaderFontSize Write FHeaderFontSize; + Property HeaderFontColor : Integer Read FHeaderFontColor Write FHeaderFontColor; + Property FooterFontName : String Read FFooterFontName Write FFooterFontName; + Property FooterFontSize : Integer Read FFooterFontSize Write FFooterFontSize; + Property FooterFontColor : Integer Read FFooterFontColor Write FFooterFontColor; + Property LeftFontName : String Read FLeftFontName Write FLeftFontName; + Property LeftFontSize : Integer Read FLeftFontSize Write FLeftFontSize; + Property LeftFontColor : Integer Read FLeftFontColor Write FLeftFontColor; + Property XFontName : String Read FXFontName write FXFontName; + Property XFontSize : Integer Read FXFontSize Write FXFontSize; + Property YFontSize : Integer Read FYFontSize Write FYFontSize; + Property XFontColor : Integer Read FXFontColor Write FXFontColor; + Property YFontColor : Integer Read FYFontColor Write FYFontColor; + Property YAxisFontName : String Read FYAxisFontName Write FYAxisFontName; + Property XAxisFontName : String Read FXAxisFontName Write FXAxisFontName; + Property Header : String Read FHeader Write FHeader; + Property LeftLabel : String Read FLeftLabel Write FLeftLabel; + Property Footer : String Read FFooter Write FFooter; + Property YHeader: String Read FYHeader Write FYHeader; + Property XHeader: String Read FXHeader Write FXHeader; + Property ShowHorizLines : Boolean Read FShowHorizLines Write FShowHorizLines; + Property ShowVertLines : Boolean Read FShowVertLines Write FShowVertLines; + Property GraphColor : Integer Read FGraphcolor Write FGraphColor; + End; + +Procedure Register; + +implementation + +Uses Math; + +Procedure TGauge.SetGauge(Percentage : Real); +Var XPos,YPos : Integer; +Begin + Canvas.Brush.Color := GaugeColor; + + //Canvas.Rectangle(0,0,Width,Height); + Canvas.FillRect(Rect(0,0,Width,Height)); + + Canvas.Brush.Color := BarColor; + Canvas.Rectangle(0,0,Round((Percentage/100)*Width),Height); + Canvas.Brush.Color := clBlack; + Canvas.Font.Color := clWhite; + Canvas.Font.Size := Height Div 2; + XPos := (Width Div 2) - + (Canvas.TextWidth(FloatToStr(Percentage)+ '%') Div 2); + YPos := (Height Div 2) - + (Canvas.TextHeight(FloatToStr(Percentage)+ '%') Div 2); + Canvas.TextOut(XPos,YPos,FloatToStr(Percentage)+ '%'); +End; + +Constructor TDataObject.Create(Value : Real; PosLabel : String); +Begin + FValue := Value; + FLabel := PosLabel; +End; + +Procedure TwsaGraph.AddData(X : Integer; Value : Real; PosLabel : String); +Var Idx : Integer; +Begin + Idx := FDataList.IndexOf(FloatToStr(X)); + If Idx <> - 1 Then + Begin + TDataObject(FDataList.Objects[Idx]).FValue := Value; + TDataObject(FDataList.Objects[Idx]).FLabel := PosLabel; + End + Else + FDataList.AddObject(FloatToStr(X),TDataObject.Create(Value,PosLabel)); + If Value > FMaxValue Then + FMaxValue := Value; +End; + +Procedure TwsaGraph.CalcPeriods; +Var PowerVal : Integer; +Begin + If FMaxValue > 0 Then + PowerVal := Round(Power(10,Floor(Log10(FMaxValue))-1)) + Else + PowerVal := 0; + If (PowerVal = 0) Then + Begin + FIncValue := 1; + FTicks := 10; + End + Else + If (FMaxValue <= 15 * PowerVal) Then + Begin + FIncValue := 1 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 15; + End + Else + If (FMaxValue <= 20 * PowerVal) Then + Begin + FIncValue := 2 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 10; + End + Else + If (FMaxValue <= 30 * PowerVal) Then + Begin + FIncValue := 3 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 10; + End + Else + If (FMaxValue <= 40 * PowerVal) Then + Begin + FIncValue := 5 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 8; + End + Else + If (FMaxValue <= 50 * PowerVal) Then + Begin + FIncValue := 5 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 10; + End + Else + If (FMaxValue <= 60 * PowerVal) Then + Begin + FIncValue := 5 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 12; + End + Else + If (FMaxValue <= 75 * PowerVal) Then + Begin + FIncValue := 5 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 15; + End + Else + If (FMaxValue <= 80 * PowerVal) Then + Begin + FIncValue := 5 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 16; + End + Else + If (FMaxValue <= 100 * PowerVal) Then + Begin + FIncValue := 10 * Power(10,Floor(Log10(FMaxValue))-1); + FTicks := 10; + End; + +End; + +Constructor TwsaGraph.Create(AOwner : TComponent); +Begin + Inherited Create(AOwner); + HeaderFontName := 'MS Sans Serif'; + YAxisFontName := 'MS Sans Serif'; + XAxisFontName := 'MS Sans Serif'; + LeftFontName := 'MS Sans Serif'; + HeaderFontSize := 15; + FooterFontSize := 15; + LeftLabel := ''; + Header := ''; + Footer := ''; + YHeader := ''; + XHeader := ''; + FLeftMargin := 10; + FRightMargin := 10; + FTopMargin := 10; + FBottomMargin := 20; + FMaxValue := 0; + ShowVertLines := False; + FDataList := TStringList.Create; + BackgroundColor := clWhite; + Width := 150; + Height := 100; + FooterFontColor := clBlue; + HeaderFontColor := clBlue; + ShowHorizLines := True; + XFontSize := 7; + GraphColor := clGreen; +End; + +Destructor TwsaGraph.Destroy; +Var i : Integer; +Begin + Inherited Destroy; + For i := 0 To FDataList.Count - 1 Do + TDataObject(FDataList.Objects[i]).Destroy; + FDataList.Destroy; +End; + +Procedure TwsaGraph.ClearGraph; +Var i : Integer; +Begin + For i := 0 To FDataList.Count - 1 Do + TDataObject(FDataList.Objects[i]).Destroy; + FDataList.Clear; + FLeftMargin := 10; + FRightMargin := 10; + FTopMargin := 10; + FBottomMargin := 20; + FMaxValue := 0; +End; + +Procedure TwsaGraph.PlotGraph; +Var BarWidth, + BarHeight : Integer; + i : Integer; + TickWidth : Real; + CurrPos : Integer; + GraphBottomPos, GraphLeftPos : Integer; + DataValue : Real; + DataLabel : String; + GraphHeight : Integer; + GraphWidth : Integer; + HighGraphVal : Integer; +Begin + Canvas.Brush.Color := BackgroundColor; + //Canvas.Rectangle(0,0,Width,Height); + Canvas.FillRect(Rect(0,0,Width,Height)); + //Header + Canvas.Font.Name := HeaderfontName; + Canvas.Font.Size := HeaderFontSize; + Canvas.Font.Color := HeaderFontColor; + If Header <> '' Then + FTopMargin := FTopMargin + Canvas.TextHeight(Header) + 10; + Canvas.TextOut((Width Div 2) - (Canvas.TextWidth(Header) div 2),10,Header); + //Footer + Canvas.Font.Name := FooterFontName; + Canvas.Font.Size := FooterFontSize; + Canvas.Font.Color := FooterFontColor; + If Footer <> '' Then + FBottomMargin := FBottomMargin + Canvas.TextHeight(Footer); + Canvas.TextOut((Width Div 2) - (Canvas.TextWidth(Footer) div 2),Height-Canvas.TextHeight(Footer),Footer); + //Left Label + Canvas.Font.Name := LeftFontName; + Canvas.Font.Size := LeftFontSize; + Canvas.Font.Color := LeftFontColor; + If LeftLabel <> '' Then + FLeftMargin := FLeftMargin + Canvas.TextWidth(LeftLabel) + FLeftMargin; + Canvas.TextOut(10,Height Div 2,LeftLabel); + CalcPeriods; + HighGraphVal := Round(FTicks * FIncValue); + TickWidth := (Height-FTopMargin - FBottomMargin) / FTicks; + Canvas.Font.Color := YFontColor; + Canvas.Font.Size := YFontSize; + Canvas.Font.Name := YAxisFontName; + FLeftMargin := FLeftMargin + Canvas.TextWidth(FloatToStr(FMaxValue)); + Canvas.Pen.Color := clBlack; + + // Canvas.Pen.Width := 1; + + Canvas.MoveTo(FLeftMargin,Height-FBottomMargin); + Canvas.LineTo(FLeftMargin,FTopMargin); + Canvas.MoveTo(FLeftMargin,Height-FBottomMargin); + Canvas.LineTo(Width-FRightMargin,Height-FBottomMargin); + GraphBottomPos := Height-FBottomMargin; + GraphLeftPos := FLeftMargin; + CurrPos:= GraphBottomPos; + BarWidth := (Width-FRightMargin-FLeftMargin) Div FDataList.Count; + For i := 1 To FTicks Do + Begin + Currpos := Round(GraphBottomPos - (TickWidth * i)); + Canvas.Font.Color := YFontColor; + Canvas.Font.Size := YFontSize; + Canvas.TextOut(GraphLeftPos - Canvas.TextWidth(IntToStr(i*Round(FIncValue))) - 2, + CurrPos-(Canvas.TextHeight(IntToStr(i*Round(FIncValue))) Div 2), + IntToStr(i*Round(FIncValue))); + Canvas.MoveTo(FLeftMargin-2,CurrPos); + Canvas.LineTo(FLeftMargin+2,CurrPos); + If ShowHorizLines Then + Begin + Canvas.Pen.Style := psDot; + Canvas.Pen.Color := clGray; + Canvas.LineTo(Width-FRightMargin,CurrPos); + Canvas.Pen.Color := clBlack; + Canvas.Pen.Style := psSolid; + End; + End; + Canvas.TextOut(GraphLeftPos-Canvas.TextWidth('0')-2, + GraphBottomPos-(Canvas.TextHeight('0') DIV 2),'0'); + CurrPos := GraphLeftPos; + GraphHeight := Height-FBottomMargin-FTopMargin; + GraphWidth := Width - FRightMargin - FLeftMargin; + For i := 0 To FDataList.Count - 1 Do + Begin + DataValue := TDataObject(FDataList.Objects[i]).FValue; + DataLabel := TDataObject(FDataList.Objects[i]).FLabel; + BarHeight := Floor((DataValue / HighGraphVal) * GraphHeight); + Canvas.Brush.Color := GraphColor; +{ Canvas.Rectangle(CurrPos,GraphBottomPos - BarHeight, + CurrPos + BarWidth,GraphBottomPos);} + Canvas.FillRect(Rect(CurrPos+1,GraphBottomPos - BarHeight+1, + CurrPos + BarWidth -1,GraphBottomPos)); + Canvas.Brush.Color := BackGroundColor; + Canvas.Font.Color := XFontColor; + Canvas.Font.Name := XFontName; + Canvas.Font.Size := XFontSize; + Canvas.TextOut((BarWidth Div 2)-(Canvas.TextWidth(DataLabel) Div 2)+CurrPos, + GraphBottomPos + 1,DataLabel); + CurrPos := CurrPos + BarWidth; + End; +End; + +procedure Register; +begin + RegisterComponents('Samples', [TwsaGraph]); +end; +end. diff --git a/lib/z_timer/Z_TIMER.TXT b/lib/z_timer/Z_TIMER.TXT new file mode 100644 index 00000000..7b991ab6 --- /dev/null +++ b/lib/z_timer/Z_TIMER.TXT @@ -0,0 +1,70 @@ +TZtimer : high performance timer component , August 8(1997), vs 1.00 +-------------------------------------------------------------------- +Similar to the vcl Ttimer component, but with a resolution of 0.1ms and accurate to +0.015ms. + + +Installation +Put the files Z_timer.pas and Z_timer.dcr in your library path, and install the +component as usual. The component TZtimer will appear on your systempage of the vcl +palette. + +Operation +The TZtimer component has the same properties as the vcl Ttimer, but : +property Interval : is now an extended type , so you can insert decimal values for + the milliseconds, values will be rounded to 0.1 (ms) + +,and there are 2 additional properties : +public property Count:integer (readonly) ; number of timer events triggered +published property TimeOutSeconds:integer ; timeout period in seconds after which + the timer will be shut down. + +The latter property is convenient because this timer will lock up the applications +while running. Normally you will disable the timer in the ontimerevent after you +are done. Specification of a timeout period can serve as a safetymeasure. +This timer is intended for time critical applications, and will only perform well if +the task it is triggering (the ontimerevent) is completed quickly. The ontimerevent +should return in less than about 30 microseconds, otherwise the timing will get out +of sync. On most current pc's , you can do a lot in that period : read a port/ store + data/ do some simple calculations/ plot a line etc. However, you should NOT try to do +too many visual operations. It depends on your hardware of course. +If you still want to react on buttonclicks and such while the timer is running, you +should put application.processmessages in your ontimerevent. However the speed and +accuracy of the timing will deteriorate. + + +Technical background +The windows multitasking system is not very well suited for accurate timing. The +windows timer let you only specify milliseconds as resolution, while its accuracy +is much worse than that. Alternative approaches with the sleep or gettickcount +functions suffer from the same problem. +In order to do better, the multitasking must be restricted. This timer will take +control of the pc, and will dedicate it to sending out ontimerevents until +it is disabled. +Note that multithreading is out of the question : an extra thread will also consume +time, combining that with the extra time needed for taskswitching, the timer will be +thrown out of sync. One thread must do all ! +Keep in mind that the only way to stop a running Ztimer is to put its enabled +property to false in the onttimerevenhandler, or wait until the timeoutperiod +expires. +The timing originates from the standard PPP chip that changes an output bit every 15 +microseconds. Resolution could be improved considerably when the RDTSC (pentium) +instruction is utilized, however I had to get this timer working on a 486 also. +It was tested on D2 and D3 for W95, it should also work on D1 and W3.1. However it +will not work in Windows NT (?). + +Some observed timing measurements of Tztimer, compared with the (vcl) Ttimer : +{ evaluation of 60 runs on W95, P133, D3} + +interval (vcl) Ttimer Tztimer +100 ms 108 +/- 4 ms 99.3 +/- 0.14 ms + 10 ms 59 +/- 5 ms 10.1 +/- 0.07 ms + 1 ms 59 +/- 6 ms (!) 1.00 +/- 0.02 ms + 0.1ms Not available 0.098+/- 0.015 ms + + +Copyright +This is completely free, adapt it to your needs, etc. + +Any remarks or suggestions : +d950021@icpc00.icpc.fukui-u.ac.jp (Antonie Baars) \ No newline at end of file diff --git a/lib/z_timer/Z_timer.dcr b/lib/z_timer/Z_timer.dcr new file mode 100644 index 00000000..a68a8e5f Binary files /dev/null and b/lib/z_timer/Z_timer.dcr differ diff --git a/lib/z_timer/Z_timer.dcu b/lib/z_timer/Z_timer.dcu new file mode 100644 index 00000000..247b4b87 Binary files /dev/null and b/lib/z_timer/Z_timer.dcu differ diff --git a/lib/z_timer/Z_timer.pas b/lib/z_timer/Z_timer.pas new file mode 100644 index 00000000..a3a34202 --- /dev/null +++ b/lib/z_timer/Z_timer.pas @@ -0,0 +1,155 @@ +// ZTimer component, by Antonie Baars +// email d950021@icpc00.icpc.fukui-u.ac.jp + +unit Z_timer; + +interface +uses classes,windows,messages,forms; + +TYPE + +TZTimer = class(Tcomponent) + private + FOnTimer: TNotifyEvent; + FEnabled: Boolean; + fcount,FInterval,ftimeout,ReqToStop:integer; + FWindowHandle: HWND; + procedure UpdateTimer; + procedure SetEnabled(Value: Boolean); + procedure SetInterval(Value: extended); + function getinterval:extended; + procedure SetOnTimer(Value: TNotifyEvent); + procedure Timerloop; + procedure WndProc(var Msg: TMessage); + protected + procedure Timer;virtual; + public + property count :integer read fcount; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + property Enabled: Boolean read FEnabled write SetEnabled default True; + property Interval: extended read getInterval write SetInterval; + property OnTimer: TNotifyEvent read FOnTimer write SetOnTimer; + property TimeoutSeconds:integer read ftimeout write ftimeout; + end; + +procedure Register; + +implementation + +const WM_PACER:integer=WM_USER+202; + +procedure Register; +begin + RegisterComponents('Samples', [TZTimer]); +end; + +constructor TZTimer.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FEnabled := false; + FInterval := 1000; + ftimeout:=10; + FWindowHandle := AllocateHWnd(WndProc); +end; + +destructor TZTimer.Destroy; +begin + FEnabled := False; + updatetimer; + DeallocateHWnd(FWindowHandle); + inherited Destroy; +end; +procedure TZTimer.WndProc(var Msg: TMessage); +begin + with Msg do + if Msg = WM_PACER then + try + Timerloop; + except + Application.HandleException(Self); + end + else + Result := DefWindowProc(FWindowHandle, Msg, wParam, lParam); +end; + +procedure TZTimer.UpdateTimer; +begin +reqtostop:=1; // break out current loop +if (FInterval <> 0) and FEnabled and Assigned(FOnTimer) + and not (csdesigning in componentstate) then + postmessage(fwindowhandle,WM_PACER,0,0); // start new run after cleanup +end; + + +procedure TZTimer.SetEnabled(Value: Boolean); +begin + if Value <> FEnabled then + begin + FEnabled := Value; + UpdateTimer; + end; +end; + +procedure TZTimer.SetInterval(Value: extended); +begin + FInterval := round(Value*10); + if finterval<1 then finterval:=1; + UpdateTimer; +end; +function TZTimer.getInterval: extended; +begin +result:=FInterval/10; +end; +procedure TZTimer.SetOnTimer(Value: TNotifyEvent); +begin + FOnTimer := Value; + UpdateTimer; +end; + +procedure TZTimer.Timer; +begin + if Assigned(FOnTimer) then FOnTimer(Self); +end; +procedure TZTimer.Timerloop; +label again; +var sampletime,timeout,areqtostop:integer; +begin +sampletime:=round(finterval/0.1509); +timeout:=trunc(1e4*ftimeout/finterval); +reqtostop:=0; +fcount:=0; +{$IFDEF WIN32} +SetPriorityClass(GetCurrentProcess(),REALTIME_PRIORITY_CLASS); +{$ENDIF} +asm + in al,61h + and al,0010000b + mov ah,al +again: mov ecx,sampletime +@wait: in al,61h + and al,0010000b + cmp al,ah + je @wait // wait for levelchange + mov ah,al + dec ecx + jnz @wait + push ax + end; + inc(fcount); + timer ; // perform ontimer event + if fcount>timeout then reqtostop:=1; + areqtostop:=reqtostop; + asm + pop ax + cmp areqtostop,0 + jz again + end; +{$IFDEF WIN32} +SetPriorityClass(GetCurrentProcess(),NORMAL_PRIORITY_CLASS); +{$ENDIF} +end; + + +end. diff --git a/omnirig.zip b/omnirig.zip deleted file mode 100644 index d6e8981a..00000000 Binary files a/omnirig.zip and /dev/null differ diff --git a/src/ASTrayIcon.dcr b/src/ASTrayIcon.dcr new file mode 100644 index 00000000..8768f8d5 Binary files /dev/null and b/src/ASTrayIcon.dcr differ diff --git a/src/ASTrayIcon.pas b/src/ASTrayIcon.pas new file mode 100644 index 00000000..7d935b55 --- /dev/null +++ b/src/ASTrayIcon.pas @@ -0,0 +1,158 @@ +{ + ASTrayIcon Component 1.0 Copyright 1997 + Andrey Abakumov (aga@oficina.rnd.su) + + RXTrayIcon Component Copyright 1997 + Fedor Koshevnikov (kosh@masterbank.msk.ru) + Igor Pavluk (pavluk@masterbank.msk.ru) + Serge Korolev (korolev@masterbank.msk.ru) + +Thank for idea and text of a component + Eric Lawrence + Lead Programmer + Delta Programming Group + deltagrp@juno.com or deltagrp@keynetcorp.net +This is generally intended to be used with one of the TASKTRAY components. + +ASTrayIcon is inherited from RXTrayIcon, but add one +the very useful thing - is possible to remove display +of a task of taskbar + +Set the property HideForm for removals of a task with +taskbar +} +unit ASTrayIcon; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + RXShell; + +type + TDuplicateComponent = class(Exception); + { Define a Form not Owner object exception } + TFormNotOwner = class(Exception); + + TASTrayIcon = class(TRxTrayIcon) + private + FHideForm:Boolean; + + OldWndProc: TFarProc; + NewWndProc: Pointer; + + Procedure SetHideForm(Value:Boolean); + + Procedure HookParent; + Procedure UnhookParent; + Procedure HookWndProc(var Message: TMessage); + + protected + { Protected declarations } + public + constructor Create(AOwner: TComponent); override; + destructor Destroy;override; + Procedure Loaded; override; + Procedure ProcessEnabled; + + published + property HideForm: Boolean + read FHideForm + write SetHideForm + default True; + + end; + +procedure Register; + +implementation + +constructor TASTrayIcon.Create(AOwner: TComponent); +var + i: word; + CompCount: byte; +begin + inherited Create(AOwner); + FHideForm:=True; + NewWndProc := nil; + OldWndProc := nil; + CompCount := 0; { Initialise Component Count to zero } + { If we are designing at present } + If (csDesigning in ComponentState) Then + If (AOwner is TForm) + Then + With (AOwner as TForm) Do + begin + For i := 0 To ComponentCount - 1 Do { Check if there is already one of us! } + If Components[i] is TASTrayIcon Then inc(CompCount); + + If CompCount > 1 Then Raise TDuplicateComponent.Create ('There is already a TASTrayIcon component on this Form'); + end + Else + Raise TFormNotOwner.Create('The owner of TASTrayIcon Component is not a TForm'); +HookParent; +end; + +destructor TASTrayIcon.Destroy; +begin + UnhookParent; + inherited Destroy; +end; + +procedure TASTrayIcon.Loaded; +begin + inherited Loaded; { Always call inherited Loaded method } + If not (csDesigning in ComponentState) Then ProcessEnabled; +end; + +Procedure TASTrayIcon.SetHideForm(Value:Boolean); +begin + If Value <> FHideForm Then + begin + FHideForm := Value; + ProcessEnabled; + end; +end; + +Procedure TASTrayIcon.ProcessEnabled; +begin +If FHideform + Then ShowWindow(FindWindow(nil,@Application.Title[1]),sw_hide) + Else ShowWindow(FindWindow(nil,@Application.Title[1]),sw_restore); +end; + +procedure TASTrayIcon.HookParent; +begin +If owner=nil Then Exit; +OldWndProc := TFarProc(GetWindowLong((owner as tform).Handle, GWL_WNDPROC)); +NewWndProc := MakeObjectInstance(HookWndProc); +SetWindowLong((owner as tform).Handle, GWL_WNDPROC, LongInt(NewWndProc)); +end; + +procedure TASTrayIcon.UnhookParent; +begin +If (owner <> NIL) and assigned(OldWndProc) Then + SetWindowLong((owner as tform).Handle, GWL_WNDPROC, LongInt(OldWndProc)); +If assigned(NewWndProc) Then + FreeObjectInstance(NewWndProc); +NewWndProc := NIL; +OldWndProc := NIL; +end; + +procedure TASTrayIcon.HookWndProc(var Message: TMessage); +begin +If owner = NIL Then Exit; +If (message.msg=wm_showwindow) + Then + begin + If (message.wparam<>0) Then ProcessEnabled; + end; +message.Result := CallWindowProc(OldWndProc, (owner as tform).Handle, message.Msg, message.wParam, message.lParam); +end; + +procedure Register; +begin + RegisterComponents('Standard', [TASTrayIcon]); +end; + +end. diff --git a/src/Audio.dcr b/src/Audio.dcr new file mode 100644 index 00000000..cd1b26d1 Binary files /dev/null and b/src/Audio.dcr differ diff --git a/src/BGK32Lib.pas b/src/BGK32Lib.pas new file mode 100644 index 00000000..25fa6b87 --- /dev/null +++ b/src/BGK32Lib.pas @@ -0,0 +1,2214 @@ +unit BGK32Lib; {Delphi Interface Unit for BGK32.DLL} + +interface + +{$ifndef w95} +uses + HIDControllerClass, ToneGen; +{$endif} + +var BGKRefresh : boolean; // set to true after a char is sent + +const + BGKCALLMAX = 16; +{$ifndef w95} +const MAXREPORTSIZE = 2; + TOWRITE = 9; + REPORTSIZE = 2; + DEBUG_FLAG : integer = 0; + +type TZLHID = class + procedure DeviceChanges(Sender: TObject); + procedure DeviceUnplug(HidDev: TJvHidDevice); + function Enumeration(HidDev: TJvHidDevice; Index: Integer) : boolean; + end; + +var ZLHID : TZLHID; // dummy object for HIDContol class to hand over events + USBIF : TJvHIDDevice; + USB_Detected : boolean; + Tone : TToneGen; + //SelectedBuf : byte; {0..2} + + +const _usbportstatus : byte = $FF; + _usbportbuf : byte = $FF; + +{$endif} + +const IBMPC = 0; {machine code as defined in BGK32.DLL} + NEC98 = 255; + + _WIN2KMODE : boolean = false; + DEBUGMODE : boolean = False; + + // mask data for data port + _rigmask : byte = $00; // bit mask for sel rig + _pttmask : byte = $00; // bit mask for ptt + _bandmask : byte = $00; //bit mask for band data + _voicemask : byte = $00; // bit mask for voice memory + + _RIGREVERSE : Boolean = false; + _PTTREVERSE : Boolean = false; + UserFlag : Boolean = False; // can be set to true by user. set to false only when ClrBuffer is called or " is reached in the sending buffer. // 1.9z2 used in QTCForm + VoiceFlag : integer = 0; //temporary + +type TKeyingPort = (tkpParallel, tkpSerial1, tkpSerial2, tkpUSB); +const KeyingPort : TKeyingPort = tkpParallel; + +function GetPRTPort : string; +procedure UpdateDataPort; // sets data port acc to mask data +procedure SetRigFlag(i : integer); // 0 : no rigs, 1 : rig 1, etc +procedure SetVoiceFlag(i : integer); //0 or 1 +procedure ReverseLogicKeying(KeyReverse : boolean); // _cwon, _cwoff +procedure ReverseRigOut(Reverse : boolean); +procedure ReversePTTOut(Reverse : boolean); + +procedure SetPTT(_on : boolean); +function PTTIsOn : boolean; +procedure SetPTTDelay(before, after : word); +procedure ControlPTT(PTTON : boolean); {Sets PTT on/off} +function Paused : boolean; {Returns True if SendOK is False} +function GetLoopCount : integer; {Returns the current loop count} +procedure SetLoopMax(Max : integer); {Sets the maximum loop count} +function GetLoopMax : word; {Returns the maximum loop count} +procedure SetPitch(Hertz : integer); {Sets the pitch of the side tone} +function GetPitch : word; {Returns the current pitch in Hz} +procedure SetCWSendBufChar( C : char ); {Adds a char to the end of buffer} +procedure SetCWSendBufCharPTT( C : char ); {Adds a char to the end of buffer. Also controls PTT if enabled. Called from Keyboard} +Procedure SetCWSendBuf( b: byte; S :ShortString ); {Sets str to buffer but does not start sending} +procedure SendStr(sStr : ShortString); {Sends a string (Overwrites buffer)} +procedure SendStrLoop(S : ShortString); {Sends a string (repeat CQmax times)} +procedure SendStrFIFO(sStr : ShortString); {Sends a string (adds to buffer)} +procedure TimerProcess(uTimerID, uMessage: Word; + dwUser, dw1, dw2: Longint); stdcall; +//procedure TimerProcessEX; +procedure SetCWSpeed(_WPM : word); {Sets CW speed 1-60 wpm} +procedure SetLoopTime(Tsec : Real); {Sets the pause between repeats} +function GetLoopTime : real; {Returns the loop time in seconds} + +procedure InitializeBGK(msec : integer); {Initializes BGK. msec is interval} +function CloseBGK : word; {Closes BGK} +procedure PauseCW; {Pause} +procedure ResumeCW; {Resume} +procedure IncWPM; {Increases CW speed by 1WPM} +procedure DecWPM; {Decreases CW speed by 1WPM} +procedure SetWeight(W : word); {Sets the weight 0-100 %} +procedure SetSideTone(B : boolean); {Turn on/off side tone (TRUE=ON FALSE=OFF)} +function GetCWPort : ShortString; {Gets current port LPT?} +function GetMachine : word; {Returns machine code 98 or IBM} +function GetVersion : real; {Returns the current version of BGK32.DLL} +procedure ClrBuffer; {Stops CW and clears buffer} +procedure CancelLastChar; {BackSpace} +procedure SetCallSign(S : ShortString); {Update realtime callsign} +function CallSignSent : boolean; {Returns true if realtime callsign is sent already} +function IsPlaying : boolean; +procedure SetRandCQStr(Str1, Str2 : shortstring); +procedure SetPTTPortDirect(p : word); +procedure SetCWPortDirect(p : word); +procedure SetPaddlePortDirect(p : word); +{$ifndef w95} +procedure PaddleProcessUSB; +{$endif} +procedure PaddleProcess; +procedure ReversePaddle(boo : boolean); +procedure SetSpaceFactor(R : integer); +procedure SetEISpaceFactor(R : integer); +function LeftInBuffer : word; {returns # char left in buffer} +procedure TuneOn; +procedure SetCode(C : Char; Code : string); + +implementation + + +// 1.04 added 'b' [BK] +// 1.05 added '-', '=' [BT]; +// 1.10 started working on paddle input +// 1.11 port set to 0 in PauseCW +// 1.12 PRTport output set to $01 or $00 +// 1.20 first working version of paddle +// 1.21 \+, \- FOR INCWPM/DECWPM +// 1.30 PTT +// 1.31 fixed PTT for 98 or serial (pttport = prtport) proc ControlPTT() +// 1.32 bug fix for \+n/\-n at the end of strings +// 1.33 setspacefactor +// 1.34 setport$00 and nosound added to $FF +// 1.35 recompiled for zLog for Win 1.0 @ hamfair 98 +// 1.36 fixed a bug which failed to control ptt between cq loops +// 1.40 initializebgk takes msec as timer interval. no compatibility with 1.36 and older +// 1.41 PTTFLAG was added +// 1.42 LeftInBuffer added. Returns # of Char's in buffer +// 1.43 Added timeBeginPeriod and timeEndPeriod + +{$F+,X+} + +uses + SysUtils, + Classes, + Windows, +{ $IFNDEF RCCLITE} + URigControl, // 1/21/01 ver 1.9h for serial port keying +{ $ENDIF} + MMSystem; + +const + version = 1.43; + charmax=256; + codemax=16; + MAXWPM =60; + MINWPM =1; + PCIBM = 0; {machine code} + PC98 = 255; + BeepF : LongInt = 1193180; {for calculation of pitch (IBM)} + _inccw = $80; + _deccw = $81; + + _cwon : byte = $01; + _cwoff : byte = $00; + +type + CodeData = array[1..codemax] of byte; + CodeTableType = array[0..255] of CodeData; + +var + SpaceFactor : word = 100; {space length factor in %} + EISpaceFactor : word = 100; {space length factor after E and I} + SelectedBuf : byte; {0..2} + CWSendBuf : array[0..2,1..charmax*codemax] of byte; + CodeTable : CodeTableType; + + RandCQStr : array[1..2] of string[255]; + +{$ifndef w95} + HidController: TJvHidDeviceController; +{$endif} + +const USBIF4CW_VENDORID = $BFE; +const USBIF4CW_PRODID = $E00; + +var Initialized : boolean = False; + +var + PTTFLAG : boolean; {internal PTT flag} + SendOK : boolean;{TRUE if OK to send} + PTTEnabled : boolean; + TimerID : UINT; {CW timer ID} + + millisec : integer; //word; {CW timer interval} + IntrIntvl : integer; //word;{CW timer interval in microsec } + Machine : integer; //word; {IBMPC (default) or NEC98} + sss : integer; // word; {CW timer counter} + + + PRTport : word; {CW output port} + PTTport : word; + + _pttbefore, _pttafter : integer; // word; + _pttholdcount : integer; {counter used to hold PTT in paddle wait} + + _pttout : byte; {value that is output to PTTport. $08 by default} + + cwstrptr : word; + tailcwstrptr : word; + + callsignptr : word; {char pos. not absolute pos} + + Hz : word; {side tone pitch} + _dot, _dash, _bl1, _bl3 : integer; //word; + CQrep : integer; //word; + CQmax : integer; //word; + BGKWPM : integer; //word; + BGKWeight : integer; //word; + BGKSideTone : boolean; + LoopCount_ : LongInt; + LoopTimeSec : Real; + CWPortStr : ShortString; + +var {Paddle related variables} + paddleport : word; {paddle input port. PRTport -1 } + paddle_waiting : boolean; {true if ready to receive paddle input} + mousetail : word; {pointer in CWSendBuf} + p_char_count : word; {counter which determines the end of a word} + {set in m_set and decremented in $AA } + mouX, mouY : word; { 1 or 3 dot or dash} + paddle_input : array[1..codemax+1] of byte; + +function GetMachine : word; +begin + Result := PCIBM; +end; + +{for internal use} + + +function GetPort(address: Word): byte; +var + bValue: Byte; +begin + if _WIN2KMODE then exit; + asm + mov DX, address + in AL, DX + mov bValue, AL + end; + result := bValue; +end; + +procedure SetPort(address, value : Word); +var + bValue: Byte; +begin + if _WIN2KMODE then exit; + bValue := value; + asm + mov DX, address + mov AL, bValue + out DX, AL + end; +end; + +procedure UpdateDataPort; +begin + SetPort(PTTport, _rigmask or _pttmask or _bandmask or _voicemask); +{$ifndef w95} + if KeyingPort = tkpUSB then + begin + _usbportbuf := (not(_bandmask) and $F0) or (_usbportbuf and $0F); + end; +{$endif} +end; + +procedure SetRigFlag(i : integer); // 0 : no rigs, 1 : rig 1, etc +var _outb : byte; +begin + case i of + 0 : _rigmask := $00; + 1 : _rigmask := $00; + 2 : _rigmask := $04; + end; + if _RIGREVERSE then + _rigmask := _rigmask xor $04; + UpdateDataPort; + +{$ifndef w95} + if KeyingPort = tkpUSB then + begin + case i of + 0, 1: _outb := _usbportbuf or $04; + 2 : _outb := _usbportbuf and $FB; + else + _outb := _usbportbuf; + end; + _usbportbuf := _outb; + exit; + end; +{$endif} +end; + +procedure _SetUSBPort(X : byte); +var BW : DWORD; +{$ifndef w95} + OutReport : array[0..8] of byte; +{$endif} +begin +{$ifndef w95} + if USBIF <> nil then + begin + OutReport[0] := 0; + OutReport[1] := 1; + OutReport[2] := X; + OutReport[3] := 0; + OutReport[4] := 0; + OutReport[5] := 0; + OutReport[6] := 0; + OutReport[7] := 0; + OutReport[8] := 0; + _usbportstatus := X; + USBIF.WriteFile(OutReport, USBIF.Caps.OutputReportByteLength, BW); + end; +{$endif} +end; + +procedure SetUSBPort(X : byte); +begin +{$ifndef w95} + _usbportbuf := x; +{$endif} +end; + + + +procedure SetVoiceFlag(i : integer); // 0 : no rigs, 1 : rig 1, etc +var _out : word; + _outb : byte; +begin + +{$ifndef w95} // 2.1a changed 2.1b + VoiceFlag := i; + if KeyingPort = tkpUSB then + begin + if i = 1 then + _outb := _usbportbuf and $F7 + else + _outb := _usbportbuf or $08; + _usbportbuf := _outb; + //SetUSBPort(_outb); + exit; + end; +{$endif} + + case i of + 0 : _voicemask := $00; + 1 : _voicemask := $02; + end; + UpdateDataPort; +end; + +procedure ReverseLogicKeying(KeyReverse : boolean); +begin + if KeyReverse = False then + begin + _cwon := $01; + _cwoff := $00; + end + else + begin + _cwon := $00; + _cwoff := $01; + end; +end; + +procedure ReverseRigOut(Reverse : boolean); +begin + _RIGREVERSE := Reverse; +end; + +procedure ReversePTTOut(Reverse : boolean); +begin + _PTTREVERSE := Reverse; +end; + +procedure Sound(Hz: word); +begin {Sound} + if _WIN2KMODE = false then + SetPort($61, GetPort($61) or 3) + else + begin + +{$ifndef w95} + //Tone.Prepare; + Tone.Play; +{$endif} + end; +end; + +procedure NoSound; +begin + if _WIN2KMODE = FALSE then + SetPort($61,GetPort($61) and $FC) + else +{$ifndef w95} + Tone.Stop; +{$endif} +end; + + +procedure ControlPTT(PTTON : boolean); +var _out : word; + _outb : byte; +begin + PTTFLAG := PTTON; + +{$ifndef w95} + if KeyingPort = tkpUSB then + begin + if PTTON then + _outb := _usbportbuf and $FD + else + _outb := _usbportbuf or $02; + _usbportbuf := _outb; + //SetUSBPort(_outb); + exit; + end; +{$endif} + + if KeyingPort in [tkpSerial1, tkpSerial2] then + begin + if RigControl.ZCom3 = nil then + exit; + if _PTTREVERSE Then + RigControl.ZCom3.ToggleRTS(not(PTTON)) + else + RigControl.ZCom3.ToggleRTS(PTTON); + exit; + end; + + if PTTON then + _out := _pttout + else + _out := $00; + + if _PTTREVERSE then + _out := _out xor _pttout; + + if PTTport = PRTport then {PTT and CW same port, 98 or serial} + begin + if PTTON then + SetPort(PTTport, GetPort(PTTport) or _out) + else + SetPort(PTTport, GetPort(PTTport) and not(_out)); + end + else + begin + _pttmask := _out; + UpdateDataPort; + end; +end; + +procedure SetPTT(_on : boolean); +begin + PTTEnabled := _on; +end; + +function PTTIsOn : boolean; +begin + Result := PTTFLAG; +end; + +procedure SetPTTDelay(before, after : word); +var i : integer; +begin + if IntrIntvl = 0 then + exit; + if before = 0 then + i := 1 + else + i := before; + _pttbefore := Trunc(i*1000/IntrIntvl); + if after = 0 then + i := 1 + else + i := after; + _pttafter := Trunc(i*1000/IntrIntvl); +end; + +function Paused : boolean; +begin + Result := not SendOK; +end; + +function GetLoopCount : integer; +begin + Result := CQrep; +end; + +procedure SetLoopMax(Max : integer); +begin + CQmax := Max; +end; + +function GetLoopMax : word; +begin + Result := CQmax; +end; + +procedure SetPitch(Hertz : integer); +var w : word; +begin + if Hertz < 2500 then + Hz := Hertz; +{$ifndef w95} + Tone.Frequency := Hz; +{$endif} + if Machine <> NEC98 then + begin + w := BeepF div Hz; + SetPort($43, $B6); + SetPort($42, Low(w)); + SetPort($42, Hi(w)); + end + else + begin + { + if Hz = 0 then + exit; + w := Round(SysClock98 / Hz); + SetPort($3fdb, Low(w)); + SetPort($3fdb, Hi(w)); + } + end; +end; + +function GetPitch : word; +begin + Result := Hz; +end; + +Procedure SetCWSendBufChar(C : char); +var m : byte; +begin + for m:=1 to codemax do + CWSendBuf[0, codemax*(tailcwstrptr-1)+m]:=CodeTable[Ord(C)][m]; + inc(tailcwstrptr); + if tailcwstrptr>charmax then tailcwstrptr:=1; + + for m:=1 to codemax do + CWSendBuf[0, codemax*(tailcwstrptr-1)+m]:=$FF; +end; + +Procedure SetCWSendBufCharPTT(C : char); +var m : integer; +begin + if PTTEnabled and Not(PTTIsOn) then + begin + ControlPTT(True); + sss := _pttbefore; + end; + + //SendOK := False; + for m:=1 to codemax do + CWSendBuf[0, codemax*(tailcwstrptr-1)+m]:=CodeTable[Ord(C)][m]; + + if PTTEnabled then + begin + _pttholdcount := _pttafter; + CWSendBuf[0, codemax*(tailcwstrptr-1)+codemax + 1]:=$A2; {holds PTT until pttafter expires} + + inc(tailcwstrptr); + if tailcwstrptr>charmax then tailcwstrptr:=1; + exit; + end; + + inc(tailcwstrptr); + if tailcwstrptr>charmax then tailcwstrptr:=1; + + for m:=1 to codemax do + CWSendBuf[0, codemax*(tailcwstrptr-1)+m]:=$FF; + //SendOK := True; +end; + +function DecodeCommands(S : string) : string; +var SS : string; + n, j, k : word; +begin + SS := S; + while pos('\',SS) > 0 do // \+ incwpm \- decwpm + begin + n := pos('\',SS); + SS[n] := '_'; // just to avoid infinite loop +// if n < (length(SS) - 2) then + if n <= (length(SS) - 2) then // bug fix + begin + if SS[n+1] = '+' then + begin + if SS[n+2] in ['1'..'9'] then + begin + k := ord(SS[n+2]) - ord('0'); + delete(SS, n, 3); + for j := 1 to k do + insert(Chr(_inccw), SS, n); + end; + end; + if SS[n+1] = '-' then + begin + if SS[n+2] in ['1'..'9'] then + begin + k := ord(SS[n+2]) - ord('0'); + delete(SS, n, 3); + for j := 1 to k do + insert(Chr(_deccw), SS, n); + end; + end; + end; + + end; + Result := SS; +end; + +Procedure SetCWSendBuf( b: byte; S :ShortString ); +var n,m,Len : word; + code : integer; + SS : string; +begin + SS := S; + if SS[1]='>' then + begin + Val(SS[2]+SS[3], n, code); + SetCWSpeed(n); + SS:=copy(SS,4,255); + end; + + SS := DecodeCommands(SS); + + Len:=Length(SS); + for n:=1 to Len do + begin + if SS[n] = ':' then {callsign 1st char} + callsignptr := n; + for m:=1 to codemax do + CWSendBuf[b,codemax*(n-1)+m]:=CodeTable[Ord(SS[n])][m]; + end; + CWSendBuf[b,codemax*Len+1]:=$FF; +end; + +Procedure SendStr(sStr : ShortString); +var SS : string; +begin + if sStr = '' then + exit; + SS := DecodeCommands(sStr); + //SS := S; + if PTTEnabled {and Not(PTTIsOn)} then + SS := '('+SS+')'; + SetCWSendBuf(0,SS); + cwstrptr:=1; + sendok:=true; + sss:=1; +end; + +procedure SendStrLoop(S : ShortString); +var SS : string; +begin + SS := DecodeCommands(S); + if PTTEnabled then + SS := '('+SS+')'; + CQrep := 1; + SendStr(SS+'@'); +end; + +Procedure SendStrFIFO(sStr : ShortString); +var n : integer; + SS : string; +begin + {StringBuffer := StringBuffer + sStr; } + SS := DecodeCommands(sStr); + if PTTEnabled then + SS := '('+SS+')'; + for n := 1 to Length(SS) do + begin + if SS[n] = ':' then {callsign 1st char} + callsignptr := n; + SetCWSendBufChar(SS[n]); + end; +end; + +procedure CW_ON; +begin + Case KeyingPort of + tkpParallel : SetPort(PRTport, _cwon); + tkpSerial1, tkpSerial2 : RigControl.ZCom3.ToggleDTR(True); +{$ifndef w95} + tkpUSB : SetUSBPort(_usbportstatus and $FE); +{$endif} + end; +end; + +procedure CW_OFF; +begin + Case KeyingPort of + tkpParallel : SetPort(PRTport, _cwoff); + tkpSerial1, tkpSerial2 : RigControl.ZCom3.ToggleDTR(False); +{$ifndef w95} + tkpUSB : SetUSBPort(_usbportstatus or $01); +{$endif} + end; +end; + +Procedure TimerProcess(uTimerID, uMessage: word; + dwUser, dw1, dw2: Longint); stdcall; +var workw, workx : word; {work variables in TimerProcess $AA} +label xxx; +label _ff; +begin + if sss > 0 then + begin + dec(sss); + end + else + begin + if SendOK then + begin + Case CWSendBuf[SelectedBuf,cwstrptr] of + $55 : { set ptt delay before} + sss := _pttbefore; + $10 : ControlPTT(True); + $1F : ControlPTT(False); + 0 : begin + //SetPort(PRTport, _cwoff); + CW_OFF; + nosound; sss:=_bl1; + end; + 2 : {normal space x space factor (%)} + begin + //SetPort(PRTport, _cwoff); + CW_OFF; + nosound; + sss := Trunc(_bl3*SpaceFactor/100); + end; + $E : {normal space x space factor x eispacefactor(%)} + begin + //SetPort(PRTport, _cwoff); + CW_OFF; + nosound; + sss := Trunc(_bl3*(SpaceFactor/100)*(EISpaceFactor/100)); + end; + 1 : begin + //SetPort(PRTport, _cwon); + CW_ON; + if BGKsidetone then sound(Hz); + sss:=_dot; + end; + 3 : begin + //SetPort(PRTport, _cwon); + CW_ON; + if BGKsidetone then sound(Hz); + sss:=_dash; + end; + 4 : begin + if BGKsidetone then sound(Hz); + SetPort(PRTport, GetPort(PRTport) or $80); + sss:=100; {30 ms} + end; + 5 : begin SetPort(PRTport, GetPort(PRTport) and $7F); nosound; sss:=_bl1; end; {???} + (* + 0 : begin SetPort(PRTport, GetPort(PRTport) and $FE); nosound; sss:=_bl1; end; + 2 : begin SetPort(PRTport, GetPort(PRTport) and $FE); nosound; sss:=_bl3; end; + 1 : begin + SetPort(PRTport, GetPort(PRTport) or $01); + if BGKsidetone then sound(Hz); + sss:=_dot; + end; + 3 : begin + SetPort(PRTport, GetPort(PRTport) or $01); + if BGKsidetone then sound(Hz); + sss:=_dash; + end; + 4 : begin + if BGKsidetone then sound(Hz); + SetPort(PRTport, GetPort(PRTport) or $80); + sss:=100; {30 ms} + end; + 5 : begin SetPort(PRTport, GetPort(PRTport) and $7F); nosound; sss:=_bl1; end; + *) + 9 : begin + BGKRefresh := True; + cwstrptr:=(cwstrptr div codemax +1)*codemax; + end; + $A2 : begin + if _pttholdcount <= 0 then + begin + //ControlPTT(False); + // same as $FF + cwstrptr:=0; + callsignptr := 0; + mousetail:=1; + tailcwstrptr := 1; + paddle_waiting:=true; + CWSendBuf[SelectedBuf,1]:=$FF; + CW_OFF; + nosound; + ControlPTT(False); + end + else + begin + dec(_pttholdcount); + goto xxx; + end; + end; + $AA : begin {paddle waiting routine. if p_char_count expires, } + paddle_waiting:=true; + if p_char_count=0 then + begin + if mousetail>codemax then workx:=codemax + else workx:=mousetail; + for workw:=1 to workx-1 do + paddle_input[workw]:=CWSendBuf[0,workw]; + paddle_input[workx]:=$FF; + + if PTTEnabled then + begin + _pttholdcount := _pttafter; + CWSendBuf[SelectedBuf,cwstrptr] := $A2; + goto xxx; + end; + + cwstrptr:=1; + mousetail:=1; + paddle_waiting:=true; + CWSendBuf[SelectedBuf,1]:=$FF; + end + else + dec(p_char_count); + goto xxx; + end; + $BB : begin dec(cwstrptr); end; + $CC : begin + inc(CQrep); + if CQrep>CQmax then + begin + CWSendBuf[SelectedBuf,1]:=$FF; + CQrep := 0; + SelectedBuf:=0; + goto _ff; + end + else + if CQrep>4 then + begin + SelectedBuf:=CQrep mod 3; //random(3); + if SelectedBuf > 2 then + begin + DEBUG_FLAG := SELECTEDBUF; + SelectedBuf := 0; + end; + if SelectedBuf in [1..2] then + if RandCQStr[SelectedBuf]='' then + SelectedBuf := 0; + end; + cwstrptr:=0; + end; + $DD : begin + sss:=LoopCount_; + end; + $C1 : begin {voice} + inc(CQrep); + if CQrep>CQmax then + begin + SendOK:=false; + cwstrptr:=0; + end + else + cwstrptr:=0; + end; + $D1 : begin + {sss:=voiceLoopCount;} + end; + $EE : begin {cwstrptr:=(BGKcall+callmax-1)*codemax;}end; + $FA : begin + dec(cwstrptr); + end; + $FF : begin + {SendOK:=false;} +_ff: + cwstrptr:=0; + callsignptr := 0; + mousetail:=1; + tailcwstrptr := 1; + paddle_waiting:=true; + CWSendBuf[SelectedBuf,1]:=$FF; + //SetPort(PRTport, _cwoff); +{$ifndef w95} + if KeyingPort <> tkpUSB then + CW_OFF; +{$else} + CW_OFF; +{$endif} + nosound; + {if PTTEnabled then // 1.3c + ControlPTT(False); } // PTT doesn't work with \ + end; + $99 : begin {pause} + SendOK := False; + end; + + $41 : begin + IncWPM; + end; + $42 : begin + DecWPM; + end; + $0B : UserFlag := False; + + end; + inc(cwstrptr); + + +xxx: + end; + end; +end; {TimerProcess} + + +Procedure SetCWSpeed(_WPM : word); +begin + if (_WPM<=MAXWPM) and (_WPM>=MINWPM) then + begin + if _WPM*IntrIntvl=0 then exit; + _dot:=Trunc((2*BGKweight/100)*(1200000/(_WPM*IntrIntvl))); + _bl1:=Trunc((2*(1-BGKweight/100))*(1200000/(_WPM*IntrIntvl))); + _dash:=_dot*3; + _bl3:=_bl1*3; + BGKWPM:=_WPM; + end; +end; + +procedure SetLoopTime(Tsec : Real); +begin + if IntrIntvl = 0 then + IntrIntvl := 1000; + LoopCount_:=Trunc(Tsec*1000000 /IntrIntvl); + LoopTimeSec := Tsec; +end; + +function GetLoopTime : Real; +begin + Result := LoopTimeSec; +end; + +{$ifndef w95} +procedure TZLHID.DeviceChanges(Sender: TObject); +begin + USB_Detected := False; + if USBIF <> nil then + begin + HidController.CheckOut(USBIF); + end; + HidController.Enumerate; +end; + +procedure TZLHID.DeviceUnplug(HidDev: TJvHidDevice); +begin +end; + +function TZLHID.Enumeration(HidDev: TJvHidDevice; Index: Integer): Boolean; +var + p: string; +begin + with HidDev do + begin + if (Attributes.ProductID = USBIF4CW_PRODID) and (Attributes.VendorID = USBIF4CW_VENDORID) then + begin + if HIDController.CheckOutByIndex(USBIF, Index) = True then + begin + USBIF.OpenFile; + USB_Detected := True; + Result := False; + exit; + end; + end; + end; + Result := True; +end; +{$endif} + +procedure InitializeBGK(msec : integer); +var n, m : word; +var debugfile : textfile; +begin +if DEBUGMODE then + begin + assignfile(debugfile, 'DEBUG.TXT'); + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-1'); + closefile(debugfile); + end; + Initialized := True; + RandCQStr[1] := ''; + RandCQStr[2] := ''; + BGKRefresh := False; + +{$ifndef w95} + HIDController := nil; +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-9-1'); + closefile(debugfile); + end; + + HidController := TJvHidDeviceController.Create(nil); + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-10'); + closefile(debugfile); + end; + + ZLHID := TZLHID.Create; + USBIF := nil; + USB_Detected := False; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-11'); + closefile(debugfile); + end; + + with HidController do + begin + OnDeviceChange := ZLHID.DeviceChanges; + OnEnumerate := ZLHID.Enumeration; + OnDeviceUnplug := ZLHID.DeviceUnplug; + Enumerate; + end; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-12'); + closefile(debugfile); + end; + +{$endif} + + + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-2'); + closefile(debugfile); + end; + PRTport := $037A; + PTTport := $0378; + _pttout := $08; + PTTFLAG := False; + + paddleport := $00; + mouX := 1; mouY := 3; + + callsignptr := 0; {points to the 1st char of realtime updated callsign} + SelectedBuf := 0; + cwstrptr := 1; + tailcwstrptr := 1; + Machine := IBMPC; + millisec := msec; {timer interval} + IntrIntvl := millisec * 1000; +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-3'); + closefile(debugfile); + end; + SetLoopTime(2.0); + for n:=0 to 255 do + for m:= 1 to codemax do + CodeTable[n,m]:=$FF; + for m := 0 to 2 do + CWSendBuf[m,1]:=$FF; +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-4'); + closefile(debugfile); + end; + SendOK := True; + sss := 10; + SetPitch(800); {800 Hz} +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-5'); + closefile(debugfile); + end; + BGKWeight := 50; + BGKSideTone := True; + SetCWSpeed(25); + CQrep := 0; + CQmax := 15; +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-6'); + closefile(debugfile); + end; + + timeBeginPeriod(1); + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-7'); + closefile(debugfile); + end; + TimerID := timeSetEvent(millisec,0, @TimerProcess, 0, time_Periodic); + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-8'); + closefile(debugfile); + end; + + PTTEnabled := False; + SetPTTDelay(50, 50); {50ms/50ms} + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-9'); + closefile(debugfile); + end; + + +(* +{$ifndef w95} + HIDController := nil; +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-9-1'); + closefile(debugfile); + end; + + HidController := TJvHidDeviceController.Create(nil); + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-10'); + closefile(debugfile); + end; + + ZLHID := TZLHID.Create; + USBIF := nil; + USB_Detected := False; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-11'); + closefile(debugfile); + end; + + with HidController do + begin + OnDeviceChange := ZLHID.DeviceChanges; + OnEnumerate := ZLHID.Enumeration; + OnDeviceUnplug := ZLHID.DeviceUnplug; + Enumerate; + end; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-12'); + closefile(debugfile); + end; + +{$endif} +*) + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-13'); + closefile(debugfile); + end; + + CodeTable[Ord('A')][1]:=1; + CodeTable[Ord('A')][2]:=0; + CodeTable[Ord('A')][3]:=3; + CodeTable[Ord('A')][4]:=2; + CodeTable[Ord('A')][5]:=9; + + CodeTable[Ord('B')][1]:=3; + CodeTable[Ord('B')][2]:=0; + CodeTable[Ord('B')][3]:=1; + CodeTable[Ord('B')][4]:=0; + CodeTable[Ord('B')][5]:=1; + CodeTable[Ord('B')][6]:=0; + CodeTable[Ord('B')][7]:=1; + CodeTable[Ord('B')][8]:=2; + CodeTable[Ord('B')][9]:=9; + + CodeTable[Ord('C')][1]:=3; + CodeTable[Ord('C')][2]:=0; + CodeTable[Ord('C')][3]:=1; + CodeTable[Ord('C')][4]:=0; + CodeTable[Ord('C')][5]:=3; + CodeTable[Ord('C')][6]:=0; + CodeTable[Ord('C')][7]:=1; + CodeTable[Ord('C')][8]:=2; + CodeTable[Ord('C')][9]:=9; + + CodeTable[Ord('D')][1]:=3; + CodeTable[Ord('D')][2]:=0; + CodeTable[Ord('D')][3]:=1; + CodeTable[Ord('D')][4]:=0; + CodeTable[Ord('D')][5]:=1; + CodeTable[Ord('D')][6]:=2; + CodeTable[Ord('D')][7]:=9; + + CodeTable[Ord('E')][1]:=1; + CodeTable[Ord('E')][2]:=$E; + CodeTable[Ord('E')][3]:=9; + + CodeTable[Ord('F')][1]:=1; + CodeTable[Ord('F')][2]:=0; + CodeTable[Ord('F')][3]:=1; + CodeTable[Ord('F')][4]:=0; + CodeTable[Ord('F')][5]:=3; + CodeTable[Ord('F')][6]:=0; + CodeTable[Ord('F')][7]:=1; + CodeTable[Ord('F')][8]:=2; + CodeTable[Ord('F')][9]:=9; + + CodeTable[Ord('G')][1]:=3; + CodeTable[Ord('G')][2]:=0; + CodeTable[Ord('G')][3]:=3; + CodeTable[Ord('G')][4]:=0; + CodeTable[Ord('G')][5]:=1; + CodeTable[Ord('G')][6]:=2; + CodeTable[Ord('G')][7]:=9; + + CodeTable[Ord('H')][1]:=1; + CodeTable[Ord('H')][2]:=0; + CodeTable[Ord('H')][3]:=1; + CodeTable[Ord('H')][4]:=0; + CodeTable[Ord('H')][5]:=1; + CodeTable[Ord('H')][6]:=0; + CodeTable[Ord('H')][7]:=1; + CodeTable[Ord('H')][8]:=2; + CodeTable[Ord('H')][9]:=9; + + CodeTable[Ord('I')][1]:=1; + CodeTable[Ord('I')][2]:=0; + CodeTable[Ord('I')][3]:=1; + CodeTable[Ord('I')][4]:=0; + CodeTable[Ord('I')][5]:=$E; + CodeTable[Ord('I')][6]:=9; + + CodeTable[Ord('J')][1]:=1; + CodeTable[Ord('J')][2]:=0; + CodeTable[Ord('J')][3]:=3; + CodeTable[Ord('J')][4]:=0; + CodeTable[Ord('J')][5]:=3; + CodeTable[Ord('J')][6]:=0; + CodeTable[Ord('J')][7]:=3; + CodeTable[Ord('J')][8]:=2; + CodeTable[Ord('J')][9]:=9; + + CodeTable[Ord('K')][1]:=3; + CodeTable[Ord('K')][2]:=0; + CodeTable[Ord('K')][3]:=1; + CodeTable[Ord('K')][4]:=0; + CodeTable[Ord('K')][5]:=3; + CodeTable[Ord('K')][6]:=2; + CodeTable[Ord('K')][7]:=9; + + CodeTable[Ord('L')][1]:=1; + CodeTable[Ord('L')][2]:=0; + CodeTable[Ord('L')][3]:=3; + CodeTable[Ord('L')][4]:=0; + CodeTable[Ord('L')][5]:=1; + CodeTable[Ord('L')][6]:=0; + CodeTable[Ord('L')][7]:=1; + CodeTable[Ord('L')][8]:=2; + CodeTable[Ord('L')][9]:=9; + + CodeTable[Ord('M')][1]:=3; + CodeTable[Ord('M')][2]:=0; + CodeTable[Ord('M')][3]:=3; + CodeTable[Ord('M')][4]:=0; + CodeTable[Ord('M')][5]:=2; + CodeTable[Ord('M')][6]:=9; + + CodeTable[Ord('N')][1]:=3; + CodeTable[Ord('N')][2]:=0; + CodeTable[Ord('N')][3]:=1; + CodeTable[Ord('N')][4]:=0; + CodeTable[Ord('N')][5]:=2; + CodeTable[Ord('N')][6]:=9; + + CodeTable[Ord('O')][1]:=3; + CodeTable[Ord('O')][2]:=0; + CodeTable[Ord('O')][3]:=3; + CodeTable[Ord('O')][4]:=0; + CodeTable[Ord('O')][5]:=3; + CodeTable[Ord('O')][6]:=2; + CodeTable[Ord('O')][7]:=9; + + CodeTable[Ord('P')][1]:=1; + CodeTable[Ord('P')][2]:=0; + CodeTable[Ord('P')][3]:=3; + CodeTable[Ord('P')][4]:=0; + CodeTable[Ord('P')][5]:=3; + CodeTable[Ord('P')][6]:=0; + CodeTable[Ord('P')][7]:=1; + CodeTable[Ord('P')][8]:=2; + CodeTable[Ord('P')][9]:=9; + + CodeTable[Ord('Q')][1]:=3; + CodeTable[Ord('Q')][2]:=0; + CodeTable[Ord('Q')][3]:=3; + CodeTable[Ord('Q')][4]:=0; + CodeTable[Ord('Q')][5]:=1; + CodeTable[Ord('Q')][6]:=0; + CodeTable[Ord('Q')][7]:=3; + CodeTable[Ord('Q')][8]:=2; + CodeTable[Ord('Q')][9]:=9; + + CodeTable[Ord('R')][1]:=1; + CodeTable[Ord('R')][2]:=0; + CodeTable[Ord('R')][3]:=3; + CodeTable[Ord('R')][4]:=0; + CodeTable[Ord('R')][5]:=1; + CodeTable[Ord('R')][6]:=2; + CodeTable[Ord('R')][7]:=9; + + CodeTable[Ord('S')][1]:=1; + CodeTable[Ord('S')][2]:=0; + CodeTable[Ord('S')][3]:=1; + CodeTable[Ord('S')][4]:=0; + CodeTable[Ord('S')][5]:=1; + CodeTable[Ord('S')][6]:=2; + CodeTable[Ord('S')][7]:=9; + + CodeTable[Ord('T')][1]:=3; + CodeTable[Ord('T')][2]:=2; + CodeTable[Ord('T')][3]:=9; + + CodeTable[Ord('U')][1]:=1; + CodeTable[Ord('U')][2]:=0; + CodeTable[Ord('U')][3]:=1; + CodeTable[Ord('U')][4]:=0; + CodeTable[Ord('U')][5]:=3; + CodeTable[Ord('U')][6]:=2; + CodeTable[Ord('U')][7]:=9; + + CodeTable[Ord('V')][1]:=1; + CodeTable[Ord('V')][2]:=0; + CodeTable[Ord('V')][3]:=1; + CodeTable[Ord('V')][4]:=0; + CodeTable[Ord('V')][5]:=1; + CodeTable[Ord('V')][6]:=0; + CodeTable[Ord('V')][7]:=3; + CodeTable[Ord('V')][8]:=2; + CodeTable[Ord('V')][9]:=9; + + CodeTable[Ord('W')][1]:=1; + CodeTable[Ord('W')][2]:=0; + CodeTable[Ord('W')][3]:=3; + CodeTable[Ord('W')][4]:=0; + CodeTable[Ord('W')][5]:=3; + CodeTable[Ord('W')][6]:=2; + CodeTable[Ord('W')][7]:=9; + + CodeTable[Ord('X')][1]:=3; + CodeTable[Ord('X')][2]:=0; + CodeTable[Ord('X')][3]:=1; + CodeTable[Ord('X')][4]:=0; + CodeTable[Ord('X')][5]:=1; + CodeTable[Ord('X')][6]:=0; + CodeTable[Ord('X')][7]:=3; + CodeTable[Ord('X')][8]:=2; + CodeTable[Ord('X')][9]:=9; + + CodeTable[Ord('Y')][1]:=3; + CodeTable[Ord('Y')][2]:=0; + CodeTable[Ord('Y')][3]:=1; + CodeTable[Ord('Y')][4]:=0; + CodeTable[Ord('Y')][5]:=3; + CodeTable[Ord('Y')][6]:=0; + CodeTable[Ord('Y')][7]:=3; + CodeTable[Ord('Y')][8]:=2; + CodeTable[Ord('Y')][9]:=9; + + CodeTable[Ord('Z')][1]:=3; + CodeTable[Ord('Z')][2]:=0; + CodeTable[Ord('Z')][3]:=3; + CodeTable[Ord('Z')][4]:=0; + CodeTable[Ord('Z')][5]:=1; + CodeTable[Ord('Z')][6]:=0; + CodeTable[Ord('Z')][7]:=1; + CodeTable[Ord('Z')][8]:=2; + CodeTable[Ord('Z')][9]:=9; + + CodeTable[Ord(' ')][1]:=0; + //CodeTable[Ord(' ')][2]:=$22; + CodeTable[Ord(' ')][2]:=2; + CodeTable[Ord(' ')][3]:=9; + + CodeTable[Ord('_')][1]:=0; + CodeTable[Ord('_')][2]:=9; + + CodeTable[Ord('1')][1]:=1; + CodeTable[Ord('1')][2]:=0; + CodeTable[Ord('1')][3]:=3; + CodeTable[Ord('1')][4]:=0; + CodeTable[Ord('1')][5]:=3; + CodeTable[Ord('1')][6]:=0; + CodeTable[Ord('1')][7]:=3; + CodeTable[Ord('1')][8]:=0; + CodeTable[Ord('1')][9]:=3; + CodeTable[Ord('1')][10]:=2; + CodeTable[Ord('1')][11]:=9; + + CodeTable[Ord('2')][1]:=1; + CodeTable[Ord('2')][2]:=0; + CodeTable[Ord('2')][3]:=1; + CodeTable[Ord('2')][4]:=0; + CodeTable[Ord('2')][5]:=3; + CodeTable[Ord('2')][6]:=0; + CodeTable[Ord('2')][7]:=3; + CodeTable[Ord('2')][8]:=0; + CodeTable[Ord('2')][9]:=3; + CodeTable[Ord('2')][10]:=2; + CodeTable[Ord('2')][11]:=9; + + CodeTable[Ord('3')][1]:=1; + CodeTable[Ord('3')][2]:=0; + CodeTable[Ord('3')][3]:=1; + CodeTable[Ord('3')][4]:=0; + CodeTable[Ord('3')][5]:=1; + CodeTable[Ord('3')][6]:=0; + CodeTable[Ord('3')][7]:=3; + CodeTable[Ord('3')][8]:=0; + CodeTable[Ord('3')][9]:=3; + CodeTable[Ord('3')][10]:=2; + CodeTable[Ord('3')][11]:=9; + + CodeTable[Ord('4')][1]:=1; + CodeTable[Ord('4')][2]:=0; + CodeTable[Ord('4')][3]:=1; + CodeTable[Ord('4')][4]:=0; + CodeTable[Ord('4')][5]:=1; + CodeTable[Ord('4')][6]:=0; + CodeTable[Ord('4')][7]:=1; + CodeTable[Ord('4')][8]:=0; + CodeTable[Ord('4')][9]:=3; + CodeTable[Ord('4')][10]:=2; + CodeTable[Ord('4')][11]:=9; + + CodeTable[Ord('5')][1]:=1; + CodeTable[Ord('5')][2]:=0; + CodeTable[Ord('5')][3]:=1; + CodeTable[Ord('5')][4]:=0; + CodeTable[Ord('5')][5]:=1; + CodeTable[Ord('5')][6]:=0; + CodeTable[Ord('5')][7]:=1; + CodeTable[Ord('5')][8]:=0; + CodeTable[Ord('5')][9]:=1; + CodeTable[Ord('5')][10]:=2; + CodeTable[Ord('5')][11]:=9; + + CodeTable[Ord('6')][1]:=3; + CodeTable[Ord('6')][2]:=0; + CodeTable[Ord('6')][3]:=1; + CodeTable[Ord('6')][4]:=0; + CodeTable[Ord('6')][5]:=1; + CodeTable[Ord('6')][6]:=0; + CodeTable[Ord('6')][7]:=1; + CodeTable[Ord('6')][8]:=0; + CodeTable[Ord('6')][9]:=1; + CodeTable[Ord('6')][10]:=2; + CodeTable[Ord('6')][11]:=9; + + CodeTable[Ord('7')][1]:=3; + CodeTable[Ord('7')][2]:=0; + CodeTable[Ord('7')][3]:=3; + CodeTable[Ord('7')][4]:=0; + CodeTable[Ord('7')][5]:=1; + CodeTable[Ord('7')][6]:=0; + CodeTable[Ord('7')][7]:=1; + CodeTable[Ord('7')][8]:=0; + CodeTable[Ord('7')][9]:=1; + CodeTable[Ord('7')][10]:=2; + CodeTable[Ord('7')][11]:=9; + + CodeTable[Ord('8')][1]:=3; + CodeTable[Ord('8')][2]:=0; + CodeTable[Ord('8')][3]:=3; + CodeTable[Ord('8')][4]:=0; + CodeTable[Ord('8')][5]:=3; + CodeTable[Ord('8')][6]:=0; + CodeTable[Ord('8')][7]:=1; + CodeTable[Ord('8')][8]:=0; + CodeTable[Ord('8')][9]:=1; + CodeTable[Ord('8')][10]:=2; + CodeTable[Ord('8')][11]:=9; + + CodeTable[Ord('9')][1]:=3; + CodeTable[Ord('9')][2]:=0; + CodeTable[Ord('9')][3]:=3; + CodeTable[Ord('9')][4]:=0; + CodeTable[Ord('9')][5]:=3; + CodeTable[Ord('9')][6]:=0; + CodeTable[Ord('9')][7]:=3; + CodeTable[Ord('9')][8]:=0; + CodeTable[Ord('9')][9]:=1; + CodeTable[Ord('9')][10]:=2; + CodeTable[Ord('9')][11]:=9; + + CodeTable[Ord('0')][1]:=3; + CodeTable[Ord('0')][2]:=0; + CodeTable[Ord('0')][3]:=3; + CodeTable[Ord('0')][4]:=0; + CodeTable[Ord('0')][5]:=3; + CodeTable[Ord('0')][6]:=0; + CodeTable[Ord('0')][7]:=3; + CodeTable[Ord('0')][8]:=0; + CodeTable[Ord('0')][9]:=3; + CodeTable[Ord('0')][10]:=2; + CodeTable[Ord('0')][11]:=9; + + CodeTable[Ord('-')][1]:=3; + CodeTable[Ord('-')][2]:=0; + CodeTable[Ord('-')][3]:=1; + CodeTable[Ord('-')][4]:=0; + CodeTable[Ord('-')][5]:=1; + CodeTable[Ord('-')][6]:=0; + CodeTable[Ord('-')][7]:=1; + CodeTable[Ord('-')][8]:=0; + CodeTable[Ord('-')][9]:=3; + CodeTable[Ord('-')][10]:=2; + CodeTable[Ord('-')][11]:=9; + + CodeTable[ord('"')][1] := $0B; // set UserFlag to false + CodeTable[ord('"')][2] := 9; + + CodeTable[Ord('=')][1]:=3; + CodeTable[Ord('=')][2]:=0; + CodeTable[Ord('=')][3]:=1; + CodeTable[Ord('=')][4]:=0; + CodeTable[Ord('=')][5]:=1; + CodeTable[Ord('=')][6]:=0; + CodeTable[Ord('=')][7]:=1; + CodeTable[Ord('=')][8]:=0; + CodeTable[Ord('=')][9]:=3; + CodeTable[Ord('=')][10]:=2; + CodeTable[Ord('=')][11]:=9; + + CodeTable[Ord('/')][1]:=3; + CodeTable[Ord('/')][2]:=0; + CodeTable[Ord('/')][3]:=1; + CodeTable[Ord('/')][4]:=0; + CodeTable[Ord('/')][5]:=1; + CodeTable[Ord('/')][6]:=0; + CodeTable[Ord('/')][7]:=3; + CodeTable[Ord('/')][8]:=0; + CodeTable[Ord('/')][9]:=1; + CodeTable[Ord('/')][10]:=2; + CodeTable[Ord('/')][11]:=9; + + CodeTable[Ord('a')][1]:=1; + CodeTable[Ord('a')][2]:=0; + CodeTable[Ord('a')][3]:=3; + CodeTable[Ord('a')][4]:=0; + CodeTable[Ord('a')][5]:=1; + CodeTable[Ord('a')][6]:=0; + CodeTable[Ord('a')][7]:=3; + CodeTable[Ord('a')][8]:=0; + CodeTable[Ord('a')][9]:=1; + CodeTable[Ord('a')][10]:=2; + CodeTable[Ord('a')][11]:=9; + + CodeTable[Ord('b')][1]:=3; + CodeTable[Ord('b')][2]:=0; + CodeTable[Ord('b')][3]:=1; + CodeTable[Ord('b')][4]:=0; + CodeTable[Ord('b')][5]:=1; + CodeTable[Ord('b')][6]:=0; + CodeTable[Ord('b')][7]:=1; + CodeTable[Ord('b')][8]:=0; + CodeTable[Ord('b')][9]:=3; + CodeTable[Ord('b')][10]:=0; + CodeTable[Ord('b')][11]:=1; + CodeTable[Ord('b')][12]:=0; + CodeTable[Ord('b')][13]:=3; + CodeTable[Ord('b')][14]:=2; + CodeTable[Ord('b')][15]:=9; + + CodeTable[Ord('s')][1]:=1; + CodeTable[Ord('s')][2]:=0; + CodeTable[Ord('s')][3]:=1; + CodeTable[Ord('s')][4]:=0; + CodeTable[Ord('s')][5]:=1; + CodeTable[Ord('s')][6]:=0; + CodeTable[Ord('s')][7]:=3; + CodeTable[Ord('s')][8]:=0; + CodeTable[Ord('s')][9]:=1; + CodeTable[Ord('s')][10]:=0; + CodeTable[Ord('s')][11]:=3; + CodeTable[Ord('s')][12]:=2; + CodeTable[Ord('s')][13]:=9; + + CodeTable[Ord('k')][1]:=3; + CodeTable[Ord('k')][2]:=0; + CodeTable[Ord('k')][3]:=1; + CodeTable[Ord('k')][4]:=0; + CodeTable[Ord('k')][5]:=3; + CodeTable[Ord('k')][6]:=0; + CodeTable[Ord('k')][7]:=3; + CodeTable[Ord('k')][8]:=0; + CodeTable[Ord('k')][9]:=1; + CodeTable[Ord('k')][10]:=2; + CodeTable[Ord('k')][11]:=9; + + CodeTable[Ord('p')][1]:=1; + CodeTable[Ord('p')][2]:=0; + CodeTable[Ord('p')][3]:=9; + + CodeTable[Ord('q')][1]:=3; + CodeTable[Ord('q')][2]:=0; + CodeTable[Ord('q')][3]:=9; + + CodeTable[Ord('?')][1]:=1; + CodeTable[Ord('?')][2]:=0; + CodeTable[Ord('?')][3]:=1; + CodeTable[Ord('?')][4]:=0; + CodeTable[Ord('?')][5]:=3; + CodeTable[Ord('?')][6]:=0; + CodeTable[Ord('?')][7]:=3; + CodeTable[Ord('?')][8]:=0; + CodeTable[Ord('?')][9]:=1; + CodeTable[Ord('?')][10]:=0; + CodeTable[Ord('?')][11]:=1; + CodeTable[Ord('?')][12]:=2; + CodeTable[Ord('?')][13]:=9; + + CodeTable[Ord('~')][1]:=3; + CodeTable[Ord('~')][2]:=0; + CodeTable[Ord('~')][3]:=1; + CodeTable[Ord('~')][4]:=0; + CodeTable[Ord('~')][5]:=1; + CodeTable[Ord('~')][6]:=0; + CodeTable[Ord('~')][7]:=1; + CodeTable[Ord('~')][8]:=0; + CodeTable[Ord('~')][9]:=3; + CodeTable[Ord('~')][10]:=0; + CodeTable[Ord('~')][11]:=1; + CodeTable[Ord('~')][12]:=0; + CodeTable[Ord('~')][13]:=3; + CodeTable[Ord('~')][14]:=2; + CodeTable[Ord('~')][15]:=9; + + CodeTable[Ord('@')][1]:=$DD; + CodeTable[Ord('@')][2]:=$CC; + + CodeTable[Ord('|')][1]:=$D1; + CodeTable[Ord('|')][2]:=$C1; + + CodeTable[Ord(']')][1]:=4; + CodeTable[Ord(']')][2]:=5; + CodeTable[Ord(']')][3]:=9; + + CodeTable[Ord('<')][1]:=$B0; + CodeTable[Ord('<')][2]:=$B1; + CodeTable[Ord('<')][3]:=$B2; + CodeTable[Ord('<')][4]:=$DD; + CodeTable[Ord('<')][5]:=$C1; + + CodeTable[Ord('#')][1]:=$BB; + + CodeTable[Ord('*')][1]:=9; {skips to the next char} + CodeTable[Ord(':')][1]:=9; {skips to the next char; callsign 1st char} + + CodeTable[Ord('^')][1]:=$99; {pause} + CodeTable[Ord('^')][2]:=9; + + CodeTable[Ord('(')][1]:=$10; {PTT on} + CodeTable[Ord('(')][2]:=$55; {set PTT delay} + CodeTable[Ord('(')][3]:=9; + + CodeTable[Ord(')')][1]:=$1F; {PTT off} + CodeTable[Ord(')')][2]:=9; + + CodeTable[_inccw][1] := $41; {IncWPM} + CodeTable[_inccw][2] := 9; + + CodeTable[ord('u')][1] := $41; {IncWPM} + CodeTable[ord('u')][2] := 9; + + CodeTable[_deccw][1] := $42; {DecWPM} + CodeTable[_deccw][2] := 9; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-14'); + closefile(debugfile); + end; + + for n:=1 to codemax do + CodeTable[Ord('%')][n]:=$EE; + + for n:=1 to codemax do + CodeTable[Ord('{')][n]:=$14; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4-15'); + closefile(debugfile); + end; + +end; + +function CloseBGK : word; +var R : UINT; +begin + if not (KeyingPort in [tkpSerial1, tkpSerial2]) then + ControlPTT(False); + if not(Initialized) then exit; + R:=timeKillEvent(TimerID); + + if Initialized then + timeEndPeriod(1); + + {R:=timeKillEvent(PaddleTimerID);} + R := 0; + NoSound; + if not (KeyingPort in [tkpSerial1, tkpSerial2]) then + CW_OFF; + +{$ifndef w95} + if _WIN2KMODE then + begin + if USBIF <> nil then + begin + KeyingPort := tkpParallel; + SleepEx(10, false); + _SetUSBPort($FF); + USBIF.CloseFile; + HidController.CheckIn(USBIF); + ZLHID.Destroy; + USB_Detected := False; + end; + end; +{$endif} + + if R = TIMERR_NOERROR + then R := 121 + else + if R = MMSYSERR_INVALPARAM + then R := 999 + else + R := 7777; + result := R; +end; + +function GetWPM : byte; +begin + GetWPM := BGKWPM; +end; + +procedure PauseCW; +begin + SendOK := False; + NoSound; + {SetPort(PRTport, GetPort(PRTport) and $FE);} // 1.11 + //SetPort(PRTport, _cwoff); + CW_OFF; + if PTTEnabled then + ControlPTT(False); +end; + +procedure ResumeCW; +begin + if PTTEnabled then + begin + ControlPTT(True); + sss := _pttbefore; + end; + SendOK := True; +end; + +procedure IncWPM; +begin + if BGKWPM < MAXWPM then + SetCWSpeed(BGKWPM+1); +end; + +procedure DecWPM; +begin + if BGKWPM > MINWPM then + SetCWSpeed(BGKWPM-1); +end; + +procedure SetWeight(W : word); +begin + if W in [0..100] then + BGKWeight := W; + SetCWSpeed(BGKWPM); +end; + +procedure SetSideTone(B : boolean); +begin + BGKSideTone := B; +end; + +function GetCWPort : ShortString; +begin + Result := CWPortStr; +end; + +function GetVersion : real; +begin + GetVersion := Version; +end; + +procedure ClrBuffer; +var m : integer; +begin + {SendOK:=false;} + {StringBuffer := ''; } + for m := 0 to 2 do + CWSendBuf[m,1]:=$FF; + cwstrptr:=0; + SelectedBuf := 0; // ver 2.1b + callsignptr := 0; + mousetail:=1; + tailcwstrptr := 1; + paddle_waiting:=true; + NoSound; + SendOK := True; + CQrep := 0; + CW_OFF; + + UserFlag := False; + + if PTTEnabled then + ControlPTT(False); +end; + +procedure CancelLastChar; +var m : integer; +begin + if ((tailcwstrptr-1)*codemax+1) > (cwstrptr) then + begin + dec(tailcwstrptr, 1); + for m:=1 to codemax do + CWSendBuf[SelectedBuf, codemax*(tailcwstrptr-1)+m]:=$FF; + end; +end; + +Procedure SetCWSendBufChar2(C : char; CharPos : word); +var m : integer; +begin + for m:=1 to codemax do + CWSendBuf[0, codemax*(CharPos-1)+m]:=CodeTable[Ord(C)][m]; +end; + +procedure SetCallSign(S : ShortString); +var ss : string[BGKCALLMAX]; + i : word; +begin + if callsignptr = 0 then exit; + ss := S + '*********************'; + while pos('.',ss) > 0 do + begin + ss[pos('.',ss)] := '?'; + end; + ss[BGKCALLMAX] := '^'; {pause} + for i := 1 to BGKCALLMAX do + SetCWSendBufChar2(ss[i], callsignptr+i-1); +end; + +function CallSignSent : boolean; +begin + Result := false; + if callsignptr > 0 then + if CWSendBuf[0, cwstrptr-1] = $99 then + //if cwstrptr > (callsignptr + 10)*codemax then + begin + Result := true; + callsignptr := 0; + end; +end; + +function IsPlaying : boolean; +begin + if (cwstrptr > 1) and SendOK then + Result := True + else + Result := False; +end; + +procedure SetRandCQStr(Str1, Str2 : shortstring); +begin +// ver 2.1c + RandCQStr[1] := Str1; + SetCWSendBuf(1, '('+Str1+')@'); + RandCQStr[2] := Str2; + SetCWSendBuf(2, '('+Str2+')@'); +{ if Str1 <> '' then + begin + RandCQStr[1] := Str1; + SetCWSendBuf(1, '('+Str1+')@'); + end + if Str2 <> '' then + begin + RandCQStr[2] := Str2; + SetCWSendBuf(2, '('+Str2+')@'); + end; } +end; + +procedure SetPTTPortDirect(p : word); +begin + PTTport := p; + _pttout := $08; {parallel} +end; + +procedure SetCWPortDirect(p : word); +begin + PRTport := p; +end; + +procedure SetPaddlePortDirect(p : word); +begin + PaddlePort := p; +end; + +Procedure m_set(b : word); +begin + if PTTEnabled and (mousetail = 1) then + begin + ControlPTT(True); + CWSendBuf[0,1] := $55; {set PTT delay} + inc(mousetail); + end; + + if (mousetail+2)>(charmax*codemax) then mousetail:=1; + CWSendBuf[0,mousetail]:=b; + CWSendBuf[0,mousetail+1]:=0; + CWSendBuf[0,mousetail+2]:=$AA; + inc(mousetail,2); + p_char_count:=(_dot*3) div 2; + SendOK:=true; + {inLoop:=false; } // not sure what it was used for} + paddle_waiting:=false; +end; + +{$ifndef w95} +Procedure PaddleProcessUSB; +var OutReport : array[0..8] of byte; + InReport : array[0..8] of byte; + BR : DWORD; + PaddleStatus, laststatus : byte; +begin +repeat + if USBIF = nil then exit; + OutReport[0] := 0; + OutReport[1] := 4; + OutReport[2] := $0F; + OutReport[3] := 4; + OutReport[4] := 0; + OutReport[5] := 0; + OutReport[6] := 0; + OutReport[7] := 0; + OutReport[8] := 0; + InReport[0] := 0; + InReport[1] := 4; + InReport[2] := $0F; + InReport[3] := 4; + InReport[4] := 0; + InReport[5] := 0; + InReport[6] := 0; + InReport[7] := 0; + InReport[8] := 0; + + USBIF.ReadFile(InReport, USBIF.Caps.InputReportByteLength, BR); + + if not ( (BGK32LIB.KeyingPort = tkpUSB) and (PaddlePort = 0) ) then + begin // ver 2.2b + + if (InReport[1] = 4) and (InReport[3] = 4) and (InReport[2]<>$F) then + begin + PaddleStatus := $05 and InReport[2]; + case mousetail-cwstrptr of + 0 : + case PaddleStatus of + $00 : { both } + case CWSendBuf[0,mousetail-2] of + 1 : m_set(3); + 3 : m_set(1); + end; + $01 : {dit} + if paddle_waiting then m_set(mouX); + $04 : {dah} + if paddle_waiting then m_set(mouY); + end; + 1 : + case PaddleStatus of + $00 : + case CWSendBuf[0,cwstrptr-1] of + 1 : m_set(3); + 3 : m_set(1); + end; + $01 : if CWSendBuf[0,cwstrptr-1] = mouY then + m_set(mouX); + $04 : if CWSendBuf[0,cwstrptr-1] = mouX then + m_set(mouY); + end; + else + if (PaddleStatus=$01) or (PaddleStatus=$04) then + if abs(mousetail-cwstrptr) > 5 then + begin + SelectedBuf:=0; + cwstrptr:=1; + mousetail:=1; + sss:=1; + paddle_waiting:=true; + m_set(0); + end; + end; + end; + + end; // ver 2.2b + + if _usbportbuf = _usbportstatus then + begin + USBIF.WriteFile(OutReport, USBIF.Caps.OutputReportByteLength, BR); + end + else + begin + _SetUSBPort(_usbportbuf); + end; +until KeyingPort <> tkpUSB; + +end; +{$endif} + +Procedure PaddleProcess; +begin +(* +{$ifndef w95} +if KeyingPort = tkpUSB then + begin + PaddleProcessUSB; + exit; + end; +{$endif} +*) +if paddleport>0 then begin + case mousetail-cwstrptr of + 0 : + case ($30 and GetPort(paddleport)) of + $00 : { both } + case CWSendBuf[0,mousetail-2] of + 1 : m_set(3); + 3 : m_set(1); + end; + $10 : {dit} + if paddle_waiting then m_set(mouX); + $20 : {dah} + if paddle_waiting then m_set(mouY); + end; + 1 : + case ($30 and GetPort(paddleport)) of + $00 : + case CWSendBuf[0,cwstrptr-1] of + 1 : m_set(3); + 3 : m_set(1); + end; + $10 : if CWSendBuf[0,cwstrptr-1] = mouY then + m_set(mouX); + $20 : if CWSendBuf[0,cwstrptr-1] = mouX then + m_set(mouY); + end; + else + if (($30 and GetPort(paddleport))=$20) or (($30 and GetPort(paddleport))=$10) + then + if abs(mousetail-cwstrptr) > 5 then + begin + SelectedBuf:=0; + cwstrptr:=1; + mousetail:=1; + sss:=1; + paddle_waiting:=true; + m_set(0); + end; + end; +end; + +end; + +procedure ReversePaddle(boo : boolean); +begin + if boo then + begin + mouX := 3; + mouY := 1; + end + else + begin + mouX := 1; + mouY := 3; + end; +end; + +procedure SetSpaceFactor(R : integer); +begin + if R > 0 then + SpaceFactor := R; +end; + +procedure SetEISpaceFactor(R : integer); +begin + if R > 0 then + EISpaceFactor := R; +end; + +function LeftInBuffer : Word; +begin + Result := 0; + if tailcwstrptr = 1 then + exit; + //Result := ((tailcwstrptr*codemax) - cwstrptr + 1) div codemax - 1; + Result := ((tailcwstrptr*codemax) - cwstrptr + 1) div codemax; +end; + +procedure TuneOn; +begin + ClrBuffer; + SendOK := False; + ControlPTT(True); + //SetPort(PRTport, _cwon); + CW_ON; + if BGKsidetone then + sound(Hz); +end; + +procedure SetCode(C : Char; Code : string); +const dot1 = ''; dot2 = '.'; dot3 = '*'; + dash1 = '-'; dash2 = '_'; + Dots : set of char = [dot1, dot2, dot3]; + Dashes : set of char = [dash1, dash2]; +var i : integer; +begin + for i := 1 to length(Code) do + begin + if 2*i > codemax then + exit; + if Code[i] in Dots then + CodeTable[ord(C)][2*i-1] := 1; + if Code[i] in Dashes then + CodeTable[ord(C)][2*i-1] := 3; + CodeTable[ord(C)][2*i] := 0; + end; + CodeTable[ord(C)][2*length(Code)] := 2; + CodeTable[ord(C)][2*length(Code)+1] := 9; +end; + +function BinaryStr(B : Byte) : string; +const _16str : array[0..$F] of string = + ('0000', '0001', '0010', '0011', + '0100', '0101', '0110', '0111', + '1000', '1001', '1010', '1011', + '1100', '1101', '1110', '1111'); +var i : integer; +begin + i := B; + Result := _16str[B div $F] + _16str[B and $F]; +end; + +function GetPRTPort : string; +var B : byte; +begin + B := GetPort(PTTPort); + Result := BinaryStr(B) + ' ' + IntToStr(B); +end; + + + +begin +{$ifndef w95} + Tone := TToneGen.Create(nil); + Tone.Waveform := tgSine; + Tone.Duration := 100; + Tone.Loop := True; + Tone.Frequency := 700; +{$endif} +end. diff --git a/src/BGK32Lib2.pas b/src/BGK32Lib2.pas new file mode 100644 index 00000000..e6a38111 --- /dev/null +++ b/src/BGK32Lib2.pas @@ -0,0 +1,1759 @@ +unit BGK32Lib2; {Background keying engine ver. 2} + +interface + +var BGKRefresh : boolean; // set to true after a char is sent + +const IBMPC = 0; {machine code as defined in BGK32.DLL} + NEC98 = 255; + + // mask data for data port + _rigmask : byte = $00; // bit mask for sel rig + _pttmask : byte = $00; // bit mask for ptt + _bandmask : byte = $00; //bit mask for band data + _voicemask : byte = $00; // bit mask for voice memory + +type TKeyingPort = (tkpParallel, tkpSerial1, tkpSerial2); +const KeyingPort : TKeyingPort = tkpParallel; + +procedure UpdateDataPort; // sets data port acc to mask data +procedure SetRigFlag(i : integer); // 0 : no rigs, 1 : rig 1, etc +procedure SetVoiceFlag(i : integer); //0 or 1 +procedure ReverseLogicKeying(KeyReverse : boolean); // _cwon, _cwoff +procedure SetPTT(_on : boolean); +function PTTIsOn : boolean; +procedure SetPTTDelay(before, after : word); +procedure ControlPTT(PTTON : boolean); {Sets PTT on/off} +function Paused : boolean; {Returns True if SendOK is False} +function GetLoopCount : integer; {Returns the current loop count} +procedure SetLoopMax(Max : integer); {Sets the maximum loop count} +function GetLoopMax : word; {Returns the maximum loop count} +procedure SetPitch(Hertz : integer); {Sets the pitch of the side tone} +function GetPitch : word; {Returns the current pitch in Hz} +procedure SetCWSendBufChar( C : char ); {Adds a char to the end of buffer} +procedure SetCWSendBufCharPTT( C : char ); {Adds a char to the end of buffer. Also controls PTT if enabled. Called from Keyboard} +Procedure SetCWSendBuf( b: byte; S :ShortString ); {Sets str to buffer but does not start sending} +procedure SendStr(sStr : ShortString); {Sends a string (Overwrites buffer)} +procedure SendStrLoop(S : ShortString); {Sends a string (repeat CQmax times)} +procedure SendStrFIFO(sStr : ShortString); {Sends a string (adds to buffer)} +procedure TimerProcess(uTimerID, uMessage: Word; + dwUser, dw1, dw2: Longint); stdcall; +//procedure TimerProcessEX; +procedure SetCWSpeed(_WPM : word); {Sets CW speed 1-60 wpm} +procedure SetLoopTime(Tsec : Real); {Sets the pause between repeats} +function GetLoopTime : real; {Returns the loop time in seconds} +procedure InitializeBGK(msec : integer); {Initializes BGK. msec is interval} +function CloseBGK : word; {Closes BGK} +procedure PauseCW; {Pause} +procedure ResumeCW; {Resume} +procedure IncWPM; {Increases CW speed by 1WPM} +procedure DecWPM; {Decreases CW speed by 1WPM} +procedure SetWeight(W : word); {Sets the weight 0-100 %} +procedure SetSideTone(B : boolean); {Turn on/off side tone (TRUE=ON FALSE=OFF)} +procedure SetCWPort(i : integer); {Sets CW port to LPT i} +function GetCWPort : ShortString; {Gets current port LPT?} +procedure SetMachine(M : word); {Sets machine as well as CW port address} +function GetMachine : word; {Returns machine code 98 or IBM} +function GetVersion : real; {Returns the current version of BGK32.DLL} +procedure ClrBuffer; {Stops CW and clears buffer} +procedure CancelLastChar; {BackSpace} +procedure SetCallSign(S : ShortString); {Update realtime callsign} +function CallSignSent : boolean; {Returns true if realtime callsign is sent already} +function IsPlaying : boolean; +procedure SetRandCQStr(Str1, Str2 : shortstring); +procedure SetPTTPortDirect(p : word); +procedure SetCWPortDirect(p : word); +procedure SetPaddlePortDirect(p : word); +procedure PaddleProcess; +procedure ReversePaddle(boo : boolean); +procedure SetSpaceFactor(R : integer); +procedure SetEISpaceFactor(R : integer); +function LeftInBuffer : word; {returns # char left in buffer} +procedure TuneOn; +procedure SetCode(C : Char; Code : string); + +implementation + + +// 1.04 added 'b' [BK] +// 1.05 added '-', '=' [BT]; +// 1.10 started working on paddle input +// 1.11 port set to 0 in PauseCW +// 1.12 PRTport output set to $01 or $00 +// 1.20 first working version of paddle +// 1.21 \+, \- FOR INCWPM/DECWPM +// 1.30 PTT +// 1.31 fixed PTT for 98 or serial (pttport = prtport) proc ControlPTT() +// 1.32 bug fix for \+n/\-n at the end of strings +// 1.33 setspacefactor +// 1.34 setport$00 and nosound added to $FF +// 1.35 recompiled for zLog for Win 1.0 @ hamfair 98 +// 1.36 fixed a bug which failed to control ptt between cq loops +// 1.40 initializebgk takes msec as timer interval. no compatibility with 1.36 and older +// 1.41 PTTFLAG was added +// 1.42 LeftInBuffer added. Returns # of Char's in buffer +// 1.43 Added timeBeginPeriod and timeEndPeriod + +{$F+,X+} + +uses + SysUtils, + Classes, + Windows, +{$IFNDEF RCCLITE} + URigControl, // 1/21/01 ver 1.9h for serial port keying +{$ENDIF} + MMSystem; + +const + version = 1.43; + charmax=256; + codemax=16; + MAXWPM =60; + MINWPM =1; + PCIBM = 0; {machine code} + PC98 = 255; + BeepF : LongInt = 1193180; {for calculation of pitch (IBM)} + _inccw = $80; + _deccw = $81; + + _cwon : byte = $01; + _cwoff : byte = $00; + +type + CodeData = array[1..codemax] of byte; + CodeTableType = array[0..255] of CodeData; + +var + SendCharBuffer : array[1..codemax] of byte; //new buffer + XX : integer = 1; + SendBuffer : array[0..2] of string = ('', '', ''); + SendBufferPtr : integer = 0; + + SpaceFactor : word = 100; {space length factor in %} + EISpaceFactor : word = 100; {space length factor after E and I} + SelectedBuf : byte; {0..2} + //CWSendBuf : array[0..2,1..charmax*codemax] of byte; + CodeTable : CodeTableType; + + RandCQStr : array[1..2] of string[255]; + +var Initialized : boolean = False; + +var + PTTFLAG : boolean; {internal PTT flag} + SendOK : boolean;{TRUE if OK to send} + TimerID : UINT; {CW timer ID} + millisec : word; {CW timer interval} + IntrIntvl : word;{CW timer interval in microsec } + Machine : word; {IBMPC (default) or NEC98} + sss : word; {CW timer counter} + + PTTEnabled : boolean; + + PRTport : word; {CW output port} + PTTport : word; + + _pttbefore, _pttafter : word; + _pttholdcount : integer; {counter used to hold PTT in paddle wait} + + _pttout : byte; {value that is output to PTTport. $08 by default} + + cwstrptr : word; + tailcwstrptr : word; + + callsignptr : word; {char pos. not absolute pos} + + Hz : word; {side tone pitch} + _dot, _dash, _bl1, _bl3 : word; + CQrep : word; + CQmax : word; + BGKWPM : word; + BGKWeight : word; + BGKSideTone : boolean; + LoopCount_ : LongInt; + LoopTimeSec : Real; + CWPortStr : ShortString; + +var {Paddle related variables} + paddleport : word; {paddle input port. PRTport -1 } + paddle_waiting : boolean; {true if ready to receive paddle input} + mousetail : word; {pointer in CWSendBuf} + p_char_count : word; {counter which determines the end of a word} + {set in m_set and decremented in $AA } + mouX, mouY : word; { 1 or 3 dot or dash} + paddle_input : array[1..codemax+1] of byte; + + +function GetMachine : word; +begin + Result := PCIBM; +end; + +{for internal use} + +function MemW(Seg, Ofs : word): Word; +var + bValue: Word; +begin +{ asm + mov AX, Seg; + mov ES, AX; + mov AX, ES:Ofs; + mov bValue, AX + end;} + asm + mov AX, Seg; + mov DS, AX; + mov AX, DS:Ofs; + mov bValue, AX + end; + result := bValue; +end; + +function GetPort(address: Word): byte; +var + bValue: Byte; +begin + asm + mov DX, address + in AL, DX + mov bValue, AL + end; + result := bValue; +end; + +procedure SetPort(address, value : Word); +var + bValue: Byte; +begin + bValue := value; + asm + mov DX, address + mov AL, bValue + out DX, AL + end; +end; + +procedure UpdateDataPort; +begin + SetPort(PTTport, _rigmask or _pttmask or _bandmask or _voicemask); +end; + +procedure SetRigFlag(i : integer); // 0 : no rigs, 1 : rig 1, etc +begin + case i of + 0 : _rigmask := $00; + 1 : _rigmask := $00; + 2 : _rigmask := $04; + end; + UpdateDataPort; +end; + +procedure SetVoiceFlag(i : integer); // 0 : no rigs, 1 : rig 1, etc +begin + case i of + 0 : _voicemask := $00; + 1 : _voicemask := $02; + end; + UpdateDataPort; +end; + +procedure ReverseLogicKeying(KeyReverse : boolean); +begin + if KeyReverse = False then + begin + _cwon := $01; + _cwoff := $00; + end + else + begin + _cwon := $00; + _cwoff := $01; + end; +end; + +procedure Sound(Hz: word); + + procedure PutCount(n: word); assembler; + asm + mov al, $B6 + out $43, al + mov ax, n + out $42, al + xchg ah, al + out $42, al + end; + +begin {Sound} +if Machine<>NEC98 then + begin + {PutCount(BeepF div Hz);} + SetPort($61, GetPort($61) or 3); + end +else + begin + //SetPort($37, $06); + end; +end; + +procedure NoSound; +begin + if Machine<>NEC98 then + begin + SetPort($61,GetPort($61) and $FC); + end + else + begin + SetPort($37, $07); + end; +end; + +procedure ControlPTT(PTTON : boolean); +var _out : word; +begin + PTTFLAG := PTTON; + +{$IFNDEF RCCLITE} + if KeyingPort <> tkpParallel then //Serial + begin + RigControl.CommPort3.RTS(PTTON); + exit; + end; +{$ENDIF} + + if PTTON then + _out := _pttout + else + _out := $00; + if PTTport = PRTport then {PTT and CW same port, 98 or serial} + begin + if PTTON then + SetPort(PTTport, GetPort(PTTport) or _out) + else + SetPort(PTTport, GetPort(PTTport) and not(_out)); + end + else + begin + _pttmask := _out; + UpdateDataPort; + //SetPort(PTTport, _out); + end; +end; + +procedure SetPTT(_on : boolean); +begin + PTTEnabled := _on; +end; + +function PTTIsOn : boolean; +begin + Result := PTTFLAG; +{ + if GetPort(PTTport and _pttout) = _pttout then + Result := True + else + Result := False; +} +end; + +procedure SetPTTDelay(before, after : word); +var i : integer; +begin + if IntrIntvl = 0 then + exit; + if before = 0 then + i := 1 + else + i := before; + _pttbefore := Trunc(i*1000/IntrIntvl); + if after = 0 then + i := 1 + else + i := after; + _pttafter := Trunc(i*1000/IntrIntvl); +end; + +function Paused : boolean; +begin + Result := not SendOK; +end; + +function GetLoopCount : integer; +begin + Result := CQrep; +end; + +procedure SetLoopMax(Max : integer); +begin + CQmax := Max; +end; + +function GetLoopMax : word; +begin + Result := CQmax; +end; + +procedure SetPitch(Hertz : integer); +var w : word; +begin + if Hertz < 2500 then + Hz := Hertz; + if Machine <> NEC98 then + begin + w := BeepF div Hz; + SetPort($43, $B6); + SetPort($42, Low(w)); + SetPort($42, Hi(w)); + end + else + begin + end; +end; + +function GetPitch : word; +begin + Result := Hz; +end; + +Procedure SetCharBuffer(C : char); +var m : integer; +begin + for m:=1 to codemax do + SendCharBuffer[m]:=CodeTable[Ord(C)][m]; + XX := 1; +end; + +Procedure SetCWSendBufCharPTT(C : char); +var m : byte; +begin +{ + if PTTEnabled and Not(PTTIsOn) then + begin + ControlPTT(True); + sss := _pttbefore; + end; + + for m:=1 to codemax do + CWSendBuf[0, codemax*(tailcwstrptr-1)+m]:=CodeTable[Ord(C)][m]; + + if PTTEnabled then + begin + _pttholdcount := _pttafter; + CWSendBuf[0, codemax*(tailcwstrptr-1)+codemax + 1]:=$A2; //holds PTT until pttafter expires + inc(tailcwstrptr); + if tailcwstrptr>charmax then tailcwstrptr:=1; + exit; + end; + + inc(tailcwstrptr); + if tailcwstrptr>charmax then tailcwstrptr:=1; + + for m:=1 to codemax do + CWSendBuf[0, codemax*(tailcwstrptr-1)+m]:=$FF;} +end; + +function DecodeCommands(S : string) : string; +var SS : string; + n, j, k : word; +begin + SS := S; + while pos('\',SS) > 0 do // \+ incwpm \- decwpm + begin + n := pos('\',SS); + SS[n] := '_'; // just to avoid infinite loop +// if n < (length(SS) - 2) then + if n <= (length(SS) - 2) then // bug fix + begin + if SS[n+1] = '+' then + begin + if SS[n+2] in ['1'..'9'] then + begin + k := ord(SS[n+2]) - ord('0'); + delete(SS, n, 3); + for j := 1 to k do + insert(Chr(_inccw), SS, n); + end; + end; + if SS[n+1] = '-' then + begin + if SS[n+2] in ['1'..'9'] then + begin + k := ord(SS[n+2]) - ord('0'); + delete(SS, n, 3); + for j := 1 to k do + insert(Chr(_deccw), SS, n); + end; + end; + end; + +{ if n < length(SS) then + begin + if SS[n+1] = '+' then + begin + delete(SS, n, 2); + insert(Chr(_inccw), SS, n); + end; + if SS[n+1] = '-' then + begin + delete(SS, n, 2); + insert(Chr(_deccw), SS, n); + end; + end; } + end; + Result := SS; +end; + +Procedure SendStr(sStr : String); +var SS : string; +begin + SS := DecodeCommands(sStr); + //SS := S; + if PTTEnabled {and Not(PTTIsOn)} then + SS := '('+SS+')'; + SendBuffer[0] := SS; + SendBufferPtr := 1; + sendok := true; + sss:=1; +end; + +procedure SendStrLoop(S : ShortString); +var SS : string; +begin + SS := DecodeCommands(S); + if PTTEnabled then + SS := '('+SS+')'; + CQrep := 1; + SendStr(SS+'@'); +end; + +Procedure SendStrFIFO(sStr : String); +var SS : string; +begin + {StringBuffer := StringBuffer + sStr; } + SS := DecodeCommands(sStr); + if PTTEnabled then + SS := '('+SS+')'; + SendBuffer[0] := SendBuffer[0] + SS; + sendok := true; +end; + +procedure CW_ON; +begin + Case KeyingPort of + tkpParallel : SetPort(PRTport, _cwon); +{$IFNDEF RCCLITE} + tkpSerial1, tkpSerial2 : RigControl.CommPort3.DTR(True); +{$ENDIF} + end; +end; + +procedure CW_OFF; +begin + Case KeyingPort of + tkpParallel : SetPort(PRTport, _cwoff); +{$IFNDEF RCCLITE} + tkpSerial1, tkpSerial2 : RigControl.CommPort3.DTR(False); +{$ENDIF} + end; +end; + +Procedure TimerProcess(uTimerID, uMessage: word; + dwUser, dw1, dw2: Longint); stdcall; +var workw, workx : word; {work variables in TimerProcess $AA} +label xxx; +begin + //PaddleProcess; + if sss > 0 then dec(sss) else + begin + if SendOK then + begin + Case SendCharBuffer[XX] of + $55 : { set ptt delay before} + sss := _pttbefore; + $10 : ControlPTT(True); + $1F : ControlPTT(False); + 0 : begin + //SetPort(PRTport, _cwoff); + CW_OFF; + nosound; sss:=_bl1; + end; + 2 : {normal space x space factor (%)} + begin + //SetPort(PRTport, _cwoff); + CW_OFF; + nosound; + sss := Trunc(_bl3*SpaceFactor/100); + end; + $E : {normal space x space factor x eispacefactor(%)} + begin + //SetPort(PRTport, _cwoff); + CW_OFF; + nosound; + sss := Trunc(_bl3*(SpaceFactor/100)*(EISpaceFactor/100)); + end; + 1 : begin + //SetPort(PRTport, _cwon); + CW_ON; + if BGKsidetone then sound(Hz); + sss:=_dot; + end; + 3 : begin + //SetPort(PRTport, _cwon); + CW_ON; + if BGKsidetone then sound(Hz); + sss:=_dash; + end; + 4 : begin + if BGKsidetone then sound(Hz); + SetPort(PRTport, GetPort(PRTport) or $80); //for external voice memory pulse + sss:=100; {30 ms} + end; + 5 : begin SetPort(PRTport, GetPort(PRTport) and $7F); nosound; sss:=_bl1; end; {???} + 9 : begin + BGKRefresh := True; + inc(SendBufferPtr); + if SendBufferPtr <= length(SendBuffer[0]) then + begin + SetCharBuffer(SendBuffer[0][SendBufferPtr]); + XX := 1; + end + else // no more to send + begin + SendCharBuffer[1] := $FF; + XX := 1; + sss := 500; + end; + end; + $A2 : begin + if _pttholdcount = 0 then + begin + ControlPTT(False); + // same as $FF + cwstrptr:=0; + callsignptr := 0; + mousetail:=1; + tailcwstrptr := 1; + paddle_waiting:=true; + CWSendBuf[SelectedBuf,1]:=$FF; + //SetPort(PRTport, _cwoff); + CW_OFF; + nosound; + end + else + begin + dec(_pttholdcount); + goto xxx; + end; + end; + $AA : begin {paddle waiting routine. if p_char_count expires, } + paddle_waiting:=true; + if p_char_count=0 then + begin + if mousetail>codemax then workx:=codemax + else workx:=mousetail; + for workw:=1 to workx-1 do + paddle_input[workw]:=CWSendBuf[0,workw]; + paddle_input[workx]:=$FF; + + if PTTEnabled then + begin + _pttholdcount := _pttafter; + CWSendBuf[SelectedBuf,cwstrptr] := $A2; + goto xxx; + end; + + cwstrptr:=1; + mousetail:=1; + paddle_waiting:=true; + CWSendBuf[SelectedBuf,1]:=$FF; + {sendok:=false;} + end + else + dec(p_char_count); + goto xxx; + end; + $BB : begin dec(cwstrptr); end; + $CC : begin + inc(CQrep); + if CQrep>CQmax then + begin + {selectedBuf:=0;} + CWSendBuf[SelectedBuf,1]:=$FF; + cwstrptr:=0; + mousetail:=1; + tailcwstrptr := 1; + paddle_waiting:=true; + CQrep := 0; + end + else + if CQrep>4 then + begin + SelectedBuf:=random(3); + if SelectedBuf in [1..2] then + if RandCQStr[SelectedBuf]='' then + SelectedBuf := 0; + end; + cwstrptr:=0; + end; + $DD : begin + sss:=LoopCount_; + end; + $C1 : begin {voice} + inc(CQrep); + if CQrep>CQmax then + begin + SendOK:=false; + cwstrptr:=0; + end + else + cwstrptr:=0; + end; + $D1 : begin + {sss:=voiceLoopCount;} + end; + $EE : begin {cwstrptr:=(BGKcall+callmax-1)*codemax;}end; + $FA : begin + dec(cwstrptr); + end; + $FF : begin + {SendOK:=false;} + XX := 0; + cwstrptr:=0; + callsignptr := 0; + mousetail:=1; + tailcwstrptr := 1; + paddle_waiting:=true; + CWSendBuf[SelectedBuf,1]:=$FF; + //SetPort(PRTport, _cwoff); + CW_OFF; + nosound; + {if PTTEnabled then // 1.3c + ControlPTT(False); } // PTT doesn't work with \ + end; + $99 : begin {pause} + SendOK := False; + end; + + $41 : begin + IncWPM; + end; + $42 : begin + DecWPM; + end; + + end; + inc(XX); +xxx: + end; + end; +end; {TimerProcess} + + +Procedure SetCWSpeed(_WPM : word); +begin + if (_WPM<=MAXWPM) and (_WPM>=MINWPM) then + begin + if _WPM*IntrIntvl=0 then exit; + _dot:=Trunc((2*BGKweight/100)*(1200000/(_WPM*IntrIntvl))); + _bl1:=Trunc((2*(1-BGKweight/100))*(1200000/(_WPM*IntrIntvl))); + _dash:=_dot*3; + _bl3:=_bl1*3; + BGKWPM:=_WPM; + end; +end; + +procedure SetLoopTime(Tsec : Real); +begin + if IntrIntvl = 0 then + IntrIntvl := 1000; + LoopCount_:=Trunc(Tsec*1000000 /IntrIntvl); + LoopTimeSec := Tsec; +end; + +function GetLoopTime : Real; +begin + Result := LoopTimeSec; +end; + +procedure InitializeBGK(msec : integer); +var n, m : word; +begin + Initialized := True; + RandCQStr[1] := ''; + RandCQStr[2] := ''; + BGKRefresh := False; + + PRTport := $037A; + PTTport := $0378; + _pttout := $08; + PTTFLAG := False; + + paddleport := $00; + mouX := 1; mouY := 3; + + callsignptr := 0; {points to the 1st char of realtime updated callsign} + SelectedBuf := 0; + cwstrptr := 1; + tailcwstrptr := 1; + Machine := IBMPC; + millisec := msec; {timer interval} + IntrIntvl := millisec * 1000; + SetLoopTime(2.0); + for n:=0 to 255 do + for m:= 1 to codemax do + CodeTable[n,m]:=$FF; + for m := 0 to 2 do + CWSendBuf[m,1]:=$FF; + SendOK := True; + sss := 10; + SetPitch(800); {800 Hz} + BGKWeight := 50; + BGKSideTone := True; + SetCWSpeed(25); + CQrep := 0; + CQmax := 15; + + timeBeginPeriod(1); + + TimerID := timeSetEvent(millisec,0, @TimerProcess, 0, time_Periodic); + + PTTEnabled := False; + SetPTTDelay(50, 50); {50ms/50ms} + + CodeTable[Ord('A')][1]:=1; + CodeTable[Ord('A')][2]:=0; + CodeTable[Ord('A')][3]:=3; + CodeTable[Ord('A')][4]:=2; + CodeTable[Ord('A')][5]:=9; + + CodeTable[Ord('B')][1]:=3; + CodeTable[Ord('B')][2]:=0; + CodeTable[Ord('B')][3]:=1; + CodeTable[Ord('B')][4]:=0; + CodeTable[Ord('B')][5]:=1; + CodeTable[Ord('B')][6]:=0; + CodeTable[Ord('B')][7]:=1; + CodeTable[Ord('B')][8]:=2; + CodeTable[Ord('B')][9]:=9; + + CodeTable[Ord('C')][1]:=3; + CodeTable[Ord('C')][2]:=0; + CodeTable[Ord('C')][3]:=1; + CodeTable[Ord('C')][4]:=0; + CodeTable[Ord('C')][5]:=3; + CodeTable[Ord('C')][6]:=0; + CodeTable[Ord('C')][7]:=1; + CodeTable[Ord('C')][8]:=2; + CodeTable[Ord('C')][9]:=9; + + CodeTable[Ord('D')][1]:=3; + CodeTable[Ord('D')][2]:=0; + CodeTable[Ord('D')][3]:=1; + CodeTable[Ord('D')][4]:=0; + CodeTable[Ord('D')][5]:=1; + CodeTable[Ord('D')][6]:=2; + CodeTable[Ord('D')][7]:=9; + + CodeTable[Ord('E')][1]:=1; + CodeTable[Ord('E')][2]:=$E; + CodeTable[Ord('E')][3]:=9; + + CodeTable[Ord('F')][1]:=1; + CodeTable[Ord('F')][2]:=0; + CodeTable[Ord('F')][3]:=1; + CodeTable[Ord('F')][4]:=0; + CodeTable[Ord('F')][5]:=3; + CodeTable[Ord('F')][6]:=0; + CodeTable[Ord('F')][7]:=1; + CodeTable[Ord('F')][8]:=2; + CodeTable[Ord('F')][9]:=9; + + CodeTable[Ord('G')][1]:=3; + CodeTable[Ord('G')][2]:=0; + CodeTable[Ord('G')][3]:=3; + CodeTable[Ord('G')][4]:=0; + CodeTable[Ord('G')][5]:=1; + CodeTable[Ord('G')][6]:=2; + CodeTable[Ord('G')][7]:=9; + + CodeTable[Ord('H')][1]:=1; + CodeTable[Ord('H')][2]:=0; + CodeTable[Ord('H')][3]:=1; + CodeTable[Ord('H')][4]:=0; + CodeTable[Ord('H')][5]:=1; + CodeTable[Ord('H')][6]:=0; + CodeTable[Ord('H')][7]:=1; + CodeTable[Ord('H')][8]:=2; + CodeTable[Ord('H')][9]:=9; + + CodeTable[Ord('I')][1]:=1; + CodeTable[Ord('I')][2]:=0; + CodeTable[Ord('I')][3]:=1; + CodeTable[Ord('I')][4]:=0; + CodeTable[Ord('I')][5]:=$E; + CodeTable[Ord('I')][6]:=9; + + CodeTable[Ord('J')][1]:=1; + CodeTable[Ord('J')][2]:=0; + CodeTable[Ord('J')][3]:=3; + CodeTable[Ord('J')][4]:=0; + CodeTable[Ord('J')][5]:=3; + CodeTable[Ord('J')][6]:=0; + CodeTable[Ord('J')][7]:=3; + CodeTable[Ord('J')][8]:=2; + CodeTable[Ord('J')][9]:=9; + + CodeTable[Ord('K')][1]:=3; + CodeTable[Ord('K')][2]:=0; + CodeTable[Ord('K')][3]:=1; + CodeTable[Ord('K')][4]:=0; + CodeTable[Ord('K')][5]:=3; + CodeTable[Ord('K')][6]:=2; + CodeTable[Ord('K')][7]:=9; + + CodeTable[Ord('L')][1]:=1; + CodeTable[Ord('L')][2]:=0; + CodeTable[Ord('L')][3]:=3; + CodeTable[Ord('L')][4]:=0; + CodeTable[Ord('L')][5]:=1; + CodeTable[Ord('L')][6]:=0; + CodeTable[Ord('L')][7]:=1; + CodeTable[Ord('L')][8]:=2; + CodeTable[Ord('L')][9]:=9; + + CodeTable[Ord('M')][1]:=3; + CodeTable[Ord('M')][2]:=0; + CodeTable[Ord('M')][3]:=3; + CodeTable[Ord('M')][4]:=0; + CodeTable[Ord('M')][5]:=2; + CodeTable[Ord('M')][6]:=9; + + CodeTable[Ord('N')][1]:=3; + CodeTable[Ord('N')][2]:=0; + CodeTable[Ord('N')][3]:=1; + CodeTable[Ord('N')][4]:=0; + CodeTable[Ord('N')][5]:=2; + CodeTable[Ord('N')][6]:=9; + + CodeTable[Ord('O')][1]:=3; + CodeTable[Ord('O')][2]:=0; + CodeTable[Ord('O')][3]:=3; + CodeTable[Ord('O')][4]:=0; + CodeTable[Ord('O')][5]:=3; + CodeTable[Ord('O')][6]:=2; + CodeTable[Ord('O')][7]:=9; + + CodeTable[Ord('P')][1]:=1; + CodeTable[Ord('P')][2]:=0; + CodeTable[Ord('P')][3]:=3; + CodeTable[Ord('P')][4]:=0; + CodeTable[Ord('P')][5]:=3; + CodeTable[Ord('P')][6]:=0; + CodeTable[Ord('P')][7]:=1; + CodeTable[Ord('P')][8]:=2; + CodeTable[Ord('P')][9]:=9; + + CodeTable[Ord('Q')][1]:=3; + CodeTable[Ord('Q')][2]:=0; + CodeTable[Ord('Q')][3]:=3; + CodeTable[Ord('Q')][4]:=0; + CodeTable[Ord('Q')][5]:=1; + CodeTable[Ord('Q')][6]:=0; + CodeTable[Ord('Q')][7]:=3; + CodeTable[Ord('Q')][8]:=2; + CodeTable[Ord('Q')][9]:=9; + + CodeTable[Ord('R')][1]:=1; + CodeTable[Ord('R')][2]:=0; + CodeTable[Ord('R')][3]:=3; + CodeTable[Ord('R')][4]:=0; + CodeTable[Ord('R')][5]:=1; + CodeTable[Ord('R')][6]:=2; + CodeTable[Ord('R')][7]:=9; + + CodeTable[Ord('S')][1]:=1; + CodeTable[Ord('S')][2]:=0; + CodeTable[Ord('S')][3]:=1; + CodeTable[Ord('S')][4]:=0; + CodeTable[Ord('S')][5]:=1; + CodeTable[Ord('S')][6]:=2; + CodeTable[Ord('S')][7]:=9; + + CodeTable[Ord('T')][1]:=3; + CodeTable[Ord('T')][2]:=2; + CodeTable[Ord('T')][3]:=9; + + CodeTable[Ord('U')][1]:=1; + CodeTable[Ord('U')][2]:=0; + CodeTable[Ord('U')][3]:=1; + CodeTable[Ord('U')][4]:=0; + CodeTable[Ord('U')][5]:=3; + CodeTable[Ord('U')][6]:=2; + CodeTable[Ord('U')][7]:=9; + + CodeTable[Ord('V')][1]:=1; + CodeTable[Ord('V')][2]:=0; + CodeTable[Ord('V')][3]:=1; + CodeTable[Ord('V')][4]:=0; + CodeTable[Ord('V')][5]:=1; + CodeTable[Ord('V')][6]:=0; + CodeTable[Ord('V')][7]:=3; + CodeTable[Ord('V')][8]:=2; + CodeTable[Ord('V')][9]:=9; + + CodeTable[Ord('W')][1]:=1; + CodeTable[Ord('W')][2]:=0; + CodeTable[Ord('W')][3]:=3; + CodeTable[Ord('W')][4]:=0; + CodeTable[Ord('W')][5]:=3; + CodeTable[Ord('W')][6]:=2; + CodeTable[Ord('W')][7]:=9; + + CodeTable[Ord('X')][1]:=3; + CodeTable[Ord('X')][2]:=0; + CodeTable[Ord('X')][3]:=1; + CodeTable[Ord('X')][4]:=0; + CodeTable[Ord('X')][5]:=1; + CodeTable[Ord('X')][6]:=0; + CodeTable[Ord('X')][7]:=3; + CodeTable[Ord('X')][8]:=2; + CodeTable[Ord('X')][9]:=9; + + CodeTable[Ord('Y')][1]:=3; + CodeTable[Ord('Y')][2]:=0; + CodeTable[Ord('Y')][3]:=1; + CodeTable[Ord('Y')][4]:=0; + CodeTable[Ord('Y')][5]:=3; + CodeTable[Ord('Y')][6]:=0; + CodeTable[Ord('Y')][7]:=3; + CodeTable[Ord('Y')][8]:=2; + CodeTable[Ord('Y')][9]:=9; + + CodeTable[Ord('Z')][1]:=3; + CodeTable[Ord('Z')][2]:=0; + CodeTable[Ord('Z')][3]:=3; + CodeTable[Ord('Z')][4]:=0; + CodeTable[Ord('Z')][5]:=1; + CodeTable[Ord('Z')][6]:=0; + CodeTable[Ord('Z')][7]:=1; + CodeTable[Ord('Z')][8]:=2; + CodeTable[Ord('Z')][9]:=9; + + CodeTable[Ord(' ')][1]:=0; + //CodeTable[Ord(' ')][2]:=$22; + CodeTable[Ord(' ')][2]:=2; + CodeTable[Ord(' ')][3]:=9; + + CodeTable[Ord('_')][1]:=0; + CodeTable[Ord('_')][2]:=9; + + CodeTable[Ord('1')][1]:=1; + CodeTable[Ord('1')][2]:=0; + CodeTable[Ord('1')][3]:=3; + CodeTable[Ord('1')][4]:=0; + CodeTable[Ord('1')][5]:=3; + CodeTable[Ord('1')][6]:=0; + CodeTable[Ord('1')][7]:=3; + CodeTable[Ord('1')][8]:=0; + CodeTable[Ord('1')][9]:=3; + CodeTable[Ord('1')][10]:=2; + CodeTable[Ord('1')][11]:=9; + + CodeTable[Ord('2')][1]:=1; + CodeTable[Ord('2')][2]:=0; + CodeTable[Ord('2')][3]:=1; + CodeTable[Ord('2')][4]:=0; + CodeTable[Ord('2')][5]:=3; + CodeTable[Ord('2')][6]:=0; + CodeTable[Ord('2')][7]:=3; + CodeTable[Ord('2')][8]:=0; + CodeTable[Ord('2')][9]:=3; + CodeTable[Ord('2')][10]:=2; + CodeTable[Ord('2')][11]:=9; + + CodeTable[Ord('3')][1]:=1; + CodeTable[Ord('3')][2]:=0; + CodeTable[Ord('3')][3]:=1; + CodeTable[Ord('3')][4]:=0; + CodeTable[Ord('3')][5]:=1; + CodeTable[Ord('3')][6]:=0; + CodeTable[Ord('3')][7]:=3; + CodeTable[Ord('3')][8]:=0; + CodeTable[Ord('3')][9]:=3; + CodeTable[Ord('3')][10]:=2; + CodeTable[Ord('3')][11]:=9; + + CodeTable[Ord('4')][1]:=1; + CodeTable[Ord('4')][2]:=0; + CodeTable[Ord('4')][3]:=1; + CodeTable[Ord('4')][4]:=0; + CodeTable[Ord('4')][5]:=1; + CodeTable[Ord('4')][6]:=0; + CodeTable[Ord('4')][7]:=1; + CodeTable[Ord('4')][8]:=0; + CodeTable[Ord('4')][9]:=3; + CodeTable[Ord('4')][10]:=2; + CodeTable[Ord('4')][11]:=9; + + CodeTable[Ord('5')][1]:=1; + CodeTable[Ord('5')][2]:=0; + CodeTable[Ord('5')][3]:=1; + CodeTable[Ord('5')][4]:=0; + CodeTable[Ord('5')][5]:=1; + CodeTable[Ord('5')][6]:=0; + CodeTable[Ord('5')][7]:=1; + CodeTable[Ord('5')][8]:=0; + CodeTable[Ord('5')][9]:=1; + CodeTable[Ord('5')][10]:=2; + CodeTable[Ord('5')][11]:=9; + + CodeTable[Ord('6')][1]:=3; + CodeTable[Ord('6')][2]:=0; + CodeTable[Ord('6')][3]:=1; + CodeTable[Ord('6')][4]:=0; + CodeTable[Ord('6')][5]:=1; + CodeTable[Ord('6')][6]:=0; + CodeTable[Ord('6')][7]:=1; + CodeTable[Ord('6')][8]:=0; + CodeTable[Ord('6')][9]:=1; + CodeTable[Ord('6')][10]:=2; + CodeTable[Ord('6')][11]:=9; + + CodeTable[Ord('7')][1]:=3; + CodeTable[Ord('7')][2]:=0; + CodeTable[Ord('7')][3]:=3; + CodeTable[Ord('7')][4]:=0; + CodeTable[Ord('7')][5]:=1; + CodeTable[Ord('7')][6]:=0; + CodeTable[Ord('7')][7]:=1; + CodeTable[Ord('7')][8]:=0; + CodeTable[Ord('7')][9]:=1; + CodeTable[Ord('7')][10]:=2; + CodeTable[Ord('7')][11]:=9; + + CodeTable[Ord('8')][1]:=3; + CodeTable[Ord('8')][2]:=0; + CodeTable[Ord('8')][3]:=3; + CodeTable[Ord('8')][4]:=0; + CodeTable[Ord('8')][5]:=3; + CodeTable[Ord('8')][6]:=0; + CodeTable[Ord('8')][7]:=1; + CodeTable[Ord('8')][8]:=0; + CodeTable[Ord('8')][9]:=1; + CodeTable[Ord('8')][10]:=2; + CodeTable[Ord('8')][11]:=9; + + CodeTable[Ord('9')][1]:=3; + CodeTable[Ord('9')][2]:=0; + CodeTable[Ord('9')][3]:=3; + CodeTable[Ord('9')][4]:=0; + CodeTable[Ord('9')][5]:=3; + CodeTable[Ord('9')][6]:=0; + CodeTable[Ord('9')][7]:=3; + CodeTable[Ord('9')][8]:=0; + CodeTable[Ord('9')][9]:=1; + CodeTable[Ord('9')][10]:=2; + CodeTable[Ord('9')][11]:=9; + + CodeTable[Ord('0')][1]:=3; + CodeTable[Ord('0')][2]:=0; + CodeTable[Ord('0')][3]:=3; + CodeTable[Ord('0')][4]:=0; + CodeTable[Ord('0')][5]:=3; + CodeTable[Ord('0')][6]:=0; + CodeTable[Ord('0')][7]:=3; + CodeTable[Ord('0')][8]:=0; + CodeTable[Ord('0')][9]:=3; + CodeTable[Ord('0')][10]:=2; + CodeTable[Ord('0')][11]:=9; + + CodeTable[Ord('-')][1]:=3; + CodeTable[Ord('-')][2]:=0; + CodeTable[Ord('-')][3]:=1; + CodeTable[Ord('-')][4]:=0; + CodeTable[Ord('-')][5]:=1; + CodeTable[Ord('-')][6]:=0; + CodeTable[Ord('-')][7]:=1; + CodeTable[Ord('-')][8]:=0; + CodeTable[Ord('-')][9]:=3; + CodeTable[Ord('-')][10]:=2; + CodeTable[Ord('-')][11]:=9; + + CodeTable[Ord('=')][1]:=3; + CodeTable[Ord('=')][2]:=0; + CodeTable[Ord('=')][3]:=1; + CodeTable[Ord('=')][4]:=0; + CodeTable[Ord('=')][5]:=1; + CodeTable[Ord('=')][6]:=0; + CodeTable[Ord('=')][7]:=1; + CodeTable[Ord('=')][8]:=0; + CodeTable[Ord('=')][9]:=3; + CodeTable[Ord('=')][10]:=2; + CodeTable[Ord('=')][11]:=9; + + CodeTable[Ord('/')][1]:=3; + CodeTable[Ord('/')][2]:=0; + CodeTable[Ord('/')][3]:=1; + CodeTable[Ord('/')][4]:=0; + CodeTable[Ord('/')][5]:=1; + CodeTable[Ord('/')][6]:=0; + CodeTable[Ord('/')][7]:=3; + CodeTable[Ord('/')][8]:=0; + CodeTable[Ord('/')][9]:=1; + CodeTable[Ord('/')][10]:=2; + CodeTable[Ord('/')][11]:=9; + + CodeTable[Ord('a')][1]:=1; + CodeTable[Ord('a')][2]:=0; + CodeTable[Ord('a')][3]:=3; + CodeTable[Ord('a')][4]:=0; + CodeTable[Ord('a')][5]:=1; + CodeTable[Ord('a')][6]:=0; + CodeTable[Ord('a')][7]:=3; + CodeTable[Ord('a')][8]:=0; + CodeTable[Ord('a')][9]:=1; + CodeTable[Ord('a')][10]:=2; + CodeTable[Ord('a')][11]:=9; + + CodeTable[Ord('b')][1]:=3; + CodeTable[Ord('b')][2]:=0; + CodeTable[Ord('b')][3]:=1; + CodeTable[Ord('b')][4]:=0; + CodeTable[Ord('b')][5]:=1; + CodeTable[Ord('b')][6]:=0; + CodeTable[Ord('b')][7]:=1; + CodeTable[Ord('b')][8]:=0; + CodeTable[Ord('b')][9]:=3; + CodeTable[Ord('b')][10]:=0; + CodeTable[Ord('b')][11]:=1; + CodeTable[Ord('b')][12]:=0; + CodeTable[Ord('b')][13]:=3; + CodeTable[Ord('b')][14]:=2; + CodeTable[Ord('b')][15]:=9; + + CodeTable[Ord('s')][1]:=1; + CodeTable[Ord('s')][2]:=0; + CodeTable[Ord('s')][3]:=1; + CodeTable[Ord('s')][4]:=0; + CodeTable[Ord('s')][5]:=1; + CodeTable[Ord('s')][6]:=0; + CodeTable[Ord('s')][7]:=3; + CodeTable[Ord('s')][8]:=0; + CodeTable[Ord('s')][9]:=1; + CodeTable[Ord('s')][10]:=0; + CodeTable[Ord('s')][11]:=3; + CodeTable[Ord('s')][12]:=2; + CodeTable[Ord('s')][13]:=9; + + CodeTable[Ord('k')][1]:=3; + CodeTable[Ord('k')][2]:=0; + CodeTable[Ord('k')][3]:=1; + CodeTable[Ord('k')][4]:=0; + CodeTable[Ord('k')][5]:=3; + CodeTable[Ord('k')][6]:=0; + CodeTable[Ord('k')][7]:=3; + CodeTable[Ord('k')][8]:=0; + CodeTable[Ord('k')][9]:=1; + CodeTable[Ord('k')][10]:=2; + CodeTable[Ord('k')][11]:=9; + + CodeTable[Ord('p')][1]:=1; + CodeTable[Ord('p')][2]:=0; + CodeTable[Ord('p')][3]:=9; + + CodeTable[Ord('q')][1]:=3; + CodeTable[Ord('q')][2]:=0; + CodeTable[Ord('q')][3]:=9; + + CodeTable[Ord('?')][1]:=1; + CodeTable[Ord('?')][2]:=0; + CodeTable[Ord('?')][3]:=1; + CodeTable[Ord('?')][4]:=0; + CodeTable[Ord('?')][5]:=3; + CodeTable[Ord('?')][6]:=0; + CodeTable[Ord('?')][7]:=3; + CodeTable[Ord('?')][8]:=0; + CodeTable[Ord('?')][9]:=1; + CodeTable[Ord('?')][10]:=0; + CodeTable[Ord('?')][11]:=1; + CodeTable[Ord('?')][12]:=2; + CodeTable[Ord('?')][13]:=9; + + CodeTable[Ord('~')][1]:=3; + CodeTable[Ord('~')][2]:=0; + CodeTable[Ord('~')][3]:=1; + CodeTable[Ord('~')][4]:=0; + CodeTable[Ord('~')][5]:=1; + CodeTable[Ord('~')][6]:=0; + CodeTable[Ord('~')][7]:=1; + CodeTable[Ord('~')][8]:=0; + CodeTable[Ord('~')][9]:=3; + CodeTable[Ord('~')][10]:=0; + CodeTable[Ord('~')][11]:=1; + CodeTable[Ord('~')][12]:=0; + CodeTable[Ord('~')][13]:=3; + CodeTable[Ord('~')][14]:=2; + CodeTable[Ord('~')][15]:=9; + + CodeTable[Ord('@')][1]:=$DD; + CodeTable[Ord('@')][2]:=$CC; + + CodeTable[Ord('|')][1]:=$D1; + CodeTable[Ord('|')][2]:=$C1; + + CodeTable[Ord(']')][1]:=4; + CodeTable[Ord(']')][2]:=5; + CodeTable[Ord(']')][3]:=9; + + CodeTable[Ord('<')][1]:=$B0; + CodeTable[Ord('<')][2]:=$B1; + CodeTable[Ord('<')][3]:=$B2; + CodeTable[Ord('<')][4]:=$DD; + CodeTable[Ord('<')][5]:=$C1; + + CodeTable[Ord('#')][1]:=$BB; + + CodeTable[Ord('*')][1]:=9; {skips to the next char} + CodeTable[Ord(':')][1]:=9; {skips to the next char; callsign 1st char} + + CodeTable[Ord('^')][1]:=$99; {pause} + CodeTable[Ord('^')][2]:=9; + + CodeTable[Ord('(')][1]:=$10; {PTT on} + CodeTable[Ord('(')][2]:=$55; {set PTT delay} + CodeTable[Ord('(')][3]:=9; + + CodeTable[Ord(')')][1]:=$1F; {PTT off} + CodeTable[Ord(')')][2]:=9; + + CodeTable[_inccw][1] := $41; {IncWPM} + CodeTable[_inccw][2] := 9; + + CodeTable[ord('u')][1] := $41; {IncWPM} + CodeTable[ord('u')][2] := 9; + + CodeTable[_deccw][1] := $42; {DecWPM} + CodeTable[_deccw][2] := 9; + + for n:=1 to codemax do + CodeTable[Ord('%')][n]:=$EE; + + for n:=1 to codemax do + CodeTable[Ord('{')][n]:=$14; + +end; + +function CloseBGK : word; +var R : UINT; +begin + ControlPTT(False); + if not(Initialized) then exit; + R:=timeKillEvent(TimerID); + + if Initialized then + timeEndPeriod(1); + + {R:=timeKillEvent(PaddleTimerID);} + R := 0; + NoSound; + if R = TIMERR_NOERROR + then R := 121 + else + if R = MMSYSERR_INVALPARAM + then R := 999 + else + R := 7777; + result := R; +end; + +function GetWPM : byte; +begin + GetWPM := BGKWPM; +end; + +procedure PauseCW; +begin + SendOK := False; + NoSound; + {SetPort(PRTport, GetPort(PRTport) and $FE);} // 1.11 + SetPort(PRTport, 0); + if PTTEnabled then + ControlPTT(False); +end; + +procedure ResumeCW; +begin + if PTTEnabled then + begin + ControlPTT(True); + sss := _pttbefore; + end; + SendOK := True; +end; + +procedure IncWPM; +begin + if BGKWPM < MAXWPM then + SetCWSpeed(BGKWPM+1); +end; + +procedure DecWPM; +begin + if BGKWPM > MINWPM then + SetCWSpeed(BGKWPM-1); +end; + +procedure SetWeight(W : word); +begin + if W in [0..100] then + BGKWeight := W; + SetCWSpeed(BGKWPM); +end; + +procedure SetSideTone(B : boolean); +begin + BGKSideTone := B; +end; + +procedure SetCWPort(i : integer); +var p : word; +begin + if Machine = NEC98 then + begin + PRTport := $40; + {PaddlePort := $42; + paddlemask := $A0;} + CWPortStr := 'LPT1'; + end + else + begin + p := MemW($40,$06+2*i); + inc(p); {CT} + PRTport := p; + {PaddlePort := p; + paddlemask := $30;} + CWPortStr := 'LPT'+IntToStr(i); + end; +end; + +function GetCWPort : ShortString; +begin + Result := CWPortStr; +end; + +procedure SetMachine(M : word); +begin + Machine := M; + if Machine = NEC98 then + begin + SetCWPort(1); + {PRTport := $40; + paddleport := $42; + paddlemask := $A0;} + end + else + begin + if CWportStr = 'LPT1' then + SetCWport(1) + else + SetCWport(2); + {paddlemask := $30; } + end; +end; + +{function GetMachine : word; +begin + Result := Machine; +end; } + +function GetVersion : real; +begin + GetVersion := Version; +end; + +procedure ClrBuffer; +var m : integer; +begin + {SendOK:=false;} + {StringBuffer := ''; } + for m := 0 to 2 do + CWSendBuf[m,1]:=$FF; + cwstrptr:=0; + callsignptr := 0; + mousetail:=1; + tailcwstrptr := 1; + paddle_waiting:=true; + NoSound; + SendOK := True; + CQrep := 0; + if PTTEnabled then + ControlPTT(False); +end; + +procedure CancelLastChar; +var m : byte; +begin + {m := Length(StringBuffer); + Delete(StringBuffer,m,1); } + + if ((tailcwstrptr-1)*codemax+1) > (cwstrptr) then + begin + dec(tailcwstrptr, 1); + for m:=1 to codemax do + CWSendBuf[SelectedBuf, codemax*(tailcwstrptr-1)+m]:=$FF; + end; +end; + +Procedure SetCWSendBufChar2(C : char; CharPos : word); +var m : byte; +begin + for m:=1 to codemax do + CWSendBuf[0, codemax*(CharPos-1)+m]:=CodeTable[Ord(C)][m]; +end; + +procedure SetCallSign(S : ShortString); +var ss : string[12]; + i : word; +begin + if callsignptr = 0 then exit; + ss := S + '************'; + while pos('.',ss) > 0 do + begin + ss[pos('.',ss)] := '?'; + end; + ss[12] := '^'; {pause} + for i := 1 to 12 do + SetCWSendBufChar2(ss[i], callsignptr+i-1); +end; + +function CallSignSent : boolean; +begin + Result := false; + if callsignptr > 0 then + if CWSendBuf[0, cwstrptr-1] = $99 then + //if cwstrptr > (callsignptr + 10)*codemax then + begin + Result := true; + callsignptr := 0; + end; +end; + +function IsPlaying : boolean; +begin + if (cwstrptr > 1) and SendOK then + Result := True + else + Result := False; +end; + +procedure SetRandCQStr(Str1, Str2 : shortstring); +begin + if Str1 <> '' then + begin + RandCQStr[1] := Str1; + SetCWSendBuf(1, Str1+'@'); + end; + if Str2 <> '' then + begin + RandCQStr[2] := Str2; + SetCWSendBuf(2, Str2+'@'); + end; +end; + +procedure SetPTTPortDirect(p : word); +begin + PTTport := p; + _pttout := $08; {parallel} +end; + +procedure SetCWPortDirect(p : word); +begin + PRTport := p; +(* + if p = $40 then + PTTport := $40 {pc9800} + else + PTTport := p - 2; + _pttout := $08; {parallel} +*) + // PaddlePort := p - 1; { for ibm lpt only. while debugging} +end; + +procedure SetPaddlePortDirect(p : word); +begin + PaddlePort := p; +end; + +Procedure m_set(b : word); +begin + if PTTEnabled and (mousetail = 1) then + begin + ControlPTT(True); + CWSendBuf[0,1] := $55; {set PTT delay} + inc(mousetail); + end; + + if (mousetail+2)>(charmax*codemax) then mousetail:=1; + CWSendBuf[0,mousetail]:=b; + CWSendBuf[0,mousetail+1]:=0; + CWSendBuf[0,mousetail+2]:=$AA; + inc(mousetail,2); + p_char_count:=(_dot*3) div 2; + SendOK:=true; + {inLoop:=false; } // not sure what it was used for} + paddle_waiting:=false; +end; + + +Procedure PaddleProcess; +begin +if paddleport>0 then begin + case mousetail-cwstrptr of + 0 : + case ($30 and GetPort(paddleport)) of + $00 : { both } + case CWSendBuf[0,mousetail-2] of + 1 : m_set(3); + 3 : m_set(1); + end; + $10 : {dit} + if paddle_waiting then m_set(mouX); + $20 : {dah} + if paddle_waiting then m_set(mouY); + end; + 1 : + case ($30 and GetPort(paddleport)) of + $00 : + case CWSendBuf[0,cwstrptr-1] of + 1 : m_set(3); + 3 : m_set(1); + end; + $10 : if CWSendBuf[0,cwstrptr-1] = mouY then + m_set(mouX); + $20 : if CWSendBuf[0,cwstrptr-1] = mouX then + m_set(mouY); + end; + else + if (($30 and GetPort(paddleport))=$20) or (($30 and GetPort(paddleport))=$10) + then + if abs(mousetail-cwstrptr) > 5 then + begin + SelectedBuf:=0; + cwstrptr:=1; + mousetail:=1; + sss:=1; + paddle_waiting:=true; + m_set(0); + end; + end; +end +else begin + (* Mouse buttons as a paddle + case mousetail-cwstrptr of + 0 : + case mousebutton of + m_both : + case CWSendBuf[0,mousetail-2] of + 1 : m_set(3); + 3 : m_set(1); + end; + m_left : if paddle_waiting then m_set(mouX); + m_right: if paddle_waiting then m_set(mouY); + end; + 1 : + case mousebutton of + m_both : + case CWSendBuf[0,cwstrptr-1] of + 1 : m_set(3); + 3 : m_set(1); + end; + m_left : if CWSendBuf[0,cwstrptr-1] = mouY then m_set(mouX); + m_right: if CWSendBuf[0,cwstrptr-1] = mouX then m_set(mouY); + end; + else + if (mousebutton=1) or (mousebutton=2) then + if abs(mousetail-cwstrptr) > 5 then + begin + buf:=0; + cwstrptr:=1; + mousetail:=1; + sss:=1; + paddle_waiting:=true; + m_set(0); + end; + end;*) +end; +end; + +procedure ReversePaddle(boo : boolean); +begin + if boo then + begin + mouX := 3; + mouY := 1; + end + else + begin + mouX := 1; + mouY := 3; + end; +end; + +procedure SetSpaceFactor(R : integer); +begin + if R > 0 then + SpaceFactor := R; +end; + +procedure SetEISpaceFactor(R : integer); +begin + if R > 0 then + EISpaceFactor := R; +end; + +function LeftInBuffer : Word; +begin + Result := 0; + if tailcwstrptr = 1 then + exit; + //Result := ((tailcwstrptr*codemax) - cwstrptr + 1) div codemax - 1; + Result := ((tailcwstrptr*codemax) - cwstrptr + 1) div codemax; +end; + +procedure TuneOn; +begin + ClrBuffer; + SendOK := False; + ControlPTT(True); + //SetPort(PRTport, _cwon); + CW_ON; + if BGKsidetone then + sound(Hz); +end; + +procedure SetCode(C : Char; Code : string); +const dot1 = ''; dot2 = '.'; dot3 = '*'; + dash1 = '-'; dash2 = '_'; + Dots : set of char = [dot1, dot2, dot3]; + Dashes : set of char = [dash1, dash2]; +var i : integer; +begin + for i := 1 to length(Code) do + begin + if 2*i > codemax then + exit; + if Code[i] in Dots then + CodeTable[ord(C)][2*i-1] := 1; + if Code[i] in Dashes then + CodeTable[ord(C)][2*i-1] := 3; + CodeTable[ord(C)][2*i] := 0; + end; + CodeTable[ord(C)][2*length(Code)] := 2; + CodeTable[ord(C)][2*length(Code)+1] := 9; +end; + + + +begin +end. diff --git a/src/CONSOLE.PAS b/src/CONSOLE.PAS new file mode 100644 index 00000000..b73af821 --- /dev/null +++ b/src/CONSOLE.PAS @@ -0,0 +1,1891 @@ +unit Console; +{$A+,B-,F-,Q-,R-,S-,W-,X+} + +{ Text Console component + Version 2.0 for 16 bit and 32 bit Delphi. + + Copyright (c) 1995,96 by Danny Thorpe (dthorpe@subliminal.com) + + You are hereby granted a royalty-free unlimited distribution + license to compile the components in this source file into + your applications. + + This source file may be freely distributed through online networks + so long as no modifications are made to this file and no fee is + charged to obtain this file, other than normal online connection + charges. + + These components may NOT be distributed as source code or + compiled DCU on diskette, CDRom, or as part of a + product without prior written consent of the author. + + All rights not explicitly granted here are reserved by the author. +} + +interface + +uses WinTypes, WinProcs, Messages, Classes, Controls, + Forms, Graphics, SysUtils; + + +{ TConsole + + TConsole implements a WinCRT-like control for routing text + file I/O (readlns and writelns) to a scrollable window. A + text cursor can be positioned using X,Y text coordinates. + TConsole is not intended to be a text editor, merely a TTY + text output device. TConsole does not store its text + buffers when it is streamed. Max display text in 16 bit + applications is 64k (rows * columns <= 64k); in 32 bit + applications, the only capacity limit is system memory. + You can set the TConsole font name, style or other + properties, but only fixed-pitch fonts should be used. + + TConsole can be extended to support text color attributes + and multiple fonts, and can support multiple terminal + emulation command decoders (like ANSI-BBS or DEC VT-100). + + TConsole supports keyboard input via the Pascal standard + input functions ReadKey, Keypressed, and Readln. Note that + the modal nature of Readln (execution doesn't return until + EOL is received) is problematic. Only one outstanding + Console Readln operation is supported for the entire + application. Calling readln while another readln is + pending (eg Readln on a button click) will raise an + exception. + + TConsole provides a performance option called toLazyWrite. + With this option turned off, each write operation to the + Console is immediately displayed on the screen. With + toLazyWrite turned on, screen updating is delayed slightly + so that multiple text changes can be displayed in one Paint + operation. Despite the 'lazy' name, this consolidation + results in dramatically better display performance - a + factor of 10 to 100 times faster than writing each little + piece of text immediately. toLazyWrite is enabled by default. + + The public ScrollTo and TrackCursor methods don't use + toLazyWrite, nor do the ReadKey or ReadBuf routines. When + these routines modify the display or text buffer, the + Console is updated immediately. + + The coFixedPitchOnly option, True by default, determines whether + the console component raises an exception when a font which is not + marked as fixed pitch is assigned to the component. Many off-brand + truetype fonts which have a uniform character width are + incorrectly marked as proportional fonts. By setting + coFixedPitchOnly to false, you can now use those fonts in the + console components. Using proportional fonts in a console + component is not advised; it's very ugly. + +TColorConsole + + TColorConsole implements support for multiple text color + attributes. The Console's font properties determine the + text color, background color, font, style, etc of the + display text. Text foreground color is Console.Font.Color; + text background is Console.Font.BkColor. Set the Console's + font properties, then writeln to the Console's text file + and that text will be displayed with those attributes. + + In 16 bit applications, TColorConsole has the following + capacity limits: Max display text is 32k. (rows * cols <= 32k). + Max unique text attribute sets: 16k. (unique = font+color+bkcolor) + + In 32 bit applications, the only limit is system memory. + Memory consumption is roughly 5 bytes per display text character + cell: an 80 x 25 color console will use 80 x 25 = 2000 bytes + for the text buffer plus 80 x 25 x 4 = 8000 bytes for the + cell attribute buffer. Each unique text attribute set uses + 36 bytes of memory. + + Text attribute sets are maintained in a pool. Each attr set + is released when the last char in the display buffer using + that set is overwritten with different attributes. + + Multiple fonts are supported, but the cell height and width + of the fonts must be the same. That is, you can output text + in Courier New 10pt, Courier New 10pt Bold, and Lucida Sans + Monospace 10pt Italic all on the same screen. If the + Console's font size is changed, that size change is applied + to all fonts used by the Console control and the control is + repainted. + + Fonts of the same height often have different widths. When + a wider font is selected into the Console control, the + character cell dimensions for all the text is enlarged to + accommodate the wider font. Characters of narrower fonts + will be spaced further apart to maintain column alignment. + This rarely looks appealing, so take it easy on the fonts. + TrueType fonts (like Courier New) tend to work better + than bitmap fonts (like Courier). + + +TConsole's output routines + + Most of the time, you'll use a text file to write data to + the Console window. To make the component intercept all output + written to stdout (ie anything that calls write or writeln + without a file handle), include the coStdOutput flag in the + component's Options property. Only one component in the + application can intercept stdout. coStdOutput is disabled by default. + + For more specialized work, such as extending these objects or + adding terminal emulation processor methods, you can use some + of TConsole's specialized output routines. + +WriteChar + Calls WriteCodedBuf to output one character using the + current font/color attributes. + +WriteString + Calls WriteCodedBuf to output the characters in the string + using the current font/color attributes. + +WriteCodedBuf + Passes control to the ProcessControlCodes method pointer if + it is assigned. If the pointer is not assigned, WriteBuf is + called instead. WriteCodedBuf is called by the internal text + file device driver (Write and Writeln), WriteChar, and + WriteString. + + Your ProcessControlCodes routine should parse the buffer to + find and execute complex display formatting control codes + and command sequences embedded in the data stream (such + as ANSI terminal codes). + + ProcessControlCodes is an event so that it can be reassigned + dynamically at runtime - for example, to switch from ANSI + emulation to Wyse terminal emulation. Control code + processing methods have full responsibility for displaying + the actual text - they should parse their control codes, + set the cursor position or font/color attributes as + needed, and then call WriteChar, WriteString, or WriteFill + as necessary to display the actual text (without codes). + + If you determine that a text buffer contains no special + codes for your ProcessControlCodes event to handle, you + can pass the text buffer to DefaultProcessControlCodes + to perform the normal WriteBuf text processing on the buffer. + This will save you some work in your event handler. + +WriteFill + Replicates a single character (or space) N times starting + from text coordinate X,Y and flowing down the page. + All the replicated chars are displayed with the currently + selected font and color attributes. The copy count can be + any length up to (rows * cols). TColorConsole overrides + this method to add additional color support. + +WriteBuf + This is an internal (protected) mid-level method to process + simple text file formatting codes. It scans the data stream + for special characters (Carriage return, Linefeed, + Backspace, Bell), wraps text at the right margin, and calls + WriteBlock or WriteFill for actual output. + +WriteBlock + This is an internal (protected) low-level method to output + a string of characters. WriteBlock assumes the string + parameter has been stripped of all special characters and + is guaranteed to contain no more than one line of text + (length <= Cols - Cursor.X). All the characters in the + string are displayed with the currently selected font + and color attributes. TColorConsole overrides this method + to add additional color support. +} + +const + CM_TrackCursor = wm_User + 100; + CM_ScrollBy = wm_User + 101; + +type + EInvalidFont = class(Exception); + + TCMScrollBy = record + Msg: Cardinal; + dx : Integer; + dy : Longint; + end; + + TConsole = class; { forward declaration } + + TFixedFont = class(TFont) + private + FBkColor: TColor; + procedure SetBkColor(NewColor: TColor); + public + constructor Create; + procedure Assign(Source: TPersistent); override; + published + property BkColor: TColor read FBkColor write SetBkColor default clWindow; + end; + + TConsoleOption = (coAutoTracking, coCheckEOF, coCheckBreak, + coFulltimeCursor, coLazyWrite, coStdInput, coStdOutput, coFixedPitchOnly); + TConsoleOptions = set of TConsoleOption; + + { CR/LF translation. + CRLF = no translation + CR = on CR add LF + LF = on LF add CR } + TConsoleLineBreak = (CRLF, CR, LF); + + TProcessControlCodes = procedure (Sender: TConsole; + Buffer: PChar; Count: Cardinal) of object; + + TConsole = class(TCustomControl) + private + FOptions: TConsoleOptions; + FFocused: Boolean; + FFont: TFixedFont; + FCols: Integer; { Screen buffer dimensions } + FRows: Integer; + FProcessControlCodes: TProcessControlCodes; + FLineBreak: TConsoleLineBreak; { CR/LF/CRLF translation } + procedure InternalClrScr; + procedure SetOptions(NewOptions: TConsoleOptions); + procedure SetCols(N: Integer); + procedure SetRows(N: Integer); + procedure SetFont(F: TFixedFont); + procedure DoScroll(Which, Action, Thumb: Integer); + procedure CMTrackCursor(var M); message CM_TrackCursor; + procedure CMScrollBy(var M: TCMScrollBy); message CM_ScrollBy; + procedure WMCreate(var M); message wm_Create; + procedure WMSize(var M: TWMSize); message wm_Size; + procedure WMHScroll(var M: TWMHScroll); message wm_HScroll; + procedure WMVScroll(var M: TWMVScroll); message wm_VScroll; + procedure WMSetFocus(var M: TWMSetFocus); message wm_SetFocus; + procedure WMKillFocus(var M: TWMKillFocus); message wm_KillFocus; + procedure WMGetDlgCode(var M: TWMGetDlgCode); message wm_GetDlgCode; + procedure WMEraseBkgnd(var M: TWMEraseBkgnd); message wm_EraseBkgnd; + protected + FReading: Boolean; { Reading from CRT window? } + FOldFont: TFixedFont; + FFirstLine: Integer; { First visible line in circular buffer } + FKeyCount: Integer; { Count of keys in KeyBuffer } + FBuffer: PChar; { Screen buffer pointer } + FRange: TPoint; { Scroll bar ranges } + FOrigin: TPoint; { Client/scroll origin } + FClientSize: TPoint; { Number of visible whole cells } + FCharSize: TPoint; { Character cell size } + FCharAscent: Integer; { Baseline location (for caret) } + FOverhang: Integer; { Extra space needed for chars } + FKeyBuffer: array[0..63] of Char; { Keyboard type-ahead buffer } + Cursor: TPoint; { Cursor location } + procedure CreateParams(var P: TCreateParams); override; + procedure FontChanged(Sender: TObject); + procedure ResizeBuffer; dynamic; + procedure SetName(const NewName: TComponentName); override; + procedure SetMetrics(const Metrics: TTextMetric); virtual; + procedure RecalibrateFont; + procedure RecalcSizeAndRange; + function ScreenPtr(X, Y: Integer): PChar; + procedure ShowText(L, R: Integer); + procedure WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); virtual; + procedure WriteBuf(Buffer: PChar; Count: Cardinal); + procedure SetScrollbars; + procedure Paint; override; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure KeyPress(var Key: Char); override; + procedure DoCtrlBreak; dynamic; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); override; + procedure LazyTrackCursor; + procedure LazyScrollBy(dx, dy: Integer); + procedure Loaded; override; + public + constructor Create(AnOwner: TComponent); override; + destructor Destroy; override; + procedure DefaultProcessControlCodes(Buffer: PChar; Count: Cardinal); + procedure WriteCodedBuf(Buffer: PChar; Count: Cardinal); + procedure WriteChar(Ch: Char); + procedure WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); virtual; + procedure WriteString(const S: String); + function KeyPressed: Boolean; + function ReadKey: Char; + function ReadBuf(Buffer: PChar; Count: Cardinal): Cardinal; + procedure ClrScr; + procedure ClrEol; + procedure CursorTo(X, Y: Integer); + procedure ScrollTo(X, Y: Integer); + procedure TrackCursor; + procedure AssignCrt(var F: Text); dynamic; + procedure ShowCursor; virtual; + procedure HideCursor; + published + property Align; + property ParentColor; + property Color; + property Font: TFixedFont read FFont write SetFont; + property Options: TConsoleOptions read FOptions write SetOptions + default [coAutoTracking, coCheckBreak, coLazyWrite{, coFixedPitchOnly}]; + property Cols: Integer read FCols write SetCols default 80; + property Rows: Integer read FRows write SetRows default 25; + property LineBreak: TConsoleLineBreak read FLineBreak write FLineBreak; + property ProcessControlCodes: TProcessControlCodes + read FProcessControlCodes write FProcessControlCodes; + end; + + +type + PIntArray = ^TIntArray; + TIntArray = array [0..0] of Integer; + +type + TAttr = class(TFixedFont) + protected + RefCount: Cardinal; + Overhang: ShortInt; + Underhang: ShortInt; + public + constructor Create(F: TFixedFont); + end; + + TAttrManager = class(TPersistent) + private + FList: TList; + FCache: TAttr; + FCacheIndex: Integer; + FFreeList: Integer; + function GetCount: Integer; + protected + function GetAttr(Index: Integer): TAttr; + procedure SetAttr(Index: Integer; NewAttr: TAttr); + function InFreeList(P: Pointer): Boolean; + function FirstFreeIndex: Integer; + function NextFreeIndex(P: Pointer): Integer; + procedure SetFree(Index: Integer); + function AllocIndex: Integer; + public + constructor Create; + destructor Destroy; override; + function Allocate(F: TFixedFont): Integer; + procedure Clear; + procedure Reference(Index: Integer; Delta: Integer); + property Attr[Index: Integer]: TAttr read GetAttr write SetAttr; default; + property Count: Integer read GetCount; + end; + + TColorConsole = class(TConsole) + private + FIndexes: PIntArray; + FAttrList: TAttrManager; + FCellWidths: PIntArray; + procedure FillAttr(X,Y: Integer; Count: Cardinal); + protected + function IndexPtr(X,Y: Integer): PInteger; + procedure ResizeBuffer; override; + procedure SetMetrics(const Metrics: TTextMetric); override; + procedure WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); override; + procedure WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); override; + procedure Paint; override; + public + constructor Create(Owner: TComponent); override; + destructor Destroy; override; + end; + +procedure Register; + +procedure Exchange(var X,Y: Pointer); +procedure FillInt(var Buf; Count: Cardinal; Value: Integer); + +implementation + +{ Scroll key definition record } + +type + TScrollKey = record + sKey: Byte; + Ctrl: Boolean; + SBar: Byte; + Action: Byte; + end; + +var + ReadActive: Boolean = False; { Anybody in a Readln? } + +{ Scroll keys table } + +const + ScrollKeyCount = 12; + ScrollKeys: array[1..ScrollKeyCount] of TScrollKey = ( + (sKey: vk_Left; Ctrl: False; SBar: sb_Horz; Action: sb_LineUp), + (sKey: vk_Right; Ctrl: False; SBar: sb_Horz; Action: sb_LineDown), + (sKey: vk_Left; Ctrl: True; SBar: sb_Horz; Action: sb_PageUp), + (sKey: vk_Right; Ctrl: True; SBar: sb_Horz; Action: sb_PageDown), + (sKey: vk_Home; Ctrl: False; SBar: sb_Horz; Action: sb_Top), + (sKey: vk_End; Ctrl: False; SBar: sb_Horz; Action: sb_Bottom), + (sKey: vk_Up; Ctrl: False; SBar: sb_Vert; Action: sb_LineUp), + (sKey: vk_Down; Ctrl: False; SBar: sb_Vert; Action: sb_LineDown), + (sKey: vk_Prior; Ctrl: False; SBar: sb_Vert; Action: sb_PageUp), + (sKey: vk_Next; Ctrl: False; SBar: sb_Vert; Action: sb_PageDown), + (sKey: vk_Home; Ctrl: True; SBar: sb_Vert; Action: sb_Top), + (sKey: vk_End; Ctrl: True; SBar: sb_Vert; Action: sb_Bottom)); + +{ Return the smaller of two integer values } + +function Min(X, Y: Integer): Integer; +begin + if X < Y then Min := X else Min := Y; +end; + +{ Return the larger of two integer values } + +function Max(X, Y: Integer): Integer; +begin + if X > Y then Max := X else Max := Y; +end; + +procedure Exchange(var X,Y: Pointer); +var + Temp: Pointer; +begin + Temp := X; + X := Y; + Y := Temp; +end; + +procedure FillInt(var Buf; Count: Cardinal; Value: Integer); +{$IFDEF WIN32} +{var + X: Cardinal; +begin + for X := 0 to Count-1 do + TIntArray(Buf)[X] := Value; +end; +}register; +asm + PUSH EDI + MOV EDI, EAX + MOV EAX, ECX + MOV ECX, EDX + CLD + REP STOSD + POP EDI +end; +{$ELSE} +assembler; +asm + PUSH DI + LES DI, BUF + MOV CX, COUNT + MOV AX, VALUE + CLD + REP STOSW + POP DI +end; +{$ENDIF} + +constructor TFixedFont.Create; +begin + inherited Create; + Name := 'Courier New'; + FBkColor := clWindow; +end; + +procedure TFixedFont.Assign(Source: TPersistent); +var + Temp: TColor; +begin + Temp := FBkColor; + if Source is TFixedFont then + FBkColor := TFixedFont(Source).BkColor; + try + inherited Assign(Source); { inherited will call Changed } + except + FBkColor := Temp; { Restore original if inherited fails } + raise; + end; +end; + +procedure TFixedFont.SetBkColor(NewColor: TColor); +begin + FBkColor := NewColor; + Changed; +end; + + +constructor TConsole.Create(AnOwner: TComponent); +begin + inherited Create(AnOwner); + Width := 160; + Height := 88; + Options := [coAutoTracking, coCheckBreak, coLazyWrite{, coFixedPitchOnly}]; + ControlStyle := ControlStyle + [csOpaque]; + FRows := 25; + FCols := 80; + ParentColor := False; + Color := clWindow; + FOldFont := TFixedFont.Create; + FOldFont.Handle := GetStockObject(Ansi_Fixed_Font); + FFont := TFixedFont.Create; + FFont.Name := 'Courier'; + FFont.OnChange := FontChanged; + ResizeBuffer; + TabStop := True; + Enabled := True; +end; + +destructor TConsole.Destroy; +begin + Options := Options - [coStdInput, coStdOutput]; { close files } + StrDispose(FBuffer); + FOldFont.Free; + FFont.Free; + inherited Destroy; +end; + +procedure TConsole.Loaded; +begin + inherited Loaded; + ClrScr; +end; + +procedure TConsole.CreateParams(var P: TCreateParams); +begin + inherited CreateParams(P); + P.WindowClass.Style := P.WindowClass.Style and not (cs_HRedraw or cs_VRedraw); +end; + +procedure TConsole.DefaultProcessControlCodes(Buffer: PChar; Count: Cardinal); +begin + WriteBuf(Buffer, Count); +end; + +procedure TConsole.WMCreate(var M); +begin + inherited; + RecalibrateFont; { don't ClrScr, because text may already be in buffer } +end; + +procedure TConsole.ResizeBuffer; +var Temp: PChar; +begin + Temp := StrAlloc(Cols * Rows); + StrDispose(FBuffer); + FBuffer := Temp; + FillChar(FBuffer^,Cols * Rows,' '); +end; + +procedure TConsole.SetCols(N: Integer); +begin + if FCols <> N then + begin + FCols := N; + ResizeBuffer; + end; +end; + +procedure TConsole.SetRows(N: Integer); +begin + if FRows <> N then + begin + FRows := N; + ResizeBuffer; + end; +end; + +procedure TConsole.SetFont(F: TFixedFont); +begin + FFont.Assign(F); +end; + +procedure TConsole.FontChanged(Sender: TObject); +var + DC: HDC; + Save: THandle; + Metrics: TTextMetric; + Temp: String; +begin + if Font.Handle <> FOldFont.Handle then + begin + DC := GetDC(0); + Save := SelectObject(DC, Font.Handle); + GetTextMetrics(DC, Metrics); + SelectObject(DC, Save); + ReleaseDC(0, DC); + if (coFixedPitchOnly in Options) and + not (((Metrics.tmPitchAndFamily and ff_Modern) <> 0) and + ((Metrics.tmPitchAndFamily and $01) = 0)) then + begin + Temp := 'TConsole: ' + Font.Name + ' is not fixed-pitch'; + Font.Name := FOldFont.Name; { Keep other attributes of font } + raise EInvalidFont.Create(Temp); + end; + SetMetrics(Metrics); + end; + FOldFont.Assign(Font); + if csDesigning in ComponentState then + InternalClrScr; +end; + +{ If the character cell is different, accept changes and redraw } +procedure TConsole.SetMetrics(const Metrics: TTextMetric); +begin + with Metrics do + begin + FCharSize.X := tmAveCharWidth; + FCharSize.Y := tmHeight + tmExternalLeading; + FCharAscent := tmAscent; + FOverhang := Max(tmOverhang, tmMaxCharWidth - tmAveCharWidth); + Invalidate; + RecalcSizeAndRange; + end; +end; + +procedure TConsole.RecalcSizeAndRange; +begin + if HandleAllocated then + begin + FClientSize.X := ClientWidth div FCharSize.X; + FClientSize.Y := ClientHeight div FCharSize.Y; + FRange.X := Max(0, Cols - FClientSize.X); + FRange.Y := Max(0, Rows - FClientSize.Y); + ScrollTo(Min(FOrigin.X, FRange.X), Min(FOrigin.Y, FRange.Y)); + SetScrollBars; + end; +end; + +procedure TConsole.SetName(const NewName: TComponentName); +begin + inherited SetName(NewName); + if csDesigning in ComponentState then + ClrScr; +end; + + +{ Return pointer to text location in screen buffer } +{ Always call ScreenPtr to get the next line you want, since the + circular text buffer may wrap around between lines N and N+1. + For the same reason, do not do pointer arithmetic between rows. } + +function TConsole.ScreenPtr(X, Y: Integer): PChar; +begin + Inc(Y, FFirstLine); + if Y >= Rows then Dec(Y, Rows); + Result := @FBuffer[Y * Cols + X]; +end; + +{ Update text on cursor line } + +procedure TConsole.ShowText(L, R: Integer); +var + B: TRect; +begin + if HandleAllocated and (L < R) then + begin + B.Left := (L - FOrigin.X) * FCharSize.X; + B.Top := (Cursor.Y - FOrigin.Y) * FCharSize.Y; + B.Right:= (R - FOrigin.X) * FCharSize.X + FOverhang; + B.Bottom := B.Top + FCharSize.Y; + InvalidateRect(Handle, @B, False); + if not (coLazyWrite in Options) then + Update; + end; +end; + +{ Show caret } + +procedure TConsole.ShowCursor; +begin + if not HandleAllocated then Exit; + CreateCaret(Handle, 0, FCharSize.X, 2); + SetCaretPos((Cursor.X - FOrigin.X) * FCharSize.X, + (Cursor.Y - FOrigin.Y) * FCharSize.Y + FCharAscent); + ShowCaret(Handle); +end; + +{ Hide caret } + +procedure TConsole.HideCursor; +begin + DestroyCaret; +end; + +{ Set cursor position } + +procedure TConsole.CursorTo(X, Y: Integer); +begin + Cursor.X := Max(0, Min(X, Cols - 1)); + Cursor.Y := Max(0, Min(Y, Rows - 1)); + if FFocused and (FReading or (coFullTimeCursor in Options)) then + ShowCursor; +end; + +{ Request asynchronous (lazy) ScrollBy, or update pending request } + +procedure TConsole.LazyScrollBy(dx, dy: Integer); +var + Msg: TMsg; +begin + if (coLazyWrite in Options) and HandleAllocated then + begin + if PeekMessage(Msg, Handle, cm_ScrollBy, + cm_ScrollBy, PM_NoYield or PM_Remove) then + begin + Inc(dx, Msg.WParam); + Inc(dy, Msg.LParam); + end; { Flush accumulated scroll when delta >= half a screen } + if (Abs(dx) >= Min(FClientSize.X, Cols) div 2) or + (Abs(dy) >= Min(FClientSize.Y, Rows) div 2) then + Perform(CM_ScrollBy, dx, dy) + else + if (dx or dy) <> 0 then + PostMessage(Handle, cm_ScrollBy, dx, dy); + end + else + Perform(CM_ScrollBy, dx, dy); +end; + +{ Respond to asynchronous (lazy) ScrollBy request } + +procedure TConsole.CMScrollBy(var M: TCMScrollBy); +begin + ScrollTo(FOrigin.X + M.dx, FOrigin.Y + M.dy); +end; + + +{ Scroll window to given origin } +{ If font has overlapping cells (ie, italic), additional work is done to + remove the residual overlapped pixels from the leftmost column. + Using the clip rect with ScrollWindowEx helps eliminate pixel flicker in + the left column. } +procedure TConsole.ScrollTo(X, Y: Integer); +var + R: TRect; + OldOrigin: TPoint; +begin + X := Max(0, Min(X, FRange.X)); + Y := Max(0, Min(Y, FRange.Y)); + if (X <> FOrigin.X) or (Y <> FOrigin.Y) then + begin + OldOrigin := FOrigin; + FOrigin.X := X; + FOrigin.Y := Y; + if HandleAllocated then + begin + R := ClientRect; + if X > OldOrigin.X then Inc(R.Left, FOverhang); + if Y > OldOrigin.Y then R.Bottom := FClientSize.Y * FCharSize.Y; + ScrollWindowEx(Handle, + (OldOrigin.X - X) * FCharSize.X, + (OldOrigin.Y - Y) * FCharSize.Y, nil, @R, 0, @R, 0); + if Y <> OldOrigin.Y then + begin + SetScrollPos(Handle, sb_Vert, Y, True); + if Y > OldOrigin.Y then + begin + InvalidateRect(Handle, @R, False); + Update; + R.Top := R.Bottom; + R.Bottom := ClientRect.Bottom; + end; + end; + if X <> OldOrigin.X then + begin + SetScrollPos(Handle, sb_Horz, X, True); + if (FOverhang > 0) then + begin + if (X < OldOrigin.X) then { Scroll right - left edge repaint } + begin + { Add overhang to invalidation rect to redraw leftmost char pair } + R.Left := 0; + R.Right := Max(R.Right, (OldOrigin.X - X) * FCharSize.X + FOverhang); + end + else { Scroll left - right edge repaint } + begin + { Redraw leftmost chars to remove prev chars' overhang } + InvalidateRect(Handle, @R, False); + Update; { Update right side, before invalidating left side } + R.Left := 0; + R.Top := 0; + R.Right := FOverhang; + R.Bottom := ClientHeight; + end; + end; + end; + InvalidateRect(Handle, @R, False); + Update; + end; + end; +end; + +{ Request asynchronous (lazy) TrackCursor, if not already pending } + +procedure TConsole.LazyTrackCursor; +var + Msg: TMsg; +begin + if (coLazyWrite in Options) and HandleAllocated then + begin { Only post msg if there is not one already in the queue } + if not PeekMessage(Msg, Handle, cm_TrackCursor, + cm_TrackCursor, PM_NoYield or PM_NoRemove) then + PostMessage(Handle, cm_TrackCursor, 0, 0); + end + else + TrackCursor; +end; + +{ Respond to asynchronous (lazy) TrackCursor request } + +procedure TConsole.CMTrackCursor(var M); +begin + TrackCursor; +end; + +{ Scroll to make cursor visible (synchronous - immediate update)} + +procedure TConsole.TrackCursor; +begin + ScrollTo(Max(Cursor.X - FClientSize.X + 1, Min(FOrigin.X, Cursor.X)), + Max(Cursor.Y - FClientSize.Y + 1, Min(FOrigin.Y, Cursor.Y))); +end; + +{ Update scroll bars } + +procedure TConsole.SetScrollBars; +begin + if not HandleAllocated then Exit; + SetScrollRange(Handle, sb_Horz, 0, Max(1, FRange.X), False); + SetScrollPos(Handle, sb_Horz, FOrigin.X, True); + SetScrollRange(Handle, sb_Vert, 0, Max(1, FRange.Y), False); + SetScrollPos(Handle, sb_Vert, FOrigin.Y, True); +end; + +{ Clear screen } + +procedure TConsole.InternalClrScr; +begin + WriteFill(0,0,' ',Cols * Rows); + FOrigin.X := 0; + FOrigin.Y := 0; + Cursor.X := 0; + Cursor.Y := 0; + if (csDesigning in ComponentState) then + WriteString(Name); + Invalidate; +end; + +procedure TConsole.ClrScr; +begin + InternalClrScr; + RecalibrateFont; +end; + +procedure TConsole.RecalibrateFont; +begin + FCharSize.X := 0; + FCharSize.Y := 0; + FCharAscent := 0; + FOverhang := 0; + FOldFont.Handle := 0; + FOldFont.Size := 0; + FontChanged(FFont); { This will force a repaint and recalibrate } +end; + +{ Clear to end of line } + +procedure TConsole.ClrEol; +begin + WriteFill(Cursor.X, Cursor.Y, ' ', Cols - Cursor.X); + ShowText(Cursor.X, Cols); +end; + + +procedure TConsole.WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); +begin + Move(Buffer^, ScreenPtr(X,Y)^, Count); +end; + + +{ Write text buffer to CRT window + - Process any special characters in buffer + - Insert line breaks +} +procedure TConsole.WriteBuf(Buffer: PChar; Count: Cardinal); +var + L, R: Integer; + + procedure Return; + begin + L := 0; + R := 0; + Cursor.X := 0; + end; + + procedure LineFeed; + var + Rect: TRect; + begin + Inc(Cursor.Y); + if Cursor.Y = Rows then + begin + Dec(Cursor.Y); + Inc(FFirstLine); + if FFirstLine = Rows then FFirstline := 0; + WriteFill(0, Cursor.Y, ' ', Cols); + Dec(FOrigin.Y, 1); + LazyScrollBy(0, 1); + end; + end; + +var + BlockEnd, BlockLen, BlockStart: Integer; + P: PChar; + +begin + L := Cursor.X; + R := Cursor.X; + while Count > 0 do + begin + BlockEnd := Min(Cols - Cursor.X, Count); + P := Buffer; +{$IFDEF WIN32} + BlockStart := BlockEnd; + while (BlockEnd > 0) and (Buffer^ in [#32..#255]) do + begin + Inc(Buffer); + Dec(BlockEnd); + end; + BlockLen := BlockStart - BlockEnd; +{$ELSE} + asm + PUSH DS + PUSH SI + LDS SI, Buffer + MOV CX, BlockEnd + MOV DX, CX + CLD + @@1: + LODSB + CMP AL,' ' + JB @@2 + LOOP @@1 + INC SI + @@2: + DEC SI + MOV Buffer.Word[0],SI + MOV BlockEnd, CX + SUB DX,CX + MOV BlockLen, DX + POP SI + POP DS + end; +{$ENDIF} + if BlockLen > 0 then + begin + Dec(Count, BlockLen); + WriteBlock(Cursor.X, Cursor.Y, P, BlockLen); + Inc(Cursor.X, BlockLen); + if Cursor.X > R then R := Cursor.X; + + if (BlockEnd = 0) and (Cursor.X >= Cols) then + begin + ShowText(L,R); + Return; + LineFeed; + Continue; + end; + end; + + if Count > 0 then + begin + case Buffer^ of + #13: begin + ShowText(L,R); + Return; + if LineBreak = CR then LineFeed; + end; + #10: begin + ShowText(L,R); + if LineBreak = LF then Return; + LineFeed; + end; + #8: if Cursor.X > 0 then + begin + Dec(Cursor.X); + WriteFill(Cursor.X, Cursor.Y, ' ', 1); + if Cursor.X < L then L := Cursor.X; + end; + #7: MessageBeep(0); + end; + Inc(Buffer); + Dec(Count); + end; + end; + ShowText(L, R); + if coAutoTracking in Options then + LazyTrackCursor; + if FFocused and (coFullTimeCursor in Options) then + ShowCursor; +end; + +procedure TConsole.WriteCodedBuf(Buffer: PChar; Count: Cardinal); +begin + if Assigned(FProcessControlCodes) then + FProcessControlCodes(Self, Buffer, Count) + else + WriteBuf(Buffer, Count); +end; + +{ Write character to CRT window } + +procedure TConsole.WriteChar(Ch: Char); +begin + WriteCodedBuf(@Ch, 1); +end; + +procedure TConsole.WriteString(const S: String); +begin + WriteCodedBuf(@S[1], Length(S)); +end; + +procedure TConsole.WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); +var + I: Integer; +begin + if Count = 0 then Exit; + if (X + Count) > Cols then + begin + FillChar(ScreenPtr(X,Y)^, Cols - X, Ch); + Dec(Count, Cols - X); + I := Cols; + while Count > 0 do + begin + Inc(Y); + FillChar(ScreenPtr(X,Y)^, I, Ch); + Dec(Count, I); + end; + end + else + FillChar(ScreenPtr(X,Y)^, Count, Ch); +end; + +{ Return keyboard status } + +function TConsole.KeyPressed: Boolean; +begin + Result := FKeyCount > 0; + if (not Result) then + begin + Application.ProcessMessages; + Result := FKeyCount > 0; + end; +end; + +{ Read key from CRT window } + +function TConsole.ReadKey: Char; +begin + TrackCursor; + if not KeyPressed then + begin + SetFocus; + if FReading or ReadActive then + raise EInvalidOperation.Create('Read already active'); + try + FReading := True; + ReadActive := True; + if FFocused then ShowCursor; + repeat + Application.HandleMessage + until Application.Terminated or (FKeyCount > 0); + if Application.Terminated then + raise Exception.Create('WM_Quit received during ReadKey'); + finally + if FFocused and not (coFullTimeCursor in Options) then + HideCursor; + FReading := False; + ReadActive := False; + end; + end; + ReadKey := FKeyBuffer[0]; + Dec(FKeyCount); + Move(FKeyBuffer[1], FKeyBuffer[0], FKeyCount); +end; + +{ Read text buffer from CRT window } + +function TConsole.ReadBuf(Buffer: PChar; Count: Cardinal): Cardinal; +var + Ch: Char; + I: Cardinal; +begin + I := 0; + repeat + Ch := ReadKey; + case Ch of + #8: + if I > 0 then + begin + Dec(I); + WriteChar(#8); + end; + #32..#255: + if I < Count - 2 then + begin + Buffer[I] := Ch; + Inc(I); + WriteChar(Ch); + end; + end; + until (Ch in [#0,#13]) or ((coCheckEOF in Options) and (Ch = #26)); + Buffer[I] := Ch; + Inc(I); + if Ch = #13 then + begin + Buffer[I] := #10; + Inc(I); + WriteBuf(#13#10,2); + end; + TrackCursor; + ReadBuf := I; + if FFocused and (coFullTimeCursor in Options) then ShowCursor; +end; + + +{ Text file device driver output function } + +function CrtOutput(var F: TTextRec): Integer; far; +begin + if F.BufPos <> 0 then + with TObject((@F.UserData)^) as TConsole do + begin + WriteCodedBuf(PChar(F.BufPtr), F.BufPos); + F.BufPos := 0; + end; + CrtOutput := 0; +end; + +{ Text file device driver input function } + +function CrtInput(var F: TTextRec): Integer; far; +begin + with TObject((@F.UserData)^) as TConsole do + F.BufEnd := ReadBuf(PChar(F.BufPtr), F.BufSize); + F.BufPos := 0; + CrtInput := 0; +end; + +{ Text file device driver close function } + +function CrtClose(var F: TTextRec): Integer; far; +begin + CrtClose := 0; +end; + +{ Text file device driver open function } + +function CrtOpen(var F: TTextRec): Integer; far; +begin + if F.Mode = fmInput then + begin + F.InOutFunc := @CrtInput; + F.FlushFunc := nil; + end else + begin + F.Mode := fmOutput; + F.InOutFunc := @CrtOutput; + F.FlushFunc := @CrtOutput; + end; + F.CloseFunc := @CrtClose; + CrtOpen := 0; +end; + +{ Assign text file to CRT device } + +procedure TConsole.AssignCrt(var F: Text); +begin + with TTextRec(F) do + begin + Handle := Cardinal(-1); + Mode := fmClosed; + BufSize := SizeOf(Buffer); + BufPtr := @Buffer; + OpenFunc := @CrtOpen; + Move(Self, UserData[1],Sizeof(Pointer)); + Name[0] := #0; + end; +end; + +procedure TConsole.SetOptions(NewOptions: TConsoleOptions); +begin + if not (csDesigning in ComponentState) then { don't open files at design time } + begin + if (coStdInput in (NewOptions - Options)) then + with TTextRec(Input) do + begin + if (Mode <> fmClosed) and (Mode <> 0) then + raise Exception.Create('TConsole.SetOptions: Standard Input is already open'); + AssignCrt(Input); + Reset(Input); + Include(FOptions, coStdInput); { in case opening output fails } + end + else + if (coStdInput in (Options - NewOptions)) then + System.Close(Input); + + if (coStdOutput in (NewOptions - Options)) then + with TTextRec(Output) do + begin + if (Mode <> fmClosed) and (Mode <> 0) then + raise Exception.Create('TConsole.SetOptions: Standard Output is already open'); + AssignCrt(Output); + Rewrite(Output); + end + else + if (coStdOutput in (Options - NewOptions)) then + System.Close(Output); + end; + FOptions := NewOptions; +end; + + +{ wm_Paint message handler } + +procedure TConsole.Paint; +var + X1, X2, Y1, Y2, PX, PY: Integer; + R: TRect; +begin + Canvas.Font := Font; + Canvas.Brush.Color := Font.BkColor; + SetViewportOrgEx(Canvas.Handle, -FOrigin.X * FCharSize.X, -FOrigin.Y * FCharSize.Y, nil); + GetClipBox(Canvas.Handle, R); + X1 := Max(FOrigin.X, (R.left - FOverhang) div FCharSize.X); + X2 := Min(Cols, (R.right + FCharSize.X) div FCharSize.X); + Y1 := Max(0, R.top div FCharSize.Y); + Y2 := Min(Rows, (R.bottom + FCharSize.Y - 1) div FCharSize.Y); + PX := X1 * FCharSize.X; + PY := Y1 * FCharSize.Y; + { Draw first line using ETO_Opaque and the entire clipping region. } + ExtTextOut(Canvas.Handle, PX, PY, ETO_Opaque, @R, ScreenPtr(X1, Y1), X2 - X1, nil); + Inc(Y1); + Inc(PY, FCharSize.Y); + while Y1 < Y2 do + begin + { Draw subsequent lines without any background fill or clipping rect } + ExtTextOut(Canvas.Handle, PX, PY, 0, nil, ScreenPtr(X1, Y1), X2 - X1, nil); + Inc(Y1); + Inc(PY, FCharSize.Y); + end; +end; + +procedure TConsole.WMSize(var M: TWMSize); +var + W,H: Integer; +begin + if FFocused and (FReading or (coFullTimeCursor in Options)) then + HideCursor; + inherited; + RecalcSizeAndRange; + if FFocused and (FReading or (coFullTimeCursor in Options)) then + ShowCursor; +end; + + +procedure TConsole.DoScroll(Which, Action, Thumb: Integer); +var + X, Y: Integer; + + function GetNewPos(Pos, Page, Range: Integer): Integer; + begin + case Action of + sb_LineUp: GetNewPos := Pos - 1; + sb_LineDown: GetNewPos := Pos + 1; + sb_PageUp: GetNewPos := Pos - Page; + sb_PageDown: GetNewPos := Pos + Page; + sb_Top: GetNewPos := 0; + sb_Bottom: GetNewPos := Range; + sb_ThumbPosition, + sb_ThumbTrack : GetNewPos := Thumb; + else + GetNewPos := Pos; + end; + end; + +begin + X := FOrigin.X; + Y := FOrigin.Y; + case Which of + sb_Horz: X := GetNewPos(X, FClientSize.X div 2, FRange.X); + sb_Vert: Y := GetNewPos(Y, FClientSize.Y, FRange.Y); + end; + ScrollTo(X, Y); +end; + +procedure TConsole.WMHScroll(var M: TWMHScroll); +begin + DoScroll(sb_Horz, M.ScrollCode, M.Pos); +end; + +procedure TConsole.WMVScroll(var M: TWMVScroll); +begin + DoScroll(sb_Vert, M.ScrollCode, M.Pos); +end; + +procedure TConsole.KeyPress(var Key: Char); +begin + inherited KeyPress(Key); + if Key <> #0 then + begin + if (coCheckBreak in Options) and (Key = #3) then + DoCtrlBreak; + if FKeyCount < SizeOf(FKeyBuffer) then + begin + FKeyBuffer[FKeyCount] := Key; + Inc(FKeyCount); + end; + end; +end; + +procedure TConsole.KeyDown(var Key: Word; Shift: TShiftState); +var + I: Integer; +begin + inherited KeyDown(Key, Shift); + if Key = 0 then Exit; + if (coCheckBreak in Options) and (Key = vk_Cancel) then + DoCtrlBreak; + for I := 1 to ScrollKeyCount do + with ScrollKeys[I] do + if (sKey = Key) and (Ctrl = (Shift = [ssCtrl])) then + begin + DoScroll(SBar, Action, 0); + Exit; + end; +end; + +procedure TConsole.WMSetFocus(var M: TWMSetFocus); +begin + FFocused := True; + if FReading or (coFullTimeCursor in Options) then + ShowCursor; + inherited; +end; + +procedure TConsole.WMKillFocus(var M: TWMKillFocus); +begin + inherited; + if FReading or (coFullTimeCursor in Options) then + HideCursor; + FFocused := False; +end; + +procedure TConsole.WMGetDlgCode(var M: TWMGetDlgCode); +begin + M.Result := dlgc_WantArrows or dlgc_WantChars; +end; + +procedure TConsole.WMEraseBkgnd(var M: TWMEraseBkgnd); +begin + M.Result := 1; +end; + +procedure TConsole.DoCtrlBreak; +begin +end; + +procedure TConsole.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + SetFocus; + inherited MouseDown(Button, Shift, X, Y); +end; + + + +{**************** TAttrManager ****************} + +constructor TAttr.Create(F: TFixedFont); +var + DC: HDC; + Save: THandle; + TM: TTextMetric; +begin + inherited Create; + Assign(F); + BkColor := F.BkColor; + DC := GetDC(0); + Save := SelectObject(DC, F.Handle); + GetTextMetrics(DC, TM); + SelectObject(DC, Save); + ReleaseDC(0,DC); + Overhang := TM.tmOverhang; + Underhang := MulDiv(TM.tmDescent, TM.tmOverhang, TM.tmAscent); +end; + + +{**************** TAttrManager ****************} + +{ The list of free slots in the TAttrManager's FList is + maintained in the unused pointer slots inside the FList. + FFreeList is the index of the first free slot, or -1 if + there are no free slots. The pointer FList[FFreeList] + contains the negative of the integer index of the next + free slot, and so on. In 16 bit, this code assumes $FFFF + will never appear as a selector. In 32 bit, this code + would assume FList indexes and pointers stored in the + FList are positive (>=0) when evaluated as signed integers. +} + +const + EndOfList = -MaxInt; + +constructor TAttrManager.Create; +begin + inherited Create; + FList := TList.Create; +end; + +destructor TAttrManager.Destroy; +begin + Clear; + FList.Free; + inherited Destroy; +end; + +function TAttrManager.GetCount; +begin + Result := FList.Count; +end; + +function TAttrManager.InFreeList(P: Pointer): Boolean; +begin + Result := (EndOfList <= Longint(P)) and (Longint(P) < 0); +end; + +function TAttrManager.FirstFreeIndex: Integer; +begin + Result := FFreeList; +end; + +function TAttrManager.NextFreeIndex(P: Pointer): Integer; +begin + if (EndOfList < Longint(P)) and (Longint(P) < 0) then + Result := -Longint(P) - 1 + else + Result := -1; +end; + +procedure TAttrManager.SetFree(Index: Integer); +begin + if FFreeList < 0 then + FList[Index] := Pointer(Longint(EndOfList)) + else + FList[Index] := Pointer(Longint(-FFreeList - 1)); + FFreeList := Index; +end; + +function TAttrManager.AllocIndex: Integer; +begin + if FFreeList >= 0 then + begin + Result := FFreeList; + FFreeList := NextFreeIndex(FList[FFreeList]); + end + else + Result := FList.Count; +end; + +function TAttrManager.Allocate(F: TFixedFont): Integer; +var + P: ^Pointer; + H: THandle; + C,B: TColor; + N: Integer; +begin + Result := FCacheIndex; + with F do + begin + C := Color; + B := BkColor; + H := Handle; + end; + if FCache <> nil then + with FCache do + if (Color = C) and (BkColor = B) and (Handle = H) then + Exit; + + { Search for a match } + Result := FList.Count; + P := Pointer(FList.List); { Use pointer iterator instead of For loop } + while (Result > 0) do + begin + if not InFreeList(P^) then + with TAttr(P^) do + if (Color = C) and (BkColor = B) and (Handle = H) then + begin + FCache := TAttr(P^); + Result := FList.Count - Result; + FCacheIndex := Result; + Exit; + end; + Inc(P); + Dec(Result); + end; + + { No match found, so create a new TAttr in an empty slot } + Result := AllocIndex; + Attr[Result] := TAttr.Create(F); +end; + +procedure TAttrManager.Clear; +var + I: Integer; +begin + for I := 0 to FList.Count - 1 do + if not InFreeList(FList[I]) then + TObject(FList[I]).Free; + FList.Clear; + FCacheIndex := 0; + FCache := nil; + FFreeList := -1; +end; + +procedure TAttrManager.Reference(Index: Integer; Delta: Integer); +begin + with Attr[Index] do + begin + Inc(RefCount, Delta); + if RefCount <= 0 then + Attr[Index] := nil; + end; +end; + +function TAttrManager.GetAttr(Index: Integer): TAttr; +begin + Result := TAttr(FList[Index]); + if InFreeList(Result) then + Result := nil; +end; + +procedure TAttrManager.SetAttr(Index: Integer; NewAttr: TAttr); +var + Temp: TAttr; +begin + if NewAttr = nil then + begin + TObject(FList[Index]).Free; + SetFree(Index); + end + else + if Index = FList.Count then + FList.Expand.Add(NewAttr) + else + FList[Index] := NewAttr; + FCacheIndex := Index; + FCache := NewAttr; +end; + + +{ ************* TColorConsole *************** } + +constructor TColorConsole.Create(Owner: TComponent); +begin + FAttrList := TAttrManager.Create; + inherited Create(Owner); +end; + +destructor TColorConsole.Destroy; +begin + inherited Destroy; + StrDispose(PChar(FIndexes)); + FAttrList.Free; + StrDispose(PChar(FCellWidths)); +end; + +function TColorConsole.IndexPtr(X,Y: Integer): PInteger; +begin + Result := @FIndexes^[Longint(ScreenPtr(X,Y)) - Longint(FBuffer)]; +end; + +{ ResizeBuffer + - Called by constructor to init buffers, and called by SetCols/SetRows + when Cols or Rows change. Cols and Rows will be set to their new + values before ResizeBuffer is called. + - StrAlloc will fail (raise xptn) if Cols * Rows is greater than 32k - 2 + - No attempt is made to preserve the contents of the buffers. Resizing + the buffers is equivallent to a ClrScr. +} + +procedure TColorConsole.ResizeBuffer; +var + I: Integer; + A: Integer; + P: PInteger; + P2: PChar; +begin + inherited ResizeBuffer; + Pointer(P) := nil; + P2 := nil; + try + Pointer(P) := StrAlloc(Longint(Cols) * Rows * Sizeof(Integer)); + P2 := StrAlloc(Cols * SizeOf(Integer)); + Exchange(Pointer(FIndexes), Pointer(P)); + Exchange(Pointer(FCellWidths), Pointer(P2)); + finally + StrDispose(PChar(P)); + StrDispose(P2); + end; + FAttrList.Clear; + A := FAttrList.Allocate(Font); + FillInt(FIndexes^, Cols * Rows, A); + FAttrList.Reference(A, Cols * Rows ); + FillInt(FCellWidths^, Cols, FCharSize.X); +end; + +{ If the character cell is larger, expand settings and redraw } +procedure TColorConsole.SetMetrics(const Metrics: TTextMetric); +var + Changed: Boolean; + I: Integer; + A: TAttr; + + function Check(A, B: Longint): Longint; + begin + Result := A; + if A < B then + begin + Result := B; + Changed := True; + end; + end; + +begin + { Different fonts of the same point size have slightly different char + cells. Keep the global char cell large enough for all. } + if FOldFont.Size = Font.Size then + with Metrics do + begin + Changed := False; { TT fonts don't report overhang } + FOverhang := Check(FOverhang, Max(tmOverhang, tmMaxCharWidth - tmAveCharWidth)); + FCharSize.X := Check(FCharSize.X, tmAveCharWidth); + FCharSize.Y := Check(FCharSize.Y, tmHeight + tmExternalLeading); + FCharAscent := Check(FCharAscent, tmAscent); + if Changed then + begin + if FCellWidths <> nil then + FillInt(FCellWidths^, Cols, FCharSize.X); + RecalcSizeAndRange; + Invalidate; + end; + end + else + begin { If font size changed, accept new cell verbatim. } + { Update all cached fonts to new size } + for I := 0 to FAttrList.Count - 1 do + begin + A:= FAttrList[I]; + if A <> nil then + A.Size := Font.Size; + end; + if FCellWidths <> nil then + FillInt(FCellWidths^, Cols, Metrics.tmAveCharWidth); + inherited SetMetrics(Metrics); + end; +end; + + +procedure TColorConsole.WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); +begin + if Count = 0 then Exit; + FillAttr(X,Y,Count); + inherited WriteFill(X,Y,Ch,Count); { write ch to the char buffer } +end; + +procedure TColorConsole.FillAttr(X,Y: Integer; Count: Cardinal); + + procedure ReplaceAttr(A: Integer; P: PInteger; Count: Cardinal); + var + RunCount: Integer; + RunValue: Integer; + begin + while Count > 0 do + begin +{$IFDEF Win32} + RunValue := P^; + RunCount := 0; + repeat + P^ := A; + Inc(P); + Inc(RunCount); + until (RunCount >= Count) or (P^ <> RunValue); +{$ELSE} + asm + LES DI, P + MOV SI, DI + MOV AX, ES:[DI] + MOV CX, Count + MOV DX, CX + REPE SCASW + JZ @@1 + INC CX + DEC DI + DEC DI + @@1: + SUB DX, CX + MOV RunCount, DX + MOV RunValue, AX + MOV P.Word[0], DI + CMP AX, A { If attrs are same, no need to write over them. } + JE @@2 + MOV DI, SI + MOV CX, DX + MOV AX, A + REP STOSW + @@2: + end; +{$ENDIF} + FAttrList.Reference(RunValue, -RunCount); + Dec(Count, RunCount); + end; + end; + +var + A: Integer; + I: Integer; +begin + A := FAttrList.Allocate(Font); + FAttrList.Reference(A, Count); + if (X + Count) > Cols then + begin + ReplaceAttr(A, IndexPtr(X,Y), Cols - X); + Dec(Count, Cols - X); + I := Cols; + while Count > 0 do + begin + Inc(Y); + ReplaceAttr(A, IndexPtr(X,Y), I); + Dec(Count, I); + end; + end + else + ReplaceAttr(A, IndexPtr(X,Y), Count); +end; + +procedure TColorConsole.WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); +begin + if Count = 0 then Exit; + FillAttr(X,Y,Count); { fill range with current attr } + inherited WriteBlock(X,Y,Buffer,Count); { copy chars to char buf } +end; + +procedure TColorConsole.Paint; +var + X1, X2, Y1, Y2, RunValue, RunStart, RunEnd, Len, Count, Prev: Integer; + R: TRect; + P: PInteger; + Buf: PChar; + A: TAttr; + C: TPoint; + DC: HDC; +begin + C := FCharSize; + SetViewportOrgEx(Canvas.Handle, -FOrigin.X * FCharSize.X, -FOrigin.Y * C.Y, nil); + GetClipBox(Canvas.Handle, R); + X1 := Max(FOrigin.X, (R.left - FOverhang) div C.X); + X2 := Min(Cols, (R.right + C.X) div C.X); + Y1 := Max(0, R.top div C.Y); + Y2 := Min(Rows, (R.bottom + C.Y - 1) div C.Y); + if ((Cols * C.X) < R.Right) then + begin + Canvas.Brush := Brush; + Count := R.Left; + R.Left := Cols * C.X; + Canvas.FillRect(R); + R.Right := R.Left; + R.Left := Count; + end; + if (Rows * C.Y) < R.Bottom then + begin + Canvas.Brush := Brush; + R.Top := Rows * C.Y; + Canvas.FillRect(R); + end; + { In this tight display loop, we don't need all the automatic services + provided by TCanvas. To optimize performance, we'll select the text + font and colors into the DC 'manually'. } + DC := Canvas.Handle; + SetBkMode(DC, OPAQUE); + SetTextAlign(DC, TA_BaseLine); + R.Top := Y1 * C.Y; + R.Bottom := R.Top + C.Y; + Prev := -1; + while Y1 < Y2 do + begin + Buf := ScreenPtr(X1,Y1); + P := Pointer(IndexPtr(X1,Y1)); + Count := X2 - X1; + R.Left := X1 * C.X; +{$IFDEF WIN32} + RunEnd := Integer(P) + Count * sizeof(Integer); + while Count > 0 do + begin + RunStart := Integer(P); + RunValue := P^; + while (Integer(P) < RunEnd) and (P^ = RunValue) do + Inc(P); + Len := (Integer(P) - RunStart) div sizeof(Integer); + Dec(Count, Len); +{$ELSE} + RunEnd := X1; + while Count > 0 do + begin + asm + LES DI, P + MOV AX, ES:[DI] { AX := P^ } + MOV CX, Count + MOV BX, CX + REPE SCASW + JZ @@1 + INC CX + DEC DI + DEC DI + @@1: + MOV P.Word[0], DI + MOV RunValue, AX + SUB BX, CX + MOV Count, CX + MOV Len, BX + ADD RunEnd, BX { RunEnd := RunStart + Length } + end; +{$ENDIF} + if RunValue <> Prev then { Only select objects when we have to } + begin { (this helps at line breaks ) } + A := FAttrList[RunValue]; + SelectObject(DC, A.Handle); + SetTextColor(DC, ColorToRGB(A.Color)); + SetBkColor(DC, ColorToRGB(A.BkColor)); + Prev := RunValue; + end; + R.Right := R.Left + Len * C.X; + ExtTextOut(DC, R.Left - A.Underhang, R.Top + FCharAscent, + ETO_Opaque or ETO_Clipped, @R, Buf, Len, Pointer(FCellWidths)); + R.Left := R.Right; + Inc(Buf, Len); + end; + Inc(Y1); + Inc(R.Top, C.Y); + Inc(R.Bottom, C.Y); + end; + { Since we've manipulated the DC directly, and the canvas may think its + current objects are still selected, we should force the canvas to + deselect all GDI objects } + Canvas.Handle := 0; +end; + + +procedure Register; +begin + RegisterComponents('Additional', [TConsole, TColorConsole]); + RegisterClasses([TFixedFont]); +end; + + +end. + + + + diff --git a/src/ComDrv32.dcr b/src/ComDrv32.dcr new file mode 100644 index 00000000..f82adff1 Binary files /dev/null and b/src/ComDrv32.dcr differ diff --git a/src/ComDrv32.pas b/src/ComDrv32.pas new file mode 100644 index 00000000..d1dfa392 --- /dev/null +++ b/src/ComDrv32.pas @@ -0,0 +1,870 @@ +{ + +----------------------------------------------------------------------------- + | + | ComDrv32.pas (see ComDrv16.pas for Delphi 1.0) + | + | COM Port Driver for Delphi 2.0 + | + | Written by Marco Cocco + | Copyright (c) 1996-97 by Marco Cocco. All rights reseved. + | Copyright (c) 1996-97 by d3k The Artisan Of Ware. All rights reseved. + | + | Please send comments to d3k@mdnet.it + | URL: http://www.mdlive.com/d3k/ + | + +----------------------------------------------------------------------------- + | v1.00/32 - Feb 15th, 1997 + | original Delphi 2.0 implementation + +----------------------------------------------------------------------------- + | v1.00/16 - May 21st, 1997 + | ported to Delphi 1.0 + +----------------------------------------------------------------------------- + | v1.02/32 - Jun 5th, 1997 + | new property: ComPortHandle + | > COM port device handle made public (read/write) + | new proc: SendZString( pchar string ) + | > send C-style strings + | new proc: FlushBuffers( in, out: boolean ) + | > flush incoming data buffer (if in=TRUE) + | > flush outcoming data buffer (if out=TRUE) + | new property: EnableDTROnOpen: boolean + | > set to TRUE (default) to set DTR to high on connect and to leave + | it high until disconnect. + | set to FALSE to set DTR to low on connect and to leave it low + | new procs: ToggleDTR( onOff: boolean ) + | ToggleRTS( onOff: boolean ) + | > manually set on/off DTR/RTS line. You must disable HW handshaking before + | using there procs. You also must set EnableDRTOnOpen to FALSE. + | These procs are usefull if you are driving a RS232 to RS485 converter. + | (Set DTR high on TX, reset it to low on end of TX) + | new proc: function OutFreeSpace: word + | > returns available free space in the output data buffer or 65535 + | if the COM port is not open + | new property: OutputTimeout: word + | > timeout for output (milliseconds) + | changed proc: function SendData( DataPtr: pointer; + | DataSize: integer ): integer + | > sends a block of memory. Breaks the data block in smaller blocks if it + | is too large to fit the available free space in the output buffer. + | The OutputTimeout property value is the timeout (in milliseconds) for + | one small packet being correctly sent. Returns DataSize if all ok or a + | value less than zero if a timeout occurred (abs(result) is the number + | of bytes sent). + +----------------------------------------------------------------------------- + | v1.03/32 - July 18th, 1997 + | new feature: + | > added support for COM ports 5..16 + | new property: PacketSize + | > tells TCommPortDriver to raise an OnReceiveData only when the RX buffer + | has almost PacketSize bytes. This lets you receive data one packet at + | at time. If PacketSize is <= 0 then TCommPortDriver ignores it and + | the OnReceiveData event is raised as soon as there is some data in the + | RX buffer. Be sure the RX buffer size (ComPortInBufSize property) is + | 2 or 3 times the packet size (that is ComPortInBufSize >= PackSize * 2). + | new properties: PacketTimeout and PacketMode + | > PacketTimeout defines how long (in milliseconds) to wait for a complete + | packet to be received (a complete packet is PacketSize bytes long). + | If a complete packet is received before PacketTimeout milliseconds + | then the packet data is passed to the application (the OnReceiveData + | event is raised). If a complete packet is not received before that + | timeout value, then TCommPortDriver does one of the following; + | 1. if PacketMode = pmDiscard, the incomplete packet data + | is discarded and TCommPortDriver starts waiting for another packet + | 2. if PacketMode = pmPass, the incomplete packet data is + | passed to the app (the OnReceiveData event is raised). + | To disable the packet-timeout checking set PacketTimeout to a value + | less than zero (-1 is the default value). + +----------------------------------------------------------------------------- + | v1.04/32 - July 23th, 1997 + | bug fix: + | > RX packet mechanism now works fine (?) + +----------------------------------------------------------------------------- + | v1.05/32 - July 29th, 1997 + | bug fix: + | > again, RX packet mechanism now works fine (hope no more bugs!) + +----------------------------------------------------------------------------- + | + | * This component built up on request of Mark Kuhnke. + | * Porting to Delphi 1.0 done up on request of Paul Para (paul@clark.com) + | * RX data packets support added up on request of Vandersleyen Joachim + | (AW Europe, ECU Department) + | + | Greetings to: + | - Igor Gitman (gitman@interlog.com): + | he reported me the COM1 bug (16 bit version only) + | - Vandersleyen Joachim (Vandersleyen@aisin-aw.co.jp) and + | Bernard Lotteau (Bernard_LOTTEAU@compuserve.com): + | RX packet mechanism testing + | + +----------------------------------------------------------------------------- + | Do you need additional features ? Feel free to ask for it! + +----------------------------------------------------------------------------- + + ****************************************************************************** + * Permission to use, copy, modify, and distribute this software and its * + * documentation without fee for any purpose is hereby granted, * + * provided that the above copyright notice appears on all copies and that * + * both that copyright notice and this permission notice appear in all * + * supporting documentation. * + * * + * NO REPRESENTATIONS ARE MADE ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY * + * PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. * + * NEITHER MARCO COCCO OR D3K SHALL BE LIABLE FOR ANY DAMAGES SUFFERED BY * + * THE USE OF THIS SOFTWARE. * + ****************************************************************************** + * d3k - The Artisan Of Ware - A Marco Cocco's Company * + * Casella Postale 99 - 09047 Selargius (CA) - ITALY * + * Tel. +39 70 846091 (Italian speaking) Fax +39 70 848331 * + * E-mail: d3k@mdnet.it Home page: http://www.mdlive.com/d3k/ * + ****************************************************************************** + + ------------------------------------------------------------------------------ + Check our site for the last release of this code + ------------------------------------------------------------------------------ + Other D3K's components: + - TFLXPlayer (play FLI/FLC animations) - *UNSUPPORTED* *V2.0 COMING SOON* + - TCommPortDriver (send/received data to/from COM ports - Delphi 1.0) + - TD3KBitmappedLabel (label with bitmapped font support) + - TO97Menus (MS Office 97 like menus) (**) + - TExplorerTreeView, TExploterListView (make your own disk explorer) + (Explorer Clone source code included!) (**) + - TAPEditor (advanced editor with rule-based syntax highlighting) (**) + - TBASIC (VB-like BASIC interpreter) (**) + - TypeLibs for Developers (advanced TrueType font support) (**) + + (**) = COMING SOON (as on July 28th, 1997) + + ------------------------------------------------------------------------------ + Check our site for new components ! + ------------------------------------------------------------------------------ +} + +unit ComDrv32; + +interface + +uses + Windows, Messages, SysUtils, Classes, Forms; + +type + // COM Port Baud Rates + TComPortBaudRate = ( br110, br300, br600, br1200, br2400, br4800, + br9600, br14400, br19200, br38400, br56000, + br57600, br115200{v1.02: removed ->, br128000, br256000} ); + // COM Port Numbers + TComPortNumber = ( pnCOM1, pnCOM2, pnCOM3, pnCOM4, pnCOM5, pnCOM6, pnCOM7, + pnCOM8, pnCOM9, pnCOM10, pnCOM11, pnCOM12, pnCOM13, + pnCOM14, pnCOM15, pnCOM16 ); + // COM Port Data bits + TComPortDataBits = ( db5BITS, db6BITS, db7BITS, db8BITS ); + // COM Port Stop bits + TComPortStopBits = ( sb1BITS, sb1HALFBITS, sb2BITS ); + // COM Port Parity + TComPortParity = ( ptNONE, ptODD, ptEVEN, ptMARK, ptSPACE ); + // COM Port Hardware Handshaking + TComPortHwHandshaking = ( hhNONE, hhRTSCTS ); + // COM Port Software Handshaing + TComPortSwHandshaking = ( shNONE, shXONXOFF ); + // What to do with incomplete (incoming) packets + TPacketMode = ( pmDiscard, pmPass ); + + TComPortReceiveDataEvent = procedure( Sender: TObject; DataPtr: pointer; DataSize: integer ) of object; + TComPortReceivePacketEvent = procedure( Sender: TObject; Packet: pointer; DataSize, ElapsedTime: integer ) of object; + + TCommPortDriver = class(TComponent) + protected + FComPortHandle : THANDLE; // COM Port Device Handle + + FComPort : TComPortNumber; // COM Port to use (1..4) + FComPortBaudRate : TComPortBaudRate; // COM Port speed (brXXXX) + FComPortDataBits : TComPortDataBits; // Data bits size (5..8) + FComPortStopBits : TComPortStopBits; // How many stop bits to use (1,1.5,2) + FComPortParity : TComPortParity; // Type of parity to use (none,odd,even,mark,space) + FComPortHwHandshaking : TComPortHwHandshaking; // Type of hw handshaking to use + FComPortSwHandshaking : TComPortSwHandshaking; // Type of sw handshaking to use + FComPortInBufSize : word; // Size of the input buffer + FComPortOutBufSize : word; // Size of the output buffer + FPacketSize : smallint; // Size of a data packet + FPacketTimeout : integer; // ms to wait for a complete packet (<=0 = disabled) + FPacketMode : TPacketMode; // what to do with incomplete packets + FComPortReceiveData : TComPortReceiveDataEvent; // Event to raise on data reception + FComPortReceivePacket : TComPortReceivePacketEvent; // Event to raise on packet reception + FComPortPollingDelay : word; // ms of delay between COM port pollings + FEnableDTROnOpen : boolean; { enable/disable DTR line on connect } + FOutputTimeout : word; { output timeout - milliseconds } + FNotifyWnd : HWND; // This is used for the timer + FTempInBuffer : pointer; + FFirstByteOfPacketTime : DWORD; + + procedure SetComHandle( Value: THANDLE ); + procedure SetComPort( Value: TComPortNumber ); + procedure SetComPortBaudRate( Value: TComPortBaudRate ); + procedure SetComPortDataBits( Value: TComPortDataBits ); + procedure SetComPortStopBits( Value: TComPortStopBits ); + procedure SetComPortParity( Value: TComPortParity ); + procedure SetComPortHwHandshaking( Value: TComPortHwHandshaking ); + procedure SetComPortSwHandshaking( Value: TComPortSwHandshaking ); + procedure SetComPortInBufSize( Value: word ); + procedure SetComPortOutBufSize( Value: word ); + procedure SetPacketSize( Value: smallint ); + procedure SetPacketTimeout( Value: integer ); + procedure SetComPortPollingDelay( Value: word ); + + procedure ApplyCOMSettings; + + procedure TimerWndProc( var msg: TMessage ); + public + constructor Create( AOwner: TComponent ); override; + destructor Destroy; override; + + function Connect: boolean; + procedure Disconnect; + function Connected: boolean; + { v1.02: flushes the rx/tx buffers } + procedure FlushBuffers( inBuf, outBuf: boolean ); + { v1.02: returns the output buffer free space or 65535 if + not connected } + function OutFreeSpace: word; + + { Send data } + { v1.02: changed result time from 'boolean' to 'integer'. See the docs + for more info } + function SendData( DataPtr: pointer; DataSize: integer ): integer; + // Send a pascal string (NULL terminated if $H+ (default)) + function SendString( s: string ): boolean; + // v1.02: send a C-style strings (NULL terminated) + function SendZString( s: pchar ): boolean; + // v1.02: set DTR line high (onOff=TRUE) or low (onOff=FALSE). + // You must not use HW handshaking. + procedure ToggleDTR( onOff: boolean ); + // v1.02: set RTS line high (onOff=TRUE) or low (onOff=FALSE). + // You must not use HW handshaking. + procedure ToggleRTS( onOff: boolean ); + + // v1.02: make the Handle to the com port public (for TAPI...) + property ComHandle: THANDLE read FComPortHandle write SetComHandle; + published + // Which COM Port to use + property ComPort: TComPortNumber read FComPort write SetComPort default pnCOM2; + // COM Port speed (bauds) + property ComPortSpeed: TComPortBaudRate read FComPortBaudRate write SetComPortBaudRate default br9600; + // Data bits to used (5..8, for the 8250 the use of 5 data bits with 2 stop bits is an invalid combination, + // as is 6, 7, or 8 data bits with 1.5 stop bits) + property ComPortDataBits: TComPortDataBits read FComPortDataBits write SetComPortDataBits default db8BITS; + // Stop bits to use (1, 1.5, 2) + property ComPortStopBits: TComPortStopBits read FComPortStopBits write SetComPortStopBits default sb1BITS; + // Parity Type to use (none,odd,even,mark,space) + property ComPortParity: TComPortParity read FComPortParity write SetComPortParity default ptNONE; + // Hardware Handshaking Type to use: + // cdNONE no handshaking + // cdCTSRTS both cdCTS and cdRTS apply (** this is the more common method**) + property ComPortHwHandshaking: TComPortHwHandshaking + read FComPortHwHandshaking write SetComPortHwHandshaking default hhNONE; + // Software Handshaking Type to use: + // cdNONE no handshaking + // cdXONXOFF XON/XOFF handshaking + property ComPortSwHandshaking: TComPortSwHandshaking + read FComPortSwHandshaking write SetComPortSwHandshaking default shNONE; + // Input Buffer size + property ComPortInBufSize: word read FComPortInBufSize write SetComPortInBufSize default 2048; + // Output Buffer size + property ComPortOutBufSize: word read FComPortOutBufSize write SetComPortOutBufSize default 2048; + // v1.03: RX packet size (this value must be less than ComPortInBufSize) + property PacketSize: smallint read FPacketSize write SetPacketSize default -1; + // v1.03: timeout (ms) for a complete packet (in RX) + property PacketTimeout: integer read FPacketTimeout write SetPacketTimeout default -1; + // v1.03: what to do with incomplete packets (in RX) + property PacketMode: TPacketMode read FPacketMode write FPacketMode default pmDiscard; + // ms of delay between COM port pollings + property ComPortPollingDelay: word read FComPortPollingDelay write SetComPortPollingDelay default 50; + // v1.02: Set to TRUE to enable DTR line on connect and to leave it on until disconnect. + // Set to FALSE to disable DTR line on connect. + property EnableDTROnOpen: boolean read FEnableDTROnOpen write FEnableDTROnOpen default true; + // v1.02: Output timeout (milliseconds) + property OutputTimeout: word read FOutputTimeOut write FOutputTimeout default 4000; + // Event to raise when there is data available (input buffer has data) (called only if PacketSize = 0) + property OnReceiveData: TComPortReceiveDataEvent read FComPortReceiveData write FComPortReceiveData; + // Event to raise when there is data packet available (called only if PacketSize <> 0) + property OnReceivePacket: TComPortReceivePacketEvent read FComPortReceivePacket write FComPortReceivePacket; + end; + +function BaudRateOf( bRate: TComPortBaudRate ): integer; +function DelayForRX( bRate: TComPortBaudRate; DataSize: integer ): integer; + +procedure Register; + +implementation + +function BaudRateOf( bRate: TComPortBaudRate ): integer; +begin + case bRate of + br110 : Result := 110; + br300 : Result := 300; + br600 : Result := 600; + br1200 : Result := 1200; + br2400 : Result := 2400; + br4800 : Result := 4800; + br9600 : Result := 9600; + br14400 : Result := 14400; + br19200 : Result := 19200; + br38400 : Result := 38400; + br56000 : Result := 56000; + br57600 : Result := 57600; + br115200 : Result := 115200; + end; +end; + +function DelayForRX( bRate: TComPortBaudRate; DataSize: integer ): integer; +begin + Result := round( DataSize / (BaudRateOf(bRate) / 10) * 1000 ); +end; + +constructor TCommPortDriver.Create( AOwner: TComponent ); +begin + inherited Create( AOwner ); + // Initialize to default values + FComPortHandle := 0; // Not connected + FComPort := pnCOM2; // COM 2 + FComPortBaudRate := br9600; // 9600 bauds + FComPortDataBits := db8BITS; // 8 data bits + FComPortStopBits := sb1BITS; // 1 stop bit + FComPortParity := ptNONE; // no parity + FComPortHwHandshaking := hhNONE; // no hardware handshaking + FComPortSwHandshaking := shNONE; // no software handshaking + FComPortInBufSize := 2048; // input buffer of 2048 bytes + FComPortOutBufSize := 2048; // output buffer of 2048 bytes + FPacketSize := -1; // don't pack data + FPacketTimeout := -1; // packet timeout disabled + FPacketMode := pmDiscard; // discard incomplete packets + FComPortReceiveData := nil; // no data handler + FComPortReceivePacket := nil; // no data packet handler + FComPortPollingDelay := 50; // poll COM port every 50ms + FOutputTimeout := 4000; // output timeout - 4000ms + FEnableDTROnOpen := true; // DTR high on connect + FFirstByteOfPacketTime := DWORD(-1); // time not valid + // Temporary buffer for received data + GetMem( FTempInBuffer, FComPortInBufSize ); + // Allocate a window handle to catch timer's notification messages + if not (csDesigning in ComponentState) then + FNotifyWnd := AllocateHWnd( TimerWndProc ); +end; + +destructor TCommPortDriver.Destroy; +begin + // Be sure to release the COM device + Disconnect; + // Free the temporary buffer + FreeMem( FTempInBuffer, FComPortInBufSize ); + // Destroy the timer's window + DeallocateHWnd( FNotifyWnd ); + inherited Destroy; +end; + +// v1.02: The COM port handle made public and writeable. +// This lets you connect to external opened com port. +// Setting ComPortHandle to 0 acts as Disconnect. +procedure TCommPortDriver.SetComHandle( Value: THANDLE ); +begin + // If same COM port then do nothing + if FComPortHandle = Value then + exit; + { If value is $FFFFFFFF then stop controlling the COM port + without closing in } + if Value = $FFFFFFFF then + begin + if Connected then + { Stop the timer } + if Connected then + KillTimer( FNotifyWnd, 1 ); + { No more connected } + FComPortHandle := 0; + end + else + begin + { Disconnect } + Disconnect; + { If Value is = 0 then exit now } + { (ComPortHandle := 0 acts as Disconnect) } + if Value = 0 then + exit; + + { Set COM port handle } + FComPortHandle := Value; + + { Start the timer (used for polling) } + SetTimer( FNotifyWnd, 1, FComPortPollingDelay, nil ); + end; +end; + +procedure TCommPortDriver.SetComPort( Value: TComPortNumber ); +begin + // Be sure we are not using any COM port + if Connected then + exit; + // Change COM port + FComPort := Value; +end; + +procedure TCommPortDriver.SetComPortBaudRate( Value: TComPortBaudRate ); +begin + // Set new COM speed + FComPortBaudRate := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +procedure TCommPortDriver.SetComPortDataBits( Value: TComPortDataBits ); +begin + // Set new data bits + FComPortDataBits := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +procedure TCommPortDriver.SetComPortStopBits( Value: TComPortStopBits ); +begin + // Set new stop bits + FComPortStopBits := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +procedure TCommPortDriver.SetComPortParity( Value: TComPortParity ); +begin + // Set new parity + FComPortParity := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +procedure TCommPortDriver.SetComPortHwHandshaking( Value: TComPortHwHandshaking ); +begin + // Set new hardware handshaking + FComPortHwHandshaking := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +procedure TCommPortDriver.SetComPortSwHandshaking( Value: TComPortSwHandshaking ); +begin + // Set new software handshaking + FComPortSwHandshaking := Value; + // Apply changes + if Connected then + ApplyCOMSettings; +end; + +procedure TCommPortDriver.SetComPortInBufSize( Value: word ); +begin + { Do nothing if connected } + if Connected then + exit; + // Free the temporary input buffer + FreeMem( FTempInBuffer, FComPortInBufSize ); + // Set new input buffer size + FComPortInBufSize := Value; + // Allocate the temporary input buffer + GetMem( FTempInBuffer, FComPortInBufSize ); + // Adjust the RX packet size + SetPacketSize( FPacketSize ); +end; + +procedure TCommPortDriver.SetComPortOutBufSize( Value: word ); +begin + { Do nothing if connected } + if Connected then + exit; + // Set new output buffer size + FComPortOutBufSize := Value; +end; + +procedure TCommPortDriver.SetPacketSize( Value: smallint ); +begin + // PackeSize = -1 if data isn't to be 'packetized' + if Value < 1 then + Value := -1 + // If the PacketSize if greater than then RX buffer size then + // increase the RX buffer size + else if Value > FComPortInBufSize then + FComPortInBufSize := Value * 2; + FPacketSize := Value; +end; + +procedure TCommPortDriver.SetPacketTimeout( Value: integer ); +begin + // PacketTimeout = -1 if packet timeout is to be disabled + if Value < 1 then + Value := -1 + // PacketTimeout cannot be less than polling delay + some extra ms + else if Value < FComPortPollingDelay then + Value := FComPortPollingDelay + 250; + FPacketTimeout := Value; +end; + +procedure TCommPortDriver.SetComPortPollingDelay( Value: word ); +begin + // If new delay is not equal to previous value... + if Value <> FComPortPollingDelay then + begin + // Stop the timer + if Connected then + KillTimer( FNotifyWnd, 1 ); + // Store new delay value + FComPortPollingDelay := Value; + // Restart the timer + if Connected then + SetTimer( FNotifyWnd, 1, FComPortPollingDelay, nil ); + // Adjust the packet timeout + SetPacketTimeout( FPacketTimeout ); + end; +end; + +const + Win32BaudRates: array[br110..br115200] of DWORD = + ( CBR_110, CBR_300, CBR_600, CBR_1200, CBR_2400, CBR_4800, CBR_9600, + CBR_14400, CBR_19200, CBR_38400, CBR_56000, CBR_57600, CBR_115200{v1.02 removed: CRB_128000, CBR_256000} ); + +const + dcb_Binary = $00000001; + dcb_ParityCheck = $00000002; + dcb_OutxCtsFlow = $00000004; + dcb_OutxDsrFlow = $00000008; + dcb_DtrControlMask = $00000030; + dcb_DtrControlDisable = $00000000; + dcb_DtrControlEnable = $00000010; + dcb_DtrControlHandshake = $00000020; + dcb_DsrSensivity = $00000040; + dcb_TXContinueOnXoff = $00000080; + dcb_OutX = $00000100; + dcb_InX = $00000200; + dcb_ErrorChar = $00000400; + dcb_NullStrip = $00000800; + dcb_RtsControlMask = $00003000; + dcb_RtsControlDisable = $00000000; + dcb_RtsControlEnable = $00001000; + dcb_RtsControlHandshake = $00002000; + dcb_RtsControlToggle = $00003000; + dcb_AbortOnError = $00004000; + dcb_Reserveds = $FFFF8000; + +// Apply COM settings. +procedure TCommPortDriver.ApplyCOMSettings; +var dcb: TDCB; +begin + // Do nothing if not connected + if not Connected then + exit; + + // Clear all + fillchar( dcb, sizeof(dcb), 0 ); + // Setup dcb (Device Control Block) fields + dcb.DCBLength := sizeof(dcb); // dcb structure size + dcb.BaudRate := Win32BaudRates[ FComPortBaudRate ]; // baud rate to use + // Set fBinary: Win32 does not support non binary mode transfers + // (also disable EOF check) + dcb.Flags := dcb_Binary; + if EnableDTROnOpen then + { Enabled the DTR line when the device is opened and leaves it on } + dcb.Flags := dcb.Flags or dcb_DtrControlEnable; + + case FComPortHwHandshaking of // Type of hw handshaking to use + hhNONE:; // No hardware handshaking + hhRTSCTS: // RTS/CTS (request-to-send/clear-to-send) hardware handshaking + dcb.Flags := dcb.Flags or dcb_OutxCtsFlow or dcb_RtsControlHandshake; + end; + case FComPortSwHandshaking of // Type of sw handshaking to use + shNONE:; // No software handshaking + shXONXOFF: // XON/XOFF handshaking + dcb.Flags := dcb.Flags or dcb_OutX or dcb_InX; + end; + dcb.XONLim := FComPortInBufSize div 4; // Specifies the minimum number of bytes allowed + // in the input buffer before the XON character is sent + // (or CTS is set) + dcb.XOFFLim := 1; // Specifies the maximum number of bytes allowed in the input buffer + // before the XOFF character is sent. The maximum number of bytes + // allowed is calculated by subtracting this value from the size, + // in bytes, of the input buffer + dcb.ByteSize := 5 + ord(FComPortDataBits); // how many data bits to use + dcb.Parity := ord(FComPortParity); // type of parity to use + dcb.StopBits := ord(FComPortStopbits); // how many stop bits to use + dcb.XONChar := #17; // XON ASCII char + dcb.XOFFChar := #19; // XOFF ASCII char + SetCommState( FComPortHandle, dcb ); + { Flush buffers } + FlushBuffers( true, true ); + // Setup buffers size + SetupComm( FComPortHandle, FComPortInBufSize, FComPortOutBufSize ); +end; + +function TCommPortDriver.Connect: boolean; +var comName: string; + tms: TCOMMTIMEOUTS; +begin + // Do nothing if already connected + Result := Connected; + if Result then + exit; + // Open the COM port + SysUtils.FmtStr( comName, 'COM%-d', [1+ord(FComPort)] ); + FComPortHandle := CreateFile( + pchar(comName), + GENERIC_READ or GENERIC_WRITE, + 0, // Not shared + nil, // No security attributes + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + 0 // No template + ) ; + Result := Connected; + if not Result then + exit; + // Apply settings + ApplyCOMSettings; + // Setup timeouts: we disable timeouts because we are polling the com port! + tms.ReadIntervalTimeout := 1; // Specifies the maximum time, in milliseconds, + // allowed to elapse between the arrival of two + // characters on the communications line + tms.ReadTotalTimeoutMultiplier := 0; // Specifies the multiplier, in milliseconds, + // used to calculate the total time-out period + // for read operations. + tms.ReadTotalTimeoutConstant := 1; // Specifies the constant, in milliseconds, + // used to calculate the total time-out period + // for read operations. + tms.WriteTotalTimeoutMultiplier := 0; // Specifies the multiplier, in milliseconds, + // used to calculate the total time-out period + // for write operations. + tms.WriteTotalTimeoutConstant := 0; // Specifies the constant, in milliseconds, + // used to calculate the total time-out period + // for write operations. + SetCommTimeOuts( FComPortHandle, tms ); + // Start the timer (used for polling) + SetTimer( FNotifyWnd, 1, FComPortPollingDelay, nil ); +end; + +procedure TCommPortDriver.Disconnect; +begin + if Connected then + begin + // Stop the timer (used for polling) + KillTimer( FNotifyWnd, 1 ); + // Release the COM port + CloseHandle( FComPortHandle ); + // No more connected + FComPortHandle := 0; + end; +end; + +function TCommPortDriver.Connected: boolean; +begin + Result := FComPortHandle > 0; +end; + +// v1.02: flish rx/tx buffers +procedure TCommPortDriver.FlushBuffers( inBuf, outBuf: boolean ); +var dwAction: DWORD; +begin + if not Connected then + exit; + // Flush the RX data buffer + dwAction := 0; + if outBuf then + dwAction := dwAction or PURGE_TXABORT or PURGE_TXCLEAR; + // Flush the TX data buffer + if inBuf then + dwAction := dwAction or PURGE_RXABORT or PURGE_RXCLEAR; + PurgeComm( FComPortHandle, dwAction ); + // Used by the RX packet mechanism + FFirstByteOfPacketTime := DWORD(-1); // time not valid +end; + +// v1.02: returns the output buffer free space or 65535 if +// not connected } +function TCommPortDriver.OutFreeSpace: word; +var stat: TCOMSTAT; + errs: DWORD; +begin + if not Connected then + Result := 65535 + else + begin + ClearCommError( FComPortHandle, errs, @stat ); + Result := FComPortOutBufSize - stat.cbOutQue; + end; +end; + +// Send data +{function TCommPortDriver.SendData( DataPtr: pointer; DataSize: integer ): boolean; +var nsent: DWORD; +begin + Result := WriteFile( FComPortHandle, DataPtr^, DataSize, nsent, nil ); + Result := Result and (nsent=DataSize); +end;} + +{ Send data (breaks the data in small packets if it doesn't fit in the output + buffer) } +function TCommPortDriver.SendData( DataPtr: pointer; DataSize: integer ): integer; +var nToSend, nsent: integer; + t1: longint; +begin + { 0 bytes sent } + Result := 0; + { Do nothing if not connected } + if not Connected then + exit; + { Current time } + t1 := GetTickCount; + { Loop until all data sent or timeout occurred } + while DataSize > 0 do + begin + { Get output buffer free space } + nToSend := OutFreeSpace; + { If output buffer has some free space... } + if nToSend > 0 then + begin + { Don't send more bytes than we actually have to send } + if nToSend > DataSize then + nToSend := DataSize; + { Send } + WriteFile( FComPortHandle, DataPtr^, DataSize, nsent, nil ); + { Update number of bytes sent } + Result := Result + abs(nsent); + { Decrease the count of bytes to send } + DataSize := DataSize - abs(nsent); + { Get current time } + t1 := GetTickCount; + { Continue. This skips the time check below (don't stop + trasmitting if the FOutputTimeout is set too low) } + continue; + end; + { Buffer is full. If we are waiting too long then + invert the number of bytes sent and exit } + if (GetTickCount-t1) > FOutputTimeout then + begin + Result := -Result; + exit; + end; + end; +end; + +// Send a pascal string (NULL terminated if $H+ (default)) +function TCommPortDriver.SendString( s: string ): boolean; +var len: integer; +begin + len := length( s ); + {$IFOPT H+} + // New syle pascal string (NULL terminated) + Result := SendData( pchar(s), len ) = len; + {$ELSE} + // Old style pascal string (s[0] = length) + Result := SendData( pchar(@s[1]), len ) = len; + {$ENDIF} +end; + +// v1.02: send a C-style strings (NULL terminated) +function TCommPortDriver.SendZString( s: pchar ): boolean; +var len: integer; +begin + len := strlen( s ); + Result := SendData( s, len ) = len; +end; + +// v1.02: set DTR line high (onOff=TRUE) or low (onOff=FALSE). +// You must not use HW handshaking. +procedure TCommPortDriver.ToggleDTR( onOff: boolean ); +const funcs: array[boolean] of integer = (CLRDTR,SETDTR); +begin + if Connected then + EscapeCommFunction( FComPortHandle, funcs[onOff] ); +end; + +// v1.02: set RTS line high (onOff=TRUE) or low (onOff=FALSE). +// You must not use HW handshaking. +procedure TCommPortDriver.ToggleRTS( onOff: boolean ); +const funcs: array[boolean] of integer = (CLRRTS,SETRTS); +begin + if Connected then + EscapeCommFunction( FComPortHandle, funcs[onOff] ); +end; + +// COM port polling proc +// v1.03: added support for PacketSize +// v1.04: fixed some bugs +// v1.05: fixed some bugs +procedure TCommPortDriver.TimerWndProc( var msg: TMessage ); +var nRead, dummy: dword; + comStat: TCOMSTAT; + t: dword; +begin + if (msg.Msg = WM_TIMER) and Connected then + begin + // If PacketSize is > 0 then raise the OnReceiveData event only if the RX buffer + // has at least PacketSize bytes in it. + ClearCommError( FComPortHandle, dummy, @comStat ); + if (FPacketSize > 0) then + begin + // Complete packet received ? + if comStat.cbInQue >= FPacketSize then + begin + t := GetTickCount; + repeat + // Read the packet and pass it to the app + nRead := 0; + if ReadFile( FComPortHandle, FTempInBuffer^, FPacketSize, nRead, nil ) then + if (nRead <> 0) and Assigned(FComPortReceivePacket) then + FComPortReceivePacket( Self, FTempInBuffer, nRead, t-FFirstByteOfPacketTime ); + // Adjust time + if comStat.cbInQue > FPacketSize then + begin + t := t + DelayForRX( FComPortBaudRate, FPacketSize ); + FFirstByteOfPacketTime := FFirstByteOfPacketTime + DelayForRX( FComPortBaudRate, FPacketSize ) + end; + comStat.cbInQue := comStat.cbInQue - FPacketSize; + if comStat.cbInQue = 0 then + FFirstByteOfPacketTime := DWORD(-1); + until comStat.cbInQue < FPacketSize; + // Done + exit; + end; + // Handle packet timeouts + if (FPacketTimeout > 0) and (FFirstByteOfPacketTime <> DWORD(-1)) and + (GetTickCount - FFirstByteOfPacketTime > FPacketTimeout) then + begin + nRead := 0; + // Read the "incomplete" packet + if ReadFile( FComPortHandle, FTempInBuffer^, comStat.cbInQue, nRead, nil ) then + // If PacketMode is not pmDiscard then pass the packet to the app + if (FPacketMode <> pmDiscard) and (nRead <> 0) and Assigned(FComPortReceivePacket) then + FComPortReceivePacket( Self, FTempInBuffer, nRead, GetTickCount-FFirstByteOfPacketTime ); + // Restart waiting for a packet + FFirstByteOfPacketTime := DWORD(-1); + // Done + exit; + end; + // Start time + if (comStat.cbInQue > 0) and (FFirstByteOfPacketTime = DWORD(-1)) then + FFirstByteOfPacketTime := GetTickCount; + // Done + exit; + end; + + // Standard data handling + nRead := 0; + if ReadFile( FComPortHandle, FTempInBuffer^, FComPortInBufSize, nRead, nil ) then + if (nRead <> 0) and Assigned(FComPortReceiveData) then + FComPortReceiveData( Self, FTempInBuffer, nRead ); + end; +end; + +procedure Register; +begin + { Register this component and show it in the 'System' tab + of the component palette } + RegisterComponents('System', [TCommPortDriver]); +end; + +end. diff --git a/src/EnhWave.dcr b/src/EnhWave.dcr new file mode 100644 index 00000000..9ba984d8 Binary files /dev/null and b/src/EnhWave.dcr differ diff --git a/src/FngSingleInst.pas b/src/FngSingleInst.pas new file mode 100644 index 00000000..3c8d1015 --- /dev/null +++ b/src/FngSingleInst.pas @@ -0,0 +1,154 @@ +(* + Fnugry Box + Version 3.0 + Copyright 1996-97 Gleb Yourchenko + + File Name: FNGSINGLEINST.PAS + Description: Fnugry Single Instance Component + + + Version: 1.0.0.1 + Author(s): Gleb Yourchenko + Module: (SHARED) + Documentation: FNGSINGLEINST.DOC + + + Contact: + Gleb Yourchenko + eip__@hotmail.com + Please specify 'TFnugrySingleInstance' in the subject string + +*) + + + + +{$ASSERTIONS ON} + + +unit FngSingleInst; + +interface + +uses + Windows, SysUtils, Classes, Forms; + +type + + ESingleInstError = class(Exception); + + TAlreadyRunningEvent = procedure(Sender :TObject; + hPrevInst :THandle; hPrevWnd :HWND) of object; + + + TFnugrySingleInstance = class(TComponent) + private + FMappingHandle :THandle; + FOnAlreadyRunning :TAlreadyRunningEvent; + protected + procedure Loaded; override; + procedure AlreadyRunning(hPrevInst, hPrevWnd :THandle); virtual; + public + constructor Create(AOwner :TComponent); override; + destructor Destroy; override; + published + property OnAlreadyRunning :TAlreadyRunningEvent + read FOnAlreadyRunning write FOnAlreadyRunning; + end; + +procedure Register; + +implementation + + +procedure Register; +begin + RegisterCOmponents('Fnugry Tools', [TFnugrySingleINstance]); +end; + +type + + PInstInfo = ^TInstInfo; + TInstInfo = packed record + hPrevInst :THandle; + hPrevWnd :HWND; + end; + +var + + SingleInstInstance :TComponent = Nil; + +const + + sErrAlreadyExists = 'Only one instance of TFnugrySingleInstance is allowed'; + + +procedure TFnugrySingleInstance.AlreadyRunning( + hPrevInst, hPrevWnd :THandle); +begin + if assigned(FOnAlreadyRunning) then + FOnAlreadyRunning(Self, hPrevInst, hPrevWnd) + else + begin + SetForegroundWIndow(hPrevWnd); + Application.Terminate; + end; +end; + + +constructor TFnugrySingleInstance.Create(AOwner :TComponent); +begin + assert(SingleInstInstance = Nil, sErrAlreadyExists); + inherited Create(AOwner); + SingleInstInstance := Self; +end; + + +destructor TFnugrySingleInstance.Destroy; +begin + if FMappingHandle <> 0 then CloseHandle(FMappingHandle); + inherited Destroy; + SingleInstInstance := Nil; +end; + +procedure TFnugrySingleInstance.Loaded; +var + lpInfo :PInstInfo; + ParentForm :TComponent; +begin + inherited Loaded; + if not (csDesigning in ComponentState) then + begin + FMappingHandle := CreateFileMapping(0 {was -1}, NIL, + PAGE_READWRITE, 0, sizeof(TInstInfo), + PChar(ExtractFileName(ParamStr(0)))); + if FMappingHandle <> 0 then + begin + lpInfo := MapViewOfFile(FMappingHandle, + FILE_MAP_WRITE OR FILE_MAP_READ, 0, 0, sizeof(TInstInfo)); + if lpInfo <> Nil then + try + if GetLastError = ERROR_ALREADY_EXISTS then + AlreadyRunning(lpInfo^.hPrevInst, lpInfo^.hPrevWnd) + else + begin + ParentForm := Owner; + lpInfo^.hPrevInst := hInstance; + while (not (ParentForm is TForm)) and (ParentForm <> Nil) + do ParentForm := Owner; + if ParentForm <> Nil then lpInfo^.hPrevWnd := TForm(ParentForm).Handle; + end; + finally + UnmapViewOfFile(lpInfo); + end; + end; + end; +end; + + + +initialization +finalization + if SingleInstInstance <> Nil then + SingleInstInstance.Free; +end. diff --git a/src/FngSingleInst.~pas b/src/FngSingleInst.~pas new file mode 100644 index 00000000..2d3ff57b --- /dev/null +++ b/src/FngSingleInst.~pas @@ -0,0 +1,154 @@ +(* + Fnugry Box + Version 3.0 + Copyright 1996-97 Gleb Yourchenko + + File Name: FNGSINGLEINST.PAS + Description: Fnugry Single Instance Component + + + Version: 1.0.0.1 + Author(s): Gleb Yourchenko + Module: (SHARED) + Documentation: FNGSINGLEINST.DOC + + + Contact: + Gleb Yourchenko + eip__@hotmail.com + Please specify 'TFnugrySingleInstance' in the subject string + +*) + + + + +{$ASSERTIONS ON} + + +unit FngSingleInst; + +interface + +uses + Windows, SysUtils, Classes, Forms; + +type + + ESingleInstError = class(Exception); + + TAlreadyRunningEvent = procedure(Sender :TObject; + hPrevInst :THandle; hPrevWnd :HWND) of object; + + + TFnugrySingleInstance = class(TComponent) + private + FMappingHandle :THandle; + FOnAlreadyRunning :TAlreadyRunningEvent; + protected + procedure Loaded; override; + procedure AlreadyRunning(hPrevInst, hPrevWnd :THandle); virtual; + public + constructor Create(AOwner :TComponent); override; + destructor Destroy; override; + published + property OnAlreadyRunning :TAlreadyRunningEvent + read FOnAlreadyRunning write FOnAlreadyRunning; + end; + +procedure Register; + +implementation + + +procedure Register; +begin + RegisterCOmponents('Fnugry Tools', [TFnugrySingleINstance]); +end; + +type + + PInstInfo = ^TInstInfo; + TInstInfo = packed record + hPrevInst :THandle; + hPrevWnd :HWND; + end; + +var + + SingleInstInstance :TComponent = Nil; + +const + + sErrAlreadyExists = 'Only one instance of TFnugrySingleInstance is allowed'; + + +procedure TFnugrySingleInstance.AlreadyRunning( + hPrevInst, hPrevWnd :THandle); +begin + if assigned(FOnAlreadyRunning) then + FOnAlreadyRunning(Self, hPrevInst, hPrevWnd) + else + begin + SetForegroundWIndow(hPrevWnd); + Application.Terminate; + end; +end; + + +constructor TFnugrySingleInstance.Create(AOwner :TComponent); +begin + assert(SingleInstInstance = Nil, sErrAlreadyExists); + inherited Create(AOwner); + SingleInstInstance := Self; +end; + + +destructor TFnugrySingleInstance.Destroy; +begin + if FMappingHandle <> 0 then CloseHandle(FMappingHandle); + inherited Destroy; + SingleInstInstance := Nil; +end; + +procedure TFnugrySingleInstance.Loaded; +var + lpInfo :PInstInfo; + ParentForm :TComponent; +begin + inherited Loaded; + if not (csDesigning in ComponentState) then + begin + FMappingHandle := CreateFileMapping(0, NIL, + PAGE_READWRITE, 0, sizeof(TInstInfo), + PChar(ExtractFileName(ParamStr(0)))); + if FMappingHandle <> 0 then + begin + lpInfo := MapViewOfFile(FMappingHandle, + FILE_MAP_WRITE OR FILE_MAP_READ, 0, 0, sizeof(TInstInfo)); + if lpInfo <> Nil then + try + if GetLastError = ERROR_ALREADY_EXISTS then + AlreadyRunning(lpInfo^.hPrevInst, lpInfo^.hPrevWnd) + else + begin + ParentForm := Owner; + lpInfo^.hPrevInst := hInstance; + while (not (ParentForm is TForm)) and (ParentForm <> Nil) + do ParentForm := Owner; + if ParentForm <> Nil then lpInfo^.hPrevWnd := TForm(ParentForm).Handle; + end; + finally + UnmapViewOfFile(lpInfo); + end; + end; + end; +end; + + + +initialization +finalization + if SingleInstInstance <> Nil then + SingleInstInstance.Free; +end. diff --git a/src/GrabBar.bmp b/src/GrabBar.bmp new file mode 100644 index 00000000..209a4706 Binary files /dev/null and b/src/GrabBar.bmp differ diff --git a/src/GrabBar.pas b/src/GrabBar.pas new file mode 100644 index 00000000..f84852c9 --- /dev/null +++ b/src/GrabBar.pas @@ -0,0 +1,659 @@ +{ -------------------------------------------------------------------------------------} +{ A grab bar, or splitter, to allow two windows to be resized simultaneously. } +{ Copyright 1996, Brad Stowers. All Rights Reserved. } +{ This component can be freely used and distributed in commercial and private } +{ environments, provied this notice is not modified in any way. } +{ -------------------------------------------------------------------------------------} +{ Feel free to contact me if you have any questions, comments or suggestions at } +{ bstowers@pobox.com or 72733,3374 on CompuServe. } +{ -------------------------------------------------------------------------------------} +{ Date last modified: 12/10/96 } +{ -------------------------------------------------------------------------------------} + +{ -------------------------------------------------------------------------------------} +{ TGrabBar v1.04 } +{ -------------------------------------------------------------------------------------} +{ Description: } +{ A bar that allows two TWinControl components to be resized by dragging it. } +{ Problems: } +{ Because of the DCX_PARENTCLIP in GetDCEx, moving bar over controls that } +{ are not involved in the moving process will get a bar drawn on them. } +{ But, in practice, the bar should never be in a position to move over } +{ windows that it is not connected with. Without this, couldn't see bar } +{ over controls created after it. } +{ Does not get along with siblings who are alClient aligned. Use a TPanel } +{ as parent of bar and siblings and align the panel as alClient. } +{ } +{ Needs: } +{ Keyboard interface. } +{ -------------------------------------------------------------------------------------} +{ Revision History: } +{ 1.00: + Initial release } +{ 1.01: + Stupid last minute optimization broke the thing. Fixed. } +{ 1.02: + Automatically adjusts windows it owns to proper alignment in this way: } +{ Alignment of alNone is not adjusted. alClient is changed to } +{ alLeft/alRight or alTop/alBottom based on current divider style. } +{ alLeft/alRight and alTop/alBottom are validated, i.e. if WindowA property } +{ is aligned alRight, it is changed to be alLeft, or if WindowB was alLeft } +{ in a gbHorizonal bar, it would be changed to alTop. } +{ + Changing the style now will now move the control to the center of parent } +{ window. Before it would be something silly like flush top or left. } +{ 1.03: + Resource for 16 and 32-bit version. This takes the place of a } +{ DCR file, which can't be compatible with both. See the $R directive below. } +{ To compile the resource file, use the following } +{ Delphi 1: BRCC.EXE -foGrabBar.r16 -31 GrabBar.rc } +{ Delphi 2: BRCC32.EXE -foGrabBar.r32 -w32 GrabBar.rc } +{ 1.04: + Fixed problem that could allow bar to be moved under controls that were not } +{ being separated by the bar. This would hide the bar from the user. } +{ + Fixed bug that would, under certain conditions, cause the bar to have an } +{ incorrect thickness. } +{ + Fixed bug that would allow you to select the same window for both WindowA } +{ and WindowB properties. Caused nasty crash when the control is removed. } +{ + Added DragUpdate property that resizes the split windows as you drag the } +{ grab bar. } +{ -------------------------------------------------------------------------------------} + +unit GrabBar; + +interface + +{$IFDEF WIN32} + {$R GrabBar.r32} +{$ELSE} + {$R GrabBar.r16} +{$ENDIF} + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs; + +type + TGrabBarStyle = (gbHorizontal, gbVertical); + + TGrabBar = class(TCustomControl) + private + { Property Variables } + FBorderStyle: TBorderStyle; + FStyle: TGrabBarStyle; + FWindowA, + FWindowB: TWinControl; + FDragUpdate: boolean; + + { Event Variables } + FOnMove: TNotifyEvent; + + { Internal Variables } + LastRect: TRect; + OldWndProc: TFarProc; + NewWndProc: Pointer; + FDragging: boolean; + + { Utility functions } + procedure HookParent; + procedure UnhookParent; + procedure HookWndProc(var Message: TMessage); + + function BarRect(APoint: TPoint): TRect; + function ClientToParent(APoint: TPoint): TPoint; + procedure InvertedRect(R: TRect; InvertLast: boolean); + procedure MoveWindows; + procedure ResizeBar; + + { Message response methods } + procedure CMCtl3DChanged(var Message: TMessage); message CM_CTL3DCHANGED; + procedure WMMove(var Msg: TWMMove); message WM_MOVE; + procedure WMSize(var Msg: TWMSize); message WM_SIZE; + protected + { Property methods } + procedure SetBorderStyle(Value: TBorderStyle); + procedure SetStyle(Value: TGrabBarStyle); + function GetThickness: Integer; + procedure SetThickness(Value: Integer); + procedure SetWindowA(Value: TWinControl); + procedure SetWindowB(Value: TWinControl); + + { Overriden methods } + procedure SetParent(Value: TWinControl); override; + procedure Paint; override; + procedure MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); override; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + procedure MouseUp(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); override; + procedure Notification(AComponent: TComponent; + Operation: TOperation); override; + procedure SetBounds(ALeft,ATop,AWidth,AHeight: Integer); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + { Properties } + property BorderStyle: TBorderStyle + read FBorderStyle write SetBorderStyle + default bsSingle; + property DragUpdate: boolean + read FDragUpdate write FDragUpdate + default FALSE; + property Style: TGrabBarStyle + read FStyle write SetStyle + default gbHorizontal; + property Thickness: integer + read GetThickness write SetThickness; + property WindowA: TWinControl + read FWindowA write SetWindowA; + property WindowB: TWinControl + read FWindowB write SetWindowB; + { Events } + property OnMove: TNotifyEvent + read FOnMove write FOnMove; + + { Publish Inherited Protected Properties } + property Color; + property Ctl3D; + property Cursor + default crVSplit; + property Hint; + property ParentColor; + property ParentCtl3D; + property ParentShowHint; + property ShowHint; + property Visible; + + { Publish Inherited Protected Events } + property OnClick; + property OnDblClick; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + end; + + procedure Register; + +implementation + +{ Note that the "hook" is not installed here. Parent is not valid in the } +{ constructor. See SetParent. } +constructor TGrabBar.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + { Initialize variables } + FDragging := FALSE; + FDragUpdate := FALSE; + NewWndProc := NIL; + OldWndProc := NIL; + SetRectEmpty(LastRect); + { Set Defaults } + FBorderStyle := bsSingle; + FStyle := gbHorizontal; + Cursor := crVSplit; + Thickness := 4 +end; + +destructor TGrabBar.Destroy; +begin + if FDragging then { Remove the clipping of the mouse cursor } + ClipCursor(NIL); + { Always make sure that the hook is removed. } + UnhookParent; + inherited Destroy; +end; + +{ This procedure is used to get the parent's window procedure, save it, } +{ and replace it with our own. This allows see all of the parent's messages } +{ before it does. } +procedure TGrabBar.HookParent; +begin + { If there is no parent, we can't hook it. } + if Parent = NIL then exit; + { Get the old window procedure via API call and store it. } + OldWndProc := TFarProc(GetWindowLong(Parent.Handle, GWL_WNDPROC)); + { Convert our object method into something Windows knows how to call } + NewWndProc := MakeObjectInstance(HookWndProc); + { Install it as the new Parent window procedure } + SetWindowLong(Parent.Handle, GWL_WNDPROC, LongInt(NewWndProc)); +end; + +{ Remove our window function and reinstall the original. } +procedure TGrabBar.UnhookParent; +begin + { We must have a parent, and we must have already hooked it. } + if (Parent <> NIL) and assigned(OldWndProc) then + { Set back to original window procedure } + SetWindowLong(Parent.Handle, GWL_WNDPROC, LongInt(OldWndProc)); + { If we have created a window procedure via MakeObjectInstance, } + { it must be disposed of. } + if assigned(NewWndProc) then + FreeObjectInstance(NewWndProc); + { Reset variables to NIL } + NewWndProc := NIL; + OldWndProc := NIL; +end; + +{ The window procedure that is installed into our parent. } +procedure TGrabBar.HookWndProc(var Message: TMessage); +begin + { If there's no parent, something has really gone wrong. } + if Parent = NIL then exit; + with Message do begin + { If Parent gets a WM_SIZE message, it has been resized } + if (Msg = WM_SIZE) and (wParam <> SIZE_MINIMIZED) then begin + { We need to resize the bar so it fits in the new size } + ResizeBar; + { And update the positions of the windows we control } + MoveWindows; + end; + + { ALWAYS call the old window procedure so the parent can process its } + { messages. Thanks to Gary Frerking for pointing me at CallWindowProc. } + { I was trying to call the function directly, which died horribly. } + Result := CallWindowProc(OldWndProc, Parent.Handle, Msg, wParam, lParam); + end; +end; + +{ Function to calculate rectangle coordinates of the bar given a point. } +function TGrabBar.BarRect(APoint: TPoint): TRect; +begin + SetRectEmpty(Result); + if Parent = nil then exit; + if FStyle = gbHorizontal then + Result := Bounds(0, APoint.Y - (Thickness div 2), + Parent.ClientWidth, Thickness) + else + Result := Bounds(APoint.X - (Thickness div 2), 0, + Thickness, Parent.ClientHeight); +end; + +{ Convert from our client coordinates to parent's client coordinates. } +function TGrabBar.ClientToParent(APoint: TPoint): TPoint; +begin + if Parent = NIL then + Result := ClientToScreen(APoint) + else begin + Result := ClientToScreen(APoint); + Result := Parent.ScreenToClient(Result); + end; +end; + +{ Draw an inverted rectangle on the parent to indicate where the bar } +{ will be when it is released. } +procedure TGrabBar.InvertedRect(R: TRect; InvertLast: boolean); +var + aDC: hDC; +begin + if Parent = nil then exit; + { Get the parent's device context (something we can draw on). Flags } + { indicate that we want to be able to draw anywhere on the parent, } + { regardless of what it's child windows have to say about it. Also } + { speed it up a bit. } + aDC := GetDCEx(Parent.Handle, 0, DCX_PARENTCLIP or DCX_CACHE); + { Invert the last rectange we drew to remove it. } + { Inverted + Inverted = NOT Inverted. } + if InvertLast and not IsRectEmpty(LastRect) then + InvertRect(aDC, LastRect); + { Draw the new rectangle } + InvertRect(aDC, R); + { Release the DC when done with it or very bad things will happen. } + ReleaseDC(Parent.Handle, aDC); +end; + +{ Reposition the windows we are responsible for. } +procedure TGrabBar.MoveWindows; + { Move the top or left window by setting its height or width } + procedure MoveWindowA; + begin + if FStyle = gbHorizontal then + FWindowA.Height := Top - FWindowA.Top + else + FWindowA.Width := Left - FWindowA.Left; + end; + + { Move the bottom or right window by recalculating its Top or Left } + procedure MoveWindowB; + var + X, Y: integer; + begin + if FStyle = gbHorizontal then begin + X := Top + Thickness; + Y := FWindowB.Height + FWindowB.Top - X; + with FWindowB do SetBounds(Left, X, Width, Y); + end else begin + X := Left + Thickness; + Y := FWindowB.Width + (FWindowB.Left - X); + with FWindowB do SetBounds(X, Top, Y, Height); + end; + end; +begin + if Parent = NIL then exit; + { Disable parent aligning until we move both windows. If we don't, the } + { parent will try to reposition aligned controls when they are moved. } + { This produces scrollbars in some cases and annoying flicker most always. } + Parent.DisableAlign; + if assigned(FWindowA) then + MoveWindowA; + if assigned(FWindowB) then + MoveWindowB; + { Tell parent it can align controls now if it wants. We have repositioned } + { windows and they should not need further moving. } + Parent.EnableAlign; +end; + +{ Reset the bar's size to fill the client's width or height. } +procedure TGrabBar.ResizeBar; +begin + if (Parent = NIL) then exit; + if FStyle = gbHorizontal then + SetBounds(0, Top, Parent.ClientWidth, Thickness) + else + SetBounds(Left, 0, Thickness, Parent.ClientHeight); +end; + +{ The value of the Ctl3D property has changed, invalidate the control so } +{ that it is redrawn to reflect the change. } +procedure TGrabBar.CMCtl3DChanged(var Message: TMessage); +begin + inherited; + Invalidate; +end; + +{ We have been moved. Make sure we are as wide or tall as the parent. } +procedure TGrabBar.WMMove(var Msg: TWMMove); +begin + inherited; + ResizeBar; +end; + +{ We have been resized. Make sure we are as wide or tall as the parent. } +procedure TGrabBar.WMSize(var Msg: TWMSize); +begin + inherited; + ResizeBar; +end; + +{ BorderStyle property has changed. Redraw control to reflect change. } +procedure TGrabBar.SetBorderStyle(Value: TBorderStyle); +begin + if Value = FBorderStyle then exit; + FBorderStyle := Value; + Invalidate; +end; + +{ A Parent has been assigned or changed. Unhook old parent and install } +{ hook in new parent. } +procedure TGrabBar.SetParent(Value: TWinControl); +begin + { UnhookParent knows if the current parent has been hooked or not } + UnhookParent; + { Set Parent to the new value } + inherited SetParent(Value); + { Hook the new parent's window procedure } + HookParent; + { Size ourselves to fill the new parent's client area } + ResizeBar; + { Position our windows accordingly } + MoveWindows; +end; + +{ Set whether the bar is horizontal or vertical, setting the cursor } +{ accordingly. } +procedure TGrabBar.SetStyle(Value: TGrabBarStyle); +begin + if Value = FStyle then exit; + FStyle := Value; + if FStyle = gbHorizontal then begin + Cursor := crVSplit; + Height := Width; +{ if Parent <> NIL then + Top := Parent.ClientHeight div 2;} + end else begin + Cursor := crHSplit; + Width := Height; +{ if Parent <> NIL then + Left := Parent.ClientWidth div 2;} + end; + ResizeBar; +end; + +{ Return the thickness of the bar, depending on the orientation. } +function TGrabBar.GetThickness: integer; +begin + if FStyle = gbHorizontal then + Result := Height + else + Result := Width; +end; + +{ Set the thickness, depending on the orientation. } +procedure TGrabBar.SetThickness(Value: integer); +begin + if (Value = Thickness) or (Value < 0) then exit; + if FStyle = gbHorizontal then + Height := Value + else + Width := Value; +end; + +{ Set a window we are responsible for. Do not allow selection of ourself or } +{ the other window being split. } +procedure TGrabBar.SetWindowA(Value: TWinControl); +begin + if (Value = FWindowA) or (Value = FWindowB) or (Value = Self) then exit; + FWindowA := Value; + { Position it correctly with the bar. } + MoveWindows; +end; + +{ Set a window we are responsible for. Do not allow selection of ourself or } +{ the other window being split. } +procedure TGrabBar.SetWindowB(Value: TWinControl); +begin + if (Value = FWindowA) or (Value = FWindowB) or (Value = Self) then exit; + FWindowB := Value; + { Position it correctly with the bar. } + MoveWindows; +end; + +{ TCustomControl descendants know nothing about how to paint themselves. } +{ We are entirely responsible for drawing ourself. There is no reason to } +{ call the inherited method. } +procedure TGrabBar.Paint; +var + Offset: byte; +begin + with Canvas do begin + { Set the background color to the color the user has selected } + Brush.Color := Color; + + if FBorderStyle = bsSingle then begin + { If there is a border, set the color to Windows' frame color } + { and set and offset so we don't draw over in Ctl3D painting } + Pen.Color := clWindowFrame; + Offset := 1; + end else begin + { If no border, hide it by setting the pen to the same color } + { as the background. No offset needed for Ctl3D painting } + Pen.Color := Color; + Offset := 0; + end; + { Draw the bar } + with ClientRect do Rectangle(Left, Top, Right, Bottom); + + { CTL3D.DLL knows nothing about how to 3-D shade a grab bar, so } + { we have to simulate it ourselves, accounting for a frame } + if Ctl3D then begin + { Draw the left and top lines in white } + Pen.Color := clWhite; + MoveTo(Offset, Height-Offset-1); + LineTo(Offset, Offset); + LineTo(Width-Offset-1, Offset); + { Draw the right and bottom lines in gray } + Pen.Color := clGray; + LineTo(Width-Offset-1, Height-Offset-1); + LineTo(Offset, Height-Offset-1); + end; + end; +end; + +{ Mouse button has been pressed. Setup for moving the bar. This is only } +{ called when the application is running, not in design mode. } +procedure TGrabBar.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); + function Min(i1, i2: integer): integer; + begin + if i1 > i2 then + Result := i2 + else + Result := i1; + end; + + function Max(i1, i2: integer): integer; + begin + if i1 < i2 then + Result := i2 + else + Result := i1; + end; +var + WARect, WBRect, + ClipRect: TRect; +begin + inherited MouseDown(Button, Shift, X, Y); + { If no parent or not left button pressed, no reason to go on } + if (Parent = NIL) or (Button <> mbLeft) then exit; + +(* + { Get the rectangle of our parent } + ClipRect := Parent.ClientRect; + { Convert rectangle to screen coords. Simpler than calling ClientToScreen } + { twice, once for TopLeft and again for BottomRight } + with Parent.ClientOrigin do OffsetRect(ClipRect, X, Y); +*) + + if WindowA = NIL then + GetWindowRect(Parent.Handle, WARect) + else + GetWindowRect(WindowA.Handle, WARect); + + if WindowB = NIL then + GetWindowRect(Parent.Handle, WBRect) + else + GetWindowRect(WindowB.Handle, WBRect); + + with ClipRect do begin + Left := Min(WARect.Left, WBRect.Left); + Top := Min(WARect.Top, WBRect.Top); + Right := Max(WARect.Right, WBRect.Right); + Bottom := Max(WARect.Bottom, WBRect.Bottom); + end; + + { Subtract our size from the rectange } + if FStyle = gbHorizontal then begin + Inc(ClipRect.Top, Thickness div 2); + Dec(ClipRect.Bottom, (Thickness div 2) - 1); + end else begin + Inc(ClipRect.Left, Thickness div 2); + Dec(ClipRect.Right, (Thickness div 2) - 1); + end; + + { Clip the mouse cursor to the rectangle. Prevents from moving out of it } + ClipCursor(@ClipRect); + FDragging := TRUE; + LastRect := BoundsRect; + if not FDragUpdate then { Draw the indicator bar } + InvertedRect(LastRect, FALSE); +end; + +{ The mouse has moved. Move the indicator bar accordingly. } +procedure TGrabBar.MouseMove(Shift: TShiftState; X, Y: Integer); +var + R: TRect; +begin + inherited MouseMove(Shift, X, Y); + if (ssLeft in Shift) and FDragging then begin + { Convert our client point to our parent's client point } + R := BarRect(ClientToParent(Point(X,Y))); + { If the bar is still in the same place as last time, } + { there's nothing to do } + if EqualRect(R, LastRect) or IsRectEmpty(R) then exit; + if not FDragUpdate then { Draw the indicator bar } + InvertedRect(R, TRUE); + LastRect := R; + + if FDragUpdate then { Update the bar's position. This updates windows, too} + if FStyle = gbHorizontal then + Top := LastRect.Top + else + Left := LastRect.Left; + end; +end; + +{ The mouse button has been released, update the position of the } +{ bar and it's windows. } +procedure TGrabBar.MouseUp(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +var + OldRect, + Intersect: TRect; +begin + inherited MouseUp(Button, Shift, X, Y); + { Don't do anything if it wasn't the left button. } + if not ((Button = mbLeft) and FDragging) then exit; + + { Remove the clipping of the mouse cursor } + ClipCursor(NIL); + FDragging := FALSE; + if not IsRectEmpty(LastRect) then begin + if not FDragUpdate then { Remove the last indicator bar } + InvertedRect(LastRect, FALSE); + OldRect := BoundsRect; + { Update the bar position. Because SetBounds is overridden, } + { the other windows will be moved accordingly. } + if FStyle = gbHorizontal then + Top := LastRect.Top + else + Left := LastRect.Left; + if not FDragUpdate then begin + { If new rect is in old rect, part of inverted rect gets left over. } + { Invalidate the control and update so it is repainted immediately. } + IntersectRect(Intersect, LastRect, OldRect); + if not IsRectEmpty(Intersect) then begin + Invalidate; + Update; + end; + end; + end; + SetRectEmpty(LastRect); + { Fire the OnMove event if there is one } + if assigned(FOnMove) then + FOnMove(Self); +end; + +{ We have be notified of a change in the on-form components. If it is one } +{ that we are responsible for, update variables accordingly. } +procedure TGrabBar.Notification(AComponent: TComponent; Operation: TOperation); +begin + if Operation = opRemove then begin + if AComponent = FWindowA then + FWindowA := NIL; + if AComponent = FWindowB then + FWindowB := NIL; + end; +end; + +{ Every change to Top, Left, Width and Height come through this procedure. } +{ The statement: Top := 10; will result in the procedure being called. By } +{ overriding it, we can ensure that the windows our repositioned every time } +{ we are moved. } +procedure TGrabBar.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); +begin + inherited SetBounds(ALeft, ATop, AWidth, AHeight); + MoveWindows; +end; + +{ Add the components to the Delphi Component Palette. You will want to } +{ modify this so that it appears on the page of your choice. } +procedure Register; +begin + RegisterComponents('My Controls', [TGrabBar]); +end; + +end. diff --git a/src/GrabBar.r16 b/src/GrabBar.r16 new file mode 100644 index 00000000..7f84a7bb Binary files /dev/null and b/src/GrabBar.r16 differ diff --git a/src/GrabBar.r32 b/src/GrabBar.r32 new file mode 100644 index 00000000..a1d76894 Binary files /dev/null and b/src/GrabBar.r32 differ diff --git a/src/GrabBar.rc b/src/GrabBar.rc new file mode 100644 index 00000000..96999420 --- /dev/null +++ b/src/GrabBar.rc @@ -0,0 +1 @@ +TGRABBAR BITMAP MOVEABLE PURE LOADONCALL DISCARDABLE "GrabBar.bmp" diff --git a/src/HEMIBTN.DCR b/src/HEMIBTN.DCR new file mode 100644 index 00000000..5ab03c1d Binary files /dev/null and b/src/HEMIBTN.DCR differ diff --git a/src/HEMIBTN.DCU b/src/HEMIBTN.DCU new file mode 100644 index 00000000..5ccabd87 Binary files /dev/null and b/src/HEMIBTN.DCU differ diff --git a/src/JLLabel.pas b/src/JLLabel.pas new file mode 100644 index 00000000..80c8defe --- /dev/null +++ b/src/JLLabel.pas @@ -0,0 +1,300 @@ +unit JLLabel; +{==========================================================================} +{ JL's RotateLabel with 3D-effects } +{ } +{ Copyright 1996 by Jrg Lingner, Munich, Germany (jlingner@t-online.de) } +{ } +{ FREEWARE } +{ Free to use and redistribute. } +{ No warranty is given by the author, expressed or implied. } +{ } +{ 3D-effects: from RZLABEL-component } +{ Copyright by Ray Konopka (Raize Software Solutions, Inc.) } +{--------------------------------------------------------------------------} +{ This component works like TLabel and has 2 additional properties: } +{ } +{ Escapement: draw text with angle (0..360 deg) } +{ selected font must be a TrueType!!! } +{ } +{ TextStyle: draw text with 3D-effects tsRecessed } +{ tsRaised } +{ tsNone } +{ } +{--------------------------------------------------------------------------} +{ Vers. Date Remarks } +{ 1.0 30.03.97 Initial release } +{ } +{==========================================================================} +interface + +uses + + WinProcs, Wintypes, Messages, SysUtils, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, Menus; + +type + TTextStyle = (tsNone,tsRaised,tsRecessed); + + TRotateLabel = class(TCustomLabel) + private + fEscapement : Integer; + fTextStyle : TTextStyle; + procedure SetEscapement(aVal:Integer); + procedure SetTextStyle (aVal:TTextStyle); + procedure CalcTextPos(var aRect:TRect;aAngle:Integer;aTxt:String); + procedure DrawAngleText(aCanvas:TCanvas;aRect:TRect;aAngle:Integer;aTxt:String); + protected + procedure DoDrawText(var Rect:TRect;Flags:Word); + procedure Paint; override; + public + constructor Create(AOwner: TComponent); override; + published + property Escapement: Integer read fEscapement write SetEscapement; + property TextStyle : TTextStyle read fTextStyle write SetTextStyle; + property Align; + property Alignment; + property AutoSize; + property Caption; + property Color; + property DragCursor; + property DragMode; + property Enabled; + property FocusControl; + property Font; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowAccelChar; + property ShowHint; + property Transparent; + property Visible; + property WordWrap; + property OnClick; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDrag; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + {$IFDEF WIN32} + property OnStartDrag; + {$ENDIF} + end; + +procedure Register; + +{==========================================================================} +implementation + + + +procedure Register; +{==========================================================================} +begin + RegisterComponents('Grafik', [TRotateLabel]); +end; +{==========================================================================} + +constructor TRotateLabel.Create(aOwner:TComponent); +{==========================================================================} +begin + inherited Create(aOwner); + + fEscapement:= 45; + fTextStyle := tsRaised; + Font.Name := 'Arial'; +end; +{==========================================================================} + +procedure TRotateLabel.SetEscapement(aVal:Integer); +{==========================================================================} +begin + if fEscapement <> aVal then begin + if aVal < 0 then begin + while aVal < -360 do aVal := aVal + 360; + aVal := 360 + aVal; + end; + while aVal > 360 do aVal := aVal - 360; + fEscapement := aVal; + Invalidate; + end; +end; +{==========================================================================} + +procedure TRotateLabel.SetTextStyle(aVal:TTextStyle); +{==========================================================================} +begin + if fTextStyle <> aVal then begin + fTextStyle := aVal; + Invalidate; + end; +end; +{==========================================================================} + +procedure TRotateLabel.Paint; +{==========================================================================} +const + Alignments: array[TAlignment] of Word = (DT_LEFT,DT_RIGHT,DT_CENTER); + WordWraps : array[Boolean] of Word = (0,DT_WORDBREAK); +var + Rect: TRect; +begin + with Canvas do begin + if not Transparent then begin + Brush.Color := Self.Color; + Brush.Style := bsSolid; + FillRect(ClientRect); + end; + Brush.Style := bsClear; + Rect := ClientRect; + DoDrawText(Rect,DT_EXPANDTABS or WordWraps[WordWrap] or Alignments[Alignment]); + end; +end; +{==========================================================================} + +procedure TRotateLabel.CalcTextPos(var aRect:TRect;aAngle:Integer;aTxt:String); +{==========================================================================} +{ Calculate text pos. depend. on: Font, Escapement, Alignment and length } +{ if AutoSize true : set properties Height and Width } +{--------------------------------------------------------------------------} +var DC : HDC; + hSavFont: HFont; + Size : TSize; + x,y : Integer; + cStr : array[0..255] of Char; + +begin + StrPCopy(cStr,aTxt); + DC := GetDC(0); + hSavFont := SelectObject(DC,Font.Handle); + {$IFDEF WIN32} + GetTextExtentPoint32(DC,cStr,Length(aTxt),Size); + {$ELSE} + GetTextExtentPoint(DC,cStr,Length(aTxt),Size); + {$ENDIF} + SelectObject (DC,hSavFont); + ReleaseDC(0,DC); + + if aAngle<=90 then begin { 1.Quadrant } + x := 0; + y := Trunc(Size.cx * sin(aAngle*Pi/180)); + end else if aAngle<=180 then begin { 2.Quadrant } + x := Trunc(Size.cx * -cos(aAngle*Pi/180)); + y := Trunc(Size.cx * sin(aAngle*Pi/180) + Size.cy * cos((180-aAngle)*Pi/180)); + end else if aAngle<=270 then begin { 3.Quadrant } + x := Trunc(Size.cx * -cos(aAngle*Pi/180) + Size.cy * sin((aAngle-180)*Pi/180)); + y := Trunc(Size.cy * sin((270-aAngle)*Pi/180)); + end else if aAngle<=360 then begin { 4.Quadrant } + x := Trunc(Size.cy * sin((360-aAngle)*Pi/180)); + y := 0; + end; + aRect.Top := aRect.Top +y; + aRect.Left:= aRect.Left+x; + + x := Abs(Trunc(Size.cx * cos(aAngle*Pi/180))) + Abs(Trunc(Size.cy * sin(aAngle*Pi/180))); + y := Abs(Trunc(Size.cx * sin(aAngle*Pi/180))) + Abs(Trunc(Size.cy * cos(aAngle*Pi/180))); + + if Autosize then begin + Width := x; + Height := y; + end else if Alignment = taCenter then begin + aRect.Left:= aRect.Left + ((Width-x) div 2); + end else if Alignment = taRightJustify then begin + aRect.Left:= aRect.Left + Width - x; + end; +end; +{==========================================================================} + +procedure TRotateLabel.DrawAngleText(aCanvas:TCanvas;aRect:tRect;aAngle:Integer;aTxt:String); +{==========================================================================} +{ Draw text with FontIndirect (angle -> escapement) } +{--------------------------------------------------------------------------} +var LFont : TLogFont; + hOldFont, hNewFont: HFont; +begin + CalcTextPos(aRect,aAngle,aTxt); + + GetObject(aCanvas.Font.Handle,SizeOf(LFont),Addr(LFont)); + LFont.lfEscapement := aAngle*10; + hNewFont := CreateFontIndirect(LFont); + hOldFont := SelectObject(aCanvas.Handle,hNewFont); + + aCanvas.TextOut(aRect.Left,aRect.Top,aTxt); + + hNewFont := SelectObject(aCanvas.Handle,hOldFont); + DeleteObject(hNewFont); +end; +{==========================================================================} + +procedure TRotateLabel.DoDrawText(var Rect:TRect;Flags:Word); +{==========================================================================} +{ Draw the text normal or with angle and with 3D-effects } +{ } +{ 3D-effects: RZLABEL-component } +{ (c) by Ray Konopka (Raize Software Solutions, Inc.) } +{--------------------------------------------------------------------------} +var Text : String; + TmpRect : TRect; + UpperColor : TColor; + LowerColor : TColor; + {$IFDEF WINDOWS} + cStr : array[0..255] of Char; + {$ENDIF} + begin + Text := Caption; + {$IFDEF WINDOWS} + StrPCopy(cStr,Text); + {$ENDIF} + + if (Flags and DT_CALCRECT <> 0) and ((Text = '') or ShowAccelChar and + (Text[1] = '&') and (Text[2] = #0)) then Text := Text + ' '; + + if not ShowAccelChar then Flags := Flags or DT_NOPREFIX; + Canvas.Font := Font; + + UpperColor := clBtnHighlight; + LowerColor := clBtnShadow; + + if FTextStyle = tsRecessed then begin + UpperColor := clBtnShadow; + LowerColor := clBtnHighlight; + end; + + if FTextStyle in [tsRecessed,tsRaised] then begin + TmpRect := Rect; + OffsetRect(TmpRect,1,1); + Canvas.Font.Color := LowerColor; + if fEscapement <> 0 then DrawAngleText(Canvas,TmpRect,fEscapement,Text) + {$IFDEF WIN32} + else DrawText(Canvas.Handle,pChar(Text),Length(Text),TmpRect,Flags); + {$ELSE} + else DrawText(Canvas.Handle,cStr,Length(Text),TmpRect,Flags); + {$ENDIF} + + TmpRect := Rect; + OffsetRect(TmpRect,-1,-1); + Canvas.Font.Color := UpperColor; + if fEscapement <> 0 then DrawAngleText(Canvas,TmpRect,fEscapement,Text) + {$IFDEF WIN32} + else DrawText(Canvas.Handle,pChar(Text),Length(Text),TmpRect,Flags); + {$ELSE} + else DrawText(Canvas.Handle,cStr,Length(Text),TmpRect,Flags); + {$ENDIF} + end; + + Canvas.Font.Color := Font.Color; + + if not Enabled then Canvas.Font.Color := clGrayText; + + if fEscapement <> 0 then DrawAngleText(Canvas,Rect,fEscapement,Text) + {$IFDEF WIN32} + else DrawText(Canvas.Handle,pChar(Text),Length(Text),Rect,Flags); + {$ELSE} + else DrawText(Canvas.Handle,cStr,Length(Text),Rect,Flags); + {$ENDIF} +end; +{==========================================================================} + +end. diff --git a/src/JLlabel.dcr b/src/JLlabel.dcr new file mode 100644 index 00000000..3a2b8d3c Binary files /dev/null and b/src/JLlabel.dcr differ diff --git a/src/JLlabel.dcr.res b/src/JLlabel.dcr.res new file mode 100644 index 00000000..3a2b8d3c Binary files /dev/null and b/src/JLlabel.dcr.res differ diff --git a/src/MJWCRT.PAS b/src/MJWCRT.PAS new file mode 100644 index 00000000..53bd6efc --- /dev/null +++ b/src/MJWCRT.PAS @@ -0,0 +1,809 @@ +unit Mjwcrt; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, stdctrls, printers, clipbrd; + +{ TMJWcrt component - version 1.00b + + Copyright 1996 (c) by Michael Wilcox + Email: mwilcox@economat.demon.co.uk + + This component: + - is Freeware, do not pay money for it!!! + - is used at your own risk. + - is open to amendments - please give credit. + - can be published or supplied on CD-ROM (only if not amended) + - would be ideal for a debug screen, terminal emulator, DOS Screens etc. + + Thanks to: + - Danny Thorpe, (Tconsole) + - Marco Cantu, "Mastering Delphi" + - Dave Jewell, PC PRO magazine. + - David P J Hill, for use of compuserve. + - Borland & TeamB (compuserve) + + Features: + - Simple text output screen (Fixed-spaced fonts only). + - 132 columns. + - 24 rows. + - change Text & Background Colours. + - Fast automatic scrolling. + - Copy screen to clipboard. + - Print screen to printer. + + Last Note: + - Please Email me if you use this component, I would value your comments + and let you know of updates. + - I feel it is wrong for developers to charge for components, they should be + written to support Borland Delphi and its users - otherwise it could be a + world of C++ and Visual Basic. It should be the completed application that + is sold - if you must make money!!! + - Oh yes Borland - why did you not include an Async Comms VCL with Delphi 2? + - Please, please, please let me know if you use this component. + + Thank you... enjoy... + + Amendment History - contributions with thanks: + 1.00a 11/06/96 Uploaded to Compuserve. + 1.00b 14/06/96 Thomas A. Digate - Compile with hints & warnings: + Destroy; override; added. + Remove variables not used. + Michael Wilcox - Bug fix: refresh problem, + ClrEoL and CMscrollPaint. + Added: #12: ClrScr; to WriteBuf. + Property Cursor = true or false. + Showcursor/Hidecursor now Protected. + Added: procedure WMGetDlgCode. + Print screen with black text, title + and its own font. + PrinterFont added. + Tscrn now has 25 rows (same as DOS). + Set80Mode & Set132Mode - procedures. +} + +const cm_scrollpaint = wm_user+100; + version = '1.00b'; + +type + Tscrn = record + pos : array[1..132, 1..25] of record + ch : char; + bk,cl : Tcolor; + end; + end; + + TCMScrollPaint = record + Msg : Cardinal; + end; + + TLineBreak = (CRLF, CR); + + TMJWcrt = class(TCustomControl) + private + { Private declarations } + FFocused : Boolean; + FLineBreak : TLinebreak; + Metrics : TTextMetric; + CharSize : TPoint; + CharAscent : Integer; + Scrn : Tscrn; + Invrect : TRect; + procedure WMSize(var M: TWMSize); message wm_Size; + procedure WMSetfocus(Var M: TWMsetFocus); message wm_setfocus; + procedure WMKillFocus(Var M: TWMKillFocus); message wm_killfocus; + procedure WMGetDlgCode(Var M: TWMGetDlgCode); message wm_getdlgcode; + procedure FastScroll; + procedure CMScrollPaint(var M: TCMScrollPaint); message cm_scrollpaint; + protected + { Protected declarations } + Ffont, FPfont, F80Font, F132Font : TFont; + Fcol, Frow : integer; + FBackColor : TColor; + FTextColor : TColor; + FOwnerDraw : boolean; + FScrolling : Boolean; + FCursor : Boolean; + CurPos : Tpoint; + Scrollcnt : integer; + PC : array[0..255] of char; + procedure SetFont(FF : TFont); + procedure SetPFont(FF : TFont); + procedure Set80Font(FF : TFont); + procedure Set132Font(FF : TFont); + procedure ReDrawBMP; + procedure ShowText(L, R: Integer); + procedure SetTextColor(tc : Tcolor); + procedure SetBackColor(bc : Tcolor); + procedure SetCol(c : integer); + procedure SetRow(r : integer); + procedure SetCursor(cr : boolean); + procedure Loaded; override; + procedure Fontchanged(Sender:Tobject); + procedure ShowCursor; virtual; {Show Cursor} + procedure HideCursor; {Hide Cursor} + public + { Public declarations } + constructor Create(Owner : Tcomponent); override; + destructor Destroy; override; + procedure Paint; override; {Paint Method} + procedure ClrScr; {Clears Whole Screen} + procedure ClrEol; {Clears to End of Line} + procedure ClrEoP; {Clears to End of Page} + procedure WriteBuf(Buffer: PChar; Count: Word); {Prints Buffer} + procedure WriteChar(Ch: Char); {Prints Character} + procedure Writeln(ss: Tcaption); {Prints String with Return} + procedure Write(ss: Tcaption); {Prints String} + procedure GotoXY(x,y: integer); {Moves Cursor Location} + function WhereX : integer; {Gets Cursor X Location} + function WhereY : integer; {Gets Cursor Y Location} + procedure Print; {Prints Screen Graphically} + procedure Copy; {Copy screen to clipboard} + procedure Set80Mode; {Use 80 columns and Font80} + procedure Set132Mode; {Use 132 columns and Font132} + published + { Published declarations } + property Font : TFont Read FFont write SetFont; + property PrinterFont : TFont Read FPFont write SetPFont; + property Font80 : TFont Read F80Font write Set80Font; + property Font132 : TFont Read F132Font write Set132Font; + property BackColor : Tcolor read FBackColor write setBackcolor; + property TextColor : Tcolor read FTextColor write setTextcolor; + property Columns : integer Read Fcol write SetCol; + property Rows : integer Read Frow Write SetRow; + property OwnerDraw : Boolean read FOwnerDraw Write FOwnerDraw default False; + property LineBreak : TLineBreak read FLineBreak write FLineBreak; + property Cursor : Boolean read Fcursor write SetCursor default True; + property Left; + property Top; + property OnClick; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDrag; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnKeyPress; + property OnKeyDown; + property OnKeyUp; + property Visible; + property ShowHint; + end; + +procedure Register; + +implementation + +{ Register component } +procedure Register; +begin + RegisterComponents('Mick', [TMJWcrt]); +end; + +{ Create } +constructor TMJWcrt.Create(Owner :TComponent); +begin + inherited Create(Owner); + FScrolling := false; + Fcol := 80; + Frow := 24; + FOwnerDraw := false; + Fcursor := true; + parentcolor := false; + FFont := TFont.create; + FPFont := TFont.create; + F80Font := TFont.create; + F132Font := TFont.create; + with FFont do + begin + name := 'Courier New'; + size := 8; + style := []; + end; + SetPFont(FFont); + Set80Font(FFont); + Set132Font(FFont); + FBackColor := color; + FTextColor := FFont.color; + clrscr; + FFont.onchange := Fontchanged; +end; + +{ Destroy } +destructor TMJWcrt.destroy; +begin + hidecursor; + FFont.free; + FPFont.free; + F132Font.free; + F80Font.free; + inherited destroy; +end; + +{ Clear screen when loaded } +procedure TMJWcrt.loaded; +begin + inherited Loaded; + clrscr; +end; + +{ Set Font } +procedure TMJWcrt.SetFont(FF : TFont); +begin + FFont.Assign(FF); + invalidate; + Fontchanged(FFont); +end; + +{ Set Printer Font } +procedure TMJWcrt.SetPFont(FF : TFont); +begin + FPFont.Assign(FF); +end; + +{ Set 80 Font } +procedure TMJWcrt.Set80Font(FF : TFont); +begin + F80Font.Assign(FF); +end; + +{ Set 132 Font } +procedure TMJWcrt.Set132Font(FF : TFont); +begin + F132Font.Assign(FF); +end; + +{ Get Font Details } +procedure TMJWcrt.FontChanged(Sender:Tobject); +var + DC: HDC; +begin + canvas.font := FFont; + DC := GetDC(0); + SelectObject(DC, Font.Handle); + GetTextMetrics(DC, Metrics); + ReleaseDC(0, DC); + CharSize.X := Metrics.tmAveCharWidth; + CharSize.Y := Metrics.tmHeight + Metrics.tmExternalLeading; + CharAscent := Metrics.tmAscent; + width := Fcol*charsize.x; + height := Frow*charsize.y; + update; +end; + +{ Show Cursor } +procedure TMJWcrt.ShowCursor; +begin + if not handleallocated then exit; + if FCursor = true then + begin + CreateCaret(Handle, 0, charsize.x, charsize.y); + SetCaretPos((curpos.X-1)*charsize.x,((curpos.Y-1)*charsize.y)); + showCaret(Handle); + end; +end; + +{ Hide Cursor } +procedure TMJWcrt.HideCursor; +begin + destroycaret; +end; + +{ Set Cursor on or off } +procedure TMJWcrt.SetCursor(cr : boolean); +begin + Fcursor := cr; + if Fcursor = false then HideCursor; + if (Fcursor = true) and (FFocused = true) then ShowCursor; +end; + +{ Clears Whole Screen } +procedure TMJWcrt.clrscr; +var xx,yy : integer; + s : string; + NewRect: TRect; +begin + for yy := 1 to 25 do + begin + for xx := 1 to 132 do + begin + with scrn do + begin + pos[xx,yy].ch := ' '; + pos[xx,yy].bk := FBackColor; + pos[xx,yy].cl := FTextColor; + end; + end; + end; + if (csDesigning in componentstate) then + begin + s := 'Copyright (c) 1996, Michael Wilcox - Version: '+version; + for xx := 1 to length(s) do + begin + with scrn do + begin + pos[xx,1].ch := s[xx]; + pos[xx,1].bk := FBackColor; + pos[xx,1].cl := FTextColor; + end; + end; + end; + curpos.X := 1; + curpos.Y := 1; + if handleallocated then + begin + if FFocused = true then hidecursor; + color := FBackColor; + NewRect := Rect(0, 0, width, height); + canvas.brush.color := FBackColor; + Canvas.FillRect(NewRect); + if FFocused = true then showcursor; + end else + begin + update; + end; +end; + +{Clear to end of line} +procedure TMJWcrt.clrEol; +var xx : integer; +begin + for xx := curpos.x to fcol do + begin + with scrn do + begin + pos[xx,curpos.y].ch := ' '; + pos[xx,curpos.y].bk := FBackColor; + pos[xx,curpos.y].cl := FTextColor; + end; + end; + showtext(curpos.x,Fcol); +end; + +{Clear to end of page} +procedure TMJWcrt.clrEoP; +var xx,yy : integer; + b : Trect; +begin + clrEoL; + if Curpos.Y+1 <= Frow then + begin + for yy := Curpos.Y+1 to Frow do + begin + for xx := 1 to fcol do + begin + with scrn do + begin + pos[xx,yy].ch := ' '; + pos[xx,yy].bk := FBackColor; + pos[xx,yy].cl := FTextColor; + end; + end; + end; + b:= clientrect; + b.top := (curpos.y)* charsize.y; + invalidaterect(handle , @b, false); + if FOwnerDraw = false then update; + end; +end; + +{ Return the smaller of two integer values } +function Min(X, Y: Integer): Integer; +begin + if X < Y then Min := X else Min := Y; +end; + +{ Return the larger of two integer values } +function Max(X, Y: Integer): Integer; +begin + if X > Y then Max := X else Max := Y; +end; + +{ FastScroll by removing multiple messages cm_scrollpaint } +procedure TMJWcrt.fastscroll; +var msg : TMSG; +begin + if handleallocated then + begin + if peekmessage(Msg, handle, cm_ScrollPaint, cm_scrollpaint, PM_Remove) then + begin + Fscrolling := true; + inc(scrollcnt,1); + end; + if scrollcnt > (round(Frow div 4)*3) then + begin + Perform(cm_scrollpaint, 0, 0); + end else + begin + Postmessage(handle,cm_scrollpaint, 0, 0); + end; + end; +end; + +{ CMscrollpaint message } +procedure TMJWcrt.CMscrollpaint(var M : TCMScrollPaint); +var cr : trect; +begin + {redraw screen} + cr := clientrect; + invalidaterect(handle,@cr,false); + update; + Fscrolling := false; + scrollcnt := 0; +end; + +{ Write text buffer to CRT window } +procedure TMJWcrt.WriteBuf(Buffer: PChar; Count: Word); +var + L, R: Integer; + +procedure Return; +begin + if (Fscrolling= false) and (curpos.y<>FRow) then ShowText(L, R); + L := 1; + R := 1; + Curpos.X := 1; +end; + +procedure NewLine; +var xx: integer; +begin + if (Fscrolling= false) and (curpos.y<>FRow) then ShowText(L, R); + Inc(Curpos.Y); + if Curpos.Y > Frow then + begin + {Scroll up} + Curpos.Y := frow; + move(scrn.pos[1,2],scrn.pos[1,1], sizeof(scrn)); + for xx := 1 to 132 do + begin + with scrn do + begin + pos[xx,frow].ch := ' '; + pos[xx,frow].bk := FBackColor; + pos[xx,frow].cl := FTextColor; + end; + end; + fastscroll; + end; +end; + +begin + L := Curpos.X; + R := Curpos.X; + while Count > 0 do + begin + case Buffer^ of + #32..#255: begin + Scrn.pos[Curpos.X, Curpos.Y].ch := Buffer^; + Scrn.pos[Curpos.X, Curpos.Y].bk := FBackColor; + Scrn.pos[Curpos.X, Curpos.Y].cl := FTextColor; + Inc(Curpos.X); + if Curpos.X > R then R := Curpos.X; + if Curpos.X > Fcol then + begin + Return; + NewLine; + end; + end; + #13: begin + if FLineBreak = CR then + begin + Return; + end else + begin + Return; + NewLine; + end; + end; + #10: NewLine; + #12: ClrScr; + #8: if (Curpos.X > 1) then + begin + Dec(Curpos.X); + Scrn.Pos[Curpos.X, Curpos.Y].ch := ' '; + Scrn.pos[Curpos.X, Curpos.Y].bk := FBackcolor; + Scrn.pos[Curpos.X, Curpos.Y].cl := FTextColor; + if Curpos.X < L then L := Curpos.X; + showtext(L,R); + end else + begin + {backspace to previous line} + if (curpos.y > 1) then + begin + Curpos.x := Fcol; + if curpos.y > 1 then dec(curpos.y,1); + Scrn.Pos[Curpos.X, Curpos.Y].ch := ' '; + Scrn.pos[Curpos.X, Curpos.Y].bk := FBackcolor; + Scrn.pos[Curpos.X, Curpos.Y].cl := FTextColor; + if Curpos.X < L then L := Curpos.X; + if Curpos.X > R then R := Curpos.X; + showtext(L,R); + end; + end; + #7: MessageBeep(0); + end; + Inc(Buffer); + Dec(Count); + end; + if (Fscrolling= false) then ShowText(L, R); +end; + +{ Write character to CRT window } +procedure TMJWcrt.WriteChar(Ch: Char); +begin + WriteBuf(@Ch, 1); +end; + +{ Adds return to end of line } +procedure TMJWcrt.Writeln(ss: Tcaption); +begin + strPcopy(pc, ss+#13); + WriteBuf(@pc[0], length(ss)+1); +end; + +{ Writes text } +procedure TMJWcrt.Write(ss: Tcaption); +begin + strPcopy(pc, ss); + WriteBuf(@pc[0], length(ss)); +end; + +{ Moves Cursor to x,y } +procedure TMJWcrt.Gotoxy(x,y: integer); +begin + if FFocused then hidecursor; + Curpos.x := Max(1, Min(x, Fcol)); + Curpos.y := Max(1, Min(y, Frow)); + if FFocused then showcursor; +end; + +{ Get X location } +function TMJWcrt.WhereX : integer; +begin + whereX := curpos.x; +end; + +{ Get Y Location } +function TMJWcrt.WhereY : integer; +begin + whereY := curpos.y; +end; + +{ Print screen Graphically } +procedure TMJWcrt.print; +var + xx,yy : integer; + MyFile: system.text; + s : string; +begin + Printer.Title := Application.title+' - Print Screen'; + Printer.canvas.brush.color := clwhite; + Printer.Canvas.Font := FPFont; + Printer.Canvas.Font.color := clblack; + AssignPrn(MyFile); + Rewrite(MyFile); + for yy := 1 to Frow do + begin + s:= ''; + for xx := 1 to Fcol do + begin + with scrn do + begin + s:=s+pos[xx,yy].ch; + end; + end; + system.Writeln(MyFile, s); + end; + System.CloseFile(MyFile); +end; + +{ Copy screen to clipboard } +procedure TMJWcrt.copy; +var + xx,yy : integer; + s : string; + memo : Tmemo; +begin + memo := Tmemo.create(self); + memo.visible := false; + memo.parent := parent; + for yy := 1 to Frow do + begin + s:= ''; + for xx := 1 to Fcol do + begin + with scrn do + begin + s:=s+pos[xx,yy].ch; + end; + end; + memo.lines.add(s); + end; + memo.selectall; + memo.copytoclipboard; + memo.free; +end; + +{ Invalidates Line } +procedure TMJWcrt.ShowText(L, R: Integer); +var B : Trect; +begin + if handleallocated and (L <= R) then + begin + b.left := (L-1) * charsize.x; + b.top := (curpos.y-1)* charsize.y; + b.right:= r * charsize.x; + b.bottom:=(b.top + charsize.y); + invalidaterect(handle , @b, false); + if FOwnerDraw = false then update; + end; +end; + +{ Set Text Colour } +procedure TMJWcrt.SetTextColor(tc : Tcolor); +begin + FTextcolor := tc; + if (csDesigning in componentstate) then + begin + clrscr; + paint; + end; +end; + +{ Set Background Colour } +procedure TMJWcrt.SetBackColor(bc : Tcolor); +begin + FBackcolor := bc; + if (csDesigning in componentstate) then + begin + clrscr; + paint; + end; +end; + +{ Set Number of Columns } +procedure TMJWcrt.SetCol(c : integer); +begin + if (c > 1) and ( c <= 132) then + begin + FCol := c; + width := c*charsize.x; + if curpos.x > c then curpos.x := c; + if (csDesigning in componentstate) then + begin + clrscr; + paint; + end; + end; +end; + +{ Set Number of Rows } +procedure TMJWcrt.SetRow(r : integer); +begin + if (r > 1) and ( r <= 25) then + begin + FRow := r; + height := r*charsize.y; + if curpos.y > r then curpos.y := r; + if (csDesigning in componentstate) then + begin + clrscr; + paint; + end; + end; +end; + +{Set display to 80 mode using Font80} +procedure TMJWcrt.Set80Mode; +begin + if Fcol <> 80 then + begin + Fcol := 80; + setfont(F80Font); + end; +end; + +{Set display to 132 mode using Font132} +procedure TMJWcrt.Set132Mode; +begin + if Fcol <> 132 then + begin + Fcol := 132; + setfont(F132Font); + end; +end; + +{ Fontchange on resize } +procedure TMJWcrt.WMSize(var M:TWMSize); +begin + inherited; + if FOwnerDraw = false then + begin + if FFocused then hidecursor; + fontchanged(FFont); + if FFocused then showcursor; + end; +end; + +{ set focus to show cursor } +procedure TMJWcrt.WMSetFocus(var M :TWMSetfocus); +begin + FFocused := true; + showcursor; + inherited; +end; + +{ killfocus will hidecursor } +procedure TMJWcrt.WMKillFocus(var M :TWMKillfocus); +begin + inherited; + FFocused := false; + hidecursor; +end; + +{ key codes } +procedure TMJWcrt.WMGetDlgCode(var M :TWMGetDlgCode); +begin + M.Result := DLGC_WantArrows or DLGC_WantChars or DLGC_WantAllKeys or DLGC_WantTab; +end; + +{ Paint Method } +procedure TMJWcrt.Paint; +begin + if FOwnerDraw = false then + begin + redrawbmp; + end; +end; + +{ redraw screen } +procedure TMJWcrt.ReDrawBMP; +var x2,y2,x1,y1, RunStart, RunEnd, len, count : integer; + cbrect : Trect; + buf : array[0..133] of char; + s:string; + cb, cp : Tcolor; +begin + if not handleallocated then exit; + if ffocused = true then hidecursor; + cbrect := Canvas.ClipRect; + x1 := Max(0, cbrect.left div charsize.x); + x2 := Min(Fcol, (cbrect.right+charsize.x-1) div charsize.x); + y1 := Max(0, cbrect.top div charsize.y); + y2 := Min(Frow, (cbrect.bottom+charsize.y-1) div charsize.y); + While y1 < y2 do + begin + Runend := x1; + count := x2-x1; + cbrect.top := y1*charsize.y; + cbrect.bottom := y1*charsize.y+charsize.y; + while count > 0 do + begin + runstart := runend; + cb := scrn.pos[runstart+1,y1+1].bk; + cp := scrn.pos[runstart+1,y1+1].cl; + s := ''; + repeat + inc(runend); + s := s+scrn.pos[runend,y1+1].ch; + until (runend > x2) or (scrn.pos[runend+1,y1+1].bk <> cb) or (scrn.pos[runend+1,y1+1].cl <> cp); + StrPCopy(buf, s); + Len := length(s); + count := x2 - runend; + cbrect.left := runstart*charsize.x; + cbrect.right := cbrect.left+(len*charsize.x); + canvas.brush.color := cb; + canvas.font.color := cp; + ExtTextOut(Canvas.Handle, cbrect.left, cbrect.top, ETO_CLIPPED or + ETO_OPAQUE, @cbRect, buf, Len, nil); + end; + inc(y1); + end; + if ffocused = true then showcursor; +end; + +end. diff --git a/src/OEDIT.PAS b/src/OEDIT.PAS new file mode 100644 index 00000000..65ae44cb --- /dev/null +++ b/src/OEDIT.PAS @@ -0,0 +1,134 @@ +{ TOvrEdit + -------- + An improved TEdit component which reflect keyboard + insert/overwrite mode, Special desiged for Windows + Traditional Chinese Version. + + by Wolfgang Chien +} +unit OEdit; + +interface + +{$ifdef Windows} +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, + Controls, Forms, Dialogs, StdCtrls; +{$endif} + +{$ifdef Win32} +uses + SysUtils, Windows, Messages, Classes, Graphics, + Controls, Forms, Dialogs, StdCtrls; +{$endif} + +type + TInsertKeyStates = (iksInsert, iksOverWrite); + + TOvrEdit = class(TEdit) + private + FTabOnEnter: boolean; + FInsertKeyState: boolean; + procedure WMChar(var Msg: TWMKey); message WM_Char; + protected + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure KeyPress(var Key: Char); override; + function GetInsertKeyState: TInsertKeyStates; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + property InsertKeyState: TInsertKeyStates read GetInsertKeyState; + published + property TabOnEnter: boolean + read FTabOnEnter write FTabOnEnter default True; + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('Samples', [TOvrEdit]); +end; + +constructor TOvrEdit.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + TabOnEnter := True; +end; + +(* -------------------------------------------------- *) +destructor TOvrEdit.Destroy; +begin + inherited Destroy; +end; + +(* -------------------------------------------------- *) +procedure TOvrEdit.KeyDown(var Key: Word; + Shift: TShiftState); +begin + if TabOnEnter then + begin + case Key of + vk_Down: { Dn-Arrow Key } + begin + SendMessage(GetParentForm(Self).Handle, wm_NextDlgCtl, 0, 0); + Key := 0; + end; + vk_Up: { Up-Arrow Key } + begin + SendMessage(GetParentForm(Self).Handle, wm_NextDlgCtl, 1, 0); + Key := 0; + end; + end; + end; + if Key <> 0 then inherited KeyDown(Key, Shift); +end; + +(* -------------------------------------------------- *) +procedure TOvrEdit.KeyPress(var Key: Char); +begin + if TabOnEnter and (Key = #13) then { Enter Key } + begin + SendMessage(GetParentForm(Self).Handle, wm_NextDlgCtl, 0, 0); + Key := #0; + end; + if Key <> #0 then inherited KeyPress(Key); +end; + +(* -------------------------------------------------- *) +function TOvrEdit.GetInsertKeyState: TInsertKeyStates; +begin + if GetKeyState(VK_INSERT) = 0 then + Result := iksInsert + else + Result := iksOverWrite; +end; + +(* -------------------------------------------------- *) +procedure TOvrEdit.WMChar(var Msg: TWMKey); +begin + { if Overwrite state and user select nothing } + if (InsertKeyState = iksOverWrite) and (SelLength = 0) + and (SelStart < GetTextLen) then + begin + { ASCII Extend code > 127 ==> Chinese word Lead-byte, BIG-5 } + if Msg.CharCode > 127 then + SelLength := 2 + else + begin + SelLength := 2; + { if char on current Caret positon is a Chinese word } + if Ord(SelText[1]) > 127 then + SelLength := 2 + else + SelLength := 1; + end; + end; + + inherited; +end; + +end. + diff --git a/src/OmniRig_TLB.dcr b/src/OmniRig_TLB.dcr new file mode 100644 index 00000000..e25e7169 Binary files /dev/null and b/src/OmniRig_TLB.dcr differ diff --git a/src/OmniRig_TLB.pas b/src/OmniRig_TLB.pas new file mode 100644 index 00000000..5cfc02d7 --- /dev/null +++ b/src/OmniRig_TLB.pas @@ -0,0 +1,1437 @@ +unit OmniRig_TLB; + +// ************************************************************************ // +// x +// ------ +// ̃t@CŒ`Ă^錾̓^CvCuǂݏo // +// lɍ쐬Ă܂B^CvCuGfB^ōƒ [\[ // +// XR[h̍XV] {^ƂCق̃^CvCu // +// ܂͊Ԑڂɂ̃^CvCuQƂĂꍇɁC̃t@C // +// ̓^CvCu̒lɍĐ܂B // +// ̏ꍇC̃t@Cgɑ΂ύX͎Ă܂܂B // +// ************************************************************************ // + +// PASTLWTR : $Revision: 1.130 $ +// ̃t@C͈ȉ̃^CvCu 2004/11/25 17:59:28 ɐ܂B + +// ************************************************************************ // +// Type Lib: F:\PROGRA~1\Afreet\Omni-Rig\OmniRig.exe (1) +// LIBID: {4FE359C5-A58F-459D-BE95-CA559FB4F270} +// LCID: 0 +// Helpfile: +// DepndLst: +// (1) v2.0 stdole, (F:\WINDOWS\System32\stdole2.tlb) +// (2) v4.0 StdVCL, (F:\WINDOWS\System32\stdvcl40.dll) +// ************************************************************************ // +// *************************************************************************// +// ӁF +// RpCw {$IFDEF LIVE_SERVER_AT_DESIGN_TIME} ŕĂ镔 +// ̓IuWFNgԂvpeB`Ă܂BIuWFNgCXyN^[ +// ł̑ԈႢ邽߂ɁAftHgł͂̋@\͖ɂ +// ܂BKvȏꍇɂ LIVE_SERVER_AT_DESIGN_TIME `邱Ƃł +// @\Lɂ邱Ƃł܂B܂ $IFDEF ubN邱Ƃŕ +// IɗLɂ邱Ƃł܂BȂAK؂ CoClass \bhɂIuWF +// Ng쐬ł悤ɂȂĂKv܂B +{$TYPEDADDRESS OFF} // ^t @ Zq̎wOKv܂B +{$WARN SYMBOL_PLATFORM OFF} +{$WRITEABLECONST ON} + +interface + +uses ActiveX, Classes, Graphics, OleServer, StdVCL, Variants, Windows; + + + +// *********************************************************************// +// ^CvCu GUID ̒`Bȉ̋Kg܂B +// Type Libraries : LIBID_xxxx +// CoClasses : CLASS_xxxx +// DISPInterfaces : DIID_xxxx +// Non-DISP interfaces: IID_xxxx +// *********************************************************************// +const + // ^CvCũW[/}Ci[o[Wԍ + OmniRigMajorVersion = 1; + OmniRigMinorVersion = 0; + + LIBID_OmniRig: TGUID = '{4FE359C5-A58F-459D-BE95-CA559FB4F270}'; + + IID_IOmniRigX: TGUID = '{501A2858-3331-467A-837A-989FDEDACC7D}'; + DIID_IOmniRigXEvents: TGUID = '{2219175F-E561-47E7-AD17-73C4D8891AA1}'; + CLASS_OmniRigX: TGUID = '{0839E8C6-ED30-4950-8087-966F970F0CAE}'; + IID_IRigX: TGUID = '{D30A7E51-5862-45B7-BFFA-6415917DA0CF}'; + CLASS_RigX: TGUID = '{78AECFA2-3F52-4E39-98D3-1646C00A6234}'; + IID_IPortBits: TGUID = '{3DEE2CC8-1EA3-46E7-B8B4-3E7321F2446A}'; + CLASS_PortBits: TGUID = '{B786DE29-3B3D-4C66-B7C4-547F9A77A21D}'; + +// *********************************************************************// +// Declaration of Enumerations defined in Type Library +// *********************************************************************// +// enum RigParamX ̂߂̒萔 +type + RigParamX = TOleEnum; +const + PM_UNKNOWN = $00000001; + PM_FREQ = $00000002; + PM_FREQA = $00000004; + PM_FREQB = $00000008; + PM_PITCH = $00000010; + PM_RITOFFSET = $00000020; + PM_RIT0 = $00000040; + PM_VFOAA = $00000080; + PM_VFOAB = $00000100; + PM_VFOBA = $00000200; + PM_VFOBB = $00000400; + PM_VFOA = $00000800; + PM_VFOB = $00001000; + PM_VFOEQUAL = $00002000; + PM_VFOSWAP = $00004000; + PM_SPLITON = $00008000; + PM_SPLITOFF = $00010000; + PM_RITON = $00020000; + PM_RITOFF = $00040000; + PM_XITON = $00080000; + PM_XITOFF = $00100000; + PM_RX = $00200000; + PM_TX = $00400000; + PM_CW_U = $00800000; + PM_CW_L = $01000000; + PM_SSB_U = $02000000; + PM_SSB_L = $04000000; + PM_DIG_U = $08000000; + PM_DIG_L = $10000000; + PM_AM = $20000000; + PM_FM = $40000000; + +// enum RigStatusX ̂߂̒萔 +type + RigStatusX = TOleEnum; +const + ST_NOTCONFIGURED = $00000000; + ST_DISABLED = $00000001; + ST_PORTBUSY = $00000002; + ST_NOTRESPONDING = $00000003; + ST_ONLINE = $00000004; + +type + +// *********************************************************************// +// ^CvCǔ^錾̂߂ forward 錾 +// *********************************************************************// + IOmniRigX = interface; + IOmniRigXDisp = dispinterface; + IOmniRigXEvents = dispinterface; + IRigX = interface; + IRigXDisp = dispinterface; + IPortBits = interface; + IPortBitsDisp = dispinterface; + +// *********************************************************************// +// Declaration of CoClasses defined in Type Library +// (NOTE: Here we map each CoClass to its Default Interface) +// *********************************************************************// + OmniRigX = IOmniRigX; + RigX = IRigX; + PortBits = IPortBits; + + +// *********************************************************************// +// Interface: IOmniRigX +// Flags: (4416) Dual OleAutomation Dispatchable +// GUID: {501A2858-3331-467A-837A-989FDEDACC7D} +// *********************************************************************// + IOmniRigX = interface(IDispatch) + ['{501A2858-3331-467A-837A-989FDEDACC7D}'] + function Get_InterfaceVersion: Integer; safecall; + function Get_SoftwareVersion: Integer; safecall; + function Get_Rig1: IRigX; safecall; + function Get_Rig2: IRigX; safecall; + function Get_DialogVisible: WordBool; safecall; + procedure Set_DialogVisible(Value: WordBool); safecall; + property InterfaceVersion: Integer read Get_InterfaceVersion; + property SoftwareVersion: Integer read Get_SoftwareVersion; + property Rig1: IRigX read Get_Rig1; + property Rig2: IRigX read Get_Rig2; + property DialogVisible: WordBool read Get_DialogVisible write Set_DialogVisible; + end; + +// *********************************************************************// +// DispIntf: IOmniRigXDisp +// Flags: (4416) Dual OleAutomation Dispatchable +// GUID: {501A2858-3331-467A-837A-989FDEDACC7D} +// *********************************************************************// + IOmniRigXDisp = dispinterface + ['{501A2858-3331-467A-837A-989FDEDACC7D}'] + property InterfaceVersion: Integer readonly dispid 1; + property SoftwareVersion: Integer readonly dispid 2; + property Rig1: IRigX readonly dispid 3; + property Rig2: IRigX readonly dispid 4; + property DialogVisible: WordBool dispid 5; + end; + +// *********************************************************************// +// DispIntf: IOmniRigXEvents +// Flags: (4096) Dispatchable +// GUID: {2219175F-E561-47E7-AD17-73C4D8891AA1} +// *********************************************************************// + IOmniRigXEvents = dispinterface + ['{2219175F-E561-47E7-AD17-73C4D8891AA1}'] + procedure VisibleChange; dispid 1; + procedure RigTypeChange(RigNumber: Integer); dispid 2; + procedure StatusChange(RigNumber: Integer); dispid 3; + procedure ParamsChange(RigNumber: Integer; Params: Integer); dispid 4; + procedure CustomReply(RigNumber: Integer; Command: OleVariant; Reply: OleVariant); dispid 5; + end; + +// *********************************************************************// +// Interface: IRigX +// Flags: (4416) Dual OleAutomation Dispatchable +// GUID: {D30A7E51-5862-45B7-BFFA-6415917DA0CF} +// *********************************************************************// + IRigX = interface(IDispatch) + ['{D30A7E51-5862-45B7-BFFA-6415917DA0CF}'] + function Get_RigType: WideString; safecall; + function Get_ReadableParams: Integer; safecall; + function Get_WriteableParams: Integer; safecall; + function IsParamReadable(Param: RigParamX): WordBool; safecall; + function IsParamWriteable(Param: RigParamX): WordBool; safecall; + function Get_Status: RigStatusX; safecall; + function Get_StatusStr: WideString; safecall; + function Get_Freq: Integer; safecall; + procedure Set_Freq(Value: Integer); safecall; + function Get_FreqA: Integer; safecall; + procedure Set_FreqA(Value: Integer); safecall; + function Get_FreqB: Integer; safecall; + procedure Set_FreqB(Value: Integer); safecall; + function Get_RitOffset: Integer; safecall; + procedure Set_RitOffset(Value: Integer); safecall; + function Get_Pitch: Integer; safecall; + procedure Set_Pitch(Value: Integer); safecall; + function Get_Vfo: RigParamX; safecall; + procedure Set_Vfo(Value: RigParamX); safecall; + function Get_Split: RigParamX; safecall; + procedure Set_Split(Value: RigParamX); safecall; + function Get_Rit: RigParamX; safecall; + procedure Set_Rit(Value: RigParamX); safecall; + function Get_Xit: RigParamX; safecall; + procedure Set_Xit(Value: RigParamX); safecall; + function Get_Tx: RigParamX; safecall; + procedure Set_Tx(Value: RigParamX); safecall; + function Get_Mode: RigParamX; safecall; + procedure Set_Mode(Value: RigParamX); safecall; + procedure ClearRit; safecall; + procedure SetSimplexMode(Freq: Integer); safecall; + procedure SetSplitMode(RxFreq: Integer; TxFreq: Integer); safecall; + function FrequencyOfTone(Tone: Integer): Integer; safecall; + procedure SendCustomCommand(Command: OleVariant; ReplyLength: Integer; ReplyEnd: OleVariant); safecall; + function GetRxFrequency: Integer; safecall; + function GetTxFrequency: Integer; safecall; + function Get_PortBits: IPortBits; safecall; + property RigType: WideString read Get_RigType; + property ReadableParams: Integer read Get_ReadableParams; + property WriteableParams: Integer read Get_WriteableParams; + property Status: RigStatusX read Get_Status; + property StatusStr: WideString read Get_StatusStr; + property Freq: Integer read Get_Freq write Set_Freq; + property FreqA: Integer read Get_FreqA write Set_FreqA; + property FreqB: Integer read Get_FreqB write Set_FreqB; + property RitOffset: Integer read Get_RitOffset write Set_RitOffset; + property Pitch: Integer read Get_Pitch write Set_Pitch; + property Vfo: RigParamX read Get_Vfo write Set_Vfo; + property Split: RigParamX read Get_Split write Set_Split; + property Rit: RigParamX read Get_Rit write Set_Rit; + property Xit: RigParamX read Get_Xit write Set_Xit; + property Tx: RigParamX read Get_Tx write Set_Tx; + property Mode: RigParamX read Get_Mode write Set_Mode; + property PortBits: IPortBits read Get_PortBits; + end; + +// *********************************************************************// +// DispIntf: IRigXDisp +// Flags: (4416) Dual OleAutomation Dispatchable +// GUID: {D30A7E51-5862-45B7-BFFA-6415917DA0CF} +// *********************************************************************// + IRigXDisp = dispinterface + ['{D30A7E51-5862-45B7-BFFA-6415917DA0CF}'] + property RigType: WideString readonly dispid 1; + property ReadableParams: Integer readonly dispid 2; + property WriteableParams: Integer readonly dispid 3; + function IsParamReadable(Param: RigParamX): WordBool; dispid 4; + function IsParamWriteable(Param: RigParamX): WordBool; dispid 5; + property Status: RigStatusX readonly dispid 6; + property StatusStr: WideString readonly dispid 7; + property Freq: Integer dispid 8; + property FreqA: Integer dispid 9; + property FreqB: Integer dispid 10; + property RitOffset: Integer dispid 11; + property Pitch: Integer dispid 12; + property Vfo: RigParamX dispid 13; + property Split: RigParamX dispid 14; + property Rit: RigParamX dispid 15; + property Xit: RigParamX dispid 16; + property Tx: RigParamX dispid 17; + property Mode: RigParamX dispid 18; + procedure ClearRit; dispid 19; + procedure SetSimplexMode(Freq: Integer); dispid 20; + procedure SetSplitMode(RxFreq: Integer; TxFreq: Integer); dispid 21; + function FrequencyOfTone(Tone: Integer): Integer; dispid 22; + procedure SendCustomCommand(Command: OleVariant; ReplyLength: Integer; ReplyEnd: OleVariant); dispid 23; + function GetRxFrequency: Integer; dispid 24; + function GetTxFrequency: Integer; dispid 25; + property PortBits: IPortBits readonly dispid 26; + end; + +// *********************************************************************// +// Interface: IPortBits +// Flags: (4416) Dual OleAutomation Dispatchable +// GUID: {3DEE2CC8-1EA3-46E7-B8B4-3E7321F2446A} +// *********************************************************************// + IPortBits = interface(IDispatch) + ['{3DEE2CC8-1EA3-46E7-B8B4-3E7321F2446A}'] + function Lock: WordBool; safecall; + function Get_Rts: WordBool; safecall; + procedure Set_Rts(Value: WordBool); safecall; + function Get_Dtr: WordBool; safecall; + procedure Set_Dtr(Value: WordBool); safecall; + function Get_Cts: WordBool; safecall; + function Get_Dsr: WordBool; safecall; + procedure Unlock; safecall; + property Rts: WordBool read Get_Rts write Set_Rts; + property Dtr: WordBool read Get_Dtr write Set_Dtr; + property Cts: WordBool read Get_Cts; + property Dsr: WordBool read Get_Dsr; + end; + +// *********************************************************************// +// DispIntf: IPortBitsDisp +// Flags: (4416) Dual OleAutomation Dispatchable +// GUID: {3DEE2CC8-1EA3-46E7-B8B4-3E7321F2446A} +// *********************************************************************// + IPortBitsDisp = dispinterface + ['{3DEE2CC8-1EA3-46E7-B8B4-3E7321F2446A}'] + function Lock: WordBool; dispid 1; + property Rts: WordBool dispid 2; + property Dtr: WordBool dispid 3; + property Cts: WordBool readonly dispid 4; + property Dsr: WordBool readonly dispid 5; + procedure Unlock; dispid 6; + end; + +// *********************************************************************// +// The Class CoOmniRigX provides a Create and CreateRemote method to +// create instances of the default interface IOmniRigX exposed by +// the CoClass OmniRigX. The functions are intended to be used by +// clients wishing to automate the CoClass objects exposed by the +// server of this typelibrary. +// *********************************************************************// + CoOmniRigX = class + class function Create: IOmniRigX; + class function CreateRemote(const MachineName: string): IOmniRigX; + end; + + TOmniRigXRigTypeChange = procedure(Sender: TObject; RigNumber: Integer) of object; + TOmniRigXStatusChange = procedure(Sender: TObject; RigNumber: Integer) of object; + TOmniRigXParamsChange = procedure(Sender: TObject; RigNumber: Integer; Params: Integer) of object; + TOmniRigXCustomReply = procedure(Sender: TObject; RigNumber: Integer; Command: OleVariant; + Reply: OleVariant) of object; + + +// *********************************************************************// +// OLE Server Proxy class declaration +// Server Object : TOmniRigX +// Help String : OmniRigX Object +// Default Interface: IOmniRigX +// Def. Intf. DISP? : No +// Event Interface: IOmniRigXEvents +// TypeFlags : (2) CanCreate +// *********************************************************************// +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + TOmniRigXProperties= class; +{$ENDIF} + TOmniRigX = class(TOleServer) + private + FOnVisibleChange: TNotifyEvent; + FOnRigTypeChange: TOmniRigXRigTypeChange; + FOnStatusChange: TOmniRigXStatusChange; + FOnParamsChange: TOmniRigXParamsChange; + FOnCustomReply: TOmniRigXCustomReply; + FIntf: IOmniRigX; +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + FProps: TOmniRigXProperties; + function GetServerProperties: TOmniRigXProperties; +{$ENDIF} + function GetDefaultInterface: IOmniRigX; + protected + procedure InitServerData; override; + procedure InvokeEvent(DispID: TDispID; var Params: TVariantArray); override; + function Get_InterfaceVersion: Integer; + function Get_SoftwareVersion: Integer; + function Get_Rig1: IRigX; + function Get_Rig2: IRigX; + function Get_DialogVisible: WordBool; + procedure Set_DialogVisible(Value: WordBool); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Connect; override; + procedure ConnectTo(svrIntf: IOmniRigX); + procedure Disconnect; override; + property DefaultInterface: IOmniRigX read GetDefaultInterface; + property InterfaceVersion: Integer read Get_InterfaceVersion; + property SoftwareVersion: Integer read Get_SoftwareVersion; + property Rig1: IRigX read Get_Rig1; + property Rig2: IRigX read Get_Rig2; + property DialogVisible: WordBool read Get_DialogVisible write Set_DialogVisible; + published +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + property Server: TOmniRigXProperties read GetServerProperties; +{$ENDIF} + property OnVisibleChange: TNotifyEvent read FOnVisibleChange write FOnVisibleChange; + property OnRigTypeChange: TOmniRigXRigTypeChange read FOnRigTypeChange write FOnRigTypeChange; + property OnStatusChange: TOmniRigXStatusChange read FOnStatusChange write FOnStatusChange; + property OnParamsChange: TOmniRigXParamsChange read FOnParamsChange write FOnParamsChange; + property OnCustomReply: TOmniRigXCustomReply read FOnCustomReply write FOnCustomReply; + end; + +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} +// *********************************************************************// +// OLE Server Properties Proxy Class +// Server Object : TOmniRigX +// (̃IuWFNg IDE ̃vpeB CXyN^[T[o[ +// vpeBύXꍇɎg܂) +// *********************************************************************// + TOmniRigXProperties = class(TPersistent) + private + FServer: TOmniRigX; + function GetDefaultInterface: IOmniRigX; + constructor Create(AServer: TOmniRigX); + protected + function Get_InterfaceVersion: Integer; + function Get_SoftwareVersion: Integer; + function Get_Rig1: IRigX; + function Get_Rig2: IRigX; + function Get_DialogVisible: WordBool; + procedure Set_DialogVisible(Value: WordBool); + public + property DefaultInterface: IOmniRigX read GetDefaultInterface; + published + property DialogVisible: WordBool read Get_DialogVisible write Set_DialogVisible; + end; +{$ENDIF} + + +// *********************************************************************// +// The Class CoRigX provides a Create and CreateRemote method to +// create instances of the default interface IRigX exposed by +// the CoClass RigX. The functions are intended to be used by +// clients wishing to automate the CoClass objects exposed by the +// server of this typelibrary. +// *********************************************************************// + CoRigX = class + class function Create: IRigX; + class function CreateRemote(const MachineName: string): IRigX; + end; + + +// *********************************************************************// +// OLE Server Proxy class declaration +// Server Object : TRigX +// Help String : Rig Object +// Default Interface: IRigX +// Def. Intf. DISP? : No +// Event Interface: +// TypeFlags : (2) CanCreate +// *********************************************************************// +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + TRigXProperties= class; +{$ENDIF} + TRigX = class(TOleServer) + private + FIntf: IRigX; +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + FProps: TRigXProperties; + function GetServerProperties: TRigXProperties; +{$ENDIF} + function GetDefaultInterface: IRigX; + protected + procedure InitServerData; override; + function Get_RigType: WideString; + function Get_ReadableParams: Integer; + function Get_WriteableParams: Integer; + function Get_Status: RigStatusX; + function Get_StatusStr: WideString; + function Get_Freq: Integer; + procedure Set_Freq(Value: Integer); + function Get_FreqA: Integer; + procedure Set_FreqA(Value: Integer); + function Get_FreqB: Integer; + procedure Set_FreqB(Value: Integer); + function Get_RitOffset: Integer; + procedure Set_RitOffset(Value: Integer); + function Get_Pitch: Integer; + procedure Set_Pitch(Value: Integer); + function Get_Vfo: RigParamX; + procedure Set_Vfo(Value: RigParamX); + function Get_Split: RigParamX; + procedure Set_Split(Value: RigParamX); + function Get_Rit: RigParamX; + procedure Set_Rit(Value: RigParamX); + function Get_Xit: RigParamX; + procedure Set_Xit(Value: RigParamX); + function Get_Tx: RigParamX; + procedure Set_Tx(Value: RigParamX); + function Get_Mode: RigParamX; + procedure Set_Mode(Value: RigParamX); + function Get_PortBits: IPortBits; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Connect; override; + procedure ConnectTo(svrIntf: IRigX); + procedure Disconnect; override; + function IsParamReadable(Param: RigParamX): WordBool; + function IsParamWriteable(Param: RigParamX): WordBool; + procedure ClearRit; + procedure SetSimplexMode(Freq: Integer); + procedure SetSplitMode(RxFreq: Integer; TxFreq: Integer); + function FrequencyOfTone(Tone: Integer): Integer; + procedure SendCustomCommand(Command: OleVariant; ReplyLength: Integer; ReplyEnd: OleVariant); + function GetRxFrequency: Integer; + function GetTxFrequency: Integer; + property DefaultInterface: IRigX read GetDefaultInterface; + property RigType: WideString read Get_RigType; + property ReadableParams: Integer read Get_ReadableParams; + property WriteableParams: Integer read Get_WriteableParams; + property Status: RigStatusX read Get_Status; + property StatusStr: WideString read Get_StatusStr; + property PortBits: IPortBits read Get_PortBits; + property Freq: Integer read Get_Freq write Set_Freq; + property FreqA: Integer read Get_FreqA write Set_FreqA; + property FreqB: Integer read Get_FreqB write Set_FreqB; + property RitOffset: Integer read Get_RitOffset write Set_RitOffset; + property Pitch: Integer read Get_Pitch write Set_Pitch; + property Vfo: RigParamX read Get_Vfo write Set_Vfo; + property Split: RigParamX read Get_Split write Set_Split; + property Rit: RigParamX read Get_Rit write Set_Rit; + property Xit: RigParamX read Get_Xit write Set_Xit; + property Tx: RigParamX read Get_Tx write Set_Tx; + property Mode: RigParamX read Get_Mode write Set_Mode; + published +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + property Server: TRigXProperties read GetServerProperties; +{$ENDIF} + end; + +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} +// *********************************************************************// +// OLE Server Properties Proxy Class +// Server Object : TRigX +// (̃IuWFNg IDE ̃vpeB CXyN^[T[o[ +// vpeBύXꍇɎg܂) +// *********************************************************************// + TRigXProperties = class(TPersistent) + private + FServer: TRigX; + function GetDefaultInterface: IRigX; + constructor Create(AServer: TRigX); + protected + function Get_RigType: WideString; + function Get_ReadableParams: Integer; + function Get_WriteableParams: Integer; + function Get_Status: RigStatusX; + function Get_StatusStr: WideString; + function Get_Freq: Integer; + procedure Set_Freq(Value: Integer); + function Get_FreqA: Integer; + procedure Set_FreqA(Value: Integer); + function Get_FreqB: Integer; + procedure Set_FreqB(Value: Integer); + function Get_RitOffset: Integer; + procedure Set_RitOffset(Value: Integer); + function Get_Pitch: Integer; + procedure Set_Pitch(Value: Integer); + function Get_Vfo: RigParamX; + procedure Set_Vfo(Value: RigParamX); + function Get_Split: RigParamX; + procedure Set_Split(Value: RigParamX); + function Get_Rit: RigParamX; + procedure Set_Rit(Value: RigParamX); + function Get_Xit: RigParamX; + procedure Set_Xit(Value: RigParamX); + function Get_Tx: RigParamX; + procedure Set_Tx(Value: RigParamX); + function Get_Mode: RigParamX; + procedure Set_Mode(Value: RigParamX); + function Get_PortBits: IPortBits; + public + property DefaultInterface: IRigX read GetDefaultInterface; + published + property Freq: Integer read Get_Freq write Set_Freq; + property FreqA: Integer read Get_FreqA write Set_FreqA; + property FreqB: Integer read Get_FreqB write Set_FreqB; + property RitOffset: Integer read Get_RitOffset write Set_RitOffset; + property Pitch: Integer read Get_Pitch write Set_Pitch; + property Vfo: RigParamX read Get_Vfo write Set_Vfo; + property Split: RigParamX read Get_Split write Set_Split; + property Rit: RigParamX read Get_Rit write Set_Rit; + property Xit: RigParamX read Get_Xit write Set_Xit; + property Tx: RigParamX read Get_Tx write Set_Tx; + property Mode: RigParamX read Get_Mode write Set_Mode; + end; +{$ENDIF} + + +// *********************************************************************// +// The Class CoPortBits provides a Create and CreateRemote method to +// create instances of the default interface IPortBits exposed by +// the CoClass PortBits. The functions are intended to be used by +// clients wishing to automate the CoClass objects exposed by the +// server of this typelibrary. +// *********************************************************************// + CoPortBits = class + class function Create: IPortBits; + class function CreateRemote(const MachineName: string): IPortBits; + end; + + +// *********************************************************************// +// OLE Server Proxy class declaration +// Server Object : TPortBits +// Help String : PortBits Object +// Default Interface: IPortBits +// Def. Intf. DISP? : No +// Event Interface: +// TypeFlags : (2) CanCreate +// *********************************************************************// +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + TPortBitsProperties= class; +{$ENDIF} + TPortBits = class(TOleServer) + private + FIntf: IPortBits; +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + FProps: TPortBitsProperties; + function GetServerProperties: TPortBitsProperties; +{$ENDIF} + function GetDefaultInterface: IPortBits; + protected + procedure InitServerData; override; + function Get_Rts: WordBool; + procedure Set_Rts(Value: WordBool); + function Get_Dtr: WordBool; + procedure Set_Dtr(Value: WordBool); + function Get_Cts: WordBool; + function Get_Dsr: WordBool; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Connect; override; + procedure ConnectTo(svrIntf: IPortBits); + procedure Disconnect; override; + function Lock: WordBool; + procedure Unlock; + property DefaultInterface: IPortBits read GetDefaultInterface; + property Cts: WordBool read Get_Cts; + property Dsr: WordBool read Get_Dsr; + property Rts: WordBool read Get_Rts write Set_Rts; + property Dtr: WordBool read Get_Dtr write Set_Dtr; + published +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + property Server: TPortBitsProperties read GetServerProperties; +{$ENDIF} + end; + +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} +// *********************************************************************// +// OLE Server Properties Proxy Class +// Server Object : TPortBits +// (̃IuWFNg IDE ̃vpeB CXyN^[T[o[ +// vpeBύXꍇɎg܂) +// *********************************************************************// + TPortBitsProperties = class(TPersistent) + private + FServer: TPortBits; + function GetDefaultInterface: IPortBits; + constructor Create(AServer: TPortBits); + protected + function Get_Rts: WordBool; + procedure Set_Rts(Value: WordBool); + function Get_Dtr: WordBool; + procedure Set_Dtr(Value: WordBool); + function Get_Cts: WordBool; + function Get_Dsr: WordBool; + public + property DefaultInterface: IPortBits read GetDefaultInterface; + published + property Rts: WordBool read Get_Rts write Set_Rts; + property Dtr: WordBool read Get_Dtr write Set_Dtr; + end; +{$ENDIF} + + +procedure Register; + +resourcestring + dtlServerPage = 'ActiveX'; + +implementation + +uses ComObj; + +class function CoOmniRigX.Create: IOmniRigX; +begin + Result := CreateComObject(CLASS_OmniRigX) as IOmniRigX; +end; + +class function CoOmniRigX.CreateRemote(const MachineName: string): IOmniRigX; +begin + Result := CreateRemoteComObject(MachineName, CLASS_OmniRigX) as IOmniRigX; +end; + +procedure TOmniRigX.InitServerData; +const + CServerData: TServerData = ( + ClassID: '{0839E8C6-ED30-4950-8087-966F970F0CAE}'; + IntfIID: '{501A2858-3331-467A-837A-989FDEDACC7D}'; + EventIID: '{2219175F-E561-47E7-AD17-73C4D8891AA1}'; + LicenseKey: nil; + Version: 500); +begin + ServerData := @CServerData; +end; + +procedure TOmniRigX.Connect; +var + punk: IUnknown; +begin + if FIntf = nil then + begin + punk := GetServer; + ConnectEvents(punk); + Fintf:= punk as IOmniRigX; + end; +end; + +procedure TOmniRigX.ConnectTo(svrIntf: IOmniRigX); +begin + Disconnect; + FIntf := svrIntf; + ConnectEvents(FIntf); +end; + +procedure TOmniRigX.DisConnect; +begin + if Fintf <> nil then + begin + DisconnectEvents(FIntf); + FIntf := nil; + end; +end; + +function TOmniRigX.GetDefaultInterface: IOmniRigX; +begin + if FIntf = nil then + Connect; + Assert(FIntf <> nil, 'DefaultInterface NULL łBR|[lg̓T[o[ɐڑł܂łBn߂O ''Connect'' ܂ ''ConnectTo'' ĂԕKv܂B'); + Result := FIntf; +end; + +constructor TOmniRigX.Create(AOwner: TComponent); +begin + inherited Create(AOwner); +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + FProps := TOmniRigXProperties.Create(Self); +{$ENDIF} +end; + +destructor TOmniRigX.Destroy; +begin +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + FProps.Free; +{$ENDIF} + inherited Destroy; +end; + +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} +function TOmniRigX.GetServerProperties: TOmniRigXProperties; +begin + Result := FProps; +end; +{$ENDIF} + +procedure TOmniRigX.InvokeEvent(DispID: TDispID; var Params: TVariantArray); +begin + case DispID of + -1: Exit; // DISPID_UNKNOWN + 1: if Assigned(FOnVisibleChange) then + FOnVisibleChange(Self); + 2: if Assigned(FOnRigTypeChange) then + FOnRigTypeChange(Self, Params[0] {Integer}); + 3: if Assigned(FOnStatusChange) then + FOnStatusChange(Self, Params[0] {Integer}); + 4: if Assigned(FOnParamsChange) then + FOnParamsChange(Self, Params[1] {Integer}, Params[0] {Integer}); + 5: if Assigned(FOnCustomReply) then + FOnCustomReply(Self, Params[2] {OleVariant}, Params[1] {OleVariant}, Params[0] {Integer}); + end; {case DispID} +end; + +function TOmniRigX.Get_InterfaceVersion: Integer; +begin + Result := DefaultInterface.InterfaceVersion; +end; + +function TOmniRigX.Get_SoftwareVersion: Integer; +begin + Result := DefaultInterface.SoftwareVersion; +end; + +function TOmniRigX.Get_Rig1: IRigX; +begin + Result := DefaultInterface.Rig1; +end; + +function TOmniRigX.Get_Rig2: IRigX; +begin + Result := DefaultInterface.Rig2; +end; + +function TOmniRigX.Get_DialogVisible: WordBool; +begin + Result := DefaultInterface.DialogVisible; +end; + +procedure TOmniRigX.Set_DialogVisible(Value: WordBool); +begin + DefaultInterface.DialogVisible := Value; +end; + +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} +constructor TOmniRigXProperties.Create(AServer: TOmniRigX); +begin + inherited Create; + FServer := AServer; +end; + +function TOmniRigXProperties.GetDefaultInterface: IOmniRigX; +begin + Result := FServer.DefaultInterface; +end; + +function TOmniRigXProperties.Get_InterfaceVersion: Integer; +begin + Result := DefaultInterface.InterfaceVersion; +end; + +function TOmniRigXProperties.Get_SoftwareVersion: Integer; +begin + Result := DefaultInterface.SoftwareVersion; +end; + +function TOmniRigXProperties.Get_Rig1: IRigX; +begin + Result := DefaultInterface.Rig1; +end; + +function TOmniRigXProperties.Get_Rig2: IRigX; +begin + Result := DefaultInterface.Rig2; +end; + +function TOmniRigXProperties.Get_DialogVisible: WordBool; +begin + Result := DefaultInterface.DialogVisible; +end; + +procedure TOmniRigXProperties.Set_DialogVisible(Value: WordBool); +begin + DefaultInterface.DialogVisible := Value; +end; + +{$ENDIF} + +class function CoRigX.Create: IRigX; +begin + Result := CreateComObject(CLASS_RigX) as IRigX; +end; + +class function CoRigX.CreateRemote(const MachineName: string): IRigX; +begin + Result := CreateRemoteComObject(MachineName, CLASS_RigX) as IRigX; +end; + +procedure TRigX.InitServerData; +const + CServerData: TServerData = ( + ClassID: '{78AECFA2-3F52-4E39-98D3-1646C00A6234}'; + IntfIID: '{D30A7E51-5862-45B7-BFFA-6415917DA0CF}'; + EventIID: ''; + LicenseKey: nil; + Version: 500); +begin + ServerData := @CServerData; +end; + +procedure TRigX.Connect; +var + punk: IUnknown; +begin + if FIntf = nil then + begin + punk := GetServer; + Fintf:= punk as IRigX; + end; +end; + +procedure TRigX.ConnectTo(svrIntf: IRigX); +begin + Disconnect; + FIntf := svrIntf; +end; + +procedure TRigX.DisConnect; +begin + if Fintf <> nil then + begin + FIntf := nil; + end; +end; + +function TRigX.GetDefaultInterface: IRigX; +begin + if FIntf = nil then + Connect; + Assert(FIntf <> nil, 'DefaultInterface NULL łBR|[lg̓T[o[ɐڑł܂łBn߂O ''Connect'' ܂ ''ConnectTo'' ĂԕKv܂B'); + Result := FIntf; +end; + +constructor TRigX.Create(AOwner: TComponent); +begin + inherited Create(AOwner); +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + FProps := TRigXProperties.Create(Self); +{$ENDIF} +end; + +destructor TRigX.Destroy; +begin +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + FProps.Free; +{$ENDIF} + inherited Destroy; +end; + +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} +function TRigX.GetServerProperties: TRigXProperties; +begin + Result := FProps; +end; +{$ENDIF} + +function TRigX.Get_RigType: WideString; +begin + Result := DefaultInterface.RigType; +end; + +function TRigX.Get_ReadableParams: Integer; +begin + Result := DefaultInterface.ReadableParams; +end; + +function TRigX.Get_WriteableParams: Integer; +begin + Result := DefaultInterface.WriteableParams; +end; + +function TRigX.Get_Status: RigStatusX; +begin + Result := DefaultInterface.Status; +end; + +function TRigX.Get_StatusStr: WideString; +begin + Result := DefaultInterface.StatusStr; +end; + +function TRigX.Get_Freq: Integer; +begin + Result := DefaultInterface.Freq; +end; + +procedure TRigX.Set_Freq(Value: Integer); +begin + DefaultInterface.Freq := Value; +end; + +function TRigX.Get_FreqA: Integer; +begin + Result := DefaultInterface.FreqA; +end; + +procedure TRigX.Set_FreqA(Value: Integer); +begin + DefaultInterface.FreqA := Value; +end; + +function TRigX.Get_FreqB: Integer; +begin + Result := DefaultInterface.FreqB; +end; + +procedure TRigX.Set_FreqB(Value: Integer); +begin + DefaultInterface.FreqB := Value; +end; + +function TRigX.Get_RitOffset: Integer; +begin + Result := DefaultInterface.RitOffset; +end; + +procedure TRigX.Set_RitOffset(Value: Integer); +begin + DefaultInterface.RitOffset := Value; +end; + +function TRigX.Get_Pitch: Integer; +begin + Result := DefaultInterface.Pitch; +end; + +procedure TRigX.Set_Pitch(Value: Integer); +begin + DefaultInterface.Pitch := Value; +end; + +function TRigX.Get_Vfo: RigParamX; +begin + Result := DefaultInterface.Vfo; +end; + +procedure TRigX.Set_Vfo(Value: RigParamX); +begin + DefaultInterface.Vfo := Value; +end; + +function TRigX.Get_Split: RigParamX; +begin + Result := DefaultInterface.Split; +end; + +procedure TRigX.Set_Split(Value: RigParamX); +begin + DefaultInterface.Split := Value; +end; + +function TRigX.Get_Rit: RigParamX; +begin + Result := DefaultInterface.Rit; +end; + +procedure TRigX.Set_Rit(Value: RigParamX); +begin + DefaultInterface.Rit := Value; +end; + +function TRigX.Get_Xit: RigParamX; +begin + Result := DefaultInterface.Xit; +end; + +procedure TRigX.Set_Xit(Value: RigParamX); +begin + DefaultInterface.Xit := Value; +end; + +function TRigX.Get_Tx: RigParamX; +begin + Result := DefaultInterface.Tx; +end; + +procedure TRigX.Set_Tx(Value: RigParamX); +begin + DefaultInterface.Tx := Value; +end; + +function TRigX.Get_Mode: RigParamX; +begin + Result := DefaultInterface.Mode; +end; + +procedure TRigX.Set_Mode(Value: RigParamX); +begin + DefaultInterface.Mode := Value; +end; + +function TRigX.Get_PortBits: IPortBits; +begin + Result := DefaultInterface.PortBits; +end; + +function TRigX.IsParamReadable(Param: RigParamX): WordBool; +begin + Result := DefaultInterface.IsParamReadable(Param); +end; + +function TRigX.IsParamWriteable(Param: RigParamX): WordBool; +begin + Result := DefaultInterface.IsParamWriteable(Param); +end; + +procedure TRigX.ClearRit; +begin + DefaultInterface.ClearRit; +end; + +procedure TRigX.SetSimplexMode(Freq: Integer); +begin + DefaultInterface.SetSimplexMode(Freq); +end; + +procedure TRigX.SetSplitMode(RxFreq: Integer; TxFreq: Integer); +begin + DefaultInterface.SetSplitMode(RxFreq, TxFreq); +end; + +function TRigX.FrequencyOfTone(Tone: Integer): Integer; +begin + Result := DefaultInterface.FrequencyOfTone(Tone); +end; + +procedure TRigX.SendCustomCommand(Command: OleVariant; ReplyLength: Integer; ReplyEnd: OleVariant); +begin + DefaultInterface.SendCustomCommand(Command, ReplyLength, ReplyEnd); +end; + +function TRigX.GetRxFrequency: Integer; +begin + Result := DefaultInterface.GetRxFrequency; +end; + +function TRigX.GetTxFrequency: Integer; +begin + Result := DefaultInterface.GetTxFrequency; +end; + +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} +constructor TRigXProperties.Create(AServer: TRigX); +begin + inherited Create; + FServer := AServer; +end; + +function TRigXProperties.GetDefaultInterface: IRigX; +begin + Result := FServer.DefaultInterface; +end; + +function TRigXProperties.Get_RigType: WideString; +begin + Result := DefaultInterface.RigType; +end; + +function TRigXProperties.Get_ReadableParams: Integer; +begin + Result := DefaultInterface.ReadableParams; +end; + +function TRigXProperties.Get_WriteableParams: Integer; +begin + Result := DefaultInterface.WriteableParams; +end; + +function TRigXProperties.Get_Status: RigStatusX; +begin + Result := DefaultInterface.Status; +end; + +function TRigXProperties.Get_StatusStr: WideString; +begin + Result := DefaultInterface.StatusStr; +end; + +function TRigXProperties.Get_Freq: Integer; +begin + Result := DefaultInterface.Freq; +end; + +procedure TRigXProperties.Set_Freq(Value: Integer); +begin + DefaultInterface.Freq := Value; +end; + +function TRigXProperties.Get_FreqA: Integer; +begin + Result := DefaultInterface.FreqA; +end; + +procedure TRigXProperties.Set_FreqA(Value: Integer); +begin + DefaultInterface.FreqA := Value; +end; + +function TRigXProperties.Get_FreqB: Integer; +begin + Result := DefaultInterface.FreqB; +end; + +procedure TRigXProperties.Set_FreqB(Value: Integer); +begin + DefaultInterface.FreqB := Value; +end; + +function TRigXProperties.Get_RitOffset: Integer; +begin + Result := DefaultInterface.RitOffset; +end; + +procedure TRigXProperties.Set_RitOffset(Value: Integer); +begin + DefaultInterface.RitOffset := Value; +end; + +function TRigXProperties.Get_Pitch: Integer; +begin + Result := DefaultInterface.Pitch; +end; + +procedure TRigXProperties.Set_Pitch(Value: Integer); +begin + DefaultInterface.Pitch := Value; +end; + +function TRigXProperties.Get_Vfo: RigParamX; +begin + Result := DefaultInterface.Vfo; +end; + +procedure TRigXProperties.Set_Vfo(Value: RigParamX); +begin + DefaultInterface.Vfo := Value; +end; + +function TRigXProperties.Get_Split: RigParamX; +begin + Result := DefaultInterface.Split; +end; + +procedure TRigXProperties.Set_Split(Value: RigParamX); +begin + DefaultInterface.Split := Value; +end; + +function TRigXProperties.Get_Rit: RigParamX; +begin + Result := DefaultInterface.Rit; +end; + +procedure TRigXProperties.Set_Rit(Value: RigParamX); +begin + DefaultInterface.Rit := Value; +end; + +function TRigXProperties.Get_Xit: RigParamX; +begin + Result := DefaultInterface.Xit; +end; + +procedure TRigXProperties.Set_Xit(Value: RigParamX); +begin + DefaultInterface.Xit := Value; +end; + +function TRigXProperties.Get_Tx: RigParamX; +begin + Result := DefaultInterface.Tx; +end; + +procedure TRigXProperties.Set_Tx(Value: RigParamX); +begin + DefaultInterface.Tx := Value; +end; + +function TRigXProperties.Get_Mode: RigParamX; +begin + Result := DefaultInterface.Mode; +end; + +procedure TRigXProperties.Set_Mode(Value: RigParamX); +begin + DefaultInterface.Mode := Value; +end; + +function TRigXProperties.Get_PortBits: IPortBits; +begin + Result := DefaultInterface.PortBits; +end; + +{$ENDIF} + +class function CoPortBits.Create: IPortBits; +begin + Result := CreateComObject(CLASS_PortBits) as IPortBits; +end; + +class function CoPortBits.CreateRemote(const MachineName: string): IPortBits; +begin + Result := CreateRemoteComObject(MachineName, CLASS_PortBits) as IPortBits; +end; + +procedure TPortBits.InitServerData; +const + CServerData: TServerData = ( + ClassID: '{B786DE29-3B3D-4C66-B7C4-547F9A77A21D}'; + IntfIID: '{3DEE2CC8-1EA3-46E7-B8B4-3E7321F2446A}'; + EventIID: ''; + LicenseKey: nil; + Version: 500); +begin + ServerData := @CServerData; +end; + +procedure TPortBits.Connect; +var + punk: IUnknown; +begin + if FIntf = nil then + begin + punk := GetServer; + Fintf:= punk as IPortBits; + end; +end; + +procedure TPortBits.ConnectTo(svrIntf: IPortBits); +begin + Disconnect; + FIntf := svrIntf; +end; + +procedure TPortBits.DisConnect; +begin + if Fintf <> nil then + begin + FIntf := nil; + end; +end; + +function TPortBits.GetDefaultInterface: IPortBits; +begin + if FIntf = nil then + Connect; + Assert(FIntf <> nil, 'DefaultInterface NULL łBR|[lg̓T[o[ɐڑł܂łBn߂O ''Connect'' ܂ ''ConnectTo'' ĂԕKv܂B'); + Result := FIntf; +end; + +constructor TPortBits.Create(AOwner: TComponent); +begin + inherited Create(AOwner); +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + FProps := TPortBitsProperties.Create(Self); +{$ENDIF} +end; + +destructor TPortBits.Destroy; +begin +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} + FProps.Free; +{$ENDIF} + inherited Destroy; +end; + +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} +function TPortBits.GetServerProperties: TPortBitsProperties; +begin + Result := FProps; +end; +{$ENDIF} + +function TPortBits.Get_Rts: WordBool; +begin + Result := DefaultInterface.Rts; +end; + +procedure TPortBits.Set_Rts(Value: WordBool); +begin + DefaultInterface.Rts := Value; +end; + +function TPortBits.Get_Dtr: WordBool; +begin + Result := DefaultInterface.Dtr; +end; + +procedure TPortBits.Set_Dtr(Value: WordBool); +begin + DefaultInterface.Dtr := Value; +end; + +function TPortBits.Get_Cts: WordBool; +begin + Result := DefaultInterface.Cts; +end; + +function TPortBits.Get_Dsr: WordBool; +begin + Result := DefaultInterface.Dsr; +end; + +function TPortBits.Lock: WordBool; +begin + Result := DefaultInterface.Lock; +end; + +procedure TPortBits.Unlock; +begin + DefaultInterface.Unlock; +end; + +{$IFDEF LIVE_SERVER_AT_DESIGN_TIME} +constructor TPortBitsProperties.Create(AServer: TPortBits); +begin + inherited Create; + FServer := AServer; +end; + +function TPortBitsProperties.GetDefaultInterface: IPortBits; +begin + Result := FServer.DefaultInterface; +end; + +function TPortBitsProperties.Get_Rts: WordBool; +begin + Result := DefaultInterface.Rts; +end; + +procedure TPortBitsProperties.Set_Rts(Value: WordBool); +begin + DefaultInterface.Rts := Value; +end; + +function TPortBitsProperties.Get_Dtr: WordBool; +begin + Result := DefaultInterface.Dtr; +end; + +procedure TPortBitsProperties.Set_Dtr(Value: WordBool); +begin + DefaultInterface.Dtr := Value; +end; + +function TPortBitsProperties.Get_Cts: WordBool; +begin + Result := DefaultInterface.Cts; +end; + +function TPortBitsProperties.Get_Dsr: WordBool; +begin + Result := DefaultInterface.Dsr; +end; + +{$ENDIF} + +procedure Register; +begin + RegisterComponents(dtlServerPage, [TOmniRigX, TRigX, TPortBits]); +end; + +end. diff --git a/src/PathDialog.pas b/src/PathDialog.pas new file mode 100644 index 00000000..21f5597c --- /dev/null +++ b/src/PathDialog.pas @@ -0,0 +1,250 @@ +unit PathDialog; + +{ The TPathDialog Component V1.0 + + MOST IMPORTANT :) + ================= + This is NOT Freeware: It's PostCardWare. When you use + this component or think it's useful, send me a post-card + to: Florian Bmers, Werderstr.31, D - 68165 Mannheim, Germany + + And of course, I am very interested in any application + that uses this component (or any other application you wrote). + If so, mail me (not the program, just an URL or similar) ! + (mail address below) + + Installation: + ============= + 1. Copy the File PathDialog.pas to the directory where + you store your components (or let it where it is) + 2. In Delphi, select Component|Install Component. In the + following dialog enter the path and filename of + PathDialog.pas and hit OK. + 3. Now the TPathDialog Component is available in the + Component palette under Samples. + + + How to use it + ============= + It's as easy as the other CommonDialogs: Drop the icon + on your form. Then a call to Execute shows the Path Dialog. + If Execute returned true, the directory property contains + the selected path. When you assigned a directory prior to + calling Execute, it is selected when showing. + + Advanced functionality + ====================== + - property Title: This text is shown at the top of the + PathDialog. It is normally a line like: 'Select the installation + folder' + + - property ShowStatus and StatusText: if ShowStatus is true, an + extra line is inserted above the tree. There the StatusText is + displayed. You might set StatusText in the Event-Handler of + OnSelect. + + - Event OnShow: Is called when the Dialog is appearing + + - Event OnSelect: Is called each time, when the user changes + the selected item in the tree. The Path parameter is + the currently selected directory. It is '' when the user + selected a non-directory item like Control Panel, etc. + + - function setOKButton: When the Dialog is visible, you + can enable or disable the OK Button with this function. + This may be handy when you want to limit the possible + directories the user can select. You should call this only + in one of the event handler procedures. + + - property visible: is true when the Dialog is showing. + + - property Handle: Window Handle of the Dialog. Should not be + necessary to use it. + + Copyright + ========= + (c) 1997 by Florian Bmers + + send any comments, proposals, enhancements etc. to: + fbomers@erato.unice.fr + (if this address does not work: boemers@rumms.uni-mannheim.de) + +} +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + ShlObj,ActiveX; + +type + TSelectEvent=procedure(Sender:TObject; Path:String) of object; + + TPathDialog = class(TComponent) + private + FHandle:THandle; + FTitle:String; + FDirectory:String; + FShowStatus:Boolean; + FStatusText:String; + + FOnShow:TNotifyEvent; + FOnSelect:TSelectEvent; + + function getVisible:Boolean; + procedure SetDirectory(Dir:String); + procedure SetStatusText(Text:String); + public + { Shows the dialog. Returns false if the user clicked Cancel } + { or if an error occurred } + function Execute:Boolean; + { Sets the status of the OK-Button to either enabled or disabled } + { This function should only be called in one of the 2 Eventhandlers } + function setOKButton(enabled:Boolean):Boolean; + { whether the dialog is visible } + property visible:Boolean read getVisible; + { Window Handle of the dialog is only valid when visible } + { ...should not be used...} + property Handle:THandle read FHandle; + published + { should be set before calling Execute } + property Title:String read FTitle write FTitle; + { is not valid while the Dialog is visible } + property Directory:String read FDirectory write setDirectory; + { must be set before executing the dialog } + property ShowStatus:Boolean read FShowStatus write FShowStatus default false; + { is only used if ShowStatus is true } + property StatusText:String read FStatusText write SetStatusText; + + property Tag; + // Events + property OnShow:TNotifyEvent read FOnShow write FOnShow; + property OnSelect:TSelectEvent read FOnSelect write FOnSelect; + end; + +procedure Register; + +implementation + +function CallBack(Wnd: HWND; uMsg: UINT; lParam, lpData: LPARAM): Integer stdcall; +var dir:String; +begin + try + with TPathDialog(lpData) do + case uMsg of + BFFM_INITIALIZED: + begin + FHandle:=Wnd; + SetDirectory(FDirectory); + SetStatusText(FStatusText); + try + if assigned(FOnShow) then + FOnShow(TPathDialog(lpData)); + except + On e:Exception do + ShowMessage(e.Message); + end; + end; + BFFM_SELCHANGED: // lpParam is a pointer to the item identifier list for the newly selected folder. + begin + if assigned(FOnSelect) then + try + SetString(dir,nil,MAX_PATH); + if SHGetPathFromIDList(PItemIDList(lParam),PChar(Dir)) then + FOnSelect(TPathDialog(lpData),PChar(Dir)) + else + FOnSelect(TPathDialog(lpData),''); + except + On e:Exception do + ShowMessage(e.Message); + end; + end; + end; + except + end; + result:=0; +end; + +function TPathDialog.Execute:Boolean; +var iList,Root:PItemIDList; + bi:TBrowseInfo; + DispName:String; + malloc:IMalloc; +begin + result:=false; + if (Owner is TWinControl) then + bi.hwndOwner:=TWinControl(Owner).Handle + else exit; + if SHGetSpecialFolderLocation(Handle, CSIDL_DRIVES,Root)=NOERROR then + try + SHGetMalloc(malloc); + SetString(DispName,nil,MAX_PATH); + with bi do + begin + pidlRoot := root; + pszDisplayName := PChar(DispName); + lpszTitle := PChar(FTitle); + ulFlags:=BIF_RETURNONLYFSDIRS; + if FShowStatus then + ulFlags:=ulFlags or BIF_STATUSTEXT; + lpfn:=@CallBack; + lParam:=Integer(self); + + end; + iList:=SHBrowseForFolder(bi); + FHandle:=0; + if iList<>nil then + try + if SHGetPathFromIDList(iList,PChar(DispName)) then + begin + FDirectory:=PChar(DispName); + result:=true; + end; + finally + malloc.Free(iList); + end; + finally + malloc.Free(root); + end; +end; + +function TPathDialog.setOKButton(enabled:Boolean):Boolean; +begin + result:=false; + if (FHandle<>0) then + begin + result:=true; + if enabled then + SendMessage(FHandle,BFFM_ENABLEOK,1,0) + else + SendMessage(FHandle,BFFM_ENABLEOK,0,0); + end; +end; + +function TPathDialog.getVisible:Boolean; +begin + result:=FHandle<>0; +end; + +procedure TPathDialog.SetDirectory(Dir:String); +begin + if (Dir<>'') and (Dir[length(Dir)]='\') then + FDirectory:=copy(Dir,1,length(Dir)-1) + else + FDirectory:=Dir; + if (FHandle<>0) and (FDirectory<>'') then + SendMessage(FHandle,BFFM_SETSELECTION,Integer(LongBool(true)),Integer(PChar(FDirectory))); +end; + +procedure TPathDialog.SetStatusText(Text:String); +begin + FStatusText:=Text; + if (FHandle<>0) and FShowStatus then + SendMessage(FHandle,BFFM_SETSTATUSTEXT,0,Integer(PChar(FStatusText))); +end; + +procedure Register; +begin + RegisterComponents('Samples', [TPathDialog]); +end; + +end. diff --git a/src/Project1.dpr b/src/Project1.dpr new file mode 100644 index 00000000..8b9c92bf --- /dev/null +++ b/src/Project1.dpr @@ -0,0 +1,14 @@ +program Project1; + +uses + Forms, + ccczlogconv in 'ccczlogconv.pas' {Form1}, + zLogGlobal in 'zLogGlobal.pas'; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.Run; +end. diff --git a/src/SoftButt.pas b/src/SoftButt.pas new file mode 100644 index 00000000..1aa822fd --- /dev/null +++ b/src/SoftButt.pas @@ -0,0 +1,257 @@ +unit SoftButt; +{ + + *** SoftButt.Pas by Rickard Dahlstrand (c)Tilde Konsult 1997 *** + + This Component is like the Speedbutton except for the softborders, nice ehh? + And some other stuff I played around with. And as a BONUS, the --> SoftPann <-- + just like a panel but... + + This is creditware so by using this you have to accept the following condition. + You can change my code or use it as is, but whatever you do please include me in + your creditline! Like this... ' Thanks to rickard@tilde.se for the SoftButts... ' + If you don't like doing this, mail me and we'll discuss it! + + AND... + + I like credit in my mailbox too!! So if you like this or/and have made improvements, + MAIL ME!!! + + If anyone looking for useless things to do, try to derive the TSoftButt from TButton, + if you do, please mail me a copy!! + + /rickard@tilde.se + +} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + ExtCtrls, StdCtrls, Buttons; + +type + TSoftButt = class(TSpeedButton) + private + focused: Boolean; + Sshowfocusring: Boolean; + procedure CMMouseEnter(var Message: TMessage); message CM_MOUSEENTER; + procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; + protected + procedure Paint; override; + public + constructor Create(AOwner: TComponent); override; + published + property ShowFocusRing: Boolean read Sshowfocusring write Sshowfocusring default True; + end; + + TSoftPann = class(TPanel) + protected + procedure Paint; override; + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('Standard', [TSoftButt]); + RegisterComponents('Standard', [TSoftPann]); +end; + +// Just init some values... +constructor TSoftButt.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + showfocusring := True; + Height := 25; + Width := 35; +end; + +// Draw a focusline on mouseenter +procedure TSoftButt.CMMouseEnter(var Message: TMessage); +begin + focused := True; + Repaint; +end; + +// Remove the focusline on mouseleave +procedure TSoftButt.CMMouseLeave(var Message: TMessage); +begin + focused := False; + Repaint; +end; + +// This is the BUTT paint method... +procedure TSoftButt.Paint; + +// Small proc to make one pixels dots... +procedure Dotme(Yta: TCanvas; x,y: Integer); +begin + Yta.MoveTo(x, y); + Yta.LineTo(x+1, y); +end; + +var + MaxX, MaxY: Integer; + rect: TRect; +begin + inherited Paint; // Draw all other stuff before drawing my stuff... + + With Self, Canvas do + begin + If Flat then // If the butt is flat, don't draw anything... + If not focused then exit; // Unless it is focused, the draw all... + + If FState = bsDown then begin // If but is down... + MaxX := ClientWidth -1; // The max X value I can use... + MaxY := ClientHeight -1; // The max Y value I can use... + + Brush.Color := $02BFBFBF; // Don't make me comment this, + Pen.Color := $02BFBFBF; // just a bit of drawing... + Pen.Color := $02E7E7E7; + MoveTo(MaxX, 0); + LineTo(MaxX, MaxY); + LineTo(0, MaxY); + Pen.Color := $02666666; + LineTo(0, 0); + LineTo(1, 1); + LineTo(0, 0); + LineTo(MaxX, 0); + Pen.Color := $02999999; + MoveTo(MaxX, 1); + LineTo(2, 1); + LineTo(2, 2); + LineTo(1, 2); + LineTo(1, MaxY); + Dotme(Canvas, 0, MaxY); + Dotme(Canvas, MaxX, 0); + Pen.Color := $02BFBFBF; + Dotme(Canvas, MaxX, 2); + Dotme(Canvas, MaxX, 1); + Dotme(Canvas, 1, MaxY); + Pen.Color := $02FFFFFF; + Dotme(Canvas, MaxX-1, MaxY-1); + end + else begin // If butt is up.. + MaxX := ClientWidth -1; + MaxY := ClientHeight -1; + Rect.Top := 2; // Init some focus rect values + Rect.Left := 2; + Rect.Right := MaxX -2; + Rect.Bottom := MaxY -2; + + Brush.Color := $02BFBFBF; + Pen.Color := $02BFBFBF; + Pen.Color := $02E7E7E7; + // Draw focusrect... + If focused and Sshowfocusring then Canvas.DrawFocusRect(Rect); + MoveTo(MaxX, 0); + LineTo(0, 0); + LineTo(0, MaxY); + Pen.Color := $02666666; + LineTo(MaxX, MaxY); + LineTo(MaxX-1, MaxY-1); + LineTo(MaxX, MaxY); + LineTo(MaxX, 0); + Pen.Color := $02999999; + MoveTo(MaxX-1, 0); + LineTo(MaxX-1, MaxY-2); + LineTo(MaxX-2, MaxY-2); + LineTo(MaxX-2, MaxY-1); + LineTo(0, MaxY-1); + Dotme(Canvas, 0, MaxY); + Dotme(Canvas, MaxX, 0); + Pen.Color := $02BFBFBF; + Dotme(Canvas, 0, MaxY-2); + Dotme(Canvas, 0, MaxY-1); + Dotme(Canvas, MaxX-1, 0); + Pen.Color := $02FFFFFF; + Dotme(Canvas, 1, 1); + end; + end; + +end; +// This is the PANN paint method... +procedure TSoftPann.Paint; + +// Small proc to make one pixels dots... +procedure Dotme(Yta: TCanvas; x,y: Integer); +begin + Yta.MoveTo(x, y); + Yta.LineTo(x+1, y); +end; + +var + MaxX, MaxY: Integer; +begin + inherited Paint; + + With Self, Canvas do + begin // used the OUTER bevel, but it's easy to modify... + If BevelOuter = bvNone then Exit; // Don't draw, no bevel... + If BevelOuter = bvLowered then begin // Like buttdown... + MaxX := ClientWidth -1; + MaxY := ClientHeight -1; + + Brush.Color := $02BFBFBF; + Pen.Color := $02BFBFBF; + Pen.Color := $02E7E7E7; + MoveTo(MaxX, 0); + LineTo(MaxX, MaxY); + LineTo(0, MaxY); + Pen.Color := $02666666; + LineTo(0, 0); + LineTo(1, 1); + LineTo(0, 0); + LineTo(MaxX, 0); + Pen.Color := $02999999; + MoveTo(MaxX, 1); + LineTo(2, 1); + LineTo(2, 2); + LineTo(1, 2); + LineTo(1, MaxY); + Dotme(Canvas, 0, MaxY); + Dotme(Canvas, MaxX, 0); + Pen.Color := $02BFBFBF; + Dotme(Canvas, MaxX, 2); + Dotme(Canvas, MaxX, 1); + Dotme(Canvas, 1, MaxY); + Pen.Color := $02FFFFFF; + Dotme(Canvas, MaxX-1, MaxY-1); + end + else begin // Like buttup, but no focusline... + MaxX := ClientWidth -1; + MaxY := ClientHeight -1; + + Brush.Color := $02BFBFBF; + Pen.Color := $02BFBFBF; + Pen.Color := $02E7E7E7; + MoveTo(MaxX, 0); + LineTo(0, 0); + LineTo(0, MaxY); + Pen.Color := $02666666; + LineTo(MaxX, MaxY); + LineTo(MaxX-1, MaxY-1); + LineTo(MaxX, MaxY); + LineTo(MaxX, 0); + Pen.Color := $02999999; + MoveTo(MaxX-1, 0); + LineTo(MaxX-1, MaxY-2); + LineTo(MaxX-2, MaxY-2); + LineTo(MaxX-2, MaxY-1); + LineTo(0, MaxY-1); + Dotme(Canvas, 0, MaxY); + Dotme(Canvas, MaxX, 0); + Pen.Color := $02BFBFBF; + Dotme(Canvas, 0, MaxY-2); + Dotme(Canvas, 0, MaxY-1); + Dotme(Canvas, MaxX-1, 0); + Pen.Color := $02FFFFFF; + Dotme(Canvas, 1, 1); + end; + end; +end; + +end. diff --git a/src/Splitbar.pas b/src/Splitbar.pas new file mode 100644 index 00000000..d634c15f --- /dev/null +++ b/src/Splitbar.pas @@ -0,0 +1,238 @@ +{ + WARNING! THIS CODE IS PROVIDED AS IS WITH NO GUARANTEES OF ANY KIND! + USE THIS AT YOUR OWN RISK - YOU ARE THE ONLY PERSON RESPONSIBLE FOR + ANY DAMAGE THIS CODE MAY CAUSE - YOU HAVE BEEN WARNED! + + + SplitBar component for Delphi + + Install this unit as a component and you can use whenever + you're in need of one or more panels that have to be resized. + Click on the bar and drag it around and it will resize the + underlying control. + The bar works like a panel so it has all the properties you + know from TPanel. + + Added properties are: + - SplitOrientation: Choose spHorizontal if you want to split + the underlying control horizontally and spVertical for vertical + splitting. Sorry for the confusion but I choose the identifiers + as meaningful as Borlands Cursor property: You'll have a HSplit + cursor when using spHorizontal splitting. + - MinOffset/MaxOffset: If you don't want the underlying panel to be + resized to the whole window. + + This software is free. + + (c) 01-06/1996 by Guido Schoepp + email: gus@abo.rhein-zeitung.de +} +unit SplitBar; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, StdCtrls, ExtCtrls; + +type + TSplitOrientation = (spHorizontal, spVertical); + + TSplitBar = class(TPanel) + private + fSplitDC : HDC; + fSplitRect : TRect; + fSplitOff, + fSplitMax, + fSplitMin : Integer; + fSplitOrg : TPoint; + fMouseIsDown : Boolean; + fOrient : TSplitOrientation; + fMaxOff, + fMinOff : Integer; + fClipRgn : HRGN; + protected + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + public + constructor Create(aOwner:TComponent); override; + published + property SplitOrientation:TSplitOrientation read fOrient write fOrient default spHorizontal; + property Cursor default crHSplit; + property MinOffset:Integer read fMinOff write fMinOff default 0; + property MaxOffset:Integer read fMaxOff write fMaxOff default 0; + end; + + procedure Register; + +implementation + + +constructor TSplitBar.create(aOwner:TComponent); +begin + inherited Create(aOwner); + fMouseIsDown := FALSE; + fSplitDC := 0; + fOrient := spHorizontal; + Cursor := crHSplit; +end; + +procedure TSplitBar.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +var + p : TPoint; + r : TRect; + parentForm : TForm; +begin + if not fMouseIsDown then + begin + fMouseIsDown := TRUE; + fSplitDC := GetWindowDC(0); + + parentForm := getParentForm(self); + r := parentForm.clientRect; + + fSplitOrg := clientToScreen(Point(x, y)); + fSplitRect := clientRect; + p := clientToScreen(fSplitRect.topLeft); + fSplitRect := Rect(p.x, p.y, p.x+abs(fSplitRect.right-fSplitRect.left), p.y+abs(fSplitRect.bottom-fSplitRect.top)); + + if fOrient=spHorizontal then + begin + p := parentForm.clientToScreen(r.topLeft); + fSplitMin := p.x; + p := parentForm.clientToScreen(r.bottomRight); + fSplitMax := p.x; + fSplitOff := fSplitOrg.x-fSplitRect.left; + end else + begin + p := parentForm.clientToScreen(r.topLeft); + fSplitMin := p.y; + p := parentForm.clientToScreen(r.bottomRight); + fSplitMax := p.y; + + fSplitOff := fSplitOrg.y-fSplitRect.top; + end; + + r := Application.MainForm.clientRect; + r.topLeft := Application.MainForm.clientToScreen(r.topLeft); + r.bottomRight := Application.MainForm.clientToScreen(r.bottomRight); + + fClipRgn := WinProcs.CreateRectRgnIndirect(r); + + selectClipRgn(fSplitDC, fClipRgn); + WinProcs.PatBlt(fSplitDC, + fSplitRect.left, fSplitRect.top, + fSplitRect.right-fSplitRect.left, + fSplitRect.bottom-fSplitRect.top, + PATINVERT); + end; +end; + +procedure TSplitBar.MouseMove(Shift: TShiftState; X, Y: Integer); +var + p : TPoint; +begin + if fMouseIsDown then + begin + WinProcs.PatBlt(fSplitDC, + fSplitRect.left, fSplitRect.top, + fSplitRect.right-fSplitRect.left, + fSplitRect.bottom-fSplitRect.top, + PATINVERT); + + p := clientToScreen(Point(x, y)); + if fOrient=spHorizontal then + begin + fSplitRect := Rect(p.x-fSplitOff, fSplitRect.top, + p.x-fSplitOff+abs(fSplitRect.right-fSplitRect.left), + fSplitRect.bottom); + if Align=alRight then + begin + if fSplitRect.LeftfSplitMax-fMaxOff then + OffsetRect(fSplitRect, fSplitMax-fMaxOff-fSplitRect.right, 0); + end else + if Align=alLeft then + begin + if fSplitRect.LeftfSplitMax-fMinOff then + OffsetRect(fSplitRect, fSplitMax-fMinOff-fSplitRect.right, 0); + end; + end else + begin + fSplitRect := Rect(fSplitRect.left, p.y-fSplitOff, + fSplitRect.right, p.y-fSplitOff+abs(fSplitRect.bottom-fSplitRect.top)); + + if Align=alBottom then + begin + if fSplitRect.topfSplitMax-fMaxOff then + OffsetRect(fSplitRect, 0, fSplitMax-fMaxOff-fSplitRect.bottom); + end else + if Align=alTop then + begin + if fSplitRect.topfSplitMax-fMinOff then + OffsetRect(fSplitRect, 0, fSplitMax-fMinOff-fSplitRect.bottom); + end; + end; + WinProcs.PatBlt(fSplitDC, + fSplitRect.left, fSplitRect.top, + fSplitRect.right-fSplitRect.left, + fSplitRect.bottom-fSplitRect.top, + PATINVERT); + end; +end; + +procedure TSplitBar.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +var + off : Integer; +begin + if fMouseIsDown then + begin + WinProcs.PatBlt(fSplitDC, + fSplitRect.left, fSplitRect.top, + fSplitRect.right-fSplitRect.left, + fSplitRect.bottom-fSplitRect.top, + PATINVERT); + + if fOrient=spHorizontal then + begin + off := fSplitOrg.x-(fSplitOff+fSplitRect.left); + if Align = alLeft then + parent.width := parent.width + off + else if Align = alRight then + parent.width := parent.width - off; + end else + begin + off := fSplitOrg.y-(fSplitOff+fSplitRect.top); + if Align = alTop then + parent.height := parent.height + off + else if Align = alBottom then + parent.height := parent.height - off; + end; + + DeleteObject(fClipRgn); + fClipRgn := 0; + + if (fSplitDC<>0) then + ReleaseDC(0, fSplitDC); + fSplitDC := 0; + + fMouseIsDown := FALSE; + end; +end; + + +procedure Register; +begin + RegisterComponents('test', [TSplitBar]); +end; + + +end. diff --git a/src/StrCGrid.dcr b/src/StrCGrid.dcr new file mode 100644 index 00000000..e696d862 Binary files /dev/null and b/src/StrCGrid.dcr differ diff --git a/src/StrCGrid.pas b/src/StrCGrid.pas new file mode 100644 index 00000000..e638e052 --- /dev/null +++ b/src/StrCGrid.pas @@ -0,0 +1,875 @@ +{ +=============================================================================== +FEwtTStringGrid TStrColGrid + 1996-1997 (C) ln|(NiftyServe:QZE03067) + 1997.08.02 쐬 + Version2.0 + +------------------------------------------------------------------------------- +1.0 -> 2.0 ̉ϓ_ +@ȉ̃vpeB^\bhljB + FocusDraw: boolean + FontCount: integer + FocusDraw: boolean + CellFonts[ACol, ARow: integer]: integer + proceudre AddFont(AFont: TFont); + proceudre DeleteFont(AIndex: integer); +------------------------------------------------------------------------------- + +ljvpeB + + Alignment: TAlignment; + ObhŜ̕\ʒuB + FixedAlignment: TAlignment; + ŒZ̕\ʒuB + FocusDraw: boolean + tH[JXĂAI̕\ԂۂB + FontCount: integer + o^ĂtHgB + FocusDraw: boolean + tH[JXꍇłI͈͕\sۂB + + CellAlignments[ACol, ARow: integer]: TAlignment + ZŗL̕\ʒuB + CellFontColors[ACol, ARow: integer]: TColor + ZŗL̕FB + CellFontWidths[ACol, ARow: integer]: integer + ZŗL̕B + CellColors[ACol, ARow: integer]: TColor + ZŗL̔wiFB + CellBrushEnabled[ACol, ARow: integer]: boolean; + ZŗL̃uVgp^gptOB + CellBrushStyles[ACol, ARow: integer]: TBrushStyle + ZŗL̃uVX^CB + CellBrushColors[ACol, ARow: integer]: TColor + ZŗL̃uVJ[B + CellFonts[ACol, ARow: integer]: integer + ZŎgptHg̃CfbNXԍ + + +lj\bh + + procedure ClearAllCellParams; + Sp[^B + function GetDefaultCellParams(ACol, ARow: integer): TCellDrawParams; + ftHg̃Zp[^擾B + function GetCellParams(ACol, ARow: integer): TCellDrawParams; + Zp[^ꊇ擾B + procedure SetCellParams(ACol, ARow: integer; AValue: TCellDrawParams); + Zp[^ꊇݒB + proceudre AddFont(AFont: TFont); + tHgljB + proceudre DeleteFont(AIndex: integer); + tHg폜B +=============================================================================== +} +unit StrCGrid; + +interface + +uses + SysUtils, Windows, Messages, Classes, Graphics, Controls, + Forms, Dialogs, Grids; + +type + // `p[^ R[h + TCellDrawParams = record + Col, Row: integer; + Alignment: TAlignment; + FontColor: TColor; + FontWidth: integer; + BackColor: TColor; + BrushEnabled: boolean; + BrushStyle: TBrushStyle; + BrushColor: TColor; + FontIndex: integer; + end; + // `p[^ R[h̃|C^ + PCellDrawParams = ^TCellDrawParams; + + // R|[lg` + TStrColGrid = class(TStringGrid) + private + FParamsList: TList; + FFontList: TStringList; + + FAlignment: TAlignment; + FFixedAlignment: TAlignment; + FFocusDraw: boolean; + FCacheCol, FCacheRow, FCacheIndex: integer; // OQƃp[^ʒu + FsvPen: TPen; + FsvBrush: TBrush; + FsvFont: TFont; + procedure CheckColRowRange(ACol, ARow: integer); + function GetFontCount: integer; + function GetParamPointer(ACol, ARow: integer; AAlloc: boolean): PCellDrawParams; + function GetCellAlignments(ACol, ARow: integer): TAlignment; + procedure SetCellAlignments(ACol, ARow: integer; AValue: TAlignment); + function GetCellFontColors(ACol, ARow: integer): TColor; + procedure SetCellFontColors(ACol, ARow: integer; AValue: TColor); + function GetCellFontWidths(ACol, ARow: integer): integer; + procedure SetCellFontWidths(ACol, ARow: integer; AValue: integer); + function GetCellColors(ACol, ARow: integer): TColor; + procedure SetCellColors(ACol, ARow: integer; AValue: TColor); + function GetCellBrushEnabled(ACol, ARow: integer): boolean; + procedure SetCellBrushEnabled(ACol, ARow: integer; AValue: boolean); + function GetCellBrushStyles(ACol, ARow: integer): TBrushStyle; + procedure SetCellBrushStyles(ACol, ARow: integer; AValue: TBrushStyle); + function GetCellBrushColors(ACol, ARow: integer): TColor; + procedure SetCellBrushColors(ACol, ARow: integer; AValue: TColor); + function GetCellFonts(ACol, ARow: integer): integer; + procedure SetCellFonts(ACol, ARow: integer; AIndex: integer); + protected + procedure Loaded; override; + procedure DrawCell(ACol, ARow: longint; ARect: TRect; + AState: TGridDrawState); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + + // \bh + procedure ClearAllCellParams; + function GetDefaultCellParams(ACol, ARow: integer): TCellDrawParams; + function GetCellParams(ACol, ARow: integer): TCellDrawParams; + procedure SetCellParams(AValue: TCellDrawParams); + procedure AddFont(AFont: TFont); + procedure DeleteFont(AIndex: integer); + + // svpeB + property FontCount: integer + read GetFontCount; + property CellAlignments[ACol, ARow: integer]: TAlignment + read GetCellAlignments write SetCellAlignments; + property CellFontColors[ACol, ARow: integer]: TColor + read GetCellFontColors write SetCellFontColors; + property CellFontWidths[ACol, ARow: integer]: integer + read GetCellFontWidths write SetCellFontWidths; + property CellColors[ACol, ARow: integer]: TColor + read GetCellColors write SetCellColors; + property CellBrushEnabled[ACol, ARow: integer]: boolean + read GetCellBrushEnabled write SetCellBrushEnabled; + property CellBrushStyles[ACol, ARow: integer]: TBrushStyle + read GetCellBrushStyles write SetCellBrushStyles; + property CellBrushColors[ACol, ARow: integer]: TColor + read GetCellBrushColors write SetCellBrushColors; + property CellFonts[ACol, ARow: integer]: integer + read GetCellFonts write SetCellFonts; + + published + // ݌vvpeB + property Alignment: TAlignment + read FAlignment write FAlignment default taLeftJustify; + property FixedAlignment: TAlignment + read FFixedAlignment write FFixedAlignment default taLeftJustify; + property FocusDraw: boolean + read FFocusDraw write FFocusDraw default True; + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('Samples', [TStrColGrid]); +end; + + +//----------------------------------------------------------------------------- +// RXgN^ +//----------------------------------------------------------------------------- +constructor TStrColGrid.Create(AOwner: TComponent); +begin + inherited; + DefaultDrawing := False; + FAlignment := taLeftJustify; + FFixedAlignment := taLeftJustify; + FFocusDraw := True; + if not (csDesigning in ComponentState) then + begin + FParamsList := TList.Create; + FFontList := TStringList.Create; + FsvPen := TPen.Create; + FsvBrush := TBrush.Create; + FsvFont := TFont.Create; + FCacheCol := -1; + FCacheRow := -1; + FCacheIndex := -1; + end +end; + + +//----------------------------------------------------------------------------- +// fXgN^ +//----------------------------------------------------------------------------- +destructor TStrColGrid.Destroy; +var + i: integer; +begin + if not (csDesigning in ComponentState) then + begin + FsvPen.Free; + FsvBrush.Free; + FsvFont.Free; + + ClearAllCellParams; + FParamsList.Free; + + for i := 0 to FFontList.Count - 1 do + TFont(FFontList.Objects[i]).Free; + FFontList.Free; + end; + inherited; +end; + + +//----------------------------------------------------------------------------- +// +//----------------------------------------------------------------------------- +procedure TStrColGrid.Loaded; +var + i: integer; + ColParams: TList; +begin + inherited; + // p[^Xg 񐔕 + if not (csDesigning in ComponentState) then + begin + Canvas.Font.Assign(Font); + for i := 1 to ColCount do + begin + ColParams := TList.Create; + FParamsList.Add(pointer(ColParams)); + end; + end; +end; + + +//----------------------------------------------------------------------------- +// Sp[^폜 +//----------------------------------------------------------------------------- +procedure TStrColGrid.ClearAllCellParams; +var + i, j, c1, c2: integer; + ColParam: TList; + pPrm: PCellDrawParams; +begin + c1 := FParamsList.Count; + for i := 1 to c1 do + begin + ColParam := TList(FParamsList.Items[i - 1]); + c2 := ColParam.Count; + for j := 1 to c2 do + begin + pPrm := ColParam.Items[j - 1]; + FreeMem(pPrm, sizeof(TCellDrawParams)); + end; + ColParam.Free; + end; + FCacheCol := -1; + FCacheRow := -1; +end; + + +//----------------------------------------------------------------------------- +// ftHgp[^擾 +//----------------------------------------------------------------------------- +function TStrColGrid.GetDefaultCellParams(ACol, ARow: integer): TCellDrawParams; +begin + + with Result do + begin + Col := ACol; + Row := ARow; + Alignment := FAlignment; + FontColor := Font.Color; + FontWidth := 1; + if (ACol < FixedCols) or (ARow < FixedRows) then + BackColor := FixedColor + else + BackColor := Self.Color; + BrushEnabled := False; + BrushStyle := bsClear; + BrushColor := Self.Color; + FontIndex := -1; + end; + +end; + + +//----------------------------------------------------------------------------- +// p[^ʒu擾Am +//----------------------------------------------------------------------------- +function TStrColGrid.GetParamPointer(ACol, ARow: integer; AAlloc: boolean): PCellDrawParams; +var + i, n: integer; + pPrm: PCellDrawParams; + ColParam: TList; +begin + + // p[^Xglj + if ColCount > FParamsList.Count then + begin + n := FParamsList.Count; + for i := n to ColCount - 1 do + begin + ColParam := TList.Create; + FParamsList.Add(pointer(ColParam)); + end; + end + // p[^Xg폜 + else if ColCount > FParamsList.Count then + begin + ColParam := TList(FParamsList.Items[FParamsList.Count - 1]); + n := ColParam.Count; + for i := 1 to n do + begin + pPrm := ColParam.Items[i - 1]; + FreeMem(pPrm, sizeof(TCellDrawParams)); + end; + ColParam.Free; + end; + + // ʒu + ColParam := TList(FParamsList[ACol]); + // LbVƓȂꔭŌĂяo + if (FCacheCol = ACol) and (FCacheRow = ARow) then + begin + Result := ColParam.Items[FCacheIndex]; + exit; + end + // LbVƈ猟 + else begin + for i := 0 to (ColParam.Count - 1) do + begin + pPrm := ColParam.Items[i]; + if pPrm^.Row = ARow then + begin + Result := pPrm; + FCacheCol := ACol; + FCacheRow := ARow; + FCacheIndex := i; + exit; + end; + end; + end; + // ‚Ȃ + // m + if AAlloc then + begin + GetMem(pPrm, sizeof(TCellDrawParams)); + pPrm^ := GetDefaultCellParams(ACol, ARow); + ColParam.Add(pPrm); + FCacheCol := ACol; + FCacheRow := ARow; + FCacheIndex := ColParam.Count - 1; + if FCacheIndex < 0 then FCacheIndex := 0; + end + // sp + else begin + pPrm := nil; + end; + Result := pPrm; +end; + + +//----------------------------------------------------------------------------- +// p[^ꊇ擾p +//----------------------------------------------------------------------------- +function TStrColGrid.GetCellParams(ACol, ARow: integer): TCellDrawParams; +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^ʒu擾 + pPrm := GetParamPointer(ACol, ARow, False); + if pPrm = nil then + Result := GetDefaultCellParams(ACol, ARow) + else + Result := pPrm^; +end; + + +//----------------------------------------------------------------------------- +// p[^ꊇݒp +//----------------------------------------------------------------------------- +procedure TStrColGrid.SetCellParams(AValue: TCellDrawParams); +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(AValue.Col, AValue.Row); + // p[^݈ʒu擾A + pPrm := GetParamPointer(AValue.Col, AValue.Row, True); + pPrm^ := AValue; +end; + + +//----------------------------------------------------------------------------- +// tHglj +//----------------------------------------------------------------------------- +procedure TStrColGrid.AddFont(AFont: TFont); +var + f: TFont; +begin + f := TFont.Create; + f.Assign(AFont); + FFontList.AddObject('0', f); +end; + + +//----------------------------------------------------------------------------- +// tHg폜 +//----------------------------------------------------------------------------- +procedure TStrColGrid.DeleteFont(AIndex: integer); +begin + if (AIndex < 0) or (AIndex >= FFontList.Count) then + raise ERangeError.Create('ޯ͈͂𒴂܂B'); + if FFontList[AIndex] <> '0' then + raise Exception.Create('gp̫Ă폜悤Ƃ܂B'); + TFont(FFontList.Objects[AIndex]).Free; + FFontList.Delete(AIndex); +end; + + +//----------------------------------------------------------------------------- +// sʒu +//----------------------------------------------------------------------------- +procedure TStrColGrid.CheckColRowRange(ACol, ARow: integer); +begin + if (ACol < 0) or (ARow < 0) or (ColCount < ACol) or (RowCount < ARow) then + begin + raise ERangeError.Create('وʒuدނ͈̔͂𒴂܂B'); + end; +end; + + +//----------------------------------------------------------------------------- +// vpeBFtHgǂݏo +//----------------------------------------------------------------------------- +function TStrColGrid.GetFontCount: integer; +begin + Result := FFontList.Count; +end; + + +//----------------------------------------------------------------------------- +// vpeBF\ʒuǂݏo +//----------------------------------------------------------------------------- +function TStrColGrid.GetCellAlignments(ACol, ARow: integer): TAlignment; +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^ʒu擾 + pPrm := GetParamPointer(ACol, ARow, False); + if pPrm = nil then + Result := FAlignment + else + Result := pPrm^.Alignment; +end; + + +//----------------------------------------------------------------------------- +// vpeBF\ʒuݒ +//----------------------------------------------------------------------------- +procedure TStrColGrid.SetCellAlignments(ACol, ARow: integer; AValue: TAlignment); +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^݈ʒu擾 + pPrm := GetParamPointer(ACol, ARow, True); + pPrm^.Alignment := AValue; +end; + + +//----------------------------------------------------------------------------- +// vpeBFtHgFǂݏo +//----------------------------------------------------------------------------- +function TStrColGrid.GetCellFontColors(ACol, ARow: integer): TColor; +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^ʒu擾 + pPrm := GetParamPointer(ACol, ARow, False); + if pPrm = nil then + Result := Font.Color + else + Result := pPrm^.FontColor; +end; + + +//----------------------------------------------------------------------------- +// vpeBFtHgFݒ +//----------------------------------------------------------------------------- +procedure TStrColGrid.SetCellFontColors(ACol, ARow: integer; AValue: TColor); +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^݈ʒu擾 + pPrm := GetParamPointer(ACol, ARow, True); + pPrm^.FontColor := AValue; +end; + + +//----------------------------------------------------------------------------- +// vpeBFtHgǂݏo +//----------------------------------------------------------------------------- +function TStrColGrid.GetCellFontWidths(ACol, ARow: integer): integer; +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^ʒu擾 + pPrm := GetParamPointer(ACol, ARow, False); + if pPrm = nil then + Result := 1 + else + Result := pPrm^.FontWidth; +end; + + +//----------------------------------------------------------------------------- +// vpeBFtHgݒ +//----------------------------------------------------------------------------- +procedure TStrColGrid.SetCellFontWidths(ACol, ARow: integer; AValue: integer); +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^݈ʒu擾 + pPrm := GetParamPointer(ACol, ARow, True); + pPrm^.FontWidth := AValue; +end; + + +//----------------------------------------------------------------------------- +// vpeBFZFǂݏo +//----------------------------------------------------------------------------- +function TStrColGrid.GetCellColors(ACol, ARow: integer): TColor; +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^ʒu擾 + pPrm := GetParamPointer(ACol, ARow, False); + if pPrm = nil then + Result := Color + else + Result := pPrm^.BackColor; +end; + + +//----------------------------------------------------------------------------- +// vpeBFZFݒ +//----------------------------------------------------------------------------- +procedure TStrColGrid.SetCellColors(ACol, ARow: integer; AValue: TColor); +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^݈ʒu擾 + pPrm := GetParamPointer(ACol, ARow, True); + pPrm^.BackColor := AValue; +end; + + +//----------------------------------------------------------------------------- +// vpeBFZuVgp^s“ǂݏo +//----------------------------------------------------------------------------- +function TStrColGrid.GetCellBrushEnabled(ACol, ARow: integer): boolean; +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^ʒu擾 + pPrm := GetParamPointer(ACol, ARow, False); + if pPrm = nil then + Result := False + else + Result := pPrm^.BrushEnabled; +end; + + +//----------------------------------------------------------------------------- +// vpeBFZuVgp^sݒ +//----------------------------------------------------------------------------- +procedure TStrColGrid.SetCellBrushEnabled(ACol, ARow: integer; AValue: boolean); +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^݈ʒu擾 + pPrm := GetParamPointer(ACol, ARow, True); + pPrm^.BrushEnabled := AValue; +end; + + +//----------------------------------------------------------------------------- +// vpeBFZuVX^Cǂݏo +//----------------------------------------------------------------------------- +function TStrColGrid.GetCellBrushStyles(ACol, ARow: integer): TBrushStyle; +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^ʒu擾 + pPrm := GetParamPointer(ACol, ARow, False); + if pPrm = nil then + Result := Canvas.Brush.Style + else + Result := pPrm^.BrushStyle; +end; + + +//----------------------------------------------------------------------------- +// vpeBFZuVX^Cݒ +//----------------------------------------------------------------------------- +procedure TStrColGrid.SetCellBrushStyles(ACol, ARow: integer; AValue: TBrushStyle); +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^݈ʒu擾 + pPrm := GetParamPointer(ACol, ARow, True); + pPrm^.BrushStyle := AValue; +end; + + +//----------------------------------------------------------------------------- +// vpeBFZuVFǂݏo +//----------------------------------------------------------------------------- +function TStrColGrid.GetCellBrushColors(ACol, ARow: integer): TColor; +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^ʒu擾 + pPrm := GetParamPointer(ACol, ARow, False); + if pPrm = nil then + Result := Color + else + Result := pPrm^.BrushColor; +end; + + +//----------------------------------------------------------------------------- +// vpeBFZuVFݒ +//----------------------------------------------------------------------------- +procedure TStrColGrid.SetCellBrushColors(ACol, ARow: integer; AValue: TColor); +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^݈ʒu擾 + pPrm := GetParamPointer(ACol, ARow, True); + pPrm^.BrushColor := AValue; +end; + +//----------------------------------------------------------------------------- +// vpeBFZtHgԍǂݏo +//----------------------------------------------------------------------------- +function TStrColGrid.GetCellFonts(ACol, ARow: integer): integer; +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + // p[^ʒu擾 + pPrm := GetParamPointer(ACol, ARow, False); + if pPrm = nil then + Result := 0 + else + Result := pPrm^.FontIndex; +end; + +//----------------------------------------------------------------------------- +// vpeBFZtHgԍݒ +//----------------------------------------------------------------------------- +procedure TStrColGrid.SetCellFonts(ACol, ARow: integer; AIndex: integer); +var + pPrm: PCellDrawParams; +begin + CheckColRowRange(ACol, ARow); + + if (AIndex < -1) or (AIndex >= FFontList.Count) then + raise ERangeError.Create('ޯ͈͂𒴂܂B'); + + // p[^݈ʒu擾 + pPrm := GetParamPointer(ACol, ARow, True); + // ݎgpĂtHg̎gp񐔂|P + if pPrm^.FontIndex >= 0 then + FFontList[pPrm^.FontIndex] := IntToStr( + StrToInt(FFontList[pPrm^.FontIndex]) - 1 + ); + // VKɎgptHg̎gp񐔂{P + if AIndex >= 0 then + FFontList[AIndex] := IntToStr( + StrToInt(FFontList[AIndex]) + 1 + ); + + pPrm^.FontIndex := AIndex; + if AIndex = -1 then + pPrm^.FontColor := Font.Color + else + pPrm^.FontColor := TFont(FFontList.Objects[AIndex]).Color; +end; + + +//----------------------------------------------------------------------------- +// Z`揈 +//----------------------------------------------------------------------------- +procedure TStrColGrid.DrawCell(ACol, ARow: longint; ARect: TRect; + AState: TGridDrawState); + + // ŒZnCCg` + procedure DrawFixed; + begin + if (AState = [gdFixed]) then + begin + Canvas.Pen.Style := psSolid; + Canvas.Pen.Mode := pmCopy; + with ARect do begin + Canvas.Pen.Color := clBtnHighlight; + Canvas.MoveTo(Right - 1, Top); + Canvas.LineTo(Left, Top); + Canvas.LineTo(Left, Bottom - 1); + Canvas.Pen.Color := clGray; + Canvas.LineTo(Right - 1, Bottom - 1); + Canvas.LineTo(Right - 1, Top); + end; + end; + end; + +var + i, x, y: integer; + FontWidth: integer; + Arg: TAlignment; + pPrm: PCellDrawParams; +begin + + // ݌vƃftHg`w莞́AftHg` + if (csDesigning in ComponentState) or (DefaultDrawing) then + begin + inherited; + if csDesigning in ComponentState then DrawFixed; + exit; + end; + + // + x := 0; + FontWidth := 1; + // `p[^擾 + pPrm := GetParamPointer(ACol, ARow, False); + // LoX̏Ԃۑ + FsvPen.Assign(Canvas.Pen); + FsvBrush.Assign(Canvas.Brush); + FsvFont.Assign(Canvas.Font); + // `惂[hݒ + Canvas.Brush.Style := bsSolid; + Canvas.Pen.Style := psSolid; + Canvas.Pen.Mode := pmCopy; + Canvas.Font.Assign(Font); + + // tHg蓖āi-1ȂftHgtHgA0ȏ͎wtHgj + if pPrm <> nil then + begin + FontWidth := pPrm^.FontWidth; + if pPrm^.FontIndex >= 0 then + Canvas.Font.Assign(TFont(FFontList.Objects[pPrm^.FontIndex])); + end; + + // `ʒuiŒZ^ʏZj + if AState = [gdFixed] then + Arg := FFixedAlignment + else + Arg := FAlignment; + + // ŒZ` + if (pPrm = nil) and (AState = [gdFixed]) then + begin + Canvas.Brush.Color := FixedColor; + Canvas.FillRect(ARect); + end + // ʏZ` + else begin + // I𒆂̃Z͔]\ + // tH[JX邩AȂƂFocuseDrawTrueA + if ((Focused) or ((not Focused) and (FFocusDraw))) and + // IĂ邩 + (gdSelected in AState) and + ( + // \ݒɂȂĂ邩 + //((goDrawFocusSelected in Options) and (not (gdFocused in AState))) or + (goDrawFocusSelected in Options) or + ((not (goDrawFocusSelected in Options)) and (not (gdFocused in AState))) or + // ܂͍sIԂ + (goRowSelect in Options) + ) then + begin + Canvas.Brush.Color := clHighlight; + Canvas.FillRect(ARect); + Canvas.Font.Color := clHighlightText; + end + // p[^ݒ肳Ăꍇ + else if pPrm <> nil then + begin + // \ʒu + Arg := pPrm^.Alignment; + // wi + Canvas.Brush.Style := bsSolid; + Canvas.Brush.Color := pPrm^.BackColor; + Canvas.FillRect(ARect); + // uV + if pPrm^.BrushEnabled then + begin + Canvas.Brush.Color := pPrm^.BrushColor; + Canvas.Pen.Color := pPrm^.BrushColor; + Canvas.Brush.Style := pPrm^.BrushStyle; + Canvas.Pen.Width := 0; + Canvas.Rectangle(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom); + end; + // tHg + Canvas.Font.Color := pPrm^.FontColor; + end + // p[^ݒ̏ꍇ + else begin + Canvas.FillRect(ARect); + end; + end; + + // ` + if Cells[ACol, ARow] <> '' then + begin + case Arg of + taLeftJustify: x := ARect.Left + 2; + taRightJustify: x := ARect.Left + (ARect.Right - ARect.Left) - + Canvas.TextWidth(Cells[ACol, ARow]) - 2; + taCenter: x := ARect.Left + ((ARect.Right - ARect.Left) - + Canvas.TextWidth(Cells[ACol, ARow])) div 2; + end; + y := ARect.Top + 2; + Canvas.Brush.Style := bsClear; + for i := 0 to FontWidth - 1 do + begin + Canvas.TextRect(ARect, x + i, y, Cells[ACol, ARow]); + end; + end; + + // LoX̏Ԃɖ߂ + Canvas.Pen.Assign(FsvPen); + Canvas.Brush.Assign(FsvBrush); + Canvas.Font.Assign(FsvFont); + + // tH[JXg` + if (Focused) and (gdFocused in AState) then + Canvas.DrawFocusRect(ARect); + + // ŒZnCCg` + DrawFixed; + +end; + + +end. diff --git a/src/Strcgrid.txt b/src/Strcgrid.txt new file mode 100644 index 00000000..833c1302 --- /dev/null +++ b/src/Strcgrid.txt @@ -0,0 +1,109 @@ +---------------- TStrColGridɂ‚ ---------------- + + TStrColGrid ̓ZƂɐFEwłA + TStringGridhR|[lgłB + Delphi2.0łgp܂BLHAʼn𓀂ĂB + + STRCGRID.PAS + STRCGRID.DCR + STRCGRID.RES + + ȏ̂Rt@C𓯈fBNgɒuAʏ + R|[lgCXg[菇Delphiɑgݍ + łgpB܂A + + \TESTPRG\SCGTEST.DPR + + ƂāAȒPȎgp{Yt܂̂ŕKvɉ + ăRpCĂgpB + + + ӌAv]AoO񍐂FDELPHIPOԉc܂ + ̓[ł肢܂B”\ȌΏ܂ + ł͂܂(^^;)B + + {R|[lg̒쌠͂ln|(QZE03067)L + A{R|[lggpʐȂ鑹 + QɂӔC𕉂Ȃ̂Ƃ܂B + + \[Xt@Czz鎖͂ + Bp̃AvP[Vɑg + ݍŁARpCł̐(EXE, DLL) + zzꍇ͉RłB + + ł͂̂ւŁBFDELPHIł܂傤( ^^)/~~ + +----------------------------------------------------- +1997.08.02 ⑫ + VɃtHg֘ÃvpeB^\bhlj +Bgp@͓YtTvQƉB +@܂A‚oOiɕZI̐U +ɂ‚ājׂĂ܂B +----------------------------------------------------- + +TStrColGrid ljꗗ + +ljvpeB + + Alignment: TAlignment; + ObhŜ̕\ʒuB + FixedAlignment: TAlignment; + ŒZ̕\ʒuB + FocusDraw: boolean + tH[JXĂAI̕\ԂۂB + FontCount: integer + o^ĂtHgB + FocusDraw: boolean + tH[JXꍇłI͈͕\sۂB + CellAlignments[ACol, ARow: integer]: TAlignment + ZŗL̕\ʒuB + CellFontColors[ACol, ARow: integer]: TColor + ZŗL̕FB + CellFontWidths[ACol, ARow: integer]: integer + ZŗL̕B + CellColors[ACol, ARow: integer]: TColor + ZŗL̔wiFB + CellBrushEnabled[ACol, ARow: integer]: boolean; + ZŗL̃uVgp^gptOB + CellBrushStyles[ACol, ARow: integer]: TBrushStyle + ZŗL̃uVX^CB + CellBrushColors[ACol, ARow: integer]: TColor + ZŗL̃uVJ[B + CellFonts[ACol, ARow: integer]: integer + ZŎgptHg̃CfbNXԍ + + +lj\bh + + procedure ClearAllCellParams; + Sp[^B + function GetDefaultCellParams(ACol, ARow: integer): TCellDrawParams; + ftHg̃Zp[^擾B + function GetCellParams(ACol, ARow: integer): TCellDrawParams; + Zp[^ꊇ擾B + procedure SetCellParams(ACol, ARow: integer; AValue: TCellDrawParams); + Zp[^ꊇݒB + proceudre AddFont(AFont: TFont); + tHgljB + proceudre DeleteFont(AIndex: integer); + tHg폜B + + +p[^pR[h + + TCellDrawParams = record + Col, Row: integer; ʒu + Alignment: TAlignment; \ʒu + FontColor: TColor; F + FontWidth: integer; + BackColor: TColor; ZF + BrushEnabled: boolean; uV̎gp/gp + BrushStyle: TBrushStyle; uVX^C + BrushColor: TColor; uVF + FontIndex: integer; tHgԍ(-1ŃRg[tHggpj + end; + +----------------------------------------------------- + 1997.08.02 + ln|(QZE03067) +[------------------------------------------------EOF] diff --git a/src/Super32.dcr b/src/Super32.dcr new file mode 100644 index 00000000..c62ace27 Binary files /dev/null and b/src/Super32.dcr differ diff --git a/src/Super32.res b/src/Super32.res new file mode 100644 index 00000000..7c7bfc8a Binary files /dev/null and b/src/Super32.res differ diff --git a/src/SuperGrid.dpl b/src/SuperGrid.dpl new file mode 100644 index 00000000..d9dd1020 Binary files /dev/null and b/src/SuperGrid.dpl differ diff --git a/src/THDTIM.PAS b/src/THDTIM.PAS new file mode 100644 index 00000000..50f15db0 --- /dev/null +++ b/src/THDTIM.PAS @@ -0,0 +1,151 @@ +unit ThdTim; + +interface + +uses + Windows, Messages, SysUtils, Classes, + Graphics, Controls, Forms, Dialogs; + +type + TThreadedTimer = class; + + TTimerThread = class(TThread) + OwnerTimer: TThreadedTimer; + procedure Execute; override; + procedure DoTimer; + end; + + TThreadedTimer = class(TComponent) + private + FEnabled: Boolean; + FInterval: Word; + FOnTimer: TNotifyEvent; + FTimerThread: TTimerThread; + FThreadPriority: TThreadPriority; + protected + procedure UpdateTimer; + procedure SetEnabled(Value: Boolean); + procedure SetInterval(Value: Word); + procedure SetOnTimer(Value: TNotifyEvent); + procedure SetThreadPriority(Value: TThreadPriority); + procedure Timer; dynamic; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + property Enabled: Boolean + read FEnabled + write SetEnabled + default True; + property Interval: Word + read FInterval + write SetInterval + default 1000; + property OnTimer: TNotifyEvent + read FOnTimer + write SetOnTimer; + property ThreadPriority: TThreadPriority + read FThreadPriority + write SetThreadPriority; + end; + +procedure Register; + +implementation + +procedure +TTimerThread.Execute; +begin + Priority := OwnerTimer.FThreadPriority; + repeat + SleepEx(OwnerTimer.FInterval, False); + Synchronize(DoTimer); + until Terminated; +end; + +procedure +TTimerThread.DoTimer; +begin + OwnerTimer.Timer; +end; + +constructor +TThreadedTimer.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + FEnabled := True; + FInterval := 1000; + FThreadPriority := tpNormal; + FTimerThread := TTimerThread.Create(False); + FTimerThread.OwnerTimer := Self; +end; + +destructor +TThreadedTimer.Destroy; +begin + FEnabled := False; + UpdateTimer; + FTimerThread.Free; + inherited Destroy; +end; + +procedure +TThreadedTimer.UpdateTimer; +begin + FTimerThread.Suspend; + if (FInterval <> 0) and FEnabled + and Assigned(FOnTimer) then + FTimerThread.Resume; +end; + +procedure +TThreadedTimer.SetEnabled(Value: Boolean); +begin + if Value <> FEnabled then + begin + FEnabled := Value; + UpdateTimer; + end; +end; + +procedure +TThreadedTimer.SetInterval(Value: Word); +begin + if Value <> FInterval then + begin + FInterval := Value; + UpdateTimer; + end; +end; + +procedure +TThreadedTimer.SetOnTimer(Value: TNotifyEvent); +begin + FOnTimer := Value; + UpdateTimer; +end; + +procedure +TThreadedTimer.SetThreadPriority(Value: TThreadPriority); +begin + if Value <> FThreadPriority then + begin + FThreadPriority := Value; + UpdateTimer; + end; +end; + +procedure +TThreadedTimer.Timer; +begin + if Assigned(FOnTimer) then + FOnTimer(Self); +end; + +procedure Register; +begin + RegisterComponents('Samples', [TThreadedTimer]); +end; + +end. + \ No newline at end of file diff --git a/src/TRAPEDIT.PAS b/src/TRAPEDIT.PAS new file mode 100644 index 00000000..e12d3de9 --- /dev/null +++ b/src/TRAPEDIT.PAS @@ -0,0 +1,44 @@ +unit Trapedit; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls; + +type + TTrapEdit = class(TEdit) + private + { Private-Deklarationen } + protected + { Protected-Deklarationen } + procedure CNKeyDown(var Message: TWMKeyDown); message CN_KEYDOWN; + public + { Public-Deklarationen } + TrapKeys:set of byte; + published + { Published-Deklarationen } + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('HDComps', [TTrapEdit]); +end; + +procedure TTrapEdit.CNKeyDown(var Message: TWMKeyDown); +var aonkeydown:TKeyEvent; +begin + aOnkeydown:=onkeydown; + if message.charcode in trapkeys then + if assigned(aonkeydown) then + onkeydown(self,message.charcode,KeyDataToShiftState(message.KeyData)); + if message.charcode=0 then + message.result:=1; + inherited; +end; + +end. diff --git a/src/TScratchSheet.dfm b/src/TScratchSheet.dfm new file mode 100644 index 00000000..62a123a6 Binary files /dev/null and b/src/TScratchSheet.dfm differ diff --git a/src/TScratchSheet.pas b/src/TScratchSheet.pas new file mode 100644 index 00000000..521fbc05 --- /dev/null +++ b/src/TScratchSheet.pas @@ -0,0 +1,63 @@ +unit TScratchSheet; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UConsolePad, StdCtrls, ExtCtrls; + +type + TScratchSheet = class(TConsolePad) + procedure EditKeyPress(Sender: TObject; var Key: Char); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + procedure AddLine(S : string); override; + { Public declarations } + end; + +var + ScratchSheet: TScratchSheet; + +implementation + +{$R *.DFM} + +procedure TScratchSheet.EditKeyPress(Sender: TObject; var Key: Char); +var str : string; +begin + case Key of + Chr($0D) : + begin + str := Edit.Text; + if str <> '' then + if str[1] <> ',' then + str := ',' + str; + Edit.Text := ''; + //MainForm.ProcessConsoleCommand(str); + Key := #0; + end; + Chr($1B) : + begin + MainForm.LastFocus.SetFocus; + Key := #0; + end; + end; + +end; + +procedure TScratchSheet.AddLine(S : string); +//var _VisRows, _TopRow : integer; +begin + inherited; +end; + + +procedure TScratchSheet.FormCreate(Sender: TObject); +begin + inherited; + MaxLines := 25; +end; + +end. diff --git a/src/TToneGen.dof b/src/TToneGen.dof new file mode 100644 index 00000000..b2dee64b --- /dev/null +++ b/src/TToneGen.dof @@ -0,0 +1,83 @@ +[FileVersion] +Version=6.0 +[Compiler] +A=8 +B=0 +C=0 +D=0 +E=0 +F=0 +G=1 +H=1 +I=1 +J=1 +K=0 +L=0 +M=0 +N=1 +O=1 +P=1 +Q=0 +R=0 +S=0 +T=0 +U=0 +V=1 +W=0 +X=1 +Y=0 +Z=1 +ShowHints=1 +ShowWarnings=1 +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; +[Linker] +MapFile=0 +OutputObjs=0 +ConsoleApp=1 +DebugInfo=0 +RemoteSymbols=0 +MinStackSize=16384 +MaxStackSize=1048576 +ImageBase=4194304 +ExeDescription= +[Directories] +OutputDir= +UnitOutputDir= +PackageDLLOutputDir= +PackageDCPOutputDir= +SearchPath= +Packages=vcl;rtl;vclx;VclSmp;vclshlctrls;IcsDel60;user +Conditionals= +DebugSourceDirs= +UsePackages=0 +[Parameters] +RunParams= +HostApplication= +Launcher= +UseLauncher=0 +DebugCWD= +[Version Info] +IncludeVerInfo=1 +AutoIncBuild=0 +MajorVer=1 +MinorVer=0 +Release=0 +Build=0 +Debug=0 +PreRelease=0 +Special=0 +Private=0 +DLL=0 +Locale=1041 +CodePage=932 +[Version Info Keys] +CompanyName= +FileDescription= +FileVersion=1.0.0.0 +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion=1.0.0.0 +Comments= diff --git a/src/TToneGen.dpk b/src/TToneGen.dpk new file mode 100644 index 00000000..0cca8a2c --- /dev/null +++ b/src/TToneGen.dpk @@ -0,0 +1,33 @@ +package TToneGen; + +{$R *.res} +{$ALIGN 8} +{$ASSERTIONS OFF} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS OFF} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$IMPLICITBUILD ON} + +requires + vcl; + +contains + ToneGen in 'ToneGen.pas'; + +end. diff --git a/src/TToneGen.res b/src/TToneGen.res new file mode 100644 index 00000000..044cb62f Binary files /dev/null and b/src/TToneGen.res differ diff --git a/src/TToneGen.~dpk b/src/TToneGen.~dpk new file mode 100644 index 00000000..d538c01e --- /dev/null +++ b/src/TToneGen.~dpk @@ -0,0 +1,33 @@ +package TToneGen; + +{$R *.RES} +{$ALIGN ON} +{$ASSERTIONS OFF} +{$BOOLEVAL OFF} +{$DEBUGINFO OFF} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS OFF} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$IMPLICITBUILD ON} + +requires + vcl40; + +contains + ToneGen in 'ToneGen.pas'; + +end. diff --git a/src/Thumbs.db b/src/Thumbs.db new file mode 100644 index 00000000..ff148bca Binary files /dev/null and b/src/Thumbs.db differ diff --git a/src/ToneGen.pas b/src/ToneGen.pas new file mode 100644 index 00000000..985175a0 --- /dev/null +++ b/src/ToneGen.pas @@ -0,0 +1,1614 @@ +unit ToneGen; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs + ,mmsystem,Math; + +//default values +const + AttDef=10; + HoldDef=5; + DecDef=20; + SusDef=50; + RelDef=30; + DurDef=100; + FreDef=440; + VolDef=100; + AMLevels=7; + MaxFreq=20000; + MinFreq=20; + + + +type + TTGPercentage = 0..100; + TTGWave = (tgSine,tgSquare,tgTriangle,tgSawtooth,tgNoise); + TTGResolution = (tg16Bit,tg8Bit); + TTGQuality = (tgHiQ,tgLoQ); + TTGAMLevel = (tgAMLevel1,tgAMLevel2,tgAMLevel3,tgAMLevel4,tgAMLevel5,tgAMLevel6,tgAMLevel7,tgAMLevel8); + TToneGen = class(TComponent) + + private + { Private declarations } + HasChanged: bool; + HasADSRChanged: bool; + HasToneChanged: bool; + HasStopped: bool; + Buffer: PChar; + BufferSize: Integer; + fFrequency: Smallint; + fDuration: Smallint; + fWaveform: TTGWave; + fAttack: Smallint; + fHold: Smallint; + fDecay: Smallint; + fSustain: Smallint; + fRelease: Smallint; + fAsync: bool; + fLoop: bool; + fResolution: TTGResolution; + fQuality: TTGQuality; + fLeftVolume: Smallint; + fRightVolume: Smallint; + DeviceID: Integer; + fStereo: bool; + fAMAmplitude: Smallint; + fAMWaveform: TTGWave; + fAMFrequency: Single; + fAMUseMultiplier: bool; + Octave: Integer; + + fAMLevel: TTGAMLevel; + AMAmpArray: array[0..AMLevels] of Smallint; + AMWaveArray: array[0..AMLevels] of TTGWave; + AMFreqArray: array[0..AMLevels] of Single; + AMOctaves: array[0..AMLevels] of Integer; + + procedure SetFrequency(Freq: Smallint); + procedure SetDuration(Dur: Smallint); + procedure SetWaveform(Wave: TTGWave); + procedure SetAttack(Att: Smallint); + procedure SetHold(Hld: Smallint); + procedure SetDecay(Decy: Smallint); + procedure SetSustain(Sus: Smallint); + procedure SetRelease(Rel: Smallint); + procedure SetResolution(Res: TTGResolution); + procedure SetQuality(Qual: TTGQuality); + function GetVolume: DWORD; + procedure SetVolume; + procedure SetLeftVolume(LVol: Smallint); + procedure SetRightVolume(RVol: Smallint); + function CreateWaveform(DoADSR: bool): bool; + procedure ADSRWaveform(Buf: PChar;BufSize: Integer; DoStereo: bool); + procedure PlayWave; + function LimitValue(lower,upper,val: Smallint):Smallint; + function GetPercentage(PC: Smallint): Smallint; + procedure SetStereo(bstereo: bool); + procedure SetAMLevel(level: TTGAMLevel); + procedure SetAMAmplitude(Amp: Smallint); + procedure SetAMWaveform(Wave: TTGWave); + procedure SetAMFrequency(Freq: Single); + procedure SetAMMultiplier(setit: bool); + + //DefineProperties procedures + procedure ReadAMArrayData(Stream: TStream); + procedure WriteAMArrayData(Stream: TStream); + + class function InstanceCount: Integer; + class function GetOriginalVolume: DWORD; + + + protected + { Protected declarations } + //write array data + procedure DefineProperties(Filer:TFiler);override; + public + { Public declarations } + + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + { Published declarations } + property Frequency: Smallint read fFrequency write SetFrequency default FreDef; + property Duration: Smallint read fDuration write SetDuration default DurDef; + property Waveform: TTGWave read fWaveform write SetWaveform default tgSine; + property Attack: Smallint read fAttack write SetAttack default AttDef; + property Hold: Smallint read fHold write SetHold default HoldDef; + property Decay: Smallint read fDecay write SetDecay default DecDef; + property Sustain: Smallint read fSustain write SetSustain default SusDef; + property Release: Smallint read fRelease write SetRelease default RelDef; + property Async: bool read fAsync write fAsync default true; + property Loop: bool read fLoop write fLoop default false; + property Resolution: TTGResolution read fResolution write SetResolution default tg16Bit; + property Quality: TTGQuality read fQuality write SetQuality default tgHiQ; + property LeftVolume: Smallint read fLeftVolume write SetLeftVolume default VolDef; + property RightVolume: Smallint read fRightVolume write SetRightVolume default VolDef; + property Stereo: bool read fStereo write SetStereo default false; + property AMLevel: TTGAMLevel read fAMLevel write SetAMLevel default tgAMLevel1; + property AMAmplitude: Smallint read fAMAmplitude write SetAMAmplitude nodefault; + property AMWaveform: TTGWave read fAMWaveform write SetAMWaveform nodefault; + property AMFrequency: Single read fAMFrequency write SetAMFrequency nodefault; + property AMUseMultiplier: bool read fAMUseMultiplier write SetAMMultiplier default true; + + procedure Play; + procedure PlayADSR; + procedure Stop; + procedure PresetVolume; + procedure Prepare; + procedure PrepareADSR; + procedure ResetAM; + procedure SetAMParameter(Level: TTGAMLevel;Freq: Single; Amp: Smallint; Wav:TTGWave); + function GetDataBuffer: PChar; + function ExportFile(FileName: String): bool; + function SetNote(NoteString:String): Integer; + function SetAMNote(Level: TTGAMLevel;NoteString:String): Single; + + end; + +procedure Register; + +implementation + +type +{ format of WAV file header } + TWavHeader = record { parameter description } + rId : longint; { 'RIFF' 4 characters } + rLen : longint; { length of DATA + FORMAT chunk } + { FORMAT CHUNK } + wId : longint; { 'WAVE' } + fId : longint; { 'fmt ' } + fLen : longint; { length of FORMAT DATA = 16 } + { format data } + wFormatTag : word; { $01 = PCM } + nChannels : word; { 1 = mono, 2 = stereo } + nSamplesPerSec : longint; { Sample frequency ie 11025} + nAvgBytesPerSec : longint; { = nChannels * nSamplesPerSec * + (nBitsPerSample/8) } + nBlockAlign : word; { = nChannels * (nBitsPerSAmple / 8 } + wBitsPerSample : word; { 8 or 16 } + { DATA CHUNK } + dId : longint; { 'data' } + wSampleLength : longint; { length of SAMPLE DATA } + { sample data : offset 44 } + { for 8 bit mono = s[0],s[1]... :byte} + { for 8 bit stereo = sleft[0],sright[0],sleft[1],sright[1]... :byte} + { for 16 bit mono = s[0],s[1]... :word} + { for 16 bit stereo = sleft[0],sright[0],sleft[1],sright[1]... :word} + end; + +var + TTGCount: Integer=0; + OriginalVolume: DWORD=0; + +procedure Register; +begin + RegisterComponents('Samples', [TToneGen]); +end; + + +//limit value +function TToneGen.LimitValue(lower,upper,val: Smallint):Smallint; +var + msg:String; + +begin +if (val>=lower) and (val<=upper) then + begin + Result:=val; + Exit; + end; + +//error message? +if csDesigning in ComponentState then + begin + msg:='Value must be between '+IntToStr(lower)+' and '+IntToStr(upper); + MessageBox(0,PChar(msg),'Error',MB_OK or MB_ICONERROR); + end; + +if val>upper then + Result:=upper +else + Result:=lower; + + +end; + + +//limit values 0 to 100 ********************************************** +//if designing give warning +//force to limits +function TToneGen.GetPercentage(PC: Smallint):Smallint; +begin + +Result:=LimitValue(0,100,PC); +end; + +//preset tone and volume settings ********************************************** +procedure TToneGen.Prepare; +begin + +//setup volume +SetVolume; + +//create wave +CreateWaveform(false); + +end; + +//set mono or stereo ********************************************** +procedure TToneGen.SetStereo(bstereo: bool); +begin +HasChanged:=true; +fStereo:=bstereo; +end; + +//preset ADSR and volume settings ********************************************** +procedure TToneGen.PrepareADSR; +begin + +//setup volume +SetVolume; + +//create wave +CreateWaveform(true); + +end; + +//preset volume levels ********************************************** +procedure TToneGen.PresetVolume; +begin + +//setup volume +SetVolume; + +end; + +//play sound ********************************************** +procedure TToneGen.PlayWave; +var + Flags: DWORD; + +begin + +//stop any sounds first +Stop; + +//setup volume +SetVolume; + +Flags:=SND_SYNC; + +if fAsync then Flags:=SND_ASYNC; + +if fLoop then Flags:=SND_ASYNC or SND_LOOP; + +Flags:=Flags or SND_MEMORY; + + +//play data in buffer +if Buffer<>nil then + PlaySound(Buffer, 0, Flags); + +end; + +//play simple tone ********************************************** +procedure TToneGen.Play; +begin + +if HasChanged or HasToneChanged then + CreateWaveform(false); + +HasStopped:=false; + +PlayWave; + +//flag as having finished? +HasStopped:=not(Async or Loop); + +end; + +//play enveloped tone ********************************************** +procedure TToneGen.PlayADSR; +begin + +if HasChanged or HasADSRChanged then + CreateWaveform(true); + +HasStopped:=false; + +PlayWave; + +//flag as having finished? +HasStopped:=not(Async or Loop); + +end; + +//stop sound ********************************************** +procedure TToneGen.Stop; +begin + +//stop any sounds +PlaySound(nil, 0, 0); + +//flag as having finished +HasStopped:=true; +end; + + +//get waveform volume ********************************************** +function TToneGen.GetVolume: DWORD; +var + vol: DWORD; + wocs: WAVEOUTCAPS; + CanDoLR: bool; + +begin +vol:=0; + +//can do left & right? +waveOutGetDevCaps(DeviceID,@wocs,sizeof(WAVEOUTCAPS)); +if(wocs.dwFormats and WAVECAPS_LRVOLUME)>0 then + CanDoLR:=true +else + CanDoLR:=false; + +//get volume? +waveOutGetVolume(DeviceID,@vol); + +//copy mono level to right channel? +if not CanDoLR then + vol:=vol+(vol shl $10); + +Result:=vol; +end; + +//set waveform volume ********************************************** +procedure TToneGen.SetVolume; +var + newvol: DWORD; +begin +//combine percentages +newvol:=(($ffff * fLeftVolume) div 100)+((($ffff * fRightVolume) div 100) shl $10); + +//set volume +waveOutSetVolume(DeviceID,newvol); +end; + +//return original volume setting ********************************************** +class function TToneGen.GetOriginalVolume: DWORD; +begin +Result:=OriginalVolume; +end; + +//constructor ********************************************** +constructor TToneGen.Create(AOwner: TComponent); +var + i: Integer; + +begin +Inherited Create(AOwner); + +HasChanged:=true; +HasADSRChanged:=true; +HasToneChanged:=true; +HasStopped:=true; + +Buffer:=nil; +BufferSize:=0; + +fFrequency:=FreDef; +fDuration:=DurDef; +fWaveform:=tgSine; +fAttack:=AttDef; +fHold:=HoldDef; +fDecay:=DecDef; +fSustain:=SusDef; +fRelease:=RelDef; +fAsync:=true; +fLoop:=false; +fResolution:=tg16Bit; +fQuality:=tgHiQ; +fLeftVolume:=VolDef; +fRightVolume:=VolDef; +fStereo:=false; +fAMUseMultiplier:=true; +Octave:=4; + + +//amplitude modulation settings +fAMLevel:=tgAMLevel1; +ResetAM; +fAMFrequency:=AMFreqArray[Integer(fAMLevel)]; +fAMWaveform:=AMWaveArray[Integer(fAMLevel)]; +fAMAmplitude:=AMAmpArray[Integer(fAMLevel)]; +for i:=0 to AMLevels do + begin + AMOctaves[i]:=Octave; + end; + +DeviceID:=0; + +//store volume settings +if (InstanceCount=0) and not(csDesigning in ComponentState)then + begin + //store original settings + OriginalVolume:=GetVolume; + + //initialise volume + SetVolume; + + end; + +//increment instance count +Inc(TTGCount); + + +end; + +//destructor ********************************************** +destructor TToneGen.Destroy; +var + OV: DWORD; + +begin + +//stop playing +Stop; + +//de-allocate memory +If Buffer<>nil then + begin + FreeMem(Buffer); + Buffer:=nil; + BufferSize:=0; + end; + +//decrement instance count +Dec(TTGCount); + +//restore volume settings +if (TTGCount=0) and not(csDesigning in ComponentState) then + begin + OV:=GetOriginalVolume; + waveOutSetVolume(DeviceID,OV); + end; + + +inherited Destroy; +end; + +//instance count ********************************************** +class function TToneGen.InstanceCount: Integer; +begin +Result:=TTGCount; +end; + +//set left volume ********************************************** +procedure TToneGen.SetLeftVolume(LVol: Smallint); +begin +fLeftVolume:=GetPercentage(LVol); + +//initialise volume +if (csLoading in ComponentState) or HasStopped then + SetVolume; + +end; + +//set right volume ********************************************** +procedure TToneGen.SetRightVolume(RVol: Smallint); +begin +fRightVolume:=GetPercentage(RVol); + +//initialise volume +if (csLoading in ComponentState) or HasStopped then + SetVolume; + +end; + +//set frequency ********************************************** +procedure TToneGen.SetFrequency(Freq: Smallint); +begin +HasChanged:=true; +fFrequency:=LimitValue(MinFreq,MaxFreq,Freq); +end; + +//duration ********************************************** +procedure TToneGen.SetDuration(Dur: Smallint); +begin +HasChanged:=true; +fDuration:=LimitValue(10,$7FFF,Dur); +end; + +//wave type ********************************************** +procedure TToneGen.SetWaveform(Wave: TTGWave); +begin +HasChanged:=true; +fWaveform:=Wave; +end; + +//attack ********************************************** +procedure TToneGen.SetAttack(Att: Smallint); +begin +HasADSRChanged:=true; +fAttack:=GetPercentage(Att); +end; + +//hold ********************************************** +procedure TToneGen.SetHold(Hld: Smallint); +begin +HasADSRChanged:=true; +fHold:=GetPercentage(Hld); +end; + +//decay ********************************************** +procedure TToneGen.SetDecay(Decy: Smallint); +begin +HasADSRChanged:=true; +fDecay:=GetPercentage(Decy); +end; + +//sustain ********************************************** +procedure TToneGen.SetSustain(Sus: Smallint); +begin +HasADSRChanged:=true; +fSustain:=GetPercentage(Sus); +end; + +//release ********************************************** +procedure TToneGen.SetRelease(Rel: Smallint); +begin +HasADSRChanged:=true; +fRelease:=GetPercentage(Rel); +end; + +//8 or 16 bit ********************************************** +procedure TToneGen.SetResolution(Res: TTGResolution); +begin +HasChanged:=true; +fResolution:=Res; +end; + +//quality ********************************************** +procedure TToneGen.SetQuality(Qual: TTGQuality); +begin +HasChanged:=true; +fQuality:=Qual; +end; + + +//create wave header **************************************** +procedure CreateWavHeader( stereo: bool;{ t=stereo f=mono } + hires : bool; { t=16bits, f=8 } + hirate : bool; { sample rate t=44100 f=22050} + datasize: longint; {date block size} + var wh: TWavHeader { Wavheader ref } ); +var + resolution,channels: word; + rate: longint; + +begin + +//stereo/mono? +if stereo=true then + channels:=2 +else + channels:=1; + +//16bit/8bit? +if hires=true then + resolution:=16 +else + resolution:=8; + +//44100/22050 bps? +if hirate=true then + rate:=96000 +else + rate:=44100; + + wh.rId := $46464952; { 'RIFF' } + wh.rLen := datasize+36; { length of sample + format } + wh.wId := $45564157; { 'WAVE' } + wh.fId := $20746d66; { 'fmt ' } + wh.fLen := 16; { length of format chunk } + wh.wFormatTag := 1; { PCM data } + wh.nChannels := channels; { mono/stereo } + wh.nSamplesPerSec := rate; { sample rate } + wh.nAvgBytesPerSec := channels*rate*(resolution div 8); + wh.nBlockAlign := channels*(resolution div 8); + wh.wBitsPerSample := resolution;{ resolution 8/16 } + wh.dId := $61746164; { 'data' } + wh.wSampleLength := datasize; { sample size } + +end; + +//********************************************************************** +//modify data to ADSR settings +procedure TToneGen.ADSRWaveform(Buf: PChar;BufSize: Integer; DoStereo: bool); +var + Total,i: Cardinal; + Start,Samples,Cnt: Cardinal; + BufValue: Integer; + SampleFactor,SusFactor: Real; + Env,EnvDur: Cardinal; + SusDuration: Cardinal; + iBuffer: ^SmallInt; + ResFactor: Integer; + HoldV,AttackV,DecayV,SustainV,ReleaseV: Integer; + HiRes: bool; + ByteVal: Char; + WordVal: Smallint; +begin + + +if fResolution=tg16Bit then + begin + HiRes:=true; + end +else + begin + HiRes:=false; + end; + +AttackV:=fAttack; +HoldV:=fHold; +DecayV:=fDecay; +SustainV:=fSustain; +ReleaseV:=fRelease; + +//1/2 no of samples for 16bit +if HiRes then + ResFactor:=2 +else + ResFactor:=1; + +//1/2 no of samples for stereo +if DoStereo then + ResFactor:=ResFactor*2; + +Total:=AttackV+HoldV+DecayV+ReleaseV; + +//normalise percentages +if Total>100 then + begin + AttackV:=AttackV * 100 div Total; + HoldV:=HoldV * 100 div Total; + DecayV:=DecayV * 100 div Total; + ReleaseV:=100-(AttackV+HoldV+DecayV); + SusDuration:=0; + end; + +SusDuration:=100-(AttackV+HoldV+DecayV+ReleaseV); +Samples:=SusDuration * BufSize div (100 * ResFactor); + +//sustain level +SusFactor:=SustainV/100; + +if Samples<1 then + begin + //SustainV:=0; + end; + +Start:=0; + +if HiRes then + begin + //create 16bit pointer + iBuffer:=Pointer(Buf); +end; + + +for Env:=0 to 4 do + begin + + //envelope entry + case Env of + 0://Attack + begin + EnvDur:=AttackV; + Samples:=EnvDur * BufSize div (100 * ResFactor); + if Samples>0 then + SampleFactor:=1/Samples + else + EnvDur:=0; + end; + + 1: //Hold + begin + EnvDur:=HoldV; + Samples:=EnvDur * BufSize div (100 * ResFactor); + if Samples>0 then + SampleFactor:=1 + else + EnvDur:=0; + end; + + 2://Decay + begin + EnvDur:=DecayV; + Samples:=EnvDur * BufSize div (100 * ResFactor); + if Samples>0 then + SampleFactor:=(100-SustainV)/Samples/100 + else + EnvDur:=0; + end; + 3://Sustain + begin + EnvDur:=SusDuration; + if ReleaseV=0 then + begin + Samples:=BufSize div ResFactor; + if DoStereo then + Samples:=max(0,Samples-(Start div 2)) + else + Samples:=max(0,Samples-Start); + end + else + begin + Samples:=EnvDur * BufSize div (100 * ResFactor); + end; + + SampleFactor:=SusFactor; + end; + else//Release + begin + EnvDur:=ReleaseV; + Samples:=BufSize div ResFactor; + + if DoStereo then + Samples:=Samples-(Start div 2) + else + Samples:=Samples-Start; + + if Samples>0 then + SampleFactor:=SusFactor/Samples + else + begin + EnvDur:=0; + Samples:=0; + end; + + end; + end; + + //process envelope entry + if EnvDur >0 then + begin + if DoStereo then Samples:=Samples*2; + Cnt:=0; + i:=min(Start,BufSize); + while i<=min(BufSize,Start+Samples) do + begin + + if HiRes then //16bit + begin + BufValue:=((iBuffer)^); + end + else//8bit + begin + BufValue:=Integer((Buf+i)^); + BufValue:=BufValue-$80; + end; + + case Env of + 0://Attack + begin + BufValue:=Trunc(Cnt * BufValue * SampleFactor); + end; + + 1://Hold + begin + //no change to value + end; + + 2://Decay + begin + BufValue:=BufValue-Trunc(Cnt * BufValue * SampleFactor); + end; + + 3://Sustain + begin + BufValue:=Trunc(BufValue * SampleFactor); + end; + + 4://Release + begin + if DoStereo then + BufValue:=Trunc(((Samples div 2)-Cnt) * BufValue * SampleFactor) + else + BufValue:=Trunc((Samples-Cnt) * BufValue * SampleFactor); + end; + + end; + + if HiRes then //16bit + begin + WordVal:=SmallInt(BufValue); + (iBuffer)^:=WordVal; + Inc(iBuffer); + + //stereo? + if DoStereo then + begin + (iBuffer)^:=WordVal; + Inc(iBuffer); + Inc(i); + end; + + end + else//8bit + begin + ByteVal:=Char($80+BufValue); + (Buf+i)^:=Char(ByteVal); + + //stereo? + if DoStereo then + begin + Inc(i); + (Buf+i)^:=ByteVal; + end; + + end; + + Inc(i); + Inc(Cnt); + + end; + + Start:=Start+Samples+1; + + end; + end; + +HasADSRChanged:=false; +HasChanged:=false; +HasToneChanged:=true; + +end; + + +//********************************************************************** +//create waveform +function TToneGen.CreateWaveform(DoADSR: bool): bool; +var + wh: TWavHeader; + AllocSize,BufSize,HdrSize,i: Integer; + DataBuf: PChar; + MidValue,MaxVal,MinVal,CalcVal: Real; + BytesPerSample,SampsPerInterval: Cardinal; + DoStereo: bool; + CycleCount,cnt,CycleMidPoint,SamplesPerCycle: Cardinal; + FPSamplesPerCycle,FPVerticalStep,FPVerticalAdd :Real; + HiRes,HiQ: bool; + ByteVal: Integer; + iBuffer: ^SmallInt; + WordVal: Smallint; + AmpPC: Integer; + Levels,Total: Integer; + wFrequency: Smallint; + wWaveform: TTGWave; + OldRandSeed: Longint; + //wfh: Integer; +begin + +//same random pattern each time +OldRandSeed:=RandSeed; +RandSeed:=1; + +//mono or stereo? +DoStereo:=fStereo; + +//size of header record +HdrSize:=sizeof(TWavHeader); + +//no of bytes per sample +if fResolution=tg16Bit then + begin + BytesPerSample:=2; + HiRes:=true; + MidValue:=0; + end +else + begin + BytesPerSample:=1; + HiRes:=false; + MidValue:=128; + end; + +//no of samples per S/100 +if fQuality=tgHiQ then + begin + SampsPerInterval:=960; + HiQ:=true; + end +else + begin + SampsPerInterval:=441; + HiQ:=false; + end; + + +//buffer size +BufSize:=(BytesPerSample * Duration * SampsPerInterval) div 10; + +//twice as big for stereo +if DoStereo then BufSize:=BufSize*2; + +//create header +CreateWavHeader(DoStereo,HiRes,HiQ,BufSize,wh); + +//allocate memory for data buffer +if Buffer<>nil then + begin + FreeMem(Buffer); + Buffer:=nil; + BufferSize:=0; + end; + +//stop any sounds +PlaySound(nil, 0, 0); + +try + AllocSize:=BufSize+HdrSize+32; + Buffer:=AllocMem(AllocSize); +except + Result:=false; + Exit; +end; + +if (Buffer=nil) or (BufSize=0) then + begin + Result:=false; + Exit; + end; + +//initialise +BufferSize:=AllocSize; +FillMemory(Buffer,AllocSize,Trunc(MidValue)); + +//copy header data to start of buffer +CopyMemory(Buffer,@wh,HdrSize); + +//amplitude percentages +Total:=0; +for i:=0 to AMLevels do + begin + Total:=Total+AMAmpArray[i]; + end; + +//------------------------------- +//start of creation loop +for Levels:=-1 to AMLevels do + begin + + if Levels=-1 then //base frequency + begin + AmpPC:=100-Total; + wFrequency:=Frequency; + wWaveform:=fWaveForm; + end + else //AM levels + begin + AmpPC:=AMAmpArray[Levels]; + if Total>100 then AmpPC:=AmpPC*100 div Total; + + //frequency mutiplier or absolute? + if AMUseMultiplier then + begin + wFrequency:=LimitValue(MinFreq,MaxFreq,Trunc(AMFreqArray[Levels]*fFrequency)); + end + else //absolute + begin + wFrequency:=Trunc(AMFreqArray[Levels]); + end; + + //waveform + wWaveform:=AMWaveArray[Levels]; + + end; + + //loop again if no amplitude + if (AmpPC<=0) or (wFrequency<=0) then Continue; + + if fResolution=tg16Bit then + begin + MaxVal:=65534 * AmpPC /100; + MinVal:=-32767 * AmpPC /100; + end + else + begin + MaxVal:=254 * AmpPC /100; + MinVal:=-127 * AmpPC /100; + end; + + //floating point samples per cycle + FPSamplesPerCycle:=(SampsPerInterval*100)/wFrequency; + + //samples per cycle + SamplesPerCycle:=Trunc(FPSamplesPerCycle); + + //CycleMidPoint of cycle + //CycleMidPoint:=SamplesPerCycle div 2; + CycleMidPoint:=Trunc(FPSamplesPerCycle+0.5) div 2; + + //offset to data area + DataBuf:=Buffer+HdrSize; + + //counter to step through cycles + CycleCount:=1; + + FPVerticalStep:=0; + FPVerticalAdd:=0; + + //write wav data to buffer + + //sine step values + if wWaveform=tgSine then + begin + FPVerticalStep:=(pi*2)/SamplesPerCycle; + + end; + + //sq step values + if wWaveform=tgSquare then + begin + MaxVal:=MaxVal / 2;; + end; + + //triangle vertical step size + if wWaveform=tgTriangle then + begin + FPVerticalStep:=MinVal; + FPVerticalAdd:=(MaxVal / CycleMidPoint); + + end; + + //sawtooth vertical step size + if wWaveform=tgSawtooth then + begin + FPVerticalStep:=MinVal; + FPVerticalAdd:=(MaxVal/SamplesPerCycle); + + end; + + + cnt:=0; + i:=0; + while iMaxVal then CalcVal:=MaxVal+MidValue; + end; + end; + + //sawtooth + tgSawtooth: + begin + + CalcVal:=Trunc(FPVerticalStep); + FPVerticalStep:=FPVerticalStep+FPVerticalAdd; + + end; + + //noise + else + CalcVal:=random(Trunc(MaxVal+1))+MinVal + + end; + + //offset + CalcVal:=MidValue+CalcVal; + + //8bit or 16? + if HiRes then + begin + iBuffer:=Pointer(DataBuf+i); + WordVal:=iBuffer^; + WordVal:=WordVal+Trunc(CalcVal); + iBuffer^:=WordVal; + Inc(i,2); + + //stereo? + if DoStereo then + begin + iBuffer:=Pointer(DataBuf+i); + (iBuffer)^:=WordVal; + Inc(i,2); + end + + end + else //8bit + begin + ByteVal:=Integer((DataBuf+i)^)-Trunc(MidValue); + ByteVal:=ByteVal+Trunc(CalcVal); + (DataBuf+i)^:=Char(ByteVal); + + //stereo? + if DoStereo then + begin + (DataBuf+i+1)^:=(DataBuf+i)^; + Inc(i); + end; + + Inc(i); + end; + + Inc(cnt); + + if cnt=SamplesPerCycle then + begin + cnt:=0; + if wWaveform<>tgSine then + begin + FPVerticalStep:=MinVal; + end; + + Inc(CycleCount); + + //update samples per cycle + SamplesPerCycle:=Trunc((FPSamplesPerCycle*CycleCount)-(Trunc(FPSamplesPerCycle*(CycleCount-1)))); + + //CycleMidPoint of cycle + //CycleMidPoint:=SamplesPerCycle div 2; + CycleMidPoint:=Trunc(FPSamplesPerCycle+0.5) div 2; + end; + end; + end; + +HasADSRChanged:=true; +HasChanged:=false; +HasToneChanged:=false; + +//pass to ADSR routine +if DoADSR then + begin + + ADSRWaveform(DataBuf,BufSize,DoStereo); + + end; + +//restore random seed value +RandSeed:=OldRandSeed; + +//temporary +{wfh:=FileCreate('c:\test.wav'); +if wfh<>-1 then + begin + FileWrite(wfh,Buffer^,BufSize+HdrSize); + FileClose(wfh); + end;} +//****** + +Result:=true; + +end; + +//********************************************************************** +//set AM Level selection +procedure TToneGen.SetAMLevel(level: TTGAMLevel); +begin +fAMLevel:=level; +AMAmplitude:=AMAmpArray[Integer(level)]; +AMWaveform:=AMWaveArray[Integer(level)]; +AMFrequency:=AMFreqArray[Integer(level)]; +end; + + +//********************************************************************** +//AM frequency = multiplier or absolute? +procedure TToneGen.SetAMMultiplier(setit: bool); +begin + +fAMUseMultiplier:=setit; +HasChanged:=true; + +end; + +//********************************************************************** +//set selected AM Amplitude +procedure TToneGen.SetAMAmplitude(Amp: Smallint); +begin +fAMAmplitude:=GetPercentage(Amp); +AMAmpArray[Integer(fAMLevel)]:=fAMAmplitude; +HasChanged:=true; +end; + +//********************************************************************** +//AM Waveform +procedure TToneGen.SetAMWaveform(Wave: TTGWave); +begin +fAMWaveform:=Wave; +AMWaveArray[Integer(fAMLevel)]:=fAMWaveform; +HasChanged:=true; +end; + +//********************************************************************** +//AM Frequency +procedure TToneGen.SetAMFrequency(Freq: Single); +begin +fAMFrequency:=Freq; +AMFreqArray[Integer(fAMLevel)]:=fAMFrequency; +HasChanged:=true; +end; + +//********************************************************************** +//DefineProperties procedures +//register defineproerties proc's +procedure TToneGen.DefineProperties(Filer: TFiler); +begin + inherited DefineProperties(Filer); + Filer.DefineBinaryProperty('AMArrayData', ReadAMArrayData, WriteAMArrayData,true); +end; + +//********************************************************************** +//write AM array +procedure TToneGen.WriteAMArrayData(Stream: TStream); +var + i: Integer; + Temp: integer; + STemp: Single; + +begin + with Stream do + begin + Temp := AMLevels; + WriteBuffer(Temp, SizeOf(Temp)); + for i := 0 to AMLevels do + begin + //amplitude + Temp := AMAmpArray[i]; + WriteBuffer(Temp,sizeof(temp)); + + //waveform + Temp := Integer(AMWaveArray[i]); + WriteBuffer(Temp,sizeof(temp)); + + //frequency + STemp := AMFreqArray[i]; + WriteBuffer(STemp,sizeof(STemp)); + + end; + end; +end; + +//********************************************************************** +//read AM array +procedure TToneGen.ReadAMArrayData(Stream: TStream); +var + i, Temp, Levels: Integer; + STemp: Single; +begin + with Stream do + begin + Levels := 0; + ReadBuffer(Levels, SizeOf(Levels)); + for i := 0 to Levels do + begin + //amplitude + Temp := 0; + ReadBuffer(Temp, SizeOf(Temp)); + AMAmpArray[i]:=Temp; + + //waveform + Temp := 0; + ReadBuffer(Temp, SizeOf(Temp)); + AMWaveArray[i]:=TTGWave(Temp); + + //frquency + STemp := 0; + ReadBuffer(STemp, SizeOf(STemp)); + AMFreqArray[i]:=STemp; + + end; + end; +end; + +//********************************************************************** +//reset AM parameters to defaults +procedure TToneGen.ResetAM; +var + i: Integer; + +begin + +for i:=0 to AMLevels do + begin + //amplitude + AMAmpArray[i]:=0; + + //wave + AMWaveArray[i]:=tgSine; + + //frequency + AMFreqArray[i]:=(i+1.0) / 2; + + end; + +HasChanged:=true; + +end; + +//********************************************************************** +//set an AM parameter +procedure TToneGen.SetAMParameter(Level: TTGAMLevel;Freq: Single; Amp: Smallint; Wav:TTGWave); +begin + +//frequency +AMFreqArray[Integer(Level)]:=Freq; + +//wave +AMWaveArray[Integer(Level)]:=Wav; + +//amplitude +AMAmpArray[Integer(Level)]:=Amp; + +HasChanged:=true; + +end; + +//********************************************************************** +//return data buffer pointer +function TToneGen.GetDataBuffer: PChar; +begin +Result:=Buffer; +end; + +//********************************************************************** +//export data +function TToneGen.ExportFile(FileName: String): bool; +var + Success,FileHandle: Integer; + +begin +Result:=false; + +if Buffer=nil then Exit; + +FileHandle:=FileCreate(FileName); +if FileHandle<>-1 then + begin + Success:=FileWrite(Filehandle,Buffer^,BufferSize); + FileClose(FileHandle); + + if Success<>-1 then Result:=true; + + end; + +end; + +//********************************************************************** +//set frequency to note value +function SetNoteToFreq(NoteString: String;var pOctave: Integer): Integer; +var + i,tOctave,Freq,Base,TempNote,NoteValue,MaxNoteVal: Integer; +begin +Result:=0; +Base:=440; +MaxNoteVal:=121; +NoteValue:=-1; +tOctave:=pOctave; + +NoteString:=AnsiUppercase(Trim(NoteString)); + +//direct note entry 'Nxx' +if AnsiPos('N',NoteString)=1 then + begin + //delete 'N' + Delete(NoteString,1,1); + NoteValue:=StrToIntDef(NoteString,-1); + + if NoteValue>MaxNoteVal then NoteValue:=-1; + + NoteString:=''; + + end +else + begin + if AnsiPos('O',NoteString)=1 then //Octave 'Ox' + begin + //delete 'O' + Delete(NoteString,1,1); + tOctave:=StrToIntDef(NoteString[1],-1); + + if tOctave=-1 then Exit; + + //delete 'x' + Delete(NoteString,1,1); + end + // > or < + else if (AnsiPos('<',NoteString)=1) or (AnsiPos('>',NoteString)=1) then + begin + while(AnsiPos('<',NoteString)=1) or (AnsiPos('>',NoteString)=1) do + begin + if AnsiPos('<',NoteString)=1 then + begin + Dec(tOctave); + if tOctave<0 then tOctave:=0; + end + else + begin + Inc(tOctave); + if tOctave>9 then tOctave:=9; + end; + + Delete(NoteString,1,1); + end; + + end; + + //extract note + for i:=0 to 6 do + begin + //search for note (A - G) + if AnsiPos(Char(Integer('A')+i),NoteString)=1 then + begin + NoteValue:=i; + + //delete note character + Delete(NoteString,1,1); + Break; + end; + + end; + + //accidental # + - + if NoteValue>-1 then + begin + + //insert semitones + TempNote:=NoteValue*2; + + //correct for BC & EF + if NoteValue>4 then + Dec(TempNote); + + if NoteValue>1 then + Dec(TempNote); + + NoteValue:=TempNote; + + //# or + + if (AnsiPos('+',NoteString)=1) or (AnsiPos('#',NoteString)=1) then + begin + Delete(NoteString,1,1); + + //B or E + if (NoteValue=2) or (NoteValue=7) then + NoteValue:=-1 + else + Inc(NoteValue); + end + //- + else if AnsiPos('-',NoteString)=1 then + begin + Delete(NoteString,1,1); + + //C or F + if (NoteValue=3) or (NoteValue=8) then + NoteValue:=-1 + else + begin + Dec(NoteValue); + + //A- = G# in previous octave + if NoteValue<0 then + begin + NoteValue:=11;//G# + Dec(tOctave); + + if tOctave<0 then NoteValue:=-1; + end; + end; + + end; + + end; + + if NoteValue>-1 then + begin + NoteValue:=12*tOctave+NoteValue; + end; + + end; + +//should be empty now +if Length(NoteString)>0 then NoteValue:=-1; + +if NoteValue>-1 then + begin + pOctave:=tOctave; + + NoteValue:=NoteValue-48; + Freq:=Trunc(Base * Power(2,NoteValue/12)+0.5); + + if (Freq>=MinFreq) and (Freq<=MaxFreq) then + begin + Result:=Freq; + end; + + end; +end; + +//********************************************************************** +//set frequency to note value +function TToneGen.SetNote(NoteString: String): Integer; +var + Freq,pOctave: Integer; + +begin +Result:=0; +pOctave:=Octave; + +Freq:=SetNoteToFreq(NoteString,pOctave); + +if Freq>0 then + begin + Frequency:=Freq; + Octave:=pOctave; + HasChanged:=true; + Result:=Freq; + end; + +end; + +//********************************************************************** +//set AM frequency to note value +function TToneGen.SetAMNote(Level: TTGAMLevel;NoteString:String): Single; +var + Freq,pOctave: Integer; + fFreq: Single; + +begin +Result:=0; +pOctave:=AMOctaves[Integer(Level)]; + +Freq:=SetNoteToFreq(NoteString,pOctave); +fFreq:=Freq; +if Freq>0 then + begin + //absolute or multiply? + if fAMUseMultiplier then + fFreq:=fFreq/fFrequency; + + AMFreqArray[Integer(Level)]:=fFreq; + + AMOctaves[Integer(Level)]:=pOctave; + HasChanged:=true; + Result:=fFreq; + end; + +end; +end. diff --git a/src/UACAGMulti.dfm b/src/UACAGMulti.dfm new file mode 100644 index 00000000..e3f74238 Binary files /dev/null and b/src/UACAGMulti.dfm differ diff --git a/src/UACAGMulti.pas b/src/UACAGMulti.pas new file mode 100644 index 00000000..69f2b084 --- /dev/null +++ b/src/UACAGMulti.pas @@ -0,0 +1,321 @@ +unit UACAGMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, + StdCtrls, ExtCtrls, Grids, zLogGlobal, JLLabel, UBasicMulti, checklst, + Cologrid, UMultipliers; + + +type + TACAGMulti = class(TBasicMulti) + Panel1: TPanel; + Button3: TButton; + Panel: TPanel; + Label1R9: TRotateLabel; + Label3R5: TRotateLabel; + Label7: TRotateLabel; + Label14: TRotateLabel; + Label21: TRotateLabel; + Label28: TRotateLabel; + Label50: TRotateLabel; + Label144: TRotateLabel; + Label430: TRotateLabel; + Label1200: TRotateLabel; + Label2400: TRotateLabel; + Label5600: TRotateLabel; + Edit1: TEdit; + Label10g: TRotateLabel; + Button1: TButton; + Grid: TMgrid; + StayOnTop: TCheckBox; + procedure FormCreate(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure GoButtonClick2(Sender: TObject); + procedure Edit1KeyPress(Sender: TObject; var Key: Char); + procedure FormShow(Sender: TObject); + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + procedure StayOnTopClick(Sender: TObject); + procedure FormResize(Sender: TObject); + private + { Private declarations } + public + LatestMultiAddition : integer; // Grid.TopRow + CityList : TCityList; + procedure Update; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Add(var aQSO : TQSO); override; {NewMulti} + function ValidMulti(aQSO : TQSO) : boolean; override; + procedure Reset; override; + procedure CheckMulti(aQSO : TQSO); override; + function ExtractMulti(aQSO : TQSO) : string; override; + procedure SetNumberEditFocus; override; + { Public declarations } + end; + +var + ACAGMulti: TACAGMulti; + +implementation + +uses Main; + +{$R *.DFM} + +procedure TACAGMulti.Add(var aQSO : TQSO); +begin + inherited; + //AddNoUpdate(aQSO); + //Update; +end; + +procedure TACAGMulti.Update; +var i : integer; + C : TCity; + str : string; +begin + for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + str := C.Summary; + str[30] := ' '; + Grid.Cells[0,i] := str; + end; + Grid.TopRow := LatestMultiAddition; +end; + +procedure TACAGMulti.CheckMulti(aQSO : TQSO); +var str : string; + i : integer; + C : TCity; +begin + inherited; + str := aQSO.QSO.NrRcvd; + if str = '' then + exit; + if str[length(str)] in ['H', 'P', 'L', 'M'] then + System.Delete(str, length(str), 1); + for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + if str = C.CityNumber then + begin + //ListBox.TopIndex := i; + Grid.TopRow := i; + str := C.Summary2; + if C.Worked[aQSO.QSO.Band] then + Insert('Worked on this band. ',str, 27) + else + Insert('Needed on this band. ',str, 27); + MainForm.WriteStatusLine(str, false); + exit; + end; + end; + MainForm.WriteStatusLine('Invalid number', false); +end; + +function TACAGMulti.ExtractMulti(aQSO : TQSO) : string; +var str : string; +begin + Result := ''; + str := aQSO.QSO.NrRcvd; + if str = '' then + exit; + if not(str[length(str)] in ['0'..'9']) then + Delete(str, length(str),1); + Result := str; +end; + +procedure TACAGMulti.AddNoUpdate(var aQSO : TQSO); +var str, str2 : string; + B : TBand; + i, j : integer; + C : TCity; +begin + aQSO.QSO.NewMulti1 := False; + str := aQSO.QSO.NrRcvd; + Delete(str,length(str),1); + aQSO.QSO.Multi1 := str; + + if aQSO.QSO.Dupe then + exit; + + C := CityList.GetCity(str); + if C <> nil then + begin + if C.Worked[aQSO.QSO.band] = False then + begin + C.Worked[aQSO.QSO.band] := True; + aQSO.QSO.NewMulti1 := True; + end; + LatestMultiAddition := C.Index; + end; + {for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + if str = C.CityNumber then + begin + if C.Worked[aQSO.QSO.band] = False then + begin + C.Worked[aQSO.QSO.band] := True; + aQSO.QSO.NewMulti1 := True; + end; + LatestMultiAddition := i; + break; + end; + end; } +end; + +procedure TACAGMulti.Reset; +var i, j : integer; + B : TBand; + str : string; +begin + if CityList.List.Count = 0 then exit; + //j := ListBox.TopIndex; + j := Grid.TopRow; + Grid.RowCount := 0; + Grid.RowCount := CityList.List.Count; + //ListBox.Items.Clear; + for i := 0 to CityList.List.Count-1 do + begin + for B := b19 to HiBand do + TCity(CityList.List[i]).Worked[B] := false; + str := TCity(CityList.List[i]).Summary; + str[30] := ' '; + Grid.Cells[0,i] := str; + //ListBox.Items.Add(str); + //ListBox.Checked[i] := False; + end; + //ListBox.TopIndex := j; + Grid.TopRow := j; +end; + +function TACAGMulti.ValidMulti(aQSO : TQSO) : boolean; +var str : string; + B : TBand; + i, j : integer; + C : TCity; + boo : boolean; +begin + Result := False; + str := aQSO.QSO.NrRcvd; + if not(length(str) in [5..7]) then + exit; + if not(str[length(str)] in ['P','L','M','H']) then + exit; + Delete(str, length(str), 1); + + boo := false; + for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + if str = C.CityNumber then + begin + boo := true; + break; + end; + end; + Result := boo; +end; + + +procedure TACAGMulti.FormCreate(Sender: TObject); +var i : integer; +begin + LatestMultiAddition := 0; + CityList := TCityList.Create; + CityList.LoadFromFile('ACAG.DAT'); + if CityList.List.Count = 0 then exit; + Reset; + { + for i := 0 to CityList.List.Count-1 do + begin + ListBox.Items.Add(TCity(CityList.List[i]).Summary); + end; + } +end; + +procedure TACAGMulti.Button1Click(Sender: TObject); +begin + Close; +end; + +procedure TACAGMulti.GoButtonClick2(Sender: TObject); +var temp : string; + i : integer; +begin + temp := Edit1.Text; + for i := 0 to CityList.List.Count-1 do + begin + if pos(temp,TCity(CityList.List[i]).CityNumber) = 1 then + begin + Grid.TopRow := i; + //ListBox.TopIndex := i; + break; + end; + end; +end; + + +procedure TACAGMulti.Edit1KeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = Chr($0D) then + begin + GoButtonClick2(Self); + Key := #0; + end; +end; + +procedure TACAGMulti.FormShow(Sender: TObject); +begin + inherited; + Update; +end; + +procedure TACAGMulti.GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); +var B : TBand; +begin + inherited; + if ARow > CityList.List.Count - 1 then + exit; + B := Main.CurrentQSO.QSO.Band; + if TCity(CityList.List[ARow]).Worked[B] then + FColor := clRed + else + FColor := clBlack; +end; + +procedure TACAGMulti.StayOnTopClick(Sender: TObject); +begin + if StayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +procedure TACAGMulti.FormResize(Sender: TObject); +var i, j : integer; +begin + inherited; + i := Self.Width - 20 - Button3.Width; + j := i - Edit1.Width - 10; + if j < (StayOnTop.Left + StayOnTop.Width + 10) then + begin + j := 176; + i := 224; + end; + Edit1.Left := j; + Button3.Left := i; +end; + +procedure TACAGMulti.SetNumberEditFocus; +begin + SetNumberEditFocusJARL; +end; + +end. diff --git a/src/UACAGScore.dfm b/src/UACAGScore.dfm new file mode 100644 index 00000000..092afd92 Binary files /dev/null and b/src/UACAGScore.dfm differ diff --git a/src/UACAGScore.pas b/src/UACAGScore.pas new file mode 100644 index 00000000..03e749c1 --- /dev/null +++ b/src/UACAGScore.pas @@ -0,0 +1,154 @@ +unit UACAGScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, StdCtrls, ExtCtrls, Aligrid, zLogGlobal, menus, + Buttons; + +type + TACAGScore = class(TBasicScore) + Grid: TStringAlignGrid; + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + procedure Reset; override; + procedure Add(var aQSO : TQSO); override; + { Public declarations } + end; + +var + ACAGScore: TACAGScore; + +implementation + +uses Main; + +{$R *.DFM} + +procedure TACAGScore.AddNoUpdate(var aQSO : TQSO); +var band : TBand; +begin + inherited; + + if aQSO.QSO.Dupe then + exit; + + band := aQSO.QSO.band; + aQSO.QSO.points := 1; + inc(Points[band]); +end; + +procedure TACAGScore.Update; +var band : TBand; + TotQSO, TotPoints, TotMulti : LongInt; + row : integer; + mb : TMenuItem; +begin + TotQSO := 0; TotPoints := 0; TotMulti := 0; + row := 1; + + if ShowCWRatio then + begin + Grid.ColCount := 5; + Grid.Width := Grid.DefaultColWidth * 5; + end + else + begin + Grid.ColCount := 3; + Grid.Width := Grid.DefaultColWidth * 3; + end; + + + Grid.Cells[0,0] := 'MHz'; + Grid.Cells[1,0] := 'Points'; + Grid.Cells[2,0] := 'Mult'; + + if ShowCWRatio then + begin + Grid.Cells[3,0] := 'CW Q''s'; + Grid.Cells[4,0] := 'CW %'; + end; + + + for band := b35 to HiBand do + begin + if NotWARC(band) then + begin + TotPoints := TotPoints + Points[band]; + TotMulti := TotMulti + Multi[band]; + TotQSO := TotQSO + QSO[band]; + mb := MainForm.BandMenu.Items[ord(band)]; + if mb.Visible and mb.Enabled then + begin + Grid.CellFont[0,row].Color := clBlue; + Grid.Cells[0,row] := MHzString[band]; + Grid.Cells[1,row] := IntToStr(Points[band]); + Grid.Cells[2,row] := IntToStr(Multi[band]); + + if ShowCWRatio then + begin + Grid.Cells[3,row] := IntToStr(CWQSO[band]); + if QSO[band] > 0 then + Grid.Cells[4,row] := FloatToStrF(100*(CWQSO[band] / QSO[band]), ffFixed, 1000, 1) + else + Grid.Cells[4,row] := '-'; + end; + + inc(row); + end; + end; + end; +{ + Grid.Cells[1, 13] := IntToStr(TotPoints); + Grid.Cells[2, 13] := IntToStr(TotMulti); + Grid.Cells[2, 14] := IntToStr(TotPoints*TotMulti); + } + Grid.CellFont[0, row].Color := clBlack; + Grid.Cells[0, row] := 'Total'; + Grid.Cells[1, row] := IntToStr(TotPoints); + Grid.Cells[2, row] := IntToStr(TotMulti); + + + if ShowCWRatio then + begin + Grid.Cells[3, row] := IntToStr(TotalCWQSOs); + if TotQSO > 0 then + Grid.Cells[4, row] := FloatToStrF(100*(TotalCWQSOs/TotQSO), ffFixed, 1000, 1) + else + Grid.Cells[4, row] := '-'; + end; + + inc(row); + Grid.CellFont[0, row].Color := clBlack; + Grid.Cells[0, row] := 'Score'; + Grid.Cells[1, row] := ''; + Grid.Cells[2, row] := IntToStr(TotPoints*TotMulti); + Grid.Height := 16*(row+1); + ACAGScore.Height := Grid.Height + (325-256); + +end; + +procedure TACAGScore.Reset; +begin + inherited; +end; + +procedure TACAGScore.Add(var aQSO : TQSO); +begin + inherited; +end; + +procedure TACAGScore.FormShow(Sender: TObject); +begin + inherited; + Button1.SetFocus; + Grid.Col := 1; + Grid.Row := 1; +end; + +end. diff --git a/src/UALLJAEditDialog.dfm b/src/UALLJAEditDialog.dfm new file mode 100644 index 00000000..7b57780d Binary files /dev/null and b/src/UALLJAEditDialog.dfm differ diff --git a/src/UALLJAEditDialog.pas b/src/UALLJAEditDialog.pas new file mode 100644 index 00000000..d61d5a85 --- /dev/null +++ b/src/UALLJAEditDialog.pas @@ -0,0 +1,63 @@ +unit UALLJAEditDialog; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UEditDialog, StdCtrls, ExtCtrls, zLogGlobal, Menus; + +type + TALLJAEditDialog = class(TEditDialog) + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + ALLJAEditDialog: TALLJAEditDialog; + +implementation + +uses UOptions, Main; + +{$R *.DFM} + +procedure TALLJAEditDialog.FormShow(Sender: TObject); +var i : integer; +begin + inherited; +{ rcvdRSTEdit.Left := 14*CWid + 3 + offset; + rcvdRSTEdit.Width := 3*CWid+1; + + NumberEdit.Left := 17*CWid + 4 + offset; + NumberEdit.Width := 5*CWid+1; + + BandEdit.Left := 22*CWid + 5 + offset; + BandEdit.Width := 4*CWid+1; + + ModeEdit.Left := 26*CWid + 6 + offset; + ModeEdit.Width := 3*CWid+1; } + + {PowerEdit.Left := 40*CWid + 7 + offset; + PowerEdit.Width := 3*CWid+1;} + + {PointEdit.Left := 29*CWid + 7 + offset; + PointEdit.Width := 3*CWid+1; + + OpEdit.Left := 35*Cwid + 8 + offset; + OpEdit.Width := 6*Cwid + 1; + + MemoEdit.Left := 41*CWid + 9 + offset; + MemoEdit.Width := 7*CWid + 1; + + if Options.MultiOp = false then + begin + OpEdit.Visible := false; + MemoEdit.Left := (38-3)*Cwid + 9 + offset; + MemoEdit.Width := (10+6)*CWid + 1; + end; } +end; + +end. diff --git a/src/UALLJAMulti.dfm b/src/UALLJAMulti.dfm new file mode 100644 index 00000000..78d4f20a Binary files /dev/null and b/src/UALLJAMulti.dfm differ diff --git a/src/UALLJAMulti.pas b/src/UALLJAMulti.pas new file mode 100644 index 00000000..91c2f800 --- /dev/null +++ b/src/UALLJAMulti.pas @@ -0,0 +1,373 @@ +unit UALLJAMulti; + +interface + +uses + SysUtils, Windows, Messages, Classes, Graphics, Controls, + StdCtrls, ExtCtrls, Forms, ComCtrls, zLogGlobal, UBasicMulti, JLLabel; + +type + + TKen = (m101,m102,m103,m104,m105,m106,m107,m108, + m109,m110,m111,m112,m113,m114, + m02,m03,m04,m05,m06,m07,m08,m09,m10,m11, + m12,m13,m14,m15,m16,m17,m18,m19,m20,m21, + m22,m23,m24,m25,m26,m27,m28,m29,m30,m31, + m32,m33,m34,m35,m36,m37,m38,m39,m40,m41, + m42,m43,m44,m45,m46,m47,m48,m49,m50); + + TALLJAMulti = class(TBasicMulti) + PageControl: TPageControl; + Tab35: TTabSheet; + Tab7: TTabSheet; + Tab14: TTabSheet; + Tab21: TTabSheet; + Tab28: TTabSheet; + Tab50: TTabSheet; + TabALL: TTabSheet; + Panel: TPanel; + RotateLabel2: TRotateLabel; + RotateLabel3: TRotateLabel; + RotateLabel4: TRotateLabel; + RotateLabel5: TRotateLabel; + RotateLabel6: TRotateLabel; + RotateLabel7: TRotateLabel; + ListBox: TListBox; + Panel1: TPanel; + Button2: TButton; + cbStayOnTop: TCheckBox; + procedure PageControlChange(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure cbStayOnTopClick(Sender: TObject); + private + KenLabels : array[b35..b50,m101..m50] of TLabel; + MultiTable : array[b35..b50,m101..m50] of boolean; + + { Private declarations } + public + procedure UpdateBand(B : TBand); + procedure Update; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Add(var aQSO : TQSO); override; + procedure Reset; override; + function ValidMulti(aQSO : TQSO) : boolean; override; + procedure CheckMulti(aQSO : TQSO); override; + function ExtractMulti(aQSO : TQSO) : string; override; + function IsNewMulti(aQSO : TQSO) : boolean; override; + procedure SetNumberEditFocus; override; + { Public declarations } + end; + +const KenNames : array[m101..m50] of string[15] = +('101 @J','102 G','103 ','104 ԑ','105 m','106 Ύ','107 ', + '108 u','109 \','110 H','111 ','112 _U','113 OR','114 n', + '02 X','03 ','04 Hc','05 R`','06 {','07 ','08 V', + '09 ','10 ','11 _ސ','12 t','13 ','14 ','15 Ȗ', + '16 Qn','17 R','18 É','19 ','20 m','21 Od','22 s', + '23 ','24 ޗ','25 ','26 a̎R','27 ','28 xR','29 ', + '30 ΐ','31 R','32 ','33 R','34 ','35 L','36 ', + '37 ','38 Q','39 m','40 ','41 ','42 ','43 F{', + '44 啪','45 {','46 ','47 ','48 }','49 m', + '50 쒹'); +var + ALLJAMulti: TALLJAMulti; + +implementation + +uses Main; + +{$R *.DFM} + +procedure TALLJAMulti.UpdateBand(B : TBand); +var K : TKen; +begin + for K := m101 to m50 do + if MultiTable[B, K] then + KenLabels[B, K].Font.Color := clRed + else + KenLabels[B, K].Font.Color := clBlack; +end; + +procedure TALLJAMulti.Update; +var band, B : TBand; + str : string; + K : TKen; +begin + //inherited; + band := Main.CurrentQSO.QSO.Band; + if not(band in [b35, b7, b14, b21, b28, b50]) then + band := b35; + if PageControl.ActivePage <> TabAll then + begin + PageControl.ActivePage := PageControl.Pages[OldBandOrd(band)-1]; + UpdateBand(band); + end + else + begin + for K := m101 to m50 do + begin + str := FillRight(KenNames[K],14); + for B := b35 to b50 do + if NotWARC(B) then + if MultiTable[B,K] then + str := str + '* ' + else + str := str + '. '; + ListBox.Items[ord(K)] := str; + end; + end; +end; + +function TALLJAMulti.ExtractMulti(aQSO : TQSO) : string; +var str : string; +begin + Result := ''; + str := aQSO.QSO.NrRcvd; + if str = '' then + exit; + if not(str[length(str)] in ['0'..'9']) then + Delete(str, length(str),1); + Result := str; +end; + +procedure TALLJAMulti.AddNoUpdate(var aQSO : TQSO); +var str : string; + M : integer; + K : TKen; + B : TBand; + i : integer; +begin + aQSO.QSO.NewMulti1 := False; + str := aQSO.QSO.NrRcvd; + Delete(str,length(str),1); + aQSO.QSO.Multi1 := str; + + if aQSO.QSO.Dupe then + exit; + + if not(NotWARC(aQSO.QSO.Band)) then + exit; + M := 0; + try + M := StrToInt(str); + except + on EConvertError do M := 0; + end; + case M of + 101..114 : K := TKen(M-101); + 2..50 : K := TKen(M - 2 + ord(m02)); + else + exit; + end; + if MultiTable[aQSO.QSO.band,K] = False then + begin + MultiTable[aQSO.QSO.band,K] := True; + aQSO.QSO.NewMulti1 := True; + end; +end; + +procedure TALLJAMulti.Add(var aQSO : TQSO); +begin + inherited; +end; + +procedure TALLJAMulti.PageControlChange(Sender: TObject); +begin + case PageControl.ActivePage.Tag of + ord(b35)..ord(b50) : UpdateBand(TBand(PageControl.ActivePage.Tag)); + else + Update; + end; +end; + +procedure TALLJAMulti.FormCreate(Sender: TObject); +var band : TBand; + ken : TKen; + x, y : integer; +begin + for band := b35 to b50 do + begin + for ken := m101 to m50 do + begin + MultiTable[band, ken] := false; + end; + if NotWARC(band) then + for x := 1 to 5 do + for y := 1 to 16 do + begin + ken := TKen(16*(x-1)+y-1); + if ken <= m50 then + begin + KenLabels[band,ken] := TLabel.Create(Self); + KenLabels[band,ken].Font.Size := 9; + KenLabels[band,ken].ParentFont := True; + KenLabels[band,ken].Parent := PageControl.Pages[OldBandOrd(band)-1]; + {if MultiTable[TBand(PageControl.ActivePage.Tag),ken] then + KenLabels[band,ken].Font.Color := clRed + else} + KenLabels[band,ken].Font.Color := clBlack; + KenLabels[band,ken].Left := 77*(x-1) + 8; + KenLabels[band,ken].Top := 8+16*(y-1); + KenLabels[band,ken].Caption := KenNames[ken]; + end; + end; + end; + + for ken := m101 to m50 do + begin + ListBox.Items.Add(FillRight(KenNames[ken],14)+'. . . . . . '); + end; + + {Label1.caption := KenLabels[b35,m10].Font.name;} +end; + +procedure TALLJAMulti.Reset; +var band : TBand; + ken : TKen; +begin + for band := b35 to b50 do + if NotWARC(band) then + for ken := m101 to m50 do + begin + MultiTable[band, ken] := false; + //KenLabels[band, ken].Font.Color := clBlack; + end; + {ListBox.Items.Clear; + for ken := m101 to m50 do + begin + ListBox.Items.Add(FillRight(KenNames[ken],14)+'. . . . . . '); + end;} +end; + +function TALLJAMulti.ValidMulti(aQSO : TQSO) : boolean; +var str : string; + M : integer; + K : TKen; +begin + Result := False; + str := aQSO.QSO.NrRcvd; + if not(length(str) in [3..4]) then + exit; + if not(str[length(str)] in ['P','L','M','H']) then + exit; + Delete(str, length(str), 1); + M := 0; + try + M := StrToInt(str); + except + on EConvertError do M := 0; + end; + if M in [2..50, 101..114] then + Result := True + else + Result := False; +end; + + +procedure TALLJAMulti.Button2Click(Sender: TObject); +begin + Close; +end; + +procedure TALLJAMulti.FormShow(Sender: TObject); +begin + inherited; + if Main.CurrentQSO.QSO.Band in [b35, b7, b14, b21, b28, b50] then + PageControl.ActivePage := PageControl.Pages[OldBandOrd(Main.CurrentQSO.QSO.band)-1]; +end; + + +function TALLJAMulti.IsNewMulti(aQSO : TQSO) : boolean; +var M : integer; + K : TKen; + B : TBand; + str : string; +begin + Result := False; + str := aQSO.QSO.NrRcvd; + if str = '' then + exit; + if str[length(str)] in ['P', 'L', 'M', 'H'] then + Delete(str,length(str),1); + M := 0; + try + M := StrToInt(str); + except + on EConvertError do M := 0; + end; + case M of + 101..114 : K := TKen(M-101); + 2..50 : K := TKen(M - 2 + ord(m02)); + else + begin + exit; + end; + end; + + if MultiTable[aQSO.QSO.band,K] = False then + Result := True; + +end; + +procedure TALLJAMulti.CheckMulti(aQSO : TQSO); +var str : string; + M : integer; + K : TKen; + B : TBand; +begin + str := aQSO.QSO.NrRcvd; + + if str = '' then + exit; + + if str[length(str)] in ['P', 'L', 'M', 'H'] then + Delete(str,length(str),1); + M := 0; + try + M := StrToInt(str); + except + on EConvertError do M := 0; + end; + case M of + 101..114 : K := TKen(M-101); + 2..50 : K := TKen(M - 2 + ord(m02)); + else + begin + MainForm.WriteStatusLine('Invalid number', false); + exit; + end; + end; + + + str := KenNames[K]; + if MultiTable[aQSO.QSO.band,K] = True then + str := str + ' Worked on this band. Worked on : ' + else + str := str + ' Needed on this band. Worked on : '; + + for B := b35 to b50 do + if MultiTable[B,K] then + str := str + MHzString[B]+' ' + else + str := str + ''; + MainForm.WriteStatusLine(str, false); + +end; + +procedure TALLJAMulti.cbStayOnTopClick(Sender: TObject); +begin + if cbStayOnTop.Checked then + Self.FormStyle := fsStayOnTop + else + Self.FormStyle := fsNormal; +end; + +procedure TALLJAMulti.SetNumberEditFocus; +begin + SetNumberEditFocusJARL; +end; + +initialization +end. diff --git a/src/UALLJAScore.dfm b/src/UALLJAScore.dfm new file mode 100644 index 00000000..3279ce27 Binary files /dev/null and b/src/UALLJAScore.dfm differ diff --git a/src/UALLJAScore.pas b/src/UALLJAScore.pas new file mode 100644 index 00000000..dd2a29e3 --- /dev/null +++ b/src/UALLJAScore.pas @@ -0,0 +1,123 @@ +unit UALLJAScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, Aligrid, StdCtrls, ExtCtrls, zLogGlobal, Buttons; + +type + TALLJAScore = class(TBasicScore) + Grid: TStringAlignGrid; + procedure CWButtonClick(Sender: TObject); + private + { Private declarations } + public + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + procedure Reset; override; + procedure Add(var aQSO : TQSO); override; + { Public declarations } + end; + +var + ALLJAScore: TALLJAScore; + +implementation + +{$R *.DFM} + +procedure TALLJAScore.AddNoUpdate(var aQSO : TQSO); +var band : TBand; +begin + inherited; + + if aQSO.QSO.Dupe then + exit; + + band := aQSO.QSO.band; + aQSO.QSO.points := 1; + inc(Points[band]); +end; + +procedure TALLJAScore.Update; +var band : TBand; + TotPoints, TotMulti : LongInt; + row : integer; +begin + TotPoints := 0; TotMulti := 0; + row := 1; + + if ShowCWRatio then + begin + Grid.ColCount := 5; + Grid.Width := Grid.DefaultColWidth * 5; + end + else + begin + Grid.ColCount := 3; + Grid.Width := Grid.DefaultColWidth * 3; + end; + + if ShowCWRatio then + begin + Grid.Cells[3,0] := 'CW Q''s'; + Grid.Cells[4,0] := 'CW %'; + end; + + for band := b35 to b50 do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(Points[band]); + TotPoints := TotPoints + Points[band]; + Grid.Cells[2,row] := IntToStr(Multi[band]); + TotMulti := TotMulti + Multi[band]; + if ShowCWRatio then + begin + Grid.Cells[3,row] := IntToStr(CWQSO[band]); + if QSO[band] > 0 then + Grid.Cells[4,row] := FloatToStrF(100*(CWQSO[band] / QSO[band]), ffFixed, 1000, 1) + else + Grid.Cells[4,row] := '-'; + end; + + + inc(row); + end; + end; + Grid.Cells[1, 7] := IntToStr(TotPoints); + Grid.Cells[2, 7] := IntToStr(TotMulti); + Grid.Cells[2, 8] := IntToStr(TotPoints*TotMulti); + + if ShowCWRatio then + begin + Grid.Cells[3, row] := IntToStr(TotalCWQSOs); + if TotPoints > 0 then + Grid.Cells[4, row] := FloatToStrF(100*(TotalCWQSOs/TotPoints), ffFixed, 1000, 1) + else + Grid.Cells[4, row] := '-'; + end; + + +end; + +procedure TALLJAScore.Reset; +begin + inherited; +end; + +procedure TALLJAScore.Add(var aQSO : TQSO); +begin + inherited; +end; + + + +procedure TALLJAScore.CWButtonClick(Sender: TObject); +begin + inherited; + Width := Grid.Width + 15; +end; + +end. diff --git a/src/UALLJAScore1.dfm b/src/UALLJAScore1.dfm new file mode 100644 index 00000000..6b423633 Binary files /dev/null and b/src/UALLJAScore1.dfm differ diff --git a/src/UALLJAScore1.pas b/src/UALLJAScore1.pas new file mode 100644 index 00000000..a36a958d --- /dev/null +++ b/src/UALLJAScore1.pas @@ -0,0 +1,119 @@ +unit UALLJAScore1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, zLogGlobal, StdCtrls, ExtCtrls; + +type + TALLJAScore1 = class(TBasicScore) + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label6: TLabel; + Label7: TLabel; + Label8: TLabel; + Label9: TLabel; + Label10: TLabel; + TotalQSOLabel: TLabel; + TotalMultiLabel: TLabel; + Button1: TButton; + TotalScoreLabel: TLabel; + Label12: TLabel; + procedure FormCreate(Sender: TObject); + procedure Button1Click(Sender: TObject); + private + { Private declarations } + QSOLabels : array[b35..b50] of TLabel; + MultiLabels : array[b35..b50] of TLabel; + public + { Public declarations } + procedure Update; override; + procedure AddNoUpdate(var aQSO : TQSO); override; {calculates points} + procedure Add(var aQSO : TQSO); override; {calculates points} + procedure Reset; override; + end; + +var + ALLJAScore1: TALLJAScore1; + +implementation + +{$R *.DFM} +procedure TALLJAScore1.Update; +var B : TBand; + TotQSO, TotMulti : LongInt; +begin + TotQSO := 0; TotMulti := 0; + for B := b35 to b50 do + begin + QSOLabels[B].Caption := IntToStr(QSO[B]); + TotQSO := TotQSO + QSO[B]; + MultiLabels[B].Caption := IntToStr(Multi[B]); + TotMulti := TotMulti + Multi[B]; + end; + TotalQSOLabel.Caption := IntToStr(TotQSO); + TotalMultiLabel.Caption := IntToStr(TotMulti); + TotalScoreLabel.Caption := IntToStr(TotQSO*TotMulti); +end; + +procedure TALLJAScore1.AddNoUpdate(var aQSO : TQSO); +var band : TBand; +begin + inherited; + band := aQSO.QSO.band; + aQSO.QSO.points := 1; + inc(Points[band]); +end; + +procedure TALLJAScore1.Add(var aQSO : TQSO); +begin + inherited; +end; + +procedure TALLJAScore1.FormCreate(Sender: TObject); +var band : TBand; +begin + inherited; + for band := b35 to b50 do begin + QSOLabels[band] := TLabel.Create(Self); + QSOLabels[band].Parent := Panel1; + QSOLabels[band].Left := 64; + QSOLabels[band].Top := 28+16*(ord(band)-1); + QSOLabels[band].Caption := '0'; + QSOLabels[band].Alignment := taRightJustify; + MultiLabels[band] := TLabel.Create(Self); + MultiLabels[band].Parent := Panel1; + MultiLabels[band].Left := 104; + MultiLabels[band].Top := 28+16*(ord(band)-1); + MultiLabels[band].Caption := '0'; + MultiLabels[band].Alignment := taRightJustify; + end; + Update; +end; + +procedure TALLJAScore1.Button1Click(Sender: TObject); +begin + inherited; + if Self.FormStyle = fsStayOnTop then + begin + Self.FormStyle := fsNormal; + Button1.Caption := 'Stay on Top'; + end + else + begin + Self.FormStyle := fsStayOnTop; + Button1.Caption := 'Normal'; + end; +end; + +procedure TALLJAScore1.Reset; +begin + inherited; +end; + +end. diff --git a/src/UAPSprintScore.dfm b/src/UAPSprintScore.dfm new file mode 100644 index 00000000..9937f0ed Binary files /dev/null and b/src/UAPSprintScore.dfm differ diff --git a/src/UAPSprintScore.pas b/src/UAPSprintScore.pas new file mode 100644 index 00000000..d71044ca --- /dev/null +++ b/src/UAPSprintScore.pas @@ -0,0 +1,74 @@ +unit UAPSprintScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, Aligrid, StdCtrls, ExtCtrls, zLogGlobal; + +type + TAPSprintScore = class(TBasicScore) + Grid: TStringAlignGrid; + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure Reset; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + end; + +var + APSprintScore: TAPSprintScore; + +implementation + +uses UWPXMulti; + +{$R *.DFM} + +procedure TAPSprintScore.Reset; +var band : TBand; +begin + for band := b19 to HiBand do + begin + QSO[band] := 0; + Points[band] := 0; + end; +end; + +procedure TAPSprintScore.AddNoUpdate(var aQSO : TQSO); +var P : integer; + band : TBand; +begin + inherited; + + if aQSO.QSO.Dupe then + exit; + + aQSO.QSO.Points := 1; + inc(Points[aQSO.QSO.Band]); +end; + +procedure TAPSprintScore.Update; +var TotPts : LongInt; +begin + TotPts := 0; + Grid.Cells[1, 1] := IntToStr(Points[b7]); + Grid.Cells[1, 2] := IntToStr(Points[b14]); + Grid.Cells[1, 3] := IntToStr(Points[b21]); + TotPts := Points[b7] + Points[b14] + Points[b21]; + Grid.Cells[1, 4] := IntToStr(TotPts); + Grid.Cells[1, 5] := IntToStr(WPXMulti.TotalPrefix); + Grid.Cells[1, 6] := IntToStr(TotPts*WPXMulti.TotalPrefix); +end; + +procedure TAPSprintScore.FormShow(Sender: TObject); +begin + inherited; + Grid.Col := 1; + Grid.Row := 1; +end; + +end. diff --git a/src/UARRL10Multi.dfm b/src/UARRL10Multi.dfm new file mode 100644 index 00000000..61afc90a Binary files /dev/null and b/src/UARRL10Multi.dfm differ diff --git a/src/UARRL10Multi.pas b/src/UARRL10Multi.pas new file mode 100644 index 00000000..1e14a0d9 --- /dev/null +++ b/src/UARRL10Multi.pas @@ -0,0 +1,388 @@ +unit UARRL10Multi; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + zLogGlobal,UARRLDXMulti, UWWMulti, UMultipliers, Grids, Cologrid, StdCtrls, ExtCtrls, JLLabel; + +type + TARRL10Multi = class(TWWMulti) + Label1: TLabel; + Label2: TLabel; + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + private + { Private declarations } + public + { Public declarations } + StateList : TStateList; + IsUSA : boolean; + LastMulti : integer; // grid top + procedure Update; override; + procedure Add(var aQSO : TQSO); override; + procedure SortDefault; override; + procedure SortZone; override; + procedure Reset; override; + procedure RefreshGrid; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + function ValidMulti(aQSO : TQSO) : boolean; override; + procedure CheckMulti(aQSO : TQSO); override; + function GetInfoAA(aQSO : TQSO) : string; // called from spacebarproc in TAllAsianContest + function ExtractMulti(aQSO : TQSO) : string; override; + end; + +var + ARRL10Multi: TARRL10Multi; + +implementation + +uses Main, UOptions; + +{$R *.DFM} + +function TARRL10Multi.GetInfoAA(aQSO : TQSO) : string; +begin + Result := TCountry(CountryList.List[GetCountryIndex(aQSO)]).JustInfo; +end; + +procedure TARRL10Multi.CheckMulti(aQSO : TQSO); +var S : TState; + str : string; +begin + S := GetState(aQSO, StateList); + if S = nil then + str := 'Invalid state' + else + begin + str := S.StateAbbrev + ' ' + S.StateName + ' Worked in : '; + if S.Worked[b19] then str := str + 'Ph '; + if S.Worked[b35] then str := str + 'CW '; + end; + MainForm.WriteStatusLine(str, false); +end; + +function TARRL10Multi.ValidMulti(aQSO : TQSO) : boolean; +var i, j : integer; +begin + Result := False; + + if aQSO.QSO.NrRcvd = '' then + exit; + + if IsMM(aQSO.QSO.Callsign) then + begin + if (aQSO.QSO.NrRcvd = '1') or (aQSO.QSO.NrRcvd = '2') or (aQSO.QSO.NrRcvd = '3') then + Result := True + else + Result := False; + exit; + end; + + i := GetCountryIndex(aQSO); + + if (i > 0) then + if IsWVE(TCountry(CountryList.List[i]).Country) then + begin + if GetState(aQSO,StateList) <> nil then + Result := True; + end + else // not W/VE serial number + begin + try + j := StrToInt(aQSO.QSO.NrRcvd); + except + on EConvertError do + j := 0; + end; + if j > 0 then + Result := True; + end; +end; + +procedure TARRL10Multi.AddNoUpdate(var aQSO : TQSO); +var str : string; + B : TBand; + i, j : integer; + C : TCountry; + S : TState; +begin + aQSO.QSO.NewMulti1 := False; + aQSO.QSO.NewMulti2 := False; + + i := GetCountryIndex(aQSO); + + C := TCountry(CountryList.List[i]); + + if aQSO.QSO.Mode = mCW then + B := b35 + else + B := b19; + + if aQSO.QSO.Dupe then + exit; + + if IsWVE(C.Country) or IsMM(aQSO.QSO.Callsign) then + begin + S := GetState(aQSO, StateList); + if S = nil then + begin + aQSO.QSO.Multi1 := ''; + aQSO.QSO.Memo := 'INVALID EXCHANGE '+aQSO.QSO.Memo; + end + else + begin + aQSO.QSO.Multi1 := S.StateAbbrev; + if S.Worked[B] = False then + begin + S.Worked[B] := True; + aQSO.QSO.NewMulti1 := True; + LastMulti := S.Index; + end; + end; + end + else + begin + aQSO.QSO.Multi1 := C.Country; + if C.Worked[B] = False then + begin + C.Worked[B] := True; + aQSO.QSO.NewMulti1 := True; + LastMulti := C.GridIndex; + //Grid.Cells[0,C.GridIndex] := C.SummaryARRL10; + end; + end; + +end; + + + +procedure TARRL10Multi.FormCreate(Sender: TObject); +var i : integer; + aQSO : TQSO; + S : TState; +begin + {inherited; } + LastMulti := 0; + StateList := TStateList.Create; + StateList.LoadFromFile('ARRL10.DAT'); + + S := TState.Create; + S.StateAbbrev := '1'; + S.AltAbbrev := '1'; + S.StateName := 'ITU Reg. 1'; + S.Index := StateList.List.Count; + StateList.List.Add(S); + S := TState.Create; + S.StateAbbrev := '2'; + S.AltAbbrev := '2'; + S.StateName := 'ITU Reg. 2'; + S.Index := StateList.List.Count; + StateList.List.Add(S); + S := TState.Create; + S.StateAbbrev := '3'; + S.AltAbbrev := '3'; + S.StateName := 'ITU Reg. 3'; + S.Index := StateList.List.Count; + StateList.List.Add(S); + + CountryList := TCountryList.Create; + PrefixList := TPrefixList.Create; + + //LoadCountryDataFromFile('DXCC.DAT'); + + if FileExists('CTY.DAT') then + begin + LoadCTY_DAT(testIARU, CountryList, PrefixList); + MainForm.WriteStatusLine('Loaded CTY.DAT', true); + end + else + LoadCountryDataFromFile('DXCC.DAT', CountryList, PrefixList); + + + if CountryList.List.Count = 0 then exit; + {for i := 0 to CountryList.List.Count-1 do + begin + ListBox.Items.Add(TCountry(CountryList.List[i]).Summary); + end;} + Reset; + MyContinent := 'AS'; + MyCountry := 'JA'; + IsUSA := False; + if (Options.Settings._mycall <> '') and (Options.Settings._mycall <> 'Your callsign') then + begin + aQSO := TQSO.Create; + aQSO.QSO.callsign := Uppercase(Options.Settings._mycall); + i := GetCountryIndex(aQSO); + if i > 0 then + begin + MyCountry := TCountry(CountryList.List[i]).Country; + MyContinent := TCountry(CountryList.List[i]).Continent; + if (MyCountry = 'K') or (MyCountry = 'N') or (MyCountry = 'W') then + IsUSA := True; + end; + aQSO.Free; + end; +end; + +procedure TARRL10Multi.SortZone; +begin +end; + +procedure TARRL10Multi.SortDefault; +var B : TBand; + i, j, offset : integer; + S : string; +begin + if StateList.List.Count = 0 then exit; + j := Grid.TopRow; + Grid.RowCount := 0; + Grid.RowCount := StateList.List.Count + CountryList.List.Count; + + for i := 0 to StateList.List.Count-1 do + begin + S := TState(StateList.List[i]).SummaryARRL10; + //Grid.Cells[0,i] := S; + TState(StateList.List[i]).Index := i; + GridReverse[i] := i; + end; + + offset := StateList.List.Count; + + if CountryList.List.Count = 0 then exit; + for i := 0 to CountryList.List.Count - 1 do + begin + //Grid.Cells[0,i + offset] := TCountry(CountryList.List[i]).SummaryARRL10; + TCountry(CountryList.List[i]).GridIndex := i + offset; + GridReverse[i + offset] := i; + end; + Grid.TopRow := j; +end; + +procedure TARRL10Multi.Update; +begin + SortDefault; + RefreshGrid; + //RefreshZone; + RenewCluster; + RenewBandScope; +end; + +procedure TARRL10Multi.Add(var aQSO : TQSO); +begin + AddNoUpdate(aQSO); + Grid.TopRow := LastMulti; +{ + if (aQSO.QSO.Reserve2 <> $AA) and (MostRecentCty <> nil) then + Grid.TopRow := MostRecentCty.GridIndex; +} + RefreshGrid; + //RefreshZone; + AddSpot(aQSO); + +end; + + + +procedure TARRL10Multi.Reset; +var B : TBand; + i : integer; +begin + for i := 0 to StateList.List.Count-1 do + for B := b19 to HiBand do + TState(StateList.List[i]).Worked[B] := false; + for i := 0 to CountryList.List.Count-1 do + for B := b19 to HiBand do + TCountry(CountryList.List[i]).Worked[B] := false; +{ case SortBy.ItemIndex of + 0 : SortDefault; + 1 : SortZone; + end; } + SortDefault; +end; + + + +procedure TARRL10Multi.FormShow(Sender: TObject); +begin +// inherited; + RefreshGrid; +end; + +procedure TARRL10Multi.GridSetting(ARow, Acol: Integer; + var Fcolor: Integer; var Bold, Italic, underline: Boolean); +var B : TBand; +begin + if Main.CurrentQSO.QSO.Mode = mCW then + B := b35 + else + B := b19; + if ARow < StateList.List.Count then + begin + if TState(StateList.List[ARow]).Worked[B] then + FColor := clRed + else + FColor := clBlack; + end + else + begin + if pos('N/A',Grid.Cells[ACol, ARow]) > 2 then + FColor := clGray + else + if TCountry(CountryList.List[GridReverse[ARow]]).Worked[B] then + FColor := clRed + else + FColor := clBlack; + end; +end; + +procedure TARRL10Multi.RefreshGrid; +var i , k : integer; +begin + for i := Grid.TopRow to Grid.TopRow + Grid.VisibleRowCount - 1 do + begin + if (i > Grid.RowCount - 1) then + begin + exit; + end + else + begin + k := GridReverse[i]; + if (i >= 0) and (i < StateList.List.Count) then + begin + Grid.Cells[0, i] := TState(StateList.List[k]).SummaryARRL10; + end + else + if (i >= StateList.List.Count) and (i < CountryList.List.Count + StateList.List.Count) then + begin + Grid.Cells[0, i] := TCountry(CountryList.List[k]).Summary + end + else + Grid.Cells[0, i] := ''; + end; + end; +end; + +function TARRL10Multi.ExtractMulti(aQSO : TQSO) : string; +var i : integer; + C : TCountry; + S : TState; +begin + Result := ''; + i := GetCountryIndex(aQSO); + C := TCountry(CountryList.List[i]); + if IsWVE(C.Country) or IsMM(aQSO.QSO.Callsign) then + begin + S := GetState(aQSO, StateList); + if S <> nil then + Result := S.StateAbbrev; + end + else + begin + Result := C.Country; + end; +end; + +end. diff --git a/src/UARRL10Score.dfm b/src/UARRL10Score.dfm new file mode 100644 index 00000000..e4ebdd42 Binary files /dev/null and b/src/UARRL10Score.dfm differ diff --git a/src/UARRL10Score.pas b/src/UARRL10Score.pas new file mode 100644 index 00000000..7fe43afb --- /dev/null +++ b/src/UARRL10Score.pas @@ -0,0 +1,95 @@ +unit UARRL10Score; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, Cologrid, StdCtrls, ExtCtrls, zLogGlobal; + +type + TARRL10Score = class(TBasicScore) + Grid: TMgrid; + procedure FormCreate(Sender: TObject); + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + private + { Private declarations } + public + { Public declarations } + procedure Update; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + end; + +var + ARRL10Score: TARRL10Score; + +implementation + +{$R *.DFM} + +procedure TARRL10Score.Update; +begin + Grid.Cells[1,0] := IntToStr(QSO[b28]); + Grid.Cells[1,1] := IntToStr(QSO[b28] - CWQSO[b28]); + Grid.Cells[1,2] := IntToStr(CWQSO[b28]); + Grid.Cells[1,3] := IntToStr(Points[b28]); + Grid.Cells[1,4] := IntToStr(Multi[b28]); + Grid.Cells[1,5] := IntToStr(Points[b28]*Multi[b28]); +end; + +procedure TARRL10Score.AddNoUpdate(var aQSO : TQSO); +var i : integer; +begin + {BasicScore.AddNoUpdate(aQSO);} + inherited; + aQSO.QSO.Points := 0; + if aQSO.QSO.Dupe then + exit; + if aQSO.QSO.Mode = mCW then + begin + i := length(aQSO.QSO.Callsign) - 1; + if (pos('/N', aQSO.QSO.Callsign) = i) or (pos('/T', aQSO.QSO.Callsign) = i) then + aQSO.QSO.Points := 8 // novice or technician cw qso : 8pts + else + aQSO.QSO.Points := 4; + end + else + if aQSO.QSO.Mode in [mSSB, mFM, mAM] then + begin + aQSO.QSO.Points := 2; + end; + inc(Points[b28], aQSO.QSO.Points); +end; + + +procedure TARRL10Score.FormCreate(Sender: TObject); +begin + inherited; + with Grid do + begin + RowCount := 6; + ColCount := 2; + Cells[0,0] := 'QSO'; + Cells[0,1] := 'Ph'; + Cells[0,2] := 'CW'; + Cells[0,3] := 'Pts'; + Cells[0,4] := 'Multi'; + Cells[0,5] := 'Score'; + ColWidths[1] := 80; + Height := GridHeight; + Width := GridWidth; + end; + ClientHeight := Grid.Height + Panel1.Height+ 10; +end; + +procedure TARRL10Score.GridSetting(ARow, Acol: Integer; + var Fcolor: Integer; var Bold, Italic, underline: Boolean); +begin + inherited; + if ACol = 0 then + FColor := clBlue + else + FColor := clBlack; +end; + +end. diff --git a/src/UARRLDXMulti.dfm b/src/UARRLDXMulti.dfm new file mode 100644 index 00000000..1a309093 Binary files /dev/null and b/src/UARRLDXMulti.dfm differ diff --git a/src/UARRLDXMulti.pas b/src/UARRLDXMulti.pas new file mode 100644 index 00000000..fe55ce9b --- /dev/null +++ b/src/UARRLDXMulti.pas @@ -0,0 +1,325 @@ +unit UARRLDXMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UACAGMulti, StdCtrls, checklst, JLLabel, ExtCtrls, zLogGlobal, Grids, + Cologrid; + +type + TState = class + StateName : string[23]; + StateAbbrev : string[3]; + AltAbbrev : string[80]; + Worked : array[b19..HiBand] of boolean; + Index : integer; + constructor Create; + function Summary : string; + function Summary2 : string; + function SummaryARRL10 : string; + end; + + TStateList = class + List : TList; + constructor Create; + procedure LoadFromFile(filename : string); + destructor Destroy; override; + end; + + + +type + TARRLDXMulti = class(TACAGMulti) + procedure FormCreate(Sender: TObject); + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + procedure GoButtonClick2(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + StateList : TStateList; + function ExtractMulti(aQSO : TQSO) : string; override; + procedure Update; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure CheckMulti(aQSO : TQSO); override; + procedure Reset; override; + function ValidMulti(aQSO : TQSO) : boolean; override; + end; + +function GetState(aQSO : TQSO; SL : TStateList) : TState; + +var + ARRLDXMulti: TARRLDXMulti; + +implementation + +uses Main; + +{$R *.DFM} + +function GetState(aQSO : TQSO; SL : TStateList) : TState; +var i : integer; + str : string; + S : TState; +begin + Result := nil; + str := aQSO.QSO.NrRcvd; + for i := 0 to SL.List.Count-1 do + begin + S := TState(SL.List[i]); + if pos(','+str+',', ','+S.AltAbbrev+',') > 0 then + begin + Result := S; + exit; + end; + end; +end; + +function TARRLDXMulti.ExtractMulti(aQSO : TQSO) : string; +var str : string; + S : TState; +begin + S := GetState(aQSO, StateList); + if S <> nil then + begin + str := S.StateAbbrev; + end + else + begin + str := ''; + end; + Result := str; +end; + +function TARRLDXMulti.ValidMulti(aQSO : TQSO) : boolean; +begin + if GetState(aQSO, StateList) <> nil then + Result := True + else + Result := False; +end; + +procedure TARRLDXMulti.Reset; +var i, j : integer; + B : TBand; + str : string; +begin + if StateList.List.Count = 0 then exit; + j := Grid.TopRow; + Grid.RowCount := 0; + Grid.RowCount := StateList.List.Count; + for i := 0 to StateList.List.Count-1 do + begin + for B := b19 to HiBand do + TState(StateList.List[i]).Worked[B] := false; + str := TState(StateList.List[i]).Summary; + Grid.Cells[0,i] := str; + end; + Grid.TopRow := j; +end; + +procedure TARRLDXMulti.CheckMulti(aQSO : TQSO); +var str : string; + i : integer; + S : TState; +begin + S := GetState(aQSO, StateList); + if S = nil then + begin + MainForm.WriteStatusLine('Invalid number', false); + exit; + end; + str := S.Summary2; + if S.Worked[aQSO.QSO.Band] then + Insert('Worked on this band. ',str, 27) + else + Insert('Needed on this band. ',str, 27); + MainForm.WriteStatusLine(str, false); +end; + +procedure TARRLDXMulti.AddNoUpdate(var aQSO : TQSO); +var str : string; + B : TBand; + j : integer; + S : TState; +begin + aQSO.QSO.NewMulti1 := False; + + if aQSO.QSO.Dupe then + exit; + + S := GetState(aQSO, StateList); + if S <> nil then + begin + aQSO.QSO.Multi1 := S.StateAbbrev; + if S.Worked[aQSO.QSO.Band] = false then + begin + S.Worked[aQSO.QSO.band] := True; + aQSO.QSO.NewMulti1 := True; + end; + end + else + begin + aQSO.QSO.Multi1 := ''; + aQSO.QSO.Memo := 'INVALID EXCHANGE '+aQSO.QSO.Memo; + end; +end; + +constructor TState.Create; +var B : TBand; +begin + for B := b19 to HiBand do + Worked[B] := False; + StateName := ''; + StateAbbrev := ''; + AltAbbrev := ''; + Index := 0; +end; + +function TState.Summary : string; +var temp : string; + B : TBand; +begin + temp := ''; + temp := FillRight(StateName,22)+FillRight(StateAbbrev,4)+' '; + for B := b19 to b28 do + if NotWARC(B) then + if Worked[B] then + temp := temp + '* ' + else + temp := temp + '. '; + Result := ' ' + temp; +end; + +function TState.SummaryARRL10 : string; +var temp : string; + B : TBand; +begin + temp := ' '+FillRight(StateAbbrev,7)+FillRight(StateName,32); + for B := b19 to b35 do + if Worked[B] then + temp := temp + '* ' + else + temp := temp + '. '; + Result := temp; +end; + +function TState.Summary2 : string; +var temp : string; + B : TBand; +begin + temp := ''; + temp := FillRight(StateName,22)+FillRight(StateAbbrev,4); + for B := b19 to b28 do + if Worked[B] then + temp := temp + ' '+MHzString[B] + else + temp := temp + ''; + Result := temp; +end; + +constructor TStateList.Create; +begin + List := TList.Create; +end; + +destructor TStateList.Destroy; +var i : integer; +begin + for i := 0 to List.Count - 1 do + begin + if List[i] <> nil then + TState(List[i]).Free; + end; + List.Free; +end; + +procedure TStateList.LoadFromFile(filename : string); +var f : textfile; + str : string; + S : TState; +begin + assign(f, filename); + try + reset(f); + except + on EFOpenError do + begin + exit; {Alert that the file cannot be opened \\} + end; + end; + readln(f, str); + while not(eof(f)) do + begin + readln(f, str); + if Pos('end of file', LowerCase(str))>0 then break; + S := TState.Create; + S.Index := List.Count; + S.StateName := TrimRight(Copy(str, 1, 22)); + S.StateAbbrev := TrimLeft(TrimRight(Copy(str, 30, 25))); + if not(eof(f)) then + begin + readln(f, str); + str := TrimRight(str); + str := TrimLeft(str); + if not(str[length(str)] in ['a'..'z','A'..'Z','0'..'9']) then + System.Delete(str,length(str),1); + S.AltAbbrev := str; + end; + List.Add(S); + end; +end; + + + +procedure TARRLDXMulti.FormCreate(Sender: TObject); +begin + //inherited; + StateList := TStateList.Create; + StateList.LoadFromFile('ARDX.DAT'); + Reset; +end; + +procedure TARRLDXMulti.Update; +var i : integer; + str : string; +begin + for i := 0 to StateList.List.Count-1 do + begin + str := TState(StateList.List[i]).Summary; + Grid.Cells[0,i] := str; + end; +end; + + +procedure TARRLDXMulti.GridSetting(ARow, Acol: Integer; + var Fcolor: Integer; var Bold, Italic, underline: Boolean); +var B : TBand; +begin + //inherited; + B := Main.CurrentQSO.QSO.Band; + if TState(StateList.List[ARow]).Worked[B] then + FColor := clRed + else + FColor := clBlack; +end; + +procedure TARRLDXMulti.GoButtonClick2(Sender: TObject); +var i : integer; + str : string; +begin + if StateList.List.Count = 0 then exit; + for i := 0 to StateList.List.Count-1 do + begin + str := TState(StateList.List[i]).Summary; + if pos(Edit1.Text,str)=1 then + begin + Grid.TopRow := i; + exit; + end; + end; +end; + +end. diff --git a/src/UARRLDXScore.dfm b/src/UARRLDXScore.dfm new file mode 100644 index 00000000..88238e62 Binary files /dev/null and b/src/UARRLDXScore.dfm differ diff --git a/src/UARRLDXScore.pas b/src/UARRLDXScore.pas new file mode 100644 index 00000000..cd685914 --- /dev/null +++ b/src/UARRLDXScore.pas @@ -0,0 +1,99 @@ +unit UARRLDXScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, Aligrid, StdCtrls, ExtCtrls, zLogGlobal; + +type + TARRLDXScore = class(TBasicScore) + Grid: TStringAlignGrid; + private + { Private declarations } + public + { Public declarations } + procedure Renew; override; + procedure Reset; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + procedure CalcPoints(var aQSO : TQSO); virtual; + end; + +var + ARRLDXScore: TARRLDXScore; + +implementation + +{$R *.DFM} + +procedure TARRLDXScore.Renew; +var i : word; + band : TBand; +begin + Reset; + for i := 1 to Log.TotalQSO do + begin + band := TQSO(Log.List[i]).QSO.band; + inc(QSO[band]); + inc(Points[band],TQSO(Log.List[i]).QSO.Points); + if TQSO(Log.List[i]).QSO.NewMulti1 then + inc(Multi[band]); + end; +end; + +procedure TARRLDXScore.Reset; +var band : TBand; +begin + for band := b19 to HiBand do + begin + QSO[band] := 0; + CWQSO[band] := 0; + Points[band] := 0; + Multi[band] := 0; + end; +end; + +procedure TARRLDXScore.CalcPoints(var aQSO : TQSO); +begin + aQSO.QSO.Points := 3; +end; + +procedure TARRLDXScore.AddNoUpdate(var aQSO : TQSO); +begin + inherited; + + if aQSO.QSO.Dupe then + exit; + + CalcPoints(aQSO); + inc(Points[aQSO.QSO.Band], aQSO.QSO.Points); +end; + +procedure TARRLDXScore.Update; +var band : TBand; + TotQSO, TotPts, TotMulti : LongInt; + row : integer; +begin + TotQSO := 0; TotPts := 0; TotMulti := 0; + row := 1; + for band := b19 to b28 do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(QSO[band]); + TotQSO := TotQSO + QSO[band]; + Grid.Cells[2,row] := IntToStr(Points[band]); + TotPts := TotPts + Points[band]; + Grid.Cells[3,row] := IntToStr(Multi[band]); + TotMulti := TotMulti + Multi[band]; + inc(row); + end; + end; + Grid.Cells[1, 7] := IntToStr(TotQSO); + Grid.Cells[2, 7] := IntToStr(TotPts); + Grid.Cells[3, 7] := IntToStr(TotMulti); + Grid.Cells[3, 8] := IntToStr(TotPts*TotMulti); +end; + +end. diff --git a/src/UARRLWMulti.dfm b/src/UARRLWMulti.dfm new file mode 100644 index 00000000..b6ae9b55 Binary files /dev/null and b/src/UARRLWMulti.dfm differ diff --git a/src/UARRLWMulti.pas b/src/UARRLWMulti.pas new file mode 100644 index 00000000..56539b74 --- /dev/null +++ b/src/UARRLWMulti.pas @@ -0,0 +1,161 @@ +unit UARRLWMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UWWMulti, UMultipliers, StdCtrls, ExtCtrls, JLLabel, zLogGlobal, Grids, Cologrid; + +type + TARRLWMulti = class(TWWMulti) + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + ALLASIANFLAG : boolean; + procedure AddNoUpdate(var aQSO : TQSO); override; + function ValidMulti(aQSO : TQSO) : boolean; override; + procedure CheckMulti(aQSO : TQSO); override; + function GetInfoAA(aQSO : TQSO) : string; // called from spacebarproc in TAllAsianContest + end; + +var + ARRLWMulti: TARRLWMulti; + +implementation + +uses UOptions, Main; + +{$R *.DFM} + +function TARRLWMulti.GetInfoAA(aQSO : TQSO) : string; +begin + Result := TCountry(CountryList.List[GetCountryIndex(aQSO)]).JustInfo; +end; + +procedure TARRLWMulti.CheckMulti(aQSO : TQSO); +var str : string; + i : integer; + B : TBand; +begin +end; + +function TARRLWMulti.ValidMulti(aQSO : TQSO) : boolean; +begin + if aQSO.QSO.NrRcvd <> '' then + Result := True + else + Result := False; +end; + +procedure TARRLWMulti.AddNoUpdate(var aQSO : TQSO); +var str : string; + B : TBand; + i, j : integer; + C : TCountry; +begin + aQSO.QSO.NewMulti1 := False; + aQSO.QSO.NewMulti2 := False; + + i := GetCountryIndex(aQSO); + + C := TCountry(CountryList.List[i]); + aQSO.QSO.Multi1 := C.Country; + + if aQSO.QSO.Dupe then + exit; + + if ALLASIANFLAG = True then + begin + aQSO.QSO.Points := 0; + //MainForm.Caption := C.Country+';'+MyCOuntry+';'; + if C.Country = MyCountry then + begin + aQSO.QSO.Points := 0; + exit; + end + else + begin + if C.Continent = 'AS' then + begin + case aQSO.QSO.Band of + b19 : aQSO.QSO.Points := 3; + b35, b28 : aQSO.QSO.Points := 2; + else + aQSO.QSO.Points := 1; + end; + end + else + begin + case aQSO.QSO.Band of + b19 : aQSO.QSO.Points := 9; + b35, b28 : aQSO.QSO.Points := 6; + else + aQSO.QSO.Points := 3; + end; + end; + end; + end; + + + B := aQSO.QSO.Band; + + if C.Worked[B] = False then + begin + C.Worked[B] := True; + aQSO.QSO.NewMulti1 := True; + //Grid.Cells[0,C.GridIndex] := C.Summary; + end; +end; + +procedure TARRLWMulti.FormCreate(Sender: TObject); +var i : integer; + aQSO : TQSO; +begin + {inherited; } + ALLASIANFLAG := False; + CountryList := TCountryList.Create; + PrefixList := TPrefixList.Create; + + //LoadCountryDataFromFile('DXCC.DAT'); + + if FileExists('CTY.DAT') then + begin + LoadCTY_DAT(testIARU, CountryList, PrefixList); + MainForm.WriteStatusLine('Loaded CTY.DAT', true); + end + else + LoadCountryDataFromFile('DXCC.DAT', CountryList, PrefixList); + + + if CountryList.List.Count = 0 then exit; + {for i := 0 to CountryList.List.Count-1 do + begin + ListBox.Items.Add(TCountry(CountryList.List[i]).Summary); + end;} + Reset; + MyContinent := 'AS'; + MyCountry := 'JA'; + + if (Options.Settings._mycall <> '') and (Options.Settings._mycall <> 'Your callsign') then + begin + aQSO := TQSO.Create; + aQSO.QSO.callsign := UpperCase(Options.Settings._mycall); + i := GetCountryIndex(aQSO); + if i > 0 then + begin + MyCountry := TCountry(CountryList.List[i]).Country; + MyContinent := TCountry(CountryList.List[i]).Continent; + end; + aQSO.Free; + end; +end; + +procedure TARRLWMulti.FormShow(Sender: TObject); +begin + // inherited; +end; + +end. diff --git a/src/UAbout.dfm b/src/UAbout.dfm new file mode 100644 index 00000000..f4379b85 Binary files /dev/null and b/src/UAbout.dfm differ diff --git a/src/UAbout.pas b/src/UAbout.pas new file mode 100644 index 00000000..8f9ca3b1 --- /dev/null +++ b/src/UAbout.pas @@ -0,0 +1,58 @@ +unit UAbout; + +interface + +uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, + Buttons, ExtCtrls, zLogGlobal, BGK32LIB; + +type + TAboutBox = class(TForm) + Panel1: TPanel; + ProgramIcon: TImage; + ProductName: TLabel; + Version: TLabel; + Copyright: TLabel; + Comments: TLabel; + OKButton: TButton; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + procedure OKButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + AboutBox: TAboutBox; + +implementation + +{$R *.DFM} + +procedure TAboutBox.OKButtonClick(Sender: TObject); +begin + Close; +end; + +procedure TAboutBox.FormShow(Sender: TObject); +var temp : string; +begin + Label2.Caption := TQSO(Log.List[0]).QSO.memo; + Str(BGK32LIB.GetVersion : 3:2, temp); + //BGK32DLL.Caption := 'BGK32.DLL version '+temp; +end; + +procedure TAboutBox.FormCreate(Sender: TObject); +begin +{$ifdef w95} + Version.Caption := Version.Caption + ' /w95'; +{$endif} +end; + +end. + diff --git a/src/UAgeDialog.dfm b/src/UAgeDialog.dfm new file mode 100644 index 00000000..b49e6ada Binary files /dev/null and b/src/UAgeDialog.dfm differ diff --git a/src/UAgeDialog.pas b/src/UAgeDialog.pas new file mode 100644 index 00000000..e1899fb9 --- /dev/null +++ b/src/UAgeDialog.pas @@ -0,0 +1,43 @@ +unit UAgeDialog; + +interface + +uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, + Buttons, ExtCtrls; + +type + TAgeDialog = class(TForm) + OKBtn: TButton; + Bevel2: TBevel; + Edit1: TEdit; + Label1: TLabel; + procedure OKBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + AgeDialog: TAgeDialog; + +implementation + +uses UOptions; + +{$R *.DFM} + + +procedure TAgeDialog.OKBtnClick(Sender: TObject); +begin + Options.Settings._age := Edit1.Text; + Close; +end; + +procedure TAgeDialog.FormShow(Sender: TObject); +begin + Edit1.SetFocus; +end; + +end. diff --git a/src/UAllAsianScore.dfm b/src/UAllAsianScore.dfm new file mode 100644 index 00000000..b853d61d Binary files /dev/null and b/src/UAllAsianScore.dfm differ diff --git a/src/UAllAsianScore.pas b/src/UAllAsianScore.pas new file mode 100644 index 00000000..f8150b5f --- /dev/null +++ b/src/UAllAsianScore.pas @@ -0,0 +1,66 @@ +unit UAllAsianScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UIARUScore, Grids, Cologrid, StdCtrls, ExtCtrls, zLogGlobal, Buttons; + +type + TAllAsianScore = class(TIARUScore) + private + { Private declarations } + public + { Public declarations } + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure CalcPoints(var aQSO : TQSO); + end; + +var + AllAsianScore: TAllAsianScore; + +implementation + +{$R *.DFM} + +procedure TAllAsianScore.CalcPoints(var aQSO : TQSO); +begin + case aQSO.QSO.Band of + b19 : aQSO.QSO.Points := 3; + b35 : aQSO.QSO.Points := 2; + else + aQSO.QSO.Points := 1; + end; +end; + +procedure TAllAsianScore.AddNoUpdate(var aQSO : TQSO); +var B : TBand; +begin + //BasicScore.AddNoUpdate(aQSO); + B := aQSO.QSO.band; + inc(QSO[B]); + if aQSO.QSO.mode = mCW then + inc(CWQSO[B]); + if aQSO.QSO.NewMulti1 then + inc(Multi[B]); + //inherited; + //aQSO.QSO.Points := 0; + if aQSO.QSO.Dupe then + exit; + //B := aQSO.QSO.band; + //CalcPoints(aQSO); + { + case B of + b19 : aQSO.QSO.Points := 3; + b35 : aQSO.QSO.Points := 2; + else + aQSO.QSO.Points := 1; + end; + } + {if aQSO.QSO.NewMulti2 then + inc(Multi2[band]);} + inc(Points[B], aQSO.QSO.Points); +end; + + +end. diff --git a/src/UBGKMonitorThread.pas b/src/UBGKMonitorThread.pas new file mode 100644 index 00000000..f243d1a4 --- /dev/null +++ b/src/UBGKMonitorThread.pas @@ -0,0 +1,63 @@ +unit UBGKMonitorThread; + +interface + +uses + Classes, BGK32LIB, Windows, Main; + +type + TBGKMonitorThread = class(TThread) + private + { Private declarations } + protected + procedure Execute; override; + public + constructor Create; + procedure DotheJob; + end; + +var BGKMonitorThread : TBGKMonitorThread; + +implementation + +{ Important: Methods and properties of objects in VCL can only be used in a + method called using Synchronize, for example, + + Synchronize(UpdateCaption); + + and UpdateCaption could look like, + + procedure TBGKMonitorThread.UpdateCaption; + begin + Form1.Caption := 'Updated in a thread'; + end; } + +{ TBGKMonitorThread } + +constructor TBGKMonitorThread.Create; +begin + FreeOnTerminate := True; + inherited Create(False); +end; + +procedure TBGKMonitorThread.DotheJob; +begin + MainForm.CallsignSentProc; +end; + +procedure TBGKMonitorThread.Execute; +begin + repeat + SleepEx(2, False); + if BGK32Lib.CallsignSent then + begin + Synchronize(DotheJob); + end; + //PaddleProcess; + until Terminated; +end; + +initialization + //BGKMonitorThread := nil; + BGKMonitorThread := TBGKMonitorThread.Create; +end. diff --git a/src/UBandScope2.dfm b/src/UBandScope2.dfm new file mode 100644 index 00000000..cec08b5a --- /dev/null +++ b/src/UBandScope2.dfm @@ -0,0 +1,125 @@ +object BandScope2: TBandScope2 + Left = 48 + Top = 125 + Width = 146 + Height = 454 + Caption = 'Band Scope' + Color = clBtnFace + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + OldCreateOrder = False + OnClose = FormClose + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 12 + object Panel1: TPanel + Left = 0 + Top = 0 + Width = 138 + Height = 25 + Align = alTop + TabOrder = 0 + Visible = False + end + object Grid: TMgrid + Left = 0 + Top = 25 + Width = 138 + Height = 395 + Align = alClient + ColCount = 1 + DefaultColWidth = 500 + DefaultRowHeight = 14 + FixedCols = 0 + FixedRows = 0 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #65325#65331' '#12468#12471#12483#12463 + Font.Pitch = fpFixed + Font.Style = [] + GridLineWidth = 0 + Options = [goRangeSelect, goRowSelect, goThumbTracking] + ParentFont = False + Popupmenu = BSMenu + ScrollBars = ssVertical + TabOrder = 1 + OnDblClick = GridDblClick + Alignment = taLeftJustify + BorderColor = clSilver + OddRowColor = clWindow + EvenRowColor = clWindow + OnSetting = GridSetting + end + object BSMenu: TPopupMenu + AutoHotkeys = maManual + AutoLineReduction = maManual + Left = 432 + Top = 24 + object mnDelete: TMenuItem + Caption = 'Delete' + OnClick = mnDeleteClick + end + object Deleteallworkedstations1: TMenuItem + Caption = 'Delete all worked stations' + OnClick = Deleteallworkedstations1Click + end + object Mode1: TMenuItem + Caption = 'Mode...' + object mnCurrentRig: TMenuItem + Caption = 'Current Rig' + OnClick = ModeClick + end + object Rig11: TMenuItem + Tag = 1 + Caption = 'Rig 1' + OnClick = ModeClick + end + object Rig21: TMenuItem + Tag = 2 + Caption = 'Rig 2' + OnClick = ModeClick + end + object Fixedband1: TMenuItem + Caption = 'Fixed band' + object N19MHz1: TMenuItem + Caption = '1.9 MHz' + OnClick = FixedBandClick + end + object N35MHz1: TMenuItem + Tag = 1 + Caption = '3.5 MHz' + OnClick = FixedBandClick + end + object N7MHz1: TMenuItem + Tag = 2 + Caption = '7 MHz' + OnClick = FixedBandClick + end + object N14MHz1: TMenuItem + Tag = 4 + Caption = '14 MHz' + OnClick = FixedBandClick + end + object N21MHz1: TMenuItem + Tag = 6 + Caption = '21 MHz' + OnClick = FixedBandClick + end + object N28MHz1: TMenuItem + Tag = 8 + Caption = '28 MHz' + OnClick = FixedBandClick + end + object N50MHz1: TMenuItem + Tag = 9 + Caption = '50 MHz' + OnClick = FixedBandClick + end + end + end + end +end diff --git a/src/UBandScope2.pas b/src/UBandScope2.pas new file mode 100644 index 00000000..c1a8336a --- /dev/null +++ b/src/UBandScope2.pas @@ -0,0 +1,499 @@ +unit UBandScope2; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, ExtCtrls, StdCtrls, Grids, Cologrid, uSpotClass, zLogGlobal, + Menus; + +type + TBandScope2 = class(TForm) + Panel1: TPanel; + Grid: TMgrid; + BSMenu: TPopupMenu; + mnDelete: TMenuItem; + Deleteallworkedstations1: TMenuItem; + Mode1: TMenuItem; + mnCurrentRig: TMenuItem; + Rig11: TMenuItem; + Rig21: TMenuItem; + Fixedband1: TMenuItem; + N19MHz1: TMenuItem; + N35MHz1: TMenuItem; + N7MHz1: TMenuItem; + N14MHz1: TMenuItem; + N21MHz1: TMenuItem; + N28MHz1: TMenuItem; + N50MHz1: TMenuItem; + procedure CreateParams(var Params: TCreateParams); override; + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + procedure mnDeleteClick(Sender: TObject); + procedure Deleteallworkedstations1Click(Sender: TObject); + procedure ModeClick(Sender: TObject); + procedure FixedBandClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure GridDblClick(Sender: TObject); + private + { Private 錾 } + MinFreq, MaxFreq : Integer; // in Hz + + curr : integer; // test variable + ClickedIndex : integer; // points to the bsdata clicked by mouse + + currFreq : Integer; + currBand : TBand; + currMode : TMode; + + GridColorArray : array[0..999] of TColor; + GridBoldArray : array[0..999] of Boolean; + procedure AddBSList(D : TBSData); + public + { Public 錾 } + ArrayNumber : integer; + DisplayMode : integer; // 0 : current rig; 1 : rig 1; 2 : rig 2; 9 : fixed band + FixedBand : TBand; + procedure DeleteFromBSList(i : integer); + procedure CreateBSData(aQSO : TQSO; Hz : LongInt); + procedure AddAndDisplay(D : TBSData); + procedure SetBandMode(B : TBand; M : TMode); + procedure SetMinMaxFreq(min, max : LongInt); + procedure RewriteBandScope; + procedure MarkCurrentFreq(Hz : integer); + procedure ProcessBSDataFromNetwork(BSText : string); + end; + +procedure BSRefresh(Sender : TObject); + +const BSMax = 15; +var + CurrentRigFrequency : Integer; // in Hertz + BandScope2 : TBandScope2; + BandScopeArray : array[1..BSMax] of TBandscope2; + +implementation + +uses UOptions, Main, UZLinkForm, URigControl; + + + +{$R *.dfm} + +procedure BSRefresh(Sender : TObject); +var i : integer; + DispMode : integer; + RR : TRig; +begin + BandScope2.RewriteBandScope; + for i := 1 to BSMax do + if BandScopeArray[i] <> nil then + begin + DispMode := BandScopeArray[i].DisplayMode; + RR := nil; + case DispMode of + 1 : RR := RigControl.Rig1; + 2 : RR := RigControl.Rig2; + end; + if RR <> nil then + BandScopeArray[i].SetBandMode(RR._currentband, RR._currentmode) + else + BandScopeArray[i].RewriteBandScope; + end; +end; + +procedure TBandScope2.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TBandScope2.AddBSList(D : TBSData); +var i : integer; + boo : boolean; +begin + if BSList2.Count = 0 then + begin + BSList2.Add(D); + exit; + end; + boo := false; + for i := 0 to BSList2.Count - 1 do + if TBSData(BSList2[i]).FreqHz > D.FreqHz then + begin + boo := true; + break; + end; + if boo then + BSList2.Insert(i, D) + else + BSList2.Add(D); +end; + + +procedure TBandScope2.AddAndDisplay(D : TBSData); +var i : integer; + BS : TBSData; + Diff : TDateTime; +label endofloop; +begin + for i := 0 to BSList2.Count - 1 do + begin + BS := TBSData(BSList2[i]); + if (BS.Call = D.Call) and (BS.Band = D.Band) then + begin + BS.Free; + BSList2[i] := nil; + goto endofloop; + end; + if round(BS.FreqHz / 100) = round(D.FreqHz / 100) then + begin + BS.Free; + BSList2[i] := nil; + goto endofloop; + end; + Diff := Now - BS.Time; + if Diff*24*60 > 1.00*Options.Settings._bsexpire then + begin + BS.Free; + BSList2[i] := nil; + end; + endofloop: + end; + BSList2.Pack; + AddBSList(D); + //FormPaint(Self); + BSRefresh(Self); +end; + + +procedure TBandScope2.CreateBSData(aQSO : TQSO; Hz : LongInt); +var D : TBSData; +begin + D := TBSData.Create; + D.FreqHz := Hz; + D.Band := aQSO.QSO.Band; + D.Mode := aQSO.QSO.Mode; + D.Call := aQSO.QSO.Callsign; + D.Number := aQSO.QSO.NrRcvd; + //D.Time := Now; + Main.MyContest.MultiForm.ProcessSpotData(TBaseSpot(D)); + AddAndDisplay(D); + ZLinkForm.SendBandScopeData(D.InText); + //Send spot data to other radios! +end; + +procedure TBandScope2.SetBandMode(B : TBand; M : TMode); +var min, max : integer; +begin + currBand := B; + currMode := M; + Caption := 'Band scope '+BandString[B]; + RewriteBandScope; +end; + +procedure TBandScope2.SetMinMaxFreq(min, max : LongInt); +begin + MinFreq := min; + MaxFreq := max; + Options.Settings._bsMinFreqArray[currBand, currMode] := min div 1000; + Options.Settings._bsMaxFreqArray[currBand, currMode] := max div 1000; +end; + +function GetBand(Hz : LongInt) : integer; //Returns -1 if Hz is outside ham bands +var i : LongInt; +begin + i := -1; + case Hz of + 1800000..1999999 : i := 0; + 3000000..3999999 : i := 1; + 6900000..7999999 : i := 2; + 9900000..11000000 : i := 3; + 13900000..14999999 : i := 4; + 17500000..18999999 : i := 5; + 20900000..21999999 : i := 6; + 23500000..24999999 : i := 7; + 27800000..29999999 : i := 8; + 49000000..59000000 : i := 9; + 140000000..149999999 : i := 10; + 400000000..450000000 : i := 11; + 1200000000..1299999999 : i := 12; +{ + 2400000000..2499999999 : i := 13; + 5600000000..5699999999 : i := 14; +10000000000..90000000000 : i := 15; } + end; + Result := i; +end; + +procedure TBandScope2.RewriteBandScope; +var D : TBSData; + i, j : integer; + toprow : integer; + str : string; + MarkCurrent : Boolean; + Marked : Boolean; +begin + toprow := Grid.TopRow; + for j := 0 to Grid.RowCount - 1 do + Grid.Cells[0,j] := ''; + j := 0; + + if GetBand(CurrentRigFrequency) = ord(currBand) then + MarkCurrent := True + else + MarkCurrent := False; + Marked := False; + + for i := 0 to BSList2.Count - 1 do + begin + D := TBSData(BSList2[i]); + if D.Band = currBand then + begin + if MarkCurrent and Not(Marked) then + begin + if D.FreqHz >= CurrentRigFrequency then + begin + Grid.RowCount := j + 1; + Grid.Cells[0, j] := '>>'+ kHzStr(CurrentRigFrequency); + GridBoldArray[j] := True; + GridColorArray[j] := clBlack; + Marked := True; + inc(j); + end; + end; + Grid.RowCount := j + 1; + str := D.LabelStr; + if D.NewMulti then + GridColorArray[j] := clRed + else + if D.Worked then + GridColorArray[j] := clBlack + else + GridColorArray[j] := clGreen; + if D.Bold then + GridBoldArray[j] := True + else + GridBoldArray[j] := False; + if D.ClusterData then + str := FillRight(str, 20) + '+'; + Grid.Cells[0,j] := str; + + if (Main.CurrentQSO.QSO.CQ = False) and ((D.FreqHz - CurrentRigFrequency) <= 100) then + begin + MainForm.AutoInput(D); + end; + + inc(j); + end + else + begin + end; + end; + + if MarkCurrent and Not(Marked) then + begin + Grid.RowCount := j + 1; + Grid.Cells[0, j] := '>>'+ kHzStr(CurrentRigFrequency); + GridBoldArray[j] := True; + GridColorArray[j] := clBlack; + Marked := True; + inc(j); + end; + + if toprow <= Grid.RowCount - 1 then + Grid.TopRow := toprow; +end; + +procedure TBandScope2.GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); +begin + FColor := GridColorArray[ARow]; + Bold := GridBoldArray[ARow]; +end; + +procedure TBandScope2.DeleteFromBSList(i : integer); +begin + if (i >= 0) and (i < BSList2.Count) then + begin + TBSData(BSList2[i]).Free; + BSList2[i] := nil; + BSList2.Pack; + end; +end; + + +procedure TBandScope2.mnDeleteClick(Sender: TObject); +var i, j : integer; + s : string; +begin + if Grid.Selection.Top < 0 then + exit; + for i := Grid.Selection.Top to Grid.Selection.Bottom do + begin + s := Grid.Cells[0, i]; + for j := 0 to BSList2.Count - 1 do + begin + if pos(TBSData(BSList2[j]).LabelStr, s) = 1 then + begin + DeleteFromBSList(j); + break; + end; + end; + end; + RewriteBandScope; +end; + +procedure TBandScope2.MarkCurrentFreq(Hz : integer); +var i : integer; + B : TBSData; +begin + if (CurrentRigFrequency div 100) = (Hz div 100) then + exit; + CurrentRigFrequency := Hz; + for i := 0 to BSList2.Count - 1 do + begin + B := TBSData(BSList2[i]); + if abs((B.FreqHz div 100) - (Hz div 100)) <= 1 then + B.Bold := True + else + B.Bold := False; + end; + RewriteBandScope; +end; + +procedure TBandScope2.ProcessBSDataFromNetwork(BSText : string); +var D : TBSData; +begin + D := TBSData.Create; + D.FromText(BSText); + Main.MyContest.MultiForm.ProcessSpotData(TBaseSpot(D)); + AddAndDisplay(D); +end; + + +procedure TBandScope2.Deleteallworkedstations1Click(Sender: TObject); +var D : TBSData; + i : integer; +begin + for i := 0 to BSList2.Count - 1 do + begin + D := TBSData(BSList2[i]); + if D.Band = currBand then + begin + if D.Worked then + begin + BSList2[i] := nil; + D.Free; + end; + end; + end; + BSList2.Pack; + BSRefresh(Self); +end; + +procedure TBandScope2.ModeClick(Sender: TObject); +begin + DisplayMode := TMenuItem(Sender).Tag; +end; + +procedure TBandScope2.FixedBandClick(Sender: TObject); +begin + DisplayMode := 3; + FixedBand := TBand(TMenuItem(Sender).Tag); + SetBandMode(FixedBand, Main.CurrentQSO.QSO.Mode); + BSRefresh(Self); +end; + +procedure TBandScope2.FormCreate(Sender: TObject); +begin + FixedBand := b19; + ArrayNumber := 0; + DisplayMode := 0; // current rig +end; + +procedure TBandScope2.FormClose(Sender: TObject; var Action: TCloseAction); +begin + if ArrayNumber > 0 then + begin + BandScopeArray[ArrayNumber] := nil; + Free; + end; +end; + +procedure TBandScope2.GridDblClick(Sender: TObject); +var i, j : integer; + FKHz : LongInt; + F : Extended; + str, fstr, cstr, nstr : string; + D : TBSData; +begin + str := Grid.Cells[0, Grid.Selection.Top]; + if pos('+', str) > 0 then + str := TrimRight(copy(str, 1, length(str)-1)); + + {ver 2.2d stop scanning BSList2. just read freq from the string} + + fstr := ''; cstr := ''; nstr := ''; + + + i := pos('[', str); // extract number if any + if i > 0 then + begin + j := pos(']', str); + if j > i then + nstr := copy(str, i+1, j-i-1); + end; + + i := pos(' ', str); // extract frequency in kHz + if i > 0 then + fstr := copy(str, 1, i) + else + exit; + + Delete(str, 1, i); // extract callsign + i := pos(' ', str); + if i > 0 then + cstr := copy(str, 1, i - 1) + else + cstr := str; + + try + F := StrToFloat(fstr); + except + on EConvertError do + begin + exit; + end; + end; + + MainForm.CallsignEdit.Text := cstr; + MainForm.NumberEdit.Text := nstr; + if RigControl.Rig<>nil then + RigControl.Rig.SetFreq(Round(F*1000)); + + Main.MyContest.MultiForm.SetNumberEditFocus; + MainForm.UpdateBand(TBand(GetBand(Round(F*1000)))); + + { for i := 0 to BSList2.Count - 1 do + begin + D := TBSData(BSList2[i]); + if D.LabelStr = str then + begin + MainForm.CallsignEdit.Text := D.Call; + MainForm.NumberEdit.Text := D.Number; + MainForm.UpdateMode(D.Mode); + MainForm.UpdateBand(D.Band); + if RigControl.Rig <> nil then + RigControl.Rig.SetFreq(D.FreqHz); + Main.MyContest.MultiForm.SetNumberEditFocus; + break; + end; + end;} + +end; + +initialization + CurrentRigFrequency := 0; +end. diff --git a/src/UBasicMulti.dfm b/src/UBasicMulti.dfm new file mode 100644 index 00000000..7a2a5d0b Binary files /dev/null and b/src/UBasicMulti.dfm differ diff --git a/src/UBasicMulti.pas b/src/UBasicMulti.pas new file mode 100644 index 00000000..42201183 --- /dev/null +++ b/src/UBasicMulti.pas @@ -0,0 +1,262 @@ +unit UBasicMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + zLogGlobal, Menus, UComm, USpotClass; + +type + TBasicMulti = class(TForm) + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure CreateParams(var Params: TCreateParams); override; + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure Renew; virtual; + procedure Update; virtual; + function ExtractMulti(aQSO : TQSO) : string; virtual; + procedure AddNoUpdate(var aQSO : TQSO); virtual; + procedure Add(var aQSO : TQSO); virtual; {NewMulti} + function ValidMulti(aQSO : TQSO) : boolean; virtual; + procedure Reset; virtual; + procedure CheckMulti(aQSO : TQSO); virtual; + procedure ProcessCluster(var Sp : TBaseSpot); virtual; + function GuessZone(aQSO : TQSO) : string; virtual; abstract; + function GetInfo(aQSO : TQSO): string; virtual; abstract; + procedure RenewCluster; virtual; + procedure RenewBandScope; virtual; + procedure ProcessSpotData(var S : TBaseSpot); virtual; + procedure AddSpot(aQSO : TQSO); virtual; + procedure AddNewPrefix(PX : string; CtyIndex : integer); virtual; + procedure SelectAndAddNewPrefix(Call : string); virtual; // for WWMulti and descendants + function IsNewMulti(aQSO : TQSO) : boolean; virtual; + procedure SetNumberEditFocusJARL; + procedure SetNumberEditFocus; virtual; + // function CheckMultiInfo(aQSO : TQSO) : string; virtual; abstract; + // called from CheckMultiWindow for each band without QSO to the current stn + // returns nothing when the multi is worked in that band. + end; + +var + BasicMulti: TBasicMulti; + +implementation + +uses Main, uBandScope2; + +{$R *.DFM} + +procedure TBasicMulti.SelectAndAddNewPrefix(Call : string); +begin +end; + +procedure TBasicMulti.AddNewPrefix(PX : string; CtyIndex : integer); +begin +end; + +procedure TBasicMulti.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TBasicMulti.Renew; +begin +end; + +procedure TBasicMulti.Update; +begin +end; + +procedure TBasicMulti.AddNoUpdate(var aQSO : TQSO); +begin +end; + +function TBasicMulti.ExtractMulti(aQSO : TQSO) : string; +begin + Result := aQSO.QSO.NrRcvd; +end; + +procedure TBasicMulti.Add(var aQSO : TQSO); +begin + AddNoUpdate(aQSO); + Update; + AddSpot(aQSO); +end; + +function TBasicMulti.ValidMulti(aQSO : TQSO) : boolean; +begin + result := true; +end; + +procedure TBasicMulti.CheckMulti(aQSO : TQSO); +begin +end; + +function TBasicMulti.IsNewMulti(aQSO : TQSO) : boolean; +begin + Result := False; +end; + +procedure TBasicMulti.Reset; +begin +end; + +procedure TBasicMulti.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + +procedure TBasicMulti.ProcessCluster(var Sp : TBaseSpot); +begin +end; + +procedure TBasicMulti.ProcessSpotData(var S : TBaseSpot); +var aQSO : TQSO; +begin + aQSO := TQSO.Create; + aQSO.QSO.Callsign := S.Call; + aQSO.QSO.NrRcvd := S.Number; + aQSO.QSO.Band := S.Band; + aQSO.QSO.Mode := S.Mode; + + S.NewCty := False; + S.NewZone := False; + S.Worked := False; + + if Log.QuickDupe(aQSO) <> nil then + //if Log.IsDupe(aQSO) > 0 then + S.Worked := True; + S.NewCty := IsNewMulti(aQSO); + + aQSO.Free; +end; + +procedure TBasicMulti.RenewCluster; +var S : TSpot; + i : integer; +begin + for i := 0 to CommForm.SpotList.Count - 1 do + begin + S := TSpot(CommForm.SpotList[i]); + ProcessSpotData(TBaseSpot(S)); + end; + if CommForm.Visible then + CommForm.Renew; +end; + +procedure TBasicMulti.RenewBandScope; +var S : TBSData; + i : integer; +begin +{ for i := 0 to USpotClass.BSList.Count - 1 do + begin + S := TBSData(USpotClass.BSList[i]); + ProcessSpotData(TBaseSpot(S)); + end;} + for i := 0 to USpotClass.BSList2.Count - 1 do + begin + S := TBSData(USpotClass.BSList2[i]); + ProcessSpotData(TBaseSpot(S)); + end; + UBandScope2.BSRefresh(Self); +end; + +procedure TBasicMulti.AddSpot(aQSO : TQSO); // renews cluster & bs when adding a qso w/o renewing +var i : integer; + S : TBaseSpot; + boo : boolean; +begin + boo := false; + if aQSO.QSO.NewMulti1 or aQSO.QSO.NewMulti2 then + begin + RenewBandScope; + RenewCluster; + //exit; + end; + + for i := 0 to USpotClass.BSList2.Count - 1 do + begin + S := TBaseSpot(USpotClass.BSList2[i]); + if (S.Call = aQSO.QSO.callsign) and (S.band = aQSO.QSO.band) then + begin + S.NewCty := False; + S.NewZone := False; + S.Worked := True; + boo := true; + end; + end; + +{ for i := 0 to USpotClass.BSList.Count - 1 do + begin + S := TBaseSpot(USpotClass.BSList[i]); + if (S.Call = aQSO.QSO.callsign) and (S.band = aQSO.QSO.band) then + begin + S.NewCty := False; + S.NewZone := False; + S.Worked := True; + boo := true; + end; + end; } + + + if boo then + begin + UBandScope2.BSRefresh(Self); + end; + + boo := False; + for i := 0 to CommForm.SpotList.Count - 1 do + begin + S := TBaseSpot(CommForm.SpotList[i]); + if (S.Call = aQSO.QSO.callsign) and (S.band = aQSO.QSO.band) then + begin + S.NewCty := False; + S.NewZone := False; + S.Worked := True; + boo := True; + end; + end; + if boo then + CommForm.Renew; +end; + + +procedure TBasicMulti.FormCreate(Sender: TObject); +begin + MainForm.mnGridAddNewPX.Visible := False; +end; + +procedure TBasicMulti.SetNumberEditFocusJARL; +var S : string; +begin + MainForm.NumberEdit.SetFocus; + S := MainForm.NumberEdit.Text; + if S = '' then + exit; + if S[length(S)] in ['A'..'Z'] then + begin + MainForm.NumberEdit.SelStart := length(S) - 1; + MainForm.NumberEdit.SelLength := 1; + end + else + begin + MainForm.NumberEdit.SelStart := length(S); + MainForm.NumberEdit.SelLength := 0; + end; +end; + +procedure TBasicMulti.SetNumberEditFocus; +begin + MainForm.NumberEdit.SetFocus; + MainForm.NumberEdit.SelectAll; +end; + +end. diff --git a/src/UBasicScore.dfm b/src/UBasicScore.dfm new file mode 100644 index 00000000..c0409eea Binary files /dev/null and b/src/UBasicScore.dfm differ diff --git a/src/UBasicScore.pas b/src/UBasicScore.pas new file mode 100644 index 00000000..9f3f95e4 --- /dev/null +++ b/src/UBasicScore.pas @@ -0,0 +1,294 @@ +unit UBasicScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + zLogGlobal, StdCtrls, ExtCtrls, Buttons; + +type + TBasicScore = class(TForm) + Panel1: TPanel; + Button1: TButton; + StayOnTop: TCheckBox; + CWButton: TSpeedButton; + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure CreateParams(var Params: TCreateParams); override; + procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure StayOnTopClick(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure CWButtonClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + QSO : array[b19..HiBand] of LongInt; + CWQSO : array[b19..HiBand] of LongInt; + FMQSO : array[b19..HiBand] of LongInt; + Points : array[b19..HiBand] of LongInt; + Multi : array[b19..HiBand] of LongInt; + ShowCWRatio : boolean; + constructor Create; virtual; + procedure Renew; virtual; + procedure Update; virtual; + procedure AddNoUpdate(var aQSO : TQSO); virtual; + procedure Add(var aQSO : TQSO); virtual; {calculates points} + procedure Reset; virtual; + procedure SaveSummary(FileName : string); virtual; + procedure SummaryWriteScore(FileName : string); virtual; + function TotalCWQSOs : integer; + function TotalQSOs : integer; + function QPMStr(B: TBand) : string; // returns QSO,Pts,Mult for JARL E-log + function TotalQPMStr: string; + function _TotalMulti : integer; + function _TotalPoints : integer; + end; + +var + BasicScore: TBasicScore; + +implementation + +uses Main, USummaryInfo; + +{$R *.DFM} + +procedure TBasicScore.SummaryWriteScore(FileName : string); +var f : textfile; + tqso, tpts, tmulti : LongInt; + b : TBand; +begin + tqso := 0; tpts := 0; tmulti := 0; + AssignFile(f, FileName); + Append(f); + writeln(f, 'MHz QSOs Points Multis'); + for b := b19 to HiBand do + begin + if NotWARC(b) then + begin + writeln(f, FillRight(MHzString[b],8)+FillLeft(IntToStr(QSO[b]),10)+ + FillLeft(IntToStr(Points[b]),10)+FillLeft(IntToStr(Multi[b]),10) ); + tqso := tqso + QSO[b]; + tpts := tpts + Points[b]; + tmulti := tmulti + Multi[b]; + end; + end; + writeln(f, FillRight('Total :',8)+FillLeft(IntToStr(tqso),10)+ + FillLeft(IntToStr(tpts),10)+FillLeft(IntToStr(tmulti),10) ); + writeln(f,'Total score : ' + IntToStr(tpts*tmulti)); + CloseFile(f); +end; + +procedure TBasicScore.SaveSummary(FileName : string); +var f : textfile; + b : TBand; +begin + if SummaryInfo.ShowModal <> mrOK then + exit; + AssignFile(f, FileName); + Rewrite(f); + with SummaryInfo do + begin + writeln(f, ContestNameEdit.Text); + writeln(f); + writeln(f, 'Call sign: '+CallEdit.Text); + writeln(f); + writeln(f, 'Category: '+CategoryEdit.Text); + writeln(f); + if CountryEdit.Text <> '' then + begin + writeln(f,'Country: '+CountryEdit.Text); + writeln(f); + end; + + CloseFile(f); + SummaryWriteScore(FileName); + Append(f); + + writeln(f); + + if MiscMemo.Text <> '' then + begin + write(f, MiscMemo.Text); + writeln(f); + end; + if RemMemo.Text <> '' then + begin + writeln(f, 'Remarks:'); + write(f, RemMemo.Text); + writeln(f); + end; + write(f, DecMemo.Text); + writeln(f); + writeln(f, 'Name: '+NameEdit.Text); + writeln(f); + writeln(f, 'Address:'); + writeln(f); + write(f, AddrMemo.Text); + writeln(f); + end; + CloseFile(f); +end; + +procedure TBasicScore.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +constructor TBasicScore.Create; +begin + ShowCWRatio := False; + Reset; +end; + +procedure TBasicScore.Renew; +var i : word; + band : TBand; +begin + Reset; + for i := 1 to Log.TotalQSO do + begin + band := TQSO(Log.List[i]).QSO.band; + inc(QSO[band]); + inc(Points[band],TQSO(Log.List[i]).QSO.Points); + if TQSO(Log.List[i]).QSO.NewMulti1 then + inc(Multi[band]); + end; +end; + +procedure TBasicScore.Update; +begin +end; + +procedure TBasicScore.AddNoUpdate(var aQSO : TQSO); +var B : TBand; +begin + B := aQSO.QSO.band; + inc(QSO[B]); + if aQSO.QSO.mode = mCW then + inc(CWQSO[B]); + if aQSO.QSO.mode = mFM then + inc(FMQSO[B]); + if aQSO.QSO.NewMulti1 then + inc(Multi[B]); +{ if aQSO.QSO.NewMulti2 then + inc(Multi2[B]);} +end; + +procedure TBasicScore.Add(var aQSO : TQSO); +begin + AddNoUpdate(aQSO); + Update; +end; + +procedure TBasicScore.Reset; +var band : TBand; +begin + for band := b19 to HiBand do + begin + QSO[band] := 0; + CWQSO[band] := 0; + FMQSO[band] := 0; + Points[band] := 0; + Multi[band] := 0; + end; +end; + +procedure TBasicScore.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + //VK_ALT + end; +end; + +procedure TBasicScore.Button1Click(Sender: TObject); +begin + Close; +end; + +procedure TBasicScore.FormCreate(Sender: TObject); +begin + StayOnTop.Checked := False; +end; + +procedure TBasicScore.StayOnTopClick(Sender: TObject); +begin + If StayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +function TBasicScore.TotalCWQSOs : integer; +var B : TBand; + i : integer; +begin + i := 0; + for B := b19 to HiBand do + i := i + CWQSO[B]; + Result := i; +end; + +function TBasicScore.TotalQSOs : integer; +var B : TBand; + i : integer; +begin + i := 0; + for B := b19 to HiBand do + i := i + QSO[B]; + Result := i; +end; + + +procedure TBasicScore.FormResize(Sender: TObject); +begin + CWButton.Left := Panel1.Width - 46; +end; + +procedure TBasicScore.CWButtonClick(Sender: TObject); +var boo : boolean; +begin + if CWButton.Down then + ShowCWRatio := True + else + ShowCWRatio := False; + Update; +end; + +function TBasicScore.QPMStr(B: TBand) : string; // returns QSO,Pts,Mult for JARL E-log +begin + Result := IntToStr(QSO[B])+','+IntToStr(Points[B])+','+IntToStr(Multi[B]); +end; + +function TBasicScore.TotalQPMStr : string; // returns QSO,Pts,Mult for JARL E-log +begin + Result := IntToStr(TotalQSOs)+','+ IntToStr(_TotalPoints)+','+ IntToStr(_TotalMulti); +end; + +function TBasicScore._TotalMulti : integer; +var B : TBand; + i : integer; +begin + i := 0; + for B := b19 to HiBand do + i := i + Multi[B]; + Result := i; +end; + +function TBasicScore._TotalPoints : integer; +var B : TBand; + i : integer; +begin + i := 0; + for B := b19 to HiBand do + i := i + Points[B]; + Result := i; +end; + + +end. diff --git a/src/UCWForm.dfm b/src/UCWForm.dfm new file mode 100644 index 00000000..ecb6e89d Binary files /dev/null and b/src/UCWForm.dfm differ diff --git a/src/UCWForm.pas b/src/UCWForm.pas new file mode 100644 index 00000000..6caf88dc --- /dev/null +++ b/src/UCWForm.pas @@ -0,0 +1,24 @@ +unit UCWForm; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs; + + +type + TCWForm = class(TForm) + private + { Private declarations } + public + { Public declarations } + end; + +var + CWForm: TCWForm; + +implementation + +{$R *.DFM} + +end. diff --git a/src/UCWKeyBoard.dfm b/src/UCWKeyBoard.dfm new file mode 100644 index 00000000..c19dcb43 Binary files /dev/null and b/src/UCWKeyBoard.dfm differ diff --git a/src/UCWKeyBoard.pas b/src/UCWKeyBoard.pas new file mode 100644 index 00000000..1d723499 --- /dev/null +++ b/src/UCWKeyBoard.pas @@ -0,0 +1,131 @@ +unit UCWKeyBoard; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, BGK32LIB, ExtCtrls, zLogGlobal, UzLogCW, ClipBrd; + +type + TCWKeyBoard = class(TForm) + Console: TMemo; + Panel1: TPanel; + Button1: TButton; + Button2: TButton; + procedure ConsoleKeyPress(Sender: TObject; var Key: Char); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure OKClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure ConsoleKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure CreateParams(var Params: TCreateParams); override; + procedure Button2Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + CWKeyBoard: TCWKeyBoard; + +implementation + +uses Main, UOptions; + +{$R *.DFM} +procedure TCWKeyBoard.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + + +procedure TCWKeyBoard.ConsoleKeyPress(Sender: TObject; var Key: Char); +var K : Char; +begin + if Key = Chr($1B) then + exit; + if Key = Chr($08) then + BGK32LIB.CancelLastChar + else + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + K := LowCase(Key) + else + K := UpCase(Key); + BGK32LIB.SetCWSendBufCharPTT(K); + Key := K; + end; +end; + +procedure TCWKeyBoard.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : + begin + ControlPTT(False); + MainForm.LastFocus.SetFocus; + end; + end; +end; + + +procedure TCWKeyBoard.OKClick(Sender: TObject); +begin + Close; + MainForm.LastFocus.SetFocus; +end; + +procedure TCWKeyBoard.FormShow(Sender: TObject); +begin + Console.SetFocus; +end; + +procedure TCWKeyBoard.ConsoleKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +var i : integer; + S : string; +begin + case Key of + VK_ESCAPE : + begin + if BGK32LIB.IsPlaying then + begin + BGK32LIB.ClrBuffer; + ControlPTT(False); + end + else + begin + ControlPTT(False); + MainForm.SetFocus; + //Caption := 'CODE 2'; + end; + end; + VK_F1..VK_F8 : + begin + i := Key - VK_F1 + 1; + S := Options.CWMessage(Options.Settings.CW.CurrentBank,i); + S := SetStr(S, Main.CurrentQSO); + zLogSendStr(S); + + while Pos(':***********',S) > 0 do + begin + i := Pos(':***********',S); + Delete(S, i, 12); + Insert(CurrentQSO.QSO.Callsign, S, i); + end; + ClipBoard.AsText := S; + Console.PasteFromClipBoard; + end; + end; +end; + +procedure TCWKeyBoard.Button2Click(Sender: TObject); +begin + Console.Clear; +end; + +end. diff --git a/src/UChat.dfm b/src/UChat.dfm new file mode 100644 index 00000000..5a18222a Binary files /dev/null and b/src/UChat.dfm differ diff --git a/src/UChat.pas b/src/UChat.pas new file mode 100644 index 00000000..b5466717 --- /dev/null +++ b/src/UChat.pas @@ -0,0 +1,167 @@ +unit UChat; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls, zLogGlobal; + +type + TChatForm = class(TForm) + Panel1: TPanel; + ListBox: TListBox; + Edit: TEdit; + Button1: TButton; + Panel2: TPanel; + CheckBox: TCheckBox; + Button2: TButton; + cbStayOnTop: TCheckBox; + procedure EditKeyPress(Sender: TObject; var Key: Char); + procedure CreateParams(var Params: TCreateParams); override; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure cbStayOnTopClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormDeactivate(Sender: TObject); + procedure FormActivate(Sender: TObject); + private + { Private declarations } + PrevIMEMode : integer; + public + PCNameSet : boolean; + function IDString : string; // MHz > or PCname > + procedure SendMessage; + procedure Add(S : string); + { Public declarations } + end; + +var + ChatForm: TChatForm; + +implementation + +uses Main, UZLinkForm, UOptions; + +{$R *.DFM} + + +function TChatForm.IDString : string; +begin + if PCNameSet then + Result := FillRight(Options.Settings._pcname + '>', 9) + else + Result := FillRight(Main.CurrentQSO.BandStr+'MHz>', 9); +end; + +procedure TChatForm.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TChatForm.Add(S: string); +var _VisRows : integer; + _TopRow : integer; +begin + ListBox.Items.Add(S); + _VisRows := ListBox.ClientHeight div ListBox.ItemHeight; + _TopRow := ListBox.Items.Count - _VisRows + 1; + if _TopRow > 0 then + ListBox.TopIndex := _TopRow + else + ListBox.TopIndex := 0; + if CheckBox.Checked then + Show; + //BringToFront; +end; + +procedure TChatForm.SendMessage; +var t, str : string; +begin + t := FormatDateTime('hh:nn ', SysUtils.Now); + + if (Length(Edit.Text) > 0) and (Edit.Text[1] = '\') then // raw command input + begin + str := Edit.Text; + ListBox.Items.Add(str); + Delete(str, 1, 1); + str := ZLinkHeader + ' ' + str; + ZLinkForm.WriteData(str +LineBreakCode[ord(ZLinkForm.Console.LineBreak)]); + exit; + end; + if (Length(Edit.Text) > 0) and (Edit.Text[1] = '!') then // Red + begin + str := Edit.Text; + //ListBox.Items.Add(str); + Delete(str, 1, 1); + str := ZLinkHeader+' PUTMESSAGE !'+ + t + FillRight(Main.CurrentQSO.BandStr+'MHz>', 9)+ + str; + Add(Copy(str, length(ZLinkHeader+' PUTMESSAGE !')+1, 255)); + ZLinkForm.WriteData(str +LineBreakCode[ord(ZLinkForm.Console.LineBreak)]); + exit; + end; + str := ZLinkHeader+' PUTMESSAGE '+ + t + FillRight(Main.CurrentQSO.BandStr+'MHz>', 9)+ + Edit.Text; + //ListBox.Items.Add(Copy(str, length(ZLinkHeader+' PUTMESSAGE ')+1, 255)); + Add(Copy(str, length(ZLinkHeader+' PUTMESSAGE ')+1, 255)); + ZLinkForm.WriteData(str +LineBreakCode[ord(ZLinkForm.Console.LineBreak)]); +end; + +procedure TChatForm.EditKeyPress(Sender: TObject; var Key: Char); +begin + if Key = Chr($0D) then + begin + SendMessage; + Edit.Clear; + Key := #0; + end; +end; + +procedure TChatForm.Button1Click(Sender: TObject); +begin + Close; +end; + +procedure TChatForm.Button2Click(Sender: TObject); +begin + ListBox.Clear; +end; + +procedure TChatForm.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + +procedure TChatForm.cbStayOnTopClick(Sender: TObject); +begin + if cbStayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +procedure TChatForm.FormCreate(Sender: TObject); +begin + PrevIMEMode := ord(imClose); + PCNameSet := False; +end; + +procedure TChatForm.FormDeactivate(Sender: TObject); +begin + PrevIMEMode := Ord(Edit.ImeMode); +end; + +procedure TChatForm.FormActivate(Sender: TObject); +begin + Edit.ImeMode := TIMEMode(PrevIMEMode); + //Edit.SetIme; +end; + +end. diff --git a/src/UCheckCall%.dfm b/src/UCheckCall%.dfm new file mode 100644 index 00000000..0df0e17e Binary files /dev/null and b/src/UCheckCall%.dfm differ diff --git a/src/UCheckCall%.pas b/src/UCheckCall%.pas new file mode 100644 index 00000000..2d2b1b8c --- /dev/null +++ b/src/UCheckCall%.pas @@ -0,0 +1,129 @@ +unit UCheckCall; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls, zLogGlobal; + +type + TCheckCall = class(TForm) + Panel1: TPanel; + Button3: TButton; + ListBox: TListBox; + StayOnTop: TCheckBox; + procedure CreateParams(var Params: TCreateParams); override; + procedure Button3Click(Sender: TObject); + procedure StayOnTopClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + private + { Private declarations } + BandRow : array[b19..HiBand] of Integer; + procedure ResetListBox; + public + { Public declarations } + procedure Renew(aQSO : TQSO); + end; + +var + CheckCall: TCheckCall; + +implementation + +uses Main; + +{$R *.DFM} + +procedure TCheckCall.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TCheckCall.Button3Click(Sender: TObject); +begin + Close; +end; + +procedure TCheckCall.StayOnTopClick(Sender: TObject); +begin + If StayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +procedure TCheckCall.ResetListBox; +var B : TBand; +begin + ListBox.Items.Clear; + for B := b19 to HiBand do + if BandRow[B] >= 0 then + ListBox.Items.Add(MHzString[B]); +end; + +procedure TCheckCall.Renew(aQSO : TQSO); +var PartialStr : string; + i : LongInt; + B : TBand; +begin + //TempQSO := aQSO; + ResetListBox; + PartialStr := CoreCall(aQSO.QSO.Callsign); + if PartialStr <> '' then + begin + for B := b19 to HiBand do + for i := 1 to SubLog[B].TotalQSO do + if PartialStr = CoreCall(TQSO(SubLog[B].List[i]).QSO.Callsign) then + if BandRow[B] >= 0 then + begin + ListBox.Items.Delete(BandRow[B]); + ListBox.Items.Insert(BandRow[B],TQSO(SubLog[B].List[i]).CheckCallSummary); + end; + + for i := 1 to Log.TotalQSO do + if PartialStr = CoreCall(TQSO(Log.List[i]).QSO.Callsign) then + begin + B := TQSO(Log.List[i]).QSO.Band; + if BandRow[B] >= 0 then + begin + ListBox.Items.Delete(BandRow[B]); + ListBox.Items.Insert(BandRow[B],TQSO(Log.List[i]).CheckCallSummary); + end; + end; + end; +end; + + + +procedure TCheckCall.FormShow(Sender: TObject); +var i : integer; + B : TBand; +begin + i := 0; + for B := b19 to HiBand do +// if MainForm.BandMenu.Items[ord(B)].Visible then + if (MainForm.BandMenu.Items[ord(B)].Enabled) and + (MainForm.BandMenu.Items[ord(B)].Visible) then + begin + BandRow[B] := i; + inc(i); + end + else + BandRow[B] := -1; + CheckCall.Height := 14*i + 59; + ResetListBox; + Renew(Main.CurrentQSO); +end; + +procedure TCheckCall.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + +end. diff --git a/src/UCheckCall2.dfm b/src/UCheckCall2.dfm new file mode 100644 index 00000000..9c2f6d58 Binary files /dev/null and b/src/UCheckCall2.dfm differ diff --git a/src/UCheckCall2.pas b/src/UCheckCall2.pas new file mode 100644 index 00000000..1191e3ec --- /dev/null +++ b/src/UCheckCall2.pas @@ -0,0 +1,90 @@ +unit UCheckCall2; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UCheckWin, StdCtrls, ExtCtrls, zLogGlobal, Main; + +type + TCheckCall2 = class(TCheckWin) + private + { Private declarations } + public + procedure Renew(aQSO : TQSO); override; + { Public declarations } + end; + +var + CheckCall2: TCheckCall2; + +implementation + +{$R *.DFM} + +procedure TCheckCall2.Renew(aQSO : TQSO); +var PartialStr : string; + i : LongInt; + B : TBand; + aQ, Q : TQSO; +begin + ResetListBox; + + if pos(',',aQSO.QSO.Callsign) = 1 then + exit; + + aQ := TQSO.Create; + aQ.QSO := aQSO.QSO; + for B := b19 to HiBand do + if BandRow[B] >= 0 then + begin + aQ.QSO.Band := B; + Q := Log.QuickDupe(aQ); + if Q <> nil then + begin + ListBox.Items.Delete(BandRow[B]); + ListBox.Items.Insert(BandRow[B], Main.MyContest.CheckWinSummary(Q)); + end; + end; + aQ.Free; +end; + +(* +function TCheckCall2.ALLJA_JA1ZLOMessage(aQSO : TQSO) : string; +var PartialStr : string; + T : integer; + B : TBand; + Needed : set of TBand; + aQ, Q : TQSO; +begin + Result := ''; + if aQSO.QSO.Callsign <> 'JA1ZLO' then + exit; + aQ := TQSO.Create; + aQ.QSO := aQSO.QSO; + T := 0; + Needed := []; + for B := b35 to b50 do + begin + if B in [b35, b7, b14, b21, b28, b50] then + begin + aQ.QSO.Band := B; + Q := Log.QuickDupe(aQ); + if Q <> nil then + begin + inc(T); + end + else + Needed := Needed + B; + end; + end; + if T = 5 then + begin + + end; + aQ.Free; +end; +*) + + +end. diff --git a/src/UCheckCountry.dfm b/src/UCheckCountry.dfm new file mode 100644 index 00000000..5891875e Binary files /dev/null and b/src/UCheckCountry.dfm differ diff --git a/src/UCheckCountry.pas b/src/UCheckCountry.pas new file mode 100644 index 00000000..301b1fd2 --- /dev/null +++ b/src/UCheckCountry.pas @@ -0,0 +1,124 @@ +unit UCheckCountry; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UCheckWin, StdCtrls, ExtCtrls, UWWMulti, UMultipliers, zLogGlobal, Main; + +type + TCheckCountry = class(TCheckWin) + procedure FormCreate(Sender: TObject); + private + { Private declarations } + TempCountry : TCountry; // holds the last country analyzed; + TempZone : integer; + public + { Public declarations } + + ParentMulti : TWWMulti; + procedure Renew(aQSO : TQSO); override; + function NotNewMulti(B : TBand) : boolean; + end; + +var + CheckCountry: TCheckCountry; + +implementation + +{$R *.DFM} + +procedure TCheckCountry.Renew(aQSO : TQSO); +var cty : string; + i : LongInt; + z, row : integer; + B : TBand; + C : TCountry; + S, PartialStr : string; + BoxFlags : array[0..20] of boolean; +begin + ResetListBox; + if length(aQSO.QSO.Callsign) = 0 then + exit; + for i := 0 to 20 do + BoxFlags[i] := False; + i := {ParentMulti.}GetCountryIndex(aQSO); +// i := Main.MyContest.MultiForm.GetCountryIndex(aQSO); + + C := TCountry({ParentMulti.}CountryList.List[i]); + TempCountry := C; + Caption := C.Country+': '+C.CountryName+' '+C.Continent; + cty := C.Country; + PartialStr := aQSO.QSO.Callsign; + if cty <> '' then + begin + for i := Log.TotalQSO downto 1 do + if cty = TQSO(Log.List[i]).QSO.Multi2 then + begin + B := TQSO(Log.List[i]).QSO.Band; + row := BandRow[B]; + if row >= 0 then + begin + if BoxFlags[row] = False then + begin + ListBox.Items.Delete(row); + ListBox.Items.Insert(row, Main.MyContest.CheckWinSummary(TQSO(Log.List[i]))); + BoxFlags[row] := True; + end + else + begin + if TQSO(Log.List[i]).QSO.Callsign = PartialStr then + begin + ListBox.Items.Delete(row); + ListBox.Items.Insert(row, Main.MyContest.CheckWinSummary(TQSO(Log.List[i]))); + end; + end; + end; + end; + end; + z := 0; + try + z := StrToInt(aQSO.QSO.NrRcvd); + except + on EConvertError do + z := 0; + end; + TempZone := z; + if z in [1..40] then + begin + for B := b19 to b28 do + begin + if BandRow[B] >= 0 then + if ParentMulti.Zone[B, z] = false then + begin + S := ListBox.Items[BandRow[B]]; + S := FillRight(S, 27) + 'Zone ' + + FillRight(IntToStr(z), 2) + ' NEEDED'; + ListBox.Items.Delete(BandRow[B]); + ListBox.Items.Insert(BandRow[B], S); + end; + end; + end; +end; + +procedure TCheckCountry.FormCreate(Sender: TObject); +begin + inherited; + TempCountry := nil; +end; + +function TCheckCountry.NotNewMulti(B : TBand) : boolean; +var newcountry, newzone : boolean; +begin + if TempCountry <> nil then + newcountry := not(TempCountry.Worked[B]) + else + newcountry := False; + if TempZone <> 0 then + newzone := not(ParentMulti.Zone[B, TempZone]) + else + newzone := False; + Result := not(newzone or newcountry); +end; + +end. diff --git a/src/UCheckMulti.dfm b/src/UCheckMulti.dfm new file mode 100644 index 00000000..0b4698df Binary files /dev/null and b/src/UCheckMulti.dfm differ diff --git a/src/UCheckMulti.pas b/src/UCheckMulti.pas new file mode 100644 index 00000000..83beb4f5 --- /dev/null +++ b/src/UCheckMulti.pas @@ -0,0 +1,63 @@ +unit UCheckMulti; // not used right now + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UCheckWin, StdCtrls, ExtCtrls, zLogGlobal, Main; + +type + TCheckMulti = class(TCheckWin) + private + { Private declarations } + public + { Public declarations } + procedure Renew(aQSO : TQSO); override; + end; + +var + CheckMulti: TCheckMulti; + +implementation + +{$R *.DFM} + +procedure TCheckMulti.Renew(aQSO : TQSO); +var str : string; + i : LongInt; + B : TBand; + r : integer; +begin + ResetListBox; + str := Main.MyContest.MultiForm.ExtractMulti(aQSO); + if str <> '' then + caption := str + else + caption := 'Check multiplier'; + if str <> '' then + begin + for i := Log.TotalQSO downto 1 do + if str = TQSO(Log.List[i]).QSO.multi1 then + begin + B := TQSO(Log.List[i]).QSO.Band; + r := BandRow[B]; + + if (r >= 0) and ListCWandPh then + if TQSO(Log.List[i]).QSO.Mode = mCW then + r := r * 2 + else + r := r * 2 + 1; + + if r >= 0 then + begin + if length(ListBox.Items[r]) < 15 then + begin + ListBox.Items.Delete(r); + ListBox.Items.Insert(r, Main.MyContest.CheckWinSummary(TQSO(Log.List[i]))); + end; + end; + end; + end; +end; + +end. diff --git a/src/UCheckWin.dfm b/src/UCheckWin.dfm new file mode 100644 index 00000000..58d1f13f Binary files /dev/null and b/src/UCheckWin.dfm differ diff --git a/src/UCheckWin.pas b/src/UCheckWin.pas new file mode 100644 index 00000000..05ff9b5e --- /dev/null +++ b/src/UCheckWin.pas @@ -0,0 +1,122 @@ +unit UCheckWin; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls, zLogGlobal; + +type + TCheckWin = class(TForm) + Panel1: TPanel; + Button3: TButton; + ListBox: TListBox; + StayOnTop: TCheckBox; + procedure CreateParams(var Params: TCreateParams); override; + procedure Button3Click(Sender: TObject); + procedure StayOnTopClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + ListCWandPh : boolean; + BandRow : array[b19..HiBand] of Integer; + procedure ResetListBox; + procedure Renew(aQSO : TQSO); virtual; + end; + +var + CheckWin: TCheckWin; + +implementation + +uses Main; + +{$R *.DFM} + +procedure TCheckWin.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TCheckWin.Button3Click(Sender: TObject); +begin + Close; +end; + +procedure TCheckWin.StayOnTopClick(Sender: TObject); +begin + If StayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +procedure TCheckWin.ResetListBox; +var B : TBand; +begin + ListBox.Items.Clear; + if ListCWandPh then + begin + for B := b19 to HiBand do + if BandRow[B] >= 0 then + begin + ListBox.Items.Add(FillRight(MHzString[B], 5)+' CW'); + ListBox.Items.Add(FillRight(MHzString[B], 5)+' Ph'); + end; + end + else + begin + for B := b19 to HiBand do + if BandRow[B] >= 0 then + ListBox.Items.Add(MHzString[B]); + end; +end; + +procedure TCheckWin.Renew(aQSO : TQSO); +begin +end; + +procedure TCheckWin.FormShow(Sender: TObject); +var i : integer; + B : TBand; +begin + + i := 0; + for B := b19 to HiBand do + if (MainForm.BandMenu.Items[ord(B)].Enabled) and + (MainForm.BandMenu.Items[ord(B)].Visible) then + begin + BandRow[B] := i; + inc(i); + end + else + BandRow[B] := -1; + if ListCWandPh then + Height := 28*i + 59 + else + Height := 14*i + 59; + ResetListBox; + Renew(Main.CurrentQSO); + +end; + +procedure TCheckWin.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + +procedure TCheckWin.FormCreate(Sender: TObject); +begin + ListCWandPh := False; +end; + +end. diff --git a/src/UCluster.dfm b/src/UCluster.dfm new file mode 100644 index 00000000..3eb69da1 Binary files /dev/null and b/src/UCluster.dfm differ diff --git a/src/UCluster.pas b/src/UCluster.pas new file mode 100644 index 00000000..99dbed58 --- /dev/null +++ b/src/UCluster.pas @@ -0,0 +1,55 @@ +unit UCluster; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls; + +type + TClusterForm = class(TForm) + ListBox: TListBox; + Panel1: TPanel; + Button1: TButton; + Button2: TButton; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + private + { Private declarations } + public + procedure Add(Spot : string); + { Public declarations } + end; + +var + ClusterForm: TClusterForm; + +implementation + +{$R *.DFM} + +procedure TClusterForm.Add(Spot : string); +begin + ListBox.Items.Add(Spot); +end; + +procedure TClusterForm.Button1Click(Sender: TObject); +begin + Close; +end; + +procedure TClusterForm.Button2Click(Sender: TObject); +begin + if Self.FormStyle = fsStayOnTop then + begin + Self.FormStyle := fsNormal; + Button2.Caption := 'Stay on Top'; + end + else + begin + Self.FormStyle := fsStayOnTop; + Button2.Caption := 'Normal'; + end; +end; + +end. diff --git a/src/UClusterCOMSet.dfm b/src/UClusterCOMSet.dfm new file mode 100644 index 00000000..9d488720 Binary files /dev/null and b/src/UClusterCOMSet.dfm differ diff --git a/src/UClusterCOMSet.pas b/src/UClusterCOMSet.pas new file mode 100644 index 00000000..1db798ce --- /dev/null +++ b/src/UClusterCOMSet.pas @@ -0,0 +1,62 @@ +unit UClusterCOMSet; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls; + +type + TClusterCOMSet = class(TForm) + Bevel1: TBevel; + LineBreak: TComboBox; + LocalEcho: TCheckBox; + OKBtn: TButton; + CancelBtn: TButton; + BaudCombo: TComboBox; + Label35: TLabel; + Label1: TLabel; + procedure OKBtnClick(Sender: TObject); + procedure CancelBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + procedure SetVisuals; virtual; + { Public declarations } + end; + +var + ClusterCOMSet: TClusterCOMSet; + +implementation + +uses UOptions; + +{$R *.DFM} + +procedure TClusterCOMSet.SetVisuals; +begin + BaudCombo.ItemIndex := Options.Settings._clusterbaud; + LineBreak.ItemIndex := Options.Settings._clusterlinebreakCOM; + LocalEcho.Checked := Options.Settings._clusterlocalechoCOM; +end; + + +procedure TClusterCOMSet.OKBtnClick(Sender: TObject); +begin + Close; +end; + +procedure TClusterCOMSet.CancelBtnClick(Sender: TObject); +begin + SetVisuals; + Close; +end; + +procedure TClusterCOMSet.FormShow(Sender: TObject); +begin + {SetVisuals;} +end; + +end. diff --git a/src/UClusterTelnetSet.dfm b/src/UClusterTelnetSet.dfm new file mode 100644 index 00000000..2603ba38 Binary files /dev/null and b/src/UClusterTelnetSet.dfm differ diff --git a/src/UClusterTelnetSet.pas b/src/UClusterTelnetSet.pas new file mode 100644 index 00000000..97d27dac --- /dev/null +++ b/src/UClusterTelnetSet.pas @@ -0,0 +1,64 @@ +unit UClusterTelnetSet; + +interface + +uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, + Buttons, ExtCtrls, Spin; + +type + TClusterTelnetSet = class(TForm) + OKBtn: TButton; + CancelBtn: TButton; + Bevel1: TBevel; + HostName: TComboBox; + LineBreak: TComboBox; + LocalEcho: TCheckBox; + Label1: TLabel; + Label2: TLabel; + spPortNumber: TSpinEdit; + Label3: TLabel; + procedure FormShow(Sender: TObject); + procedure CancelBtnClick(Sender: TObject); + procedure OKBtnClick(Sender: TObject); + private + { Private declarations } + public + procedure SetVisuals; virtual; + { Public declarations } + end; + +var + ClusterTelnetSet: TClusterTelnetSet; + +implementation + +uses UOptions; + +{$R *.DFM} + + +procedure TClusterTelnetSet.SetVisuals; +begin + HostName.Text := Options.Settings._clusterhost; + LineBreak.ItemIndex := Options.Settings._clusterlinebreakTELNET; + LocalEcho.Checked := Options.Settings._clusterlocalechoTELNET; + sPportNumber.Value := Options.Settings._clustertelnetport; +end; + +procedure TClusterTelnetSet.FormShow(Sender: TObject); +begin + {SetVisuals;} +end; + +procedure TClusterTelnetSet.CancelBtnClick(Sender: TObject); +begin + SetVisuals; + Close; +end; + +procedure TClusterTelnetSet.OKBtnClick(Sender: TObject); +begin + Close; +end; + +end. diff --git a/src/UComm.dfm b/src/UComm.dfm new file mode 100644 index 00000000..ed7757ca Binary files /dev/null and b/src/UComm.dfm differ diff --git a/src/UComm.pas b/src/UComm.pas new file mode 100644 index 00000000..dc1e8ada --- /dev/null +++ b/src/UComm.pas @@ -0,0 +1,663 @@ +unit UComm; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, Console, ExtCtrls, GrabBar, zLogGlobal, ComCtrls, + Console2, TnCnx, USpotClass, CPDrv, Menus; + + +const SPOTMAX = 2000; +type + + TCommForm = class(TForm) + Timer1: TTimer; + Panel1: TPanel; + Button1: TButton; + Edit: TEdit; + Panel2: TPanel; + ListBox: TListBox; + StatusLine: TStatusBar; + Console: TColorConsole2; + Splitter1: TSplitter; + Telnet: TTnCnx; + ConnectButton: TButton; + StayOnTop: TCheckBox; + Relay: TCheckBox; + cbNotifyCurrentBand: TCheckBox; + ClusterComm: TCommPortDriver; + PopupMenu: TPopupMenu; + Deleteselectedspots1: TMenuItem; + procedure CommReceiveData(Buffer: Pointer; BufferLength: Word); + procedure Button1Click(Sender: TObject); + procedure EditKeyPress(Sender: TObject; var Key: Char); + procedure FormCreate(Sender: TObject); + procedure TimerProcess(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure TelnetDisplay(Sender: TTnCnx; Str: String); + procedure ConnectButtonClick(Sender: TObject); + procedure TelnetSessionConnected(Sender: TTnCnx; Error: Word); + procedure TelnetSessionClosed(Sender: TTnCnx; Error: Word); + procedure CreateParams(var Params: TCreateParams); override; + //procedure AsyncCommRxChar(Sender: TObject; Count: Integer); + procedure FormShow(Sender: TObject); + procedure StayOnTopClick(Sender: TObject); + procedure ListBoxDblClick(Sender: TObject); + procedure ListBoxKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure ListBoxDrawItem(Control: TWinControl; Index: Integer; + Rect: TRect; State: TOwnerDrawState); + procedure FormActivate(Sender: TObject); + procedure ClusterCommReceiveData(Sender: TObject; DataPtr: Pointer; + DataSize: Cardinal); + procedure TelnetDataAvailable(Sender: TTnCnx; Buffer: Pointer; + Len: Integer); + private + SpotIndex : array[0..SPOTMAX] of integer; + CommBuffer : TStringList; + CommTemp : string; {command work string} + CommStarted : boolean; + _RelayPacketData : boolean; + { Private declarations } + public + SpotList : TList; + procedure DeleteSpot(_from, _to : integer); + procedure AddListBox(S : string); + procedure RenewListBox; + procedure ProcessSpot(Sp : TSpot); + procedure PreProcessSpotFromZLink(S : string); + procedure TransmitSpot(S : string); // local or via network + procedure ImplementOptions; + procedure CommProcess; + procedure WriteData(str : string); + procedure WriteLine(str : string); // adds linebreak + procedure WriteLineConsole(str : string); + procedure WriteConsole(str : string); + procedure EnableConnectButton(boo : boolean); + function MaybeConnected : boolean; {returns false if port = telnet and + not connected but doesn't know abt + packet } + procedure WriteStatusLine(S : string); + procedure Renew; // red or black + procedure RemoteConnectButtonPush; + { Public declarations } + end; + +var + CommForm: TCommForm; + +implementation + +uses Main, UOptions, UZLinkForm, URigControl, uBandScope2; + +{$R *.DFM} + +procedure TCommForm.DeleteSpot(_from, _to : integer); +var i : integer; +begin + if _from < 0 then + exit; + if _to < _from then + exit; + if _to > SpotList.Count - 1 then + exit; + for i := _from to _to do + begin + TSpot(SpotList[_from]).Free; + SpotList.Delete(_from); + ListBox.Items.Delete(_from); + end; +end; + +procedure TCommForm.WriteStatusLine(S : string); +begin + StatusLine.SimpleText := S; +end; + +function TCommForm.MaybeConnected : boolean; +begin + if (Options.Settings._clusterport = 7) and (Telnet.IsConnected = False) then + Result := False + else + Result := True; +end; + +procedure TCommForm.EnableConnectButton(boo : boolean); +begin + ConnectButton.Enabled := boo; +end; + +procedure TCommForm.WriteLine(str: string); +begin + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + {if boo then + Console.WriteString(str+LineBreakCode[ord(Console.LineBreak)]);} +end; + +procedure TCommForm.WriteLineConsole(str : string); +begin + Console.WriteString(str+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TCommForm.WriteConsole(str : string); +begin + Console.WriteString(str); +end; + +procedure TCommForm.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TCommForm.WriteData(str : string); +begin + case Options.Settings._clusterport of + 1..6 : + begin + if ClusterComm.Connected then + begin + ClusterComm.SendString(str); + //repeat until AsyncComm.OutQueCount = 0; // 1.6i + //AsyncComm.Write(str[1], Length(str)); + end; + end; + 7 : if Telnet.IsConnected then + Telnet.SendStr(str); + end; +end; + +procedure TCommForm.CommReceiveData(Buffer: Pointer; + BufferLength: Word); +var str : string; +begin + str := strpas(Buffer); + CommBuffer.Add(str); +end; + +procedure TCommForm.Button1Click(Sender: TObject); +begin + Close; +end; + + +procedure TCommForm.EditKeyPress(Sender: TObject; var Key: Char); +var boo, noport : boolean; + s : string; +begin + noport := false; + case Options.Settings._clusterport of + 0 : noport := True; + 1..6 : boo := Options.Settings._clusterlocalechoCOM; + 7 : boo := Options.Settings._clusterlocalechoTELNET; + end; + s := ''; + if Key = Chr($0D) then + begin + if pos('RELAY', UpperCase(Edit.Text)) = 1 then + begin + if pos('ON', UpperCase(Edit.Text)) > 0 then + _RelayPacketData := True + else + _RelayPacketData := False; + WriteLineConsole(Edit.Text); + exit; + end; + if noport then + ZLinkForm.SendRemoteCluster(Edit.Text) + else + WriteData(Edit.Text+LineBreakCode[ord(Console.LineBreak)]); + if boo then + Console.WriteString(Edit.Text+LineBreakCode[ord(Console.LineBreak)]); + Key := Chr($0); + Edit.Text := ''; + end; + case Key of + ^A, ^B, ^C, ^D, ^E, ^F, ^G, {^H,} ^I, ^J, ^K, ^L, + ^M, ^N, ^O, ^P, ^Q, ^R, ^S, ^T, ^U, ^V, ^W, ^X, ^Y, ^Z : + begin + s := s + Key; + if noport then + ZLinkForm.SendRemoteCluster(s) + else + WriteData(s); + //Key := #0; + end; + end; +end; + +procedure TCommForm.ImplementOptions; +begin + if Options.Settings._clusterbaud <> 99 then + //AsyncComm.BaudRate := TBaudRate(Options.Settings._clusterbaud); + ClusterComm.BaudRate := TBaudRate(Options.Settings._clusterbaud+1); + if Options.Settings._clusterport in [1..6] then + begin + ClusterComm.Port := TPortNumber(Options.Settings._clusterport); + ClusterComm.Connect; + //AsyncComm.DeviceName := 'COM'+IntToStr(Options.Settings._clusterport); + //AsyncComm.Open; + end + else + begin + ClusterComm.Disconnect; + //AsyncComm.Close; + end; + + case Options.Settings._clusterport of + 1..6 : Console.LineBreak := TConsole2LineBreak(Options.Settings._clusterlinebreakCOM); + 7 : Console.LineBreak := TConsole2LineBreak(Options.Settings._clusterlinebreakTELNET); + end; + Telnet.Host := Options.Settings._clusterhost; + Telnet.Port := IntToStr(Options.Settings._clustertelnetport); + //Telnet.Port := IntToStr(Options.Settings._clusterhostport); +end; + +procedure TCommForm.FormCreate(Sender: TObject); +begin + _RelayPacketData := False; + SpotList := TList.Create; + CommStarted := False; + CommBuffer := TStringList.Create; + CommTemp := ''; + Timer1.Enabled := True; + ImplementOptions; + {if Options.Settings._clusterport in [1..6] then + begin + try + Comm.StartComm; + except + on ECommsError do + begin + Comm.StopComm; + Comm.StartComm; + end; + end; + CommStarted := True; + end;} +end; + +procedure TCommForm.AddListBox(S: string); +var _VisRows : integer; + _TopRow : integer; +begin + ListBox.Items.Add(S); + SpotIndex[ListBox.Items.Count-1] := ListBox.Items.Count - 1; + _VisRows := ListBox.ClientHeight div ListBox.ItemHeight; + _TopRow := ListBox.Items.Count - _VisRows + 1; + if _TopRow > 0 then + ListBox.TopIndex := _TopRow + else + ListBox.TopIndex := 0; +end; + +procedure TCommForm.RenewListBox; +var _VisRows : integer; + _TopRow : integer; + i : integer; +begin + _TopRow := ListBox.TopIndex; + ListBox.Clear; + for i := 0 to SpotList.Count - 1 do + begin + ListBox.Items.Add(TSpot(SpotList[i]).ClusterSummary); + SpotIndex[i] := i; + end; + _VisRows := ListBox.ClientHeight div ListBox.ItemHeight; + _TopRow := ListBox.Items.Count - _VisRows + 1; + if _TopRow > 0 then + ListBox.TopIndex := _TopRow + else + ListBox.TopIndex := 0; +end; + +procedure TCommForm.PreProcessSpotFromZLink(S : string); +var Sp : TSpot; + B : TBand; +begin + Sp := TSpot.Create; + if Sp.Analyze(S) = True then + begin + B := Sp.Band; // 1.9c modified to filter out unrelevant bands + if MainForm.BandMenu.Items[ord(B)].Visible and + MainForm.BandMenu.Items[ord(B)].Enabled then + ProcessSpot(Sp) + else + Sp.Free; + end + else + Sp.Free; +end; + +procedure TCommForm.ProcessSpot(Sp : TSpot); +var temp : string; + i : integer; + D : TBSData; + S : TSpot; + dupe, _deleted : boolean; + Expire : double; +begin + dupe := false; + _deleted := false; + + Expire := Options.Settings._spotexpire/(60*24); + for i := 0 to SpotList.Count - 1 do + begin + S := TSpot(SpotList[i]); + if Now - S.Time > Expire then + begin + SpotList[i] := nil; + S.Free; + _deleted := true; + end; + if (S.Call = Sp.Call) and (S.FreqHz = Sp.FreqHz) then + begin + dupe := true; + break; + end; + end; + + if _deleted then + begin + SpotList.Pack; + RenewListBox; + end; + + if SpotList.Count > SPOTMAX then + exit; + + if dupe then + exit; + + SpotList.Add(Sp); + + if cbNotifyCurrentBand.Checked and ({Q.QSO.}Sp.Band <> Main.CurrentQSO.QSO.Band) then + begin + end + else + begin + MyContest.MultiForm.ProcessCluster(TBaseSpot(Sp)); + end; + AddListBox(Sp.ClusterSummary); + + D := TBSData.Create; + D.Call := Sp.Call; + D.FreqHz := Sp.FreqHz; + D.CtyIndex := Sp.CtyIndex; + D.Zone := Sp.Zone; + D.Band := Sp.Band; + D.NewCty := Sp.NewCty; + D.NewZone := Sp.NewZone; + D.Worked := Sp.Worked; + D.ClusterData := True; + //BandScope.AddAndDisplay(D); + BandScope2.AddAndDisplay(D); +end; + +procedure TCommForm.TransmitSpot(S : string); // local or via network +begin + if Options.Settings._clusterport = 0 then + ZLinkForm.SendSpotViaNetwork(S) + else + WriteLine(S); +end; + +function TrimCRLF(SS : string) : string; +var S : string; +begin + S := SS; + while (length(S) > 0) and ((S[1] = Chr($0A)) or (S[1] = Chr($0D))) do + Delete(S, 1, 1); + while (length(S) > 0) and ((S[length(S)] = Chr($0A)) or (S[length(S)] = Chr($0D))) do + Delete(S, length(S), 1); + Result := S; +end; + +procedure TCommForm.CommProcess; +var max , i, j, x : integer; + str, currstr : string; + temp : string; + Sp : TSpot; +begin + max := CommBuffer.Count - 1; + for i := 0 to max do + begin + Console.WriteString(CommBuffer.Strings[i]); + end; + for i := 0 to max do + begin + str := CommBuffer.Strings[0]; + for j := 1 to length(str) do + begin + if (str[j] = Chr($0D)) or (str[j] = Chr($0A)) then + begin + if _RelayPacketData then + ZLinkForm.SendPacketData(TrimCRLF(CommTemp)); + Sp := TSpot.Create; + if Sp.Analyze(CommTemp) = True then + begin + ProcessSpot(Sp); + if Relay.Checked then + ZLinkForm.RelaySpot(CommTemp); + end + else + begin + Sp.Free; + end; + CommTemp := ''; + end + else + CommTemp := CommTemp + str[j]; + end; + CommBuffer.Delete(0); + end; +end; + +procedure TCommForm.TimerProcess; +begin + CommProcess; +end; + +procedure TCommForm.FormDestroy(Sender: TObject); +begin + inherited; + ClusterComm.Disconnect; + ClusterComm.Free; + + //if AsyncComm.Enabled then + // AsyncComm.Close; +end; + +procedure TCommForm.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + +procedure TCommForm.TelnetDisplay(Sender: TTnCnx; Str: String); +begin + CommBuffer.Add(str); +end; + +procedure TCommForm.ConnectButtonClick(Sender: TObject); +begin + Edit.SetFocus; + + if Options.Settings._clusterport = 0 then + begin + ZLinkForm.PushRemoteConnect; + exit; + end; + + if Telnet.IsConnected then + begin + Telnet.Close; + ConnectButton.Caption := 'Disconnecting...'; + end + else + begin + Telnet.Connect; + ConnectButton.Caption := 'Connecting...'; + end; +end; + +procedure TCommForm.RemoteConnectButtonPush; +begin + if (Options.Settings._clusterport = 0) then + begin + //ZLinkForm.PushRemoteConnect; + exit; + end; + + if Telnet.IsConnected then + begin + //Telnet.Close; + //ConnectButton.Caption := 'Disconnecting...'; + end + else + begin + Telnet.Connect; + ConnectButton.Caption := 'Connecting...'; + end; +end; + +procedure TCommForm.TelnetSessionConnected(Sender: TTnCnx; Error: Word); +begin + ConnectButton.Caption := 'Disconnect'; + Console.WriteString('connected to '+Telnet.Host); +end; + +procedure TCommForm.TelnetSessionClosed(Sender: TTnCnx; Error: Word); +begin + Console.WriteString('disconnected...'); + ConnectButton.Caption := 'Connect'; +end; + +(*procedure TCommForm.AsyncCommRxChar(Sender: TObject; Count: Integer); +var + Buffer: array[0..1024] of Char; + Bytes, P: Integer; + str : string; +begin + Fillchar(Buffer, Sizeof(Buffer), 0); + str := ''; + Bytes := AsyncComm.Read(Buffer, Count); + if Bytes = -1 then + exit; // error + for P := 0 to Bytes-1 do + str := str + Buffer[P]; + CommBuffer.Add(str); +end;*) + +procedure TCommForm.FormShow(Sender: TObject); +begin + ConnectButton.Enabled := (Options.Settings._clusterport = 7); +end; + +procedure TCommForm.StayOnTopClick(Sender: TObject); +begin + If StayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +procedure TCommForm.ListBoxDblClick(Sender: TObject); +var Sp : TSpot; + i : integer; +begin + if ListBox.Items[ListBox.ItemIndex] = '' then + exit; + + i := SpotIndex[ListBox.ItemIndex]; + + if SpotList.Count = 0 then + exit; + + if (i < 0) or (i > SpotList.Count - 1) then + exit; + Sp := TSpot(SpotList[i]); + + if Sp.FreqHz > 0 then + if RigControl.Rig <> nil then + RigControl.Rig.SetFreq(Sp.FreqHz); + + MainForm.UpdateBand(Sp.Band); + Main.CurrentQSO.QSO.CallSign := Sp.Call; + MainForm.CallsignEdit.Text := Sp.Call; + MainForm.NumberEdit.Text := ''; + + MainForm.LastFocus.SetFocus; +end; + +procedure TCommForm.ListBoxKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_RETURN : begin + ListBoxDblClick(Self); + end; + VK_DELETE : begin + DeleteSpot(ListBox.ItemIndex, ListBox.ItemIndex); + end; + end; +end; + +procedure TCommForm.ListBoxDrawItem(Control: TWinControl; Index: Integer; + Rect: TRect; State: TOwnerDrawState); +var Offset : integer; + S : string; +begin +with (Control as TListBox).Canvas do + begin + FillRect(Rect); { clear the rectangle } + Offset := 2; { provide default offset } + S := (Control as TListBox).Items[Index]; + if TSpot(SpotList[Index]).NewMulti then + Font.Color := clRed + else + if TSpot(SpotList[Index]).Worked then + Font.Color := clBlack + else + Font.Color := clGreen; + TextOut(Rect.Left + Offset, Rect.Top, S) { display the text } + end; +end; + +procedure TCommForm.Renew; +begin + ListBox.Refresh; +end; + +procedure TCommForm.FormActivate(Sender: TObject); +begin + {if StayOnTop.Checked = False then + FormStyle := fsNormal;} +end; + + +procedure TCommForm.ClusterCommReceiveData(Sender: TObject; + DataPtr: Pointer; DataSize: Cardinal); +var + str : string; +begin + str := StringOfChar( ' ', DataSize ); + move( DataPtr^, pchar(str)^, DataSize ); + CommBuffer.Add(str); +end; + + +procedure TCommForm.TelnetDataAvailable(Sender: TTnCnx; Buffer: Pointer; + Len: Integer); +var str : string; +begin + str := strpas(Buffer); + CommBuffer.Add(str); +end; + +end. diff --git a/src/UConsolePad.dfm b/src/UConsolePad.dfm new file mode 100644 index 00000000..235f0b78 Binary files /dev/null and b/src/UConsolePad.dfm differ diff --git a/src/UConsolePad.pas b/src/UConsolePad.pas new file mode 100644 index 00000000..9905c4dd --- /dev/null +++ b/src/UConsolePad.pas @@ -0,0 +1,90 @@ +unit UConsolePad; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls; + +type + TConsolePad = class(TForm) + ListBox: TListBox; + Panel1: TPanel; + Edit: TEdit; + procedure FormShow(Sender: TObject); + procedure EditKeyPress(Sender: TObject; var Key: Char); + procedure FormCreate(Sender: TObject); + procedure CreateParams(var Params: TCreateParams); override; + private + { Private declarations } + public + { Public declarations } + MaxLines : integer; + procedure AddLine(S : string); virtual; + end; + +var + ConsolePad: TConsolePad; + +implementation + +uses Main; + +{$R *.DFM} + +procedure TConsolePad.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TConsolePad.FormShow(Sender: TObject); +begin + Left := MainForm.Left + 30; + Top := MainForm.Top + MainForm.Height - 150; + Edit.SetFocus; +end; + +procedure TConsolePad.EditKeyPress(Sender: TObject; var Key: Char); +var str : string; +begin + case Key of + Chr($0D) : + begin + str := Edit.Text; + if str <> '' then + if str[1] <> ',' then + str := ',' + str; + Edit.Text := ''; + MainForm.ProcessConsoleCommand(str); + Key := #0; + end; + Chr($1B) : + begin + MainForm.LastFocus.SetFocus; + Key := #0; + end; + end; +end; + +procedure TConsolePad.AddLine(S : string); +var _VisRows, _TopRow : integer; +begin + if ListBox.Items.Count > MaxLines then + ListBox.Items.Delete(0); + ListBox.Items.Add(S); + + _VisRows := ListBox.ClientHeight div ListBox.ItemHeight; + _TopRow := ListBox.Items.Count - _VisRows + 1; + if _TopRow > 0 then + ListBox.TopIndex := _TopRow + else + ListBox.TopIndex := 0; +end; + +procedure TConsolePad.FormCreate(Sender: TObject); +begin + MaxLines := 10; +end; + +end. diff --git a/src/UELogJapanese.dfm b/src/UELogJapanese.dfm new file mode 100644 index 00000000..8ea717b6 --- /dev/null +++ b/src/UELogJapanese.dfm @@ -0,0 +1,509 @@ +object ELogJapanese: TELogJapanese + Left = 103 + Top = 10 + Width = 522 + Height = 712 + Caption = 'E-Log (Japanese)' + Color = clBtnFace + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 12 + object Label1: TLabel + Left = 24 + Top = 17 + Width = 86 + Height = 12 + Caption = #12467#12531#12486#12473#12488#12398#21517#31216 + end + object Label2: TLabel + Left = 24 + Top = 41 + Width = 78 + Height = 12 + Caption = #21442#21152#31278#30446#12467#12540#12489 + end + object Label3: TLabel + Left = 280 + Top = 41 + Width = 72 + Height = 12 + Caption = #21442#21152#31278#30446#21517#31216 + end + object Label4: TLabel + Left = 24 + Top = 65 + Width = 66 + Height = 12 + Caption = #12467#12540#12523#12469#12452#12531 + end + object Label5: TLabel + Left = 24 + Top = 89 + Width = 293 + Height = 12 + Caption = #36939#29992#32773#12398#12467#12540#12523#12469#12452#12531#65288#12471#12531#12464#12523#12458#12506#12391#19978#35352#12392#30064#12394#12427#22580#21512#65289 + end + object Label6: TLabel + Left = 24 + Top = 111 + Width = 132 + Height = 12 + Caption = #23616#31278#20418#25968'('#12501#12451#12540#12523#12489#12487#12540#65289 + end + object Label7: TLabel + Left = 24 + Top = 131 + Width = 120 + Height = 12 + Caption = #36899#32097#20808#20303#25152#12288#65288'5'#34892#12414#12391#65289 + end + object Label8: TLabel + Left = 24 + Top = 203 + Width = 48 + Height = 12 + Caption = #38651#35441#30058#21495 + end + object Label9: TLabel + Left = 24 + Top = 224 + Width = 152 + Height = 12 + Caption = #23616#20813#35377#32773#12398#27663#21517'('#31038#22243#12398#21517#31216')' + end + object Label10: TLabel + Left = 24 + Top = 248 + Width = 74 + Height = 12 + Caption = 'E-mail'#12450#12489#12524#12473 + end + object Label11: TLabel + Left = 24 + Top = 272 + Width = 144 + Height = 12 + Caption = #23616#20813#35377#32773#12398#28961#32218#24467#20107#32773#36039#26684 + end + object Label13: TLabel + Left = 24 + Top = 328 + Width = 36 + Height = 12 + Caption = #36939#29992#22320 + end + object Label14: TLabel + Left = 24 + Top = 296 + Width = 207 + Height = 12 + Caption = #12467#12531#12486#12473#12488#20013#20351#29992#12375#12383#26368#22823#31354#20013#32218#38651#21147'(W)' + end + object Label15: TLabel + Left = 280 + Top = 328 + Width = 68 + Height = 12 + Caption = #20351#29992#12375#12383#38651#28304 + end + object Label16: TLabel + Left = 24 + Top = 422 + Width = 82 + Height = 12 + Caption = #24847#35211#65288'10'#34892#12414#12391#65289 + end + object Label17: TLabel + Left = 24 + Top = 464 + Width = 448 + Height = 12 + Caption = #12510#12523#12481#12458#12506#12289#12466#12473#12488#12458#12506#12398#22580#21512#12398#36939#29992#32773#12398#12467#12540#12523#12469#12452#12531#65288#27663#21517#65289#12362#12424#12403#28961#32218#24467#20107#32773#12398#36039#26684' ' + end + object Label18: TLabel + Left = 24 + Top = 494 + Width = 79 + Height = 12 + Caption = #30331#37682#12463#12521#12502#30058#21495 + end + object Label19: TLabel + Left = 24 + Top = 520 + Width = 79 + Height = 12 + Caption = #30331#37682#12463#12521#12502#21517#31216 + end + object Label20: TLabel + Left = 24 + Top = 544 + Width = 36 + Height = 12 + Caption = #23459#35475#25991 + end + object Label21: TLabel + Left = 24 + Top = 624 + Width = 24 + Height = 12 + Caption = #26085#20184 + end + object Label23: TLabel + Left = 285 + Top = 621 + Width = 24 + Height = 12 + Caption = #32626#21517 + end + object Label12: TLabel + Left = 24 + Top = 353 + Width = 398 + Height = 12 + Caption = #20351#29992#12375#12383#35373#20633#65288#12522#12464#21517#31216#65288#33258#20316#12398#22580#21512#12399#32066#27573#31649#21517#31216#12539#20491#25968#65289#12289#31354#20013#32218#65289' '#65288'5'#34892#12414#12391#65289 + end + object mOath: TMemo + Left = 24 + Top = 560 + Width = 465 + Height = 47 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + Lines.Strings = ( + #31169#12399#12289'JARL'#21046#23450#12398#12467#12531#12486#12473#12488#35215#32004#12362#12424#12403#38651#27874#27861#20196#12395#12375#12383#12364#12356#36939#29992#12375#12383#32080#26524#12289#12371#12371 + #12395#25552#20986#12377#12427#12469#12510#12522#12540#12471#12540#12488#12362#12424#12403#12525#12464#12471#12540#12488#12394#12393#12364#20107#23455#12392#30456#36949#12394#12356#12418#12398#12391#12354#12427#12371#12392#12434 + #12289#31169#12398#21517#35465#12395#12362#12356#12390#35475#12356#12414#12377#12290) + ParentFont = False + ScrollBars = ssVertical + TabOrder = 0 + end + object edContestName: TEdit + Left = 116 + Top = 13 + Width = 373 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 1 + Text = #12467#12531#12486#12473#12488 + end + object edCategoryName: TEdit + Left = 367 + Top = 36 + Width = 121 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 2 + Text = #12467#12531#12486#12473#12488 + end + object edCallsign: TEdit + Left = 116 + Top = 61 + Width = 121 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 3 + Text = #12467#12531#12486#12473#12488 + end + object edOpCallsign: TEdit + Left = 367 + Top = 85 + Width = 121 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 4 + Text = #12467#12531#12486#12473#12488 + end + object edCategoryCode: TEdit + Left = 116 + Top = 37 + Width = 121 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 5 + Text = #12467#12531#12486#12473#12488 + end + object edFDCoefficient: TEdit + Left = 164 + Top = 107 + Width = 45 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 6 + Text = #12467#12531#12486#12473#12488 + end + object edTEL: TEdit + Left = 116 + Top = 199 + Width = 121 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 7 + Text = #12467#12531#12486#12473#12488 + end + object edOPName: TEdit + Left = 180 + Top = 220 + Width = 301 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 8 + Text = #12467#12531#12486#12473#12488 + end + object edEMail: TEdit + Left = 116 + Top = 244 + Width = 253 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 9 + Text = #12467#12531#12486#12473#12488 + end + object edLicense: TEdit + Left = 180 + Top = 268 + Width = 189 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 10 + Text = #12467#12531#12486#12473#12488 + end + object edPower: TEdit + Left = 244 + Top = 292 + Width = 125 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 11 + Text = #12467#12531#12486#12473#12488 + end + object rPowerType: TRadioGroup + Left = 376 + Top = 280 + Width = 105 + Height = 39 + Columns = 2 + ItemIndex = 0 + Items.Strings = ( + #23450#26684 + #23455#28204) + TabOrder = 12 + end + object edQTH: TEdit + Left = 116 + Top = 324 + Width = 121 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 13 + Text = #12467#12531#12486#12473#12488 + end + object edClubID: TEdit + Left = 116 + Top = 490 + Width = 121 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 14 + Text = #12467#12531#12486#12473#12488 + end + object edPowerSupply: TEdit + Left = 372 + Top = 324 + Width = 121 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 15 + Text = #12467#12531#12486#12473#12488 + end + object mComments: TMemo + Left = 24 + Top = 438 + Width = 465 + Height = 47 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + ScrollBars = ssVertical + TabOrder = 16 + end + object edClubName: TEdit + Left = 116 + Top = 514 + Width = 373 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 17 + Text = #12467#12531#12486#12473#12488 + end + object edDate: TEdit + Left = 108 + Top = 618 + Width = 121 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 18 + Text = #12467#12531#12486#12473#12488 + end + object edSignature: TEdit + Left = 369 + Top = 618 + Width = 121 + Height = 21 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + ParentFont = False + TabOrder = 19 + end + object btnCreateLog: TButton + Left = 208 + Top = 648 + Width = 89 + Height = 23 + Caption = 'E-log'#20316#25104 + TabOrder = 20 + OnClick = btnCreateLogClick + end + object btnSave: TButton + Left = 104 + Top = 648 + Width = 89 + Height = 23 + Caption = 'Save' + TabOrder = 21 + OnClick = btnSaveClick + end + object btnCancel: TButton + Left = 312 + Top = 648 + Width = 89 + Height = 23 + Caption = 'Close' + TabOrder = 22 + OnClick = btnCancelClick + end + object mAddress: TMemo + Left = 24 + Top = 147 + Width = 465 + Height = 47 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + MaxLength = 400 + ParentFont = False + ScrollBars = ssVertical + TabOrder = 23 + end + object mEquipment: TMemo + Left = 24 + Top = 368 + Width = 465 + Height = 47 + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + MaxLength = 800 + ParentFont = False + ScrollBars = ssVertical + TabOrder = 24 + end +end diff --git a/src/UELogJapanese.pas b/src/UELogJapanese.pas new file mode 100644 index 00000000..d780a5f7 --- /dev/null +++ b/src/UELogJapanese.pas @@ -0,0 +1,332 @@ +unit UELogJapanese; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls, ExtCtrls, zLogGlobal; + +type + TELogJapanese = class(TForm) + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label6: TLabel; + Label7: TLabel; + Label8: TLabel; + Label9: TLabel; + Label10: TLabel; + Label11: TLabel; + Label13: TLabel; + Label14: TLabel; + Label15: TLabel; + Label16: TLabel; + Label17: TLabel; + Label18: TLabel; + Label19: TLabel; + Label20: TLabel; + Label21: TLabel; + Label23: TLabel; + mOath: TMemo; + edContestName: TEdit; + edCategoryName: TEdit; + edCallsign: TEdit; + edOpCallsign: TEdit; + edCategoryCode: TEdit; + edFDCoefficient: TEdit; + edTEL: TEdit; + edOPName: TEdit; + edEMail: TEdit; + edLicense: TEdit; + edPower: TEdit; + rPowerType: TRadioGroup; + edQTH: TEdit; + edClubID: TEdit; + edPowerSupply: TEdit; + mComments: TMemo; + edClubName: TEdit; + edDate: TEdit; + edSignature: TEdit; + btnCreateLog: TButton; + btnSave: TButton; + btnCancel: TButton; + mAddress: TMemo; + mEquipment: TMemo; + Label12: TLabel; + procedure btnCreateLogClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure btnSaveClick(Sender: TObject); + procedure btnCancelClick(Sender: TObject); + private + { Private 錾 } + public + { Public 錾 } + procedure RemoveBlankLines(M : TMemo); + procedure InitializeFields; + end; + +var + ELogJapanese: TELogJapanese; + +implementation + +uses Main, UOptions; + +{$R *.dfm} + +procedure TELogJapanese.RemoveBlankLines(M : TMemo); +var i : integer; +begin + i := M.Lines.Count-1; + while i >= 0 do + begin + if M.Lines[i] = '' then + M.Lines.Delete(i) + else + break; + dec(i); + end; +end; + +procedure TELogJapanese.InitializeFields; + +begin + + edContestName.Text := MyContest.Name; + edCategoryCode.Text := Options.Ini.GetString('SummaryInfo', 'CategoryCode', ''); + edCategoryName.Text := Options.Ini.GetString('SummaryInfo', 'CategoryName', ''); + edCallsign.Text := Options.MyCall; + edOpCallsign.Text := Options.Ini.GetString('SummaryInfo', 'OperatorCallsign', ''); + edFDCoefficient.Text := Options.Ini.GetString('SummaryInfo', 'FDCoefficient', '1'); + + mAddress.Clear; + mAddress.Lines[0] := Options.Ini.GetString('SummaryInfo', 'Address1', ''); + mAddress.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Address2', '')); + mAddress.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Address3', '')); + mAddress.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Address4', '')); + mAddress.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Address5', '')); + RemoveBlankLines(mAddress); + + edTEL.Text := Options.Ini.GetString('SummaryInfo', 'Telephone', ''); + edOPName.Text := Options.Ini.GetString('SummaryInfo', 'OperatorName', ''); + edEMail.Text := Options.Ini.GetString('SummaryInfo', 'EMail', ''); + edLicense.Text := Options.Ini.GetString('SummaryInfo', 'License', ''); + edPower.Text := Options.Ini.GetString('SummaryInfo', 'Power', ''); + rPowerType.ItemIndex := Options.Ini.GetInteger('SummaryInfo','PowerType',0); + edQTH.Text := Options.Ini.GetString('SummaryInfo', 'QTH', ''); + edPowerSupply.Text := Options.Ini.GetString('SummaryInfo', 'PowerSupply', ''); + + mEquipment.Clear; + mEquipment.Lines[0] := Options.Ini.GetString('SummaryInfo', 'Equipment1', ''); + mEquipment.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Equipment2', '')); + mEquipment.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Equipment3', '')); + mEquipment.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Equipment4', '')); + mEquipment.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Equipment5', '')); + RemoveBlankLines(mEquipment); + + mComments.Clear; + mComments.Lines[0] := Options.Ini.GetString('SummaryInfo', 'Comment1', ''); + mComments.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Comment2', '')); + mComments.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Comment3', '')); + mComments.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Comment4', '')); + mComments.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Comment5', '')); + mComments.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Comment6', '')); + mComments.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Comment7', '')); + mComments.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Comment8', '')); + mComments.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Comment9', '')); + mComments.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Comment10', '')); + RemoveBlankLines(mComments); + + edClubID.Text := Options.Ini.GetString('SummaryInfo', 'ClubID', ''); + edClubName.Text := Options.Ini.GetString('SummaryInfo', 'ClubName', ''); + + mOath.Clear; + mOath.Lines[0] := Options.Ini.GetString('SummaryInfo', 'Oath1', '́AJARL'+ + '̃ReXgK񂨂ѓdg@߂ɂ^pʁA'+ + 'ɒoT}[V[gуOV[gȂǂƑ'+ + '̂ł邱ƂA̖_ɂĐ܂B'); + + mOath.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Oath2', '')); + mOath.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Oath3', '')); + mOath.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Oath4', '')); + mOath.Lines.Add(Options.Ini.GetString('SummaryInfo', 'Oath5', '')); + RemoveBlankLines(mOath); + + edDate.Text := FormatDateTime('yyyy"N"m""d""',Now); + +end; + +procedure TELogJapanese.btnCreateLogClick(Sender: TObject); +var f : textfile; + S, str, fname : string; + i : integer; + B : TBand; +begin + MainForm.GeneralSaveDialog.DefaultExt := 'em'; + MainForm.GeneralSaveDialog.Filter := 'JARL E-log files (*.em)|*.em'; + MainForm.GeneralSaveDialog.Title := 'Save E-Log file'; + if CurrentFileName <> '' then + begin + str := CurrentFileName; + str := Copy(str, 0, length(str) - length(ExtractFileExt(str))); + str := str + '.em'; + MainForm.GeneralSaveDialog.FileName := str; + end; + if MainForm.GeneralSaveDialog.Execute then + fname := MainForm.GeneralSaveDialog.FileName + else + exit; + + assignfile(f, fname); + rewrite(f); + + writeln(f, ''); + writeln(f, ''+edContestName.Text+''); + writeln(f, ''+edCategoryCode.Text+''); + writeln(f, ''+edCategoryName.Text+''); + writeln(f, ''+edCallsign.Text+''); + writeln(f, ''+edOpCallsign.Text+''); + + for b := b19 to HiBand do + begin + if MyContest.ScoreForm.QSO[b] > 0 then + begin + if b = b10G then + writeln(f, ''+MyContest.ScoreForm.QPMStr(b)+'') + else + writeln(f, ''+MyContest.ScoreForm.QPMStr(b)+''); + end; + end; + writeln(f, ''+MyContest.ScoreForm.TotalQPMStr+''); + + try + i := StrToInt(edFDCoefficient.Text); + except + on EConvertError do + i := 1 + end; + if i <> 0 then + writeln(f, ''+IntToStr(i)+''); + + writeln(f, '' + IntToStr(MyContest.ScoreForm._TotalMulti*MyContest.ScoreForm._TotalPoints*i)+ + ''); + + writeln(f, '
'); + writeln(f, mAddress.Text); + writeln(f, '
'); + + writeln(f, ''+edTEL.Text+''); + writeln(f, ''+edOPName.Text+''); + writeln(f, ''+edEMAIL.Text+''); + writeln(f, ''+edLicense.Text+''); + writeln(f, ''+edPOWER.Text+''); + + if rPowerType.ItemIndex = 0 then + writeln(f,'io') + else + writeln(f,'o'); + + writeln(f, ''+edQTH.Text+''); + writeln(f, ''+edPowerSupply.Text+''); + + writeln(f, ''); + writeln(f, mEquipment.Text); + writeln(f, ''); + + writeln(f, ''); + writeln(f, mComments.Text); + writeln(f, ''); + + writeln(f, ''+edClubID.Text+''); + writeln(f, ''+edClubName.Text+''); + + writeln(f, ''); + writeln(f, mOath.Text); + writeln(f, ''); + + writeln(f, ''+edDate.Text+''); + writeln(f, ''+edSignature.Text+''); + + writeln(f, '
'); + + writeln(f, ''); + + writeln(f, 'Date Time Callsign RSTs ExSent RSTr ExRcvd Mult Mult2 MHz Mode Pt Memo'); + for i := 1 to Log.TotalQSO do + writeln(f, TQSO(Log.List[i]).zLogALL); + + writeln(f, ''); + + + + {for i := 1 to TotalQSO do + writeln(f, TQSO(List[i]).zLogALL);} + closefile(f); +end; + +procedure TELogJapanese.FormCreate(Sender: TObject); +begin + //InitializeFields; +end; + +procedure TELogJapanese.btnSaveClick(Sender: TObject); +begin + + Options.Ini.SetString('SummaryInfo', 'CategoryCode', edCategoryCode.Text); + Options.Ini.SetString('SummaryInfo', 'CategoryName', edCategoryName.Text); + Options.Ini.SetString('SummaryInfo', 'OperatorCallsign', edOpCallsign.Text); + Options.Ini.SetString('SummaryInfo', 'FDCoefficient', edFDCoefficient.Text); + + Options.Ini.SetString('SummaryInfo', 'Address1', mAddress.Lines[0]); + Options.Ini.SetString('SummaryInfo', 'Address2', mAddress.Lines[1]); + Options.Ini.SetString('SummaryInfo', 'Address3', mAddress.Lines[2]); + Options.Ini.SetString('SummaryInfo', 'Address4', mAddress.Lines[3]); + Options.Ini.SetString('SummaryInfo', 'Address5', mAddress.Lines[4]); + + Options.Ini.SetString('SummaryInfo', 'Telephone', edTEL.Text); + Options.Ini.SetString('SummaryInfo', 'OperatorName', edOPName.Text); + Options.Ini.SetString('SummaryInfo', 'EMail', edEMail.Text); + + Options.Ini.SetString('SummaryInfo', 'License', edLicense.Text); + + Options.Ini.SetString('SummaryInfo', 'Power', edPower.Text); + Options.Ini.SetInteger('SummaryInfo','PowerType',rPowerType.ItemIndex); + Options.Ini.SetString('SummaryInfo', 'QTH', edQTH.Text); + Options.Ini.SetString('SummaryInfo', 'PowerSupply', edPowerSupply.Text); + + Options.Ini.SetString('SummaryInfo', 'Equipment1', mEquipment.Lines[0]); + Options.Ini.SetString('SummaryInfo', 'Equipment2', mEquipment.Lines[1]); + Options.Ini.SetString('SummaryInfo', 'Equipment3', mEquipment.Lines[2]); + Options.Ini.SetString('SummaryInfo', 'Equipment4', mEquipment.Lines[3]); + Options.Ini.SetString('SummaryInfo', 'Equipment5', mEquipment.Lines[4]); + + Options.Ini.SetString('SummaryInfo', 'Comment1', mComments.Lines[0]); + Options.Ini.SetString('SummaryInfo', 'Comment2', mComments.Lines[1]); + Options.Ini.SetString('SummaryInfo', 'Comment3', mComments.Lines[2]); + Options.Ini.SetString('SummaryInfo', 'Comment4', mComments.Lines[3]); + Options.Ini.SetString('SummaryInfo', 'Comment5', mComments.Lines[4]); + Options.Ini.SetString('SummaryInfo', 'Comment6', mComments.Lines[5]); + Options.Ini.SetString('SummaryInfo', 'Comment7', mComments.Lines[6]); + Options.Ini.SetString('SummaryInfo', 'Comment8', mComments.Lines[7]); + Options.Ini.SetString('SummaryInfo', 'Comment9', mComments.Lines[8]); + Options.Ini.SetString('SummaryInfo', 'Comment10', mComments.Lines[9]); + + Options.Ini.SetString('SummaryInfo', 'ClubID', edClubID.Text); + Options.Ini.SetString('SummaryInfo', 'ClubName', edClubName.Text); + + Options.Ini.SetString('SummaryInfo', 'Oath1', mOath.Lines[0]); + Options.Ini.SetString('SummaryInfo', 'Oath2', mOath.Lines[1]); + Options.Ini.SetString('SummaryInfo', 'Oath3', mOath.Lines[2]); + Options.Ini.SetString('SummaryInfo', 'Oath4', mOath.Lines[3]); + Options.Ini.SetString('SummaryInfo', 'Oath5', mOath.Lines[4]); + +end; + +procedure TELogJapanese.btnCancelClick(Sender: TObject); +begin + Close; +end; + +end. diff --git a/src/UEditDialog.dfm b/src/UEditDialog.dfm new file mode 100644 index 00000000..851e1a21 Binary files /dev/null and b/src/UEditDialog.dfm differ diff --git a/src/UEditDialog.pas b/src/UEditDialog.pas new file mode 100644 index 00000000..bbc6b21b --- /dev/null +++ b/src/UEditDialog.pas @@ -0,0 +1,905 @@ +unit UEditDialog; + +interface + +uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, + Buttons, ExtCtrls, zLogGlobal, Menus, UzLogCW, UzLogVoice, BGK32LIB; + + +const _ActInsert = 0; + _ActChange = 1; + +type + TEditDialog = class(TForm) + OKBtn: TButton; + CancelBtn: TButton; + Panel1: TPanel; + TimeEdit: TEdit; + CallsignEdit: TEdit; + RcvdRSTEdit: TEdit; + NumberEdit: TEdit; + BandEdit: TEdit; + ModeEdit: TEdit; + MemoEdit: TEdit; + PointEdit: TEdit; + PowerEdit: TEdit; + BandMenu: TPopupMenu; + OpEdit: TEdit; + ModeMenu: TPopupMenu; + OpMenu: TPopupMenu; + SerialEdit: TEdit; + SerialLabel: TLabel; + TimeLabel: TLabel; + rcvdRSTLabel: TLabel; + CallsignLabel: TLabel; + PointLabel: TLabel; + BandLabel: TLabel; + NumberLabel: TLabel; + ModeLabel: TLabel; + PowerLabel: TLabel; + OpLabel: TLabel; + MemoLabel: TLabel; + DateEdit: TEdit; + NewPowerMenu: TPopupMenu; + NewPowerEdit: TEdit; + MainMenu1: TMainMenu; + edit1: TMenuItem; + op1: TMenuItem; + procedure CancelBtnClick(Sender: TObject); + procedure OKBtnClick(Sender: TObject); + procedure CallsignEditChange(Sender: TObject); + procedure EditKeyPress(Sender: TObject; var Key: Char); + procedure NumberEditChange(Sender: TObject); + procedure NumberEditKeyPress(Sender: TObject; var Key: Char); + procedure BandEditClick(Sender: TObject); + procedure OpMenuClick(Sender: TObject); + procedure BandMenuClick(Sender: TObject); + procedure ModeMenuClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure RcvdRSTEditChange(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure MemoEditChange(Sender: TObject); + procedure TimeEditChange(Sender: TObject); + procedure DateEditChange(Sender: TObject); + procedure DateEditDblClick(Sender: TObject); + procedure EditKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure NewPowerMenuClick(Sender: TObject); + procedure NewPowerEditClick(Sender: TObject); + procedure ModeEditClick(Sender: TObject); + procedure PowerEditChange(Sender: TObject); + procedure op1Click(Sender: TObject); + procedure OpEditClick(Sender: TObject); + private + { Private declarations } + public + index : integer; + workQSO : TQSO; + origQSO : TQSO; + Action : integer; + procedure Init(aQSO : TQSO; index_ : integer; Action_ : integer); virtual; + procedure ChangePower; virtual; + { Public declarations } + end; + +var + EditDialog: TEditDialog; + +implementation + +uses Main, UOptions, UZLinkForm, UPartials, URigControl; +{$R *.DFM} + +procedure TEditDialog.ChangePower; +begin + if workQSO.QSO.Power = pwrH then + workQSO.QSO.Power := pwrP + else + inc(workQSO.QSO.Power); + NewPowerEdit.Text := workQSO.NewPowerStr; +end; + +procedure TEditDialog.Init(aQSO : TQSO; index_ :integer; Action_ : integer); +begin + Action := Action_; + ZLinkForm.LockQSO(aQSO); // lock it anyway + {if Action = _ActChange then + begin + ZLinkForm.LockQSO(aQSO); + end;} + case Action of + _ActChange : EditDialog.Caption := 'Edit QSO'; + _ActInsert : EditDialog.Caption := 'Insert QSO'; + end; + index := index_; + + workQSO := TQSO.Create; + origQSO := TQSO.Create; + workQSO.QSO := aQSO.QSO; + origQSO.QSO := aQSO.QSO; + + if Action = _ActInsert then + begin + workQSO.QSO.Callsign := ''; + workQSO.QSO.NRRcvd := ''; + workQSO.QSO.memo := ''; + end; + + TimeEdit.Visible := True; + DateEdit.Visible := False; + TimeLabel.Caption := 'time'; + + SerialEdit.Text := workQSO.SerialStr; + TimeEdit.Text := workQSO.TimeStr; + DateEdit.Text := workQSO.DateStr; + CallsignEdit.Text := workQSO.QSO.callsign; + RcvdRSTEdit.Text := workQSO.RSTStr; + NumberEdit.Text := workQSO.QSO.NrRcvd; + ModeEdit.Text := workQSO.ModeStr; + BandEdit.Text := workQSO.BandStr; + PowerEdit.Text := workQSO.PowerStr; + NewPowerEdit.Text := workQSO.NewPowerStr; + PointEdit.Text := workQSO.PointStr; + MemoEdit.Text := workQSO.QSO.memo; + OpEdit.Text := workQSO.QSO.Operator; +end; + +procedure TEditDialog.CancelBtnClick(Sender: TObject); +begin + workQSO.Free; + MainForm.LastFocus.SetFocus; + ZLinkForm.UnlockQSO(origQSO); + origQSO.Free; + ModalResult := mrCancel; + Close; +end; + +procedure TEditDialog.OKBtnClick(Sender: TObject); +var i, j : integer; + aQSO : TQSO; +begin + +// Main.StartDebugTimer; + + MyContest.SetNrSent(workQSO); + + try + i := StrToInt(SerialEdit.Text); + except + on EConvertError do + i := 0; + end; + if i > 0 then + workQSO.QSO.Serial := i; + + if Action = _ActChange then + begin + IncEditCounter(workQSO); + //ZLinkForm.EditQSO(origQSO, workQSO); {ZLinkForm takes care of Z-Link availability} + ZLinkForm.EditQSObyID(workQSO); + //ZLinkForm.EditQSO(TQSO(Log.List[index]), workQSO); {ZLinkForm takes care of Z-Link availability} + //TQSO(Log.List[index]).QSO := workQSO.QSO; + origQSO.QSO.Reserve := actEdit; + workQSO.QSO.Reserve := actEdit; + //Log.AddQue(origQSO); + Log.AddQue(workQSO); + Log.ProcessQue; + { + for i := 1 to Log.TotalQSO do + begin + if SameQSO(TQSO(Log.List[i]), origQSO) then + TQSO(Log.List[i]).QSO := workQSO.QSO; + break; + end; } + workQSO.Free; + ZLinkForm.UnlockQSO(origQSO); + //Main.EndDebugTimer; + end; + if Action = _ActInsert then + begin + //ZLinkForm.InsertQSO(origQSO, workQSO); + origQSO.QSO.Reserve := actInsert; + workQSO.QSO.Reserve := actInsert; + repeat + j := MainForm.NewQSOID; + until Log.CheckQSOID(j) = False; + + workQSO.QSO.Reserve2 := origQSO.QSO.Reserve3; + workQSO.QSO.Reserve3 := j; + + ZLinkForm.InsertQSO(workQSO); + //Log.AddQue(origQSO); + Log.AddQue(workQSO); + Log.ProcessQue; + workQSO.Free; + ZLinkForm.UnlockQSO(origQSO); + + + {aQSO := TQSO.Create; + aQSO.QSO := workQSO.QSO; + Log.Insert(index, aQSO); + ZLinkForm.InsertQSO(workQSO, index); + workQSO.Free;} + end; + origQSO.Free; +// Main.StartDebugTimer; + MyContest.Renew; +// Main.EndDebugTimer; + //MainForm.EditScreen.RefreshScreen; + MainForm.Grid.SetFocus; + ModalResult := mrOK; + close; + //close; + //MainForm.LastFocus.SetFocus; + + {if Log.IsDupe2(workQSO, index, dupeindex) then + begin + x := More(index, dupeindex); + y := Less(index, dupeindex); + TQSO(Log.List[x]).QSO.Points := 0; + TQSO(Log.List[x]).QSO.memo := '-DUPE- '+TQSO(Log.List[x]).QSO.memo; + end } +end; + +procedure TEditDialog.CallsignEditChange(Sender: TObject); +begin + workQSO.QSO.Callsign := CallsignEdit.Text; +end; + +procedure TEditDialog.EditKeyPress(Sender: TObject; var Key: Char); +var dupeindex : integer; + j : integer; +begin + MainForm.CommonEditKeyProcess(Sender, Key); + case Key of + '\' : + begin + ControlPTT(not(PTTIsOn)); // toggle PTT; + Key := #0; + end; + 'X','x' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + RigControl.ToggleCurrentRig; + Key := #0; + end; + end; + 'V','v' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + if RigControl.Rig <> nil then + RigControl.Rig.ToggleVFO; + Key := #0; + end; + end; + ^O : + begin + workQSO.DecTime; + //TimeEdit.Text := CurrentQSO.TimeStr; + //DateEdit.Text := CurrentQSO.DateStr; + TimeEdit.Text := workQSO.TimeStr; + DateEdit.Text := workQSO.DateStr; + Key := #0; + end; + ^P : + begin + workQSO.IncTime; + TimeEdit.Text := workQSO.TimeStr; + DateEdit.Text := workQSO.DateStr; + Key := #0; + end; + ^W : + begin + TEdit(Sender).Clear; + Key := #0; + end; + ^R : + begin + Options.ReversePaddle; + Key := #0; + end; + ^K : + begin + CallsignEdit.Clear; + NumberEdit.Clear; + MemoEdit.Clear; + CallsignEdit.SetFocus; + Key := #0; + end; + 'Z' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + if Main.CurrentQSO.QSO.mode = mCW then + begin + MainForm.CQRepeatClick1(Sender); + end + else + begin + end; + Key := #0; + end; + end; + ^Z : + begin + if Main.CurrentQSO.QSO.mode = mCW then + MainForm.CQRepeatClick2(Sender); + Key := #0; + end; + (*Chr($1B) : {ESC} + begin + MainForm.CWStopButtonClick(Self); + MainForm.VoiceStopButtonClick(Self); + Key := #0; + end;*) + ' ' : + begin + if TEdit(Sender).Name = 'MemoEdit' then + begin + if Options.Settings._movetomemo then + begin + Key := #0; + CallsignEdit.SetFocus; + end; + exit; + end; + if (TEdit(Sender).Name = 'NumberEdit') or (TEdit(Sender).Name = 'TimeEdit') then + begin + Key := #0; + if Options.Settings._movetomemo then + MemoEdit.SetFocus + else + CallsignEdit.SetFocus; + end + else {if space is pressed when Callsign edit is in focus} + begin + if NumberEdit.Text = '' then + begin + end; + Key := Chr(0); + if Log.IsDupe2(workQSO, index, dupeindex) then + begin + CallsignEdit.SelectAll; + exit; + end; + NumberEdit.SetFocus; + end; + end; + 'Y','y' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + IncCWSpeed; + Key := #0; + end; + end; + 'T','t' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + workQSO.UpdateTime; + TimeEdit.Text := workQSO.TimeStr; + DateEdit.Text := workQSO.DateStr; + Key := #0; + end; + end; + 'U','u' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + DecCWSpeed; + Key := #0; + end; + end; + 'B','b' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + // ChangeBand(True); + //MainForm.SetQSOBand(workQSO, True); + workQSO.QSO.Band := MainForm.GetNextBand(workQSO.QSO.Band, True); + BandEdit.Text := MHzString[workQSO.QSO.Band]; + Key := #0; + end; + end; + 'R','r' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + MainForm.SetR(workQSO); + RcvdRSTEdit.Text := workQSO.RSTStr; + Key := #0; + end; + end; + 'S','s' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + MainForm.SetS(workQSO); + RcvdRSTEdit.Text := workQSO.RSTStr; + Key := #0; + end; + end; + 'M','m' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + // ChangeMode; + MainForm.SetQSOMode(workQSO); + ModeEdit.Text := ModeString[workQSO.QSO.Mode]; + if workQSO.QSO.Mode in [mSSB, mFM, mAM] then + begin + workQSO.QSO.RSTrcvd := 59; + workQSO.QSO.RSTsent := 59; + RcvdRSTEdit.Text := '59'; + end + else + begin + workQSO.QSO.RSTrcvd := 599; + workQSO.QSO.RSTsent := 599; + RcvdRSTEdit.Text := '599'; + end; + Key := #0; + end; + end; + 'P','p' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + ChangePower; + Key := #0; + end; + end; + Chr($0D) : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + end; + OKBtnClick(Self); + Key := #0; + end; + end; + { of case } +end; + + + + + +procedure TEditDialog.NumberEditChange(Sender: TObject); +begin + workQSO.QSO.NrRcvd := NumberEdit.Text; +end; + +procedure TEditDialog.NumberEditKeyPress(Sender: TObject; var Key: Char); +begin + case Key of + ' ' : begin + Key := Chr(0); + CallsignEdit.SetFocus; + end; + Chr($0D) : begin + OKBtnClick(Self); + Key := #0; + end; + end; { of case } +end; + +procedure TEditDialog.BandEditClick(Sender: TObject); +begin + BandMenu.Popup(Self.Left+Panel1.Left+BandEdit.Left + 10, Self.Top+Panel1.Top+BandEdit.Top + 40); +end; + +procedure TEditDialog.OpMenuClick(Sender: TObject); +var O : string; +begin + O := TMenuItem(Sender).Caption; + if O = 'Clear' then O := ''; + OpEdit.Text := O; + workQSO.QSO.Operator := O; +end; + +procedure TEditDialog.BandMenuClick(Sender: TObject); +var T : byte; + B : TBand; +begin + T := TMenuItem(Sender).Tag; + B := TBand(T); + BandEdit.Text := MHzString[B]; + workQSO.QSO.band := B; +end; + +procedure TEditDialog.ModeMenuClick(Sender: TObject); +var T : byte; + M : TMode; +begin + ModeEdit.Text := ModeString[TMode(TMenuItem(Sender).Tag)]; + workQSO.QSO.mode := TMode(TMenuItem(Sender).Tag); + If TMenuItem(Sender).Tag in [1..3] then + begin + workQSO.QSO.RSTrcvd := 59; + workQSO.QSO.RSTsent := 59; + RcvdRSTEdit.Text := '59'; + end + else + begin + workQSO.QSO.RSTrcvd := 599; + workQSO.QSO.RSTsent := 599; + RcvdRSTEdit.Text := '599'; + end; +end; + +procedure TEditDialog.FormShow(Sender: TObject); +var i : integer; + M : TMenuItem; +const offset = 3; +begin + CallsignEdit.SetFocus; + for i := 0 to MainForm.BandMenu.Items.Count-1 do + begin + BandMenu.Items[i].Enabled := MainForm.BandMenu.Items[i].Enabled; + BandMenu.Items[i].Visible := MainForm.BandMenu.Items[i].Visible; + end; + for i := 0 to MainForm.ModeMenu.Items.Count-1 do + begin + ModeMenu.Items[i].Enabled := MainForm.ModeMenu.Items[i].Enabled; + ModeMenu.Items[i].Visible := MainForm.ModeMenu.Items[i].Visible; + end; + for i := 0 to MainForm.NewPowerMenu.Items.Count-1 do + begin + NewPowerMenu.Items[i].Enabled := MainForm.ModeMenu.Items[i].Enabled; + NewPowerMenu.Items[i].Visible := MainForm.ModeMenu.Items[i].Visible; + end; + + OpEdit.Visible := (Options.MultiOp > 0); + OpLabel.Visible := OpEdit.Visible; + + if MainForm.OpMenu.Items.Count > 0 then // update op menu 1.31 + begin + if OpMenu.Items.Count > 0 then + for i := 0 to OpMenu.Items.Count-1 do + OpMenu.Items.Delete(0); + for i := 0 to MainForm.OpMenu.Items.Count-1 do + begin + M := TMenuItem.Create(Self); + M.Caption := MainForm.OpMenu.Items[i].Caption; + M.OnClick := OpMenuClick; + M.Enabled := MainForm.OpMenu.Items[i].Enabled; + M.Visible := MainForm.OpMenu.Items[i].Visible; + M.Tag := MainForm.OpMenu.Items[i].Tag; + OpMenu.Items.Add(M); + end; + end; + + SerialEdit.Visible := MainForm.SerialEdit.Visible; + SerialEdit.Left := MainForm.SerialEdit.Left + offset; + SerialEdit.Width := MainForm.SerialEdit.Width; + SerialLabel.Visible := SerialEdit.Visible; + SerialLabel.Left := SerialEdit.Left+1; + + TimeEdit.Left := MainForm.TimeEdit.Left + offset; + TimeEdit.Width := MainForm.TimeEdit.Width; + TimeLabel.Left := TimeEdit.Left+1; + + DateEdit.Left := TimeEdit.Left; + DateEdit.Width := TimeEdit.Width; + + CallsignEdit.Left := MainForm.CallsignEdit.Left + offset; + CallsignEdit.Width := MainForm.CallsignEdit.Width; + CallsignLabel.Left := CallsignEdit.Left+1; + + rcvdRSTEdit.Left := MainForm.rcvdRSTEdit.Left + offset; + rcvdRSTEdit.Width := MainForm.rcvdRSTEdit.Width; + rcvdRSTLabel.Left := rcvdRSTEdit.Left+1; + + NumberEdit.Left := MainForm.NumberEdit.Left + offset; + NumberEdit.Width := MainForm.NumberEdit.Width; + NumberLabel.Left := NumberEdit.Left+1; + + BandEdit.Left := MainForm.BandEdit.Left + offset; + BandEdit.Width := MainForm.BandEdit.Width; + BandLabel.Left := BandEdit.Left+1; + + ModeEdit.Left := MainForm.ModeEdit.Left + offset; + ModeEdit.Width := MainForm.ModeEdit.Width; + ModeEdit.Visible := MainForm.ModeEdit.Visible; + ModeLabel.Visible := ModeEdit.Visible; + ModeLabel.Left := ModeEdit.Left+1; + + PowerEdit.Left := MainForm.PowerEdit.Left + offset; + PowerEdit.Width := MainForm.PowerEdit.Width; + PowerEdit.Visible := MainForm.PowerEdit.Visible; + PowerLabel.Visible := PowerEdit.Visible; + PowerLabel.Left := PowerEdit.Left+1; + + NewPowerEdit.Left := MainForm.NewPowerEdit.Left + offset; + NewPowerEdit.Width := MainForm.NewPowerEdit.Width; + NewPowerEdit.Visible := MainForm.NewPowerEdit.Visible; + PowerLabel.Visible := NewPowerEdit.Visible; + PowerLabel.Left := NewPowerEdit.Left+1; + + PointEdit.Left := MainForm.PointEdit.Left + offset; + PointEdit.Width := MainForm.PointEdit.Width; + PointLabel.Left := PointEdit.Left+1; + + OpEdit.Left := MainForm.OpEdit.Left + offset; + OpEdit.Width := MainForm.OpEdit.Width; + OpLabel.Left := OpEdit.Left+1; + + MemoEdit.Left := MainForm.MemoEdit.Left + offset; + MemoEdit.Width := MainForm.MemoEdit.Width; + MemoLabel.Left := MemoEdit.Left+1; + + Width := MainForm.Width; +end; + +procedure TEditDialog.RcvdRSTEditChange(Sender: TObject); +var i : word; +begin + try + I := StrToInt(RcvdRSTEdit.Text); + except + on EConvertError do + begin + if workQSO.QSO.mode in [mCW, mRTTY] then + I := 599 + else + I := 59; + end; + end; + workQSO.QSO.RSTRcvd := I; +end; + +procedure TEditDialog.FormCreate(Sender: TObject); +var i : integer; + M : TMenuItem; +begin + if MainForm.OpMenu.Items.Count > 0 then + for i := 0 to MainForm.OpMenu.Items.Count-1 do + begin + M := TMenuItem.Create(Self); + M.Caption := MainForm.OpMenu.Items[i].Caption; + M.OnClick := OpMenuClick; + M.Enabled := MainForm.OpMenu.Items[i].Enabled; + M.Visible := MainForm.OpMenu.Items[i].Visible; + M.Tag := MainForm.OpMenu.Items[i].Tag; + OpMenu.Items.Add(M); + end; + + for i := 0 to MainForm.BandMenu.Items.Count-1 do + begin + M := TMenuItem.Create(Self); + M.Caption := MainForm.BandMenu.Items[i].Caption; + M.OnClick := BandMenuClick; + M.Enabled := MainForm.BandMenu.Items[i].Enabled; + M.Visible := MainForm.BandMenu.Items[i].Visible; + M.Tag := MainForm.BandMenu.Items[i].Tag; + BandMenu.Items.Add(M); + end; + for i := 0 to MainForm.ModeMenu.Items.Count-1 do + begin + M := TMenuItem.Create(Self); + M.Caption := MainForm.ModeMenu.Items[i].Caption; + M.OnClick := ModeMenuClick; + M.Enabled := MainForm.ModeMenu.Items[i].Enabled; + M.Visible := MainForm.ModeMenu.Items[i].Visible; + M.Tag := MainForm.ModeMenu.Items[i].Tag; + ModeMenu.Items.Add(M); + end; + for i := 0 to MainForm.NewPowerMenu.Items.Count-1 do + begin + M := TMenuItem.Create(Self); + M.Caption := MainForm.NewPowerMenu.Items[i].Caption; + M.OnClick := NewPowerMenuClick; + M.Enabled := MainForm.NewPowerMenu.Items[i].Enabled; + M.Visible := MainForm.NewPowerMenu.Items[i].Visible; + M.Tag := MainForm.NewPowerMenu.Items[i].Tag; + NewPowerMenu.Items.Add(M); + end; + + +end; + +procedure TEditDialog.MemoEditChange(Sender: TObject); +begin + workQSO.QSO.memo := MemoEdit.Text; +end; + +procedure TEditDialog.TimeEditChange(Sender: TObject); +var T : TDateTime; +begin + try + T := StrToTime(TimeEdit.Text); + except + on EConvertError do + begin + T := workQSO.QSO.Time; + exit; + end; + end; + if workQSO.TimeStr = FormatDateTime('hh:nn',T) then + exit; + workQSO.QSO.Time := Trunc(workQSO.QSO.Time)+Frac(T); //(T-Trunc(T)); +end; + +procedure TEditDialog.DateEditChange(Sender: TObject); +var T : TDateTime; +begin + ShortDateFormat := 'y/m/d'; + try + T := StrToDate(DateEdit.Text); + except + on EConvertError do + begin + T := workQSO.QSO.Time; + exit; + end; + end; + if workQSO.DateStr = FormatDateTime('yy/mm/dd',T) then + exit; + workQSO.QSO.Time := Int(T) + Frac(workQSO.QSO.Time); +end; + + +procedure TEditDialog.DateEditDblClick(Sender: TObject); +begin + if TEdit(Sender).Name = 'TimeEdit' then + begin + TimeEdit.Visible := False; + DateEdit.Visible := True; + TimeLabel.Caption := 'date'; + end + else + begin + TimeEdit.Visible := True; + DateEdit.Visible := False; + TimeLabel.Caption := 'time'; + end; +end; + +procedure TEditDialog.EditKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +var i, cb : integer; + S : string[255]; +begin + case Key of + 29 : {MUHENKAN KEY} + begin + ControlPTT(not(PTTIsOn)); // toggle PTT; + end; + VK_F1..VK_F8, VK_F11, VK_F12 : + begin + i := Key - VK_F1 + 1; + if workQSO.QSO.Mode = mCW then + begin + + cb := Options.Settings.CW.CurrentBank; + + if GetAsyncKeyState(VK_SHIFT) < 0 then + begin + if cb = 1 then + cb := 2 + else + cb := 1; + end; + + + S := Options.CWMessage(cb,i); + S := SetStr(S, CurrentQSO); + zLogSendStr(S); + end + else + begin + SendVoice(i); + end; + end; + VK_F10 : + begin + //MessageBeep(0); + PartialCheck.Show; + //Label1.Caption := TEdit(Sender).Name; + if TEdit(Sender).Name = 'NumberEdit' then + begin + PartialCheck.CheckPartialNumber(workQSO); + end + else + PartialCheck.CheckPartial(workQSO); + TEdit(Sender).SetFocus; + Key := 0; + end; + Ord('O') : + begin + if Shift = [ssAlt] then + OpEditClick(Self); + //Key := 0; + end; + Ord('M') : + begin + if Shift = [ssAlt] then + begin + MemoEdit.SetFocus; + Key := 0; + end; + end; + Ord('N') : + begin + if Shift = [ssAlt] then + NumberEdit.SetFocus; + end; + Ord('R') : + begin + if Shift = [ssAlt] then + RcvdRSTEdit.SetFocus; + end; + Ord('C') : + begin + if Shift = [ssAlt] then + CallsignEdit.SetFocus; + end; + VK_ESCAPE : + begin + Key := 0; + CancelBtnClick(Self); + end; + end; +end; + + + + +procedure TEditDialog.NewPowerMenuClick(Sender: TObject); +var T : byte; + M : TMode; +begin + NewPowerEdit.Text := NewPowerString[TPower(TMenuItem(Sender).Tag)]; + workQSO.QSO.power := TPower(TMenuItem(Sender).Tag); +end; + +procedure TEditDialog.NewPowerEditClick(Sender: TObject); +begin + NewPowerMenu.Popup(Self.Left+Panel1.Left+NewPowerEdit.Left + 10, Self.Top+Panel1.Top+NewPowerEdit.Top + 40); +end; + +procedure TEditDialog.ModeEditClick(Sender: TObject); +begin + ModeMenu.Popup(Self.Left+Panel1.Left+ModeEdit.Left + 10, Self.Top+Panel1.Top+ModeEdit.Top + 40); +end; + +procedure TEditDialog.PowerEditChange(Sender: TObject); +var i : integer; +begin + i := 0; + if (PowerEdit.Text = 'KW') then + i := 9999; + if (PowerEdit.Text = '1KW') then + i := 10000; + if (PowerEdit.Text = 'K') then + i := 10001; + + if i > 0 then + begin + workQSO.QSO.Power2 := i; + exit; + end; + + try + i := StrToInt(PowerEdit.Text); + except + i := 0; + end; + workQSO.QSO.Power2 := i; +end; + +procedure TEditDialog.op1Click(Sender: TObject); +begin + OpEditClick(Self); +end; + +procedure TEditDialog.OpEditClick(Sender: TObject); +begin + OpMenu.Popup(Left + OpEdit.Left + 20, Top + OpEdit.Top); +end; + +end. diff --git a/src/UFDMulti.dfm b/src/UFDMulti.dfm new file mode 100644 index 00000000..b2f14e70 Binary files /dev/null and b/src/UFDMulti.dfm differ diff --git a/src/UFDMulti.pas b/src/UFDMulti.pas new file mode 100644 index 00000000..2123e984 --- /dev/null +++ b/src/UFDMulti.pas @@ -0,0 +1,244 @@ +unit UFDMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UACAGMulti, StdCtrls, checklst, JLLabel, ExtCtrls, zLogGlobal, Grids, + Cologrid, UMultipliers; + +type + TFDMulti = class(TACAGMulti) + procedure FormCreate(Sender: TObject); + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + private + { Private declarations } + public + { Public declarations } + sband : TBand; // b35 by default. b50 @ 6m&D + procedure Reset; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + function ValidMulti(aQSO : TQSO) : boolean; override; + procedure CheckMulti(aQSO : TQSO); override; + procedure Update; override; + end; + +var + FDMulti: TFDMulti; + +implementation + +uses Main; + +{$R *.DFM} + +procedure TFDMulti.CheckMulti(aQSO : TQSO); +var str : string; + i : integer; + C : TCity; +begin + //inherited; + str := aQSO.QSO.NrRcvd; + + if str = '' then + exit; + + if str[length(str)] in ['H', 'P', 'L', 'M'] then + System.Delete(str, length(str), 1); + + if aQSO.QSO.Band in [b19..b1200] then + if not(length(str) in [2..3]) then + begin + MainForm.WriteStatusLine('Invalid number', false); + exit; + end; + + if aQSO.QSO.Band in [b2400..HiBand] then + if not(length(str) in [4..6]) then + begin + MainForm.WriteStatusLine('Invalid number', false); + exit; + end; + + for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + if str = C.CityNumber then + begin + //ListBox.TopIndex := i; + Grid.TopRow := i; + str := C.Summary2; + if C.Worked[aQSO.QSO.Band] then + Insert('Worked on this band. ',str, 27) + else + Insert('Needed on this band. ',str, 27); + MainForm.WriteStatusLine(str, false); + exit; + end; + end; + MainForm.WriteStatusLine('Invalid number', false); +end; + + +function TFDMulti.ValidMulti(aQSO : TQSO) : boolean; +var str : string; + B : TBand; + i, j : integer; + C : TCity; + boo : boolean; +begin + Result := False; + str := aQSO.QSO.NrRcvd; + if aQSO.QSO.Band in [b19..b1200] then + begin + if not(length(str) in [3..4]) then + exit; + end + else + begin + if not(length(str) in [5..7]) then + exit; + end; + if not(str[length(str)] in ['P','L','M','H']) then + exit; + Delete(str, length(str), 1); + + boo := false; + for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + if str = C.CityNumber then + begin + boo := true; + break; + end; + end; + Result := boo; +end; + + +procedure TFDMulti.AddNoUpdate(var aQSO : TQSO); +var str, str2 : string; + B : TBand; + i, j : integer; + C : TCity; +begin + aQSO.QSO.NewMulti1 := False; + str := aQSO.QSO.NrRcvd; + Delete(str,length(str),1); + aQSO.QSO.Multi1 := str; + + if aQSO.QSO.Dupe then + exit; + + C := CityList.GetCity(str); + if C <> nil then + begin + if C.Worked[aQSO.QSO.band] = False then + begin + C.Worked[aQSO.QSO.band] := True; + aQSO.QSO.NewMulti1 := True; + end; + LatestMultiAddition := C.Index; + end; +{ + for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + if str = C.CityNumber then + begin + if C.Worked[aQSO.QSO.band] = False then + begin + C.Worked[aQSO.QSO.band] := True; + aQSO.QSO.NewMulti1 := True; + end; + LatestMultiAddition := i; + break; + end; + end;} +end; + +procedure TFDMulti.Reset; +var i, j : integer; + B : TBand; + str : string; +begin + if CityList.List.Count = 0 then exit; + //j := ListBox.TopIndex; + j := Grid.TopRow; + //ListBox.Items.Clear; + Grid.RowCount := 0; + Grid.RowCount := CityList.List.Count; + for i := 0 to CityList.List.Count-1 do + begin + for B := b19 to HiBand do + TCity(CityList.List[i]).Worked[B] := false; + str := TCity(CityList.List[i]).FDSummary(sband); + Grid.Cells[0,i] := str; + //ListBox.Items.Add(str); + //ListBox.Checked[i] := False; + end; + Grid.TopRow := j; + //ListBox.TopIndex := j; +end; + + +procedure TFDMulti.FormCreate(Sender: TObject); +var i : integer; +begin + // inherited; + sband := b35; + CityList := TCityList.Create; + CityList.LoadFromFile('XPO.DAT'); + CityList.LoadFromFile('ACAG.DAT'); + if CityList.List.Count = 0 then exit; + Reset; + { + for i := 0 to CityList.List.Count-1 do + begin + ListBox.Items.Add(TCity(CityList.List[i]).FDSummary(sband)); + end; + } +end; + +procedure TFDMulti.Update; +var B : TBand; + i : integer; + C : TCity; + str : string; + _top : integer; +const kenmax = 62; +begin + B := Main.CurrentQSO.QSO.Band; + + for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + str := C.FDSummary(sband); + Grid.Cells[0,i] := str; + end; + + _top := LatestMultiAddition; + if (B in [b19..b1200]) and (_top > kenmax) then + _top := 0; + if (B in [b2400..b10G]) and (_top <= kenmax) then + _top := kenmax + 1; + Grid.TopRow := _top; +end; + + + +procedure TFDMulti.GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); +//var B : TBand; +begin + inherited; + {B := Main.CurrentQSO.QSO.Band; + if TCity(CityList.List[ARow]).Worked[B] then + FColor := clRed + else + FColor := clBlack;} +end; + +end. diff --git a/src/UFreqList.dfm b/src/UFreqList.dfm new file mode 100644 index 00000000..569531ca Binary files /dev/null and b/src/UFreqList.dfm differ diff --git a/src/UFreqList.pas b/src/UFreqList.pas new file mode 100644 index 00000000..6cd732d4 --- /dev/null +++ b/src/UFreqList.pas @@ -0,0 +1,137 @@ +unit UFreqList; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UCheckWin, StdCtrls, ExtCtrls, zLogGlobal; + +type + TFreqList = class(TCheckWin) + ClearBtn: TButton; + procedure FormShow(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure ClearBtnClick(Sender: TObject); + private + { Private declarations } + FreqArray : array[0..30] of string; + //function GetTXNr(S : string) : integer; + function GetPCName(S : string) : string; + public + procedure Update; + procedure ProcessFreqData(S : string); + { Public declarations } + end; + +var + FreqList: TFreqList; + +implementation + +{$R *.DFM} + +procedure TFreqList.Update; +var B : integer; + s : string; +begin + ListBox.Items.Clear; + for B := 0 to 30 do + if FreqArray[B] <> '' then + begin + s := FreqArray[B]; + Delete(s, 1, 3); + ListBox.Items.Add(s); + end; +end; + +{function TFreqList.GetTXNr(S : string) : integer; +var ss : string; + i : integer; +begin + ss := copy(S, 7, 2); + ss := TrimRight(ss); + try + i := StrToInt(ss); + except + on EConvertError do + i := 0; + end; + Result := i; +end;} + +function TFreqList.GetPCName(S : string) : string; +var ss : string; + i, j : integer; +begin + ss := ''; + i := pos('[',S); + j := pos(']',S); + if (i > 0) and (j > 0) and (j > i) then + begin + ss := S; + Delete(ss, 1, i); + j := pos(']', ss); + ss := copy(ss, 1, j-1); + end; + Result := ss; +end; + +procedure TFreqList.ProcessFreqData(S : string); +var ss : string; + tx : integer; + pcname : string; + B : Integer; +begin + if length(S) < 30 then + exit; + + //tx := GetTXNr(S); + pcname := GetPCName(S); + //label1.caption := pcname+'*'; + + for B := 0 to 30 do + if FreqArray[B] <> '' then + if pcname = GetPCName(FreqArray[B]){GetTXNr(FreqArray[B]) = tx} then + FreqArray[B] := ''; + + ss := copy(S, 1, 2); + ss := TrimRight(ss); + B := StrToInt(ss); + if B <= ord(HiBand) then + FreqArray[B] := S + else // substation + begin + for B := Ord(HiBand)+1 to 30 do + if FreqArray[B] = '' then + begin + FreqArray[B] := S; + break; + end; + end; + Update; + +end; + +procedure TFreqList.FormShow(Sender: TObject); +begin + //inherited; + Update; +end; + +procedure TFreqList.FormCreate(Sender: TObject); +var B : integer; +begin + for B := 0 to 30 do + FreqArray[B] := ''; +end; + +procedure TFreqList.ClearBtnClick(Sender: TObject); +var B : integer; +begin + //inherited; + for B := 0 to 30 do + FreqArray[B] := ''; + Update; +end; + +end. diff --git a/src/UGeneralMulti.dfm b/src/UGeneralMulti.dfm new file mode 100644 index 00000000..c8479c34 Binary files /dev/null and b/src/UGeneralMulti.dfm differ diff --git a/src/UGeneralMulti.pas b/src/UGeneralMulti.pas new file mode 100644 index 00000000..27eb08e3 --- /dev/null +++ b/src/UGeneralMulti.pas @@ -0,0 +1,25 @@ +unit UGeneralMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicMulti, zLogGlobal; + +type + TGeneralMulti = class(TBasicMulti) + private + { Private declarations } + public + { Public declarations } + end; + +var + GeneralMulti: TGeneralMulti; + +implementation + +{$R *.DFM} + + +end. diff --git a/src/UGeneralMulti2.dfm b/src/UGeneralMulti2.dfm new file mode 100644 index 00000000..49e78b9d Binary files /dev/null and b/src/UGeneralMulti2.dfm differ diff --git a/src/UGeneralMulti2.pas b/src/UGeneralMulti2.pas new file mode 100644 index 00000000..510acc55 --- /dev/null +++ b/src/UGeneralMulti2.pas @@ -0,0 +1,730 @@ +unit UGeneralMulti2; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UACAGMulti, StdCtrls, JLLabel, ExtCtrls, zLogGlobal, checklst, Grids, + Cologrid, UWPXMulti, UMultipliers, Menus; + +const MAXLOCAL = 31; + PX_WPX = 1; + PX_NORMAL = 2; + BANDLABELMAX = 30; +type + TGeneralMulti2 = class(TACAGMulti) + procedure FormCreate(Sender: TObject); + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + BandLabelArray : array[0..BANDLABELMAX] of TRotateLabel; + + PXMulti : integer; + + _DXTEST : boolean; + NoCTYMulti : string; // use citylist for these countries + LocalCTY, LocalCONT : string; + + LocalString : array[0..MAXLOCAL] of string[30]; + MinLocalLen : integer; + _cut, _lcut, _tail, _ltail : integer; + UndefMulti : boolean; // + CountOnce : boolean; // count multi once regardless of band + CutTailingAlphabets : boolean; // JARL/CUTTAILABT + AllowUnlistedMulti : boolean; // allows unlisted multi to be logged but not counted as a multi. + NoMulti : boolean; + function IsLocal(aQSO : TQSO) : boolean; + procedure SetActiveBands; + procedure LoadDAT(Filename : string); + procedure LoadCTY(CTYTYPE : string); + function ExtractMulti(aQSO : TQSO) : string; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + function ValidMulti(aQSO : TQSO) : boolean; override; + procedure CheckMulti(aQSO : TQSO); override; + procedure Reset; override; + procedure Update; override; + { Public declarations } + + end; + +var + GeneralMulti2: TGeneralMulti2; + +implementation + +uses Main, UGeneralScore; + +{$R *.DFM} + +procedure TGeneralMulti2.SetActiveBands; +var band : TBand; + mb : TMenuItem; +begin + for band := b19 to HiBand do + begin + ActiveBands[band] := False; + if ((GeneralScore.WARC = False) and NotWARC(band)) or + (GeneralScore.WARC=True) then + begin + mb := MainForm.BandMenu.Items[ord(band)]; + if mb.Visible and mb.Enabled then + ActiveBands[band] := True + end; + end; +end; + +function GetPX(aQSO : TQSO) : string; +var s, px : string; + i, slash : integer; +begin + Result := ''; + s := aQSO.QSO.Callsign; + if s = '' then + exit; + slash := pos('/',s); + if GeneralMulti2.PXMulti = PX_WPX then + begin + Result := UWPXMulti.GetWPXPrefix(aQSO); + exit; + end + else + begin + if slash > 4 then + s := copy(s, 1, slash-1); + if slash in [1..4] then + Delete(s, 1, slash); + i := length(s) + 1; + repeat + dec(i) + until (i = 0) or (s[i] in ['0'..'9']); + Result := copy(s,1,i); + exit; + end; +end; + +(* CCC function for reference +Function GetPX(ywxQSO : QSOdata) : string; +var st : string; + pr,prr : string; + slash : byte; + n : integer; + label xyz,xqv; +begin + pr:=''; + st:=CallStr(ywxQSO); + + xyz : + if Pos('/',st) = 0 then + begin + n:=length(st)+1; + repeat + Dec(n); + until IsNumber(st[n]); + pr:=Copy(st,1,n); { 1ڂŌ̐܂ } + {if IsNumber(st[3]) then + begin + pr:=Copy(st,1,3); + end + else + begin + pr:=st[1]+st[2]; + end;} + end + else { / } + begin + slash:=Pos('/',st); + if slash>=5 then + begin + if IsNumber(st[length(st)]) and (length(st)=slash+1) then {/0,1...} + begin + n:=slash-1; + repeat + Dec(n); + until IsNumber(st[n]); + pr:=Copy(st,1,n-1); + pr:=pr+st[length(st)]; + goto xqv; + end; + if IsNumber(st[length(st)]) then + pr:=Copy(st,slash+1,5) + else + begin + prr:=Copy(st,slash+1,5); + if((prr='AT') or (prr='AG') or (prr='AA') or (prr='AE') or + (prr='MM') or (prr='M') or (prr='P') or (prr='QRP') or + (prr='A') or (prr='KT')) then + begin + st:=Copy(st,1,slash-1); + goto xyz; + end + else + begin + if (length(prr)=3) and IsNumber(prr[2]) then + pr:=prr[1]+prr[2] { /C6A, /U0C etc } + else pr:=prr+'0'; + end; + end; + end + else { slash < 5 } + begin + if IsNumber(st[slash-1]) then + pr:=Copy(st,1,slash-1) + else + begin + if (slash=4) and IsNumber(st[2]) then + pr:=st[1]+st[2] { C6A/, U0C/ etc } + else pr:=Copy(st,1,slash-1)+'0'; + end; + end; + end; +xqv : +GetPX:=pr; +end; +*) + +procedure TGeneralMulti2.Update; +var i, j : integer; + C : TCity; + str : string; + B : TBand; +begin + SetActiveBands; + + i := 0; + for B := b19 to Hiband do + begin + if ActiveBands[B] then + begin + BandLabelArray[i].Caption := MHzString[B]; + j := BandLabelArray[i].Height; + //BandLabelArray[i].Caption := IntToStr(j); + BandLabelArray[i].Top := 35 - j; + inc(i); + end; + end; + for j := i to BANDLABELMAX do + BandLabelArray[i].Caption := ''; + + if Grid.RowCount < CityList.List.Count then + Grid.RowCount := CityList.List.Count; + + if _DXTEST then + if CountryList.List.Count > 0 then + if NoCTYMulti <> '*' then + Grid.RowCount := CityList.List.Count + CountryList.List.Count; + + for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + str := C.SummaryGeneral; + Grid.Cells[0,i] := str; + end; + + if CityList.List.Count = 0 then + i := 0; + + if _DXTEST and (NoCTYMulti <> '*') then + for j := 0 to CountryList.List.Count - 1 do + begin + Grid.Cells[0, i + j] := TCountry(CountryLIst.List[j]).SummaryGeneral; + end; + + Grid.TopRow := LatestMultiAddition; +end; + +procedure TGeneralMulti2.Reset; +var i, j : integer; + B : TBand; + str : string; +begin + if CountryList <> nil then + CountryList.Reset; + if CityList <> nil then + CityList.Reset; + +{ if CityList.List.Count = 0 then exit; + j := Grid.TopRow; + Grid.RowCount := 0; + Grid.RowCount := CityList.List.Count; + for i := 0 to CityList.List.Count-1 do + begin + for B := b19 to HiBand do + TCity(CityList.List[i]).Worked[B] := false; + str := TCity(CityList.List[i]).Summary; + Grid.Cells[0,i] := str; + end; + Grid.TopRow := j;} + +end; + + +function TGeneralMulti2.ValidMulti(aQSO : TQSO) : boolean; +var str : string; + B : TBand; + i : integer; + C : TCity; + boo : boolean; +begin + //CAPTION := INTTOSTR(PXMULTI); + if UndefMulti or AllowUnlistedMulti or (PXMulti <> 0) or _DXTEST or NoMulti then + begin + Result := True; + exit; + end; + str := ExtractMulti(aQSO); + boo := false; + for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + if pos(','+str+',', ','+C.CityNumber+',') > 0 then + begin + boo := true; + break; + end; + end; + Result := boo; +end; + + + +function TGeneralMulti2.ExtractMulti(aQSO : TQSO) : string; +var str : string; + i : integer; +begin + str := aQSO.QSO.NrRcvd; + + if PXMulti <> 0 then + begin + Result := GetPX(aQSO); + exit; + end; + + if CutTailingAlphabets then // deletes any tailing non-digits + begin + for i := length(str) downto 1 do + if str[i] in ['0'..'9'] then + break; + if (i = 1) and (str[1] in ['0'..'9']) then + str := '' + else + str := copy(str, 1, i); + end; + + if IsLocal(aQSO) then + begin + if _lcut <> 0 then + begin + if _lcut > 0 then + Delete(str, length(str)-_lcut+1, _lcut) + else + Delete(str, 1, _lcut * -1); + end + else {lcut = 0} + begin + if _ltail <> 0 then + if _ltail > 0 then + str := copy(str, length(str)-_ltail+1, _ltail) + else + str := copy(str, 1, -1*_ltail); + end; + end + else {not local} + begin + if _cut <> 0 then + begin + if _cut > 0 then + Delete(str, length(str)-_cut+1, _cut) + else + Delete(str, 1, _cut * -1); + end + else {cut = 0} + begin + if _tail <> 0 then + if _tail > 0 then + str := copy(str, length(str)-_tail+1, _tail) + else + str := copy(str, 1, -1*_tail); + end; + end; + Result := str; +end; + +procedure TGeneralMulti2.AddNoUpdate(var aQSO : TQSO); +var str, str2 : string; + B : TBand; + i, j : integer; + C : TCity; + Cty : TCountry; + boo : Boolean; +label aaa; +begin + aQSO.QSO.NewMulti1 := False; + if NoMulti then exit; + aQSO.QSO.Power2 := 2; // not local CTY + + if _DXTEST then + begin + i := GetCountryIndex(aQSO); + if i > 0 then + begin + Cty := TCountry(CountryList.List[i]); + + aQSO.QSO.Power2 := i; + { + if LocalCTY <> '' then + begin + if pos(','+Cty.Country+',', ','+LocalCTY+',') > 0 then + begin + aQSO.QSO.Power2 := 22; // tells IsLocal that this is Local CTY + end; + end; + } + if NoCtyMulti = '*' then + goto aaa; + + if pos(','+Cty.Country+',', ','+NoCTYMulti+',') > 0 then + goto aaa; + + + aQSO.QSO.Multi1 := Cty.Country; + + if aQSO.QSO.Dupe then + exit; + + LatestMultiAddition := CityList.List.Count + i; + + if CountOnce then // multi once regardless of band + begin + boo := false; + for B := b19 to HiBand do + if Cty.Worked[B] then + begin + boo := true; + break; + end; + if boo = false then + begin + aQSO.QSO.NewMulti1 := True; + Cty.Worked[aQSO.QSO.Band] := True; + end; + end + else // new multi each band + begin + if Cty.Worked[aQSO.QSO.Band] = False then + begin + aQSO.QSO.NewMulti1 := True; + Cty.Worked[aQSO.QSO.Band] := True; + end; + end; + + exit; + end; + end; + +aaa: + str := ExtractMulti(aQSO); + aQSO.QSO.Multi1 := str; + + if aQSO.QSO.Dupe then + exit; + + for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + + str2 := ','+C.CityNumber+','; // for alternative exchange + if pos (','+str+',', str2) > 0 then // + //if str = C.CityNumber then + begin + if C.Worked[aQSO.QSO.band] = False then + begin + C.Worked[aQSO.QSO.band] := True; + //j := Grid.TopRow; + //Grid.Cells[0,i] := C.Summary; // + //Grid.TopRow := j; // + aQSO.QSO.NewMulti1 := True; + end; + //if (i < Grid.TopRow) or (i > Grid.TopRow+Grid.VisibleRowCount-1) then + //Grid.TopRow := i; // + LatestMultiAddition := C.Index; + exit; + end; + end; + + // no match with CityList + + if AllowUnlistedMulti then + begin + exit; + end; + + if UndefMulti or (PXMulti <> 0) then + begin + C := TCity.Create; + C.CityNumber := str; + C.Worked[aQSO.QSO.Band] := True; + i := CityList.AddAndSort(C); + aQSO.QSO.NewMulti1 := True; + LatestMultiAddition := C.Index; + //Update; + //if (i < Grid.TopRow) or (i > Grid.TopRow+Grid.VisibleRowCount-1) then + //Grid.TopRow := i; + end; +end; + + + +function TGeneralMulti2.IsLocal(aQSO : TQSO) : boolean; +var i : integer; +begin + Result := False; + + if _DXTEST then + begin + if LocalCTY <> '' then + begin + i := aQSO.QSO.Power2; + if i < CountryList.List.Count then + if pos(','+TCountry(CountryList.List[i]).Country+',', ','+LocalCTY+',') > 0 then + begin + Result := True; + exit; + end; + end; + if LocalCONT <> '' then + begin + i := aQSO.QSO.Power2; + if i < CountryList.List.Count then + if pos(','+TCountry(CountryList.List[i]).Continent+',', ','+LocalCONT+',') > 0 then + begin + Result := True; + exit; + end; + end; + end; + + for i := 0 to MAXLOCAL do + if LocalString[i] = '' then + exit + else + if (Pos(LocalString[i], aQSO.QSO.NrRcvd) = 1) and + (Length(aQSO.QSO.NrRcvd) >= MinLocalLen) then + begin + Result := True; + exit; + end; +end; + +procedure TGeneralMulti2.LoadDAT(Filename : string); +var i : integer; +begin + CityList.LoadFromFile(FileName); + Reset; +end; + +procedure TGeneralMulti2.LoadCTY(CTYTYPE : string); +var str : string; +begin + if (CTYTYPE <> 'CQ') and (CTYTYPE <> 'IARU') and (CTYTYPE <> 'DXCC') then + begin + if pos('.DAT', CTYTYPE) = 0 then + str := CTYTYPE+'.DAT'; + if FileExists(str) then + begin + CountryList := TCountryList.Create; + PrefixList := TPrefixList.Create; + _DXTEST := True; + LoadCountryDataFromFile(str, CountryList, PrefixList); + end + else + MainForm.WriteStatusLine(str+ ' not found', true); + exit; + end; + + CountryList := TCountryList.Create; + PrefixList := TPrefixList.Create; + _DXTEST := True; + + if CTYTYPE = 'CQ' then + begin + if FileExists('CTY.DAT') then + begin + MainForm.WriteStatusLine('Loading CTY.DAT...', true); + LoadCTY_DAT(testCQWW, CountryList, PrefixList); + MainForm.WriteStatusLine('Loaded CTY.DAT', true); + end + else + LoadCountryDataFromFile('CQWW.DAT', CountryList, PrefixList); + end; + if CTYTYPE = 'DXCC' then + begin + if FileExists('CTY.DAT') then + begin + MainForm.WriteStatusLine('Loading CTY.DAT...', true); + LoadCTY_DAT(testDXCCWWZone, CountryList, PrefixList); + MainForm.WriteStatusLine('Loaded CTY.DAT', true); + end + else + LoadCountryDataFromFile('DXCC.DAT', CountryList, PrefixList); + end; + if CTYTYPE = 'IARU' then + begin + if FileExists('CTY.DAT') then + begin + MainForm.WriteStatusLine('Loading CTY.DAT...', true); + LoadCTY_DAT(testIARU, CountryList, PrefixList); + MainForm.WriteStatusLine('Loaded CTY.DAT', true); + end + else + LoadCountryDataFromFile('IARU.DAT', CountryList, PrefixList); + end; + AnalyzeMyCountry; +end; + +procedure TGeneralMulti2.FormCreate(Sender: TObject); +var i : integer; +begin + //inherited; + LatestMultiAddition := 0; + Label1R9.Visible := True; + CityList := TCityList.Create; + UndefMulti := False; + NoMulti := False; + CountOnce := False; + CutTailingAlphabets := False; + AllowUnlistedMulti := False; + PXMulti := 0; + _DXTEST := false; + NoCtyMulti := ''; + LocalCTY := ''; + LocalCONT := ''; + //SetActiveBands; + + Label1R9.Visible := False; + Label3R5.Visible := False; + Label7.Visible := False; + Label14.Visible := False; + Label21.Visible := False; + Label28.Visible := False; + Label50.Visible := False; + Label144.Visible := False; + Label430.Visible := False; + Label1200.Visible := False; + Label2400.Visible := False; + Label5600.Visible := False; + Label10G.Visible := False; + + for i := 0 to BANDLABELMAX do + begin + BandLabelArray[i] := TRotateLabel.Create(Self); + BandLabelArray[i].Parent := Panel; + BandLabelArray[i].Escapement := 90; + BandLabelArray[i].Alignment := taleftjustify; + BandLabelArray[i].Font := Label1R9.Font; + BandLabelArray[i].TextStyle := tsNone; + BandLabelArray[i].Left := Label1R9.Left + Trunc(12.15*i); + BandLabelArray[i].Top := 10; + //BandLabelArray[i].Height := 1; + BandLabelArray[i].AutoSize := True; + BandLabelArray[i].Caption := ''; + end; + +end; + +procedure TGeneralMulti2.CheckMulti(aQSO : TQSO); +var str : string; + B : TBand; + i : integer; + C : TCity; +begin + if ValidMulti(aQSO) then + str := ExtractMulti(aQSO) + else + str := aQSO.QSO.NrRcvd; + + if str = '' then + exit; + + for i := 0 to CityList.List.Count-1 do + begin + C := TCity(CityList.List[i]); + if pos(','+str+',', ','+C.CityNumber+',') > 0 then + begin + //ListBox.TopIndex := i; + Grid.TopRow := i; + str := C.Summary2; + if C.Worked[aQSO.QSO.Band] then + Insert('Worked on this band. ',str, 27) + else + Insert('Needed on this band. ',str, 27); + MainForm.WriteStatusLine(str, false); + exit; + end; + end; + if UndefMulti then + MainForm.WriteStatusLine(str+ ' : '+'Not worked on any band', false) + else + MainForm.WriteStatusLine('Invalid number', false); +end; + +procedure TGeneralMulti2.GridSetting(ARow, Acol: Integer; + var Fcolor: Integer; var Bold, Italic, underline: Boolean); +var B, B2 : TBand; + C : TCountry; +begin + //inherited; + B := Main.CurrentQSO.QSO.Band; + if _DXTEST then + begin + if ARow > CityList.List.Count - 1 then + begin + C := TCountry(CountryList.List[ARow - CityList.List.Count]); + if C.Worked[B] then + FColor := clRed + else + begin + if CountOnce then + begin + for B2 := b19 to HiBand do + if C.Worked[B2] then + begin + FColor := clRed; + exit; + end; + end; + FColor := clBlack; + end; + exit; + end; + end; + if ARow > CityList.List.Count - 1 then + exit; + if TCity(CityList.List[ARow]).Worked[B] then + FColor := clRed + else + begin + FColor := clBlack; + + if CountOnce then + begin + for B2 := b19 to HiBand do + if TCity(CityList.List[ARow]).Worked[B2] then + begin + FColor := clRed; + exit; + end; + end; + end; +end; + +procedure TGeneralMulti2.FormShow(Sender: TObject); +begin + //inherited; + SetActiveBands; + Update; +end; + +end. diff --git a/src/UGeneralScore.dfm b/src/UGeneralScore.dfm new file mode 100644 index 00000000..c93eab4d Binary files /dev/null and b/src/UGeneralScore.dfm differ diff --git a/src/UGeneralScore.pas b/src/UGeneralScore.pas new file mode 100644 index 00000000..d99dc8bb --- /dev/null +++ b/src/UGeneralScore.pas @@ -0,0 +1,951 @@ +unit UGeneralScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Aligrid, StdCtrls, ExtCtrls, zLogGlobal, Menus, Grids, + UMultipliers, Buttons; + + +type + TPointsTable = array[b19..HiBand, mCW..mOther] of Integer; + + TGeneralScore = class(TBasicScore) + Grid: TStringAlignGrid; + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + private + { Private declarations } + procedure ResetParams; // called from LoadCFG + public + WARC : boolean; + + SameCTYPoints, SameCONTPoints : boolean; + PointsTable : TPointsTable; + LocalPointsTable : TPointsTable; + SameCTYPointsTable : TPointsTable; + SameCONTPointsTable : TPointsTable; + + SpecialCallPointsTable : TPointsTable; + SpecialCalls : string; // special callsigns for specialcallpointstable + + AlphabetPointsTable : array[ord('0')..ord('Z')] of Integer; + AlphabetPoints : boolean; + procedure SetPointsTable(var PT : TPointsTable; str : string); + procedure CalcPoints(var aQSO : TQSO); + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + procedure Reset; override; + procedure Add(var aQSO : TQSO); override; {calculates points} + procedure LoadCFG(Filename : string); + { Public declarations } + end; + +var + GeneralScore: TGeneralScore; + +implementation + +uses UGeneralMulti, UGeneralMulti2, UOptions, Main; + +{$R *.DFM} + +procedure TGeneralScore.SetPointsTable(var PT : TPointsTable; str : string); +var i, k : integer; + tempstr, pstr : string; + B : TBand; +begin + tempstr := str+','; + B := b19; + + while pos(',', tempstr) > 0 do + begin + i := pos(',',tempstr); + if i > 0 then + pstr := copy(tempstr, 1, i-1) + else + exit; + try + k := StrToInt(pstr); + except + on EConvertError do + k := 0; + end; + PT[B, mCW] := k; + delete(tempstr, 1, i); + + i := pos(',',tempstr); + if i > 0 then + pstr := copy(tempstr, 1, i-1) + else + exit; + try + k := StrToInt(pstr); + except + on EConvertError do + k := 0; + end; + PT[B, mSSB] := k; + PT[B, mFM] := k; + PT[B, mAM] := k; + delete(tempstr, 1, i); + repeat + inc(B); + until NotWARC(B); + end; +end; + +procedure TGeneralScore.ResetParams; +var B : TBand; + M : TMode; + i : integer; +begin + for B := b19 to HiBand do + for M := mCW to mOther do + begin + PointsTable[B, M] := 1; + LocalPointsTable[B, M] := 1; + SameCTYPointsTable[B, M] := 1; + SameCONTPointsTable[B, M] := 1; + SpecialCallPointsTable[B, M] := 1; + end; + SameCTYPoints := False; + SameCONTPoints := False; + AlphabetPoints := False; + SpecialCalls := ''; + for i := ord('0') to ord('Z') do + AlphabetPointsTable[i] := 0; + + SerialContestType := 0; + for B := b19 to HiBand do + SerialArray[B] := 1; + + with GeneralMulti2 do + begin + for i := 0 to MAXLOCAL do + LocalString[i] := ''; + MinLocalLen := 0; + _cut := 0; _lcut := 0; _tail := 0; _ltail := 0; + end; +end; + +procedure TGeneralScore.LoadCFG(Filename : string); +var zfile : textfile; + check : boolean; + rstr, tstr, com, opr, tempstr : string; + p, q, work, i, k : integer; + _bnd : TBand; +const TAB = #$09; + +begin + ResetParams; + System.Assign(zfile, FIlename); + {$I-} + System.reset(zfile); + {$I+} + check := FileExists(FileName); //(IOresult=0); + case check of + true : { file exists } + begin + while not(eof(zfile)) do + begin + readln(zfile,rstr); + if (rstr <> '') and (rstr[1]<>';') then + begin + + q:=Pos(';',rstr); + if q>0 then rstr:=Copy(rstr,1,q-1); {Cut out comment} + + p:=0; + repeat + inc(p); + until (rstr[p] in [' ',tab]) or (p>length(rstr)); + q:=p; + repeat + inc(q); + until not(rstr[q] in [' ',tab]) or (q>length(rstr)); + + com:=Uppercase(copy(rstr,1,p-1)); + opr:=copy(rstr,q,255); + + opr:=Uppercase(opr); + + if pos('PT',com)=1 then + begin + _bnd:=b19; + if copy(com,3,3)='1.9' then _bnd:=b19; + if copy(com,3,3)='3.5' then _bnd:=b35; + if copy(com,3,3)='7' then _bnd:=b7; + if copy(com,3,3)='10' then _bnd:=b10; + if copy(com,3,3)='14' then _bnd:=b14; + if copy(com,3,3)='18' then _bnd:=b18; + if copy(com,3,3)='21' then _bnd:=b21; + if copy(com,3,3)='24' then _bnd:=b24; + if copy(com,3,3)='28' then _bnd:=b28; + if copy(com,3,3)='50' then _bnd:=b50; + if copy(com,3,3)='144' then _bnd:=b144; + if copy(com,3,3)='430' then _bnd:=b430; + if copy(com,3,3)='120' then _bnd:=b1200; + if copy(com,3,3)='240' then _bnd:=b2400; + if copy(com,3,3)='560' then _bnd:=b5600; + if copy(com,3,3)='10G' then _bnd:=b10g; + if length(opr) >= 2 then + begin + try + work := StrToInt(opr[1]); + except + on EConvertError do + work := 1; + end; + PointsTable[_bnd, mSSB] := work; + try + work := StrToInt(opr[2]); + except + on EConvertError do + work := 1; + end; + PointsTable[_bnd, mCW] := work; + try + work := StrToInt(opr[3]); + except + on EConvertError do + work := 1; + end; + PointsTable[_bnd, mFM] := work; + try + work := StrToInt(opr[4]); + except + on EConvertError do + work := 1; + end; + PointsTable[_bnd, mAM] := work; + end; + end; + + + if pos('LPT',com)=1 then + begin + _bnd:=b19; + if copy(com,4,3)='1.9' then _bnd:=b19; + if copy(com,4,3)='3.5' then _bnd:=b35; + if copy(com,4,3)='7' then _bnd:=b7; + if copy(com,4,3)='10' then _bnd:=b10; + if copy(com,4,3)='14' then _bnd:=b14; + if copy(com,4,3)='18' then _bnd:=b18; + if copy(com,4,3)='21' then _bnd:=b21; + if copy(com,4,3)='24' then _bnd:=b24; + if copy(com,4,3)='28' then _bnd:=b28; + if copy(com,4,3)='50' then _bnd:=b50; + if copy(com,4,3)='144' then _bnd:=b144; + if copy(com,4,3)='430' then _bnd:=b430; + if copy(com,4,3)='120' then _bnd:=b1200; + if copy(com,4,3)='240' then _bnd:=b2400; + if copy(com,4,3)='560' then _bnd:=b5600; + if copy(com,4,3)='10G' then _bnd:=b10g; + if length(opr) >= 2 then + begin + try + work := StrToInt(opr[1]); + except + on EConvertError do + work := 1; + end; + LocalPointsTable[_bnd, mSSB] := work; + try + work := StrToInt(opr[2]); + except + on EConvertError do + work := 1; + end; + LocalPointsTable[_bnd, mCW] := work; + try + work := StrToInt(opr[3]); + except + on EConvertError do + work := 1; + end; + LocalPointsTable[_bnd, mFM] := work; + try + work := StrToInt(opr[4]); + except + on EConvertError do + work := 1; + end; + LocalPointsTable[_bnd, mAM] := work; + end; + end; + + if pos('XPT',com)=1 then + begin + _bnd:=b19; + if copy(com,4,3)='1.9' then _bnd:=b19; + if copy(com,4,3)='3.5' then _bnd:=b35; + if copy(com,4,3)='7' then _bnd:=b7; + if copy(com,4,3)='10' then _bnd:=b10; + if copy(com,4,3)='14' then _bnd:=b14; + if copy(com,4,3)='18' then _bnd:=b18; + if copy(com,4,3)='21' then _bnd:=b21; + if copy(com,4,3)='24' then _bnd:=b24; + if copy(com,4,3)='28' then _bnd:=b28; + if copy(com,4,3)='50' then _bnd:=b50; + if copy(com,4,3)='144' then _bnd:=b144; + if copy(com,4,3)='430' then _bnd:=b430; + if copy(com,4,3)='120' then _bnd:=b1200; + if copy(com,4,3)='240' then _bnd:=b2400; + if copy(com,4,3)='560' then _bnd:=b5600; + if copy(com,4,3)='10G' then _bnd:=b10g; + if length(opr) >= 4 then + begin + try + work := StrToInt(opr[1]+opr[2]); + except + on EConvertError do + work := 1; + end; + PointsTable[_bnd, mSSB] := work; + try + work := StrToInt(opr[3]+opr[4]); + except + on EConvertError do + work := 1; + end; + PointsTable[_bnd, mCW] := work; + try + work := StrToInt(opr[5]+opr[6]); + except + on EConvertError do + work := 1; + end; + PointsTable[_bnd, mFM] := work; + try + work := StrToInt(opr[7]+opr[8]); + except + on EConvertError do + work := 1; + end; + PointsTable[_bnd, mAM] := work; + end; + end; + + + if pos('XLPT',com)=1 then + begin + _bnd:=b19; + if copy(com,5,3)='1.9' then _bnd:=b19; + if copy(com,5,3)='3.5' then _bnd:=b35; + if copy(com,5,3)='7' then _bnd:=b7; + if copy(com,5,3)='10' then _bnd:=b10; + if copy(com,5,3)='14' then _bnd:=b14; + if copy(com,5,3)='18' then _bnd:=b18; + if copy(com,5,3)='21' then _bnd:=b21; + if copy(com,5,3)='24' then _bnd:=b24; + if copy(com,5,3)='28' then _bnd:=b28; + if copy(com,5,3)='50' then _bnd:=b50; + if copy(com,5,3)='144' then _bnd:=b144; + if copy(com,5,3)='430' then _bnd:=b430; + if copy(com,5,3)='120' then _bnd:=b1200; + if copy(com,5,3)='240' then _bnd:=b2400; + if copy(com,5,3)='560' then _bnd:=b5600; + if copy(com,5,3)='10G' then _bnd:=b10g; + if length(opr) >= 4 then + begin + try + work := StrToInt(opr[1]+opr[2]); + except + on EConvertError do + work := 1; + end; + LocalPointsTable[_bnd, mSSB] := work; + try + work := StrToInt(opr[3]+opr[4]); + except + on EConvertError do + work := 1; + end; + LocalPointsTable[_bnd, mCW] := work; + try + work := StrToInt(opr[5]+opr[6]); + except + on EConvertError do + work := 1; + end; + LocalPointsTable[_bnd, mFM] := work; + try + work := StrToInt(opr[7]+opr[8]); + except + on EConvertError do + work := 1; + end; + LocalPointsTable[_bnd, mAM] := work; + + end; + end; + + if com = 'SAMECTYPT' then + begin + SetPointsTable(SameCTYPointsTable, opr); + SameCTYPoints := True; + end; + + if com = 'SAMECONTPT' then + begin + SetPointsTable(SameCONTPointsTable, opr); + SameCONTPoints := True; + end; + + if com = 'LOCALPT' then + begin + SetPointsTable(LocalPointsTable, opr); + end; + + if com = 'DEFAULTPT' then + begin + SetPointsTable(PointsTable, opr); + end; + + if com = 'SPECIALCALLPT' then + begin + SetPointsTable(SpecialCallPointsTable, opr); + end; + + if com = 'SPECIALCALLS' then + begin + if SpecialCalls <> '' then + SpecialCalls := SpecialCalls + ',' + opr + else + SpecialCalls := opr; + end; + + if com = 'LOCALCTY' then + begin + GeneralMulti2.LocalCTY := UpperCase(opr); + end; + + if com = 'LOCALCONT' then + begin + GeneralMulti2.LocalCONT := UpperCase(opr); + end; + + + if com = 'LOCAL' then + begin + tstr:=''; k:=0; + for i:=1 to length(opr) do + begin + if opr[i]=',' then + begin + GeneralMulti2.LocalString[k]:=tstr; + if k= 0 then + GeneralMulti2.MinLocalLen := work; + end; + + + + if com='SENDNR' then + begin + Options.Settings._sentstr := opr; + end; + + if com='DAT' then + begin + tstr := opr; + if Pos('.',tstr)=0 then + tstr := tstr +'.DAT'; + GeneralMulti2.LoadDAT(tstr); + end; + + + if com='TIME' then + if opr = 'UTC' then + begin + UseUTC := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF + end; + + if com='CTY' then + begin + GeneralMulti2.LoadCTY(UpperCase(opr)); + end; + + if com='COUNTMULTIONCE' then + begin + if opr = 'ON' then + GeneralMulti2.CountOnce := True + else + GeneralMulti2.CountOnce := False; + end; + + if com='NOCTYMULTI' then + begin + GeneralMulti2.NoCTYMulti := UpperCase(opr); + end; + + + if com='MODE' then + begin + if opr = 'ON' then + begin + Log.AcceptDifferentMode := True; + { + for _bnd := b19 to HiBand do + SubLog[_bnd].AcceptDifferentMode := True;} + end; + end; + + if com='CUT' then + begin + try + work := StrToInt(opr); + except + on EConvertError do + work := -99; + end; + if work <> -99 then + GeneralMulti2._cut := work; + end; + + if com='LCUT' then + begin + try + work := StrToInt(opr); + except + on EConvertError do + work := -99; + end; + if work <> -99 then + GeneralMulti2._lcut := work; + end; + + if com='TAIL' then + begin + try + work := StrToInt(opr); + except + on EConvertError do + work := -99; + end; + if work <> -99 then + GeneralMulti2._tail := work; + end; + + if com='LTAIL' then + begin + try + work := StrToInt(opr); + except + on EConvertError do + work := -99; + end; + if work <> -99 then + GeneralMulti2._ltail := work; + end; + + if com = 'UNDEFMULTI' then + begin + if opr = 'ON' then + GeneralMulti2.UndefMulti := True; + end; + + if com = 'JARL' then + begin + if opr = 'ON' then + GeneralMulti2.CutTailingAlphabets := True; + end; + + if com = 'CUTTAILABT' then //equivalent to JARL + begin + if opr = 'ON' then + GeneralMulti2.CutTailingAlphabets := True; + end; + + if com='POWER' then + begin + _bnd := b19; + for i:=1 to length(opr) do + begin + case opr[i] of + 'A' : Options.CurrentPower[_bnd]:=p010; + 'B' : Options.CurrentPower[_bnd]:=p025; + 'C' : Options.CurrentPower[_bnd]:=p050; + 'D' : Options.CurrentPower[_bnd]:=p100; + 'E' : Options.CurrentPower[_bnd]:=p500; + 'O' : Options.CurrentPower[_bnd]:=p001; + 'F' : Options.CurrentPower[_bnd]:=p005; + 'N' : Options.CurrentPower[_bnd]:=p002; + 'T' : Options.CurrentPower[_bnd]:=p020; + 'W' : Options.CurrentPower[_bnd]:=p200; + 'K' : Options.CurrentPower[_bnd]:=p1000; + 'X' : Options.CurrentPower[_bnd]:=p1000; + 'P' : Options.CurrentPower[_bnd]:=pwrP; + 'L' : Options.CurrentPower[_bnd]:=pwrL; + 'M' : Options.CurrentPower[_bnd]:=pwrM; + 'H' : Options.CurrentPower[_bnd]:=pwrH; + '-' : begin + Options.CurrentPower[_bnd]:=pwrP; + //Options.CurrentPower2[_bnd]:=p010; + MainForm.BandMenu.Items[ord(_bnd)].Visible := False; + end; + end; + if _bnd < HiBand then + repeat + inc(_bnd); + until NotWARC(_bnd); + end; + end; + + if com='UNLISTEDMULTI' then + begin + if opr='ON' then GeneralMulti2.AllowUnlistedMulti := True; + end; + + if com='NOMULTI' then + begin + if opr='ON' then GeneralMulti2.NoMulti := True; + end; + + if com='PXMULTI' then + begin + //CAPTION := OPR; + if opr='NORMAL' then + begin + //undefMulti := True; + GeneralMulti2.PXMulti := PX_Normal; + end; + if opr='WPX' then + begin + //undefMulti := True; + GeneralMulti2.PXMulti := PX_WPX; + end; + if opr='OFF' then + begin + GeneralMulti2.PXMulti := 0; + end; + end; + + if com='SERIAL' then + begin + if opr = 'ALL' then SerialContestType := SER_ALL; + if opr = 'BAND' then SerialContestType := SER_BAND; + end; + + if com='SERIALSTART' then + begin + for _bnd := b19 to HiBand do + SerialArray[_bnd] := StrToInt(opr); + end; + + if com='COUNTHIGH' then + begin + if opr='ON' then Log.CountHigherPoints := True; + {for _bnd := b19 to HiBand do + SubLog[_bnd].AcceptDifferentMode := True; } + end; + + if com='WARC' then + begin + if opr = 'ON' then + begin + WARC := True; + MainForm.BandMenu.Items[ord(b10)].Visible := True; + MainForm.BandMenu.Items[ord(b18)].Visible := True; + MainForm.BandMenu.Items[ord(b24)].Visible := True; + end; + end; + {if com='MULCK' then + begin + if opr='OFF' then _NoCheckNonLocal := True; + end; + + if com='LMULCK' then + begin + if opr='OFF' then _NoCheckLocal := True; + end; + + if com='MODE' then + begin + if opr='ON' then _Mode := True; + end;} + end; + end; + System.close(zfile); + end; + + false : + begin + MessageDlg('CFG file cannot be found. Place it in the same folder as ZLOG.EXE', mtError, + [mbOK], 0); + end; + end; + +end; + +{ +procedure TGeneralScore.Update; +var band : TBand; + TotQSO, TotPoints, TotMulti : LongInt; + row : integer; +begin + TotQSO := 0; TotPoints := 0; TotMulti := 0; + row := 1; + for band := b19 to HiBand do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(QSO[band]); + TotQSO := TotQSO + QSO[band]; + Grid.Cells[2,row] := IntToStr(Points[band]); + TotPoints := TotPoints + Points[band]; + Grid.Cells[3,row] := IntToStr(Multi[band]); + TotMulti := TotMulti + Multi[band]; + inc(row); + end; + end; + Grid.Cells[1, 14] := IntToStr(TotQSO); + Grid.Cells[2, 14] := IntToStr(TotPoints); + Grid.Cells[3, 14] := IntToStr(TotMulti); + Grid.Cells[3, 15] := IntToStr(TotPoints*TotMulti); +end; +} + +procedure TGeneralScore.Update; +var band : TBand; + TotQSO, TotPoints, TotMulti : LongInt; + row : integer; + mb : TMenuItem; +begin + TotQSO := 0; TotPoints := 0; TotMulti := 0; + row := 1; + //Grid.RowFont[0].Color := clGreen; + + if ShowCWRatio then + begin + Grid.ColCount := 6; + Grid.Width := Grid.DefaultColWidth * 6; + end + else + begin + Grid.ColCount := 4; + Grid.Width := Grid.DefaultColWidth * 4; + end; + + Grid.Cells[0,0] := 'MHz'; + Grid.Cells[1,0] := 'QSOs'; + Grid.Cells[2,0] := 'Points'; + Grid.Cells[3,0] := 'Mult'; + + if ShowCWRatio then + begin + Grid.Cells[4,0] := 'CW QSOs'; + Grid.Cells[5,0] := 'CW %'; + end; + + GeneralMulti2.SetActiveBands; + for band := b19 to HiBand do + begin + TotQSO := TotQSO + QSO[band]; + TotPoints := TotPoints + Points[band]; + TotMulti := TotMulti + Multi[band]; + if ActiveBands[band] then + begin + Grid.CellFont[0,row].Color := clBlue; + Grid.Cells[0,row] := MHzString[band]; + Grid.Cells[1,row] := IntToStr(QSO[band]); + Grid.Cells[2,row] := IntToStr(Points[band]); + if GeneralMulti2.NoMulti then + Grid.Cells[3,row] := '-' + else + Grid.Cells[3,row] := IntToStr(Multi[band]); + + if ShowCWRatio then + begin + Grid.Cells[4,row] := IntToStr(CWQSO[band]); + if QSO[band] > 0 then + Grid.Cells[5,row] := FloatToStrF(100*(CWQSO[band] / QSO[band]), ffFixed, 1000, 1) + else + Grid.Cells[5,row] := '-'; + end; + + inc(row); + end; + end; + + Grid.CellFont[0, row].Color := clBlack; + Grid.Cells[0, row] := 'Total'; + Grid.Cells[1, row] := IntToStr(TotQSO); + Grid.Cells[2, row] := IntToStr(TotPoints); + if GeneralMulti2.NoMulti then + Grid.Cells[3, row] := '-' + else + Grid.Cells[3, row] := IntToStr(TotMulti); + + if ShowCWRatio then + begin + Grid.Cells[4, row] := IntToStr(TotalCWQSOs); + if TotQSO > 0 then + Grid.Cells[5, row] := FloatToStrF(100*(TotalCWQSOs/TotQSO), ffFixed, 1000, 1) + else + Grid.Cells[5, row] := '-'; + end; + + inc(row); + Grid.CellFont[0, row].Color := clBlack; + Grid.Cells[0, row] := 'Score'; + Grid.Cells[1, row] := ''; + Grid.Cells[2, row] := ''; + if GeneralMulti2.NoMulti then + Grid.Cells[3, row] := IntToStr(TotPoints) + else + Grid.Cells[3, row] := IntToStr(TotPoints*TotMulti); + Grid.Height := 16*(row+1); + GeneralScore.Height := Grid.Height + (333-256); +end; + + +procedure TGeneralScore.CalcPoints(var aQSO : TQSO); +var i : integer; + ch : char; + C : TCountry; +begin + aQSO.QSO.Points := PointsTable[aQSO.QSO.Band, aQSO.QSO.Mode]; + + if GeneralMulti2._DXTEST then + begin + if SameCTYPoints or SameCONTPoints then + begin + i := aQSO.QSO.Power2; + if (i < CountryList.List.Count) and (i >= 0) then + begin + C := TCountry(CountryList.List[i]); + if SameCTYPoints and (C.Country = MyCountry) then + aQSO.QSO.Points := SameCTYPointsTable[aQSO.QSO.Band, aQSO.QSO.Mode] + else + if SameCONTPoints and (C.Continent = MyContinent) then + aQSO.QSO.Points := SameCONTPointsTable[aQSO.QSO.Band, aQSO.QSO.Mode]; + end; + end; + end; + + if GeneralMulti2.IsLocal(aQSO) then + aQSO.QSO.Points := LocalPointsTable[aQSO.QSO.Band, aQSO.QSO.Mode]; + + if AlphabetPoints then + begin + aQSO.QSO.Points := 0; + i := length(aQSO.QSO.NrRcvd); + if i > 0 then + begin + ch := aQSO.QSO.NrRcvd[i]; + if ch in ['0'..'Z'] then + aQSO.QSO.Points := AlphabetPointsTable[ord(ch)]; + end; + end; + + if SpecialCalls <> '' then + begin + if pos(','+aQSO.QSO.Callsign+',', ','+SpecialCalls+',') > 0 then + aQSO.QSO.Points := SpecialCallPointsTable[aQSO.QSO.Band, aQSO.QSO.Mode]; + end; +end; + +procedure TGeneralScore.AddNoUpdate(var aQSO : TQSO); +var i : integer; + tempQSO : TQSO; +begin + inherited; + + if aQSO.QSO.Dupe then + exit; + + CalcPoints(aQSO); + + if Log.CountHigherPoints = True then + begin + i := Log.DifferentModePointer; + If i > 0 then + begin + if TQSO(Log.List[i]).QSO.Points < aQSO.QSO.Points then + begin + TempQSO := TQSO(Log.List[i]); + Dec(Points[TempQSO.QSO.Band], TempQSO.QSO.Points); + TQSO(Log.List[i]).QSO.Points := 0; + //NeedRefresh := True; + end + else + aQSO.QSO.Points := 0; + end; + end; + + Inc(Points[aQSO.QSO.Band], aQSO.QSO.Points); +end; + +procedure TGeneralScore.FormCreate(Sender: TObject); +var B : TBand; + M : TMode; +begin + inherited; + WARC := False; +end; + +procedure TGeneralScore.Reset; +begin + inherited; +end; + +procedure TGeneralScore.Add(var aQSO : TQSO); +begin + inherited; +end; + + +procedure TGeneralScore.FormShow(Sender: TObject); +begin + inherited; + Button1.SetFocus; + Grid.Col := 1; + Grid.Row := 1; +end; + + +end. diff --git a/src/UIARUMulti.dfm b/src/UIARUMulti.dfm new file mode 100644 index 00000000..cbca29da Binary files /dev/null and b/src/UIARUMulti.dfm differ diff --git a/src/UIARUMulti.pas b/src/UIARUMulti.pas new file mode 100644 index 00000000..26d8d87d --- /dev/null +++ b/src/UIARUMulti.pas @@ -0,0 +1,551 @@ +unit UIARUMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UWWMulti, UMultipliers, StdCtrls, ExtCtrls, JLLabel, zLogGlobal, Grids, Cologrid; + +type + + TIARUZone = class + Multi : string[30]; + Worked : array[b19..b28] of boolean; + function Summary : string; + constructor Create; + end; + + TIARUZoneList = class + List : TList; + constructor Create; + procedure Add(M : TIARUZone); + end; + + TIARUMulti = class(TWWMulti) + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure GoButtonClick(Sender: TObject); + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + procedure GridTopLeftChanged(Sender: TObject); + private + ZoneList : TIARUZoneList; + { Private declarations } + public + procedure Reset; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Add(var aQSO : TQSO); override; + function ValidMulti(aQSO : TQSO) : boolean; override; + function GuessZone(aQSO : TQSO) : string; override; + procedure Update; override; + procedure RefreshGrid; override; + function GetInfo(aQSO : TQSO) : string; override; + procedure CheckMulti(aQSO : TQSO); override; + { Public declarations } + end; + + +var + IARUMulti: TIARUMulti; + +implementation + +uses Main, UOptions; + +{$R *.DFM} + +constructor TIARUZone.Create; +var B : TBand; +begin + for B := b19 to b28 do + Worked[B] := False; + Multi := ''; +end; + +function TIARUZone.Summary : string; +var i : integer; + str : string; + B : TBand; +begin + str := ''; + + if (Multi[1] in ['0'..'9']) then + try + i := StrToInt(Multi); + except + on EConvertError do + i := 0; + end; + + if (i in [1..90]) then + str := 'ITU Zone '+FillLeft(Multi,2) + else + if (Multi = 'AC') then + str := 'Admin. Council AC' + else + if (Multi = 'R1') or (Multi = 'R2') or (Multi = 'R3') then + str := 'Reg. Exec. Committee '+Multi + else + str := 'IARU HQ Station '+Multi; + + str := FillRight(str, 24); + + for B := b19 to b28 do + if NotWARC(B) then + if Worked[B] then + str := str + '* ' + else + str := str + '. '; + + Result := str; +end; + +constructor TIARUZoneList.Create; +var M : TIARUZone; + i : integer; +begin + List := TList.Create; + for i := 1 to 90 do + begin + M := TIARUZone.Create; + M.Multi := IntToStr(i); + List.Add(M); + end; + M := TIARUZone.Create; + M.Multi := 'AC'; + List.Add(M); + M := TIARUZone.Create; + M.Multi := 'R1'; + List.Add(M); + M := TIARUZone.Create; + M.Multi := 'R2'; + List.Add(M); + M := TIARUZone.Create; + M.Multi := 'R3'; + List.Add(M); +end; + +procedure TIARUZoneList.Add(M : TIARUZone); +var i, j : integer; +begin +// List.Add(M); + j := List.Count; + if j > 94 then + begin + for i := 94 to j-1 do + if StrMore(M.Multi, TIARUZone(List[i]).Multi) = False then + begin + List.Insert(i,M); + exit; + end; + List.Add(M); + exit; + end + else + List.Add(M); +end; + +procedure TIARUMulti.CheckMulti(aQSO : TQSO); +var str, str2 : string; + i, j, z : integer; + B : TBand; + boo : boolean; +begin + str := aQSO.QSO.NrRcvd; + B := aQSO.QSO.band; + boo := false; + for j := 0 to ZoneList.List.Count - 1 do + begin + if TIARUZone(ZoneList.List[j]).Multi = str then + begin + boo := true; + break; + end; + end; + if boo = False then + begin + MainForm.WriteStatusLine('HQ '+str+' is not worked on any band', false); + exit; + end; + + + try + z := StrToInt(str); + except + on EConvertError do + z := 0; + end; + + if z = 0 then + begin + if str = 'AC' then + str2 := 'Admin. Council ' + else + if (str = 'R1') or (str = 'R2') or (str = 'R3') then + str2 := 'Reg. Exec. Committee ' + else + str2 := 'HQ '; + end + else + str2 := 'Zone '; + str2 := str2 + str+ ' : '; + if TIARUZone(ZoneList.List[j]).Worked[aQSO.QSO.Band] then + str2 := str2 + 'Worked on this band. ' + else + str2 := str2 + 'Needed on this band. '; + str2 := str2 + 'Worked on : '; + for B := b19 to b28 do + if TIARUZone(ZoneList.List[j]).Worked[B] then + str2 := str2 + MHzString[B]+' '; + + MainForm.WriteStatusLine(str2, false); +end; + +function TIARUMulti.GuessZone(aQSO : TQSO) : string; +var i, k : integer; + C : TCountry; + P : TPrefix; + str : string; +begin + P := GetPrefix(aQSO); + if P = nil then + begin + Result := ''; + exit; + end; + C := TCountry(CountryList.List[P.Index]); + str := aQSO.QSO.CallSign; + i := C.Zone; + + if (C.Country = 'W') or (C.Country = 'K') then + begin + k := GetArea(str); + case k of + 1..4 : i := 8; + 5,8,9,0 : i := 7; + 6,7 : i := 6; + end; + end; + + if C.Country = 'VE' then + begin + k := GetArea(str); + case k of + 1,2 : i := 8; + 3..6 : i := 3; + 7 : i := 2; + 8 : i := 2; + 9 : i := 9; + 0 : i := 4; + end; + end; + + if C.Country = 'VK' then + begin + k := GetArea(str); + case k of + 1..5,7 : i := 55; + 6,8 : i := 58; + 9,0 : i := 30;{Should not happen} + end; + end; + +{ + if C.Country = 'BY' then + begin + k := GetArea(str); + case k of + 1..8 : i := 33; + 9,0 : i := 33; + end; + end; +} + + if P.OvrZone > 0 then + i := P.OvrZone; + + if i = 0 then + Result := '' + else + Result := IntToStr(i); +end; + + +function TIARUMulti.ValidMulti(aQSO : TQSO) : boolean; +begin + if aQSO.QSO.NrRcvd <> '' then + Result := True + else + Result := False; +end; + +procedure TIARUMulti.Reset; +var i : integer; + B : TBand; +begin + for i := 0 to ZoneList.List.Count-1 do + for B := b19 to b28 do + TIARUZone(ZoneList.List[i]).Worked[B] := False; + Grid.RowCount := ZoneList.List.Count; + for i := 0 to ZoneList.List.Count-1 do + Grid.Cells[0, i] := (TIARUZone(ZoneList.List[i]).Summary); + //ListBox.Items[i] := (TIARUZone(ZoneList.List[i]).Summary); +end; + +procedure TIARUMulti.FormCreate(Sender: TObject); +var i : integer; + aQSO : TQSO; + P : TPrefix; + C : TCountry; +begin + //inherited; + CountryList := TCountryList.Create; + PrefixList := TPrefixList.Create; + if FileExists('CTY.DAT') then + begin + LoadCTY_DAT(testIARU, CountryList, PrefixList); + MainForm.WriteStatusLine('Loaded CTY.DAT', true); + end + else + LoadCountryDataFromFile('IARU.DAT', CountryList, PrefixList); + + {if CountryList.List.Count = 0 then exit; + for i := 0 to CountryList.List.Count-1 do + begin + ListBox.Items.Add(TCountry(CountryList.List[i]).Summary); + end;} + ZoneList := TIARUZoneList.Create; + {for i := 0 to ZoneList.List.Count-1 do + ListBox.Items.Add(TIARUZone(ZoneList.List[i]).Summary);} + + Reset; + + MyContinent := 'AS'; + MyCountry := 'JA'; + MyZone := '25'; + + if (Options.Settings._mycall <> '') and (Options.Settings._mycall <> 'Your call sign') then + begin + aQSO := TQSO.Create; + aQSO.QSO.callsign := Uppercase(Options.Settings._mycall); + + P := GetPrefix(aQSO); + //i := GetCountryIndex(aQSO); + if P = nil then + i := 0 + else + i := P.Index; + if i > 0 then + begin + MyCountry := TCountry(CountryList.List[i]).Country; + //MyZone := IntToStr(TCountry(CountryList.List[i]).Zone); + + if Options.Settings._iaruzone = '' then + Options.Settings._iaruzone := GuessZone(aQSO); + MyZone := Options.Settings._iaruzone; + + //MyContinent := TCountry(CountryList.List[i]).Continent; + if P.OvrContinent = '' then + MyContinent := TCountry(CountryList.List[i]).Continent + else + MyContinent := P.OvrContinent; + end; + aQSO.Free; + end; + + //WWZone.Reset; +end; + +function TIARUMulti.GetInfo(aQSO : TQSO) : string; +var i, k : integer; + C : TCountry; + P : TPrefix; + str, z : string; + B : TBand; +begin + P := GetPrefix(aQSO); + if P = nil then + begin + Result := 'Unknown prefix'; + exit; + end; + C := TCountry(CountryList.List[P.Index]); + str := 'Continent: '; + if P.OvrContinent <> '' then + str := str + P.OvrContinent + else + str := str + C.Continent; + z := GuessZone(aQSO); + str := str + ' ITU Zone/Multi: '+z+ ' Worked on: '; + for i := 0 to ZoneList.List.Count - 1 do + begin + if TIARUZone(ZoneList.List[i]).Multi = z then + begin + for B := b19 to b28 do + if NotWARC(B) then + if TIARUZone(ZoneList.List[i]).Worked[B] then + str := str + MHzString[B] + ' ' + else + for k := 1 to length(MHzString[B]) do + str := str + ' '; + end; + end; + Result := str; +end; + +procedure TIARUMulti.Update; +var j, k : integer; +begin + Grid.RowCount := ZoneList.List.Count; + for j := 0 to ZoneList.List.Count - 1 do + Grid.Cells[0, j] {ListBox.Items[j]} := TIARUZone(ZoneList.List[j]).Summary; + RenewCluster; + RenewBandScope; +end; + +procedure TIARUMulti.AddNoUpdate(var aQSO : TQSO); +var str : string; + B : TBand; + i, j : integer; + C : TCountry; + P : TPrefix; + _cont : string[3]; + boo, HQ : boolean; + M : TIARUZone; +begin + aQSO.QSO.NewMulti1 := False; + str := aQSO.QSO.NrRcvd; + aQSO.QSO.Multi1 := str; + + if aQSO.QSO.Dupe then + exit; + + B := aQSO.QSO.band; + try + i := StrToInt(str); + except + on EConvertError do + i := 0; + end; + + HQ := True; + if i in [1..90] then + begin + str := IntToStr(i); + HQ := false; + end; + + + boo := false; + for j := 0 to ZoneList.List.Count - 1 do + begin + if TIARUZone(ZoneList.List[j]).Multi = str then + begin + boo := true; + if TIARUZone(ZoneList.List[j]).Worked[aQSO.QSO.Band] = False then + begin + TIARUZone(ZoneList.List[j]).Worked[aQSO.QSO.Band] := True; + aQSO.QSO.NewMulti1 := True; + break; + end; + end; + end; + + if boo = false then + begin + M := TIARUZone.Create; + M.Multi := str; + M.Worked[aQSO.QSO.Band] := True; + aQSO.QSO.NewMulti1 := True; + ZoneList.Add(M); + Update; + //Grid.Cells[0,ZoneList.List.Count-1] := M.Summary; + end; + + P := GetPrefix(aQSO); + if P = nil then // /MM results in p = nil !! + i := 0 + else + i := P.Index; + + C := TCountry(CountryList.List[i]); + + if P = nil then + _cont := C.Continent + else + if P.OvrContinent = '' then + _cont := C.Continent + else + _cont := P.OvrContinent; + + if (MyZone = str) or (HQ = True) then + aQSO.QSO.Points := 1 + else + if MyContinent = _cont then + aQSO.QSO.Points := 3 + else + aQSO.QSO.points := 5; + +end; + + + +procedure TIARUMulti.FormShow(Sender: TObject); +begin + // inherited; +end; + +procedure TIARUMulti.GoButtonClick(Sender: TObject); +var i : integer; + temp : string; +begin + temp := Edit1.Text; + for i := 0 to ZoneList.List.Count-1 do + begin + if pos(temp,TIARUZone(ZoneList.List[i]).Multi) = 1 then + begin + //ListBox.TopIndex := i; + Grid.TopRow := i; + break; + end; + end; +end; + +procedure TIARUMulti.GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); +var B : TBand; +begin + //inherited; + B := Main.CurrentQSO.QSO.Band; + if TIARUZone(ZoneList.List[ARow]).Worked[B] then + FColor := clRed + else + FColor := clBlack; +end; + +procedure TIARUMulti.RefreshGrid; +begin + //inherit + Update; +end; + +procedure TIARUMulti.GridTopLeftChanged(Sender: TObject); +begin + //inherited; + //Update; +end; + +procedure TIARUMulti.Add(var aQSO : TQSO); +begin + AddNoUpdate(aQSO); + { + if (aQSO.QSO.Reserve2 <> $AA) and (MostRecentCty <> nil) then + Grid.TopRow := MostRecentCty.GridIndex; + } + RefreshGrid; + //RefreshZone; + AddSpot(aQSO); +end; + + +end. diff --git a/src/UIARUScore.dfm b/src/UIARUScore.dfm new file mode 100644 index 00000000..a8e88f3d Binary files /dev/null and b/src/UIARUScore.dfm differ diff --git a/src/UIARUScore.pas b/src/UIARUScore.pas new file mode 100644 index 00000000..0895b3c9 --- /dev/null +++ b/src/UIARUScore.pas @@ -0,0 +1,162 @@ +unit UIARUScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, StdCtrls, ExtCtrls, zLogGlobal, Aligrid, Cologrid, + Buttons; + +type + TIARUScore = class(TBasicScore) + Grid: TMgrid; + procedure FormCreate(Sender: TObject); + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + private + { Private declarations } + BLo, BHi : TBand; + public + procedure InitGrid(B0, B1 : TBand); + procedure Update; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + { Public declarations } + end; + +var + IARUScore: TIARUScore; + +implementation + +{$R *.DFM} + +procedure TIARUScore.AddNoUpdate(var aQSO : TQSO); +var band : TBand; +begin + {BasicScore.AddNoUpdate(aQSO);} + inherited; + if aQSO.QSO.Dupe then + exit; + band := aQSO.QSO.band; + {if aQSO.QSO.NewMulti2 then + inc(Multi2[band]);} + inc(Points[band], aQSO.QSO.Points); {Points calculated in WWMulti.AddNoUpdate} +end; + +procedure TIARUScore.InitGrid(B0, B1 : TBand); +var B : TBand; + i : integer; +begin + Blo := B0; + BHi := B1; + with Grid do + begin + RowCount := 9; + ColCount := 4; + Cells[0,0] := 'MHz'; + Cells[1,0] := 'QSOs'; + Cells[2,0] := 'Points'; + Cells[3,0] := 'Multi'; + i := 1; + for B := B0 to B1 do + if NotWARC(B) then + begin + Cells[0,i] := MHzString[B]; + inc(i); + end; + Cells[0,i] := 'Total'; + Cells[0,i+1] := 'Score'; + Color := clBtnFace; + RowCount := i + 2; + Height := GridHeight; + end; + ClientHeight := Grid.Height + Panel1.Height+ 10; +end; + +procedure TIARUScore.FormCreate(Sender: TObject); +begin + inherited; + InitGrid(b19,b28); + //ShowCWRatio := True; +end; + +procedure TIARUScore.Update; +var band : TBand; + TotQSO, TotPts, TotMulti : LongInt; + row : integer; +begin + TotQSO := 0; TotPts := 0; TotMulti := 0; + + if ShowCWRatio then + begin + Grid.ColCount := 6; + Grid.Width := Grid.DefaultColWidth * 6; + end + else + begin + Grid.ColCount := 4; + Grid.Width := Grid.DefaultColWidth * 4; + end; + if ShowCWRatio then + begin + Grid.Cells[4,0] := 'CW Q''s'; + Grid.Cells[5,0] := 'CW %'; + end; + + + row := 1; + for band := bLo to bHi do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(QSO[band]); + TotQSO := TotQSO + QSO[band]; + Grid.Cells[2,row] := IntToStr(Points[band]); + TotPts := TotPts + Points[band]; + Grid.Cells[3,row] := IntToStr(Multi[band]); + TotMulti := TotMulti + Multi[band]; + + if ShowCWRatio then + begin + Grid.Cells[4,row] := IntToStr(CWQSO[band]); + if QSO[band] > 0 then + Grid.Cells[5,row] := FloatToStrF(100*(CWQSO[band] / QSO[band]), ffFixed, 1000, 1) + else + Grid.Cells[5,row] := '-'; + end; + + inc(row); + end; + end; + Grid.Cells[1, row] := IntToStr(TotQSO); + Grid.Cells[2, row] := IntToStr(TotPts); + Grid.Cells[3, row] := IntToStr(TotMulti); + Grid.Cells[3, row+1] := IntToStr(TotPts*TotMulti); + + if ShowCWRatio then + begin + Grid.Cells[4, row] := IntToStr(TotalCWQSOs); + if TotPts > 0 then + Grid.Cells[5, row] := FloatToStrF(100*(TotalCWQSOs/TotalQSOs), ffFixed, 1000, 1) + else + Grid.Cells[5, row] := '-'; + end; + + +end; + + +procedure TIARUScore.GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); +begin + inherited; + if ACol = 0 then + FColor := clBlue + else + if ARow = 0 then + FColor := clGreen + else + FColor := clBlack; +end; + +end. diff --git a/src/UIOTACategory.dfm b/src/UIOTACategory.dfm new file mode 100644 index 00000000..603a826d Binary files /dev/null and b/src/UIOTACategory.dfm differ diff --git a/src/UIOTACategory.pas b/src/UIOTACategory.pas new file mode 100644 index 00000000..4edacd7c --- /dev/null +++ b/src/UIOTACategory.pas @@ -0,0 +1,50 @@ +unit UIOTACategory; + +interface + +uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, + Buttons, ExtCtrls; + +type + TIOTACategory = class(TForm) + OKBtn: TButton; + GroupBox1: TGroupBox; + rbIOTA: TRadioButton; + rbDXCC: TRadioButton; + Edit1: TEdit; + Label1: TLabel; + procedure rbDXCCClick(Sender: TObject); + procedure rbIOTAClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + function GetIOTA : string; + end; + +var + IOTACategory: TIOTACategory; + +implementation + +{$R *.DFM} + +procedure TIOTACategory.rbDXCCClick(Sender: TObject); +begin + Edit1.Enabled := False; +end; + +procedure TIOTACategory.rbIOTAClick(Sender: TObject); +begin + Edit1.Enabled := True; +end; + +function TIOTACategory.GetIOTA : string; +begin + if rbIOTA.Checked then + Result := Edit1.Text + else + Result := ''; +end; + +end. diff --git a/src/UIOTAMulti.dfm b/src/UIOTAMulti.dfm new file mode 100644 index 00000000..a2bed3f8 Binary files /dev/null and b/src/UIOTAMulti.dfm differ diff --git a/src/UIOTAMulti.pas b/src/UIOTAMulti.pas new file mode 100644 index 00000000..79ab1895 --- /dev/null +++ b/src/UIOTAMulti.pas @@ -0,0 +1,414 @@ +unit UIOTAMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UACAGMulti, Grids, Cologrid, StdCtrls, JLLabel, ExtCtrls, zLogGlobal, {UWWMulti}UMultipliers, + UzLogCW; + +type + TIsland = class + RefNumber : string[7]; + Name : string; + Worked : array[b19..HiBand, mCW..mSSB] of boolean; + constructor Create; + function Summary : string; + end; + + TIslandList = class + List : TList; + constructor Create; + destructor Destroy; override; + procedure LoadFromFile(filename : string); + procedure SaveToFile(filename : string); + end; + + TIOTAMulti = class(TACAGMulti) + procedure FormCreate(Sender: TObject); + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + procedure GoButtonClick2(Sender: TObject); + procedure FormDestroy(Sender: TObject); + private + { Private declarations } + IslandList : TIslandList; + CountryList : TCountryList; + PrefixList : TPrefixList; + public + MyIOTA, MyDXCC : string; + function ExtractMulti(aQSO : TQSO) : string; override; + procedure Reset; override; + procedure Update; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + function ValidMulti(aQSO : TQSO) : boolean; override; + procedure CheckMulti(aQSO : TQSO); override; + { Public declarations } + end; + +var + IOTAMulti: TIOTAMulti; + +implementation + +uses Main, UNewIOTARef, UOptions, UIOTACategory; + +{$R *.DFM} + +function TIOTAMulti.ValidMulti(aQSO : TQSO) : boolean; +begin + Result := True; +end; + +constructor TIsland.Create; +var B : TBand; + M : TMode; +begin + RefNumber := ''; + Name := ''; + for B := b19 to HiBand do + for M := mCW to mSSB do + Worked[B, M] := False; +end; + +function TIsland.Summary : string; +var str : string; + strname : string[30]; + B : TBand; + M : TMode; +begin + strname := Name; + str := FillRight(RefNumber,6) + FillRight(strname, 31); + for B := b35 to b28 do + if NotWARC(B) then + for M := mCW to mSSB do + if Worked[B, M] = True then + str := str + '* ' + else + str := str + '. '; + Result := str; +end; + +constructor TIslandList.Create; +begin + List := TList.Create; +end; + +destructor TIslandList.Destroy; +var i : integer; +begin + for i := 0 to List.Count - 1 do + begin + if List[i] <> nil then + TIsland(List[i]).Free; + end; + List.Free; +end; + +procedure TIslandList.LoadFromFile(filename : string); +var f : textfile; + str : string; + I : TIsland; +begin + assign(f, filename); + try + reset(f); + except + on EFOpenError do + begin + MessageDlg('DAT file '+filename+' cannot be opened', mtError, + [mbOK], 0); + exit; {Alert that the file cannot be opened \\} + end; + end; + readln(f, str); + while not(eof(f)) do + begin + readln(f, str); + if Pos('end of file', LowerCase(str))>0 then break; + I := TIsland.Create; + I.RefNumber := Copy(str, 1, 5); + Delete(str, 1, 6); + I.Name := str; + List.Add(I); + end; + system.close(f); +end; + +procedure TIslandList.SaveToFile(filename : string); +var f : textfile; + str : string; + I : TIsland; + j : integer; +begin + assign(f, filename); + try + rewrite(f); + except + on EFOpenError do + begin + MessageDlg('DAT file '+filename+' cannot be opened', mtError, + [mbOK], 0); + exit; {Alert that the file cannot be opened \\} + end; + end; + for j := 0 to List.Count - 1 do + begin + I := TIsland(List[j]); + str := I.RefNumber + ' ' + I.Name; + writeln(f, str); + end; + system.close(f); +end; + +function TIOTAMulti.ExtractMulti(aQSO : TQSO) : string; +var i, k : integer; + S, work, cont : string; +begin + S := aQSO.QSO.NrRcvd; + Result := ''; + for i := 1 to length(S) do + if S[i] in ['A'..'Z'] then + begin + work := S; + Delete(work, 1, i - 1); + if pos('-',work) > 0 then + Delete(work, pos('-',work), 1); + + cont := copy(work, 1, 2); + if pos(cont, 'AF;AS;AN;EU;OC;NA;SA') = 0 then + exit; + Delete(work,1,2); + if length(work) in [1..3] then + begin + try + k := StrToInt(work); + except + on EConvertError do + exit; // not a number + end; + case k of + 0..9 : work := '00'+IntToStr(k); + 10..99 : work := '0'+IntToStr(k); + else + work := IntToStr(k); + end; + work := cont + work; + end + else // not one to three digit + exit; + { + if length(work) <> 5 then + exit; + for j := 3 to 5 do + if not(work[j] in ['0'..'9']) then + exit; } + Result := work; + end; +end; + +procedure TIOTAMulti.AddNoUpdate(var aQSO : TQSO); +var str, str2 : string; + i, j : integer; + C : TIsland; + P : TPrefix; +begin + aQSO.QSO.NewMulti1 := False; + str := ExtractMulti(aQSO); + + if str = '' then + aQSO.QSO.Points := 3 + else + if str = MyIOTA then + aQSO.QSO.Points := 3 + else + aQSO.QSO.Points := 15; + aQSO.QSO.Multi1 := str; + if aQSO.QSO.Dupe then + exit; + if str = '' then + exit; + for i := 0 to IslandList.List.Count-1 do + begin + C := TIsland(IslandList.List[i]); + if str = C.RefNumber then + begin + if C.Worked[aQSO.QSO.band, aQSO.QSO.Mode] = False then + begin + C.Worked[aQSO.QSO.band, aQSO.QSO.Mode] := True; + aQSO.QSO.NewMulti1 := True; + end; + LatestMultiAddition := i; + exit; + //break; + end; + end; + NewIOTARef.SetNewRef(str); + if NewIOTARef.ShowModal = mrOK then + begin + C := TIsland.Create; + C.Name := NewIOTARef.GetName; + C.RefNumber := str; + C.Worked[aQSO.QSO.band, aQSO.QSO.Mode] := True; + aQSO.QSO.NewMulti1 := True; + for i := 0 to IslandList.List.Count-1 do + if StrMore(str, TIsland(IslandList.List[i]).RefNumber) = False then + begin + IslandList.List.Insert(i,C); + //Grid.RowCount := Grid.RowCount + 1; + //Update; + IslandList.SaveToFile('IOTA.DAT'); + exit; + end; + IslandList.List.Add(C); + //Grid.RowCount := Grid.RowCount + 1; + //Update; + IslandList.SaveToFile('IOTA.DAT'); + exit; + end + else + begin + end; + // Input New Multi +end; + +procedure TIOTAMulti.Reset; +var i, j : integer; + M : TMode; + B : TBand; + str : string; +begin + if IslandList.List.Count = 0 then exit; + j := Grid.TopRow; + Grid.RowCount := 0; + Grid.RowCount := IslandList.List.Count; + for i := 0 to IslandList.List.Count-1 do + begin + for B := b19 to HiBand do + for M := mCW to mSSB do + TIsland(IslandList.List[i]).Worked[B, M] := false; + str := TIsland(IslandList.List[i]).Summary; + Grid.Cells[0,i] := str; + end; + Grid.TopRow := j; +end; + +procedure TIOTAMulti.Update; +var i : integer; + C : TIsland; + str : string; +begin + for i := 0 to IslandList.List.Count-1 do + begin + C := TIsland(IslandList.List[i]); + str := C.Summary; + Grid.Cells[0,i] := str; + end; + Grid.TopRow := LatestMultiAddition; +end; + +procedure TIOTAMulti.FormCreate(Sender: TObject); +var Q : TQSO; + P : TPrefix; +begin + //inherited; + IslandList := TIslandList.Create; + IslandList.LoadFromFile('IOTA.DAT'); + Reset; + + CountryList := TCountryLIst.Create; + PrefixList := TPrefixList.Create; + + if FileExists('CTY.DAT') then + begin + LoadCTY_DAT(testDXCCWWZone, CountryList, PrefixList); + MainForm.WriteStatusLine('Loaded CTY.DAT', true); + end + else + LoadCountryDataFromFile('DXCC.DAT', CountryList, PrefixList); + + if CountryList.List.Count = 0 then exit; + + Q := TQSO.Create; + Q.QSO.Callsign := UpperCase(Options.MyCall); + P := GetPrefixX(Q, PrefixList); + MyDXCC := TCountry(CountryList.List[P.Index]).Country; + Q.Free; + + MyIOTA := ''; + + Application.CreateForm(TIOTACategory, IOTACategory); + IOTACategory.Label1.Caption := MyDXCC; + if IOTACategory.ShowModal = mrOK then + IOTAMulti.MyIOTA := IOTACategory.GetIOTA; + IOTACategory.Free; + + UzLogCW.QTHString := IOTAMulti.MyIOTA; +end; + +procedure TIOTAMulti.GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); +var B : TBand; + M : TMode; +begin + //inherited; + B := Main.CurrentQSO.QSO.Band; + M := Main.CurrentQSO.QSO.Mode; + if TIsland(IslandList.List[ARow]).Worked[B, M] then + FColor := clRed + else + FColor := clBlack; +end; + +procedure TIOTAMulti.GoButtonClick2(Sender: TObject); +var temp : string; + i : integer; +begin + temp := Edit1.Text; + for i := 0 to IslandList.List.Count-1 do + begin + if pos(temp,TIsland(IslandList.List[i]).RefNumber) = 1 then + begin + Grid.TopRow := i; + break; + end; + end; +end; + +procedure TIOTAMulti.FormDestroy(Sender: TObject); +begin + inherited; + PrefixList.Destroy; + CountryList.Destroy; + IslandList.Destroy; +end; + +procedure TIOTAMulti.CheckMulti(aQSO : TQSO); +var str : string; + i : integer; + C : TIsland; +begin + str := ExtractMulti(aQSO); + if str = '' then + exit; + for i := 0 to IslandList.List.Count-1 do + begin + C := TIsland(IslandList.List[i]); + if str = C.RefNumber then + begin + //ListBox.TopIndex := i; + Grid.TopRow := i; + str := C.Summary; + if C.Worked[aQSO.QSO.Band, aQSO.QSO.Mode] then + str := str + 'Worked on this band/mode.' + else + str := str + 'Needed on this band/mode.'; + MainForm.WriteStatusLine(str, false); + exit; + end; + end; + MainForm.WriteStatusLine('Invalid number', false); +end; + + +end. diff --git a/src/UIntegerDialog.dfm b/src/UIntegerDialog.dfm new file mode 100644 index 00000000..9b6c1b64 Binary files /dev/null and b/src/UIntegerDialog.dfm differ diff --git a/src/UIntegerDialog.pas b/src/UIntegerDialog.pas new file mode 100644 index 00000000..c89cc006 --- /dev/null +++ b/src/UIntegerDialog.pas @@ -0,0 +1,104 @@ +unit UIntegerDialog; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls; + +type + TIntegerDialog = class(TForm) + Label1: TLabel; + Edit: TEdit; + Button1: TButton; + Button2: TButton; + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure Button2Click(Sender: TObject); + private + { Private declarations } + //Value : integer; + Cancelled : boolean; + public + procedure Init(i : integer; S : string); + function GetValue : integer; + function GetValueExtended : extended; + procedure SetLabel(S : string); + { Public declarations } + end; + +var + IntegerDialog: TIntegerDialog; + +implementation + +{$R *.DFM} + +procedure TIntegerDialog.Init(i : integer; S : string); +begin + Edit.Text := IntToStr(i); + SetLabel(S); +end; + +function TIntegerDialog.GetValue : integer; +var v : integer; +begin + if Cancelled then + begin + Result := 0; + exit; + end; + v := -1; + try + v := StrToInt(Edit.Text); + except + on EConvertError do + v := -1; + end; + Result := v; +end; + +function TIntegerDialog.GetValueExtended : extended; +var v : extended; +begin + v := -1; + try + v := StrToFloat(Edit.Text); + except + on EConvertError do + v := -1; + end; + Result := v; +end; + +procedure TIntegerDialog.SetLabel(S : string); +var w : integer; +begin + Label1.Caption := S; + w := IntegerDialog.Width - Label1.Width; + if w > 0 then + Label1.Left := w div 2 + else + w := 2; +end; + +procedure TIntegerDialog.FormCreate(Sender: TObject); +begin + Caption := ' '; +end; + +procedure TIntegerDialog.FormShow(Sender: TObject); +begin + Edit.Left := (IntegerDialog.Width - Edit.Width) div 2; + Button1.Left := Edit.Left - 16; + Button2.Left := Edit.Left + Edit.Width + 16 - Button2.Width; + Cancelled := False; +end; + +procedure TIntegerDialog.Button2Click(Sender: TObject); +begin + Cancelled := True; + Edit.Text := ''; +end; + +end. diff --git a/src/UJA0Multi.dfm b/src/UJA0Multi.dfm new file mode 100644 index 00000000..45549876 Binary files /dev/null and b/src/UJA0Multi.dfm differ diff --git a/src/UJA0Multi.pas b/src/UJA0Multi.pas new file mode 100644 index 00000000..a2f42612 --- /dev/null +++ b/src/UJA0Multi.pas @@ -0,0 +1,168 @@ +unit UJA0Multi; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicMulti, StdCtrls, ExtCtrls, zLogGlobal; + +type + TJA0Multi = class(TBasicMulti) + Panel1: TPanel; + Button1: TButton; + ListBox: TListBox; + StayOnTop: TCheckBox; + procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure StayOnTopClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + JA0 : boolean; + //PXList : TStringList; + PXListX : array[b35..b28] of TStringList; + // function TotalPrefix : integer; + function ValidMulti(aQSO : TQSO) : boolean; + function GetPrefix(aQSO : TQSO) : string; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Reset; override; + procedure Update; override; + end; + +var + JA0Multi: TJA0Multi; + +implementation + +uses Main; + +{$R *.DFM} + +function TJA0Multi.ValidMulti(aQSO : TQSO) : boolean; +var str : string; + B : TBand; + i : integer; +begin + str := aQSO.QSO.NrRcvd; + try + i := StrToInt(str); + except + on EConvertError do + i := 0; + end; + if i > 0 then + Result := True + else + Result := False; +end; + +procedure TJA0Multi.AddNoUpdate(var aQSO : TQSO); +var str : string; +begin + str := GetPrefix(aQSO); + aQSO.QSO.NewMulti1 := False; + aQSO.QSO.Multi1 := str; + + if aQSO.QSO.Dupe then + exit; + + {if (str = '') or (PXList.IndexOf(str) >= 0) then + exit;} + if (str = '') or (PXListX[aQSO.QSO.Band].IndexOf(str) >= 0) then + exit; + + + //PXList.Add(str); + PXListX[aQSO.QSO.Band].Add(str); + + aQSO.QSO.NewMulti1 := True; +end; + + +procedure TJA0Multi.Update; +var i, j : integer; + band : TBand; +begin + band := Main.CurrentQSO.QSO.Band; + ListBox.Items.Clear; + {if PXList.Count = 0 then + exit;} + if PXListX[band].Count = 0 then + exit; + + {for i := 0 to PXList.Count - 1 do + ListBox.Items.Add(PXList.Strings[i]);} + for i := 0 to PXListX[band].Count - 1 do + ListBox.Items.Add(PXListX[band].Strings[i]); +end; + +procedure TJA0Multi.Reset; +var b : TBand; +begin + ListBox.Items.Clear; + for b := b35 to b28 do + PXListX[b].Clear; + //PXList.Clear; +end; + + +function TJA0Multi.GetPrefix(aQSO : TQSO) : string; +var c : string; +begin + c := aQSO.QSO.Callsign; + Result := ''; + if JA0 then + begin + Result := copy(c, 1, 3); + end + else + begin + if Pos('0', c) = 0 then + exit; + if length(c) >= 6 then + begin + if c[6] in ['A'..'Z'] then + Result := c[2]+'*'+c[6] + else + Result := c[2]+'*'+c[5]; + end + else + begin + if length(c) < 5 then + exit; + if c[5] in ['A'..'Z'] then + Result := c[2]+'*'+c[5] + end; + end; +end; + +procedure TJA0Multi.Button1Click(Sender: TObject); +begin + inherited; + Close; +end; + +procedure TJA0Multi.FormCreate(Sender: TObject); +var b : TBand; +begin + inherited; + //PXList := TStringList.Create; + //PXList.Sorted := True; + for b := b35 to b28 do + begin + PXListX[b] := TStringList.Create; + PXListX[b].Sorted := True; + end; +end; + + +procedure TJA0Multi.StayOnTopClick(Sender: TObject); +begin + if StayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +end. diff --git a/src/UJA0Score.dfm b/src/UJA0Score.dfm new file mode 100644 index 00000000..2c4c5987 Binary files /dev/null and b/src/UJA0Score.dfm differ diff --git a/src/UJA0Score.pas b/src/UJA0Score.pas new file mode 100644 index 00000000..cbb5c575 --- /dev/null +++ b/src/UJA0Score.pas @@ -0,0 +1,128 @@ +unit UJA0Score; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, Aligrid, StdCtrls, ExtCtrls, zLogGlobal, Buttons; + +type + TJA0Score = class(TBasicScore) + Grid: TStringAlignGrid; + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + JA0Band : TBand; + procedure Reset; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + function IsJA0(aQSO : TQSO) : boolean; + procedure SetBand(B : TBand); + end; + +var + JA0Score: TJA0Score; + +implementation + +uses Main; + +{$R *.DFM} + +procedure TJA0Score.Reset; +var band : TBand; +begin + for band := b19 to HiBand do + begin + QSO[band] := 0; + Points[band] := 0; + Multi[band] := 0; + end; +end; + +function TJA0Score.IsJA0(aQSO : TQSO) : boolean; +begin + if Pos('0',aQSO.QSO.CallSign) > 0 then + Result := True + else + Result := False; +end; + +procedure TJA0Score.AddNoUpdate(var aQSO : TQSO); +var P : integer; + band : TBand; +begin + inherited; + + if aQSO.QSO.Dupe then + exit; + + if IsJA0(aQSO) then + aQSO.QSO.Points := 3 + else + aQSO.QSO.Points := 1; + inc(Points[aQSO.QSO.Band], aQSO.QSO.Points); +end; + +procedure TJA0Score.Update; +begin + if (JA0Band = b21) or (JA0Band = b28) then + begin + Grid.Cells[1, 1] := IntToStr(QSO[b21]); + Grid.Cells[2, 1] := IntToStr(Points[b21]); + Grid.Cells[3, 1] := IntToStr(Multi[b21]); + Grid.Cells[1, 2] := IntToStr(QSO[b28]); + Grid.Cells[2, 2] := IntToStr(Points[b28]); + Grid.Cells[3, 2] := IntToStr(Multi[b28]); + Grid.Cells[3, 3] := IntToStr((Points[b21]+Points[b28])*(Multi[b21]+Multi[b28])); + end + else + begin + Grid.Cells[1, 1] := IntToStr(QSO[JA0Band]); + Grid.Cells[2, 1] := IntToStr(Points[JA0Band]); + Grid.Cells[3, 1] := IntToStr(Multi[JA0Band]); + Grid.Cells[3, 2] := IntToStr(Points[JA0Band]*Multi[JA0Band]); + end; +end; + + +procedure TJA0Score.FormCreate(Sender: TObject); +begin + inherited; + // JA0Band := Main.CurrentQSO.QSO.Band; + // Grid.Cells[0,1] := MHzString[JA0Band]; +end; + +procedure TJA0Score.SetBand(B : TBand); +begin + JA0Band := B; + if (B = b21) or (B = b28) then + begin + Grid.Height := Grid.DefaultRowHeight*4 + 2; + Height := 130 + 22; + Grid.RowCount := 4; + Grid.Cells[0,1] := MHzString[b21]; + Grid.Cells[0,2] := MHzString[b28]; + Grid.Cells[0,3] := 'Score'; + end + else + begin + Height := 130; + Grid.Height := 57; + Grid.RowCount := 3; + Grid.Cells[0,1] := MHzString[JA0Band]; + Grid.Cells[0,2] := 'Score'; + end; +end; + +procedure TJA0Score.FormShow(Sender: TObject); +begin + inherited; + Grid.Col := 1; + Grid.Row := 1; +end; + +end. diff --git a/src/UJIDXMulti.dfm b/src/UJIDXMulti.dfm new file mode 100644 index 00000000..b569aea2 Binary files /dev/null and b/src/UJIDXMulti.dfm differ diff --git a/src/UJIDXMulti.pas b/src/UJIDXMulti.pas new file mode 100644 index 00000000..baffe14a --- /dev/null +++ b/src/UJIDXMulti.pas @@ -0,0 +1,123 @@ +unit UJIDXMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UWWMulti, UMultipliers, StdCtrls, JLLabel, ExtCtrls, zLogGlobal, Grids, Cologrid; + +type + TJIDXMulti = class(TWWMulti) + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure AddNoUpdate(var aQSO : TQSO); override; + end; + +var + JIDXMulti: TJIDXMulti; + +implementation + +uses UWWZone, UOptions, Main; + +{$R *.DFM} + +procedure TJIDXMulti.FormCreate(Sender: TObject); +var i : integer; + aQSO : TQSO; +begin + {inherited; } + CountryList := TCountryList.Create; + PrefixList := TPrefixList.Create; + + if FileExists('CTY.DAT') then + begin + LoadCTY_DAT(testDXCCWWZone, CountryList, PrefixList); + MainForm.WriteStatusLine('Loaded CTY.DAT', true); + end + else + LoadCountryDataFromFile('DXCC.DAT', CountryList, PrefixList); + +// LoadCountryDataFromFile('DXCC.DAT'); + if CountryList.List.Count = 0 then exit; + + {for i := 0 to CountryList.List.Count-1 do + begin + ListBox.Items.Add(TCountry(CountryList.List[i]).Summary); + end; } + + Reset; + MyContinent := 'AS'; + MyCountry := 'JA'; + + if (Options.Settings._mycall <> '') and (Options.Settings._mycall <> 'Your callsign') then + begin + aQSO := TQSO.Create; + aQSO.QSO.callsign := UpperCase(Options.Settings._mycall); + i := GetCountryIndex(aQSO); + if i > 0 then + begin + MyCountry := TCountry(CountryList.List[i]).Country; + MyContinent := TCountry(CountryList.List[i]).Continent; + end; + aQSO.Free; + end; + + WWZone.Reset; +end; + +procedure TJIDXMulti.AddNoUpdate(var aQSO : TQSO); +var str : string; + B : TBand; + i, j : integer; + C : TCountry; +begin + aQSO.QSO.NewMulti1 := False; + aQSO.QSO.NewMulti2 := False; + str := aQSO.QSO.NrRcvd; + aQSO.QSO.Multi1 := str; + + if aQSO.QSO.Dupe then + exit; + + B := aQSO.QSO.band; + try + i := StrToInt(str); + except + on EConvertError do + i := 0; + end; + if i in [1..MAXCQZONE] then + if Zone[B,i] = False then + begin + Zone[B,i] := True; + aQSO.QSO.NewMulti1 := True; + WWZone.Mark(B,i); + end; + + i := GetCountryIndex(aQSO); + + C := TCountry(CountryList.List[i]); + MostRecentCty := C; + + aQSO.QSO.Multi2 := C.Country; + + if i = 0 then // unknown cty. e.g. MM + exit; + + if C.Worked[B] = False then + begin + C.Worked[B] := True; + aQSO.QSO.NewMulti2 := True; + //j := ListBox.TopIndex; + Grid.Cells[0,C.GridIndex] := C.Summary; + //ListBox.Items.Delete(i); + //ListBox.Items.insert(i, C.Summary); + //ListBox.TopIndex := j; + end; +end; + +end. diff --git a/src/UJIDXScore.dfm b/src/UJIDXScore.dfm new file mode 100644 index 00000000..d4e52baa Binary files /dev/null and b/src/UJIDXScore.dfm differ diff --git a/src/UJIDXScore.pas b/src/UJIDXScore.pas new file mode 100644 index 00000000..2e665332 --- /dev/null +++ b/src/UJIDXScore.pas @@ -0,0 +1,58 @@ +unit UJIDXScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Aligrid, StdCtrls, ExtCtrls, zLogGlobal, UBasicScore, UWWScore, Grids; + +type + TJIDXScore = class(TWWScore) + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure AddNoUpdate(var aQSO : TQSO); override; + end; + +var + JIDXScore: TJIDXScore; + +implementation + +{uses UBasicScore; } + +{$R *.DFM} + + +procedure TJIDXScore.AddNoUpdate(var aQSO : TQSO); +var band : TBand; +begin + if aQSO.QSO.Dupe then + exit; + + BasicScore.AddNoUpdate(aQSO); + band := aQSO.QSO.band; + if aQSO.QSO.NewMulti2 then + inc(Multi2[band]); + case aQSO.QSO.Band of + b19 : aQSO.QSO.Points := 4; + b35 : aQSO.QSO.Points := 2; + b7..b21 : aQSO.QSO.Points := 1; + b28 : aQSO.QSO.Points := 2; + else + aQSO.QSO.Points := 0; + end; + + inc(Points[band], aQSO.QSO.Points); +end; + +procedure TJIDXScore.FormCreate(Sender: TObject); +var i : integer; +begin + inherited; + i := 0; +end; + +end. diff --git a/src/UJIDXScore2.dfm b/src/UJIDXScore2.dfm new file mode 100644 index 00000000..a7cc8556 Binary files /dev/null and b/src/UJIDXScore2.dfm differ diff --git a/src/UJIDXScore2.pas b/src/UJIDXScore2.pas new file mode 100644 index 00000000..930d42b9 --- /dev/null +++ b/src/UJIDXScore2.pas @@ -0,0 +1,137 @@ +unit UJIDXScore2; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, Aligrid, StdCtrls, ExtCtrls, zLogGlobal, Buttons; + +type + TJIDXScore2 = class(TBasicScore) + Grid: TStringAlignGrid; + private + { Private declarations } + public + { Public declarations } + Multi2 : array[b19..HiBand] of LongInt; + constructor Create; override; + procedure Renew; override; + procedure Reset; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + procedure CalcPoints(var aQSO : TQSO); + end; + +var + JIDXScore2: TJIDXScore2; + +implementation + +{$R *.DFM} + +constructor TJIDXScore2.Create; +var band : TBand; +begin + inherited; + for band := b19 to HiBand do + begin + Multi2[band] := 0; + end; +end; + +procedure TJIDXScore2.Renew; +var i : word; + band : TBand; +begin + Reset; + for i := 1 to Log.TotalQSO do + begin + band := TQSO(Log.List[i]).QSO.band; + inc(QSO[band]); + inc(Points[band],TQSO(Log.List[i]).QSO.Points); + if TQSO(Log.List[i]).QSO.NewMulti1 then + inc(Multi[band]); + if TQSO(Log.List[i]).QSO.NewMulti2 then + inc(Multi2[band]); + end; +end; + +procedure TJIDXScore2.Reset; +var band : TBand; +begin + for band := b19 to HiBand do + begin + QSO[band] := 0; + CWQSO[band] := 0; + Points[band] := 0; + Multi[band] := 0; + Multi2[band] := 0; + end; +end; + +procedure TJIDXScore2.CalcPoints(var aQSO : TQSO); +begin + case aQSO.QSO.Band of + b19 : aQSO.QSO.Points := 4; + b35 : aQSO.QSO.Points := 2; + b7..b21 : aQSO.QSO.Points := 1; + b28 : aQSO.QSO.Points := 2; + else + aQSO.QSO.Points := 0; + end; +end; + +procedure TJIDXScore2.AddNoUpdate(var aQSO : TQSO); +begin + inherited; + + if aQSO.QSO.Dupe then + exit; + + if aQSO.QSO.NewMulti2 then + inc(Multi2[aQSO.QSO.Band]); + + CalcPoints(aQSO); + + {case aQSO.QSO.Band of + b19 : aQSO.QSO.Points := 4; + b35 : aQSO.QSO.Points := 2; + b7..b21 : aQSO.QSO.Points := 1; + b28 : aQSO.QSO.Points := 2; + else + aQSO.QSO.Points := 0; + end;} + inc(Points[aQSO.QSO.Band], aQSO.QSO.Points); +end; + +procedure TJIDXScore2.Update; +var band : TBand; + TotQSO, TotPts, TotMulti, TotMulti2 : LongInt; + row : integer; +begin + TotQSO := 0; TotPts := 0; TotMulti := 0; TotMulti2 := 0; + row := 1; + for band := b19 to b28 do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(QSO[band]); + TotQSO := TotQSO + QSO[band]; + Grid.Cells[2,row] := IntToStr(Points[band]); + TotPts := TotPts + Points[band]; + Grid.Cells[3,row] := IntToStr(Multi[band]); + TotMulti := TotMulti + Multi[band]; + Grid.Cells[4,row] := IntToStr(Multi2[band]); + TotMulti2 := TotMulti2 + Multi2[band]; + inc(row); + end; + end; + Grid.Cells[1, 7] := IntToStr(TotQSO); + Grid.Cells[2, 7] := IntToStr(TotPts); + Grid.Cells[3, 7] := IntToStr(TotMulti); + Grid.Cells[4, 7] := IntToStr(TotMulti2); + Grid.Cells[4, 8] := IntToStr(TotPts*(TotMulti+TotMulti2)); +end; + + +end. diff --git a/src/UJIDX_DX_Multi.dfm b/src/UJIDX_DX_Multi.dfm new file mode 100644 index 00000000..c4389632 Binary files /dev/null and b/src/UJIDX_DX_Multi.dfm differ diff --git a/src/UJIDX_DX_Multi.pas b/src/UJIDX_DX_Multi.pas new file mode 100644 index 00000000..edf14e54 --- /dev/null +++ b/src/UJIDX_DX_Multi.pas @@ -0,0 +1,296 @@ +unit UJIDX_DX_Multi; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicMulti, StdCtrls, checklst, ComCtrls, ExtCtrls, zLogGlobal, JLLabel; + +type + TJIDX_DX_Multi = class(TBasicMulti) + TabControl: TTabControl; + CheckListBox: TCheckListBox; + Panel1: TPanel; + ListBox: TListBox; + RotateLabel1: TRotateLabel; + RotateLabel2: TRotateLabel; + RotateLabel3: TRotateLabel; + RotateLabel4: TRotateLabel; + RotateLabel5: TRotateLabel; + RotateLabel6: TRotateLabel; + procedure TabControlChange(Sender: TObject); + procedure CheckListBoxClickCheck(Sender: TObject); + private + MultiTable : array[b19..b28, 1..50] of boolean; + procedure HideLabels; {Hides band labels on the panel} + procedure ShowLabels; + { Private declarations } + public + { Public declarations } + procedure Update; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Add(var aQSO : TQSO); override; + procedure Reset; override; + function ValidMulti(aQSO : TQSO) : boolean; override; + procedure CheckMulti(aQSO : TQSO); override; + + procedure UpdateListBox; + procedure UpdateCheckListBox; + end; + +const KenNames : array[1..50] of string[19] = +('01 Hokkaido','02 Aomori','03 Iwate','04 Akita','05 Yamagata','06 Miyagi', + '07 Fukushima','08 Niigata','09 Nagano','10 Tokyo','11 Kanagawa', + '12 Chiba','13 Saitama','14 Ibaraki','15 Tochigi','16 Gumma','17 Yamanashi', + '18 Shizuoka','19 Gifu','20 Aichi','21 Mie','22 Kyoto','23 Shiga','24 Nara', + '25 Osaka','26 Wakayama','27 Hyogo','28 Toyama','29 Fukui','30 Ishikawa', + '31 Okayama','32 Shimane','33 Yamaguchi','34 Tottori','35 Hiroshima', + '36 Kagawa','37 Tokushima','38 Ehime','39 Kochi','40 Fukuoka','41 Saga', + '42 Nagasaki','43 Kumamoto','44 Oita','45 Miyazaki','46 Kagoshima', + '47 Okinawa','48 Ogasawara','49 Okinotorishima','50 Minamitorishima'); + + +var + JIDX_DX_Multi: TJIDX_DX_Multi; + +implementation + +uses Main; + +{$R *.DFM} + + + +procedure TJIDX_DX_Multi.HideLabels; +begin + RotateLabel1.Visible := False; + RotateLabel2.Visible := False; + RotateLabel3.Visible := False; + RotateLabel4.Visible := False; + RotateLabel5.Visible := False; + RotateLabel6.Visible := False; +end; + +procedure TJIDX_DX_Multi.ShowLabels; +begin + RotateLabel1.Visible := True; + RotateLabel2.Visible := True; + RotateLabel3.Visible := True; + RotateLabel4.Visible := True; + RotateLabel5.Visible := True; + RotateLabel6.Visible := True; +end; + +procedure TJIDX_DX_Multi.UpdateCheckListBox; +var i : integer; + B : TBand; +begin + i := TabControl.TabIndex; + if i > 5 then exit; + case i of + 0..2 : B := TBand(i); + 3 : B := b14; + 4 : B := b21; + 5 : B := b28; + end; + for i := 1 to 50 do + CheckListBox.Checked[i-1] := MultiTable[B, i]; +end; + +procedure TJIDX_DX_Multi.UpdateListBox; +var i : integer; + B : TBand; + temp, str : string; +begin + for i := 1 to 50 do + begin + temp := ''; + for B := b19 to b28 do + begin + if NotWARC(B) then + if MultiTable[B, i] then + temp := temp + '* ' + else + temp := temp + '. '; + str := copy(ListBox.Items[i-1], 1, 19); + FillRight(str, 19); + ListBox.Items.Delete(i-1); + ListBox.Items.Insert(i-1, str + ' ' + temp); + end; + end; +end; + +procedure TJIDX_DX_Multi.Update; +var i : integer; +begin + inherited; + if TabControl.TabIndex <> 6 then + begin + TabControl.TabIndex := OldBandOrd(Main.CurrentQSO.QSO.Band); + UpdateCheckListBox; + end; + {if TabControl.TabIndex <> 6 then + UpdateListBox + else + begin + TabControl.TabIndex := OldBandOrd(Main.CurrentQSO.QSO.Band); + UpdateCheckListBox; + end;} +end; + +procedure TJIDX_DX_Multi.AddNoUpdate(var aQSO : TQSO); +var str, temp : string; + M : Integer; + B : TBand; +begin + aQSO.QSO.NewMulti1 := False; + str := aQSO.QSO.NrRcvd; + aQSO.QSO.Multi1 := str; + + if aQSO.QSO.Dupe then + exit; + + if not(NotWARC(aQSO.QSO.Band)) then + exit; + M := 0; + try + M := StrToInt(str); + except + on EConvertError do M := 0; + end; + if not (M in [1..50]) then + exit; + + if MultiTable[aQSO.QSO.band, M] = False then + begin + MultiTable[aQSO.QSO.band, M] := True; + aQSO.QSO.NewMulti1 := True; + temp := ''; + for B := b19 to b28 do + begin + if NotWARC(B) then + if MultiTable[B, M] then + temp := temp + '* ' + else + temp := temp + '. '; + str := copy(ListBox.Items[M-1], 1, 19); + FillRight(str, 19); + ListBox.Items.Delete(M-1); + ListBox.Items.Insert(M-1, str + ' ' + temp); + end; + if OldBandOrd(aQSO.QSO.Band) = TabControl.TabIndex then + CheckListBox.Checked[M-1] := True; + //Update; + end; +end; + +procedure TJIDX_DX_Multi.Add(var aQSO : TQSO); +begin + inherited; +end; + +procedure TJIDX_DX_Multi.Reset; +var B : TBand; + i : integer; +begin + for B := b19 to b28 do + for i := 1 to 50 do + MultiTable[B, i] := False; + UpdateListBox; + UpdateCheckListBox; +end; + +function TJIDX_DX_Multi.ValidMulti(aQSO : TQSO) : boolean; +var str : string; + M : integer; +begin + Result := False; + str := aQSO.QSO.NrRcvd; + if not(NotWARC(aQSO.QSO.Band)) then + exit; + M := 0; + try + M := StrToInt(str); + except + on EConvertError do M := 0; + end; + if (M in [1..50]) then + Result := True; +end; + + +procedure TJIDX_DX_Multi.TabControlChange(Sender: TObject); +begin + inherited; + //TabControl.TabIndex := OldBandOrd(Main.CurrentQSO.QSO.Band); + if TabControl.TabIndex = 6 then + begin + if ListBox.Visible = False then + begin + ShowLabels; + CheckListBox.Align := alNone; + CheckListBox.Visible := False; + ListBox.Align := alClient; + ListBox.Visible := True; + end; + end + else + begin + if CheckListBox.Visible = False then + begin + HideLabels; + ListBox.Align := alNone; + ListBox.Visible := False; + CheckListBox.Align := alClient; + CheckListBox.Visible := True; + UpdateCheckListBox; + end + else + begin + UpdateCheckListBox; + end; + end; +end; + +procedure TJIDX_DX_Multi.CheckListBoxClickCheck(Sender: TObject); +begin + inherited; + UpdateCheckListBox; +end; + + +procedure TJIDX_DX_Multi.CheckMulti(aQSO : TQSO); +var str : string; + M : integer; + B : TBand; +begin + str := aQSO.QSO.NrRcvd; + M := 0; + try + M := StrToInt(str); + except + on EConvertError do M := 0; + end; + if not(M in [1..50]) then + begin + MainForm.WriteStatusLine('Invalid number', false); + exit; + end; + + str := KenNames[M]; + if MultiTable[aQSO.QSO.band,M] = True then + str := str + ' Worked on this band. Worked on : ' + else + str := str + ' Needed on this band. Worked on : '; + + for B := b19 to b28 do + if MultiTable[B, M] then + str := str + MHzString[B]+' ' + else + str := str + ''; + MainForm.WriteStatusLine(str, false); + +end; + + +end. diff --git a/src/UJIDX_DX_Score.dfm b/src/UJIDX_DX_Score.dfm new file mode 100644 index 00000000..55a92e11 Binary files /dev/null and b/src/UJIDX_DX_Score.dfm differ diff --git a/src/UJIDX_DX_Score.pas b/src/UJIDX_DX_Score.pas new file mode 100644 index 00000000..bbea6990 --- /dev/null +++ b/src/UJIDX_DX_Score.pas @@ -0,0 +1,104 @@ +unit UJIDX_DX_Score; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, StdCtrls, ExtCtrls, Grids, Aligrid, zLogGlobal, Buttons; + +type + TJIDX_DX_Score = class(TBasicScore) + Grid: TStringAlignGrid; + private + { Private declarations } + public + procedure Renew; override; + procedure Reset; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + procedure CalcPoints(var aQSO : TQSO); virtual; + { Public declarations } + end; + +var + JIDX_DX_Score: TJIDX_DX_Score; + +implementation + +{$R *.DFM} + +procedure TJIDX_DX_Score.Renew; +var i : word; + band : TBand; +begin + Reset; + for i := 1 to Log.TotalQSO do + begin + band := TQSO(Log.List[i]).QSO.band; + inc(QSO[band]); + inc(Points[band],TQSO(Log.List[i]).QSO.Points); + if TQSO(Log.List[i]).QSO.NewMulti1 then + inc(Multi[band]); + end; +end; + +procedure TJIDX_DX_Score.Reset; +var band : TBand; +begin + for band := b19 to HiBand do + begin + QSO[band] := 0; + CWQSO[band] := 0; + Points[band] := 0; + Multi[band] := 0; + end; +end; + +procedure TJIDX_DX_Score.CalcPoints(var aQSO : TQSO); +begin + case aQSO.QSO.Band of + b19 : aQSO.QSO.Points := 4; + b35 : aQSO.QSO.Points := 2; + b7..b21 : aQSO.QSO.Points := 1; + b28 : aQSO.QSO.Points := 2; + else + aQSO.QSO.Points := 0; + end; +end; + +procedure TJIDX_DX_Score.AddNoUpdate(var aQSO : TQSO); +begin + inherited; + if aQSO.QSO.Dupe then + exit; + CalcPoints(aQSO); + inc(Points[aQSO.QSO.Band], aQSO.QSO.Points); +end; + +procedure TJIDX_DX_Score.Update; +var band : TBand; + TotQSO, TotPts, TotMulti : LongInt; + row : integer; +begin + TotQSO := 0; TotPts := 0; TotMulti := 0; + row := 1; + for band := b19 to b28 do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(QSO[band]); + TotQSO := TotQSO + QSO[band]; + Grid.Cells[2,row] := IntToStr(Points[band]); + TotPts := TotPts + Points[band]; + Grid.Cells[3,row] := IntToStr(Multi[band]); + TotMulti := TotMulti + Multi[band]; + inc(row); + end; + end; + Grid.Cells[1, 7] := IntToStr(TotQSO); + Grid.Cells[2, 7] := IntToStr(TotPts); + Grid.Cells[3, 7] := IntToStr(TotMulti); + Grid.Cells[3, 8] := IntToStr(TotPts*TotMulti); +end; + +end. diff --git a/src/UKCJMulti.dfm b/src/UKCJMulti.dfm new file mode 100644 index 00000000..9e4efdff Binary files /dev/null and b/src/UKCJMulti.dfm differ diff --git a/src/UKCJMulti.pas b/src/UKCJMulti.pas new file mode 100644 index 00000000..a6ad1b7a --- /dev/null +++ b/src/UKCJMulti.pas @@ -0,0 +1,260 @@ +unit UKCJMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicMulti, Grids, Aligrid, StdCtrls, ExtCtrls, zLogGlobal{, Grids, StrCGrid}; + +const maxindex = 70; + +const KenNames : array[0..maxindex] of string[15] = +('SY @J','RM G','KK ','AB ԑ','SC m','IS Ύ','NM ', + 'SB u','TC \','KR H','HD ','IR _U','HY OR','OM n', + 'AM X','IT ','AT Hc','YM R`','MG {','FS ','NI V', + 'NN ','TK ','KN _ސ','CB t','ST ','IB ','TG Ȗ', + 'GM Qn','YN R','OH 哇','MY O','HJ ', + 'SO É','GF ','AC m','ME Od','KT s', + 'SI ','NR ޗ','OS ','WK a̎R','HG ','TY xR','FI ', + 'IK ΐ','OY R','SN ','YG R','TT ','HS L','KA ', + 'TS ','EH Q','KC m','FO ','SG ','NS ','KM F{', + 'OT 啪','MZ {','KG ','TM Δn','ON ','OG }', + 'AS AWA','NA kAJ','SA AJ','EU [bp','AF AtJ', + 'OC IZAjA'); + +type + TKCJMulti = class(TBasicMulti) + Grid: TStringAlignGrid; + Panel1: TPanel; + Button1: TButton; + cbStayOnTop: TCheckBox; + combBand: TComboBox; + Button2: TButton; + procedure FormCreate(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure combBandChange(Sender: TObject); + procedure cbStayOnTopClick(Sender: TObject); + procedure Button2Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + MultiArray : array[b19..b50, 0..maxindex] of boolean; + procedure UpdateBand(B : TBand); + procedure Update; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Reset; override; + procedure CheckMulti(aQSO : TQSO); override; + function ValidMulti(aQSO : TQSO) : boolean; override; + end; + + +var + KCJMulti: TKCJMulti; + +implementation + +uses Main, UKCJZone; + +{$R *.DFM} + +function GetCurrentBand : TBand; +begin + Result := b19; + case KCJMulti.combBand.ItemIndex of + 0 : Result := b19; + 1 : Result := b35; + 2 : Result := b7; + 3 : Result := b14; + 4 : Result := b21; + 5 : Result := b28; + 6 : Result := b50; + end; +end; + +function KCJCode(S : string) : integer; +var i : integer; +begin + Result := -1; + if length(S) = 2 then + begin + for i := 0 to maxindex do + if pos(S, KenNames[i]) = 1 then + begin + Result := i; + exit; + end; + end; +end; + +function WorkedColor(Worked : boolean) : TColor; +begin + if Worked then + Result := clRed + else + Result := clBlack; +end; + +procedure TKCJMulti.UpdateBand(B : TBand); +var i : integer; +begin + for i := 0 to maxindex do + begin + case i of + 0..6 : Grid.CellFont[0, i+1].Color := WorkedColor(MultiArray[B,i]); + 7..13 : Grid.CellFont[1, i-6].Color := WorkedColor(MultiArray[B,i]); + 14..19 : Grid.CellFont[2, i-13].Color := WorkedColor(MultiArray[B,i]); + 20..21 : Grid.CellFont[3, i-19].Color := WorkedColor(MultiArray[B,i]); + 22..32 : Grid.CellFont[4, i-21].Color := WorkedColor(MultiArray[B,i]); + 33..36 : Grid.CellFont[5, i-32].Color := WorkedColor(MultiArray[B,i]); + 37..42 : Grid.CellFont[6, i-36].Color := WorkedColor(MultiArray[B,i]); + 43..45 : Grid.CellFont[7, i-42].Color := WorkedColor(MultiArray[B,i]); + 46..50 : Grid.CellFont[8, i-45].Color := WorkedColor(MultiArray[B,i]); + 51..54 : Grid.CellFont[9, i-50].Color := WorkedColor(MultiArray[B,i]); + 55..63 : Grid.CellFont[10, i-54].Color := WorkedColor(MultiArray[B,i]); + 64..70 : Grid.CellFont[11, i-63].Color := WorkedColor(MultiArray[B,i]); + end; + end; + Grid.ClearSelection; +end; + +procedure TKCJMulti.Update; +var B : TBand; +begin + B := Main.CurrentQSO.QSO.Band; + case B of + b19 : combBand.ItemIndex := 0; + b35 : combBand.ItemIndex := 1; + b7 : combBand.ItemIndex := 2; + b14 : combBand.ItemIndex := 3; + b21 : combBand.ItemIndex := 4; + b28 : combBand.ItemIndex := 5; + b50 : combBand.ItemIndex := 6; + else + begin + B := b19; + combBand.ItemIndex := 0; + end; + end; + UpdateBand(B); + if KCJZone.Visible then + KCJZone.Update; +end; + +procedure TKCJMulti.AddNoUpdate(var aQSO : TQSO); +var str : string; + K : integer; + B : TBand; + i : integer; +begin + aQSO.QSO.NewMulti1 := False; + str := aQSO.QSO.NrRcvd; + //Delete(str,length(str),1); + aQSO.QSO.Multi1 := str; + + if aQSO.QSO.Dupe then + exit; + + if not(NotWARC(aQSO.QSO.Band)) then + exit; + + K := KCJCode(str); + if K = -1 then + exit; + + if MultiArray[aQSO.QSO.band, K] = False then + begin + MultiArray[aQSO.QSO.band, K] := True; + aQSO.QSO.NewMulti1 := True; + end; +end; + +function TKCJMulti.ValidMulti(aQSO : TQSO) : boolean; +var str : string; +begin + str := aQSO.QSO.NrRcvd; + Result := (KCJCode(str) >= 0) +end; + + +procedure TKCJMulti.Reset; +var i : integer; + B : TBand; +begin + for i := 0 to maxindex do + for B := b19 to b50 do + MultiArray[B, i] := false; +end; + +procedure TKCJMulti.CheckMulti(aQSO : TQSO); +var str : string; + M : integer; + B : TBand; +begin + str := aQSO.QSO.NrRcvd; + + if str = '' then + exit; + + M := KCJCode(str); + + if M = -1 then + begin + MainForm.WriteStatusLine('Invalid number', false); + exit; + end; + + str := KenNames[M]; + if MultiArray[aQSO.QSO.band,M] = True then + str := str + ' Worked on this band. Worked on : ' + else + str := str + ' Needed on this band. Worked on : '; + + for B := b19 to b50 do + if MultiArray[B, M] then + str := str + MHzString[B]+' ' + else + str := str + ''; + MainForm.WriteStatusLine(str, false); + +end; + + +procedure TKCJMulti.FormCreate(Sender: TObject); +var x, i, j, k : word; +begin + inherited; + Reset; + combBand.ItemIndex := 0; + //Update; +end; + + + + +procedure TKCJMulti.Button1Click(Sender: TObject); +begin + //inherited; + Close; +end; + +procedure TKCJMulti.combBandChange(Sender: TObject); +begin + UpdateBand(GetCurrentBand); +end; + +procedure TKCJMulti.cbStayOnTopClick(Sender: TObject); +begin + if cbStayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + + +procedure TKCJMulti.Button2Click(Sender: TObject); +begin + KCJZone.Show; +end; + +end. diff --git a/src/UKCJScore.dfm b/src/UKCJScore.dfm new file mode 100644 index 00000000..51fdd01a Binary files /dev/null and b/src/UKCJScore.dfm differ diff --git a/src/UKCJScore.pas b/src/UKCJScore.pas new file mode 100644 index 00000000..1d5b893b --- /dev/null +++ b/src/UKCJScore.pas @@ -0,0 +1,70 @@ +unit UKCJScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, Aligrid, StdCtrls, ExtCtrls, zLogGlobal, Buttons; + +type + TKCJScore = class(TBasicScore) + Grid: TStringAlignGrid; + private + { Private declarations } + public + { Public declarations } + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + end; + +var + KCJScore: TKCJScore; + +implementation + +{$R *.DFM} + +procedure TKCJScore.AddNoUpdate(var aQSO : TQSO); +var band : TBand; +begin + inherited; + + if aQSO.QSO.Dupe then + exit; + + band := aQSO.QSO.band; + //aQSO.QSO.points := 1; + + if pos(aQSO.QSO.NrRcvd+'$', 'AS$NA$SA$EU$AF$OC$') > 0 then + aQSO.QSO.Points := 5 + else + aQSO.QSO.Points := 1; + + inc(Points[band], aQSO.QSO.Points); +end; + +procedure TKCJScore.Update; +var band : TBand; + TotPoints, TotMulti : LongInt; + row : integer; +begin + TotPoints := 0; TotMulti := 0; + row := 1; + for band := b19 to b50 do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(Points[band]); + TotPoints := TotPoints + Points[band]; + Grid.Cells[2,row] := IntToStr(Multi[band]); + TotMulti := TotMulti + Multi[band]; + inc(row); + end; + end; + Grid.Cells[1, 8] := IntToStr(TotPoints); + Grid.Cells[2, 8] := IntToStr(TotMulti); + Grid.Cells[2, 9] := IntToStr(TotPoints*TotMulti); +end; + + +end. diff --git a/src/UKCJZone.dfm b/src/UKCJZone.dfm new file mode 100644 index 00000000..5f7189f9 Binary files /dev/null and b/src/UKCJZone.dfm differ diff --git a/src/UKCJZone.pas b/src/UKCJZone.pas new file mode 100644 index 00000000..daca0aef --- /dev/null +++ b/src/UKCJZone.pas @@ -0,0 +1,115 @@ +unit UKCJZone; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + Grids, Aligrid, StdCtrls, ExtCtrls, zLogGlobal; + +type + TKCJZone = class(TForm) + Panel1: TPanel; + Button1: TButton; + Grid1: TStringAlignGrid; + Grid2: TStringAlignGrid; + Grid3: TStringAlignGrid; + cbStayOnTop: TCheckBox; + procedure CreateParams(var Params: TCreateParams); override; + procedure cbStayOnTopClick(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure Update; + end; + +var + KCJZone: TKCJZone; + +implementation + +uses UKCJMulti; + +{$R *.DFM} + +function BandCol(B : TBand) : integer; +begin + case B of + b19 : Result := 1; + b35 : Result := 2; + b7 : Result := 3; + b14 : Result := 4; + b21 : Result := 5; + b28 : Result := 6; + b50 : Result := 7; + else + Result := 1; + end; +end; + +procedure TKCJZone.Update; +var i : integer; + B : TBand; +begin + for i := 0 to 23 do + begin + for B := b19 to b50 do + if NotWARC(B) then + begin + if KCJMulti.MultiArray[B, i] then + Grid1.Cells[BandCol(B),i+1] := '*' + else + Grid1.Cells[BandCol(B),i+1] := '.'; + end; + end; + for i := 24 to 47 do + begin + for B := b19 to b50 do + if NotWARC(B) then + begin + if KCJMulti.MultiArray[B, i] then + Grid2.Cells[BandCol(B),i-23] := '*' + else + Grid2.Cells[BandCol(B),i-23] := '.'; + end; + end; + for i := 48 to maxindex do + begin + for B := b19 to b50 do + if NotWARC(B) then + begin + if KCJMulti.MultiArray[B, i] then + Grid3.Cells[BandCol(B),i-47] := '*' + else + Grid3.Cells[BandCol(B),i-47] := '.'; + end; + end; +end; + +procedure TKCJZone.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TKCJZone.cbStayOnTopClick(Sender: TObject); +begin + if cbStayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +procedure TKCJZone.Button1Click(Sender: TObject); +begin + Close; +end; + +procedure TKCJZone.FormShow(Sender: TObject); +begin + Update; +end; + +end. diff --git a/src/UMMTTY.pas b/src/UMMTTY.pas new file mode 100644 index 00000000..43aab5aa --- /dev/null +++ b/src/UMMTTY.pas @@ -0,0 +1,145 @@ +unit UMMTTY; + +interface + +uses Windows, ShellAPI, SysUtils; + +var MSG_MMTTY : UINT = 0; + MMTTY_ThreadId : UINT; + MMTTY_Handle : UINT; + MyHandle : UINT; + +const + MMTTYRunning : boolean = False; + MMTTYInitialized : boolean = False; + MMTTYBuffer : string = ''; + +const RXM_HANDLE=0; + RXM_REQHANDLE=1; + RXM_EXIT=2; + RXM_PTT=3; + RXM_CHAR=4; + RXM_WINPOS=5; + RXM_WIDTH=6; + RXM_REQPARA=7; + RXM_SETBAUD=8; + RXM_SETMARK=9; + RXM_SETSPACE=10; + RXM_SETSWITCH=11; + RXM_SETHAM=12; + RXM_SHOWSETUP=13; + RXM_SETVIEW=14; + RXM_SETSQLVL=15; + RXM_SHOW=16; + RXM_SETFIG=17; + RXM_SETRESO=18; + RXM_SETLPF=19; + RXM_SETTXDELAY=20; + RXM_UPDATECOM=21; + RXM_SUSPEND=22; + +const + TXM_HANDLE=$8000; + TXM_REQHANDLE=$8001; + TXM_START=$8002; + TXM_CHAR=$8003; + TXM_PTTEVENT=$8004; + TXM_WIDTH=$8005; + TXM_BAUD=$8006; + TXM_MARK=$8007; + TXM_SPACE=$8008; + TXM_SWITCH=$8009; + TXM_VIEW=$800A; + TXM_LEVEL=$800B; + TXM_RESO=$800C; + TXM_THREAD=$800D; + +const MMTTY_TX : boolean = false; + +procedure InitializeMMTTY(_Handle : THandle); +procedure ExitMMTTY; +procedure mm_TX; +procedure mm_RX; +procedure mm_RX_after_tx; +procedure mm_SendStr(S : string; RX : boolean); +procedure ProcessMMTTYMessage(Msg : TMsg; var Handled : boolean); + +implementation + + +procedure InitializeMMTTY(_Handle : THandle); +var H : THandle; + zFileName, zParams, zDir: array[0..79] of Char; +begin + if MMTTYRunning then + exit; + H := ShellExecute(_Handle, nil, + StrPCopy(zFileName, 'MMTTY'), StrPCopy(zParams, '-r'), + StrPCopy(zDir, ''), SW_SHOW); + MyHandle := _Handle; + MSG_MMTTY := RegisterWindowMessage('MMTTY'); + MMTTYInitialized := True; +end; + +procedure ExitMMTTY; +begin + PostMessage(MMTTY_Handle, MSG_MMTTY, RXM_EXIT, 0); + MMTTYRunning := False; + MMTTYInitialized := False; +end; + +procedure mm_TX; +begin + PostMessage(MMTTY_Handle, MSG_MMTTY, RXM_PTT, 2); +end; + +procedure mm_RX; +begin + PostMessage(MMTTY_Handle, MSG_MMTTY, RXM_PTT, 0); +end; + +procedure mm_RX_after_tx; +begin + PostMessage(MMTTY_Handle, MSG_MMTTY, RXM_PTT, 1); +end; + +procedure mm_SendStr(S : string; RX : boolean); +var i : integer; +begin + mm_TX; + for i := 1 to length(S) do + begin + PostMessage(MMTTY_Handle, MSG_MMTTY, RXM_CHAR, ord(S[i])); + end; + if RX then + mm_RX_after_TX; +end; + +procedure ProcessMMTTYMessage(Msg : TMsg; var Handled : boolean); + +begin + if Msg.message <> MSG_MMTTY then + exit; + case Msg.wParam of + TXM_THREAD : MMTTY_ThreadID := Msg.lParam; + TXM_HANDLE : MMTTY_Handle := Msg.lParam; + TXM_START : + begin + PostMessage(MMTTY_Handle, MSG_MMTTY, RXM_HANDLE, MyHandle); + MMTTYRunning := True; + end; + TXM_CHAR : + begin + MMTTYBuffer := MMTTYBuffer + Chr(Msg.lParam); + end; + TXM_PTTEVENT : + begin + case Msg.lParam of + 0 : MMTTY_TX := False; + 1 : MMTTY_TX := True; + end; + end; + end; +end; + +end. diff --git a/src/UMenu.dfm b/src/UMenu.dfm new file mode 100644 index 00000000..4bd0fc4d Binary files /dev/null and b/src/UMenu.dfm differ diff --git a/src/UMenu.pas b/src/UMenu.pas new file mode 100644 index 00000000..451b1302 --- /dev/null +++ b/src/UMenu.pas @@ -0,0 +1,972 @@ +unit UMenu; + +interface + +uses + SysUtils, Windows, Messages, Classes, Graphics, Controls, + StdCtrls, ExtCtrls, Forms, BGK32Lib, UzLogCW, zLogGlobal, Dialogs, + FngSingleInst, Buttons, UMMTTY, UzLogVoice; + + +const SaveInBackGround : boolean = False; + +type + TMenuForm = class(TForm) + OKButton: TButton; + CancelButton: TButton; + Button3: TButton; + ContestGroup: TGroupBox; + OpGroup: TRadioGroup; + BandGroup: TRadioGroup; + rbALLJA: TRadioButton; + rb6D: TRadioButton; + rbFD: TRadioButton; + rbACAG: TRadioButton; + ModeGroup: TRadioGroup; + CallsignEdit: TEdit; + Label1: TLabel; + OpenDialog: TOpenDialog; + rbCQWW: TRadioButton; + rbJIDXJA: TRadioButton; + rbCQWPX: TRadioButton; + rbPedi: TRadioButton; + rbJIDXDX: TRadioButton; + rbGeneral: TRadioButton; + CFGOpenDialog: TOpenDialog; + SelectButton: TSpeedButton; + CheckBox1: TCheckBox; + rbARRLDX: TRadioButton; + rbARRLW: TRadioButton; + rbAPSprint: TRadioButton; + rbJA0in: TRadioButton; + rbJA0out: TRadioButton; + TXNrEdit: TEdit; + Label2: TLabel; + ScoreCoeffEdit: TEdit; + Label3: TLabel; + rbIARU: TRadioButton; + rbAllAsian: TRadioButton; + rbIOTA: TRadioButton; + rbARRL10: TRadioButton; + rbKCJ: TRadioButton; + rbWAE: TRadioButton; + {procedure CreateParams(var Params: TCreateParams); override;} + procedure OKButtonClick(Sender: TObject); + procedure CancelButtonClick(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure MyIdleEvent(Sender: TObject; var Done: Boolean); + procedure MyMessageEvent(var Msg: TMsg; var Handled: Boolean); + procedure rbCQWWClick(Sender: TObject); + procedure rbGeneralEnter(Sender: TObject); + procedure rbGeneralExit(Sender: TObject); + procedure SelectButtonClick(Sender: TObject); + procedure CheckBox1Click(Sender: TObject); + procedure rbALLJAClick(Sender: TObject); + procedure rbPediClick(Sender: TObject); + procedure rbACAGClick(Sender: TObject); + procedure rb6DClick(Sender: TObject); + procedure rbFDClick(Sender: TObject); + procedure rbJA0inClick(Sender: TObject); + procedure rbARRLWClick(Sender: TObject); + procedure rbAPSprintClick(Sender: TObject); + procedure OpGroupClick(Sender: TObject); + procedure TXNrEditKeyPress(Sender: TObject; var Key: Char); + procedure UserDefClick(Sender: TObject); + procedure rbIARUClick(Sender: TObject); + procedure rbIOTAClick(Sender: TObject); + procedure rbARRL10Click(Sender: TObject); + procedure rbARRL10Exit(Sender: TObject); + procedure FnugrySingleInstance1AlreadyRunning(Sender: TObject; + hPrevInst, hPrevWnd: Integer); + procedure FormKeyPress(Sender: TObject; var Key: Char); + procedure rbKCJClick(Sender: TObject); + procedure rbWAEClick(Sender: TObject); + public + BandTemp : integer; // temporary storage for bandgroup.itemindex + TabPressed : boolean; + TabPressed2 : boolean; // for moving focus to numberedit + CFGFileName : string; + procedure EnableEveryThing; + end; + +var + MenuForm: TMenuForm; + LastTabPress : TDateTime; + +implementation + +uses Main, UOptions, UACAGMulti, UALLJAMulti, UALLJAScore1, UACAGScore, + UALLJAEditDialog, UALLJAScore, UWWMulti, UWWScore, UWWZone, UJIDXScore, + UJIDXMulti, UJIDXScore2, UWPXMulti, UWPXScore, UZLinkForm, UPediScore, + UJIDX_DX_Multi, UJIDX_DX_Score, UGeneralMulti2, UGeneralScore, UFDMulti, + UARRLDXMulti, UARRLDXScore, UARRLWMulti, UAPSprintScore, UJA0Multi, + UJA0Score, USixDownMulti, USixDownScore, UIARUMulti, UIARUScore, + UAllAsianScore, UAgeDialog, UIOTAMulti, UUTCDialog, UARRL10Score, UARRL10Multi, + USummaryInfo, UKCJMulti, UKCJScore, UKCJZone, UMultipliers, UTTYConsole, + UWAEScore, UWAEMulti, UELogJapanese; + +{$R *.DFM} + +{procedure TMenuForm.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.Caption := PChar('zLog'); +end; } + +procedure TMenuForm.OKButtonClick(Sender: TObject); +var i : integer; + E : Extended; +begin + Main.CurrentQSO.QSO.Serial := 1; + MainForm.mPXListWPX.Visible := False; + + Options.SetMultiOp(OpGroup.ItemIndex); + + case BandGroup.ItemIndex of + 0..3 : Options.SetBand(BandGroup.ItemIndex); + 4 : Options.SetBand(BandGroup.ItemIndex+1); + 5 : Options.SetBand(BandGroup.ItemIndex+2); + 6..13 : Options.SetBand(BandGroup.ItemIndex+3); + end; + + // Options.SetBand(BandGroup.ItemIndex); + + Options.SetMode(ModeGroup.ItemIndex); + + Options.SetMyCall(CallsignEdit.Text); + + for i := 0 to ContestGroup.ControlCount - 1 do + begin + if ContestGroup.Controls[i] is TRadioButton then + if TRadioButton(ContestGroup.Controls[i]).Checked then + break; + end; + + Options.SetCurrentContestNo(i); + + try + i := StrToInt(TXNrEdit.Text); + except + on EConvertError do + i := 0; + end; + + if OpGroup.ItemIndex > 0 then + begin + Options.SetTXNr(i); + if Options.Settings._pcname = '' then + Options.Settings._pcname := 'PC'+IntToStr(i); + end; + + if ScoreCoeffEdit.Enabled then + begin + try + E := StrToFloat(ScoreCoeffEdit.Text); + except + on EConvertError do + E := 1; + end; + Options.SetScoreCoeff(E); + end + else + Options.SetScoreCoeff(0); + + Options.SaveCurrentSettings; + +{Open New Contest from main menu} + if MyContest <> nil then + MyContest.Free; + if Log <> nil then + begin + Log.Destroy; + Log := TQSOList.Create('default'); + end; + if MainForm.EditScreen <> nil then + MainForm.EditScreen.Free; + + if rbKCJ.Checked then + begin + Application.CreateForm(TKCJMulti, KCJMulti); + //Application.CreateForm(TACAGScore, ACAGScore); + Application.CreateForm(TKCJScore, KCJScore); + Application.CreateForm(TKCJZone, KCJZone); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TKCJContest.Create('KCJ ReXg'); + QTHString := Options.Settings._prov; + //TQSO(Log.List[0]).QSO.memo := 'ALL JA ReXg'; + Options.Settings._sentstr := 'TK'; + end; + + if rbALLJA.Checked then + begin + Application.CreateForm(TALLJAMulti, ALLJAMulti); + Application.CreateForm(TALLJAScore, ALLJAScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TALLJAContest.Create('ALL JA ReXg'); + QTHString := Options.Settings._prov; + //TQSO(Log.List[0]).QSO.memo := 'ALL JA ReXg'; + Options.Settings._sentstr := '$V$P'; + end; + if rbACAG.Checked then + begin + Application.CreateForm(TACAGMulti, ACAGMulti); + Application.CreateForm(TACAGScore, ACAGScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TACAGContest.Create('SsSSReXg'); + QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'ACAG Contest'; + Options.Settings._sentstr := '$Q$P'; + end; + if rbFD.Checked then + begin + Application.CreateForm(TACAGMulti, ACAGMulti); + Application.CreateForm(TFDMulti, FDMulti); + Application.CreateForm(TACAGScore, ACAGScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TFDContest.Create('tB[hf[ReXg'); + QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'ACAG Contest'; + Options.Settings._sentstr := '$Q$P'; + end; + if rb6D.Checked then + begin + Application.CreateForm(TACAGMulti, ACAGMulti); + Application.CreateForm(TFDMulti, FDMulti); + Application.CreateForm(TSixDownMulti, SixDownMulti); + Application.CreateForm(TSixDownScore, SixDownScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TSixDownContest.Create('6m and DOWNReXg'); + QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'ACAG Contest'; + Options.Settings._sentstr := '$Q$P'; + end; + if rbGeneral.Checked then + begin + Application.CreateForm(TACAGMulti, ACAGMulti); + Application.CreateForm(TGeneralMulti2, GeneralMulti2); + Application.CreateForm(TGeneralScore, GeneralScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'ACAG Contest'; + Options.Settings._sentstr := '$Q'; + MyContest := TGeneralContest.Create(rbGeneral.Caption); + end; + if rbCQWW.Checked then + begin + Application.CreateForm(TWWScore, WWScore); + Application.CreateForm(TWWZone, WWZone); + Application.CreateForm(TWWMulti, WWMulti); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TCQWWContest.Create('CQWW DX Contest'); + //QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'CQWW Contest'; + Options.Settings._sentstr := '$Z'; + QTHString := {WWMulti.}UMultipliers.MyZone; + end; + if rbIARU.Checked then + begin + Application.CreateForm(TIARUScore, IARUScore); + Application.CreateForm(TWWZone, WWZone); + Application.CreateForm(TWWMulti, WWMulti); + Application.CreateForm(TIARUMulti, IARUMulti); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TIARUContest.Create('IARU HF World Championship'); + //QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'CQWW Contest'; + Options.Settings._sentstr := '$I'; + QTHString := {IARUMulti.}MyZone; + end; + + if rbJIDXJA.Checked then // now determines JA/DX from callsign + begin + Application.CreateForm(TWWZone, WWZone); + Application.CreateForm(TWWMulti, WWMulti); + if {WWMulti.}MyCountry = 'JA' then + begin + Application.CreateForm(TJIDXMulti, JIDXMulti); + Application.CreateForm(TJIDXScore2, JIDXScore2); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TJIDXContest.Create('JIDX Contest (JA)'); + QTHString := Options.Settings._prov; + Options.Settings._sentstr := '$V'; + end + else + begin + WWMulti.Release; + WWZone.Release; + Application.ProcessMessages; + Application.CreateForm(TJIDX_DX_Multi, JIDX_DX_Multi); + Application.CreateForm(TJIDX_DX_Score, JIDX_DX_Score); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TJIDXContestDX.Create('JIDX Contest (DX)'); + QTHString := Options.Settings._prov; + Options.Settings._sentstr := '$V'; + end; + end; + +{ + if rbJIDXJA.Checked then + begin + Application.CreateForm(TWWZone, WWZone); + Application.CreateForm(TWWMulti, WWMulti); + Application.CreateForm(TJIDXMulti, JIDXMulti); + Application.CreateForm(TJIDXScore2, JIDXScore2); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TJIDXContest.Create('JIDX Contest (JA)'); + QTHString := Options.Settings._prov; + Options.Settings._sentstr := '$V'; + end; + if rbJIDXDX.Checked then + begin + Application.CreateForm(TJIDX_DX_Multi, JIDX_DX_Multi); + Application.CreateForm(TJIDX_DX_Score, JIDX_DX_Score); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TJIDXContestDX.Create('JIDX Contest (DX)'); + QTHString := Options.Settings._prov; + Options.Settings._sentstr := '$V'; + end; +} + if rbARRLDX.Checked then + begin + {Application.CreateForm(TWWScore, WWScore);} + Application.CreateForm(TACAGMulti, ACAGMulti); + Application.CreateForm(TARRLDXMulti, ARRLDXMulti); + //Application.CreateForm(TJIDX_DX_Score, JIDX_DX_Score); + Application.CreateForm(TARRLDXScore, ARRLDXScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TARRLDXContestDX.Create('ARRL International DX Contest (DX)'); + QTHString := Options.Settings._prov; + //TQSO(Log.List[0]).QSO.memo := 'JIDX Contest'; + Options.Settings._sentstr := '$N'; + end; + if rbARRLW.Checked then + begin + {Application.CreateForm(TWWScore, WWScore);} + Application.CreateForm(TWWZone, WWZone); + Application.CreateForm(TWWMulti, WWMulti); + Application.CreateForm(TARRLWMulti, ARRLWMulti); + //Application.CreateForm(TJIDX_DX_Score, JIDX_DX_Score); + Application.CreateForm(TARRLDXScore, ARRLDXScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TARRLDXContestW.Create('ARRL International DX Contest (W/VE)'); + QTHString := Options.Settings._prov; + //TQSO(Log.List[0]).QSO.memo := 'JIDX Contest'; + Options.Settings._sentstr := '$V'; + end; + + if rbWAE.Checked then + begin + {Application.CreateForm(TWWScore, WWScore);} + Application.CreateForm(TWWZone, WWZone); + Application.CreateForm(TWWMulti, WWMulti); + Application.CreateForm(TARRLWMulti, ARRLWMulti); + Application.CreateForm(TWAEMulti, WAEMulti); + //Application.CreateForm(TJIDX_DX_Score, JIDX_DX_Score); + Application.CreateForm(TWAEScore, WAEScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TWAEContest.Create('WAEDC Contest'); + //QTHString := Options.Settings._prov; + //TQSO(Log.List[0]).QSO.memo := 'JIDX Contest'; + Options.Settings._sentstr := '$S'; + end; + + if rbCQWPX.Checked then + begin + {Application.CreateForm(TWWScore, WWScore);} + Application.CreateForm(TWWZone, WWZone); + Application.CreateForm(TWWMulti, WWMulti); + Application.CreateForm(TWPXMulti, WPXMulti); + Application.CreateForm(TWPXScore, WPXScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TCQWPXContest.Create('CQ WPX Contest'); + if OpGroup.ItemIndex = 1 then + SerialContestType := SER_BAND; + if OpGroup.ItemIndex = 2 then + SerialContestType := SER_MS; + QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'WPX Contest'; + Options.Settings._sentstr := '$S'; + MainForm.mPXListWPX.Visible := True; + end; + + if rbAPSprint.Checked then + begin + {Application.CreateForm(TWWScore, WWScore);} + Application.CreateForm(TWWZone, WWZone); + Application.CreateForm(TWWMulti, WWMulti); + Application.CreateForm(TWPXMulti, WPXMulti); + Application.CreateForm(TWPXScore, WPXScore); + Application.CreateForm(TAPSprintScore, APSprintScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TAPSprint.Create('Asia Pacific Sprint'); + QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'WPX Contest'; + Options.Settings._sentstr := '$S'; + end; + + if rbJA0in.Checked then + begin + {Application.CreateForm(TWWScore, WWScore);} + Application.CreateForm(TJA0Multi, JA0Multi); + Application.CreateForm(TJA0Score, JA0Score); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TJA0ContestZero.Create('ALL JA0 ReXg (JA0)'); + case BandGroup.ItemIndex of + 2 : MyContest.SetBand(b35); + 3 : MyContest.SetBand(b7); + 5, 6 : begin + MyContest.SetBand(b21); + Options.Settings._band := 0; + end; + end; + QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'WPX Contest'; + Options.Settings._sentstr := '$S'; + end; + + if rbJA0out.Checked then + begin + {Application.CreateForm(TWWScore, WWScore);} + Application.CreateForm(TJA0Multi, JA0Multi); + Application.CreateForm(TJA0Score, JA0Score); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TJA0Contest.Create('ALL JA0 ReXg (Others)'); + case BandGroup.ItemIndex of + 2 : MyContest.SetBand(b35); + 3 : MyContest.SetBand(b7); + 5, 6 : begin + MyContest.SetBand(b21); + Options.Settings._band := 0; + end; + end; + QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'WPX Contest'; + Options.Settings._sentstr := '$S'; + end; + + if rbAllAsian.Checked then + begin + {Application.CreateForm(TWWScore, WWScore);} + Application.CreateForm(TWWZone, WWZone); + Application.CreateForm(TWWMulti, WWMulti); + Application.CreateForm(TARRLWMulti, ARRLWMulti); + //Application.CreateForm(TJIDX_DX_Score, JIDX_DX_Score); + Application.CreateForm(TIARUScore, IARUScore); + Application.CreateForm(TAllAsianScore, AllAsianScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + MyContest := TAllAsianContest.Create('All Asian DX Contest (Asia)'); + QTHString := Options.Settings._prov; + //TQSO(Log.List[0]).QSO.memo := 'JIDX Contest'; + Options.Settings._sentstr := '$A'; + + Application.CreateForm(TAgeDialog, AgeDialog); + AgeDialog.ShowModal; + AgeDialog.Free; + + end; + + if rbPedi.Checked then + begin + Application.CreateForm(TALLJAMulti, ALLJAMulti); + Application.CreateForm(TPediScore, PediScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + + Application.CreateForm(TUTCDialog, UTCDialog); + UTCDialog.ShowModal; + UTCDialog.Free; + + MyContest := TPedi.Create('Pedition mode'); + + QTHString := Options.Settings._prov; + //TQSO(Log.List[0]).QSO.memo := 'Pedition mode'; + Options.Settings._sentstr := ''; + end; + + if rbIOTA.Checked then + begin + Application.CreateForm(TACAGMulti, ACAGMulti); + Application.CreateForm(TIOTAMulti, IOTAMulti); + Application.CreateForm(TIARUScore, IARUScore); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + + MyContest := TIOTAContest.Create('IOTA Contest'); + //QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'ACAG Contest'; + Options.Settings._sentstr := '$S$Q'; + end; + + if rbARRL10.Checked then + begin + Application.CreateForm(TWWZone, WWZone); + Application.CreateForm(TWWMulti, WWMulti); + Application.CreateForm(TARRL10Multi, ARRL10Multi); + Application.CreateForm(TARRL10Score, ARRL10Score); + Application.CreateForm(TALLJAEditDialog, ALLJAEditDialog); + + Options.Settings._sentstr := '$S'; + MyContest := TARRL10Contest.Create('ARRL 10m Contest'); + //QTHString := Options.Settings._city; + //TQSO(Log.List[0]).QSO.memo := 'ACAG Contest'; + end; + + + if ModeGroup.ItemIndex = 1 then + begin + Main.CurrentQSO.QSO.mode := mCW; + Main.CurrentQSO.QSO.RSTRcvd := 599; + Main.CurrentQSO.QSO.RSTSent := 599; + end + else + begin + Main.CurrentQSO.QSO.mode := mSSB; + Main.CurrentQSO.QSO.RSTRcvd := 59; + Main.CurrentQSO.QSO.RSTSent := 59; + end; + + if CurrentFileName = '' then + begin + OpenDialog.InitialDir := Options.Settings._logspath; + if OpenDialog.Execute then + begin + CurrentFileName := OpenDialog.FileName; + if FileExists(CurrentFileName) then + begin + MainForm.LoadNewContestFromFile(CurrentFileName); + {MyContest.Renew; + MainForm.EditScreen.Renew; } + end; + end + else // user hit cancel + begin + MessageDlg('Data will NOT be saved until you enter the file name', mtWarning, + [mbOK], 0); {HELP context 0} + end; + end + else + begin + end; + + {Options.Settings.CW.CWStrBank[1, 2] := Options.Settings._sentstr; } + + MyContest.Renew; + + if ModeGroup.ItemIndex = 0 then + MyContest.ScoreForm.CWButton.Visible := True + else + MyContest.ScoreForm.CWButton.Visible := False; + + // MainForm.EditScreen.Renew; called from TContest.Renew; + + if TQSO(Log.List[0]).QSO.RSTSent = 0 then //JST = 0; UTC = $FFFF + SummaryInfo.DecJapanese + else + SummaryInfo.DecEnglish; + + MainForm.Show; + + Hide; + ELogJapanese.InitializeFields; + MainForm.CallsignEdit.SetFocus; + + +end; + +procedure TMenuForm.CancelButtonClick(Sender: TObject); +begin + CloseBGK; + Close; +end; + +procedure TMenuForm.FormDestroy(Sender: TObject); +begin + CloseBGK; +end; + +procedure TMenuForm.FormCreate(Sender: TObject); +var s : string; + i : integer; +begin + if HiWord(GetKeyState(VK_SPACE)) <> 0 then + begin + zLogGlobal.DEBUGMODE := TRUE; + BGK32LIB.DEBUGMODE := TRUE; + end; + LastTabPress := Now; + ShowWindow(MenuForm.Handle, SW_HIDE); + s := ''; + for i := 0 to ParamCount do + s := s +' '+ ParamStr(i); + Application.OnIdle := MyIdleEvent; + Application.OnMessage := MyMessageEvent; +{ if pos('/NOBGK', UpperCase(s)) = 0 then + InitializeBGK; } + TabPressed := False; + TabPressed2 := False; + CFGFileName := ''; + MAINPATH := ExtractFilePath(Application.EXEName); +end; + +procedure TMenuForm.FormShow(Sender: TObject); +var i : integer; +begin + if Options.Band = 0 then + BandGroup.ItemIndex := 0 + else + BandGroup.ItemIndex := OldBandOrd(TBand(Options.Band - 1)) + 1; + ModeGroup.ItemIndex := Options.Mode; + + if Options.MultiOp > 0 then + begin + OpGroup.ItemIndex := Options.MultiOp; + TXNrEdit.Enabled := True; + end + else + begin + OpGroup.ItemIndex := 0; + TXNrEdit.Enabled := False; + end; + + TXNrEdit.Text := IntToStr(Options.GetTXNr); + + CallsignEdit.Text := Options.MyCall; + + EnableEverything; + if Options.ContestMenuNo < ContestGroup.ControlCount then + if ContestGroup.Controls[Options.ContestMenuNo] is TRadioButton then + TRadioButton(ContestGroup.Controls[Options.ContestMenuNo]).Checked := True; + + if rbGeneral.Checked then + SelectButton.Enabled := True; + + OpGroup.OnClick(Self); // enables or disables TXNrEdit + + +end; + +procedure TMenuForm.MyIdleEvent(Sender: TObject; var Done: Boolean); +var A : word; + boo : boolean; + +begin + //PaddleProcess; + { + if Options.Speed <> BGK32LIB.GetWPM then + begin + Options.Setting.CW._speed := BGK32LIB.GetWPM; + SpeedBar.Position := Options.Settings.CW._speed; + SpeedLabel.Caption := IntToStr(SpeedBar.Position)+' wpm'; + end; + } + + boo := BGK32LIB.IsPlaying; + if boo then + begin + if Main.CurrentQSO.QSO.Mode = mCW then + begin + MainForm.CWPauseButton.Enabled := true; + MainForm.CWPauseButton.Visible := true; + MainForm.CWPlayButton.Visible := false; + MainForm.CWStopButton.Enabled := true; + end + else + begin + end; + end + else + begin + //if Paused = False then + if Main.CurrentQSO.QSO.Mode = mCW then + TabPressed := False; + if SaveInBackGround = True then + begin + MainForm.SaveFileAndBackUp; + SaveInBackGround := False; + end; + MainForm.CWPauseButton.Enabled := false; + if not(BGK32LIB.Paused) then + MainForm.CWStopButton.Enabled := false + else + MainForm.CWStopButton.Enabled := true; + end; + + if Main.CurrentQSO.QSO.Mode = mRTTY then + if TTYConsole <> nil then + if TTYConsole.Sending = false then + begin + TabPressed := False; + end; + + if HiWord(GetKeyState(VK_TAB))<>0 then + begin + if not(TabPressed) and (MainForm.CallsignEdit.Focused or MainForm.NumberEdit.Focused) then + begin + if Trunc((Now-LastTabPress)*24*60*60*1000) > 100 then + MainForm.OnTabPress; + LastTabPress := Now; + end; + end; + + //ZLinkForm.ProcessCommand; + + //MainForm.MonitorPort; + //MainForm.Caption := BGK32LIB.GetPRTPort; + + Done := True; + +end; + +procedure TMenuForm.MyMessageEvent(var Msg: TMsg; var Handled: Boolean); +begin + if MMTTYInitialized then + UMMTTY.ProcessMMTTYMessage(Msg, Handled); +end; + +procedure TMenuForm.rbCQWWClick(Sender: TObject); +begin + if ModeGroup.ItemIndex in [0, 3] then + ModeGroup.ItemIndex := 1; +end; + + + +procedure TMenuForm.rbGeneralEnter(Sender: TObject); +begin +// SelectButton.Enabled := True; +end; + +procedure TMenuForm.rbGeneralExit(Sender: TObject); +begin + OKButton.Enabled := True; +// SelectButton.Enabled := False; +end; + +procedure TMenuForm.SelectButtonClick(Sender: TObject); +begin + CFGOpenDialog.InitialDir := Options.Settings._cfgdatpath; + if CFGOpenDialog.Execute then + begin + CFGFileName := CFGOpenDialog.FileName; + rbGeneral.Caption := GetContestName(CFGFileName); + if UsesCoeff(CFGFileName) then + ScoreCoeffEdit.Enabled := True + else + ScoreCoeffEdit.Enabled := False; + OKButton.Enabled := True; + end; +end; + +procedure TMenuForm.CheckBox1Click(Sender: TObject); +begin + PostContest := CheckBox1.Checked; +end; + +procedure TMenuForm.EnableEveryThing; +var i : integer; +begin + for i := 0 to BandGroup.Items.Count-1 do + BandGroup.Controls[i].Enabled := True; + for i := 0 to OpGroup.Items.Count-1 do + OpGroup.Controls[i].Enabled := True; + for i := 0 to ModeGroup.Items.Count-1 do + ModeGroup.Controls[i].Enabled := True; + TXNrEdit.Enabled := True; + OpGroup.OnClick(Self); + SelectButton.Enabled := False; + ScoreCoeffEdit.Enabled := False; + OKButton.Enabled := True; +end; + +procedure TMenuForm.rbALLJAClick(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + BandGroup.Controls[1].Enabled := False; + for i := 8 to 13 do + BandGroup.Controls[i].Enabled := False; + //ModeGroup.Controls[2].Enabled := False; + ModeGroup.Controls[3].Enabled := False; +end; + +procedure TMenuForm.rbPediClick(Sender: TObject); +begin + EnableEveryThing; +end; + +procedure TMenuForm.rbACAGClick(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + BandGroup.Controls[1].Enabled := False; + //ModeGroup.Controls[2].Enabled := False; + ModeGroup.Controls[3].Enabled := False; +end; + +procedure TMenuForm.rb6DClick(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + for i := 1 to 6 do + BandGroup.Controls[i].Enabled := False; + //ModeGroup.Controls[2].Enabled := False; + ModeGroup.Controls[3].Enabled := False; +end; + +procedure TMenuForm.rbFDClick(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + ScoreCoeffEdit.Enabled := True; + BandGroup.Controls[1].Enabled := False; + //ModeGroup.Controls[2].Enabled := False; + ModeGroup.Controls[3].Enabled := False; +end; + +procedure TMenuForm.rbJA0inClick(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + for i := 0 to 1 do + BandGroup.Controls[i].Enabled := False; + BandGroup.Controls[4].Enabled := False; + for i := 7 to 13 do + BandGroup.Controls[i].Enabled := False; + ModeGroup.Controls[2].Enabled := False; + ModeGroup.Controls[3].Enabled := False; + OpGroup.Controls[1].Enabled := False; + TXNrEdit.Enabled := False; +end; + +procedure TMenuForm.rbARRLWClick(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + for i := 7 to 13 do + BandGroup.Controls[i].Enabled := False; + ModeGroup.Controls[0].Enabled := False; + ModeGroup.Controls[3].Enabled := False; +end; + +procedure TMenuForm.rbAPSprintClick(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + for i := 1 to 13 do + BandGroup.Controls[i].Enabled := False; + ModeGroup.Controls[0].Enabled := False; + ModeGroup.Controls[3].Enabled := False; + OpGroup.Controls[1].Enabled := False; + TXNrEdit.Enabled := False; +end; + +procedure TMenuForm.OpGroupClick(Sender: TObject); +begin + if OpGroup.ItemIndex = 0 then + TXNrEdit.Enabled := False + else + TXNrEdit.Enabled := True; +end; + +procedure TMenuForm.TXNrEditKeyPress(Sender: TObject; var Key: Char); +begin + if not(Key in ['0'..'9']) then + Key := #0; +end; + +procedure TMenuForm.UserDefClick(Sender: TObject); +begin + EnableEverything; + if CFGFileName <> '' then + if UsesCoeff(CFGFileName) then + ScoreCoeffEdit.Enabled := True; + if CFGFileName = '' then + OKButton.Enabled := False; + SelectButton.Enabled := True; + +end; + + + +procedure TMenuForm.rbIARUClick(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + for i := 7 to 13 do + BandGroup.Controls[i].Enabled := False; + ModeGroup.Controls[3].Enabled := False; +end; + +procedure TMenuForm.rbIOTAClick(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + BandGroup.Controls[1].Enabled := False; + for i := 7 to 13 do + BandGroup.Controls[i].Enabled := False; + ModeGroup.Controls[3].Enabled := False; +end; + + +procedure TMenuForm.rbARRL10Click(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + for i := 0 to 5 do + BandGroup.Controls[i].Enabled := False; + for i := 7 to 13 do + BandGroup.Controls[i].Enabled := False; + + BandTemp := BandGroup.ItemIndex; + + BandGroup.ItemIndex := 6; + ModeGroup.Controls[3].Enabled := False; +end; + +procedure TMenuForm.rbARRL10Exit(Sender: TObject); +begin + BandGroup.ItemIndex := BandTemp; +end; + + +procedure TMenuForm.FnugrySingleInstance1AlreadyRunning(Sender: TObject; + hPrevInst, hPrevWnd: Integer); +begin + close; +end; + + +procedure TMenuForm.FormKeyPress(Sender: TObject; var Key: Char); +begin + if Key = ^X then + rbKCJ.Visible := True; + if Key = ^T then + rbKCJ.Visible := True; +end; + +procedure TMenuForm.rbKCJClick(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + //BandGroup.Controls[1].Enabled := False; + for i := 8 to 13 do + BandGroup.Controls[i].Enabled := False; + ModeGroup.Controls[0].Enabled := False; + ModeGroup.Controls[2].Enabled := False; + ModeGroup.Controls[3].Enabled := False; + OpGroup.Controls[1].Enabled := False; + OpGroup.Controls[2].Enabled := False; +end; + +procedure TMenuForm.rbWAEClick(Sender: TObject); +var i : integer; +begin + EnableEveryThing; + BandGroup.Controls[1].Enabled := False; + for i := 7 to 13 do + BandGroup.Controls[i].Enabled := False; + ModeGroup.Controls[0].Enabled := False; + ModeGroup.Controls[3].Enabled := False; +end; + +end. diff --git a/src/UMinMaxFreqDlg.dfm b/src/UMinMaxFreqDlg.dfm new file mode 100644 index 00000000..f0f4fa02 Binary files /dev/null and b/src/UMinMaxFreqDlg.dfm differ diff --git a/src/UMinMaxFreqDlg.pas b/src/UMinMaxFreqDlg.pas new file mode 100644 index 00000000..75db6a94 --- /dev/null +++ b/src/UMinMaxFreqDlg.pas @@ -0,0 +1,79 @@ +unit UMinMaxFreqDlg; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls; + +type + TMinMaxFreqDlg = class(TForm) + minEdit: TEdit; + maxEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Button1: TButton; + Button2: TButton; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + private + { Private declarations } + public + MinFreq, MaxFreq : integer; + { Public declarations } + procedure SetMinMax(min, max : integer); + end; + +var + MinMaxFreqDlg: TMinMaxFreqDlg; + +implementation + +{$R *.DFM} + +procedure TMinMaxFreqDlg.SetMinMax(min, max : integer); +begin + MinFreq := min; + MaxFreq := max; + minEdit.Text := IntToStr(MinFreq); + maxEdit.Text := IntToStr(MaxFreq); +end; + +procedure TMinMaxFreqDlg.Button1Click(Sender: TObject); +var min, max : integer; +begin + try + min := StrToInt(MinEdit.Text); + except + on EConvertError do + min := 0; + end; + + try + max := StrToInt(MaxEdit.Text); + except + on EConvertError do + max := 0; + end; + + if (min = 0) or (max = 0) or (min >= max) then + begin + close; + exit; + end; + + MinFreq := min; + MaxFreq := max; + + close; + +end; + +procedure TMinMaxFreqDlg.Button2Click(Sender: TObject); +begin + Close; +end; + +end. diff --git a/src/UMultipliers.pas b/src/UMultipliers.pas new file mode 100644 index 00000000..4381d5f1 --- /dev/null +++ b/src/UMultipliers.pas @@ -0,0 +1,1197 @@ +unit UMultipliers; + +interface + +uses SysUtils, Windows, Classes, zLogGlobal, UOptions, Dialogs; + +const testCQWW = $03; + MAXCQZONE = 40; + testIARU = $09; + testDXCCWWZone = $05; + MaxIndex = 37*37+36; + _DATFileName : string = ''; + +type + TCountry = class + Country : string[40]; {JA, KH6 etc} + CountryName : string[40]; {Japan, Hawaii, etc} + Zone : integer; + Continent : string[3]; + Worked : array[b19..HiBand] of boolean; + GridIndex : integer; // where it is listed in the Grid (row) + constructor Create; + function Summary : string; + function SummaryWAE : string; + function Summary2 : string; + function SummaryARRL10 : string; + function SummaryGeneral : string; + function JustInfo : string; // returns cty name, px and continent + end; + + TCountryList = class + List : TList; + constructor Create; + destructor Destroy; override; + procedure Reset; + end; + + TPrefix = class + Prefix : string[12]; + Index : integer; + Length : integer; + OvrZone : integer; // override zone + OvrContinent : string[3]; // override continent + constructor Create; + end; + + TPrefixList = class + ListIndexX : array[0..MaxIndex] of integer; + List : TList; + constructor Create; + destructor Destroy; override; + procedure AddListX(PX : TPrefix); + procedure InitIndexX; + end; + + TCity = class + CityNumber : string[30]; + CityName : string[40]; + PrefNumber : string[3]; + PrefName : string[10]; + Worked : array[b19..HiBand] of boolean; + Index : integer; + constructor Create; + function Abbrev : string; + function Summary : string; + function SummaryGeneral : string; + function Summary2 : string; + function FDSummary(LowBand : TBand) : string; + end; + + TCityList = class + List : TList; + SortedMultiList : TStringList; + constructor Create; + destructor Destroy; override; + procedure Reset; + function GetCity(Name : string) : TCity; + procedure LoadFromFile(filename : string); + function AddAndSort(C : TCity) : integer; // returns the index inserted + end; + + + + + TActiveBands = array[b19..HiBand] of boolean; + +var CountryList : TCountryList; + PrefixList : TPrefixList; + MyCountry, MyContinent, MyZone : string[255]; + ActiveBands : TActiveBands; // cf generalmulti2 + +procedure LoadCTY_DAT(TEST : byte; var L : TCountryList; var PL : TPrefixList); +procedure LoadCountryDataFromFile(filename : string; var L : TCountryList; var PL : TPrefixList); +function GetPrefixX(aQSO : TQSO; PL : TPrefixList): TPrefix; +function GetPrefix(aQSO : TQSO) : TPrefix; +function GetCountryIndex(aQSO : TQSO): integer; +function GetArea(str : string) : integer; +function GuessCQZone(aQSO : TQSO) : string; +procedure AnalyzeMyCountry; + +implementation + +procedure TPrefixList.AddListX(PX : TPrefix); +var j, k : integer; + p : string; + boo : boolean; +begin + p := PX.Prefix; + if List.Count = 0 then + begin + List.Add(PX); + exit; + end + else + begin + boo := false; + if boo = false then + k := 0; + for j := k to List.Count-1 do + begin + if PXMoreX(p, TPrefix(List[j]).Prefix)=False then + begin + List.Insert(j, PX); + exit; + end; + end; + List.Add(PX); + end; +end; + +constructor TCountryList.Create; +begin + List := TList.Create; +end; + +destructor TCountryList.Destroy; +var i : integer; +begin + List.Pack; + for i := 0 to List.Count-1 do + TCountry(List[i]).Free; + List.Free; +end; + +procedure TCountryList.Reset; +var i : integer; + B : TBand; +begin + for i := 0 to List.Count - 1 do + for B := b19 to HiBand do + TCountry(List[i]).Worked[B] := False; +end; + +function TCountry.Summary : string; +var temp : string; + B : TBand; +begin + if pos('WAEDC', CONTESTNAME) > 0 then + begin + Result := SummaryWAE; + exit; + end; + if CountryName = 'Unknown' then + begin + Result := 'Unknown Country'; + exit; + end; + temp := ''; + temp := FillRight(Country,7)+FillRight(CountryName,28)+ + FillRight(IntToStr(Zone),2)+' '+ //ver 0.23 + Continent+ ' '; + for B := b19 to b28 do + if NotWARC(B) then + if Worked[B] then + temp := temp + '* ' + else + temp := temp + '. '; + Result := temp; +end; + +function TCountry.SummaryWAE : string; +var temp : string; + B : TBand; +begin + if CountryName = 'Unknown' then + begin + Result := 'Unknown Country'; + exit; + end; + temp := ''; + temp := FillRight(Country,7)+FillRight(CountryName,28)+ + ' '+ Continent + ' '; + for B := b35 to b28 do + if NotWARC(B) then + if Worked[B] then + temp := temp + '* ' + else + temp := temp + '. '; + Result := temp; +end; + +function TCountry.SummaryGeneral : string; +var temp : string; + B : TBand; + temp2 : string[15]; +begin + if CountryName = 'Unknown' then + begin + Result := 'Unknown Country'; + exit; + end; + temp := ''; + temp2 := CountryName; + temp := FillRight(Country,6)+FillRight(temp2, 16)+ + FillRight(IntToStr(Zone),2)+' '+ //ver 0.23 + Continent+ ' '; +{ + for B := b19 to HiBand do + if NotWARC(B) then + if Worked[B] then + temp := temp + '* ' + else + temp := temp + '. '; +} + for B := b19 to Hiband do + if ActiveBands[B] then + if Worked[B] then + temp := temp + '* ' + else + temp := temp + '. '; + + Result := temp; +end; + + +function TCountry.Summary2 : string; +var temp : string; + B : TBand; + i : integer; +begin + if CountryName = 'Unknown' then + begin + Result := 'Unknown'; + exit; + end; + temp := ''; + temp := FillRight(Country,7)+FillRight(CountryName,28)+ Continent+ ' '; + temp := temp + 'worked on : '; + for B := b19 to b28 do + if NotWARC(B) then + if Worked[B] then + temp := temp + MHzString[B] + ' ' + else + for i := 1 to length(MHzString[B]) do + temp := temp + ' '; + Result := temp; +end; + +function TCountry.SummaryARRL10 : string; +var temp : string; + B : TBand; +begin + if CountryName = 'Unknown' then + begin + Result := ' Unknown country'; + exit; + end; + temp := ' '+FillRight(Country,7)+FillRight(CountryName,28) + Continent+ ' '; + if IsWVE(Country) then + begin + Result := temp + 'N/A'; + exit; + end; + for B := b19 to b35 do + if Worked[B] then + temp := temp + '* ' + else + temp := temp + '. '; + Result := temp; +end; + +function TCountry.JustInfo : string; +var temp : string; +begin + if CountryName = 'Unknown' then + begin + Result := 'Unknown'; + exit; + end; + temp := ''; + temp := FillRight(Country,7)+FillRight(CountryName,28)+ Continent+ ' '; + Result := temp; +end; + +constructor TCountry.Create; +var B : TBand; +begin + for B := b19 to HiBand do + Worked[B] := False; + Country := ''; + CountryName := ''; + Zone := 0; + Continent := ''; +end; + +constructor TPrefix.Create; +begin + Prefix := ''; + Index := 0; + Length := 0; + OvrZone := 0; + OvrContinent := ''; +end; + +constructor TPrefixList.Create; +var i : integer; +begin + List := TList.Create; +{ for i := 0 to 255 do + ListIndex[i] := -1;} + for i := 0 to MaxIndex do + ListIndexX[i] := -1; +end; + +destructor TPrefixList.Destroy; +var i : integer; +begin + List.Pack; + for i := 0 to List.Count-1 do + TPrefix(List[i]).Free; + List.Free; +end; + +procedure TPrefixList.InitIndexX; +var i, j : integer; + s : string; +begin + for i := List.Count-1 downto 0 do + begin + s := TPrefix(List[i]).Prefix; + j := PXIndex(s); + if j >= 0 then + ListIndexX[j] := i; + end; +end; + + + + +procedure LoadCTY_DAT(TEST : byte; var L : TCountryList; var PL : TPrefixList); +var f : textfile; + str, temp, temp2 : string; + C : TCountry; + P : TPrefix; + i, mii, j, k, m : integer; +begin + _DATFileName := 'CTY.DAT'; + System.assign(f, 'CTY.DAT'); + try + System.reset(f); + except + on EFOpenError do + begin + exit; + end; + end; + + //readln(f, str); + C := TCountry.Create; + C.CountryName := 'Unknown'; + L.List.Add(C); + while not(eof(f)) do + begin + readln(f, str); + + if (Pos('*', str) > 0) and (TEST <> testCQWW) then //Cty only for CQWW + begin + repeat + readln(f, str); + until (eof(f)) or (pos(':',str) > 0); + if eof(f) then + exit; + end; + + C := TCountry.Create; + + i := Pos(':',str); + if i > 0 then + begin + C.CountryName := copy(str,1,i-1); + Delete(str, 1, i); + str := TrimLeft(str); + end; + + i := Pos(':',str); + if i > 0 then + begin + temp := copy(str,1,i-1); + try + j := StrToInt(temp); + except + on EConvertError do + j := 0; + end; + if (TEST in [testCQWW, testDXCCWWZone]) then + C.Zone := j; + Delete(str, 1, i); + str := TrimLeft(str); + end; + + i := Pos(':',str); + if i > 0 then + begin + temp := copy(str,1,i-1); + try + j := StrToInt(temp); + except + on EConvertError do + j := 0; + end; + if (TEST = testIARU) then + C.Zone := j; + Delete(str, 1, i); + str := TrimLeft(str); + end; + + i := Pos(':',str); + if i > 0 then + begin + temp := copy(str,1,i-1); + if Pos(temp+';', 'AS;AF;EU;NA;SA;OC;') > 0 then + C.Continent := temp; + Delete(str, 1, i); + str := TrimLeft(str); + end; + + i := Pos(':',str); // latitude + if i > 0 then + begin + Delete(str, 1, i); + str := TrimLeft(str); + end; + + i := Pos(':',str); // longitude + if i > 0 then + begin + Delete(str, 1, i); + str := TrimLeft(str); + end; + + i := Pos(':',str); // utc offset + if i > 0 then + begin + Delete(str, 1, i); + str := TrimLeft(str); + end; + + i := Pos(':',str); + if i > 0 then + begin + temp := copy(str, 1, i-1); + if temp[1] = '*' then + Delete(temp,1,1); + C.Country := temp; + //Delete(str, 1, i); + //str := TrimLeft(str); + end; + + L.List.Add(C); + i := L.List.Count -1; + C.GridIndex := i; + + repeat + mii:=1; + readln(f,str); + str := TrimLeft(str); + repeat + temp:=''; + repeat + temp:=temp+str[mii]; + inc(mii) + until (str[mii]=',') or (str[mii]=';') or (mii>length(str)); + + P := TPrefix.Create; + + if (pos('(', temp) > 0) then + begin + j := pos('(',temp); + k := pos(')',temp); + if k > j+1 then + begin + temp2 := copy(temp, j+1, k-j-1); + try + m := StrToInt(temp2); + except + on EConvertError do + m := 0; + end; + if (m > 0) and (TEST in [testCQWW, testDXCCWWZone]) then + P.OvrZone := m; + end; + Delete(temp,j,k-j+1); + end; + + if (pos('[', temp) > 0) then + begin + j := pos('[',temp); + k := pos(']',temp); + if k > j+1 then + begin + temp2 := copy(temp, j+1, k-j-1); + try + m := StrToInt(temp2); + except + on EConvertError do + m := 0; + end; + if (m > 0) and (TEST=testIARU) then + P.OvrZone := m; + end; + Delete(temp,j,k-j+1); + end; + + if (pos('{', temp) > 0) then + begin + j := pos('{',temp); + k := pos('}',temp); + if k > j+1 then + begin + temp2 := copy(temp, j+1, k-j-1); + if Pos(temp2+';', 'AS;AF;EU;NA;SA;OC;') > 0 then + P.OvrContinent := temp2; + end; + Delete(temp,j,k-j+1); + end; + + if (pos('<', temp) > 0) then // lat, long override. ignore + begin + j := pos('<',temp); + k := pos('>',temp); + Delete(temp,j,k-j+1); + end; + + P.Prefix := temp; + P.Index := i; + P.Length := length(temp); + + {j := 0; + if PL.List.Count > 0 then + for j := 0 to PL.List.Count-1 do + begin + if TPrefix(PL.List[j]).Length <= P.Length then + break; + end; + PL.List.Insert(j, P); } + + PL.AddListX(P); // 1.31 + inc(mii); + until (mii >= Length(str)+1); + until str[mii-1]=';'; + + end; + PL.InitIndexX; + close(f); +end; + + +procedure LoadCountryDataFromFile(filename : string; var L : TCountryList; var PL : TPrefixList); +var f : textfile; + str, temp : string; + C : TCountry; + P : TPrefix; + i, mii, j : integer; +begin + _DATFileName := filename; + System.assign(f, filename); + try + System.reset(f); + except + on EFOpenError do + begin + exit; + end; + end; + readln(f, str); + C := TCountry.Create; + C.CountryName := 'Unknown'; + L.List.Add(C); + while not(eof(f)) do + begin + readln(f, str); + if Pos('end of file', LowerCase(str))>0 then break; + C := TCountry.Create; + C.CountryName := TrimRight(copy(str,1,26)); + temp := TrimLeft(TrimRight(copy(str,27,2))); + try + i := StrToInt(temp) + except + on EConvertError do + i := 0; + end; + if (i < 0) or (i > 90{maxzone}) then + i := 0; + C.Zone := i; + C.Country := TrimRight(copy(str,32,7)); + case C.Zone of + 1..8 : C.Continent := 'NA'; + 9..13 : C.Continent := 'SA'; + 14..16,40 : C.Continent := 'EU'; + 17..26 : C.Continent := 'AS'; + 27..32 : C.Continent := 'OC'; + 33..39 : C.Continent := 'AF'; + end; + if str[39] in ['A','O','E'] then + begin + temp:=str[39]+str[40]; + if temp='AS' then C.Continent := 'AS'; + if temp='AN' then C.Continent := 'AN'; + if temp='AF' then C.Continent := 'AF'; + if temp='EU' then C.Continent := 'EU'; + if temp='OC' then C.Continent := 'OC'; + if temp='NA' then C.Continent := 'NA'; + if temp='SA' then C.Continent := 'SA'; + end; + L.List.Add(C); + i := L.List.Count -1; + C.GridIndex := i; + + repeat + mii:=3; + readln(f,str); + repeat + temp:=''; + repeat + temp:=temp+str[mii]; + inc(mii) + until (str[mii]=',') or (str[mii]=';'); + P := TPrefix.Create; + P.Prefix := temp; + P.Index := i; + P.Length := length(temp); + {j := 0; + if PL.List.Count > 0 then + for j := 0 to PL.List.Count-1 do + begin + if TPrefix(PL.List[j]).Length <= P.Length then + break; + end; + PL.List.Insert(j, P); } + PL.AddListX(P); // 1.31 + inc(mii); + until mii=Length(str)+1; + until str[mii-1]=';'; + end; + mii := 0; + close(f); + PL.InitIndexX; +end; + +function GetPrefixX(aQSO : TQSO; PL : TPrefixList): TPrefix; +var str, temp, firststr, px : string; + i, x, j, k, len, pind : integer; + boo : boolean; +begin + Result := nil; + str := aQSO.QSO.CallSign; + if str = '' then + exit; + pind := PXIndex(str); + i := pos('/', str); + if i > 0 then + begin + // if there's a perfect match then go with it + len := length(str); + x := PL.ListIndexX[pind]; + if x >= 0 then + begin + for j := x to PL.List.Count - 1 do + begin + if TPrefix(PL.List[j]).Prefix = str then + begin + Result := TPrefix(PL.List[j]); + exit; + end; + if len > TPrefix(PL.List[j]).Length then + break; + end; + end; + + temp := copy(str, i + 1, 255); + if temp = 'MM' then {Marine Mobile} + begin + Result := nil; + exit; + end; + if (temp='AA') or (temp='AT') or (temp='AG') or (temp='AA') or + (temp='AE') or (temp='M') or (temp='P') or (temp='AM') or + (temp='QRP') or (temp='A') or (temp='KT') or (temp='N')or + (temp='T') then + str := copy(str, 1, i - 1) {cut /AA /M etc} + else + if (length(temp) = 1) and (temp[1] in ['0'..'9']) then + str := copy(str, 1, i - 1) {cut /0 /1 etc} + else + if i > 4 then {JA1ZLO/JD1, KH0AM/W6 etc NOT KH0/AD6AJ} + begin + if i = 5 then // kh7k/ad6aj etc or w6aa/kh0 + begin // if the first part exactly matches with a prefix, it will return that prefix + boo := false; + firststr := copy(str, 1, 4); + if x >= 0 then + for k := x to PL.List.Count - 1 do + begin + if TPrefix(PL.List[k]).Prefix = firststr then + begin + boo := true; + break; + end; + if PXIndex(TPrefix(PL.List[k]).Prefix) <> pind then + break; + end; + if boo then + begin + Result := TPrefix(PL.List[k]); + exit; + end; + end; + str := temp; + end; + end; + + boo := false; + if str = '' then + exit; + + if pos('KG4', str) = 1 then + begin + if length(str) = 6 then + str := 'AD4AJ'; + end; + + pind := PXIndex(str); + x := PL.ListIndexX[pind]; + if x < 0 then + begin + pind := PXIndex(copy(str,1,1)); + x := PL.ListIndexX[pind]; + end; + + if x < 0 then + exit; + + for j := pind+1 to MaxIndex do + if PL.ListIndexX[j] >= 0 then + break; + + for i := x to PL.ListIndexX[j] - 1 do + begin + if Pos(TPrefix(PL.List[i]).Prefix, str)=1 then + begin + boo := true; + break; + end; + end; + + if boo then + Result := TPrefix(PL.List[i]) + else + begin + x := PL.ListIndexX[PXIndex(copy(str,1,1))]; + if x >= 0 then + Result := TPrefix(PL.List[x]) + else + Result := nil; + end; + +end; + +function GetPrefix(aQSO : TQSO): TPrefix; +begin + Result := GetPrefixX(aQSO, PrefixList); +end; + +function GetCountryIndex(aQSO : TQSO): integer; +begin + if GetPrefix(aQSO) <> nil then + Result := TPrefix(GetPrefix(aQSO)).Index + else + Result := 0; +end; + +function GetArea(str : string) : integer; +var j, k : integer; +begin + j := Pos('/', str); + if j > 4 then + begin + for k := length(str) downto 1 do + if str[k] in ['0'..'9'] then + break; + end + else + begin + for k := 1 to length(str) do + if str[k] in ['0'..'9'] then + break; + end; + if str[k] in ['0'..'9'] then + k := ord(str[k])-ord('0') + else + k := 6; + Result := k; +end; + +function expos(substr, str : string) : integer; +var i, j : integer; + bad : boolean; +begin + Result := 0; + if (length(substr) > length(str)) or (substr = '') then + exit; + for i := 1 to (length(str)-length(substr) + 1) do + begin + bad := false; + for j := 1 to length(substr) do + begin + if substr[j] <> '?' then + if substr[j] <> str[i + j -1] then + bad := true; + end; + if bad = false then + begin + result := i; + exit; + end; + end; +end; + +function GuessCQZone(aQSO : TQSO) : string; +var i, k : integer; + C : TCountry; + P : TPrefix; + str, str2 : string; +begin + P := GetPrefix(aQSO); + if P = nil then + begin + Result := ''; + exit; + end + else + C := TCountry(CountryList.List[P.Index]); + str := aQSO.QSO.CallSign; + i := C.Zone; + + if (C.Country = 'W') or (C.Country = 'K') then + begin + k := GetArea(str); + case k of + 1..4 : i := 5; + 5,8,9,0 : i := 4; + 6,7 : i := 3; + end; + end; + + if C.Country = 'VE' then + begin + k := GetArea(str); + case k of + 1,2, 9 : i := 5; + 3..6 : i := 4; + 7 : i := 3; + 8 : i := 1; + 0 : i := 2; + end; + end; + + if C.Country = 'VK' then + begin + k := GetArea(str); + case k of + 1..5,7 : i := 30; + 6,8 : i := 29; + 9,0 : i := 30;{Should not happen} + end; + end; + + if C.Country = 'BY' then + begin + k := GetArea(str); + case k of + 1..8 : i := 24; + 9,0 : i := 23; + end; + end; + + if (C.Country = 'UA') or (C.Country = 'UA0') or (C.Country = 'UA9') then + begin + if (expos('U?0',str) > 0) or (pos('R?0',str) > 0) or + (pos('R0', str) > 0) then + begin + k := pos('0',str); + if length(str) >= k + 1 then + case str[k+1] of + 'A','B','H','O','P','S','T','U','V','W' : + i := 18; + 'Y': + i := 23; + else + i := 19; + end; + end; + + if (expos('U?8',str) > 0) or (expos('R?8',str) > 0) then + begin + i := 18; + end; + if (expos('U?9',str) > 0) or (pos('R?9',str) > 0) then + begin + k := pos('9',str); + if length(str) >= k + 1 then + case str[k+1] of + 'S','T','W' : + i := 16; + 'H','I','O','P','U','V','Y','Z': + i := 18; + else + i := 17; + end; + end; + end; + + if P.OvrZone > 0 then + i := P.OvrZone; + + if i = 0 then + Result := '' + else + Result := IntToStr(i); +end; + + +procedure AnalyzeMyCountry; +var aQSO : TQSO; + i : integer; + P : TPrefix; +begin + MyContinent := 'AS'; + MyCountry := 'JA'; + MyZone := '25'; + + if (Options.Settings._mycall <> '') and (Options.Settings._mycall <> 'Your call sign') then + begin + aQSO := TQSO.Create; + aQSO.QSO.callsign := Uppercase(Options.Settings._mycall); + + P := GetPrefix(aQSO); + //i := GetCountryIndex(aQSO); + if P = nil then + i := 0 + else + i := P.Index; + if i > 0 then + begin + MyCountry := TCountry(CountryList.List[i]).Country; + //MyZone := IntToStr(TCountry(CountryList.List[i]).Zone); + + if Options.Settings._cqzone = '' then + Options.Settings._cqzone := GuessCQZone(aQSO); + MyZone := Options.Settings._cqzone; + + //MyContinent := TCountry(CountryList.List[i]).Continent; + if P.OvrContinent = '' then + MyContinent := TCountry(CountryList.List[i]).Continent + else + MyContinent := P.OvrContinent; + end; + aQSO.Free; + end; +end; + +constructor TCity.Create; +var B : TBand; +begin + for B := b19 to HiBand do + Worked[B] := False; + CityNumber := ''; + CityName := ''; + PrefNumber := ''; + PrefName := ''; +end; + +function TCity.Abbrev : string; +var str : string; +begin + str := CityNumber; + if pos(',', str) > 0 then + str := copy(str, 1, pos(',', str) - 1); + Result := str; +end; + +function TCity.Summary : string; +var temp, _cityname : string; + B : TBand; +begin + temp := ''; + if length(CityName) > 20 then + _cityname := copy(CityName, 1, 20) + else + _cityname := CityName; + temp := FillRight({CityNumber}Abbrev,7)+FillRight(_cityname,20)+' '; + for B := b19 to HiBand do + if NotWARC(B) then + if Worked[B] then + temp := temp + '* ' + else + temp := temp + '. '; + Result := ' '+temp; +end; + +function TCity.SummaryGeneral : string; +var temp, _cityname : string; + B : TBand; +begin + temp := ''; + if length(CityName) > 20 then + _cityname := copy(CityName, 1, 20) + else + _cityname := CityName; + temp := FillRight({CityNumber}Abbrev,7)+FillRight(_cityname,20)+' '; + for B := b19 to HiBand do + if ActiveBands[B] then + if Worked[B] then + temp := temp + '* ' + else + temp := temp + '. '; + Result := ' '+temp; +end; + +function TCity.FDSummary(LowBand : TBand) : string; +var temp : string; + B : TBand; +begin + temp := ''; + temp := FillRight(CityNumber,7)+FillRight(CityName,20)+' '+' '; + for B := LowBand to HiBand do + if NotWARC(B) then + if B in [b19..b1200] then + begin + if length(Self.CityNumber) <= 3 then + if Worked[B] then + temp := temp + '* ' + else + temp := temp + '. ' + else + temp := temp + ' '; + end + else + begin + if length(Self.CityNumber) > 3 then + if Worked[B] then + temp := temp + '* ' + else + temp := temp + '. ' + else + temp := temp + ' '; + end; + Result := ' '+temp; +end; + +function TCity.Summary2 : string; +var temp : string; + B : TBand; +begin + temp := ''; + temp := FillRight({CityNumber}Abbrev,7)+FillRight(CityName,20)+' Worked on : '; + for B := b35 to HiBand do + if Worked[B] then + temp := temp + ' '+MHzString[B] + else + temp := temp + ''; + Result := temp; +end; + +constructor TCityList.Create; +begin + List := TList.Create; + SortedMultiList := TStringList.Create; + SortedMultiList.Sorted := True; +end; + +procedure TCityList.Reset; +var i : integer; + B : TBand; +begin + for i := 0 to List.Count - 1 do + for B := b19 to HiBand do + TCity(List[i]).Worked[B] := False; +end; + +function TCityList.GetCity(Name : string) : TCity; +var i : integer; +begin + Result := nil; + i := SortedMultiList.IndexOf(Name); + if i >= 0 then + Result := TCity(SortedMultiList.Objects[i]); +end; + +destructor TCityList.Destroy; +var i : integer; +begin + for i := 0 to List.Count - 1 do + begin + if List[i] <> nil then + TCity(List[i]).Free; + end; + List.Free; + SortedMultiList.Clear; + SortedMultiList.Free; +end; + +procedure TCityList.LoadFromFile(filename : string); +var f : textfile; + str : string; + C : TCity; + i : integer; +begin + assign(f, filename); + try + System.Reset(f); + except + on EFOpenError do + begin + MessageDlg('DAT file '+filename+' cannot be opened', mtError, + [mbOK], 0); + exit; {Alert that the file cannot be opened \\} + end; + end; + readln(f, str); + while not(eof(f)) do + begin + readln(f, str); + if Pos('end of file', LowerCase(str))>0 then break; + C := TCity.Create; + + { + C.CityName := Copy(str, 12, 40); + C.CityNumber := TrimRight(Copy(str, 1, 11)); + } + + i := pos(' ', str); + if i > 1 then + C.CityNumber := copy(str, 1, i - 1); + delete(str, 1, i); + C.CityName := TrimRight(TrimLeft(str)); + + + C.Index := List.Count; + + List.Add(C); + SortedMultiList.AddObject(C.CityNumber, C); + end; + closefile(f); +end; + +function TCityList.AddAndSort(C : TCity) : integer; +var i : integer; +begin + if List.Count = 0 then + begin + List.Add(C); + Result := 0; + exit; + end; + for i := 0 to List.Count - 1 do + begin + if StrMore(TCity(List[i]).CityNumber, C.CityNumber) then + begin + List.Insert(i, C); + Result := i; + exit; + end; + end; + List.Add(C); + Result := List.Count - 1; +end; + + + +initialization + CountryList := nil; + PrefixList := nil; + MyContinent := 'AS'; + MyCountry := 'JA'; + MyZone := '25'; +end. diff --git a/src/UNewIOTARef.dfm b/src/UNewIOTARef.dfm new file mode 100644 index 00000000..ebd46971 Binary files /dev/null and b/src/UNewIOTARef.dfm differ diff --git a/src/UNewIOTARef.pas b/src/UNewIOTARef.pas new file mode 100644 index 00000000..c0169adb --- /dev/null +++ b/src/UNewIOTARef.pas @@ -0,0 +1,50 @@ +unit UNewIOTARef; + +interface + +uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, + Buttons, ExtCtrls; + +type + TNewIOTARef = class(TForm) + OKBtn: TButton; + CancelBtn: TButton; + Bevel1: TBevel; + Edit1: TEdit; + Label1: TLabel; + Name: TLabel; + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + NewRef : string; + procedure SetNewRef(S : string); + function GetName : string; + { Public declarations } + end; + +var + NewIOTARef: TNewIOTARef; + +implementation + +{$R *.DFM} + + +procedure TNewIOTARef.SetNewRef(S : string); +begin + NewRef := S; + Label1.Caption := 'Add '+S+' as a new IOTA reference number?' +end; + +function TNewIOTARef.GetName : string; +begin + Result := Edit1.Text; +end; + +procedure TNewIOTARef.FormShow(Sender: TObject); +begin + Edit1.SetFocus; +end; + +end. diff --git a/src/UNewPrefix.dfm b/src/UNewPrefix.dfm new file mode 100644 index 00000000..9d98638e Binary files /dev/null and b/src/UNewPrefix.dfm differ diff --git a/src/UNewPrefix.pas b/src/UNewPrefix.pas new file mode 100644 index 00000000..cb0c08dc --- /dev/null +++ b/src/UNewPrefix.pas @@ -0,0 +1,73 @@ +unit UNewPrefix; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, {UWWMulti}UMultipliers, zLogGlobal; + +type + TNewPrefix = class(TForm) + cbCountry: TComboBox; + PXEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + OKButton: TButton; + CancelButton: TButton; + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure OKButtonClick(Sender: TObject); + procedure CancelButtonClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + Prefix : string; + CtyIndex : integer; + procedure Init(CL : TCountryList; PX : string); + end; + +var + NewPrefix: TNewPrefix; + +implementation + +{$R *.DFM} + +procedure TNewPrefix.Init(CL : TCountryList; PX : string); +var i : integer; + C : TCountry; + s : string; +begin + cbCountry.Items.Clear; + for i := 0 to CL.List.Count - 1 do + begin + C := TCountry(CL.List[i]); + s := FillRight(C.Country, 10)+C.CountryName; + cbCountry.Items.Add(s); + end; + cbCountry.ItemIndex := -1; + cbCountry.Text := 'Select a country'; + PXEdit.Text := PX; +end; + +procedure TNewPrefix.FormClose(Sender: TObject; var Action: TCloseAction); +begin + cbCountry.Items.Clear; +end; + +procedure TNewPrefix.OKButtonClick(Sender: TObject); +begin + CtyIndex := cbCountry.ItemIndex; + Prefix := PXEdit.Text; + Close; +end; + + +procedure TNewPrefix.CancelButtonClick(Sender: TObject); +begin + CtyIndex := -1; + Prefix := ''; + Close; +end; + +end. diff --git a/src/UOptions.dfm b/src/UOptions.dfm new file mode 100644 index 00000000..56980725 Binary files /dev/null and b/src/UOptions.dfm differ diff --git a/src/UOptions.pas b/src/UOptions.pas new file mode 100644 index 00000000..03de7c15 --- /dev/null +++ b/src/UOptions.pas @@ -0,0 +1,2316 @@ +unit UOptions; + +interface + +uses + SysUtils, Windows, Messages, Classes, Graphics, Controls, + StdCtrls, ExtCtrls, Forms, ComCtrls, zLogGlobal, Ini, Spin, + BGK32Lib, Dialogs, Menus, PathDialog, UPaddleThread, Vic_Res, + UIntegerDialog; + + +const + RIGNAMEMAX = 39; + RIGNAMES : array[0..RIGNAMEMAX] of string = +('None', + 'TS-690/450', + 'TS-850', + 'TS-790', + 'TS-2000', + 'TS-2000/P', + 'FT-817', + 'FT-847', + 'FT-920', + 'FT-100', + 'FT-1000', + 'FT-1000MP', + 'MarkV/FT-1000MP', + 'FT-1000MP Mark-V Field', + 'IC-706', + 'IC-706MkII', + 'IC-706MkII-G', + 'IC-721', + 'IC-726', + + 'IC-731', + 'IC-736', + 'IC-746', + 'IC-746PRO', + 'IC-7400', + 'IC-750', + 'IC-756', + + 'IC-756PRO', + 'IC-760', + 'IC-760PRO', + 'IC-775', + 'IC-780', + 'IC-820', + 'IC-821', + 'IC-910', + 'IC-970', + + 'IC-275', + 'IC-375', + 'JST-145', + 'JST-245', + 'Omni-Rig'); + + +const maxbank = 3; // bank 3 reserved for rtty + maxstr = 8; + maxmaxstr = 12; // f11 and f12 only accessible via zlog.ini + + LPTMAX = 2; + +var LPTport : array[1..LPTMAX] of word; // holds the base port + 2 + +type + TCWSettingsParam = record + _speed : integer; + _weight : integer; + _fixwpm : integer; + _paddlereverse : boolean; + _sidetone : boolean; + _tonepitch : integer; + _cqmax : integer; + _cqrepeat : double; + _FIFO : boolean; + _interval : integer; + _paddle : boolean; + _zero : char; + _one : char; + _nine : char; + CWStrBank : array[1..maxbank,1..maxmaxstr] of string[255]; //bank 3 is for rtty + CQStrBank : array[0..2] of string[255]; + CurrentBank : integer; {for future use?} + _spacefactor : word; {factor in % for default space between characters} + _eispacefactor : word; + + end; + + TSettingsParam = record + _AFSK : boolean; // Use AFSK instead of RTTY for rig control + _dontallowsameband : boolean; // same band on two rigs? + _BandData : array[b19..b10g] of byte; {band data output} + _multiop : integer; {multi op/ single op} + _band : integer; {0 = all band; 1 = 1.9MHz 2 = 3.5MHz ...} + _mode : integer; {0 = Ph/CW; 1 = CW; 2=Ph; 3 = Other} + _contestmenuno : integer; {selected contest in the menu} + _mycall : string[15]; + _prov : string[15]; + _city : string[50]; + _cqzone : string[3]; + _iaruzone : string[3]; + _sendfreq : double; + + { _cqcountry : string[50]; + _dxcccountry : string[50]; + _cqzone : string[3]; + _iaruzone : string[3]; + _continent : string[20]; } + + _autobandmap: boolean; + _activebands : array[b19..HiBand] of boolean; + _SoundFiles : array[1..10] of string; + _SoundComments : array[1..10] of string; + CW : TCWSettingsParam; + _clusterport : integer; {0 : none 1-4 : com# 5 : telnet} + _rig1port : integer; {0 : none 1-4 : com#} + _rig1name : integer; + _rig2port : integer; {0 : none 1-4 : com#} + _rig2name : integer; + _zlinkport : integer; {0 : none 1-4 : com# 5: telnet} + _clusterbaud : integer; {} + _rigbaud : integer; //not used + _zlinkbaud : integer; + _icombaudrate : integer; + _clusterhost : string; + _clustertelnetport : integer; + _clusterlinebreakTELNET : integer; {0 : CRLF, 1 : CR, 2 : LF} + _clusterlocalechoTELNET : boolean; + _clusterlinebreakCOM : integer; + _clusterlocalechoCOM : boolean; + _zlinkhost : string; + _zlinklinebreakTELNET : integer; {0 : CR, 1 : CR+LF, 2 : LF} + _zlinklocalechoTELNET : boolean; + _zlinklinebreakCOM : integer; + _zlinklocalechoCOM : boolean; + _multistationwarning : boolean; // true by default. turn off not new mult warning dialog + _specificcwport : word; {specific assignment of cw out port#} + _lptnr : integer; {1 : LPT1; 2 : LPT2; 11:COM1; 12 : COM2; 21: USB} + //_usedata : boolean; {default = False; use data out if true} + {not supported now} + _reverselogic : boolean; {default = false. reverse logic for keying} + _rigreverse : boolean; // default = false + _pttreverse : boolean; + + _sentstr : string; {exchanges sent $Q$P$O etc. Set at menu select} + + _backuppath : string; + _cfgdatpath : string; + _logspath : string; + + _pttenabled : boolean; + _pttbefore : word; + _pttafter : word; + _txnr : byte; + _pcname : string[32]; + _saveevery : word; + _scorecoeff : extended; + _age : string[3]; // all asian + _allowdupe : boolean; + _countdown : boolean; + _qsycount : boolean; + + _sameexchange : boolean; //true if exchange is same for all bands. false if serial etc. + _entersuperexchange : boolean; + _jmode : boolean; + _mainfontsize : integer; + _mainrowheight : integer; + //_updatetimeonenter : boolean; + _ritclear : boolean; // clear rit after each qso + _searchafter : integer; // 0 default. for super / partial check + _banddatamode : integer; // 0 : none, 1 : radio1, 2 : radio2, 3 : active + _savewhennocw : boolean; // def=false. save when cw is not being sent + _multistation : boolean; // warn when logging non-newmulti qso + _maxsuperhit : integer; // max # qso hit + _bsexpire : integer; // bandscope expiration time in minutes + _spotexpire : integer; // spot expiration time in minutes + _renewbythread : boolean; + _movetomemo : boolean; // move to memo w/ spacebar when editing past qsos + _bsminfreqarray : array[b19..HiBand, mCW..mOther] of Integer; // kHz + _bsmaxfreqarray : array[b19..HiBand, mCW..mOther] of Integer; // kHz + _recrigfreq : boolean; // record rig freq in memo + + _transverter1 : boolean; + _transverter2 : boolean; + _transverteroffset1 : integer; + _transverteroffset2 : integer; + _syncserial : boolean; // synchronize serial # over network + _switchcqsp : boolean; // switch cq/sp modes by shift+F + _displaydatepartialcheck : boolean; + end; + + + +type + TOptions = class(TForm) + PageControl: TPageControl; + PrefTabSheet: TTabSheet; + TabSheet2: TTabSheet; + CWTabSheet: TTabSheet; + VoiceTabSheet: TTabSheet; + TabSheet5: TTabSheet; + tbRigControl: TTabSheet; + Panel1: TPanel; + OKButton: TButton; + Button2: TButton; + Button3: TButton; + GroupBox1: TGroupBox; + SingleOpRadioBtn: TRadioButton; + MultiOpRadioBtn: TRadioButton; + BandGroup: TRadioGroup; + OpListBox: TListBox; + ModeGroup: TRadioGroup; + OpEdit: TEdit; + Add: TButton; + Delete: TButton; + Ini: TIni; + GroupBox2: TGroupBox; + Edit2: TEdit; + Edit3: TEdit; + Edit4: TEdit; + Edit5: TEdit; + Edit6: TEdit; + Edit7: TEdit; + Edit9: TEdit; + Edit8: TEdit; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label6: TLabel; + Label7: TLabel; + Label8: TLabel; + Label9: TLabel; + Label10: TLabel; + Edit10: TEdit; + Edit1: TEdit; + SpeedBar: TTrackBar; + Label11: TLabel; + SpeedLabel: TLabel; + Label13: TLabel; + WeightBar: TTrackBar; + WeightLabel: TLabel; + CQmaxSpinEdit: TSpinEdit; + ToneSpinEdit: TSpinEdit; + Label15: TLabel; + Label16: TLabel; + SideToneCheck: TCheckBox; + PaddleCheck: TCheckBox; + CQRepEdit: TEdit; + Label17: TLabel; + FIFOCheck: TCheckBox; + PaddleEnabledCheck: TCheckBox; + AbbrevEdit: TEdit; + Label12: TLabel; + ProvEdit: TEdit; + CItyEdit: TEdit; + Label14: TLabel; + Label18: TLabel; + SentEdit: TEdit; + Label19: TLabel; + GroupBox3: TGroupBox; + act19: TCheckBox; + act35: TCheckBox; + act7: TCheckBox; + act14: TCheckBox; + act21: TCheckBox; + act28: TCheckBox; + act50: TCheckBox; + act144: TCheckBox; + act430: TCheckBox; + act1200: TCheckBox; + act2400: TCheckBox; + act5600: TCheckBox; + act10g: TCheckBox; + GroupBox4: TGroupBox; + Label20: TLabel; + Label21: TLabel; + Label22: TLabel; + Label23: TLabel; + Label24: TLabel; + Label25: TLabel; + Label26: TLabel; + Label27: TLabel; + Label28: TLabel; + Label29: TLabel; + vEdit2: TEdit; + vEdit3: TEdit; + vEdit4: TEdit; + vEdit5: TEdit; + vEdit6: TEdit; + vEdit7: TEdit; + vEdit9: TEdit; + vEdit8: TEdit; + vEdit10: TEdit; + vEdit1: TEdit; + memo: TLabel; + OpenDialog: TOpenDialog; + GroupBox6: TGroupBox; + Label30: TLabel; + ClusterCombo: TComboBox; + Port: TLabel; + PCsetButton: TButton; + OpenDialog1: TOpenDialog; + Label32: TLabel; + ZLinkCombo: TComboBox; + Button1: TButton; + ZLinkSetButton: TButton; + vButton1: TButton; + vButton2: TButton; + vButton3: TButton; + vButton4: TButton; + vButton5: TButton; + vButton6: TButton; + vButton7: TButton; + vButton8: TButton; + vButton9: TButton; + vButton10: TButton; + act24: TCheckBox; + act18: TCheckBox; + act10: TCheckBox; + PathDialog: TPathDialog; + GroupBox5: TGroupBox; + Button4: TButton; + BackUpPathEdit: TEdit; + CQZoneEdit: TEdit; + IARUZoneEdit: TEdit; + Label34: TLabel; + Label35: TLabel; + OpPowerEdit: TEdit; + Label36: TLabel; + Label37: TLabel; + GroupBox7: TGroupBox; + Label38: TLabel; + PTTEnabledCheckBox: TCheckBox; + Label39: TLabel; + BeforeEdit: TEdit; + AfterEdit: TEdit; + AllowDupeCheckBox: TCheckBox; + SaveEvery: TSpinEdit; + Label40: TLabel; + Label41: TLabel; + cbCountDown: TCheckBox; + rbBankA: TRadioButton; + rbBankB: TRadioButton; + cbDispExchange: TCheckBox; + gbCWPort: TGroupBox; + rbLPT1: TRadioButton; + rbLPT2: TRadioButton; + cbJMode: TCheckBox; + Label33: TLabel; + Rig1PortCombo: TComboBox; + Label42: TLabel; + Rig1Combo: TComboBox; + Label43: TLabel; + Label31: TLabel; + Rig2PortCombo: TComboBox; + Rig2Combo: TComboBox; + Label44: TLabel; + tbMisc: TTabSheet; + cbRITClear: TCheckBox; + rgBandData: TRadioGroup; + cbDontAllowSameBand: TCheckBox; + SendFreqEdit: TEdit; + Label45: TLabel; + Label46: TLabel; + cbSaveWhenNoCW: TCheckBox; + cbMultiStn: TCheckBox; + rgSearchAfter: TRadioGroup; + spMaxSuperHit: TSpinEdit; + Label47: TLabel; + spBSExpire: TSpinEdit; + Label48: TLabel; + Label49: TLabel; + cbUpdateThread: TCheckBox; + cbQSYCount: TCheckBox; + cbRecordRigFreq: TCheckBox; + cbTransverter1: TCheckBox; + cbTransverter2: TCheckBox; + TabSheet1: TTabSheet; + Label50: TLabel; + edCFGDATPath: TEdit; + btnBrowseCFGDATPath: TButton; + Label51: TLabel; + edLogsPath: TEdit; + btnBrowseLogsPath: TButton; + rbCOM1: TRadioButton; + rbCOM2: TRadioButton; + rbRTTY: TRadioButton; + cbCQSP: TCheckBox; + rbUSB: TRadioButton; + cbAFSK: TCheckBox; + cbAutoEnterSuper: TCheckBox; + Label52: TLabel; + Label53: TLabel; + spSpotExpire: TSpinEdit; + cbDisplayDatePartialCheck: TCheckBox; + cbAutoBandMap: TCheckBox; + cbIcomBaudRate: TComboBox; + Label54: TLabel; + procedure MultiOpRadioBtnClick(Sender: TObject); + procedure SingleOpRadioBtnClick(Sender: TObject); + procedure OKButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure AddClick(Sender: TObject); + procedure DeleteClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure OpEditKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure OpEditEnter(Sender: TObject); + procedure OpEditExit(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure SpeedBarChange(Sender: TObject); + procedure WeightBarChange(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure vButtonClick(Sender: TObject); + procedure ClusterComboChange(Sender: TObject); + procedure PCsetButtonClick(Sender: TObject); + procedure CreateParams(var Params: TCreateParams); override; + procedure ZLinkComboChange(Sender: TObject); + procedure ZLinkSetButtonClick(Sender: TObject); + procedure BrowsePathClick(Sender: TObject); + procedure PTTEnabledCheckBoxClick(Sender: TObject); + procedure CQRepEditKeyPress(Sender: TObject; var Key: Char); + procedure Edit1Change(Sender: TObject); + procedure CWBankClick(Sender: TObject); + procedure cbCountDownClick(Sender: TObject); + procedure cbQSYCountClick(Sender: TObject); + procedure cbTransverter1Click(Sender: TObject); + procedure Rig1ComboChange(Sender: TObject); + procedure Rig2ComboChange(Sender: TObject); + private + TempVoiceFiles : array[1..10] of string; + TempCurrentBank : integer; + TempCWStrBank : array[1..maxbank,1..maxmaxstr] of string[255]; // used temporarily while options window is open + public + OpList : TStringList; + Settings : TSettingsParam; + CurrentPower : array[b19..HiBand] of TPower; + CurrentPower2 : array[b19..HiBand] of integer; {Power2 for ARRLDX} + procedure SetOpPower(var aQSO : TQSO); + procedure SaveCurrentSettings; {saves Settings to zlog.ini} + procedure LoadIniFileBS; // called from loadinifile + procedure LoadIniFile; {loads Settings from zlog.ini} + function MultiOp : integer; + function Band : integer; + function Mode : integer; + function ContestMenuNo : integer; + function Speed : integer; + function FIFO : boolean; + function SideTone : boolean; + procedure SetMultiOp(i : integer); + procedure SetBand(b : integer); + procedure SetWeight(i : integer); + procedure SetMode(m : integer); + procedure SetCurrentContestNo(i : integer); + procedure SetFIFO(boo : boolean); + procedure SetSpeed(i : integer); + procedure SetSideTone(boo : boolean); + procedure SetPaddle(boo : boolean); + procedure SetTonePitch(i : integer); + procedure SetCQMax(i : integer); + procedure SetCQRepeat(r : double); + procedure SetSendFreq(r : double); + procedure SetMyCall(s : string); + function MyCall : shortstring; + procedure SetTXNr(i : byte); + procedure SetScoreCoeff(E : Extended); + function GetTXNr : byte; + function CWMessage(bank, i : integer) : shortstring; + procedure ImplementSettings(_OnCreate : boolean); {Sets various parameters according to Settings} + procedure RenewSettings; {Reads controls and updates Settings} + procedure SetPaddleReverse(boo : boolean); + procedure ReversePaddle; + function GetAge(aQSO : TQSO) : string; + procedure RenewCWStrBankDisp; + function PTTEnabled : boolean; + function Rig1NameStr : string; // returns the selected rig name + function Rig2NameStr : string; // returns the selected rig name + procedure ReadWin(WinName : string; var Open : boolean; var X, Y, H, W : integer); + procedure RecordSuperCheckColumns(c : integer); + function GetSuperCheckColumns : integer; + procedure ReadWin2(WinName : string; var F : TForm); + procedure RecordWin(WinName : string; Open : boolean; X, Y : integer); + procedure RestoreMainForm(var X, Y, W, H : integer; var TB1, TB2 : boolean); + procedure RecordWin2(WinName : string; F : TForm); + procedure RecordMainForm(X, Y, W, H : integer; TB1, TB2 : boolean); + end; + +var + Options: TOptions; + +implementation + +uses Main, UzLogCW, UComm, UClusterTelnetSet, UClusterCOMSet, + UZlinkTelnetSet, UZLinkForm, URigControl; + +{$R *.DFM} + + +function TOptions.Rig1NameStr : string; // returns the selected rig name +begin + Result := Rig1Combo.Items[Settings._rig1name]; +end; + +function TOptions.Rig2NameStr : string; // returns the selected rig name +begin + Result := Rig2Combo.Items[Settings._rig2name]; +end; + +function TOptions.GetAge(aQSO : TQSO) : string; +var str : string; + i : integer; +begin + Result := '??'; + if aQSO.QSO.Operator = '' then + Result := Settings._age + else + for i := 0 to OpList.Count - 1 do + begin + if TrimRight(Copy(OpList.Strings[i],1,20)) = aQSO.QSO.Operator then + begin + str := OpList.Strings[i]; + if length(str) <= 20 then + exit; + System.Delete(str,1,20); + str := TrimLeft(TrimRight(str)); + Result := str; + end; + end; +end; + +procedure TOptions.SetOpPower(var aQSO : TQSO); +var str : string; + i : integer; + P : Char; +begin + for i := 0 to OpList.Count - 1 do + begin + if TrimRight(Copy(OpList.Strings[i],1,20)) = aQSO.QSO.Operator then + begin + str := OpList.Strings[i]; + if length(str) <= 20 then + exit; + System.Delete(str,1,20); + if OldBandOrd(aQSO.QSO.Band)+1 <= length(str) then + P := str[OldBandOrd(aQSO.QSO.Band)+1] + else + P := UpCase(str[1]); + case P of + 'P' : aQSO.QSO.Power := pwrP; + 'L' : aQSO.QSO.Power := pwrL; + 'M' : aQSO.QSO.Power := pwrM; + 'H' : aQSO.QSO.Power := pwrH; + end; + end; + end; +end; + +procedure TOptions.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TOptions.SetMyCall(s : string); +begin + Settings._mycall := s; +end; + +function TOptions.MyCall : shortstring; +begin + Result := Settings._mycall; +end; + +procedure TOptions.SetTXNr(i : byte); +begin + Settings._txnr := i; +end; + +procedure TOptions.SetScoreCoeff(E : Extended); +begin + Settings._scorecoeff := E; + TQSO(Log.List[0]).QSO.RSTRcvd := Trunc(E*100); +end; + +function TOptions.GetTXNr : byte; +begin + Result := Settings._txnr; +end; + +procedure TOptions.SetTonePitch(i : integer); +begin + Settings.CW._tonepitch := i; + BGK32LIB.SetPitch(i); +end; + +procedure TOptions.SetCQMax(i : integer); +begin + Settings.CW._cqmax := i; + BGK32LIB.SetLoopMax(i); +end; + +procedure TOptions.SetCQRepeat(r : double); +begin + Settings.CW._cqrepeat := r; + BGK32LIB.SetLoopTime(r); +end; + +procedure TOptions.SetSendFreq(r : double); +begin + Settings._sendfreq := r; + RigControl.Timer1.Interval := Trunc(r*60000); + RigControl.Timer1.Enabled := False; + if r = 0 then + exit; + if Settings._rig1port <> 0 then + if Settings._zlinkport <> 0 then + if Settings._rig1name <> 0 then + RigControl.Timer1.Enabled := True; +end; + +function TOptions.CWMessage(bank, i : integer) : shortstring; +begin + Result := Settings.CW.CWStrBank[bank, i]; +end; + +procedure TOptions.SetSpeed(i : integer); +begin + if i in [0..60] then + Settings.CW._speed := i; + BGK32LIB.SetCWSpeed(Settings.CW._speed); +end; + +procedure TOptions.SetWeight(i : integer); +begin + if i in [0..100] then + Settings.CW._weight := i; + BGK32LIB.SetWeight(Settings.CW._weight); +end; + +procedure TOptions.SetSideTone(boo : boolean); +begin + BGK32LIB.SetSideTone(boo); + Settings.CW._sidetone := boo; +end; + +function TOptions.FIFO : boolean; +begin + Result := Settings.CW._FIFO; +end; + +function TOptions.Speed : integer; +begin + Result := Settings.CW._speed; +end; + +function TOptions.SideTone : boolean; +begin + Result := Settings.CW._sidetone; +end; + +function TOptions.MultiOp : integer; +begin + Result := Settings._multiop; +end; + +function TOptions.Band : integer; +begin + Result := Settings._band; +end; + +function TOptions.Mode : integer; +begin + Result := Settings._mode; +end; + +function TOptions.ContestMenuNo : integer; +begin + Result := Settings._contestmenuno; +end; + +procedure TOptions.SetMultiOp(i : integer); +begin + Settings._multiop := i; + zLogGlobal.OperatorCategory := i; +end; + +procedure TOptions.SetBand(b : integer); +var BB : TBand; +begin + Settings._band := b; + if b > 0 then + begin + Main.CurrentQSO.QSO.Band := TBand(b-1); + MainForm.BandEdit.Text := Main.CurrentQSO.BandStr; + for BB := b19 to HiBand do + MainForm.BandMenu.Items[ord(BB)].Enabled := False; + MainForm.BandMenu.Items[b-1].Enabled := TRUE; + end + else + begin + for BB := b19 to HiBand do + MainForm.BandMenu.Items[ord(BB)].Enabled := True; + end; +end; + +procedure TOptions.SetMode(m : integer); +begin + Settings._mode := m; +end; + +procedure TOptions.SetPaddleReverse(boo : boolean); +begin + Settings.CW._paddlereverse := boo; + BGK32LIB.ReversePaddle(boo); +end; + +procedure TOptions.ReversePaddle; +begin + SetPaddleReverse(not(Settings.CW._paddlereverse)); +end; + +procedure TOptions.SetCurrentContestNo(i : integer); +begin + Settings._contestmenuno := i; +end; + +procedure TOptions.SetFIFO(boo : boolean); +begin + Settings.CW._FIFO := boo; +end; + +procedure TOptions.MultiOpRadioBtnClick(Sender: TObject); +begin + OpListBox.Enabled := True; +end; + +procedure TOptions.SingleOpRadioBtnClick(Sender: TObject); +begin + OpListBox.Enabled := False; +end; + +procedure TOptions.SetPaddle(boo : boolean); +begin + Settings.CW._paddle := boo; +end; + +procedure TOptions.SaveCurrentSettings; +var i : integer; + P : PChar; +begin + P := StrAlloc(256); + + + + Ini.SetBoolean('Preferences', 'SaveWhenNoCW', Settings._savewhennocw); + Ini.SetBoolean('Preferences', 'MultiStationWarning', Settings._multistationwarning); + Ini.SetBoolean('Preferences', 'JMode', Settings._jmode); + Ini.SetBoolean('Preferences', 'MoveToMemoWithSpace', Settings._movetomemo); + Ini.SetBoolean('Preferences', 'AutoEnterSuper', Settings._entersuperexchange); + + Ini.SetInteger('Misc', 'SearchAfter', Settings._searchafter); + + Ini.SetInteger('Misc', 'MaxSuperHit', Settings._maxsuperhit); + Ini.SetInteger('Misc', 'BandScopeExpire', Settings._bsexpire); + Ini.SetInteger('Misc', 'SpotExpire', Settings._spotexpire); + Ini.SetBoolean('Misc', 'UpdateUsingThread', Settings._renewbythread); + Ini.SetBoolean('Misc', 'DisplayDatePartialCheck', Settings._displaydatepartialcheck); + + Ini.SetInteger('Rig', 'BandDataMode', Settings._banddatamode); + Ini.SetBoolean('Rig', 'DontAllowSameBand', Settings._dontallowsameband); + Ini.SetBoolean('Rig', 'AutoBandMap', Settings._autobandmap); + Ini.SetBoolean('Rig', 'UseAFSK', Settings._AFSK); + + Ini.SetBoolean('Profiles', 'Active1.9MHz', Settings._activebands[b19]); + Ini.SetBoolean('Profiles', 'Active3.5MHz', Settings._activebands[b35]); + Ini.SetBoolean('Profiles', 'Active7MHz', Settings._activebands[b7]); + Ini.SetBoolean('Profiles', 'Active10MHz', Settings._activebands[b10]); + Ini.SetBoolean('Profiles', 'Active14MHz', Settings._activebands[b14]); + Ini.SetBoolean('Profiles', 'Active18MHz', Settings._activebands[b18]); + Ini.SetBoolean('Profiles', 'Active21MHz', Settings._activebands[b21]); + Ini.SetBoolean('Profiles', 'Active24MHz', Settings._activebands[b24]); + Ini.SetBoolean('Profiles', 'Active28MHz', Settings._activebands[b28]); + Ini.SetBoolean('Profiles', 'Active50MHz', Settings._activebands[b50]); + Ini.SetBoolean('Profiles', 'Active144MHz', Settings._activebands[b144]); + Ini.SetBoolean('Profiles', 'Active430MHz', Settings._activebands[b430]); + Ini.SetBoolean('Profiles', 'Active1200MHz', Settings._activebands[b1200]); + Ini.SetBoolean('Profiles', 'Active2400MHz', Settings._activebands[b2400]); + Ini.SetBoolean('Profiles', 'Active5600MHz', Settings._activebands[b5600]); + Ini.SetBoolean('Profiles', 'Active10GHz', Settings._activebands[b10g]); + + Ini.SetString('Preferences', 'BackUpPath', Settings._backuppath); + Ini.SetString('Preferences', 'CFGDATPath', Settings._cfgdatpath); + Ini.SetString('Preferences', 'LogsPath', Settings._logspath); + + + Ini.SetInteger('Preferences', 'SaveEvery', Settings._saveevery); + Ini.SetBoolean('Preferences', 'AllowDupe', Settings._allowdupe); + Ini.SetBoolean('Preferences', 'CountDown', Settings._countdown); + Ini.SetBoolean('Preferences', 'QSYCount', Settings._qsycount); + Ini.SetBoolean('Categories', 'MultiStn', Settings._multistation); + Ini.SetInteger('Categories', 'Operator2', Settings._multiop); + Ini.SetInteger('Categories', 'Band', Settings._band); + Ini.SetInteger('Categories', 'Contest', Settings._contestmenuno); + Ini.SetInteger('Categories', 'Mode', Settings._mode); + Ini.SetInteger('Categories', 'TXNumber', Settings._txnr); + Ini.SetString('Categories','MyCall', Settings._mycall); + + Ini.SetString('Profiles', 'Province/State', Settings._prov); + Ini.SetString('Profiles', 'City', Settings._city); + Ini.SetString('Profiles', 'CQZone', Settings._cqzone); + Ini.SetString('Profiles', 'IARUZone', Settings._iaruzone); + +{ Ini.SetString('Profiles', 'CQCountry', Settings._cqcountry); + Ini.SetString('Profiles', 'CQZone', Settings._cqzone); + Ini.SetString('Profiles', 'DXCCCountry', Settings._dxcccountry); + Ini.SetString('Profiles', 'IARUZone', Settings._iaruzone); + Ini.SetString('Profiles', 'Continent', Settings._continent); } + + Ini.SetInteger('CW','Speed',Settings.CW._speed); + Ini.SetInteger('CW','FixedSpeed',Settings.CW._fixwpm); + Ini.SetInteger('CW','Weight',Settings.CW._weight); + Ini.SetInteger('CW','CQMax',Settings.CW._cqmax); + Ini.SetInteger('CW','Pitch',Settings.CW._tonepitch); + Ini.SetBoolean('CW','PaddleReverse',Settings.CW._paddlereverse); + + Ini.SetBoolean('CW','PaddleEnabled',Settings.CW._paddle); + + Ini.SetBoolean('CW','SideTone',Settings.CW._sidetone); + Ini.SetFloat('CW','CQRepeat',Settings.CW._cqrepeat); + Ini.SetFloat('Rig','SendFreq',Settings._sendfreq); + Ini.SetBoolean('Rig', 'RecordFreqInMemo', Settings._recrigfreq); + Ini.SetBoolean('CW','FIFO',Settings.CW._FIFO); + Ini.SetBoolean('CW','CQSP',Settings._switchcqsp); + Ini.SetString('CW','Zero',Settings.CW._zero); + Ini.SetString('CW','One',Settings.CW._one); + Ini.SetString('CW','Nine',Settings.CW._nine); + for i := 1 to maxstr do + begin + StrPCopy(P, 'F'+IntToStr(i)); + Ini.SetString('CW',P, Settings.CW.CWStrBank[1,i]); + end; + for i := 1 to maxstr do + begin + StrPCopy(P, 'F'+IntToStr(i)+'B'); + Ini.SetString('CW',P, Settings.CW.CWStrBank[2,i]); + end; + for i := 1 to maxstr do + begin + StrPCopy(P, 'F'+IntToStr(i)); + Ini.SetString('RTTY',P, Settings.CW.CWStrBank[3,i]); + end; + for i := 11 to 12 do + begin + StrPCopy(P, 'F'+IntToStr(i)); + Ini.SetString('CW',P, Settings.CW.CWStrBank[1,i]); + end; + for i := 11 to 12 do + begin + StrPCopy(P, 'F'+IntToStr(i)+'B'); + Ini.SetString('CW',P, Settings.CW.CWStrBank[2,i]); + end; + for i := 11 to 12 do + begin + StrPCopy(P, 'F'+IntToStr(i)); + Ini.SetString('RTTY',P, Settings.CW.CWStrBank[3,i]); + end; + Ini.SetString('CW','CQ2',Settings.CW.CQStrBank[1]); + Ini.SetString('CW','CQ3',Settings.CW.CQStrBank[2]); + + for i := 1 to maxstr do + begin + StrPCopy(P, 'F'+IntToStr(i)); + Ini.SetString('Voice',P, Settings._soundfiles[i]); + end; + Ini.SetString('Voice','CQ2', Settings._soundfiles[9]); + Ini.SetString('Voice','CQ3', Settings._soundfiles[10]); + + for i := 1 to maxstr do + begin + StrPCopy(P, 'F'+IntToStr(i)+'_Comment'); + Ini.SetString('Voice',P, Settings._soundcomments[i]); + end; + Ini.SetString('Voice','CQ2_Comment', Settings._soundcomments[9]); + Ini.SetString('Voice','CQ3_Comment', Settings._soundcomments[9]); + + Ini.SetInteger('Hardware','PacketCluster',Settings._clusterport); + Ini.SetInteger('Hardware','Rig',Settings._rig1port); + Ini.SetBoolean('Hardware','RitClear', Settings._ritclear); + Ini.SetInteger('Hardware', 'RigName', Settings._rig1name); + + Ini.SetBoolean('Hardware', 'Transverter1', Settings._transverter1); + Ini.SetInteger('Hardware', 'Transverter1Offset', Settings._transverteroffset1); + Ini.SetBoolean('Hardware', 'Transverter2', Settings._transverter2); + Ini.SetInteger('Hardware', 'Transverter2Offset', Settings._transverteroffset2); + + Ini.SetInteger('Hardware','Rig2',Settings._rig2port); + Ini.SetInteger('Hardware', 'RigName2', Settings._rig2name); + + Ini.SetInteger('Hardware','Z-Link',Settings._zlinkport); + + Ini.SetInteger('Hardware','PacketClusterBaud',Settings._clusterbaud); + Ini.SetInteger('Hardware','RigBaud',Settings._rigbaud); + Ini.SetInteger('Hardware','IcomBaudRate',Settings._icombaudrate); + + Ini.SetInteger('Hardware','Z-LinkBaud',Settings._zlinkbaud); + + Ini.SetBoolean('Hardware','PTTEnabled',Settings._pttenabled); + Ini.SetInteger('Hardware','PTTBefore',Settings._pttbefore); + Ini.SetInteger('Hardware','PTTAfter',Settings._pttafter); + + Ini.SetString('PacketCluster','TELNEThost', Settings._clusterhost); + Ini.SetInteger('PacketCluster','TELNETport', Settings._clustertelnetport); + Ini.SetInteger('PacketCluster','TELNETlinebreak', Settings._clusterlinebreakTELNET); + Ini.SetBoolean('PacketCluster','TELNETlocalecho',Settings._clusterlocalechoTELNET); + Ini.SetInteger('PacketCluster','COMlinebreak', Settings._clusterlinebreakCOM); + Ini.SetBoolean('PacketCluster','COMlocalecho',Settings._clusterlocalechoCOM); + + Ini.SetString('Z-Link','TELNEThost', Settings._zlinkhost); + Ini.SetInteger('Z-Link','TELNETlinebreak', Settings._zlinklinebreakTELNET); + Ini.SetBoolean('Z-Link','TELNETlocalecho',Settings._zlinklocalechoTELNET); + Ini.SetInteger('Z-Link','COMlinebreak', Settings._zlinklinebreakCOM); + Ini.SetBoolean('Z-Link','COMlocalecho',Settings._zlinklocalechoCOM); + + Ini.SetBoolean('Z-Link','SyncSerial',Settings._syncserial); + + Ini.SetInteger('Hardware','UseCWPort',Settings._specificcwport); + Ini.SetInteger('Hardware','CWLPTPort',Settings._lptnr); + //Ini.SetBoolean('Hardware','CWUseData',Settings._usedata); + Ini.SetBoolean('Hardware','CWInvLogic', Settings._reverselogic); + Ini.SetBoolean('Hardware','RigInvLogic', Settings._rigreverse); + Ini.SetBoolean('Hardware','PTTInvLogic', Settings._pttreverse); + + Ini.SetInteger('Preferences','FontSize', Settings._mainfontsize); + Ini.SetInteger('Preferences','RowHeight', Settings._mainrowheight); + + StrDispose(P); + + OpList.SaveToFile(MAINPATH+'ZLOG.OP'); + +end; + +procedure TOptions.LoadIniFileBS; +var B : TBand; + M : TMode; +begin + Settings._bsminfreqarray[b19, mCW] := Ini.GetInteger('BandScope','1.9MHzCWmin', 1800); + Settings._bsminfreqarray[b19, mSSB] := Ini.GetInteger('BandScope','1.9MHzPHmin', 1800); + Settings._bsmaxfreqarray[b19, mCW] := Ini.GetInteger('BandScope','1.9MHzCWmax', 1950); + Settings._bsmaxfreqarray[b19, mSSB] := Ini.GetInteger('BandScope','1.9MHzPHmax', 1950); + Settings._bsminfreqarray[b35, mCW] := Ini.GetInteger('BandScope','3.5MHzCWmin', 3500); + Settings._bsminfreqarray[b35, mSSB] := Ini.GetInteger('BandScope','3.5MHzPHmin', 3500); + Settings._bsmaxfreqarray[b35, mCW] := Ini.GetInteger('BandScope','3.5MHzCWmax', 3800); + Settings._bsmaxfreqarray[b35, mSSB] := Ini.GetInteger('BandScope','3.5MHzPHmax', 3800); + Settings._bsminfreqarray[b7, mCW] := Ini.GetInteger('BandScope','7MHzCWmin', 7000); + Settings._bsminfreqarray[b7, mSSB] := Ini.GetInteger('BandScope','7MHzPHmin', 7000); + Settings._bsmaxfreqarray[b7, mCW] := Ini.GetInteger('BandScope','7MHzCWmax', 7200); + Settings._bsmaxfreqarray[b7, mSSB] := Ini.GetInteger('BandScope','7MHzPHmax', 7200); + Settings._bsminfreqarray[b10, mCW] := Ini.GetInteger('BandScope','10MHzCWmin', 10100); + Settings._bsminfreqarray[b10, mSSB] := Ini.GetInteger('BandScope','10MHzPHmin', 10100); + Settings._bsmaxfreqarray[b10, mCW] := Ini.GetInteger('BandScope','10MHzCWmax', 10150); + Settings._bsmaxfreqarray[b10, mSSB] := Ini.GetInteger('BandScope','10MHzPHmax', 10150); + Settings._bsminfreqarray[b14, mCW] := Ini.GetInteger('BandScope','14MHzCWmin', 14000); + Settings._bsminfreqarray[b14, mSSB] := Ini.GetInteger('BandScope','14MHzPHmin', 14000); + Settings._bsmaxfreqarray[b14, mCW] := Ini.GetInteger('BandScope','14MHzCWmax', 14350); + Settings._bsmaxfreqarray[b14, mSSB] := Ini.GetInteger('BandScope','14MHzPHmax', 14350); + Settings._bsminfreqarray[b18, mCW] := Ini.GetInteger('BandScope','18MHzCWmin', 18060); + Settings._bsminfreqarray[b18, mSSB] := Ini.GetInteger('BandScope','18MHzPHmin', 18060); + Settings._bsmaxfreqarray[b18, mCW] := Ini.GetInteger('BandScope','18MHzCWmax', 18170); + Settings._bsmaxfreqarray[b18, mSSB] := Ini.GetInteger('BandScope','18MHzPHmax', 18170); + Settings._bsminfreqarray[b21, mCW] := Ini.GetInteger('BandScope','21MHzCWmin', 21000); + Settings._bsminfreqarray[b21, mSSB] := Ini.GetInteger('BandScope','21MHzPHmin', 21000); + Settings._bsmaxfreqarray[b21, mCW] := Ini.GetInteger('BandScope','21MHzCWmax', 21450); + Settings._bsmaxfreqarray[b21, mSSB] := Ini.GetInteger('BandScope','21MHzPHmax', 21450); + Settings._bsminfreqarray[b24, mCW] := Ini.GetInteger('BandScope','24MHzCWmin', 24890); + Settings._bsminfreqarray[b24, mSSB] := Ini.GetInteger('BandScope','24MHzPHmin', 24890); + Settings._bsmaxfreqarray[b24, mCW] := Ini.GetInteger('BandScope','24MHzCWmax', 24990); + Settings._bsmaxfreqarray[b24, mSSB] := Ini.GetInteger('BandScope','24MHzPHmax', 24990); + Settings._bsminfreqarray[b28, mCW] := Ini.GetInteger('BandScope','28MHzCWmin', 28000); + Settings._bsminfreqarray[b28, mSSB] := Ini.GetInteger('BandScope','28MHzPHmin', 28000); + Settings._bsmaxfreqarray[b28, mCW] := Ini.GetInteger('BandScope','28MHzCWmax', 28500); + Settings._bsmaxfreqarray[b28, mSSB] := Ini.GetInteger('BandScope','28MHzPHmax', 28500); + + Settings._bsminfreqarray[b50, mCW] := Ini.GetInteger('BandScope','50MHzCWmin', 50000); + Settings._bsminfreqarray[b50, mSSB] := Ini.GetInteger('BandScope','50MHzPHmin', 50000); + Settings._bsmaxfreqarray[b50, mCW] := Ini.GetInteger('BandScope','50MHzCWmax', 51000); + Settings._bsmaxfreqarray[b50, mSSB] := Ini.GetInteger('BandScope','50MHzPHmax', 51000); + Settings._bsminfreqarray[b144, mCW] := Ini.GetInteger('BandScope','144MHzCWmin', 144000); + Settings._bsminfreqarray[b144, mSSB] := Ini.GetInteger('BandScope','144MHzPHmin', 144600); + Settings._bsmaxfreqarray[b144, mCW] := Ini.GetInteger('BandScope','144MHzCWmax', 145600); + Settings._bsmaxfreqarray[b144, mSSB] := Ini.GetInteger('BandScope','144MHzPHmax', 145600); + Settings._bsminfreqarray[b430, mCW] := Ini.GetInteger('BandScope','430MHzCWmin', 430000); + Settings._bsminfreqarray[b430, mSSB] := Ini.GetInteger('BandScope','430MHzPHmin', 430000); + Settings._bsmaxfreqarray[b430, mCW] := Ini.GetInteger('BandScope','430MHzCWmax', 434000); + Settings._bsmaxfreqarray[b430, mSSB] := Ini.GetInteger('BandScope','430MHzPHmax', 434000); + + Settings._bsminfreqarray[b1200, mCW] := Ini.GetInteger('BandScope','1200MHzCWmin', 1294000); + Settings._bsminfreqarray[b1200, mSSB] := Ini.GetInteger('BandScope','1200MHzPHmin', 1294600); + Settings._bsmaxfreqarray[b1200, mCW] := Ini.GetInteger('BandScope','1200MHzCWmax', 1294500); + Settings._bsmaxfreqarray[b1200, mSSB] := Ini.GetInteger('BandScope','1200MHzPHmax', 1295000); + Settings._bsminfreqarray[b2400, mCW] := Ini.GetInteger('BandScope','2400MHzCWmin', 2400000); + Settings._bsminfreqarray[b2400, mSSB] := Ini.GetInteger('BandScope','2400MHzPHmin', 2400000); + Settings._bsmaxfreqarray[b2400, mCW] := Ini.GetInteger('BandScope','2400MHzCWmax', 2410000); + Settings._bsmaxfreqarray[b2400, mSSB] := Ini.GetInteger('BandScope','2400MHzPHmax', 2410000); + Settings._bsminfreqarray[b5600, mCW] := Ini.GetInteger('BandScope','5600MHzCWmin', 5600000); + Settings._bsminfreqarray[b5600, mSSB] := Ini.GetInteger('BandScope','5600MHzPHmin', 5600000); + Settings._bsmaxfreqarray[b5600, mCW] := Ini.GetInteger('BandScope','5600MHzCWmax', 5610000); + Settings._bsmaxfreqarray[b5600, mSSB] := Ini.GetInteger('BandScope','5600MHzPHmax', 5610000); + + for B := b19 to HiBand do + for M := mFM to mOther do + begin + Settings._bsminfreqarray[B, M] := Settings._bsminfreqarray[B, mSSB]; + Settings._bsmaxfreqarray[B, M] := Settings._bsmaxfreqarray[B, mSSB]; + end; +end; + +procedure TOptions.LoadIniFile; +var i : integer; + B : TBand; + P : PChar; + S : string[255]; +begin + P := StrAlloc(256); + + LoadIniFileBS; + + Settings._pcname := Ini.GetString('Z-Link', 'PCName', ''); + Settings._multistationwarning := Ini.GetBoolean('Preferences', 'MultiStationWarning', True); + + Settings._recrigfreq := Ini.GetBoolean('Rig', 'RecordFreqInMemo', False); + Settings._bsexpire := Ini.GetInteger('Misc', 'BandScopeExpire', 60); + Settings._spotexpire := Ini.GetInteger('Misc', 'SpotExpire', 90); + + Settings._savewhennocw := Ini.GetBoolean('Preferences', 'SaveWhenNoCW', False); + Settings._jmode := Ini.GetBoolean('Preferences', 'JMode', False); + Settings._movetomemo := Ini.GetBoolean('Preferences', 'MoveToMemoWithSpace', False); + + Settings._searchafter := Ini.GetInteger('Misc', 'SearchAfter', 0); + Settings._maxsuperhit := Ini.GetInteger('Misc', 'MaxSuperHit', 100); + Settings._renewbythread := Ini.GetBoolean('Misc', 'UpdateUsingThread', False); + Settings._displaydatepartialcheck := Ini.GetBoolean('Misc', 'DisplayDatePartialCheck', False); + + Settings._banddatamode := Ini.GetInteger('Rig', 'BandDataMode', 1); + Settings._dontallowsameband := Ini.GetBoolean('Rig', 'DontAllowSameBand', False); + Settings._autobandmap := Ini.GetBoolean('Rig', 'AutoBandMap', False); + Settings._AFSK := Ini.GetBoolean('Rig', 'UseAFSK', False); + + Settings._BandData[b19] := Ini.GetInteger('Hardware','BandData1.9MHz', 0); + Settings._BandData[b35] := Ini.GetInteger('Hardware','BandData3.5MHz', 1); + Settings._BandData[b7] := Ini.GetInteger('Hardware','BandData7MHz', 2); + Settings._BandData[b10] := Ini.GetInteger('Hardware','BandData10MHz', 3); + Settings._BandData[b14] := Ini.GetInteger('Hardware','BandData14MHz', 4); + Settings._BandData[b18] := Ini.GetInteger('Hardware','BandData18MHz', 5); + Settings._BandData[b21] := Ini.GetInteger('Hardware','BandData21MHz', 6); + Settings._BandData[b24] := Ini.GetInteger('Hardware','BandData24MHz', 7); + Settings._BandData[b28] := Ini.GetInteger('Hardware','BandData28MHz', 8); + Settings._BandData[b50] := Ini.GetInteger('Hardware','BandData50MHz', 9); + Settings._BandData[b144] := Ini.GetInteger('Hardware','BandData144MHz', 10); + Settings._BandData[b430] := Ini.GetInteger('Hardware','BandData430MHz', 11); + Settings._BandData[b1200] := Ini.GetInteger('Hardware','BandData1200MHz', 12); + Settings._BandData[b2400] := Ini.GetInteger('Hardware','BandData2400MHz', 13); + Settings._BandData[b5600] := Ini.GetInteger('Hardware','BandData5600MHz', 14); + Settings._BandData[b10g] := Ini.GetInteger('Hardware','BandData10GHz', 15); + + + Settings._activebands[b19] := Ini.GetBoolean('Profiles', 'Active1.9MHz', True); + Settings._activebands[b35] := Ini.GetBoolean('Profiles', 'Active3.5MHz', True); + Settings._activebands[b7] := Ini.GetBoolean('Profiles', 'Active7MHz', True); + Settings._activebands[b10] := Ini.GetBoolean('Profiles', 'Active10MHz', True); + Settings._activebands[b14] := Ini.GetBoolean('Profiles', 'Active14MHz', True); + Settings._activebands[b18] := Ini.GetBoolean('Profiles', 'Active18MHz', True); + Settings._activebands[b21] := Ini.GetBoolean('Profiles', 'Active21MHz', True); + Settings._activebands[b24] := Ini.GetBoolean('Profiles', 'Active24MHz', True); + Settings._activebands[b28] := Ini.GetBoolean('Profiles', 'Active28MHz', True); + Settings._activebands[b50] := Ini.GetBoolean('Profiles', 'Active50MHz', True); + Settings._activebands[b144] := Ini.GetBoolean('Profiles', 'Active144MHz', True); + Settings._activebands[b430] := Ini.GetBoolean('Profiles', 'Active430MHz', True); + Settings._activebands[b1200] := Ini.GetBoolean('Profiles', 'Active1200MHz', True); + Settings._activebands[b2400] := Ini.GetBoolean('Profiles', 'Active2400MHz', True); + Settings._activebands[b5600] := Ini.GetBoolean('Profiles', 'Active5600MHz', True); + Settings._activebands[b10g] := Ini.GetBoolean('Profiles', 'Active10GHz', True); + + S := Ini.GetString('Profiles', 'Power', ''); + B := b19; + if Length(S) > 13 then + System.Delete(S, 14, 255); + for i := 1 to length(S) do + begin + case UpCase(S[i]) of + 'P' : CurrentPower[B] := pwrP; + 'L' : CurrentPower[B] := pwrL; + 'M' : CurrentPower[B] := pwrM; + 'H' : CurrentPower[B] := pwrH; + end; + repeat + inc(B); + until NotWARC(B); + end; + + Settings._multiop := Ini.GetInteger('Categories','Operator2', 0); + Settings._multistation := Ini.GetBoolean('Categories','MultiStn',False); + Settings._band := Ini.GetInteger('Categories', 'Band', 0); + Settings._mode := Ini.GetInteger('Categories', 'Mode', 0); + Settings._txnr := Ini.GetInteger('Categories', 'TXNumber', 0); + Settings._contestmenuno := Ini.GetInteger('Categories', 'Contest', 1); + Settings._mycall := Ini.GetString('Categories', 'MyCall', 'Your call sign'); + + Settings._backuppath := Ini.GetString('Preferences', 'BackUpPath', ''); + Settings._cfgdatpath := Ini.GetString('Preferences', 'CFGDATPath', ''); + Settings._logspath := Ini.GetString('Preferences', 'LogsPath', ''); + + + Settings._allowdupe := Ini.GetBoolean('Preferences', 'AllowDupe', False); + Settings._saveevery := Ini.GetInteger('Preferences', 'SaveEvery', 3); + + + Settings._entersuperexchange := Ini.GetBoolean('Preferences', 'AutoEnterSuper', False); + + Settings._countdown := Ini.GetBoolean('Preferences', 'CountDown', False); + Settings._qsycount := Ini.GetBoolean('Preferences', 'QSYCount', False); + + Settings._prov := Ini.GetString('Profiles', 'Province/State', ''); + Settings._city := Ini.GetString('Profiles', 'City', ''); + Settings._cqzone := Ini.GetString('Profiles', 'CQZone', ''); + Settings._iaruzone := Ini.GetString('Profiles', 'IARUZone', ''); + + Settings._clusterport := Ini.GetInteger('Hardware','PacketCluster', 0); + + Settings._rig1port := Ini.GetInteger('Hardware','Rig', 0); + Settings._ritclear := Ini.GetBoolean('Hardware','RitClear',False); + Settings._rig1name := Ini.GetInteger('Hardware','RigName', 0); + + Settings._rig2port := Ini.GetInteger('Hardware','Rig2', 0); + Settings._rig2name := Ini.GetInteger('Hardware','RigName2', 0); + + Settings._zlinkport := Ini.GetInteger('Hardware','Z-Link', 0); + + Settings._clusterbaud := Ini.GetInteger('Hardware','PacketClusterBaud', 6); + Settings._rigbaud := Ini.GetInteger('Hardware','RigBaud', 6); + Settings._icombaudrate := Ini.GetInteger('Hardware', 'IcomBaudRate', 1); + + Settings._zlinkbaud := Ini.GetInteger('Hardware','Z-LinkBaud', 6); + + Settings._pttenabled := Ini.GetBoolean('Hardware','PTTEnabled', False); + Settings._pttbefore := Ini.GetInteger('Hardware','PTTBefore', 25); + Settings._pttafter := Ini.GetInteger('Hardware','PTTAfter', 0); + + Settings._clusterhost := Ini.GetString('PacketCluster','TELNEThost', ''); + Settings._clustertelnetport := Ini.GetInteger('PacketCluster','TELNETport',23); + + Settings._clusterlinebreakTELNET := Ini.GetInteger('PacketCluster','TELNETlinebreak',0); + Settings._clusterlocalechoTELNET := Ini.GetBoolean('PacketCluster','TELNETlocalecho',False); + Settings._clusterlinebreakCOM := Ini.GetInteger('PacketCluster','COMlinebreak',0); + Settings._clusterlocalechoCOM := Ini.GetBoolean('PacketCluster','COMlocalecho',False); + + Settings._zlinkhost := Ini.GetString('Z-Link','TELNEThost', ''); + Settings._zlinklinebreakTELNET := Ini.GetInteger('Z-Link','TELNETlinebreak',0); + Settings._zlinklocalechoTELNET := Ini.GetBoolean('Z-Link','TELNETlocalecho',False); + Settings._zlinklinebreakCOM := Ini.GetInteger('Z-Link','COMlinebreak',0); + Settings._zlinklocalechoCOM := Ini.GetBoolean('Z-Link','COMlocalecho',False); + + Settings._syncserial := Ini.GetBoolean('Z-Link','SyncSerial',False); + + Settings.CW._interval := Ini.GetInteger('CW','Interval',1); + Settings.CW._speed := Ini.GetInteger('CW','Speed',25); + Settings.CW._weight := Ini.GetInteger('CW','Weight',50); + Settings.CW._cqmax := Ini.GetInteger('CW','CQMax',15); + Settings.CW._tonepitch := Ini.GetInteger('CW','Pitch',800); + Settings.CW._paddlereverse := Ini.GetBoolean('CW','PaddleReverse',False); + Settings.CW._paddle := Ini.GetBoolean('CW','PaddleEnabled',True); + Settings.CW._FIFO := Ini.GetBoolean('CW','FIFO',True); + Settings._switchcqsp := Ini.GetBoolean('CW','CQSP',False); + Settings.CW._sidetone := Ini.GetBoolean('CW','SideTone',True); + Settings.CW._cqrepeat := Ini.GetFloat('CW','CQRepeat',2.0); + Settings._sendfreq := Ini.GetFloat('Rig','SendFreq', 1.0); + S := Ini.GetString('CW', 'Zero', 'O'); + Settings.CW._zero := S[1]; + S := Ini.GetString('CW', 'One', 'A'); + Settings.CW._one := S[1]; + S := Ini.GetString('CW', 'Nine', 'N'); + Settings.CW._nine := S[1]; + + Settings.CW.CWStrBank[1,1] := Ini.GetString('CW','F1', 'CQ TEST $M $M TEST'); + Settings.CW.CWStrBank[1,2] := Ini.GetString('CW','F2', '$C 5NN$X'); + Settings.CW.CWStrBank[1,3] := Ini.GetString('CW','F3', 'TU $M TEST'); + Settings.CW.CWStrBank[1,4] := Ini.GetString('CW','F4', 'QSO B4 TU'); + Settings.CW.CWStrBank[1,5] := Ini.GetString('CW','F5', 'NR?'); + + Settings.CW.CWStrBank[3,1] := Ini.GetString('RTTY','F1', 'CQ CQ CQ TEST $M $M $M TEST K'); + Settings.CW.CWStrBank[3,2] := Ini.GetString('RTTY','F2', '$C DE $M 599$X 599$X BK'); + Settings.CW.CWStrBank[3,3] := Ini.GetString('RTTY','F3', 'TU DE $M TEST'); + Settings.CW.CWStrBank[3,4] := Ini.GetString('RTTY','F4', 'QSO B4 TU'); + Settings.CW.CWStrBank[3,5] := Ini.GetString('RTTY','F5', 'NR? NR? AGN BK'); + + Settings._transverter1 := Ini.GetBoolean('Hardware', 'Transverter1', False); + Settings._transverteroffset1 := Ini.GetInteger('Hardware', 'Transverter1Offset',0); + Settings._transverter2 := Ini.GetBoolean('Hardware', 'Transverter2', False); + Settings._transverteroffset2 := Ini.GetInteger('Hardware', 'Transverter2Offset',0); + + for i := 6 to maxstr do + begin + StrPCopy(P, 'F'+IntToStr(i)); + Settings.CW.CWStrBank[1,i] := Ini.GetString('CW',P, ''); + end; + + for i := 6 to maxstr do + begin + StrPCopy(P, 'F'+IntToStr(i)); + Settings.CW.CWStrBank[3,i] := Ini.GetString('RTTY',P, ''); + end; + + for i := 1 to maxstr do + begin + StrPCopy(P, 'F'+IntToStr(i)+'B'); + Settings.CW.CWStrBank[2,i] := Ini.GetString('CW',P, ''); + end; + + for i := 11 to 12 do + begin + StrPCopy(P, 'F'+IntToStr(i)); + Settings.CW.CWStrBank[1,i] := Ini.GetString('CW',P, ''); + end; + + for i := 11 to 12 do + begin + StrPCopy(P, 'F'+IntToStr(i)); + Settings.CW.CWStrBank[3,i] := Ini.GetString('RTTY',P, ''); + end; + + for i := 11 to 12 do + begin + StrPCopy(P, 'F'+IntToStr(i)+'B'); + Settings.CW.CWStrBank[2,i] := Ini.GetString('CW',P, ''); + end; + + Settings.CW.CQStrBank[1] := Ini.GetString('CW','CQ2',''); + Settings.CW.CQStrBank[2] := Ini.GetString('CW','CQ3',''); + Settings.CW._fixwpm := Ini.GetInteger('CW', 'FixedSpeed', 20); + + for i := 1 to maxstr do + begin + StrPCopy(P, 'F'+IntToStr(i)); + Settings._soundfiles[i] := Ini.GetString('Voice',P, 'select'); + end; + Settings._soundfiles[9] := Ini.GetString('Voice','CQ2', 'select'); + Settings._soundfiles[10] := Ini.GetString('Voice','CQ3', 'select'); + + for i := 1 to maxstr do + begin + StrPCopy(P, 'F'+IntToStr(i)+'_Comment'); + Settings._soundcomments[i] := Ini.GetString('Voice',P, ''); + end; + Settings._soundcomments[9] := Ini.GetString('Voice','CQ2_Comment', ''); + Settings._soundcomments[10] := Ini.GetString('Voice','CQ3_Comment', ''); + + Settings._specificcwport := Ini.GetInteger('Hardware','UseCWPort',0{ $037A}); + Settings._lptnr := Ini.GetInteger('Hardware','CWLPTPort', 1); + //Settings._usedata := Ini.GetBoolean('Hardware','CWUseData',false); + + Settings._reverselogic := Ini.GetBoolean('Hardware', 'CWInvLogic', false); + Settings._rigreverse := Ini.GetBoolean('Hardware','RigInvLogic', false); + Settings._pttreverse := Ini.GetBoolean('Hardware','PTTInvLogic', false); + + Settings._mainfontsize := Ini.GetInteger('Preferences', 'FontSize',9); + Settings._mainrowheight := Ini.GetInteger('Preferences', 'RowHeight',18); + + Settings.CW._spacefactor := Ini.GetInteger('CW','SpaceFactor',100); + Settings.CW._eispacefactor := Ini.GetInteger('CW','EISpaceFactor',100); + + StrDispose(P); +end; + +procedure TOptions.ImplementSettings(_OnCreate : boolean); +var M : TMenuItem; + i, j : integer; + B : TBand; +begin + if _OnCreate = False then + begin + for B := b19 to HiBand do + MainForm.BandMenu.Items[ord(B)].Enabled := Settings._activebands[B]; + if Settings._band > 0 then // single band + SetBand(Settings._band); // resets the bandmenu.items.enabled for the single band entry + end; + if MyContest <> nil then + Main.MyContest.SameExchange := Settings._sameexchange; + + RigControl.SetBandMask; + //BGK32LIB.UpdateDataPort; + + if Settings._zlinkport in [1..6] then // zlinkport rs232c + begin + //ZLinkForm.Transparent := True; + // no rs232c anymore + end; + + + CommForm.EnableConnectButton(Settings._clusterport = 7); + + CommForm.ImplementOptions; + ZLinkForm.ImplementOptions; + +// ver 1,3 + //BGK32LIB.SetCWPortDirect(Settings._cwport); + if Settings._lptnr in [1..LPTMAX] then + begin + RigControl.ZCom3.Disconnect; + BGK32LIB.KeyingPort := tkpParallel; + BGK32LIB.SetCWPortDirect(LPTport[Settings._lptnr]); + if Settings._specificcwport > 0 then + BGK32LIB.SetCWPortDirect(Settings._specificcwport); + if Settings._reverselogic then + BGK32LIB.ReverseLogicKeying(True); + if Settings._rigreverse then + BGK32LIB.ReverseRigOut(True); + if Settings._pttreverse then + BGK32LIB.ReversePTTOut(True); + + if Settings.CW._paddle then + begin + BGK32LIB.SetPaddlePortDirect(LPTport[Settings._lptnr]-1); + if PaddleThread = nil then // ver 1.3 + PaddleThread := TPaddleThread.Create(False); + end + else + begin + if PaddleThread <> nil then + PaddleThread.Terminate; + BGK32LIB.SetPaddlePortDirect($00); + end; + + BGK32LIB.SetPTTportDirect(LPTport[Settings._lptnr] - 2); + end + else // Settings._lptnr <> parallel ports + begin + Case Settings._lptnr of + 11 : begin + RigControl.SetSerialCWKeying(1); + BGK32LIB.KeyingPort := tkpSerial1; + end; + 12 : begin + RigControl.SetSerialCWKeying(2); + BGK32LIB.KeyingPort := tkpSerial2; + end; + 21 : begin // usb + BGK32LIB.KeyingPort := tkpUSB; + (* ver 2.2a + if Settings.CW._paddle then + begin + if PaddleThread = nil then + PaddleThread := TPaddleThread.Create(True); + end + else + begin + if PaddleThread <> nil then + PaddleThread.Terminate; + BGK32LIB.SetPaddlePortDirect($00); + end; + *) + + if Settings.CW._paddle then + begin + BGK32LIB.SetPaddlePortDirect($99); + if PaddleThread = nil then + PaddleThread := TPaddleThread.Create(True); + end + else + begin + BGK32LIB.SetPaddlePortDirect($00); + if PaddleThread = nil then + PaddleThread := TPaddleThread.Create(True); + end; + + end; + end; + end; + + RigControl.ImplementOptions; + BGK32LIB.SetPTTDelay(Settings._pttbefore, Settings._pttafter); + BGK32LIB.SetPTT(Settings._pttenabled); + + //SetBand(Settings._band); + SetMode(Settings._mode); + SetPaddleReverse(Settings.CW._paddlereverse); + SetSpeed(Settings.CW._speed); + SetSideTone(Settings.CW._sidetone); + SetWeight(Settings.CW._weight); + SetCQMax(Settings.CW._cqmax); + SetCQRepeat(Settings.CW._cqrepeat); + SetSendFreq(Settings._sendfreq); + SetTonePitch(Settings.CW._tonepitch); + BGK32LIB.SetRandCQStr(SetStr(Settings.CW.CQStrBank[1], CurrentQSO), + SetStr(Settings.CW.CQStrBank[2], CurrentQSO)); + + BGK32LIB.SetSpaceFactor(Settings.CW._spacefactor); + BGK32LIB.SetEISpaceFactor(Settings.CW._eispacefactor); + + AllowDupe := Settings._allowdupe; + + if Settings._backuppath = '' then + MainForm.BackUp1.Enabled := False + else + MainForm.BackUp1.Enabled := True; + + if Settings._multistation = True then + Settings._txnr := 2; + + + if not(_OnCreate) then + begin + j := MainForm.OpMenu.Items.Count; + if j > 0 then + for i := 1 to j do + MainForm.OpMenu.Items.Delete(0); + if OpList.Count > 0 then + begin + M := TMenuItem.Create(Self); + M.Caption := 'Clear'; + M.OnClick := MainForm.OpMenuClick; + MainForm.OpMenu.Items.Add(M); + for i := 0 to OpList.Count-1 do + begin + M := TMenuItem.Create(Self); + M.Caption := TrimRight(Copy(OpList.Strings[i], 1, 20)); + M.OnClick := MainForm.OpMenuClick; + MainForm.OpMenu.Items.Add(M); + end; + end; + end; +end; + +procedure TOptions.RenewSettings; +var R : double; + i,j : integer; +begin + + Settings._recrigfreq := cbRecordRigFreq.Checked; + Settings._multistation := cbMultiStn.Checked; + Settings._savewhennocw := cbSaveWhenNoCW.Checked; + Settings._jmode := cbJMode.Checked; + Settings._searchafter := rgSearchAfter.ItemIndex; + Settings._renewbythread := cbUpdateThread.Checked; + Settings._displaydatepartialcheck := cbDisplayDatePartialCheck.Checked; + + Settings._banddatamode := rgBandData.ItemIndex; + Settings._AFSK := cbAFSK.Checked; + Settings._maxsuperhit := spMaxSuperHit.Value; + + Settings._activebands[b19] := act19.Checked; + Settings._activebands[b35] := act35.Checked; + Settings._activebands[b7] := act7.Checked; + Settings._activebands[b10] := act10.Checked; + Settings._activebands[b14] := act14.Checked; + Settings._activebands[b18] := act18.Checked; + Settings._activebands[b21] := act21.Checked; + Settings._activebands[b24] := act24.Checked; + Settings._activebands[b28] := act28.Checked; + Settings._activebands[b50] := act50.Checked; + Settings._activebands[b144] := act144.Checked; + Settings._activebands[b430] := act430.Checked; + Settings._activebands[b1200]:= act1200.Checked; + Settings._activebands[b2400]:= act2400.Checked; + Settings._activebands[b5600]:= act5600.Checked; + Settings._activebands[b10g] := act10g.Checked; + + OpList.Free; + OpList := TStringList.Create; + OpList.Assign(OpListBox.Items); + +// Settings._band := BandGroup.ItemIndex; + case BandGroup.ItemIndex of + 0..3 : Settings._band := BandGroup.ItemIndex; + 4 : Settings._band := BandGroup.ItemIndex+1; + 5 : Settings._band := BandGroup.ItemIndex+2; + 6..13 : Settings._band := BandGroup.ItemIndex+3; + end; + + + + Settings._mode := ModeGroup.ItemIndex; + //Settings._multiop := MultiOpRadioBtn.Checked; + + Settings._prov := ProvEdit.Text; + Settings._city := CityEdit.Text; + Settings._cqzone := CQZoneEdit.Text; + Settings._iaruzone := IARUZoneEdit.Text; + + { + Settings.CW.CWStrBank[1,1] := Edit1.Text; + Settings.CW.CWStrBank[1,2] := Edit2.Text; + Settings.CW.CWStrBank[1,3] := Edit3.Text; + Settings.CW.CWStrBank[1,4] := Edit4.Text; + Settings.CW.CWStrBank[1,5] := Edit5.Text; + Settings.CW.CWStrBank[1,6] := Edit6.Text; + Settings.CW.CWStrBank[1,7] := Edit7.Text; + Settings.CW.CWStrBank[1,8] := Edit8.Text; + + Settings.CW.CQStrBank[0] := Edit1.Text; + } + + for i := 1 to maxbank do + for j := 1 to maxstr do + Settings.CW.CWStrBank[i,j] := TempCWStrBank[i,j]; + Settings.CW.CQStrBank[0] := TempCWStrBank[1,1]; + + Settings.CW.CQStrBank[1] := Edit9.Text; + Settings.CW.CQStrBank[2] := Edit10.Text; + + for i := 1 to 10 do + Settings._SoundFiles[i]:= TempVoiceFiles[i]; + + Settings._bsexpire := spBSExpire.Value; + Settings._spotexpire := spSpotExpire.Value; + + Settings._icombaudrate := cbIcomBaudRate.ItemIndex; + + Settings._SoundComments[1] := vEdit1.Text; + Settings._SoundComments[2] := vEdit2.Text; + Settings._SoundComments[3] := vEdit3.Text; + Settings._SoundComments[4] := vEdit4.Text; + Settings._SoundComments[5] := vEdit5.Text; + Settings._SoundComments[6] := vEdit6.Text; + Settings._SoundComments[7] := vEdit7.Text; + Settings._SoundComments[8] := vEdit8.Text; + Settings._SoundComments[9] := vEdit9.Text; + Settings._SoundComments[10] := vEdit10.Text; + + try + R := Settings.CW._cqrepeat; + Settings.CW._cqrepeat := StrToFloat(CQRepEdit.Text); + except + on EConvertError do + Settings.CW._cqrepeat := R; + end; + + try + R := Settings._sendfreq; + Settings._sendfreq := StrToFloat(SendFreqEdit.Text); + except + on EConvertError do + Settings._sendfreq := R; + end; + + Settings.CW._speed := SpeedBar.Position; + Settings.CW._weight := WeightBar.Position; + Settings.CW._paddlereverse := PaddleCheck.Checked; + Settings.CW._sidetone := SideToneCheck.Checked; + Settings.CW._FIFO := FIFOCheck.Checked; + Settings.CW._tonepitch := ToneSpinEdit.Value; + Settings.CW._cqmax := CQMaxSpinEdit.Value; + Settings.CW._paddle := PaddleEnabledCheck.Checked; + + Settings._switchcqsp := cbCQSP.Checked; + if Length(AbbrevEdit.Text) >= 3 then + begin + Settings.CW._zero := AbbrevEdit.Text[1]; + Settings.CW._one := AbbrevEdit.Text[2]; + Settings.CW._nine := AbbrevEdit.Text[3]; + end; + + Settings._clusterport := ClusterCombo.ItemIndex; + Settings._clusterbaud := ClusterCOMSet.BaudCombo.ItemIndex; + Settings._rig1port := Rig1PortCombo.ItemIndex; + Settings._ritclear := cbRITClear.Checked; + Settings._rig1name := Rig1Combo.ItemIndex; + + Settings._rig2port := Rig2PortCombo.ItemIndex; + Settings._rig2name := Rig2Combo.ItemIndex; + + + Settings._clusterhost := ClusterTelnetSet.HostName.Text; + Settings._clustertelnetport := ClusterTelnetSet.spPortNumber.Value; + Settings._clusterlinebreakTELNET := ClusterTelnetSet.LineBreak.ItemIndex; + Settings._clusterlocalechoTELNET := ClusterTelnetSet.LocalEcho.Checked; + Settings._clusterlinebreakCOM := ClusterCOMSet.LineBreak.ItemIndex; + Settings._clusterlocalechoCOM := ClusterCOMSet.LocalEcho.Checked; + + Settings._zlinkport := ZLinkCombo.ItemIndex; + //Settings._zlinkbaud := ZLinkCOMSet.BaudCombo.ItemIndex; + + Settings._zlinkhost := ZLinkTelnetSet.HostName.Text; + Settings._zlinklinebreakTELNET := ZLinkTelnetSet.LineBreak.ItemIndex; + Settings._zlinklocalechoTELNET := ZLinkTelnetSet.LocalEcho.Checked; + //Settings._zlinklinebreakCOM := ZLinkCOMSet.LineBreak.ItemIndex; + //Settings._zlinklocalechoCOM := ZLinkCOMSet.LocalEcho.Checked; + + Settings._pttenabled := PTTEnabledCheckBox.Checked; + Settings._saveevery := SaveEvery.Value; + Settings._countdown := cbCountDown.Checked; + Settings._qsycount := cbQSYCount.Checked; + + try + i := Settings._pttbefore; + Settings._pttbefore := StrToInt(BeforeEdit.Text); + except + on EConvertError do + Settings._pttbefore := i; + end; + + try + i := Settings._pttafter; + Settings._pttafter := StrToInt(AfterEdit.Text); + except + on EConvertError do + Settings._pttafter := i; + end; + +{ i := HexStrToInt(CWPortEdit.Text); + if i > 0 then + Settings._cwport := i; } + + if rbLPT1.Checked then + Settings._lptnr := 1; + if rbLPT2.Checked then + Settings._lptnr := 2; + if rbCOM1.Checked then + Settings._lptnr := 11; + if rbCOM2.Checked then + Settings._lptnr := 12; + if rbUSB.Checked then + Settings._lptnr := 21; + + settings._sentstr := SentEdit.Text; + + Settings._backuppath := BackUpPathEdit.Text; + Settings._cfgdatpath := edCFGDATPath.Text; + Settings._logspath := edLogsPath.Text; + + + Settings._allowdupe := AllowDupeCheckBox.Checked; + Settings._sameexchange := cbDispExchange.Checked; + Settings._entersuperexchange := cbAutoEnterSuper.Checked; + + Settings._transverter1 := cbTransverter1.Checked; + Settings._transverter2 := cbTransverter2.Checked; + Settings._autobandmap := cbAutoBandMap.Checked; + +end; + +procedure TOptions.OKButtonClick(Sender: TObject); +begin + RenewSettings; + + ImplementSettings(False); + + MainForm.RenewCWToolBar; + + MainForm.RenewVoiceToolBar; + + Close; + MainForm.LastFocus.SetFocus; +end; + +procedure TOptions.RenewCWStrBankDisp; +begin + Edit1.Text := TempCWStrBank[TempCurrentBank,1]; + Edit2.Text := TempCWStrBank[TempCurrentBank,2]; + Edit3.Text := TempCWStrBank[TempCurrentBank,3]; + Edit4.Text := TempCWStrBank[TempCurrentBank,4]; + Edit5.Text := TempCWStrBank[TempCurrentBank,5]; + Edit6.Text := TempCWStrBank[TempCurrentBank,6]; + Edit7.Text := TempCWStrBank[TempCurrentBank,7]; + Edit8.Text := TempCWStrBank[TempCurrentBank,8]; +end; + +procedure TOptions.FormShow(Sender: TObject); +var i, j : integer; +begin + + cbSaveWhenNoCW.Checked := Settings._savewhennocw; + cbJMode.Checked := Settings._jmode; + + rgSearchAfter.ItemIndex := Settings._searchafter; + spMaxSuperHit.Value := Settings._maxsuperhit; + spBSExpire.Value := Settings._bsexpire; + spSpotExpire.Value := Settings._spotexpire; + cbUpdateThread.Checked := Settings._renewbythread; + cbDisplayDatePartialCheck.Checked := Settings._displaydatepartialcheck; + + rgBandData.ItemIndex := Settings._banddatamode; + cbDontAllowSameBand.Checked := Settings._dontallowsameband; + cbAutoBandMap.Checked := Settings._autobandmap; + cbAFSK.Checked := Settings._AFSK; + + cbRecordRigFreq.Checked := Settings._recrigfreq; + cbMultiStn.Checked := Settings._multistation; + act19.Checked := Settings._activebands[b19]; + act35.Checked := Settings._activebands[b35]; + act7.Checked := Settings._activebands[b7]; + act10.Checked := Settings._activebands[b10]; + act14.Checked := Settings._activebands[b14]; + act18.Checked := Settings._activebands[b18]; + act21.Checked := Settings._activebands[b21]; + act24.Checked := Settings._activebands[b24]; + act28.Checked := Settings._activebands[b28]; + act50.Checked := Settings._activebands[b50]; + act144.Checked := Settings._activebands[b144]; + act430.Checked := Settings._activebands[b430]; + act1200.Checked := Settings._activebands[b1200]; + act2400.Checked := Settings._activebands[b2400]; + act5600.Checked := Settings._activebands[b5600]; + act10g.Checked := Settings._activebands[b10g]; + + if Settings._multiop <> 0 then + MultiOpRadioBtn.Checked := True + else + SingleOpRadioBtn.Checked := True; + + if Settings._band = 0 then + BandGroup.ItemIndex := 0 + else + BandGroup.ItemIndex := OldBandOrd(TBand(Settings._band-1))+1 + ; + ModeGroup.ItemIndex := Settings._mode; + {OpListBox.Items := OpList;} + + for i := 1 to maxbank do + for j := 1 to maxstr do + TempCWStrBank[i, j] := Settings.CW.CWStrBank[i,j]; + + TempCurrentBank := Settings.CW.CurrentBank; + case TempCurrentBank of + 1 : rbBankA.Checked := true; + 2 : rbBankB.Checked := true; + 3 : rbRTTY.Checked := true; + end; + + RenewCWStrBankDisp; + { + Edit1.Text := Settings.CW.CWStrBank[1,1]; + Edit2.Text := Settings.CW.CWStrBank[1,2]; + Edit3.Text := Settings.CW.CWStrBank[1,3]; + Edit4.Text := Settings.CW.CWStrBank[1,4]; + Edit5.Text := Settings.CW.CWStrBank[1,5]; + Edit6.Text := Settings.CW.CWStrBank[1,6]; + Edit7.Text := Settings.CW.CWStrBank[1,7]; + Edit8.Text := Settings.CW.CWStrBank[1,8]; + } + Edit9.Text := Settings.CW.CQStrBank[1]; + Edit10.Text := Settings.CW.CQStrBank[2]; + + vEdit1.Text := Settings._SoundComments[1]; + vEdit2.Text := Settings._SoundComments[2]; + vEdit3.Text := Settings._SoundComments[3]; + vEdit4.Text := Settings._SoundComments[4]; + vEdit5.Text := Settings._SoundComments[5]; + vEdit6.Text := Settings._SoundComments[6]; + vEdit7.Text := Settings._SoundComments[7]; + vEdit8.Text := Settings._SoundComments[8]; + vEdit9.Text := Settings._SoundComments[9]; + vEdit10.Text := Settings._SoundComments[10]; + + vButton1.Caption := ExtractFileName(Settings._SoundFiles[1]); + vButton2.Caption := ExtractFileName(Settings._SoundFiles[2]); + vButton3.Caption := ExtractFileName(Settings._SoundFiles[3]); + vButton4.Caption := ExtractFileName(Settings._SoundFiles[4]); + vButton5.Caption := ExtractFileName(Settings._SoundFiles[5]); + vButton6.Caption := ExtractFileName(Settings._SoundFiles[6]); + vButton7.Caption := ExtractFileName(Settings._SoundFiles[7]); + vButton8.Caption := ExtractFileName(Settings._SoundFiles[8]); + vButton9.Caption := ExtractFileName(Settings._SoundFiles[9]); + vButton10.Caption := ExtractFileName(Settings._SoundFiles[10]); + + for i := 1 to 10 + do TempVoiceFiles[i] := Settings._SoundFiles[i]; + + CQRepEdit.Text := FloatToStrF(Settings.CW._cqrepeat, ffFixed, 3, 1); + SendFreqEdit.Text := FloatToStrF(Settings._sendfreq, ffFixed, 3, 1); + SpeedBar.Position := Settings.CW._speed; + SpeedLabel.Caption := IntToStr(Settings.CW._speed)+' wpm'; + WeightBar.Position := Settings.CW._weight; + WeightLabel.Caption := IntToStr(Settings.CW._weight)+' %'; + PaddleCheck.Checked := Settings.CW._paddlereverse; + PaddleEnabledCheck.Checked := Settings.CW._paddle; + SideToneCheck.Checked := Settings.CW._sidetone; + FIFOCheck.Checked := Settings.CW._FIFO; + ToneSpinEdit.Value := Settings.CW._tonepitch; + CQMaxSpinEdit.Value := Settings.CW._cqmax; + AbbrevEdit.Text := Settings.CW._zero + Settings.CW._one + Settings.CW._nine; + + ProvEdit.Text := Settings._prov; + CityEdit.Text := Settings._city; + CQZoneEdit.Text := Settings._cqzone; + IARUZoneEdit.Text := Settings._iaruzone; + + AllowDupeCheckBox.Checked := Settings._allowdupe; + + ClusterCombo.ItemIndex := Settings._clusterport; + ZLinkCombo.ItemIndex := Settings._zlinkport; + Rig1PortCombo.ItemIndex := Settings._rig1port; + cbRITClear.Checked := Settings._ritclear; + Rig1Combo.ItemIndex := Settings._rig1name; + + Rig2PortCombo.ItemIndex := Settings._rig2port; + cbRITClear.Checked := Settings._ritclear; + Rig2Combo.ItemIndex := Settings._rig2name; + + cbIcomBaudRate.ItemIndex := Settings._icombaudrate; + + PCSetButton.Enabled := True; + case ClusterCombo.ItemIndex of + 0 : PCSetButton.Enabled := False; + 1..6 : PCSetButton.Caption := 'COM port settings'; + 7 : PCSetButton.Caption := 'TELNET settings'; + end; + + ZLinkSetButton.Enabled := True; + case ZLinkCombo.ItemIndex of + 0 : ZLinkSetButton.Enabled := False; + 1 : ZLinkSetButton.Caption := 'TELNET settings'; + end; + + SaveEvery.Value := Settings._saveevery; + + ClusterCOMSet.SetVisuals; + ClusterTelnetSet.SetVisuals; + + //ZLinkCOMSet.SetVisuals; + ZLinkTelnetSet.SetVisuals; + + if LPTport[1] = 0 then + rbLPT1.Enabled := False + else + rbLPT1.Enabled := True; + if LPTport[2] = 0 then + rbLPT2.Enabled := False + else + rbLPT2.Enabled := True; + if Settings._lptnr = 1 then + rbLPT1.Checked := True; + if Settings._lptnr = 2 then + rbLPT2.Checked := True; + if Settings._lptnr = 11 then + rbCOM1.Checked := True; + if Settings._lptnr = 12 then + rbCOM2.Checked := True; + if Settings._lptnr = 21 then + rbUSB.Checked := True; + +{$IFNDEF W95} + rbUSB.Enabled := True; +{$ENDIF} + + SentEdit.Text := Settings._sentstr; + + BackUpPathEdit.Text := Settings._backuppath; + edCFGDATPath.Text := Settings._cfgdatpath; + edLogsPath.Text := Settings._logspath; + + + PTTEnabledCheckBox.Checked := Settings._pttenabled; + BeforeEdit.Text := IntToStr(Settings._pttbefore); + AfterEdit.Text := IntToStr(Settings._pttafter); + if PTTEnabledCheckBox.Checked then + begin + BeforeEdit.Enabled := True; + AfterEdit.Enabled := True; + end + else + begin + BeforeEdit.Enabled := False; + AfterEdit.Enabled := False; + end; + cbCQSP.Checked := Settings._switchcqsp; + cbCountDown.Checked := Settings._countdown; + cbQSYCount.Checked := Settings._qsycount; + + cbDispExchange.Checked := Settings._sameexchange; + cbAutoEnterSuper.Checked := Settings._entersuperexchange; + + cbTransverter1.Checked := Settings._transverter1; + cbTransverter2.Checked := Settings._transverter2; + +end; + +procedure TOptions.AddClick(Sender: TObject); +var str : string; +begin + if OpEdit.Text <> '' then + begin + str := OpEdit.Text; + if OpPowerEdit.Text <> '' then + str := FillRight(str, 20)+OpPowerEdit.Text; + OpListBox.Items.Add(str); + end; + OpEdit.Text := ''; + OpPowerEdit.Text := ''; + OpEdit.SetFocus; +end; + +procedure TOptions.DeleteClick(Sender: TObject); +begin + + OpListBox.Items.Delete(OpListBox.ItemIndex); +end; + +procedure TOptions.FormCreate(Sender: TObject); +var f : textfile; + str, filename : string; + B : TBand; + i, n : integer; + Res : TVicRes; + VerInfo : TOSVersionInfo; +begin + + for i := 1 to LPTMAX do + LPTPort[i] := 0; + + VerInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo); + GetVersionEx(VerInfo); + + if VerInfo.dwPlatformId = VER_PLATFORM_WIN32_NT then + begin + ZLOG_WIN2KMODE := TRUE; + BGK32LIB._WIN2KMODE := ZLOG_WIN2KMODE; + end; + + if ZLOG_WIN2KMODE = False then + begin + Res := TVicRes.Create; + Res.SearchByClassName('Ports'); + n := Res.Devices; + for i := 1 to n do + begin + if pos('LPT1',Res.DeviceDescriptor[i]) > 0 then + LPTPort[1] := Res.PortBase[i] + 2; + if pos('LPT2',Res.DeviceDescriptor[i]) > 0 then + LPTPort[2] := Res.PortBase[i] + 2; + end; + end; + + for B := b19 to b10G do + begin + CurrentPower[B] := pwrP; + CurrentPower2[B] := 500; + end; + + LoadIniFile; + Settings.CW.CurrentBank := 1; + TempCurrentBank := 1; + Options.OpList := TStringList.Create; + + + try + OpList.LoadFromFile(MAINPATH+'ZLOG.OP'); + except + on EFOpenError do + begin + end; + end; + + OpListBox.Items.Assign(OpList); + + PageControl.ActivePage := PrefTabSheet; + + Rig1Combo.Items.Clear; + Rig2Combo.Items.Clear; + for i := 0 to RIGNAMEMAX do + begin + Rig1Combo.Items.Add(RIGNAMES[i]); + Rig2Combo.Items.Add(RIGNAMES[i]); + end; + +end; + +procedure TOptions.Button2Click(Sender: TObject); +begin + Close; + MainForm.LastFocus.SetFocus; +end; + +procedure TOptions.OpEditKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_RETURN : AddClick(Self); + end; +end; + +procedure TOptions.OpEditEnter(Sender: TObject); +begin + Add.Default := True; +end; + +procedure TOptions.OpEditExit(Sender: TObject); +begin + OKButton.Default := True; +end; + +procedure TOptions.Button3Click(Sender: TObject); +begin + RenewSettings; + ImplementSettings(False); + SaveCurrentSettings; {Writes Settings to Inifile} + MainForm.RenewCWToolBar; + MainForm.RenewVoiceToolBar; +end; + +procedure TOptions.SpeedBarChange(Sender: TObject); +begin + SpeedLabel.Caption := IntToStr(SpeedBar.Position) + ' wpm'; +end; + +procedure TOptions.WeightBarChange(Sender: TObject); +begin + WeightLabel.Caption := IntToStr(WeightBar.Position)+' %'; +end; + +procedure TOptions.FormDestroy(Sender: TObject); +begin + OpList.Free; +end; + +procedure TOptions.vButtonClick(Sender: TObject); +begin + if OpenDialog.Execute then + begin + TempVoiceFiles[TButton(Sender).Tag] := OpenDialog.FileName; + Tlabel(Sender).Caption := ExtractFileName(OpenDialog.FileName); + end; +end; + +procedure TOptions.ClusterComboChange(Sender: TObject); +begin + PCsetButton.Enabled := True; + case ClusterCombo.ItemIndex of + 0 : PCsetButton.Enabled := False; + 1..6 : PCsetButton.Caption := 'COM port settings'; + 7 : PCsetButton.Caption := 'TELNET settings'; + end; +end; + + +procedure TOptions.PCsetButtonClick(Sender: TObject); +begin + if PCSetButton.Caption = 'COM port settings' then + ClusterComSet.ShowModal + else + ClusterTelnetSet.ShowModal; +end; + +procedure TOptions.ZLinkComboChange(Sender: TObject); +begin + if ZLinkCombo.ItemIndex = 0 then + ZLinksetButton.Enabled := False + else + ZLinksetButton.Enabled := True; +end; + +procedure TOptions.ZLinkSetButtonClick(Sender: TObject); +begin +{ if ZLinkSetButton.Caption = 'COM port settings' then + ZLinkComSet.ShowModal + else } + ZLinkTelnetSet.ShowModal; +end; + +procedure TOptions.BrowsePathClick(Sender: TObject); +var p : string; +begin + If PathDialog.Execute then + begin + p := PathDialog.Directory; + if p[Length(p)] <> '\' then + p := p + '\'; + case TButton(Sender).Tag of + 0 : BackUpPathEdit.Text := p; + 10 : edCFGDATPath.Text := p; + 20 : edLogsPath.Text := p; + end; + end; +end; + +procedure TOptions.PTTEnabledCheckBoxClick(Sender: TObject); +begin + if PTTEnabledCheckBox.Checked then + begin + BeforeEdit.Enabled := True; + AfterEdit.Enabled := True; + end + else + begin + BeforeEdit.Enabled := False; + AfterEdit.Enabled := False; + end; +end; + +procedure TOptions.CQRepEditKeyPress(Sender: TObject; var Key: Char); +begin + if not(Key in ['0'..'9','.']) then + Key := #0; +end; + +procedure TOptions.Edit1Change(Sender: TObject); +var i : integer; +begin + i := TEdit(Sender).Tag; + TempCWStrBank[TempCurrentBank,i] := TEdit(Sender).Text; +end; + +procedure TOptions.CWBankClick(Sender: TObject); +begin + TempCurrentBank := TRadioButton(Sender).Tag; + RenewCWStrBankDisp; +end; + +function TOptions.PTTEnabled : boolean; +begin + Result := Settings._pttenabled; +end; + +procedure TOptions.ReadWin(WinName : string; var Open : boolean; var X, Y, H, W: integer); +var P : PChar; +begin + P := StrAlloc(256); + StrPCopy(P, WinName+'_Open'); + Open := Ini.GetBoolean('Windows', P, False); + StrPCopy(P, WinName+'_X'); + X := Ini.GetInteger('Windows', P, 10); + StrPCopy(P, WinName+'_Y'); + Y := Ini.GetInteger('Windows', P, 10); + StrPCopy(P, WinName+'_H'); + H := Ini.GetInteger('Windows', P, 10); + StrPCopy(P, WinName+'_W'); + W := Ini.GetInteger('Windows', P, 10); + StrDispose(P); +end; + +procedure TOptions.ReadWin2(WinName : string; var F : TForm); +var P : PChar; + i : integer; +begin + P := StrAlloc(256); + StrPCopy(P, WinName+'_X'); + i := Ini.GetInteger('Windows', P, -1); + if i > 0 then + F.Left := i; + StrPCopy(P, WinName+'_Y'); + i := Ini.GetInteger('Windows', P, -1); + if i > 0 then + F.Top := i; + StrPCopy(P, WinName+'_W'); + i := Ini.GetInteger('Windows', P, -1); + if i > 0 then + F.Width := i; + StrPCopy(P, WinName+'_H'); + i := Ini.GetInteger('Windows', P, -1); + if i > 0 then + F.Height := i; + StrPCopy(P, WinName+'_Open'); + F.Visible := Ini.GetBoolean('Windows', P, False); + StrDispose(P); +end; + +procedure TOptions.RecordWin(WinName : string; Open : boolean; X, Y : integer); +var P : PChar; +begin + P := StrAlloc(256); + StrPCopy(P, WinName+'_Open'); + Ini.SetBoolean('Windows', P, Open); + StrPCopy(P, WinName+'_X'); + Ini.SetInteger('Windows', P, X); + StrPCopy(P, WinName+'_Y'); + Ini.SetInteger('Windows', P, Y); + StrDispose(P); +end; + +procedure TOptions.RecordSuperCheckColumns(c : integer); +var P : PChar; +begin + P := StrAlloc(256); + StrPCopy(P, 'SuperCheckColumns'); + Ini.SetInteger('Windows', P, C); + StrDispose(P); +end; + +function TOptions.GetSuperCheckColumns : integer; +var P : PChar; +begin + P := StrAlloc(256); + StrPCopy(P, 'SuperCheckColumns'); + Result := Ini.GetInteger('Windows', P, 0); + StrDispose(P); +end; + +procedure TOptions.RecordWin2(WinName : string; F : TForm); +var P : PChar; +begin + P := StrAlloc(256); + StrPCopy(P, WinName+'_Open'); + Ini.SetBoolean('Windows', P, F.Visible); + StrPCopy(P, WinName+'_X'); + Ini.SetInteger('Windows', P, F.Left); + StrPCopy(P, WinName+'_Y'); + Ini.SetInteger('Windows', P, F.Top); + StrPCopy(P, WinName+'_H'); + Ini.SetInteger('Windows', P, F.Height); + StrPCopy(P, WinName+'_W'); + Ini.SetInteger('Windows', P, F.Width); + StrDispose(P); +end; + +procedure TOptions.RestoreMainForm(var X, Y, W, H : integer; var TB1, TB2 : boolean); +begin + X := Ini.GetInteger('Windows', 'Main_X', 0); + Y := Ini.GetInteger('Windows', 'Main_Y', 0); + W := Ini.GetInteger('Windows', 'Main_W', 0); + H := Ini.GetInteger('Windows', 'Main_H', 0); + TB1 := Ini.GetBoolean('Windows', 'Main_ToolBar1', False); + TB2 := Ini.GetBoolean('Windows', 'Main_ToolBar2', False); +end; + +procedure TOptions.RecordMainForm(X, Y, W, H : integer; TB1, TB2 : boolean); +begin + Ini.SetInteger('Windows', 'Main_X', X); + Ini.SetInteger('Windows', 'Main_Y', Y); + Ini.SetInteger('Windows', 'Main_W', W); + Ini.SetInteger('Windows', 'Main_H', H); + Ini.SetBoolean('Windows', 'Main_ToolBar1', TB1); + Ini.SetBoolean('Windows', 'Main_ToolBar2', TB2); +end; + + + +procedure TOptions.cbCountDownClick(Sender: TObject); +begin + if cbCountDown.Checked then + cbQSYCount.Checked := False; +end; + +procedure TOptions.cbQSYCountClick(Sender: TObject); +begin + if cbQSYCount.Checked then + cbCountDown.Checked := False; +end; + + +procedure TOptions.cbTransverter1Click(Sender: TObject); +var i, r : integer; +begin + r := TCheckBox(Sender).Tag; + r := r - 100; + + + if TCheckBox(Sender).Checked then + begin + i := 0; + if r = 1 then + i := Settings._transverteroffset1; + if r = 2 then + i := Settings._transverteroffset2; + + IntegerDialog.Init(i, 'Please input the offset frequency in kHz'); + IntegerDialog.ShowModal; + i := IntegerDialog.GetValue; + if i <> -1 then + begin + if r = 1 then + Settings._transverteroffset1 := i; + if r = 2 then + Settings._transverteroffset2 := i; + end; + end; + +end; + + +procedure TOptions.Rig1ComboChange(Sender: TObject); +begin + if Rig1Combo.ItemIndex = RIGNAMEMAX then + begin + Rig2Combo.ItemIndex := RIGNAMEMAX; + Rig1PortCombo.ItemIndex := 0; + Rig1PortCombo.Enabled := False; + Rig2PortCombo.Enabled := False; + end + else + begin + Rig1PortCombo.Enabled := True; + if Rig2Combo.ItemIndex = RIGNAMEMAX then + begin + Rig2PortCombo.ItemIndex := 0; + Rig2Combo.ItemIndex := 0; + Rig2PortCombo.Enabled := True; + end; + end; +end; + +procedure TOptions.Rig2ComboChange(Sender: TObject); +begin + if Rig2Combo.ItemIndex = RIGNAMEMAX then + begin + Rig1Combo.ItemIndex := RIGNAMEMAX; + Rig2PortCombo.ItemIndex := 0; + Rig2PortCombo.Enabled := False; + Rig1PortCombo.Enabled := False; + end + else + begin + Rig2PortCombo.Enabled := True; + if Rig1Combo.ItemIndex = RIGNAMEMAX then + begin + Rig1PortCombo.ItemIndex := 0; + Rig1Combo.ItemIndex := 0; + Rig1PortCombo.Enabled := True; + end; + end; +end; + +end. diff --git a/src/UPartials.dfm b/src/UPartials.dfm new file mode 100644 index 00000000..8f780b4f Binary files /dev/null and b/src/UPartials.dfm differ diff --git a/src/UPartials.pas b/src/UPartials.pas new file mode 100644 index 00000000..78e5537c --- /dev/null +++ b/src/UPartials.pas @@ -0,0 +1,492 @@ +unit UPartials; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, zLogGlobal, ExtCtrls, Buttons, Spin; + +const sortTime = 1; + sortBand = 2; + sortCall = 3; + +type + TPartialCheck = class(TForm) + ListBox: TListBox; + Panel: TPanel; + Button3: TButton; + CheckBox1: TCheckBox; + ShowMaxEdit: TSpinEdit; + Label1: TLabel; + SortByGroup: TGroupBox; + rbTime: TRadioButton; + rbBand: TRadioButton; + rbCall: TRadioButton; + MoreButton: TSpeedButton; + StayOnTop: TCheckBox; + procedure FormCreate(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure CreateParams(var Params: TCreateParams); override; + procedure CheckBox1Click(Sender: TObject); + procedure MoreButtonClick(Sender: TObject); + procedure ShowMaxEditChange(Sender: TObject); + procedure rbSortClick(Sender: TObject); + procedure ListBoxDrawItem(Control: TWinControl; Index: Integer; + Rect: TRect; State: TOwnerDrawState); + procedure ListBoxDblClick(Sender: TObject); + procedure StayOnTopClick(Sender: TObject); + + private + TempQSO : TQSO; + DispMax : word; + { Private declarations } + function SortBy : byte; + public + _CheckCall : boolean; + AllBand : boolean; + HitNumber : integer; + HitCall : string; + procedure RenewListBox(QSOList : TList); + procedure CheckPartial(aQSO : TQSO); + procedure CheckPartialNumber(aQSO : TQSO); + procedure SortByCall(var QSOList : TList); + procedure SortByTime(var QSOList : TList); + procedure SortByBand(var QSOList : TList); + procedure Update(aQSO : TQSO); // calls either checkpartial or checkpartialnumber + // depending on _CheckCall value; + { Public declarations } + end; + +var + PartialCheck: TPartialCheck; + +implementation + +uses Main, UOptions; + +{$R *.DFM} + +(* +procedure TQuickSort.Sort(var A: array of Integer); + + procedure QuickSort(var A: array of Integer; iLo, iHi: Integer); + var + Lo, Hi, Mid, T: Integer; + begin + Lo := iLo; + Hi := iHi; + Mid := A[(Lo + Hi) div 2]; + repeat + while A[Lo] < Mid do Inc(Lo); + while A[Hi] > Mid do Dec(Hi); + if Lo <= Hi then + begin + VisualSwap(A[Lo], A[Hi], Lo, Hi); + T := A[Lo]; + A[Lo] := A[Hi]; + A[Hi] := T; + Inc(Lo); + Dec(Hi); + end; + until Lo > Hi; + if Hi > iLo then QuickSort(A, iLo, Hi); + if Lo < iHi then QuickSort(A, Lo, iHi); + if Terminated then Exit; + end; + +begin + QuickSort(A, Low(A), High(A)); +end; +*) + +procedure TPartialCheck.SortByCall(var QSOList : TList); + + procedure QuickSortCall(var QSOList : TList; iLo, iHi : integer); + var Lo, Hi : integer; + Mid : string; + begin + Lo := iLo; + Hi := iHi; + Mid := TQSO(QSOList[(Lo + Hi) div 2]).QSO.Callsign; + repeat + while CompareText(TQSO(QSOList[Lo]).QSO.CallSign, Mid) < 0 do + inc(Lo); + while CompareText(TQSO(QSOList[Hi]).QSO.CallSign, Mid) > 0 do + dec(Hi); + if Lo <= Hi then + begin + QSOList.Exchange(Lo, Hi); + inc(Lo); + dec(Hi); + end; + until Lo > Hi; + if Hi > iLo then QuickSortCall(QSOList, iLo, Hi); + if Lo < iHi then QuickSortCall(QSOList, Lo, iHi); + end; + +begin + QuickSortCall(QSOList,0,QSOList.Count-1); +end; + +procedure TPartialCheck.SortByTime(var QSOList : TList); + + procedure QuickSortTime(var QSOList : TList; iLo, iHi : integer); + var Lo, Hi : integer; + Mid : TDateTime; + begin + Lo := iLo; + Hi := iHi; + Mid := TQSO(QSOList[(Lo + Hi) div 2]).QSO.Time; + repeat + while (TQSO(QSOList[Lo]).QSO.Time < Mid) do + inc(Lo); + while (TQSO(QSOList[Hi]).QSO.Time > Mid) do + dec(Hi); + if Lo <= Hi then + begin + QSOList.Exchange(Lo, Hi); + inc(Lo); + dec(Hi); + end; + until Lo > Hi; + if Hi > iLo then QuickSortTime(QSOList, iLo, Hi); + if Lo < iHi then QuickSortTime(QSOList, Lo, iHi); + end; + +begin + QuickSortTime(QSOList,0,QSOList.Count-1); +end; + +procedure TPartialCheck.SortByBand(var QSOList : TList); +var BandOrder : array[b19..b10g] of integer; + b : TBand; + + procedure QuickSortBand(var QSOList : TList; iLo, iHi : integer); + var Lo, Hi : integer; + Mid : integer{TBand}; + begin + Lo := iLo; + Hi := iHi; + Mid := BandOrder[TQSO(QSOList[(Lo + Hi) div 2]).QSO.Band]; + repeat + while (BandOrder[TQSO(QSOList[Lo]).QSO.Band] < Mid) do + inc(Lo); + while (BandOrder[TQSO(QSOList[Hi]).QSO.Band] > Mid) do + dec(Hi); + if Lo <= Hi then + begin + QSOList.Exchange(Lo, Hi); + inc(Lo); + dec(Hi); + end; + until Lo > Hi; + if Hi > iLo then QuickSortBand(QSOList, iLo, Hi); + if Lo < iHi then QuickSortBand(QSOList, Lo, iHi); + end; + +begin + for b := b19 to b10g do + BandOrder[b] := ord(b)+1; + BandOrder[Main.CurrentQSO.QSO.Band] := 0; + + QuickSortBand(QSOList,0,QSOList.Count-1); +end; + + + +function TPartialCheck.SortBy : Byte; +begin + Result := sortTime; + if rbBand.Checked then + Result := sortBand; + if rbCall.Checked then + Result := sortCall; +end; + +procedure TPartialCheck.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + + +procedure TPartialCheck.CheckPartialNumber(aQSO : TQSO); +var PartialStr : string; + i : LongInt; + B : TBand; + _count : integer; + TempList : TList; +label disp; +begin + _CheckCall := False; + _count := 0; + TempQSO := aQSO; + TempList := TList.Create; + // ListBox.Items.Clear; + PartialStr := aQSO.QSO.NrRcvd; + if PartialStr <> '' then + begin + +{ + for B := b19 to HiBand do // added 0.23 + for i := 1 to SubLog[B].TotalQSO do + if Pos(PartialStr, TQSO(SubLog[B].List[i]).QSO.NrRcvd) > 0 then + if AllBand or (not(AllBand) and (aQSO.QSO.band = TQSO(SubLog[B].List[i]).QSO.band)) then + begin + TempList.Add(TQSO(SubLog[B].List[i])); + if _count >= DispMax then + //exit + goto disp + else + inc(_count); + end; +} + + for i := 1 to Log.TotalQSO do + if Pos(PartialStr, TQSO(Log.List[i]).QSO.NrRcvd) > 0 then + if AllBand or (not(AllBand) and (aQSO.QSO.band = TQSO(Log.List[i]).QSO.band)) then + begin + TempList.Add(TQSO(Log.List[i])); + if _count >= DispMax then + goto disp + //exit + else + inc(_count); + end; + end + else + begin + ListBox.Clear; + TempList.Free; + exit; + end; +disp : + if TempList.Count = 0 then + begin + ListBox.Clear; + TempList.Free; + exit; + end; + case SortBy of + sortTime : SortByTime(TempList); + sortBand : begin + SortByBand(TempList); + //PushUpCurrentBand(TempList,aQSO.QSO.Band); + end; + sortCall : SortByCall(TempList); + end; + + RenewListBox(TempList); + TempList.Free; +end; + +procedure TPartialCheck.RenewListBox(QSOList : TList); +var i : integer; + S : string; +begin + ListBox.Items.Clear; + if QSOList.Count = 0 then + exit; + for i := 0 to QSOList.Count-1 do + begin + S := TQSO(QSOList[i]).PartialSummary(Options.Settings._displaydatepartialcheck); + if TQSO(QSOList[i]).QSO.Band = Main.CurrentQSO.QSO.Band then + S := '*' + S; + ListBox.Items.Add(S); + end; +end; + +procedure TPartialCheck.CheckPartial(aQSO : TQSO); +var PartialStr : string; + i : LongInt; + B : TBand; + _count : integer; + TempList : TList; +label disp; +begin + HitNumber := 0; + HitCall := ''; + _CheckCall := True; + _count := 0; + TempQSO := aQSO; + //ListBox.Items.Clear; + PartialStr := aQSO.QSO.Callsign; + if Options.Settings._searchafter >= length(PartialStr) then + begin + ListBox.Items.Clear; + exit; + end; + + if pos(',',PartialStr) = 1 then + exit; + + TempList := TList.Create; + if (PartialStr <> '') then + begin + for i := 1 to Log.TotalQSO do +// if Pos(PartialStr, TQSO(Log.List[i]).QSO.Callsign) > 0 then + if PartialMatch(PartialStr, TQSO(Log.List[i]).QSO.Callsign) then + if AllBand or (not(AllBand) and (aQSO.QSO.band = TQSO(Log.List[i]).QSO.band)) then + begin + //ListBox.Items.Add(TQSO(Log.List[i]).PartialSummary); + TempList.Add(TQSO(Log.List[i])); + if _count >= DispMax then + goto disp + //exit + else + inc(_count); + end; + end + else {PartialStr = ''} + begin + ListBox.Clear; + TempList.Free; + exit; + end; + +disp : + if TempList.Count = 0 then + begin + ListBox.Clear; + TempList.Free; + exit; + end; + + HitNumber := TempList.Count; + + case SortBy of + sortTime : SortByTime(TempList); + sortBand : SortByBand(TempList); + sortCall : SortByCall(TempList); + end; + + RenewListBox(TempList); + + HitCall := TQSO(TempList.Items[0]).QSO.Callsign; + + TempList.Free; +end; + +procedure TPartialCheck.FormCreate(Sender: TObject); +begin + AllBand := True; + //CheckBox1.Checked := AllBand; + _CheckCall := True; + DispMax := 200; + ShowMaxEdit.Value := DispMax; +end; + +procedure TPartialCheck.Button3Click(Sender: TObject); +begin + Close; +end; + +procedure TPartialCheck.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + +{procedure TPartialCheck.CheckBox1Click(Sender: TObject); +begin +end; } + +procedure TPartialCheck.CheckBox1Click(Sender: TObject); +begin + AllBand := CheckBox1.Checked; + if _CheckCall then + CheckPartial(TempQSO) + else + CheckPartialNumber(TempQSO); +end; + + + +procedure TPartialCheck.MoreButtonClick(Sender: TObject); +begin + if MoreButton.Caption = 'More..' then + begin + MoreButton.Caption := 'Hide'; + Panel.Height := 64; + end + else + begin + MoreButton.Caption := 'More..'; + Panel.Height := 32; + end; +end; + +procedure TPartialCheck.ShowMaxEditChange(Sender: TObject); +begin + DispMax := ShowMaxEdit.Value; +end; + +procedure TPartialCheck.Update(aQSO : TQSO); +begin + //MainForm.PartialClick(Self); + {if MainForm.ActiveControl = MainForm.NumberEdit then + CheckPartialNumber(Main.CurrentQSO) + else + CheckPartial(Main.CurrentQSO);} + if _CheckCall then + CheckPartial(aQSO) + else + CheckPartialNumber(aQSO); +end; + +procedure TPartialCheck.rbSortClick(Sender: TObject); +begin + Update(Main.CurrentQSO); +end; + +procedure TPartialCheck.ListBoxDrawItem(Control: TWinControl; + Index: Integer; Rect: TRect; State: TOwnerDrawState); +var OffSet : integer; + S : string; +begin +with (Control as TListBox).Canvas do + begin + FillRect(Rect); { clear the rectangle } + Offset := 2; { provide default offset } + S := (Control as TListBox).Items[Index]; + if S[1] = '*' then + begin + Delete(S, 1, 1); + Font.Color := clPurple; + //Font.Style := [fsBold]; + end + else + Font.Color := clWindowText; + //Font.Style := []; + {if Index = ListBox.ItemIndex then + Font.Color := clHighlightText + else + Font.Color := clWindowText;} + TextOut(Rect.Left + Offset, Rect.Top, S) { display the text } + end; +end; + +procedure TPartialCheck.ListBoxDblClick(Sender: TObject); +var i : integer; + str : string; +begin + i := ListBox.ItemIndex; + str := copy(ListBox.Items[i], 7, 12); + str := TrimRight(str); + MainForm.CallsignEdit.Text := str; +end; + + +procedure TPartialCheck.StayOnTopClick(Sender: TObject); +begin + If StayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +end. diff --git a/src/UPediScore.dfm b/src/UPediScore.dfm new file mode 100644 index 00000000..4029d9cf Binary files /dev/null and b/src/UPediScore.dfm differ diff --git a/src/UPediScore.pas b/src/UPediScore.pas new file mode 100644 index 00000000..69dfd0f4 --- /dev/null +++ b/src/UPediScore.pas @@ -0,0 +1,122 @@ +unit UPediScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, Aligrid, StdCtrls, ExtCtrls, zLogGlobal; + +type + TPediScore = class(TBasicScore) + Grid: TStringAlignGrid; + procedure FormShow(Sender: TObject); + private + { Private declarations } + Stats: array[b19..HiBand, mCW..mOther] of integer; + public + { Public declarations } + procedure Update; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Reset; override; + procedure SummaryWriteScore(FileName : string); override; + end; + +var + PediScore: TPediScore; + +implementation + +{$R *.DFM} + +procedure TPediScore.SummaryWriteScore(FileName : string); +var f : textfile; + b : TBand; + M : TMode; + TotQSO, TotBandQSO : LongInt; + ModeQSO : array[mCW..mOther] of integer; +begin + AssignFile(f, FileName); + Append(f); + write(f, 'MHz '); + for m := mCW to mOther do + write(f, FillLeft(ModeString[m], 6)); + write(f, ' QSO'); + writeln(f); + + TotQSO := 0; + for M := mCW to mOther do + ModeQSO[M] := 0; + for B := b19 to HiBand do + begin + TotBandQSO := 0; + write(f, FillRight(MHzString[b],8)); + for M := mCW to mOther do + begin + write(f, FillLeft(IntToStr(Stats[B, M]), 6)); + Inc(TotBandQSO, Stats[B, M]); + inc(ModeQSO[M], Stats[B, M]); + end; + inc(TotQSO, TotBandQSO); + write(f, FillLeft(IntToStr(TotBandQSO),6)); + writeln(f); + end; + write(f, FillRight('Total',8)); + for M := mCW to mOther do + write(f, FillLeft(IntToStr(ModeQSO[M]), 6)); + writeln(f, FillLeft(IntToStr(TotQSO), 6)); + + CloseFile(f); +end; + + +procedure TPediScore.Update; +var B : TBand; + M : TMode; + TotQSO, TotBandQSO : LongInt; + ModeQSO : array[mCW..mOther] of integer; +begin + TotQSO := 0; + for M := mCW to mOther do + ModeQSO[M] := 0; + for B := b19 to HiBand do + begin + TotBandQSO := 0; + for M := mCW to mOther do + begin + Grid.Cells[ord(M)+ 2, ord(B) + 1] := IntToStr(Stats[B, M]); + Inc(TotBandQSO, Stats[B, M]); + inc(ModeQSO[M], Stats[B, M]); + end; + inc(TotQSO, TotBandQSO); + Grid.Cells[1, ord(B) + 1] := IntToStr(TotBandQSO); + end; + Grid.Cells[1, ord(HiBand)+2] := IntToStr(TotQSO); + for M := mCW to mOther do + Grid.Cells[ord(M) + 2, ord(HiBand)+2] := IntToStr(ModeQSO[M]); +end; + +procedure TPediScore.AddNoUpdate(var aQSO : TQSO); +var band : TBand; +begin + aQSO.QSO.points := 1; + inc(Stats[aQSO.QSO.Band, aQSO.QSO.Mode]); +end; + +procedure TPediScore.Reset; +var B : TBand; + M : TMode; +begin + for B := b19 to Hiband do + for M := mCW to mOther do + Stats[B, M] := 0; +end; + +procedure TPediScore.FormShow(Sender: TObject); +begin + inherited; + Button1.SetFocus; + Grid.Col := 1; + Grid.Row := 1; +end; + +end. diff --git a/src/UQTCForm.dfm b/src/UQTCForm.dfm new file mode 100644 index 00000000..565085a6 Binary files /dev/null and b/src/UQTCForm.dfm differ diff --git a/src/UQTCForm.pas b/src/UQTCForm.pas new file mode 100644 index 00000000..113ba1ea --- /dev/null +++ b/src/UQTCForm.pas @@ -0,0 +1,278 @@ +unit UQTCForm; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, Spin, zLogGlobal, Main, uzLogCW, UZLinkForm, BGK32LIB; + +type + TQTCForm = class(TForm) + btnSend: TButton; + btnBack: TButton; + Label1: TLabel; + SpinEdit: TSpinEdit; + Label2: TLabel; + Label3: TLabel; + ListBox: TListBox; + procedure btnSendClick(Sender: TObject); + procedure btnBackClick(Sender: TObject); + procedure SpinEditChange(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure FormKeyPress(Sender: TObject; var Key: Char); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + private + { Private declarations } + QTCToBeSent : integer; + PastQTC : integer; + QTCList : TList; + QTCReqStn : TQSO; + public + { Public declarations } + QTCSeries : integer; + procedure OpenQTC(Q : TQSO); + end; + +var + QTCForm: TQTCForm; + +implementation + +{$R *.DFM} + +procedure TQTCForm.OpenQTC(Q : TQSO); +var i, j, k : integer; + QQ : TQSO; + SS, SSS : String; +label BYPASS; + +begin + QTCReqStn := Q; + QTCList := TList.Create; + QTCSeries := 0; + PastQTC := 0; + QTCToBeSent := 0; + for i := 1 to Log.TotalQSO do + begin + QQ := TQSO(Log.List[i]); + if QQ.QSO.Dupe or (QQ.QSO.Points = 0) then goto BYPASS; + j := pos('[QTC', QQ.QSO.memo); + if j = 0 then + begin + if CoreCall(QQ.QSO.CallSign) <> CoreCall(Q.QSO.Callsign) then + begin + if QTCList.Count < 10 then + QTCList.Add(QQ); + end; + end + else // get QTC Series and check for QTCs sent in the past + begin + SS := QQ.QSO.Memo; + Delete(SS, 1, j-1); // SS = [QTC??/?? CALLSIGN date time band] + j := pos('/', SS); + if j > 0 then + begin + SSS := copy(SS, 5, j-5); + try + if StrToInt(SSS) > QTCSeries then + QTCSeries := StrToInt(SSS); + except + on EConvertError do + begin + end; + end; + + k := pos(' ', SS); + if k > 0 then + begin + Delete(SS, 1, k); + j := pos(' ', SS); + if j > 0 then + begin + SSS := copy(SS, 1, j-1); + if CoreCall(Q.QSO.Callsign) = CoreCall(SSS) then + inc(PastQTC); + end; + end; + end; + end; + BYPASS: + end; + SpinEdit.Value := QTCList.Count; + + ListBox.Clear; + for i := 0 to QTCList.Count - 1 do + ListBox.Items[i] := TQSO(QTCList[i]).QTCStr; + + if PastQTC > 0 then + Label2.Caption := IntToStr(PastQTC) + ' QTCs have been sent to ' + Q.QSO.Callsign + ' already' + else + Label2.Caption := ''; + + SpinEdit.Value := QTCList.Count - PastQTC; + for i := SpinEdit.Value to 9 do + ListBox.Items[i] := ''; + + if QTCList.Count > 0 then + begin + Inc(QTCSeries); + Label1.Caption := Q.QSO.Callsign + ' QTC ' + IntToStr(QTCSeries) + '/' + + IntToStr(SpinEdit.Value); + end; +end; + +procedure TQTCForm.btnSendClick(Sender: TObject); +var cQ : TQSO; + S : string; +begin + SpinEdit.Enabled := False; + + if btnSend.Caption = 'Done' then + begin + close; + exit; + end; + + if QTCToBeSent = 0 then + begin + if QTCReqStn.QSO.Mode = mCW then + begin + S := ' '+QTCReqStn.QSO.Callsign + ' QTC ' + IntToStr(QTCSeries) + '/' + + IntToStr(SpinEdit.Value); + zLogSendStr(S+'"'); + + btnSend.Enabled := False; + btnBack.Enabled := False; + UserFlag := True; + repeat + Application.ProcessMessages; + until UserFlag = False; + btnSend.Enabled := True; + btnBack.Enabled := True; + end; + end + else + begin + ListBox.Selected[QTCToBeSent-1] := True; + cQ := TQSO(QTCList[QTCToBeSent-1]); + if pos('[QTC', cQ.QSO.Memo) = 0 then + cQ.QSO.Memo := '[QTC'+IntToSTr(QTCSeries)+'/'+IntToStr(SpinEdit.Value) + ' ' + QTCReqStn.QSO.Callsign + + FormatDateTime(' yyyy-mm-dd hhnn ', CurrentTime) + ADIFBandString[QTCReqStn.QSO.Band] + ']' + +cQ.QSO.Memo; + + ZLinkForm.EditQSObyID(cQ); + + if QTCReqStn.QSO.Mode = mCW then + begin + //S := SetStr(cQ.QTCStr, cQ); + S := cQ.QTCStr; + zLogSendStr(S+'"'); + + btnSend.Enabled := False; + btnBack.Enabled := False; + UserFlag := True; + repeat + Application.ProcessMessages; + until UserFlag = False; + btnSend.Enabled := True; + btnBack.Enabled := True; + end; + end; + inc(QTCToBeSent); + + if (QTCToBeSent = QTCList.Count + 1) or (QTCToBeSent = SpinEdit.Value + 1) then + begin + btnSend.Caption := 'Done'; + //close; + Label1.Caption := 'QTC '+ IntToStr(QTCSeries) + '/' + IntToStr(SpinEdit.Value) + +' sent'; + exit; + end; + + Label1.Caption := '[QTC ' + IntToStr(QTCSeries) + '/' + IntToStr(SpinEdit.Value)+'-'+ + IntToStr(QTCToBeSent)+'] '+ TQSO(QTCList[QTCToBeSent-1]).QTCStr; +end; + +procedure TQTCForm.btnBackClick(Sender: TObject); +begin + if QTCToBeSent >= 1 then + Dec(QTCToBeSent); + if btnSend.Caption = 'Done' then + btnSend.Caption := 'Send'; + if QTCToBeSent = 0 then + Label1.Caption := QTCReqStn.QSO.Callsign + ' QTC ' + IntToStr(QTCSeries) + '/' + + IntToStr(SpinEdit.Value) + else + Label1.Caption := '[QTC ' + IntToStr(QTCSeries) + '/' + + IntToStr(QTCToBeSent)+'] '+ TQSO(QTCList[QTCToBeSent-1]).QTCStr; +end; + + + +procedure TQTCForm.SpinEditChange(Sender: TObject); +var i, maxQTC : integer; +begin + maxQTC := 10-PastQTC; + if QTCList.Count < maxQTC then + maxQTC := QTCList.Count; + if SpinEdit.Value > maxQTC then + SpinEdit.Value := MaxQTC; + for i := 0 to SpinEdit.Value - 1 do + ListBox.Items[i] := TQSO(QTCList[i]).QTCStr; + for i := SpinEdit.Value to 9 do + ListBox.Items[i] := ''; + Label1.Caption := QTCReqStn.QSO.Callsign + ' QTC ' + IntToStr(QTCSeries) + '/' + + IntToStr(SpinEdit.Value); +end; + +procedure TQTCForm.FormClose(Sender: TObject; var Action: TCloseAction); +var i, j, xpos : integer; + Q : TQSO; + S : string; +begin + btnSend.Caption := 'Send'; + + if QTCtobeSent - 1 < SpinEdit.Value then // didn't send all QTC. [QTC??/?? CALLSIGN date time band] + begin + for i := 0 to QTCtoBeSent - 2 do + begin + Q := TQSO(QTCList[i]); + S := Q.QSO.Memo; + j := pos('[QTC', S); + if j > 0 then + begin + xpos := j + length(IntToStr(QTCSeries)) + 5; + if SpinEdit.Value = 10 then + Delete(S, xpos, 1); + S[xpos] := IntToStr(QTCtobeSent-1)[1]; + Q.QSO.Memo := S; + end; + end; + end; + QTCList.Free; + Main.MyContest.Renew; + SpinEdit.Enabled := True; +end; + +procedure TQTCForm.FormKeyPress(Sender: TObject; var Key: Char); +begin + case Key of + Chr($08), 'B', 'b': btnBackClick(Self); + 'F', 'f' : btnSendClick(Self); + '\' : ControlPTT(not(PTTIsOn)); // toggle PTT; + end; +end; + +procedure TQTCForm.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + 29 : {MUHENKAN KEY} + begin + ControlPTT(not(PTTIsOn)); // toggle PTT; + end; + end; +end; + +end. diff --git a/src/UQTHDialog.dfm b/src/UQTHDialog.dfm new file mode 100644 index 00000000..72e1e0cf Binary files /dev/null and b/src/UQTHDialog.dfm differ diff --git a/src/UQTHDialog.pas b/src/UQTHDialog.pas new file mode 100644 index 00000000..0788b767 --- /dev/null +++ b/src/UQTHDialog.pas @@ -0,0 +1,63 @@ +unit UQTHDialog; + +interface + +uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, + Buttons, ExtCtrls; + +type + TQTHDialog = class(TForm) + OKBtn: TButton; + CancelBtn: TButton; + Bevel1: TBevel; + Label14: TLabel; + Label18: TLabel; + Label34: TLabel; + Label35: TLabel; + ProvEdit: TEdit; + CItyEdit: TEdit; + CQZoneEdit: TEdit; + IARUZoneEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + procedure OKBtnClick(Sender: TObject); + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + QTHDialog: TQTHDialog; + +implementation + +uses UOptions; + +{$R *.DFM} + + + +procedure TQTHDialog.OKBtnClick(Sender: TObject); +begin + Options.Settings._prov := ProvEdit.Text; + Options.Settings._city := CityEdit.Text; + Options.Settings._cqzone := CQZoneEdit.Text; + Options.Settings._iaruzone := IARUZoneEdit.Text; + + Options.ImplementSettings(False); + Options.SaveCurrentSettings; {Writes Settings to Inifile} +end; + +procedure TQTHDialog.FormShow(Sender: TObject); +begin + ProvEdit.Text := Options.Settings._prov; + CityEdit.Text := Options.Settings._city; + CQZoneEdit.Text := Options.Settings._cqzone; + IARUZoneEdit.Text := Options.Settings._iaruzone; +end; + +end. diff --git a/src/UQuickRef.dfm b/src/UQuickRef.dfm new file mode 100644 index 00000000..05c7660b --- /dev/null +++ b/src/UQuickRef.dfm @@ -0,0 +1,35 @@ +object QuickRef: TQuickRef + Left = 506 + Top = 120 + Width = 375 + Height = 480 + Caption = 'Quick Reference' + Color = clBtnFace + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + OldCreateOrder = False + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 12 + object Memo: TMemo + Left = 0 + Top = 0 + Width = 367 + Height = 453 + Align = alClient + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #65325#65331' '#12468#12471#12483#12463 + Font.Style = [] + Lines.Strings = ( + 'Memo') + ParentFont = False + ScrollBars = ssVertical + TabOrder = 0 + OnKeyPress = MemoKeyPress + end +end diff --git a/src/UQuickRef.pas b/src/UQuickRef.pas new file mode 100644 index 00000000..615156b3 --- /dev/null +++ b/src/UQuickRef.pas @@ -0,0 +1,52 @@ +unit UQuickRef; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, StdCtrls; + +type + TQuickRef = class(TForm) + Memo: TMemo; + procedure CreateParams(var Params: TCreateParams); override; + procedure FormCreate(Sender: TObject); + procedure MemoKeyPress(Sender: TObject; var Key: Char); + private + { Private 錾 } + public + { Public 錾 } + end; + +var + QuickRef: TQuickRef; + +implementation + +uses Main; + +{$R *.dfm} + +procedure TQuickRef.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TQuickRef.FormCreate(Sender: TObject); +begin + if FileExists('ZLOGHELP.TXT') then + begin + Memo.Lines.LoadFromFile('ZLOGHELP.TXT'); + end + else + Memo.Lines.Clear; +end; + +procedure TQuickRef.MemoKeyPress(Sender: TObject; var Key: Char); +begin + if Key = Chr($1B) then + MainForm.LastFocus.SetFocus; +end; + +end. diff --git a/src/URateDialog.dfm b/src/URateDialog.dfm new file mode 100644 index 00000000..117f154e Binary files /dev/null and b/src/URateDialog.dfm differ diff --git a/src/URateDialog.pas b/src/URateDialog.pas new file mode 100644 index 00000000..4ea534d1 --- /dev/null +++ b/src/URateDialog.pas @@ -0,0 +1,264 @@ +unit URateDialog; + +interface + +uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, + Buttons, ExtCtrls, zLogGlobal, wsaGraph, UOptions; + +type + TRateDialog = class(TForm) + Timer: TTimer; + Panel1: TPanel; + Label1: TLabel; + Label2: TLabel; + Last10: TLabel; + Last100: TLabel; + Max10: TLabel; + Max100: TLabel; + Panel2: TPanel; + OKBtn: TButton; + StayOnTop: TCheckBox; + Graph: TwsaGraph; + Panel3: TPanel; + ShowLastCombo: TComboBox; + Label3: TLabel; + Label4: TLabel; + procedure TimerTimer(Sender: TObject); + procedure OKBtnClick(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure CreateParams(var Params: TCreateParams); override; + procedure StayOnTopClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure ShowLastComboChange(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + + private + _max10, _max100 : double; + function CountQSOs(_start, _end : TDateTime) : integer; + { Private declarations } + public + ShowLast : integer; { Show last x hours. default = 12} + TimeIncrement : integer; { time increment in minutes default = 60} + procedure UpdateGraph; + { Public declarations } + end; + +var + RateDialog: TRateDialog; + +implementation + +uses Main; + +{$R *.DFM} + +procedure TRateDialog.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TRateDialog.TimerTimer(Sender: TObject); +var Last : TDateTime; + Diff, Rate : double; + temp : string; + i : LongInt; + mytx, k : integer; + aQSO : TQSO; +begin + if not(Visible) then exit; + i := Log.TotalQSO; + if i < 10 then + exit; + + mytx := Options.GetTXNr; + + k := 0; + repeat + aQSO := TQSO(Log.List[i]); + if aQSO.QSO.TX = mytx then + begin + inc(k); + end; + dec(i) + until (i = 0) or (k = 10); + + if (k = 10) then + begin + Last := aQSO.QSO.time; + Diff := (CurrentTime - Last) * 24.0 ; + Rate := 10 / Diff; + if Rate > _Max10 then + _Max10 := Rate; + Str(Rate : 3:2, temp); + Last10.Caption := temp + ' QSOs/hr'; + Str(_Max10 : 3:2, temp); + Max10.Caption := 'max '+temp + ' QSOs/hr'; + end + else + exit; + + i := Log.TotalQSO; + k := 0; + repeat + aQSO := TQSO(Log.List[i]); + if aQSO.QSO.TX = mytx then + begin + inc(k); + end; + dec(i) + until (i = 0) or (k = 100); + + if k = 100 then + begin + Last := aQSO.QSO.time; + Diff := (CurrentTime - Last) * 24.0 ; + Rate := 100 / Diff; + If Rate > _Max100 then + _Max100 := Rate; + Str(Rate : 3:2, temp); + Last100.Caption := temp + ' QSOs/hr'; + Str(_Max100 : 3:2, temp); + Max100.Caption := 'max '+temp + ' QSOs/hr'; + end; + + +{ + if i >= 10 then + begin + Last := TQSO(Log.List[i-9]).QSO.time; + Diff := (CurrentTime - Last) * 24.0 ; + Rate := 10 / Diff; + if Rate > _Max10 then + _Max10 := Rate; + Str(Rate : 3:2, temp); + Last10.Caption := temp + ' QSOs/hr'; + Str(_Max10 : 3:2, temp); + Max10.Caption := 'max '+temp + ' QSOs/hr'; + end; + if i >= 100 then + begin + Last := TQSO(Log.List[i-99]).QSO.time; + Diff := (CurrentTime - Last) * 24.0 ; + Rate := 100 / Diff; + If Rate > _Max100 then + _Max100 := Rate; + Str(Rate : 3:2, temp); + Last100.Caption := temp + ' QSOs/hr'; + Str(_Max100 : 3:2, temp); + Max100.Caption := 'max '+temp + ' QSOs/hr'; + end; +} + +end; + +procedure TRateDialog.OKBtnClick(Sender: TObject); +begin + Close; + MainForm.LastFocus.SetFocus; +end; + +procedure TRateDialog.FormCreate(Sender: TObject); +begin + _max10 := 0; + _max100 := 0; + ShowLast := 12; + TimeIncrement := 60; + Graph.BackGroundColor := clBtnFace; + Graph.GraphColor := clNavy; +end; + +procedure TRateDialog.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + + + +procedure TRateDialog.StayOnTopClick(Sender: TObject); +begin + If StayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +function TRateDialog.CountQSOs(_start, _end : TDateTime) : integer; +var i : integer; + T : TDateTime; +begin + Result := 0; + for i := 1 to Log.TotalQSO do + begin + T := TQSO(Log.List[i]).QSO.Time; + if (T >= _start) and (T < _end) then + inc(Result); + end; +end; + +procedure TRateDialog.UpdateGraph; +var j, k : Integer; + str : string; + _Now : TDateTime; + _Start : TDateTime; + +var H, M, S, ms : word; + +begin + Graph.ClearGraph; + _Now := CurrentTime; + _Start := _Now - (ShowLast - 1) / 24; + DecodeTime(_Start,H, M, S, ms); + _Start := Int(_Start) + EncodeTime(H, 0, 0, 0); + + if Log.TotalQSO = 0 then + exit; + if TQSO(Log.List[Log.TotalQSO]).QSO.Time < _Start then + exit; + + for k := 0 to ShowLast - 1 do + begin + j := CountQSOs(_Start + (1 / 24)*k, _Start + (1 / 24)*(k + 1)); + str := IntToStr(GetHour(_Start + (1 / 24)*k)); + if ShowLast > 12 then + if (GetHour(_Start + (1 / 24) * k) mod 2) = 1 then + str := ''; + if ShowLast > 24 then + if (GetHour(_Start + (1 / 24) * k) mod 4) <> 0 then + str := ''; + Graph.AddData(k + 1, j, str); + end; + Graph.PlotGraph; +end; + + +procedure TRateDialog.FormShow(Sender: TObject); +begin + UpdateGraph; + Timer.Enabled := True; +end; + +procedure TRateDialog.ShowLastComboChange(Sender: TObject); +var i : integer; +begin + try + i := StrToInt(ShowLastCombo.Text); + except + on EConvertError do + i := 12; + end; + ShowLast := i; + UpdateGraph; +end; + +procedure TRateDialog.FormClose(Sender: TObject; var Action: TCloseAction); +begin + Timer.Enabled := False; +end; + +end. diff --git a/src/URenewThread.pas b/src/URenewThread.pas new file mode 100644 index 00000000..91ed5712 --- /dev/null +++ b/src/URenewThread.pas @@ -0,0 +1,89 @@ +unit URenewThread; + +interface + +uses + Classes, zLogGlobal; + +type + TRenewThread = class(TThread) + private + { Private declarations } + protected + procedure SyncProc; + procedure Execute; override; + end; + +procedure RequestRenewThread; + +const Renewing : boolean = False; + +implementation + +uses Main; +{ Important: Methods and properties of objects in VCL can only be used in a + method called using Synchronize, for example, + + Synchronize(UpdateCaption); + + and UpdateCaption could look like, + + procedure TRenewThread.UpdateCaption; + begin + Form1.Caption := 'Updated in a thread'; + end; } + +{ TRenewThread } + +procedure TRenewThread.SyncProc; +var boo : boolean; +begin + Main.MyContest.MultiForm.Update; + Main.MyContest.ScoreForm.Update; + boo := false; + if MainForm.Grid.Focused then + boo := True; + MainForm.EditScreen.Renew; + MainForm.ReevaluateCountDownTimer; + MainForm.ReevaluateQSYCount; + + if boo then + MainForm.Grid.SetFocus; +end; + +procedure TRenewThread.Execute; +var i, j : integer; + aQSO : TQSO; +begin + FreeOnTerminate := True; + + Repeat until + Renewing = False; + + Renewing := True; + + Log.SetDupeFlags; + + for i := 1 to Log.TotalQSO do + begin + aQSO := TQSO(Log.List[i]); + if Log.CountHigherPoints = True then + j := Log.IsDupe(aQSO); // called to set log.differentmodepointer + Main.MyContest.MultiForm.AddNoUpdate(aQSO); + Main.MyContest.ScoreForm.AddNoUpdate(aQSO); + end; + + Synchronize(SyncProc); + Renewing := False; + { Place thread code here } +end; + +procedure RequestRenewThread; +var RTh : TRenewThread; +begin + Main.MyContest.MultiForm.Reset; + Main.MyContest.ScoreForm.Reset; + RTh := TRenewThread.Create(False); +end; + +end. diff --git a/src/URigControl.dfm b/src/URigControl.dfm new file mode 100644 index 00000000..638eb09f Binary files /dev/null and b/src/URigControl.dfm differ diff --git a/src/URigControl.pas b/src/URigControl.pas new file mode 100644 index 00000000..7421eee8 --- /dev/null +++ b/src/URigControl.pas @@ -0,0 +1,2902 @@ +unit URigControl; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + zLogGlobal, StdCtrls, BGK32Lib, ExtCtrls, CPDrv, OleServer, + ActiveX{???COinitialize/UnCoinitialize}, OmniRig_TLB; + + +type + TIcomInfo = record + name : string[10]; + addr : byte; + minband, maxband : TBand; + end; + +const + UseAFSK : boolean = False; // use AFSK instead of RTTY + MAXVIRTUALRIG = 10; + _nil : char = Chr($00); + _nil2 : string = Chr($0) + Chr($0); + _nil3 = chr(0)+chr(0)+chr(0); + _nil4 = chr(0)+chr(0)+chr(0)+chr(0); + + MAXICOM = 26; + + ICOMLIST : array[1..MAXICOM] of TIcomInfo = + ( + (name: 'IC-706'; addr: $48; minband: b19; maxband: b144), + (name: 'IC-706MkII'; addr: $4E; minband: b19; maxband: b144), + (name: 'IC-706MkII-G'; addr: $58; minband: b19; maxband: b430), + (name: 'IC-718'; addr: $5E; minband: b19; maxband: b28), + (name: 'IC-721'; addr: $28; minband: b19; maxband: b28), + (name: 'IC-726'; addr: $30; minband: b19; maxband: b50), + (name: 'IC-731'; addr: $04; minband: b19; maxband: b28), + (name: 'IC-736'; addr: $40; minband: b19; maxband: b50), + (name: 'IC-738'; addr: $44; minband: b19; maxband: b28), + (name: 'IC-746'; addr: $56; minband: b19; maxband: b144), + (name: 'IC-746PRO'; addr: $66; minband: b19; maxband: b144), + (name: 'IC-7400'; addr: $66; minband: b19; maxband: b144), + + (name: 'IC-750'; addr: $1C; minband: b19; maxband: b28), + (name: 'IC-756'; addr: $50; minband: b19; maxband: b50), + (name: 'IC-756PRO'; addr: $5C; minband: b19; maxband: b50), + (name: 'IC-756PROII'; addr: $64; minband: b19; maxband: b50), + (name: 'IC-760'; addr: $1E; minband: b19; maxband: b28), + (name: 'IC-760PRO'; addr: $2C; minband: b19; maxband: b28), + (name: 'IC-775'; addr: $46; minband: b19; maxband: b28), + (name: 'IC-780'; addr: $26; minband: b19; maxband: b28), + (name: 'IC-820'; addr: $42; minband: b144; maxband: b430), + (name: 'IC-821'; addr: $4C; minband: b144; maxband: b430), + (name: 'IC-910'; addr: $60; minband: b144; maxband: b1200), + (name: 'IC-970'; addr: $2E; minband: b144; maxband: b1200), + (name: 'IC-275'; addr: $10; minband: b144; maxband: b144), + (name: 'IC-375'; addr: $14; minband: b430; maxband: b430) + ); + + + BaseMHz : array[b19..b10g] of LongInt = + ( 1900000, + 3500000, + 7000000, + 10000000, + 14000000, + 18000000, + 21000000, + 24000000, + 28000000, + 50000000, + 144000000, + 430000000, + 1200000000, + 0, + 0, + 0); + + VFOString : array[0..1] of string = + ('VFO A', 'VFO B'); + +type + TVirtualRig = record + Callsign : string; + Band : TBand; + Mode : TMode; + FirstTime : Boolean; + end; + + TRig = class + FILO : boolean; // FILO buffer flag used for YAESU + DebugLabel : TLabel; + Name : string; + _freqoffset : LongInt; // freq offset for transverters in Hz + _minband, _maxband : TBand; + _rignumber : Integer; + FreqMem : array[b19..b10g, mCW..mOther] of LongInt; + TerminatorCode : char; + BufferString : string; + _currentfreq : array[0..1] of LongInt; // in Hz + _currentband : TBand; + _currentmode : TMode; + _currentvfo : integer; // 0 : VFO A; 1 : VFO B + _lastcallsign : string; + Comm : TCommPortDriver; // points to the right CommPortDriver + LastFreq : LongInt; + //LastMode : TMode; + RigAddr : byte; // for icom + + ModeWidth : array[mCW..mOther] of Integer; // used in icom + + constructor Create(RigNum : integer); virtual; + destructor Destroy; virtual; + function Selected : boolean; + function CurrentFreqHz : LongInt; //in Hz + function CurrentFreqKHz : LongInt; + function CurrentFreqkHzStr : string; + procedure PallingProcess; virtual; + procedure SetMode(Q : TQSO); virtual; abstract; + procedure SetBand(Q : TQSO); virtual; // abstract; + procedure ExecuteCommand(S : string); virtual; abstract; + procedure PassOnRxData(S : string); virtual; + procedure ParseBufferString; virtual; abstract; + procedure RitClear; virtual; abstract; + procedure SetFreq(Hz : LongInt); virtual; abstract; + procedure Reset; virtual; abstract; // called when user wants to reset the rig + // after power outage etc + procedure SetVFO(i : integer); virtual; abstract; // A:0, B:1 + procedure ToggleVFO; + procedure VFOAEqualsB; virtual; + procedure UpdateStatus; virtual;// Renews RigControl Window and Main Window + procedure WriteData(str : string); + procedure InquireStatus; virtual; abstract; + procedure MoveToLastFreq; virtual; + procedure SetStopBits(i : byte); + procedure SetBaudRate(i : integer); + end; + + TTS690 = class(TRig) // TS-450 as well + _CWR : boolean; // CW-R flag + constructor Create(RigNum : integer); override; + destructor Destroy; override; + procedure SetMode(Q : TQSO); override; + //procedure SetBand(Q : TQSO); override; + procedure ExecuteCommand(S : string); override; + procedure ParseBufferString; override; + procedure RitClear; override; + procedure SetFreq(Hz : LongInt); override; + procedure Reset; override; + procedure SetVFO(i : integer); override; + procedure InquireStatus; override; + end; + + TTS2000 = class(TTS690) + constructor Create(RigNum : integer); override; + end; + + TTS2000P = class(TTS2000) + constructor Create(RigNum : integer); override; + Procedure PallingProcess; override; + destructor Destroy; override; + end; + + TICOM = class(TRig) // Icom CI-V + MyAddr : Byte; + //RigAddr : Byte; + constructor Create(RigNum : integer); override; + destructor Destroy; override; + procedure SetMode(Q : TQSO); override; + //procedure SetBand(Q : TQSO); override; + procedure ExecuteCommand(S : string); override; + procedure ParseBufferString; override; + procedure RitClear; override; + procedure SetFreq(Hz : LongInt); override; + procedure Reset; override; + procedure SetVFO(i : integer); override; + procedure InquireStatus; override; + + procedure ICOMWriteData(S : string); + end; + + TIC756 = class(TICOM) + procedure SetVFO(i : integer); override; + end; + + TFT1000MP = class(TRig) + WaitSize : integer; + constructor Create(RigNum : integer); override; + destructor Destroy; override; + procedure SetMode(Q : TQSO); override; + //procedure SetBand(Q : TQSO); override; + procedure ExecuteCommand(S : string); override; + procedure ParseBufferString; override; + procedure RitClear; override; + procedure SetFreq(Hz : LongInt); override; + procedure Reset; override; + procedure SetVFO(i : integer); override; + procedure InquireStatus; override; + procedure PallingProcess; override; + procedure PassOnRxData(S : string); override; + end; + + TMARKVF = class(TFT1000MP) + procedure ExecuteCommand(S : string); override; + procedure RitClear; override; + end; + + TFT1000 = class(TFT1000MP) + procedure ExecuteCommand(S : string); override; + procedure RitClear; override; + procedure SetVFO(i : integer); override; + end; + + TMARKV = class(TFT1000MP) + procedure ExecuteCommand(S : string); override; + procedure RitClear; override; + procedure SetVFO(i : integer); override; + end; + + TFT847 = class(TFT1000MP) + constructor Create(RigNum : integer); override; + destructor Destroy; override; + procedure ExecuteCommand(S : string); override; + procedure RitClear; override; + procedure SetVFO(i : integer); override; + procedure SetFreq(Hz : LongInt); override; + procedure SetMode(Q : TQSO); override; + procedure PallingProcess; override; + end; + + TFT817 = class(TFT847) + procedure SetFreq(Hz : LongInt); override; + procedure SetMode(Q : TQSO); override; + end; + + TFT920 = class(TFT1000MP) + constructor Create(RigNum : integer); override; + procedure ExecuteCommand(S : string); override; + end; + + TFT100 = class(TFT1000MP) + constructor Create(RigNum : integer); override; + procedure ExecuteCommand(S : string); override; + procedure SetVFO(i : integer); override; + procedure RitClear; override; + end; + + TJST145 = class(TRig) // or JST245 + CommOn, CommOff : string; + constructor Create(RigNum : integer); override; + destructor Destroy; override; + procedure SetMode(Q : TQSO); override; + //procedure SetBand(Q : TQSO); override; + procedure ExecuteCommand(S : string); override; + procedure ParseBufferString; override; + //procedure RitClear; override; + procedure SetFreq(Hz : LongInt); override; + procedure Reset; override; + procedure SetVFO(i : integer); override; + procedure InquireStatus; override; + procedure PallingProcess; override; + end; + + TOmni = class(TRig) + constructor Create(RigNum : integer); override; + destructor Destroy; override; + procedure PassOnRxData(S : string); override; + procedure RitClear; override; + procedure SetFreq(Hz : LongInt); override; + procedure SetMode(Q : TQSO); override; + procedure InquireStatus; override; + procedure SetVFO(i : integer); override; + procedure UpdateStatus; override; + procedure Reset; override; + end; + + TRigControl = class(TForm) + dispMode: TLabel; + Button1: TButton; + RigLabel: TLabel; + Timer1: TTimer; + Label2: TLabel; + Label3: TLabel; + PallingTimer: TTimer; + DebugLabel: TLabel; + ZCom1: TCommPortDriver; + ZCom2: TCommPortDriver; + ZCom3: TCommPortDriver; + dispFreqA: TStaticText; + dispFreqB: TStaticText; + dispVFO: TStaticText; + btnOmniRig: TButton; + procedure CreateParams(var Params: TCreateParams); override; + procedure FormCreate(Sender: TObject); + //procedure CommPort1RxChar(Sender: TObject; Count: Integer); + procedure FormDestroy(Sender: TObject); + procedure Button1Click(Sender: TObject); + //procedure Button2Click(Sender: TObject); + procedure Timer1Timer(Sender: TObject); + procedure PallingTimerTimer(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure ZCom1ReceiveData(Sender: TObject; DataPtr: Pointer; + DataSize: Cardinal); + procedure btnOmniRigClick(Sender: TObject); + //procedure SetMode(Q : TQSO); + private + { Private declarations } + procedure VisibleChangeEvent(Sender: TObject); + procedure RigTypeChangeEvent(Sender: TObject; RigNumber: Integer); + procedure StatusChangeEvent(Sender: TObject; RigNumber: Integer); + procedure ParamsChangeEvent(Sender: TObject; RigNumber: Integer; Params: Integer); + procedure CustomReplyEvent(Sender: TObject; RigNumber: Integer; Command, + Reply: OleVariant); + public + Rig1 : TRig; + Rig2 : TRig; + Rig : TRig; + OmniRig : TOmniRigX; + TempFreq : array [b19..HiBand] of Double; // temp. freq storage when rig is not connected. in kHz + { Public declarations } + VirtualRig : array[1..MAXVIRTUALRIG] of TVirtualRig; + _currentrig : integer; // 1 or 2 + _maxrig : integer; // default = 2. may be larger with virtual rigs + procedure SetSerialCWKeying(PortNr : integer); + function StatusSummaryFreq(kHz : integer): string; // returns current rig's band freq mode + function StatusSummaryFreqHz(Hz : integer): string; // returns current rig's band freq mode + function StatusSummary: string; // returns current rig's band freq mode + procedure ImplementOptions; + procedure SetCurrentRig(N : integer); + function GetCurrentRig : integer; + function ToggleCurrentRig : integer; + procedure SetBandMask; + function CheckSameBand(B : TBand) : boolean; // returns true if inactive rig is in B + end; + +function GetBand(Hz : LongInt) : integer; //Returns -1 if Hz is outside ham bands + +var + RigControl: TRigControl; + +implementation + +uses UOptions, Main, UFreqList, UZLinkForm, UBandScope2; + +{$R *.DFM} + +function kHzStr(Hz : LongInt) : string; +var s : string; +begin + s := IntToStr(Hz mod 1000); + while length(s) < 3 do + s := '0' + s; + s := IntToStr(Hz div 1000) + '.' + s; + Result := s; +end; + +function GetBand(Hz : LongInt) : integer; //Returns -1 if Hz is outside ham bands +var i : LongInt; +begin + i := -1; + case Hz of + 1800000..1999999 : i := 0; + 3000000..3999999 : i := 1; + 6900000..7999999 : i := 2; + 9900000..11000000 : i := 3; + 13900000..14999999 : i := 4; + 17500000..18999999 : i := 5; + 20900000..21999999 : i := 6; + 23500000..24999999 : i := 7; + 27800000..29999999 : i := 8; + 49000000..59000000 : i := 9; + 140000000..149999999 : i := 10; + 400000000..450000000 : i := 11; + 1200000000..1299999999 : i := 12; +{ + 2400000000..2499999999 : i := 13; + 5600000000..5699999999 : i := 14; +10000000000..90000000000 : i := 15; } + end; + Result := i; +end; + +procedure TRigControl.SetSerialCWKeying(PortNr : integer); +begin + ZCom3.Port := TPortNumber(PortNr); + ZCom3.Connect; +end; + +function TRigControl.StatusSummaryFreq(kHz : integer): string; // returns current rig's band freq mode +var s, ss : string; +begin + s := ''; + //if Rig <> nil then + //begin + if Options.Settings._multistation = True then + ss := '30' + else + ss := IntToStr(Ord(Main.CurrentQSO.QSO.Band)); + ss := FillRight(ss, 3); + s := ss + s; + s := s + FillRight(MHzString[Main.CurrentQSO.QSO.Band], 5); + s := s + FillRight(IntToStr(kHz), 8); + s := s + FillRight(ModeString[Main.CurrentQSO.QSO.Mode], 5); + ss := TimeToStr(CurrentTime); + if Main.CurrentQSO.QSO.CQ then + ss := 'CQ '+ss+' ' + //ss := ss + ' CQ ' + else + ss := 'SP '+ss+' '; + //ss := ss + ' SP '; + s := s + ss + ' ['+Options.Settings._pcname+']'; + //end; + Result := s; +end; + +function TRigControl.StatusSummaryFreqHz(Hz : integer): string; // returns current rig's band freq mode +var s, ss : string; +begin + s := ''; + //if Rig <> nil then + //begin + if Options.Settings._multistation = True then + ss := '30' + else + ss := IntToStr(Ord(Main.CurrentQSO.QSO.Band)); + ss := FillRight(ss, 3); + s := ss + s; + s := s + FillRight(MHzString[Main.CurrentQSO.QSO.Band], 5); + s := s + FillRight(FloatToStrF(Hz / 1000.0, ffFixed, 12, 1), 8); + s := s + FillRight(ModeString[Main.CurrentQSO.QSO.Mode], 5); + ss := TimeToStr(CurrentTime); + if Main.CurrentQSO.QSO.CQ then + //ss := ss + ' CQ ' + ss := 'CQ '+ss+' ' + else + ss := 'SP '+ss+' '; + //ss := ss + ' SP '; + s := s + ss + ' ['+Options.Settings._pcname+']'; + //end; + Result := s; +end; + +function TRigControl.StatusSummary: string; // returns current rig's band freq mode +var s, ss : string; +begin + Result := ''; + if Rig = nil then + exit; + if Rig.CurrentFreqkHz > 60000 then + Result := StatusSummaryFreq(Rig.CurrentFreqKHz) + else + Result := StatusSummaryFreqHz(Rig.CurrentFreqHz); +end; + +function TRigControl.CheckSameBand(B : TBand) : boolean; // returns true if inactive rig is in B +var R : TRig; +begin + Result := False; + if _currentrig = 1 then + R := Rig2 + else + R := Rig1; + if R <> nil then + if R._currentband = B then + Result := True; +end; + +procedure TRigControl.SetCurrentRig(N : integer); +var str : string; +begin + if (N > _maxrig) or (N < 0) then + exit; + if Rig <> nil then + begin + str := Main.CurrentQSO.QSO.Callsign; + if length(str) > 0 then + if str[1] = ',' then + str := ''; + Rig._lastcallsign := str; + end + else // could be virtual rig + begin + if _currentrig > 0 then + begin + str := Main.CurrentQSO.QSO.Callsign; + if length(str) > 0 then + if str[1] = ',' then + str := ''; + VirtualRig[_currentrig].Callsign := str; + VirtualRig[_currentrig].Band := Main.CurrentQSO.QSO.Band; + VirtualRig[_currentrig].Mode := Main.CurrentQSO.QSO.Mode; + end; + end; + + _currentrig := N; + Rig := nil; + case _currentrig of + 1 : Rig := Rig1; + 2 : Rig := Rig2; + end; + + if Rig = nil then + begin + if _currentrig > 0 then + begin // virtual rig + RigLabel.Caption := 'Current rig : '+IntToStr(_currentrig)+' (Virtual)'; + BGK32Lib.SetRigFlag(0); + if VirtualRig[_currentrig].FirstTime then + begin + VirtualRig[_currentrig].FirstTime := False; + end + else + begin + //RigControl.dispVFO.Caption := VFOString[_currentvfo]; + MainForm.UpdateMode(VirtualRig[_currentrig].Mode); + //RigControl.dispMode.Caption := ModeString[_currentmode]; + MainForm.UpdateBand(VirtualRig[_currentrig].Band); + //RigControl.dispFreq.Caption :=kHzStr(_currentfreq)+' kHz'; + //if VirtualRig[_currentrig].Callsign <> '' then + MainForm.CallsignEdit.Text := VirtualRig[_currentrig].Callsign; + str := 'R'+IntToStr(_currentrig); + MainForm.StatusLine.Panels[1].Text := str; + end; + end + else + begin + RigLabel.Caption := 'Current rig : '+IntToStr(_currentrig)+' (None)'; + BGK32Lib.SetRigFlag(0); + MainForm.StatusLine.Panels[1].Text := 'R'+IntToStr(_currentrig); + end; + end + else + begin + Rig.InquireStatus; + RigLabel.Caption := 'Current rig : '+IntToStr(_currentrig)+' ('+Rig.Name+')'; + BGK32Lib.SetRigFlag(_currentrig); + Rig.UpdateStatus; + //if Rig._lastcallsign <> '' then + MainForm.CallsignEdit.Text := Rig._lastcallsign; + end; +end; + +procedure TRigControl.SetBandMask; +var B : TBand; +begin + B := b19; + case Options.Settings._banddatamode of + 1 : if Rig1 <> nil then + B := Rig1._currentband; + 2 : if Rig2 <> nil then + B := Rig2._currentband; + 3 : B := Main.CurrentQSO.QSO.Band; + end; + BGK32LIB._bandmask := (Options.Settings._BandData[B] * 16); + BGK32LIB.UpdateDataPort; +end; + +function TRigControl.GetCurrentRig : integer; +begin + Result := _currentrig; +end; + +function TRigControl.ToggleCurrentRig : integer; +var i : integer; +begin + {if _currentrig = 1 then + i := 2 + else + i := 1;} + if _currentrig < _maxrig then + i := _currentrig + 1 + else + i := 1; + + SetCurrentRig(i); // _currentrig is changed by SetCurrentRig; + Result := _currentrig; +end; + +procedure TRigControl.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TRig.PallingProcess; +begin +end; + +procedure TRig.SetStopBits(i : byte); +begin + case i of + 1 : Comm.StopBits := sb1BITS; + 2 : Comm.StopBits := sb2BITS; + end; +end; + +procedure TRig.SetBaudRate(i : integer); +begin + if i = 300 then + Comm.BaudRate := br300; + if i = 1200 then + Comm.BaudRate := br1200; + if i = 2400 then + Comm.BaudRate := br2400; + if i = 4800 then + Comm.BaudRate := br4800; + if i = 9600 then + Comm.BaudRate := br9600; +end; + +function TRig.Selected : boolean; +begin + if _rignumber = RigControl._currentrig then + Result := True + else + Result := False; +end; + +procedure TTS690.SetVFO(i : integer); // A:0, B:1 +begin + if (i > 1) or (i < 0) then + exit; + _currentvfo := i; + if i = 0 then + WriteData('FR0;FT0;') + else + WriteData('FR1;FT1;'); + if Selected then + UpdateStatus; +end; + +procedure TJST145.SetVFO(i : integer); // A:0, B:1 +begin + if (i > 1) or (i < 0) then + exit; + _currentvfo := i; + if i = 0 then + WriteData(CommOn + 'FA'+_CR + CommOff) + else + WriteData(CommOn + 'FB'+_CR + CommOff); + + WriteData('I1'+_CR); + if Selected then + UpdateStatus; +end; + +procedure TICOM.SetVFO(i : integer); // A:0, B:1 +begin + if (i > 1) or (i < 0) then + exit; + _currentvfo := i; + if i = 0 then + ICOMWriteData(Chr($07)+Chr($00)) + else + ICOMWriteData(Chr($07)+Chr($01)); + if Selected then + UpdateStatus; +end; + +procedure TIC756.SetVFO(i : integer); // A:0, B:1 +begin + if (i > 1) or (i < 0) then + exit; + if _currentvfo <> i then + begin + _currentvfo := i; + ICOMWriteData(Chr($07)+Chr($B0)); + end; + if Selected then + UpdateStatus; +end; + +procedure TFT1000MP.SetVFO(i : integer); // A:0, B:1 +begin + if (i > 1) or (i < 0) then + exit; + _currentvfo := i; + if i = 0 then + WriteData(_nil3 + Chr(0)+ Chr($05)) + else + WriteData(_nil3 + Chr(2)+ Chr($05)); + if Selected then + UpdateStatus; +end; + +procedure TFT1000.ExecuteCommand(S : string); +var i, j : LongInt; + M : TMode; +begin + if length(S) = 32 then + begin + if _currentvfo = 0 then + i := ord(S[8]) + else + i := ord(S[8+16]); + M := mOther; + case i of + 0, 1 : M := mSSB; + 2 : M := mCW; + 3 : M := mAM; + 4 : M := mFM; + 5 : M := mRTTY; + 6 : M := mOther; + end; + _currentmode := M; + + i := ord(S[2])*256*256 + ord(S[3])*256 + ord(S[4]); + i := i * 10; + _currentfreq[0] := i; + i := i + _freqoffset; + + if _currentvfo = 0 then + begin + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[0]; + end; + + i := ord(S[18])*256*256 + ord(S[19])*256 + ord(S[20]); + i := i * 10; + _currentfreq[1] := i; + i := i + _freqoffset; + + if _currentvfo = 1 then + begin + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[1]; + end; + + end; + if Selected then + UpdateStatus; +end; + +procedure TFT1000.RitClear; +begin + WriteData(_nil3 + Chr($FF) + Chr($09)); +end; + +procedure TFT1000.SetVFO(i : integer); // A:0, B:1 +begin + if (i > 1) or (i < 0) then + exit; + _currentvfo := i; + if i = 0 then + WriteData(_nil3 + Chr(0)+ Chr($05)) + else + WriteData(_nil3 + Chr(1)+ Chr($05)); + if Selected then + UpdateStatus; +end; + +procedure TMARKV.ExecuteCommand(S : string); +var i, j : LongInt; + M : TMode; +begin + if length(S) = 32 then + begin + if _currentvfo = 0 then + i := ord(S[8]) + else + i := ord(S[8+16]); + M := mOther; + case i of + 0, 1 : M := mSSB; + 2 : M := mCW; + 3 : M := mAM; + 4 : M := mFM; + 5 : M := mRTTY; + 6 : M := mOther; + end; + _currentmode := M; + + i :=(ord(S[5]) mod 16)*100000000 + + (ord(S[5]) div 16)*10000000 + + (ord(S[4]) mod 16)*1000000 + + (ord(S[4]) div 16)*100000 + + (ord(S[3]) mod 16)*10000 + + (ord(S[3]) div 16)*1000 + + (ord(S[2]) mod 16)*100 + + (ord(S[2]) div 16)*10; + _currentfreq[0] := i; + i := i + _freqoffset; + + if _currentvfo = 0 then + begin + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[0]; + end; + + i :=(ord(S[21]) div 16)*100000000 + + (ord(S[21]) mod 16)*10000000 + + (ord(S[20]) div 16)*1000000 + + (ord(S[20]) mod 16)*100000 + + (ord(S[19]) div 16)*10000 + + (ord(S[19]) mod 16)*1000 + + (ord(S[18]) div 16)*100 + + (ord(S[18]) mod 16)*10; + _currentfreq[1] := i; + i := i + _freqoffset; + + if _currentvfo = 1 then + begin + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[1]; + end; + + end; + if Selected then + UpdateStatus; +end; + +procedure TMARKV.RitClear; +begin + WriteData(_nil3 + Chr($FF) + Chr($09)); +end; + +procedure TMARKV.SetVFO(i : integer); // A:0, B:1 +begin + if (i > 1) or (i < 0) then + exit; + _currentvfo := i; + if i = 0 then + WriteData(_nil3 + Chr(0)+ Chr($05)) + else + WriteData(_nil3 + Chr(1)+ Chr($05)); + if Selected then + UpdateStatus; +end; + +procedure TMARKVF.ExecuteCommand(S : string); +var i, j : LongInt; + M : TMode; +begin + if length(S) = 32 then + begin + if _currentvfo = 0 then + i := ord(S[8]) + else + i := ord(S[8+16]); + M := mOther; + case i of + 0, 1 : M := mSSB; + 2 : M := mCW; + 3 : M := mAM; + 4 : M := mFM; + 5 : M := mRTTY; + 6 : M := mOther; + end; + _currentmode := M; + + i := ord(S[2])*256*256*256 + ord(S[3])*256*256 + ord(S[4])*256 + ord(s[5]); + i := i * 10; + _currentfreq[0] := i; + i := i + _freqoffset; + + if _currentvfo = 0 then + begin + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[0]; + end; + + i := ord(S[18])*256*256*256 + ord(S[19])*256*256 + ord(S[20])*256 + ord(s[21]); + i := i * 10; + _currentfreq[1] := i; + i := i + _freqoffset; + + if _currentvfo = 1 then + begin + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[1]; + end; + + end; + if Selected then + UpdateStatus; +end; + +procedure TMARKVF.RitClear; +begin + WriteData(_nil3 + Chr($FF) + Chr($09)); +end; + + +procedure TRig.ToggleVFO; +begin + if _currentvfo = 0 then + SetVFO(1) + else + SetVFO(0); +end; + +procedure TRig.WriteData(str : string); +var i : integer; +begin + //repeat until Comm.OutQueCount = 0; + if Comm = nil then + exit; + if Comm.Connected then + Comm.SendString(str); +end; + +procedure TRigControl.ImplementOptions; +var rname : string; + i : integer; +begin + UseAFSK := Options.Settings._AFSK; + + if Rig1 <> nil then + Rig1.Free; + Rig1 := nil; + + if Options.Rig1NameStr = 'Omni-Rig' then + begin + Rig1 := TOmni.Create(1); + Rig1._minband := b19; + Rig1._maxband := b1200; + btnOmniRig.Enabled := True; + end + else + btnOmniRig.Enabled := False; + + if Options.Settings._rig1port in [1..6] then + begin + rname := Options.Rig1NameStr; + if rname = 'None' then + exit; + + if rname = 'TS-690/450' then + begin + Rig1 := TTS690.Create(1); + Rig1._minband := b19; + Rig1._maxband := b50; + end; + if rname = 'TS-850' then + begin + Rig1 := TTS690.Create(1); + Rig1._minband := b19; + Rig1._maxband := b28; + end; + if rname = 'TS-790' then + begin + Rig1 := TTS690.Create(1); + Rig1._minband := b144; + Rig1._maxband := b1200; + end; + + if rname = 'TS-2000' then + begin + Rig1 := TTS2000.Create(1); + Rig1._minband := b19; + Rig1._maxband := b2400; + end; + + if rname = 'TS-2000/P' then + begin + Rig1 := TTS2000P.Create(1); + Rig1._minband := b19; + Rig1._maxband := b2400; + end; + + if rname = 'FT-1000MP' then + begin + Rig1 := TFT1000MP.Create(1); + Rig1._minband := b19; + Rig1._maxband := b28; + end; + + if rname = 'MarkV/FT-1000MP' then + begin + Rig1 := TMARKV.Create(1); + Rig1._minband := b19; + Rig1._maxband := b28; + end; + + if rname = 'FT-1000MP Mark-V Field' then + begin + Rig1 := TMARKVF.Create(1); + Rig1._minband := b19; + Rig1._maxband := b28; + end; + + if rname = 'FT-1000' then + begin + Rig1 := TFT1000.Create(1); + Rig1._minband := b19; + Rig1._maxband := b28; + end; + + if rname = 'FT-920' then + begin + Rig1 := TFT920.Create(1); + Rig1._minband := b19; + Rig1._maxband := b50; + end; + + if rname = 'FT-100' then + begin + Rig1 := TFT100.Create(1); + Rig1._minband := b19; + Rig1._maxband := b430; + end; + + if rname = 'FT-847' then + begin + Rig1 := TFT847.Create(1); + Rig1._minband := b19; + Rig1._maxband := b430; + end; + + if rname = 'FT-817' then + begin + Rig1 := TFT817.Create(1); + Rig1._minband := b19; + Rig1._maxband := b430; + end; + + if rname = 'JST-145' then + begin + Rig1 := TJST145.Create(1); + Rig1._minband := b19; + Rig1._maxband := b28; + end; + + if rname = 'JST-245' then + begin + Rig1 := TJST145.Create(1); + Rig1._minband := b19; + Rig1._maxband := b50; + end; + + if pos('IC-',rname) = 1 then + begin + if (pos('IC-775', rname) = 1) or (pos('IC-756', rname) = 1) then + Rig1 := TIC756.Create(1) + else + Rig1 := TICOM.Create(1); + for i := 1 to MAXICOM do + if rname = ICOMLIST[i].name then + break; + Rig1._minband := ICOMLIST[i].minband; + Rig1._maxband := ICOMLIST[i].maxband; + Rig1.RigAddr := ICOMLIST[i].addr; + end; + + Rig1.Name := rname; + + end; + + + if Rig2 <> nil then + Rig2.Free; + Rig2 := nil; + + if Options.Rig2NameStr = 'Omni-Rig' then + begin + Rig2 := TOmni.Create(2); + Rig2._minband := b19; + Rig2._maxband := b1200; + end; + + if Options.Settings._rig2port in [1..6] then + begin + rname := Options.Rig2NameStr; + if rname = 'None' then + exit; + + if rname = 'TS-690/450' then + begin + Rig2 := TTS690.Create(2); + Rig2._minband := b19; + Rig2._maxband := b50; + end; + if rname = 'TS-850' then + begin + Rig2 := TTS690.Create(2); + Rig2._minband := b19; + Rig2._maxband := b28; + end; + if rname = 'TS-790' then + begin + Rig2 := TTS690.Create(2); + Rig2._minband := b144; + Rig2._maxband := b1200; + end; + if rname = 'TS-2000' then + begin + Rig2 := TTS2000.Create(2); + Rig2._minband := b19; + Rig2._maxband := b2400; + end; + if rname = 'TS-2000/P' then + begin + Rig2 := TTS2000P.Create(2); + Rig2._minband := b19; + Rig2._maxband := b2400; + end; + if rname = 'FT-1000MP' then + begin + Rig2 := TFT1000MP.Create(2); + Rig2._minband := b19; + Rig2._maxband := b28; + end; + + if rname = 'MarkV/FT-1000MP' then + begin + Rig2 := TMARKV.Create(2); + Rig2._minband := b19; + Rig2._maxband := b28; + end; + + if rname = 'FT-1000MP Mark-V Field' then + begin + Rig1 := TMARKVF.Create(1); + Rig1._minband := b19; + Rig1._maxband := b28; + end; + + if rname = 'FT-1000' then + begin + Rig2 := TFT1000.Create(2); + Rig2._minband := b19; + Rig2._maxband := b28; + end; + + if rname = 'FT-920' then + begin + Rig2 := TFT920.Create(2); + Rig2._minband := b19; + Rig2._maxband := b50; + end; + + if rname = 'FT-100' then + begin + Rig2 := TFT100.Create(2); + Rig2._minband := b19; + Rig2._maxband := b430; + end; + + if rname = 'FT-847' then + begin + Rig2 := TFT847.Create(2); + Rig2._minband := b19; + Rig2._maxband := b430; + end; + + if rname = 'FT-817' then + begin + Rig2 := TFT817.Create(2); + Rig2._minband := b19; + Rig2._maxband := b430; + end; + + if rname = 'JST-145' then + begin + Rig2 := TJST145.Create(2); + Rig2._minband := b19; + Rig2._maxband := b28; + end; + if rname = 'JST-245' then + begin + Rig2 := TJST145.Create(2); + Rig2._minband := b19; + Rig2._maxband := b50; + end; + + if pos('IC-',rname) = 1 then + begin + if (pos('IC-775', rname) = 1) or (pos('IC-756', rname) = 1) then + Rig2 := TIC756.Create(2) + else + Rig2 := TICOM.Create(2); + for i := 1 to MAXICOM do + if rname = ICOMLIST[i].name then + break; + Rig2._minband := ICOMLIST[i].minband; + Rig2._maxband := ICOMLIST[i].maxband; + Rig2.RigAddr := ICOMLIST[i].addr; + end; + + Rig2.Name := rname; + end; + + //SetCurrentRig(_currentrig); + + Rig := nil; + case _currentrig of + 1 : Rig := Rig1; + 2 : Rig := Rig2; + end; + + if Rig1 <> nil then + begin + if Options.Settings._transverter1 then + Rig1._freqoffset := 1000*Options.Settings._transverteroffset1 + else + Rig1._freqoffset := 0; + end; + if Rig2 <> nil then + begin + if Options.Settings._transverter2 then + Rig2._freqoffset := 1000*Options.Settings._transverteroffset2 + else + Rig2._freqoffset := 0; + end; +end; + + +constructor TRig.Create(RigNum : integer); +var B : TBand; + M : TMode; + prtnr : integer; + P : TCommPortDriver; +begin + //inherited + for M := mCW to mOther do + ModeWidth[M] := -1; + + FILO := false; // used for YAESU + DebugLabel := RigControl.DebugLabel; + _freqoffset := 0; + _minband := b19; + _maxband := b10g; + Name := ''; + _rignumber := RigNum; + if _rignumber = 1 then + begin + prtnr := Options.Settings._rig1port; + Comm := RigControl.ZCom1; + end + else + begin + prtnr := Options.Settings._rig2port; + Comm := RigControl.ZCom2; + end; + Comm.Disconnect; + Comm.Port := TPortNumber(prtnr); + Comm.Connect; + + //Comm.FlowControl := fcDefault; + + TerminatorCode := ';'; + BufferString := ''; + + _currentmode := Main.CurrentQSO.QSO.Mode; //mCW; + + _currentband := b19; + B := Main.CurrentQSO.QSO.Band; + if (B >= _minband) and (B <= _maxband) then + _currentband := B; + + _currentfreq[0] := 0; + _currentfreq[1] := 0; + _currentvfo := 0; //VFO A + _lastcallsign := ''; + LastFreq := 0; + //LastMode := mCW; + for B := b19 to b10g do + for M := mCW to mOther do + FreqMem[B, M] := 0; + //UpdateStatus; +end; + +destructor TRig.Destroy; +begin + inherited; +end; + +procedure TRig.VFOAEqualsB; +begin +end; + +function TRig.CurrentFreqHz : LongInt; +begin + Result := _currentfreq[_currentvfo] + _freqoffset; +end; + +function TRig.CurrentFreqkHz : LongInt; +begin + Result := (_currentfreq[_currentvfo] + _freqoffset) div 1000; +end; + +function TRig.CurrentFreqkHzStr : string; +begin + Result := IntToStr(CurrentFreqkHz); +end; + +procedure TRig.PassOnRxData(S : string); +begin + BufferString := BufferString + S; + ParseBufferString; +end; + +procedure TFT1000MP.PassOnRxData(S : string); +var i : integer; +begin + if FILO then + begin + for i := length(S) downto 1 do + BufferString := S[i] + BufferString; + end + else + BufferString := BufferString + S; + ParseBufferString; +end; + +procedure TRig.MoveToLastFreq; +//var Q : TQSO; +begin + SetFreq(LastFreq); + //Q.QSO.Mode := LastMode; + //SetMode(Q); +end; + +constructor TTS690.Create(RigNum : integer); +begin + inherited; + Comm.BaudRate := br4800; + Comm.StopBits := sb2BITS; + TerminatorCode := ';'; + //Comm.FlowControl := fcNone; + _CWR := False; + WriteData('AI1;'); +end; + +constructor TTS2000.Create(RigNum : integer); +begin + //TRig.Create(RigNum); + inherited; + Comm.BaudRate := br9600; + Comm.StopBits := sb1BITS; + TerminatorCode := ';'; + WriteData('TC 1;'); + WriteData('AI2;'); + WriteData('IF;'); +end; + +constructor TTS2000P.Create(RigNum : integer); +begin + Inherited; + RigControl.PallingTimer.Interval := 250; + RigControl.PallingTimer.Enabled := True; +end; + +constructor TJST145.Create(RigNum : integer); +begin + inherited; + CommOn := 'H1'+ _CR; + CommOff := 'H0' + _CR; + Comm.BaudRate := br4800; + Comm.StopBits := sb1BITS; + TerminatorCode := _CR; + //Comm.FlowControl := fcDefault; + //WriteData(CommOff); + WriteData('I1' + _CR + 'L' + _CR); + //RigControl.PallingTimer.Interval := 250; + //RigControl.PallingTimer.Enabled := True; +end; + +constructor TICOM.Create(RigNum : integer); +begin + inherited; + Comm.BaudRate := br1200; + case Options.Settings._icombaudrate of + 0 : Comm.BaudRate := br300; + 1 : Comm.BaudRate := br1200; + 2 : Comm.BaudRate := br2400; + 3 : Comm.BaudRate := br4800; + 4 : Comm.BaudRate := br9600; + end; + + Comm.StopBits := sb1BITS; + TerminatorCode := Chr($FD); + + MyAddr := $E0; + RigAddr := $01; + SetVFO(0); + //WriteData('AI1;'); +end; + +procedure TICOM.ICOMWriteData(S : string); +begin + WriteData(Chr($FE)+Chr($FE)+Chr(RigAddr)+Chr(MyAddr)+ + S + Chr($FD)); +end; + +constructor TFT1000MP.Create(RigNum : integer); +begin + inherited; + WaitSize := 32; + Comm.BaudRate := br4800; + Comm.StopBits := sb2BITS; + RigControl.PallingTimer.Interval := 250; + RigControl.PallingTimer.Enabled := True; + //TerminatorCode := ';'; + //WriteData('AI1;'); +end; + +(* +constructor TFT847.Create(RigNum : integer); +begin + inherited; + WaitSize := 5; + WriteData(_nil4+_nil); + +end; +*) + +constructor TFT847.Create(RigNum : integer); +begin + inherited; + WaitSize := 5; + Comm.BaudRate := br4800; + Comm.StopBits := sb2BITS; + RigControl.PallingTimer.Interval := 250; + RigControl.PallingTimer.Enabled := True; + WriteData(Chr($00)+Chr($00)+Chr($00)+Chr($00)+Chr($00)); +end; + + + +constructor TFT920.Create(RigNum : integer); +begin + inherited; + WaitSize := 28; + //Comm.BaudRate := cbr4800; + //Comm.StopBits := sb20; + //RigControl.PallingTimer.Enabled := True; + //TerminatorCode := ';'; + //WriteData('AI1;'); +end; + +constructor TFT100.Create(RigNum : integer); +begin + inherited; + WaitSize := 32; +end; + +destructor TTS690.Destroy; +begin + WriteData('AI0;'); + inherited; +end; + +destructor TJST145.Destroy; +begin + WriteData(CommOff); + RigControl.PallingTimer.Enabled := False; + inherited; +end; + +destructor TTS2000P.Destroy; +begin + WriteData('AI0;'); + RigControl.PallingTimer.Enabled := False; + inherited; +end; + +destructor TICOM.Destroy; +begin + //WriteData('AI0;'); + inherited; +end; + +destructor TFT1000MP.Destroy; +begin + //WriteData('AI0;'); + RigControl.PallingTimer.Enabled := False; + inherited; +end; + +destructor TFT847.Destroy; +begin + WriteData(_nil4+Chr($80)); + RigControl.PallingTimer.Enabled := False; + inherited; +end; + + +procedure TTS690.ParseBufferString; +var i : integer; + temp : string; +begin + i := pos(TerminatorCode, BufferString); + while i > 0 do + begin + temp := copy(BufferString, 1, i); + Delete(BufferString, 1, i); + ExecuteCommand(temp); + i := pos(TerminatorCode, BufferString); + end; +end; + +procedure TJST145.ParseBufferString; // cloned from TS690 +var i : integer; + temp : string; +begin + i := pos(TerminatorCode, BufferString); + while i > 0 do + begin + temp := copy(BufferString, 1, i); + Delete(BufferString, 1, i); + ExecuteCommand(temp); + i := pos(TerminatorCode, BufferString); + end; +end; + +function HexStr(S : string) : string; +var i, j, k : integer; + SS : string; + B : Byte; +const _HEX : array[0..15] of char = ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'); +begin + SS := ''; + for i := 1 to length(S) do + begin + B := Ord(S[i]); + j := B div 16; + k := B mod 16; + if (j < 16) and (k < 16) then + SS := SS + '&' + _HEX[j] + _HEX[k] + else + SS := SS + '&xx'; + end; + Result := SS; +end; + +procedure TICOM.ParseBufferString; // same as ts690 +var i : integer; + temp : string; +begin + i := pos(TerminatorCode, BufferString); + + while i > 0 do + begin + temp := copy(BufferString, 1, i); + Delete(BufferString, 1, i); + +// RIGCONTROL.CAPTION := HEXSTR(temp); + + ExecuteCommand(temp); // string formatted at excecutecommand + i := pos(TerminatorCode, BufferString); + end; +end; + +function HexText(binstr : string) : string; +var i, hex : integer; +var x : string; +const hexarray = '0123456789ABCDEF'; +begin + x := ''; + for i := 1 to length(binstr) do + begin + hex := ord(binstr[i]); + x := x + '&' + hexarray[hex div 16 + 1] + hexarray[hex mod 16 + 1]; + end; + Result := x; +end; + +procedure TFT1000MP.PallingProcess; +begin + //WaitSize := 32; + WriteData(_nil3+Chr($03)+Chr($10)); +end; + +procedure TFT847.PallingProcess; +begin + WriteData(_nil4+Chr($03)); +end; + +procedure TTS2000P.PallingProcess; +begin + WriteData('IF;'); +end; + +procedure TJST145.PallingProcess; +begin + //WriteData(CommOn+'L'+_CR+CommOff); +end; + +procedure TFT1000MP.ParseBufferString; +var i : integer; + temp : string; + f : textfile; +begin + if Length(BufferString) > 2048 then + BufferString := ''; + if WaitSize = 0 then + exit; + if Length(BufferString) >= WaitSize then + begin + temp := copy(BufferString, 1, WaitSize); + ExecuteCommand(temp); + Delete(BufferString, 1, WaitSize); + end; +end; + +procedure TTS690.SetMode(Q : TQSO); +var command : string; + para : char; +begin +{1=LSB, 2=USB, 3=CW, 4=FM, 5=AM, 6=FSK, 7=CW-R, 8=FSK=R} + para := '3'; + case Q.QSO.Mode of + mSSB : if Q.QSO.Band <= b7 then + para := '1' + else + para := '2'; + mCW : if _CWR then para := '7' else para := '3'; + mFM : para := '4'; + mAM : para := '5'; + mRTTY : para := '6'; + end; + command := 'MD'+para+TerminatorCode; + WriteData(command); +end; + +procedure TJST145.SetMode(Q : TQSO); +var para : string; +begin + para := ''; + case Q.QSO.Mode of + mSSB : if Q.QSO.Band <= b7 then + para := 'D3' + else + para := 'D2'; + mCW : para := 'D1'; + mFM : para := 'D5'; + mAM : para := 'D4'; + mRTTY : para := 'D9'; + else + begin + exit; + end; + end; + WriteData(CommOn+para+_CR+CommOff); + WriteData('I1'+_CR); +end; + +procedure TICOM.SetMode(Q : TQSO); +var command : string; + para : byte; +begin + para := 3; + case Q.QSO.Mode of + mSSB : if Q.QSO.Band <= b7 then + para := 0 + else + para := 1; + mCW : para := 3; + mFM : para := 5; + mAM : para := 2; + mRTTY : para := 4; + end; + command := Chr($06)+Chr(para); + + if ModeWidth[Q.QSO.Mode] in [1..3] then + command := command + Chr(ModeWidth[Q.QSO.Mode]); + + ICOMWriteData(command); + + ICOMWriteData(Chr($04)); // request mode data +end; + +procedure TFT1000MP.SetMode(Q : TQSO); +var command : string; + para : Byte; +begin + para := 0; + + case Q.QSO.Mode of + mSSB : if Q.QSO.Band <= b7 then + para := 0 + else + para := 1; + mCW : para := 2; + mFM : para := 6; + mAM : para := 4; + mRTTY : para := 8; + mOther : para := $0a; + end; + + command := _nil3 + Chr(para) + Chr($0C); + WriteData(command); +end; + +procedure TRig.SetBand(Q : TQSO); +var f, ff : LongInt; +begin + if (Q.QSO.Band < _minband) or (Q.QSO.Band > _maxband) then + exit; + + _currentband := Q.QSO.Band; // ver 2.0e + + if FreqMem[Q.QSO.Band, Q.QSO.Mode] > 0 then + f := FreqMem[Q.QSO.Band, Q.QSO.Mode] + else + begin + ff := (_currentfreq[_currentvfo] + _freqoffset) mod 1000000; + if ff > 500000 then + ff := 0; + f := BaseMHz[Q.QSO.Band] + ff; + end; + SetFreq(f); + if Q.QSO.Mode = mSSB then + Self.SetMode(Q); +end; + +procedure TTS690.RitClear; +begin + WriteData('RC;'); +end; + +procedure TICOM.RitClear; +begin + //WriteData('RC;'); +end; + +procedure TFT1000MP.RitClear; +begin + WriteData(_nil2 + Chr($0F) + Chr($0) + Chr($09)); +end; + +procedure TTS690.InquireStatus; +begin + WriteData('IF;'); +end; + +procedure TJST145.InquireStatus; +begin + //WriteData(CommOn + 'L'+_CR + CommOff); +end; + +procedure TICOM.InquireStatus; +begin + //WriteData('IF;'); +end; + +procedure TFT1000MP.InquireStatus; +begin + //WriteData('IF;'); +end; + +procedure TTS690.Reset; +begin + WriteData('AI1;'); +end; + +procedure TJST145.Reset; +begin + BufferString := ''; + WriteData('I1'+_CR+ 'L'+ _CR); +end; + +procedure TICOM.Reset; +begin + //WriteData('AI1;'); +end; + +procedure TFT1000MP.Reset; +begin + BufferString := ''; + //WriteData('AI1;'); + //WriteData(_nil3 + Chr(1) + Chr($0e)); +end; + +procedure TTS690.SetFreq(Hz : LongInt); +var fstr : string; +begin + LastFreq := _currentfreq[_currentvfo]; + fstr := IntToStr(Hz); + while length(fstr) < 11 do + fstr := '0' + fstr; + if _currentvfo = 0 then + WriteData('FA'+fstr+';') + else + WriteData('FB'+fstr+';'); +end; + +procedure TJST145.SetFreq(Hz : LongInt); +var fstr : string; +begin + LastFreq := _currentfreq[_currentvfo]; + fstr := IntToStr(Hz); + while length(fstr) < 8 do + fstr := '0' + fstr; + if _currentvfo = 0 then + WriteData(CommOn+'F'+fstr+'A'+_CR+CommOff) + else + WriteData(CommOn+'F'+fstr+'B'+_CR+CommOff); + WriteData('I1'+_CR); +end; + +procedure TICOM.SetFreq(Hz : LongInt); +var fstr : string; + freq, i : LongInt; +begin + LastFreq := _currentfreq[_currentvfo]; + freq := Hz; + + if freq < 0 then // > 2.1GHz is divided by 100 and given a negative value. Not implemented yet + begin + fstr := chr(0); + freq := -1*freq; + end + else + begin + i := freq mod 100; + fstr := chr((i div 10)*16 + (i mod 10)); + freq := freq div 100; + end; + + i := freq mod 100; + fstr := fstr + chr((i div 10)*16 + (i mod 10)); + freq := freq div 100; + + i := freq mod 100; + fstr := fstr + chr((i div 10)*16 + (i mod 10)); + freq := freq div 100; + + i := freq mod 100; + fstr := fstr + chr((i div 10)*16 + (i mod 10)); + freq := freq div 100; + + if freq > 0 then + begin + i := freq mod 100; + fstr := fstr + chr((i div 10)*16 + (i mod 10)); + //freq := freq div 100; + end; + + fstr := Chr($05) + fstr; + + ICOMWriteData(fstr); + + fstr := Chr($03); + ICOMWriteData(fstr); // request freq data + +end; + +procedure TRigControl.VisibleChangeEvent(Sender: TObject); +begin +end; + +procedure TRigControl.RigTypeChangeEvent(Sender: TObject; RigNumber: Integer); +begin +end; + +procedure TRigControl.StatusChangeEvent(Sender: TObject; RigNumber: Integer); +begin +end; + +procedure TRigControl.ParamsChangeEvent(Sender: TObject; RigNumber: Integer; Params: Integer); +var + j: integer; + o_RIG : IRigX; + R : TRig; +begin + if RigNumber = 1 then + begin + o_RIG := OmniRig.Rig1; + R := Rig1; + end + else + begin + o_RIG := OmniRig.Rig2; + R := Rig2; + end; + + case o_RIG.Vfo of + PM_VFOA : R._currentvfo := 0; + PM_VFOB : R._currentvfo := 1; + end; + + R._currentfreq[0] := o_RIG.FreqA; + R._currentfreq[1] := o_RIG.FreqB; + + case o_RIG.Mode of + PM_CW_U, PM_CW_L : R._currentmode := mCW; + PM_SSB_U, PM_SSB_L : R._currentmode := mSSB; + PM_DIG_U, PM_DIG_L : R._currentmode := mOther; + PM_AM : R._currentmode := mAM; + PM_FM : R._currentmode := mFM; + end; + + if R._currentvfo = 0 then + begin + j := GetBand(R._currentfreq[0]); + if j >= 0 then + R._currentband := TBand(j); + R.FreqMem[R._currentband, R._currentmode] := R._currentfreq[0]; + end; + + if R._currentvfo = 1 then + begin + j := GetBand(R._currentfreq[1]); + if j >= 0 then + R._currentband := TBand(j); + R.FreqMem[R._currentband, R._currentmode] := R._currentfreq[1]; + end; + if R.Selected then + R.UpdateStatus; +end; + +procedure TRigControl.CustomReplyEvent(Sender: TObject; RigNumber: Integer; Command, + Reply: OleVariant); +begin +end; + +constructor TOmni.Create(RigNum : integer); +var M : TMode; + B : TBand; +begin + for M := mCW to mOther do + ModeWidth[M] := -1; + + FILO := false; // used for YAESU + DebugLabel := RigControl.DebugLabel; + _freqoffset := 0; + _minband := b19; + _maxband := b10g; + Name := ''; + _rignumber := RigNum; + TerminatorCode := ';'; + BufferString := ''; + + _currentmode := Main.CurrentQSO.QSO.Mode; //mCW; + + _currentband := b19; + B := Main.CurrentQSO.QSO.Band; + if (B >= _minband) and (B <= _maxband) then + _currentband := B; + + _currentfreq[0] := 0; + _currentfreq[1] := 0; + _currentvfo := 0; //VFO A + _lastcallsign := ''; + LastFreq := 0; + for B := b19 to b10g do + for M := mCW to mOther do + FreqMem[B, M] := 0; + + + With RigControl do begin + ZCom1.Disconnect; + ZCom2.Disconnect; + OmniRig.OnVisibleChange := VisibleChangeEvent; + OmniRig.OnRigTypeChange := RigTypeChangeEvent; + OmniRig.OnStatusChange := StatusChangeEvent; + OmniRig.OnParamsChange := ParamsChangeEvent; + OmniRig.OnCustomReply := CustomReplyEvent; + OmniRig.Connect; + + {if _rignumber = 1 then + RigX := OmniRig.Rig1 + else + RigX := OmniRig.Rig2;} + end; + if _rignumber = 1 then + Self.Name := 'Omni-Rig: '+RigControl.OmniRig.Rig1.Get_RigType + else + Self.Name := 'OMni-Rig: '+RigControl.OmniRig.Rig2.Get_RigType; +end; + +procedure TOmni.RitClear; +begin + if _rignumber = 1 then + RigControl.OmniRig.Rig1.ClearRit + else + if _rignumber = 2 then + RigControl.OmniRig.Rig2.ClearRit; +end; + +procedure TOmni.SetFreq(Hz : LongInt); +var o_RIG : IRigX; +begin + if _rignumber = 1 then + o_RIG := RigControl.OmniRig.Rig1 + else + o_RIG := RigControl.OmniRig.Rig2; + LastFreq := _currentfreq[_currentvfo]; + + if _currentvfo = 0 then + o_RIG.FreqA := Hz + else + o_RIG.FreqB := Hz; +end; + +procedure TOmni.SetMode(Q : TQSO); +var o_RIG : IRigX; +begin + if _rignumber = 1 then + o_RIG := RigControl.OmniRig.Rig1 + else + o_RIG := RigControl.OmniRig.Rig2; + case Q.QSO.Mode of + mSSB : if Q.QSO.Band <= b7 then + o_RIG.Mode := PM_SSB_L + else + o_RIG.Mode := PM_SSB_U; + + mCW : o_RIG.Mode := PM_CW_U; + mFM : o_RIG.Mode := PM_FM; + mAM : o_RIG.Mode := PM_AM; + mRTTY : o_RIG.Mode := PM_DIG_L; + end; +end; + +procedure TOmni.SetVFO(i : integer); +var o_RIG : IRigX; +begin + if _rignumber = 1 then + o_RIG := RigControl.OmniRig.Rig1 + else + o_RIG := RigControl.OmniRig.Rig2; + + if (i > 1) or (i < 0) then + exit; + _currentvfo := i; + + if i = 0 then + o_Rig.Vfo := PM_VFOA + else + o_Rig.Vfo := PM_VFOB; + + if Selected then + UpdateStatus; +end; + +procedure TOmni.InquireStatus; +begin + UpdateStatus; +end; + +procedure TOmni.UpdateStatus; +var _rname : string; +begin + inherited; + if _rignumber = 1 then + _rname := RigControl.OmniRig.Rig1.RigType + else + _rname := RigControl.OmniRig.Rig2.RigType; + RigControl.RigLabel.Caption := 'Current rig : '+IntToStr(RigControl._currentrig)+' Omni-Rig: '+_rname; +end; + +procedure TOmni.Reset; +begin +end; + +destructor TOmni.Destroy; +begin + inherited; +end; + +procedure TOmni.PassOnRxData(S : string); +begin +end; + +function dec2hex(i : integer) : integer; +begin + if i < 10 then + Result := i + else + begin + Result := 16*(i div 10) + (i mod 10); + end; +end; + +procedure TFT1000MP.SetFreq(Hz : LongInt); +var fstr : string; + i, j : LongInt; +begin + LastFreq := _currentfreq[_currentvfo]; + + i := Hz; + i := i div 10; + + j := i mod 100; + fstr := chr(dec2hex(j)); + i := i div 100; + + j := i mod 100; + fstr := fstr + chr(dec2hex(j)); + i := i div 100; + + j := i mod 100; + fstr := fstr + chr(dec2hex(j)); + i := i div 100; + + j := i mod 100; + fstr := fstr + chr(dec2hex(j)); + i := i div 100; + + fstr := fstr + chr($0a); + + WriteData(fstr); +end; + +procedure TTS690.ExecuteCommand(S : string); +var command : string; + param, temp : string; + i, j : LongInt; + aa : integer; + B : TBand; + M : TMode; +begin + //RigControl.label1.caption := S; + if length(S) < 2 then + exit; + command := S[1]+S[2]; + + if (command = 'FA') or (command = 'FB') then + begin + if command = 'FA' then + aa := 0 + else + aa := 1; + temp := copy(S, 3, 11); + i := 0; + try + i := StrToInt(temp); + except + on EConvertError do + begin + end; + end; + _currentfreq[aa] := i; + i := i + _freqoffset; // transverter + + if _currentvfo = aa then + begin + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[_currentvfo]; + end; + + if Selected then + UpdateStatus; + end; + + if (command = 'FT') or (command = 'FR') then // 2.1j + begin + if S[3] = '0' then + aa := 0 + else + if S[3] = '1' then + aa := 1 + else + exit; + _currentvfo := aa; + j := GetBand(_currentfreq[aa]); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[_currentvfo]; + if Selected then + UpdateStatus; + end; + + + if command = 'IF' then + begin + if length(S) < 38 then + exit; + + case S[31] of + '0' : _currentvfo := 0; + '1' : _currentvfo := 1; + //'2' : memory + end; + + temp := copy(S, 3, 11); + i := 0; + try + i := StrToInt(temp); + except + on EConvertError do + begin + end; + end; + _currentfreq[_currentvfo] := i; + i := i + _freqoffset; // transverter + + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + + temp := copy(S, 30, 1); + case S[30] of + '1', '2' : M := mSSB; + '3' : begin M := mCW; _CWR := False; end; + '7' : begin M := mCW; _CWR := True; end; + '4' : M := mFM; + '5' : M := mAM; + '6', '8' : M := mRTTY; + end; + _currentmode := M; + + + FreqMem[_currentband, _currentmode] := _currentfreq[_currentvfo]; + + + if Selected then + UpdateStatus; + + end; + + if command = 'MD' then + begin + case S[3] of + '1', '2' : M := mSSB; + '3' : begin M := mCW; _CWR := False; end; + '7' : begin M := mCW; _CWR := True; end; + '4' : M := mFM; + '5' : M := mAM; + '6', '8' : M := mRTTY; + end; + _currentmode := M; + FreqMem[_currentband, _currentmode] := _currentfreq[_currentvfo]; + if Selected then + UpdateStatus; + end; + +end; + +procedure TJST145.ExecuteCommand(S : string); +var command : string; + param, temp : string; + i, j : LongInt; + aa : integer; + B : TBand; + M : TMode; + SS : string; +begin + //RigControl.label1.caption := S; + if length(S) < 10 then + exit; + command := S[1]+S[2]; + if S[1] = 'I' then + command := 'I'; + if (command = 'LA') or (command = 'LB') or (command = 'I') then + begin + SS := S; + delete(SS, 1, length(command)); + if command = 'LA' then + aa := 0 + else + aa := 1; + if command = 'I' then + aa := _currentvfo; + + temp := copy(SS, 4, 8); + + i := 0; + try + i := StrToInt(temp); + except + on EConvertError do + begin + end; + end; + _currentfreq[aa] := i; + i := i + _freqoffset; + + if _currentvfo = aa then + begin + M := mCW; + case SS[3] of + '2', '3' : M := mSSB; + '1' : M := mCW; + '5' : M := mFM; + '4' : M := mAM; + '0' : M := mRTTY; + end; + _currentmode := M; + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[_currentvfo]; + end; + + if Selected then + UpdateStatus; + end; +end; + +procedure TICOM.ExecuteCommand(S : string); +var command : Byte; + temp : byte; + i, j, i1, i2, i3, i4, i5 : LongInt; + aa : integer; + B : TBand; + M : TMode; + SS : string; +begin + //RigControl.label1.caption := S; + SS := S; + i := pos(Chr($FE)+Chr($FE), SS); + + if i = 0 then + exit; + if i > 1 then + Delete(SS, 1, i-1); + + if length(SS) < 6 then + exit; + if not (ord(SS[3]) in [0, MyAddr]) then + exit; + if SS[4] <> Chr(RigAddr) then + exit; + + Delete(SS, 1, 4); + Delete(SS, length(SS), 1); + + command := Ord(SS[1]); + + if length(SS) = 1 then + begin + case command of + $FA : exit; // ng message + $FB : exit; // ok message + end; + exit; + end; + + case command of + $01, $04 : + begin + temp := ord(SS[2]); + case temp of + 0, 1 : M := mSSB; + 3 : M := mCW; + 5, 6 : M := mFM; + 2 : M := mAM; + 4 : M := mRTTY; + end; + _currentmode := M; + + if length(SS) >= 3 then + begin + if ord(SS[3]) in [1..3] then + ModeWidth[M] := ord(SS[3]); // IF width + end; + + FreqMem[_currentband, _currentmode] := _currentfreq[_currentvfo]; + if Selected then + UpdateStatus; + end; + $00, $03 : + begin + if length(SS) < 4 then + exit; + Delete(SS, 1, 1); + i1 := (ord(SS[1]) mod 16) + (ord(SS[1]) div 16)*10; + i2 := (ord(SS[2]) mod 16) + (ord(SS[2]) div 16)*10; + i3 := (ord(SS[3]) mod 16) + (ord(SS[3]) div 16)*10; + i4 := (ord(SS[4]) mod 16) + (ord(SS[4]) div 16)*10; + if length(SS) = 5 then + i5 := (ord(SS[5]) mod 16) + (ord(SS[5]) div 16)*10 + else + i5 := 0; + i := i1 + 100*i2 + 10000*i3 + 1000000*i4 + 100000000*i5; + _currentfreq[_currentvfo] := i; + i := i + _freqoffset; + + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[_currentvfo]; + if Selected then + UpdateStatus; + end; + end; +end; + + + +function hex2dec(i : integer) : integer; +begin + Result := (i div 16) * 10 + (i mod 16); +end; + +procedure TFT100.ExecuteCommand(S : string); +var i, j : LongInt; + M : TMode; +begin + if length(S) = WaitSize then + begin + M := mOther; + case ord(S[6]) and $7 of + 0, 1 : M := mSSB; + 2, 3 : M := mCW; + 4 : M := mAM; + 6, 7 : M := mFM; + 5 : M := mRTTY; + end; + _currentmode := M; + + i := ord(S[2])*256*256*256 + ord(S[3])*256*256 + ord(S[4])*256 + ord(S[5]); + i := round(i * 1.25); + _currentfreq[0] := i; + i := ord(S[18])*256*256*256 + ord(S[19])*256*256 + ord(S[20])*256 + ord(S[21]); + i := round(i * 1.25); + _currentfreq[1] := i; + + i := _currentfreq[_currentvfo] + _freqoffset; + + j := GetBand(i); + if j >= 0 then + begin + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[0]; + end; + + end; + if Selected then + UpdateStatus; +end; + +procedure TFT100.SetVFO(i : integer); // A:0, B:1 +begin + if (i > 1) or (i < 0) then + exit; + _currentvfo := i; + if i = 0 then + WriteData(_nil3 + Chr(0)+ Chr($05)) + else + WriteData(_nil3 + Chr(1)+ Chr($05)); + if Selected then + UpdateStatus; +end; + +procedure TFT100.RitClear; +begin +end; + + +procedure TFT920.ExecuteCommand(S : string); +var i, j : LongInt; + M : TMode; +begin + if length(S) = 28 then + begin + if _currentvfo = 0 then + i := ord(S[8]) + else + i := ord(S[8+14]); + + M := mOther; + case i and $07 of + 0 : M := mSSB; + 1 : M := mCW; + 2 : M := mAM; + 3 : M := mFM; + 4,5 : M := mRTTY; + 6,7 : M := mOther; + end; + _currentmode := M; + + i := ord(S[2])*256*256*256 + ord(S[3])*256*256 + ord(S[4])*256 + ord(S[5]); + //i := round(i / 1.60); + _currentfreq[0] := i; + i := i + _freqoffset; + + if _currentvfo = 0 then + begin + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[0]; //i; + end; + + i := ord(S[16])*256*256*256 + ord(S[17])*256*256 + ord(S[18])*256 + ord(S[19]); + //i := round(i / 1.60); + _currentfreq[1] := i; + i := i + _freqoffset; + + if _currentvfo = 1 then + begin + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[1]; //i; + end; + + end; + if Selected then + UpdateStatus; +end; + +procedure TFT1000MP.ExecuteCommand(S : string); +var i, j : LongInt; + M : TMode; +begin + if length(S) = 32 then + begin + if _currentvfo = 0 then + i := ord(S[8]) + else + i := ord(S[8+16]); + M := mOther; + case i of + 0, 1 : M := mSSB; + 2 : M := mCW; + 3 : M := mAM; + 4 : M := mFM; + 5 : M := mRTTY; + 6 : M := mOther; + end; + _currentmode := M; + + i := ord(S[2])*256*256*256 + ord(S[3])*256*256 + ord(S[4])*256 + ord(S[5]); + i := round(i / 1.60); + _currentfreq[0] := i; + i := i + _freqoffset; + + if _currentvfo = 0 then + begin + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[0]; + end; + + i := ord(S[18])*256*256*256 + ord(S[19])*256*256 + ord(S[20])*256 + ord(S[21]); + i := round(i / 1.60); + _currentfreq[1] := i; + i := i + _freqoffset; + + if _currentvfo = 1 then + begin + j := GetBand(i); + if j >= 0 then + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[1]; + end; + + end; + if Selected then + UpdateStatus; +end; + +procedure TFT847.ExecuteCommand(S : string); +var i, j : LongInt; + M : TMode; +begin + if length(S) = WaitSize then + begin + M := mOther; + case ord(S[5]) mod 16 of // ord(S[5]) and $7? + 0, 1 : M := mSSB; + 2, 3 : M := mCW; + 4 : M := mAM; + 8 : M := mFM; + end; + _currentmode := M; + + i :=(ord(S[1]) div 16)*100000000 + + (ord(S[1]) mod 16)*10000000 + + (ord(S[2]) div 16)*1000000 + + (ord(S[2]) mod 16)*100000 + + (ord(S[3]) div 16)*10000 + + (ord(S[3]) mod 16)*1000 + + (ord(S[4]) div 16)*100 + + (ord(S[4]) mod 16)*10; + _currentfreq[_currentvfo] := i; + i := i + _freqoffset; + + j := GetBand(i); + if j >= 0 then + begin + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[0]; + end; + + end; + if Selected then + UpdateStatus; +end; + +(* +procedure TFT847.ExecuteCommand(S : string); +var i, j : LongInt; + M : TMode; +begin + if length(S) = WaitSize then + begin + M := mOther; + case ord(S[5]) and $7 of + 0, 1 : M := mSSB; + 2, 3 : M := mCW; + 4 : M := mAM; + 8 : M := mFM; + end; + _currentmode := M; + + i :=(StrToInt(S[1]) div 16)*100000000 + + (StrToInt(S[1]) mod 16)*10000000 + + (StrToInt(S[2]) div 16)*1000000 + + (StrToInt(S[2]) mod 16)*100000 + + (StrToInt(S[3]) div 16)*10000 + + (StrToInt(S[3]) mod 16)*1000 + + (StrToInt(S[4]) div 16)*100 + + (StrToInt(S[4]) mod 16)*10; + _currentfreq[_currentvfo] := i; + i := i + _freqoffset; + + j := GetBand(i); + if j >= 0 then + begin + _currentband := TBand(j); + FreqMem[_currentband, _currentmode] := _currentfreq[0]; + end; + + end; + if Selected then + UpdateStatus; +end; +*) + +procedure TFT847.RitClear; +begin +end; + +procedure TFT847.SetVFO(i : integer); +begin +end; + +procedure TFT847.SetFreq(Hz : LongInt); +var fstr : string; + i, j : LongInt; +begin + LastFreq := _currentfreq[_currentvfo]; + + i := Hz; + i := i div 10; + + j := i mod 100; + fstr := chr(dec2hex(j)); + i := i div 100; + + j := i mod 100; + fstr := chr(dec2hex(j)) + fstr; + i := i div 100; + + j := i mod 100; + fstr := chr(dec2hex(j)) + fstr; + i := i div 100; + + j := i mod 100; + fstr := chr(dec2hex(j)) + fstr; + i := i div 100; + + fstr := fstr + chr($01); + + WriteData(fstr); +end; + +(* +procedure TFT847.SetFreq(Hz : LongInt); +var fstr : string; + i, j : LongInt; +begin + LastFreq := _currentfreq[_currentvfo]; + + i := Hz; + i := i div 10; + + j := i mod 100; + fstr := chr(dec2hex(j)); + i := i div 100; + + j := i mod 100; + fstr := fstr + chr(dec2hex(j)); + i := i div 100; + + j := i mod 100; + fstr := fstr + chr(dec2hex(j)); + i := i div 100; + + j := i mod 100; + fstr := fstr + chr(dec2hex(j)); + i := i div 100; + + fstr := fstr + chr($01); + + WriteData(fstr); +end; +*) + +procedure TFT847.SetMode(Q : TQSO); +var command : string; + para : Byte; +begin + para := 0; + + case Q.QSO.Mode of + mSSB : if Q.QSO.Band <= b7 then + para := 0 + else + para := 1; + mCW : para := 2; + mFM : para := 8; + mAM : para := 4; + end; + + command := Chr(para) + _nil3 + Chr($07); + WriteData(command); +end; + +procedure TFT817.SetFreq(Hz : LongInt); +var StartTime : TDateTime; +begin + RigControl.PallingTimer.Enabled := False; + BufferString := ''; + inherited; + StartTime := Now; + repeat SleepEx(10, false) until + (BufferString <> '') or ((Now-StartTime) > (250/(24*60*60*1000))); + BufferString := ''; + RigControl.PallingTimer.Enabled := True; +end; + + +procedure TFT817.SetMode(Q : TQSO); +var StartTime : TDateTime; +begin + RigControl.PallingTimer.Enabled := False; + BufferString := ''; + inherited; + StartTime := Now; + repeat SleepEx(10, false) until + (BufferString <> '') or ((Now-StartTime) > (250/(24*60*60*1000))); + BufferString := ''; + RigControl.PallingTimer.Enabled := True; +end; + +procedure TRig.UpdateStatus; +var s : string; +begin + RigControl.dispVFO.Caption := VFOString[_currentvfo]; + if _currentmode <> Main.CurrentQSO.QSO.Mode then + MainForm.UpdateMode(_currentmode); + RigControl.dispMode.Caption := ModeString[_currentmode]; + if Main.CurrentQSO.QSO.Band <> _currentband then + MainForm.UpdateBand(_currentband); + RigControl.dispFreqA.Caption :=kHzStr(_freqoffset + _currentfreq[0])+' kHz'; + RigControl.dispFreqB.Caption :=kHzStr(_freqoffset + _currentfreq[1])+' kHz'; + if _currentvfo = 0 then + begin + RigControl.dispFreqA.Font.Style := [fsBold]; + RigControl.dispFreqB.Font.Style := []; + end + else + begin + RigControl.dispFreqB.Font.Style := [fsBold]; + RigControl.dispFreqA.Font.Style := []; + end; + + s := 'R'+IntToStr(_rignumber)+' '+'V'; + if _currentvfo = 0 then + s := s + 'A' + else + s := s + 'B'; + MainForm.StatusLine.Panels[1].Text := s; + BSRefresh(Self); + //BandScope.MarkCurrentFreq(_freqoffset + _currentfreq[_currentvfo]); + BandScope2.MarkCurrentFreq(_freqoffset + _currentfreq[_currentvfo]); +end; + +procedure TRigControl.FormCreate(Sender: TObject); +var i : integer; + B : TBand; +begin + RigLabel.Caption := ''; + DebugLabel.Caption := ''; + Rig := nil; + Rig1 := nil; + Rig2 := nil; + _currentrig := 1; + _maxrig := 2; + for B := b19 to HiBand do + TempFreq[B] := 0; + for i := 1 to MAXVIRTUALRIG do + begin + VirtualRig[i].Callsign := ''; + VirtualRig[i].Band := b19; + VirtualRig[i].Mode := mCW; + VirtualRig[i].FirstTime := True; + end; + OmniRig := TOmniRigX.Create(Self); + +end; + +(* +procedure TRigControl.CommPort1RxChar(Sender: TObject; Count: Integer); +var + Buffer: array[0..5120] of Char; + Bytes, i: Integer; + str : string; + P : PChar; +begin + Bytes := TComm(Sender).Read(Buffer, Count); + Buffer[Bytes] := #0; + str := ''; + for i := 0 to Bytes - 1 do + str := str + Buffer[i]; + + if TComm(Sender).Tag = 1 then + Rig1.PassOnRxData(str) + else + Rig2.PassOnRxData(str); +end; +*) + +procedure TRigControl.FormDestroy(Sender: TObject); +begin + ZCom1.Disconnect; + ZCom1.Free; + ZCom2.Disconnect; + ZCom2.Free; + ZCom3.Disconnect; + ZCom3.Free; + + Rig := nil; + if Rig1 <> nil then + Rig1.Free; + if Rig2 <> nil then + Rig2.Free; +end; + +procedure TRigControl.Button1Click(Sender: TObject); +begin + if RigControl.Rig <> nil then + RigControl.Rig.Reset; +end; + + + +{procedure TRigControl.Button2Click(Sender: TObject); +begin + FreqList.ProcessFreqData(StatusSummary); +end;} + +procedure TRigControl.Timer1Timer(Sender: TObject); +begin + ZLinkForm.SendRigStatus; +end; + +procedure TRigControl.PallingTimerTimer(Sender: TObject); +begin + if Rig <> nil then + Rig.PallingProcess; +end; + +procedure TRigControl.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + + +procedure TRigControl.ZCom1ReceiveData(Sender: TObject; DataPtr: Pointer; + DataSize: Cardinal); +var + str : string; +begin + // Convert incoming data into a string + str := StringOfChar( ' ', DataSize ); + move( DataPtr^, pchar(str)^, DataSize ); + if TCommPortDriver(Sender).Tag = 1 then + Rig1.PassOnRxData(str) + else + Rig2.PassOnRxData(str); +end; + +procedure TRigControl.btnOmniRigClick(Sender: TObject); +begin + RigControl.OmniRig.DialogVisible := True; +end; + +initialization + CoInitialize(nil); // <-- manually call CoInitialize() + +finalization + CoUnInitialize; // <-- free memory + + +end. diff --git a/src/UScratchSheet.dfm b/src/UScratchSheet.dfm new file mode 100644 index 00000000..4566e050 Binary files /dev/null and b/src/UScratchSheet.dfm differ diff --git a/src/UScratchSheet.pas b/src/UScratchSheet.pas new file mode 100644 index 00000000..02f9cebe --- /dev/null +++ b/src/UScratchSheet.pas @@ -0,0 +1,134 @@ +unit UScratchSheet; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UConsolePad, StdCtrls, ExtCtrls, Menus; + +type + TScratchSheet = class(TConsolePad) + PopupMenu: TPopupMenu; + LocalOnly: TMenuItem; + Clear1: TMenuItem; + procedure EditKeyPress(Sender: TObject; var Key: Char); + procedure FormCreate(Sender: TObject); + procedure LocalOnlyClick(Sender: TObject); + procedure Clear1Click(Sender: TObject); + private + { Private declarations } + Buffer : TStringList; + public + procedure AddBuffer(S : string); + procedure AddLine(S : string); override; + procedure Update; + { Public declarations } + end; + +var + ScratchSheet: TScratchSheet; + +implementation + +uses Main, UZLinkForm; + +{$R *.DFM} + +procedure TScratchSheet.AddBuffer(S : string); +begin + Buffer.Add(S); +end; + +procedure TScratchSheet.EditKeyPress(Sender: TObject; var Key: Char); +var str : string; +begin + case Key of + Chr($0D) : + begin + //AddLine(Edit.Text); + Buffer.Add('&'+Edit.Text); + ZLinkForm.SendScratchMessage(Edit.Text); + Update; + Edit.Text := ''; + //MainForm.ProcessConsoleCommand(str); + Key := #0; + end; + Chr($1B) : + begin + MainForm.LastFocus.SetFocus; + Key := #0; + end; + end; + +end; + +procedure TScratchSheet.AddLine(S : string); +//var _VisRows, _TopRow : integer; +begin + inherited; +end; + + +procedure TScratchSheet.FormCreate(Sender: TObject); +begin + inherited; + MaxLines := 25; + Buffer := TStringList.Create; +end; + +procedure TScratchSheet.Update; +var i, _VisRows, _TopRow : integer; + str : string; + count : integer; +begin + ListBox.Clear; + count := 0; + for i := Buffer.Count - 1 downto 0 do + begin + str := Buffer[i]; + if LocalOnly.Checked then + begin + if str <> '' then + if str[1] = '&' then + begin + Delete(str, 1, 1); + inc(count); + ListBox.Items.Insert(0,str); + end; + end + else + begin + if str <> '' then + if str[1] = '&' then + Delete(str, 1, 1); + ListBox.Items.Insert(0,str); + inc(count); + end; + if count >= MaxLines then + break; + end; + + _VisRows := ListBox.ClientHeight div ListBox.ItemHeight; + _TopRow := ListBox.Items.Count - _VisRows + 1; + if _TopRow > 0 then + ListBox.TopIndex := _TopRow + else + ListBox.TopIndex := 0; + +end; + +procedure TScratchSheet.LocalOnlyClick(Sender: TObject); +begin + //inherited; + LocalOnly.Checked := Not(LocalOnly.Checked); + Update; +end; + +procedure TScratchSheet.Clear1Click(Sender: TObject); +begin + inherited; + Buffer.Clear; + Update; +end; + +end. diff --git a/src/USixDownMulti.dfm b/src/USixDownMulti.dfm new file mode 100644 index 00000000..1db687d1 Binary files /dev/null and b/src/USixDownMulti.dfm differ diff --git a/src/USixDownMulti.pas b/src/USixDownMulti.pas new file mode 100644 index 00000000..ff640af0 --- /dev/null +++ b/src/USixDownMulti.pas @@ -0,0 +1,43 @@ +unit USixDownMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UFDMulti, StdCtrls, checklst, JLLabel, ExtCtrls, zLogGlobal, UACAGMulti, + Grids, Cologrid, UMultipliers; + +type + TSixDownMulti = class(TFDMulti) + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + SixDownMulti: TSixDownMulti; + +implementation + +{$R *.DFM} + + +procedure TSixDownMulti.FormCreate(Sender: TObject); +var i : integer; +begin + sband := b50; + CityList := TCityList.Create; + CityList.LoadFromFile('XPO.DAT'); + CityList.LoadFromFile('ACAG.DAT'); + if CityList.List.Count = 0 then exit; + Reset; + { + for i := 0 to CityList.List.Count-1 do + begin + ListBox.Items.Add(TCity(CityList.List[i]).FDSummary(sband)); + end;} +end; + +end. diff --git a/src/USixDownScore.dfm b/src/USixDownScore.dfm new file mode 100644 index 00000000..b2e64885 Binary files /dev/null and b/src/USixDownScore.dfm differ diff --git a/src/USixDownScore.pas b/src/USixDownScore.pas new file mode 100644 index 00000000..4b31899a --- /dev/null +++ b/src/USixDownScore.pas @@ -0,0 +1,153 @@ +unit USixDownScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, Aligrid, StdCtrls, ExtCtrls, zLogGlobal, Buttons; + +type + TSixDownScore = class(TBasicScore) + Grid: TStringAlignGrid; + procedure FormShow(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + procedure Reset; override; + procedure Add(var aQSO : TQSO); override; + end; + +var + SixDownScore: TSixDownScore; + +implementation + +{$R *.DFM} + +procedure TSixDownScore.AddNoUpdate(var aQSO : TQSO); +var band : TBand; +begin + inherited; + + if aQSO.QSO.Dupe then + exit; + + band := aQSO.QSO.band; + if band in [b2400..HiBand] then + aQSO.QSO.points := 2 + else + aQSO.QSO.points := 1; + inc(Points[band], aQSO.QSO.Points); +end; + +procedure TSixDownScore.Update; +var band : TBand; + TotMulti, TotPoints : LongInt; + row : integer; +begin + TotPoints := 0; TotMulti := 0; + row := 1; + + if ShowCWRatio then + begin + Grid.ColCount := 5; + Grid.Width := Grid.DefaultColWidth * 5; + end + else + begin + Grid.ColCount := 3; + Grid.Width := Grid.DefaultColWidth * 3; + end; + + if ShowCWRatio then + begin + Grid.Cells[3,0] := 'CW Q''s'; + Grid.Cells[4,0] := 'CW %'; + end; + + for band := b50 to b10G do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(Points[band]); + TotPoints := TotPoints + Points[band]; + Grid.Cells[2,row] := IntToStr(Multi[band]); + TotMulti := TotMulti + Multi[band]; + if ShowCWRatio then + begin + Grid.Cells[3,row] := IntToStr(CWQSO[band]); + if QSO[band] > 0 then + Grid.Cells[4,row] := FloatToStrF(100*(CWQSO[band] / QSO[band]), ffFixed, 1000, 1) + else + Grid.Cells[4,row] := '-'; + end; + + + inc(row); + end; + end; + Grid.Cells[1, 8] := IntToStr(TotPoints); + Grid.Cells[2, 8] := IntToStr(TotMulti); + Grid.Cells[2, 9] := IntToStr(TotPoints*TotMulti); + + if ShowCWRatio then + begin + Grid.Cells[3, row] := IntToStr(TotalCWQSOs); + if TotPoints > 0 then + Grid.Cells[4, row] := FloatToStrF(100*(TotalCWQSOs/TotalQSOs), ffFixed, 1000, 1) + else + Grid.Cells[4, row] := '-'; + end; + +(* + TotQSO := 0; TotMulti := 0; TotPoints := 0; + row := 1; + for band := b50 to HiBand do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(Points[band]); + TotPoints := TotPoints + Points[band]; + TotQSO := TotQSO + QSO[band]; + Grid.Cells[2,row] := IntToStr(Multi[band]); + TotMulti := TotMulti + Multi[band]; + inc(row); + end; + end; + Grid.Cells[1, 8] := IntToStr(TotPoints); + Grid.Cells[2, 8] := IntToStr(TotMulti); + Grid.Cells[2, 9] := IntToStr(TotPoints*TotMulti); +*) +end; + +procedure TSixDownScore.Reset; +begin + inherited; +end; + +procedure TSixDownScore.Add(var aQSO : TQSO); +begin + inherited; +end; + + +procedure TSixDownScore.FormShow(Sender: TObject); +begin + inherited; + Button1.SetFocus; + Grid.Col := 1; + Grid.Row := 1; +end; + +procedure TSixDownScore.FormCreate(Sender: TObject); +begin + inherited; + //ShowCWRatio := True; +end; + +end. diff --git a/src/USoundForm.Pas b/src/USoundForm.Pas new file mode 100644 index 00000000..e2c35eff --- /dev/null +++ b/src/USoundForm.Pas @@ -0,0 +1,27 @@ +unit USoundForm; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, Audio; + +type + TSoundForm = class(TForm) + WaveIn1: TWaveIn; + WaveOut1: TWaveOut; + Button1: TButton; + private + { Private declarations } + public + { Public declarations } + end; + +var + SoundForm: TSoundForm; + +implementation + +{$R *.DFM} + +end. diff --git a/src/USoundForm.dfm b/src/USoundForm.dfm new file mode 100644 index 00000000..e08a54f6 Binary files /dev/null and b/src/USoundForm.dfm differ diff --git a/src/USpotClass.pas b/src/USpotClass.pas new file mode 100644 index 00000000..587acaaf --- /dev/null +++ b/src/USpotClass.pas @@ -0,0 +1,335 @@ +unit USpotClass; + +interface + +uses SysUtils, Windows, Classes, zLogGlobal; + +type + TBaseSpot = class + Time : TDateTime; // moved from TBSdata 2.6e + Call : string; + Number : string; + FreqHz : LongInt; + //ReportedBy : string; + //TimeStr : string; + //Comment : string; + CtyIndex : integer; + Zone : integer; + NewCty : boolean; + NewZone : boolean; + Worked : boolean; + Band : TBand; + Mode : TMode; + ClusterData : boolean; // true if data from PacketCluster + constructor Create; virtual; + //Function Analyze(S : string) : boolean; // true if successful + Function FreqKHzStr : string; + //Function Summary : string; + Function _GetBand : TBand; + Function NewMulti : boolean; // newcty or newzone + Function InText : string; virtual; abstract; + procedure FromText(S : string); virtual; abstract; + //Function DrawRed : boolean; + end; + + TSpot = class(TBaseSpot) + ReportedBy : string; + TimeStr : string; + Comment : string; + constructor Create; override; + Function Analyze(S : string) : boolean; // true if successful + Function ClusterSummary : string; + end; + + TBSData = class(TBaseSpot) + //Time : TDateTime; 2.6e + LabelRect : TRect; + Bold : boolean; + constructor Create; override; + function LabelStr : string; + function InText : string; override; + procedure FromText(S : string); override; + end; + +var //BSList : TList; + BSList2 : TList; + +implementation + +constructor TBaseSpot.Create; +begin + Time := Now; + Call := ''; + Number := ''; + FreqHz := 0; + NewCty := false; + NewZone := false; + CtyIndex := 0; + Zone := 0; + Worked := False; + Band := b19; + Mode := mCW; + ClusterData := False; +end; + +constructor TSpot.Create; +begin + inherited; + ReportedBy := ''; + TimeStr := '0000Z'; + Comment := ''; +end; + +constructor TBSData.Create; +begin + //Time := Now; + inherited; + LabelRect.Top := 0; + LabelRect.Right := 0; + LabelRect.Left := 0; + LabelRect.Bottom := 0; +end; + +function TBSData.LabelStr : string; +begin + Result := FreqkHzStr + ' ' + Call; + if Number <> '' then + Result := Result + ' ['+Number+']'; +end; + + +function TSpot.Analyze(S : string) : boolean; +var temp, temp2 : string; + i : integer; +begin + Result := False; + if length(S) < 5 then + exit; + temp := TrimRight(TrimLeft(S)); + + i := pos('DX de', temp); + if i > 1 then + Delete(temp, 1, i); + + if pos('DX de', temp) = 1 then + begin + i := pos(':', temp); + if i > 0 then + begin + temp2 := copy(temp, 7, i-7); + ReportedBy := temp2; + end + else + exit; + + Delete(temp, 1, i); + temp := TrimLeft(temp); + + i := pos(' ', temp); + if i > 0 then + temp2 := copy(temp, 1, i - 1) + else + exit; + + try + FreqHz := Round(StrToFloat(temp2)*1000); + except + on EConvertError do + exit; + end; + Band := _getband; + + Delete(temp, 1, i); + temp := TrimLeft(temp); + + i := pos(' ', temp); + if i > 0 then + Call := copy(temp, 1, i - 1) + else + exit; + + Delete(temp, 1, i); + + for i := length(temp) downto 1 do + if temp[i] = ' ' then + break; + + TimeStr := copy(temp, i + 1, 5); + + Delete(temp, i, 255); + Comment := temp; + Result := True; + end + else // check for SH/DX responses + begin + + i := length(temp); + if i = 0 then + exit; + if temp[i] = '>' then + begin + i := pos(' <', temp); + if i > 0 then + begin + ReportedBy := copy(temp, i+2, 255); + ReportedBy := copy(ReportedBy, 1, length(ReportedBy)-1); + end + else + exit; + Delete(temp, i, 255); + end + else + exit; + + i := pos(' ', temp); + if i > 0 then + temp2 := copy(temp, 1, i - 1) + else + exit; + try + FreqHz := Round(StrToFloat(temp2)*1000); + except + on EConvertError do + exit; + end; + Band := _getband; + + Delete(temp, 1, i); + temp := TrimLeft(temp); + i := pos(' ', temp); + if i > 0 then + Call := copy(temp, 1, i - 1) + else + exit; + + Delete(temp, 1, i); + temp := TrimLeft(temp); + i := pos(' ', temp); + if i > 0 then + Delete(temp, 1, i) + else + exit; + + temp := TrimLeft(temp); + if pos('Z', temp) = 5 then + begin + TimeStr := copy(temp, 1, 5); + Delete(temp, 1, 6); + Comment := temp; + end + else + exit; + + Result := True; + end; +end; + +Function TBaseSpot.FreqKHzStr : string; +begin + Result := kHzStr(FreqHz); +end; + +Function TSpot.ClusterSummary : string; +begin + Result := FillLeft(FreqKHzStr, 8) + ' ' + + FillRight(Self.Call, 11) + ' ' + Self.TimeStr + ' ' + + FillRight(Self.Comment, 30) + '<'+ Self.ReportedBy + '>'; +end; + +Function TBaseSpot._GetBand : TBand; +begin + Result := b19; + case FreqHz div 1000 of + 1800..1999 : Result := b19; + 3000..3999 : Result := b35; + 7000..7999 : Result := b7; + 10000..10999 : Result := b10; + 14000..14999 : Result := b14; + 18000..18999 : Result := b18; + 21000..21999 : Result := b21; + 24000..24999 : Result := b24; + 28000..28999 : Result := b28; + 50000..59999 : Result := b50; + 140000..149999 : Result := b144; + 420000..499999 : Result := b430; + 1200000..1299999 : Result := b1200; + 2400000..2499999 : Result := b2400; + 5600000..5799999 : Result := b5600; + else + begin + end; + end; +end; + +Function TBaseSpot.NewMulti : boolean; +begin + Result := NewCty or NewZone; +end; + +function TBSData.InText : string; +(* Call : string; + FreqHz : LongInt; + CtyIndex : integer; + Zone : integer; + NewCty : boolean; + NewZone : boolean; + Worked : boolean; + Band : TBand; + Mode : TMode; + Time : TDateTime; + LabelRect : TRect; *) +var S : string; +const xx = '%'; +begin + S := Call +xx+ IntToStr(FreqHz) +xx+ IntToStr(Ord(Band)) +xx+ IntToStr(Ord(Mode)) +xx+ FloatToStr(Time); + Result := S; +end; + +procedure TBSData.FromText(S : string); +var str, wstr : string; + p : integer; +begin + str := S; + + p := pos('%', str); + wstr := copy(str, 1, p-1); + Call := wstr; + Delete(str, 1, p); + + p := pos('%', str); + wstr := copy(str, 1, p-1); + try + FreqHz := StrToInt(wstr); + except + FreqHz := 0; + end; + Delete(str, 1, p); + + p := pos('%', str); + wstr := copy(str, 1, p-1); + try + Band := TBand(StrToInt(wstr)); + except + Band := b19; + end; + Delete(str, 1, p); + + p := pos('%', str); + wstr := copy(str, 1, p-1); + try + Mode := TMode(StrToInt(wstr)); + except + Mode := mCW; + end; + + wstr := str; + try + Time := StrToFloat(wstr); + except + end; +end; + +initialization + //BSList := TList.Create; + BSList2 := TList.Create; +end. diff --git a/src/USpotForm.dfm b/src/USpotForm.dfm new file mode 100644 index 00000000..de909f0f Binary files /dev/null and b/src/USpotForm.dfm differ diff --git a/src/USpotForm.pas b/src/USpotForm.pas new file mode 100644 index 00000000..7bf2231b --- /dev/null +++ b/src/USpotForm.pas @@ -0,0 +1,81 @@ +unit USpotForm; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls, zLogGlobal, URigControl; + +type + TSpotForm = class(TForm) + FreqEdit: TEdit; + CallsignEdit: TEdit; + CommentEdit: TEdit; + Panel1: TPanel; + SendButton: TButton; + Button2: TButton; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + procedure Button2Click(Sender: TObject); + procedure SendButtonClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure Open(aQSO : TQSO); + end; + +var + SpotForm: TSpotForm; + +implementation + +uses UComm; + +{$R *.DFM} + + +procedure TSpotForm.Open(aQSO : TQSO); +var str : string; +begin + str := 'Frequency'; + case aQSO.QSO.Band of + b19 : str := '19'; + b35 : str := '35'; + b7 : str := '7'; + b10 : str := '10'; + b14 : str := '14'; + b18 : str := '18'; + b21 : str := '21'; + b24 : str := '24'; + b28 : str := '28'; + b50 : str := '50'; + b144 : str := '144'; + b430 : str := '43'; + b1200 : str := '12'; + b2400 : str := '24'; + b5600 : str := '56'; + b10g : str := '10'; + end; + FreqEdit.Text := str; + CallSignEdit.Text := aQSO.QSO.CallSign; + CommentEdit.Text := ''; + ShowModal; +end; + +procedure TSpotForm.Button2Click(Sender: TObject); +begin + Close; +end; + +procedure TSpotForm.SendButtonClick(Sender: TObject); +var sendstr : string; +begin + sendstr := 'DX '+FreqEdit.Text+' '+CallsignEdit.Text+' '+CommentEdit.Text; + //CommForm.WriteLine(sendstr); + CommForm.TransmitSpot(sendstr); + Close; +end; + +end. diff --git a/src/USummaryInfo.dfm b/src/USummaryInfo.dfm new file mode 100644 index 00000000..a5a5cf2b Binary files /dev/null and b/src/USummaryInfo.dfm differ diff --git a/src/USummaryInfo.pas b/src/USummaryInfo.pas new file mode 100644 index 00000000..feea5430 --- /dev/null +++ b/src/USummaryInfo.pas @@ -0,0 +1,103 @@ +unit USummaryInfo; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, zLogGlobal, UOptions; + +type + TSummaryInfo = class(TForm) + CategoryEdit: TEdit; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + NameEdit: TEdit; + Label4: TLabel; + ContestNameEdit: TEdit; + Button1: TButton; + Button2: TButton; + Label6: TLabel; + RemMemo: TMemo; + Label8: TLabel; + CountryEdit: TEdit; + Label5: TLabel; + DecMemo: TMemo; + Label9: TLabel; + Label10: TLabel; + MiscMemo: TMemo; + AddrMemo: TMemo; + CallEdit: TEdit; + procedure FormShow(Sender: TObject); + procedure CreateParams(var Params: TCreateParams); override; + private + { Private declarations } + public + { Public declarations } + procedure DecEnglish; + procedure DecJapanese; + end; + +var + SummaryInfo: TSummaryInfo; + +implementation + +{$R *.DFM} + + +procedure TSummaryInfo.DecEnglish; +begin + DecMemo.Clear; + DecMemo.Lines.Add('This is to certify that in this contest I have operated my transmitter'); + DecMemo.Lines.Add('within the limitations of my license and have fully observed the'); + DecMemo.Lines.Add('rules and regulations of the contest.'); +end; + +procedure TSummaryInfo.DecJapanese; +begin + DecMemo.Clear; + DecMemo.Lines.Add('́AReXgK񂨂ѓdg@߂ɂ^p'); + DecMemo.Lines.Add('ɒoT}[V[gуOV[gƑ'); + DecMemo.Lines.Add('Ȃ̂ł邱ƂA̖_ɂĐ܂B'); +end; + +procedure TSummaryInfo.FormShow(Sender: TObject); +var str : string; + i : integer; + Y, M, D : word; +begin + if Log.TotalQSO > 0 then + DecodeDate(TQSO(Log.List[1]).QSO.Time, Y, M, D) + else + DecodeDate(Date, Y, M, D); + if ContestNameEdit.Text = '' then + ContestNameEdit.Text := TQSO(Log.List[0]).QSO.memo + ' ' + IntToStr(Y); + if CallEdit.Text = '' then + CallEdit.Text := Options.Settings._mycall; + if Options.Settings._multiop > 0 then + str := 'Multi-op ' + else + str := 'Single-op '; + if Options.Settings._band = 0 then + str := str + 'All band ' + else + str := str + BandString[TBand(Options.Settings._band - 1)] + ' '; + case Options.Settings._mode of + 0 : str := str + 'Mixed'; + 1 : str := str + 'CW'; + 2 : str := str + 'Ph'; + end; + if CategoryEdit.Text = '' then + CategoryEdit.Text := str; +end; + + +procedure TSummaryInfo.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + + +end. diff --git a/src/USuperCheck.dfm b/src/USuperCheck.dfm new file mode 100644 index 00000000..08a504ac Binary files /dev/null and b/src/USuperCheck.dfm differ diff --git a/src/USuperCheck.pas b/src/USuperCheck.pas new file mode 100644 index 00000000..6d68c72b --- /dev/null +++ b/src/USuperCheck.pas @@ -0,0 +1,255 @@ +unit USuperCheck; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls, zLogGlobal, Spin; + +type + TSuperData = class + callsign : string[15]; + number : string[30]; + function Summary : string; + end; + + + TSuperCheck = class(TForm) + Panel1: TPanel; + Button3: TButton; + ListBox: TListBox; + StayOnTop: TCheckBox; + SpinEdit: TSpinEdit; + Label1: TLabel; + procedure Button3Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure CreateParams(var Params: TCreateParams); override; + procedure ListBoxDblClick(Sender: TObject); + procedure StayOnTopClick(Sender: TObject); + procedure SpinEditChange(Sender: TObject); + + private + //SuperCheckList : TStringList; + SuperCheckList2 : TList; + TwoLetterMatrix : array[0..255, 0..255] of TList; // 2.1f + { Private declarations } + public + HitCall : string; + HitNumber : integer; + FirstDataCall, Rcvd_Estimate : string; + procedure CheckSuper(aQSO : TQSO); + { Public declarations } + end; + +var + SuperCheck: TSuperCheck; + +implementation + +uses Main, UOptions; + +{$R *.DFM} + +function TSuperData.Summary : string; +begin + Result := FillRight(callsign, 11)+number; +end; + +procedure TSuperCheck.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +function PartialMatch(A, B : string) : boolean; +var i : integer; +begin + Result := False; + if (Pos('.', A) = 0) {and (Pos('?',A)=0)} then + Result := (Pos(A, B) > 0) + else + begin + if length(A) > length(B) then + exit; + for i := 1 to length(A) do + if A[i] <> '.' then + if A[i] <> B[i] then + exit; + Result := True; + end; +end; + +procedure TSuperCheck.CheckSuper(aQSO : TQSO); +var PartialStr : string; + i : integer; + maxhit, hit : integer; + sd, FirstData : TSuperData; + L : TList; +begin + HitNumber := 0; + HitCall := ''; + ListBox.Items.Clear; + PartialStr := aQSO.QSO.Callsign; + if Options.Settings._searchafter >= length(PartialStr) then + exit; + + if pos(',',PartialStr) = 1 then + exit; + + maxhit := Options.Settings._maxsuperhit; + + if PartialStr <> '' then + begin + ListBox.Enabled := False; + hit := 0; + + if (Length(PartialStr) >= 2) and (pos('.', PartialStr) = 0) then + L := TwoLetterMatrix[Ord(PartialStr[1]), Ord(PartialStr[2])] + else + L := SuperCheckList2; + + for i := 0 to L.Count-1 do + begin + sd := TSuperData(L[i]); + if ListBox.Items.Count = 0 then + FirstData := sd; + + if PartialMatch(PartialStr, sd.callsign) then + begin + if hit = 0 then + HitCall := sd.callsign; + ListBox.Items.Add(sd.Summary); + inc(hit); + if hit >= maxhit then break; + end; + end; + + HitNumber := hit; + + FirstDataCall := ''; + Rcvd_Estimate := ''; + if HitNumber > 0 then + begin + FirstDataCall := FirstData.Callsign; + Rcvd_Estimate := FirstData.number; + end; + + ListBox.Enabled := True; + end; +end; + + + +procedure TSuperCheck.Button3Click(Sender: TObject); +begin + Close; +end; + +procedure TSuperCheck.FormCreate(Sender: TObject); +var f : textfile; + str, str2 : string; + i, j, x, y : integer; + sd : TSuperData; +begin + //SuperCheckList := TStringList.Create; + SuperCheckList2 := TList.Create; + assignfile(f, 'ZLOG.SPC'); + Rcvd_Estimate := ''; + FirstDataCall := ''; + + for i := 0 to 255 do // 2.1f + for j := 0 to 255 do + begin + TwoLetterMatrix[i, j] := TList.Create; + //TwoLetterMatrix[i, j] := nil; + end; + try + reset(f); + except + on EFOpenError do + begin + //SuperCheckList.Add('$$$$'); + sd := TSuperData.Create; + sd.callsign := '$$$$'; + sd.number := '####'; + SuperCheckList2.Add(sd); + exit; + end; + end; + while not(EOF(f)) do + begin + readln(f, str); + //SuperCheckList.Add(str); + if str <> '' then + if str[1] <> ';' then + begin + i := pos(' ',str); + sd := TSuperData.Create; + if i = 0 then + begin + sd.callsign := str; + sd.number := ''; + end + else + begin + sd.callsign := copy(str, 1, i - 1); + sd.number := TrimLeft(copy(str, i, 30)); + end; + SuperCheckList2.Add(sd); + + for i := 1 to length(sd.callsign) - 1 do //2.1f + begin + x := Ord(sd.callsign[i]); + y := Ord(sd.callsign[i + 1]); + if TwoLetterMatrix[x,y].Count > 0 then + begin + if TSuperData(TwoLetterMatrix[x,y].Last).callsign <> sd.callsign then + TwoLetterMatrix[x,y].Add(sd); + end + else + TwoLetterMatrix[x,y].Add(sd); + end; + end; + end; +end; + +procedure TSuperCheck.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + +procedure TSuperCheck.ListBoxDblClick(Sender: TObject); +var i, j : integer; + str : string; +begin + i := ListBox.ItemIndex; + str := ListBox.Items[i]; + j := pos(' ', str); + if j > 0 then + str := copy(str, 1, j - 1); + MainForm.CallsignEdit.Text := str; +end; + + +procedure TSuperCheck.StayOnTopClick(Sender: TObject); +begin + If StayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +procedure TSuperCheck.SpinEditChange(Sender: TObject); +begin + if SpinEdit.Value <= 1 then + ListBox.Columns := 0 + else + ListBox.Columns := SpinEdit.Value; +end; + +end. diff --git a/src/UTTYConsole.dfm b/src/UTTYConsole.dfm new file mode 100644 index 00000000..598a5480 Binary files /dev/null and b/src/UTTYConsole.dfm differ diff --git a/src/UTTYConsole.pas b/src/UTTYConsole.pas new file mode 100644 index 00000000..b53bae38 --- /dev/null +++ b/src/UTTYConsole.pas @@ -0,0 +1,366 @@ +unit UTTYConsole; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls, UMMTTY, zLogGlobal, Console2, Menus, UzLogCW; + +const ttyMMTTY = 0; + ttyPSK31 = 1; + +type + TTTYConsole = class(TForm) + Panel1: TPanel; + CallsignList: TListBox; + Splitter1: TSplitter; + Timer1: TTimer; + RXLog: TColorConsole2; + MainMenu1: TMainMenu; + mnConsole: TMenuItem; + ClearRXlog1: TMenuItem; + ClearTXlog1: TMenuItem; + ClearCallsignlist1: TMenuItem; + Cleareverything1: TMenuItem; + mnStayOnTop: TMenuItem; + TXLog: TMemo; + procedure CreateParams(var Params: TCreateParams); override; + procedure TXLogKeyPress(Sender: TObject; var Key: Char); + procedure Timer1Timer(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure TXLogKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure StayOnTopClick(Sender: TObject); + procedure ClearRXlog1Click(Sender: TObject); + procedure ClearTXlog1Click(Sender: TObject); + procedure ClearCallsignlist1Click(Sender: TObject); + procedure Cleareverything1Click(Sender: TObject); + procedure CallsignListClick(Sender: TObject); + procedure CallsignListDblClick(Sender: TObject); + private + { Private declarations } + public + TTYMode : integer; + TTYSendBuffer: string; + TTYLineBuffer: string; // line buffer for rx data + procedure SetTTYMode(i : integer); + procedure RXChar(C: Char); + procedure TXChar(C: Char); + procedure SendStrNow(S: String); + function Sending : boolean; + { Public declarations } + end; + +var + TTYConsole: TTTYConsole; + +implementation + +uses Main, UOptions; + +{$R *.DFM} + +procedure TTTYConsole.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TTTYConsole.SetTTYMode(i : integer); +begin + if (i >= 2) or (i < 0) then + TTYMode := 0 + else + TTYMode := i; + if TTYMode = 0 then + Caption := 'RTTY Console'; + if TTYMode = 1 then + Caption := 'PSK31 Console'; +end; + +procedure TTTYConsole.RXChar(C : Char); +var i, j : integer; + S : string; +label xxxx; +begin + if C in [Chr(0)..Chr($09), Chr($0b)..Chr($0c), + Chr($0e)..Chr($1F), Chr($80)..Chr($FF)] then + exit; + RXLog.WriteChar(C); + + if (C = ' ') or (C = _CR) then + begin + i := pos('DE ', TTYLineBuffer); + if i > 0 then + begin + S := TTYLineBuffer; + Delete(S, 1, i-1); // S = DE XX1XXX + if length(S) > 5 then + begin + Delete(S, 1, 3); + S := TrimLeft(S); + i := pos(' ', S); + if i > 0 then + S := copy(S, 1, i-1); + if (length(S) >= 3) and (length(S) <= 15) then + begin + for j := 0 to CallsignList.Items.Count - 1 do + begin + if CallsignList.Items[j] = S then + goto xxxx; + end; + CallsignList.Items.Add(S); + //TTYLineBuffer := ''; + end; + end; + end; + +xxxx: + i := pos('599', TTYLineBuffer); + if i > 0 then + begin + S := TTYLineBuffer; + Delete(S, 1, i+2); + S := TrimLeft(S); + //Caption := Caption + '*' + S; + if S <> '' then + begin + if S[1] in [' ', '/', '-', '|'] then + Delete(S, 1, 1); + + for i := 1 to length(S) do + if S[i] in ['-', '/'] then + S[i] := ' '; + + i := pos(' ', S); + if i > 0 then + S := copy(S, 1, i-1); + if length(S) > 0 then + begin + if MainForm.NumberEdit.Text <> S then + begin + MainForm.NumberEdit.Text := S; + MainForm.NumberEdit.SelectAll; + end; + //TTYLineBuffer := ''; + end; + end; + end; + end; + + if C = _CR then + begin + TTYLineBuffer := ''; + end + else + TTYLineBuffer := TTYLineBuffer + C; +end; + +procedure TTTYConsole.TXChar(C : Char); +begin + //Clipboard.AsText := C; + //TXLog.PasteFromClipboard; + TXLog.Text := TXLog.Text + C; +end; + + +procedure TTTYConsole.TXLogKeyPress(Sender: TObject; var Key: Char); +begin + case TTYMode of + ttyMMTTY : + begin + if Key = Chr($08) then + begin + if TTYSendBuffer = '' then + begin + if MMTTY_TX then + mm_SendStr('X', False); + Key := 'X'; + exit; + end + else + begin + TTYSendBuffer := copy(TTYSendbuffer, 1, Length(TTYSendBUffer)-1); + exit; + end; + end; + if MMTTY_TX then + UMMTTY.mm_SendStr(Key, False) + else + begin + TTYSendBuffer := TTYSendBuffer + Key; + end; + end; + ttyPSK31 : exit; + end; +end; + +procedure TTTYConsole.SendStrNow(S: String); +begin + case TTYMode of + ttyMMTTY : + begin + UMMTTY.mm_SendStr(_CR+_LF+S+_CR+_LF, True); + TXLog.Lines.Add(S); + end; + ttyPSK31 : exit; + end; +end; + + +procedure TTTYConsole.Timer1Timer(Sender: TObject); +var i : integer; +begin + case TTYMode of + ttyMMTTY : + begin + if MMTTYBuffer = '' then + exit; + //RXLog.Text := RXLog.Text + MMTTYBuffer; + for i := 1 to length(MMTTYBuffer) do + RXChar(MMTTYBuffer[i]); + MMTTYBuffer := ''; + end; + ttyPSK31 : exit; + end; +end; + +procedure TTTYConsole.FormCreate(Sender: TObject); +begin + RXLog.ClrScr; + TTYSendBuffer := ''; + TTYLineBuffer := ''; + TTYMode := 0; +end; + +procedure TTTYConsole.TXLogKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case TTYMode of + ttyMMTTY : + begin + case Key of + VK_RIGHT, VK_LEFT, VK_UP, VK_DOWN, + VK_DELETE : + Key := 0; + VK_RETURN : + begin + if MMTTY_TX then + UMMTTY.mm_SendStr(_CR+_LF, False) + else + begin + TTYSendBuffer := TTYSendBuffer + _CR+_LF; + end; + end; + VK_F9 : + begin + if MMTTY_TX then + mm_RX + else + begin + if TTYSendBuffer <> '' then + begin + mm_SendStr(TTYSendBuffer, False); + TTYSendBuffer := ''; + end + else + mm_TX; + end; + end; + end; + end; + ttyPSK31 : + begin + end; + end; +end; + + + +procedure TTTYConsole.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +var i : integer; + S : string; +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + VK_F1..VK_F8, VK_F11, VK_F12 : + begin + i := Key - VK_F1 + 1; + S := Options.CWMessage(3,i); + S := SetStrNoAbbrev(S, Main.CurrentQSO); + SendStrNow(S); + end; + end; +end; + +procedure TTTYConsole.StayOnTopClick(Sender: TObject); +begin + mnStayOnTop.Checked := not(mnStayOnTop.Checked); + if mnStayOnTop.Checked then + begin + FormStyle := fsStayOnTop; + mnStayOnTop.Checked := True; + end + else + begin + FormStyle := fsNormal; + mnStayOnTop.Checked := False; + end; +end; + +procedure TTTYConsole.ClearRXlog1Click(Sender: TObject); +begin + RXLog.ClrScr; +end; + +procedure TTTYConsole.ClearTXlog1Click(Sender: TObject); +begin + TXLog.Clear; +end; + +procedure TTTYConsole.ClearCallsignlist1Click(Sender: TObject); +begin + CallsignList.Clear; +end; + +procedure TTTYConsole.Cleareverything1Click(Sender: TObject); +begin + CallsignList.Clear; + RXLog.ClrScr; + TXLog.Clear; +end; + +procedure TTTYConsole.CallsignListClick(Sender: TObject); +begin + if CallsignList.ItemIndex >= 0 then + begin + MainForm.CallsignEdit.Text := CallsignList.Items[CallsignLIst.ItemIndex]; + MainForm.CallsignEdit.SelectAll; + end; +end; + +procedure TTTYConsole.CallsignListDblClick(Sender: TObject); +begin + if CallsignList.ItemIndex >= 0 then + begin + MainForm.CallsignEdit.Text := CallsignList.Items[CallsignLIst.ItemIndex]; + MainForm.CallsignEdit.SelectAll; + MainForm.CallsignEdit.SetFocus; + end; +end; + +function TTTYConsole.Sending : boolean; +begin + case TTYMode of + ttyMMTTY : + begin + Result := MMTTY_TX; + end; + ttyPSK31 : Result := False; + end; +end; + +end. diff --git a/src/UUTCDialog.dfm b/src/UUTCDialog.dfm new file mode 100644 index 00000000..c24e7e9f Binary files /dev/null and b/src/UUTCDialog.dfm differ diff --git a/src/UUTCDialog.pas b/src/UUTCDialog.pas new file mode 100644 index 00000000..2000f0df --- /dev/null +++ b/src/UUTCDialog.pas @@ -0,0 +1,35 @@ +unit UUTCDialog; + +interface + +uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, + Buttons, ExtCtrls, zLogGlobal; + +type + TUTCDialog = class(TForm) + OKBtn: TButton; + Bevel1: TBevel; + CheckBox: TCheckBox; + procedure OKBtnClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + UTCDialog: TUTCDialog; + +implementation + +{$R *.DFM} + +procedure TUTCDialog.OKBtnClick(Sender: TObject); +begin + if CheckBox.Checked then + UseUTC := True + else + UseUTC := False; +end; + +end. diff --git a/src/UVoiceForm.dfm b/src/UVoiceForm.dfm new file mode 100644 index 00000000..79ec37bc --- /dev/null +++ b/src/UVoiceForm.dfm @@ -0,0 +1,30 @@ +object VoiceForm: TVoiceForm + Left = 675 + Top = 184 + Width = 280 + Height = 67 + Caption = 'Voice Control' + Color = clBtnFace + Font.Charset = SHIFTJIS_CHARSET + Font.Color = clWindowText + Font.Height = -12 + Font.Name = #65325#65331' '#65328#12468#12471#12483#12463 + Font.Style = [] + OldCreateOrder = False + PixelsPerInch = 96 + TextHeight = 12 + object MP: TMediaPlayer + Left = 0 + Top = 0 + Width = 141 + Height = 30 + VisibleButtons = [btPlay, btPause, btStop, btBack, btRecord] + TabOrder = 0 + end + object Timer: TTimer + Enabled = False + Interval = 100 + OnTimer = TimerTimer + Left = 240 + end +end diff --git a/src/UVoiceForm.pas b/src/UVoiceForm.pas new file mode 100644 index 00000000..1a46de41 --- /dev/null +++ b/src/UVoiceForm.pas @@ -0,0 +1,67 @@ +unit UVoiceForm; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, MPlayer, ExtCtrls, BGK32LIB, UOptions; + +type + TVoiceForm = class(TForm) + MP: TMediaPlayer; + Timer: TTimer; + procedure TimerTimer(Sender: TObject); + private + { Private 錾 } + public + LoopInterval : integer; // in milliseconds; + LoopCount : integer; + procedure SetLoopInterval(Intvl : integer); + function Playing : boolean; + { Public 錾 } + end; + +var + VoiceForm: TVoiceForm; + +implementation + +{$R *.dfm} + +procedure TVoiceForm.SetLoopInterval(Intvl : integer); +begin + LoopInterval := Intvl; + LoopCount := Intvl div 100; +end; + +function TVoiceForm.Playing : boolean; +begin + Result := MP.Mode = mpPlaying; +end; + +procedure TVoiceForm.TimerTimer(Sender: TObject); +begin + if MP.Mode = mpPlaying then + exit; + BGK32LIB.SetVoiceFlag(0); + if Options.PTTEnabled then + ControlPTT(False); + if LoopInterval > 0 then + begin + if LoopCount > 0 then + dec(LoopCount) + else // end of wait time + begin + LoopCount := LoopInterval div 100; + BGK32LIB.SetVoiceFlag(1); + if Options.PTTEnabled then + ControlPTT(True); + MP.Rewind; + MP.Play; + end; + exit; + end; + Timer.Enabled := False; +end; + +end. diff --git a/src/UVoiceThread.pas b/src/UVoiceThread.pas new file mode 100644 index 00000000..2e274f77 --- /dev/null +++ b/src/UVoiceThread.pas @@ -0,0 +1,140 @@ +unit UVoiceThread; + +interface + +uses + Classes, MMSystem, SysUtils, Windows, UOptions, BGK32LIB, WavePlayer; + + +var + WP : TWavePlayer; + FS : TFileStream; + +type + TVoiceThread = class(TThread) + private + { Private declarations } + _filename : string; + _loop : boolean; + _looptime : integer; + protected + procedure Execute; override; + public + constructor Create(FileName : string; Loop : boolean; LoopTime : integer); + procedure Pause; + function Playing : boolean; + // looptime is in millisec. + end; + +procedure BreakLoop; +//function VoicePlaying : boolean; + +implementation + +var Break : boolean; + +{ Important: Methods and properties of objects in VCL can only be used in a + method called using Synchronize, for example, + + Synchronize(UpdateCaption); + + and UpdateCaption could look like, + + procedure VoiceThread.UpdateCaption; + begin + Form1.Caption := 'Updated in a thread'; + end; } + +{ VoiceThread } + +procedure BreakLoop; +begin + Break := True; +end; + +procedure TVoiceThread.Pause; +begin + if WP <> nil then + WP.Pause; +end; + +function TVoiceThread.Playing : boolean; +begin + Result := False; + if WP = nil then + exit; + if WP.State = wpPlaying then + Result := True; +end; + +constructor TVoiceThread.Create(FileName : string; Loop : boolean; LoopTime : integer); +begin + _filename := FileName; + _loop := Loop; + _looptime := LoopTime; + Break := False; + //Playing := False; + FreeOnTerminate := True; + //WP := TWavePlayer.Create; + FS := TFileStream.Create(_FileName, fmOpenRead or fmShareDenyNone); + WP.Loop := False; + WP.Source := FS; + inherited Create(False); +end; + +procedure TVoiceThread.Execute; +var //P : PChar; + start : TDateTime; + +begin + //P := StrAlloc(256); + //StrPCopy(P, _filename); + if Not(_loop) then + begin + if Options.PTTEnabled then + BGK32LIB.ControlPTT(True); + BGK32LIB.SetVoiceFlag(1); + WP.Play; + Repeat + SleepEx(10,False); + until (WP.State = wpStopped) or Terminated; + //PlaySound(P ,0, snd_FileName or snd_Sync); + BGK32LIB.SetVoiceFlag(0); + if Options.PTTEnabled then + BGK32LIB.ControlPTT(False); + end + else + begin + while not(Terminated) and not(Break) do + begin + if Options.PTTEnabled then + BGK32LIB.ControlPTT(True); + BGK32LIB.SetVoiceFlag(1); + //PlaySound(P, 0, snd_FileName or snd_Sync); + //WP.Reset; + WP.Play; + Repeat + SleepEx(50,False); + until (WP.State = wpStopped) or Terminated; + if Terminated then + WP.Stop; + BGK32LIB.SetVoiceFlag(0); + if Options.PTTEnabled then + BGK32LIB.ControlPTT(False); + start := Time; + repeat + SleepEx(10,False); + until Break or Terminated or (Trunc((Time - start)*24*60*60*1000) >= _looptime) + end; + end; + { Place thread code here } + //StrDispose(P); + WP.Stop; + repeat until WP.State = wpStopped; + //WP.Free; + FS.Free; +end; + +initialization + WP := TWavePlayer.Create; +end. diff --git a/src/UWAEMulti.dfm b/src/UWAEMulti.dfm new file mode 100644 index 00000000..7351c1d5 Binary files /dev/null and b/src/UWAEMulti.dfm differ diff --git a/src/UWAEMulti.pas b/src/UWAEMulti.pas new file mode 100644 index 00000000..0f6e0cb8 --- /dev/null +++ b/src/UWAEMulti.pas @@ -0,0 +1,121 @@ +unit UWAEMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UARRLWMulti, Grids, Cologrid, StdCtrls, ExtCtrls, JLLabel, UMultipliers, + zLogGlobal; + +type + TWAEMulti = class(TARRLWMulti) + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + procedure AddNoUpdate(var aQSO : TQSO); override; + function GetInfo(aQSO : TQSO) : string; override; + procedure Update; override; + end; + +var + WAEMulti: TWAEMulti; + +implementation + +{$R *.DFM} + + + +procedure TWAEMulti.FormCreate(Sender: TObject); +begin + inherited; + //ShowContinent('EU'); +end; + +procedure TWAEMulti.AddNoUpdate(var aQSO : TQSO); +var str : string; + B : TBand; + i, j : integer; + C : TCountry; +begin + aQSO.QSO.NewMulti1 := False; + aQSO.QSO.NewMulti2 := False; + + i := GetCountryIndex(aQSO); + + C := TCountry(CountryList.List[i]); + if C.Continent <> 'EU' then + begin + aQSO.QSO.Points := 0; + aQSO.QSO.Multi1 := 'Non-EU'; + exit; + end; + aQSO.QSO.Multi1 := C.Country; + + if aQSO.QSO.Dupe then + exit; + + + B := aQSO.QSO.Band; + + if C.Worked[B] = False then + begin + C.Worked[B] := True; + aQSO.QSO.NewMulti1 := True; + //Grid.Cells[0,C.GridIndex] := C.Summary; + end; +end; + +function TWAEMulti.GetInfo(aQSO : TQSO) : string; +var temp, temp2 : string; + B : TBand; + i : integer; + C : TCountry; +begin + C := TCountry(CountryList.List[GetCountryIndex(aQSO)]); + if C.CountryName = 'Unknown' then + begin + Result := 'Unknown CTY'; + exit; + end; + temp := ''; + temp := C.Country+' '+C.Continent+ ' '; + + if C.Continent <> 'EU' then + begin + temp := 'NOT EUROPE '+temp; + Result := temp; + exit; + end; + + temp2 := ''; + if C.Worked[aQSO.QSO.Band] = false then + temp2 := 'CTY'; + + if temp2 <> '' then + temp2 := 'NEW '+temp2; + + temp := temp + temp2 + ' '; + + temp := temp + 'needed on : '; + for B := b19 to b28 do + if NotWARC(B) then + if C.Worked[B]=False then + temp := temp + MHzString[B] + ' '; + Result := temp; +end; + + + +procedure TWAEMulti.Update; +begin + ShowContinent('EU'); + RefreshGrid; + //RefreshZone; + RenewCluster; + RenewBandScope; +end; + +end. diff --git a/src/UWAEScore.dfm b/src/UWAEScore.dfm new file mode 100644 index 00000000..b5a3c2b7 Binary files /dev/null and b/src/UWAEScore.dfm differ diff --git a/src/UWAEScore.pas b/src/UWAEScore.pas new file mode 100644 index 00000000..5d86b07a --- /dev/null +++ b/src/UWAEScore.pas @@ -0,0 +1,126 @@ +unit UWAEScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, Aligrid, StdCtrls, Buttons, ExtCtrls, zLogGlobal; + +const BandFactor : array[b19..b28] of integer = + (0, 4, 3, 0, 2, 0, 2, 0, 2); // multi bonus factor + +type + TWAEScore = class(TBasicScore) + Grid: TStringAlignGrid; + private + { Private declarations } + QTCs : array[b19..b28] of integer; + public + procedure Reset; override; + procedure Renew; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + procedure SummaryWriteScore(FileName : string); override; + end; + +var + WAEScore: TWAEScore; + +implementation + +{$R *.DFM} + +procedure TWAEScore.Reset; +var B : TBand; +begin + inherited; + for b := b19 to b28 do + QTCs[b] := 0; +end; + +procedure TWAEScore.Renew; +var i : word; + band : TBand; +begin + Reset; + for i := 1 to Log.TotalQSO do + begin + band := TQSO(Log.List[i]).QSO.band; + inc(QSO[band]); + inc(Points[band],TQSO(Log.List[i]).QSO.Points); + if TQSO(Log.List[i]).QSO.NewMulti1 then + inc(Multi[band]); + if pos('[QTC', TQSO(Log.List[i]).QSO.Memo) > 0 then + inc(QTCs[band]); + end; +end; + +procedure TWAEScore.AddNoUpdate(var aQSO : TQSO); +var P : integer; + band : TBand; +begin + inherited; + if aQSO.QSO.Dupe then + exit; + if aQSO.QSO.Multi1 = 'Non-EU' then + exit; + band := aQSO.QSO.band; + aQSO.QSO.Points := 1; + inc(Points[band]); + if pos('[QTC', aQSO.QSO.Memo) > 0 then + inc(QTCs[band]); +end; + +procedure TWAEScore.Update; +var band : TBand; + TotQSO, TotMulti, TotQTCs : LongInt; + row : integer; +begin + TotQSO := 0; TotMulti := 0; TotQTCs := 0; + row := 1; + for band := b35 to b28 do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(QSO[band]); + TotQSO := TotQSO + QSO[band]; + Grid.Cells[2,row] := IntToStr(QTCs[band]); + TotQTCs := TotQTCs + QTCs[band]; + Grid.Cells[3,row] := IntToStr(BandFactor[band]*Multi[band]); + TotMulti := TotMulti + BandFactor[band]*Multi[band]; + inc(row); + end; + end; + Grid.Cells[1, 6] := IntToStr(TotQSO); + Grid.Cells[2, 6] := IntToStr(TotQTCs); + Grid.Cells[3, 6] := IntToStr(TotMulti); + Grid.Cells[3, 7] := IntToStr((TotQSO+TotQTCs)*TotMulti); +end; + +procedure TWAEScore.SummaryWriteScore(FileName : string); +var f : textfile; + tqso, tmulti, tqtc : LongInt; + b : TBand; +begin + tqso := 0; tqtc := 0; tmulti := 0; + AssignFile(f, FileName); + Append(f); + writeln(f, 'MHz QSOs QTCs Mult(*bonus)'); + for b := b35 to b28 do + begin + if NotWARC(b) then + begin + writeln(f, FillRight(MHzString[b],8)+FillLeft(IntToStr(QSO[b]),10)+ + FillLeft(IntToStr(QTCs[b]),10)+FillLeft(IntToStr(Multi[b]*BandFactor[b]),10)); + tqso := tqso + QSO[b]; + tqtc := tqtc + QTCs[b]; + tmulti := tmulti + Multi[b]*BandFactor[b]; + end; + end; + writeln(f, FillRight('Total :',8)+FillLeft(IntToStr(tqso),10)+ + FillLeft(IntToStr(tqtc),10)+FillLeft(IntToStr(tmulti),10)); + writeln(f,'Total score : ' + IntToStr((tqso+tqtc)*tmulti)); + CloseFile(f); +end; + +end. diff --git a/src/UWPXMulti.dfm b/src/UWPXMulti.dfm new file mode 100644 index 00000000..7f706e64 Binary files /dev/null and b/src/UWPXMulti.dfm differ diff --git a/src/UWPXMulti.pas b/src/UWPXMulti.pas new file mode 100644 index 00000000..a21d35f9 --- /dev/null +++ b/src/UWPXMulti.pas @@ -0,0 +1,376 @@ +unit UWPXMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UWWMulti, UMultipliers, StdCtrls, JLLabel, ExtCtrls, zLogGlobal, Grids, Cologrid, + UComm, USpotClass; + +type + TWPXMulti = class(TWWMulti) + procedure FormCreate(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure GoButtonClick(Sender: TObject); + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + private + { Private declarations } + public + { Public declarations } + WPXList : TStringList; + procedure RefreshGrid; override; + procedure SavePXList(filename : string); + function TotalPrefix : integer; + procedure Reset; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + function ValidMulti(aQSO : TQSO) : boolean; override; + procedure ProcessCluster(var Sp : TBaseSpot); override; + procedure Update; override; + end; + +function GetWPXPrefix(aQSO : TQSO) : string; + +var + WPXMulti: TWPXMulti; + +implementation + +uses UOptions, {UComm,} Main; + +{$R *.DFM} + +procedure TWPXMulti.RefreshGrid; +var i : integer; +begin + Grid.RowCount := WPXList.Count; + for i := Grid.TopRow to Grid.TopRow + Grid.VisibleRowCount - 1 do + begin + if (i > Grid.RowCount - 1) then + begin + exit; + end + else + begin + if (i >= 0) and (i < WPXList.Count) then + begin + Grid.Cells[0, i] := WPXList[i]; + end + else + Grid.Cells[0, i] := ''; + end; + end; +end; + +procedure TWPXMulti.SavePXList(filename : string); +begin + WPXList.SaveToFile(filename); +end; + +function TWPXMulti.TotalPrefix : integer; +begin + Result := WPXList.Count; +end; + +function GetWPXPrefix(aQSO : TQSO) : string; +var str, temp : string; + i, j, k : integer; + boo : boolean; +begin + str := aQSO.QSO.CallSign; + i := pos('/', str); + if i > 0 then + begin + temp := copy(str, i + 1, 255); + if (temp='AA') or (temp='AT') or (temp='AG') or (temp='AA') or + (temp='AE') or (temp='M') or (temp='P') or (temp='AM') or + (temp='QRP') or (temp='A') or (temp='KT') or (temp='MM') then + str := copy(str, 1, i - 1) {cut /AA /M etc} + else + if (length(temp) = 1) and (temp[1] in ['0'..'9']) then {JA1ZLO/2} + begin + j := 1; + repeat + inc(j); + until (str[j] in ['0'..'9']) or (length(str) < j); + str := copy(str, 1, j); + str[j] := temp[1]; + Result := str; + exit; + end + else + if i > 4 then {JA1ZLO/JD1, KH0AM/W6 etc NOT KH0/AD6AJ} + begin + boo := false; + for j := 1 to length(temp) do + if temp[j] in ['0'..'9'] then + begin + k := j; // holds the pos of last numeral + boo := true; + end; + if boo = False then + temp := temp + '0' {AD6AJ/PA => PA0} + else + begin + if temp[length(temp)] in ['A'..'Z'] then // /VP2E etc + temp := copy(temp, 1, k); + end; + Result := temp; + exit; + end + else {KH0/AD6AJ} + begin + temp := copy(str, 1, i-1); + boo := false; + for j := 1 to length(temp) do + if temp[j] in ['0'..'9'] then + begin + boo := true; + k := j; + end; + if boo = False then + temp := temp + '0' {PA/AD6AJ => PA0} + else + begin + if temp[length(temp)] in ['A'..'Z'] then + temp := copy(temp, 1, k); + end; + Result := temp; + exit; + end + end; + j := 1; + + repeat + inc(j); + until (length(str) < j) or (str[j] in ['0'..'9']); + + if j > length(str) then {XEFTA etc => XE0} + begin + Result := copy(str, 1, 2) + '0'; + exit; + end; + + j := length(str) + 1; + + repeat + dec(j); + until (j = 1) or ( (str[j]) in ['0'..'9'] ); + + {while (j < length(str)) and (str[j+1] in ['0'..'9']) do + inc(j);} + + {if j + 1 <= length(str) then + if str[j+1] in ['0'..'9'] then + inc(j);} + + Result := copy(str, 1, j); +end; + +procedure TWPXMulti.FormCreate(Sender: TObject); +var i : integer; + aQSO : TQSO; +begin + {inherited; } + WPXList := TStringList.Create; + WPXList.Sorted := True; + CountryList := TCountryList.Create; + PrefixList := TPrefixList.Create; + +//LoadCountryDataFromFile('CQWW.DAT'); + if FileExists('CTY.DAT') then + begin + LoadCTY_DAT(testCQWW, CountryList, PrefixList); + MainForm.WriteStatusLine('Loaded CTY.DAT', true); + end + else + LoadCountryDataFromFile('CQWW.DAT', CountryList, PrefixList); + + if CountryList.List.Count = 0 then exit; + Reset; + MyContinent := 'AS'; + MyCountry := 'JA'; + + if (Options.Settings._mycall <> '') and (Options.Settings._mycall <> 'Your call sign') then + begin + aQSO := TQSO.Create; + aQSO.QSO.callsign := UpperCase(Options.Settings._mycall); + i := GetCountryIndex(aQSO); + if i > 0 then + begin + MyCountry := TCountry(CountryList.List[i]).Country; + MyContinent := TCountry(CountryList.List[i]).Continent; + end; + aQSO.Free; + end; + + // WWZone.Reset; +end; + +procedure TWPXMulti.Reset; +begin + WPXList.Clear; +end; + +procedure TWPXMulti.Update; +begin + RefreshGrid; +end; + +procedure TWPXMulti.AddNoUpdate(var aQSO : TQSO); +var str : string; + i, max : integer; + C : TCountry; + P : TPrefix; + _cont : string[3]; +begin + aQSO.QSO.NewMulti1 := False; + str := GetWPXPrefix(aQSO); + aQSO.QSO.Multi1 := str; + aQSO.QSO.Points := 0; + + if aQSO.QSO.Dupe then + exit; + + if WPXList.IndexOf(str) >= 0 then + begin + end + else + begin + WPXList.Add(str); + aQSO.QSO.NewMulti1 := True; + end; + + P := GetPrefix(aQSO); + if P = nil then // /MM + begin + aQSO.QSO.Points := 0; + exit; + end; + C := TCountry(CountryList.List[P.Index]); + + if P.OvrContinent = '' then + _cont := C.Continent + else + _cont := P.OvrContinent; + + if _cont = 'AS' then + aQSO.QSO.Power2 := 777; // flag for all asian mode (dx side) + +//MAINFORM.WRITESTATUSLINE(C.COUNTRY); + + if C.Country = MyCountry then + begin + aQSO.QSO.Points := 1; + exit; + end; + + if MyContinent = _cont then + if MyContinent = 'NA' then + if aQSO.QSO.Band in [b19..b7] then + aQSO.QSO.Points := 4 + else + aQSO.QSO.Points := 2 + else + if aQSO.QSO.Band in [b19..b7] then + aQSO.QSO.Points := 2 + else + aQSO.QSO.Points := 1 + else + if aQSO.QSO.Band in [b19..b7] then + aQSO.QSO.Points := 6 + else + aQSO.QSO.Points := 3; + +end; + +function TWPXMulti.ValidMulti(aQSO : TQSO) : boolean; +var str : string; + B : TBand; + i : integer; +begin + str := aQSO.QSO.NrRcvd; + try + i := StrToInt(str); + except + on EConvertError do + i := -1; + end; + if i >= 0 then + Result := True + else + Result := False; +end; + + + +procedure TWPXMulti.FormShow(Sender: TObject); +begin + {inherited;} +end; + +procedure TWPXMulti.ProcessCluster(var Sp : TBaseSpot); +var Z, C, i : integer; + temp, px : string; + boo : boolean; + aQSO : TQSO; +begin + aQSO := TQSO.Create; + aQSO.QSO.Callsign := Sp.Call; + aQSO.QSO.Band := Sp.Band; + + Sp.NewCty := False; + Sp.NewZone := False; + Sp.Worked := False; + if Log.IsDupe(aQSO) > 0 then + begin + Sp.Worked := True; + aQSO.Free; + exit; + end; + + temp := aQSO.QSO.CallSign; + + px := GetWPXPrefix(aQSO); + + boo := False; + for i := 0 to WPXList.Count - 1 do + if px = WPXList[i] then + boo := True; + if boo = False then + begin + temp := temp + ' new prefix : ' + px; + Sp.NewCty := True; + end; + if Sp.NewMulti {Pos('new', temp) > 0} then + begin + temp := temp + ' at ' + MHzString[aQSO.QSO.band]+ 'MHz'; + CommForm.WriteStatusLine(temp); + //CommForm.Show; + end; + aQSO.Free; +end; + +procedure TWPXMulti.GoButtonClick(Sender: TObject); +var temp : string; + i : integer; +begin + temp := Edit1.Text; + for i := 0 to WPXList.Count-1 do + begin + if pos(temp, WPXList[i]) = 1 then + begin + Grid.TopRow := i; + break; + end; + end; +end; + +procedure TWPXMulti.GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); +begin + //inherited; + FColor := clBlack; +end; + +end. diff --git a/src/UWPXScore.dfm b/src/UWPXScore.dfm new file mode 100644 index 00000000..0dd1098d Binary files /dev/null and b/src/UWPXScore.dfm differ diff --git a/src/UWPXScore.pas b/src/UWPXScore.pas new file mode 100644 index 00000000..f8ce83ba --- /dev/null +++ b/src/UWPXScore.pas @@ -0,0 +1,124 @@ +unit UWPXScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, Grids, Aligrid, StdCtrls, ExtCtrls, zLogGlobal, Buttons; + +type + TWPXScore = class(TBasicScore) + Grid: TStringAlignGrid; + procedure FormCreate(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + AllAsianDXMode : Boolean; + procedure Reset; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + procedure SummaryWriteScore(FileName : string); override; + end; + +var + WPXScore: TWPXScore; + +implementation + +uses UWPXMulti; + +{$R *.DFM} + + +procedure TWPXScore.Reset; +var band : TBand; +begin + for band := b19 to HiBand do + begin + QSO[band] := 0; + Points[band] := 0; + end; +end; + +procedure TWPXScore.AddNoUpdate(var aQSO : TQSO); +var P : integer; + band : TBand; +begin + inherited; {points are calculated in WPXMulti} + if aQSO.QSO.Dupe then + exit; + + if AllAsianDXMode then + begin + case aQSO.QSO.Band of + b19: aQSO.QSO.Points := 3; + b35, b28 : aQSO.QSO.Points := 2; + b7..b21 : aQSO.QSO.Points := 1; + end; + if aQSO.QSO.Power2 = 777 then // asia. see uwpxmulti.addnoupdate + aQSO.QSO.Points := 0; + end; + + inc(Points[aQSO.QSO.Band], aQSO.QSO.Points); +end; + +procedure TWPXScore.Update; +var band : TBand; + TotQSO, TotPts : LongInt; + row : integer; +begin + TotQSO := 0; TotPts := 0; + row := 1; + for band := b19 to b28 do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(QSO[band]); + TotQSO := TotQSO + QSO[band]; + Grid.Cells[2,row] := IntToStr(Points[band]); + TotPts := TotPts + Points[band]; + inc(row); + end; + end; + Grid.Cells[1, 7] := IntToStr(TotQSO); + Grid.Cells[2, 7] := IntToStr(TotPts); + Grid.Cells[2, 8] := IntToStr(WPXMulti.TotalPrefix); + Grid.Cells[2, 9] := IntToStr(TotPts*WPXMulti.TotalPrefix); +end; + +procedure TWPXScore.SummaryWriteScore(FileName : string); +var f : textfile; + tqso, tpts : LongInt; + b : TBand; +begin + tqso := 0; tpts := 0; {tmulti := 0; } + AssignFile(f, FileName); + Append(f); + writeln(f, 'MHz QSOs Points'); + for b := b19 to b28 do + begin + if NotWARC(b) then + begin + writeln(f, FillRight(MHzString[b],8)+FillLeft(IntToStr(QSO[b]),10)+ + FillLeft(IntToStr(Points[b]),10) ); + tqso := tqso + QSO[b]; + tpts := tpts + Points[b]; + end; + end; + writeln(f, FillRight('Total :',8)+FillLeft(IntToStr(tqso),10)+ + FillLeft(IntToStr(tpts),10) ); + writeln(f, 'Total prefixes: ' + IntToStr(WPXMulti.TotalPrefix)); + writeln(f,'Total score : ' + IntToStr(tpts*WPXMulti.TotalPrefix)); + CloseFile(f); +end; + + + +procedure TWPXScore.FormCreate(Sender: TObject); +begin + inherited; + AllAsianDXMode := false; +end; + +end. diff --git a/src/UWWMulti.dfm b/src/UWWMulti.dfm new file mode 100644 index 00000000..9a2d2ee9 Binary files /dev/null and b/src/UWWMulti.dfm differ diff --git a/src/UWWMulti.pas b/src/UWWMulti.pas new file mode 100644 index 00000000..209d755b --- /dev/null +++ b/src/UWWMulti.pas @@ -0,0 +1,749 @@ +unit UWWMulti; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicMulti, StdCtrls, JLLabel, ExtCtrls, zLogGlobal, Grids, Cologrid, + USpotClass, UComm, UMultipliers; + + +type + TWWMulti = class(TBasicMulti) + Panel: TPanel; + Panel1: TPanel; + Button1: TButton; + Button3: TButton; + Edit1: TEdit; + RotateLabel1: TRotateLabel; + RotateLabel2: TRotateLabel; + RotateLabel3: TRotateLabel; + RotateLabel4: TRotateLabel; + RotateLabel5: TRotateLabel; + RotateLabel6: TRotateLabel; + SortBy: TRadioGroup; + StayOnTop: TCheckBox; + Grid: TMgrid; + procedure FormCreate(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure GoButtonClick(Sender: TObject); + procedure Edit1KeyPress(Sender: TObject; var Key: Char); + procedure SortByClick(Sender: TObject); + procedure StayOnTopClick(Sender: TObject); + procedure GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); + procedure FormDestroy(Sender: TObject); + procedure GridTopLeftChanged(Sender: TObject); + procedure FormResize(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + MostRecentCty : TCountry; + + GridReverse : array[0..500] of integer; {pointer from grid row to countrylist index} + //CountryList : TCountryList; + //PrefixList : TPrefixList; + Zone : array[b19..HiBand, 1..40] of boolean; + //MyCountry : string; + //MyZone : string; + //MyContinent : string; + procedure AddNewPrefixToFile(NewPX : string; CtyIndex : integer); + procedure AddNewPrefix(PX : string; CtyIndex : integer); override; + procedure SelectAndAddNewPrefix(Call : string); override; + //function GetCountryIndex(aQSO : TQSO) : integer; + //function GetPrefix(aQSO : TQSO) : TPrefix; + procedure Reset; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Add(var aQSO : TQSO); override; // only calls addnoupdate but no update + procedure Update; override; + function ValidMulti(aQSO : TQSO) : boolean; override; + function GuessZone(aQSO : TQSO) : string; override; + function GetInfo(aQSO : TQSO): string; override; + procedure ProcessCluster(var Sp : TBaseSpot); override; + procedure SortZone; virtual; + procedure SortContinent; virtual; + procedure SortDefault; virtual; + procedure ShowContinent(CT: string); + procedure CheckMulti(aQSO : TQSO); override; + //function GetArea(str : string) : integer; + //procedure RenewCluster; override; + procedure RefreshGrid; virtual; + procedure RefreshZone; + procedure ProcessSpotData(var S : TBaseSpot); override; + end; + +var + WWMulti: TWWMulti; + //PrefixList : TPrefixList; + //CountryList : TCountryList; + +implementation + +uses UWWZone, {UComm,} UOptions, Main, UNewPrefix; + +{$R *.DFM} + +procedure TWWMulti.AddNewPrefixToFile(NewPX : string; CtyIndex : integer); +var L : TStringList; + C : TCountry; + cname, s : string; + i, j, p : integer; +label xxx; +begin + L := TStringList.Create; + L.LoadFromFile(_DATFileName); + C := TCountry(CountryList.List[CtyIndex]); + cname := TrimRight(C.CountryName); + if _DATFileName = 'CTY.DAT' then + begin + for i := 0 to L.Count - 1 do + begin + s := L[i]; + if s[1] <> ' ' then + begin + p := pos(':', s); + if p > 0 then + s := TrimRight(copy(s, 1, p - 1)) + else + s := ''; + if cname = s then + begin + for j := i + 1 to L.Count - 1 do + begin + s := TrimRight(L[j]); + if pos(';', s) = length(s) then + begin + s := copy(s, 1, length(s) - 1); + s := s + ',' + NewPX + ';'; + L[j] := s; + goto xxx; + end; + end; + end; + end; + end; + end + else + begin + for i := 0 to L.Count - 1 do + begin + s := L[i]; + if s[1] <> ' ' then + begin + s := copy(s, 1, 26); + s := TrimRight(s); + if cname = s then + begin + for j := i + 1 to L.Count - 1 do + begin + s := TrimRight(L[j]); + if pos(';', s) = length(s) then + begin + s := copy(s, 1, length(s) - 1); + s := s + ',' + NewPX + ';'; + L[j] := s; + goto xxx; + end; + end; + end; + end; + end; + end; +xxx: + L.SaveToFile(_DATFileName); + L.Free; +end; + +procedure TWWMulti.AddNewPrefix(PX : string; CtyIndex : integer); +var P : TPrefix; +begin + P := TPrefix.Create; + P.Prefix := PX; + P.Index := CtyIndex; + P.Length := Length(PX); + PrefixList.AddListX(P); + PrefixList.InitIndexX; + AddNewPrefixToFile(P.Prefix, P.Index); + Main.MyContest.Renew; +end; + +procedure TWWMulti.SelectAndAddNewPrefix(Call : string); +var PX : TPrefix; +begin + if _DATFileName = '' then + exit; + NewPrefix.Init(CountryList, Call); + NewPrefix.ShowModal; + if (NewPrefix.Prefix <> '') and (NewPrefix.CtyIndex >= 0) then + begin + AddNewPrefix(NewPrefix.Prefix, NewPrefix.CtyIndex); + end; +end; + +procedure TWWMulti.Add(var aQSO : TQSO); +begin + AddNoUpdate(aQSO); + if (aQSO.QSO.Reserve2 <> $AA) and (MostRecentCty <> nil) then + Grid.TopRow := MostRecentCty.GridIndex; + RefreshGrid; + RefreshZone; + + AddSpot(aQSO); +end; + +procedure TWWMulti.Update; +begin + case SortBy.ItemIndex of + 0 : SortDefault; + 1 : SortZone; + end; + RefreshGrid; + RefreshZone; + RenewCluster; + RenewBandScope; +end; + +procedure TWWMulti.SortDefault; +var B : TBand; + i, j : integer; +begin + if CountryList.List.Count = 0 then exit; + for i := 0 to CountryList.List.Count-1 do + begin + TCountry(CountryList.List[i]).GridIndex := i; + GridReverse[i] := i; + end; +end; + +procedure TWWMulti.SortZone; +var B : TBand; + i, j, x, _top: integer; +begin + if CountryList.List.Count = 0 then exit; + GridReverse[0] := 0; + x := 1; + for i := 1 to 40 do + begin + for j := 1 to CountryList.List.Count - 1 do + begin + if TCountry(CountryList.List[j]).Zone = i then + begin + TCountry(CountryList.List[j]).GridIndex := x; + GridReverse[x] := j; + inc(x); + end; + end; + end; +end; + +procedure TWWMulti.SortContinent; +var B : TBand; + i, j, x, _top: integer; + cont : array[0..5] of string[3]; +begin + cont[0] := 'AS'; + cont[1] := 'AF'; + cont[2] := 'EU'; + cont[3] := 'NA'; + cont[4] := 'SA'; + cont[5] := 'OC'; + if CountryList.List.Count = 0 then exit; + GridReverse[0] := 0; + x := 1; + for i := 0 to 5 do + begin + for j := 1 to CountryList.List.Count - 1 do + begin + if TCountry(CountryList.List[j]).Continent = cont[i] then + begin + TCountry(CountryList.List[j]).GridIndex := x; + GridReverse[x] := j; + inc(x); + end; + end; + end; +end; + +procedure TWWMulti.ShowContinent(CT: string); +var B : TBand; + i, j, x: integer; + cont : array[0..5] of string[3]; +begin + cont[0] := 'AS'; + cont[1] := 'AF'; + cont[2] := 'EU'; + cont[3] := 'NA'; + cont[4] := 'SA'; + cont[5] := 'OC'; + + if CountryList.List.Count = 0 then exit; + GridReverse[0] := 0; + + for i := 1 to 500 do + GridReverse[i] := -1; + + x := 1; + + for j := 1 to CountryList.List.Count - 1 do + begin + if TCountry(CountryList.List[j]).Continent = CT then + begin + TCountry(CountryList.List[j]).GridIndex := x; + GridReverse[x] := j; + inc(x); + end + else + begin + TCountry(CountryList.List[j]).GridIndex := 0; + //GridReverse[x] := -1; + //inc(x); + end; + end; + +Grid.RowCount := x; + +end; + +procedure TWWMulti.Reset; +var B : TBand; + i : integer; +begin + WWZone.Reset; + for B := b19 to HiBand do + for i := 1 to MAXCQZONE do + Zone[B, i] := false; + if CountryList.List.Count = 0 then exit; + for i := 0 to CountryList.List.Count-1 do + begin + for B := b19 to HiBand do + TCountry(CountryList.List[i]).Worked[B] := false; + end; + case SortBy.ItemIndex of + 0 : SortDefault; + 1 : SortZone; + end; + Grid.RowCount := CountryList.List.Count; + //RefreshGrid; +end; + +procedure TWWMulti.RefreshGrid; +var i , k : integer; +begin + for i := Grid.TopRow to Grid.TopRow + Grid.VisibleRowCount - 1 do + begin + if (i > Grid.RowCount - 1) then + begin + exit; + end + else + begin + k := GridReverse[i]; + if (k >= 0) and (k < CountryList.List.Count) then + begin + Grid.Cells[0, i] := TCountry(CountryList.List[k]).Summary + end + else + Grid.Cells[0, i] := ''; + end; + end; + //Caption := IntToStr(Grid.TopRow); +end; + + +procedure TWWMulti.RefreshZone; +var i : integer; + B : TBand; +begin + WWZone.Reset; + for B := b19 to b28 do + if NotWARC(B) then + for i := 1 to 40 do + if Zone[B, i] then + WWZone.Mark(B,i); +end; + + +procedure TWWMulti.FormCreate(Sender: TObject); +var i : integer; + aQSO : TQSO; + P : TPrefix; + C : TCountry; +begin + inherited; + MostRecentCty := nil; + MainForm.mnGridAddNewPX.Visible := True; + CountryList := TCountryList.Create; + PrefixList := TPrefixList.Create; + {CountryList.LoadFromFile('CQWW.DAT');} + if FileExists('CTY.DAT') then + begin + LoadCTY_DAT(testCQWW, CountryList, PrefixList); + MainForm.WriteStatusLine('Loaded CTY.DAT', true); + end + else + LoadCountryDataFromFile('CQWW.DAT', CountryList, PrefixList); + + + if CountryList.List.Count = 0 then exit; + + Reset; + + AnalyzeMyCountry; + + WWZone.Reset; +end; + +procedure TWWMulti.Button1Click(Sender: TObject); +begin + inherited; + Close; +end; + +procedure TWWMulti.AddNoUpdate(var aQSO : TQSO); +var str : string; + B : TBand; + i, j : integer; + C : TCountry; + P : TPrefix; + _cont : string[3]; +begin + aQSO.QSO.NewMulti1 := False; + aQSO.QSO.NewMulti2 := False; + str := aQSO.QSO.NrRcvd; + aQSO.QSO.Multi1 := str; + aQSO.QSO.Multi2 := ''; + + if aQSO.QSO.Dupe then + exit; + + B := aQSO.QSO.band; + try + i := StrToInt(str); + except + on EConvertError do + i := 0; + end; + if i in [1..MAXCQZONE] then + if Zone[B,i] = False then + begin + Zone[B,i] := True; + aQSO.QSO.NewMulti1 := True; + //WWZone.Mark(B,i); + end; + + P := GetPrefix(aQSO); + + if P = nil then + begin + aQSO.QSO.Points := 0; + aQSO.QSO.Multi1 := 'Unknown'; + aQSO.QSO.Memo := '** UNKNOWN CTY ** '+aQSO.QSO.Memo; + exit; + end; + + //i := P.Index; + + C := TCountry(CountryList.List[P.Index]); + MostRecentCty := C; + + aQSO.QSO.Multi2 := C.Country; + + if C.Worked[B] = False then + begin + C.Worked[B] := True; + aQSO.QSO.NewMulti2 := True; + //Grid.Cells[0,C.GridIndex] := C.Summary; + end; + + if P.OvrContinent = '' then + _cont := C.Continent + else + _cont := P.OvrContinent; + + if MyCountry = C.Country then + aQSO.QSO.points := 0 + else + if MyContinent = _cont then + begin + if MyContinent = 'NA' then + aQSO.QSO.points := 2 + else + aQSO.QSO.points := 1; + end + else + aQSO.QSO.points := 3; +end; + +function TWWMulti.ValidMulti(aQSO : TQSO) : boolean; +var str : string; + B : TBand; + i : integer; +begin + str := aQSO.QSO.NrRcvd; + try + i := StrToInt(str); + except + on EConvertError do + i := 0; + end; + if i in [1..MAXCQZONE] then + Result := True + else + Result := False; +end; + +procedure TWWMulti.FormShow(Sender: TObject); +begin + inherited; + WWZone.Show; +end; + +function TWWMulti.GuessZone(aQSO : TQSO) : string; +begin + Result := GuessCQZone(aQSO); +end; + +function TWWMulti.GetInfo(aQSO : TQSO) : string; +var temp, temp2 : string; + B : TBand; + i : integer; + C : TCountry; +begin + C := TCountry(CountryList.List[GetCountryIndex(aQSO)]); + if C.CountryName = 'Unknown' then + begin + Result := 'Unknown CTY'; + exit; + end; + temp := ''; + temp := C.Country+' '+C.Continent+ ' '; + + temp2 := ''; + if C.Worked[aQSO.QSO.Band] = false then + temp2 := 'CTY'; + + i := 0; + try + i := StrToInt(aQSO.QSO.NrRcvd); + except + on EConvertError do + i := 0; + end; + + if i in [1..40] then + begin + if Zone[aQSO.QSO.Band, i] = False then + temp2 := temp2 + ' ZONE'; + end + else + begin + end; + + if temp2 <> '' then + temp2 := 'NEW '+temp2; + + temp := temp + temp2 + ' '; + + temp := temp + 'needed on : '; + for B := b19 to b28 do + if NotWARC(B) then + if C.Worked[B]=False then + temp := temp + MHzString[B] + ' '; + Result := temp; +end; + + +procedure TWWMulti.GoButtonClick(Sender: TObject); +var temp : string; + i : integer; +begin + temp := Edit1.Text; + for i := 0 to CountryList.List.Count-1 do + begin + if pos(temp,TCountry(CountryList.List[i]).Country) = 1 then + begin + // ListBox.TopIndex := i; + // ListBox.TopIndex := TCountry(CountryList.List[i]).GridIndex; + Grid.TopRow := TCountry(CountryList.List[i]).GridIndex; + break; + end; + end; +end; + +procedure TWWMulti.Edit1KeyPress(Sender: TObject; var Key: Char); +begin + inherited; + if Key = Chr($0D) then + begin + GoButtonClick(Self); + Key := #0; + end; +end; + +procedure TWWMulti.ProcessCluster(var Sp : TBaseSpot); +var Z, C : integer; + temp : string; + aQSO : TQSO; +begin + aQSO := TQSO.Create; + aQSO.QSO.Callsign := Sp.Call; + aQSO.QSO.Band := Sp.Band; + + Sp.NewCty := False; + Sp.NewZone := False; + Sp.Worked := False; + if Log.IsDupe(aQSO) > 0 then + begin + Sp.Worked := True; + aQSO.Free; + exit; + end; + + temp := GuessZone(aQSO); + if temp <> '' then + Z := StrToInt(GuessZone(aQSO)) + else + Z := 0; + + C := GetCountryIndex(aQSO); + + Sp.Zone := Z; + if C > 0 then + Sp.CtyIndex := C; + + temp := aQSO.QSO.CallSign; + if (Z > 0) and (Zone[aQSO.QSO.band, Z] = False) then{and not singlebander on other band} + begin + temp := temp + ' new zone : ' + GuessZone(aQSO); + Sp.NewZone := True; + end; + if (C > 0) and (TCountry(CountryList.List[C]).Worked[aQSO.QSO.Band] = false) then + begin + temp := temp + ' new country : ' + (TCountry(CountryList.List[C]).Country); + Sp.NewCty := True; + end; + if Sp.NewMulti{Pos('new', temp) > 0} then + begin + temp := temp + ' at ' + MHzString[aQSO.QSO.band]+ 'MHz'; + CommForm.WriteStatusLine(temp); + MainForm.WriteStatusLineRed(temp, true); + //CommForm.Show; + {if CommForm.Visible then + CommForm.FormStyle := fsStayOnTop;} + end; + aQSO.Free; +end; + +procedure TWWMulti.SortByClick(Sender: TObject); +begin + inherited; + case SortBy.ItemIndex of + 0 : SortDefault; + 1 : SortZone; + 2 : SortContinent; + end; + RefreshGrid; +end; + +procedure TWWMulti.CheckMulti(aQSO : TQSO); +var str : string; + i : integer; + B : TBand; +begin + str := aQSO.QSO.NrRcvd; + try + i := StrToInt(str); + except + on EConvertError do + i := 0; + end; + + if i in [1..MAXCQZONE] then + begin + str := 'Zone '+IntToStr(i)+ ' : '; + if Zone[aQSO.QSO.Band, i] then + str := str + 'Worked on this band. ' + else + str := str + 'Needed on this band. '; + str := str + 'Worked on : '; + for B := b19 to b28 do + if Zone[B, i] then + str := str + MHzString[B]+' '; + MainForm.WriteStatusLine(str, false); + end + else + MainForm.WriteStatusLine('Invalid zone', false); +end; + +procedure TWWMulti.StayOnTopClick(Sender: TObject); +begin + if StayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + + + +procedure TWWMulti.GridSetting(ARow, Acol: Integer; var Fcolor: Integer; + var Bold, Italic, underline: Boolean); +var B : TBand; +begin + inherited; + B := Main.CurrentQSO.QSO.Band; + if GridReverse[ARow] < 0 then + exit; + if TCountry(CountryList.List[GridReverse[ARow]]).Worked[B] then + FColor := clRed + else + FColor := clBlack; +end; + +procedure TWWMulti.FormDestroy(Sender: TObject); +begin + inherited; + { + if CountryList <> nil then + CountryList.Free; + if PrefixList <> nil then + PrefixList.Free;} +end; + +procedure TWWMulti.ProcessSpotData(var S : TBaseSpot); +var ctyidx, zn : integer; +begin + ProcessCluster(S); +{ + inherited; + if S.Worked then + exit; + ctyidx := S.CtyIndex; + zn := S.Zone; + if ctyidx > 0 then + if TCountry(CountryList.List[ctyidx]).Worked[S.Band] then + S.NewCty := False + else + S.NewCty := True; + if zn > 0 then + if Zone[S.Band, zn] then + S.NewZone := False + else + S.NewZone := True; +} +end; + +procedure TWWMulti.GridTopLeftChanged(Sender: TObject); +begin + //inherited; + RefreshGrid; +end; + +procedure TWWMulti.FormResize(Sender: TObject); +begin + inherited; + RefreshGrid; +end; + +end. diff --git a/src/UWWScore.dfm b/src/UWWScore.dfm new file mode 100644 index 00000000..611bf0f8 Binary files /dev/null and b/src/UWWScore.dfm differ diff --git a/src/UWWScore.pas b/src/UWWScore.pas new file mode 100644 index 00000000..9ff9b8d1 --- /dev/null +++ b/src/UWWScore.pas @@ -0,0 +1,144 @@ +unit UWWScore; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UBasicScore, zLogGlobal, Grids, Aligrid, StdCtrls, ExtCtrls, Buttons; + +type + TWWScore = class(TBasicScore) + Grid: TStringAlignGrid; + private + { Private declarations } + public + { Public declarations } + Multi2 : array[b19..HiBand] of LongInt; + constructor Create; override; + procedure Renew; override; + procedure Reset; override; + procedure AddNoUpdate(var aQSO : TQSO); override; + procedure Update; override; + procedure SummaryWriteScore(FileName : string); override; + end; + +var + WWScore: TWWScore; + +implementation + +{$R *.DFM} + +constructor TWWScore.Create; +var band : TBand; +begin + inherited; + for band := b19 to HiBand do + begin + Multi2[band] := 0; + end; +end; + +procedure TWWScore.Renew; +var i : word; + band : TBand; +begin + Reset; + for i := 1 to Log.TotalQSO do + begin + band := TQSO(Log.List[i]).QSO.band; + inc(QSO[band]); + inc(Points[band],TQSO(Log.List[i]).QSO.Points); + if TQSO(Log.List[i]).QSO.NewMulti1 then + inc(Multi[band]); + if TQSO(Log.List[i]).QSO.NewMulti2 then + inc(Multi2[band]); + end; +end; + +procedure TWWScore.Reset; +var band : TBand; +begin + for band := b19 to HiBand do + begin + QSO[band] := 0; + CWQSO[band] := 0; + Points[band] := 0; + Multi[band] := 0; + Multi2[band] := 0; + end; +end; + +procedure TWWScore.AddNoUpdate(var aQSO : TQSO); +var P : integer; + band : TBand; +begin + {BasicScore.AddNoUpdate(aQSO);} + inherited; + if aQSO.QSO.Dupe then + exit; + band := aQSO.QSO.band; + if aQSO.QSO.NewMulti2 then + inc(Multi2[band]); + inc(Points[band], aQSO.QSO.Points); {Points calculated in WWMulti.AddNoUpdate} +end; + +procedure TWWScore.Update; +var band : TBand; + TotQSO, TotPts, TotMulti, TotMulti2 : LongInt; + row : integer; +begin + TotQSO := 0; TotPts := 0; TotMulti := 0; TotMulti2 := 0; + row := 1; + for band := b19 to b28 do + begin + if NotWARC(band) then + begin + Grid.Cells[1,row] := IntToStr(QSO[band]); + TotQSO := TotQSO + QSO[band]; + Grid.Cells[2,row] := IntToStr(Points[band]); + TotPts := TotPts + Points[band]; + Grid.Cells[3,row] := IntToStr(Multi[band]); + TotMulti := TotMulti + Multi[band]; + Grid.Cells[4,row] := IntToStr(Multi2[band]); + TotMulti2 := TotMulti2 + Multi2[band]; + inc(row); + end; + end; + Grid.Cells[1, 7] := IntToStr(TotQSO); + Grid.Cells[2, 7] := IntToStr(TotPts); + Grid.Cells[3, 7] := IntToStr(TotMulti); + Grid.Cells[4, 7] := IntToStr(TotMulti2); + Grid.Cells[4, 8] := IntToStr(TotPts*(TotMulti+TotMulti2)); +end; + +procedure TWWScore.SummaryWriteScore(FileName : string); +var f : textfile; + tqso, tpts, tmulti, tmulti2 : LongInt; + b : TBand; +begin + tqso := 0; tpts := 0; tmulti := 0; tmulti2 := 0; + AssignFile(f, FileName); + Append(f); + writeln(f, 'MHz QSOs Points Zones Countries'); + for b := b19 to b28 do + begin + if NotWARC(b) then + begin + writeln(f, FillRight(MHzString[b],8)+FillLeft(IntToStr(QSO[b]),10)+ + FillLeft(IntToStr(Points[b]),10)+FillLeft(IntToStr(Multi[b]),10)+ + FillLeft(IntToStr(Multi2[b]),10)); + tqso := tqso + QSO[b]; + tpts := tpts + Points[b]; + tmulti := tmulti + Multi[b]; + tmulti2 := tmulti2 + Multi2[b]; + end; + end; + writeln(f, FillRight('Total :',8)+FillLeft(IntToStr(tqso),10)+ + FillLeft(IntToStr(tpts),10)+FillLeft(IntToStr(tmulti),10)+ + FIllLeft(IntToStr(tmulti2),10) ); + writeln(f,'Total score : ' + IntToStr(tpts*(tmulti+tmulti2))); + CloseFile(f); +end; + +end. diff --git a/src/UWWZone.dfm b/src/UWWZone.dfm new file mode 100644 index 00000000..5c46b2bb Binary files /dev/null and b/src/UWWZone.dfm differ diff --git a/src/UWWZone.pas b/src/UWWZone.pas new file mode 100644 index 00000000..92c935a0 --- /dev/null +++ b/src/UWWZone.pas @@ -0,0 +1,96 @@ +unit UWWZone; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, ExtCtrls, Grids, Aligrid, zLogGlobal; + +type + TWWZone = class(TForm) + Grid: TStringAlignGrid; + Panel1: TPanel; + Button1: TButton; + cbStayOnTop: TCheckBox; + procedure Button1Click(Sender: TObject); + procedure CreateParams(var Params: TCreateParams); override; + procedure FormResize(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure cbStayOnTopClick(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + + private + { Private declarations } + public + procedure Reset; + procedure Mark(B : TBand; Zone : integer); + { Public declarations } + end; + +var + WWZone: TWWZone; + +const + MaxWidth = 592; + +implementation + +uses Main; + +{$R *.DFM} + +procedure TWWZone.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TWWZone.Reset; +var B : TBand; + i : integer; +begin + for B := b19 to b28 do + if NotWARC(B) then + for i := 1 to 40 do + Grid.Cells[i, OldBandOrd(B)+1] := '.'; +end; + +procedure TWWZone.Mark(B : TBand; Zone : integer); +begin + Grid.Cells[Zone, OldBandOrd(B)+1] := '*'; +end; + +procedure TWWZone.Button1Click(Sender: TObject); +begin + Close; +end; + +procedure TWWZone.FormResize(Sender: TObject); +begin + if WWZone.Width > MaxWidth then + WWZone.Width := MaxWidth; +end; + +procedure TWWZone.FormCreate(Sender: TObject); +begin + Width := MaxWidth; +end; + +procedure TWWZone.cbStayOnTopClick(Sender: TObject); +begin + if cbStayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +procedure TWWZone.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + +end. diff --git a/src/UZLinkForm.dfm b/src/UZLinkForm.dfm new file mode 100644 index 00000000..5a9c02ac Binary files /dev/null and b/src/UZLinkForm.dfm differ diff --git a/src/UZLinkForm.pas b/src/UZLinkForm.pas new file mode 100644 index 00000000..db0a3ab8 --- /dev/null +++ b/src/UZLinkForm.pas @@ -0,0 +1,1074 @@ +unit UZLinkForm; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + ExtCtrls, Console2, StdCtrls, ComCtrls, zLogGlobal, + {async32,} WSocket, UScratchSheet; + + +type + + TQSOID = class + FullQSOID : integer; + QSOIDwoCounter : integer; + end; + + TZLinkForm = class(TForm) + StatusLine: TStatusBar; + Panel1: TPanel; + Button1: TButton; + Button2: TButton; + Edit: TEdit; + Button: TButton; + Console: TColorConsole2; + Timer1: TTimer; + Button3: TButton; + ZSocket: TWSocket; + procedure CreateParams(var Params: TCreateParams); override; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure Timer1Timer(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure EditKeyPress(Sender: TObject; var Key: Char); + procedure FormDestroy(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure ButtonClick(Sender: TObject); + //procedure AsyncCommRxChar(Sender: TObject; Count: Integer); + //procedure AsyncCommError(Sender: TObject; Errors: Integer); + procedure Button3Click(Sender: TObject); + procedure ZSocketDataAvailable(Sender: TObject; Error: Word); + procedure ZSocketSessionClosed(Sender: TObject; Error: Word); + procedure ZSocketSessionConnected(Sender: TObject; Error: Word); + private + { Private declarations } + CommTemp : string[255]; {command work string} + CommStarted : boolean; + public + { Public declarations } + //Transparent : boolean; // only for loading log from ZServer. False by default + CommBuffer : TStringList; + CommandQue : TStringList; + MergeTempList : TList; // temporary list to hold Z-Server QSOID list + // created when GETQSOIDS is issued and destroyed + // when all merge process is finished. List of TQSOID + DisconnectedByMenu : boolean; + procedure CommProcess; + procedure ImplementOptions; + procedure WriteData(str : string); + procedure SendMergeTempList; // request to send the qsos in the MergeTempList + procedure ProcessCommand; + procedure SendBand; {Sends current band (to Z-Server) #ZLOG# BAND 3 etc} + procedure SendOperator; + procedure SendQSO(aQSO : TQSO); + procedure SendQSO_PUTLOG(aQSO : TQSO); + procedure RelaySpot(S : string); //called from CommForm to relay spot info + procedure SendSpotViaNetwork(S : string); + procedure SendFreqInfo(Hz : integer); + procedure SendRigStatus; + procedure SendLogToZServer; + procedure MergeLogWithZServer; + procedure DeleteQSO(aQSO : TQSO); + //procedure SendQSOLog(aQSO : TQSO); + procedure LockQSO(aQSO : TQSO); + procedure UnLockQSO(aQSO : TQSO); + //procedure EditQSO(aQSO, bQSO : TQSO); + procedure EditQSObyID(aQSO : TQSO); + procedure InsertQSO(bQSO : TQSO); + procedure LoadLogFromZLink; + //procedure LoadLogFromZServer; + function ZServerConnected : boolean; + procedure GetCurrentBandData(B : TBand); // loads data from Z-Server to main Log. Issues SENDCURRENT n + procedure SendRemoteCluster(S : String); + procedure SendPacketData(S : String); + procedure SendScratchMessage(S : string); + procedure SendNewPrefix(PX : string; CtyIndex : integer); + procedure SendBandScopeData(BSText : string); + procedure PostWanted(Band: TBand; Mult : string); + procedure DelWanted(Band: TBand; Mult : string); + procedure PushRemoteConnect; // connect button in cluster win + end; + +var + ZLinkForm: TZLinkForm; + +implementation + +uses Main, UOptions, UChat, UZServerInquiry, UComm, URigControl, UFreqList, + UBandScope2; + +var CommProcessing : boolean; // commprocess flag; + +{$R *.DFM} + +procedure TZLinkForm.WriteData(str : string); +//var i : integer; +begin + if ZSocket.State = wsConnected then + ZSocket.SendStr(str); + +(* + case Options.Settings._zlinkport of + 1..6 : begin end; + {if AsyncComm.Enabled then + begin + i := AsyncComm.Write(str[1], Length(str)); + if i < 0 then Console.WriteString('Error'); + end; } + 7 : {if Sock1.Connected then + Sock1.Send(str); } + + if ZSocket.State = wsConnected then + ZSocket.SendStr(str); + end; +*) + +end; + +procedure TZLinkForm.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TZLinkForm.Button1Click(Sender: TObject); +begin + Close; +end; + +procedure TZLinkForm.Button2Click(Sender: TObject); +begin + if Self.FormStyle = fsStayOnTop then + begin + Self.FormStyle := fsNormal; + Button2.Caption := 'Stay on Top'; + end + else + begin + Self.FormStyle := fsStayOnTop; + Button2.Caption := 'Normal'; + end; +end; + +procedure TZLinkForm.Timer1Timer(Sender: TObject); +begin + if not(CommProcessing) then + CommProcess; +end; + +procedure TZLinkForm.SendLogToZServer; +var i : integer; + str : string; + R : TBandBool; + B : TBand; +begin + if Log.TotalQSO = 0 then exit; + R := Log.ContainBand; + for B := b19 to HiBand do + if R[B] then + begin + str := ZLinkHeader + ' RESET ' + IntToStr(Ord(B)); + //repeat until AsyncComm.OutQueCount = 0; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; + + for i := 1 to Log.TotalQSO do + begin + //repeat until AsyncComm.OutQueCount = 0; + SendQSO_PUTLOG(TQSO(Log.List[i])); + end; + + for B := b19 to HiBand do + if R[B] then + begin + str := ZLinkHeader + ' ENDLOG ' + IntToStr(Ord(B)); + //repeat until AsyncComm.OutQueCount = 0; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.MergeLogWithZServer; +var str : string; +begin + str := ZLinkHeader + ' GETQSOIDS'; + MergeTempList := TList.Create; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TZlinkForm.SendRemoteCluster(S : string); +var str : string; +begin + str := ZLinkHeader + ' SENDCLUSTER ' + S; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TZlinkForm.SendPacketData(S : string); +var str : string; +begin + str := ZLinkHeader + ' SENDPACKET ' + S; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TZlinkForm.SendScratchMessage(S : string); +var str : string; +begin + str := ZLinkHeader + ' SENDSCRATCH ' + S; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TZlinkForm.SendNewPrefix(PX : string; CtyIndex : integer); +var str : string; // NEWPX xxx...NEWPX +begin + str := ZLinkHeader + ' NEWPX '; + str := str + FillRight(IntToStr(CtyIndex), 6)+PX; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TZlinkForm.SendBandScopeData(BSText : string); +var str : string; +begin + str := ZLinkHeader + ' BSDATA '+BSText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TZlinkForm.PostWanted(Band: TBand; Mult : string); +var str : string; +begin + str := ZLinkHeader + ' POSTWANTED '+ IntToStr(Ord(Band))+' ' + Mult; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TZlinkForm.DelWanted(Band: TBand; Mult : string); +var str : string; +begin + str := ZLinkHeader + ' DELWANTED '+ IntToStr(Ord(Band))+' ' + Mult; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TZlinkForm.PushRemoteConnect; +var str : string; +begin + str := ZLinkHeader + ' CONNECTCLUSTER'; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TZLinkForm.SendMergeTempList; +var count, i : integer; + qid : TQSOID; + str : string; +begin + count := MergeTempList.Count; + if count = 0 then + begin + MergeTempList.Free; + exit; + end; + i := 0; + str := ''; + while i <= count - 1 do + begin + repeat + qid := TQSOID(MergeTempList[i]); + str := str + IntToStr(qid.FullQSOID)+' '; + qid.free; + inc(i); + until (i = count) or (i mod 20 = 0); + WriteData(ZLinkHeader+' '+'GETLOGQSOID '+str+LineBreakCode[ord(Console.LineBreak)]); + str := ''; // 2.0q + end; + WriteData(ZLinkHeader+' '+'SENDRENEW'+LineBreakCode[ord(Console.LineBreak)]); + MergeTempList.Free; +end; + +procedure TZLinkForm.ProcessCommand; +var temp, temp2 : string; + aQSO : TQSO; + i, j : integer; + B : TBand; + qid : TQSOID; + boo, needtorenew : boolean; +begin + while CommandQue.Count > 0 do + begin + temp := CommandQue.Strings[0]; + temp := copy(temp, length(ZLinkHeader)+2, 255); + + {if pos('TRANSPARENT', temp) = 1 then + begin + Delete(temp, 1, 12); + if pos('ON', temp) = 1 then + begin + Transparent := True; + MainForm.LoadCurrent.Enabled := False; + MainForm.UploadZServer.Enabled := False; + ZServerInquiry.TransparentOn; + end + else + begin + Transparent := False; + MainForm.LoadCurrent.Enabled := True; + MainForm.UploadZServer.Enabled := True; + end; + end; } + + if pos('FREQ', temp) = 1 then + begin + temp := copy(temp, 6, 255); + FreqList.ProcessFreqData(temp); + end; + + if pos('QSOIDS', temp) = 1 then + begin + Delete(temp, 1, 7); + i := pos(' ', temp); + while i > 1 do + begin + temp2 := copy(temp, 1, i-1); + Delete(temp, 1, i); + j := StrToInt(temp2); + qid := TQSOID.Create; + qid.FullQSOID := j; + qid.QSOIDwoCounter := j div 100; + MergeTempList.Add(qid); + i := pos(' ', temp); + end; + end; + + if pos('ENDQSOIDS', temp) = 1 then + begin + for i := 1 to Log.TotalQSO do + begin + aQSO := TQSO(Log.List[i]); + + boo := false; + needtorenew := false; + for j := 0 to MergeTempList.Count - 1 do + begin + qid := TQSOID(MergeTempList[j]); + if (aQSO.QSO.Reserve3 div 100) = qid.QSOIDwoCounter then + begin + if aQSO.QSO.Reserve3 = qid.FullQSOID then // exactly the same qso + begin + MergeTempList.Delete(j); + qid.free; + boo := true; + break; + end + else // counter is different + begin + if qid.FullQSOID > aQSO.QSO.Reserve3 then // serverdata is newer + begin + boo := true; + WriteData(ZLinkHeader+' '+'SENDQSOIDEDIT '+ + IntToStr(qid.FullQSOID)+LineBreakCode[ord(Console.LineBreak)]); + qid.free; + break; + // qid qso must be sent as editqsoto command; + end + else // local data is newer + begin + boo := true; + MergeTempList.Delete(j); + WriteData(ZLinkHeader+' '+'EDITQSOTO '+aQSO.QSOinText+LineBreakCode[ord(Console.LineBreak)]); + qid.free; + break; + // aQSO moved to ToSendList (but edit) + // or just ask to send immediately + end; + end; + end; + end; + if boo = false then + begin + SendQSO_PUTLOG(aQSO); + needtorenew := true; + // add aQSO to ToSendList; + // or just send putlog ... + // renew after done. + end; + end; + // getqsos from MergeTempList; (whatever is left) + // Free MergeTempList; + if needtorenew then + WriteData(ZLinkHeader+' '+'RENEW'+LineBreakCode[ord(Console.LineBreak)]); + SendMergeTempList; + end; + + if pos('PROMPTUPDATE', temp) = 1 then // file loaded on ZServer + begin + { if MessageDlg('The file on Z-Server has been updated. Do you want to download the data now?', + mtConfirmation, [mbYes, mbNo], 0) = mrYes then + LoadLogFromZServer; } + end; + if pos('NEWPX', temp) = 1 then + begin + Delete(temp, 1, 6); + try + i := StrToInt(TrimRight(copy(temp, 1, 6))); + except + on EConvertError do + i := -1; + end; + if i >= 0 then + begin + Delete(temp, 1, 6); + if temp <> '' then + MyContest.MultiForm.AddNewPrefix(temp, i); + end; + end; + if pos('PUTMESSAGE', temp) = 1 then + begin + Delete(temp, 1, 11); + if pos('!', temp) = 1 then + begin + Delete(temp, 1, 1); + MainForm.WriteStatusLineRed(temp, true); + end + else + MainForm.WriteStatusLine(temp, false); + ChatForm.Add(temp); + end; + if pos('POSTWANTED', temp) = 1 then + begin + temp := copy(temp, 12, 255); + MyContest.PostWanted(temp); + end; + if pos('DELWANTED', temp) = 1 then + begin + temp := copy(temp, 11, 255); + MyContest.DelWanted(temp); + end; + if pos('SPOT ', temp) = 1 then + begin + temp := copy(temp, 6, 255); + CommForm.PreProcessSpotFromZLink(temp); + end; + if pos('BSDATA ', temp) = 1 then + begin + temp := copy(temp, 8, 255); + BandScope2.ProcessBSDataFromNetwork(temp); + end; + if pos('SENDSPOT ', temp) = 1 then + begin + temp := copy(temp, 10, 255); + CommForm.WriteLine(temp); + end; + if pos('SENDCLUSTER ', temp) = 1 then // remote manipulation of cluster console + begin + temp := copy(temp, 13, 255); + CommForm.WriteLine(temp); + end; + if pos('SENDPACKET ', temp) = 1 then + begin + temp := copy(temp, 12, 255); + CommForm.WriteLineConsole(temp); + end; + if pos('SENDSCRATCH ', temp) = 1 then + begin + temp := copy(temp, 13, 255); + ScratchSheet.AddBuffer(temp); + ScratchSheet.Update; + end; + if pos('CONNECTCLUSTER', temp) = 1 then + begin + CommForm.RemoteConnectButtonPush; + end; + if pos('PUTQSO ', temp) = 1 then + begin + aQSO := TQSO.Create; + temp := copy(temp, 8, 255); + aQSO.TextToQSO(temp); + MyContest.LogQSO(aQSO, False); + aQSO.Free; + end; + if pos('DELQSO ', temp) = 1 then + begin + aQSO := TQSO.Create; + Delete(temp, 1, 7); + //temp := copy(temp, 8, 255); + aQSO.TextToQSO(temp); + aQSO.QSO.Reserve := actDelete; + Log.AddQue(aQSO); + Log.ProcessQue; + MyContest.Renew; + aQSO.Free; + end; + if pos('INSQSOAT ', temp) = 1 then + begin + aQSO := TQSO.Create; + Delete(temp, 1, 9); + aQSO.TextToQSO(temp); + aQSO.QSO.Reserve := actInsert; + Log.AddQue(aQSO); + //Log.ProcessQue; + //MyContest.Renew; + aQSO.Free; + end; + if pos('LOCKQSO', temp) = 1 then + begin + aQSO := TQSO.Create; + temp := copy(temp, 9, 255); + aQSO.TextToQSO(temp); + aQSO.QSO.Reserve := actLock; + Log.AddQue(aQSO); + Log.ProcessQue; + MyContest.Renew; + aQSO.Free; + end; + if pos('UNLOCKQSO', temp) = 1 then + begin + aQSO := TQSO.Create; + temp := copy(temp, 11, 255); + aQSO.TextToQSO(temp); + aQSO.QSO.Reserve := actUnlock; + Log.AddQue(aQSO); + Log.ProcessQue; + MyContest.Renew; + aQSO.Free; + end; + if pos('EDITQSOTO ', temp) = 1 then + begin + aQSO := TQSO.Create; + temp := copy(temp, 11, 255); + aQSO.TextToQSO(temp); + aQSO.QSO.Reserve := actEdit; + Log.AddQue(aQSO); + Log.ProcessQue; + MyContest.Renew; + aQSO.Free; + end; + if pos('INSQSO ', temp) = 1 then + begin + aQSO := TQSO.Create; + Delete(temp, 1, 7); + aQSO.TextToQSO(temp); + aQSO.QSO.Reserve := actInsert; + Log.AddQue(aQSO); + Log.ProcessQue; + MyContest.Renew; + aQSO.Free; + end; + if pos('PUTLOG ', temp) = 1 then + begin + //ZLinkForm.caption := 'PUTLOG'; + aQSO := TQSO.Create; + Delete(temp, 1, 7); + aQSO.TextToQSO(temp); + aQSO.QSO.Reserve := actAdd; + Log.AddQue(aQSO); + aQSO.Free; + end; + if pos('RENEW', temp) = 1 then + begin + Log.ProcessQue; + MyContest.Renew; + MainForm.EditScreen.Renew; + end; + if pos('SENDLOG', temp) = 1 then + begin + for i := 1 to Log.TotalQSO do + begin + //repeat until AsyncComm.OutQueCount = 0; + SendQSO_PUTLOG(TQSO(Log.List[i])); + end; + //repeat until AsyncComm.OutQueCount = 0; + WriteData(ZLinkHeader+' '+'RENEW'+LineBreakCode[ord(Console.LineBreak)]); + end; + CommandQue.Delete(0); + end; +end; + +procedure TZLinkForm.DeleteQSO(aQSO : TQSO); +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + str := ZLinkHeader + ' DELQSO '+aQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.LockQSO(aQSO : TQSO); +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + // aQSO.QSO.Reserve := actLock; + str := ZLinkHeader + ' LOCKQSO '+aQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.UnLockQSO(aQSO : TQSO); +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + // aQSO.QSO.Reserve := actUnLock; + str := ZLinkHeader + ' UNLOCKQSO '+aQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.SendBand; +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + str := ZLinkHeader + ' BAND '+IntToStr(ord(Main.CurrentQSO.QSO.Band)); + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.SendOperator; +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + str := ZLinkHeader + ' OPERATOR '+Main.CurrentQSO.QSO.Operator; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.SendFreqInfo(Hz : Integer); +var str : string; +begin + if Hz = 0 then + exit; + if Options.Settings._zlinkport in [1..7] then + begin + if Hz > 60000 then + str := RigControl.StatusSummaryFreq(round(Hz / 1000)) + else + str := RigControl.StatusSummaryFreqHz(Hz); + if str = '' then + exit; + FreqList.ProcessFreqData(str); + str := ZLinkHeader + ' FREQ '+ str; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.SendRigStatus; +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + str := RigControl.StatusSummary; + if str = '' then + begin + exit; + end; + FreqList.ProcessFreqData(str); + str := ZLinkHeader + ' FREQ '+ str; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.RelaySpot(S : string); +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + str := ZLinkHeader + ' SPOT '+S; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.SendSpotViaNetwork(S : string); +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + str := ZLinkHeader + ' SENDSPOT '+S; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.SendQSO(aQSO : TQSO); +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + str := ZLinkHeader + ' PUTQSO '+aQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.SendQSO_PUTLOG(aQSO : TQSO); +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + str := ZLinkHeader + ' PUTLOG '+aQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +(* +procedure TZLinkForm.SendQSOLog(aQSO : TQSO); +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + str := ZLinkHeader + ' PUTLOG '+aQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; +*) + +{ +procedure TZLinkForm.EditQSO(aQSO, bQSO : TQSO); +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + str := ZLinkHeader + ' EDITQSOFROM ' +aQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + repeat until AsyncComm.OutQueCount = 0; + str := ZLinkHeader + ' EDITQSOTO ' +bQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; +} + +procedure TZLinkForm.EditQSObyID(aQSO : TQSO); +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + //repeat until AsyncComm.OutQueCount = 0; + str := ZLinkHeader + ' EDITQSOTO ' +aQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.InsertQSO(bQSO : TQSO); +var str : string; +begin + if Options.Settings._zlinkport in [1..7] then + begin + { + str := ZLinkHeader + ' INSQSOAT ' +aQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + } + //repeat until AsyncComm.OutQueCount = 0; + str := ZLinkHeader + ' INSQSO ' +bQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; + {if Options.Settings._zlinkport in [1..7] then + begin + str := ZLinkHeader + ' INSQSO '+IntToStr(index)+ ' ' +aQSO.QSOinText; + WriteData(str); + end; } +end; + +procedure TZLinkForm.CommProcess; +var max , i, j, x : integer; + str, currstr : string; +begin + CommProcessing := True; + max := CommBuffer.Count - 1; + if max < 0 then + begin + CommProcessing := False; + exit; + end; + for i := 0 to max do + Console.WriteString(CommBuffer.Strings[i]); + + for i := 0 to max do + begin + str := CommBuffer.Strings[0]; + for j := 1 to length(str) do + begin + if str[j] = Chr($0D) then + begin + x := Pos(ZLinkHeader, CommTemp); + if x > 0 then + begin + //MainForm.WriteStatusLine(CommTemp); + //CHATFORM.ADD(COMMTEMP); + CommTemp := copy(CommTemp, x, 255); + CommandQue.Add(CommTemp); + end; + CommTemp := ''; + end + else + CommTemp := CommTemp + str[j]; + end; + CommBuffer.Delete(0); + end; + + ProcessCommand; + + CommProcessing := False; +end; + +procedure TZLinkForm.FormCreate(Sender: TObject); +begin + //Transparent := False; + DisconnectedByMenu := False; + CommProcessing := False; + MergeTempList := nil; + if Options.Settings._zlinkport in [1..6] then + begin + //Transparent := True; // rs-232c + // no rs232c allowed! + end; + CommStarted := False; + CommBuffer := TStringList.Create; + CommandQue := TStringList.Create; + CommTemp := ''; + Timer1.Enabled := True; + ImplementOptions; +{ if Options.Settings._zlinkport in [1..6] then + begin + try + Comm.StartComm; + except + on ECommsError do + begin + end; + end; + CommStarted := True; + end; } +end; + +procedure TZLinkForm.ImplementOptions; +begin + { + if Options.Settings._zlinkbaud <> 99 then + AsyncComm.BaudRate := TBaudRate(Options.Settings._zlinkbaud); + } + { + if Options.Settings._zlinkport in [1..6] then + begin + AsyncComm.DeviceName := 'COM'+IntToStr(Options.Settings._zlinkport); + AsyncComm.Open; + end + else + begin + AsyncComm.Close; + end; + } + + case Options.Settings._zlinkport of + 1..6 : Console.LineBreak := TConsole2LineBreak(Options.Settings._zlinklinebreakCOM); + 7 : Console.LineBreak := TConsole2LineBreak(Options.Settings._zlinklinebreakTELNET); + end; + try + ZSocket.Addr := Options.Settings._zlinkhost; + except + on ESocketException do + begin + MainForm.WriteStatusLine('Cannnot resolve host name', true); + end; + end; +end; + + +procedure TZLinkForm.EditKeyPress(Sender: TObject; var Key: Char); +var boo : boolean; +begin + case Options.Settings._zlinkport of + 1..6 : boo := Options.Settings._zlinklocalechoCOM; + 7 : boo := Options.Settings._zlinklocalechoTELNET; + end; + if Key = Chr($0D) then + begin + WriteData(Edit.Text+LineBreakCode[ord(Console.LineBreak)]); + if boo then + Console.WriteString(Edit.Text+LineBreakCode[ord(Console.LineBreak)]); + Key := Chr($0); + Edit.Text := ''; + end; +end; + +procedure TZLinkForm.FormDestroy(Sender: TObject); +begin + inherited; + {if AsyncComm.Enabled then + AsyncComm.Close;} +end; + +procedure TZLinkForm.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + +function TZLinkForm.ZServerConnected : boolean; +begin + //Result := Telnet.IsConnected; + //Result := (Sock1.Connected); + Result := (ZSocket.State = wsConnected); +end; + +procedure TZLinkForm.ButtonClick(Sender: TObject); +begin + if (ZSocket.State = wsConnected) then + begin + Button.Caption := 'Disconnecting...'; + ZSocket.Close; + end + else + begin + Button.Caption := 'Connecting...'; + ZSocket.Addr := Options.Settings._zlinkhost; + ZSocket.Port := 'telnet'; + ZSocket.Connect; + end; +end; + +(*procedure TZLinkForm.TelnetSessionClosed(Sender: TTnCnx; Error: Word); +begin + Console.WriteString('disconnected...'); + Button.Caption := 'Connect'; + MainForm.ConnectToZServer1.Caption := 'Connect to Z-Server'; +end; *) +{ +procedure TZLinkForm.AsyncCommRxChar(Sender: TObject; Count: Integer); +var + Buffer: array[0..5120] of Char; + Bytes, i: Integer; + str : string; + P : PChar; +begin + Bytes := AsyncComm.Read(Buffer, Count); + Buffer[Bytes] := #0; + P := @Buffer[0]; + CommBuffer.Add(strpas(P)); +end; + } + { +procedure TZLinkForm.AsyncCommError(Sender: TObject; Errors: Integer); +begin + Console.WriteString('Error '+IntToStr(Errors)+#13+#10); +end; +} +procedure TZLinkForm.Button3Click(Sender: TObject); +var i : integer; +begin + for i := 1 to Log.TotalQSO do + begin + //repeat until AsyncComm.OutQueCount = 0; + SendQSO(TQSO(Log.List[i])); + end; + //repeat until AsyncComm.OutQueCount = 0; + WriteData(ZLinkHeader+' '+'RENEW'+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TZLinkForm.LoadLogFromZLink; +var R : word; +begin + R := MessageDlg('This will delete all data and loads data using Z-Link', mtConfirmation, + [mbOK, mbCancel], 0); {HELP context 0} + if R = mrCancel then exit; + Log.Clear; + WriteData(ZLinkHeader+' '+'SENDLOG'+LineBreakCode[ord(Console.LineBreak)]); +end; +{ +procedure TZLinkForm.LoadLogFromZServer; +var R : TBandBool; + B : TBand; + str : string; +begin + for B := b19 to HiBand do + SubLog[B].Clear; + R := Log.ContainBand; + R[Main.CurrentQSO.QSO.Band] := True; + for B := b19 to HiBand do + if not(R[B]) then + begin + str := ZLinkHeader + ' SENDLOG ' + IntToStr(Ord(B)); + repeat until AsyncComm.OutQueCount = 0; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; +} +procedure TZLinkForm.GetCurrentBandData(B : TBand); +var str : string; +begin + str := ZLinkHeader + ' SENDCURRENT ' + IntToStr(Ord(B)); + //repeat until AsyncComm.OutQueCount = 0; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); +end; + +procedure TZLinkForm.ZSocketDataAvailable(Sender: TObject; Error: Word); +var Buf : array[0..2047] of char; + str : string; + Count, i : integer; + P : PChar; +begin + {while TRUE do begin + Count := ZSocket.Receive(@Buf, SizeOf(Buf) - 1); + if Count <= 0 then + break; + Buf[Count] := #0; + str := ''; + for i := 0 to Count-1 do + begin + str := str + Buf[i]; + if length(str)=255 then + begin + CommBuffer.Add(str); + str := ''; + end; + end; + CommBuffer.Add(str); + end;} + if Error <> 0 then + exit; + Count := TWSocket(Sender).Receive(@Buf, SizeOf(Buf)-1); + if Count <= 0 then + exit; + Buf[Count] := #0; + P := @Buf[0]; + str := StrPas(P); + CommBuffer.Add(str); + //CommProcess; +end; + +procedure TZLinkForm.ZSocketSessionClosed(Sender: TObject; Error: Word); +var R : word; +begin + Console.WriteString('disconnected...'); + Button.Caption := 'Connect'; + MainForm.ConnectToZServer1.Caption := 'Connect to Z-Server'; + MainForm.ZServerIcon.Visible := False; + MainForm.DisableNetworkMenus; + if DisconnectedByMenu = False then + begin + R := MessageDlg('Z-Server connection failed.', mtError, + [mbOK], 0); {HELP context 0} + { case R of + mrYes : + begin + ZSocket.Addr := Options.Settings._zlinkhost; + ZSocket.Port := 'telnet'; + ZSocket.Connect; + end; + end;} + end + else + DisconnectedByMenu := False; +end; + +procedure TZLinkForm.ZSocketSessionConnected(Sender: TObject; Error: Word); +begin + Button.Caption := 'Disconnect'; + MainForm.ConnectToZServer1.Caption := 'Disconnect Z-Server'; // 0.23 + Console.WriteString('connected to '+ZSocket.Addr+LineBreakCode[ord(Console.LineBreak)]); + SendBand; {tell Z-Server current band} + SendOperator; + ZServerInquiry.ShowModal; + MainForm.ZServerIcon.Visible := True; + MainForm.EnableNetworkMenus; +end; + +end. diff --git a/src/UZLinkFormOld.dfm b/src/UZLinkFormOld.dfm new file mode 100644 index 00000000..c9027817 Binary files /dev/null and b/src/UZLinkFormOld.dfm differ diff --git a/src/UZLinkFormOld.pas b/src/UZLinkFormOld.pas new file mode 100644 index 00000000..904509c3 --- /dev/null +++ b/src/UZLinkFormOld.pas @@ -0,0 +1,385 @@ +unit UZLinkFormOld; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + ExtCtrls, Console2, StdCtrls, ComCtrls, TnCnx, zLogGlobal, + ComDrv32; + +const ZLinkHeader = '#ZLOG#'; + +type + TZLinkForm = class(TForm) + StatusLine: TStatusBar; + Panel1: TPanel; + Button1: TButton; + Button2: TButton; + Edit: TEdit; + Button: TButton; + Console: TColorConsole2; + Timer1: TTimer; + Telnet: TTnCnx; + CommPort: TCommPortDriver; + Label1: TLabel; + Label2: TLabel; + procedure CreateParams(var Params: TCreateParams); override; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure Timer1Timer(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure EditKeyPress(Sender: TObject; var Key: Char); + procedure FormDestroy(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure TelnetDataAvailable(Sender: TTnCnx; Buffer: PChar; + Len: Integer); + procedure TelnetDisplay(Sender: TTnCnx; Str: String); + procedure ButtonClick(Sender: TObject); + procedure TelnetSessionConnected(Sender: TTnCnx; Error: Word); + procedure TelnetSessionClosed(Sender: TTnCnx; Error: Word); + procedure CommPortReceiveData(Sender: TObject; DataPtr: Pointer; + DataSize: Integer); + procedure CommPortReceivePacket(Sender: TObject; Packet: Pointer; + DataSize, ElapsedTime: Integer); + private + { Private declarations } + CommTemp : string; {command work string} + CommStarted : boolean; + public + { Public declarations } + CommBuffer : TStringList; + procedure CommProcess; + procedure ImplementOptions; + procedure WriteData(str : string); + procedure ProcessCommand(S : string); + procedure SendQSO(aQSO : TQSO); + procedure EditQSO(aQSO : TQSO; index : integer); + procedure InsertQSO(aQSO : TQSO; index : integer); + end; + +var + ZLinkForm: TZLinkForm; + +implementation + +uses Main, UOptions; + +{$R *.DFM} + +procedure TZLinkForm.WriteData(str : string); +begin + case Options.Settings._zlinkport of + 1..4 : if CommPort.Connected then + CommPort.SendData(PChar(str), Length(str)); + 5 : Telnet.SendStr(str); + end; +end; + +procedure TZLinkForm.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +procedure TZLinkForm.Button1Click(Sender: TObject); +begin + Close; +end; + +procedure TZLinkForm.Button2Click(Sender: TObject); +begin + if Self.FormStyle = fsStayOnTop then + begin + Self.FormStyle := fsNormal; + Button2.Caption := 'Stay on Top'; + end + else + begin + Self.FormStyle := fsStayOnTop; + Button2.Caption := 'Normal'; + end; +end; + +procedure TZLinkForm.Timer1Timer(Sender: TObject); +begin + CommProcess; +end; + +procedure TZLinkForm.ProcessCommand(S : string); +var temp : string; + aQSO : TQSO; +begin + temp := copy(S, length(ZLinkHeader)+2, 255); + MainForm.StatusLine.SimpleText := temp; + if pos('PUTQSO', temp) = 1 then + begin + aQSO := TQSO.Create; + temp := copy(temp, 8, 255); + aQSO.TextToQSO(temp); + MyContest.LogQSO(aQSO); + aQSO.Free; + end; +end; + +procedure TZLinkForm.SendQSO(aQSO : TQSO); +var str : string; +begin + if Options.Settings._zlinkport in [1..5] then + begin + str := ZLinkHeader + ' PUTQSO '+aQSO.QSOinText; + WriteData(str+LineBreakCode[ord(Console.LineBreak)]); + end; +end; + +procedure TZLinkForm.EditQSO(aQSO : TQSO; index : integer); +var str : string; +begin + if Options.Settings._zlinkport in [1..5] then + begin + str := ZLinkHeader + ' EDITQSO '+IntToStr(index)+ ' ' +aQSO.QSOinText; + WriteData(str); + end; +end; + +procedure TZLinkForm.InsertQSO(aQSO : TQSO; index : integer); +var str : string; +begin + if Options.Settings._zlinkport in [1..5] then + begin + str := ZLinkHeader + ' INSQSO '+IntToStr(index)+ ' ' +aQSO.QSOinText; + WriteData(str); + end; +end; + +procedure TZLinkForm.CommProcess; +var max , i, j, x : integer; + str, currstr : string; +begin + max := CommBuffer.Count - 1; + if max < 0 then exit; + label1.caption := 'commprocess'; + for i := 0 to max do + Console.WriteString(CommBuffer.Strings[i]); + + for i := 0 to max do + begin + str := CommBuffer.Strings[0]; + for j := 1 to length(str) do + begin + if str[j] = Chr($0D) then + begin + x := Pos(ZLinkHeader, CommTemp); + if x > 0 then + begin + CommTemp := copy(CommTemp, x, 255); + ProcessCommand(CommTemp); + end; + CommTemp := ''; + end + else + CommTemp := CommTemp + str[j]; + end; + CommBuffer.Delete(0); + end; +end; + +procedure TZLinkForm.FormCreate(Sender: TObject); +begin + CommStarted := False; + CommBuffer := TStringList.Create; + CommTemp := ''; + Timer1.Enabled := True; + ImplementOptions; +{ if Options.Settings._zlinkport in [1..4] then + begin + try + Comm.StartComm; + except + on ECommsError do + begin + end; + end; + CommStarted := True; + end; } +end; + +procedure TZLinkForm.ImplementOptions; +begin + if CommPort.Connected then + CommPort.Disconnect; + if Options.Settings._zlinkbaud <> 99 then + CommPort.ComPortSpeed := TComPortBaudRate(Options.Settings._zlinkbaud); + if Options.Settings._zlinkport in [1..4] then + begin + CommPort.ComPort := TComPortNumber(Options.Settings._zlinkport-1); + CommPort.Connect; + end + else + begin + end; + + + case Options.Settings._zlinkport of + 1..4 : Console.LineBreak := TConsole2LineBreak(Options.Settings._zlinklinebreakCOM); + 5 : Console.LineBreak := TConsole2LineBreak(Options.Settings._zlinklinebreakTELNET); + end; + Telnet.Host := Options.Settings._zlinkhost; + { if Options.Settings._zlinkport in [1..4] then + begin + if CommStarted then exit; + try + Comm.StartComm; + except + on ECommsError do + begin + Comm.StopComm; + Comm.StartComm; + end; + end; + CommStarted := True; + end; } +end; + + +procedure TZLinkForm.EditKeyPress(Sender: TObject; var Key: Char); +var boo : boolean; +begin + case Options.Settings._zlinkport of + 1..4 : boo := Options.Settings._zlinklocalechoCOM; + 5 : boo := Options.Settings._zlinklocalechoTELNET; + end; + if Key = Chr($0D) then + begin + WriteData(Edit.Text+LineBreakCode[ord(Console.LineBreak)]); + if boo then + Console.WriteString(Edit.Text+LineBreakCode[ord(Console.LineBreak)]); + Key := Chr($0); + Edit.Text := ''; + end; +end; + +procedure TZLinkForm.FormDestroy(Sender: TObject); +begin + inherited; + {Timer1.Enabled := False;} + {if CommStarted then } + if CommPort.Connected then + CommPort.Disconnect; +end; + +procedure TZLinkForm.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; +end; + + +procedure TZLinkForm.TelnetDataAvailable(Sender: TTnCnx; Buffer: PChar; + Len: Integer); +var str : string; +begin + str := strpas(Buffer); + CommBuffer.Add(str); +end; + +procedure TZLinkForm.TelnetDisplay(Sender: TTnCnx; Str: String); +begin + CommBuffer.Add(str); +end; + + +procedure TZLinkForm.ButtonClick(Sender: TObject); +begin + if Telnet.IsConnected then + begin + Telnet.Close; + Button.Caption := 'Disconnecting...'; + end + else + begin + Telnet.Connect; + Button.Caption := 'Connecting...'; + end; +end; + +procedure TZLinkForm.TelnetSessionConnected(Sender: TTnCnx; Error: Word); +begin + Button.Caption := 'Disconnect'; + Console.WriteString('connected to '+Telnet.Host); +end; + +procedure TZLinkForm.TelnetSessionClosed(Sender: TTnCnx; Error: Word); +begin + Console.WriteString('disconnected...'); + Button.Caption := 'Connect'; +end; + +procedure TZLinkForm.CommPortReceiveData(Sender: TObject; + DataPtr: Pointer; DataSize: Integer); +var str : string; + p : PChar; +begin +(* p := DataPtr; + str := ''; + while DataSize > 0 do + begin + case p^ of + {#10:; // LF + #13: // CR - cursor to next line + begin + if ComBuffer.Count <> 0 then + ComBuffer.Strings[CommBuffer.Count-1] := s + else + RxMemo.Lines.Add( s ); + RxMemo.Lines.Add( '' ); + s := ''; + end;} + #8: // Backspace - delete last char + delete( str, length(str), 1 ); + else // Any other char - add it to the current line + str := str + p^; + end; + dec( DataSize ); + inc( p ); + end; + {str := strpas(DataPtr);} + CommBuffer.Add(str); + Label2.Caption := IntToStr(DataSize); *) +end; + +procedure TZLinkForm.CommPortReceivePacket(Sender: TObject; + Packet: Pointer; DataSize, ElapsedTime: Integer); +var str : string; + p : PChar; +begin + p := Packet; + str := ''; + while DataSize > 0 do + begin + case p^ of + {#10:; // LF + #13: // CR - cursor to next line + begin + if ComBuffer.Count <> 0 then + ComBuffer.Strings[CommBuffer.Count-1] := s + else + RxMemo.Lines.Add( s ); + RxMemo.Lines.Add( '' ); + s := ''; + end;} + #8: // Backspace - delete last char + delete( str, length(str), 1 ); + else // Any other char - add it to the current line + str := str + p^; + end; + dec( DataSize ); + inc( p ); + end; + {str := strpas(DataPtr);} + CommBuffer.Add(str); +end; + +end. diff --git a/src/UZServerInquiry.dfm b/src/UZServerInquiry.dfm new file mode 100644 index 00000000..bfd079d3 Binary files /dev/null and b/src/UZServerInquiry.dfm differ diff --git a/src/UZServerInquiry.pas b/src/UZServerInquiry.pas new file mode 100644 index 00000000..c8f63529 --- /dev/null +++ b/src/UZServerInquiry.pas @@ -0,0 +1,68 @@ +unit UZServerInquiry; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, zLogGlobal; + +type + TZServerInquiry = class(TForm) + Button1: TButton; + Button2: TButton; + Label1: TLabel; + rbDownload: TRadioButton; + rbMerge: TRadioButton; + procedure Button2Click(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure FormShow(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + ZServerInquiry: TZServerInquiry; + +implementation + +uses UZLinkForm; + +{$R *.DFM} + +procedure TZServerInquiry.Button2Click(Sender: TObject); +begin + Close; +end; + +procedure TZServerInquiry.Button1Click(Sender: TObject); +begin + if rbMerge.Checked then + begin + ZLinkForm.MergeLogWithZServer; + end; + if rbDownload.Checked then + begin + ZLinkForm.LoadLogFromZLink; + end; + Close; +end; + +procedure TZServerInquiry.FormShow(Sender: TObject); +begin + if Log.TotalQSO = 0 then + begin + rbMerge.Checked := False; + rbDownload.Checked := True; + end + else + begin + rbMerge.Checked := True; + rbDownload.Checked := False; + end; + rbMerge.Enabled := True; +end; + + +end. diff --git a/src/UZlinkComSet.dfm b/src/UZlinkComSet.dfm new file mode 100644 index 00000000..116f91bb Binary files /dev/null and b/src/UZlinkComSet.dfm differ diff --git a/src/UZlinkComSet.pas b/src/UZlinkComSet.pas new file mode 100644 index 00000000..7fc6345a --- /dev/null +++ b/src/UZlinkComSet.pas @@ -0,0 +1,34 @@ +unit UZlinkComSet; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UClusterCOMSet, StdCtrls, ExtCtrls; + +type + TZLinkCOMSet = class(TClusterCOMSet) + private + { Private declarations } + public + { Public declarations } + procedure SetVisuals; override; + end; + +var + ZLinkCOMSet: TZLinkCOMSet; + +implementation + +uses UOptions; + +{$R *.DFM} + +procedure TZLinkCOMSet.SetVisuals; +begin + BaudCombo.ItemIndex := Options.Settings._zlinkbaud; + LineBreak.ItemIndex := Options.Settings._zlinklinebreakCOM; + LocalEcho.Checked := Options.Settings._zlinklocalechoCOM; +end; + +end. diff --git a/src/UZlinkTelnetSet.dfm b/src/UZlinkTelnetSet.dfm new file mode 100644 index 00000000..2f12b17b Binary files /dev/null and b/src/UZlinkTelnetSet.dfm differ diff --git a/src/UZlinkTelnetSet.pas b/src/UZlinkTelnetSet.pas new file mode 100644 index 00000000..b537412f --- /dev/null +++ b/src/UZlinkTelnetSet.pas @@ -0,0 +1,34 @@ +unit UZlinkTelnetSet; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UClusterTelnetSet, StdCtrls, ExtCtrls, Spin; + +type + TZLinkTelnetSet = class(TClusterTelnetSet) + private + { Private declarations } + public + procedure SetVisuals; override; + { Public declarations } + end; + +var + ZLinkTelnetSet: TZLinkTelnetSet; + +implementation + +uses UOptions; + +{$R *.DFM} + +procedure TZLinkTelnetSet.SetVisuals; +begin + HostName.Text := Options.Settings._zlinkhost; + LineBreak.ItemIndex := Options.Settings._zlinklinebreakTELNET; + LocalEcho.Checked := Options.Settings._zlinklocalechoTELNET; +end; + +end. diff --git a/src/Unit1.dfm b/src/Unit1.dfm new file mode 100644 index 00000000..0796305d Binary files /dev/null and b/src/Unit1.dfm differ diff --git a/src/Unit1.pas b/src/Unit1.pas new file mode 100644 index 00000000..134db883 --- /dev/null +++ b/src/Unit1.pas @@ -0,0 +1,90 @@ +unit Unit1; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + audio, StdCtrls, ExtCtrls, mmsystem; + +type + TForm1 = class(TForm) + Button1: TButton; + Button2: TButton; + Panel1: TPanel; + WaveIn1: TWaveIn; + WaveOut1: TWaveOut; + Button3: TButton; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure WaveIn1WaveInData(Data: PChar; Size: Integer); + procedure FormCreate(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure WaveOut1WaveOutDone(Sender: TObject); + procedure FormDestroy(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +uses msacm32; + +Var + i : integer; + PAudioBuf, AudioBuf : PChar; + +{$R *.DFM} + +procedure TForm1.FormCreate(Sender: TObject); +begin + GetMem(AudioBuf, 200000); + PAudioBuf := AudioBuf; +end; + +procedure TForm1.FormDestroy(Sender: TObject); +begin + FreeMem(AudioBuf); +end; + +procedure TForm1.WaveIn1WaveInData(Data: PChar; Size: Integer); +begin + inc(I, Size); + Panel1.Caption := Format('%d Bytes recorded', [i]); + move(Data^, PAudioBuf^, size); + inc(PAudioBuf, Size); +end; + +procedure TForm1.Button3Click(Sender: TObject); +Var + Size : Integer; +begin + Size := Abs(Integer(PAudioBuf) - Integer(AudioBuf) ) ; + PAudioBuf := AudioBuf; + WaveOut1.Open; + WaveOut1.PlayBack(AudioBuf, Size); +end; + +procedure TForm1.WaveOut1WaveOutDone(Sender: TObject); +begin + WaveOut1.Close; +end; + +procedure TForm1.Button1Click(Sender: TObject); +begin + i := 0; + // You may use WaveIn1.Open method also + wavein1.Recording := True; +end; + +procedure TForm1.Button2Click(Sender: TObject); +begin + wavein1.Recording := False; +end; + + +end. diff --git a/src/UzLogCW.pas b/src/UzLogCW.pas new file mode 100644 index 00000000..7a4da177 --- /dev/null +++ b/src/UzLogCW.pas @@ -0,0 +1,373 @@ +unit UzLogCW; + +interface + +uses zLogGlobal, BGK32LIB, UOptions, SysUtils; + +var CtrlZCQLoop : boolean; + QTHString : string[255]; + SpeedBefore : integer; + +const tabstate_normal = 0; + tabstate_tabpressedbutnotedited = 1; + tabstate_tabpressedandedited = 2; + +const EditedSinceTABPressed : integer = 0; + FixedSpeed : boolean = False; + +//const FIXWPM : integer = 20; + +function LastCallsign : string; +function SetStr(S : string; aQSO : TQSO) : String; +function SetStrNoAbbrev(S : string; aQSO : TQSO) : String; {for QSO.NrSent} +procedure zLogSendStr(S : shortstring); +procedure CtrlZBreak; +procedure IncCWSpeed; +procedure DecCWSpeed; +procedure ToggleFixedSpeed; + +implementation + +uses Main; + +function LastCallsign : string; +var txnr, i : integer; +begin + Result := ''; + txnr := Options.Settings._txnr; + for i := Log.TotalQSO downto 1 do + begin + if TQSO(Log.List[i]).QSO.TX = txnr then + Result := TQSO(Log.List[i]).QSO.Callsign; + exit; + end; +end; + +procedure IncCWSpeed; +var i : integer; +begin + i := Options.Settings.CW._speed; + if i < 60 then + Options.SetSpeed(i+1); + MainForm.SpeedBar.Position := i+1; + MainForm.SpeedLabel.Caption := IntToStr(i+1)+' wpm'; +end; + +procedure DecCWSpeed; +var i : integer; +begin + i := Options.Settings.CW._speed; + if i > 2 then + Options.SetSpeed(i-1); + MainForm.SpeedBar.Position := i-1; + MainForm.SpeedLabel.Caption := IntToStr(i-1)+' wpm'; +end; + +procedure ToggleFixedSpeed; +var i : integer; +begin + FixedSpeed := not(FixedSpeed); + if FixedSpeed then + begin + i := Options.Settings.CW._fixwpm; + SpeedBefore := Options.Settings.CW._speed; + end + else + begin + i := SpeedBefore; + end; + if (i > 0) and (i < 61) then + Options.SetSpeed(i); + MainForm.SpeedBar.Position := i; + MainForm.SpeedLabel.Caption := IntToStr(i)+' wpm'; +end; + +function Abbreviate(S : shortstring) : shortstring; +var ss : shortstring; + i : integer; +begin + SS := S; + for i := 1 to length(SS) do + case SS[i] of + '0' : SS[i] := Options.Settings.CW._zero; + '1' : SS[i] := Options.Settings.CW._one; + '9' : SS[i] := Options.Settings.CW._nine; + end; + Result := SS; +end; + +function SetStr(S : string; aQSO : TQSO) : string; +var temp : shortstring; + i : integer; +begin + temp := UpperCase(S); + while Pos('[AR]',temp) > 0 do + begin + i := Pos('[AR]',temp); + Delete(temp, i, 4); + Insert('a', temp, i); + end; + while Pos('[SK]',temp) > 0 do + begin + i := Pos('[SK]',temp); + Delete(temp, i, 4); + Insert('s', temp, i); + end; + while Pos('[VA]',temp) > 0 do + begin + i := Pos('[VA]',temp); + Delete(temp, i, 4); + Insert('s', temp, i); + end; + while Pos('[KN]',temp) > 0 do + begin + i := Pos('[KN]',temp); + Delete(temp, i, 4); + Insert('k', temp, i); + end; + while Pos('[BK]',temp) > 0 do + begin + i := Pos('[BK]',temp); + Delete(temp, i, 4); + Insert('~', temp, i); + end; + while Pos('$B',temp) > 0 do + begin + i := Pos('$B',temp); + Delete(temp, i, 2); + Insert(Main.CurrentQSO.QSO.Callsign, temp, i); + end; + while Pos('$X',temp) > 0 do + begin + i := Pos('$X',temp); + Delete(temp, i, 2); + Insert(Options.Settings._sentstr, temp, i); + end; + while Pos('$R',temp) > 0 do + begin + i := Pos('$R',temp); + Delete(temp, i, 2); + Insert(Abbreviate(aQSO.RSTSentStr), temp, i); + end; + while Pos('$F',temp) > 0 do + begin + i := Pos('$F',temp); + Delete(temp, i, 2); + Insert(Abbreviate(aQSO.QSO.NrRcvd), temp, i); + end; + while Pos('$Z',temp) > 0 do + begin + i := Pos('$Z',temp); + Delete(temp, i, 2); + //Insert(Abbreviate(QTHString), temp, i); + Insert(Abbreviate(Options.Settings._cqzone), temp, i); + end; + while Pos('$I',temp) > 0 do + begin + i := Pos('$I',temp); + Delete(temp, i, 2); + //Insert(Abbreviate(QTHString), temp, i); + Insert(Abbreviate(Options.Settings._iaruzone), temp, i); + end; + while Pos('$Q',temp) > 0 do + begin + i := Pos('$Q',temp); + Delete(temp, i, 2); + Insert(Abbreviate(MyContest.QTHString), temp, i); + end; + while Pos('$V',temp) > 0 do + begin + i := Pos('$V',temp); + Delete(temp, i, 2); + Insert(Abbreviate(Options.Settings._prov), temp, i); + end; + while Pos('$O',temp) > 0 do + begin + i := Pos('$O',temp); + Delete(temp, i, 2); + Insert(aQSO.QSO.Operator, temp, i); + end; + while Pos('$S',temp) > 0 do + begin + i := Pos('$S',temp); + Delete(temp, i, 2); + Insert(Abbreviate(aQSO.SerialStr), temp, i); + end; + while Pos('$P',temp) > 0 do + begin + i := Pos('$P',temp); + Delete(temp, i, 2); + Insert(aQSO.NewPowerStr, temp, i); + end; + + while Pos('$A',temp) > 0 do // all asian age + begin + i := Pos('$A',temp); + Delete(temp, i, 2); + Insert(Abbreviate(UpperCase(Options.GetAge(aQSO))), temp, i); + end; + + while Pos('$N',temp) > 0 do + begin + i := Pos('$N',temp); + Delete(temp, i, 2); + Insert(Abbreviate(aQSO.PowerStr), temp, i); + end; + + while Pos('$L',temp) > 0 do + begin + i := Pos('$L',temp); + Delete(temp, i, 2); + Insert(LastCallSign, temp, i); + end; + + while Pos('$C',temp) > 0 do + begin + i := Pos('$C',temp); + Delete(temp, i, 2); + if aQSO.QSO.mode = mRTTY then + Insert(aQSO.QSO.Callsign, temp, i) + else + Insert(':***************', temp, i); + end; + + while Pos('$E',temp) > 0 do + begin + i := Pos('$E',temp); + Delete(temp, i, 2); + if aQSO.QSO.Callsign = '' then + insert(LastCallsign, temp, i); + if EditedSinceTABPressed = tabstate_tabpressedandedited then + Insert(aQSO.QSO.Callsign, temp, i); +{ + if EditedSinceTABPressed = tabstate_tabpressedandedited then + Insert(':************', temp, i); +} + end; + while Pos('$M',temp) > 0 do + begin + i := Pos('$M',temp); + Delete(temp, i, 2); + Insert(UpperCase(Options.MyCall), temp, i); + end; + Result := temp; +end; + +function SetStrNoAbbrev(S : string; aQSO : TQSO) : string; +var temp : shortstring; + i : integer; +begin + temp := UpperCase(S); + if pos('$X', Options.Settings._sentstr) = 0 then + while Pos('$X',temp) > 0 do + begin + i := Pos('$X',temp); + Delete(temp, i, 2); + Insert(Options.Settings._sentstr, temp, i); + end; + while Pos('$Z',temp) > 0 do + begin + i := Pos('$Z',temp); + Delete(temp, i, 2); + Insert(Options.Settings._cqzone, temp, i); + //Insert(QTHString, temp, i); + end; + while Pos('$I',temp) > 0 do + begin + i := Pos('$I',temp); + Delete(temp, i, 2); + Insert(Options.Settings._iaruzone, temp, i); + //Insert(QTHString, temp, i); + end; + while Pos('$R',temp) > 0 do + begin + i := Pos('$R',temp); + Delete(temp, i, 2); + Insert(aQSO.RSTSentStr, temp, i); + end; + while Pos('$F',temp) > 0 do + begin + i := Pos('$F',temp); + Delete(temp, i, 2); + Insert(aQSO.QSO.NrRcvd, temp, i); + end; + while Pos('$O',temp) > 0 do + begin + i := Pos('$O',temp); + Delete(temp, i, 2); + Insert(aQSO.QSO.Operator, temp, i); + end; + + while Pos('$A',temp) > 0 do // all asian age + begin + i := Pos('$A',temp); + Delete(temp, i, 2); + Insert(UpperCase(Options.GetAge(aQSO)), temp, i); + end; + + while Pos('$P',temp) > 0 do + begin + i := Pos('$P',temp); + Delete(temp, i, 2); + Insert(aQSO.NewPowerStr, temp, i); + end; + while Pos('$N',temp) > 0 do + begin + i := Pos('$N',temp); + Delete(temp, i, 2); + Insert(aQSO.PowerStr, temp, i); + end; + while Pos('$Q',temp) > 0 do + begin + i := Pos('$Q',temp); + Delete(temp, i, 2); + Insert(MyContest.QTHString, temp, i); + end; + while Pos('$V',temp) > 0 do + begin + i := Pos('$V',temp); + Delete(temp, i, 2); + Insert(Options.Settings._prov, temp, i); + end; + while Pos('$S',temp) > 0 do + begin + i := Pos('$S',temp); + Delete(temp, i, 2); + Insert(aQSO.SerialStr, temp, i); + end; + while Pos('$C',temp) > 0 do + begin + i := Pos('$C',temp); + Delete(temp, i, 2); + Insert(aQSO.QSO.Callsign, temp, i); + end; + while Pos('$M',temp) > 0 do + begin + i := Pos('$M',temp); + Delete(temp, i, 2); + Insert(UpperCase(Options.MyCall), temp, i); + end; + Result := (temp); +end; + +procedure zLogSendStr(S : shortstring); +begin + PauseCW; + if Options.FIFO then + SendStrFIFO(S) + else + SendStr(S); + BGK32LIB.SetCallSign(ShortString(Main.CurrentQSO.QSO.Callsign)); + ResumeCW; +end; + +procedure CtrlZBreak; +begin + CtrlZCQLoop := False; + BGK32LIB.ClrBuffer; +end; + +initialization + CtrlZCQLoop := False; + QTHString := ''; +end. diff --git a/src/UzLogVoice.pas b/src/UzLogVoice.pas new file mode 100644 index 00000000..3b9a3490 --- /dev/null +++ b/src/UzLogVoice.pas @@ -0,0 +1,91 @@ +unit UzLogVoice; + +interface + +var CtrlZCQLoopVoice : boolean; + +procedure SendVoice(i : integer); +procedure StopVoice; +procedure CQLoopVoice; +procedure CtrlZBreakVoice; + +implementation + +uses UOptions, SysUtils, Main, BGK32LIB, UVoiceForm, MPlayer; + + +procedure SendVoice(i : integer); +var filename : string; +begin + if i > 8 then + exit; + filename := Options.Settings._soundfiles[i]; + if FileExists(filename) = False then + exit; + if VoiceForm.Playing then + VoiceForm.MP.Stop; + VoiceForm.MP.FileName := filename; + VoiceForm.MP.Open; + BGK32LIB.SetVoiceFlag(1); + if Options.PTTEnabled then + ControlPTT(True); + VoiceForm.LoopInterval := 0; + VoiceForm.MP.Play; + VoiceForm.Timer.Enabled := True; +end; + +procedure StopVoice; +begin + try + VoiceForm.MP.Stop; + except + on EMCIDeviceError do + begin + VoiceForm.Timer.Enabled := false; + BGK32LIB.SetVoiceFlag(0); + if Options.PTTEnabled then + ControlPTT(False); + exit; + end; + end; + VoiceForm.MP.Rewind; + VoiceForm.Timer.Enabled := false; + BGK32LIB.SetVoiceFlag(0); + if Options.PTTEnabled then + ControlPTT(False); +end; + +procedure CQLoopVoice; +var filename : string; + Interval : integer; +begin + StopVoice; + filename := Options.Settings._soundfiles[1]; + Interval := Trunc(1000*Options.Settings.CW._cqrepeat); + VoiceForm.SetLoopInterval(Interval); + + //filename := Options.Settings._soundfiles[1]; + if FileExists(filename) = False then + exit; + if VoiceForm.Playing then + begin + VoiceForm.MP.Stop; + end; + VoiceForm.MP.FileName := filename; + VoiceForm.MP.Open; + BGK32LIB.SetVoiceFlag(1); + if Options.PTTEnabled then + ControlPTT(True); + VoiceForm.MP.Play; + VoiceForm.Timer.Enabled := True; +end; + +procedure CtrlZBreakVoice; +begin + CtrlZCQLoopVoice := False; + StopVoice; +end; + +initialization + CtrlZCQLoopVoice := True; +end. diff --git a/src/Vic_Res.pas b/src/Vic_Res.pas new file mode 100644 index 00000000..889909ab --- /dev/null +++ b/src/Vic_Res.pas @@ -0,0 +1,1318 @@ +{========================================================================} +{===================== TVicRes class definition =======================} +{========================================================================} + +unit Vic_Res; + +interface + +uses SysUtils, Windows,Messages,Classes; + +//{$DEFINE DEMOVERSION} + +//======================================================================== +//====================== Windows 95/98 ============================== +//======================================================================== + +const ResType_Mem = $00000001; // Physical address resource. +const ResType_IO = $00000002; // Physical IO address resource. +const ResType_DMA = $00000003; // DMA channels 0-7 resource. +const ResType_IRQ = $00000004; // IRQ 0-15 resource. + +const MAX_RESOURCE_SIZE = 16; + +type TMem95Config = record + + LengthRecord : dWord; + TypeRecord : dWord; // ResType_Mem = $00000001; + + MD_Count : Word; + MD_Type : Word; + MD_Alloc_Base : LongInt; + MD_Alloc_End : LongInt; + MD_Flags : Word; + MD_Reserved : Word; + + MR_Align : LongInt; // Mask for base alignment + MR_nBytes : LongInt; // Count of bytes + MR_Min : LongInt; // Min Address + MR_Max : LongInt; // Max Address + MR_Flags : Word; // Flags + MR_Reserved : Word; + + end; + +type TPort95Config = record + + LengthRecord : dWord; + TypeRecord : dWord; // ResType_IO = $00000002; + + IOD_Count : Word; + IOD_Type : WORD; + IOD_Alloc_Base : WORD; + IOD_Alloc_End : WORD; + IOD_DesFlags : WORD; + IOD_Alloc_Alias : BYTE; + IOD_Alloc_Decode : BYTE; + + IOR_Align : WORD; // Mask for base alignment + IOR_nPorts : WORD; // Number of ports + IOR_Min : WORD; // Min port address + IOR_Max : WORD; // Max port address + IOR_RangeFlags : WORD; // Flags + IOR_Alias : BYTE; // Alias offset + IOR_Decode : BYTE; // Address specified + +end; + + +type TDMA95Config = record + LengthRecord : dWord; + TypeRecord : dWord; // ResType_DMA = $00000003; + + DD_Flags : BYTE; + DD_Alloc_Chan : BYTE; // Channel number allocated + DD_Req_Mask : BYTE; + DD_Reserved : BYTE; +end; + +type TIRQ95Config = record + + LengthRecord : dWord; + TypeRecord : dWord; // ResType_IRQ = $00000004; + + IRQD_Flags : WORD; + IRQD_Alloc_Num : WORD; // Allocated IRQ number + IRQD_Req_Mask : WORD; + IRQD_Reserved : WORD; + + end; + +//======================================================================== +//====================== Windows NT ============================== +//======================================================================== + +const CmResourceTypePort = 1; +const CmResourceTypeInterrupt = 2; +const CmResourceTypeMemory = 3; +const CmResourceTypeDma = 4; + +type + PHYSICAL_ADDRESS = array[0..1] of Longint; + + TPortResource_NT = record + Start : PHYSICAL_ADDRESS; + Length : Longint; + end; + + TInterruptResource_NT = record + Level : Longint; + Vector : Longint; + Affinity : Longint; + end; + + TMemoryResource_NT = record + Start : PHYSICAL_ADDRESS; + Length : Longint; + end; + + TDMAResource_NT = record + Channel : Longint; + PortAddr : Longint; + Reserved1 : Longint; + end; + + TDataResource = record + DataSize : Longint; + Reserved1 : Longint; + Reserved2 : Longint; + end; + + CM_PARTIAL_RESOURCE_DESCRIPTOR = record + TypeResource : Byte; // Specifies type of resource + ShareDisposition : Byte; // Specifies how this resourse can be shared + Flags : Word; // Specifies type-dependent information + case Integer of + 0 : (PortResource : TPortResource_NT); + 1 : (InterruptResource : TInterruptResource_NT); + 2 : (MemoryResource : TMemoryResource_NT); + 3 : (DMAResource : TDMAResource_NT); + end; + + CM_PARTIAL_RESOURCE_LIST = record + Version : Word; // The version number of this structure. + Revision : Word; // The revision of this structure. + Count : Longint; // The number of partial resource descriptors + PartialDescriptors : array[1..MAX_RESOURCE_SIZE] of CM_PARTIAL_RESOURCE_DESCRIPTOR; + end; + + CM_FULL_RESOURCE_DESCRIPTOR = record + + InterfaceType : DWORD; // Specifies the bus interface type + BusNumber : DWORD; // The zero-based number for this bus + PartialResourceList : CM_PARTIAL_RESOURCE_LIST; + + end; + + CM_RESOURCE_LIST = record + Count : Longint; // The number of full resource descriptors + List : array[1..MAX_RESOURCE_SIZE] of CM_FULL_RESOURCE_DESCRIPTOR; + end; + + +type + + TVicRes = class + + private + + fWin95 : Boolean; + fNT5 : Boolean; + + fClassN : String; + + fDevices : Word; + fHardwareKeys : array[1..MAX_RESOURCE_SIZE] of String; + fDeviceDescriptors: array[1..MAX_RESOURCE_SIZE] of String; + + fIRQCounter : Word; + fIRQNumber : array[1..MAX_RESOURCE_SIZE] of Byte; + + fDMACounter : Word; + fDMAChannel : array[1..MAX_RESOURCE_SIZE] of Byte; + + fPortCounter : Word; + fPortBase : array[1..MAX_RESOURCE_SIZE] of Word; + fPortEnd : array[1..MAX_RESOURCE_SIZE] of Word; + + fMemCounter : Word; + fMemBase : array[1..MAX_RESOURCE_SIZE] of DWORD; + fMemEnd : array[1..MAX_RESOURCE_SIZE] of DWORD; + + function GetIRQNumber(nom:Word):Word; + function GetDMAChannel(nom:Word):Word; + function GetPortBase(nom:Word):Word; + function GetPortEnd(nom:Word):Word; + function GetMemBase(nom:Word):DWORD; + function GetMemEnd(nom:Word):DWORD; + + function GetHardwareKey(nom:Word):String; + function GetDeviceDescriptor(nom:Word):String; + + function SearchByClass_9X(Class_Name:String) : BOOL; + function SearchByClass_NT(Class_Name:String) : BOOL; + function SearchByHardwareKey_9X(HWK:String) : BOOL; + function SearchByHardwareKey_NT(HWK:String) : BOOL; + function SearchByDeviceDescriptor_9X(DD:String): BOOL; + function SearchByDeviceDescriptor_NT(DD:String): BOOL; + procedure GetAllClasses_9X(ClassList: TStrings); + procedure GetAllClasses_NT(ClassList: TStrings); + + public + + constructor Create; + + procedure GetAllClasses (ClassList: TStrings); + + function SearchByClassName(Class_Name:String) : BOOL; + function SearchByHardwareKey(HWK:String) : BOOL; + function SearchByDeviceDescriptor(DD:String): BOOL; + + property IRQCounter : Word read fIRQCounter; + property IRQNumber[Index:Word] : Word read GetIRQNumber; + + property DMACounter : Word read fDMACounter; + property DMAChannel[Index:Word] : Word read GetDMAChannel; + + property PortCounter : Word read fPortCounter; + property PortBase[Index:Word] : Word read GetPortBase; + property PortEnd[Index:Word]:Word read GetPortEnd; + + property MemCounter : Word read fMemCounter; + property MemBase[Index:Word] : DWORD read GetMemBase; + property MemEnd[Index:Word] : DWORD read GetMemEnd; + + property DeviceClassName : String read fClassN; + property Devices : Word read fDevices; + property HardwareKey[Index:Word] : String read GetHardwareKey; + property DeviceDescriptor[Index:Word] : String read GetDeviceDescriptor; + + end; + + +implementation + +{$ifdef DEMOVERSION} +uses Dialogs; +{$endif} + +function Hex2ToInt( s : String ) : Byte; forward; + +procedure OpenSubKey(MainKey : HKEY; + SubKey : String; + var hSubKey : HKEY; + var cSubKeys : DWORD; + var NumKeys : DWORD); forward; + +function SearchKeyValue(hSubKey : HKEY; + NumKeys : Word; + KeyName : String; + var OutBuffer ): Boolean; forward; +//------------------------------------------------------- + +constructor TVicRes.Create; {==} +var + winver:TOSVersionInfo; +begin + inherited Create; + fNT5:=false; + fWin95:=(GetVersion and $80000000)<>0; + if not fWin95 then + begin + WinVer.dwOSVersionInfoSize:=sizeof(WinVer); + GetVersionEx(WinVer); + if WinVer.dwMajorVersion>4 then fNT5:=true; + end; + {$ifdef DEMOVERSION} + ShowMessage('Unregistered shareware TVicRes'+#$0D#$0A+ + 'by Victor Ishikeev'+#$0D#$0A+ + 'e-mail: ivi@ufanet.ru'+#$0D#$0A+ + 'http://www.entechtaiwan.com/tools.htm'); + {$endif} +end; +//------------------------------------------------------- +function TVicRes.GetIRQNumber(nom:Word):Word; +begin + if (nom=0) or (nom>fIRQCounter) then + Result := $FFFF + else + Result := fIRQNumber[nom]; +end; +//------------------------------------------------------- +function TVicRes.GetDMAChannel(nom:Word):Word; +begin + if (nom=0) or (nom>fDMACounter) then + Result := $FFFF + else + Result := fDMAChannel[nom]; +end; +//------------------------------------------------------- +function TVicRes.GetPortBase(nom:Word):Word; +begin + if (nom=0) or (nom>fPortCounter) then + Result := $FFFF + else + Result := fPortBase[nom]; +end; +//------------------------------------------------------- +function TVicRes.GetPortEnd(nom:Word):Word; +begin + if (nom=0) or (nom>fPortCounter) then + Result := $FFFF + else + Result := fPortEnd[nom]; +end; +//------------------------------------------------------- +function TVicRes.GetMemBase(nom:Word):DWORD; +begin + if (nom=0) or (nom>fMemCounter) then + Result := $FFFFFFFF + else + Result := fMemBase[nom]; +end; +//------------------------------------------------------- +function TVicRes.GetMemEnd(nom:Word):DWORD; +begin + if (nom=0) or (nom>fMemCounter) then + Result := $FFFFFFFF + else + Result := fMemEnd[nom]; +end; +//------------------------------------------------------- +function TVicRes.GetHardwareKey(nom:Word):String; +begin + if (nom=0) or (nom>fDevices) then + Result := '' + else + Result := fHardwareKeys[nom]; +end; +//------------------------------------------------------- +function TVicRes.GetDeviceDescriptor(nom:Word):String; +begin + if (nom=0) or (nom>fDevices) then + Result := '' + else + Result := fDeviceDescriptors[nom]; +end; +//------------------------------------------------------- +function TVicRes.SearchByClassName(Class_Name:String) : BOOL; +begin + fClassN:=Class_Name; + if fWin95 then + Result:=SearchByClass_9X(Class_Name) + else + Result:=SearchByClass_NT(Class_Name); +end; +//------------------------------------------------------- +function TVicRes.SearchByHardwareKey(HWK:String) : BOOL; +begin + if fWin95 then + Result:=SearchByHardwareKey_9X(HWK) + else + Result:=SearchByHardwareKey_NT(HWK); +end; +//------------------------------------------------------- +function TVicRes.SearchByDeviceDescriptor(DD:String) : BOOL; +begin + if fWin95 then + Result:=SearchByDeviceDescriptor_9X(DD) + else + Result:=SearchByDeviceDescriptor_NT(DD); +end; +//------------------------------------------------------- +function TVicRes.SearchByClass_9X(Class_Name:String) : BOOL; +var s,HWKey,DD : String; + MemConfig : TMem95Config; + IRQConfig : TIRQ95Config; + PortConfig : TPort95Config; + DMAConfig : TDMA95Config; + achKey : array[0..1023] of Char; + KeysInDynKey,KeysInLM,i,SubKeys,nn : DWORD; + hLMKey,hDynKey,hLocDynKey : HKEY; + KeyLMValue : String; + Buffer,LogBuffer : array[0..1023] of Char; + BegBuffer : DWORD; + PStatus : DWORD; + TmpMemConfig : TMem95Config; +begin + + fDevices := 0; + + fIRQCounter := 0; + fDMACounter := 0; + fPortCounter:= 0; + fMemCounter := 0; + + FillChar(MemConfig,SizeOf(TMem95Config),0); + FillChar(IRQConfig,SizeOf(TIRQ95Config),0); + FillChar(DMAConfig,SizeOf(TDMA95Config),0); + FillChar(PortConfig,SizeOf(TPort95Config),0); + + OpenSubKey(HKEY_DYN_DATA,'Config Manager\Enum',hDynKey,SubKeys,KeysInDynKey); + + i:=0; + + while (i'' then + begin + + OpenSubKey(HKEY_LOCAL_MACHINE,'Enum\'+HWKey,hLMKey,nn,KeysInLM); + if hLMKey<>0 then + begin + SearchKeyValue(hLMKey,KeysInLM,'Class',Buffer); + KeyLMValue:=StrPas(Buffer); + SearchKeyValue(hLMKey,KeysInLM,'DeviceDesc',Buffer); + DD:=StrPas(Buffer); + RegCloseKey(hLMKey); + end + else begin + KeyLMValue:=''; + end; + + if (AnsiUpperCase(KeyLMValue)=AnsiUpperCase(Class_Name)) and (PStatus=0) then + begin + + BegBuffer:=8; + + if fDevices0) do + begin + + Move(LogBuffer[BegBuffer],TmpMemConfig,8); + + if (TmpMemConfig.TypeRecord=ResType_Mem) and (fMemCounter 0; +end; +//------------------------------------------------------- +function TVicRes.SearchByClass_NT(Class_Name:String) : BOOL; +var sLevel1,sLevel2,sLevel3,sLevel4 : String; + ClassString,HWID,DD : String; + ResList : CM_RESOURCE_LIST; + i,j : Byte; + achKey : array[0..1023] of Char; + KeysInKey0,KeysInKey1,KeysInKey2,KeysInKey3,KeysInKey4 : DWORD; + SubKeys0, SubKeys1, SubKeys2, SubKeys3, SubKeys4 : DWORD; + Level0, Level1, Level2 : DWORD; + Key0,Key1,Key2,Key3,Key4 : HKEY; + Buffer : array[0..1023] of Char; +const sLevel0 : String = 'SYSTEM\CurrentControlSet\Enum'; +begin + + fDevices := 0; + + fIRQCounter := 0; + fDMACounter := 0; + fPortCounter:= 0; + fMemCounter := 0; + + + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel0,Key0,SubKeys0,KeysInKey0); + + for Level0:=0 to SubKeys0-1 do + begin + + RegEnumKey(Key0,Level0,achKey,1024); + sLevel1:=sLevel0+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel1,Key1,SubKeys1,KeysInKey1); + + for Level1:=0 to SubKeys1-1 do + begin + + RegEnumKey(Key1,Level1,achKey,1024); + sLevel2:=sLevel1+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel2,Key2,SubKeys2,KeysInKey2); + + for Level2:=0 to SubKeys2-1 do + begin + + RegEnumKey(Key2,Level2,achKey,1024); + sLevel3:=sLevel2+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel3,Key3,SubKeys3,KeysInKey3); + + FillChar(Buffer,SizeOf(Buffer),0); + SearchKeyValue(Key3,KeysInKey3,'Class',Buffer); + ClassString:=StrPas(Buffer); + + FillChar(Buffer,SizeOf(Buffer),0); + SearchKeyValue(Key3,KeysInKey3,'HardwareID',Buffer); + HWID:=StrPas(Buffer); + +// if not SearchKeyValue(Key3,KeysInKey3,'FriendlyName',Buffer) then + SearchKeyValue(Key3,KeysInKey3,'DeviceDesc',Buffer); + DD:=StrPas(Buffer); + + if AnsiUpperCase(ClassString) = AnsiUpperCase(Class_Name) then + begin + + sLevel4 := sLevel3 + '\LogConf'; + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel4,Key4,SubKeys4,KeysInKey4); + + inc(fDevices); + fHardwareKeys[fDevices]:=HWID; + fDeviceDescriptors[fDevices] := DD; + + + if SearchKeyValue(Key4,KeysInKey4,'BootConfig',ResList) then + begin + for i:=1 to ResList.Count do + begin + for j:=1 to ResList.List[i].PartialResourceList.Count do + begin + with ResList.List[i].PartialResourceList.PartialDescriptors[j] do + begin + case TypeResource of + CmResourceTypePort: + begin + Inc(fPortCounter); + fPortBase[fPortCounter] := PortResource.Start[0]; + fPortEnd[fPortCounter] := PortResource.Start[0]+PortResource.Length-1; + end; + CmResourceTypeInterrupt: + begin + Inc(fIRQCounter); + fIRQNumber[fIRQCounter] := InterruptResource.Vector; + end; + CmResourceTypeMemory: + begin + Inc(fMemCounter); + fMemBase[fMemCounter] := MemoryResource.Start[0]; + fMemEnd[fMemCounter] := MemoryResource.Start[0]+MemoryResource.Length-1; + end; + CmResourceTypeDMA: + begin + Inc(fDMACounter); + fDMAChannel[fDMACounter] := DMAResource.Channel; + end; + + end; { case } + end; + end; + end; + end; + end; + RegCloseKey(Key3); + end; + RegCloseKey(Key2); + end; + RegCloseKey(Key1); + end; + RegCloseKey(Key0); + Result := fDevices > 0; +end; +//------------------------------------------------------- +function TVicRes.SearchByHardwareKey_9X(HWK:String) : BOOL; +var s,HWKey,DD : String; + MemConfig : TMem95Config; + IRQConfig : TIRQ95Config; + PortConfig : TPort95Config; + DMAConfig : TDMA95Config; + achKey : array[0..1023] of Char; + KeysInDynKey,i,SubKeys,nn,KeysInLM : DWORD; + hDynKey,hLocDynKey,hLMKey : HKEY; + Buffer,LogBuffer : array[0..1023] of Char; + BegBuffer : DWORD; + PStatus : DWORD; + TmpMemConfig : TMem95Config; +begin + + fDevices := 0; + + fIRQCounter := 0; + fDMACounter := 0; + fPortCounter:= 0; + fMemCounter := 0; + + FillChar(MemConfig,SizeOf(TMem95Config),0); + FillChar(IRQConfig,SizeOf(TIRQ95Config),0); + FillChar(DMAConfig,SizeOf(TDMA95Config),0); + FillChar(PortConfig,SizeOf(TPort95Config),0); + + OpenSubKey(HKEY_DYN_DATA,'Config Manager\Enum',hDynKey,SubKeys,KeysInDynKey); + + i:=0; + + while (i0 then + begin + SearchKeyValue(hLMKey,KeysInLM,'Class',Buffer); + fClassN:=StrPas(Buffer); + SearchKeyValue(hLMKey,KeysInLM,'DeviceDesc',Buffer); + DD:=StrPas(Buffer); + RegCloseKey(hLMKey); + end; + + BegBuffer:=8; + Inc(fDevices); + fHardwareKeys[fDevices]:=HWKey; + fDeviceDescriptors[fDevices]:=DD; + + while (Byte(LogBuffer[BegBuffer])>0) do + begin + + Move(LogBuffer[BegBuffer],TmpMemConfig,8); + + if (TmpMemConfig.TypeRecord=ResType_Mem) and (fMemCounter 0; + +end; +//------------------------------------------------------- +function TVicRes.SearchByHardwareKey_NT(HWK:String) : BOOL; +var sLevel1,sLevel2,sLevel3,sLevel4 : String; + ClassString,HWID,DD : String; + ResList : CM_RESOURCE_LIST; + i,j : Byte; + achKey : array[0..1023] of Char; + KeysInKey0,KeysInKey1,KeysInKey2,KeysInKey3,KeysInKey4 : DWORD; + SubKeys0, SubKeys1, SubKeys2, SubKeys3, SubKeys4 : DWORD; + Level0, Level1, Level2 : DWORD; + Key0,Key1,Key2,Key3,Key4 : HKEY; + Buffer : array[0..1023] of Char; +const sLevel0 : String = 'SYSTEM\CurrentControlSet\Enum'; +begin + + fDevices := 0; + + fIRQCounter := 0; + fDMACounter := 0; + fPortCounter:= 0; + fMemCounter := 0; + + + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel0,Key0,SubKeys0,KeysInKey0); + + for Level0:=0 to SubKeys0-1 do + begin + + RegEnumKey(Key0,Level0,achKey,1024); + sLevel1:=sLevel0+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel1,Key1,SubKeys1,KeysInKey1); + + for Level1:=0 to SubKeys1-1 do + begin + + RegEnumKey(Key1,Level1,achKey,1024); + sLevel2:=sLevel1+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel2,Key2,SubKeys2,KeysInKey2); + + for Level2:=0 to SubKeys2-1 do + begin + + RegEnumKey(Key2,Level2,achKey,1024); + sLevel3:=sLevel2+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel3,Key3,SubKeys3,KeysInKey3); + + FillChar(Buffer,SizeOf(Buffer),0); + SearchKeyValue(Key3,KeysInKey3,'HardwareID',Buffer); + HWID:=StrPas(Buffer); + + FillChar(Buffer,SizeOf(Buffer),0); + SearchKeyValue(Key3,KeysInKey3,'Class',Buffer); + ClassString:=StrPas(Buffer); + + if not SearchKeyValue(Key3,KeysInKey3,'FriendlyName',Buffer) then + SearchKeyValue(Key3,KeysInKey3,'DeviceDesc',Buffer); + DD:=StrPas(Buffer); + + if AnsiUpperCase(HWID) = AnsiUpperCase(HWK) then + begin + + sLevel4 := sLevel3 + '\LogConf'; + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel4,Key4,SubKeys4,KeysInKey4); + + inc(fDevices); + fHardwareKeys[fDevices]:=HWID; + fDeviceDescriptors[fDevices]:=DD; + fClassN:=ClassString; + + if SearchKeyValue(Key4,KeysInKey4,'BootConfig',ResList) then + begin + + for i:=1 to ResList.Count do + begin + for j:=1 to ResList.List[i].PartialResourceList.Count do + begin + with ResList.List[i].PartialResourceList.PartialDescriptors[j] do + begin + case TypeResource of + CmResourceTypePort: + begin + Inc(fPortCounter); + fPortBase[fPortCounter] := PortResource.Start[0]; + fPortEnd[fPortCounter] := PortResource.Start[0]+PortResource.Length-1; + end; + CmResourceTypeInterrupt: + begin + Inc(fIRQCounter); + fIRQNumber[fIRQCounter] := InterruptResource.Vector; + end; + CmResourceTypeMemory: + begin + Inc(fMemCounter); + fMemBase[fMemCounter] := MemoryResource.Start[0]; + fMemEnd[fMemCounter] := MemoryResource.Start[0]+MemoryResource.Length-1; + end; + CmResourceTypeDMA: + begin + Inc(fDMACounter); + fDMAChannel[fDMACounter] := DMAResource.Channel; + end; + + end; { case } + end; + end; + end; + end; + end; + RegCloseKey(Key3); + end; + RegCloseKey(Key2); + end; + RegCloseKey(Key1); + end; + RegCloseKey(Key0); + Result := fDevices > 0; +end; +//------------------------------------------------------- +function TVicRes.SearchByDeviceDescriptor_9X(DD:String) : BOOL; +var s,HWKey : String; + MemConfig : TMem95Config; + IRQConfig : TIRQ95Config; + PortConfig : TPort95Config; + DMAConfig : TDMA95Config; + achKey : array[0..1023] of Char; + KeysInDynKey,KeysInLM,i,SubKeys,nn : DWORD; + hLMKey,hDynKey,hLocDynKey : HKEY; + KeyLMValue : String; + Buffer,LogBuffer : array[0..1023] of Char; + BegBuffer : DWORD; + PStatus : DWORD; + TmpMemConfig : TMem95Config; +begin + + fDevices := 0; + + fIRQCounter := 0; + fDMACounter := 0; + fPortCounter:= 0; + fMemCounter := 0; + + FillChar(MemConfig,SizeOf(TMem95Config),0); + FillChar(IRQConfig,SizeOf(TIRQ95Config),0); + FillChar(DMAConfig,SizeOf(TDMA95Config),0); + FillChar(PortConfig,SizeOf(TPort95Config),0); + + OpenSubKey(HKEY_DYN_DATA,'Config Manager\Enum',hDynKey,SubKeys,KeysInDynKey); + + i:=0; + + while (i'' then + begin + + OpenSubKey(HKEY_LOCAL_MACHINE,'Enum\'+HWKey,hLMKey,nn,KeysInLM); + if hLMKey<>0 then + begin + SearchKeyValue(hLMKey,KeysInLM,'Class',Buffer); + fClassN:=StrPas(Buffer); + SearchKeyValue(hLMKey,KeysInLM,'DeviceDesc',Buffer); + KeyLMValue:=StrPas(Buffer); + RegCloseKey(hLMKey); + end + else begin + KeyLMValue:=''; + end; + + if (AnsiUpperCase(KeyLMValue)=AnsiUpperCase(DD)) and (PStatus=0) then + begin + + BegBuffer:=8; + + if fDevices0) do + begin + + Move(LogBuffer[BegBuffer],TmpMemConfig,8); + + if (TmpMemConfig.TypeRecord=ResType_Mem) and (fMemCounter 0; +end; +//------------------------------------------------------- +function TVicRes.SearchByDeviceDescriptor_NT(DD:String) : BOOL; +var sLevel1,sLevel2,sLevel3,sLevel4 : String; + ClassString,HWID,DevDesc : String; + ResList : CM_RESOURCE_LIST; + i,j : Byte; + achKey : array[0..1023] of Char; + KeysInKey0,KeysInKey1,KeysInKey2,KeysInKey3,KeysInKey4 : DWORD; + SubKeys0, SubKeys1, SubKeys2, SubKeys3, SubKeys4 : DWORD; + Level0, Level1, Level2 : DWORD; + Key0,Key1,Key2,Key3,Key4 : HKEY; + Buffer : array[0..1023] of Char; +const sLevel0 : String = 'SYSTEM\CurrentControlSet\Enum'; +begin + + fDevices := 0; + + fIRQCounter := 0; + fDMACounter := 0; + fPortCounter:= 0; + fMemCounter := 0; + + + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel0,Key0,SubKeys0,KeysInKey0); + + for Level0:=0 to SubKeys0-1 do + begin + + RegEnumKey(Key0,Level0,achKey,1024); + sLevel1:=sLevel0+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel1,Key1,SubKeys1,KeysInKey1); + + for Level1:=0 to SubKeys1-1 do + begin + + RegEnumKey(Key1,Level1,achKey,1024); + sLevel2:=sLevel1+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel2,Key2,SubKeys2,KeysInKey2); + + for Level2:=0 to SubKeys2-1 do + begin + + RegEnumKey(Key2,Level2,achKey,1024); + sLevel3:=sLevel2+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel3,Key3,SubKeys3,KeysInKey3); + + FillChar(Buffer,SizeOf(Buffer),0); + SearchKeyValue(Key3,KeysInKey3,'HardwareID',Buffer); + HWID:=StrPas(Buffer); + + FillChar(Buffer,SizeOf(Buffer),0); + SearchKeyValue(Key3,KeysInKey3,'Class',Buffer); + ClassString:=StrPas(Buffer); + + if not SearchKeyValue(Key3,KeysInKey3,'FriendlyName',Buffer) then + SearchKeyValue(Key3,KeysInKey3,'DeviceDesc',Buffer); + DevDesc:=StrPas(Buffer); + + if AnsiUpperCase(DevDesc) = AnsiUpperCase(DD) then + begin + + sLevel4 := sLevel3 + '\LogConf'; + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel4,Key4,SubKeys4,KeysInKey4); + + inc(fDevices); + fHardwareKeys[fDevices]:=HWID; + fDeviceDescriptors[fDevices]:=DD; + fClassN:=ClassString; + + if SearchKeyValue(Key4,KeysInKey4,'BootConfig',ResList) then + begin + + for i:=1 to ResList.Count do + begin + for j:=1 to ResList.List[i].PartialResourceList.Count do + begin + with ResList.List[i].PartialResourceList.PartialDescriptors[j] do + begin + case TypeResource of + CmResourceTypePort: + begin + Inc(fPortCounter); + fPortBase[fPortCounter] := PortResource.Start[0]; + fPortEnd[fPortCounter] := PortResource.Start[0]+PortResource.Length-1; + end; + CmResourceTypeInterrupt: + begin + Inc(fIRQCounter); + fIRQNumber[fIRQCounter] := InterruptResource.Vector; + end; + CmResourceTypeMemory: + begin + Inc(fMemCounter); + fMemBase[fMemCounter] := MemoryResource.Start[0]; + fMemEnd[fMemCounter] := MemoryResource.Start[0]+MemoryResource.Length-1; + end; + CmResourceTypeDMA: + begin + Inc(fDMACounter); + fDMAChannel[fDMACounter] := DMAResource.Channel; + end; + + end; { case } + end; + end; + end; + end; + end; + RegCloseKey(Key3); + end; + RegCloseKey(Key2); + end; + RegCloseKey(Key1); + end; + RegCloseKey(Key0); + Result := fDevices > 0; +end; +//------------------------------------------------------- +procedure TVicRes.GetAllClasses (ClassList: TStrings); +begin + if fWin95 then GetAllClasses_9X(ClassList) + else GetAllClasses_NT(ClassList); +end; +//------------------------------------------------------- +procedure TVicRes.GetAllClasses_9X(ClassList: TStrings); +var s,HWKey,ClassString : String; + achKey : array[0..1023] of Char; + KeysInDynKey,KeysInLM,i,SubKeys,nn : DWORD; + hLMKey,hDynKey,hLocDynKey : HKEY; + Buffer : array[0..1023] of Char; +begin + + ClassList.Clear; + + OpenSubKey(HKEY_DYN_DATA,'Config Manager\Enum',hDynKey,SubKeys,KeysInDynKey); + + i:=0; + + while (i'' then + begin + OpenSubKey(HKEY_LOCAL_MACHINE,'Enum\'+HWKey,hLMKey,nn,KeysInLM); + if hLMKey<>0 then + begin + SearchKeyValue(hLMKey,KeysInLM,'Class',Buffer); + ClassString:=StrPas(Buffer); + if (Length(ClassString)>1) and (ClassList.IndexOf(ClassString)=-1) then + ClassList.Add(ClassString); + RegCloseKey(hLMKey); + end; + end; + Inc(i); + end; + RegCloseKey(hDynKey); +end; +//------------------------------------------------------- +procedure TVicRes.GetAllClasses_NT(ClassList: TStrings); +var sLevel1,sLevel2,sLevel3 : String; + ClassString : String; + achKey : array[0..1023] of Char; + KeysInKey0,KeysInKey1,KeysInKey2,KeysInKey3 : DWORD; + SubKeys0, SubKeys1, SubKeys2, SubKeys3 : DWORD; + Level0, Level1, Level2 : DWORD; + Key0,Key1,Key2,Key3 : HKEY; + Buffer : array[0..1023] of Char; +const sLevel0 : String = 'SYSTEM\CurrentControlSet\Enum'; +begin + + ClassList.Clear; + + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel0,Key0,SubKeys0,KeysInKey0); + + for Level0:=0 to SubKeys0-1 do + begin + + RegEnumKey(Key0,Level0,achKey,1024); + sLevel1:=sLevel0+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel1,Key1,SubKeys1,KeysInKey1); + + for Level1:=0 to SubKeys1-1 do + begin + + RegEnumKey(Key1,Level1,achKey,1024); + sLevel2:=sLevel1+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel2,Key2,SubKeys2,KeysInKey2); + + for Level2:=0 to SubKeys2-1 do + begin + + RegEnumKey(Key2,Level2,achKey,1024); + sLevel3:=sLevel2+'\'+StrPas(achKey); + OpenSubKey(HKEY_LOCAL_MACHINE,sLevel3,Key3,SubKeys3,KeysInKey3); + + FillChar(Buffer,SizeOf(Buffer),0); + SearchKeyValue(Key3,KeysInKey3,'Class',Buffer); + ClassString:=StrPas(Buffer); + + if (Length(ClassString)>1) and (ClassList.IndexOf(ClassString)=-1) then + ClassList.Add(ClassString); + + RegCloseKey(Key3); + + end; + RegCloseKey(Key2); + end; + RegCloseKey(Key1); + end; + RegCloseKey(Key0); +end; + +//------------------------------------------------------- +//--- Not-member procedures --------------------------- +//------------------------------------------------------- +function Hex2ToInt(s:String):Byte; +var i : Byte; +begin + Result:=0; + for i:=0 to 255 do + if IntToHex(i,2)=s then begin Result:=i; Exit; end; +end; +//------------------------------------------------------- +procedure OpenSubKey(MainKey:HKEY; + SubKey:String; + var hSubKey:HKEY; + var cSubKeys:DWORD; + var NumKeys:DWORD); + +var + achClass : array[0..255] of Char; + cchClassName,cbMaxSubKey : DWORD; + cchMaxClass,cbMaxValueData,cbSecurityDescriptor : DWORD; + cchMaxValue, Reserv : DWORD; + ftLastWriteTime : tFileTime; +begin + achClass:=''; + cchClassName:=255; + SubKey:=SubKey+#0; + cSubKeys := 0; + NumKeys := 0; + + Reserv:= RegOpenKeyEx( + MainKey, + PChar(@SubKey[1]), + 0, + KEY_READ, + hSubKey); + if Reserv = ERROR_SUCCESS then + begin + RegQueryInfoKey ( hSubKey, + achClass, + @cchClassName, + NIL, + @cSubKeys, + @cbMaxSubKey, + @cchMaxClass, + @NumKeys, + @cchMaxValue, + @cbMaxValueData, + @cbSecurityDescriptor, + @ftLastWriteTime); + end + else hSubKey:=0; +end; +//------------------------------------------------------- +function SearchKeyValue(hSubKey:HKEY; + NumKeys:Word; + KeyName:String; + var OutBuffer + ):Boolean; +var + retValue,type_key,LBuf,cchMaxValue : DWORD; + achValue : array[0..511] of Char; + n : Word; + s : String; +begin + Result:=FALSE; + if NumKeys>0 then + for n:=0 to NumKeys-1 do + begin + cchMaxValue:=512;LBuf:=512; Result:=FALSE; + + retValue:=RegEnumValue(hSubKey,n,achValue,cchMaxValue,NIL, + @type_key,@OutBuffer,@LBuf); + if (retValue=ERROR_SUCCESS) then + begin + s:=StrPas(achValue); + if s=KeyName then + begin + Result:=TRUE; Exit; + end; + end; + end; +end; + + +end. diff --git a/src/WTHREAD.DCR b/src/WTHREAD.DCR new file mode 100644 index 00000000..fd5fc430 Binary files /dev/null and b/src/WTHREAD.DCR differ diff --git a/src/WTHREAD.PAS b/src/WTHREAD.PAS new file mode 100644 index 00000000..e339f741 --- /dev/null +++ b/src/WTHREAD.PAS @@ -0,0 +1,531 @@ +{********************************************************} +{* *} +{* Copyright (c) Dan Daley 1996 *} +{* Contact: daley@guernsey.com *} +{* URL: http://www.guernsey.com *} +{* *} +{* This code is provided as is for your use. It may *} +{* be modified and redistributed. All I ask is that *} +{* any modifications be described in this header and *} +{* that you provide a means for others to contact you *} +{* regarding your modifications. *} +{* *} +{* This code is not to be sold and must be distributed *} +{* for free. *} +{* *} +{********************************************************} +unit WThread; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs; + +const + WM_SafeExec = WM_User + 1; + WM_ThreadTerm = WM_User + 2; + WM_ThreadException = WM_User + 3; + +type + TWinThread = class; + + { TWinThreadParam is passed as an argument to your thread procedure } + TWinThreadParam = record + ThreadComp: TWinThread; { a pointer to the thread component that created you } + ThreadParam: pointer; { a pointer to the parameter you passed to spawn } + ThreadHandle: THandle; { your thread handle } + end; + + TSafeExecCode = procedure (Param: LongInt) of object; + TWinThreadEvent = function(Sender: TComponent; ThreadInfo: TWinThreadParam): THandle of Object; + + { TWinThreadInfo is used by start thread to execute your thread code } + TWinThreadInfo = record + ThreadComp: TWinThread; + ThreadProc: TWinThreadEvent; + ThreadParam: pointer; + ThreadHandle: THandle; + SpawnEvent: THandle; + UserThread: Boolean; + end; + + TWinThreadException = procedure(Sender: TComponent; ThreadInfo: TWinThreadInfo; E:Exception) of Object; + + TWinThread = class(TCustomControl) + private + { Private declarations } + FAttributes: DWORD; + FCallOnKill: Boolean; + FDestroying: Boolean; + FKilling: Boolean; + FSafeExecCode: TSafeExecCode; + FSecurity: ^TSecurityAttributes; + FSpawnEvent: THandle; + FSpawnMutex: THandle; + FStackSize: LongInt; + FThreadHandles: TList; + FWaitWinThreadHandles: TList; + FTimeOut: LongInt; + FThreadException: TWinThreadException; + FThreadProc: TWinThreadEvent; + FThreadTerminateEvent: TWinThreadEvent; + function WaitWinThread(Sender: TComponent; aThreadInfo: TWinThreadParam): THandle; + function GetCount: LongInt; + procedure WMSafeExec(var aMsg: TMessage); message WM_SafeExec; + procedure WMThreadTerm(var aMsg: TMessage); message WM_ThreadTerm; + procedure WMThreadException(var aMsg: TMessage); message WM_ThreadException; + protected + procedure Paint; override; + function GetPriority(Index: Integer): LongInt; + procedure SetPriority(Index: Integer; Value: LongInt); + procedure Loaded; override; + procedure LockHandles; virtual; + procedure ReleaseHandles; virtual; + procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override; + public + constructor Create(AComponent: TComponent); override; + destructor Destroy; override; + function SpawnThread(Param: pointer): THandle; { Spawn a new thread passing it Param as a parameter } + function CanClose: Boolean; + function KillThreads: Boolean; { destroy all threads } + procedure SafeExec(Param: LongInt); { execute SafeExecCode in main process space using PostMessage } + procedure WaitExec(Param: LongInt); { execute SafeExecCode in main process space using SendMessage } + procedure Wait; { wait for all threads to terminate } + function WaitWithTimeOut(aTimeOut: DWord): DWord; +// property Security: ^TSecurityAttributes read FSecurity write FSecurity default; + property Count: LongInt read GetCount; { return the number of active threads } + property Destroying: Boolean read FDestroying; + property Killing: Boolean read FKilling; + property Priority[Index: Integer]: LongInt read GetPriority write SetPriority; + published + property Attributes: DWORD read FAttributes write FAttributes default 0; + property CallOnKill: Boolean read FCallOnKill write FCallOnKill default False; { call ThreadTerminate code if thread is killed abnormally } + property StackSize: LongInt read FStackSize write FStackSize default 0; { size of stack to give thread - 0 means same as exe's stack } + property TimeOut: LongInt read FTimeOut write FTimeOut default $FFFFFFFF; { timeout is the max time for this component to wait for mutexes and events - default is infinite } + property SafeExecCode: TSafeExecCode read FSafeExecCode write FSafeExecCode; { code that gets executed in main process space when SafeExec is call from within thread } + property ThreadException: TWinThreadException read FThreadException write FThreadException; + property ThreadProc: TWinThreadEvent read FThreadProc write FThreadProc; { code to execute in a separate thread when spawn is called } + property ThreadTerminate: TWinThreadEvent read FThreadTerminateEvent write FThreadTerminateEvent; { code that is called when a thread is ends execution } + end; + +procedure Register; + +implementation +var + aBitmap: TBitmap; + Loaded: Boolean; + +procedure LoadBitmap; +begin + if Loaded then exit; + Loaded := True; + if aBitmap = nil then aBitmap := TBitmap.Create; + try + aBitmap.LoadFromResourceName(HInstance, 'TWINTHREAD'); + except + on E:Exception do ShowMessage(E.Message); + end; +end; + +function StartWinThread(pThreadInfo: pointer): THandle; +var + ThreadInfo: TWinThreadInfo; + WinThreadParam: TWinThreadParam; +begin + ThreadInfo := TWinThreadInfo(pThreadInfo^); + with ThreadInfo do + begin + WinThreadParam.ThreadComp := ThreadComp; + WinThreadParam.ThreadParam := ThreadParam; + WinThreadParam.ThreadHandle := ThreadHandle; + + SetEvent(SpawnEvent); + if UserThread then SuspendThread(GetCurrentThread); // will be resumed later + try + ThreadProc(ThreadComp, WinThreadParam); + except + on E:Exception do + SendMessage(ThreadInfo.ThreadComp.Handle, WM_ThreadException, LongInt(@ThreadInfo), LongInt(E)); + end; + end; +end; + +constructor TWinThread.Create(AComponent: TComponent); +begin + inherited Create(AComponent); + FDestroying := False; + FAttributes := 0; + FCallOnKill := False; + FStackSize := 0; + FKilling := False; + FTimeOut := $FFFFFFFF; + FSecurity := nil; + FSpawnEvent := + CreateEvent( + nil, { security object } + False, { auto reset } + False, { not signaled } + 'Spawn process started'); + FSpawnMutex := + CreateMutex( + nil, { security object } + False, { initially not owned } + nil); { Mutex name } + + FThreadHandles := TList.Create; + FWaitWinThreadHandles := TList.Create; + Height := 25; + Width := 25; +end; + +destructor TWinThread.Destroy; +var + Index: LongInt; + pThreadInfo: ^TWinThreadInfo; + ThreadExitCode: DWord; +begin + { kill or wait for threads } + FDestroying := True; + Wait; + + { make sure that no wait threads are hanging around } + for Index := FWaitWinThreadHandles.Count - 1 downto 0 do + begin + pThreadInfo := FWaitWinThreadHandles[Index]; + GetExitCodeProcess(pThreadInfo^.ThreadHandle, ThreadExitCode); + if ThreadExitCode = Still_Active then TerminateThread(pThreadInfo^.ThreadHandle, -1); + CloseHandle(pThreadInfo^.ThreadHandle); + FreeMem(FWaitWinThreadHandles[Index], SizeOf(TWinThreadInfo)); + end; + FThreadHandles.Free; + FWaitWinThreadHandles.Free; + CloseHandle(FSpawnMutex); + CloseHandle(FSpawnEvent); + inherited Destroy; +end; + +procedure TWinThread.Loaded; +begin + if csDesigning in ComponentState then LoadBitmap + else SetBounds(0,0,0,0); + inherited Loaded; +end; + +procedure TWinThread.SetBounds(ALeft, ATop, AWidth, AHeight: Integer); +begin + if csDesigning in ComponentState then + begin + AWidth := 25; + AHeight := 25; + end; + inherited SetBounds(ALeft, ATop, AWidth, AHeight); +end; + +procedure TWinThread.LockHandles; +begin + if WaitForSingleObject(FSpawnMutex, INFINITE) <> Wait_Object_0 then + raise Exception.Create('Could not obtain lock mutex'); +end; + +procedure TWinThread.ReleaseHandles; +begin + ReleaseMutex(FSpawnMutex); +end; + +function TWinThread.CanClose; +begin + LockHandles; + try + Result := FThreadHandles.Count = 0; + finally + ReleaseHandles; + end; +end; + +function TWinThread.GetPriority(Index: Integer): LongInt; +begin + { Make sure no one is modifying the thread list } + LockHandles; + try + if (Index < 0) or (Index >= FThreadHandles.Count) then raise Exception.Create('Invalid thread index'); + Result := GetThreadPriority(THandle(FThreadHandles[Index])); + finally + ReleaseHandles; + end; +end; + +procedure TWinThread.SetPriority(Index: Integer; Value: LongInt); +begin + { Make sure no one is modifying the thread list } + LockHandles; + try + if (Index < 0) or (Index >= FThreadHandles.Count) then raise Exception.Create('Invalid thread index'); + SetThreadPriority(THandle(FThreadHandles[Index]), Value); + finally + ReleaseHandles; + end; +end; + +procedure TWinThread.Paint; +begin + if csDesigning in ComponentState then + Canvas.StretchDraw(Canvas.ClipRect, aBitmap); + inherited Paint; +end; + +function TWinThread.KillThreads: Boolean; +var + Index: LongInt; + pThreadInfo: ^TWinThreadInfo; + ThreadExitCode: DWord; + Done: Boolean; +begin + FKilling := True; + Result := False; + try + Done := False; + while not Done do + begin + LockHandles; + try + Done := FThreadHandles.Count = 0; + if not Done then pThreadInfo := FThreadHandles[0]; + finally + ReleaseHandles; + end; + + if not Done then + begin + GetExitCodeThread(pThreadInfo^.ThreadHandle, ThreadExitCode); // see if thread is still active + if (ThreadExitCode = Still_Active) and not TerminateThread(pThreadInfo^.ThreadHandle, -1) then + begin + { if we failed to kill the thread wait 1 sec and try again } + WaitForSingleObject(pThreadInfo^.ThreadHandle, 1000); + GetExitCodeThread(pThreadInfo^.ThreadHandle, ThreadExitCode); + if (ThreadExitCode = Still_Active) and not TerminateThread(pThreadInfo^.ThreadHandle, -1) then Done := True; + end; + end; + { handles will be closed in WaitWinThread } + end; + + LockHandles; + try + Result := (Done = True) and (FThreadHandles.Count = 0); + finally + ReleaseHandles; + end; + finally + FKilling := False; + end; +end; + +procedure TWinThread.Wait; +begin + WaitWithTimeOut(INFINITE); +end; + +function TWinThread.WaitWithTimeOut(aTimeOut: DWord): DWord; +var + NumObjects, Index: DWord; + pThreadInfo: ^TWinThreadInfo; + ThreadExitCode: DWord; + Threads: PWOHandleArray; +begin + Result := -100; + + LockHandles; + try + NumObjects := FThreadHandles.Count; + GetMem(Threads, NumObjects * SizeOf(THandle)); + try + for Index := NumObjects - 1 downto 0 do + begin + pThreadInfo := FThreadHandles[Index]; + Threads[Index] := THandle(pThreadInfo^.ThreadHandle); + end; + Result := WaitForMultipleObjects(NumObjects, Threads, Bool(True), aTimeOut); + finally + FreeMem(Threads, NumObjects * SizeOf(THandle)); + { handles will be closed in WaitWinThread } + end; + finally + ReleaseHandles; + end; +end; + +function TWinThread.GetCount: LongInt; +begin + { Make sure no one is modifying the thread list } + LockHandles; + try + Result := FThreadHandles.Count; + finally + ReleaseHandles; + end; +end; + +procedure TWinThread.WMSafeExec(var aMsg: TMessage); +begin + if Assigned(FSafeExecCode) then FSafeExecCode(aMsg.WParam); +end; + +procedure TWinThread.WMThreadTerm(var aMsg: TMessage); +var + WinThreadParam: TWinThreadParam; +begin + { Thread Terminate Event is executed in main process space } + with TWinThreadInfo(Pointer(aMsg.WParam)^) do + begin + WinThreadParam.ThreadComp := ThreadComp; + WinThreadParam.ThreadParam := ThreadParam; + WinThreadParam.ThreadHandle := ThreadHandle; + end; + + if Assigned(FThreadTerminateEvent) then + FThreadTerminateEvent(Self, WinThreadParam); +end; + +procedure TWinThread.WMThreadException(var aMsg: TMessage); +begin + if Assigned(FThreadException) then + FThreadException(Self, TWinThreadInfo(Pointer(aMsg.WParam)^), Exception(Pointer(aMsg.LParam))); +end; + +procedure TWinThread.SafeExec(Param: LongInt); +begin + { Thread will not wait for main thread to process message } + PostMessage(Handle, WM_SafeExec, Param, 0); +end; + +procedure TWinThread.WaitExec(Param: LongInt); +begin + { Thread will wait for main thread to process message } + SendMessage(Handle, WM_SafeExec, Param, 0); +end; + +function TWinThread.WaitWinThread(Sender: TComponent; aThreadInfo: TWinThreadParam): THandle; +var + pThreadInfo: ^TWinThreadInfo; + ThreadInfo: TWinThreadInfo; +begin + ThreadInfo := TWinThreadInfo(aThreadInfo.ThreadParam^); + if WaitForSingleObject(ThreadInfo.ThreadHandle, INFINITE) <> Wait_Object_0 then + raise Exception.Create('Wait for thread failed'); + + { + if we are being destroyed or we are killing the threads do not call then OnTerminate event unless + CallOnKill is true + } + if not FDestroying and Assigned(FThreadTerminateEvent) and (not FKilling or (CallOnKill and FKilling)) then + SendMessage(Handle, WM_ThreadTerm, Cardinal(@ThreadInfo), 0); + + { remove thread from our list } + LockHandles; + try + pThreadInfo := aThreadInfo.ThreadParam; + FThreadHandles.Remove(pThreadInfo); + CloseHandle(TWinThreadInfo(pThreadInfo^).ThreadHandle); + FreeMem(pThreadInfo); + finally + ReleaseHandles; + end; +end; + +function TWinThread.SpawnThread(Param: pointer): THandle; +var + pThreadInfo: ^TWinThreadInfo; + pWaitWinThreadInfo: ^TWinThreadInfo; + CreateRes: THandle; +begin + if Assigned(FThreadProc) then + begin + LockHandles; + try + GetMem(pThreadInfo, SizeOf(TWinThreadInfo)); + FThreadHandles.Add(pThreadInfo); + + { prepare thread information to pass to thread procedure } + with pThreadInfo^ do + begin + ThreadComp := self; + ThreadProc := FThreadProc; { user procedure to execute } + ThreadParam := Param; { user param } + SpawnEvent := FSpawnEvent; { event to signal when thread is spawned } + UserThread := True; + end; + + ResetEvent(FSpawnEvent); + CreateRes := + BeginThread( + FSecurity {defualt security}, + FStackSize {same stack size as exe}, + @StartWinThread {thread routine}, + pThreadInfo {thread param}, + FAttributes {create attribute - create immediately}, + Result); + + if CreateRes = 0 then raise Exception.Create('Could not create thread'); + pThreadInfo^.ThreadHandle := CreateRes; { store the thread handle } + + { wait for thread to be spawned before continuing } + if WaitForSingleObject(FSpawnEvent, FTimeOut) <> Wait_Object_0 then + raise Exception.Create('Spawn event not triggered'); + + GetMem(pWaitWinThreadInfo, SizeOf(TWinThreadInfo)); + FWaitWinThreadHandles.Add(pWaitWinThreadInfo); + + { prepare thread information for the waiting thread } + with pWaitWinThreadInfo^ do + begin + ThreadComp := self; + ThreadProc := WaitWinThread; { thread to trigger exit procedure } + ThreadParam := pThreadInfo; { thread info for thread to wait on } + SpawnEvent := FSpawnEvent; { event to trigger when thread has started } + UserThread := False; + end; + + ResetEvent(FSpawnEvent); + CreateRes := + BeginThread( + nil {defualt security}, + 0 {same stack size as exe}, + @StartWinThread {thread routine}, + pWaitWinThreadInfo {thread param}, + 0 {create attribute - create immediately}, + Result); + + if CreateRes = 0 then // need to terminate the above thread as well at this point + begin + TerminateThread(pThreadInfo^.ThreadHandle, 0); + raise Exception.Create('Could not create thread 2'); + end; + pWaitWinThreadInfo^.ThreadHandle := CreateRes; + + { wait until thread has started } + if WaitForSingleObject(FSpawnEvent, FTimeOut) <> Wait_Object_0 then + begin // Terminate both threads in this case + TerminateThread(pThreadInfo^.ThreadHandle, 0); + TerminateThread(pWaitWinThreadInfo^.ThreadHandle, 0); + raise Exception.Create('Spawn event not triggered'); + end; + + ResumeThread(pThreadInfo^.ThreadHandle); { resume the user's thread } + + Result := pThreadInfo^.ThreadHandle; + finally + ReleaseHandles; + end; + end; +end; + +procedure Register; +begin + RegisterComponents('Samples', [TWinThread]); +end; + +initialization + aBitmap := nil; + Loaded := False; +finalization + aBitmap.Free; +end. diff --git a/src/WavePlayer.pas b/src/WavePlayer.pas new file mode 100644 index 00000000..c98c77be --- /dev/null +++ b/src/WavePlayer.pas @@ -0,0 +1,483 @@ +//This file introduces a class that is able to play waves from resource, +//memory and disk via TStream class. It uses WAVE_MAPPER instead of PlaySound, +//so that you can play waves simultaneously. + +//Copyright(c) 2001-2002 by Ing. Tomas Koutny. (rawos@rawos.com, xdtktom@quick.cz) +//Version 1.7 +//This file is freeware. AUTHOR does not take any responsibility of possible +//direct or indirect damage caused by this SOFTWARE PRODUCT. + +//See www.rawos.com for more software and resources. + +//If you would like to use this file somehow or if you would like to comment +//something, please send me e-mail so that I can have some feedback +//on releasing such kind of files. + +(* + * Version History: + * + * + * Version 1.7 + * + * + Chunks after 'data' one are no longer being played + * => No more strange sounds if 'data' chunk is not the last one. + * + * Version 1.6 + * + * + TWavePlayer.Stop no longer waits for infinity with sleep + * + * Version 1.5 + * + * + Playback functions were made virtual including constructor + * + New class TFakeWavePlayer to produce sound when TWavePlayer crashes + * + * Version 1.0 + * + * + fixed bugs related to the playback stopping + * + now able to play via synchronyous device + * + * Version 0.94 + * + * + fixed bugs, which occurred in stop and destructor + * + * Version 0.93 + * + * + now can beep on Play in case of failure + * + fixed for configurations, which are able to play only one sound + * simultaneously + * + * Version 0.92 + * + fixed cbSize treatment with PCM wavs loading + * + * Version 0.91 + * + new properties to control the count of loops to be played + * = properties Stream and Loop were made published + * + * Version 0.9 + * * Initial release + *) + +unit WavePlayer; + +interface + +uses classes, windows, mmsystem; + + +type + TWavePlayingState = (wpStopped, wpPlaying, wpPaused); + + TWavePlayer = class + private + FDevice:HWAVEOUT; //Device to play the wave + FBuffers:array[0..7] of TWAVEHDR;//8 buffers to have not chopping playback + FBufferSize:integer; //How much memory to allocate per buffer + FRepeat:boolean; //Whether to play in a loop + FDataStart:integer; //Where the headers end + FDataEnd:integer; //Length of data (+1 to avoid one asm add + //in LoadBuffer) ; data chunk is not + //always the last one + FPlayingBufferCount:integer; //Number of buffers being played + procedure LoadBuffer(AIndex:integer); //Loads values into selected buffer + protected + FState:TWavePlayingState; //Internal (and desired) state + FSource:TStream; //Source the wave will be played from + //Following two variables may be figured out by setting FRepeat to true + FLoopsToPlay:integer; //Remaining count of loops to be played + FDesiredLoops:integer; //Desired count of loops to be played + FBeepAtLeast:boolean; + + procedure waveOutProc(hwo:HWAVEOUT; uMsg:UINT; dwInstance:DWORD; + dwParam1:DWORD; dwParam2:DWORD); virtual; + //Plays the wave + public + constructor Create; virtual; + destructor Destroy; override; + + //All functions below return true if they proceed successfuly + //and false if not. + function Play:boolean; virtual; //Starts or unpauses the wave playing + function Stop:boolean; virtual; //Stops the current wave playing + function Reset:boolean; virtual; //Rewinds to zero and stops playing + function Pause:boolean; virtual; //Pauses or unpauses the wave playing + + property State:TWavePlayingState read FState; + published + //The Source property MUST be set before the wave playing is started! + //(The riff file format uses 32 bit adressing => the standard stream + // is sufficient.) + property Source:TStream read FSource write FSource; + //The Loop property should be also set before the wave playing is started, + //because all internal buffers are being queued regardless of this value. + property Loop:boolean read FRepeat write FRepeat; + + property Loops:integer read FDesiredLoops write FDesiredLoops; + + property BeepAtLeast:boolean read FBeepAtLeast write FBeepAtLeast; + end; + + TFakeWaveMode = (none, //No faking at all; default + message, //MessageBeep(MB_OK) + speaker, //System beep via speaker + silence); //No playback will ever occur + + TFakeWavePlayer = class(TWavePlayer) + protected + FFakeMode:TFakeWaveMode; + FOddPause:boolean; //Needed to simulate un/pausing + public + constructor Create; override; + + function Play:boolean; override; + function Stop:boolean; override; + function Reset:boolean; override; + function Pause:boolean; override; + published + property FakeMode:TFakeWaveMode read FFakeMode write FFakeMode; + //NEVER CHANGE DURING A PLAYBACK!!! + end; + +implementation + +uses SysUtils; + +const + BlocksInBuffer = 512; //2048000; //How much blocks will be in one buffer - now + //0.0116 of a second in the PCM uncompressed mode. + //Small value makes playing chopping, the big one + //makes play stopping hard. + + WaveHdrSize = sizeof(TWAVEHDR); //Why to call sizeof so much times? + +//Declare the wave file header's structure +type + TWAVHeader = packed record + RIFFHeader: packed array [0..3] of Char; //'RIFF' + FileSize: Longint; + WAVEHeader: packed array [0..3] of Char; //'WAVE' + FormatHeader: packed array [0..3] of Char; //'fmt ' - there's a space! + FormatSize: Longint; + FormatEx:TWaveFormatEx; + end; + + TChunk = packed record + Signature:LongWord; + Length:longint; + end; + +procedure waveOutProc(hwo:HWAVEOUT; uMsg:UINT; dwInstance:DWORD; + dwParam1:DWORD; dwParam2:DWORD); stdcall; +begin + //because the instance id represents a class pointer, this procedure will just + //try to forward the call + TWavePlayer(dwInstance).waveOutProc(hwo, uMsg, dwInstance, + dwParam1, dwParam2); +end; + +//--------------------------------------------------------------- Class' methods + +constructor TWavePlayer.Create; +begin + FState:=wpStopped; + FRepeat:=false; + BeepAtLeast:=false; +end; + +destructor TWavePlayer.Destroy; +begin + try + Stop; + except + end; + + inherited; +end; + +procedure TWavePlayer.waveOutProc(hwo:HWAVEOUT; uMsg:UINT; dwInstance:DWORD; + dwParam1:DWORD; dwParam2:DWORD); +var i:integer; +begin + case uMsg of + //WOM_CLOSE: exit;//No reason to do something here + WOM_DONE:begin + //Using hwo is faster than FDevice since it is in a register + waveOutUnprepareHeader(hwo, + PWAVEHDR(dwParam1), + WaveHdrSize); + dec(FPlayingBufferCount); + + if FState = wpStopped then exit; + //Presume that stopping is in progress + + //Get data + LoadBuffer(PWAVEHDR(dwParam1)^.dwUser); + + //Check for end of wave + if PWAVEHDR(dwParam1)^.dwBufferLength = 0 then + begin + if FRepeat or (FLoopsToPlay>0) then //Play once again or not? + begin + FSource.Position:=FDataStart; + LoadBuffer(PWAVEHDR(dwParam1)^.dwUser); + waveOutWrite(hwo, PWAVEHDR(dwParam1), WaveHdrSize); + dec(FLoopsToPlay); + if FLoopsToPlay<0 then FLoopsToPlay:=0; + end else + if FPlayingBufferCount<1 then + try + //No more data to play => properly end the playback + FState:=wpStopped; + waveOutReset(hwo); //it may hang up without this + waveOutClose(hwo);//Some devices are able to play + //only one sound=>close it + //and hope that only one sound + //is desired to be played + for i:=0 to 7 do + freemem(FBuffers[i].lpData); + except + end; + end else + waveOutWrite(hwo, PWAVEHDR(dwParam1), WaveHdrSize); + end; + //WOM_OPEN:exit; //Nothing to play so soon + end; +end; + +procedure TWavePlayer.LoadBuffer(AIndex:integer); +var LoadableBufferSize:integer; +begin + with FBuffers[AIndex], FSource do + begin + dwFlags:=0; + + LoadableBufferSize:=FDataEnd-Position-FBufferSize; + if LoadableBufferSize>=0 then LoadableBufferSize:=FBufferSize + else inc(LoadableBufferSize, FBufferSize); + + dwBufferLength:=Read(lpData^, LoadableBufferSize); + if dwBufferLength = 0 then exit; //no data to be played + + if waveOutPrepareHeader(FDevice, @FBuffers[AIndex], WaveHdrSize) = + MMSYSERR_NOERROR then inc(FPlayingBufferCount); + end; +end; + +function TWavePlayer.Play:boolean; +var WaveHdr:TWAVHeader; + WaveInfo:PWaveFormatEx; + i:integer; + chunk:TChunk; + +begin + //There can be a case instead of this 2 ifs, but the compiler will optimize it + + if FState = wpPlaying then + begin + result:=false; + exit; + end; + + //Check for unpause + if FState = wpPaused then + begin + result:=Pause; + exit; + end; + + //if anything will go wrong, then an exception will arise + WaveInfo:=nil; //keeps compiler quiet + try + //Firstly we have to gather required info about wave from selected source + FSource.Position:=0; + FSource.ReadBuffer(WaveHdr, sizeof(TWAVHeader)); + + //check for PCM files + with WaveHdr.FormatEx do + if wFormatTag = WAVE_FORMAT_PCM then + begin + cbSize:=0; //sanity assignment + FSource.Position:=WaveHdr.FormatSize+20; + //Some programs takes cbSize as a header member and some don't, + //but all programs (I've seen) fills FormatSize correctly + end; + + getmem(WaveInfo, WaveHdr.FormatEx.cbSize+sizeof(TWaveFormatEx)); + WaveInfo^:=WaveHdr.FormatEx; + + //And load the rest of format dependent data if any + FSource.ReadBuffer(pointer(Cardinal(WaveInfo)+sizeof(TWaveFormatEx))^, + WaveInfo^.cbSize); + + //Skip all chunks, that we're not interested in + FSource.ReadBuffer(chunk, sizeof(chunk)); + while chunk.Signature <> $61746164 do //<> 'data' + begin + FSource.position:=FSource.position+chunk.Length; //seek doesn't function + FSource.ReadBuffer(chunk, sizeof(chunk)); + end; + //Remember the file island of the 'data' chunk + FDataStart:=FSource.position; + FDataEnd:=FDataStart+chunk.Length; + + FLoopsToPlay:=FDesiredLoops-1; //One loop will be always played + FPlayingBufferCount:=0; //None is actually being played + + //Allocate Buffers + FBufferSize:=WaveInfo^.nBlockAlign*BlocksInBuffer; + for i:=0 to 7 do + begin + getmem(FBuffers[i].lpData, FBufferSize); + FBuffers[i].dwLoops:=1; + FBuffers[i].dwUser:=i; + end; + + //Open the WAVE_MAPPER, + if waveOutOpen(@FDevice, WAVE_MAPPER, WaveInfo, + dword(@WavePlayer.waveOutProc), + cardinal(Self), + CALLBACK_FUNCTION or WAVE_ALLOWSYNC) <> MMSYSERR_NOERROR + then Abort; + freemem(WaveInfo); + + //load buffers + for i:=0 to 7 do + LoadBuffer(i); + + //and play them. + FState:=wpPlaying; //Mark desired state + for i:=0 to 7 do + if FBuffers[i].dwBufferLength <> 0 then + waveOutWrite(FDevice, @FBuffers[i], WaveHdrSize); + + result:=true; + except + FState:=wpStopped; + + freemem(WaveInfo); + for i:=0 to 7 do + freemem(FBuffers[i].lpData); + result:=false; + + if FBeepAtLeast then Windows.MessageBeep(MB_ICONQUESTION); + + FState:=wpStopped; + end; +end; + +function TWavePlayer.Stop:boolean; +var i:integer; +begin + result:=false; + + if FState = wpStopped then exit; + + try + //if not Reset then Abort; //This call sets FState to wpStopped + FState:=wpStopped; //This will stop loading the buffers + + //Actually a call to waveOutReset should be here, but it always hangs up + //current thread => try to close the device right now + + if waveOutClose(FDevice) <> MMSYSERR_NOERROR then + //Successfull waveOutClose sends WOM_DONE for all buffers + //=>waveOutProc unprepares and frees them + begin + //OK, we can still try to stop the playback without any reset + + i:=16; //Countdown - Forever Is Long Long Time + while (FPlayingBufferCount>0) and (i>0) do + begin + Sleep(100); + dec(i); + end; + + if waveOutClose(FDevice) <> MMSYSERR_NOERROR then Abort; + + //Because we've waited with demand to immediately stop loading buffers, + //we've to release them manualy + for i:=0 to 7 do + freemem(FBuffers[i].lpData); + end; + + result:=true; + except + end; +end; + +function TWavePlayer.Reset:boolean; +begin + try + FState:=wpStopped; //--This will at least stop loading the buffers + if waveOutReset(FDevice) <> MMSYSERR_NOERROR then Abort; + + result:=true; + except + result:=false; + end; +end; + +function TWavePlayer.Pause:boolean; +begin + try + case FState of + wpStopped:Abort; + wpPlaying:begin + FState:=wpPaused; //Mark desired state + if waveOutPause(FDevice) <> MMSYSERR_NOERROR then Abort; + end; + wpPaused: begin + FState:=wpPlaying; //Mark desired state + if waveOutRestart(FDevice) <> MMSYSERR_NOERROR then Abort; + end; + end; + result:=true; + except + result:=false; + end; +end; + +//---------------------------------------------------------------TFakeWavePlayer + +constructor TFakeWavePlayer.Create; +begin + inherited; + + FFakeMode:=none; + FOddPause:=false; +end; + +function TFakeWavePlayer.Play:boolean; +begin + result:=true; //Anything else then non has to return true + case FFakeMode of + none: result:=inherited Play; + message :MessageBeep(MB_OK); + speaker :MessageBeep($FFFFFFFF); + //none: OK, so let's be silent + end; +end; + +function TFakeWavePlayer.Stop:boolean; +begin + if FFakeMode = none then result:=inherited Stop + else result:=true; +end; + +function TFakeWavePlayer.Reset:boolean; +begin + if FFakeMode = none then result:=inherited Reset + else result:=true; +end; + +function TFakeWavePlayer.Pause:boolean; +begin + if FFakeMode = none then result:=inherited Pause + else begin + FOddPause:=not FOddPause; + if FOddPause then result:=Play + else result:=true; + end + +end; + +end. diff --git a/src/Zlog.dpr b/src/Zlog.dpr new file mode 100644 index 00000000..22ba9b44 --- /dev/null +++ b/src/Zlog.dpr @@ -0,0 +1,159 @@ +program zLog; + +uses + Forms, + main in 'main.pas' {MainForm}, + zLogGlobal in 'zLogGlobal.pas', + UBasicScore in 'UBasicScore.pas' {BasicScore}, + UBasicMulti in 'UBasicMulti.pas' {BasicMulti}, + UALLJAMulti in 'UALLJAMulti.pas' {ALLJAMulti}, + UPartials in 'UPartials.pas' {PartialCheck}, + UEditDialog in 'UEditDialog.pas' {EditDialog}, + UALLJAEditDialog in 'UALLJAEditDialog.pas' {ALLJAEditDialog}, + UAbout in 'UAbout.pas' {AboutBox}, + URateDialog in 'URateDialog.pas' {RateDialog}, + UOptions in 'UOptions.pas' {Options}, + UMenu in 'UMenu.pas' {MenuForm}, + UACAGMulti in 'UACAGMulti.pas' {ACAGMulti}, + USuperCheck in 'USuperCheck.pas' {SuperCheck}, + UACAGScore in 'UACAGScore.pas' {ACAGScore}, + UzLogCW in 'UzLogCW.pas', + UzLogVoice in 'UzLogVoice.pas', + UALLJAScore in 'UALLJAScore.pas' {ALLJAScore}, + UWWScore in 'UWWScore.pas' {WWScore}, + UWWMulti in 'UWWMulti.pas' {WWMulti}, + UWWZone in 'UWWZone.pas' {WWZone}, + UComm in 'UComm.pas' {CommForm}, + UClusterTelnetSet in 'UClusterTelnetSet.pas' {ClusterTelnetSet}, + UClusterCOMSet in 'UClusterCOMSet.pas' {ClusterCOMSet}, + UJIDXMulti in 'UJIDXMulti.pas' {JIDXMulti}, + UJIDXScore in 'UJIDXScore.pas' {JIDXScore}, + UJIDXScore2 in 'UJIDXScore2.pas' {JIDXScore2}, + UZlinkComSet in 'UZlinkComSet.pas' {ZLinkCOMSet}, + UZlinkTelnetSet in 'UZlinkTelnetSet.pas' {ZLinkTelnetSet}, + UWPXMulti in 'UWPXMulti.pas' {WPXMulti}, + UWPXScore in 'UWPXScore.pas' {WPXScore}, + UPediScore in 'UPediScore.pas' {PediScore}, + UCWKeyBoard in 'UCWKeyBoard.pas' {CWKeyBoard}, + UJIDX_DX_Score in 'UJIDX_DX_Score.pas' {JIDX_DX_Score}, + UJIDX_DX_Multi in 'UJIDX_DX_Multi.pas' {JIDX_DX_Multi}, + UChat in 'UChat.pas' {ChatForm}, + UZServerInquiry in 'UZServerInquiry.pas' {ZServerInquiry}, + UZLinkForm in 'UZLinkForm.pas' {ZLinkForm}, + UGeneralScore in 'UGeneralScore.pas' {GeneralScore}, + UGeneralMulti2 in 'UGeneralMulti2.pas' {GeneralMulti2}, + USpotForm in 'USpotForm.pas' {SpotForm}, + UFDMulti in 'UFDMulti.pas' {FDMulti}, + UARRLDXMulti in 'UARRLDXMulti.pas' {ARRLDXMulti}, + UARRLDXScore in 'UARRLDXScore.pas' {ARRLDXScore}, + UARRLWMulti in 'UARRLWMulti.pas' {ARRLWMulti}, + UAPSprintScore in 'UAPSprintScore.pas' {APSprintScore}, + UJA0Score in 'UJA0Score.pas' {JA0Score}, + UJA0Multi in 'UJA0Multi.pas' {JA0Multi}, + UKCJMulti in 'UKCJMulti.pas' {KCJMulti}, + USixDownMulti in 'USixDownMulti.pas' {SixDownMulti}, + USixDownScore in 'USixDownScore.pas' {SixDownScore}, + UQTHDialog in 'UQTHDialog.pas' {QTHDialog}, + UIARUMulti in 'UIARUMulti.pas' {IARUMulti}, + UIARUScore in 'UIARUScore.pas' {IARUScore}, + UAllAsianScore in 'UAllAsianScore.pas' {AllAsianScore}, + UAgeDialog in 'UAgeDialog.pas' {AgeDialog}, + UIOTAMulti in 'UIOTAMulti.pas' {IOTAMulti}, + UNewIOTARef in 'UNewIOTARef.pas' {NewIOTARef}, + UIOTACategory in 'UIOTACategory.pas' {IOTACategory}, + UUTCDialog in 'UUTCDialog.pas' {UTCDialog}, + UARRL10Multi in 'UARRL10Multi.pas' {ARRL10Multi}, + UARRL10Score in 'UARRL10Score.pas' {ARRL10Score}, + UPaddleThread in 'UPaddleThread.pas', + BGK32Lib in 'BGK32Lib.pas', + USummaryInfo in 'USummaryInfo.pas' {SummaryInfo}, + URigControl in 'URigControl.pas' {RigControl}, + UConsolePad in 'UConsolePad.pas' {ConsolePad}, + UFreqList in 'UFreqList.pas' {FreqList}, + UCheckWin in 'UCheckWin.pas' {CheckWin}, + UCheckCall2 in 'UCheckCall2.pas' {CheckCall2}, + UCheckMulti in 'UCheckMulti.pas' {CheckMulti}, + UCheckCountry in 'UCheckCountry.pas' {CheckCountry}, + UMinMaxFreqDlg in 'UMinMaxFreqDlg.pas' {MinMaxFreqDlg}, + USpotClass in 'USpotClass.pas', + UIntegerDialog in 'UIntegerDialog.pas' {IntegerDialog}, + UBGKMonitorThread in 'UBGKMonitorThread.pas', + URenewThread in 'URenewThread.pas', + UNewPrefix in 'UNewPrefix.pas' {NewPrefix}, + UKCJZone in 'UKCJZone.pas' {KCJZone}, + UMultipliers in 'UMultipliers.pas', + UScratchSheet in 'UScratchSheet.pas' {ScratchSheet}, + UKCJScore in 'UKCJScore.pas' {KCJScore}, + UMMTTY in 'UMMTTY.pas', + UTTYConsole in 'UTTYConsole.pas' {TTYConsole}, + UQTCForm in 'UQTCForm.pas' {QTCForm}, + UWAEScore in 'UWAEScore.pas' {WAEScore}, + UWAEMulti in 'UWAEMulti.pas' {WAEMulti}, + CommInt in '..\lib\async32_x\CommInt.pas', + HidControllerClass in '..\lib\HID\HidControllerClass.pas', + Hid in '..\lib\HID\Hid.pas', + UVoiceForm in 'UVoiceForm.pas' {VoiceForm}, + ToneGen in 'ToneGen.pas', + UQuickRef in 'UQuickRef.pas' {QuickRef}, + UBandScope2 in 'UBandScope2.pas' {BandScope2}, + UELogJapanese in 'UELogJapanese.pas' {ELogJapanese}, + CONSOLE in 'CONSOLE.PAS', + console2 in 'console2.pas', + TnCnx in '..\lib\telnet\TnCnx.pas', + WSockets in '..\lib\WSockets\WSockets.pas'; + +{$R *.RES} + + +begin + Application.Title := 'zLog for Windows'; + Application.CreateForm(TMenuForm, MenuForm); + Application.CreateForm(TOptions, Options); + Application.CreateForm(TMainForm, MainForm); + Application.CreateForm(TPartialCheck, PartialCheck); + Application.CreateForm(TBasicScore, BasicScore); + Application.CreateForm(TBasicMulti, BasicMulti); + Application.CreateForm(TEditDialog, EditDialog); + Application.CreateForm(TAboutBox, AboutBox); + Application.CreateForm(TRateDialog, RateDialog); + Application.CreateForm(TSuperCheck, SuperCheck); + Application.CreateForm(TCommForm, CommForm); + Application.CreateForm(TClusterTelnetSet, ClusterTelnetSet); + Application.CreateForm(TClusterCOMSet, ClusterCOMSet); + Application.CreateForm(TZLinkCOMSet, ZLinkCOMSet); + Application.CreateForm(TZLinkTelnetSet, ZLinkTelnetSet); + Application.CreateForm(TPediScore, PediScore); + Application.CreateForm(TCWKeyBoard, CWKeyBoard); + Application.CreateForm(TChatForm, ChatForm); + Application.CreateForm(TZServerInquiry, ZServerInquiry); + Application.CreateForm(TZLinkForm, ZLinkForm); + Application.CreateForm(TSpotForm, SpotForm); + Application.CreateForm(TQTHDialog, QTHDialog); + Application.CreateForm(TNewIOTARef, NewIOTARef); + Application.CreateForm(TSummaryInfo, SummaryInfo); + Application.CreateForm(TRigControl, RigControl); + Application.CreateForm(TConsolePad, ConsolePad); + Application.CreateForm(TFreqList, FreqList); + Application.CreateForm(TCheckWin, CheckWin); + Application.CreateForm(TCheckCall2, CheckCall2); + Application.CreateForm(TCheckMulti, CheckMulti); + Application.CreateForm(TCheckCountry, CheckCountry); + Application.CreateForm(TMinMaxFreqDlg, MinMaxFreqDlg); + Application.CreateForm(TIntegerDialog, IntegerDialog); + Application.CreateForm(TNewPrefix, NewPrefix); + Application.CreateForm(TScratchSheet, ScratchSheet); + Application.CreateForm(TQTCForm, QTCForm); + Application.CreateForm(TVoiceForm, VoiceForm); + Application.CreateForm(TQuickRef, QuickRef); + Application.CreateForm(TBandScope2, BandScope2); + Application.CreateForm(TELogJapanese, ELogJapanese); + Options.ImplementSettings(False); + +try + Application.Run; +except + CloseBGK; +end; + + Application.ShowHint := True; +end. diff --git a/src/Zlog.dproj b/src/Zlog.dproj new file mode 100644 index 00000000..404bd74f --- /dev/null +++ b/src/Zlog.dproj @@ -0,0 +1,389 @@ + + + {FA11CDE5-5221-44F5-B0DC-672F211DB07C} + Zlog.dpr + True + Debug + 1 + Application + VCL + 18.6 + Win32 + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + false + false + false + false + false + 00400000 + Zlog + Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace) + 1041 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName= + + + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + Debug + true + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName) + 1033 + $(BDS)\bin\default_app.manifest + true + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + + + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png + $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png + + + RELEASE;$(DCC_Define) + 0 + false + 0 + + + true + PerMonitorV2 + + + DEBUG;$(DCC_Define) + false + true + + + true + PerMonitorV2 + + + + MainSource + + +
MainForm
+
+ + +
BasicScore
+
+ +
BasicMulti
+
+ +
ALLJAMulti
+
+ +
PartialCheck
+
+ +
EditDialog
+
+ +
ALLJAEditDialog
+
+ +
AboutBox
+
+ +
RateDialog
+
+ +
Options
+
+ +
MenuForm
+
+ +
ACAGMulti
+
+ +
SuperCheck
+
+ +
ACAGScore
+
+ + + +
ALLJAScore
+
+ +
WWScore
+
+ +
WWMulti
+
+ +
WWZone
+
+ +
CommForm
+
+ +
ClusterTelnetSet
+
+ +
ClusterCOMSet
+
+ +
JIDXMulti
+
+ +
JIDXScore
+
+ +
JIDXScore2
+
+ +
ZLinkCOMSet
+
+ +
ZLinkTelnetSet
+
+ +
WPXMulti
+
+ +
WPXScore
+
+ +
PediScore
+
+ +
CWKeyBoard
+
+ +
JIDX_DX_Score
+
+ +
JIDX_DX_Multi
+
+ +
ChatForm
+
+ +
ZServerInquiry
+
+ +
ZLinkForm
+
+ +
GeneralScore
+
+ +
GeneralMulti2
+
+ +
SpotForm
+
+ +
FDMulti
+
+ +
ARRLDXMulti
+
+ +
ARRLDXScore
+
+ +
ARRLWMulti
+
+ +
APSprintScore
+
+ +
JA0Score
+
+ +
JA0Multi
+
+ +
KCJMulti
+
+ +
SixDownMulti
+
+ +
SixDownScore
+
+ +
QTHDialog
+
+ +
IARUMulti
+
+ +
IARUScore
+
+ +
AllAsianScore
+
+ +
AgeDialog
+
+ +
IOTAMulti
+
+ +
NewIOTARef
+
+ +
IOTACategory
+
+ +
UTCDialog
+
+ +
ARRL10Multi
+
+ +
ARRL10Score
+
+ + + +
SummaryInfo
+
+ +
RigControl
+
+ +
ConsolePad
+
+ +
FreqList
+
+ +
CheckWin
+
+ +
CheckCall2
+
+ +
CheckMulti
+
+ +
CheckCountry
+
+ +
MinMaxFreqDlg
+
+ + +
IntegerDialog
+
+ + + +
NewPrefix
+
+ +
KCJZone
+
+ + +
ScratchSheet
+
+ +
KCJScore
+
+ + +
TTYConsole
+
+ +
QTCForm
+
+ +
WAEScore
+
+ +
WAEMulti
+
+ + + + +
VoiceForm
+
+ + +
QuickRef
+
+ +
BandScope2
+
+ +
ELogJapanese
+
+ + + + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + +
+ + Delphi.Personality.12 + + + + + Zlog.dpr + + + + True + False + + + 12 + + + +
diff --git a/src/Zlog.dproj.local b/src/Zlog.dproj.local new file mode 100644 index 00000000..d576f039 --- /dev/null +++ b/src/Zlog.dproj.local @@ -0,0 +1,2 @@ + + diff --git a/src/Zlog.identcache b/src/Zlog.identcache new file mode 100644 index 00000000..141de6ee Binary files /dev/null and b/src/Zlog.identcache differ diff --git a/src/Zlog.stat b/src/Zlog.stat new file mode 100644 index 00000000..c43a3569 --- /dev/null +++ b/src/Zlog.stat @@ -0,0 +1,10 @@ +[Stats] +EditorSecs=77 +DesignerSecs=30 +InspectorSecs=1 +CompileSecs=4548 +OtherSecs=131 +StartTime=2019/06/28 23:29:59 +RealKeys=0 +EffectiveKeys=0 +DebugSecs=1 diff --git a/src/__history/UACAGMulti.dfm.~1~ b/src/__history/UACAGMulti.dfm.~1~ new file mode 100644 index 00000000..aae72dec Binary files /dev/null and b/src/__history/UACAGMulti.dfm.~1~ differ diff --git a/src/__history/UFDMulti.dfm.~1~ b/src/__history/UFDMulti.dfm.~1~ new file mode 100644 index 00000000..32782447 Binary files /dev/null and b/src/__history/UFDMulti.dfm.~1~ differ diff --git a/src/__history/UWWMulti.dfm.~1~ b/src/__history/UWWMulti.dfm.~1~ new file mode 100644 index 00000000..d51cbe56 Binary files /dev/null and b/src/__history/UWWMulti.dfm.~1~ differ diff --git a/src/__history/UWWScore.dfm.~1~ b/src/__history/UWWScore.dfm.~1~ new file mode 100644 index 00000000..240c2aec Binary files /dev/null and b/src/__history/UWWScore.dfm.~1~ differ diff --git a/src/addedcomp.dcp b/src/addedcomp.dcp new file mode 100644 index 00000000..017ca16b Binary files /dev/null and b/src/addedcomp.dcp differ diff --git a/src/addedcomp.dpk b/src/addedcomp.dpk new file mode 100644 index 00000000..9ca1d78f --- /dev/null +++ b/src/addedcomp.dpk @@ -0,0 +1,55 @@ +package addedcomp; + +{$R *.RES} +{$R 'HemiBtn.dcr'} +{$R 'async32.dcr'} +{$R 'WSOCKET.dcr'} +{$R 'TnCnx.dcr'} +{$R 'StrCGrid.dcr'} +{$R 'JLLabel.dcr'} +{$R 'ALIGRID.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + FngSingleInst, + HemiBtn, + async32, + WSOCKET, + TnCnx, + Cologrid, + console2, + StrCGrid, + Ini, + JLLabel, + ALIGRID, + NkPrinters, + Wsagraph, + OEDIT, + PathDialog; + +end. diff --git a/src/addedcomp.dpl b/src/addedcomp.dpl new file mode 100644 index 00000000..aa31f557 Binary files /dev/null and b/src/addedcomp.dpl differ diff --git a/src/addedcomp.res b/src/addedcomp.res new file mode 100644 index 00000000..36f26e23 Binary files /dev/null and b/src/addedcomp.res differ diff --git a/src/addedcomp.~dp b/src/addedcomp.~dp new file mode 100644 index 00000000..24dc8826 --- /dev/null +++ b/src/addedcomp.~dp @@ -0,0 +1,54 @@ +package addedcomp; + +{$R *.RES} +{$R 'HemiBtn.dcr'} +{$R 'async32.dcr'} +{$R 'WSOCKET.dcr'} +{$R 'TnCnx.dcr'} +{$R 'StrCGrid.dcr'} +{$R 'JLLabel.dcr'} +{$R 'ALIGRID.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + FngSingleInst, + HemiBtn, + async32, + WSOCKET, + TnCnx, + Cologrid, + console2, + StrCGrid, + Ini, + JLLabel, + ALIGRID, + NkPrinters, + Wsagraph, + OEDIT; + +end. diff --git a/src/async32.dcr b/src/async32.dcr new file mode 100644 index 00000000..5166a152 Binary files /dev/null and b/src/async32.dcr differ diff --git a/src/async32.pas b/src/async32.pas new file mode 100644 index 00000000..a528a7ca --- /dev/null +++ b/src/async32.pas @@ -0,0 +1,753 @@ +//****************************************************************************** +// VARIAN ASYNC32 COMPONENT v1.01 +// (c) VARIAN SOFTWARE SERVICES NL 1996-1997 +// ALL RIGHTS RESERVED +//****************************************************************************** + +//Written by Varian Software Services NL, The Netherlands +//Subject: Async32 Component +//Version: 1.01 +//Platform: Delphi 3, Win95, NT +//Date: 2 June 1997 +//Last update: 13st September 1997 +//Release: Freeware, just let us know what you think of it.... + +//if you make any modifications to the source, please send us a copy. +//We will verify your changes and give you proper credit when included. + +//Please send any questions, remarks or suggestions to our following +//address: Varian@worldaccess.nl + +// THIS SOFTWARE IS PROVIDED 'AS-IS', WITHOUT ANY EXPRESS OR IMPLIED +//WARRANTY. IN NO EVENT WILL THE AUTHOR BE HELD LIABLE FOR ANY DAMAGES +// ARISING FROM THE USE OF THIS SOFTWARE. + +//**************************************************************************** +// Our thanks goes to all the people who helped creating and +// testing this component for their support and suggestions. +//**************************************************************************** + +//Shortcuts: +//CTS - Clear to send +//DSR - Data set ready +//RING - Ring indicator +//RLSD - Receive line signal detect +//EV_BREAK - A break was detected on input. +//EV_CTS - The CTS (clear-to-send) signal changed state. +//EV_DSR - The DSR (data-set-ready) signal changed state. +//EV_ERR - A line-status error occurred. Line-status errors +// are CE_FRAME, CE_OVERRUN, and CE_RXPARITY. +//EV_RING - A ring indicator was detected. +//EV_RLSD - The RLSD (receive-line-signal-detect) signal changed state. +//EV_RXCHAR - A character was received and placed in the input buffer. +//EV_RXFLAG - The event character was received and placed in the input buffer. +// The event character is specified in the device's DCB structure, +// which is applied to a serial port by using the SetCommState function. +//EV_TXEMPTY - The last character in the output buffer was sent. + +//Available provider subtypes: +//PST_FAX FAX device +//PST_LAT LAT protocol +//PST_MODEM Modem device +//PST_NETWORK_BRIDGE Unspecified network bridge +//PST_PARALLELPORT Parallel port +//PST_RS232 RS-232 serial port +//PST_RS422 RS-422 port +//PST_RS423 RS-423 port +//PST_RS449 RS-449 port +//PST_SCANNER Scanner device +//PST_TCPIP_TELNET TCP/IP Telnet protocol +//PST_UNSPECIFIED Unspecified +//PST_X25 X.25 standards + +//Errorflags OnErrorSignal: +//CE_BREAK The hardware detected a break condition. +//CE_DNS Windows 95 only: A parallel device is not selected. +//CE_FRAME The hardware detected a framing error. +//CE_IOE An I/O error occurred during communications with the device. +//CE_MODE The requested mode is not supported, or the hFile parameter +// is invalid. If this value is specified, it is the only valid error. +//CE_OOP Windows 95 only: A parallel device signaled that it is out of paper. +//CE_OVERRUN A character-buffer overrun has occurred. The next character is lost. +//CE_PTO Windows 95 only: A time-out occurred on a parallel device. +//CE_RXOVER An input buffer overflow has occurred. There is either no +// room in the input buffer, or a character was received after +// the end-of-file (EOF) character. +//CE_RXPARITY The hardware detected a parity error. +//CE_TXFULL The application tried to transmit a character, but the output +// buffer was full. + +unit async32; + +interface + +uses + Windows, Messages, SysUtils, Classes, Forms, dialogs; + +type + TC32Event = procedure(Sender: TObject; Status: dword) of object; + TC32EventState = (evBreak, evCTS, evDSR, evError, evRing, + evRlsd, evRxChar, evRxFlag, evTxEmpty); + TC32EventType = set of TC32EventState; + + TC32Thread = class(TThread) + private + FHandle: THandle; + FStatus: dword; + FOnSignal: TC32Event; + hCloseEvent: THandle; + protected + procedure Execute; override; + procedure DoOnSignal; + public + constructor Create(Handle: THandle; Events: TC32EventType); + destructor Destroy; override; + procedure ReleaseThread; + property OnSignal: TC32Event read FOnSignal write FOnSignal; + end; + + TBaudRate = (cbr110, cbr300, cbr600, cbr1200, cbr2400, cbr4800, + cbr9600, cbr14400, cbr19200, cbr38400, cbr56000, + cbr57600, cbr115200, cbr128000, cbr256000); + TParity = (paNone, paOdd, paEven, paMark, paSpace); + TStopbits = (sb10, sb15, sb20); + TDatabits=(da4, da5, da6, da7, da8); + TFlowControl = (fcNone, fcCTS, fcDTR, fcSoftware, fcDefault); + + TComm32Option = (osParityCheck, osDsrSensitivity, osIgnoreXOff, + osErrorChar, osNullStrip); + TComm32Options = set of TComm32Option; + + TC32RxCharEvent = procedure(Sender: TObject; Count: Integer) of object; + TC32ErrorEvent = procedure(Sender: TObject; Errors: Integer) of object; + TC32OpenEvent = procedure(Sender: TObject; ProviderSubType: Integer; + Error: Integer) of object; + + TCustomComm32 = class(TComponent) + private + FHandle: THandle; + FWriteEvent: THandle; + FCT: TComStat; + FDCB: TDCB; + FCommConfig: TCommConfig; + FTC32Thread: TC32Thread; + FErrors: dword; + FIOpending: Boolean; + FWriteOS: TOverlapped; + FDeviceName: String; + FBaudRate: TBaudRate; + FParity: TParity; + FStopbits: TStopbits; + FDatabits: TDatabits; + FMonitorEvents: TC32EventType; + FReadBufferSize: Integer; + FWriteBufferSize: Integer; + FFlowControl: TFlowControl; + FXonChar: char; + FXoffChar: char; + FOptions: TComm32Options; + FOnOpen: TC32OpenEvent; + FOnBreakSignal: TNotifyEvent; + FOnCTSSignal: TNotifyEvent; + FOnDSRSignal: TNotifyEvent; + FOnErrorSignal: TC32ErrorEvent; + FOnRingSignal: TNotifyEvent; + FOnRLSDSignal: TNotifyEvent; + FOnRxCharSignal: TC32RxCharEvent; + FOnRxFlagSignal: TNotifyEvent; + FOnTxEmptySignal: TNotifyEvent; + procedure EnableHandshaking(var DCB: TDCB); + function GetModemState(Index: Integer): Boolean; + procedure HandleTC32Event(Sender: TObject; Status: dword); + procedure SetBaudRate(Value: TBaudRate); + procedure SetParity(Value: TParity); + procedure SetStopbits(Value: TStopBits); + procedure SetDatabits(Value: TDatabits); + procedure SetFlowControl(Value: TFlowControl); + procedure SetXonChar(Value: char); + procedure SetXoffChar(Value: char); + procedure SetOptions(Value: TComm32Options); + protected + procedure EventStateChange(Event: Integer); dynamic; + procedure AfterOpen(ProviderSubType: Integer; Error: Integer); dynamic; + property DeviceName: string read FDeviceName write FDeviceName; + property BaudRate: TBaudRate read FBaudRate write SetBaudRate default cbr9600; + property Parity: TParity read FParity write SetParity default paNone; + property Stopbits: TStopbits read FStopbits write SetStopbits default sb10; + property Databits: TDatabits read FDatabits write SetDatabits default da8; + property MonitorEvents: TC32EventType read FMonitorEvents write FMonitorEvents; + property ReadBufferSize: Integer read FReadBufferSize write FReadBufferSize default 4096; + property WriteBufferSize: Integer read FWriteBufferSize write FWriteBufferSize default 2048; + property FlowControl: TFlowControl read FFlowControl write SetFlowControl default fcDefault; + property XonChar: char read FXonChar write SetXonChar default #17; + property XoffChar: char read FXoffChar write SetXoffChar default #19; + property Options: TComm32Options read FOptions write SetOptions; + {Comm signal events} + property OnOpen: TC32OpenEvent read FOnOpen write FOnOpen; + property OnBreak: TNotifyEvent read FOnBreakSignal write FOnBreakSignal; + property OnCTS: TNotifyEvent read FOnCTSSignal write FOnCTSSignal; + property OnDSR: TNotifyEvent read FOnDSRSignal write FOnDSRSignal; + property OnRing: TNotifyEvent read FOnRingSignal write FOnRingSignal; + property OnRLSD: TNotifyEvent read FOnRLSDSignal write FOnRLSDSignal; + property OnError: TC32ErrorEvent read FOnErrorSignal write FOnErrorSignal; + property OnRxChar: TC32RxCharEvent read FOnRxCharSignal write FOnRxCharSignal; + property OnRxFlag: TNotifyEvent read FOnRxFlagSignal write FOnRxFlagSignal; + property OnTxEmpty: TNotifyEvent read FOnTxEmptySignal write FOnTxEmptySignal; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Open; + procedure Close; + function Enabled: Boolean; + function Write(const Buf; Count: Integer): Integer; + function Read(var Buf; Count: Integer): Integer; + function InQueCount: Integer; + function OutQueCount: Integer; + procedure PurgeIn; + procedure PurgeOut; + //Comm escape functions + function DTR(State: Boolean): boolean; + function RTS(State: Boolean): boolean; + function BREAK(State: Boolean): boolean; + function XON(State: Boolean): boolean; + //Comm status flags + property CTS: Boolean index 1 read GetModemState; + property DSR: Boolean index 2 read GetModemState; + property RING: Boolean index 3 read GetModemState; + property RLSD: Boolean index 4 read GetModemState; + //Reference to internal device handle + property Handle: THandle read FHandle; + end; + + TComm32 = class(TCustomComm32) + published + property DeviceName; + property BaudRate; + property Parity; + property Stopbits; + property Databits; + property MonitorEvents; + property ReadBufferSize; + property WriteBufferSize; + property FlowControl; + property XonChar; + property XoffChar; + property Options; + property OnOpen; + property OnBreak; + property OnCTS; + property OnDSR; + property OnError; + property OnRing; + property OnRLSD; + property OnRxChar; + property OnRxFlag; + property OnTxEmpty; + end; + + +procedure Register; + + +implementation + +const + fBinary = $00000001; + fParity = $00000002; + fOutxCtsFlow = $00000004; + fOutxDsrFlow = $00000008; + fDtrControl = $00000030; + fDsrSensitivity = $00000040; + fTXContinueOnXoff = $00000080; + fOutX = $00000100; + fInX = $00000200; + fErrorChar = $00000400; + fNull = $00000800; + fRtsControl = $00003000; + fAbortOnError = $00004000; + fDummy2 = $FFFF8000; + + CBR: array[TBaudRate] of Integer = + (CBR_110, CBR_300, CBR_600, CBR_1200, CBR_2400, CBR_4800, CBR_9600, + CBR_14400, CBR_19200, CBR_38400, CBR_56000, CBR_57600, CBR_115200, + CBR_128000, CBR_256000); + + DAB: array[TDatabits] of Integer = + (4, 5, 6, 7, 8); + + PAR: array[TParity] of Integer = + (NOPARITY, ODDPARITY, EVENPARITY, MARKPARITY, SPACEPARITY); + + STB: array[TStopbits] of Integer = + (ONESTOPBIT, ONE5STOPBITS, TWOSTOPBITS); + + OPT: array[TComm32Option] of Integer = + (fParity, fDsrSensitivity, fTXContinueOnXoff, fErrorChar, fNull); + +//TC32Thread + +constructor TC32Thread.Create(Handle: THandle; Events: TC32EventType); +const + EvList: array[TC32EventState] of dword = (EV_BREAK, EV_CTS, EV_DSR, EV_ERR, + EV_RING, EV_RLSD, EV_RXCHAR, EV_RXFLAG, EV_TXEMPTY); +var + EvIndex: TC32EventState; + AttrWord: dword; +begin + Inherited Create(true); + Priority := tpHighest; + FHandle := Handle; + AttrWord := 0; + for EvIndex := evBREAK to evTXEMPTY do + if EvIndex in Events then + AttrWord := AttrWord or EvList[EvIndex]; + SetCommMask(FHandle, AttrWord); + Resume; +end; + +destructor TC32Thread.Destroy; +begin + CloseHandle(hCloseEvent); + Inherited Destroy; +end; + +procedure TC32Thread.Execute; +var + HandlesToWaitFor: array[0..2] of THandle; + dwHandleSignaled: DWORD; + BytesTransferred: DWORD; //Dummy, not valid for WaitCommEvent + OverlappedCommEvent: TOverlapped; +begin + FillChar(OverlappedCommEvent, Sizeof(OverlappedCommEvent), 0); + hCloseEvent := CreateEvent(nil, True, False, nil); + OverlappedCommEvent.hEvent := CreateEvent(nil, True, True, nil); + HandlesToWaitFor[0] := hCloseEvent; + HandlesToWaitFor[1] := OverlappedCommEvent.hEvent; + + repeat + WaitCommEvent(FHandle, FStatus, @OverlappedCommEvent); + dwHandleSignaled := WaitForMultipleObjects(2, @HandlesToWaitFor, False, INFINITE); + case dwHandleSignaled of + WAIT_OBJECT_0 : Break; + WAIT_OBJECT_0 + 1: + if GetOverlappedResult(FHandle, OverlappedCommEvent, + BytesTransferred, false) then Synchronize(DoOnSignal); + else + Break //This should never occur + end; + until Terminated; + PurgeComm(FHandle, PURGE_RXABORT + PURGE_RXCLEAR); + CloseHandle(OverlappedCommEvent.hEvent); +end; + +procedure TC32Thread.ReleaseThread; +begin + SetEvent(hCloseEvent); +end; + +procedure TC32Thread.DoOnSignal; +begin + if Assigned(FOnSignal) then FOnSignal(Self, FStatus); +end; + +//TCustomComm32 + +constructor TCustomComm32.Create(AOwner: TComponent); +begin + Inherited Create(AOwner); + FHandle := INVALID_HANDLE_VALUE; + FDeviceName := 'COM2'; + FBaudRate := cbr9600; + FParity := paNone; + FStopbits := sb10; + FDatabits := da8; + FXonChar := #17; + FXoffChar := #19; + FOptions := []; + FMonitorEvents := [evBreak, evCTS, evDSR, evError, evRing, + evRlsd, evRxChar, evRxFlag, evTxEmpty]; + FReadBufferSize := 4096; + FWriteBufferSize := 2048; + FFlowControl := fcDefault; + FWriteEvent := CreateEvent(nil, false, false, nil); +end; + +destructor TCustomComm32.Destroy; +begin + Close; + CloseHandle(FWriteEvent); + Inherited Destroy; +end; + +function TCustomComm32.Enabled: Boolean; +begin + Result := FHandle <> INVALID_HANDLE_VALUE; +end; + +procedure TCustomComm32.AfterOpen(ProviderSubType: Integer; Error: Integer); +begin + if assigned(FOnOpen) then + FOnOpen(Self, ProviderSubType, Error); +end; + +procedure TCustomComm32.Open; +var + CommTimeouts: TCommTimeouts; + OptIndex: TComm32Option; + Size: Integer; +begin + Close; + + SetLastError(0); //remove any pending errors + + Fillchar(FCommConfig, Sizeof(FCommConfig), 0); + + FHandle := CreateFile(PCHAR(FDeviceName), GENERIC_READ or GENERIC_WRITE, + 0, nil, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); + if Enabled then + begin + Size := Sizeof(TCommConfig); + GetCommConfig(FHandle, FCommConfig, Size); + SetCommState(FHandle, FCommConfig.DCB); //Initialize windows hardware settings + + SetupComm(FHandle, FReadBufferSize, FWriteBufferSize); + + GetCommTimeOuts(FHandle, CommTimeOuts); + CommTimeouts.ReadIntervalTimeout := 250; + CommTimeouts.ReadTotalTimeoutMultiplier := 0; + CommTimeouts.ReadTotalTimeoutConstant := 0; + CommTimeouts.WriteTotalTimeoutMultiplier := 0; + CommTimeouts.WriteTotalTimeoutConstant := 0; + SetCommTimeOuts(FHandle, CommTimeOuts); + + GetCommState(FHandle, FDCB); + FDCB.BaudRate := CBR[FBaudRate]; + FDCB.Parity := PAR[FParity]; + FDCB.Stopbits := STB[FStopbits]; + FDCB.Bytesize := DAB[FDatabits]; + + for OptIndex := osParityCheck to osNullStrip do + if OptIndex in FOptions then + FDCB.Flags := FDCB.Flags or OPT[OptIndex] + else + FDCB.Flags := FDCB.Flags and not OPT[OptIndex]; + + EnableHandshaking(FDCB); + SetCommState(FHandle, FDCB); + + FTC32Thread := TC32Thread.Create(FHandle, FMonitorEvents); + FTC32Thread.OnSignal := HandleTC32Event; + end; + + AfterOpen(FCommConfig.dwProviderSubType, GetLastError); +end; + +procedure TCustomComm32.Close; +begin + if Enabled then + begin + if FTC32Thread <> nil then + begin + FTC32Thread.ReleaseThread; + FTC32Thread.Suspend; + end; + FTC32Thread.Free; + CloseHandle(FHandle); + FHandle := INVALID_HANDLE_VALUE; + end; +end; + +function TCustomComm32.Write(const Buf; Count: Integer): Integer; +var + dwBytesTransfered: DWORD; +begin + //no writes allowed while IOPending + if FIOPending then + begin + while not GetOverlappedResult(FHandle, FWriteOS, + dwBytesTransfered, false) do + begin + Result := 0; + exit; + end; + FIOPending := false; + end; + + FillChar(FWriteOS, Sizeof(FWriteOS), 0); + FWriteOS.hEvent := FWriteEvent; + if not WriteFile(FHandle, Buf, Count, Result, @FWriteOS) then + if (GetLastError = Error_IO_Pending) then + FIOPending := true + else + Result := -1; +end; + +function TCustomComm32.Read(var Buf; Count: Integer): Integer; +var + OS: TOverlapped; +begin + Fillchar(OS, Sizeof(OS), 0); + if not ReadFile(FHandle, Buf, Count, Result, @OS) then Result := -1; +end; + +procedure TCustomComm32.EventStateChange(Event: Integer); +begin + case Event of + EV_BREAK: + if assigned(FOnBreakSignal) then + FOnBreakSignal(self); + EV_CTS: + if assigned(FOnCTSSignal) then + FOnCTSSignal(self); + EV_DSR: + if assigned(FOnDSRSignal) then + FOnDSRSignal(self); + EV_ERR: + if assigned(FOnErrorSignal) then + FOnErrorSignal(self, FErrors); + EV_RING: + if assigned(FOnRingSignal) then + FOnRingSignal(self); + EV_RLSD: + if assigned(FOnRLSDSignal) then + FOnRLSDSignal(self); + EV_RXCHAR: + if assigned(FOnRxCharSignal) then + FOnRxCharSignal(self, FCT.cbInQue); + EV_RXFLAG: + if assigned(FOnRxFlagSignal) then + FOnRxFlagSignal(self); + EV_TXEMPTY: + if assigned(FOnTxEmptySignal) then + FOnTxEmptySignal(self); + end; +end; + +procedure TCustomComm32.HandleTC32Event(Sender: TObject; Status: dword); +begin + ClearCommError(FHandle, FErrors, @FCT); + if (Status and EV_BREAK > 0) then EventStateChange(EV_BREAK); + if (Status and EV_CTS > 0) then EventStateChange(EV_CTS); + if (Status and EV_DSR > 0) then EventStateChange(EV_DSR); + if (Status and EV_ERR > 0) then EventStateChange(EV_ERR); + if (Status and EV_RING > 0) then EventStateChange(EV_RING); + if (Status and EV_RLSD > 0) then EventStateChange(EV_RLSD); + if (Status and EV_RXCHAR > 0) then EventStateChange(EV_RXCHAR); + if (Status and EV_RXFLAG > 0) then EventStateChange(EV_RXFLAG); + if (Status and EV_TXEMPTY > 0) then EventStateChange(EV_TXEMPTY); +end; + +procedure TCustomComm32.SetBaudRate(Value: TBaudRate); +begin + FBaudRate := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.BaudRate := CBR[FBaudRate]; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetParity(Value: TParity); +begin + FParity := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.Parity := PAR[FParity]; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetStopbits(Value: TStopbits); +begin + FStopbits := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.Stopbits := STB[FStopbits]; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetDataBits(Value: TDatabits); +begin + FDataBits:=Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.Bytesize := DAB[FDatabits]; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetFlowControl(Value: TFlowControl); +begin + FFlowControl := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + EnableHandshaking(FDCB); + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetXonChar(Value: char); +begin + FXonChar := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.XonChar := FXonChar; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetXoffChar(Value: char); +begin + FXoffChar := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.XoffChar := FXoffChar; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetOptions(Value: TComm32Options); +var + OptIndex: TComm32Option; +begin + FOptions := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + for OptIndex := osParityCheck to osNullStrip do + if OptIndex in FOptions then + FDCB.Flags := FDCB.Flags or OPT[OptIndex] + else + FDCB.Flags := FDCB.Flags and not OPT[OptIndex]; + SetCommState(FHandle, FDCB); + end; +end; + +function TCustomComm32.InQueCount: Integer; +var + Errors: dword; +begin + ClearCommError(FHandle, Errors, @FCT); + Result := FCT.cbInQue; +end; + +function TCustomComm32.OutQueCount: Integer; +var + Errors: dword; +begin + ClearCommError(FHandle, Errors, @FCT); + Result := FCT.cbOutQue; +end; + +procedure TCustomComm32.PurgeIn; +begin + PurgeComm(FHandle, PURGE_RXABORT or PURGE_RXCLEAR); +end; + +procedure TCustomComm32.PurgeOut; +begin + PurgeComm(FHandle, PURGE_TXABORT or PURGE_TXCLEAR); +end; + +function TCustomComm32.GetModemState(Index: Integer): boolean; +var + Flag, State: dword; +begin + case Index of + 1: State := MS_CTS_ON; + 2: State := MS_DSR_ON; + 3: State := MS_RING_ON; + 4: State := MS_RLSD_ON; + else + State := 0; + end; + Result := false; + if Enabled then + if GetCommModemStatus(FHandle, Flag) then + Result := (Flag and State > 0); +end; + +function TCustomComm32.DTR(State: boolean): boolean; +const + DTR: array[boolean] of Integer = (CLRDTR, SETDTR); +begin + Result := EscapeCommFunction(FHandle, DTR[State]); +end; + +function TCustomComm32.RTS(State: boolean): boolean; +const + RTS: array[boolean] of Integer = (CLRRTS, SETRTS); +begin + Result := EscapeCommFunction(FHandle, RTS[State]); +end; + +function TCustomComm32.BREAK(State: Boolean): boolean; +const + BREAK: array[boolean] of Integer = (CLRBREAK, SETBREAK); +begin + Result := EscapeCommFunction(FHandle, BREAK[State]); + PurgeComm(FHandle, PURGE_RXABORT + PURGE_RXCLEAR + + PURGE_TXABORT + PURGE_TXCLEAR); +end; + +function TCustomComm32.XON(State: Boolean): boolean; +const + XON: array[boolean] of Integer = (SETXOFF, SETXON); +begin + Result := EscapeCommFunction(FHandle, XON[State]); +end; + +procedure TCustomComm32.EnableHandshaking(var DCB: TDCB); +begin + case FFlowControl of // if hDefault, nothing happens + fcNone: + begin + DCB.Flags := DCB.Flags and (not fOutxCtsFlow); + DCB.Flags := DCB.Flags and (not fRtsControl) or (RTS_CONTROL_TOGGLE shl 12); + DCB.Flags := DCB.Flags and (not fOutxDsrFlow); + DCB.Flags := DCB.Flags and (not fDtrControl) or (DTR_CONTROL_ENABLE shl 4); + DCB.Flags := DCB.Flags and (not fOutX) and (not fInX); + end; + fcCTS: + begin + DCB.Flags := DCB.Flags or fOutxCtsFlow; + DCB.Flags := DCB.Flags and (not fRtsControl) or (RTS_CONTROL_HANDSHAKE shl 12); + DCB.Flags := DCB.Flags and (not fOutxDsrFlow); + DCB.Flags := DCB.Flags and (not fDtrControl) or (DTR_CONTROL_ENABLE shl 4); + DCB.Flags := DCB.Flags and (not fOutX) and (not fInX); + end; + fcDTR: + begin + DCB.Flags := DCB.Flags and (not fOutxCtsFlow); + DCB.Flags := DCB.Flags and (not fRtsControl) or (RTS_CONTROL_ENABLE shl 12); + DCB.Flags := DCB.Flags or fOutxDsrFlow; + DCB.Flags := DCB.Flags and (not fDtrControl) or (DTR_CONTROL_HANDSHAKE shl 4); + DCB.Flags := DCB.Flags and (not fOutX) and (not fInX); + end; + fcSoftware: + begin + DCB.Flags := DCB.Flags and (not fOutxCtsFlow); + DCB.Flags := DCB.Flags and (not fRtsControl) or (RTS_CONTROL_ENABLE shl 12); + DCB.Flags := DCB.Flags and (not fOutxDsrFlow); + DCB.Flags := DCB.Flags and (not fDtrControl) or (DTR_CONTROL_ENABLE shl 4); + DCB.Flags := DCB.Flags or fOutX or fInX; + DCB.XonChar := FXonChar; + DCB.XoffChar := FXOffChar; + end; + end; +end; + +procedure Register; +begin + RegisterComponents('Varian FreeWare', [TComm32]); +end; + +end. diff --git a/src/async32.~pas b/src/async32.~pas new file mode 100644 index 00000000..1a15eb87 --- /dev/null +++ b/src/async32.~pas @@ -0,0 +1,753 @@ +//****************************************************************************** +// VARIAN ASYNC32 COMPONENT v1.01 +// (c) VARIAN SOFTWARE SERVICES NL 1996-1997 +// ALL RIGHTS RESERVED +//****************************************************************************** + +//Written by Varian Software Services NL, The Netherlands +//Subject: Async32 Component +//Version: 1.01 +//Platform: Delphi 3, Win95, NT +//Date: 2 June 1997 +//Last update: 13st September 1997 +//Release: Freeware, just let us know what you think of it.... + +//if you make any modifications to the source, please send us a copy. +//We will verify your changes and give you proper credit when included. + +//Please send any questions, remarks or suggestions to our following +//address: Varian@worldaccess.nl + +// THIS SOFTWARE IS PROVIDED 'AS-IS', WITHOUT ANY EXPRESS OR IMPLIED +//WARRANTY. IN NO EVENT WILL THE AUTHOR BE HELD LIABLE FOR ANY DAMAGES +// ARISING FROM THE USE OF THIS SOFTWARE. + +//**************************************************************************** +// Our thanks goes to all the people who helped creating and +// testing this component for their support and suggestions. +//**************************************************************************** + +//Shortcuts: +//CTS - Clear to send +//DSR - Data set ready +//RING - Ring indicator +//RLSD - Receive line signal detect +//EV_BREAK - A break was detected on input. +//EV_CTS - The CTS (clear-to-send) signal changed state. +//EV_DSR - The DSR (data-set-ready) signal changed state. +//EV_ERR - A line-status error occurred. Line-status errors +// are CE_FRAME, CE_OVERRUN, and CE_RXPARITY. +//EV_RING - A ring indicator was detected. +//EV_RLSD - The RLSD (receive-line-signal-detect) signal changed state. +//EV_RXCHAR - A character was received and placed in the input buffer. +//EV_RXFLAG - The event character was received and placed in the input buffer. +// The event character is specified in the device's DCB structure, +// which is applied to a serial port by using the SetCommState function. +//EV_TXEMPTY - The last character in the output buffer was sent. + +//Available provider subtypes: +//PST_FAX FAX device +//PST_LAT LAT protocol +//PST_MODEM Modem device +//PST_NETWORK_BRIDGE Unspecified network bridge +//PST_PARALLELPORT Parallel port +//PST_RS232 RS-232 serial port +//PST_RS422 RS-422 port +//PST_RS423 RS-423 port +//PST_RS449 RS-449 port +//PST_SCANNER Scanner device +//PST_TCPIP_TELNET TCP/IP Telnet protocol +//PST_UNSPECIFIED Unspecified +//PST_X25 X.25 standards + +//Errorflags OnErrorSignal: +//CE_BREAK The hardware detected a break condition. +//CE_DNS Windows 95 only: A parallel device is not selected. +//CE_FRAME The hardware detected a framing error. +//CE_IOE An I/O error occurred during communications with the device. +//CE_MODE The requested mode is not supported, or the hFile parameter +// is invalid. If this value is specified, it is the only valid error. +//CE_OOP Windows 95 only: A parallel device signaled that it is out of paper. +//CE_OVERRUN A character-buffer overrun has occurred. The next character is lost. +//CE_PTO Windows 95 only: A time-out occurred on a parallel device. +//CE_RXOVER An input buffer overflow has occurred. There is either no +// room in the input buffer, or a character was received after +// the end-of-file (EOF) character. +//CE_RXPARITY The hardware detected a parity error. +//CE_TXFULL The application tried to transmit a character, but the output +// buffer was full. + +unit async32; + +interface + +uses + Windows, Messages, SysUtils, Classes, Forms, dialogs; + +type + TC32Event = procedure(Sender: TObject; Status: dword) of object; + TC32EventState = (evBreak, evCTS, evDSR, evError, evRing, + evRlsd, evRxChar, evRxFlag, evTxEmpty); + TC32EventType = set of TC32EventState; + + TC32Thread = class(TThread) + private + FHandle: THandle; + FStatus: dword; + FOnSignal: TC32Event; + hCloseEvent: THandle; + protected + procedure Execute; override; + procedure DoOnSignal; + public + constructor Create(Handle: THandle; Events: TC32EventType); + destructor Destroy; override; + procedure ReleaseThread; + property OnSignal: TC32Event read FOnSignal write FOnSignal; + end; + + TBaudRate = (cbr110, cbr300, cbr600, cbr1200, cbr2400, cbr4800, + cbr9600, cbr14400, cbr19200, cbr38400, cbr56000, + cbr57600, cbr115200, cbr128000, cbr256000); + TParity = (paNone, paOdd, paEven, paMark, paSpace); + TStopbits = (sb10, sb15, sb20); + TDatabits=(da4, da5, da6, da7, da8); + TFlowControl = (fcNone, fcCTS, fcDTR, fcSoftware, fcDefault); + + TComm32Option = (osParityCheck, osDsrSensitivity, osIgnoreXOff, + osErrorChar, osNullStrip); + TComm32Options = set of TComm32Option; + + TC32RxCharEvent = procedure(Sender: TObject; Count: Integer) of object; + TC32ErrorEvent = procedure(Sender: TObject; Errors: Integer) of object; + TC32OpenEvent = procedure(Sender: TObject; ProviderSubType: Integer; + Error: Integer) of object; + + TCustomComm32 = class(TComponent) + private + FHandle: THandle; + FWriteEvent: THandle; + FCT: TComStat; + FDCB: TDCB; + FCommConfig: TCommConfig; + FTC32Thread: TC32Thread; + FErrors: dword; + FIOpending: Boolean; + FWriteOS: TOverlapped; + FDeviceName: String; + FBaudRate: TBaudRate; + FParity: TParity; + FStopbits: TStopbits; + FDatabits: TDatabits; + FMonitorEvents: TC32EventType; + FReadBufferSize: Integer; + FWriteBufferSize: Integer; + FFlowControl: TFlowControl; + FXonChar: char; + FXoffChar: char; + FOptions: TComm32Options; + FOnOpen: TC32OpenEvent; + FOnBreakSignal: TNotifyEvent; + FOnCTSSignal: TNotifyEvent; + FOnDSRSignal: TNotifyEvent; + FOnErrorSignal: TC32ErrorEvent; + FOnRingSignal: TNotifyEvent; + FOnRLSDSignal: TNotifyEvent; + FOnRxCharSignal: TC32RxCharEvent; + FOnRxFlagSignal: TNotifyEvent; + FOnTxEmptySignal: TNotifyEvent; + procedure EnableHandshaking(var DCB: TDCB); + function GetModemState(Index: Integer): Boolean; + procedure HandleTC32Event(Sender: TObject; Status: dword); + procedure SetBaudRate(Value: TBaudRate); + procedure SetParity(Value: TParity); + procedure SetStopbits(Value: TStopBits); + procedure SetDatabits(Value: TDatabits); + procedure SetFlowControl(Value: TFlowControl); + procedure SetXonChar(Value: char); + procedure SetXoffChar(Value: char); + procedure SetOptions(Value: TComm32Options); + protected + procedure EventStateChange(Event: Integer); dynamic; + procedure AfterOpen(ProviderSubType: Integer; Error: Integer); dynamic; + property DeviceName: string read FDeviceName write FDeviceName; + property BaudRate: TBaudRate read FBaudRate write SetBaudRate default cbr9600; + property Parity: TParity read FParity write SetParity default paNone; + property Stopbits: TStopbits read FStopbits write SetStopbits default sb10; + property Databits: TDatabits read FDatabits write SetDatabits default da8; + property MonitorEvents: TC32EventType read FMonitorEvents write FMonitorEvents; + property ReadBufferSize: Integer read FReadBufferSize write FReadBufferSize default 4096; + property WriteBufferSize: Integer read FWriteBufferSize write FWriteBufferSize default 2048; + property FlowControl: TFlowControl read FFlowControl write SetFlowControl default fcDefault; + property XonChar: char read FXonChar write SetXonChar default #17; + property XoffChar: char read FXoffChar write SetXoffChar default #19; + property Options: TComm32Options read FOptions write SetOptions; + {Comm signal events} + property OnOpen: TC32OpenEvent read FOnOpen write FOnOpen; + property OnBreak: TNotifyEvent read FOnBreakSignal write FOnBreakSignal; + property OnCTS: TNotifyEvent read FOnCTSSignal write FOnCTSSignal; + property OnDSR: TNotifyEvent read FOnDSRSignal write FOnDSRSignal; + property OnRing: TNotifyEvent read FOnRingSignal write FOnRingSignal; + property OnRLSD: TNotifyEvent read FOnRLSDSignal write FOnRLSDSignal; + property OnError: TC32ErrorEvent read FOnErrorSignal write FOnErrorSignal; + property OnRxChar: TC32RxCharEvent read FOnRxCharSignal write FOnRxCharSignal; + property OnRxFlag: TNotifyEvent read FOnRxFlagSignal write FOnRxFlagSignal; + property OnTxEmpty: TNotifyEvent read FOnTxEmptySignal write FOnTxEmptySignal; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure Open; + procedure Close; + function Enabled: Boolean; + function Write(const Buf; Count: Integer): Integer; + function Read(var Buf; Count: Integer): Integer; + function InQueCount: Integer; + function OutQueCount: Integer; + procedure PurgeIn; + procedure PurgeOut; + //Comm escape functions + function DTR(State: Boolean): boolean; + function RTS(State: Boolean): boolean; + function BREAK(State: Boolean): boolean; + function XON(State: Boolean): boolean; + //Comm status flags + property CTS: Boolean index 1 read GetModemState; + property DSR: Boolean index 2 read GetModemState; + property RING: Boolean index 3 read GetModemState; + property RLSD: Boolean index 4 read GetModemState; + //Reference to internal device handle + property Handle: THandle read FHandle; + end; + + TComm32 = class(TCustomComm32) + published + property DeviceName; + property BaudRate; + property Parity; + property Stopbits; + property Databits; + property MonitorEvents; + property ReadBufferSize; + property WriteBufferSize; + property FlowControl; + property XonChar; + property XoffChar; + property Options; + property OnOpen; + property OnBreak; + property OnCTS; + property OnDSR; + property OnError; + property OnRing; + property OnRLSD; + property OnRxChar; + property OnRxFlag; + property OnTxEmpty; + end; + + +procedure Register; + + +implementation + +const + fBinary = $00000001; + fParity = $00000002; + fOutxCtsFlow = $00000004; + fOutxDsrFlow = $00000008; + fDtrControl = $00000030; + fDsrSensitivity = $00000040; + fTXContinueOnXoff = $00000080; + fOutX = $00000100; + fInX = $00000200; + fErrorChar = $00000400; + fNull = $00000800; + fRtsControl = $00003000; + fAbortOnError = $00004000; + fDummy2 = $FFFF8000; + + CBR: array[TBaudRate] of Integer = + (CBR_110, CBR_300, CBR_600, CBR_1200, CBR_2400, CBR_4800, CBR_9600, + CBR_14400, CBR_19200, CBR_38400, CBR_56000, CBR_57600, CBR_115200, + CBR_128000, CBR_256000); + + DAB: array[TDatabits] of Integer = + (4, 5, 6, 7, 8); + + PAR: array[TParity] of Integer = + (NOPARITY, ODDPARITY, EVENPARITY, MARKPARITY, SPACEPARITY); + + STB: array[TStopbits] of Integer = + (ONESTOPBIT, ONE5STOPBITS, TWOSTOPBITS); + + OPT: array[TComm32Option] of Integer = + (fParity, fDsrSensitivity, fTXContinueOnXoff, fErrorChar, fNull); + +//TC32Thread + +constructor TC32Thread.Create(Handle: Integer; Events: TC32EventType); +const + EvList: array[TC32EventState] of dword = (EV_BREAK, EV_CTS, EV_DSR, EV_ERR, + EV_RING, EV_RLSD, EV_RXCHAR, EV_RXFLAG, EV_TXEMPTY); +var + EvIndex: TC32EventState; + AttrWord: dword; +begin + Inherited Create(true); + Priority := tpHighest; + FHandle := Handle; + AttrWord := 0; + for EvIndex := evBREAK to evTXEMPTY do + if EvIndex in Events then + AttrWord := AttrWord or EvList[EvIndex]; + SetCommMask(FHandle, AttrWord); + Resume; +end; + +destructor TC32Thread.Destroy; +begin + CloseHandle(hCloseEvent); + Inherited Destroy; +end; + +procedure TC32Thread.Execute; +var + HandlesToWaitFor: array[0..2] of THandle; + dwHandleSignaled: DWORD; + BytesTransferred: DWORD; //Dummy, not valid for WaitCommEvent + OverlappedCommEvent: TOverlapped; +begin + FillChar(OverlappedCommEvent, Sizeof(OverlappedCommEvent), 0); + hCloseEvent := CreateEvent(nil, True, False, nil); + OverlappedCommEvent.hEvent := CreateEvent(nil, True, True, nil); + HandlesToWaitFor[0] := hCloseEvent; + HandlesToWaitFor[1] := OverlappedCommEvent.hEvent; + + repeat + WaitCommEvent(FHandle, FStatus, @OverlappedCommEvent); + dwHandleSignaled := WaitForMultipleObjects(2, @HandlesToWaitFor, False, INFINITE); + case dwHandleSignaled of + WAIT_OBJECT_0 : Break; + WAIT_OBJECT_0 + 1: + if GetOverlappedResult(FHandle, OverlappedCommEvent, + BytesTransferred, false) then Synchronize(DoOnSignal); + else + Break //This should never occur + end; + until Terminated; + PurgeComm(FHandle, PURGE_RXABORT + PURGE_RXCLEAR); + CloseHandle(OverlappedCommEvent.hEvent); +end; + +procedure TC32Thread.ReleaseThread; +begin + SetEvent(hCloseEvent); +end; + +procedure TC32Thread.DoOnSignal; +begin + if Assigned(FOnSignal) then FOnSignal(Self, FStatus); +end; + +//TCustomComm32 + +constructor TCustomComm32.Create(AOwner: TComponent); +begin + Inherited Create(AOwner); + FHandle := INVALID_HANDLE_VALUE; + FDeviceName := 'COM2'; + FBaudRate := cbr9600; + FParity := paNone; + FStopbits := sb10; + FDatabits := da8; + FXonChar := #17; + FXoffChar := #19; + FOptions := []; + FMonitorEvents := [evBreak, evCTS, evDSR, evError, evRing, + evRlsd, evRxChar, evRxFlag, evTxEmpty]; + FReadBufferSize := 4096; + FWriteBufferSize := 2048; + FFlowControl := fcDefault; + FWriteEvent := CreateEvent(nil, false, false, nil); +end; + +destructor TCustomComm32.Destroy; +begin + Close; + CloseHandle(FWriteEvent); + Inherited Destroy; +end; + +function TCustomComm32.Enabled: Boolean; +begin + Result := FHandle <> INVALID_HANDLE_VALUE; +end; + +procedure TCustomComm32.AfterOpen(ProviderSubType: Integer; Error: Integer); +begin + if assigned(FOnOpen) then + FOnOpen(Self, ProviderSubType, Error); +end; + +procedure TCustomComm32.Open; +var + CommTimeouts: TCommTimeouts; + OptIndex: TComm32Option; + Size: Integer; +begin + Close; + + SetLastError(0); //remove any pending errors + + Fillchar(FCommConfig, Sizeof(FCommConfig), 0); + + FHandle := CreateFile(PCHAR(FDeviceName), GENERIC_READ or GENERIC_WRITE, + 0, nil, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); + if Enabled then + begin + Size := Sizeof(TCommConfig); + GetCommConfig(FHandle, FCommConfig, Size); + SetCommState(FHandle, FCommConfig.DCB); //Initialize windows hardware settings + + SetupComm(FHandle, FReadBufferSize, FWriteBufferSize); + + GetCommTimeOuts(FHandle, CommTimeOuts); + CommTimeouts.ReadIntervalTimeout := 250; + CommTimeouts.ReadTotalTimeoutMultiplier := 0; + CommTimeouts.ReadTotalTimeoutConstant := 0; + CommTimeouts.WriteTotalTimeoutMultiplier := 0; + CommTimeouts.WriteTotalTimeoutConstant := 0; + SetCommTimeOuts(FHandle, CommTimeOuts); + + GetCommState(FHandle, FDCB); + FDCB.BaudRate := CBR[FBaudRate]; + FDCB.Parity := PAR[FParity]; + FDCB.Stopbits := STB[FStopbits]; + FDCB.Bytesize := DAB[FDatabits]; + + for OptIndex := osParityCheck to osNullStrip do + if OptIndex in FOptions then + FDCB.Flags := FDCB.Flags or OPT[OptIndex] + else + FDCB.Flags := FDCB.Flags and not OPT[OptIndex]; + + EnableHandshaking(FDCB); + SetCommState(FHandle, FDCB); + + FTC32Thread := TC32Thread.Create(FHandle, FMonitorEvents); + FTC32Thread.OnSignal := HandleTC32Event; + end; + + AfterOpen(FCommConfig.dwProviderSubType, GetLastError); +end; + +procedure TCustomComm32.Close; +begin + if Enabled then + begin + if FTC32Thread <> nil then + begin + FTC32Thread.ReleaseThread; + FTC32Thread.Suspend; + end; + FTC32Thread.Free; + CloseHandle(FHandle); + FHandle := INVALID_HANDLE_VALUE; + end; +end; + +function TCustomComm32.Write(const Buf; Count: Integer): Integer; +var + dwBytesTransfered: DWORD; +begin + //no writes allowed while IOPending + if FIOPending then + begin + while not GetOverlappedResult(FHandle, FWriteOS, + dwBytesTransfered, false) do + begin + Result := 0; + exit; + end; + FIOPending := false; + end; + + FillChar(FWriteOS, Sizeof(FWriteOS), 0); + FWriteOS.hEvent := FWriteEvent; + if not WriteFile(FHandle, Buf, Count, Result, @FWriteOS) then + if (GetLastError = Error_IO_Pending) then + FIOPending := true + else + Result := -1; +end; + +function TCustomComm32.Read(var Buf; Count: Integer): Integer; +var + OS: TOverlapped; +begin + Fillchar(OS, Sizeof(OS), 0); + if not ReadFile(FHandle, Buf, Count, Result, @OS) then Result := -1; +end; + +procedure TCustomComm32.EventStateChange(Event: Integer); +begin + case Event of + EV_BREAK: + if assigned(FOnBreakSignal) then + FOnBreakSignal(self); + EV_CTS: + if assigned(FOnCTSSignal) then + FOnCTSSignal(self); + EV_DSR: + if assigned(FOnDSRSignal) then + FOnDSRSignal(self); + EV_ERR: + if assigned(FOnErrorSignal) then + FOnErrorSignal(self, FErrors); + EV_RING: + if assigned(FOnRingSignal) then + FOnRingSignal(self); + EV_RLSD: + if assigned(FOnRLSDSignal) then + FOnRLSDSignal(self); + EV_RXCHAR: + if assigned(FOnRxCharSignal) then + FOnRxCharSignal(self, FCT.cbInQue); + EV_RXFLAG: + if assigned(FOnRxFlagSignal) then + FOnRxFlagSignal(self); + EV_TXEMPTY: + if assigned(FOnTxEmptySignal) then + FOnTxEmptySignal(self); + end; +end; + +procedure TCustomComm32.HandleTC32Event(Sender: TObject; Status: dword); +begin + ClearCommError(FHandle, FErrors, @FCT); + if (Status and EV_BREAK > 0) then EventStateChange(EV_BREAK); + if (Status and EV_CTS > 0) then EventStateChange(EV_CTS); + if (Status and EV_DSR > 0) then EventStateChange(EV_DSR); + if (Status and EV_ERR > 0) then EventStateChange(EV_ERR); + if (Status and EV_RING > 0) then EventStateChange(EV_RING); + if (Status and EV_RLSD > 0) then EventStateChange(EV_RLSD); + if (Status and EV_RXCHAR > 0) then EventStateChange(EV_RXCHAR); + if (Status and EV_RXFLAG > 0) then EventStateChange(EV_RXFLAG); + if (Status and EV_TXEMPTY > 0) then EventStateChange(EV_TXEMPTY); +end; + +procedure TCustomComm32.SetBaudRate(Value: TBaudRate); +begin + FBaudRate := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.BaudRate := CBR[FBaudRate]; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetParity(Value: TParity); +begin + FParity := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.Parity := PAR[FParity]; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetStopbits(Value: TStopbits); +begin + FStopbits := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.Stopbits := STB[FStopbits]; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetDataBits(Value: TDatabits); +begin + FDataBits:=Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.Bytesize := DAB[FDatabits]; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetFlowControl(Value: TFlowControl); +begin + FFlowControl := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + EnableHandshaking(FDCB); + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetXonChar(Value: char); +begin + FXonChar := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.XonChar := FXonChar; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetXoffChar(Value: char); +begin + FXoffChar := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + FDCB.XoffChar := FXoffChar; + SetCommState(FHandle, FDCB); + end; +end; + +procedure TCustomComm32.SetOptions(Value: TComm32Options); +var + OptIndex: TComm32Option; +begin + FOptions := Value; + if Enabled then + begin + GetCommState(FHandle, FDCB); + for OptIndex := osParityCheck to osNullStrip do + if OptIndex in FOptions then + FDCB.Flags := FDCB.Flags or OPT[OptIndex] + else + FDCB.Flags := FDCB.Flags and not OPT[OptIndex]; + SetCommState(FHandle, FDCB); + end; +end; + +function TCustomComm32.InQueCount: Integer; +var + Errors: dword; +begin + ClearCommError(FHandle, Errors, @FCT); + Result := FCT.cbInQue; +end; + +function TCustomComm32.OutQueCount: Integer; +var + Errors: dword; +begin + ClearCommError(FHandle, Errors, @FCT); + Result := FCT.cbOutQue; +end; + +procedure TCustomComm32.PurgeIn; +begin + PurgeComm(FHandle, PURGE_RXABORT or PURGE_RXCLEAR); +end; + +procedure TCustomComm32.PurgeOut; +begin + PurgeComm(FHandle, PURGE_TXABORT or PURGE_TXCLEAR); +end; + +function TCustomComm32.GetModemState(Index: Integer): boolean; +var + Flag, State: dword; +begin + case Index of + 1: State := MS_CTS_ON; + 2: State := MS_DSR_ON; + 3: State := MS_RING_ON; + 4: State := MS_RLSD_ON; + else + State := 0; + end; + Result := false; + if Enabled then + if GetCommModemStatus(FHandle, Flag) then + Result := (Flag and State > 0); +end; + +function TCustomComm32.DTR(State: boolean): boolean; +const + DTR: array[boolean] of Integer = (CLRDTR, SETDTR); +begin + Result := EscapeCommFunction(FHandle, DTR[State]); +end; + +function TCustomComm32.RTS(State: boolean): boolean; +const + RTS: array[boolean] of Integer = (CLRRTS, SETRTS); +begin + Result := EscapeCommFunction(FHandle, RTS[State]); +end; + +function TCustomComm32.BREAK(State: Boolean): boolean; +const + BREAK: array[boolean] of Integer = (CLRBREAK, SETBREAK); +begin + Result := EscapeCommFunction(FHandle, BREAK[State]); + PurgeComm(FHandle, PURGE_RXABORT + PURGE_RXCLEAR + + PURGE_TXABORT + PURGE_TXCLEAR); +end; + +function TCustomComm32.XON(State: Boolean): boolean; +const + XON: array[boolean] of Integer = (SETXOFF, SETXON); +begin + Result := EscapeCommFunction(FHandle, XON[State]); +end; + +procedure TCustomComm32.EnableHandshaking(var DCB: TDCB); +begin + case FFlowControl of // if hDefault, nothing happens + fcNone: + begin + DCB.Flags := DCB.Flags and (not fOutxCtsFlow); + DCB.Flags := DCB.Flags and (not fRtsControl) or (RTS_CONTROL_TOGGLE shl 12); + DCB.Flags := DCB.Flags and (not fOutxDsrFlow); + DCB.Flags := DCB.Flags and (not fDtrControl) or (DTR_CONTROL_ENABLE shl 4); + DCB.Flags := DCB.Flags and (not fOutX) and (not fInX); + end; + fcCTS: + begin + DCB.Flags := DCB.Flags or fOutxCtsFlow; + DCB.Flags := DCB.Flags and (not fRtsControl) or (RTS_CONTROL_HANDSHAKE shl 12); + DCB.Flags := DCB.Flags and (not fOutxDsrFlow); + DCB.Flags := DCB.Flags and (not fDtrControl) or (DTR_CONTROL_ENABLE shl 4); + DCB.Flags := DCB.Flags and (not fOutX) and (not fInX); + end; + fcDTR: + begin + DCB.Flags := DCB.Flags and (not fOutxCtsFlow); + DCB.Flags := DCB.Flags and (not fRtsControl) or (RTS_CONTROL_ENABLE shl 12); + DCB.Flags := DCB.Flags or fOutxDsrFlow; + DCB.Flags := DCB.Flags and (not fDtrControl) or (DTR_CONTROL_HANDSHAKE shl 4); + DCB.Flags := DCB.Flags and (not fOutX) and (not fInX); + end; + fcSoftware: + begin + DCB.Flags := DCB.Flags and (not fOutxCtsFlow); + DCB.Flags := DCB.Flags and (not fRtsControl) or (RTS_CONTROL_ENABLE shl 12); + DCB.Flags := DCB.Flags and (not fOutxDsrFlow); + DCB.Flags := DCB.Flags and (not fDtrControl) or (DTR_CONTROL_ENABLE shl 4); + DCB.Flags := DCB.Flags or fOutX or fInX; + DCB.XonChar := FXonChar; + DCB.XoffChar := FXOffChar; + end; + end; +end; + +procedure Register; +begin + RegisterComponents('Varian FreeWare', [TComm32]); +end; + +end. diff --git a/src/asynctim.zip b/src/asynctim.zip new file mode 100644 index 00000000..cffc68c3 Binary files /dev/null and b/src/asynctim.zip differ diff --git a/src/audio.int b/src/audio.int new file mode 100644 index 00000000..927fc795 --- /dev/null +++ b/src/audio.int @@ -0,0 +1,87 @@ +unit Audio; + +interface + +Uses SysUtils, Windows, Controls, Classes,MMSystem, Messages; +Type + + EWaveInError = class(Exception); + EWaveOutError = class(Exception); + + TWaveInData = procedure (Data : PChar; Size : integer) of object; + TBeforeOpen = procedure (var WaveFormat : pointer) of object; + + TWaveIn = class(TComponent) + private + FBeforeOpen : TBeforeOpen; + FOnWaveInData : TWaveInData; + FOnWaveInOpen : TNotifyEvent; + FOnWaveInClose : TNotifyEvent; + FDeviceId : Integer; + FWaveFormat : pointer; + FRecording : boolean; + FStereo : boolean; + FSamples : integer; + FHWnd : HWND; + hWaveIn : HWave; + FBufSize : Integer; + WaveFormatEx : TWaveFormatEX; + procedure SetRecording(AValue : Boolean); + protected + procedure WndProc(var Message : TMessage); + public + constructor Create(AComponent : TComponent); override; + destructor Destroy; override; + procedure Open; virtual; + procedure Close; virtual; + property Recording : boolean read FRecording write SetRecording; + property DeviceId : integer read FDeviceId write FDeviceId; + property Handle : HWave read hWaveIn; + published + property OnWaveInData : TWaveInData read FOnWaveInData write FOnWaveInData; + property OnWaveInOpen : TNotifyEvent read FOnWaveInOpen write FOnWaveInOpen ; + property OnWaveInClose : TNotifyEvent read FOnWaveInClose write FOnWaveInClose ; + property BeforeOpen : TBeforeOpen read FBeforeOpen write FBeforeOpen; + property Samples : integer read FSamples write FSamples; + property Stereo : boolean read FStereo write FStereo; + + end; + + TWaveOut = class(TComponent) + private + FBeforeOpen : TBeforeOpen; + FOnWaveOutOpen : TNotifyEvent; + FOnWaveOutClose : TNotifyEvent; + FOnWaveOutDone : TNotifyEvent; + FDeviceId : Integer; + FWaveFormat : pointer; + FVolume : integer; + hWaveOut : HWave; + WaveOutHdr : TWaveHdr; + FRecording : boolean; + FSamples : integer; + FStereo : boolean; + FHWnd : HWND; + hWaveIn : HWave; + FBufSize : Integer; + WaveFormatEx : TWaveFormatEX; + procedure SetVolume(AValue : integer); + protected + procedure WndProc(var Message : TMessage); + procedure Open; virtual; + procedure Close; virtual; + public + constructor Create(AComponent : TComponent); override; + destructor Destroy; override; + procedure PlayBack(Data : PChar; Size : integer); + property Volume : integer read FVolume write SetVolume; + property Handle : HWave read hWaveOut; + published + property OnWaveOutOpen : TNotifyEvent read FOnWaveOutOpen write FOnWaveOutOpen ; + property OnWaveOutClose : TNotifyEvent read FOnWaveOutClose write FOnWaveOutClose ; + property OnWaveOutDone : TNotifyEvent read FOnWaveOutDone write FOnWaveOutDone ; + property BeforeOpen : TBeforeOpen read FBeforeOpen write FBeforeOpen; + property Samples : integer read FSamples write FSamples; + property Stereo : boolean read FStereo write FStereo; + property DeviceId : integer read FDeviceId write FDeviceId; + end; diff --git a/src/bpanel.pas b/src/bpanel.pas new file mode 100644 index 00000000..19bc2b54 --- /dev/null +++ b/src/bpanel.pas @@ -0,0 +1,151 @@ +{------------------------------------------------------------- +-BPanel: Visible Component used to display beveled edges - +-simular to edges seen between button bars and pull-down - +-menus in Windows 95. Any combination of top,bottom,left and- +-right bevels can be shown. - +-------------------------------------------------------------- +- !INSTALLATION!: In Delphi, go to Options|Install Component- +- and Add BPReg.pas. This will add both components. - +-------------------------------------------------------------- +-Programmed by Brendan Rempel, October 1996 - +-Copyright 1996; All Rights Reserved - +-Send any comments/change requests/etc. to: - +- rempelb@mail.pr-unlimited.com - +- - +-This component is hereby given to the public domain. I do - +-claim copyright of this code and I hereby prohibit the sale - +-of the source or compiled code to anyone for any amount. - +-------------------------------------------------------------} +unit Bpanel; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs, ExtCtrls; + +type + TBevelType = ( btInset, btOutset ); + +type + TBevelPanel = class(TCustomPanel) + private + { Private declarations } + FDrawTop: boolean; + FDrawBottom:boolean; + FDrawLeft: boolean; + FDrawRight: boolean; + + FBevelType: TBevelType; + protected + { Protected declarations } + procedure SetDrawTop(newDrawTop: boolean); + procedure SetDrawBottom(newDrawBottom: boolean); + procedure SetDrawLeft(newDrawLeft: boolean); + procedure SetDrawRight(newDrawRight: boolean); + + procedure SetBevelType(newBevelType: TBevelType); + public + { Public declarations } + procedure Paint; override; + constructor Create(AOwner: TComponent); override; + published + { Published declarations } + property DrawTop: boolean read FDrawTop write SetDrawTop; + property DrawBottom: boolean read FDrawBottom write SetDrawBottom; + property DrawLeft: boolean read FDrawLeft write SetDrawLeft; + property DrawRight: boolean read FDrawRight write SetDrawRight; + + property BevelType: TBevelType read FBevelType write SetBevelType; + + property Align; + property Color; + property Cursor; + end; + +implementation + +procedure TBevelPanel.SetDrawTop(newDrawTop: boolean); +begin + FDrawTop:= newDrawTop; + Invalidate; +end; + +procedure TBevelPanel.SetDrawBottom(newDrawBottom: boolean); +begin + FDrawBottom:= newDrawBottom; + Invalidate; +end; + +procedure TBevelPanel.SetDrawLeft(newDrawLeft: boolean); +begin + FDrawLeft:= newDrawLeft; + Invalidate; +end; + +procedure TBevelPanel.SetDrawRight(newDrawRight: boolean); +begin + FDrawRight:= newDrawRight; + Invalidate; +end; + +procedure TBevelPanel.SetBevelType(newBevelType: TBevelType); +begin + FBevelType:= newBevelType; + Invalidate; +end; + +constructor TBevelPanel.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + Width:= 100; + Height:= 30; + FBevelType:= btInset; + FDrawBottom:= True; + Color:= clBtnFace; +end; + +procedure TBevelPanel.Paint; +var + inColor, outColor: TColor; +begin + if FBevelType = btInset then { set bevel colors } + begin + inColor:= clBtnShadow; + outColor:=clBtnHighlight; + end + else + begin + outColor:=clBtnShadow; + inColor:= clBtnHighlight; + end; + + with Canvas do + begin + pen.color:= clBtnFace; brush.color:= Color; + Rectangle(0,0,width-1,height-1); { clear center } + + if FDrawBottom then { draw bottom? } + begin + pen.Color:= outColor; MoveTo(0,Height-1); LineTo(Width-1,Height-1); + pen.Color:= inColor; MoveTo(0,Height-2); LineTo(Width-1,Height-2); + end; + if FDrawRight then + begin { draw right? } + pen.Color:= outColor; MoveTo(Width-1,0); LineTo(Width-1,Height-1); + pen.Color:= inColor; MoveTo(Width-2,0); LineTo(Width-2,Height-1); + end; + if FDrawTop then + begin { draw top? } + pen.Color:= outColor; MoveTo(0,1); LineTo(Width-1,1); + pen.Color:= inColor; MoveTo(0,0); LineTo(Width-1,0); + end; + if FDrawLeft then + begin { draw left? } + pen.Color:= outColor; MoveTo(1,0); LineTo(1,Height-1); + pen.Color:= inColor; MoveTo(0,0); LineTo(0,Height-1); + end; + end; +end; + +end. diff --git a/src/bpreg.pas b/src/bpreg.pas new file mode 100644 index 00000000..6d534112 --- /dev/null +++ b/src/bpreg.pas @@ -0,0 +1,19 @@ +unit BPReg; + +interface + +procedure Register; + +implementation + +uses + Classes, Rbutton, Bpanel; + +procedure Register; +begin + RegisterComponents('Samples',[TRoundButton,TBevelPanel]); + { to automatically place these components into a page, change + 'Brendan' to the prefered location } +end; + +end. diff --git a/src/ccczlogconv.dfm b/src/ccczlogconv.dfm new file mode 100644 index 00000000..eaccc231 Binary files /dev/null and b/src/ccczlogconv.dfm differ diff --git a/src/ccczlogconv.pas b/src/ccczlogconv.pas new file mode 100644 index 00000000..1ec72465 --- /dev/null +++ b/src/ccczlogconv.pas @@ -0,0 +1,147 @@ +unit ccczlogconv; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + zLogGlobal, StdCtrls; + +type + monthtype= ShortInt; + daytype = ShortInt; + calltype = array[1..10] of char; + rsType = (f1,f2,f3,f4,f5,f6,f7,f8,f9); + numtype = array[1..4] of char; + timetype = SmallInt; + modetype = (mmSSB,mmCW,mmFM); + bandtype = (aa,bb,cc,dd,ee,ff,gg,hh,ii,jj,kk,LL); + countrytype = string[6]; + ptstype = Byte; + WWQSOdata = packed record + month : monthtype; + day : daytype; + time : timetype; + callsign : calltype; + rs : rsType; + number : numtype; + band : bandtype; + mode : modetype; + country : countrytype; + pts : ptstype; + newmulti : ByteBool; + memo : SmallInt; + cq : boolean; + end; + + +var WWLog : array[1..7000] of WWQSOdata; + MaxQSO : integer; +type + TForm1 = class(TForm) + OpenDialog1: TOpenDialog; + Button1: TButton; + Button2: TButton; + procedure Button1Click(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure Button2Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +{$R *.DFM} + +procedure TForm1.Button1Click(Sender: TObject); +var filename : string; + f : file of WWQSOdata; + q : WWQSOdata; +begin + If OpenDialog1.Execute then + begin + filename := OpenDialog1.FileName; + System.assign(f, filename); + reset(f); + while not(eof(f)) do + begin + read(f, q); + inc(MaxQSO); + WWLog[MaxQSO] := q; + end; + system.close(f); + end; +end; + +procedure TForm1.FormCreate(Sender: TObject); +begin + MaxQSO := 0; +end; + +procedure TForm1.Button2Click(Sender: TObject); +var f : file of TQSOdata; + Q0 : TQSO; + Q : TQSOdata; + W : WWQSOdata; + i, k : integer; + s : string; + r : double; +begin + System.assign(f, 'OUTPUT.ZLO'); + rewrite(f); + Q0 := TQSO.Create; + for k := 1 to MaxQSO - 1 do + begin + Q := Q0.QSO; + W := WWLog[k]; + i := W.time; + R := EncodeDate(1998,W.month,w.day) + EncodeTime(W.Time div 100,W.Time mod 100, 0, 0); + Q.Time := R; + s := ''; + for i := 1 to 10 do + s := s + W.callsign[i]; + s := TrimRight(s); + Q.Callsign := s; + Q.RSTRcvd := 51 + ord(W.rs); + s := ''; + for i := 1 to 4 do + s := s + W.number[i]; + s := TrimRight(s); + Q.NrRcvd := s; + case W.band of + aa : Q.Band := b19; + bb : Q.band := b35; + cc : Q.band := b7; + dd : Q.band := b14; + ee : Q.band := b21; + ff : Q.band := b28; + end; + case W.Mode of + mmSSB : Q.mode := mSSB; + mmCW : Q.mode := mCW; + mmFM : Q.mode := mFM; + end; + Q.NrSent := '7'; + Q.NewMulti1 := false; + Q.NewMulti2 := false; + { + if W.country <> '' then + begin + Q.NewMulti2 := True; + Q.Multi2 := W.Country; + end; + Q.Points := W.pts; + if W.newmulti then + Q.NewMulti1 := True + else + Q.NewMulti1 := False;} + write(f, Q); + end; + system.close(f); +end; + +end. diff --git a/src/comm32.zip b/src/comm32.zip new file mode 100644 index 00000000..81fec408 Binary files /dev/null and b/src/comm32.zip differ diff --git a/src/consol.zip b/src/consol.zip new file mode 100644 index 00000000..aaf00948 Binary files /dev/null and b/src/consol.zip differ diff --git a/src/console1.zip b/src/console1.zip new file mode 100644 index 00000000..eb06d888 Binary files /dev/null and b/src/console1.zip differ diff --git a/src/console2.pas b/src/console2.pas new file mode 100644 index 00000000..f40eb305 --- /dev/null +++ b/src/console2.pas @@ -0,0 +1,1891 @@ +unit Console2; +{$A+,B-,F-,Q-,R-,S-,W-,X+} + +{ Text Console component + Version 2.0 for 16 bit and 32 bit Delphi. + + Copyright (c) 1995,96 by Danny Thorpe (dthorpe@subliminal.com) + + You are hereby granted a royalty-free unlimited distribution + license to compile the components in this source file into + your applications. + + This source file may be freely distributed through online networks + so long as no modifications are made to this file and no fee is + charged to obtain this file, other than normal online connection + charges. + + These components may NOT be distributed as source code or + compiled DCU on diskette, CDRom, or as part of a + product without prior written consent of the author. + + All rights not explicitly granted here are reserved by the author. +} + +interface + +uses WinTypes, WinProcs, Messages, Classes, Controls, + Forms, Graphics, SysUtils; + + +{ TConsole2 + + TConsole2 implements a WinCRT-like control for routing text + file I/O (readlns and writelns) to a scrollable window. A + text cursor can be positioned using X,Y text coordinates. + TConsole2 is not intended to be a text editor, merely a TTY + text output device. TConsole2 does not store its text + buffers when it is streamed. Max display text in 16 bit + applications is 64k (rows * columns <= 64k); in 32 bit + applications, the only capacity limit is system memory. + You can set the TConsole2 font name, style or other + properties, but only fixed-pitch fonts should be used. + + TConsole2 can be extended to support text color attributes + and multiple fonts, and can support multiple terminal + emulation command decoders (like ANSI-BBS or DEC VT-100). + + TConsole2 supports keyboard input via the Pascal standard + input functions ReadKey, Keypressed, and Readln. Note that + the modal nature of Readln (execution doesn't return until + EOL is received) is problematic. Only one outstanding + Console Readln operation is supported for the entire + application. Calling readln while another readln is + pending (eg Readln on a button click) will raise an + exception. + + TConsole2 provides a performance option called toLazyWrite. + With this option turned off, each write operation to the + Console is immediately displayed on the screen. With + toLazyWrite turned on, screen updating is delayed slightly + so that multiple text changes can be displayed in one Paint + operation. Despite the 'lazy' name, this consolidation + results in dramatically better display performance - a + factor of 10 to 100 times faster than writing each little + piece of text immediately. toLazyWrite is enabled by default. + + The public ScrollTo and TrackCursor methods don't use + toLazyWrite, nor do the ReadKey or ReadBuf routines. When + these routines modify the display or text buffer, the + Console is updated immediately. + + The coFixedPitchOnly option, True by default, determines whether + the console component raises an exception when a font which is not + marked as fixed pitch is assigned to the component. Many off-brand + truetype fonts which have a uniform character width are + incorrectly marked as proportional fonts. By setting + coFixedPitchOnly to false, you can now use those fonts in the + console components. Using proportional fonts in a console + component is not advised; it's very ugly. + +TColorConsole2 + + TColorConsole2 implements support for multiple text color + attributes. The Console's font properties determine the + text color, background color, font, style, etc of the + display text. Text foreground color is Console.Font.Color; + text background is Console.Font.BkColor. Set the Console's + font properties, then writeln to the Console's text file + and that text will be displayed with those attributes. + + In 16 bit applications, TColorConsole2 has the following + capacity limits: Max display text is 32k. (rows * cols <= 32k). + Max unique text attribute sets: 16k. (unique = font+color+bkcolor) + + In 32 bit applications, the only limit is system memory. + Memory consumption is roughly 5 bytes per display text character + cell: an 80 x 25 color console will use 80 x 25 = 2000 bytes + for the text buffer plus 80 x 25 x 4 = 8000 bytes for the + cell attribute buffer. Each unique text attribute set uses + 36 bytes of memory. + + Text attribute sets are maintained in a pool. Each attr set + is released when the last char in the display buffer using + that set is overwritten with different attributes. + + Multiple fonts are supported, but the cell height and width + of the fonts must be the same. That is, you can output text + in Courier New 10pt, Courier New 10pt Bold, and Lucida Sans + Monospace 10pt Italic all on the same screen. If the + Console's font size is changed, that size change is applied + to all fonts used by the Console control and the control is + repainted. + + Fonts of the same height often have different widths. When + a wider font is selected into the Console control, the + character cell dimensions for all the text is enlarged to + accommodate the wider font. Characters of narrower fonts + will be spaced further apart to maintain column alignment. + This rarely looks appealing, so take it easy on the fonts. + TrueType fonts (like Courier New) tend to work better + than bitmap fonts (like Courier). + + +TConsole2's output routines + + Most of the time, you'll use a text file to write data to + the Console window. To make the component intercept all output + written to stdout (ie anything that calls write or writeln + without a file handle), include the coStdOutput flag in the + component's Options property. Only one component in the + application can intercept stdout. coStdOutput is disabled by default. + + For more specialized work, such as extending these objects or + adding terminal emulation processor methods, you can use some + of TConsole2's specialized output routines. + +WriteChar + Calls WriteCodedBuf to output one character using the + current font/color attributes. + +WriteString + Calls WriteCodedBuf to output the characters in the string + using the current font/color attributes. + +WriteCodedBuf + Passes control to the ProcessControlCodes method pointer if + it is assigned. If the pointer is not assigned, WriteBuf is + called instead. WriteCodedBuf is called by the internal text + file device driver (Write and Writeln), WriteChar, and + WriteString. + + Your ProcessControlCodes routine should parse the buffer to + find and execute complex display formatting control codes + and command sequences embedded in the data stream (such + as ANSI terminal codes). + + ProcessControlCodes is an event so that it can be reassigned + dynamically at runtime - for example, to switch from ANSI + emulation to Wyse terminal emulation. Control code + processing methods have full responsibility for displaying + the actual text - they should parse their control codes, + set the cursor position or font/color attributes as + needed, and then call WriteChar, WriteString, or WriteFill + as necessary to display the actual text (without codes). + + If you determine that a text buffer contains no special + codes for your ProcessControlCodes event to handle, you + can pass the text buffer to DefaultProcessControlCodes + to perform the normal WriteBuf text processing on the buffer. + This will save you some work in your event handler. + +WriteFill + Replicates a single character (or space) N times starting + from text coordinate X,Y and flowing down the page. + All the replicated chars are displayed with the currently + selected font and color attributes. The copy count can be + any length up to (rows * cols). TColorConsole2 overrides + this method to add additional color support. + +WriteBuf + This is an internal (protected) mid-level method to process + simple text file formatting codes. It scans the data stream + for special characters (Carriage return, Linefeed, + Backspace, Bell), wraps text at the right margin, and calls + WriteBlock or WriteFill for actual output. + +WriteBlock + This is an internal (protected) low-level method to output + a string of characters. WriteBlock assumes the string + parameter has been stripped of all special characters and + is guaranteed to contain no more than one line of text + (length <= Cols - Cursor.X). All the characters in the + string are displayed with the currently selected font + and color attributes. TColorConsole2 overrides this method + to add additional color support. +} + +const + CM_TrackCursor = wm_User + 100; + CM_ScrollBy = wm_User + 101; + +type + EInvalidFont = class(Exception); + + TCMScrollBy = record + Msg: Cardinal; + dx : Integer; + dy : Longint; + end; + + TConsole2 = class; { forward declaration } + + TFixedFont_ = class(TFont) + private + FBkColor: TColor; + procedure SetBkColor(NewColor: TColor); + public + constructor Create; + procedure Assign(Source: TPersistent); override; + published + property BkColor: TColor read FBkColor write SetBkColor default clWindow; + end; + + TConsole2Option = (coAutoTracking, coCheckEOF, coCheckBreak, + coFulltimeCursor, coLazyWrite, coStdInput, coStdOutput, coFixedPitchOnly); + TConsole2Options = set of TConsole2Option; + + { CR/LF translation. + CRLF = no translation + CR = on CR add LF + LF = on LF add CR } + TConsole2LineBreak = (CRLF, CR, LF); + + TProcessControlCodes = procedure (Sender: TConsole2; + Buffer: PChar; Count: Cardinal) of object; + + TConsole2 = class(TCustomControl) + private + FOptions: TConsole2Options; + FFocused: Boolean; + FFont: TFixedFont_; + FCols: Integer; { Screen buffer dimensions } + FRows: Integer; + FProcessControlCodes: TProcessControlCodes; + FLineBreak: TConsole2LineBreak; { CR/LF/CRLF translation } + procedure InternalClrScr; + procedure SetOptions(NewOptions: TConsole2Options); + procedure SetCols(N: Integer); + procedure SetRows(N: Integer); + procedure SetFont(F: TFixedFont_); + procedure DoScroll(Which, Action, Thumb: Integer); + procedure CMTrackCursor(var M); message CM_TrackCursor; + procedure CMScrollBy(var M: TCMScrollBy); message CM_ScrollBy; + procedure WMCreate(var M); message wm_Create; + procedure WMSize(var M: TWMSize); message wm_Size; + procedure WMHScroll(var M: TWMHScroll); message wm_HScroll; + procedure WMVScroll(var M: TWMVScroll); message wm_VScroll; + procedure WMSetFocus(var M: TWMSetFocus); message wm_SetFocus; + procedure WMKillFocus(var M: TWMKillFocus); message wm_KillFocus; + procedure WMGetDlgCode(var M: TWMGetDlgCode); message wm_GetDlgCode; + procedure WMEraseBkgnd(var M: TWMEraseBkgnd); message wm_EraseBkgnd; + protected + FReading: Boolean; { Reading from CRT window? } + FOldFont: TFixedFont_; + FFirstLine: Integer; { First visible line in circular buffer } + FKeyCount: Integer; { Count of keys in KeyBuffer } + FBuffer: PChar; { Screen buffer pointer } + FRange: TPoint; { Scroll bar ranges } + FOrigin: TPoint; { Client/scroll origin } + FClientSize: TPoint; { Number of visible whole cells } + FCharSize: TPoint; { Character cell size } + FCharAscent: Integer; { Baseline location (for caret) } + FOverhang: Integer; { Extra space needed for chars } + FKeyBuffer: array[0..63] of Char; { Keyboard type-ahead buffer } + Cursor: TPoint; { Cursor location } + procedure CreateParams(var P: TCreateParams); override; + procedure FontChanged(Sender: TObject); + procedure ResizeBuffer; dynamic; + procedure SetName(const NewName: TComponentName); override; + procedure SetMetrics(const Metrics: TTextMetric); virtual; + procedure RecalibrateFont; + procedure RecalcSizeAndRange; + function ScreenPtr(X, Y: Integer): PChar; + procedure ShowText(L, R: Integer); + procedure WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); virtual; + procedure WriteBuf(Buffer: PChar; Count: Cardinal); + procedure SetScrollbars; + procedure Paint; override; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure KeyPress(var Key: Char); override; + procedure DoCtrlBreak; dynamic; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); override; + procedure LazyTrackCursor; + procedure LazyScrollBy(dx, dy: Integer); + procedure Loaded; override; + public + constructor Create(AnOwner: TComponent); override; + destructor Destroy; override; + procedure DefaultProcessControlCodes(Buffer: PChar; Count: Cardinal); + procedure WriteCodedBuf(Buffer: PChar; Count: Cardinal); + procedure WriteChar(Ch: Char); + procedure WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); virtual; + procedure WriteString(const S: String); + function KeyPressed: Boolean; + function ReadKey: Char; + function ReadBuf(Buffer: PChar; Count: Cardinal): Cardinal; + procedure ClrScr; + procedure ClrEol; + procedure CursorTo(X, Y: Integer); + procedure ScrollTo(X, Y: Integer); + procedure TrackCursor; + procedure AssignCrt(var F: Text); dynamic; + procedure ShowCursor; virtual; + procedure HideCursor; + published + property Align; + property ParentColor; + property Color; + property Font: TFixedFont_ read FFont write SetFont; + property Options: TConsole2Options read FOptions write SetOptions + default [coAutoTracking, coCheckBreak, coLazyWrite{, coFixedPitchOnly}]; + property Cols: Integer read FCols write SetCols default 80; + property Rows: Integer read FRows write SetRows default 25; + property LineBreak: TConsole2LineBreak read FLineBreak write FLineBreak; + property ProcessControlCodes: TProcessControlCodes + read FProcessControlCodes write FProcessControlCodes; + end; + + +type + PIntArray = ^TIntArray; + TIntArray = array [0..0] of Integer; + +type + TAttr = class(TFixedFont_) + protected + RefCount: Cardinal; + Overhang: ShortInt; + Underhang: ShortInt; + public + constructor Create(F: TFixedFont_); + end; + + TAttrManager = class(TPersistent) + private + FList: TList; + FCache: TAttr; + FCacheIndex: Integer; + FFreeList: Integer; + function GetCount: Integer; + protected + function GetAttr(Index: Integer): TAttr; + procedure SetAttr(Index: Integer; NewAttr: TAttr); + function InFreeList(P: Pointer): Boolean; + function FirstFreeIndex: Integer; + function NextFreeIndex(P: Pointer): Integer; + procedure SetFree(Index: Integer); + function AllocIndex: Integer; + public + constructor Create; + destructor Destroy; override; + function Allocate(F: TFixedFont_): Integer; + procedure Clear; + procedure Reference(Index: Integer; Delta: Integer); + property Attr[Index: Integer]: TAttr read GetAttr write SetAttr; default; + property Count: Integer read GetCount; + end; + + TColorConsole2 = class(TConsole2) + private + FIndexes: PIntArray; + FAttrList: TAttrManager; + FCellWidths: PIntArray; + procedure FillAttr(X,Y: Integer; Count: Cardinal); + protected + function IndexPtr(X,Y: Integer): PInteger; + procedure ResizeBuffer; override; + procedure SetMetrics(const Metrics: TTextMetric); override; + procedure WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); override; + procedure WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); override; + procedure Paint; override; + public + constructor Create(Owner: TComponent); override; + destructor Destroy; override; + end; + +procedure Register; + +procedure Exchange(var X,Y: Pointer); +procedure FillInt(var Buf; Count: Cardinal; Value: Integer); + +implementation + +{ Scroll key definition record } + +type + TScrollKey = record + sKey: Byte; + Ctrl: Boolean; + SBar: Byte; + Action: Byte; + end; + +var + ReadActive: Boolean = False; { Anybody in a Readln? } + +{ Scroll keys table } + +const + ScrollKeyCount = 12; + ScrollKeys: array[1..ScrollKeyCount] of TScrollKey = ( + (sKey: vk_Left; Ctrl: False; SBar: sb_Horz; Action: sb_LineUp), + (sKey: vk_Right; Ctrl: False; SBar: sb_Horz; Action: sb_LineDown), + (sKey: vk_Left; Ctrl: True; SBar: sb_Horz; Action: sb_PageUp), + (sKey: vk_Right; Ctrl: True; SBar: sb_Horz; Action: sb_PageDown), + (sKey: vk_Home; Ctrl: False; SBar: sb_Horz; Action: sb_Top), + (sKey: vk_End; Ctrl: False; SBar: sb_Horz; Action: sb_Bottom), + (sKey: vk_Up; Ctrl: False; SBar: sb_Vert; Action: sb_LineUp), + (sKey: vk_Down; Ctrl: False; SBar: sb_Vert; Action: sb_LineDown), + (sKey: vk_Prior; Ctrl: False; SBar: sb_Vert; Action: sb_PageUp), + (sKey: vk_Next; Ctrl: False; SBar: sb_Vert; Action: sb_PageDown), + (sKey: vk_Home; Ctrl: True; SBar: sb_Vert; Action: sb_Top), + (sKey: vk_End; Ctrl: True; SBar: sb_Vert; Action: sb_Bottom)); + +{ Return the smaller of two integer values } + +function Min(X, Y: Integer): Integer; +begin + if X < Y then Min := X else Min := Y; +end; + +{ Return the larger of two integer values } + +function Max(X, Y: Integer): Integer; +begin + if X > Y then Max := X else Max := Y; +end; + +procedure Exchange(var X,Y: Pointer); +var + Temp: Pointer; +begin + Temp := X; + X := Y; + Y := Temp; +end; + +procedure FillInt(var Buf; Count: Cardinal; Value: Integer); +{$IFDEF WIN32} +{var + X: Cardinal; +begin + for X := 0 to Count-1 do + TIntArray(Buf)[X] := Value; +end; +}register; +asm + PUSH EDI + MOV EDI, EAX + MOV EAX, ECX + MOV ECX, EDX + CLD + REP STOSD + POP EDI +end; +{$ELSE} +assembler; +asm + PUSH DI + LES DI, BUF + MOV CX, COUNT + MOV AX, VALUE + CLD + REP STOSW + POP DI +end; +{$ENDIF} + +constructor TFixedFont_.Create; +begin + inherited Create; + Name := 'Courier New'; + FBkColor := clWindow; +end; + +procedure TFixedFont_.Assign(Source: TPersistent); +var + Temp: TColor; +begin + Temp := FBkColor; + if Source is TFixedFont_ then + FBkColor := TFixedFont_(Source).BkColor; + try + inherited Assign(Source); { inherited will call Changed } + except + FBkColor := Temp; { Restore original if inherited fails } + raise; + end; +end; + +procedure TFixedFont_.SetBkColor(NewColor: TColor); +begin + FBkColor := NewColor; + Changed; +end; + + +constructor TConsole2.Create(AnOwner: TComponent); +begin + inherited Create(AnOwner); + Width := 160; + Height := 88; + Options := [coAutoTracking, coCheckBreak, coLazyWrite{, coFixedPitchOnly}]; + ControlStyle := ControlStyle + [csOpaque]; + FRows := 25; + FCols := 80; + ParentColor := False; + Color := clWindow; + FOldFont := TFixedFont_.Create; + FOldFont.Handle := GetStockObject(Ansi_Fixed_Font); + FFont := TFixedFont_.Create; + FFont.Name := 'Courier'; + FFont.OnChange := FontChanged; + ResizeBuffer; + TabStop := True; + Enabled := True; +end; + +destructor TConsole2.Destroy; +begin + Options := Options - [coStdInput, coStdOutput]; { close files } + StrDispose(FBuffer); + FOldFont.Free; + FFont.Free; + inherited Destroy; +end; + +procedure TConsole2.Loaded; +begin + inherited Loaded; + ClrScr; +end; + +procedure TConsole2.CreateParams(var P: TCreateParams); +begin + inherited CreateParams(P); + P.WindowClass.Style := P.WindowClass.Style and not (cs_HRedraw or cs_VRedraw); +end; + +procedure TConsole2.DefaultProcessControlCodes(Buffer: PChar; Count: Cardinal); +begin + WriteBuf(Buffer, Count); +end; + +procedure TConsole2.WMCreate(var M); +begin + inherited; + RecalibrateFont; { don't ClrScr, because text may already be in buffer } +end; + +procedure TConsole2.ResizeBuffer; +var Temp: PChar; +begin + Temp := StrAlloc(Cols * Rows); + StrDispose(FBuffer); + FBuffer := Temp; + FillChar(FBuffer^,Cols * Rows,' '); +end; + +procedure TConsole2.SetCols(N: Integer); +begin + if FCols <> N then + begin + FCols := N; + ResizeBuffer; + end; +end; + +procedure TConsole2.SetRows(N: Integer); +begin + if FRows <> N then + begin + FRows := N; + ResizeBuffer; + end; +end; + +procedure TConsole2.SetFont(F: TFixedFont_); +begin + FFont.Assign(F); +end; + +procedure TConsole2.FontChanged(Sender: TObject); +var + DC: HDC; + Save: THandle; + Metrics: TTextMetric; + Temp: String; +begin + if Font.Handle <> FOldFont.Handle then + begin + DC := GetDC(0); + Save := SelectObject(DC, Font.Handle); + GetTextMetrics(DC, Metrics); + SelectObject(DC, Save); + ReleaseDC(0, DC); + if (coFixedPitchOnly in Options) and + not (((Metrics.tmPitchAndFamily and ff_Modern) <> 0) and + ((Metrics.tmPitchAndFamily and $01) = 0)) then + begin + Temp := 'TConsole2: ' + Font.Name + ' is not fixed-pitch'; + Font.Name := FOldFont.Name; { Keep other attributes of font } + raise EInvalidFont.Create(Temp); + end; + SetMetrics(Metrics); + end; + FOldFont.Assign(Font); + if csDesigning in ComponentState then + InternalClrScr; +end; + +{ If the character cell is different, accept changes and redraw } +procedure TConsole2.SetMetrics(const Metrics: TTextMetric); +begin + with Metrics do + begin + FCharSize.X := tmAveCharWidth; + FCharSize.Y := tmHeight + tmExternalLeading; + FCharAscent := tmAscent; + FOverhang := Max(tmOverhang, tmMaxCharWidth - tmAveCharWidth); + Invalidate; + RecalcSizeAndRange; + end; +end; + +procedure TConsole2.RecalcSizeAndRange; +begin + if HandleAllocated then + begin + FClientSize.X := ClientWidth div FCharSize.X; + FClientSize.Y := ClientHeight div FCharSize.Y; + FRange.X := Max(0, Cols - FClientSize.X); + FRange.Y := Max(0, Rows - FClientSize.Y); + ScrollTo(Min(FOrigin.X, FRange.X), Min(FOrigin.Y, FRange.Y)); + SetScrollBars; + end; +end; + +procedure TConsole2.SetName(const NewName: TComponentName); +begin + inherited SetName(NewName); + if csDesigning in ComponentState then + ClrScr; +end; + + +{ Return pointer to text location in screen buffer } +{ Always call ScreenPtr to get the next line you want, since the + circular text buffer may wrap around between lines N and N+1. + For the same reason, do not do pointer arithmetic between rows. } + +function TConsole2.ScreenPtr(X, Y: Integer): PChar; +begin + Inc(Y, FFirstLine); + if Y >= Rows then Dec(Y, Rows); + Result := @FBuffer[Y * Cols + X]; +end; + +{ Update text on cursor line } + +procedure TConsole2.ShowText(L, R: Integer); +var + B: TRect; +begin + if HandleAllocated and (L < R) then + begin + B.Left := (L - FOrigin.X) * FCharSize.X; + B.Top := (Cursor.Y - FOrigin.Y) * FCharSize.Y; + B.Right:= (R - FOrigin.X) * FCharSize.X + FOverhang; + B.Bottom := B.Top + FCharSize.Y; + InvalidateRect(Handle, @B, False); + if not (coLazyWrite in Options) then + Update; + end; +end; + +{ Show caret } + +procedure TConsole2.ShowCursor; +begin + if not HandleAllocated then Exit; + CreateCaret(Handle, 0, FCharSize.X, 2); + SetCaretPos((Cursor.X - FOrigin.X) * FCharSize.X, + (Cursor.Y - FOrigin.Y) * FCharSize.Y + FCharAscent); + ShowCaret(Handle); +end; + +{ Hide caret } + +procedure TConsole2.HideCursor; +begin + DestroyCaret; +end; + +{ Set cursor position } + +procedure TConsole2.CursorTo(X, Y: Integer); +begin + Cursor.X := Max(0, Min(X, Cols - 1)); + Cursor.Y := Max(0, Min(Y, Rows - 1)); + if FFocused and (FReading or (coFullTimeCursor in Options)) then + ShowCursor; +end; + +{ Request asynchronous (lazy) ScrollBy, or update pending request } + +procedure TConsole2.LazyScrollBy(dx, dy: Integer); +var + Msg: TMsg; +begin + if (coLazyWrite in Options) and HandleAllocated then + begin + if PeekMessage(Msg, Handle, cm_ScrollBy, + cm_ScrollBy, PM_NoYield or PM_Remove) then + begin + Inc(dx, Msg.WParam); + Inc(dy, Msg.LParam); + end; { Flush accumulated scroll when delta >= half a screen } + if (Abs(dx) >= Min(FClientSize.X, Cols) div 2) or + (Abs(dy) >= Min(FClientSize.Y, Rows) div 2) then + Perform(CM_ScrollBy, dx, dy) + else + if (dx or dy) <> 0 then + PostMessage(Handle, cm_ScrollBy, dx, dy); + end + else + Perform(CM_ScrollBy, dx, dy); +end; + +{ Respond to asynchronous (lazy) ScrollBy request } + +procedure TConsole2.CMScrollBy(var M: TCMScrollBy); +begin + ScrollTo(FOrigin.X + M.dx, FOrigin.Y + M.dy); +end; + + +{ Scroll window to given origin } +{ If font has overlapping cells (ie, italic), additional work is done to + remove the residual overlapped pixels from the leftmost column. + Using the clip rect with ScrollWindowEx helps eliminate pixel flicker in + the left column. } +procedure TConsole2.ScrollTo(X, Y: Integer); +var + R: TRect; + OldOrigin: TPoint; +begin + X := Max(0, Min(X, FRange.X)); + Y := Max(0, Min(Y, FRange.Y)); + if (X <> FOrigin.X) or (Y <> FOrigin.Y) then + begin + OldOrigin := FOrigin; + FOrigin.X := X; + FOrigin.Y := Y; + if HandleAllocated then + begin + R := ClientRect; + if X > OldOrigin.X then Inc(R.Left, FOverhang); + if Y > OldOrigin.Y then R.Bottom := FClientSize.Y * FCharSize.Y; + ScrollWindowEx(Handle, + (OldOrigin.X - X) * FCharSize.X, + (OldOrigin.Y - Y) * FCharSize.Y, nil, @R, 0, @R, 0); + if Y <> OldOrigin.Y then + begin + SetScrollPos(Handle, sb_Vert, Y, True); + if Y > OldOrigin.Y then + begin + InvalidateRect(Handle, @R, False); + Update; + R.Top := R.Bottom; + R.Bottom := ClientRect.Bottom; + end; + end; + if X <> OldOrigin.X then + begin + SetScrollPos(Handle, sb_Horz, X, True); + if (FOverhang > 0) then + begin + if (X < OldOrigin.X) then { Scroll right - left edge repaint } + begin + { Add overhang to invalidation rect to redraw leftmost char pair } + R.Left := 0; + R.Right := Max(R.Right, (OldOrigin.X - X) * FCharSize.X + FOverhang); + end + else { Scroll left - right edge repaint } + begin + { Redraw leftmost chars to remove prev chars' overhang } + InvalidateRect(Handle, @R, False); + Update; { Update right side, before invalidating left side } + R.Left := 0; + R.Top := 0; + R.Right := FOverhang; + R.Bottom := ClientHeight; + end; + end; + end; + InvalidateRect(Handle, @R, False); + Update; + end; + end; +end; + +{ Request asynchronous (lazy) TrackCursor, if not already pending } + +procedure TConsole2.LazyTrackCursor; +var + Msg: TMsg; +begin + if (coLazyWrite in Options) and HandleAllocated then + begin { Only post msg if there is not one already in the queue } + if not PeekMessage(Msg, Handle, cm_TrackCursor, + cm_TrackCursor, PM_NoYield or PM_NoRemove) then + PostMessage(Handle, cm_TrackCursor, 0, 0); + end + else + TrackCursor; +end; + +{ Respond to asynchronous (lazy) TrackCursor request } + +procedure TConsole2.CMTrackCursor(var M); +begin + TrackCursor; +end; + +{ Scroll to make cursor visible (synchronous - immediate update)} + +procedure TConsole2.TrackCursor; +begin + ScrollTo(Max(Cursor.X - FClientSize.X + 1, Min(FOrigin.X, Cursor.X)), + Max(Cursor.Y - FClientSize.Y + 1, Min(FOrigin.Y, Cursor.Y))); +end; + +{ Update scroll bars } + +procedure TConsole2.SetScrollBars; +begin + if not HandleAllocated then Exit; + //SetScrollRange(Handle, sb_Horz, 0, Max(1, FRange.X), False); + //SetScrollPos(Handle, sb_Horz, FOrigin.X, True); + SetScrollRange(Handle, sb_Vert, 0, Max(1, FRange.Y), False); + SetScrollPos(Handle, sb_Vert, FOrigin.Y, True); +end; + +{ Clear screen } + +procedure TConsole2.InternalClrScr; +begin + WriteFill(0,0,' ',Cols * Rows); + FOrigin.X := 0; + FOrigin.Y := 0; + Cursor.X := 0; + Cursor.Y := 0; + if (csDesigning in ComponentState) then + WriteString(Name); + Invalidate; +end; + +procedure TConsole2.ClrScr; +begin + InternalClrScr; + RecalibrateFont; +end; + +procedure TConsole2.RecalibrateFont; +begin + FCharSize.X := 0; + FCharSize.Y := 0; + FCharAscent := 0; + FOverhang := 0; + FOldFont.Handle := 0; + FOldFont.Size := 0; + FontChanged(FFont); { This will force a repaint and recalibrate } +end; + +{ Clear to end of line } + +procedure TConsole2.ClrEol; +begin + WriteFill(Cursor.X, Cursor.Y, ' ', Cols - Cursor.X); + ShowText(Cursor.X, Cols); +end; + + +procedure TConsole2.WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); +begin + Move(Buffer^, ScreenPtr(X,Y)^, Count); +end; + + +{ Write text buffer to CRT window + - Process any special characters in buffer + - Insert line breaks +} +procedure TConsole2.WriteBuf(Buffer: PChar; Count: Cardinal); +var + L, R: Integer; + + procedure Return; + begin + L := 0; + R := 0; + Cursor.X := 0; + end; + + procedure LineFeed; + var + Rect: TRect; + begin + Inc(Cursor.Y); + if Cursor.Y = Rows then + begin + Dec(Cursor.Y); + Inc(FFirstLine); + if FFirstLine = Rows then FFirstline := 0; + WriteFill(0, Cursor.Y, ' ', Cols); + Dec(FOrigin.Y, 1); + LazyScrollBy(0, 1); + end; + end; + +var + BlockEnd, BlockLen, BlockStart: Integer; + P: PChar; + +begin + L := Cursor.X; + R := Cursor.X; + while Count > 0 do + begin + BlockEnd := Min(Cols - Cursor.X, Count); + P := Buffer; +{$IFDEF WIN32} + BlockStart := BlockEnd; + while (BlockEnd > 0) and (Buffer^ in [#32..#255]) do + begin + Inc(Buffer); + Dec(BlockEnd); + end; + BlockLen := BlockStart - BlockEnd; +{$ELSE} + asm + PUSH DS + PUSH SI + LDS SI, Buffer + MOV CX, BlockEnd + MOV DX, CX + CLD + @@1: + LODSB + CMP AL,' ' + JB @@2 + LOOP @@1 + INC SI + @@2: + DEC SI + MOV Buffer.Word[0],SI + MOV BlockEnd, CX + SUB DX,CX + MOV BlockLen, DX + POP SI + POP DS + end; +{$ENDIF} + if BlockLen > 0 then + begin + Dec(Count, BlockLen); + WriteBlock(Cursor.X, Cursor.Y, P, BlockLen); + Inc(Cursor.X, BlockLen); + if Cursor.X > R then R := Cursor.X; + + if (BlockEnd = 0) and (Cursor.X >= Cols) then + begin + ShowText(L,R); + Return; + LineFeed; + Continue; + end; + end; + + if Count > 0 then + begin + case Buffer^ of + #13: begin + ShowText(L,R); + Return; + if LineBreak = CR then LineFeed; + end; + #10: begin + ShowText(L,R); + if LineBreak = LF then Return; + LineFeed; + end; + #8: if Cursor.X > 0 then + begin + Dec(Cursor.X); + WriteFill(Cursor.X, Cursor.Y, ' ', 1); + if Cursor.X < L then L := Cursor.X; + end; + #7: MessageBeep(0); + end; + Inc(Buffer); + Dec(Count); + end; + end; + ShowText(L, R); + if coAutoTracking in Options then + LazyTrackCursor; + if FFocused and (coFullTimeCursor in Options) then + ShowCursor; +end; + +procedure TConsole2.WriteCodedBuf(Buffer: PChar; Count: Cardinal); +begin + if Assigned(FProcessControlCodes) then + FProcessControlCodes(Self, Buffer, Count) + else + WriteBuf(Buffer, Count); +end; + +{ Write character to CRT window } + +procedure TConsole2.WriteChar(Ch: Char); +begin + WriteCodedBuf(@Ch, 1); +end; + +procedure TConsole2.WriteString(const S: String); +begin + WriteCodedBuf(@S[1], Length(S)); +end; + +procedure TConsole2.WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); +var + I: Integer; +begin + if Count = 0 then Exit; + if (X + Count) > Cols then + begin + FillChar(ScreenPtr(X,Y)^, Cols - X, Ch); + Dec(Count, Cols - X); + I := Cols; + while Count > 0 do + begin + Inc(Y); + FillChar(ScreenPtr(X,Y)^, I, Ch); + Dec(Count, I); + end; + end + else + FillChar(ScreenPtr(X,Y)^, Count, Ch); +end; + +{ Return keyboard status } + +function TConsole2.KeyPressed: Boolean; +begin + Result := FKeyCount > 0; + if (not Result) then + begin + Application.ProcessMessages; + Result := FKeyCount > 0; + end; +end; + +{ Read key from CRT window } + +function TConsole2.ReadKey: Char; +begin + TrackCursor; + if not KeyPressed then + begin + SetFocus; + if FReading or ReadActive then + raise EInvalidOperation.Create('Read already active'); + try + FReading := True; + ReadActive := True; + if FFocused then ShowCursor; + repeat + Application.HandleMessage + until Application.Terminated or (FKeyCount > 0); + if Application.Terminated then + raise Exception.Create('WM_Quit received during ReadKey'); + finally + if FFocused and not (coFullTimeCursor in Options) then + HideCursor; + FReading := False; + ReadActive := False; + end; + end; + ReadKey := FKeyBuffer[0]; + Dec(FKeyCount); + Move(FKeyBuffer[1], FKeyBuffer[0], FKeyCount); +end; + +{ Read text buffer from CRT window } + +function TConsole2.ReadBuf(Buffer: PChar; Count: Cardinal): Cardinal; +var + Ch: Char; + I: Cardinal; +begin + I := 0; + repeat + Ch := ReadKey; + case Ch of + #8: + if I > 0 then + begin + Dec(I); + WriteChar(#8); + end; + #32..#255: + if I < Count - 2 then + begin + Buffer[I] := Ch; + Inc(I); + WriteChar(Ch); + end; + end; + until (Ch in [#0,#13]) or ((coCheckEOF in Options) and (Ch = #26)); + Buffer[I] := Ch; + Inc(I); + if Ch = #13 then + begin + Buffer[I] := #10; + Inc(I); + WriteBuf(#13#10,2); + end; + TrackCursor; + ReadBuf := I; + if FFocused and (coFullTimeCursor in Options) then ShowCursor; +end; + + +{ Text file device driver output function } + +function CrtOutput(var F: TTextRec): Integer; far; +begin + if F.BufPos <> 0 then + with TObject((@F.UserData)^) as TConsole2 do + begin + WriteCodedBuf(PChar(F.BufPtr), F.BufPos); + F.BufPos := 0; + end; + CrtOutput := 0; +end; + +{ Text file device driver input function } + +function CrtInput(var F: TTextRec): Integer; far; +begin + with TObject((@F.UserData)^) as TConsole2 do + F.BufEnd := ReadBuf(PChar(F.BufPtr), F.BufSize); + F.BufPos := 0; + CrtInput := 0; +end; + +{ Text file device driver close function } + +function CrtClose(var F: TTextRec): Integer; far; +begin + CrtClose := 0; +end; + +{ Text file device driver open function } + +function CrtOpen(var F: TTextRec): Integer; far; +begin + if F.Mode = fmInput then + begin + F.InOutFunc := @CrtInput; + F.FlushFunc := nil; + end else + begin + F.Mode := fmOutput; + F.InOutFunc := @CrtOutput; + F.FlushFunc := @CrtOutput; + end; + F.CloseFunc := @CrtClose; + CrtOpen := 0; +end; + +{ Assign text file to CRT device } + +procedure TConsole2.AssignCrt(var F: Text); +begin + with TTextRec(F) do + begin + Handle := Cardinal(-1); + Mode := fmClosed; + BufSize := SizeOf(Buffer); + BufPtr := @Buffer; + OpenFunc := @CrtOpen; + Move(Self, UserData[1],Sizeof(Pointer)); + Name[0] := #0; + end; +end; + +procedure TConsole2.SetOptions(NewOptions: TConsole2Options); +begin + if not (csDesigning in ComponentState) then { don't open files at design time } + begin + if (coStdInput in (NewOptions - Options)) then + with TTextRec(Input) do + begin + if (Mode <> fmClosed) and (Mode <> 0) then + raise Exception.Create('TConsole2.SetOptions: Standard Input is already open'); + AssignCrt(Input); + Reset(Input); + Include(FOptions, coStdInput); { in case opening output fails } + end + else + if (coStdInput in (Options - NewOptions)) then + System.Close(Input); + + if (coStdOutput in (NewOptions - Options)) then + with TTextRec(Output) do + begin + if (Mode <> fmClosed) and (Mode <> 0) then + raise Exception.Create('TConsole2.SetOptions: Standard Output is already open'); + AssignCrt(Output); + Rewrite(Output); + end + else + if (coStdOutput in (Options - NewOptions)) then + System.Close(Output); + end; + FOptions := NewOptions; +end; + + +{ wm_Paint message handler } + +procedure TConsole2.Paint; +var + X1, X2, Y1, Y2, PX, PY: Integer; + R: TRect; +begin + Canvas.Font := Font; + Canvas.Brush.Color := Font.BkColor; + SetViewportOrgEx(Canvas.Handle, -FOrigin.X * FCharSize.X, -FOrigin.Y * FCharSize.Y, nil); + GetClipBox(Canvas.Handle, R); + X1 := Max(FOrigin.X, (R.left - FOverhang) div FCharSize.X); + X2 := Min(Cols, (R.right + FCharSize.X) div FCharSize.X); + Y1 := Max(0, R.top div FCharSize.Y); + Y2 := Min(Rows, (R.bottom + FCharSize.Y - 1) div FCharSize.Y); + PX := X1 * FCharSize.X; + PY := Y1 * FCharSize.Y; + { Draw first line using ETO_Opaque and the entire clipping region. } + ExtTextOut(Canvas.Handle, PX, PY, ETO_Opaque, @R, ScreenPtr(X1, Y1), X2 - X1, nil); + Inc(Y1); + Inc(PY, FCharSize.Y); + while Y1 < Y2 do + begin + { Draw subsequent lines without any background fill or clipping rect } + ExtTextOut(Canvas.Handle, PX, PY, 0, nil, ScreenPtr(X1, Y1), X2 - X1, nil); + Inc(Y1); + Inc(PY, FCharSize.Y); + end; +end; + +procedure TConsole2.WMSize(var M: TWMSize); +var + W,H: Integer; +begin + if FFocused and (FReading or (coFullTimeCursor in Options)) then + HideCursor; + inherited; + RecalcSizeAndRange; + if FFocused and (FReading or (coFullTimeCursor in Options)) then + ShowCursor; +end; + + +procedure TConsole2.DoScroll(Which, Action, Thumb: Integer); +var + X, Y: Integer; + + function GetNewPos(Pos, Page, Range: Integer): Integer; + begin + case Action of + sb_LineUp: GetNewPos := Pos - 1; + sb_LineDown: GetNewPos := Pos + 1; + sb_PageUp: GetNewPos := Pos - Page; + sb_PageDown: GetNewPos := Pos + Page; + sb_Top: GetNewPos := 0; + sb_Bottom: GetNewPos := Range; + sb_ThumbPosition, + sb_ThumbTrack : GetNewPos := Thumb; + else + GetNewPos := Pos; + end; + end; + +begin + X := FOrigin.X; + Y := FOrigin.Y; + case Which of + sb_Horz: X := GetNewPos(X, FClientSize.X div 2, FRange.X); + sb_Vert: Y := GetNewPos(Y, FClientSize.Y, FRange.Y); + end; + ScrollTo(X, Y); +end; + +procedure TConsole2.WMHScroll(var M: TWMHScroll); +begin + DoScroll(sb_Horz, M.ScrollCode, M.Pos); +end; + +procedure TConsole2.WMVScroll(var M: TWMVScroll); +begin + DoScroll(sb_Vert, M.ScrollCode, M.Pos); +end; + +procedure TConsole2.KeyPress(var Key: Char); +begin + inherited KeyPress(Key); + if Key <> #0 then + begin + if (coCheckBreak in Options) and (Key = #3) then + DoCtrlBreak; + if FKeyCount < SizeOf(FKeyBuffer) then + begin + FKeyBuffer[FKeyCount] := Key; + Inc(FKeyCount); + end; + end; +end; + +procedure TConsole2.KeyDown(var Key: Word; Shift: TShiftState); +var + I: Integer; +begin + inherited KeyDown(Key, Shift); + if Key = 0 then Exit; + if (coCheckBreak in Options) and (Key = vk_Cancel) then + DoCtrlBreak; + for I := 1 to ScrollKeyCount do + with ScrollKeys[I] do + if (sKey = Key) and (Ctrl = (Shift = [ssCtrl])) then + begin + DoScroll(SBar, Action, 0); + Exit; + end; +end; + +procedure TConsole2.WMSetFocus(var M: TWMSetFocus); +begin + FFocused := True; + if FReading or (coFullTimeCursor in Options) then + ShowCursor; + inherited; +end; + +procedure TConsole2.WMKillFocus(var M: TWMKillFocus); +begin + inherited; + if FReading or (coFullTimeCursor in Options) then + HideCursor; + FFocused := False; +end; + +procedure TConsole2.WMGetDlgCode(var M: TWMGetDlgCode); +begin + M.Result := dlgc_WantArrows or dlgc_WantChars; +end; + +procedure TConsole2.WMEraseBkgnd(var M: TWMEraseBkgnd); +begin + M.Result := 1; +end; + +procedure TConsole2.DoCtrlBreak; +begin +end; + +procedure TConsole2.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + SetFocus; + inherited MouseDown(Button, Shift, X, Y); +end; + + + +{**************** TAttrManager ****************} + +constructor TAttr.Create(F: TFixedFont_); +var + DC: HDC; + Save: THandle; + TM: TTextMetric; +begin + inherited Create; + Assign(F); + BkColor := F.BkColor; + DC := GetDC(0); + Save := SelectObject(DC, F.Handle); + GetTextMetrics(DC, TM); + SelectObject(DC, Save); + ReleaseDC(0,DC); + Overhang := TM.tmOverhang; + Underhang := MulDiv(TM.tmDescent, TM.tmOverhang, TM.tmAscent); +end; + + +{**************** TAttrManager ****************} + +{ The list of free slots in the TAttrManager's FList is + maintained in the unused pointer slots inside the FList. + FFreeList is the index of the first free slot, or -1 if + there are no free slots. The pointer FList[FFreeList] + contains the negative of the integer index of the next + free slot, and so on. In 16 bit, this code assumes $FFFF + will never appear as a selector. In 32 bit, this code + would assume FList indexes and pointers stored in the + FList are positive (>=0) when evaluated as signed integers. +} + +const + EndOfList = -MaxInt; + +constructor TAttrManager.Create; +begin + inherited Create; + FList := TList.Create; +end; + +destructor TAttrManager.Destroy; +begin + Clear; + FList.Free; + inherited Destroy; +end; + +function TAttrManager.GetCount; +begin + Result := FList.Count; +end; + +function TAttrManager.InFreeList(P: Pointer): Boolean; +begin + Result := (EndOfList <= Longint(P)) and (Longint(P) < 0); +end; + +function TAttrManager.FirstFreeIndex: Integer; +begin + Result := FFreeList; +end; + +function TAttrManager.NextFreeIndex(P: Pointer): Integer; +begin + if (EndOfList < Longint(P)) and (Longint(P) < 0) then + Result := -Longint(P) - 1 + else + Result := -1; +end; + +procedure TAttrManager.SetFree(Index: Integer); +begin + if FFreeList < 0 then + FList[Index] := Pointer(Longint(EndOfList)) + else + FList[Index] := Pointer(Longint(-FFreeList - 1)); + FFreeList := Index; +end; + +function TAttrManager.AllocIndex: Integer; +begin + if FFreeList >= 0 then + begin + Result := FFreeList; + FFreeList := NextFreeIndex(FList[FFreeList]); + end + else + Result := FList.Count; +end; + +function TAttrManager.Allocate(F: TFixedFont_): Integer; +var + P: ^Pointer; + H: THandle; + C,B: TColor; + N: Integer; +begin + Result := FCacheIndex; + with F do + begin + C := Color; + B := BkColor; + H := Handle; + end; + if FCache <> nil then + with FCache do + if (Color = C) and (BkColor = B) and (Handle = H) then + Exit; + + { Search for a match } + Result := FList.Count; + P := Pointer(FList.List); { Use pointer iterator instead of For loop } + while (Result > 0) do + begin + if not InFreeList(P^) then + with TAttr(P^) do + if (Color = C) and (BkColor = B) and (Handle = H) then + begin + FCache := TAttr(P^); + Result := FList.Count - Result; + FCacheIndex := Result; + Exit; + end; + Inc(P); + Dec(Result); + end; + + { No match found, so create a new TAttr in an empty slot } + Result := AllocIndex; + Attr[Result] := TAttr.Create(F); +end; + +procedure TAttrManager.Clear; +var + I: Integer; +begin + for I := 0 to FList.Count - 1 do + if not InFreeList(FList[I]) then + TObject(FList[I]).Free; + FList.Clear; + FCacheIndex := 0; + FCache := nil; + FFreeList := -1; +end; + +procedure TAttrManager.Reference(Index: Integer; Delta: Integer); +begin + with Attr[Index] do + begin + Inc(RefCount, Delta); + if RefCount <= 0 then + Attr[Index] := nil; + end; +end; + +function TAttrManager.GetAttr(Index: Integer): TAttr; +begin + Result := TAttr(FList[Index]); + if InFreeList(Result) then + Result := nil; +end; + +procedure TAttrManager.SetAttr(Index: Integer; NewAttr: TAttr); +var + Temp: TAttr; +begin + if NewAttr = nil then + begin + TObject(FList[Index]).Free; + SetFree(Index); + end + else + if Index = FList.Count then + FList.Expand.Add(NewAttr) + else + FList[Index] := NewAttr; + FCacheIndex := Index; + FCache := NewAttr; +end; + + +{ ************* TColorConsole2 *************** } + +constructor TColorConsole2.Create(Owner: TComponent); +begin + FAttrList := TAttrManager.Create; + inherited Create(Owner); +end; + +destructor TColorConsole2.Destroy; +begin + inherited Destroy; + StrDispose(PChar(FIndexes)); + FAttrList.Free; + StrDispose(PChar(FCellWidths)); +end; + +function TColorConsole2.IndexPtr(X,Y: Integer): PInteger; +begin + Result := @FIndexes^[Longint(ScreenPtr(X,Y)) - Longint(FBuffer)]; +end; + +{ ResizeBuffer + - Called by constructor to init buffers, and called by SetCols/SetRows + when Cols or Rows change. Cols and Rows will be set to their new + values before ResizeBuffer is called. + - StrAlloc will fail (raise xptn) if Cols * Rows is greater than 32k - 2 + - No attempt is made to preserve the contents of the buffers. Resizing + the buffers is equivallent to a ClrScr. +} + +procedure TColorConsole2.ResizeBuffer; +var + I: Integer; + A: Integer; + P: PInteger; + P2: PChar; +begin + inherited ResizeBuffer; + Pointer(P) := nil; + P2 := nil; + try + Pointer(P) := StrAlloc(Longint(Cols) * Rows * Sizeof(Integer)); + P2 := StrAlloc(Cols * SizeOf(Integer)); + Exchange(Pointer(FIndexes), Pointer(P)); + Exchange(Pointer(FCellWidths), Pointer(P2)); + finally + StrDispose(PChar(P)); + StrDispose(P2); + end; + FAttrList.Clear; + A := FAttrList.Allocate(Font); + FillInt(FIndexes^, Cols * Rows, A); + FAttrList.Reference(A, Cols * Rows ); + FillInt(FCellWidths^, Cols, FCharSize.X); +end; + +{ If the character cell is larger, expand settings and redraw } +procedure TColorConsole2.SetMetrics(const Metrics: TTextMetric); +var + Changed: Boolean; + I: Integer; + A: TAttr; + + function Check(A, B: Longint): Longint; + begin + Result := A; + if A < B then + begin + Result := B; + Changed := True; + end; + end; + +begin + { Different fonts of the same point size have slightly different char + cells. Keep the global char cell large enough for all. } + if FOldFont.Size = Font.Size then + with Metrics do + begin + Changed := False; { TT fonts don't report overhang } + FOverhang := Check(FOverhang, Max(tmOverhang, tmMaxCharWidth - tmAveCharWidth)); + FCharSize.X := Check(FCharSize.X, tmAveCharWidth); + FCharSize.Y := Check(FCharSize.Y, tmHeight + tmExternalLeading); + FCharAscent := Check(FCharAscent, tmAscent); + if Changed then + begin + if FCellWidths <> nil then + FillInt(FCellWidths^, Cols, FCharSize.X); + RecalcSizeAndRange; + Invalidate; + end; + end + else + begin { If font size changed, accept new cell verbatim. } + { Update all cached fonts to new size } + for I := 0 to FAttrList.Count - 1 do + begin + A:= FAttrList[I]; + if A <> nil then + A.Size := Font.Size; + end; + if FCellWidths <> nil then + FillInt(FCellWidths^, Cols, Metrics.tmAveCharWidth); + inherited SetMetrics(Metrics); + end; +end; + + +procedure TColorConsole2.WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); +begin + if Count = 0 then Exit; + FillAttr(X,Y,Count); + inherited WriteFill(X,Y,Ch,Count); { write ch to the char buffer } +end; + +procedure TColorConsole2.FillAttr(X,Y: Integer; Count: Cardinal); + + procedure ReplaceAttr(A: Integer; P: PInteger; Count: Cardinal); + var + RunCount: Integer; + RunValue: Integer; + begin + while Count > 0 do + begin +{$IFDEF Win32} + RunValue := P^; + RunCount := 0; + repeat + P^ := A; + Inc(P); + Inc(RunCount); + until (RunCount >= Count) or (P^ <> RunValue); +{$ELSE} + asm + LES DI, P + MOV SI, DI + MOV AX, ES:[DI] + MOV CX, Count + MOV DX, CX + REPE SCASW + JZ @@1 + INC CX + DEC DI + DEC DI + @@1: + SUB DX, CX + MOV RunCount, DX + MOV RunValue, AX + MOV P.Word[0], DI + CMP AX, A { If attrs are same, no need to write over them. } + JE @@2 + MOV DI, SI + MOV CX, DX + MOV AX, A + REP STOSW + @@2: + end; +{$ENDIF} + FAttrList.Reference(RunValue, -RunCount); + Dec(Count, RunCount); + end; + end; + +var + A: Integer; + I: Integer; +begin + A := FAttrList.Allocate(Font); + FAttrList.Reference(A, Count); + if (X + Count) > Cols then + begin + ReplaceAttr(A, IndexPtr(X,Y), Cols - X); + Dec(Count, Cols - X); + I := Cols; + while Count > 0 do + begin + Inc(Y); + ReplaceAttr(A, IndexPtr(X,Y), I); + Dec(Count, I); + end; + end + else + ReplaceAttr(A, IndexPtr(X,Y), Count); +end; + +procedure TColorConsole2.WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); +begin + if Count = 0 then Exit; + FillAttr(X,Y,Count); { fill range with current attr } + inherited WriteBlock(X,Y,Buffer,Count); { copy chars to char buf } +end; + +procedure TColorConsole2.Paint; +var + X1, X2, Y1, Y2, RunValue, RunStart, RunEnd, Len, Count, Prev: Integer; + R: TRect; + P: PInteger; + Buf: PChar; + A: TAttr; + C: TPoint; + DC: HDC; +begin + C := FCharSize; + SetViewportOrgEx(Canvas.Handle, -FOrigin.X * FCharSize.X, -FOrigin.Y * C.Y, nil); + GetClipBox(Canvas.Handle, R); + X1 := Max(FOrigin.X, (R.left - FOverhang) div C.X); + X2 := Min(Cols, (R.right + C.X) div C.X); + Y1 := Max(0, R.top div C.Y); + Y2 := Min(Rows, (R.bottom + C.Y - 1) div C.Y); + if ((Cols * C.X) < R.Right) then + begin + Canvas.Brush := Brush; + Count := R.Left; + R.Left := Cols * C.X; + Canvas.FillRect(R); + R.Right := R.Left; + R.Left := Count; + end; + if (Rows * C.Y) < R.Bottom then + begin + Canvas.Brush := Brush; + R.Top := Rows * C.Y; + Canvas.FillRect(R); + end; + { In this tight display loop, we don't need all the automatic services + provided by TCanvas. To optimize performance, we'll select the text + font and colors into the DC 'manually'. } + DC := Canvas.Handle; + SetBkMode(DC, OPAQUE); + SetTextAlign(DC, TA_BaseLine); + R.Top := Y1 * C.Y; + R.Bottom := R.Top + C.Y; + Prev := -1; + while Y1 < Y2 do + begin + Buf := ScreenPtr(X1,Y1); + P := Pointer(IndexPtr(X1,Y1)); + Count := X2 - X1; + R.Left := X1 * C.X; +{$IFDEF WIN32} + RunEnd := Integer(P) + Count * sizeof(Integer); + while Count > 0 do + begin + RunStart := Integer(P); + RunValue := P^; + while (Integer(P) < RunEnd) and (P^ = RunValue) do + Inc(P); + Len := (Integer(P) - RunStart) div sizeof(Integer); + Dec(Count, Len); +{$ELSE} + RunEnd := X1; + while Count > 0 do + begin + asm + LES DI, P + MOV AX, ES:[DI] { AX := P^ } + MOV CX, Count + MOV BX, CX + REPE SCASW + JZ @@1 + INC CX + DEC DI + DEC DI + @@1: + MOV P.Word[0], DI + MOV RunValue, AX + SUB BX, CX + MOV Count, CX + MOV Len, BX + ADD RunEnd, BX { RunEnd := RunStart + Length } + end; +{$ENDIF} + if RunValue <> Prev then { Only select objects when we have to } + begin { (this helps at line breaks ) } + A := FAttrList[RunValue]; + SelectObject(DC, A.Handle); + SetTextColor(DC, ColorToRGB(A.Color)); + SetBkColor(DC, ColorToRGB(A.BkColor)); + Prev := RunValue; + end; + R.Right := R.Left + Len * C.X; + ExtTextOut(DC, R.Left - A.Underhang, R.Top + FCharAscent, + ETO_Opaque or ETO_Clipped, @R, Buf, Len, Pointer(FCellWidths)); + R.Left := R.Right; + Inc(Buf, Len); + end; + Inc(Y1); + Inc(R.Top, C.Y); + Inc(R.Bottom, C.Y); + end; + { Since we've manipulated the DC directly, and the canvas may think its + current objects are still selected, we should force the canvas to + deselect all GDI objects } + Canvas.Handle := 0; +end; + + +procedure Register; +begin + RegisterComponents('Additional', [TConsole2, TColorConsole2]); + RegisterClasses([TFixedFont_]); +end; + + +end. + + + + diff --git a/src/console2.~pa b/src/console2.~pa new file mode 100644 index 00000000..74d3287d --- /dev/null +++ b/src/console2.~pa @@ -0,0 +1,1891 @@ +unit Console2; +{$A+,B-,F-,Q-,R-,S-,W-,X+} + +{ Text Console component + Version 2.0 for 16 bit and 32 bit Delphi. + + Copyright (c) 1995,96 by Danny Thorpe (dthorpe@subliminal.com) + + You are hereby granted a royalty-free unlimited distribution + license to compile the components in this source file into + your applications. + + This source file may be freely distributed through online networks + so long as no modifications are made to this file and no fee is + charged to obtain this file, other than normal online connection + charges. + + These components may NOT be distributed as source code or + compiled DCU on diskette, CDRom, or as part of a + product without prior written consent of the author. + + All rights not explicitly granted here are reserved by the author. +} + +interface + +uses WinTypes, WinProcs, Messages, Classes, Controls, + Forms, Graphics, SysUtils; + + +{ TConsole2 + + TConsole2 implements a WinCRT-like control for routing text + file I/O (readlns and writelns) to a scrollable window. A + text cursor can be positioned using X,Y text coordinates. + TConsole2 is not intended to be a text editor, merely a TTY + text output device. TConsole2 does not store its text + buffers when it is streamed. Max display text in 16 bit + applications is 64k (rows * columns <= 64k); in 32 bit + applications, the only capacity limit is system memory. + You can set the TConsole2 font name, style or other + properties, but only fixed-pitch fonts should be used. + + TConsole2 can be extended to support text color attributes + and multiple fonts, and can support multiple terminal + emulation command decoders (like ANSI-BBS or DEC VT-100). + + TConsole2 supports keyboard input via the Pascal standard + input functions ReadKey, Keypressed, and Readln. Note that + the modal nature of Readln (execution doesn't return until + EOL is received) is problematic. Only one outstanding + Console Readln operation is supported for the entire + application. Calling readln while another readln is + pending (eg Readln on a button click) will raise an + exception. + + TConsole2 provides a performance option called toLazyWrite. + With this option turned off, each write operation to the + Console is immediately displayed on the screen. With + toLazyWrite turned on, screen updating is delayed slightly + so that multiple text changes can be displayed in one Paint + operation. Despite the 'lazy' name, this consolidation + results in dramatically better display performance - a + factor of 10 to 100 times faster than writing each little + piece of text immediately. toLazyWrite is enabled by default. + + The public ScrollTo and TrackCursor methods don't use + toLazyWrite, nor do the ReadKey or ReadBuf routines. When + these routines modify the display or text buffer, the + Console is updated immediately. + + The coFixedPitchOnly option, True by default, determines whether + the console component raises an exception when a font which is not + marked as fixed pitch is assigned to the component. Many off-brand + truetype fonts which have a uniform character width are + incorrectly marked as proportional fonts. By setting + coFixedPitchOnly to false, you can now use those fonts in the + console components. Using proportional fonts in a console + component is not advised; it's very ugly. + +TColorConsole2 + + TColorConsole2 implements support for multiple text color + attributes. The Console's font properties determine the + text color, background color, font, style, etc of the + display text. Text foreground color is Console.Font.Color; + text background is Console.Font.BkColor. Set the Console's + font properties, then writeln to the Console's text file + and that text will be displayed with those attributes. + + In 16 bit applications, TColorConsole2 has the following + capacity limits: Max display text is 32k. (rows * cols <= 32k). + Max unique text attribute sets: 16k. (unique = font+color+bkcolor) + + In 32 bit applications, the only limit is system memory. + Memory consumption is roughly 5 bytes per display text character + cell: an 80 x 25 color console will use 80 x 25 = 2000 bytes + for the text buffer plus 80 x 25 x 4 = 8000 bytes for the + cell attribute buffer. Each unique text attribute set uses + 36 bytes of memory. + + Text attribute sets are maintained in a pool. Each attr set + is released when the last char in the display buffer using + that set is overwritten with different attributes. + + Multiple fonts are supported, but the cell height and width + of the fonts must be the same. That is, you can output text + in Courier New 10pt, Courier New 10pt Bold, and Lucida Sans + Monospace 10pt Italic all on the same screen. If the + Console's font size is changed, that size change is applied + to all fonts used by the Console control and the control is + repainted. + + Fonts of the same height often have different widths. When + a wider font is selected into the Console control, the + character cell dimensions for all the text is enlarged to + accommodate the wider font. Characters of narrower fonts + will be spaced further apart to maintain column alignment. + This rarely looks appealing, so take it easy on the fonts. + TrueType fonts (like Courier New) tend to work better + than bitmap fonts (like Courier). + + +TConsole2's output routines + + Most of the time, you'll use a text file to write data to + the Console window. To make the component intercept all output + written to stdout (ie anything that calls write or writeln + without a file handle), include the coStdOutput flag in the + component's Options property. Only one component in the + application can intercept stdout. coStdOutput is disabled by default. + + For more specialized work, such as extending these objects or + adding terminal emulation processor methods, you can use some + of TConsole2's specialized output routines. + +WriteChar + Calls WriteCodedBuf to output one character using the + current font/color attributes. + +WriteString + Calls WriteCodedBuf to output the characters in the string + using the current font/color attributes. + +WriteCodedBuf + Passes control to the ProcessControlCodes method pointer if + it is assigned. If the pointer is not assigned, WriteBuf is + called instead. WriteCodedBuf is called by the internal text + file device driver (Write and Writeln), WriteChar, and + WriteString. + + Your ProcessControlCodes routine should parse the buffer to + find and execute complex display formatting control codes + and command sequences embedded in the data stream (such + as ANSI terminal codes). + + ProcessControlCodes is an event so that it can be reassigned + dynamically at runtime - for example, to switch from ANSI + emulation to Wyse terminal emulation. Control code + processing methods have full responsibility for displaying + the actual text - they should parse their control codes, + set the cursor position or font/color attributes as + needed, and then call WriteChar, WriteString, or WriteFill + as necessary to display the actual text (without codes). + + If you determine that a text buffer contains no special + codes for your ProcessControlCodes event to handle, you + can pass the text buffer to DefaultProcessControlCodes + to perform the normal WriteBuf text processing on the buffer. + This will save you some work in your event handler. + +WriteFill + Replicates a single character (or space) N times starting + from text coordinate X,Y and flowing down the page. + All the replicated chars are displayed with the currently + selected font and color attributes. The copy count can be + any length up to (rows * cols). TColorConsole2 overrides + this method to add additional color support. + +WriteBuf + This is an internal (protected) mid-level method to process + simple text file formatting codes. It scans the data stream + for special characters (Carriage return, Linefeed, + Backspace, Bell), wraps text at the right margin, and calls + WriteBlock or WriteFill for actual output. + +WriteBlock + This is an internal (protected) low-level method to output + a string of characters. WriteBlock assumes the string + parameter has been stripped of all special characters and + is guaranteed to contain no more than one line of text + (length <= Cols - Cursor.X). All the characters in the + string are displayed with the currently selected font + and color attributes. TColorConsole2 overrides this method + to add additional color support. +} + +const + CM_TrackCursor = wm_User + 100; + CM_ScrollBy = wm_User + 101; + +type + EInvalidFont = class(Exception); + + TCMScrollBy = record + Msg: Cardinal; + dx : Integer; + dy : Longint; + end; + + TConsole2 = class; { forward declaration } + + TFixedFont = class(TFont) + private + FBkColor: TColor; + procedure SetBkColor(NewColor: TColor); + public + constructor Create; + procedure Assign(Source: TPersistent); override; + published + property BkColor: TColor read FBkColor write SetBkColor default clWindow; + end; + + TConsole2Option = (coAutoTracking, coCheckEOF, coCheckBreak, + coFulltimeCursor, coLazyWrite, coStdInput, coStdOutput, coFixedPitchOnly); + TConsole2Options = set of TConsole2Option; + + { CR/LF translation. + CRLF = no translation + CR = on CR add LF + LF = on LF add CR } + TConsole2LineBreak = (CRLF, CR, LF); + + TProcessControlCodes = procedure (Sender: TConsole2; + Buffer: PChar; Count: Cardinal) of object; + + TConsole2 = class(TCustomControl) + private + FOptions: TConsole2Options; + FFocused: Boolean; + FFont: TFixedFont; + FCols: Integer; { Screen buffer dimensions } + FRows: Integer; + FProcessControlCodes: TProcessControlCodes; + FLineBreak: TConsole2LineBreak; { CR/LF/CRLF translation } + procedure InternalClrScr; + procedure SetOptions(NewOptions: TConsole2Options); + procedure SetCols(N: Integer); + procedure SetRows(N: Integer); + procedure SetFont(F: TFixedFont); + procedure DoScroll(Which, Action, Thumb: Integer); + procedure CMTrackCursor(var M); message CM_TrackCursor; + procedure CMScrollBy(var M: TCMScrollBy); message CM_ScrollBy; + procedure WMCreate(var M); message wm_Create; + procedure WMSize(var M: TWMSize); message wm_Size; + procedure WMHScroll(var M: TWMHScroll); message wm_HScroll; + procedure WMVScroll(var M: TWMVScroll); message wm_VScroll; + procedure WMSetFocus(var M: TWMSetFocus); message wm_SetFocus; + procedure WMKillFocus(var M: TWMKillFocus); message wm_KillFocus; + procedure WMGetDlgCode(var M: TWMGetDlgCode); message wm_GetDlgCode; + procedure WMEraseBkgnd(var M: TWMEraseBkgnd); message wm_EraseBkgnd; + protected + FReading: Boolean; { Reading from CRT window? } + FOldFont: TFixedFont; + FFirstLine: Integer; { First visible line in circular buffer } + FKeyCount: Integer; { Count of keys in KeyBuffer } + FBuffer: PChar; { Screen buffer pointer } + FRange: TPoint; { Scroll bar ranges } + FOrigin: TPoint; { Client/scroll origin } + FClientSize: TPoint; { Number of visible whole cells } + FCharSize: TPoint; { Character cell size } + FCharAscent: Integer; { Baseline location (for caret) } + FOverhang: Integer; { Extra space needed for chars } + FKeyBuffer: array[0..63] of Char; { Keyboard type-ahead buffer } + Cursor: TPoint; { Cursor location } + procedure CreateParams(var P: TCreateParams); override; + procedure FontChanged(Sender: TObject); + procedure ResizeBuffer; dynamic; + procedure SetName(const NewName: TComponentName); override; + procedure SetMetrics(const Metrics: TTextMetric); virtual; + procedure RecalibrateFont; + procedure RecalcSizeAndRange; + function ScreenPtr(X, Y: Integer): PChar; + procedure ShowText(L, R: Integer); + procedure WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); virtual; + procedure WriteBuf(Buffer: PChar; Count: Cardinal); + procedure SetScrollbars; + procedure Paint; override; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure KeyPress(var Key: Char); override; + procedure DoCtrlBreak; dynamic; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); override; + procedure LazyTrackCursor; + procedure LazyScrollBy(dx, dy: Integer); + procedure Loaded; override; + public + constructor Create(AnOwner: TComponent); override; + destructor Destroy; override; + procedure DefaultProcessControlCodes(Buffer: PChar; Count: Cardinal); + procedure WriteCodedBuf(Buffer: PChar; Count: Cardinal); + procedure WriteChar(Ch: Char); + procedure WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); virtual; + procedure WriteString(const S: String); + function KeyPressed: Boolean; + function ReadKey: Char; + function ReadBuf(Buffer: PChar; Count: Cardinal): Cardinal; + procedure ClrScr; + procedure ClrEol; + procedure CursorTo(X, Y: Integer); + procedure ScrollTo(X, Y: Integer); + procedure TrackCursor; + procedure AssignCrt(var F: Text); dynamic; + procedure ShowCursor; virtual; + procedure HideCursor; + published + property Align; + property ParentColor; + property Color; + property Font: TFixedFont read FFont write SetFont; + property Options: TConsole2Options read FOptions write SetOptions + default [coAutoTracking, coCheckBreak, coLazyWrite{, coFixedPitchOnly}]; + property Cols: Integer read FCols write SetCols default 80; + property Rows: Integer read FRows write SetRows default 25; + property LineBreak: TConsole2LineBreak read FLineBreak write FLineBreak; + property ProcessControlCodes: TProcessControlCodes + read FProcessControlCodes write FProcessControlCodes; + end; + + +type + PIntArray = ^TIntArray; + TIntArray = array [0..0] of Integer; + +type + TAttr = class(TFixedFont) + protected + RefCount: Cardinal; + Overhang: ShortInt; + Underhang: ShortInt; + public + constructor Create(F: TFixedFont); + end; + + TAttrManager = class(TPersistent) + private + FList: TList; + FCache: TAttr; + FCacheIndex: Integer; + FFreeList: Integer; + function GetCount: Integer; + protected + function GetAttr(Index: Integer): TAttr; + procedure SetAttr(Index: Integer; NewAttr: TAttr); + function InFreeList(P: Pointer): Boolean; + function FirstFreeIndex: Integer; + function NextFreeIndex(P: Pointer): Integer; + procedure SetFree(Index: Integer); + function AllocIndex: Integer; + public + constructor Create; + destructor Destroy; override; + function Allocate(F: TFixedFont): Integer; + procedure Clear; + procedure Reference(Index: Integer; Delta: Integer); + property Attr[Index: Integer]: TAttr read GetAttr write SetAttr; default; + property Count: Integer read GetCount; + end; + + TColorConsole2 = class(TConsole2) + private + FIndexes: PIntArray; + FAttrList: TAttrManager; + FCellWidths: PIntArray; + procedure FillAttr(X,Y: Integer; Count: Cardinal); + protected + function IndexPtr(X,Y: Integer): PInteger; + procedure ResizeBuffer; override; + procedure SetMetrics(const Metrics: TTextMetric); override; + procedure WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); override; + procedure WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); override; + procedure Paint; override; + public + constructor Create(Owner: TComponent); override; + destructor Destroy; override; + end; + +procedure Register; + +procedure Exchange(var X,Y: Pointer); +procedure FillInt(var Buf; Count: Cardinal; Value: Integer); + +implementation + +{ Scroll key definition record } + +type + TScrollKey = record + sKey: Byte; + Ctrl: Boolean; + SBar: Byte; + Action: Byte; + end; + +const + ReadActive: Boolean = False; { Anybody in a Readln? } + +{ Scroll keys table } + +const + ScrollKeyCount = 12; + ScrollKeys: array[1..ScrollKeyCount] of TScrollKey = ( + (sKey: vk_Left; Ctrl: False; SBar: sb_Horz; Action: sb_LineUp), + (sKey: vk_Right; Ctrl: False; SBar: sb_Horz; Action: sb_LineDown), + (sKey: vk_Left; Ctrl: True; SBar: sb_Horz; Action: sb_PageUp), + (sKey: vk_Right; Ctrl: True; SBar: sb_Horz; Action: sb_PageDown), + (sKey: vk_Home; Ctrl: False; SBar: sb_Horz; Action: sb_Top), + (sKey: vk_End; Ctrl: False; SBar: sb_Horz; Action: sb_Bottom), + (sKey: vk_Up; Ctrl: False; SBar: sb_Vert; Action: sb_LineUp), + (sKey: vk_Down; Ctrl: False; SBar: sb_Vert; Action: sb_LineDown), + (sKey: vk_Prior; Ctrl: False; SBar: sb_Vert; Action: sb_PageUp), + (sKey: vk_Next; Ctrl: False; SBar: sb_Vert; Action: sb_PageDown), + (sKey: vk_Home; Ctrl: True; SBar: sb_Vert; Action: sb_Top), + (sKey: vk_End; Ctrl: True; SBar: sb_Vert; Action: sb_Bottom)); + +{ Return the smaller of two integer values } + +function Min(X, Y: Integer): Integer; +begin + if X < Y then Min := X else Min := Y; +end; + +{ Return the larger of two integer values } + +function Max(X, Y: Integer): Integer; +begin + if X > Y then Max := X else Max := Y; +end; + +procedure Exchange(var X,Y: Pointer); +var + Temp: Pointer; +begin + Temp := X; + X := Y; + Y := Temp; +end; + +procedure FillInt(var Buf; Count: Cardinal; Value: Integer); +{$IFDEF WIN32} +{var + X: Cardinal; +begin + for X := 0 to Count-1 do + TIntArray(Buf)[X] := Value; +end; +}register; +asm + PUSH EDI + MOV EDI, EAX + MOV EAX, ECX + MOV ECX, EDX + CLD + REP STOSD + POP EDI +end; +{$ELSE} +assembler; +asm + PUSH DI + LES DI, BUF + MOV CX, COUNT + MOV AX, VALUE + CLD + REP STOSW + POP DI +end; +{$ENDIF} + +constructor TFixedFont.Create; +begin + inherited Create; + Name := 'Courier New'; + FBkColor := clWindow; +end; + +procedure TFixedFont.Assign(Source: TPersistent); +var + Temp: TColor; +begin + Temp := FBkColor; + if Source is TFixedFont then + FBkColor := TFixedFont(Source).BkColor; + try + inherited Assign(Source); { inherited will call Changed } + except + FBkColor := Temp; { Restore original if inherited fails } + raise; + end; +end; + +procedure TFixedFont.SetBkColor(NewColor: TColor); +begin + FBkColor := NewColor; + Changed; +end; + + +constructor TConsole2.Create(AnOwner: TComponent); +begin + inherited Create(AnOwner); + Width := 160; + Height := 88; + Options := [coAutoTracking, coCheckBreak, coLazyWrite{, coFixedPitchOnly}]; + ControlStyle := ControlStyle + [csOpaque]; + FRows := 25; + FCols := 80; + ParentColor := False; + Color := clWindow; + FOldFont := TFixedFont.Create; + FOldFont.Handle := GetStockObject(Ansi_Fixed_Font); + FFont := TFixedFont.Create; + FFont.Name := 'Courier'; + FFont.OnChange := FontChanged; + ResizeBuffer; + TabStop := True; + Enabled := True; +end; + +destructor TConsole2.Destroy; +begin + Options := Options - [coStdInput, coStdOutput]; { close files } + StrDispose(FBuffer); + FOldFont.Free; + FFont.Free; + inherited Destroy; +end; + +procedure TConsole2.Loaded; +begin + inherited Loaded; + ClrScr; +end; + +procedure TConsole2.CreateParams(var P: TCreateParams); +begin + inherited CreateParams(P); + P.WindowClass.Style := P.WindowClass.Style and not (cs_HRedraw or cs_VRedraw); +end; + +procedure TConsole2.DefaultProcessControlCodes(Buffer: PChar; Count: Cardinal); +begin + WriteBuf(Buffer, Count); +end; + +procedure TConsole2.WMCreate(var M); +begin + inherited; + RecalibrateFont; { don't ClrScr, because text may already be in buffer } +end; + +procedure TConsole2.ResizeBuffer; +var Temp: PChar; +begin + Temp := StrAlloc(Cols * Rows); + StrDispose(FBuffer); + FBuffer := Temp; + FillChar(FBuffer^,Cols * Rows,' '); +end; + +procedure TConsole2.SetCols(N: Integer); +begin + if FCols <> N then + begin + FCols := N; + ResizeBuffer; + end; +end; + +procedure TConsole2.SetRows(N: Integer); +begin + if FRows <> N then + begin + FRows := N; + ResizeBuffer; + end; +end; + +procedure TConsole2.SetFont(F: TFixedFont); +begin + FFont.Assign(F); +end; + +procedure TConsole2.FontChanged(Sender: TObject); +var + DC: HDC; + Save: THandle; + Metrics: TTextMetric; + Temp: String; +begin + if Font.Handle <> FOldFont.Handle then + begin + DC := GetDC(0); + Save := SelectObject(DC, Font.Handle); + GetTextMetrics(DC, Metrics); + SelectObject(DC, Save); + ReleaseDC(0, DC); + if (coFixedPitchOnly in Options) and + not (((Metrics.tmPitchAndFamily and ff_Modern) <> 0) and + ((Metrics.tmPitchAndFamily and $01) = 0)) then + begin + Temp := 'TConsole2: ' + Font.Name + ' is not fixed-pitch'; + Font.Name := FOldFont.Name; { Keep other attributes of font } + raise EInvalidFont.Create(Temp); + end; + SetMetrics(Metrics); + end; + FOldFont.Assign(Font); + if csDesigning in ComponentState then + InternalClrScr; +end; + +{ If the character cell is different, accept changes and redraw } +procedure TConsole2.SetMetrics(const Metrics: TTextMetric); +begin + with Metrics do + begin + FCharSize.X := tmAveCharWidth; + FCharSize.Y := tmHeight + tmExternalLeading; + FCharAscent := tmAscent; + FOverhang := Max(tmOverhang, tmMaxCharWidth - tmAveCharWidth); + Invalidate; + RecalcSizeAndRange; + end; +end; + +procedure TConsole2.RecalcSizeAndRange; +begin + if HandleAllocated then + begin + FClientSize.X := ClientWidth div FCharSize.X; + FClientSize.Y := ClientHeight div FCharSize.Y; + FRange.X := Max(0, Cols - FClientSize.X); + FRange.Y := Max(0, Rows - FClientSize.Y); + ScrollTo(Min(FOrigin.X, FRange.X), Min(FOrigin.Y, FRange.Y)); + SetScrollBars; + end; +end; + +procedure TConsole2.SetName(const NewName: TComponentName); +begin + inherited SetName(NewName); + if csDesigning in ComponentState then + ClrScr; +end; + + +{ Return pointer to text location in screen buffer } +{ Always call ScreenPtr to get the next line you want, since the + circular text buffer may wrap around between lines N and N+1. + For the same reason, do not do pointer arithmetic between rows. } + +function TConsole2.ScreenPtr(X, Y: Integer): PChar; +begin + Inc(Y, FFirstLine); + if Y >= Rows then Dec(Y, Rows); + Result := @FBuffer[Y * Cols + X]; +end; + +{ Update text on cursor line } + +procedure TConsole2.ShowText(L, R: Integer); +var + B: TRect; +begin + if HandleAllocated and (L < R) then + begin + B.Left := (L - FOrigin.X) * FCharSize.X; + B.Top := (Cursor.Y - FOrigin.Y) * FCharSize.Y; + B.Right:= (R - FOrigin.X) * FCharSize.X + FOverhang; + B.Bottom := B.Top + FCharSize.Y; + InvalidateRect(Handle, @B, False); + if not (coLazyWrite in Options) then + Update; + end; +end; + +{ Show caret } + +procedure TConsole2.ShowCursor; +begin + if not HandleAllocated then Exit; + CreateCaret(Handle, 0, FCharSize.X, 2); + SetCaretPos((Cursor.X - FOrigin.X) * FCharSize.X, + (Cursor.Y - FOrigin.Y) * FCharSize.Y + FCharAscent); + ShowCaret(Handle); +end; + +{ Hide caret } + +procedure TConsole2.HideCursor; +begin + DestroyCaret; +end; + +{ Set cursor position } + +procedure TConsole2.CursorTo(X, Y: Integer); +begin + Cursor.X := Max(0, Min(X, Cols - 1)); + Cursor.Y := Max(0, Min(Y, Rows - 1)); + if FFocused and (FReading or (coFullTimeCursor in Options)) then + ShowCursor; +end; + +{ Request asynchronous (lazy) ScrollBy, or update pending request } + +procedure TConsole2.LazyScrollBy(dx, dy: Integer); +var + Msg: TMsg; +begin + if (coLazyWrite in Options) and HandleAllocated then + begin + if PeekMessage(Msg, Handle, cm_ScrollBy, + cm_ScrollBy, PM_NoYield or PM_Remove) then + begin + Inc(dx, Msg.WParam); + Inc(dy, Msg.LParam); + end; { Flush accumulated scroll when delta >= half a screen } + if (Abs(dx) >= Min(FClientSize.X, Cols) div 2) or + (Abs(dy) >= Min(FClientSize.Y, Rows) div 2) then + Perform(CM_ScrollBy, dx, dy) + else + if (dx or dy) <> 0 then + PostMessage(Handle, cm_ScrollBy, dx, dy); + end + else + Perform(CM_ScrollBy, dx, dy); +end; + +{ Respond to asynchronous (lazy) ScrollBy request } + +procedure TConsole2.CMScrollBy(var M: TCMScrollBy); +begin + ScrollTo(FOrigin.X + M.dx, FOrigin.Y + M.dy); +end; + + +{ Scroll window to given origin } +{ If font has overlapping cells (ie, italic), additional work is done to + remove the residual overlapped pixels from the leftmost column. + Using the clip rect with ScrollWindowEx helps eliminate pixel flicker in + the left column. } +procedure TConsole2.ScrollTo(X, Y: Integer); +var + R: TRect; + OldOrigin: TPoint; +begin + X := Max(0, Min(X, FRange.X)); + Y := Max(0, Min(Y, FRange.Y)); + if (X <> FOrigin.X) or (Y <> FOrigin.Y) then + begin + OldOrigin := FOrigin; + FOrigin.X := X; + FOrigin.Y := Y; + if HandleAllocated then + begin + R := ClientRect; + if X > OldOrigin.X then Inc(R.Left, FOverhang); + if Y > OldOrigin.Y then R.Bottom := FClientSize.Y * FCharSize.Y; + ScrollWindowEx(Handle, + (OldOrigin.X - X) * FCharSize.X, + (OldOrigin.Y - Y) * FCharSize.Y, nil, @R, 0, @R, 0); + if Y <> OldOrigin.Y then + begin + SetScrollPos(Handle, sb_Vert, Y, True); + if Y > OldOrigin.Y then + begin + InvalidateRect(Handle, @R, False); + Update; + R.Top := R.Bottom; + R.Bottom := ClientRect.Bottom; + end; + end; + if X <> OldOrigin.X then + begin + SetScrollPos(Handle, sb_Horz, X, True); + if (FOverhang > 0) then + begin + if (X < OldOrigin.X) then { Scroll right - left edge repaint } + begin + { Add overhang to invalidation rect to redraw leftmost char pair } + R.Left := 0; + R.Right := Max(R.Right, (OldOrigin.X - X) * FCharSize.X + FOverhang); + end + else { Scroll left - right edge repaint } + begin + { Redraw leftmost chars to remove prev chars' overhang } + InvalidateRect(Handle, @R, False); + Update; { Update right side, before invalidating left side } + R.Left := 0; + R.Top := 0; + R.Right := FOverhang; + R.Bottom := ClientHeight; + end; + end; + end; + InvalidateRect(Handle, @R, False); + Update; + end; + end; +end; + +{ Request asynchronous (lazy) TrackCursor, if not already pending } + +procedure TConsole2.LazyTrackCursor; +var + Msg: TMsg; +begin + if (coLazyWrite in Options) and HandleAllocated then + begin { Only post msg if there is not one already in the queue } + if not PeekMessage(Msg, Handle, cm_TrackCursor, + cm_TrackCursor, PM_NoYield or PM_NoRemove) then + PostMessage(Handle, cm_TrackCursor, 0, 0); + end + else + TrackCursor; +end; + +{ Respond to asynchronous (lazy) TrackCursor request } + +procedure TConsole2.CMTrackCursor(var M); +begin + TrackCursor; +end; + +{ Scroll to make cursor visible (synchronous - immediate update)} + +procedure TConsole2.TrackCursor; +begin + ScrollTo(Max(Cursor.X - FClientSize.X + 1, Min(FOrigin.X, Cursor.X)), + Max(Cursor.Y - FClientSize.Y + 1, Min(FOrigin.Y, Cursor.Y))); +end; + +{ Update scroll bars } + +procedure TConsole2.SetScrollBars; +begin + if not HandleAllocated then Exit; + SetScrollRange(Handle, sb_Horz, 0, Max(1, FRange.X), False); + SetScrollPos(Handle, sb_Horz, FOrigin.X, True); + SetScrollRange(Handle, sb_Vert, 0, Max(1, FRange.Y), False); + SetScrollPos(Handle, sb_Vert, FOrigin.Y, True); +end; + +{ Clear screen } + +procedure TConsole2.InternalClrScr; +begin + WriteFill(0,0,' ',Cols * Rows); + FOrigin.X := 0; + FOrigin.Y := 0; + Cursor.X := 0; + Cursor.Y := 0; + if (csDesigning in ComponentState) then + WriteString(Name); + Invalidate; +end; + +procedure TConsole2.ClrScr; +begin + InternalClrScr; + RecalibrateFont; +end; + +procedure TConsole2.RecalibrateFont; +begin + FCharSize.X := 0; + FCharSize.Y := 0; + FCharAscent := 0; + FOverhang := 0; + FOldFont.Handle := 0; + FOldFont.Size := 0; + FontChanged(FFont); { This will force a repaint and recalibrate } +end; + +{ Clear to end of line } + +procedure TConsole2.ClrEol; +begin + WriteFill(Cursor.X, Cursor.Y, ' ', Cols - Cursor.X); + ShowText(Cursor.X, Cols); +end; + + +procedure TConsole2.WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); +begin + Move(Buffer^, ScreenPtr(X,Y)^, Count); +end; + + +{ Write text buffer to CRT window + - Process any special characters in buffer + - Insert line breaks +} +procedure TConsole2.WriteBuf(Buffer: PChar; Count: Cardinal); +var + L, R: Integer; + + procedure Return; + begin + L := 0; + R := 0; + Cursor.X := 0; + end; + + procedure LineFeed; + var + Rect: TRect; + begin + Inc(Cursor.Y); + if Cursor.Y = Rows then + begin + Dec(Cursor.Y); + Inc(FFirstLine); + if FFirstLine = Rows then FFirstline := 0; + WriteFill(0, Cursor.Y, ' ', Cols); + Dec(FOrigin.Y, 1); + LazyScrollBy(0, 1); + end; + end; + +var + BlockEnd, BlockLen, BlockStart: Integer; + P: PChar; + +begin + L := Cursor.X; + R := Cursor.X; + while Count > 0 do + begin + BlockEnd := Min(Cols - Cursor.X, Count); + P := Buffer; +{$IFDEF WIN32} + BlockStart := BlockEnd; + while (BlockEnd > 0) and (Buffer^ in [#32..#255]) do + begin + Inc(Buffer); + Dec(BlockEnd); + end; + BlockLen := BlockStart - BlockEnd; +{$ELSE} + asm + PUSH DS + PUSH SI + LDS SI, Buffer + MOV CX, BlockEnd + MOV DX, CX + CLD + @@1: + LODSB + CMP AL,' ' + JB @@2 + LOOP @@1 + INC SI + @@2: + DEC SI + MOV Buffer.Word[0],SI + MOV BlockEnd, CX + SUB DX,CX + MOV BlockLen, DX + POP SI + POP DS + end; +{$ENDIF} + if BlockLen > 0 then + begin + Dec(Count, BlockLen); + WriteBlock(Cursor.X, Cursor.Y, P, BlockLen); + Inc(Cursor.X, BlockLen); + if Cursor.X > R then R := Cursor.X; + + if (BlockEnd = 0) and (Cursor.X >= Cols) then + begin + ShowText(L,R); + Return; + LineFeed; + Continue; + end; + end; + + if Count > 0 then + begin + case Buffer^ of + #13: begin + ShowText(L,R); + Return; + if LineBreak = CR then LineFeed; + end; + #10: begin + ShowText(L,R); + if LineBreak = LF then Return; + LineFeed; + end; + #8: if Cursor.X > 0 then + begin + Dec(Cursor.X); + WriteFill(Cursor.X, Cursor.Y, ' ', 1); + if Cursor.X < L then L := Cursor.X; + end; + #7: MessageBeep(0); + end; + Inc(Buffer); + Dec(Count); + end; + end; + ShowText(L, R); + if coAutoTracking in Options then + LazyTrackCursor; + if FFocused and (coFullTimeCursor in Options) then + ShowCursor; +end; + +procedure TConsole2.WriteCodedBuf(Buffer: PChar; Count: Cardinal); +begin + if Assigned(FProcessControlCodes) then + FProcessControlCodes(Self, Buffer, Count) + else + WriteBuf(Buffer, Count); +end; + +{ Write character to CRT window } + +procedure TConsole2.WriteChar(Ch: Char); +begin + WriteCodedBuf(@Ch, 1); +end; + +procedure TConsole2.WriteString(const S: String); +begin + WriteCodedBuf(@S[1], Length(S)); +end; + +procedure TConsole2.WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); +var + I: Integer; +begin + if Count = 0 then Exit; + if (X + Count) > Cols then + begin + FillChar(ScreenPtr(X,Y)^, Cols - X, Ch); + Dec(Count, Cols - X); + I := Cols; + while Count > 0 do + begin + Inc(Y); + FillChar(ScreenPtr(X,Y)^, I, Ch); + Dec(Count, I); + end; + end + else + FillChar(ScreenPtr(X,Y)^, Count, Ch); +end; + +{ Return keyboard status } + +function TConsole2.KeyPressed: Boolean; +begin + Result := FKeyCount > 0; + if (not Result) then + begin + Application.ProcessMessages; + Result := FKeyCount > 0; + end; +end; + +{ Read key from CRT window } + +function TConsole2.ReadKey: Char; +begin + TrackCursor; + if not KeyPressed then + begin + SetFocus; + if FReading or ReadActive then + raise EInvalidOperation.Create('Read already active'); + try + FReading := True; + ReadActive := True; + if FFocused then ShowCursor; + repeat + Application.HandleMessage + until Application.Terminated or (FKeyCount > 0); + if Application.Terminated then + raise Exception.Create('WM_Quit received during ReadKey'); + finally + if FFocused and not (coFullTimeCursor in Options) then + HideCursor; + FReading := False; + ReadActive := False; + end; + end; + ReadKey := FKeyBuffer[0]; + Dec(FKeyCount); + Move(FKeyBuffer[1], FKeyBuffer[0], FKeyCount); +end; + +{ Read text buffer from CRT window } + +function TConsole2.ReadBuf(Buffer: PChar; Count: Cardinal): Cardinal; +var + Ch: Char; + I: Cardinal; +begin + I := 0; + repeat + Ch := ReadKey; + case Ch of + #8: + if I > 0 then + begin + Dec(I); + WriteChar(#8); + end; + #32..#255: + if I < Count - 2 then + begin + Buffer[I] := Ch; + Inc(I); + WriteChar(Ch); + end; + end; + until (Ch in [#0,#13]) or ((coCheckEOF in Options) and (Ch = #26)); + Buffer[I] := Ch; + Inc(I); + if Ch = #13 then + begin + Buffer[I] := #10; + Inc(I); + WriteBuf(#13#10,2); + end; + TrackCursor; + ReadBuf := I; + if FFocused and (coFullTimeCursor in Options) then ShowCursor; +end; + + +{ Text file device driver output function } + +function CrtOutput(var F: TTextRec): Integer; far; +begin + if F.BufPos <> 0 then + with TObject((@F.UserData)^) as TConsole2 do + begin + WriteCodedBuf(PChar(F.BufPtr), F.BufPos); + F.BufPos := 0; + end; + CrtOutput := 0; +end; + +{ Text file device driver input function } + +function CrtInput(var F: TTextRec): Integer; far; +begin + with TObject((@F.UserData)^) as TConsole2 do + F.BufEnd := ReadBuf(PChar(F.BufPtr), F.BufSize); + F.BufPos := 0; + CrtInput := 0; +end; + +{ Text file device driver close function } + +function CrtClose(var F: TTextRec): Integer; far; +begin + CrtClose := 0; +end; + +{ Text file device driver open function } + +function CrtOpen(var F: TTextRec): Integer; far; +begin + if F.Mode = fmInput then + begin + F.InOutFunc := @CrtInput; + F.FlushFunc := nil; + end else + begin + F.Mode := fmOutput; + F.InOutFunc := @CrtOutput; + F.FlushFunc := @CrtOutput; + end; + F.CloseFunc := @CrtClose; + CrtOpen := 0; +end; + +{ Assign text file to CRT device } + +procedure TConsole2.AssignCrt(var F: Text); +begin + with TTextRec(F) do + begin + Handle := Cardinal(-1); + Mode := fmClosed; + BufSize := SizeOf(Buffer); + BufPtr := @Buffer; + OpenFunc := @CrtOpen; + Move(Self, UserData[1],Sizeof(Pointer)); + Name[0] := #0; + end; +end; + +procedure TConsole2.SetOptions(NewOptions: TConsole2Options); +begin + if not (csDesigning in ComponentState) then { don't open files at design time } + begin + if (coStdInput in (NewOptions - Options)) then + with TTextRec(Input) do + begin + if (Mode <> fmClosed) and (Mode <> 0) then + raise Exception.Create('TConsole2.SetOptions: Standard Input is already open'); + AssignCrt(Input); + Reset(Input); + Include(FOptions, coStdInput); { in case opening output fails } + end + else + if (coStdInput in (Options - NewOptions)) then + System.Close(Input); + + if (coStdOutput in (NewOptions - Options)) then + with TTextRec(Output) do + begin + if (Mode <> fmClosed) and (Mode <> 0) then + raise Exception.Create('TConsole2.SetOptions: Standard Output is already open'); + AssignCrt(Output); + Rewrite(Output); + end + else + if (coStdOutput in (Options - NewOptions)) then + System.Close(Output); + end; + FOptions := NewOptions; +end; + + +{ wm_Paint message handler } + +procedure TConsole2.Paint; +var + X1, X2, Y1, Y2, PX, PY: Integer; + R: TRect; +begin + Canvas.Font := Font; + Canvas.Brush.Color := Font.BkColor; + SetViewportOrgEx(Canvas.Handle, -FOrigin.X * FCharSize.X, -FOrigin.Y * FCharSize.Y, nil); + GetClipBox(Canvas.Handle, R); + X1 := Max(FOrigin.X, (R.left - FOverhang) div FCharSize.X); + X2 := Min(Cols, (R.right + FCharSize.X) div FCharSize.X); + Y1 := Max(0, R.top div FCharSize.Y); + Y2 := Min(Rows, (R.bottom + FCharSize.Y - 1) div FCharSize.Y); + PX := X1 * FCharSize.X; + PY := Y1 * FCharSize.Y; + { Draw first line using ETO_Opaque and the entire clipping region. } + ExtTextOut(Canvas.Handle, PX, PY, ETO_Opaque, @R, ScreenPtr(X1, Y1), X2 - X1, nil); + Inc(Y1); + Inc(PY, FCharSize.Y); + while Y1 < Y2 do + begin + { Draw subsequent lines without any background fill or clipping rect } + ExtTextOut(Canvas.Handle, PX, PY, 0, nil, ScreenPtr(X1, Y1), X2 - X1, nil); + Inc(Y1); + Inc(PY, FCharSize.Y); + end; +end; + +procedure TConsole2.WMSize(var M: TWMSize); +var + W,H: Integer; +begin + if FFocused and (FReading or (coFullTimeCursor in Options)) then + HideCursor; + inherited; + RecalcSizeAndRange; + if FFocused and (FReading or (coFullTimeCursor in Options)) then + ShowCursor; +end; + + +procedure TConsole2.DoScroll(Which, Action, Thumb: Integer); +var + X, Y: Integer; + + function GetNewPos(Pos, Page, Range: Integer): Integer; + begin + case Action of + sb_LineUp: GetNewPos := Pos - 1; + sb_LineDown: GetNewPos := Pos + 1; + sb_PageUp: GetNewPos := Pos - Page; + sb_PageDown: GetNewPos := Pos + Page; + sb_Top: GetNewPos := 0; + sb_Bottom: GetNewPos := Range; + sb_ThumbPosition, + sb_ThumbTrack : GetNewPos := Thumb; + else + GetNewPos := Pos; + end; + end; + +begin + X := FOrigin.X; + Y := FOrigin.Y; + case Which of + sb_Horz: X := GetNewPos(X, FClientSize.X div 2, FRange.X); + sb_Vert: Y := GetNewPos(Y, FClientSize.Y, FRange.Y); + end; + ScrollTo(X, Y); +end; + +procedure TConsole2.WMHScroll(var M: TWMHScroll); +begin + DoScroll(sb_Horz, M.ScrollCode, M.Pos); +end; + +procedure TConsole2.WMVScroll(var M: TWMVScroll); +begin + DoScroll(sb_Vert, M.ScrollCode, M.Pos); +end; + +procedure TConsole2.KeyPress(var Key: Char); +begin + inherited KeyPress(Key); + if Key <> #0 then + begin + if (coCheckBreak in Options) and (Key = #3) then + DoCtrlBreak; + if FKeyCount < SizeOf(FKeyBuffer) then + begin + FKeyBuffer[FKeyCount] := Key; + Inc(FKeyCount); + end; + end; +end; + +procedure TConsole2.KeyDown(var Key: Word; Shift: TShiftState); +var + I: Integer; +begin + inherited KeyDown(Key, Shift); + if Key = 0 then Exit; + if (coCheckBreak in Options) and (Key = vk_Cancel) then + DoCtrlBreak; + for I := 1 to ScrollKeyCount do + with ScrollKeys[I] do + if (sKey = Key) and (Ctrl = (Shift = [ssCtrl])) then + begin + DoScroll(SBar, Action, 0); + Exit; + end; +end; + +procedure TConsole2.WMSetFocus(var M: TWMSetFocus); +begin + FFocused := True; + if FReading or (coFullTimeCursor in Options) then + ShowCursor; + inherited; +end; + +procedure TConsole2.WMKillFocus(var M: TWMKillFocus); +begin + inherited; + if FReading or (coFullTimeCursor in Options) then + HideCursor; + FFocused := False; +end; + +procedure TConsole2.WMGetDlgCode(var M: TWMGetDlgCode); +begin + M.Result := dlgc_WantArrows or dlgc_WantChars; +end; + +procedure TConsole2.WMEraseBkgnd(var M: TWMEraseBkgnd); +begin + M.Result := 1; +end; + +procedure TConsole2.DoCtrlBreak; +begin +end; + +procedure TConsole2.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + SetFocus; + inherited MouseDown(Button, Shift, X, Y); +end; + + + +{**************** TAttrManager ****************} + +constructor TAttr.Create(F: TFixedFont); +var + DC: HDC; + Save: THandle; + TM: TTextMetric; +begin + inherited Create; + Assign(F); + BkColor := F.BkColor; + DC := GetDC(0); + Save := SelectObject(DC, F.Handle); + GetTextMetrics(DC, TM); + SelectObject(DC, Save); + ReleaseDC(0,DC); + Overhang := TM.tmOverhang; + Underhang := MulDiv(TM.tmDescent, TM.tmOverhang, TM.tmAscent); +end; + + +{**************** TAttrManager ****************} + +{ The list of free slots in the TAttrManager's FList is + maintained in the unused pointer slots inside the FList. + FFreeList is the index of the first free slot, or -1 if + there are no free slots. The pointer FList[FFreeList] + contains the negative of the integer index of the next + free slot, and so on. In 16 bit, this code assumes $FFFF + will never appear as a selector. In 32 bit, this code + would assume FList indexes and pointers stored in the + FList are positive (>=0) when evaluated as signed integers. +} + +const + EndOfList = -MaxInt; + +constructor TAttrManager.Create; +begin + inherited Create; + FList := TList.Create; +end; + +destructor TAttrManager.Destroy; +begin + Clear; + FList.Free; + inherited Destroy; +end; + +function TAttrManager.GetCount; +begin + Result := FList.Count; +end; + +function TAttrManager.InFreeList(P: Pointer): Boolean; +begin + Result := (EndOfList <= Longint(P)) and (Longint(P) < 0); +end; + +function TAttrManager.FirstFreeIndex: Integer; +begin + Result := FFreeList; +end; + +function TAttrManager.NextFreeIndex(P: Pointer): Integer; +begin + if (EndOfList < Longint(P)) and (Longint(P) < 0) then + Result := -Longint(P) - 1 + else + Result := -1; +end; + +procedure TAttrManager.SetFree(Index: Integer); +begin + if FFreeList < 0 then + FList[Index] := Pointer(Longint(EndOfList)) + else + FList[Index] := Pointer(Longint(-FFreeList - 1)); + FFreeList := Index; +end; + +function TAttrManager.AllocIndex: Integer; +begin + if FFreeList >= 0 then + begin + Result := FFreeList; + FFreeList := NextFreeIndex(FList[FFreeList]); + end + else + Result := FList.Count; +end; + +function TAttrManager.Allocate(F: TFixedFont): Integer; +var + P: ^Pointer; + H: THandle; + C,B: TColor; + N: Integer; +begin + Result := FCacheIndex; + with F do + begin + C := Color; + B := BkColor; + H := Handle; + end; + if FCache <> nil then + with FCache do + if (Color = C) and (BkColor = B) and (Handle = H) then + Exit; + + { Search for a match } + Result := FList.Count; + P := Pointer(FList.List); { Use pointer iterator instead of For loop } + while (Result > 0) do + begin + if not InFreeList(P^) then + with TAttr(P^) do + if (Color = C) and (BkColor = B) and (Handle = H) then + begin + FCache := TAttr(P^); + Result := FList.Count - Result; + FCacheIndex := Result; + Exit; + end; + Inc(P); + Dec(Result); + end; + + { No match found, so create a new TAttr in an empty slot } + Result := AllocIndex; + Attr[Result] := TAttr.Create(F); +end; + +procedure TAttrManager.Clear; +var + I: Integer; +begin + for I := 0 to FList.Count - 1 do + if not InFreeList(FList[I]) then + TObject(FList[I]).Free; + FList.Clear; + FCacheIndex := 0; + FCache := nil; + FFreeList := -1; +end; + +procedure TAttrManager.Reference(Index: Integer; Delta: Integer); +begin + with Attr[Index] do + begin + Inc(RefCount, Delta); + if RefCount <= 0 then + Attr[Index] := nil; + end; +end; + +function TAttrManager.GetAttr(Index: Integer): TAttr; +begin + Result := TAttr(FList[Index]); + if InFreeList(Result) then + Result := nil; +end; + +procedure TAttrManager.SetAttr(Index: Integer; NewAttr: TAttr); +var + Temp: TAttr; +begin + if NewAttr = nil then + begin + TObject(FList[Index]).Free; + SetFree(Index); + end + else + if Index = FList.Count then + FList.Expand.Add(NewAttr) + else + FList[Index] := NewAttr; + FCacheIndex := Index; + FCache := NewAttr; +end; + + +{ ************* TColorConsole2 *************** } + +constructor TColorConsole2.Create(Owner: TComponent); +begin + FAttrList := TAttrManager.Create; + inherited Create(Owner); +end; + +destructor TColorConsole2.Destroy; +begin + inherited Destroy; + StrDispose(Pointer(FIndexes)); + FAttrList.Free; + StrDispose(Pointer(FCellWidths)); +end; + +function TColorConsole2.IndexPtr(X,Y: Integer): PInteger; +begin + Result := @FIndexes^[Longint(ScreenPtr(X,Y)) - Longint(FBuffer)]; +end; + +{ ResizeBuffer + - Called by constructor to init buffers, and called by SetCols/SetRows + when Cols or Rows change. Cols and Rows will be set to their new + values before ResizeBuffer is called. + - StrAlloc will fail (raise xptn) if Cols * Rows is greater than 32k - 2 + - No attempt is made to preserve the contents of the buffers. Resizing + the buffers is equivallent to a ClrScr. +} + +procedure TColorConsole2.ResizeBuffer; +var + I: Integer; + A: Integer; + P: PInteger; + P2: Pointer; +begin + inherited ResizeBuffer; + Pointer(P) := nil; + P2 := nil; + try + Pointer(P) := StrAlloc(Longint(Cols) * Rows * Sizeof(Integer)); + P2 := StrAlloc(Cols * SizeOf(Integer)); + Exchange(Pointer(FIndexes), Pointer(P)); + Exchange(Pointer(FCellWidths), P2); + finally + StrDispose(Pointer(P)); + StrDispose(P2); + end; + FAttrList.Clear; + A := FAttrList.Allocate(Font); + FillInt(FIndexes^, Cols * Rows, A); + FAttrList.Reference(A, Cols * Rows ); + FillInt(FCellWidths^, Cols, FCharSize.X); +end; + +{ If the character cell is larger, expand settings and redraw } +procedure TColorConsole2.SetMetrics(const Metrics: TTextMetric); +var + Changed: Boolean; + I: Integer; + A: TAttr; + + function Check(A, B: Longint): Longint; + begin + Result := A; + if A < B then + begin + Result := B; + Changed := True; + end; + end; + +begin + { Different fonts of the same point size have slightly different char + cells. Keep the global char cell large enough for all. } + if FOldFont.Size = Font.Size then + with Metrics do + begin + Changed := False; { TT fonts don't report overhang } + FOverhang := Check(FOverhang, Max(tmOverhang, tmMaxCharWidth - tmAveCharWidth)); + FCharSize.X := Check(FCharSize.X, tmAveCharWidth); + FCharSize.Y := Check(FCharSize.Y, tmHeight + tmExternalLeading); + FCharAscent := Check(FCharAscent, tmAscent); + if Changed then + begin + if FCellWidths <> nil then + FillInt(FCellWidths^, Cols, FCharSize.X); + RecalcSizeAndRange; + Invalidate; + end; + end + else + begin { If font size changed, accept new cell verbatim. } + { Update all cached fonts to new size } + for I := 0 to FAttrList.Count - 1 do + begin + A:= FAttrList[I]; + if A <> nil then + A.Size := Font.Size; + end; + if FCellWidths <> nil then + FillInt(FCellWidths^, Cols, Metrics.tmAveCharWidth); + inherited SetMetrics(Metrics); + end; +end; + + +procedure TColorConsole2.WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); +begin + if Count = 0 then Exit; + FillAttr(X,Y,Count); + inherited WriteFill(X,Y,Ch,Count); { write ch to the char buffer } +end; + +procedure TColorConsole2.FillAttr(X,Y: Integer; Count: Cardinal); + + procedure ReplaceAttr(A: Integer; P: PInteger; Count: Cardinal); + var + RunCount: Integer; + RunValue: Integer; + begin + while Count > 0 do + begin +{$IFDEF Win32} + RunValue := P^; + RunCount := 0; + repeat + P^ := A; + Inc(P); + Inc(RunCount); + until (RunCount >= Count) or (P^ <> RunValue); +{$ELSE} + asm + LES DI, P + MOV SI, DI + MOV AX, ES:[DI] + MOV CX, Count + MOV DX, CX + REPE SCASW + JZ @@1 + INC CX + DEC DI + DEC DI + @@1: + SUB DX, CX + MOV RunCount, DX + MOV RunValue, AX + MOV P.Word[0], DI + CMP AX, A { If attrs are same, no need to write over them. } + JE @@2 + MOV DI, SI + MOV CX, DX + MOV AX, A + REP STOSW + @@2: + end; +{$ENDIF} + FAttrList.Reference(RunValue, -RunCount); + Dec(Count, RunCount); + end; + end; + +var + A: Integer; + I: Integer; +begin + A := FAttrList.Allocate(Font); + FAttrList.Reference(A, Count); + if (X + Count) > Cols then + begin + ReplaceAttr(A, IndexPtr(X,Y), Cols - X); + Dec(Count, Cols - X); + I := Cols; + while Count > 0 do + begin + Inc(Y); + ReplaceAttr(A, IndexPtr(X,Y), I); + Dec(Count, I); + end; + end + else + ReplaceAttr(A, IndexPtr(X,Y), Count); +end; + +procedure TColorConsole2.WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); +begin + if Count = 0 then Exit; + FillAttr(X,Y,Count); { fill range with current attr } + inherited WriteBlock(X,Y,Buffer,Count); { copy chars to char buf } +end; + +procedure TColorConsole2.Paint; +var + X1, X2, Y1, Y2, RunValue, RunStart, RunEnd, Len, Count, Prev: Integer; + R: TRect; + P: PInteger; + Buf: PChar; + A: TAttr; + C: TPoint; + DC: HDC; +begin + C := FCharSize; + SetViewportOrgEx(Canvas.Handle, -FOrigin.X * FCharSize.X, -FOrigin.Y * C.Y, nil); + GetClipBox(Canvas.Handle, R); + X1 := Max(FOrigin.X, (R.left - FOverhang) div C.X); + X2 := Min(Cols, (R.right + C.X) div C.X); + Y1 := Max(0, R.top div C.Y); + Y2 := Min(Rows, (R.bottom + C.Y - 1) div C.Y); + if ((Cols * C.X) < R.Right) then + begin + Canvas.Brush := Brush; + Count := R.Left; + R.Left := Cols * C.X; + Canvas.FillRect(R); + R.Right := R.Left; + R.Left := Count; + end; + if (Rows * C.Y) < R.Bottom then + begin + Canvas.Brush := Brush; + R.Top := Rows * C.Y; + Canvas.FillRect(R); + end; + { In this tight display loop, we don't need all the automatic services + provided by TCanvas. To optimize performance, we'll select the text + font and colors into the DC 'manually'. } + DC := Canvas.Handle; + SetBkMode(DC, OPAQUE); + SetTextAlign(DC, TA_BaseLine); + R.Top := Y1 * C.Y; + R.Bottom := R.Top + C.Y; + Prev := -1; + while Y1 < Y2 do + begin + Buf := ScreenPtr(X1,Y1); + P := Pointer(IndexPtr(X1,Y1)); + Count := X2 - X1; + R.Left := X1 * C.X; +{$IFDEF WIN32} + RunEnd := Integer(P) + Count * sizeof(Integer); + while Count > 0 do + begin + RunStart := Integer(P); + RunValue := P^; + while (Integer(P) < RunEnd) and (P^ = RunValue) do + Inc(P); + Len := (Integer(P) - RunStart) div sizeof(Integer); + Dec(Count, Len); +{$ELSE} + RunEnd := X1; + while Count > 0 do + begin + asm + LES DI, P + MOV AX, ES:[DI] { AX := P^ } + MOV CX, Count + MOV BX, CX + REPE SCASW + JZ @@1 + INC CX + DEC DI + DEC DI + @@1: + MOV P.Word[0], DI + MOV RunValue, AX + SUB BX, CX + MOV Count, CX + MOV Len, BX + ADD RunEnd, BX { RunEnd := RunStart + Length } + end; +{$ENDIF} + if RunValue <> Prev then { Only select objects when we have to } + begin { (this helps at line breaks ) } + A := FAttrList[RunValue]; + SelectObject(DC, A.Handle); + SetTextColor(DC, ColorToRGB(A.Color)); + SetBkColor(DC, ColorToRGB(A.BkColor)); + Prev := RunValue; + end; + R.Right := R.Left + Len * C.X; + ExtTextOut(DC, R.Left - A.Underhang, R.Top + FCharAscent, + ETO_Opaque or ETO_Clipped, @R, Buf, Len, Pointer(FCellWidths)); + R.Left := R.Right; + Inc(Buf, Len); + end; + Inc(Y1); + Inc(R.Top, C.Y); + Inc(R.Bottom, C.Y); + end; + { Since we've manipulated the DC directly, and the canvas may think its + current objects are still selected, we should force the canvas to + deselect all GDI objects } + Canvas.Handle := 0; +end; + + +procedure Register; +begin + RegisterComponents('Additional', [TConsole2, TColorConsole2]); + RegisterClasses([TFixedFont]); +end; + + +end. + + + + diff --git a/src/console2.~pas b/src/console2.~pas new file mode 100644 index 00000000..3da82464 --- /dev/null +++ b/src/console2.~pas @@ -0,0 +1,1891 @@ +unit Console2; +{$A+,B-,F-,Q-,R-,S-,W-,X+} + +{ Text Console component + Version 2.0 for 16 bit and 32 bit Delphi. + + Copyright (c) 1995,96 by Danny Thorpe (dthorpe@subliminal.com) + + You are hereby granted a royalty-free unlimited distribution + license to compile the components in this source file into + your applications. + + This source file may be freely distributed through online networks + so long as no modifications are made to this file and no fee is + charged to obtain this file, other than normal online connection + charges. + + These components may NOT be distributed as source code or + compiled DCU on diskette, CDRom, or as part of a + product without prior written consent of the author. + + All rights not explicitly granted here are reserved by the author. +} + +interface + +uses WinTypes, WinProcs, Messages, Classes, Controls, + Forms, Graphics, SysUtils; + + +{ TConsole2 + + TConsole2 implements a WinCRT-like control for routing text + file I/O (readlns and writelns) to a scrollable window. A + text cursor can be positioned using X,Y text coordinates. + TConsole2 is not intended to be a text editor, merely a TTY + text output device. TConsole2 does not store its text + buffers when it is streamed. Max display text in 16 bit + applications is 64k (rows * columns <= 64k); in 32 bit + applications, the only capacity limit is system memory. + You can set the TConsole2 font name, style or other + properties, but only fixed-pitch fonts should be used. + + TConsole2 can be extended to support text color attributes + and multiple fonts, and can support multiple terminal + emulation command decoders (like ANSI-BBS or DEC VT-100). + + TConsole2 supports keyboard input via the Pascal standard + input functions ReadKey, Keypressed, and Readln. Note that + the modal nature of Readln (execution doesn't return until + EOL is received) is problematic. Only one outstanding + Console Readln operation is supported for the entire + application. Calling readln while another readln is + pending (eg Readln on a button click) will raise an + exception. + + TConsole2 provides a performance option called toLazyWrite. + With this option turned off, each write operation to the + Console is immediately displayed on the screen. With + toLazyWrite turned on, screen updating is delayed slightly + so that multiple text changes can be displayed in one Paint + operation. Despite the 'lazy' name, this consolidation + results in dramatically better display performance - a + factor of 10 to 100 times faster than writing each little + piece of text immediately. toLazyWrite is enabled by default. + + The public ScrollTo and TrackCursor methods don't use + toLazyWrite, nor do the ReadKey or ReadBuf routines. When + these routines modify the display or text buffer, the + Console is updated immediately. + + The coFixedPitchOnly option, True by default, determines whether + the console component raises an exception when a font which is not + marked as fixed pitch is assigned to the component. Many off-brand + truetype fonts which have a uniform character width are + incorrectly marked as proportional fonts. By setting + coFixedPitchOnly to false, you can now use those fonts in the + console components. Using proportional fonts in a console + component is not advised; it's very ugly. + +TColorConsole2 + + TColorConsole2 implements support for multiple text color + attributes. The Console's font properties determine the + text color, background color, font, style, etc of the + display text. Text foreground color is Console.Font.Color; + text background is Console.Font.BkColor. Set the Console's + font properties, then writeln to the Console's text file + and that text will be displayed with those attributes. + + In 16 bit applications, TColorConsole2 has the following + capacity limits: Max display text is 32k. (rows * cols <= 32k). + Max unique text attribute sets: 16k. (unique = font+color+bkcolor) + + In 32 bit applications, the only limit is system memory. + Memory consumption is roughly 5 bytes per display text character + cell: an 80 x 25 color console will use 80 x 25 = 2000 bytes + for the text buffer plus 80 x 25 x 4 = 8000 bytes for the + cell attribute buffer. Each unique text attribute set uses + 36 bytes of memory. + + Text attribute sets are maintained in a pool. Each attr set + is released when the last char in the display buffer using + that set is overwritten with different attributes. + + Multiple fonts are supported, but the cell height and width + of the fonts must be the same. That is, you can output text + in Courier New 10pt, Courier New 10pt Bold, and Lucida Sans + Monospace 10pt Italic all on the same screen. If the + Console's font size is changed, that size change is applied + to all fonts used by the Console control and the control is + repainted. + + Fonts of the same height often have different widths. When + a wider font is selected into the Console control, the + character cell dimensions for all the text is enlarged to + accommodate the wider font. Characters of narrower fonts + will be spaced further apart to maintain column alignment. + This rarely looks appealing, so take it easy on the fonts. + TrueType fonts (like Courier New) tend to work better + than bitmap fonts (like Courier). + + +TConsole2's output routines + + Most of the time, you'll use a text file to write data to + the Console window. To make the component intercept all output + written to stdout (ie anything that calls write or writeln + without a file handle), include the coStdOutput flag in the + component's Options property. Only one component in the + application can intercept stdout. coStdOutput is disabled by default. + + For more specialized work, such as extending these objects or + adding terminal emulation processor methods, you can use some + of TConsole2's specialized output routines. + +WriteChar + Calls WriteCodedBuf to output one character using the + current font/color attributes. + +WriteString + Calls WriteCodedBuf to output the characters in the string + using the current font/color attributes. + +WriteCodedBuf + Passes control to the ProcessControlCodes method pointer if + it is assigned. If the pointer is not assigned, WriteBuf is + called instead. WriteCodedBuf is called by the internal text + file device driver (Write and Writeln), WriteChar, and + WriteString. + + Your ProcessControlCodes routine should parse the buffer to + find and execute complex display formatting control codes + and command sequences embedded in the data stream (such + as ANSI terminal codes). + + ProcessControlCodes is an event so that it can be reassigned + dynamically at runtime - for example, to switch from ANSI + emulation to Wyse terminal emulation. Control code + processing methods have full responsibility for displaying + the actual text - they should parse their control codes, + set the cursor position or font/color attributes as + needed, and then call WriteChar, WriteString, or WriteFill + as necessary to display the actual text (without codes). + + If you determine that a text buffer contains no special + codes for your ProcessControlCodes event to handle, you + can pass the text buffer to DefaultProcessControlCodes + to perform the normal WriteBuf text processing on the buffer. + This will save you some work in your event handler. + +WriteFill + Replicates a single character (or space) N times starting + from text coordinate X,Y and flowing down the page. + All the replicated chars are displayed with the currently + selected font and color attributes. The copy count can be + any length up to (rows * cols). TColorConsole2 overrides + this method to add additional color support. + +WriteBuf + This is an internal (protected) mid-level method to process + simple text file formatting codes. It scans the data stream + for special characters (Carriage return, Linefeed, + Backspace, Bell), wraps text at the right margin, and calls + WriteBlock or WriteFill for actual output. + +WriteBlock + This is an internal (protected) low-level method to output + a string of characters. WriteBlock assumes the string + parameter has been stripped of all special characters and + is guaranteed to contain no more than one line of text + (length <= Cols - Cursor.X). All the characters in the + string are displayed with the currently selected font + and color attributes. TColorConsole2 overrides this method + to add additional color support. +} + +const + CM_TrackCursor = wm_User + 100; + CM_ScrollBy = wm_User + 101; + +type + EInvalidFont = class(Exception); + + TCMScrollBy = record + Msg: Cardinal; + dx : Integer; + dy : Longint; + end; + + TConsole2 = class; { forward declaration } + + TFixedFont = class(TFont) + private + FBkColor: TColor; + procedure SetBkColor(NewColor: TColor); + public + constructor Create; + procedure Assign(Source: TPersistent); override; + published + property BkColor: TColor read FBkColor write SetBkColor default clWindow; + end; + + TConsole2Option = (coAutoTracking, coCheckEOF, coCheckBreak, + coFulltimeCursor, coLazyWrite, coStdInput, coStdOutput, coFixedPitchOnly); + TConsole2Options = set of TConsole2Option; + + { CR/LF translation. + CRLF = no translation + CR = on CR add LF + LF = on LF add CR } + TConsole2LineBreak = (CRLF, CR, LF); + + TProcessControlCodes = procedure (Sender: TConsole2; + Buffer: PChar; Count: Cardinal) of object; + + TConsole2 = class(TCustomControl) + private + FOptions: TConsole2Options; + FFocused: Boolean; + FFont: TFixedFont; + FCols: Integer; { Screen buffer dimensions } + FRows: Integer; + FProcessControlCodes: TProcessControlCodes; + FLineBreak: TConsole2LineBreak; { CR/LF/CRLF translation } + procedure InternalClrScr; + procedure SetOptions(NewOptions: TConsole2Options); + procedure SetCols(N: Integer); + procedure SetRows(N: Integer); + procedure SetFont(F: TFixedFont); + procedure DoScroll(Which, Action, Thumb: Integer); + procedure CMTrackCursor(var M); message CM_TrackCursor; + procedure CMScrollBy(var M: TCMScrollBy); message CM_ScrollBy; + procedure WMCreate(var M); message wm_Create; + procedure WMSize(var M: TWMSize); message wm_Size; + procedure WMHScroll(var M: TWMHScroll); message wm_HScroll; + procedure WMVScroll(var M: TWMVScroll); message wm_VScroll; + procedure WMSetFocus(var M: TWMSetFocus); message wm_SetFocus; + procedure WMKillFocus(var M: TWMKillFocus); message wm_KillFocus; + procedure WMGetDlgCode(var M: TWMGetDlgCode); message wm_GetDlgCode; + procedure WMEraseBkgnd(var M: TWMEraseBkgnd); message wm_EraseBkgnd; + protected + FReading: Boolean; { Reading from CRT window? } + FOldFont: TFixedFont; + FFirstLine: Integer; { First visible line in circular buffer } + FKeyCount: Integer; { Count of keys in KeyBuffer } + FBuffer: PChar; { Screen buffer pointer } + FRange: TPoint; { Scroll bar ranges } + FOrigin: TPoint; { Client/scroll origin } + FClientSize: TPoint; { Number of visible whole cells } + FCharSize: TPoint; { Character cell size } + FCharAscent: Integer; { Baseline location (for caret) } + FOverhang: Integer; { Extra space needed for chars } + FKeyBuffer: array[0..63] of Char; { Keyboard type-ahead buffer } + Cursor: TPoint; { Cursor location } + procedure CreateParams(var P: TCreateParams); override; + procedure FontChanged(Sender: TObject); + procedure ResizeBuffer; dynamic; + procedure SetName(const NewName: TComponentName); override; + procedure SetMetrics(const Metrics: TTextMetric); virtual; + procedure RecalibrateFont; + procedure RecalcSizeAndRange; + function ScreenPtr(X, Y: Integer): PChar; + procedure ShowText(L, R: Integer); + procedure WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); virtual; + procedure WriteBuf(Buffer: PChar; Count: Cardinal); + procedure SetScrollbars; + procedure Paint; override; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure KeyPress(var Key: Char); override; + procedure DoCtrlBreak; dynamic; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); override; + procedure LazyTrackCursor; + procedure LazyScrollBy(dx, dy: Integer); + procedure Loaded; override; + public + constructor Create(AnOwner: TComponent); override; + destructor Destroy; override; + procedure DefaultProcessControlCodes(Buffer: PChar; Count: Cardinal); + procedure WriteCodedBuf(Buffer: PChar; Count: Cardinal); + procedure WriteChar(Ch: Char); + procedure WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); virtual; + procedure WriteString(const S: String); + function KeyPressed: Boolean; + function ReadKey: Char; + function ReadBuf(Buffer: PChar; Count: Cardinal): Cardinal; + procedure ClrScr; + procedure ClrEol; + procedure CursorTo(X, Y: Integer); + procedure ScrollTo(X, Y: Integer); + procedure TrackCursor; + procedure AssignCrt(var F: Text); dynamic; + procedure ShowCursor; virtual; + procedure HideCursor; + published + property Align; + property ParentColor; + property Color; + property Font: TFixedFont read FFont write SetFont; + property Options: TConsole2Options read FOptions write SetOptions + default [coAutoTracking, coCheckBreak, coLazyWrite{, coFixedPitchOnly}]; + property Cols: Integer read FCols write SetCols default 80; + property Rows: Integer read FRows write SetRows default 25; + property LineBreak: TConsole2LineBreak read FLineBreak write FLineBreak; + property ProcessControlCodes: TProcessControlCodes + read FProcessControlCodes write FProcessControlCodes; + end; + + +type + PIntArray = ^TIntArray; + TIntArray = array [0..0] of Integer; + +type + TAttr = class(TFixedFont) + protected + RefCount: Cardinal; + Overhang: ShortInt; + Underhang: ShortInt; + public + constructor Create(F: TFixedFont); + end; + + TAttrManager = class(TPersistent) + private + FList: TList; + FCache: TAttr; + FCacheIndex: Integer; + FFreeList: Integer; + function GetCount: Integer; + protected + function GetAttr(Index: Integer): TAttr; + procedure SetAttr(Index: Integer; NewAttr: TAttr); + function InFreeList(P: Pointer): Boolean; + function FirstFreeIndex: Integer; + function NextFreeIndex(P: Pointer): Integer; + procedure SetFree(Index: Integer); + function AllocIndex: Integer; + public + constructor Create; + destructor Destroy; override; + function Allocate(F: TFixedFont): Integer; + procedure Clear; + procedure Reference(Index: Integer; Delta: Integer); + property Attr[Index: Integer]: TAttr read GetAttr write SetAttr; default; + property Count: Integer read GetCount; + end; + + TColorConsole2 = class(TConsole2) + private + FIndexes: PIntArray; + FAttrList: TAttrManager; + FCellWidths: PIntArray; + procedure FillAttr(X,Y: Integer; Count: Cardinal); + protected + function IndexPtr(X,Y: Integer): PInteger; + procedure ResizeBuffer; override; + procedure SetMetrics(const Metrics: TTextMetric); override; + procedure WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); override; + procedure WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); override; + procedure Paint; override; + public + constructor Create(Owner: TComponent); override; + destructor Destroy; override; + end; + +procedure Register; + +procedure Exchange(var X,Y: Pointer); +procedure FillInt(var Buf; Count: Cardinal; Value: Integer); + +implementation + +{ Scroll key definition record } + +type + TScrollKey = record + sKey: Byte; + Ctrl: Boolean; + SBar: Byte; + Action: Byte; + end; + +const + ReadActive: Boolean = False; { Anybody in a Readln? } + +{ Scroll keys table } + +const + ScrollKeyCount = 12; + ScrollKeys: array[1..ScrollKeyCount] of TScrollKey = ( + (sKey: vk_Left; Ctrl: False; SBar: sb_Horz; Action: sb_LineUp), + (sKey: vk_Right; Ctrl: False; SBar: sb_Horz; Action: sb_LineDown), + (sKey: vk_Left; Ctrl: True; SBar: sb_Horz; Action: sb_PageUp), + (sKey: vk_Right; Ctrl: True; SBar: sb_Horz; Action: sb_PageDown), + (sKey: vk_Home; Ctrl: False; SBar: sb_Horz; Action: sb_Top), + (sKey: vk_End; Ctrl: False; SBar: sb_Horz; Action: sb_Bottom), + (sKey: vk_Up; Ctrl: False; SBar: sb_Vert; Action: sb_LineUp), + (sKey: vk_Down; Ctrl: False; SBar: sb_Vert; Action: sb_LineDown), + (sKey: vk_Prior; Ctrl: False; SBar: sb_Vert; Action: sb_PageUp), + (sKey: vk_Next; Ctrl: False; SBar: sb_Vert; Action: sb_PageDown), + (sKey: vk_Home; Ctrl: True; SBar: sb_Vert; Action: sb_Top), + (sKey: vk_End; Ctrl: True; SBar: sb_Vert; Action: sb_Bottom)); + +{ Return the smaller of two integer values } + +function Min(X, Y: Integer): Integer; +begin + if X < Y then Min := X else Min := Y; +end; + +{ Return the larger of two integer values } + +function Max(X, Y: Integer): Integer; +begin + if X > Y then Max := X else Max := Y; +end; + +procedure Exchange(var X,Y: Pointer); +var + Temp: Pointer; +begin + Temp := X; + X := Y; + Y := Temp; +end; + +procedure FillInt(var Buf; Count: Cardinal; Value: Integer); +{$IFDEF WIN32} +{var + X: Cardinal; +begin + for X := 0 to Count-1 do + TIntArray(Buf)[X] := Value; +end; +}register; +asm + PUSH EDI + MOV EDI, EAX + MOV EAX, ECX + MOV ECX, EDX + CLD + REP STOSD + POP EDI +end; +{$ELSE} +assembler; +asm + PUSH DI + LES DI, BUF + MOV CX, COUNT + MOV AX, VALUE + CLD + REP STOSW + POP DI +end; +{$ENDIF} + +constructor TFixedFont.Create; +begin + inherited Create; + Name := 'Courier New'; + FBkColor := clWindow; +end; + +procedure TFixedFont.Assign(Source: TPersistent); +var + Temp: TColor; +begin + Temp := FBkColor; + if Source is TFixedFont then + FBkColor := TFixedFont(Source).BkColor; + try + inherited Assign(Source); { inherited will call Changed } + except + FBkColor := Temp; { Restore original if inherited fails } + raise; + end; +end; + +procedure TFixedFont.SetBkColor(NewColor: TColor); +begin + FBkColor := NewColor; + Changed; +end; + + +constructor TConsole2.Create(AnOwner: TComponent); +begin + inherited Create(AnOwner); + Width := 160; + Height := 88; + Options := [coAutoTracking, coCheckBreak, coLazyWrite{, coFixedPitchOnly}]; + ControlStyle := ControlStyle + [csOpaque]; + FRows := 25; + FCols := 80; + ParentColor := False; + Color := clWindow; + FOldFont := TFixedFont.Create; + FOldFont.Handle := GetStockObject(Ansi_Fixed_Font); + FFont := TFixedFont.Create; + FFont.Name := 'Courier'; + FFont.OnChange := FontChanged; + ResizeBuffer; + TabStop := True; + Enabled := True; +end; + +destructor TConsole2.Destroy; +begin + Options := Options - [coStdInput, coStdOutput]; { close files } + StrDispose(FBuffer); + FOldFont.Free; + FFont.Free; + inherited Destroy; +end; + +procedure TConsole2.Loaded; +begin + inherited Loaded; + ClrScr; +end; + +procedure TConsole2.CreateParams(var P: TCreateParams); +begin + inherited CreateParams(P); + P.WindowClass.Style := P.WindowClass.Style and not (cs_HRedraw or cs_VRedraw); +end; + +procedure TConsole2.DefaultProcessControlCodes(Buffer: PChar; Count: Cardinal); +begin + WriteBuf(Buffer, Count); +end; + +procedure TConsole2.WMCreate(var M); +begin + inherited; + RecalibrateFont; { don't ClrScr, because text may already be in buffer } +end; + +procedure TConsole2.ResizeBuffer; +var Temp: PChar; +begin + Temp := StrAlloc(Cols * Rows); + StrDispose(FBuffer); + FBuffer := Temp; + FillChar(FBuffer^,Cols * Rows,' '); +end; + +procedure TConsole2.SetCols(N: Integer); +begin + if FCols <> N then + begin + FCols := N; + ResizeBuffer; + end; +end; + +procedure TConsole2.SetRows(N: Integer); +begin + if FRows <> N then + begin + FRows := N; + ResizeBuffer; + end; +end; + +procedure TConsole2.SetFont(F: TFixedFont); +begin + FFont.Assign(F); +end; + +procedure TConsole2.FontChanged(Sender: TObject); +var + DC: HDC; + Save: THandle; + Metrics: TTextMetric; + Temp: String; +begin + if Font.Handle <> FOldFont.Handle then + begin + DC := GetDC(0); + Save := SelectObject(DC, Font.Handle); + GetTextMetrics(DC, Metrics); + SelectObject(DC, Save); + ReleaseDC(0, DC); + if (coFixedPitchOnly in Options) and + not (((Metrics.tmPitchAndFamily and ff_Modern) <> 0) and + ((Metrics.tmPitchAndFamily and $01) = 0)) then + begin + Temp := 'TConsole2: ' + Font.Name + ' is not fixed-pitch'; + Font.Name := FOldFont.Name; { Keep other attributes of font } + raise EInvalidFont.Create(Temp); + end; + SetMetrics(Metrics); + end; + FOldFont.Assign(Font); + if csDesigning in ComponentState then + InternalClrScr; +end; + +{ If the character cell is different, accept changes and redraw } +procedure TConsole2.SetMetrics(const Metrics: TTextMetric); +begin + with Metrics do + begin + FCharSize.X := tmAveCharWidth; + FCharSize.Y := tmHeight + tmExternalLeading; + FCharAscent := tmAscent; + FOverhang := Max(tmOverhang, tmMaxCharWidth - tmAveCharWidth); + Invalidate; + RecalcSizeAndRange; + end; +end; + +procedure TConsole2.RecalcSizeAndRange; +begin + if HandleAllocated then + begin + FClientSize.X := ClientWidth div FCharSize.X; + FClientSize.Y := ClientHeight div FCharSize.Y; + FRange.X := Max(0, Cols - FClientSize.X); + FRange.Y := Max(0, Rows - FClientSize.Y); + ScrollTo(Min(FOrigin.X, FRange.X), Min(FOrigin.Y, FRange.Y)); + SetScrollBars; + end; +end; + +procedure TConsole2.SetName(const NewName: TComponentName); +begin + inherited SetName(NewName); + if csDesigning in ComponentState then + ClrScr; +end; + + +{ Return pointer to text location in screen buffer } +{ Always call ScreenPtr to get the next line you want, since the + circular text buffer may wrap around between lines N and N+1. + For the same reason, do not do pointer arithmetic between rows. } + +function TConsole2.ScreenPtr(X, Y: Integer): PChar; +begin + Inc(Y, FFirstLine); + if Y >= Rows then Dec(Y, Rows); + Result := @FBuffer[Y * Cols + X]; +end; + +{ Update text on cursor line } + +procedure TConsole2.ShowText(L, R: Integer); +var + B: TRect; +begin + if HandleAllocated and (L < R) then + begin + B.Left := (L - FOrigin.X) * FCharSize.X; + B.Top := (Cursor.Y - FOrigin.Y) * FCharSize.Y; + B.Right:= (R - FOrigin.X) * FCharSize.X + FOverhang; + B.Bottom := B.Top + FCharSize.Y; + InvalidateRect(Handle, @B, False); + if not (coLazyWrite in Options) then + Update; + end; +end; + +{ Show caret } + +procedure TConsole2.ShowCursor; +begin + if not HandleAllocated then Exit; + CreateCaret(Handle, 0, FCharSize.X, 2); + SetCaretPos((Cursor.X - FOrigin.X) * FCharSize.X, + (Cursor.Y - FOrigin.Y) * FCharSize.Y + FCharAscent); + ShowCaret(Handle); +end; + +{ Hide caret } + +procedure TConsole2.HideCursor; +begin + DestroyCaret; +end; + +{ Set cursor position } + +procedure TConsole2.CursorTo(X, Y: Integer); +begin + Cursor.X := Max(0, Min(X, Cols - 1)); + Cursor.Y := Max(0, Min(Y, Rows - 1)); + if FFocused and (FReading or (coFullTimeCursor in Options)) then + ShowCursor; +end; + +{ Request asynchronous (lazy) ScrollBy, or update pending request } + +procedure TConsole2.LazyScrollBy(dx, dy: Integer); +var + Msg: TMsg; +begin + if (coLazyWrite in Options) and HandleAllocated then + begin + if PeekMessage(Msg, Handle, cm_ScrollBy, + cm_ScrollBy, PM_NoYield or PM_Remove) then + begin + Inc(dx, Msg.WParam); + Inc(dy, Msg.LParam); + end; { Flush accumulated scroll when delta >= half a screen } + if (Abs(dx) >= Min(FClientSize.X, Cols) div 2) or + (Abs(dy) >= Min(FClientSize.Y, Rows) div 2) then + Perform(CM_ScrollBy, dx, dy) + else + if (dx or dy) <> 0 then + PostMessage(Handle, cm_ScrollBy, dx, dy); + end + else + Perform(CM_ScrollBy, dx, dy); +end; + +{ Respond to asynchronous (lazy) ScrollBy request } + +procedure TConsole2.CMScrollBy(var M: TCMScrollBy); +begin + ScrollTo(FOrigin.X + M.dx, FOrigin.Y + M.dy); +end; + + +{ Scroll window to given origin } +{ If font has overlapping cells (ie, italic), additional work is done to + remove the residual overlapped pixels from the leftmost column. + Using the clip rect with ScrollWindowEx helps eliminate pixel flicker in + the left column. } +procedure TConsole2.ScrollTo(X, Y: Integer); +var + R: TRect; + OldOrigin: TPoint; +begin + X := Max(0, Min(X, FRange.X)); + Y := Max(0, Min(Y, FRange.Y)); + if (X <> FOrigin.X) or (Y <> FOrigin.Y) then + begin + OldOrigin := FOrigin; + FOrigin.X := X; + FOrigin.Y := Y; + if HandleAllocated then + begin + R := ClientRect; + if X > OldOrigin.X then Inc(R.Left, FOverhang); + if Y > OldOrigin.Y then R.Bottom := FClientSize.Y * FCharSize.Y; + ScrollWindowEx(Handle, + (OldOrigin.X - X) * FCharSize.X, + (OldOrigin.Y - Y) * FCharSize.Y, nil, @R, 0, @R, 0); + if Y <> OldOrigin.Y then + begin + SetScrollPos(Handle, sb_Vert, Y, True); + if Y > OldOrigin.Y then + begin + InvalidateRect(Handle, @R, False); + Update; + R.Top := R.Bottom; + R.Bottom := ClientRect.Bottom; + end; + end; + if X <> OldOrigin.X then + begin + SetScrollPos(Handle, sb_Horz, X, True); + if (FOverhang > 0) then + begin + if (X < OldOrigin.X) then { Scroll right - left edge repaint } + begin + { Add overhang to invalidation rect to redraw leftmost char pair } + R.Left := 0; + R.Right := Max(R.Right, (OldOrigin.X - X) * FCharSize.X + FOverhang); + end + else { Scroll left - right edge repaint } + begin + { Redraw leftmost chars to remove prev chars' overhang } + InvalidateRect(Handle, @R, False); + Update; { Update right side, before invalidating left side } + R.Left := 0; + R.Top := 0; + R.Right := FOverhang; + R.Bottom := ClientHeight; + end; + end; + end; + InvalidateRect(Handle, @R, False); + Update; + end; + end; +end; + +{ Request asynchronous (lazy) TrackCursor, if not already pending } + +procedure TConsole2.LazyTrackCursor; +var + Msg: TMsg; +begin + if (coLazyWrite in Options) and HandleAllocated then + begin { Only post msg if there is not one already in the queue } + if not PeekMessage(Msg, Handle, cm_TrackCursor, + cm_TrackCursor, PM_NoYield or PM_NoRemove) then + PostMessage(Handle, cm_TrackCursor, 0, 0); + end + else + TrackCursor; +end; + +{ Respond to asynchronous (lazy) TrackCursor request } + +procedure TConsole2.CMTrackCursor(var M); +begin + TrackCursor; +end; + +{ Scroll to make cursor visible (synchronous - immediate update)} + +procedure TConsole2.TrackCursor; +begin + ScrollTo(Max(Cursor.X - FClientSize.X + 1, Min(FOrigin.X, Cursor.X)), + Max(Cursor.Y - FClientSize.Y + 1, Min(FOrigin.Y, Cursor.Y))); +end; + +{ Update scroll bars } + +procedure TConsole2.SetScrollBars; +begin + if not HandleAllocated then Exit; + //SetScrollRange(Handle, sb_Horz, 0, Max(1, FRange.X), False); + //SetScrollPos(Handle, sb_Horz, FOrigin.X, True); + SetScrollRange(Handle, sb_Vert, 0, Max(1, FRange.Y), False); + SetScrollPos(Handle, sb_Vert, FOrigin.Y, True); +end; + +{ Clear screen } + +procedure TConsole2.InternalClrScr; +begin + WriteFill(0,0,' ',Cols * Rows); + FOrigin.X := 0; + FOrigin.Y := 0; + Cursor.X := 0; + Cursor.Y := 0; + if (csDesigning in ComponentState) then + WriteString(Name); + Invalidate; +end; + +procedure TConsole2.ClrScr; +begin + InternalClrScr; + RecalibrateFont; +end; + +procedure TConsole2.RecalibrateFont; +begin + FCharSize.X := 0; + FCharSize.Y := 0; + FCharAscent := 0; + FOverhang := 0; + FOldFont.Handle := 0; + FOldFont.Size := 0; + FontChanged(FFont); { This will force a repaint and recalibrate } +end; + +{ Clear to end of line } + +procedure TConsole2.ClrEol; +begin + WriteFill(Cursor.X, Cursor.Y, ' ', Cols - Cursor.X); + ShowText(Cursor.X, Cols); +end; + + +procedure TConsole2.WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); +begin + Move(Buffer^, ScreenPtr(X,Y)^, Count); +end; + + +{ Write text buffer to CRT window + - Process any special characters in buffer + - Insert line breaks +} +procedure TConsole2.WriteBuf(Buffer: PChar; Count: Cardinal); +var + L, R: Integer; + + procedure Return; + begin + L := 0; + R := 0; + Cursor.X := 0; + end; + + procedure LineFeed; + var + Rect: TRect; + begin + Inc(Cursor.Y); + if Cursor.Y = Rows then + begin + Dec(Cursor.Y); + Inc(FFirstLine); + if FFirstLine = Rows then FFirstline := 0; + WriteFill(0, Cursor.Y, ' ', Cols); + Dec(FOrigin.Y, 1); + LazyScrollBy(0, 1); + end; + end; + +var + BlockEnd, BlockLen, BlockStart: Integer; + P: PChar; + +begin + L := Cursor.X; + R := Cursor.X; + while Count > 0 do + begin + BlockEnd := Min(Cols - Cursor.X, Count); + P := Buffer; +{$IFDEF WIN32} + BlockStart := BlockEnd; + while (BlockEnd > 0) and (Buffer^ in [#32..#255]) do + begin + Inc(Buffer); + Dec(BlockEnd); + end; + BlockLen := BlockStart - BlockEnd; +{$ELSE} + asm + PUSH DS + PUSH SI + LDS SI, Buffer + MOV CX, BlockEnd + MOV DX, CX + CLD + @@1: + LODSB + CMP AL,' ' + JB @@2 + LOOP @@1 + INC SI + @@2: + DEC SI + MOV Buffer.Word[0],SI + MOV BlockEnd, CX + SUB DX,CX + MOV BlockLen, DX + POP SI + POP DS + end; +{$ENDIF} + if BlockLen > 0 then + begin + Dec(Count, BlockLen); + WriteBlock(Cursor.X, Cursor.Y, P, BlockLen); + Inc(Cursor.X, BlockLen); + if Cursor.X > R then R := Cursor.X; + + if (BlockEnd = 0) and (Cursor.X >= Cols) then + begin + ShowText(L,R); + Return; + LineFeed; + Continue; + end; + end; + + if Count > 0 then + begin + case Buffer^ of + #13: begin + ShowText(L,R); + Return; + if LineBreak = CR then LineFeed; + end; + #10: begin + ShowText(L,R); + if LineBreak = LF then Return; + LineFeed; + end; + #8: if Cursor.X > 0 then + begin + Dec(Cursor.X); + WriteFill(Cursor.X, Cursor.Y, ' ', 1); + if Cursor.X < L then L := Cursor.X; + end; + #7: MessageBeep(0); + end; + Inc(Buffer); + Dec(Count); + end; + end; + ShowText(L, R); + if coAutoTracking in Options then + LazyTrackCursor; + if FFocused and (coFullTimeCursor in Options) then + ShowCursor; +end; + +procedure TConsole2.WriteCodedBuf(Buffer: PChar; Count: Cardinal); +begin + if Assigned(FProcessControlCodes) then + FProcessControlCodes(Self, Buffer, Count) + else + WriteBuf(Buffer, Count); +end; + +{ Write character to CRT window } + +procedure TConsole2.WriteChar(Ch: Char); +begin + WriteCodedBuf(@Ch, 1); +end; + +procedure TConsole2.WriteString(const S: String); +begin + WriteCodedBuf(@S[1], Length(S)); +end; + +procedure TConsole2.WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); +var + I: Integer; +begin + if Count = 0 then Exit; + if (X + Count) > Cols then + begin + FillChar(ScreenPtr(X,Y)^, Cols - X, Ch); + Dec(Count, Cols - X); + I := Cols; + while Count > 0 do + begin + Inc(Y); + FillChar(ScreenPtr(X,Y)^, I, Ch); + Dec(Count, I); + end; + end + else + FillChar(ScreenPtr(X,Y)^, Count, Ch); +end; + +{ Return keyboard status } + +function TConsole2.KeyPressed: Boolean; +begin + Result := FKeyCount > 0; + if (not Result) then + begin + Application.ProcessMessages; + Result := FKeyCount > 0; + end; +end; + +{ Read key from CRT window } + +function TConsole2.ReadKey: Char; +begin + TrackCursor; + if not KeyPressed then + begin + SetFocus; + if FReading or ReadActive then + raise EInvalidOperation.Create('Read already active'); + try + FReading := True; + ReadActive := True; + if FFocused then ShowCursor; + repeat + Application.HandleMessage + until Application.Terminated or (FKeyCount > 0); + if Application.Terminated then + raise Exception.Create('WM_Quit received during ReadKey'); + finally + if FFocused and not (coFullTimeCursor in Options) then + HideCursor; + FReading := False; + ReadActive := False; + end; + end; + ReadKey := FKeyBuffer[0]; + Dec(FKeyCount); + Move(FKeyBuffer[1], FKeyBuffer[0], FKeyCount); +end; + +{ Read text buffer from CRT window } + +function TConsole2.ReadBuf(Buffer: PChar; Count: Cardinal): Cardinal; +var + Ch: Char; + I: Cardinal; +begin + I := 0; + repeat + Ch := ReadKey; + case Ch of + #8: + if I > 0 then + begin + Dec(I); + WriteChar(#8); + end; + #32..#255: + if I < Count - 2 then + begin + Buffer[I] := Ch; + Inc(I); + WriteChar(Ch); + end; + end; + until (Ch in [#0,#13]) or ((coCheckEOF in Options) and (Ch = #26)); + Buffer[I] := Ch; + Inc(I); + if Ch = #13 then + begin + Buffer[I] := #10; + Inc(I); + WriteBuf(#13#10,2); + end; + TrackCursor; + ReadBuf := I; + if FFocused and (coFullTimeCursor in Options) then ShowCursor; +end; + + +{ Text file device driver output function } + +function CrtOutput(var F: TTextRec): Integer; far; +begin + if F.BufPos <> 0 then + with TObject((@F.UserData)^) as TConsole2 do + begin + WriteCodedBuf(PChar(F.BufPtr), F.BufPos); + F.BufPos := 0; + end; + CrtOutput := 0; +end; + +{ Text file device driver input function } + +function CrtInput(var F: TTextRec): Integer; far; +begin + with TObject((@F.UserData)^) as TConsole2 do + F.BufEnd := ReadBuf(PChar(F.BufPtr), F.BufSize); + F.BufPos := 0; + CrtInput := 0; +end; + +{ Text file device driver close function } + +function CrtClose(var F: TTextRec): Integer; far; +begin + CrtClose := 0; +end; + +{ Text file device driver open function } + +function CrtOpen(var F: TTextRec): Integer; far; +begin + if F.Mode = fmInput then + begin + F.InOutFunc := @CrtInput; + F.FlushFunc := nil; + end else + begin + F.Mode := fmOutput; + F.InOutFunc := @CrtOutput; + F.FlushFunc := @CrtOutput; + end; + F.CloseFunc := @CrtClose; + CrtOpen := 0; +end; + +{ Assign text file to CRT device } + +procedure TConsole2.AssignCrt(var F: Text); +begin + with TTextRec(F) do + begin + Handle := Cardinal(-1); + Mode := fmClosed; + BufSize := SizeOf(Buffer); + BufPtr := @Buffer; + OpenFunc := @CrtOpen; + Move(Self, UserData[1],Sizeof(Pointer)); + Name[0] := #0; + end; +end; + +procedure TConsole2.SetOptions(NewOptions: TConsole2Options); +begin + if not (csDesigning in ComponentState) then { don't open files at design time } + begin + if (coStdInput in (NewOptions - Options)) then + with TTextRec(Input) do + begin + if (Mode <> fmClosed) and (Mode <> 0) then + raise Exception.Create('TConsole2.SetOptions: Standard Input is already open'); + AssignCrt(Input); + Reset(Input); + Include(FOptions, coStdInput); { in case opening output fails } + end + else + if (coStdInput in (Options - NewOptions)) then + System.Close(Input); + + if (coStdOutput in (NewOptions - Options)) then + with TTextRec(Output) do + begin + if (Mode <> fmClosed) and (Mode <> 0) then + raise Exception.Create('TConsole2.SetOptions: Standard Output is already open'); + AssignCrt(Output); + Rewrite(Output); + end + else + if (coStdOutput in (Options - NewOptions)) then + System.Close(Output); + end; + FOptions := NewOptions; +end; + + +{ wm_Paint message handler } + +procedure TConsole2.Paint; +var + X1, X2, Y1, Y2, PX, PY: Integer; + R: TRect; +begin + Canvas.Font := Font; + Canvas.Brush.Color := Font.BkColor; + SetViewportOrgEx(Canvas.Handle, -FOrigin.X * FCharSize.X, -FOrigin.Y * FCharSize.Y, nil); + GetClipBox(Canvas.Handle, R); + X1 := Max(FOrigin.X, (R.left - FOverhang) div FCharSize.X); + X2 := Min(Cols, (R.right + FCharSize.X) div FCharSize.X); + Y1 := Max(0, R.top div FCharSize.Y); + Y2 := Min(Rows, (R.bottom + FCharSize.Y - 1) div FCharSize.Y); + PX := X1 * FCharSize.X; + PY := Y1 * FCharSize.Y; + { Draw first line using ETO_Opaque and the entire clipping region. } + ExtTextOut(Canvas.Handle, PX, PY, ETO_Opaque, @R, ScreenPtr(X1, Y1), X2 - X1, nil); + Inc(Y1); + Inc(PY, FCharSize.Y); + while Y1 < Y2 do + begin + { Draw subsequent lines without any background fill or clipping rect } + ExtTextOut(Canvas.Handle, PX, PY, 0, nil, ScreenPtr(X1, Y1), X2 - X1, nil); + Inc(Y1); + Inc(PY, FCharSize.Y); + end; +end; + +procedure TConsole2.WMSize(var M: TWMSize); +var + W,H: Integer; +begin + if FFocused and (FReading or (coFullTimeCursor in Options)) then + HideCursor; + inherited; + RecalcSizeAndRange; + if FFocused and (FReading or (coFullTimeCursor in Options)) then + ShowCursor; +end; + + +procedure TConsole2.DoScroll(Which, Action, Thumb: Integer); +var + X, Y: Integer; + + function GetNewPos(Pos, Page, Range: Integer): Integer; + begin + case Action of + sb_LineUp: GetNewPos := Pos - 1; + sb_LineDown: GetNewPos := Pos + 1; + sb_PageUp: GetNewPos := Pos - Page; + sb_PageDown: GetNewPos := Pos + Page; + sb_Top: GetNewPos := 0; + sb_Bottom: GetNewPos := Range; + sb_ThumbPosition, + sb_ThumbTrack : GetNewPos := Thumb; + else + GetNewPos := Pos; + end; + end; + +begin + X := FOrigin.X; + Y := FOrigin.Y; + case Which of + sb_Horz: X := GetNewPos(X, FClientSize.X div 2, FRange.X); + sb_Vert: Y := GetNewPos(Y, FClientSize.Y, FRange.Y); + end; + ScrollTo(X, Y); +end; + +procedure TConsole2.WMHScroll(var M: TWMHScroll); +begin + DoScroll(sb_Horz, M.ScrollCode, M.Pos); +end; + +procedure TConsole2.WMVScroll(var M: TWMVScroll); +begin + DoScroll(sb_Vert, M.ScrollCode, M.Pos); +end; + +procedure TConsole2.KeyPress(var Key: Char); +begin + inherited KeyPress(Key); + if Key <> #0 then + begin + if (coCheckBreak in Options) and (Key = #3) then + DoCtrlBreak; + if FKeyCount < SizeOf(FKeyBuffer) then + begin + FKeyBuffer[FKeyCount] := Key; + Inc(FKeyCount); + end; + end; +end; + +procedure TConsole2.KeyDown(var Key: Word; Shift: TShiftState); +var + I: Integer; +begin + inherited KeyDown(Key, Shift); + if Key = 0 then Exit; + if (coCheckBreak in Options) and (Key = vk_Cancel) then + DoCtrlBreak; + for I := 1 to ScrollKeyCount do + with ScrollKeys[I] do + if (sKey = Key) and (Ctrl = (Shift = [ssCtrl])) then + begin + DoScroll(SBar, Action, 0); + Exit; + end; +end; + +procedure TConsole2.WMSetFocus(var M: TWMSetFocus); +begin + FFocused := True; + if FReading or (coFullTimeCursor in Options) then + ShowCursor; + inherited; +end; + +procedure TConsole2.WMKillFocus(var M: TWMKillFocus); +begin + inherited; + if FReading or (coFullTimeCursor in Options) then + HideCursor; + FFocused := False; +end; + +procedure TConsole2.WMGetDlgCode(var M: TWMGetDlgCode); +begin + M.Result := dlgc_WantArrows or dlgc_WantChars; +end; + +procedure TConsole2.WMEraseBkgnd(var M: TWMEraseBkgnd); +begin + M.Result := 1; +end; + +procedure TConsole2.DoCtrlBreak; +begin +end; + +procedure TConsole2.MouseDown(Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + SetFocus; + inherited MouseDown(Button, Shift, X, Y); +end; + + + +{**************** TAttrManager ****************} + +constructor TAttr.Create(F: TFixedFont); +var + DC: HDC; + Save: THandle; + TM: TTextMetric; +begin + inherited Create; + Assign(F); + BkColor := F.BkColor; + DC := GetDC(0); + Save := SelectObject(DC, F.Handle); + GetTextMetrics(DC, TM); + SelectObject(DC, Save); + ReleaseDC(0,DC); + Overhang := TM.tmOverhang; + Underhang := MulDiv(TM.tmDescent, TM.tmOverhang, TM.tmAscent); +end; + + +{**************** TAttrManager ****************} + +{ The list of free slots in the TAttrManager's FList is + maintained in the unused pointer slots inside the FList. + FFreeList is the index of the first free slot, or -1 if + there are no free slots. The pointer FList[FFreeList] + contains the negative of the integer index of the next + free slot, and so on. In 16 bit, this code assumes $FFFF + will never appear as a selector. In 32 bit, this code + would assume FList indexes and pointers stored in the + FList are positive (>=0) when evaluated as signed integers. +} + +const + EndOfList = -MaxInt; + +constructor TAttrManager.Create; +begin + inherited Create; + FList := TList.Create; +end; + +destructor TAttrManager.Destroy; +begin + Clear; + FList.Free; + inherited Destroy; +end; + +function TAttrManager.GetCount; +begin + Result := FList.Count; +end; + +function TAttrManager.InFreeList(P: Pointer): Boolean; +begin + Result := (EndOfList <= Longint(P)) and (Longint(P) < 0); +end; + +function TAttrManager.FirstFreeIndex: Integer; +begin + Result := FFreeList; +end; + +function TAttrManager.NextFreeIndex(P: Pointer): Integer; +begin + if (EndOfList < Longint(P)) and (Longint(P) < 0) then + Result := -Longint(P) - 1 + else + Result := -1; +end; + +procedure TAttrManager.SetFree(Index: Integer); +begin + if FFreeList < 0 then + FList[Index] := Pointer(Longint(EndOfList)) + else + FList[Index] := Pointer(Longint(-FFreeList - 1)); + FFreeList := Index; +end; + +function TAttrManager.AllocIndex: Integer; +begin + if FFreeList >= 0 then + begin + Result := FFreeList; + FFreeList := NextFreeIndex(FList[FFreeList]); + end + else + Result := FList.Count; +end; + +function TAttrManager.Allocate(F: TFixedFont): Integer; +var + P: ^Pointer; + H: THandle; + C,B: TColor; + N: Integer; +begin + Result := FCacheIndex; + with F do + begin + C := Color; + B := BkColor; + H := Handle; + end; + if FCache <> nil then + with FCache do + if (Color = C) and (BkColor = B) and (Handle = H) then + Exit; + + { Search for a match } + Result := FList.Count; + P := Pointer(FList.List); { Use pointer iterator instead of For loop } + while (Result > 0) do + begin + if not InFreeList(P^) then + with TAttr(P^) do + if (Color = C) and (BkColor = B) and (Handle = H) then + begin + FCache := TAttr(P^); + Result := FList.Count - Result; + FCacheIndex := Result; + Exit; + end; + Inc(P); + Dec(Result); + end; + + { No match found, so create a new TAttr in an empty slot } + Result := AllocIndex; + Attr[Result] := TAttr.Create(F); +end; + +procedure TAttrManager.Clear; +var + I: Integer; +begin + for I := 0 to FList.Count - 1 do + if not InFreeList(FList[I]) then + TObject(FList[I]).Free; + FList.Clear; + FCacheIndex := 0; + FCache := nil; + FFreeList := -1; +end; + +procedure TAttrManager.Reference(Index: Integer; Delta: Integer); +begin + with Attr[Index] do + begin + Inc(RefCount, Delta); + if RefCount <= 0 then + Attr[Index] := nil; + end; +end; + +function TAttrManager.GetAttr(Index: Integer): TAttr; +begin + Result := TAttr(FList[Index]); + if InFreeList(Result) then + Result := nil; +end; + +procedure TAttrManager.SetAttr(Index: Integer; NewAttr: TAttr); +var + Temp: TAttr; +begin + if NewAttr = nil then + begin + TObject(FList[Index]).Free; + SetFree(Index); + end + else + if Index = FList.Count then + FList.Expand.Add(NewAttr) + else + FList[Index] := NewAttr; + FCacheIndex := Index; + FCache := NewAttr; +end; + + +{ ************* TColorConsole2 *************** } + +constructor TColorConsole2.Create(Owner: TComponent); +begin + FAttrList := TAttrManager.Create; + inherited Create(Owner); +end; + +destructor TColorConsole2.Destroy; +begin + inherited Destroy; + StrDispose(Pointer(FIndexes)); + FAttrList.Free; + StrDispose(Pointer(FCellWidths)); +end; + +function TColorConsole2.IndexPtr(X,Y: Integer): PInteger; +begin + Result := @FIndexes^[Longint(ScreenPtr(X,Y)) - Longint(FBuffer)]; +end; + +{ ResizeBuffer + - Called by constructor to init buffers, and called by SetCols/SetRows + when Cols or Rows change. Cols and Rows will be set to their new + values before ResizeBuffer is called. + - StrAlloc will fail (raise xptn) if Cols * Rows is greater than 32k - 2 + - No attempt is made to preserve the contents of the buffers. Resizing + the buffers is equivallent to a ClrScr. +} + +procedure TColorConsole2.ResizeBuffer; +var + I: Integer; + A: Integer; + P: PInteger; + P2: Pointer; +begin + inherited ResizeBuffer; + Pointer(P) := nil; + P2 := nil; + try + Pointer(P) := StrAlloc(Longint(Cols) * Rows * Sizeof(Integer)); + P2 := StrAlloc(Cols * SizeOf(Integer)); + Exchange(Pointer(FIndexes), Pointer(P)); + Exchange(Pointer(FCellWidths), P2); + finally + StrDispose(Pointer(P)); + StrDispose(P2); + end; + FAttrList.Clear; + A := FAttrList.Allocate(Font); + FillInt(FIndexes^, Cols * Rows, A); + FAttrList.Reference(A, Cols * Rows ); + FillInt(FCellWidths^, Cols, FCharSize.X); +end; + +{ If the character cell is larger, expand settings and redraw } +procedure TColorConsole2.SetMetrics(const Metrics: TTextMetric); +var + Changed: Boolean; + I: Integer; + A: TAttr; + + function Check(A, B: Longint): Longint; + begin + Result := A; + if A < B then + begin + Result := B; + Changed := True; + end; + end; + +begin + { Different fonts of the same point size have slightly different char + cells. Keep the global char cell large enough for all. } + if FOldFont.Size = Font.Size then + with Metrics do + begin + Changed := False; { TT fonts don't report overhang } + FOverhang := Check(FOverhang, Max(tmOverhang, tmMaxCharWidth - tmAveCharWidth)); + FCharSize.X := Check(FCharSize.X, tmAveCharWidth); + FCharSize.Y := Check(FCharSize.Y, tmHeight + tmExternalLeading); + FCharAscent := Check(FCharAscent, tmAscent); + if Changed then + begin + if FCellWidths <> nil then + FillInt(FCellWidths^, Cols, FCharSize.X); + RecalcSizeAndRange; + Invalidate; + end; + end + else + begin { If font size changed, accept new cell verbatim. } + { Update all cached fonts to new size } + for I := 0 to FAttrList.Count - 1 do + begin + A:= FAttrList[I]; + if A <> nil then + A.Size := Font.Size; + end; + if FCellWidths <> nil then + FillInt(FCellWidths^, Cols, Metrics.tmAveCharWidth); + inherited SetMetrics(Metrics); + end; +end; + + +procedure TColorConsole2.WriteFill(X,Y: Integer; Ch: Char; Count: Cardinal); +begin + if Count = 0 then Exit; + FillAttr(X,Y,Count); + inherited WriteFill(X,Y,Ch,Count); { write ch to the char buffer } +end; + +procedure TColorConsole2.FillAttr(X,Y: Integer; Count: Cardinal); + + procedure ReplaceAttr(A: Integer; P: PInteger; Count: Cardinal); + var + RunCount: Integer; + RunValue: Integer; + begin + while Count > 0 do + begin +{$IFDEF Win32} + RunValue := P^; + RunCount := 0; + repeat + P^ := A; + Inc(P); + Inc(RunCount); + until (RunCount >= Count) or (P^ <> RunValue); +{$ELSE} + asm + LES DI, P + MOV SI, DI + MOV AX, ES:[DI] + MOV CX, Count + MOV DX, CX + REPE SCASW + JZ @@1 + INC CX + DEC DI + DEC DI + @@1: + SUB DX, CX + MOV RunCount, DX + MOV RunValue, AX + MOV P.Word[0], DI + CMP AX, A { If attrs are same, no need to write over them. } + JE @@2 + MOV DI, SI + MOV CX, DX + MOV AX, A + REP STOSW + @@2: + end; +{$ENDIF} + FAttrList.Reference(RunValue, -RunCount); + Dec(Count, RunCount); + end; + end; + +var + A: Integer; + I: Integer; +begin + A := FAttrList.Allocate(Font); + FAttrList.Reference(A, Count); + if (X + Count) > Cols then + begin + ReplaceAttr(A, IndexPtr(X,Y), Cols - X); + Dec(Count, Cols - X); + I := Cols; + while Count > 0 do + begin + Inc(Y); + ReplaceAttr(A, IndexPtr(X,Y), I); + Dec(Count, I); + end; + end + else + ReplaceAttr(A, IndexPtr(X,Y), Count); +end; + +procedure TColorConsole2.WriteBlock(X,Y: Integer; Buffer: PChar; Count: Cardinal); +begin + if Count = 0 then Exit; + FillAttr(X,Y,Count); { fill range with current attr } + inherited WriteBlock(X,Y,Buffer,Count); { copy chars to char buf } +end; + +procedure TColorConsole2.Paint; +var + X1, X2, Y1, Y2, RunValue, RunStart, RunEnd, Len, Count, Prev: Integer; + R: TRect; + P: PInteger; + Buf: PChar; + A: TAttr; + C: TPoint; + DC: HDC; +begin + C := FCharSize; + SetViewportOrgEx(Canvas.Handle, -FOrigin.X * FCharSize.X, -FOrigin.Y * C.Y, nil); + GetClipBox(Canvas.Handle, R); + X1 := Max(FOrigin.X, (R.left - FOverhang) div C.X); + X2 := Min(Cols, (R.right + C.X) div C.X); + Y1 := Max(0, R.top div C.Y); + Y2 := Min(Rows, (R.bottom + C.Y - 1) div C.Y); + if ((Cols * C.X) < R.Right) then + begin + Canvas.Brush := Brush; + Count := R.Left; + R.Left := Cols * C.X; + Canvas.FillRect(R); + R.Right := R.Left; + R.Left := Count; + end; + if (Rows * C.Y) < R.Bottom then + begin + Canvas.Brush := Brush; + R.Top := Rows * C.Y; + Canvas.FillRect(R); + end; + { In this tight display loop, we don't need all the automatic services + provided by TCanvas. To optimize performance, we'll select the text + font and colors into the DC 'manually'. } + DC := Canvas.Handle; + SetBkMode(DC, OPAQUE); + SetTextAlign(DC, TA_BaseLine); + R.Top := Y1 * C.Y; + R.Bottom := R.Top + C.Y; + Prev := -1; + while Y1 < Y2 do + begin + Buf := ScreenPtr(X1,Y1); + P := Pointer(IndexPtr(X1,Y1)); + Count := X2 - X1; + R.Left := X1 * C.X; +{$IFDEF WIN32} + RunEnd := Integer(P) + Count * sizeof(Integer); + while Count > 0 do + begin + RunStart := Integer(P); + RunValue := P^; + while (Integer(P) < RunEnd) and (P^ = RunValue) do + Inc(P); + Len := (Integer(P) - RunStart) div sizeof(Integer); + Dec(Count, Len); +{$ELSE} + RunEnd := X1; + while Count > 0 do + begin + asm + LES DI, P + MOV AX, ES:[DI] { AX := P^ } + MOV CX, Count + MOV BX, CX + REPE SCASW + JZ @@1 + INC CX + DEC DI + DEC DI + @@1: + MOV P.Word[0], DI + MOV RunValue, AX + SUB BX, CX + MOV Count, CX + MOV Len, BX + ADD RunEnd, BX { RunEnd := RunStart + Length } + end; +{$ENDIF} + if RunValue <> Prev then { Only select objects when we have to } + begin { (this helps at line breaks ) } + A := FAttrList[RunValue]; + SelectObject(DC, A.Handle); + SetTextColor(DC, ColorToRGB(A.Color)); + SetBkColor(DC, ColorToRGB(A.BkColor)); + Prev := RunValue; + end; + R.Right := R.Left + Len * C.X; + ExtTextOut(DC, R.Left - A.Underhang, R.Top + FCharAscent, + ETO_Opaque or ETO_Clipped, @R, Buf, Len, Pointer(FCellWidths)); + R.Left := R.Right; + Inc(Buf, Len); + end; + Inc(Y1); + Inc(R.Top, C.Y); + Inc(R.Bottom, C.Y); + end; + { Since we've manipulated the DC directly, and the canvas may think its + current objects are still selected, we should force the canvas to + deselect all GDI objects } + Canvas.Handle := 0; +end; + + +procedure Register; +begin + RegisterComponents('Additional', [TConsole2, TColorConsole2]); + RegisterClasses([TFixedFont]); +end; + + +end. + + + + diff --git a/src/d2_qa.zip b/src/d2_qa.zip new file mode 100644 index 00000000..7ceaac08 Binary files /dev/null and b/src/d2_qa.zip differ diff --git a/src/main.dfm b/src/main.dfm new file mode 100644 index 00000000..74283de7 Binary files /dev/null and b/src/main.dfm differ diff --git a/src/main.pas b/src/main.pas new file mode 100644 index 00000000..f9dddbd7 --- /dev/null +++ b/src/main.pas @@ -0,0 +1,8264 @@ +unit Main; + +interface + +uses + SysUtils, Windows, Messages, Classes, Graphics, Controls, + Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, Menus, zLogGlobal, ComCtrls, + Grids, UBasicMulti, UBasicScore, UALLJAMulti, UALLJAScore1, UOptions, UEditDialog, + Trapedit, BGK32Lib, UzLogCW, Aligrid, UzLogVoice, Hemibtn, ShellAPI, + OEdit, URigControl, UConsolePad, URenewThread, FngSingleInst, USpotClass, + UMMTTY, UTTYConsole, UPaddleThread, MPlayer, UELogJapanese; + + +const MaxGridQSO = 20000; + +const GLOBALSERIAL : integer = 0; + ZLOCOUNT : integer = 0; + + +type + + TBasicEdit = class + private + colSerial : integer; + colTime : integer; + colCall : integer; + colrcvdRST : integer; + colrcvdNumber : integer; + colMode : integer; + colPower : integer; + colNewPower : integer; + colBand : integer; + colPoint : integer; + colMemo : integer; + colOp : integer; + colNewMulti1 : integer; + colNewMulti2 : integer; + colsentRST : integer; + colsentNumber : integer; + colCQ : integer; + DispQSO : integer; + function GetLeft(col : integer) : integer; + Procedure WriteQSO(R: integer; aQSO : TQSO); + public + IndexArray : array[1..MaxGridQSO] of word; {contains the index to Log} + SerialWid : integer; + TimeWid : integer; + CallSignWid : integer; + rcvdRSTWid : integer; + NumberWid : integer; + BandWid : integer; + ModeWid : integer; + PowerWid : integer; + NewPowerWid : integer; + PointWid : integer; + OpWid : integer; + MemoWid : integer; + NewMulti1Wid : integer; + NewMulti2Wid : integer; + + DirectEdit : boolean; + BeforeEdit : string; // temp var for directedit mode + + constructor Create; virtual; + procedure SetDirectEdit(Direct : boolean); + procedure Add(aQSO : TQSO); virtual; + procedure ResetTopRow; + procedure Renew; virtual; + procedure SetGridWidth; + procedure SetEditFields; + function GetNewMulti1(aQSO : TQSO) : string; virtual; + procedure RefreshScreen; + end; + + TGeneralEdit = class(TBasicEdit) + private + public + constructor Create; override; + function GetNewMulti1(aQSO : TQSO) : string; override; + end; + + TALLJAEdit = class(TBasicEdit) + private + public + constructor Create; override; + function GetNewMulti1(aQSO : TQSO) : string; override; + end; + + TIARUEdit = class(TBasicEdit) + private + public + constructor Create; override; + function GetNewMulti1(aQSO : TQSO) : string; override; + end; + + TARRLDXEdit = class(TBasicEdit) + private + public + constructor Create; override; + function GetNewMulti1(aQSO : TQSO) : string; override; + end; + + TACAGEdit = class(TALLJAEdit) + private + public + // constructor Create; override; + function GetNewMulti1(aQSO : TQSO) : string; override; + end; + + TWWEdit = class(TBasicEdit) + private + public + constructor Create; override; + function GetNewMulti1(aQSO : TQSO) : string; override; + end; + + TKCJEdit = class(TWWEdit) + private + public + //constructor Create; override; + function GetNewMulti1(aQSO : TQSO) : string; override; + end; + + TDXCCEdit = class(TBasicEdit) + private + public + constructor Create; override; + function GetNewMulti1(aQSO : TQSO) : string; override; + end; + + TWPXEdit = class(TBasicEdit) + private + public + constructor Create; override; + function GetNewMulti1(aQSO : TQSO) : string; override; + end; + + TJA0Edit = class(TWPXEdit) + private + public + constructor Create; override; + end; + + TSerialGeneralEdit = class(TWPXEdit) + private + public + constructor Create; override; + function GetNewMulti1(aQSO : TQSO) : string; override; + end; + + TIOTAEdit = class(TBasicEdit) + private + public + constructor Create; override; + function GetNewMulti1(aQSO : TQSO) : string; override; + end; + + TWanted = class + Multi : string; + Bands : set of TBand; + constructor Create; + end; + + TContest = class + WantedList : TList; + MultiForm : TBasicMulti; + ScoreForm : TBasicScore; + PastEditForm : TEditDialog; + Name : string; + SameExchange : boolean; // true by default. false when serial number etc + MultiFound : boolean; // used in spacebarproc + + constructor Create(N : string); virtual; + destructor Destroy; virtual; + procedure PostWanted(S : string); + procedure DelWanted(S : string); + procedure ClearWanted; + function QTHString : string; virtual; + function ValidBand(B : TBand) : boolean; virtual; + procedure LogQSO(var aQSO : TQSO; Local : boolean); virtual; + procedure ShowScore; virtual; + procedure ShowMulti; virtual; + procedure Renew; virtual; + {procedure LoadFromFile(FileName : string); virtual; } + procedure EditCurrentRow; virtual; + procedure ChangeBand(Up : boolean); virtual; + procedure ChangeMode; virtual; + procedure ChangePower; virtual; + procedure DispExchangeOnOtherBands; virtual; + procedure SpaceBarProc; virtual; {called when space is pressed when Callsign Edit + is in focus AND the callsign is not DUPE} + procedure SetNrSent(var aQSO : TQSO); virtual; + procedure SetPoints(var aQSO : TQSO); virtual; {Sets QSO.points according to band/mode} + {called from ChangeBand/ChangeMode} + procedure SetBand(B : TBand); virtual; {JA0} + procedure WriteSummary(filename : string); // creates summary file + function CheckWinSummary(aQSO : TQSO) : string; virtual; // returns summary for checkcall etc. + function ADIF_ExchangeRX_FieldName : string; virtual; + function ADIF_ExchangeRX(aQSO : TQSO) : string; virtual; + function ADIF_ExtraFieldName : string; virtual; + function ADIF_ExtraField(aQSO : TQSO) : string; virtual; + procedure ADIF_Export(FileName : string); + end; + + TPedi = class(TContest) + constructor Create(N : string); override; + end; + + TALLJAContest = class(TContest) + constructor Create(N : string); override; + function QTHString : string; override; + procedure DispExchangeOnOtherBands; override; + function CheckWinSummary(aQSO : TQSO) : string; override; + end; + + TKCJContest = class(TContest) + constructor Create(N : string); override; + function QTHString : string; override; + //procedure DispExchangeOnOtherBands; override; + function CheckWinSummary(aQSO : TQSO) : string; override; + end; + + TACAGContest = class(TContest) + constructor Create(N : string); override; + procedure DispExchangeOnOtherBands; override; + end; + + TFDContest = class(TContest) + constructor Create(N : string); override; + function QTHString : string; override; + procedure DispExchangeOnOtherBands; override; + end; + + TSixDownContest = class(TContest) + constructor Create(N : string); override; + function QTHString : string; override; + procedure DispExchangeOnOtherBands; override; + end; + + TGeneralContest = class(TContest) + constructor Create(N : string); override; + procedure SetPoints(var aQSO : TQSO); override; + end; + + TCQWPXContest = class(TContest) + constructor Create(N : string); override; + function ADIF_ExtraFieldName : string; override; + function ADIF_ExtraField(aQSO : TQSO) : string; override; + end; + + TWAEContest = class(TContest) + constructor Create(N : string); override; + procedure SpaceBarProc; override; + end; + + TIOTAContest = class(TContest) + constructor Create(N : string); override; + function QTHString : string; override; + procedure SpaceBarProc; override; + end; + + TARRL10Contest = class(TContest) + constructor Create(N : string); override; + function CheckWinSummary(aQSO : TQSO) : string; override; + end; + + TJA0Contest = class(TContest) + constructor Create(N : string); override; + procedure SetBand(B : TBand); override; + procedure Renew; override; + end; + + TJA0ContestZero = class(TJA0Contest) + constructor Create(N : string); override; + end; + + TAPSprint = class(TContest) + constructor Create(N : string); override; + end; + + TCQWWContest = class(TContest) + constructor Create(N : string); override; + procedure SpaceBarProc; override; + procedure ShowMulti; override; + function CheckWinSummary(aQSO : TQSO) : string; override; + function ADIF_ExchangeRX_FieldName : string; override; + end; + + TIARUContest = class(TContest) + constructor Create(N : string); override; + //function CheckWinSummary(aQSO : TQSO) : string; override; + procedure SpaceBarProc; override; + function ADIF_ExchangeRX_FieldName : string; override; + end; + + TJIDXContest = class(TCQWWContest) + constructor Create(N : string); override; + procedure SetPoints(var aQSO : TQSO); override; + end; + + TJIDXContestDX = class(TContest) + constructor Create(N : string); override; + procedure SetPoints(var aQSO : TQSO); override; + end; + + TARRLDXContestDX = class(TContest) + constructor Create(N : string); override; + function ADIF_ExchangeRX_FieldName : string; override; + end; + + TARRLDXContestW = class(TContest) + constructor Create(N : string); override; + procedure SpaceBarProc; override; + function ADIF_ExchangeRX_FieldName : string; override; + end; + + TAllAsianContest = class(TContest) + constructor Create(N : string); override; + procedure SetPoints(var aQSO : TQSO); override; + procedure SpaceBarProc; override; + function ADIF_ExchangeRX_FieldName : string; override; + end; + + + +type + TMainForm = class(TForm) + MainMenu: TMainMenu; + FileNewItem: TMenuItem; + FileOpenItem: TMenuItem; + FileSaveItem: TMenuItem; + FileSaveAsItem: TMenuItem; + FilePrintItem: TMenuItem; + FilePrintSetupItem: TMenuItem; + FileExitItem: TMenuItem; + EditUndoItem: TMenuItem; + EditCutItem: TMenuItem; + EditCopyItem: TMenuItem; + EditPasteItem: TMenuItem; + StatusLine: TStatusBar; + OpenDialog: TOpenDialog; + SaveDialog: TSaveDialog; + Grid: TStringGrid; + PowerMenu: TPopupMenu; + N1W1: TMenuItem; + N2W1: TMenuItem; + N5W1: TMenuItem; + N10W1: TMenuItem; + N20W1: TMenuItem; + N25W1: TMenuItem; + N50W1: TMenuItem; + N100W1: TMenuItem; + N200W1: TMenuItem; + N500W1: TMenuItem; + N1kW1: TMenuItem; + BandMenu: TPopupMenu; + N19MHz: TMenuItem; + N35MHz: TMenuItem; + N7MHz: TMenuItem; + N14MHz: TMenuItem; + N21MHz: TMenuItem; + N28MHz: TMenuItem; + N50MHz: TMenuItem; + N144MHz: TMenuItem; + N430MHz: TMenuItem; + N1200MHz: TMenuItem; + N2400MHz: TMenuItem; + N5600MHz: TMenuItem; + ModeMenu: TPopupMenu; + CW1: TMenuItem; + SSB1: TMenuItem; + FM1: TMenuItem; + AM1: TMenuItem; + RTTY1: TMenuItem; + Other1: TMenuItem; + GridMenu: TPopupMenu; + EditQSO: TMenuItem; + DeleteQSO1: TMenuItem; + MainToolBar: TPanel; + SpeedButton4: TSpeedButton; + SpeedButton5: TSpeedButton; + SpeedButton6: TSpeedButton; + SpeedButton1: TSpeedButton; + SpeedButton3: TSpeedButton; + MultiButton: TSpeedButton; + SpeedButton8: TSpeedButton; + CWToolBar: TPanel; + LogButton: TSpeedButton; + EditPanel: TPanel; + RcvdRSTEdit: TEdit; + BandEdit: TEdit; + ModeEdit: TEdit; + PointEdit: TEdit; + PowerEdit: TEdit; + OpEdit: TEdit; + OptionsButton: TSpeedButton; + OpMenu: TPopupMenu; + SuperCheckButtpn: TSpeedButton; + CWStopButton: TSpeedButton; + CWPauseButton: TSpeedButton; + SideToneButton: TSpeedButton; + SpeedButton12: TSpeedButton; + SpeedBar: TTrackBar; + SpeedLabel: TLabel; + Button1: TButton; + CWPlayButton: TSpeedButton; + Timer1: TTimer; + InsertQSO1: TMenuItem; + N10GHzup1: TMenuItem; + Export1: TMenuItem; + TXTSaveDialog: TSaveDialog; + SerialEdit: TEdit; + SpeedButton2: TSpeedButton; + CWF1: THemisphereButton; + CWF2: THemisphereButton; + CWF3: THemisphereButton; + CWF4: THemisphereButton; + CWF5: THemisphereButton; + CWF6: THemisphereButton; + CWF7: THemisphereButton; + CWF8: THemisphereButton; + HemisphereButton8: THemisphereButton; + HemisphereButton9: THemisphereButton; + HemisphereButton10: THemisphereButton; + Windows1: TMenuItem; + Help1: TMenuItem; + About1: TMenuItem; + N3: TMenuItem; + HowtoUseHelp1: TMenuItem; + SearchforHelpOn1: TMenuItem; + Contents1: TMenuItem; + Score1: TMenuItem; + Multipliers1: TMenuItem; + QSOrate1: TMenuItem; + PacketCluster1: TMenuItem; + SuperCheck1: TMenuItem; + PartialCheck1: TMenuItem; + GBand: TMenuItem; + Changemode: TMenuItem; + GOperator: TMenuItem; + G1R9MHz: TMenuItem; + G3R5MHz: TMenuItem; + G7MHz: TMenuItem; + G14MHz: TMenuItem; + G21MHz: TMenuItem; + G28MHz: TMenuItem; + G50MHz: TMenuItem; + G144MHz: TMenuItem; + G430MHz: TMenuItem; + G1200MHz: TMenuItem; + G2400MHz: TMenuItem; + G5600MHz: TMenuItem; + G10GHz: TMenuItem; + N5: TMenuItem; + ZLinkmonitor1: TMenuItem; + Options1: TMenuItem; + CWFMenu: TPopupMenu; + Edit1: TMenuItem; + VoiceMenu: TPopupMenu; + Edit2: TMenuItem; + N10MHz1: TMenuItem; + N18MHz1: TMenuItem; + N24MHz1: TMenuItem; + Backup1: TMenuItem; + CWKeyboard1: TMenuItem; + ZServer1: TMenuItem; + SpeedButton7: TSpeedButton; + Network1: TMenuItem; + mnDownload: TMenuItem; + mnMerge: TMenuItem; + ConnecttoZServer1: TMenuItem; + N6: TMenuItem; + G10MHz: TMenuItem; + G18MHz: TMenuItem; + G24MHz: TMenuItem; + CW2: TMenuItem; + SSB2: TMenuItem; + FM2: TMenuItem; + AM2: TMenuItem; + RTTY2: TMenuItem; + Other2: TMenuItem; + Clear1: TMenuItem; + SendSpot1: TMenuItem; + NewPowerEdit: TEdit; + NewPowerMenu: TPopupMenu; + P1: TMenuItem; + L1: TMenuItem; + M1: TMenuItem; + H1: TMenuItem; + CheckCall1: TMenuItem; + CreateDupeCheckSheetZPRINT1: TMenuItem; + memo1: TMenuItem; + rst1: TMenuItem; + callsign1: TMenuItem; + View1: TMenuItem; + ShowCurrentBandOnly: TMenuItem; + SortbyTime1: TMenuItem; + pushqso1: TMenuItem; + pullqso1: TMenuItem; + CallsignEdit: TOvrEdit; + NumberEdit: TOvrEdit; + MemoEdit: TOvrEdit; + TimeEdit: TOvrEdit; + DateEdit: TOvrEdit; + ZServerIcon: TImage; + memo21: TMenuItem; + PrintLogSummaryzLog1: TMenuItem; + GeneralSaveDialog: TSaveDialog; + mPXListWPX: TMenuItem; + mSummaryFile: TMenuItem; + op1: TMenuItem; + mChangePower: TMenuItem; + H2: TMenuItem; + M2: TMenuItem; + L2: TMenuItem; + P2: TMenuItem; + RigControl1: TMenuItem; + Console1: TMenuItem; + MergeFile1: TMenuItem; + RunningFrequencies1: TMenuItem; + mnCheckCountry: TMenuItem; + mnCheckMulti: TMenuItem; + SSBToolBar: TPanel; + VoiceStopButton: TSpeedButton; + VoicePauseButton: TSpeedButton; + SpeedButton15: TSpeedButton; + VoicePlayButton: TSpeedButton; + VoiceF1: THemisphereButton; + VoiceF3: THemisphereButton; + VoiceF2: THemisphereButton; + VoiceF4: THemisphereButton; + VoiceF5: THemisphereButton; + VoiceF6: THemisphereButton; + VoiceF7: THemisphereButton; + VoiceF8: THemisphereButton; + HemisphereButton1: THemisphereButton; + CQRepeatVoice1: THemisphereButton; + CQRepeatVoice2: THemisphereButton; + Bandscope1: TMenuItem; + mnChangeTXNr: TMenuItem; + mnGridAddNewPX: TMenuItem; + Togglerig1: TMenuItem; + mnHideCWPhToolBar: TMenuItem; + mnHideMenuToolbar: TMenuItem; + Scratchsheet1: TMenuItem; + OpenDialog1: TOpenDialog; + IncreaseFontSize1: TMenuItem; + mnMMTTY: TMenuItem; + mnTTYConsole: TMenuItem; + QTC1: TMenuItem; + mnNewBandScope: TMenuItem; + QuickReference1: TMenuItem; + CreateELogJARL1: TMenuItem; + procedure FormCreate(Sender: TObject); + procedure ShowHint(Sender: TObject); + procedure FileNew(Sender: TObject); + procedure FileOpen(Sender: TObject); + procedure FileSave(Sender: TObject); + procedure FileSaveAs(Sender: TObject); + procedure FilePrint(Sender: TObject); + procedure FilePrintSetup(Sender: TObject); + procedure FileExit(Sender: TObject); + procedure EditUndo(Sender: TObject); + procedure EditCut(Sender: TObject); + procedure EditCopy(Sender: TObject); + procedure EditPaste(Sender: TObject); + procedure HelpContents(Sender: TObject); + procedure HelpSearch(Sender: TObject); + procedure HelpHowToUse(Sender: TObject); + procedure HelpAbout(Sender: TObject); + procedure CommonEditKeyProcess(Sender: TObject; var Key: Char); + procedure EditKeyPress(Sender: TObject; var Key: Char); + procedure CallsignEditChange(Sender: TObject); + procedure NumberEditChange(Sender: TObject); + procedure PowerEditClick(Sender: TObject); + procedure PowerMenuClick(Sender: TObject); + procedure BandMenuClick(Sender: TObject); + procedure BandEditClick(Sender: TObject); + procedure ModeMenuClick(Sender: TObject); + procedure MemoEditChange(Sender: TObject); + procedure ModeEditClick(Sender: TObject); + procedure GridMenuPopup(Sender: TObject); + procedure DeleteQSO1Click(Sender: TObject); + procedure GridKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure EditQSOClick(Sender: TObject); + procedure EditKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure GridDblClick(Sender: TObject); + procedure PartialClick(Sender: TObject); + procedure CallsignEditKeyUp(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure ScoreClick(Sender: TObject); + procedure MultiClick(Sender: TObject); + procedure RateClick(Sender: TObject); + procedure LogButtonClick(Sender: TObject); + procedure OptionsButtonClick(Sender: TObject); + procedure SuperCheckButtonClick(Sender: TObject); + procedure FormShow(Sender: TObject); + procedure CWFButtonClick(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure SpeedBarChange(Sender: TObject); + procedure SideToneButtonClick(Sender: TObject); + procedure Button1Click(Sender: TObject); + procedure CWStopButtonClick(Sender: TObject); + procedure VoiceStopButtonClick(Sender: TObject); + procedure SetCQ(CQ : boolean); + procedure CQRepeatClick1(Sender: TObject); + procedure CQRepeatClick2(Sender: TObject); + procedure SpeedButton12Click(Sender: TObject); + procedure SpeedButton15Click(Sender: TObject); + procedure OpMenuClick(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure CWPauseButtonClick(Sender: TObject); + procedure CWPlayButtonClick(Sender: TObject); + procedure RcvdRSTEditChange(Sender: TObject); + procedure FormKeyUp(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure Timer1Timer(Sender: TObject); + procedure InsertQSO1Click(Sender: TObject); + procedure MemoEditKeyPress(Sender: TObject; var Key: Char); + procedure VoiceFButtonClick(Sender: TObject); + procedure TimeEditChange(Sender: TObject); + procedure Export1Click(Sender: TObject); + procedure ClusterClick(Sender: TObject); + procedure CreateParams(var Params: TCreateParams); override; + procedure SpeedButton9Click(Sender: TObject); + procedure SerialEditChange(Sender: TObject); + procedure GridBandChangeClick(Sender: TObject); + procedure ZLinkmonitor1Click(Sender: TObject); + procedure Load1Click(Sender: TObject); + procedure SortbyTime1Click(Sender: TObject); + procedure About1Click(Sender: TObject); + procedure DateEditChange(Sender: TObject); + procedure TimeEditDblClick(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure Options1Click(Sender: TObject); + procedure Edit1Click(Sender: TObject); + procedure CWF1MouseDown(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); + procedure HemisphereButton8MouseDown(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + procedure Edit2Click(Sender: TObject); + procedure VoiceF1MouseDown(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); + procedure HemisphereButton1MouseDown(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + procedure Backup1Click(Sender: TObject); + procedure CWKeyboard1Click(Sender: TObject); + procedure EditEnter(Sender: TObject); + procedure mnMergeClick(Sender: TObject); + procedure ZServer1Click(Sender: TObject); + procedure ConnecttoZServer1Click(Sender: TObject); + procedure GridModeChangeClick(Sender: TObject); + procedure GridOperatorClick(Sender: TObject); + procedure SendSpot1Click(Sender: TObject); + procedure NumberEditKeyUp(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure NewPowerMenuClick(Sender: TObject); + procedure NewPowerEditClick(Sender: TObject); + procedure OpEditClick(Sender: TObject); + procedure PowerEditKeyPress(Sender: TObject; var Key: Char); + procedure PowerEditChange(Sender: TObject); + procedure CheckCall1Click(Sender: TObject); + procedure GridClick(Sender: TObject); + procedure FormActivate(Sender: TObject); + procedure CreateDupeCheckSheetZPRINT1Click(Sender: TObject); + procedure MemoHotKeyEnter(Sender: TObject); + procedure memo1Click(Sender: TObject); + procedure rst1Click(Sender: TObject); + procedure callsign1Click(Sender: TObject); + procedure ShowCurrentBandOnlyClick(Sender: TObject); + procedure pushqso1Click(Sender: TObject); + procedure pullqso1Click(Sender: TObject); + procedure GridTopLeftChanged(Sender: TObject); + procedure TXTSaveDialogTypeChange(Sender: TObject); + procedure GridMouseUp(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); + procedure memo21Click(Sender: TObject); + procedure StatusLineResize(Sender: TObject); + procedure PrintLogSummaryzLog1Click(Sender: TObject); + procedure CQRepeatVoice2Click(Sender: TObject); + procedure CQRepeatVoice1Click(Sender: TObject); + procedure mPXListWPXClick(Sender: TObject); + procedure mSummaryFileClick(Sender: TObject); + procedure op1Click(Sender: TObject); + procedure GridPowerChangeClick(Sender: TObject); + procedure RigControl1Click(Sender: TObject); + procedure Console1Click(Sender: TObject); + procedure MergeFile1Click(Sender: TObject); + procedure RunningFrequencies1Click(Sender: TObject); + procedure mnCheckCountryClick(Sender: TObject); + procedure mnCheckMultiClick(Sender: TObject); + procedure StatusLineDrawPanel(StatusBar: TStatusBar; + Panel: TStatusPanel; const Rect: TRect); + procedure Bandscope1Click(Sender: TObject); + procedure mnChangeTXNrClick(Sender: TObject); + procedure GridKeyPress(Sender: TObject; var Key: Char); + procedure mnGridAddNewPXClick(Sender: TObject); + procedure GridSelectCell(Sender: TObject; Col, Row: Integer; + var CanSelect: Boolean); + procedure GridSetEditText(Sender: TObject; ACol, ARow: Integer; + const Value: String); + procedure GridGetEditText(Sender: TObject; ACol, ARow: Integer; + var Value: String); + procedure Togglerig1Click(Sender: TObject); + procedure mnHideCWPhToolBarClick(Sender: TObject); + procedure mnHideMenuToolbarClick(Sender: TObject); + procedure Scratchsheet1Click(Sender: TObject); + procedure IncreaseFontSize1Click(Sender: TObject); + procedure mnMMTTYClick(Sender: TObject); + procedure mnTTYConsoleClick(Sender: TObject); + procedure SwitchCWBank(Action : integer); + procedure QTC1Click(Sender: TObject); + procedure mnNewBandScopeClick(Sender: TObject); + procedure QuickReference1Click(Sender: TObject); + procedure Timer2Timer(Sender: TObject); + procedure CreateELogJARL1Click(Sender: TObject); + private + TempQSOList : TList; + clStatusLine : TColor; + OldCallsign, OldNumber : string; + defaultTextColor : TColor; + procedure DeleteCurrentRow; + Procedure MultipleDelete(A, B : LongInt); + public + EditScreen : TBasicEdit; + LastFocus : TEdit; + procedure LoadNewContestFromFile(FileName : string); + procedure RenewCWToolBar; + procedure RenewVoiceToolBar; + procedure OnTabPress; + procedure DownKeyPress; + procedure MonitorPort; + procedure PushQSO(aQSO : TQSO); + procedure PullQSO; + procedure SetR(var aQSO : TQSO); // RST + procedure SetS(var aQSO : TQSO); + + //procedure SetQSOBand(var aQSO : TQSO; Up : boolean); + function GetNextBand(BB : TBand; Up : boolean) : TBand; + + procedure SetQSOMode(var aQSO : TQSO); + procedure WriteStatusLine(S : string; WriteConsole : boolean); + procedure WriteStatusLineRed(S : string; WriteConsole : boolean); + procedure CallsignSentProc; // called when callsign is sent; + procedure Update10MinTimer; //10 min countdown + procedure SetDispHeight(H : integer); // sets grid's row height 18..40 pts + procedure ProcessConsoleCommand(S : string); + procedure UpdateBand(B : TBand); // takes care of window disp + procedure UpdateMode(M : TMode); + {procedure LogQSO(aQSO : TQSO); } + function MergeFile(Filename : string) : integer; // merges filename to current data. returns #QSOs added + function NewQSOID : integer; + procedure DisableNetworkMenus; + procedure EnableNetworkMenus; + procedure SaveFileAndBackUp; + procedure ReEvaluateCountDownTimer; + procedure ReEvaluateQSYCount; + procedure RestoreWindowStates; + procedure RecordWindowStates; + procedure SwitchLastQSOBandMode; + procedure IncFontSize; + procedure AutoInput(D : TBSData); + end; + +var + MainForm: TMainForm; + CurrentQSO: TQSO; + +const + MyContest : TContest = nil; + +const DisplayedQSOs : integer = 15; + + +procedure StartDebugTimer; +procedure EndDebugTimer; + +implementation + +uses UPartials, UALLJAEditDialog, UAbout, URateDialog, UMenu, UACAGMulti, + USuperCheck, UACAGScore, UALLJAScore, UWWMulti, UWWScore, UWWZone, UComm, + UJIDXMulti, UJIDXScore, UJIDXScore2, UZLinkForm, UWPXMulti, UWPXScore, + UPediScore, UCWKeyBoard, UJIDX_DX_Multi, UJIDX_DX_Score, UChat, + UGeneralMulti2, UGeneralScore, USpotForm, UFDMulti, UARRLDXMulti, + UARRLDXScore, UARRLWMulti, UAPSprintScore, UJA0Multi, UJA0Score, + {UCheckCall,} UKCJMulti, USixDownMulti, USixDownScore, UIARUMulti, + UIARUScore, UAllAsianScore, UIOTAMulti, {UIOTACategory,} UARRL10Multi, + UARRL10Score, UFreqList, UCheckCall2, UCheckCountry, UCheckMulti, + {ubandscope,} uBandScope2, UIntegerDialog, UNewPrefix, UKCJScore, UScratchSheet, + UQTCForm, UWAEScore, UWAEMulti, UQuickRef; + +{$R *.DFM} + +const FirstTime : boolean = True; + +var Device_Selector : Word; + +DebugTimer : TDateTime; + +procedure StartDebugTimer; +begin + DebugTimer := Now; +end; + +procedure EndDebugTimer; +var T : TDateTime; + ms : integer; +begin + T := Now - DebugTimer; + ms := Trunc(T*24*60*60*1000); + MainForm.WriteStatusLine(IntToStr(ms), false); +end; + +function TMainForm.NewQSOID : integer; +var tt, ss, rr : integer; +begin + tt := Options.Settings._txnr; + if tt > 21 then + tt := 21; + ss := GLOBALSERIAL; + inc(GLOBALSERIAL); + if GLOBALSERIAL > 9999 then + GLOBALSERIAL := 0; + rr := random(100); + Result := tt*100000000+ss*10000+rr*100; +end; + +function TMainForm.MergeFile(Filename : string) : integer; +var Q : TQSO; + f : file of TQSOdata; + i, j, merged : integer; + boo : boolean; +begin + merged := 0; + Q := TQSO.Create; + System.assign(f, FileName); + reset(f); + read(f,Q.QSO); // first qso comment + for i := 1 to FileSize(f)-1 do + begin + read(f,Q.QSO); + boo := False; + for j := 1 to Log.TotalQSO do + if SameQSO(Q, TQSO(Log.List[j])) then + begin + boo := True; + break; + end; + if boo = False then + begin + Log.Add(Q); + inc(merged); + end; + end; + System.close(f); + Q.Free; + Result := merged; +end; + +procedure TMainForm.ReEvaluateCountDownTimer; +var mytx, i : integer; + TL : TList; + Q, QQ : TQSO; +begin + + TL := TList.Create; + mytx := Options.GetTXNr; + for i := 1 to Log.TotalQSO do + if TQSO(Log.List[i]).QSO.TX = mytx then + TL.Add(TQSO(Log.List[i])); + Q := nil; + if TL.Count = 0 then + begin + CountDownStartTime := 0; + exit; + end; + Q := TQSO(TL[TL.Count-1]); + for i := TL.Count - 2 downto 0 do // if there's only 1 qso then it won't loop + begin + QQ := TQSO(TL[i]); + if QQ.QSO.Band <> Q.QSO.Band then + begin + CountDownStartTime := Q.QSO.Time; + break; + end + else + Q := QQ; + end; + CountDownStartTime := Q.QSO.Time; + TL.Free; +end; + +procedure TMainForm.ReEvaluateQSYCount; +var mytx, i : integer; + TL : TList; + Q, QQ : TQSO; + aTime : TDateTime; + Hr, Min, Sec, mSec : word; +begin + if Options.Settings._qsycount = false then + exit; + + TL := TList.Create; + mytx := Options.GetTXNr; + for i := 1 to Log.TotalQSO do + if TQSO(Log.List[i]).QSO.TX = mytx then + TL.Add(TQSO(Log.List[i])); + Q := nil; + QSYCount := 0; + if TL.Count = 0 then + exit; + + Q := TQSO(TL[TL.Count-1]); + + aTime := CurrentTime; + DecodeTime(aTime, Hr, Min, Sec, MSec); + aTime := EncodeTime(Hr, 0, 0, 0); + aTime := Int(CurrentTime) + aTime; + + for i := TL.Count - 2 downto 0 do // if there's only 1 qso then it won't loop + begin + QQ := TQSO(TL[i]); + if QQ.QSO.Time < aTime then + break; + if QQ.QSO.Band <> Q.QSO.Band then + Inc(QSYCount); + Q := QQ; + end; + + TL.Free; +end; + +{procedure TMainForm.ReEvaluateCountDownTimer; +var t, mytx, i, j : integer; + MostRecentQSO, Q1, Q2 : TQSO; +begin + if Log.TotalQSO > 0 then + begin + t := Log.TotalQSO; + mytx := Options.GetTXnr; + + MostRecentQSO := nil; + for i := t downto 1 do + begin + if TQSO(Log.List[i]).QSO.TX = mytx then + begin + MostRecentQSO := TQSO(Log.List[i]); + break; + end; + end; + if MostRecentQSO = nil then + begin + CountDownStartTime := 0; + exit; + end + else + begin + if Now - MostRecentQSO.QSO.Time > 10.0/(60*24) then + CountDownStartTime := 0 + else + begin + Q2 := MostRecentQSO; + for j := i - 1 downto 1 do + begin + Q1 := TQSO(Log.List[j]); + if Q1.QSO.TX = mytx then + begin + if Q2.QSO.Band <> Q1.QSO.Band then + begin + CountDownStartTime := Q2.QSO.Time; + exit; + end + else + begin + Q2 := Q1; + end; + end; + if Q1.QSO.Tx = mytx then + CountDownStartTime := Q1.QSO.Time + else + CountDownStartTime := Q2.QSO.Time; + end; + end; + end; + end; +end;} + +procedure TMainForm.WriteStatusLine(S : string; WriteConsole : boolean); +begin + if ContainsDoubleByteChar(S) then + begin + StatusLine.Font.Name := 'lr oSVbN'; + StatusLine.Font.Charset := 128; // shift jis + end + else + begin + StatusLine.Font.Name := 'MS Sans Serif'; + StatusLine.Font.Charset := 0; // shift jis + end; + clStatusLine := clWindowText; + StatusLine.Panels[0].Text := S; + if WriteConsole then + ConsolePad.AddLine(S); +end; + +procedure TMainForm.WriteStatusLineRed(S : string; WriteConsole : boolean); +begin + clStatusLine := clRed; + if ContainsDoubleByteChar(S) then + begin + StatusLine.Font.Name := 'lr oSVbN'; + StatusLine.Font.Charset := 128; // shift jis + end + else + begin + StatusLine.Font.Name := 'MS Sans Serif'; + StatusLine.Font.Charset := 0; // shift jis + end; + StatusLine.Panels[0].Text := S; + if WriteConsole then + ConsolePad.AddLine(S); +end; + +procedure TMainForm.PushQSO(aQSO : TQSO); +const TEMPQSOMAX = 5; +var i : integer; + Q : TQSO; +begin + i := TempQSOList.Count; + Q := TQSO.Create; + Q.QSO := aQSO.QSO; + TempQSOList.Insert(0, Q); + if TempQSOList.Count > TEMPQSOMAX then + begin + i := TempQSOList.Count; + Q := TQSO(TempQSOList[i-1]); + TempQSOList.Delete(i-1); + Q.Free; + end; +end; + +procedure TMainForm.PullQSO; +var i : integer; +begin + i := TempQSOList.Count; + if i > 0 then + begin + CurrentQSO.QSO := TQSO(TempQSOList[0]).QSO; + + CallsignEdit.Text := CurrentQSO.QSO.Callsign; + NumberEdit.Text := CurrentQSO.QSO.NrRcvd; + BandEdit.Text := MHzString[CurrentQSO.QSO.Band]; + PowerEdit.Text := CurrentQSO.PowerStr; + NewPowerEdit.Text := NewPowerString[CurrentQSO.QSO.Power]; + PointEdit.Text := CurrentQSO.PointStr; + RcvdRSTEdit.Text := CurrentQSO.RSTStr; + CurrentQSO.UpdateTime; + TimeEdit.Text := CurrentQSO.TimeStr; + DateEdit.Text := CurrentQSO.DateStr; + //ModeEdit.Text := CurrentQSO.ModeStr; + + ModeEdit.Text := ModeString[CurrentQSO.QSO.mode]; + + If CurrentQSO.QSO.mode in [mSSB..mAM] then + begin + Grid.Align := alNone; + SSBToolBar.Visible := True; + CWToolBar.Visible := False; + Grid.Align := alClient; + end + else + begin + Grid.Align := alNone; + CWToolBar.Visible := True; + SSBToolBar.Visible := False; + Grid.Align := alClient; + end; + TempQSOList.Move(0,i-1); + end; +end; + +function GetPointerToMemory(BaseMem:dWord; Size:Word):Pointer; +begin + { Device_Selector:=AllocSelector(DSeg); + SetSelectorBase(Device_Selector,BaseMem shl 4); + SetSelectorLimit(Device_Selector,Size); + Result:=Ptr(Device_Selector,0); } +end; + +procedure TMainForm.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; + { Params.Caption := PChar('zLog main window'); } +end; + +function GetPort(address: Word): byte; +var + bValue: Byte; +begin + asm + mov DX, address + in AL, DX + mov bValue, AL + end; + result := bValue; +end; + +procedure TMainForm.MonitorPort; +{ +var p : byte; + i : integer; + str : string[10]; + } +begin +{ + p := GetPort(Options.Settings._cwport); + str := ''; + for i := 1 to 8 do + begin + str := chr(($01 and p) + ord('0')) + str; + p := p shr 1; + end; + } +end; + +procedure TMainForm.RenewCWToolBar; +var i : integer; +begin + if Options.SideTone then + SideToneButton.Down := True + else + SideToneButton.Down := False; + SpeedBar.Position := Options.Speed; + SpeedLabel.Caption := IntToStr(Options.Speed)+' wpm'; + i := Options.Settings.CW.CurrentBank; + CWF1.Hint := Options.CWMessage(i, 1); + CWF2.Hint := Options.CWMessage(i, 2); + CWF3.Hint := Options.CWMessage(i, 3); + CWF4.Hint := Options.CWMessage(i, 4); + CWF5.Hint := Options.CWMessage(i, 5); + CWF6.Hint := Options.CWMessage(i, 6); + CWF7.Hint := Options.CWMessage(i, 7); + CWF8.Hint := Options.CWMessage(i, 8); +end; + +procedure TMainForm.RenewVoiceToolBar; +begin + {if Options.SideTone then + SideToneButton.Down := True + else + SideToneButton.Down := False; + SpeedBar.Position := Options.Speed; + SpeedLabel.Caption := IntToStr(Options.Speed)+' wpm'; + CWF1.Hint := Options.CWMessage(1, 1); + CWF2.Hint := Options.CWMessage(1, 2); + CWF3.Hint := Options.CWMessage(1, 3); + CWF4.Hint := Options.CWMessage(1, 4); + CWF5.Hint := Options.CWMessage(1, 5); + CWF6.Hint := Options.CWMessage(1, 6); + CWF7.Hint := Options.CWMessage(1, 7); + CWF8.Hint := Options.CWMessage(1, 8);} +end; + +procedure TContest.SetBand(B : TBand); +begin +end; + +procedure TContest.WriteSummary(filename : string); // creates summary file +var f : textfile; + S : string; +begin + if Log.Year = 0 then + exit; + assign(f, filename); + rewrite(f); + S := FillRight('Year:',12) + IntToStr(Log.Year); + writeln(f, S); + writeln(f); + writeln(f, Name); + writeln(f); + S := FillRight('Callsign:',12) + Options.MyCall; + writeln(f, S); + writeln(f); + writeln(f, 'Country: '); + writeln(f); + S := FillRight('Category:',12); + if Options.MultiOp > 0 then + S := S + 'Multi Operator ' + else + S := S + 'Single Operator '; + if Options.Band = 0 then + S := S + 'All band' + else + S := S + MHzString[TBand(Ord(Options.Band)-1)]; + S := S + ' '; + case Options.Mode of + 0 : S := S + 'Phone/CW'; + 1 : S := S + 'CW'; + 2 : S := S + 'Phone'; + end; + writeln(f, S); + writeln(f); + writeln(f, 'Band(MHz) QSOs Points Multi.'); + + writeln(f, 'Total'); + writeln(f, 'Score'); + + + writeln(f); + + close(f); +end; + +function TARRL10Contest.CheckWinSummary(aQSO : TQSO) : string; // returns summary for checkcall etc. +var str : string; +begin + str := aQSO.CheckCallSummary; + if aQSO.QSO.Mode = mCW then + Insert('CW ', str, 5) + else + Insert('Ph ', str, 5); + Result := str; +end; + +{ +function TIARUContest.CheckWinSummary(aQSO : TQSO) : string; // returns summary for checkcall etc. +var str : string; +begin + str := aQSO.CheckCallSummary; + if aQSO.QSO.Mode = mCW then + Insert('CW ', str, 5) + else + Insert('Ph ', str, 5); + Result := str; +end; +} + +function TContest.CheckWinSummary(aQSO : TQSO) : string; // returns summary for checkcall etc. +begin + Result := aQSO.CheckCallSummary; +end; + +function TContest.QTHString : string; +begin + Result := Options.Settings._city; +end; + +procedure TContest.SetPoints(var aQSO : TQSO); +begin +end; + +Procedure TContest.DispExchangeOnOtherBands; +var boo : boolean; + j : integer; + B : TBand; +begin + boo := false; + for j := 1 to Log.TotalQSO do + begin + if CurrentQSO.QSO.callsign = TQSO(Log.List[j]).QSO.callsign then + begin + boo := true; + break; + end; + end; + if boo then + begin + MainForm.NumberEdit.Text := TQSO(Log.List[j]).QSO.NrRcvd; + CurrentQSO.QSO.NrRcvd := TQSO(Log.List[j]).QSO.NrRcvd; + end + else {check SubLog 0.23} + begin + {for B := b19 to HiBand do + begin + for j := 1 to SubLog[B].TotalQSO do + begin + if CurrentQSO.QSO.callsign = TQSO(SubLog[B].List[j]).QSO.callsign then + begin + MainForm.NumberEdit.Text := TQSO(SubLog[B].List[j]).QSO.NrRcvd; + CurrentQSO.QSO.NrRcvd := TQSO(SubLog[B].List[j]).QSO.NrRcvd; + exit; + end; + end; + end;} + end; +end; + +Procedure TACAGContest.DispExchangeOnOtherBands; +var boo : boolean; + j : integer; + B : TBand; + str : string; +begin + boo := false; + for j := 1 to Log.TotalQSO do + begin + if CurrentQSO.QSO.callsign = TQSO(Log.List[j]).QSO.callsign then + begin + boo := true; + break; + end; + end; + if boo then + begin + MainForm.NumberEdit.Text := TQSO(Log.List[j]).QSO.NrRcvd; + CurrentQSO.QSO.NrRcvd := TQSO(Log.List[j]).QSO.NrRcvd; + end + else {check SubLog 0.23} + begin + {for B := b19 to HiBand do + begin + for j := 1 to SubLog[B].TotalQSO do + begin + if CurrentQSO.QSO.callsign = TQSO(SubLog[B].List[j]).QSO.callsign then + begin + MainForm.NumberEdit.Text := TQSO(SubLog[B].List[j]).QSO.NrRcvd; + CurrentQSO.QSO.NrRcvd := TQSO(SubLog[B].List[j]).QSO.NrRcvd; + exit; + end; + end; + end;} + end; + + // added for acag + str := MainForm.NumberEdit.Text; + if str <> '' then + if str[length(str)] in ['H', 'M', 'L', 'P'] then + begin + MainForm.NumberEdit.SelStart := length(str) - 1; + MainForm.NumberEdit.SelLength := 1; + end; +end; + +Procedure TALLJAContest.DispExchangeOnOtherBands; +var boo : boolean; + j : integer; + B : TBand; + str : string; +begin + boo := false; + for j := 1 to Log.TotalQSO do + begin + if CurrentQSO.QSO.callsign = TQSO(Log.List[j]).QSO.callsign then + begin + boo := true; + break; + end; + end; + if boo then + begin + MainForm.NumberEdit.Text := TQSO(Log.List[j]).QSO.NrRcvd; + CurrentQSO.QSO.NrRcvd := TQSO(Log.List[j]).QSO.NrRcvd; + end + else {check SubLog 0.23} + begin + {for B := b19 to HiBand do + begin + for j := 1 to SubLog[B].TotalQSO do + begin + if CurrentQSO.QSO.callsign = TQSO(SubLog[B].List[j]).QSO.callsign then + begin + MainForm.NumberEdit.Text := TQSO(SubLog[B].List[j]).QSO.NrRcvd; + CurrentQSO.QSO.NrRcvd := TQSO(SubLog[B].List[j]).QSO.NrRcvd; + exit; + end; + end; + end; } + end; + + // added for allja (same as acag) + str := MainForm.NumberEdit.Text; + if str <> '' then + if str[length(str)] in ['H', 'M', 'L', 'P'] then + begin + MainForm.NumberEdit.SelStart := length(str) - 1; + MainForm.NumberEdit.SelLength := 1; + end; +end; + +Procedure TFDContest.DispExchangeOnOtherBands; +var j : integer; + B : TBand; + str : string; + currshf : boolean; + pastQSO, tempQSO : TQSO; + +label med; + +begin + + currshf := IsSHF(CurrentQSO.QSO.Band); + pastQSO := nil; + tempQSO := nil; + + for j := 1 to Log.TotalQSO do + begin + if CurrentQSO.QSO.callsign = TQSO(Log.List[j]).QSO.callsign then + begin + if currshf = IsSHF(TQSO(Log.List[j]).QSO.Band) then + begin + pastQSO := TQSO(Log.List[j]); + break; + end + else + begin + TempQSO := TQSO(Log.List[j]); + end; + end; + end; + + if pastQSO = nil then {check SubLog 0.23} + begin + { + for B := b19 to HiBand do + begin + for j := 1 to SubLog[B].TotalQSO do + begin + if CurrentQSO.QSO.callsign = TQSO(SubLog[B].List[j]).QSO.callsign then + begin + if currshf = IsSHF(TQSO(SubLog[B].List[j]).QSO.Band) then + begin + pastQSO := TQSO(SubLog[B].List[j]); + goto med; + end + else + begin + tempQSO := TQSO(SubLog[B].List[j]); + end; + end; + end; + end; } + end; + +med: + if pastQSO <> nil then + begin + MainForm.NumberEdit.Text := pastQSO.QSO.NrRcvd; + CurrentQSO.QSO.NrRcvd := pastQSO.QSO.NrRcvd; + end + else + begin + if tempQSO <> nil then + begin + if currshf = True then + begin + if length(tempQSO.QSO.NrRcvd) > 3 then + str := '01' + ExtractPower(tempQSO.QSO.NrRcvd) + else + str := tempQSO.QSO.NrRcvd; + MainForm.NumberEdit.Text := str; + CurrentQSO.QSO.NrRcvd := str; + end + else + begin + str := ExtractKenNr(tempQSO.QSO.NrRcvd) + ExtractPower(tempQSO.QSO.NrRcvd); + MainForm.NumberEdit.Text := str; + CurrentQSO.QSO.NrRcvd := str; + end; + end + else // if tempQSO = nil + begin + exit; + end; + end; + + // added for acag + str := MainForm.NumberEdit.Text; + if str <> '' then + if str[length(str)] in ['H', 'M', 'L', 'P'] then + begin + MainForm.NumberEdit.SelStart := length(str) - 1; + MainForm.NumberEdit.SelLength := 1; + end; +end; + +Procedure TSixDownContest.DispExchangeOnOtherBands; +var j : integer; + B : TBand; + str : string; + currshf : boolean; + pastQSO, tempQSO : TQSO; + +label med; + +begin + + currshf := IsSHF(CurrentQSO.QSO.Band); + pastQSO := nil; + tempQSO := nil; + + for j := 1 to Log.TotalQSO do + begin + if CurrentQSO.QSO.callsign = TQSO(Log.List[j]).QSO.callsign then + begin + if currshf = IsSHF(TQSO(Log.List[j]).QSO.Band) then + begin + pastQSO := TQSO(Log.List[j]); + break; + end + else + begin + TempQSO := TQSO(Log.List[j]); + end; + end; + end; + + if pastQSO = nil then {check SubLog 0.23} + begin + {for B := b19 to HiBand do + begin + for j := 1 to SubLog[B].TotalQSO do + begin + if CurrentQSO.QSO.callsign = TQSO(SubLog[B].List[j]).QSO.callsign then + begin + if currshf = IsSHF(TQSO(SubLog[B].List[j]).QSO.Band) then + begin + pastQSO := TQSO(SubLog[B].List[j]); + goto med; + end + else + begin + tempQSO := TQSO(SubLog[B].List[j]); + end; + end; + end; + end;} + end; + +med: + if pastQSO <> nil then + begin + MainForm.NumberEdit.Text := pastQSO.QSO.NrRcvd; + CurrentQSO.QSO.NrRcvd := pastQSO.QSO.NrRcvd; + end + else + begin + if tempQSO <> nil then + begin + if currshf = True then + begin + if length(tempQSO.QSO.NrRcvd) > 3 then + str := '01' + ExtractPower(tempQSO.QSO.NrRcvd) + else + str := tempQSO.QSO.NrRcvd; + MainForm.NumberEdit.Text := str; + CurrentQSO.QSO.NrRcvd := str; + end + else + begin + str := ExtractKenNr(tempQSO.QSO.NrRcvd) + ExtractPower(tempQSO.QSO.NrRcvd); + MainForm.NumberEdit.Text := str; + CurrentQSO.QSO.NrRcvd := str; + end; + end + else // if tempQSO = nil + begin + exit; + end; + end; + + // added for acag + str := MainForm.NumberEdit.Text; + if str <> '' then + if str[length(str)] in ['H', 'M', 'L', 'P'] then + begin + MainForm.NumberEdit.SelStart := length(str) - 1; + MainForm.NumberEdit.SelLength := 1; + end; +end; + + +Procedure TContest.SpaceBarProc; +begin + MultiFound := False; + if (MainForm.NumberEdit.Text = '') and (SameExchange = True)then + begin + DispExchangeOnOtherBands; + if MainForm.NumberEdit.Text <> '' then + MultiFound := True; + end; + if Options.Settings._entersuperexchange and (SuperCheck.Rcvd_Estimate <> '') then + if MainForm.NumberEdit.Text = '' then + if CoreCall(SuperCheck.FirstDataCall) = CoreCall(MainForm.CallsignEdit.Text) then + begin + MainForm.NumberEdit.Text := TrimRight(SuperCheck.Rcvd_Estimate); + MultiFound := True; + end; + if CheckMulti.Visible then + CheckMulti.Renew(CurrentQSO); +end; + +Procedure TIOTAContest.SpaceBarProc; +begin + inherited; + if MultiFound and (IOTAMulti.ExtractMulti(CurrentQSO) = '') then // serial number + MainForm.NumberEdit.Text := ''; +end; + +procedure TMainForm.SetR(var aQSO : TQSO); // r of RST +var i: integer; +begin + i := aQSO.QSO.RSTRcvd; + if i < 100 then + begin + if i > 50 then + i := 10 + (i mod 10) + else + i := i + 10; + end + else + begin + if i > 500 then + i := 100 + (i mod 100) + else + i := i + 100; + end; + aQSO.QSO.RSTRcvd := i; + //RcvdRSTEdit.Text := CurrentQSO.RSTStr; +end; + +procedure TMainForm.SetS(var aQSO : TQSO); +var i: integer; +begin + i := aQSO.QSO.RSTRcvd; + if i < 100 then + begin + if (i mod 10) = 9 then + i := 10*(i div 10) + 1 + else + i := i + 1; + end + else + begin + if ((i div 10) mod 10) = 9 then + i := 100*(i div 100) + 10 + (i mod 10) + else + i := i + 10; + end; + aQSO.QSO.RSTRcvd := i; + //RcvdRSTEdit.Text := CurrentQSO.RSTStr; +end; + +(* +procedure TMainForm.SetQSOBand(var aQSO : TQSO; Up : boolean); +var B0, B : TBand; + boo : boolean; +label xxx; +begin + boo := false; + for B := b19 to HiBand do + begin + if MainForm.BandMenu.Items[ord(B)].Visible and + MainForm.BandMenu.Items[ord(B)].Enabled then + boo := true; + end; + if boo = false then exit; {No QRVable and Contest allowed band} + + B0 := aQSO.QSO.band; + if Up then + begin + if B0 = HiBand then + B0 := b19 + else + inc(B0); + for B := B0 to HiBand do + if MainForm.BandMenu.Items[ord(B)].Visible and + MainForm.BandMenu.Items[ord(B)].Enabled then + goto xxx; + for B := b19 to B0 do + if MainForm.BandMenu.Items[ord(B)].Visible and + MainForm.BandMenu.Items[ord(B)].Enabled then + goto xxx; + end + else + begin + if B0 = b19 then + B0 := HiBand + else + dec(B0); + for B := B0 downto b19 do + if MainForm.BandMenu.Items[ord(B)].Visible and + MainForm.BandMenu.Items[ord(B)].Enabled then + goto xxx; + for B := HiBand downto B0 do + if MainForm.BandMenu.Items[ord(B)].Visible and + MainForm.BandMenu.Items[ord(B)].Enabled then + goto xxx; + end; + +xxx: + aQSO.QSO.band := B; +end; +*) + +function TMainForm.GetNextBand(BB : TBand; Up : boolean) : TBand; +var B0, B : TBand; + boo : boolean; +label xxx; +label top; +begin + Result := BB; + + + boo := false; + for B := b19 to HiBand do + begin + if MainForm.BandMenu.Items[ord(B)].Visible and + MainForm.BandMenu.Items[ord(B)].Enabled then + boo := true; + end; + if boo = false then exit; {No QRVable and Contest allowed band} + + B0 := BB; + +top: + if Up then + begin + if B0 = HiBand then + B0 := b19 + else + inc(B0); + for B := B0 to HiBand do + if MainForm.BandMenu.Items[ord(B)].Visible and + MainForm.BandMenu.Items[ord(B)].Enabled then + begin + if Options.Settings._dontallowsameband and RigControl.CheckSameBand(B) then + begin + end + else + goto xxx; + end; + for B := b19 to B0 do + if MainForm.BandMenu.Items[ord(B)].Visible and + MainForm.BandMenu.Items[ord(B)].Enabled then + begin + if Options.Settings._dontallowsameband and RigControl.CheckSameBand(B) then + begin + end + else + goto xxx; + end; + end + else + begin + if B0 = b19 then + B0 := HiBand + else + dec(B0); + for B := B0 downto b19 do + if MainForm.BandMenu.Items[ord(B)].Visible and + MainForm.BandMenu.Items[ord(B)].Enabled then + begin + if Options.Settings._dontallowsameband and RigControl.CheckSameBand(B) then + begin + end + else + goto xxx; + end; + for B := HiBand downto B0 do + if MainForm.BandMenu.Items[ord(B)].Visible and + MainForm.BandMenu.Items[ord(B)].Enabled then + begin + if Options.Settings._dontallowsameband and RigControl.CheckSameBand(B) then + begin + end + else + goto xxx; + end; + end; + +xxx: + + if RigControl.Rig <> nil then // keep band within Rig + begin + if (B > RigControl.Rig._maxband) or (B < RigControl.Rig._minband) then + begin + B0 := B; + goto top; + end; + end; + + Result := B; +end; + +procedure TMainForm.BandMenuClick(Sender: TObject); +begin +(* + Options.CurrentPower[CurrentQSO.QSO.Band] := CurrentQSO.QSO.Power; + Options.CurrentPower2[CurrentQSO.QSO.Band] := CurrentQSO.QSO.Power2; + + BandEdit.Text := MHzString[Tband(TMenuItem(Sender).Tag)]; + CurrentQSO.QSO.band := Tband(TMenuItem(Sender).Tag); + + MyContest.SetPoints(CurrentQSO); + MainForm.PointEdit.Text := CurrentQSO.PointStr; // ver 0.23 + + ZLinkForm.SendBand; // ver 0.41 + + if NewPowerEdit.Visible then + begin + CurrentQSO.QSO.Power := Options.CurrentPower[CurrentQSO.QSO.Band]; + Options.SetOpPower(CurrentQSO); + NewPowerEdit.Text := CurrentQSO.NewPowerStr; + end; + + if PowerEdit.Visible then + begin + CurrentQSO.QSO.Power2 := Options.CurrentPower2[CurrentQSO.QSO.Band]; + PowerEdit.Text := CurrentQSO.PowerStr; + end; + + if MyContest.MultiForm.Visible then + MyContest.MultiForm.Update; + + if PartialCheck.Visible then + PartialCheck.Update(CurrentQSO); + + + if ShowCurrentBandOnly.Checked then + begin + EditScreen.Renew; + EditScreen.RefreshScreen; + end; +*) + + UpdateBand(Tband(TMenuItem(Sender).Tag)); + + if RigControl.Rig <> nil then + begin + RigControl.Rig.SetBand(CurrentQSO); + if CurrentQSO.QSO.Mode = mSSB then + RigControl.Rig.SetMode(CurrentQSO); + end; + + LastFocus.SetFocus; +end; + +procedure TMainForm.UpdateBand(B : TBand); // called from rigcontrol too +begin + + Options.CurrentPower[CurrentQSO.QSO.Band] := CurrentQSO.QSO.Power; + Options.CurrentPower2[CurrentQSO.QSO.Band] := CurrentQSO.QSO.Power2; + + BandEdit.Text := MHzString[B]; + + if MainForm.SerialEdit.Visible then + if SerialContestType = SER_BAND then + begin + SerialArray[CurrentQSO.QSO.Band] := CurrentQSO.QSO.Serial; + CurrentQSO.QSO.Serial := SerialArray[B]; + MainForm.SerialEdit.Text := CurrentQSO.SerialStr; + end; + + CurrentQSO.QSO.band := B; + + {BGK32LIB._bandmask := (Options.Settings._BandData[B] * 16); + BGK32LIB.UpdateDataPort; } + RigControl.SetBandMask; + + if MyContest <> nil then + MyContest.SetPoints(CurrentQSO); + MainForm.PointEdit.Text := CurrentQSO.PointStr; // ver 0.23 + + ZLinkForm.SendBand; // ver 0.41 + + if NewPowerEdit.Visible then + begin + CurrentQSO.QSO.Power := Options.CurrentPower[B]; + Options.SetOpPower(CurrentQSO); + NewPowerEdit.Text := CurrentQSO.NewPowerStr; + end; + + if PowerEdit.Visible then + begin + CurrentQSO.QSO.Power2 := Options.CurrentPower2[B]; + // Options.SetOpPower(CurrentQSO); + PowerEdit.Text := CurrentQSO.PowerStr; + end; + + if MyContest <> nil then + if MyContest.MultiForm.Visible then + MyContest.MultiForm.Update; + + if PartialCheck.Visible then + PartialCheck.Update(CurrentQSO); + + if ShowCurrentBandOnly.Checked then + begin + EditScreen.Renew; + EditScreen.RefreshScreen; + end; + //LastFocus.SetFocus; + //BandScope.SetBandMode(CurrentQSO.QSO.Band, CurrentQSO.QSO.Mode); + BandScope2.SetBandMode(CurrentQSO.QSO.Band, CurrentQSO.QSO.Mode); + + if Options.Settings._countdown and (CountDownStartTime > 0) then + WriteStatusLineRed('Less than 10 min since last QSY!', false); + + if RigControl.Rig = nil then + ZLinkForm.SendFreqInfo(round(RigControl.TempFreq[B]*1000)); +end; + +procedure TMainForm.UpdateMode(M : TMode); +begin + ModeEdit.Text := ModeString[M]; + CurrentQSO.QSO.mode := M; + If M in [mSSB, mFM, mAM] then + begin + CurrentQSO.QSO.RSTrcvd := 59; + CurrentQSO.QSO.RSTsent := 59; + RcvdRSTEdit.Text := '59'; + Grid.Align := alNone; + SSBToolBar.Visible := True; + CWToolBar.Visible := False; + Grid.Align := alClient; + end + else + begin + CurrentQSO.QSO.RSTrcvd := 599; + CurrentQSO.QSO.RSTsent := 599; + RcvdRSTEdit.Text := '599'; + Grid.Align := alNone; + CWToolBar.Visible := True; + SSBToolBar.Visible := False; + Grid.Align := alClient; + end; + if MyContest <> nil then + if MyContest.MultiForm.Visible then + MyContest.MultiForm.Update; + + if MyContest <> nil then + MyContest.SetPoints(CurrentQSO); + MainForm.PointEdit.Text := CurrentQSO.PointStr; + + //BandScope.SetBandMode(CurrentQSO.QSO.Band, CurrentQSO.QSO.Mode); + BandScope2.SetBandMode(CurrentQSO.QSO.Band, CurrentQSO.QSO.Mode); + + +end; + +procedure TContest.ChangeBand(Up : boolean); +begin + MainForm.UpdateBand(MainForm.GetNextBand(CurrentQSO.QSO.Band, Up)); + if RigControl.Rig <> nil then + begin + RigControl.Rig.SetBand(CurrentQSO); + if CurrentQSO.QSO.Mode = mSSB then + RigControl.Rig.SetMode(CurrentQSO); + RigControl.SetBandMask; + end; +end; + +procedure TMainForm.SetQSOMode(var aQSO : TQSO); +var maxmode : TMode; +begin + maxmode := mOther; + case aQSO.QSO.band of + b19..b28 : maxmode := mSSB; + b50 : maxmode := mAM; + b144..HiBand : maxmode := mFM; + end; + if Pos('Pedition',MyContest.Name) > 0 then + maxmode := mOther; + if aQSO.QSO.mode < maxmode then + inc(aQSO.QSO.mode) + else + aQSO.QSO.mode := mCW; +end; + +procedure TContest.ChangeMode; +begin + MainForm.SetQSOMode(CurrentQSO); + MainForm.UpdateMode(CurrentQSO.QSO.Mode); +{ + MainForm.ModeEdit.Text := ModeString[CurrentQSO.QSO.mode]; + + If CurrentQSO.QSO.mode in [mSSB..mAM] then + begin + CurrentQSO.QSO.RSTrcvd := 59; + CurrentQSO.QSO.RSTsent := 59; + MainForm.RcvdRSTEdit.Text := '59'; + MainForm.Grid.Align := alNone; + MainForm.SSBToolBar.Visible := True; + MainForm.CWToolBar.Visible := False; + MainForm.Grid.Align := alClient; + end + else + begin + CurrentQSO.QSO.RSTrcvd := 599; + CurrentQSO.QSO.RSTsent := 599; + MainForm.RcvdRSTEdit.Text := '599'; + MainForm.Grid.Align := alNone; + MainForm.CWToolBar.Visible := True; + MainForm.SSBToolBar.Visible := False; + MainForm.Grid.Align := alClient; + end; + + if MyContest.MultiForm.Visible then + MyContest.MultiForm.Update; + + MyContest.SetPoints(CurrentQSO); + MainForm.PointEdit.Text := CurrentQSO.PointStr; } + if RigControl.Rig <> nil then + RigControl.Rig.SetMode(CurrentQSO); +end; + +procedure TContest.ChangePower; +begin + if CurrentQSO.QSO.Power = pwrH then + CurrentQSO.QSO.Power := pwrP + else + inc(CurrentQSO.QSO.Power); + MainForm.NewPowerEdit.Text := CurrentQSO.NewPowerStr; +end; + +constructor TWanted.Create; +begin + Multi := ''; + Bands := []; +end; + +constructor TContest.Create(N : string); +var i : integer; + B : TBand; +begin + WantedList := TList.Create; + + SameExchange := True; + Options.Settings._sameexchange := SameExchange; + MainForm.MultiButton.Enabled := True; // toolbar + MainForm.Multipliers1.Enabled := True; // menu + MainForm.mnCheckCountry.Visible := False; // checkcountry window + MainForm.mnCheckMulti.Caption := 'Check Multi'; + Name := N; + CONTESTNAME := N; // zlogglobal + + Log.AcceptDifferentMode := False; + Log.CountHigherPoints := False; + + TQSO(Log.List[0]).QSO.Callsign := Options.Settings._mycall; //Callsign + TQSO(Log.List[0]).QSO.Memo := N; //Contest name + TQSO(Log.List[0]).QSO.RSTSent := UTCOffset; //UTC = $FFFF else UTC + x hrs; + TQSO(Log.List[0]).QSO.RSTRcvd := 0; // or Field Day coefficient + + for i := 0 to ord(High(TBand)) do + begin + MainForm.BandMenu.Items[i].Visible := True; + end; + MainForm.BandMenu.Items[ord(b10)].Visible := False; + MainForm.BandMenu.Items[ord(b18)].Visible := False; + MainForm.BandMenu.Items[ord(b24)].Visible := False; + + SerialContestType := 0; + for B := b19 to HiBand do + SerialArray[B] := 1; + for i := 0 to 64 do + SerialArrayTX[i] := 1; + //MainForm.EditScreen.Renew; +end; + +procedure TContest.PostWanted(S : string); +var ss, mm : string; + i, bb : integer; + W : TWanted; + +begin + ss := copy(S, 1, 2); + ss := TrimRight(ss); + + bb := StrToInt(ss); + if bb <= ord(HiBand) then + begin + mm := copy(S, 3, 255); + mm := TrimLeft(mm); + mm := TrimRight(mm); + for i := 0 to WantedList.Count - 1 do + begin + W := TWanted(WantedList[i]); + if W.Multi = mm then + begin + W.Bands := W.Bands + [TBand(bb)]; + exit; + end; + end; + W := TWanted.Create; + W.Multi := mm; + W.Bands := [TBand(bb)]; + WantedList.Add(W); + end; +end; + +procedure TContest.DelWanted(S : string); +var ss, mm : string; + i, bb : integer; + W : TWanted; +begin + ss := copy(S, 1, 2); + ss := TrimRight(ss); + + bb := StrToInt(ss); + if bb <= ord(HiBand) then + begin + mm := copy(S, 3, 255); + mm := TrimLeft(mm); + mm := TrimRight(mm); + for i := 0 to WantedList.Count - 1 do + begin + W := TWanted(WantedList[i]); + if W.Multi = mm then + begin + W.Bands := W.Bands - [TBand(bb)]; + if W.Bands = [] then + begin + W.Free; + WantedList.Delete(i); + WantedList.Pack; + end; + exit; + end; + end; + end; +end; + + +procedure TContest.ClearWanted; +var W : TWanted; + i : integer; +begin + for i := 0 to WantedList.Count - 1 do + begin + W := TWanted(WantedList[i]); + W.Free; + end; + WantedList.Clear; +end; + + +function TContest.ValidBand(B : TBand) : boolean; +begin + Result := MainForm.BandMenu.Items[ord(B)].Visible; +end; + +destructor TContest.Destroy; +begin + inherited; + +end; + +procedure TContest.SetNrSent(var aQSO : TQSO); +var s : string; +begin + s := SetStrNoAbbrev(Options.Settings._sentstr, aQSO); + aQSO.QSO.NrSent := s; +end; + +function TContest.ADIF_ExchangeRX_FieldName : string; +begin + if SerialContestType <> 0 then + Result := 'srx' + else + Result := 'qth'; +end; + +function TCQWWContest.ADIF_ExchangeRX_FieldName : string; +begin + Result := 'cqz'; +end; + +function TIARUContest.ADIF_ExchangeRX_FieldName : string; +begin + Result := 'ituz'; +end; + +function TARRLDXContestDX.ADIF_ExchangeRX_FieldName : string; +begin + Result := 'state'; +end; + +function TARRLDXContestW.ADIF_ExchangeRX_FieldName : string; +begin + Result := 'rx_pwr'; +end; + +function TAllAsianContest.ADIF_ExchangeRX_FieldName : string; +begin + Result := 'age'; +end; + +function TContest.ADIF_ExchangeRX(aQSO : TQSO) : string; +begin + Result := aQSO.QSO.NrRcvd; +end; + +function TContest.ADIF_ExtraFieldName : string; +begin + Result := ''; +end; + +function TContest.ADIF_ExtraField(aQSO : TQSO) : string; +begin + Result := ''; +end; + +function TCQWPXContest.ADIF_ExtraFieldName : string; +begin + Result := 'pfx'; +end; + +function TCQWPXContest.ADIF_ExtraField(aQSO : TQSO) : string; +begin + Result := aQSO.QSO.Multi1; +end; + +procedure TContest.ADIF_Export(FileName : string); +var f : textfile; + Header, S, temp : string; + i : integer; + aQSO : TQSO; + offsetmin : integer; + dbl : double; +begin + Header := 'ADIF export from zLog for Windows'; //+Options.Settings._mycall; + assignfile(f, Filename); + rewrite(f); + {str := 'zLog for Windows Text File';} + writeln(f, Header); + writeln(f, 'All times in UTC'); + writeln(f, 'Yohei Yokobayashi AD6AJ/JJ1MED'); + writeln(f, ''); + offsetmin := TQSO(Log.List[0]).QSO.RSTSent; + {if offsetmin = 0 then // default JST for older versions + offsetmin := -1*9*60; } + if offsetmin = _USEUTC then //already recorded in utc + offsetmin := 0; + dbl := offsetmin / (24*60); + for i := 1 to Log.TotalQSO do + begin + aQSO := TQSO(Log.List[i]); + S := ''; + S := S + FormatDateTime('yyyymmdd', aQSO.QSO.Time + dbl); + S := S + '' + FormatDateTime('hhnn',aQSO.QSO.Time + dbl); + S := S + '' + FormatDateTime('hhnn',aQSO.QSO.Time + dbl); + + temp := aQSO.QSO.Callsign; + S := S + ''+ temp; + + temp := IntToStr(aQSO.QSO.RSTsent); + S := S + '' + temp; + + if SerialContestType <> 0 then + begin + temp := IntToStr(aQSO.QSO.Serial); + S := S + '' + temp; + end; + + temp := IntToStr(aQSO.QSO.RSTrcvd); + S := S + '' + temp; + + temp := ADIF_ExchangeRX(aQSO); + S := S + '<'+ADIF_ExchangeRX_FieldName+':' + + IntToStr(length(temp))+'>' + temp; + + temp := ADIF_ExtraField(aQSO); + if temp <> '' then + begin + S := S + '<'+ADIF_ExtraFieldName+':' + + IntToStr(length(temp))+'>' + temp; + end; + + temp := ADIFBandString[aQSO.QSO.Band]; + S := S + '' + temp; + + temp := ModeString[aQSO.QSO.Mode]; + S := S + '' + temp; + + if aQSO.QSO.Operator <> '' then + begin + temp := aQSO.QSO.Operator; + S := S + '' + temp; + end; + + if aQSO.QSO.Memo <> '' then + begin + temp := aQSO.QSO.Memo; + S := S + '' + temp; + end; + + S := S + ''; + + writeln(f, S); + end; + close(f); +end; + + +procedure TContest.LogQSO(var aQSO : TQSO; Local : boolean); +var i, t, mytx : integer; + R : word; + boo : boolean; +begin + if Log.TotalQSO > 0 then + begin + t := Log.TotalQSO; + mytx := Options.GetTXnr; + if {Local = True} mytx = aQSO.QSO.TX then // same tx # could be through network + begin + boo := false; + for i := t downto 1 do + begin + if TQSO(Log.List[i]).QSO.TX = mytx then + begin + boo := true; + break; + end; + end; + if (boo = false) or + (boo and (TQSO(Log.List[i]).QSO.Band <> aQSO.QSO.Band)) then + begin + CountDownStartTime := CurrentTime;//Now; + end; + end; + end + else // log.total = 0 + begin + CountDownStartTime := CurrentTime; + end; + {if Local then + if Options.Settings._multistation = True then + aQSO.QSO.Memo := 'MULT '+aQSO.QSO.Memo;} + + if Local=False then + aQSO.QSO.Reserve2 := $AA; // some multi form and editscreen uses this flag + MultiForm.Add(aQSO); + aQSO.QSO.Reserve2 := $00; + + ScoreForm.Add(aQSO); + aQSO.QSO.Reserve := actAdd; + Log.AddQue(aQSO); + Log.ProcessQue; + + if Local=False then + aQSO.QSO.Reserve2 := $AA; // some multi form and editscreen uses this flag + MainForm.EditScreen.Add(aQSO); + + //synchronization of serial # over network + if Options.Settings._syncserial and (SerialContestType <> 0) and (Local = False) then + begin + if SerialContestType = SER_MS then // WPX M/S type. Separate serial for mult/run + begin + SerialArrayTX[aQSO.QSO.TX] := aQSO.QSO.Serial + 1; + if aQSO.QSO.TX = Options.Settings._txnr then + begin + CurrentQSO.QSO.Serial := aQSO.QSO.Serial + 1; + MainForm.SerialEdit.Text := CurrentQSO.SerialStr; + end; + end + else + begin + SerialArray[aQSO.QSO.Band] := aQSO.QSO.Serial + 1; + if (SerialContestType = SER_ALL) or + ((SerialContestType = SER_Band) and (CurrentQSO.QSO.Band = aQSO.QSO.Band)) then + begin + CurrentQSO.QSO.Serial := aQSO.QSO.Serial + 1; + MainForm.SerialEdit.Text := CurrentQSO.SerialStr; + end; + end; + end; + + aQSO.QSO.Reserve2 := $00; + + MainForm.ReEvaluateQSYCount; + + if RateDialog.Visible then + RateDialog.UpdateGraph; + + if Options.Settings._multistation then + if Local{(mytx = aQSO.QSO.TX)} and (aQSO.QSO.NewMulti1 = False) and (aQSO.QSO.NewMulti2 = False) and (Options.Settings._multistationwarning) then + begin + R := MessageDlg('This station is not a new multiplier, but will be logged anyway.', mtError, + [mbOK], 0); {HELP context 0} + end; +end; + +procedure TContest.ShowScore; +begin + ScoreForm.Show; +end; + +procedure TContest.ShowMulti; +begin + MultiForm.Show; +end; + +procedure TContest.Renew; +var i, j : integer; + aQSO : TQSO; + temp : string; + B : TBand; +begin + + if Options.Settings._renewbythread then + begin + RequestRenewThread; + exit; + end; + + MultiForm.Reset; + ScoreForm.Reset; + + Log.SetDupeFlags; + + for i := 1 to Log.TotalQSO do + begin + aQSO := TQSO(Log.List[i]); + if Log.CountHigherPoints = True then + j := Log.IsDupe(aQSO); // called to set log.differentmodepointer + MultiForm.AddNoUpdate(aQSO); + ScoreForm.AddNoUpdate(aQSO); + end; + + MultiForm.Update; + ScoreForm.Update; + MainForm.EditScreen.Renew; + MultiForm.RenewBandScope; + + MainForm.ReevaluateCountDownTimer; + MainForm.ReevaluateQSYCount; +end; + +(* +procedure TContest.Renew; +var i, dupeindex : integer; + aQSO : TQSO; + temp : string; + B : TBand; +begin + MultiForm.Reset; + ScoreForm.Reset; +f + for i := 1 to Log.TotalQSO do + begin + aQSO := TQSO(Log.List[i]); + MultiForm.AddNoUpdate(aQSO); //?? + if Log.IsDupe2(aQSO, i, dupeindex) and (i > dupeindex) then + begin + aQSO.QSO.Points := 0; + aQSO.QSO.Dupe := True; + temp := aQSO.QSO.memo; + if Pos('-DUPE-',temp) = 0 then + aQSO.QSO.memo := '-DUPE- '+temp; + end + else + begin + aQSO.QSO.Dupe := False; + ScoreForm.AddNoUpdate(aQSO); + temp := aQSO.QSO.memo; + if Pos('-DUPE-',temp) = 1 then + aQSO.QSO.memo := Copy(temp, 8, 255); + end; + TQSO(Log.List[i]).QSO := aQSO.QSO; + end; + + for B := b19 to HiBand do + begin + for i := 1 to SubLog[B].TotalQSO do + begin + aQSO := TQSO(SubLog[B].List[i]); + MultiForm.AddNoUpdate(aQSO); + if SubLog[B].IsDupe2(aQSO, i, dupeindex) and (i > dupeindex) then + begin + aQSO.QSO.Points := 0; + aQSO.QSO.Dupe := True; + temp := aQSO.QSO.memo; + if Pos('-DUPE-',temp) = 0 then + aQSO.QSO.memo := '-DUPE- '+temp; + end + else + begin + aQSO.QSO.Dupe := False; + ScoreForm.AddNoUpdate(aQSO); + temp := aQSO.QSO.memo; + if Pos('-DUPE-',temp) = 1 then + aQSO.QSO.memo := Copy(temp, 8, 255); + end; + TQSO(SubLog[B].List[i]).QSO := aQSO.QSO; + end; + end; + MultiForm.Update; + ScoreForm.Update; + MainForm.EditScreen.Renew; +end; +*) + +procedure TContest.EditCurrentRow; +var R : integer; + _top, _row : integer; +begin + // R := MainForm.Grid.Row; + _row := MainForm.Grid.Row; + R := MainForm.EditScreen.IndexArray[_row]; + _top := MainForm.Grid.TopRow; + if (R <= Log.TotalQSO) and (R > 0) then + begin + if TQSO(Log.List[R]).QSO.Reserve = actLock then + begin + MainForm.WriteStatusLine('This QSO is currently locked', false); + exit; + end; + PastEditForm.Init(TQSO(Log.List[R]), R, _ActChange); + if PastEditForm.ShowModal = mrOK then + begin + if PartialCheck.Visible and PartialCheck._CheckCall then + PartialCheck.CheckPartial(CurrentQSO); + {if SuperCheck.Visible then + SuperCheck.CheckSuper(CurrentQSO);} + if CheckCall2.Visible then + CheckCall2.Renew(CurrentQSO); + end; + MainForm.Grid.TopRow := _top; + MainForm.Grid.Row := _row; + //MainForm.EditScreen.RefreshScreen; + end; +end; + +constructor TJIDXContest.Create(N : string); +begin + inherited; + MultiForm := JIDXMulti; + ScoreForm := JIDXScore2; + CheckCountry.ParentMulti := JIDXMulti; + UseUTC := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF +end; + +procedure TJIDXContest.SetPoints(var aQSO : TQSO); +begin + JIDXScore2.CalcPoints(aQSO); +end; + +constructor TARRLDXContestDX.Create(N : string); +begin + inherited; + MultiForm := ARRLDXMulti; + ScoreForm := ARRLDXScore; + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TARRLDXEdit.Create; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + UseUTC := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF +end; + +constructor TARRLDXContestW.Create(N : string); +begin + inherited; + MultiForm := ARRLWMulti; + ARRLWMulti.ALLASIANFLAG := False; + ScoreForm := ARRLDXScore; + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TDXCCEdit.Create; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + UseUTC := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF +end; + +constructor TAllAsianContest.Create(N : string); +begin + inherited; + MultiForm := ARRLWMulti; + ARRLWMulti.ALLASIANFLAG := True; + ScoreForm := AllAsianScore; + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TDXCCEdit.Create; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + UseUTC := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF +end; + +procedure TAllAsianContest.SetPoints(var aQSO : TQSO); +begin + AllAsianScore.CalcPoints(aQSO); +end; + +procedure TAllAsianContest.SpaceBarProc; +begin + inherited; + MainForm.WriteStatusLine(MultiForm.GetInfo(CurrentQSO), false); +end; + +constructor TJIDXContestDX.Create(N : string); +begin + inherited; + MultiForm := JIDX_DX_Multi; + ScoreForm := JIDX_DX_Score; + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TGeneralEdit.Create; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + UseUTC := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF +end; + +procedure TJIDXContestDX.SetPoints(var aQSO : TQSO); +begin + JIDX_DX_Score.CalcPoints(aQSO); +end; + +constructor TCQWPXContest.Create(N : string); +begin + inherited; + MultiForm := WPXMulti; + ScoreForm := WPXScore; + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TWPXEdit.Create; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + UseUTC := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF + TQSO(Log.List[0]).QSO.Serial := $01; // uses serial number + SerialContestType := SER_ALL; + SameExchange := False; + Options.Settings._sameexchange := SameExchange; +end; + +constructor TWAEContest.Create(N : string); +begin + inherited; + MultiForm := WAEMulti; + ScoreForm := WAEScore; + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TWPXEdit.Create; + MainForm.BandMenu.Items[ord(b19)].Visible := False; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + UseUTC := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF + TQSO(Log.List[0]).QSO.Serial := $01; // uses serial number + SerialContestType := SER_ALL; + SameExchange := False; + Options.Settings._sameexchange := SameExchange; +end; + +function TIOTAContest.QTHString : string; +begin + Result := IOTAMulti.MyIOTA; +end; + +constructor TIOTAContest.Create(N : string); +begin + inherited; + MultiForm := IOTAMulti; + ScoreForm := IARUScore; + IARUScore.InitGrid(b35, b28); + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TIOTAEdit.Create; + MainForm.BandMenu.Items[ord(b19)].Visible := False; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + UseUTC := True; + Log.AcceptDifferentMode := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF + TQSO(Log.List[0]).QSO.Serial := $01; // uses serial number + SerialContestType := SER_ALL; +end; + +constructor TARRL10Contest.Create(N : string); +begin + inherited; + MultiForm := ARRL10Multi; + ScoreForm := ARRL10Score; + //IARUScore.InitGrid(b35, b28); + + CheckMulti.ListCWandPh := True; + + PastEditForm := ALLJAEditDialog; + if ARRL10Multi.IsUSA then + begin + MainForm.EditScreen := TDXCCEdit.Create; + Options.Settings._sentstr := '$V'; + end + else + begin + MainForm.EditScreen := TIOTAEdit.Create; + Options.Settings._sentstr := '$S'; + end; + MainForm.BandMenu.Items[ord(b19)].Visible := False; + MainForm.BandMenu.Items[ord(b35)].Visible := False; + MainForm.BandMenu.Items[ord(b7)].Visible := False; + MainForm.BandMenu.Items[ord(b14)].Visible := False; + MainForm.BandMenu.Items[ord(b21)].Visible := False; + + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + UseUTC := True; + Log.AcceptDifferentMode := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF + TQSO(Log.List[0]).QSO.Serial := $01; // uses serial number + SerialContestType := SER_ALL; + SameExchange := False; + Options.Settings._sameexchange := SameExchange; +end; + +constructor TJA0Contest.Create(N : string); +begin + inherited; + MultiForm := JA0Multi; + ScoreForm := JA0Score; + + MainForm.BandMenu.Items[ord(b35)].Visible := False; + MainForm.BandMenu.Items[ord(b7)].Visible := False; + + + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TJA0Edit.Create; + MainForm.BandMenu.Items[ord(b19)].Visible := False; + MainForm.BandMenu.Items[ord(b14)].Visible := False; + MainForm.BandMenu.Items[ord(b21)].Visible := False; + MainForm.BandMenu.Items[ord(b28)].Visible := False; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + + TQSO(Log.List[0]).QSO.Serial := $01; // uses serial number + SerialContestType := SER_ALL; + SameExchange := False; + Options.Settings._sameexchange := SameExchange; +end; + +constructor TJA0ContestZero.Create(N : string); +begin + inherited; + JA0Multi.JA0 := True; + + TQSO(Log.List[0]).QSO.Serial := $01; // uses serial number + SerialContestType := SER_ALL; + SameExchange := False; + Options.Settings._sameexchange := SameExchange; + +end; + +procedure TJA0Contest.SetBand(B : TBand); +begin + JA0Score.SetBand(B); + if (B = b21) or (B = b28) then + begin + MainForm.BandMenu.Items[ord(b21)].Enabled := True; + MainForm.BandMenu.Items[ord(b28)].Enabled := True; + MainForm.BandMenu.Items[ord(b21)].Visible := True; + MainForm.BandMenu.Items[ord(b28)].Visible := True; + end + else + begin + MainForm.BandMenu.Items[ord(B)].Visible := True; + end; +end; + +procedure TJA0Contest.Renew; +var B : TBand; +begin + inherited; + B := JA0Score.JA0Band; + if (B = b21) or (B = b28) then + begin + MainForm.BandMenu.Items[ord(b21)].Enabled := True; + MainForm.BandMenu.Items[ord(b28)].Enabled := True; + MainForm.BandMenu.Items[ord(b21)].Visible := True; + MainForm.BandMenu.Items[ord(b28)].Visible := True; + end + else + begin + MainForm.BandMenu.Items[ord(B)].Visible := True; + end; +end; + +constructor TAPSprint.Create(N : string); +begin + inherited; + MultiForm := WPXMulti; + ScoreForm := APSprintScore; + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TWPXEdit.Create; + MainForm.BandMenu.Items[ord(b19)].Visible := False; + MainForm.BandMenu.Items[ord(b35)].Visible := False; + //MainForm.BandMenu.Items[ord(b21)].Visible := False; rule change + MainForm.BandMenu.Items[ord(b28)].Visible := False; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + UseUTC := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF + TQSO(Log.List[0]).QSO.Serial := $01; // uses serial number + SerialContestType := SER_ALL; + + SameExchange := False; + Options.Settings._sameexchange := SameExchange; + +end; + +constructor TCQWWContest.Create(N : string); +begin + inherited; + MultiForm := WWMulti; + ScoreForm := WWScore; + + MainForm.mnCheckCountry.Visible := True; + MainForm.mnCheckMulti.Caption := 'Check Zone'; + + CheckCountry.ParentMulti := WWMulti; + + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TWWEdit.Create; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + UseUTC := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF +end; + +procedure TCQWWContest.SpaceBarProc; +var temp : string; +begin + //inherited; + {if MainForm.NumberEdit.Text = '' then + begin} + temp := MultiForm.GuessZone(CurrentQSO); + MainForm.NumberEdit.Text := temp; + CurrentQSO.QSO.NrRcvd := temp; + //end; + +{This section moved from tcontest.spacebarproc} + //if (MainForm.NumberEdit.Text = '') and (SameExchange = True)then + DispExchangeOnOtherBands; + if CheckMulti.Visible then + CheckMulti.Renew(CurrentQSO); +{This section moved from tcontest.spacebarproc} + + + if CheckCountry.Visible then + CheckCountry.Renew(CurrentQSO); + + if Options.Settings._multistation then + begin + if CheckCountry.Visible = False then + CheckCountry.Renew(CurrentQSO); + if CheckCountry.NotNewMulti(CurrentQSO.QSO.Band) then + begin + MainForm.WriteStatusLineRed('NOT a new multiplier. (This is a multi stn)', false); + exit; + end; + end; + + MainForm.WriteStatusLine(MultiForm.GetInfo(CurrentQSO), false); +end; + +procedure TWAEContest.SpaceBarProc; +var temp : string; +begin + inherited; + if CheckCountry.Visible then + CheckCountry.Renew(CurrentQSO); + + if Options.Settings._multistation then + begin + if CheckCountry.Visible = False then + CheckCountry.Renew(CurrentQSO); + if CheckCountry.NotNewMulti(CurrentQSO.QSO.Band) then + begin + MainForm.WriteStatusLineRed('NOT a new multiplier. (This is a multi stn)', false); + exit; + end; + end; + + MainForm.WriteStatusLine(MultiForm.GetInfo(CurrentQSO), false); +end; + +procedure TCQWWContest.ShowMulti; +begin + MultiForm.Show; + WWZone.Show; +end; + +function TCQWWContest.CheckWinSummary(aQSO : TQSO) : string; +var S : string; +begin + S := ''; + S := S + FillRight(aQSO.BandStr, 5); + S := S + aQSO.TimeStr + ' '; + S := S + FillRight(aQSO.QSO.Callsign, 12); + S := S + FillRight(aQSO.QSO.NrRcvd, 4); + Result := S; +end; + +constructor TIARUContest.Create(N : string); +begin + inherited; + MultiForm := IARUMulti; + ScoreForm := IARUScore; + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TIARUEdit.Create; + //CheckMulti.ListCWandPh := True; + MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10G)].Visible := False; + UseUTC := True; + Log.AcceptDifferentMode := True; + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC; //JST = 0; UTC = $FFFF +end; + +procedure TIARUContest.SpaceBarProc; +var temp : string; +begin + inherited; + MainForm.WriteStatusLine(MultiForm.GetInfo(CurrentQSO), false); + if (MultiFound = False) and (MainForm.NumberEdit.Text = '') then + begin + temp := MultiForm.GuessZone(CurrentQSO); + MainForm.NumberEdit.Text := temp; + CurrentQSO.QSO.NrRcvd := temp; + end; +end; + +procedure TARRLDXContestW.SpaceBarProc; +begin + inherited; + MainForm.WriteStatusLine(MultiForm.GetInfo(CurrentQSO), false); +end; + +constructor TPedi.Create(N : string); +begin + inherited; + MainForm.MultiButton.Enabled := False; // toolbar + MainForm.Multipliers1.Enabled := False; // menu + MultiForm := BasicMulti; + ScoreForm := PediScore; + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TGeneralEdit.Create; + MainForm.BandMenu.Items[ord(b10)].Visible := True; + MainForm.BandMenu.Items[ord(b18)].Visible := True; + MainForm.BandMenu.Items[ord(b24)].Visible := True; + + Log.AcceptDifferentMode := True; + if UseUTC then + TQSO(Log.List[0]).QSO.RSTSent := _USEUTC + else + TQSO(Log.List[0]).QSO.RSTSent := UTCOffset; + //UTC = $FFFF else UTC + x hrs; + { + UseUTC := True; + TQSO(Log.List[0]).QSO.RSTSent := $FFFF; //JST = 0; UTC = $FFFF + } +end; + +constructor TALLJAContest.Create(N : string); +begin + inherited; + MultiForm := ALLJAMulti; + ScoreForm := ALLJAScore; + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TALLJAEdit.Create; + MainForm.BandMenu.Items[ord(b19)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10g)].Visible := False; +end; + +constructor TKCJContest.Create(N : string); +begin + inherited; + MultiForm := KCJMulti; + ScoreForm := KCJScore; + PastEditForm := ALLJAEditDialog; + MainForm.EditScreen := TKCJEdit.Create; + MainForm.BandMenu.Items[ord(b19)].Visible := True; + //MainForm.BandMenu.Items[ord(b50)].Visible := False; + MainForm.BandMenu.Items[ord(b144)].Visible := False; + MainForm.BandMenu.Items[ord(b430)].Visible := False; + MainForm.BandMenu.Items[ord(b1200)].Visible := False; + MainForm.BandMenu.Items[ord(b2400)].Visible := False; + MainForm.BandMenu.Items[ord(b5600)].Visible := False; + MainForm.BandMenu.Items[ord(b10g)].Visible := False; +end; + +function TALLJAContest.QTHString : string; +begin + Result := Options.Settings._prov; +end; + +function TKCJContest.QTHString : string; +begin + Result := Options.Settings._prov; + // get the kcj code; +end; + +function TALLJAContest.CheckWinSummary(aQSO : TQSO) : string; +var S : string; +begin + S := ''; + S := S + FillRight(aQSO.BandStr, 5); + S := S + aQSO.TimeStr + ' '; + S := S + FillRight(aQSO.QSO.Callsign, 12); + S := S + FillRight(aQSO.QSO.NrRcvd, 5); + S := S + FillRight(aQSO.ModeStr, 4); + Result := S; +end; + +function TKCJContest.CheckWinSummary(aQSO : TQSO) : string; +var S : string; +begin + S := ''; + S := S + FillRight(aQSO.BandStr, 5); + S := S + aQSO.TimeStr + ' '; + S := S + FillRight(aQSO.QSO.Callsign, 12); + S := S + FillRight(aQSO.QSO.NrRcvd, 3); + //S := S + FillRight(aQSO.ModeStr, 4); + Result := S; +end; + +function TFDContest.QTHString : string; +begin + if CurrentQSO.QSO.band <= b1200 then + Result := Options.Settings._prov + else + Result := Options.Settings._city; +end; + +function TSixDownContest.QTHString : string; +begin + if CurrentQSO.QSO.band <= b1200 then + Result := Options.Settings._prov + else + Result := Options.Settings._city; +end; + +constructor TACAGContest.Create(N : string); +begin + inherited; + MainForm.BandMenu.Items[ord(b19)].Visible := False; + MultiForm := ACAGMulti; + ScoreForm := ACAGScore; + PastEditForm := ALLJAEditDialog; + // MainForm.EditScreen := TALLJAEdit.Create; + MainForm.EditScreen := TACAGEdit.Create; +end; + +constructor TFDContest.Create(N : string); +begin + inherited; + MainForm.BandMenu.Items[ord(b19)].Visible := False; + MultiForm := FDMulti; + ScoreForm := ACAGScore; + PastEditForm := ALLJAEditDialog; + // MainForm.EditScreen := TALLJAEdit.Create; + MainForm.EditScreen := TACAGEdit.Create; +end; + +constructor TSixDownContest.Create(N : string); +begin + inherited; + MainForm.BandMenu.Items[ord(b19)].Visible := False; + MainForm.BandMenu.Items[ord(b35)].Visible := False; + MainForm.BandMenu.Items[ord(b7)].Visible := False; + MainForm.BandMenu.Items[ord(b14)].Visible := False; + MainForm.BandMenu.Items[ord(b21)].Visible := False; + MainForm.BandMenu.Items[ord(b28)].Visible := False; + MultiForm := SixDownMulti; + ScoreForm := SixDownScore; + PastEditForm := ALLJAEditDialog; + // MainForm.EditScreen := TALLJAEdit.Create; + MainForm.EditScreen := TACAGEdit.Create; +end; + +constructor TGeneralContest.Create(N : string); +begin + inherited; + MultiForm := GeneralMulti2; + ScoreForm := GeneralScore; + GeneralScore.LoadCFG(MenuForm.CFGFileName); + PastEditForm := ALLJAEditDialog; + if SerialContestType = 0 then + MainForm.EditScreen := TGeneralEdit.Create + else + begin + MainForm.EditScreen := TSerialGeneralEdit.Create; + TQSO(Log.List[0]).QSO.Serial := $01; // uses serial number + SameExchange := False; + Options.Settings._sameexchange := SameExchange; + end; + //MultiForm.Update; +end; + +procedure TGeneralContest.SetPoints(var aQSO : TQSO); +begin + GeneralScore.CalcPoints(aQSO); +end; + +constructor TBasicEdit.Create; +var i, j : integer; +begin + for i := 1 to MaxGridQSO do + IndexArray[i] := 0; + DispQSO := 0; + DirectEdit := False; + with MainForm.Grid do + begin + ColCount := 10; + colSerial := -1; + colTime := 1; + colCall := -1; + colrcvdRST := -1; + colrcvdNumber := -1; + colMode := -1; + colPower := -1; + colNewPower := -1; + colBand := -1; + colPoint := -1; + colMemo := -1; + colSerial := -1; + colOp := -1; + colNewMulti1 := -1; + colNewMulti2 := -1; + colsentRST := -1; + colsentNumber := -1; + colCQ := -1; + //Align := alTop; + FixedCols := 0; + FixedRows := 1; + ColCount := 10; + Height := 291; + DefaultRowHeight := 17; + //Height := 256; + //DefaultRowHeight := 16; + + SerialWid := 4; + TimeWid := 4; + //CallSignWid := 10; + CallSignWid := 9; + rcvdRSTWid := 3; + //NumberWid := 5; + NumberWid := 6; + BandWid := 4; + ModeWid := 3; + PowerWid := 0; + NewPowerWid := 2; + PointWid := 3; + OpWid := 6; + MemoWid := 7; + NewMulti1Wid := 3; + NewMulti2Wid := 0; + end; + + MainForm.SerialEdit.Visible := False; + MainForm.PowerEdit.Visible := False; + MainForm.NewPowerEdit.Visible := False; + MainForm.ModeEdit.Visible := True; + + for i := 1 to MainForm.Grid.RowCount-1 do + for j := 0 to MainForm.Grid.ColCount-1 do + MainForm.Grid.Cells[j,i] := ''; +end; + +procedure TBasicEdit.SetDirectEdit(Direct : boolean); +begin + if Direct then + begin + MainForm.Grid.Options := MainForm.Grid.Options + [goEditing{, goAlwaysShowEditor}]; + MainForm.Grid.Options := MainForm.Grid.Options - [goRowSelect]; + DirectEdit := True; + end + else + begin + MainForm.Grid.Options := MainForm.Grid.Options - [goEditing, goAlwaysShowEditor]; + MainForm.Grid.Options := MainForm.Grid.Options + [goRowSelect]; + DirectEdit := False; + end; +end; + +procedure TBasicEdit.Add(aQSO : TQSO); +var R : word; + i : integer; +begin + if MainForm.ShowCurrentBandOnly.Checked and (aQSO.QSO.Band <> CurrentQSO.QSO.Band) then + exit; + R := Log.TotalQSO; + with MainForm.Grid do + begin + {if R+1 > DisplayedQSOs then + RowCount := R+1;} + //_top := TopRow; + + inc(DispQSO); + + if DispQSO+1 > DisplayedQSOs then + RowCount := DispQSO + 1; + + WriteQSO(DispQSO, aQSO); + //WriteQSO(R, aQSO); + IndexArray[DispQSO] := Log.TotalQSO; + (* + if colSerial >= 0 then Cells[colSerial,R] := aQSO.SerialStr; + if colTime >= 0 then Cells[colTime,R]:= aQSO.TimeStr; + if colCall >= 0 then Cells[colCall,R]:= aQSO.QSO.Callsign; + if colrcvdRST >=0 then Cells[colrcvdRST,R]:= aQSO.RSTStr; + if colrcvdNumber >= 0 then Cells[colrcvdNumber,R]:= aQSO.QSO.NrRcvd; + if colBand >= 0 then Cells[colBand,R]:= aQSO.BandStr; + if colMode >= 0 then Cells[colMode,R]:= aQSO.ModeStr; + if colPower >= 0 then Cells[colPower,R]:= aQSO.PowerStr; + if colNewPower >= 0 then Cells[colNewPower,R] := aQSO.NewPowerStr; + if colPoint >= 0 then Cells[colPoint,R]:= aQSO.PointStr; + if colNewMulti1 >= 0 then Cells[colNewMulti1,R]:= GetNewMulti1(aQSO); + if colOp >= 0 then Cells[colOp,R]:= aQSO.QSO.Operator; + if colMemo >= 0 then Cells[colMemo,R]:= aQSO.QSO.memo; + *) + + // i := Log.TotalQSO - DisplayedQSOs; + i := DispQSO - DisplayedQSOs; + + if (MainForm.Grid.Focused = False) and (aQSO.QSO.Reserve2 <> $AA) {local} then + begin + if i > 0 then + TopRow := i+1 + else + TopRow := 1; + end + else // ver 2.0x + if (aQSO.QSO.Reserve2 = $AA) {not local} and (MainForm.Grid.Focused = False) then + if i > 0 then + TopRow := i + 1; // ver 2.0x + + DefaultDrawing := True; + RefreshScreen; + end; +end; + +Procedure TBasicEdit.WriteQSO(R: integer; aQSO : TQSO); +var temp : string; +begin + with MainForm.Grid do + begin + if colSerial >= 0 then Cells[colSerial,R]:= aQSO.SerialStr; + if colTime >= 0 then Cells[colTime,R]:= aQSO.TimeStr; + if colCall >= 0 then Cells[colCall,R]:= aQSO.QSO.Callsign; + if colrcvdRST >= 0 then Cells[colrcvdRST,R]:= aQSO.RSTStr; + if colrcvdNumber >= 0 then Cells[colrcvdNumber,R]:= aQSO.QSO.NrRcvd; + if colBand >= 0 then Cells[colBand,R]:= aQSO.BandStr; + if colMode >= 0 then Cells[colMode,R]:= aQSO.ModeStr; + if colPower >= 0 then Cells[colPower,R]:= aQSO.PowerStr; + if colNewPower >= 0 then Cells[colNewPower,R]:= aQSO.NewPowerStr; + if colPoint >= 0 then Cells[colPoint,R]:= aQSO.PointStr; + if colOp >= 0 then + begin + temp := IntToStr(aQSO.QSO.TX); + if UOptions.Options.Settings._multiop = 2 then + begin + case aQSO.QSO.TX of + 1 : temp := 'R'; + 2 : temp := 'M'; + end; + end; + Cells[colOp,R]:= temp + ' ' + aQSO.QSO.Operator; + end; IntToStr(aQSO.QSO.Reserve3); + + if colNewMulti1 >= 0 then Cells[colNewMulti1, R] := GetNewMulti1(aQSO); + + + if colMemo >= 0 then Cells[colMemo,R]:= aQSO.QSO.memo; // + IntToStr(aQSO.QSO.Reserve3); + if aQSO.QSO.Reserve = actLock then Cells[colmemo,R] := 'locked'; + end; +end; + +procedure TBasicEdit.RefreshScreen; +var i, j : integer; +begin + with MainForm.Grid do + begin + for i := TopRow to TopRow + VisibleRowCount - 1 do + begin + if (i > RowCount - 1) or (i = 0) then + exit; + if IndexArray[i] > 0 then + WriteQSO(i, TQSO(Log.List[IndexArray[i]])) + else + for j := 0 to ColCount-1 do + Cells[j,i] := ''; + end; + end; +end; + +procedure TBasicEdit.ResetTopRow; +var i : integer; +begin + i := DispQSO - DisplayedQSOs; + if i > 0 then + MainForm.Grid.TopRow := i+1 + else + mainForm.Grid.TopRow := 1; +end; + +procedure TBasicEdit.Renew; +var R : word; + i, j, _row, _toprow : integer; + temp : string[2]; +begin + for i := 1 to MaxGridQSO do + IndexArray[i] := 0; + DispQSO := 0; + R := Log.TotalQSO; + + with MainForm.Grid do + begin + _row := Row; + _toprow := TopRow; + Enabled := False; + //defaultdrawing := false; + //RowCount := R+1; + //RowCount := 2; + for i := 1 to R do + begin + if MainForm.ShowCurrentBandOnly.Checked then + begin + if CurrentQSO.QSO.Band = TQSO(Log.List[i]).QSO.Band then + begin + inc(DispQSO); + //WriteQSO(DispQSO, TQSO(Log.List[i])); + IndexArray[DispQSO] := i; + end; + end + else + begin + inc(DispQSO); + //WriteQSO(i, TQSO(Log.List[i])); + IndexArray[i] := i; + end; + end; + // i := Log.TotalQSO - DisplayedQSOs; + + if DispQSO > DisplayedQSOs then + RowCount := DispQSO+1 + else + RowCount := DisplayedQSOs + 1; + +{ + i := DispQSO - DisplayedQSOs; + + if i > 0 then + TopRow := i+1 + else + TopRow := 1; } + + Enabled := True; + //DefaultDrawing := True; + RefreshScreen; // this is not enough!!!! + + if _row > RowCount - 1 then + Row := RowCount - 1 + else + Row := _row; + //Refresh; + end; +end; + +procedure TBasicEdit.SetGridWidth; +begin + with MainForm.Grid do + begin + if colSerial >= 0 then + begin + Cells[colSerial, 0]:='serial'; + ColWidths[colSerial] := SerialWid*CWid; + end; + MainForm.SerialEdit.Tag := colSerial; + + if colTime >= 0 then + begin + Cells[colTime,0]:='time'; + ColWidths[colTime] := TimeWid*CWid; + end; + MainForm.TimeEdit.tag := colTime; + + if colCall >= 0 then + begin + Cells[colCall,0]:='call'; + ColWidths[colCall] := CallSignWid*CWid; + end; + MainForm.CallsignEdit.Tag := colCall; + + if colRcvdRST >= 0 then + begin + Cells[colrcvdRST,0]:='RST'; + ColWidths[colrcvdRST] := rcvdRSTWid*Cwid; + end; + MainForm.RcvdRSTEdit.Tag := colrcvdRST; + + if colrcvdNumber >= 0 then + begin + Cells[colrcvdNumber,0]:='rcvd'; + ColWidths[colrcvdNumber] := NumberWid*Cwid; + end; + MainForm.NumberEdit.Tag := colrcvdNumber; + + if colBand >= 0 then + begin + Cells[colBand,0]:='band'; + ColWidths[colBand] := BandWid*Cwid; + end; + MainForm.BandEdit.Tag := colBand; + + if colMode >= 0 then + begin + Cells[colMode,0]:='mod'; + ColWidths[colMode] := ModeWid*CWid; + end; + MainForm.ModeEdit.Tag := colMode; + + if colPower >= 0 then + begin + Cells[colPower,0]:='pwr'; + ColWidths[colPower] := 3*Cwid; + end; + MainForm.PowerEdit.Tag := colPower; + + if colNewPower >= 0 then + begin + Cells[colNewPower,0]:='pwr'; + ColWidths[colNewPower] := NewPowerWid*Cwid; + end; + MainForm.NewPowerEdit.Tag := colNewPower; + + if colPoint >= 0 then + begin + Cells[colPoint,0]:='pts'; + ColWidths[colPoint] := PointWid*Cwid; + end; + MainForm.PointEdit.Tag := colPoint; + + if colNewMulti1 >= 0 then + begin + Cells[colNewMulti1,0]:='new'; + ColWidths[colNewMulti1] := NewMulti1Wid*Cwid; + end; + + if colNewMulti2 >= 0 then + begin + Cells[colNewMulti2,0]:='new'; + ColWidths[colNewMulti2] := NewMulti2Wid*Cwid; + end; + + if colOp >= 0 then + begin + Cells[colOp,0] := 'op'; + ColWidths[colOp] := OpWid*Cwid; + end; + MainForm.OpEdit.Tag := colOp; + + if colMemo >= 0 then + begin + Cells[colMemo,0]:='memo'; + ColWidths[colMemo] := MemoWid*Cwid; + end; + MainForm.MemoEdit.Tag := colMemo; + + end; + MainForm.Width := 46*CWid + 36; +end; + +function TBasicEdit.GetLeft(col : integer) : integer; +var i, j : integer; +begin + if col = 0 then + begin + Result := 0; + exit; + end; + j := 0; + for i := 0 to col-1 do + j := j + MainForm.Grid.ColWidths[i] + 1; + Result := j ; +end; + +Procedure TBasicEdit.SetEditFields; +begin + with MainForm do + begin + if colSerial >= 0 then + begin + SerialEdit.Width := MainForm.Grid.ColWidths[colSerial]; + SerialEdit.Left := GetLeft(colSerial); + end; + if colTime >= 0 then + begin + TimeEdit.Width := MainForm.Grid.ColWidths[colTime]; + TimeEdit.Left := GetLeft(colTime); + DateEdit.Width := TimeEdit.Width; + DateEdit.Left := TimeEdit.Left; + end; + if colCall >= 0 then + begin + CallsignEdit.Width := MainForm.Grid.ColWidths[colCall]; + CallsignEdit.Left := GetLeft(colCall); + end; + if colRcvdRST >= 0 then + begin + RcvdRSTEdit.Width := MainForm.Grid.ColWidths[colrcvdRST]; + RcvdRSTEdit.Left := GetLeft(colrcvdRST); + end; + if colrcvdNumber >= 0 then + begin + NumberEdit.Width := MainForm.Grid.ColWidths[colrcvdNumber]; + NumberEdit.Left := GetLeft(colrcvdNumber); + end; + if colBand >= 0 then + begin + BandEdit.Width := MainForm.Grid.ColWidths[colBand]; + BandEdit.Left := GetLeft(colBand); + end; + if colMode >= 0 then + begin + ModeEdit.Width := MainForm.Grid.ColWidths[colMode]; + ModeEdit.Left := GetLeft(colMode); + end; + if colPower >= 0 then + begin + PowerEdit.Width := MainForm.Grid.ColWidths[colPower]; + PowerEdit.Left := GetLeft(colPower); + end; + if colNewPower >= 0 then + begin + NewPowerEdit.Width := MainForm.Grid.ColWidths[colNewPower]; + NewPowerEdit.Left := GetLeft(colNewPower); + end; + if colPoint >= 0 then + begin + PointEdit.Width := MainForm.Grid.ColWidths[colPoint]; + PointEdit.Left := GetLeft(colPoint); + end; + if colOp >= 0 then + begin + OpEdit.Width := MainForm.Grid.ColWidths[colOp]; + OpEdit.Left := GetLeft(colOp); + end; + if colMemo >= 0 then + begin + MemoEdit.Left := GetLeft(colMemo); + MemoEdit.Width := EditPanel.Width - MemoEdit.Left - 3; + end; + end; +end; + + +function TBasicEdit.GetNewMulti1(aQSO : TQSO) : string; +begin + if aQSO.QSO.NewMulti1 then + Result := '*' + else + Result := ''; +end; + +constructor TGeneralEdit.Create; +var i : integer; +begin + + inherited; + + colTime := 0; + colCall := 1; + colrcvdRST := 2; + colrcvdNumber := 3; + colBand := 4; + colMode := 5; + colPoint := 6; + colNewMulti1 := 7; + + if pos('$P', Options.Settings._sentstr) > 0 then + begin + colNewPower := 8; + colOp := 9; + colMemo := 10; + MainForm.Grid.ColCount := 11; + MainForm.NewPowerEdit.Visible := True; + end + else + begin + colOp := 8; + colMemo := 9; + MainForm.Grid.ColCount := 10; + end; + + if UOptions.Options.MultiOp > 0 then + begin + OpWid := 6; + MemoWid := 7; + end + else + begin + OpWid := 0; + MemoWid := 13; + MainForm.OpEdit.Visible := False; + end; + + SetGridWidth; + SetEditFields; + + (* with MainForm do + begin + TimeEdit.Left := 0; + TimeEdit.Width := TimeWid*CWid+1; + + CallsignEdit.Left := TimeEdit.Width + 1; + CallsignEdit.Width := CallSignWid*CWid+1; + + rcvdRSTEdit.Left := CallsignEdit.Left + CallsignEdit.Width; + rcvdRSTEdit.Width := rcvdRSTWid*CWid+1; + + NumberEdit.Left := rcvdRSTEdit.Left + rcvdRSTEdit.Width; + NumberEdit.Width := NumberWid*CWid+1; + + BandEdit.Left := NumberEdit.Left + NumberEdit.Width; + BandEdit.Width := BandWid*CWid+1; + + ModeEdit.Left := BandEdit.Left + BandEdit.Width; + ModeEdit.Width := ModeWid*CWid+1; + + {PowerEdit.Left := 29*CWid + 7; + PowerEdit.Width := 3*CWid+1; } + + PointEdit.Left := ModeEdit.Left + ModeEdit.Width; + PointEdit.Width := PointWid*CWid + 1; + + OpEdit.Left := NewMulti1Wid*CWid + 1 + PointEdit.Left + PointEdit.Width; + OpEdit.Width := OpWid*Cwid + 1; + + MemoEdit.Left := OpEdit.Left + OpEdit.Width; + MemoEdit.Width := MemoWid*CWid + 1; + + {if UOptions.Options.MultiOp = false then + begin + OpEdit.Visible := false; + MemoEdit.Left := 3*CWid + 1 + PointEdit.Left + PointEdit.Width; + MemoEdit.Width := (13)*CWid + 1; + end; } + + end; + *) + end; + + +constructor TARRLDXEdit.Create; +begin + inherited; + + colTime := 0; + colCall := 1; + colrcvdRST := 2; + colrcvdNumber := 3; + colBand := 4; + colMode := 5; + colPoint := 6; + colNewMulti1 := 7; + colPower := 8; + colOp := 9; + colMemo := 10; + MainForm.Grid.ColCount := 11; + MainForm.PowerEdit.Visible := True; + if UOptions.Options.MultiOp > 0 then + begin + OpWid := 6; + MemoWid := 7; + end + else + begin + OpWid := 0; + MemoWid := 13; + MainForm.OpEdit.Visible := False; + end; + + NumberWid := 3; + + SetGridWidth; + SetEditFields; + end; + + + +constructor TWWEdit.Create; +begin + inherited; + colTime := 0; + colCall := 1; + colrcvdRST := 2; + colrcvdNumber := 3; + colBand := 4; + {colMode := 5;} + {colPower := 6;} + colPoint := 5; + colNewMulti1 := 6; + // colNewMulti2 := 7; + colOp := 7; + colMemo := 8; + MainForm.Grid.ColCount := 9; + MainForm.ModeEdit.Visible := False; + NumberWid := 3; + NewMulti1Wid := 6; + + if UOptions.Options.MultiOp > 0 then + begin + OpWid := 6; + MemoWid := 10; + end + else + begin + OpWid := 0; + MemoWid := 16; + MainForm.OpEdit.Visible := False; + end; + + SetGridWidth; + SetEditFields; +end; + +function TWWEdit.GetNewMulti1(aQSO : TQSO) : string; +var str : string; +begin + if aQSO.QSO.NewMulti1 then + str := FillRight(aQSO.QSO.Multi1, 3) + else + str := ' '; + if aQSO.QSO.NewMulti2 then + str := str + aQSO.QSO.Multi2; + Result := str; +end; + +function TKCJEdit.GetNewMulti1(aQSO : TQSO) : string; +var str : string; +begin + if aQSO.QSO.NewMulti1 then + str := aQSO.QSO.Multi1 + else + str := ''; + Result := str; +end; + +constructor TDXCCEdit.Create; +begin + inherited; + colTime := 0; + colCall := 1; + colrcvdRST := 2; + colrcvdNumber := 3; + colBand := 4; + {colMode := 5;} + {colPower := 6;} + colPoint := 5; + colNewMulti1 := 6; + colOp := 7; + colMemo := 8; + MainForm.Grid.ColCount := 9; + MainForm.ModeEdit.Visible := False; + + NumberWid := 4; + NewMulti1Wid := 5; + + if UOptions.Options.MultiOp > 0 then + begin + OpWid := 6; + MemoWid := 10; + end + else + begin + OpWid := 0; + MemoWid := 16; + MainForm.OpEdit.Visible := False; + end; + + SetGridWidth; + SetEditFields; +end; + +function TDXCCEdit.GetNewMulti1(aQSO : TQSO) : string; +begin + if aQSO.QSO.NewMulti1 then + Result := aQSO.QSO.Multi1 + else + Result := ''; +end; + +constructor TWPXEdit.Create; +begin + inherited; + colSerial := 0; + colTime := 1; + colCall := 2; + colrcvdRST := 3; + colrcvdNumber := 4; + colBand := 5; + {colMode := 5;} + {colPower := 6;} + colPoint := 6; + colNewMulti1 := 7; + colOp := 8; + colMemo := 9; + + SerialWid := 4; + TimeWid := 4; + CallSignWid := 8; + rcvdRSTWid := 3; + NumberWid := 4; + BandWid := 3; + PointWid := 2; + OpWid := 6; + MemoWid := 7; + NewMulti1Wid := 5; + + MainForm.Grid.Cells[colNewMulti1,0] := 'prefix'; + + MainForm.Grid.ColCount := 10; + MainForm.ModeEdit.Visible := False; + MainForm.SerialEdit.Visible := True; + if UOptions.Options.MultiOp > 0 then + begin + OpWid := 6; + MemoWid := 10; + end + else + begin + OpWid := 0; + MemoWid := 16; + MainForm.OpEdit.Visible := False; + end; + + SetGridWidth; + SetEditFields; +end; + +constructor TJA0Edit.Create; +begin + inherited; + MainForm.Grid.ColCount := 11; + + colSerial := 0; + colTime := 1; + colCall := 2; + colrcvdRST := 3; + colrcvdNumber := 4; + colBand := 5; + colMode := 6; + colPoint := 7; + colNewMulti1 := 8; + colOp := 9; + colMemo := 10; + + MainForm.ModeEdit.Visible := True; + MainForm.SerialEdit.Visible := True; + if UOptions.Options.MultiOp > 0 then + begin + OpWid := 6; + MemoWid := 10; + end + else + begin + OpWid := 0; + MemoWid := 16; + MainForm.OpEdit.Visible := False; + end; + + SetGridWidth; + SetEditFields; +end; + + + +function TWPXEdit.GetNewMulti1(aQSO : TQSO) : string; +var temp : string; +begin + temp := ' '+aQSO.QSO.Multi1; + if aQSO.QSO.NewMulti1 then temp[1] := '*'; + Result := temp; +end; + +constructor TSerialGeneralEdit.Create; +begin + inherited; + colSerial := 0; + colTime := 1; + colCall := 2; + colrcvdRST := 3; + colrcvdNumber := 4; + colBand := 5; + colMode := 6; + {colPower := 6;} + colPoint := 7; + colNewMulti1 := 8; + colOp := 9; + colMemo := 10; + + SerialWid := 4; + TimeWid := 4; + CallSignWid := 8; + rcvdRSTWid := 3; + NumberWid := 4; + BandWid := 3; + ModeWid := 3; + PointWid := 2; + OpWid := 6; + MemoWid := 7; + NewMulti1Wid := 5; + + MainForm.Grid.Cells[colNewMulti1,0] := 'prefix'; + + MainForm.Grid.ColCount := 11; + MainForm.ModeEdit.Visible := True; + MainForm.SerialEdit.Visible := True; + if UOptions.Options.MultiOp > 0 then + begin + OpWid := 6; + MemoWid := 7; + end + else + begin + OpWid := 0; + MemoWid := 13; + MainForm.OpEdit.Visible := False; + end; + + SetGridWidth; + SetEditFields; +end; + +function TSerialGeneralEdit.GetNewMulti1(aQSO : TQSO) : string; +var temp : string; +begin + Result := ''; + if GeneralMulti2.PXMulti = 0 then + begin + if aQSO.QSO.NewMulti1 then + Result := aQSO.QSO.Multi1; + end + else + begin + temp := ' '+aQSO.QSO.Multi1; + if aQSO.QSO.NewMulti1 then temp[1] := '*'; + Result := temp; + end; +end; + +constructor TIOTAEdit.Create; +begin + inherited; + colSerial := 0; + colTime := 1; + colCall := 2; + colrcvdRST := 3; + colrcvdNumber := 4; + colBand := 5; + colMode := 6; + {colPower := 6;} + colPoint := 7; + colNewMulti1 := 8; + colOp := 9; + colMemo := 10; + + SerialWid := 4; + TimeWid := 4; + CallSignWid := 8; + rcvdRSTWid := 3; + NumberWid := 6; + BandWid := 3; + ModeWid := 3; + PointWid := 2; + OpWid := 6; + MemoWid := 7; + NewMulti1Wid := 5; + + //MainForm.Grid.Cells[colNewMulti1,0] := ''; + + MainForm.Grid.ColCount := 11; + //MainForm.ModeEdit.Visible := False; + MainForm.SerialEdit.Visible := True; + if UOptions.Options.MultiOp > 0 then + begin + OpWid := 6; + MemoWid := 5; + end + else + begin + OpWid := 0; + MemoWid := 11; + MainForm.OpEdit.Visible := False; + end; + + SetGridWidth; + SetEditFields; +end; + +function TIOTAEdit.GetNewMulti1(aQSO : TQSO) : string; +var temp : string; +begin + //temp := ' '+aQSO.QSO.Multi1; + if aQSO.QSO.NewMulti1 then + temp := aQSO.QSO.Multi1; + Result := temp; +end; + +function TGeneralEdit.GetNewMulti1(aQSO : TQSO) : string; +var temp : string; +begin + if aQSO.QSO.NewMulti1 then + temp := aQSO.QSO.Multi1 + else + temp := ''; + Result := temp; +end; + +constructor TALLJAEdit.Create; +begin + inherited; + + colTime := 0; + colCall := 1; + colrcvdRST := 2; + colrcvdNumber := 3; + colBand := 4; + colMode := 5; + colPoint := 6; + colNewMulti1 := 7; + colNewPower := 8; + colOp := 9; + colMemo := 10; + MainForm.Grid.ColCount := 11; + MainForm.NewPowerEdit.Visible := True; + if UOptions.Options.MultiOp > 0 then + begin + OpWid := 6; + MemoWid := 7; + end + else + begin + OpWid := 0; + MemoWid := 13; + MainForm.OpEdit.Visible := False; + end; + + SetGridWidth; + SetEditFields; + end; + +function TALLJAEdit.GetNewMulti1(aQSO : TQSO) : string; +var temp : string; +begin + if aQSO.QSO.NewMulti1 then + temp := aQSO.QSO.Multi1 + else + temp := ''; + Result := temp; +end; + +constructor TIARUEdit.Create; +begin + inherited; + + colTime := 0; + colCall := 1; + colrcvdRST := 2; + colrcvdNumber := 3; + colBand := 4; + colMode := 5; + colPoint := 6; + colNewMulti1 := 7; + //colNewPower := 8; + colOp := 8; + colMemo := 9; + + NumberWid := 4; + BandWid := 3; + NewMulti1Wid := 4; + + MainForm.Grid.ColCount := 10; + //MainForm.NewPowerEdit.Visible := True; + if UOptions.Options.MultiOp > 0 then + begin + OpWid := 6; + MemoWid := 11; + end + else + begin + OpWid := 0; + MemoWid := 17; + MainForm.OpEdit.Visible := False; + end; + + SetGridWidth; + SetEditFields; + end; + +function TIARUEdit.GetNewMulti1(aQSO : TQSO) : string; +var temp : string; +begin + if aQSO.QSO.NewMulti1 then + temp := aQSO.QSO.Multi1 + else + temp := ''; + Result := temp; +end; + +function TARRLDXEdit.GetNewMulti1(aQSO : TQSO) : string; +var temp : string; +begin + if aQSO.QSO.NewMulti1 then + temp := aQSO.QSO.Multi1 + else + temp := ''; + Result := temp; +end; + +function TACAGEdit.GetNewMulti1(aQSO : TQSO) : string; +var temp : string; +begin + if aQSO.QSO.NewMulti1 then + temp := '*' + else + temp := ''; + Result := temp; +end; + +procedure TMainForm.FormCreate(Sender: TObject); +var i, j, msec : integer; + M : TMenuItem; + s, ss : string; + B : TBand; + VerInfo : TOSVersionInfo; + debugfile : textfile; +// L : tLabel; +begin +//DEBUGMODE := TRUE; +if DEBUGMODE then + begin + assignfile(debugfile, 'DEBUG.TXT'); + rewrite(debugfile); + writeln(debugfile, 'debug process start'); + closefile(debugfile); + end; + + defaultTextColor := CallsignEdit.Font.Color; + OldCallsign := ''; + OldNumber := ''; + + EditScreen := nil; + clStatusLine := clWindowText; + msec := Options.Settings.CW._interval; + s := ''; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 1'); + closefile(debugfile); + end; + + for i := 0 to ParamCount do + begin + s := s +' '+ ParamStr(i); + ss := ParamStr(i); + if pos('/I',UpperCase(ss))=1 then + begin + Delete(ss,1,2); + try + j := StrToInt(ss); + except + on EConvertError do + j := 0; + end; + if (j > 0) and (j < 100) then + msec := j; + end; + end; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 2'); + closefile(debugfile); + end; + + VerInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo); + GetVersionEx(VerInfo); + + if VerInfo.dwPlatformId = VER_PLATFORM_WIN32_NT then + begin + ZLOG_WIN2KMODE := TRUE; + BGK32LIB._WIN2KMODE := ZLOG_WIN2KMODE; + end; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 3'); + closefile(debugfile); + end; + + if HiWord(GetKeyState(VK_SHIFT)) <> 0 then // ver 1.9x + begin + ZLOG_WIN2KMODE := TRUE; + BGK32LIB._WIN2KMODE := ZLOG_WIN2KMODE; + end; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 4'); + closefile(debugfile); + end; + + + if (pos('/NOBGK', UpperCase(s)) = 0) then + if HiWord(GetKeyState(VK_SHIFT)) = 0 then // ver 1.9x + InitializeBGK(msec); + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 5'); + closefile(debugfile); + end; + + RenewCWToolBar; + Application.OnHint := ShowHint; + LastFocus := CallSignEdit; {the place to set focus when ESC is pressed from Grid} + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 6'); + closefile(debugfile); + end; + + + {MyContest := TALLJAContest.Create; } + + CurrentQSO := TQSO.Create; + Randomize; + GLOBALSERIAL := Random10*1000; // for qso id + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 7'); + closefile(debugfile); + end; + + with CurrentQSO.QSO do + begin + NrSent := ''; + Mode := mCW; + Band := b7; + Operator := ''; + TX := Options.GetTXNr; + Reserve3 := NewQSOID; + end; + + //CallsignEdit.Text := ''; +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 8'); + closefile(debugfile); + end; + + + NumberEdit.Text := ''; + BandEdit.Text := MHzString[CurrentQSO.QSO.Band]; + PowerEdit.Text := CurrentQSO.PowerStr; + NewPowerEdit.Text := NewPowerString[CurrentQSO.QSO.Power]; + PointEdit.Text := CurrentQSO.PointStr; + RcvdRSTEdit.Text := CurrentQSO.RSTStr; + CurrentQSO.UpdateTime; + TimeEdit.Text := CurrentQSO.TimeStr; + DateEdit.Text := CurrentQSO.DateStr; + + + Grid.RowCount := DisplayedQSOs + 1; + + if Options.Settings._backuppath = '' then + BackUp1.Enabled := False; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 9'); + closefile(debugfile); + end; + + if Options.OpList.Count > 0 then + begin + for i := 0 to Options.OpList.Count-1 do + begin + M := TMenuItem.Create(Self); + M.Caption := TrimRight(Copy(Options.OpList.Strings[i], 1, 20)); + M.OnClick := MainForm.OpMenuClick; + MainForm.OpMenu.Items.Add(M); + {M.Free;} + end; + end; + +if DEBUGMODE then + begin + append(debugfile); + writeln(debugfile, 'CHECKPOINT 10'); + closefile(debugfile); + end; + + TempQSOList := TList.Create; + ControlPTT(False); + + //SysUtils.Time24Hour := True; + + //ELogJapanese.InitializeFields; + +end; + +procedure TMainForm.ShowHint(Sender: TObject); +begin + WriteStatusLine(Application.Hint, false); +end; + +procedure TMainForm.FileNew(Sender: TObject); +var R : word; +begin + if Log.Saved = False then + begin + R := MessageDlg('Save changes to '+CurrentFileName+' ?', mtConfirmation, + [mbYes, mbNo, mbCancel], 0); {HELP context 0} + case R of + mrYes : FileSave(Sender); + mrCancel : exit; + end; + end; + CurrentFileName := ''; + Hide; + MyContest.ScoreForm.Close; + MyContest.MultiForm.Close; + MenuForm.ShowModal;{ Add code to create a new file } +end; + +procedure TMainForm.FileOpen(Sender: TObject); +begin + OpenDialog.Title := 'Open file'; + + OpenDialog.InitialDir := Options.Settings._logspath; + + if OpenDialog.Execute then + begin + MainForm.WriteStatusLine('Loading...', false); + {MyContest.LoadFromFile(OpenDialog.FileName);} + CurrentFileName := OpenDialog.FileName; + MainForm.LoadNewContestFromFile(CurrentFileName); + MyContest.Renew; + //EditScreen.Renew; + //EditScreen.RefreshScreen; + MainForm.WriteStatusLine('', false); + MainForm.Caption := 'zLog for Windows ' + ExtractFileName(CurrentFileName); + { Add code to open OpenDialog.FileName } + end; +end; + +procedure TMainForm.FileSave(Sender: TObject); +begin + if CurrentFileName <> '' then + Log.SaveToFile(CurrentFileName) + else + FileSaveAs(Self); + { Add code to save current file under current name } +end; + +procedure TMainForm.FileSaveAs(Sender: TObject); +begin + // CloseBGK; {hangs up when FDD is selected. why?} + if SaveDialog.Execute then + begin + Log.SaveToFile(SaveDialog.FileName); + CurrentFileName := SaveDialog.FileName; + MainForm.Caption := 'zLog for Windows ' + ExtractFileName(CurrentFileName); + { Add code to save current file under SaveDialog.FileName } + end; +// InitializeBGK; +end; + +function ExecuteFile(const FileName, Params, DefaultDir: string; + ShowCmd: Integer): THandle; +var + zFileName, zParams, zDir: array[0..79] of Char; +begin + Result := ShellExecute(MainForm.Handle, nil, + StrPCopy(zFileName, FileName), StrPCopy(zParams, Params), + StrPCopy(zDir, DefaultDir), ShowCmd); +end; + +procedure TMainForm.FilePrint(Sender: TObject); +var R : Integer; + S : string; +begin + + if Log.Saved = False then + begin + R := MessageDlg('Save changes to '+CurrentFileName+' ?', mtConfirmation, + [mbYes, mbNo, mbCancel], 0); {HELP context 0} + case R of + mrYes : FileSave(Sender); + mrCancel : exit; + end; + end; + + R := ExecuteFile('zprintw', //CurrentFileName, + ExtractFileName(CurrentFileName), + ExtractFilePath(ParamStr(0)), SW_SHOW); + +{ + R := ExecuteFile('zprintw' +CurrentFileName, + ExtractFileName(CurrentFileName), + ExtractFilePath(ParamStr(0)), SW_SHOW); +} + //MainFOrm.Caption := CUrrentFileName; + if R > 32 then + exit; { successful } + S := 'Unknown error'; + case R of + 0 : S := 'Out of memory or resources'; + ERROR_FILE_NOT_FOUND : S := 'ZPRINTW.EXE not found'; + end; + WriteStatusLine(S, true); +end; + +procedure TMainForm.FilePrintSetup(Sender: TObject); +begin + //PrinterSetup.Execute; +end; + +procedure _RestoreWinState(var F : TForm); +var B : boolean; + X, Y, H, W : integer; +begin + Options.ReadWin(F.Name, B, X, Y, H, W); + if B = True then + begin + F.Show; + F.Left := X; + F.Top := Y; + F.Width := W; + F.Height := H; + end; +end; + +procedure TMainForm.RestoreWindowStates; +var F : TForm; + B, BB : boolean; + X, Y, W, H : integer; + S : string; +begin + F := CheckCall2; + _RestoreWinState(F); + F := PartialCheck; + _RestoreWinState(F); + //_RestoreWinState(F); + F := SuperCheck; + _RestoreWinState(F); + //Options.ReadWin2('SuperCheck', F); + F := CheckMulti; + _RestoreWinState(F); + F := CWKeyBoard; + _RestoreWinState(F); + F := RigControl; + _RestoreWinState(F); + {F := BandScope; + _RestoreWinState(F);} + F := BandScope2; + _RestoreWinState(F); + F := ChatForm; + _RestoreWinState(F); + F := FreqList; + _RestoreWinState(F); + F := CommForm; + _RestoreWinState(F); + F := ScratchSheet; + _RestoreWinState(F); + F := QuickRef; + _RestoreWinState(F); + + F := MyContest.MultiForm; + Options.ReadWin('MultiForm', B, X, Y, H, W); + if B = True then + begin + F.Show; + F.Left := X; + F.Top := Y; + end; + F := MyContest.ScoreForm; + Options.ReadWin('ScoreForm', B, X, Y, H, W); + if B = True then + begin + F.Show; + F.Left := X; + F.Top := Y; + end; + Options.RestoreMainForm(X, Y, W, H, B, BB); + if (W > 0) and (H > 0) then + begin + if B then + begin + mnHideCWPhToolbar.Checked := True; + CWToolBar.Height := 1; + SSBToolBar.Height := 1; + end; + if BB then + begin + mnHideMenuToolbar.Checked := True; + MainToolBar.Height := 1; + end; + Left := X; + Top := Y; + Width := W; + Height := H; + end; + X := Options.GetSuperCheckColumns; + SuperCheck.ListBox.Columns := X; + SuperCheck.SpinEdit.Value := X; +end; + +procedure TMainForm.RecordWindowStates; +var F : TForm; +begin + F := CheckCall2; + //Options.RecordWin(F.Name, F.Visible, F.Left, F.Top); + Options.RecordWin2(F.Name, F); + F := PartialCheck; + Options.RecordWin2(F.Name, F); + F := SuperCheck; + Options.RecordWin2(F.Name, F); + F := CheckMulti; + Options.RecordWin2(F.Name, F); + F := CWKeyBoard; + Options.RecordWin2(F.Name, F); + F := RigControl; + Options.RecordWin2(F.Name, F); + {F := BandScope; + Options.RecordWin2(F.Name, F); } + F := BandScope2; + Options.RecordWin2(F.Name, F); + F := ChatForm; + Options.RecordWin2(F.Name, F); + F := FreqList; + Options.RecordWin2(F.Name, F); + F := CommForm; + Options.RecordWin2(F.Name, F); + F := ScratchSheet; + Options.RecordWin2(F.Name, F); + F := QuickRef; + Options.RecordWin2(F.Name, F); + + F := MyContest.MultiForm; + Options.RecordWin('MultiForm', F.Visible, F.Left, F.Top); + F := MyContest.ScoreForm; + Options.RecordWin('ScoreForm', F.Visible, F.Left, F.Top); + + Options.RecordMainForm(Left, Top, Width, Height, mnHideCWPhToolBar.Checked, mnHideMenuToolBar.Checked); + Options.RecordSuperCheckColumns(SuperCheck.ListBox.Columns); +end; + +procedure TMainForm.FileExit(Sender: TObject); +var R : word; +begin + //RigControl.ZCom1.Disconnect; + //RigControl.ZCom2.Disconnect; + //RigControl.ZCom3.Disconnect; + if Log.Saved = False then + begin + R := MessageDlg('Save changes to '+CurrentFileName+' ?', mtConfirmation, + [mbYes, mbNo, mbCancel], 0); {HELP context 0} + case R of + mrYes : FileSave(Sender); + mrCancel : exit; + end; + end; + CloseBGK; + RecordWindowStates; + + if MMTTYRunning then + ExitMMTTY; + + MenuForm.Close; +end; + +procedure TMainForm.EditUndo(Sender: TObject); +begin + { Add code to perform Edit Undo } +end; + +procedure TMainForm.EditCut(Sender: TObject); +begin + { Add code to perform Edit Cut } +end; + +procedure TMainForm.EditCopy(Sender: TObject); +begin + { Add code to perform Edit Copy } +end; + +procedure TMainForm.EditPaste(Sender: TObject); +begin + { Add code to perform Edit Paste } +end; + +procedure TMainForm.HelpContents(Sender: TObject); +begin + Application.HelpCommand(HELP_CONTENTS, 0); +end; + +procedure TMainForm.HelpSearch(Sender: TObject); +const + EmptyString: PChar = ''; +begin + Application.HelpCommand(HELP_PARTIALKEY, Longint(EmptyString)); +end; + +procedure TMainForm.HelpHowToUse(Sender: TObject); +begin + Application.HelpCommand(HELP_HELPONHELP, 0); +end; + +procedure TMainForm.HelpAbout(Sender: TObject); +begin + ABoutBox.Show;{ Add code to show program's About Box } +end; + +procedure ConsoleRigBandSet(B : TBand); +var Q : TQSO; +begin + Q := TQSO.Create; + Q.QSO.Band := B; + + if RigControl.Rig <> nil then + begin + RigControl.Rig.SetBand(Q); + if CurrentQSO.QSO.Mode = mSSB then + RigControl.Rig.SetMode(CurrentQSO); + RigControl.SetBandMask; // ver 1.9z + MainForm.UpdateBand(Q.QSO.Band); + end + else + MainForm.UpdateBand(Q.QSO.Band); + + Q.Free; +end; + +procedure TMainForm.SetDispHeight(H : integer); +var i : integer; +begin + Grid.DefaultRowHeight := H; + EditPanel.Height := H + 9; + for i := 0 to EditPanel.ControlCount - 1 do + EditPanel.Controls[i].Height := H; + Options.Settings._mainrowheight := H; + Options.Ini.SetInteger('Preferences','RowHeight', Options.Settings._mainrowheight); +end; + +procedure TMainForm.ProcessConsoleCommand(S : string); +var Q : TQSO; + I : Double; + j : integer; + temp, temp2 : string; +begin + Delete(S, 1, 1); + Q := TQSO.Create; + temp := S; + + if S = 'ELOG' then + ELogJapanese.ShowModal; + + if S = 'NTMODE' then + begin + if ZLOG_WIN2KMODE = True then + WriteStatusLine('ZLOG_WIN2KMODE = True', false) + else + WriteStatusLine('ZLOG_WIN2KMODE = False', false) + end; + + if pos('WANTED', S) = 1 then + begin + Delete(temp, 1, 6); + temp := TrimRight(temp); + if temp <> '' then + begin + if temp[1] in ['_', '/', '-'] then + Delete(temp, 1, 1); + ZLinkForm.PostWanted(CurrentQSO.QSO.Band, temp); + MyContest.PostWanted(IntToStr(Ord(CurrentQSO.QSO.Band))+' '+temp); + end; + end; + + if (pos('CLEARWANTED', S) = 1) or (S='CLRWANTED') then + begin + MyContest.ClearWanted; + end; + + if pos('DELWANTED', S) = 1 then + begin + Delete(temp, 1, 9); + temp := TrimRight(temp); + if temp <> '' then + begin + if temp[1] in ['_', '/', '-'] then + Delete(temp, 1, 1); + ZLinkForm.DelWanted(CurrentQSO.QSO.Band, temp); + MyContest.DelWanted(IntToStr(Ord(CurrentQSO.QSO.Band))+' '+temp); + end; + end; + + if pos('HARDWARE', S) = 1 then + begin + if pos('ON', S) > 0 then + begin + ZLOG_WIN2KMODE := FALSE; + BGK32LIB._WIN2KMODE := ZLOG_WIN2KMODE; + WriteStatusLine('Hardware access enabled', False); + end + else + begin + ZLOG_WIN2KMODE := TRUE; + BGK32LIB._WIN2KMODE := ZLOG_WIN2KMODE; + WriteStatusLine('Hardware access disabled', False); + end + end; + + if (pos('AUTOBANDSCOPE', S) = 1) or (pos('AUTOBANDMAP', S) = 1) + or (pos('AUTOBS', S) = 1) then + begin + if pos('OFF', S) > 0 then + begin + Options.Settings._autobandmap := False; + WriteStatusLine('Automatic band map OFF', False); + end + else + begin + Options.Settings._autobandmap := TRUE; + WriteStatusLine('Automatic band map ON', False); + end + end; + + + if S = 'T' then + if TTYConsole <> nil then + TTYConsole.Show; + + if S = 'MMTTY' then + begin + mnMMTTY.Tag := 1; + mnMMTTY.Caption := 'Exit MMTTY'; + mnTTYConsole.Visible := True; + Application.CreateForm(TTTYConsole, TTYConsole); + TTYConsole.SetTTYMode(ttyMMTTY); + InitializeMMTTY(MainForm.Handle); + end; + + if S = 'OP' then + begin + for j := 1 to OpMenu.Items.Count - 1 do + begin + ConsolePad.AddLine(FillRight(OpMenu.Items[j].Caption, 15)+ + FillLeft(IntToStr(Log.OpQSO(temp2)),5) + ); + end; + ConsolePad.AddLine(''); + end; + + if (S= 'DELDUPES') or (S='DELDUPE') then + begin + Log.RemoveDupes; + MyContest.Renew; + end; + + if S= 'EXITMMTTY' then + begin + TTYConsole.Close; + TTYConsole.Destroy; + ExitMMTTY; + end; + + if pos('HEIGHT', S) = 1 then + begin + temp := S; + Delete(temp, 1, 6); + temp := TrimLeft(temp); + try + j := StrToInt(temp); + except + on EConvertError do + exit; + end; + if (j > 17) and (j < 41) then + SetDispHeight(j); + end; + + if S= 'MMCLR' then + MMTTYBuffer := ''; + + + if S = 'SF' then + ZLinkForm.SendRigStatus; + + if S = 'CQ' then + begin + SetCQ(True); + //ZLinkForm.SendRigStatus; + end; + + if S = 'SP' then + begin + SetCQ(False); + //ZLinkForm.SendRigStatus; + end; + + if S = 'DEBUG' then + WriteStatusLine('DEBUG_FLAG='+IntToStr(DEBUG_FLAG), false); + + if S = 'CQ?' then + if CurrentQSO.QSO.CQ then + WriteStatusLine('CQ status : CQ', false) + else + WriteStatusLine('CQ status : SP', false); + + if (S = 'MUL') or (S = 'MULTI') or (S = 'MULT') then + begin + Options.Settings._multistation := True; + Options.SetTXNr(2); + CurrentQSO.QSO.TX := Options.GetTXNr; + WriteStatusLine('Multi station', true); + + if MainForm.SerialEdit.Visible then + if (Options.Settings._syncserial) and (SerialContestType = SER_MS) then + begin + CurrentQSO.QSO.Serial := SerialArrayTX[CurrentQSO.QSO.TX]; + MainForm.SerialEdit.Text := CurrentQSO.SerialStr; + end; + + MainForm.Caption := 'zLog for Windows - Multi station ' + ExtractFileName(CurrentFileName); + ReEvaluateCountDownTimer; + ReEvaluateQSYCount; + end; + if S = 'RUN' then + begin + Options.Settings._multistation := False; + Options.SetTXNr(1); + CurrentQSO.QSO.TX := Options.GetTXNr; + WriteStatusLine('Running station', true); + + if MainForm.SerialEdit.Visible then + if (Options.Settings._syncserial) and (SerialContestType = SER_MS) then + begin + CurrentQSO.QSO.Serial := SerialArrayTX[CurrentQSO.QSO.TX]; + MainForm.SerialEdit.Text := CurrentQSO.SerialStr; + end; + + MainForm.Caption := 'zLog for Windows - Running station ' + ExtractFileName(CurrentFileName); + ReEvaluateCountDownTimer; + ReEvaluateQSYCount; + end; + + if S = 'SERIALTYPE' then + WriteStatusLine('SerialContestType = ' + IntToStr(SerialContestType), True); + if S = 'TUNE' then + begin + CtrlZCQLoop := True; + TuneOn; + end; + if (S = 'LF') or (S = 'LASTF') then + if RigControl.Rig <> nil then + RigControl.Rig.MoveToLastFreq; + if S = 'TV' then + if RigControl.Rig <> nil then + RigControl.Rig.ToggleVFO; + if S = 'VA' then + if RigControl.Rig <> nil then + RigControl.Rig.SetVFO(0); + if S = 'VB' then + if RigControl.Rig <> nil then + RigControl.Rig.SetVFO(1); + if S = 'RC' then + if RigControl.Rig <> nil then + RigControl.Rig.RitClear; + + if S = 'YAESUTEST' then + if RigControl.Rig <> nil then + RigControl.Rig.FILO := not(RigControl.Rig.FILO); + + if S = 'SC' then + SuperCheckButtonClick(Self); + if S = 'RESET' then + if RigControl.Rig <> nil then + RigControl.Rig.Reset; + + if S = 'R1' then + RigControl.SetCurrentRig(1); + + if S = 'R2' then + RigControl.SetCurrentRig(2); + + if pos('R',S) = 1 then + if length(S) = 2 then + begin + case S[2] of + '3'..'9' : RigControl.SetCurrentRig(ord(S[2]) - ord('0')); + end; + end; + + if S = 'TR' then + RigControl.ToggleCurrentRig; + + if pos('MAXRIG', S) = 1 then + begin + if length(temp) = 6 then + WriteStatusLine('MAXRIG = '+IntToStr(RigControl._maxrig), true) + else + begin + Delete(temp, 1, 6); + temp := TrimRight(temp); + try + j := StrToInt(temp); + except + on EConvertError do + exit; + end; + if (j >= 2) and (j <= 9) then + RigControl._maxrig := j; + WriteStatusLine('MAXRIG set to '+IntToStr(j), true) + end; + end; + + if pos('TXNR', S) = 1 then + begin + if length(temp) = 4 then + WriteStatusLine('TX# = '+IntToStr(Options.Settings._txnr), true) + else + begin + Delete(temp, 1, 4); + temp := TrimRight(temp); + try + j := StrToInt(temp); + except + on EConvertError do + exit; + end; + if (j >= 0) and (j <= 99) then + Options.SetTXNr(j); + CurrentQSO.QSO.TX := Options.GetTXNr; + WriteStatusLine('TX# set to '+IntToStr(Options.Settings._txnr), true); + ReevaluateQSYCount; + end; + end; + + if pos('PCNAME', S) = 1 then + begin + if length(temp) = 6 then + WriteStatusLine('PC name is '+Options.Settings._pcname, true) + else + begin + Delete(temp, 1, 7); + temp := TrimRight(temp); + Options.Settings._pcname := temp; + Options.Ini.SetString('Z-Link', 'PCName', temp); + ChatForm.PCNameSet := True; + WriteStatusLine('PC name set to '+Options.Settings._pcname, true); + end; + end; + + if (S = '19') then + ConsoleRigBandSet(b19); + + if (S = '35') or (S = '3') or (S='37') or (S='38') then + ConsoleRigBandSet(b35); + + if (S = '7') then + ConsoleRigBandSet(b7); + + if (S = '10') then + ConsoleRigBandSet(b10); + + if (S = '14') then + ConsoleRigBandSet(b14); + + if (S = '18') then + ConsoleRigBandSet(b18); + + if (S = '21') then + ConsoleRigBandSet(b21); + + if (S = '24') then + ConsoleRigBandSet(b24); + + if (S = '28') then + ConsoleRigBandSet(b28); + + if (S = '50') then + ConsoleRigBandSet(b50); + + if (S = '144') then + ConsoleRigBandSet(b144); + + if (S = '430') then + ConsoleRigBandSet(b430); + + if (S = '1200') then + ConsoleRigBandSet(b1200); + + if (S = '2400') then + ConsoleRigBandSet(b2400); + + if (S = '5600') then + ConsoleRigBandSet(b5600); + + if (S = '10G') then + ConsoleRigBandSet(b10G); + + if (S = 'VOICEON') then + begin + SetVoiceFlag(1); + end; + + if (S = 'VOICEOFF') then + begin + SetVoiceFlag(0); + end; + + if (S = 'TEST') then + begin + PaddleThread.Stop := True; + //PaddleThread.Free; + end; + + if (S = 'TEST2') then + begin + BandScope2.MarkCurrentFreq(7060000); + end; + + if (S = 'SB1') then + begin + if RigControl.Rig <> nil then + RigControl.Rig.SetStopBits(1); + end; + + if (S = 'SB2') then + begin + if RigControl.Rig <> nil then + RigControl.Rig.SetStopBits(2); + end; + + if (S = 'B300') then + begin + if RigControl.Rig <> nil then + RigControl.Rig.SetBaudRate(300); + end; + + if (S = 'B1200') then + begin + if RigControl.Rig <> nil then + RigControl.Rig.SetBaudRate(1200); + end; + + if (S = 'B2400') then + begin + if RigControl.Rig <> nil then + RigControl.Rig.SetBaudRate(2400); + end; + + if (S = 'B4800') then + begin + if RigControl.Rig <> nil then + RigControl.Rig.SetBaudRate(4800); + end; + + if (S = 'B9600') then + begin + if RigControl.Rig <> nil then + RigControl.Rig.SetBaudRate(9600); + end; + + if (S = 'MOVETOMEMO') then + begin + Options.Settings._movetomemo := True; + end; + + if (S = 'LQ') or (S = 'L') then + SwitchLastQSOBandMode; + if S = 'CWOFF' then + CloseBGK; + if S = 'CWON' then + InitializeBGK(Options.Settings.CW._interval); + + try + I := StrToFloat(S); + except + on EConvertError do + begin + I := 0; + end; + end; + + if (I > 1799) and (I < 1000000) then + if RigControl.Rig <> nil then + begin + RigControl.Rig.SetFreq(Round(I*1000)); + if CurrentQSO.QSO.Mode = mSSB then + RigControl.Rig.SetMode(CurrentQSO); + //ZLinkForm.SendRigStatus; + ZLinkForm.SendFreqInfo(Round(I*1000)); + end + else + begin + RigControl.TempFreq[CurrentQSO.QSO.Band] := I; + ZLinkForm.SendFreqInfo(Round(I*1000)); + end; + + if pos('SYNCSERIAL', S) = 1 then + begin + if pos('OFF', S) > 0 then + Options.Settings._syncserial := false + else + Options.Settings._syncserial := True; + end; + + if pos('QSYCOUNT', S) = 1 then + begin + if pos('OFF', S) > 0 then + Options.Settings._qsycount := False + else + Options.Settings._qsycount := True; + end; + + if (pos('HELP', S) = 1) or (S = 'H') then + begin + if QuickRef.Visible then + QuickRef.Close + else + begin + QuickRef.Show; + CallsignEdit.SetFocus; + end; + end; + + if (pos('MULTWARN', S) = 1) or (pos('MULTW', S) = 1) or (pos('MW', S) = 1) then + begin + if pos('OFF', S) > 0 then + Options.Settings._multistationwarning := False + else + Options.Settings._multistationwarning := True; + end; + + Q.Free; +end; + +procedure TMainForm.CommonEditKeyProcess(Sender: TObject; var Key: Char); +var E : TEdit; + i : integer; + str : string; +begin + E := TEdit(Sender); + //WriteStatusLine(IntToStr(ord(Key))); + case Key of + ^A : begin + E.SelStart := 0; + E.SelLength := 0; + Key := #0; + end; + ^E : begin + E.SelStart := Length(E.Text); + E.SelLength := 0; + Key := #0; + end; + ^B : begin + i := E.SelStart; + if i > 0 then + E.SelStart := i - 1; + Key := #0; + end; + ^F : begin + i := E.SelStart; + if i < Length(E.Text) then + E.SelStart := i + 1; + Key := #0; + end; + ^H : begin + Key := Chr($08); + end; + ^D : begin + i := E.SelStart; + str := E.Text; + if i < Length(E.Text) then + Delete(str, i+1, 1); + E.Text := str; + E.SelStart := i; + Key := #0; + end; + ^J : begin + i := E.SelStart; + str := E.Text; + str := copy(str, 1, i); + E.Text := str; + E.SelStart := length(str); + Key := #0; + end; + end; +end; + +procedure TMainForm.IncFontSize; +var j : integer; +begin + j := EditPanel.Font.Size; + if j < 21 then + inc(j) + else + j := 9; + EditPanel.Font.Size := j; + Grid.Font.Size := j; + EditDialog.Font.Size := j; + Options.Settings._mainfontsize := j; + Options.Ini.SetInteger('Preferences','FontSize', Options.Settings._mainfontsize); +end; + +procedure TMainForm.SwitchCWBank(Action: integer); // 0 : toggle; 1,2 bank#) +var j : integer; +begin + if Action = 0 then + begin + if Options.Settings.CW.CurrentBank = 1 then + Options.Settings.CW.CurrentBank := 2 + else + Options.Settings.CW.CurrentBank := 1; + end + else + Options.Settings.CW.CurrentBank := Action; + + if Options.Settings.CW.CurrentBank = 1 then + begin + j := clGreen; + WriteStatusLine('CW Bank A', false) + end + else + begin + j := clMaroon; + WriteStatusLine('CW Bank B', false); + end; + + CWF1.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 1); + CWF2.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 2); + CWF3.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 3); + CWF4.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 4); + CWF5.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 5); + CWF6.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 6); + CWF7.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 7); + CWF8.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 8); + CWF1.FaceColor := j; + CWF2.FaceColor := j; + CWF3.FaceColor := j; + CWF4.FaceColor := j; + CWF5.FaceColor := j; + CWF6.FaceColor := j; + CWF7.FaceColor := j; + CWF8.FaceColor := j; +end; + +procedure TMainForm.EditKeyPress(Sender: TObject; var Key: Char); +var j : integer; + E : Extended; + Q : TQSO; + XY : TGridRect; + Boo : boolean; +label jjj; +begin + CommonEditKeyProcess(Sender, Key); + if CallsignEdit.Font.Color = clGrayText then + begin + if Key <> ' ' then + begin + CallsignEdit.Text := OldCallsign; + NumberEdit.Text := OldNumber; + end; + CallsignEdit.Font.Color := defaultTextColor; + NumberEdit.Font.Color := defaultTextColor; + if Key <> ' ' then + exit; + end; + case Key of + '@' : + begin + MyContest.MultiForm.SelectAndAddNewPrefix(CurrentQSO.QSO.Callsign); + Key := #0; + end; + '\' : + begin + ControlPTT(not(PTTIsOn)); // toggle PTT; + Key := #0; + end; + 'X','x' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + RigControl.ToggleCurrentRig; + Key := #0; + end; + end; + '!' : ToggleFixedSpeed; + '-' : // up key + begin + ToggleFixedSpeed; + Key := #0; + { + Grid.Row := Grid.RowCount - 1; + LastFocus := TEdit(Sender); + Grid.SetFocus; + Key := #0;} + end; + 'V','v' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + if RigControl.Rig <> nil then + RigControl.Rig.ToggleVFO; + Key := #0; + end; + end; + ^I : + begin + if PartialCheck.Visible then + begin + if PartialCheck.HitNumber > 0 then + CallsignEdit.Text := PartialCheck.HitCall + else + if SuperCheck.Visible then + if SuperCheck.HitNumber > 0 then + CallsignEdit.Text := SuperCheck.HitCall; + end + else // partial check is not visible + begin + if SuperCheck.Visible then + if SuperCheck.HitNumber > 0 then + CallsignEdit.Text := SuperCheck.HitCall; + end; + Key := #0; + end; + ^S : + begin + IncFontSize; + Key := #0; + end; + '+', ';' : + begin + DownKeyPress; + Key := #0; + end; + ^N : // insert band scope + begin + if HiWord(GetKeyState(VK_SHIFT))=0 then + Boo := True + else + Boo := False; + if RigControl.Rig <> nil then + begin + j := RigControl.Rig.CurrentFreqHz; + if j > 0 then + begin + //BandScope.CreateBSData(CurrentQSO, j); + BandScope2.CreateBSData(CurrentQSO, j); + end + else + goto jjj; + if Boo then + begin + CallsignEdit.Clear; + NumberEdit.Clear; + end; + end + else // no rig control + begin + jjj : + IntegerDialog.SetLabel('Enter frequency in kHz'); + IntegerDialog.ShowModal; + E := IntegerDialog.GetValueExtended; + if E > 1000 then + begin + //BandScope.CreateBSData(CurrentQSO, Round(E*1000)); + BandScope2.CreateBSData(CurrentQSO, Round(E*1000)); + end; + if Boo then + begin + CallsignEdit.Clear; + NumberEdit.Clear; + end; + end; + Key := #0; + end; + ^O : + begin + CurrentQSO.DecTime; + TimeEdit.Text := CurrentQSO.TimeStr; + DateEdit.Text := CurrentQSO.DateStr; + Key := #0; + end; + ^P : + begin + CurrentQSO.IncTime; + TimeEdit.Text := CurrentQSO.TimeStr; + DateEdit.Text := CurrentQSO.DateStr; + Key := #0; + end; + ^W : + begin + TEdit(Sender).Clear; + WriteStatusLine('', false); + Key := #0; + end; + ^R : + begin + Options.ReversePaddle; + Key := #0; + end; + ^K : + begin + EditedSinceTABPressed := tabstate_normal; + CallsignEdit.Clear; + NumberEdit.Clear; + MemoEdit.Clear; + Key := #0; + CallsignEdit.SetFocus; + WriteStatusLine('', false); + end; + 'Z' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + if CurrentQSO.QSO.mode = mCW then + begin + CQRepeatClick1(Sender); + end + else + begin + CQRepeatVoice1Click(Sender); + end; + Key := #0; + end; + end; + ^Z : + begin + if CurrentQSO.QSO.mode = mCW then + CQRepeatClick2(Sender) + else + CQRepeatVoice2Click(Sender); + Key := #0; + end; + ^T : + begin + CtrlZCQLoop := True; + TuneOn; + end; + Chr($1B) : {ESC} + begin + CWStopButtonClick(Self); + VoiceStopButtonClick(Self); + Key := #0; + end; + ' ' : + begin + if (TEdit(Sender).Name = 'NumberEdit') or (TEdit(Sender).Name = 'TimeEdit') or + (TEdit(Sender).Name = 'DateEdit') then + begin + Key := #0; + if PostContest and (TEdit(Sender).Name = 'NumberEdit') then + begin + if TimeEdit.Visible then + TimeEdit.SetFocus; + if DateEdit.Visible then + DateEdit.SetFocus; + end + else + CallsignEdit.SetFocus; + end + else {if space is pressed when Callsign edit is in focus} + begin + if NumberEdit.Text = '' then + begin + { + if Not(PostContest) then + CurrentQSO.UpdateTime; + TimeEdit.Text := CurrentQSO.TimeStr; + DateEdit.Text := CurrentQSO.DateStr; + } + end; + Key := #0; + //j := Log.IsDupe(CurrentQSO); + Q := Log.QuickDupe(CurrentQSO); + if Q <> nil then + begin + MessageBeep(0); + if AllowDupe then + begin + WriteStatusLineRed(Q.PartialSummary(Options.Settings._displaydatepartialcheck), true); + NumberEdit.SetFocus; + Exit; + end; + CallsignEdit.SelectAll; + WriteStatusLineRed(Q.PartialSummary(Options.Settings._displaydatepartialcheck), true); + exit; + end + else {if not dupe} + begin + MyContest.SpaceBarProc; + end; + NumberEdit.SetFocus; + end; + end; + 'Y','y' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + IncCWSpeed; + Key := #0; + end; + end; + 'F','f' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + (* + if Options.Settings.CW.CurrentBank = 1 then + begin + Options.Settings.CW.CurrentBank := 2; + j := clMaroon; + end + else + begin + Options.Settings.CW.CurrentBank := 1; + j := clGreen; + end; + if Options.Settings.CW.CurrentBank = 1 then + WriteStatusLine('CW Bank A', false) + else + WriteStatusLine('CW Bank B', false); + + CWF1.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 1); + CWF2.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 2); + CWF3.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 3); + CWF4.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 4); + CWF5.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 5); + CWF6.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 6); + CWF7.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 7); + CWF8.Hint := Options.CWMessage(Options.Settings.CW.CurrentBank, 8); + CWF1.FaceColor := j; + CWF2.FaceColor := j; + CWF3.FaceColor := j; + CWF4.FaceColor := j; + CWF5.FaceColor := j; + CWF6.FaceColor := j; + CWF7.FaceColor := j; + CWF8.FaceColor := j; *) + SwitchCWBank(0); + Key := #0; + end; + end; + 'T','t' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + CurrentQSO.UpdateTime; + TimeEdit.Text := CurrentQSO.TimeStr; + DateEdit.Text := CurrentQSO.DateStr; + Key := #0; + end; + end; + 'U','u' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + DecCWSpeed; + Key := #0; + end; + end; + 'B','b' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + MyContest.ChangeBand(True); + Key := #0; + end; + end; + 'R','r' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + MainForm.SetR(CurrentQSO); + RcvdRSTEdit.Text := CurrentQSO.RSTStr; + Key := #0; + end; + end; + 'S','s' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + MainForm.SetS(CurrentQSO); + RcvdRSTEdit.Text := CurrentQSO.RSTStr; + Key := #0; + end; + end; + 'M','m' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + MyContest.ChangeMode; + Key := #0; + end; + end; + 'P','p' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + MyContest.ChangePower; + Key := #0; + end; + end; + Chr($0D) : + begin + if CallsignEdit.Focused and (pos(',',CallsignEdit.Text) = 1) then + begin + ProcessConsoleCommand(CallsignEdit.Text); + CallsignEdit.Text := ''; + end + else + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + CurrentQSO.QSO.Reserve2 := $FF; + LogButtonClick(Self); + end; + Key := #0; + end; + end; + { of case } +end; + + +procedure TMainForm.CallsignEditChange(Sender: TObject); +begin + CurrentQSO.QSO.Callsign := CallsignEdit.Text; + BGK32LIB.SetCallSign(ShortString(CallsignEdit.Text)); + if EditedSinceTABPressed = tabstate_tabpressedbutnotedited then + EditedSinceTABPressed := tabstate_tabpressedandedited; + + if PartialCheck.Visible and PartialCheck._CheckCall then + PartialCheck.CheckPartial(CurrentQSO); + if SuperCheck.Visible then + SuperCheck.CheckSuper(CurrentQSO); + if CheckCall2.Visible then + CheckCall2.Renew(CurrentQSO); + +end; + + +procedure TMainForm.NumberEditChange(Sender: TObject); +begin + CurrentQSO.QSO.NrRcvd := NumberEdit.Text; +end; + +procedure TMainForm.PowerEditClick(Sender: TObject); +begin + PowerMenu.Popup(PowerEdit.Left + 50, PowerEdit.Top + 40); +end; + +procedure TMainForm.PowerMenuClick(Sender: TObject); +begin + PowerEdit.Text := PowerString[TPower(TMenuItem(Sender).Tag)]; + CurrentQSO.QSO.power := TPower(TMenuItem(Sender).Tag); + Options.CurrentPower[CurrentQSO.QSO.Band] := CurrentQSO.QSO.Power; + LastFocus.SetFocus; +end; + +procedure TMainForm.BandEditClick(Sender: TObject); +begin + BandMenu.Popup(MainForm.Left + BandEdit.Left + 20, MainForm.Top + EditPanel.Top+ BandEdit.Top); +end; + +procedure TMainForm.ModeMenuClick(Sender: TObject); +begin +{ ModeEdit.Text := ModeString[TMode(TMenuItem(Sender).Tag)]; + CurrentQSO.QSO.mode := TMode(TMenuItem(Sender).Tag); + If TMenuItem(Sender).Tag in [1..3] then + begin + CurrentQSO.QSO.RSTrcvd := 59; + CurrentQSO.QSO.RSTsent := 59; + RcvdRSTEdit.Text := '59'; + Grid.Align := alNone; + SSBToolBar.Visible := True; + CWToolBar.Visible := False; + Grid.Align := alClient; + end + else + begin + CurrentQSO.QSO.RSTrcvd := 599; + CurrentQSO.QSO.RSTsent := 599; + RcvdRSTEdit.Text := '599'; + Grid.Align := alNone; + CWToolBar.Visible := True; + SSBToolBar.Visible := False; + Grid.Align := alClient; + end;} + UpdateMode(TMode(TMenuItem(Sender).Tag)); + if RigControl.Rig <> nil then + RigControl.Rig.SetMode(CurrentQSO); + LastFocus.SetFocus; +end; + +procedure TMainForm.MemoEditChange(Sender: TObject); +begin + CurrentQSO.QSO.memo := MemoEdit.Text; +end; + +procedure TMainForm.ModeEditClick(Sender: TObject); +begin + ModeMenu.Popup(MainForm.Left+ModeEdit.Left+20, MainForm.Top+EditPanel.Top+ModeEdit.Top); +end; + +procedure TMainForm.GridMenuPopup(Sender: TObject); +var i : integer; + M : TMenuItem; +begin + SendSpot1.Enabled := CommForm.MaybeConnected; + + mChangePower.Visible := NewPowerEdit.Visible; + + for i := 0 to Ord(HiBand) do + begin + GBand.Items[i].Visible := BandMenu.Items[i].Visible; + GBand.Items[i].Enabled := BandMenu.Items[i].Enabled; + end; + + for i := 1 to GOperator.Count do + GOperator.Delete(0); + if Options.OpList.Count > 0 then + begin + M := TMenuItem.Create(Self); + M.Caption := 'Clear'; + M.OnClick := MainForm.GridOperatorClick; + MainForm.GOperator.Add(M); + for i := 0 to Options.OpList.Count-1 do + begin + M := TMenuItem.Create(Self); + M.Caption := Options.OpList.Strings[i]; + M.OnClick := MainForm.GridOperatorClick; + MainForm.GOperator.Add(M); + end; + end; + + + if Grid.Row > Log.TotalQSO then + begin + for i := 0 to GridMenu.Items.Count-1 do + GridMenu.Items[i].Enabled := False; + end + else + begin + for i := 0 to GridMenu.Items.Count-1 do + GridMenu.Items[i].Enabled := True; + end; +end; + +procedure TMainForm.LoadNewContestFromFile(FileName : string); +var f : file of TQSOdata; + D : TQSOdata; + Q : TQSO; + i : word; + Boo, Boo2 : boolean; +begin + {Log.Free;} + Q := TQSO.Create; + + Q.QSO := TQSO(Log.List[0]).QSO; + Boo := Log.AcceptDifferentMode; + Boo2 := Log.CountHigherPoints; + + + Log.Destroy; + Log := TQSOList.Create('test'); + + Log.AcceptDifferentMode := Boo; + Log.CountHigherPoints := Boo2; + + TQSO(Log.List[0]).QSO := Q.QSO; // contest info is set to current contest. + + System.assign(f, FileName); + reset(f); + read(f,D); + {if D.memo = 'ALLJA' then} + + {MyContest.Free; + MyContest := TALLJAContest.Create;} + + GLOBALSERIAL := 0; + + for i := 1 to FileSize(f)-1 do + begin + read(f,D); + Q.QSO := D; + if Q.QSO.Reserve3 = 0 then + Q.QSO.Reserve3 := NewQSOID; + Log.Add(Q); + end; + + GLOBALSERIAL := (Q.QSO.Reserve3 div 10000) mod 10000; + + System.close(f); + + CurrentQSO.QSO := Q.QSO; + CurrentQSO.QSO.Band := Q.QSO.Band; + CurrentQSO.QSO.Mode := Q.QSO.Mode; + CurrentQSO.QSO.Callsign := ''; + CurrentQSO.QSO.NrRcvd := ''; + CurrentQSO.QSO.Time := Date + Time; + CurrentQSO.QSO.TX := Options.GetTXNr; + CurrentQSO.QSO.Serial := Q.QSO.Serial; + CurrentQSO.QSO.Memo := ''; + + inc(CurrentQSO.QSO.Serial); + + //inc(SerialArray[CurrentQSO.QSO.Band]); + SerialArray[CurrentQSO.QSO.Band] := CurrentQSO.QSO.Serial; + + + + SerialEdit.Text := CurrentQSO.SerialStr; + TimeEdit.Text := CurrentQSO.TimeStr; + DateEdit.Text := CurrentQSO.DateStr; + CallsignEdit.Text := CurrentQSO.QSO.callsign; + RcvdRSTEdit.Text := CurrentQSO.RSTStr; + NumberEdit.Text := CurrentQSO.QSO.NrRcvd; + ModeEdit.Text := CurrentQSO.ModeStr; + BandEdit.Text := CurrentQSO.BandStr; + PowerEdit.Text := CurrentQSO.PowerStr; + NewPowerEdit.Text := CurrentQSO.NewPowerStr; + PointEdit.Text := CurrentQSO.PointStr; + OpEdit.Text := CurrentQSO.QSO.Operator; + {CallsignEdit.SetFocus;} + WriteStatusLine('',false); + Q.Free; + Log.Saved := True; +end; + +Procedure TMainForm.DeleteCurrentRow; +var R : integer; +begin + {ZLinkForm.DeleteQSO(TQSO(Log.List[Grid.Row])); + Log.Delete(Grid.Row); + MyContest.Renew;} + R := EditScreen.IndexArray[Grid.Row]; + if (R > 0) and (R <= Log.TotalQSO) then + begin + ZLinkForm.DeleteQSO(TQSO(Log.List[R])); + Log.Delete(R); + MyContest.Renew; + end; +end; + +{ +Procedure TMainForm.MultipleDelete(A, B : LongInt); +var i : LongInt; +begin + for i := 1 to (B-A+1) do + begin + if TQSO(Log.List[A]).QSO.Reserve = actLock then + begin + end + else + begin + ZLinkForm.DeleteQSO(TQSO(Log.List[A])); + Log.Delete(A); + end; + end; + MyContest.Renew; +end; + } + +Procedure TMainForm.MultipleDelete(A, B : LongInt); +var i, j : LongInt; +begin + for i := B downto A do + begin + j := EditScreen.IndexArray[i]; + if TQSO(Log.List[j]).QSO.Reserve = actLock then + begin + end + else + begin + if (j > 0) and (j <= Log.TotalQSO) then + begin + ZLinkForm.DeleteQSO(TQSO(Log.List[j])); + Log.Delete(j); + end; + end; + end; + MyContest.Renew; +end; + +procedure TMainForm.DeleteQSO1Click(Sender: TObject); +var _top, _bottom, _oldtop : LongInt; + R : word; +begin + with MainForm.Grid do + begin + _oldtop := TopRow; + _top := Selection.Top; + _bottom := Selection.Bottom; + end; + if _top = _bottom then + begin + if TQSO(Log.List[EditScreen.IndexArray[_top]]).QSO.Reserve = actLock then + begin + WriteStatusLine('This QSO is currently locked',true); + exit; + end; + R := MessageDlg('Are you sure to delete this QSO?', mtConfirmation, + [mbYes, mbNo], 0); {HELP context 0} + if R = mrNo then exit; + DeleteCurrentRow + end + else + begin + if (_top < Log.TotalQSO) and (_bottom <= Log.TotalQSO) then + begin + R := MessageDlg('Are you sure to delete these QSO''s?', mtConfirmation, + [mbYes, mbNo], 0); {HELP context 0} + if R = mrNo then exit; + //if ShowCurrentBandOnly.Checked = False then + MultipleDelete(_top, _bottom); + {else + begin + end; } + end; + end; + //Grid.TopRow := _oldtop; + //EditScreen.RefreshScreen; +end; + +procedure TMainForm.GridKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +var i, cb : integer; + S : string; +begin + case Key of + VK_DELETE : begin + DeleteQSO1Click(Self); + Grid.SetFocus; + end; + VK_INSERT : begin + InsertQSO1Click(Self); + Grid.SetFocus; + end; + VK_RETURN : if EditScreen.DirectEdit = False then + MyContest.EditCurrentRow; + VK_ESCAPE : begin + if EditScreen.DirectEdit then + begin + if Grid.EditorMode then + begin + Grid.Cells[Grid.Col, Grid.Row] := EditScreen.BeforeEdit; + Grid.EditorMode := False; + end + else + begin + Grid.LeftCol := 0; + EditScreen.ResetTopRow; + LastFocus.SetFocus; + end; + end + else + begin + Grid.LeftCol := 0; + EditScreen.ResetTopRow; + LastFocus.SetFocus; + end; + end; + + VK_F1..VK_F8, VK_F11, VK_F12 : + begin + i := Key - VK_F1 + 1; + + + cb := Options.Settings.CW.CurrentBank; + + {if ssShift in Shift then // doesn't work. why? + begin + if cb = 1 then + cb := 2 + else + cb := 1; + end; + } + if GetAsyncKeyState(VK_SHIFT) < 0 then + begin + if cb = 1 then + cb := 2 + else + cb := 1; + end; + + case CurrentQSO.QSO.Mode of + mCW: + begin + S := Options.CWMessage(cb,i); + S := SetStr(S, CurrentQSO); + zLogSendStr(S); + end; + mSSB, mFM, mAM :SendVoice(i); + mRTTY : + begin + S := Options.CWMessage(3,i); + S := SetStrNoAbbrev(S, CurrentQSO); + if TTYConsole <> nil then + TTYConsole.SendStrNow(S); + end; + end; + end; + end; +end; + +procedure TMainForm.EditQSOClick(Sender: TObject); +var x : LongInt; +begin + MyContest.EditCurrentRow; +end; + +procedure TMainForm.OnTabPress; +var S : shortstring; + j : integer; + Q : TQSO; +begin + {not dupe} + if Main.CurrentQSO.QSO.Mode in [mSSB, mFM, mAM] then + begin + Q := Log.QuickDupe(CurrentQSO); + if Q <> nil then + begin + MainForm.WriteStatusLineRed(Q.PartialSummary(Options.Settings._displaydatepartialcheck), True); + CallsignEdit.SelectAll; + CallsignEdit.SetFocus; + SendVoice(4); + exit; + end; + MyContest.SpaceBarProc; + NumberEdit.SetFocus; + SendVoice(2); + exit; + end; + + if Main.CurrentQSO.QSO.Mode = mRTTY then + begin + MenuForm.TabPressed := True; + if TTYConsole <> nil then + TTYConsole.SendStrNow(SetStrNoAbbrev(Options.CWMessage(3, 2), CurrentQSO)); + MyContest.SpaceBarProc; + NumberEdit.SetFocus; + exit; + end; + + if NumberEdit.Text = '' then + begin + CurrentQSO.UpdateTime; + TimeEdit.Text := CurrentQSO.TimeStr; + DateEdit.Text := CurrentQSO.DateStr; + end; + //MyContest.SpaceBarProc; + + MenuForm.TabPressed := True; + MenuForm.TabPressed2 := True; + + if Options.Settings._switchcqsp then + begin + S := SetStr(Options.CWMessage(Options.Settings.CW.CurrentBank, 2), CurrentQSO); + { + if Options.Settings.CW.CurrentBank = 2 then + NumberEdit.SetFocus; } + end + else + S := SetStr(Options.CWMessage(1, 2), CurrentQSO); + + BGK32LIB.ClrBuffer; + BGK32LIB.PauseCW; + if Options.PTTEnabled then + S := S + ')'; // PTT is turned on in ResumeCW + BGK32LIB.SetCWSendBuf(0, S); + BGK32LIB.SetCallSign(ShortString(CurrentQSO.QSO.Callsign)); + BGK32LIB.ResumeCW; + + if Options.Settings._switchcqsp then + CallsignSentProc; +end; + +procedure TMainForm.DownKeyPress; +var S : shortstring; +begin + if CallsignEdit.Text = '' then + exit; + case CurrentQSO.QSO.mode of + mCW : + begin + if Not(MyContest.MultiForm.ValidMulti(CurrentQSO)) then + begin + if Options.Settings._switchcqsp then + S := Options.CWMessage(Options.Settings.CW.CurrentBank, 5) + else + S := Options.CWMessage(1, 5); + S := SetStr(S, CurrentQSO); + if Options.FIFO then + SendStrFIFO(S) + else + SendStr(S); + WriteStatusLine('Invalid Number', false); + NumberEdit.SetFocus; + NumberEdit.SelectAll; + exit; + end; + if Options.Settings._switchcqsp then + S := Options.CWMessage(Options.Settings.CW.CurrentBank, 3) + else + S := Options.CWMessage(1, 3); + S := SetStr(S, CurrentQSO); + if Options.FIFO then + SendStrFIFO(S) + else + SendStr(S); + BGK32LIB.SetCallSign(ShortString(CallsignEdit.Text)); + LogButtonClick(Self); + end; + + mRTTY : + begin + if Not(MyContest.MultiForm.ValidMulti(CurrentQSO)) then + begin + S := Options.CWMessage(3, 5); + S := SetStrNoAbbrev(S, CurrentQSO); + if TTYConsole <> nil then + TTYConsole.SendStrNow(S); + WriteStatusLine('Invalid Number', false); + NumberEdit.SetFocus; + NumberEdit.SelectAll; + exit; + end; + S := Options.CWMessage(3, 3); + S := SetStrNoAbbrev(S, CurrentQSO); + if TTYConsole <> nil then + TTYConsole.SendStrNow(S); + LogButtonClick(Self); + end; + + + mSSB, mFM, mAM : + begin + if Not(MyContest.MultiForm.ValidMulti(CurrentQSO)) then + begin + SendVoice(5); + WriteStatusLine('Invalid Number', false); + NumberEdit.SetFocus; + NumberEdit.SelectAll; + exit; + end; + SendVoice(3); + LogButtonClick(Self); + end; + end; +end; + +procedure TMainForm.EditKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +var XY : TGridRect; + i, cb : integer; + S : string[255]; +begin +// WRITESTATUSLINE(INTTOSTR(KEY)); + + case Key of + 29 : {MUHENKAN KEY} + begin + ControlPTT(not(PTTIsOn)); // toggle PTT; + end; + + VK_F9 : + begin + MyContest.MultiForm.CheckMulti(CurrentQSO) + end; + VK_DOWN : + begin + DownKeyPress; + Key := 0; + end; + VK_INSERT : + begin + { + if TEdit(Sender).Name = 'CallsignEdit' then + begin + OnTabPress; + Key := 0; + end; + } + end; + VK_F1..VK_F8, VK_F11, VK_F12 : + begin + i := Key - VK_F1 + 1; + + cb := Options.Settings.CW.CurrentBank; + // if ssShift in Shift then // doesn't work. why? + if GetAsyncKeyState(VK_SHIFT) < 0 then + begin + if cb = 1 then + cb := 2 + else + cb := 1; + end; + + case CurrentQSO.QSO.Mode of + mCW: + begin + S := Options.CWMessage(cb,i); + S := SetStr(S, CurrentQSO); + zLogSendStr(S); + end; + mSSB, mFM, mAM :SendVoice(i); + mRTTY : + begin + S := Options.CWMessage(3,i); + S := SetStrNoAbbrev(S, CurrentQSO); + if TTYConsole <> nil then + TTYConsole.SendStrNow(S); + end; + end; + end; + VK_F10 : + begin + //MessageBeep(0); + PartialCheck.Show; + //Label1.Caption := TEdit(Sender).Name; + if TEdit(Sender).Name = 'NumberEdit' then + begin + PartialCheck.CheckPartialNumber(CurrentQSO); + end + else + PartialCheck.CheckPartial(CurrentQSO); + //TEdit(Sender).SetFocus; + Key := 0; + end; + VK_UP : + begin + Grid.Row := Grid.RowCount - 1; + if EditScreen.DirectEdit then + Grid.Col := TEdit(Sender).Tag; + LastFocus := TEdit(Sender); + Grid.SetFocus; + Key := 0; + + {Grid.SetFocus; + XY.Left := 0; + XY.Top := Log.TotalQSO; + XY.Right := Grid.ColCount; + XY.Bottom := XY.Top; + Grid.Selection := XY; + LastFocus := TEdit(Sender);} + end; + Ord('A')..Ord('Z'), Ord('0')..Ord('9') : + begin + if Shift <> [] then + exit; + if (CtrlZCQLoop = True) and (TEdit(Sender).Name = 'CallsignEdit') then + CtrlZBreak; + if (CtrlZCQLoopVoice = True) and (TEdit(Sender).Name = 'CallsignEdit') then + CtrlZBreakVoice; + if (Options.Settings._jmode) and (TEdit(Sender).Name = 'CallsignEdit') then + begin + if CallsignEdit.Text = '' then + if Key <> ord('7') then + begin + CallsignEdit.Text := 'J'; + CallsignEdit.SelStart := 1; + end; + end; + end; + end; +end; + +procedure TMainForm.GridDblClick(Sender: TObject); +begin + MyContest.EditCurrentRow; +end; + +procedure TMainForm.PartialClick(Sender: TObject); +begin + PartialCheck.Show; + if ActiveControl = NumberEdit then + PartialCheck.CheckPartialNumber(CurrentQSO) + else + PartialCheck.CheckPartial(CurrentQSO); +end; + +procedure TMainForm.CallsignEditKeyUp(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin +{ if PartialCheck.Visible and PartialCheck._CheckCall then + PartialCheck.CheckPartial(CurrentQSO); + if SuperCheck.Visible then + SuperCheck.CheckSuper(CurrentQSO); + if CheckCall2.Visible then + CheckCall2.Renew(CurrentQSO); } +end; + +procedure TMainForm.ScoreClick(Sender: TObject); +begin + MyContest.ShowScore; +end; + +procedure TMainForm.MultiClick(Sender: TObject); +begin + MyContest.ShowMulti; +end; + +procedure TMainForm.RateClick(Sender: TObject); +begin + RateDialog.Show; +end; + +procedure TMainForm.LogButtonClick(Sender: TObject); +//var aQSO : TQSO; +var _dupe, i, j : integer; + workedZLO : boolean; + st, st2 : string; + B : TBand; +label med; +begin + + EditedSinceTABPressed := tabstate_normal; + + _dupe := Log.IsDupe(CurrentQSO); + if (_dupe = 0) or (CurrentQSO.QSO.Reserve2 = $FF) then // $FF when forcing to log + begin + if (MyContest.MultiForm.ValidMulti(CurrentQSO)=False) and + (CurrentQSO.QSO.Reserve2 <> $FF) then + begin + WriteStatusLine('Invalid Number', false); + NumberEdit.SetFocus; + NumberEdit.SelectAll; + exit; + end; + if CurrentQSO.QSO.Callsign = '' then + begin + WriteStatusLine('Callsign not entered', false); + CallSignEdit.SetFocus; + exit; + end; + if CurrentQSO.QSO.Reserve2 = $FF then + begin + CurrentQSO.QSO.Reserve2 := $00; {set it back} + CurrentQSO.QSO.memo := '* '+ CurrentQSO.QSO.memo; + end; + +med: + MyContest.SetNrSent(CurrentQSO); + + repeat + i := NewQSOID; + until Log.CheckQSOID(i) = False; + + CurrentQSO.QSO.Reserve3 := i; + +{ if Options.Settings._recrigfreq = True then + if RigControl.Rig <> nil then + CurrentQSO.QSO.Memo := CurrentQSO.QSO.Memo + '('+RigControl.Rig.CurrentFreqkHzStr+')'; +} + if RigControl.Rig <> nil then + begin + if Options.Settings._recrigfreq = True then + CurrentQSO.QSO.Memo := CurrentQSO.QSO.Memo + '('+RigControl.Rig.CurrentFreqkHzStr+')'; + + if Options.Settings._autobandmap then + begin + j := RigControl.Rig.CurrentFreqHz; + if j > 0 then + BandScope2.CreateBSData(CurrentQSO, j); + end; + end; + //if MyContest.Name = 'Pedition mode' then + if not PostContest then + CurrentQSO.UpdateTime; + + MyContest.LogQSO(CurrentQSO, True); + + WorkedZLO := False; + if CurrentQSO.QSO.Callsign = 'JA1ZLO' then + begin + if MyContest.Name = 'ALL JA ReXg' then + if CurrentQSO.QSO.Points > 0 then + begin + inc(ZLOCOUNT); + WorkedZLO := True; + end; + end; + + if CurrentFileName <> '' then + begin + if Log.TotalQSO mod Options.Settings._saveevery = 0 then + begin + if Options.Settings._savewhennocw then + UMenu.SaveInBackGround := True + else + SaveFileAndBackUp; + end; + end; + ZLinkForm.SendQSO(CurrentQSO); {ZLinkForm checks if Z-Link is ON} + + st := MyContest.MultiForm.ExtractMulti(CurrentQSO); + if st <> '' then + begin + for i := 0 to MyContest.WantedList.Count - 1 do + begin + if st = TWanted(MyContest.WantedList[i]).Multi then + begin + st2 := ''; + for B := b19 to HiBand do + if B in TWanted(MyContest.WantedList[i]).Bands then + st2 := st2 + ' ' + BandString[B]; + MessageDlg(st+' is wanted by' +st2, mtInformation, [mbOK], 0); + end; + end; + end; + + if (Options.Settings._ritclear = True) and (RigControl.Rig <> nil) then + RigControl.Rig.RitClear; + + Inc(CurrentQSO.QSO.Serial); + SerialArrayTX[Options.GetTXNr] := CurrentQSO.QSO.Serial; + + if Not(PostContest) then + CurrentQSO.UpdateTime; + CurrentQSO.QSO.CallSign := ''; + CurrentQSO.QSO.NrRcvd := ''; + CurrentQSO.QSO.Memo := ''; + + CurrentQSO.QSO.NewMulti1 := False; + CurrentQSO.QSO.NewMulti2 := False; + + CurrentQSO.QSO.Dupe := False; + //CurrentQSO.QSO.CQ := False; + + CurrentQSO.QSO.Reserve2 := 0; + CurrentQSO.QSO.Reserve3 := 0; + CurrentQSO.QSO.TX := Options.GetTXNr; + + if CurrentQSO.QSO.mode in [mCW, mRTTY] then + CurrentQSO.QSO.RSTrcvd := 599 + else + CurrentQSO.QSO.RSTrcvd := 59; + + SerialEdit.Text := CurrentQSO.SerialStr; + TimeEdit.Text := CurrentQSO.TimeStr; + DateEdit.Text := CurrentQSO.DateStr; + CallsignEdit.Text := CurrentQSO.QSO.callsign; + RcvdRSTEdit.Text := CurrentQSO.RSTStr; + NumberEdit.Text := CurrentQSO.QSO.NrRcvd; + ModeEdit.Text := CurrentQSO.ModeStr; + BandEdit.Text := CurrentQSO.BandStr; + PowerEdit.Text := CurrentQSO.PowerStr; + NewPowerEdit.Text := CurrentQSO.NewPowerStr; + PointEdit.Text := CurrentQSO.PointStr; + OpEdit.Text := CurrentQSO.QSO.Operator; + MemoEdit.Text := ''; + if PostContest then + TimeEdit.SetFocus + else + CallsignEdit.SetFocus; + WriteStatusLine('', false); + if WorkedZLO then + begin + MainForm.WriteStatusLine('QSO肪Ƃ܂', False); + end; + end + else + begin + if AllowDupe then + begin + CurrentQSO.QSO.Dupe := True; + CurrentQSO.QSO.Points := 0; + CurrentQSO.QSO.NewMulti1 := False; + CurrentQSO.QSO.NewMulti2 := False; + CurrentQSO.QSO.Multi1 := ''; + CurrentQSO.QSO.Multi2 := ''; + CurrentQSO.QSO.Memo := '-DUPE- '+CurrentQSO.QSO.Memo; + goto med; + end + else + begin + CallsignEdit.SetFocus; + CallsignEdit.SelectAll; + WriteStatusLine('Dupe', false); + end; + end; +end; + +procedure TMainForm.OptionsButtonClick(Sender: TObject); +begin + Options.Show; +end; + +procedure TMainForm.SuperCheckButtonClick(Sender: TObject); +begin + SuperCheck.Show; + SuperCheck.CheckSuper(CurrentQSO); +end; + + +procedure TMainForm.FormShow(Sender: TObject); +var s : string; + i : integer; + B : TBand; +begin + if FirstTime then + begin + FirstTime := False; + s := ''; + for i := 0 to ParamCount do + s := s +' '+ ParamStr(i); + Options.ImplementSettings(False); + if PostContest then + MessageDlg('To change the date, double click the time field.', mtInformation, + [mbOK], 0); {HELP context 0} + if pos('WAEDC', MyContest.Name) > 0 then + MessageDlg('QTC can be sent by pressing Ctrl+Q', mtInformation, [mbOK], 0); + + + EditPanel.Font.Size := Options.Settings._mainfontsize; + EditDialog.Font.Size := Options.Settings._mainfontsize; + Grid.Font.Size := Options.Settings._mainfontsize; + SetDispHeight(Options.Settings._mainrowheight); + RestoreWindowStates; + end; + CallsignEdit.SetFocus; + if PostContest then + TimeEdit.SetFocus; + LastFocus := CallSignEdit; {the place to set focus when ESC is pressed from Grid} + if CurrentQSO.QSO.mode in [mCW, mRTTY] then + begin + Grid.Align := alNone; + CWToolBar.Visible := True; + SSBToolBar.Visible := False; + Grid.Align := alClient; + end + else + begin + Grid.Align := alNone; + SSBToolBar.Visible := True; + CWToolBar.Visible := False; + Grid.Align := alClient; + end; + ModeEdit.Text := CurrentQSO.ModeStr; + rcvdRSTEdit.Text := CurrentQSO.RSTStr; + + //CurrentQSO.QSO.Serial := SerialArray[b19]; // in case SERIALSTART is defined. SERIALSTART applies to all bands. + SerialEdit.Text := CurrentQSO.SerialStr; + + CurrentQSO.UpdateTime; + TimeEdit.Text := CurrentQSO.TimeStr; + + for B := b19 to HiBand do + begin + if BandMenu.Items[ord(B)].Visible and BandMenu.Items[ord(B)].Enabled then + break; + end; + if Log.TotalQSO = 0 then + CurrentQSO.QSO.Band := B; + BandEdit.Text := MHzString[CurrentQSO.QSO.Band]; + CurrentQSO.QSO.TX := Options.GetTXNr; + + UpdateBand(CurrentQSO.QSO.Band); + UpdateMode(CurrentQSO.QSO.Mode); + //BandScope.SetBandMode(CurrentQSO.QSO.Band, CurrentQSO.QSO.Mode); + BandScope2.SetBandMode(CurrentQSO.QSO.Band, CurrentQSO.QSO.Mode); + + EditScreen.ResetTopRow; // added 2.2e + EditScreen.RefreshScreen; // added 2,2e +end; + + +procedure TMainForm.CWFButtonClick(Sender: TObject); +var i : integer; + S, S0 : string[255]; +begin + i := THemisphereButton(Sender).Tag; + if i in [1..9] then + begin + if i = 9 then + begin + i := 1; {CQ button} + SetCQ(True); + end; + S := Options.CWMessage(Options.Settings.CW.CurrentBank,i); + S := SetStr(S, CurrentQSO); + zLogSendStr(S); + end; +end; + +procedure TMainForm.FormDestroy(Sender: TObject); +begin + MyContest.Free; + CloseBGK; +end; + +procedure TMainForm.SpeedBarChange(Sender: TObject); +begin + Options.SetSpeed(SpeedBar.Position); + SpeedLabel.Caption := IntToStr(SpeedBar.Position)+' wpm'; + if LastFocus <> nil then + LastFocus.SetFocus; +end; + +procedure TMainForm.SideToneButtonClick(Sender: TObject); +begin + if SideToneButton.Down then + Options.SetSideTone(True) + else + Options.SetSideTone(False); +end; + +procedure TMainForm.Button1Click(Sender: TObject); +var S : string; +begin + IOTAMulti.Show; +end; + +procedure TMainForm.CWStopButtonClick(Sender: TObject); +begin + BGK32LIB.ClrBuffer; + CWPlayButton.Visible := False; + CWPauseButton.Visible := True; +end; + +procedure TMainForm.VoiceStopButtonClick(Sender: TObject); +var i : integer; +begin + UzLogVoice.StopVoice; +end; + +procedure TMainForm.SetCQ(CQ : boolean); +begin + CurrentQSO.QSO.CQ := CQ; + + {if CQ then + StatusLine.Panels[1].Text := 'CQ' + else + StatusLine.Panels[1].Text := 'SP'; } + + ZLinkForm.SendRigStatus; + if RigControl.Rig = nil then + ZLinkForm.SendFreqInfo(Round(RigControl.TempFreq[CurrentQSO.QSO.Band]*1000)); + if Options.Settings._switchcqsp then + begin + if CQ then + SwitchCWBank(1) + else + SwitchCWBank(2); + end; +end; + +procedure TMainForm.CQRepeatClick1(Sender: TObject); +var S : ShortString; +begin + S := Options.CWMessage(1,1); + S := SetStr(Uppercase(S), CurrentQSO); + SendStrLoop(S); + SetCQ(True); +end; + +procedure TMainForm.CQRepeatClick2(Sender: TObject); +var S : ShortString; +begin + CtrlZCQLoop := True; + S := Options.CWMessage(1,1); + S := SetStr(Uppercase(S), CurrentQSO); + SendStrLoop(S); + BGK32LIB.SetRandCQStr(SetStr(Options.Settings.CW.CQStrBank[1], CurrentQSO), + SetStr(Options.Settings.CW.CQStrBank[2], CurrentQSO)); + SetCQ(True); +end; + +procedure TMainForm.SpeedButton12Click(Sender: TObject); +begin + {Options.Show; + Options.PageControl.ActivePage := Options.CWTabSheet;} + CWKeyBoard.Show; +end; + +procedure TMainForm.SpeedButton15Click(Sender: TObject); +begin + Options.Show; + Options.PageControl.ActivePage := Options.VoiceTabSheet; +end; + +procedure TMainForm.OpMenuClick(Sender: TObject); +var O : string; +begin + O := TMenuItem(Sender).Caption; + if O = 'Clear' then O := ''; + OpEdit.Text := O; + CurrentQSO.QSO.Operator := O; + LastFocus.SetFocus; + Options.SetOpPower(CurrentQSO); + NewPowerEdit.Text := CurrentQSO.NewPowerStr; + ZLinkForm.SendOperator; +end; + +procedure TMainForm.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + {if ActiveControl is TEdit then + if (TEdit(ActiveControl) = CallsignEdit) or + (TEdit(ActiveControl) = NumberEdit) then + if Key = VK_DOWN then + begin + Key := 0; + DownKeyPress; + end; } +end; + +procedure TMainForm.CWPauseButtonClick(Sender: TObject); +begin + if BGK32LIB.IsPlaying = False then + exit; + BGK32LIB.PauseCW; + CWPauseButton.Visible := False; + CWPlayButton.Visible := True; +end; + +procedure TMainForm.CWPlayButtonClick(Sender: TObject); +begin + BGK32LIB.ResumeCW; + CWPlayButton.Visible := False; + CWPauseButton.Visible := True; +end; + +procedure TMainForm.RcvdRSTEditChange(Sender: TObject); +var i : word; +begin + try + I := StrToInt(RcvdRSTEdit.Text); + except + on EConvertError do + begin + if CurrentQSO.QSO.mode in [mCW, mRTTY] then + I := 599 + else + I := 59; + end; + end; + CurrentQSO.QSO.RSTRcvd := I; +end; + +procedure TMainForm.FormKeyUp(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + Options.SetTonePitch(Options.Settings.CW._tonepitch); +end; + +procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction); +begin + FileExit(Sender); + Action := caNone; +end; + + +procedure TMainForm.Update10MinTimer; +var Diff : TDateTime; + min, sec : Integer; + s : string; +begin + s := TimeToStr(CurrentTime); + if length(s) = 7 then + s := '0'+s; + s := s + ' '; + if Options.Settings._countdown then + begin + if CountDownStartTime > 0 then + begin + Diff := CurrentTime - CountDownStartTime; + if Diff*24*60 > 10.00 then + begin + CountDownStartTime := 0; + //StatusLine.Panels[1].Text := ''; + s := s + '[QSY OK]'; + end + else + begin + if Diff > 0 then + begin + min := Trunc(10 - Diff*24*60); + sec := Trunc(Integer(Round(600 - Diff*24*60*60)) mod 60); + sec := Trunc(Integer(Round(600 - Diff*24*60*60)) mod 60); + if min = 10 then + s := s + IntToStr(min) + else + s := s + '0'+IntToStr(min); + if sec >= 10 then + s := s + ':'+IntToStr(sec) + else + s := s + ':0'+IntToStr(sec); + end; + end; + end + else //Countdownstarttime = 0; + begin + s := s + '[QSY OK]'; + end; + end + else + begin + //s := ''; + end; + + if Options.Settings._qsycount then + begin + s := s + 'QSY# ' + IntToStr(QSYCount); + end; + + MainForm.StatusLine.Panels[2].Text := s; +end; + +procedure TMainForm.CallSignSentProc; +var Q : TQSO; + S : shortstring; +begin + if MainForm.CallsignEdit.Focused then + begin + Q := Log.QuickDupe(CurrentQSO); + if MenuForm.TabPressed2 and (Q <> nil) then + begin + BGK32LIB.ClrBuffer; + MainForm.WriteStatusLineRed(Q.PartialSummary(Options.Settings._displaydatepartialcheck), True); + + if Options.Settings._switchcqsp then + if Options.Settings.CW.CurrentBank = 2 then + begin + CallsignEdit.SelectAll; + MenuForm.TabPressed := False; + MenuForm.TabPressed2 := False; + exit; + end; + + S := ' '+SetStr(Options.CWMessage(1, 4), CurrentQSO); + BGK32LIB.SendStr(S); + BGK32LIB.SetCallSign(ShortString(CurrentQSO.QSO.Callsign)); + + CallsignEdit.SelectAll; + MenuForm.TabPressed := False; + MenuForm.TabPressed2 := False; + + exit; {BECAREFUL!!!!!!!!!!!!!!!!!!!!!!!!} + end; + if MenuForm.TabPressed2 then + begin + MyContest.SpaceBarProc; + MainForm.NumberEdit.SetFocus; + EditedSinceTABPressed := tabstate_tabpressedbutnotedited; // UzLogCW + end; + end; + BGK32LIB.ResumeCW; + MenuForm.TabPressed := False; + MenuForm.TabPressed2 := False; +end; + +procedure TMainForm.Timer1Timer(Sender: TObject); +var S : shortstring; +begin +{$ifndef w95} + //Caption := IntToStr(VoiceFlag); + if USB_Detected then + AboutBox.Label4.Caption := 'USBIF4CW detected' + else + AboutBox.Label4.Caption := ''; +{$endif} + + Update10MinTimer; + + if not PostContest then + begin + CurrentQSO.UpdateTime; + S := CurrentQSO.TimeStr; + if S <> TimeEdit.Text then + TimeEdit.Text := S; + end; + //Caption := IntToStr(SelectedBuf); + {S := CurrentQSO.DateStr; + if S <> DateEdit.Text then + DateEdit.Text := S;} + { + if BGK32LIB.CallsignSent then + CallsignSentProc; } +end; + +procedure TMainForm.InsertQSO1Click(Sender: TObject); +var _top, _bottom, _oldtop : LongInt; + R : Integer; +begin + with MainForm.Grid do + begin + _oldtop := TopRow; + _top := Selection.Top; + _bottom := Selection.Bottom; + end; + if _top = _bottom then + begin + R := EditScreen.IndexArray[Grid.Row]; + if R <= Log.TotalQSO then + begin + MyContest.PastEditForm.Init(TQSO(Log.List[R]), R, _ActInsert); + MyContest.PastEditForm.ShowModal; + EditScreen.Renew; + end; + end + else + begin + end; + Grid.TopRow := _oldtop; + EditScreen.RefreshScreen; +end; + +procedure TMainForm.MemoEditKeyPress(Sender: TObject; var Key: Char); +var j : integer; +begin + CommonEditKeyProcess(Sender, Key); + case Key of + 'X','x' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + RigControl.ToggleCurrentRig; + Key := #0; + end; + end; + 'V','v' : + begin + if HiWord(GetKeyState(VK_SHIFT))<>0 then + begin + if RigControl.Rig <> nil then + RigControl.Rig.ToggleVFO; + Key := #0; + end; + end; + '+', ';' : + begin + DownKeyPress; + Key := #0; + end; + ^W : + begin + TEdit(Sender).Clear; + Key := #0; + end; + ^R : + begin + Options.ReversePaddle; + Key := #0; + end; + ^K : + begin + EditedSinceTABPressed := tabstate_normal; + CallsignEdit.Clear; + NumberEdit.Clear; + MemoEdit.Clear; + Key := #0; + CallsignEdit.SetFocus; + end; + ^Z : + begin + if CurrentQSO.QSO.mode = mCW then + CQRepeatClick2(Sender); + Key := #0; + end; + Chr($1B) : {ESC} + begin + CWStopButtonClick(Self); + VoiceStopButtonClick(Self); + Key := #0; + end; + Chr($0D) : + begin + LogButtonClick(Self); + Key := #0; + end; + end; + { of case } +end; + +procedure TMainForm.VoiceFButtonClick(Sender: TObject); +begin + SendVoice(THemisphereButton(Sender).Tag); +end; + +procedure TMainForm.TimeEditChange(Sender: TObject); +var T : TDateTime; + str : string; +begin + str := TimeEdit.Text; + if (length(str) = 4) and (pos(':',str) = 0) then + str := str[1]+str[2]+':'+str[3]+str[4]; + try + T := StrToTime(str); + except + on EConvertError do + begin + T := CurrentQSO.QSO.Time; + exit; + end; + end; + CurrentQSO.QSO.Time := Int(CurrentQSO.QSO.Time)+Frac(T); +end; + +procedure TMainForm.Export1Click(Sender: TObject); +var f, ext : string; +begin + TXTSaveDialog.FileName := copy(CurrentFileName, 1, length(CurrentFileName) - length(ExtractFileExt(CurrentFileName))); + + if TXTSaveDialog.Execute then + begin + f := TXTSaveDialog.FileName; + ext := UpperCase(ExtractFileExt(f)); + if ext = '.ALL' then + begin + Log.SaveToFilezLogALL(f); + {delete(f, length(f) - 3, 4); + f := f + '.sum'; + MyContest.WriteSummary(f);} + end; + if ext = '.TXT' then + begin + Log.SaveToFilezLogDOSTXT(f); + end; + if ext = '.TX' then + begin + Log.SaveToFileByTX(f); + end; + if ext = '.ADI' then + begin + MyContest.ADIF_Export(f); + end; + + { Add code to save current file under SaveDialog.FileName } + end; +end; + +procedure TMainForm.ClusterClick(Sender: TObject); +begin + CommForm.Show; +end; + +procedure TMainForm.SpeedButton9Click(Sender: TObject); +begin + ZLinkForm.Show; +end; + +procedure TMainForm.SerialEditChange(Sender: TObject); +var i : integer; +begin + try + i := StrToInt(SerialEdit.Text); + except + on EConvertError do + i := 0; + end; + if i > 0 then + CurrentQSO.QSO.Serial := i; +end; + +procedure TMainForm.GridBandChangeClick(Sender: TObject); +var i, j, _top, _bottom: integer; + R : word; + B : TBand; + aQSO : TQSO; +begin + B := TBand(TMenuItem(Sender).Tag); + //aQSO := TQSO.Create; + with MainForm.Grid do + begin + _top := Selection.Top; + _bottom := Selection.Bottom; + end; + if _top = _bottom then + begin + R := EditScreen.IndexArray[_top]; + if (R > 0) and (R <= Log.TotalQSO) then + begin + aQSO := TQSO(Log.List[R]); + IncEditCounter(aQSO); + aQSO.QSO.Band := B; + ZLinkForm.EditQSObyID(aQSO); //added 0.24 + end; + end + else + begin + if {(ShowCurrentBandOnly.Checked = False) and }(_top < Log.TotalQSO) and (_bottom <= Log.TotalQSO) then + begin + R := MessageDlg('Are you sure to change the band for these QSO''s?', mtConfirmation, + [mbYes, mbNo], 0); {HELP context 0} + if R = mrNo then exit; + for i := _top to _bottom do + begin + j := EditScreen.IndexArray[i]; //1.4b + if (j > 0) and (j <= Log.TotalQSO) then + begin + aQSO := TQSO(Log.List[j]); + aQSO.QSO.Band := B; + IncEditCounter(aQSO); + ZLinkForm.EditQSObyID(aQSO); // 0.24 + end; + end; + end; + end; + //aQSO.Free; + i := Grid.TopRow; + MyContest.Renew; + Grid.TopRow := i; + EditScreen.RefreshScreen; +end; + +procedure TMainForm.ZLinkmonitor1Click(Sender: TObject); +begin + ZLinkForm.Show; +end; + +procedure TMainForm.Load1Click(Sender: TObject); +begin + ZLinkForm.LoadLogFromZLink; + { + if ZLinkForm.Transparent then + ZLinkForm.LoadLogFromZLink // clears current log + else + ZLinkForm.LoadLogFromZServer; // does not clear } +end; + +procedure TMainForm.SortbyTime1Click(Sender: TObject); +begin + Log.SortByTime; + EditScreen.Renew; + EditScreen.RefreshScreen; +end; + +procedure TMainForm.About1Click(Sender: TObject); +begin + AboutBox.ShowModal; +end; + +procedure TMainForm.DateEditChange(Sender: TObject); +var T : TDateTime; +begin + try + T := StrToDate(DateEdit.Text); + except + on EConvertError do + begin + T := CurrentQSO.QSO.Time; + exit; + end; + end; + CurrentQSO.QSO.Time := Int(T) + Frac(CurrentQSO.QSO.Time); +end; + +procedure TMainForm.TimeEditDblClick(Sender: TObject); +begin + if TEdit(Sender).Name = 'TimeEdit' then + begin + TimeEdit.Visible := False; + DateEdit.Visible := True; +// TimeLabel.Caption := 'date'; + end + else + begin + TimeEdit.Visible := True; + DateEdit.Visible := False; +// TimeLabel.Caption := 'time'; + end; +end; + +procedure TMainForm.Button2Click(Sender: TObject); +var P : Pointer; + w : word; +begin + P := GetPointerToMemory($0040*16+$8, 2); + //w := P^; + //label1.Caption := IntToStr(w); + //FreeSelector(Device_Selector); +end; + + +procedure TMainForm.FormResize(Sender: TObject); +var i, j : integer; + R : double; +begin + R := (Grid.Height - 4 - Grid.DefaultRowHeight)/(1 + Grid.DefaultRowHeight); + if Frac(R) > 0.0001 then + begin + i := Trunc(R)*(1+Grid.DefaultRowHeight) + Grid.DefaultRowHeight + 4; + if Grid.Height > i + 1 then + MainForm.Height := MainForm.Height + 1 + else + begin + DisplayedQSOs := Trunc(R); + if Grid.RowCount <= DisplayedQSOs then + Grid.RowCount := DisplayedQSOs + 1; + end; + end + else + begin + DisplayedQSOs := Trunc(R); + if Grid.RowCount <= DisplayedQSOs then + Grid.RowCount := DisplayedQSOs + 1; + end; + i := ClientWidth - Grid.GridWidth; + if i <> 0 then + begin + Grid.ColWidths[Grid.ColCount - 1] := Grid.ColWidths[Grid.ColCount - 1] + i; + if EditScreen <> nil then + EditScreen.SetEditFields; + end; +end; + +procedure TMainForm.Options1Click(Sender: TObject); +begin + Options.Show; +end; + +procedure TMainForm.Edit1Click(Sender: TObject); +begin + Options.Show; + Options.PageControl.ActivePage := Options.CWTabSheet; + case TMenuItem(Sender).Tag of + 1 : Options.Edit1.SetFocus; + 2 : Options.Edit2.SetFocus; + 3 : Options.Edit3.SetFocus; + 4 : Options.Edit4.SetFocus; + 5 : Options.Edit5.SetFocus; + 6 : Options.Edit6.SetFocus; + 7 : Options.Edit7.SetFocus; + 8 : Options.Edit8.SetFocus; + end; +end; + +procedure TMainForm.CWF1MouseDown(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + CWFMenu.Items[0].Tag := THemisphereButton(Sender).Tag; +end; + +procedure TMainForm.HemisphereButton8MouseDown(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + CWFMenu.Items[0].Tag := 1; +end; + +procedure TMainForm.Edit2Click(Sender: TObject); +begin + Options.Show; + Options.PageControl.ActivePage := Options.VoiceTabSheet; + case TMenuItem(Sender).Tag of + 1 : Options.vButton1.SetFocus; + 2 : Options.vButton2.SetFocus; + 3 : Options.vButton3.SetFocus; + 4 : Options.vButton4.SetFocus; + 5 : Options.vButton5.SetFocus; + 6 : Options.vButton6.SetFocus; + 7 : Options.vButton7.SetFocus; + 8 : Options.vButton8.SetFocus; + end; +end; + +procedure TMainForm.VoiceF1MouseDown(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + VoiceMenu.Items[0].Tag := THemisphereButton(Sender).Tag; +end; + +procedure TMainForm.HemisphereButton1MouseDown(Sender: TObject; + Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + VoiceMenu.Items[0].Tag := 1; +end; + +procedure TMainForm.Backup1Click(Sender: TObject); +var p : string; +begin + p := Options.Settings._backuppath; + if p <> '' then + Log.SaveToFile(p + ExtractFileName(CurrentFileName)); +end; + +procedure TMainForm.CWKeyboard1Click(Sender: TObject); +begin + CWKeyBoard.Show; +end; + +procedure TMainForm.EditEnter(Sender: TObject); +var p : integer; +begin + LastFocus := TEdit(Sender); + if TEdit(Sender).Name = 'CallsignEdit' then + begin + p := pos('.',CallsignEdit.Text); + if p > 0 then + begin + CallsignEdit.SelStart := p - 1; + CallsignEdit.SelLength := 1; + end; + end; +end; + +procedure TMainForm.mnMergeClick(Sender: TObject); +begin + ZLinkForm.MergeLogWithZServer; +end; + +procedure TMainForm.ZServer1Click(Sender: TObject); +begin + ChatForm.Show; +end; + +procedure TMainForm.ConnecttoZServer1Click(Sender: TObject); +begin + {if ZLinkForm.ZServerConnected then + ZLinkForm.Sock1.Close + else + ZLinkForm.Sock1.Open; } + ZLinkForm.ZSocket.Addr := Options.Settings._zlinkhost; + ZLinkForm.ZSocket.Port := 'telnet'; + if ZLinkForm.ZServerConnected then + begin + ZLinkForm.DisconnectedByMenu := True; + ZLinkForm.ZSocket.Close; + end + else + ZLinkForm.ZSocket.Connect; +end; + +procedure TMainForm.DisableNetworkMenus; +begin + mnDownload.Enabled := False; + mnMerge.Enabled := False; +end; + +procedure TMainForm.EnableNetworkMenus; +begin + mnDownload.Enabled := True; + mnMerge.Enabled := True; +end; + +procedure TMainForm.GridModeChangeClick(Sender: TObject); +var i, j, _top, _bottom : integer; + R : word; + M : TMode; + aQSO : TQSO; +begin + M := TMode(TMenuItem(Sender).Tag); + //aQSO := TQSO.Create; + with MainForm.Grid do + begin + _top := Selection.Top; + _bottom := Selection.Bottom; + end; + if _top = _bottom then + begin + R := EditScreen.IndexArray[_top]; + if (R > 0) and (R <= Log.TotalQSO) then + begin + aQSO := TQSO(Log.List[R]); //added 0.24 + + if M in [mSSB, mAM, mFM] then + begin + if not (aQSO.QSO.Mode in [mSSB, mAM, mFM]) then + begin + aQSO.QSO.RSTSent := aQSO.QSO.RSTSent div 10; + aQSO.QSO.RSTRcvd := aQSO.QSO.RSTRcvd div 10; + end; + end + else + begin + if aQSO.QSO.Mode in [mSSB, mAM, mFM] then + begin + aQSO.QSO.RSTSent := aQSO.QSO.RSTSent * 10 + 9; + aQSO.QSO.RSTRcvd := aQSO.QSO.RSTRcvd * 10 + 9; + end; + end; + + aQSO.QSO.Mode := M; + IncEditCounter(aQSO); + ZLinkForm.EditQSObyID(aQSO); //added 0.24 + end; + end + else + begin + if {(ShowCurrentBandOnly.Checked = False) and }(_top < Log.TotalQSO) and (_bottom <= Log.TotalQSO) then + begin + R := MessageDlg('Are you sure to change the mode for these QSO''s?', mtConfirmation, + [mbYes, mbNo], 0); {HELP context 0} + if R = mrNo then exit; + for i := _top to _bottom do + begin + j := EditScreen.IndexArray[i]; + if (j > 0) and (j <= Log.TotalQSO) then + begin + aQSO := TQSO(Log.List[j]); //0.24 + + if M in [mSSB, mAM, mFM] then + begin + if not (aQSO.QSO.Mode in [mSSB, mAM, mFM]) then + begin + aQSO.QSO.RSTSent := aQSO.QSO.RSTSent div 10; + aQSO.QSO.RSTRcvd := aQSO.QSO.RSTRcvd div 10; + end; + end + else + begin + if aQSO.QSO.Mode in [mSSB, mAM, mFM] then + begin + aQSO.QSO.RSTSent := aQSO.QSO.RSTSent * 10 + 9; + aQSO.QSO.RSTRcvd := aQSO.QSO.RSTRcvd * 10 + 9; + end; + end; + + + aQSO.QSO.Mode := M; + IncEditCounter(aQSO); + ZLinkForm.EditQSObyID(aQSO); // 0.24 + end; + end; + end; + end; + //aQSO.Free; + i := Grid.TopRow; + MyContest.Renew; + Grid.TopRow := i; + EditScreen.RefreshScreen; +end; + + +procedure TMainForm.GridOperatorClick(Sender: TObject); +var i, j, _top, _bottom : integer; + R : word; + OpName : string; + aQSO : TQSO; +begin + OpName := TMenuItem(Sender).Caption; + if OpName = 'Clear' then + OpName := ''; + //aQSO := TQSO.Create; + with MainForm.Grid do + begin + _top := Selection.Top; + _bottom := Selection.Bottom; + end; + if _top = _bottom then + begin + R := EditScreen.IndexArray[_top]; + if (R > 0) and (R <= Log.TotalQSO) then + begin + aQSO := TQSO(Log.List[R]); //added 0.24 + aQSO.QSO.Operator := OpName; + IncEditCounter(aQSO); + ZLinkForm.EditQSObyID(aQSO); //added 0.24 + end; + end + else + begin + if (_top < Log.TotalQSO) and (_bottom <= Log.TotalQSO) then + begin + R := MessageDlg('Are you sure to change the operator names for these QSO''s?', mtConfirmation, + [mbYes, mbNo], 0); {HELP context 0} + if R = mrNo then exit; + + for i := _top to _bottom do + begin + j := EditScreen.IndexArray[i]; + if (j > 0) and (j <= Log.TotalQSO) then + begin + aQSO := TQSO(Log.List[j]); //0.24 + aQSO.QSO.Operator := OpName; + IncEditCounter(aQSO); + ZLinkForm.EditQSObyID(aQSO); // 0.24 + end; + end; + end; + end; + //aQSO.Free; + i := Grid.TopRow; + MyContest.Renew; + Grid.TopRow := i; + EditScreen.RefreshScreen; +end; + + +procedure TMainForm.SendSpot1Click(Sender: TObject); +var i, _top, _bottom : integer; + R : word; +begin + with MainForm.Grid do + begin + _top := Selection.Top; + _bottom := Selection.Bottom; + end; + if _top = _bottom then + begin + R := EditScreen.IndexArray[Grid.Row]; + if R <= Log.TotalQSO then + begin + SpotForm.Open(TQSO(Log.List[R])); + end; + end + else + begin + end; +end; + +procedure TMainForm.NumberEditKeyUp(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + if PartialCheck.Visible and not(PartialCheck._CheckCall) then + PartialCheck.CheckPartialNumber(CurrentQSO); + if CheckMulti.Visible then + CheckMulti.Renew(CurrentQSO); +end; + +procedure TMainForm.NewPowerMenuClick(Sender: TObject); +begin + NewPowerEdit.Text := NewPowerString[TPower(TMenuItem(Sender).Tag)]; + CurrentQSO.QSO.power := TPower(TMenuItem(Sender).Tag); + LastFocus.SetFocus; +end; + +procedure TMainForm.NewPowerEditClick(Sender: TObject); +begin + NewPowerMenu.Popup(MainForm.Left + NewPowerEdit.Left + 20, MainForm.Top + EditPanel.Top+ NewPowerEdit.Top); +end; + +procedure TMainForm.OpEditClick(Sender: TObject); +begin + OpMenu.Popup(MainForm.Left + OpEdit.Left + 20, MainForm.Top + EditPanel.Top+ OpEdit.Top); +end; + +procedure TMainForm.PowerEditKeyPress(Sender: TObject; var Key: Char); +begin + if Key in ['A'..'J','L'..'V','X'..'Z'] then + Key := #0; +end; + +procedure TMainForm.PowerEditChange(Sender: TObject); +var i : integer; +begin + i := 0; + if (PowerEdit.Text = 'KW') then + i := 9999; + if (PowerEdit.Text = '1KW') then + i := 10000; + if (PowerEdit.Text = 'K') then + i := 10001; + + if i > 0 then + begin + CurrentQSO.QSO.Power2 := i; + Options.CurrentPower2[CurrentQSO.QSO.Band] := i; + exit; + end; + + try + i := StrToInt(PowerEdit.Text); + except + i := 0; + end; + CurrentQSO.QSO.Power2 := i; + Options.CurrentPower2[CurrentQSO.QSO.Band] := i; +end; + +procedure TMainForm.CheckCall1Click(Sender: TObject); +begin + CheckCall2.Show; +end; + +procedure TMainForm.GridClick(Sender: TObject); +begin + if not(CheckCall2.Visible) then + exit; + // CheckCall.Renew(TQSO(Log.List[Grid.Row])); + CheckCall2.Renew(TQSO(Log.List[EditScreen.IndexArray[Grid.Row]])); +end; + +procedure TMainForm.FormActivate(Sender: TObject); +begin + LastFocus.SetFocus; +end; + +procedure TMainForm.CreateDupeCheckSheetZPRINT1Click(Sender: TObject); +var R : Integer; + S : string; +begin + if Log.Saved = False then + begin + R := MessageDlg('Save changes to '+CurrentFileName+' ?', mtConfirmation, + [mbYes, mbNo, mbCancel], 0); {HELP context 0} + case R of + mrYes : FileSave(Sender); + mrCancel : exit; + end; + end; + + R := ExecuteFile('zlistw', '/ro '+ExtractFileName(CurrentFileName), + ExtractFilePath(ParamStr(0)), SW_SHOW); + if R > 32 then + exit; { successful } + S := 'Unknown error'; + case R of + 0 : S := 'Out of memory or resources'; + ERROR_FILE_NOT_FOUND : S := 'ZLISTW.EXE not found'; + end; + WriteStatusLine(S, True); +end; + + +procedure TMainForm.MemoHotKeyEnter(Sender: TObject); +begin + MemoEdit.SetFocus; +end; + +procedure TMainForm.memo1Click(Sender: TObject); +begin + MemoEdit.SetFocus; +end; + +procedure TMainForm.rst1Click(Sender: TObject); +begin + rcvdRSTEdit.SetFocus; +end; + +procedure TMainForm.callsign1Click(Sender: TObject); +begin + CallsignEdit.SetFocus; +end; + +procedure TMainForm.ShowCurrentBandOnlyClick(Sender: TObject); +begin + ShowCurrentBandOnly.Checked := not(ShowCurrentBandOnly.Checked); + EditScreen.Renew; + EditScreen.RefreshScreen; +end; + +procedure TMainForm.pushqso1Click(Sender: TObject); +begin + PushQSO(CurrentQSO); +end; + +procedure TMainForm.pullqso1Click(Sender: TObject); +begin + PullQSO; +end; + +procedure TMainForm.GridTopLeftChanged(Sender: TObject); +begin + MainForm.EditScreen.{Cheat}RefreshScreen; + if Grid.LeftCol <> 0 then + Grid.LeftCol := 0; +end; + +procedure TMainForm.TXTSaveDialogTypeChange(Sender: TObject); +var i : integer; +begin + i := TXTSaveDialog.FilterIndex; + if i = 2 then + TXTSaveDialog.DefaultExt := 'txt' + else + TXTSaveDialog.DefaultExt := 'all'; +end; + +procedure TMainForm.GridMouseUp(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +begin + if EditScreen <> nil then + EditScreen.SetEditFields; +end; + +procedure TMainForm.memo21Click(Sender: TObject); +begin + NumberEdit.SetFocus; +end; + +procedure TMainForm.StatusLineResize(Sender: TObject); +begin + StatusLine.Panels[2].Width := 100; + if RigControl.Rig <> nil then + StatusLine.Panels[1].Width := 47 + else + StatusLine.Panels[1].Width := 0; + StatusLine.Panels[0].Width := StatusLine.Width - 100 - StatusLine.Panels[1].Width; +end; + +procedure TMainForm.PrintLogSummaryzLog1Click(Sender: TObject); +begin + //PrinterDialog.Execute; +end; + + +procedure TMainForm.CQRepeatVoice2Click(Sender: TObject); +begin + CtrlZCQLoopVoice := True; + CQLoopVoice; + SetCQ(True); +end; + +procedure TMainForm.CQRepeatVoice1Click(Sender: TObject); +begin + CQLoopVoice; + SetCQ(True); +end; + + +procedure TMainForm.mPXListWPXClick(Sender: TObject); +var str : string; +begin + GeneralSaveDialog.DefaultExt := 'px'; + GeneralSaveDialog.Filter := 'Prefix list files (*.px)|*.px'; + GeneralSaveDialog.Title := 'Save prefix list'; + if CurrentFileName <> '' then + begin + str := CurrentFileName; + str := Copy(str, 0, length(str) - length(ExtractFileExt(str))); + str := str + '.px'; + GeneralSaveDialog.FileName := str; + end; + if GeneralSaveDialog.Execute then + WPXMulti.SavePXList(GeneralSaveDialog.FileName); +end; + +procedure TMainForm.mSummaryFileClick(Sender: TObject); +var str : string; +begin + GeneralSaveDialog.DefaultExt := 'zsm'; + GeneralSaveDialog.Filter := 'Summary files (*.zsm)|*.zsm'; + GeneralSaveDialog.Title := 'Save summary file'; + if CurrentFileName <> '' then + begin + str := CurrentFileName; + str := Copy(str, 0, length(str) - length(ExtractFileExt(str))); + str := str + '.zsm'; + GeneralSaveDialog.FileName := str; + end; + if GeneralSaveDialog.Execute then + MyContest.ScoreForm.SaveSummary(GeneralSaveDialog.FileName); +end; + +procedure TMainForm.op1Click(Sender: TObject); +begin + OpEditClick(Self); +end; + +procedure TMainForm.GridPowerChangeClick(Sender: TObject); +var i, j, _top, _bottom : integer; + R : word; + P : TPower; + aQSO : TQSO; +begin + P := TPower(TMenuItem(Sender).Tag); +// aQSO := TQSO.Create; + with MainForm.Grid do + begin + _top := Selection.Top; + _bottom := Selection.Bottom; + end; + if _top = _bottom then + begin + R := EditScreen.IndexArray[_top]; + if (R > 0) and (R <= Log.TotalQSO) then + begin + aQSO := TQSO(Log.List[R]); //added 0.24 + aQSO.QSO.Power := P; + IncEditCounter(aQSO); + ZLinkForm.EditQSObyID(aQSO); //added 0.24 + end; + end + else + begin + if (_top < Log.TotalQSO) and (_bottom <= Log.TotalQSO) then + begin + R := MessageDlg('Are you sure to change the power for these QSO''s?', mtConfirmation, + [mbYes, mbNo], 0); {HELP context 0} + if R = mrNo then exit; + for i := _top to _bottom do + begin + j := EditScreen.IndexArray[i]; + if (j > 0) and (j <= Log.TotalQSO) then + begin + aQSO := TQSO(Log.List[j]); + aQSO.QSO.Power := P; + IncEditCounter(aQSO); + ZLinkForm.EditQSObyID(aQSO); + end; + end; + end; + end; +// aQSO.Free; + i := Grid.TopRow; + MyContest.Renew; + Grid.TopRow := i; + EditScreen.RefreshScreen; +end; + + +procedure TMainForm.RigControl1Click(Sender: TObject); +begin + RigControl.Show; +end; + +procedure TMainForm.Console1Click(Sender: TObject); +begin + ConsolePad.Show; +end; + +procedure TMainForm.MergeFile1Click(Sender: TObject); +var ff : string; + i : integer; +begin + OpenDialog.Title := 'Merge file'; + if OpenDialog.Execute then + begin + MainForm.WriteStatusLine('Merging...', false); + ff := OpenDialog.FileName; + if ff = CurrentFileName then + begin + MainForm.WriteStatusLine('Cannot merge current file', True); + exit; + end; + i := MergeFile(ff); + if i > 0 then + begin + Log.SortByTime; + MyContest.Renew; + //EditScreen.Renew; + EditScreen.RefreshScreen; + FileSave(Self); + end; + MainForm.WriteStatusLine(IntToStr(i)+' QSO(s) merged.', True); + end; +end; + +procedure TMainForm.RunningFrequencies1Click(Sender: TObject); +begin + FreqList.Show; +end; + +procedure TMainForm.SaveFileAndBackUp; +begin + Log.SaveToFile(CurrentFileName); //this is where the file is saved!!! + BackUp1Click(Self); //0.32 +end; + +procedure TMainForm.mnCheckCountryClick(Sender: TObject); +begin + CheckCountry.Show; +end; + +procedure TMainForm.mnCheckMultiClick(Sender: TObject); +begin + CheckMulti.Show; +end; + +procedure TMainForm.StatusLineDrawPanel(StatusBar: TStatusBar; + Panel: TStatusPanel; const Rect: TRect); +begin + if Panel = StatusLine.Panels[0] then + begin + StatusBar.Canvas.Font.Color := clStatusLine; + StatusBar.Canvas.TextOut(Rect.Left+1, Rect.Top+1, Panel.Text); + end; +end; + + +procedure TMainForm.Bandscope1Click(Sender: TObject); +begin + //BandScope.Show; + BandScope2.Show; //BS2 test +end; + +procedure TMainForm.mnChangeTXNrClick(Sender: TObject); +var i, j, _top, _bottom, NewTX, R : integer; + aQSO : TQSO; +begin + with MainForm.Grid do + begin + _top := Selection.Top; + _bottom := Selection.Bottom; + end; + if _top = _bottom then + begin + R := EditScreen.IndexArray[_top]; + if (R > 0) and (R <= Log.TotalQSO) then + begin + aQSO := TQSO(Log.List[R]); + IntegerDialog.Init(Options.Settings._txnr, 'Enter new TX#'); + if IntegerDialog.ShowModal = mrOK then + begin + NewTX := IntegerDialog.GetValue; + if (NewTX >= 0) and (NewTX <= 255) then + begin + IncEditCounter(aQSO); + aQSO.QSO.TX := NewTX; + //aQSO.QSO.Memo := 'TX#'+IntToStr(aQSO.QSO.TX)+' '+aQSO.QSO.Memo; + ZLinkForm.EditQSObyID(aQSO); //added 0.24 + end; + end; + end; + end + else + begin + if (_top < Log.TotalQSO) and (_bottom <= Log.TotalQSO) then + begin + R := MessageDlg('Are you sure to change the TX# for these QSO''s?', mtConfirmation, + [mbYes, mbNo], 0); {HELP context 0} + if R = mrNo then exit; + + aQSO := TQSO(Log.List[EditScreen.IndexArray[_top]]); + IntegerDialog.Init(Options.Settings._txnr, 'Enter new TX#'); + if IntegerDialog.ShowModal <> mrOK then + exit; + NewTX := IntegerDialog.GetValue; + if (NewTX > 255) or (NewTX < 0) then + exit; + for i := _top to _bottom do + begin + j := EditScreen.IndexArray[i]; //1.4b + if (j > 0) and (j <= Log.TotalQSO) then + begin + aQSO := TQSO(Log.List[j]); + aQSO.QSO.TX := NewTX; + //aQSO.QSO.Memo := 'TX#'+IntToStr(aQSO.QSO.TX)+' '+aQSO.QSO.Memo; + IncEditCounter(aQSO); + ZLinkForm.EditQSObyID(aQSO); // 0.24 + end; + end; + end; + end; + //aQSO.Free; + i := Grid.TopRow; + MyContest.Renew; + Grid.TopRow := i; + EditScreen.RefreshScreen; +end; + +procedure TMainForm.GridKeyPress(Sender: TObject; var Key: Char); +var XY : TGridRect; +begin + case Key of + 'a'..'z' : + Key := Chr(ord('A') + ord(Key) - ord('a')); + ^P, '-' : + begin + if Grid.Row > 1 then + Grid.Row := Grid.Row - 1; + end; + ^N, '+' : + begin + if Grid.Row < Grid.RowCount - 1 then + Grid.Row := Grid.Row + 1; + end; + end; +end; + +procedure TMainForm.mnGridAddNewPXClick(Sender: TObject); +var row, ind : LongInt; + s : string; +begin + row := Grid.Row; + if row > 0 then + begin + ind := EditScreen.IndexArray[row]; + if (ind > 0) and (ind <= Log.TotalQSO) then + begin + s := TQSO(Log.List[ind]).QSO.Callsign; + MyContest.MultiForm.SelectAndAddNewPrefix(s); + end; + end; +end; + +procedure TMainForm.GridSelectCell(Sender: TObject; Col, Row: Integer; + var CanSelect: Boolean); +begin + if EditScreen.DirectEdit then + begin + EditScreen.BeforeEdit := Grid.Cells[Col, Row]; + if (Col = CallsignEdit.Tag) or (Col = NumberEdit.Tag) or + (Col = MemoEdit.Tag) then + Grid.Options := Grid.Options + [goEditing] + else + Grid.Options := Grid.Options - [goEditing]; + { + if Grid.EditorMode then + WriteStatusLine('EDITMODE=TRUE', false) + else + WriteStatusLine('EDITMODE=FALSE',false);} + end; +end; + +procedure TMainForm.GridSetEditText(Sender: TObject; ACol, ARow: Integer; + const Value: String); +begin + WriteStatusLine('SetEditTextCalled',false); +end; + +procedure TMainForm.GridGetEditText(Sender: TObject; ACol, ARow: Integer; + var Value: String); +begin + WriteStatusLine('GetEditTextCalled',false); +end; + +procedure TMainForm.Togglerig1Click(Sender: TObject); +begin + //WriteStatusLine('Alt+.',False); + RigControl.ToggleCurrentRig; +end; + +procedure TMainForm.mnHideCWPhToolBarClick(Sender: TObject); +begin + if mnHideCWPhToolBar.Checked = False then + begin + Grid.Align := alNone; + CWToolBar.Height := 1; + SSBToolBar.Height := 1; + mnHideCWPhToolBar.Checked := True; + Grid.Align := alClient; + end + else + begin + Grid.Align := alNone; + CWToolbar.Height := 33; + SSBToolbar.Height := 33; + mnHideCWPhToolBar.Checked := False; + Grid.Align := alClient; + end; + FormResize(Self); +end; + +procedure TMainForm.mnHideMenuToolbarClick(Sender: TObject); +begin + if mnHideMenuToolBar.Checked = False then + begin + Grid.Align := alNone; + MainToolBar.Height := 1; + mnHideMenuToolBar.Checked := True; + Grid.Align := alClient; + end + else + begin + Grid.Align := alNone; + MainToolbar.Height := 33; + mnHideMenuToolBar.Checked := False; + Grid.Align := alClient; + end; + FormResize(Self); +end; + +procedure TMainForm.Scratchsheet1Click(Sender: TObject); +begin + ScratchSheet.Show; +end; + +procedure TMainForm.SwitchLastQSOBandMode; +var t, mytx, i : integer; + boo : boolean; +begin + if Log.TotalQSO > 0 then + begin + t := Log.TotalQSO; + mytx := Options.GetTXnr; + boo := false; + for i := t downto 1 do + begin + if TQSO(Log.List[i]).QSO.TX = mytx then + begin + boo := true; + break; + end; + end; + if boo = True then + begin + + UpdateBand(TQSO(Log.List[i]).QSO.Band); + if RigControl.Rig <> nil then + begin + RigControl.Rig.SetBand(CurrentQSO); + if CurrentQSO.QSO.Mode = mSSB then + RigControl.Rig.SetMode(CurrentQSO); + end; + UpdateMode(TQSO(Log.List[i]).QSO.Mode); + if RigControl.Rig <> nil then + RigControl.Rig.SetMode(CurrentQSO); + + LastFocus.SetFocus; + end; + end; +end; + +procedure TMainForm.IncreaseFontSize1Click(Sender: TObject); +begin + IncFontSize; +end; + +procedure TMainForm.mnMMTTYClick(Sender: TObject); +begin + if mnMMTTY.Tag = 0 then + begin + mnMMTTY.Tag := 1; + mnMMTTY.Caption := 'Exit MMTTY'; + mnTTYConsole.Visible := True; + Application.CreateForm(TTTYConsole, TTYConsole); + repeat until + TTYConsole <> nil; + TTYConsole.SetTTYMode(ttyMMTTY); + InitializeMMTTY(MainForm.Handle); + TTYConsole.Show; + TTYConsole.SetFocus; + exit; + end + else + begin + mnMMTTY.Tag := 0; + mnMMTTY.Caption := 'Load MMTTY'; + mnTTYConsole.Visible := False; + TTYConsole.Close; + TTYConsole.Destroy; + ExitMMTTY; + exit; + end; +end; + +procedure TMainForm.mnTTYConsoleClick(Sender: TObject); +begin + TTYConsole.Show; +end; + +procedure TMainForm.QTC1Click(Sender: TObject); +begin + if MyContest.Name <> 'WAEDC Contest' then + exit; + QTCForm.Show; + if CurrentQSO.QSO.Callsign = '' then + begin + if Log.TotalQSO >= 2 then + QTCForm.OpenQTC(TQSO(Log.List[Log.TotalQSO])); + end + else + QTCForm.OpenQTC(Main.CurrentQSO); +end; + +procedure TMainForm.mnNewBandScopeClick(Sender: TObject); +var i : integer; +begin + for i := 1 to BSMax do // BS2test... + if UBandScope2.BandScopeArray[i] = nil then + begin + UBandScope2.BandScopeArray[i] := TBandScope2.Create(Self); + UBandScope2.BandScopeArray[i].ArrayNumber := i; + UBandScope2.BandScopeArray[i].Show; + UBandScope2.BandScopeArray[i].SetBandMode(CurrentQSO.QSO.Band, CurrentQSO.QSO.Mode); + exit; + end; +end; + +procedure TMainForm.AutoInput(D : TBSData); +begin + OldCallsign := CallsignEdit.Text; + OldNumber := NumberEdit.Text; + CallsignEdit.Text := D.Call; + NumberEdit.Text := D.Number; + CallsignEdit.Font.Color := clGrayText; + NumberEdit.Font.Color := clGrayText; +end; + +procedure TMainForm.QuickReference1Click(Sender: TObject); +begin + QuickRef.Show; +end; + +procedure TMainForm.Timer2Timer(Sender: TObject); +begin + AutoInput(TBSData(BSList2[0])); +end; + +procedure TMainForm.CreateELogJARL1Click(Sender: TObject); +begin + ELogJapanese.ShowModal; +end; + +end. diff --git a/src/menu.dfm b/src/menu.dfm new file mode 100644 index 00000000..6785187d Binary files /dev/null and b/src/menu.dfm differ diff --git a/src/menu.pas b/src/menu.pas new file mode 100644 index 00000000..c48d0cab --- /dev/null +++ b/src/menu.pas @@ -0,0 +1,39 @@ +unit menu; + +interface + +uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, + Buttons, ExtCtrls; + +type + TMenuBox = class(TForm) + Panel1: TPanel; + ProgramIcon: TImage; + ProductName: TLabel; + Version: TLabel; + Copyright: TLabel; + Comments: TLabel; + OKButton: TButton; + procedure OKButtonClick(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + MenuBox: TMenuBox; + +implementation + +uses Main; + +{$R *.DFM} + +procedure TMenuBox.OKButtonClick(Sender: TObject); +begin + MainForm.Show; +end; + +end. + diff --git a/src/mynewpack.dcp b/src/mynewpack.dcp new file mode 100644 index 00000000..3b81c0f6 Binary files /dev/null and b/src/mynewpack.dcp differ diff --git a/src/mynewpack.dpk b/src/mynewpack.dpk new file mode 100644 index 00000000..fde52d8e --- /dev/null +++ b/src/mynewpack.dpk @@ -0,0 +1,61 @@ +package mynewpack; + +{$R *.RES} +{$R 'JLLabel.dcr'} +{$R 'Aligrid.dcr'} +{$R 'async32.dcr'} +{$R 'Wthread.dcr'} +{$R 'WSockets.dcr'} +{$R 'StrCGrid.dcr'} +{$R 'Aabgraph.dcr'} +{$R 'Hirestim.dcr'} +{$R 'Z_timer.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + JLLabel, + Aligrid, + async32, + console2, + FngSingleInst, + PathDialog, + Wthread, + Ini, + WSockets, + StrCGrid, + Aabgraph, + Wsagraph, + Hirestim, + Thdtim, + Z_timer, + bpanel, + Cologrid, + Oedit, + NkPrinters; + +end. diff --git a/src/mynewpack.dpl b/src/mynewpack.dpl new file mode 100644 index 00000000..c375ac58 Binary files /dev/null and b/src/mynewpack.dpl differ diff --git a/src/mynewpack.res b/src/mynewpack.res new file mode 100644 index 00000000..36f26e23 Binary files /dev/null and b/src/mynewpack.res differ diff --git a/src/mynewpack.~dp b/src/mynewpack.~dp new file mode 100644 index 00000000..cea5d77d --- /dev/null +++ b/src/mynewpack.~dp @@ -0,0 +1,60 @@ +package mynewpack; + +{$R *.RES} +{$R 'JLLabel.dcr'} +{$R 'Aligrid.dcr'} +{$R 'async32.dcr'} +{$R 'Wthread.dcr'} +{$R 'WSockets.dcr'} +{$R 'StrCGrid.dcr'} +{$R 'Aabgraph.dcr'} +{$R 'Hirestim.dcr'} +{$R 'Z_timer.dcr'} +{$ALIGN ON} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION ON} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO OFF} +{$SAFEDIVIDE OFF} +{$STACKFRAMES OFF} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST ON} +{$MINENUMSIZE 1} +{$IMAGEBASE $00400000} +{$DESIGNONLY} +{$IMPLICITBUILD ON} + +requires + vcl30; + +contains + JLLabel, + Aligrid, + async32, + console2, + FngSingleInst, + PathDialog, + Wthread, + Ini, + WSockets, + StrCGrid, + Aabgraph, + Wsagraph, + Hirestim, + Thdtim, + Z_timer, + bpanel, + Cologrid, + Oedit; + +end. diff --git a/src/rbutton.pas b/src/rbutton.pas new file mode 100644 index 00000000..c8b8c219 --- /dev/null +++ b/src/rbutton.pas @@ -0,0 +1,304 @@ +{------------------------------------------------------------- +-RButton: Visible Component used to display round buttons - +- instead of square. Works identical to the standard- +- TSpeedButton component. - +-------------------------------------------------------------- +- !INSTALLATION!: In Delphi, go to Options|Install Component- +- and Add BPReg.pas. This will add both components. - +-------------------------------------------------------------- +-Programmed by Brendan Rempel, October 1996 - +-Copyright 1996; All Rights Reserved - +-Send any comments/change requests/etc. to: - +- rempelb@mail.pr-unlimited.com - +- - +-This component is hereby given to the public domain. I do - +-claim copyright of this code and I hereby prohibit the sale - +-of the source or compiled code to anyone for any amount. - +-------------------------------------------------------------} +unit Rbutton; + +interface + +uses + SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, + Forms, Dialogs; + +const + DefaultWidth = 40; + DefaultHeight = 40; + +type + TNumGlyphs = 1..4; + TRButtonType = (rtRegular,rtInset); + +type + TRoundButton = class(TGraphicControl) + private + FGlyph: TBitmap; + FNumGlyphs: TNumGlyphs; + FDown: boolean; + FTransparentColor: TColor; + FMouseDown: boolean; + FMouseInside: boolean; + FOnClick: TNotifyEvent; + FRButtonType: TRButtonType; + FOnMouseEnter: TNotifyEvent; + FOnMouseExit: TNotifyEvent; + + protected + procedure Paint; override; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + override; + procedure MouseMove(Shift: TShiftState; X, Y: Integer); + override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + override; + + function IsInsideButton(X,Y: Integer): boolean; + + procedure SetGlyph(newGlyph: TBitmap); + procedure SetNumGlyphs(newNumGlyphs: TNumGlyphs); + procedure SetTransparentColor(newTransparentColor: TColor); + procedure SetRButtonType(newRButtonType: TRButtonType); + + procedure PaintButton; + + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + + published + property ButtonType: TRButtonType read FRButtonType write SetRButtonType; + property Enabled; + property Glyph: TBitmap read FGlyph write SetGlyph; + property NumGlyphs: TNumGlyphs read FNumGlyphs write SetNumGlyphs default 1; + property ParentShowHint; + property ShowHint; + property TransparentColor: TColor read FTransparentColor write SetTransparentColor; + property Visible; + property OnClick: TNotifyEvent read FOnClick write FOnClick; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + + property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter; + property OnMouseExit: TNotifyEvent read FOnMouseExit write FOnMouseExit; + end; + +implementation + +constructor TRoundButton.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + FGlyph:= TBitmap.Create; + FNumGlyphs:= 1; + FDown:= False; + FMouseInside:= False; + Width:= DefaultWidth; + Height:= DefaultHeight; + + FMouseDown:= False; +end; + +destructor TRoundButton.Destroy; +begin + FGlyph.Free; + inherited Destroy; +end; + +procedure TRoundButton.SetGlyph(newGlyph: TBitmap); +begin + if(Assigned(FGlyph)) then + begin + FGlyph.Assign(newGlyph); + + if (csDesigning in ComponentState) then + begin + { bitmap 1: main, 2: disabled, 3: down; + must have dimensions of (height * NoBitmaps) = width } + if (newGlyph.width mod newGlyph.height = 0) then + FNumGlyphs:= newGlyph.width div newGlyph.height + else + FNumGlyphs:= 1; + end; + + Invalidate; + end; +end; + +procedure TRoundButton.SetNumGlyphs(newNumGlyphs: TNumGlyphs); +begin + FNumGlyphs:= newNumGlyphs; + Invalidate; +end; + +procedure TRoundButton.SetRButtonType(newRButtonType: TRButtonType); +begin + FRButtonType:= newRButtonType; + Invalidate; +end; + +procedure TRoundButton.SetTransparentColor(newTransparentColor: TColor); +begin + FTransparentColor:= newTransparentColor; + Invalidate; +end; + +function TRoundButton.IsInsideButton(X,Y: Integer): boolean; +var + Hypotonuse: integer; +begin + X:= Abs((Width shr 1) - X); { calculate the (X,Y) distance } + Y:= Abs((Height shr 1) - Y); + + Hypotonuse:= Round(Sqrt(Abs((X * X) + (Y * Y)))); + { calculate hypotenuse (distance from center) } + + Result:= (Hypotonuse <= (Width shr 1)-1); + { return true if Hypotonuse less than half of width } +end; + +procedure TRoundButton.Paint; +begin + with Canvas do + begin + brush.color:= clBtnFace; + + case FRButtonType of + rtRegular: + begin + pen.color:= clBlack; + Ellipse(0,0,width-1,height-1); { fill inner button, black edge } + end; + rtInset: + begin + pen.color:= clBtnFace; + Ellipse(1,1,width-2,height-2); { fill inner button } + + pen.color:= clBtnShadow; { shadowed edge } + Arc(0,0,width-1,height-1,width div 5 * 4,height div 5,width div 5,height div 5 * 4); + pen.color:= clBtnHighlight; { highlighted edge } + Arc(0,0,width-1,height-1,width div 5,height div 5 * 4,width div 5 * 4,height div 5); + end; + end; + end; + + PaintButton; { repaint rest } +end; + +procedure TRoundButton.PaintButton; +var + Dest,Source: TRect; + outWidth,outHeight: integer; +begin + if Assigned(FGlyph) then { if has a bitmap } + begin + with Source do + begin { setup bounding rectangle } + Left:= 0; Top:= 0; Right:= FGlyph.Width; Bottom:= FGlyph.Height; + + if FNumGlyphs > 0 then + Right:= Right div FNumGlyphs; + end; + end; + + with Canvas do + begin { draw top left edge } + if FDown then pen.color:= clBtnShadow else pen.color:= clBtnHighlight; + Arc(1,1,width-2,height-2,width div 5 * 4,height div 5,width div 5,height div 5 * 4); + { draw bottom right edge } + if Not FDown then pen.color:= clBtnShadow else pen.color:= clBtnHighlight; + Arc(1,1,width-2,height-2,width div 5,height div 5 * 4,width div 5 * 4,height div 5); + +{---place glyph---------------------------------------} + if Assigned(FGlyph) and (FNumGlyphs > 0) then + begin + if(Not Enabled and (FNumGlyphs > 1)) then + begin { draw disabled button } + Source.Left:= FGlyph.width div FNumGlyphs; + Source.Right:= Source.Left shl 1; + end; + { setup output image retangle } + outWidth:= Source.Right-Source.Left; + outHeight:= Source.Bottom-Source.Top; + { find center } + Dest.Left:= ((Width - outWidth) shr 1); + Dest.Right:= ((Width - outWidth) shr 1)+outWidth; + Dest.Top:= ((Height - outHeight) shr 1); + Dest.Bottom:=((Height - outHeight) shr 1)+outHeight; + + Pen.Color:= clBtnFace; + + if FDown then + begin { shift image position down and right 1 } + Inc(Dest.Left); Inc(Dest.Right); Inc(Dest.Top); Inc(Dest.Bottom); + { clear ghost } + MoveTo(Dest.Left-1,Dest.Bottom); + LineTo(Dest.Left-1,Dest.Top-1); + LineTo(Dest.Right,Dest.Top-1); + end + else + begin { clear ghost } + MoveTo(Dest.Right,Dest.Top); + LineTo(Dest.Right,Dest.Bottom); + LineTo(Dest.Left,Dest.Bottom); + end; + + if(FDown and (FNumGlyphs > 2)) then { show pushed image if available } + begin + Source.Left:= FGlyph.width div FNumGlyphs * 2; + Source.Right:=FGlyph.width div FNumGlyphs * 3; + end; + Brush.Color:= clBtnFace; { paint transparent image } + BrushCopy(Dest,FGlyph,Source,FTransparentColor); + end; + end; +end; + +procedure TRoundButton.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + if (Enabled and IsInsideButton(X,Y)) then + begin + FDown:= True; { push button and repaint } + PaintButton; + end; + FMouseDown:= True; +end; + +procedure TRoundButton.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); +begin + if (Enabled and IsInsideButton(X,Y)) then + begin + FDown:= False; { release button and repaint } + PaintButton; + if Assigned(FOnClick) then { issue event to application } + FOnClick(Self); + end; + FMouseDown:= False; +end; + +procedure TRoundButton.MouseMove(Shift: TShiftState; X, Y: Integer); +begin + if FMouseDown then + begin + if Not IsInsideButton(X,Y) then + begin + if FDown then { mouse has slid off, so release } + begin + FDown:= False; + PaintButton; + end; + end + else + begin + if Not FDown then { mouse has slid back on, so push } + begin + FDown:= True; + PaintButton; + end; + end; + end; +end; + +end. diff --git a/src/supertmr.zip b/src/supertmr.zip new file mode 100644 index 00000000..efae5423 Binary files /dev/null and b/src/supertmr.zip differ diff --git a/src/testmain.dfm b/src/testmain.dfm new file mode 100644 index 00000000..0f6d6897 Binary files /dev/null and b/src/testmain.dfm differ diff --git a/src/testmain.pas b/src/testmain.pas new file mode 100644 index 00000000..2b51985a --- /dev/null +++ b/src/testmain.pas @@ -0,0 +1,33 @@ +unit testmain; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls; + +type + TForm1 = class(TForm) + Button1: TButton; + procedure Button1Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + +var + Form1: TForm1; + +implementation + +uses ubandscope; + +{$R *.DFM} + +procedure TForm1.Button1Click(Sender: TObject); +begin + BandScope.Show; +end; + +end. diff --git a/src/testscope.dpr b/src/testscope.dpr new file mode 100644 index 00000000..9c5d1654 --- /dev/null +++ b/src/testscope.dpr @@ -0,0 +1,17 @@ +program testscope; + +uses + Forms, + testmain in 'testmain.pas' {Form1}, + ubandscope in 'ubandscope.pas' {BandScope}, + UMinMaxFreqDlg in 'UMinMaxFreqDlg.pas' {MinMaxFreqDlg}; + +{$R *.RES} + +begin + Application.Initialize; + Application.CreateForm(TForm1, Form1); + Application.CreateForm(TBandScope, BandScope); + Application.CreateForm(TMinMaxFreqDlg, MinMaxFreqDlg); + Application.Run; +end. diff --git a/src/thdtim.zip b/src/thdtim.zip new file mode 100644 index 00000000..5e57fef8 Binary files /dev/null and b/src/thdtim.zip differ diff --git a/src/timer32.zip b/src/timer32.zip new file mode 100644 index 00000000..f7c057b7 Binary files /dev/null and b/src/timer32.zip differ diff --git a/src/ubandscope.dfm b/src/ubandscope.dfm new file mode 100644 index 00000000..23566b19 Binary files /dev/null and b/src/ubandscope.dfm differ diff --git a/src/ubandscope.pas b/src/ubandscope.pas new file mode 100644 index 00000000..1fcfba65 --- /dev/null +++ b/src/ubandscope.pas @@ -0,0 +1,688 @@ +unit ubandscope; + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, Menus, zLogGlobal, USpotClass; + + +//var + +type + + TBandScope = class(TForm) + BSMenu: TPopupMenu; + mnSetMinMax: TMenuItem; + mnDelete: TMenuItem; + cbStayOnTop: TCheckBox; + Refresh1: TMenuItem; + Mode1: TMenuItem; + mnCurrentRig: TMenuItem; + Rig11: TMenuItem; + Rig21: TMenuItem; + Fixedband1: TMenuItem; + N19MHz1: TMenuItem; + N35MHz1: TMenuItem; + N7MHz1: TMenuItem; + N14MHz1: TMenuItem; + N21MHz1: TMenuItem; + N28MHz1: TMenuItem; + N50MHz1: TMenuItem; + Deleteallworkedstations1: TMenuItem; + procedure FormPaint(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure FormResize(Sender: TObject); + procedure mnSetMinMaxClick(Sender: TObject); + procedure FormMouseDown(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); + procedure mnDeleteClick(Sender: TObject); + procedure BSMenuPopup(Sender: TObject); + procedure FormDblClick(Sender: TObject); + procedure CreateParams(var Params: TCreateParams); override; + procedure cbStayOnTopClick(Sender: TObject); + procedure Refresh1Click(Sender: TObject); + procedure FormClose(Sender: TObject; var Action: TCloseAction); + procedure mnDispModeClick(Sender: TObject); + procedure mnFixedBandClicked(Sender: TObject); + procedure Deleteallworkedstations1Click(Sender: TObject); + private + { Private declarations } + BarWidth, BarHeight : LongInt; + BarTopLeft, BarBottomRight : TPoint; + MinFreq, MaxFreq : Integer; // in Hz + + curr : integer; // test variable + ClickedIndex : integer; // points to the bsdata clicked by mouse + + currFreq : Integer; + currBand : TBand; + currMode : TMode; + + procedure AddBSList(D : TBSData); + public + { Public declarations } + // BSList : TList; moved to UBandScope + +// MinFreqArray : array[b19..HiBand, mCW..mOther] of Integer; // kHz +// MaxFreqArray : array[b19..HiBand, mCW..mOther] of Integer; // kHz + +// procedure CheckWorked; + ArrayNumber : integer; + DisplayMode : integer; // 0 : current rig; 1 : rig 1; 2 : rig 2; 9 : fixed band + FixedBand : TBand; + procedure DrawBar; + procedure DrawLabel; + procedure DrawBSList; + procedure SetMinMaxFreq(min, max : LongInt); + procedure MarkCurrentFreq(Hz : integer); + procedure SetSizes; + procedure SetBandMode(B : TBand; M : TMode); +// procedure InitFreqArrays; + procedure AddAndDisplay(D : TBSData); + //procedure Refresh; + procedure DeleteFromBSList(i : integer); + procedure CreateBSData(aQSO : TQSO; Hz : Integer); + procedure ProcessBSDataFromNetwork(BSText : string); + //procedure InsertQSO(Q : TQSO; FreqHz : integer); + procedure AddNewQSO(aQSO : TQSO); + end; + +procedure BSRefresh(Sender : TObject); + +const BSMax = 15; +var + BandScope: TBandScope; + BandScopeArray : array[1..BSMax] of TBandscope; + +implementation + +uses UMinMaxFreqDlg, Main, UOptions, URigControl, UZLinkForm; + +{$R *.DFM} + +procedure BSRefresh(Sender : TObject); +var i : integer; + DispMode : integer; + RR : TRig; +begin + BandScope.FormPaint(Sender); + for i := 1 to BSMax do + if BandScopeArray[i] <> nil then + begin + DispMode := BandScopeArray[i].DisplayMode; + RR := nil; + case DispMode of + 1 : RR := RigControl.Rig1; + 2 : RR := RigControl.Rig2; + end; + if RR <> nil then + BandScopeArray[i].SetBandMode(RR._currentband, RR._currentmode) + else + BandScopeArray[i].FormPaint(Sender); + end; +end; + +procedure TBandScope.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW; +end; + +function PointInRect(P : TPoint; R : TRect) : boolean; +begin + if (P.x >= R.Left) and (P.x <= R.Right) and + (P.y >= R.Top) and (P.y <= R.Bottom) then + Result := True + else + Result := False; +end; + +{ +procedure TBandScope.InitFreqArrays; +var B : TBand; + M : TMode; +begin + for B := b19 to HiBand do + for M := mCW to mOther do + begin + MinFreqArray[B, M] := 0; + MaxFreqArray[B, M] := 0; + end; + MinFreqArray[b19, mCW] := 1800; + MaxFreqArray[b19, mCW] := 1950; + + MinFreqArray[b35, mCW] := 3500; + MaxFreqArray[b35, mCW] := 3800; + + MinFreqArray[b7, mCW] := 7000; + MaxFreqArray[b7, mCW] := 7200; + + MinFreqArray[b10, mCW] := 10100; + MaxFreqArray[b10, mCW] := 10150; + + MinFreqArray[b14, mCW] := 14000; + MaxFreqArray[b14, mCW] := 14350; + + MinFreqArray[b18, mCW] := 18060; + MaxFreqArray[b18, mCW] := 18170; + + MinFreqArray[b21, mCW] := 21000; + MaxFreqArray[b21, mCW] := 21450; + + MinFreqArray[b24, mCW] := 24890; + MaxFreqArray[b24, mCW] := 24990; + + MinFreqArray[b28, mCW] := 28000; + MaxFreqArray[b28, mCW] := 28500; + + MinFreqArray[b50, mCW] := 50000; + MaxFreqArray[b50, mCW] := 51000; + + MinFreqArray[b144, mCW] := 144000; + MaxFreqArray[b144, mCW] := 145650; + + MinFreqArray[b430, mCW] := 430000; + MaxFreqArray[b430, mCW] := 434000; + + for B := b19 to HiBand do + for m := mSSB to mOther do + begin + MinFreqArray[B, m] := MinFreqArray[B, mCW]; + MaxFreqArray[B, m] := MaxFreqArray[B, mCW]; + end; +end; +} + +procedure TBandScope.AddBSList(D : TBSData); +var i : integer; +begin + if BSList.Count = 0 then + begin + BSList.Add(D); + exit; + end; + for i := 0 to BSList.Count - 1 do + if TBSData(BSList[i]).FreqHz < D.FreqHz then + break; + if i = BSList.Count - 1 then + begin + if TBSData(BSList[i]).FreqHz > D.FreqHz then + BSList.Add(D) + else + BSList.Insert(i, D); + exit; + end; + BSList.Insert(i, D); +end; + +procedure TBandScope.DrawBar; +var R : TRect; +begin + with Canvas do + begin + Brush.Style := bsSolid; + Brush.Color := clBlue; + R.TopLeft := BarTopLeft; + R.BottomRight := BarBottomRight; + FillRect(R); + end; +end; + +procedure TBandScope.DrawLabel; +var str : string; + wid : integer; +begin + with Canvas do + begin + Brush.Color := Color; + str := kHzStr(MinFreq); + wid := TextWidth(str); + Canvas.Font.Color := clBlack; + TextOut(BarTopLeft.x - wid div 2, BarBottomRight.y + 3, str); + str := kHzStr(MaxFreq); + wid := TextWidth(str); + TextOut(BarBottomRight.x - wid div 2, BarBottomRight.y + 3, str); + end; +end; + +procedure TBandScope.DrawBSList; +var D, DD : TBSData; + i, maxx : integer; + r : double; + str : string; +begin + with Canvas do + begin + Pen.Width := 2; + Brush.Color := Color; + for i := 0 to BSList.Count - 1 do + begin + D := TBSData(BSList[i]); + if (D.FreqHz >= MinFreq) and (D.FreqHz <= MaxFreq) then + begin + r := (D.FreqHz - MinFreq) / (MaxFreq - MinFreq); + str := D.LabelStr; + D.LabelRect.Left := BarTopLeft.x + Trunc(BarWidth*r); + + D.LabelRect.Top := BarTopLeft.y - TextHeight(str)-2; + + if i > 0 then + begin + maxx := D.LabelRect.Left + TextWidth(str); + DD := TBSData(BSList[i-1]); + if (DD.Band = D.Band) and (maxx >= DD.LabelRect.Left) then + D.LabelRect.Top := DD.LabelRect.Top - TextHeight(str); + end; + + D.LabelRect.Right := D.LabelRect.Left + TextWidth(str); + D.LabelRect.Bottom := D.LabelRect.Top + TextHeight(str); + + if D.NewMulti then + Canvas.Font.Color := clRed + else + if D.Worked then + Canvas.Font.Color := clBlack + else + Canvas.Font.Color := clGreen; + + TextOut(D.LabelRect.Left, D.LabelRect.Top, str); + + Pen.Style := psSolid; + Pen.Color := clBlack; + MoveTo(D.LabelRect.Left, D.LabelRect.Bottom); + LineTo(D.LabelRect.Left, BarBottomRight.y - 2); + end + else // out of scope + begin + D.LabelRect.Left := 999999; + end; + end; + end; +end; + +procedure TBandScope.MarkCurrentFreq(Hz : integer); +var x : integer; + r : double; +begin + if (MaxFreq = 0) or (MinFreq = 0) or (Hz <= 0) or (MinFreq=MaxFreq) then + exit; + if (Hz < MinFreq) or (Hz > MaxFreq) then + exit; + //CurrFreq := Hz; + r := (Hz - MinFreq) / (MaxFreq - MinFreq); + x := BarTopLeft.x + Trunc(BarWidth*r); + Canvas.Pen.Width := 3; + Canvas.Pen.Color := clRed; + Canvas.MoveTo(x, BarTopLeft.y + 1); + Canvas.LineTo(x, BarBottomRight.y - 2); +end; + +procedure TBandScope.SetMinMaxFreq(min, max : LongInt); +begin + MinFreq := min; + MaxFreq := max; + Options.Settings._bsMinFreqArray[currBand, currMode] := min div 1000; + Options.Settings._bsMaxFreqArray[currBand, currMode] := max div 1000; +end; + +procedure TBandScope.FormPaint(Sender: TObject); +var R : TRect; +begin + if not(Visible) then + exit; + R.Left := 0; + R.Top := 0; + R.Right := ClientWidth; + R.Bottom := ClientHeight; + Canvas.Brush.Color := Color; + Canvas.Brush.Style := bsSolid; + Canvas.FillRect(R); + DrawBar; + DrawLabel; + + //CheckWorked; + DrawBSList; + + //MarkCurrentFreq(currFreq); +end; + +procedure TBandScope.SetSizes; +begin + BarHeight := 10; + BarTopLeft.x := 25; + BarTopLeft.y := ClientHeight - 32; + BarBottomRight.x := ClientWidth - 25; + BarWidth := BarBottomRight.x - BarTopLeft.x; + BarBottomRight.y := BarTopLeft.y + BarHeight; +end; + +procedure TBandScope.FormCreate(Sender: TObject); +var D : TBSData; +begin + //TimeLimitMin := 60; + //TimeLimit := TimeLimitMin/(60*24); + //InitFreqArrays; + // BSList := TList.Create; + + //SetMinMaxFreq(14000000, 14100000); + + FixedBand := b19; + ArrayNumber := 0; + DisplayMode := 0; // current rig + SetSizes; + //SetBandMode(b14, mCW); + + { + D := TBSData.Create; + D.Callsign := 'JJ1MED'; + D.Freq := 14035000; + AddBSList(D); + D := TBSData.Create; + D.Callsign := 'P41Z'; + D.Freq := 14050000; + AddBSList(D); + D := TBSData.Create; + D.Callsign := 'KF7AG'; + D.Freq := 14100000; + AddBSList(D); + curr := 14050; } +end; + +procedure TBandScope.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + case Key of + VK_UP : begin + inc(curr); + end; + VK_DOWN : begin + dec(curr); + end; + VK_ESCAPE : MainForm.LastFocus.SetFocus; + end; + FormPaint(Self); + //MarkCurrentFreq(curr*1000); +end; + +procedure TBandScope.FormResize(Sender: TObject); +begin + SetSizes; + FormPaint(Self); + //cbStayOnTop.Top := ClientHeight - 22; +end; + +procedure TBandScope.mnSetMinMaxClick(Sender: TObject); +begin + MinMaxFreqDlg.SetMinMax(MinFreq div 1000, MaxFreq div 1000); + MinMaxFreqDlg.ShowModal; + SetMinMaxFreq(MinMaxFreqDlg.MinFreq*1000, MinMaxFreqDlg.MaxFreq*1000); + FormPaint(Self); +end; + +procedure TBandScope.FormMouseDown(Sender: TObject; Button: TMouseButton; + Shift: TShiftState; X, Y: Integer); +var i : integer; +begin + ClickedIndex := -1; + for i := 0 to BSList.Count - 1 do + begin + if PointInRect(Point(X,Y), TBSData(BSList[i]).LabelRect) = True then + begin + ClickedIndex := i; + exit; + end; + end; +end; + +procedure TBandScope.DeleteFromBSList(i : integer); +begin + if (i >= 0) and (i < BSList.Count) then + begin + TBSData(BSList[i]).Free; + BSList[i] := nil; + BSList.Pack; + //FormPaint(Self); + end; +end; + +procedure TBandScope.mnDeleteClick(Sender: TObject); +begin + if ClickedIndex >= 0 then + begin + DeleteFromBSList(ClickedIndex); + FormPaint(Self); + end; +end; + +procedure TBandScope.BSMenuPopup(Sender: TObject); +begin + if ArrayNumber = 0 then + mnCurrentRig.Enabled := True + else + mnCurrentRig.Enabled := False; + + if ClickedIndex >= 0 then + mnDelete.Enabled := True + else + mnDelete.Enabled := False; +end; + +procedure TBandScope.FormDblClick(Sender: TObject); +var i : integer; + D : TBSData; +begin + if ClickedIndex >= 0 then + begin + i := ClickedIndex; + if (i >= 0) and (i < BSList.Count) then + begin + D := TBSData(BSList[i]); + MainForm.CallsignEdit.Text := D.Call; + if RigControl.Rig <> nil then + RigControl.Rig.SetFreq(D.FreqHz); + //FormPaint(Self); + MainForm.NumberEdit.SetFocus; + end; + end; +end; + +procedure TBandScope.SetBandMode(B : TBand; M : TMode); +var min, max : integer; +begin + currBand := B; + currMode := M; + Caption := 'Band scope '+BandString[B]; + min := Options.Settings._bsMinFreqArray[B, M]; + max := Options.Settings._bsMaxFreqArray[B, M]; + if B >= b2400 + then + begin + exit; // integer overflow. + end; + if (min > 0) and (max > 0) and (max > min) then + begin + SetMinMaxFreq(min*1000, max*1000); + FormPaint(Self); + end; +end; + +procedure TBandScope.AddAndDisplay(D : TBSData); +var i : integer; + BS : TBSData; + Diff : TDateTime; +label endofloop; +begin + for i := 0 to BSList.Count - 1 do + begin + BS := TBSData(BSList[i]); + if BS.Call = D.Call then + begin + BS.Free; + BSList[i] := nil; + goto endofloop; + end; + if round(BS.FreqHz / 100) = round(D.FreqHz / 100) then + begin + BS.Free; + BSList[i] := nil; + goto endofloop; + end; + Diff := Now - BS.Time; + if Diff*24*60 > 1.00*Options.Settings._bsexpire then + begin + BS.Free; + BSList[i] := nil; + end; + endofloop: + end; + BSList.Pack; + AddBSList(D); + //FormPaint(Self); + BSRefresh(Self); + +end; + +procedure TBandScope.CreateBSData(aQSO : TQSO; Hz : Integer); +var D : TBSData; +begin + D := TBSData.Create; + D.FreqHz := Hz; + D.Band := aQSO.QSO.Band; + D.Mode := aQSO.QSO.Mode; + D.Call := aQSO.QSO.Callsign; + //D.Time := Now; + Main.MyContest.MultiForm.ProcessSpotData(TBaseSpot(D)); + AddAndDisplay(D); + ZLinkForm.SendBandScopeData(D.InText); + //Send spot data to other radios! +end; + +procedure TBandScope.ProcessBSDataFromNetwork(BSText : string); +var D : TBSData; +begin + D := TBSData.Create; + D.FromText(BSText); + Main.MyContest.MultiForm.ProcessSpotData(TBaseSpot(D)); + AddAndDisplay(D); +end; + +{procedure TBandScope.CheckWorked; +var i : integer; + Q : TQSO; + D : TBSData; +begin + Q := TQSO.Create; + for i := 0 to BSList.Count - 1 do + begin + D := TBSData(BSList[i]); + if (D.FreqHz >= MinFreq) and (D.FreqHz <= MaxFreq) then + begin + Q.QSO.CallSign := D.Call; + Q.QSO.Band := D.Band; + //Q.QSO.Mode := D.Mode; + if Log.IsDupe(Q) > 0 then + D.Worked := True + else + D.Worked := False; + end; + end; + Q.Free; +end;} + + +procedure TBandScope.cbStayOnTopClick(Sender: TObject); +begin + If cbStayOnTop.Checked then + FormStyle := fsStayOnTop + else + FormStyle := fsNormal; +end; + +procedure TBandScope.Refresh1Click(Sender: TObject); +begin + Main.MyContest.MultiForm.RenewBandScope; +end; + +procedure TBandScope.AddNewQSO(aQSO : TQSO); +var i : integer; + boo : boolean; + D : TBSData; +begin + boo := False; + for i := 0 to BSList.Count - 1 do + begin + D := TBSData(BSList[i]); + if D.Band = aQSO.QSO.Band then + if CoreCall(D.Call) = CoreCall(aQSO.QSO.Callsign) then + if Log.AcceptDifferentMode then + begin + if SameMode2(D.Mode, aQSO.QSO.Mode) then + begin + D.Worked := True; + boo := True; + end; + end + else + begin + D.Worked := True; + boo := True; + end; + end; + + if (aQSO.QSO.NewMulti1) or (aQSO.QSO.NewMulti2) then + begin + end; + + if boo then + Refresh; +end; + + +var i : integer; + +procedure TBandScope.FormClose(Sender: TObject; var Action: TCloseAction); +begin + if ArrayNumber > 0 then + begin + BandScopeArray[ArrayNumber] := nil; + Free; + end; +end; + +procedure TBandScope.mnDispModeClick(Sender: TObject); +begin + DisplayMode := TMenuItem(Sender).Tag; +end; + +procedure TBandScope.mnFixedBandClicked(Sender: TObject); +begin + DisplayMode := 3; + FixedBand := TBand(TMenuItem(Sender).Tag); + SetBandMode(FixedBand, Main.CurrentQSO.QSO.Mode); + BSRefresh(Self); +end; + +procedure TBandScope.Deleteallworkedstations1Click(Sender: TObject); +var i : integer; + B : TBSData; +begin + for i := 0 to BSList.Count - 1 do + begin + B := TBSData(BSList[i]); + if B.Worked then + begin + B.Free; + BSList[i] := nil; + end; + end; + BSList.Pack; + Main.MyContest.MultiForm.RenewBandScope; +end; + +initialization + for i := 1 to BSMax do + BandScopeArray[i] := nil; +end. diff --git a/src/upaddlethread.pas b/src/upaddlethread.pas new file mode 100644 index 00000000..cad7aba1 --- /dev/null +++ b/src/upaddlethread.pas @@ -0,0 +1,72 @@ +unit UPaddleThread; + +interface + +uses + Classes, BGK32LIB, Windows; + + +type + TPaddleThread = class(TThread) + private + { Private declarations } + WaitMS : integer; // wait time in ms + protected + procedure Execute; override; + public + Count : integer; + Stop : Boolean; + constructor Create(UseUSB : boolean); + end; + +var PaddleThread : TPaddleThread; + +implementation + +{ Important: Methods and properties of objects in VCL can only be used in a + method called using Synchronize, for example, + + Synchronize(UpdateCaption); + + and UpdateCaption could look like, + + procedure TPaddleThread.UpdateCaption; + begin + Form1.Caption := 'Updated in a thread'; + end; } + +{ TPaddleThread } + +constructor TPaddleThread.Create(UseUSB : boolean); +begin + Count := 0; + if UseUSB then + WaitMS := 1 + else + WaitMS := 2; + FreeOnTerminate := True; + //Priority := tpLower; + inherited Create(False); +end; + +procedure TPaddleThread.Execute; +begin + Stop := False; + repeat + SleepEx(WaitMS, False); + +{$ifndef w95} +if KeyingPort = tkpUSB then + PaddleProcessUSB +else + PaddleProcess; +{$else} + PaddleProcess; +{$endif} + + until Terminated; +end; + +initialization + PaddleThread := nil; +end. diff --git a/src/utelnetset.dfm b/src/utelnetset.dfm new file mode 100644 index 00000000..91d1daa7 Binary files /dev/null and b/src/utelnetset.dfm differ diff --git a/src/utelnetset.pas b/src/utelnetset.pas new file mode 100644 index 00000000..e2cb2269 --- /dev/null +++ b/src/utelnetset.pas @@ -0,0 +1,28 @@ +unit utelnetset; + +interface + +uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls, + Buttons, ExtCtrls; + +type + TOKBottomDlg = class(TForm) + OKBtn: TButton; + CancelBtn: TButton; + Bevel1: TBevel; + HostNameCombo: TComboBox; + ComboBox1: TComboBox; + private + { Private declarations } + public + { Public declarations } + end; + +var + OKBottomDlg: TOKBottomDlg; + +implementation + +{$R *.DFM} + +end. diff --git a/src/zLogGlobal.pas b/src/zLogGlobal.pas new file mode 100644 index 00000000..ef25f4fc --- /dev/null +++ b/src/zLogGlobal.pas @@ -0,0 +1,1793 @@ +unit zLogGlobal; + +interface + +{uses + Windows, SysUtils, Classes;} +uses SysUtils, Windows, Classes; + +var CurrentFileName : string; + _Japanese : Boolean; + + MAINPATH : string; // stores the path for zlog.exe + + DEBUGMODE : boolean = false; + +const CONTESTNAME : string = ''; + + ZLOG_WIN2KMODE : boolean = false; + +const + // SerialContestType + _USEUTC = 32767; + _CR = Chr($0d); // carriage return + _LF = Chr($0a); + SER_ALL = 1; + SER_BAND = 2; + SER_MS = 3; // separate serial for run/multi stns + + CountDownStartTime : TDateTime = 0.0; + QSYCount : integer = 0; + + ZLinkHeader = '#ZLOG#'; + actAdd = $0A; + actDelete = $0D; + actInsert = $07; + actEdit = $0E; + actLock = $AA; + actUnlock = $BB; + + CWid : byte = 9; {11} + MaxQSO = 500; {initial capacity for the log} + + MAXLOGCAPACITY = 20000; + + MemoLength = 64; {max length of a memo} + + LineBreakCode : array [0..2] of string[2] + = (Chr($0d)+Chr($0a), Chr($0d), Chr($0a)); + _sep = '~'; {separator character} + UseUTC : boolean = False; + PostContest : boolean = False; + + OperatorCategory : integer = 0; // 0 = single op, 1 = multiop 2 = m/s + + DupeGracePeriod : integer = 99999999; // minutes after which qso is treated as NOT dupe; + +var AllowDupe : boolean; // enables user to log dupe qsos. Changed in UOptions + +type + TMode = (mCW, mSSB, mFM, mAM, mRTTY, mOther); + TBand = (b19, b35, b7, b10, b14, b18, b21, b24, b28, b50, b144, b430, b1200, b2400, b5600, b10g); + TPower = (p001, p002, p005, p010, p020, p025, p050, p100, p200, p500, p1000); + +const HiBand = b10g; + +var + SerialContestType : integer; // 0 if no serial # or SER_ALL, SER_BAND + SerialArray : array [b19..HiBand] of integer; // initialized in TContest.Create; + SerialArrayTX : array[0..64] of integer; +type + + TFastSortedList = class + private + List : array[0..MAXLOGCAPACITY] of string[20]; + items : integer; + public + constructor Create; + procedure Add(S : string); + function Exists(S : string) : boolean; + end; + + TQSOData = record + Time : TDateTime; + CallSign : string[12]; {13 bytes} + NrSent : string[30]; + NrRcvd : string[30]; + RSTSent : Smallint;//word; {2 bytes} + RSTRcvd : word; + Serial : integer; {4 bytes ?} + Mode : TMode; {1 byte} + Band : TBand; {1 byte} + Power : TPower; {1 byte} + Multi1 : string[30]; + Multi2 : string[30]; + NewMulti1 : boolean; + NewMulti2 : boolean; + Points : byte; + Operator : string[14]; {Operator's name} + Memo : string[MemoLength]; {max 64 char = 65 bytes} + CQ : boolean; {not used yet} + Dupe : boolean; + Reserve : byte; {used for z-link commands} + TX : byte; {Transmitter number for 2 TX category} + Power2 : integer; {used by ARRL DX side only} + Reserve2 : integer; { $FF when forcing to log} + Reserve3 : integer; {QSO ID#} + {TTSSSSRRCC TT:TX#(00-21) SSSS:Serial counter + RR:Random(00-99) CC:Edit counter 00 and up} + + end; + + TBandBool = array[b19..HiBand] of boolean; + + TQSO = class + QSO : TQSOData; + constructor Create; + procedure IncTime; + procedure DecTime; + function SerialStr : string; + function TimeStr : string; + function DateStr : string; + function BandStr : string; + function ModeStr : string; + function PowerStr : string; + function NewPowerStr : string; + function PointStr : string; + function RSTStr : string; + function RSTSentStr : string; + function PartialSummary(DispDate: boolean) : string; + function CheckCallSummary : string; + procedure UpdateTime; + function zLogALL : string; + //function QSO_ADIF(FieldName : string) : string; + function DOSzLogText : string; + function DOSzLogTextShort : string; + function QSOinText : string; {for data transfer} + procedure TextToQSO(str : string); {convert text to bin} + function QTCStr : string; + end; + + TQSOList = class + //ADIF_FieldName : string; // for exchange received + Saved : boolean; + List : TList; + QueList : TList; + QueOK : boolean; + AcceptDifferentMode : Boolean; + CountHigherPoints : Boolean; + DifferentModePointer : integer; //points to a qso on a different mode but not dupe + DupeCheckList : array[b19..HiBand] of TStringList; + function Year: integer; //returns the year of the 1st qso + function TotalQSO : integer; + function TotalPoints : integer; + function TotalCW : integer; + function TotalMulti1 : integer; + function TotalMulti2 : integer; + constructor Create(memo : string); + destructor Destroy; override; + procedure Add(aQSO : TQSO); + procedure Delete(i : integer); + procedure Insert(i : integer; aQSO : TQSO); + procedure SaveToFile(Filename : string); + procedure SaveToFilezLogDOSTXT(Filename : string); + procedure SaveToFilezLogALL(Filename : string); + //procedure SaveToFileADIF(Filename : string); + procedure SaveToFileByTX(Filename : string); + procedure LoadFromFile(Filename : string); + function IsDupe(aQSO : TQSO) : integer; + function IsDupe2(aQSO : TQSO; index : integer; var dupeindex : integer) : boolean; + function GetPartials(aQSO : TQSO; ALLBand : boolean) : TStrings; + procedure AddQue(aQSO : TQSO); + procedure ProcessQue; + procedure Clear; // deletes all QSOs without destroying the List. Keeps List[0] intact + procedure SortByTime; + function ContainBand : TBandBool; + procedure SetDupeFlags; + procedure DeleteBand(B : TBand); + function CheckQSOID(i : integer) : boolean; + procedure RebuildDupeCheckList; + procedure ClearDupeCheckList; + function QuickDupe(aQSO : TQSO) : TQSO; + procedure RemoveDupes; + function OpQSO(OpName : string) : integer; + end; + +const + PowerString : array[p001..p1000] of string[5] =('1W', + '2W', + '5W', + '10W', + '20W', + '25W', + '50W', + '100W', + '200W', + '500W', + '1kW'); + + NewPowerString : array[p001..p1000] of string[5] = + ('P', + 'L', + 'M', + 'H', + '', + '', + '', + '', + '', + '', + ''); + +const MHzString : array[b19..HiBand] of string[4] = ('1.9','3.5','7','10','14', + '18','21','24','28','50','144', + '430','1200','2400','5600','10G'); + + BandString : array[b19..HiBand] of string[11] = ('1.9 MHz','3.5 MHz','7 MHz','10 MHz', + '14 MHz', '18 MHz','21 MHz','24 MHz','28 MHz', + '50 MHz','144 MHz','430 MHz','1200 MHz','2400 MHz', + '5600 MHz','10 GHz & up'); + + ADIFBandString : array[b19..HiBand] of string[4] = ('160m','80m','40m','30m', + '20m', '17m','15m','12m','10m', + '6m','2m','70cm','23cm','13cm', + '6cm','3cm'); + + ModeString : array[mCW..mOther] of string[5] = + ('CW','SSB','FM','AM','RTTY','Other'); + + pwrP = TPower(0); + pwrL = TPower(1); + pwrM = TPower(2); + pwrH = TPower(3); + + TrueFalse : array[0..1] of boolean = (False, True); + +var BandModeSelect : array[0..1] of TQSOData; // contains band/mode for two tx; + +//function FreqKHzToBand(KHz : LongInt) : TBand; + +function Random10 : integer; +function UTCOffset : integer; //in minutes; utc = localtime + utcoffset +function ContainsDoubleByteChar(S : string) : boolean; +function kHzStr(Hz : integer) : string; +procedure IncEditCounter(var aQSO : TQSO); +function ExtractKenNr(S : string) : string; //extracts ken nr from aja#+power +function ExtractPower(S : string) : string; +function IsSHF(B : TBand) : boolean; // true if b >= 2400MHz +function PartialMatch(A, B : string) : boolean; // true if b matches pattern a +function IsMM(S : string) : boolean; // return true if Marine Mobile S is a callsign +function IsWVE(S : string) : boolean; // returns true if W/VE/KH6/KL7 S is country px NOT callsign +function GetHour(T : TDateTime) : integer; +function CurrentTime : TDateTime; {returns in UTC or local time } +function LowCase(C : Char) : Char; +function OldBandOrd(band : TBand) : integer; +function NotWARC(band : TBand) : boolean; +function SameQSO(aQSO, bQSO : TQSO) : boolean; +function SameQSOID(aQSO, bQSO : TQSO) : boolean; +function StrMore(a, b : string) : boolean; // true if a>b +function PXMore(a, b : string) : boolean; // JA1 > XE +function PXIndex(s : string) : integer; // AA = 0 AB = 1 etc +function PXMoreX(a, b : string) : boolean; // double char index +function HexStrToInt(str : string) : integer; +function Less(x, y : integer): integer; +function More(x, y : integer): integer; +function FillRight(s : string; len : integer) : string; +function FillLeft(s : string; len : integer) : string; +function GetUTC: TDateTime; +function GetContestName(Filename: string) : string; +function CoreCall(call : string) : string; +function UsesCoeff(Filename: string) : boolean; +function SameMode2(aMode, bMode : TMode) : boolean; + +var Log : TQSOList; + //SubLog : array[b19..HiBand] of TQSOList; + +implementation + +(*function ExecuteFile(const FileName, Params, DefaultDir: string; + ShowCmd: Integer): THandle; +var + zFileName, zParams, zDir: array[0..79] of Char; +begin + Result := ShellExecute(MainForm.Handle, nil, + StrPCopy(zFileName, FileName), StrPCopy(zParams, Params), + StrPCopy(zDir, DefaultDir), ShowCmd); +end; *) + +function Random10 : integer; +var H, M, S, ms : word; +begin + DecodeTime(SysUtils.Now, H, M, S, ms); + Result := S mod 10; +end; + +function UTCOffset : integer; +var TZinfo : TTimeZoneInformation; +begin + GetTimeZoneInformation(TZinfo); + Result := TZinfo.Bias; +end; + +function ContainsDoubleByteChar(S : string) : boolean; +var i : integer; +begin + Result := False; + for i := 1 to length(S) do + if ByteType(S, i) <> mbSingleByte then + begin + Result := True; + break; + end; +end; + +function kHzStr(Hz : integer) : string; +var k, kk : integer; +begin + k := Hz div 1000; + kk := Hz mod 1000; + kk := kk div 100; + if k > 100000 then + Result := IntToStr(k) + else + Result := IntToStr(k) + '.' + IntToStr(kk); +end; + +procedure IncEditCounter(var aQSO : TQSO); +begin + if aQSO.QSO.Reserve3 mod 100 < 99 then + inc(aQSO.QSO.Reserve3); +end; + +function ExtractKenNr(S : string) : string; //extracts ken nr from aja#+power +var str : string; +begin + Result := ''; + str := copy(S, 1, 2); + Result := str; +end; + +function ExtractPower(S : string) : string; //extracts power code. returns '' if no power +begin + Result := ''; + if S = '' then + exit; + if S[Length(S)] in ['H', 'M', 'L', 'P'] then + Result := S[Length(S)]; +end; + +function IsSHF(B : TBand) : boolean; // true if b >= 2400MHz +begin + Result := (B >= b2400); +end; + +function PartialMatch(A, B : string) : boolean; // true if b matches pattern a +var i : integer; +begin + Result := False; + if (Pos('.', A) = 0) {and (Pos('?',A)=0)} then + Result := (Pos(A, B) > 0) + else + begin + if length(A) > length(B) then + exit; + for i := 1 to length(A) do + if A[i] <> '.' then + if A[i] <> B[i] then + exit; + Result := True; + end; +end; + +function IsMM(S : string) : boolean; +begin + if pos('/MM',S) > 0 then + Result := True + else + Result := False; +end; + +function IsWVE(S : string) : boolean; +begin + if (S = 'K') or (S = 'W') or (S = 'N') or (S = 'KH6') or + (S = 'KL7') or (S = 'KL') or (S = 'VE') then + Result := True + else + Result := False; +end; + +function GetLocale: String; +var + Buf: PChar; +begin + Buf := StrAlloc(256); + GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_SENGCOUNTRY, Buf, 256); + Result := StrPas(Buf); + StrDisPose(Buf); +end; + +function GetHour(T : TDateTime) : integer; +var H, M, S, ms : word; +begin + DecodeTime(T, H, M, S, ms); + Result := H; +end; + +function CurrentTime : TDateTime; +begin + if UseUTC then + Result := GetUTC + else + Result := SysUtils.Now; +end; + +function LowCase(C : Char) : Char; +begin + if C in ['A'..'Z'] then + Result := Chr(ord(C)-ord('A')+ord('a')) + else + Result := C; +end; + +function OldBandOrd(band : TBand) : integer; +begin + case band of + b19..b7 : Result := ord(band); + b14 : Result := ord(band)-1; + b21 : Result := ord(band)-2; + b28..HiBand : Result := ord(band)-3; + else + Result := 0; + end; +end; + +function NotWARC(band : TBand) : boolean; +begin + if band in [b10, b18, b24] then + Result := False + else + Result := True; +end; + +function GetUTC: TDateTime; +var + stUTC: TSystemTime; +begin + GetSystemTime(stUTC); +//TDateTimes are doubles with the time expressed as the +//fractional component so we can add them together in +//this situation + result := EncodeDate(stUTC.wYear, stUTC.wMonth, stUTC.wDay) + + EncodeTime(stUTC.wHour, stUTC.wMinute, + stUTC.wSecond, stUTC.wMilliseconds); +end; + +function SameQSO(aQSO, bQSO : TQSO) : boolean; +begin + if (aQSO.QSO.Band = bQSO.QSO.Band) and + (aQSO.QSO.Callsign = bQSO.QSO.Callsign) and + (aQSO.QSO.Mode = bQSO.QSO.Mode) and + (aQSO.QSO.Dupe = bQSO.QSO.Dupe) and + (aQSO.QSO.Serial = bQSO.QSO.Serial) then + Result := True + else + Result := False; +end; + +function SameQSOID(aQSO, bQSO : TQSO) : boolean; +begin + if (aQSO.QSO.Reserve3 div 100) = (bQSO.QSO.Reserve3 div 100) then + Result := True + else + Result := False; +end; + +function StrMore(a, b : string) : boolean; {true if a>b} +var i, j : integer; +begin + for i := 1 to Less(length(a), length(b)) do + begin + if ord(a[i]) > ord(b[i]) then + begin + Result := True; + exit; + end; + if ord(a[i]) < ord(b[i]) then + begin + Result := False; + exit; + end; + end; + if length(a) > length(b) then + Result := True + else + Result := False; +end; + +function PXMore(a, b : string) : boolean; {true if a>b} +var i, j : integer; +begin + if a[1] = b[1] then + begin + if length(a) > length(b) then + begin + Result := False; + exit; + end; + if length(a) < length(b) then + begin + Result := True; + exit; + end; + Result := StrMore(a, b); + exit; + end; + Result := StrMore(a, b); +end; + +function PXIndex(s : string) : integer; +var i, j : integer; +begin + result := 0; + if length(s) = 0 then + exit; + if length(s) = 1 then + begin + case s[1] of + 'A'..'Z' : Result := ord(s[1]) - ord('A') + 37*37; + '0'..'9' : Result := ord(s[1]) - ord('0') + 37*37 + 26; + '/' : Result := 37*37 + 36; + end; + end + else + begin + i := 0; j := 0; + case s[1] of + 'A'..'Z' : i := ord(s[1]) - ord('A'); + '0'..'9' : i := ord(s[1]) - ord('0') + 26; + '/' : i := 36; + end; + case s[2] of + 'A'..'Z' : i := ord(s[2]) - ord('A'); + '0'..'9' : i := ord(s[2]) - ord('0') + 26; + '/' : i := 36; + end; + Result := i*37 + j; + end; +end; + +function PXMoreX(a, b : string) : boolean; {true if a>b} +var i, j, PXA, PXB : integer; +begin + PXA := PXIndex(a); + PXB := PXIndex(b); + if PXA = PXB then + begin + if length(a) > length(b) then + begin + Result := False; + exit; + end; + if length(a) < length(b) then + begin + Result := True; + exit; + end; + Result := StrMore(a, b); + exit; + end; + Result := PXA > PXB; +end; + +procedure TQSO.IncTime; +var T : TDateTime; +begin + Self.QSO.Time := Self.QSO.Time + 1.0 / (24*60); +end; + +procedure TQSO.DecTime; +var T : TDateTime; +begin + Self.QSO.Time := Self.QSO.Time - 1.0 / (24*60); +end; + +function TQSO.QSOinText : string; {for data transfer} +var str : string; +begin + str := 'ZLOGQSODATA:'+_sep; + //str := str + DateTimeToStr(QSO.Time) + _sep; + str := str + FloatToStr(QSO.Time) + _sep; + str := str + QSO.CallSign + _sep; + str := str + QSO.NrSent + _sep; + str := str + QSO.NrRcvd + _sep; + str := str + IntToStr(QSO.RSTSent) + _sep; + str := str + IntToStr(QSO.RSTRcvd) + _sep; + str := str + IntToStr(QSO.Serial) + _sep; + str := str + IntToStr(ord(QSO.Mode)) + _sep; + str := str + IntToStr(ord(QSO.Band)) + _sep; + str := str + IntToStr(ord(QSO.Power)) + _sep; + str := str + QSO.Multi1 + _sep; + str := str + QSO.Multi2 + _sep; + if QSO.NewMulti1 then + str := str + '1' + _sep + else + str := str + '0' + _sep; + if QSO.NewMulti2 then + str := str + '1' + _sep + else + str := str + '0' + _sep; + str := str + IntToStr(QSO.Points) + _sep; + str := str + QSO.Operator + _sep; + str := str + QSO.Memo + _sep; + if QSO.CQ then + str := str + '1' + _sep + else + str := str + '0' + _sep; + if QSO.Dupe then + str := str + '1' + _sep + else + str := str + '0' + _sep; + str := str + IntToStr(QSO.Reserve) + _sep; + str := str + IntToStr(QSO.TX) + _sep; + str := str + IntToStr(QSO.Power2) + _sep; + str := str + IntToStr(QSO.Reserve2) + _sep; + str := str + IntToStr(QSO.Reserve3); + + Result := str; +end; + +procedure TQSO.TextToQSO(str : string); {convert text to bin} +var _Items : array[0..25] of string; + i, j : integer; +begin + for i := 0 to 25 do + _Items[i] := ''; + j := 0; + for i := 1 to length(str) do + begin + if str[i] = _sep then + inc(j) + else + _Items[j] := _Items[j] + str[i]; + end; + + if _Items[0] <> 'ZLOGQSODATA:' then exit; + //QSO.Time := StrToDateTime(_Items[1]); + try + QSO.Time := StrToFloat(_Items[1]); + QSO.CallSign := _Items[2]; + QSO.NrSent := _Items[3]; + QSO.NrRcvd := _Items[4]; + QSO.RSTSent := StrToInt(_Items[5]); + QSO.RSTRcvd := StrToInt(_Items[6]); + QSO.Serial := StrToInt(_Items[7]); + QSO.Mode := TMode(StrToInt(_Items[8])); + QSO.Band := TBand(StrToInt(_Items[9])); + QSO.Power := TPower(StrToInt(_Items[10])); + QSO.Multi1 := _Items[11]; + QSO.Multi2 := _Items[12]; + QSO.NewMulti1 := StrToInt(_Items[13]) = 1; + QSO.NewMulti2 := StrToInt(_Items[14]) = 1; + QSO.Points := StrToInt(_Items[15]); + QSO.Operator := _Items[16]; + QSO.Memo := _Items[17]; + QSO.CQ := StrToInt(_Items[18]) = 1; + QSO.Dupe := StrToInt(_Items[19]) = 1; + QSO.Reserve := StrToInt(_Items[20]); + QSO.TX := StrToInt(_Items[21]); + QSO.Power2 := StrToInt(_Items[22]); + QSO.Reserve2 := StrToInt(_Items[23]); + QSO.Reserve3 := StrToInt(_Items[24]); + except + on EConvertError do + QSO.Memo := 'Convert Error!'; + end; +{ if QSO.Dupe then + str := str + '1' + _sep + else + str := str + '0' + _sep; + str := str + IntToStr(QSO.Reserve);} +end; + +function Power(base, power : integer) : integer; +var i, j : integer; +begin + j := 1; + for i := 1 to power do + j := j * base; + Result := j; +end; + +function HexStrToInt(str : string) : integer; +var i, j, digit : integer; +begin + i := 0; + for j := length(str) downto 1 do + begin + case str[j] of + '0'..'9' : digit := ord(str[j])-ord('0'); + 'a'..'f' : digit := ord(str[j])-ord('a')+10; + 'A'..'F' : digit := ord(str[j])-ord('A')+10; + else + begin + Result := -1; + exit; + end; + end; + i := i + Power(16,length(str)-j)*digit; + end; + Result := i; +end; + +function Less(x, y : integer): integer; +begin + if x > y then + result := y + else + result := x; +end; + +function More(x, y : integer): integer; +begin + if x > y then + result := x + else + result := y; +end; + +function FillRight(s : string; len : integer) : string; +var str : string; +begin + str := s; + while Length(str) < len do + str := str + ' '; + Result := str; +end; + +function FillLeft(s : string; len : integer) : string; +var str : string; +begin + str := s; + while Length(str) < len do + str := ' ' + str; + Result := str; +end; + +constructor TFastSortedList.Create; +var i : integer; +begin + for i := 0 to MAXLOGCAPACITY do + List[i] := ''; + items := 0; +end; + +procedure TFastSortedList.Add(S : string); +begin +end; + +function TFastSortedList.Exists(S : string) : boolean; +begin +end; + +constructor TQSO.Create; +begin + with QSO do + begin + Time := SysUtils.Date + SysUtils.Time; + CallSign := ''; + {NrSent := '';} + NrRcvd := ''; + if Mode = mCW then + begin + RSTSent := 599; + RSTRcvd := 599; + end + else + begin + RSTSent := 59; + RSTRcvd := 59; + end; + + Serial := 1; + {Mode := mCW; + Band := b7;} + Multi1 := ''; + Multi2 := ''; + NewMulti1 := false; + NewMulti2 := false; + Points := 1; + {Operator := '';} + Memo := ''; + CQ := False; + Dupe := False; + Reserve := 0; + TX := 0; + Power2 := 500; + Reserve2 := 0; + Reserve3 := 0; + end; +end; + +procedure TQSO.UpdateTime; +begin + if UseUTC then + QSO.Time := GetUTC + else + QSO.Time := SysUtils.Now; +end; + +function TQSO.SerialStr : string; +var s : string; +begin + s := IntToStr(Self.QSO.Serial); + case Length(s) of + 1 : s := '00'+s; + 2 : s := '0' +s; + end; + Result := s; +end; + +function TQSO.QTCStr : string; +begin + Result := FormatDateTime('hhnn',Self.QSO.Time)+' '+ Self.QSO.Callsign + + ' ' + Self.QSO.NrRcvd; +end; + +function TQSO.TimeStr : string; +begin + Result := FormatDateTime('hh:nn',Self.QSO.Time); +end; + +function TQSO.DateStr : string; +begin + Result := FormatDateTime('yy/mm/dd',Self.QSO.Time); +end; + +function TQSO.BandStr : string; +begin + Result := MHzString[Self.QSO.Band]; +end; + +function TQSO.ModeStr : string; +begin + Result := ModeString[Self.QSO.Mode]; +end; + +function TQSO.PowerStr : string; +var i : integer; +begin + i := Self.QSO.power2; + case i of + 9999 : Result := 'KW'; + 10000 : Result := '1KW'; + 10001 : Result := 'K'; + else + Result := IntToStr(i); + end; +end; + +function TQSO.NewPowerStr : string; +begin + Result := NewPowerString[Self.QSO.power]; +end; + +function TQSO.PointStr : string; +begin + Result := IntToStr(Self.QSO.points); +end; + +function TQSO.RSTStr : string; +begin + Result := IntToStr(Self.QSO.RSTrcvd); +end; + +function TQSO.RSTSentStr : string; +begin + Result := IntToStr(Self.QSO.RSTsent); +end; + +function TQSO.PartialSummary(DispDate: boolean) : string; +var S : string; +begin + if DispDate then S := DateStr+' ' else + S := ''; + S := S + TimeStr + ' '; + S := S + FillRight(Self.QSO.Callsign, 12); + S := S + FillRight(Self.QSO.NrRcvd, 15); + S := S + FillRight(BandStr, 5); + S := S + FillRight(ModeStr, 5); + Result := S; +end; + +function TQSO.CheckCallSummary : string; +var S : string; +begin + S := ''; + S := S + FillRight(BandStr, 5); + S := S + TimeStr + ' '; + S := S + FillRight(Self.QSO.Callsign, 12); + S := S + FillRight(Self.QSO.NrRcvd, 15); + S := S + FillRight(ModeStr, 5); + Result := S; +end; + +function TQSO.DOSzLogText : string; +var S, temp : string; + Year, Month, Day, Hour, Min, Sec, MSec: Word; +begin + S := ''; + DecodeDate(Self.QSO.Time, Year, Month, Day); + DecodeTime(Self.QSO.Time, Hour, Min, Sec, MSec); + S := S + FillLeft(IntToStr(Month), 3) + ' ' + + FillLeft(IntToStr(Day), 3) + ' '; + + temp := IntToStr(Hour*100+Min); + case length(temp) of + 1 : temp := '000' + temp; + 2 : temp := '00' + temp; + 3 : temp := '0' + temp; + end; + + S := S + temp + ' '; + S := S + FillRight(Self.QSO.Callsign, 11); + S := S + FillLeft(IntToStr(Self.QSO.RSTsent), 3); + S := S + FillRight(Self.QSO.NrSent, 31); + S := S + FillLeft(IntToStr(Self.QSO.RSTrcvd), 3); + S := S + FillRight(Self.QSO.NrRcvd, 31); + + if Self.QSO.NewMulti1 then + S := S + FillLeft(Self.QSO.Multi1, 6) + else + S := S + ' '; + S := S + ' ' + FillLeft(MHzString[Self.QSO.Band], 4); + S := S + ' ' + FillRight(ModeString[Self.QSO.Mode], 3); + S := S + ' ' + FillRight(IntToStr(Self.QSO.Points), 2); + if Self.QSO.Operator <> '' then + //S := S + ' ' + '%%'+ Self.QSO.Operator +'%%'; + S := S + '%%'+ Self.QSO.Operator +'%%'; + // S := S + ' ' + Self.QSO.memo; + S := S + Self.QSO.memo; + Result := S; +end; + +function TQSO.DOSzLogTextShort : string; +var S, temp : string; + Year, Month, Day, Hour, Min, Sec, MSec: Word; +begin + S := ''; + DecodeDate(Self.QSO.Time, Year, Month, Day); + DecodeTime(Self.QSO.Time, Hour, Min, Sec, MSec); + S := S + FillLeft(IntToStr(Month), 3) + ' ' + + FillLeft(IntToStr(Day), 3) + ' '; + + temp := IntToStr(Hour*100+Min); + case length(temp) of + 1 : temp := '000' + temp; + 2 : temp := '00' + temp; + 3 : temp := '0' + temp; + end; + + S := S + temp + ' '; + S := S + FillRight(Self.QSO.Callsign, 11); + S := S + FillLeft(IntToStr(Self.QSO.RSTsent), 3); + S := S + FillRight(Self.QSO.NrSent, 10); + S := S + FillLeft(IntToStr(Self.QSO.RSTrcvd), 3); + S := S + FillRight(Self.QSO.NrRcvd, 10); + + if Self.QSO.NewMulti1 then + S := S + FillLeft(Self.QSO.Multi1, 6) + else + S := S + ' '; + S := S + ' ' + FillLeft(MHzString[Self.QSO.Band], 4); + S := S + ' ' + FillRight(ModeString[Self.QSO.Mode], 3); + S := S + ' ' + FillRight(IntToStr(Self.QSO.Points), 2); + if Self.QSO.Operator <> '' then + S := S + ' ' + '%%'+ Self.QSO.Operator +'%%'; + S := S + ' ' + Self.QSO.memo; + Result := S; +end; + +function TQSO.zLogALL : string; +var S, temp : string; + nrlen : integer; +begin + nrlen := 7; + S := ''; + S := S + FormatDateTime('yyyy/mm/dd hh":"nn ',Self.QSO.Time); + S := S + FillRight(Self.QSO.Callsign, 13); + S := S + FillRight(IntToStr(Self.QSO.RSTsent), 4); + S := S + FillRight(Self.QSO.NrSent, nrlen+1); + S := S + FillRight(IntToStr(Self.QSO.RSTrcvd), 4); + S := S + FillRight(Self.QSO.NrRcvd, nrlen+1); + + if Self.QSO.NewMulti1 then + S := S + FillRight(Self.QSO.Multi1, 6) + else + S := S + '- '; + if Self.QSO.NewMulti2 then + S := S + FillRight(Self.QSO.Multi2, 6) + else + S := S + '- '; + S := S + FillRight(MHzString[Self.QSO.Band], 5); + S := S + FillRight(ModeString[Self.QSO.Mode], 5); + S := S + FillRight(IntToStr(Self.QSO.Points), 3); + if Self.QSO.Operator <> '' then + S := S + FillRight('%%'+Self.QSO.Operator+'%%', 19); + if OperatorCategory > 0 then + S := S + FillRight('TX#'+IntToStr(Self.QSO.TX), 6); + S := S + Self.QSO.memo; + Result := S; +end; + + +function TQSOList.ContainBand : TBandBool; +var R : TBandBool; + B : TBand; + i : Integer; +begin + for B := b19 to HiBand do + R[B] := False; + for i := 1 to TotalQSO do + R[TQSO(List[i]).QSO.Band] := True; + Result := R; +end; + +constructor TQSOList.Create(memo : string); +var Q : TQSO; + B : TBand; +begin + //ADIF_FieldName := 'qth'; + List := TList.Create; + QueList := TList.Create; + + for B := b19 to HiBand do + begin + DupeCheckList[B] := TStringList.Create; + DupeCheckList[B].Sorted := True; + DupeCheckList[B].Duplicates := dupAccept; + end; + + Q := TQSO.Create; + List.Add(Q); + TQSO(List[0]).QSO.memo := memo; + TQSO(List[0]).QSO.Time := 1.0000; + TQSO(List[0]).QSO.Time := -1; + Saved := True; + QueOK := True; + AcceptDifferentMode := False; + CountHigherPoints := False; + DifferentModePointer := 0; +end; + +function TQSOList.Year : integer; +var T : TDateTime; + y, m, d : word; +begin + Result := 0; + if TotalQSO > 0 then + T := TQSO(List[1]).QSO.Time + else + exit; + DecodeDate(T, y, m, d); + Result := y; +end; + +procedure TQSOList.SortByTime; +var i : integer; + boo : boolean; +begin + if TotalQSO < 2 then exit; + boo := true; + while boo do + begin + boo := false; + for i := 1 to TotalQSO - 1 do + if TQSO(List[i]).QSO.Time > TQSO(List[i+1]).QSO.Time then + begin + List.Exchange(i, i+1); + boo := true; + end; + end; +end; + +procedure TQSOList.Clear; +var i, max : integer; + aQSO : TQSO; +begin + max := List.Count - 1; + For i := 1 to max do + begin + aQSO := List[1]; + aQSO.Free; + List.Delete(1); + end; + List.Pack; + ClearDupeCheckList; + Saved := False; +end; + +procedure TQSOList.ClearDupeCheckList; +var B : TBand; +begin + for B := b19 to HiBand do + DupeCheckList[B].Clear; +end; + +procedure TQSOList.Add(aQSO : TQSO); +var xQSO : TQSO; +begin + xQSO := TQSO.Create; + xQSO.QSO := aQSO.QSO; + List.Add(xQSO); + + DupeCheckList[xQSO.QSO.Band].AddObject(CoreCall(xQSO.QSO.Callsign),xQSO); + + Saved := False; +end; + +procedure TQSOList.AddQue(aQSO : TQSO); +var xQSO : TQSO; +begin + xQSO := TQSO.Create; + xQSO.QSO := aQSO.QSO; + //xQSO.QSO.Reserve := actAdd; + QueList.Add(xQSO); + Saved := False; +end; + +procedure TQSOList.ProcessQue; +var xQSO, yQSO, zQSO, wQSO : TQSO; + i, j, id : integer; +begin + if QueList.Count = 0 then + exit; + Repeat until QueOK; + while QueList.Count > 0 do + begin + xQSO := TQSO(QueList[0]); + case xQSO.QSO.Reserve of + actAdd : Add(xQSO); + actDelete : + begin + for i := 1 to TotalQSO do + begin + yQSO := TQSO(List[i]); + if SameQSOID(xQSO, yQSO) then + begin + Self.Delete(i); + break; + end; + end; + end; + actEdit : + begin + for i := 1 to TotalQSO do + begin + yQSO := TQSO(List[i]); + if SameQSOID(xQSO, yQSO) then + begin + //TQSO(List[i]).QSO := xQSO.QSO; + yQSO.QSO := xQSO.QSO; + RebuildDupeCheckList; + break; + end; + end; + { + if QueList.Count = 1 then + exit; + for j := 1 to QueList.Count - 1 do + if TQSO(QueList[j]).QSO.Reserve = actEdit then + break; + yQSO := TQSO(QueList[j]); + if yQSO.QSO.Reserve <> actEdit then exit; + + for i := 1 to TotalQSO do + begin + zQSO := TQSO(List[i]); + if SameQSO(xQSO, zQSO) then + begin + TQSO(List[i]).QSO := yQSO.QSO; + break; + end; + end; + + QueList.Delete(j);} + end; + actInsert : + begin + for i := 1 to TotalQSO do + begin + yQSO := TQSO(List[i]); + id := xQSO.QSO.Reserve2 div 100; + if id = (yQSO.QSO.Reserve3 div 100) then + begin + wQSO := TQSO.Create; + wQSO.QSO := xQSO.QSO; + Insert(i, wQSO); + break; + end; + end; + { + if QueList.Count = 1 then + exit; + for j := 1 to QueList.Count - 1 do + if TQSO(QueList[j]).QSO.Reserve = actInsert then + break; + yQSO := TQSO(QueList[j]); + if yQSO.QSO.Reserve <> actInsert then exit; + + + for i := 1 to TotalQSO do + begin + zQSO := TQSO(List[i]); + if SameQSO(xQSO, zQSO) then + begin + wQSO := TQSO.Create; + wQSO.QSO := yQSO.QSO; + Insert(i, wQSO); + break; + end; + end; + QueList.Delete(j); } + end; + actLock : + begin + for i := 1 to TotalQSO do + begin + zQSO := TQSO(List[i]); + if SameQSOID(xQSO, zQSO) then + begin + TQSO(List[i]).QSO.Reserve := actLock; + break; + end; + end; + end; + actUnLock : + begin + for i := 1 to TotalQSO do + begin + zQSO := TQSO(List[i]); + if SameQSOID(xQSO, zQSO) then + begin + TQSO(List[i]).QSO.Reserve := 0; + break; + end; + end; + end; + end; + TQSO(QueList[0]).Free; //added 0.23 + QueList.Delete(0); + QueList.Pack; + end; + Saved := False; +end; + +procedure TQSOList.Delete(i : integer); +var aQSO : TQSO; +begin + if i <= TotalQSO then + begin + aQSO := TQSO(List[i]); + aQSO.Free; + List.Delete(i); + List.Pack; + {List[i]:=nil; + List.Pack;} + Saved := False; + RebuildDupeCheckList; + end; +end; + +procedure TQSOList.RemoveDupes; +var i : integer; + aQSO : TQSO; +begin + for i := 1 to TotalQSO do + begin + aQSO := TQSO(List[i]); + if pos('-DUPE-', aQSO.QSO.Memo) > 0 then + begin + List[i] := nil; + aQSO.Free; + end; + end; + List.Pack; + Saved := False; + RebuildDupeCheckList; +end; + + +procedure TQSOList.DeleteBand(B : TBand); +var i : integer; +begin + for i := 1 to TotalQSO do + if TQSO(List[i]).QSO.Band = B then + begin + TQSO(List[i]).Free; + List[i] := nil; + Saved := False; + end; + RebuildDupeCheckList; + List.Pack; +end; + +function TQSOList.CheckQSOID(i : integer) : boolean; +var j, id : integer; +begin + Result := False; + id := i div 100; // last two digits are edit counter + for j := 1 to TotalQSO do + begin + if id = (TQSO(List[j]).QSO.Reserve3 div 100) then + begin + Result := True; + break; + end; + end; +end; + +procedure TQSOList.Insert(i : integer; aQSO : TQSO); +begin + List.Insert(i, aQSO); + RebuildDupeCheckList; + Saved := False; +end; + +procedure TQSOList.SaveToFile(Filename : string); +var f : file of TQSOdata; + //D : TQSOdata; + i : word; + back : string; +begin + back := filename; + back := copy(back,1,length(back)-4) + '.BAK'; // change the extension + if FileExists(back) then + begin + AssignFile(f, Filename); + if FileSize(f) = 0 then + begin + RenameFile(back, back + '.bak'); + end + else + SysUtils.DeleteFile(back); + end; + RenameFile(filename, back); + AssignFile(f, Filename); + rewrite(f); + //D.memo := 'test'; + //write(f,D); + for i := 0 to TotalQSO do // changed from 1 to TotalQSO to 0 to TotalQSO + write(f,TQSO(List[i]).QSO); + closefile(f); + Saved := True; +end; + +procedure TQSOList.SaveToFilezLogDOSTXT(Filename : string); +var f : textfile; + str : string; + i, j, max : integer; +const LongHeader = 'mon day time callsign sent rcvd multi MHz mode pts memo'; + ShortHeader ='mon day time callsign sent rcvd multi MHz mode pts memo'; +begin + assignfile(f, Filename); + rewrite(f); + {str := 'zLog for Windows Text File';} + max := 0; + for i := 1 to TotalQSO do + begin + j := length(TQSO(List[i]).QSO.NrRcvd); + if j > max then + max := j; + j := length(TQSO(List[i]).QSO.NrSent); + if j > max then + max := j; + end; + if j >= 10 then + begin + writeln(f, LongHeader); + for i := 1 to TotalQSO do + writeln(f, TQSO(List[i]).DOSzLogText); + end + else + begin + writeln(f, ShortHeader); + for i := 1 to TotalQSO do + writeln(f, TQSO(List[i]).DOSzLogTextShort); + end; + closefile(f); +end; + +procedure TQSOList.SaveToFilezLogALL(Filename : string); +var f : textfile; + Header : string; + i, max : integer; +begin + Header := 'zLog for Windows '; //+Options.Settings._mycall; + assignfile(f, Filename); + rewrite(f); + {str := 'zLog for Windows Text File';} + max := 0; + writeln(f, Header); + for i := 1 to TotalQSO do + writeln(f, TQSO(List[i]).zLogALL); + closefile(f); +end; + +procedure TQSOList.SaveToFileByTX(Filename : string); +var f : textfile; + Header : string; + i, j : integer; + txset : set of byte; +begin + txset := []; + for i := 1 to TotalQSO do + txset := txset + [TQSO(List[i]).QSO.TX]; + Header := 'zLog for Windows '; //+Options.Settings._mycall; + System.Delete(FileName,Length(FileName)-2,3); + for i := 0 to 255 do + if i in txset then + begin + assignfile(f, Filename+'.'+IntToStr(i)+'.TX'); + rewrite(f); + writeln(f, Header+' TX# '+IntToStr(i)); + for j := 1 to TotalQSO do + if TQSO(List[j]).QSO.TX = i then + writeln(f, TQSO(List[j]).zLogALL); + closefile(f); + end; +end; + +procedure TQSOList.LoadFromFile(Filename : string); +begin +end; + +destructor TQSOList.Destroy; +var i : integer; +begin + for i := 0 to List.Count - 1 do + begin + if List[i] <> nil then + TQSO(List[i]).Free; + end; + List.Free; +end; + +procedure TQSOList.RebuildDupeCheckList; +var i : integer; + Q : TQSO; +begin + ClearDupeCheckList; + for i := 0 to List.Count - 1 do + begin + Q := TQSO(List[i]); + DupeCheckList[Q.QSO.Band].AddObject(CoreCall(Q.QSO.Callsign),Q); + end; +end; + +function TQSOList.QuickDupe(aQSO : TQSO) : TQSO; +var i : integer; + s : string; + Q, Q2 : TQSO; +begin + Result := nil; + Q := nil; + s := CoreCall(aQSO.QSO.Callsign); + i := DupeCheckList[aQSO.QSO.Band].IndexOf(s); + if (i >= 0) and (i < DupeCheckList[aQSO.QSO.Band].Count) then + begin + Q := TQSO(DupeCheckList[aQSO.QSO.Band].Objects[i]); + if Q.QSO.Band = aQSO.QSO.Band then + Result := Q; + end; + + if AcceptDifferentMode and (Q <> nil) then + begin + if aQSO.QSO.Mode <> Q.QSO.Mode then + begin + Result := nil; + for i := 0 to DupeCheckList[aQSO.QSO.Band].Count - 1 do + begin + if s = DupeCheckList[aQSO.QSO.Band][i] then + begin + Q2 := TQSO(DupeCheckList[aQSO.QSO.Band].Objects[i]); + if aQSO.QSO.Mode = Q2.QSO.Mode then + begin + Result := Q2; + exit; + end; + end; + end; + end; + end; +end; + +function TQSOList.OpQSO(OpName : string) : integer; +var i, j : integer; +begin + j := 0; + for i := 1 to TotalQSO do + if TQSO(List[i]).QSO.Operator = OpName then + inc(j); + Result := j; +end; + +function CoreCall(call : string) : string; +var p : integer; + str : string; +begin + str := call; + p:=Pos('/',str); + if p > 4 then + Delete(str, p, 255); + Result := str; +end; + +function SameMode(aQSO, bQSO : TQSO) : boolean; +begin + Result := False; + case aQSO.QSO.Mode of + mCW : if bQSO.QSO.Mode = mCW then + Result := True; + mSSB, mFM, mAM : + if bQSO.QSO.Mode in [mSSB, mFM, mAM] then + Result := True; + mRTTY : + if bQSO.QSO.Mode = mRTTY then + Result := True; + mOther : + if bQSO.QSO.Mode = mOther then + Result := True; + end; +end; + +function SameMode2(aMode, bMode : TMode) : boolean; +begin + Result := False; + case aMode of + mCW : if bMode = mCW then + Result := True; + mSSB, mFM, mAM : + if bMode in [mSSB, mFM, mAM] then + Result := True; + mRTTY : + if bMode = mRTTY then + Result := True; + mOther : + if bMode = mOther then + Result := True; + end; +end; + +function TQSOList.IsDupe(aQSO : TQSO) : integer; +var x : integer; + i : word; + str : string; +begin + DifferentModePointer := 0; + x := 0; + str := CoreCall(aQSO.QSO.Callsign); + for i := 1 to TotalQSO do + begin + if (aQSO.QSO.band = TQSO(List[i]).QSO.band) and (str = CoreCall(TQSO(List[i]).QSO.Callsign)) then + begin + if Not(AcceptDifferentMode) then + begin + x := i; + break; + end + else + begin + if SameMode(aQSO, TQSO(List[i])) then + begin + x := i; + break; + end + else {different mode qso exists but not dupe} + begin + DifferentModePointer := i; + end; + end; + end; + end; + Result := x; +end; + +function TQSOList.IsDupe2(aQSO : TQSO; index : integer; var dupeindex : integer) : boolean; +var boo : boolean; + i : word; + str : string; +begin + boo := false; + str := CoreCall(aQSO.QSO.Callsign); + for i := 1 to TotalQSO do + begin + if (aQSO.QSO.band = TQSO(List[i]).QSO.band) and + (str = CoreCall(TQSO(List[i]).QSO.Callsign)) and + ((index <= 0) or (index <> i)) then + begin + if Not(AcceptDifferentMode) or + (AcceptDifferentMode and SameMode(aQSO, TQSO(List[i])) ) then + begin + boo := True; + if index > 0 then + dupeindex := i; + break; + end; + end; + end; + Result := boo; +end; + +procedure TQSOList.SetDupeFlags; +var i, j : integer; + str, temp : string; + aQSO : TQSO; + TempList : array[ord('A')..ord('Z')] of TStringList; + ch : char; + core : string; +begin + if TotalQSO = 0 then + exit; + for i := ord('A') to ord('Z') do + begin + TempList[i] := TStringList.Create; + TempList[i].Sorted := True; + TempList[i].Capacity := 200; + end; + + for i := 1 to TotalQSO do + begin + aQSO := TQSO(List[i]); + core := CoreCall(aQSO.QSO.Callsign); + if AcceptDifferentMode then + str := core + aQSO.BandStr + aQSO.ModeStr + else + str := core + aQSO.BandStr; + + if core = '' then + ch := 'Z' + else + ch := core[length(core)]; + + if not(ch in ['A'..'Z']) then + ch := 'Z'; + + if TempList[ord(ch)].Find(str, j) = True then + begin + aQSO.QSO.Points := 0; + aQSO.QSO.Dupe := True; + temp := aQSO.QSO.memo; + if Pos('-DUPE-',temp) = 0 then + aQSO.QSO.memo := '-DUPE- '+temp; + end + else + begin + aQSO.QSO.Dupe := False; + temp := aQSO.QSO.memo; + if Pos('-DUPE-',temp) = 1 then + aQSO.QSO.memo := Copy(temp, 8, 255); + TempList[ord(ch)].Add(str); + end; + end; + for i := ord('A') to ord('Z') do + begin + TempList[i].Clear; + TempList[i].Free; + end; +end; + +function TQSOList.GetPartials(aQSO : TQSO; ALLBand : boolean) : TStrings; +begin {function moved to UPartials} +end; + +function TQSOList.TotalQSO : integer; +begin + Result := List.Count - 1; +end; + +function TQSOList.TotalPoints : integer; +var count, i : integer; +begin + count := 0; + for i := 1 to TotalQSO do + count := TQSO(List.Items[i]).QSO.Points + count; + Result := count; +end; + +function TQSOList.TotalCW : integer; +var count, i : integer; +begin + count := 0; + for i := 1 to TotalQSO do + if TQSO(List.Items[i]).QSO.Mode = mCW then + inc(count); + Result := count; +end; + +function TQSOList.TotalMulti1 : integer; +var count, i : integer; +begin + count := 0; + for i := 1 to TotalQSO do + if TQSO(List.Items[i]).QSO.NewMulti1 then + inc(count); + Result := count; +end; + +function TQSOList.TotalMulti2 : integer; +var count, i : integer; +begin + count := 0; + for i := 1 to TotalQSO do + if TQSO(List.Items[i]).QSO.NewMulti2 then + inc(count); + Result := count; +end; + +function GetContestName(Filename: string) : string; +var zfile : textfile; + str, rstr : string; + check : boolean; +begin + str := ExtractFileName(FileName); + + if FileExists(FileName) = False then + begin + Result := str+' does not exist'; + exit; + end; + + System.Assign(zfile, FIlename); + System.reset(zfile); + while not(eof(zfile)) do + begin + readln(zfile,rstr); + if rstr[1]='#' then + begin + Delete(rstr, 1, 1); + str := rstr; + break; + end; + end; + System.closefile(zfile); + Result := str; +end; + +function UsesCoeff(Filename: string) : boolean; +var zfile : textfile; + str, rstr : string; + check : boolean; +begin + Result := False; + str := ExtractFileName(FileName); + System.Assign(zfile, FIlename); + {$I-} + System.reset(zfile); + {$I+} + check := (IOresult=0); + if check then + begin + while not(eof(zfile)) do + begin + readln(zfile,rstr); + rstr := Uppercase(rstr); + if pos('COEFF',rstr) = 1 then + begin + if pos('ON', rstr) > 0 then + Result := True; + end; + end; + System.closefile(zfile); + end; +end; + +var B : TBand; + +initialization + Log := TQSOList.Create('default'); + Log.List.Capacity := MaxQSO; + +{ + for B := b19 to HiBand do + SubLog[B] := TQSOList.Create('sublog'); //0.23 +} + + CurrentFileName := ''; + if GetLocale = 'Japan' then + _Japanese := True + else + _Japanese := False; +finalization + // Log.Destroy; + +end. diff --git a/src/zprintw.pas b/src/zprintw.pas new file mode 100644 index 00000000..e7e1a98e Binary files /dev/null and b/src/zprintw.pas differ diff --git a/zlogsource2.zip b/zlogsource2.zip deleted file mode 100644 index a60aea75..00000000 Binary files a/zlogsource2.zip and /dev/null differ